Yocto 2.5

Move OpenBMC to Yocto 2.5(sumo)

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
diff --git a/import-layers/meta-openembedded/meta-filesystems/README b/import-layers/meta-openembedded/meta-filesystems/README
index 0f7cc9b..97d0e94 100644
--- a/import-layers/meta-openembedded/meta-filesystems/README
+++ b/import-layers/meta-openembedded/meta-filesystems/README
@@ -10,66 +10,31 @@
 This layer depends on:
 
   URI: git://git.openembedded.org/bitbake
-  branch: 1.36
+  branch: master
 
   URI: git://git.openembedded.org/openembedded-core
   layers: meta
-  branch: rocko
+  branch: master
 
   URI: git://git.openembedded.org/meta-openembedded
   layers: meta-oe
-  branch: rocko
+  branch: master
 
 Patches
 =======
 
 Please submit any patches against the filesystems layer to the
 OpenEmbedded development mailing list (openembedded-devel@lists.openembedded.org)
-with '[meta-filesystems][rocko]' in the subject.
+with '[meta-filesystems]' in the subject.
 
-Maintainers List:
-  physfs      Andreas Müller <schnitzeltony@googlemail.com>
-
-  fuse        Koen Kooi <koen@dominion.thruhere.net>
-              Philip Balister <philip@balister.org>
-              hongxu jia <hongxu.jia@windriver.com>
-
-  ifuse       Sander van Grieken <sander@outrightsolutions.nl>
-              Koen Kooi <koen@dominion.thruhere.net>
-
-  sshfs-fuse  Philip Balister <philip@balister.org>
-              Koen Kooi <koen@dominion.thruhere.net>
-
-  owfs        Otavio Salvador <otavio@ossystems.com.br>
-              Koen Kooi <koen@dominion.thruhere.net>
-              hongxu jia <hongxu.jia@windriver.com>
-
-  ntfs-3g-ntfsprogs  Otavio Salvador <otavio@ossystems.com.br>
-                     hongxu jia <hongxu.jia@windriver.com>
-
-  cramfs      Koen Kooi <koen@dominion.thruhere.net>
-
-  smbnetfs    Sander van Grieken <sander@outrightsolutions.nl>
-              Koen Kooi <koen@dominion.thruhere.net>
-
-  fuse-exfat  hongxu jia <hongxu.jia@windriver.com>
-
-  exfat-utils hongxu jia <hongxu.jia@windriver.com>
-
-  f2fs-tools  Martin Jansa <Martin.Jansa@gmail.com>
-              Koen Kooi <koen@dominion.thruhere.net>
-
-  xfsprogs    Koen Kooi <koen@dominion.thruhere.net>
-              hongxu jia <hongxu.jia@windriver.com>
+Layer maintainer: Armin Kuster <akuster808@gmail.com>
 
 When sending single patches, please use something like:
 
    git send-email -1 -M \
         --to openembedded-devel@lists.openembedded.org \
-        --subject-prefix=meta-filesystems][rocko][PATCH
+        --subject-prefix=meta-filesystems][PATCH
 
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
 
 Table of Contents
 =================
diff --git a/import-layers/meta-openembedded/meta-filesystems/conf/layer.conf b/import-layers/meta-openembedded/meta-filesystems/conf/layer.conf
index 9ed6d1b..dbcff42 100644
--- a/import-layers/meta-openembedded/meta-filesystems/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-filesystems/conf/layer.conf
@@ -14,3 +14,5 @@
 LAYERVERSION_filesystems-layer = "1"
 
 LAYERDEPENDS_filesystems-layer = "core openembedded-layer"
+
+LAYERSERIES_COMPAT_filesystems-layer = "sumo"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch
new file mode 100644
index 0000000..6d60c9d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch
@@ -0,0 +1,42 @@
+From 7a524d49b3d4459280f18942df2980603400ec52 Mon Sep 17 00:00:00 2001
+From: Bian Naimeng <biannm@cn.fujitsu.com>
+Date: Fri, 19 Jun 2015 11:54:44 +0900
+Subject: [PATCH] Using PKG_CHECK_MODULES to found headers and libraries of
+ smbclient
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+---
+ configure.in    | 5 +++++
+ src/Makefile.am | 3 +++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 4c03409..8d22e71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -119,6 +119,11 @@ AC_CHECK_LIB(smbclient, smbc_setOptionUseCCache, [], [
+ LIBS="$LIBS $SMBCLIENT_LIBS"
+ CFLAGS="$CFLAGS $SMBCLIENT_CFLAGS"
+ 
++dnl *****************************************************************
++dnl *** Check libsmbclient by pkgconfig to get cflags and ldflags ***
++dnl *****************************************************************
++PKG_CHECK_MODULES(SMBCLIENT, smbclient)
++
+ dnl ******************
+ dnl *** Final step ***
+ dnl ******************
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ccaa8c3..6598317 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -17,3 +17,6 @@ smbnetfs_SOURCES = \
+ 	event.c			event.h			\
+ 	reconfigure.c		reconfigure.h		\
+ 	main.c
++
++smbnetfs_CFLAGS=${SMBCLIENT_CFLAGS}
++smbnetfs_LDFLAGS=${SMBCLIENT_LDFLAGS}
+-- 
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/configure.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/configure.patch
new file mode 100644
index 0000000..5527566
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/configure.patch
@@ -0,0 +1,11 @@
+Index: git/configure.in
+===================================================================
+--- git.orig/configure.ac	2014-06-18 16:06:16.040721349 +0000
++++ git/configure.ac	2014-07-18 07:49:17.085552256 +0000
+@@ -1,5 +1,5 @@
+ AC_INIT([SMBNetFS],[0.6.1])
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
+ AC_CONFIG_HEADERS([src/config.h])
+ AC_PROG_CC
+ 
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb
new file mode 100644
index 0000000..c72936c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb
@@ -0,0 +1,33 @@
+SUMMARY = "FUSE module for mounting an entire SMB/NMB network in a single directory"
+DESCRIPTION = "SMBNetFS is a Linux/FreeBSD filesystem that allow you to use \
+               samba/microsoft network in the same manner as the network \
+               neighborhood in Microsoft Windows. Please donate me to help \
+               in SMBNetFS development."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
+HOMEPAGE ="http://sourceforge.net/projects/smbnetfs"
+
+DEPENDS = "fuse samba"
+DEPENDS_append_libc-musl = " libexecinfo"
+
+# samba depends on libpam
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+inherit autotools gitpkgv pkgconfig
+
+PKGV = "${GITPKGVTAG}"
+
+SRCREV = "bc6b94b015fdaf7c4dab56ccb996eecea8bc4373"
+
+SRC_URI = "git://smbnetfs.git.sourceforge.net/gitroot/smbnetfs/smbnetfs;branch=master \
+           file://configure.patch \
+           file://Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libsecret] = "--with-libsecret=yes,--with-libsecret=no,libsecret"
+
+S = "${WORKDIR}/git"
+
+LDFLAGS_append_libc-musl = " -lexecinfo"
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Define-STRIP-weakly.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Define-STRIP-weakly.patch
index 9efea80..6732dc4 100644
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Define-STRIP-weakly.patch
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Define-STRIP-weakly.patch
@@ -1,4 +1,4 @@
-From bb8801fb21ac8d73e3b1a11a8555aaf822182a51 Mon Sep 17 00:00:00 2001
+From daf04dc9ca1f2e4c65ec338ab439e0a792e1a8ac Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 5 Sep 2017 10:36:52 -0700
 Subject: [PATCH] libau: Define STRIP weakly
@@ -6,10 +6,11 @@
 STRIP can be set on environment to use cross version of strip utility
 hardcoding to strip is not working in cross environment
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
 Upstream-Status: Submitted
 
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
  libau/Makefile | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
@@ -34,6 +35,3 @@
  #	readelf --syms --use-dynamic libau.so
  
  install_ulib: File = ${LibSo}.${LibSoMajor}.${LibSoMinor}
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch
index 5c35586..c832696 100644
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch
@@ -1,3 +1,6 @@
+From 13a60c631d7cf6c7e1926473d8069795c0def9b6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Thu, 19 Jun 2014 15:09:56 +0100
 Subject: [PATCH] aufs-util: add tool concept to Makefile for cross compiling
  purpose
 
@@ -7,23 +10,21 @@
 Upstream-Status: Pending
 
 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
 ---
- Makefile |    2 +-
+ Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 2f905ad..49c3cd5 100644
+index dbbe43d..aff969e 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -85,7 +85,7 @@ aufs.5: aufs.in.5 c2tmac
+@@ -152,7 +152,7 @@ aufs.5: aufs.in.5 c2tmac
  	chmod a-w $@
  
  c2sh c2tmac ver: CC = ${HOSTCC}
 -.INTERMEDIATE: c2sh c2tmac ver
 +tools: c2sh c2tmac ver
  
- Install = install -o root -g root -p
- install_sbin: File = auibusy auplink mount.aufs umount.aufs
--- 
-1.7.9.5
-
+ install_sbin: File = auibusy aumvdown auplink mount.aufs umount.aufs
+ ifeq (${Glibc},no)
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-don-t-strip-executables.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-don-t-strip-executables.patch
index fe2a6a5..b40822c 100644
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-don-t-strip-executables.patch
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/aufs-util/aufs-util/aufs-util-don-t-strip-executables.patch
@@ -1,4 +1,4 @@
-From 244863eca77fcaa1187884836c3e28d6b6d1504a Mon Sep 17 00:00:00 2001
+From 9d5e7eff4ae906f1ea6e6527080fded0b595fbd4 Mon Sep 17 00:00:00 2001
 From: Bruce Ashfield <bruce.ashfield@windriver.com>
 Date: Tue, 9 Apr 2013 18:50:34 -0700
 Subject: [PATCH] aufs-util: don't strip executables
@@ -14,16 +14,19 @@
 
 To prevent this, we remove -s from LDFLAGS.
 
+Upstream-Status: Inappropriate [oe specific]
+
 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
 ---
- Makefile |    2 +-
+ Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 2f905ad..e0c6dcd 100644
+index 54f8d97..dbbe43d 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -56,7 +56,7 @@ all: ver_test ${Man} ${Bin} ${Etc}
+@@ -118,7 +118,7 @@ clean:
  ver_test: ver
  	./ver
  
@@ -32,6 +35,3 @@
  ${Bin}: LDLIBS = -L. -lautil
  ${BinObj}: %.o: %.c ${LibUtilHdr} ${LibUtil}
  
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.7.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.7.bb
index 0ac991b..39f1189 100644
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.7.bb
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.7.bb
@@ -34,6 +34,8 @@
 
 do_configure () {
     export DEBUG="-DNDEBUG"
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
     oe_runconf
 }
 
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-build-Check-for-sync_file_range-libc-function.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-build-Check-for-sync_file_range-libc-function.patch
new file mode 100644
index 0000000..d8ff555
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-build-Check-for-sync_file_range-libc-function.patch
@@ -0,0 +1,82 @@
+From ae7172194d3fbb563ff8bbe7c02d34f1bd0e5ec9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 31 Jan 2018 21:28:53 -0800
+Subject: [PATCH] build: Check for sync_file_range libc function
+
+glibc 2.27 now has sync_file_range()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/builddefs.in | 1 +
+ io/Makefile          | 5 ++++-
+ io/io.h              | 2 +-
+ io/sync_file_range.c | 3 +++
+ 4 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/include/builddefs.in b/include/builddefs.in
+index 92d5076..504225a 100644
+--- a/include/builddefs.in
++++ b/include/builddefs.in
+@@ -105,6 +105,7 @@ HAVE_FIEMAP = @have_fiemap@
+ HAVE_PREADV = @have_preadv@
+ HAVE_PWRITEV2 = @have_pwritev2@
+ HAVE_COPY_FILE_RANGE = @have_copy_file_range@
++HAVE_NR_COPY_FILE_RANGE = @have_nr_copy_file_range@
+ HAVE_SYNC_FILE_RANGE = @have_sync_file_range@
+ HAVE_SYNCFS = @have_syncfs@
+ HAVE_READDIR = @have_readdir@
+diff --git a/io/Makefile b/io/Makefile
+index 6725936..1876e95 100644
+--- a/io/Makefile
++++ b/io/Makefile
+@@ -59,10 +59,13 @@ CFILES += inject.c resblks.c
+ LCFLAGS += -DHAVE_INJECT -DHAVE_RESBLKS
+ endif
+ 
+-ifeq ($(HAVE_COPY_FILE_RANGE),yes)
++ifeq ($(HAVE_NR_COPY_FILE_RANGE),yes)
+ CFILES += copy_file_range.c
++LCFLAGS += -DHAVE_NR_COPY_FILE_RANGE
++ifeq ($(HAVE_COPY_FILE_RANGE),yes)
+ LCFLAGS += -DHAVE_COPY_FILE_RANGE
+ endif
++endif
+ 
+ ifeq ($(HAVE_SYNC_FILE_RANGE),yes)
+ CFILES += sync_file_range.c
+diff --git a/io/io.h b/io/io.h
+index 3862985..79ddc7b 100644
+--- a/io/io.h
++++ b/io/io.h
+@@ -158,7 +158,7 @@ extern void		fiemap_init(void);
+ #define fiemap_init()	do { } while (0)
+ #endif
+ 
+-#ifdef HAVE_COPY_FILE_RANGE
++#if defined(HAVE_NR_COPY_FILE_RANGE) && !defined(HAVE_COPY_FILE_RANGE)
+ extern void		copy_range_init(void);
+ #else
+ #define copy_range_init()	do { } while (0)
+diff --git a/io/sync_file_range.c b/io/sync_file_range.c
+index 7e4f3e6..aafea01 100644
+--- a/io/sync_file_range.c
++++ b/io/sync_file_range.c
+@@ -16,6 +16,7 @@
+  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+  */
+ 
++#ifndef HAVE_COPY_FILE_RANGE
+ #include "command.h"
+ #include "input.h"
+ #include "init.h"
+@@ -104,3 +105,5 @@ sync_range_init(void)
+ 
+ 	add_command(&sync_range_cmd);
+ }
++
++#endif
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfs-remove-double-underscore-integer-types.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfs-remove-double-underscore-integer-types.patch
deleted file mode 100644
index a47c487..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfs-remove-double-underscore-integer-types.patch
+++ /dev/null
@@ -1,2082 +0,0 @@
-From 4a492e72515509ee702286a42afe7d8f89d37636 Mon Sep 17 00:00:00 2001
-From: "Darrick J. Wong" <darrick.wong@oracle.com>
-Date: Mon, 31 Jul 2017 15:08:10 -0500
-Subject: [PATCH] xfs: remove double-underscore integer types
-
-Source kernel commit: c8ce540db5f67d254aafb14b5d76422c62a906df
-
-This is a purely mechanical patch that removes the private
-__{u,}int{8,16,32,64}_t typedefs in favor of using the system
-{u,}int{8,16,32,64}_t typedefs.  This is the sed script used to perform
-the transformation and fix the resulting whitespace and indentation
-errors:
-
-s/typedef\t__uint8_t/typedef __uint8_t\t/g
-s/typedef\t__uint/typedef __uint/g
-s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g
-s/__uint8_t\t/__uint8_t\t\t/g
-s/__uint/uint/g
-s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g
-s/__int/int/g
-/^typedef.*int[0-9]*_t;$/d
-
-Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
----
- libxfs/libxfs_priv.h        |   1 +
- libxfs/xfs_alloc_btree.c    |  20 ++--
- libxfs/xfs_attr_remote.c    |   8 +-
- libxfs/xfs_attr_sf.h        |  10 +-
- libxfs/xfs_bit.h            |  24 ++---
- libxfs/xfs_bmap_btree.c     |   8 +-
- libxfs/xfs_btree.c          |  22 ++--
- libxfs/xfs_btree.h          |  18 ++--
- libxfs/xfs_cksum.h          |  16 +--
- libxfs/xfs_da_btree.c       |   2 +-
- libxfs/xfs_da_btree.h       |   8 +-
- libxfs/xfs_da_format.c      |  28 ++---
- libxfs/xfs_da_format.h      |  64 +++++------
- libxfs/xfs_dir2.h           |   8 +-
- libxfs/xfs_dir2_leaf.c      |  12 +--
- libxfs/xfs_dir2_priv.h      |   2 +-
- libxfs/xfs_dir2_sf.c        |   4 +-
- libxfs/xfs_format.h         | 112 +++++++++----------
- libxfs/xfs_fs.h             |  12 +--
- libxfs/xfs_ialloc.c         |   6 +-
- libxfs/xfs_ialloc_btree.c   |   4 +-
- libxfs/xfs_inode_buf.c      |   2 +-
- libxfs/xfs_inode_buf.h      |  28 ++---
- libxfs/xfs_log_format.h     | 256 ++++++++++++++++++++++----------------------
- libxfs/xfs_quota_defs.h     |   4 +-
- libxfs/xfs_refcount_btree.c |   8 +-
- libxfs/xfs_rmap.c           |   8 +-
- libxfs/xfs_rmap.h           |   8 +-
- libxfs/xfs_rmap_btree.c     |  30 +++---
- libxfs/xfs_rtbitmap.c       |   2 +-
- libxfs/xfs_sb.c             |   4 +-
- libxfs/xfs_types.h          |  46 ++++----
- 32 files changed, 393 insertions(+), 392 deletions(-)
-
-diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
-index 0b4c4890..b3cc7e53 100644
---- a/libxfs/libxfs_priv.h
-+++ b/libxfs/libxfs_priv.h
-@@ -504,5 +504,6 @@ bool xfs_log_check_lsn(struct xfs_mount *, xfs_lsn_t);
- #define XFS_STATS_INC_OFF(mp, off)
- #define XFS_STATS_ADD_OFF(mp, off, val)
- 
-+typedef unsigned char u8;
- 
- #endif	/* __LIBXFS_INTERNAL_XFS_H__ */
-diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c
-index e11d89a3..8e77e6e3 100644
---- a/libxfs/xfs_alloc_btree.c
-+++ b/libxfs/xfs_alloc_btree.c
-@@ -251,7 +251,7 @@ xfs_allocbt_init_ptr_from_cur(
- 	ptr->s = agf->agf_roots[cur->bc_btnum];
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_bnobt_key_diff(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*key)
-@@ -259,42 +259,42 @@ xfs_bnobt_key_diff(
- 	xfs_alloc_rec_incore_t	*rec = &cur->bc_rec.a;
- 	xfs_alloc_key_t		*kp = &key->alloc;
- 
--	return (__int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
-+	return (int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_cntbt_key_diff(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*key)
- {
- 	xfs_alloc_rec_incore_t	*rec = &cur->bc_rec.a;
- 	xfs_alloc_key_t		*kp = &key->alloc;
--	__int64_t		diff;
-+	int64_t			diff;
- 
--	diff = (__int64_t)be32_to_cpu(kp->ar_blockcount) - rec->ar_blockcount;
-+	diff = (int64_t)be32_to_cpu(kp->ar_blockcount) - rec->ar_blockcount;
- 	if (diff)
- 		return diff;
- 
--	return (__int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
-+	return (int64_t)be32_to_cpu(kp->ar_startblock) - rec->ar_startblock;
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_bnobt_diff_two_keys(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*k1,
- 	union xfs_btree_key	*k2)
- {
--	return (__int64_t)be32_to_cpu(k1->alloc.ar_startblock) -
-+	return (int64_t)be32_to_cpu(k1->alloc.ar_startblock) -
- 			  be32_to_cpu(k2->alloc.ar_startblock);
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_cntbt_diff_two_keys(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*k1,
- 	union xfs_btree_key	*k2)
- {
--	__int64_t		diff;
-+	int64_t			diff;
- 
- 	diff =  be32_to_cpu(k1->alloc.ar_blockcount) -
- 		be32_to_cpu(k2->alloc.ar_blockcount);
-diff --git a/libxfs/xfs_attr_remote.c b/libxfs/xfs_attr_remote.c
-index abe17052..1f25e363 100644
---- a/libxfs/xfs_attr_remote.c
-+++ b/libxfs/xfs_attr_remote.c
-@@ -248,7 +248,7 @@ xfs_attr_rmtval_copyout(
- 	xfs_ino_t	ino,
- 	int		*offset,
- 	int		*valuelen,
--	__uint8_t	**dst)
-+	uint8_t		**dst)
- {
- 	char		*src = bp->b_addr;
- 	xfs_daddr_t	bno = bp->b_bn;
-@@ -296,7 +296,7 @@ xfs_attr_rmtval_copyin(
- 	xfs_ino_t	ino,
- 	int		*offset,
- 	int		*valuelen,
--	__uint8_t	**src)
-+	uint8_t		**src)
- {
- 	char		*dst = bp->b_addr;
- 	xfs_daddr_t	bno = bp->b_bn;
-@@ -350,7 +350,7 @@ xfs_attr_rmtval_get(
- 	struct xfs_mount	*mp = args->dp->i_mount;
- 	struct xfs_buf		*bp;
- 	xfs_dablk_t		lblkno = args->rmtblkno;
--	__uint8_t		*dst = args->value;
-+	uint8_t			*dst = args->value;
- 	int			valuelen;
- 	int			nmap;
- 	int			error;
-@@ -416,7 +416,7 @@ xfs_attr_rmtval_set(
- 	struct xfs_bmbt_irec	map;
- 	xfs_dablk_t		lblkno;
- 	xfs_fileoff_t		lfileoff = 0;
--	__uint8_t		*src = args->value;
-+	uint8_t			*src = args->value;
- 	int			blkcnt;
- 	int			valuelen;
- 	int			nmap;
-diff --git a/libxfs/xfs_attr_sf.h b/libxfs/xfs_attr_sf.h
-index 90928bbe..afd684ae 100644
---- a/libxfs/xfs_attr_sf.h
-+++ b/libxfs/xfs_attr_sf.h
-@@ -31,10 +31,10 @@ typedef struct xfs_attr_sf_entry xfs_attr_sf_entry_t;
-  * We generate this then sort it, attr_list() must return things in hash-order.
-  */
- typedef struct xfs_attr_sf_sort {
--	__uint8_t	entno;		/* entry number in original list */
--	__uint8_t	namelen;	/* length of name value (no null) */
--	__uint8_t	valuelen;	/* length of value */
--	__uint8_t	flags;		/* flags bits (see xfs_attr_leaf.h) */
-+	uint8_t		entno;		/* entry number in original list */
-+	uint8_t		namelen;	/* length of name value (no null) */
-+	uint8_t		valuelen;	/* length of value */
-+	uint8_t		flags;		/* flags bits (see xfs_attr_leaf.h) */
- 	xfs_dahash_t	hash;		/* this entry's hash value */
- 	unsigned char	*name;		/* name value, pointer into buffer */
- } xfs_attr_sf_sort_t;
-@@ -42,7 +42,7 @@ typedef struct xfs_attr_sf_sort {
- #define XFS_ATTR_SF_ENTSIZE_BYNAME(nlen,vlen)	/* space name/value uses */ \
- 	(((int)sizeof(xfs_attr_sf_entry_t)-1 + (nlen)+(vlen)))
- #define XFS_ATTR_SF_ENTSIZE_MAX			/* max space for name&value */ \
--	((1 << (NBBY*(int)sizeof(__uint8_t))) - 1)
-+	((1 << (NBBY*(int)sizeof(uint8_t))) - 1)
- #define XFS_ATTR_SF_ENTSIZE(sfep)		/* space an entry uses */ \
- 	((int)sizeof(xfs_attr_sf_entry_t)-1 + (sfep)->namelen+(sfep)->valuelen)
- #define XFS_ATTR_SF_NEXTENTRY(sfep)		/* next entry in struct */ \
-diff --git a/libxfs/xfs_bit.h b/libxfs/xfs_bit.h
-index e1649c0d..61c6b202 100644
---- a/libxfs/xfs_bit.h
-+++ b/libxfs/xfs_bit.h
-@@ -25,47 +25,47 @@
- /*
-  * masks with n high/low bits set, 64-bit values
-  */
--static inline __uint64_t xfs_mask64hi(int n)
-+static inline uint64_t xfs_mask64hi(int n)
- {
--	return (__uint64_t)-1 << (64 - (n));
-+	return (uint64_t)-1 << (64 - (n));
- }
--static inline __uint32_t xfs_mask32lo(int n)
-+static inline uint32_t xfs_mask32lo(int n)
- {
--	return ((__uint32_t)1 << (n)) - 1;
-+	return ((uint32_t)1 << (n)) - 1;
- }
--static inline __uint64_t xfs_mask64lo(int n)
-+static inline uint64_t xfs_mask64lo(int n)
- {
--	return ((__uint64_t)1 << (n)) - 1;
-+	return ((uint64_t)1 << (n)) - 1;
- }
- 
- /* Get high bit set out of 32-bit argument, -1 if none set */
--static inline int xfs_highbit32(__uint32_t v)
-+static inline int xfs_highbit32(uint32_t v)
- {
- 	return fls(v) - 1;
- }
- 
- /* Get high bit set out of 64-bit argument, -1 if none set */
--static inline int xfs_highbit64(__uint64_t v)
-+static inline int xfs_highbit64(uint64_t v)
- {
- 	return fls64(v) - 1;
- }
- 
- /* Get low bit set out of 32-bit argument, -1 if none set */
--static inline int xfs_lowbit32(__uint32_t v)
-+static inline int xfs_lowbit32(uint32_t v)
- {
- 	return ffs(v) - 1;
- }
- 
- /* Get low bit set out of 64-bit argument, -1 if none set */
--static inline int xfs_lowbit64(__uint64_t v)
-+static inline int xfs_lowbit64(uint64_t v)
- {
--	__uint32_t	w = (__uint32_t)v;
-+	uint32_t	w = (uint32_t)v;
- 	int		n = 0;
- 
- 	if (w) {	/* lower bits */
- 		n = ffs(w);
- 	} else {	/* upper bits */
--		w = (__uint32_t)(v >> 32);
-+		w = (uint32_t)(v >> 32);
- 		if (w) {
- 			n = ffs(w);
- 			if (n)
-diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c
-index c48cbec1..9ee40d8b 100644
---- a/libxfs/xfs_bmap_btree.c
-+++ b/libxfs/xfs_bmap_btree.c
-@@ -91,8 +91,8 @@ xfs_bmdr_to_bmbt(
-  */
- STATIC void
- __xfs_bmbt_get_all(
--		__uint64_t l0,
--		__uint64_t l1,
-+		uint64_t l0,
-+		uint64_t l1,
- 		xfs_bmbt_irec_t *s)
- {
- 	int	ext_flag;
-@@ -585,12 +585,12 @@ xfs_bmbt_init_ptr_from_cur(
- 	ptr->l = 0;
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_bmbt_key_diff(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*key)
- {
--	return (__int64_t)be64_to_cpu(key->bmbt.br_startoff) -
-+	return (int64_t)be64_to_cpu(key->bmbt.br_startoff) -
- 				      cur->bc_rec.b.br_startoff;
- }
- 
-diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c
-index 3d293520..56b50a5b 100644
---- a/libxfs/xfs_btree.c
-+++ b/libxfs/xfs_btree.c
-@@ -39,7 +39,7 @@ kmem_zone_t	*xfs_btree_cur_zone;
- /*
-  * Btree magic numbers.
-  */
--static const __uint32_t xfs_magics[2][XFS_BTNUM_MAX] = {
-+static const uint32_t xfs_magics[2][XFS_BTNUM_MAX] = {
- 	{ XFS_ABTB_MAGIC, XFS_ABTC_MAGIC, 0, XFS_BMAP_MAGIC, XFS_IBT_MAGIC,
- 	  XFS_FIBT_MAGIC, 0 },
- 	{ XFS_ABTB_CRC_MAGIC, XFS_ABTC_CRC_MAGIC, XFS_RMAP_CRC_MAGIC,
-@@ -47,12 +47,12 @@ static const __uint32_t xfs_magics[2][XFS_BTNUM_MAX] = {
- 	  XFS_REFC_CRC_MAGIC }
- };
- 
--__uint32_t
-+uint32_t
- xfs_btree_magic(
- 	int			crc,
- 	xfs_btnum_t		btnum)
- {
--	__uint32_t		magic = xfs_magics[crc][btnum];
-+	uint32_t		magic = xfs_magics[crc][btnum];
- 
- 	/* Ensure we asked for crc for crc-only magics. */
- 	ASSERT(magic != 0);
-@@ -774,14 +774,14 @@ xfs_btree_lastrec(
-  */
- void
- xfs_btree_offsets(
--	__int64_t	fields,		/* bitmask of fields */
-+	int64_t		fields,		/* bitmask of fields */
- 	const short	*offsets,	/* table of field offsets */
- 	int		nbits,		/* number of bits to inspect */
- 	int		*first,		/* output: first byte offset */
- 	int		*last)		/* output: last byte offset */
- {
- 	int		i;		/* current bit number */
--	__int64_t	imask;		/* mask for current bit number */
-+	int64_t		imask;		/* mask for current bit number */
- 
- 	ASSERT(fields != 0);
- 	/*
-@@ -1842,7 +1842,7 @@ xfs_btree_lookup(
- 	int			*stat)	/* success/failure */
- {
- 	struct xfs_btree_block	*block;	/* current btree block */
--	__int64_t		diff;	/* difference for the current key */
-+	int64_t			diff;	/* difference for the current key */
- 	int			error;	/* error return value */
- 	int			keyno;	/* current key number */
- 	int			level;	/* level in the btree */
-@@ -4435,7 +4435,7 @@ xfs_btree_visit_blocks(
-  * recovery completion writes the changes to disk.
-  */
- struct xfs_btree_block_change_owner_info {
--	__uint64_t		new_owner;
-+	uint64_t		new_owner;
- 	struct list_head	*buffer_list;
- };
- 
-@@ -4481,7 +4481,7 @@ xfs_btree_block_change_owner(
- int
- xfs_btree_change_owner(
- 	struct xfs_btree_cur	*cur,
--	__uint64_t		new_owner,
-+	uint64_t		new_owner,
- 	struct list_head	*buffer_list)
- {
- 	struct xfs_btree_block_change_owner_info	bbcoi;
-@@ -4585,7 +4585,7 @@ xfs_btree_simple_query_range(
- {
- 	union xfs_btree_rec		*recp;
- 	union xfs_btree_key		rec_key;
--	__int64_t			diff;
-+	int64_t				diff;
- 	int				stat;
- 	bool				firstrec = true;
- 	int				error;
-@@ -4682,8 +4682,8 @@ xfs_btree_overlapped_query_range(
- 	union xfs_btree_key		*hkp;
- 	union xfs_btree_rec		*recp;
- 	struct xfs_btree_block		*block;
--	__int64_t			ldiff;
--	__int64_t			hdiff;
-+	int64_t				ldiff;
-+	int64_t				hdiff;
- 	int				level;
- 	struct xfs_buf			*bp;
- 	int				i;
-diff --git a/libxfs/xfs_btree.h b/libxfs/xfs_btree.h
-index 05cf35b5..3c1fed23 100644
---- a/libxfs/xfs_btree.h
-+++ b/libxfs/xfs_btree.h
-@@ -76,7 +76,7 @@ union xfs_btree_rec {
- #define	XFS_BTNUM_RMAP	((xfs_btnum_t)XFS_BTNUM_RMAPi)
- #define	XFS_BTNUM_REFC	((xfs_btnum_t)XFS_BTNUM_REFCi)
- 
--__uint32_t xfs_btree_magic(int crc, xfs_btnum_t btnum);
-+uint32_t xfs_btree_magic(int crc, xfs_btnum_t btnum);
- 
- /*
-  * For logging record fields.
-@@ -150,14 +150,14 @@ struct xfs_btree_ops {
- 					  union xfs_btree_rec *rec);
- 
- 	/* difference between key value and cursor value */
--	__int64_t (*key_diff)(struct xfs_btree_cur *cur,
-+	int64_t (*key_diff)(struct xfs_btree_cur *cur,
- 			      union xfs_btree_key *key);
- 
- 	/*
- 	 * Difference between key2 and key1 -- positive if key1 > key2,
- 	 * negative if key1 < key2, and zero if equal.
- 	 */
--	__int64_t (*diff_two_keys)(struct xfs_btree_cur *cur,
-+	int64_t (*diff_two_keys)(struct xfs_btree_cur *cur,
- 				   union xfs_btree_key *key1,
- 				   union xfs_btree_key *key2);
- 
-@@ -213,11 +213,11 @@ typedef struct xfs_btree_cur
- 	union xfs_btree_irec	bc_rec;	/* current insert/search record value */
- 	struct xfs_buf	*bc_bufs[XFS_BTREE_MAXLEVELS];	/* buf ptr per level */
- 	int		bc_ptrs[XFS_BTREE_MAXLEVELS];	/* key/record # */
--	__uint8_t	bc_ra[XFS_BTREE_MAXLEVELS];	/* readahead bits */
-+	uint8_t		bc_ra[XFS_BTREE_MAXLEVELS];	/* readahead bits */
- #define	XFS_BTCUR_LEFTRA	1	/* left sibling has been read-ahead */
- #define	XFS_BTCUR_RIGHTRA	2	/* right sibling has been read-ahead */
--	__uint8_t	bc_nlevels;	/* number of levels in the tree */
--	__uint8_t	bc_blocklog;	/* log2(blocksize) of btree blocks */
-+	uint8_t		bc_nlevels;	/* number of levels in the tree */
-+	uint8_t		bc_blocklog;	/* log2(blocksize) of btree blocks */
- 	xfs_btnum_t	bc_btnum;	/* identifies which btree type */
- 	int		bc_statoff;	/* offset of btre stats array */
- 	union {
-@@ -330,7 +330,7 @@ xfs_btree_islastblock(
-  */
- void
- xfs_btree_offsets(
--	__int64_t		fields,	/* bitmask of fields */
-+	int64_t			fields,	/* bitmask of fields */
- 	const short		*offsets,/* table of field offsets */
- 	int			nbits,	/* number of bits to inspect */
- 	int			*first,	/* output: first byte offset */
-@@ -408,7 +408,7 @@ int xfs_btree_new_iroot(struct xfs_btree_cur *, int *, int *);
- int xfs_btree_insert(struct xfs_btree_cur *, int *);
- int xfs_btree_delete(struct xfs_btree_cur *, int *);
- int xfs_btree_get_rec(struct xfs_btree_cur *, union xfs_btree_rec **, int *);
--int xfs_btree_change_owner(struct xfs_btree_cur *cur, __uint64_t new_owner,
-+int xfs_btree_change_owner(struct xfs_btree_cur *cur, uint64_t new_owner,
- 			   struct list_head *buffer_list);
- 
- /*
-@@ -434,7 +434,7 @@ static inline int xfs_btree_get_numrecs(struct xfs_btree_block *block)
- }
- 
- static inline void xfs_btree_set_numrecs(struct xfs_btree_block *block,
--		__uint16_t numrecs)
-+		uint16_t numrecs)
- {
- 	block->bb_numrecs = cpu_to_be16(numrecs);
- }
-diff --git a/libxfs/xfs_cksum.h b/libxfs/xfs_cksum.h
-index a416c7cb..8211f48b 100644
---- a/libxfs/xfs_cksum.h
-+++ b/libxfs/xfs_cksum.h
-@@ -1,7 +1,7 @@
- #ifndef _XFS_CKSUM_H
- #define _XFS_CKSUM_H 1
- 
--#define XFS_CRC_SEED	(~(__uint32_t)0)
-+#define XFS_CRC_SEED	(~(uint32_t)0)
- 
- /*
-  * Calculate the intermediate checksum for a buffer that has the CRC field
-@@ -9,11 +9,11 @@
-  * cksum_offset parameter. We do not modify the buffer during verification,
-  * hence we have to split the CRC calculation across the cksum_offset.
-  */
--static inline __uint32_t
-+static inline uint32_t
- xfs_start_cksum_safe(char *buffer, size_t length, unsigned long cksum_offset)
- {
--	__uint32_t zero = 0;
--	__uint32_t crc;
-+	uint32_t zero = 0;
-+	uint32_t crc;
- 
- 	/* Calculate CRC up to the checksum. */
- 	crc = crc32c(XFS_CRC_SEED, buffer, cksum_offset);
-@@ -30,7 +30,7 @@ xfs_start_cksum_safe(char *buffer, size_t length, unsigned long cksum_offset)
-  * Fast CRC method where the buffer is modified. Callers must have exclusive
-  * access to the buffer while the calculation takes place.
-  */
--static inline __uint32_t
-+static inline uint32_t
- xfs_start_cksum_update(char *buffer, size_t length, unsigned long cksum_offset)
- {
- 	/* zero the CRC field */
-@@ -48,7 +48,7 @@ xfs_start_cksum_update(char *buffer, size_t length, unsigned long cksum_offset)
-  * so that it is consistent on disk.
-  */
- static inline __le32
--xfs_end_cksum(__uint32_t crc)
-+xfs_end_cksum(uint32_t crc)
- {
- 	return ~cpu_to_le32(crc);
- }
-@@ -62,7 +62,7 @@ xfs_end_cksum(__uint32_t crc)
- static inline void
- xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset)
- {
--	__uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset);
-+	uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset);
- 
- 	*(__le32 *)(buffer + cksum_offset) = xfs_end_cksum(crc);
- }
-@@ -73,7 +73,7 @@ xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset)
- static inline int
- xfs_verify_cksum(char *buffer, size_t length, unsigned long cksum_offset)
- {
--	__uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset);
-+	uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset);
- 
- 	return *(__le32 *)(buffer + cksum_offset) == xfs_end_cksum(crc);
- }
-diff --git a/libxfs/xfs_da_btree.c b/libxfs/xfs_da_btree.c
-index bc12f58f..08447be8 100644
---- a/libxfs/xfs_da_btree.c
-+++ b/libxfs/xfs_da_btree.c
-@@ -1947,7 +1947,7 @@ xfs_da3_path_shift(
-  * This is implemented with some source-level loop unrolling.
-  */
- xfs_dahash_t
--xfs_da_hashname(const __uint8_t *name, int namelen)
-+xfs_da_hashname(const uint8_t *name, int namelen)
- {
- 	xfs_dahash_t hash;
- 
-diff --git a/libxfs/xfs_da_btree.h b/libxfs/xfs_da_btree.h
-index 4e29cb6a..ae6de174 100644
---- a/libxfs/xfs_da_btree.h
-+++ b/libxfs/xfs_da_btree.h
-@@ -60,10 +60,10 @@ enum xfs_dacmp {
-  */
- typedef struct xfs_da_args {
- 	struct xfs_da_geometry *geo;	/* da block geometry */
--	const __uint8_t	*name;		/* string (maybe not NULL terminated) */
-+	const uint8_t		*name;		/* string (maybe not NULL terminated) */
- 	int		namelen;	/* length of string (maybe no NULL) */
--	__uint8_t	filetype;	/* filetype of inode for directories */
--	__uint8_t	*value;		/* set of bytes (maybe contain NULLs) */
-+	uint8_t		filetype;	/* filetype of inode for directories */
-+	uint8_t		*value;		/* set of bytes (maybe contain NULLs) */
- 	int		valuelen;	/* length of value */
- 	int		flags;		/* argument flags (eg: ATTR_NOCREATE) */
- 	xfs_dahash_t	hashval;	/* hash value of name */
-@@ -207,7 +207,7 @@ int	xfs_da_reada_buf(struct xfs_inode *dp, xfs_dablk_t bno,
- int	xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno,
- 					  struct xfs_buf *dead_buf);
- 
--uint xfs_da_hashname(const __uint8_t *name_string, int name_length);
-+uint xfs_da_hashname(const uint8_t *name_string, int name_length);
- enum xfs_dacmp xfs_da_compname(struct xfs_da_args *args,
- 				const unsigned char *name, int len);
- 
-diff --git a/libxfs/xfs_da_format.c b/libxfs/xfs_da_format.c
-index 2b732b3c..f30004f6 100644
---- a/libxfs/xfs_da_format.c
-+++ b/libxfs/xfs_da_format.c
-@@ -49,7 +49,7 @@ xfs_dir3_sf_entsize(
- 	struct xfs_dir2_sf_hdr	*hdr,
- 	int			len)
- {
--	return xfs_dir2_sf_entsize(hdr, len) + sizeof(__uint8_t);
-+	return xfs_dir2_sf_entsize(hdr, len) + sizeof(uint8_t);
- }
- 
- static struct xfs_dir2_sf_entry *
-@@ -77,7 +77,7 @@ xfs_dir3_sf_nextentry(
-  * not necessary. For non-filetype enable directories, the type is always
-  * unknown and we never store the value.
-  */
--static __uint8_t
-+static uint8_t
- xfs_dir2_sfe_get_ftype(
- 	struct xfs_dir2_sf_entry *sfep)
- {
-@@ -87,16 +87,16 @@ xfs_dir2_sfe_get_ftype(
- static void
- xfs_dir2_sfe_put_ftype(
- 	struct xfs_dir2_sf_entry *sfep,
--	__uint8_t		ftype)
-+	uint8_t			ftype)
- {
- 	ASSERT(ftype < XFS_DIR3_FT_MAX);
- }
- 
--static __uint8_t
-+static uint8_t
- xfs_dir3_sfe_get_ftype(
- 	struct xfs_dir2_sf_entry *sfep)
- {
--	__uint8_t	ftype;
-+	uint8_t		ftype;
- 
- 	ftype = sfep->name[sfep->namelen];
- 	if (ftype >= XFS_DIR3_FT_MAX)
-@@ -107,7 +107,7 @@ xfs_dir3_sfe_get_ftype(
- static void
- xfs_dir3_sfe_put_ftype(
- 	struct xfs_dir2_sf_entry *sfep,
--	__uint8_t		ftype)
-+	uint8_t			ftype)
- {
- 	ASSERT(ftype < XFS_DIR3_FT_MAX);
- 
-@@ -124,7 +124,7 @@ xfs_dir3_sfe_put_ftype(
- static xfs_ino_t
- xfs_dir2_sf_get_ino(
- 	struct xfs_dir2_sf_hdr	*hdr,
--	__uint8_t		*from)
-+	uint8_t			*from)
- {
- 	if (hdr->i8count)
- 		return get_unaligned_be64(from) & 0x00ffffffffffffffULL;
-@@ -135,7 +135,7 @@ xfs_dir2_sf_get_ino(
- static void
- xfs_dir2_sf_put_ino(
- 	struct xfs_dir2_sf_hdr	*hdr,
--	__uint8_t		*to,
-+	uint8_t			*to,
- 	xfs_ino_t		ino)
- {
- 	ASSERT((ino & 0xff00000000000000ULL) == 0);
-@@ -225,7 +225,7 @@ xfs_dir3_sfe_put_ino(
- 
- #define XFS_DIR3_DATA_ENTSIZE(n)					\
- 	round_up((offsetof(struct xfs_dir2_data_entry, name[0]) + (n) +	\
--		 sizeof(xfs_dir2_data_off_t) + sizeof(__uint8_t)),	\
-+		 sizeof(xfs_dir2_data_off_t) + sizeof(uint8_t)),	\
- 		XFS_DIR2_DATA_ALIGN)
- 
- static int
-@@ -242,7 +242,7 @@ xfs_dir3_data_entsize(
- 	return XFS_DIR3_DATA_ENTSIZE(n);
- }
- 
--static __uint8_t
-+static uint8_t
- xfs_dir2_data_get_ftype(
- 	struct xfs_dir2_data_entry *dep)
- {
-@@ -252,16 +252,16 @@ xfs_dir2_data_get_ftype(
- static void
- xfs_dir2_data_put_ftype(
- 	struct xfs_dir2_data_entry *dep,
--	__uint8_t		ftype)
-+	uint8_t			ftype)
- {
- 	ASSERT(ftype < XFS_DIR3_FT_MAX);
- }
- 
--static __uint8_t
-+static uint8_t
- xfs_dir3_data_get_ftype(
- 	struct xfs_dir2_data_entry *dep)
- {
--	__uint8_t	ftype = dep->name[dep->namelen];
-+	uint8_t		ftype = dep->name[dep->namelen];
- 
- 	if (ftype >= XFS_DIR3_FT_MAX)
- 		return XFS_DIR3_FT_UNKNOWN;
-@@ -271,7 +271,7 @@ xfs_dir3_data_get_ftype(
- static void
- xfs_dir3_data_put_ftype(
- 	struct xfs_dir2_data_entry *dep,
--	__uint8_t		type)
-+	uint8_t			type)
- {
- 	ASSERT(type < XFS_DIR3_FT_MAX);
- 	ASSERT(dep->namelen != 0);
-diff --git a/libxfs/xfs_da_format.h b/libxfs/xfs_da_format.h
-index 9a492a9e..3771edcb 100644
---- a/libxfs/xfs_da_format.h
-+++ b/libxfs/xfs_da_format.h
-@@ -111,11 +111,11 @@ struct xfs_da3_intnode {
-  * appropriate.
-  */
- struct xfs_da3_icnode_hdr {
--	__uint32_t	forw;
--	__uint32_t	back;
--	__uint16_t	magic;
--	__uint16_t	count;
--	__uint16_t	level;
-+	uint32_t	forw;
-+	uint32_t	back;
-+	uint16_t	magic;
-+	uint16_t	count;
-+	uint16_t	level;
- };
- 
- /*
-@@ -187,14 +187,14 @@ struct xfs_da3_icnode_hdr {
- /*
-  * Byte offset in data block and shortform entry.
-  */
--typedef	__uint16_t	xfs_dir2_data_off_t;
-+typedef uint16_t	xfs_dir2_data_off_t;
- #define	NULLDATAOFF	0xffffU
- typedef uint		xfs_dir2_data_aoff_t;	/* argument form */
- 
- /*
-  * Offset in data space of a data entry.
-  */
--typedef	__uint32_t	xfs_dir2_dataptr_t;
-+typedef uint32_t	xfs_dir2_dataptr_t;
- #define	XFS_DIR2_MAX_DATAPTR	((xfs_dir2_dataptr_t)0xffffffff)
- #define	XFS_DIR2_NULL_DATAPTR	((xfs_dir2_dataptr_t)0)
- 
-@@ -206,7 +206,7 @@ typedef	xfs_off_t	xfs_dir2_off_t;
- /*
-  * Directory block number (logical dirblk in file)
-  */
--typedef	__uint32_t	xfs_dir2_db_t;
-+typedef uint32_t	xfs_dir2_db_t;
- 
- #define XFS_INO32_SIZE	4
- #define XFS_INO64_SIZE	8
-@@ -226,9 +226,9 @@ typedef	__uint32_t	xfs_dir2_db_t;
-  * over them.
-  */
- typedef struct xfs_dir2_sf_hdr {
--	__uint8_t		count;		/* count of entries */
--	__uint8_t		i8count;	/* count of 8-byte inode #s */
--	__uint8_t		parent[8];	/* parent dir inode number */
-+	uint8_t			count;		/* count of entries */
-+	uint8_t			i8count;	/* count of 8-byte inode #s */
-+	uint8_t			parent[8];	/* parent dir inode number */
- } __packed xfs_dir2_sf_hdr_t;
- 
- typedef struct xfs_dir2_sf_entry {
-@@ -447,11 +447,11 @@ struct xfs_dir3_leaf_hdr {
- };
- 
- struct xfs_dir3_icleaf_hdr {
--	__uint32_t		forw;
--	__uint32_t		back;
--	__uint16_t		magic;
--	__uint16_t		count;
--	__uint16_t		stale;
-+	uint32_t		forw;
-+	uint32_t		back;
-+	uint16_t		magic;
-+	uint16_t		count;
-+	uint16_t		stale;
- };
- 
- /*
-@@ -538,10 +538,10 @@ struct xfs_dir3_free {
-  * xfs_dir3_free_hdr_from_disk/xfs_dir3_free_hdr_to_disk.
-  */
- struct xfs_dir3_icfree_hdr {
--	__uint32_t	magic;
--	__uint32_t	firstdb;
--	__uint32_t	nvalid;
--	__uint32_t	nused;
-+	uint32_t	magic;
-+	uint32_t	firstdb;
-+	uint32_t	nvalid;
-+	uint32_t	nused;
- 
- };
- 
-@@ -632,10 +632,10 @@ typedef struct xfs_attr_shortform {
- 		__u8	padding;
- 	} hdr;
- 	struct xfs_attr_sf_entry {
--		__uint8_t namelen;	/* actual length of name (no NULL) */
--		__uint8_t valuelen;	/* actual length of value (no NULL) */
--		__uint8_t flags;	/* flags bits (see xfs_attr_leaf.h) */
--		__uint8_t nameval[1];	/* name & value bytes concatenated */
-+		uint8_t namelen;	/* actual length of name (no NULL) */
-+		uint8_t valuelen;	/* actual length of value (no NULL) */
-+		uint8_t flags;	/* flags bits (see xfs_attr_leaf.h) */
-+		uint8_t nameval[1];	/* name & value bytes concatenated */
- 	} list[1];			/* variable sized array */
- } xfs_attr_shortform_t;
- 
-@@ -725,22 +725,22 @@ struct xfs_attr3_leafblock {
-  * incore, neutral version of the attribute leaf header
-  */
- struct xfs_attr3_icleaf_hdr {
--	__uint32_t	forw;
--	__uint32_t	back;
--	__uint16_t	magic;
--	__uint16_t	count;
--	__uint16_t	usedbytes;
-+	uint32_t	forw;
-+	uint32_t	back;
-+	uint16_t	magic;
-+	uint16_t	count;
-+	uint16_t	usedbytes;
- 	/*
- 	 * firstused is 32-bit here instead of 16-bit like the on-disk variant
- 	 * to support maximum fsb size of 64k without overflow issues throughout
- 	 * the attr code. Instead, the overflow condition is handled on
- 	 * conversion to/from disk.
- 	 */
--	__uint32_t	firstused;
-+	uint32_t	firstused;
- 	__u8		holes;
- 	struct {
--		__uint16_t	base;
--		__uint16_t	size;
-+		uint16_t	base;
-+		uint16_t	size;
- 	} freemap[XFS_ATTR_LEAF_MAPSIZE];
- };
- 
-diff --git a/libxfs/xfs_dir2.h b/libxfs/xfs_dir2.h
-index d6e6d9d1..21c8f8bf 100644
---- a/libxfs/xfs_dir2.h
-+++ b/libxfs/xfs_dir2.h
-@@ -47,9 +47,9 @@ struct xfs_dir_ops {
- 	struct xfs_dir2_sf_entry *
- 		(*sf_nextentry)(struct xfs_dir2_sf_hdr *hdr,
- 				struct xfs_dir2_sf_entry *sfep);
--	__uint8_t (*sf_get_ftype)(struct xfs_dir2_sf_entry *sfep);
-+	uint8_t (*sf_get_ftype)(struct xfs_dir2_sf_entry *sfep);
- 	void	(*sf_put_ftype)(struct xfs_dir2_sf_entry *sfep,
--				__uint8_t ftype);
-+				uint8_t ftype);
- 	xfs_ino_t (*sf_get_ino)(struct xfs_dir2_sf_hdr *hdr,
- 				struct xfs_dir2_sf_entry *sfep);
- 	void	(*sf_put_ino)(struct xfs_dir2_sf_hdr *hdr,
-@@ -60,9 +60,9 @@ struct xfs_dir_ops {
- 				     xfs_ino_t ino);
- 
- 	int	(*data_entsize)(int len);
--	__uint8_t (*data_get_ftype)(struct xfs_dir2_data_entry *dep);
-+	uint8_t (*data_get_ftype)(struct xfs_dir2_data_entry *dep);
- 	void	(*data_put_ftype)(struct xfs_dir2_data_entry *dep,
--				__uint8_t ftype);
-+				uint8_t ftype);
- 	__be16 * (*data_entry_tag_p)(struct xfs_dir2_data_entry *dep);
- 	struct xfs_dir2_data_free *
- 		(*data_bestfree_p)(struct xfs_dir2_data_hdr *hdr);
-diff --git a/libxfs/xfs_dir2_leaf.c b/libxfs/xfs_dir2_leaf.c
-index f80d91fc..40a35b84 100644
---- a/libxfs/xfs_dir2_leaf.c
-+++ b/libxfs/xfs_dir2_leaf.c
-@@ -142,7 +142,7 @@ xfs_dir3_leaf_check_int(
- static bool
- xfs_dir3_leaf_verify(
- 	struct xfs_buf		*bp,
--	__uint16_t		magic)
-+	uint16_t		magic)
- {
- 	struct xfs_mount	*mp = bp->b_target->bt_mount;
- 	struct xfs_dir2_leaf	*leaf = bp->b_addr;
-@@ -151,7 +151,7 @@ xfs_dir3_leaf_verify(
- 
- 	if (xfs_sb_version_hascrc(&mp->m_sb)) {
- 		struct xfs_dir3_leaf_hdr *leaf3 = bp->b_addr;
--		__uint16_t		magic3;
-+		uint16_t		magic3;
- 
- 		magic3 = (magic == XFS_DIR2_LEAF1_MAGIC) ? XFS_DIR3_LEAF1_MAGIC
- 							 : XFS_DIR3_LEAFN_MAGIC;
-@@ -175,7 +175,7 @@ xfs_dir3_leaf_verify(
- static void
- __read_verify(
- 	struct xfs_buf  *bp,
--	__uint16_t	magic)
-+	uint16_t	magic)
- {
- 	struct xfs_mount	*mp = bp->b_target->bt_mount;
- 
-@@ -192,7 +192,7 @@ __read_verify(
- static void
- __write_verify(
- 	struct xfs_buf  *bp,
--	__uint16_t	magic)
-+	uint16_t	magic)
- {
- 	struct xfs_mount	*mp = bp->b_target->bt_mount;
- 	struct xfs_buf_log_item	*bip = bp->b_fspriv;
-@@ -296,7 +296,7 @@ xfs_dir3_leaf_init(
- 	struct xfs_trans	*tp,
- 	struct xfs_buf		*bp,
- 	xfs_ino_t		owner,
--	__uint16_t		type)
-+	uint16_t		type)
- {
- 	struct xfs_dir2_leaf	*leaf = bp->b_addr;
- 
-@@ -340,7 +340,7 @@ xfs_dir3_leaf_get_buf(
- 	xfs_da_args_t		*args,
- 	xfs_dir2_db_t		bno,
- 	struct xfs_buf		**bpp,
--	__uint16_t		magic)
-+	uint16_t		magic)
- {
- 	struct xfs_inode	*dp = args->dp;
- 	struct xfs_trans	*tp = args->trans;
-diff --git a/libxfs/xfs_dir2_priv.h b/libxfs/xfs_dir2_priv.h
-index 39f8604f..011df4da 100644
---- a/libxfs/xfs_dir2_priv.h
-+++ b/libxfs/xfs_dir2_priv.h
-@@ -69,7 +69,7 @@ extern void xfs_dir3_leaf_compact_x1(struct xfs_dir3_icleaf_hdr *leafhdr,
- 		struct xfs_dir2_leaf_entry *ents, int *indexp,
- 		int *lowstalep, int *highstalep, int *lowlogp, int *highlogp);
- extern int xfs_dir3_leaf_get_buf(struct xfs_da_args *args, xfs_dir2_db_t bno,
--		struct xfs_buf **bpp, __uint16_t magic);
-+		struct xfs_buf **bpp, uint16_t magic);
- extern void xfs_dir3_leaf_log_ents(struct xfs_da_args *args,
- 		struct xfs_buf *bp, int first, int last);
- extern void xfs_dir3_leaf_log_header(struct xfs_da_args *args,
-diff --git a/libxfs/xfs_dir2_sf.c b/libxfs/xfs_dir2_sf.c
-index 195f816d..0c453988 100644
---- a/libxfs/xfs_dir2_sf.c
-+++ b/libxfs/xfs_dir2_sf.c
-@@ -125,7 +125,7 @@ xfs_dir2_block_sfsize(
- 		 * Calculate the new size, see if we should give up yet.
- 		 */
- 		size = xfs_dir2_sf_hdr_size(i8count) +	/* header */
--		       count * 3 * sizeof(__u8) +	/* namelen + offset */
-+		       count * 3 * sizeof(u8) +		/* namelen + offset */
- 		       namelen +			/* name */
- 		       (i8count ?			/* inumber */
- 				count * XFS_INO64_SIZE :
-@@ -645,7 +645,7 @@ xfs_dir2_sf_verify(
- 	int				offset;
- 	int				size;
- 	int				error;
--	__uint8_t			filetype;
-+	uint8_t				filetype;
- 
- 	ASSERT(ip->i_d.di_format == XFS_DINODE_FMT_LOCAL);
- 	/*
-diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h
-index 4c3ed1fd..a53f035f 100644
---- a/libxfs/xfs_format.h
-+++ b/libxfs/xfs_format.h
-@@ -103,8 +103,8 @@ struct xfs_ifork;
-  * Must be padded to 64 bit alignment.
-  */
- typedef struct xfs_sb {
--	__uint32_t	sb_magicnum;	/* magic number == XFS_SB_MAGIC */
--	__uint32_t	sb_blocksize;	/* logical block size, bytes */
-+	uint32_t	sb_magicnum;	/* magic number == XFS_SB_MAGIC */
-+	uint32_t	sb_blocksize;	/* logical block size, bytes */
- 	xfs_rfsblock_t	sb_dblocks;	/* number of data blocks */
- 	xfs_rfsblock_t	sb_rblocks;	/* number of realtime blocks */
- 	xfs_rtblock_t	sb_rextents;	/* number of realtime extents */
-@@ -118,45 +118,45 @@ typedef struct xfs_sb {
- 	xfs_agnumber_t	sb_agcount;	/* number of allocation groups */
- 	xfs_extlen_t	sb_rbmblocks;	/* number of rt bitmap blocks */
- 	xfs_extlen_t	sb_logblocks;	/* number of log blocks */
--	__uint16_t	sb_versionnum;	/* header version == XFS_SB_VERSION */
--	__uint16_t	sb_sectsize;	/* volume sector size, bytes */
--	__uint16_t	sb_inodesize;	/* inode size, bytes */
--	__uint16_t	sb_inopblock;	/* inodes per block */
-+	uint16_t	sb_versionnum;	/* header version == XFS_SB_VERSION */
-+	uint16_t	sb_sectsize;	/* volume sector size, bytes */
-+	uint16_t	sb_inodesize;	/* inode size, bytes */
-+	uint16_t	sb_inopblock;	/* inodes per block */
- 	char		sb_fname[12];	/* file system name */
--	__uint8_t	sb_blocklog;	/* log2 of sb_blocksize */
--	__uint8_t	sb_sectlog;	/* log2 of sb_sectsize */
--	__uint8_t	sb_inodelog;	/* log2 of sb_inodesize */
--	__uint8_t	sb_inopblog;	/* log2 of sb_inopblock */
--	__uint8_t	sb_agblklog;	/* log2 of sb_agblocks (rounded up) */
--	__uint8_t	sb_rextslog;	/* log2 of sb_rextents */
--	__uint8_t	sb_inprogress;	/* mkfs is in progress, don't mount */
--	__uint8_t	sb_imax_pct;	/* max % of fs for inode space */
-+	uint8_t		sb_blocklog;	/* log2 of sb_blocksize */
-+	uint8_t		sb_sectlog;	/* log2 of sb_sectsize */
-+	uint8_t		sb_inodelog;	/* log2 of sb_inodesize */
-+	uint8_t		sb_inopblog;	/* log2 of sb_inopblock */
-+	uint8_t		sb_agblklog;	/* log2 of sb_agblocks (rounded up) */
-+	uint8_t		sb_rextslog;	/* log2 of sb_rextents */
-+	uint8_t		sb_inprogress;	/* mkfs is in progress, don't mount */
-+	uint8_t		sb_imax_pct;	/* max % of fs for inode space */
- 					/* statistics */
- 	/*
- 	 * These fields must remain contiguous.  If you really
- 	 * want to change their layout, make sure you fix the
- 	 * code in xfs_trans_apply_sb_deltas().
- 	 */
--	__uint64_t	sb_icount;	/* allocated inodes */
--	__uint64_t	sb_ifree;	/* free inodes */
--	__uint64_t	sb_fdblocks;	/* free data blocks */
--	__uint64_t	sb_frextents;	/* free realtime extents */
-+	uint64_t	sb_icount;	/* allocated inodes */
-+	uint64_t	sb_ifree;	/* free inodes */
-+	uint64_t	sb_fdblocks;	/* free data blocks */
-+	uint64_t	sb_frextents;	/* free realtime extents */
- 	/*
- 	 * End contiguous fields.
- 	 */
- 	xfs_ino_t	sb_uquotino;	/* user quota inode */
- 	xfs_ino_t	sb_gquotino;	/* group quota inode */
--	__uint16_t	sb_qflags;	/* quota flags */
--	__uint8_t	sb_flags;	/* misc. flags */
--	__uint8_t	sb_shared_vn;	/* shared version number */
-+	uint16_t	sb_qflags;	/* quota flags */
-+	uint8_t		sb_flags;	/* misc. flags */
-+	uint8_t		sb_shared_vn;	/* shared version number */
- 	xfs_extlen_t	sb_inoalignmt;	/* inode chunk alignment, fsblocks */
--	__uint32_t	sb_unit;	/* stripe or raid unit */
--	__uint32_t	sb_width;	/* stripe or raid width */
--	__uint8_t	sb_dirblklog;	/* log2 of dir block size (fsbs) */
--	__uint8_t	sb_logsectlog;	/* log2 of the log sector size */
--	__uint16_t	sb_logsectsize;	/* sector size for the log, bytes */
--	__uint32_t	sb_logsunit;	/* stripe unit size for the log */
--	__uint32_t	sb_features2;	/* additional feature bits */
-+	uint32_t	sb_unit;	/* stripe or raid unit */
-+	uint32_t	sb_width;	/* stripe or raid width */
-+	uint8_t		sb_dirblklog;	/* log2 of dir block size (fsbs) */
-+	uint8_t		sb_logsectlog;	/* log2 of the log sector size */
-+	uint16_t	sb_logsectsize;	/* sector size for the log, bytes */
-+	uint32_t	sb_logsunit;	/* stripe unit size for the log */
-+	uint32_t	sb_features2;	/* additional feature bits */
- 
- 	/*
- 	 * bad features2 field as a result of failing to pad the sb structure to
-@@ -167,17 +167,17 @@ typedef struct xfs_sb {
- 	 * the value in sb_features2 when formatting the incore superblock to
- 	 * the disk buffer.
- 	 */
--	__uint32_t	sb_bad_features2;
-+	uint32_t	sb_bad_features2;
- 
- 	/* version 5 superblock fields start here */
- 
- 	/* feature masks */
--	__uint32_t	sb_features_compat;
--	__uint32_t	sb_features_ro_compat;
--	__uint32_t	sb_features_incompat;
--	__uint32_t	sb_features_log_incompat;
-+	uint32_t	sb_features_compat;
-+	uint32_t	sb_features_ro_compat;
-+	uint32_t	sb_features_incompat;
-+	uint32_t	sb_features_log_incompat;
- 
--	__uint32_t	sb_crc;		/* superblock crc */
-+	uint32_t	sb_crc;		/* superblock crc */
- 	xfs_extlen_t	sb_spino_align;	/* sparse inode chunk alignment */
- 
- 	xfs_ino_t	sb_pquotino;	/* project quota inode */
-@@ -449,7 +449,7 @@ static inline void xfs_sb_version_addprojid32bit(struct xfs_sb *sbp)
- static inline bool
- xfs_sb_has_compat_feature(
- 	struct xfs_sb	*sbp,
--	__uint32_t	feature)
-+	uint32_t	feature)
- {
- 	return (sbp->sb_features_compat & feature) != 0;
- }
-@@ -465,7 +465,7 @@ xfs_sb_has_compat_feature(
- static inline bool
- xfs_sb_has_ro_compat_feature(
- 	struct xfs_sb	*sbp,
--	__uint32_t	feature)
-+	uint32_t	feature)
- {
- 	return (sbp->sb_features_ro_compat & feature) != 0;
- }
-@@ -482,7 +482,7 @@ xfs_sb_has_ro_compat_feature(
- static inline bool
- xfs_sb_has_incompat_feature(
- 	struct xfs_sb	*sbp,
--	__uint32_t	feature)
-+	uint32_t	feature)
- {
- 	return (sbp->sb_features_incompat & feature) != 0;
- }
-@@ -492,7 +492,7 @@ xfs_sb_has_incompat_feature(
- static inline bool
- xfs_sb_has_incompat_log_feature(
- 	struct xfs_sb	*sbp,
--	__uint32_t	feature)
-+	uint32_t	feature)
- {
- 	return (sbp->sb_features_log_incompat & feature) != 0;
- }
-@@ -594,8 +594,8 @@ xfs_is_quota_inode(struct xfs_sb *sbp, xfs_ino_t ino)
-  */
- #define XFS_FSB_TO_B(mp,fsbno)	((xfs_fsize_t)(fsbno) << (mp)->m_sb.sb_blocklog)
- #define XFS_B_TO_FSB(mp,b)	\
--	((((__uint64_t)(b)) + (mp)->m_blockmask) >> (mp)->m_sb.sb_blocklog)
--#define XFS_B_TO_FSBT(mp,b)	(((__uint64_t)(b)) >> (mp)->m_sb.sb_blocklog)
-+	((((uint64_t)(b)) + (mp)->m_blockmask) >> (mp)->m_sb.sb_blocklog)
-+#define XFS_B_TO_FSBT(mp,b)	(((uint64_t)(b)) >> (mp)->m_sb.sb_blocklog)
- #define XFS_B_FSB_OFFSET(mp,b)	((b) & (mp)->m_blockmask)
- 
- /*
-@@ -1072,7 +1072,7 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev)
-  * next agno_log bits - ag number
-  * high agno_log-agblklog-inopblog bits - 0
-  */
--#define	XFS_INO_MASK(k)			(__uint32_t)((1ULL << (k)) - 1)
-+#define	XFS_INO_MASK(k)			(uint32_t)((1ULL << (k)) - 1)
- #define	XFS_INO_OFFSET_BITS(mp)		(mp)->m_sb.sb_inopblog
- #define	XFS_INO_AGBNO_BITS(mp)		(mp)->m_sb.sb_agblklog
- #define	XFS_INO_AGINO_BITS(mp)		(mp)->m_agino_log
-@@ -1269,16 +1269,16 @@ typedef __be32 xfs_alloc_ptr_t;
- #define	XFS_FIBT_MAGIC		0x46494254	/* 'FIBT' */
- #define	XFS_FIBT_CRC_MAGIC	0x46494233	/* 'FIB3' */
- 
--typedef	__uint64_t	xfs_inofree_t;
-+typedef uint64_t	xfs_inofree_t;
- #define	XFS_INODES_PER_CHUNK		(NBBY * sizeof(xfs_inofree_t))
- #define	XFS_INODES_PER_CHUNK_LOG	(XFS_NBBYLOG + 3)
- #define	XFS_INOBT_ALL_FREE		((xfs_inofree_t)-1)
- #define	XFS_INOBT_MASK(i)		((xfs_inofree_t)1 << (i))
- 
- #define XFS_INOBT_HOLEMASK_FULL		0	/* holemask for full chunk */
--#define XFS_INOBT_HOLEMASK_BITS		(NBBY * sizeof(__uint16_t))
-+#define XFS_INOBT_HOLEMASK_BITS		(NBBY * sizeof(uint16_t))
- #define XFS_INODES_PER_HOLEMASK_BIT	\
--	(XFS_INODES_PER_CHUNK / (NBBY * sizeof(__uint16_t)))
-+	(XFS_INODES_PER_CHUNK / (NBBY * sizeof(uint16_t)))
- 
- static inline xfs_inofree_t xfs_inobt_maskn(int i, int n)
- {
-@@ -1312,9 +1312,9 @@ typedef struct xfs_inobt_rec {
- 
- typedef struct xfs_inobt_rec_incore {
- 	xfs_agino_t	ir_startino;	/* starting inode number */
--	__uint16_t	ir_holemask;	/* hole mask for sparse chunks */
--	__uint8_t	ir_count;	/* total inode count */
--	__uint8_t	ir_freecount;	/* count of free inodes (set bits) */
-+	uint16_t	ir_holemask;	/* hole mask for sparse chunks */
-+	uint8_t		ir_count;	/* total inode count */
-+	uint8_t		ir_freecount;	/* count of free inodes (set bits) */
- 	xfs_inofree_t	ir_free;	/* free inode mask */
- } xfs_inobt_rec_incore_t;
- 
-@@ -1397,15 +1397,15 @@ struct xfs_rmap_rec {
-  *  rm_offset:54-60 aren't used and should be zero
-  *  rm_offset:0-53 is the block offset within the inode
-  */
--#define XFS_RMAP_OFF_ATTR_FORK	((__uint64_t)1ULL << 63)
--#define XFS_RMAP_OFF_BMBT_BLOCK	((__uint64_t)1ULL << 62)
--#define XFS_RMAP_OFF_UNWRITTEN	((__uint64_t)1ULL << 61)
-+#define XFS_RMAP_OFF_ATTR_FORK	((uint64_t)1ULL << 63)
-+#define XFS_RMAP_OFF_BMBT_BLOCK	((uint64_t)1ULL << 62)
-+#define XFS_RMAP_OFF_UNWRITTEN	((uint64_t)1ULL << 61)
- 
--#define XFS_RMAP_LEN_MAX	((__uint32_t)~0U)
-+#define XFS_RMAP_LEN_MAX	((uint32_t)~0U)
- #define XFS_RMAP_OFF_FLAGS	(XFS_RMAP_OFF_ATTR_FORK | \
- 				 XFS_RMAP_OFF_BMBT_BLOCK | \
- 				 XFS_RMAP_OFF_UNWRITTEN)
--#define XFS_RMAP_OFF_MASK	((__uint64_t)0x3FFFFFFFFFFFFFULL)
-+#define XFS_RMAP_OFF_MASK	((uint64_t)0x3FFFFFFFFFFFFFULL)
- 
- #define XFS_RMAP_OFF(off)		((off) & XFS_RMAP_OFF_MASK)
- 
-@@ -1431,8 +1431,8 @@ struct xfs_rmap_rec {
- struct xfs_rmap_irec {
- 	xfs_agblock_t	rm_startblock;	/* extent start block */
- 	xfs_extlen_t	rm_blockcount;	/* extent length */
--	__uint64_t	rm_owner;	/* extent owner */
--	__uint64_t	rm_offset;	/* offset within the owner */
-+	uint64_t	rm_owner;	/* extent owner */
-+	uint64_t	rm_offset;	/* offset within the owner */
- 	unsigned int	rm_flags;	/* state flags */
- };
- 
-@@ -1544,11 +1544,11 @@ typedef struct xfs_bmbt_rec {
- 	__be64			l0, l1;
- } xfs_bmbt_rec_t;
- 
--typedef __uint64_t	xfs_bmbt_rec_base_t;	/* use this for casts */
-+typedef uint64_t	xfs_bmbt_rec_base_t;	/* use this for casts */
- typedef xfs_bmbt_rec_t xfs_bmdr_rec_t;
- 
- typedef struct xfs_bmbt_rec_host {
--	__uint64_t		l0, l1;
-+	uint64_t		l0, l1;
- } xfs_bmbt_rec_host_t;
- 
- /*
-diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h
-index 99f7f881..8a0c0eec 100644
---- a/libxfs/xfs_fs.h
-+++ b/libxfs/xfs_fs.h
-@@ -323,10 +323,10 @@ typedef struct xfs_bstat {
-  * and using two 16bit values to hold new 32bit projid was choosen
-  * to retain compatibility with "old" filesystems).
-  */
--static inline __uint32_t
-+static inline uint32_t
- bstat_get_projid(struct xfs_bstat *bs)
- {
--	return (__uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
-+	return (uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
- }
- 
- /*
-@@ -472,10 +472,10 @@ typedef struct xfs_handle {
-  */
- typedef struct xfs_swapext
- {
--	__int64_t	sx_version;	/* version */
-+	int64_t		sx_version;	/* version */
- #define XFS_SX_VERSION		0
--	__int64_t	sx_fdtarget;	/* fd of target file */
--	__int64_t	sx_fdtmp;	/* fd of tmp file */
-+	int64_t		sx_fdtarget;	/* fd of target file */
-+	int64_t		sx_fdtmp;	/* fd of tmp file */
- 	xfs_off_t	sx_offset;	/* offset into file */
- 	xfs_off_t	sx_length;	/* leng from offset */
- 	char		sx_pad[16];	/* pad space, unused */
-@@ -562,7 +562,7 @@ typedef struct xfs_swapext
- #define XFS_IOC_ATTRLIST_BY_HANDLE   _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq)
- #define XFS_IOC_ATTRMULTI_BY_HANDLE  _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq)
- #define XFS_IOC_FSGEOMETRY	     _IOR ('X', 124, struct xfs_fsop_geom)
--#define XFS_IOC_GOINGDOWN	     _IOR ('X', 125, __uint32_t)
-+#define XFS_IOC_GOINGDOWN	     _IOR ('X', 125, uint32_t)
- /*	XFS_IOC_GETFSUUID ---------- deprecated 140	 */
- 
- /* reflink ioctls; these MUST match the btrfs ioctl definitions */
-diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
-index 55cc4507..8d245184 100644
---- a/libxfs/xfs_ialloc.c
-+++ b/libxfs/xfs_ialloc.c
-@@ -134,9 +134,9 @@ xfs_inobt_get_rec(
- STATIC int
- xfs_inobt_insert_rec(
- 	struct xfs_btree_cur	*cur,
--	__uint16_t		holemask,
--	__uint8_t		count,
--	__int32_t		freecount,
-+	uint16_t		holemask,
-+	uint8_t			count,
-+	int32_t			freecount,
- 	xfs_inofree_t		free,
- 	int			*stat)
- {
-diff --git a/libxfs/xfs_ialloc_btree.c b/libxfs/xfs_ialloc_btree.c
-index 7b4be766..5b281054 100644
---- a/libxfs/xfs_ialloc_btree.c
-+++ b/libxfs/xfs_ialloc_btree.c
-@@ -218,12 +218,12 @@ xfs_finobt_init_ptr_from_cur(
- 	ptr->s = agi->agi_free_root;
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_inobt_key_diff(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*key)
- {
--	return (__int64_t)be32_to_cpu(key->inobt.ir_startino) -
-+	return (int64_t)be32_to_cpu(key->inobt.ir_startino) -
- 			  cur->bc_rec.i.ir_startino;
- }
- 
-diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c
-index 2972701d..fcc6fb8e 100644
---- a/libxfs/xfs_inode_buf.c
-+++ b/libxfs/xfs_inode_buf.c
-@@ -442,7 +442,7 @@ xfs_dinode_calc_crc(
- 	struct xfs_mount	*mp,
- 	struct xfs_dinode	*dip)
- {
--	__uint32_t		crc;
-+	uint32_t		crc;
- 
- 	if (dip->di_version < 3)
- 		return;
-diff --git a/libxfs/xfs_inode_buf.h b/libxfs/xfs_inode_buf.h
-index 6848a0af..0827d7de 100644
---- a/libxfs/xfs_inode_buf.h
-+++ b/libxfs/xfs_inode_buf.h
-@@ -28,26 +28,26 @@ struct xfs_dinode;
-  * format specific structures at the appropriate time.
-  */
- struct xfs_icdinode {
--	__int8_t	di_version;	/* inode version */
--	__int8_t	di_format;	/* format of di_c data */
--	__uint16_t	di_flushiter;	/* incremented on flush */
--	__uint32_t	di_uid;		/* owner's user id */
--	__uint32_t	di_gid;		/* owner's group id */
--	__uint16_t	di_projid_lo;	/* lower part of owner's project id */
--	__uint16_t	di_projid_hi;	/* higher part of owner's project id */
-+	int8_t		di_version;	/* inode version */
-+	int8_t		di_format;	/* format of di_c data */
-+	uint16_t	di_flushiter;	/* incremented on flush */
-+	uint32_t	di_uid;		/* owner's user id */
-+	uint32_t	di_gid;		/* owner's group id */
-+	uint16_t	di_projid_lo;	/* lower part of owner's project id */
-+	uint16_t	di_projid_hi;	/* higher part of owner's project id */
- 	xfs_fsize_t	di_size;	/* number of bytes in file */
- 	xfs_rfsblock_t	di_nblocks;	/* # of direct & btree blocks used */
- 	xfs_extlen_t	di_extsize;	/* basic/minimum extent size for file */
- 	xfs_extnum_t	di_nextents;	/* number of extents in data fork */
- 	xfs_aextnum_t	di_anextents;	/* number of extents in attribute fork*/
--	__uint8_t	di_forkoff;	/* attr fork offs, <<3 for 64b align */
--	__int8_t	di_aformat;	/* format of attr fork's data */
--	__uint32_t	di_dmevmask;	/* DMIG event mask */
--	__uint16_t	di_dmstate;	/* DMIG state info */
--	__uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
-+	uint8_t		di_forkoff;	/* attr fork offs, <<3 for 64b align */
-+	int8_t		di_aformat;	/* format of attr fork's data */
-+	uint32_t	di_dmevmask;	/* DMIG event mask */
-+	uint16_t	di_dmstate;	/* DMIG state info */
-+	uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
- 
--	__uint64_t	di_flags2;	/* more random flags */
--	__uint32_t	di_cowextsize;	/* basic cow extent size for file */
-+	uint64_t	di_flags2;	/* more random flags */
-+	uint32_t	di_cowextsize;	/* basic cow extent size for file */
- 
- 	xfs_ictimestamp_t di_crtime;	/* time created */
- };
-diff --git a/libxfs/xfs_log_format.h b/libxfs/xfs_log_format.h
-index 7ae571f8..8372e9bc 100644
---- a/libxfs/xfs_log_format.h
-+++ b/libxfs/xfs_log_format.h
-@@ -31,7 +31,7 @@ struct xfs_trans_res;
-  * through all the log items definitions and everything they encode into the
-  * log.
-  */
--typedef __uint32_t xlog_tid_t;
-+typedef uint32_t xlog_tid_t;
- 
- #define XLOG_MIN_ICLOGS		2
- #define XLOG_MAX_ICLOGS		8
-@@ -211,7 +211,7 @@ typedef struct xfs_log_iovec {
- typedef struct xfs_trans_header {
- 	uint		th_magic;		/* magic number */
- 	uint		th_type;		/* transaction type */
--	__int32_t	th_tid;			/* transaction id (unused) */
-+	int32_t		th_tid;			/* transaction id (unused) */
- 	uint		th_num_items;		/* num items logged by trans */
- } xfs_trans_header_t;
- 
-@@ -265,52 +265,52 @@ typedef struct xfs_trans_header {
-  * must be added on to the end.
-  */
- typedef struct xfs_inode_log_format {
--	__uint16_t		ilf_type;	/* inode log item type */
--	__uint16_t		ilf_size;	/* size of this item */
--	__uint32_t		ilf_fields;	/* flags for fields logged */
--	__uint16_t		ilf_asize;	/* size of attr d/ext/root */
--	__uint16_t		ilf_dsize;	/* size of data/ext/root */
--	__uint64_t		ilf_ino;	/* inode number */
-+	uint16_t		ilf_type;	/* inode log item type */
-+	uint16_t		ilf_size;	/* size of this item */
-+	uint32_t		ilf_fields;	/* flags for fields logged */
-+	uint16_t		ilf_asize;	/* size of attr d/ext/root */
-+	uint16_t		ilf_dsize;	/* size of data/ext/root */
-+	uint64_t		ilf_ino;	/* inode number */
- 	union {
--		__uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
-+		uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
- 		uuid_t		ilfu_uuid;	/* mount point value */
- 	} ilf_u;
--	__int64_t		ilf_blkno;	/* blkno of inode buffer */
--	__int32_t		ilf_len;	/* len of inode buffer */
--	__int32_t		ilf_boffset;	/* off of inode in buffer */
-+	int64_t			ilf_blkno;	/* blkno of inode buffer */
-+	int32_t			ilf_len;	/* len of inode buffer */
-+	int32_t			ilf_boffset;	/* off of inode in buffer */
- } xfs_inode_log_format_t;
- 
- typedef struct xfs_inode_log_format_32 {
--	__uint16_t		ilf_type;	/* inode log item type */
--	__uint16_t		ilf_size;	/* size of this item */
--	__uint32_t		ilf_fields;	/* flags for fields logged */
--	__uint16_t		ilf_asize;	/* size of attr d/ext/root */
--	__uint16_t		ilf_dsize;	/* size of data/ext/root */
--	__uint64_t		ilf_ino;	/* inode number */
-+	uint16_t		ilf_type;	/* inode log item type */
-+	uint16_t		ilf_size;	/* size of this item */
-+	uint32_t		ilf_fields;	/* flags for fields logged */
-+	uint16_t		ilf_asize;	/* size of attr d/ext/root */
-+	uint16_t		ilf_dsize;	/* size of data/ext/root */
-+	uint64_t		ilf_ino;	/* inode number */
- 	union {
--		__uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
-+		uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
- 		uuid_t		ilfu_uuid;	/* mount point value */
- 	} ilf_u;
--	__int64_t		ilf_blkno;	/* blkno of inode buffer */
--	__int32_t		ilf_len;	/* len of inode buffer */
--	__int32_t		ilf_boffset;	/* off of inode in buffer */
-+	int64_t			ilf_blkno;	/* blkno of inode buffer */
-+	int32_t			ilf_len;	/* len of inode buffer */
-+	int32_t			ilf_boffset;	/* off of inode in buffer */
- } __attribute__((packed)) xfs_inode_log_format_32_t;
- 
- typedef struct xfs_inode_log_format_64 {
--	__uint16_t		ilf_type;	/* inode log item type */
--	__uint16_t		ilf_size;	/* size of this item */
--	__uint32_t		ilf_fields;	/* flags for fields logged */
--	__uint16_t		ilf_asize;	/* size of attr d/ext/root */
--	__uint16_t		ilf_dsize;	/* size of data/ext/root */
--	__uint32_t		ilf_pad;	/* pad for 64 bit boundary */
--	__uint64_t		ilf_ino;	/* inode number */
-+	uint16_t		ilf_type;	/* inode log item type */
-+	uint16_t		ilf_size;	/* size of this item */
-+	uint32_t		ilf_fields;	/* flags for fields logged */
-+	uint16_t		ilf_asize;	/* size of attr d/ext/root */
-+	uint16_t		ilf_dsize;	/* size of data/ext/root */
-+	uint32_t		ilf_pad;	/* pad for 64 bit boundary */
-+	uint64_t		ilf_ino;	/* inode number */
- 	union {
--		__uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
-+		uint32_t	ilfu_rdev;	/* rdev value for dev inode*/
- 		uuid_t		ilfu_uuid;	/* mount point value */
- 	} ilf_u;
--	__int64_t		ilf_blkno;	/* blkno of inode buffer */
--	__int32_t		ilf_len;	/* len of inode buffer */
--	__int32_t		ilf_boffset;	/* off of inode in buffer */
-+	int64_t			ilf_blkno;	/* blkno of inode buffer */
-+	int32_t			ilf_len;	/* len of inode buffer */
-+	int32_t			ilf_boffset;	/* off of inode in buffer */
- } xfs_inode_log_format_64_t;
- 
- 
-@@ -379,8 +379,8 @@ static inline int xfs_ilog_fdata(int w)
-  * information.
-  */
- typedef struct xfs_ictimestamp {
--	__int32_t	t_sec;		/* timestamp seconds */
--	__int32_t	t_nsec;		/* timestamp nanoseconds */
-+	int32_t		t_sec;		/* timestamp seconds */
-+	int32_t		t_nsec;		/* timestamp nanoseconds */
- } xfs_ictimestamp_t;
- 
- /*
-@@ -388,18 +388,18 @@ typedef struct xfs_ictimestamp {
-  * kept identical to struct xfs_dinode except for the endianness annotations.
-  */
- struct xfs_log_dinode {
--	__uint16_t	di_magic;	/* inode magic # = XFS_DINODE_MAGIC */
--	__uint16_t	di_mode;	/* mode and type of file */
--	__int8_t	di_version;	/* inode version */
--	__int8_t	di_format;	/* format of di_c data */
--	__uint8_t	di_pad3[2];	/* unused in v2/3 inodes */
--	__uint32_t	di_uid;		/* owner's user id */
--	__uint32_t	di_gid;		/* owner's group id */
--	__uint32_t	di_nlink;	/* number of links to file */
--	__uint16_t	di_projid_lo;	/* lower part of owner's project id */
--	__uint16_t	di_projid_hi;	/* higher part of owner's project id */
--	__uint8_t	di_pad[6];	/* unused, zeroed space */
--	__uint16_t	di_flushiter;	/* incremented on flush */
-+	uint16_t	di_magic;	/* inode magic # = XFS_DINODE_MAGIC */
-+	uint16_t	di_mode;	/* mode and type of file */
-+	int8_t		di_version;	/* inode version */
-+	int8_t		di_format;	/* format of di_c data */
-+	uint8_t		di_pad3[2];	/* unused in v2/3 inodes */
-+	uint32_t	di_uid;		/* owner's user id */
-+	uint32_t	di_gid;		/* owner's group id */
-+	uint32_t	di_nlink;	/* number of links to file */
-+	uint16_t	di_projid_lo;	/* lower part of owner's project id */
-+	uint16_t	di_projid_hi;	/* higher part of owner's project id */
-+	uint8_t		di_pad[6];	/* unused, zeroed space */
-+	uint16_t	di_flushiter;	/* incremented on flush */
- 	xfs_ictimestamp_t di_atime;	/* time last accessed */
- 	xfs_ictimestamp_t di_mtime;	/* time last modified */
- 	xfs_ictimestamp_t di_ctime;	/* time created/inode modified */
-@@ -408,23 +408,23 @@ struct xfs_log_dinode {
- 	xfs_extlen_t	di_extsize;	/* basic/minimum extent size for file */
- 	xfs_extnum_t	di_nextents;	/* number of extents in data fork */
- 	xfs_aextnum_t	di_anextents;	/* number of extents in attribute fork*/
--	__uint8_t	di_forkoff;	/* attr fork offs, <<3 for 64b align */
--	__int8_t	di_aformat;	/* format of attr fork's data */
--	__uint32_t	di_dmevmask;	/* DMIG event mask */
--	__uint16_t	di_dmstate;	/* DMIG state info */
--	__uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
--	__uint32_t	di_gen;		/* generation number */
-+	uint8_t		di_forkoff;	/* attr fork offs, <<3 for 64b align */
-+	int8_t		di_aformat;	/* format of attr fork's data */
-+	uint32_t	di_dmevmask;	/* DMIG event mask */
-+	uint16_t	di_dmstate;	/* DMIG state info */
-+	uint16_t	di_flags;	/* random flags, XFS_DIFLAG_... */
-+	uint32_t	di_gen;		/* generation number */
- 
- 	/* di_next_unlinked is the only non-core field in the old dinode */
- 	xfs_agino_t	di_next_unlinked;/* agi unlinked list ptr */
- 
- 	/* start of the extended dinode, writable fields */
--	__uint32_t	di_crc;		/* CRC of the inode */
--	__uint64_t	di_changecount;	/* number of attribute changes */
-+	uint32_t	di_crc;		/* CRC of the inode */
-+	uint64_t	di_changecount;	/* number of attribute changes */
- 	xfs_lsn_t	di_lsn;		/* flush sequence */
--	__uint64_t	di_flags2;	/* more random flags */
--	__uint32_t	di_cowextsize;	/* basic cow extent size for file */
--	__uint8_t	di_pad2[12];	/* more padding for future expansion */
-+	uint64_t	di_flags2;	/* more random flags */
-+	uint32_t	di_cowextsize;	/* basic cow extent size for file */
-+	uint8_t		di_pad2[12];	/* more padding for future expansion */
- 
- 	/* fields only written to during inode creation */
- 	xfs_ictimestamp_t di_crtime;	/* time created */
-@@ -483,7 +483,7 @@ typedef struct xfs_buf_log_format {
- 	unsigned short	blf_size;	/* size of this item */
- 	unsigned short	blf_flags;	/* misc state */
- 	unsigned short	blf_len;	/* number of blocks in this buf */
--	__int64_t	blf_blkno;	/* starting blkno of this buf */
-+	int64_t		blf_blkno;	/* starting blkno of this buf */
- 	unsigned int	blf_map_size;	/* used size of data bitmap in words */
- 	unsigned int	blf_data_map[XFS_BLF_DATAMAP_SIZE]; /* dirty bitmap */
- } xfs_buf_log_format_t;
-@@ -533,7 +533,7 @@ xfs_blft_to_flags(struct xfs_buf_log_format *blf, enum xfs_blft type)
- 	blf->blf_flags |= ((type << XFS_BLFT_SHIFT) & XFS_BLFT_MASK);
- }
- 
--static inline __uint16_t
-+static inline uint16_t
- xfs_blft_from_flags(struct xfs_buf_log_format *blf)
- {
- 	return (blf->blf_flags & XFS_BLFT_MASK) >> XFS_BLFT_SHIFT;
-@@ -554,14 +554,14 @@ typedef struct xfs_extent {
-  * conversion routine.
-  */
- typedef struct xfs_extent_32 {
--	__uint64_t	ext_start;
--	__uint32_t	ext_len;
-+	uint64_t	ext_start;
-+	uint32_t	ext_len;
- } __attribute__((packed)) xfs_extent_32_t;
- 
- typedef struct xfs_extent_64 {
--	__uint64_t	ext_start;
--	__uint32_t	ext_len;
--	__uint32_t	ext_pad;
-+	uint64_t	ext_start;
-+	uint32_t	ext_len;
-+	uint32_t	ext_pad;
- } xfs_extent_64_t;
- 
- /*
-@@ -570,26 +570,26 @@ typedef struct xfs_extent_64 {
-  * size is given by efi_nextents.
-  */
- typedef struct xfs_efi_log_format {
--	__uint16_t		efi_type;	/* efi log item type */
--	__uint16_t		efi_size;	/* size of this item */
--	__uint32_t		efi_nextents;	/* # extents to free */
--	__uint64_t		efi_id;		/* efi identifier */
-+	uint16_t		efi_type;	/* efi log item type */
-+	uint16_t		efi_size;	/* size of this item */
-+	uint32_t		efi_nextents;	/* # extents to free */
-+	uint64_t		efi_id;		/* efi identifier */
- 	xfs_extent_t		efi_extents[1];	/* array of extents to free */
- } xfs_efi_log_format_t;
- 
- typedef struct xfs_efi_log_format_32 {
--	__uint16_t		efi_type;	/* efi log item type */
--	__uint16_t		efi_size;	/* size of this item */
--	__uint32_t		efi_nextents;	/* # extents to free */
--	__uint64_t		efi_id;		/* efi identifier */
-+	uint16_t		efi_type;	/* efi log item type */
-+	uint16_t		efi_size;	/* size of this item */
-+	uint32_t		efi_nextents;	/* # extents to free */
-+	uint64_t		efi_id;		/* efi identifier */
- 	xfs_extent_32_t		efi_extents[1];	/* array of extents to free */
- } __attribute__((packed)) xfs_efi_log_format_32_t;
- 
- typedef struct xfs_efi_log_format_64 {
--	__uint16_t		efi_type;	/* efi log item type */
--	__uint16_t		efi_size;	/* size of this item */
--	__uint32_t		efi_nextents;	/* # extents to free */
--	__uint64_t		efi_id;		/* efi identifier */
-+	uint16_t		efi_type;	/* efi log item type */
-+	uint16_t		efi_size;	/* size of this item */
-+	uint32_t		efi_nextents;	/* # extents to free */
-+	uint64_t		efi_id;		/* efi identifier */
- 	xfs_extent_64_t		efi_extents[1];	/* array of extents to free */
- } xfs_efi_log_format_64_t;
- 
-@@ -599,26 +599,26 @@ typedef struct xfs_efi_log_format_64 {
-  * size is given by efd_nextents;
-  */
- typedef struct xfs_efd_log_format {
--	__uint16_t		efd_type;	/* efd log item type */
--	__uint16_t		efd_size;	/* size of this item */
--	__uint32_t		efd_nextents;	/* # of extents freed */
--	__uint64_t		efd_efi_id;	/* id of corresponding efi */
-+	uint16_t		efd_type;	/* efd log item type */
-+	uint16_t		efd_size;	/* size of this item */
-+	uint32_t		efd_nextents;	/* # of extents freed */
-+	uint64_t		efd_efi_id;	/* id of corresponding efi */
- 	xfs_extent_t		efd_extents[1];	/* array of extents freed */
- } xfs_efd_log_format_t;
- 
- typedef struct xfs_efd_log_format_32 {
--	__uint16_t		efd_type;	/* efd log item type */
--	__uint16_t		efd_size;	/* size of this item */
--	__uint32_t		efd_nextents;	/* # of extents freed */
--	__uint64_t		efd_efi_id;	/* id of corresponding efi */
-+	uint16_t		efd_type;	/* efd log item type */
-+	uint16_t		efd_size;	/* size of this item */
-+	uint32_t		efd_nextents;	/* # of extents freed */
-+	uint64_t		efd_efi_id;	/* id of corresponding efi */
- 	xfs_extent_32_t		efd_extents[1];	/* array of extents freed */
- } __attribute__((packed)) xfs_efd_log_format_32_t;
- 
- typedef struct xfs_efd_log_format_64 {
--	__uint16_t		efd_type;	/* efd log item type */
--	__uint16_t		efd_size;	/* size of this item */
--	__uint32_t		efd_nextents;	/* # of extents freed */
--	__uint64_t		efd_efi_id;	/* id of corresponding efi */
-+	uint16_t		efd_type;	/* efd log item type */
-+	uint16_t		efd_size;	/* size of this item */
-+	uint32_t		efd_nextents;	/* # of extents freed */
-+	uint64_t		efd_efi_id;	/* id of corresponding efi */
- 	xfs_extent_64_t		efd_extents[1];	/* array of extents freed */
- } xfs_efd_log_format_64_t;
- 
-@@ -626,11 +626,11 @@ typedef struct xfs_efd_log_format_64 {
-  * RUI/RUD (reverse mapping) log format definitions
-  */
- struct xfs_map_extent {
--	__uint64_t		me_owner;
--	__uint64_t		me_startblock;
--	__uint64_t		me_startoff;
--	__uint32_t		me_len;
--	__uint32_t		me_flags;
-+	uint64_t		me_owner;
-+	uint64_t		me_startblock;
-+	uint64_t		me_startoff;
-+	uint32_t		me_len;
-+	uint32_t		me_flags;
- };
- 
- /* rmap me_flags: upper bits are flags, lower byte is type code */
-@@ -659,10 +659,10 @@ struct xfs_map_extent {
-  * size is given by rui_nextents.
-  */
- struct xfs_rui_log_format {
--	__uint16_t		rui_type;	/* rui log item type */
--	__uint16_t		rui_size;	/* size of this item */
--	__uint32_t		rui_nextents;	/* # extents to free */
--	__uint64_t		rui_id;		/* rui identifier */
-+	uint16_t		rui_type;	/* rui log item type */
-+	uint16_t		rui_size;	/* size of this item */
-+	uint32_t		rui_nextents;	/* # extents to free */
-+	uint64_t		rui_id;		/* rui identifier */
- 	struct xfs_map_extent	rui_extents[];	/* array of extents to rmap */
- };
- 
-@@ -680,19 +680,19 @@ xfs_rui_log_format_sizeof(
-  * size is given by rud_nextents;
-  */
- struct xfs_rud_log_format {
--	__uint16_t		rud_type;	/* rud log item type */
--	__uint16_t		rud_size;	/* size of this item */
--	__uint32_t		__pad;
--	__uint64_t		rud_rui_id;	/* id of corresponding rui */
-+	uint16_t		rud_type;	/* rud log item type */
-+	uint16_t		rud_size;	/* size of this item */
-+	uint32_t		__pad;
-+	uint64_t		rud_rui_id;	/* id of corresponding rui */
- };
- 
- /*
-  * CUI/CUD (refcount update) log format definitions
-  */
- struct xfs_phys_extent {
--	__uint64_t		pe_startblock;
--	__uint32_t		pe_len;
--	__uint32_t		pe_flags;
-+	uint64_t		pe_startblock;
-+	uint32_t		pe_len;
-+	uint32_t		pe_flags;
- };
- 
- /* refcount pe_flags: upper bits are flags, lower byte is type code */
-@@ -707,10 +707,10 @@ struct xfs_phys_extent {
-  * size is given by cui_nextents.
-  */
- struct xfs_cui_log_format {
--	__uint16_t		cui_type;	/* cui log item type */
--	__uint16_t		cui_size;	/* size of this item */
--	__uint32_t		cui_nextents;	/* # extents to free */
--	__uint64_t		cui_id;		/* cui identifier */
-+	uint16_t		cui_type;	/* cui log item type */
-+	uint16_t		cui_size;	/* size of this item */
-+	uint32_t		cui_nextents;	/* # extents to free */
-+	uint64_t		cui_id;		/* cui identifier */
- 	struct xfs_phys_extent	cui_extents[];	/* array of extents */
- };
- 
-@@ -728,10 +728,10 @@ xfs_cui_log_format_sizeof(
-  * size is given by cud_nextents;
-  */
- struct xfs_cud_log_format {
--	__uint16_t		cud_type;	/* cud log item type */
--	__uint16_t		cud_size;	/* size of this item */
--	__uint32_t		__pad;
--	__uint64_t		cud_cui_id;	/* id of corresponding cui */
-+	uint16_t		cud_type;	/* cud log item type */
-+	uint16_t		cud_size;	/* size of this item */
-+	uint32_t		__pad;
-+	uint64_t		cud_cui_id;	/* id of corresponding cui */
- };
- 
- /*
-@@ -755,10 +755,10 @@ struct xfs_cud_log_format {
-  * size is given by bui_nextents.
-  */
- struct xfs_bui_log_format {
--	__uint16_t		bui_type;	/* bui log item type */
--	__uint16_t		bui_size;	/* size of this item */
--	__uint32_t		bui_nextents;	/* # extents to free */
--	__uint64_t		bui_id;		/* bui identifier */
-+	uint16_t		bui_type;	/* bui log item type */
-+	uint16_t		bui_size;	/* size of this item */
-+	uint32_t		bui_nextents;	/* # extents to free */
-+	uint64_t		bui_id;		/* bui identifier */
- 	struct xfs_map_extent	bui_extents[];	/* array of extents to bmap */
- };
- 
-@@ -776,10 +776,10 @@ xfs_bui_log_format_sizeof(
-  * size is given by bud_nextents;
-  */
- struct xfs_bud_log_format {
--	__uint16_t		bud_type;	/* bud log item type */
--	__uint16_t		bud_size;	/* size of this item */
--	__uint32_t		__pad;
--	__uint64_t		bud_bui_id;	/* id of corresponding bui */
-+	uint16_t		bud_type;	/* bud log item type */
-+	uint16_t		bud_size;	/* size of this item */
-+	uint32_t		__pad;
-+	uint64_t		bud_bui_id;	/* id of corresponding bui */
- };
- 
- /*
-@@ -789,12 +789,12 @@ struct xfs_bud_log_format {
-  * 32 bits : log_recovery code assumes that.
-  */
- typedef struct xfs_dq_logformat {
--	__uint16_t		qlf_type;      /* dquot log item type */
--	__uint16_t		qlf_size;      /* size of this item */
-+	uint16_t		qlf_type;      /* dquot log item type */
-+	uint16_t		qlf_size;      /* size of this item */
- 	xfs_dqid_t		qlf_id;	       /* usr/grp/proj id : 32 bits */
--	__int64_t		qlf_blkno;     /* blkno of dquot buffer */
--	__int32_t		qlf_len;       /* len of dquot buffer */
--	__uint32_t		qlf_boffset;   /* off of dquot in buffer */
-+	int64_t			qlf_blkno;     /* blkno of dquot buffer */
-+	int32_t			qlf_len;       /* len of dquot buffer */
-+	uint32_t		qlf_boffset;   /* off of dquot in buffer */
- } xfs_dq_logformat_t;
- 
- /*
-@@ -853,8 +853,8 @@ typedef struct xfs_qoff_logformat {
-  * decoding can be done correctly.
-  */
- struct xfs_icreate_log {
--	__uint16_t	icl_type;	/* type of log format structure */
--	__uint16_t	icl_size;	/* size of log format structure */
-+	uint16_t	icl_type;	/* type of log format structure */
-+	uint16_t	icl_size;	/* size of log format structure */
- 	__be32		icl_ag;		/* ag being allocated in */
- 	__be32		icl_agbno;	/* start block of inode range */
- 	__be32		icl_count;	/* number of inodes to initialise */
-diff --git a/libxfs/xfs_quota_defs.h b/libxfs/xfs_quota_defs.h
-index 8eed5127..d69c7722 100644
---- a/libxfs/xfs_quota_defs.h
-+++ b/libxfs/xfs_quota_defs.h
-@@ -27,8 +27,8 @@
-  * they may need 64-bit accounting. Hence, 64-bit quota-counters,
-  * and quota-limits. This is a waste in the common case, but hey ...
-  */
--typedef __uint64_t	xfs_qcnt_t;
--typedef __uint16_t	xfs_qwarncnt_t;
-+typedef uint64_t	xfs_qcnt_t;
-+typedef uint16_t	xfs_qwarncnt_t;
- 
- /*
-  * flags for q_flags field in the dquot.
-diff --git a/libxfs/xfs_refcount_btree.c b/libxfs/xfs_refcount_btree.c
-index 2814f94f..bd1a8f2d 100644
---- a/libxfs/xfs_refcount_btree.c
-+++ b/libxfs/xfs_refcount_btree.c
-@@ -201,7 +201,7 @@ xfs_refcountbt_init_ptr_from_cur(
- 	ptr->s = agf->agf_refcount_root;
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_refcountbt_key_diff(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*key)
-@@ -209,16 +209,16 @@ xfs_refcountbt_key_diff(
- 	struct xfs_refcount_irec	*rec = &cur->bc_rec.rc;
- 	struct xfs_refcount_key		*kp = &key->refc;
- 
--	return (__int64_t)be32_to_cpu(kp->rc_startblock) - rec->rc_startblock;
-+	return (int64_t)be32_to_cpu(kp->rc_startblock) - rec->rc_startblock;
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_refcountbt_diff_two_keys(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*k1,
- 	union xfs_btree_key	*k2)
- {
--	return (__int64_t)be32_to_cpu(k1->refc.rc_startblock) -
-+	return (int64_t)be32_to_cpu(k1->refc.rc_startblock) -
- 			  be32_to_cpu(k2->refc.rc_startblock);
- }
- 
-diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c
-index f78771d1..0d6b5d41 100644
---- a/libxfs/xfs_rmap.c
-+++ b/libxfs/xfs_rmap.c
-@@ -2059,7 +2059,7 @@ int
- xfs_rmap_finish_one(
- 	struct xfs_trans		*tp,
- 	enum xfs_rmap_intent_type	type,
--	__uint64_t			owner,
-+	uint64_t			owner,
- 	int				whichfork,
- 	xfs_fileoff_t			startoff,
- 	xfs_fsblock_t			startblock,
-@@ -2180,7 +2180,7 @@ __xfs_rmap_add(
- 	struct xfs_mount		*mp,
- 	struct xfs_defer_ops		*dfops,
- 	enum xfs_rmap_intent_type	type,
--	__uint64_t			owner,
-+	uint64_t			owner,
- 	int				whichfork,
- 	struct xfs_bmbt_irec		*bmap)
- {
-@@ -2264,7 +2264,7 @@ xfs_rmap_alloc_extent(
- 	xfs_agnumber_t		agno,
- 	xfs_agblock_t		bno,
- 	xfs_extlen_t		len,
--	__uint64_t		owner)
-+	uint64_t		owner)
- {
- 	struct xfs_bmbt_irec	bmap;
- 
-@@ -2288,7 +2288,7 @@ xfs_rmap_free_extent(
- 	xfs_agnumber_t		agno,
- 	xfs_agblock_t		bno,
- 	xfs_extlen_t		len,
--	__uint64_t		owner)
-+	uint64_t		owner)
- {
- 	struct xfs_bmbt_irec	bmap;
- 
-diff --git a/libxfs/xfs_rmap.h b/libxfs/xfs_rmap.h
-index 98f908fe..265116d0 100644
---- a/libxfs/xfs_rmap.h
-+++ b/libxfs/xfs_rmap.h
-@@ -179,7 +179,7 @@ enum xfs_rmap_intent_type {
- struct xfs_rmap_intent {
- 	struct list_head			ri_list;
- 	enum xfs_rmap_intent_type		ri_type;
--	__uint64_t				ri_owner;
-+	uint64_t				ri_owner;
- 	int					ri_whichfork;
- 	struct xfs_bmbt_irec			ri_bmap;
- };
-@@ -196,15 +196,15 @@ int xfs_rmap_convert_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
- 		struct xfs_bmbt_irec *imap);
- int xfs_rmap_alloc_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
- 		xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
--		__uint64_t owner);
-+		uint64_t owner);
- int xfs_rmap_free_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
- 		xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
--		__uint64_t owner);
-+		uint64_t owner);
- 
- void xfs_rmap_finish_one_cleanup(struct xfs_trans *tp,
- 		struct xfs_btree_cur *rcur, int error);
- int xfs_rmap_finish_one(struct xfs_trans *tp, enum xfs_rmap_intent_type type,
--		__uint64_t owner, int whichfork, xfs_fileoff_t startoff,
-+		uint64_t owner, int whichfork, xfs_fileoff_t startoff,
- 		xfs_fsblock_t startblock, xfs_filblks_t blockcount,
- 		xfs_exntst_t state, struct xfs_btree_cur **pcur);
- 
-diff --git a/libxfs/xfs_rmap_btree.c b/libxfs/xfs_rmap_btree.c
-index a186c872..45ac436f 100644
---- a/libxfs/xfs_rmap_btree.c
-+++ b/libxfs/xfs_rmap_btree.c
-@@ -197,7 +197,7 @@ xfs_rmapbt_init_high_key_from_rec(
- 	union xfs_btree_key	*key,
- 	union xfs_btree_rec	*rec)
- {
--	__uint64_t		off;
-+	uint64_t		off;
- 	int			adj;
- 
- 	adj = be32_to_cpu(rec->rmap.rm_blockcount) - 1;
-@@ -239,7 +239,7 @@ xfs_rmapbt_init_ptr_from_cur(
- 	ptr->s = agf->agf_roots[cur->bc_btnum];
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_rmapbt_key_diff(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*key)
-@@ -247,9 +247,9 @@ xfs_rmapbt_key_diff(
- 	struct xfs_rmap_irec	*rec = &cur->bc_rec.r;
- 	struct xfs_rmap_key	*kp = &key->rmap;
- 	__u64			x, y;
--	__int64_t		d;
-+	int64_t			d;
- 
--	d = (__int64_t)be32_to_cpu(kp->rm_startblock) - rec->rm_startblock;
-+	d = (int64_t)be32_to_cpu(kp->rm_startblock) - rec->rm_startblock;
- 	if (d)
- 		return d;
- 
-@@ -269,7 +269,7 @@ xfs_rmapbt_key_diff(
- 	return 0;
- }
- 
--STATIC __int64_t
-+STATIC int64_t
- xfs_rmapbt_diff_two_keys(
- 	struct xfs_btree_cur	*cur,
- 	union xfs_btree_key	*k1,
-@@ -277,10 +277,10 @@ xfs_rmapbt_diff_two_keys(
- {
- 	struct xfs_rmap_key	*kp1 = &k1->rmap;
- 	struct xfs_rmap_key	*kp2 = &k2->rmap;
--	__int64_t		d;
-+	int64_t			d;
- 	__u64			x, y;
- 
--	d = (__int64_t)be32_to_cpu(kp1->rm_startblock) -
-+	d = (int64_t)be32_to_cpu(kp1->rm_startblock) -
- 		       be32_to_cpu(kp2->rm_startblock);
- 	if (d)
- 		return d;
-@@ -382,10 +382,10 @@ xfs_rmapbt_keys_inorder(
- 	union xfs_btree_key	*k1,
- 	union xfs_btree_key	*k2)
- {
--	__uint32_t		x;
--	__uint32_t		y;
--	__uint64_t		a;
--	__uint64_t		b;
-+	uint32_t		x;
-+	uint32_t		y;
-+	uint64_t		a;
-+	uint64_t		b;
- 
- 	x = be32_to_cpu(k1->rmap.rm_startblock);
- 	y = be32_to_cpu(k2->rmap.rm_startblock);
-@@ -412,10 +412,10 @@ xfs_rmapbt_recs_inorder(
- 	union xfs_btree_rec	*r1,
- 	union xfs_btree_rec	*r2)
- {
--	__uint32_t		x;
--	__uint32_t		y;
--	__uint64_t		a;
--	__uint64_t		b;
-+	uint32_t		x;
-+	uint32_t		y;
-+	uint64_t		a;
-+	uint64_t		b;
- 
- 	x = be32_to_cpu(r1->rmap.rm_startblock);
- 	y = be32_to_cpu(r2->rmap.rm_startblock);
-diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c
-index dbd2f881..8f8a99d6 100644
---- a/libxfs/xfs_rtbitmap.c
-+++ b/libxfs/xfs_rtbitmap.c
-@@ -1006,7 +1006,7 @@ xfs_rtfree_extent(
- 	    mp->m_sb.sb_rextents) {
- 		if (!(mp->m_rbmip->i_d.di_flags & XFS_DIFLAG_NEWRTBM))
- 			mp->m_rbmip->i_d.di_flags |= XFS_DIFLAG_NEWRTBM;
--		*(__uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
-+		*(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
- 		xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
- 	}
- 	return 0;
-diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c
-index 93a18190..51f69704 100644
---- a/libxfs/xfs_sb.c
-+++ b/libxfs/xfs_sb.c
-@@ -430,7 +430,7 @@ xfs_sb_quota_to_disk(
- 	struct xfs_dsb	*to,
- 	struct xfs_sb	*from)
- {
--	__uint16_t	qflags = from->sb_qflags;
-+	uint16_t	qflags = from->sb_qflags;
- 
- 	to->sb_uquotino = cpu_to_be64(from->sb_uquotino);
- 	if (xfs_sb_version_has_pquotino(from)) {
-@@ -738,7 +738,7 @@ xfs_sb_mount_common(
- 	mp->m_refc_mnr[1] = mp->m_refc_mxr[1] / 2;
- 
- 	mp->m_bsize = XFS_FSB_TO_BB(mp, 1);
--	mp->m_ialloc_inos = (int)MAX((__uint16_t)XFS_INODES_PER_CHUNK,
-+	mp->m_ialloc_inos = (int)MAX((uint16_t)XFS_INODES_PER_CHUNK,
- 					sbp->sb_inopblock);
- 	mp->m_ialloc_blks = mp->m_ialloc_inos >> sbp->sb_inopblog;
- 
-diff --git a/libxfs/xfs_types.h b/libxfs/xfs_types.h
-index 717909f2..0220159b 100644
---- a/libxfs/xfs_types.h
-+++ b/libxfs/xfs_types.h
-@@ -18,34 +18,34 @@
- #ifndef __XFS_TYPES_H__
- #define	__XFS_TYPES_H__
- 
--typedef __uint32_t	prid_t;		/* project ID */
-+typedef uint32_t	prid_t;		/* project ID */
- 
--typedef __uint32_t	xfs_agblock_t;	/* blockno in alloc. group */
--typedef	__uint32_t	xfs_agino_t;	/* inode # within allocation grp */
--typedef	__uint32_t	xfs_extlen_t;	/* extent length in blocks */
--typedef	__uint32_t	xfs_agnumber_t;	/* allocation group number */
--typedef __int32_t	xfs_extnum_t;	/* # of extents in a file */
--typedef __int16_t	xfs_aextnum_t;	/* # extents in an attribute fork */
--typedef	__int64_t	xfs_fsize_t;	/* bytes in a file */
--typedef __uint64_t	xfs_ufsize_t;	/* unsigned bytes in a file */
-+typedef uint32_t	xfs_agblock_t;	/* blockno in alloc. group */
-+typedef uint32_t	xfs_agino_t;	/* inode # within allocation grp */
-+typedef uint32_t	xfs_extlen_t;	/* extent length in blocks */
-+typedef uint32_t	xfs_agnumber_t;	/* allocation group number */
-+typedef int32_t		xfs_extnum_t;	/* # of extents in a file */
-+typedef int16_t		xfs_aextnum_t;	/* # extents in an attribute fork */
-+typedef int64_t		xfs_fsize_t;	/* bytes in a file */
-+typedef uint64_t	xfs_ufsize_t;	/* unsigned bytes in a file */
- 
--typedef	__int32_t	xfs_suminfo_t;	/* type of bitmap summary info */
--typedef	__int32_t	xfs_rtword_t;	/* word type for bitmap manipulations */
-+typedef int32_t		xfs_suminfo_t;	/* type of bitmap summary info */
-+typedef int32_t		xfs_rtword_t;	/* word type for bitmap manipulations */
- 
--typedef	__int64_t	xfs_lsn_t;	/* log sequence number */
--typedef	__int32_t	xfs_tid_t;	/* transaction identifier */
-+typedef int64_t		xfs_lsn_t;	/* log sequence number */
-+typedef int32_t		xfs_tid_t;	/* transaction identifier */
- 
--typedef	__uint32_t	xfs_dablk_t;	/* dir/attr block number (in file) */
--typedef	__uint32_t	xfs_dahash_t;	/* dir/attr hash value */
-+typedef uint32_t	xfs_dablk_t;	/* dir/attr block number (in file) */
-+typedef uint32_t	xfs_dahash_t;	/* dir/attr hash value */
- 
--typedef	__uint64_t	xfs_fsblock_t;	/* blockno in filesystem (agno|agbno) */
--typedef __uint64_t	xfs_rfsblock_t;	/* blockno in filesystem (raw) */
--typedef __uint64_t	xfs_rtblock_t;	/* extent (block) in realtime area */
--typedef __uint64_t	xfs_fileoff_t;	/* block number in a file */
--typedef __uint64_t	xfs_filblks_t;	/* number of blocks in a file */
-+typedef uint64_t	xfs_fsblock_t;	/* blockno in filesystem (agno|agbno) */
-+typedef uint64_t	xfs_rfsblock_t;	/* blockno in filesystem (raw) */
-+typedef uint64_t	xfs_rtblock_t;	/* extent (block) in realtime area */
-+typedef uint64_t	xfs_fileoff_t;	/* block number in a file */
-+typedef uint64_t	xfs_filblks_t;	/* number of blocks in a file */
- 
--typedef	__int64_t	xfs_srtblock_t;	/* signed version of xfs_rtblock_t */
--typedef __int64_t	xfs_sfiloff_t;	/* signed block number in a file */
-+typedef int64_t		xfs_srtblock_t;	/* signed version of xfs_rtblock_t */
-+typedef int64_t		xfs_sfiloff_t;	/* signed block number in a file */
- 
- /*
-  * Null values for the types.
-@@ -125,7 +125,7 @@ struct xfs_name {
-  * uid_t and gid_t are hard-coded to 32 bits in the inode.
-  * Hence, an 'id' in a dquot is 32 bits..
-  */
--typedef __uint32_t	xfs_dqid_t;
-+typedef uint32_t	xfs_dqid_t;
- 
- /*
-  * Constants for bit manipulations.
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfsprogs-remove-double-underscore-integer-types.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfsprogs-remove-double-underscore-integer-types.patch
deleted file mode 100644
index 5e08f0d..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-xfsprogs-remove-double-underscore-integer-types.patch
+++ /dev/null
@@ -1,3800 +0,0 @@
-From 14f8b6810bd240cc58131483790a099fcf56c073 Mon Sep 17 00:00:00 2001
-From: "Darrick J. Wong" <darrick.wong@oracle.com>
-Date: Fri, 4 Aug 2017 16:33:51 -0500
-Subject: [PATCH] xfsprogs: remove double-underscore integer types
-
-This is a purely mechanical patch that removes the private
-__{u,}int{8,16,32,64}_t typedefs in favor of using the system
-{u,}int{8,16,32,64}_t typedefs.  This is the sed script used to perform
-the transformation and fix the resulting whitespace and indentation
-errors:
-
-s/typedef\t__uint8_t/typedef __uint8_t\t/g
-s/typedef\t__uint/typedef __uint/g
-s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g
-s/__uint8_t\t/__uint8_t\t\t/g
-s/__uint/uint/g
-s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g
-s/__int/int/g
-/^typedef.*int[0-9]*_t;$/d
-
-Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
-[sandeen: fix whitespace incidentals]
-Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
-Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
----
- copy/xfs_copy.c           | 14 ++++-----
- copy/xfs_copy.h           |  2 +-
- db/attr.c                 |  8 ++---
- db/attrshort.c            |  4 +--
- db/bit.c                  |  4 +--
- db/bit.h                  |  2 +-
- db/block.c                |  8 ++---
- db/check.c                | 18 +++++------
- db/convert.c              | 28 ++++++++---------
- db/faddr.c                | 14 ++++-----
- db/field.c                | 44 +++++++++++++--------------
- db/fprint.c               |  8 ++---
- db/frag.c                 |  8 ++---
- db/inode.c                | 34 ++++++++++-----------
- db/io.c                   |  2 +-
- db/io.h                   |  6 ++--
- db/metadump.c             | 12 ++++----
- db/sb.c                   |  6 ++--
- fsr/xfs_fsr.c             |  2 +-
- include/darwin.h          | 18 +++++------
- include/freebsd.h         |  6 ++--
- include/gnukfreebsd.h     |  6 ++--
- include/libxcmd.h         |  6 ++--
- include/linux.h           |  8 ++---
- include/xfs_arch.h        | 22 +++++++-------
- include/xfs_inode.h       |  4 +--
- include/xfs_log_recover.h |  2 +-
- include/xfs_metadump.h    |  4 +--
- include/xfs_mount.h       | 22 +++++++-------
- libhandle/handle.c        |  2 +-
- libhandle/jdm.c           |  2 +-
- libxcmd/topology.c        | 14 ++++-----
- libxfs/darwin.c           |  2 +-
- libxfs/freebsd.c          |  2 +-
- libxfs/init.c             |  2 +-
- libxfs/irix.c             |  2 +-
- libxfs/libxfs_priv.h      |  4 +--
- libxfs/linux.c            |  2 +-
- libxfs/logitem.c          |  2 +-
- libxfs/radix-tree.c       |  8 ++---
- libxfs/rdwr.c             |  6 ++--
- libxfs/util.c             |  8 ++---
- logprint/log_misc.c       |  6 ++--
- mdrestore/xfs_mdrestore.c |  2 +-
- mkfs/proto.c              |  2 +-
- mkfs/xfs_mkfs.c           | 76 +++++++++++++++++++++++------------------------
- quota/edit.c              | 64 +++++++++++++++++++--------------------
- quota/free.c              | 44 +++++++++++++--------------
- quota/quot.c              | 24 +++++++--------
- quota/quota.c             |  4 +--
- quota/quota.h             | 12 ++++----
- quota/report.c            |  4 +--
- quota/state.c             |  2 +-
- quota/util.c              | 66 ++++++++++++++++++++--------------------
- repair/README             |  2 +-
- repair/agheader.h         | 14 ++++-----
- repair/attr_repair.h      | 26 ++++++++--------
- repair/avl64.c            | 38 ++++++++++++------------
- repair/avl64.h            | 18 +++++------
- repair/dinode.c           | 38 ++++++++++++------------
- repair/dinode.h           |  4 +--
- repair/dir2.c             |  2 +-
- repair/globals.h          | 18 +++++------
- repair/incore.c           | 10 +++----
- repair/incore.h           | 46 ++++++++++++++--------------
- repair/incore_ext.c       |  6 ++--
- repair/incore_ino.c       | 72 ++++++++++++++++++++++----------------------
- repair/phase2.c           |  2 +-
- repair/phase3.c           |  6 ++--
- repair/phase4.c           |  4 +--
- repair/phase5.c           | 28 ++++++++---------
- repair/phase6.c           | 16 +++++-----
- repair/phase7.c           |  6 ++--
- repair/progress.c         | 30 +++++++++----------
- repair/progress.h         |  4 +--
- repair/rmap.c             | 18 +++++------
- repair/rmap.h             |  2 +-
- repair/sb.c               | 24 +++++++--------
- repair/scan.c             | 50 +++++++++++++++----------------
- repair/scan.h             | 12 ++++----
- 80 files changed, 590 insertions(+), 590 deletions(-)
-
-diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
-index a7da824f..33e05dfd 100644
---- a/copy/xfs_copy.c
-+++ b/copy/xfs_copy.c
-@@ -43,7 +43,7 @@ unsigned int	source_sectorsize;	/* source disk sectorsize */
- 
- xfs_agblock_t	first_agbno;
- 
--__uint64_t	barcount[11];
-+uint64_t	barcount[11];
- 
- unsigned int	num_targets;
- target_control	*target;
-@@ -313,7 +313,7 @@ usage(void)
- }
- 
- void
--init_bar(__uint64_t source_blocks)
-+init_bar(uint64_t source_blocks)
- {
- 	int	i;
- 
-@@ -322,7 +322,7 @@ init_bar(__uint64_t source_blocks)
- }
- 
- int
--bump_bar(int tenths, __uint64_t numblocks)
-+bump_bar(int tenths, uint64_t numblocks)
- {
- 	static char *bar[11] = {
- 		" 0% ",
-@@ -534,8 +534,8 @@ main(int argc, char **argv)
- 	xfs_off_t	pos;
- 	size_t		length;
- 	int		c;
--	__uint64_t	size, sizeb;
--	__uint64_t	numblocks = 0;
-+	uint64_t	size, sizeb;
-+	uint64_t	numblocks = 0;
- 	int		wblocks = 0;
- 	int		num_threads = 0;
- 	struct dioattr	d;
-@@ -951,8 +951,8 @@ main(int argc, char **argv)
- 	num_ags = mp->m_sb.sb_agcount;
- 
- 	init_bar(mp->m_sb.sb_blocksize / BBSIZE
--			* ((__uint64_t)mp->m_sb.sb_dblocks
--			    - (__uint64_t)mp->m_sb.sb_fdblocks + 10 * num_ags));
-+			* ((uint64_t)mp->m_sb.sb_dblocks
-+			    - (uint64_t)mp->m_sb.sb_fdblocks + 10 * num_ags));
- 
- 	kids = num_targets;
- 
-diff --git a/copy/xfs_copy.h b/copy/xfs_copy.h
-index 27370688..53c6e42c 100644
---- a/copy/xfs_copy.h
-+++ b/copy/xfs_copy.h
-@@ -76,7 +76,7 @@ typedef struct {
- 
- typedef int thread_id;
- typedef int tm_index;			/* index into thread mask array */
--typedef __uint32_t thread_mask;		/* a thread mask */
-+typedef uint32_t thread_mask;		/* a thread mask */
- 
- typedef struct {
- 	char		*name;
-diff --git a/db/attr.c b/db/attr.c
-index 31536a8b..23ffcd5f 100644
---- a/db/attr.c
-+++ b/db/attr.c
-@@ -77,16 +77,16 @@ const field_t	attr_leaf_entry_flds[] = {
- 	{ "nameidx", FLDT_UINT16D, OI(LEOFF(nameidx)), C1, 0, TYP_NONE },
- 	{ "flags", FLDT_UINT8X, OI(LEOFF(flags)), C1, FLD_SKIPALL, TYP_NONE },
- 	{ "incomplete", FLDT_UINT1,
--	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_INCOMPLETE_BIT - 1), C1,
-+	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_INCOMPLETE_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "root", FLDT_UINT1,
--	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
-+	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
- 	  TYP_NONE },
- 	{ "secure", FLDT_UINT1,
--	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
-+	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
- 	  TYP_NONE },
- 	{ "local", FLDT_UINT1,
--	  OI(LEOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_LOCAL_BIT - 1), C1, 0,
-+	  OI(LEOFF(flags) + bitsz(uint8_t) - XFS_ATTR_LOCAL_BIT - 1), C1, 0,
- 	  TYP_NONE },
- 	{ "pad2", FLDT_UINT8X, OI(LEOFF(pad2)), C1, FLD_SKIPALL, TYP_NONE },
- 	{ NULL }
-diff --git a/db/attrshort.c b/db/attrshort.c
-index d82559cc..2ef358f5 100644
---- a/db/attrshort.c
-+++ b/db/attrshort.c
-@@ -51,10 +51,10 @@ const field_t	attr_sf_entry_flds[] = {
- 	{ "valuelen", FLDT_UINT8D, OI(EOFF(valuelen)), C1, 0, TYP_NONE },
- 	{ "flags", FLDT_UINT8X, OI(EOFF(flags)), C1, FLD_SKIPALL, TYP_NONE },
- 	{ "root", FLDT_UINT1,
--	  OI(EOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
-+	  OI(EOFF(flags) + bitsz(uint8_t) - XFS_ATTR_ROOT_BIT - 1), C1, 0,
- 	  TYP_NONE },
- 	{ "secure", FLDT_UINT1,
--	  OI(EOFF(flags) + bitsz(__uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
-+	  OI(EOFF(flags) + bitsz(uint8_t) - XFS_ATTR_SECURE_BIT - 1), C1, 0,
- 	  TYP_NONE },
- 	{ "name", FLDT_CHARNS, OI(EOFF(nameval)), attr_sf_entry_name_count,
- 	  FLD_COUNT, TYP_NONE },
-diff --git a/db/bit.c b/db/bit.c
-index 24872bf7..f5ebf681 100644
---- a/db/bit.c
-+++ b/db/bit.c
-@@ -60,7 +60,7 @@ setbit(
- 	}
- }
- 
--__int64_t
-+int64_t
- getbitval(
- 	void		*obj,
- 	int		bitoff,
-@@ -70,7 +70,7 @@ getbitval(
- 	int		bit;
- 	int		i;
- 	char		*p;
--	__int64_t	rval;
-+	int64_t		rval;
- 	int		signext;
- 	int		z1, z2, z3, z4;
- 
-diff --git a/db/bit.h b/db/bit.h
-index 80ba24c4..9fd71f4b 100644
---- a/db/bit.h
-+++ b/db/bit.h
-@@ -25,5 +25,5 @@
- #define	BVUNSIGNED	0
- #define	BVSIGNED	1
- 
--extern __int64_t	getbitval(void *obj, int bitoff, int nbits, int flags);
-+extern int64_t		getbitval(void *obj, int bitoff, int nbits, int flags);
- extern void             setbitval(void *obuf, int bitoff, int nbits, void *ibuf);
-diff --git a/db/block.c b/db/block.c
-index 4a357ced..5ecd687a 100644
---- a/db/block.c
-+++ b/db/block.c
-@@ -98,7 +98,7 @@ ablock_f(
- 	}
- 	dfsbno = bm.startblock + (bno - bm.startoff);
- 	ASSERT(typtab[TYP_ATTR].typnm == TYP_ATTR);
--	set_cur(&typtab[TYP_ATTR], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
-+	set_cur(&typtab[TYP_ATTR], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
- 		blkbb, DB_RING_ADD, NULL);
- 	return 0;
- }
-@@ -128,14 +128,14 @@ daddr_f(
- 	int		argc,
- 	char		**argv)
- {
--	__int64_t	d;
-+	int64_t		d;
- 	char		*p;
- 
- 	if (argc == 1) {
- 		dbprintf(_("current daddr is %lld\n"), iocur_top->off >> BBSHIFT);
- 		return 0;
- 	}
--	d = (__int64_t)strtoull(argv[1], &p, 0);
-+	d = (int64_t)strtoull(argv[1], &p, 0);
- 	if (*p != '\0' ||
- 	    d >= mp->m_sb.sb_dblocks << (mp->m_sb.sb_blocklog - BBSHIFT)) {
- 		dbprintf(_("bad daddr %s\n"), argv[1]);
-@@ -197,7 +197,7 @@ dblock_f(
- 	ASSERT(typtab[type].typnm == type);
- 	if (nex > 1)
- 		make_bbmap(&bbmap, nex, bmp);
--	set_cur(&typtab[type], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
-+	set_cur(&typtab[type], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
- 		nb * blkbb, DB_RING_ADD, nex > 1 ? &bbmap : NULL);
- 	free(bmp);
- 	return 0;
-diff --git a/db/check.c b/db/check.c
-index 8e618a23..81ba63a6 100644
---- a/db/check.c
-+++ b/db/check.c
-@@ -114,8 +114,8 @@ typedef struct dirhash {
- 
- static xfs_extlen_t	agffreeblks;
- static xfs_extlen_t	agflongest;
--static __uint64_t	agf_aggr_freeblks;	/* aggregate count over all */
--static __uint32_t	agfbtreeblks;
-+static uint64_t	agf_aggr_freeblks;	/* aggregate count over all */
-+static uint32_t	agfbtreeblks;
- static int		lazycount;
- static xfs_agino_t	agicount;
- static xfs_agino_t	agifreecount;
-@@ -124,10 +124,10 @@ static int		blist_size;
- static char		**dbmap;	/* really dbm_t:8 */
- static dirhash_t	**dirhash;
- static int		error;
--static __uint64_t	fdblocks;
--static __uint64_t	frextents;
--static __uint64_t	icount;
--static __uint64_t	ifree;
-+static uint64_t	fdblocks;
-+static uint64_t	frextents;
-+static uint64_t	icount;
-+static uint64_t	ifree;
- static inodata_t	***inodata;
- static int		inodata_hash_size;
- static inodata_t	***inomap;
-@@ -1187,7 +1187,7 @@ blocktrash_f(
- 		goto out;
- 	}
- 	for (i = 0; i < count; i++) {
--		randb = (xfs_rfsblock_t)((((__int64_t)random() << 32) |
-+		randb = (xfs_rfsblock_t)((((int64_t)random() << 32) |
- 					 random()) % blocks);
- 		for (bi = 0, agno = 0, done = 0;
- 		     !done && agno < mp->m_sb.sb_agcount;
-@@ -3032,7 +3032,7 @@ process_leaf_node_dir_v2(
- 		}
- 		if (v)
- 			dbprintf(_("dir inode %lld block %u=%llu\n"), id->ino,
--				(__uint32_t)dbno,
-+				(uint32_t)dbno,
- 				(xfs_fsblock_t)bmp->startblock);
- 		push_cur();
- 		if (nex > 1)
-@@ -3045,7 +3045,7 @@ process_leaf_node_dir_v2(
- 			if (!sflag || v)
- 				dbprintf(_("can't read block %u for directory "
- 					 "inode %lld\n"),
--					(__uint32_t)dbno, id->ino);
-+					(uint32_t)dbno, id->ino);
- 			error++;
- 			pop_cur();
- 			dbno += mp->m_dir_geo->fsbcount - 1;
-diff --git a/db/convert.c b/db/convert.c
-index a337abea..fa4f9623 100644
---- a/db/convert.c
-+++ b/db/convert.c
-@@ -24,13 +24,13 @@
- 
- #define	M(A)	(1 << CT_ ## A)
- #define	agblock_to_bytes(x)	\
--	((__uint64_t)(x) << mp->m_sb.sb_blocklog)
-+	((uint64_t)(x) << mp->m_sb.sb_blocklog)
- #define	agino_to_bytes(x)	\
--	((__uint64_t)(x) << mp->m_sb.sb_inodelog)
-+	((uint64_t)(x) << mp->m_sb.sb_inodelog)
- #define	agnumber_to_bytes(x)	\
--	agblock_to_bytes((__uint64_t)(x) * mp->m_sb.sb_agblocks)
-+	agblock_to_bytes((uint64_t)(x) * mp->m_sb.sb_agblocks)
- #define	daddr_to_bytes(x)	\
--	((__uint64_t)(x) << BBSHIFT)
-+	((uint64_t)(x) << BBSHIFT)
- #define	fsblock_to_bytes(x)	\
- 	(agnumber_to_bytes(XFS_FSB_TO_AGNO(mp, (x))) + \
- 	 agblock_to_bytes(XFS_FSB_TO_AGBNO(mp, (x))))
-@@ -38,7 +38,7 @@
- 	(agnumber_to_bytes(XFS_INO_TO_AGNO(mp, (x))) + \
- 	 agino_to_bytes(XFS_INO_TO_AGINO(mp, (x))))
- #define	inoidx_to_bytes(x)	\
--	((__uint64_t)(x) << mp->m_sb.sb_inodelog)
-+	((uint64_t)(x) << mp->m_sb.sb_inodelog)
- 
- typedef enum {
- 	CT_NONE = -1,
-@@ -68,7 +68,7 @@ typedef union {
- 	xfs_agnumber_t	agnumber;
- 	int		bboff;
- 	int		blkoff;
--	__uint64_t	byte;
-+	uint64_t	byte;
- 	xfs_daddr_t	daddr;
- 	xfs_fsblock_t	fsblock;
- 	xfs_ino_t	ino;
-@@ -76,7 +76,7 @@ typedef union {
- 	int		inooff;
- } cval_t;
- 
--static __uint64_t		bytevalue(ctype_t ctype, cval_t *val);
-+static uint64_t		bytevalue(ctype_t ctype, cval_t *val);
- static int		convert_f(int argc, char **argv);
- static int		getvalue(char *s, ctype_t ctype, cval_t *val);
- static ctype_t		lookupcty(char *ctyname);
-@@ -118,7 +118,7 @@ static const cmdinfo_t	convert_cmd =
- 	{ "convert", NULL, convert_f, 3, 9, 0, "type num [type num]... type",
- 	  "convert from one address form to another", NULL };
- 
--static __uint64_t
-+static uint64_t
- bytevalue(ctype_t ctype, cval_t *val)
- {
- 	switch (ctype) {
-@@ -129,9 +129,9 @@ bytevalue(ctype_t ctype, cval_t *val)
- 	case CT_AGNUMBER:
- 		return agnumber_to_bytes(val->agnumber);
- 	case CT_BBOFF:
--		return (__uint64_t)val->bboff;
-+		return (uint64_t)val->bboff;
- 	case CT_BLKOFF:
--		return (__uint64_t)val->blkoff;
-+		return (uint64_t)val->blkoff;
- 	case CT_BYTE:
- 		return val->byte;
- 	case CT_DADDR:
-@@ -143,7 +143,7 @@ bytevalue(ctype_t ctype, cval_t *val)
- 	case CT_INOIDX:
- 		return inoidx_to_bytes(val->inoidx);
- 	case CT_INOOFF:
--		return (__uint64_t)val->inooff;
-+		return (uint64_t)val->inooff;
- 	case CT_NONE:
- 	case NCTS:
- 		break;
-@@ -160,7 +160,7 @@ convert_f(int argc, char **argv)
- 	cval_t		cvals[NCTS] = {};
- 	int		i;
- 	int		mask;
--	__uint64_t	v;
-+	uint64_t	v;
- 	ctype_t		wtype;
- 
- 	/* move past the "convert" command */
-@@ -262,7 +262,7 @@ static int
- getvalue(char *s, ctype_t ctype, cval_t *val)
- {
- 	char		*p;
--	__uint64_t	v;
-+	uint64_t	v;
- 
- 	v = strtoull(s, &p, 0);
- 	if (*p != '\0') {
-@@ -286,7 +286,7 @@ getvalue(char *s, ctype_t ctype, cval_t *val)
- 		val->blkoff = (int)v;
- 		break;
- 	case CT_BYTE:
--		val->byte = (__uint64_t)v;
-+		val->byte = (uint64_t)v;
- 		break;
- 	case CT_DADDR:
- 		val->daddr = (xfs_daddr_t)v;
-diff --git a/db/faddr.c b/db/faddr.c
-index 877200bf..56207648 100644
---- a/db/faddr.c
-+++ b/db/faddr.c
-@@ -79,11 +79,11 @@ fa_attrblock(
- 	typnm_t		next)
- {
- 	bmap_ext_t	bm;
--	__uint32_t	bno;
-+	uint32_t	bno;
- 	xfs_fsblock_t	dfsbno;
- 	int		nex;
- 
--	bno = (__uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
-+	bno = (uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
- 	if (bno == 0) {
- 		dbprintf(_("null attribute block number, cannot set new addr\n"));
- 		return;
-@@ -96,7 +96,7 @@ fa_attrblock(
- 	}
- 	dfsbno = bm.startblock + (bno - bm.startoff);
- 	ASSERT(typtab[next].typnm == next);
--	set_cur(&typtab[next], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno), blkbb,
-+	set_cur(&typtab[next], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno), blkbb,
- 		DB_RING_ADD, NULL);
- }
- 
-@@ -276,11 +276,11 @@ fa_dirblock(
- {
- 	bbmap_t		bbmap;
- 	bmap_ext_t	*bmp;
--	__uint32_t	bno;
-+	uint32_t	bno;
- 	xfs_fsblock_t	dfsbno;
- 	int		nex;
- 
--	bno = (__uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
-+	bno = (uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
- 	if (bno == 0) {
- 		dbprintf(_("null directory block number, cannot set new addr\n"));
- 		return;
-@@ -297,7 +297,7 @@ fa_dirblock(
- 	ASSERT(typtab[next].typnm == next);
- 	if (nex > 1)
- 		make_bbmap(&bbmap, nex, bmp);
--	set_cur(&typtab[next], (__int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
-+	set_cur(&typtab[next], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
- 		XFS_FSB_TO_BB(mp, mp->m_dir_geo->fsbcount), DB_RING_ADD,
- 		nex > 1 ? &bbmap : NULL);
- 	free(bmp);
-@@ -317,7 +317,7 @@ fa_drfsbno(
- 		return;
- 	}
- 	ASSERT(typtab[next].typnm == next);
--	set_cur(&typtab[next], (__int64_t)XFS_FSB_TO_BB(mp, bno), blkbb,
-+	set_cur(&typtab[next], (int64_t)XFS_FSB_TO_BB(mp, bno), blkbb,
- 		DB_RING_ADD, NULL);
- }
- 
-diff --git a/db/field.c b/db/field.c
-index 865b0b71..f1e5f35e 100644
---- a/db/field.c
-+++ b/db/field.c
-@@ -83,7 +83,7 @@ const ftattr_t	ftattrtab[] = {
- 	  attr_sf_entry_size, FTARG_SIZE, NULL, attr_sf_entry_flds },
- 	{ FLDT_ATTR_SF_HDR, "attr_sf_hdr", NULL, (char *)attr_sf_hdr_flds,
- 	  SI(bitsz(struct xfs_attr_sf_hdr)), 0, NULL, attr_sf_hdr_flds },
--	{ FLDT_ATTRBLOCK, "attrblock", fp_num, "%u", SI(bitsz(__uint32_t)), 0,
-+	{ FLDT_ATTRBLOCK, "attrblock", fp_num, "%u", SI(bitsz(uint32_t)), 0,
- 	  fa_attrblock, NULL },
- 	{ FLDT_ATTRSHORT, "attrshort", NULL, (char *)attr_shortform_flds,
- 	  attrshort_size, FTARG_SIZE, NULL, attr_shortform_flds },
-@@ -199,7 +199,7 @@ const ftattr_t	ftattrtab[] = {
- 	  SI(bitsz(struct xfs_refcount_rec)), 0, NULL, refcbt_rec_flds },
- 
- /* CRC field */
--	{ FLDT_CRC, "crc", fp_crc, "%#x (%s)", SI(bitsz(__uint32_t)),
-+	{ FLDT_CRC, "crc", fp_crc, "%#x (%s)", SI(bitsz(uint32_t)),
- 	  0, NULL, NULL },
- 
- 	{ FLDT_DEV, "dev", fp_num, "%#x", SI(bitsz(xfs_dev_t)), 0, NULL, NULL },
-@@ -214,7 +214,7 @@ const ftattr_t	ftattrtab[] = {
- 	{ FLDT_DINODE_CORE, "dinode_core", NULL, (char *)inode_core_flds,
- 	  SI(bitsz(xfs_dinode_t)), 0, NULL, inode_core_flds },
- 	{ FLDT_DINODE_FMT, "dinode_fmt", fp_dinode_fmt, NULL,
--	  SI(bitsz(__int8_t)), 0, NULL, NULL },
-+	  SI(bitsz(int8_t)), 0, NULL, NULL },
- 	{ FLDT_DINODE_U, "dinode_u", NULL, (char *)inode_u_flds, inode_u_size,
- 	  FTARG_SIZE|FTARG_OKEMPTY, NULL, inode_u_flds },
- 	{ FLDT_DINODE_V3, "dinode_v3", NULL, (char *)inode_v3_flds,
-@@ -295,7 +295,7 @@ const ftattr_t	ftattrtab[] = {
- 	{ FLDT_DA3_NODE_HDR, "dir_node_hdr", NULL, (char *)da3_node_hdr_flds,
- 	  SI(bitsz(struct xfs_da3_node_hdr)), 0, NULL, da3_node_hdr_flds },
- 
--	{ FLDT_DIRBLOCK, "dirblock", fp_num, "%u", SI(bitsz(__uint32_t)), 0,
-+	{ FLDT_DIRBLOCK, "dirblock", fp_num, "%u", SI(bitsz(uint32_t)), 0,
- 	  fa_dirblock, NULL },
- 	{ FLDT_DISK_DQUOT, "disk_dquot", NULL, (char *)disk_dquot_flds,
- 	  SI(bitsz(xfs_disk_dquot_t)), 0, NULL, disk_dquot_flds },
-@@ -335,15 +335,15 @@ const ftattr_t	ftattrtab[] = {
- 	  FTARG_SIZE, NULL, inode_crc_flds },
- 	{ FLDT_INOFREE, "inofree", fp_num, "%#llx", SI(bitsz(xfs_inofree_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_INT16D, "int16d", fp_num, "%d", SI(bitsz(__int16_t)),
-+	{ FLDT_INT16D, "int16d", fp_num, "%d", SI(bitsz(int16_t)),
- 	  FTARG_SIGNED, NULL, NULL },
--	{ FLDT_INT32D, "int32d", fp_num, "%d", SI(bitsz(__int32_t)),
-+	{ FLDT_INT32D, "int32d", fp_num, "%d", SI(bitsz(int32_t)),
- 	  FTARG_SIGNED, NULL, NULL },
--	{ FLDT_INT64D, "int64d", fp_num, "%lld", SI(bitsz(__int64_t)),
-+	{ FLDT_INT64D, "int64d", fp_num, "%lld", SI(bitsz(int64_t)),
- 	  FTARG_SIGNED, NULL, NULL },
--	{ FLDT_INT8D, "int8d", fp_num, "%d", SI(bitsz(__int8_t)), FTARG_SIGNED,
-+	{ FLDT_INT8D, "int8d", fp_num, "%d", SI(bitsz(int8_t)), FTARG_SIGNED,
- 	  NULL, NULL },
--	{ FLDT_NSEC, "nsec", fp_num, "%09d", SI(bitsz(__int32_t)), FTARG_SIGNED,
-+	{ FLDT_NSEC, "nsec", fp_num, "%09d", SI(bitsz(int32_t)), FTARG_SIGNED,
- 	  NULL, NULL },
- 	{ FLDT_QCNT, "qcnt", fp_num, "%llu", SI(bitsz(xfs_qcnt_t)), 0, NULL,
- 	  NULL },
-@@ -356,34 +356,34 @@ const ftattr_t	ftattrtab[] = {
- 	{ FLDT_SYMLINK_CRC, "symlink", NULL, (char *)symlink_crc_flds,
- 	  symlink_size, FTARG_SIZE, NULL, symlink_crc_flds },
- 
--	{ FLDT_TIME, "time", fp_time, NULL, SI(bitsz(__int32_t)), FTARG_SIGNED,
-+	{ FLDT_TIME, "time", fp_time, NULL, SI(bitsz(int32_t)), FTARG_SIGNED,
- 	  NULL, NULL },
- 	{ FLDT_TIMESTAMP, "timestamp", NULL, (char *)timestamp_flds,
- 	  SI(bitsz(xfs_timestamp_t)), 0, NULL, timestamp_flds },
- 	{ FLDT_UINT1, "uint1", fp_num, "%u", SI(1), 0, NULL, NULL },
--	{ FLDT_UINT16D, "uint16d", fp_num, "%u", SI(bitsz(__uint16_t)), 0, NULL,
-+	{ FLDT_UINT16D, "uint16d", fp_num, "%u", SI(bitsz(uint16_t)), 0, NULL,
- 	  NULL },
--	{ FLDT_UINT16O, "uint16o", fp_num, "%#o", SI(bitsz(__uint16_t)), 0,
-+	{ FLDT_UINT16O, "uint16o", fp_num, "%#o", SI(bitsz(uint16_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_UINT16X, "uint16x", fp_num, "%#x", SI(bitsz(__uint16_t)), 0,
-+	{ FLDT_UINT16X, "uint16x", fp_num, "%#x", SI(bitsz(uint16_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_UINT32D, "uint32d", fp_num, "%u", SI(bitsz(__uint32_t)), 0, NULL,
-+	{ FLDT_UINT32D, "uint32d", fp_num, "%u", SI(bitsz(uint32_t)), 0, NULL,
- 	  NULL },
--	{ FLDT_UINT32O, "uint32o", fp_num, "%#o", SI(bitsz(__uint32_t)), 0,
-+	{ FLDT_UINT32O, "uint32o", fp_num, "%#o", SI(bitsz(uint32_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_UINT32X, "uint32x", fp_num, "%#x", SI(bitsz(__uint32_t)), 0,
-+	{ FLDT_UINT32X, "uint32x", fp_num, "%#x", SI(bitsz(uint32_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_UINT64D, "uint64d", fp_num, "%llu", SI(bitsz(__uint64_t)), 0,
-+	{ FLDT_UINT64D, "uint64d", fp_num, "%llu", SI(bitsz(uint64_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_UINT64O, "uint64o", fp_num, "%#llo", SI(bitsz(__uint64_t)), 0,
-+	{ FLDT_UINT64O, "uint64o", fp_num, "%#llo", SI(bitsz(uint64_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_UINT64X, "uint64x", fp_num, "%#llx", SI(bitsz(__uint64_t)), 0,
-+	{ FLDT_UINT64X, "uint64x", fp_num, "%#llx", SI(bitsz(uint64_t)), 0,
- 	  NULL, NULL },
--	{ FLDT_UINT8D, "uint8d", fp_num, "%u", SI(bitsz(__uint8_t)), 0, NULL,
-+	{ FLDT_UINT8D, "uint8d", fp_num, "%u", SI(bitsz(uint8_t)), 0, NULL,
- 	  NULL },
--	{ FLDT_UINT8O, "uint8o", fp_num, "%#o", SI(bitsz(__uint8_t)), 0, NULL,
-+	{ FLDT_UINT8O, "uint8o", fp_num, "%#o", SI(bitsz(uint8_t)), 0, NULL,
- 	  NULL },
--	{ FLDT_UINT8X, "uint8x", fp_num, "%#x", SI(bitsz(__uint8_t)), 0, NULL,
-+	{ FLDT_UINT8X, "uint8x", fp_num, "%#x", SI(bitsz(uint8_t)), 0, NULL,
- 	  NULL },
- 	{ FLDT_UUID, "uuid", fp_uuid, NULL, SI(bitsz(uuid_t)), 0, NULL, NULL },
- 	{ FLDT_ZZZ, NULL }
-diff --git a/db/fprint.c b/db/fprint.c
-index fd7e7f45..261a31ef 100644
---- a/db/fprint.c
-+++ b/db/fprint.c
-@@ -80,7 +80,7 @@ fp_num(
- 	int		bitpos;
- 	int		i;
- 	int		isnull;
--	__int64_t	val;
-+	int64_t		val;
- 
- 	for (i = 0, bitpos = bit;
- 	     i < count && !seenint();
-@@ -100,7 +100,7 @@ fp_num(
- 		else if (size > 32)
- 			dbprintf(fmtstr, val);
- 		else
--			dbprintf(fmtstr, (__int32_t)val);
-+			dbprintf(fmtstr, (int32_t)val);
- 		if (i < count - 1)
- 			dbprintf(" ");
- 	}
-@@ -203,7 +203,7 @@ fp_crc(
- {
- 	int		bitpos;
- 	int		i;
--	__int64_t	val;
-+	int64_t		val;
- 	char		*ok;
- 
- 	switch (iocur_crc_valid()) {
-@@ -230,7 +230,7 @@ fp_crc(
- 		if (size > 32)
- 			dbprintf(fmtstr, val, ok);
- 		else
--			dbprintf(fmtstr, (__int32_t)val, ok);
-+			dbprintf(fmtstr, (int32_t)val, ok);
- 		if (i < count - 1)
- 			dbprintf(" ");
- 	}
-diff --git a/db/frag.c b/db/frag.c
-index 8005e45d..d224f0c2 100644
---- a/db/frag.c
-+++ b/db/frag.c
-@@ -42,8 +42,8 @@ typedef	struct extmap {
- 
- static int		aflag;
- static int		dflag;
--static __uint64_t	extcount_actual;
--static __uint64_t	extcount_ideal;
-+static uint64_t	extcount_actual;
-+static uint64_t	extcount_ideal;
- static int		fflag;
- static int		lflag;
- static int		qflag;
-@@ -310,8 +310,8 @@ process_inode(
- 	xfs_agino_t		agino,
- 	xfs_dinode_t		*dip)
- {
--	__uint64_t		actual;
--	__uint64_t		ideal;
-+	uint64_t		actual;
-+	uint64_t		ideal;
- 	xfs_ino_t		ino;
- 	int			skipa;
- 	int			skipd;
-diff --git a/db/inode.c b/db/inode.c
-index 8b7a41e4..6cc47d6a 100644
---- a/db/inode.c
-+++ b/db/inode.c
-@@ -119,49 +119,49 @@ const field_t	inode_core_flds[] = {
- 	{ "dmstate", FLDT_UINT16D, OI(COFF(dmstate)), C1, 0, TYP_NONE },
- 	{ "flags", FLDT_UINT16X, OI(COFF(flags)), C1, FLD_SKIPALL, TYP_NONE },
- 	{ "newrtbm", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NEWRTBM_BIT - 1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NEWRTBM_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "prealloc", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_PREALLOC_BIT - 1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_PREALLOC_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "realtime", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_REALTIME_BIT - 1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_REALTIME_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "immutable", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_IMMUTABLE_BIT-1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_IMMUTABLE_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "append", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_APPEND_BIT - 1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_APPEND_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "sync", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_SYNC_BIT - 1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_SYNC_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "noatime", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NOATIME_BIT - 1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NOATIME_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "nodump", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NODUMP_BIT - 1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NODUMP_BIT - 1), C1,
- 	  0, TYP_NONE },
- 	{ "rtinherit", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_RTINHERIT_BIT-1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_RTINHERIT_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "projinherit", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_PROJINHERIT_BIT-1),C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_PROJINHERIT_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "nosymlinks", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NOSYMLINKS_BIT-1), C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NOSYMLINKS_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "extsz", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_EXTSIZE_BIT-1),C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_EXTSIZE_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "extszinherit", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_EXTSZINHERIT_BIT-1),C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_EXTSZINHERIT_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "nodefrag", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NODEFRAG_BIT-1),C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_NODEFRAG_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "filestream", FLDT_UINT1,
--	  OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_FILESTREAM_BIT-1),C1,
-+	  OI(COFF(flags) + bitsz(uint16_t) - XFS_DIFLAG_FILESTREAM_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "gen", FLDT_UINT32D, OI(COFF(gen)), C1, 0, TYP_NONE },
- 	{ NULL }
-@@ -177,10 +177,10 @@ const field_t	inode_v3_flds[] = {
- 	{ "inumber", FLDT_INO, OI(COFF(ino)), C1, 0, TYP_NONE },
- 	{ "uuid", FLDT_UUID, OI(COFF(uuid)), C1, 0, TYP_NONE },
- 	{ "reflink", FLDT_UINT1,
--	  OI(COFF(flags2) + bitsz(__uint64_t) - XFS_DIFLAG2_REFLINK_BIT-1), C1,
-+	  OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_REFLINK_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ "cowextsz", FLDT_UINT1,
--	  OI(COFF(flags2) + bitsz(__uint64_t) - XFS_DIFLAG2_COWEXTSIZE_BIT-1), C1,
-+	  OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_COWEXTSIZE_BIT-1), C1,
- 	  0, TYP_NONE },
- 	{ NULL }
- };
-diff --git a/db/io.c b/db/io.c
-index 1f27f6b3..fd9b9f4b 100644
---- a/db/io.c
-+++ b/db/io.c
-@@ -545,7 +545,7 @@ set_cur(
- 	struct xfs_buf	*bp;
- 	xfs_ino_t	dirino;
- 	xfs_ino_t	ino;
--	__uint16_t	mode;
-+	uint16_t	mode;
- 	const struct xfs_buf_ops *ops = type ? type->bops : NULL;
- 
- 	if (iocur_sp < 0) {
-diff --git a/db/io.h b/db/io.h
-index 99730048..df0fdd75 100644
---- a/db/io.h
-+++ b/db/io.h
-@@ -25,7 +25,7 @@ typedef struct bbmap {
- } bbmap_t;
- 
- typedef struct iocur {
--	__int64_t		bb;	/* BB number in filesystem of buf */
-+	int64_t			bb;	/* BB number in filesystem of buf */
- 	int			blen;	/* length of "buf", bb's */
- 	int			boff;	/* data - buf */
- 	void			*buf;	/* base address of buffer */
-@@ -33,7 +33,7 @@ typedef struct iocur {
- 	xfs_ino_t		dirino;	/* current directory inode number */
- 	xfs_ino_t		ino;	/* current inode number */
- 	int			len;	/* length of "data", bytes */
--	__uint16_t		mode;	/* current inode's mode */
-+	uint16_t		mode;	/* current inode's mode */
- 	xfs_off_t		off;	/* fs offset of "data" in bytes */
- 	const struct typ	*typ;	/* type of "data" */
- 	bbmap_t			*bbmap;	/* map daddr if fragmented */
-@@ -57,7 +57,7 @@ extern void	off_cur(int off, int len);
- extern void	pop_cur(void);
- extern void	print_iocur(char *tag, iocur_t *ioc);
- extern void	push_cur(void);
--extern int	read_buf(__int64_t daddr, int count, void *bufp);
-+extern int	read_buf(int64_t daddr, int count, void *bufp);
- extern void     write_cur(void);
- extern void	set_cur(const struct typ *type, xfs_daddr_t blknum,
- 			int len, int ring_add, bbmap_t *bbmap);
-diff --git a/db/metadump.c b/db/metadump.c
-index 31bb5959..67bdf14e 100644
---- a/db/metadump.c
-+++ b/db/metadump.c
-@@ -175,7 +175,7 @@ write_index(void)
- static int
- write_buf_segment(
- 	char		*data,
--	__int64_t	off,
-+	int64_t		off,
- 	int		len)
- {
- 	int		i;
-@@ -1256,7 +1256,7 @@ process_sf_dir(
- {
- 	struct xfs_dir2_sf_hdr	*sfp;
- 	xfs_dir2_sf_entry_t	*sfep;
--	__uint64_t		ino_dir_size;
-+	uint64_t		ino_dir_size;
- 	int			i;
- 
- 	sfp = (struct xfs_dir2_sf_hdr *)XFS_DFORK_DPTR(dip);
-@@ -1322,7 +1322,7 @@ process_sf_dir(
- static void
- obfuscate_path_components(
- 	char			*buf,
--	__uint64_t		len)
-+	uint64_t		len)
- {
- 	unsigned char		*comp = (unsigned char *)buf;
- 	unsigned char		*end = comp + len;
-@@ -1359,7 +1359,7 @@ static void
- process_sf_symlink(
- 	xfs_dinode_t		*dip)
- {
--	__uint64_t		len;
-+	uint64_t		len;
- 	char			*buf;
- 
- 	len = be64_to_cpu(dip->di_size);
-@@ -1631,7 +1631,7 @@ process_attr_block(
- 	xfs_attr_leaf_entry_t 		*entry;
- 	xfs_attr_leaf_name_local_t 	*local;
- 	xfs_attr_leaf_name_remote_t 	*remote;
--	__uint32_t			bs = mp->m_sb.sb_blocksize;
-+	uint32_t			bs = mp->m_sb.sb_blocksize;
- 	char				*first_name;
- 
- 
-@@ -2270,7 +2270,7 @@ done:
- 	return success;
- }
- 
--static __uint32_t	inodes_copied = 0;
-+static uint32_t	inodes_copied;
- 
- static int
- copy_inode_chunk(
-diff --git a/db/sb.c b/db/sb.c
-index 8e7722cd..f19248d7 100644
---- a/db/sb.c
-+++ b/db/sb.c
-@@ -606,7 +606,7 @@ version_help(void)
- }
- 
- static int
--do_version(xfs_agnumber_t agno, __uint16_t version, __uint32_t features)
-+do_version(xfs_agnumber_t agno, uint16_t version, uint32_t features)
- {
- 	xfs_sb_t	tsb;
- 
-@@ -710,8 +710,8 @@ version_f(
- 	int		argc,
- 	char		**argv)
- {
--	__uint16_t	version = 0;
--	__uint32_t	features = 0;
-+	uint16_t	version = 0;
-+	uint32_t	features = 0;
- 	xfs_agnumber_t	ag;
- 
- 	if (argc == 2) {	/* WRITE VERSION */
-diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
-index 517b75f0..d4846a32 100644
---- a/fsr/xfs_fsr.c
-+++ b/fsr/xfs_fsr.c
-@@ -54,7 +54,7 @@ struct getbmap  *outmap = NULL;
- int             outmap_size = 0;
- int		RealUid;
- int		tmp_agi;
--static __int64_t	minimumfree = 2048;
-+static int64_t		minimumfree = 2048;
- 
- #define MNTTYPE_XFS             "xfs"
- 
-diff --git a/include/darwin.h b/include/darwin.h
-index 7bbd5764..51031c42 100644
---- a/include/darwin.h
-+++ b/include/darwin.h
-@@ -125,15 +125,15 @@ typedef signed int		__s32;
- typedef unsigned long long int	__u64;
- typedef signed long long int	__s64;
- 
--#define __int8_t	int8_t
--#define __int16_t	int16_t
--#define __int32_t	int32_t
--#define __int32_t	int32_t
--#define __int64_t	int64_t
--#define __uint8_t	u_int8_t
--#define __uint16_t	u_int16_t
--#define __uint32_t	u_int32_t
--#define __uint64_t	u_int64_t
-+#define int8_t		int8_t
-+#define int16_t		int16_t
-+#define int32_t		int32_t
-+#define int32_t		int32_t
-+#define int64_t		int64_t
-+#define uint8_t		u_int8_t
-+#define uint16_t	u_int16_t
-+#define uint32_t	u_int32_t
-+#define uint64_t	u_int64_t
- 
- typedef off_t		xfs_off_t;
- typedef u_int64_t	xfs_ino_t;
-diff --git a/include/freebsd.h b/include/freebsd.h
-index fb318b89..f52ed0a9 100644
---- a/include/freebsd.h
-+++ b/include/freebsd.h
-@@ -50,9 +50,9 @@ typedef unsigned long long int	__u64;
- typedef signed long long int	__s64;
- 
- typedef off_t		xfs_off_t;
--typedef __uint64_t	xfs_ino_t;
--typedef __uint32_t	xfs_dev_t;
--typedef __int64_t	xfs_daddr_t;
-+typedef uint64_t	xfs_ino_t;
-+typedef uint32_t	xfs_dev_t;
-+typedef int64_t		xfs_daddr_t;
- typedef __u32		xfs_nlink_t;
- 
- #define	O_LARGEFILE	0
-diff --git a/include/gnukfreebsd.h b/include/gnukfreebsd.h
-index 6916e65a..1db3f4f0 100644
---- a/include/gnukfreebsd.h
-+++ b/include/gnukfreebsd.h
-@@ -46,9 +46,9 @@ typedef unsigned long long int	__u64;
- typedef signed long long int	__s64;
- 
- typedef off_t		xfs_off_t;
--typedef __uint64_t	xfs_ino_t;
--typedef __uint32_t	xfs_dev_t;
--typedef __int64_t	xfs_daddr_t;
-+typedef uint64_t	xfs_ino_t;
-+typedef uint32_t	xfs_dev_t;
-+typedef int64_t		xfs_daddr_t;
- typedef __u32		xfs_nlink_t;
- 
- #define HAVE_FID	1
-diff --git a/include/libxcmd.h b/include/libxcmd.h
-index e8d2ffc8..6806380c 100644
---- a/include/libxcmd.h
-+++ b/include/libxcmd.h
-@@ -42,10 +42,10 @@ get_topology(
- extern void
- calc_default_ag_geometry(
- 	int		blocklog,
--	__uint64_t	dblocks,
-+	uint64_t	dblocks,
- 	int		multidisk,
--	__uint64_t	*agsize,
--	__uint64_t	*agcount);
-+	uint64_t	*agsize,
-+	uint64_t	*agcount);
- 
- extern int
- check_overwrite(
-diff --git a/include/linux.h b/include/linux.h
-index 9611a37f..6ce344c5 100644
---- a/include/linux.h
-+++ b/include/linux.h
-@@ -132,7 +132,7 @@ static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src)
- static __inline__ int
- platform_discard_blocks(int fd, uint64_t start, uint64_t len)
- {
--	__uint64_t range[2] = { start, len };
-+	uint64_t range[2] = { start, len };
- 
- 	if (ioctl(fd, BLKDISCARD, &range) < 0)
- 		return errno;
-@@ -144,9 +144,9 @@ platform_discard_blocks(int fd, uint64_t start, uint64_t len)
- #define EFSBADCRC	EBADMSG	/* Bad CRC detected */
- 
- typedef off_t		xfs_off_t;
--typedef __uint64_t	xfs_ino_t;
--typedef __uint32_t	xfs_dev_t;
--typedef __int64_t	xfs_daddr_t;
-+typedef uint64_t	xfs_ino_t;
-+typedef uint32_t	xfs_dev_t;
-+typedef int64_t		xfs_daddr_t;
- typedef __u32		xfs_nlink_t;
- 
- /**
-diff --git a/include/xfs_arch.h b/include/xfs_arch.h
-index 12cd43e6..186cadba 100644
---- a/include/xfs_arch.h
-+++ b/include/xfs_arch.h
-@@ -244,39 +244,39 @@ static inline void be64_add_cpu(__be64 *a, __s64 b)
- 	*a = cpu_to_be64(be64_to_cpu(*a) + b);
- }
- 
--static inline __uint16_t get_unaligned_be16(void *p)
-+static inline uint16_t get_unaligned_be16(void *p)
- {
--	__uint8_t *__p = p;
-+	uint8_t *__p = p;
- 	return __p[0] << 8 | __p[1];
- }
- 
--static inline __uint32_t get_unaligned_be32(void *p)
-+static inline uint32_t get_unaligned_be32(void *p)
- {
--	__uint8_t *__p = p;
-+	uint8_t *__p = p;
-         return __p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3];
- }
- 
--static inline __uint64_t get_unaligned_be64(void *p)
-+static inline uint64_t get_unaligned_be64(void *p)
- {
--	return (__uint64_t)get_unaligned_be32(p) << 32 |
-+	return (uint64_t)get_unaligned_be32(p) << 32 |
- 			   get_unaligned_be32(p + 4);
- }
- 
--static inline void put_unaligned_be16(__uint16_t val, void *p)
-+static inline void put_unaligned_be16(uint16_t val, void *p)
- {
--	__uint8_t *__p = p;
-+	uint8_t *__p = p;
- 	*__p++ = val >> 8;
- 	*__p++ = val;
- }
- 
--static inline void put_unaligned_be32(__uint32_t val, void *p)
-+static inline void put_unaligned_be32(uint32_t val, void *p)
- {
--	__uint8_t *__p = p;
-+	uint8_t *__p = p;
- 	put_unaligned_be16(val >> 16, __p);
- 	put_unaligned_be16(val, __p + 2);
- }
- 
--static inline void put_unaligned_be64(__uint64_t val, void *p)
-+static inline void put_unaligned_be64(uint64_t val, void *p)
- {
- 	put_unaligned_be32(val >> 32, p);
- 	put_unaligned_be32(val, p + 4);
-diff --git a/include/xfs_inode.h b/include/xfs_inode.h
-index fb6b5429..8766024e 100644
---- a/include/xfs_inode.h
-+++ b/include/xfs_inode.h
-@@ -123,8 +123,8 @@ xfs_get_projid(struct xfs_icdinode *id)
- static inline void
- xfs_set_projid(struct xfs_icdinode *id, prid_t projid)
- {
--	id->di_projid_hi = (__uint16_t) (projid >> 16);
--	id->di_projid_lo = (__uint16_t) (projid & 0xffff);
-+	id->di_projid_hi = (uint16_t) (projid >> 16);
-+	id->di_projid_lo = (uint16_t) (projid & 0xffff);
- }
- 
- static inline bool xfs_is_reflink_inode(struct xfs_inode *ip)
-diff --git a/include/xfs_log_recover.h b/include/xfs_log_recover.h
-index 7582676b..0d098628 100644
---- a/include/xfs_log_recover.h
-+++ b/include/xfs_log_recover.h
-@@ -26,7 +26,7 @@
- #define XLOG_RHASH_SIZE	16
- #define XLOG_RHASH_SHIFT 2
- #define XLOG_RHASH(tid)	\
--	((((__uint32_t)tid)>>XLOG_RHASH_SHIFT) & (XLOG_RHASH_SIZE-1))
-+	((((uint32_t)tid)>>XLOG_RHASH_SHIFT) & (XLOG_RHASH_SIZE-1))
- 
- #define XLOG_MAX_REGIONS_IN_ITEM   (XFS_MAX_BLOCKSIZE / XFS_BLF_CHUNK / 2 + 1)
- 
-diff --git a/include/xfs_metadump.h b/include/xfs_metadump.h
-index 7f3039eb..13afb8dd 100644
---- a/include/xfs_metadump.h
-+++ b/include/xfs_metadump.h
-@@ -24,8 +24,8 @@
- typedef struct xfs_metablock {
- 	__be32		mb_magic;
- 	__be16		mb_count;
--	__uint8_t	mb_blocklog;
--	__uint8_t	mb_info;
-+	uint8_t		mb_blocklog;
-+	uint8_t		mb_info;
- 	/* followed by an array of xfs_daddr_t */
- } xfs_metablock_t;
- 
-diff --git a/include/xfs_mount.h b/include/xfs_mount.h
-index 5ff24ebf..5b323bb1 100644
---- a/include/xfs_mount.h
-+++ b/include/xfs_mount.h
-@@ -48,12 +48,12 @@ typedef struct xfs_mount {
- #define m_dev		m_ddev_targp
- #define m_logdev	m_logdev_targp
- #define m_rtdev		m_rtdev_targp
--	__uint8_t		m_dircook_elog;	/* log d-cookie entry bits */
--	__uint8_t		m_blkbit_log;	/* blocklog + NBBY */
--	__uint8_t		m_blkbb_log;	/* blocklog - BBSHIFT */
--	__uint8_t		m_sectbb_log;	/* sectorlog - BBSHIFT */
--	__uint8_t		m_agno_log;	/* log #ag's */
--	__uint8_t		m_agino_log;	/* #bits for agino in inum */
-+	uint8_t			m_dircook_elog;	/* log d-cookie entry bits */
-+	uint8_t			m_blkbit_log;	/* blocklog + NBBY */
-+	uint8_t			m_blkbb_log;	/* blocklog - BBSHIFT */
-+	uint8_t			m_sectbb_log;	/* sectorlog - BBSHIFT */
-+	uint8_t			m_agno_log;	/* log #ag's */
-+	uint8_t			m_agino_log;	/* #bits for agino in inum */
- 	uint			m_inode_cluster_size;/* min inode buf size */
- 	uint			m_blockmask;	/* sb_blocksize-1 */
- 	uint			m_blockwsize;	/* sb_blocksize in words */
-@@ -88,7 +88,7 @@ typedef struct xfs_mount {
- 	int			m_litino;	/* size of inode union area */
- 	int			m_inoalign_mask;/* mask sb_inoalignmt if used */
- 	struct xfs_trans_resv	m_resv;		/* precomputed res values */
--	__uint64_t		m_maxicount;	/* maximum inode count */
-+	uint64_t		m_maxicount;	/* maximum inode count */
- 	int			m_dalign;	/* stripe unit */
- 	int			m_swidth;	/* stripe width */
- 	int			m_sinoalign;	/* stripe unit inode alignmnt */
-@@ -144,12 +144,12 @@ typedef struct xfs_perag {
- 	char		pagi_init;	/* this agi's entry is initialized */
- 	char		pagf_metadata;	/* the agf is preferred to be metadata */
- 	char		pagi_inodeok;	/* The agi is ok for inodes */
--	__uint8_t	pagf_levels[XFS_BTNUM_AGF];
-+	uint8_t		pagf_levels[XFS_BTNUM_AGF];
- 					/* # of levels in bno & cnt btree */
--	__uint32_t	pagf_flcount;	/* count of blocks in freelist */
-+	uint32_t	pagf_flcount;	/* count of blocks in freelist */
- 	xfs_extlen_t	pagf_freeblks;	/* total free blocks */
- 	xfs_extlen_t	pagf_longest;	/* longest free space */
--	__uint32_t	pagf_btreeblks;	/* # of blocks held in AGF btrees */
-+	uint32_t	pagf_btreeblks;	/* # of blocks held in AGF btrees */
- 	xfs_agino_t	pagi_freecount;	/* number of free inodes */
- 	xfs_agino_t	pagi_count;	/* number of allocated inodes */
- 
-@@ -169,7 +169,7 @@ typedef struct xfs_perag {
- 	struct xfs_ag_resv	pag_agfl_resv;
- 
- 	/* reference count */
--	__uint8_t	pagf_refcount_level;
-+	uint8_t		pagf_refcount_level;
- } xfs_perag_t;
- 
- static inline struct xfs_ag_resv *
-diff --git a/libhandle/handle.c b/libhandle/handle.c
-index 236ed22a..00127b3c 100644
---- a/libhandle/handle.c
-+++ b/libhandle/handle.c
-@@ -232,7 +232,7 @@ obj_to_handle(
- {
- 	char		hbuf [MAXHANSIZ];
- 	int		ret;
--	__uint32_t	handlen;
-+	uint32_t	handlen;
- 	xfs_fsop_handlereq_t hreq;
- 
- 	if (opcode == XFS_IOC_FD_TO_HANDLE) {
-diff --git a/libhandle/jdm.c b/libhandle/jdm.c
-index e52f5d83..821061b4 100644
---- a/libhandle/jdm.c
-+++ b/libhandle/jdm.c
-@@ -36,7 +36,7 @@ typedef struct filehandle {
- 	fshandle_t fh_fshandle;		/* handle of fs containing this inode */
- 	int16_t fh_sz_following;	/* bytes in handle after this member */
- 	char fh_pad[FILEHANDLE_SZ_PAD];	/* padding, must be zeroed */
--	__uint32_t fh_gen;		/* generation count */
-+	uint32_t fh_gen;		/* generation count */
- 	xfs_ino_t fh_ino;		/* 64 bit ino */
- } filehandle_t;
- 
-diff --git a/libxcmd/topology.c b/libxcmd/topology.c
-index 8b0276a7..f66dd1bc 100644
---- a/libxcmd/topology.c
-+++ b/libxcmd/topology.c
-@@ -23,19 +23,19 @@
- #endif /* ENABLE_BLKID */
- #include "xfs_multidisk.h"
- 
--#define TERABYTES(count, blog)	((__uint64_t)(count) << (40 - (blog)))
--#define GIGABYTES(count, blog)	((__uint64_t)(count) << (30 - (blog)))
--#define MEGABYTES(count, blog)	((__uint64_t)(count) << (20 - (blog)))
-+#define TERABYTES(count, blog)	((uint64_t)(count) << (40 - (blog)))
-+#define GIGABYTES(count, blog)	((uint64_t)(count) << (30 - (blog)))
-+#define MEGABYTES(count, blog)	((uint64_t)(count) << (20 - (blog)))
- 
- void
- calc_default_ag_geometry(
- 	int		blocklog,
--	__uint64_t	dblocks,
-+	uint64_t	dblocks,
- 	int		multidisk,
--	__uint64_t	*agsize,
--	__uint64_t	*agcount)
-+	uint64_t	*agsize,
-+	uint64_t	*agcount)
- {
--	__uint64_t	blocks = 0;
-+	uint64_t	blocks = 0;
- 	int		shift = 0;
- 
- 	/*
-diff --git a/libxfs/darwin.c b/libxfs/darwin.c
-index 74507e81..16d2c35c 100644
---- a/libxfs/darwin.c
-+++ b/libxfs/darwin.c
-@@ -68,7 +68,7 @@ platform_flush_device(int fd, dev_t device)
- void
- platform_findsizes(char *path, int fd, long long *sz, int *bsz)
- {
--	__uint64_t	size;
-+	uint64_t	size;
- 	struct stat	st;
- 
- 	if (fstat(fd, &st) < 0) {
-diff --git a/libxfs/freebsd.c b/libxfs/freebsd.c
-index 4667d1f5..d7bca142 100644
---- a/libxfs/freebsd.c
-+++ b/libxfs/freebsd.c
-@@ -109,7 +109,7 @@ void
- platform_findsizes(char *path, int fd, long long *sz, int *bsz)
- {
- 	struct stat	st;
--	__int64_t	size;
-+	int64_t		size;
- 	u_int		ssize;
- 
- 	if (fstat(fd, &st) < 0) {
-diff --git a/libxfs/init.c b/libxfs/init.c
-index fc14c5e4..0f41a853 100644
---- a/libxfs/init.c
-+++ b/libxfs/init.c
-@@ -546,7 +546,7 @@ libxfs_initialize_perag(
- 		 * the max inode percentage.
- 		 */
- 		if (mp->m_maxicount) {
--			__uint64_t	icount;
-+			uint64_t	icount;
- 
- 			icount = sbp->sb_dblocks * sbp->sb_imax_pct;
- 			do_div(icount, 100);
-diff --git a/libxfs/irix.c b/libxfs/irix.c
-index 32fcb3e5..0f14aec7 100644
---- a/libxfs/irix.c
-+++ b/libxfs/irix.c
-@@ -22,7 +22,7 @@
- 
- int platform_has_uuid = 0;
- extern char *progname;
--extern __int64_t findsize(char *);
-+extern int64_t findsize(char *);
- 
- int
- platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
-diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
-index b4f766db..d525b667 100644
---- a/libxfs/libxfs_priv.h
-+++ b/libxfs/libxfs_priv.h
-@@ -296,8 +296,8 @@ roundup_pow_of_two(uint v)
- 	return 0;
- }
- 
--static inline __uint64_t
--roundup_64(__uint64_t x, __uint32_t y)
-+static inline uint64_t
-+roundup_64(uint64_t x, uint32_t y)
- {
- 	x += y - 1;
- 	do_div(x, y);
-diff --git a/libxfs/linux.c b/libxfs/linux.c
-index 69f04ad9..0bace3eb 100644
---- a/libxfs/linux.c
-+++ b/libxfs/linux.c
-@@ -163,7 +163,7 @@ void
- platform_findsizes(char *path, int fd, long long *sz, int *bsz)
- {
- 	struct stat	st;
--	__uint64_t	size;
-+	uint64_t	size;
- 	int		error;
- 
- 	if (fstat(fd, &st) < 0) {
-diff --git a/libxfs/logitem.c b/libxfs/logitem.c
-index 7e93f609..466b4421 100644
---- a/libxfs/logitem.c
-+++ b/libxfs/logitem.c
-@@ -121,7 +121,7 @@ xfs_buf_item_init(
- 	bip->bli_item.li_mountp = mp;
- 	bip->bli_buf = bp;
- 	bip->bli_format.blf_type = XFS_LI_BUF;
--	bip->bli_format.blf_blkno = (__int64_t)XFS_BUF_ADDR(bp);
-+	bip->bli_format.blf_blkno = (int64_t)XFS_BUF_ADDR(bp);
- 	bip->bli_format.blf_len = (unsigned short)BTOBB(XFS_BUF_COUNT(bp));
- 	XFS_BUF_SET_FSPRIVATE(bp, bip);
- }
-diff --git a/libxfs/radix-tree.c b/libxfs/radix-tree.c
-index eef9c36d..3f0257fe 100644
---- a/libxfs/radix-tree.c
-+++ b/libxfs/radix-tree.c
-@@ -66,21 +66,21 @@ static unsigned long height_to_maxindex[RADIX_TREE_MAX_PATH];
- static inline void tag_set(struct radix_tree_node *node, unsigned int tag,
- 		int offset)
- {
--	*((__uint32_t *)node->tags[tag] + (offset >> 5)) |= (1 << (offset & 31));
-+	*((uint32_t *)node->tags[tag] + (offset >> 5)) |= (1 << (offset & 31));
- }
- 
- static inline void tag_clear(struct radix_tree_node *node, unsigned int tag,
- 		int offset)
- {
--	__uint32_t 	*p = (__uint32_t*)node->tags[tag] + (offset >> 5);
--	__uint32_t 	m = 1 << (offset & 31);
-+	uint32_t 	*p = (uint32_t*)node->tags[tag] + (offset >> 5);
-+	uint32_t 	m = 1 << (offset & 31);
- 	*p &= ~m;
- }
- 
- static inline int tag_get(struct radix_tree_node *node, unsigned int tag,
- 		int offset)
- {
--	return 1 & (((const __uint32_t *)node->tags[tag])[offset >> 5] >> (offset & 31));
-+	return 1 & (((const uint32_t *)node->tags[tag])[offset >> 5] >> (offset & 31));
- }
- 
- /*
-diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
-index 21c42f14..474e5ebc 100644
---- a/libxfs/rdwr.c
-+++ b/libxfs/rdwr.c
-@@ -118,9 +118,9 @@ static void unmount_record(void *p)
- 	xlog_op_header_t	*op = (xlog_op_header_t *)p;
- 	/* the data section must be 32 bit size aligned */
- 	struct {
--	    __uint16_t magic;
--	    __uint16_t pad1;
--	    __uint32_t pad2; /* may as well make it 64 bits */
-+	    uint16_t magic;
-+	    uint16_t pad1;
-+	    uint32_t pad2; /* may as well make it 64 bits */
- 	} magic = { XLOG_UNMOUNT_TYPE, 0, 0 };
- 
- 	memset(p, 0, BBSIZE);
-diff --git a/libxfs/util.c b/libxfs/util.c
-index dcfca397..7938e317 100644
---- a/libxfs/util.c
-+++ b/libxfs/util.c
-@@ -170,8 +170,8 @@ libxfs_trans_ichgtime(
- 	if (flags & XFS_ICHGTIME_CHG)
- 		VFS_I(ip)->i_ctime = tv;
- 	if (flags & XFS_ICHGTIME_CREATE) {
--		ip->i_d.di_crtime.t_sec = (__int32_t)tv.tv_sec;
--		ip->i_d.di_crtime.t_nsec = (__int32_t)tv.tv_nsec;
-+		ip->i_d.di_crtime.t_sec = (int32_t)tv.tv_sec;
-+		ip->i_d.di_crtime.t_nsec = (int32_t)tv.tv_nsec;
- 	}
- }
- 
-@@ -261,8 +261,8 @@ libxfs_ialloc(
- 		ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_meta_uuid));
- 		VFS_I(ip)->i_version = 1;
- 		ip->i_d.di_flags2 = 0;
--		ip->i_d.di_crtime.t_sec = (__int32_t)VFS_I(ip)->i_mtime.tv_sec;
--		ip->i_d.di_crtime.t_nsec = (__int32_t)VFS_I(ip)->i_mtime.tv_nsec;
-+		ip->i_d.di_crtime.t_sec = (int32_t)VFS_I(ip)->i_mtime.tv_sec;
-+		ip->i_d.di_crtime.t_nsec = (int32_t)VFS_I(ip)->i_mtime.tv_nsec;
- 	}
- 
- 	flags = XFS_ILOG_CORE;
-diff --git a/logprint/log_misc.c b/logprint/log_misc.c
-index 0dfcfd19..2fd01ceb 100644
---- a/logprint/log_misc.c
-+++ b/logprint/log_misc.c
-@@ -166,12 +166,12 @@ xlog_print_trans_header(char **ptr, int len)
- {
-     xfs_trans_header_t  *h;
-     char		*cptr = *ptr;
--    __uint32_t          magic;
-+    uint32_t          magic;
-     char                *magic_c = (char *)&magic;
- 
-     *ptr += len;
- 
--    magic=*(__uint32_t*)cptr; /* XXX be32_to_cpu soon */
-+    magic = *(uint32_t *)cptr; /* XXX be32_to_cpu soon */
- 
-     if (len >= 4) {
- #if __BYTE_ORDER == __LITTLE_ENDIAN
-@@ -201,7 +201,7 @@ xlog_print_trans_buffer(char **ptr, int len, int *i, int num_ops)
-     int			 num, skip;
-     int			 super_block = 0;
-     int			 bucket, col, buckets;
--    __int64_t		 blkno;
-+    int64_t			 blkno;
-     xfs_buf_log_format_t lbuf;
-     int			 size, blen, map_size, struct_size;
-     __be64		 x, y;
-diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
-index 9d1b4e80..c49c13aa 100644
---- a/mdrestore/xfs_mdrestore.c
-+++ b/mdrestore/xfs_mdrestore.c
-@@ -66,7 +66,7 @@ perform_restore(
- 	int			mb_count;
- 	xfs_metablock_t		tmb;
- 	xfs_sb_t		sb;
--	__int64_t		bytes_read;
-+	int64_t			bytes_read;
- 
- 	/*
- 	 * read in first blocks (superblock 0), set "inprogress" flag for it,
-diff --git a/mkfs/proto.c b/mkfs/proto.c
-index 89cd2379..cf8cc391 100644
---- a/mkfs/proto.c
-+++ b/mkfs/proto.c
-@@ -667,7 +667,7 @@ rtinit(
- 	mp->m_sb.sb_rbmino = rbmip->i_ino;
- 	rbmip->i_d.di_size = mp->m_sb.sb_rbmblocks * mp->m_sb.sb_blocksize;
- 	rbmip->i_d.di_flags = XFS_DIFLAG_NEWRTBM;
--	*(__uint64_t *)&VFS_I(rbmip)->i_atime = 0;
-+	*(uint64_t *)&VFS_I(rbmip)->i_atime = 0;
- 	libxfs_trans_log_inode(tp, rbmip, XFS_ILOG_CORE);
- 	libxfs_log_sb(tp);
- 	mp->m_rbmip = rbmip;
-diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
-index b5c3a57e..7bb6408f 100644
---- a/mkfs/xfs_mkfs.c
-+++ b/mkfs/xfs_mkfs.c
-@@ -705,9 +705,9 @@ struct opt_params mopts = {
- 	},
- };
- 
--#define TERABYTES(count, blog)	((__uint64_t)(count) << (40 - (blog)))
--#define GIGABYTES(count, blog)	((__uint64_t)(count) << (30 - (blog)))
--#define MEGABYTES(count, blog)	((__uint64_t)(count) << (20 - (blog)))
-+#define TERABYTES(count, blog)	((uint64_t)(count) << (40 - (blog)))
-+#define GIGABYTES(count, blog)	((uint64_t)(count) << (30 - (blog)))
-+#define MEGABYTES(count, blog)	((uint64_t)(count) << (20 - (blog)))
- 
- /*
-  * Use this macro before we have superblock and mount structure
-@@ -878,7 +878,7 @@ fixup_log_stripe_unit(
- 	xfs_rfsblock_t	*logblocks,
- 	int		blocklog)
- {
--	__uint64_t	tmp_logblocks;
-+	uint64_t	tmp_logblocks;
- 
- 	/*
- 	 * Make sure that the log size is a multiple of the stripe unit
-@@ -910,7 +910,7 @@ fixup_internal_log_stripe(
- 	xfs_mount_t	*mp,
- 	int		lsflag,
- 	xfs_fsblock_t	logstart,
--	__uint64_t	agsize,
-+	uint64_t	agsize,
- 	int		sunit,
- 	xfs_rfsblock_t	*logblocks,
- 	int		blocklog,
-@@ -934,7 +934,7 @@ fixup_internal_log_stripe(
- }
- 
- void
--validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
-+validate_log_size(uint64_t logblocks, int blocklog, int min_logblocks)
- {
- 	if (logblocks < min_logblocks) {
- 		fprintf(stderr,
-@@ -959,7 +959,7 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
- static int
- calc_default_imaxpct(
- 	int		blocklog,
--	__uint64_t	dblocks)
-+	uint64_t	dblocks)
- {
- 	/*
- 	 * This returns the % of the disk space that is used for
-@@ -981,9 +981,9 @@ calc_default_imaxpct(
- static void
- validate_ag_geometry(
- 	int		blocklog,
--	__uint64_t	dblocks,
--	__uint64_t	agsize,
--	__uint64_t	agcount)
-+	uint64_t	dblocks,
-+	uint64_t	agsize,
-+	uint64_t	agcount)
- {
- 	if (agsize < XFS_AG_MIN_BLOCKS(blocklog)) {
- 		fprintf(stderr,
-@@ -1059,7 +1059,7 @@ zero_old_xfs_structures(
- {
- 	void 			*buf;
- 	xfs_sb_t 		sb;
--	__uint32_t		bsize;
-+	uint32_t		bsize;
- 	int			i;
- 	xfs_off_t		off;
- 
-@@ -1112,8 +1112,8 @@ zero_old_xfs_structures(
- 			i != sb.sb_blocklog)
- 		goto done;
- 
--	if (sb.sb_dblocks > ((__uint64_t)sb.sb_agcount * sb.sb_agblocks) ||
--			sb.sb_dblocks < ((__uint64_t)(sb.sb_agcount - 1) *
-+	if (sb.sb_dblocks > ((uint64_t)sb.sb_agcount * sb.sb_agblocks) ||
-+			sb.sb_dblocks < ((uint64_t)(sb.sb_agcount - 1) *
- 					 sb.sb_agblocks + XFS_MIN_AG_BLOCKS))
- 		goto done;
- 
-@@ -1133,7 +1133,7 @@ done:
- }
- 
- static void
--discard_blocks(dev_t dev, __uint64_t nsectors)
-+discard_blocks(dev_t dev, uint64_t nsectors)
- {
- 	int fd;
- 
-@@ -1395,11 +1395,11 @@ main(
- 	int			argc,
- 	char			**argv)
- {
--	__uint64_t		agcount;
-+	uint64_t		agcount;
- 	xfs_agf_t		*agf;
- 	xfs_agi_t		*agi;
- 	xfs_agnumber_t		agno;
--	__uint64_t		agsize;
-+	uint64_t		agsize;
- 	xfs_alloc_rec_t		*arec;
- 	struct xfs_btree_block	*block;
- 	int			blflag;
-@@ -1475,10 +1475,10 @@ main(
- 	char			*rtsize;
- 	xfs_sb_t		*sbp;
- 	int			sectorlog;
--	__uint64_t		sector_mask;
-+	uint64_t		sector_mask;
- 	int			slflag;
- 	int			ssflag;
--	__uint64_t		tmp_agsize;
-+	uint64_t		tmp_agsize;
- 	uuid_t			uuid;
- 	int			worst_freelist;
- 	libxfs_init_t		xi;
-@@ -2167,7 +2167,7 @@ _("rmapbt not supported with realtime devices\n"));
- 
- 
- 	if (dsize) {
--		__uint64_t dbytes;
-+		uint64_t dbytes;
- 
- 		dbytes = getnum(dsize, &dopts, D_SIZE);
- 		if (dbytes % XFS_MIN_BLOCKSIZE) {
-@@ -2199,7 +2199,7 @@ _("rmapbt not supported with realtime devices\n"));
- 	}
- 
- 	if (logsize) {
--		__uint64_t logbytes;
-+		uint64_t logbytes;
- 
- 		logbytes = getnum(logsize, &lopts, L_SIZE);
- 		if (logbytes % XFS_MIN_BLOCKSIZE) {
-@@ -2216,7 +2216,7 @@ _("rmapbt not supported with realtime devices\n"));
- 				(long long)(logblocks << blocklog));
- 	}
- 	if (rtsize) {
--		__uint64_t rtbytes;
-+		uint64_t rtbytes;
- 
- 		rtbytes = getnum(rtsize, &ropts, R_SIZE);
- 		if (rtbytes % XFS_MIN_BLOCKSIZE) {
-@@ -2236,7 +2236,7 @@ _("rmapbt not supported with realtime devices\n"));
- 	 * If specified, check rt extent size against its constraints.
- 	 */
- 	if (rtextsize) {
--		__uint64_t rtextbytes;
-+		uint64_t rtextbytes;
- 
- 		rtextbytes = getnum(rtextsize, &ropts, R_EXTSIZE);
- 		if (rtextbytes % blocksize) {
-@@ -2252,8 +2252,8 @@ _("rmapbt not supported with realtime devices\n"));
- 		 * and the underlying volume is striped, then set rtextblocks
- 		 * to the stripe width.
- 		 */
--		__uint64_t	rswidth;
--		__uint64_t	rtextbytes;
-+		uint64_t	rswidth;
-+		uint64_t	rtextbytes;
- 
- 		if (!norsflag && !xi.risfile && !(!rtsize && xi.disfile))
- 			rswidth = ft.rtswidth;
-@@ -2335,10 +2335,10 @@ _("rmapbt not supported with realtime devices\n"));
- 	 * multiple of the sector size, or 1024, whichever is larger.
- 	 */
- 
--	sector_mask = (__uint64_t)-1 << (MAX(sectorlog, 10) - BBSHIFT);
-+	sector_mask = (uint64_t)-1 << (MAX(sectorlog, 10) - BBSHIFT);
- 	xi.dsize &= sector_mask;
- 	xi.rtsize &= sector_mask;
--	xi.logBBsize &= (__uint64_t)-1 << (MAX(lsectorlog, 10) - BBSHIFT);
-+	xi.logBBsize &= (uint64_t)-1 << (MAX(lsectorlog, 10) - BBSHIFT);
- 
- 
- 	/* don't do discards on print-only runs or on files */
-@@ -2696,9 +2696,9 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
- 	mp = &mbuf;
- 	sbp = &mp->m_sb;
- 	memset(mp, 0, sizeof(xfs_mount_t));
--	sbp->sb_blocklog = (__uint8_t)blocklog;
--	sbp->sb_sectlog = (__uint8_t)sectorlog;
--	sbp->sb_agblklog = (__uint8_t)libxfs_log2_roundup((unsigned int)agsize);
-+	sbp->sb_blocklog = (uint8_t)blocklog;
-+	sbp->sb_sectlog = (uint8_t)sectorlog;
-+	sbp->sb_agblklog = (uint8_t)libxfs_log2_roundup((unsigned int)agsize);
- 	sbp->sb_agblocks = (xfs_agblock_t)agsize;
- 	mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT;
- 	mp->m_sectbb_log = sbp->sb_sectlog - BBSHIFT;
-@@ -2805,14 +2805,14 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
- 	sbp->sb_agcount = (xfs_agnumber_t)agcount;
- 	sbp->sb_rbmblocks = nbmblocks;
- 	sbp->sb_logblocks = (xfs_extlen_t)logblocks;
--	sbp->sb_sectsize = (__uint16_t)sectorsize;
--	sbp->sb_inodesize = (__uint16_t)isize;
--	sbp->sb_inopblock = (__uint16_t)(blocksize / isize);
--	sbp->sb_sectlog = (__uint8_t)sectorlog;
--	sbp->sb_inodelog = (__uint8_t)inodelog;
--	sbp->sb_inopblog = (__uint8_t)(blocklog - inodelog);
-+	sbp->sb_sectsize = (uint16_t)sectorsize;
-+	sbp->sb_inodesize = (uint16_t)isize;
-+	sbp->sb_inopblock = (uint16_t)(blocksize / isize);
-+	sbp->sb_sectlog = (uint8_t)sectorlog;
-+	sbp->sb_inodelog = (uint8_t)inodelog;
-+	sbp->sb_inopblog = (uint8_t)(blocklog - inodelog);
- 	sbp->sb_rextslog =
--		(__uint8_t)(rtextents ?
-+		(uint8_t)(rtextents ?
- 			libxfs_highbit32((unsigned int)rtextents) : 0);
- 	sbp->sb_inprogress = 1;	/* mkfs is in progress */
- 	sbp->sb_imax_pct = imaxpct;
-@@ -2840,8 +2840,8 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
- 	} else
- 		sbp->sb_inoalignmt = 0;
- 	if (lsectorsize != BBSIZE || sectorsize != BBSIZE) {
--		sbp->sb_logsectlog = (__uint8_t)lsectorlog;
--		sbp->sb_logsectsize = (__uint16_t)lsectorsize;
-+		sbp->sb_logsectlog = (uint8_t)lsectorlog;
-+		sbp->sb_logsectsize = (uint16_t)lsectorsize;
- 	} else {
- 		sbp->sb_logsectlog = 0;
- 		sbp->sb_logsectsize = 0;
-diff --git a/quota/edit.c b/quota/edit.c
-index 36b327a5..8418e858 100644
---- a/quota/edit.c
-+++ b/quota/edit.c
-@@ -115,16 +115,16 @@ warn_help(void)
- 
- static void
- set_limits(
--	__uint32_t	id,
-+	uint32_t	id,
- 	uint		type,
- 	uint		mask,
- 	char		*dev,
--	__uint64_t	*bsoft,
--	__uint64_t	*bhard,
--	__uint64_t	*isoft,
--	__uint64_t	*ihard,
--	__uint64_t	*rtbsoft,
--	__uint64_t	*rtbhard)
-+	uint64_t	*bsoft,
-+	uint64_t	*bhard,
-+	uint64_t	*isoft,
-+	uint64_t	*ihard,
-+	uint64_t	*rtbsoft,
-+	uint64_t	*rtbhard)
- {
- 	fs_disk_quota_t	d;
- 
-@@ -152,12 +152,12 @@ set_user_limits(
- 	char		*name,
- 	uint		type,
- 	uint		mask,
--	__uint64_t	*bsoft,
--	__uint64_t	*bhard,
--	__uint64_t	*isoft,
--	__uint64_t	*ihard,
--	__uint64_t	*rtbsoft,
--	__uint64_t	*rtbhard)
-+	uint64_t	*bsoft,
-+	uint64_t	*bhard,
-+	uint64_t	*isoft,
-+	uint64_t	*ihard,
-+	uint64_t	*rtbsoft,
-+	uint64_t	*rtbhard)
- {
- 	uid_t		uid = uid_from_string(name);
- 
-@@ -175,12 +175,12 @@ set_group_limits(
- 	char		*name,
- 	uint		type,
- 	uint		mask,
--	__uint64_t	*bsoft,
--	__uint64_t	*bhard,
--	__uint64_t	*isoft,
--	__uint64_t	*ihard,
--	__uint64_t	*rtbsoft,
--	__uint64_t	*rtbhard)
-+	uint64_t	*bsoft,
-+	uint64_t	*bhard,
-+	uint64_t	*isoft,
-+	uint64_t	*ihard,
-+	uint64_t	*rtbsoft,
-+	uint64_t	*rtbhard)
- {
- 	gid_t		gid = gid_from_string(name);
- 
-@@ -198,12 +198,12 @@ set_project_limits(
- 	char		*name,
- 	uint		type,
- 	uint		mask,
--	__uint64_t	*bsoft,
--	__uint64_t	*bhard,
--	__uint64_t	*isoft,
--	__uint64_t	*ihard,
--	__uint64_t	*rtbsoft,
--	__uint64_t	*rtbhard)
-+	uint64_t	*bsoft,
-+	uint64_t	*bhard,
-+	uint64_t	*isoft,
-+	uint64_t	*ihard,
-+	uint64_t	*rtbsoft,
-+	uint64_t	*rtbhard)
- {
- 	prid_t		prid = prid_from_string(name);
- 
-@@ -224,7 +224,7 @@ extractb(
- 	int		length,
- 	uint		blocksize,
- 	uint		sectorsize,
--	__uint64_t	*value)
-+	uint64_t	*value)
- {
- 	long long	v;
- 	char		*s = string;
-@@ -238,7 +238,7 @@ extractb(
- 				progname, s);
- 			return 0;
- 		}
--		*value = (__uint64_t)v >> 9;	/* syscalls use basic blocks */
-+		*value = (uint64_t)v >> 9;	/* syscalls use basic blocks */
- 		if (v > 0 && *value == 0)
- 			fprintf(stderr, _("%s: Warning: `%s' in quota blocks is 0 (unlimited).\n"), progname, s);
- 		return 1;
-@@ -252,7 +252,7 @@ extracti(
- 	char		*string,
- 	const char	*prefix,
- 	int		length,
--	__uint64_t	*value)
-+	uint64_t	*value)
- {
- 	char		*sp, *s = string;
- 
-@@ -270,7 +270,7 @@ limit_f(
- 	char		**argv)
- {
- 	char		*name;
--	__uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
-+	uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
- 	int		c, type = 0, mask = 0, flags = 0;
- 	uint		bsize, ssize, endoptions;
- 
-@@ -384,8 +384,8 @@ restore_file(
- 	char		*dev = NULL;
- 	uint		mask;
- 	int		cnt;
--	__uint32_t	id;
--	__uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
-+	uint32_t	id;
-+	uint64_t	bsoft, bhard, isoft, ihard, rtbsoft, rtbhard;
- 
- 	while (fgets(buffer, sizeof(buffer), fp) != NULL) {
- 		if (strncmp("fs = ", buffer, 5) == 0) {
-@@ -546,7 +546,7 @@ timer_f(
- 
- static void
- set_warnings(
--	__uint32_t	id,
-+	uint32_t	id,
- 	uint		type,
- 	uint		mask,
- 	char		*dev,
-diff --git a/quota/free.c b/quota/free.c
-index cee15ee9..1f8378d2 100644
---- a/quota/free.c
-+++ b/quota/free.c
-@@ -49,20 +49,20 @@ free_help(void)
- static int
- mount_free_space_data(
- 	struct fs_path		*mount,
--	__uint64_t		*bcount,
--	__uint64_t		*bused,
--	__uint64_t		*bfree,
--	__uint64_t		*icount,
--	__uint64_t		*iused,
--	__uint64_t		*ifree,
--	__uint64_t		*rcount,
--	__uint64_t		*rused,
--	__uint64_t		*rfree)
-+	uint64_t		*bcount,
-+	uint64_t		*bused,
-+	uint64_t		*bfree,
-+	uint64_t		*icount,
-+	uint64_t		*iused,
-+	uint64_t		*ifree,
-+	uint64_t		*rcount,
-+	uint64_t		*rused,
-+	uint64_t		*rfree)
- {
- 	struct xfs_fsop_counts	fscounts;
- 	struct xfs_fsop_geom	fsgeo;
- 	struct statfs		st;
--	__uint64_t		logsize, count, free;
-+	uint64_t		logsize, count, free;
- 	int			fd;
- 
- 	if ((fd = open(mount->fs_dir, O_RDONLY)) < 0) {
-@@ -132,15 +132,15 @@ mount_free_space_data(
- static int
- projects_free_space_data(
- 	struct fs_path		*path,
--	__uint64_t		*bcount,
--	__uint64_t		*bused,
--	__uint64_t		*bfree,
--	__uint64_t		*icount,
--	__uint64_t		*iused,
--	__uint64_t		*ifree,
--	__uint64_t		*rcount,
--	__uint64_t		*rused,
--	__uint64_t		*rfree)
-+	uint64_t		*bcount,
-+	uint64_t		*bused,
-+	uint64_t		*bfree,
-+	uint64_t		*icount,
-+	uint64_t		*iused,
-+	uint64_t		*ifree,
-+	uint64_t		*rcount,
-+	uint64_t		*rused,
-+	uint64_t		*rfree)
- {
- 	fs_quota_stat_t		qfs;
- 	fs_disk_quota_t		d;
-@@ -226,9 +226,9 @@ free_space(
- 	fs_path_t	*path,
- 	uint		flags)
- {
--	__uint64_t	bcount, bused, bfree;
--	__uint64_t	icount, iused, ifree;
--	__uint64_t	rcount, rused, rfree;
-+	uint64_t	bcount, bused, bfree;
-+	uint64_t	icount, iused, ifree;
-+	uint64_t	rcount, rused, rfree;
- 	char		a[8], s[8], u[8], p[8];
- 	int		count;
- 
-diff --git a/quota/quot.c b/quota/quot.c
-index ccc154f5..6378fbb7 100644
---- a/quota/quot.c
-+++ b/quota/quot.c
-@@ -26,17 +26,17 @@
- 
- typedef struct du {
- 	struct du	*next;
--	__uint64_t	blocks;
--	__uint64_t	blocks30;
--	__uint64_t	blocks60;
--	__uint64_t	blocks90;
--	__uint64_t	nfiles;
--	__uint32_t	id;
-+	uint64_t	blocks;
-+	uint64_t	blocks30;
-+	uint64_t	blocks60;
-+	uint64_t	blocks90;
-+	uint64_t	nfiles;
-+	uint32_t	id;
- } du_t;
- 
- #define	TSIZE		500
--static __uint64_t	sizes[TSIZE];
--static __uint64_t	overflow;
-+static uint64_t	sizes[TSIZE];
-+static uint64_t	overflow;
- 
- #define	NDU		60000
- #define	DUHASH		8209
-@@ -84,8 +84,8 @@ quot_bulkstat_add(
- {
- 	du_t		*dp;
- 	du_t		**hp;
--	__uint64_t	size;
--	__uint32_t	i, id;
-+	uint64_t	size;
-+	uint32_t	i, id;
- 
- 	if ((p->bs_mode & S_IFMT) == 0)
- 		return;
-@@ -203,7 +203,7 @@ qcompare(
- 	return 0;
- }
- 
--typedef char *(*idtoname_t)(__uint32_t);
-+typedef char *(*idtoname_t)(uint32_t);
- 
- static void
- quot_report_mount_any_type(
-@@ -291,7 +291,7 @@ quot_histogram_mount(
- 	fs_path_t	*mount,
- 	uint		flags)
- {
--	__uint64_t	t = 0;
-+	uint64_t	t = 0;
- 	int		i;
- 
- 	fprintf(fp, _("%s (%s):\n"), mount->fs_name, mount->fs_dir);
-diff --git a/quota/quota.c b/quota/quota.c
-index d09e239b..479b970e 100644
---- a/quota/quota.c
-+++ b/quota/quota.c
-@@ -52,7 +52,7 @@ quota_help(void)
- static int
- quota_mount(
- 	FILE		*fp,
--	__uint32_t	id,
-+	uint32_t	id,
- 	char		*name,
- 	uint		form,
- 	uint		type,
-@@ -181,7 +181,7 @@ quota_mount(
- static void
- quota(
- 	FILE		*fp,
--	__uint32_t	id,
-+	uint32_t	id,
- 	char		*name,
- 	uint		form,
- 	uint		type,
-diff --git a/quota/quota.h b/quota/quota.h
-index 4bde3513..9ed28bee 100644
---- a/quota/quota.h
-+++ b/quota/quota.h
-@@ -53,9 +53,9 @@ enum {
- extern char *type_to_string(uint __type);
- extern char *form_to_string(uint __form);
- extern char *time_to_string(time_t __time, uint __flags);
--extern char *bbs_to_string(__uint64_t __v, char *__c, uint __size);
--extern char *num_to_string(__uint64_t __v, char *__c, uint __size);
--extern char *pct_to_string(__uint64_t __v, __uint64_t __t, char *__c, uint __s);
-+extern char *bbs_to_string(uint64_t __v, char *__c, uint __size);
-+extern char *num_to_string(uint64_t __v, char *__c, uint __size);
-+extern char *pct_to_string(uint64_t __v, uint64_t __t, char *__c, uint __s);
- 
- extern FILE *fopen_write_secure(char *__filename);
- 
-@@ -81,7 +81,7 @@ enum {
-  * Identifier (uid/gid/prid) cache routines
-  */
- #define NMAX 32
--extern char *uid_to_name(__uint32_t __uid);
--extern char *gid_to_name(__uint32_t __gid);
--extern char *prid_to_name(__uint32_t __prid);
-+extern char *uid_to_name(uint32_t __uid);
-+extern char *gid_to_name(uint32_t __gid);
-+extern char *prid_to_name(uint32_t __prid);
- extern bool isdigits_only(const char *);
-diff --git a/quota/report.c b/quota/report.c
-index d0509c25..b2ea3bbe 100644
---- a/quota/report.c
-+++ b/quota/report.c
-@@ -333,9 +333,9 @@ report_header(
- static int
- report_mount(
- 	FILE		*fp,
--	__uint32_t	id,
-+	uint32_t	id,
- 	char		*name,
--	__uint32_t	*oid,
-+	uint32_t	*oid,
- 	uint		form,
- 	uint		type,
- 	fs_path_t	*mount,
-diff --git a/quota/state.c b/quota/state.c
-index 09dfa705..b08bf50b 100644
---- a/quota/state.c
-+++ b/quota/state.c
-@@ -135,7 +135,7 @@ static void
- state_timelimit(
- 	FILE		*fp,
- 	uint		form,
--	__uint32_t	timelimit)
-+	uint32_t	timelimit)
- {
- 	fprintf(fp, _("%s grace time: %s\n"),
- 		form_to_string(form),
-diff --git a/quota/util.c b/quota/util.c
-index cafd45f5..37840a86 100644
---- a/quota/util.c
-+++ b/quota/util.c
-@@ -94,8 +94,8 @@ round_snprintf(
- 	size_t		size,
- 	const char	*fmt_round,
- 	const char	*fmt_not_round,
--	__uint64_t	value,
--	__uint64_t	divisor)
-+	uint64_t	value,
-+	uint64_t	divisor)
- {
- 	double		v = (double)value / divisor;
- 
-@@ -107,23 +107,23 @@ round_snprintf(
- }
- 
- /* Basic blocks (512) bytes are returned from quotactl */
--#define BBS_TO_EXABYTES(bbs)	((__uint64_t)(bbs)>>51)
--#define BBS_TO_PETABYTES(bbs)	((__uint64_t)(bbs)>>41)
--#define BBS_TO_TERABYTES(bbs)	((__uint64_t)(bbs)>>31)
--#define BBS_TO_GIGABYTES(bbs)	((__uint64_t)(bbs)>>21)
--#define BBS_TO_MEGABYTES(bbs)	((__uint64_t)(bbs)>>11)
--#define BBS_TO_KILOBYTES(bbs)	((__uint64_t)(bbs)>>1)
--
--#define BBEXABYTE		((__uint64_t)1<<51)
--#define BBPETABYTE		((__uint64_t)1<<41)
--#define BBTERABYTE		((__uint64_t)1<<31)
--#define BBGIGABYTE		((__uint64_t)1<<21)
--#define BBMEGABYTE		((__uint64_t)1<<11)
--#define BBKILOBYTE		((__uint64_t)1<< 1)
-+#define BBS_TO_EXABYTES(bbs)	((uint64_t)(bbs)>>51)
-+#define BBS_TO_PETABYTES(bbs)	((uint64_t)(bbs)>>41)
-+#define BBS_TO_TERABYTES(bbs)	((uint64_t)(bbs)>>31)
-+#define BBS_TO_GIGABYTES(bbs)	((uint64_t)(bbs)>>21)
-+#define BBS_TO_MEGABYTES(bbs)	((uint64_t)(bbs)>>11)
-+#define BBS_TO_KILOBYTES(bbs)	((uint64_t)(bbs)>>1)
-+
-+#define BBEXABYTE		((uint64_t)1<<51)
-+#define BBPETABYTE		((uint64_t)1<<41)
-+#define BBTERABYTE		((uint64_t)1<<31)
-+#define BBGIGABYTE		((uint64_t)1<<21)
-+#define BBMEGABYTE		((uint64_t)1<<11)
-+#define BBKILOBYTE		((uint64_t)1<< 1)
- 
- char *
- bbs_to_string(
--	__uint64_t	v,
-+	uint64_t	v,
- 	char		*sp,
- 	uint		size)
- {
-@@ -146,17 +146,17 @@ bbs_to_string(
- 	return sp;
- }
- 
--#define THOUSAND		((__uint64_t)1000)
--#define MILLION			((__uint64_t)1000*1000)
--#define BILLION			((__uint64_t)1000*1000*1000)
--#define TRILLION		((__uint64_t)1000*1000*1000*1000)
--#define GAZILLION		((__uint64_t)1000*1000*1000*1000*1000)
--#define RIDICULOUS		((__uint64_t)1000*1000*1000*1000*1000*1000)
--#define STOPALREADY		((__uint64_t)1000*1000*1000*1000*1000*1000*1000)
-+#define THOUSAND		((uint64_t)1000)
-+#define MILLION			((uint64_t)1000*1000)
-+#define BILLION			((uint64_t)1000*1000*1000)
-+#define TRILLION		((uint64_t)1000*1000*1000*1000)
-+#define GAZILLION		((uint64_t)1000*1000*1000*1000*1000)
-+#define RIDICULOUS		((uint64_t)1000*1000*1000*1000*1000*1000)
-+#define STOPALREADY		((uint64_t)1000*1000*1000*1000*1000*1000*1000)
- 
- char *
- num_to_string(
--	__uint64_t	v,
-+	uint64_t	v,
- 	char		*sp,
- 	uint		size)
- {
-@@ -183,8 +183,8 @@ num_to_string(
- 
- char *
- pct_to_string(
--	__uint64_t	portion,
--	__uint64_t	whole,
-+	uint64_t	portion,
-+	uint64_t	whole,
- 	char		*buf,
- 	uint		size)
- {
-@@ -237,7 +237,7 @@ type_to_string(
- #define IDMASK		(NID-1)
- 
- typedef struct {
--	__uint32_t	id;
-+	uint32_t	id;
- 	char		name[NMAX+1];
- } idcache_t;
- 
-@@ -250,7 +250,7 @@ static int		pentriesleft = NID;
- 
- static idcache_t *
- getnextpwent(
--	__uint32_t	id,
-+	uint32_t	id,
- 	int		byid)
- {
- 	struct passwd	*pw;
-@@ -266,7 +266,7 @@ getnextpwent(
- 
- static idcache_t *
- getnextgrent(
--	__uint32_t	id,
-+	uint32_t	id,
- 	int		byid)
- {
- 	struct group	*gr;
-@@ -281,7 +281,7 @@ getnextgrent(
- 
- static idcache_t *
- getnextprent(
--	__uint32_t	id,
-+	uint32_t	id,
- 	int		byid)
- {
- 	fs_project_t	*pr;
-@@ -296,7 +296,7 @@ getnextprent(
- 
- char *
- uid_to_name(
--	__uint32_t	id)
-+	uint32_t	id)
- {
- 	idcache_t	*ncp, *idp;
- 
-@@ -333,7 +333,7 @@ uid_to_name(
- 
- char *
- gid_to_name(
--	__uint32_t	id)
-+	uint32_t	id)
- {
- 	idcache_t	*ncp, *idp;
- 
-@@ -370,7 +370,7 @@ gid_to_name(
- 
- char *
- prid_to_name(
--	__uint32_t	id)
-+	uint32_t	id)
- {
- 	idcache_t	*ncp, *idp;
- 
-diff --git a/repair/README b/repair/README
-index 7f168e69..4692463d 100644
---- a/repair/README
-+++ b/repair/README
-@@ -189,7 +189,7 @@ D - 0) look at usage of XFS_MAKE_IPTR().  It does the right
- 
- 
- D - 0) look at references to XFS_INODES_PER_CHUNK.  change the
--	ones that really mean sizeof(__uint64_t)*NBBY to
-+	ones that really mean sizeof(uint64_t)*NBBY to
- 	something else (like that only defined as a constant
- 	INOS_PER_IREC. this isn't as important since
- 	XFS_INODES_PER_CHUNK will never chang
-diff --git a/repair/agheader.h b/repair/agheader.h
-index 6b2974ca..2f7246d2 100644
---- a/repair/agheader.h
-+++ b/repair/agheader.h
-@@ -20,7 +20,7 @@ typedef struct fs_geometry  {
- 	/*
- 	 * these types should match the superblock types
- 	 */
--	__uint32_t	sb_blocksize;	/* blocksize (bytes) */
-+	uint32_t	sb_blocksize;	/* blocksize (bytes) */
- 	xfs_rfsblock_t	sb_dblocks;	/* # data blocks */
- 	xfs_rfsblock_t	sb_rblocks;	/* # realtime blocks */
- 	xfs_rtblock_t	sb_rextents;	/* # realtime extents */
-@@ -30,9 +30,9 @@ typedef struct fs_geometry  {
- 	xfs_agnumber_t	sb_agcount;	/* # of ags */
- 	xfs_extlen_t	sb_rbmblocks;	/* # of rt bitmap blocks */
- 	xfs_extlen_t	sb_logblocks;	/* # of log blocks */
--	__uint16_t	sb_sectsize;	/* volume sector size (bytes) */
--	__uint16_t	sb_inodesize;	/* inode size (bytes) */
--	__uint8_t	sb_imax_pct;	/* max % of fs for inode space */
-+	uint16_t	sb_sectsize;	/* volume sector size (bytes) */
-+	uint16_t	sb_inodesize;	/* inode size (bytes) */
-+	uint8_t		sb_imax_pct;	/* max % of fs for inode space */
- 
- 	/*
- 	 * these don't have to match the superblock types but are placed
-@@ -49,10 +49,10 @@ typedef struct fs_geometry  {
- 	/*
- 	 * fields after this point have to be checked manually in compare_sb()
- 	 */
--	__uint8_t	sb_shared_vn;	/* shared version number */
-+	uint8_t		sb_shared_vn;	/* shared version number */
- 	xfs_extlen_t	sb_inoalignmt;	/* inode chunk alignment, fsblocks */
--	__uint32_t	sb_unit;	/* stripe or raid unit */
--	__uint32_t	sb_width;	/* stripe or width unit */
-+	uint32_t	sb_unit;	/* stripe or raid unit */
-+	uint32_t	sb_width;	/* stripe or width unit */
- 
- 	/*
- 	 * these don't have to match, they track superblock properties
-diff --git a/repair/attr_repair.h b/repair/attr_repair.h
-index 7010e4ff..294fad44 100644
---- a/repair/attr_repair.h
-+++ b/repair/attr_repair.h
-@@ -32,10 +32,10 @@
- #define ACL_WRITE	02
- #define ACL_EXECUTE	01
- 
--typedef __uint16_t	xfs_acl_perm_t;
--typedef __int32_t	xfs_acl_type_t;
--typedef __int32_t	xfs_acl_tag_t;
--typedef __int32_t	xfs_acl_id_t;
-+typedef uint16_t	xfs_acl_perm_t;
-+typedef int32_t		xfs_acl_type_t;
-+typedef int32_t		xfs_acl_tag_t;
-+typedef int32_t		xfs_acl_id_t;
- 
- /*
-  * "icacl" = in-core ACL. There is no equivalent in the XFS kernel code,
-@@ -50,7 +50,7 @@ struct xfs_icacl_entry {
- };
- 
- struct xfs_icacl {
--	__int32_t		acl_cnt;
-+	int32_t			acl_cnt;
- 	struct xfs_icacl_entry	acl_entry[0];
- };
- 
-@@ -59,14 +59,14 @@ struct xfs_icacl {
-  */
- #define XFS_MAC_MAX_SETS	250
- typedef struct xfs_mac_label {
--	__uint8_t       ml_msen_type;	/* MSEN label type */
--	__uint8_t       ml_mint_type;	/* MINT label type */
--	__uint8_t       ml_level;	/* Hierarchical level */
--	__uint8_t       ml_grade;	/* Hierarchical grade */
--	__uint16_t      ml_catcount;	/* Category count */
--	__uint16_t      ml_divcount;	/* Division count */
-+	uint8_t       ml_msen_type;	/* MSEN label type */
-+	uint8_t       ml_mint_type;	/* MINT label type */
-+	uint8_t       ml_level;	/* Hierarchical level */
-+	uint8_t       ml_grade;	/* Hierarchical grade */
-+	uint16_t      ml_catcount;	/* Category count */
-+	uint16_t      ml_divcount;	/* Division count */
- 					/* Category set, then Division set */
--	__uint16_t      ml_list[XFS_MAC_MAX_SETS];
-+	uint16_t      ml_list[XFS_MAC_MAX_SETS];
- } xfs_mac_label_t;
- 
- /* MSEN label type names. Choose an upper case ASCII character.  */
-@@ -93,7 +93,7 @@ typedef struct xfs_mac_label {
- /*
-  * Capabilities (IRIX)
-  */
--typedef __uint64_t xfs_cap_value_t;
-+typedef uint64_t xfs_cap_value_t;
- 
- typedef struct xfs_cap_set {
- 	xfs_cap_value_t	cap_effective;  /* use in capability checks */
-diff --git a/repair/avl64.c b/repair/avl64.c
-index 51cd624c..8f4a1211 100644
---- a/repair/avl64.c
-+++ b/repair/avl64.c
-@@ -70,8 +70,8 @@ avl64_checktree(
- 	avl64node_t *root)
- {
- 	avl64node_t *nlast, *nnext, *np;
--	__uint64_t offset = 0;
--	__uint64_t end;
-+	uint64_t offset = 0;
-+	uint64_t end;
- 
- 	nlast = nnext = root;
- 
-@@ -583,8 +583,8 @@ attach:
- avl64node_t *
- avl64_findanyrange(
- 	avl64tree_desc_t *tree,
--	__uint64_t start,
--	__uint64_t end,
-+	uint64_t start,
-+	uint64_t end,
- 	int	checklen)
- {
- 	avl64node_t *np = tree->avl_root;
-@@ -655,7 +655,7 @@ avl64_findanyrange(
- avl64node_t *
- avl64_findrange(
- 	avl64tree_desc_t *tree,
--	__uint64_t value)
-+	uint64_t value)
- {
- 	avl64node_t *np = tree->avl_root;
- 
-@@ -682,10 +682,10 @@ avl64_findrange(
- avl64node_t *
- avl64_find(
- 	avl64tree_desc_t *tree,
--	__uint64_t value)
-+	uint64_t value)
- {
- 	avl64node_t *np = tree->avl_root;
--	__uint64_t nvalue;
-+	uint64_t nvalue;
- 
- 	while (np) {
- 		nvalue = AVL_START(tree, np);
-@@ -909,8 +909,8 @@ static
- avl64node_t *
- avl64_insert_find_growth(
- 		avl64tree_desc_t *tree,
--		__uint64_t start,	/* range start at start, */
--		__uint64_t end,	/* exclusive */
-+		uint64_t start,	/* range start at start, */
-+		uint64_t end,	/* exclusive */
- 		int   *growthp)	/* OUT */
- {
- 	avl64node_t *root = tree->avl_root;
-@@ -963,7 +963,7 @@ avl64_insert_grow(
- 	int growth)
- {
- 	avl64node_t *nnext;
--	__uint64_t start = AVL_START(tree, newnode);
-+	uint64_t start = AVL_START(tree, newnode);
- 
- 	if (growth == AVL_BACK) {
- 
-@@ -1005,8 +1005,8 @@ avl64_insert(
- 	avl64node_t *newnode)
- {
- 	avl64node_t *np;
--	__uint64_t start = AVL_START(tree, newnode);
--	__uint64_t end = AVL_END(tree, newnode);
-+	uint64_t start = AVL_START(tree, newnode);
-+	uint64_t end = AVL_END(tree, newnode);
- 	int growth;
- 
- 	ASSERT(newnode);
-@@ -1159,16 +1159,16 @@ avl64ops_t avl_debug_ops = {
- 	avl_debug_end,
- }
- 
--static __uint64_t
-+static uint64_t
- avl64_debug_start(avl64node_t *node)
- {
--	return (__uint64_t)(struct avl_debug_node *)node->avl_start;
-+	return (uint64_t)(struct avl_debug_node *)node->avl_start;
- }
- 
--static __uint64_t
-+static uint64_t
- avl64_debug_end(avl64node_t *node)
- {
--	return (__uint64_t)
-+	return (uint64_t)
- 		((struct avl_debug_node *)node->avl_start +
- 		 (struct avl_debug_node *)node->avl_size);
- }
-@@ -1304,7 +1304,7 @@ main()
- avl64node_t *
- avl64_findadjacent(
- 	avl64tree_desc_t *tree,
--	__uint64_t value,
-+	uint64_t value,
- 	int		dir)
- {
- 	avl64node_t *np = tree->avl_root;
-@@ -1378,8 +1378,8 @@ avl64_findadjacent(
- void
- avl64_findranges(
- 	avl64tree_desc_t *tree,
--	__uint64_t start,
--	__uint64_t end,
-+	uint64_t start,
-+	uint64_t end,
- 	avl64node_t	        **startp,
- 	avl64node_t		**endp)
- {
-diff --git a/repair/avl64.h b/repair/avl64.h
-index fd193218..cd079a00 100644
---- a/repair/avl64.h
-+++ b/repair/avl64.h
-@@ -32,8 +32,8 @@ typedef struct	avl64node {
-  * avl-tree operations
-  */
- typedef struct avl64ops {
--	__uint64_t	(*avl_start)(avl64node_t *);
--	__uint64_t	(*avl_end)(avl64node_t *);
-+	uint64_t	(*avl_start)(avl64node_t *);
-+	uint64_t	(*avl_end)(avl64node_t *);
- } avl64ops_t;
- 
- /*
-@@ -89,32 +89,32 @@ avl64_init_tree(
- avl64node_t *
- avl64_findrange(
- 	avl64tree_desc_t *tree,
--	__uint64_t value);
-+	uint64_t value);
- 
- avl64node_t *
- avl64_find(
- 	avl64tree_desc_t *tree,
--	__uint64_t value);
-+	uint64_t value);
- 
- avl64node_t *
- avl64_findanyrange(
- 	avl64tree_desc_t *tree,
--	__uint64_t	start,
--	__uint64_t	end,
-+	uint64_t	start,
-+	uint64_t	end,
- 	int     checklen);
- 
- 
- avl64node_t *
- avl64_findadjacent(
- 	avl64tree_desc_t *tree,
--	__uint64_t	value,
-+	uint64_t	value,
- 	int		dir);
- 
- void
- avl64_findranges(
- 	avl64tree_desc_t *tree,
--	__uint64_t	start,
--	__uint64_t	end,
-+	uint64_t	start,
-+	uint64_t	end,
- 	avl64node_t	        **startp,
- 	avl64node_t		**endp);
- 
-diff --git a/repair/dinode.c b/repair/dinode.c
-index d664f87a..da872178 100644
---- a/repair/dinode.c
-+++ b/repair/dinode.c
-@@ -746,7 +746,7 @@ _("%s fork in ino %" PRIu64 " claims dup extent, "
- 			case XR_E_FREE1:
- 				do_warn(
- _("%s fork in ino %" PRIu64 " claims free block %" PRIu64 "\n"),
--					forkname, ino, (__uint64_t) b);
-+					forkname, ino, (uint64_t) b);
- 				/* fall through ... */
- 			case XR_E_INUSE1:	/* seen by rmap */
- 			case XR_E_UNKNOWN:
-@@ -923,7 +923,7 @@ process_btinode(
- 	int			type,
- 	int			*dirty,
- 	xfs_rfsblock_t		*tot,
--	__uint64_t		*nex,
-+	uint64_t		*nex,
- 	blkmap_t		**blkmapp,
- 	int			whichfork,
- 	int			check_dups)
-@@ -939,7 +939,7 @@ process_btinode(
- 	int			level;
- 	int			numrecs;
- 	bmap_cursor_t		cursor;
--	__uint64_t		magic;
-+	uint64_t		magic;
- 
- 	dib = (xfs_bmdr_block_t *)XFS_DFORK_PTR(dip, whichfork);
- 	lino = XFS_AGINO_TO_INO(mp, agno, ino);
-@@ -1098,7 +1098,7 @@ process_exinode(
- 	int			type,
- 	int			*dirty,
- 	xfs_rfsblock_t		*tot,
--	__uint64_t		*nex,
-+	uint64_t		*nex,
- 	blkmap_t		**blkmapp,
- 	int			whichfork,
- 	int			check_dups)
-@@ -1200,14 +1200,14 @@ process_symlink_extlist(xfs_mount_t *mp, xfs_ino_t lino, xfs_dinode_t *dino)
- 		do_warn(
- _("mismatch between format (%d) and size (%" PRId64 ") in symlink ino %" PRIu64 "\n"),
- 			dino->di_format,
--			(__int64_t)be64_to_cpu(dino->di_size), lino);
-+			(int64_t)be64_to_cpu(dino->di_size), lino);
- 		return 1;
- 	}
- 	if (dino->di_format == XFS_DINODE_FMT_LOCAL) {
- 		do_warn(
- _("mismatch between format (%d) and size (%" PRId64 ") in symlink inode %" PRIu64 "\n"),
- 			dino->di_format,
--			(__int64_t)be64_to_cpu(dino->di_size), lino);
-+			(int64_t)be64_to_cpu(dino->di_size), lino);
- 		return 1;
- 	}
- 
-@@ -1454,22 +1454,22 @@ _("inode %" PRIu64 " has bad inode type (IFMNT)\n"), lino);
- 		case XR_INO_CHRDEV:
- 			do_warn(
- _("size of character device inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
--				(__int64_t)be64_to_cpu(dino->di_size));
-+				(int64_t)be64_to_cpu(dino->di_size));
- 			break;
- 		case XR_INO_BLKDEV:
- 			do_warn(
- _("size of block device inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
--				(__int64_t)be64_to_cpu(dino->di_size));
-+				(int64_t)be64_to_cpu(dino->di_size));
- 			break;
- 		case XR_INO_SOCK:
- 			do_warn(
- _("size of socket inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
--				(__int64_t)be64_to_cpu(dino->di_size));
-+				(int64_t)be64_to_cpu(dino->di_size));
- 			break;
- 		case XR_INO_FIFO:
- 			do_warn(
- _("size of fifo inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
--				(__int64_t)be64_to_cpu(dino->di_size));
-+				(int64_t)be64_to_cpu(dino->di_size));
- 			break;
- 		default:
- 			do_warn(_("Internal error - process_misc_ino_types, "
-@@ -1743,12 +1743,12 @@ _("found inode %" PRIu64 " claiming to be a real-time file\n"), lino);
- 		break;
- 
- 	case XR_INO_RTBITMAP:
--		if (size != (__int64_t)mp->m_sb.sb_rbmblocks *
-+		if (size != (int64_t)mp->m_sb.sb_rbmblocks *
- 					mp->m_sb.sb_blocksize) {
- 			do_warn(
- _("realtime bitmap inode %" PRIu64 " has bad size %" PRId64 " (should be %" PRIu64 ")\n"),
- 				lino, size,
--				(__int64_t) mp->m_sb.sb_rbmblocks *
-+				(int64_t) mp->m_sb.sb_rbmblocks *
- 					mp->m_sb.sb_blocksize);
- 			return 1;
- 		}
-@@ -1817,8 +1817,8 @@ static int
- process_inode_blocks_and_extents(
- 	xfs_dinode_t	*dino,
- 	xfs_rfsblock_t	nblocks,
--	__uint64_t	nextents,
--	__uint64_t	anextents,
-+	uint64_t	nextents,
-+	uint64_t	anextents,
- 	xfs_ino_t	lino,
- 	int		*dirty)
- {
-@@ -1908,7 +1908,7 @@ process_inode_data_fork(
- 	int		type,
- 	int		*dirty,
- 	xfs_rfsblock_t	*totblocks,
--	__uint64_t	*nextents,
-+	uint64_t	*nextents,
- 	blkmap_t	**dblkmap,
- 	int		check_dups)
- {
-@@ -2017,7 +2017,7 @@ process_inode_attr_fork(
- 	int		type,
- 	int		*dirty,
- 	xfs_rfsblock_t	*atotblocks,
--	__uint64_t	*anextents,
-+	uint64_t	*anextents,
- 	int		check_dups,
- 	int		extra_attr_check,
- 	int		*retval)
-@@ -2228,8 +2228,8 @@ process_dinode_int(xfs_mount_t *mp,
- 	int			di_mode;
- 	int			type;
- 	int			retval = 0;
--	__uint64_t		nextents;
--	__uint64_t		anextents;
-+	uint64_t		nextents;
-+	uint64_t		anextents;
- 	xfs_ino_t		lino;
- 	const int		is_free = 0;
- 	const int		is_used = 1;
-@@ -2346,7 +2346,7 @@ _("inode identifier %llu mismatch on inode %" PRIu64 "\n"),
- 		if (!uncertain)
- 			do_warn(
- _("bad (negative) size %" PRId64 " on inode %" PRIu64 "\n"),
--				(__int64_t)be64_to_cpu(dino->di_size),
-+				(int64_t)be64_to_cpu(dino->di_size),
- 				lino);
- 		if (verify_mode)
- 			return 1;
-diff --git a/repair/dinode.h b/repair/dinode.h
-index 61d07363..39d6a72f 100644
---- a/repair/dinode.h
-+++ b/repair/dinode.h
-@@ -46,8 +46,8 @@ process_bmbt_reclist(xfs_mount_t	*mp,
- 		xfs_ino_t		ino,
- 		xfs_rfsblock_t		*tot,
- 		struct blkmap		**blkmapp,
--		__uint64_t		*first_key,
--		__uint64_t		*last_key,
-+		uint64_t		*first_key,
-+		uint64_t		*last_key,
- 		int			whichfork);
- 
- int
-diff --git a/repair/dir2.c b/repair/dir2.c
-index e6415e49..73dff902 100644
---- a/repair/dir2.c
-+++ b/repair/dir2.c
-@@ -160,7 +160,7 @@ process_sf_dir2(
- 	int			bad_sfnamelen;
- 	int			i;
- 	int			i8;
--	__int64_t		ino_dir_size;
-+	int64_t			ino_dir_size;
- 	int			ino_off;
- 	ino_tree_node_t		*irec_p;
- 	int			junkit;
-diff --git a/repair/globals.h b/repair/globals.h
-index 4085ccc4..c7bbe6f1 100644
---- a/repair/globals.h
-+++ b/repair/globals.h
-@@ -141,7 +141,7 @@ EXTERN int		inodes_per_cluster;
- EXTERN unsigned int	glob_agcount;
- EXTERN int		chunks_pblock;	/* # of 64-ino chunks per allocation */
- EXTERN int		max_symlink_blocks;
--EXTERN __int64_t	fs_max_file_offset;
-+EXTERN int64_t		fs_max_file_offset;
- 
- /* realtime info */
- 
-@@ -161,24 +161,24 @@ EXTERN int		full_ino_ex_data;/*
- 
- /* superblock counters */
- 
--EXTERN __uint64_t	sb_icount;	/* allocated (made) inodes */
--EXTERN __uint64_t	sb_ifree;	/* free inodes */
--EXTERN __uint64_t	sb_fdblocks;	/* free data blocks */
--EXTERN __uint64_t	sb_frextents;	/* free realtime extents */
-+EXTERN uint64_t	sb_icount;	/* allocated (made) inodes */
-+EXTERN uint64_t	sb_ifree;	/* free inodes */
-+EXTERN uint64_t	sb_fdblocks;	/* free data blocks */
-+EXTERN uint64_t	sb_frextents;	/* free realtime extents */
- 
- /* superblock geometry info */
- 
- EXTERN xfs_extlen_t	sb_inoalignmt;
--EXTERN __uint32_t	sb_unit;
--EXTERN __uint32_t	sb_width;
-+EXTERN uint32_t	sb_unit;
-+EXTERN uint32_t	sb_width;
- 
- struct aglock {
- 	pthread_mutex_t	lock __attribute__((__aligned__(64)));
- };
- EXTERN struct aglock	*ag_locks;
- 
--EXTERN int 		report_interval;
--EXTERN __uint64_t 	*prog_rpt_done;
-+EXTERN int		report_interval;
-+EXTERN uint64_t		*prog_rpt_done;
- 
- EXTERN int		ag_stride;
- EXTERN int		thread_count;
-diff --git a/repair/incore.c b/repair/incore.c
-index cb573165..a9191ae2 100644
---- a/repair/incore.c
-+++ b/repair/incore.c
-@@ -179,7 +179,7 @@ get_bmap_ext(
- static uint64_t		*rt_bmap;
- static size_t		rt_bmap_size;
- 
--/* block records fit into __uint64_t's units */
-+/* block records fit into uint64_t's units */
- #define XR_BB_UNIT	64			/* number of bits/unit */
- #define XR_BB		4			/* bits per block record */
- #define XR_BB_NUM	(XR_BB_UNIT/XR_BB)	/* number of records per unit */
-@@ -203,8 +203,8 @@ set_rtbmap(
- {
- 	*(rt_bmap + bno / XR_BB_NUM) =
- 	 ((*(rt_bmap + bno / XR_BB_NUM) &
--	  (~((__uint64_t) XR_BB_MASK << ((bno % XR_BB_NUM) * XR_BB)))) |
--	 (((__uint64_t) state) << ((bno % XR_BB_NUM) * XR_BB)));
-+	  (~((uint64_t) XR_BB_MASK << ((bno % XR_BB_NUM) * XR_BB)))) |
-+	 (((uint64_t) state) << ((bno % XR_BB_NUM) * XR_BB)));
- }
- 
- static void
-@@ -222,9 +222,9 @@ init_rt_bmap(
- 		return;
- 
- 	rt_bmap_size = roundup(mp->m_sb.sb_rextents / (NBBY / XR_BB),
--			       sizeof(__uint64_t));
-+			       sizeof(uint64_t));
- 
--	rt_bmap = memalign(sizeof(__uint64_t), rt_bmap_size);
-+	rt_bmap = memalign(sizeof(uint64_t), rt_bmap_size);
- 	if (!rt_bmap) {
- 		do_error(
- 	_("couldn't allocate realtime block map, size = %" PRIu64 "\n"),
-diff --git a/repair/incore.h b/repair/incore.h
-index c23a3a3c..fd66084f 100644
---- a/repair/incore.h
-+++ b/repair/incore.h
-@@ -257,7 +257,7 @@ typedef xfs_ino_t parent_entry_t;
- struct nlink_ops;
- 
- typedef struct parent_list  {
--	__uint64_t		pmask;
-+	uint64_t		pmask;
- 	parent_entry_t		*pentries;
- #ifdef DEBUG
- 	short			cnt;
-@@ -265,14 +265,14 @@ typedef struct parent_list  {
- } parent_list_t;
- 
- union ino_nlink {
--	__uint8_t	*un8;
--	__uint16_t	*un16;
--	__uint32_t	*un32;
-+	uint8_t		*un8;
-+	uint16_t	*un16;
-+	uint32_t	*un32;
- };
- 
- typedef struct ino_ex_data  {
--	__uint64_t		ino_reached;	/* bit == 1 if reached */
--	__uint64_t		ino_processed;	/* reference checked bit mask */
-+	uint64_t		ino_reached;	/* bit == 1 if reached */
-+	uint64_t		ino_processed;	/* reference checked bit mask */
- 	parent_list_t		*parents;
- 	union ino_nlink		counted_nlinks;/* counted nlinks in P6 */
- } ino_ex_data_t;
-@@ -281,22 +281,22 @@ typedef struct ino_tree_node  {
- 	avlnode_t		avl_node;
- 	xfs_agino_t		ino_startnum;	/* starting inode # */
- 	xfs_inofree_t		ir_free;	/* inode free bit mask */
--	__uint64_t		ir_sparse;	/* sparse inode bitmask */
--	__uint64_t		ino_confirmed;	/* confirmed bitmask */
--	__uint64_t		ino_isa_dir;	/* bit == 1 if a directory */
--	__uint64_t		ino_was_rl;	/* bit == 1 if reflink flag set */
--	__uint64_t		ino_is_rl;	/* bit == 1 if reflink flag should be set */
--	__uint8_t		nlink_size;
-+	uint64_t		ir_sparse;	/* sparse inode bitmask */
-+	uint64_t		ino_confirmed;	/* confirmed bitmask */
-+	uint64_t		ino_isa_dir;	/* bit == 1 if a directory */
-+	uint64_t		ino_was_rl;	/* bit == 1 if reflink flag set */
-+	uint64_t		ino_is_rl;	/* bit == 1 if reflink flag should be set */
-+	uint8_t			nlink_size;
- 	union ino_nlink		disk_nlinks;	/* on-disk nlinks, set in P3 */
- 	union  {
- 		ino_ex_data_t	*ex_data;	/* phases 6,7 */
- 		parent_list_t	*plist;		/* phases 2-5 */
- 	} ino_un;
--	__uint8_t		*ftypes;	/* phases 3,6 */
-+	uint8_t			*ftypes;	/* phases 3,6 */
- } ino_tree_node_t;
- 
--#define INOS_PER_IREC	(sizeof(__uint64_t) * NBBY)
--#define	IREC_MASK(i)	((__uint64_t)1 << (i))
-+#define INOS_PER_IREC	(sizeof(uint64_t) * NBBY)
-+#define	IREC_MASK(i)	((uint64_t)1 << (i))
- 
- void		add_ino_ex_data(xfs_mount_t *mp);
- 
-@@ -543,10 +543,10 @@ static inline int inode_is_rl(struct ino_tree_node *irec, int offset)
-  */
- void add_inode_ref(struct ino_tree_node *irec, int offset);
- void drop_inode_ref(struct ino_tree_node *irec, int offset);
--__uint32_t num_inode_references(struct ino_tree_node *irec, int offset);
-+uint32_t num_inode_references(struct ino_tree_node *irec, int offset);
- 
--void set_inode_disk_nlinks(struct ino_tree_node *irec, int offset, __uint32_t nlinks);
--__uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int offset);
-+void set_inode_disk_nlinks(struct ino_tree_node *irec, int offset, uint32_t nlinks);
-+uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int offset);
- 
- static inline int is_inode_reached(struct ino_tree_node *irec, int offset)
- {
-@@ -567,13 +567,13 @@ static inline void add_inode_reached(struct ino_tree_node *irec, int offset)
- static inline void
- set_inode_ftype(struct ino_tree_node *irec,
- 	int		ino_offset,
--	__uint8_t	ftype)
-+	uint8_t		ftype)
- {
- 	if (irec->ftypes)
- 		irec->ftypes[ino_offset] = ftype;
- }
- 
--static inline __uint8_t
-+static inline uint8_t
- get_inode_ftype(
- 	struct ino_tree_node *irec,
- 	int		ino_offset)
-@@ -606,11 +606,11 @@ typedef struct bm_level_state  {
- 	xfs_fsblock_t		fsbno;
- 	xfs_fsblock_t		left_fsbno;
- 	xfs_fsblock_t		right_fsbno;
--	__uint64_t		first_key;
--	__uint64_t		last_key;
-+	uint64_t		first_key;
-+	uint64_t		last_key;
- /*
- 	int			level;
--	__uint64_t		prev_last_key;
-+	uint64_t		prev_last_key;
- 	xfs_buf_t		*bp;
- 	xfs_bmbt_block_t	*block;
- */
-diff --git a/repair/incore_ext.c b/repair/incore_ext.c
-index 7e6786c5..0a8138a9 100644
---- a/repair/incore_ext.c
-+++ b/repair/incore_ext.c
-@@ -721,13 +721,13 @@ search_rt_dup_extent(xfs_mount_t *mp, xfs_rtblock_t bno)
- 	return(ret);
- }
- 
--static __uint64_t
-+static uint64_t
- avl64_rt_ext_start(avl64node_t *node)
- {
- 	return(((rt_extent_tree_node_t *) node)->rt_startblock);
- }
- 
--static __uint64_t
-+static uint64_t
- avl64_ext_end(avl64node_t *node)
- {
- 	return(((rt_extent_tree_node_t *) node)->rt_startblock +
-@@ -834,7 +834,7 @@ count_extents(xfs_agnumber_t agno, avltree_desc_t *tree, int whichtree)
- int
- count_bno_extents_blocks(xfs_agnumber_t agno, uint *numblocks)
- {
--	__uint64_t nblocks;
-+	uint64_t nblocks;
- 	extent_tree_node_t *node;
- 	int i = 0;
- 
-diff --git a/repair/incore_ino.c b/repair/incore_ino.c
-index 2ec17657..3b6b44d4 100644
---- a/repair/incore_ino.c
-+++ b/repair/incore_ino.c
-@@ -38,7 +38,7 @@ static avltree_desc_t	**inode_uncertain_tree_ptrs;
- /* memory optimised nlink counting for all inodes */
- 
- static void *
--alloc_nlink_array(__uint8_t nlink_size)
-+alloc_nlink_array(uint8_t nlink_size)
- {
- 	void *ptr;
- 
-@@ -51,10 +51,10 @@ alloc_nlink_array(__uint8_t nlink_size)
- static void
- nlink_grow_8_to_16(ino_tree_node_t *irec)
- {
--	__uint16_t	*new_nlinks;
-+	uint16_t	*new_nlinks;
- 	int		i;
- 
--	irec->nlink_size = sizeof(__uint16_t);
-+	irec->nlink_size = sizeof(uint16_t);
- 
- 	new_nlinks = alloc_nlink_array(irec->nlink_size);
- 	for (i = 0; i < XFS_INODES_PER_CHUNK; i++)
-@@ -76,10 +76,10 @@ nlink_grow_8_to_16(ino_tree_node_t *irec)
- static void
- nlink_grow_16_to_32(ino_tree_node_t *irec)
- {
--	__uint32_t	*new_nlinks;
-+	uint32_t	*new_nlinks;
- 	int		i;
- 
--	irec->nlink_size = sizeof(__uint32_t);
-+	irec->nlink_size = sizeof(uint32_t);
- 
- 	new_nlinks = alloc_nlink_array(irec->nlink_size);
- 	for (i = 0; i < XFS_INODES_PER_CHUNK; i++)
-@@ -104,21 +104,21 @@ void add_inode_ref(struct ino_tree_node *irec, int ino_offset)
- 	ASSERT(irec->ino_un.ex_data != NULL);
- 
- 	switch (irec->nlink_size) {
--	case sizeof(__uint8_t):
-+	case sizeof(uint8_t):
- 		if (irec->ino_un.ex_data->counted_nlinks.un8[ino_offset] < 0xff) {
- 			irec->ino_un.ex_data->counted_nlinks.un8[ino_offset]++;
- 			break;
- 		}
- 		nlink_grow_8_to_16(irec);
- 		/*FALLTHRU*/
--	case sizeof(__uint16_t):
-+	case sizeof(uint16_t):
- 		if (irec->ino_un.ex_data->counted_nlinks.un16[ino_offset] < 0xffff) {
- 			irec->ino_un.ex_data->counted_nlinks.un16[ino_offset]++;
- 			break;
- 		}
- 		nlink_grow_16_to_32(irec);
- 		/*FALLTHRU*/
--	case sizeof(__uint32_t):
-+	case sizeof(uint32_t):
- 		irec->ino_un.ex_data->counted_nlinks.un32[ino_offset]++;
- 		break;
- 	default:
-@@ -128,20 +128,20 @@ void add_inode_ref(struct ino_tree_node *irec, int ino_offset)
- 
- void drop_inode_ref(struct ino_tree_node *irec, int ino_offset)
- {
--	__uint32_t	refs = 0;
-+	uint32_t	refs = 0;
- 
- 	ASSERT(irec->ino_un.ex_data != NULL);
- 
- 	switch (irec->nlink_size) {
--	case sizeof(__uint8_t):
-+	case sizeof(uint8_t):
- 		ASSERT(irec->ino_un.ex_data->counted_nlinks.un8[ino_offset] > 0);
- 		refs = --irec->ino_un.ex_data->counted_nlinks.un8[ino_offset];
- 		break;
--	case sizeof(__uint16_t):
-+	case sizeof(uint16_t):
- 		ASSERT(irec->ino_un.ex_data->counted_nlinks.un16[ino_offset] > 0);
- 		refs = --irec->ino_un.ex_data->counted_nlinks.un16[ino_offset];
- 		break;
--	case sizeof(__uint32_t):
-+	case sizeof(uint32_t):
- 		ASSERT(irec->ino_un.ex_data->counted_nlinks.un32[ino_offset] > 0);
- 		refs = --irec->ino_un.ex_data->counted_nlinks.un32[ino_offset];
- 		break;
-@@ -153,16 +153,16 @@ void drop_inode_ref(struct ino_tree_node *irec, int ino_offset)
- 		irec->ino_un.ex_data->ino_reached &= ~IREC_MASK(ino_offset);
- }
- 
--__uint32_t num_inode_references(struct ino_tree_node *irec, int ino_offset)
-+uint32_t num_inode_references(struct ino_tree_node *irec, int ino_offset)
- {
- 	ASSERT(irec->ino_un.ex_data != NULL);
- 
- 	switch (irec->nlink_size) {
--	case sizeof(__uint8_t):
-+	case sizeof(uint8_t):
- 		return irec->ino_un.ex_data->counted_nlinks.un8[ino_offset];
--	case sizeof(__uint16_t):
-+	case sizeof(uint16_t):
- 		return irec->ino_un.ex_data->counted_nlinks.un16[ino_offset];
--	case sizeof(__uint32_t):
-+	case sizeof(uint32_t):
- 		return irec->ino_un.ex_data->counted_nlinks.un32[ino_offset];
- 	default:
- 		ASSERT(0);
-@@ -171,24 +171,24 @@ __uint32_t num_inode_references(struct ino_tree_node *irec, int ino_offset)
- }
- 
- void set_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset,
--		__uint32_t nlinks)
-+		uint32_t nlinks)
- {
- 	switch (irec->nlink_size) {
--	case sizeof(__uint8_t):
-+	case sizeof(uint8_t):
- 		if (nlinks < 0xff) {
- 			irec->disk_nlinks.un8[ino_offset] = nlinks;
- 			break;
- 		}
- 		nlink_grow_8_to_16(irec);
- 		/*FALLTHRU*/
--	case sizeof(__uint16_t):
-+	case sizeof(uint16_t):
- 		if (nlinks < 0xffff) {
- 			irec->disk_nlinks.un16[ino_offset] = nlinks;
- 			break;
- 		}
- 		nlink_grow_16_to_32(irec);
- 		/*FALLTHRU*/
--	case sizeof(__uint32_t):
-+	case sizeof(uint32_t):
- 		irec->disk_nlinks.un32[ino_offset] = nlinks;
- 		break;
- 	default:
-@@ -196,14 +196,14 @@ void set_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset,
- 	}
- }
- 
--__uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset)
-+uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset)
- {
- 	switch (irec->nlink_size) {
--	case sizeof(__uint8_t):
-+	case sizeof(uint8_t):
- 		return irec->disk_nlinks.un8[ino_offset];
--	case sizeof(__uint16_t):
-+	case sizeof(uint16_t):
- 		return irec->disk_nlinks.un16[ino_offset];
--	case sizeof(__uint32_t):
-+	case sizeof(uint32_t):
- 		return irec->disk_nlinks.un32[ino_offset];
- 	default:
- 		ASSERT(0);
-@@ -211,11 +211,11 @@ __uint32_t get_inode_disk_nlinks(struct ino_tree_node *irec, int ino_offset)
- 	return 0;
- }
- 
--static __uint8_t *
-+static uint8_t *
- alloc_ftypes_array(
- 	struct xfs_mount *mp)
- {
--	__uint8_t	*ptr;
-+	uint8_t		*ptr;
- 
- 	if (!xfs_sb_version_hasftype(&mp->m_sb))
- 		return NULL;
-@@ -262,23 +262,23 @@ alloc_ino_node(
- 	irec->ir_free = (xfs_inofree_t) - 1;
- 	irec->ir_sparse = 0;
- 	irec->ino_un.ex_data = NULL;
--	irec->nlink_size = sizeof(__uint8_t);
-+	irec->nlink_size = sizeof(uint8_t);
- 	irec->disk_nlinks.un8 = alloc_nlink_array(irec->nlink_size);
- 	irec->ftypes = alloc_ftypes_array(mp);
- 	return irec;
- }
- 
- static void
--free_nlink_array(union ino_nlink nlinks, __uint8_t nlink_size)
-+free_nlink_array(union ino_nlink nlinks, uint8_t nlink_size)
- {
- 	switch (nlink_size) {
--	case sizeof(__uint8_t):
-+	case sizeof(uint8_t):
- 		free(nlinks.un8);
- 		break;
--	case sizeof(__uint16_t):
-+	case sizeof(uint16_t):
- 		free(nlinks.un16);
- 		break;
--	case sizeof(__uint32_t):
-+	case sizeof(uint32_t):
- 		free(nlinks.un32);
- 		break;
- 	default:
-@@ -609,7 +609,7 @@ set_inode_parent(
- 	int			i;
- 	int			cnt;
- 	int			target;
--	__uint64_t		bitmask;
-+	uint64_t		bitmask;
- 	parent_entry_t		*tmp;
- 
- 	if (full_ino_ex_data)
-@@ -699,7 +699,7 @@ set_inode_parent(
- xfs_ino_t
- get_inode_parent(ino_tree_node_t *irec, int offset)
- {
--	__uint64_t	bitmask;
-+	uint64_t	bitmask;
- 	parent_list_t	*ptbl;
- 	int		i;
- 	int		target;
-@@ -740,15 +740,15 @@ alloc_ex_data(ino_tree_node_t *irec)
- 	irec->ino_un.ex_data->parents = ptbl;
- 
- 	switch (irec->nlink_size) {
--	case sizeof(__uint8_t):
-+	case sizeof(uint8_t):
- 		irec->ino_un.ex_data->counted_nlinks.un8 =
- 			alloc_nlink_array(irec->nlink_size);
- 		break;
--	case sizeof(__uint16_t):
-+	case sizeof(uint16_t):
- 		irec->ino_un.ex_data->counted_nlinks.un16 =
- 			alloc_nlink_array(irec->nlink_size);
- 		break;
--	case sizeof(__uint32_t):
-+	case sizeof(uint32_t):
- 		irec->ino_un.ex_data->counted_nlinks.un32 =
- 			alloc_nlink_array(irec->nlink_size);
- 		break;
-diff --git a/repair/phase2.c b/repair/phase2.c
-index c21778b8..0085732b 100644
---- a/repair/phase2.c
-+++ b/repair/phase2.c
-@@ -179,7 +179,7 @@ phase2(
- 
- 	bad_ino_btree = 0;
- 
--	set_progress_msg(PROG_FMT_SCAN_AG, (__uint64_t) glob_agcount);
-+	set_progress_msg(PROG_FMT_SCAN_AG, (uint64_t) glob_agcount);
- 
- 	scan_ags(mp, scan_threads);
- 
-diff --git a/repair/phase3.c b/repair/phase3.c
-index 0890a27d..17b1c28d 100644
---- a/repair/phase3.c
-+++ b/repair/phase3.c
-@@ -122,7 +122,7 @@ phase3(
- 	else
- 		do_log(_("        - scan (but don't clear) agi unlinked lists...\n"));
- 
--	set_progress_msg(PROG_FMT_AGI_UNLINKED, (__uint64_t) glob_agcount);
-+	set_progress_msg(PROG_FMT_AGI_UNLINKED, (uint64_t) glob_agcount);
- 
- 	/* first clear the agi unlinked AGI list */
- 	if (!no_modify) {
-@@ -142,7 +142,7 @@ phase3(
- 	do_log(_(
- 	    "        - process known inodes and perform inode discovery...\n"));
- 
--	set_progress_msg(PROG_FMT_PROCESS_INO, (__uint64_t) mp->m_sb.sb_icount);
-+	set_progress_msg(PROG_FMT_PROCESS_INO, (uint64_t) mp->m_sb.sb_icount);
- 
- 	process_ags(mp);
- 
-@@ -152,7 +152,7 @@ phase3(
- 	 * process newly discovered inode chunks
- 	 */
- 	do_log(_("        - process newly discovered inodes...\n"));
--	set_progress_msg(PROG_FMT_NEW_INODES, (__uint64_t) glob_agcount);
-+	set_progress_msg(PROG_FMT_NEW_INODES, (uint64_t) glob_agcount);
- 
- 	counts = calloc(sizeof(*counts), mp->m_sb.sb_agcount);
- 	if (!counts) {
-diff --git a/repair/phase4.c b/repair/phase4.c
-index e59464b1..cc17ec03 100644
---- a/repair/phase4.c
-+++ b/repair/phase4.c
-@@ -290,7 +290,7 @@ phase4(xfs_mount_t *mp)
- 	do_log(_("Phase 4 - check for duplicate blocks...\n"));
- 	do_log(_("        - setting up duplicate extent list...\n"));
- 
--	set_progress_msg(PROG_FMT_DUP_EXTENT, (__uint64_t) glob_agcount);
-+	set_progress_msg(PROG_FMT_DUP_EXTENT, (uint64_t) glob_agcount);
- 
- 	irec = find_inode_rec(mp, XFS_INO_TO_AGNO(mp, mp->m_sb.sb_rootino),
- 				XFS_INO_TO_AGINO(mp, mp->m_sb.sb_rootino));
-@@ -404,7 +404,7 @@ phase4(xfs_mount_t *mp)
- 	reset_bmaps(mp);
- 
- 	do_log(_("        - check for inodes claiming duplicate blocks...\n"));
--	set_progress_msg(PROG_FMT_DUP_BLOCKS, (__uint64_t) mp->m_sb.sb_icount);
-+	set_progress_msg(PROG_FMT_DUP_BLOCKS, (uint64_t) mp->m_sb.sb_icount);
- 
- 	/*
- 	 * ok, now process the inodes -- signal 2-pass check per inode.
-diff --git a/repair/phase5.c b/repair/phase5.c
-index 0b833f13..21dce67a 100644
---- a/repair/phase5.c
-+++ b/repair/phase5.c
-@@ -86,9 +86,9 @@ struct agi_stat {
- 	xfs_agino_t		freecount;
- };
- 
--static __uint64_t	*sb_icount_ag;		/* allocated inodes per ag */
--static __uint64_t	*sb_ifree_ag;		/* free inodes per ag */
--static __uint64_t	*sb_fdblocks_ag;	/* free data blocks per ag */
-+static uint64_t	*sb_icount_ag;		/* allocated inodes per ag */
-+static uint64_t	*sb_ifree_ag;		/* free inodes per ag */
-+static uint64_t	*sb_fdblocks_ag;	/* free data blocks per ag */
- 
- static int
- mk_incore_fstree(xfs_mount_t *mp, xfs_agnumber_t agno)
-@@ -886,10 +886,10 @@ build_freespace_tree(xfs_mount_t *mp, xfs_agnumber_t agno,
-  */
- static void
- init_ino_cursor(xfs_mount_t *mp, xfs_agnumber_t agno, bt_status_t *btree_curs,
--		__uint64_t *num_inos, __uint64_t *num_free_inos, int finobt)
-+		uint64_t *num_inos, uint64_t *num_free_inos, int finobt)
- {
--	__uint64_t		ninos;
--	__uint64_t		nfinos;
-+	uint64_t		ninos;
-+	uint64_t		nfinos;
- 	int			rec_nfinos;
- 	int			rec_ninos;
- 	ino_tree_node_t		*ino_rec;
-@@ -2193,10 +2193,10 @@ phase5_func(
- 	xfs_agnumber_t	agno,
- 	struct xfs_slab	*lost_fsb)
- {
--	__uint64_t	num_inos;
--	__uint64_t	num_free_inos;
--	__uint64_t	finobt_num_inos;
--	__uint64_t	finobt_num_free_inos;
-+	uint64_t	num_inos;
-+	uint64_t	num_free_inos;
-+	uint64_t	finobt_num_inos;
-+	uint64_t	finobt_num_free_inos;
- 	bt_status_t	bno_btree_curs;
- 	bt_status_t	bcnt_btree_curs;
- 	bt_status_t	ino_btree_curs;
-@@ -2471,7 +2471,7 @@ phase5(xfs_mount_t *mp)
- 	int			error;
- 
- 	do_log(_("Phase 5 - rebuild AG headers and trees...\n"));
--	set_progress_msg(PROG_FMT_REBUILD_AG, (__uint64_t )glob_agcount);
-+	set_progress_msg(PROG_FMT_REBUILD_AG, (uint64_t)glob_agcount);
- 
- #ifdef XR_BLD_FREE_TRACE
- 	fprintf(stderr, "inobt level 1, maxrec = %d, minrec = %d\n",
-@@ -2497,15 +2497,15 @@ phase5(xfs_mount_t *mp)
- 	keep_fsinos(mp);
- 
- 	/* allocate per ag counters */
--	sb_icount_ag = calloc(mp->m_sb.sb_agcount, sizeof(__uint64_t));
-+	sb_icount_ag = calloc(mp->m_sb.sb_agcount, sizeof(uint64_t));
- 	if (sb_icount_ag == NULL)
- 		do_error(_("cannot alloc sb_icount_ag buffers\n"));
- 
--	sb_ifree_ag = calloc(mp->m_sb.sb_agcount, sizeof(__uint64_t));
-+	sb_ifree_ag = calloc(mp->m_sb.sb_agcount, sizeof(uint64_t));
- 	if (sb_ifree_ag == NULL)
- 		do_error(_("cannot alloc sb_ifree_ag buffers\n"));
- 
--	sb_fdblocks_ag = calloc(mp->m_sb.sb_agcount, sizeof(__uint64_t));
-+	sb_fdblocks_ag = calloc(mp->m_sb.sb_agcount, sizeof(uint64_t));
- 	if (sb_fdblocks_ag == NULL)
- 		do_error(_("cannot alloc sb_fdblocks_ag buffers\n"));
- 
-diff --git a/repair/phase6.c b/repair/phase6.c
-index 08636dcf..373b1a5b 100644
---- a/repair/phase6.c
-+++ b/repair/phase6.c
-@@ -82,7 +82,7 @@ typedef struct dir_hash_ent {
- 	struct dir_hash_ent	*nextbyhash;	/* next in name bucket */
- 	struct dir_hash_ent	*nextbyorder;	/* next in order added */
- 	xfs_dahash_t		hashval;	/* hash value of name */
--	__uint32_t		address;	/* offset of data entry */
-+	uint32_t		address;	/* offset of data entry */
- 	xfs_ino_t 		inum;		/* inode num of entry */
- 	short			junkit;		/* name starts with / */
- 	short			seen;		/* have seen leaf entry */
-@@ -170,11 +170,11 @@ static int
- dir_hash_add(
- 	xfs_mount_t		*mp,
- 	dir_hash_tab_t		*hashtab,
--	__uint32_t		addr,
-+	uint32_t		addr,
- 	xfs_ino_t		inum,
- 	int			namelen,
- 	unsigned char		*name,
--	__uint8_t		ftype)
-+	uint8_t			ftype)
- {
- 	xfs_dahash_t		hash = 0;
- 	int			byaddr;
-@@ -357,7 +357,7 @@ static void
- dir_hash_update_ftype(
- 	dir_hash_tab_t		*hashtab,
- 	xfs_dir2_dataptr_t	addr,
--	__uint8_t		ftype)
-+	uint8_t			ftype)
- {
- 	int			i;
- 	dir_hash_ent_t		*p;
-@@ -1791,8 +1791,8 @@ longform_dir2_entry_check_data(
- 
- 		/* validate ftype field if supported */
- 		if (xfs_sb_version_hasftype(&mp->m_sb)) {
--			__uint8_t dir_ftype;
--			__uint8_t ino_ftype;
-+			uint8_t dir_ftype;
-+			uint8_t ino_ftype;
- 
- 			dir_ftype = M_DIROPS(mp)->data_get_ftype(dep);
- 			ino_ftype = get_inode_ftype(irec, ino_offset);
-@@ -2703,8 +2703,8 @@ _("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is a duplicate name"),
- 
- 		/* validate ftype field if supported */
- 		if (xfs_sb_version_hasftype(&mp->m_sb)) {
--			__uint8_t dir_ftype;
--			__uint8_t ino_ftype;
-+			uint8_t dir_ftype;
-+			uint8_t ino_ftype;
- 
- 			dir_ftype = M_DIROPS(mp)->sf_get_ftype(sfep);
- 			ino_ftype = get_inode_ftype(irec, ino_offset);
-diff --git a/repair/phase7.c b/repair/phase7.c
-index 8bce117d..4ffb81a8 100644
---- a/repair/phase7.c
-+++ b/repair/phase7.c
-@@ -32,7 +32,7 @@ static void
- update_inode_nlinks(
- 	xfs_mount_t 		*mp,
- 	xfs_ino_t		ino,
--	__uint32_t		nlinks)
-+	uint32_t		nlinks)
- {
- 	xfs_trans_t		*tp;
- 	xfs_inode_t		*ip;
-@@ -104,7 +104,7 @@ do_link_updates(
- {
- 	ino_tree_node_t		*irec;
- 	int			j;
--	__uint32_t		nrefs;
-+	uint32_t		nrefs;
- 
- 	for (irec = findfirst_inode_rec(agno); irec;
- 	     irec = next_ino_rec(irec)) {
-@@ -143,7 +143,7 @@ phase7(
- 	else
- 		do_log(_("Phase 7 - verify link counts...\n"));
- 
--	set_progress_msg(PROGRESS_FMT_CORR_LINK, (__uint64_t) glob_agcount);
-+	set_progress_msg(PROGRESS_FMT_CORR_LINK, (uint64_t) glob_agcount);
- 
- 	create_work_queue(&wq, mp, scan_threads);
- 
-diff --git a/repair/progress.c b/repair/progress.c
-index 2a09b239..99d2658c 100644
---- a/repair/progress.c
-+++ b/repair/progress.c
-@@ -85,8 +85,8 @@ pthread_t	report_thread;
- typedef struct msg_block_s {
- 	pthread_mutex_t	mutex;
- 	progress_rpt_t	*format;
--	__uint64_t	*done;
--	__uint64_t	*total;
-+	uint64_t	*done;
-+	uint64_t	*total;
- 	int		count;
- 	int		interval;
- } msg_block_t;
-@@ -96,14 +96,14 @@ typedef struct phase_times_s {
- 	time_t		start;
- 	time_t		end;
- 	time_t		duration;
--	__uint64_t	item_counts[4];
-+	uint64_t	item_counts[4];
- } phase_times_t;
- static phase_times_t phase_times[8];
- 
- static void *progress_rpt_thread(void *);
- static int current_phase;
- static int running;
--static __uint64_t prog_rpt_total;
-+static uint64_t prog_rpt_total;
- 
- void
- init_progress_rpt (void)
-@@ -113,11 +113,11 @@ init_progress_rpt (void)
- 	 *  allocate the done vector
- 	 */
- 
--	if ((prog_rpt_done = (__uint64_t *)
--		malloc(sizeof(__uint64_t)*glob_agcount)) == NULL ) {
-+	if ((prog_rpt_done = (uint64_t *)
-+		malloc(sizeof(uint64_t)*glob_agcount)) == NULL) {
- 		do_error(_("cannot malloc pointer to done vector\n"));
- 	}
--	bzero(prog_rpt_done, sizeof(__uint64_t)*glob_agcount);
-+	bzero(prog_rpt_done, sizeof(uint64_t)*glob_agcount);
- 
- 	/*
- 	 *  Setup comm block, start the thread
-@@ -165,10 +165,10 @@ progress_rpt_thread (void *p)
- 	timer_t timerid;
- 	struct itimerspec timespec;
- 	char *msgbuf;
--	__uint64_t *donep;
--	__uint64_t sum;
-+	uint64_t *donep;
-+	uint64_t sum;
- 	msg_block_t *msgp = (msg_block_t *)p;
--	__uint64_t percent;
-+	uint64_t percent;
- 
- 	/* It's possible to get here very early w/ no progress msg set */
- 	if (!msgp->format)
-@@ -286,7 +286,7 @@ progress_rpt_thread (void *p)
- }
- 
- int
--set_progress_msg (int report, __uint64_t total)
-+set_progress_msg(int report, uint64_t total)
- {
- 
- 	if (!ag_stride)
-@@ -300,7 +300,7 @@ set_progress_msg (int report, __uint64_t total)
- 
- 	/* reset all the accumulative totals */
- 	if (prog_rpt_done)
--		bzero(prog_rpt_done, sizeof(__uint64_t)*glob_agcount);
-+		bzero(prog_rpt_done, sizeof(uint64_t)*glob_agcount);
- 
- 	if (pthread_mutex_unlock(&global_msgs.mutex))
- 		do_error(_("set_progress_msg: cannot unlock progress mutex\n"));
-@@ -308,14 +308,14 @@ set_progress_msg (int report, __uint64_t total)
- 	return (0);
- }
- 
--__uint64_t
-+uint64_t
- print_final_rpt(void)
- {
- 	int i;
- 	struct tm *tmp;
- 	time_t now;
--	__uint64_t *donep;
--	__uint64_t sum;
-+	uint64_t *donep;
-+	uint64_t sum;
- 	msg_block_t 	*msgp = &global_msgs;
- 	char		msgbuf[DURATION_BUF_SIZE];
- 
-diff --git a/repair/progress.h b/repair/progress.h
-index 33db8344..51526483 100644
---- a/repair/progress.h
-+++ b/repair/progress.h
-@@ -32,8 +32,8 @@
- extern void init_progress_rpt(void);
- extern void stop_progress_rpt(void);
- extern void summary_report(void);
--extern int  set_progress_msg(int report, __uint64_t total);
--extern __uint64_t print_final_rpt(void);
-+extern int  set_progress_msg(int report, uint64_t total);
-+extern uint64_t print_final_rpt(void);
- extern char *timestamp(int end, int phase, char *buf);
- extern char *duration(int val, char *buf);
- extern int do_parallel;
-diff --git a/repair/rmap.c b/repair/rmap.c
-index ab6e5839..01d6f0fc 100644
---- a/repair/rmap.c
-+++ b/repair/rmap.c
-@@ -343,7 +343,7 @@ err:
- 
- static int
- find_first_zero_bit(
--	__uint64_t	mask)
-+	uint64_t	mask)
- {
- 	int		n;
- 	int		b = 0;
-@@ -356,7 +356,7 @@ find_first_zero_bit(
- 
- static int
- popcnt(
--	__uint64_t	mask)
-+	uint64_t	mask)
- {
- 	int		n;
- 	int		b = 0;
-@@ -1064,14 +1064,14 @@ err:
-  * Compare the key fields of two rmap records -- positive if key1 > key2,
-  * negative if key1 < key2, and zero if equal.
-  */
--__int64_t
-+int64_t
- rmap_diffkeys(
- 	struct xfs_rmap_irec	*kp1,
- 	struct xfs_rmap_irec	*kp2)
- {
- 	__u64			oa;
- 	__u64			ob;
--	__int64_t		d;
-+	int64_t			d;
- 	struct xfs_rmap_irec	tmp;
- 
- 	tmp = *kp1;
-@@ -1081,7 +1081,7 @@ rmap_diffkeys(
- 	tmp.rm_flags &= ~XFS_RMAP_REC_FLAGS;
- 	ob = libxfs_rmap_irec_offset_pack(&tmp);
- 
--	d = (__int64_t)kp1->rm_startblock - kp2->rm_startblock;
-+	d = (int64_t)kp1->rm_startblock - kp2->rm_startblock;
- 	if (d)
- 		return d;
- 
-@@ -1192,10 +1192,10 @@ fix_inode_reflink_flags(
- {
- 	struct ino_tree_node	*irec;
- 	int			bit;
--	__uint64_t		was;
--	__uint64_t		is;
--	__uint64_t		diff;
--	__uint64_t		mask;
-+	uint64_t		was;
-+	uint64_t		is;
-+	uint64_t		diff;
-+	uint64_t		mask;
- 	int			error = 0;
- 	xfs_agino_t		agino;
- 
-diff --git a/repair/rmap.h b/repair/rmap.h
-index 752ece82..1616ab7d 100644
---- a/repair/rmap.h
-+++ b/repair/rmap.h
-@@ -44,7 +44,7 @@ extern int rmap_init_cursor(xfs_agnumber_t, struct xfs_slab_cursor **);
- extern void rmap_avoid_check(void);
- extern int rmaps_verify_btree(struct xfs_mount *, xfs_agnumber_t);
- 
--extern __int64_t rmap_diffkeys(struct xfs_rmap_irec *kp1,
-+extern int64_t rmap_diffkeys(struct xfs_rmap_irec *kp1,
- 		struct xfs_rmap_irec *kp2);
- extern void rmap_high_key_from_rec(struct xfs_rmap_irec *rec,
- 		struct xfs_rmap_irec *key);
-diff --git a/repair/sb.c b/repair/sb.c
-index 77e51546..acc92839 100644
---- a/repair/sb.c
-+++ b/repair/sb.c
-@@ -40,7 +40,7 @@ copy_sb(xfs_sb_t *source, xfs_sb_t *dest)
- 	xfs_ino_t	uquotino;
- 	xfs_ino_t	gquotino;
- 	xfs_ino_t	pquotino;
--	__uint16_t	versionnum;
-+	uint16_t	versionnum;
- 
- 	rootino = dest->sb_rootino;
- 	rbmino = dest->sb_rbmino;
-@@ -106,8 +106,8 @@ verify_sb_blocksize(xfs_sb_t *sb)
- static int
- __find_secondary_sb(
- 	xfs_sb_t	*rsb,
--	__uint64_t	start,
--	__uint64_t	skip)
-+	uint64_t	start,
-+	uint64_t	skip)
- {
- 	xfs_off_t	off;
- 	xfs_sb_t	*sb;
-@@ -187,13 +187,13 @@ __find_secondary_sb(
- 
- static int
- guess_default_geometry(
--	__uint64_t		*agsize,
--	__uint64_t		*agcount,
-+	uint64_t		*agsize,
-+	uint64_t		*agcount,
- 	libxfs_init_t		*x)
- {
- 	struct fs_topology	ft;
- 	int			blocklog;
--	__uint64_t		dblocks;
-+	uint64_t		dblocks;
- 	int			multidisk;
- 
- 	memset(&ft, 0, sizeof(ft));
-@@ -216,9 +216,9 @@ int
- find_secondary_sb(xfs_sb_t *rsb)
- {
- 	int		retval = 0;
--	__uint64_t	agcount;
--	__uint64_t	agsize;
--	__uint64_t	skip;
-+	uint64_t	agcount;
-+	uint64_t	agsize;
-+	uint64_t	skip;
- 	int		blocklog;
- 
- 	/*
-@@ -229,7 +229,7 @@ find_secondary_sb(xfs_sb_t *rsb)
- 	do_warn(_("\nattempting to find secondary superblock...\n"));
- 
- 	if (verify_sb_blocksize(rsb) == 0) {
--		skip = (__uint64_t)rsb->sb_agblocks * rsb->sb_blocksize;
-+		skip = (uint64_t)rsb->sb_agblocks * rsb->sb_blocksize;
- 		if (skip >= XFS_AG_MIN_BYTES && skip <= XFS_AG_MAX_BYTES)
- 			retval = __find_secondary_sb(rsb, skip, skip);
- 	}
-@@ -343,7 +343,7 @@ sb_validate_ino_align(struct xfs_sb *sb)
- int
- verify_sb(char *sb_buf, xfs_sb_t *sb, int is_primary_sb)
- {
--	__uint32_t	bsize;
-+	uint32_t	bsize;
- 	int		i;
- 	int		ret;
- 
-@@ -399,7 +399,7 @@ verify_sb(char *sb_buf, xfs_sb_t *sb, int is_primary_sb)
- 		sb->sb_dblocks < XFS_MIN_DBLOCKS(sb))
- 		return(XR_BAD_FS_SIZE_DATA);
- 
--	if (sb->sb_agblklog != (__uint8_t)libxfs_log2_roundup(sb->sb_agblocks))
-+	if (sb->sb_agblklog != (uint8_t)libxfs_log2_roundup(sb->sb_agblocks))
- 		return(XR_BAD_FS_SIZE_DATA);
- 
- 	if (sb->sb_inodesize < XFS_DINODE_MIN_SIZE                     ||
-diff --git a/repair/scan.c b/repair/scan.c
-index b9ef4dc3..447611ac 100644
---- a/repair/scan.c
-+++ b/repair/scan.c
-@@ -42,13 +42,13 @@ struct aghdr_cnts {
- 	xfs_agnumber_t	agno;
- 	xfs_extlen_t	agffreeblks;
- 	xfs_extlen_t	agflongest;
--	__uint64_t	agfbtreeblks;
--	__uint32_t	agicount;
--	__uint32_t	agifreecount;
--	__uint64_t	fdblocks;
--	__uint64_t	usedblocks;
--	__uint64_t	ifreecount;
--	__uint32_t	fibtfreecount;
-+	uint64_t	agfbtreeblks;
-+	uint32_t	agicount;
-+	uint32_t	agifreecount;
-+	uint64_t	fdblocks;
-+	uint64_t	usedblocks;
-+	uint64_t	ifreecount;
-+	uint32_t	fibtfreecount;
- };
- 
- void
-@@ -70,10 +70,10 @@ scan_sbtree(
- 				xfs_agnumber_t		agno,
- 				int			suspect,
- 				int			isroot,
--				__uint32_t		magic,
-+				uint32_t		magic,
- 				void			*priv),
- 	int		isroot,
--	__uint32_t	magic,
-+	uint32_t	magic,
- 	void		*priv,
- 	const struct xfs_buf_ops *ops)
- {
-@@ -110,23 +110,23 @@ scan_lbtree(
- 				xfs_fsblock_t		bno,
- 				xfs_ino_t		ino,
- 				xfs_rfsblock_t		*tot,
--				__uint64_t		*nex,
-+				uint64_t		*nex,
- 				blkmap_t		**blkmapp,
- 				bmap_cursor_t		*bm_cursor,
- 				int			isroot,
- 				int			check_dups,
- 				int			*dirty,
--				__uint64_t		magic),
-+				uint64_t		magic),
- 	int		type,
- 	int		whichfork,
- 	xfs_ino_t	ino,
- 	xfs_rfsblock_t	*tot,
--	__uint64_t	*nex,
-+	uint64_t	*nex,
- 	blkmap_t	**blkmapp,
- 	bmap_cursor_t	*bm_cursor,
- 	int		isroot,
- 	int		check_dups,
--	__uint64_t	magic,
-+	uint64_t	magic,
- 	const struct xfs_buf_ops *ops)
- {
- 	xfs_buf_t	*bp;
-@@ -179,13 +179,13 @@ scan_bmapbt(
- 	xfs_fsblock_t		bno,
- 	xfs_ino_t		ino,
- 	xfs_rfsblock_t		*tot,
--	__uint64_t		*nex,
-+	uint64_t		*nex,
- 	blkmap_t		**blkmapp,
- 	bmap_cursor_t		*bm_cursor,
- 	int			isroot,
- 	int			check_dups,
- 	int			*dirty,
--	__uint64_t		magic)
-+	uint64_t		magic)
- {
- 	int			i;
- 	int			err;
-@@ -548,7 +548,7 @@ scan_allocbt(
- 	xfs_agnumber_t		agno,
- 	int			suspect,
- 	int			isroot,
--	__uint32_t		magic,
-+	uint32_t		magic,
- 	void			*priv)
- {
- 	struct aghdr_cnts	*agcnts = priv;
-@@ -930,7 +930,7 @@ scan_rmapbt(
- 	xfs_agnumber_t		agno,
- 	int			suspect,
- 	int			isroot,
--	__uint32_t		magic,
-+	uint32_t		magic,
- 	void			*priv)
- {
- 	const char		*name = "rmap";
-@@ -1233,7 +1233,7 @@ scan_refcbt(
- 	xfs_agnumber_t		agno,
- 	int			suspect,
- 	int			isroot,
--	__uint32_t		magic,
-+	uint32_t		magic,
- 	void			*priv)
- {
- 	const char		*name = "refcount";
-@@ -1939,7 +1939,7 @@ scan_inobt(
- 	xfs_agnumber_t		agno,
- 	int			suspect,
- 	int			isroot,
--	__uint32_t		magic,
-+	uint32_t		magic,
- 	void			*priv)
- {
- 	struct aghdr_cnts	*agcnts = priv;
-@@ -2176,7 +2176,7 @@ validate_agf(
- 	struct aghdr_cnts	*agcnts)
- {
- 	xfs_agblock_t		bno;
--	__uint32_t		magic;
-+	uint32_t		magic;
- 
- 	bno = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]);
- 	if (bno != 0 && verify_agbno(mp, agno, bno)) {
-@@ -2274,7 +2274,7 @@ validate_agi(
- {
- 	xfs_agblock_t		bno;
- 	int			i;
--	__uint32_t		magic;
-+	uint32_t		magic;
- 
- 	bno = be32_to_cpu(agi->agi_root);
- 	if (bno != 0 && verify_agbno(mp, agno, bno)) {
-@@ -2499,10 +2499,10 @@ scan_ags(
- 	int			scan_threads)
- {
- 	struct aghdr_cnts *agcnts;
--	__uint64_t	fdblocks = 0;
--	__uint64_t	icount = 0;
--	__uint64_t	ifreecount = 0;
--	__uint64_t	usedblocks = 0;
-+	uint64_t	fdblocks = 0;
-+	uint64_t	icount = 0;
-+	uint64_t	ifreecount = 0;
-+	uint64_t	usedblocks = 0;
- 	xfs_agnumber_t	i;
- 	work_queue_t	wq;
- 
-diff --git a/repair/scan.h b/repair/scan.h
-index ea8c0bf2..9bbe1e69 100644
---- a/repair/scan.h
-+++ b/repair/scan.h
-@@ -30,23 +30,23 @@ int scan_lbtree(
- 				xfs_fsblock_t		bno,
- 				xfs_ino_t		ino,
- 				xfs_rfsblock_t		*tot,
--				__uint64_t		*nex,
-+				uint64_t		*nex,
- 				struct blkmap		**blkmapp,
- 				bmap_cursor_t		*bm_cursor,
- 				int			isroot,
- 				int			check_dups,
- 				int			*dirty,
--				__uint64_t		magic),
-+				uint64_t		magic),
- 	int		type,
- 	int		whichfork,
- 	xfs_ino_t	ino,
- 	xfs_rfsblock_t	*tot,
--	__uint64_t	*nex,
-+	uint64_t	*nex,
- 	struct blkmap	**blkmapp,
- 	bmap_cursor_t	*bm_cursor,
- 	int		isroot,
- 	int		check_dups,
--	__uint64_t	magic,
-+	uint64_t	magic,
- 	const struct xfs_buf_ops *ops);
- 
- int scan_bmapbt(
-@@ -57,13 +57,13 @@ int scan_bmapbt(
- 	xfs_fsblock_t		bno,
- 	xfs_ino_t		ino,
- 	xfs_rfsblock_t		*tot,
--	__uint64_t		*nex,
-+	uint64_t		*nex,
- 	struct blkmap		**blkmapp,
- 	bmap_cursor_t		*bm_cursor,
- 	int			isroot,
- 	int			check_dups,
- 	int			*dirty,
--	__uint64_t		magic);
-+	uint64_t		magic);
- 
- void
- scan_ags(
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/remove_flags_from_build_flags.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/remove_flags_from_build_flags.patch
index bba9a25..bd2d025 100644
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/remove_flags_from_build_flags.patch
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/remove_flags_from_build_flags.patch
@@ -1,13 +1,13 @@
-Index: xfsprogs-4.12.0/include/builddefs.in
+Index: xfsprogs-4.14.0/include/builddefs.in
 ===================================================================
---- xfsprogs-4.12.0.orig/include/builddefs.in
-+++ xfsprogs-4.12.0/include/builddefs.in
-@@ -164,7 +164,7 @@ ifeq ($(ENABLE_GETTEXT),yes)
+--- xfsprogs-4.14.0.orig/include/builddefs.in
++++ xfsprogs-4.14.0/include/builddefs.in
+@@ -168,7 +168,7 @@ ifeq ($(ENABLE_GETTEXT),yes)
  GCFLAGS += -DENABLE_GETTEXT
  endif
  
 -BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
 +BUILD_CFLAGS += $(GCFLAGS)
- # First, Global, Platform, Local CFLAGS
- CFLAGS += $(FCFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
+ # First, Sanitizer, Global, Platform, Local CFLAGS
+ CFLAGS += $(FCFLAGS) $(SANITIZER_CFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
  
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch
deleted file mode 100644
index efc57e4..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 21253610f9ef87db8e2a75b863b7fcfbd0cdb421 Mon Sep 17 00:00:00 2001
-From: "Darrick J. Wong" <darrick.wong@oracle.com>
-Date: Tue, 25 Jul 2017 13:45:01 -0500
-Subject: [PATCH] In patch 4944defad4 ("xfs_db: redirect printfs when
- metadumping to stdout"), we solved the problem of xfs_db printfs ending up in
- the metadump stream by reassigning stdout for the duration of a stdout
- metadump.  Unfortunately, musl doesn't allow stdout to be reassigned (in
- their view "extern FILE *stdout" means "extern FILE * const stdout"), so we
- abandon the old approach in favor of playing games with dup() to switch the
- raw file descriptors.
-
-While we're at it, fix a regression where an unconverted outf test
-allows progress info to end up in the metadump stream.
-
-Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
----
- db/metadump.c | 47 ++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 36 insertions(+), 11 deletions(-)
-
-diff --git a/db/metadump.c b/db/metadump.c
-index 96641e0..4e2f648 100644
---- a/db/metadump.c
-+++ b/db/metadump.c
-@@ -78,6 +78,7 @@ static int		obfuscate = 1;
- static int		zero_stale_data = 1;
- static int		show_warnings = 0;
- static int		progress_since_warning = 0;
-+static bool		stdout_metadump;
- 
- void
- metadump_init(void)
-@@ -137,7 +138,7 @@ print_progress(const char *fmt, ...)
- 	va_end(ap);
- 	buf[sizeof(buf)-1] = '\0';
- 
--	f = (outf == stdout) ? stderr : stdout;
-+	f = stdout_metadump ? stderr : stdout;
- 	fprintf(f, "\r%-59s", buf);
- 	fflush(f);
- 	progress_since_warning = 1;
-@@ -2750,7 +2751,8 @@ metadump_f(
- 	xfs_agnumber_t	agno;
- 	int		c;
- 	int		start_iocur_sp;
--	bool		stdout_metadump = false;
-+	int		outfd = -1;
-+	int		ret;
- 	char		*p;
- 
- 	exitcode = 1;
-@@ -2870,16 +2872,35 @@ metadump_f(
- 		 * metadump operation so that dbprintf and other messages
- 		 * are sent to the console instead of polluting the
- 		 * metadump stream.
-+		 *
-+		 * We get to do this the hard way because musl doesn't
-+		 * allow reassignment of stdout.
- 		 */
--		outf = stdout;
--		stdout = stderr;
-+		fflush(stdout);
-+		outfd = dup(STDOUT_FILENO);
-+		if (outfd < 0) {
-+			perror("opening dump stream");
-+			goto out;
-+		}
-+		ret = dup2(STDERR_FILENO, STDOUT_FILENO);
-+		if (ret < 0) {
-+			perror("redirecting stdout");
-+			close(outfd);
-+			goto out;
-+		}
-+		outf = fdopen(outfd, "a");
-+		if (outf == NULL) {
-+			fprintf(stderr, "cannot create dump stream\n");
-+			dup2(outfd, 1);
-+			close(outfd);
-+			goto out;
-+		}
- 		stdout_metadump = true;
- 	} else {
- 		outf = fopen(argv[optind], "wb");
- 		if (outf == NULL) {
- 			print_warning("cannot create dump file");
--			free(metablock);
--			return 0;
-+			goto out;
- 		}
- 	}
- 
-@@ -2907,15 +2928,19 @@ metadump_f(
- 	if (progress_since_warning)
- 		fputc('\n', stdout_metadump ? stderr : stdout);
- 
--	if (stdout_metadump)
--		stdout = outf;
--	else
--		fclose(outf);
-+	if (stdout_metadump) {
-+		fflush(outf);
-+		fflush(stdout);
-+		ret = dup2(outfd, STDOUT_FILENO);
-+		if (ret < 0)
-+			perror("un-redirecting stdout");
-+	}
-+	fclose(outf);
- 
- 	/* cleanup iocur stack */
- 	while (iocur_sp > start_iocur_sp)
- 		pop_cur();
--
-+out:
- 	free(metablock);
- 
- 	return 0;
--- 
-2.13.3
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.12.0.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.12.0.bb
deleted file mode 100644
index 0788695..0000000
--- a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.12.0.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-SUMMARY = "XFS Filesystem Utilities"
-HOMEPAGE = "http://oss.sgi.com/projects/xfs"
-SECTION = "base"
-LICENSE = "GPLv2 & LGPLv2.1"
-LICENSE_libhandle = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://doc/COPYING;md5=102f7fec3d53c7c8f0b7baf9bf9d76a8"
-DEPENDS = "util-linux util-linux-native"
-SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \
-           file://0001-xfsprogs-remove-double-underscore-integer-types.patch \
-           file://0001-xfs-remove-double-underscore-integer-types.patch \
-           file://remove_flags_from_build_flags.patch \
-           file://xfsprogs-4.12.0-fix_musl.patch \
-           "
-SRC_URI[md5sum] = "e348b0e1d7bd1cd82d64b91ff37e727e"
-SRC_URI[sha256sum] = "b330ad8d737f4152ae511580102e2fc49212bb51dfb4b614084344abae46d0df"
-
-inherit autotools-brokensep
-
-PACKAGES =+ "${PN}-fsck ${PN}-mkfs ${PN}-repair libhandle"
-
-DEPENDS += "util-linux"
-
-RDEPENDS_${PN} = "${PN}-fsck ${PN}-mkfs ${PN}-repair"
-
-FILES_${PN}-fsck = "${base_sbindir}/fsck.xfs"
-FILES_${PN}-mkfs = "${base_sbindir}/mkfs.xfs"
-FILES_${PN}-repair = "${base_sbindir}/xfs_repair"
-
-FILES_libhandle = "${base_libdir}/libhandle${SOLIBS}"
-
-EXTRA_OECONF = "--enable-gettext=no \
-                INSTALL_USER=root \
-                INSTALL_GROUP=root \
-                ac_cv_header_aio_h=yes \
-                ac_cv_lib_rt_lio_listio=yes \
-"
-
-DISABLE_STATIC = ""
-EXTRA_AUTORECONF += "-I ${S}/m4 --exclude=autoheader"
-
-PACKAGECONFIG ??= "readline blkid"
-
-PACKAGECONFIG[readline] = "--enable-readline=yes,--enable-readline=no,readline"
-PACKAGECONFIG[blkid] = "--enable-blkid=yes,--enable-blkid=no,util-linux"
-
-export DEBUG="-DNDEBUG"
-export BUILD_VERBOSE="1"
-export tagname="CC"
-
-EXTRA_OEMAKE = "DIST_ROOT='${D}'"
-
-do_configure_prepend () {
-    export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}"
-    # Prevent Makefile from calling configure without arguments,
-    # when do_configure gets called for a second time.
-    rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure
-    # Recreate configure script.
-    oe_runmake configure
-}
-
-do_install_append() {
-        oe_runmake 'DESTDIR=${D}' install-dev
-        rm ${D}${libdir}/*.la
-        rmdir --ignore-fail-on-non-empty ${D}${libdir}
-}
diff --git a/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.14.0.bb b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.14.0.bb
new file mode 100644
index 0000000..5d76afe
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.14.0.bb
@@ -0,0 +1,63 @@
+SUMMARY = "XFS Filesystem Utilities"
+HOMEPAGE = "http://oss.sgi.com/projects/xfs"
+SECTION = "base"
+LICENSE = "GPLv2 & LGPLv2.1"
+LICENSE_libhandle = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=102f7fec3d53c7c8f0b7baf9bf9d76a8"
+DEPENDS = "util-linux util-linux-native"
+SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \
+           file://remove_flags_from_build_flags.patch \
+           file://0001-build-Check-for-sync_file_range-libc-function.patch \
+           "
+SRC_URI[md5sum] = "2d50e3751cc98e6c9364bc3d2297b9fd"
+SRC_URI[sha256sum] = "b1b710b268bc95d6f45eca06e1262c29eb38865a19cd4404e48ba446e043b7ec"
+
+inherit autotools-brokensep
+
+PACKAGES =+ "${PN}-fsck ${PN}-mkfs ${PN}-repair libhandle"
+
+DEPENDS += "util-linux"
+
+RDEPENDS_${PN} = "${PN}-fsck ${PN}-mkfs ${PN}-repair"
+
+FILES_${PN}-fsck = "${base_sbindir}/fsck.xfs"
+FILES_${PN}-mkfs = "${base_sbindir}/mkfs.xfs"
+FILES_${PN}-repair = "${base_sbindir}/xfs_repair"
+
+FILES_libhandle = "${base_libdir}/libhandle${SOLIBS}"
+
+EXTRA_OECONF = "--enable-gettext=no \
+                INSTALL_USER=root \
+                INSTALL_GROUP=root \
+                ac_cv_header_aio_h=yes \
+                ac_cv_lib_rt_lio_listio=yes \
+"
+
+DISABLE_STATIC = ""
+EXTRA_AUTORECONF += "-I ${S}/m4 --exclude=autoheader"
+
+PACKAGECONFIG ??= "readline blkid"
+
+PACKAGECONFIG[readline] = "--enable-readline=yes,--enable-readline=no,readline"
+PACKAGECONFIG[blkid] = "--enable-blkid=yes,--enable-blkid=no,util-linux"
+
+export DEBUG="-DNDEBUG"
+export BUILD_VERBOSE="1"
+export tagname="CC"
+
+EXTRA_OEMAKE = "DIST_ROOT='${D}'"
+
+do_configure_prepend () {
+    export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}"
+    # Prevent Makefile from calling configure without arguments,
+    # when do_configure gets called for a second time.
+    rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure
+    # Recreate configure script.
+    oe_runmake configure
+}
+
+do_install_append() {
+        oe_runmake 'DESTDIR=${D}' install-dev
+        rm ${D}${libdir}/*.la
+        rmdir --ignore-fail-on-non-empty ${D}${libdir}
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/README b/import-layers/meta-openembedded/meta-gnome/README
index 25ef85d..2a682e7 100644
--- a/import-layers/meta-openembedded/meta-gnome/README
+++ b/import-layers/meta-openembedded/meta-gnome/README
@@ -1,17 +1,38 @@
+meta-gnome
+===========
+
+The recipe in this layer needs to have 'x11' in DISTRO_FEATURES 
+to have effect. To enable them, add in configuration file the following line.
+
+  DISTRO_FEATURES_append = " x11"
+
+If meta-gnome is included, but x11 is not enabled as a
+distro feature a warning is printed at parse time:
+
+    You have included the meta-gnome layer, but
+    'x11' has not been enabled in your DISTRO_FEATURES.
+
+If you know what you are doing, this warning can be disabled by setting the following
+variable in your configuration:
+
+  SKIP_META_GNOME_SANITY_CHECK = 1
+
+
+Dependencies
+------------
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: rocko
+branch: master
 revision: HEAD
 
 URI: git://github.com/openembedded/meta-oe.git
-branch: rocko
+branch: master
 revision: HEAD
 
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-gnome][rocko]' in the subject'
+Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-gnome]' in the subject'
 
 When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-gnome][rocko][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-gnome][PATCH'
 
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
+Layer maintainer: Andreas Müller <schnitzeltony@googlemail.com>
diff --git a/import-layers/meta-openembedded/meta-gnome/classes/sanity-meta-gnome.bbclass b/import-layers/meta-openembedded/meta-gnome/classes/sanity-meta-gnome.bbclass
new file mode 100644
index 0000000..331ea19
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/classes/sanity-meta-gnome.bbclass
@@ -0,0 +1,10 @@
+addhandler gnome_bbappend_distrocheck
+gnome_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck"
+python gnome_bbappend_distrocheck() {
+    skip_check = e.data.getVar('SKIP_META_GNOME_SANITY_CHECK') == "1"
+    if 'x11' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
+        bb.warn("You have included the meta-gnome layer, but \
+'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
+may not take effect. See the meta-gnome README for details on enabling \
+meta-gnome support.")
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/conf/layer.conf b/import-layers/meta-openembedded/meta-gnome/conf/layer.conf
index a138818..e6e9532 100644
--- a/import-layers/meta-openembedded/meta-gnome/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-gnome/conf/layer.conf
@@ -14,4 +14,8 @@
 
 LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
 
-AVAHI_GTK_pn-avahi-ui = "gtk gtk3"
+LAYERSERIES_COMPAT_gnome-layer = "sumo"
+
+# Sanity check for meta-gnome layer.
+# Setting SKIP_META_GNOME_SANITY_CHECK to "1" would skip the bbappend files check.
+INHERIT += "sanity-meta-gnome"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb b/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb
deleted file mode 100644
index 14b336a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.4.4.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "GTK+ applet for NetworkManager"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-DEPENDS = "gtk+3 libnotify libsecret networkmanager dbus-glib \
-           gconf libgnome-keyring iso-codes nss \
-           intltool-native \
-"
-
-inherit gnomebase gsettings gtk-icon-cache gobject-introspection
-
-GNOME_COMPRESS_TYPE = "xz"
-
-SRC_URI[archive.md5sum] = "3f82cedc4703df0277c76d9feb5bf2c8"
-SRC_URI[archive.sha256sum] = "693846eeae0986e79eb1cedfbc499f132f27a9976ef189a0f16938ac59ec3226"
-
-PACKAGECONFIG[modemmanager] = "--with-wwan,--without-wwan,modemmanager"
-PACKAGECONFIG ??= ""
-
-GI_DATA_ENABLED_libc-musl = "False"
-
-do_configure_append() {
-    # Sigh... --enable-compile-warnings=no doesn't actually turn off -Werror
-    for i in $(find ${B} -name "Makefile") ; do
-        sed -i -e s%-Werror[^[:space:]]*%%g $i
-    done
-}
-
-RDEPENDS_${PN} =+ "networkmanager"
-
-FILES_${PN} += " \
-    ${datadir}/appdata \
-    ${datadir}/nm-applet/ \
-    ${datadir}/libnm-gtk/wifi.ui \
-    ${datadir}/libnma/wifi.ui \
-"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.8.10.bb b/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.8.10.bb
new file mode 100644
index 0000000..dc2b964
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.8.10.bb
@@ -0,0 +1,45 @@
+SUMMARY = "GTK+ applet for NetworkManager"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "gtk+3 libnotify libsecret networkmanager dbus-glib \
+           gconf libgnome-keyring iso-codes nss \
+           intltool-native \
+"
+
+inherit distro_features_check gnomebase gsettings gtk-icon-cache gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.md5sum] = "eae3be75e77ff1a7ea3174be25e62d03"
+SRC_URI[archive.sha256sum] = "0adc4bfae8b49f7a1d929c22ef20933bd41fb4a8b458280f44c65f9e45b4c9c3"
+
+PACKAGECONFIG[modemmanager] = "--with-wwan,--without-wwan,modemmanager"
+PACKAGECONFIG ??= ""
+
+EXTRA_OECONF = " \
+    --without-selinux \
+"
+
+do_configure_append() {
+    # Sigh... --enable-compile-warnings=no doesn't actually turn off -Werror
+    for i in $(find ${B} -name "Makefile") ; do
+        sed -i -e s%-Werror[^[:space:]]*%%g $i
+    done
+}
+
+# gobject-introspection related
+GI_DATA_ENABLED_libc-musl = "False"
+
+do_compile_prepend() {
+    export GIR_EXTRA_LIBS_PATH="${B}/src/libnma/.libs:${B}/src/libnm-gtk/.libs"
+}
+
+RDEPENDS_${PN} =+ "networkmanager"
+
+FILES_${PN} += " \
+    ${datadir}/appdata \
+    ${datadir}/nm-applet/ \
+    ${datadir}/libnm-gtk/wifi.ui \
+    ${datadir}/libnma/wifi.ui \
+"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/obex/obexd/ssize_t_definition.patch b/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/obex/obexd/ssize_t_definition.patch
index 2009dcd..570cb9e 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/obex/obexd/ssize_t_definition.patch
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-connectivity/obex/obexd/ssize_t_definition.patch
@@ -1,4 +1,7 @@
-include unistd.h to get ssize_t definitions
+From fb5056fea9559b3ec3bb61967a112b6c793b700d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Jan 2013 21:33:34 -0800
+Subject: [PATCH] include unistd.h to get ssize_t definitions
 
 Fixes errors like
 
@@ -18,15 +21,20 @@
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: obexd-0.44/plugins/mas.c
-===================================================================
---- obexd-0.44.orig/plugins/mas.c	2012-01-11 14:53:53.000000000 -0800
-+++ obexd-0.44/plugins/mas.c	2013-01-08 12:51:12.681882174 -0800
-@@ -29,6 +29,7 @@
+
+---
+ plugins/mas.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/plugins/mas.c b/plugins/mas.c
+index 1b18059..b519507 100644
+--- a/plugins/mas.c
++++ b/plugins/mas.c
+@@ -30,6 +30,7 @@
  #include <glib.h>
  #include <fcntl.h>
  #include <inttypes.h>
 +#include <unistd.h>
  
- #include "obexd.h"
- #include "plugin.h"
+ #include <gobex/gobex.h>
+ #include <gobex/gobex-apparam.h>
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0001-Add-G_GNUC_PRINTF-on-functions-with-format-strings.patch b/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3/0001-Add-G_GNUC_PRINTF-on-functions-with-format-strings.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0001-Add-G_GNUC_PRINTF-on-functions-with-format-strings.patch
rename to import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3/0001-Add-G_GNUC_PRINTF-on-functions-with-format-strings.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch b/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch
rename to import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3/0001-gnome-doc-utils.make-sysrooted-pkg-config.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0002-fix-gcc-6-build.patch b/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3/0002-fix-gcc-6-build.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3/0002-fix-gcc-6-build.patch
rename to import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3/0002-fix-gcc-6-build.patch
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3_%.bbappend b/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3_%.bbappend
deleted file mode 100644
index 3abacfb..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-PACKAGECONFIG ??= "gnome"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3_3.8.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3_3.8.5.bb
new file mode 100644
index 0000000..c3da3e9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-devtools/glade/glade3_3.8.5.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Glade - A User Interface Designer"
+HOMEPAGE = "http://www.gnu.org/software/gnash"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \
+                    file://COPYING.GPL;md5=9ac2e7cff1ddaf48b6eab6028f23ef88 \
+                    file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475"
+DEPENDS = "gtk+ gnome-doc-utils gnome-common libxml2 intltool-native"
+
+inherit distro_features_check autotools pkgconfig pythonnative gtk-icon-cache
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade3/3.8/glade3-${PV}.tar.xz \
+           file://0001-gnome-doc-utils.make-sysrooted-pkg-config.patch \
+           file://0002-fix-gcc-6-build.patch \
+           file://0001-Add-G_GNUC_PRINTF-on-functions-with-format-strings.patch \
+           "
+SRC_URI[md5sum] = "4e4b4f5ee34a03e017e4cef97d796c1f"
+SRC_URI[sha256sum] = "58a5f6e4df4028230ddecc74c564808b7ec4471b1925058e29304f778b6b2735"
+
+EXTRA_OECONF += "--disable-scrollkeeper"
+
+FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.28.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.28.1.bb
deleted file mode 100644
index 83ab6f2..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.28.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "A partition editor to graphically manage disk partitions "
-HOMEPAGE = "http://gparted.org/index.php"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-inherit autotools pkgconfig gtk-icon-cache
-
-SRC_URI = " \
-    ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
-    file://org.yoctoproject.pkexec.run-gparted.policy \
-    file://gparted_polkit \
-"
-SRC_URI[md5sum] = "ab72464a3ab2137664d9df8462befd3f"
-SRC_URI[sha256sum] = "76891f14394754f7d6ecceba2af0e585bf89f9d780c389a255dcd41a2f45d333"
-
-DEPENDS = "glib-2.0 glib-2.0-native gtkmm parted gnome-doc-utils intltool-native"
-
-do_install_append() {
-    # Add a script which checks if polkit is installed.
-    # If yes: a policy is requested from polkit / otherwise start as usual
-    install ${WORKDIR}/gparted_polkit ${D}${sbindir}
-    sed -i 's:%sbindir%:${sbindir}:g' ${D}${sbindir}/gparted_polkit
-    # relink menu entry to use our script
-    sed -i 's:${sbindir}/gparted:${sbindir}/gparted_polkit:g' ${D}${datadir}/applications/gparted.desktop
-
-    install -d ${D}${datadir}/polkit-1/actions
-    install ${WORKDIR}/org.yoctoproject.pkexec.run-gparted.policy ${D}${datadir}/polkit-1/actions/org.yoctoproject.pkexec.run-gparted.policy
-}
-
-EXTRA_OECONF = "--disable-scrollkeeper --disable-doc"
-
-FILES_${PN} += " \
-    ${datadir}/appdata \
-    ${datadir}/icons \
-    ${datadir}/polkit-1 \
-"
-
-RDEPENDS_${PN} = "dosfstools mtools e2fsprogs"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.31.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.31.0.bb
new file mode 100644
index 0000000..58beaf6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-extended/gparted/gparted_0.31.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "A partition editor to graphically manage disk partitions "
+HOMEPAGE = "http://gparted.org/index.php"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit distro_features_check autotools pkgconfig gtk-icon-cache
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = " \
+    ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
+    file://org.yoctoproject.pkexec.run-gparted.policy \
+    file://gparted_polkit \
+"
+SRC_URI[md5sum] = "c554cc5734c50459dd551bd3fa10710e"
+SRC_URI[sha256sum] = "3b7b49a434d9e4b397bc41a1f5acab8539b9ff402b472dfd83ad77b2decd07ba"
+
+DEPENDS = "glib-2.0 glib-2.0-native gtkmm parted gnome-doc-utils intltool-native"
+
+do_install_append() {
+    # Add a script which checks if polkit is installed.
+    # If yes: a policy is requested from polkit / otherwise start as usual
+    install ${WORKDIR}/gparted_polkit ${D}${sbindir}
+    sed -i 's:%sbindir%:${sbindir}:g' ${D}${sbindir}/gparted_polkit
+    # relink menu entry to use our script
+    sed -i 's:${sbindir}/gparted:${sbindir}/gparted_polkit:g' ${D}${datadir}/applications/gparted.desktop
+
+    install -d ${D}${datadir}/polkit-1/actions
+    install ${WORKDIR}/org.yoctoproject.pkexec.run-gparted.policy ${D}${datadir}/polkit-1/actions/org.yoctoproject.pkexec.run-gparted.policy
+}
+
+EXTRA_OECONF = "--disable-scrollkeeper --disable-doc"
+
+FILES_${PN} += " \
+    ${datadir}/appdata \
+    ${datadir}/icons \
+    ${datadir}/polkit-1 \
+"
+
+RDEPENDS_${PN} = "dosfstools mtools e2fsprogs"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb
index 2a13e48..d2c0186 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/abiword/abiword_3.0.2.bb
@@ -8,7 +8,6 @@
     gtk+ \
     gtkmathview \
     wv \
-    libglade \
     libfribidi \
     jpeg \
     libpng \
@@ -38,7 +37,9 @@
 #want 3.x from 3.x.y for the installation directory
 SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
 
-inherit autotools-brokensep pkgconfig
+inherit distro_features_check autotools-brokensep pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGECONFIG ??= " \
     collab-backend-xmpp collab-backend-tcp \
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch
deleted file mode 100644
index e9aebb8..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From b75879e8c3e24d338c0e5843d616bc9b02da4d04 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 26 Aug 2017 09:52:17 -0700
-Subject: [PATCH] bonobo-ui-node: qualify functions with G_GNUC_PRINTF
-
-This helps compiler in doing format checking correctly
-Fixes
-bonobo-ui-node.c:864:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
-|         g_logv   ("XML", G_LOG_LEVEL_ERROR, msg, args);
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- bonobo/bonobo-ui-node.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/bonobo/bonobo-ui-node.c b/bonobo/bonobo-ui-node.c
-index 9bab5e5..6ec66e2 100644
---- a/bonobo/bonobo-ui-node.c
-+++ b/bonobo/bonobo-ui-node.c
-@@ -835,7 +835,7 @@ uiCharacters (ParseState *ps, const xmlChar *chars, int len)
- 	g_string_append_len (ps->content, chars, len);
- }
- 
--static void
-+static G_GNUC_PRINTF(2, 3) void
- uiWarning (ParseState *ps, const char *msg, ...)
- {
- 	va_list args;
-@@ -845,7 +845,7 @@ uiWarning (ParseState *ps, const char *msg, ...)
- 	va_end   (args);
- }
- 
--static void
-+static G_GNUC_PRINTF(2, 3) void
- uiError (ParseState *ps, const char *msg, ...)
- {
- 	va_list args;
-@@ -855,7 +855,7 @@ uiError (ParseState *ps, const char *msg, ...)
- 	va_end   (args);
- }
- 
--static void
-+static G_GNUC_PRINTF(2, 3) void
- uiFatalError (ParseState *ps, const char *msg, ...)
- {
- 	va_list args;
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gcc5.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gcc5.patch
deleted file mode 100644
index f7528ad..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gcc5.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: libbonoboui-2.24.5/tools/browser/Makefile.am
-===================================================================
---- libbonoboui-2.24.5.orig/tools/browser/Makefile.am
-+++ libbonoboui-2.24.5/tools/browser/Makefile.am
-@@ -2,7 +2,6 @@ INCLUDES =	\
- 	-DBONOBO_BROWSER_DATADIR=\""$(datadir)"\"	\
-         -DBONOBO_SUPPORT_LOCALEDIR=\""$(datadir)/locale"\"        \
- 	-I$(srcdir) -I$(top_srcdir) 			\
--	-I$(top_srcdir)/bonobo-browser			\
- 	$(BONOBOUI_CFLAGS)				\
- 	$(WARN_CFLAGS)
- 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gtk-doc.m4 b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gtk-doc.m4
deleted file mode 100644
index 3ec4166..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gtk-doc.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-dnl -*- mode: autoconf -*-
-
-# serial 1
-
-dnl Usage:
-dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
-AC_DEFUN([GTK_DOC_CHECK],
-[
-  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-  dnl for overriding the documentation installation directory
-  AC_ARG_WITH(html-dir,
-    AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
-    [with_html_dir='${datadir}/gtk-doc/html'])
-  HTML_DIR="$with_html_dir"
-  AC_SUBST(HTML_DIR)
-
-  dnl enable/disable documentation building
-  AC_ARG_ENABLE(gtk-doc,
-    AC_HELP_STRING([--enable-gtk-doc],
-                   [use gtk-doc to build documentation [default=no]]),,
-    enable_gtk_doc=no)
-
-  have_gtk_doc=no
-  if test -z "$PKG_CONFIG"; then
-    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-  fi
-  if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
-    have_gtk_doc=yes
-  fi
-
-  dnl do we want to do a version check?
-ifelse([$1],[],,
-  [gtk_doc_min_version=$1
-  if test "$have_gtk_doc" = yes; then
-    AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
-    if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
-      AC_MSG_RESULT(yes)
-    else
-      AC_MSG_RESULT(no)
-      have_gtk_doc=no
-    fi
-  fi
-])
-  if test x$enable_gtk_doc = xyes; then
-    if test "$have_gtk_doc" != yes; then
-      enable_gtk_doc=no
-    fi
-  fi
-
-  AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
-  AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
-])
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gtk-doc.make b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gtk-doc.make
deleted file mode 100644
index 354ffb7..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/files/gtk-doc.make
+++ /dev/null
@@ -1,173 +0,0 @@
-# -*- mode: makefile -*-
-
-####################################
-# Everything below here is generic #
-####################################
-
-if GTK_DOC_USE_LIBTOOL
-GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
-else
-GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
-endif
-
-# We set GPATH here; this gives us semantics for GNU make
-# which are more like other make's VPATH, when it comes to
-# whether a source that is a target of one rule is then
-# searched for in VPATH/GPATH.
-#
-GPATH = $(srcdir)
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = 				\
-	$(content_files)		\
-	$(HTML_IMAGES)			\
-	$(DOC_MAIN_SGML_FILE)		\
-	$(DOC_MODULE)-sections.txt	\
-	$(DOC_MODULE)-overrides.txt
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
-	   $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES = 		 \
-	$(DOC_MODULE).args 	 \
-	$(DOC_MODULE).hierarchy  \
-	$(DOC_MODULE).interfaces \
-	$(DOC_MODULE).prerequisites \
-	$(DOC_MODULE).signals
-
-REPORT_FILES = \
-	$(DOC_MODULE)-undocumented.txt \
-	$(DOC_MODULE)-undeclared.txt \
-	$(DOC_MODULE)-unused.txt
-
-CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
-
-if ENABLE_GTK_DOC
-all-local: html-build.stamp
-else
-all-local:
-endif
-
-docs: html-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
-	@echo 'gtk-doc: Scanning header files'
-	@-chmod -R u+w $(srcdir)
-	cd $(srcdir) && \
-	  gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
-	if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
-	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
-	else \
-	    cd $(srcdir) ; \
-	    for i in $(SCANOBJ_FILES) ; do \
-               test -f $$i || touch $$i ; \
-	    done \
-	fi
-	touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
-	@true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
-	@echo 'gtk-doc: Rebuilding template files'
-	@-chmod -R u+w $(srcdir)
-	cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
-	touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
-	@true
-
-tmpl/*.sgml:
-	@true
-
-
-#### xml ####
-
-sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
-	@echo 'gtk-doc: Building XML'
-	@-chmod -R u+w $(srcdir)
-	cd $(srcdir) && \
-	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
-	touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
-	@true
-
-#### html ####
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
-	@echo 'gtk-doc: Building HTML'
-	@-chmod -R u+w $(srcdir)
-	rm -rf $(srcdir)/html
-	mkdir $(srcdir)/html
-	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
-	@echo 'gtk-doc: Fixing cross-references'
-	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
-	touch html-build.stamp
-
-##############
-
-clean-local:
-	rm -f *~ *.bak
-	rm -rf .libs
-
-distclean-local:
-	cd $(srcdir) && \
-	  rm -rf xml $(REPORT_FILES) \
-	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-maintainer-clean-local: clean
-	cd $(srcdir) && rm -rf xml html
-
-install-data-local:
-	-installfiles=`echo $(srcdir)/html/*`; \
-	if test "$$installfiles" = '$(srcdir)/html/*'; \
-	then echo '-- Nothing to install' ; \
-	else \
-	  $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
-	  for i in $$installfiles; do \
-	    echo '-- Installing '$$i ; \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
-	  done; \
-	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
-	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
-	  which gtkdoc-rebase >/dev/null && \
-	    gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
-	fi
-	
-
-uninstall-local:
-	rm -f $(DESTDIR)$(TARGET_DIR)/*
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
-	@echo "*** gtk-doc must be installed and enabled in order to make dist"
-	@false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
-	mkdir $(distdir)/tmpl
-	mkdir $(distdir)/xml
-	mkdir $(distdir)/html
-	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-	-cp $(srcdir)/xml/*.xml $(distdir)/xml
-	cp $(srcdir)/html/* $(distdir)/html
-	-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
-	-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
-	cd $(distdir) && rm -f $(DISTCLEANFILES)
-	-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
-
-.PHONY : dist-hook-local docs
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo.inc b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo.inc
deleted file mode 100644
index e4759a8..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-DESCRIPTION = "Bonobo CORBA interfaces library"
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-SECTION = "x11/gnome/libs"
-DEPENDS = "gnome-common-native glib-2.0 orbit2-native orbit2 intltool-native libxml2 dbus dbus-glib"
-
-inherit gnomebase gtk-doc lib_package
-
-EXTRA_OECONF += "'PERL_PATH=${USRBINPATH}/env perl'"
-ORBIT_IDL_SRC = "${STAGING_BINDIR_NATIVE}/orbit-idl-2"
-
-RDEPENDS_${PN}-bin = "${PN} perl"
-FILES_${PN} += "${libdir}/orbit-2.0/*.so ${libdir}/bonobo/monikers/*.so"
-FILES_${PN}-dbg += "${libdir}/bonobo/monikers/.debug \
-    ${libdir}/bonobo-2.0/samples/.debug ${libdir}/orbit-2.0/.debug"
-FILES_${PN}-dev += "${libdir}/orbit-2.0/*.la ${libdir}/bonobo/monikers/*.la ${libdir}/bonobo-2.0/samples"
-FILES_${PN}-staticdev += "${libdir}/orbit-2.0/*.a ${libdir}/bonobo/monikers/*.a"
-
-LEAD_SONAME = "libbonobo-2.so"
-
-PARALLEL_MAKE = ""
-
-do_compile() {
-    oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}"
-}
-
-do_install() {
-    oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}" DESTDIR="${D}" install
-}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/0001-Remove-use-of-G_DISABLE_DEPRECATED.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/0001-Remove-use-of-G_DISABLE_DEPRECATED.patch
deleted file mode 100644
index 44cf1f9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/0001-Remove-use-of-G_DISABLE_DEPRECATED.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From fef13a371fc91f6d9b42518126c2a8b459fdf0e8 Mon Sep 17 00:00:00 2001
-From: Colin Walters <walters@verbum.org>
-Date: Thu, 2 May 2013 14:17:38 -0400
-Subject: [PATCH] Remove use of G_DISABLE_DEPRECATED
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This now trips up on GStaticRecMutex; I'm not going to bother to port,
-realistically no one is actively maintaining this code anymore.
-
-Upstream-Status: Applied
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- activation-server/Makefile.am |    1 -
- configure.in                  |    2 +-
- 2 files changed, 1 insertions(+), 2 deletions(-)
-
-diff --git a/activation-server/Makefile.am b/activation-server/Makefile.am
-index efb18a8..ffa90f6 100644
---- a/activation-server/Makefile.am
-+++ b/activation-server/Makefile.am
-@@ -17,7 +17,6 @@ INCLUDES=					\
- 	$(SERVER_CFLAGS)			\
- 	$(WARN_CFLAGS)				\
- 	-DSERVER_CONFDIR=\"$(sysconfdir)\"	\
--	-DG_DISABLE_DEPRECATED			\
- 	-DG_LOG_DOMAIN=\"Bonobo-Activation-Server\" \
- 	$(NULL)
- 
-diff --git a/configure.in b/configure.in
-index 70a4e26..6be2bca 100644
---- a/configure.in
-+++ b/configure.in
-@@ -132,7 +132,7 @@ AC_SUBST(SERVER_LIBS)
- AC_SUBST(SERVER_CFLAGS)
- 
- if test "$enable_maintainer_mode" = "yes"; then
--	DISABLE_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES"
-+	DISABLE_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES"
- 	AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
- fi
- 
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/do-not-use-srcdir-variable.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/do-not-use-srcdir-variable.patch
deleted file mode 100644
index a20edda..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/do-not-use-srcdir-variable.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-| tests/Makefile.am:55: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/te
-st-properties.sh'
-| tests/test-activation/Makefile.am:76: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS
-' (or '*_CPPFLAGS')
-| utils/Makefile.am:9: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS
-')
-| autoreconf: automake failed with exit status: 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Not Submitted
-
-Index: libbonobo-2.32.1/tests/Makefile.am
-===================================================================
---- libbonobo-2.32.1.orig/tests/Makefile.am	2010-08-29 04:56:00.000000000 -0700
-+++ libbonobo-2.32.1/tests/Makefile.am	2014-04-25 15:38:22.024744384 -0700
-@@ -55,7 +55,7 @@
- 	MODELS_DIR="$(srcdir)/models"
- 
- TESTS = test-moniker$(EXEEXT) test-event-source$(EXEEXT) test-object$(EXEEXT) \
--	test-stream-mem$(EXEEXT) $(srcdir)/test-properties.sh test-storage-mem$(EXEEXT) \
-+	test-stream-mem$(EXEEXT) test-properties.sh test-storage-mem$(EXEEXT) \
- 	test-main-loop$(EXEEXT)
- 
- # TESTS += test-generic-factory.sh
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch
deleted file mode 100644
index 20db671..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-This checks whether the format string is a literal on the calling function. As bonobo_debug_print()
-takes already a va_list, we specify the format on the functions that call it
-The second number, which is 0 here, should then be the argument index of the variadic argument
-
-Fixed warning with clang
-
-| ../../libbonobo-2.32.1/bonobo/bonobo-debug.c:58:32: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
-|         vfprintf (_bonobo_debug_file, fmt, args);
-|                                       ^~~
-| 1 error generated.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libbonobo-2.32.1/bonobo/bonobo-debug.c
-===================================================================
---- libbonobo-2.32.1.orig/bonobo/bonobo-debug.c
-+++ libbonobo-2.32.1/bonobo/bonobo-debug.c
-@@ -47,6 +47,7 @@ bonobo_debug_init(void)
- 	  _bonobo_debug_file = stderr;
- }
- 
-+__attribute__((__format__ (printf, 2, 0)))
- void
- bonobo_debug_print (const char *name, char *fmt, ...)
- {
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo_2.32.1.bb
deleted file mode 100644
index 8e00eb4..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonobo_2.32.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require libbonobo.inc
-
-SRC_URI += "file://0001-Remove-use-of-G_DISABLE_DEPRECATED.patch \
-            file://do-not-use-srcdir-variable.patch \
-            file://fix-nonliteral-in-string.patch \
-           "
-SRC_URI[archive.md5sum] = "27fa902d4fdf6762ee010e7053aaf77b"
-SRC_URI[archive.sha256sum] = "9160d4f277646400d3bb6b4fa73636cc6d1a865a32b9d0760e1e9e6ee624976b"
-GNOME_COMPRESS_TYPE="bz2"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonoboui_2.24.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonoboui_2.24.5.bb
deleted file mode 100644
index b3ca0a4..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/bonobo/libbonoboui_2.24.5.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SECTION = "x11/gnome/libs"
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-inherit gnomebase pkgconfig gtk-doc
-
-SRC_URI += "file://gcc5.patch \
-            file://0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch \
-            "
-
-SRC_URI[archive.md5sum] = "853be8e28aaa4ce48ba60be7d9046bf4"
-SRC_URI[archive.sha256sum] = "fab5f2ac6c842d949861c07cb520afe5bee3dce55805151ce9cd01be0ec46fcd"
-GNOME_COMPRESS_TYPE="bz2"
-
-DEPENDS = "libgnomecanvas libbonobo libgnome glib-2.0 gconf libxml2 libglade gnome-common intltool-native"
-
-FILES_${PN} += "${libdir}/libglade/2.0/*.so"
-FILES_${PN}-dev += "${libdir}/libglade/2.0/*.la ${datadir}/gnome-2.0/ui \
-                    ${libdir}/bonobo-2.0/samples"
-FILES_${PN}-staticdev += "${libdir}/libglade/2.0/*.a"
-FILES_${PN}-dbg += "${libdir}/bonobo-2.0/samples/.debug \
-                    ${libdir}/libglade/2.0/.debug"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.42.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.42.bb
deleted file mode 100644
index ae2ec5a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.42.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-DESCRIPTION = "Devilspie2 is a window matching utility, allowing the user to perform scripted actions on windows as they are created"
-HOMEPAGE = "http://www.gusnan.se/devilspie2"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=00aefaa50aad75c21367df66102d542c \
-                    file://GPL3.txt;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "gtk+ glib-2.0 libwnck lua virtual/libx11"
-
-SRC_URI = " \
-    http://download.savannah.gnu.org/releases/${BPN}/${BPN}_${PV}-src.tar.gz \
-    file://default.lua \
-    file://devilspie2.desktop \
-"
-SRC_URI[md5sum] = "f205409e921aa2d86481f1b8d518da45"
-SRC_URI[sha256sum] = "11f5bc310fba4df404c057461ffb3fadac8ef51d211008c665c48f587a5a3f85"
-
-inherit pkgconfig gettext
-
-do_compile() {
-    export GTK2=1
-    oe_runmake CC="${CC}" CPPFLAGS="${CPPFLAGS}" LDFLAGS=" -ldl -lm ${LDFLAGS}"
-}
-
-do_install() {
-    oe_runmake DESTDIR="${D}" PREFIX="${prefix}" install
-    install -d ${D}/${sysconfdir}/devilspie2
-    install -m 644 ${WORKDIR}/default.lua ${D}/${sysconfdir}/devilspie2
-    install -d ${D}/${sysconfdir}/xdg/autostart
-    install -m 644 ${WORKDIR}/devilspie2.desktop ${D}/${sysconfdir}/xdg/autostart
-}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb
new file mode 100644
index 0000000..6ef8e8a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Devilspie2 is a window matching utility, allowing the user to perform scripted actions on windows as they are created"
+HOMEPAGE = "http://www.gusnan.se/devilspie2"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=00aefaa50aad75c21367df66102d542c \
+                    file://GPL3.txt;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "gtk+ glib-2.0 libwnck lua virtual/libx11"
+
+SRC_URI = " \
+    http://download.savannah.gnu.org/releases/${BPN}/${BPN}_${PV}-src.tar.gz \
+    file://default.lua \
+    file://devilspie2.desktop \
+"
+SRC_URI[md5sum] = "26eed0b5b4af5c7e13c551eceaeab832"
+SRC_URI[sha256sum] = "ecffc17c62b41e196b72340192a90c4223329df041f135e74c0990860595f828"
+
+inherit distro_features_check pkgconfig gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+do_compile() {
+    export GTK2=1
+    oe_runmake CC="${CC}" CPPFLAGS="${CPPFLAGS}" LDFLAGS=" -ldl -lm ${LDFLAGS}"
+}
+
+do_install() {
+    oe_runmake DESTDIR="${D}" PREFIX="${prefix}" install
+    install -d ${D}/${sysconfdir}/devilspie2
+    install -m 644 ${WORKDIR}/default.lua ${D}/${sysconfdir}/devilspie2
+    install -d ${D}/${sysconfdir}/xdg/autostart
+    install -m 644 ${WORKDIR}/devilspie2.desktop ${D}/${sysconfdir}/xdg/autostart
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/files/devilspie2.desktop b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/files/devilspie2.desktop
index e34e881..b80904a 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/files/devilspie2.desktop
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/devilspie/files/devilspie2.desktop
@@ -1,5 +1,6 @@
 [Desktop Entry]
 Type=Application
 Name=Devilspie2
+Comment=Perform scripted actions on windows as they are created
 Exec=devilspie2 -f /etc/devilspie2
 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-CMakeLists.txt-Remove-TRY_RUN-for-iconv.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-CMakeLists.txt-Remove-TRY_RUN-for-iconv.patch
new file mode 100644
index 0000000..a821a14
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-CMakeLists.txt-Remove-TRY_RUN-for-iconv.patch
@@ -0,0 +1,39 @@
+From 131b88a81aba3d72d566bc8a9d968941a98e0007 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 19 Dec 2017 16:37:20 +0100
+Subject: [PATCH] CMakeLists.txt: Remove TRY_RUN for iconv
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
+|    _correct_iconv_EXITCODE (advanced)
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ CMakeLists.txt | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8d07772..a2396f2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -521,13 +521,8 @@ if(NOT HAVE_ICONV)
+ endif(NOT HAVE_ICONV)
+ 
+ set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBS})
+-CHECK_C_SOURCE_RUNS("#include \"${CMAKE_SOURCE_DIR}/iconv-detect.c\"" _correct_iconv)
+ unset(CMAKE_REQUIRED_LIBRARIES)
+ 
+-if(NOT _correct_iconv)
+-	message(FATAL_ERROR "You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv")
+-endif(NOT _correct_iconv)
+-
+ # ******************************
+ # Backtraces for debugging
+ # ******************************
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-contact-Replace-the-Novell-sample-contact-with-somet.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-contact-Replace-the-Novell-sample-contact-with-somet.patch
deleted file mode 100644
index b77e7b9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-contact-Replace-the-Novell-sample-contact-with-somet.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-From 4df8bd8ae4258289663b27af1207027c7ee06340 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sun, 4 Aug 2013 09:13:25 +0200
-Subject: [PATCH 1/5] contact: Replace the Novell sample contact with something
- more appropriate
-
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- addressbook/backends/file/Makefile.am    |   1 +
- addressbook/libedata-book/ximian-vcard.h | 179 ++++++++++++++++++-------------
- 2 files changed, 103 insertions(+), 77 deletions(-)
-
-diff --git a/addressbook/backends/file/Makefile.am b/addressbook/backends/file/Makefile.am
-index 08cf58f..17e7149 100644
---- a/addressbook/backends/file/Makefile.am
-+++ b/addressbook/backends/file/Makefile.am
-@@ -2,6 +2,7 @@ ebook_backend_LTLIBRARIES = libebookbackendfile.la
- 
- libebookbackendfile_la_CPPFLAGS = \
- 	$(AM_CPPFLAGS)					\
-+	-DCREATE_DEFAULT_VCARD \
- 	-DG_LOG_DOMAIN=\"libebookbackend\"		\
- 	-I$(top_srcdir)					\
- 	-I$(top_builddir)				\
-diff --git a/addressbook/libedata-book/ximian-vcard.h b/addressbook/libedata-book/ximian-vcard.h
-index 782d37b..5b0b250 100644
---- a/addressbook/libedata-book/ximian-vcard.h
-+++ b/addressbook/libedata-book/ximian-vcard.h
-@@ -1,80 +1,105 @@
- #define XIMIAN_VCARD \
- "BEGIN:VCARD\n" \
--"X-EVOLUTION-FILE-AS:Novell Ximian Group\n" \
--"ADR;TYPE=WORK:;Suite 500;8 Cambridge Center;Cambridge;MA;02142;USA\n" \
--"LABEL;TYPE=WORK:8 Cambridge Center, Suite 500\\nCambridge\\, MA\\n02142\\nUSA\n" \
--"TEL;WORK;VOICE:(617) 613-2000\n" \
--"TEL;WORK;FAX:(617) 613-2001\n" \
--"EMAIL;INTERNET:hello@ximian.com\n" \
--"URL:http://www.ximian.com/\n" \
--"ORG:Novell;Ximian Group\n" \
--"PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEARwBHAAD//gAXQ3JlYXRlZCB3aXRo\n" \
--" IFRoZSBHSU1Q/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCM\n" \
--" cHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMj\n" \
--" IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgAbgBkAwEiAAIRAQMRAf/EA\n" \
--" BwAAAIDAQEBAQAAAAAAAAAAAAAHBQYIBAMBAv/EAEYQAAEDAwEFBgMEBgQPAAAAAAECAwQABREG\n" \
--" BxIhMWETIkFRcYEUkaEIMkLBFSNSsbLRFmJydRgkMzY3Q0RGgpKTosLh8P/EABsBAQACAwEBAAA\n" \
--" AAAAAAAAAAAAEBQIDBgEH/8QALREAAQMCAwYGAgMAAAAAAAAAAQACAwQREiFRBRMiMUFhMnGBkb\n" \
--" HRBsEUofD/2gAMAwEAAhEDEQA/AH/RRRREVwXe9W2wwFzbpNZixkc1uqwPQeZ6CoHXevLfom1ds\n" \
--" 9h6a6D8PGCsFZHMk+CR4n86yzdbrqfaZqYBSnp0hRPZMoG62ynoOSR1Pua8Lg0XPJegX5Jv6k+0\n" \
--" bBjrWxp22LlkcBIlHs0HqEjiR64peT9umupqyWrhHhpP4WI6eHureNW7Tmw+DGaTI1FJVJdxksM\n" \
--" qKG09CrmfbFMCHpCw2xATDs8JrH4gykq+Z4mqifbMUZsxpd/QUllK53M2SCb2xa+bXvf0gcV0Uw\n" \
--" 0R/DVktH2hdUwlpFxjQrg1490tLPuOH0pvv2qE4jdchx1p8lNAj91Va87OtM3RCt+2Nx3Dyci/q\n" \
--" yPYcD7g1EZ+RR4rSMI9b/S2mhdbhKsmkdtWmNTuNxnXVW2cvgGZRASo+SV8j74PSmOlQUMpORWP\n" \
--" NU7MrjY0rlQFmdDTxOE4cQOo8R1Hyqe2Z7ZJ2m32bXfHnJVpJCUuqO8uP7+Kenh4eVXkFRFUMxx\n" \
--" G4UOSN0Zs4LU1FeEOWxOityYzqHWXEhSFoOQoHkQa963rBFFFFERUdfr1E09Y5d1mr3Y8ZsrV5n\n" \
--" yA6k4A6mpGkL9ojUym0W/TrLmAsGU+AeYBwgfPJ/4RREqrrcb1tJ1oUpBXLmObqUZ7rSByT0SkZ\n" \
--" J8zk1pHQmiLXo+zpbabC3SAp55Q7zyvM9PIUudiGmURbS7fpCMvzFFton8LSTxx6qH0FM7VV9VY\n" \
--" 9MzZ7aQt5tASw3+26ohKB/zEVSVFVvZzGMw02tqe/kpbI8LMR6/C/Xxq9QagfbbP+IW1QQ4Rycf\n" \
--" xncHRAIJ/rEfsmu2a9Fgsl2XIZjtj8bqwgfM1+9L2VFksESAV9o6hG886ebjqjvLWepUSarutdn\n" \
--" MXV+obRcZks/CwCQ5DKMpeBOTxzwzgA9KwfTtfxPOSB5GQUXc9pOjoC+zXe2HV5xiOC6PmkEfWp\n" \
--" xe6tAWghSVDIIOQRXxekNOx4b0WPZYLLTram19mwlJKSMHjjNUzQd2dZM7SNxczcLOsttqVzdYz\n" \
--" 3FewI9iKpK2mjMZdFe7ed9NfT9qZDI4OAd1Vkko50ndoui22kuXq2NBOO9JZSOH9sD9/z86c8gc\n" \
--" DUJNQlaFJUkKSoYII4EVGoKp9PIHt9e6lyRNlZhcqlsJ2guQpydL3F4mO7kw1KP3Fcyj0PEjrnz\n" \
--" rSAIIyOVYfvsJ3TGqlCKpTfYuJfjLHMDOR8jw9q2Foy+o1FpWBckY/XMpUoeRxxHsciu/jeJGB7\n" \
--" eRXPvaWuLT0U/RRRWaxQeVY82x3BVw2oXbJyhgoZR0AQM/UmthK+6fSsWbRQW9pV73x/tZPtwNE\n" \
--" Wj9Nw0WuwwIKQAGI6G/cAZ+tRW0lx5nTEW4Ntqdat9xjy5CEjJLSFZP5H2qaYdCkpUk5BGQa7Ap\n" \
--" DrSm3EpWhYKVJUMgg8wRXz+kqyyTG7VXUsV22Clrfc48+CzMiPIejvIC23EHIUDXNe79b7HbXbh\n" \
--" c5SI8ZvmtZ5nyA5k9BS7d0nfdMPuSdD3JtEZaitdom5Uznx3DzT6cPWkvq/V1611fGW5nZtBCgy\n" \
--" zFbXhtCycE5JxknxPhXR07RUeB3D11H+9lAfwcxmrrqLbxcHpikWGAw1FScByUkqWvrgEBPpxqi\n" \
--" ztdXWdqmNqIIjx7gykJUphJCXAM/eBJ5g4PQCmBZNiDKWEu364uF0jJYh4AT6qUDn2FVu6bPIkT\n" \
--" aTB08xKeMOU2H99eCtKRvZGQMZ7hwceNZxVGzsbmMzIBv5dfNeOjnsCdUwbTtKsV8nJgIccZkqw\n" \
--" lJcThDqvJJz8s4zUtLVzpc2vZZKt+qBIkyUKt0V0ONKSe+7g5SCPDr9Kv0tznXP1cNMyQfxnXBC\n" \
--" tqUyuB3gslftPjJLkGWB3u82o/Ij86bf2e7iqRoxyIpWfhpC0JHQ4V/5GlVtJcBt0RPiXif+00w\n" \
--" Ps5BQtNxP4TJP8Ka6rZZJpW37/Kq68ATlPeiiirBQ0HlWR9t9qVbtpEp/dwiY0h5J8Mgbp/h+ta\n" \
--" 4pM7fdKLumn2rxGbKn4BKl4HEtn73ywD7GiL7o28JuulLbKCsqLKUL/tJ7p+oqyIe4c6RGyzU4g\n" \
--" THLNJc3WpCt9gk8A54j3GPcdaZuoosy82V23QpaYpkEIdeIJKUeIAHieXPkTXA11DuassJsCefY\n" \
--" /SvYZN5FiGZU9edRwLDAXJny2mRukoStQBWQOQHjSjg7PYE7ZmzcZb7cG6KK5CZD6txOCcJQvPg\n" \
--" QAQfAn2q6RNOWi1D9J3R5dwlR2xmZPVv9mlI8ByTj59ar09Lm0jUIQl5Y0zAUMrQSPiXfHHpyz4\n" \
--" D1qTRvMQIieQAQXOtllfIDre/X2WqVmI8Qz6D9q0bP9SO37SrSpW8ZUVXw7q+YcKeSgeRyMZ65q\n" \
--" qammvWTalEv1yjOJtaWfh25CBvBOUkHPlxUeHlyq/MiPCitxorSGWG07qG0DASK45xZlx3GJDaH\n" \
--" WljCkLGQR6VGinY2ofIG8Lri2gOi37hxYG3zC+uT2HY6ZDbyFMrAUlwK7pB5HNRcp7nxqpzdN3G\n" \
--" CFQ7NObTa3nApcaSN/suOe4SDw6VK3O4swojsp9WGmxk9fIDrW4UzWkbt2K/v691vjec8YtZUTa\n" \
--" BL+IuMaIjiWWytXQn/wBD608tgtrVC0W2+tOFSFqd9icD6AVnmFFl6n1AhoAmRPdwcfgR4n2H7q\n" \
--" 2Ppi1N2exRojaQlKEBIHkAK7Gmi3MTWaLn6iTeSF+qmaKKK3rSiuedEanQ3I7qQpC0kEEZzXRRR\n" \
--" FjnaRoSVoq/KcYQv9HOr3mHB/qzz3SenhVi0ftAbnNNwLo6G5iQEodUcJd9fJX760ZqLTkHUdsd\n" \
--" hTWEOtuJwQoVl/XGyS7aakOPwGnJcDORujK0DqPH2qJV0cdUzC/0Oi3QTuhddqY84IuFukwnFFK\n" \
--" JDSmlEcwFDGR86ISI1tgtQ4jYaYaTuoSP/udJS1azvFoAZLnbsp4dm/klPQHmKs0faVEWkfEw32\n" \
--" 1f1CFj8q56XZNSwYG5t7fSt46yB5ucimM5L4c643pXWqU5tCteMpRKUfIIH86ipmvnnAUwoQSf2\n" \
--" 3lZ+g/nWEey5yfCtrquBo8Su0+4sQ46pEp1LTSeZUfoPOlnfr67fZKQlK0QkK/VtficV5nrXOkX\n" \
--" XUk9KQHp0gnghI7qPyAp1bOdkCmH2rneQHHxxQjHdb9OvWr2j2c2Didm74VZVVplGFuQXRsc2fO\n" \
--" Qgb1cmsSXQN1JH+TT4D+dPEAAADkK848duMylppISkDGBXrVkoCKKKKIiiqrrbX9m0JARIua1re\n" \
--" dJDMdoArcI58+AA8zVLsO26RqiS9Gsukpct5lHaKbTLaSrd8wFEZ9s0RN6vGRGZktlDqAoHzFKq\n" \
--" JtomzrPOuzGjZvwEBRTJfckttpbUOae9jJ5cBk8R514Wrbo7e489+3aTlvtQGTIkqElsdm2Mkq4\n" \
--" 4zyPKiKf1Hsj09flKdXEQh4/jR3VfMUvJ/2et1ZMOe8keSgFfyqz2LbfJ1M9IZs2kJsx2O0XnEN\n" \
--" yEAhA4ZwcZ58hxr7ZdtkvUS5SbTo2fJMRsuPkPoSG0jzKsDPPhz4HyoipDewC47+FXFWOjYH51Y\n" \
--" bTsAgtrSqc88/jwWrA+QxUlYtujupZ6oNo0nLlSUtqdKEyW04SMZOVYHiKjP8ACUt5/wB3pX/XT\n" \
--" /KiJnWLQ1nsTSURorad39lIFWZKUoThIAHSlNqDbLP0siKu96MnQ0ygSyVyGzvYxnlnB4jga87F\n" \
--" ttlamXJbs2j50xcZvtXUtyEZCfPB5+gyaIm9RSetm3J68RbhJgaSmPM25vtZaviW09knjxIOM8j\n" \
--" y8q7LHtzstwv/AOhrlBftkkudkFOLS43v5xgqSeHHx5daImrRX5QtK0hSTkGiiLMP2ho8wa1iSn\n" \
--" QoxVRQ20fAKClFQ9eIqq7LLJe7vreG7ZZCoZhqD8iZjustjnnwORkY8c+Wa1ZqbStt1PBMa4MId\n" \
--" Rz7wzg+dL8bEbA1vpa7RtK+CkpdWAfXjRFB7UpCNe6Kdm6NnJft1qluKuUJlvdKznPbYH3hzPXJ\n" \
--" PMGqZsk/zc2gf3G5/Cumc3sRsTO92Rcb3uB3XVjP1r4jYfYGwoN76QsYUEurGR5HjREudhUt2BP\n" \
--" 1TMYID0eyuuoJGRvJII+oq96I2iwtVz7rb7ZZWbalyzyJ9wKUjLsrKEkjH4cE8+Jz049bew+wNb\n" \
--" 3Z76N4YO66sZHlzob2H2Bkktb6CRglLqxkeXOiJZbAv9IMj+7X/wB6ag9lGnEaj17CRJA+BhZmy\n" \
--" lK+6EI44PQq3R6E06W9h9gZVvNb6FYxlLqwcfOhvYhYWt7s99G8MK3XVjI68aIo7UxgbR9IajhQ\n" \
--" 7/Du9yiSF3S3tMNrStlkAAt94DPDI4eJFUvYfNetqNYz4xAfjWZx5skZAUnJHD1FMVrYhYWVbzW\n" \
--" +2ojGUOrBx86EbD7A0FBvfRvDCt11YyPI8aIo23zdP6i2e621TaUJiXCfa1IucFPJt5KVnfHRWS\n" \
--" euPPNZ2YadfkNsspUp1aglCU8yTyrTSNh9gbCgjfSFjCgl1YyPI8al9PbItP2WamUywkuJ5KOVE\n" \
--" emeVEVw02ZH9H4YkEqdDYCifE4oqXbaS02lCRhIGBRRF//Z\n" \
-+"VERSION:3.0\n" \
-+"FN:Yocto Project\n" \
-+"URL:http://www.yoctoproject.org/\n" \
-+"EMAIL:yocto@yoctoproject.org\n" \
-+"TEL;TYPE=VOICE:+00 000 000 0000\n" \
-+"ADR;TYPE=HOME:;1720 Beaver Creek;Dam #4;Planet Earth\n" \
-+"LABEL:1720 Beaver Creek\\nDam #4\\nPlanet Earth\n" \
-+"PHOTO;ENCODING=b:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pV\n" \
-+" UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAFE9JREFUeJztnXmQHNV9xz\n" \
-+" +ve86dvU/tanUiCVwRQuaIhSEOMsIiEsbGRtiVGFy4EsdU4bINOICPUtkQHOxgYoiDTVJxCBiwM\n" \
-+" CBxBjAlsIUlEQzISAhZN5JW2l3tvbNz9JU/fu/N7CwgVquVmEr194/t7enu97p73vf9zvcbCBEi\n" \
-+" RIgQIUKECDH5UB/0DYwXwZv/Mh8AK3ISgBs4AwAR29oCwNwFfQBKLXY/mDucHFgf9A2EKEXZMiT\n" \
-+" YdtdUADff+QCA5Q/9BQB+Xk7w9a27vpxP8g0AO9J4IYA64/qOE3m/k4WQIWWGsmJI/q0fn2P+t5\n" \
-+" zerwFYDK0ACAgCAMsXRuCLqPDTQ7LvBgogSDY8DODWLvguQOLkv9t6Qm5+khAypMwQfiFlhkmZs\n" \
-+" vY/9rOzAXK59EkAEc87BDD9c99cC6CU8t7tumD/PQ0A/uCOHwF4Vm6pOWbnc20AlvIDOTnQF8nU\n" \
-+" hJOT3XQ/AK7jyJRWUSXHIw1vAQQV078BEJ1/7f9MwqMed4QMKTNMiCF/uP/ONgC7Y/ODAF52YCE\n" \
-+" ArhcBwMIDiMZiLkAsVX8fwClfvfOrALldd5wGYGe6HgRQQfpkABXxi/fjCKkCX6ihtJ6rtFAP8i\n" \
-+" Ny3nAfAJ4dk/OiCQBsZSn5vLoXIJ+aezVAxfxvPDCRZz5RCBlSZpgQQzbe+qXzAYLcwAMAgRM0A\n" \
-+" UTQ072Sf6JKmo8HWQVgNSc7AU6+YG4AELiZKXITIic8gsL92J5uyzXixzBGbx1tIA73yIMkK2Vr\n" \
-+" x/R5cg9KaXU40gCAH2//lOkjsm3WkwB97KoEyOHUA2TTw9J5U0MWwNm5rw9g3tfuzB3lqzpqhAw\n" \
-+" pM0QmclE0knIBvOywD+ApB4BAG2u2EmoEnnw+xEAAsODD7S0AuGLMKZRRnYRBRpMCfMMMLTNUIP\n" \
-+" vKc0u2WPoaSz+KbeuPPQXge8I+5XeLDAqsX5k+OnK7bwJwe50bAHLZfBWAo9v2DnfK3dnxtQCv3\n" \
-+" vH1WwB2TPnoWoDLLrvsXbXHY0HIkDLDhBhizzx1J4C7tXcYQAVOC4CtRYAVyKh2/DQA886ZoQAS\n" \
-+" VVGgaEqosTJsFEOUN8aJyNjB6JdeY+mxFZQ2qSwtQzw50c4eSJhjUW/wHwF275O+UpX1Its0w72\n" \
-+" 88eSPLAZwoiMfAWj1131aH3iOSUbIkDLDhBhy2me/vB9gw21XPQQQH8zcAOArmdADJ6MApp5SB0\n" \
-+" D1lKqS6wtjODBGuLYt/FGxJSM7fDNmglF/QRkfo2aORel5Zlvsy9NMKfbR0CLXJPZIG44n51hKP\n" \
-+" ncLfcp+3sknALxMunbsO5kshAwpM0yIIQaLrr3rRoD1t15ZB5AY6vx7gGhKRlxNe61oOLYto1Nf\n" \
-+" F2hmKE/LBTNqNVNglP3hyvyuCtfIvm/cYyqpt7Y+T2t8Y5lSuqsvEf60z4gD8MarYvVX1WibRZ/\n" \
-+" saHnlqOQWgFjDzFfe+60cG0KGlBkmNUC1/t9XngfQ1nTg1wDTZ9jizS3M23p4+qZz3X1ExoWy7E\n" \
-+" JbgXHyau1JG/0of0xbuo3A1Z97pZZ9gX3umC2gHQRkhrIAvLxeLHTbEoYYZntWbBjAr5t6HcDHr\n" \
-+" 73950d4DceEkCFlhmOSIWOx6LwqmYyzNdUAXrav5LiypTsVE39TwYYwE7w3yg7Rmo7RtgjMyDfX\n" \
-+" 2HrP7BsmGc1IU8pY8rbpsiinDItiCfEU19aLzdLZKYxJVNbtAnAq638CcMFxZIZByJAyw6TIkGD\n" \
-+" vc7MBvM5nNgCoYKAJINDD1dIeVxPLANGEKPirHNPSqEaNvDHMUKVbY5nbhimaIfq4r4IxVwW6uV\n" \
-+" EWvyf3Y2lZ0tNrdQFs3hb7KYCTaH4U4IJrb3/j/d7BZCFkSJlhUmRILuckAGKD2SYAnAwAFmL5Z\n" \
-+" jKZACCTFgs+OyzHs3kJLzg62S2fLxLW08ywtWyIxuRYLCG3XBGXbVV1BQCpSn2tlhWWHdVPKGIt\n" \
-+" MHZKiSEibfiabTXNElP5y2mNjwGoj9xywphhEDKkzDApDEnMW/YmQG7DDyS2PsBXAF7dsPNigDe\n" \
-+" 27msDCIzfyZZRa+mRGTExjFESzVKxkj6M1Vzwe3nCMiffr9uQ4w3V0nZzszTWWC99NDbK6E9WJg\n" \
-+" ttqmhC7I7KavFhxWqbAdxI5ZSjfQeThZAhZYbwCykzTKphGF904yb971UAv1l5hQPQ3uZdLZ1Jt\n" \
-+" KngXNT+EEuZgFVxfPgFhdUIYatkz1zrG/VYq7M5TxSFvQdlf9N22R/JSDi2rqo4L86cJprAwvl2\n" \
-+" L0BFW634VWKRD2yNSciQMsOkMsRg67rVVQDD69acBoCq1u73Uoeg75e6Q7xRrhO/4IfUzsPRHg+\n" \
-+" KLDNX+JackNTqbjwqR6qrdLBJG6X5UQGq/f362r2V1wF8tL71fwFinTM+sIz5kCFlhuPCkNxbW2\n" \
-+" YAJOxYG0CvttYefWUnAGfOqAfg9FbZ5rXj0LOL87uvKeIaEVHIudYukDHnKW34YRtnozxajzZCa\n" \
-+" 5Ki7laM0qar4non0ZoBiC/95uaJPO9kImRImeG4MCTiZWYDxJORaQDPbpTlfvslK4hUp4zas2bK\n" \
-+" fB9xSmULFI1EIzsK3nhvjLNRlTLH4M2DAwA8sWk/AOd9qA2AD0+rL56kU4yi5C/Wnzw47oc8Tgg\n" \
-+" ZUmY4LgyxLW8ugB94cYADg7mSlFETNIpoGng6dBtRxfHhaoejju7iGQYYd3spIQpamQlodQ8KC1\n" \
-+" 0tW/b3yf6HWopaVkVSZIibHT7l6J/y+CBkSJlhUhnyp6eeigPk9v52FkBUB6C0x5z+rIze2Y2SO\n" \
-+" KfGWOyj00BNwoMJapnAk9L6lTVG7JgosGFKbUq0Ks+X5QoZR6/a9YoGja95FnhOJUAQBDF9P/mj\n" \
-+" ffbJQsiQMsOkMiTa2akA0k5OfOCOhGaXzW8HoCct+6e31wCQ0dpVXssLNdr/ruVJoBliZIrJB1K\n" \
-+" 2DtkWBrz8Y3Sw2U3Cwnk66NSiA1mxaHEMKl8CaK4nnW1/+j6TiB0yJIRgUhmyZ+ZMF6Byy5ZuKO\n" \
-+" akTauS+Xx6jWzNqDbmhxfIuOjuOlxoK1mRAqD5zLMBmDp/AQAdL64FYHDPdgBc7ZuKxoWURitLa\n" \
-+" at/+fxpQHHkGc8ygGuqQyjlAsxbdvngBB6bTZs2tANYFfE5APPnLPyDOaaUGjqatkKGlBkmlSGL\n" \
-+" F0utqg0/ve4FAKWiVwPkA6cKIHB8naqpSuIiRvNpbGgotGVkQVWrRFNrpk4H4GC7bL0dkn8QT1S\n" \
-+" U3oRxZWkZFLeMbFHvcAd4nvwfj9dMaKn0s8/ffzHAa5s2rgF4fNUaABoaG3abc35868rLAK65/n\n" \
-+" vjStAOGVJmOC7VgFYGIhTO/+dr7gDIDXd+CSDieUmASCFzuvQu7FFtFOZ8bU3bKdHMRgYlPTWql\n" \
-+" 5sZJcvEO4yZkdNZEb5ehOPp4zkVKdj4qqLuBYDPfu/ujx/N8z3x9H2fkrbdVQB73z4YA3ju8acD\n" \
-+" gP7unsJ7bZnSlgGYffKsCwFuve3u3x6p7ZAhZYYTUi9rzc1f/i5A98G3vw9Qoxf3VyVFhMULDqv\n" \
-+" Rlrp8ZhVSQsdEG8fE1M3WK0QG5eysF+QAPMt+HcCJVj5i+vibW/7zNnjv4jjveI41v1gE4OFLTS\n" \
-+" 7sNgBli99goH9QATy3+qkCC/ds26kAmqc0DwEsXXrRJQBXX3f98+/WR8iQMsNx8fYaGN/QvXddd\n" \
-+" T7Azr1iAO/auQcA1xGpYevRPm9mMYktEZNYSTIqW9ss3DFMcOUaNyeDeyAt+4Pa+LF04kheW//1\n" \
-+" 7W3bASJnT/9X08d4mfHLX981FyDvuqKNRWyd+Ie+F6F2MiUa3+KLLixQ/Yn06gBgsKurCuB3v3v\n" \
-+" uh/rQGe/WV8iQMkP4hZQZjotQf+WXP28EcBP+zwCG4sGnAQb6hy2A7l1bFcCiOgmvbu8Wj8Xat4\n" \
-+" vFdmrrqgFIJHX1B1MVVmc9ZLK6jsqQTINbtsv+nsOy/cxZcn0kIVpBqqVOAbTHpz1m+vjKd/6tU\n" \
-+" Bno3fDoow9MA3C9YUkAjFp1UHT1eDrDIghMtQh94SgnaW5EVmP96r/ulRXJmXwHwA/vuvN0gIUL\n" \
-+" z+ka3WfIkDLDMTHk9f++NgUQT0eaAEac3JUAvV2Hvg6wr3egGmD3iIzqs5b/FQCREUnrPCsiAy+\n" \
-+" bl1F0y7qBQttVzbLUpLJCC/WoKACONghHRoQJ+3d1A9CxR5gyNCLH/3yOFB46c34rANs6DwYAFf\n" \
-+" 3FRSgNze1vAcSTkRsAalMtUrZ8SnsGwG+s3ghgRW0p6myq22nXj6etUM8kXhgaB6MWoUTFy9nXI\n" \
-+" UR45uHHfgTw9Avr/+GdbzRkSNlhQmrvlv/49gyA6NDw7QD5bN8lAP6weJrNiLeaWgKAzte3K4C8\n" \
-+" /v47B2UARdNSN3HJKcKCl94qEna7Tua0IibZQa6Ja89HhTYYG4fkeI1OfqhNySO98baEbrd3Sr5\n" \
-+" odVRmgznVscLojXXvPwUgn0isBhipEpbVTm0GQNutONoLalnWEWeUIChlEICn1fDmltbV8N7MMA\n" \
-+" gZUmYYN0N2r/1Foc5Udstr3wIg138JQKATCNxAhrEKZCQ5VlIBXLrkPACaDu0DYOfmHQAMW5I5F\n" \
-+" 3xY5vmVFxb7+/4a0bjmatnRpjPmDudlgL+o5VKVzmqoTsjxXp1CGtGGpakE0ZeTezw0VJQhlQlp\n" \
-+" O6mrGFHfqAA2bJT40vwzTpf7ntqqQ7263uOYFKRgTOZ3aWK49RiAW2t9gXEgZEiZYdwM6d38ZiE\n" \
-+" HM54fOgPAz4umk8nLMM27kpvpOTJENq2XmExSj5zzW8S1UN8j2lTPdAm7Zl4TO2T+1mII958qpI\n" \
-+" 2WKaJtDc+eAUDt1l0A/G1C2KUCGfmNmkkHtUP+qRHZf13HiWt0FQl3OF3ow6/XNX4rErJaWAe79\n" \
-+" u4Q+2jX9r0AXHL5ZdJ3kwTQXLO+PijZoHSuUhCo9aYP2/a/CnDF0iuKHR8BIUPKDOPXspLFUGkm\n" \
-+" I3Oun5XRmdajMK0ZM5AVbaVrUOTAqoyMqFPrJCUn1yo2wut/Et28tUOOVwcFMUWtkS/aYu8+YxE\n" \
-+" ATXtEDjVrmRBTIitSMWHEbJ1gl9d1fdf3y3k9SNtWtugNmK3lj601obgenhVVcp993aKprb53FQ\n" \
-+" CXXiliIFktCRieXmFkGdPcsg4CpJI115s+VnxyxdscBUKGlBnGzZDTTzqv4HN5qXfViwBZV50JM\n" \
-+" JyRytWDOWHI7l5JbN6ake97d81skTE1LQrg2ks/BsCT9z0NwOY+sbaXnrug0N+da34PwEU7JGQ7\n" \
-+" c794vndoP9Kd/RLSnabXoX9xkSTjPfuaeAEe7hdZslWZer5yXrKY7MD2nhEFUF8hsizWI9b8SXO\n" \
-+" mK4BX+6RvNysOtGdWP6kAPnHJ8gAgkUpqH5bqArDtxOcBVnxyxe/e80W+D0KGlBnGzRC1uPhzdC\n" \
-+" /+9Ns/ARgeGJgG0DGUXQLQPTB8AGBzt5SuPhhtOB3Ar2tIAGw4JMx5/hWxQ7py0v36PgnpLpozt\n" \
-+" 9Df7mYZ6Vcf0rlrGZMYYcK+woAfzJH9tC+y5O4D0lZXXIJdkZSMfs/8RFIuU7BDtg1k0gDVKacX\n" \
-+" gM7N0wDmnHlmL8CfLZwfA/jjy5sqAboPCINeenatAjh36ZJBgGgscTnAFy79whETGMaDkCFlhmP\n" \
-+" y9r696rYkwM+fWf95gG279n8OoLM/PRWgI8fJAJ2pKVGAkXpJeivQUntLnRHRqM6e11Zoe5tekt\n" \
-+" aTLy0uYIziuOQusETcTgxpL/Dve6T1IKK3+gnjfQcBaBop2jqtFXZeN5oGUL5bBzB9SuPNABd/8\n" \
-+" Yu/AXjt5ZcfAXjzj3+sB1BW0AfwieUXXQnwtWu+s2Ycr2tcCBlSZjgmhtz07etOAtj86saNAE5m\n" \
-+" pBYgl3ctAE/n6gxlZUnbznxKAfQ0zAIgSIhtYGr0Wn7RSRQoPefrytaB+XUEnSJqKlmbKkAmLcj\n" \
-+" Tn1s6CTvZK3bL9LyIicZUtNCJrbMrzHK5vF4EWlFVGQC0z5p1GsA55yw+AOA72cUA6ezwawDXXH\n" \
-+" PjrqN4XeNCyJAywzEx5IpPffwJAC+fWwaQ1dZzoNtNZyUuMqLj33kdD+90RfM5VK1/TiQqlq/yi\n" \
-+" pE2W7mOfOZmAGxNEU9XCAgsKwngWzrrzpKN0nHu6NBBBTAzIzZOoy6YGo0Ux2ChrKPeutpGsXW9\n" \
-+" 3qbW1ucBVj365JKjfzsTQ8iQMsOEIobf+PJfnwrQsXf3qQC5jKhCvv6Vm5z2ablBacVqSy8NaLI\n" \
-+" kUhjpk/m9XzPEihfrXiz72MduBVix5NyHAJYtW9YF8MILLzQB/OSBxy8C2LZ330UAnQNDCwGC9E\n" \
-+" AKoCUv2lS9DvtFDDPUaIYYQhbctvIcOu6RT4+ce3Rv5tgRMqTMEH4hZYYJTVmeE9QA+L5UqjSra\n" \
-+" ANLV/XxSjPSi9+7WW0rbo5qW85PepL1oLLFckCnpOxfASxfvnzLmO479XYzwLp16x4C+Ob1Nz4C\n" \
-+" MJTvWQCQiprqQDpLXt+Tskb9JIapYl5YA19aN8Vx8/H3exeTjZAhZYYJMSTrcxgg70uBw+IaDTn\n" \
-+" ujd2aWldarTSV5Fy9TtwPxECrb6j9jenj+ptuehPghptvPuK9ZLq6+gHswBUdW7PQ9WSs2VrVDm\n" \
-+" zzG0klY1BSQY2DZUxloVi8YkKrco8FIUPKDBNiyJeuurwD4I5bbt8IMJLubgfIZXMWjKqXaKrCm\n" \
-+" a1ZuK5LNtTU1h8GaG+fthLg/oceusv0oVQxkHQkXPCZz/QA3HPPPSsAnn7y8SsBeroOnwtg4y8A\n" \
-+" yOez8qORjluQC+YHJH1fll1F7UgOIJlK7gOYPmvubXLmpP863nsiZEiZYVKWI6xc+a2FAHv/tP1\n" \
-+" cgM7OzmqAwLdaARzP6QCobajrA5gza+5LALfefuJ+BsKgt7d3xtjP6urqxP2u1OF3XnFiETIkRI\n" \
-+" gQIUKE+H+C/wMGX8Ias1s6CQAAAABJRU5ErkJggg==\n" \
- "END:VCARD"
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch
deleted file mode 100644
index f82a76d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0e10e976025b21d12df099e82951f759024ad649 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 24 Aug 2017 22:04:56 -0700
-Subject: [PATCH] imapx: Fix signature for imapx_tokenise_struct()
-
-clang complains about different signature for this patch
-
-Fixes
-camel/providers/imapx/camel-imapx-tokens.txt:56:1: error: conflicting types for 'imapx_tokenise_struct'
-| imapx_tokenise_struct (register const char *str, register size_t len)
-| ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- camel/providers/imapx/camel-imapx-tokens.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/camel/providers/imapx/camel-imapx-tokens.txt b/camel/providers/imapx/camel-imapx-tokens.txt
-index d48501865..994c368c0 100644
---- a/camel/providers/imapx/camel-imapx-tokens.txt
-+++ b/camel/providers/imapx/camel-imapx-tokens.txt
-@@ -1,7 +1,7 @@
- /* This contains all of the keywords we care about.  These
-    can be converted to an id very efficiently */
- struct _imapx_keyword {const gchar *name; camel_imapx_id_t id; };
--struct _imapx_keyword *imapx_tokenise_struct (register const char *str, register unsigned int len);
-+struct _imapx_keyword *imapx_tokenise_struct (register const char *str, register size_t len);
- %%
- ALERT,          IMAPX_ALERT
- APPENDUID,	IMAPX_APPENDUID
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0002-CMakeLists.txt-remove-CHECK_C_SOURCE_RUNS-check.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0002-CMakeLists.txt-remove-CHECK_C_SOURCE_RUNS-check.patch
new file mode 100644
index 0000000..c8dc7e1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0002-CMakeLists.txt-remove-CHECK_C_SOURCE_RUNS-check.patch
@@ -0,0 +1,53 @@
+From 210b204d9edd71202454ff04013cc52b23c598e4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 19 Dec 2017 16:55:13 +0100
+Subject: [PATCH] CMakeLists.txt: remove CHECK_C_SOURCE_RUNS check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* TRY_RUN: does not work for OE
+* HAVE_LKSTRFTIME is set by recipe as configure option
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ CMakeLists.txt | 23 -----------------------
+ 1 file changed, 23 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a2396f2..f3b271b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -573,29 +573,6 @@ CHECK_C_SOURCE_COMPILES("#include <langinfo.h>
+ CHECK_C_SOURCE_COMPILES("#include <langinfo.h>
+ 			int main(void) { char *detail = nl_langinfo (_NL_ADDRESS_COUNTRY_AB2); return 0; }" HAVE__NL_ADDRESS_COUNTRY_AB2)
+ 
+-# *******************************************************
+-# Check to see if strftime supports the use of %l and %k
+-# *******************************************************
+-
+-CHECK_C_SOURCE_RUNS("
+-	#include <stdlib.h>
+-	#include <string.h>
+-	#include <time.h>
+-	int main(int argc, char **argv)	{
+-	char buf[10];
+-	time_t rawtime;
+-	struct tm *timeinfo;
+-
+-	time(&rawtime);
+-	timeinfo=localtime(&rawtime);
+-	buf[0] = 0;
+-	strftime(buf, 10, \"%lx%k\", timeinfo);
+-
+-	if (!buf[0] || buf[0] == 'x' || strstr(buf, \"l\") || strstr(buf, \"k\"))
+-		return 1;
+-	return 0;
+-	}" HAVE_LKSTRFTIME)
+-
+ # ******************************
+ # system mail stuff
+ # ******************************
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0002-Fix-for-automake-1.12.x.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0002-Fix-for-automake-1.12.x.patch
deleted file mode 100644
index 5f222ae..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0002-Fix-for-automake-1.12.x.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f46423c9e4b8b19eda27b307456a717de79b75f3 Mon Sep 17 00:00:00 2001
-From: Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: Sun, 4 Aug 2013 09:15:43 +0200
-Subject: [PATCH 2/5] Fix for automake-1.12.x
-
-Fixed these kinds if warning-errors
-
-warning: 'libebookbackendfile.la': linking libtool libraries using a non-POSIX archiver requires 'AM_PROG_AR' in 'configure.ac'
-
-Upstream-Status: Pending
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure.ac b/configure.ac
-index 9bd97db..49d7506 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -31,6 +31,7 @@ AC_LANG(C)
- 
- dnl Automake 1.11 - Silent Build Rules
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-+m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # required by automake 1.12
- 
- dnl Required Package Versions
- m4_define([glib_minimum_version], [2.28])
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0003-Disable-Werror-for-automake.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0003-Disable-Werror-for-automake.patch
deleted file mode 100644
index a182d4d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0003-Disable-Werror-for-automake.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 37b227cff78fd4c652651662dafd71537280824e Mon Sep 17 00:00:00 2001
-From: Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: Sun, 4 Aug 2013 09:16:59 +0200
-Subject: [PATCH 3/5] Disable Werror for automake
-
-Avoid these warning-errors
-
-automake: warnings are treated as errors
-Makefile.am:15: warning: '%'-style pattern rules are a GNU make extension
-Makefile.am:21: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-addressbook/backends/file/Makefile.am: installing './depcomp'
-addressbook/libebook/Makefile.am:55: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libebook/Makefile.am:65: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libebook/Makefile.am:66: warning: subst -,_,$*: non-POSIX variable name
-addressbook/libebook/Makefile.am:66: (probably a GNU make extension)
-addressbook/libebook/Makefile.am:72: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-addressbook/libedata-book/Makefile.am:2: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:3: warning: subst -,_,$*: non-POSIX variable name
-addressbook/libedata-book/Makefile.am:3: (probably a GNU make extension)
-glib-gen.mak:9: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:5:   'glib-gen.mak' included from here
-glib-gen.mak:13: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:5:   'glib-gen.mak' included from here
-glib-gen.mak:18: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:5:   'glib-gen.mak' included from here
-glib-gen.mak:26: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:5:   'glib-gen.mak' included from here
-glib-gen.mak:38: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:5:   'glib-gen.mak' included from here
-glib-gen.mak:41: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:5:   'glib-gen.mak' included from here
-addressbook/libedata-book/Makefile.am:86: warning: '%'-style pattern rules are a GNU make extension
-addressbook/libedata-book/Makefile.am:101: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-calendar/backends/weather/Makefile.am:44: warning: '%'-style pattern rules are a GNU make extension
-calendar/libecal/Makefile.am:53: warning: '%'-style pattern rules are a GNU make extension
-calendar/libecal/Makefile.am:61: warning: '%'-style pattern rules are a GNU make extension
-calendar/libecal/Makefile.am:62: warning: subst -,_,$*: non-POSIX variable name
-calendar/libecal/Makefile.am:62: (probably a GNU make extension) calendar/libecal/Makefile.am:68: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-calendar/libedata-cal/Makefile.am:5: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:6: warning: subst -,_,$*: non-POSIX variable name
-calendar/libedata-cal/Makefile.am:6: (probably a GNU make extension)
-glib-gen.mak:9: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:8:   'glib-gen.mak' included from here
-glib-gen.mak:13: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:8:   'glib-gen.mak' included from here
-glib-gen.mak:18: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:8:   'glib-gen.mak' included from here
-glib-gen.mak:26: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:8:   'glib-gen.mak' included from here
-glib-gen.mak:38: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:8:   'glib-gen.mak' included from here
-glib-gen.mak:41: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:8:   'glib-gen.mak' included from here
-calendar/libedata-cal/Makefile.am:71: warning: '%'-style pattern rules are a GNU make extension
-calendar/libedata-cal/Makefile.am:86: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-camel/Makefile.am:17: warning: '%'-style pattern rules are a GNU make extension
-libebackend/Makefile.am:35: warning: '%'-style pattern rules are a GNU make extension
-libebackend/Makefile.am:41: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-libedataserver/Makefile.am:91: warning: '%'-style pattern rules are a GNU make extension
-libedataserver/Makefile.am:97: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-libedataserverui/Makefile.am:108: warning: '%'-style pattern rules are a GNU make extension
-libedataserverui/Makefile.am:118: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-servers/google/libgdata-google/Makefile.am:27: warning: '%'-style pattern rules are a GNU make extension
-servers/google/libgdata-google/Makefile.am:33: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-servers/google/libgdata/Makefile.am:31: warning: '%'-style pattern rules are a GNU make extension
-servers/google/libgdata/Makefile.am:37: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-servers/groupwise/Makefile.am:85: warning: '%'-style pattern rules are a GNU make extension
-servers/groupwise/Makefile.am:91: warning: pkgconfig_DATA:-$(API_VERSION: non-POSIX variable name
-autoreconf: automake failed with exit status: 1
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Conflicts:
-	configure.ac
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 49d7506..1c802ff 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -21,7 +21,7 @@ m4_define([api_version], [1.2])
- dnl Autoconf / Automake Initialization
- AC_PREREQ(2.62)
- AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
--AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar dist-xz no-dist-gzip -Wall -Wno-portability -Werror foreign])
-+AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar dist-xz no-dist-gzip -Wall -Wno-portability foreign])
- AC_CONFIG_MACRO_DIR([m4])
- AC_CONFIG_SRCDIR(README)
- AC_CONFIG_HEADERS(config.h)
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0003-contact-Replace-the-Novell-sample-contact-with-somet.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0003-contact-Replace-the-Novell-sample-contact-with-somet.patch
new file mode 100644
index 0000000..3cdfa8b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0003-contact-Replace-the-Novell-sample-contact-with-somet.patch
@@ -0,0 +1,202 @@
+From 4df8bd8ae4258289663b27af1207027c7ee06340 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sun, 4 Aug 2013 09:13:25 +0200
+Subject: [PATCH 1/5] contact: Replace the Novell sample contact with something
+ more appropriate
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/addressbook/libedata-book/ximian-vcard.h | 179 ++++++++++++++++++-------------
+ 2 files changed, 103 insertions(+), 77 deletions(-)
+
+diff --git a/src/addressbook/libedata-book/ximian-vcard.h b/src/addressbook/libedata-book/ximian-vcard.h
+index 782d37b..5b0b250 100644
+--- a/src/addressbook/libedata-book/ximian-vcard.h
++++ b/src/addressbook/libedata-book/ximian-vcard.h
+@@ -1,80 +1,105 @@
+ #define XIMIAN_VCARD \
+ "BEGIN:VCARD\n" \
+-"X-EVOLUTION-FILE-AS:Novell Ximian Group\n" \
+-"ADR;TYPE=WORK:;Suite 500;8 Cambridge Center;Cambridge;MA;02142;USA\n" \
+-"LABEL;TYPE=WORK:8 Cambridge Center, Suite 500\\nCambridge\\, MA\\n02142\\nUSA\n" \
+-"TEL;WORK;VOICE:(617) 613-2000\n" \
+-"TEL;WORK;FAX:(617) 613-2001\n" \
+-"EMAIL;INTERNET:hello@ximian.com\n" \
+-"URL:http://www.ximian.com/\n" \
+-"ORG:Novell;Ximian Group\n" \
+-"PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEARwBHAAD//gAXQ3JlYXRlZCB3aXRo\n" \
+-" IFRoZSBHSU1Q/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCM\n" \
+-" cHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMj\n" \
+-" IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgAbgBkAwEiAAIRAQMRAf/EA\n" \
+-" BwAAAIDAQEBAQAAAAAAAAAAAAAHBQYIBAMBAv/EAEYQAAEDAwEFBgMEBgQPAAAAAAECAwQABREG\n" \
+-" BxIhMWETIkFRcYEUkaEIMkLBFSNSsbLRFmJydRgkMzY3Q0RGgpKTosLh8P/EABsBAQACAwEBAAA\n" \
+-" AAAAAAAAAAAAEBQIDBgEH/8QALREAAQMCAwYGAgMAAAAAAAAAAQACAwQREiFRBRMiMUFhMnGBkb\n" \
+-" HRBsEUofD/2gAMAwEAAhEDEQA/AH/RRRREVwXe9W2wwFzbpNZixkc1uqwPQeZ6CoHXevLfom1ds\n" \
+-" 9h6a6D8PGCsFZHMk+CR4n86yzdbrqfaZqYBSnp0hRPZMoG62ynoOSR1Pua8Lg0XPJegX5Jv6k+0\n" \
+-" bBjrWxp22LlkcBIlHs0HqEjiR64peT9umupqyWrhHhpP4WI6eHureNW7Tmw+DGaTI1FJVJdxksM\n" \
+-" qKG09CrmfbFMCHpCw2xATDs8JrH4gykq+Z4mqifbMUZsxpd/QUllK53M2SCb2xa+bXvf0gcV0Uw\n" \
+-" 0R/DVktH2hdUwlpFxjQrg1490tLPuOH0pvv2qE4jdchx1p8lNAj91Va87OtM3RCt+2Nx3Dyci/q\n" \
+-" yPYcD7g1EZ+RR4rSMI9b/S2mhdbhKsmkdtWmNTuNxnXVW2cvgGZRASo+SV8j74PSmOlQUMpORWP\n" \
+-" NU7MrjY0rlQFmdDTxOE4cQOo8R1Hyqe2Z7ZJ2m32bXfHnJVpJCUuqO8uP7+Kenh4eVXkFRFUMxx\n" \
+-" G4UOSN0Zs4LU1FeEOWxOityYzqHWXEhSFoOQoHkQa963rBFFFFERUdfr1E09Y5d1mr3Y8ZsrV5n\n" \
+-" yA6k4A6mpGkL9ojUym0W/TrLmAsGU+AeYBwgfPJ/4RREqrrcb1tJ1oUpBXLmObqUZ7rSByT0SkZ\n" \
+-" J8zk1pHQmiLXo+zpbabC3SAp55Q7zyvM9PIUudiGmURbS7fpCMvzFFton8LSTxx6qH0FM7VV9VY\n" \
+-" 9MzZ7aQt5tASw3+26ohKB/zEVSVFVvZzGMw02tqe/kpbI8LMR6/C/Xxq9QagfbbP+IW1QQ4Rycf\n" \
+-" xncHRAIJ/rEfsmu2a9Fgsl2XIZjtj8bqwgfM1+9L2VFksESAV9o6hG886ebjqjvLWepUSarutdn\n" \
+-" MXV+obRcZks/CwCQ5DKMpeBOTxzwzgA9KwfTtfxPOSB5GQUXc9pOjoC+zXe2HV5xiOC6PmkEfWp\n" \
+-" xe6tAWghSVDIIOQRXxekNOx4b0WPZYLLTram19mwlJKSMHjjNUzQd2dZM7SNxczcLOsttqVzdYz\n" \
+-" 3FewI9iKpK2mjMZdFe7ed9NfT9qZDI4OAd1Vkko50ndoui22kuXq2NBOO9JZSOH9sD9/z86c8gc\n" \
+-" DUJNQlaFJUkKSoYII4EVGoKp9PIHt9e6lyRNlZhcqlsJ2guQpydL3F4mO7kw1KP3Fcyj0PEjrnz\n" \
+-" rSAIIyOVYfvsJ3TGqlCKpTfYuJfjLHMDOR8jw9q2Foy+o1FpWBckY/XMpUoeRxxHsciu/jeJGB7\n" \
+-" eRXPvaWuLT0U/RRRWaxQeVY82x3BVw2oXbJyhgoZR0AQM/UmthK+6fSsWbRQW9pV73x/tZPtwNE\n" \
+-" Wj9Nw0WuwwIKQAGI6G/cAZ+tRW0lx5nTEW4Ntqdat9xjy5CEjJLSFZP5H2qaYdCkpUk5BGQa7Ap\n" \
+-" DrSm3EpWhYKVJUMgg8wRXz+kqyyTG7VXUsV22Clrfc48+CzMiPIejvIC23EHIUDXNe79b7HbXbh\n" \
+-" c5SI8ZvmtZ5nyA5k9BS7d0nfdMPuSdD3JtEZaitdom5Uznx3DzT6cPWkvq/V1611fGW5nZtBCgy\n" \
+-" zFbXhtCycE5JxknxPhXR07RUeB3D11H+9lAfwcxmrrqLbxcHpikWGAw1FScByUkqWvrgEBPpxqi\n" \
+-" ztdXWdqmNqIIjx7gykJUphJCXAM/eBJ5g4PQCmBZNiDKWEu364uF0jJYh4AT6qUDn2FVu6bPIkT\n" \
+-" aTB08xKeMOU2H99eCtKRvZGQMZ7hwceNZxVGzsbmMzIBv5dfNeOjnsCdUwbTtKsV8nJgIccZkqw\n" \
+-" lJcThDqvJJz8s4zUtLVzpc2vZZKt+qBIkyUKt0V0ONKSe+7g5SCPDr9Kv0tznXP1cNMyQfxnXBC\n" \
+-" tqUyuB3gslftPjJLkGWB3u82o/Ij86bf2e7iqRoxyIpWfhpC0JHQ4V/5GlVtJcBt0RPiXif+00w\n" \
+-" Ps5BQtNxP4TJP8Ka6rZZJpW37/Kq68ATlPeiiirBQ0HlWR9t9qVbtpEp/dwiY0h5J8Mgbp/h+ta\n" \
+-" 4pM7fdKLumn2rxGbKn4BKl4HEtn73ywD7GiL7o28JuulLbKCsqLKUL/tJ7p+oqyIe4c6RGyzU4g\n" \
+-" THLNJc3WpCt9gk8A54j3GPcdaZuoosy82V23QpaYpkEIdeIJKUeIAHieXPkTXA11DuassJsCefY\n" \
+-" /SvYZN5FiGZU9edRwLDAXJny2mRukoStQBWQOQHjSjg7PYE7ZmzcZb7cG6KK5CZD6txOCcJQvPg\n" \
+-" QAQfAn2q6RNOWi1D9J3R5dwlR2xmZPVv9mlI8ByTj59ar09Lm0jUIQl5Y0zAUMrQSPiXfHHpyz4\n" \
+-" D1qTRvMQIieQAQXOtllfIDre/X2WqVmI8Qz6D9q0bP9SO37SrSpW8ZUVXw7q+YcKeSgeRyMZ65q\n" \
+-" qammvWTalEv1yjOJtaWfh25CBvBOUkHPlxUeHlyq/MiPCitxorSGWG07qG0DASK45xZlx3GJDaH\n" \
+-" WljCkLGQR6VGinY2ofIG8Lri2gOi37hxYG3zC+uT2HY6ZDbyFMrAUlwK7pB5HNRcp7nxqpzdN3G\n" \
+-" CFQ7NObTa3nApcaSN/suOe4SDw6VK3O4swojsp9WGmxk9fIDrW4UzWkbt2K/v691vjec8YtZUTa\n" \
+-" BL+IuMaIjiWWytXQn/wBD608tgtrVC0W2+tOFSFqd9icD6AVnmFFl6n1AhoAmRPdwcfgR4n2H7q\n" \
+-" 2Ppi1N2exRojaQlKEBIHkAK7Gmi3MTWaLn6iTeSF+qmaKKK3rSiuedEanQ3I7qQpC0kEEZzXRRR\n" \
+-" FjnaRoSVoq/KcYQv9HOr3mHB/qzz3SenhVi0ftAbnNNwLo6G5iQEodUcJd9fJX760ZqLTkHUdsd\n" \
+-" hTWEOtuJwQoVl/XGyS7aakOPwGnJcDORujK0DqPH2qJV0cdUzC/0Oi3QTuhddqY84IuFukwnFFK\n" \
+-" JDSmlEcwFDGR86ISI1tgtQ4jYaYaTuoSP/udJS1azvFoAZLnbsp4dm/klPQHmKs0faVEWkfEw32\n" \
+-" 1f1CFj8q56XZNSwYG5t7fSt46yB5ucimM5L4c643pXWqU5tCteMpRKUfIIH86ipmvnnAUwoQSf2\n" \
+-" 3lZ+g/nWEey5yfCtrquBo8Su0+4sQ46pEp1LTSeZUfoPOlnfr67fZKQlK0QkK/VtficV5nrXOkX\n" \
+-" XUk9KQHp0gnghI7qPyAp1bOdkCmH2rneQHHxxQjHdb9OvWr2j2c2Didm74VZVVplGFuQXRsc2fO\n" \
+-" Qgb1cmsSXQN1JH+TT4D+dPEAAADkK848duMylppISkDGBXrVkoCKKKKIiiqrrbX9m0JARIua1re\n" \
+-" dJDMdoArcI58+AA8zVLsO26RqiS9Gsukpct5lHaKbTLaSrd8wFEZ9s0RN6vGRGZktlDqAoHzFKq\n" \
+-" JtomzrPOuzGjZvwEBRTJfckttpbUOae9jJ5cBk8R514Wrbo7e489+3aTlvtQGTIkqElsdm2Mkq4\n" \
+-" 4zyPKiKf1Hsj09flKdXEQh4/jR3VfMUvJ/2et1ZMOe8keSgFfyqz2LbfJ1M9IZs2kJsx2O0XnEN\n" \
+-" yEAhA4ZwcZ58hxr7ZdtkvUS5SbTo2fJMRsuPkPoSG0jzKsDPPhz4HyoipDewC47+FXFWOjYH51Y\n" \
+-" bTsAgtrSqc88/jwWrA+QxUlYtujupZ6oNo0nLlSUtqdKEyW04SMZOVYHiKjP8ACUt5/wB3pX/XT\n" \
+-" /KiJnWLQ1nsTSURorad39lIFWZKUoThIAHSlNqDbLP0siKu96MnQ0ygSyVyGzvYxnlnB4jga87F\n" \
+-" ttlamXJbs2j50xcZvtXUtyEZCfPB5+gyaIm9RSetm3J68RbhJgaSmPM25vtZaviW09knjxIOM8j\n" \
+-" y8q7LHtzstwv/AOhrlBftkkudkFOLS43v5xgqSeHHx5daImrRX5QtK0hSTkGiiLMP2ho8wa1iSn\n" \
+-" QoxVRQ20fAKClFQ9eIqq7LLJe7vreG7ZZCoZhqD8iZjustjnnwORkY8c+Wa1ZqbStt1PBMa4MId\n" \
+-" Rz7wzg+dL8bEbA1vpa7RtK+CkpdWAfXjRFB7UpCNe6Kdm6NnJft1qluKuUJlvdKznPbYH3hzPXJ\n" \
+-" PMGqZsk/zc2gf3G5/Cumc3sRsTO92Rcb3uB3XVjP1r4jYfYGwoN76QsYUEurGR5HjREudhUt2BP\n" \
+-" 1TMYID0eyuuoJGRvJII+oq96I2iwtVz7rb7ZZWbalyzyJ9wKUjLsrKEkjH4cE8+Jz049bew+wNb\n" \
+-" 3Z76N4YO66sZHlzob2H2Bkktb6CRglLqxkeXOiJZbAv9IMj+7X/wB6ag9lGnEaj17CRJA+BhZmy\n" \
+-" lK+6EI44PQq3R6E06W9h9gZVvNb6FYxlLqwcfOhvYhYWt7s99G8MK3XVjI68aIo7UxgbR9IajhQ\n" \
+-" 7/Du9yiSF3S3tMNrStlkAAt94DPDI4eJFUvYfNetqNYz4xAfjWZx5skZAUnJHD1FMVrYhYWVbzW\n" \
+-" +2ojGUOrBx86EbD7A0FBvfRvDCt11YyPI8aIo23zdP6i2e621TaUJiXCfa1IucFPJt5KVnfHRWS\n" \
+-" euPPNZ2YadfkNsspUp1aglCU8yTyrTSNh9gbCgjfSFjCgl1YyPI8al9PbItP2WamUywkuJ5KOVE\n" \
+-" emeVEVw02ZH9H4YkEqdDYCifE4oqXbaS02lCRhIGBRRF//Z\n" \
++"VERSION:3.0\n" \
++"FN:Yocto Project\n" \
++"URL:http://www.yoctoproject.org/\n" \
++"EMAIL:yocto@yoctoproject.org\n" \
++"TEL;TYPE=VOICE:+00 000 000 0000\n" \
++"ADR;TYPE=HOME:;1720 Beaver Creek;Dam #4;Planet Earth\n" \
++"LABEL:1720 Beaver Creek\\nDam #4\\nPlanet Earth\n" \
++"PHOTO;ENCODING=b:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pV\n" \
++" UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAFE9JREFUeJztnXmQHNV9xz\n" \
++" +ve86dvU/tanUiCVwRQuaIhSEOMsIiEsbGRtiVGFy4EsdU4bINOICPUtkQHOxgYoiDTVJxCBiwM\n" \
++" CBxBjAlsIUlEQzISAhZN5JW2l3tvbNz9JU/fu/N7CwgVquVmEr194/t7enu97p73vf9zvcbCBEi\n" \
++" RIgQIUKECDH5UB/0DYwXwZv/Mh8AK3ISgBs4AwAR29oCwNwFfQBKLXY/mDucHFgf9A2EKEXZMiT\n" \
++" YdtdUADff+QCA5Q/9BQB+Xk7w9a27vpxP8g0AO9J4IYA64/qOE3m/k4WQIWWGsmJI/q0fn2P+t5\n" \
++" zerwFYDK0ACAgCAMsXRuCLqPDTQ7LvBgogSDY8DODWLvguQOLkv9t6Qm5+khAypMwQfiFlhkmZs\n" \
++" vY/9rOzAXK59EkAEc87BDD9c99cC6CU8t7tumD/PQ0A/uCOHwF4Vm6pOWbnc20AlvIDOTnQF8nU\n" \
++" hJOT3XQ/AK7jyJRWUSXHIw1vAQQV078BEJ1/7f9MwqMed4QMKTNMiCF/uP/ONgC7Y/ODAF52YCE\n" \
++" ArhcBwMIDiMZiLkAsVX8fwClfvfOrALldd5wGYGe6HgRQQfpkABXxi/fjCKkCX6ihtJ6rtFAP8i\n" \
++" Ny3nAfAJ4dk/OiCQBsZSn5vLoXIJ+aezVAxfxvPDCRZz5RCBlSZpgQQzbe+qXzAYLcwAMAgRM0A\n" \
++" UTQ072Sf6JKmo8HWQVgNSc7AU6+YG4AELiZKXITIic8gsL92J5uyzXixzBGbx1tIA73yIMkK2Vr\n" \
++" x/R5cg9KaXU40gCAH2//lOkjsm3WkwB97KoEyOHUA2TTw9J5U0MWwNm5rw9g3tfuzB3lqzpqhAw\n" \
++" pM0QmclE0knIBvOywD+ApB4BAG2u2EmoEnnw+xEAAsODD7S0AuGLMKZRRnYRBRpMCfMMMLTNUIP\n" \
++" vKc0u2WPoaSz+KbeuPPQXge8I+5XeLDAqsX5k+OnK7bwJwe50bAHLZfBWAo9v2DnfK3dnxtQCv3\n" \
++" vH1WwB2TPnoWoDLLrvsXbXHY0HIkDLDhBhizzx1J4C7tXcYQAVOC4CtRYAVyKh2/DQA886ZoQAS\n" \
++" VVGgaEqosTJsFEOUN8aJyNjB6JdeY+mxFZQ2qSwtQzw50c4eSJhjUW/wHwF275O+UpX1Its0w72\n" \
++" 88eSPLAZwoiMfAWj1131aH3iOSUbIkDLDhBhy2me/vB9gw21XPQQQH8zcAOArmdADJ6MApp5SB0\n" \
++" D1lKqS6wtjODBGuLYt/FGxJSM7fDNmglF/QRkfo2aORel5Zlvsy9NMKfbR0CLXJPZIG44n51hKP\n" \
++" ncLfcp+3sknALxMunbsO5kshAwpM0yIIQaLrr3rRoD1t15ZB5AY6vx7gGhKRlxNe61oOLYto1Nf\n" \
++" F2hmKE/LBTNqNVNglP3hyvyuCtfIvm/cYyqpt7Y+T2t8Y5lSuqsvEf60z4gD8MarYvVX1WibRZ/\n" \
++" saHnlqOQWgFjDzFfe+60cG0KGlBkmNUC1/t9XngfQ1nTg1wDTZ9jizS3M23p4+qZz3X1ExoWy7E\n" \
++" JbgXHyau1JG/0of0xbuo3A1Z97pZZ9gX3umC2gHQRkhrIAvLxeLHTbEoYYZntWbBjAr5t6HcDHr\n" \
++" 73950d4DceEkCFlhmOSIWOx6LwqmYyzNdUAXrav5LiypTsVE39TwYYwE7w3yg7Rmo7RtgjMyDfX\n" \
++" 2HrP7BsmGc1IU8pY8rbpsiinDItiCfEU19aLzdLZKYxJVNbtAnAq638CcMFxZIZByJAyw6TIkGD\n" \
++" vc7MBvM5nNgCoYKAJINDD1dIeVxPLANGEKPirHNPSqEaNvDHMUKVbY5nbhimaIfq4r4IxVwW6uV\n" \
++" EWvyf3Y2lZ0tNrdQFs3hb7KYCTaH4U4IJrb3/j/d7BZCFkSJlhUmRILuckAGKD2SYAnAwAFmL5Z\n" \
++" jKZACCTFgs+OyzHs3kJLzg62S2fLxLW08ywtWyIxuRYLCG3XBGXbVV1BQCpSn2tlhWWHdVPKGIt\n" \
++" MHZKiSEibfiabTXNElP5y2mNjwGoj9xywphhEDKkzDApDEnMW/YmQG7DDyS2PsBXAF7dsPNigDe\n" \
++" 27msDCIzfyZZRa+mRGTExjFESzVKxkj6M1Vzwe3nCMiffr9uQ4w3V0nZzszTWWC99NDbK6E9WJg\n" \
++" ttqmhC7I7KavFhxWqbAdxI5ZSjfQeThZAhZYbwCykzTKphGF904yb971UAv1l5hQPQ3uZdLZ1Jt\n" \
++" KngXNT+EEuZgFVxfPgFhdUIYatkz1zrG/VYq7M5TxSFvQdlf9N22R/JSDi2rqo4L86cJprAwvl2\n" \
++" L0BFW634VWKRD2yNSciQMsOkMsRg67rVVQDD69acBoCq1u73Uoeg75e6Q7xRrhO/4IfUzsPRHg+\n" \
++" KLDNX+JackNTqbjwqR6qrdLBJG6X5UQGq/f362r2V1wF8tL71fwFinTM+sIz5kCFlhuPCkNxbW2\n" \
++" YAJOxYG0CvttYefWUnAGfOqAfg9FbZ5rXj0LOL87uvKeIaEVHIudYukDHnKW34YRtnozxajzZCa\n" \
++" 5Ki7laM0qar4non0ZoBiC/95uaJPO9kImRImeG4MCTiZWYDxJORaQDPbpTlfvslK4hUp4zas2bK\n" \
++" fB9xSmULFI1EIzsK3nhvjLNRlTLH4M2DAwA8sWk/AOd9qA2AD0+rL56kU4yi5C/Wnzw47oc8Tgg\n" \
++" ZUmY4LgyxLW8ugB94cYADg7mSlFETNIpoGng6dBtRxfHhaoejju7iGQYYd3spIQpamQlodQ8KC1\n" \
++" 0tW/b3yf6HWopaVkVSZIibHT7l6J/y+CBkSJlhUhnyp6eeigPk9v52FkBUB6C0x5z+rIze2Y2SO\n" \
++" KfGWOyj00BNwoMJapnAk9L6lTVG7JgosGFKbUq0Ks+X5QoZR6/a9YoGja95FnhOJUAQBDF9P/mj\n" \
++" ffbJQsiQMsOkMiTa2akA0k5OfOCOhGaXzW8HoCct+6e31wCQ0dpVXssLNdr/ruVJoBliZIrJB1K\n" \
++" 2DtkWBrz8Y3Sw2U3Cwnk66NSiA1mxaHEMKl8CaK4nnW1/+j6TiB0yJIRgUhmyZ+ZMF6Byy5ZuKO\n" \
++" akTauS+Xx6jWzNqDbmhxfIuOjuOlxoK1mRAqD5zLMBmDp/AQAdL64FYHDPdgBc7ZuKxoWURitLa\n" \
++" at/+fxpQHHkGc8ygGuqQyjlAsxbdvngBB6bTZs2tANYFfE5APPnLPyDOaaUGjqatkKGlBkmlSGL\n" \
++" F0utqg0/ve4FAKWiVwPkA6cKIHB8naqpSuIiRvNpbGgotGVkQVWrRFNrpk4H4GC7bL0dkn8QT1S\n" \
++" U3oRxZWkZFLeMbFHvcAd4nvwfj9dMaKn0s8/ffzHAa5s2rgF4fNUaABoaG3abc35868rLAK65/n\n" \
++" vjStAOGVJmOC7VgFYGIhTO/+dr7gDIDXd+CSDieUmASCFzuvQu7FFtFOZ8bU3bKdHMRgYlPTWql\n" \
++" 5sZJcvEO4yZkdNZEb5ehOPp4zkVKdj4qqLuBYDPfu/ujx/N8z3x9H2fkrbdVQB73z4YA3ju8acD\n" \
++" gP7unsJ7bZnSlgGYffKsCwFuve3u3x6p7ZAhZYYTUi9rzc1f/i5A98G3vw9Qoxf3VyVFhMULDqv\n" \
++" Rlrp8ZhVSQsdEG8fE1M3WK0QG5eysF+QAPMt+HcCJVj5i+vibW/7zNnjv4jjveI41v1gE4OFLTS\n" \
++" 7sNgBli99goH9QATy3+qkCC/ds26kAmqc0DwEsXXrRJQBXX3f98+/WR8iQMsNx8fYaGN/QvXddd\n" \
++" T7Azr1iAO/auQcA1xGpYevRPm9mMYktEZNYSTIqW9ss3DFMcOUaNyeDeyAt+4Pa+LF04kheW//1\n" \
++" 7W3bASJnT/9X08d4mfHLX981FyDvuqKNRWyd+Ie+F6F2MiUa3+KLLixQ/Yn06gBgsKurCuB3v3v\n" \
++" uh/rQGe/WV8iQMkP4hZQZjotQf+WXP28EcBP+zwCG4sGnAQb6hy2A7l1bFcCiOgmvbu8Wj8Xat4\n" \
++" vFdmrrqgFIJHX1B1MVVmc9ZLK6jsqQTINbtsv+nsOy/cxZcn0kIVpBqqVOAbTHpz1m+vjKd/6tU\n" \
++" Bno3fDoow9MA3C9YUkAjFp1UHT1eDrDIghMtQh94SgnaW5EVmP96r/ulRXJmXwHwA/vuvN0gIUL\n" \
++" z+ka3WfIkDLDMTHk9f++NgUQT0eaAEac3JUAvV2Hvg6wr3egGmD3iIzqs5b/FQCREUnrPCsiAy+\n" \
++" bl1F0y7qBQttVzbLUpLJCC/WoKACONghHRoQJ+3d1A9CxR5gyNCLH/3yOFB46c34rANs6DwYAFf\n" \
++" 3FRSgNze1vAcSTkRsAalMtUrZ8SnsGwG+s3ghgRW0p6myq22nXj6etUM8kXhgaB6MWoUTFy9nXI\n" \
++" UR45uHHfgTw9Avr/+GdbzRkSNlhQmrvlv/49gyA6NDw7QD5bN8lAP6weJrNiLeaWgKAzte3K4C8\n" \
++" /v47B2UARdNSN3HJKcKCl94qEna7Tua0IibZQa6Ja89HhTYYG4fkeI1OfqhNySO98baEbrd3Sr5\n" \
++" odVRmgznVscLojXXvPwUgn0isBhipEpbVTm0GQNutONoLalnWEWeUIChlEICn1fDmltbV8N7MMA\n" \
++" gZUmYYN0N2r/1Foc5Udstr3wIg138JQKATCNxAhrEKZCQ5VlIBXLrkPACaDu0DYOfmHQAMW5I5F\n" \
++" 3xY5vmVFxb7+/4a0bjmatnRpjPmDudlgL+o5VKVzmqoTsjxXp1CGtGGpakE0ZeTezw0VJQhlQlp\n" \
++" O6mrGFHfqAA2bJT40vwzTpf7ntqqQ7263uOYFKRgTOZ3aWK49RiAW2t9gXEgZEiZYdwM6d38ZiE\n" \
++" HM54fOgPAz4umk8nLMM27kpvpOTJENq2XmExSj5zzW8S1UN8j2lTPdAm7Zl4TO2T+1mII958qpI\n" \
++" 2WKaJtDc+eAUDt1l0A/G1C2KUCGfmNmkkHtUP+qRHZf13HiWt0FQl3OF3ow6/XNX4rErJaWAe79\n" \
++" u4Q+2jX9r0AXHL5ZdJ3kwTQXLO+PijZoHSuUhCo9aYP2/a/CnDF0iuKHR8BIUPKDOPXspLFUGkm\n" \
++" I3Oun5XRmdajMK0ZM5AVbaVrUOTAqoyMqFPrJCUn1yo2wut/Et28tUOOVwcFMUWtkS/aYu8+YxE\n" \
++" ATXtEDjVrmRBTIitSMWHEbJ1gl9d1fdf3y3k9SNtWtugNmK3lj601obgenhVVcp993aKprb53FQ\n" \
++" CXXiliIFktCRieXmFkGdPcsg4CpJI115s+VnxyxdscBUKGlBnGzZDTTzqv4HN5qXfViwBZV50JM\n" \
++" JyRytWDOWHI7l5JbN6ake97d81skTE1LQrg2ks/BsCT9z0NwOY+sbaXnrug0N+da34PwEU7JGQ7\n" \
++" c794vndoP9Kd/RLSnabXoX9xkSTjPfuaeAEe7hdZslWZer5yXrKY7MD2nhEFUF8hsizWI9b8SXO\n" \
++" mK4BX+6RvNysOtGdWP6kAPnHJ8gAgkUpqH5bqArDtxOcBVnxyxe/e80W+D0KGlBnGzRC1uPhzdC\n" \
++" /+9Ns/ARgeGJgG0DGUXQLQPTB8AGBzt5SuPhhtOB3Ar2tIAGw4JMx5/hWxQ7py0v36PgnpLpozt\n" \
++" 9Df7mYZ6Vcf0rlrGZMYYcK+woAfzJH9tC+y5O4D0lZXXIJdkZSMfs/8RFIuU7BDtg1k0gDVKacX\n" \
++" gM7N0wDmnHlmL8CfLZwfA/jjy5sqAboPCINeenatAjh36ZJBgGgscTnAFy79whETGMaDkCFlhmP\n" \
++" y9r696rYkwM+fWf95gG279n8OoLM/PRWgI8fJAJ2pKVGAkXpJeivQUntLnRHRqM6e11Zoe5tekt\n" \
++" aTLy0uYIziuOQusETcTgxpL/Dve6T1IKK3+gnjfQcBaBop2jqtFXZeN5oGUL5bBzB9SuPNABd/8\n" \
++" Yu/AXjt5ZcfAXjzj3+sB1BW0AfwieUXXQnwtWu+s2Ycr2tcCBlSZjgmhtz07etOAtj86saNAE5m\n" \
++" pBYgl3ctAE/n6gxlZUnbznxKAfQ0zAIgSIhtYGr0Wn7RSRQoPefrytaB+XUEnSJqKlmbKkAmLcj\n" \
++" Tn1s6CTvZK3bL9LyIicZUtNCJrbMrzHK5vF4EWlFVGQC0z5p1GsA55yw+AOA72cUA6ezwawDXXH\n" \
++" PjrqN4XeNCyJAywzEx5IpPffwJAC+fWwaQ1dZzoNtNZyUuMqLj33kdD+90RfM5VK1/TiQqlq/yi\n" \
++" pE2W7mOfOZmAGxNEU9XCAgsKwngWzrrzpKN0nHu6NBBBTAzIzZOoy6YGo0Ux2ChrKPeutpGsXW9\n" \
++" 3qbW1ucBVj365JKjfzsTQ8iQMsOEIobf+PJfnwrQsXf3qQC5jKhCvv6Vm5z2ablBacVqSy8NaLI\n" \
++" kUhjpk/m9XzPEihfrXiz72MduBVix5NyHAJYtW9YF8MILLzQB/OSBxy8C2LZ330UAnQNDCwGC9E\n" \
++" AKoCUv2lS9DvtFDDPUaIYYQhbctvIcOu6RT4+ce3Rv5tgRMqTMEH4hZYYJTVmeE9QA+L5UqjSra\n" \
++" ANLV/XxSjPSi9+7WW0rbo5qW85PepL1oLLFckCnpOxfASxfvnzLmO479XYzwLp16x4C+Ob1Nz4C\n" \
++" MJTvWQCQiprqQDpLXt+Tskb9JIapYl5YA19aN8Vx8/H3exeTjZAhZYYJMSTrcxgg70uBw+IaDTn\n" \
++" ujd2aWldarTSV5Fy9TtwPxECrb6j9jenj+ptuehPghptvPuK9ZLq6+gHswBUdW7PQ9WSs2VrVDm\n" \
++" zzG0klY1BSQY2DZUxloVi8YkKrco8FIUPKDBNiyJeuurwD4I5bbt8IMJLubgfIZXMWjKqXaKrCm\n" \
++" a1ZuK5LNtTU1h8GaG+fthLg/oceusv0oVQxkHQkXPCZz/QA3HPPPSsAnn7y8SsBeroOnwtg4y8A\n" \
++" yOez8qORjluQC+YHJH1fll1F7UgOIJlK7gOYPmvubXLmpP863nsiZEiZYVKWI6xc+a2FAHv/tP1\n" \
++" cgM7OzmqAwLdaARzP6QCobajrA5gza+5LALfefuJ+BsKgt7d3xtjP6urqxP2u1OF3XnFiETIkRI\n" \
++" gQIUKE+H+C/wMGX8Ias1s6CQAAAABJRU5ErkJggg==\n" \
+ "END:VCARD"
+-- 
+1.8.3.2
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0004-configure-Fix-libical-pkg-config-trying-to-use-host-.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0004-configure-Fix-libical-pkg-config-trying-to-use-host-.patch
deleted file mode 100644
index 1383347..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0004-configure-Fix-libical-pkg-config-trying-to-use-host-.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2c73b588b9018cb59c666eae3a15fa1af42c56be Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sun, 4 Aug 2013 10:57:08 +0200
-Subject: [PATCH 4/5] configure: Fix libical pkg-config trying to use host
- paths
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- calendar/libecal/libecal.pc.in | 2 +-
- configure.ac                   | 3 ++-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/calendar/libecal/libecal.pc.in b/calendar/libecal/libecal.pc.in
-index fc6b359..d3435bb 100644
---- a/calendar/libecal/libecal.pc.in
-+++ b/calendar/libecal/libecal.pc.in
-@@ -12,4 +12,4 @@ Description: Client library for evolution calendars
- Version: @VERSION@
- Requires: libical >= @LIBICAL_REQUIRED@ libedataserver-1.2 gio-2.0
- Libs: -L${libdir} -lecal-1.2
--Cflags: -I${privincludedir} @LIBICAL_EXTRA_CFLAGS@
-+Cflags: -I${privincludedir}
-diff --git a/configure.ac b/configure.ac
-index 1c802ff..f1d4ce8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1351,7 +1351,8 @@ dnl to differentiate between <libical/ical.h> and <ical.h>
- dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
- dnl libical is fixed, we have to work-around the buggy CFlags.
- dnl *****
--	LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
-+	m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$])
-+	LIBICAL_EXTRA_CFLAGS=" -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=includedir libical` "
- 	LIBICAL_EXTRA_LIBS=""
- 	AC_SUBST(LIBICAL_EXTRA_CFLAGS)
- 	AC_SUBST(LIBICAL_EXTRA_LIBS)
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0005-soup-adapt-to-new-libxml2-API-from-2.9.0.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0005-soup-adapt-to-new-libxml2-API-from-2.9.0.patch
deleted file mode 100644
index addf2ee..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0005-soup-adapt-to-new-libxml2-API-from-2.9.0.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From ac95e89749a01618f98b554a98e78d7c988bfc10 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Tue, 27 Nov 2012 08:46:51 +0100
-Subject: [PATCH 5/5] soup: adapt to new libxml2 API from 2.9.0
-
-* for more info see
-  https://mail.gnome.org/archives/xml/2012-August/msg00005.html
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- calendar/backends/caldav/e-cal-backend-caldav.c | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
-index 12f8f22..5555a3e 100644
---- a/calendar/backends/caldav/e-cal-backend-caldav.c
-+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
-@@ -1172,8 +1172,13 @@ check_calendar_changed_on_server (ECalBackendCalDAV *cbdav)
- 	soup_message_set_request (message,
- 				  "application/xml",
- 				  SOUP_MEMORY_COPY,
-+#ifdef LIBXML2_NEW_BUFFER
-+				  (gchar *) xmlOutputBufferGetContent(buf),
-+				  xmlOutputBufferGetSize(buf));
-+#else
- 				  (gchar *) buf->buffer->content,
- 				  buf->buffer->use);
-+#endif
- 
- 	/* Send the request now */
- 	send_and_handle_redirection (priv->session, message, NULL);
-@@ -1321,8 +1326,13 @@ caldav_server_list_objects (ECalBackendCalDAV *cbdav,
- 	soup_message_set_request (message,
- 				  "application/xml",
- 				  SOUP_MEMORY_COPY,
-+#ifdef LIBXML2_NEW_BUFFER
-+				  (gchar *) xmlOutputBufferGetContent(buf),
-+				  xmlOutputBufferGetSize(buf));
-+#else
- 				  (gchar *) buf->buffer->content,
- 				  buf->buffer->use);
-+#endif
- 
- 	/* Send the request now */
- 	send_and_handle_redirection (priv->session, message, NULL);
-@@ -1715,8 +1725,14 @@ caldav_receive_schedule_outbox_url (ECalBackendCalDAV *cbdav)
- 	soup_message_set_request (message,
- 				  "application/xml",
- 				  SOUP_MEMORY_COPY,
-+#ifdef LIBXML2_NEW_BUFFER
-+				  (gchar *) xmlOutputBufferGetContent(buf),
-+				  xmlOutputBufferGetSize(buf));
-+#else
- 				  (gchar *) buf->buffer->content,
- 				  buf->buffer->use);
-+#endif
-+
- 
- 	/* Send the request now */
- 	send_and_handle_redirection (priv->session, message, NULL);
-@@ -1765,8 +1781,13 @@ caldav_receive_schedule_outbox_url (ECalBackendCalDAV *cbdav)
- 		soup_message_set_request (message,
- 				  "application/xml",
- 				  SOUP_MEMORY_COPY,
-+#ifdef LIBXML2_NEW_BUFFER
-+				  (gchar *) xmlOutputBufferGetContent(buf),
-+				  xmlOutputBufferGetSize(buf));
-+#else
- 				  (gchar *) buf->buffer->content,
- 				  buf->buffer->use);
-+#endif
- 
- 		/* Send the request now */
- 		send_and_handle_redirection (priv->session, message, NULL);
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0006-configure.ac-do-not-overwrite-localedir.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0006-configure.ac-do-not-overwrite-localedir.patch
deleted file mode 100644
index 741e5e9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server/0006-configure.ac-do-not-overwrite-localedir.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3feaea8e84b3ad8dc2d551e42224f3b4a9413e7d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Thu, 3 Sep 2015 11:14:24 +0200
-Subject: [PATCH] configure.ac: do not overwrite localedir
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport [1]
-
-[1] https://git.gnome.org/browse/evolution-data-server/tree/configure.ac#n298
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.ac | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index f1d4ce8..cee847f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -257,9 +257,6 @@ GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
- AC_SUBST(GETTEXT_PACKAGE)
- AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
- 
--localedir='$(prefix)/$(DATADIRNAME)/locale'
--AC_SUBST(localedir)
--
- dnl ******************************
- dnl Initialize libtool
- dnl ******************************
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_3.26.3.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_3.26.3.bb
new file mode 100644
index 0000000..2303b8f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_3.26.3.bb
@@ -0,0 +1,130 @@
+SUMMARY = "Evolution database backend server"
+HOMEPAGE = "http://www.gnome.org/projects/evolution/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2 & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6a6e689d19255cf0557f3fe7d7068212 \
+                    file://src/camel/camel.h;endline=24;md5=342fc5e9357254bc30c24e43ae47d9a1 \
+                    file://src/libedataserver/e-data-server-util.h;endline=20;md5=8f21a9c80ea82a4fb80b5f959f672543 \
+                    file://src/calendar/libecal/e-cal.h;endline=24;md5=e699ec3866f73f129f7a4ffffdcfc196"
+
+DEPENDS = " \
+    intltool-native gperf-native \
+    glib-2.0 gtk+3 gconf libgnome-keyring libgdata \
+    dbus db virtual/libiconv zlib libsoup-2.4 libical nss libsecret \
+"
+
+inherit distro_features_check gnomebase cmake gtk-doc gettext gobject-introspection perlnative pythonnative
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI += " \
+    file://0001-CMakeLists.txt-Remove-TRY_RUN-for-iconv.patch \
+    file://0002-CMakeLists.txt-remove-CHECK_C_SOURCE_RUNS-check.patch \
+    file://0003-contact-Replace-the-Novell-sample-contact-with-somet.patch \
+    file://iconv-detect.h \
+"
+SRC_URI[archive.md5sum] = "568a21a4df4e0ec985c849b38fc66908"
+SRC_URI[archive.sha256sum] = "63b1ae5f76be818862f455bf841b5ebb1ec3e1f4df6d3a16dc2be348b7e0a1c5"
+
+LKSTRFTIME = "HAVE_LKSTRFTIME=ON"
+LKSTRFTIME_libc-musl = "HAVE_LKSTRFTIME=OFF"
+
+EXTRA_OECMAKE = " \
+    -DWITH_KRB5=OFF \
+    -DENABLE_GOA=OFF \
+    -DENABLE_UOA=OFF \
+    -DENABLE_GOOGLE_AUTH=OFF \
+    -DENABLE_WEATHER=OFF \
+    -D${LKSTRFTIME} \
+"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[openldap] = "-DWITH_OPENLDAP=ON,-DWITH_OPENLDAP=OFF,openldap"
+
+EXTRA_OECONF = "--with-libdb=${STAGING_DIR_HOST}${prefix} \
+                --disable-nntp --disable-gtk-doc"
+
+# -ldb needs this on some platforms
+LDFLAGS += "-lpthread -lgmodule-2.0 -lgthread-2.0"
+
+do_configure_append () {
+    cp ${WORKDIR}/iconv-detect.h ${S}/src
+
+    # fix native perl shebang
+    sed -i 's:${STAGING_BINDIR_NATIVE}/perl-native:${bindir}:' ${B}/src/tools/addressbook-export/csv2vcard
+}
+
+do_compile_prepend() {
+    export GIR_EXTRA_LIBS_PATH="${B}/camel/.libs:${B}/libedataserver/.libs"
+}
+
+
+PACKAGES =+ "libcamel libcamel-dev libebook libebook-dev libecal libecal-dev \
+             libedata-book libedata-book-dev libedata-cal libedata-cal-dev \
+             libedataserver libedataserver-dev \
+             libedataserverui libedataserverui-dev"
+
+FILES_${PN} =+ "${systemd_user_unitdir} \
+                ${datadir}/dbus-1 \
+                ${datadir}/evolution-data-server-*/ui/"
+RDEPENDS_${PN} += "perl"
+
+FILES_${PN}-dev =+ "${libdir}/pkgconfig/evolution-data-server-*.pc"
+FILES_${PN}-dbg =+ "${libdir}/evolution-data-server*/camel-providers/.debug \
+                    ${libdir}/evolution-data-server*/calendar-backends/.debug \
+                    ${libdir}/evolution-data-server*/addressbook-backends/.debug \
+                    ${libdir}/evolution-data-server*/extensions/.debug/"
+
+RRECOMMENDS_${PN}-dev += "libecal-dev libebook-dev"
+
+FILES_libcamel = "${libdir}/libcamel-*.so.* \
+                  ${libdir}/libcamel-provider-*.so.* \
+                  ${libdir}/evolution-data-server*/camel-providers/*.so \
+                  ${libdir}/evolution-data-server*/camel-providers/*.urls"
+FILES_libcamel-dev = "${libdir}/libcamel-*.so ${libdir}/libcamel-provider-*.so \
+                      ${libdir}/pkgconfig/camel*pc \
+                      ${libdir}/evolution-data-server*/camel-providers/*.la \
+                      ${includedir}/evolution-data-server*/camel"
+
+FILES_libebook = "${libdir}/libebook-*.so.*"
+FILES_libebook-dev = "${libdir}/libebook-1.2.so \
+                      ${libdir}/pkgconfig/libebook-*.pc \
+                      ${includedir}/evolution-data-server*/libebook/*.h"
+RRECOMMENDS_libebook = "libedata-book"
+
+FILES_libecal = "${libdir}/libecal-*.so.* \
+                 ${datadir}/evolution-data-server-1.4/zoneinfo"
+FILES_libecal-dev = "${libdir}/libecal-*.so ${libdir}/pkgconfig/libecal-*.pc \
+                     ${includedir}/evolution-data-server*/libecal/*.h \
+                     ${includedir}/evolution-data-server*/libical/*.h"
+RRECOMMENDS_libecal = "libedata-cal tzdata"
+
+FILES_libedata-book = "${libexecdir}/e-addressbook-factory \
+                       ${datadir}/dbus-1/services/*.AddressBook.service \
+                       ${libdir}/libedata-book-*.so.* \
+                       ${libdir}/evolution-data-server-*/extensions/libebook*.so \
+                       ${datadir}/evolution-data-server-1.4/weather/Locations.xml"
+FILES_libedata-book-dev = "${libdir}/libedata-book-*.so \
+                           ${libdir}/pkgconfig/libedata-book-*.pc \
+                           ${libdir}/evolution-data-server-*/extensions/libebook*.la \
+                           ${includedir}/evolution-data-server-*/libedata-book"
+
+FILES_libedata-cal = "${libexecdir}/e-calendar-factory \
+                      ${datadir}/dbus-1/services/*.Calendar.service \
+                      ${libdir}/libedata-cal-*.so.* \
+                      ${libdir}/evolution-data-server-*/extensions/libecal*.so"
+FILES_libedata-cal-dev = "${libdir}/libedata-cal-*.so \
+                          ${libdir}/pkgconfig/libedata-cal-*.pc \
+                          ${includedir}/evolution-data-server-*/libedata-cal \
+                          ${libdir}/evolution-data-server-*/extensions/libecal*.la"
+
+FILES_libedataserver = "${libdir}/libedataserver-*.so.*"
+FILES_libedataserver-dev = "${libdir}/libedataserver-*.so \
+                            ${libdir}/pkgconfig/libedataserver-*.pc \
+                            ${includedir}/evolution-data-server-*/libedataserver/*.h"
+
+FILES_libedataserverui = "${libdir}/libedataserverui-*.so.* ${datadir}/evolution-data-server-1.4/glade/*.glade"
+FILES_libedataserverui-dev = "${libdir}/libedataserverui-*.so \
+                              ${libdir}/pkgconfig/libedataserverui-*.pc \
+                              ${includedir}/evolution-data-server-*/libedataserverui/*.h"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_git.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_git.bb
deleted file mode 100644
index aadc4b5..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/eds/evolution-data-server_git.bb
+++ /dev/null
@@ -1,116 +0,0 @@
-SUMMARY = "Evolution database backend server"
-HOMEPAGE = "http://www.gnome.org/projects/evolution/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6a6e689d19255cf0557f3fe7d7068212 \
-                    file://camel/camel.h;endline=24;md5=b02175c88f821224746b347a89731a2b \
-                    file://libedataserver/e-data-server-util.h;endline=20;md5=934502f03c84523aa059d4825887b380 \
-                    file://calendar/libecal/e-cal.h;endline=24;md5=5d496b9b6fd2a4fdbbfc31ef9455c9d0"
-
-DEPENDS = "intltool-native glib-2.0 gtk+3 gconf dbus db virtual/libiconv zlib libsoup-2.4 libglade libical libgnome-keyring gperf-native libgdata nss"
-
-SRCREV = "a9e4e74ec4473a4fd09e56b690bd4fa72f686687"
-
-# 3.4 series needs libgdata-0.10*, 3.8 series needs also libsecret instead of gnome-keyring
-PV = "3.2.3+git${SRCPV}"
-
-SRC_URI = "git://git.gnome.org/evolution-data-server;branch=gnome-3-2 \
-           file://0001-contact-Replace-the-Novell-sample-contact-with-somet.patch \
-           file://0002-Fix-for-automake-1.12.x.patch \
-           file://0003-Disable-Werror-for-automake.patch \
-           file://0004-configure-Fix-libical-pkg-config-trying-to-use-host-.patch \
-           file://0005-soup-adapt-to-new-libxml2-API-from-2.9.0.patch \
-           file://0006-configure.ac-do-not-overwrite-localedir.patch \
-           file://iconv-detect.h \
-           file://0001-imapx-Fix-signature-for-imapx_tokenise_struct.patch \
-           "
-
-S = "${WORKDIR}/git"
-
-inherit autotools gtk-doc pkgconfig gettext gobject-introspection
-
-# -ldb needs this on some platforms
-LDFLAGS += "-lpthread -lgmodule-2.0 -lgthread-2.0"
-
-# Parallel make shows many issues with this source code.
-# Current problems seem to be duplicate execution of the calander/backends
-# directories by make resulting in truncated/corrupt .la files
-#PARALLEL_MAKE = ""
-
-do_configure_append () {
-    cp ${WORKDIR}/iconv-detect.h ${S}
-}
-
-do_compile_prepend() {
-        export GIR_EXTRA_LIBS_PATH="${B}/camel/.libs:${B}/libedataserver/.libs"
-}
-
-EXTRA_OECONF = "--without-openldap \
-                --with-libdb=${STAGING_DIR_HOST}${prefix} \
-                --disable-nntp --disable-goa --disable-weather --disable-gtk-doc"
-
-PACKAGES =+ "libcamel libcamel-dev libebook libebook-dev libecal libecal-dev \
-             libedata-book libedata-book-dev libedata-cal libedata-cal-dev \
-             libedataserver libedataserver-dev \
-             libedataserverui libedataserverui-dev"
-
-FILES_${PN} =+ "${datadir}/evolution-data-server-*/ui/"
-FILES_${PN}-dev =+ "${libdir}/pkgconfig/evolution-data-server-*.pc"
-FILES_${PN}-dbg =+ "${libdir}/evolution-data-server*/camel-providers/.debug \
-                    ${libdir}/evolution-data-server*/calendar-backends/.debug \
-                    ${libdir}/evolution-data-server*/addressbook-backends/.debug \
-                    ${libdir}/evolution-data-server*/extensions/.debug/"
-
-RRECOMMENDS_${PN}-dev += "libecal-dev libebook-dev"
-
-FILES_libcamel = "${libdir}/libcamel-*.so.* \
-                  ${libdir}/libcamel-provider-*.so.* \
-                  ${libdir}/evolution-data-server*/camel-providers/*.so \
-                  ${libdir}/evolution-data-server*/camel-providers/*.urls"
-FILES_libcamel-dev = "${libdir}/libcamel-*.so ${libdir}/libcamel-provider-*.so \
-                      ${libdir}/pkgconfig/camel*pc \
-                      ${libdir}/evolution-data-server*/camel-providers/*.la \
-                      ${includedir}/evolution-data-server*/camel"
-
-FILES_libebook = "${libdir}/libebook-*.so.*"
-FILES_libebook-dev = "${libdir}/libebook-1.2.so \
-                      ${libdir}/pkgconfig/libebook-*.pc \
-                      ${includedir}/evolution-data-server*/libebook/*.h"
-RRECOMMENDS_libebook = "libedata-book"
-
-FILES_libecal = "${libdir}/libecal-*.so.* \
-                 ${datadir}/evolution-data-server-1.4/zoneinfo"
-FILES_libecal-dev = "${libdir}/libecal-*.so ${libdir}/pkgconfig/libecal-*.pc \
-                     ${includedir}/evolution-data-server*/libecal/*.h \
-                     ${includedir}/evolution-data-server*/libical/*.h"
-RRECOMMENDS_libecal = "libedata-cal tzdata"
-
-FILES_libedata-book = "${libexecdir}/e-addressbook-factory \
-                       ${datadir}/dbus-1/services/*.AddressBook.service \
-                       ${libdir}/libedata-book-*.so.* \
-                       ${libdir}/evolution-data-server-*/extensions/libebook*.so \
-                       ${datadir}/evolution-data-server-1.4/weather/Locations.xml"
-FILES_libedata-book-dev = "${libdir}/libedata-book-*.so \
-                           ${libdir}/pkgconfig/libedata-book-*.pc \
-                           ${libdir}/evolution-data-server-*/extensions/libebook*.la \
-                           ${includedir}/evolution-data-server-*/libedata-book"
-
-FILES_libedata-cal = "${libexecdir}/e-calendar-factory \
-                      ${datadir}/dbus-1/services/*.Calendar.service \
-                      ${libdir}/libedata-cal-*.so.* \
-                      ${libdir}/evolution-data-server-*/extensions/libecal*.so"
-FILES_libedata-cal-dev = "${libdir}/libedata-cal-*.so \
-                          ${libdir}/pkgconfig/libedata-cal-*.pc \
-                          ${includedir}/evolution-data-server-*/libedata-cal \
-                          ${libdir}/evolution-data-server-*/extensions/libecal*.la"
-
-FILES_libedataserver = "${libdir}/libedataserver-*.so.*"
-FILES_libedataserver-dev = "${libdir}/libedataserver-*.so \
-                            ${libdir}/pkgconfig/libedataserver-*.pc \
-                            ${includedir}/evolution-data-server-*/libedataserver/*.h"
-
-FILES_libedataserverui = "${libdir}/libedataserverui-*.so.* ${datadir}/evolution-data-server-1.4/glade/*.glade"
-FILES_libedataserverui-dev = "${libdir}/libedataserverui-*.so \
-                              ${libdir}/pkgconfig/libedataserverui-*.pc \
-                              ${includedir}/evolution-data-server-*/libedataserverui/*.h"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb
index 78a9495..c7ecf2b 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb
@@ -7,6 +7,8 @@
 
 inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check systemd
 
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
            file://0001-help-remove-YELP-macro.patch \
            file://0001-Add-format-attribute-to-_synctex_malloc.patch \
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/%gconf-tree.xml b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/%gconf-tree.xml
deleted file mode 100644
index f8c2e9c..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/%gconf-tree.xml
+++ /dev/null
@@ -1,492 +0,0 @@
-<?xml version="1.0"?>
-<gconf>
-        <dir name="desktop">
-                <dir name="gnome">
-                        <dir name="url-handlers">
-                                <dir name="ymsgr">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="xmpp">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="webcal">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="uvox">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="trash">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="sip">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="rtsp">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="rtp">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="pnm">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="note">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="net">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="msnim">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="mmsh">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="mms">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="man">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="mailto">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="lastfm">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="itpc">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="itms">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="irc">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="info">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="icyx">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="icy">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="icq">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="https">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="http">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="h323">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="ghelp">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="gg">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="ftp">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="file">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="feed">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="cdda">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="callto">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="aim">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                                <dir name="about">
-                                        <entry name="command" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                        </dir>
-                        <dir name="lockdown">
-                                <entry name="disable_url_handlers" mtime="1227173197" type="bool" value="true">
-                                </entry>
-                                <entry name="disable_save_to_disk" mtime="1227173197" type="bool" value="true">
-                                </entry>
-                                <entry name="disable_print_setup" mtime="1227173197" type="bool" value="true">
-                                </entry>
-                                <entry name="disable_printing" mtime="1227173197" type="bool" value="true">
-                                </entry>
-                                <entry name="disable_lock_screen" mtime="1227173197" type="bool" value="true">
-                                </entry>
-                                <entry name="disable_command_line" mtime="1227173197" type="bool" value="true">
-                                </entry>
-                        </dir>
-                        <dir name="applications">
-                                <dir name="terminal">
-                                        <entry name="exec" mtime="1227173197" type="string">
-                                                <stringvalue>/bin/true</stringvalue>
-                                        </entry>
-                                </dir>
-                        </dir>
-                        <dir name="accessibility">
-                                <dir name="keyboard">
-                                        <entry name="enable" mtime="1227173197" type="bool" value="true">
-                                        </entry>
-                                </dir>
-                        </dir>
-                </dir>
-        </dir>
-        <dir name="apps">
-                <dir name="gnome_settings_daemon">
-                        <dir name="keybindings">
-                                <entry name="www" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="stop" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="sleep" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="search" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="screensaver" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="previous" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="power" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="play" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="pause" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="next" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="media" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="home" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="help" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="email" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="calculator" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                                <entry name="eject" mtime="1227173197" type="string">
-                                        <stringvalue></stringvalue>
-                                </entry>
-                        </dir>
-                </dir>
-                <dir name="metacity">
-                        <dir name="keybinding_commands">
-                                <entry name="command_window_screenshot" mtime="1227173197" type="string">
-                                        <stringvalue>/bin/true</stringvalue>
-                                </entry>
-                                <entry name="command_screenshot" mtime="1227173197" type="string">
-                                        <stringvalue>gdm-screenshot</stringvalue>
-                                </entry>
-                        </dir>
-                        <dir name="global_keybindings">
-                                <entry name="switch_to_workspace_up" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="switch_to_workspace_right" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="switch_to_workspace_left" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="switch_to_workspace_down" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="switch_group" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="show_desktop" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="run_command_window_screenshot" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="run_command_screenshot" mtime="1227173197" type="string">
-                                        <stringvalue>Print</stringvalue>
-                                </entry>
-                                <entry name="panel_run_dialog" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                                <entry name="panel_main_menu" mtime="1227173197" type="string">
-                                        <stringvalue>disabled</stringvalue>
-                                </entry>
-                        </dir>
-                        <dir name="general">
-                                <entry name="num_workspaces" mtime="1227173197" type="int" value="1">
-                                </entry>
-                        </dir>
-                </dir>
-                <dir name="compiz">
-                        <dir name="general">
-                                <dir name="allscreens">
-                                        <dir name="options">
-                                                <entry name="run_command11_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command11_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command10_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command10_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command8_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command8_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command7_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command7_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command6_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command6_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command5_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command5_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command4_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command4_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command3_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command3_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command2_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command2_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command1_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command1_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command0_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_command0_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="run_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="main_menu_key" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="main_menu_button" mtime="1227173197" type="string">
-                                                        <stringvalue>Disabled</stringvalue>
-                                                </entry>
-                                                <entry name="command_window_screenshot" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command11" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command10" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command9" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command8" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command7" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command6" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command5" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command4" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command3" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command2" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command1" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command0" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command_terminal" mtime="1227173197" type="string">
-                                                        <stringvalue></stringvalue>
-                                                </entry>
-                                                <entry name="command_screenshot" mtime="1227173197" type="string">
-                                                        <stringvalue>gdm-screenshot</stringvalue>
-                                                </entry>
-                                                <entry name="active_plugins" mtime="1227173197" type="list" ltype="string">
-                                                        <li type="string">
-                                                                <stringvalue>cube</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>decoration</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>gconf</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>glib</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>move</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>place</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>resize</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>screenshot</stringvalue>
-                                                        </li>
-                                                        <li type="string">
-                                                                <stringvalue>wobbly</stringvalue>
-                                                        </li>
-                                                </entry>
-                                        </dir>
-                                </dir>
-                        </dir>
-                </dir>
-                <dir name="gnome-power-manager">
-                        <dir name="ui">
-                                <entry name="show_context_menu" mtime="1227173197" type="bool" value="false">
-                                </entry>
-                        </dir>
-                </dir>
-                <dir name="gnome-screensaver">
-                        <entry name="power_management_delay" mtime="1227173197" type="int" value="30">
-                        </entry>
-                </dir>
-                <dir name="nautilus">
-                        <dir name="preferences">
-                                <entry name="show_desktop" mtime="1227173197" type="bool" value="false">
-                                </entry>
-                        </dir>
-                </dir>
-        </dir>
-</gconf>
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/Default b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/Default
deleted file mode 100755
index a7a7fcf..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/Default
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-# Stolen from the debian kdm setup, aren't I sneaky
-# Plus a lot of fun stuff added
-#  -George
-
-PATH="/usr/bin:$PATH"
-OLD_IFS=$IFS
-
-gdmwhich () {
-  COMMAND="$1"
-  OUTPUT=
-  IFS=:
-  for dir in $PATH
-  do
-    if test -x "$dir/$COMMAND" ; then
-      if test "x$OUTPUT" = "x" ; then
-        OUTPUT="$dir/$COMMAND"
-      fi
-    fi
-  done
-  IFS=$OLD_IFS
-  echo "$OUTPUT"
-}
-
-sysresources=/etc/X11/Xresources
-
-# merge in defaults
-if [ -f "$sysresources" ]; then
-    xrdb -merge "$sysresources"
-fi
-
-sysmodmap=/etc/X11/Xmodmap
-
-XMODMAP=`gdmwhich xmodmap`
-if [ "x$XMODMAP" != "x" ] ; then
-  if [ "x$GDM_PARENT_DISPLAY" = "x" ]; then
-    if [ -f $sysmodmap ]; then
-      $XMODMAP $sysmodmap
-    fi
-  else
-    ( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY $XMODMAP -pke ) | $XMODMAP -
-  fi
-
-  #
-  # Switch Sun's Alt and Meta mod mappings
-  #
-
-  UNAME=`gdmwhich uname`
-  PROCESSOR=`$UNAME -p`
-  if [ "x$PROCESSOR" = "xsparc" ]; then
-    if $XMODMAP | /usr/bin/grep mod4 | /usr/bin/grep Alt > /dev/null 2>/dev/null
-    then
-      $XMODMAP -e "clear Mod1" \
-               -e "clear Mod4" \
-               -e "add Mod1 = Alt_L" \
-               -e "add Mod1 = Alt_R" \
-               -e "add Mod4 = Meta_L" \
-               -e "add Mod4 = Meta_R"
-    fi
-  fi
-fi
-
-SETXKBMAP=`gdmwhich setxkbmap`
-if [ "x$SETXKBMAP" != "x" ] ; then
-  # FIXME: is this all right?  Is this completely on crack?
-  # What this does is move the xkb configuration from the GDM_PARENT_DISPLAY
-  # FIXME: This should be done in code.  Or there must be an easier way ...
-  if [ -n "$GDM_PARENT_DISPLAY" ]; then
-    XKBSETUP=`( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY $SETXKBMAP -v )`
-    if [ -n "$XKBSETUP" ]; then
-      XKBKEYMAP=`echo "$XKBSETUP" | grep '^keymap' | awk '{ print $2 }'`
-      XKBTYPES=`echo "$XKBSETUP" | grep '^types' | awk '{ print $2 }'`
-      XKBCOMPAT=`echo "$XKBSETUP" | grep '^compat' | awk '{ print $2 }'`
-      XKBSYMBOLS=`echo "$XKBSETUP" | grep '^symbols' | awk '{ print $2 }'`
-      XKBGEOMETRY=`echo "$XKBSETUP" | grep '^geometry' | awk '{ print $2 }'`
-      if [ -n "$XKBKEYMAP" ]; then
-        $SETXKBMAP -keymap "$XKBKEYMAP"
-      elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then
-        $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY"
-      elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then
-        $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS"
-      elif [ -n "$XKBSYMBOLS" ]; then
-        $SETXKBMAP -symbols "$XKBSYMBOLS"
-      fi
-    fi
-  fi
-fi
-
-# FIXME: the housekeeping below really should be moved to the postinst of packages that require it
-# brute force approach for now
-update-desktop-database
-glib-compile-schemas /usr/share/glib-2.0/schemas/
-
-#x11vnc  -q -bg -display :0 -forever -avahi -xkb
-
-exit 0
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/cross-xdetection.diff b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/cross-xdetection.diff
deleted file mode 100644
index bee3511..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/cross-xdetection.diff
+++ /dev/null
@@ -1,96 +0,0 @@
-From 60084e7e973634971c9643f2459e5d3e248ee3f1 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 9 Jun 2011 18:12:45 +0200
-Subject: [PATCH] build-sys: hardcode x paths to fix crosscompiling
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- configure.ac |   72 ++++-----------------------------------------------------
- 1 files changed, 5 insertions(+), 67 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index eeaf3dc..841efe0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1101,73 +1101,11 @@ dnl ---------------------------------------------------------------------------
- dnl - Check for X Server location
- dnl ---------------------------------------------------------------------------
- 
--# First check with "! -h" for /usr/X11R6 and /usr/X11 since they often
--# symlink to each other, and configure should use the more stable
--# location (the real directory) if possible.
--#
--# On Solaris, the /usr/bin/Xserver script is used to decide whether to
--# use Xsun or Xorg, so this is used on Solaris.
--#
--# When testing for /usr/X11R6, first check with "! -h" for /usr/X11R6
--# and /usr/X11 since they often symlink to each other, and configure
--# should use the more stable location (the real directory) if possible.
--#
--if test -x /usr/X11/bin/Xserver; then
--   X_PATH="/usr/X11/bin"
--   X_SERVER_PATH="/usr/X11/bin"
--   X_SERVER="/usr/X11/bin/Xserver"
--   X_CONFIG_OPTIONS="-audit 0"
--elif test ! -h /usr/X11R6 -a -x /usr/X11R6/bin/X; then
--   X_PATH="/usr/X11R6/bin"
--   X_SERVER_PATH="/usr/X11R6/bin"
--   X_SERVER="/usr/X11R6/bin/X"
--   X_CONFIG_OPTIONS="-audit 0"
--elif test ! -h /usr/X11 -a -x /usr/X11/bin/X; then
--   X_PATH="/usr/X11/bin"
--   X_SERVER_PATH="/usr/X11/bin"
--   X_SERVER="/usr/X11/bin/X"
--   X_CONFIG_OPTIONS="-audit 0"
--elif test -x /usr/X11R6/bin/X; then
--   X_PATH="/usr/X11R6/bin"
--   X_SERVER_PATH="/usr/X11R6/bin"
--   X_SERVER="/usr/X11R6/bin/X"
--   X_CONFIG_OPTIONS="-audit 0"
--elif test -x /usr/bin/Xorg; then
--   X_PATH="/usr/bin"
--   X_SERVER_PATH="/usr/bin"
--   X_SERVER="/usr/bin/Xorg"
--   X_CONFIG_OPTIONS="-audit 0"
--elif test -x /usr/X11/bin/X; then
--   X_PATH="/usr/X11/bin"
--   X_SERVER_PATH="/usr/X11/bin"
--   X_SERVER="/usr/X11/bin/X"
--   X_CONFIG_OPTIONS="-audit 0"
--elif test -x /usr/openwin/bin/Xsun; then
--   # Do not add /usr/openwin/bin here because on Solaris you need
--   # /usr/openwin/bin in your PATH even if you are using the Xorg
--   # Xserver.  We add this to the path below.
--   X_PATH="/usr/openwin/bin"
--   X_SERVER_PATH="/usr/openwin/bin"
--   X_SERVER="/usr/openwin/bin/Xsun"
--   X_CONFIG_OPTIONS="-audit 0 -nobanner"
--elif test -x /opt/X11R6/bin/X; then
--   X_PATH="/opt/X11R6/bin"
--   X_SERVER_PATH="/opt/X11R6/bin"
--   X_SERVER="/opt/X11R6/bin/X"
--   X_CONFIG_OPTIONS="-audit 0"
--elif test -x /usr/bin/X; then
--   X_PATH="/usr/bin"
--   X_SERVER_PATH="/usr/bin"
--   X_SERVER="/usr/bin/X"
--   X_CONFIG_OPTIONS="-audit 0"
--else
--   # what to do, what to do, this is wrong, but this just sets the
--   # defaults, perhaps this user is cross compiling or some such
--   X_PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin"
--   X_SERVER_PATH="/usr/bin"
--   X_SERVER="/usr/bin/X"
--   X_CONFIG_OPTIONS="-audit 0"
--fi
-+# We hardcode the X paths since we know where it will be in the OE univers
-+X_PATH="/usr/bin"
-+X_SERVER_PATH="/usr/bin"
-+X_SERVER="/usr/bin/X"
-+X_CONFIG_OPTIONS="-audit 0"
- 
- dnl ---------------------------------------------------------------------------
- dnl - Check for Xnest / Xephyr support
--- 
-1.6.6.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm
deleted file mode 100755
index bb5b418..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm
+++ /dev/null
@@ -1,89 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          gdm
-# Should-Start:      console-screen acpid dbus hal network-manager
-# Required-Start:    $local_fs $remote_fs
-# Required-Stop:     $local_fs $remote_fs
-# Default-Start:     5
-# Default-Stop:      0 1 2 3 6
-# Short-Description: GNOME Display Manager
-# Description:       Debian init script for the GNOME Display Manager
-### END INIT INFO
-#
-# Author:       Ryan Murray <rmurray@debian.org>
-#
-set -e
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/gdm
-
-test -x $DAEMON || exit 0
-
-if [ -r /etc/default/locale ]; then
-  . /etc/default/locale
-  export LANG LANGUAGE
-fi
-
-# To start gdm even if it is not the default display manager, change
-# HEED_DEFAULT_DISPLAY_MANAGER to "false."
-HEED_DEFAULT_DISPLAY_MANAGER=true
-DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
-
-case "$1" in
-  start)
-	# make needed directories in volatile
-
-	if [ -e /var/log/gdm ] ; then 
-		rm -rf /var/log/gdm
-	fi
-
-	mkdir -m 01770 /var/log/gdm
-	chown gdm:gdm /var/log/gdm
-
-	if [ -e /tmp/.ICE-unix ] ; then 
-		rm -rf /tmp/.ICE-unix
-	fi
-
-	mkdir -m 01777 /tmp/.ICE-unix
-	chown root:root /tmp/.ICE-unix
-
-        CONFIGURED_DAEMON=$(basename "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null)")
-        if grep -wqs text /proc/cmdline; then
-            echo "Not starting GNOME Display Manager (gdm); found 'text' in kernel commandline."
-        elif [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ] && \
-           [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] && \
-           [ "$CONFIGURED_DAEMON" != gdm ] ; then
-                echo "Not starting GNOME Display Manager; it is not the default display manager"
-        else
-                echo "Starting GNOME Display Manager" "gdm"
-                start-stop-daemon --start -b --exec $DAEMON 
-        fi
-  ;;
-  stop)
-        echo "Stopping GNOME Display Manager" "gdm"
-        set +e
-        start-stop-daemon --stop --quiet --pidfile /var/run/gdm.pid \
-                --name gdm --retry 5
-        set -e
-  ;;
-  reload)
-        echo "Scheduling reload of GNOME Display Manager configuration" "gdm"
-        set +e
-        start-stop-daemon --stop --signal USR1 --quiet --pidfile \
-                /var/run/gdm.pid --name gdm
-        set -e
-  ;;
-  status)
-        status_of_proc -p "$PIDFILE" "$DAEMON" gdm && exit 0 || exit $?
-  ;;
-  restart|force-reload)
-        $0 stop
-        $0 start
-  ;;
-  *)
-        echo "Usage: /etc/init.d/gdm {start|stop|restart|reload|force-reload|status}"
-        exit 1
-  ;;
-esac
-
-exit 0
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm-pam b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm-pam
deleted file mode 100644
index f9fafed..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm-pam
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# default; standard UN*X access
-#
-auth     required       pam_unix.so
-account  required       pam_unix.so
-password required       pam_unix.so
-session  required       pam_unix.so
-
-auth     optional       pam_gnome_keyring.so
-session  optional       pam_gnome_keyring.so  auto_start
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm.conf b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm.conf
deleted file mode 100644
index 559823b..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm.conf
+++ /dev/null
@@ -1,80 +0,0 @@
-# GDM Custom Configuration file.
-#
-# This file is the appropriate place for specifying your customizations to the
-# GDM configuration.   If you run gdmsetup, it will automatically edit this
-# file for you and will cause the daemon and any running GDM GUI programs to
-# automatically update with the new configuration.  Not all configuration
-# options are supported by gdmsetup, so to modify some values it may be
-# necessary to modify this file directly by hand.
-#
-# This file overrides the default configuration settings.  These settings 
-# are stored in the GDM System Defaults configuration file, which is found
-# at the following location.
-#
-# /usr/share/gdm/defaults.conf.  
-#
-# This file contains comments about the meaning of each configuration option,
-# so is also a useful reference.  Also refer to the documentation links at
-# the end of this comment for further information.  In short, to hand-edit
-# this file, simply add or modify the key=value combination in the
-# appropriate section in the template below this comment section.
-#
-# For example, if you want to specify a different value for the Enable key
-# in the "[debug]" section of your GDM System Defaults configuration file,
-# then add "Enable=true" in the "[debug]" section of this file.  If the
-# key already exists in this file, then simply modify it.
-#
-# Older versions of GDM used the "gdm.conf" file for configuration.  If your
-# system has an old gdm.conf file on the system, it will be used instead of
-# this file - so changes made to this file will not take effect.  Consider
-# migrating your configuration to this file and removing the gdm.conf file.
-#
-# If you hand edit a GDM configuration file, you can run the following
-# command and the GDM daemon will immediately reflect the change.  Any
-# running GDM GUI programs will also be notified to update with the new
-# configuration.
-#
-# gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
-#
-# e.g, the "Enable" key in the "[debug]" section would be "debug/Enable".
-#
-# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
-# re-read the new configuration settings.  You can also restart GDM by sending
-# a HUP or USR1 signal to the daemon.  HUP behaves like gdm-restart and causes
-# any user session started by GDM to exit immediately while USR1 behaves like
-# gdm-safe-restart and will wait until all users log out before restarting GDM.
-#
-# For full reference documentation see the gnome help browser under
-# GNOME|System category.  You can also find the docs in HTML form on
-# http://www.gnome.org/projects/gdm/
-#
-# NOTE: Lines that begin with "#" are considered comments.
-#
-# Have fun!
-
-[daemon]
-
-[security]
-
-[xdmcp]
-
-[gui]
-
-[greeter]
-
-[chooser]
-
-[debug]
-
-# Note that to disable servers defined in the GDM System Defaults
-# configuration file (such as 0=Standard, you must put a line in this file
-# that says 0=inactive, as described in the Configuration section of the GDM
-# documentation.
-#
-[servers]
-
-# Also note, that if you redefine a [server-foo] section, then GDM will
-# use the definition in this file, not the GDM System Defaults configuration
-# file.  It is currently not possible to disable a [server-foo] section
-# defined in the GDM System Defaults configuration file.
-#
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm.service.in b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm.service.in
deleted file mode 100644
index 3e1556a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gdm/gdm/gdm.service.in
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Gnome Display Manager
-After=systemd-user-sessions.service
-
-[Service]
-ExecStart=%sbindir%/gdm -nodaemon
-StandardOutput=syslog
-
-[Install]
-Alias=display-manager.service
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb
index 5d244de..ba425ad 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb
@@ -7,7 +7,10 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-inherit gnome gettext pythonnative
+inherit distro_features_check gnome gettext pythonnative
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
            file://0001-workaround-void-pointer-arithmetic.patch \
            file://0001-Remove-help-directory-from-build.patch \
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/egg-asn1x.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/egg-asn1x.patch
deleted file mode 100644
index ad8a40c..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/egg-asn1x.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Fixed build error with gcc 4.8
-
-Errors like below
-
-egg-asn1x.c: In function 'anode_encode_build':
-egg-asn1x.c:1280:7: warning: variable 'type' set but not used [-Wunused-but-set-variable]
-egg-asn1x.c: In function 'traverse_and_prepare':
-egg-asn1x.c:3354:3: warning: passing argument 1 of 'egg_asn1x_create' from incompatible pointer type [enabled by default]
-In file included from egg-asn1x.c:50:0:
-egg-asn1x.h:38:8: note: expected 'const struct static_struct_asn *' but argument is of type 'const struct asn1_static_node *'
-egg-asn1x.c: At top level:
-egg-asn1x.c:3509:1: error: conflicting types for 'egg_asn1x_create'
-In file included from egg-asn1x.c:50:0:
-egg-asn1x.h:38:8: note: previous declaration of 'egg_asn1x_create' was here
-egg-asn1x.c:3572:1: error: conflicting types for 'egg_asn1x_create_quark'
-In file included from egg-asn1x.c:50:0:
-egg-asn1x.h:41:8: note: previous declaration of 'egg_asn1x_create_quark' was here
-egg-asn1x.c:3579:1: error: conflicting types for 'egg_asn1x_create_and_decode'
-In file included from egg-asn1x.c:50:0:
-egg-asn1x.h:44:8: note: previous declaration of 'egg_asn1x_create_and_decode' was here
-make[4]: *** [libegg_la-egg-asn1x.lo] Error 1
-
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: gnome-keyring-2.32.1/egg/egg-asn1x.h
-===================================================================
---- gnome-keyring-2.32.1.orig/egg/egg-asn1x.h	2010-10-18 19:11:38.000000000 -0700
-+++ gnome-keyring-2.32.1/egg/egg-asn1x.h	2013-06-11 15:15:00.675399263 -0700
-@@ -25,6 +25,7 @@
- #define EGG_ASN1X_H_
- 
- #include <glib.h>
-+#include <libtasn1.h>
- 
- #ifndef HAVE_EGG_ALLOCATOR
- typedef void* (*EggAllocator) (void* p, gsize);
-@@ -35,13 +36,13 @@
- 
- struct static_struct_asn;
- 
--GNode*              egg_asn1x_create                 (const struct static_struct_asn *defs,
-+GNode*              egg_asn1x_create                 (const ASN1_ARRAY_TYPE *defs,
-                                                       const gchar *type);
- 
--GNode*              egg_asn1x_create_quark           (const struct static_struct_asn *defs,
-+GNode*              egg_asn1x_create_quark           (const ASN1_ARRAY_TYPE *defs,
-                                                       GQuark type);
- 
--GNode*              egg_asn1x_create_and_decode      (const struct static_struct_asn *defs,
-+GNode*              egg_asn1x_create_and_decode      (const ASN1_ARRAY_TYPE *defs,
-                                                       const gchar *type,
-                                                       gconstpointer data,
-                                                       gsize n_data);
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb
deleted file mode 100644
index fd6ca73..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "Password and keyring managing daemon"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://gcr/gcr.h;endline=22;md5=a272df1e633e27ecf35e74fb5576250e \
-                    file://egg/egg-dbus.h;endline=25;md5=eb6f531af37165dc53420c073d774e61 \
-                    file://gp11/gp11.h;endline=24;md5=bd8c7a8a21d6c28d40536d96a35e3469 \
-                    file://pkcs11/pkcs11i.h;endline=24;md5=e72cfbb718389b76a4dae838d1c1f439"
-
-SECTION = "x11/gnome"
-
-PR = "r12"
-
-inherit autotools gnome gtk-doc pkgconfig gsettings
-
-SRC_URI += "file://egg-asn1x.patch \
-            file://musl.patch \
-"
-
-DEPENDS = "gtk+ libgcrypt libtasn1 libtasn1-native gconf ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} intltool-native"
-RDEPENDS_${PN} = "libgnome-keyring glib-2.0-utils"
-
-LDFLAGS += "-lgmodule-2.0"
-
-EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam --with-pam-dir=${base_libdir}/security', '--disable-pam', d)}"
-
-SRC_URI[archive.md5sum] = "9a8aa74e03361676f29d6e73155786fc"
-SRC_URI[archive.sha256sum] = "31fecec1430a97f59a6159a5a2ea8d6a1b44287f1e9e595b3594df46bf7f18f9"
-GNOME_COMPRESS_TYPE="bz2"
-
-FILES_${PN} += "${datadir}/dbus-1/services ${datadir}/gcr \
-                ${base_libdir}/security/*${SOLIBSDEV} \
-               "
-
-FILES_${PN}-dev += "${libdir}/${BPN}/devel/*.la \
-                    ${libdir}/${BPN}/devel/*${SOLIBSDEV} \
-                    ${libdir}/${BPN}/standalone/*.la \
-                    ${base_libdir}/security/*.la \
-                   "
-
-INSANE_SKIP_${PN}-dev += "dev-elf"
-
-FILES_${PN}-dbg += "${libdir}/${BPN}/standalone/.debug/ \
-                    ${libdir}/${BPN}/devel/.debug/ \
-                    ${base_libdir}/security/.debug/"
-
-# Make compatible with gcr version 3 or newer by removing
-# org.gnome.crypto.pgp.*, which is the provider for this optional
-# functionality.
-
-do_install_append() {
-	rm ${D}${datadir}/GConf/gsettings/org.gnome.crypto.pgp.convert
-	rm ${D}${datadir}/glib-2.0/schemas/org.gnome.crypto.pgp.gschema.xml
-}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.20.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.20.0.bb
new file mode 100644
index 0000000..5564062
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.20.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Password and keyring managing daemon"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome"
+
+LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+"
+
+inherit distro_features_check gnomebase remove-libtool
+
+DEPENDS = " \
+    intltool-native \
+    glib-2.0-native \
+    gtk+3 \
+    gcr \
+    libgcrypt \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \
+"
+
+SRC_URI[archive.md5sum] = "e09efe8021944dae404736b5a2adb98e"
+SRC_URI[archive.sha256sum] = "bc17cecd748a0e46e302171d11c3ae3d76bba5258c441fabec3786f418e7ec99"
+SRC_URI += "file://musl.patch"
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+RDEPENDS_${PN} = "libgnome-keyring glib-2.0-utils"
+
+EXTRA_OECONF = " \
+    --disable-doc \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam --with-pam-dir=${base_libdir}/security', '--disable-pam', d)} \
+"
+
+
+FILES_${PN} += " \
+    ${datadir}/dbus-1/services \
+    ${datadir}/p11-kit \
+    ${base_libdir}/security/*${SOLIBSDEV} \
+    ${libdir}/pkcs11/gnome-keyring-pkcs11.so \
+"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/libgnome-keyring_2.32.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/libgnome-keyring_2.32.0.bb
deleted file mode 100644
index e241882..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/libgnome-keyring_2.32.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Compatibility library for accessing secrets"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0914b9d3ebaba41ef2e3e0ae16f296cf \
-                    file://library/gnome-keyring.h;endline=25;md5=68ea64f81c160d670c37da5f137be4fb \
-                    file://library/gnome-keyring.c;endline=26;md5=8d7a4fb674aaa012ea5a98e7c368b4a5 \
-                    file://egg/egg-dh.h;endline=22;md5=1626c16af2a8da1f88324cf3ced33f08"
-
-SECTION = "x11/gnome/libs"
-PR = "r3"
-
-inherit gnomebase gtk-doc
-
-DEPENDS = "dbus libgcrypt glib-2.0 intltool-native"
-
-SRC_URI[archive.md5sum] = "c42b2ca66204835d901d3dbfc1fa5ae6"
-SRC_URI[archive.sha256sum] = "56388c0d81ddfdb57d30e4963c83ecc1c18498aab99395420e0fff69929a0f0c"
-GNOME_COMPRESS_TYPE="bz2"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/libgnome-keyring_3.12.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/libgnome-keyring_3.12.0.bb
new file mode 100644
index 0000000..82abe33
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-keyring/libgnome-keyring_3.12.0.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Compatibility library for accessing secrets"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=0914b9d3ebaba41ef2e3e0ae16f296cf \
+    file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+"
+SECTION = "x11/gnome/libs"
+
+inherit gnomebase gtk-doc gobject-introspection
+
+DEPENDS = "dbus libgcrypt glib-2.0 glib-2.0-native intltool-native"
+
+SRC_URI[archive.md5sum] = "6696e4f2e9aed4625cdc3af30bd8c238"
+SRC_URI[archive.sha256sum] = "c4c178fbb05f72acc484d22ddb0568f7532c409b0a13e06513ff54b91e947783"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus3_3.10.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus3_3.10.1.bb
index 01da347..647ae91 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus3_3.10.1.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus3_3.10.1.bb
@@ -6,7 +6,9 @@
 
 DEPENDS = "python libxml2 gconf popt gtk+3 intltool-native gnome-common-native"
 
-inherit gnomebase pkgconfig python-dir pythonnative gobject-introspection
+inherit distro_features_check gnomebase pkgconfig python-dir pythonnative gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 BPN = "gnome-menus"
 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-mime-data/gnome-mime-data/pkgconfig.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-mime-data/gnome-mime-data/pkgconfig.patch
deleted file mode 100644
index 0903425..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-mime-data/gnome-mime-data/pkgconfig.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gnome-mime-data-2.18.0/Makefile.am
-===================================================================
---- gnome-mime-data-2.18.0.orig/Makefile.am	2009-06-11 17:27:48.000000000 +0100
-+++ gnome-mime-data-2.18.0/Makefile.am	2009-06-11 17:27:59.000000000 +0100
-@@ -1,6 +1,6 @@
- SUBDIRS = man po
- 
--pkgconfigdir = $(datadir)/pkgconfig
-+pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = gnome-mime-data-2.0.pc
- 
- NULL=
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-mime-data/gnome-mime-data_2.18.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-mime-data/gnome-mime-data_2.18.0.bb
deleted file mode 100644
index eeac1bb..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-mime-data/gnome-mime-data_2.18.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Base MIME and Application database for GNOME"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://check-mime.pl;endline=26;md5=a95b63c92c33d4ca1af61a315888f450"
-
-inherit gnomebase mime
-PR = "r4"
-
-SRC_URI += "file://pkgconfig.patch"
-
-SRC_URI[archive.md5sum] = "541858188f80090d12a33b5a7c34d42c"
-SRC_URI[archive.sha256sum] = "37196b5b37085bbcd45c338c36e26898fe35dd5975295f69f48028b1e8436fd7"
-GNOME_COMPRESS_TYPE="bz2"
-
-DEPENDS += "shared-mime-info intltool-native glib-2.0-native"
-RDEPENDS_${PN} = "shared-mime-info"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0001-help-remove-YELP-macro.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0001-help-remove-YELP-macro.patch
new file mode 100644
index 0000000..57b60a0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/files/0001-help-remove-YELP-macro.patch
@@ -0,0 +1,28 @@
+From 4a3ee8b46d25b3d310448bfa4446e15a686fc685 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Fri, 23 Mar 2018 13:50:18 +0100
+Subject: [PATCH] help: remove YELP macro
+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@gmail.com>
+---
+ help/Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/help/Makefile.am b/help/Makefile.am
+index c5cd0d3..4b83adf 100644
+--- a/help/Makefile.am
++++ b/help/Makefile.am
+@@ -1,5 +1,3 @@
+-@YELP_HELP_RULES@
+-
+ HELP_ID = gnome-system-monitor
+ 
+ HELP_FILES = \
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/gnome-system-monitor_3.26.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/gnome-system-monitor_3.26.0.bb
new file mode 100644
index 0000000..9b6ce17
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-system-monitor/gnome-system-monitor_3.26.0.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Gnome system monitor"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = " \
+    intltool-native \
+    gnome-common-native \
+    glib-2.0-native \
+    gtkmm3 \
+    libgtop \
+    librsvg \
+    libwnck3 \
+"
+
+inherit gnomebase distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.md5sum] = "fcd59867c07f8c4853b1e28d60cbc037"
+SRC_URI[archive.sha256sum] = "f848a8c2ca5e164cf09d3a205dd49e4e4bf4b60d43b0969c10443eb519d0e6b3"
+SRC_URI += "file://0001-help-remove-YELP-macro.patch"
+
+RRECOMMENDS_${PN} = "adwaita-icon-theme"
+
+FILES_${PN} += " \
+    ${datadir}/icons \
+    ${datadir}/dbus-1 \
+    ${datadir}/gnome/autostart \
+"
+
+FILES_${PN}-doc += " \
+    ${datadir}/omf \
+    ${datadir}/gnome/help \
+"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/0001-multiple-Makefile.am-remove-DG_DISABLE_DEPRECATED-to.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/0001-multiple-Makefile.am-remove-DG_DISABLE_DEPRECATED-to.patch
deleted file mode 100644
index 3833299..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/0001-multiple-Makefile.am-remove-DG_DISABLE_DEPRECATED-to.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 536e9b57cada4a9f92e073fdf01cdf1def435b6b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 7 May 2013 14:56:06 +0200
-Subject: [PATCH] multiple Makefile.am: remove -DG_DISABLE_DEPRECATED to fix
- build with glib-2.36
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- daemon/Makefile.am      |    1 -
- libgnomevfs/Makefile.am |    1 -
- 2 files changed, 0 insertions(+), 2 deletions(-)
-
-Index: gnome-vfs-2.24.4/daemon/Makefile.am
-===================================================================
---- gnome-vfs-2.24.4.orig/daemon/Makefile.am	2013-10-17 16:39:39.081024798 -0700
-+++ gnome-vfs-2.24.4/daemon/Makefile.am	2013-10-17 16:39:39.213024794 -0700
-@@ -8,7 +8,6 @@
- 	-D_LARGEFILE64_SOURCE                   \
- 	-D_POSIX_PTHREAD_SEMANTICS		\
- 	-D_REENTRANT				\
--	-DG_DISABLE_DEPRECATED			\
- 	-DGNOME_VFS_PREFIX=\"$(prefix)\"	\
- 	-DGNOME_VFS_DATADIR=\"$(datadir)\"	\
- 	-DGNOME_VFS_LIBDIR=\"$(libdir)\"	\
-Index: gnome-vfs-2.24.4/libgnomevfs/Makefile.am
-===================================================================
---- gnome-vfs-2.24.4.orig/libgnomevfs/Makefile.am	2013-10-17 16:39:39.081024798 -0700
-+++ gnome-vfs-2.24.4/libgnomevfs/Makefile.am	2013-10-17 16:39:39.213024794 -0700
-@@ -19,7 +19,6 @@
- 	-D_LARGEFILE64_SOURCE                   \
- 	-D_POSIX_PTHREAD_SEMANTICS		\
- 	-D_REENTRANT				\
--	-DG_DISABLE_DEPRECATED			\
- 	-DGNOME_VFS_PREFIX=\"$(prefix)\"	\
- 	-DGNOME_VFS_BINDIR=\"$(bindir)\"	\
- 	-DGNOME_VFS_DATADIR=\"$(datadir)\"	\
-Index: gnome-vfs-2.24.4/modules/Makefile.am
-===================================================================
---- gnome-vfs-2.24.4.orig/modules/Makefile.am	2013-10-17 16:39:39.081024798 -0700
-+++ gnome-vfs-2.24.4/modules/Makefile.am	2013-10-17 16:39:39.213024794 -0700
-@@ -18,7 +18,6 @@
- 	-D_POSIX_PTHREAD_SEMANTICS		\
- 	-D_REENTRANT				\
- 	-DSSH_PROGRAM=\"$(SSH_PROGRAM)\"	\
--	-DG_DISABLE_DEPRECATED			\
- 	-DGNOME_VFS_PREFIX=\"$(prefix)\"	\
- 	-DGNOME_VFS_DATADIR=\"$(datadir)\"	\
- 	-DGNOME_VFS_LIBDIR=\"$(libdir)\"	\
-Index: gnome-vfs-2.24.4/programs/Makefile.am
-===================================================================
---- gnome-vfs-2.24.4.orig/programs/Makefile.am	2013-10-17 16:39:39.081024798 -0700
-+++ gnome-vfs-2.24.4/programs/Makefile.am	2013-10-17 16:39:39.213024794 -0700
-@@ -4,8 +4,7 @@
- 	-I$(top_srcdir)				\
- 	-I$(top_builddir)			\
- 	$(TEST_CFLAGS)				\
--	$(VFS_CFLAGS)				\
--	-DG_DISABLE_DEPRECATED
-+	$(VFS_CFLAGS)
- 
- libraries =						\
- 	$(top_builddir)/libgnomevfs/libgnomevfs-2.la	\
-Index: gnome-vfs-2.24.4/test/Makefile.am
-===================================================================
---- gnome-vfs-2.24.4.orig/test/Makefile.am	2010-02-09 04:16:14.000000000 -0800
-+++ gnome-vfs-2.24.4/test/Makefile.am	2013-10-17 16:42:49.109019172 -0700
-@@ -6,7 +6,6 @@
- 	-I$(top_builddir)/libgnomevfs           \
- 	$(TEST_CFLAGS)				\
- 	$(VFS_CFLAGS)				\
--	-DG_DISABLE_DEPRECATED			\
- 	-DMODULES_PATH=\"$(libdir)/vfs/modules\"
- 
- if OS_WIN32
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/do-not-use-srcdir-variable.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/do-not-use-srcdir-variable.patch
deleted file mode 100644
index 30ca29b..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/do-not-use-srcdir-variable.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fixes errors with new autotools
-
-| automake: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/auto-test'
-| autoreconf: automake failed with exit status: 1
-| ERROR: autoreconf execution failed.
-
-Upstream-Status: Not Submitted
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gnome-vfs-2.24.4/test/Makefile.am
-===================================================================
---- gnome-vfs-2.24.4.orig/test/Makefile.am	2013-10-17 16:43:36.677017764 -0700
-+++ gnome-vfs-2.24.4/test/Makefile.am	2013-10-17 16:48:47.369008566 -0700
-@@ -64,7 +64,7 @@
- 	test-async-cancel \
- 	test-escape       \
- 	test-uri       	  \
--	$(srcdir)/auto-test	
-+	auto-test
- 
- libraries =						\
- 	$(top_builddir)/libgnomevfs/libgnomevfs-2.la	\
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/gconftool-lossage.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/gconftool-lossage.patch
deleted file mode 100644
index 0f52136..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/gconftool-lossage.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
---- gnome-vfs-2.6.0/configure.in~	2004-03-22 12:36:23.000000000 +0000
-+++ gnome-vfs-2.6.0/configure.in	2004-06-07 16:04:34.000000000 +0100
-@@ -154,7 +154,7 @@
- AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
- 
- if test x"$GCONFTOOL" = xno; then
--  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
-+  AC_MSG_WARN([gconftool-2 executable not found in your path - should be installed with GConf])
- fi
- 
- AM_GCONF_SOURCE_2
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/gnome-vfs-no-kerberos.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/gnome-vfs-no-kerberos.patch
deleted file mode 100644
index dabec32..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs-2.24.4/gnome-vfs-no-kerberos.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-removes kerberos completely to avoid conflicts with installed kerberos
---- configure.in.orig	2007-01-05 19:42:26.418541610 +0200
-+++ configure.in	2007-01-05 19:42:56.604261797 +0200
-@@ -436,47 +436,6 @@
- ])
- AM_CONDITIONAL(HAVE_CDDA, test $have_cdda = yes)
- AC_SUBST(CDDA_LIBS)
--
--dnl GSSAPI
--dnl Check for Kerberos installation
--have_gssapi=no
--AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin)
--					   
--if test "x$KRB5_CONFIG" != "xnone"; then
--   GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`"
--   GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`"
--   
--   saved_CPPFLAGS="$CPPFLAGS"
--   saved_LIBS="$LIBS"
--   LIBS="$LIBS $GSSAPI_LIBS"
--   CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS"
--   # MIT and Heimdal put gssapi.h in different places
--   AC_CHECK_HEADERS(gssapi/gssapi.h gssapi.h, [
--       AC_CHECK_FUNCS(gss_init_sec_context, [
--           AC_MSG_NOTICE([GSSAPI authentication support enabled])
--           AC_DEFINE(HAVE_GSSAPI, 1, [Define if GSSAPI support is enabled])
--           AC_CHECK_HEADERS(gssapi/gssapi_generic.h)
--		 have_gssapi=yes
--	 
--       # MIT Kerberos lacks GSS_C_NT_HOSTBASED_SERVICE
--       AC_CHECK_DECL([GSS_C_NT_HOSTBASED_SERVICE],,
--          [AC_DEFINE([GSS_C_NT_HOSTBASED_SERVICE], gss_nt_service_name, 
--             [Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise])
--		], [
--		    #ifdef HAVE_GSSAPI_GSSAPI_H
--		    #include <gssapi/gssapi.h>
--		    #else	   
--		    #include <gssapi.h>
--		    #endif
--		])
--	  ])
--     break
--   ])
--   LIBS="$saved_LIBS" 
--   CPPFLAGS="$saved_CPPFLAGS" 
--fi   
--AC_SUBST(GSSAPI_LIBS)
--AC_SUBST(GSSAPI_CFLAGS)
- 	   
- dnl ******************************
- dnl http-method (neon checks)
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb
deleted file mode 100644
index 3ec6466..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "a userspace virtual filesystem"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://libgnomevfs/gnome-vfs.h;endline=25;md5=17071e69707a8f42887d88413f2623cb \
-                    file://programs/gnomevfs-ls.c;endline=23;md5=678a2e8bedaef5818ccabe633840196b \
-                    file://daemon/vfs-daemon.c;endline=21;md5=5f2c61553fb16abb07fc9498ca03fe1f \
-                    file://modules/cdda-cddb.h;endline=22;md5=20ed324ca64907c366ecd7f22b8e0c54"
-
-DEPENDS = "libxml2 gconf dbus bzip2 gnome-mime-data zlib intltool-native gnome-common-native"
-RRECOMMENDS_${PN} = "gnome-vfs-plugin-file shared-mime-info"
-# Some legacy packages will require gnome-mime-data to be installed, but use of
-# it is deprecated.
-PR = "r3"
-
-inherit gnome
-
-# This is to provide compatibility with the gnome-vfs DBus fork
-RPROVIDES_${PN} = "gnome-vfs-plugin-dbus"
-
-SRC_URI += " \
-    file://gconftool-lossage.patch \
-    file://gnome-vfs-no-kerberos.patch;striplevel=0 \
-    file://0001-multiple-Makefile.am-remove-DG_DISABLE_DEPRECATED-to.patch \
-    file://do-not-use-srcdir-variable.patch \
-"
-
-SRC_URI[archive.md5sum] = "a05fab03eeef10a47dd156b758982f2e"
-SRC_URI[archive.sha256sum] = "62de64b5b804eb04104ff98fcd6a8b7276d510a49fbd9c0feb568f8996444faa"
-GNOME_COMPRESS_TYPE="bz2"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)}"
-PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
-PACKAGECONFIG[fam] = "--enable-fam,--disable-fam,gamin"
-
-EXTRA_OECONF = " --disable-hal \
-                 --disable-openssl \
-                 --disable-samba \
-                 ac_cv_lib_acl_acl_get_file=no \
-                 ac_cv_lib_sec_acl=no \
-                 gvfs_cv_HAVE_SOLARIS_ACLS=no \
-                 gvfs_cv_HAVE_POSIX_ACLS=no \
-"
-
-FILES_${PN} += "${libdir}/vfs ${datadir}/dbus-1/services"
-FILES_${PN}-dbg += "${libdir}/gnome-vfs-2.0/modules/.debug"
-FILES_${PN}-dev += "${libdir}/gnome-vfs-2.0/include/* ${libdir}/gnome-vfs-2.0/modules/*.la"
-FILES_${PN}-staticdev += "${libdir}/gnome-vfs-2.0/modules/*.a"
-FILES_${PN}-doc += "${datadir}/gtk-doc"
-
-PACKAGES_DYNAMIC += "^gnome-vfs-plugin-.*"
-
-python populate_packages_prepend () {
-    plugindir = d.expand('${libdir}/gnome-vfs-2.0/modules/')
-    do_split_packages(d, plugindir, '^lib(.*)\.so$', 'gnome-vfs-plugin-%s', 'GNOME VFS plugin for %s')
-}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups/libgnomecups-0.2.3-cups-1.6.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups/libgnomecups-0.2.3-cups-1.6.patch
deleted file mode 100644
index dba60ca..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups/libgnomecups-0.2.3-cups-1.6.patch
+++ /dev/null
@@ -1,288 +0,0 @@
-Imported from gentoo:
-http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch
-
-From ae783efde4fa69578651994505462f02b8639220 Mon Sep 17 00:00:00 2001
-From: Alexandre Rostovtsev <tetromino@gentoo.org>
-Date: Tue, 7 Aug 2012 06:53:09 -0400
-Subject: [PATCH] Use CUPS-1.6 IPP API getter/setter functions
-
-CUPS 1.6 makes various structures private and introduces these ippGet
-and ippSet functions for all of the fields in these structures.
-http://www.cups.org/str.php?L3928
-
-We define our own accessors when building against CUPS < 1.6.
-
-Based on work by Jiri Popelka <jpopelka@redhat.com> at
-https://bugzilla.gnome.org/show_bug.cgi?id=679759
----
- libgnomecups/gnome-cups-printer.c |   48 +++++++++++++++++++++++++++++-------
- libgnomecups/gnome-cups-queue.c   |   43 +++++++++++++++++++++++++++------
- libgnomecups/gnome-cups-request.c |   44 ++++++++++++++++++++++++++++-----
- 3 files changed, 110 insertions(+), 25 deletions(-)
-
-diff --git a/libgnomecups/gnome-cups-printer.c b/libgnomecups/gnome-cups-printer.c
-index c924af0..f5e1ef7 100644
---- a/libgnomecups/gnome-cups-printer.c
-+++ b/libgnomecups/gnome-cups-printer.c
-@@ -37,6 +37,34 @@
- 
- #define UPDATE_TIMEOUT 5000
- 
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
-+#ifndef HAVE_CUPS_1_6
-+#define ippGetCount(attr)     attr->num_values
-+#define ippGetName(attr)      attr->name
-+#define ippGetInteger(attr, element) attr->values[element].integer
-+#define ippGetString(attr, element, language) attr->values[element].string.text
-+
-+static ipp_attribute_t *
-+ippFirstAttribute(ipp_t *ipp)
-+{
-+  if (!ipp)
-+    return (NULL);
-+  return (ipp->current = ipp->attrs);
-+}
-+
-+static ipp_attribute_t *
-+ippNextAttribute(ipp_t *ipp)
-+{
-+  if (!ipp || !ipp->current)
-+    return (NULL);
-+  return (ipp->current = ipp->current->next);
-+}
-+#endif
-+
-+
- struct _GnomeCupsPPDFile {
- 	char name[1];
- };
-@@ -173,9 +201,9 @@ map_reasons (GnomeCupsPrinter *printer,
- 	printer->details->state_reasons = NULL;
- 
- 	/* cf. RFC2911 4.4.12 */
--	for (i = 0; i < attr->num_values; i++) {
-+	for (i = 0; i < ippGetCount (attr); i++) {
- 		const char *p;
--		const char *keyword = attr->values [i].string.text;
-+		const char *keyword = ippGetString (attr, i, NULL);
- 
- 		reason = g_new (GnomeCupsPrinterReason, 1);
- 
-@@ -224,8 +252,8 @@ gnome_cups_printer_get_info (GnomeCupsPrinter *printer)
- 	return printer->details->info;
- }
- 
--#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if ((v) != attr->values[0].integer) { changed = TRUE; } (v) = attr->values[0].integer; }}
--#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if (!v || strcmp (v, attr->values[0].string.text)) { g_free (v); changed = TRUE; (v) = g_strdup (attr->values[0].string.text); }}}
-+#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if ((v) != ippGetInteger (attr, 0)) { changed = TRUE; } (v) = ippGetInteger (attr, 0); }}
-+#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if (!v || strcmp (v, ippGetString (attr, 0, NULL))) { g_free (v); changed = TRUE; (v) = g_strdup (ippGetString (attr, 0, NULL)); }}}
- 
- static void
- attributes_update_cb (guint id,
-@@ -243,14 +271,14 @@ attributes_update_cb (guint id,
- 	changed = FALSE;
- 
- 	if (!error && response) {
--		for (attr = response->attrs; attr != NULL; attr = attr->next) {
--			if (!attr->name) {
-+		for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) {
-+			if (!ippGetName (attr)) {
- 				continue;
- 			} 
--			if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !strcmp (attr->name, "attributes-charset")) {
-+			if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !strcmp (ippGetName (attr), "attributes-charset")) {
- 				continue;
- 			}
--			if (!g_ascii_strcasecmp (attr->name, "printer-state-reasons")) {
-+			if (!g_ascii_strcasecmp (ippGetName (attr), "printer-state-reasons")) {
- 				map_reasons (printer, attr);
- 			}
- 			MAP_INT (printer->details->state, "printer-state");
-@@ -570,7 +598,7 @@ get_default (void)
- 	
- 	attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME);
- 	if (attr) {
--		name = g_strdup (attr->values[0].string.text);
-+		name = g_strdup (ippGetString (attr, 0, NULL));
- 	} else {
- 		name = NULL;
- 	}
-@@ -698,7 +726,7 @@ get_printer_names (void)
- 	attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME);
- 	while (attr) {
- 		ret = g_list_prepend (ret, 
--				      g_strdup (attr->values[0].string.text));
-+				      g_strdup (ippGetString (attr, 0, NULL)));
- 		
- 		attr = ippFindNextAttribute (response, 
- 					     "printer-name", 
-diff --git a/libgnomecups/gnome-cups-queue.c b/libgnomecups/gnome-cups-queue.c
-index 9f98ed9..298db42 100644
---- a/libgnomecups/gnome-cups-queue.c
-+++ b/libgnomecups/gnome-cups-queue.c
-@@ -15,6 +15,33 @@
- 
- #define UPDATE_TIMEOUT 3000
- 
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
-+#ifndef HAVE_CUPS_1_6
-+#define ippGetName(attr)      attr->name
-+#define ippGetInteger(attr, element) attr->values[element].integer
-+#define ippGetString(attr, element, language) attr->values[element].string.text
-+
-+static ipp_attribute_t *
-+ippFirstAttribute(ipp_t *ipp)
-+{
-+  if (!ipp)
-+    return (NULL);
-+  return (ipp->current = ipp->attrs);
-+}
-+
-+static ipp_attribute_t *
-+ippNextAttribute(ipp_t *ipp)
-+{
-+  if (!ipp || !ipp->current)
-+    return (NULL);
-+  return (ipp->current = ipp->current->next);
-+}
-+#endif
-+
-+
- struct _GnomeCupsQueueDetails {
- 	char *queue_name;
- 	GList *jobs;
-@@ -199,8 +226,8 @@ finish_job (GnomeCupsJob *job)
- 	job->size = job->size * 1024;
- }
- 
--#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (attr->values[0].string.text);}}
--#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { (dest) = attr->values[0].integer; } }
-+#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (ippGetString (attr, 0, NULL));}}
-+#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { (dest) = ippGetInteger (attr, 0); } }
- 
- static void
- get_jobs_cb (guint id,
-@@ -231,8 +258,8 @@ get_jobs_cb (guint id,
- 	
- 	if (response) {
- 		job = g_new0 (GnomeCupsJob, 1);
--		for (attr = response->attrs; attr != NULL; attr = attr->next) {
--			if (attr->name == NULL) {
-+		for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) {
-+			if (ippGetName (attr) == NULL) {
- 				if (job->name) {
- 					finish_job (job);
- 					jobs = g_list_prepend (jobs, job);	
-@@ -244,7 +271,7 @@ get_jobs_cb (guint id,
- 				continue;
- 			}
- 			
--			if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) {
-+			if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) {
- 				continue;
- 				
- 			}
-@@ -355,8 +382,8 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue,
- 
- 	if (response) {
- 		job = g_new0 (GnomeCupsJob, 1);
--		for (attr = response->attrs; attr != NULL; attr = attr->next) {
--			if (attr->name == NULL) {
-+		for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) {
-+			if (ippGetName (attr) == NULL) {
- 				if (job->name) {
- 					finish_job (job);
- 				} else {
-@@ -366,7 +393,7 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue,
- 				break;
- 			}
- 			
--			if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) {
-+			if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) {
- 				continue;
- 			}
- 			
-diff --git a/libgnomecups/gnome-cups-request.c b/libgnomecups/gnome-cups-request.c
-index c94f623..13f0948 100644
---- a/libgnomecups/gnome-cups-request.c
-+++ b/libgnomecups/gnome-cups-request.c
-@@ -19,6 +19,36 @@
- #define STOP_UNUSED_THREADS_TIMEOUT 60
- #define CLOSE_UNUSED_CONNECTIONS_TIMEOUT 30
- 
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
-+#ifndef HAVE_CUPS_1_6
-+#define ippGetCount(attr)     attr->num_values
-+#define ippGetValueTag(attr)  attr->value_tag
-+#define ippGetName(attr)      attr->name
-+#define ippGetBoolean(attr, element) attr->values[element].boolean
-+#define ippGetInteger(attr, element) attr->values[element].integer
-+#define ippGetString(attr, element, language) attr->values[element].string.text
-+
-+static ipp_attribute_t *
-+ippFirstAttribute(ipp_t *ipp)
-+{
-+  if (!ipp)
-+    return (NULL);
-+  return (ipp->current = ipp->attrs);
-+}
-+
-+static ipp_attribute_t *
-+ippNextAttribute(ipp_t *ipp)
-+{
-+  if (!ipp || !ipp->current)
-+    return (NULL);
-+  return (ipp->current = ipp->current->next);
-+}
-+#endif
-+
-+
- typedef struct
- {
- 	GMutex *mutex;
-@@ -276,14 +306,14 @@ dump_request (ipp_t const *req)
- 	unsigned i;
- 	ipp_attribute_t *attr;
- 
--	for (attr = req->attrs; attr != NULL; attr = attr->next) {
--		g_print ("%s", attr->name);
--		for (i = 0 ; i < attr->num_values ; i++) {
-+	for (attr = ippFirstAttribute (req); attr != NULL; attr = ippNextAttribute (req)) {
-+		g_print ("%s", ippGetName (attr));
-+		for (i = 0 ; i < ippGetCount (attr) ; i++) {
- 			g_print ("\t[%d] = ", i);
--			switch (attr->value_tag & ~IPP_TAG_COPY) {
-+			switch (ippGetValueTag (attr) & ~IPP_TAG_COPY) {
- 			case IPP_TAG_INTEGER:
- 			case IPP_TAG_ENUM:
--				g_print ("%d\n", attr->values[i].integer);
-+				g_print ("%d\n", ippGetInteger (attr, i));
- 				break;
- 
- 			case IPP_TAG_STRING:
-@@ -294,11 +324,11 @@ dump_request (ipp_t const *req)
- 			case IPP_TAG_CHARSET:
- 			case IPP_TAG_LANGUAGE:
- 			case IPP_TAG_MIMETYPE:
--				g_print ("'%s'\n", attr->values[i].string.text);
-+				g_print ("'%s'\n", ippGetString (attr, i, NULL));
- 				break;
- 
- 			case IPP_TAG_BOOLEAN:
--				g_print ("%s\n", (int)attr->values[i].boolean ? "true" : "false");
-+				g_print ("%s\n", (int)ippGetBoolean (attr, i) ? "true" : "false");
- 				break;
- 
- 			default:
--- 
-1.7.8.6
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups/libgnomecups-0.2.3-glib.h.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups/libgnomecups-0.2.3-glib.h.patch
deleted file mode 100644
index c7b6165..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gnome/libgnomecups/libgnomecups-0.2.3-glib.h.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Imported from gentoo:
-
-http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch
-
-From d84eee9450b3b6f6155074915efc61bedcc8d446 Mon Sep 17 00:00:00 2001
-From: Dominique Leuenberger <dimstar@opensuse.org>
-Date: Sun, 27 Nov 2011 21:36:41 +0100
-Subject: [PATCH] Fix: Only glib.h can be included
-
----
- libgnomecups/gnome-cups-i18n.c |    2 +-
- libgnomecups/gnome-cups-init.h |    3 +--
- 2 files changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/libgnomecups/gnome-cups-i18n.c b/libgnomecups/gnome-cups-i18n.c
-index 8987c5c..127756d 100644
---- a/libgnomecups/gnome-cups-i18n.c
-+++ b/libgnomecups/gnome-cups-i18n.c
-@@ -1,5 +1,5 @@
- #include <config.h>
--#include <glib/gmacros.h>
-+#include <glib.h>
- #include "gnome-cups-i18n.h"
- 
- #ifdef ENABLE_NLS
-diff --git a/libgnomecups/gnome-cups-init.h b/libgnomecups/gnome-cups-init.h
-index 22b682a..c4600fc 100644
---- a/libgnomecups/gnome-cups-init.h
-+++ b/libgnomecups/gnome-cups-init.h
-@@ -1,8 +1,7 @@
- #ifndef GNOME_CUPS_INIT
- #define GNOME_CUPS_INIT
- 
--#include <glib/gtypes.h>
--#include <glib/gmacros.h>
-+#include <glib.h>
- 
- G_BEGIN_DECLS
- 
--- 
-1.7.7
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/files/glib-2.32.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/files/glib-2.32.patch
deleted file mode 100644
index f0b878d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/files/glib-2.32.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 8d49a386f467cbf8e0842d2218126f643e50f834 Mon Sep 17 00:00:00 2001
-From: Dominique Leuenberger <dimstar@opensuse.org>
-Date: Sun, 27 Nov 2011 14:24:57 +0000
-Subject: Fix build with glib 2.31: Only glib.h can be #include'd. Fixes bug #664914
-
-Upstream-Status: Backport
-
----
-diff --git a/engines/clearlooks/src/animation.c b/engines/clearlooks/src/animation.c
-index 1f7a41f..56a9286 100644
---- a/engines/clearlooks/src/animation.c
-+++ b/engines/clearlooks/src/animation.c
-@@ -28,7 +28,7 @@
- #include "animation.h"
- 
- #ifdef HAVE_WORKING_ANIMATION
--#include <glib/gtimer.h>
-+#include <glib.h>
- 
- struct _AnimationInfo {
- 	GTimer *timer;
---
-cgit v0.9.0.2
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/files/substitute-tests.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/files/substitute-tests.patch
deleted file mode 100644
index 5c557ba..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/files/substitute-tests.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gtk-engines-2.20.2/configure.ac gtk-engines-2.20.2/configure.ac
---- gtk-engines-2.20.2/configure.ac	2010-10-01 15:42:37.000000000 +0300
-+++ gtk-engines-2.20.2/configure.ac	2013-08-20 02:50:27.930510565 +0300
-@@ -166,6 +166,9 @@
-
- AC_SUBST(DEVELOPMENT_CFLAGS)
-
-+AC_SUBST([exported_symbols_tests], [[$(EXPORTED_SYMBOLS_TESTS)]])
-+AC_SUBST([torture_test_tests], [[$(TORTURE_TEST_TESTS)]])
-+
- AM_CONFIG_HEADER([engines/support/config.h])
-
- AC_CONFIG_FILES([
-diff -Nurd gtk-engines-2.20.2/test/Makefile.am gtk-engines-2.20.2/test/Makefile.am
---- gtk-engines-2.20.2/test/Makefile.am	2010-09-19 18:18:21.000000000 +0300
-+++ gtk-engines-2.20.2/test/Makefile.am	2013-08-20 02:50:36.842510865 +0300
-@@ -66,7 +66,7 @@
- # Prefix with exported_
- EXPORTED_SYMBOLS_TESTS = $(patsubst %,exported_%,$(BUILD_ENGINES))
-
--TESTS += $(EXPORTED_SYMBOLS_TESTS)
-+TESTS += @exported_symbols_tests@
-
-
- #############################################################
-@@ -88,7 +88,7 @@
- TORTURE_TEST_TESTS = torture_buildin $(patsubst %,torture_%,$(TORTURE_TEST_ENGINES))
-
- # Add TORTURE_TEST_ENGINES to list of tests
--TESTS += $(TORTURE_TEST_TESTS)
-+TESTS += @torture_test_tests@
-
- # Possible other tests:
- #  - An extensive theme switch tests that loads/unloads the engine
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb
deleted file mode 100644
index 83aa749..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "GTK+ theme engines"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-SECTION = "x11/base"
-DEPENDS = "intltool-native gtk+ gettext-native glib-2.0-native"
-
-PR = "r3"
-
-PACKAGES += "${PN}-schemas"
-PACKAGES_DYNAMIC += "^gtk-engine-.* ^gtk-theme-.*"
-
-RDEPENDS_gtk-theme-redmond = "gtk-engine-redmond95"
-RDEPENDS_gtk-theme-metal = "gtk-engine-metal"
-RDEPENDS_gtk-theme-mist = "gtk-engine-mist"
-RDEPENDS_gtk-theme-crux = "gtk-engine-crux-engine"
-RDEPENDS_gtk-theme-lighthouseblue = "gtk-engine-lighthouseblue"
-RDEPENDS_gtk-theme-thinice = "gtk-engine-thinice"
-RDEPENDS_gtk-theme-industrial = "gtk-engine-industrial"
-RDEPENDS_gtk-theme-clearlooks = "gtk-engine-clearlooks"
-
-FILES_${PN} = ""
-FILES_${PN}-dev += "${libdir}/gtk-2.0/*/engines/*.la"
-FILES_${PN}-schemas = "${datadir}/gtk-engines/*.xml"
-
-CFLAGS_prepend = "-DHAVE_ANIMATION "
-
-RDEPENDS_${PN}-dev = ""
-
-inherit gnomebase
-GNOME_COMPRESS_TYPE="bz2"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-# This picks stable releases in the 2.x series (but not 2.90 onwards,
-# which were GNOME 3 betas).
-UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
-
-python populate_packages_prepend() {
-    engines_root = os.path.join(d.getVar('libdir'), "gtk-2.0/2.10.0/engines")
-    themes_root = os.path.join(d.getVar('datadir'), "themes")
-
-    do_split_packages(d, engines_root, '^lib(.*)\.so$', 'gtk-engine-%s', 'GTK %s theme engine', extra_depends='')
-    do_split_packages(d, themes_root, '(.*)', 'gtk-theme-%s', 'GTK theme %s', allow_dirs=True, extra_depends='')
-    # TODO: mark theme packages as arch all
-}
-
-SRC_URI += "file://glib-2.32.patch \
-            file://substitute-tests.patch"
-SRC_URI[archive.md5sum] = "5deb287bc6075dc21812130604c7dc4f"
-SRC_URI[archive.sha256sum] = "15b680abca6c773ecb85253521fa100dd3b8549befeecc7595b10209d62d66b5"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light/classic-light.xml b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light/classic-light.xml
new file mode 100644
index 0000000..23b4b9a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light/classic-light.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Based on gtksourceview 'classic'
+ 
+ This file is part of GtkSourceView
+
+ Copyright (C) 2006-2007 GtkSourceView team
+ Author: Yevgen Muntyan <muntyan@tamu.edu>
+
+ GtkSourceView is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ GtkSourceView 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+-->
+<style-scheme id="classic-light" _name="Classic-Light" version="1.0">
+  <author>GtkSourceView team</author>
+  <_description>Classic color scheme light</_description>
+
+  <!-- The scheme tries to look like the default GVim scheme,
+       since it is also what the hardwired GtkSourceView 1 color
+       scheme did -->
+
+  <!-- Palette -->
+  <color name="black"      value="#000000"/>
+  <color name="white"      value="#FFFFFF"/>
+  <color name="blue"       value="#0000FF"/>
+  <color name="magenta"    value="#FF00FF"/>
+  <color name="violet"     value="#6A5ACD"/>
+  <color name="cyan"       value="#008A8C"/>
+  <color name="gray"       value="#BEBEBE"/>
+  <color name="lightgray"  value="#E0E0E0"/>
+  <color name="green"      value="#2E8B57"/>
+  <color name="bordeaux"   value="#A52A2A"/>
+  <color name="red"        value="#FF0000"/>
+  <color name="yellow"     value="#FFFF00"/>
+  <color name="purple"     value="#A020F0"/>
+
+  <!-- Global Settings -->
+  <style name="current-line"                background="#eeeeec"/>
+  <style name="current-line-number"         background="#eeeeec"/>
+  <style name="draw-spaces"                 foreground="#babdb6"/>
+  <style name="background-pattern"          background="#f3f3f3"/>
+  <style name="text"                        foreground="black" background="white"/>
+  <style name="selection"                   background="gray"/>
+  <style name="cursor"                      foreground="black"/>
+  <style name="line-numbers"                foreground="black" background="gray"/>
+
+  <!-- Bracket Matching -->
+  <style name="bracket-match"               foreground="white" background="gray"/>
+  <style name="bracket-mismatch"            foreground="white" background="red"/>
+
+  <!-- Right Margin -->
+  <style name="right-margin"                foreground="#000000" background="#000000"/>
+
+  <!-- Search Matching -->
+  <style name="search-match"                background="yellow"/>
+
+  <!-- Comments -->
+  <style name="def:comment"                 foreground="blue"/>
+  <style name="def:shebang"                 foreground="blue" bold="true"/>
+  <style name="def:doc-comment-element"     italic="true"/>
+
+  <!-- Constants -->
+  <style name="def:constant"                foreground="magenta"/>
+  <style name="def:special-char"            foreground="violet"/>
+
+  <!-- Identifiers -->
+  <style name="def:identifier"              foreground="cyan"/>
+
+  <!-- Statements -->
+  <style name="def:statement"               foreground="bordeaux" bold="true"/>
+
+  <!-- Types -->
+  <style name="def:type"                    foreground="green" bold="true"/>
+
+  <!-- Others -->
+  <style name="def:preprocessor"            foreground="purple"/>
+  <style name="def:error"                   background="red" bold="true"/>
+  <style name="def:warning"                 background="yellow"/>
+  <style name="def:note"                    foreground="blue" background="yellow" bold="true"/>
+  <style name="def:underlined"              italic="true" underline="single"/>
+
+  <!-- Heading styles, uncomment to enable -->
+  <!--
+  <style name="def:heading0"                scale="5.0"/>
+  <style name="def:heading1"                scale="2.5"/>
+  <style name="def:heading2"                scale="2.0"/>
+  <style name="def:heading3"                scale="1.7"/>
+  <style name="def:heading4"                scale="1.5"/>
+  <style name="def:heading5"                scale="1.3"/>
+  <style name="def:heading6"                scale="1.2"/>
+  -->
+
+  <!-- Language specific styles -->
+  <style name="diff:added-line"             foreground="#008B8B"/>
+  <style name="diff:removed-line"           foreground="#6A5ACD"/>
+  <style name="diff:changed-line"           use-style="def:preprocessor"/>
+  <style name="diff:special-case"           use-style="def:constant"/>
+  <style name="diff:location"               use-style="def:statement"/>
+  <style name="diff:diff-file"              use-style="def:type"/>
+
+  <style name="xml:tags"                    foreground="cyan"/>
+  <style name="xml:attribute-name"          foreground="violet"/>
+  <style name="xml:namespace"               foreground="green" bold="true"/>
+
+  <style name="js:object"                   foreground="#2E8B57" bold="true"/>
+  <style name="js:constructors"             foreground="#008B8B"/>
+
+  <style name="latex:display-math"          foreground="#6A5ACD"/>
+  <style name="latex:command"               foreground="#2E8B57" bold="true"/>
+  <style name="latex:include"               use-style="def:preprocessor"/>
+
+  <style name="sh:variable"                 foreground="#6A5ACD"/>
+
+  <!-- legacy styles for old lang files -->
+  <style name="Others"                      foreground="#2E8B57" bold="true"/>
+  <style name="Others 2"                    foreground="#008B8B"/>
+  <style name="Others 3"                    foreground="#6A5ACD"/>
+
+</style-scheme>
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light_1.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light_1.0.bb
new file mode 100644
index 0000000..e7dc0f8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview-classic-light_1.0.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Gtksourceview Classic-Light theme"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://classic-light.xml;beginline=6;endline=23;md5=2b4f75364fad00a4d752214dcbd7d7c3"
+
+inherit allarch
+
+SRC_URI = "file://classic-light.xml"
+
+S = "${WORKDIR}"
+
+do_install() {
+    install -d ${D}${datadir}/gtksourceview-2.0/styles
+    install -m 0644 ${WORKDIR}/classic-light.xml ${D}${datadir}/gtksourceview-2.0/styles/
+    install -d ${D}${datadir}/gtksourceview-3.0/styles
+    install -m 0644 ${WORKDIR}/classic-light.xml ${D}${datadir}/gtksourceview-3.0/styles/
+}
+
+FILES_${PN} = " \
+    ${datadir}/gtksourceview-2.0/styles \
+    ${datadir}/gtksourceview-3.0/styles \
+"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.6.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.6.bb
new file mode 100644
index 0000000..87e48ed
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.6.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Portable C library for multiline text editing"
+HOMEPAGE = "http://projects.gnome.org/gtksourceview/"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+DEPENDS = "gtk+3 libxml2 intltool-native gnome-common-native glib-2.0-native"
+
+PNAME = "gtksourceview"
+
+S = "${WORKDIR}/${PNAME}-${PV}"
+
+inherit gnomebase lib_package gettext distro_features_check gtk-doc gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtksourceview/3.24/${PNAME}-${PV}.tar.xz"
+SRC_URI[md5sum] = "c09ccfc80f78083841f8fe266c1ac52a"
+SRC_URI[sha256sum] = "7aa6bdfebcdc73a763dddeaa42f190c40835e6f8495bb9eb8f78587e2577c188"
+
+FILES_${PN} += " ${datadir}/gtksourceview-3.0"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.32.1.bb
deleted file mode 100644
index d380688..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.32.1.bb
+++ /dev/null
@@ -1,66 +0,0 @@
-DESCRIPTION = "gvfs is a userspace virtual filesystem"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e"
-
-inherit gnome bash-completion gettext
-
-DEPENDS += "libsecret glib-2.0 gconf intltool-native libgudev udisks2 polkit shadow-native"
-
-SRC_URI = "https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive"
-
-SRC_URI[archive.md5sum] = "cbe766b46f324e17d7abcfb4a89a1684"
-SRC_URI[archive.sha256sum] = "d0b6c9edab09d52472355657a2f0a14831b2e6c58caba395f721ab683f836ade"
-
-EXTRA_OECONF = " \
-    --disable-gdu \
-    --enable-udisks2 \
-    --disable-documentation \
-    --with-archive-includes=${STAGING_INCDIR} \
-    --with-archive-libs=${STAGING_LIBDIR} \
-"
-
-PACKAGES =+ "gvfsd-ftp gvfsd-sftp gvfsd-trash"
-
-FILES_${PN} += " \
-    ${datadir}/glib-2.0 \
-    ${datadir}/GConf \
-    ${datadir}/dbus-1/services \
-    ${libdir}/gio/modules/*.so \
-    ${libdir}/tmpfiles.d \
-    ${systemd_user_unitdir} \
-"
-RDEPENDS_${PN} = "udisks2"
-
-FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/*"
-FILES_${PN}-dev += "${libdir}/gio/modules/*.la"
-
-FILES_gvfsd-ftp = "${libexecdir}/gvfsd-ftp ${datadir}/gvfs/mounts/ftp.mount"
-FILES_gvfsd-sftp = "${libexecdir}/gvfsd-sftp ${datadir}/gvfs/mounts/sftp.mount"
-FILES_gvfsd-trash = "${libexecdir}/gvfsd-trash ${datadir}/gvfs/mounts/trash.mount"
-
-RRECOMMENDS_gvfsd-ftp += "openssh-sftp openssh-ssh"
-
-PACKAGECONFIG ?= "libgphoto2 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-
-PACKAGECONFIG[afc] = "--enable-afc, --disable-afc, libimobiledevice libplist"
-PACKAGECONFIG[archive] = "--enable-archive, --disable-archive, libarchive"
-PACKAGECONFIG[avahi] = "--enable-avahi, --disable-avahi, avahi"
-PACKAGECONFIG[gcr] = "--enable-gcr, --disable-gcr, gcr"
-PACKAGECONFIG[gtk] = "--enable-gtk, --disable-gtk, gtk+3"
-PACKAGECONFIG[http] = "--enable-http, --disable-http, libsoup-2.4"
-PACKAGECONFIG[libmtp] = "--enable-libmtp, --disable-libmtp, libmtp"
-PACKAGECONFIG[libgphoto2] = "--enable-gphoto2, --disable-gphoto2, libgphoto2"
-PACKAGECONFIG[samba] = "--enable-samba, --disable-samba, samba"
-PACKAGECONFIG[systemd] = "--with-systemduserunitdir=${systemd_user_unitdir},--without-systemduserunitdir,systemd"
-
-# needs meta-filesystems
-PACKAGECONFIG[fuse] = "--enable-fuse, --disable-fuse, fuse"
-
-# libcdio-paranoia recipe doesn't exist yet
-PACKAGECONFIG[cdda] = "--enable-cdda, --disable-cdda, libcdio-paranoia"
-
-# Fix up permissions on polkit rules.d to work with rpm4 constraints
-do_install_append() {
-	chmod 700 ${D}/${datadir}/polkit-1/rules.d
-	chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
-}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.36.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.36.0.bb
new file mode 100644
index 0000000..5f73912
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/gvfs/gvfs_1.36.0.bb
@@ -0,0 +1,68 @@
+DESCRIPTION = "gvfs is a userspace virtual filesystem"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e"
+
+inherit gnome bash-completion gettext
+
+DEPENDS += "libsecret glib-2.0 gconf intltool-native libgudev udisks2 polkit shadow-native"
+
+SRC_URI = "https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive"
+
+SRC_URI[archive.md5sum] = "216d461c5e96e2cea74253be407af6dc"
+SRC_URI[archive.sha256sum] = "9ec388afeb373a213f2cc489184f76a17ae273a000e8a4ec720c1995943256bb"
+
+do_configure_prepend() {
+    # make automake happy..
+    touch ${S}/ABOUT-NLS
+}
+
+EXTRA_OECONF = " \
+    --disable-gdu \
+    --enable-udisks2 \
+    --disable-documentation \
+"
+
+PACKAGES =+ "gvfsd-ftp gvfsd-sftp gvfsd-trash"
+
+FILES_${PN} += " \
+    ${datadir}/glib-2.0 \
+    ${datadir}/GConf \
+    ${datadir}/dbus-1/services \
+    ${libdir}/gio/modules/*.so \
+    ${libdir}/tmpfiles.d \
+    ${systemd_user_unitdir} \
+"
+RDEPENDS_${PN} = "udisks2"
+
+FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/*"
+FILES_${PN}-dev += "${libdir}/gio/modules/*.la"
+
+FILES_gvfsd-ftp = "${libexecdir}/gvfsd-ftp ${datadir}/gvfs/mounts/ftp.mount"
+FILES_gvfsd-sftp = "${libexecdir}/gvfsd-sftp ${datadir}/gvfs/mounts/sftp.mount"
+FILES_gvfsd-trash = "${libexecdir}/gvfsd-trash ${datadir}/gvfs/mounts/trash.mount"
+
+RRECOMMENDS_gvfsd-ftp += "openssh-sftp openssh-ssh"
+
+PACKAGECONFIG ?= "libgphoto2 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+PACKAGECONFIG[afc] = "--enable-afc, --disable-afc, libimobiledevice libplist"
+PACKAGECONFIG[archive] = "--enable-archive, --disable-archive, libarchive"
+PACKAGECONFIG[avahi] = "--enable-avahi, --disable-avahi, avahi"
+PACKAGECONFIG[gcr] = "--enable-gcr, --disable-gcr, gcr"
+PACKAGECONFIG[http] = "--enable-http, --disable-http, libsoup-2.4"
+PACKAGECONFIG[libmtp] = "--enable-libmtp, --disable-libmtp, libmtp"
+PACKAGECONFIG[libgphoto2] = "--enable-gphoto2, --disable-gphoto2, libgphoto2"
+PACKAGECONFIG[samba] = "--enable-samba, --disable-samba, samba"
+PACKAGECONFIG[systemd] = "--with-systemduserunitdir=${systemd_user_unitdir},--without-systemduserunitdir,systemd"
+
+# needs meta-filesystems
+PACKAGECONFIG[fuse] = "--enable-fuse, --disable-fuse, fuse"
+
+# libcdio-paranoia recipe doesn't exist yet
+PACKAGECONFIG[cdda] = "--enable-cdda, --disable-cdda, libcdio-paranoia"
+
+# Fix up permissions on polkit rules.d to work with rpm4 constraints
+do_install_append() {
+	chmod 700 ${D}/${datadir}/polkit-1/rules.d
+	chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
+}
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgdata/libgdata_0.16.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgdata/libgdata_0.16.1.bb
index c2157df..80cbae3 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgdata/libgdata_0.16.1.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgdata/libgdata_0.16.1.bb
@@ -9,12 +9,18 @@
 
 DEPENDS = "gnome-common-native libxml2 glib-2.0 libsoup-2.4 intltool-native liboauth gcr json-glib"
 
-inherit gnomebase pkgconfig autotools-brokensep gettext gtk-doc vala gobject-introspection
+inherit distro_features_check gnomebase pkgconfig autotools-brokensep gettext gtk-doc vala gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_configure_prepend_class-target () {
     # introspection.m4 pre-packaged with upstream tarballs does not yet
     # have our fixes
     rm -f ${S}/introspection.m4
+    
+    # remove the pre-built gtk-doc files, as they're installed (or attempted to be installed)
+    # even if gtk-doc is explicitly disabled
+    rm -rf ${S}/docs/reference/html
 }
 
 do_compile_prepend() {
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnome/0001-libgnome-Makefile.am-allow-deprecated-symbols.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnome/0001-libgnome-Makefile.am-allow-deprecated-symbols.patch
deleted file mode 100644
index b658303..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnome/0001-libgnome-Makefile.am-allow-deprecated-symbols.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ce1cd20fceea7dbcc5b983d94de771461eccf7cf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Mon, 29 Apr 2013 14:17:13 +0200
-Subject: [PATCH] libgnome/Makefile.am: allow deprecated symbols
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-fixes:
-
-| gnome-program.c: In function 'gnome_program_init_common':
-| gnome-program.c:2067:2: error: implicit declaration of function 'g_atexit' [-Werror=implicit-function-declaration]
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- libgnome/Makefile.am |    1 -
- 1 files changed, 0 insertions(+), 1 deletions(-)
-
-diff --git a/libgnome/Makefile.am b/libgnome/Makefile.am
-index 9c8cd3e..aa01f6c 100644
---- a/libgnome/Makefile.am
-+++ b/libgnome/Makefile.am
-@@ -17,7 +17,6 @@ INCLUDES = \
- 	-I$(srcdir)/..						\
- 	$(WARN_CFLAGS)						\
- 	$(LIBGNOME_CFLAGS)					\
--	-DG_DISABLE_DEPRECATED					\
- 	-DLIBGNOME_PREFIX=\""$(prefix)"\"			\
- 	-DLIBGNOME_LIBDIR=\""$(libdir)"\"			\
- 	-DLIBGNOME_DATADIR=\""$(datadir)"\"			\
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnome_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnome_2.32.1.bb
deleted file mode 100644
index 0055ba4..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnome_2.32.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Gnome application programming libraries"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605"
-SECTION = "x11/gnome/libs"
-
-inherit gnome lib_package
-
-PR = "r2"
-
-SRC_URI[archive.md5sum] = "a4345e6087ae6195d65a4674ffdca559"
-SRC_URI[archive.sha256sum] = "b2c63916866485793b87398266dd7778548c1734923c272a94d84ee011b6f7a4"
-SRC_URI += "file://0001-libgnome-Makefile.am-allow-deprecated-symbols.patch"
-GNOME_COMPRESS_TYPE="bz2"
-
-DEPENDS += "libcanberra gconf-native gnome-vfs libbonobo esound intltool-native gnome-common-native"
-
-EXTRA_OECONF += "--disable-gtk-doc"
-
-do_configure_prepend() {
-    sed -i -e s:docs::g ${S}/Makefile.am
-    echo "EXTRA_DIST = version.xml" > gnome-doc-utils.make
-    echo "EXTRA_DIST = version.xml" > gtk-doc.make
-}
-
-FILES_${PN} += "${libdir}/bonobo/servers ${libdir}/bonobo/monikers/*.so \
-                ${datadir}/gnome-background-properties ${datadir}/pixmaps"
-FILES_${PN}-dev += "${libdir}/bonobo/monikers/*.la"
-FILES_${PN}-staticdev += "${libdir}/bonobo/monikers/*.a"
-
-PACKAGES =+ "gnome-common-schemas"
-
-FILES_gnome-common-schemas = "${datadir}/gnome-background-properties ${datadir}/pixmaps ${sysconfdir}"
-
-RDEPENDS_${PN} = "gnome-common-schemas"
-
-FILES_${PN}-dbg += "${libdir}/bonobo/monikers/.debug"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomecanvas_2.30.3.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomecanvas_2.30.3.bb
deleted file mode 100644
index 41a89ce..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomecanvas_2.30.3.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "A powerful object-oriented display"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605"
-SECTION = "x11/gnome/libs"
-
-inherit gnomebase gtk-doc
-
-# intltool to provide IT_PROG_INTLTOOL
-# configure: line 12654: syntax error near unexpected token `0.35.0'
-# configure: line 12654: `IT_PROG_INTLTOOL(0.35.0)'
-DEPENDS = "gtk+ libglade libart-lgpl xineramaproto intltool-native gnome-common-native"
-
-SRC_URI[archive.md5sum] = "ffcbb719c671ff5cd86e59aeba8d0b92"
-SRC_URI[archive.sha256sum] = "859b78e08489fce4d5c15c676fec1cd79782f115f516e8ad8bed6abcb8dedd40"
-GNOME_COMPRESS_TYPE="bz2"
-
-FILES_${PN} += "${libdir}/libglade/*/libcanvas.so"
-FILES_${PN}-dbg += "${libdir}/libglade/*/.debug/"
-FILES_${PN}-dev += "${libdir}/libglade/*/libcanvas*.la"
-FILES_${PN}-staticdev += "${libdir}/libglade/*/libcanvas*.a"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb
index 12ed81d..40249fd 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_3.22.0.bb
@@ -6,7 +6,9 @@
 
 DEPENDS = "gconf glib-2.0 libxklavier gtk+3 intltool-native"
 
-inherit gnome gobject-introspection gettext
+inherit distro_features_check gnome gobject-introspection gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 GNOME_COMPRESS_TYPE = "xz"
 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/0001-suppress-string-format-literal-warning-to-fix-build-.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/0001-suppress-string-format-literal-warning-to-fix-build-.patch
deleted file mode 100644
index abc9bdf..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/0001-suppress-string-format-literal-warning-to-fix-build-.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 6697fcf9d7f53126b442bf19890640b5f88c8aa4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 29 Jul 2016 21:24:20 +0200
-Subject: [PATCH] suppress string format literal warning to fix build with gcc6
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-works around:
-| ../../libgnomeui-2.24.5/libgnomeui/gnome-dateedit.c: In function 'day_selected':
-| ../../libgnomeui-2.24.5/libgnomeui/gnome-dateedit.c:156:9: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
-|          strftime_date_format, &mtm) == 0)
-|          ^~~~~~~~~~~~~~~~~~~~
-| ../../libgnomeui-2.24.5/libgnomeui/gnome-dateedit.c: In function 'gnome_date_edit_set_time':
-| ../../libgnomeui-2.24.5/libgnomeui/gnome-dateedit.c:704:2: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
-|   if (strftime (buffer, sizeof (buffer), strftime_date_format, mytm) == 0)
-|   ^~
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- libgnomeui/gnome-dateedit.c | 6 ++++++
- libgnomeui/gnome-gconf-ui.c | 3 +++
- 2 files changed, 9 insertions(+)
-
-diff --git a/libgnomeui/gnome-dateedit.c b/libgnomeui/gnome-dateedit.c
-index 69ab699..41541c3 100644
---- a/libgnomeui/gnome-dateedit.c
-+++ b/libgnomeui/gnome-dateedit.c
-@@ -152,9 +152,12 @@ day_selected (GtkCalendar *calendar, GnomeDateEdit *gde)
- 	else
- 		mtm.tm_year = year;
- 
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
- 	if (strftime (buffer, sizeof (buffer),
- 		      strftime_date_format, &mtm) == 0)
- 		strcpy (buffer, "???");
-+#pragma GCC diagnostic pop
- 	buffer[sizeof(buffer)-1] = '\0';
- 
- 	/* FIXME: what about set time */
-@@ -701,8 +704,11 @@ gnome_date_edit_set_time (GnomeDateEdit *gde, time_t the_time)
- 	mytm = localtime (&the_time);
- 
- 	/* Set the date */
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
- 	if (strftime (buffer, sizeof (buffer), strftime_date_format, mytm) == 0)
- 		strcpy (buffer, "???");
-+#pragma GCC diagnostic pop
- 	buffer[sizeof(buffer)-1] = '\0';
- 
- 	str_utf8 = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
-diff --git a/libgnomeui/gnome-gconf-ui.c b/libgnomeui/gnome-gconf-ui.c
-index 43c0f44..a84b2c0 100644
---- a/libgnomeui/gnome-gconf-ui.c
-+++ b/libgnomeui/gnome-gconf-ui.c
-@@ -180,12 +180,15 @@ error_idle_func (gpointer data)
-                                 "configuration settings may not work properly.");
-                 }
- 
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-                 dialog = gtk_message_dialog_new (NULL /* parent */,
-                                                  0 /* flags */,
-                                                  GTK_MESSAGE_ERROR,
-                                                  GTK_BUTTONS_OK,
-                                                  fmt,
-                                                  gnome_program_get_human_readable_name(gnome_program_get()));
-+#pragma GCC diagnostic pop
-                 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-                 g_signal_connect (dialog, "response",
-                                   G_CALLBACK (gtk_widget_destroy),
--- 
-2.5.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/gnome-stock-pixbufs.h b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/gnome-stock-pixbufs.h
deleted file mode 100644
index 953a8ae..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/gnome-stock-pixbufs.h
+++ /dev/null
@@ -1,4030 +0,0 @@
-/* gnome stock icons in GdmPixbuf usable rgb data
- *
- * Copyright (C) 1997 the Free Software Foundation
- *
- * the pixmaps for button_cancel, save_as, trash, mail_receive, stop
- * right_arrow, home, save, book_blue, trash_full, undo, search, mail_forward
- * revert, mail_compose, mic, copy, jump_to, convert, button_apply, timer
- * mail, book_red, book_yellow, help, redo, new, mail_send, button_yes, cut
- * properties, print, mail_reply, refresh, search_replace, open, preferences
- * left_arrow, undelete, close, volume, button_no, exit, book_green
- * book_open, paste, line_in, spellcheck, timer_stopped
- * are Copyright (C) 1998 Tuomas Kuosmanen
- */
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_attach)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_attach[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_attach[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0c\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\21\0\0\0\2\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\26\0"
-  "\0\0\"\0\0\0$\0\0\0%\0\0\0%\0\0\0\377\0\0\0l\0\0\0\377\0\0\0\377\0\0"
-  "\0\10\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\"\0\0\0\20\0"
-  "\0\0$\0\0\0~\1\1\1\377QQQ\377\232\232\232\377\317\317\317\377ooo\377"
-  "\0\0\0\377\0\0\0\16\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0x\0\0\0"
-  "\377FFF\377\245\245\245\377\342\342\342\377\377\377\377\377\377\377\377"
-  "\377\366\366\366\377\212\212\212\377999\377\0\0\0(\0\0\0\10\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\0"
-  "B\0\0\0\377\34\34\34\377\213\213\213\377\346\346\346\377\356\356\356"
-  "\377\341\341\341\377\377\377\377\377\370\370\370\377\367\367\367\377"
-  "\366\366\366\377\314\314\314\377VVV\377\0\0\0^\0\0\0\12\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\377>>>\377\201\201\201"
-  "\377\324\324\324\377\34\34\34\377\347\347\347\377\327\327\327\377\372"
-  "\372\372\377\371\371\371\377\370\370\370\377\302\302\302\377\313\313"
-  "\313\377\365\365\365\377\331\331\331\377\201\201\201\377\0\0\0\377\0"
-  "\0\0\25\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\3\3\3\377TTT\377\346\346"
-  "\346\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\327"
-  "\327\327\377\336\336\336\377\263\263\263\377yyy\377\0\0\0\377\342\342"
-  "\342\377\366\366\366\377\365\365\365\377\364\364\364\377\235\235\235"
-  "\377(((\377\0\0\0)\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\366\366"
-  "\366\377\377\377\377\377\377\377\377\377\372\372\372\377\372\372\372"
-  "\377\373\373\373\377\0\0\0\377\246\246\246\377\305\305\305\377\360\360"
-  "\360\377\370\370\370\377\0\0\0\377\342\342\342\377\302\302\302\377\312"
-  "\312\312\377\364\364\364\377\307\307\307\377VVV\377\0\0\0^\0\0\0\12\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\362\362\362\377\370\370\370\377\371"
-  "\371\371\377\316\316\316\377\304\304\304\377\305\305\305\377\0\0\0\377"
-  "\325\325\325\377\371\371\371\377\370\370\370\377\370\370\370\377\0\0"
-  "\0\377\263\263\263\377\332\332\332\377\364\364\364\377\363\363\363\377"
-  "\363\363\363\377yyy\377\0\0\0\377\0\0\0\25\0\0\0\3\0\0\0\0\0\0\0\0\0"
-  "\0\0h\205\205\205\377\377\377\377\377\370\370\370\377\276\276\276\377"
-  "\371\371\371\377\371\371\371\377\0\0\0\377\323\323\323\377\334\334\334"
-  "\377\302\302\302\377\302\302\302\377\0\0\0\377\342\342\342\377\365\365"
-  "\365\377\364\364\364\377\363\363\363\377\362\362\362\377\234\234\234"
-  "\377(((\377\0\0\0)\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\40HHH\377\377\377\377"
-  "\377\367\367\367\377\367\367\367\377\370\370\370\377\370\370\370\377"
-  "\0\0\0\377\247\247\247\377\326\326\326\377\367\367\367\377\366\366\366"
-  "\377\0\0\0\377\342\342\342\377\364\364\364\377\304\304\304\377\310\310"
-  "\310\377\362\362\362\377\306\306\306\377LLL\377\0\0\0^\0\0\0\12\0\0\0"
-  "\0\0\0\0\0\0\0\0\1\0\0\0\377\352\352\352\377\377\377\377\377\366\366"
-  "\366\377\276\276\276\377\302\302\302\377\0\0\0\377\345\345\345\377\330"
-  "\330\330\377\366\366\366\377\365\365\365\377\0\0\0\377\255\255\255\377"
-  "\274\274\274\377\352\352\352\377\340\340\340\377\361\361\361\377\352"
-  "\352\352\377\220\220\220\377\0\0\0\377\0\0\0\25\0\0\0\3\0\0\0\0\0\0\0"
-  "\0\0\0\0ihhh\377\377\377\377\377\365\365\365\377\366\366\366\377\366"
-  "\366\366\377\242\242\242\377\0\0\0\377\300\300\300\377\301\301\301\377"
-  "\0\0\0\377xxx\377\326\326\326\377\363\363\363\377\362\362\362\377\361"
-  "\361\361\377\361\361\361\377\325\325\325\377\256\256\256\377\25\25\25"
-  "\377\0\0\0)\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\4""999\377\377\377\377\377"
-  "\364\364\364\377\365\365\365\377\365\365\365\377\332\332\332\377\232"
-  "\232\232\377\0\0\0\377\0\0\0\377yyy\377\326\326\326\377\362\362\362\377"
-  "\362\362\362\377\361\361\361\377\326\326\326\377\320\320\320\377\227"
-  "\227\227\377rrr\377JJJ\377\0\0\0.\0\0\0\11\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\377\354\354\354\377\377\377\377\377\364\364\364\377\254\254\254"
-  "\377\272\272\272\377\335\335\335\377\363\363\363\377\316\316\316\377"
-  "\333\333\333\377\354\354\354\377\327\327\327\377\326\326\326\377\261"
-  "\261\261\377\201\201\201\377VVV\377###\377\0\0\0\377\0\0\0q\0\0\0)\0"
-  "\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0hiii\377\377\377\377\377\363\363"
-  "\363\377\363\363\363\377\363\363\363\377\363\363\363\377\362\362\362"
-  "\377\362\362\362\377\327\327\327\377\267\267\267\377\202\202\202\377"
-  "@@@\377###\377\0\0\0\377\0\0\0\204\0\0\0""2\0\0\0.\0\0\0)\0\0\0\25\0"
-  "\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4(((\377\377\377\377\377\363\363"
-  "\363\377\362\362\362\377\362\362\362\377\327\327\327\377\276\276\276"
-  "\377\226\226\226\377222\377###\377\0\0\0\377\0\0\0u\0\0\0H\0\0\0/\0\0"
-  "\0*\0\0\0\31\0\0\0\13\0\0\0\10\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\377\346\346\346\377\350\350\350\377\314\314\314\377"
-  "\232\232\232\377@@@\377###\377\0\0\0\377\0\0\0\221\0\0\0I\0\0\0/\0\0"
-  "\0*\0\0\0\30\0\0\0\16\0\0\0\11\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;999\377\202\202\202\377999\377"
-  "\22\22\22\377\0\0\0\204\0\0\0I\0\0\0/\0\0\0*\0\0\0\33\0\0\0\16\0\0\0"
-  "\11\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\377\0\0\0\377\0\0\0u\0\0"
-  "\0""1\0\0\0*\0\0\0\31\0\0\0\16\0\0\0\11\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11\0\0\0&\0\0\0)\0\0\0\27\0\0\0"
-  "\12\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\7\0\0\0\10\0\0\0\3\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_book_blue)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_book_blue[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_book_blue[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0""9\0\0\0\302\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\357\0\0\0\356\0\0\0\346\0\0\0\342\0\0\0w\0\0\0\13\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\21\26\35\377\227"
-  "\250\276\377}\223\254\377s\212\243\377l\204\234\377d|\226\377^v\217\377"
-  "Wo\210\377Pi\202\377Pi\202\377Pi\202\377Pi\202\377Pi\202\377Vn\206\377"
-  "IXi\377\21\30\"\376\0\0\0.\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\273v\213\242\377\216\242\270\377v\215\247\377Vr\220\377"
-  "Nj\210\377Fb\200\377=Zx\3775Rp\3771Nk\3771Nk\3776Ro\3776Ro\377<Ws\377"
-  "6Ro\3773@O\377\25\34%\372\0\0\0N\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\22\12\15\21\377\231\254\300\377\200\226\256\377[v\224\377"
-  "So\215\377Jg\205\377B_}\377:Wu\3772Om\3771Nk\3771Nk\3771Nk\3771Nk\377"
-  ";Wr\377-D\\\377#/6\377\0\0\0^\0\0\0D\0\0\0\16\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\255[iy\377\231\254\300\377u\215\246\377Ws\221\377Ok\210"
-  "\377Gc\201\377\77[y\3776Sq\3771Nk\3771Nk\3771Nk\3771Nk\3774Pm\377;Wr"
-  "\377)\77V\3775<A\375\0\0\0\377\0\0\0%\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\21\0\0\0\377\231\254\300\377\200\227\260\377\\x\226\377Tp\216"
-  "\377Kh\206\377C`~\377;Xv\3773Pn\3771Nk\3771Nk\3773Pk\3771Nk\3779Uq\377"
-  "-D\\\377\27\",\377~\202\205\377578\377\0\0\0F\0\0\0\15\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\232[iy\377\217\243\271\377u\215\246\377Xt\222\377Pl"
-  "\212\377Hd\202\377@\\z\3778Tr\3771Nk\3771Nk\3771Nk\3771Nk\3772Ol\377"
-  "=Yt\377)\77V\377!'.\376JLM\377\216\220\222\377\0\0\0Q\0\0\0\20\0\0\0"
-  "\0\0\0\0\0\0\0\0\20\0\0\0\377\230\253\277\375\177\226\257\377]y\227\377"
-  "Uq\217\377Mi\207\377Da\177\377<Yw\3774Qo\3771Nk\3771Nk\3771Nk\3771Nk"
-  "\3778Tp\377/F]\377\30$-\377TWY\366eij\377334\377\0\0\0Q\0\0\0\20\0\0"
-  "\0\0\0\0\0\0\0\0\0\335eu\203\377\215\242\271\377v\215\247\377Zu\223\377"
-  "Qm\213\377Ie\203\377A]{\3779Us\3771Nk\3771Nk\3771Nk\3771Nk\3771Nk\377"
-  "<Ws\377*BZ\377#+2\377FHJ\377\220\222\225\377\0\0\0\377\0\0\0c\0\0\0\21"
-  "\0\0\0\0\0\0\0!\0\0\0\377\233\254\273\377\207\234\264\377c~\233\377V"
-  "r\220\377Nj\210\377Fb\200\377=Zx\3775Rp\3771Nk\3771Nk\3771Nk\3771Nk\377"
-  "5Rn\3774Kb\377\31$-\377dhk\377mop\3770G]\377\0\0\0\373\0\0\0R\0\0\0\25"
-  "\0\0\0\0\0\0\0\245ep}\377\221\245\274\377q\213\246\377\\x\226\377Tp\216"
-  "\377Kh\206\377C`~\377;Xv\3773Pn\3771Nk\3771Nk\3771Nk\3771Nk\377=Yt\377"
-  ")\77V\377&.3\377WXY\377\213\217\225\377\11\15\21\372\0\0\0\234\0\0\0"
-  "I\0\0\0\17\0\0\0\13\0\0\0\377~\216\237\337\212\237\266\377l\205\241\377"
-  "Xt\222\377Pl\212\377Hd\202\377@\\z\3778Tr\3771Nk\3771Nk\3771Nk\3771N"
-  "k\3771Nk\3775Lc\377\32%0\377HLN\377suv\377C[s\370\0\0\0\364\0\0\0U\0"
-  "\0\0+\0\0\0\7\0\0\0\206uww\377\275\306\323\375\256\276\314\377\247\266"
-  "\306\377\243\262\302\377\236\255\275\377\232\252\271\377\220\240\260"
-  "\377{\217\241\377y\214\237\377y\214\237\377y\214\237\377y\214\237\377"
-  "p\204\231\377Ufy\37725;\377[^a\377\216\223\230\377\12\16\21\372\0\0\0"
-  "\233\0\0\0G\0\0\0\21\0\0\0\1\2\7\11\331\260\272\304\377,>Q\377$6J\377"
-  "$6J\377$6J\377$6J\377$6J\377$6J\377$6J\377$6J\377$6J\377$6J\377$6J\377"
-  "$6J\377+5\77\377^bh\377wxz\377F`z\377\0\0\0\365\0\0\0U\0\0\0*\0\0\0\6"
-  "\0\0\0\0\15\17\21\377\207\223\235\377@AE\377_``\373ttt\377\226\226\226"
-  "\377\261\261\261\377\257\257\260\377\305\305\306\377\316\316\317\377"
-  "\264\273\301\377\274\302\311\377\275\304\312\377\304\313\322\377\313"
-  "\322\331\377\326\332\336\377\220\226\233\377\205\212\217\377\24\33!\371"
-  "\0\0\0\234\0\0\0H\0\0\0\22\0\0\0\1\0\0\0\0\14\16\17\377k{\213\377WWW"
-  "\377}~\200\377\342\344\346\377\342\344\346\377\341\341\341\377\337\337"
-  "\340\377\337\337\340\377\362\362\362\377\375\375\376\377\361\363\365"
-  "\377\361\363\365\377\361\363\365\377\247\250\252\377\262\265\271\377"
-  "imq\377F`z\377\0\1\2\370\0\0\0U\0\0\0*\0\0\0\6\0\0\0\0\0\0\0\0$%'\377"
-  "cr\201\377i|\216\377Tk\203\377E]x\377\326\334\341\377\347\352\355\377"
-  "\355\357\361\377\355\357\362\377\345\346\347\377\336\336\337\377\341"
-  "\341\342\377\341\341\342\377\337\337\340\377\341\342\343\377rz\203\377"
-  "\213\217\224\377\25\33!\367\0\0\0\234\0\0\0I\0\0\0\22\0\0\0\1\0\0\0\0"
-  "\0\0\0\0\0\0\0""9\0\0\0\377\4\6\12\3548J]\363Mbx\351Th\177\357Sj\202"
-  "\377Wo\206\377\207\227\247\377\327\335\341\377\342\346\351\377\351\354"
-  "\356\377\370\371\372\377\370\371\372\377\201\205\212\377\245\247\250"
-  "\377\234\242\250\377\1\2\3\370\0\0\0U\0\0\0*\0\0\0\7\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0&\0\0\0e\0\0\0\276\0\0\0\346\0\0\0\360\0\0\0\363"
-  ";K^\371DVi\371Tg}\367Uk\200\366Vl\203\377\254\270\303\377\334\341\345"
-  "\377\350\353\355\377\237\243\246\377\25\35$\373\0\0\0\234\0\0\0H\0\0"
-  "\0\22\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\17\0\0\0"
-  "\34\0\0\0""4\0\0\0C\0\0\0g\0\0\0\251\0\0\0\344\0\0\0\361\0\0\0\3560>"
-  "M\365=N`\371O_s\372Se{\367Lc|\357\1\3\5\367\0\0\0U\0\0\0+\0\0\0\7\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\12"
-  "\0\0\0\15\0\0\0\20\0\0\0\33\0\0\0""0\0\0\0C\0\0\0_\0\0\0\235\0\0\0\327"
-  "\0\0\0\356\0\0\0\354\0\0\0\347\0\0\0{\0\0\0F\0\0\0\21\0\0\0\1\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\3\0\0\0\10\0\0\0\15\0\0\0\20\0\0\0\30\0\0\0,\0\0\0"
-  "\77\0\0\0H\0\0\0H\0\0\0@\0\0\0\37\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\7\0\0\0\13\0\0\0\16\0"
-  "\0\0\16\0\0\0\14\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_book_green)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_book_green[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_book_green[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0""9\0\0\0\302\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\357\0\0\0\356\0\0\0\346\0\0\0\342\0\0\0w\0\0\0\13\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\21\34\21\377\225"
-  "\276\225\377y\255y\377n\246n\377e\241e\377^\233^\377Y\222Y\377S\212S"
-  "\377O\202O\377O\202O\377O\202O\377O\202O\377O\202O\377R\210R\377CnC\377"
-  "\22\36\22\376\0\0\0.\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\273o\247o\377\214\271\214\377r\251r\377V\216V\377P\204P\377Jz"
-  "J\377CoC\377=e=\377:`:\377:`:\377=e=\377=e=\377AkA\377=e=\3770P0\377"
-  "\26#\26\372\0\0\0N\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22"
-  "\11\17\11\377\227\277\227\377}\260}\377Y\223Y\377T\213T\377M\177M\377"
-  "GuG\377AkA\377;a;\377:`:\377:`:\377:`:\377:`:\377@j@\3773T3\377!6!\377"
-  "\0\0\0^\0\0\0D\0\0\0\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255O\203"
-  "O\377\227\277\227\377q\250q\377W\217W\377P\204P\377K|K\377ErE\377>f>"
-  "\377:`:\377:`:\377:`:\377:`:\377<c<\377@j@\377/N/\377,I,\375\0\0\0\377"
-  "\0\0\0%\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\21\0\0\0\377\227\277\227"
-  "\377~\260~\377[\226[\377U\214U\377N\201N\377HwH\377BmB\377<c<\377:`:"
-  "\377:`:\377;a;\377:`:\377@i@\3773T3\377\30(\30\377\201\201\201\377(B"
-  "(\377\0\0\0F\0\0\0\15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\232O\203O\377\215"
-  "\271\215\377q\250q\377X\221X\377R\207R\377L}L\377FsF\377@i@\377:`:\377"
-  ":`:\377:`:\377:`:\377;a;\377BmB\377/N/\377\35""0\35\376KKK\377\220\220"
-  "\220\377\0\0\0Q\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\20\0\0\0\377\226\277\226"
-  "\375}\260}\377\\\227\\\377V\215V\377O\203O\377IxI\377CnC\377=d=\377:"
-  "`:\377:`:\377:`:\377:`:\377\77h\77\3774V4\377\31*\31\377VVV\366ggg\377"
-  "333\377\0\0\0Q\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\335W\217W\377\214\271\214"
-  "\377r\251r\377Y\222Y\377R\210R\377L~L\377FtF\377@j@\377:`:\377:`:\377"
-  ":`:\377:`:\377:`:\377AkA\3771Q1\377\37""3\37\377HHH\377w\254w\377\0\0"
-  "\0\377\0\0\0c\0\0\0\21\0\0\0\0\0\0\0!\0\0\0\377\226\277\226\377\204\264"
-  "\204\377_\235_\377V\216V\377P\204P\377JzJ\377CoC\377=e=\377:`:\377:`"
-  ":\377:`:\377:`:\377=d=\3778]8\377\32+\32\377ggg\377nnn\3774V4\377\0\0"
-  "\0\373\0\0\0R\0\0\0\25\0\0\0\0\0\0\0\245U\214U\377\220\273\220\377n\246"
-  "n\377[\226[\377U\214U\377N\201N\377HwH\377BmB\377<c<\377:`:\377:`:\377"
-  ":`:\377:`:\377BmB\377/N/\377!6!\377XXX\377t\253t\377\11\17\11\372\0\0"
-  "\0\234\0\0\0I\0\0\0\17\0\0\0\13\0\0\0\377t\247t\337\210\266\210\377h"
-  "\243h\377X\221X\377R\207R\377L}L\377FsF\377@i@\377:`:\377:`:\377:`:\377"
-  ":`:\377:`:\3779^9\377\33.\33\377KKK\377ttt\377EpE\370\0\0\0\364\0\0\0"
-  "U\0\0\0+\0\0\0\7\0\0\0\206Y\222Y\377\272\325\272\375\254\314\254\377"
-  "\243\307\243\377\237\304\237\377\230\300\230\377\223\275\223\377\210"
-  "\266\210\377r\251r\377o\247o\377o\247o\377o\247o\377o\247o\377e\241e"
-  "\377M\177M\377(B(\377^^^\377x\255x\377\11\17\11\372\0\0\0\233\0\0\0G"
-  "\0\0\0\21\0\0\0\1\3\5\3\331\250\312\250\377.L.\377)D)\377)D)\377)D)\377"
-  ")D)\377)D)\377)D)\377)D)\377)D)\377)D)\377)D)\377)D)\377)D)\377'A'\377"
-  "ccc\377xxx\377HwH\377\0\0\0\365\0\0\0U\0\0\0*\0\0\0\6\0\0\0\0\13\22\13"
-  "\377w\254w\3771Q1\377___\373ttt\377\226\226\226\377\261\261\261\377\257"
-  "\257\257\377\305\305\305\377\316\316\316\377\272\272\272\377\302\302"
-  "\302\377\303\303\303\377\313\313\313\377\322\322\322\377\332\332\332"
-  "\377\225\225\225\377m\246m\377\23\37\23\371\0\0\0\234\0\0\0H\0\0\0\22"
-  "\0\0\0\1\0\0\0\0\11\17\11\377\\\230\\\377AkA\377~~~\377\344\344\344\377"
-  "\344\344\344\377\341\341\341\377\337\337\337\377\337\337\337\377\362"
-  "\362\362\377\375\375\375\377\363\363\363\377\363\363\363\377\363\363"
-  "\363\377\250\250\250\377\265\265\265\377mmm\377HwH\377\0\1\0\370\0\0"
-  "\0U\0\0\0*\0\0\0\6\0\0\0\0\0\0\0\0\33.\33\377V\215V\377\\\230\\\377P"
-  "\204P\377FtF\377\333\333\333\377\352\352\352\377\357\357\357\377\357"
-  "\357\357\377\346\346\346\377\336\336\336\377\341\341\341\377\341\341"
-  "\341\377\337\337\337\377\342\342\342\377zzz\377s\252s\377\24\40\24\367"
-  "\0\0\0\234\0\0\0I\0\0\0\22\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0""9\0\0\0\377"
-  "\5\10\5\3548[8\363MxM\351Q\200Q\357O\203O\377R\210R\377\227\227\227\377"
-  "\334\334\334\377\345\345\345\377\353\353\353\377\371\371\371\377\371"
-  "\371\371\377\205\205\205\377\246\246\246\377\213\270\213\377\1\2\1\370"
-  "\0\0\0U\0\0\0*\0\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\0\0\0e"
-  "\0\0\0\276\0\0\0\346\0\0\0\360\0\0\0\3639]9\371AjA\371O\200O\367Q\203"
-  "Q\366Q\206Q\377\245\310\245\377\340\340\340\377\352\352\352\377\213\270"
-  "\213\377\25\"\25\373\0\0\0\234\0\0\0H\0\0\0\22\0\0\0\1\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\17\0\0\0\34\0\0\0""4\0\0\0C\0\0\0g\0"
-  "\0\0\251\0\0\0\344\0\0\0\361\0\0\0\356/L/\365;a;\371HvH\372M}M\367Lz"
-  "L\357\2\3\2\367\0\0\0U\0\0\0+\0\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\12\0\0\0\15\0\0\0\20\0\0\0\33"
-  "\0\0\0""0\0\0\0C\0\0\0_\0\0\0\235\0\0\0\327\0\0\0\356\0\0\0\354\0\0\0"
-  "\347\0\0\0{\0\0\0F\0\0\0\21\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0"
-  "\10\0\0\0\15\0\0\0\20\0\0\0\30\0\0\0,\0\0\0\77\0\0\0H\0\0\0H\0\0\0@\0"
-  "\0\0\37\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\2\0\0\0\7\0\0\0\13\0\0\0\16\0\0\0\16\0\0\0\14\0\0\0\5\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_book_open)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_book_open[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_book_open[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3OOOD\0\0\0\377\4\5\6"
-  "\377\0\0\0;\0\0\0\20\0\0\0\6\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\3NNNE\13\17\22\377\225\237\252\377\303\306"
-  "\312\356\0\0\0\377\0\0\0&\0\0\0\22\0\0\0\5\0\0\0\1\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0.\13\17\22\377\202\220\236\377\361\361"
-  "\361\377\325\327\330\377\12\15\20\377\0\0\0_\0\0\0\40\0\0\0\13\0\0\0"
-  "\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0.\21\27\34\377\206\223\240"
-  "\377\357\360\360\377\336\336\336\377\325\325\325\377\233\237\244\324"
-  "\0\0\0\377\0\0\0/\0\0\0\24\0\0\0\5\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0"
-  ".\16\23\27\377\205\222\237\377\357\360\360\377\333\333\333\377\312\312"
-  "\312\377\310\310\310\377\310\311\312\377\14\17\23\377\0\0\0[\0\0\0\40"
-  "\0\0\0\13\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0.\24\32\40\377y\210\225\370\361\361"
-  "\361\377\325\325\325\377\312\312\312\377\322\322\322\377\303\303\303"
-  "\377\315\315\315\377ty~\275\0\0\0\377\0\0\0-\0\0\0\24\0\0\0\6\0\0\0\2"
-  "\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0-\27\37&\377\177\215\232\361\357\360\360\377\332\332\332\377\323\323"
-  "\323\377\304\304\304\377\316\316\316\377\300\300\300\377\312\312\312"
-  "\377\261\261\261\336\15\21\25\377\0\0\0Y\0\0\0#\0\0\0\22\0\0\0\14\0\0"
-  "\0\12\0\0\0\12\0\0\0\12\0\0\0\11\0\0\0\7\0\0\0\4\0\0\0\1\0\0\0\0\0\0"
-  "\0\377v\205\222\350\356\357\357\377\331\331\331\377\323\323\323\377\320"
-  "\320\320\377\302\302\302\377\313\313\313\377\311\311\311\377\274\274"
-  "\274\377\244\247\251\344hkl\351333\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\352\0\0\0\177\0\0\0=\0\0\0\20\0\0\0\6\0\0"
-  "\0\1AO]\377\255\265\274\363\352\352\352\377\322\322\322\377\277\277\277"
-  "\377\315\315\315\377\313\313\313\377\275\275\275\377\306\306\306\377"
-  "\265\266\267\365\211\220\226\370\270\270\270\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377@AB\342\0\0\0\177\0\0\0%\0\0\0\20\0\0\0\4\0\0"
-  "\0\377M`t\340\353\353\353\377\321\321\321\377\303\303\303\377\301\301"
-  "\301\377\310\310\310\377\267\267\267\377\303\303\303\377\227\237\247"
-  "\347\241\243\244\376\374\375\375\377\363\364\364\377\353\354\355\377"
-  "\352\353\354\377\351\352\353\377\356\357\361\377\366\367\370\377\344"
-  "\345\346\376\222\223\225\375\0\0\0\377\0\0\0""9\0\0\0\33\0\0\0\7\0\0"
-  "\0=2AO\377\214\230\242\362\347\347\347\377\311\311\311\377\273\273\273"
-  "\377\304\304\304\377\302\302\302\377\244\247\253\346\223\226\231\375"
-  "\327\330\330\377\374\375\375\377\372\374\374\377\371\372\373\377\370"
-  "\371\372\377\367\370\371\377\365\366\370\377\367\367\371\377\306\307"
-  "\307\377O^j\375\0\0\0\360\0\0\0B\0\0\0\37\0\0\0\11\0\0\0\23\0\0\0\377"
-  "L_r\340\350\350\350\377\306\306\306\377\276\276\276\377\270\270\270\377"
-  "\265\265\266\361\227\236\244\356\250\250\250\377\375\376\376\377\365"
-  "\366\366\377\347\351\351\377\353\354\355\377\352\353\354\377\360\361"
-  "\362\377\370\371\372\377\340\342\343\377\217\226\235\376\25\34\"\377"
-  "\0\0\0\201\0\0\0>\0\0\0\34\0\0\0\10\0\0\0\13\0\0\0A5DS\377\215\231\242"
-  "\363\343\343\343\377\301\301\301\377\276\276\276\377\216\224\232\316"
-  "\235\237\237\376\377\377\377\377\375\376\376\377\374\375\375\377\372"
-  "\374\374\377\362\363\364\377\361\362\363\377\367\370\371\377\366\366"
-  "\367\377\246\250\253\377s\177\212\376\4\5\6\377\0\0\0P\0\0\0""1\0\0\0"
-  "\24\0\0\0\5\0\0\0\5\0\0\0\24\0\0\0\377K_q\340\345\345\345\377\301\301"
-  "\301\377\236\237\240\326\227\231\233\375\331\331\331\377\377\377\377"
-  "\377\347\350\350\377\356\357\357\377\364\365\365\377\371\372\373\377"
-  "\370\371\372\377\373\373\373\377\330\330\332\377\223\233\243\377\17\24"
-  "\30\377\0\0\0t\0\0\0B\0\0\0\"\0\0\0\14\0\0\0\3\0\0\0\2\0\0\0\13\0\0\0"
-  "A9IW\377\202\217\227\360\333\333\333\370\212\216\222\347\264\264\264"
-  "\377\377\377\377\377\377\377\377\377\375\376\376\377\365\366\366\377"
-  "\354\356\356\377\346\347\350\377\372\372\373\377\365\365\367\377\256"
-  "\262\266\377\\l|\377\0\0\0\377\0\0\0P\0\0\0""1\0\0\0\25\0\0\0\6\0\0\0"
-  "\1\0\0\0\0\0\0\0\5\0\0\0\24\0\0\0\377J]p\336\273\273\273\321\253\253"
-  "\253\377\377\377\377\377\370\370\370\377\361\361\361\377\357\360\360"
-  "\377\374\375\375\377\372\373\373\377\371\372\373\377\373\374\374\377"
-  "\336\341\343\377\235\246\256\377\12\15\20\377\0\0\0t\0\0\0A\0\0\0\"\0"
-  "\0\0\13\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\13\0\0\0A$/:\377imq\346"
-  "wxy\377\362\363\363\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\360\360\360\377\363\363\363\377\373\374\374\377\371\371\372\377\273"
-  "\277\304\377Vgy\377\0\0\0\377\0\0\0P\0\0\0""1\0\0\0\25\0\0\0\6\0\0\0"
-  "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\24\0\0\0\377J_t\3701>K\376\263"
-  "\275\306\375\321\327\335\377\331\336\343\377\366\367\367\377\365\365"
-  "\365\377\377\377\377\377\377\377\377\377\321\322\324\377\232\243\254"
-  "\377\4\5\6\377\0\0\0t\0\0\0A\0\0\0!\0\0\0\13\0\0\0\2\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\13\0\0\0""7\0\0\0\256+4<\366)2;\377O_"
-  "p\377^q\204\376\221\236\253\375\237\253\266\375\277\307\320\377\350\354"
-  "\356\377\262\270\276\377q}\210\376\0\0\0\377\0\0\0P\0\0\0""1\0\0\0\25"
-  "\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0"
-  "\0\22\0\0\0&\0\0\0:\0\0\0Y\0\0\0\200\0\0\0\301%-5\377Qar\377Vgy\375z"
-  "\206\225\375v\205\224\374\0\0\0\377\0\0\0r\0\0\0\77\0\0\0!\0\0\0\13\0"
-  "\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0"
-  "\6\0\0\0\20\0\0\0\34\0\0\0%\0\0\0-\0\0\0""8\0\0\0X\0\0\0\200\0\0\0\275"
-  ",4=\377!'.\377\0\0\0p\0\0\0D\0\0\0*\0\0\0\23\0\0\0\5\0\0\0\1\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0"
-  "\0\10\0\0\0\14\0\0\0\21\0\0\0\31\0\0\0\"\0\0\0,\0\0\0""7\0\0\0A\0\0\0"
-  "C\0\0\0;\0\0\0)\0\0\0\26\0\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2"
-  "\0\0\0\4\0\0\0\6\0\0\0\13\0\0\0\20\0\0\0\30\0\0\0\37\0\0\0\40\0\0\0\33"
-  "\0\0\0\21\0\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\1\0\0\0\2\0\0\0\4\0\0\0\6\0\0\0\10\0\0\0\11\0\0\0\7\0\0\0\4"
-  "\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_book_red)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_book_red[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_book_red[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0""9\0\0\0\302\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\357\0\0\0\356\0\0\0\346\0\0\0\342\0\0\0w\0\0\0\13\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\37\21\16\377\310"
-  "\225\213\377\272ym\377\264n`\377\260fW\377\252^O\377\240YK\377\226SF"
-  "\377\216OC\377\216OC\377\216OC\377\216OC\377\216OC\377\225RF\377xC8\377"
-  "!\22\17\376\0\0\0.\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\273\265pb\377\303\214\201\377\266re\377\234WI\377\221PD\377\206"
-  "J>\377zD9\377o>4\377i;1\377i;1\377o>4\377o>4\377vA7\377o>4\377X0)\377"
-  "'\26\22\372\0\0\0N\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22"
-  "\21\11\10\377\311\227\215\377\274}q\377\241ZK\377\230TG\377\214MA\377"
-  "\201G<\377vA7\377k;2\377i;1\377i;1\377i;1\377i;1\377tA6\377\\3+\377;"
-  "!\33\377\0\0\0^\0\0\0D\0\0\0\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\255\217OC\377\311\227\215\377\265qc\377\235WI\377\221PD\377\210K\77"
-  "\377|E:\377p>4\377i;1\377i;1\377i;1\377i;1\377l<3\377tA6\377U/(\377O"
-  ",%\375\0\0\0\377\0\0\0%\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\21\0\0"
-  "\0\377\311\227\215\377\275~r\377\244[L\377\231UH\377\215NB\377\202H<"
-  "\377wB8\377l<3\377i;1\377i;1\377k;2\377i;1\377s@6\377\\3+\377,\30\24"
-  "\377\201\201\201\377I(\"\377\0\0\0F\0\0\0\15\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\232\217OC\377\304\215\202\377\265qc\377\237XJ\377\223RE\377\211"
-  "L@\377~F;\377s@6\377i;1\377i;1\377i;1\377i;1\377k;2\377wB8\377U/(\377"
-  "4\35\30\376KKK\377\220\220\220\377\0\0\0Q\0\0\0\20\0\0\0\0\0\0\0\0\0"
-  "\0\0\20\0\0\0\377\310\226\214\375\274}q\377\245\\M\377\232VH\377\217"
-  "OC\377\203I=\377xC8\377m=3\377i;1\377i;1\377i;1\377i;1\377q\77""5\377"
-  "_4,\377-\31\25\377VVV\366ggg\377333\377\0\0\0Q\0\0\0\20\0\0\0\0\0\0\0"
-  "\0\0\0\0\335\235WI\377\303\214\201\377\266re\377\240YK\377\225RF\377"
-  "\212L@\377\177G;\377tA6\377i;1\377i;1\377i;1\377i;1\377i;1\377vA7\377"
-  "Y1)\3778\37\32\377HHH\377\270wj\377\0\0\0\377\0\0\0c\0\0\0\21\0\0\0\0"
-  "\0\0\0!\0\0\0\377\310\226\214\377\300\205y\377\254`P\377\234WI\377\221"
-  "PD\377\206J>\377zD9\377o>4\377i;1\377i;1\377i;1\377i;1\377m=3\377f8/"
-  "\377/\32\26\377ggg\377nnn\377_4,\377\0\0\0\373\0\0\0R\0\0\0\25\0\0\0"
-  "\0\0\0\0\245\231UH\377\305\220\205\377\264n`\377\244[L\377\231UH\377"
-  "\215NB\377\202H<\377wB8\377l<3\377i;1\377i;1\377i;1\377i;1\377wB8\377"
-  "U/(\377;!\33\377XXX\377\267tg\377\21\11\10\372\0\0\0\234\0\0\0I\0\0\0"
-  "\17\0\0\0\13\0\0\0\377\262th\337\302\210}\377\261hY\377\237XJ\377\223"
-  "RE\377\211L@\377~F;\377s@6\377i;1\377i;1\377i;1\377i;1\377i;1\377g90"
-  "\3772\33\27\377KKK\377ttt\377zE:\370\0\0\0\364\0\0\0U\0\0\0+\0\0\0\7"
-  "\0\0\0\206\240YK\377\333\272\264\375\324\254\244\377\320\243\233\377"
-  "\315\237\226\377\312\231\217\377\307\224\211\377\302\210}\377\266re\377"
-  "\265pb\377\265pb\377\265pb\377\265pb\377\260fW\377\214MA\377I(\"\377"
-  "^^^\377\271xk\377\21\11\10\372\0\0\0\233\0\0\0G\0\0\0\21\0\0\0\1\6\3"
-  "\3\331\322\250\240\377T.'\377J)#\377J)#\377J)#\377J)#\377J)#\377J)#\377"
-  "J)#\377J)#\377J)#\377J)#\377J)#\377J)#\377G'!\377ccc\377xxx\377\202H"
-  "<\377\0\0\0\365\0\0\0U\0\0\0*\0\0\0\6\0\0\0\0\24\13\11\377\270wj\377"
-  "Y1)\377___\373ttt\377\226\226\226\377\261\261\261\377\257\257\257\377"
-  "\305\305\305\377\316\316\316\377\272\272\272\377\302\302\302\377\303"
-  "\303\303\377\313\313\313\377\322\322\322\377\332\332\332\377\225\225"
-  "\225\377\264m_\377\"\23\20\371\0\0\0\234\0\0\0H\0\0\0\22\0\0\0\1\0\0"
-  "\0\0\21\11\10\377\247]N\377vA7\377~~~\377\344\344\344\377\344\344\344"
-  "\377\341\341\341\377\337\337\337\377\337\337\337\377\362\362\362\377"
-  "\375\375\375\377\363\363\363\377\363\363\363\377\363\363\363\377\250"
-  "\250\250\377\265\265\265\377mmm\377\202H<\377\1\0\0\370\0\0\0U\0\0\0"
-  "*\0\0\0\6\0\0\0\0\0\0\0\0""2\33\27\377\232VH\377\247]N\377\221PD\377"
-  "\177G;\377\333\333\333\377\352\352\352\377\357\357\357\377\357\357\357"
-  "\377\346\346\346\377\336\336\336\377\341\341\341\377\341\341\341\377"
-  "\337\337\337\377\342\342\342\377zzz\377\267sf\377$\24\21\367\0\0\0\234"
-  "\0\0\0I\0\0\0\22\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0""9\0\0\0\377\11\5\4\354"
-  "c80\363\203MB\351\214QE\357\217OC\377\225RF\377\227\227\227\377\334\334"
-  "\334\377\345\345\345\377\353\353\353\377\371\371\371\377\371\371\371"
-  "\377\205\205\205\377\246\246\246\377\303\213\200\377\2\1\1\370\0\0\0"
-  "U\0\0\0*\0\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\0\0\0e\0\0\0"
-  "\276\0\0\0\346\0\0\0\360\0\0\0\363f:1\371sA7\371\214OC\367\217QE\366"
-  "\222QD\377\320\245\234\377\340\340\340\377\352\352\352\377\303\213\200"
-  "\377%\25\21\373\0\0\0\234\0\0\0H\0\0\0\22\0\0\0\1\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\6\0\0\0\17\0\0\0\34\0\0\0""4\0\0\0C\0\0\0g\0\0\0\251"
-  "\0\0\0\344\0\0\0\361\0\0\0\356S/(\365j;2\371\201I=\372\211MB\367\205"
-  "LA\357\3\2\1\367\0\0\0U\0\0\0+\0\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\12\0\0\0\15\0\0\0\20\0\0\0\33"
-  "\0\0\0""0\0\0\0C\0\0\0_\0\0\0\235\0\0\0\327\0\0\0\356\0\0\0\354\0\0\0"
-  "\347\0\0\0{\0\0\0F\0\0\0\21\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0"
-  "\10\0\0\0\15\0\0\0\20\0\0\0\30\0\0\0,\0\0\0\77\0\0\0H\0\0\0H\0\0\0@\0"
-  "\0\0\37\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\2\0\0\0\7\0\0\0\13\0\0\0\16\0\0\0\16\0\0\0\14\0\0\0\5\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_book_yellow)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_book_yellow[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_book_yellow[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0""9\0\0\0\302\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\357\0\0\0\356\0\0\0\346\0\0\0\342\0\0\0w\0\0\0\13\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32(\40\5\377\352\315"
-  "i\377\344\300C\377\342\2733\377\341\267&\377\333\261\36\377\317\247\34"
-  "\377\303\235\32\377\270\224\31\377\270\224\31\377\270\224\31\377\270"
-  "\224\31\377\270\224\31\377\301\234\32\377\234~\25\377*\"\6\376\0\0\0"
-  ".\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\273\343\274"
-  "4\377\350\311]\377\343\2758\377\312\243\33\377\273\227\32\377\255\214"
-  "\30\377\236\177\25\377\220t\23\377\211n\22\377\211n\22\377\220t\23\377"
-  "\220t\23\377\230{\25\377\220t\23\377r\\\17\3771(\7\372\0\0\0N\0\0\0\20"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\26\22\3\377\352\316m\377\345"
-  "\302H\377\321\250\34\377\304\236\33\377\264\222\31\377\246\206\27\377"
-  "\230{\25\377\212p\23\377\211n\22\377\211n\22\377\211n\22\377\211n\22"
-  "\377\227y\24\377w`\20\377M>\12\377\0\0\0^\0\0\0D\0\0\0\16\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\255\272\226\31\377\352\316m\377\343\2746\377"
-  "\313\244\34\377\273\227\32\377\257\215\30\377\241\202\26\377\221u\24"
-  "\377\211n\22\377\211n\22\377\211n\22\377\211n\22\377\214q\23\377\227"
-  "y\24\377nY\17\377fR\16\375\0\0\0\377\0\0\0%\0\0\0\5\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\21\0\0\0\377\352\316m\377\345\303J\377\324\253\35\377\306"
-  "\240\33\377\266\223\31\377\250\210\27\377\232|\25\377\214q\23\377\211"
-  "n\22\377\211n\22\377\212p\23\377\211n\22\377\225x\24\377w`\20\3779.\10"
-  "\377\201\201\201\377^L\15\377\0\0\0F\0\0\0\15\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\232\272\226\31\377\350\312_\377\343\2746\377\315\245\34\377\277"
-  "\232\32\377\261\217\30\377\243\203\26\377\225x\24\377\211n\22\377\211"
-  "n\22\377\211n\22\377\211n\22\377\212p\23\377\232|\25\377nY\17\377C6\11"
-  "\376KKK\377\220\220\220\377\0\0\0Q\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\20"
-  "\0\0\0\377\351\315k\375\345\302H\377\326\255\35\377\310\241\33\377\272"
-  "\226\31\377\252\211\27\377\234~\25\377\216r\23\377\211n\22\377\211n\22"
-  "\377\211n\22\377\211n\22\377\223w\24\377zc\21\377;0\10\377VVV\366ggg"
-  "\377333\377\0\0\0Q\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\335\313\244\34\377"
-  "\350\311]\377\343\2758\377\317\247\34\377\301\234\32\377\263\220\30\377"
-  "\245\205\26\377\227y\24\377\211n\22\377\211n\22\377\211n\22\377\211n"
-  "\22\377\211n\22\377\230{\25\377s]\20\377I;\12\377HHH\377\344\277\77\377"
-  "\0\0\0\377\0\0\0c\0\0\0\21\0\0\0\0\0\0\0!\0\0\0\377\352\316k\377\347"
-  "\306R\377\337\264\36\377\312\243\33\377\273\227\32\377\255\214\30\377"
-  "\236\177\25\377\220t\23\377\211n\22\377\211n\22\377\211n\22\377\211n"
-  "\22\377\216r\23\377\203j\22\377=1\10\377ggg\377nnn\377zc\21\377\0\0\0"
-  "\373\0\0\0R\0\0\0\25\0\0\0\0\0\0\0\245\306\240\33\377\351\313b\377\342"
-  "\2733\377\324\253\35\377\306\240\33\377\266\223\31\377\250\210\27\377"
-  "\232|\25\377\214q\23\377\211n\22\377\211n\22\377\211n\22\377\211n\22"
-  "\377\232|\25\377nY\17\377M>\12\377XXX\377\344\276;\377\25\21\3\372\0"
-  "\0\0\234\0\0\0I\0\0\0\17\0\0\0\13\0\0\0\377\326\266D\337\347\307X\377"
-  "\341\270*\377\315\245\34\377\277\232\32\377\261\217\30\377\243\203\26"
-  "\377\225x\24\377\211n\22\377\211n\22\377\211n\22\377\211n\22\377\211"
-  "n\22\377\205k\22\377A4\10\377KKK\377ttt\377\234\177\30\370\0\0\0\364"
-  "\0\0\0U\0\0\0+\0\0\0\7\0\0\0\206\317\247\34\377\360\336\236\375\356\330"
-  "\213\377\355\324~\377\354\322w\377\353\317n\377\352\314g\377\347\307"
-  "X\377\343\2758\377\343\2744\377\343\2744\377\343\2744\377\343\2744\377"
-  "\341\267&\377\264\222\31\377^L\15\377^^^\377\344\300A\377\25\21\3\372"
-  "\0\0\0\233\0\0\0G\0\0\0\21\0\0\0\1\7\6\1\331\356\326\205\377lW\17\377"
-  "`N\15\377`N\15\377`N\15\377`N\15\377`N\15\377`N\15\377`N\15\377`N\15"
-  "\377`N\15\377`N\15\377`N\15\377`N\15\377]K\14\377ccc\377xxx\377\250\210"
-  "\27\377\0\0\0\365\0\0\0U\0\0\0*\0\0\0\6\0\0\0\0\32\25\3\377\344\277\77"
-  "\377s]\20\377___\373ttt\377\226\226\226\377\261\261\261\377\257\257\257"
-  "\377\305\305\305\377\316\316\316\377\272\272\272\377\302\302\302\377"
-  "\303\303\303\377\313\313\313\377\322\322\322\377\332\332\332\377\225"
-  "\225\225\377\342\2721\377,#\6\371\0\0\0\234\0\0\0H\0\0\0\22\0\0\0\1\0"
-  "\0\0\0\26\22\3\377\330\256\35\377\230{\25\377~~~\377\344\344\344\377"
-  "\344\344\344\377\341\341\341\377\337\337\337\377\337\337\337\377\362"
-  "\362\362\377\375\375\375\377\363\363\363\377\363\363\363\377\363\363"
-  "\363\377\250\250\250\377\265\265\265\377mmm\377\250\210\27\377\1\1\0"
-  "\370\0\0\0U\0\0\0*\0\0\0\6\0\0\0\0\0\0\0\0A4\10\377\310\241\33\377\330"
-  "\256\35\377\273\227\32\377\245\205\26\377\333\333\333\377\352\352\352"
-  "\377\357\357\357\377\357\357\357\377\346\346\346\377\336\336\336\377"
-  "\341\341\341\377\341\341\341\377\337\337\337\377\342\342\342\377zzz\377"
-  "\343\275:\377-%\7\367\0\0\0\234\0\0\0I\0\0\0\22\0\0\0\1\0\0\0\0\0\0\0"
-  "\0\0\0\0""9\0\0\0\377\13\10\1\354~e\25\363\243\206!\351\260\220\40\357"
-  "\272\226\31\377\301\234\32\377\227\227\227\377\334\334\334\377\345\345"
-  "\345\377\353\353\353\377\371\371\371\377\371\371\371\377\205\205\205"
-  "\377\246\246\246\377\350\310[\377\2\2\0\370\0\0\0U\0\0\0*\0\0\0\7\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\0\0\0e\0\0\0\276\0\0\0\346\0\0\0"
-  "\360\0\0\0\363\202i\24\371\224w\26\371\262\220\35\367\266\224\36\366"
-  "\275\231\32\377\355\325\200\377\340\340\340\377\352\352\352\377\350\310"
-  "[\3770&\6\373\0\0\0\234\0\0\0H\0\0\0\22\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\6\0\0\0\17\0\0\0\34\0\0\0""4\0\0\0C\0\0\0g\0\0\0\251"
-  "\0\0\0\344\0\0\0\361\0\0\0\356iU\21\365\207n\25\371\245\206\31\372\257"
-  "\215\33\367\250\211\36\357\4\3\0\367\0\0\0U\0\0\0+\0\0\0\7\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\12\0\0\0"
-  "\15\0\0\0\20\0\0\0\33\0\0\0""0\0\0\0C\0\0\0_\0\0\0\235\0\0\0\327\0\0"
-  "\0\356\0\0\0\354\0\0\0\347\0\0\0{\0\0\0F\0\0\0\21\0\0\0\1\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\3\0\0\0\10\0\0\0\15\0\0\0\20\0\0\0\30\0\0\0,\0\0\0\77"
-  "\0\0\0H\0\0\0H\0\0\0@\0\0\0\37\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\7\0\0\0\13\0\0\0\16\0\0"
-  "\0\16\0\0\0\14\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_line_in)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_line_in[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_line_in[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0-..\257###\377\10\10\10x\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\25\25\25\377\345\345\346\377###\377\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0fff\315\356\356\356\377MMM\217\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\2\2\2\337\277\277\277\377\3\3\3\325\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\33\0\0\0i\0\0\0s\0\0\0_\0\0"
-  "\0=\0\0\0!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\21"
-  "\21\22\377\354\354\355\377\22\22\22\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0\0\0\262\216\216\216\260\210\210\210"
-  "\233TTT\210$$$v\0\0\0b\0\0\0F\0\0\0&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0$$%\243\273\273\273\377\0\0\0O\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\212lll\326\316\316\316\311\245\245\245\274\0"
-  "\0\0\242\0\0\0\214\0\0\0v\0\0\0U\0\0\0;\0\0\0+\0\0\0\"\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\377\352\352\352\377\0\0\0\377\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230mmm\347\316\316\316\345\10\10\10"
-  "\313\10\10\10\231\0\0\0G\0\0\0=\0\0\0""1\0\0\0:\0\0\0""2\0\0\0#\0\0\0"
-  "\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377RRR\377\332\332\334\377===\377\0"
-  "\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\343\265\265\265\363KK"
-  "K\351\0\0\0M\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\33"
-  "\0\0\0\35\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\373\373\373\377\234\233"
-  "\234\377\324\324\324\377\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\231"
-  "GGG\361\244\244\244\365\0\0\0\242\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\31\0\0\0\0\0\0\0\0\0\0\0\377\221\221"
-  "\221\377===\377===\377\36\36\36\377\77\77\77\377\0\0\0\377\0\0\0\0\0"
-  "\0\0\0\0\0\0\331___\367###\362\0\0\0B\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\377\221"
-  "\221\221\377===\377===\377\36\36\36\377BBB\377\0\0\0\377\0\0\0\0\0\0"
-  "\0\0\0\0\0\342SSS\355\0\0\0\353\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
-  "\221\221\221\377===\377===\377\36\36\36\377BBB\377\0\0\0\377\0\0\0\0"
-  "\0\0\0\0\0\0\0\330SSS\353\0\0\0\355\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\377\221\221\221\377===\377===\377\36\36\36\377BBB\377\0\0\0\377\0\0"
-  "\0\0\0\0\0\0\0\0\0\262'''\332\"\"\"\367\0\0\0<\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\377\221\221\221\377===\377===\377\36\36\36\377BBB\377\0\0\0\377"
-  "\0\0\0\0\0\0\0\0\0\0\0D\0\0\0\315UUU\362\0\0\0\313\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\377\221\221\221\377===\377===\377\36\36\36\377EEE\377\0\0\0"
-  "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\241LLL\322FFF\336\0\0\0\234\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\377AAA\377ddd\377%%%\377,,,\377<<<\377\0\0\0\377\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\35\0\0\0\236XXX\257FFF\273\0\0\0q\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\377\25\25\25\377\7\7\7\377(((\377\0\0\0\377\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0""9\0\0\0\205ZZZ\233\0\0\0\236\0\0\0b\0\0"
-  "\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\377+++\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0cXXX{\0\0\0{\0\0\0""3\0\0\0%\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\324"
-  "+++\324\0\0\0\324\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0""7\0\0\0T\0\0\0_\0\0\0^\0\0\0#\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252+++\252\0\0\0\252"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\13\0\0\0@\0\0\0F\0\0\0J\0\0\0""2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\177+++\177\0\0\0\177\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""1"
-  "\0\0\0:\7\7\7@\0\0\0,\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0U+++U\0\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\27\0\0\0/\0\0\0""2\10\10\10""5\0"
-  "\0\0+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0*+++*\0\0\0*\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\23\0\0\0""0\0\0\0-\14\14\14-\0\0\0+\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_mail)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_mail[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_mail[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2"
-  "\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0"
-  "\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\1\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0f\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0m\0"
-  "\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\377SSS\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377"
-  "\375\375\375\377\374\374\374\377\373\373\373\377\371\371\371\377\370"
-  "\370\370\377\367\367\367\377\366\366\366\377\365\365\365\377\364\364"
-  "\364\377\343\343\343\377SSS\377\0\0\0\377\0\0\0\31\0\0\0\10\0\0\0\1\0"
-  "\0\0\0\0\0\0\2\0\0\0\377\356\356\356\377OOO\377\377\377\377\377\365\365"
-  "\365\377\364\364\364\377\363\363\363\377\362\362\362\377\362\362\362"
-  "\377\361\361\361\377\360\360\360\377\360\360\360\377\357\357\357\377"
-  "\356\356\356\377\355\355\355\377\343\343\343\377OOO\377\256\256\256\377"
-  "\0\0\0\377\0\0\0(\0\0\0\17\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377"
-  "\377\377\344\344\344\377CCC\377\375\375\375\377\363\363\363\377\362\362"
-  "\362\377\362\362\362\377\361\361\361\377\360\360\360\377\357\357\357"
-  "\377\356\356\356\377\356\356\356\377\355\355\355\377\343\343\343\377"
-  "OOO\377\254\254\254\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0"
-  "\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\344\344"
-  "\344\377OOO\377\373\373\373\377\361\361\361\377\360\360\360\377\360\360"
-  "\360\377\357\357\357\377\356\356\356\377\355\355\355\377\355\355\355"
-  "\377\343\343\343\377CCC\377\240\240\240\377\324\324\324\377\310\310\310"
-  "\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377"
-  "\377\377\377\373\373\373\377\365\365\365\377\344\344\344\377CCC\377\370"
-  "\370\370\377\360\360\360\377\357\357\357\377\356\356\356\377\355\355"
-  "\355\377\354\354\354\377\343\343\343\377OOO\377\225\225\225\377\324\324"
-  "\324\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0"
-  "\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\365"
-  "\365\365\377\365\365\365\377\344\344\344\377>>>\377\365\365\365\377\356"
-  "\356\356\377\355\355\355\377\354\354\354\377\343\343\343\377MMM\377\201"
-  "\201\201\377\306\306\306\377\344\344\344\377\344\344\344\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377"
-  "\377\377\377\377\373\373\373\377\365\365\365\377\365\365\365\377\344"
-  "\344\344\377jjj\377CCC\377\363\363\363\377\354\354\354\377\343\343\343"
-  "\377OOO\377jjj\377\306\306\306\377\306\306\306\377\365\365\365\377\344"
-  "\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0"
-  "\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\365\365\365\377"
-  "\344\344\344\377ccc\377\377\377\377\377\271\271\271\377OOO\377\360\360"
-  "\360\377OOO\377\225\225\225\377\306\306\306\377sss\377\306\306\306\377"
-  "\365\365\365\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0"
-  "\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373\373\377"
-  "\344\344\344\377ccc\377\377\377\377\377\365\365\365\377\344\344\344\377"
-  "\324\324\324\377OOO\377\254\254\254\377\306\306\306\377\344\344\344\377"
-  "\344\344\344\377|||\377\344\344\344\377\344\344\344\377\310\310\310\377"
-  "\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377"
-  "\377\377\344\344\344\377sss\377\377\377\377\377\365\365\365\377\365\365"
-  "\365\377\365\365\365\377\365\365\365\377\344\344\344\377\344\344\344"
-  "\377\365\365\365\377\365\365\365\377\365\365\365\377\344\344\344\377"
-  "|||\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0"
-  "\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377|||\377\377\377\377\377"
-  "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344"
-  "\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344"
-  "\344\377\344\344\344\377\344\344\344\377\344\344\344\377|||\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377"
-  "sss\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377"
-  "\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274"
-  "\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274"
-  "\274\377\274\274\274\377\274\274\274\377ccc\377\0\0\0\377\0\0\0-\0\0"
-  "\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0m\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\207\0\0\0(\0\0\0\17\0\0\0\2\0\0\0\0\0\0\0\1\0\0\0\10\0\0\0\31"
-  "\0\0\0(\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0"
-  "-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0(\0\0\0\31\0\0\0\10"
-  "\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\10\0\0\0\16\0\0\0\21\0\0\0\21"
-  "\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0"
-  "\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\16\0\0\0\10\0"
-  "\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0"
-  "\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0"
-  "\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_mail_compose)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_mail_compose[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_mail_compose[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\321\257"
-  "a\377\361\343\254\377\373\251\17\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\265\265"
-  "\265\377\240k\11\377\361\343\254\377\373\251\17\377\201`\0\377\0\0\0"
-  "\377\340\340\340\377\301\301\301\377\0\0\0\377\0\0\0D\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\364\364\364\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\375\375\375\377\375\375\375\377\0\0\0\377\346\303p\377\361\323\207\377"
-  "\325\217\14\377\0\0\0\377\262\262\262\377\303\303\303\377\373\373\373"
-  "\377\250\250\250\377\0\0\0\377\0\0\0V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
-  "\377\377\377\377\366\366\366\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\375\375\375\377\375\375\375\377\375\375\375\377\263\263"
-  "\263\377\240k\11\377\361\343\254\377\373\251\17\377\201`\0\377\0\0\0"
-  "\377\372\372\372\377\255\255\255\377vvv\377]]]\377@@@\377\0\0\0\377\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\366\366\366\377\377"
-  "\377\377\377\373\373\373\377\373\373\373\377\373\373\373\377\373\373"
-  "\373\377\370\370\370\377\0\0\0\377\346\303p\377\361\320~\377\325\217"
-  "\14\377\0\0\0\377\254\254\254\377\370\370\366\377\342\342\342\377\205"
-  "\205\205\377KKI\377\26\26\26\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\377\377\377\377\377\364\364\364\377\375\375\375\377\375\375\375"
-  "\377\373\373\373\377\373\373\373\377\373\373\372\377}}}\377\240k\11\377"
-  "\361\343\254\377\373\251\17\377\201`\0\377\0\0\0\377\364\364\364\377"
-  "\362\362\362\377\360\360\360\377\357\357\357\377\325\325\325\377\255"
-  "\255\255\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377"
-  "\377\362\362\362\377\371\371\371\377\366\366\366\377\366\366\366\377"
-  "\366\366\363\377\363\363\363\377\0\0\0\377\346\303p\377\361\320~\377"
-  "\325\217\14\377\0\0\0\377\207\207\206\377\345\345\345\377\342\342\342"
-  "\377\337\337\337\377\353\353\353\377\342\342\342\377\301\301\301\377"
-  "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\360\360"
-  "\360\377\370\370\370\377\370\370\370\377\370\370\370\377\370\370\366"
-  "\377\256\256\256\377{S\7\377\361\343\254\377\373\251\17\377\201`\0\377"
-  "\0\0\0\377\355\355\355\377\353\353\353\377\353\353\351\377\351\351\347"
-  "\377\351\351\347\377\340\340\336\377\277\277\277\377\0\0\0\377\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\357\357\357\377\363\363"
-  "\363\377\360\360\360\377\360\360\355\377\355\355\355\377\0\0\0\377\346"
-  "\303p\377\361\322\204\377\312\207\13\377\0\0\0\377\236\236\234\377\334"
-  "\334\331\377\331\331\331\377\331\331\326\377\326\326\324\377\345\345"
-  "\344\377\331\331\327\377\272\272\272\377\0\0\0\377\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\377\377\377\377\377\355\355\355\377\364\364\364\377\364"
-  "\364\364\377\362\362\362\377\252\252\252\377\240k\11\377\361\343\254"
-  "\377\373\251\17\377\201`\0\377\0\0\0\377\347\347\345\377\345\345\344"
-  "\377\345\345\344\377\344\344\342\377\340\340\336\377\342\342\340\377"
-  "\331\331\327\377\272\272\272\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\377\377\377\377\377\353\353\353\377\356\356\354\377\347\347\345"
-  "\377\345\345\345\377\0\0\0\377\346\303p\377\361\322\204\377\312\207\13"
-  "\377\0\0\0\377\227\227\226\377\324\324\321\377\342\342\340\377\340\340"
-  "\336\377\336\336\334\377\336\336\333\377\336\336\334\377\331\331\327"
-  "\377\275\275\274\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
-  "\377\377\377\347\347\347\377\357\357\355\377\353\353\353\377\246\246"
-  "\245\377\272|\12\377\373\251\17\377\373\251\17\377z[\0\377\0\0\0\377"
-  "\342\342\340\377\340\340\336\377\336\336\334\377\336\336\333\377\334"
-  "\334\331\377\333\333\331\377\333\333\331\377\325\325\323\377\274\274"
-  "\274\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377"
-  "\345\345\345\377\343\343\343\377\331\331\331\377\0\0\0\377\362\346\266"
-  "\377{{{\377pK\5\377\0\0\0\377ggd\377\313\313\307\377\311\311\307\377"
-  "\334\334\331\377\333\333\327\377\331\331\327\377\327\327\325\377\331"
-  "\331\327\377\327\327\323\377\264\264\264\377\0\0\0\377\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\377\377\377\377\377\342\342\340\377\345\345\344\377"
-  "\344\344\344\377\0\0\0\377\333\325\301\377~oW\377uX\0\377\0\0\0\377\334"
-  "\334\331\377\333\333\331\377\333\333\327\377\331\331\325\377\327\327"
-  "\323\377\325\325\323\377\325\325\321\377\327\327\323\377\320\320\316"
-  "\377\272\272\270\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
-  "\377\377\377\336\336\334\377\335\335\333\377\321\321\317\377\16\16\16"
-  "\377SSS\377\0\0\0\377\0\0\0\377\215\215\213\377\304\304\301\377\304\304"
-  "\277\377\301\301\274\377\325\325\321\377\325\325\321\377\323\323\320"
-  "\377\321\321\320\377\323\323\320\377\320\320\316\377\272\272\270\377"
-  "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\334\334"
-  "\333\377\340\340\334\377\335\335\333\377\0\0\0\377\0\0\0\377\211\211"
-  "\207\377\311\311\306\377\315\315\312\377\320\320\315\377\316\316\313"
-  "\377\320\320\315\377\320\320\315\377\320\320\315\377\320\320\315\377"
-  "\317\317\314\377\320\320\315\377\320\320\314\377\266\266\266\377\0\0"
-  "\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\333\333\331"
-  "\377\324\324\320\377\303\303\300\377[[[\377\221\221\215\377\221\221\217"
-  "\377\237\237\235\377\257\257\254\377\271\271\266\377\276\276\273\377"
-  "\303\303\300\377\305\305\302\377\310\310\305\377\312\312\307\377\313"
-  "\313\310\377\314\314\311\377\314\314\310\377\262\262\262\377\0\0\0\377"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\322\322\320\377\322"
-  "\322\317\377\317\317\314\377\277\277\275\377\237\237\234\377\210\210"
-  "\206\377\207\207\205\377\214\214\212\377\225\225\223\377\234\234\232"
-  "\377\250\250\245\377\261\261\256\377\265\265\263\377\273\273\270\377"
-  "\276\276\273\377\277\277\274\377\302\302\276\377\262\262\262\377\0\0"
-  "\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\321\321\316"
-  "\377\320\320\314\377\314\314\311\377\317\317\314\377\303\303\300\377"
-  "\256\256\253\377\235\235\232\377\227\227\224\377\227\227\224\377\224"
-  "\224\221\377\232\232\227\377\237\237\234\377\243\243\240\377\250\250"
-  "\245\377\252\252\247\377\260\260\254\377\270\270\265\377\260\260\256"
-  "\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\322"
-  "\322\317\377\321\321\316\377\321\321\316\377\321\321\316\377\317\317"
-  "\315\377\313\313\310\377\276\276\274\377\264\264\260\377\254\254\250"
-  "\377\244\244\242\377\240\240\234\377\240\240\234\377\244\244\240\377"
-  "\244\244\242\377\250\250\246\377\253\253\247\377\262\262\256\377\244"
-  "\244\244\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377"
-  "\377\321\321\320\377\321\321\316\377\320\320\316\377\316\316\314\377"
-  "\316\316\312\377\316\316\312\377\314\314\310\377\306\306\302\377\274"
-  "\274\271\377\263\263\257\377\264\264\260\377\253\253\251\377\246\246"
-  "\243\377\240\240\235\377\246\246\243\377\252\252\247\377\254\254\251"
-  "\377\241\241\241\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
-  "\377\377\377\261\261\257\377\264\264\263\377\264\264\261\377\264\264"
-  "\261\377\264\264\261\377\263\263\261\377\263\263\261\377\262\262\256"
-  "\377\256\256\252\377\247\247\244\377\242\242\240\377\245\245\241\377"
-  "\245\245\241\377\231\231\227\377\222\222\220\377\224\224\220\377\235"
-  "\235\233\377\205\205\203\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0r\0\0"
-  "\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_mail_forward)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_mail_forward[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_mail_forward[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1"
-  "\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0"
-  "\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2"
-  "\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0f\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0m\0\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\377"
-  "SSS\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\376\376\376\377\375\375\375\377\374\374\374\377\373\373\373\377\371"
-  "\371\371\377\370\370\370\377\367\367\367\377\366\366\366\377\365\365"
-  "\365\377\364\364\364\377\343\343\343\377SSS\377\0\0\0\377\0\0\0\31\0"
-  "\0\0\10\0\0\0\1\0\0\0\0\0\0\0\2\0\0\0\377\356\356\356\377OOO\377\377"
-  "\377\377\377\365\365\365\377\364\364\364\377\363\363\363\377\362\362"
-  "\362\377\362\362\362\377\361\361\361\377\360\360\360\377\360\360\360"
-  "\377\357\357\357\377\356\356\356\377\355\355\355\377\343\343\343\377"
-  "OOO\377\256\256\256\377\0\0\0\377\0\0\0(\0\0\0\17\0\0\0\2\0\0\0\0\0\0"
-  "\0\2\0\0\0\377\377\377\377\377\344\344\344\377CCC\377\375\375\375\377"
-  "\363\363\363\377\362\362\362\377\362\362\362\377\361\361\361\377\360"
-  "\360\360\377\357\357\357\377\356\356\356\377\356\356\356\377\355\355"
-  "\355\377\343\343\343\377OOO\377\254\254\254\377\310\310\310\377\0\0\0"
-  "\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377"
-  "\365\365\365\377\344\344\344\377OOO\377\373\373\373\377\361\361\361\377"
-  "\360\360\360\377\360\360\360\377\357\357\357\377\356\356\356\377\355"
-  "\355\355\377\355\355\355\377\343\343\343\377CCC\377\240\240\240\377\324"
-  "\324\324\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0"
-  "\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373\373\377\365\365\365\377"
-  "\344\344\344\377CCC\377\370\370\370\377\360\360\360\377\357\357\357\377"
-  "\356\356\356\377\355\355\355\377\354\354\354\377\343\343\343\377OOO\377"
-  "\225\225\225\377\324\324\324\377\344\344\344\377\310\310\310\377\0\0"
-  "\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377"
-  "\377\365\365\365\377\365\365\365\377\365\365\365\377\344\344\344\377"
-  ">>>\377\365\365\365\377\356\356\356\377\355\355\355\377\354\354\354\377"
-  "\343\343\343\377MMM\377\201\201\201\377\306\306\306\377\344\344\344\377"
-  "\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0"
-  "\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373\373\377\365\365\365"
-  "\377\365\365\365\377\344\344\344\377jjj\377CCC\377\363\363\363\377\354"
-  "\354\354\377\343\343\343\377OOO\377jjj\377\306\306\306\377\306\306\306"
-  "\377\365\365\365\377\0\0\0\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0"
-  "\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377"
-  "\365\365\365\377\344\344\344\377ccc\377\377\377\377\377\271\271\271\377"
-  "OOO\377\360\360\360\377OOO\377\225\225\225\377\306\306\306\377sss\377"
-  "\306\306\306\377\365\365\365\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0"
-  "-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373"
-  "\373\377\344\344\344\377ccc\377\377\377\377\377\365\365\365\377\344\344"
-  "\344\377\324\324\324\377OOO\377\254\254\254\377\306\306\306\377\344\344"
-  "\344\377\344\344\344\377|||\377\344\344\344\377\0\0\0\377[\210\262\377"
-  "\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377"
-  "\377\377\344\344\344\377sss\377\377\377\377\377\365\365\365\377\365\365"
-  "\365\377\365\365\365\377\365\365\365\377\344\344\344\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\236\270\321"
-  "\377P\200\255\377\0\0\0\377\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377"
-  "\377\377\377\377|||\377\377\377\377\377\344\344\344\377\344\344\344\377"
-  "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\0\0"
-  "\0\377\265\311\334\377\257\305\332\377\262\307\333\377\266\312\335\377"
-  "\266\312\335\377\266\312\335\377\244\275\325\377\234\267\321\377P\200"
-  "\255\377\10\15\21\377\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377sss\377\274\274"
-  "\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274"
-  "\377\274\274\274\377\274\274\274\377\274\274\274\377\0\0\0\377\233\266"
-  "\320\377\240\272\323\377\234\267\321\377\234\267\321\377\233\266\320"
-  "\377\232\265\317\377\240\272\323\377\234\267\321\377\227\263\316\377"
-  "_\213\264\377\0\0\0\377\0\0\0\0\0\0\0\2\0\0\0m\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\221\260\314\377\236\270\321\377\232\265\317\377\232\265\317"
-  "\377\233\266\320\377\234\267\321\377\234\267\321\377\234\267\321\377"
-  "\240\272\323\377\225\262\316\377Ly\243\377\0\0\0\377\0\0\0\1\0\0\0\10"
-  "\0\0\0\31\0\0\0(\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0"
-  "\0\377It\234\377\77e\210\377\77e\210\377\77e\210\377\77e\210\377\77e"
-  "\210\377\77e\210\377\77e\210\377\77e\210\377*C[\377\0\0\0\377\0\0\0\0"
-  "\0\0\0\0\0\0\0\2\0\0\0\10\0\0\0\16\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21"
-  "\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\377Eo\226\3777Yx\3777Yx\3777Yx\377"
-  "7Yx\3777Yx\377\77e\210\377\77e\210\377*C[\377\0\0\0\377\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0"
-  "\0\0\2\0\0\0\2\0\0\0\2\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\77e\210\377*C[\377\0\0\0\377\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\377*C[\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_mail_receive)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_mail_receive[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_mail_receive[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\377\311\333\307\377\311\332\307\377\311\332\307\377\201\232y\377"
-  "XuM\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\377\262\311\260\377\251\304\247\377\255\310\253"
-  "\377[yP\377MgD\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\273\320\271\377\256\307\254\377"
-  "\256\307\254\377[yP\377MgD\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\324\0\0\0\377\0\0\0\377\0\0\0\377\271\316\267"
-  "\377\256\307\254\377\252\307\250\377[yP\377MgD\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\315\336\313"
-  "\377\261\311\260\377\265\316\265\377\260\311\260\377\255\306\253\377"
-  "[yP\377[yP\377[yP\377MhD\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0"
-  "\0\0\2\0\0\0\2\0\0\0\377\315\336\313\377\264\313\262\377\263\312\261"
-  "\377\255\306\253\377[yP\377[yP\377MhD\377\0\0\0\377\0\0\0\2\0\0\0\2\0"
-  "\0\0\2\0\0\0\2\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "f\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\315\336"
-  "\313\377\252\307\250\377\260\307\256\377[yP\377MhD\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0m\0\0\0\10\0\0\0"
-  "\2\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\377SSS\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\376\376\376\377\0\0\0\377\315\336"
-  "\313\377\255\310\253\377TqJ\377\0\0\0\377\367\367\367\377\366\366\366"
-  "\377\365\365\365\377\364\364\364\377\343\343\343\377SSS\377\0\0\0\377"
-  "\0\0\0\31\0\0\0\10\0\0\0\1\0\0\0\0\0\0\0\2\0\0\0\377\356\356\356\377"
-  "OOO\377\377\377\377\377\365\365\365\377\364\364\364\377\363\363\363\377"
-  "\362\362\362\377\0\0\0\377\317\337\314\377\0\0\0\377\360\360\360\377"
-  "\357\357\357\377\356\356\356\377\355\355\355\377\343\343\343\377OOO\377"
-  "\256\256\256\377\0\0\0\377\0\0\0(\0\0\0\17\0\0\0\2\0\0\0\0\0\0\0\2\0"
-  "\0\0\377\377\377\377\377\344\344\344\377CCC\377\375\375\375\377\363\363"
-  "\363\377\362\362\362\377\362\362\362\377\361\361\361\377---\377\357\357"
-  "\357\377\356\356\356\377\356\356\356\377\355\355\355\377\343\343\343"
-  "\377OOO\377\254\254\254\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21"
-  "\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\344"
-  "\344\344\377OOO\377\373\373\373\377\361\361\361\377\360\360\360\377\360"
-  "\360\360\377\357\357\357\377\356\356\356\377\355\355\355\377\355\355"
-  "\355\377\343\343\343\377CCC\377\240\240\240\377\324\324\324\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377"
-  "\377\377\377\377\373\373\373\377\365\365\365\377\344\344\344\377CCC\377"
-  "\370\370\370\377\360\360\360\377\357\357\357\377\356\356\356\377\355"
-  "\355\355\377\354\354\354\377\343\343\343\377OOO\377\225\225\225\377\324"
-  "\324\324\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21"
-  "\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\365"
-  "\365\365\377\365\365\365\377\344\344\344\377>>>\377\365\365\365\377\356"
-  "\356\356\377\355\355\355\377\354\354\354\377\343\343\343\377MMM\377\201"
-  "\201\201\377\306\306\306\377\344\344\344\377\344\344\344\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377"
-  "\377\377\377\377\373\373\373\377\365\365\365\377\365\365\365\377\344"
-  "\344\344\377jjj\377CCC\377\363\363\363\377\354\354\354\377\343\343\343"
-  "\377OOO\377jjj\377\306\306\306\377\306\306\306\377\365\365\365\377\344"
-  "\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0"
-  "\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\365\365\365\377"
-  "\344\344\344\377ccc\377\377\377\377\377\271\271\271\377OOO\377\360\360"
-  "\360\377OOO\377\225\225\225\377\306\306\306\377sss\377\306\306\306\377"
-  "\365\365\365\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0"
-  "\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373\373\377"
-  "\344\344\344\377ccc\377\377\377\377\377\365\365\365\377\344\344\344\377"
-  "\324\324\324\377OOO\377\254\254\254\377\306\306\306\377\344\344\344\377"
-  "\344\344\344\377|||\377\344\344\344\377\344\344\344\377\310\310\310\377"
-  "\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377"
-  "\377\377\344\344\344\377sss\377\377\377\377\377\365\365\365\377\365\365"
-  "\365\377\365\365\365\377\365\365\365\377\344\344\344\377\344\344\344"
-  "\377\365\365\365\377\365\365\365\377\365\365\365\377\344\344\344\377"
-  "|||\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0"
-  "\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377|||\377\377\377\377\377"
-  "\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344"
-  "\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344"
-  "\344\377\344\344\344\377\344\344\344\377\344\344\344\377|||\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377"
-  "sss\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377"
-  "\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274"
-  "\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274"
-  "\274\377\274\274\274\377\274\274\274\377ccc\377\0\0\0\377\0\0\0-\0\0"
-  "\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0m\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\207\0\0\0(\0\0\0\17\0\0\0\2\0\0\0\0\0\0\0\1\0\0\0\10\0\0\0\31"
-  "\0\0\0(\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0"
-  "-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0(\0\0\0\31\0\0\0\10"
-  "\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\10\0\0\0\16\0\0\0\21\0\0\0\21"
-  "\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0"
-  "\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\16\0\0\0\10\0"
-  "\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0"
-  "\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0"
-  "\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0"
-  "\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_mail_reply)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_mail_reply[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_mail_reply[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0"
-  "\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2"
-  "\0\0\0\2\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0f\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0m\0\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0"
-  "\0\0\0\1\0\0\0\377SSS\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\376\376\376\377\375\375\375\377\374\374\374\377"
-  "\373\373\373\377\371\371\371\377\370\370\370\377\367\367\367\377\366"
-  "\366\366\377\365\365\365\377\364\364\364\377\343\343\343\377SSS\377\0"
-  "\0\0\377\0\0\0\31\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377\356\356"
-  "\356\377OOO\377\377\377\377\377\365\365\365\377\364\364\364\377\363\363"
-  "\363\377\362\362\362\377\362\362\362\377\361\361\361\377\360\360\360"
-  "\377\360\360\360\377\357\357\357\377\356\356\356\377\355\355\355\377"
-  "\343\343\343\377OOO\377\256\256\256\377\0\0\0\377\0\0\0(\0\0\0\17\0\0"
-  "\0\0\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\344\344\344\377CCC\377"
-  "\375\375\375\377\363\363\363\377\362\362\362\377\362\362\362\377\361"
-  "\361\361\377\360\360\360\377\357\357\357\377\356\356\356\377\356\356"
-  "\356\377\355\355\355\377\343\343\343\377OOO\377\254\254\254\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377"
-  "\377\377\377\377\365\365\365\377\344\344\344\377OOO\377\373\373\373\377"
-  "\361\361\361\377\360\360\360\377\360\360\360\377\357\357\357\377\356"
-  "\356\356\377\355\355\355\377\355\355\355\377\343\343\343\377CCC\377\240"
-  "\240\240\377\324\324\324\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21"
-  "\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373\373\377\365"
-  "\365\365\377\344\344\344\377CCC\377\370\370\370\377\360\360\360\377\357"
-  "\357\357\377\356\356\356\377\355\355\355\377\354\354\354\377\343\343"
-  "\343\377OOO\377\225\225\225\377\324\324\324\377\344\344\344\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377"
-  "\377\377\377\377\365\365\365\377\365\365\365\377\365\365\365\377\344"
-  "\344\344\377>>>\377\365\365\365\377\356\356\356\377\355\355\355\377\354"
-  "\354\354\377\343\343\343\377MMM\377\201\201\201\377\306\306\306\377\344"
-  "\344\344\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21"
-  "\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373\373\377=\32"
-  "\23\377\365\365\365\377\344\344\344\377jjj\377CCC\377\363\363\363\377"
-  "\354\354\354\377\343\343\343\377OOO\377jjj\377\306\306\306\377\306\306"
-  "\306\377\365\365\365\377\344\344\344\377\310\310\310\377\0\0\0\377\0"
-  "\0\0-\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\0\0"
-  "\0\377\0\0\0\377\344\344\344\377ccc\377\377\377\377\377\271\271\271\377"
-  "OOO\377\360\360\360\377OOO\377\225\225\225\377\306\306\306\377sss\377"
-  "\306\306\306\377\365\365\365\377\344\344\344\377\310\310\310\377\0\0"
-  "\0\377\0\0\0-\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377\0\0\0\377\352"
-  "\300\272\377\0\0\0\377ccc\377\377\377\377\377\365\365\365\377\344\344"
-  "\344\377\324\324\324\377OOO\377\254\254\254\377\306\306\306\377\344\344"
-  "\344\377\344\344\344\377|||\377\344\344\344\377\344\344\344\377\310\310"
-  "\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377"
-  "\352\300\272\377\337\236\225\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\344\344\344\377\365\365\365\377\365"
-  "\365\365\377\365\365\365\377\344\344\344\377|||\377\344\344\344\377\310"
-  "\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\377\352"
-  "\300\272\377\340\241\230\377\341\245\235\377\342\247\236\377\343\253"
-  "\243\377\342\247\236\377\343\252\242\377\337\236\225\377\314bS\377\0"
-  "\0\0\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344"
-  "\377\344\344\344\377\344\344\344\377|||\377\310\310\310\377\0\0\0\377"
-  "\0\0\0-\0\0\0\21\0\0\0\0\0\0\0\377\352\300\272\377\335\227\215\377\337"
-  "\237\227\377\337\236\225\377\336\232\220\377\335\226\214\377\335\226"
-  "\214\377\336\232\220\377\335\224\212\377\261C4\377\0\0\0\377\274\274"
-  "\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274"
-  "\377\274\274\274\377\274\274\274\377ccc\377\0\0\0\377\0\0\0-\0\0\0\21"
-  "C\31\23\377\352\302\274\377\336\232\220\377\337\234\222\377\335\231\217"
-  "\377\335\231\217\377\335\227\215\377\336\232\220\377\336\232\220\377"
-  "\336\232\220\377\336\232\220\377\265E5\377\0\0\0\377\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\207\0\0\0(\0\0\0\17\0\0\0\0\0\0\0\377e&\35\377\230:,\377\230:,\377"
-  "\230:,\377\230:,\377\230:,\377\230:,\377\230:,\377\230:,\377|/$\377\0"
-  "\0\0\377\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0"
-  "\0(\0\0\0\31\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\377e&\35\377\230:,\377\230"
-  ":,\377c%\35\377c%\35\377c%\35\377c%\35\377c%\35\377l)\37\377\0\0\0\377"
-  "\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0"
-  "\21\0\0\0\16\0\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377e&\35"
-  "\377\230:,\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0"
-  "\0\2\0\0\0\2\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\377e&\35\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_mail_send)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_mail_send[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_mail_send[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0O\77\12\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
-  "\364\346\265\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\364\345"
-  "\263\377\355\326\204\377u_\20\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\364\345"
-  "\263\377\355\325\200\377\356\326\205\377\257\215\30\377u_\20\377\0\0"
-  "\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\377\364\345\263\377\357\331\214\377\356\330\213\377\355\325\202"
-  "\377\257\215\30\377\257\215\30\377u_\20\377\0\0\0\377\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0\377\364\345\263\377\356\330\211\377"
-  "\357\332\222\377\356\330\211\377\355\325\202\377\257\215\30\377\257\215"
-  "\30\377\257\215\30\377u_\20\377\0\0\0\377\0\0\0\2\0\0\0\2\0\0\0\2\0\0"
-  "\0\2\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0f\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\360\333\223\377\355\326\204"
-  "\377\355\325\200\377\257\215\30\377s]\20\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0m\0\0\0\10\0\0\0\2\0\0\0\0"
-  "\0\0\0\0\0\0\0\1\0\0\0\377SSS\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\0\0\0\377\360\334\227\377\355\326\204\377"
-  "\355\326\204\377\257\215\30\377s]\20\377\0\0\0\377\366\366\366\377\365"
-  "\365\365\377\364\364\364\377\343\343\343\377SSS\377\0\0\0\377\0\0\0\31"
-  "\0\0\0\10\0\0\0\1\0\0\0\0\0\0\0\2\0\0\0\377\356\356\356\377OOO\377\377"
-  "\377\377\377\365\365\365\377\364\364\364\377\0\0\0\377\356\330\211\377"
-  "\355\323|\377\355\326\204\377\257\215\30\377s]\20\377\0\0\0\377\356\356"
-  "\356\377\355\355\355\377\343\343\343\377OOO\377\256\256\256\377\0\0\0"
-  "\377\0\0\0(\0\0\0\17\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377"
-  "\344\344\344\377CCC\377\375\375\375\377\363\363\363\377\0\0\0\377\344"
-  "\277=\377\313\244\34\377\321\250\34\377\220t\23\377|d\21\377\0\0\0\377"
-  "\355\355\355\377\343\343\343\377OOO\377\254\254\254\377\310\310\310\377"
-  "\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377"
-  "\377\377\365\365\365\377\344\344\344\377OOO\377\373\373\373\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\343"
-  "\343\343\377CCC\377\240\240\240\377\324\324\324\377\310\310\310\377\0"
-  "\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377"
-  "\377\373\373\373\377\365\365\365\377\344\344\344\377CCC\377\370\370\370"
-  "\377\360\360\360\377\357\357\357\377\356\356\356\377\355\355\355\377"
-  "\354\354\354\377\343\343\343\377OOO\377\225\225\225\377\324\324\324\377"
-  "\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0"
-  "\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\365\365\365"
-  "\377\365\365\365\377\344\344\344\377>>>\377\365\365\365\377\356\356\356"
-  "\377\355\355\355\377\354\354\354\377\343\343\343\377MMM\377\201\201\201"
-  "\377\306\306\306\377\344\344\344\377\344\344\344\377\310\310\310\377"
-  "\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377"
-  "\377\377\373\373\373\377\365\365\365\377\365\365\365\377\344\344\344"
-  "\377jjj\377CCC\377\363\363\363\377\354\354\354\377\343\343\343\377OO"
-  "O\377jjj\377\306\306\306\377\306\306\306\377\365\365\365\377\344\344"
-  "\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0"
-  "\0\0\2\0\0\0\377\377\377\377\377\365\365\365\377\365\365\365\377\344"
-  "\344\344\377ccc\377\377\377\377\377\271\271\271\377OOO\377\360\360\360"
-  "\377OOO\377\225\225\225\377\306\306\306\377sss\377\306\306\306\377\365"
-  "\365\365\377\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21"
-  "\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\373\373\373\377\344"
-  "\344\344\377ccc\377\377\377\377\377\365\365\365\377\344\344\344\377\324"
-  "\324\324\377OOO\377\254\254\254\377\306\306\306\377\344\344\344\377\344"
-  "\344\344\377|||\377\344\344\344\377\344\344\344\377\310\310\310\377\0"
-  "\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377"
-  "\377\344\344\344\377sss\377\377\377\377\377\365\365\365\377\365\365\365"
-  "\377\365\365\365\377\365\365\365\377\344\344\344\377\344\344\344\377"
-  "\365\365\365\377\365\365\365\377\365\365\365\377\344\344\344\377|||\377"
-  "\344\344\344\377\310\310\310\377\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0"
-  "\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377|||\377\377\377\377\377\344\344"
-  "\344\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344"
-  "\377\344\344\344\377\344\344\344\377\344\344\344\377\344\344\344\377"
-  "\344\344\344\377\344\344\344\377\344\344\344\377|||\377\310\310\310\377"
-  "\0\0\0\377\0\0\0-\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\377sss\377\274"
-  "\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274"
-  "\274\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274"
-  "\377\274\274\274\377\274\274\274\377\274\274\274\377\274\274\274\377"
-  "\274\274\274\377\274\274\274\377ccc\377\0\0\0\377\0\0\0-\0\0\0\21\0\0"
-  "\0\2\0\0\0\0\0\0\0\2\0\0\0m\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\207"
-  "\0\0\0(\0\0\0\17\0\0\0\2\0\0\0\0\0\0\0\1\0\0\0\10\0\0\0\31\0\0\0(\0\0"
-  "\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0"
-  "\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0-\0\0\0(\0\0\0\31\0\0\0\10\0\0\0\1\0"
-  "\0\0\0\0\0\0\0\0\0\0\2\0\0\0\10\0\0\0\16\0\0\0\21\0\0\0\21\0\0\0\21\0"
-  "\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21"
-  "\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\21\0\0\0\16\0\0\0\10\0\0\0\2\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0"
-  "\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0"
-  "\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_menu_about)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_menu_about[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_menu_about[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (1024) */
-  "\0\0\4\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (64) */
-  "\0\0\0@"
-  /* width (16) */
-  "\0\0\0\20"
-  /* height (16) */
-  "\0\0\0\20"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!\"\10\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0LN\23l\0\0\0\377\25\26\6#\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\11\0\0\0\377\356\366>\377\0\0\0\377\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\21\4\7dg\32"
-  "x\0\0\0\377\0\0\0\377\352\361=\377\360\370\77\377\313\3225\370\0\0\0"
-  "\377\0\0\0\377JL\23k\0\0\0\0\20\21\4\0dg\32\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\34\35\7\0\0\0\0\377\360\370\77\377\360\370\77\377\360\370\77\377\360"
-  "\370\77\377\360\370\77\377\360\370\77\377\351\360=\377\0\0\0\377\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\37\37\10%\0\0\0"
-  "\377\360\370\77\377\360\370\77\377\360\370\77\377\360\370\77\377\345"
-  "\354<\377\0\0\0\377\5\5\1\7\0\0\0\0\0\0\0\0\37\37\10\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\350\360=\377\360\370\77\377\360"
-  "\370\77\377\360\370\77\377\253\260-\372\0\0\0\377\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\360\370"
-  "\77\377\354\363>\377\0\0\0\377\357\367\77\377\316\3266\377\0\0\0\377"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\377\264\272/\363\0\0\0\377\30\30\6\77\0\0\0\377\315\3245\375"
-  "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\36\37\10g\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
-  "\26\27\5F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_menu_blank)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_menu_blank[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_menu_blank[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (1024) */
-  "\0\0\4\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (64) */
-  "\0\0\0@"
-  /* width (16) */
-  "\0\0\0\20"
-  /* height (16) */
-  "\0\0\0\20"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_scores)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_scores[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_scores[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\3\0\0\0\4\0\0\0\4\0\0\0\4\0\0"
-  "\0\3\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\215\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\227\0\0\0\22\0\0\0\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\2\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\341\341\341\377\0\0\0\377\0\0\0""2\0\0\0\22\0\0\0\2\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\377\377\377\377\377\353"
-  "\353\353\377\0\0\0\377\355\355\355\377\322\322\322\377\0\0\0\377\0\0"
-  "\0L\0\0\0\34\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0"
-  "\0\377\377\377\377\377\0\0\0\377\0\0\0\377\356\356\356\377\322\322\322"
-  "\377\0\0\0\377\0\0\0T\0\0\0\40\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\3\0"
-  "\0\0\4\0\0\0\10\0\0\0\377\377\377\377\377\355\355\355\377\0\0\0\377\357"
-  "\357\357\377\323\323\323\377\0\0\0\377\0\0\0U\0\0\0\40\0\0\0\4\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\215\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377"
-  "\377\356\356\356\377\0\0\0\377\360\360\360\377\324\324\324\377\0\0\0"
-  "\377\0\0\0W\0\0\0$\0\0\0\10\0\0\0\4\0\0\0\3\0\0\0\2\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\325\325\325\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\205\0\0\0\20\0\0\0\5\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\377\377\377\377\377\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\355\355\355\377\356\356\356\377\357\357\357\377\361\361"
-  "\361\377\362\362\362\377\363\363\363\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\0\0\0"
-  "1\0\0\0\21\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\377\377\377"
-  "\377\377\353\353\353\377\354\354\354\377\0\0\0\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\361\361\361\377\363\363\363\377\364\364"
-  "\364\377\365\365\365\377\0\0\0\377\0\0\0\377\0\0\0\377\333\333\333\377"
-  "\0\0\0\377\0\0\0K\0\0\0\34\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0"
-  "\0\0\377\377\377\377\377\0\0\0\377\0\0\0\377\0\0\0\377\357\357\357\377"
-  "\360\360\360\377\361\361\361\377\362\362\362\377\363\363\363\377\365"
-  "\365\365\377\366\366\366\377\367\367\367\377\370\370\370\377\0\0\0\377"
-  "\334\334\334\377\0\0\0\377\0\0\0T\0\0\0\40\0\0\0\4\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\4\0\0\0\377\377\377\377\377\0\0\0\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\367\367\367\377\370\370\370"
-  "\377\0\0\0\377\0\0\0\377\335\335\335\377\0\0\0\377\0\0\0U\0\0\0\40\0"
-  "\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\377\377\377\377\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\361\361\361\377\362\362\362\377\363\363\363"
-  "\377\364\364\364\377\365\365\365\377\366\366\366\377\367\367\367\377"
-  "\371\371\371\377\372\372\372\377\0\0\0\377\336\336\336\377\0\0\0\377"
-  "\0\0\0U\0\0\0\40\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\377\377"
-  "\377\377\377\357\357\357\377\360\360\360\377\361\361\361\377\362\362"
-  "\362\377\363\363\363\377\364\364\364\377\365\365\365\377\366\366\366"
-  "\377\367\367\367\377\370\370\370\377\0\0\0\377\0\0\0\377\0\0\0\377\337"
-  "\337\337\377\0\0\0\377\0\0\0U\0\0\0\40\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\4\0\0\0\377\341\341\341\377\323\323\323\377\324\324\324\377"
-  "\325\325\325\377\326\326\326\377\327\327\327\377\330\330\330\377\331"
-  "\331\331\377\331\331\331\377\332\332\332\377\333\333\333\377\334\334"
-  "\334\377\335\335\335\377\337\337\337\377\340\340\340\377\0\0\0\377\0"
-  "\0\0T\0\0\0\40\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\254\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\273\0\0\0L\0\0\0\34\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\2\0\0\0\23\0\0\0""5\0\0\0M\0\0\0T\0\0\0U\0\0\0U\0\0\0U\0\0\0U"
-  "\0\0\0U\0\0\0U\0\0\0U\0\0\0U\0\0\0U\0\0\0U\0\0\0U\0\0\0T\0\0\0L\0\0\0"
-  "2\0\0\0\22\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\23\0"
-  "\0\0\35\0\0\0\40\0\0\0\40\0\0\0\40\0\0\0\40\0\0\0\40\0\0\0\40\0\0\0\40"
-  "\0\0\0\40\0\0\0\40\0\0\0\40\0\0\0\40\0\0\0\40\0\0\0\37\0\0\0\34\0\0\0"
-  "\22\0\0\0\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0"
-  "\0\0\3\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0"
-  "\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\3\0\0\0\2\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_mic)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_mic[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_mic[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0<\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0<\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<RRR\377\332"
-  "\332\333\377\372\372\373\377\361\361\363\377\370\370\371\377\335\334"
-  "\335\377\0\0\0\377\0\0\0E\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\377\332\331\332\377\363\362\365\377\326\325\334\377\350"
-  "\350\353\377\267\265\275\377\324\322\327\377ifl\377\0\0\0\377\0\0\0\13"
-  "\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\372\372\373\377"
-  "\334\334\342\377\354\353\356\377\301\277\307\377\330\326\333\377\220"
-  "\217\226\377\214\212\217\377\0\0\0\377\0\0\0\26\0\0\0\4\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\363\361\364\377\357\357\362\377\312"
-  "\307\321\377\337\336\343\377\235\234\244\377\275\273\301\377CBF\377\0"
-  "\0\0\377\0\0\0\31\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I\0\0\0]\0\0\0\1\0\0\0\377"
-  "\372\372\372\377\324\322\331\377\350\346\353\377\261\260\272\377\311"
-  "\307\316\377tqz\377qpv\377\0\0\0\377\0\0\0\31\0\0\0_\0\0\0J\0\0\0\1\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "]\0\0\0\377\0\0\0\377\0\0\0\377\361\360\363\377\355\354\360\377\303\301"
-  "\312\377\330\326\335\377\214\211\225\377\250\246\257\377226\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0b\0\0\0\7\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\377\0\0\0\26\0\0\0\377"
-  "\371\371\372\377\317\316\326\377\344\342\347\377\250\247\261\377\303"
-  "\301\310\377ebl\377aae\377\0\0\0\377\0\0\0\34\0\0\0\377\0\0\0\27\0\0"
-  "\0\12\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\377\0\0\0\25\0\0\0\377\360\356\361\377\353\352\356\377"
-  "\276\273\306\377\325\324\332\377\204\200\214\377\236\235\246\377-,0\377"
-  "\0\0\0\377\0\0\0\32\0\0\0\377\0\0\0\25\0\0\0\6\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\24"
-  "\0\0\0\377\370\370\371\377\312\307\321\377\337\336\342\377\234\232\244"
-  "\377\270\266\276\377YW_\377][a\377\0\0\0\377\0\0\0\31\0\0\0\377\0\0\0"
-  "\24\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\377\0\0\0\24\0\0\0\377\354\352\355\377\343\342\346"
-  "\377\250\247\260\377\307\305\314\377rqx\377\222\220\231\377(&*\377\0"
-  "\0\0\377\0\0\0\31\0\0\0\377\0\0\0\24\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\24\0"
-  "\0\0\377\350\347\352\377\265\263\272\377\314\314\322\377\205\204\212"
-  "\377\245\244\253\377JIO\377MLQ\377\0\0\0\377\0\0\0\31\0\0\0\377\0\0\0"
-  "\24\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\377\0\0\0\24\0\0\0C\0\0\0\377\206\204\210\37776"
-  ":\377aac\377$#&\377DDI\377\0\0\0\377\0\0\0\232\0\0\0\30\0\0\0\377\0\0"
-  "\0\24\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\24\0\0\0\6\0\0\0D\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\232\0\0\0\32\0\0\0\17\0\0\0\377"
-  "\0\0\0\24\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0k\0\0\0\206\0\0\0\6\0\0\0\3\0\0\0\13\0\0\0"
-  "\26\0\0\0{\0\0\0\32\0\0\0\31\0\0\0\27\0\0\0\17\0\0\0\200\0\0\0m\0\0\0"
-  "\22\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\2\0\0\0o\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0m\0\0\0\13\0"
-  "\0\0\13\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\13\0\0\0\22\0\0\0\24KKK\377"
-  "aaa\377\0\0\0\377\0\0\0\30\0\0\0\25\0\0\0\24\0\0\0\22\0\0\0\13\0\0\0"
-  "\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\4\0\0\0\5KKK\377\177\177"
-  "\177\377\0\0\0\377\0\0\0m\0\0\0;\0\0\0\6\0\0\0\5\0\0\0\2\0\0\0\33\0\0"
-  "\0]\0\0\0\34\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0KKK\377\177\177\177\377"
-  "\0\0\0\377\0\0\0\32\0\0\0\12\0\0\0L\0\0\0\2\0\0\0\0\0\0\0I\0\0\0\4\0"
-  "\0\0M\0\0\0\37\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\40\40\40\377hhh\377\0\0\0"
-  "\377\0\0\0G\0\0\0\7\0\0\0\2\0\0\0k\0\0\0]\0\0\0\2\0\0\0\5\0\0\0\3\0\0"
-  "\0l\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377gd[\377\0\0\0\377VRH\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0`\0\0\0"
-  "\2\0\0\0o\0\0\0\7\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\33\33\33\377\257\255"
-  "\251\377\205\202{\377wtl\377VRH\377VRH\377VRH\377VRH\377VRH\377VRH\377"
-  "VRH\377VRH\377VRH\377LI@\377;:2\377\40\37\32\377\0\0\0\377\0\0\0\14\0"
-  "\0\0\37\0\0\0\7\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\27\0\0\0\5\0\0\0K\0\0\0W\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\4\0\0\0\25\0\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31\0"
-  "\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31\0\0\0\31"
-  "\0\0\0\31\0\0\0\25\0\0\0\4\0\0\0\1\0\0\0\5"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_multiple_file)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_multiple_file[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_multiple_file[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (4096) */
-  "\0\0\20\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (128) */
-  "\0\0\0\200"
-  /* width (32) */
-  "\0\0\0\40"
-  /* height (32) */
-  "\0\0\0\40"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\33\0\0\0\14\0\0\0\2\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\340\340\340\377"
-  "\301\301\301\377\0\0\0\377\0\0\0+\0\0\0\16\0\0\0\3\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\377\377\377\377\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0-\0"
-  "\0\0\16\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\340\340\340\377\301\301\301\377\0\0\0\377\0\0\0"
-  "-\0\0\0\16\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\375\375\375\377\373\373\373\377"
-  "\372\372\371\377\303\303\303\377\373\373\373\377\250\250\250\377\0\0"
-  "\0\377\0\0\0-\0\0\0\20\0\0\0\6\0\0\0\4\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\33\0\0\0\14\0\0\0\2\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\340\340\340\377\301\301"
-  "\301\377\0\0\0\377\0\0\0+\0\0\0\16\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\377"
-  "\377\377\377\377\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\0\0\0\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\375\375\375\377\373\373\373\377\372"
-  "\372\371\377\303\303\303\377\373\373\373\377\250\250\250\377\0\0\0\377"
-  "\0\0\0-\0\0\0\16\0\0\0\3\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\0\0\0\377\377\377\377\377\377\377\377\377\321\321\321\377"
-  "\252\252\252\377\323\323\323\377\377\377\377\377\323\323\323\377\377"
-  "\377\377\377\252\252\252\377\252\252\252\377\375\375\375\377\320\320"
-  "\320\377\372\372\372\377\371\371\370\377\367\367\366\377\255\255\255"
-  "\377vvv\377]]]\377@@@\377\0\0\0\377\0\0\0+\0\0\0\14\0\0\0\0\0\0\0\377"
-  "\377\377\377\377\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\375\375\375\377\374\374\374\377\0\0\0\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\376\376\376\377\374\374\374\377"
-  "\373\373\372\377\371\371\371\377\367\367\367\377\366\366\365\377\364"
-  "\364\364\377\342\342\342\377\205\205\205\377KKI\377\26\26\26\377\0\0"
-  "\0\377\0\0\0N\0\0\0\33\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377"
-  "\377\377\377\376\376\376\377\374\374\374\377\373\373\372\377\371\371"
-  "\371\377\0\0\0\377\377\377\377\377\377\377\377\377\252\252\252\377\271"
-  "\271\271\377\323\323\323\377\323\323\323\377\376\376\376\377\250\250"
-  "\250\377\236\236\236\377\235\235\235\377\245\245\244\377\366\366\366"
-  "\377\243\243\242\377\311\311\310\377\362\362\361\377\360\360\357\377"
-  "\356\356\355\377\355\355\353\377\235\235\235\377\0\0\0\377\0\0\0]\0\0"
-  "\0#\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377\377\373\373"
-  "\373\377\371\371\371\377\370\370\367\377\366\366\366\377\0\0\0\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\375\375\375\377\373\373\373\377\372\372\371\377\370\370\370"
-  "\377\367\367\366\377\365\365\364\377\364\364\363\377\362\362\361\377"
-  "\360\360\357\377\357\357\356\377\355\355\354\377\354\354\352\377\352"
-  "\352\350\377\244\244\243\377\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\377"
-  "\377\377\377\377\0\0\0\377\377\377\377\377\370\370\370\377\367\367\366"
-  "\377\365\365\364\377\364\364\363\377\0\0\0\377\377\377\377\377\377\377"
-  "\377\377\252\252\252\377\321\321\321\377\374\374\374\377\316\316\316"
-  "\377\371\371\370\377\244\244\244\377\243\243\243\377\232\232\231\377"
-  "\257\257\256\377\361\361\360\377\237\237\236\377rrq\377\225\225\224\377"
-  "\223\223\223\377\351\351\347\377\347\347\346\377\244\244\244\377\0\0"
-  "\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377"
-  "\377\377\377\365\365\365\377\364\364\363\377\362\362\361\377\361\361"
-  "\360\377\0\0\0\377\377\377\377\377\376\376\376\377\374\374\374\377\373"
-  "\373\372\377\371\371\371\377\367\367\367\377\366\366\365\377\364\364"
-  "\364\377\363\363\362\377\361\361\360\377\360\360\356\377\356\356\355"
-  "\377\354\354\353\377\353\353\351\377\351\351\350\377\350\350\346\377"
-  "\346\346\344\377\345\345\343\377\242\242\242\377\0\0\0\377\0\0\0_\0\0"
-  "\0$\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377\377\363\363"
-  "\362\377\361\361\360\377\360\360\356\377\356\356\355\377\0\0\0\377\377"
-  "\377\377\377\373\373\373\377\264\264\264\377\263\263\263\377\366\366"
-  "\366\377\261\261\261\377\260\260\257\377\230\230\230\377\227\227\226"
-  "\377\356\356\355\377oon\377nnn\377nnm\377mml\377llk\377kkj\377\343\343"
-  "\341\377\342\342\340\377\242\242\242\377\0\0\0\377\0\0\0_\0\0\0$\0\0"
-  "\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377\377\360\360\357"
-  "\377\356\356\355\377\355\355\353\377\353\353\352\377\0\0\0\377\377\377"
-  "\377\377\370\370\370\377\367\367\366\377\365\365\364\377\364\364\363"
-  "\377\362\362\361\377\360\360\357\377\357\357\356\377\355\355\354\377"
-  "\354\354\352\377nnm\377\207\226\245\377\206\226\244\377\205\225\243\377"
-  "\205\224\243\377jji\377\341\341\336\377\337\337\335\377\243\243\242\377"
-  "\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377"
-  "\377\377\377\377\355\355\354\377\354\354\352\377\352\352\350\377\351"
-  "\351\347\377\0\0\0\377\377\377\377\377\365\365\365\377\261\261\260\377"
-  "\230\230\230\377\307\307\306\377\305\305\304\377\356\356\354\377\303"
-  "\303\302\377\301\301\300\377\351\351\347\377lll\377\217\236\254\377\275"
-  "\270\225\377p|i\377\214\233\252\377iih\377\336\336\333\377\334\334\332"
-  "\377\243\243\242\377\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\377\377\377"
-  "\377\377\0\0\0\377\377\377\377\377\352\352\351\377\351\351\347\377\347"
-  "\347\346\377\346\346\344\377\0\0\0\377\377\377\377\377\363\363\362\377"
-  "\361\361\360\377\360\360\356\377\356\356\355\377\354\354\353\377\353"
-  "\353\351\377\351\351\350\377\350\350\346\377\346\346\344\377kkj\377\226"
-  "\245\264\377\323\307\215\377\237\234d\377o\177w\377hhf\377\333\333\330"
-  "\377\332\332\327\377\240\240\237\377\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0"
-  "\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377\377\350\350\346\377"
-  "\346\346\344\377\345\345\343\377\343\343\341\377\0\0\0\377\377\377\377"
-  "\377\360\360\357\377\243\243\242\377\225\225\224\377\224\224\223\377"
-  "\251\251\250\377\232\232\231\377\247\247\246\377\275\275\273\377\343"
-  "\343\341\377jji\377\235\254\273\377\315\304\226\377fsW\377\233\252\271"
-  "\377ffe\377\330\330\325\377\327\327\324\377\242\242\241\377\0\0\0\377"
-  "\0\0\0_\0\0\0$\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0\377\377\377\377"
-  "\377\345\345\343\377\343\343\341\377\342\342\340\377\340\340\336\377"
-  "\0\0\0\377\377\377\377\377\355\355\354\377\354\354\352\377\352\352\350"
-  "\377\351\351\347\377\347\347\345\377\345\345\343\377\344\344\342\377"
-  "\342\342\340\377\341\341\336\377hhh\377\245\264\303\377\313\305\235\377"
-  "l}o\377o\200s\377eec\377\326\326\322\377\324\324\321\377\242\242\241"
-  "\377\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\377\377\377\377\377\0\0\0"
-  "\377\377\377\377\377\342\342\340\377\341\341\336\377\337\337\335\377"
-  "\336\336\333\377\0\0\0\377\377\377\377\377\352\352\351\377\233\233\232"
-  "\377\215\215\214\377\346\346\344\377\274\274\273\377\217\217\215\377"
-  "\216\216\214\377\271\271\266\377\336\336\333\377ggf\377gge\377ffd\377"
-  "eed\377ddc\377ddb\377\323\323\320\377\321\321\316\377\241\241\240\377"
-  "\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\377\320\320\320\377\0\0\0\377"
-  "\377\377\377\377\340\340\335\377\336\336\333\377\334\334\332\377\333"
-  "\333\330\377\0\0\0\377\377\377\377\377\350\350\346\377\346\346\344\377"
-  "\345\345\343\377\343\343\341\377\341\341\337\377\340\340\336\377\336"
-  "\336\334\377\335\335\332\377\333\333\330\377\332\332\327\377\330\330"
-  "\325\377\326\326\323\377\325\325\322\377\323\323\320\377\322\322\316"
-  "\377\320\320\315\377\317\317\313\377\240\240\237\377\0\0\0\377\0\0\0"
-  "_\0\0\0$\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\377\335\335"
-  "\332\377\333\333\330\377\332\332\327\377\330\330\325\377\0\0\0\377\377"
-  "\377\377\377\345\345\343\377\227\227\226\377\216\216\215\377\215\215"
-  "\214\377\214\214\212\377\335\335\333\377\222\222\220\377\236\236\233"
-  "\377\234\234\232\377\207\207\205\377\325\325\322\377\257\257\254\377"
-  "\230\230\226\377\213\213\210\377\253\253\247\377\315\315\312\377\314"
-  "\314\310\377\242\242\241\377\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\40"
-  "\0\0\0T\0\0\0\377\320\320\320\377\261\261\257\377\264\264\263\377\264"
-  "\264\261\377\240\240\235\377\0\0\0\377\377\377\377\377\342\342\340\377"
-  "\341\341\336\377\337\337\335\377\336\336\333\377\334\334\331\377\332"
-  "\332\330\377\331\331\326\377\327\327\324\377\326\326\322\377\324\324"
-  "\321\377\323\323\317\377\321\321\315\377\317\317\314\377\316\316\312"
-  "\377\314\314\310\377\314\314\307\377\314\314\307\377\242\242\240\377"
-  "\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\12\0\0\0\37\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\377\340"
-  "\340\335\377\224\224\222\377\266\266\264\377\333\333\330\377\235\235"
-  "\233\377\210\210\206\377\326\326\323\377\325\325\321\377\214\214\212"
-  "\377\217\217\215\377\203\203\200\377\316\316\312\377\224\224\221\377"
-  "\224\224\220\377\314\314\307\377\314\314\307\377\314\314\307\377\237"
-  "\237\237\377\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\2\0\0\0\10\0\0\0%"
-  "\0\0\0T\0\0\0j\0\0\0m\0\0\0m\0\0\0o\0\0\0\377\377\377\377\377\335\335"
-  "\332\377\333\333\330\377\332\332\327\377\330\330\325\377\326\326\323"
-  "\377\325\325\322\377\323\323\320\377\322\322\316\377\320\320\315\377"
-  "\317\317\313\377\315\315\311\377\314\314\307\377\314\314\307\377\314"
-  "\314\307\377\314\314\307\377\314\314\307\377\314\314\307\377\240\240"
-  "\237\377\0\0\0\377\0\0\0_\0\0\0$\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\13\0\0"
-  "\0\34\0\0\0&\0\0\0(\0\0\0(\0\0\0,\0\0\0\377\320\320\320\377\261\261\257"
-  "\377\264\264\263\377\264\264\261\377\240\240\235\377\240\240\235\377"
-  "\237\237\235\377\237\237\235\377\237\237\233\377\231\231\225\377\215"
-  "\215\211\377\213\213\211\377\213\213\211\377\213\213\211\377\211\211"
-  "\211\377\211\211\211\377\203\203\177\377\204\204\202\377]]\\\377\0\0"
-  "\0\377\0\0\0^\0\0\0$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\4\0\0\0\6"
-  "\0\0\0\7\0\0\0\7\0\0\0\13\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\263\0\0\0T\0\0\0\37\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0!\0\0\0S\0\0"
-  "\0i\0\0\0m\0\0\0m\0\0\0m\0\0\0n\0\0\0n\0\0\0n\0\0\0n\0\0\0n\0\0\0n\0"
-  "\0\0n\0\0\0n\0\0\0n\0\0\0n\0\0\0n\0\0\0n\0\0\0n\0\0\0l\0\0\0`\0\0\0:"
-  "\0\0\0\23\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\1\0\0\0\12\0\0\0\34\0\0\0&\0\0\0(\0\0\0(\0\0\0(\0\0\0)\0\0"
-  "\0)\0\0\0)\0\0\0)\0\0\0)\0\0\0)\0\0\0)\0\0\0)\0\0\0)\0\0\0)\0\0\0)\0"
-  "\0\0)\0\0\0)\0\0\0(\0\0\0#\0\0\0\25\0\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\4\0\0\0"
-  "\6\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0"
-  "\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0\7\0\0\0"
-  "\7\0\0\0\6\0\0\0\4\0\0\0\1"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_not)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_not[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_not[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0b\0\0\0\260\0\0\0\342"
-  "\0\0\0\373\0\0\0\373\0\0\0\343\0\0\0\263\0\0\0j\0\0\0\13\0\0\0\5\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0b\0\0\0\341n\35\15\377\2670\25\377\315"
-  "4\27\377\3173\27\377\3152\26\377\310/\25\377\260(\22\377h\27\12\377\0"
-  "\0\0\345\0\0\0o\0\0\0\14\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\225K\24\11\377\3105\27\377"
-  "\3237\31\377\3215\30\377\3173\27\377\3151\26\377\3140\25\377\312.\25"
-  "\377\310,\24\377\306+\23\377\270'\21\377D\16\5\377\0\0\0\243\0\0\0\24"
-  "\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0"
-  "\0\225o\36\15\377\3238\31\377\3236\30\377\331_H\377\361\317\311\377\371"
-  "\364\363\377\371\371\371\377\364\353\352\377\350\273\265\377\325vj\377"
-  "\307\77-\377\302'\21\377\300%\21\377c\22\10\377\0\0\0\246\0\0\0\26\0"
-  "\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0bK\24\11\377\323"
-  "8\31\377\3226\30\377\353\261\246\377\372\372\372\377\372\372\372\377"
-  "\372\372\372\377\371\371\371\377\370\370\370\377\370\370\370\377\355"
-  "\324\320\377\277#\20\377\277#\20\377\276#\20\377\274!\17\377B\13\5\377"
-  "\0\0\0|\0\0\0\24\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\341\307"
-  "4\27\377\3226\30\377\353\261\246\377\373\373\373\377\372\372\372\377"
-  "\372\372\372\377\371\371\371\377\370\370\370\377\370\370\370\377\355"
-  "\324\320\377\277#\20\377\277#\20\377\277#\20\377\277#\20\377\272\37\16"
-  "\377\255\34\14\377\0\0\0\351\0\0\0(\0\0\0\14\0\0\0\1\0\0\0\0\0\0\0\0"
-  "\0\0\0bm\34\14\377\3225\30\377\326WA\377\372\372\372\377\372\372\372"
-  "\377\372\372\372\377\371\371\371\377\370\370\370\377\370\370\370\377"
-  "\355\324\320\377\277#\20\377\277#\20\377\277#\20\377\277#\20\377\277"
-  "#\20\377\303C6\377\266\34\14\377^\16\5\377\0\0\0\204\0\0\0\31\0\0\0\5"
-  "\0\0\0\0\0\0\0\1\0\0\0\260\266.\24\377\3173\27\377\341\232\220\377\372"
-  "\372\372\377\371\371\371\377\371\371\371\377\370\370\370\377\370\370"
-  "\370\377\355\324\320\377\277#\20\377\277#\20\377\277#\20\377\277#\20"
-  "\377\277#\20\377\347\306\302\377\335\247\242\377\264\32\13\377\233\25"
-  "\11\377\0\0\0\304\0\0\0'\0\0\0\13\0\0\0\1\0\0\0\2\0\0\0\342\3132\26\377"
-  "\3151\26\377\353\306\302\377\371\371\371\377\371\371\371\377\370\370"
-  "\370\377\367\367\367\377\355\324\320\377\277#\20\377\277#\20\377\277"
-  "#\20\377\277#\20\377\277#\20\377\347\306\302\377\362\362\362\377\347"
-  "\312\306\377\262\30\12\377\255\26\12\377\0\0\0\352\0\0\0""4\0\0\0\22"
-  "\0\0\0\2\0\0\0\3\0\0\0\373\3141\26\377\313/\25\377\361\337\335\377\371"
-  "\371\371\377\370\370\370\377\367\367\367\377\355\324\320\377\277#\20"
-  "\377\277#\20\377\277#\20\377\277#\20\377\277#\20\377\347\306\302\377"
-  "\362\362\362\377\361\361\361\377\355\343\342\377\260\26\12\377\256\24"
-  "\11\377\0\0\0\374\0\0\0<\0\0\0\26\0\0\0\3\0\0\0\3\0\0\0\373\312/\25\377"
-  "\311-\24\377\361\337\335\377\370\370\370\377\367\367\367\377\355\324"
-  "\320\377\277#\20\377\277#\20\377\277#\20\377\277#\20\377\277#\20\377"
-  "\347\306\302\377\362\362\362\377\361\361\361\377\361\361\361\377\351"
-  "\327\325\377\256\24\11\377\254\22\10\377\0\0\0\374\0\0\0A\0\0\0\30\0"
-  "\0\0\3\0\0\0\3\0\0\0\343\305,\23\377\307+\23\377\347\272\265\377\367"
-  "\367\367\377\355\324\320\377\277#\20\377\277#\20\377\277#\20\377\277"
-  "#\20\377\277#\20\377\347\306\302\377\362\362\362\377\361\361\361\377"
-  "\361\361\361\377\360\360\360\377\346\321\316\377\255\22\10\377\247\20"
-  "\7\377\0\0\0\353\0\0\0A\0\0\0\30\0\0\0\3\0\0\0\3\0\0\0\263\255%\20\377"
-  "\305)\22\377\335\226\215\377\352\310\304\377\277#\20\377\277#\20\377"
-  "\277#\20\377\277#\20\377\277#\20\377\347\306\302\377\362\362\362\377"
-  "\361\361\361\377\361\361\361\377\360\360\360\377\357\357\357\377\333"
-  "\254\250\377\253\20\7\377\223\14\5\377\0\0\0\310\0\0\0=\0\0\0\26\0\0"
-  "\0\3\0\0\0\2\0\0\0jf\25\11\377\302'\21\377\307A1\377\277#\20\377\277"
-  "#\20\377\277#\20\377\277#\20\377\277#\20\377\347\305\301\377\362\362"
-  "\362\377\361\361\361\377\360\360\360\377\360\360\360\377\357\357\357"
-  "\377\356\356\356\377\267:3\377\250\16\6\377V\6\2\377\0\0\0\222\0\0\0"
-  "4\0\0\0\22\0\0\0\2\0\0\0\1\0\0\0\13\0\0\0\345\264#\20\377\277#\20\377"
-  "\277#\20\377\277#\20\377\277#\20\377\277#\20\377\347\305\301\377\362"
-  "\362\362\377\361\361\361\377\360\360\360\377\360\360\360\377\357\357"
-  "\357\377\356\356\356\377\321\223\217\377\250\16\6\377\233\13\5\377\0"
-  "\0\0\353\0\0\0I\0\0\0'\0\0\0\13\0\0\0\1\0\0\0\0\0\0\0\5\0\0\0oC\14\5"
-  "\377\274!\17\377\273\40\16\377\277#\20\377\277#\20\377\344\273\266\377"
-  "\362\362\362\377\361\361\361\377\360\360\360\377\360\360\360\377\357"
-  "\357\357\377\355\355\355\377\321\223\217\377\247\15\6\377\245\13\5\377"
-  "9\3\1\377\0\0\0\224\0\0\0;\0\0\0\31\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\1\0"
-  "\0\0\14\0\0\0\243a\20\7\377\270\36\15\377\267\34\14\377\300=1\377\326"
-  "\212\201\377\337\255\246\377\344\303\276\377\354\343\341\377\346\321"
-  "\316\377\332\253\247\377\26780\377\247\15\5\377\244\13\5\377U\5\1\377"
-  "\0\0\0\267\0\0\0F\0\0\0(\0\0\0\14\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\4\0\0\0\24\0\0\0\246@\12\3\377\251\31\12\377\263\30\13\377\261\26"
-  "\12\377\257\25\11\377\255\23\10\377\253\21\10\377\252\20\7\377\250\16"
-  "\6\377\246\14\5\377\232\12\4\3779\3\1\377\0\0\0\267\0\0\0I\0\0\0/\0\0"
-  "\0\24\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\6\0\0\0\26"
-  "\0\0\0|\0\0\0\351\\\13\5\377\230\22\10\377\252\23\10\377\253\21\7\377"
-  "\251\17\7\377\244\16\6\377\221\13\4\377U\5\2\377\0\0\0\353\0\0\0\224"
-  "\0\0\0F\0\0\0/\0\0\0\26\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\1\0\0\0\6\0\0\0\24\0\0\0(\0\0\0\204\0\0\0\304\0\0\0"
-  "\352\0\0\0\374\0\0\0\374\0\0\0\353\0\0\0\310\0\0\0\222\0\0\0I\0\0\0;"
-  "\0\0\0(\0\0\0\24\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0\14\0\0\0\31\0\0\0'\0\0\0""4"
-  "\0\0\0<\0\0\0A\0\0\0A\0\0\0<\0\0\0""4\0\0\0'\0\0\0\31\0\0\0\14\0\0\0"
-  "\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\13\0\0\0\22\0\0\0\26\0\0"
-  "\0\30\0\0\0\30\0\0\0\26\0\0\0\22\0\0\0\13\0\0\0\5\0\0\0\1\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\3\0\0\0\3\0\0"
-  "\0\3\0\0\0\3\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_table_borders)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_table_borders[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_table_borders[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\16\0\0\0\3\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\375\375\375\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\336\336\336\377\0\0"
-  "\0\377\0\0\0E\0\0\0\16\0\0\0\0\0\0\0\377\377\377\377\377\360\360\360"
-  "\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377"
-  "\360\360\360\377\360\360\360\377\362\362\362\377nnn\377\363\363\363\377"
-  "\363\363\363\377\364\364\364\377\365\365\365\377\365\365\365\377\366"
-  "\366\366\377\366\366\366\377\367\367\367\377\346\346\346\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\360\360\360\377\360"
-  "\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360"
-  "\360\377\360\360\360\377\362\362\362\377\362\362\362\377\363\363\363"
-  "\377\363\363\363\377\364\364\364\377\365\365\365\377\365\365\365\377"
-  "\366\366\366\377\366\366\366\377\367\367\367\377\346\346\346\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\360\360\360"
-  "\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377"
-  "\360\360\360\377\361\361\361\377\362\362\362\377jjj\377\363\363\363\377"
-  "\364\364\364\377\365\365\365\377\365\365\365\377\366\366\366\377\366"
-  "\366\366\377\367\367\367\377\367\367\367\377\347\347\347\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\360\360\360\377\360"
-  "\360\360\377\360\360\360\377\360\360\360\377\360\360\360\377\361\361"
-  "\361\377\362\362\362\377\363\363\363\377\363\363\363\377\364\364\364"
-  "\377\365\365\365\377\365\365\365\377\366\366\366\377\366\366\366\377"
-  "\367\367\367\377\367\367\367\377\370\370\370\377\350\350\350\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\360\360\360"
-  "\377\360\360\360\377\360\360\360\377\360\360\360\377\361\361\361\377"
-  "\362\362\362\377\362\362\362\377\363\363\363\377kkk\377\365\365\365\377"
-  "\365\365\365\377\366\366\366\377\366\366\366\377\367\367\367\377\367"
-  "\367\367\377\370\370\370\377\371\371\371\377\350\350\350\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\360\360\360\377\360"
-  "\360\360\377\360\360\360\377\361\361\361\377\362\362\362\377\362\362"
-  "\362\377\363\363\363\377\364\364\364\377\365\365\365\377\365\365\365"
-  "\377\366\366\366\377\366\366\366\377\367\367\367\377\367\367\367\377"
-  "\370\370\370\377\371\371\371\377\371\371\371\377\351\351\351\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\360\360\360"
-  "\377\360\360\360\377\361\361\361\377\362\362\362\377\362\362\362\377"
-  "\363\363\363\377\363\363\363\377\365\365\365\377kkk\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\370\370\370\377\371"
-  "\371\371\377\371\371\371\377\372\372\372\377\351\351\351\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\361\361\361\377\361"
-  "\361\361\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\366\366\366\377\366\366\366"
-  "\377\367\367\367\377\367\367\367\377\370\370\370\377\371\371\371\377"
-  "\371\371\371\377\372\372\372\377\372\372\372\377\352\352\352\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\376\376\376\377kkk\377\362\362"
-  "\362\377jjj\377\363\363\363\377jjj\377\364\364\364\377kkk\377\366\366"
-  "\366\377lll\377\367\367\367\377lll\377\370\370\370\377mmm\377\371\371"
-  "\371\377mmm\377\372\372\372\377nnn\377\353\353\353\377\0\0\0\377\0\0"
-  "\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\362\362\362\377\362\362"
-  "\362\377\363\363\363\377\363\363\363\377\364\364\364\377\365\365\365"
-  "\377\365\365\365\377\366\366\366\377\367\367\367\377\367\367\367\377"
-  "\370\370\370\377\371\371\371\377\371\371\371\377\372\372\372\377\372"
-  "\372\372\377\373\373\373\377\374\374\374\377\353\353\353\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\363\363\363\377\363"
-  "\363\363\377\363\363\363\377\364\364\364\377\365\365\365\377\365\365"
-  "\365\377\366\366\366\377\367\367\367\377lll\377\370\370\370\377\371\371"
-  "\371\377\371\371\371\377\372\372\372\377\372\372\372\377\373\373\373"
-  "\377\374\374\374\377\374\374\374\377\354\354\354\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\363\363\363\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\365\365\365\377\366\366\366"
-  "\377\366\366\366\377\367\367\367\377\370\370\370\377\371\371\371\377"
-  "\371\371\371\377\372\372\372\377\372\372\372\377\373\373\373\377\374"
-  "\374\374\377\374\374\374\377\375\375\375\377\354\354\354\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\364\364\364\377\364"
-  "\364\364\377\365\365\365\377\365\365\365\377\366\366\366\377\366\366"
-  "\366\377\367\367\367\377\370\370\370\377mmm\377\371\371\371\377\372\372"
-  "\372\377\372\372\372\377\373\373\373\377\374\374\374\377\374\374\374"
-  "\377\375\375\375\377\375\375\375\377\355\355\355\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\365\365\365\377\365\365"
-  "\365\377\365\365\365\377\366\366\366\377\366\366\366\377\367\367\367"
-  "\377\367\367\367\377\371\371\371\377\371\371\371\377\372\372\372\377"
-  "\372\372\372\377\373\373\373\377\374\374\374\377\374\374\374\377\375"
-  "\375\375\377\375\375\375\377\376\376\376\377\356\356\356\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\365\365\365\377\365"
-  "\365\365\377\366\366\366\377\366\366\366\377\367\367\367\377\367\367"
-  "\367\377\370\370\370\377\371\371\371\377mmm\377\372\372\372\377\373\373"
-  "\373\377\374\374\374\377\374\374\374\377\375\375\375\377\375\375\375"
-  "\377\376\376\376\377\377\377\377\377\356\356\356\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\366\366\366\377\366\366"
-  "\366\377\366\366\366\377\367\367\367\377\367\367\367\377\370\370\370"
-  "\377\371\371\371\377\372\372\372\377\372\372\372\377\373\373\373\377"
-  "\374\374\374\377\374\374\374\377\375\375\375\377\375\375\375\377\376"
-  "\376\376\377\377\377\377\377\377\377\377\377\356\356\356\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\366\366\366\377\366"
-  "\366\366\377\367\367\367\377\367\367\367\377\370\370\370\377\371\371"
-  "\371\377\371\371\371\377\372\372\372\377nnn\377\374\374\374\377\374\374"
-  "\374\377\375\375\375\377\375\375\375\377\376\376\376\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\356\356\356\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0R\0\0\0\20\0"
-  "\0\0\0\0\0\0\15\0\0\0D\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0"
-  "\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0"
-  "\0\0R\0\0\0R\0\0\0R\0\0\0E\0\0\0\16\0\0\0\0\0\0\0\2\0\0\0\15\0\0\0\20"
-  "\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0"
-  "\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0"
-  "\0\0\20\0\0\0\20\0\0\0\20\0\0\0\16\0\0\0\3"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_table_fill)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_table_fill[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_table_fill[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\16\0\0\0\3\0\0\0\0\0\0\0\377\262\262\262\377\262\262\262\377\262"
-  "\262\262\377\262\262\262\377\262\262\262\377\262\262\262\377\262\262"
-  "\262\377\262\262\262\377\262\262\262\377\260\260\260\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\377\336\336\336\377\0\0"
-  "\0\377\0\0\0E\0\0\0\16\0\0\0\0\0\0\0\377\262\262\262\377\247\247\247"
-  "\377\247\247\247\377\247\247\247\377\247\247\247\377\247\247\247\377"
-  "\247\247\247\377\247\247\247\377\250\250\250\377LLL\377\363\363\363\377"
-  "\363\363\363\377\364\364\364\377\365\365\365\377\365\365\365\377\366"
-  "\366\366\377\366\366\366\377\367\367\367\377\346\346\346\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\262\262\262\377\247\247\247\377\247"
-  "\247\247\377\247\247\247\377\247\247\247\377\247\247\247\377\247\247"
-  "\247\377\247\247\247\377\250\250\250\377\250\250\250\377\363\363\363"
-  "\377\363\363\363\377\364\364\364\377\365\365\365\377\365\365\365\377"
-  "\366\366\366\377\366\366\366\377\367\367\367\377\346\346\346\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\262\262\262\377\247\247\247"
-  "\377\247\247\247\377\247\247\247\377\247\247\247\377\247\247\247\377"
-  "\247\247\247\377\250\250\250\377\250\250\250\377III\377\363\363\363\377"
-  "\364\364\364\377\365\365\365\377\365\365\365\377\366\366\366\377\366"
-  "\366\366\377\367\367\367\377\367\367\367\377\347\347\347\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\262\262\262\377\247\247\247\377\247"
-  "\247\247\377\247\247\247\377\247\247\247\377\247\247\247\377\250\250"
-  "\250\377\250\250\250\377\251\251\251\377\251\251\251\377\364\364\364"
-  "\377\365\365\365\377\365\365\365\377\366\366\366\377\366\366\366\377"
-  "\367\367\367\377\367\367\367\377\370\370\370\377\350\350\350\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\262\262\262\377\247\247\247"
-  "\377\247\247\247\377\247\247\247\377\247\247\247\377\250\250\250\377"
-  "\250\250\250\377\250\250\250\377\251\251\251\377JJJ\377\365\365\365\377"
-  "\365\365\365\377\366\366\366\377\366\366\366\377\367\367\367\377\367"
-  "\367\367\377\370\370\370\377\371\371\371\377\350\350\350\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\262\262\262\377\247\247\247\377\247"
-  "\247\247\377\247\247\247\377\250\250\250\377\250\250\250\377\250\250"
-  "\250\377\251\251\251\377\252\252\252\377\253\253\253\377\365\365\365"
-  "\377\366\366\366\377\366\366\366\377\367\367\367\377\367\367\367\377"
-  "\370\370\370\377\371\371\371\377\371\371\371\377\351\351\351\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\262\262\262\377\247\247\247"
-  "\377\247\247\247\377\250\250\250\377\250\250\250\377\250\250\250\377"
-  "\251\251\251\377\251\251\251\377\253\253\253\377JJJ\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\370\370\370\377\371"
-  "\371\371\377\371\371\371\377\372\372\372\377\351\351\351\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\262\262\262\377\250\250\250\377\250"
-  "\250\250\377\250\250\250\377\250\250\250\377\251\251\251\377\251\251"
-  "\251\377\252\252\252\377\253\253\253\377\253\253\253\377\366\366\366"
-  "\377\367\367\367\377\367\367\367\377\370\370\370\377\371\371\371\377"
-  "\371\371\371\377\372\372\372\377\372\372\372\377\352\352\352\377\0\0"
-  "\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\261\261\261\377JJJ\377\250\250"
-  "\250\377III\377\251\251\251\377III\377\252\252\252\377JJJ\377\253\253"
-  "\253\377KKK\377\254\254\254\377KKK\377\255\255\255\377LLL\377\255\255"
-  "\255\377LLL\377\256\256\256\377LLL\377\244\244\244\377\0\0\0\377\0\0"
-  "\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\362\362\362\377\362\362"
-  "\362\377\363\363\363\377\363\363\363\377\364\364\364\377\365\365\365"
-  "\377\365\365\365\377\366\366\366\377\254\254\254\377\254\254\254\377"
-  "\255\255\255\377\255\255\255\377\255\255\255\377\256\256\256\377\256"
-  "\256\256\377\257\257\257\377\257\257\257\377\244\244\244\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\363\363\363\377\363"
-  "\363\363\377\363\363\363\377\364\364\364\377\365\365\365\377\365\365"
-  "\365\377\366\366\366\377\367\367\367\377KKK\377\255\255\255\377\255\255"
-  "\255\377\255\255\255\377\256\256\256\377\256\256\256\377\257\257\257"
-  "\377\257\257\257\377\257\257\257\377\244\244\244\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\363\363\363\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\365\365\365\377\366\366\366"
-  "\377\366\366\366\377\367\367\367\377\255\255\255\377\255\255\255\377"
-  "\255\255\255\377\256\256\256\377\256\256\256\377\257\257\257\377\257"
-  "\257\257\377\257\257\257\377\260\260\260\377\244\244\244\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\364\364\364\377\364"
-  "\364\364\377\365\365\365\377\365\365\365\377\366\366\366\377\366\366"
-  "\366\377\367\367\367\377\370\370\370\377LLL\377\255\255\255\377\256\256"
-  "\256\377\256\256\256\377\257\257\257\377\257\257\257\377\257\257\257"
-  "\377\260\260\260\377\260\260\260\377\245\245\245\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\365\365\365\377\365\365"
-  "\365\377\365\365\365\377\366\366\366\377\366\366\366\377\367\367\367"
-  "\377\367\367\367\377\371\371\371\377\255\255\255\377\256\256\256\377"
-  "\256\256\256\377\257\257\257\377\257\257\257\377\257\257\257\377\260"
-  "\260\260\377\260\260\260\377\261\261\261\377\246\246\246\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\365\365\365\377\365"
-  "\365\365\377\366\366\366\377\366\366\366\377\367\367\367\377\367\367"
-  "\367\377\370\370\370\377\371\371\371\377LLL\377\256\256\256\377\257\257"
-  "\257\377\257\257\257\377\257\257\257\377\260\260\260\377\260\260\260"
-  "\377\261\261\261\377\262\262\262\377\246\246\246\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\366\366\366\377\366\366"
-  "\366\377\366\366\366\377\367\367\367\377\367\367\367\377\370\370\370"
-  "\377\371\371\371\377\372\372\372\377\256\256\256\377\257\257\257\377"
-  "\257\257\257\377\257\257\257\377\260\260\260\377\260\260\260\377\261"
-  "\261\261\377\262\262\262\377\262\262\262\377\246\246\246\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\377\377\377\377\366\366\366\377\366"
-  "\366\366\377\367\367\367\377\367\367\367\377\370\370\370\377\371\371"
-  "\371\377\371\371\371\377\372\372\372\377LLL\377\257\257\257\377\257\257"
-  "\257\377\260\260\260\377\260\260\260\377\261\261\261\377\262\262\262"
-  "\377\262\262\262\377\262\262\262\377\246\246\246\377\0\0\0\377\0\0\0"
-  "R\0\0\0\20\0\0\0\0\0\0\0\377\356\356\356\377\346\346\346\377\346\346"
-  "\346\377\346\346\346\377\347\347\347\377\350\350\350\377\350\350\350"
-  "\377\351\351\351\377\352\352\352\377\244\244\244\377\244\244\244\377"
-  "\244\244\244\377\244\244\244\377\245\245\245\377\246\246\246\377\246"
-  "\246\246\377\246\246\246\377\246\246\246\377\232\232\232\377\0\0\0\377"
-  "\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0R\0\0\0\20\0\0\0\0\0\0\0\15\0\0\0"
-  "D\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0"
-  "\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0\0\0R\0"
-  "\0\0E\0\0\0\16\0\0\0\0\0\0\0\2\0\0\0\15\0\0\0\20\0\0\0\20\0\0\0\20\0"
-  "\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20"
-  "\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0\20\0\0\0"
-  "\20\0\0\0\16\0\0\0\3"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_text_bulleted_list)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_text_bulleted_list[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_text_bulleted_list[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\27\0\0\0\224\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\232"
-  "\0\0\0'\0\0\0\6\0\0\0\1\0\0\0\224\342\342\342\377\362\362\362\377\362"
-  "\362\362\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363"
-  "\363\377\363\363\363\377\364\364\364\377\364\364\364\377\364\364\364"
-  "\377\365\365\365\377\365\365\365\377\365\365\365\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\364\364\364\377\333"
-  "\333\333\377\0\0\0\243\0\0\0\25\0\0\0\6\0\0\0\377\360\360\360\377\340"
-  "\340\340\377\340\340\340\377\341\341\341\377\342\342\342\377\343\343"
-  "\343\377\344\344\344\377\345\345\345\377\346\346\346\377\347\347\347"
-  "\377\350\350\350\377\350\350\350\377\351\351\351\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\355\355\355\377\0\0\0\377\0\0\0)\0\0\0\16\0\0\0\377\362"
-  "\362\362\377\341\341\341\377\341\341\341\377\342\342\342\377\343\343"
-  "\343\377\344\344\344\377\345\345\345\377\346\346\346\377\347\347\347"
-  "\377\350\350\350\377\351\351\351\377\352\352\352\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\361\361\361\377\0\0\0\377\0\0\0""8\0\0\0"
-  "\25\0\0\0\377\362\362\362\377\342\342\342\377\343\343\343\377\236\236"
-  "\236\377mmm\377\237\237\237\377\346\346\346\377\347\347\347\377ooo\377"
-  "ppp\377ppp\377qqq\377qqq\377qqq\377rrr\377rrr\377sss\377\360\360\360"
-  "\377\361\361\361\377\362\362\362\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0"
-  "\377\363\363\363\377\343\343\343\377\344\344\344\377nnn\377nnn\377nn"
-  "n\377\347\347\347\377\350\350\350\377\351\351\351\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\355\355\355\377\356"
-  "\356\356\377\357\357\357\377\360\360\360\377\361\361\361\377\362\362"
-  "\362\377\363\363\363\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363"
-  "\363\377\344\344\344\377\345\345\345\377\240\240\240\377ooo\377\241\241"
-  "\241\377\350\350\350\377\351\351\351\377ppp\377qqq\377qqq\377rrr\377"
-  "rrr\377sss\377sss\377sss\377ttt\377\362\362\362\377\363\363\363\377\364"
-  "\364\364\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377\345"
-  "\345\345\377\346\346\346\377\347\347\347\377\350\350\350\377\351\351"
-  "\351\377\351\351\351\377\352\352\352\377\353\353\353\377\354\354\354"
-  "\377\355\355\355\377\356\356\356\377\357\357\357\377\360\360\360\377"
-  "\356\356\356\377\360\360\360\377\361\361\361\377\363\363\363\377\364"
-  "\364\364\377\365\365\365\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\364"
-  "\364\364\377\346\346\346\377\347\347\347\377\350\350\350\377\351\351"
-  "\351\377\352\352\352\377\352\352\352\377\353\353\353\377qqq\377rrr\377"
-  "rrr\377sss\377sss\377ttt\377\362\362\362\377\363\363\363\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\366\366\366\377\0\0\0\377\0"
-  "\0\0=\0\0\0\27\0\0\0\377\364\364\364\377\347\347\347\377\350\350\350"
-  "\377\351\351\351\377\352\352\352\377\353\353\353\377\354\354\354\377"
-  "\354\354\354\377\355\355\355\377\356\356\356\377\357\357\357\377\360"
-  "\360\360\377\361\361\361\377\362\362\362\377\363\363\363\377\364\364"
-  "\364\377\365\365\365\377\365\365\365\377\366\366\366\377\367\367\367"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365\377\350\350\350"
-  "\377\351\351\351\377\352\352\352\377\353\353\353\377\354\354\354\377"
-  "\355\355\355\377\356\356\356\377\356\356\356\377\357\357\357\377\360"
-  "\360\360\377\361\361\361\377\362\362\362\377\363\363\363\377\364\364"
-  "\364\377\365\365\365\377\366\366\366\377\367\367\367\377\367\367\367"
-  "\377\370\370\370\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365"
-  "\377\351\351\351\377\352\352\352\377\353\353\353\377\354\354\354\377"
-  "\355\355\355\377\356\356\356\377\357\357\357\377\360\360\360\377\360"
-  "\360\360\377\361\361\361\377\362\362\362\377\363\363\363\377\364\364"
-  "\364\377\365\365\365\377\366\366\366\377\367\367\367\377\370\370\370"
-  "\377\370\370\370\377\371\371\371\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0"
-  "\377\365\365\365\377\352\352\352\377\353\353\353\377\354\354\354\377"
-  "\355\355\355\377\356\356\356\377\357\357\357\377\360\360\360\377\361"
-  "\361\361\377\362\362\362\377\362\362\362\377\363\363\363\377\364\364"
-  "\364\377\365\365\365\377\366\366\366\377\367\367\367\377\370\370\370"
-  "\377\371\371\371\377\372\372\372\377\372\372\372\377\0\0\0\377\0\0\0"
-  "=\0\0\0\27\0\0\0\377\366\366\366\377\353\353\353\377\354\354\354\377"
-  "\303\303\303\377rrr\377\304\304\304\377\360\360\360\377\361\361\361\377"
-  "ttt\377uuu\377\203\203\203\377uuu\377vvv\377vvv\377www\377www\377xxx"
-  "\377\372\372\372\377\373\373\373\377\374\374\374\377\0\0\0\377\0\0\0"
-  "=\0\0\0\27\0\0\0\377\367\367\367\377\355\355\355\377\355\355\355\377"
-  "rrr\377sss\377sss\377\361\361\361\377\362\362\362\377\363\363\363\377"
-  "\364\364\364\377\365\365\365\377\365\365\365\377\366\366\366\377\367"
-  "\367\367\377\370\370\370\377\371\371\371\377\372\372\372\377\373\373"
-  "\373\377\374\374\374\377\375\375\375\377\0\0\0\377\0\0\0=\0\0\0\27\0"
-  "\0\0\377\367\367\367\377\356\356\356\377\357\357\357\377\304\304\304"
-  "\377sss\377\306\306\306\377\362\362\362\377\363\363\363\377uuu\377vv"
-  "v\377vvv\377www\377www\377www\377xxx\377xxx\377\373\373\373\377\374\374"
-  "\374\377\375\375\375\377\376\376\376\377\0\0\0\377\0\0\0=\0\0\0\27\0"
-  "\0\0\377\370\370\370\377\360\360\360\377\361\361\361\377\362\362\362"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365\365\377"
-  "\366\366\366\377\367\367\367\377\370\370\370\377\371\371\371\377\372"
-  "\372\372\377\373\373\373\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\376\376\376\377\377\377\377\377\377\377\377\377\0\0\0\377\0"
-  "\0\0=\0\0\0\27\0\0\0\377\370\370\370\377\361\361\361\377\362\362\362"
-  "\377\363\363\363\377\364\364\364\377\364\364\364\377\365\365\365\377"
-  "\366\366\366\377\367\367\367\377\370\370\370\377\371\371\371\377\372"
-  "\372\372\377\373\373\373\377\374\374\374\377\375\375\375\377\375\375"
-  "\375\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\362\362\362\377\362\362\362"
-  "\377\363\363\363\377\364\364\364\377\365\365\365\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\370\370\370\377\371\371\371\377\372"
-  "\372\372\377\373\373\373\377\374\374\374\377\375\375\375\377\376\376"
-  "\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\354\354\354\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\232\311\311\311"
-  "\377\355\355\355\377\370\370\370\377\365\365\365\377\366\366\366\377"
-  "\367\367\367\377\370\370\370\377\370\370\370\377\371\371\371\377\372"
-  "\372\372\377\373\373\373\377\374\374\374\377\375\375\375\377\376\376"
-  "\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\356\356\356\377\275\275\275\377\0\0\0\324\0\0\0:\0\0\0\26\0\0\0"
-  "\34\0\0\0\243\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\324\0"
-  "\0\0Y\0\0\0-\0\0\0\20\0\0\0\6\0\0\0\24\0\0\0)\0\0\0""8\0\0\0<\0\0\0="
-  "\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0"
-  "=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0""9\0\0\0-\0\0\0\31\0\0\0\7\0\0\0"
-  "\1\0\0\0\6\0\0\0\16\0\0\0\24\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0"
-  "\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27"
-  "\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\25\0\0\0\20\0\0\0\7\0\0\0"
-  "\2\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0"
-  "\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0"
-  "\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\2\0\0\0\1\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_text_indent)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_text_indent[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_text_indent[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\27\0\0\0\224\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\232"
-  "\0\0\0'\0\0\0\6\0\0\0\1\0\0\0\224\342\342\342\377\362\362\362\377\362"
-  "\362\362\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363"
-  "\363\377\363\363\363\377\364\364\364\377\364\364\364\377\364\364\364"
-  "\377\365\365\365\377\365\365\365\377\365\365\365\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\364\364\364\377\333"
-  "\333\333\377\0\0\0\243\0\0\0\25\0\0\0\6\0\0\0\377\360\360\360\377\340"
-  "\340\340\377\340\340\340\377\341\341\341\377\342\342\342\377\343\343"
-  "\343\377\344\344\344\377\345\345\345\377\256\256\256\377\347\347\347"
-  "\377\350\350\350\377\350\350\350\377\351\351\351\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\343\343\343\377\0\0\0\377\0\0\0)\0\0\0\16\0\0\0\377\362"
-  "\362\362\377\341\341\341\377\341\341\341\377\342\342\342\377\343\343"
-  "\343\377\344\344\344\377\345\345\345\377\346\346\346\377\347\347\347"
-  "\377\350\350\350\377\351\351\351\377\352\352\352\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\347\347\347\377\0\0\0\377\0\0\0""8\0\0\0"
-  "\25\0\0\0\377\362\362\362\377\342\342\342\377\254\254\254\377\254\254"
-  "\254\377\255\255\255\377\256\256\256\377\256\256\256\377\257\257\257"
-  "\377\260\260\260\377\261\261\261\377\262\262\262\377\262\262\262\377"
-  "\263\263\263\377\263\263\263\377\264\264\264\377\265\265\265\377\265"
-  "\265\265\377\266\266\266\377\361\361\361\377\350\350\350\377\0\0\0\377"
-  "\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377\343\343\343\377\344\344\344"
-  "\377\345\345\345\377\345\345\345\377\346\346\346\377\347\347\347\377"
-  "\350\350\350\377\351\351\351\377\352\352\352\377\353\353\353\377\354"
-  "\354\354\377\355\355\355\377\355\355\355\377\356\356\356\377\357\357"
-  "\357\377\360\360\360\377\361\361\361\377\362\362\362\377\351\351\351"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377\344\344\344"
-  "\377\345\345\345\377\346\346\346\377\347\347\347\377\347\347\347\377"
-  "\350\350\350\377\351\351\351\377\352\352\352\377\353\353\353\377\354"
-  "\354\354\377\355\355\355\377\356\356\356\377\357\357\357\377\357\357"
-  "\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363\363"
-  "\377\352\352\352\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363"
-  "\377\345\345\345\377\346\346\346\377\347\347\347\377\350\350\350\377"
-  "\351\351\351\377\351\351\351\377\352\352\352\377uuu\377vvv\377vvv\377"
-  "www\377www\377xxx\377xxx\377xxx\377yyy\377yyy\377\364\364\364\377\353"
-  "\353\353\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\364\364\364\377\346"
-  "\346\346\377\347\347\347\377\350\350\350\377\252\252\252\377\352\352"
-  "\352\377\352\352\352\377\353\353\353\377\354\354\354\377\355\355\355"
-  "\377\356\356\356\377\357\357\357\377\360\360\360\377\361\361\361\377"
-  "\362\362\362\377\363\363\363\377\363\363\363\377\364\364\364\377\365"
-  "\365\365\377\354\354\354\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\364"
-  "\364\364\377\347\347\347\377\350\350\350\377\351\351\351\377\0\0\0\377"
-  "\254\254\254\377\354\354\354\377\354\354\354\377vvv\377www\377www\377"
-  "xxx\377xxx\377yyy\377yyy\377zzz\377zzz\377zzz\377\366\366\366\377\355"
-  "\355\355\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\255\255\255\377\356\356"
-  "\356\377\356\356\356\377\357\357\357\377\360\360\360\377\361\361\361"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365\365\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\356\356\356\377\0\0"
-  "\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365\377\351\351\351\377\352"
-  "\352\352\377\353\353\353\377\0\0\0\377\255\255\255\377\356\356\356\377"
-  "\357\357\357\377xxx\377xxx\377xxx\377yyy\377yyy\377zzz\377zzz\377{{{"
-  "\377{{{\377|||\377\370\370\370\377\357\357\357\377\0\0\0\377\0\0\0=\0"
-  "\0\0\27\0\0\0\377\365\365\365\377\352\352\352\377\353\353\353\377\354"
-  "\354\354\377\255\255\255\377\356\356\356\377\357\357\357\377\360\360"
-  "\360\377\361\361\361\377\362\362\362\377\362\362\362\377\363\363\363"
-  "\377\364\364\364\377\365\365\365\377\366\366\366\377\367\367\367\377"
-  "\370\370\370\377\371\371\371\377\372\372\372\377\360\360\360\377\0\0"
-  "\0\377\0\0\0=\0\0\0\27\0\0\0\377\366\366\366\377\353\353\353\377\354"
-  "\354\354\377\355\355\355\377\356\356\356\377\357\357\357\377\360\360"
-  "\360\377\361\361\361\377yyy\377yyy\377zzz\377zzz\377zzz\377\366\366\366"
-  "\377\367\367\367\377\370\370\370\377\371\371\371\377\372\372\372\377"
-  "\373\373\373\377\362\362\362\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377"
-  "\367\367\367\377\355\355\355\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\365\365\365\377\366\366\366"
-  "\377\367\367\367\377\370\370\370\377\371\371\371\377\372\372\372\377"
-  "\373\373\373\377\374\374\374\377\363\363\363\377\0\0\0\377\0\0\0=\0\0"
-  "\0\27\0\0\0\377\367\367\367\377\356\356\356\377\357\357\357\377\357\357"
-  "\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363\363"
-  "\377\364\364\364\377\365\365\365\377\366\366\366\377\367\367\367\377"
-  "\367\367\367\377\370\370\370\377\371\371\371\377\372\372\372\377\373"
-  "\373\373\377\374\374\374\377\375\375\375\377\364\364\364\377\0\0\0\377"
-  "\0\0\0=\0\0\0\27\0\0\0\377\370\370\370\377\360\360\360\377\267\267\267"
-  "\377\270\270\270\377\270\270\270\377\270\270\270\377\271\271\271\377"
-  "\272\272\272\377\273\273\273\377\273\273\273\377\274\274\274\377\275"
-  "\275\275\377\276\276\276\377\276\276\276\377\276\276\276\377\277\277"
-  "\277\377\300\300\300\377\301\301\301\377\377\377\377\377\365\365\365"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\370\370\370\377\361\361\361"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\364\364\364\377"
-  "\365\365\365\377\366\366\366\377\367\367\367\377\370\370\370\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\375\375\375\377\376\376\376\377\377\377\377\377\377\377\377"
-  "\377\365\365\365\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\362\362\362"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365\365\377"
-  "\366\366\366\377\366\366\366\377\367\367\367\377\274\274\274\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\331\331\331\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0"
-  "\232\311\311\311\377\332\332\332\377\356\356\356\377\353\353\353\377"
-  "\354\354\354\377\355\355\355\377\356\356\356\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\365\365\365\377\365\365\365"
-  "\377\365\365\365\377\344\344\344\377\275\275\275\377\0\0\0\324\0\0\0"
-  ":\0\0\0\26\0\0\0\34\0\0\0\243\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\324\0\0\0Y\0\0\0-\0\0\0\20\0\0\0\6\0\0\0\24\0\0\0)\0\0\0""8\0"
-  "\0\0<\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0="
-  "\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0""9\0\0\0-\0\0\0\31\0"
-  "\0\0\7\0\0\0\1\0\0\0\6\0\0\0\16\0\0\0\24\0\0\0\27\0\0\0\27\0\0\0\27\0"
-  "\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27"
-  "\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\25\0\0\0\20\0\0\0"
-  "\7\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\3\0\0\0\3\0\0\0\3\0"
-  "\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0"
-  "\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\2\0\0\0\1\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_text_numbered_list)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_text_numbered_list[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_text_numbered_list[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\27\0\0\0\224\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\232"
-  "\0\0\0'\0\0\0\6\0\0\0\1\0\0\0\224\342\342\342\377\362\362\362\377\362"
-  "\362\362\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363"
-  "\363\377\363\363\363\377\364\364\364\377\364\364\364\377\364\364\364"
-  "\377\365\365\365\377\365\365\365\377\365\365\365\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\364\364\364\377\333"
-  "\333\333\377\0\0\0\243\0\0\0\25\0\0\0\6\0\0\0\377\360\360\360\377\340"
-  "\340\340\377\340\340\340\377\341\341\341\377\342\342\342\377\343\343"
-  "\343\377\344\344\344\377\345\345\345\377\346\346\346\377\347\347\347"
-  "\377\350\350\350\377\350\350\350\377\351\351\351\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\355\355\355\377\0\0\0\377\0\0\0)\0\0\0\16\0\0\0\377\362"
-  "\362\362\377\341\341\341\377\341\341\341\377\314\314\314\377mmm\377\344"
-  "\344\344\377\345\345\345\377\346\346\346\377\347\347\347\377\350\350"
-  "\350\377\351\351\351\377\352\352\352\377\352\352\352\377\353\353\353"
-  "\377\354\354\354\377\355\355\355\377\356\356\356\377\357\357\357\377"
-  "\360\360\360\377\361\361\361\377\0\0\0\377\0\0\0""8\0\0\0\25\0\0\0\377"
-  "\362\362\362\377\342\342\342\377\315\315\315\377mmm\377mmm\377\345\345"
-  "\345\377\346\346\346\377\347\347\347\377ooo\377ppp\377ppp\377qqq\377"
-  "qqq\377qqq\377rrr\377rrr\377sss\377\360\360\360\377\361\361\361\377\362"
-  "\362\362\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377\343"
-  "\343\343\377\344\344\344\377\345\345\345\377nnn\377\346\346\346\377\347"
-  "\347\347\377\350\350\350\377\351\351\351\377\352\352\352\377\353\353"
-  "\353\377\354\354\354\377\355\355\355\377\355\355\355\377\356\356\356"
-  "\377\357\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377"
-  "\363\363\363\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377"
-  "\344\344\344\377\345\345\345\377\346\346\346\377ooo\377\347\347\347\377"
-  "\350\350\350\377\351\351\351\377ppp\377qqq\377qqq\377rrr\377rrr\377s"
-  "ss\377sss\377sss\377ttt\377\362\362\362\377\363\363\363\377\364\364\364"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377\345\345\345"
-  "\377\346\346\346\377\347\347\347\377ooo\377\351\351\351\377\351\351\351"
-  "\377\352\352\352\377\353\353\353\377\354\354\354\377\355\355\355\377"
-  "\356\356\356\377\357\357\357\377\360\360\360\377\356\356\356\377\360"
-  "\360\360\377\361\361\361\377\363\363\363\377\364\364\364\377\365\365"
-  "\365\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\364\364\364\377\346\346"
-  "\346\377\347\347\347\377\350\350\350\377\351\351\351\377\352\352\352"
-  "\377\352\352\352\377\353\353\353\377\206\206\206\377rrr\377rrr\377ss"
-  "s\377sss\377ttt\377\362\362\362\377\363\363\363\377\363\363\363\377\364"
-  "\364\364\377\365\365\365\377\366\366\366\377\0\0\0\377\0\0\0=\0\0\0\27"
-  "\0\0\0\377\364\364\364\377\347\347\347\377\350\350\350\377\351\351\351"
-  "\377\352\352\352\377\353\353\353\377\354\354\354\377\354\354\354\377"
-  "\355\355\355\377\356\356\356\377\357\357\357\377\360\360\360\377\361"
-  "\361\361\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365"
-  "\365\377\365\365\365\377\366\366\366\377\367\367\367\377\0\0\0\377\0"
-  "\0\0=\0\0\0\27\0\0\0\377\365\365\365\377\350\350\350\377\351\351\351"
-  "\377\352\352\352\377\353\353\353\377\354\354\354\377\355\355\355\377"
-  "\356\356\356\377\356\356\356\377\357\357\357\377\360\360\360\377\361"
-  "\361\361\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365"
-  "\365\377\366\366\366\377\367\367\367\377\367\367\367\377\370\370\370"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365\377\351\351\351"
-  "\377\352\352\352\377\353\353\353\377\354\354\354\377\355\355\355\377"
-  "\356\356\356\377\357\357\357\377\360\360\360\377\360\360\360\377\361"
-  "\361\361\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365"
-  "\365\377\366\366\366\377\367\367\367\377\370\370\370\377\370\370\370"
-  "\377\371\371\371\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365"
-  "\377\352\352\352\377\353\353\353\377\303\303\303\377rrr\377\327\327\327"
-  "\377\357\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377"
-  "\362\362\362\377\363\363\363\377\364\364\364\377\365\365\365\377\366"
-  "\366\366\377\367\367\367\377\370\370\370\377\371\371\371\377\372\372"
-  "\372\377\372\372\372\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\366\366"
-  "\366\377\353\353\353\377\354\354\354\377rrr\377\356\356\356\377sss\377"
-  "\360\360\360\377\361\361\361\377ttt\377uuu\377\203\203\203\377uuu\377"
-  "vvv\377vvv\377www\377www\377xxx\377\372\372\372\377\373\373\373\377\374"
-  "\374\374\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\367\367\367\377\355"
-  "\355\355\377\355\355\355\377\356\356\356\377\330\330\330\377sss\377\361"
-  "\361\361\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365"
-  "\365\377\365\365\365\377\366\366\366\377\367\367\367\377\370\370\370"
-  "\377\371\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377"
-  "\375\375\375\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\367\367\367\377"
-  "\356\356\356\377\357\357\357\377\330\330\330\377sss\377\332\332\332\377"
-  "\362\362\362\377\363\363\363\377uuu\377vvv\377vvv\377www\377www\377w"
-  "ww\377xxx\377xxx\377\373\373\373\377\374\374\374\377\375\375\375\377"
-  "\376\376\376\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\370\370\370\377"
-  "\360\360\360\377\361\361\361\377ttt\377ttt\377uuu\377\364\364\364\377"
-  "\365\365\365\377\366\366\366\377\367\367\367\377\370\370\370\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\373\373\373\377\374\374"
-  "\374\377\375\375\375\377\376\376\376\377\377\377\377\377\377\377\377"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\370\370\370\377\361\361\361"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\364\364\364\377"
-  "\365\365\365\377\366\366\366\377\367\367\367\377\370\370\370\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\375\375\375\377\376\376\376\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\362\362\362"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365\365\377"
-  "\366\366\366\377\366\366\366\377\367\367\367\377\370\370\370\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\354\354\354\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0"
-  "\232\311\311\311\377\355\355\355\377\370\370\370\377\365\365\365\377"
-  "\366\366\366\377\367\367\367\377\370\370\370\377\370\370\370\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\356\356\356\377\275\275\275\377\0\0\0\324\0\0\0"
-  ":\0\0\0\26\0\0\0\34\0\0\0\243\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\324\0\0\0Y\0\0\0-\0\0\0\20\0\0\0\6\0\0\0\24\0\0\0)\0\0\0""8\0"
-  "\0\0<\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0="
-  "\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0""9\0\0\0-\0\0\0\31\0"
-  "\0\0\7\0\0\0\1\0\0\0\6\0\0\0\16\0\0\0\24\0\0\0\27\0\0\0\27\0\0\0\27\0"
-  "\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27"
-  "\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\25\0\0\0\20\0\0\0"
-  "\7\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\3\0\0\0\3\0\0\0\3\0"
-  "\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0"
-  "\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\2\0\0\0\1\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_text_unindent)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_text_unindent[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_text_unindent[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\27\0\0\0\224\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\232"
-  "\0\0\0'\0\0\0\6\0\0\0\1\0\0\0\224\342\342\342\377\362\362\362\377\362"
-  "\362\362\377\362\362\362\377\362\362\362\377\363\363\363\377\363\363"
-  "\363\377\363\363\363\377\364\364\364\377\364\364\364\377\364\364\364"
-  "\377\365\365\365\377\365\365\365\377\365\365\365\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\364\364\364\377\333"
-  "\333\333\377\0\0\0\243\0\0\0\25\0\0\0\6\0\0\0\377\360\360\360\377\340"
-  "\340\340\377\340\340\340\377\341\341\341\377\342\342\342\377\343\343"
-  "\343\377\344\344\344\377\345\345\345\377\256\256\256\377\347\347\347"
-  "\377\350\350\350\377\350\350\350\377\351\351\351\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\343\343\343\377\0\0\0\377\0\0\0)\0\0\0\16\0\0\0\377\362"
-  "\362\362\377\341\341\341\377\341\341\341\377\342\342\342\377\343\343"
-  "\343\377\344\344\344\377\345\345\345\377\346\346\346\377\347\347\347"
-  "\377\350\350\350\377\351\351\351\377\352\352\352\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\347\347\347\377\0\0\0\377\0\0\0""8\0\0\0"
-  "\25\0\0\0\377\362\362\362\377\342\342\342\377\254\254\254\377\254\254"
-  "\254\377\255\255\255\377\256\256\256\377\256\256\256\377\257\257\257"
-  "\377\260\260\260\377\261\261\261\377\262\262\262\377\262\262\262\377"
-  "\263\263\263\377\263\263\263\377\264\264\264\377\265\265\265\377\265"
-  "\265\265\377\266\266\266\377\361\361\361\377\350\350\350\377\0\0\0\377"
-  "\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377\343\343\343\377\344\344\344"
-  "\377\345\345\345\377\345\345\345\377\346\346\346\377\347\347\347\377"
-  "\350\350\350\377\351\351\351\377\352\352\352\377\353\353\353\377\354"
-  "\354\354\377\355\355\355\377\355\355\355\377\356\356\356\377\357\357"
-  "\357\377\360\360\360\377\361\361\361\377\362\362\362\377\351\351\351"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363\377\344\344\344"
-  "\377\345\345\345\377\346\346\346\377\347\347\347\377\347\347\347\377"
-  "\350\350\350\377\351\351\351\377\352\352\352\377\353\353\353\377\354"
-  "\354\354\377\355\355\355\377\356\356\356\377\357\357\357\377\357\357"
-  "\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363\363"
-  "\377\352\352\352\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\363\363\363"
-  "\377\345\345\345\377\346\346\346\377\347\347\347\377\350\350\350\377"
-  "\351\351\351\377\351\351\351\377\352\352\352\377uuu\377vvv\377vvv\377"
-  "www\377www\377xxx\377xxx\377xxx\377yyy\377yyy\377\364\364\364\377\353"
-  "\353\353\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\364\364\364\377\346"
-  "\346\346\377\347\347\347\377\252\252\252\377\351\351\351\377\352\352"
-  "\352\377\352\352\352\377\353\353\353\377\354\354\354\377\355\355\355"
-  "\377\356\356\356\377\357\357\357\377\360\360\360\377\361\361\361\377"
-  "\362\362\362\377\363\363\363\377\363\363\363\377\364\364\364\377\365"
-  "\365\365\377\354\354\354\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\364"
-  "\364\364\377\347\347\347\377\252\252\252\377\0\0\0\377\352\352\352\377"
-  "\353\353\353\377\354\354\354\377\354\354\354\377vvv\377www\377www\377"
-  "xxx\377xxx\377yyy\377yyy\377zzz\377zzz\377zzz\377\366\366\366\377\355"
-  "\355\355\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365\377\252"
-  "\252\252\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\356\356"
-  "\356\377\356\356\356\377\357\357\357\377\360\360\360\377\361\361\361"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365\365\377"
-  "\366\366\366\377\367\367\367\377\367\367\367\377\356\356\356\377\0\0"
-  "\0\377\0\0\0=\0\0\0\27\0\0\0\377\365\365\365\377\351\351\351\377\253"
-  "\253\253\377\0\0\0\377\354\354\354\377\355\355\355\377\356\356\356\377"
-  "\357\357\357\377xxx\377xxx\377xxx\377yyy\377yyy\377zzz\377zzz\377{{{"
-  "\377{{{\377|||\377\370\370\370\377\357\357\357\377\0\0\0\377\0\0\0=\0"
-  "\0\0\27\0\0\0\377\365\365\365\377\352\352\352\377\353\353\353\377\255"
-  "\255\255\377\355\355\355\377\356\356\356\377\357\357\357\377\360\360"
-  "\360\377\361\361\361\377\362\362\362\377\362\362\362\377\363\363\363"
-  "\377\364\364\364\377\365\365\365\377\366\366\366\377\367\367\367\377"
-  "\370\370\370\377\371\371\371\377\372\372\372\377\360\360\360\377\0\0"
-  "\0\377\0\0\0=\0\0\0\27\0\0\0\377\366\366\366\377\353\353\353\377\354"
-  "\354\354\377\355\355\355\377\356\356\356\377\357\357\357\377\360\360"
-  "\360\377\361\361\361\377yyy\377yyy\377zzz\377zzz\377zzz\377\366\366\366"
-  "\377\367\367\367\377\370\370\370\377\371\371\371\377\372\372\372\377"
-  "\373\373\373\377\362\362\362\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377"
-  "\367\367\367\377\355\355\355\377\355\355\355\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\365\365\365\377\366\366\366"
-  "\377\367\367\367\377\370\370\370\377\371\371\371\377\372\372\372\377"
-  "\373\373\373\377\374\374\374\377\363\363\363\377\0\0\0\377\0\0\0=\0\0"
-  "\0\27\0\0\0\377\367\367\367\377\356\356\356\377\357\357\357\377\357\357"
-  "\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363\363"
-  "\377\364\364\364\377\365\365\365\377\366\366\366\377\367\367\367\377"
-  "\367\367\367\377\370\370\370\377\371\371\371\377\372\372\372\377\373"
-  "\373\373\377\374\374\374\377\375\375\375\377\364\364\364\377\0\0\0\377"
-  "\0\0\0=\0\0\0\27\0\0\0\377\370\370\370\377\360\360\360\377\267\267\267"
-  "\377\270\270\270\377\270\270\270\377\270\270\270\377\271\271\271\377"
-  "\272\272\272\377\273\273\273\377\273\273\273\377\274\274\274\377\275"
-  "\275\275\377\276\276\276\377\276\276\276\377\276\276\276\377\277\277"
-  "\277\377\300\300\300\377\301\301\301\377\377\377\377\377\365\365\365"
-  "\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\370\370\370\377\361\361\361"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\364\364\364\377"
-  "\365\365\365\377\366\366\366\377\367\367\367\377\370\370\370\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\375\375\375\377\376\376\376\377\377\377\377\377\377\377\377"
-  "\377\365\365\365\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0\377\362\362\362"
-  "\377\362\362\362\377\363\363\363\377\364\364\364\377\365\365\365\377"
-  "\366\366\366\377\366\366\366\377\367\367\367\377\274\274\274\377\371"
-  "\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
-  "\375\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\331\331\331\377\0\0\0\377\0\0\0=\0\0\0\27\0\0\0"
-  "\232\311\311\311\377\332\332\332\377\356\356\356\377\353\353\353\377"
-  "\354\354\354\377\355\355\355\377\356\356\356\377\356\356\356\377\357"
-  "\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363"
-  "\363\377\364\364\364\377\365\365\365\377\365\365\365\377\365\365\365"
-  "\377\365\365\365\377\344\344\344\377\275\275\275\377\0\0\0\324\0\0\0"
-  ":\0\0\0\26\0\0\0\34\0\0\0\243\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\324\0\0\0Y\0\0\0-\0\0\0\20\0\0\0\6\0\0\0\24\0\0\0)\0\0\0""8\0"
-  "\0\0<\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0="
-  "\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0=\0\0\0""9\0\0\0-\0\0\0\31\0"
-  "\0\0\7\0\0\0\1\0\0\0\6\0\0\0\16\0\0\0\24\0\0\0\27\0\0\0\27\0\0\0\27\0"
-  "\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27"
-  "\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\27\0\0\0\25\0\0\0\20\0\0\0"
-  "\7\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\3\0\0\0\3\0\0\0\3\0"
-  "\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0"
-  "\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\3\0\0\0\2\0\0\0\1\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_timer)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_timer[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_timer[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\23\0"
-  "\0\0o\0\0\0\266\0\0\0\344\0\0\0\373\0\0\0\373\0\0\0\345\0\0\0\270\0\0"
-  "\0t\0\0\0\31\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\205\0\0\0"
-  "\373\207\207\207\377\300\300\300\377\323\323\323\377\326\326\326\377"
-  "\325\325\325\377\322\322\322\377\275\275\275\377\204\204\204\377\0\0"
-  "\0\374\0\0\0\217\0\0\0\10\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377[\210\262\377\0\0\0\377\324\324"
-  "\324\377\342\342\342\377\365\365\365\377\374\374\374\377\374\374\374"
-  "\377\374\374\374\377\373\373\373\377\363\363\363\377\354\354\354\377"
-  "\341\341\341\377\220\220\220\377\0\0\0\324\0\0\0""6\0\0\0\3\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\236"
-  "\270\321\377P\200\255\377\0\0\0\377\375\375\375\377\375\375\375\377\375"
-  "\375\375\377\316\316\316\377\310\310\310\377\374\374\374\377\373\373"
-  "\373\377\373\373\373\377\367\367\367\377\350\350\350\377\272\272\272"
-  "\377\0\0\0\352\0\0\0\77\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\377\277\321\341"
-  "\377\257\305\332\377\262\307\333\377\266\312\335\377\244\275\325\377"
-  "\234\267\321\377P\200\255\377\10\15\21\377\375\375\375\377\375\375\375"
-  "\377\277\277\277\377\270\270\270\377\373\373\373\377\373\373\373\377"
-  "\372\372\372\377\371\371\371\377\370\370\370\377\350\350\350\377\301"
-  "\301\301\377\0\0\0\330\0\0\0\32\0\0\0\4\0\0\0\0\0\0\0\377\302\322\341"
-  "\377\240\272\323\377\234\267\321\377\232\265\317\377\240\272\323\377"
-  "\234\267\321\377\227\263\316\377_\213\264\377\0\0\0\377\375\375\375\377"
-  "\260\260\260\377\251\251\251\377\373\373\373\377\373\373\373\377\371"
-  "\371\371\377\371\371\371\377\367\367\367\377\366\366\366\377\345\345"
-  "\345\377\217\217\217\377\0\0\0\242\0\0\0\20\0\0\0\1\0\0\0\377\310\326"
-  "\344\377\236\270\321\377\232\265\317\377\234\267\321\377\234\267\321"
-  "\377\234\267\321\377\240\272\323\377\225\262\316\377Ly\243\377\0\0\0"
-  "\377\241\241\241\377\231\231\231\377\373\373\373\377\372\372\372\377"
-  "\371\371\371\377\370\370\370\377\367\367\367\377\365\365\365\377\363"
-  "\363\363\377\350\350\350\377\0\0\0\374\0\0\0>\0\0\0\11\0\0\0\377g\213"
-  "\254\377\77e\210\377\77e\210\377\77e\210\377\77e\210\377\77e\210\377"
-  "\77e\210\377*C[\377\0\0\0\377\375\375\375\377\221\221\221\377\212\212"
-  "\212\377\373\373\373\377\372\372\372\377\371\371\371\377\370\370\370"
-  "\377\366\366\366\377\365\365\365\377\363\363\363\377\355\355\355\377"
-  "\216\216\216\377\0\0\0\227\0\0\0\25\0\0\0\377d\207\247\3777Yx\3777Yx"
-  "\3777Yx\377\77e\210\377\77e\210\377*C[\377\0\0\0\377\377\377\377\377"
-  "\376\376\376\377\201\201\201\377zzz\377\373\373\373\377\371\371\371\377"
-  "\370\370\370\377\367\367\367\377\365\365\365\377\364\364\364\377\362"
-  "\362\362\377\357\357\357\377\323\323\323\377\0\0\0\314\0\0\0(\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\77e\210\377*C[\377\0\0\0\377"
-  "\375\375\375\377\376\376\376\377\375\375\375\377rrr\377kkk\377\356\356"
-  "\356\377\371\371\371\377\370\370\370\377\366\366\366\377\364\364\364"
-  "\377\363\363\363\377\361\361\361\377\357\357\357\377\367\367\367\377"
-  "\0\0\0\354\0\0\0""9\0\0\0\0\0\0\0\373\350\350\350\377\372\372\372\377"
-  "\0\0\0\377*C[\377\0\0\0\377\374\374\374\377\374\374\374\377\374\374\374"
-  "\377\374\374\374\377ccc\377[[[\377\313\313\313\377\345\345\345\377\367"
-  "\367\367\377\365\365\365\377\364\364\364\377\362\362\362\377\273\273"
-  "\273\377\356\356\356\377\370\370\370\377\0\0\0\374\0\0\0D\0\0\0\0\0\0"
-  "\0\373\336\336\336\377\371\371\371\377\0\0\0\377\0\0\0\377\373\373\373"
-  "\377\373\373\373\377\373\373\373\377\373\373\373\377\373\373\373\377"
-  "\221\221\221\377LLL\377EEE\377bbb\377\300\300\300\377\335\335\335\377"
-  "\362\362\362\377\361\361\361\377\265\265\265\377\355\355\355\377\370"
-  "\370\370\377\0\0\0\374\0\0\0J\0\0\0\0\0\0\0\346\332\332\332\377\370\370"
-  "\370\377\0\0\0\377\371\371\371\377\371\371\371\377\371\371\371\377\372"
-  "\372\372\377\372\372\372\377\372\372\372\377\352\352\352\377\276\276"
-  "\276\377ddd\377...\377'''\377III\377\361\361\361\377\357\357\357\377"
-  "\355\355\355\377\371\371\371\377\367\367\367\377\0\0\0\355\0\0\0J\0\0"
-  "\0\0\0\0\0\273\275\275\275\377\365\365\365\377\367\367\367\377\370\370"
-  "\370\377\370\370\370\377\370\370\370\377\370\370\370\377\370\370\370"
-  "\377\370\370\370\377\367\367\367\377\366\366\366\377\335\335\335\377"
-  "\276\276\276\377WWW\377xxx\377\357\357\357\377\356\356\356\377\354\354"
-  "\354\377\371\371\371\377\323\323\323\377\0\0\0\316\0\0\0D\0\0\0\0\0\0"
-  "\0t\177\177\177\377\341\341\341\377\366\366\366\377\366\366\366\377\366"
-  "\366\366\377\366\366\366\377\367\367\367\377\366\366\366\377\366\366"
-  "\366\377\365\365\365\377\364\364\364\377\364\364\364\377\362\362\362"
-  "\377\361\361\361\377\357\357\357\377\356\356\356\377\355\355\355\377"
-  "\364\364\364\377\370\370\370\377\214\214\214\377\0\0\0\237\0\0\0""9\0"
-  "\0\0\0\0\0\0\31\0\0\0\374\320\320\320\377\353\353\353\377\364\364\364"
-  "\377\364\364\364\377\365\365\365\377\364\364\364\377\364\364\364\377"
-  "\364\364\364\377\363\363\363\377\362\362\362\377\361\361\361\377\360"
-  "\360\360\377\357\357\357\377\356\356\356\377\355\355\355\377\354\354"
-  "\354\377\370\370\370\377\361\361\361\377\0\0\0\374\0\0\0_\0\0\0(\0\0"
-  "\0\0\0\0\0\2\0\0\0\217\211\211\211\377\324\324\324\377\362\362\362\377"
-  "\362\362\362\377\362\362\362\377\362\362\362\377\362\362\362\377\361"
-  "\361\361\377\361\361\361\377\360\360\360\377\360\360\360\377\357\357"
-  "\357\377\356\356\356\377\355\355\355\377\354\354\354\377\371\371\371"
-  "\377\370\370\370\377\230\230\230\377\0\0\0\260\0\0\0H\0\0\0\25\0\0\0"
-  "\0\0\0\0\0\0\0\0\10\0\0\0\324\253\253\253\377\323\323\323\377\360\360"
-  "\360\377\360\360\360\377\360\360\360\377\360\360\360\377\360\360\360"
-  "\377\357\357\357\377\357\357\357\377\356\356\356\377\356\356\356\377"
-  "\355\355\355\377\354\354\354\377\371\371\371\377\370\370\370\377\304"
-  "\304\304\377\0\0\0\335\0\0\0Q\0\0\0.\0\0\0\11\0\0\0\0\0\0\0\0\0\0\0\1"
-  "\0\0\0""6\0\0\0\352\253\253\253\377\322\322\322\377\344\344\344\377\356"
-  "\356\356\377\356\356\356\377\356\356\356\377\256\256\256\377\255\255"
-  "\255\377\355\355\355\377\354\354\354\377\353\353\353\377\370\370\370"
-  "\377\370\370\370\377\302\302\302\377\0\0\0\355\0\0\0p\0\0\0<\0\0\0\20"
-  "\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\77\0\0\0\330\202\202\202"
-  "\377\315\315\315\377\331\331\331\377\354\354\354\377\354\354\354\377"
-  "\354\354\354\377\354\354\354\377\353\353\353\377\364\364\364\377\370"
-  "\370\370\377\367\367\367\377\214\214\214\377\0\0\0\335\0\0\0q\0\0\0B"
-  "\0\0\0\32\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0"
-  "\0\32\0\0\0\242\0\0\0\374\210\210\210\377\310\310\310\377\335\335\335"
-  "\377\370\370\370\377\370\370\370\377\367\367\367\377\361\361\361\377"
-  "\300\300\300\377\0\0\0\374\0\0\0\260\0\0\0Q\0\0\0<\0\0\0\32\0\0\0\5\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0"
-  "\20\0\0\0>\0\0\0\227\0\0\0\314\0\0\0\354\0\0\0\374\0\0\0\374\0\0\0\355"
-  "\0\0\0\316\0\0\0\237\0\0\0_\0\0\0H\0\0\0.\0\0\0\20\0\0\0\4\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\1\0\0\0\10\0\0\0\25\0\0\0(\0\0\0""9\0\0\0D\0\0\0J\0\0\0J\0\0\0D\0\0"
-  "\0""9\0\0\0(\0\0\0\25\0\0\0\10\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\1\0\0\0\6\0\0\0\12\0\0\0\15\0\0\0\17\0\0\0\17\0\0\0\15\0\0\0\12"
-  "\0\0\0\6\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_timer_stopped)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_timer_stopped[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_timer_stopped[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\23\0\0"
-  "\0o\0\0\0\266\0\0\0\344\0\0\0\373\0\0\0\373\0\0\0\345\0\0\0\270\0\0\0"
-  "t\0\0\0\31\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\205\0\0\0\373\207"
-  "\207\207\377\300\300\300\377\323\323\323\377\326\326\326\377\325\325"
-  "\325\377\322\322\322\377\275\275\275\377\204\204\204\377\0\0\0\374\0"
-  "\0\0\217\0\0\0\10\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0)\0\0\0\314\223\223\223\377\324\324\324\377"
-  "\342\342\342\377\365\365\365\377\374\374\374\377\374\374\374\377\374"
-  "\374\374\377\373\373\373\377\363\363\363\377\354\354\354\377\341\341"
-  "\341\377\220\220\220\377\0\0\0\324\0\0\0""6\0\0\0\3\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0)\0\0\0\344\277\277\277\377\336\336"
-  "\336\377\360\360\360\377\375\375\375\377\375\375\375\377\375\375\375"
-  "\377\316\316\316\377\310\310\310\377\374\374\374\377\373\373\373\377"
-  "\373\373\373\377\367\367\367\377\350\350\350\377\272\272\272\377\0\0"
-  "\0\352\0\0\0\77\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\314\267\267\267\377\342\342\342\377\373\373\373\377\375\375\375\377"
-  "\375\375\375\377\375\375\375\377\375\375\375\377\277\277\277\377\270"
-  "\270\270\377\373\373\373\377\373\373\373\377\372\372\372\377\371\371"
-  "\371\377\370\370\370\377\350\350\350\377\301\301\301\377\0\0\0\330\0"
-  "\0\0\32\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\205\207\207\207\377\336"
-  "\336\336\377\373\373\373\377\375\375\375\377\375\375\375\377\375\375"
-  "\375\377\375\375\375\377\375\375\375\377\260\260\260\377\251\251\251"
-  "\377\373\373\373\377\373\373\373\377\371\371\371\377\371\371\371\377"
-  "\367\367\367\377\366\366\366\377\345\345\345\377\217\217\217\377\0\0"
-  "\0\242\0\0\0\20\0\0\0\1\0\0\0\0\0\0\0\23\0\0\0\373\324\324\324\377\367"
-  "\367\367\377\375\375\375\377\375\375\375\377\375\375\375\377\375\375"
-  "\375\377\375\375\375\377\375\375\375\377\241\241\241\377\231\231\231"
-  "\377\373\373\373\377\372\372\372\377\371\371\371\377\370\370\370\377"
-  "\367\367\367\377\365\365\365\377\363\363\363\377\350\350\350\377\0\0"
-  "\0\374\0\0\0>\0\0\0\11\0\0\0\0\0\0\0o\207\207\207\377\342\342\342\377"
-  "\374\374\374\377\375\375\375\377\375\375\375\377\375\375\375\377\375"
-  "\375\375\377\376\376\376\377\375\375\375\377\221\221\221\377\212\212"
-  "\212\377\373\373\373\377\372\372\372\377\371\371\371\377\370\370\370"
-  "\377\366\366\366\377\365\365\365\377\363\363\363\377\355\355\355\377"
-  "\216\216\216\377\0\0\0\227\0\0\0\25\0\0\0\0\0\0\0\266\300\300\300\377"
-  "\364\364\364\377\374\374\374\377\374\374\374\377\375\375\375\377\375"
-  "\375\375\377\376\376\376\377\377\377\377\377\376\376\376\377\201\201"
-  "\201\377zzz\377\373\373\373\377\371\371\371\377\370\370\370\377\367\367"
-  "\367\377\365\365\365\377\364\364\364\377\362\362\362\377\357\357\357"
-  "\377\323\323\323\377\0\0\0\314\0\0\0(\0\0\0\0\0\0\0\346\323\323\323\377"
-  "\372\372\372\377\373\373\373\377\374\374\374\377\374\374\374\377\375"
-  "\375\375\377\375\375\375\377\376\376\376\377\375\375\375\377rrr\377k"
-  "kk\377\356\356\356\377\371\371\371\377\370\370\370\377\366\366\366\377"
-  "\364\364\364\377\363\363\363\377\361\361\361\377\357\357\357\377\367"
-  "\367\367\377\0\0\0\354\0\0\0""9\0\0\0\0\0\0\0\373\350\350\350\377\372"
-  "\372\372\377\337\337\337\377\373\373\373\377\374\374\374\377\374\374"
-  "\374\377\374\374\374\377\374\374\374\377\374\374\374\377ccc\377[[[\377"
-  "\313\313\313\377\345\345\345\377\367\367\367\377\365\365\365\377\364"
-  "\364\364\377\362\362\362\377\273\273\273\377\356\356\356\377\370\370"
-  "\370\377\0\0\0\374\0\0\0D\0\0\0\0\0\0\0\373\336\336\336\377\371\371\371"
-  "\377\332\332\332\377\372\372\372\377\373\373\373\377\373\373\373\377"
-  "\373\373\373\377\373\373\373\377\373\373\373\377\221\221\221\377LLL\377"
-  "EEE\377bbb\377\300\300\300\377\335\335\335\377\362\362\362\377\361\361"
-  "\361\377\265\265\265\377\355\355\355\377\370\370\370\377\0\0\0\374\0"
-  "\0\0J\0\0\0\0\0\0\0\346\332\332\332\377\370\370\370\377\371\371\371\377"
-  "\371\371\371\377\371\371\371\377\371\371\371\377\372\372\372\377\372"
-  "\372\372\377\372\372\372\377\352\352\352\377\276\276\276\377ddd\377."
-  "..\377'''\377III\377\361\361\361\377\357\357\357\377\355\355\355\377"
-  "\371\371\371\377\367\367\367\377\0\0\0\355\0\0\0J\0\0\0\0\0\0\0\273\275"
-  "\275\275\377\365\365\365\377\367\367\367\377\370\370\370\377\370\370"
-  "\370\377\370\370\370\377\370\370\370\377\370\370\370\377\370\370\370"
-  "\377\367\367\367\377\366\366\366\377\335\335\335\377\276\276\276\377"
-  "WWW\377xxx\377\357\357\357\377\356\356\356\377\354\354\354\377\371\371"
-  "\371\377\323\323\323\377\0\0\0\316\0\0\0D\0\0\0\0\0\0\0t\177\177\177"
-  "\377\341\341\341\377\366\366\366\377\366\366\366\377\366\366\366\377"
-  "\366\366\366\377\367\367\367\377\366\366\366\377\366\366\366\377\365"
-  "\365\365\377\364\364\364\377\364\364\364\377yyy\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\234"
-  "\0\0\0\0\0\0\0\31\0\0\0\374\320\320\320\377\353\353\353\377\364\364\364"
-  "\377\364\364\364\377\365\365\365\377\364\364\364\377\364\364\364\377"
-  "\364\364\364\377\363\363\363\377\362\362\362\377\361\361\361\377\0\0"
-  "\0\377\351\\\23\377\362g\37\377\356b\32\377\345Y\23\377\333T\22\377\322"
-  "S\27\377\312R\33\377\276D\17\377\0\0\0\377\0\0\0\0\0\0\0\2\0\0\0\217"
-  "\211\211\211\377\324\324\324\377\362\362\362\377\362\362\362\377\362"
-  "\362\362\377\362\362\362\377\362\362\362\377\361\361\361\377\361\361"
-  "\361\377\360\360\360\377\360\360\360\377\0\0\0\377\353a\33\377\376\362"
-  "\353\377\374\346\333\377\350k,\377\337e)\377\370\342\330\377\373\361"
-  "\355\377\300K\30\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\324\253"
-  "\253\253\377\323\323\323\377\360\360\360\377\360\360\360\377\360\360"
-  "\360\377\360\360\360\377\360\360\360\377\357\357\357\377\357\357\357"
-  "\377\356\356\356\377\0\0\0\377\345[\26\377\372\337\322\377\377\377\377"
-  "\377\372\346\334\377\372\344\331\377\377\377\377\377\364\334\322\377"
-  "\275G\23\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0""6\0\0\0\352\253"
-  "\253\253\377\322\322\322\377\344\344\344\377\356\356\356\377\356\356"
-  "\356\377\356\356\356\377\256\256\256\377\255\255\255\377\355\355\355"
-  "\377\0\0\0\377\335U\22\377\342d%\377\371\340\324\377\377\377\377\377"
-  "\377\377\377\377\365\336\323\377\307U\"\377\271B\16\377\0\0\0\377\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\77\0\0\0\330\202\202\202\377\315\315"
-  "\315\377\331\331\331\377\354\354\354\377\354\354\354\377\354\354\354"
-  "\377\354\354\354\377\353\353\353\377\0\0\0\377\323O\21\377\332a)\377"
-  "\371\343\331\377\377\377\377\377\377\377\377\377\366\344\333\377\304"
-  "W(\377\265@\16\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5"
-  "\0\0\0\32\0\0\0\242\0\0\0\374\210\210\210\377\310\310\310\377\335\335"
-  "\335\377\370\370\370\377\370\370\370\377\367\367\367\377\0\0\0\377\312"
-  "N\23\377\367\341\327\377\377\377\377\377\364\335\323\377\364\335\323"
-  "\377\377\377\377\377\364\342\332\377\262B\23\377\0\0\0\377\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\20\0\0\0>\0\0\0\227\0\0"
-  "\0\314\0\0\0\354\0\0\0\374\0\0\0\374\0\0\0\355\0\0\0\377\302K\26\377"
-  "\370\353\345\377\363\333\321\377\304S\"\377\300R\"\377\361\332\320\377"
-  "\367\353\347\377\255A\25\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\10\0\0\0\25\0\0\0(\0\0\0""9\0\0\0D\0"
-  "\0\0J\0\0\0J\0\0\0\377\267@\16\377\272E\23\377\270C\21\377\266@\16\377"
-  "\263>\15\377\260>\20\377\253\77\23\377\2447\14\377\0\0\0\377\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0"
-  "\0\6\0\0\0\12\0\0\0\15\0\0\0\17\0\0\0\17\0\0\0\206\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\177"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_trash)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_trash[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_trash[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0R\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0"
-  "X\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\220\34\34"
-  "\34\377vvv\377\346\346\346\377\323\323\323\377\303\303\303\377\220\220"
-  "\220\377III\377\0\0\0\377\0\0\0\276\0\0\0,\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0E\0\0\0\240\0\0\0"
-  "\377\0\0\0\377HG=\377\272\270\246\377\342\342\337\377\361\361\360\377"
-  "\352\351\346\377\362\362\356\377\353\352\345\377\301\300\265\377WVJ\377"
-  "RQF\377\0\0\0\377\0\0\0\377\0\0\0\227\0\0\0""3\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0T\0\0\0\377\250\246\217\377\275\273\241\377\300"
-  "\276\243\377\243\241\212\377ml\\\377||r\377LLI\377EE\77\377DC:\377oo"
-  "g\377\306\305\271\377\266\265\233\377ml]\377\263\261\233\377\247\246"
-  "\216\377\220\217z\377\0\0\0\377\0\0\0E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\377\252\251\223\377\314\313\265\377\320\316\272\377\325\323"
-  "\301\377\256\255\243\377\224\223\212\377EDB\377##!\377541\377)(#\377"
-  "\36\36\32\377SRF\377\255\254\223\377\222\221\211\377\302\301\257\377"
-  "\261\257\226\377\254\252\222\377\223\222}\377\0\0\0\377\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\10\10\10\377\321\320\301\377\314\313\265\377\326\325"
-  "\304\377\337\336\321\377\316\315\300\377\254\254\246\377\220\217\212"
-  "\377~}w\377\\\\U\377GF>\377edV\377wve\377\200~o\377\276\275\247\377\265"
-  "\263\232\377\266\265\233\377\265\263\232\377\241\237\210\377\0\0\0\377"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\331\330\314\377\366\365\362"
-  "\377\333\332\321\377\332\331\316\377\345\344\331\377\320\317\303\377"
-  "\323\323\311\377\312\311\274\377\267\266\246\377\270\266\241\377\260"
-  "\257\226\377\241\237\210\377\271\270\235\377\271\267\235\377\270\266"
-  "\234\377\304\302\251\377\257\255\227\377\213\211v\377\0\0\0\377\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\252\251\230\377\266\266\262\377"
-  "\371\371\367\377\372\372\370\377\364\364\360\377\342\341\332\377\331"
-  "\331\316\377\333\332\317\377\325\323\301\377\323\321\276\377\304\302"
-  "\251\377\300\276\243\377\305\304\254\377\326\325\303\377\315\314\277"
-  "\377\273\272\255\377|zi\377qp`\377\0\0\0\336\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\23\23\23\316\231\230\202\377\257\256\235\377\303\303\276\377"
-  "\336\336\334\377\351\351\350\377\373\373\372\377\375\375\374\377\375"
-  "\375\375\377\374\373\372\377\371\371\367\377\362\362\357\377\352\351"
-  "\343\377\333\332\321\377\300\277\261\377\225\224\204\377xwf\377nm]\377"
-  "[[M\377\0\0\0\315\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\222]\\O\377\223"
-  "\222}\377\243\242\223\377\270\267\246\377\330\327\320\377\333\333\324"
-  "\377\323\322\312\377\310\310\303\377\306\305\275\377\275\274\255\377"
-  "\272\270\250\377\237\236\213\377\216\214x\377\214\213w\377\216\214x\377"
-  "zyh\377lk]\377NME\377\0\0\0y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""2"
-  "\0\0\0\377BBB\377{{s\377\237\237\226\377\322\321\307\377\334\333\322"
-  "\377\314\313\276\377\321\320\302\377\304\303\266\377\261\257\226\377"
-  "\261\257\226\377\261\257\226\377\232\230\203\377\200\177m\377}|k\377"
-  "ji^\377@@>\377\0\0\0\377\0\0\0""3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\37777-\377\17\17\17\377874\377xxu\377\231\230\223\377\212"
-  "\211~\377\263\262\244\377\252\252\236\377\243\241\212\377\207\206s\377"
-  "\217\215y\377baU\377TTQ\37711.\377\0\0\0\377++#\377\0\0\0\377\0\0\0\17"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377qq]\377WWK\377BB:\377"
-  "&&\40\377!!!\377\33\33\33\377\0\0\0\377$$$\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\26\26\23\377**\"\37700'\377\77\77""4\377\0\0\0\377"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377zze\377[[Q"
-  "\377\205\205v\377vvk\377\230\230\216\377uuk\377QQF\377\177\177t\377j"
-  "jX\377@@5\377bbQ\377TTE\377>>3\377UUF\37744+\377QQC\377\0\0\0\377\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\205\205n\377]"
-  "]T\377\221\221\202\377\202\202x\377\252\252\243\377zzq\377NNE\377\212"
-  "\212\200\377||m\377BB7\377``R\377ZZJ\377<<2\377NNA\37755,\377TTE\377"
-  "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\3\0\0\0\377"
-  "\205\205n\377[[Q\377\254\254\234\377\205\205{\377\273\273\263\377\243"
-  "\243\232\377TTK\377\223\223\212\377\221\221\205\377BB7\377``R\377hhV"
-  "\377AA6\377jjX\377CC7\377jjX\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\1\0\0\0\5\0\0\0\10\0\0\0\377\205\205n\377[[Q\377\244\244\223\377"
-  "\205\205{\377\301\301\266\377\261\261\242\377kk_\377\261\261\242\377"
-  "\235\235\213\377TTE\377\204\204p\377qq^\377CC7\377jjX\377CC7\377jjX\377"
-  "\0\0\0\377\0\0\0\6\0\0\0\3\0\0\0\0\0\0\0\2\0\0\0\12\0\0\0\24\0\0\0\377"
-  "\205\205n\377[[Q\377\245\245\224\377\205\205{\377\302\302\267\377\261"
-  "\261\242\377kk_\377\261\261\242\377\235\235\213\377TTE\377\204\204p\377"
-  "qq^\377CC7\377jjX\377CC7\377jjX\377\0\0\0\377\0\0\0\26\0\0\0\13\0\0\0"
-  "\2\0\0\0\3\0\0\0\26\0\0\0+\0\0\0\377\205\205n\377[[Q\377\235\235\213"
-  "\377\205\205{\377\301\301\266\377\261\261\242\377kk_\377\261\261\242"
-  "\377\235\235\213\377TTE\377\204\204p\377qq^\377CC7\377jjX\377CC7\377"
-  "jjX\377\0\0\0\377\0\0\0""1\0\0\0\32\0\0\0\4\0\0\0\7\0\0\0#\0\0\0I\0\0"
-  "\0\377{{e\377[[Q\377\244\244\223\377\205\205{\377\301\301\266\377\261"
-  "\261\242\377kk_\377\261\261\242\377\235\235\213\377TTE\377\204\204p\377"
-  "qq^\377CC7\377jjX\377CC7\377__O\377\0\0\0\377\0\0\0H\0\0\0*\0\0\0\7\0"
-  "\0\0\12\0\0\0,\0\0\0X\0\0\0\377ffT\377[[Q\377\244\244\223\377\202\202"
-  "x\377\301\301\266\377\261\261\242\377kk_\377\261\261\242\377\235\235"
-  "\213\377TTE\377\204\204p\377qq^\377CC7\377jjX\377II<\377WWH\377\0\0\0"
-  "\377\0\0\0P\0\0\0*\0\0\0\7\0\0\0\6\0\0\0\35\0\0\0C\0\0\0r\0\0\0\377W"
-  "WJ\377}}m\377vvi\377\263\263\250\377\241\241\224\377mma\377\263\263\245"
-  "\377\235\235\213\377TTE\377\204\204p\377iiW\377AA5\377VVG\377DD8\377"
-  "\0\0\0\377\0\0\0\177\0\0\0C\0\0\0\35\0\0\0\4\0\0\0\1\0\0\0\13\0\0\0\34"
-  "\0\0\0""2\0\0\0g\0\0\0\320\0\0\0\377\0\0\0\377YYQ\377XXI\377NN@\377t"
-  "tg\377aaS\377NNA\377II<\377II<\377\0\0\0\377\0\0\0\377\0\0\0\304\0\0"
-  "\0t\0\0\0>\0\0\0%\0\0\0\11\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\6\0\0\0\17\0"
-  "\0\0\31\0\0\0\37\0\0\0r\0\0\0\264\0\0\0\302\0\0\0\377\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\271\0\0\0\217\0\0\0S\0\0\0,"
-  "\0\0\0*\0\0\0\33\0\0\0\10\0\0\0\1\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_trash_full)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_trash_full[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_trash_full[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\10"
-  "\10\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\6\6\6\21\6\6\6K\16\16\16\377BBB\377JJJ\377>>>\377,,,\377\0"
-  "\0\0\377\6\6\6>\6\6\6!\0\0\0\0\0\0\0\0\0\0\0\0\10\10\10\377\10\10\10"
-  "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\6\6\6:\0\0\0\377\0\0\0\377\205\203q\377\360\355\330\377\362\361\351"
-  "\377\356\355\344\377\307\306\272\377SRF\377\0\0\0\377\0\0\0\377\6\6\6"
-  "K\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\6\6\6>\20\20\20\377\302\300\245\377\301\277\245"
-  "\377zyg\377HG@\377''%\37765.\377\207\205r\377\240\236\210\377\243\241"
-  "\212\377\245\243\214\377\0\0\0\377\6\6\6!\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0+++\377\323\321\274"
-  "\377\334\332\304\377\342\340\317\377\271\267\242\377db[\377986\377<<"
-  "3\377a`S\377\232\230\203\377\267\265\233\377\263\262\230\377\244\242"
-  "\213\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\10\10\377"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\350\344\323\377\364\361\351"
-  "\377\362\361\344\377\352\351\332\377\345\342\322\377\325\322\276\377"
-  "\303\301\247\377\257\255\224\377\300\276\244\377\306\304\254\377\270"
-  "\266\234\377ywf\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\10\10\10\377\10\10\10\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\212\211"
-  "u\377\361\355\322\377\373\370\351\377\371\365\355\377\370\367\356\377"
-  "\370\367\354\377\365\363\346\377\354\352\331\377\336\335\313\377\0\0"
-  "\0\377\0\0\0\377BA8\377\0\0\0\377\0\0\0\0\0\0\0>\0\0\0\377\0\0\0W\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\202RQF\377sqe\377"
-  "\237\235\221\377\344\341\310\377\351\345\317\377\342\340\313\377\321"
-  "\321\313\377\216\215\177\377\0\0\0\377\377\377\377\377\301\301\301\377"
-  "\0\0\0\377\0\0\0\240\0\0\0L\0\0\0\377\377\377\377\377\0\0\0\377\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\37\37\33\377440\377"
-  "KID\377hgb\377pof\377kkd\377nl]\377XWK\377++%\377\0\0\0\377\377\377\377"
-  "\377\222\222\222\377\2\2\2\377\0\0\0\377\346\346\346\377\0\0\0\377\0"
-  "\0\0>\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0**#\377"
-  "\240\240\225\377MM@\377660\377**&\377//*\377\17\17\15\377\13\13\11\377"
-  "\20\20\15\377(($\377\0\0\0\377\274\274\274\377nnn\377\355\355\355\377"
-  "\0\0\0\377\0\0\0L\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0++$\377\245\244\231\377\267\266\256\377qpg\377\241\241\222"
-  "\377tsc\377@@5\377ii[\377%%\36\377\34\34\34\377\354\354\354\377\317\317"
-  "\317\377ooo\377\257\257\257\377\0\0\0\377\0\0\0!\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,,%\377\255\255\243\377\331"
-  "\331\322\377\213\213\177\377\326\325\316\377\210\210{\377XWO\377\177"
-  "\177u\377\0\0\0\377\336\336\336\377\377\377\377\377\336\336\336\377\336"
-  "\336\336\377\311\311\311\377\0\0\0\377\0\0\0\77\0\0\0\1\0\0\0\1\0\0\0"
-  "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\6,,%\377\255\255\243\377\332"
-  "\332\323\377\217\216\201\377\335\335\324\377\254\253\231\377]]R\377i"
-  "i`\377mmm\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\347\347\347\377\223\223\223\377\0\0\0\377\0\0\0+\0\0\0\13\0"
-  "\0\0\7\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\5\0\0\0\21++$\377~~u\377\330\330"
-  "\321\377\215\215\200\377\335\335\323\377\254\253\231\377PPG\377\30\30"
-  "\30\377\311\311\311\377\307\340\307\377x\265x\377\233\310\233\377\377"
-  "\377\377\377\347\347\347\377\306\306\306\377\0\0\0\377\0\0\0U\0\0\0\35"
-  "\0\0\0\27\0\0\0\15\0\0\0\3\0\0\0\1\0\0\0\11\0\0\0\34''!\377CC=\377\216"
-  "\216\206\377^^U\377\332\332\320\377\254\253\231\37755.\377]]]\377\324"
-  "\347\324\377]\246]\377\307\340\307\377\377\377\377\377]\246]\377\215"
-  "\272\215\377\345\345\345\377\206\206\206\377\0\0\0\377\0\0\0G\0\0\0'"
-  "\0\0\0\31\0\0\0\10\0\0\0\1\0\0\0\11\0\0\0\34\4\4\4k\6\6\6\377\6\6\6\377"
-  "BA:\377\217\217{\377zzl\377\0\0\0\377\304\304\304\377s\262s\377\307\340"
-  "\307\377\377\377\377\377\377\377\377\377x\265x\377n\253n\377\345\345"
-  "\345\377\220\220\220\377\0\0\0\377\0\0\0w\0\0\0.\0\0\0\"\0\0\0\16\0\0"
-  "\0\1\0\0\0\5\0\0\0\23\0\0\0&\0\0\0""0\4\4\4y\6\6\6\377\0\0\0\377\17\17"
-  "\17\377\0\0\0\377\327\327\327\377\377\377\377\377\377\377\377\377\377"
-  "\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377S\235S\377"
-  "\277\277\277\377JJJ\377\0\0\0\377\0\0\0""1\0\0\0(\0\0\0\23\0\0\0\0\0"
-  "\0\0\1\0\0\0\6\0\0\0\23\0\0\0\40\0\0\0)\0\0\0-\0\0\0.\0\0\0""0\0\0\0"
-  "\377\354\354\354\377x\265x\377\377\377\377\377\377\377\377\377\307\340"
-  "\307\377\377\377\377\377\272\323\272\377\212\270\212\377\212\267\212"
-  "\377qqq\377\0\0\0\377\0\0\0""2\0\0\0*\0\0\0\27\0\0\0\0\0\0\0\0\0\0\0"
-  "\1\0\0\0\3\0\0\0\12\0\0\0\21\0\0\0\26\0\0\0\33\0\0\0\"\0\0\0\377\254"
-  "\254\254\377\354\354\354\377o\254o\377o\254o\377n\253n\377T\235T\377"
-  "\262\314\262\377\212\270\212\377\222\222\222\377aaa\377\0\0\0\377\0\0"
-  "\0""1\0\0\0'\0\0\0\23\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1"
-  "\0\0\0\2\0\0\0\10\0\0\0\22\0\0\0U\0\0\0\377\0\0\0\377iii\377\200\200"
-  "\200\377}\220}\377\241\241\241\377\203\203\203\377zzz\377CCC\377\0\0"
-  "\0\377\0\0\0w\0\0\0*\0\0\0\34\0\0\0\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\7\0\0\0\21\0\0\0""9\0\0\0p\0"
-  "\0\0\234\0\0\0\304\0\0\0\377\0\0\0\377\0\0\0\377(((\377444\263888q\0"
-  "\0\0#\0\0\0\32\0\0\0\13\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\6\0\0\0\14\0\0\0\21\0\0\0\23"
-  "\0\0\0\24\0\0\0\26\0\0\0\26\0\0\0\26\0\0\0\25\0\0\0\25\0\0\0\24\0\0\0"
-  "\17\0\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\4\0\0\0\6\0\0"
-  "\0\6\0\0\0\7\0\0\0\10\0\0\0\7\0\0\0\6\0\0\0\6\0\0\0\4\0\0\0\2\0\0\0\1"
-  "\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_volume)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_volume[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_volume[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0,\0\0\0\377\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0I@f\320I@f+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-\0\0\0\377"
-  "\0\0\0\377\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0I@f\377I@f+\0\0\0\0I@f+I@f"
-  "\252I@f+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0-\0\0\0\377\256\253\237\377\0\0\0\377\0\0\0"
-  "\21\0\0\0\2\0\0\0\0\0\0\0\0I@f+I@f\377I@f+\0\0\0\0I@f\213I@fO\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0o\0\0\0\377\256\253\237\377\334\331\323\377\0\0\0\377\0\0\0\221"
-  "\0\0\0\4I@f\377I@f+\0\0\0\0I@f\252I@fO\0\0\0\0I@fcI@f\213\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\7\0\0\0\377\233\230\212\377\200~r"
-  "\377\0\0\0\377\256\253\237\377\342\341\334\377\362\362\360\377\0\0\0"
-  "\377\0\0\0\347\0\0\0\12I@f+I@f\377\0\0\0\0I@fOI@f\252\0\0\0\0I@f@I@f"
-  "\252\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\22\0\0\0\377\343\342"
-  "\335\377\266\266\261\377\0\0\0\377\356\355\352\377\352\352\346\377\305"
-  "\301\267\377\0\0\0\377III\377\0\0\0\24\0\0\0\0I@f\377\0\0\0\0I@f+I@f"
-  "\320\0\0\0\0I@f#I@f\320\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0"
-  "\30\0\0\0\377\260\254\234\377\222\216\201\377\0\0\0\377\315\312\301\377"
-  "\270\264\246\377\277\273\257\377\0\0\0\377\11\11\11\377\0\0\0\30\0\0"
-  "\0\0I@f\377\0\0\0\0\0\0\0\0I@f\377\0\0\0\0\0\0\0\0I@f\377\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\31\0\0\0\377\233\230\212\377\200~"
-  "r\377\0\0\0\377\236\232\214\377\260\254\234\377\260\254\234\377\0\0\0"
-  "\377+++\377\0\0\0\27\0\0\0\0I@f\377\0\0\0\0I@f+I@f\320\0\0\0\0I@f#I@"
-  "f\320\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\31\0\0\0\377yvl\377"
-  "dbY\377\0\0\0\377\236\232\214\377\236\232\214\377\236\232\214\377\0\0"
-  "\0\377\10\10\10\376\0\0\0\27I@f+I@f\377\0\0\0\0I@fOI@f\252\0\0\0\0I@"
-  "f@I@f\252\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\31\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\240\0\0\0\377\215\212}\377\236\232\214\377"
-  "\0\0\0\377\0\0\0\300\0\0\0\30I@f\377I@f+\0\0\0\0I@f\252I@fO\0\0\0\0I"
-  "@fYI@f\213\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\30\0\0\0>\0"
-  "\0\0S\0\0\0S\0\0\0Q\0\0\0r\0\0\0\377~{p\377\0\0\0\377\0\0\0=\0\0\0\32"
-  "\0\0\0\0\0\0\0\0I@f+I@f\320I@f+\0\0\0\0I@f\213I@fO\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\2\0\0\0\22\0\0\0/\0\0\0=\0\0\0;\0\0\0""8\0\0\0C"
-  "\0\0\0o\0\0\0\377\0\0\0\377\0\0\0""1\0\0\0\26\0\0\0\0\0\0\0\0I@f\377"
-  "I@f+\0\0\0\0I@f+I@f\213I@f+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0"
-  "\0\0\7\0\0\0\22\0\0\0\27\0\0\0\26\0\0\0\26\0\0\0%\0\0\0>\0\0\0l\0\0\0"
-  "\377\0\0\0\"\0\0\0\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0I@f\320"
-  "I@f+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2"
-  "\0\0\0\3\0\0\0\3\0\0\0\4\0\0\0\15\0\0\0#\0\0\0;\0\0\0""8\0\0\0\30\0\0"
-  "\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\3\0\0\0\15\0\0\0\37\0\0\0%\0\0\0\21\0\0\0\2\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\3\0\0\0\11\0\0\0\15\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_midi)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_midi[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_midi[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\24\0\0\0n\0\0\0\24\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\36\0\0"
-  "\0\206\0\0\0$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0$\0\0\0^\0\0\0u\0\0\0\231\0\0\0\231\0\0\0Q\0\0\0<\0\0\0"
-  "(\0\0\0\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0.\0\0\0\276\0\0\0X\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "^\0\0\0C\0\0\0u\0\0\0$\0\0\0\24\0\0\0E\0\0\0w\0\0\0}\0\0\0X\0\0\0""7"
-  "\0\0\0\15\0\0\0A\0\0\0\225\0\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\271\0\0\0$\0\0\0"
-  "\177\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!\0\0\0>\0\0\0\201\0\0\0\311"
-  "\0\0\0\200\0\0\0G\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0E\0\0\0\364\0\0\0b\0\0\0\362\0\0\0"
-  "U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\355\377\377\377\377\0\0\0\355\377\377\377\377"
-  "\0\0\0\356\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\250\250\250\377\0\0\0\355\267\267"
-  "\267\377\0\0\0\356\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0{\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0z\0\0\0\0\0\0\0\0\0\0\0\377\323\321\316\377\274\272\265"
-  "\377\254\252\244\377\230\226\217\377\230\226\217\377\230\226\217\377"
-  "\230\226\217\377\230\226\217\377\230\226\217\377\230\226\217\377\230"
-  "\226\217\377\230\226\217\377\230\226\217\377\230\226\217\377\230\226"
-  "\217\377\230\226\217\377\230\226\217\377zxr\377b`[\377USO\377\0\0\0\377"
-  "\0\0\0\23\0\0\0\0\0\0\0\377\257\255\251\377\234\232\225\377\204\202|"
-  "\377fd]\377fd]\377fd]\377fd]\377fd]\377fd]\377fd]\377fd]\377fd]\377f"
-  "d]\377fd]\377fd]\377fd]\377fd]\377RPJ\377RPJ\377A@;\377\0\0\0\377\0\0"
-  "\0,\0\0\0\3\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0""6\0\0\0\7\0\0\0\377\315\315\315\377VVV\377"
-  "\0\0\0\377\312\312\312\377VVV\377\0\0\0\377\310\310\310\377VVV\377\0"
-  "\0\0\377\305\305\305\377\302\302\302\377\271\271\271\377\303\303\303"
-  "\377VVV\377\0\0\0\377\300\300\300\377VVV\377\0\0\0\377\276\276\276\377"
-  "\270\270\270\377\0\0\0\377\0\0\0\77\0\0\0\14\0\0\0\377\377\377\377\377"
-  "kkk\377\0\0\0\377\374\374\374\377kkk\377\0\0\0\377\370\370\370\377kk"
-  "k\377\0\0\0\377\366\366\366\377\361\361\361\377\346\346\346\377\362\362"
-  "\362\377kkk\377\0\0\0\377\360\360\360\377kkk\377\0\0\0\377\355\355\355"
-  "\377\346\346\346\377\0\0\0\377\0\0\0E\0\0\0\22\0\0\0\377\377\377\377"
-  "\377kkk\377\0\0\0\377\373\373\373\377kkk\377\0\0\0\377\367\367\367\377"
-  "kkk\377\0\0\0\377\365\365\365\377\361\361\361\377\345\345\345\377\362"
-  "\362\362\377kkk\377\0\0\0\377\357\357\357\377kkk\377\0\0\0\377\354\354"
-  "\354\377\345\345\345\377\0\0\0\377\0\0\0D\0\0\0\23\0\0\0\377\377\377"
-  "\377\377kkk\377\0\0\0\377\372\372\372\377kkk\377\0\0\0\377\367\367\367"
-  "\377kkk\377\0\0\0\377\365\365\365\377\360\360\360\377\344\344\344\377"
-  "\362\362\362\377kkk\377\0\0\0\377\356\356\356\377kkk\377\0\0\0\377\353"
-  "\353\353\377\344\344\344\377\0\0\0\377\0\0\0D\0\0\0\20\0\0\0\377\376"
-  "\376\376\377NNN\377\0\0\0\377\372\372\372\377NNN\377\0\0\0\377\366\366"
-  "\366\377NNN\377\0\0\0\377\365\365\365\377\357\357\357\377\344\344\344"
-  "\377\361\361\361\377NNN\377\0\0\0\377\356\356\356\377NNN\377\0\0\0\377"
-  "\353\353\353\377\343\343\343\377\0\0\0\377\0\0\0D\0\0\0\16\0\0\0\377"
-  "\375\375\375\377\374\374\374\377\360\360\360\377\372\372\372\377\367"
-  "\367\367\377\354\354\354\377\366\366\366\377\363\363\363\377\347\347"
-  "\347\377\364\364\364\377\356\356\356\377\343\343\343\377\360\360\360"
-  "\377\352\352\352\377\336\336\336\377\356\356\356\377\346\346\346\377"
-  "\332\332\332\377\353\353\353\377\343\343\343\377\0\0\0\377\0\0\0D\0\0"
-  "\0\16\0\0\0\377\374\374\374\377\373\373\373\377\357\357\357\377\372\372"
-  "\372\377\366\366\366\377\353\353\353\377\366\366\366\377\362\362\362"
-  "\377\347\347\347\377\363\363\363\377\356\356\356\377\342\342\342\377"
-  "\360\360\360\377\351\351\351\377\336\336\336\377\355\355\355\377\345"
-  "\345\345\377\331\331\331\377\352\352\352\377\342\342\342\377\0\0\0\377"
-  "\0\0\0D\0\0\0\16\0\0\0\377\374\374\374\377\373\373\373\377\370\370\370"
-  "\377\373\373\373\377\373\373\373\377\366\366\366\377\373\373\373\377"
-  "\371\371\371\377\366\366\366\377\371\371\371\377\370\370\370\377\363"
-  "\363\363\377\370\370\370\377\366\366\366\377\361\361\361\377\370\370"
-  "\370\377\364\364\364\377\360\360\360\377\370\370\370\377\341\341\341"
-  "\377\0\0\0\377\0\0\0D\0\0\0\16\0\0\0\377\301\301\301\377\300\300\300"
-  "\377\267\267\267\377\301\301\301\377\275\275\275\377\270\270\270\377"
-  "\275\275\275\377\272\272\272\377\264\264\264\377\272\272\272\377\270"
-  "\270\270\377\251\251\251\377\272\272\272\377\263\263\263\377\251\251"
-  "\251\377\266\266\266\377\257\257\257\377\246\246\246\377\264\264\264"
-  "\377\255\255\255\377\0\0\0\377\0\0\0D\0\0\0\16\0\0\0n\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\227\0\0\0\77\0"
-  "\0\0\14\0\0\0\6\0\0\0#\0\0\0>\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0"
-  "\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0"
-  "\0\0D\0\0\0D\0\0\0D\0\0\0\77\0\0\0#\0\0\0\6\0\0\0\1\0\0\0\6\0\0\0\14"
-  "\0\0\0\15\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0"
-  "\16\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0\16\0\0\0\16\0"
-  "\0\0\16\0\0\0\16\0\0\0\16\0\0\0\14\0\0\0\6\0\0\0\1"};
-
-
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (stock_authentication)
-#endif
-#ifdef __GNUC__
-static const guint8 stock_authentication[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 stock_authentication[] = 
-#endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (9216) */
-  "\0\0$\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (192) */
-  "\0\0\0\300"
-  /* width (48) */
-  "\0\0\0""0"
-  /* height (48) */
-  "\0\0\0""0"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\2\0\0\0\3"
-  "\0\0\0\4\0\0\0\5\0\0\0\5\0\0\0\5\0\0\0\4\0\0\0\3\0\0\0\2\0\0\0\1\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\1\0\0\0\2\0\0\0\4\0\0\0\7\0\0\0\12\0\0\0\16\0\0\0\21\0\0\0\23\0\0"
-  "\0\23\0\0\0\23\0\0\0\21\0\0\0\16\0\0\0\12\0\0\0\7\0\0\0\4\0\0\0\2\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0\10\0\0"
-  "\0\16\0\0\0g\0\0\0\253\0\0\0\332\0\0\0\366\1\1\1\377\0\0\0\366\0\0\0"
-  "\334\0\0\0\260\0\0\0q\0\0\0\36\0\0\0\25\0\0\0\16\0\0\0\10\0\0\0\4\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\5\0\0\0\14\0\0\0\203\0\0\0\354"
-  "\1\1\1\377\233\233\233\377\320\320\320\377\343\343\343\377\351\351\351"
-  "\377\335\335\335\377\306\306\306\377\221\221\221\377\1\1\1\377\0\0\0"
-  "\356\0\0\0\221\0\0\0#\0\0\0\27\0\0\0\15\0\0\0\5\0\0\0\2\0\0\0\1\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0"
-  "\0\0\7\0\0\0>\0\0\0\320\1\1\1\377\276\276\276\377\352\352\352\377\361"
-  "\361\361\377\363\363\363\377\361\361\361\377\355\355\355\377\352\352"
-  "\352\377\346\346\346\377\342\342\342\377\330\330\330\377\234\234\234"
-  "\377\1\1\1\377\0\0\0\330\0\0\0W\0\0\0\36\0\0\0\20\0\0\0\7\0\0\0\2\0\0"
-  "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\7"
-  "\0\0\0R\0\0\0\366```\377\343\343\343\377\363\363\363\377\360\360\360"
-  "\377\354\354\354\377\346\346\346\377\344\344\344\377\343\343\343\377"
-  "\342\342\342\377\342\342\342\377\342\342\342\377\341\341\341\377\326"
-  "\326\326\377\267\267\267\377EEE\377\0\0\0\367\0\0\0m\0\0\0\"\0\0\0\22"
-  "\0\0\0\7\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0"
-  "\0\5\0\0\0>\0\0\0\366\205\205\205\377\354\354\354\377\363\363\363\377"
-  "\352\352\352\377\343\343\343\377\331\331\331\377\316\316\316\377\302"
-  "\302\302\377\302\302\302\377\314\314\314\377\325\325\325\377\334\334"
-  "\334\377\340\340\340\377\335\335\335\377\310\310\310\377\271\271\271"
-  "\377bbb\377\0\0\0\370\0\0\0Y\0\0\0!\0\0\0\17\0\0\0\5\0\0\0\1\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0\15\0\0\0\320^^^\377\354\354\354"
-  "\377\363\363\363\377\350\350\350\377\334\334\334\377\274\274\274\370"
-  "XXX\360\24\24\24\341\0\0\0\333\0\0\0\326\0\0\0\324{{{\352\276\276\276"
-  "\366\340\340\340\377\337\337\337\377\334\334\334\377\303\303\303\377"
-  "\273\273\273\377LLL\377\0\0\0\273\0\0\0""5\0\0\0\33\0\0\0\13\0\0\0\3"
-  "\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\10\0\0\0\203\1\1\1\377\342\342"
-  "\342\377\363\363\363\377\351\351\351\377\330\330\330\377\227\227\227"
-  "\354\0\0\0\352\0\0\0\274\0\0\0g\0\0\0Y\0\0\0S\0\0\0Q\0\0\0Y\0\0\0\305"
-  "\234\234\234\351\335\335\335\371\340\340\340\377\330\330\330\377\273"
-  "\273\273\377\266\266\266\377\1\1\1\377\0\0\0x\0\0\0*\0\0\0\23\0\0\0\7"
-  "\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\3\0\0\0\15\0\0\0\354\271\271\271\377\363"
-  "\363\363\377\353\353\353\377\330\330\330\377\212\212\212\356\0\0\0\342"
-  "\0\0\0}\0\0\0W\0\0\0F\0\0\0""9\0\0\0""0\0\0\0.\0\0\0""1\0\0\0;\0\0\0"
-  "\224\222\222\222\337\333\333\333\367\337\337\337\377\316\316\316\377"
-  "\263\263\263\377\223\223\223\377\0\0\0\313\0\0\0:\0\0\0\36\0\0\0\13\0"
-  "\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\1\0\0\0\6\0\0\0E\1\1\1\377\352\352\352\377\361\361"
-  "\361\377\335\335\335\377\300\300\300\377\2\2\2\350\0\0\0\214\0\0\0T\0"
-  "\0\0<\0\0\0)\0\0\0\34\0\0\0\25\0\0\0\23\0\0\0\26\0\0\0\37\0\0\0.\0\0"
-  "\0\240\242\242\242\337\345\345\345\377\335\335\335\377\300\300\300\377"
-  "\266\266\266\377\1\1\1\377\0\0\0a\0\0\0)\0\0\0\22\0\0\0\5\0\0\0\1\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\2\0\0\0\11\0\0\0p\240\240\240\377\361\361\361\377\350\350\350\377"
-  "\306\306\306\377\201\201\201\354\0\0\0\322\0\0\0Z\0\0\0>\0\0\0%\0\0\0"
-  "\24\0\0\0\13\0\0\0\7\0\0\0\5\0\0\0\7\0\0\0\15\0\0\0\30\0\0\0""0\2\2\2"
-  "\313\334\334\334\357\352\352\352\377\321\321\321\377\256\256\256\377"
-  "vvv\377\0\0\0\220\0\0\0""4\0\0\0\30\0\0\0\10\0\0\0\2\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\14"
-  "\0\0\0\223\320\320\320\377\362\362\362\377\331\331\331\377\300\300\300"
-  "\377///\345\0\0\0\213\0\0\0J\0\0\0,\0\0\0\25\0\0\0\11\0\0\0\3\0\0\0\1"
-  "\0\0\0\1\0\0\0\2\0\0\0\4\0\0\0\13\0\0\0\31\0\0\0n\202\202\202\340\356"
-  "\356\356\377\334\334\334\377\265\265\265\377\237\237\237\377\0\0\0\274"
-  "\0\0\0>\0\0\0\37\0\0\0\13\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0\16\0\0\0\325\341\341\341"
-  "\377\361\361\361\377\314\314\314\377\300\300\300\377\17\17\17\331\0\0"
-  "\0e\0\0\0=\0\0\0\40\0\0\0\16\0\0\0\5\0\0\0\2\0\0\0\1\0\0\0\1\0\0\0\1"
-  "\0\0\0\2\0\0\0\5\0\0\0\17\0\0\0#\37\37\37\323\354\354\354\377\342\342"
-  "\342\377\300\300\300\377\250\250\250\377\0\0\0\325\0\0\0G\0\0\0%\0\0"
-  "\0\16\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\2\0\0\0\7\0\0\0\24\0\0\0\336\346\346\346\377\357\357\357\377"
-  "\313\313\313\377\267\267\267\377\0\0\0\322\0\0\0W\0\0\0""6\0\0\0\34\0"
-  "\0\0\15\0\0\0\10\0\0\0\5\0\0\0\5\0\0\0\5\0\0\0\5\0\0\0\5\0\0\0\10\0\0"
-  "\0\16\0\0\0\35\0\0\0\301\351\351\351\377\345\345\345\377\305\305\305"
-  "\377\256\256\256\377\0\0\0\360\0\0\0O\0\0\0.\0\0\0\25\0\0\0\10\0\0\0"
-  "\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\6\0\0\0"
-  "\17\0\0\0\37\0\0\0\354\332\332\332\377\353\353\353\377\312\312\312\377"
-  "\253\253\253\377\0\0\0\322\0\0\0Y\0\0\0<\0\0\0%\0\0\0\32\0\0\0\26\0\0"
-  "\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\26\0\0\0\32\0\0\0&\0"
-  "\0\0\300\344\344\344\377\343\343\343\377\312\312\312\377\255\254\252"
-  "\377\0\0\0\371\0\0\0Y\0\0\0;\0\0\0\"\0\0\0\23\0\0\0\12\0\0\0\5\0\0\0"
-  "\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5""1\26\7f7\31\10\3777\31\10\377"
-  "7\31\10\377\234R\27\377\270n%\377\271k&\377\247Z\34\3777\31\10\3777\31"
-  "\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10"
-  "\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\377"
-  "7\31\10\377\245^\37\377\274s*\377\270o'\377\227U\32\3777\31\10\3777\31"
-  "\10\3777\31\10\3777\31\10\377%\20\5_\0\0\0\33\0\0\0\16\0\0\0\5\0\0\0"
-  "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\3\0\0\0\12""7\31\10\377\311\234b\377\364\341\313"
-  "\377\364\340\311\377\357\333\276\377\354\325\267\377\353\322\264\377"
-  "\352\322\263\377\353\317\260\377\351\316\256\377\350\314\253\377\347"
-  "\314\250\377\350\307\241\377\346\306\241\377\346\306\241\377\346\306"
-  "\241\377\346\306\241\377\346\306\241\377\350\307\241\377\350\307\241"
-  "\377\346\306\241\377\345\305\240\377\345\305\240\377\343\302\232\377"
-  "\340\300\233\377\340\275\223\377\337\272\222\377\337\272\216\377\335"
-  "\263\206\377\325\254|\377\242a\33\3777\31\10\377\0\0\0""1\0\0\0\32\0"
-  "\0\0\12\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0\20""7\31\10\377\365\346\320"
-  "\377\352\323\257\377\352\317\257\377\343\302\232\377\332\270\213\377"
-  "\332\266\207\377\330\260\201\377\326\256\177\377\323\253|\377\321\251"
-  "t\377\317\245n\377\314\243m\377\312\237g\377\312\237g\377\312\237g\377"
-  "\312\237g\377\312\237g\377\312\237g\377\312\237g\377\310\236g\377\306"
-  "\233c\377\302\230a\377\302\223[\377\277\220R\377\274\210K\377\275\204"
-  "@\377\272~=\377\263v4\377\247j\"\377\215S\24\3777\31\10\377\0\0\0E\0"
-  "\0\0&\0\0\0\17\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\23""7\31\10\377\365"
-  "\344\316\377\351\316\256\377\347\315\250\377\337\275\220\377\330\261"
-  "\203\377\325\255~\377\322\252{\377\322\246w\377\320\247q\377\315\243"
-  "l\377\310\237h\377\305\233d\377\304\231a\377\304\231a\377\304\231a\377"
-  "\305\232b\377\305\232b\377\305\232b\377\305\232b\377\304\231a\377\302"
-  "\230]\377\301\224Z\377\277\220T\377\276\216O\377\274\207I\377\272\202"
-  "\77\377\272~=\377\261t2\377\247j\"\377\213R\24\3777\31\10\377\0\0\0Q"
-  "\0\0\0.\0\0\0\23\0\0\0\5\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\24""7\31\10\377\365"
-  "\346\320\377\353\317\260\377\351\316\256\377\340\277\227\377\333\264"
-  "\206\377\330\260\201\377\327\257\200\377\322\254{\377\322\246w\377\320"
-  "\246o\377\314\243m\377\265\216\\\377\240~P\377\232yM\377\232yM\377\262"
-  "\214Y\377\307\234d\377\307\234d\377\307\234d\377\305\232b\377\302\227"
-  "_\377\302\223[\377\277\220T\377\276\216O\377\274\204A\377\272\202\77"
-  "\377\265|8\377\257s,\377\243f\36\377\207P\24\3777\31\10\377\0\0\0W\0"
-  "\0\0""2\0\0\0\25\0\0\0\5\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10\377\365"
-  "\344\316\377\352\317\257\377\350\315\251\377\337\274\222\377\325\255"
-  "~\377\322\253}\377\322\252{\377\320\253u\377\320\246o\377\315\243l\377"
-  "\263\216]\377\224tJ\377w^<\377\40\31\20\377\0\0\0\377\40\31\20\377y`"
-  ">\377\310\237h\377\312\237g\377\307\235f\377\305\233d\377\304\231a\377"
-  "\302\230]\377\277\221V\377\276\216O\377\276\206E\377\274\203\77\377\266"
-  "|7\377\252l#\377\215U\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0"
-  "\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10\377\365\344\316\377\351\316"
-  "\256\377\350\316\251\377\341\274\224\377\332\264\207\377\330\262\201"
-  "\377\327\257\200\377\322\252{\377\320\250s\377\317\245n\377\222tM\377"
-  "z`>\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377y`\77\377\312"
-  "\237g\377\305\233d\377\305\232b\377\302\227_\377\301\224Z\377\276\217"
-  "Q\377\274\207I\377\272\201=\377\267~:\377\263y4\377\246i!\377\213R\24"
-  "\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5"
-  "\0\0\0\25""7\31\10\377\364\341\313\377\350\315\251\377\345\311\244\377"
-  "\335\272\220\377\325\255~\377\322\252{\377\322\252{\377\322\245u\377"
-  "\321\247p\377\314\243m\377\225uL\377\40\32\20\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377!\32\20\377\327\267\216\377\310\236g\377"
-  "\306\233c\377\304\231a\377\302\227_\377\277\221V\377\275\214L\377\274"
-  "\210E\377\273\202>\377\266|7\377\251k\"\377\215S\24\3777\31\10\377\0"
-  "\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10"
-  "\377\365\344\316\377\351\315\254\377\347\313\246\377\337\274\222\377"
-  "\330\260\201\377\326\256\177\377\322\253}\377\322\252{\377\321\245r\377"
-  "\315\243l\377\226wN\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0"
-  "\377\0\0\0\377\0\0\0\377\341\313\255\377\307\235f\377\304\231a\377\302"
-  "\227_\377\300\223Y\377\276\217Q\377\275\214L\377\274\205C\377\272~=\377"
-  "\263x2\377\247j\"\377\213R\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25"
-  "\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10\377\364\341\313\377\350"
-  "\314\247\377\345\312\244\377\334\271\217\377\326\256\177\377\323\253"
-  "|\377\322\252{\377\322\245u\377\317\245n\377\312\241k\377\225uL\377\40"
-  "\31\20\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\40\31\17"
-  "\377\336\306\247\377\302\230a\377\301\222V\377\277\220T\377\275\215N"
-  "\377\274\207I\377\272\202\77\377\265}:\377\265x6\377\255r,\377\244f\35"
-  "\377\207P\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\1\0\0\0\5\0\0\0\25""7\31\10\377\365\344\316\377\351\315\254\377\347"
-  "\313\246\377\335\272\220\377\325\255~\377\322\253y\377\321\250r\377\317"
-  "\245n\377\312\241k\377\310\237h\377\305\232b\377u\\8\377\0\0\0\377\0"
-  "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377u[7\377\335\307\247\377\302\223"
-  "[\377\301\222V\377\277\220R\377\276\216O\377\274\210K\377\274\203\77"
-  "\377\267\177<\377\266|7\377\260u/\377\244h!\377\211Q\24\3777\31\10\377"
-  "\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10"
-  "\377\365\346\320\377\352\317\257\377\351\316\252\377\341\274\224\377"
-  "\333\264\206\377\332\263\205\377\332\263\205\377\326\256\177\377\322"
-  "\253y\377\320\250s\377\317\245n\377\314\243m\377z`>\377!\32\20\377\0"
-  "\0\0\377\40\32\21\377\222~c\377\343\317\263\377\324\263\210\377\306\233"
-  "c\377\302\230]\377\301\224Z\377\277\220T\377\275\214L\377\273\204D\377"
-  "\267\177<\377\266z9\377\261v0\377\244h!\377\213R\24\3777\31\10\377\0"
-  "\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10"
-  "\377\364\341\313\377\351\316\252\377\345\311\244\377\332\270\213\377"
-  "\322\254w\377\322\245u\377\321\250r\377\315\244n\377\312\241k\377\310"
-  "\236g\377\304\231a\377\302\230]\377\245}M\377\0\0\0\377\0\0\0\377\0\0"
-  "\0\377\331\277\236\377\312\243q\377\304\231a\377\302\230a\377\302\223"
-  "[\377\277\221V\377\277\220T\377\275\214L\377\274\210E\377\272\202\77"
-  "\377\267}8\377\263x2\377\255o&\377\211Q\24\3777\31\10\377\0\0\0X\0\0"
-  "\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10\377\365"
-  "\344\316\377\351\316\252\377\347\313\246\377\334\271\217\377\326\256"
-  "\177\377\323\253|\377\322\252{\377\322\245u\377\320\246o\377\312\241"
-  "k\377\310\236g\377\272\223^\377\225tJ\377\0\0\0\377\0\0\0\377\0\0\0\377"
-  "\305\263\233\377\304\231a\377\304\231a\377\302\230a\377\301\222V\377"
-  "\277\221V\377\276\216O\377\274\207I\377\274\203\77\377\267~:\377\265"
-  "y8\377\255v.\377\257r*\377\207P\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0"
-  "\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10\377\365\346\320\377"
-  "\352\317\257\377\351\316\252\377\341\275\226\377\333\264\206\377\330"
-  "\260\201\377\326\256\177\377\322\254{\377\320\250s\377\315\243l\377\312"
-  "\240i\377\265\217]\377\203fA\377\0\0\0\377\0\0\0\377\0\0\0\377\217uT"
-  "\377\336\306\247\377\304\231a\377\302\230]\377\301\222V\377\277\220T"
-  "\377\275\215N\377\274\211G\377\274\203\77\377\267~:\377\265y8\377\257"
-  "s,\377\275\202B\377\207P\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0"
-  "\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10\377\364\341\313\377\347"
-  "\314\250\377\346\306\241\377\333\270\216\377\323\253|\377\322\253y\377"
-  "\321\247v\377\320\246o\377\314\242k\377\312\237g\377\305\232b\377\264"
-  "\215Y\377lT3\377\0\0\0\377\0\0\0\377\0\0\0\377mU6\377\336\306\247\377"
-  "\304\231a\377\302\230a\377\302\223[\377\301\222V\377\277\220R\377\274"
-  "\210K\377\273\204D\377\272~=\377\264{7\377\261v0\377\300\215Q\377\211"
-  "N\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0"
-  "\0\5\0\0\0\25""7\31\10\377\364\340\311\377\347\313\246\377\346\306\241"
-  "\377\334\263\207\377\321\253v\377\321\245r\377\320\246o\377\315\243l"
-  "\377\310\237h\377\304\231a\377\262\213W\377\254\203N\377\77""0\34\377"
-  "\0\0\0\377\0\0\0\377\0\0\0\377@2\36\377\322\275\237\377\310\242q\377"
-  "\302\223[\377\277\221V\377\277\220T\377\275\215N\377\274\211G\377\270"
-  "\200=\377\265|8\377\265x6\377\257t.\377\300\215Q\377\206L\23\3777\31"
-  "\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25"
-  "7\31\10\377\364\341\313\377\346\312\245\377\346\306\241\377\333\264\206"
-  "\377\321\253v\377\320\247q\377\317\245n\377\312\241k\377\310\236g\377"
-  "\304\231a\377\262\207S\377\232uE\377\77""0\34\377\0\0\0\377\0\0\0\377"
-  "\0\0\0\377\77""0\34\377\211h>\377\332\301\240\377\275\216P\377\275\215"
-  "N\377\274\210K\377\273\204D\377\272\202\77\377\267~:\377\264{7\377\261"
-  "w2\377\255q*\377\312\235c\377\207M\24\3777\31\10\377\0\0\0X\0\0\0""3"
-  "\0\0\0\25\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\25""7\31\10\377\364\341\313"
-  "\377\350\314\247\377\344\310\243\377\332\270\215\377\323\253|\377\322"
-  "\246w\377\320\253u\377\320\246o\377\313\242l\377\310\237h\377\267\217"
-  "[\377\177c\77\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377r"
-  "Y8\377\323\263\211\377\302\230a\377\301\222V\377\277\221V\377\276\217"
-  "Q\377\274\210K\377\274\204A\377\265}:\377\265|8\377\261v0\377\314\237"
-  "i\377\211Q\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\1\0\0\0\5\0\0\0\25""7\31\10\377\365\344\316\377\350\315\251\377\345"
-  "\311\244\377\334\271\217\377\325\255~\377\322\252{\377\322\253y\377\321"
-  "\247p\377\317\245n\377\312\241k\377\310\237h\377\305\232b\377\305\232"
-  "b\377\305\232b\377\305\232b\377\305\232b\377\305\232b\377\305\232b\377"
-  "\305\232b\377\304\231a\377\302\223[\377\277\221V\377\277\220R\377\274"
-  "\207I\377\274\203\77\377\267~:\377\270\177;\377\274\202=\377\316\241"
-  "k\377\211N\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\1\0\0\0\5\0\0\0\25""7\31\10\377\364\341\313\377\350\313\245\377\345"
-  "\311\244\377\332\270\213\377\322\252{\377\322\245u\377\321\247p\377\315"
-  "\244n\377\312\237g\377\307\234d\377\304\231a\377\301\227\\\377\300\223"
-  "Y\377\300\222W\377\300\222W\377\300\222W\377\300\222W\377\300\222W\377"
-  "\300\222W\377\277\221V\377\277\220R\377\276\216O\377\274\211G\377\273"
-  "\204D\377\271\201>\377\265|8\377\270\177;\377\274\205E\377\315\240j\377"
-  "\207P\24\3777\31\10\377\0\0\0X\0\0\0""3\0\0\0\25\0\0\0\6\0\0\0\1\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1"
-  "\0\0\0\5\0\0\0\25""7\31\10\377\364\340\311\377\346\311\243\377\345\305"
-  "\240\377\331\270\210\377\323\246v\377\320\247q\377\317\245n\377\313\242"
-  "l\377\312\237g\377\306\233c\377\305\232b\377\304\231a\377\302\230]\377"
-  "\302\230a\377\302\230a\377\304\231a\377\304\231a\377\305\232b\377\305"
-  "\232b\377\304\231a\377\301\224Z\377\300\223Y\377\277\220T\377\274\214"
-  "M\377\274\211G\377\276\212M\377\304\231a\377\276\213O\377\307\235`\377"
-  "\211N\24\3777\31\10\377\0\0\0W\0\0\0""3\0\0\0\25\0\0\0\5\0\0\0\1\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1"
-  "\0\0\0\5\0\0\0\24""7\31\10\377\364\340\311\377\346\310\241\377\341\303"
-  "\234\377\332\263\205\377\321\245r\377\317\245n\377\315\243l\377\310\237"
-  "h\377\305\233d\377\302\231_\377\302\223[\377\300\222W\377\277\221V\377"
-  "\277\221V\377\300\222W\377\302\223[\377\301\227\\\377\305\232b\377\310"
-  "\236g\377\315\243l\377\315\243l\377\316\241k\377\316\241k\377\322\253"
-  "y\377\322\252w\377\321\245r\377\324\247s\377\277\212L\377\261s0\377\207"
-  "M\24\3777\31\10\377\0\0\0T\0\0\0""0\0\0\0\24\0\0\0\5\0\0\0\1\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0"
-  "\0\5\0\0\0\22""3\27\7\301\262u-\377\307\235`\377\304\232]\377\275\214"
-  "L\377\272~=\377\270~9\377\266z9\377\265x6\377\263u2\377\257w.\377\255"
-  "r,\377\254t+\377\252r)\377\252r)\377\252r)\377\256q)\377\256q)\377\256"
-  "q)\377\256q)\377\252r)\377\251m&\377\252l#\377\245i\"\377\243g\40\377"
-  "\242e\35\377\236a\31\377\233_\30\377\231]\26\377\222V\25\377X0\15\377"
-  "&\21\5\264\0\0\0K\0\0\0*\0\0\0\21\0\0\0\4\0\0\0\1\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0\16"
-  "+\23\6q1\26\7\3077\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10"
-  "\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\377"
-  "7\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31"
-  "\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10\3777\31\10"
-  "\3777\31\10\3777\31\10\3777\31\10\3777\31\10\377&\21\5\264\14\5\1e\0"
-  "\0\0;\0\0\0\40\0\0\0\14\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\11\0\0\0\30"
-  "\0\0\0,\0\0\0A\0\0\0O\0\0\0U\0\0\0W\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0"
-  "X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0"
-  "\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0X\0\0\0W\0\0\0S\0"
-  "\0\0K\0\0\0;\0\0\0'\0\0\0\24\0\0\0\7\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0"
-  "\0\4\0\0\0\15\0\0\0\30\0\0\0$\0\0\0,\0\0\0""0\0\0\0""3\0\0\0""3\0\0\0"
-  "3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0"
-  "\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3"
-  "\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""3\0\0\0""2\0\0\0""0\0\0\0"
-  "*\0\0\0\40\0\0\0\24\0\0\0\11\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\2\0\0\0\4\0\0\0\11\0\0\0\16\0\0\0\22\0\0\0\24\0\0\0\25\0\0\0\25\0"
-  "\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25"
-  "\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0"
-  "\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\25\0\0\0\24\0"
-  "\0\0\21\0\0\0\14\0\0\0\7\0\0\0\3\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\4\0\0\0\5\0\0\0\5\0\0\0\5\0\0\0\5\0\0"
-  "\0\5\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6"
-  "\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0\0\6\0\0"
-  "\0\6\0\0\0\6\0\0\0\6\0\0\0\5\0\0\0\5\0\0\0\5\0\0\0\4\0\0\0\3\0\0\0\2"
-  "\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0"
-  "\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1"
-  "\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0"
-  "\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0"};
-
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/no-pixbuf-csource.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/no-pixbuf-csource.patch
deleted file mode 100644
index e0765ba..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui/no-pixbuf-csource.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libgnomeui-2.6.1.1/configure.in.old	2004-08-04 00:28:43.582266664 +0100
-+++ libgnomeui-2.6.1.1/configure.in	2004-08-04 00:29:27.496590672 +0100
-@@ -235,7 +235,7 @@
- 
- dnl This is installed from GTK+ 2.0's gdk-pixbuf
- AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
--test -z "$GDK_PIXBUF_CSOURCE" && AC_MSG_ERROR([
-+test -z "$GDK_PIXBUF_CSOURCE" && AC_MSG_WARN([
- *** You need the gdk-pixbuf-csource tool which is installed
- *** from GTK+ 2.0's gdk-pixbuf.
- ***
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui_2.24.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui_2.24.5.bb
deleted file mode 100644
index 45219d4..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomeui_2.24.5.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-DESCRIPTION = "GNOME User Interface Library"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605"
-
-SECTION = "x11/gnome/libs"
-DEPENDS = "libgnome libgnomecanvas libbonoboui libgnome-keyring intltool-native gnome-common-native"
-
-inherit gnome
-
-FILES_${PN} += "${libdir}/gtk-2.0/*/filesystems/lib*.so \
-                ${libdir}/libglade/*/lib*.so \
-                ${datadir}/pixmaps/gnome-about-logo.png"
-FILES_${PN}-dev += "${libdir}/gtk-2.0/*/filesystems/*.la ${libdir}/gtk-2.0/*/filesystems/*.a ${libdir}/libglade/*/*.la"
-FILES_${PN}-staticdev += "${libdir}/libglade/*/*.a"
-
-SRC_URI += " \
-    file://0001-suppress-string-format-literal-warning-to-fix-build-.patch \
-    file://gnome-stock-pixbufs.h \
-    file://no-pixbuf-csource.patch \
-"
-SRC_URI[archive.md5sum] = "d4bb506b1916015323928faab5aa708b"
-SRC_URI[archive.sha256sum] = "ae352f2495889e65524c979932c909f4629a58e64290fb0c95333373225d3c0f"
-GNOME_COMPRESS_TYPE="bz2"
-
-EXTRA_OECONF = "--disable-gtk-doc"
-
-do_configure_prepend() {
-    install -m 0644 ${WORKDIR}/gnome-stock-pixbufs.h ${S}/libgnomeui/pixmaps/gnome-stock-pixbufs.h
-}
-
-LDFLAGS += "-lm"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtkstylus/libgtkstylus_0.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtkstylus/libgtkstylus_0.5.bb
index 3cd7910..a7c8a6f 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtkstylus/libgtkstylus_0.5.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtkstylus/libgtkstylus_0.5.bb
@@ -5,7 +5,9 @@
 LIC_FILES_CHKSUM = "file://tap.c;beginline=1;endline=20;md5=71756eeb144e9eeb177c69aa672b1635"
 PR = "r4"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://burtonini.com/temp/${BP}.tar.gz \
     file://gtkstylus.sh"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtop/libgtop_2.30.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtop/libgtop_2.30.0.bb
deleted file mode 100644
index 946d118..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtop/libgtop_2.30.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "LibGTop2"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://copyright.txt;md5=dbc839bf158d19a20e661db14db7a58c"
-
-inherit gnomebase lib_package gtk-doc distro_features_check gobject-introspection
-# depends on libxau
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
-           file://0001-netload-Include-libc-net-headers-unconditionally.patch \
-           "
-SRC_URI[archive.md5sum] = "ee29a9ef60659ebf4b075ac281f71cb2"
-SRC_URI[archive.sha256sum] = "463bcbe5737b1b93f3345ee34abf601e8eb864f507c49ff1921c2737abafc1e5"
-
-DEPENDS = "glib-2.0 intltool-native libxau"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtop/libgtop_2.38.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtop/libgtop_2.38.0.bb
new file mode 100644
index 0000000..494934f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libgtop/libgtop_2.38.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "LibGTop2"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+inherit gnomebase lib_package gtk-doc distro_features_check gobject-introspection gettext
+
+# depends on libxau
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.md5sum] = "bb0ce7de6b28694b40405eedac8a31b5"
+SRC_URI[archive.sha256sum] = "4f6c0e62bb438abfd16b4559cd2eca0251de19e291c888cdc4dc88e5ffebb612"
+
+DEPENDS = "glib-2.0 libxau"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl-native_0.8.14.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl-native_0.8.14.bb
deleted file mode 100644
index 2252c44..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl-native_0.8.14.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-SECTION = "libs"
-require libidl_${PV}.bb
-inherit native
-
-PR = "r1"
-
-DEPENDS = "bison-native glib-2.0-native flex-native"
-
-SRC_URI[md5sum] = "bb8e10a218fac793a52d404d14adedcb"
-SRC_URI[sha256sum] = "c5d24d8c096546353fbc7cedf208392d5a02afe9d56ebcc1cccb258d7c4d2220"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl.inc b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl.inc
deleted file mode 100644
index 1a5c815..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-DESCRIPTION = "Library for parsing CORBA IDL files"
-HOMEPAGE = "http://andrewtv.org/libIDL/"
-SECTION = "x11/gnome/libs"
-LICENSE = "LGPLv2+"
-
-inherit autotools pkgconfig
-
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-${PV}.tar.bz2"
-
-S = "${WORKDIR}/libIDL-${PV}"
-
-FILES_${PN} = "${libdir}/*.so.*"
-FILES_${PN}-dev += " ${bindir}"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl_0.8.14.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl_0.8.14.bb
deleted file mode 100644
index 86dfcf2..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl_0.8.14.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require libidl.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
-
-DEPENDS = "glib-2.0 flex-native libidl-native"
-
-PR = "r1"
-
-BINCONFIG_GLOB = "*-config-2"
-inherit autotools pkgconfig binconfig
-
-SRC_URI[md5sum] = "bb8e10a218fac793a52d404d14adedcb"
-SRC_URI[sha256sum] = "c5d24d8c096546353fbc7cedf208392d5a02afe9d56ebcc1cccb258d7c4d2220"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb
index d6aeed3..957d7d0 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.5.bb
@@ -15,7 +15,9 @@
 
 B = "${S}"
 
-inherit autotools pkgconfig gobject-introspection
+inherit distro_features_check autotools pkgconfig gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_configure_prepend() {
 	(cd ${S}; NOCONFIGURE="yes" . ${S}/autogen.sh)
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/0001-drop-zenity-detection.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/0001-drop-zenity-detection.patch
new file mode 100644
index 0000000..3493e51
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/0001-drop-zenity-detection.patch
@@ -0,0 +1,33 @@
+From ec0e52b49c9b6869413c9544c2ed44710ab91141 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 14 Apr 2018 16:15:59 +0800
+Subject: [PATCH] drop zenity detection
+
+OE does not support zenity
+
+Upstream-Status: inappropriate [OE specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5f9e7e9..80b32c7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -359,11 +359,6 @@ fi
+ 
+ AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "yes") 
+ 
+-AC_PATH_PROG(ZENITY, zenity, no)
+-if test x"$ZENITY" = xno; then
+-  AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
+-fi
+-
+ dnl **************************************************************************
+ dnl Check for Vulkan support
+ dnl **************************************************************************
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/0001-ui-Define-_GNU_SOURCE.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/0001-ui-Define-_GNU_SOURCE.patch
deleted file mode 100644
index 539d756..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/0001-ui-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From e7fd072f0df968f342878b77098e97ff07ed28d7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 14 Jul 2017 10:26:31 -0700
-Subject: [PATCH] ui: Define _GNU_SOURCE
-
-it becomes portable across musl and glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/ui/theme.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/ui/theme.c b/src/ui/theme.c
-index 84b57a0..c7eafc8 100644
---- a/src/ui/theme.c
-+++ b/src/ui/theme.c
-@@ -60,6 +60,7 @@
- #include <gtk/gtk.h>
- #include <string.h>
- #include <stdlib.h>
-+#define _GNU_SOURCE
- #define __USE_XOPEN
- #include <math.h>
- 
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/remove-yelp-help-rules-var.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/remove-yelp-help-rules-var.patch
deleted file mode 100644
index 1970e9a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity/remove-yelp-help-rules-var.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Remove unused variable (YELP_HELP_RULES)
-
-Upstream-Status: Pending
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: metacity-2.34.13/doc/creating_themes/Makefile.am
-===================================================================
---- metacity-2.34.13.orig/doc/creating_themes/Makefile.am
-+++ metacity-2.34.13/doc/creating_themes/Makefile.am
-@@ -1,6 +1,5 @@
- ### This part of Makefile.am can be customized by you.
- 
--@YELP_HELP_RULES@
- 
- # The name of the directory in /usr/share/gnome/help/, 
- # and the name of the main .xml file:
-Index: metacity-2.34.13/doc/creating_themes/Makefile.in
-===================================================================
---- metacity-2.34.13.orig/doc/creating_themes/Makefile.in
-+++ metacity-2.34.13/doc/creating_themes/Makefile.in
-@@ -455,7 +455,6 @@ uninstall-am:
- 	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
- 
- 
--@YELP_HELP_RULES@
- 
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity_2.34.13.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity_2.34.13.bb
deleted file mode 100644
index 370de70..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity_2.34.13.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SECTION = "x11/wm"
-SUMMARY = "Metacity is the boring window manager for the adult in you"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://src/include/main.h;endline=24;md5=c2242df552c880280315989bab626b90"
-
-DEPENDS = "gsettings-desktop-schemas startup-notification gtk+ gconf gdk-pixbuf-native libcanberra gnome-doc-utils libgtop intltool-native"
-PR = "r1"
-
-inherit gnomebase update-alternatives distro_features_check
-# depends on startup-notification which depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-GNOME_COMPRESS_TYPE = "xz"
-
-SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
-           file://remove-yelp-help-rules-var.patch \
-           file://0001-ui-Define-_GNU_SOURCE.patch \
-           "
-SRC_URI[archive.md5sum] = "6d89b71672d4fa49fc87f83d610d0ef6"
-SRC_URI[archive.sha256sum] = "8cf4dbf0da0a6f36357ce7db7f829ec685908a7792453c662fb8184572b91075"
-
-ALTERNATIVE_${PN} = "x-window-manager"
-ALTERNATIVE_TARGET[x-window-manager] = "${bindir}/metacity"
-ALTERNATIVE_PRIORITY = "10"
-
-EXTRA_OECONF += "--disable-xinerama"
-
-do_configure_prepend() {
-    sed -i -e 's:$ZENITY:$NOZENITY:g' -e 's:-Werror::g' ${S}/configure.in
-}
-
-FILES_${PN} += "${datadir}/themes ${datadir}/gnome-control-center ${datadir}/gnome"
-RDEPENDS_${PN} += "gsettings-desktop-schemas"
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity_3.38.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity_3.38.0.bb
new file mode 100644
index 0000000..48fc914
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity_3.38.0.bb
@@ -0,0 +1,34 @@
+SECTION = "x11/wm"
+SUMMARY = "Metacity is the boring window manager for the adult in you"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b4cce53560b8e619ffa7c830fb8761aa \
+                    file://src/include/main.h;endline=24;md5=72148ede07a6dadd01de6a882d20a9ad"
+
+DEPENDS = "gsettings-desktop-schemas startup-notification \
+           gnome-doc-utils gdk-pixbuf-native \
+           gtk+3 glib-2.0 libcanberra libgtop intltool-native"
+
+inherit autotools gettext gnomebase distro_features_check
+# depends on startup-notification which depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "git://github.com/GNOME/metacity.git;branch=master \
+           file://0001-drop-zenity-detection.patch \
+"
+
+S = "${WORKDIR}/git"
+SRCREV = "c0d4b2fc0fcd6f2d3c37da935923f9e9ed5eb99f"
+
+EXTRA_OECONF += "--disable-xinerama"
+
+do_configure_prepend() {
+    cd ${S}
+    aclocal --install || exit 1
+    autoreconf --verbose --force --install -Wno-portability || exit 1
+    cd -
+
+}
+
+FILES_${PN} += "${datadir}/themes ${datadir}/gnome-control-center ${datadir}/gnome"
+RDEPENDS_${PN} += "gsettings-desktop-schemas"
+
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/no-try-run-strftime.diff b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/no-try-run-strftime.diff
deleted file mode 100644
index ccd2934..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/no-try-run-strftime.diff
+++ /dev/null
@@ -1,28 +0,0 @@
---- /tmp/configure.in	2009-04-13 11:26:43.000000000 +0200
-+++ nautilus-2.26.1/configure.in	2009-04-13 11:28:37.000000000 +0200
-@@ -375,25 +375,6 @@
- 
- dnl ===========================================================================
- 
--dnl strftime checks
--
--AC_TRY_RUN([#include <time.h>
--                int main ()
--                {
--                  char buf[100];
--                  struct tm tm = {0};
--                  tm.tm_year = 99;
--                  if (strftime(buf, 100, "%EY", &tm) == 4 &&
--		      strcmp (buf, "1999")==0)
--                    return 0;
--                  return 1;
--                }
--            ],
--	    AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.])
--            )
--
--dnl ===========================================================================
--
- #
- # Checks for Xft/XRender
- #
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus3/no-try-run-strftime.diff b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus3/no-try-run-strftime.diff
deleted file mode 100644
index 56d2e15..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus3/no-try-run-strftime.diff
+++ /dev/null
@@ -1,41 +0,0 @@
-From dc9c8cf2676c8c91ea0ae250cfedf863352f3ccd Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 24 Jun 2011 20:24:08 +0200
-Subject: [PATCH] hack out check that tries to run generated binaries
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- configure.in |   17 +----------------
- 1 files changed, 1 insertions(+), 16 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index c3aa371..1d3ecdc 100644
---- a/configure.in
-+++ b/configure.in
-@@ -251,22 +251,7 @@ AC_SUBST(WARNING_CFLAGS)
- 
- dnl ===========================================================================
- 
--dnl strftime checks
--
--AC_TRY_RUN([#include <time.h>
--                int main ()
--                {
--                  char buf[100];
--                  struct tm tm = {0};
--                  tm.tm_year = 99;
--                  if (strftime(buf, 100, "%EY", &tm) == 4 &&
--		      strcmp (buf, "1999")==0)
--                    return 0;
--                  return 1;
--                }
--            ],
--	    AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.])
--            )
-+AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.])
- 
- dnl ==========================================================================
- 	
--- 
-1.6.6.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_3.18.5.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_3.18.5.bb
new file mode 100644
index 0000000..8fdbf6a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_3.18.5.bb
@@ -0,0 +1,29 @@
+SUMMARY = "File manager for GNOME"
+SECTION = "x11/gnome"
+
+LICENSE="GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=36cf660aea2b8beffba7945f44a7e748 \
+                    file://COPYING.EXTENSIONS;md5=7579d6678402a1868631bf82c93ff0d4 \
+                    file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
+
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/nautilus/3.18/nautilus-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "0f578bda5655c0ce204befafca5803d7"
+SRC_URI[sha256sum] = "60a927c0522b4cced9d8f62baed2ee5e2fd4305be4523eb5bc44805971a6cc15"
+
+DEPENDS = "gtk+3 gnome-desktop3 gsettings-desktop-schemas glib-2.0-native intltool-native pango"
+
+inherit distro_features_check autotools pkgconfig gobject-introspection
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = " \
+    --disable-gtk-doc \
+    --disable-update-mimedb \
+    --disable-nst-extension \
+    --enable-tracker=no \
+    --disable-schemas-compile \
+    --enable-xmp=no \
+    --enable-libexif=no \ 
+"
+
+FILES_${PN} += "${datadir}/*"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/0001-linc2-src-Makefile.am-fix-build-with-glib-2.36.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/0001-linc2-src-Makefile.am-fix-build-with-glib-2.36.patch
deleted file mode 100644
index daf7464..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/0001-linc2-src-Makefile.am-fix-build-with-glib-2.36.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 10bd8094e1d94e5c737791c7f4b6b844f535c120 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 3 May 2013 10:00:16 +0200
-Subject: [PATCH] linc2/src/Makefile.am: fix build with glib 2.36
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Submitted [1]
-
-[1] https://bugzilla.gnome.org/show_bug.cgi?id=696900
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- linc2/src/Makefile.am |    3 +--
- 1 files changed, 1 insertions(+), 2 deletions(-)
-
-diff --git a/linc2/src/Makefile.am b/linc2/src/Makefile.am
-index 357a2dd..ba0e347 100644
---- a/linc2/src/Makefile.am
-+++ b/linc2/src/Makefile.am
-@@ -12,8 +12,7 @@ INCLUDES =                         \
- 	-I$(top_builddir)/linc2/include  \
- 	-I$(top_srcdir)/linc2/include    \
- 	$(LINC_CFLAGS)             \
--	$(WARN_CFLAGS)             \
--	-DG_DISABLE_DEPRECATED
-+	$(WARN_CFLAGS)
- 
- if OS_WIN32
- else
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/0002-Use-AM_CPPFLAGS-instead-of-INCLUDES-and-fix-problem-.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/0002-Use-AM_CPPFLAGS-instead-of-INCLUDES-and-fix-problem-.patch
deleted file mode 100644
index 7993abb..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/0002-Use-AM_CPPFLAGS-instead-of-INCLUDES-and-fix-problem-.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From d91dbb42dc3b6073720027f68827acd0abee6d75 Mon Sep 17 00:00:00 2001
-From: Kjartan Maraas <kmaraas@gnome.org>
-Date: Tue, 14 May 2013 13:29:53 +0200
-Subject: [PATCH] Use AM_CPPFLAGS instead of INCLUDES and fix problem using
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport [1]
-
-[1] https://git.gnome.org/browse/ORBit2/commit/test/everything/Makefile.am?id=d91dbb42dc3b6073720027f68827acd0abee6d75
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- test/everything/Makefile.am | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/test/everything/Makefile.am b/test/everything/Makefile.am
-index 32beb36..cb4b1d6 100644
---- a/test/everything/Makefile.am
-+++ b/test/everything/Makefile.am
-@@ -10,7 +10,7 @@ EVERYTHING_IDLOUT =          \
- 	$(EVERYTHING_BUILT)  \
- 	everything-imodule.c
- 
--INCLUDES =                                 \
-+AM_CPPFLAGS =                              \
- 	-I$(top_srcdir)/include            \
- 	-I$(top_builddir)/include          \
- 	-I$(top_builddir)/src              \
-@@ -78,7 +78,7 @@ include $(top_srcdir)/Makefile.shared
- BUILT_SOURCES = ${EVERYTHING_BUILT} everything-imodule.c
- CLEANFILES = ${BUILT_SOURCES} iorfile
- 
--TESTS = $(srcdir)/test.sh
-+TESTS = $(top_builddir)/test/everything/test.sh
- 
- EXTRA_DIST = $(IDL_FILES) test.sh $(included_src)
- 
--- 
-1.8.3.1
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/configure-lossage.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/configure-lossage.patch
deleted file mode 100644
index 5fc1de5..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/configure-lossage.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- ORBit2-2.14.17/configure.in-orig	2009-01-10 09:36:18.000000000 -0800
-+++ ORBit2-2.14.17/configure.in	2009-06-17 15:10:59.000000000 -0700
-@@ -217,20 +217,20 @@ dnl
- dnl   So many people with broken linking setups asked about this
- dnl it turned out to be necessary to check for this.
- dnl
--dofus_save_libs="$LIBS"
--LIBS="$ORBIT_LIBS $LIBS"
--AC_TRY_RUN([ #include <stdio.h>
--             main ()
--             {
--               return 0;
--             } ],,
--           AC_MSG_ERROR([
--Linking is badly borked on your system. Please ensure your library path is correct
--Check config.log for details - check near the end of the log above 'failed program was'
--Alternatively ensure that your /etc/ld.so.conf (and/or LD_LIBRARY_PATH) includes the
--prefix you're compiling on: '${prefix}' ]), 
--AC_MSG_WARN([Could not check for borked linking while cross-compiling]))
--LIBS="$dofus_save_libs"
-+dnl dofus_save_libs="$LIBS"
-+dnl LIBS="$ORBIT_LIBS $LIBS"
-+dnl AC_TRY_RUN([ #include <stdio.h>
-+dnl             main ()
-+dnl              {
-+dnl                return 0;
-+dnl              } ],,
-+dnl            AC_MSG_ERROR([
-+dnl Linking is badly borked on your system. Please ensure your library path is correct
-+dnl Check config.log for details - check near the end of the log above 'failed program was'
-+dnl Alternatively ensure that your /etc/ld.so.conf (and/or LD_LIBRARY_PATH) includes the
-+dnl prefix you're compiling on: '${prefix}' ]), 
-+dnl AC_MSG_WARN([Could not check for borked linking while cross-compiling]))
-+dnl LIBS="$dofus_save_libs"
- 
- orig_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $ORBIT_CFLAGS"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/pkgconfig-fix.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/pkgconfig-fix.patch
deleted file mode 100644
index f629e50..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2/pkgconfig-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN ORBit2-2.14.12.orig/ORBit-2.0.pc.in ORBit2-2.14.12/ORBit-2.0.pc.in
---- ORBit2-2.14.12.orig/ORBit-2.0.pc.in	2008-01-29 13:45:22.000000000 +0100
-+++ ORBit2-2.14.12/ORBit-2.0.pc.in	2008-09-23 20:13:07.000000000 +0200
-@@ -2,7 +2,7 @@
- exec_prefix=@exec_prefix@
- libdir=@libdir@
- includedir=@includedir@
--orbit_idl=@bindir@/orbit-idl-2@EXEEXT@
-+orbit_idl=@exec_prefix@/bin/orbit-idl-2@EXEEXT@
- 
- 
- Name: ORBit-2.0
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.19.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.19.bb
deleted file mode 100644
index eb43972..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.19.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "CORBA ORB"
-HOMEPAGE = "http://www.gnome.org/projects/ORBit2"
-SECTION = "x11/gnome/libs"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-SRC_NAME = "ORBit2"
-SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
-SRC_URI = " \
-    ${GNOME_MIRROR}/${SRC_NAME}/${SHRT_VER}/${SRC_NAME}-${PV}.tar.bz2 \
-    file://configure-lossage.patch \
-    file://pkgconfig-fix.patch \
-    file://0001-linc2-src-Makefile.am-fix-build-with-glib-2.36.patch \
-    file://0002-Use-AM_CPPFLAGS-instead-of-INCLUDES-and-fix-problem-.patch \
-"
-SRC_URI[md5sum] = "7082d317a9573ab338302243082d10d1"
-SRC_URI[sha256sum] = "55c900a905482992730f575f3eef34d50bda717c197c97c08fa5a6eafd857550"
-
-BBCLASSEXTEND = "native"
-
-IDL_COMPILER_DEPENDS = "orbit2-native"
-IDL_COMPILER_DEPENDS_class-native = " "
-DEPENDS = "libidl popt ${IDL_COMPILER_DEPENDS}"
-
-# IDL_COMPILER_DEPENDS_class-native for some reason didn't work and orbit2-native
-# was still in orbit2-native DEPENDS causing circular dependency
-DEPENDS_class-native = "libidl-native popt-native"
-PARALLEL_MAKE = ""
-
-
-FILES_${PN} += "${libdir}/orbit-2.0/*.so"
-FILES_${PN}-dev += "${libdir}/orbit-2.0/*.la"
-FILES_${PN}-staticdev += "${libdir}/orbit-2.0/*.a"
-FILES_${PN}-dbg += "${libdir}/orbit-2.0/.debug"
-
-S = "${WORKDIR}/${SRC_NAME}-${PV}"
-
-LEAD_SONAME = "libORBit-2.so"
-
-inherit autotools pkgconfig gtk-doc
-
-EXTRA_OEMAKE = "IDL_COMPILER='${STAGING_BINDIR_NATIVE}/orbit-idl-2'"
-EXTRA_OEMAKE_class-native = " "
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/stock_contact.png b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/stock_contact.png
deleted file mode 100644
index 123b448..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/stock_contact.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/stock_person.png b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/stock_person.png
deleted file mode 100644
index 2b1328b..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/contacts/stock_person.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates.inc b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates.inc
deleted file mode 100644
index 12d2f83..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-DESCRIPTION = "Dates is a calendar application."
-HOMEPAGE = "http://pimlico-project.org/dates.html"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2 & GPLv2+ & LGPLv2+"
-
-SECTION = "x11"
-DEPENDS = "glib-2.0 gtk+ libglade evolution-data-server intltool-native"
-RDEPENDS_${PN} = "libedata-cal"
-
-inherit autotools gettext pkgconfig gtk-icon-cache
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/0001-Fix-format-security-warnings.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/0001-Fix-format-security-warnings.patch
deleted file mode 100644
index 4f551a7..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/0001-Fix-format-security-warnings.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 687881c5fa342686c8724adcdac0f9d555a351c3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Apr 2017 18:10:57 -0700
-Subject: [PATCH] Fix format security warnings
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/dates_callbacks.c | 2 +-
- src/dates_gtk.c       | 2 +-
- src/gconf-bridge.c    | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/dates_callbacks.c b/src/dates_callbacks.c
-index d704c8f..46b8cb1 100644
---- a/src/dates_callbacks.c
-+++ b/src/dates_callbacks.c
-@@ -365,7 +365,7 @@ dates_about_cb (GtkWidget *widget, DatesData *d)
- 
- 	if (!pixb) {
- 		g_assert (error);
--		g_warning (error->message);
-+		g_warning ("%s", error->message);
- 		g_clear_error (&error);
- 	}
- 
-diff --git a/src/dates_gtk.c b/src/dates_gtk.c
-index 403bc25..fd691d2 100644
---- a/src/dates_gtk.c
-+++ b/src/dates_gtk.c
-@@ -1114,7 +1114,7 @@ calendar_do_edit_dialog_response_cb (GtkDialog *dialog, gint response_id, gpoint
- 				GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- 				GTK_MESSAGE_WARNING,
- 				GTK_BUTTONS_NONE,
--				prompt);
-+				"%s", prompt);
- 
- 		g_free (prompt);
- 
-diff --git a/src/gconf-bridge.c b/src/gconf-bridge.c
-index 49754cf..67d3757 100644
---- a/src/gconf-bridge.c
-+++ b/src/gconf-bridge.c
-@@ -1220,7 +1220,7 @@ error_handler (GConfClient *client,
-                 dlg = gtk_message_dialog_new (NULL, 0,
-                                               GTK_MESSAGE_ERROR,
-                                               GTK_BUTTONS_OK,
--                                              message);
-+                                              "%s", message);
-                 g_free (message);
- 
-                 gtk_message_dialog_format_secondary_text
--- 
-2.12.2
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/dso_linking_change_build_fix.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/dso_linking_change_build_fix.patch
deleted file mode 100644
index 649d59d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/dso_linking_change_build_fix.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-after gcc linking has changed, all the libraries must be explicitely specified 
-This patch avoids these linking errors:
-
-
-| make[2]: Entering directory `/disk0/pokybuild/build1/tmp/work/i586-poky-linux/dates-0.4.11+git0+514185dc1f6588085fda41eb59898b93d0487dd4-r2/git/src'^M
-...
-| /disk0/pokybuild/build1/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: e: invalid DSO for symbol `pow@@GLIBC_2.0' definition^M
-| /disk0/pokybuild/build1/tmp/sysroots/i586-poky-linux/usr/lib/libm.so: could not read symbols: Bad value^M
-| collect2: ld returned 1 exit status^M
-| make[2]: *** [dates] Error 1
-
-
-
-| /disk0/pokybuild/build1/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: z: invalid DSO for symbol `pango_layout_get_extents' definition
-| /disk0/pokybuild/build1/tmp/sysroots/i586-poky-linux/usr/lib/libpango-1.0.so: could not read symbols: Bad value
-| collect2: ld returned 1 exit status
-| make[2]: *** [dates] Error 1
-
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2011/01/11
-
-Update:
-This is identified as a libtool issue. While creating the libgtkdatesview.la 
-file, libtool should have added these needed libraries in there.
- A bug has been created for this issue: 
-   http://bugzilla.pokylinux.org/show_bug.cgi?id=664
-Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2011/01/19
-
-Upstream-Status: Pending
-
-Index: git/src/Makefile.am
-===================================================================
---- git.orig/src/Makefile.am
-+++ git/src/Makefile.am
-@@ -34,6 +34,6 @@ dates_SOURCES = $(platform) 	\
- 	gconf-bridge.h		\
- 	gconf-bridge.c
- 
--dates_LDADD = $(DATES_LIBS) $(OWL_LIBS) libgtkdatesview.la
-+dates_LDADD = $(DATES_LIBS) $(OWL_LIBS) libgtkdatesview.la -lm -lpango-1.0
- 
- MAINTAINERCLEANFILES = config.h.in Makefile.in
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/uclibc-NL_TIME_FIRST_WEEKDAY-absent.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/uclibc-NL_TIME_FIRST_WEEKDAY-absent.patch
deleted file mode 100644
index 6ade470..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates/uclibc-NL_TIME_FIRST_WEEKDAY-absent.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-uclibc has langinfo.h but it does not define _NL_TIME_FIRST_WEEKDAY
-therefore we introduce a check in configure for the this define
-and then we make sure that we use it when it really exists
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac	2011-07-18 10:34:15.000000000 -0700
-+++ git/configure.ac	2011-07-18 10:54:26.403798188 -0700
-@@ -98,6 +98,8 @@
- 		src/libgtkdatesview.pc
- ])
- 
-+AC_CHECK_DECLS([_NL_TIME_FIRST_WEEKDAY],[],[],[[#include <langinfo.h>]])
-+
- AC_OUTPUT
- 
- echo " "
-Index: git/src/dates_view.c
-===================================================================
---- git.orig/src/dates_view.c	2011-07-18 10:34:15.000000000 -0700
-+++ git/src/dates_view.c	2011-07-18 10:58:46.093798136 -0700
-@@ -1505,7 +1505,11 @@
- 	priv->days = 1;
- 	priv->months = 0;
- 	priv->months_in_row = 4;
-+#if HAVE_DECL__NL_TIME_FIRST_WEEKDAY
- 	priv->week_start = *nl_langinfo (_NL_TIME_FIRST_WEEKDAY) - 1;
-+#else
-+	priv->week_start = 0;
-+#endif
- 	priv->dragbox = TRUE;
- 	priv->single_click = TRUE;
- 	priv->double_click = FALSE;
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates_git.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates_git.bb
deleted file mode 100644
index 14965e9..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/pimlico/dates_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require dates.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
-                    file://src/dates_view.h;endline=22;md5=29f934f356eb970309cdeb6693b3123a \
-                    file://src/dates_hildon.c;endline=19;md5=63938904198b25de429abb65fbdbdb8a \
-                    file://src/gconf-bridge.c;endline=22;md5=ad7626c6daf4aec590474a243f4912fa"
-
-SRCREV = "c8e30fa3211dcdfcda48184f4c57746a552b9c7a"
-PV = "0.4.11+git${SRCPV}"
-PR = "r9"
-
-S = "${WORKDIR}/git"
-
-SRC_URI = "git://git.gnome.org/${BPN} \
-           file://dso_linking_change_build_fix.patch \
-           file://uclibc-NL_TIME_FIRST_WEEKDAY-absent.patch \
-           file://0001-Fix-format-security-warnings.patch \
-           "
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends-2.10.2/system-tools-backends b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends-2.10.2/system-tools-backends
deleted file mode 100644
index 704c36d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/system-tools/system-tools-backends-2.10.2/system-tools-backends
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          system-tools-backends
-# Required-Start:    $local_fs dbus
-# Required-Stop:     $local_fs dbus
-# Should-Start:	     $syslog
-# Should-Stop:       $syslog
-# Default-Start:     2 3 4 5
-# Default-Stop:      1
-# Short-Description: Gnome System Tools Backends
-# Description:       The Gnome System Tools Backends daemon handles root-needed
-#                    operations to configure your machine with the Gnome System
-#		     Tools.
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/bin/system-tools-backends
-PIDDIR=/var/run
-PIDFILE=$PIDDIR/system-tools-backends.pid
-NAME=system-tools-backends
-DESC="System Tools Backends"
-
-test -x $DAEMON || exit 0
-
-set -e
-
-do_start() {
-    echo "Starting $DESC"
-    start-stop-daemon --start --startas $DAEMON --quiet --pidfile $PIDFILE
-}
-
-do_stop() {
-    echo "Stopping $DESC"
-    start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE --startas $DAEMON
-}
-
-case "$1" in
-  start)
-    do_start
-    ;;
-  stop)
-    do_stop
-    ;;
-  #reload)
-    #
-    # If the daemon can reload its config files on the fly
-    # for example by sending it SIGHUP, do it here.
-    #
-    # If the daemon responds to changes in its config file
-    # directly anyway, make this a do-nothing entry.
-    #
-    # echo "Reloading $DESC configuration files."
-    # start-stop-daemon --stop --signal 1 --quiet --pidfile \
-    #   /var/run/$NAME.pid --exec $DAEMON
-  #;;
-  restart|force-reload)
-    #
-    #   If the "reload" option is implemented, move the "force-reload"
-    #   option to the "reload" entry above. If not, "force-reload" is
-    #   just the same as "restart".
-    #
-    do_stop
-    sleep 5
-    do_start
-    ;;
-  *)
-    N=/etc/init.d/$NAME
-    echo "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2
-    exit 1
-    ;;
-esac
-
-exit 0
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes/drop-localedir-override.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes/drop-localedir-override.patch
deleted file mode 100644
index e37482b..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes/drop-localedir-override.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Causes locale file to be installed in /usr/locale instead of /usr/share/locale
-
-Apply the same fix as in evolution-data-server:
-https://git.gnome.org/browse/evolution-data-server/commit/configure.ac?id=ec46c763e9342f604b7228c660623d271dfeb101
-
-Upstream-Status: Pending
-
-diff -uNr gnome-themes-2.32.1.orig/configure.in gnome-themes-2.32.1/configure.in
---- gnome-themes-2.32.1.orig/configure.in	2015-09-18 15:01:25.152055729 +0200
-+++ gnome-themes-2.32.1/configure.in	2015-09-18 15:09:03.312072156 +0200
-@@ -19,11 +19,6 @@
- 
- AM_GLIB_GNU_GETTEXT
- 
--# AM_GLIB_GNU_GETTEXT above subst. $DATADIRNAME
--# this is the directory where the *.{mo,gmo} files are installed
--localedir='${prefix}/${DATADIRNAME}/locale'
--AC_SUBST(localedir)
--
- # Workaround to make aclocal get the right flags
- AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
- 
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes/iconpath-option.patch b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes/iconpath-option.patch
deleted file mode 100644
index 1b4096d..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes/iconpath-option.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-
-The patch is ported from sato-icon-theme.
-
-pkg-config will only search the target sysroot and we want the native script. This 
-patch adds an option to allow the path to the tool to be specified.
-
-Upstream-Status: Pending
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- configure.in |   26 ++++++++++++++++----------
- 1 file changed, 16 insertions(+), 10 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 5f7a18c..e8fc31e 100644
---- a/configure.in
-+++ b/configure.in
-@@ -74,16 +74,22 @@ AC_ARG_ENABLE([icon-mapping],
- ICONMAP="true"
- if test "x$enable_mapping" != "xno"; then
-    UTILS_REQUIRED=0.8.7
--
--   AC_MSG_CHECKING([icon-naming-utils >= $UTILS_REQUIRED])
--   PKG_CHECK_EXISTS(icon-naming-utils >= $UTILS_REQUIRED, have_utils=yes, have_utils=no)
--   if test "x$have_utils" = "xyes"; then
--      UTILS_PATH="`$PKG_CONFIG --variable=program_path icon-naming-utils`"
--      ICONMAP="$UTILS_PATH/icon-name-mapping"
--      AC_MSG_RESULT([yes])
--   else
--	AC_MSG_RESULT([no])
--   	AC_MSG_ERROR([icon-naming-utils >= $UTILS_REQUIRED is required to build and install gnome-themes])
-+   PKG_PROG_PKG_CONFIG()
-+   AC_ARG_WITH(iconmap,
-+   	    AC_HELP_STRING([--with-iconmap=<dir>], [The location of the icon-name-mapping script to use]),
-+   	    ICONMAP=$withval, ICONMAP="")
-+   if test "x$ICONMAP" = "x"; then
-+      AC_MSG_CHECKING([icon-naming-utils >= $UTILS_REQUIRED])
-+      PKG_CHECK_EXISTS(icon-naming-utils >= $UTILS_REQUIRED, have_utils=yes, have_utils=no)
-+      if test "x$have_utils" = "xyes"; then
-+         UTILS_PATH="`$PKG_CONFIG --variable=program_path icon-naming-utils`"
-+         ICONMAP="$UTILS_PATH/icon-name-mapping"
-+
-+         AC_MSG_RESULT([yes])
-+      else
-+         AC_MSG_RESULT([no])
-+         AC_MSG_ERROR([icon-naming-utils >= $UTILS_REQUIRED is required to build and install gnome-themes"])
-+      fi
-    fi
- fi
- AC_SUBST(ICONMAP)
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes_2.32.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes_2.32.1.bb
deleted file mode 100644
index 1a89f48..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-gnome/themes/gnome-themes_2.32.1.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "GNOME themes"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2b543dc97eb7594d026af39d9b54204b"
-
-PR = "r3"
-
-SECTION = "x11/gnome"
-DEPENDS = "gtk-engines icon-naming-utils icon-naming-utils-native \
-           glib-2.0 intltool-native libxml-simple-perl-native \
-           glib-2.0-native \
-"
-RDEPENDS_${PN} = "adwaita-icon-theme"
-
-EXTRA_OECONF += "--enable-all-themes \
-    --with-iconmap=${STAGING_LIBEXECDIR_NATIVE}/icon-name-mapping \
-"
-
-inherit gnomebase perlnative
-
-PACKAGES =+ " gnome-theme-crux gnome-theme-highcontrast gnome-theme-highcontrastinverse gnome-theme-highcontrastlargeprint gnome-theme-highcontrastlargeprintinverse gnome-theme-largeprint gnome-theme-mist"
-FILES_gnome-theme-crux = "${datadir}/themes/Crux ${datadir}/icons/Crux"
-FILES_gnome-theme-highcontrast = "${datadir}/themes/HighContrast ${datadir}/icons/HighContrast"
-FILES_gnome-theme-highcontrastinverse = "${datadir}/themes/HighContrastInverse ${datadir}/icons/HighContrastInverse"
-FILES_gnome-theme-highcontrastlargeprint = "${datadir}/themes/HighContrastLargePrint ${datadir}/icons/HighContrastLargePrint"
-FILES_gnome-theme-highcontrastlargeprintinverse = "${datadir}/themes/HighContrastLargePrintInverse ${datadir}/icons/HighContrastLargePrintInverse"
-FILES_gnome-theme-largeprint = "${datadir}/themes/LargePrint ${datadir}/icons/LargePrint"
-FILES_gnome-theme-mist = "${datadir}/themes/Mist ${datadir}/icons/Mist"
-
-FILES_${PN} += "${datadir}/themes ${datadir}/icons"
-
-SRC_URI += "file://iconpath-option.patch \
-    file://drop-localedir-override.patch \
-"
-SRC_URI[archive.md5sum] = "41db9e3cb25d35af2675c599e67944d1"
-SRC_URI[archive.sha256sum] = "8601ee24c2e096593221cbd6ebdb6686042225a03c02a01c0d67c163f9febd1a"
-GNOME_COMPRESS_TYPE="bz2"
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.6.3.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.6.3.bb
deleted file mode 100644
index b9b7d0c..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/florence/florence_0.6.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Florence is a virtual keyboard for touch screens"
-HOMEPAGE = "http://florence.sourceforge.net/english.html"
-
-#NOTICE: If florence can't find its gconf settings, you need to start florence with --config for one time and save the configuration once.
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-DEPENDS = "gtk+3 libxml2 libglade librsvg libxtst gconf gconf-native cairo intltool-native gnome-doc-utils libnotify gstreamer1.0"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${PN}/${PN}/${PV}/${PN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "8775051d7352f75dec5a86dc9964e8e0"
-SRC_URI[sha256sum] = "422992fd07d285be73cce721a203e22cee21320d69b0fda1579ce62944c5091e"
-
-inherit gettext autotools gconf pkgconfig
-
-EXTRA_OECONF = "--disable-scrollkeeper --without-docs --without-at-spi --without-panelapplet --without-xrecord"
-
-FILES_${PN} += "${datadir}/glib-2.0/schemas"
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
index d6744a3..0a0a3e6 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
@@ -18,7 +18,9 @@
 
 RDEPENDS_${PN} = "gtk+"
 
-inherit autotools gtk-doc gobject-introspection
+inherit distro_features_check autotools gtk-doc gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 do_configure_prepend() {
 	touch ${S}/ChangeLog
 }
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
index 10765ee..4e49bec 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
@@ -10,7 +10,9 @@
 SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
 SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"
 
-inherit setuptools3 pkgconfig gtk-icon-cache gsettings
+inherit distro_features_check setuptools3 pkgconfig gtk-icon-cache gsettings
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 FILES_${PN} += " \
     ${datadir}/dbus-1 \
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/90tracker b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/90tracker
deleted file mode 100644
index 9594b91..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/90tracker
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-/usr/bin/trackerd -m &
-
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-dbus.service b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-dbus.service
deleted file mode 100644
index c97f49a..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-dbus.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=tracker DBus session bus handler
-Before=tracker-store.service
-After=dbus.service
-Requires=dbus.service
-BindTo=tracker-store.service
-
-[Service]
-Type=forking
-EnvironmentFile=-/tmp/tracker.env
-ExecStartPre=@BASE_BINDIR@/rm -rf /tmp/tracker.env
-ExecStart=/bin/sh -c 'echo "DBUS_SESSION_BUS_ADDRESS=`dbus-daemon --fork --session --print-address`" > /tmp/tracker.env'
-
-[Install]
-WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-miner-fs.service b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-miner-fs.service
deleted file mode 100644
index 34d9a1e..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-miner-fs.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=tracker-miner-fs
-After=syslog.target local-fs.target udev.service dbus.service tracker-store.service
-Requires=tracker-store.service
-
-[Service]
-Environment=HOME=/home/root
-EnvironmentFile=-/tmp/tracker.env
-ExecStart=@LIBEXECDIR@/tracker-miner-fs
-
-[Install]
-WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-store.service b/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-store.service
deleted file mode 100644
index c5037f3..0000000
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/tracker/files/tracker-store.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=tracker-store
-After=syslog.target local-fs.target dbus.service
-Requires=dbus.service tracker-dbus.service
-BindTo=tracker-dbus.service
-
-[Service]
-EnvironmentFile=-/tmp/tracker.env
-ExecStart=@LIBEXECDIR@/tracker-store
-
-[Install]
-WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode_1.111.bb b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode_1.111.bb
index c2d7328..3aea2e6 100644
--- a/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode_1.111.bb
+++ b/import-layers/meta-openembedded/meta-gnome/recipes-support/usermode/usermode_1.111.bb
@@ -23,7 +23,8 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
-inherit autotools gettext pkgconfig
+inherit distro_features_check autotools gettext pkgconfig
 
 EXTRA_OEMAKE += "INSTALL='install -p'"
 
+REQUIRED_DISTRO_FEATURES = "x11 pam"
diff --git a/import-layers/meta-openembedded/meta-gnome/site/riscv64-linux b/import-layers/meta-openembedded/meta-gnome/site/riscv64-linux
new file mode 100644
index 0000000..e3a41ea
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-gnome/site/riscv64-linux
@@ -0,0 +1,16 @@
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ORBit2
+ac_cv_alignof_CORBA_boolean=1
+ac_cv_alignof_CORBA_char=1
+ac_cv_alignof_CORBA_double=8
+ac_cv_alignof_CORBA_float=4
+ac_cv_alignof_CORBA_long=4
+ac_cv_alignof_CORBA_long_double=8
+ac_cv_alignof_CORBA_long_long=8
+ac_cv_alignof_CORBA_octet=1
+ac_cv_alignof_CORBA_pointer=4
+ac_cv_alignof_CORBA_short=2
+ac_cv_alignof_CORBA_struct=1
+ac_cv_alignof_CORBA_wchar=2
diff --git a/import-layers/meta-openembedded/meta-initramfs/README b/import-layers/meta-openembedded/meta-initramfs/README
index b7dbfef..7185383 100644
--- a/import-layers/meta-openembedded/meta-initramfs/README
+++ b/import-layers/meta-openembedded/meta-initramfs/README
@@ -12,7 +12,7 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: rocko
+branch: master
 revision: HEAD
 
 
@@ -20,13 +20,12 @@
 -----------
 
 Send patches / pull requests to openembedded-devel@lists.openembedded.org
-with '[meta-initramfs][rocko]' in the subject.
+with '[meta-initramfs]' in the subject.
 
 When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-initramfs][rocko][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-initramfs][PATCH'
 
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
+Interm layer maintainer: Armin Kuster <akuster808@gmail.com>
 
 
 License
diff --git a/import-layers/meta-openembedded/meta-initramfs/conf/layer.conf b/import-layers/meta-openembedded/meta-initramfs/conf/layer.conf
index d9b7c4c..97afc93 100644
--- a/import-layers/meta-openembedded/meta-initramfs/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-initramfs/conf/layer.conf
@@ -16,6 +16,8 @@
 BBFILE_PRIORITY_meta-initramfs = "8"
 LAYERDEPENDS_meta-initramfs = "core"
 
+LAYERSERIES_COMPAT_meta-initramfs = "sumo"
+
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
   dracut->virtual/kernel \
 "
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb
index 6b845bd..3a8d9f7 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb
@@ -8,5 +8,5 @@
 
 python () {
     if d.getVar('TARGET_ARCH') == "nios2":
-        raise bb.parse.SkipPackage("'nios2' not supported arch")
+        raise bb.parse.SkipRecipe("'nios2' not supported arch")
 }
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index e18409d..ccf9f6a 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -6,10 +6,10 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 PE = "1"
-PV = "045+git${SRCREV}"
+PV = "046+git${SRCREV}"
 
-# v045 tag
-SRCREV = "39c9b67f86145953aa30def9d77c68597a4ccfe8"
+# v046 tag
+SRCREV = "a0799ffb554487a370c2a1adafaedd2021b6dc8c"
 SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
            file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
            "
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
index 5a99824..dc3a70b 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
@@ -4,6 +4,7 @@
 zipl (s390) boot loaders. It is primarily designed to be used from scripts which install \
 new kernels and need to find information about the current boot environment. \
 "
+HOMEPAGE = "https://github.com/rhboot/grubby"
 LICENSE = "GPLv2+"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
@@ -11,18 +12,15 @@
 DEPENDS = "popt util-linux"
 DEPENDS_append_libc-musl = " libexecinfo"
 
-SRC_URI = "https://github.com/rhinstaller/${BPN}/archive/${PV}-1.tar.gz;downloadfilename=${BPN}-${PV}-1.tar.gz \
+S = "${WORKDIR}/git"
+SRCREV = "79c5cfa02c567efdc5bb18cdd584789e2e35aa23"
+SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https; \
            file://grubby-rename-grub2-editenv-to-grub-editenv.patch \
            file://run-ptest \
            file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \
            file://0002-include-paths.h-for-_PATH_MOUNTED.patch \
            "
 
-SRC_URI[md5sum] = "1005907b275d6d93368d045274537d86"
-SRC_URI[sha256sum] = "85f1c678484f74c8978e8643451594967defce463a86c35cb1ee56d12767a9df"
-
-S = "${WORKDIR}/${BPN}-${PV}-1"
-
 RDEPENDS_${PN} += "dracut"
 
 inherit autotools-brokensep ptest
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch
index 8d1ec69..e7a0cce 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch
@@ -1,4 +1,4 @@
-From f414dea1316a48aba3e8e293201ebd51652d3ef4 Mon Sep 17 00:00:00 2001
+From 57e3a60b23891905733bfea7a1cb78c2377cc524 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 9 Jul 2017 15:17:29 -0700
 Subject: [PATCH] Define in_* structs for non-glibc system libs
@@ -10,14 +10,38 @@
 to infer that these structs should be defined in linux/in.h
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- usr/include/netinet/in.h | 33 +++++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
 
-Index: git/usr/include/netinet/in.h
-===================================================================
---- git.orig/usr/include/netinet/in.h
-+++ git/usr/include/netinet/in.h
+---
+ usr/include/net/if.h     | 11 +++++++++++
+ usr/include/netinet/in.h | 36 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 47 insertions(+)
+
+diff --git a/usr/include/net/if.h b/usr/include/net/if.h
+index 116a176..6246b12 100644
+--- a/usr/include/net/if.h
++++ b/usr/include/net/if.h
+@@ -1,6 +1,17 @@
+ #ifndef _NET_IF_H
+ #define _NET_IF_H
+ 
++#ifndef __GLIBC__
++#include <linux/libc-compat.h>
++#undef __UAPI_DEF_IF_IFREQ
++#define __UAPI_DEF_IF_IFREQ            1
++#undef __UAPI_DEF_IF_IFNAMSIZ
++#define __UAPI_DEF_IF_IFNAMSIZ         1
++#undef __UAPI_DEF_IF_IFMAP
++#define __UAPI_DEF_IF_IFMAP            1
++#undef __UAPI_DEF_IF_NET_DEVICE_FLAGS
++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <linux/if.h>
+diff --git a/usr/include/netinet/in.h b/usr/include/netinet/in.h
+index 2952bb2..0c95bc9 100644
+--- a/usr/include/netinet/in.h
++++ b/usr/include/netinet/in.h
 @@ -5,6 +5,42 @@
  #ifndef _NETINET_IN_H
  #define _NETINET_IN_H
@@ -61,25 +85,3 @@
  #include <klibc/extern.h>
  #include <stdint.h>
  #include <endian.h>		/* Must be included *before* <linux/in.h> */
-Index: git/usr/include/net/if.h
-===================================================================
---- git.orig/usr/include/net/if.h
-+++ git/usr/include/net/if.h
-@@ -1,6 +1,17 @@
- #ifndef _NET_IF_H
- #define _NET_IF_H
- 
-+#ifndef __GLIBC__
-+#include <linux/libc-compat.h>
-+#undef __UAPI_DEF_IF_IFREQ
-+#define __UAPI_DEF_IF_IFREQ            1
-+#undef __UAPI_DEF_IF_IFNAMSIZ
-+#define __UAPI_DEF_IF_IFNAMSIZ         1
-+#undef __UAPI_DEF_IF_IFMAP
-+#define __UAPI_DEF_IF_IFMAP            1
-+#undef __UAPI_DEF_IF_NET_DEVICE_FLAGS
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
-+#endif
- #include <sys/socket.h>
- #include <sys/types.h>
- #include <linux/if.h>
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
index 7cd4c0e..181dcfb 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
@@ -1,4 +1,4 @@
-From 10fb440795a7796140bd657ee028847ec7c34447 Mon Sep 17 00:00:00 2001
+From 4b4147b76518d31a88fb2c58cdbf2236e159a25c Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 8 Sep 2017 23:10:54 -0700
 Subject: [PATCH] Kbuild.klibc: Add path to compiler headers via -isystem
@@ -7,12 +7,13 @@
 stdarg.h which is called from wrapper stdarg.h using include_next
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
- scripts/Kbuild.klibc | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ scripts/Kbuild.klibc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
-index f500d535..1d5cdc43 100644
+index 101f86f..1d5cdc4 100644
 --- a/scripts/Kbuild.klibc
 +++ b/scripts/Kbuild.klibc
 @@ -105,7 +105,8 @@ KLIBCOBJCOPY     := $(OBJCOPY)
@@ -25,6 +26,3 @@
  		    -I$(KLIBCINC)/arch/$(KLIBCARCHDIR)	\
                      -I$(KLIBCINC)/bits$(KLIBCBITSIZE)	\
  		    -I$(KLIBCOBJ)/../include		\
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
index 41cc142..1ba05a8 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
@@ -1,19 +1,20 @@
-From f66edde8a704131d98e8783ea8d4c848e8119b20 Mon Sep 17 00:00:00 2001
+From b6185401fc3daa7fa8ba2b84db3e4da3b94a9867 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 26 Jul 2017 16:13:16 -0700
-Subject: [PATCH 1/3] Kbuild.klibc: Use -print-libgcc-file-name instead of
+Subject: [PATCH] Kbuild.klibc: Use -print-libgcc-file-name instead of
  --print-libgcc
 
 -print-libgcc-file-name works with clang and gcc unlike --print-libgcc
 which is gcc specific
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  scripts/Kbuild.klibc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
-index f500d535..101f86f5 100644
+index f500d53..101f86f 100644
 --- a/scripts/Kbuild.klibc
 +++ b/scripts/Kbuild.klibc
 @@ -128,7 +128,7 @@ KLIBCCFLAGS      += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS)  \
@@ -25,6 +26,3 @@
  KLIBCLIBGCC	 ?= $(KLIBCLIBGCC_DEF)
  KLIBCCRT0        := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
  KLIBCLIBC        := $(KLIBCOBJ)/libc.a
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-always-use-bfd-linker.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-always-use-bfd-linker.patch
index 41a6b9e..de04d69 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-always-use-bfd-linker.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-always-use-bfd-linker.patch
@@ -1,4 +1,4 @@
-From 9ea19bd9636806a73bcf29cfcee40a268f91eb4c Mon Sep 17 00:00:00 2001
+From 63ab5102d6ef362a597941e62470bf19e6f1652b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 11 Jul 2017 08:09:52 -0700
 Subject: [PATCH] always use bfd linker
@@ -8,12 +8,13 @@
 linking issues on such distros
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index dc10fc5d..40647be4 100644
+index dc10fc5..40647be 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -20,7 +20,7 @@ include $(srctree)/scripts/Kbuild.include
@@ -25,6 +26,3 @@
  export AR	:= $(KLIBCROSS)ar
  export RANLIB	:= $(KLIBCROSS)ranlib
  export STRIP	:= $(KLIBCROSS)strip
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
index 9c0ea63..fcf4f89 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
@@ -1,4 +1,4 @@
-From a46a144ac883898d9cedf7a0b13aec6d10116125 Mon Sep 17 00:00:00 2001
+From ebd2b0e414c98467156b961abb470b5d07f37ea8 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Sep 2017 23:11:53 -0700
 Subject: [PATCH] arm: Do not set a fallback march and mtune
@@ -9,14 +9,13 @@
 which is a bit harder in OE
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
 
+---
  usr/klibc/arch/arm/MCONFIG | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
-index 53bc1dc3..857e2f2d 100644
+index 303c6ac..48d2685 100644
 --- a/usr/klibc/arch/arm/MCONFIG
 +++ b/usr/klibc/arch/arm/MCONFIG
 @@ -10,7 +10,7 @@
@@ -28,6 +27,3 @@
  KLIBCBITSIZE  = 32
  KLIBCREQFLAGS += -fno-exceptions
  KLIBCSTRIPFLAGS += -R .ARM.exidx
--- 
-2.14.2
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch
index ae8c1f1..46a2398 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-dash-Specify-format-string-in-fmtstr.patch
@@ -1,4 +1,4 @@
-From 2fff607fd0b5550e5072a6fffcbb01c29d5207d2 Mon Sep 17 00:00:00 2001
+From 8beffe501c1ac5b35d62004735c4157c74183901 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 9 Jul 2017 13:51:25 -0700
 Subject: [PATCH] dash: Specify format string in fmtstr()
@@ -9,12 +9,13 @@
    col = fmtstr(s, 32, strsignal(st));
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  usr/dash/jobs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
-index 009bbfee..299bcacc 100644
+index 009bbfe..299bcac 100644
 --- a/usr/dash/jobs.c
 +++ b/usr/dash/jobs.c
 @@ -426,7 +426,7 @@ sprint_status(char *s, int status, int sigonly)
@@ -26,6 +27,3 @@
  #ifdef WCOREDUMP
  		if (WCOREDUMP(status)) {
  			col += fmtstr(s + col, 16, " (core dumped)");
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-include-linux-sysinfo.h-directly.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-include-linux-sysinfo.h-directly.patch
index 1b033ac..04c97fc 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-include-linux-sysinfo.h-directly.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-include-linux-sysinfo.h-directly.patch
@@ -1,4 +1,4 @@
-From ab060a57b41f989665ade20e813bbcb67f91f1f2 Mon Sep 17 00:00:00 2001
+From d966d52d1e569cbc2293d841285e2b8941f28c61 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 9 Jul 2017 15:56:28 -0700
 Subject: [PATCH] include linux/sysinfo.h directly
@@ -10,12 +10,13 @@
 override to avoid this assumption
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  usr/include/sys/sysinfo.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/usr/include/sys/sysinfo.h b/usr/include/sys/sysinfo.h
-index dba68dc6..d145c0b1 100644
+index dba68dc..d145c0b 100644
 --- a/usr/include/sys/sysinfo.h
 +++ b/usr/include/sys/sysinfo.h
 @@ -5,7 +5,7 @@
@@ -27,6 +28,3 @@
  
  extern int sysinfo(struct sysinfo *info);
  
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-mkfifo-Implement-mkfifo.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-mkfifo-Implement-mkfifo.patch
index 9791412..3bc081d 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-mkfifo-Implement-mkfifo.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-mkfifo-Implement-mkfifo.patch
@@ -1,15 +1,16 @@
-From b4e120f5edf06e6df138b1804a8b5180584cea6b Mon Sep 17 00:00:00 2001
+From cf97079009ba48d10e52052b2eab7461ea4dd09b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 10 Jul 2017 20:42:50 -0700
 Subject: [PATCH] mkfifo: Implement mkfifo
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  usr/utils/mkfifo.c | 5 +++++
  1 file changed, 5 insertions(+)
 
 diff --git a/usr/utils/mkfifo.c b/usr/utils/mkfifo.c
-index 5a758b2a..f1f577e6 100644
+index 5a758b2..f1f577e 100644
 --- a/usr/utils/mkfifo.c
 +++ b/usr/utils/mkfifo.c
 @@ -26,6 +26,11 @@ static int make_fifo(char *dir)
@@ -24,6 +25,3 @@
  int main(int argc, char *argv[])
  {
  	int c, ret = 0;
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch
index 6bb384b..e842353 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch
@@ -1,11 +1,22 @@
+From d2fb484d995221277cce7abddcd7dfa0e8bceec3 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Fri, 11 Jan 2013 17:26:40 +0000
+Subject: [PATCH] klibc_2.0.2: apply FIX_V4BX patch for armv4 targets only
+
 Status: not applicable upstream, in OE/Yocto we use $(FIX_V4BX)
 which is "" in case of armv5 or thumbs.
 
 Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
 
---- a/usr/klibc/arch/arm/MCONFIG	2013-01-09 01:12:02.000000000 +0100
-+++ b/usr/klibc/arch/arm/MCONFIG	2013-01-08 23:45:59.000000000 +0100
-@@ -29,6 +29,7 @@
+---
+ usr/klibc/arch/arm/MCONFIG | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
+index 53bc1dc..303c6ac 100644
+--- a/usr/klibc/arch/arm/MCONFIG
++++ b/usr/klibc/arch/arm/MCONFIG
+@@ -29,6 +29,7 @@ else
  KLIBCSHAREDFLAGS = -Ttext 0x01800200
  ifeq ($(CONFIG_AEABI),y)
  KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
index 9bc4835..5f47d3f 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
@@ -1,3 +1,11 @@
+From 0cb26cf2d25d36c1fdcc4f1635e4329436ed866a Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Fri, 19 Sep 2014 23:09:29 +0200
+
+---
+ klcc/klcc.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
 diff --git a/klcc/klcc.in b/klcc/klcc.in
 index 43d0984..61e9385 100644
 --- a/klcc/klcc.in
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch
index 316c80a..f28cd54 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch
@@ -1,12 +1,22 @@
+From 1118cc971917abe19ddb029aa80417f6fd6bb343 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Sat, 6 Aug 2011 05:30:14 +0000
+Subject: [PATCH] klibc: initial commit of version 1.5.24
+
 Patch was imported from the OpenEmbedded git server
 (git://git.openembedded.org/openembedded)
 as of commit id b6764cf32ec93547531130dca364fb95e1c495f4
 Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
 
-diff -Nur klibc-1.5/defconfig klibc-1.5p/defconfig
---- klibc-1.5/defconfig	2007-03-04 02:52:10.000000000 +0100
-+++ klibc-1.5p/defconfig	2008-02-08 19:24:22.337127756 +0100
-@@ -5,4 +5,4 @@
+---
+ defconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/defconfig b/defconfig
+index 04b98e9..0cb23d0 100644
+--- a/defconfig
++++ b/defconfig
+@@ -6,4 +6,4 @@ CONFIG_KLIBC_ZLIB=y
  CONFIG_REGPARM=y
  # ARM options
  # CONFIG_KLIBC_THUMB is not set
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch
index 2043064..a5563b7 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch
@@ -1,15 +1,22 @@
+From 1be2bc41f915922102a3ba671b54c2df6f0052e6 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sun, 14 Mar 2010 18:41:56 +0000
+Subject: [PATCH] klibc_1.5.26: now build against linux-libc-headers
+
 commit 43adf69062254fb4f8d4d11fb5fe36a60ae25d5a
-Author: Ben Hutchings <ben@decadent.org.uk>
-Date:   Sun Mar 14 18:41:56 2010 +0000
 
     Taken from debian "Fix klibc Debian specific build trouble"
     Adapted for klibc_2.0.2
 
-Index: klibc-2.0~rc2/scripts/Kbuild.install
-===================================================================
---- klibc-2.0~rc2.orig/scripts/Kbuild.install	2012-02-11 18:50:21.000000000 +0000
-+++ klibc-2.0~rc2/scripts/Kbuild.install	2012-02-11 19:04:52.000000000 +0000
-@@ -95,7 +95,9 @@
+---
+ scripts/Kbuild.install | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
+index 8af5697..d32a8a5 100644
+--- a/scripts/Kbuild.install
++++ b/scripts/Kbuild.install
+@@ -95,7 +95,9 @@ header:
  	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
  	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
  	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
@@ -18,5 +25,5 @@
 +		ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
 +	done
  	$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
- 	$(Q)chmod -R a+rX $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
+ 	$(Q)chmod -R a+rX,go-w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
  	$(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch
index c01c712..5c7a662 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch
@@ -1,3 +1,8 @@
+From 1892079b827cf8f8316305b6d6e0985db82441a2 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Sat, 6 Aug 2011 05:30:14 +0000
+Subject: [PATCH] klibc: initial commit of version 1.5.24
+
 Patch was imported from the OpenEmbedded git server
 (git://git.openembedded.org/openembedded)
 as of commit id eefb99a313bbcc8f34c8b32bf0c5aa2dd2580735
@@ -6,11 +11,25 @@
 Minor edits following upstream changes
 Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
 
-Index: klibc-1.5.24/scripts/Kbuild.install
-===================================================================
---- a/scripts/Kbuild.install	2011-07-27 15:50:53.000000000 +0200
-+++ b/scripts/Kbuild.install	2011-08-01 00:03:03.000000000 +0200
-@@ -88,13 +88,10 @@
+---
+ scripts/Kbuild.install    | 4 ----
+ usr/dash/Kbuild           | 2 --
+ usr/gzip/Kbuild           | 2 --
+ usr/kinit/Kbuild          | 2 --
+ usr/kinit/fstype/Kbuild   | 2 --
+ usr/kinit/ipconfig/Kbuild | 2 --
+ usr/kinit/nfsmount/Kbuild | 2 --
+ usr/kinit/resume/Kbuild   | 2 --
+ usr/kinit/run-init/Kbuild | 2 --
+ usr/klibc/Kbuild          | 2 --
+ usr/utils/Kbuild          | 2 --
+ 11 files changed, 24 deletions(-)
+
+diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
+index d32a8a5..fda699d 100644
+--- a/scripts/Kbuild.install
++++ b/scripts/Kbuild.install
+@@ -88,19 +88,15 @@ else
  header:
  	$(Q)echo "  INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)"
  	$(Q)mkdir -p $(INSTALLROOT)$(bindir)
@@ -24,119 +43,107 @@
  	$(Q)for x in ../../../include/asm ../../../include/asm-generic ../../../include/linux ../../../include/mtd; do \
  		ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
  	done
-@@ -103,7 +100,6 @@
- 	done
  	$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
  	$(Q)chmod -R a+rX,go-w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
 -	$(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
  	$(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)
  
  footer: header
-
-Index: klibc-1.5.24/usr/dash/Kbuild
-===================================================================
---- a/usr/dash/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/dash/Kbuild	2011-08-01 00:07:56.000000000 +0200
-@@ -92,5 +92,3 @@
+diff --git a/usr/dash/Kbuild b/usr/dash/Kbuild
+index 3a98c1f..1a6920a 100644
+--- a/usr/dash/Kbuild
++++ b/usr/dash/Kbuild
+@@ -92,5 +92,3 @@ $(obj)/syntax.c: $(obj)/mksyntax
  $(obj)/syntax.h: $(obj)/syntax.c
  	$(Q):
  
 -# Targets to install
 -install-y := sh.shared
-
-Index: klibc-1.5.24/usr/gzip/Kbuild
-===================================================================
---- a/usr/gzip/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/gzip/Kbuild	2011-08-01 00:06:39.000000000 +0200
-@@ -21,5 +21,3 @@
+diff --git a/usr/gzip/Kbuild b/usr/gzip/Kbuild
+index 9bbf0a4..c497d02 100644
+--- a/usr/gzip/Kbuild
++++ b/usr/gzip/Kbuild
+@@ -21,5 +21,3 @@ $(obj)/gunzip $(obj)/zcat: $(obj)/gzip
  # Cleaning
  targets := gzip gzip.g gunzip zcat
  
 -# Targets to install
 -install-y := gzip gunzip zcat
-
-Index: klibc-1.5.24/usr/kinit/fstype/Kbuild
-===================================================================
---- a/usr/kinit/fstype/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/kinit/fstype/Kbuild	2011-08-01 00:09:12.000000000 +0200
-@@ -21,5 +21,3 @@
- # Cleaning
- clean-dirs := static shared
- 
--# install binary
--install-y := $(shared-y)
-
-Index: klibc-1.5.24/usr/kinit/ipconfig/Kbuild
-===================================================================
---- a/usr/kinit/ipconfig/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/kinit/ipconfig/Kbuild	2011-08-01 00:10:52.000000000 +0200
-@@ -27,5 +27,3 @@
- # Cleaning
- clean-dirs := static shared
- 
--# install binary
--install-y := $(shared-y)
-
-Index: klibc-1.5.24/usr/kinit/Kbuild
-===================================================================
---- a/usr/kinit/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/kinit/Kbuild	2011-08-01 00:20:18.000000000 +0200
-@@ -33,5 +33,3 @@
+diff --git a/usr/kinit/Kbuild b/usr/kinit/Kbuild
+index 5320127..f7fdccd 100644
+--- a/usr/kinit/Kbuild
++++ b/usr/kinit/Kbuild
+@@ -33,5 +33,3 @@ targets += kinit kinit.g kinit.shared kinit.shared.g
  subdir- := fstype ipconfig nfsmount resume run-init
  
  
 -# install binary
 -install-y := kinit kinit.shared
-
-Index: klibc-1.5.24/usr/kinit/nfsmount/Kbuild
-===================================================================
---- a/usr/kinit/nfsmount/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/kinit/nfsmount/Kbuild	2011-08-01 00:12:52.000000000 +0200
-@@ -23,5 +23,3 @@
+diff --git a/usr/kinit/fstype/Kbuild b/usr/kinit/fstype/Kbuild
+index 9b20db1..367611d 100644
+--- a/usr/kinit/fstype/Kbuild
++++ b/usr/kinit/fstype/Kbuild
+@@ -21,5 +21,3 @@ shared/fstype-y := $(objs)
+ # Cleaning
+ clean-dirs := static shared
+ 
+-# install binary
+-install-y := $(shared-y)
+diff --git a/usr/kinit/ipconfig/Kbuild b/usr/kinit/ipconfig/Kbuild
+index 7f8d181..eb1d472 100644
+--- a/usr/kinit/ipconfig/Kbuild
++++ b/usr/kinit/ipconfig/Kbuild
+@@ -27,5 +27,3 @@ shared/ipconfig-y := $(objs)
+ # Cleaning
+ clean-dirs := static shared
+ 
+-# install binary
+-install-y := $(shared-y)
+diff --git a/usr/kinit/nfsmount/Kbuild b/usr/kinit/nfsmount/Kbuild
+index 461e6f3..ba31708 100644
+--- a/usr/kinit/nfsmount/Kbuild
++++ b/usr/kinit/nfsmount/Kbuild
+@@ -23,5 +23,3 @@ dummypmap-y := dummypmap_test.o
  
  clean-dirs := static shared
  
 -# Install binary
 -install-y := $(shared-y)
-
-Index: klibc-1.5.24/usr/kinit/resume/Kbuild
-===================================================================
---- a/usr/kinit/resume/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/kinit/resume/Kbuild	2011-08-01 00:13:51.000000000 +0200
-@@ -26,5 +26,3 @@
+diff --git a/usr/kinit/resume/Kbuild b/usr/kinit/resume/Kbuild
+index 034195d..c1342e1 100644
+--- a/usr/kinit/resume/Kbuild
++++ b/usr/kinit/resume/Kbuild
+@@ -26,5 +26,3 @@ shared/resume-lib := ../lib.a
  # Cleaning
  clean-dirs := static shared
  
 -# install binary
 -install-y := $(shared-y)
-
-Index: klibc-1.5.24/usr/kinit/run-init/Kbuild
-===================================================================
---- a/usr/kinit/run-init/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/kinit/run-init/Kbuild	2011-08-01 00:14:41.000000000 +0200
-@@ -25,5 +25,3 @@
+diff --git a/usr/kinit/run-init/Kbuild b/usr/kinit/run-init/Kbuild
+index f7832b7..c153b0a 100644
+--- a/usr/kinit/run-init/Kbuild
++++ b/usr/kinit/run-init/Kbuild
+@@ -30,5 +30,3 @@ shared/run-init-lib := ../lib.a
  # Cleaning
  clean-dirs := static shared
  
 -# install binary
 -install-y := $(shared-y)
-
-Index: klibc-1.5.24/usr/klibc/Kbuild
-===================================================================
---- a/usr/klibc/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/klibc/Kbuild	2011-08-01 00:18:11.000000000 +0200
-@@ -177,5 +177,3 @@
+diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
+index eba6add..98caf2e 100644
+--- a/usr/klibc/Kbuild
++++ b/usr/klibc/Kbuild
+@@ -185,5 +185,3 @@ install-rule:
  	          $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib))
  	$(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \
  	                      $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib
 -	$(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \
 -	                      $(INSTALLROOT)$(SHLIBDIR)
-
-Index: klibc-1.5.24/usr/utils/Kbuild
-===================================================================
---- a/usr/utils/Kbuild	2011-07-27 15:50:53.000000000 +0200
-+++ b/usr/utils/Kbuild	2011-08-01 00:19:13.000000000 +0200
-@@ -72,5 +72,3 @@
+diff --git a/usr/utils/Kbuild b/usr/utils/Kbuild
+index 05aa794..67d9486 100644
+--- a/usr/utils/Kbuild
++++ b/usr/utils/Kbuild
+@@ -72,5 +72,3 @@ $(obj)/shared/reboot $(obj)/shared/poweroff: $(obj)/shared/halt
  # Clean deletes the static and shared dir
  clean-dirs := static shared
  
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc
index 9014f52..7df33d6 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc
@@ -48,7 +48,7 @@
     ln -s gzip ${D}${base_bindir}/zcat
 }
 
-EXTRA_KLIBC_DEPS = "${@base_conditional('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}"
+EXTRA_KLIBC_DEPS = "${@oe.utils.conditional('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}"
 
 PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*"
 
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0001-Makefile-build-ubi-utils-only.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0001-Makefile-build-ubi-utils-only.patch
new file mode 100644
index 0000000..6ac2cca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0001-Makefile-build-ubi-utils-only.patch
@@ -0,0 +1,87 @@
+From 1c989e4c36d0bf76ab444f984bc73b98eeacd03f Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sun, 29 Jun 2014 00:32:29 +0200
+Subject: [PATCH 1/9] Makefile: build ubi-utils only
+
+We build all the static ubi-utils but actually only ubiattach is needed in
+a minimalistic initramfs for the mount of ubi volumes.
+
+More fixes are needed in order to build the full mtd-utils.
+The first issue is:
+
+| mkfs.jffs2.c:64:20: fatal error: libgen.h: No such file or directory
+|  #include <libgen.h>
+
+Removing the include then the second error is:
+
+| mkfs.jffs2.c:1570:22: error: '_SC_PAGESIZE' undeclared
+| (first use in this function)
+|   page_size = sysconf(_SC_PAGESIZE);
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ Makefile | 26 ++------------------------
+ 1 file changed, 2 insertions(+), 24 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3ce8587..8b79f71 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,28 +16,11 @@ endif
+ 
+ TESTS = tests
+ 
+-MTD_BINS = \
+-	ftl_format flash_erase nanddump doc_loadbios \
+-	ftl_check mkfs.jffs2 flash_lock flash_unlock \
+-	flash_otp_info flash_otp_dump flash_otp_lock flash_otp_write \
+-	mtd_debug flashcp nandwrite nandtest mtdpart \
+-	jffs2dump \
+-	nftldump nftl_format docfdisk \
+-	rfddump rfdformat \
+-	serve_image recv_image \
+-	sumtool jffs2reader
+ UBI_BINS = \
+ 	ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
+ 	ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol ubiblock
+ 
+-BINS = $(MTD_BINS)
+-BINS += mkfs.ubifs/mkfs.ubifs
+-BINS += $(addprefix ubi-utils/,$(UBI_BINS))
+-SCRIPTS = flash_eraseall
+-
+-TARGETS = $(BINS)
+-TARGETS += lib/libmtd.a
+-TARGETS += ubi-utils/libubi.a
++BINS = $(addprefix ubi-utils/,$(UBI_BINS))
+ 
+ OBJDEPS = $(BUILDDIR)/include/version.h
+ 
+@@ -61,12 +44,9 @@ endif
+ 	rm -f $(BUILDDIR)/include/version.h
+ 	$(MAKE) -C $(TESTS) clean
+ 
+-install:: $(addprefix $(BUILDDIR)/,${BINS}) ${SCRIPTS}
++install:: $(addprefix $(BUILDDIR)/,${BINS})
+ 	mkdir -p ${DESTDIR}/${SBINDIR}
+ 	install -m 0755 $^ ${DESTDIR}/${SBINDIR}/
+-	mkdir -p ${DESTDIR}/${MANDIR}/man1
+-	install -m 0644 mkfs.jffs2.1 ${DESTDIR}/${MANDIR}/man1/
+-	-gzip -9f ${DESTDIR}/${MANDIR}/man1/*.1
+ 
+ tests::
+ 	$(MAKE) -C $(TESTS)
+@@ -91,8 +71,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
+ LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
+ LDLIBS_jffs2reader  = -lz $(LZOLDLIBS)
+ 
+-$(foreach v,$(MTD_BINS),$(eval $(call mkdep,,$(v))))
+-
+ #
+ # Common libmtd
+ #
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0002-common.mk-for-klibc-CC-is-klcc.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0002-common.mk-for-klibc-CC-is-klcc.patch
new file mode 100644
index 0000000..c23d11f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0002-common.mk-for-klibc-CC-is-klcc.patch
@@ -0,0 +1,27 @@
+From 89c76bbe82a2029a25b0654eb0a1d0b22d6e6877 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sun, 29 Jun 2014 00:37:28 +0200
+Subject: [PATCH 2/9] common.mk: for klibc $(CC) is klcc
+
+Do not hardcode: assign the value to the variable if it is not already defined.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ common.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common.mk b/common.mk
+index ba87377..126d11a 100644
+--- a/common.mk
++++ b/common.mk
+@@ -1,4 +1,4 @@
+-CC := $(CROSS)gcc
++CC ?= $(CROSS)gcc
+ AR := $(CROSS)ar
+ RANLIB := $(CROSS)ranlib
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0003-libubi.c-add-klibc-specific-fixes-for-ioctl.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0003-libubi.c-add-klibc-specific-fixes-for-ioctl.patch
new file mode 100644
index 0000000..9ad4a5b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0003-libubi.c-add-klibc-specific-fixes-for-ioctl.patch
@@ -0,0 +1,76 @@
+From fecbb7056d621a30f7106e67f5fe209763571b70 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sun, 29 Jun 2014 00:40:15 +0200
+Subject: [PATCH 3/9] libubi.c: add klibc specific fixes for ioctl
+
+First issue is that ioctl() in klibc doesn't expect a constant as arg3.
+Second issue is that arg3 in klibc ioctl() implementation is not optional.
+
+Fixes:
+
+| ubi-utils/libubi.c: In function 'do_attach':
+| ubi-utils/libubi.c:698:8: warning: passing argument 3 of 'ioctl' discards
+| 'const' qualifier from pointer target type
+|   ret = ioctl(fd, UBI_IOCATT, r);
+|         ^
+| In file included from ubi-utils/libubi.c:32:0:
+| .../lib/klibc/include/sys/ioctl.h:15:14: note: expected 'void *' but argument
+| is of type 'const struct ubi_attach_req *'
+|  __extern int ioctl(int, int, void *);
+|               ^
+
+| ubi-utils/libubi.c: In function 'ubi_vol_block_create':
+| ubi-utils/libubi.c:1118:9: error: too few arguments to function 'ioctl'
+|   return ioctl(fd, UBI_IOCVOLCRBLK);
+|          ^
+| In file included from ubi-utils/libubi.c:32:0:
+| .../lib/klibc/include/sys/ioctl.h:15:14: note: declared here
+|  __extern int ioctl(int, int, void *);
+|               ^
+| ubi-utils/libubi.c: In function 'ubi_vol_block_remove':
+| ubi-utils/libubi.c:1123:9: error: too few arguments to function 'ioctl'
+|   return ioctl(fd, UBI_IOCVOLRMBLK);
+|          ^
+| In file included from ubi-utils/libubi.c:32:0:
+| .../usr/lib/klibc/include/sys/ioctl.h:15:14: note: declared here
+|  __extern int ioctl(int, int, void *);
+|               ^
+
+Upstream-Status: Accepted
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ ubi-utils/libubi.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ubi-utils/libubi.c b/ubi-utils/libubi.c
+index 97c0434..2b49833 100644
+--- a/ubi-utils/libubi.c
++++ b/ubi-utils/libubi.c
+@@ -687,7 +687,7 @@ void libubi_close(libubi_t desc)
+  * success and %-1 in case of failure. @r->ubi_num contains newly created UBI
+  * device number.
+  */
+-static int do_attach(const char *node, const struct ubi_attach_req *r)
++static int do_attach(const char *node, struct ubi_attach_req *r)
+ {
+ 	int fd, ret;
+ 
+@@ -1115,12 +1115,12 @@ int ubi_rsvol(libubi_t desc, const char *node, int vol_id, long long bytes)
+ 
+ int ubi_vol_block_create(int fd)
+ {
+-	return ioctl(fd, UBI_IOCVOLCRBLK);
++	return ioctl(fd, UBI_IOCVOLCRBLK, NULL);
+ }
+ 
+ int ubi_vol_block_remove(int fd)
+ {
+-	return ioctl(fd, UBI_IOCVOLRMBLK);
++	return ioctl(fd, UBI_IOCVOLRMBLK, NULL);
+ }
+ 
+ int ubi_update_start(libubi_t desc, int fd, long long bytes)
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0004-Restore-compatibility-to-dietlibc-klibc-musl-libc-af.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0004-Restore-compatibility-to-dietlibc-klibc-musl-libc-af.patch
new file mode 100644
index 0000000..2f31fb4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0004-Restore-compatibility-to-dietlibc-klibc-musl-libc-af.patch
@@ -0,0 +1,88 @@
+From b668cb75cb7e72ff92055209130d4cd4b3cacbdb Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@mirbsd.org>
+Date: Fri, 20 Jun 2014 10:56:27 +0000
+Subject: [PATCH 4/9] Restore compatibility to dietlibc, klibc, musl libc after
+ commit 4f1b108
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Each C library has their own way to define off_t, and the <features.h>
+header is nonstandard and specific to the GNU libc and those that clone
+it (uClibc). Fefe’s dietlibc uses different flags, and klibc always uses
+a 64-bit off_t (like the BSDs); musl libc cannot be recognised using cpp
+instructions, so we assume 64 bit there (and on unknown C libraries) and
+leave it to the user to submit a follow-up fix if we guess wrong. I also
+added a static assertion to verify the 64 bit guess is correct.
+
+It would be really better using a configure script for this instead.
+
+Fixes:
+|   CC      lib/libmtd.o
+| In file included from ubi-utils/ubiutils-common.c:35:0:
+| ./include/common.h:29:22: fatal error: features.h: No such file or directory
+|  #include <features.h>
+|                       ^
+| compilation terminated.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ include/common.h | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/include/common.h b/include/common.h
+index fb0ca83..5a20964 100644
+--- a/include/common.h
++++ b/include/common.h
+@@ -26,7 +26,9 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ #include <features.h>
++#endif
+ #include <inttypes.h>
+ #include "version.h"
+ 
+@@ -67,6 +69,21 @@ extern "C" {
+ #endif
+ 
+ /* define a print format specifier for off_t */
++#if defined(__KLIBC__)
++/* always 64 bit on klibc */
++#define PRIxoff_t PRIx64
++#define PRIdoff_t PRId64
++#elif defined(__dietlibc__)
++/* depends on compiler flags on dietlibc */
++#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
++#define PRIxoff_t PRIx64
++#define PRIdoff_t PRId64
++#else
++#define PRIxoff_t "l"PRIx32
++#define PRIdoff_t "l"PRId32
++#endif
++#elif defined(__GLIBC__) || defined(__UCLIBC__)
++/* depends on compiler flags on glibc and uClibc */
+ #ifdef __USE_FILE_OFFSET64
+ #define PRIxoff_t PRIx64
+ #define PRIdoff_t PRId64
+@@ -74,6 +91,13 @@ extern "C" {
+ #define PRIxoff_t "l"PRIx32
+ #define PRIdoff_t "l"PRId32
+ #endif
++#else
++/* unknown libc or musl */
++#define PRIxoff_t PRIx64
++#define PRIdoff_t PRId64
++/* verify our guess of 64 bit is correct */
++static char __PRIxoff_t_static_assert[sizeof(off_t) == 8 ? 1 : -1];
++#endif
+ 
+ /* Verbose messages */
+ #define bareverbose(verbose, fmt, ...) do {                        \
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0005-common.h-more-workarounds-for-klibc-compatibility.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0005-common.h-more-workarounds-for-klibc-compatibility.patch
new file mode 100644
index 0000000..8309a72
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0005-common.h-more-workarounds-for-klibc-compatibility.patch
@@ -0,0 +1,52 @@
+From 5d4a66b502003ef385dab31a17012246407e7364 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sun, 29 Jun 2014 00:44:03 +0200
+Subject: [PATCH 5/9] common.h: more workarounds for klibc compatibility
+
+Patch is addressing two issues:
+* First,  Klibc doesn't have rpmatch().
+* Second, Klibc lacks getline()
+
+Fixes:
+|   LD      ubi-utils/ubiformat
+| .../git/ubi-utils/ubiformat.o: In function `prompt':
+| .../git/./include/common.h:157: undefined reference to `getline'
+| .../git/./include/common.h:164: undefined reference to `rpmatch'
+| .../git/./include/common.h:157: undefined reference to `getline'
+| .../git/./include/common.h:164: undefined reference to `rpmatch'
+
+Upstream-Status: Submitted
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ include/common.h | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/include/common.h b/include/common.h
+index 5a20964..2f51e1c 100644
+--- a/include/common.h
++++ b/include/common.h
+@@ -161,15 +161,17 @@ static inline int __rpmatch(const char *resp)
+  */
+ static inline bool prompt(const char *msg, bool def)
+ {
+-	char *line = NULL;
+-	size_t len;
++	char *line;
+ 	bool ret = def;
+ 
++	const int sizeof_line = 2;
++	line = malloc(sizeof_line);
++
+ 	do {
+ 		normsg_cont("%s (%c/%c) ", msg, def ? 'Y' : 'y', def ? 'n' : 'N');
+ 		fflush(stdout);
+ 
+-		while (getline(&line, &len, stdin) == -1) {
++		while (fgets(line, sizeof_line, stdin) == NULL) {
+ 			printf("failed to read prompt; assuming '%s'\n",
+ 				def ? "yes" : "no");
+ 			break;
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch
new file mode 100644
index 0000000..d046f95
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch
@@ -0,0 +1,85 @@
+From 2af30e9b2988111e45ed6ea6af55e49ec7cb1cb1 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sun, 29 Jun 2014 00:44:57 +0200
+Subject: [PATCH 6/9] libiniparser: remove unused function needing float
+
+Fixes:
+|   LD      ubi-utils/ubiformat
+| .../git/ubi-utils/libiniparser.a(libiniparser.o): In function
+| `  LD      ubi-utils/ubirename
+| iniparser_getdouble':
+| .../git/ubi-utils/libiniparser.c:336: undefined reference to `atof'
+
+Grep doesn't reveal any occurrence of iniparser_getdouble(), using atof() so
+remove it: floating-point is not supported in klibc
+
+Upstream-Status: Accepted
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ ubi-utils/include/libiniparser.h | 15 ---------------
+ ubi-utils/libiniparser.c         | 22 ----------------------
+ 2 files changed, 37 deletions(-)
+
+diff --git a/ubi-utils/include/libiniparser.h b/ubi-utils/include/libiniparser.h
+index be3c667..abd77aa 100644
+--- a/ubi-utils/include/libiniparser.h
++++ b/ubi-utils/include/libiniparser.h
+@@ -158,21 +158,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound);
+ 
+ /*-------------------------------------------------------------------------*/
+ /**
+-  @brief    Get the string associated to a key, convert to a double
+-  @param    d Dictionary to search
+-  @param    key Key string to look for
+-  @param    notfound Value to return in case of error
+-  @return   double
+-
+-  This function queries a dictionary for a key. A key as read from an
+-  ini file is given as "section:key". If the key cannot be found,
+-  the notfound value is returned.
+- */
+-/*--------------------------------------------------------------------------*/
+-double iniparser_getdouble(dictionary * d, char * key, double notfound);
+-
+-/*-------------------------------------------------------------------------*/
+-/**
+   @brief    Get the string associated to a key, convert to a boolean
+   @param    d Dictionary to search
+   @param    key Key string to look for
+diff --git a/ubi-utils/libiniparser.c b/ubi-utils/libiniparser.c
+index 898f57f..ba70c08 100644
+--- a/ubi-utils/libiniparser.c
++++ b/ubi-utils/libiniparser.c
+@@ -316,28 +316,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound)
+ 
+ /*-------------------------------------------------------------------------*/
+ /**
+-  @brief    Get the string associated to a key, convert to a double
+-  @param    d Dictionary to search
+-  @param    key Key string to look for
+-  @param    notfound Value to return in case of error
+-  @return   double
+-
+-  This function queries a dictionary for a key. A key as read from an
+-  ini file is given as "section:key". If the key cannot be found,
+-  the notfound value is returned.
+- */
+-/*--------------------------------------------------------------------------*/
+-double iniparser_getdouble(dictionary * d, char * key, double notfound)
+-{
+-    char    *   str ;
+-
+-    str = iniparser_getstring(d, key, INI_INVALID_KEY);
+-    if (str==INI_INVALID_KEY) return notfound ;
+-    return atof(str);
+-}
+-
+-/*-------------------------------------------------------------------------*/
+-/**
+   @brief    Get the string associated to a key, convert to a boolean
+   @param    d Dictionary to search
+   @param    key Key string to look for
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0007-mtd-utils-common.c-convert-to-integer-arithmetic.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0007-mtd-utils-common.c-convert-to-integer-arithmetic.patch
new file mode 100644
index 0000000..36b012f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0007-mtd-utils-common.c-convert-to-integer-arithmetic.patch
@@ -0,0 +1,64 @@
+From 41e7c76b0853bf5241b38b8167dfd57c27fef1eb Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sun, 28 Jan 2018 21:47:59 +0100
+Subject: [PATCH 7/9] mtd-utils: common.c: convert to integer arithmetic
+
+We use floating point just to print out KiB, MiB, GiB.
+Avoid that to be klibc friendly.
+
+Fixes compilation for aarch64 against klibc:
+
+error: '-mgeneral-regs-only' is incompatible with floating-point argument
+|    printf("%s%.1f GiB", p, (double)bytes / (1024 * 1024 * 1024));
+etc.
+
+Note:
+* In the KiB case, we could apparently multiply by 100 before dividing
+  without risking overflow. This code simply avoids multiplications.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ ubi-utils/ubiutils-common.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/ubi-utils/ubiutils-common.c b/ubi-utils/ubiutils-common.c
+index 6609a6b..0ded2a4 100644
+--- a/ubi-utils/ubiutils-common.c
++++ b/ubi-utils/ubiutils-common.c
+@@ -107,6 +107,9 @@ long long ubiutils_get_bytes(const char *str)
+ void ubiutils_print_bytes(long long bytes, int bracket)
+ {
+ 	const char *p;
++	int GiB = 1024 * 1024 * 1024;
++	int MiB = 1024 * 1024;
++	int KiB = 1024;
+ 
+ 	if (bracket)
+ 		p = " (";
+@@ -115,12 +118,15 @@ void ubiutils_print_bytes(long long bytes, int bracket)
+ 
+ 	printf("%lld bytes", bytes);
+ 
+-	if (bytes > 1024 * 1024 * 1024)
+-		printf("%s%.1f GiB", p, (double)bytes / (1024 * 1024 * 1024));
+-	else if (bytes > 1024 * 1024)
+-		printf("%s%.1f MiB", p, (double)bytes / (1024 * 1024));
+-	else if (bytes > 1024 && bytes != 0)
+-		printf("%s%.1f KiB", p, (double)bytes / 1024);
++	if (bytes > GiB)
++		printf("%s%lld.%lld GiB", p,
++		       bytes / GiB, bytes % GiB / (GiB / 10));
++	else if (bytes > MiB)
++		printf("%s%lld.%lld MiB", p,
++		       bytes / MiB, bytes % MiB / (MiB / 10));
++	else if (bytes > KiB && bytes != 0)
++		printf("%s%lld.%lld KiB", p,
++		       bytes / KiB, bytes % KiB / (KiB / 10));
+ 	else
+ 		return;
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0008-ubi-utils-ubiformat.c-convert-to-integer-arithmetic.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0008-ubi-utils-ubiformat.c-convert-to-integer-arithmetic.patch
new file mode 100644
index 0000000..5bd0574
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0008-ubi-utils-ubiformat.c-convert-to-integer-arithmetic.patch
@@ -0,0 +1,44 @@
+From e6f1a85c0a3df24fe3ca9a520dc697105e75a80c Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sat, 27 Jan 2018 09:39:26 +0100
+Subject: [PATCH 8/9] ubi-utils: ubiformat.c: convert to integer arithmetic
+
+Do not cast percent to double, it is just used as upper limit.
+Avoid floating point to fix compilation for aarch64 against klibc:
+
+error: '-mgeneral-regs-only' is incompatible with floating-point code
+|    int percent = ((double)si->ok_cnt)/si->good_cnt * 100;
+|        ^~~~~~~
+
+Notes:
+* The checks in the code above this line ensure that si->good_cnt is not 0.
+
+* The code assumes  si->good_cnt * 100  will not overflow, then we can use
+  (si->ok_cnt * 100) safely because the former is bigger.
+
+* The truncated result does not affect the logic:
+  i.e. a value of 49.9 is truncated to 49 and is still <50.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ ubi-utils/ubiformat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c
+index 21409ca..d93164a 100644
+--- a/ubi-utils/ubiformat.c
++++ b/ubi-utils/ubiformat.c
+@@ -843,7 +843,7 @@ int main(int argc, char * const argv[])
+ 	}
+ 
+ 	if (!args.override_ec && si->empty_cnt < si->good_cnt) {
+-		int percent = ((double)si->ok_cnt)/si->good_cnt * 100;
++		int percent = (si->ok_cnt * 100) / si->good_cnt;
+ 
+ 		/*
+ 		 * Make sure the majority of eraseblocks have valid
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0009-Eliminate-warnings-about-implicit-non-const-casting-.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0009-Eliminate-warnings-about-implicit-non-const-casting-.patch
new file mode 100644
index 0000000..658246a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0009-Eliminate-warnings-about-implicit-non-const-casting-.patch
@@ -0,0 +1,48 @@
+From 2229f3b9fd4bad47794c28e558ad273173cea73d Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Sat, 27 Jan 2018 09:52:46 +0100
+Subject: [PATCH 9/9] Eliminate warnings about implicit non-const casting in
+ libmtd
+
+The mtd_get_dev_info1 function reads (among other things) name and type
+string into coresponding struct mtd_dev_info fields.
+
+The struct mtd_dev_info has the string fields marked const, requiring
+them to be cast to non-const version during initialization.
+
+This cast was previously omitted from the dev_read_data calls,
+triggering warnings during compilation.
+
+Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+
+Upstream-Status: Backport
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ lib/libmtd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/libmtd.c b/lib/libmtd.c
+index 60b4782..5f0bcbc 100644
+--- a/lib/libmtd.c
++++ b/lib/libmtd.c
+@@ -746,13 +746,13 @@ int mtd_get_dev_info1(libmtd_t desc, int mtd_num, struct mtd_dev_info *mtd)
+ 	if (dev_get_major(lib, mtd_num, &mtd->major, &mtd->minor))
+ 		return -1;
+ 
+-	ret = dev_read_data(lib->mtd_name, mtd_num, &mtd->name,
++	ret = dev_read_data(lib->mtd_name, mtd_num, (char *)&mtd->name,
+ 			    MTD_NAME_MAX + 1);
+ 	if (ret < 0)
+ 		return -1;
+ 	((char *)mtd->name)[ret - 1] = '\0';
+ 
+-	ret = dev_read_data(lib->mtd_type, mtd_num, &mtd->type_str,
++	ret = dev_read_data(lib->mtd_type, mtd_num, (char *)&mtd->type_str,
+ 			    MTD_TYPE_MAX + 1);
+ 	if (ret < 0)
+ 		return -1;
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
deleted file mode 100644
index 6e1b9ff..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From c4e6bd9378645d577e9d9f85da85f1438afe7c50 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Sun, 29 Jun 2014 00:32:29 +0200
-Subject: [PATCH 1/6] Makefile: build ubi-utils only
-
-We build all the static ubi-utils but actually only ubiattach is needed in
-a minimalistic initramfs for the mount of ubi volumes.
-
-More fixes are needed in order to build the full mtd-utils.
-The first issue is:
-
-| mkfs.jffs2.c:64:20: fatal error: libgen.h: No such file or directory
-|  #include <libgen.h>
-
-Removing the include then the second error is:
-
-| mkfs.jffs2.c:1570:22: error: '_SC_PAGESIZE' undeclared
-| (first use in this function)
-|   page_size = sysconf(_SC_PAGESIZE);
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- Makefile | 24 ++----------------------
- 1 file changed, 2 insertions(+), 22 deletions(-)
-
-Index: git/Makefile
-===================================================================
---- git.orig/Makefile
-+++ git/Makefile
-@@ -16,28 +16,11 @@ endif
- 
- TESTS = tests
- 
--MTD_BINS = \
--	ftl_format flash_erase nanddump doc_loadbios \
--	ftl_check mkfs.jffs2 flash_lock flash_unlock \
--	flash_otp_info flash_otp_dump flash_otp_lock flash_otp_write \
--	mtd_debug flashcp nandwrite nandtest mtdpart \
--	jffs2dump \
--	nftldump nftl_format docfdisk \
--	rfddump rfdformat \
--	serve_image recv_image \
--	sumtool jffs2reader
- UBI_BINS = \
- 	ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
- 	ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol ubiblock
- 
--BINS = $(MTD_BINS)
--BINS += mkfs.ubifs/mkfs.ubifs
--BINS += $(addprefix ubi-utils/,$(UBI_BINS))
--SCRIPTS = flash_eraseall
--
--TARGETS = $(BINS)
--TARGETS += lib/libmtd.a
--TARGETS += ubi-utils/libubi.a
-+BINS = $(addprefix ubi-utils/,$(UBI_BINS))
- 
- OBJDEPS = $(BUILDDIR)/include/version.h
- 
-@@ -61,12 +44,9 @@ endif
- 	rm -f $(BUILDDIR)/include/version.h
- 	$(MAKE) -C $(TESTS) clean
- 
--install:: $(addprefix $(BUILDDIR)/,${BINS}) ${SCRIPTS}
-+install:: $(addprefix $(BUILDDIR)/,${BINS})
- 	mkdir -p ${DESTDIR}/${SBINDIR}
- 	install -m 0755 $^ ${DESTDIR}/${SBINDIR}/
--	mkdir -p ${DESTDIR}/${MANDIR}/man1
--	install -m 0644 mkfs.jffs2.1 ${DESTDIR}/${MANDIR}/man1/
--	-gzip -9f ${DESTDIR}/${MANDIR}/man1/*.1
- 
- tests::
- 	$(MAKE) -C $(TESTS)
-@@ -91,8 +71,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
- LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
- LDLIBS_jffs2reader  = -lz $(LZOLDLIBS)
- 
--$(foreach v,$(MTD_BINS),$(eval $(call mkdep,,$(v))))
--
- #
- # Common libmtd
- #
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0002-common.mk-for-klibc-CC-is-klcc.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0002-common.mk-for-klibc-CC-is-klcc.patch
deleted file mode 100644
index f46824b..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0002-common.mk-for-klibc-CC-is-klcc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f3609c7c0450b4c31e1d4603fcf2cfb1ba46f994 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Sun, 29 Jun 2014 00:37:28 +0200
-Subject: [PATCH 2/6] common.mk: for klibc $(CC) is klcc
-
-Do not hardcode: assign the value to the variable if it is not already defined.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- common.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/common.mk b/common.mk
-index ba87377..59c56df 100644
---- a/common.mk
-+++ b/common.mk
-@@ -1,4 +1,4 @@
--CC := $(CROSS)gcc
-+CC ?= $(CROSS)gcc
- AR := $(CROSS)ar
- RANLIB := $(CROSS)ranlib
- 
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0003-libubi.c-add-klibc-specific-fixes.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0003-libubi.c-add-klibc-specific-fixes.patch
deleted file mode 100644
index 962b368..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0003-libubi.c-add-klibc-specific-fixes.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 72a39bb3290a79e76b0dbf59eef83ea2d9b577a1 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Sun, 29 Jun 2014 00:40:15 +0200
-Subject: [PATCH 3/6] libubi.c: add klibc specific fixes for ioctl
-
-First issue is that ioctl() in klibc doesn't expect a constant as arg3.
-Second issue is that arg3 in klibc ioctl() implementation is not optional.
-
-Fixes:
-
-| ubi-utils/libubi.c: In function 'do_attach':
-| ubi-utils/libubi.c:698:8: warning: passing argument 3 of 'ioctl' discards
-| 'const' qualifier from pointer target type
-|   ret = ioctl(fd, UBI_IOCATT, r);
-|         ^
-| In file included from ubi-utils/libubi.c:32:0:
-| .../lib/klibc/include/sys/ioctl.h:15:14: note: expected 'void *' but argument
-| is of type 'const struct ubi_attach_req *'
-|  __extern int ioctl(int, int, void *);
-|               ^
-
-| ubi-utils/libubi.c: In function 'ubi_vol_block_create':
-| ubi-utils/libubi.c:1118:9: error: too few arguments to function 'ioctl'
-|   return ioctl(fd, UBI_IOCVOLCRBLK);
-|          ^
-| In file included from ubi-utils/libubi.c:32:0:
-| .../lib/klibc/include/sys/ioctl.h:15:14: note: declared here
-|  __extern int ioctl(int, int, void *);
-|               ^
-| ubi-utils/libubi.c: In function 'ubi_vol_block_remove':
-| ubi-utils/libubi.c:1123:9: error: too few arguments to function 'ioctl'
-|   return ioctl(fd, UBI_IOCVOLRMBLK);
-|          ^
-| In file included from ubi-utils/libubi.c:32:0:
-| .../usr/lib/klibc/include/sys/ioctl.h:15:14: note: declared here
-|  __extern int ioctl(int, int, void *);
-|               ^
-
-Upstream-Status: Inappropriate [klibc specific]
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- ubi-utils/libubi.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/ubi-utils/libubi.c b/ubi-utils/libubi.c
-index 1e08b7d..491e525 100644
---- a/ubi-utils/libubi.c
-+++ b/ubi-utils/libubi.c
-@@ -687,7 +687,7 @@ void libubi_close(libubi_t desc)
-  * success and %-1 in case of failure. @r->ubi_num contains newly created UBI
-  * device number.
-  */
--static int do_attach(const char *node, const struct ubi_attach_req *r)
-+static int do_attach(const char *node, struct ubi_attach_req *r)
- {
- 	int fd, ret;
- 
-@@ -1115,12 +1115,12 @@ int ubi_rsvol(libubi_t desc, const char *node, int vol_id, long long bytes)
- 
- int ubi_vol_block_create(int fd)
- {
--	return ioctl(fd, UBI_IOCVOLCRBLK);
-+	return ioctl(fd, UBI_IOCVOLCRBLK, NULL);
- }
- 
- int ubi_vol_block_remove(int fd)
- {
--	return ioctl(fd, UBI_IOCVOLRMBLK);
-+	return ioctl(fd, UBI_IOCVOLRMBLK, NULL);
- }
- 
- int ubi_update_start(libubi_t desc, int fd, long long bytes)
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0004-common.h-klibc-fixes-1.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0004-common.h-klibc-fixes-1.patch
deleted file mode 100644
index fee1cbc..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0004-common.h-klibc-fixes-1.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From e56767b9caa02e7c41803499c77dc939d5a7f64a Mon Sep 17 00:00:00 2001
-From: Thorsten Glaser <tg@mirbsd.org>
-Date: Fri, 20 Jun 2014 10:56:27 +0000
-Subject: [PATCH 4/6] Restore compatibility to dietlibc, klibc, musl libc after commit 4f1b108
-
-Each C library has their own way to define off_t, and the <features.h>
-header is nonstandard and specific to the GNU libc and those that clone
-it (uClibc). Fefe’s dietlibc uses different flags, and klibc always uses
-a 64-bit off_t (like the BSDs); musl libc cannot be recognised using cpp
-instructions, so we assume 64 bit there (and on unknown C libraries) and
-leave it to the user to submit a follow-up fix if we guess wrong. I also
-added a static assertion to verify the 64 bit guess is correct.
-
-It would be really better using a configure script for this instead.
-
-Fixes:
-|   CC      lib/libmtd.o
-| In file included from ubi-utils/ubiutils-common.c:35:0:
-| ./include/common.h:29:22: fatal error: features.h: No such file or directory
-|  #include <features.h>
-|                       ^
-| compilation terminated.
-
-Upstream-Status: Pending
-
-Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- include/common.h | 24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
-
-diff --git a/include/common.h b/include/common.h
-index 6895e5c..77f3f7d 100644
---- a/include/common.h
-+++ b/include/common.h
-@@ -26,7 +26,9 @@
- #include <string.h>
- #include <fcntl.h>
- #include <errno.h>
-+#if defined(__GLIBC__) || defined(__UCLIBC__)
- #include <features.h>
-+#endif
- #include <inttypes.h>
- #include "version.h"
- 
-@@ -52,6 +54,21 @@ extern "C" {
- #endif
- 
- /* define a print format specifier for off_t */
-+#if defined(__KLIBC__)
-+/* always 64 bit on klibc */
-+#define PRIxoff_t PRIx64
-+#define PRIdoff_t PRId64
-+#elif defined(__dietlibc__)
-+/* depends on compiler flags on dietlibc */
-+#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
-+#define PRIxoff_t PRIx64
-+#define PRIdoff_t PRId64
-+#else
-+#define PRIxoff_t "l"PRIx32
-+#define PRIdoff_t "l"PRId32
-+#endif
-+#elif defined(__GLIBC__) || defined(__UCLIBC__)
-+/* depends on compiler flags on glibc and uClibc */
- #ifdef __USE_FILE_OFFSET64
- #define PRIxoff_t PRIx64
- #define PRIdoff_t PRId64
-@@ -59,6 +76,13 @@ extern "C" {
- #define PRIxoff_t "l"PRIx32
- #define PRIdoff_t "l"PRId32
- #endif
-+#else
-+/* unknown libc or musl */
-+#define PRIxoff_t PRIx64
-+#define PRIdoff_t PRId64
-+/* verify our guess of 64 bit is correct */
-+static char __PRIxoff_t_static_assert[sizeof(off_t) == 8 ? 1 : -1];
-+#endif
- 
- /* Verbose messages */
- #define bareverbose(verbose, fmt, ...) do {                        \
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
deleted file mode 100644
index 6b09c14..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 8318852ef4f768bed31072aa7b57e11adc1f639c Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Sun, 29 Jun 2014 00:44:03 +0200
-Subject: [PATCH 5/6] common.h: more workarounds for klibc compatibility
-
-Patch is addressing two issues:
-* First,  Klibc doesn't have rpmatch().
-* Second, Klibc lacks getline()
-
-Fixes:
-|   LD      ubi-utils/ubiformat
-| .../git/ubi-utils/ubiformat.o: In function `prompt':
-| .../git/./include/common.h:157: undefined reference to `getline'
-| .../git/./include/common.h:164: undefined reference to `rpmatch'
-| .../git/./include/common.h:157: undefined reference to `getline'
-| .../git/./include/common.h:164: undefined reference to `rpmatch'
-
-Upstream-Status: Pending
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- include/common.h | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-Index: git/include/common.h
-===================================================================
---- git.orig/include/common.h
-+++ git/include/common.h
-@@ -161,15 +161,17 @@ static inline int __rpmatch(const char *
-  */
- static inline bool prompt(const char *msg, bool def)
- {
--	char *line = NULL;
--	size_t len;
-+	char *line;
- 	bool ret = def;
- 
-+	const int sizeof_line = 2;
-+	line = malloc(sizeof_line);
-+
- 	do {
- 		normsg_cont("%s (%c/%c) ", msg, def ? 'Y' : 'y', def ? 'n' : 'N');
- 		fflush(stdout);
- 
--		while (getline(&line, &len, stdin) == -1) {
-+		while (fgets(line, sizeof_line, stdin) == NULL) {
- 			printf("failed to read prompt; assuming '%s'\n",
- 				def ? "yes" : "no");
- 			break;
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0006-libiniparser-remove-unused-function-needing-float.patch b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0006-libiniparser-remove-unused-function-needing-float.patch
deleted file mode 100644
index 043a89d..0000000
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0006-libiniparser-remove-unused-function-needing-float.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 72a04a9b9ed33c889d2e2b86f306c5be9f6cde35 Mon Sep 17 00:00:00 2001
-From: Andrea Adami <andrea.adami@gmail.com>
-Date: Sun, 29 Jun 2014 00:44:57 +0200
-Subject: [PATCH 6/6] libiniparser: remove unused function needing float
-
-Fixes:
-|   LD      ubi-utils/ubiformat
-| .../git/ubi-utils/libiniparser.a(libiniparser.o): In function
-| `  LD      ubi-utils/ubirename
-| iniparser_getdouble':
-| .../git/ubi-utils/libiniparser.c:336: undefined reference to `atof'
-
-Grep doesn't reveal any occurrence of iniparser_getdouble(), using atof() so
-remove it: floating-point is not supported in klibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- ubi-utils/include/libiniparser.h | 15 ---------------
- ubi-utils/libiniparser.c         | 22 ----------------------
- 2 files changed, 37 deletions(-)
-
-diff --git a/ubi-utils/include/libiniparser.h b/ubi-utils/include/libiniparser.h
-index be3c667..abd77aa 100644
---- a/ubi-utils/include/libiniparser.h
-+++ b/ubi-utils/include/libiniparser.h
-@@ -158,21 +158,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound);
- 
- /*-------------------------------------------------------------------------*/
- /**
--  @brief    Get the string associated to a key, convert to a double
--  @param    d Dictionary to search
--  @param    key Key string to look for
--  @param    notfound Value to return in case of error
--  @return   double
--
--  This function queries a dictionary for a key. A key as read from an
--  ini file is given as "section:key". If the key cannot be found,
--  the notfound value is returned.
-- */
--/*--------------------------------------------------------------------------*/
--double iniparser_getdouble(dictionary * d, char * key, double notfound);
--
--/*-------------------------------------------------------------------------*/
--/**
-   @brief    Get the string associated to a key, convert to a boolean
-   @param    d Dictionary to search
-   @param    key Key string to look for
-diff --git a/ubi-utils/libiniparser.c b/ubi-utils/libiniparser.c
-index 898f57f..ba70c08 100644
---- a/ubi-utils/libiniparser.c
-+++ b/ubi-utils/libiniparser.c
-@@ -316,28 +316,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound)
- 
- /*-------------------------------------------------------------------------*/
- /**
--  @brief    Get the string associated to a key, convert to a double
--  @param    d Dictionary to search
--  @param    key Key string to look for
--  @param    notfound Value to return in case of error
--  @return   double
--
--  This function queries a dictionary for a key. A key as read from an
--  ini file is given as "section:key". If the key cannot be found,
--  the notfound value is returned.
-- */
--/*--------------------------------------------------------------------------*/
--double iniparser_getdouble(dictionary * d, char * key, double notfound)
--{
--    char    *   str ;
--
--    str = iniparser_getstring(d, key, INI_INVALID_KEY);
--    if (str==INI_INVALID_KEY) return notfound ;
--    return atof(str);
--}
--
--/*-------------------------------------------------------------------------*/
--/**
-   @brief    Get the string associated to a key, convert to a boolean
-   @param    d Dictionary to search
-   @param    key Key string to look for
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
index 518c02f..abb0d4b 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
@@ -11,12 +11,15 @@
 
 SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
-             file://0001-Makefile-only-build-ubi-utils.patch \
+             file://0001-Makefile-build-ubi-utils-only.patch \
              file://0002-common.mk-for-klibc-CC-is-klcc.patch \
-             file://0003-libubi.c-add-klibc-specific-fixes.patch \
-             file://0004-common.h-klibc-fixes-1.patch \
-             file://0005-common.h-klibc-fixes-2.patch \
+             file://0003-libubi.c-add-klibc-specific-fixes-for-ioctl.patch \
+             file://0004-Restore-compatibility-to-dietlibc-klibc-musl-libc-af.patch \
+             file://0005-common.h-more-workarounds-for-klibc-compatibility.patch \
              file://0006-libiniparser-remove-unused-function-needing-float.patch \
+             file://0007-mtd-utils-common.c-convert-to-integer-arithmetic.patch \
+             file://0008-ubi-utils-ubiformat.c-convert-to-integer-arithmetic.patch \
+             file://0009-Eliminate-warnings-about-implicit-non-const-casting-.patch \
              "
 
 S = "${WORKDIR}/git/"
diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_2.0.2.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_2.0.2.bb
index 49c53a3..2e27033 100644
--- a/import-layers/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_2.0.2.bb
+++ b/import-layers/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_2.0.2.bb
@@ -1,10 +1,16 @@
 # the binaries are statically linked against klibc
-require recipes-kernel/kexec/kexec-tools.inc
 SUMMARY = "Kexec tools, statically compiled against klibc"
-SRC_URI[md5sum] = "92eff93b097475b7767f8c98df84408a"
-SRC_URI[sha256sum] = "09e180ff36dee087182cdc939ba6c6917b6adbb5fc12d589f31fd3659b6471f2"
+AUTHOR = "Eric Biederman"
+HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
+SECTION = "kernel/userland"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
+                    file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
+DEPENDS = "zlib xz"
 
-inherit klibc
+PR = "r1"
+
+inherit klibc autotools
 
 FILESPATH =. "${FILE_DIRNAME}/kexec-tools-${PV}:"
 
@@ -23,6 +29,9 @@
             file://0001-Adjust-the-order-of-headers-to-fix-build-for-musl.patch \
             "
 
+SRC_URI[md5sum] = "92eff93b097475b7767f8c98df84408a"
+SRC_URI[sha256sum] = "09e180ff36dee087182cdc939ba6c6917b6adbb5fc12d589f31fd3659b6471f2"
+
 SRC_URI_append_arm = " file://arm_crashdump.patch"
 SRC_URI_append_powerpc = " file://ppc__lshrdi3.patch"
 SRC_URI_append_x86 = " file://x86_sys_io.patch file://x86_basename.patch file://x86_vfscanf.patch file://x86_kexec_test.patch"
@@ -35,7 +44,26 @@
 CFLAGS += "-I${STAGING_DIR_HOST}${libdir}/klibc/include -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits32"
 CFLAGS_x86-64 += "-I${STAGING_DIR_HOST}${libdir}/klibc/include -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits64"
 
+do_compile_prepend() {
+    # Remove the prepackaged config.h from the source tree as it overrides
+    # the same file generated by configure and placed in the build tree
+    rm -f ${S}/include/config.h
+
+    # Remove the '*.d' file to make sure the recompile is OK
+    for dep in `find ${B} -type f -name '*.d'`; do
+        dep_no_d="`echo $dep | sed 's#.d$##'`"
+        # Remove file.d when there is a file.o
+        if [ -f "$dep_no_d.o" ]; then
+            rm -f $dep
+        fi
+    done
+}
+
 PACKAGES =+ "kexec-klibc kdump-klibc"
 
 FILES_kexec-klibc = "${sbindir}/kexec"
 FILES_kdump-klibc = "${sbindir}/kdump"
+
+INSANE_SKIP_${PN} = "arch"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
diff --git a/import-layers/meta-openembedded/meta-multimedia/README b/import-layers/meta-openembedded/meta-multimedia/README
index b59dfe0..20f4fb8 100644
--- a/import-layers/meta-openembedded/meta-multimedia/README
+++ b/import-layers/meta-openembedded/meta-multimedia/README
@@ -1,20 +1,19 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: rocko
+branch: master
 revision: HEAD
 
 URI: git://github.com/openembedded/meta-oe.git
 layers: meta-oe
-branch: rocko
+branch: master
 revision: HEAD
 
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-multimedia][rocko]' in the subject'
+Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-multimedia]' in the subject'
 
 When sending single patches, please use something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-multimedia][rocko][PATCH
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-multimedia][PATCH
 
 You are encouraged to fork the mirror on github https://github.com/openembedded/meta-oe/ to share your patches, this is preferred for patch sets consisting of more than one patch. Other services like gitorious, repo.or.cz or self hosted setups are of course accepted as well, 'git fetch <remote>' works the same on all of them. We recommend github because it is free, easy to use, has been proven to be reliable and has a really good web GUI.
 
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
+Layer maintainer: Andreas Müller <schnitzeltony@googlemail.com>
diff --git a/import-layers/meta-openembedded/meta-multimedia/conf/layer.conf b/import-layers/meta-openembedded/meta-multimedia/conf/layer.conf
index d68b13f..cfedf2f 100644
--- a/import-layers/meta-openembedded/meta-multimedia/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-multimedia/conf/layer.conf
@@ -29,3 +29,4 @@
 
 LAYERDEPENDS_multimedia-layer = "core"
 
+LAYERSERIES_COMPAT_multimedia-layer = "sumo"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb
index 9360d65..3ddb818 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.13.bb
@@ -8,4 +8,6 @@
 SRC_URI = "http://download.gnome.org/sources/${BPN}/0.8/${BPN}-${PV}.tar.xz"
 SRC_URI[md5sum] = "212d85ebce89b32468b59e1164050d40"
 SRC_URI[sha256sum] = "aa3decb9d532c0e2e505adc592f431fd81c0231ded2981129e87da13712479ed"
-inherit autotools pkgconfig gettext
+inherit distro_features_check autotools pkgconfig gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6/sepbuildfix.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6/sepbuildfix.patch
deleted file mode 100644
index 0493cea..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6/sepbuildfix.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From e198f0a87660a048164ca0e16d18517d0aee846e Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 9 Jun 2015 12:20:45 -0700
-Subject: [PATCH] Fix builds when using separate source and build directories.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- configure.ac           | 10 +++++-----
- 1 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index a8731b5..54a3c3d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -744,9 +744,9 @@ AC_OUTPUT
- #
- # Files copied for windows compilation.
- #
--echo "configure: copying \"autoconfig.h\"          to \"build/inc/autoconfig.h\""
--test -d build/inc || mkdir -p build/inc
--cp autoconfig.h build/inc/autoconfig.h
--echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
--cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h
-+echo "configure: copying \"autoconfig.h\"          to \"\$srcdir/build/inc/autoconfig.h\""
-+test -d $srcdir/build/inc || mkdir -p $srcdir/build/inc
-+cp autoconfig.h $srcdir/build/inc/autoconfig.h
-+echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"\$srcdir/build/inc/upnpconfig.h\""
-+cp upnp/inc/upnpconfig.h $srcdir/build/inc/upnpconfig.h
- 
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6_1.6.21.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6_1.6.21.bb
deleted file mode 100644
index c1b0429..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/libupnp/libupnp1.6_1.6.21.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Portable SDK for UPnP* Devices"
-DESCRIPTION = "The Portable SDK for UPnP Devices is an SDK for development of \
-UPnP device and control point applications. It consists of the core UPnP \
-protocols along with a UPnP-specific eXtensible Markup Language (XML) parser \
-supporting the Document Object Model (DOM) Level 2 API and an optional, \
-integrated mini web server for serving UPnP related documents."
-HOMEPAGE = "http://pupnp.sourceforge.net/"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b3190d5244e08e78e4c8ee78544f4863"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pupnp/libupnp-${PV}.tar.bz2 \
-           file://sepbuildfix.patch \
-"
-
-SRC_URI[md5sum] = "513adadb07fa039a8aeb0ceb7b7b0f6e"
-SRC_URI[sha256sum] = "af3f3c0846a1d75baeadae4aa5a2bda427567e2a1fb4559bf73ccff0a4f9a39b"
-
-S = "${WORKDIR}/libupnp-${PV}"
-
-inherit autotools
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.34.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.34.0.bb
index d2eda6b..e94c9ff 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.34.0.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-connectivity/rygel/rygel_0.34.0.bb
@@ -30,6 +30,7 @@
 PACKAGECONFIG[media-export] = "--enable-media-export-plugin,--disable-media-export-plugin"
 PACKAGECONFIG[gst-launch] = "--enable-gst-launch-plugin,--disable-gst-launch-plugin"
 PACKAGECONFIG[gtk+3] = ",--without-ui,gtk+3"
+PACKAGECONFIG[lms] = "--enable-lms-plugin,--disable-lms-plugin"
 
 LIBV = "2.6"
 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
index 5158f05..2956189 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
@@ -6,60 +6,59 @@
 FILESPATH =. "${FILE_DIRNAME}/kodi-17:"
 
 DEPENDS = " \
-            cmake-native \
-            curl-native \
-            gperf-native \
-            jsonschemabuilder-native \
-            nasm-native \
-            swig-native \
-            unzip-native \
-            yasm-native \
-            zip-native \
-            avahi \
-            boost \
-            bzip2 \
-            crossguid \
-            curl \
-            dcadec \
-            enca \
-            expat \
-            faad2 \
-            ffmpeg \
-            fontconfig \
-            fribidi \
-            giflib \
-            jasper \
-            libass \
-            libcdio \
-            libcec \
-            libmad \
-            libmicrohttpd \
-            libmms \
-            libmms \
-            libmodplug \
-            libpcre \
-            libplist \
-            libsamplerate0 \
-            libsdl-image \
-            libsdl-mixer \
-            libsquish \
-            libssh \
-            libtinyxml \
-            libusb1 \
-            libxslt \
-            lzo \
-            mpeg2dec \
-            python \
-            samba \
-            sqlite3 \
-            taglib \
-            virtual/egl \
-            virtual/libsdl \
-            wavpack \
-            yajl \
-            zlib \
-            ${@enable_glew(bb, d)} \
-          "
+    cmake-native \
+    curl-native \
+    gperf-native \
+    jsonschemabuilder-native \
+    nasm-native \
+    swig-native \
+    unzip-native \
+    yasm-native \
+    zip-native \
+    avahi \
+    boost \
+    bzip2 \
+    crossguid \
+    curl \
+    dcadec \
+    enca \
+    expat \
+    faad2 \
+    ffmpeg \
+    fontconfig \
+    fribidi \
+    giflib \
+    jasper \
+    libass \
+    libcdio \
+    libcec \
+    libmad \
+    libmicrohttpd \
+    libmms \
+    libmms \
+    libmodplug \
+    libpcre \
+    libplist \
+    libsamplerate0 \
+    libsdl-image \
+    libsdl-mixer \
+    libsquish \
+    libssh \
+    libtinyxml \
+    libusb1 \
+    libxslt \
+    lzo \
+    mpeg2dec \
+    python \
+    sqlite3 \
+    taglib \
+    virtual/egl \
+    virtual/libsdl \
+    wavpack \
+    yajl \
+    zlib \
+    ${@enable_glew(bb, d)} \
+"
 
 PROVIDES = "xbmc"
 
@@ -67,24 +66,24 @@
 PV = "17.3+gitr${SRCPV}"
 ADDONSPV = "17.1"
 SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \
-           https://repo.voidlinux.eu/distfiles/${BPN}-${ADDONSPV}-generated-addons.tar.xz;name=addons;unpack=0 \
-           file://0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
-           file://0004-handle-SIGTERM.patch \
-           file://0005-add-support-to-read-frequency-output-if-using-intel-.patch \
-           file://0006-Disable-DVD-support.patch \
-           file://0007-Always-compile-libcpluff-as-PIC.patch \
-           file://0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch \
-           file://0009-build-Add-support-for-musl-triplets.patch \
-           file://0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch \
-           file://0011-Let-configure-pass-on-unknown-architectures-setting-.patch \
-           file://0012-Revert-droid-fix-builds-with-AML-disabled.patch \
-           file://0001-change-order-of-detecting-libegl-and-libgles2.patch \
-           file://0013-FTPParse.cpp-use-std-string.patch \
+    https://repo.voidlinux.eu/distfiles/${BPN}-${ADDONSPV}-generated-addons.tar.xz;name=addons;unpack=0 \
+    file://0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
+    file://0004-handle-SIGTERM.patch \
+    file://0005-add-support-to-read-frequency-output-if-using-intel-.patch \
+    file://0006-Disable-DVD-support.patch \
+    file://0007-Always-compile-libcpluff-as-PIC.patch \
+    file://0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch \
+    file://0009-build-Add-support-for-musl-triplets.patch \
+    file://0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch \
+    file://0011-Let-configure-pass-on-unknown-architectures-setting-.patch \
+    file://0012-Revert-droid-fix-builds-with-AML-disabled.patch \
+    file://0001-change-order-of-detecting-libegl-and-libgles2.patch \
+    file://0013-FTPParse.cpp-use-std-string.patch \
 "
 
 SRC_URI_append_libc-musl = " \
-           file://0001-Fix-file_Emu-on-musl.patch \
-           file://0002-Remove-FILEWRAP.patch \
+    file://0001-Fix-file_Emu-on-musl.patch \
+    file://0002-Remove-FILEWRAP.patch \
 "
 SRC_URI[addons.md5sum] = "719614fa764011a18665d08af5c8c92f"
 SRC_URI[addons.sha256sum] = "350da57408c27473eaf40e7f544bc94841bf101dc4346085260c5c4af0adac97"
@@ -102,8 +101,10 @@
 ACCEL_x86 = "vaapi vdpau"
 ACCEL_x86-64 = "vaapi vdpau"
 
-PACKAGECONFIG ??= "${ACCEL} opengl"
-PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', ' openglesv2', d)}"
+PACKAGECONFIG ??= "${ACCEL} opengl \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'openglesv2', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'samba', '', d)} \
+"
 
 PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,"
 PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl"
@@ -113,6 +114,7 @@
 PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst"
 PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
 PACKAGECONFIG[lcms] = "--enable-lcms2,--disable-lcms2,lcms"
+PACKAGECONFIG[samba] = "--enable-samba,--disable-samba,samba"
 
 EXTRA_OECONF = " \
     --disable-debug \
@@ -183,29 +185,31 @@
 
 # kodi uses some kind of dlopen() method for libcec so we need to add it manually
 # OpenGL builds need glxinfo, that's in mesa-demos
-RRECOMMENDS_${PN}_append = " libcec \
-                             python \
-                             python-ctypes \
-                             python-lang \
-                             python-re \
-                             python-netclient \
-                             python-html \
-                             python-difflib \
-                             python-json \
-                             python-zlib \
-                             python-shell \
-                             python-sqlite3 \
-                             python-compression \
-                             libcurl \
-                             ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
+RRECOMMENDS_${PN}_append = " \
+    libcec \
+    python \
+    python-ctypes \
+    python-lang \
+    python-re \
+    python-netclient \
+    python-html \
+    python-difflib \
+    python-json \
+    python-zlib \
+    python-shell \
+    python-sqlite3 \
+    python-compression \
+    libcurl \
+    ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
 "
-RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \
-                                        glibc-gconv-ibm850 \
-					glibc-gconv-unicode \
-                                        glibc-gconv-utf-32 \
-					glibc-charmap-utf-8 \
-					glibc-localedata-en-us \
-                                      "
+RRECOMMENDS_${PN}_append_libc-glibc = " \
+    glibc-charmap-ibm850 \
+    glibc-gconv-ibm850 \
+    glibc-gconv-unicode \
+    glibc-gconv-utf-32 \
+    glibc-charmap-utf-8 \
+    glibc-localedata-en-us \
+"
 
 RPROVIDES_${PN} += "xbmc"
 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps/0001-Do-not-use-obsolete-pow10f-function.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps/0001-Do-not-use-obsolete-pow10f-function.patch
new file mode 100644
index 0000000..bd5e1b6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps/0001-Do-not-use-obsolete-pow10f-function.patch
@@ -0,0 +1,50 @@
+From 0cc7362e171616dcfeb93c6e1576362761bf14e5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 31 Jan 2018 18:37:16 -0800
+Subject: [PATCH] Do not use obsolete pow10f() function
+
+exp10 name is standardized in TS 18661-4 and its
+available in glibc since version 2.1
+it has been now removed from glibc 2.27+
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dsp/v4f_IIR2.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/dsp/v4f_IIR2.h b/dsp/v4f_IIR2.h
+index a68ecf5..ebd1234 100644
+--- a/dsp/v4f_IIR2.h
++++ b/dsp/v4f_IIR2.h
+@@ -33,7 +33,7 @@
+ namespace DSP {
+ 
+ #ifdef __APPLE__
+-inline float pow10f(float f) {return pow(10,f);}
++inline float exp10f(float f) {return __exp10f(f);}
+ #endif
+ 
+ class RBJv4
+@@ -142,7 +142,7 @@ class IIR2v4
+ 				/* A = pow (10, gain / 40) */
+ 				v4f_t A = (v4f_t) {.025,.025,.025,.025};
+ 				A *= gain;
+-				A = v4f_map<pow10f> (A);
++				A = v4f_map<exp10f> (A);
+ 
+ 				RBJv4 p (f, Q);
+ 
+@@ -429,7 +429,7 @@ class IIR2v4Bank
+ 					/* A = pow (10, gain / 40) */
+ 					v4f_t A = (v4f_t) {.025,.025,.025,.025};
+ 					A *= gain[i];
+-					A = v4f_map<pow10f> (A);
++					A = v4f_map<exp10f> (A);
+ 
+ 					RBJv4 p (f[i], Q[i]);
+ 
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb
index 29167d1..fe864c4 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb
@@ -7,6 +7,7 @@
            file://Avoid-ambiguity-in-div-invocation.patch \
            file://0001-basic.h-Use-c99-supported-stdint-types.patch \
            file://append_ldflags.patch \
+           file://0001-Do-not-use-obsolete-pow10f-function.patch \
            "
 
 SRC_URI[md5sum] = "c1d634038dcb54702306c0e30cb1c626"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch
new file mode 100644
index 0000000..0e1846e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch
@@ -0,0 +1,76 @@
+From 2de7e128fbdf528716b500cf27ed9a4358c931c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Fri, 24 Nov 2017 00:05:35 +0100
+Subject: [PATCH 2/2] Use ARM-NEON accelaration for float-multithreaded setups
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ src/rvoice/fluid_rvoice_mixer.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+diff --git a/src/rvoice/fluid_rvoice_mixer.c b/src/rvoice/fluid_rvoice_mixer.c
+index 9616518..dbf8057 100644
+--- a/src/rvoice/fluid_rvoice_mixer.c
++++ b/src/rvoice/fluid_rvoice_mixer.c
+@@ -27,6 +27,10 @@
+ #include "fluid_ladspa.h"
+ #include "fluid_synth.h"
+ 
++#if defined(__ARM_NEON__)
++#include "arm_neon.h"
++#endif
++
+ 
+ #define ENABLE_MIXER_THREADS 1
+ 
+@@ -794,20 +798,42 @@ fluid_mixer_buffers_mix(fluid_mixer_buffers_t* dest, fluid_mixer_buffers_t* src)
+   if (minbuf > src->buf_count)
+     minbuf = src->buf_count;
+   for (i=0; i < minbuf; i++) {
++#if defined(__ARM_NEON__) && defined(WITH_FLOAT)
++    for (j=0; j < scount; j+=4) {
++        float32x4_t vleft = vld1q_f32(&dest->left_buf[i][j]);
++        float32x4_t vright = vld1q_f32(&dest->right_buf[i][j]);
++        vleft = vaddq_f32(vleft, vld1q_f32(&src->left_buf[i][j]));
++        vright = vaddq_f32(vright, vld1q_f32(&src->right_buf[i][j]));
++        vst1q_f32(&dest->left_buf[i][j], vleft);
++        vst1q_f32(&dest->right_buf[i][j], vright);
++    }
++#else
+     for (j=0; j < scount; j++) {
+       dest->left_buf[i][j] += src->left_buf[i][j];
+       dest->right_buf[i][j] += src->right_buf[i][j];
+     }
++#endif
+   }
+ 
+   minbuf = dest->fx_buf_count;
+   if (minbuf > src->fx_buf_count)
+     minbuf = src->fx_buf_count;
+   for (i=0; i < minbuf; i++) {
++#if defined(__ARM_NEON__) && defined(WITH_FLOAT)
++    for (j=0; j < scount; j+=4) {
++        float32x4_t vleft = vld1q_f32(&dest->fx_left_buf[i][j]);
++        float32x4_t vright = vld1q_f32(&dest->fx_right_buf[i][j]);
++        vleft = vaddq_f32(vleft, vld1q_f32(&src->fx_left_buf[i][j]));
++        vright = vaddq_f32(vright, vld1q_f32(&src->fx_right_buf[i][j]));
++        vst1q_f32(&dest->fx_left_buf[i][j], vleft);
++        vst1q_f32(&dest->fx_right_buf[i][j], vright);
++    }
++#else
+     for (j=0; j < scount; j++) {
+       dest->fx_left_buf[i][j] += src->fx_left_buf[i][j];
+       dest->fx_right_buf[i][j] += src->fx_right_buf[i][j];
+     }
++#endif
+   }
+ }
+ 
+-- 
+2.9.5
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.10.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.10.bb
new file mode 100644
index 0000000..0ec4c49
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.10.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Fluidsynth is a software synthesizer"
+HOMEPAGE = "http://www.fluidsynth.org/"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594"
+
+DEPENDS = "alsa-lib ncurses glib-2.0"
+
+SRC_URI = " \
+    git://github.com/FluidSynth/fluidsynth.git;branch=1.1.x \
+    file://0001-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch \
+"
+SRCREV = "f5a0fee6f7f2b2ab4c866df1acb649333464b3fd"
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig lib_package
+
+EXTRA_OECMAKE = "-Denable-floats=ON -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)}"
+PACKAGECONFIG[sndfile] = "-Denable-libsndfile-support=ON,-Denable-libsndfile-support=OFF,libsndfile1"
+PACKAGECONFIG[jack] = "-Denable-jack-support=ON,-Denable-jack-support=OFF,jack"
+PACKAGECONFIG[pulseaudio] = "-Denable-pulseaudio=ON,--Denable-pulseaudio=OFF,pulseaudio"
+PACKAGECONFIG[portaudio] = "-Denable-portaudio=ON,-Denable-portaudio=OFF,portaudio-v19"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.6.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.6.bb
deleted file mode 100644
index 88981e4..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_1.1.6.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Fluidsynth is a software synthesizer"
-HOMEPAGE = "http://www.fluidsynth.org/"
-SECTION = "libs/multimedia"
-LICENSE = "LGPL-2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e198e9aac94943d0ec29a7dae8c29416"
-
-DEPENDS = "alsa-lib ncurses glib-2.0"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BP}/${BP}.tar.gz"
-SRC_URI[md5sum] = "ae5aca6de824b4173667cbd3a310b263"
-SRC_URI[sha256sum] = "50853391d9ebeda9b4db787efb23f98b1e26b7296dd2bb5d0d96b5bccee2171c"
-
-inherit autotools-brokensep pkgconfig lib_package
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)}"
-PACKAGECONFIG[sndfile] = "--enable-libsndfile-support,--disable-libsndfile-support,libsndfile1"
-PACKAGECONFIG[jack] = "--enable-jack-support,--disable-jack-support,jack"
-PACKAGECONFIG[pulseaudio] = "--enable-pulse-support,--disable-pulse-support,pulseaudio"
-PACKAGECONFIG[portaudio] = "--enable-portaudio-support,--disable-portaudio-support,portaudio-v19"
-
-do_configure_prepend () {
-    rm -f ${S}/m4/*
-}
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/lower-rank.diff b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/lower-rank.diff
deleted file mode 100644
index 5f08afe..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/lower-rank.diff
+++ /dev/null
@@ -1,16 +0,0 @@
-Lower the rank of ffmpeg plugin so codecs that hook into accelerated pieces (e.g. dsp or hw engines) can get picked over this
-Derived from OE by Dongxiao Xu <dongxiao.xu@intel.com>
-
-Upstream-Status: Inappropriate [embedded specific]
-
---- /tmp/gstffmpegdec.c	2009-03-05 09:31:15.000000000 +0100
-+++ gst-ffmpeg-0.10.6/ext/ffmpeg/gstffmpegdec.c	2009-03-05 09:33:09.000000000 +0100
-@@ -2588,7 +2588,7 @@
-       case CODEC_ID_MSMPEG4V3:
-       case CODEC_ID_H264:
-       case CODEC_ID_COOK:
--        rank = GST_RANK_PRIMARY;
-+        rank = GST_RANK_SECONDARY;
-         break;
-       case CODEC_ID_DVVIDEO:
-         /* we have a good dv decoder, fast on both ppc as well as x86. they say
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-base_0.10.36.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-base_0.10.36.bb
index a3bfa5f..f235464 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-base_0.10.36.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-plugins-base_0.10.36.bb
@@ -25,7 +25,6 @@
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 
-PACKAGECONFIG[gnomevfs] = "--enable-gnome_vfs,--disable-gnome_vfs,gnome-vfs"
 PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
 PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
 PACKAGECONFIG[x11] = "--enable-x --enable-xvideo,--disable-x --disable-xvideo,virtual/libx11 libxv libsm libice"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-rtsp/0001-change-deprecated-INCLUDES-to-AM_CPPFLAGS-for-automa.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-rtsp/0001-change-deprecated-INCLUDES-to-AM_CPPFLAGS-for-automa.patch
index 3afca4e..69b21dd 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-rtsp/0001-change-deprecated-INCLUDES-to-AM_CPPFLAGS-for-automa.patch
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-rtsp/0001-change-deprecated-INCLUDES-to-AM_CPPFLAGS-for-automa.patch
@@ -1,34 +1,38 @@
 index gst-rtsp_0.10.8/bindings/python/Makefile.am
---- gst-rtsp_0.10.8.orig/bindings/python/Makefile.am
-+++ gst-rtsp_0.10.8/bindings/python/Makefile.am
+Index: gst-rtsp-0.10.8/bindings/python/Makefile.am
+===================================================================
+--- gst-rtsp-0.10.8.orig/bindings/python/Makefile.am
++++ gst-rtsp-0.10.8/bindings/python/Makefile.am
 @@ -14,7 +14,7 @@ defs_DATA = $(DEFS)
  defsdir = $(pkgdatadir)/$(GST_MAJORMINOR)/defs
  OVERRIDES = rtspserver.override
-
+ 
 -INCLUDES = -I$(top_srcdir) -I$(srcdir) $(PYTHON_INCLUDES)
 +AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) $(PYTHON_INCLUDES)
-
+ 
  rtspserver_la_CFLAGS = -I$(top_srcdir)/src \
-         $(PYGOBJECT_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
-index gst-rtsp_0.10.8/examples/Makefile.am
---- gst-rtsp_0.10.8.orig/examples/Makefile.am
-+++ gst-rtsp_0.10.8/examples/Makefile.am
+ 		$(PYGOBJECT_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+Index: gst-rtsp-0.10.8/examples/Makefile.am
+===================================================================
+--- gst-rtsp-0.10.8.orig/examples/Makefile.am
++++ gst-rtsp-0.10.8/examples/Makefile.am
 @@ -1,6 +1,6 @@
  noinst_PROGRAMS = test-video test-ogg test-mp4 test-readme test-launch test-sdp test-uri test-auth
-
+ 
 -INCLUDES = -I$(top_srcdir) -I$(srcdir)
 +AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)
-
+ 
  AM_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
  AM_LDFLAGS = \
-index gst-rtsp_0.10.8/tests/Makefile.am
---- gst-rtsp_0.10.8.orig/tests/Makefile.am
-+++ gst-rtsp_0.10.8/tests/Makefile.am
+Index: gst-rtsp-0.10.8/tests/Makefile.am
+===================================================================
+--- gst-rtsp-0.10.8.orig/tests/Makefile.am
++++ gst-rtsp-0.10.8/tests/Makefile.am
 @@ -1,6 +1,6 @@
  noinst_PROGRAMS = test-cleanup
-
+ 
 -INCLUDES = -I$(top_srcdir) -I$(srcdir)
 +AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)
-
+ 
  AM_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
  AM_LDFLAGS = \
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd.inc b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd.inc
new file mode 100644
index 0000000..10ee5bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd.inc
@@ -0,0 +1,25 @@
+DESCRIPTION = "Gstreamer Daemon 1.0"
+SUMMARY = "GStreamer framework for controlling audio and video streaming using TCP connection messages"
+HOMEPAGE = "https://developer.ridgerun.com/wiki/index.php?title=Gstd-1.0"
+SECTION = "multimedia"
+LICENSE = "GPLv2+"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-rtsp-server json-glib libdaemon"
+
+SRCBRANCH ?= "master"
+SRCREV = "097a086a8606dcb368c7d38c7ec4fefc2497401b"
+SRC_URI = "git://git@github.com/RidgeRun/gstd-1.x.git;protocol=https;branch=${SRCBRANCH} \
+	   file://0001-gstd-yocto-compatibility.patch"
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG_CONFARGS = " \
+	--disable-gtk-doc \
+"
+
+inherit autotools pkgconfig gettext
+
+do_configure() {
+${S}/autogen.sh
+oe_runconf
+}
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd/0001-gstd-yocto-compatibility.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd/0001-gstd-yocto-compatibility.patch
new file mode 100644
index 0000000..ddc1831
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd/0001-gstd-yocto-compatibility.patch
@@ -0,0 +1,63 @@
+From eaf51d6420c63713f62025583681007c3502d387 Mon Sep 17 00:00:00 2001
+From: Carlos <carlos.rodriguez@ridgerun.com>
+Date: Fri, 15 Dec 2017 10:14:05 -0600
+Subject: [PATCH] gstd:yocto compatibility
+
+---
+ autogen.sh                      | 8 +++++++-
+ docs/reference/gstd/Makefile.am | 2 +-
+ gstd/Makefile.am                | 2 +-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 66dbd42..793ee2f 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -21,7 +21,11 @@
+ # ACLOCAL, AUTOPOINT and/or LIBTOOLIZE to the right versions, or leave them
+ # unset and get the defaults
+ 
+-gtkdocize || exit 1
++test -n "$srcdir" || srcdir=`dirname "$0"`
++test -n "$srcdir" || srcdir=.
++
++olddir=`pwd`
++cd "$srcdir"
+ 
+ autoreconf --verbose --force --install || {
+  echo 'autogen.sh failed';
+@@ -31,3 +35,5 @@ autoreconf --verbose --force --install || {
+ echo
+ echo "Now run './configure' with your system settings followed by 'make' to compile this module."
+ echo
++
++cd "$olddir"
+diff --git a/docs/reference/gstd/Makefile.am b/docs/reference/gstd/Makefile.am
+index f860fa1..153a13b 100644
+--- a/docs/reference/gstd/Makefile.am
++++ b/docs/reference/gstd/Makefile.am
+@@ -66,7 +66,7 @@ GTKDOC_LIBS=$(top_builddir)/gstd/libgstd-core.la
+ 
+ 
+ # This includes the standard gtk-doc make rules, copied by gtkdocize.
+-include $(top_srcdir)/docs/gtk-doc.make
++# include $(top_srcdir)/docs/gtk-doc.make
+ 
+ # Comment this out if you want 'make check' to test you doc status
+ # and run some sanity checks
+diff --git a/gstd/Makefile.am b/gstd/Makefile.am
+index 13c551d..11fe202 100644
+--- a/gstd/Makefile.am
++++ b/gstd/Makefile.am
+@@ -49,7 +49,7 @@ bin_PROGRAMS = gstd
+ 
+ gstd_SOURCES = gstd.c
+ gstd_CFLAGS = $(GST_CFLAGS) $(GIO_CFLAGS) $(GJSON_CFLAGS)
+-gstd_LDFLAGS = $(GST_LIBS) $(GIO_LIBS) $(GJSON_LIBS) -Wl,-rpath -Wl,$(libdir)
++gstd_LDFLAGS = $(GST_LIBS) $(GIO_LIBS) $(GJSON_LIBS)
+ gstd_LDADD = libgstd-core.la
+ 
+ gstdincludedir = $(includedir)/gstd
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd_1.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd_1.0.bb
new file mode 100644
index 0000000..94f6b57
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-1.0/gstd_1.0.bb
@@ -0,0 +1,3 @@
+require gstd.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/libdc1394/files/install_examples.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/libdc1394/files/install_examples.patch
index 89133ad..df0c235 100755
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/libdc1394/files/install_examples.patch
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/libdc1394/files/install_examples.patch
@@ -1,9 +1,9 @@
 Index: libdc1394/examples/Makefile.am
 ===================================================================
---- libdc1394.orig/examples/Makefile.am	2012-06-30 17:50:46.000000000 -0700
-+++ libdc1394/examples/Makefile.am	2012-06-30 19:02:13.822646430 -0700
-@@ -36,8 +36,7 @@
- AM_LDFLAGS = -framework CoreFoundation -framework Carbon
+--- libdc1394.orig/examples/Makefile.am
++++ libdc1394/examples/Makefile.am
+@@ -36,8 +36,7 @@ if HAVE_MACOSX
+ AM_LDFLAGS = -framework CoreFoundation $(FRAMEWORK_IOKIT)
  endif
  
 -noinst_PROGRAMS = $(A)
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/libde265/libde265_1.0.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/libde265/libde265_1.0.2.bb
new file mode 100644
index 0000000..cd075ff
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/libde265/libde265_1.0.2.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "libde265 is an open source implementation of the h.265 \
+video codec. It is written from scratch and has a plain C API to enable a \
+simple integration into other software."
+HOMEPAGE = "http://www.libde265.org/"
+SECTION = "libs/multimedia"
+
+LICENSE = "LGPLv3"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=852f345c1c52c9160f9a7c36bb997546"
+
+SRC_URI = "https://github.com/strukturag/libde265/releases/download/v${PV}/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "93520b378df25f3a94e962f2b54872cc"
+SRC_URI[sha256sum] = "eaa0348839c2935dd90647d72c6dd4a043e36361cb3c33d2b04df10fbcebd3cb"
+
+EXTRA_OECONF = "--disable-sherlock265 --disable-dec265"
+
+inherit autotools-brokensep pkgconfig
+
+PACKAGES =+ "${PN}-tools"
+FILES_${PN}-tools = "${bindir}/*"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicbrainz/files/allow-libdir-override.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicbrainz/files/allow-libdir-override.patch
index d59d12e..db4d6e8 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicbrainz/files/allow-libdir-override.patch
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicbrainz/files/allow-libdir-override.patch
@@ -6,11 +6,11 @@
 
 Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
 
-Index: libmusicbrainz-3.0.3/CMakeLists.txt
+Index: git/CMakeLists.txt
 ===================================================================
---- libmusicbrainz-3.0.3.orig/CMakeLists.txt
-+++ libmusicbrainz-3.0.3/CMakeLists.txt
-@@ -26,7 +26,7 @@ FIND_PACKAGE(DiscId)
+--- git.orig/CMakeLists.txt
++++ git/CMakeLists.txt
+@@ -36,7 +36,7 @@ FIND_PACKAGE(LibXml2 REQUIRED)
  SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
  SET(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix for executables and object code libraries" FORCE)
  SET(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin CACHE PATH "Installation prefix for user executables" FORCE)
@@ -18,4 +18,4 @@
 +SET(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH  "Installation prefix for object code libraries")
  SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Installation prefix for C header files" FORCE)
  
- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmusicbrainz3.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz3.pc)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmusicbrainz5.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz5.pc)
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
deleted file mode 100644
index 2eb21a3..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
+++ /dev/null
@@ -1,100 +0,0 @@
-SUMMARY = "Music Player Daemon"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-HOMEPAGE ="http://www.musicpd.org"
-
-inherit autotools useradd systemd pkgconfig
-
-DEPENDS += " \
-    alsa-lib \
-    libsamplerate0 \
-    libsndfile1 \
-    libvorbis \
-    libogg \
-    faad2 \
-    ffmpeg \
-    curl \
-    sqlite \
-    bzip2 \
-    pulseaudio \
-    tcp-wrappers \
-    openal-soft \
-    yajl \
-    jack \
-    faad2 \
-    flac \
-    libao \
-    fluidsynth \
-    libcdio \
-    wavpack \
-    libopus \
-    mpg123 \
-    libmms \
-    libmodplug \
-    boost \
-    icu \
-    dbus \
-    expat \
-    zlib \
-    libupnp1.6 \
-"
-
-# While this item does not require it, it depends on mpg123 which does
-LICENSE_FLAGS = "commercial"
-
-SRC_URI = " \
-    http://www.musicpd.org/download/${BPN}/0.19/${BP}.tar.xz \
-    file://mpd.conf.in \
-"
-SRC_URI[md5sum] = "fc19f76b512bd471b6af5214965ff7c5"
-SRC_URI[sha256sum] = "8305b8bc026f4b6bde28b8dd09bfdddbe5590acf36358eed4d083a396e301730"
-
-EXTRA_OECONF = "enable_bzip2=yes"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
-
-PACKAGECONFIG[audiofile] = "--enable-audiofile,--disable-audiofile,audiofile"
-PACKAGECONFIG[cdioparanoia] = "--enable-cdio-paranoia,--disable-cdio-paranoia,libcdio-paranoia"
-PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
-PACKAGECONFIG[id3tag] = "--enable-id3,--disable-id3,libid3tag"
-PACKAGECONFIG[lame] = "--enable-lame-encoder,--disable-lame-encoder,lame"
-PACKAGECONFIG[smb] = "--enable-smbclient,--disable-smbclient,samba"
-
-do_configure_prepend() {
-    sed -i -e 's|libsystemd-daemon|libsystemd|' ${S}/configure.ac
-}
-
-do_install_append() {
-    install -d ${D}/${localstatedir}/lib/mpd/music
-    chmod 775 ${D}/${localstatedir}/lib/mpd/music
-    install -d ${D}/${localstatedir}/lib/mpd/playlists
-    chown -R mpd ${D}/${localstatedir}/lib/mpd
-    chown mpd:mpd ${D}/${localstatedir}/lib/mpd/music
-
-    install -d ${D}/${sysconfdir}
-    install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf
-    sed -i \
-        -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \
-        -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \
-        -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \
-        -e 's|%log_file%|${localstatedir}/log/mpd.log|' \
-        -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \
-        ${D}/${sysconfdir}/mpd.conf
-
-    if [ -e ${D}/${systemd_unitdir}/system/mpd.service ] ; then
-        sed -i \
-            's|^ExecStart=.*|ExecStart=${bindir}/mpd --no-daemon|' \
-            ${D}/${systemd_unitdir}/system/mpd.service
-    fi
-}
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "mpd.socket"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = " \
-    --system --no-create-home \
-    --home ${localstatedir}/lib/mpd \
-    --groups audio \
-    --user-group mpd"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.18.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.18.bb
new file mode 100644
index 0000000..6754f34
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.18.bb
@@ -0,0 +1,100 @@
+SUMMARY = "Music Player Daemon"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+HOMEPAGE ="http://www.musicpd.org"
+
+inherit autotools useradd systemd pkgconfig
+
+DEPENDS += " \
+    alsa-lib \
+    libsamplerate0 \
+    libsndfile1 \
+    libvorbis \
+    libogg \
+    faad2 \
+    ffmpeg \
+    curl \
+    sqlite \
+    bzip2 \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
+    tcp-wrappers \
+    openal-soft \
+    yajl \
+    jack \
+    faad2 \
+    flac \
+    libao \
+    fluidsynth \
+    libcdio \
+    wavpack \
+    libopus \
+    mpg123 \
+    libmms \
+    libmodplug \
+    boost \
+    icu \
+    dbus \
+    expat \
+    zlib \
+    libupnp \
+"
+
+# While this item does not require it, it depends on mpg123 which does
+LICENSE_FLAGS = "commercial"
+
+SRC_URI = " \
+    http://www.musicpd.org/download/${BPN}/0.20/${BP}.tar.xz \
+    file://mpd.conf.in \
+"
+SRC_URI[md5sum] = "8dc87ba95473fd738f2aff9bd69cc212"
+SRC_URI[sha256sum] = "6a582dc2ae90b94ff3853f9ffd7d80b2c2b5fe2e2c35cb1da0b36f3f3dfad434"
+
+EXTRA_OECONF = "enable_bzip2=yes"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
+PACKAGECONFIG[audiofile] = "--enable-audiofile,--disable-audiofile,audiofile"
+PACKAGECONFIG[cdioparanoia] = "--enable-cdio-paranoia,--disable-cdio-paranoia,libcdio-paranoia"
+PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
+PACKAGECONFIG[id3tag] = "--enable-id3,--disable-id3,libid3tag"
+PACKAGECONFIG[lame] = "--enable-lame-encoder,--disable-lame-encoder,lame"
+PACKAGECONFIG[smb] = "--enable-smbclient,--disable-smbclient,samba"
+
+do_configure_prepend() {
+    sed -i -e 's|libsystemd-daemon|libsystemd|' ${S}/configure.ac
+}
+
+do_install_append() {
+    install -d ${D}/${localstatedir}/lib/mpd/music
+    chmod 775 ${D}/${localstatedir}/lib/mpd/music
+    install -d ${D}/${localstatedir}/lib/mpd/playlists
+    chown -R mpd ${D}/${localstatedir}/lib/mpd
+    chown mpd:mpd ${D}/${localstatedir}/lib/mpd/music
+
+    install -d ${D}/${sysconfdir}
+    install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf
+    sed -i \
+        -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \
+        -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \
+        -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \
+        -e 's|%log_file%|${localstatedir}/log/mpd.log|' \
+        -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \
+        ${D}/${sysconfdir}/mpd.conf
+
+    if [ -e ${D}/${systemd_unitdir}/system/mpd.service ] ; then
+        sed -i \
+            's|^ExecStart=.*|ExecStart=${bindir}/mpd --no-daemon|' \
+            ${D}/${systemd_unitdir}/system/mpd.service
+    fi
+}
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "mpd.socket"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = " \
+    --system --no-create-home \
+    --home ${localstatedir}/lib/mpd \
+    --groups audio \
+    --user-group mpd"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/openh264/openh264_1.7.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/openh264/openh264_1.7.0.bb
new file mode 100644
index 0000000..44c46f8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/openh264/openh264_1.7.0.bb
@@ -0,0 +1,42 @@
+DESCRIPTION = "OpenH264 is a codec library which supports H.264 encoding and \
+decoding. It is suitable for use in real time applications such as WebRTC."
+HOMEPAGE = "http://www.openh264.org/"
+SECTION = "libs/multimedia"
+
+DEPENDS_x86 += "nasm-native"
+DEPENDS_x86-64 += "nasm-native"
+
+LICENSE = "BSD-2-Clause"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bb6d3771da6a07d33fd50d4d9aa73bcf"
+
+S = "${WORKDIR}/git"
+SRCREV = "a180c9d4d6f1a4830ca9eed9d159d54996bd63cb"
+BRANCH = "openh264v1.7"
+SRC_URI = "git://github.com/cisco/openh264.git;protocol=https;branch=${BRANCH};"
+
+COMPATIBLE_MACHINE_armv7a = "(.*)"
+COMPATIBLE_MACHINE_aarch64 = "(.*)"
+COMPATIBLE_MACHINE_x86 = "(.*)"
+COMPATIBLE_MACHINE_x86-64 = "(.*)"
+COMPATIBLE_MACHINE_mips = "(.*)"
+COMPATIBLE_MACHINE_mips64 = "(.*)"
+
+EXTRA_OEMAKE_armv7a = "ARCH=arm"
+EXTRA_OEMAKE_aarch64 = "ARCH=arm64"
+EXTRA_OEMAKE_x86 = "ARCH=i386"
+EXTRA_OEMAKE_x86-64 = "ARCH=x86_64"
+EXTRA_OEMAKE_mips = "ARCH=mips"
+EXTRA_OEMAKE_mips64 = "ARCH=mips64"
+
+do_configure() {
+    :
+}
+
+do_compile() {
+    oe_runmake
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D} PREFIX=${prefix}
+}
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/opusfile/opusfile_0.10.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/opusfile/opusfile_0.10.bb
new file mode 100644
index 0000000..189dc87
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/opusfile/opusfile_0.10.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Library for opening, seeking, and decoding opus audio files"
+HOMEPAGE = "https://www.opus-codec.org/"
+SECTION = "audio"
+
+DEPENDS = "libogg openssl libopus"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ac22b992dde6a891f8949c3e2da8576"
+
+SRC_URI = "https://downloads.xiph.org/releases/opus/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "ab3f7d15d766f5b36b0951ee435f9ebf"
+SRC_URI[sha256sum] = "48e03526ba87ef9cf5f1c47b5ebe3aa195bd89b912a57060c36184a6cd19412f"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/schroedinger/schroedinger/configure.ac.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/schroedinger/schroedinger/configure.ac.patch
index 2ed8d22..838400f 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/schroedinger/schroedinger/configure.ac.patch
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/schroedinger/schroedinger/configure.ac.patch
@@ -5,10 +5,10 @@
 
 Upstream-Status: Inappropriate [configuration]
 
-Index: schroedinger-1.0.9/configure.ac
+Index: schroedinger-1.0.11/configure.ac
 ===================================================================
---- schroedinger-1.0.9.orig/configure.ac
-+++ schroedinger-1.0.9/configure.ac
+--- schroedinger-1.0.11.orig/configure.ac
++++ schroedinger-1.0.11/configure.ac
 @@ -54,7 +54,7 @@ if test "x${HAVE_ORC}" != xyes ; then
    AC_ERROR([orc-0.4 >= $ORC_VER is required])
  fi
@@ -16,5 +16,5 @@
 -ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
 +ORCC=$STAGING_DIR`$PKG_CONFIG --variable=orcc orc-0.4`
  AC_SUBST(ORCC)
+ AM_CONDITIONAL(HAVE_ORCC, test "x$cross_compiling" != xyes)
  
- AC_ARG_WITH([thread],
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-Update-exported-symbol-list.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-Update-exported-symbol-list.patch
new file mode 100644
index 0000000..44c6b19
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-Update-exported-symbol-list.patch
@@ -0,0 +1,34 @@
+From b1809d82031aa7c5bcaad58bcb4b59e082e0446e Mon Sep 17 00:00:00 2001
+From: Mans Rullgard <mans@mansr.com>
+Date: Sun, 5 Nov 2017 15:40:16 +0000
+Subject: [PATCH] Update exported symbol list
+
+commit 5c58413544 ("Don't export (most) internal libsox symbols")
+breaks dynamic flac builds as flac.c references lsx.error, so add it
+to the list of exceptions.
+
+| .libs/flac.o: In function `decoder_read_callback':
+| /usr/src/debug/sox/14.4.2-r0/sox-14.4.2/src/flac.c:63: undefined reference to `lsx_error'
+
+Upstream-Status: Backport [https://bogomips.org/sox.git ("pu" branch)]
+
+---
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 7cceaafd..a3a04ed1 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -95,7 +95,7 @@ libsox_la_LIBADD += @GOMP_LIBS@
+ 
+ libsox_la_CFLAGS = @WARN_CFLAGS@
+ libsox_la_LDFLAGS = @APP_LDFLAGS@ -version-info @SHLIB_VERSION@ \
+-  -export-symbols-regex '^(sox_.*|lsx_(check_read_params|(close|open)_dllibrary|(debug(_more|_most)?|fail|report|warn)_impl|eof|fail_errno|filelength|find_(enum_(text|value)|file_extension)|getopt(_init)?|lpc10_(create_(de|en)coder_state|(de|en)code)|raw(read|write)|read(_b_buf|buf|chars)|realloc|rewind|seeki|sigfigs3p?|strcasecmp|tell|unreadb|write(b|_b_buf|buf|s)))$$'
++  -export-symbols-regex '^(sox_.*|lsx_(([cm]|re)alloc|check_read_params|(close|open)_dllibrary|(debug(_more|_most)?|fail|report|warn)_impl|eof|error|fail_errno|filelength|find_(enum_(text|value)|file_extension)|flush|getopt(_init)?|id3_read_tag|lpc10_(create_(de|en)coder_state|(de|en)code)|raw(read|write)|read(_b_buf|buf|chars)|rewind|seeki|sigfigs3p?|strcasecmp|strdup|tell|unreadb|write(b|_b_buf|buf|s)))$$'
+ 
+ if HAVE_WIN32_LTDL
+   libsox_la_SOURCES += win32-ltdl.c win32-ltdl.h
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-remove-the-error-line-and-live-without-file-type-det.patch b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-remove-the-error-line-and-live-without-file-type-det.patch
index 605863a..4f02a66 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-remove-the-error-line-and-live-without-file-type-det.patch
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox/0001-remove-the-error-line-and-live-without-file-type-det.patch
@@ -1,4 +1,4 @@
-From c2aed28e3e14329ad0a8c4371fdcce9934013f21 Mon Sep 17 00:00:00 2001
+From d0313be5fb947df399a4db24a5f9244510d2ce87 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 12 Jul 2017 16:36:06 -0700
 Subject: [PATCH] remove the #error line and live without file-type detection
@@ -12,17 +12,17 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/src/formats.c b/src/formats.c
-index 7e231ca..b13f0d5 100644
+index 724a4cda..f683a922 100644
 --- a/src/formats.c
 +++ b/src/formats.c
-@@ -416,7 +416,6 @@ static void UNUSED rewind_pipe(FILE * fp)
+@@ -422,7 +422,6 @@ static void UNUSED rewind_pipe(FILE * fp)
    /* To fix this #error, either simply remove the #error line and live without
     * file-type detection with pipes, or add support for your compiler in the
-    * lines above.  Test with cat monkey.au | ./sox --info - */
+    * lines above.  Test with cat monkey.wav | ./sox --info - */
 -  #error FIX NEEDED HERE
    #define NO_REWIND_PIPE
    (void)fp;
  #endif
 -- 
-2.13.2
+2.16.2
 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb
deleted file mode 100644
index 3eb1856..0000000
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-DESCRIPTION="SoX is the Swiss Army knife of sound processing tools. \
-It converts audio files among various standard audio file formats \
-and can apply different effects and filters to the audio data."
-HOMEPAGE = "http://sox.sourceforge.net"
-SECTION = "audio"
-
-DEPENDS = "libpng ffmpeg libsndfile1 libvorbis"
-
-# While this item does not require it, it depends on ffmpeg which does
-LICENSE_FLAGS = "commercial"
-
-PR = "r2"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio', d)} \
-                   magic \
-"
-PACKAGECONFIG[pulseaudio] = "--with-pulseaudio=dyn,--with-pulseaudio=no,pulseaudio,"
-PACKAGECONFIG[alsa] = "--with-alsa=dyn,--with-alsa=no,alsa-lib,"
-PACKAGECONFIG[wavpack] = "--with-wavpack=dyn,--with-wavpack=no,wavpack,"
-PACKAGECONFIG[flac] = "--with-flac=dyn,--with-flac=no,flac,"
-PACKAGECONFIG[amrwb] = "--with-amrwb=dyn,--with-amrwb=no,opencore-amr,"
-PACKAGECONFIG[amrnb] = "--with-amrnb=dyn,--with-amrnb=no,opencore-amr,"
-PACKAGECONFIG[magic] = "--with-magic,--without-magic,file,"
-PACKAGECONFIG[mad] = "--with-mad,--without-mad,libmad,"
-PACKAGECONFIG[id3tag] = "--with-id3tag,--without-id3tag,libid3tag,"
-PACKAGECONFIG[lame] = "--with-lame,--without-lame,lame,"
-PACKAGECONFIG[ao] = "--with-ao,--without-ao,libao,"
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe \
-                    file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/sox/sox-${PV}.tar.gz \
-           file://0001-remove-the-error-line-and-live-without-file-type-det.patch \
-           "
-SRC_URI[md5sum] = "b0c15cff7a4ba0ec17fdc74e6a1f9cf1"
-SRC_URI[sha256sum] = "3ee34b14dd267de378e8a117aae81ec4cae330772342e6a55bbf6520a0a88aa3"
-
-inherit autotools
-
-BBCLASSEXTEND = "native"
-
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb
new file mode 100644
index 0000000..21fddd1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb
@@ -0,0 +1,40 @@
+DESCRIPTION="SoX is the Swiss Army knife of sound processing tools. \
+It converts audio files among various standard audio file formats \
+and can apply different effects and filters to the audio data."
+HOMEPAGE = "http://sox.sourceforge.net"
+SECTION = "audio"
+
+DEPENDS = "libpng ffmpeg libsndfile1"
+
+# While this item does not require it, it depends on ffmpeg which does
+LICENSE_FLAGS = "commercial"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio', d)} \
+                   magic \
+"
+PACKAGECONFIG[pulseaudio] = "--with-pulseaudio=dyn,--with-pulseaudio=no,pulseaudio,"
+PACKAGECONFIG[alsa] = "--with-alsa=dyn,--with-alsa=no,alsa-lib,"
+PACKAGECONFIG[wavpack] = "--with-wavpack=dyn,--with-wavpack=no,wavpack,"
+PACKAGECONFIG[flac] = "--with-flac=dyn,--with-flac=no,flac,"
+PACKAGECONFIG[amrwb] = "--with-amrwb=dyn,--with-amrwb=no,opencore-amr,"
+PACKAGECONFIG[amrnb] = "--with-amrnb=dyn,--with-amrnb=no,opencore-amr,"
+PACKAGECONFIG[oggvorbis] = "--with-oggvorbis=dyn,--with-oggvorbis=no,libvorbis"
+PACKAGECONFIG[opus] = "--with-opus=dyn,--with-opus=no,opusfile"
+PACKAGECONFIG[magic] = "--with-magic,--without-magic,file,"
+PACKAGECONFIG[mad] = "--with-mad,--without-mad,libmad,"
+PACKAGECONFIG[id3tag] = "--with-id3tag,--without-id3tag,libid3tag,"
+PACKAGECONFIG[lame] = "--with-lame,--without-lame,lame,"
+PACKAGECONFIG[ao] = "--with-ao,--without-ao,libao,"
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe \
+                    file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/sox/sox-${PV}.tar.gz \
+           file://0001-remove-the-error-line-and-live-without-file-type-det.patch \
+           file://0001-Update-exported-symbol-list.patch \
+           "
+SRC_URI[md5sum] = "d04fba2d9245e661f245de0577f48a33"
+SRC_URI[sha256sum] = "b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_1.1.1.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_1.1.1.bb
new file mode 100644
index 0000000..66b95db
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_1.1.1.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "TinyALSA is a small library to interface with ALSA in \
+the Linux kernel. It is a lightweight alternative to libasound."
+HOMEPAGE = "https://github.com/tinyalsa/tinyalsa"
+SECTION = "libs/multimedia"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://NOTICE;md5=dbdefe400d894b510a9de14813181d0b"
+
+S = "${WORKDIR}/git"
+SRCREV = "df11091086b56e5fb71887f2fa320e1d2ffeff58"
+SRC_URI = "git://github.com/tinyalsa/tinyalsa.git;protocol=https;"
+
+do_configure() {
+    :
+}
+
+do_compile() {
+    oe_runmake CC='${CC}' LD='${CC}' AR='${AR}'
+}
+
+do_install() {
+    oe_runmake install \
+        PREFIX="${prefix}" DESTDIR="${D}" INCDIR="${includedir}/tinyalsa" \
+        LIBDIR="${libdir}" BINDIR="${bindir}" MANDIR="${mandir}"
+}
+
+PACKAGES =+ "${PN}-tools"
+FILES_${PN}-tools = "${bindir}/*"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc
index acb3ccd..8e82b3b 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc
@@ -57,7 +57,6 @@
 PACKAGECONFIG[qt4] = "--enable-qt,--disable-qt, qt4-x11-free"
 PACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp"
 PACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi"
-PACKAGECONFIG[gnome-vfs] = "--enable-gnomevfs,--disable-gnomevfs, gnome-vfs"
 PACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba"
 PACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp"
 PACKAGECONFIG[dvdnav] = "--enable-dvdnav,--disable-dvdnav,libdvdnav libdvdcss"
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-support/gst-instruments/gst-instruments_0.2.3.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-support/gst-instruments/gst-instruments_0.2.3.bb
index b6cdc4f..07d0c55 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-support/gst-instruments/gst-instruments_0.2.3.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-support/gst-instruments/gst-instruments_0.2.3.bb
@@ -5,18 +5,16 @@
 LICENSE = "LGPL-3.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e6a600fd5e1d9cbde2d983680233ad02"
 
-SRC_URI = "https://github.com/kirushyk/gst-instruments/archive/${PV}.tar.gz"
+DEPENDS = "gstreamer1.0"
 
-SRC_URI[md5sum] = "14a394dec25642848b17f9999f1b4999"
-SRC_URI[sha256sum] = "5565658a33ff9596946541304fbdd3b3683dbb82171a0e6ce56f42b64a01e58d"
+S = "${WORKDIR}/git"
+SRCREV = "4ce8092636ee6572148b5fa044080734cf5a6b8d"
+SRC_URI = "git://github.com/kirushyk/gst-instruments.git;protocol=https;"
 
-S = "${WORKDIR}/gst-instruments-${PV}"
-
+FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*a"
 FILES_${PN} += "${libdir}/*"
 
 INSANE_SKIP_${PN} = "dev-so"
 
-DEPENDS = "gstreamer1.0"
-
 inherit autotools pkgconfig
 
diff --git a/import-layers/meta-openembedded/meta-multimedia/recipes-support/libsrtp/libsrtp_1.5.2.bb b/import-layers/meta-openembedded/meta-multimedia/recipes-support/libsrtp/libsrtp_1.5.2.bb
index 8abaa12..ee8c68b 100644
--- a/import-layers/meta-openembedded/meta-multimedia/recipes-support/libsrtp/libsrtp_1.5.2.bb
+++ b/import-layers/meta-openembedded/meta-multimedia/recipes-support/libsrtp/libsrtp_1.5.2.bb
@@ -5,11 +5,11 @@
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=15bc16b9d2e305974dde47e733883714"
 
-SRC_URI = "https://github.com/cisco/libsrtp/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+S = "${WORKDIR}/git"
+SRCREV = "e806a66bad35f4b215b7a825c24ef0ec4cc19569"
+SRC_URI = "git://github.com/cisco/libsrtp.git;protocol=https; \
            file://0001-Rename-conflicting-variable-mips.patch \
            "
-SRC_URI[md5sum] = "2309aa6027992810a4285b042c71e644"
-SRC_URI[sha256sum] = "86e1efe353397c0751f6bdd709794143bd1b76494412860f16ff2b6d9c304eda"
 
 inherit autotools
 
@@ -18,3 +18,5 @@
 rm_unused_bindir() {
     rmdir ${D}/${bindir}
 }
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/meta-openembedded/meta-networking/MAINTAINERS b/import-layers/meta-openembedded/meta-networking/MAINTAINERS
index 771c73c..bbb2d1b 100644
--- a/import-layers/meta-openembedded/meta-networking/MAINTAINERS
+++ b/import-layers/meta-openembedded/meta-networking/MAINTAINERS
@@ -2,16 +2,13 @@
 
 Please submit any patches against meta-networking to the OpenEmbedded
 development mailing list (openembedded-devel@lists.openembedded.org) with
-'[meta-networking][rocko]' in the subject.
+'[meta-networking]' in the subject.
 
 When sending single patches, please use something like:
 
    git send-email -1 -M \
         --to openembedded-devel@lists.openembedded.org \
-        --subject-prefix=meta-networking][rocko][PATCH
-
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
+        --subject-prefix=meta-networking][PATCH
 
 You may also contact the maintainers directly.
 
diff --git a/import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass b/import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass
index e490176..1632c3c 100644
--- a/import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass
+++ b/import-layers/meta-openembedded/meta-networking/classes/waf-samba.bbclass
@@ -1,7 +1,7 @@
 # waf is a build system which is used by samba related project.
 # Obtain details from https://wiki.samba.org/index.php/Waf
-# 
-inherit qemu pythonnative waf
+#
+inherit qemu pythonnative
 
 DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python"
 
@@ -21,6 +21,29 @@
                   ${PACKAGECONFIG_CONFARGS} \
                 "
 
+# avoids build breaks when using no-static-libs.inc
+DISABLE_STATIC = ""
+
+def get_waf_parallel_make(d):
+    pm = d.getVar('PARALLEL_MAKE')
+    if pm:
+        # look for '-j' and throw other options (e.g. '-l') away
+        # because they might have different meaning in bjam
+        pm = pm.split()
+        while pm:
+            opt = pm.pop(0)
+            if opt == '-j':
+                v = pm.pop(0)
+            elif opt.startswith('-j'):
+                v = opt[2:].strip()
+            else:
+                continue
+
+            v = min(64, int(v))
+            return '-j' + str(v)
+
+    return ""
+
 # Three methods for waf cross compile:
 # 1. answers:
 #    Only --cross-answers - try the cross-answers file, and if
@@ -86,8 +109,9 @@
     fi
 }
 
+do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
 do_compile () {
-    python ./buildtools/bin/waf ${@get_waf_parallel_make(d)}
+    python ./buildtools/bin/waf ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
 }
 
 do_install() {
diff --git a/import-layers/meta-openembedded/meta-networking/conf/layer.conf b/import-layers/meta-openembedded/meta-networking/conf/layer.conf
index 2dfde4b..e594b7b 100644
--- a/import-layers/meta-openembedded/meta-networking/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-networking/conf/layer.conf
@@ -17,6 +17,8 @@
 LAYERDEPENDS_networking-layer += "openembedded-layer"
 LAYERDEPENDS_networking-layer += "meta-python"
 
+LAYERSERIES_COMPAT_networking-layer = "sumo"
+
 LICENSE_PATH += "${LAYERDIR}/licenses"
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64_be.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64_be.txt
new file mode 100644
index 0000000..1023f6a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-aarch64_be.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
diff --git a/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv64.txt b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv64.txt
new file mode 100644
index 0000000..1023f6a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/files/waf-cross-answers/cross-answers-riscv64.txt
@@ -0,0 +1,39 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
index 93c836c..1bb5c63 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch
@@ -17,7 +17,7 @@
    static struct pubkey keys[] = {
 
 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-Upsteam-Status: Pending
+Upstream-Status: Pending
 Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
 ---
  utils/key2pub.py | 5 +++--
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
index aceb56d..812e983 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
@@ -1,6 +1,7 @@
+From 890f5bf2654b695a866262d72bfa9750af921a3b Mon Sep 17 00:00:00 2001
 From: Ben Hutchings <ben@decadent.org.uk>
 Date: Sat, 23 Aug 2014 12:26:37 -0700
-Subject: Fix linking of libraries used by libreg
+Subject: [PATCH] Fix linking of libraries used by libreg
 
 The math and crypto libraries are called by and need to be linked to
 libreg.so, not to the executables.
@@ -9,10 +10,15 @@
 
 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
 Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
 
+diff --git a/Makefile b/Makefile
+index a3ead30..da2dcc3 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda
+@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic
  CFLAGS += -Wall -g
  LDLIBREG += -lreg
  LDLIBS += $(LDLIBREG)
@@ -21,16 +27,14 @@
  LIBREG += libreg.so
  LDFLAGS += -L ./
  
-@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r
+@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize
  
  ifeq ($(USE_OPENSSL),1)
  CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
 -LDLIBS += `pkg-config --libs openssl`
 +LIBREGLDLIBS += `pkg-config --libs openssl`
  
- ifeq ($(RUNTIME_PUBKEY_ONLY),1)
- CFLAGS += -DRUNTIME_PUBKEY_ONLY
-@@ -51,7 +51,7 @@ endif
+ $(LIBREG): keys-ssl.c
  
  else
  CFLAGS += -DUSE_GCRYPT
@@ -39,7 +43,7 @@
  
  $(LIBREG): keys-gcrypt.c
  
-@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
+@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
  
  $(LIBREG): regdb.h reglib.h reglib.c
  	$(NQ) '  CC  ' $@
@@ -48,3 +52,6 @@
  
  install-libreg-headers:
  	$(NQ) '  INSTALL  libreg-headers'
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.3.bb
deleted file mode 100644
index cb3b5c2..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.3.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SECTION = "console/network"
-SUMMARY = "dhcpcd - a DHCP client"
-DESCRIPTION = "dhcpcd runs on your machine and silently configures your computer to work on the attached networks without trouble and mostly without configuration."
-
-HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://dhcpcd.c;endline=26;md5=77c40d671aff804ca91ea99556da8e9b"
-
-SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "d4f2f3ed4964197dee7767219c33a9df"
-SRC_URI[sha256sum] = "5abd12c4df2947d608f60a35227f9bf8ae8ab9de06ce975cdab1144d8f229b06"
-
-inherit autotools-brokensep
-
-PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-
-PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
-
-EXTRA_OECONF = "--enable-ipv4"
-
-FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb
new file mode 100644
index 0000000..885c6c0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb
@@ -0,0 +1,24 @@
+SECTION = "console/network"
+SUMMARY = "dhcpcd - a DHCP client"
+DESCRIPTION = "dhcpcd runs on your machine and silently configures your computer to work on the attached networks without trouble and mostly without configuration."
+
+HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://dhcpcd.c;endline=26;md5=77c40d671aff804ca91ea99556da8e9b"
+
+SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "2465624b62c1154f0e89dc69c42c849b"
+SRC_URI[sha256sum] = "6f9674dc7e27e936cc787175404a6171618675ecfb6903ab9887b1b66a87d69e"
+
+inherit autotools-brokensep
+
+PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
+
+EXTRA_OECONF = "--enable-ipv4"
+
+FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
index 4655bc5..190cd5f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb
@@ -169,7 +169,10 @@
 FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}"
 FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}"
 FILES_${PN}-logger = "${bindir}/logger.${BPN}"
+
 FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}"
+RCONFLICTS_${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng"
+
 FILES_${PN}-ftp = "${bindir}/ftp.${BPN}"
 
 FILES_${PN}-tftp = "${bindir}/tftp.${BPN}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.17.bb
deleted file mode 100644
index fcfec69..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.17.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Lightweight crypto and SSL/TLS library"
-DESCRIPTION = "mbedtls is a lean open source crypto library          \
-for providing SSL and TLS support in your programs. It offers        \
-an intuitive API and documented header files, so you can actually    \
-understand what the code does. It features:                          \
-                                                                     \
- - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
-   Camellia and XTEA                                                 \
- - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
- - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
- - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
-   ECDSA and ECDH                                                    \
- - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
- - Abstraction layers for ciphers, hashes, public key operations,    \
-   platform abstraction and threading                                \
-"
-
-HOMEPAGE = "https://polarssl.org"
-BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SECTION = "libdevel"
-
-SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
-
-SRC_URI[md5sum] = "a6ed92fc377ef60f7c24d42b900e0dad"
-SRC_URI[sha256sum] = "f5beb43e850283915e3e0f8d37495eade3bfb5beedfb61e7b8da70d4c68edb82"
-
-DEPENDS = "openssl"
-RDEPENDS_${PN} += "libcrypto"
-PROVIDES += "polarssl"
-RPROVIDES_${PN} = "polarssl"
-EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
-
-inherit cmake
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb
new file mode 100644
index 0000000..736cce1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Lightweight crypto and SSL/TLS library"
+DESCRIPTION = "mbedtls is a lean open source crypto library          \
+for providing SSL and TLS support in your programs. It offers        \
+an intuitive API and documented header files, so you can actually    \
+understand what the code does. It features:                          \
+                                                                     \
+ - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
+   Camellia and XTEA                                                 \
+ - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
+ - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
+ - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
+   ECDSA and ECDH                                                    \
+ - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
+ - Abstraction layers for ciphers, hashes, public key operations,    \
+   platform abstraction and threading                                \
+"
+
+HOMEPAGE = "https://tls.mbed.org/"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=302d50a6369f5f22efdb674db908167a"
+
+SECTION = "libdevel"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz"
+
+SRC_URI[md5sum] = "2d4b0e2cb844efde1e73d3bcd9731fef"
+SRC_URI[sha256sum] = "ab8b62b995781bcf22e87a265ed06267f87c3041198e996b44441223d19fa9c3"
+
+inherit cmake
+
+PACKAGECONFIG ??= "shared-libs programs"
+PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-USE_SHARED_MBEDTLS_LIBRARY=OFF"
+PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF"
+
+EXTRA_OECMAKE = "-DENABLE_TESTING=OFF -DLIB_INSTALL_DIR:STRING=${libdir}"
+
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+
+PACKAGES =+ "${PN}-programs"
+FILES_${PN}-programs = "${bindir}/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
index cce3f91..1b604ad 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb
@@ -26,7 +26,7 @@
 
 FILES_${PN} += " \
     ${libdir}/NetworkManager/*.so \
-    ${libdir}/NetworkManager/VPN/nm-openvpn-service.name \
+    ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
 "
 
 FILES_${PN}-staticdev += " \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch
deleted file mode 100644
index ced0c7c..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 047d3bf96b510740f64687480333c378e414995f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 31 Mar 2017 15:57:05 -0700
-Subject: [PATCH 1/5] adjust net/ headers for musl compatibility
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libnm-core/nm-utils.c          | 12 +++++++-----
- libnm-core/nm-utils.h          |  5 ++---
- src/platform/wifi/wifi-utils.h |  2 +-
- 3 files changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
-index df75d56..868224e 100644
---- a/libnm-core/nm-utils.c
-+++ b/libnm-core/nm-utils.c
-@@ -19,24 +19,26 @@
-  * Copyright 2005 - 2014 Red Hat, Inc.
-  */
- 
--#include "nm-default.h"
--
--#include "nm-utils.h"
--
- #include <string.h>
- #include <errno.h>
- #include <stdlib.h>
--#include <netinet/ether.h>
- #include <arpa/inet.h>
- #include <uuid/uuid.h>
- #include <libintl.h>
- #include <gmodule.h>
- #include <sys/stat.h>
-+//#include <net/if_arp.h>
-+//#include <net/ethernet.h>
-+#include <netinet/ether.h>
-+
-+#include "nm-default.h"
- 
-+#include "nm-utils.h"
- #if WITH_JANSSON
- #include <jansson.h>
- #endif
- 
-+
- #include "nm-common-macros.h"
- #include "nm-utils-private.h"
- #include "nm-setting-private.h"
-diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
-index 407c14e..156ccae 100644
---- a/libnm-core/nm-utils.h
-+++ b/libnm-core/nm-utils.h
-@@ -27,11 +27,10 @@
- 
- #include <glib.h>
- 
--#include <netinet/in.h>
--
- /* For ETH_ALEN and INFINIBAND_ALEN */
--#include <linux/if_ether.h>
-+//#include <linux/if_ether.h>
- #include <linux/if_infiniband.h>
-+#include <netinet/in.h>
- 
- #include "nm-core-enum-types.h"
- #include "nm-setting-wireless-security.h"
-diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h
-index 8e2b93f..84f5ce9 100644
---- a/src/platform/wifi/wifi-utils.h
-+++ b/src/platform/wifi/wifi-utils.h
-@@ -22,7 +22,7 @@
- #ifndef __WIFI_UTILS_H__
- #define __WIFI_UTILS_H__
- 
--#include <net/ethernet.h>
-+//#include <net/ethernet.h>
- 
- #include "nm-dbus-interface.h"
- 
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch
deleted file mode 100644
index 26f380b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 05e8bd664d0244cb8ab4376b962830b97860f6bf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 31 Mar 2017 18:37:19 -0700
-Subject: [PATCH] check for strndupa before using it
-
-musl does not have strndupa
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- config.h.in                        |  4 ++++
- configure.ac                       |  1 +
- src/systemd/src/basic/alloc-util.h | 12 ++++++++++++
- 3 files changed, 17 insertions(+)
-
-diff --git a/config.h.in b/config.h.in
-index db8c135..c4229ed 100644
---- a/config.h.in
-+++ b/config.h.in
-@@ -41,6 +41,10 @@
-    */
- #undef HAVE_DCGETTEXT
- 
-+/* Define to 1 if you have the declaration of `strndupa', and to 0 if you
-+   don't. */
-+#undef HAVE_DECL_STRNDUPA
-+
- /* Define to 1 if you have the <dlfcn.h> header file. */
- #undef HAVE_DLFCN_H
- 
-diff --git a/configure.ac b/configure.ac
-index 2630f8d..d0a57fd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -54,6 +54,7 @@ AC_SUBST(NM_VERSION)
- 
- GIT_SHA_RECORD(NM_GIT_SHA)
- 
-+AC_CHECK_DECLS([strndupa], [], [], [[#include <string.h>]])
- dnl
- dnl Checks for typedefs, structures, and compiler characteristics.
- dnl
-diff --git a/src/systemd/src/basic/alloc-util.h b/src/systemd/src/basic/alloc-util.h
-index ceeee51..924b59c 100644
---- a/src/systemd/src/basic/alloc-util.h
-+++ b/src/systemd/src/basic/alloc-util.h
-@@ -25,6 +25,18 @@
- #include <string.h>
- 
- #include "macro.h"
-+#include "config.h"
-+
-+#if !HAVE_DECL_STRNDUPA
-+#define strndupa(s, n) \
-+  ({ \
-+    const char *__old = (s); \
-+    size_t __len = strnlen(__old, (n)); \
-+    char *__new = (char *)alloca(__len + 1); \
-+    __new[__len] = '\0'; \
-+    (char *)memcpy(__new, __old, __len); \
-+  })
-+#endif
- 
- #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n)))
- 
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch
deleted file mode 100644
index bd194a6..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch
+++ /dev/null
@@ -1,621 +0,0 @@
-From: Sjoerd Simons <sjoerd@luon.net>
-Date: Sun, 21 Aug 2016 21:46:02 +0200
-Subject: [PATCH] dns/resolved: add systemd-resolved backend
-
-Add initial DNS backend that pushes DNS information into
-systemd-resolved. Backend is choosen by default if the systems
-resolv.conv is setup to pointing to one of the standard resolved
-locations.
-
-This doesn't handle global dns configuration.
-
-Signed-off-by: Sjoerd Simons <sjoerd@luon.net>
-
-https://bugzilla.gnome.org/show_bug.cgi?id=762540
-
-Upstream-Status: Backport
-
----
- man/NetworkManager.conf.xml               |  10 +-
- src/Makefile.am                           |   2 +
- src/dns-manager/nm-dns-manager.c          |  43 ++-
- src/dns-manager/nm-dns-systemd-resolved.c | 427 ++++++++++++++++++++++++++++++
- src/dns-manager/nm-dns-systemd-resolved.h |  45 ++++
- 5 files changed, 523 insertions(+), 4 deletions(-)
- create mode 100644 src/dns-manager/nm-dns-systemd-resolved.c
- create mode 100644 src/dns-manager/nm-dns-systemd-resolved.h
-
-diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml
-index 6295b82..0a67ae5 100644
---- a/man/NetworkManager.conf.xml
-+++ b/man/NetworkManager.conf.xml
-@@ -275,10 +275,12 @@ no-auto-default=*
-       <varlistentry>
-         <term><varname>dns</varname></term>
-         <listitem><para>Set the DNS (<filename>resolv.conf</filename>) processing mode.</para>
--        <para><literal>default</literal>: The default if the key is
--        not specified. NetworkManager will update
-+        <para><literal>default</literal>: NetworkManager will update
-         <filename>resolv.conf</filename> to reflect the nameservers
--        provided by currently active connections.</para>
-+        provided by currently active connections.  This is the default
-+        if the key is not specified, unless the system is configured
-+        to use systemd-resolved; in this case the default is
-+        <literal>systemd-resolved</literal></para>
-         <para><literal>dnsmasq</literal>: NetworkManager will run
-         dnsmasq as a local caching nameserver, using a "split DNS"
-         configuration if you are connected to a VPN, and then update
-@@ -288,6 +290,8 @@ no-auto-default=*
-         to unbound and dnssec-triggerd, providing a "split DNS"
-         configuration with DNSSEC support. The <filename>/etc/resolv.conf</filename>
-         will be managed by dnssec-trigger daemon.</para>
-+        <para><literal>systemd-resolved</literal>: NetworkManager will
-+        push the DNS configuration to systemd-resolved</para>
-         <para><literal>none</literal>: NetworkManager will not
-         modify resolv.conf. This implies
-         <literal>rc-manager</literal>&nbsp;<literal>unmanaged</literal></para>
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 8d29b19..10f63de 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -345,6 +345,8 @@ libNetworkManager_la_SOURCES = \
- 	\
- 	dns-manager/nm-dns-dnsmasq.c \
- 	dns-manager/nm-dns-dnsmasq.h \
-+	dns-manager/nm-dns-systemd-resolved.c \
-+	dns-manager/nm-dns-systemd-resolved.h \
- 	dns-manager/nm-dns-unbound.c \
- 	dns-manager/nm-dns-unbound.h \
- 	dns-manager/nm-dns-manager.c \
-diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
-index 5a758a9..38bc786 100644
---- a/src/dns-manager/nm-dns-manager.c
-+++ b/src/dns-manager/nm-dns-manager.c
-@@ -45,6 +45,7 @@
- 
- #include "nm-dns-plugin.h"
- #include "nm-dns-dnsmasq.h"
-+#include "nm-dns-systemd-resolved.h"
- #include "nm-dns-unbound.h"
- 
- #if WITH_LIBSOUP
-@@ -1588,6 +1589,37 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager)
- 
- NM_DEFINE_SINGLETON_GETTER (NMDnsManager, nm_dns_manager_get, NM_TYPE_DNS_MANAGER);
- 
-+static gboolean
-+_resolvconf_resolved_managed (void)
-+{
-+	static const char *const resolved_paths[] = {
-+		"/run/systemd/resolve/resolv.conf",
-+		"/lib/systemd/resolv.conf",
-+		"/usr/lib/systemd/resolv.conf",
-+	};
-+	GFile *f;
-+	GFileInfo *info;
-+	gboolean ret = FALSE;
-+
-+	f = g_file_new_for_path (_PATH_RESCONF);
-+	info = g_file_query_info (f,
-+	                          G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK","\
-+	                          G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET,
-+	                          G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
-+	                          NULL, NULL);
-+
-+	if (info && g_file_info_get_is_symlink (info)) {
-+		ret = _nm_utils_strv_find_first ((gchar **) resolved_paths,
-+		                                 G_N_ELEMENTS (resolved_paths),
-+		                                 g_file_info_get_symlink_target (info)) >= 0;
-+	}
-+
-+	g_clear_object(&info);
-+	g_clear_object(&f);
-+
-+	return ret;
-+}
-+
- static void
- init_resolv_conf_mode (NMDnsManager *self, gboolean force_reload_plugin)
- {
-@@ -1633,7 +1665,16 @@ again:
- 
- 	rc_manager = _check_resconf_immutable (rc_manager);
- 
--	if (nm_streq0 (mode, "dnsmasq")) {
-+	if (   (!mode && _resolvconf_resolved_managed ())
-+	    || nm_streq0 (mode, "systemd-resolved")) {
-+		if (   force_reload_plugin
-+		    || !NM_IS_DNS_SYSTEMD_RESOLVED (priv->plugin)) {
-+			_clear_plugin (self);
-+			priv->plugin = nm_dns_systemd_resolved_new ();
-+			plugin_changed = TRUE;
-+		}
-+		mode = "systemd-resolved";
-+	} else if (nm_streq0 (mode, "dnsmasq")) {
- 		if (force_reload_plugin || !NM_IS_DNS_DNSMASQ (priv->plugin)) {
- 			_clear_plugin (self);
- 			priv->plugin = nm_dns_dnsmasq_new ();
-diff --git a/src/dns-manager/nm-dns-systemd-resolved.c b/src/dns-manager/nm-dns-systemd-resolved.c
-new file mode 100644
-index 0000000..6bdd5f6
---- /dev/null
-+++ b/src/dns-manager/nm-dns-systemd-resolved.c
-@@ -0,0 +1,427 @@
-+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-+/*
-+ * Copyright (C) 2010 Dan Williams <dcbw@redhat.com>
-+ * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net>
-+ *
-+ * 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, 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.
-+ *
-+ */
-+
-+#include "nm-default.h"
-+
-+#include "nm-dns-systemd-resolved.h"
-+
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/wait.h>
-+#include <arpa/inet.h>
-+#include <sys/stat.h>
-+#include <linux/if.h>
-+
-+#include "nm-core-internal.h"
-+#include "nm-platform.h"
-+#include "nm-utils.h"
-+#include "nm-ip4-config.h"
-+#include "nm-ip6-config.h"
-+#include "nm-bus-manager.h"
-+#include "nm-manager.h"
-+#include "nm-device.h"
-+#include "NetworkManagerUtils.h"
-+
-+G_DEFINE_TYPE (NMDnsSystemdResolved, nm_dns_systemd_resolved, NM_TYPE_DNS_PLUGIN)
-+
-+#define NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(o) \
-+  (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DNS_SYSTEMD_RESOLVED, \
-+    NMDnsSystemdResolvedPrivate))
-+
-+#define SYSTEMD_RESOLVED_DBUS_SERVICE "org.freedesktop.resolve1"
-+#define SYSTEMD_RESOLVED_DBUS_PATH "/org/freedesktop/resolve1"
-+
-+typedef struct {
-+	int ifindex;
-+	GList *configs;
-+} InterfaceConfig;
-+
-+typedef struct {
-+	GDBusProxy *resolve;
-+	GCancellable *init_cancellable;
-+	GCancellable *update_cancellable;
-+	GQueue dns_updates;
-+	GQueue domain_updates;
-+} NMDnsSystemdResolvedPrivate;
-+
-+/*****************************************************************************/
-+
-+#define _NMLOG_DOMAIN         LOGD_DNS
-+#define _NMLOG_PREFIX_NAME    "systemd-resolved"
-+#define _NMLOG(level, ...) \
-+    G_STMT_START { \
-+        nm_log ((level), _NMLOG_DOMAIN, \
-+                "%s[%p]: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
-+                _NMLOG_PREFIX_NAME, \
-+                (self) \
-+                _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
-+    } G_STMT_END
-+
-+/*****************************************************************************/
-+
-+static void
-+call_done (GObject *source, GAsyncResult *r, gpointer user_data)
-+{
-+	GVariant *v;
-+	GError *error = NULL;
-+	NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data;
-+
-+	v = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), r, &error);
-+
-+	if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-+		return;
-+
-+	if (error != NULL) {
-+		_LOGW ("Failed: %s\n", error->message);
-+		g_error_free (error);
-+	}
-+}
-+
-+static void
-+add_interface_configuration (NMDnsSystemdResolved *self,
-+                             GArray *interfaces,
-+                             const NMDnsIPConfigData *data)
-+{
-+	int i;
-+	InterfaceConfig *ic = NULL;
-+	int ifindex;
-+	NMDevice *device;
-+
-+	if (NM_IS_IP4_CONFIG (data->config))
-+		ifindex = nm_ip4_config_get_ifindex (data->config);
-+	else if (NM_IS_IP6_CONFIG  (data->config))
-+		ifindex = nm_ip6_config_get_ifindex (data->config);
-+	else
-+		g_return_if_reached ();
-+
-+	device = nm_manager_get_device_by_ifindex (nm_manager_get (), ifindex);
-+
-+	if (!nm_device_get_managed (device, FALSE))
-+		return;
-+
-+	for (i = 0; i < interfaces->len; i++) {
-+		InterfaceConfig *tic = &g_array_index (interfaces, InterfaceConfig, i);
-+		if (ifindex == tic->ifindex) {
-+			ic = tic;
-+			break;
-+		}
-+	}
-+
-+	if (!ic) {
-+		g_array_set_size (interfaces, interfaces->len + 1);
-+		ic = &g_array_index (interfaces, InterfaceConfig,
-+		                     interfaces->len - 1);
-+		ic->ifindex = ifindex;
-+	}
-+
-+	ic->configs = g_list_append (ic->configs, data->config);
-+}
-+
-+static void
-+add_domain (GVariantBuilder *domains,
-+            const char *domain,
-+            gboolean never_default)
-+{
-+	/* If this link is never the default (e.g. only used for resources on this
-+	 * network) add a routing domain. */
-+	g_variant_builder_add (domains, "(sb)", domain, never_default);
-+}
-+
-+static void
-+update_add_ip6_config (NMDnsSystemdResolved *self,
-+                       GVariantBuilder *dns,
-+                       GVariantBuilder *domains,
-+                       const NMIP6Config *config)
-+{
-+	guint i, n;
-+
-+	n = nm_ip6_config_get_num_nameservers (config);
-+	for (i = 0 ; i < n; i++) {
-+		const struct in6_addr *ip;
-+
-+		g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)"));
-+		g_variant_builder_add (dns, "i", AF_INET6);
-+		ip = nm_ip6_config_get_nameserver (config, i),
-+
-+		g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, ip, 16, 1));
-+		g_variant_builder_close (dns);
-+	}
-+
-+	n = nm_ip6_config_get_num_searches (config);
-+	if (n > 0) {
-+		for (i = 0; i < n; i++) {
-+			add_domain (domains, nm_ip6_config_get_search (config, i),
-+			            nm_ip6_config_get_never_default (config));
-+		}
-+	} else {
-+		n = nm_ip6_config_get_num_domains (config);
-+		for (i = 0; i < n; i++) {
-+			add_domain (domains, nm_ip6_config_get_domain (config, i),
-+			            nm_ip6_config_get_never_default (config));
-+		}
-+	}
-+}
-+
-+static void
-+update_add_ip4_config (NMDnsSystemdResolved *self,
-+                       GVariantBuilder *dns,
-+                       GVariantBuilder *domains,
-+                       const NMIP4Config *config)
-+{
-+	guint i, n;
-+
-+	n = nm_ip4_config_get_num_nameservers (config);
-+	for (i = 0 ; i < n; i++) {
-+		guint32 ns;
-+
-+		g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)"));
-+		g_variant_builder_add (dns, "i", AF_INET);
-+		ns = nm_ip4_config_get_nameserver (config, i),
-+
-+		g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, &ns, 4, 1));
-+		g_variant_builder_close (dns);
-+	}
-+
-+	n = nm_ip4_config_get_num_searches (config);
-+	if (n  > 0) {
-+		for (i = 0; i < n; i++) {
-+			add_domain (domains, nm_ip4_config_get_search (config, i),
-+			            nm_ip4_config_get_never_default (config));
-+		}
-+	} else {
-+		n = nm_ip4_config_get_num_domains (config);
-+		for (i = 0; i < n; i++) {
-+			add_domain (domains, nm_ip4_config_get_domain (config, i),
-+			            nm_ip4_config_get_never_default (config));
-+		}
-+	}
-+}
-+
-+static void
-+free_pending_updates (NMDnsSystemdResolved *self)
-+{
-+	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
-+	GVariant *v;
-+
-+	while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL)
-+		g_variant_unref (v);
-+
-+	while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL)
-+		g_variant_unref (v);
-+}
-+
-+static void
-+prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic)
-+{
-+	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
-+	GVariantBuilder dns, domains;
-+	GList *l;
-+
-+	g_variant_builder_init (&dns, G_VARIANT_TYPE ("(ia(iay))"));
-+	g_variant_builder_add (&dns, "i", ic->ifindex);
-+	g_variant_builder_open (&dns, G_VARIANT_TYPE ("a(iay)"));
-+
-+	g_variant_builder_init (&domains, G_VARIANT_TYPE ("(ia(sb))"));
-+	g_variant_builder_add (&domains, "i", ic->ifindex);
-+	g_variant_builder_open (&domains, G_VARIANT_TYPE ("a(sb)"));
-+
-+	for (l = ic->configs ; l != NULL ; l = g_list_next (l)) {
-+		if (NM_IS_IP4_CONFIG (l->data))
-+			update_add_ip4_config (self, &dns, &domains, l->data);
-+		else if (NM_IS_IP6_CONFIG (l->data))
-+			update_add_ip6_config (self, &dns, &domains, l->data);
-+		else
-+			g_assert_not_reached ();
-+	}
-+	g_variant_builder_close (&dns);
-+	g_variant_builder_close (&domains);
-+
-+	g_queue_push_tail (&priv->dns_updates,
-+	                   g_variant_ref_sink (g_variant_builder_end (&dns)));
-+	g_queue_push_tail (&priv->domain_updates,
-+	                   g_variant_ref_sink (g_variant_builder_end (&domains)));
-+}
-+
-+static void
-+send_updates (NMDnsSystemdResolved *self)
-+{
-+	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
-+	GVariant *v;
-+
-+	nm_clear_g_cancellable (&priv->update_cancellable);
-+
-+	if (!priv->resolve)
-+		return;
-+
-+	priv->update_cancellable = g_cancellable_new ();
-+
-+	while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL) {
-+		g_dbus_proxy_call (priv->resolve, "SetLinkDNS", v,
-+		                   G_DBUS_CALL_FLAGS_NONE,
-+		                   -1, priv->update_cancellable, call_done, self);
-+		g_variant_unref (v);
-+	}
-+
-+	while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL) {
-+		g_dbus_proxy_call (priv->resolve, "SetLinkDomains", v,
-+		                   G_DBUS_CALL_FLAGS_NONE,
-+		                   -1, priv->update_cancellable, call_done, self);
-+		g_variant_unref (v);
-+	}
-+}
-+
-+static gboolean
-+update (NMDnsPlugin *plugin,
-+        const NMDnsIPConfigData **configs,
-+        const NMGlobalDnsConfig *global_config,
-+        const char *hostname)
-+{
-+	NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (plugin);
-+	GArray *interfaces = g_array_new (TRUE, TRUE, sizeof (InterfaceConfig));
-+	const NMDnsIPConfigData **c;
-+	int i;
-+
-+	for (c = configs; *c != NULL; c++)
-+		add_interface_configuration (self, interfaces, *c);
-+
-+	free_pending_updates (self);
-+
-+	for (i = 0; i < interfaces->len; i++) {
-+		InterfaceConfig *ic = &g_array_index (interfaces, InterfaceConfig, i);
-+
-+		prepare_one_interface (self, ic);
-+		g_list_free (ic->configs);
-+	}
-+
-+	g_array_free (interfaces, TRUE);
-+
-+	send_updates (self);
-+
-+	return TRUE;
-+}
-+
-+/****************************************************************/
-+
-+static gboolean
-+is_caching (NMDnsPlugin *plugin)
-+{
-+	return TRUE;
-+}
-+
-+static const char *
-+get_name (NMDnsPlugin *plugin)
-+{
-+	return "systemd-resolved";
-+}
-+
-+/****************************************************************/
-+
-+NMDnsPlugin *
-+nm_dns_systemd_resolved_new (void)
-+{
-+	return g_object_new (NM_TYPE_DNS_SYSTEMD_RESOLVED, NULL);
-+}
-+
-+static void
-+resolved_proxy_created (GObject *source, GAsyncResult *r, gpointer user_data)
-+{
-+	NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data;
-+	NMDnsSystemdResolvedPrivate *priv;
-+	gs_free_error GError *error = NULL;
-+	GDBusProxy *resolve;
-+
-+	resolve = g_dbus_proxy_new_finish (r, &error);
-+	if (   !resolve
-+	    && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-+		return;
-+
-+	priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
-+	g_clear_object (&priv->init_cancellable);
-+	if (!resolve) {
-+		_LOGW ("failed to connect to resolved via DBus: %s", error->message);
-+		g_signal_emit_by_name (self, NM_DNS_PLUGIN_FAILED);
-+		return;
-+	}
-+
-+	priv->resolve = resolve;
-+	send_updates (self);
-+}
-+
-+
-+static void
-+nm_dns_systemd_resolved_init (NMDnsSystemdResolved *self)
-+{
-+	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
-+	NMBusManager *dbus_mgr;
-+	GDBusConnection *connection;
-+
-+	g_queue_init (&priv->dns_updates);
-+	g_queue_init (&priv->domain_updates);
-+
-+	dbus_mgr = nm_bus_manager_get ();
-+	g_return_if_fail (dbus_mgr);
-+
-+	connection = nm_bus_manager_get_connection (dbus_mgr);
-+	g_return_if_fail (connection);
-+
-+	priv->init_cancellable = g_cancellable_new ();
-+	g_dbus_proxy_new (connection,
-+	                  G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
-+	                  G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
-+	                  NULL,
-+	                  SYSTEMD_RESOLVED_DBUS_SERVICE,
-+	                  SYSTEMD_RESOLVED_DBUS_PATH,
-+	                  SYSTEMD_RESOLVED_DBUS_SERVICE ".Manager",
-+	                  priv->init_cancellable,
-+	                  resolved_proxy_created,
-+	                  self);
-+}
-+
-+static void
-+dispose (GObject *object)
-+{
-+	NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (object);
-+	NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self);
-+
-+	free_pending_updates (self);
-+	g_clear_object (&priv->resolve);
-+	nm_clear_g_cancellable (&priv->init_cancellable);
-+	nm_clear_g_cancellable (&priv->update_cancellable);
-+
-+	G_OBJECT_CLASS (nm_dns_systemd_resolved_parent_class)->dispose (object);
-+}
-+
-+static void
-+nm_dns_systemd_resolved_class_init (NMDnsSystemdResolvedClass *dns_class)
-+{
-+	NMDnsPluginClass *plugin_class = NM_DNS_PLUGIN_CLASS (dns_class);
-+	GObjectClass *object_class = G_OBJECT_CLASS (dns_class);
-+
-+	g_type_class_add_private (dns_class, sizeof (NMDnsSystemdResolvedPrivate));
-+
-+	object_class->dispose = dispose;
-+
-+	plugin_class->is_caching = is_caching;
-+	plugin_class->update = update;
-+	plugin_class->get_name = get_name;
-+}
-+
-diff --git a/src/dns-manager/nm-dns-systemd-resolved.h b/src/dns-manager/nm-dns-systemd-resolved.h
-new file mode 100644
-index 0000000..45c64b3
---- /dev/null
-+++ b/src/dns-manager/nm-dns-systemd-resolved.h
-@@ -0,0 +1,45 @@
-+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-+/* 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, 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.
-+ *
-+ * Copyright (C) 2010 Red Hat, Inc.
-+ * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net>
-+ */
-+
-+#ifndef __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__
-+#define __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__
-+
-+#include "nm-dns-plugin.h"
-+
-+#define NM_TYPE_DNS_SYSTEMD_RESOLVED            (nm_dns_systemd_resolved_get_type ())
-+#define NM_DNS_SYSTEMD_RESOLVED(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolved))
-+#define NM_DNS_SYSTEMD_RESOLVED_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass))
-+#define NM_IS_DNS_SYSTEMD_RESOLVED(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED))
-+#define NM_IS_DNS_SYSTEMD_RESOLVED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED))
-+#define NM_DNS_SYSTEMD_RESOLVED_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass))
-+
-+typedef struct {
-+	NMDnsPlugin parent;
-+} NMDnsSystemdResolved;
-+
-+typedef struct {
-+	NMDnsPluginClass parent;
-+} NMDnsSystemdResolvedClass;
-+
-+GType nm_dns_systemd_resolved_get_type (void);
-+
-+NMDnsPlugin *nm_dns_systemd_resolved_new (void);
-+
-+#endif /* __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ */
-+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch
deleted file mode 100644
index ca7e4a4..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 6f799f1f0e68cc7bf89c0a56aec5ecf46937619d Mon Sep 17 00:00:00 2001
-From: Ricardo Salveti <rsalveti@rsalveti.net>
-Date: Thu, 15 Jun 2017 10:02:38 -0300
-Subject: [PATCH] dns/resolved: also check for /etc/resolv-conf.systemd
-
-OE specific resolv.conf path, so it can be enabled by default if available.
-
-Upstream-Status: Inappropriate [OE config specific]
-
-Signed-off-by: Ricardo Salveti <rsalveti@rsalveti.net>
----
- src/dns-manager/nm-dns-manager.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
-index c1d2bf7..d70d4b4 100644
---- a/src/dns-manager/nm-dns-manager.c
-+++ b/src/dns-manager/nm-dns-manager.c
-@@ -1596,6 +1596,7 @@ _resolvconf_resolved_managed (void)
- 		"/run/systemd/resolve/resolv.conf",
- 		"/lib/systemd/resolv.conf",
- 		"/usr/lib/systemd/resolv.conf",
-+		"/etc/resolv-conf.systemd",
- 	};
- 	GFile *f;
- 	GFileInfo *info;
--- 
-2.7.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch
deleted file mode 100644
index 5c9ed92..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 7dd40db6606c3b3559365a03944cb99aee5ceabc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Thu, 4 Apr 2013 12:57:58 +0200
-Subject: [PATCH] don't try to run /sbin/dhclient to get the version number,
- this break cross-compiling
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [build system specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.ac |    6 ------
- 1 files changed, 0 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index cc66e9b..7163287 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -488,12 +488,6 @@ AS_IF([test -z "$with_dhcpcd"], with_dhcpcd=yes)
- # Search and check the executables
- if test "$with_dhclient" = "yes"; then
- 	AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin)
--	if test "$with_dhclient" != "no"; then
--		if ! $with_dhclient --version 2>&1 | grep -q "^isc-dhclient-4\."; then
--			AC_MSG_WARN([Cannot use dhclient, version 4.x is required])
--			with_dhclient=no
--		fi
--	fi
- fi
- if test "$with_dhcpcd" = "yes"; then
- 	AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin)
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
new file mode 100644
index 0000000..7194423
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
@@ -0,0 +1,40 @@
+From 18f71c1b48730b8602826517f2b5b088283ae948 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 31 Mar 2017 16:48:00 -0700
+Subject: [PATCH 5/7] sd-lldp.h: Remove net/ethernet.h seems to be over
+ specified
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/systemd/src/libsystemd-network/sd-lldp.c | 1 +
+ src/systemd/src/systemd/sd-lldp.h            | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c
+index 31e2448..7721cc2 100644
+--- a/src/systemd/src/libsystemd-network/sd-lldp.c
++++ b/src/systemd/src/libsystemd-network/sd-lldp.c
+@@ -21,6 +21,7 @@
+ #include "nm-sd-adapt.h"
+ 
+ #include <arpa/inet.h>
++#include <net/ethernet.h>
+ #include <linux/sockios.h>
+ 
+ #include "sd-lldp.h"
+diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h
+index 3f35eeb..61b0e45 100644
+--- a/src/systemd/src/systemd/sd-lldp.h
++++ b/src/systemd/src/systemd/sd-lldp.h
+@@ -22,7 +22,7 @@
+ ***/
+ 
+ #include <inttypes.h>
+-#include <net/ethernet.h>
++//#include <net/ethernet.h>
+ #include <sys/types.h>
+ 
+ #include "sd-event.h"
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch
deleted file mode 100644
index 4234e2b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From a9bfe6f2029d75caf28fcdf3e740843cf6359615 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 27 Jun 2017 07:31:25 -0700
-Subject: [PATCH 1/2] systemd: xlocale.h is dropped by newer glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemd/src/basic/parse-util.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c
-index 9c21e5a..dd95d1f 100644
---- a/src/systemd/src/basic/parse-util.c
-+++ b/src/systemd/src/basic/parse-util.c
-@@ -25,11 +25,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#ifdef __GLIBC__
--#include <xlocale.h>
--#else
- #include <locale.h>
--#endif
- #include "alloc-util.h"
- #include "extract-word.h"
- #include "macro.h"
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch
deleted file mode 100644
index aa57c83..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 7274bbadd398a69b8babf47431f80d35e0228c42 Mon Sep 17 00:00:00 2001
-From: Adrian Freihofer <adrian.freihofer@gmail.com>
-Date: Mon, 18 Jan 2016 08:53:26 +0100
-Subject: [PATCH] Fix nm-version-macro includes
-
-nm-version-macros.h cannot be found since include directive has
-been changed from " to <. This breaks for example gnome-panel
-build:
-/usr/include/NetworkManager/NetworkManager.h:31:31:
-fatal error: nm-version-macros.h: No such file or directory.
----
- libnm-core/nm-version.h     | 2 +-
- libnm-util/NetworkManager.h | 2 +-
- libnm-util/nm-version.h     | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/libnm-core/nm-version.h b/libnm-core/nm-version.h
-index 730330a..d751bc1 100644
---- a/libnm-core/nm-version.h
-+++ b/libnm-core/nm-version.h
-@@ -23,7 +23,7 @@
- 
- #include <glib.h>
- 
--#include <nm-version-macros.h>
-+#include "nm-version-macros.h"
- 
- /* Deprecation / Availability macros */
- 
-diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h
-index d83e4ab..3a964fc 100644
---- a/libnm-util/NetworkManager.h
-+++ b/libnm-util/NetworkManager.h
-@@ -28,7 +28,7 @@
- 
- /* This header must not include glib or libnm. */
- 
--#include <nm-version-macros.h>
-+#include "nm-version-macros.h"
- 
- /*
-  * dbus services details
-diff --git a/libnm-util/nm-version.h b/libnm-util/nm-version.h
-index 63895dd..41101a4 100644
---- a/libnm-util/nm-version.h
-+++ b/libnm-util/nm-version.h
-@@ -23,7 +23,7 @@
- 
- #include <glib.h>
- 
--#include <nm-version-macros.h>
-+#include "nm-version-macros.h"
- 
- /* Deprecation / Availability macros */
- 
--- 
-2.5.0
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
new file mode 100644
index 0000000..28848d3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
@@ -0,0 +1,25 @@
+From 583f0448fb7e9aba2b410c06eec6f420b41a6a0c Mon Sep 17 00:00:00 2001
+From: Pablo Saavedra <psaavedra@igalia.com>
+Date: Tue, 13 Mar 2018 17:36:20 +0100
+Subject: [PATCH 7/7] Fixed configure.ac: Fix pkgconfig sysroot locations
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 51e5eb6..c9d3e56 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -669,7 +669,7 @@ else
+ 	AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled])
+ 
+ 	AC_CHECK_TOOLS(READELF, [eu-readelf readelf])
+-	JANSSON_LIBDIR=`$PKG_CONFIG --variable=libdir jansson`
++	JANSSON_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=libdir jansson`
+ 	JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'`
+ 
+ 	if test "$JANSSON_SONAME" = ""; then
+-- 
+2.14.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch
deleted file mode 100644
index 22bc6e8..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 98d7e3ae5b15e30af1bf5dd1d279e1a774bf2b86 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 31 Mar 2017 16:05:05 -0700
-Subject: [PATCH 2/5] socket-util.h: Include linux/sockios.h on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemd/src/basic/socket-util.h | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h
-index 2536b08..76d6107 100644
---- a/src/systemd/src/basic/socket-util.h
-+++ b/src/systemd/src/basic/socket-util.h
-@@ -29,6 +29,12 @@
- #include <linux/netlink.h>
- #include <linux/if_packet.h>
- 
-+#if !defined(__GLIBC__)
-+/* SIOCGSTAMPNS from linux/asm-generic.h
-+ * for src/systemd/src/libsystemd-network/sd-lldp.c */
-+#include <linux/sockios.h>
-+#endif
-+
- #include "macro.h"
- #include "util.h"
- 
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch
deleted file mode 100644
index e32b5c0..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From adc0668b854289a11cfc29597b5566ba1869d17e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 27 Jun 2017 07:32:09 -0700
-Subject: [PATCH 2/2] user format string in g_dbus_message_new_method_error ()
-
-This fixes format errors with -Werror=format-security
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/nm-manager.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/nm-manager.c b/src/nm-manager.c
-index c3d65cd..e814912 100644
---- a/src/nm-manager.c
-+++ b/src/nm-manager.c
-@@ -4871,6 +4871,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
- 	if (error || (result != NM_AUTH_CALL_RESULT_YES)) {
- 		reply = g_dbus_message_new_method_error (pfd->message,
- 		                                         NM_PERM_DENIED_ERROR,
-+		                                         "%s",
- 		                                         (error_message = "Not authorized to perform this operation"));
- 		if (error)
- 			error_message = error->message;
-@@ -4882,6 +4883,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
- 	if (!object) {
- 		reply = g_dbus_message_new_method_error (pfd->message,
- 		                                         "org.freedesktop.DBus.Error.UnknownObject",
-+		                                         "%s",
- 		                                         (error_message = "Object doesn't exist."));
- 		goto done;
- 	}
-@@ -4890,6 +4892,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
- 	if (!nm_exported_object_get_interface_by_type (object, pfd->interface_type)) {
- 		reply = g_dbus_message_new_method_error (pfd->message,
- 		                                         "org.freedesktop.DBus.Error.InvalidArgs",
-+		                                         "%s",
- 		                                         (error_message = "Object is of unexpected type."));
- 		goto done;
- 	}
-@@ -4905,6 +4908,7 @@ prop_set_auth_done_cb (NMAuthChain *chain,
- 		if (global_dns && !nm_global_dns_config_is_internal (global_dns)) {
- 			reply = g_dbus_message_new_method_error (pfd->message,
- 			                                         NM_PERM_DENIED_ERROR,
-+			                                         "%s",
- 			                                         (error_message = "Global DNS configuration already set via configuration file"));
- 			goto done;
- 		}
-@@ -4949,6 +4953,7 @@ do_set_property_check (gpointer user_data)
- 	if (!pfd->subject) {
- 		reply = g_dbus_message_new_method_error (pfd->message,
- 		                                         NM_PERM_DENIED_ERROR,
-+		                                         "%s",
- 		                                         (error_message = "Could not determine request UID."));
- 		goto out;
- 	}
-@@ -4958,6 +4963,7 @@ do_set_property_check (gpointer user_data)
- 	if (!chain) {
- 		reply = g_dbus_message_new_method_error (pfd->message,
- 		                                         NM_PERM_DENIED_ERROR,
-+		                                         "%s",
- 		                                         (error_message = "Could not authenticate request."));
- 		goto out;
- 	}
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch
deleted file mode 100644
index 236914f..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 16c3dc7a407101243d2056d2c93e61dce1a05350 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 31 Mar 2017 16:08:45 -0700
-Subject: [PATCH 3/5] Define ETH_ALEN
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libnm-core/nm-utils.h          | 1 +
- src/platform/wifi/wifi-utils.h | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
-index 156ccae..68e222b 100644
---- a/libnm-core/nm-utils.h
-+++ b/libnm-core/nm-utils.h
-@@ -29,6 +29,7 @@
- 
- /* For ETH_ALEN and INFINIBAND_ALEN */
- //#include <linux/if_ether.h>
-+#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
- #include <linux/if_infiniband.h>
- #include <netinet/in.h>
- 
-diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h
-index 84f5ce9..33a838d 100644
---- a/src/platform/wifi/wifi-utils.h
-+++ b/src/platform/wifi/wifi-utils.h
-@@ -24,6 +24,8 @@
- 
- //#include <net/ethernet.h>
- 
-+#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
-+
- #include "nm-dbus-interface.h"
- 
- typedef struct WifiData WifiData;
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch
new file mode 100644
index 0000000..92485f0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch
@@ -0,0 +1,77 @@
+From 4f000a4a19975d6aba71427e693cd1ed080abda9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 11:08:30 +0100
+Subject: [PATCH] Do not create settings settings/property documentation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It was tried to get this work but gi / GirRepository could not be found by
+python. Anyway it is not necessary for us to have the settings/property docs.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ Makefile.am  | 18 ++----------------
+ configure.ac |  4 ----
+ 2 files changed, 2 insertions(+), 20 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 639921d..314a61d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -961,9 +961,7 @@ endif
+ if HAVE_INTROSPECTION
+ 
+ libnm_noinst_data = \
+-	libnm/nm-property-docs.xml \
+ 	libnm/nm-settings-docs-overrides.xml \
+-	libnm/nm-settings-docs.xml \
+ 	libnm/nm-settings-keyfile-docs.xml \
+ 	libnm/nm-settings-ifcfg-rh-docs.xml
+ 
+@@ -3317,23 +3315,11 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
+ $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp
+ 
+ clients_common_settings_doc_c = clients/common/settings-docs.c
+-if HAVE_INTROSPECTION
+-$(clients_common_settings_doc_c): clients/common/settings-docs.xsl libnm/nm-property-docs.xml clients/common/.dirstamp
+-	$(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^)
+-DISTCLEANFILES += $(clients_common_settings_doc_c)
+-check-local-settings-docs: $(clients_common_settings_doc_c)
+-	@if test -z "$$NMTST_NO_CHECK_SETTINGS_DOCS" ; then  \
+-		if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)" ; then \
+-			echo "The generated file \"$(builddir)/$(clients_common_settings_doc_c)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_c).in\". You probably should copy the generated file over to the source file. You can skip this test by setting \$$NMTST_NO_CHECK_SETTINGS_DOCS=yes"; \
+-			false; \
+-		fi;\
+-	fi
+-check_local += check-local-settings-docs
+-else
++
+ $(clients_common_settings_doc_c): $(clients_common_settings_doc_c).in clients/common/.dirstamp
+ 	$(AM_V_GEN) cp "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)"
+ check-local-settings-docs:
+-endif
++
+ EXTRA_DIST += \
+ 	$(clients_common_settings_doc_c) \
+ 	$(clients_common_settings_doc_c).in
+diff --git a/configure.ac b/configure.ac
+index c9d3e56..407222e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1286,10 +1286,6 @@ GTK_DOC_CHECK(1.0)
+ # check if we can build setting property documentation
+ build_docs=no
+ if test -n "$INTROSPECTION_MAKEFILE"; then
+-	# If g-i is installed we know we have python, but we might not have pygobject
+-	if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then
+-		AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
+-	fi
+ 
+ 	AC_PATH_PROG(PERL, perl)
+ 	if test -z "$PERL"; then
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch
deleted file mode 100644
index 27c9ae9..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 2153109e60e362e0d09215d529bf00176f31a3e7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 31 Mar 2017 16:09:41 -0700
-Subject: [PATCH 4/5] Define missing features to cater for musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemd/sd-adapt/nm-sd-adapt.h | 2 +-
- src/systemd/src/basic/parse-util.c | 5 ++++-
- src/systemd/src/basic/stdio-util.h | 2 ++
- src/systemd/src/basic/util.h       | 5 +++++
- src/systemd/src/systemd/sd-event.h | 4 ----
- 5 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/src/systemd/sd-adapt/nm-sd-adapt.h b/src/systemd/sd-adapt/nm-sd-adapt.h
-index cf27c1a..72c1b89 100644
---- a/src/systemd/sd-adapt/nm-sd-adapt.h
-+++ b/src/systemd/sd-adapt/nm-sd-adapt.h
-@@ -119,7 +119,7 @@ G_STMT_START { \
- #  ifdef HAVE___SECURE_GETENV
- #    define secure_getenv __secure_getenv
- #  else
--#    error neither secure_getenv nor __secure_getenv is available
-+#    define secure_getenv getenv
- #  endif
- #endif
- 
-diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c
-index 2738663..9c21e5a 100644
---- a/src/systemd/src/basic/parse-util.c
-+++ b/src/systemd/src/basic/parse-util.c
-@@ -25,8 +25,11 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifdef __GLIBC__
- #include <xlocale.h>
--
-+#else
-+#include <locale.h>
-+#endif
- #include "alloc-util.h"
- #include "extract-word.h"
- #include "macro.h"
-diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h
-index bd1144b..c92e935 100644
---- a/src/systemd/src/basic/stdio-util.h
-+++ b/src/systemd/src/basic/stdio-util.h
-@@ -19,7 +19,9 @@
-   along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
- 
-+#ifdef __GLIBC__
- #include <printf.h>
-+#endif
- #include <stdarg.h>
- #include <stdio.h>
- #include <sys/types.h>
-diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h
-index bb2fc31..fe074a5 100644
---- a/src/systemd/src/basic/util.h
-+++ b/src/systemd/src/basic/util.h
-@@ -46,6 +46,11 @@
- #include "missing.h"
- #include "time-util.h"
- 
-+#if !defined(__GLIBC__)
-+typedef int (*__compar_fn_t) (const void*, const void*);
-+typedef __compar_fn_t comparison_fn_t;
-+#endif
-+
- size_t page_size(void) _pure_;
- #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
- 
-diff --git a/src/systemd/src/systemd/sd-event.h b/src/systemd/src/systemd/sd-event.h
-index cc26b7d..c7e0004 100644
---- a/src/systemd/src/systemd/sd-event.h
-+++ b/src/systemd/src/systemd/sd-event.h
-@@ -69,11 +69,7 @@ typedef int (*sd_event_handler_t)(sd_event_source *s, void *userdata);
- typedef int (*sd_event_io_handler_t)(sd_event_source *s, int fd, uint32_t revents, void *userdata);
- typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata);
- typedef int (*sd_event_signal_handler_t)(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata);
--#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
- typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata);
--#else
--typedef void* sd_event_child_handler_t;
--#endif
- 
- int sd_event_default(sd_event **e);
- 
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
deleted file mode 100644
index f4a04c7..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9e9e5814456ec23b9fc669d342bf9d8f7ee49fc2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 31 Mar 2017 16:48:00 -0700
-Subject: [PATCH 5/5] sd-lldp.h: Remove net/ethernet.h seems to be over
- specified
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemd/src/systemd/sd-lldp.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: NetworkManager-1.4.2/src/systemd/src/systemd/sd-lldp.h
-===================================================================
---- NetworkManager-1.4.2.orig/src/systemd/src/systemd/sd-lldp.h
-+++ NetworkManager-1.4.2/src/systemd/src/systemd/sd-lldp.h
-@@ -22,7 +22,7 @@
- ***/
- 
- #include <inttypes.h>
--#include <net/ethernet.h>
-+//#include <net/ethernet.h>
- #include <sys/types.h>
- 
- #include "sd-event.h"
-Index: NetworkManager-1.4.2/src/systemd/src/libsystemd-network/sd-lldp.c
-===================================================================
---- NetworkManager-1.4.2.orig/src/systemd/src/libsystemd-network/sd-lldp.c
-+++ NetworkManager-1.4.2/src/systemd/src/libsystemd-network/sd-lldp.c
-@@ -21,6 +21,7 @@
- #include "nm-sd-adapt.h"
- 
- #include <arpa/inet.h>
-+#include <net/ethernet.h>
- 
- #include "sd-lldp.h"
- 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch
new file mode 100644
index 0000000..9d208e1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch
@@ -0,0 +1,53 @@
+From e92de7409a3e107f90d108a9c5d49bd0418296dd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 17:54:10 +0100
+Subject: [PATCH 1/4] Usual fix for musl libc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/basic/stdio-util.h | 2 ++
+ src/systemd/src/basic/util.h       | 5 +++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h
+index bd1144b..9eafacb 100644
+--- a/src/systemd/src/basic/stdio-util.h
++++ b/src/systemd/src/basic/stdio-util.h
+@@ -19,7 +19,9 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#if defined(__GLIBC__)
+ #include <printf.h>
++#endif
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h
+index b31dfd1..9b7032c 100644
+--- a/src/systemd/src/basic/util.h
++++ b/src/systemd/src/basic/util.h
+@@ -46,6 +46,11 @@
+ #include "missing.h"
+ #include "time-util.h"
+ 
++#if !defined(__GLIBC__)
++typedef int (*__compar_fn_t) (const void*, const void*);
++typedef __compar_fn_t comparison_fn_t;
++#endif
++
+ size_t page_size(void) _pure_;
+ #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
+ 
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch
new file mode 100644
index 0000000..548cccb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch
@@ -0,0 +1,35 @@
+From 57239fda56b68a8f3e413f7b6af5290ba0d86636 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 18:18:06 +0100
+Subject: [PATCH 2/4] musl: dlopen is included so LD_LIBS="" instead of
+ LD_LIBS="none required"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 487a266..96ae4f7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -305,6 +305,7 @@ dnl
+ dnl Checks for libdl - on certain platforms its part of libc
+ dnl
+ AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
++AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""])
+ AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")
+ 
+ PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch
new file mode 100644
index 0000000..5dd17b6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch
@@ -0,0 +1,72 @@
+From 714b4731a238653e9c7d885c0dee10677b0a4df3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 18:24:07 +0100
+Subject: [PATCH 3/4] musl: network support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ libnm-core/nm-utils.h               | 4 ++++
+ src/platform/wifi/wifi-utils.h      | 4 ++++
+ src/systemd/src/basic/socket-util.h | 5 +++++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
+index df9284b..2bcf4b8 100644
+--- a/libnm-core/nm-utils.h
++++ b/libnm-core/nm-utils.h
+@@ -30,7 +30,11 @@
+ #include <netinet/in.h>
+ 
+ /* For ETH_ALEN and INFINIBAND_ALEN */
++#if defined(__GLIBC__)
+ #include <linux/if_ether.h>
++#else
++#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
++#endif
+ #include <linux/if_infiniband.h>
+ 
+ #include "nm-core-enum-types.h"
+diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h
+index 705717b..da3edc4 100644
+--- a/src/platform/wifi/wifi-utils.h
++++ b/src/platform/wifi/wifi-utils.h
+@@ -22,7 +22,11 @@
+ #ifndef __WIFI_UTILS_H__
+ #define __WIFI_UTILS_H__
+ 
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#else /* musl libc */
++#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
++#endif
+ 
+ #include "nm-dbus-interface.h"
+ 
+diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h
+index d7e2d85..d109c84 100644
+--- a/src/systemd/src/basic/socket-util.h
++++ b/src/systemd/src/basic/socket-util.h
+@@ -29,6 +29,11 @@
+ #include <linux/netlink.h>
+ #include <linux/if_infiniband.h>
+ #include <linux/if_packet.h>
++#if !defined(__GLIBC__)
++/* SIOCGSTAMPNS from linux/asm-generic.h
++ * for src/systemd/src/libsystemd-network/sd-lldp.c */
++#include <linux/sockios.h>
++#endif
+ 
+ #include "macro.h"
+ #include "missing.h"
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
new file mode 100644
index 0000000..fc55ce8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
@@ -0,0 +1,62 @@
+From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 22 Mar 2018 18:29:00 +0100
+Subject: [PATCH 4/4] musl: process-util
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Stolen from [1] and prettyfied slightly
+
+[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/basic/process-util.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/systemd/src/basic/process-util.c b/src/systemd/src/basic/process-util.c
+index 272030d..485f1db 100644
+--- a/src/systemd/src/basic/process-util.c
++++ b/src/systemd/src/basic/process-util.c
+@@ -36,6 +36,9 @@
+ #include <sys/wait.h>
+ #include <syslog.h>
+ #include <unistd.h>
++#ifndef __GLIBC__
++#include <pthread.h>
++#endif
+ #if 0 /* NM_IGNORED */
+ #if HAVE_VALGRIND_VALGRIND_H
+ #include <valgrind/valgrind.h>
+@@ -1015,11 +1018,13 @@ static void reset_cached_pid(void) {
+         cached_pid = CACHED_PID_UNSET;
+ }
+ 
++#ifdef __GLIBC__
+ /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
+  * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
+  * libpthread, as it is part of glibc anyway. */
+ extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
+ extern void* __dso_handle __attribute__ ((__weak__));
++#endif
+ 
+ pid_t getpid_cached(void) {
+         pid_t current_value;
+@@ -1042,7 +1047,11 @@ pid_t getpid_cached(void) {
+ 
+                 new_pid = getpid();
+ 
++#ifdef __GLIBC__
+                 if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) {
++#else
++                if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) {
++#endif
+                         /* OOM? Let's try again later */
+                         cached_pid = CACHED_PID_UNSET;
+                         return new_pid;
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch
new file mode 100644
index 0000000..752fe4f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch
@@ -0,0 +1,77 @@
+From b3b4fe35018c98ad176719b2d9ffb867974fc7c3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 16 Apr 2018 14:45:44 +0200
+Subject: [PATCH] musl: avoid further conflicts by including net/ethernet.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/systemd/sd-dhcp-client.h  | 2 ++
+ src/systemd/src/systemd/sd-dhcp-lease.h   | 2 ++
+ src/systemd/src/systemd/sd-dhcp6-client.h | 2 ++
+ src/systemd/src/systemd/sd-ipv4ll.h       | 2 ++
+ 4 files changed, 8 insertions(+)
+
+diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h
+index 5e46d8d..18a613f 100644
+--- a/src/systemd/src/systemd/sd-dhcp-client.h
++++ b/src/systemd/src/systemd/sd-dhcp-client.h
+@@ -21,7 +21,9 @@
+ ***/
+ 
+ #include <inttypes.h>
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <netinet/in.h>
+ #include <sys/types.h>
+ 
+diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h
+index 7ab99cc..85acdf2 100644
+--- a/src/systemd/src/systemd/sd-dhcp-lease.h
++++ b/src/systemd/src/systemd/sd-dhcp-lease.h
+@@ -22,7 +22,9 @@
+ ***/
+ 
+ #include <inttypes.h>
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <netinet/in.h>
+ #include <sys/types.h>
+ 
+diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h
+index 7819f0d..35f30ee 100644
+--- a/src/systemd/src/systemd/sd-dhcp6-client.h
++++ b/src/systemd/src/systemd/sd-dhcp6-client.h
+@@ -21,7 +21,9 @@
+ ***/
+ 
+ #include <inttypes.h>
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <sys/types.h>
+ 
+ #include "sd-dhcp6-lease.h"
+diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h
+index 5ba9208..c90eca6 100644
+--- a/src/systemd/src/systemd/sd-ipv4ll.h
++++ b/src/systemd/src/systemd/sd-ipv4ll.h
+@@ -20,7 +20,9 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#if defined(__GLIBC__)
+ #include <net/ethernet.h>
++#endif
+ #include <netinet/in.h>
+ 
+ #include "sd-event.h"
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch
new file mode 100644
index 0000000..8ed7ee6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch
@@ -0,0 +1,47 @@
+From 6db6596e450062601d18b2ae812a4a58d2e03a53 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 16 Apr 2018 15:07:20 +0200
+Subject: [PATCH] Add a strndupa replacement for musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ src/systemd/src/basic/in-addr-util.c | 1 +
+ src/systemd/src/basic/string-util.h  | 5 +++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/systemd/src/basic/in-addr-util.c b/src/systemd/src/basic/in-addr-util.c
+index 2a02d90..a57c360 100644
+--- a/src/systemd/src/basic/in-addr-util.c
++++ b/src/systemd/src/basic/in-addr-util.c
+@@ -30,6 +30,7 @@
+ #include "in-addr-util.h"
+ #include "macro.h"
+ #include "parse-util.h"
++#include "string-util.h"
+ #include "util.h"
+ 
+ bool in4_addr_is_null(const struct in_addr *a) {
+diff --git a/src/systemd/src/basic/string-util.h b/src/systemd/src/basic/string-util.h
+index 4c94b18..a6dc446 100644
+--- a/src/systemd/src/basic/string-util.h
++++ b/src/systemd/src/basic/string-util.h
+@@ -44,6 +44,11 @@
+ #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)
+ #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0)
+ 
++/* musl does not know strndupa */
++#if !defined(__GLIBC__)
++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
++#endif
++
+ int strcmp_ptr(const char *a, const char *b) _pure_;
+ 
+ static inline bool streq_ptr(const char *a, const char *b) {
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb
new file mode 100644
index 0000000..09c5dbd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb
@@ -0,0 +1,143 @@
+SUMMARY = "NetworkManager"
+HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
+SECTION = "net/misc"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \
+                    file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \
+                    file://docs/api/html/license.html;md5=77b9e362690c149da196aefe7712db30 \
+"
+
+DEPENDS = " \
+    intltool-native \
+    libxslt-native \
+    libnl \
+    dbus \
+    dbus-glib \
+    dbus-glib-native \
+    libgudev \
+    util-linux \
+    libndp \
+    libnewt \
+    polkit \
+    jansson \
+    curl \
+"
+
+inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection gtk-doc
+
+SRC_URI = " \
+    ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
+    file://0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \
+    file://0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
+    file://0003-Do-not-create-settings-settings-property-documentati.patch \
+    file://musl/0001-musl-basic.patch \
+    file://musl/0002-musl-dlopen-configure-ac.patch \
+    file://musl/0003-musl-network-support.patch \
+    file://musl/0004-musl-process-util.patch \
+    file://musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch \
+    file://musl/0006-Add-a-strndupa-replacement-for-musl.patch \
+"
+SRC_URI[md5sum] = "de3c7147a693da6f80eb22f126086a14"
+SRC_URI[sha256sum] = "6af0b1e856a3725f88791f55c4fbb04105dc0b20dbf182aaec8aad16481fac76"
+
+S = "${WORKDIR}/NetworkManager-${PV}"
+
+EXTRA_OECONF = " \
+    --disable-ifcfg-rh \
+    --disable-ifnet \
+    --disable-ifcfg-suse \
+    --disable-more-warnings \
+    --with-iptables=${sbindir}/iptables \
+    --with-tests \
+    --with-nmtui=yes \
+"
+
+# gobject-introspection related
+GI_DATA_ENABLED_libc-musl = "False"
+
+# stolen from https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/template
+CFLAGS_libc-musl_append = " \
+    -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv \
+    -D__USE_POSIX199309 -DRTLD_DEEPBIND=0 \
+"
+
+do_compile_prepend() {
+    export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs"
+}
+
+PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \
+"
+PACKAGECONFIG[systemd] = " \
+    --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \
+    --without-systemdsystemunitdir, \
+    polkit \
+"
+PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
+# consolekit is not picked by shlibs, so add it to RDEPENDS too
+PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
+PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
+PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
+# Use full featured dhcp client instead of internal one
+PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"
+PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
+PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
+PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
+PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,wireless-tools,wpa-supplicant wireless-tools"
+PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
+PACKAGECONFIG[netconfig] = "--with-netconfig=yes,--with-netconfig=no"
+PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
+
+PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \
+  ${PN}-nmtui ${PN}-nmtui-doc \
+  ${PN}-adsl \
+"
+
+FILES_libnmutil += "${libdir}/libnm-util.so.*"
+FILES_libnmglib += "${libdir}/libnm-glib.so.*"
+FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*"
+
+FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so"
+
+FILES_${PN} += " \
+    ${libexecdir} \
+    ${libdir}/pppd/*/nm-pppd-plugin.so \
+    ${libdir}/NetworkManager/*.so \
+    ${nonarch_libdir}/NetworkManager/VPN \
+    ${nonarch_libdir}/NetworkManager/conf.d \
+    ${datadir}/polkit-1 \
+    ${datadir}/dbus-1 \
+    ${base_libdir}/udev/* \
+    ${systemd_unitdir}/system \
+"
+
+RRECOMMENDS_${PN} += "iptables \
+    ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
+"
+RCONFLICTS_${PN} = "connman"
+
+FILES_${PN}-dev += " \
+    ${datadir}/NetworkManager/gdb-cmd \
+    ${libdir}/pppd/*/*.la \
+    ${libdir}/NetworkManager/*.la \
+"
+
+FILES_${PN}-nmtui = " \
+    ${bindir}/nmtui \
+    ${bindir}/nmtui-edit \
+    ${bindir}/nmtui-connect \
+    ${bindir}/nmtui-hostname \
+"
+
+FILES_${PN}-nmtui-doc = " \
+    ${mandir}/man1/nmtui* \
+"
+
+SYSTEMD_SERVICE_${PN} = "NetworkManager.service NetworkManager-dispatcher.service"
+
+do_install_append() {
+    rm -rf ${D}/run ${D}${localstatedir}/run
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb
deleted file mode 100644
index d5f456f..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb
+++ /dev/null
@@ -1,136 +0,0 @@
-SUMMARY = "NetworkManager"
-HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
-SECTION = "net/misc"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \
-                    file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \
-                    file://docs/api/html/license.html;md5=8eb8e72bab097b9d11763002cb003697 \
-"
-
-DEPENDS = " \
-    intltool-native \
-    libnl \
-    dbus \
-    dbus-glib \
-    dbus-glib-native \
-    libgudev \
-    util-linux \
-    libndp \
-    libnewt \
-    polkit \
-    jansson \
-"
-
-inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection
-
-GI_DATA_ENABLED_libc-musl = "False"
-
-SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
-           file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
-           file://0002-Fix-nm-version-macro-includes.patch \
-           file://0001-adjust-net-headers-for-musl-compatibility.patch \
-           file://0002-socket-util.h-Include-linux-sockios.h-on-musl.patch \
-           file://0003-Define-ETH_ALEN.patch \
-           file://0004-Define-missing-features-to-cater-for-musl.patch \
-           file://0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \
-           file://0001-check-for-strndupa-before-using-it.patch \
-           file://0001-dns-resolved-add-systemd-resolved-backend.patch \
-           file://0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch \
-           file://0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch \
-           file://0002-user-format-string-in-g_dbus_message_new_method_erro.patch \
-           "
-SRC_URI[md5sum] = "63f1e0d6d7e9099499d062c84c927a75"
-SRC_URI[sha256sum] = "829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309"
-
-S = "${WORKDIR}/NetworkManager-${PV}"
-
-EXTRA_OECONF = " \
-    --disable-ifcfg-rh \
-    --disable-ifnet \
-    --disable-ifcfg-suse \
-    --disable-more-warnings \
-    --with-iptables=${sbindir}/iptables \
-    --with-tests \
-    --with-nmtui=yes \
-"
-
-do_compile_prepend() {
-        export GIR_EXTRA_LIBS_PATH="${B}/libnm-util/.libs"
-}
-
-PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \
-       bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \
-"
-PACKAGECONFIG[systemd] = " \
-    --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \
-    --without-systemdsystemunitdir, \
-    polkit \
-"
-PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
-# consolekit is not picked by shlibs, so add it to RDEPENDS too
-PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
-PACKAGECONFIG[concheck] = "--with-libsoup=yes,--with-libsoup=no,libsoup-2.4"
-PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
-PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
-# Use full featured dhcp client instead of internal one
-PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"
-PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
-PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
-PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
-PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,wireless-tools,wpa-supplicant wireless-tools"
-PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
-PACKAGECONFIG[netconfig] = "--with-netconfig=yes,--with-netconfig=no"
-PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
-
-PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \
-  ${PN}-nmtui ${PN}-nmtui-doc \
-  ${PN}-adsl \
-"
-
-FILES_libnmutil += "${libdir}/libnm-util.so.*"
-FILES_libnmglib += "${libdir}/libnm-glib.so.*"
-FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*"
-
-FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so"
-
-FILES_${PN} += " \
-    ${libexecdir} \
-    ${libdir}/pppd/*/nm-pppd-plugin.so \
-    ${libdir}/NetworkManager/*.so \
-    ${datadir}/polkit-1 \
-    ${datadir}/dbus-1 \
-    ${base_libdir}/udev/* \
-    ${systemd_unitdir}/system \
-"
-
-RRECOMMENDS_${PN} += "iptables \
-    ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
-"
-RCONFLICTS_${PN} = "connman"
-
-FILES_${PN}-dev += " \
-    ${datadir}/NetworkManager/gdb-cmd \
-    ${libdir}/pppd/*/*.la \
-    ${libdir}/NetworkManager/*.la \
-"
-
-FILES_${PN}-nmtui = " \
-    ${bindir}/nmtui \
-    ${bindir}/nmtui-edit \
-    ${bindir}/nmtui-connect \
-    ${bindir}/nmtui-hostname \
-"
-
-FILES_${PN}-nmtui-doc = " \
-    ${mandir}/man1/nmtui* \
-"
-
-SYSTEMD_SERVICE_${PN} = "NetworkManager.service NetworkManager-dispatcher.service"
-
-do_install_append() {
-    rm -rf ${D}/run ${D}${localstatedir}/run
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch
index 0ab3436..0e89a9b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch
@@ -13,16 +13,17 @@
 therefore get killed.
 
 Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
 ---
  packaging/systemd/nmb.service | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
-index 992c0cd..555c9ab 100644
+index 71c93d6..f3d2fc2 100644
 --- a/packaging/systemd/nmb.service
 +++ b/packaging/systemd/nmb.service
 @@ -10,6 +10,7 @@ EnvironmentFile=-/etc/sysconfig/samba
- ExecStart=/usr/sbin/nmbd $NMBDOPTIONS
+ ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS
  ExecReload=/usr/bin/kill -HUP $MAINPID
  LimitCORE=infinity
 +TimeoutStartSec=0
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch
index c37cfcd..8ca7a52 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch
@@ -1,13 +1,24 @@
-Don't check xsltproc manpages
+From 2214c2d1e455a38c891d17e421b438e3f7c495d8 Mon Sep 17 00:00:00 2001
+From: Bian Naimeng <biannm@cn.fujitsu.com>
+Date: Mon, 18 Apr 2016 17:00:53 -0400
+Subject: [PATCH] Don't check xsltproc manpages
 
+Upstream-Status: Pending
+ 
 Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
 
-Index: samba-4.4.2/lib/ldb/wscript
-===================================================================
---- samba-4.4.2.orig/lib/ldb/wscript
-+++ samba-4.4.2/lib/ldb/wscript
-@@ -65,7 +65,7 @@ def configure(conf):
-                 conf.define('USING_SYSTEM_LDB', 1)
+---
+ lib/ldb/wscript    | 2 +-
+ lib/talloc/wscript | 2 +-
+ lib/tdb/wscript    | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/ldb/wscript b/lib/ldb/wscript
+index 5ea5231..d94086b 100644
+--- a/lib/ldb/wscript
++++ b/lib/ldb/wscript
+@@ -98,7 +98,7 @@ def configure(conf):
+         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2]))
  
      if conf.env.standalone_ldb:
 -        conf.CHECK_XSLTPROC_MANPAGES()
@@ -15,24 +26,24 @@
  
          # we need this for the ldap backend
          if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
-Index: samba-4.4.2/lib/talloc/wscript
-===================================================================
---- samba-4.4.2.orig/lib/talloc/wscript
-+++ samba-4.4.2/lib/talloc/wscript
-@@ -56,7 +56,7 @@ def configure(conf):
-     if conf.env.standalone_talloc:
-         conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
+diff --git a/lib/talloc/wscript b/lib/talloc/wscript
+index df7e6be..b3305cf 100644
+--- a/lib/talloc/wscript
++++ b/lib/talloc/wscript
+@@ -49,7 +49,7 @@ def configure(conf):
+         conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+         conf.env.TALLOC_VERSION = VERSION
  
 -    conf.CHECK_XSLTPROC_MANPAGES()
 +    #conf.CHECK_XSLTPROC_MANPAGES()
  
-     if not conf.env.disable_python:
-         # also disable if we don't have the python libs installed
-Index: samba-4.4.2/lib/tdb/wscript
-===================================================================
---- samba-4.4.2.orig/lib/tdb/wscript
-+++ samba-4.4.2/lib/tdb/wscript
-@@ -92,7 +92,7 @@ def configure(conf):
+     conf.CHECK_HEADERS('sys/auxv.h')
+     conf.CHECK_FUNCS('getauxval')
+diff --git a/lib/tdb/wscript b/lib/tdb/wscript
+index 4782550..6bb3fa1 100644
+--- a/lib/tdb/wscript
++++ b/lib/tdb/wscript
+@@ -89,7 +89,7 @@ def configure(conf):
          not conf.env.disable_tdb_mutex_locking):
          conf.define('USE_TDB_MUTEX_LOCKING', 1)
  
@@ -41,3 +52,6 @@
  
      if not conf.env.disable_python:
          # also disable if we don't have the python libs installed
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
index 025ac27..6a7f8fa 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
@@ -6,6 +6,7 @@
 Upstream-Status: Pending
 
 Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
 ---
  lib/replace/wscript | 4 +++-
  source3/wscript     | 5 ++++-
@@ -16,9 +17,9 @@
 index f0040b1..aca73af 100644
 --- a/lib/replace/wscript
 +++ b/lib/replace/wscript
-@@ -101,7 +101,9 @@ struct foo bar = { .y = 'X', .x = 1 };
- 
-     conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+@@ -101,7 +101,9 @@ def configure(conf):
+     conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
+     conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
  
 -    conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
 +    if not Options.options.disable_valgrind:
@@ -26,12 +27,12 @@
 +
      conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
      conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
-     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h malloc.h')
+     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
 diff --git a/source3/wscript b/source3/wscript
 index bac3dd5..a5c51ea 100644
 --- a/source3/wscript
 +++ b/source3/wscript
-@@ -1016,7 +1016,10 @@ syscall(SYS_setgroups32, 0, NULL);
+@@ -1070,7 +1070,10 @@ syscall(SYS_setgroups32, 0, NULL);
              Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient")
          else:
              conf.DEFINE('WITH_DNS_UPDATES', 1)
@@ -44,12 +45,12 @@
          if conf.CONFIG_SET('HAVE_VALGRIND_H') or conf.CONFIG_SET('HAVE_VALGRIND_VALGRIND_H'):
              conf.DEFINE('VALGRIND', '1')
 diff --git a/wscript b/wscript
-index 7679c0f..681ac17 100644
+index 542a60c..22e6116 100644
 --- a/wscript
 +++ b/wscript
-@@ -72,6 +72,10 @@ def set_options(opt):
-                    help=("Disable systemd integration"),
-                    action='store_false', dest='enable_systemd')
+@@ -86,6 +86,10 @@ def set_options(opt):
+                   help=("Disable RELRO builds"),
+                   action="store_false", dest='enable_relro')
  
 +    opt.add_option('--without-valgrind',
 +                   help=("Disable use of the valgrind headers"),
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
new file mode 100644
index 0000000..0c7592f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
@@ -0,0 +1,19 @@
+samba: build dnsserver_common code
+
+Just 'install' does not seem to do it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/source4/dns_server/wscript_build
++++ b/source4/dns_server/wscript_build
+@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common',
+         source='dnsserver_common.c',
+         deps='samba-util samba-errors ldbsamba clidns',
+         private_library=True,
+-        install=bld.AD_DC_BUILD_IS_ENABLED()
++        enabled=bld.AD_DC_BUILD_IS_ENABLED()
+         )
+ 
+ bld.SAMBA_MODULE('service_dns',
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
new file mode 100644
index 0000000..5ae8c59
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
@@ -0,0 +1,25 @@
+samba: defeat iconv test
+
+A test was added when configuring samba which requires target code
+to be executed.  In general, this will not work, so we eliminate it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/lib/util/charset/wscript_configure
++++ b/lib/util/charset/wscript_configure
+@@ -17,6 +17,8 @@ if (conf.CHECK_FUNCS_IN('iconv_open', 'i
+     
+     conf.DEFINE('HAVE_NATIVE_ICONV', 1)
+ 
++"""
++[added for 4.7.0, but breaks cross-compilation]
+ conf.CHECK_CODE('''
+                 uint8_t inbuf[2] = { 0x30, 0xdf };
+                 uint8_t outbuf[4] = { 0 };
+@@ -36,3 +38,4 @@ conf.CHECK_CODE('''
+                 msg='Checking errno of iconv for illegal multibyte sequence',
+                 lib='iconv',
+                 headers='errno.h iconv.h')
++"""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.2.7-pam.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.2.7-pam.patch
deleted file mode 100644
index 6b9ade9..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-4.2.7-pam.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Lifted from gentoo and ported to 4.4.5
-
-http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-
-Index: samba-4.4.5/source3/wscript
-===================================================================
---- samba-4.4.5.orig/source3/wscript
-+++ samba-4.4.5/source3/wscript
-@@ -873,7 +873,7 @@ msg.msg_accrightslen = sizeof(fd);
-         if conf.env.with_iconv:
-             conf.DEFINE('HAVE_ICONV', 1)
- 
--    if Options.options.with_pam:
-+    if Options.options.with_pam != False:
-         use_pam=True
-         conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
-         if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
-@@ -945,6 +945,15 @@ int i; i = PAM_RADIO_TYPE;
-         if use_pam:
-             conf.DEFINE('WITH_PAM', 1)
-             conf.DEFINE('WITH_PAM_MODULES', 1)
-+    else:
-+        Logs.warn("PAM disabled")
-+        use_pam=False
-+        conf.undefine('WITH_PAM')
-+        conf.undefine('WITH_PAM_MODULES')
-+        conf.undefine('HAVE_SECURITY_PAM_APPL_H')
-+        conf.undefine('PAM_RHOST')
-+        conf.undefine('PAM_TTY')
-+        conf.undefine('HAVE_PAM_PAM_APPL_H')
- 
-     seteuid = False
- 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
new file mode 100644
index 0000000..0cbacb6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
@@ -0,0 +1,37 @@
+Lifted from gentoo and ported to 4.4.5
+
+http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: samba-4.7.0/source3/wscript
+===================================================================
+--- samba-4.7.0.orig/source3/wscript
++++ samba-4.7.0/source3/wscript
+@@ -875,7 +875,7 @@ msg.msg_accrightslen = sizeof(fd);
+         if conf.env.with_iconv:
+             conf.DEFINE('HAVE_ICONV', 1)
+ 
+-    if Options.options.with_pam:
++    if Options.options.with_pam != False:
+         use_pam=True
+         conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
+         if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
+@@ -952,6 +952,17 @@ int i; i = PAM_RADIO_TYPE;
+                        "or headers not found. Use --without-pam to disable "
+                        "PAM support.");
+ 
++    else:
++        Logs.warn("PAM disabled")
++        use_pam=False
++        conf.undefine('WITH_PAM')
++        conf.undefine('WITH_PAM_MODULES')
++        conf.undefine('HAVE_SECURITY_PAM_APPL_H')
++        conf.undefine('PAM_RHOST')
++        conf.undefine('PAM_TTY')
++        conf.undefine('HAVE_PAM_PAM_APPL_H')
++
++
+     seteuid = False
+ 
+ #
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
new file mode 100644
index 0000000..77c8b36
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
@@ -0,0 +1,19 @@
+samba: correct log files location
+
+We use /var/log/samba.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/packaging/RHEL/setup/smb.conf
++++ b/packaging/RHEL/setup/smb.conf
+@@ -63,7 +63,7 @@
+ 
+ # this tells Samba to use a separate log file for each machine
+ # that connects
+-   log file = /usr/local/samba/var/log.%m
++   log file = /var/log/samba/log.%m
+ 
+ # Put a capping on the size of the log files (in Kb).
+    max log size = 50
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb
deleted file mode 100644
index 2b227c9..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb
+++ /dev/null
@@ -1,256 +0,0 @@
-HOMEPAGE = "https://www.samba.org/"
-SECTION = "console/network"
-
-LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
-                    file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 "
-
-SAMBA_MIRROR = "http://samba.org/samba/ftp"
-MIRRORS += "\
-${SAMBA_MIRROR}    http://mirror.internode.on.net/pub/samba \n \
-${SAMBA_MIRROR}    http://www.mirrorservice.org/sites/ftp.samba.org \n \
-"
-
-SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
-           file://16-do-not-check-xsltproc-manpages.patch \
-           file://20-do-not-import-target-module-while-cross-compile.patch \
-           file://21-add-config-option-without-valgrind.patch \
-           file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \
-           file://0006-avoid-using-colon-in-the-checking-msg.patch \
-           file://netdb_defines.patch \
-           file://glibc_only.patch \
-           file://volatiles.03_samba \
-          "
-SRC_URI_append_libc-musl = " \
-           file://samba-4.2.7-pam.patch \
-           file://samba-4.3.9-remove-getpwent_r.patch \
-          "
-
-SRC_URI[md5sum] = "c6ee5c766016d59908c8fb672fbbd445"
-SRC_URI[sha256sum] = "9ef24393de08390f236cabccd6a420b5cea304e959cbf1a99ff317325db3ddfa"
-
-inherit systemd waf-samba cpan-base perlnative update-rc.d
-# remove default added RDEPENDS on perl
-RDEPENDS_${PN}_remove = "perl"
-
-DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 libbsd libaio libpam"
-DEPENDS_append_libc-musl = " libtirpc"
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
-LDFLAGS_append_libc-musl = " -ltirpc"
-
-LSB = ""
-LSB_linuxstdbase = "lsb"
-
-INITSCRIPT_NAME = "samba"
-INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
-
-SYSTEMD_PACKAGES = "${PN}-base winbind"
-SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service"
-SYSTEMD_SERVICE_winbind = "winbind.service"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
-                   acl cups ldap \
-"
-
-RDEPENDS_${PN}-base += "${LSB}"
-RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt"
-
-PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
-PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
-PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[sasl] = ",,cyrus-sasl"
-PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
-PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
-PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
-PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
-PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust"
-PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive"
-
-
-SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
-SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
-SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
-SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
-
-SAMBA4_LIBS="heimdal,!zlib,!popt,!talloc,!pytalloc,!pytalloc-util,!tevent,!pytevent,!tdb,!pytdb,!ldb,!pyldb"
-
-EXTRA_OECONF += "--enable-fhs \
-                 --with-piddir=/run \
-                 --with-sockets-dir=/run/samba \
-                 --with-modulesdir=${libdir}/samba \
-                 --with-lockdir=${localstatedir}/lib/samba \
-                 --with-cachedir=${localstatedir}/lib/samba \
-                 --disable-gnutls \
-                 --disable-rpath-install \
-                 --with-shared-modules=${SAMBA4_MODULES} \
-                 --bundled-libraries=${SAMBA4_LIBS} \
-                 --with-system-mitkrb5 \
-                 --without-ad-dc \
-                 ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
-                 --with-cluster-support \
-                 --with-profiling-data \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
-                 --with-pam --with-pammodulesdir=${base_libdir}/security \
-                "
-
-LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
-
-do_install_append() {
-    for section in 1 5 7; do
-        install -d ${D}${mandir}/man$section
-        install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
-    done
-    for section in 1 5 7 8; do
-        install -d ${D}${mandir}/man$section
-        install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
-    done
-
-    install -d ${D}${systemd_system_unitdir}
-    install -m 0644 packaging/systemd/*.service ${D}${systemd_system_unitdir}
-    sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \
-        -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \
-        -i ${D}${systemd_system_unitdir}/*.service
-
-    install -d ${D}${sysconfdir}/tmpfiles.d
-    install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
-    echo "d ${localstatedir}/log/samba 0755 root root -" \
-        >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
-    if [ "${LSB}" = "lsb" ]; then
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d/samba
-    else
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
-        sed -e 's,/opt/samba/bin,${sbindir},g' \
-            -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
-            -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
-            -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
-            -e 's,/usr/bin,${base_bindir},g' \
-            -i ${D}${sysconfdir}/init.d/samba
-    fi
-
-    install -d ${D}${sysconfdir}/samba
-    echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
-    install -m644 packaging/LSB/smb.conf ${D}${sysconfdir}/samba/smb.conf
-    install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba
-
-    install -d ${D}${sysconfdir}/default
-    install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba
-
-    # install ctdb config file and test cases
-    install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes
-    # the items are from ctdb/tests/run_tests.sh
-    for d in onnode takeover tool eventscripts cunit simple complex; do
-        testdir=${D}${datadir}/ctdb-tests/$d
-        install -d $testdir
-        cp ${S}/ctdb/tests/$d/*.sh $testdir
-        cp -r ${S}/ctdb/tests/$d/scripts ${S}/ctdb/tests/$d/stubs $testdir || true
-    done
-
-    # fix file-rdeps qa warning
-    if [ -f ${D}${bindir}/onnode ]; then
-        sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
-    fi
-
-    chmod 0750 ${D}${sysconfdir}/sudoers.d
-    rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
-}
-
-PACKAGES =+ "${PN}-python ${PN}-pidl \
-             ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
-             winbind \
-             ${PN}-common ${PN}-base ${PN}-ctdb-tests \
-             smbclient"
-
-python samba_populate_packages() {
-    def module_hook(file, pkg, pattern, format, basename):
-        pn = d.getVar('PN', True)
-        d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg)
-
-    mlprefix = d.getVar('MLPREFIX', True) or ''
-    pam_libdir = d.expand('${base_libdir}/security')
-    pam_pkgname = mlprefix + 'pam-plugin%s'
-    do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True)
-
-    libdir = d.getVar('libdir', True)
-    do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True)
-    pkglibdir = '%s/samba' % libdir
-    do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True)
-    moduledir = '%s/samba/auth' % libdir
-    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True)
-    moduledir = '%s/samba/pdb' % libdir
-    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True)
-}
-
-PACKAGESPLITFUNCS_prepend = "samba_populate_packages "
-
-RDEPENDS_${PN} += "${PN}-base ${PN}-python ${PN}-dsdb-modules"
-RDEPENDS_${PN}-python += "pytalloc python-tdb"
-
-FILES_${PN}-base = "${sbindir}/nmbd \
-                    ${sbindir}/smbd \
-                    ${sysconfdir}/init.d \
-                    ${localstatedir}/lib/samba \
-                    ${localstatedir}/nmbd \
-                    ${localstatedir}/spool/samba \
-                    ${systemd_system_unitdir}/nmb.service \
-                    ${systemd_system_unitdir}/samba.service \
-                    ${systemd_system_unitdir}/smb.service"
-
-FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
-                          ${bindir}/ctdb_run_cluster_tests \
-                          ${sysconfdir}/ctdb/nodes \
-                          ${datadir}/ctdb-tests \
-                          ${datadir}/ctdb/tests \
-                         "
-
-FILES_${BPN}-common = "${sysconfdir}/default \
-                       ${sysconfdir}/samba \
-                       ${sysconfdir}/tmpfiles.d \
-"
-
-FILES_${PN} += "${libdir}/vfs/*.so \
-                ${libdir}/charset/*.so \
-                ${libdir}/*.dat \
-                ${libdir}/auth/*.so \
-"
-
-FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb"
-
-FILES_${PN}-testsuite = "${bindir}/gentest \
-                         ${bindir}/locktest \
-                         ${bindir}/masktest \
-                         ${bindir}/ndrdump \
-                         ${bindir}/smbtorture"
-
-FILES_registry-tools = "${bindir}/regdiff \
-                        ${bindir}/regpatch \
-                        ${bindir}/regshell \
-                        ${bindir}/regtree"
-
-FILES_winbind = "${sbindir}/winbindd \
-                 ${bindir}/wbinfo \
-                 ${bindir}/ntlm_auth \
-                 ${libdir}/samba/idmap \
-                 ${libdir}/samba/nss_info \
-                 ${libdir}/winbind_krb5_locator.so \
-                 ${sysconfdir}/init.d/winbind \
-                 ${systemd_system_unitdir}/winbind.service"
-
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
-
-FILES_smbclient = "${bindir}/cifsdd \
-                   ${bindir}/rpcclient \
-                   ${bindir}/smbcacls \
-                   ${bindir}/smbclient \
-                   ${bindir}/smbcquotas \
-                   ${bindir}/smbget \
-                   ${bindir}/smbspool \
-                   ${bindir}/smbtar \
-                   ${bindir}/smbtree \
-                   ${libdir}/samba/smbspool_krb5_wrapper"
-
-RDEPENDS_${PN}-pidl_append = " perl"
-FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb
new file mode 100644
index 0000000..a8517c5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb
@@ -0,0 +1,318 @@
+HOMEPAGE = "https://www.samba.org/"
+SECTION = "console/network"
+
+LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
+                    file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 "
+
+SAMBA_MIRROR = "http://samba.org/samba/ftp"
+MIRRORS += "\
+${SAMBA_MIRROR}    http://mirror.internode.on.net/pub/samba \n \
+${SAMBA_MIRROR}    http://www.mirrorservice.org/sites/ftp.samba.org \n \
+"
+
+SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
+           file://16-do-not-check-xsltproc-manpages.patch \
+           file://20-do-not-import-target-module-while-cross-compile.patch \
+           file://21-add-config-option-without-valgrind.patch \
+           file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \
+           file://0006-avoid-using-colon-in-the-checking-msg.patch \
+           file://netdb_defines.patch \
+           file://glibc_only.patch \
+           file://iconv-4.7.0.patch \
+           file://dnsserver-4.7.0.patch \
+           file://smb_conf-4.7.0.patch \
+           file://volatiles.03_samba \
+          "
+SRC_URI_append_libc-musl = " \
+           file://samba-pam.patch \
+           file://samba-4.3.9-remove-getpwent_r.patch \
+          "
+
+SRC_URI[md5sum] = "0253021a45c479cec1e135b004a0177a"
+SRC_URI[sha256sum] = "1eede30fc8ef6504e24602fb72b00baa0a7b73b59f16d25cb0771dc8c7c57d6e"
+
+inherit systemd waf-samba cpan-base perlnative update-rc.d
+# remove default added RDEPENDS on perl
+RDEPENDS_${PN}_remove = "perl"
+
+DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+DEPENDS_append_libc-musl = " libtirpc"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append_libc-musl = " -ltirpc"
+
+LSB = ""
+LSB_linuxstdbase = "lsb"
+
+INITSCRIPT_NAME = "samba"
+INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
+
+SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind"
+SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service"
+SYSTEMD_SERVICE_${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}"
+SYSTEMD_SERVICE_winbind = "winbind.service"
+
+# There are prerequisite settings to enable ad-dc, so disable the service by default.
+# Reference:
+# https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
+SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable"
+
+# Use krb5.  Build active domain controller.
+#
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
+                   acl ad-dc cups gnutls ldap mitkrb5 \
+"
+
+RDEPENDS_${PN}-base += "${LSB}"
+RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt"
+
+PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
+PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
+PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[sasl] = ",,cyrus-sasl"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
+PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
+PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
+PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
+PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust"
+PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive"
+
+# Building the AD (Active Directory) DC (Domain Controller) requires GnuTLS,
+# And ad-dc doesn't work with mitkrb5 for versions prior to 4.7.0 according to:
+# http://samba.2283325.n4.nabble.com/samba-4-6-6-Unknown-dependency-kdc-in-service-kdc-objlist-td4722096.html
+# So the working combination is:
+# 1) ad-dc: enable, gnutls: enable, mitkrb5: disable
+# 2) ad-dc: disable, gnutls: enable/disable, mitkrb5: enable
+#
+# We are now at 4.7.0, so take the above with a grain of salt. We do not need to know where
+# krb5kdc is unless ad-dc is enabled, but we tell configure anyhow.
+#
+PACKAGECONFIG[ad-dc] = ",--without-ad-dc,,"
+PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
+PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5,"
+
+SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
+SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
+SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
+SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
+
+# These libraries are supposed to replace others supplied by packages, but decorate the names of
+# .so files so there will not be a conflict.  This is not done consistantly, so be very careful
+# when adding to this list.
+#
+SAMBA4_LIBS="heimdal,cmocka,NONE"
+
+EXTRA_OECONF += "--enable-fhs \
+                 --with-piddir=/run \
+                 --with-sockets-dir=/run/samba \
+                 --with-modulesdir=${libdir}/samba \
+                 --with-lockdir=${localstatedir}/lib/samba \
+                 --with-cachedir=${localstatedir}/lib/samba \
+                 --disable-rpath-install \
+                 --with-shared-modules=${SAMBA4_MODULES} \
+                 --bundled-libraries=${SAMBA4_LIBS} \
+                 ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
+                 --with-cluster-support \
+                 --with-profiling-data \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
+                 --with-pam --with-pammodulesdir=${base_libdir}/security \
+                "
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+do_install_append() {
+    for section in 1 5 7; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
+    done
+    for section in 1 5 7 8; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
+    done
+
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 packaging/systemd/*.service ${D}${systemd_system_unitdir}
+    sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \
+        -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \
+        -i ${D}${systemd_system_unitdir}/*.service
+
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'yes', 'no', d)}" = "no" ]; then
+        rm -f ${D}${systemd_system_unitdir}/samba.service
+    fi
+
+    install -d ${D}${sysconfdir}/tmpfiles.d
+    install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
+    echo "d ${localstatedir}/log/samba 0755 root root -" \
+        >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
+    if [ "${LSB}" = "lsb" ]; then
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d/samba
+    else
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
+        sed -e 's,/opt/samba/bin,${sbindir},g' \
+            -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
+            -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
+            -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
+            -e 's,/usr/bin,${base_bindir},g' \
+            -i ${D}${sysconfdir}/init.d/samba
+    fi
+
+    install -d ${D}${sysconfdir}/samba
+    echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
+    install -m644 packaging/RHEL/setup/smb.conf ${D}${sysconfdir}/samba/smb.conf
+    install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba
+
+    install -d ${D}${sysconfdir}/default
+    install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba
+
+    # install ctdb config file and test cases
+    install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes
+    # the items are from ctdb/tests/run_tests.sh
+    for d in onnode takeover tool eventscripts cunit simple complex; do
+        testdir=${D}${datadir}/ctdb-tests/$d
+        install -d $testdir
+        cp ${S}/ctdb/tests/$d/*.sh $testdir
+        cp -r ${S}/ctdb/tests/$d/scripts ${S}/ctdb/tests/$d/stubs $testdir || true
+    done
+
+    # fix file-rdeps qa warning
+    if [ -f ${D}${bindir}/onnode ]; then
+        sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
+    fi
+
+    chmod 0750 ${D}${sysconfdir}/sudoers.d
+    rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
+}
+
+PACKAGES =+ "${PN}-python ${PN}-pidl \
+             ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
+             winbind \
+             ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \
+             smbclient ${PN}-client ${PN}-server ${PN}-test"
+
+python samba_populate_packages() {
+    def module_hook(file, pkg, pattern, format, basename):
+        pn = d.getVar('PN', True)
+        d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg)
+
+    mlprefix = d.getVar('MLPREFIX', True) or ''
+    pam_libdir = d.expand('${base_libdir}/security')
+    pam_pkgname = mlprefix + 'pam-plugin%s'
+    do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True)
+
+    libdir = d.getVar('libdir', True)
+    do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True)
+    pkglibdir = '%s/samba' % libdir
+    do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True)
+    moduledir = '%s/samba/auth' % libdir
+    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True)
+    moduledir = '%s/samba/pdb' % libdir
+    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True)
+}
+
+PACKAGESPLITFUNCS_prepend = "samba_populate_packages "
+
+RDEPENDS_${PN} += "${PN}-base ${PN}-python ${PN}-dsdb-modules"
+RDEPENDS_${PN}-python += "pytalloc python-tdb"
+
+FILES_${PN}-base = "${sbindir}/nmbd \
+                    ${sbindir}/smbd \
+                    ${sysconfdir}/init.d \
+                    ${localstatedir}/lib/samba \
+                    ${localstatedir}/nmbd \
+                    ${localstatedir}/spool/samba \
+                    ${systemd_system_unitdir}/nmb.service \
+                    ${systemd_system_unitdir}/smb.service"
+
+FILES_${PN}-ad-dc = "${sbindir}/samba \
+                     ${systemd_system_unitdir}/samba.service \
+                     ${libdir}/krb5/plugins/kdb/samba.so \
+                    "
+RDEPENDS_${PN}-ad-dc = "krb5-kdc"
+
+FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
+                          ${bindir}/ctdb_run_cluster_tests \
+                          ${sysconfdir}/ctdb/nodes \
+                          ${datadir}/ctdb-tests \
+                          ${datadir}/ctdb/tests \
+                         "
+
+FILES_${BPN}-common = "${sysconfdir}/default \
+                       ${sysconfdir}/samba \
+                       ${sysconfdir}/tmpfiles.d \
+"
+
+FILES_${PN} += "${libdir}/vfs/*.so \
+                ${libdir}/charset/*.so \
+                ${libdir}/*.dat \
+                ${libdir}/auth/*.so \
+"
+
+FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb"
+
+FILES_${PN}-testsuite = "${bindir}/gentest \
+                         ${bindir}/locktest \
+                         ${bindir}/masktest \
+                         ${bindir}/ndrdump \
+                         ${bindir}/smbtorture"
+
+FILES_registry-tools = "${bindir}/regdiff \
+                        ${bindir}/regpatch \
+                        ${bindir}/regshell \
+                        ${bindir}/regtree"
+
+FILES_winbind = "${sbindir}/winbindd \
+                 ${bindir}/wbinfo \
+                 ${bindir}/ntlm_auth \
+                 ${libdir}/samba/idmap \
+                 ${libdir}/samba/nss_info \
+                 ${libdir}/winbind_krb5_locator.so \
+                 ${sysconfdir}/init.d/winbind \
+                 ${systemd_system_unitdir}/winbind.service"
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES_smbclient = "${bindir}/cifsdd \
+                   ${bindir}/rpcclient \
+                   ${bindir}/smbcacls \
+                   ${bindir}/smbclient \
+                   ${bindir}/smbcquotas \
+                   ${bindir}/smbget \
+                   ${bindir}/smbspool \
+                   ${bindir}/smbtar \
+                   ${bindir}/smbtree \
+                   ${libdir}/samba/smbspool_krb5_wrapper"
+
+RDEPENDS_${PN}-pidl_append = " perl"
+FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
+
+RDEPENDS_${PN}-client = "\
+    smbclient \
+    winbind \
+    registry-tools \
+    ${PN}-pidl \
+    " 
+
+ALLOW_EMPTY_${PN}-client = "1"
+
+RDEPENDS_${PN}-server = "\
+    ${PN} \
+    winbind \
+    registry-tools \
+    " 
+
+ALLOW_EMPTY_${PN}-server = "1"
+
+RDEPENDS_${PN}-test = "\
+    ${PN}-ctdb-tests \
+    ${PN}-testsuite \
+    "
+
+ALLOW_EMPTY_${PN}-test = "1"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch
index 1520553..047caec 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch
@@ -1,4 +1,4 @@
-From 815e861721a9c43efddb78521147145ebc7569ca Mon Sep 17 00:00:00 2001
+From 4335c4c61877c0b65ff4ec767e8ad3ad8c73c32d Mon Sep 17 00:00:00 2001
 From: Zhiquan Li <zhiquan.li@windriver.com>
 Date: Fri, 13 Nov 2015 17:40:24 +0800
 Subject: [PATCH] fix do_package failed since snort 2.9.7.0
@@ -13,6 +13,7 @@
 Upstream-Status:Inappropriate [embedded specific]
 
 Signed-off-by: Zhiquan Li <zhiquan.li@windriver.com>
+
 ---
  src/snort.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -30,6 +31,3 @@
  #include "profiler.h"
  #include "rules.h"
  #include "treenodes.h"
---
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
index 54c2a95..2e28cd0 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch
@@ -1,4 +1,4 @@
-From 4d7ebe3ed6cee72bc7db98bd408d22c10ef5dd82 Mon Sep 17 00:00:00 2001
+From 5875dea90f71350b7205788fbc67e3759077cefe Mon Sep 17 00:00:00 2001
 From: Joe MacDonald <joe@deserted.net>
 Date: Wed, 20 Nov 2013 16:06:07 -0500
 Subject: [PATCH] libpcap: search sysroot for headers
@@ -9,15 +9,16 @@
 Upstream-Status: Pending
 
 Signed-off-by: Joe MacDonald <joe@deserted.net>
+
 ---
- configure.in |    2 +-
+ configure.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.in b/configure.in
-index e52bb6c..8ded35d 100644
+index 62573a8..fded45b 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -78,7 +78,7 @@ case "$host" in
+@@ -69,7 +69,7 @@ case "$host" in
      linux="yes"
      AC_DEFINE([LINUX],[1],[Define if Linux])
      AC_SUBST(extra_incl)
@@ -26,6 +27,3 @@
      ;;
    *-hpux10*|*-hpux11*)
      AC_DEFINE([HPUX],[1],[Define if HP-UX 10 or 11])
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch
index 39e5c9c..6aa0b73 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch
@@ -1,17 +1,27 @@
+From 5a53260a819e2873f58165e96852529719101c53 Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <B40290@freescale.com>
+Date: Mon, 4 Nov 2013 10:39:56 +0800
+Subject: [PATCH] snort: add recipe
+
 Upstream-Status:Inappropriate [embedded specific]
 
 fix the below error:
-checking for dap address space id... configure: 
+checking for dap address space id... configure:
 configure: error: cannot run test program while cross compiling
 
-
 Signed-off-by: Chunrong Guo <B40290@freescale.com>
 
---- a/configure.in	2013-08-23 00:06:37.239361932 -0500
-+++ b/configure.in	2013-08-23 00:07:32.860266534 -0500
-@@ -679,23 +679,23 @@
+---
+ configure.in | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 6fe5d68..e7636ce 100644
+--- a/configure.in
++++ b/configure.in
+@@ -698,23 +698,23 @@ if test "x$ac_cv_func_daq_dp_add_dc" = "xyes"; then
  
- AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta])
+ fi
  
 -AC_MSG_CHECKING([for daq address space ID])
 -AC_RUN_IFELSE(
@@ -48,5 +58,5 @@
 +#        [DAQ version supports address space ID in header.])
 +#fi
  
- # any sparc platform has to have this one defined.
- AC_MSG_CHECKING(for sparc)
+ AC_MSG_CHECKING([for daq flow ID])
+ AC_RUN_IFELSE(
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch
index e6afcab..04df37c 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch
@@ -1,16 +1,26 @@
+From 5aa42a3137c657b5eddd4608343aa1854bd7cd27 Mon Sep 17 00:00:00 2001
+From: Zhiquan Li <zhiquan.li@windriver.com>
+Date: Mon, 16 Nov 2015 10:23:00 +0800
+Subject: [PATCH] snort: 2.9.6.0 -> 2.9.7.5
+
 Upstream-Status:Inappropriate [embedded specific]
 
 fix the below error:
 checking for daq flow ID... configure:
 configure: error: cannot run test program while cross compiling
 
+---
+ configure.in | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
 
---- a/configure.in    2015-10-28 10:36:42.918512690 +0800
-+++ b/configure.in    2015-10-28 10:37:36.738510048 +0800
-@@ -716,23 +716,23 @@
+diff --git a/configure.in b/configure.in
+index e7636ce..2fbd298 100644
+--- a/configure.in
++++ b/configure.in
+@@ -716,23 +716,23 @@ have_daq_address_space_id="yes"
  #        [DAQ version supports address space ID in header.])
  #fi
-
+ 
 -AC_MSG_CHECKING([for daq flow ID])
 -AC_RUN_IFELSE(
 -[AC_LANG_PROGRAM(
@@ -45,6 +55,6 @@
 +#    AC_DEFINE([HAVE_DAQ_FLOW_ID],[1],
 +#        [DAQ version supports flow ID in header.])
 +#fi
-
+ 
  AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
  AC_RUN_IFELSE(
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch
index 1a13298..15958a7 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch
@@ -1,16 +1,26 @@
+From b916443d43f2e1eeacfbed0033274a0270ef634d Mon Sep 17 00:00:00 2001
+From: Zhiquan Li <zhiquan.li@windriver.com>
+Date: Mon, 16 Nov 2015 10:23:00 +0800
+Subject: [PATCH] snort: 2.9.6.0 -> 2.9.7.5
+
 Upstream-Status:Inappropriate [embedded specific]
 
 fix the below error:
 checking for DAQ_VERDICT_RETRY... configure:
 configure: error: cannot run test program while cross compiling
 
+---
+ configure.in | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
 
---- a/configure.in    2015-10-28 10:45:18.174487395 +0800
-+++ b/configure.in    2015-10-28 10:45:47.586485951 +0800
-@@ -734,23 +734,23 @@
+diff --git a/configure.in b/configure.in
+index 2fbd298..62573a8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -734,23 +734,23 @@ have_daq_flow_id="yes"
  #        [DAQ version supports flow ID in header.])
  #fi
-
+ 
 -AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
 -AC_RUN_IFELSE(
 -[AC_LANG_PROGRAM(
@@ -45,7 +55,6 @@
 +#    AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1],
 +#        [DAQ version supports DAQ_VERDICT_RETRY in DAQ_Verdict.])
 +#fi
-
+ 
  # any sparc platform has to have this one defined.
  AC_MSG_CHECKING(for sparc)
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch
index 9dafe63..79e9f07 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch
@@ -1,3 +1,8 @@
+From a1fdbced4166cb0f35d23b63a59312d86860485a Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <B40290@freescale.com>
+Date: Mon, 4 Nov 2013 10:39:56 +0800
+Subject: [PATCH] snort: add recipe
+
 Upstream-Status: Inappropriate [embedded specific]
 
 fix the below error:
@@ -6,10 +11,15 @@
 
 Signed-off-by: Chunrong Guo <B40290@freescale.com>
 
+---
+ configure.in | 50 ++++++++++++++++----------------------------------
+ 1 file changed, 16 insertions(+), 34 deletions(-)
 
---- a/configure.in	2013-08-21 03:56:17.197414789 -0500
-+++ b/configure.in	2013-08-21 23:19:05.298553560 -0500
-@@ -281,25 +281,7 @@
+diff --git a/configure.in b/configure.in
+index 20d15eb..6fe5d68 100644
+--- a/configure.in
++++ b/configure.in
+@@ -274,25 +274,7 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,int64_t])
  AC_CHECK_TYPES([boolean])
  
  # In case INADDR_NONE is not defined (like on Solaris)
@@ -36,7 +46,7 @@
  
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  #include <stdio.h>
-@@ -397,21 +379,21 @@
+@@ -421,21 +403,21 @@ if test "x$LPCAP" = "xno"; then
    fi
  fi
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
index 2becc06..0404ea0 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch
@@ -1,3 +1,8 @@
+From f46d096015d7402a37a59eb66b8f6b7fbf0cdff0 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Wed, 24 May 2017 17:38:53 +0800
+Subject: [PATCH] snort: enable static daq
+
 Upstream-Status: Inappropriate [embedded specific]
 
 When enable static daq for snort, it calls to daq-modules-config to get link
@@ -5,7 +10,11 @@
 contamination issue. So filter it.
 
 Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
 ---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
 diff --git a/configure.in b/configure.in
 index fded45b..a247bb9 100644
 --- a/configure.in
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
index bd55efc..7eea5d1 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
@@ -14,6 +14,8 @@
 
 S = "${WORKDIR}/${BPN}"
 
+inherit update-alternatives
+
 EXTRA_OEMAKE = "-e MAKEFLAGS="
 
 # comment out MakeInclude in Makefile which sets build environment
@@ -30,3 +32,7 @@
     install -d ${D}/${base_sbindir}
     install -m 0755 ${S}/vconfig ${D}/${base_sbindir}/
 }
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "vconfig"
+ALTERNATIVE_LINK_NAME[vconfig] = "${base_sbindir}/vconfig"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb
index 5126190..9290651 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb
@@ -12,15 +12,12 @@
 PROVIDES += "cyassl"
 RPROVIDES_${PN} = "cyassl"
 
-SRC_URI = "https://github.com/wolfSSL/wolfssl/archive/v${PV}-stable.zip \
+S = "${WORKDIR}/git"
+SRCREV = "d195009dcb62d8712195661bd1d50f8dd6831044"
+SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https; \
            file://0001-fix-no-rule-to-make-cyassl-options.h.patch \
           "
 
-SRC_URI[md5sum] = "f9caf558169ab650dc8200708799ebeb"
-SRC_URI[sha256sum] = "b6d87d3e2c8757177d69aff373c91cf162f4a3944fae90fa10d086fd5f9542e7"
-
-S = "${WORKDIR}/wolfssl-${PV}-stable"
-
 inherit autotools
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
index 075af57..8715971 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
@@ -1,19 +1,20 @@
-From 933e065cf8aecfa0cce5f8f92abbed5baaaf3f77 Mon Sep 17 00:00:00 2001
+From 987c8f4a718cdd6b764592ba7510090a59623959 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 31 Mar 2017 19:10:57 -0700
-Subject: [PATCH 1/2] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF
+Subject: [PATCH] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF
 
 if they are not defined as is in musl then define
 them here
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  include/automount.h | 8 ++++++++
  include/nsswitch.h  | 3 +++
  2 files changed, 11 insertions(+)
 
 diff --git a/include/automount.h b/include/automount.h
-index 219b07d..b12c22a 100644
+index cc336ad..8bdcf12 100644
 --- a/include/automount.h
 +++ b/include/automount.h
 @@ -42,6 +42,14 @@
@@ -32,7 +33,7 @@
  #ifndef HAVE_MOUNT
  #error Failed to locate mount(8)!
 diff --git a/include/nsswitch.h b/include/nsswitch.h
-index 2b445a9..3db77b2 100644
+index d3e4027..7a0c38f 100644
 --- a/include/nsswitch.h
 +++ b/include/nsswitch.h
 @@ -24,6 +24,9 @@
@@ -45,6 +46,3 @@
  #define NSSWITCH_FILE _PATH_NSSWITCH_CONF
  
  enum nsswitch_status {
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch
index 7ac1456..32293dd 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch
@@ -1,4 +1,4 @@
-From e4ee00e08acd7c0912a3264ad32e4de861c7416f Mon Sep 17 00:00:00 2001
+From 745e355ac8b595a27e1fcca75bf01d3e244f4a5f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 7 Sep 2017 22:22:31 -0700
 Subject: [PATCH] modules/lookup_multi.c: Replace __S_IEXEC with S_IEXEC
@@ -7,6 +7,7 @@
 all libc e.g. musl
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  modules/lookup_multi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -24,6 +25,3 @@
  					type = src_prog;
  				else
  					type = src_file;
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch
index 6b6ba6d..469027a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch
@@ -1,21 +1,22 @@
-From 8fd74ddb3369572c594b22b396346131af00faee Mon Sep 17 00:00:00 2001
+From 557ca399f4b3a397f20bb147ec6dc4ab9732dd1e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 31 Mar 2017 19:12:10 -0700
-Subject: [PATCH 2/2] Replace __S_IEXEC with S_IEXEC
+Subject: [PATCH] Replace __S_IEXEC with S_IEXEC
 
 S_IEXEC is portable
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  daemon/lookup.c        | 4 ++--
  modules/lookup_multi.c | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/daemon/lookup.c b/daemon/lookup.c
-index 62071df..1bec97f 100644
+index 201ccbb..d821db8 100644
 --- a/daemon/lookup.c
 +++ b/daemon/lookup.c
-@@ -400,7 +400,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
+@@ -366,7 +366,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
  	if (!S_ISREG(st.st_mode))
  		return NSS_STATUS_NOTFOUND;
  
@@ -24,7 +25,7 @@
  		type = src_prog;
  	else
  		type = src_file;
-@@ -890,7 +890,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
+@@ -856,7 +856,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
  	if (!S_ISREG(st.st_mode))
  		return NSS_STATUS_NOTFOUND;
  
@@ -34,10 +35,10 @@
  	else
  		type = src_file;
 diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c
-index 6ec8434..88d081f 100644
+index fadd2ea..3ecda6d 100644
 --- a/modules/lookup_multi.c
 +++ b/modules/lookup_multi.c
-@@ -104,7 +104,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch
+@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch
  				continue;
  			}
  
@@ -46,6 +47,3 @@
  				type = src_prog;
  			else
  				type = src_file;
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch
index fdb906b..816a409 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch
@@ -1,14 +1,18 @@
-[PATCH] add the needed stdarg.h
+From df5d45b2d7ad7e7b5f0542a816d08b0409a529a1 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 19 Aug 2014 11:31:35 +0800
+Subject: [PATCH] [PATCH] add the needed stdarg.h
 
 Upstream-status: Pending
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
- lib/defaults.c |    1 +
+ lib/defaults.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/lib/defaults.c b/lib/defaults.c
-index 2b03ea2..5728e67 100644
+index 0e48a78..667f35d 100644
 --- a/lib/defaults.c
 +++ b/lib/defaults.c
 @@ -16,6 +16,7 @@
@@ -19,6 +23,3 @@
  #include <ctype.h>
  #include <string.h>
  #include <sys/utsname.h>
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch
index af5be6a..1d5c3e1 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch
@@ -1,3 +1,8 @@
+From 2cbc576ea1fbd1cbf4579d64b30e41d762084e7f Mon Sep 17 00:00:00 2001
+From: "yanjun.zhu" <yanjun.zhu@windriver.com>
+Date: Tue, 15 Jan 2013 12:45:44 +0800
+Subject: [PATCH] autofs: do not check for modprobe
+
 Description: Loading autofs module is #ifdef'ed in the source, so
  there is no need to check for /proc (which is only used
  to load module) or modprobe.  Both modprobe and /proc
@@ -7,9 +12,16 @@
 Upstream-Status: Backport [1]
 [1] http://www.spinics.net/lists/autofs/msg00139.html
 
-diff -urpN a/configure.in b/configure.in
---- a/configure.in	2013-01-15 11:30:22.000000000 +0800
-+++ b/configure.in	2013-01-15 11:31:45.000000000 +0800
+---
+ configure.in        |  6 ------
+ daemon/module.c     |  3 +++
+ include/automount.h | 11 +++--------
+ 3 files changed, 6 insertions(+), 14 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 44a1c8b..b226236 100644
+--- a/configure.in
++++ b/configure.in
 @@ -34,11 +34,6 @@ AC_MSG_CHECKING([for binaries in])
  AC_MSG_RESULT([$searchpath])
  
@@ -22,7 +34,7 @@
  # Location of init.d directory?
  #
  AF_INIT_D()
-@@ -142,7 +137,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umo
+@@ -142,7 +137,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $searchpath)
  AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath)
  AF_PATH_INCLUDE(E3FSCK, fsck.ext3 e3fsck, , $searchpath)
  AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck, , $searchpath)
@@ -30,30 +42,32 @@
  
  AF_CHECK_PROG(LEX, flex lex, , $searchpath)
  AF_CHECK_PROG(YACC, bison, , $searchpath)
-diff -urpN a/daemon/module.c b/daemon/module.c
---- a/daemon/module.c	2013-01-15 11:30:49.000000000 +0800
-+++ b/daemon/module.c	2013-01-15 11:32:00.000000000 +0800
-@@ -18,6 +18,8 @@
- #include <stdlib.h>
+diff --git a/daemon/module.c b/daemon/module.c
+index bed8f7a..e41a98e 100644
+--- a/daemon/module.c
++++ b/daemon/module.c
+@@ -19,6 +19,8 @@
  #include "automount.h"
+ #include "nsswitch.h"
  
 +#if 0
 +/* see comment in daemon/automount.c around load_autofs4_module() call */
  int load_autofs4_module(void)
  {
  	FILE *fp;
-@@ -52,6 +54,7 @@ int load_autofs4_module(void)
+@@ -53,6 +55,7 @@ int load_autofs4_module(void)
  
  	return 1;
  }
 +#endif
  
- struct lookup_mod *open_lookup(const char *name, const char *err_prefix,
- 			       const char *mapfmt, int argc, const char *const *argv)
-diff -urpN a/include/automount.h b/include/automount.h
---- a/include/automount.h	2013-01-15 11:31:10.000000000 +0800
-+++ b/include/automount.h	2013-01-15 11:32:06.000000000 +0800
-@@ -50,16 +50,11 @@
+ int open_lookup(const char *name, const char *err_prefix, const char *mapfmt,
+ 		int argc, const char *const *argv, struct lookup_mod **lookup)
+diff --git a/include/automount.h b/include/automount.h
+index c0f5fbf..cc336ad 100644
+--- a/include/automount.h
++++ b/include/automount.h
+@@ -51,16 +51,11 @@
  #error Failed to locate umount(8)!
  #endif
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch
index 09fea49..8e06db6 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch
@@ -1,4 +1,4 @@
-From 54a9bd28a307dd74df044d779ca85adcf36aa202 Mon Sep 17 00:00:00 2001
+From 080626108c9ab70e2489752ef2a14006d0564b0c Mon Sep 17 00:00:00 2001
 From: Joe MacDonald <joe.macdonald@windriver.com>
 Date: Tue, 18 Jun 2013 10:05:21 -0400
 Subject: [PATCH] Fix the dependency issue
@@ -10,19 +10,17 @@
 
 Signed-off-by: Roy.Li <rongqing.li@windriver.com>
 Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
+
 ---
- lib/Makefile |    1 +
+ lib/Makefile | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/lib/Makefile b/lib/Makefile
-index 5418009..bff4e1d 100644
+index 518b483..4798a4b 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
-@@ -75,3 +75,4 @@ install: all
+@@ -81,3 +81,4 @@ install: all
  clean:
  	rm -f $(LIB) $(RPCS) $(OBJS) $(YACCSRC) *.output *~
  
 +$(OBJS): $(RPCS)
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch
index 3a87898..9b0942e 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch
@@ -1,21 +1,22 @@
-Upstream-Status: Pending
-
-From 44bdce8c6ed9b30c1643e5981172a4f9025f013c Mon Sep 17 00:00:00 2001
+From 2256b8aa98cff15ddf2a8d36496e6c9125927901 Mon Sep 17 00:00:00 2001
 From: Andreas Oberritter <obi@opendreambox.org>
 Date: Wed, 13 Mar 2013 16:17:08 +0100
 Subject: [PATCH] autofs-5.0.7: include linux/nfs.h directly in rpc_subs.h
 
+Upstream-Status: Pending
+
 Fixes compile error with uclibc. Glibc's nfs/nfs.h contains
 nothing but "#include linux/nfs.h". rpc_subs.h already includes
 other linux/nfs*.h files directly.
 
 Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
 ---
- include/rpc_subs.h |    2 +-
+ include/rpc_subs.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/rpc_subs.h b/include/rpc_subs.h
-index b6d59f9..a2d9648 100644
+index e744e89..83db47e 100644
 --- a/include/rpc_subs.h
 +++ b/include/rpc_subs.h
 @@ -18,7 +18,7 @@
@@ -27,6 +28,3 @@
  #include <linux/nfs2.h>
  #include <linux/nfs3.h>
  
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch
index cbf2bf8..18ce193 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch
@@ -1,12 +1,21 @@
+From b31decac4acb194b020c621d2d11019f636a45e0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 24 Apr 2017 20:41:25 -0700
+Subject: [PATCH] autofs: Upgrade to 5.1.2 release
+
 Make configure compatible with -Wl,--as-needed following
 https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure
 
 2016-07-05 Martin von Gagern
 
-Index: autofs-5.1.2/aclocal.m4
-===================================================================
---- autofs-5.1.2.orig/aclocal.m4
-+++ autofs-5.1.2/aclocal.m4
+---
+ aclocal.m4 | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 0e4a624..2e620cd 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
 @@ -415,9 +415,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC],
  [
  # save current flags
@@ -19,7 +28,7 @@
  
  AC_TRY_LINK(
      [ #include <rpc/rpc.h> ],
-@@ -440,7 +440,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyna
+@@ -440,7 +440,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyname])
  
  # restore flags
  CFLAGS="$af_check_libtirpc_save_cflags"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch
index 8f1af62..b25c43f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/cross.patch
@@ -1,8 +1,17 @@
-Index: autofs-5.0.7/aclocal.m4
-===================================================================
---- autofs-5.0.7.orig/aclocal.m4	2012-10-28 04:45:07.000000000 -0700
-+++ autofs-5.0.7/aclocal.m4	2012-10-28 10:47:53.263996910 -0700
-@@ -7,6 +7,8 @@
+From b9b44cd82caceeb638cc6a862b5bb90b93ad6c6a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Jan 2013 19:53:10 -0800
+
+---
+ aclocal.m4   | 2 ++
+ configure.in | 8 ++++++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 2115204..2a9a802 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -7,6 +7,8 @@ dnl --------------------------------------------------------------------------
  AC_DEFUN(AF_PATH_INCLUDE,
  [AC_PATH_PROGS($1,$2,$3,$4)
  if test -n "$$1"; then
@@ -11,11 +20,11 @@
    AC_DEFINE(HAVE_$1,1,[define if you have $1])
    AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1])
    HAVE_$1=1
-Index: autofs-5.0.7/configure.in
-===================================================================
---- autofs-5.0.7.orig/configure.in	2012-10-28 04:45:06.000000000 -0700
-+++ autofs-5.0.7/configure.in	2012-10-28 10:50:07.580000628 -0700
-@@ -301,13 +301,15 @@
+diff --git a/configure.in b/configure.in
+index 25d7c4e..44a1c8b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -324,13 +324,15 @@ AC_PROG_CC
  cat > pietest.c <<EOF
  int main(void) { return 0; }
  EOF
@@ -33,7 +42,7 @@
  AC_MSG_RESULT([$gcc_supports_pie])
  if test $gcc_supports_pie = yes ; then
  	DAEMON_CFLAGS="-fPIE"
-@@ -316,6 +318,8 @@
+@@ -339,6 +341,8 @@ fi
  rm -f pietest.c
  AC_SUBST(DAEMON_CFLAGS)
  AC_SUBST(DAEMON_LDFLAGS)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch
index 9b64183..21a97c8 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch
@@ -1,4 +1,7 @@
-[PATCH] fix the YACC rule to fix a building failure
+From 971d48a00ef82880c34e89778bf430a01360ebd5 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Mon, 18 May 2015 16:28:36 +0800
+Subject: [PATCH] [PATCH] fix the YACC rule to fix a building failure
 
 Upstream-Statu: Pending
 
@@ -14,6 +17,7 @@
   |../Makefile.rules:64: recipe for target 'amd_tok.o' failed
   |----------------------
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
  lib/Makefile     | 6 ++++--
  modules/Makefile | 3 ++-
@@ -44,7 +48,7 @@
  
  nss_tok.o: nss_tok.c nss_parse.tab.h
 diff --git a/modules/Makefile b/modules/Makefile
-index 237b70b..71415d0 100644
+index d9ab06c..abc7698 100644
 --- a/modules/Makefile
 +++ b/modules/Makefile
 @@ -103,7 +103,8 @@ amd_tok.c: amd_tok.l
@@ -57,6 +61,3 @@
  	$(YACC) -v -d -p amd_ -b amd_parse $?
  
  amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch
index 94750b2..4143259 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch
@@ -1,6 +1,9 @@
-autofs: fails to compile with openldap disabled
+From c500d9906f163bf716c872d37403b9de02ef0a86 Mon Sep 17 00:00:00 2001
+From: Amy Fong <amy.fong@windriver.com>
+Date: Fri, 18 Jan 2013 12:13:32 -0500
+Subject: [PATCH] autofs: fails to compile with openldap disabled
 
-As of 5.0.6, it appears that changes were introduced so that 
+As of 5.0.6, it appears that changes were introduced so that
 if you compile with openldap disabled and openldap headers are not
 available, then autofs fails to build.
 
@@ -12,13 +15,13 @@
  1 file changed, 4 insertions(+)
 
 ---
- include/lookup_ldap.h |    4 ++++
+ include/lookup_ldap.h | 4 ++++
  1 file changed, 4 insertions(+)
 
-Index: autofs-5.1.2/include/lookup_ldap.h
-===================================================================
---- autofs-5.1.2.orig/include/lookup_ldap.h
-+++ autofs-5.1.2/include/lookup_ldap.h
+diff --git a/include/lookup_ldap.h b/include/lookup_ldap.h
+index 3a7aba7..bfdb0b3 100644
+--- a/include/lookup_ldap.h
++++ b/include/lookup_ldap.h
 @@ -1,7 +1,9 @@
  #ifndef LOOKUP_LDAP_H
  #define LOOKUP_LDAP_H
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch
index 634005b..21396dd 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch
@@ -1,14 +1,18 @@
-[PATCH] force STRIP to emtpy
+From 3cbee00fe5725b87abdae80cfa2ee735e4513ca6 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 19 Aug 2014 11:31:35 +0800
+Subject: [PATCH] [PATCH] force STRIP to emtpy
 
 otherwise the generate file will be stripped
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
- Makefile.rules |    2 +-
+ Makefile.rules | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile.rules b/Makefile.rules
-index 710a2c9..e4334db 100644
+index 709dd04..b1f7e50 100644
 --- a/Makefile.rules
 +++ b/Makefile.rules
 @@ -31,7 +31,7 @@ LDFLAGS   ?= -s
@@ -20,6 +24,3 @@
  else
  STRIP     ?= strip --strip-debug
  endif
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch
index d68944b..0a2d502 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch
@@ -1,21 +1,17 @@
-Index: autofs-5.0.7/aclocal.m4
-===================================================================
---- autofs-5.0.7.orig/aclocal.m4	2012-10-28 13:17:45.504237027 -0700
-+++ autofs-5.0.7/aclocal.m4	2012-10-28 13:20:50.108242739 -0700
-@@ -403,7 +403,7 @@
- # save current flags
- af_check_libtirpc_save_cflags="$CFLAGS"
- af_check_libtirpc_save_ldflags="$LDFLAGS"
--CFLAGS="$CFLAGS -I/usr/include/tirpc"
-+CFLAGS="$CFLAGS -I=/usr/include/tirpc"
- LDFLAGS="$LDFLAGS -ltirpc"
- 
- AC_TRY_LINK(
-Index: autofs-5.0.7/Makefile.rules
-===================================================================
---- autofs-5.0.7.orig/Makefile.rules	2012-10-28 13:17:45.308237022 -0700
-+++ autofs-5.0.7/Makefile.rules	2012-10-28 13:21:25.720242803 -0700
-@@ -48,7 +48,7 @@
+From cb6a4f61adb027f2366318f2c08c8264ebf39218 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Jan 2013 19:53:10 -0800
+
+---
+ Makefile.rules | 2 +-
+ aclocal.m4     | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 6fa3e02..709dd04 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -46,7 +46,7 @@ CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
  LIBS += -lpthread
  
  ifdef TIRPCLIB
@@ -24,3 +20,16 @@
  LIBS += $(TIRPCLIB)
  endif
  
+diff --git a/aclocal.m4 b/aclocal.m4
+index 2a9a802..0e4a624 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -416,7 +416,7 @@ AC_DEFUN([AF_CHECK_LIBTIRPC],
+ # save current flags
+ af_check_libtirpc_save_cflags="$CFLAGS"
+ af_check_libtirpc_save_ldflags="$LDFLAGS"
+-CFLAGS="$CFLAGS -I/usr/include/tirpc"
++CFLAGS="$CFLAGS -I=/usr/include/tirpc"
+ LDFLAGS="$LDFLAGS -ltirpc"
+ 
+ AC_TRY_LINK(
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch
index cf03635..c46c0e5 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch
@@ -1,17 +1,26 @@
-Index: autofs-5.0.7/samples/auto.net
-===================================================================
---- autofs-5.0.7.orig/samples/auto.net	2012-07-24 23:05:26.000000000 -0700
-+++ autofs-5.0.7/samples/auto.net	2012-10-28 10:44:25.035991715 -0700
+From a3007d7ea930823926611081bb873ddd771325cb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Jan 2013 19:53:10 -0800
+
+---
+ samples/auto.net | 2 +-
+ samples/auto.smb | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/samples/auto.net b/samples/auto.net
+index 0384f61..61215f6 100755
+--- a/samples/auto.net
++++ b/samples/auto.net
 @@ -1,4 +1,4 @@
 -#!/bin/bash
 +#!/bin/sh
  
  # This file must be executable to work! chmod 755!
  
-Index: autofs-5.0.7/samples/auto.smb
-===================================================================
---- autofs-5.0.7.orig/samples/auto.smb	2012-07-24 23:05:26.000000000 -0700
-+++ autofs-5.0.7/samples/auto.smb	2012-10-28 10:44:25.035991715 -0700
+diff --git a/samples/auto.smb b/samples/auto.smb
+index 6af5d85..d296b81 100755
+--- a/samples/auto.smb
++++ b/samples/auto.smb
 @@ -1,4 +1,4 @@
 -#!/bin/bash
 +#!/bin/sh
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch
index bf2c964..1c7b119 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch
@@ -1,13 +1,22 @@
+From e3ae56cf0bb4063c31295f45d04e3c504f4b6cc7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 24 Apr 2017 20:41:25 -0700
+Subject: [PATCH] autofs: Upgrade to 5.1.2 release
+
 Use pkg-config first to look for external libnsl which is now
 split out from glibc, if it does not exist then see if its provided
 by glibc itself.
 
 -Khem
 
-Index: autofs-5.1.2/configure.in
-===================================================================
---- autofs-5.1.2.orig/configure.in
-+++ autofs-5.1.2/configure.in
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 9cf73b8..1016c71 100644
+--- a/configure.in
++++ b/configure.in
 @@ -186,7 +186,7 @@ fi
  #
  # glibc/libc 6 new libraries
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
index 282d6f0..4183069 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch
@@ -1,4 +1,4 @@
-From 79034f969bbd12215d65b4337dfd38a13d02d4ef Mon Sep 17 00:00:00 2001
+From cfacbb917f87b903b50132a5025f86b0cc522e9c Mon Sep 17 00:00:00 2001
 From: Robert Yang <liezhi.yang@windriver.com>
 Date: Sat, 13 Sep 2014 20:19:28 -0700
 Subject: [PATCH] autofs.init.in: remove bashism
@@ -9,9 +9,10 @@
 
 Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
 Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
 ---
- redhat/autofs.init.in |   12 ++++++------
- samples/rc.autofs.in  |   10 +++++-----
+ redhat/autofs.init.in | 12 ++++++------
+ samples/rc.autofs.in  | 10 +++++-----
  2 files changed, 11 insertions(+), 11 deletions(-)
 
 diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in
@@ -115,6 +116,3 @@
  	pid=`pidof $prog`
  	if [ -z $pid ]; then
  		echo $"$prog not running"
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch
index 93b76bd..3d0c6bd 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch
@@ -1,14 +1,18 @@
-using pkg-config to detect libxml-2.0 and krb5
+From dabcbdae38038a8e4ad2c4286112381c407c5ce7 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 19 Aug 2014 11:31:35 +0800
+Subject: [PATCH] using pkg-config to detect libxml-2.0 and krb5
 
 Upstream-status: Pending
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
- configure.in |   16 ++++++++++++++--
- 2 files changed, 14 insertions(+), 2 deletions(-)
+ configure.in | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
 
 diff --git a/configure.in b/configure.in
-index 392d122..a3028aa 100644
+index b226236..9cf73b8 100644
 --- a/configure.in
 +++ b/configure.in
 @@ -162,8 +162,20 @@ if test x$enable_sloppy_mount = xyes; then
@@ -34,6 +38,3 @@
  
  AC_SEARCH_LIBS([versionsort],[])
  if test "$ac_cv_search_versionsort" = "no"; then
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
index eaa453d..6dbff87 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Generic client/server library for SASL authentication"
 SECTION = "libs"
 HOMEPAGE = "http://asg.web.cmu.edu/sasl/"
-DEPENDS = "openssl virtual/db"
+DEPENDS = "openssl db"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
 
@@ -75,8 +75,8 @@
 USERADD_PACKAGES = "${PN}-bin"
 USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus"
 
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "saslauthd.service"
+SYSTEMD_PACKAGES = "${PN}-bin"
+SYSTEMD_SERVICE_${PN}-bin = "saslauthd.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch
new file mode 100644
index 0000000..f5e1bec
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch
@@ -0,0 +1,25 @@
+From cfee58d5863a535b61aa54690ae205b876f57944 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Feb 2018 22:53:29 -0800
+Subject: [PATCH 1/2] libopeniscsiusr: Include limit.h for PATH_MAX
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libopeniscsiusr/iface.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c
+index 79898df..a48ef36 100644
+--- a/libopeniscsiusr/iface.c
++++ b/libopeniscsiusr/iface.c
+@@ -30,6 +30,7 @@
+ #include <netdb.h>
+ #include <assert.h>
+ #include <inttypes.h>
++#include <limits.h>
+ 
+ #include "libopeniscsiusr/libopeniscsiusr.h"
+ #include "misc.h"
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch
new file mode 100644
index 0000000..174aa50
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch
@@ -0,0 +1,25 @@
+From 197713ad7e3e944102bbd792e1ab9ec4a67100c0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Feb 2018 23:25:21 -0800
+Subject: [PATCH 1/4] qedi.c: Removed unused linux/ethtool.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ iscsiuio/src/unix/libs/qedi.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c
+index b81fecd..24cb89a 100644
+--- a/iscsiuio/src/unix/libs/qedi.c
++++ b/iscsiuio/src/unix/libs/qedi.c
+@@ -49,7 +49,6 @@
+ #include <arpa/inet.h>
+ #include <linux/types.h>
+ #include <linux/sockios.h>
+-#include <linux/ethtool.h>
+ #include <linux/netlink.h>
+ #include <sys/mman.h>
+ #include <sys/ioctl.h>
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch
new file mode 100644
index 0000000..aecede6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch
@@ -0,0 +1,25 @@
+From 2b39f85dcf020647544002cb0b0e734748391dfb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Feb 2018 23:27:25 -0800
+Subject: [PATCH 2/4] idbm.c: Include fcnl.h for O_RDWR and O_CREAT definitions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usr/idbm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/usr/idbm.c b/usr/idbm.c
+index 5532202..0a51b85 100644
+--- a/usr/idbm.c
++++ b/usr/idbm.c
+@@ -27,6 +27,7 @@
+ #include <errno.h>
+ #include <dirent.h>
+ #include <limits.h>
++#include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+ 
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch
new file mode 100644
index 0000000..836ed60
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch
@@ -0,0 +1,29 @@
+From 29571f71692e28ce9a17d1450097a98492f3b465 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Feb 2018 22:54:04 -0800
+Subject: [PATCH 2/2] libopeniscsiusr: Add CFLAGS to linker cmdline
+
+This will ensure that -fPIC is passed to linker as
+well
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libopeniscsiusr/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile
+index 8b9b523..4f1d0d6 100644
+--- a/libopeniscsiusr/Makefile
++++ b/libopeniscsiusr/Makefile
+@@ -49,7 +49,7 @@ LIBADD =
+ all: $(LIBS) $(LIBS_MAJOR) $(TESTS) doc
+ 
+ $(LIBS): $(OBJS)
+-	$(CC) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD)
++	$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD)
+ 	ln -sf $@ $(DEVLIB)
+ 
+ $(LIBS_MAJOR): $(LIBS)
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch
new file mode 100644
index 0000000..0ce155f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch
@@ -0,0 +1,49 @@
+From 9b7a32903b56ce4d41f264a345ca59a0b00d53b3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Feb 2018 23:28:33 -0800
+Subject: [PATCH 3/4] bnx2x.c: Reorder the includes to avoid duplicate defines
+ with musl
+
+including nic.h before linux/ethtool.h avoids redefinitions of
+eth structs
+
+/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
+usr/include/netinet/if_ether.h:104:8: error: redefinition of 'struct ethhdr'
+ struct ethhdr {
+        ^~~~~~
+In file included from /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.
+876-r0/recipe-sysroot/usr/include/linux/ethtool.h:19:0,
+                 from qedi.c:52:
+/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
+usr/include/linux/if_ether.h:154:8: note: originally defined here
+ struct ethhdr {
+        ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ iscsiuio/src/unix/libs/bnx2x.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
+index 3df6d5f..62530d1 100644
+--- a/iscsiuio/src/unix/libs/bnx2x.c
++++ b/iscsiuio/src/unix/libs/bnx2x.c
+@@ -36,6 +36,7 @@
+  * bnx2x.c - bnx2x user space driver
+  *
+  */
++#include "nic.h"
+ #include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -58,7 +59,6 @@
+ #include "bnx2x.h"
+ #include "cnic.h"
+ #include "logger.h"
+-#include "nic.h"
+ #include "nic_id.h"
+ #include "nic_utils.h"
+ #include "options.h"
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch
new file mode 100644
index 0000000..57bdc8c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch
@@ -0,0 +1,28 @@
+From 6f9c1a04d250388d1574cfaf20a1ff66a64beb48 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Feb 2018 23:42:12 -0800
+Subject: [PATCH 4/4] fwparam_ppc.c: Do not use __compar_fn_t
+
+__compar_fn_t is not defined in musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ utils/fwparam_ibft/fwparam_ppc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/fwparam_ibft/fwparam_ppc.c b/utils/fwparam_ibft/fwparam_ppc.c
+index c298b8c..391faa2 100644
+--- a/utils/fwparam_ibft/fwparam_ppc.c
++++ b/utils/fwparam_ibft/fwparam_ppc.c
+@@ -356,7 +356,7 @@ static int loop_devs(const char *devtree)
+ 	 * Sort the nics into "natural" order.	The proc fs
+ 	 * device-tree has them in somewhat random, or reversed order.
+ 	 */
+-	qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp);
++	qsort(niclist, nic_count, sizeof(char *), nic_cmp);
+ 
+ 	snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases");
+ 	dev_count = 0;
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-Do-not-clean-kernel-source.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-Do-not-clean-kernel-source.patch
deleted file mode 100644
index 2c46611..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-Do-not-clean-kernel-source.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4ebab8add4a549c16ab8b124137546c0a7b46a9b Mon Sep 17 00:00:00 2001
-From: Joe MacDonald <joe_macdonald@mentor.com>
-Date: Tue, 15 Nov 2016 11:11:30 -0500
-Subject: [PATCH] Do not clean kernel source
-
-The default behaviour should not be to attempt to clean the kernel source
-tree when building userspace.  When not cross-compiling, however, this action is
-harmless, but when attempting to build within the sysroot and since this package
-is purely userspace, the clean step will fail.
-
-Removing the clean step eliminates an unnecessary dependency on the kernel build
-infrastructure.
-
-Upstream-status: Inappropriate (embedded specific)
-
-Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
----
- Makefile | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c8cd00e..9576bba 100644
---- a/Makefile
-+++ b/Makefile
-@@ -37,7 +37,7 @@ endif
- 
- all: user
- 
--user: iscsiuio/Makefile
-+user:
- 	$(MAKE) -C utils/sysdeps
- 	$(MAKE) -C utils/fwparam_ibft
- 	$(MAKE) -C usr
-@@ -75,7 +75,6 @@ clean:
- 	$(MAKE) -C utils/fwparam_ibft clean
- 	$(MAKE) -C utils clean
- 	$(MAKE) -C usr clean
--	$(MAKE) -C kernel clean
- 	[ ! -f iscsiuio/Makefile ] || $(MAKE) -C iscsiuio clean
- 	[ ! -f iscsiuio/Makefile ] || $(MAKE) -C iscsiuio distclean
- 
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch
deleted file mode 100644
index 37d695f..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 79bea58a554205dd185509fbc4e76b5fc40f9038 Mon Sep 17 00:00:00 2001
-From: Joe MacDonald <joe_macdonald@mentor.com>
-Date: Tue, 15 Nov 2016 12:36:45 -0500
-Subject: [PATCH] fw_context: add include for NI_MAXHOST definiton
-
-This appears to build successfully with gcc 4.x but fails on gcc 5+, though it's
-not immediately clear why NI_MAXHOST isn't being defined from the include
-chain.  Currently engaging with the upstream devs to determine the best course
-of action, but this is an adequate workaround.
-
-Upstream-status: Pending
-
-Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
----
- include/fw_context.h | 4 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/include/fw_context.h b/include/fw_context.h
-index 44053d8..0b05cea 100644
---- a/include/fw_context.h
-+++ b/include/fw_context.h
-@@ -21,6 +21,10 @@
- #ifndef FWPARAM_CONTEXT_H_
- #define FWPARAM_CONTEXT_H_
- 
-+#include <sys/socket.h>
-+#ifndef NI_MAXHOST
-+#define NI_MAXHOST 1025
-+#endif
- #include <netdb.h>
- #include <net/if.h>
- 
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb
deleted file mode 100644
index 16ac199..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb
+++ /dev/null
@@ -1,122 +0,0 @@
-SUMMARY = "iSCSI daemon and utility programs"
-DESCRIPTION = "Open-iSCSI project is a high performance, transport \
-independent, multi-platform implementation of RFC3720. The iscsi package \
-provides the server daemon for the iSCSI protocol, as well as the utility \
-programs used to manage it. iSCSI is a protocol for distributed \
-disk access using SCSI commands sent over Internet Protocol networks."
-HOMEPAGE = "http://www.open-iscsi.com/"
-LICENSE = "GPLv2 & LGPLv2.1"
-SECTION = "net"
-DEPENDS = "openssl flex-native bison-native open-isns util-linux"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRCREV ?= "8db9717e73d32d2c5131da4f9ad86dfd9065f74b"
-
-SRC_URI = "git://github.com/open-iscsi/open-iscsi \
-    file://iscsi-initiator-utils-Do-not-clean-kernel-source.patch \
-    file://iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch \
-    file://initd.debian \
-    file://99_iscsi-initiator-utils \
-    file://iscsi-initiator \
-    file://iscsi-initiator.service \
-    file://iscsi-initiator-targets.service \
-    file://set_initiatorname \
-"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build"
-
-inherit update-rc.d systemd autotools distro_features_check
-# open-isns depends on systemd
-REQUIRED_DISTRO_FEATURES = "systemd"
-
-EXTRA_OECONF = " \
-    --target=${TARGET_SYS} \
-    --host=${BUILD_SYS} \
-    --prefix=${prefix} \
-    --libdir=${libdir} \
-"
-
-EXTRA_OEMAKE = ' \
-    CC="${CC}" \
-    AR="${AR}" \
-    RANLIB="${RANLIB}" \
-    CFLAGS="${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE -I. -I../include -I../../include -I../usr -I../../usr" \
-    LDFLAGS="${LDFLAGS}" \
-    LD="${LD}" \
-    OS="${TARGET_SYS}" \
-    TARGET="${TARGET_OS}" \
-    BASE="${prefix}" \
-    MANDIR="${mandir}" \
-'
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_configure () {
-    cd ${S}/iscsiuio ; autoreconf --install; ./configure ${EXTRA_OECONF}
-}
-
-do_compile () {
-    # Make sure we DO NOT regenerate prom_lex.c.
-    mv ${S}/utils/fwparam_ibft/prom_lex.l ${S}/utils/fwparam_ibft/prom_lex.l.unused
-    oe_runmake -C ${S} ${EXTRA_OEMAKE} user
-}
-
-do_install () {
-    #install necessary directories
-    install -d ${D}${sbindir} \
-        ${D}${sysconfdir}/init.d \
-        ${D}${sysconfdir}/iscsi \
-        ${D}${localstatedir}/lib/iscsi/nodes \
-        ${D}${localstatedir}/lib/iscsi/send_targets \
-        ${D}${localstatedir}/lib/iscsi/static \
-        ${D}${localstatedir}/lib/iscsi/isns \
-        ${D}${localstatedir}/lib/iscsi/slp \
-        ${D}${localstatedir}/lib/iscsi/ifaces \
-        ${D}/${mandir}/man8
-
-    install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \
-        ${S}/utils/iscsi-iname \
-        ${S}/usr/iscsistart ${D}/${sbindir}
-
-    install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8
-    install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi
-    install -p -m 755 ${WORKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid
-
-    sed -i -e "s:= /sbin/iscsid:= ${sbindir}/iscsid:" ${D}${sysconfdir}/iscsi/iscsid.conf
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        echo "d /run/${BPN}/lock - - - -" \
-                     > ${D}${sysconfdir}/tmpfiles.d/iscsi.conf
-        install -d ${D}/etc/default/
-        install -p -m 755 ${WORKDIR}/iscsi-initiator ${D}${sysconfdir}/default/
-
-        install -d ${D}${systemd_unitdir}/system/
-        install -m 0644 ${WORKDIR}/iscsi-initiator.service \
-                        ${WORKDIR}/iscsi-initiator-targets.service \
-                        ${D}${systemd_unitdir}/system/
-        install -d ${D}${nonarch_libdir}/iscsi
-        install -m 0755 ${WORKDIR}/set_initiatorname ${D}${nonarch_libdir}/iscsi
-    else
-        install -d ${D}/etc/default/volatiles
-        install -m 0644 ${WORKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles
-    fi
-}
-
-pkg_postinst_${PN}() {
-    if [ "x$D" = "x" ]; then
-        if [ -e /etc/init.d/populate-volatile.sh ]; then
-            /etc/init.d/populate-volatile.sh update
-        elif command -v systemd-tmpfiles >/dev/null; then
-            systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
-        fi
-    fi
-}
-
-SYSTEMD_SERVICE = " iscsi-initiator.service iscsi-initiator-targets.service "
-INITSCRIPT_NAME = "iscsid"
-INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ."
-
-FILES_${PN} += "${nonarch_libdir}/iscsi"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb
new file mode 100644
index 0000000..823227c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb
@@ -0,0 +1,117 @@
+SUMMARY = "iSCSI daemon and utility programs"
+DESCRIPTION = "Open-iSCSI project is a high performance, transport \
+independent, multi-platform implementation of RFC3720. The iscsi package \
+provides the server daemon for the iSCSI protocol, as well as the utility \
+programs used to manage it. iSCSI is a protocol for distributed \
+disk access using SCSI commands sent over Internet Protocol networks."
+HOMEPAGE = "http://www.open-iscsi.com/"
+LICENSE = "GPLv2 & LGPLv2.1"
+SECTION = "net"
+DEPENDS = "openssl flex-native bison-native open-isns util-linux"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRCREV ?= "24580adc4c174bbc5dde3ae7594a46d57635e906"
+
+SRC_URI = "git://github.com/open-iscsi/open-iscsi \
+    file://initd.debian \
+    file://99_iscsi-initiator-utils \
+    file://iscsi-initiator \
+    file://iscsi-initiator.service \
+    file://iscsi-initiator-targets.service \
+    file://set_initiatorname \
+    file://0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch \
+    file://0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch \
+    file://0001-qedi.c-Removed-unused-linux-ethtool.h.patch \
+    file://0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch \
+    file://0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch \
+    file://0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch \
+"
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
+
+inherit update-rc.d systemd autotools
+
+EXTRA_OECONF = " \
+    --target=${TARGET_SYS} \
+    --host=${BUILD_SYS} \
+"
+
+EXTRA_OEMAKE = ' \
+    OS="${TARGET_SYS}" \
+    TARGET="${TARGET_OS}" \
+    BASE="${prefix}" \
+    MANDIR="${mandir}" \
+'
+
+do_configure () {
+    cd ${S}/iscsiuio ; autoreconf --install; ./configure ${EXTRA_OECONF}
+}
+
+do_compile () {
+    # Make sure we DO NOT regenerate prom_lex.c.
+    if [ -f ${S}/utils/fwparam_ibft/prom_lex.l ]; then
+        mv ${S}/utils/fwparam_ibft/prom_lex.l ${S}/utils/fwparam_ibft/prom_lex.l.unused
+    fi
+    oe_runmake -C ${S} ${EXTRA_OEMAKE} user
+}
+
+do_install () {
+    #install necessary directories
+    install -d ${D}${sbindir} \
+        ${D}${sysconfdir}/init.d \
+        ${D}${sysconfdir}/iscsi \
+        ${D}${localstatedir}/lib/iscsi/nodes \
+        ${D}${localstatedir}/lib/iscsi/send_targets \
+        ${D}${localstatedir}/lib/iscsi/static \
+        ${D}${localstatedir}/lib/iscsi/isns \
+        ${D}${localstatedir}/lib/iscsi/slp \
+        ${D}${localstatedir}/lib/iscsi/ifaces \
+        ${D}${libdir} \
+        ${D}${mandir}/man8
+
+    install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \
+        ${S}/utils/iscsi-iname \
+        ${S}/usr/iscsistart ${D}/${sbindir}
+
+    cp -dR ${S}/libopeniscsiusr/libopeniscsiusr.so* ${D}${libdir}
+    install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8
+    install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi
+    install -p -m 755 ${WORKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid
+
+    sed -i -e "s:= /sbin/iscsid:= ${sbindir}/iscsid:" ${D}${sysconfdir}/iscsi/iscsid.conf
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /run/${BPN}/lock - - - -" \
+                     > ${D}${sysconfdir}/tmpfiles.d/iscsi.conf
+        install -d ${D}/etc/default/
+        install -p -m 755 ${WORKDIR}/iscsi-initiator ${D}${sysconfdir}/default/
+
+        install -d ${D}${systemd_unitdir}/system/
+        install -m 0644 ${WORKDIR}/iscsi-initiator.service \
+                        ${WORKDIR}/iscsi-initiator-targets.service \
+                        ${D}${systemd_unitdir}/system/
+        install -d ${D}${nonarch_libdir}/iscsi
+        install -m 0755 ${WORKDIR}/set_initiatorname ${D}${nonarch_libdir}/iscsi
+    else
+        install -d ${D}/etc/default/volatiles
+        install -m 0644 ${WORKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles
+    fi
+}
+
+pkg_postinst_${PN}() {
+    if [ "x$D" = "x" ]; then
+        if [ -e /etc/init.d/populate-volatile.sh ]; then
+            /etc/init.d/populate-volatile.sh update
+        elif command -v systemd-tmpfiles >/dev/null; then
+            systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
+        fi
+    fi
+}
+
+SYSTEMD_SERVICE = " iscsi-initiator.service iscsi-initiator-targets.service "
+INITSCRIPT_NAME = "iscsid"
+INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ."
+
+FILES_${PN} += "${nonarch_libdir}/iscsi"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb
deleted file mode 100644
index 5e7e6e4..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "High Availability monitor built upon LVS, VRRP and service pollers"
-DESCRIPTION = "Keepalived is a routing software written in C. The main goal \
-of this project is to provide simple and robust facilities for loadbalancing \
-and high-availability to Linux system and Linux based infrastructures. \
-Loadbalancing framework relies on well-known and widely used Linux Virtual \
-Server (IPVS) kernel module providing Layer4 loadbalancing \
-"
-HOMEPAGE = "http://www.keepalived.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "9964d295ec9d34ed3408b57d28847b68"
-SRC_URI[sha256sum] = "c0114d86ea4c896557beb0d9367819a423ffba772bc5d7c548dc455e6b3bd048"
-
-DEPENDS = "libnfnetlink openssl"
-
-inherit autotools pkgconfig systemd update-rc.d
-
-PACKAGECONFIG ??= "libnl snmp \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
-"
-PACKAGECONFIG[libnl] = "--enable-libnl,--disable-libnl,libnl"
-PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
-PACKAGECONFIG[systemd] = "--with-init=systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--with-init=SYSV,systemd"
-
-EXTRA_OECONF = "--disable-libiptc"
-EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d"
-
-do_install_append() {
-    if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then
-        chmod 0755 ${D}${sysconfdir}/init.d/${BPN}
-        sed -i 's#rc.d/##' ${D}${sysconfdir}/init.d/${BPN}
-    fi
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -D -m 0644 ${B}/${BPN}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
-    fi
-}
-
-FILES_${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt"
-
-INITSCRIPT_NAME = "keepalived"
-INITSCRIPT_PARAMS = "remove"
-
-SYSTEMD_SERVICE_${PN} = "keepalived.service"
-SYSTEMD_AUTO_ENABLE ?= "disable"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb
new file mode 100644
index 0000000..36417b7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb
@@ -0,0 +1,48 @@
+SUMMARY = "High Availability monitor built upon LVS, VRRP and service pollers"
+DESCRIPTION = "Keepalived is a routing software written in C. The main goal \
+of this project is to provide simple and robust facilities for loadbalancing \
+and high-availability to Linux system and Linux based infrastructures. \
+Loadbalancing framework relies on well-known and widely used Linux Virtual \
+Server (IPVS) kernel module providing Layer4 loadbalancing \
+"
+HOMEPAGE = "http://www.keepalived.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz"
+SRC_URI[md5sum] = "610af6e04071f02d3469191de7499f4e"
+SRC_URI[sha256sum] = "4e2d7cc01a6ee29a3955f5c622d47704ba7d9dd758189f15e9def016a2d1faa3"
+
+DEPENDS = "libnfnetlink openssl"
+
+inherit autotools pkgconfig systemd update-rc.d
+
+PACKAGECONFIG ??= "libnl snmp \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+"
+PACKAGECONFIG[libnl] = "--enable-libnl,--disable-libnl,libnl"
+PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
+PACKAGECONFIG[systemd] = "--with-init=systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--with-init=SYSV,systemd"
+
+EXTRA_OECONF = "--disable-libiptc"
+EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d"
+
+do_install_append() {
+    if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then
+        chmod 0755 ${D}${sysconfdir}/init.d/${BPN}
+        sed -i 's#rc.d/##' ${D}${sysconfdir}/init.d/${BPN}
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 0644 ${B}/${BPN}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
+    fi
+}
+
+FILES_${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt"
+
+INITSCRIPT_NAME = "keepalived"
+INITSCRIPT_PARAMS = "remove"
+
+SYSTEMD_SERVICE_${PN} = "keepalived.service"
+SYSTEMD_AUTO_ENABLE ?= "disable"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
index 029b857..97c515e 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
@@ -6,11 +6,11 @@
 
 Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
 
-diff --git a/configure.ac b/configure.ac
-index f5a5b74..4a20154 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -605,11 +605,6 @@ AC_ARG_ENABLE([werror],
+Index: openhpi-3.6.1/configure.ac
+===================================================================
+--- openhpi-3.6.1.orig/configure.ac
++++ openhpi-3.6.1/configure.ac
+@@ -656,11 +656,6 @@ AC_ARG_ENABLE([werror],
      fi],
      [])
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
index 205696e..60e2e79 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
@@ -4,10 +4,11 @@
 
 Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
 
-diff -urpN a/openhpid/safhpi.c b/openhpid/safhpi.c
---- a/openhpid/safhpi.c
-+++ b/openhpid/safhpi.c
-@@ -1976,7 +1976,7 @@ SaErrorT SAHPI_API saHpiSensorThresholds
+Index: openhpi-3.6.1/openhpid/safhpi.c
+===================================================================
+--- openhpi-3.6.1.orig/openhpid/safhpi.c
++++ openhpi-3.6.1/openhpid/safhpi.c
+@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholds
          oh_release_domain(d); /* Unlock domain */
  
          OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv,
@@ -16,10 +17,11 @@
          oh_release_handler(h);
  
          return rv;
-diff -urpN a/utils/sahpi_struct_utils.c b/utils/sahpi_struct_utils.c
---- a/utils/sahpi_struct_utils.c
-+++ b/utils/sahpi_struct_utils.c
-@@ -3855,6 +3855,9 @@ SaHpiBoolT oh_valid_textbuffer(SaHpiText
+Index: openhpi-3.6.1/utils/sahpi_struct_utils.c
+===================================================================
+--- openhpi-3.6.1.orig/utils/sahpi_struct_utils.c
++++ openhpi-3.6.1/utils/sahpi_struct_utils.c
+@@ -3861,6 +3861,9 @@ SaHpiBoolT oh_valid_textbuffer(SaHpiText
                                          /* found a unpaired surrogate */
                                          return SAHPI_FALSE;
                                  }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
index 7dac453..cc21ff8 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
@@ -14,11 +14,11 @@
     
     Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
 
-diff --git a/hpi_shell/session.c b/hpi_shell/session.c
-index 85c31bf..187da4c 100644
---- a/hpi_shell/session.c
-+++ b/hpi_shell/session.c
-@@ -66,7 +66,7 @@ static void* progress_bar(void *unused)
+Index: openhpi-3.6.1/hpi_shell/session.c
+===================================================================
+--- openhpi-3.6.1.orig/hpi_shell/session.c
++++ openhpi-3.6.1/hpi_shell/session.c
+@@ -73,7 +73,7 @@ static void* progress_bar(void *unused)
  		if (i < (PROGRESS_BUF_SIZE - mes_len - 1)) i++;
  		t++;
  	};
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
index 6d3b664..c848b35 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
@@ -6,11 +6,11 @@
 
 Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
 
-diff --git a/configure.ac b/configure.ac
-index 30a792c..b5f5aad 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -175,7 +175,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/md5.h openssl/bio.h openssl/ssl.h openss
+Index: openhpi-3.6.1/configure.ac
+===================================================================
+--- openhpi-3.6.1.orig/configure.ac
++++ openhpi-3.6.1/configure.ac
+@@ -177,7 +177,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/
  
  dnl xml is used for XML-based communication in ilo2_ribcl and oa_soap
  AC_CHECK_LIB([xml2],[xmlParseMemory],[XML2_LIB=-lxml2],[XML2_LIB=])
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
index 51537ef..3e09180 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
@@ -13,19 +13,16 @@
  configure.ac |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index 4b51971..16136b3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -7,7 +7,7 @@ dnl   various hacks by Sean Dague <http://dague.net/sean> 4/23/03
+Index: openhpi-3.6.1/configure.ac
+===================================================================
+--- openhpi-3.6.1.orig/configure.ac
++++ openhpi-3.6.1/configure.ac
+@@ -7,7 +7,7 @@ dnl   various hacks by Sean Dague <http:
  AC_PREREQ(2.57)
- AC_INIT(openhpi, 3.5.0)
+ AC_INIT(openhpi, 3.6.1)
  AC_CONFIG_SRCDIR(openhpi.spec.in)
 -AM_INIT_AUTOMAKE([1.8])
 +AM_INIT_AUTOMAKE([1.8 serial-tests])
  
  AM_CONFIG_HEADER(config.h)
  AH_TOP([#ifndef __OPENHPI_CONFIG_H
--- 
-1.7.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch
index 512e246..effe25c 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch
@@ -11,10 +11,10 @@
  3 files changed, 79 insertions(+), 3 deletions(-)
  create mode 100644 m4/ax_check_compile_flag.m4
 
-diff --git a/Makefile.am b/Makefile.am
-index d63fbbb..1012a2c 100644
---- a/Makefile.am
-+++ b/Makefile.am
+Index: opensaf-5.18.02/Makefile.am
+===================================================================
+--- opensaf-5.18.02.orig/Makefile.am
++++ opensaf-5.18.02/Makefile.am
 @@ -52,10 +52,10 @@ AM_CPPFLAGS = \
  	-pthread \
  	-D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \
@@ -26,14 +26,14 @@
 -AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
 +AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
 +AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
- AM_LDFLAGS = @OSAF_HARDEN_FLAGS@ -Wl,--as-needed -ldl -lrt -pthread -rdynamic
- ACLOCAL_AMFLAGS = -I m4
- OSAF_LIB_FLAGS =
-diff --git a/configure.ac b/configure.ac
-index 02771c6..b76b0fe 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -557,6 +557,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
+ 
+ if ENABLE_GCOV
+ AM_CFLAGS += --coverage
+Index: opensaf-5.18.02/configure.ac
+===================================================================
+--- opensaf-5.18.02.orig/configure.ac
++++ opensaf-5.18.02/configure.ac
+@@ -593,6 +593,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
  fi
  AC_SUBST(OSAF_HARDEN_FLAGS)
  
@@ -42,11 +42,10 @@
  #############################################
  # List the output Makefiles
  #############################################
-diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
-new file mode 100644
-index 0000000..dcabb92
+Index: opensaf-5.18.02/m4/ax_check_compile_flag.m4
+===================================================================
 --- /dev/null
-+++ b/m4/ax_check_compile_flag.m4
++++ opensaf-5.18.02/m4/ax_check_compile_flag.m4
 @@ -0,0 +1,74 @@
 +# ===========================================================================
 +#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
@@ -122,6 +121,3 @@
 +  [m4_default([$3], :)])
 +AS_VAR_POPDEF([CACHEVAR])dnl
 +])dnl AX_CHECK_COMPILE_FLAGS
--- 
-2.12.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb
deleted file mode 100644
index 74483d7..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
-DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
-middleware consistent with Service Availability Forum (SA Forum) \
-specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
-established by leading Communications and Enterprise Computing Companies to \
-facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
-code base in commercial products. \
-The OpenSAF project was launched in mid 2007 and has been under development by \
-an informal group of supporters of the OpenSAF initiative. The OpenSAF \
-Foundation was founded on January 22nd 2008 with Emerson Network Power, \
-Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
-HOMEPAGE = "http://www.opensaf.org"
-SECTION = "admin"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
-
-DEPENDS = "libxml2 python"
-TOOLCHAIN = "gcc"
-
-SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
-           file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
-           file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
-           file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
-           file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
-"
-SRC_URI[md5sum] = "125bcd9aabd7412aedcbfbf73f4e6196"
-SRC_URI[sha256sum] = "3fb2239bb2c9328c8b45368ff8d8de979ea286a27edc9871d218200e88bb91cc"
-
-inherit autotools useradd systemd pkgconfig
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "-f -r opensaf"
-USERADD_PARAM_${PN} =  "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
-
-SYSTEMD_SERVICE_${PN} += "opensafd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-PACKAGECONFIG[systemd] = ",,systemd"
-PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
-
-PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
-
-PKGLIBDIR="${libdir}"
-
-LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
-
-do_install_append() {
-    cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir}
-    rm -fr "${D}${localstatedir}/lock"
-    rm -fr "${D}${localstatedir}/run"
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
-    rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
-    if [ ! -d "${D}${sysconfdir}/init.d" ]; then
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
-    fi
-}
-
-FILES_${PN} += "${systemd_unitdir}/system/*.service"
-FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
-
-INSANE_SKIP_${PN} = "dev-so"
-
-RDEPENDS_${PN} += "bash python"
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.02.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.02.bb
new file mode 100644
index 0000000..4b556ce
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.02.bb
@@ -0,0 +1,67 @@
+SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
+DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
+middleware consistent with Service Availability Forum (SA Forum) \
+specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
+established by leading Communications and Enterprise Computing Companies to \
+facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
+code base in commercial products. \
+The OpenSAF project was launched in mid 2007 and has been under development by \
+an informal group of supporters of the OpenSAF initiative. The OpenSAF \
+Foundation was founded on January 22nd 2008 with Emerson Network Power, \
+Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
+HOMEPAGE = "http://www.opensaf.org"
+SECTION = "admin"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
+
+DEPENDS = "libxml2 python"
+TOOLCHAIN = "gcc"
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
+           file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
+           file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
+           file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
+           file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
+"
+SRC_URI[md5sum] = "42064f5ddbc7f560bfc5ff93ea9eecc7"
+SRC_URI[sha256sum] = "f9e24897f9cfd63bb3115f6275c706de1702d3d9bae2fc423227db72b23c37f0"
+
+inherit autotools useradd systemd pkgconfig
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-f -r opensaf"
+USERADD_PARAM_${PN} =  "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
+
+SYSTEMD_SERVICE_${PN} += "opensafd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+PACKAGECONFIG[systemd] = ",,systemd"
+PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
+
+PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
+
+PKGLIBDIR="${libdir}"
+
+LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
+
+do_install_append() {
+    cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir}
+    rm -fr "${D}${localstatedir}/lock"
+    rm -fr "${D}${localstatedir}/run"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+    rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
+    if [ ! -d "${D}${sysconfdir}/init.d" ]; then
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
+    fi
+}
+
+FILES_${PN} += "${systemd_unitdir}/system/*.service"
+FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+RDEPENDS_${PN} += "bash python"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf
new file mode 100644
index 0000000..e75c6fc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf
@@ -0,0 +1,105 @@
+compatibility_level = 2
+smtputf8_enable = no
+
+# Configure your domain and accounts
+#mydomain=sample.com
+#FQDN from gethostname
+#myhostname =
+mydomain=localdomain
+mydestination = $myhostname, localhost.localdomain localhost
+mynetworks = 127.0.0.1/8
+inet_interfaces = 127.0.0.1
+
+virtual_mailbox_domains = sample.com, other.net
+virtual_mailbox_maps = hash:/etc/postfix/virtual
+virtual_alias_maps = hash:/etc/postfix/virtual_alias
+
+alias_maps = hash:/etc/aliases
+
+# You'll start with the following lines for maildir storage
+virtual_mailbox_base = /var/spool/vmail
+virtual_uid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 3`
+virtual_gid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 4`
+
+
+# You'll start with the following lines for IMAP storage
+#virtual_transport = lmtp:unix:/var/lib/cyrus/socket/lmtp
+
+
+# General stuff here again
+#config_directory = /etc/postfix
+sample_directory = /etc/postfix
+queue_directory = /var/spool/postfix
+mail_spool_directory = /var/spool/mail
+readme_directory = no
+command_directory = /usr/sbin
+daemon_directory = @LIBEXECDIR@/postfix
+mail_owner = postfix
+setgid_group = postdrop
+unknown_local_recipient_reject_code = 450
+mynetworks_style = host
+debug_peer_level = 2
+sendmail_path = /usr/sbin/sendmail
+newaliases_path = /usr/bin/newaliases
+mailq_path = /usr/bin/mailq
+
+smtpd_data_restrictions =
+        permit_mynetworks,
+        reject_unauth_pipelining,
+        permit
+
+smtpd_client_restrictions =
+        permit_mynetworks,
+        # reject_unknown_client, # This can cause a lot of false rejects.
+        reject_invalid_hostname,
+        reject_rbl_client list.dsbl.org,
+        reject_rbl_client sbl.spamhaus.org,
+        reject_rbl_client cbl.abuseat.org,
+        reject_rbl_client dul.dnsbl.sorbs.net,
+        permit
+
+smtpd_helo_required = yes
+smtpd_helo_restrictions =
+        permit_mynetworks,
+        reject_unauth_pipelining,
+        # reject_non_fqdn_hostname, # This can cause a lot of false rejects.
+        # reject_unknown_hostname, # This can cause a lot of false rejects.
+        reject_invalid_hostname,
+        permit
+
+smtpd_sender_restrictions =
+        permit_mynetworks,
+        reject_non_fqdn_sender,
+        # check_sender_access hash:/etc/postfix/access_domains,
+        reject_unknown_sender_domain,
+        permit
+
+smtpd_recipient_restrictions =
+        permit_mynetworks,
+        permit_sasl_authenticated,
+        reject_unauth_destination,
+
+        # check_recipient_access pcre:/etc/postfix/recipient_checks.pcre,
+        # check_helo_access pcre:/etc/postfix/helo_checks.pcre,
+
+        # check_client_access hash:/etc/postfix/maps/access_client,
+        # check_client_access hash:/etc/postfix/maps/exceptions_client,
+        # check_helo_access hash:/etc/postfix/maps/access_helo,
+        # check_helo_access hash:/etc/postfix/maps/verify_helo,
+        # check_sender_access hash:/etc/postfix/maps/access_sender,
+        # check_sender_access hash:/etc/postfix/maps/verify_sender,
+        # check_recipient_access hash:/etc/postfix/maps/access_recipient,
+
+        # reject_multi_recipient_bounce,
+        reject_non_fqdn_recipient,
+        reject_unknown_recipient_domain,
+        # reject_unlisted_recipient,
+        #check_policy_service unix:private/policy,
+
+        # check_sender_access hash:/etc/postfix/maps/no_verify_sender,
+        # check_sender_access hash:/etc/postfix/access_domains,
+        # reject_unverified_sender,
+        # reject_unverified_recipient
+        check_recipient_access hash:/etc/postfix/internal_recipient
+
+disable_vrfy_command = yes
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf_2.0 b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf_2.0
deleted file mode 100644
index dc7feb5..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/main.cf_2.0
+++ /dev/null
@@ -1,102 +0,0 @@
-# Configure your domain and accounts
-#mydomain=sample.com
-#FQDN from gethostname
-#myhostname =
-mydomain=localdomain
-mydestination = $myhostname, localhost.localdomain localhost
-mynetworks = 127.0.0.1/8
-inet_interfaces = 127.0.0.1
-
-virtual_mailbox_domains = sample.com, other.net
-virtual_mailbox_maps = hash:/etc/postfix/virtual
-virtual_alias_maps = hash:/etc/postfix/virtual_alias
-
-alias_maps = hash:/etc/aliases
-
-# You'll start with the following lines for maildir storage
-virtual_mailbox_base = /var/spool/vmail
-virtual_uid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 3`
-virtual_gid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 4`
-
-
-# You'll start with the following lines for IMAP storage
-#virtual_transport = lmtp:unix:/var/lib/cyrus/socket/lmtp
-
-
-# General stuff here again
-#config_directory = /etc/postfix
-sample_directory = /etc/postfix
-queue_directory = /var/spool/postfix
-mail_spool_directory = /var/spool/mail
-readme_directory = no
-command_directory = /usr/sbin
-daemon_directory = @LIBEXECDIR@
-mail_owner = postfix
-setgid_group = postdrop
-unknown_local_recipient_reject_code = 450
-mynetworks_style = host
-debug_peer_level = 2
-sendmail_path = /usr/sbin/sendmail
-newaliases_path = /usr/bin/newaliases
-mailq_path = /usr/bin/mailq
-
-smtpd_data_restrictions =
-        permit_mynetworks,
-        reject_unauth_pipelining,
-        permit
-
-smtpd_client_restrictions =
-        permit_mynetworks,
-        # reject_unknown_client, # This can cause a lot of false rejects.
-        reject_invalid_hostname,
-        reject_rbl_client list.dsbl.org,
-        reject_rbl_client sbl.spamhaus.org,
-        reject_rbl_client cbl.abuseat.org,
-        reject_rbl_client dul.dnsbl.sorbs.net,
-        permit
-
-smtpd_helo_required = yes
-smtpd_helo_restrictions =
-        permit_mynetworks,
-        reject_unauth_pipelining,
-        # reject_non_fqdn_hostname, # This can cause a lot of false rejects.
-        # reject_unknown_hostname, # This can cause a lot of false rejects.
-        reject_invalid_hostname,
-        permit
-
-smtpd_sender_restrictions =
-        permit_mynetworks,
-        reject_non_fqdn_sender,
-        # check_sender_access hash:/etc/postfix/access_domains,
-        reject_unknown_sender_domain,
-        permit
-
-smtpd_recipient_restrictions =
-        permit_mynetworks,
-        permit_sasl_authenticated,
-        reject_unauth_destination,
-
-        # check_recipient_access pcre:/etc/postfix/recipient_checks.pcre,
-        # check_helo_access pcre:/etc/postfix/helo_checks.pcre,
-
-        # check_client_access hash:/etc/postfix/maps/access_client,
-        # check_client_access hash:/etc/postfix/maps/exceptions_client,
-        # check_helo_access hash:/etc/postfix/maps/access_helo,
-        # check_helo_access hash:/etc/postfix/maps/verify_helo,
-        # check_sender_access hash:/etc/postfix/maps/access_sender,
-        # check_sender_access hash:/etc/postfix/maps/verify_sender,
-        # check_recipient_access hash:/etc/postfix/maps/access_recipient,
-
-        # reject_multi_recipient_bounce,
-        reject_non_fqdn_recipient,
-        reject_unknown_recipient_domain,
-        # reject_unlisted_recipient,
-        #check_policy_service unix:private/policy,
-
-        # check_sender_access hash:/etc/postfix/maps/no_verify_sender,
-        # check_sender_access hash:/etc/postfix/access_domains,
-        # reject_unverified_sender,
-        # reject_unverified_recipient
-        check_recipient_access hash:/etc/postfix/internal_recipient
-
-disable_vrfy_command = yes
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service
index 3a9a0a1..30d54a4 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/files/postfix.service
@@ -7,7 +7,7 @@
 Type=forking
 PIDFile=@LOCALSTATEDIR@/spool/postfix/pid/master.pid
 ExecStartPre=-@SBINDIR@/check_hostname.sh
-ExecStartPre=-@LIBEXECDIR@/aliasesdb
+ExecStartPre=-@LIBEXECDIR@/postfix/aliasesdb
 ExecStart=@SBINDIR@/postfix start
 ExecReload=@SBINDIR@/postfix reload
 ExecStop=@SBINDIR@/postfix stop
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
index a588bd3..09447d5 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -6,11 +6,11 @@
 
 HOMEPAGE= "http://www.postfix.org"
 SECTION = "mail"
-DEPENDS = "virtual/db icu libpcre openssl postfix-native \
+DEPENDS = "db icu libpcre openssl postfix-native \
     ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \
 "
-DEPENDS_class-native = "virtual/db-native icu-native openssl-native libpcre-native"
+DEPENDS_class-native = "db-native icu-native openssl-native libpcre-native"
 
 LICENSE = "IPL-1.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354"
@@ -18,7 +18,7 @@
 SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
     file://makedefs.patch \
     file://install.patch \
-    file://main.cf_2.0 \
+    file://main.cf \
     file://postfix \
     file://internal_recipient \
     file://postfix.service \
@@ -135,7 +135,7 @@
 do_install () {
     sh ./postfix-install 'install_root=${D}' \
         'config_directory=${sysconfdir}/postfix' \
-        'daemon_directory=${libexecdir}' \
+        'daemon_directory=${libexecdir}/postfix' \
         'command_directory=${sbindir}' \
         'queue_directory=${localstatedir}/spool/postfix' \
         'sendmail_path=${sbindir}/sendmail.postfix' \
@@ -149,7 +149,7 @@
     mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
     install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/
     install -d ${D}${sysconfdir}/init.d
-    install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf
+    install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf
     sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf
 
     install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/
@@ -163,7 +163,7 @@
     sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service
     sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service
 
-    install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}
+    install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix
 
     install -m 770 -d ${D}${localstatedir}/spool/postfix
     chown postfix:postfix ${D}${localstatedir}/spool/postfix
@@ -219,8 +219,6 @@
     sed -i 's:-fdebug-prefix-map[^ ]*::g; s:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out
 }
 
-NATIVE_INSTALL_WORKS = "1"
-
 ALTERNATIVE_${PN} = "sendmail"
 ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
 ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
@@ -231,6 +229,7 @@
 ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
 ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
 
+PACKAGE_WRITE_DEPS += "postfix-native"
 pkg_postinst_${PN} () {
     if [ "x$D" = "x" ]; then
         touch /etc/aliases
@@ -240,19 +239,24 @@
         touch /etc/postfix/virtual_alias
         postmap /etc/postfix/virtual_alias
     else
+        if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
+            # /usr/lib/sendmail is required by LSB core test
+            [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+        fi
+
         touch $D/etc/aliases
-        newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
+        # This can fail depending on host setup
+        if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then
+            $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
+            exit 0
+        fi
         touch $D/etc/postfix/virtual_alias
         postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
 
-        if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
-            # /usr/lib/sendmial is required by LSB core test
-            [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
-        fi
     fi
 }
 
 # Exclude .debug directories from the main package
 FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \
                ${libexecdir}/* ${systemd_unitdir}/*"
-FILES_${PN}-dbg += "${libexecdir}/.debug"
+FILES_${PN}-dbg += "${libexecdir}/postfix/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
index 439ede9..89af406 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
@@ -1,18 +1,9 @@
 require postfix.inc
 
-SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
-           file://makedefs.patch \
-           file://install.patch \
-           file://main.cf_2.0 \
-           file://postfix \
-           file://internal_recipient \
-           file://postfix.service \
-           file://aliasesdb \
-           file://check_hostname.sh \
-           file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
-           file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
-           file://postfix-install.patch \
-           file://icu-config.patch \
+SRC_URI += "file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
+            file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
+            file://postfix-install.patch \
+            file://icu-config.patch \
            "
 SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0"
 SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc
index bff693c..06d16a4 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc
@@ -8,7 +8,7 @@
 choose a default router based on these advertisements."
 HOMEPAGE = "http://www.litech.org/radvd/"
 SECTION = "net"
-DEPENDS = "flex-native libdaemon"
+DEPENDS = "flex-native bison-native libdaemon "
 
 # License is BSD-Style (with advertising clause) but also has an additional 0th clause
 LICENSE = "radvd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch
index 48674c3..f482f80 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch
@@ -1,4 +1,4 @@
-From f9150a0dc092ab2cbd47ee428436b747dce323a9 Mon Sep 17 00:00:00 2001
+From 27e10667bf27baf5f119a791e3473bb9435a786a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 23 Apr 2017 10:28:28 -0700
 Subject: [PATCH] SquidNew: use noexcept instead of throw for C++11 compilers
@@ -11,6 +11,7 @@
                                                        ^~~~~
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  include/SquidNew.h | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
@@ -43,6 +44,3 @@
  {
      xfree(address);
  }
--- 
-2.12.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch
index 0c0a3aa..302136a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch
@@ -1,4 +1,4 @@
-From 14d469bc82c758116aef7d549abd49c131b4170f Mon Sep 17 00:00:00 2001
+From c21adbb0b230ffba97cf5d059e2bd024e13a37df Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 22 Apr 2017 11:54:57 -0700
 Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler
@@ -9,36 +9,18 @@
 client.c:834:23: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1010 [-Werror=format-truncation=]
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac                |  3 +-
- m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 76 insertions(+), 1 deletion(-)
- create mode 100644 m4/ax_check_compile_flag.m4
 
-Index: squid-3.5.26/configure.ac
-===================================================================
---- squid-3.5.26.orig/configure.ac
-+++ squid-3.5.26/configure.ac
-@@ -26,6 +26,7 @@ m4_include([acinclude/pkg.m4])
- m4_include([acinclude/lib-checks.m4])
- m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4])
- m4_include([acinclude/ax_cxx_0x_types.m4])
-+m4_include([acinclude/ax_check_compile_flag.m4])
- 
- HOSTCXX="$BUILD_CXX"
- PRESET_CFLAGS="$CFLAGS"
-@@ -44,6 +45,7 @@ AC_PROG_CXX
- AC_LANG([C++])
- AC_CANONICAL_HOST
- 
-+AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[CFLAGS="$CFLAGS -Wno-error=format-truncation" CXXFLAGS="$CXXFLAGS -Wno-error=format-truncation"])
- # Clang 3.2 on some CPUs requires -march-native to detect correctly.
- # GCC 4.3+ can also produce faster executables when its used.
- # But building inside a virtual machine environment has been found to
-Index: squid-3.5.26/acinclude/ax_check_compile_flag.m4
-===================================================================
+---
+ acinclude/ax_check_compile_flag.m4 | 74 ++++++++++++++++++++++++++++++++++++++
+ configure.ac                       |  2 ++
+ 2 files changed, 76 insertions(+)
+ create mode 100644 acinclude/ax_check_compile_flag.m4
+
+diff --git a/acinclude/ax_check_compile_flag.m4 b/acinclude/ax_check_compile_flag.m4
+new file mode 100644
+index 0000000..dcabb92
 --- /dev/null
-+++ squid-3.5.26/acinclude/ax_check_compile_flag.m4
++++ b/acinclude/ax_check_compile_flag.m4
 @@ -0,0 +1,74 @@
 +# ===========================================================================
 +#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
@@ -114,3 +96,23 @@
 +  [m4_default([$3], :)])
 +AS_VAR_POPDEF([CACHEVAR])dnl
 +])dnl AX_CHECK_COMPILE_FLAGS
+diff --git a/configure.ac b/configure.ac
+index ff4688c..9382fdf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,6 +26,7 @@ m4_include([acinclude/pkg.m4])
+ m4_include([acinclude/lib-checks.m4])
+ m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4])
+ m4_include([acinclude/ax_cxx_0x_types.m4])
++m4_include([acinclude/ax_check_compile_flag.m4])
+ 
+ HOSTCXX="$BUILD_CXX"
+ PRESET_CFLAGS="$CFLAGS"
+@@ -44,6 +45,7 @@ AC_PROG_CXX
+ AC_LANG([C++])
+ AC_CANONICAL_HOST
+ 
++AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[CFLAGS="$CFLAGS -Wno-error=format-truncation" CXXFLAGS="$CXXFLAGS -Wno-error=format-truncation"])
+ # Clang 3.2 on some CPUs requires -march-native to detect correctly.
+ # GCC 4.3+ can also produce faster executables when its used.
+ # But building inside a virtual machine environment has been found to
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch
index 082a111..8ea55d0 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch
@@ -1,4 +1,4 @@
-From a78f2f0feda8f92cb59afe8236bd90726908768f Mon Sep 17 00:00:00 2001
+From faaa796a138cbd5033b1e53f33faac0cf4162bf5 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 25 Jun 2017 00:59:24 -0700
 Subject: [PATCH] tools.cc: fixed unused-result warning
@@ -10,9 +10,8 @@
 |      ~~~~~~^~~
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
 
+---
  src/tools.cc | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
@@ -31,6 +30,3 @@
  #endif
  #if HAVE_PRCTL && defined(PR_SET_DUMPABLE)
      /* Set Linux DUMPABLE flag */
--- 
-2.13.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch
index 2304c5f..25f68af 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch
@@ -1,8 +1,7 @@
-From 0d5b337ff5ef7dd48f970f08bd95d6327917cfd1 Mon Sep 17 00:00:00 2001
-Message-Id: <0d5b337ff5ef7dd48f970f08bd95d6327917cfd1.1382375807.git.Jim.Somerville@windriver.com>
+From b4943594654cd340b95aabdc2f3750a4705cc0de Mon Sep 17 00:00:00 2001
 From: Jim Somerville <Jim.Somerville@windriver.com>
 Date: Mon, 21 Oct 2013 12:50:44 -0400
-Subject: [PATCH 1/1] Fix flawed dynamic -ldb link test in configure
+Subject: [PATCH] Fix flawed dynamic -ldb link test in configure
 
 The test uses dbopen, but just ignores the fact
 that this function may not exist in the db version
@@ -11,15 +10,16 @@
 about why and setting the need for -ldb incorrectly.
 
 Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+
 ---
- configure.ac |   12 ++++++++++--
- 1 files changed, 10 insertions(+), 2 deletions(-)
+ configure.ac | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 962a748..42e6a93 100644
+index 57cd1ac..3827222 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -3051,8 +3051,16 @@ AC_CHECK_DECL(dbopen,,,[
+@@ -3229,8 +3229,16 @@ AC_CHECK_DECL(dbopen,,,[
  #include <db.h>
  #endif])
  
@@ -38,6 +38,3 @@
  if test "x$ac_cv_dbopen_libdb" = "xyes"; then
      LIB_DB="-ldb"
  fi
--- 
-1.7.4.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch
index 4ca2744..3852f7c 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch
@@ -1,29 +1,28 @@
-From 17e5a28667f667859c48bee25e575a072d39ee1b Mon Sep 17 00:00:00 2001
-Message-Id: <17e5a28667f667859c48bee25e575a072d39ee1b.1381956170.git.Jim.Somerville@windriver.com>
+From 995aaf30799fa972441354b6feb45f0621968929 Mon Sep 17 00:00:00 2001
 From: Jim Somerville <Jim.Somerville@windriver.com>
 Date: Wed, 16 Oct 2013 16:41:03 -0400
-Subject: [PATCH 1/1] Set up for cross compilation
+Subject: [PATCH] Set up for cross compilation
+
+Message-Id: <17e5a28667f667859c48bee25e575a072d39ee1b.1381956170.git.Jim.Somerville@windriver.com>
 
 Set the host compiler to BUILD_CXX so
 proper cross compilation can occur.
 
 Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
+
 ---
- configure.ac |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
 
 diff --git a/configure.ac b/configure.ac
-index c2d3033..dda9ed9 100644
+index fe80ee0..57cd1ac 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -19,6 +19,7 @@ m4_include([acinclude/lib-checks.m4])
- m4_include([acinclude/ax_cxx_compile_stdcxx_0x.m4])
+@@ -27,6 +27,7 @@ m4_include([acinclude/lib-checks.m4])
+ m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4])
  m4_include([acinclude/ax_cxx_0x_types.m4])
  
 +HOSTCXX="$BUILD_CXX"
  PRESET_CFLAGS="$CFLAGS"
  PRESET_CXXFLAGS="$CXXFLAGS"
  PRESET_LDFLAGS="$LDFLAGS"
--- 
-1.7.4.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch
index 7b6dcc8..6a33525 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch
@@ -1,3 +1,6 @@
+From a85311965707ba2fa78f7ce044e6f61e65e66fd0 Mon Sep 17 00:00:00 2001
+From: Jim Somerville <Jim.Somerville@windriver.com>
+Date: Tue, 14 Oct 2014 02:56:08 -0400
 Subject: [PATCH] Skip AC_RUN_IFELSE tests
 
 Upstream-Status: Inappropriate [cross compiling specific]
@@ -7,16 +10,17 @@
 
 Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
 ---
- acinclude/krb5.m4       |   10 +++++++++-
- acinclude/lib-checks.m4 |    8 ++++++--
+ acinclude/krb5.m4       | 10 +++++++++-
+ acinclude/lib-checks.m4 |  8 ++++++--
  2 files changed, 15 insertions(+), 3 deletions(-)
 
 diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4
-index 946bea8..7a072a2 100644
+index 5c83d88..c264118 100644
 --- a/acinclude/krb5.m4
 +++ b/acinclude/krb5.m4
-@@ -82,7 +82,15 @@ main(void)
+@@ -61,7 +61,15 @@ main(void)
  
          return 0;
  }
@@ -34,31 +38,28 @@
    ])
  ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H
 diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4
-index 2bf98ee..50dba9b 100644
+index c4874da..ba72982 100644
 --- a/acinclude/lib-checks.m4
 +++ b/acinclude/lib-checks.m4
-@@ -128,7 +128,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[
-    AC_DEFINE(SQUID_SSLGETCERTIFICATE_BUGGY, 1)
-    AC_MSG_RESULT([yes])
+@@ -177,7 +177,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[
+   [
+    AC_MSG_RESULT([no])
    ],
 -  [])
 +  [
 +   AC_MSG_RESULT([skipped - can't test in cross-compiled env])
 +  ])
  
-   AC_MSG_CHECKING(whether the workaround for SSL_get_certificate works)
-   AC_RUN_IFELSE([
-@@ -154,7 +156,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[
-   [
-    AC_MSG_RESULT([no])
+ SQUID_STATE_ROLLBACK(check_const_SSL_METHOD)
+ ]
+@@ -265,7 +267,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1)
    ],
 -[])
 +[
 +   AC_MSG_RESULT([skipped - can't test in cross-compiled env])
 +])
  
- SQUID_STATE_ROLLBACK(check_SSL_get_certificate)
+ SQUID_STATE_ROLLBACK(check_TXTDB)
  ])
--- 
-1.7.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch
index cc1ea78..2feca49 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch
@@ -1,11 +1,20 @@
+From 660fce9cfa00a57e5b7cec46116a31e21595c306 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 19 Jun 2017 23:47:01 -0700
+Subject: [PATCH] squid: Upgrade to 3.5.26
+
 ../../squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc: In function 'void squidaio_init()':                                                              ../../squid-3.5.26/src/DiskIO/DiskThreads/DiskThreads.h:30:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]      #define NUMTHREADS (Config.cacheSwap.n_configured*16)
 
-
 Upstream-Status: Backport
-Index: squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc
-===================================================================
---- squid-3.5.26.orig/src/DiskIO/DiskThreads/aiops.cc
-+++ squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc
+
+---
+ src/DiskIO/DiskThreads/aiops.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc
+index b44adfa..e11f948 100644
+--- a/src/DiskIO/DiskThreads/aiops.cc
++++ b/src/DiskIO/DiskThreads/aiops.cc
 @@ -290,7 +290,7 @@ squidaio_init(void)
      /* Create threads and get them to sit in their wait loop */
      squidaio_thread_pool = memPoolCreate("aio_thread", sizeof(squidaio_thread_t));
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch
index fdcd174..e990480 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch
@@ -1,15 +1,23 @@
-Set the SYSROOT for libxml2 header file to avoid host contamination.
+From 702bd881b66dc034e711c0ff47805f2da40b6e0d Mon Sep 17 00:00:00 2001
+From: Yue Tao <yue.tao@windriver.com>
+Date: Mon, 8 Aug 2016 16:04:33 +0800
+Subject: [PATCH] Set the SYSROOT for libxml2 header file to avoid host
+ contamination.
 
 Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Yue Tao <yue.tao@windriver.com>
 Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
 
-diff --git a/configure.ac.old b/configure.ac
-index 54eda73..874f48e 100644
---- a/configure.ac.old
+---
+ configure.ac | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 504a844..ff4688c 100644
+--- a/configure.ac
 +++ b/configure.ac
-@@ -964,15 +964,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then
+@@ -974,15 +974,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then
    dnl Find the main header and include path...
    AC_CACHE_CHECK([location of libxml2 include files], [ac_cv_libxml2_include], [
      AC_CHECK_HEADERS([libxml/parser.h], [], [
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch
index 312f44f..e5267ea 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch
@@ -1,4 +1,4 @@
-From 54a9c2ba60adc7ec2724786662fd398e7c03999f Mon Sep 17 00:00:00 2001
+From 8786b91488dae3f6dfeadd686e80d2ffc5c29320 Mon Sep 17 00:00:00 2001
 From: Jackie Huang <jackie.huang@windriver.com>
 Date: Thu, 25 Aug 2016 15:22:57 +0800
 Subject: [PATCH] squid: don't do squid-conf-tests at build time
@@ -14,12 +14,13 @@
 Upstream-Status: Inappropriate [cross compile specific]
 
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
 ---
  test-suite/Makefile.am | 15 +++++++--------
  1 file changed, 7 insertions(+), 8 deletions(-)
 
 diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am
-index d5468be..77fc480 100644
+index 061a463..350dfb2 100644
 --- a/test-suite/Makefile.am
 +++ b/test-suite/Makefile.am
 @@ -41,8 +41,7 @@ TESTS += debug \
@@ -58,6 +59,3 @@
  		else break; fi; \
  	done; \
  	if test "$$failed" -eq 0; then cp $(TRUE) $@ ; fi
--- 
-2.8.3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch
index 01ec596..9c75f17 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch
@@ -1,4 +1,4 @@
-From bd58d3672bc267824000f34a37561c7ab2bd571f Mon Sep 17 00:00:00 2001
+From 9bcec221a2bb438d8a9ed59aed846ffe3be9cffa Mon Sep 17 00:00:00 2001
 From: Jackie Huang <jackie.huang@windriver.com>
 Date: Tue, 19 Jul 2016 01:56:23 -0400
 Subject: [PATCH] squid: use serial-tests config needed by ptest
@@ -9,12 +9,13 @@
 Upstream-Status: Inappropriate [default automake behavior incompatible with ptest]
 
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
 ---
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index 05ad027..e324b93 100644
+index 3827222..504a844 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -10,7 +10,7 @@ AC_PREREQ(2.61)
@@ -26,6 +27,3 @@
  AC_REVISION($Revision$)dnl
  AC_PREFIX_DEFAULT(/usr/local/squid)
  AM_MAINTAINER_MODE
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch
index 5f2860e..b69de1d 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch
@@ -1,20 +1,25 @@
-vsftpd: change default value of secure_chroot_dir
+From ce2be5d4967445828d5ae9d9462cfaa78ae03c73 Mon Sep 17 00:00:00 2001
+From: Ming Liu <ming.liu@windriver.com>
+Date: Wed, 18 Sep 2013 09:44:20 +0800
+Subject: [PATCH] vsftpd: change default value of secure_chroot_dir
 
 Upstream-Status: Pending
 
 Change secure_chroot_dir pointing to a volatile directory.
 
 Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
 ---
- INSTALL       |    6 +++---
- tunables.c    |    2 +-
- vsftpd.conf.5 |    2 +-
+ INSTALL       | 6 +++---
+ tunables.c    | 2 +-
+ vsftpd.conf.5 | 2 +-
  3 files changed, 5 insertions(+), 5 deletions(-)
 
-diff -urpN a/INSTALL b/INSTALL
---- a/INSTALL	2013-09-13 10:23:57.504972397 +0800
-+++ b/INSTALL	2013-09-13 10:25:25.664971779 +0800
-@@ -27,11 +27,11 @@ user in case it does not already exist. 
+diff --git a/INSTALL b/INSTALL
+index 4f811aa..427122a 100644
+--- a/INSTALL
++++ b/INSTALL
+@@ -27,11 +27,11 @@ user in case it does not already exist. e.g.:
  [root@localhost root]# useradd nobody
  useradd: user nobody exists
  
@@ -29,9 +34,10 @@
  
  2c) For anonymous FTP, you will need the user "ftp" to exist, and have a
  valid home directory (which is NOT owned or writable by the user "ftp").
-diff -urpN a/tunables.c b/tunables.c
---- a/tunables.c	2013-09-13 10:26:29.554972817 +0800
-+++ b/tunables.c	2013-09-13 10:27:18.104972210 +0800
+diff --git a/tunables.c b/tunables.c
+index 284a10d..8c63c3f 100644
+--- a/tunables.c
++++ b/tunables.c
 @@ -254,7 +254,7 @@ tunables_load_defaults()
    /* -rw------- */
    tunable_chown_upload_mode = 0600;
@@ -41,10 +47,11 @@
    install_str_setting("ftp", &tunable_ftp_username);
    install_str_setting("root", &tunable_chown_username);
    install_str_setting("/var/log/xferlog", &tunable_xferlog_file);
-diff -urpN a/vsftpd.conf.5 b/vsftpd.conf.5
---- a/vsftpd.conf.5	2013-09-13 10:09:33.774972462 +0800
-+++ b/vsftpd.conf.5	2013-09-13 10:10:41.914971989 +0800
-@@ -969,7 +969,7 @@ This option should be the name of a dire
+diff --git a/vsftpd.conf.5 b/vsftpd.conf.5
+index fcc6022..e4ffdee 100644
+--- a/vsftpd.conf.5
++++ b/vsftpd.conf.5
+@@ -969,7 +969,7 @@ This option should be the name of a directory which is empty. Also, the
  directory should not be writable by the ftp user. This directory is used
  as a secure chroot() jail at times vsftpd does not require filesystem access.
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch
index c3919e1..d81c94a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch
@@ -1,9 +1,10 @@
-From e55135c2a4ea7eae3cb1f4dccf69ca477ea095bf Mon Sep 17 00:00:00 2001
+From c5caf52b9ed79da8916ef5722efe6df61a856e2f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 28 Mar 2017 20:09:12 -0700
 Subject: [PATCH] sysdeputil.c: Fix with musl which does not have utmpx
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  sysdeputil.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
@@ -23,6 +24,3 @@
  
  #define __USE_GNU
  #include <utmpx.h>
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch
index 7accbbc..c6c0f80 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch
@@ -1,4 +1,4 @@
-From 37cc924363515c8c309944c455bcbba7ddcc8eda Mon Sep 17 00:00:00 2001
+From 9c4826c19f04da533886209361a2caddf582d65c Mon Sep 17 00:00:00 2001
 From: Mingli Yu <Mingli.Yu@windriver.com>
 Date: Tue, 6 Sep 2016 17:17:44 +0800
 Subject: [PATCH] vsftpd: allow sysinfo() in the seccomp sandbox
@@ -24,6 +24,7 @@
 OOPS: priv_sock_get_cmd
 
 Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+
 ---
  seccompsandbox.c | 1 +
  1 file changed, 1 insertion(+)
@@ -40,6 +41,3 @@
    /* Misc */
    allow_nr(__NR_umask);
  
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch
index 1980d09..5ad5c14 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch
@@ -1,14 +1,22 @@
-Use DESTDIR within install to allow installing under a prefix
+From bab3f62f1fd5b7c2ab197f4311ad191bf18816b9 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Mon, 20 Feb 2012 13:51:49 +0000
+Subject: [PATCH] Use DESTDIR within install to allow installing under a prefix
 
 Upstream-Status: Pending
 
 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 
+---
+ Makefile | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
 diff --git a/Makefile b/Makefile
+index c63ed1b..9e4f35f 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -24,21 +24,21 @@
- 	$(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS)
+@@ -29,21 +29,21 @@ vsftpd: $(OBJS)
+ 	$(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
  
  install:
 -	if [ -x /usr/local/sbin ]; then \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch
index 9a10f72..d2e58a3 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch
@@ -1,4 +1,8 @@
-Hardcode LIBS instead of using a script to determine available libs
+From 328799d0cd5c523ad7a814fefec16d8a84aa8010 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Tue, 16 Apr 2013 10:53:55 +0000
+Subject: [PATCH] Hardcode LIBS instead of using a script to determine
+ available libs
 
 We want to avoid this dynamic detection so we have a deterministic
 build.
@@ -7,15 +11,20 @@
 
 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
 diff --git a/Makefile b/Makefile
+index 9e4f35f..3a5535d 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -5,7 +5,7 @@
- #CFLAGS = -g
- CFLAGS	=	-O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
+@@ -8,7 +8,7 @@ CFLAGS	=	-O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
+ 	-D_FORTIFY_SOURCE=2 \
+ 	#-pedantic -Wconversion
  
 -LIBS	=	`./vsf_findlibs.sh`
 +LIBS	=	-lssl -lcrypto -lnsl -lresolv
  LINK	=	-Wl,-s
+ LDFLAGS	=	-fPIE -pie -Wl,-z,relro -Wl,-z,now
  
- OBJS	=	main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch
index fd31600..e596073 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch
@@ -1,10 +1,18 @@
-Disable stripping at link time
+From 261874ea47973ea156141185082252fc92081906 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Tue, 16 Apr 2013 10:53:55 +0000
+Subject: [PATCH] Disable stripping at link time
 
 Upstream-Status: Inappropriate [config]
 
 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
 diff --git a/Makefile b/Makefile
+index 3a5535d..e78019a 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -9,7 +9,6 @@ CFLAGS	=	-O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch
index fdcf3a0..a4387c1 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch
@@ -1,11 +1,20 @@
-Disable PAM
+From 71628ddc91b6efb9b922a3fcf8cc18522f5387be Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Mon, 20 Feb 2012 13:51:49 +0000
+Subject: [PATCH] Disable PAM
 
 Upstream-Status: Inappropriate [config]
 
 Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h
---- vsftpd-2.0.1_org/builddefs.h	2004-07-02 16:36:59.000000000 +0200
-+++ vsftpd-2.0.1_patch/builddefs.h	2004-07-21 09:34:49.044900488 +0200
+
+---
+ builddefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builddefs.h b/builddefs.h
+index 0106d1a..f48a568 100644
+--- a/builddefs.h
++++ b/builddefs.h
 @@ -2,7 +2,7 @@
  #define VSF_BUILDDEFS_H
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch
index 32f7e82..590eb58 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch
@@ -1,4 +1,7 @@
-Fix the CVE-2015-1419
+From b756444854c5ab3b1284fd7113043fe8860e99ec Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Fri, 24 Apr 2015 09:36:48 +0800
+Subject: [PATCH] Fix the CVE-2015-1419
 
 Upstream-Status: Pending
 
@@ -9,10 +12,17 @@
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 
-diff -up vsftpd-2.1.0/ls.c.filter vsftpd-2.1.0/ls.c
---- vsftpd-2.1.0/ls.c.filter	2008-02-02 02:30:41.000000000 +0100
-+++ vsftpd-2.1.0/ls.c	2009-01-08 19:31:15.000000000 +0100
-@@ -239,9 +239,31 @@ vsf_filename_passes_filter(const struct 
+---
+ ls.c  | 26 ++++++++++++++++++++++++--
+ str.c | 11 +++++++++++
+ str.h |  1 +
+ 3 files changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/ls.c b/ls.c
+index 7e1376d..e9302dd 100644
+--- a/ls.c
++++ b/ls.c
+@@ -246,9 +246,31 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
    int ret = 0;
    char last_token = 0;
    int must_match_at_current_pos = 1;
@@ -46,10 +56,11 @@
    while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX)
    {
      static struct mystr s_match_needed_str;
-diff -up vsftpd-2.1.0/str.c.filter vsftpd-2.1.0/str.c
---- vsftpd-2.1.0/str.c.filter	2008-12-17 06:54:16.000000000 +0100
-+++ vsftpd-2.1.0/str.c	2009-01-08 19:31:15.000000000 +0100
-@@ -680,3 +680,14 @@ str_replace_unprintable(struct mystr* p_
+diff --git a/str.c b/str.c
+index 6596204..ba4b92a 100644
+--- a/str.c
++++ b/str.c
+@@ -711,3 +711,14 @@ str_replace_unprintable(struct mystr* p_str, char new_char)
    }
  }
  
@@ -64,10 +75,11 @@
 +  if (str_isempty(d_str))
 +   str_copy (d_str, path);
 +}
-diff -up vsftpd-2.1.0/str.h.filter vsftpd-2.1.0/str.h
---- vsftpd-2.1.0/str.h.filter	2008-12-17 06:53:23.000000000 +0100
-+++ vsftpd-2.1.0/str.h	2009-01-08 19:32:14.000000000 +0100
-@@ -100,6 +100,7 @@ void str_replace_unprintable(struct myst
+diff --git a/str.h b/str.h
+index ab0a9a4..3a21b50 100644
+--- a/str.h
++++ b/str.h
+@@ -100,6 +100,7 @@ void str_replace_unprintable(struct mystr* p_str, char new_char);
  int str_atoi(const struct mystr* p_str);
  filesize_t str_a_to_filesize_t(const struct mystr* p_str);
  unsigned int str_octal_to_uint(const struct mystr* p_str);
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch
index 69745b3..c558aee 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch
@@ -1,11 +1,15 @@
-Enable tcp_wrapper.
+From c026b0c0de4eebb189bc77b2d4c3b9528454ac04 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Fri, 19 Jul 2013 10:19:25 +0800
+Subject: [PATCH] Enable tcp_wrapper.
 
 Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
 ---
- builddefs.h |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ builddefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/builddefs.h b/builddefs.h
 index e908352..0106d1a 100644
@@ -20,6 +24,3 @@
  #define VSF_BUILD_PAM
  #undef VSF_BUILD_SSL
  
--- 
-1.7.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch b/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch
deleted file mode 100644
index fe4b079..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 85ea47fedbc96ed9180e08b0d371d9966e3a88da Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 30 Aug 2017 17:28:55 -0700
-Subject: [PATCH] Include fcntl.h for F_* and O_* defines
-
-Fixes errors like
-utils.c:95:22: error: use of undeclared identifier 'O_WRONLY'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- qdevices/utils.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/qdevices/utils.c b/qdevices/utils.c
-index 41850b8c..87090853 100644
---- a/qdevices/utils.c
-+++ b/qdevices/utils.c
-@@ -39,6 +39,7 @@
- 
- #include <err.h>
- #include <errno.h>
-+#include <fcntl.h>
- #include <inttypes.h>
- #include <libgen.h>
- #include <stdio.h>
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb
deleted file mode 100644
index 33e74e2..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb
+++ /dev/null
@@ -1,80 +0,0 @@
-SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces"
-DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \
-APIs and libraries, default configuration files, and an init script."
-HOMEPAGE = "http://corosync.github.io/corosync/"
-
-SECTION = "base"
-
-inherit autotools pkgconfig systemd useradd
-
-SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz \
-           file://0001-Include-fcntl.h-for-F_-and-O_-defines.patch \
-          "
-SRC_URI[md5sum] = "547fa78704da53aa35912be58d31035f"
-SRC_URI[sha256sum] = "f26e3011309fe4bcce94b1dc20ea8c462f19483a73f3ca62f13b925d011a4ba9"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d"
-
-DEPENDS = "groff-native nss libqb"
-
-SYSTEMD_SERVICE_${PN} = "corosync.service corosync-notifyd.service \
-                         ${@bb.utils.contains('PACKAGECONFIG', 'qdevice', 'corosync-qdevice.service', '', d)} \
-                         ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'corosync-qnetd.service', '', d)} \
-"
-SYSTEMD_AUTO_ENABLE = "enable"
-
-INITSCRIPT_NAME = "corosync-daemon"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
-                   dbus qdevice qnetd snmp \
-"
-
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[qdevice] = "--enable-qdevices,--disable-qdevices"
-PACKAGECONFIG[qnetd] = "--enable-qnetd,--disable-qnetd"
-PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
-PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd"
-
-EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash"
-EXTRA_OEMAKE = "tmpfilesdir_DATA="
-
-do_configure_prepend() {
-    ( cd ${S}
-    ${S}/autogen.sh )
-}
-
-do_install_append() {
-    install -d ${D}${sysconfdir}/sysconfig/
-    install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync
-    install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd
-
-    rm -rf "${D}${localstatedir}/run"
-
-    install -d ${D}${sysconfdir}/default/volatiles
-    echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync
-
-    if ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'true', 'false', d)}; then
-        chown -R coroqnetd:coroqnetd ${D}${sysconfdir}/${BPN}/qnetd
-        echo "d coroqnetd coroqnetd 0770 /var/run/corosync-qnetd none" >> ${D}${sysconfdir}/default/volatiles/05_corosync
-    fi
-
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf
-
-        if ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'true', 'false', d)}; then
-            install -m 0644 ${S}/conf/tmpfiles.d/corosync-qnetd.conf ${D}${sysconfdir}/tmpfiles.d
-        fi
-    fi
-}
-
-RDEPENDS_${PN} += "bash"
-
-FILES_${PN}-dbg += "${libexecdir}/lcrso/.debug"
-FILES_${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system coroqnetd"
-USERADD_PARAM_${PN} = "--system -d / -M -s /bin/nologin -c 'User for corosync-qnetd' -g coroqnetd coroqnetd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.3.bb
new file mode 100644
index 0000000..9673fa3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/corosync/corosync_2.4.3.bb
@@ -0,0 +1,79 @@
+SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces"
+DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \
+APIs and libraries, default configuration files, and an init script."
+HOMEPAGE = "http://corosync.github.io/corosync/"
+
+SECTION = "base"
+
+inherit autotools pkgconfig systemd useradd
+
+SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "bf0ede13018aadc8a046183bc593b0e0"
+SRC_URI[sha256sum] = "b1e7e422e8d2f7af8e5315fa329b1dbd1175fff32efaa55e8054584c80a2c597"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d"
+
+DEPENDS = "groff-native nss libqb"
+
+SYSTEMD_SERVICE_${PN} = "corosync.service corosync-notifyd.service \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'qdevice', 'corosync-qdevice.service', '', d)} \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'corosync-qnetd.service', '', d)} \
+"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+INITSCRIPT_NAME = "corosync-daemon"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+                   dbus qdevice qnetd snmp \
+"
+
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[qdevice] = "--enable-qdevices,--disable-qdevices"
+PACKAGECONFIG[qnetd] = "--enable-qnetd,--disable-qnetd"
+PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
+PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd"
+
+EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash ap_cv_cc_pie=no"
+EXTRA_OEMAKE = "tmpfilesdir_DATA="
+
+do_configure_prepend() {
+    ( cd ${S}
+    ${S}/autogen.sh )
+}
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/sysconfig/
+    install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync
+    install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd
+
+    rm -rf "${D}${localstatedir}/run"
+
+    install -d ${D}${sysconfdir}/default/volatiles
+    echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync
+
+    if [ ${@bb.utils.filter('PACKAGECONFIG', 'qnetd', d)} ]; then
+        chown -R coroqnetd:coroqnetd ${D}${sysconfdir}/${BPN}/qnetd
+        echo "d coroqnetd coroqnetd 0770 /var/run/corosync-qnetd none" >> ${D}${sysconfdir}/default/volatiles/05_corosync
+    fi
+
+    if [ ${@bb.utils.filter('DISTRO_FEATURES','systemd',d)} ]; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf
+
+        if [ ${@bb.utils.filter('PACKAGECONFIG', 'qnetd', d)} ]; then
+            install -m 0644 ${S}/conf/tmpfiles.d/corosync-qnetd.conf ${D}${sysconfdir}/tmpfiles.d
+        fi
+    fi
+}
+
+RDEPENDS_${PN} += "bash ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
+
+FILES_${PN}-dbg += "${libexecdir}/lcrso/.debug"
+FILES_${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system coroqnetd"
+USERADD_PARAM_${PN} = "--system -d / -M -s /bin/nologin -c 'User for corosync-qnetd' -g coroqnetd coroqnetd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
index 6593661..5d13591 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb
@@ -60,3 +60,5 @@
 
 RDEPENDS_${PN} = "kernel-module-iscsi-trgt"
 RRECOMMENDS_${PN} = "kernel-module-crc32c kernel-module-libcrc32c"
+
+PNBLACKLIST[iscsitarget] = "error: implicit declaration of function 'init_timer'; did you mean 'init_timers'?; 4.15 kernel issues"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common
index 640025d..1ae18fe 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common
@@ -20,7 +20,7 @@
 config=/etc/default/$prog
 [ -f "$config" ] && . "$config"
 
-function get_supported_tables() {
+get_supported_tables() {
 	EBTABLES_SUPPORTED_TABLES=
 	/sbin/ebtables -t filter -L 2>&1 1>/dev/null | grep -q permission
 	if [ $? -eq 0 ]; then
@@ -35,7 +35,7 @@
 	done
 }
 
-function load() {
+load() {
 	RETVAL=0
 	get_supported_tables
 	echo -n "Restoring ebtables rulesets: "
@@ -64,7 +64,7 @@
 	fi
 }
 
-function clear() {
+clear_rules() {
 	RETVAL=0
 	get_supported_tables
 	echo -n "Clearing ebtables rulesets: "
@@ -90,7 +90,7 @@
 	fi
 }
 
-function save() {
+save() {
 	RETVAL=0
 	get_supported_tables
 	echo -n "Saving ebtables rulesets: "
@@ -127,11 +127,11 @@
 	;;
   stop)
 	[ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save
-	clear
+	clear_rules
 	;;
   restart|reload|force-reload)
 	[ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save
-	clear
+	clear_rules
 	[ "$EBTABLES_LOAD_ON_START" = "yes" ] && load
 	;;
   load)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
index d5e7341..b9dce69 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb
@@ -29,9 +29,10 @@
            file://0007-extensions-Use-stdint-types.patch \
            file://0008-ethernetdb.h-Remove-C-specific-compiler-hint-macro-_.patch \
            file://0009-ebtables-Allow-RETURN-target-rules-in-user-defined-c.patch \
-           file://0010-Adjust-header-include-sequence.patch \
            "
 
+SRC_URI_append_libc-musl = " file://0010-Adjust-header-include-sequence.patch"
+
 SRC_URI[md5sum] = "506742a3d44b9925955425a659c1a8d0"
 SRC_URI[sha256sum] = "dc6f7b484f207dc712bfca81645f45120cb6aee3380e77a1771e9c34a9a4455d"
 
@@ -42,10 +43,10 @@
 python __anonymous () {
     import re
 
-    karch = d.getVar('KARCH')
+    karch = d.getVar('TARGET_ARCH')
     multilib = d.getVar('MLPREFIX')
 
-    if multilib and karch == 'powerpc64':
+    if multilib and ( karch == 'powerpc64' or karch == 'arm' ):
         searchstr = "lib.?32"
         reg = re.compile(searchstr)
         if reg.search(multilib):
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch
index 9377f57..e717d5b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch
@@ -20,10 +20,10 @@
  src/libnetfilter_cthelper.c | 83 ++++++++++++++++++---------------------------
  3 files changed, 36 insertions(+), 54 deletions(-)
 
-diff --git a/doxygen.cfg.in b/doxygen.cfg.in
-index cac9b05..190b7cd 100644
---- a/doxygen.cfg.in
-+++ b/doxygen.cfg.in
+Index: libnetfilter_cthelper-1.0.0/doxygen.cfg.in
+===================================================================
+--- libnetfilter_cthelper-1.0.0.orig/doxygen.cfg.in
++++ libnetfilter_cthelper-1.0.0/doxygen.cfg.in
 @@ -72,7 +72,7 @@ RECURSIVE              = YES
  EXCLUDE                = 
  EXCLUDE_SYMLINKS       = NO
@@ -33,10 +33,10 @@
  EXAMPLE_PATH           = 
  EXAMPLE_PATTERNS       = 
  EXAMPLE_RECURSIVE      = NO
-diff --git a/src/internal.h b/src/internal.h
-index 3a88d1a..5d78171 100644
---- a/src/internal.h
-+++ b/src/internal.h
+Index: libnetfilter_cthelper-1.0.0/src/internal.h
+===================================================================
+--- libnetfilter_cthelper-1.0.0.orig/src/internal.h
++++ libnetfilter_cthelper-1.0.0/src/internal.h
 @@ -3,10 +3,9 @@
  
  #include "config.h"
@@ -50,10 +50,10 @@
  #endif
  
  #endif
-diff --git a/src/libnetfilter_cthelper.c b/src/libnetfilter_cthelper.c
-index f8f58e6..af543a1 100644
---- a/src/libnetfilter_cthelper.c
-+++ b/src/libnetfilter_cthelper.c
+Index: libnetfilter_cthelper-1.0.0/src/libnetfilter_cthelper.c
+===================================================================
+--- libnetfilter_cthelper-1.0.0.orig/src/libnetfilter_cthelper.c
++++ libnetfilter_cthelper-1.0.0/src/libnetfilter_cthelper.c
 @@ -99,17 +99,16 @@ struct nfct_helper {
   * In case of success, this function returns a valid pointer, otherwise NULL
   * s returned and errno is appropriately set.
@@ -74,9 +74,9 @@
  {
  	int i;
  
-@@ -119,7 +118,6 @@ void nfct_helper_free(struct nfct_helper *h)
+@@ -119,7 +118,6 @@ void nfct_helper_free(struct nfct_helper
+ 			free(h->expect_policy[i]);
  	}
- 	free(h);
  }
 -EXPORT_SYMBOL(nfct_helper_free);
  
@@ -115,7 +115,7 @@
  nfct_helper_policy_attr_set(struct nfct_helper_policy *p,
  			    enum nfct_helper_policy_attr_type type,
  			    const void *data)
-@@ -170,7 +166,6 @@ nfct_helper_policy_attr_set(struct nfct_helper_policy *p,
+@@ -170,7 +166,6 @@ nfct_helper_policy_attr_set(struct nfct_
  		break;
  	}
  }
@@ -123,7 +123,7 @@
  
  /**
   * nfct_helper_attr_set_str - set one attribute the helper object
-@@ -178,23 +173,21 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_set);
+@@ -178,23 +173,21 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_se
   * \param type attribute type you want to set
   * \param name string that will be used to set this attribute
   */
@@ -149,7 +149,7 @@
  
  /**
   * nfct_helper_attr_set - set one attribute of the helper object
-@@ -202,7 +195,7 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_set_u32);
+@@ -202,7 +195,7 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_se
   * \param type attribute type you want to set
   * \param data pointer to data that will be used to set this attribute
   */
@@ -158,7 +158,7 @@
  nfct_helper_attr_set(struct nfct_helper *h,
  		     enum nfct_helper_attr_type type, const void *data)
  {
-@@ -250,7 +243,6 @@ nfct_helper_attr_set(struct nfct_helper *h,
+@@ -250,7 +243,6 @@ nfct_helper_attr_set(struct nfct_helper
  		break;
  	}
  }
@@ -216,7 +216,7 @@
  nfct_helper_attr_unset(struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type)
  {
  	switch(type) {
-@@ -307,7 +295,6 @@ nfct_helper_attr_unset(struct nfct_helper *nfct_helper, enum nfct_helper_attr_ty
+@@ -307,7 +295,6 @@ nfct_helper_attr_unset(struct nfct_helpe
  		break;
  	}
  }
@@ -236,7 +236,7 @@
  {
  	const void *ret = NULL;
  
-@@ -358,7 +346,6 @@ const void *nfct_helper_attr_get(struct nfct_helper *helper,
+@@ -358,7 +346,6 @@ const void *nfct_helper_attr_get(struct
  	}
  	return ret;
  }
@@ -321,7 +321,7 @@
  {
  	int ret;
  
-@@ -454,7 +441,6 @@ int nfct_helper_snprintf(char *buf, size_t size,
+@@ -454,7 +441,6 @@ int nfct_helper_snprintf(char *buf, size
  
  	return ret;
  }
@@ -338,7 +338,7 @@
  nfct_helper_nlmsg_build_hdr(char *buf, uint8_t cmd,
  			    uint16_t flags, uint32_t seq)
  {
-@@ -509,7 +495,6 @@ nfct_helper_nlmsg_build_hdr(char *buf, uint8_t cmd,
+@@ -509,7 +495,6 @@ nfct_helper_nlmsg_build_hdr(char *buf, u
  
  	return nlh;
  }
@@ -346,7 +346,7 @@
  
  static void
  nfct_helper_nlmsg_build_policy(struct nlmsghdr *nlh,
-@@ -530,7 +515,7 @@ nfct_helper_nlmsg_build_policy(struct nlmsghdr *nlh,
+@@ -530,7 +515,7 @@ nfct_helper_nlmsg_build_policy(struct nl
   * \param nlh: netlink message that you want to use to add the payload.
   * \param nfct_helper: pointer to a helper object
   */
@@ -355,7 +355,7 @@
  nfct_helper_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfct_helper *h)
  {
  	struct nlattr *nest;
-@@ -593,7 +578,6 @@ nfct_helper_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfct_helper *h)
+@@ -593,7 +578,6 @@ nfct_helper_nlmsg_build_payload(struct n
  	if (h->bitset & (1 << NFCTH_ATTR_STATUS))
  		mnl_attr_put_u32(nlh, NFCTH_STATUS, ntohl(h->status));
  }
@@ -363,7 +363,7 @@
  
  static int
  nfct_helper_nlmsg_parse_tuple_cb(const struct nlattr *attr, void *data)
-@@ -795,7 +779,7 @@ nfct_helper_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data)
+@@ -795,7 +779,7 @@ nfct_helper_nlmsg_parse_attr_cb(const st
   * This function returns -1 in case that some mandatory attributes are
   * missing. On sucess, it returns 0.
   */
@@ -372,7 +372,7 @@
  nfct_helper_nlmsg_parse_payload(const struct nlmsghdr *nlh,
  				struct nfct_helper *h)
  {
-@@ -832,7 +816,6 @@ nfct_helper_nlmsg_parse_payload(const struct nlmsghdr *nlh,
+@@ -832,7 +816,6 @@ nfct_helper_nlmsg_parse_payload(const st
  	}
  	return 0;
  }
@@ -380,6 +380,3 @@
  
  /**
   * @}
--- 
-cgit v1.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170810.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20171221.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170810.bb
rename to import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20171221.bb
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170810.bb b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20171221.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170810.bb
rename to import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20171221.bb
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
index f37d52b..6bd581a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-kernel/wireguard/wireguard.inc
@@ -11,7 +11,7 @@
 LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz"
-SRC_URI[md5sum] = "8dd3e080407b8295c25565a847a4ca27"
-SRC_URI[sha256sum] = "ab96230390625aad6f4816fa23aef6e9f7fee130f083d838919129ff12089bf7"
+SRC_URI[md5sum] = "39bb99fe11356423fb1ab45ae2d938bb"
+SRC_URI[sha256sum] = "2b97697e9b271ba8836a04120a287b824648124f21d5309170ec51c1f86ac5ed"
 
 S = "${WORKDIR}/WireGuard-${PV}/src/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch
new file mode 100644
index 0000000..71a5a1a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch
@@ -0,0 +1,223 @@
+Replace murmurhash algorithm with Robert Jenkin's hash algorithm
+
+Upstream-Status: Pending
+
+From test result, murmurhash algorithm does not work in big endian
+processor, so replace it with Robert Jenkin's hash which has worked
+in linux kernel for many years and has more adaptability.
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ libfdproto/ostr.c |  192 +++++++++++++++++++++--------------------------------
+ 1 file changed, 74 insertions(+), 118 deletions(-)
+
+diff --git a/libfdproto/ostr.c b/libfdproto/ostr.c
+index 8f29b48..ce1f4dd 100644
+--- a/libfdproto/ostr.c
++++ b/libfdproto/ostr.c
+@@ -430,128 +430,84 @@ after_proto:
+ 
+ 
+ /********************************************************************************************************/
+-/* Hash function -- credits to Austin Appleby, thank you ^^ */
+-/* See http://murmurhash.googlepages.com for more information on this function */
+-
+-/* the strings are NOT always aligned properly (ex: received in RADIUS message), so we use the aligned MurmurHash2 function as needed */
+-#define _HASH_MIX(h,k,m) { k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; }
+-uint32_t fd_os_hash ( uint8_t * string, size_t len )
++/*
++ * Robert Jenkin's hash function.
++ * http://burtleburtle.net/bob/hash/evahash.html
++ * This is in the public domain.
++ */
++#define mix(a, b, c)						\
++	do {							\
++		a = a - b;  a = a - c;  a = a ^ (c >> 13);	\
++		b = b - c;  b = b - a;  b = b ^ (a << 8);	\
++		c = c - a;  c = c - b;  c = c ^ (b >> 13);	\
++		a = a - b;  a = a - c;  a = a ^ (c >> 12);	\
++		b = b - c;  b = b - a;  b = b ^ (a << 16);	\
++		c = c - a;  c = c - b;  c = c ^ (b >> 5);	\
++		a = a - b;  a = a - c;  a = a ^ (c >> 3);	\
++		b = b - c;  b = b - a;  b = b ^ (a << 10);	\
++		c = c - a;  c = c - b;  c = c ^ (b >> 15);	\
++	} while (0)
++
++unsigned hash_rjenkins(const char *str, unsigned length)
+ {
+-	uint32_t hash = len;
+-	uint8_t * data = string;
+-	
+-	const unsigned int m = 0x5bd1e995;
+-	const int r = 24;
+-	int align = (long)string & 3;
+-	
+-	if (!align || (len < 4)) {
+-		/* In case data is aligned, MurmurHash2 function */
+-		while(len >= 4)
+-		{
+-			/* Mix 4 bytes at a time into the hash */
+-			uint32_t k = *(uint32_t *)data;	/* We don't care about the byte order */
+-
+-			_HASH_MIX(hash, k, m);
+-
+-			data += 4;
+-			len -= 4;
+-		}
+-
+-		/* Handle the last few bytes of the input */
+-		switch(len) {
+-			case 3: hash ^= data[2] << 16;
+-			case 2: hash ^= data[1] << 8;
+-			case 1: hash ^= data[0];
+-	        		hash *= m;
+-		}
+-		
+-	} else {
+-		/* Unaligned data, use alignment-safe slower version */
+-		
+-		/* Pre-load the temp registers */
+-		uint32_t t = 0, d = 0;
+-		switch(align)
+-		{
+-			case 1: t |= data[2] << 16;
+-			case 2: t |= data[1] << 8;
+-			case 3: t |= data[0];
+-		}
+-		t <<= (8 * align);
+-
+-		data += 4-align;
+-		len -= 4-align;
+-		
+-		/* From this point, "data" can be read by chunks of 4 bytes */
+-		
+-		int sl = 8 * (4-align);
+-		int sr = 8 * align;
+-
+-		/* Mix */
+-		while(len >= 4)
+-		{
+-			uint32_t k;
+-			
+-			d = *(unsigned int *)data;
+-			k = (t >> sr) | (d << sl);
+-
+-			_HASH_MIX(hash, k, m);
+-
+-			t = d;
+-
+-			data += 4;
+-			len -= 4;
+-		}
+-
+-		/* Handle leftover data in temp registers */
+-		d = 0;
+-		if(len >= align)
+-		{
+-			uint32_t k;
+-			
+-			switch(align)
+-			{
+-			case 3: d |= data[2] << 16;
+-			case 2: d |= data[1] << 8;
+-			case 1: d |= data[0];
+-			}
+-
+-			k = (t >> sr) | (d << sl);
+-			_HASH_MIX(hash, k, m);
+-
+-			data += align;
+-			len -= align;
+-
+-			/* Handle tail bytes */
+-
+-			switch(len)
+-			{
+-			case 3: hash ^= data[2] << 16;
+-			case 2: hash ^= data[1] << 8;
+-			case 1: hash ^= data[0];
+-					hash *= m;
+-			};
+-		}
+-		else
+-		{
+-			switch(len)
+-			{
+-			case 3: d |= data[2] << 16;
+-			case 2: d |= data[1] << 8;
+-			case 1: d |= data[0];
+-			case 0: hash ^= (t >> sr) | (d << sl);
+-					hash *= m;
+-			}
+-		}
+-
++	const unsigned char *k = (const unsigned char *)str;
++	uint32_t a, b, c;  /* the internal state */
++	uint32_t len;      /* how many key bytes still need mixing */
++
++	/* Set up the internal state */
++	len = length;
++	a = 0x9e3779b9;      /* the golden ratio; an arbitrary value */
++	b = a;
++	c = 0;               /* variable initialization of internal state */
++
++	/* handle most of the key */
++	while (len >= 12) {
++		a = a + (k[0] + ((uint32_t)k[1] << 8) + ((uint32_t)k[2] << 16) +
++			 ((uint32_t)k[3] << 24));
++		b = b + (k[4] + ((uint32_t)k[5] << 8) + ((uint32_t)k[6] << 16) +
++			 ((uint32_t)k[7] << 24));
++		c = c + (k[8] + ((uint32_t)k[9] << 8) + ((uint32_t)k[10] << 16) +
++			 ((uint32_t)k[11] << 24));
++		mix(a, b, c);
++		k = k + 12;
++		len = len - 12;
++	}
+ 
++	/* handle the last 11 bytes */
++	c = c + length;
++	switch (len) {            /* all the case statements fall through */
++	case 11:
++		c = c + ((uint32_t)k[10] << 24);
++	case 10:
++		c = c + ((uint32_t)k[9] << 16);
++	case 9:
++		c = c + ((uint32_t)k[8] << 8);
++		/* the first byte of c is reserved for the length */
++	case 8:
++		b = b + ((uint32_t)k[7] << 24);
++	case 7:
++		b = b + ((uint32_t)k[6] << 16);
++	case 6:
++		b = b + ((uint32_t)k[5] << 8);
++	case 5:
++		b = b + k[4];
++	case 4:
++		a = a + ((uint32_t)k[3] << 24);
++	case 3:
++		a = a + ((uint32_t)k[2] << 16);
++	case 2:
++		a = a + ((uint32_t)k[1] << 8);
++	case 1:
++		a = a + k[0];
++		/* case 0: nothing left to add */
+ 	}
++	mix(a, b, c);
+ 
+-	/* Do a few final mixes of the hash to ensure the last few
+-	   bytes are well-incorporated. */
+-	hash ^= hash >> 13;
+-	hash *= m;
+-	hash ^= hash >> 15;
++	return c;
++}
+ 
+-	return hash;
++uint32_t fd_os_hash ( uint8_t * string, size_t len )
++{
++	return hash_rjenkins(string, len); 
+ } 
+ 
+-- 
+1.7.10.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freeDiameter.conf b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freeDiameter.conf
new file mode 100644
index 0000000..7b56d74
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freeDiameter.conf
@@ -0,0 +1,250 @@
+# This is a sample configuration file for freeDiameter daemon.
+
+# Most of the options can be omitted, as they default to reasonable values.
+# Only TLS-related options must be configured properly in usual setups.
+
+# It is possible to use "include" keyword to import additional files
+# e.g.: include "/etc/freeDiameter.d/*.conf"
+# This is exactly equivalent as copy & paste the content of the included file(s) 
+# where the "include" keyword is found.
+
+
+##############################################################
+##  Peer identity and realm 
+
+# The Diameter Identity of this daemon.
+# This must be a valid FQDN that resolves to the local host.
+# Default: hostname's FQDN
+#Identity = "aaa.koganei.freediameter.net";
+
+# The Diameter Realm of this daemon.
+# Default: the domain part of Identity (after the first dot).
+#Realm = "koganei.freediameter.net";
+
+##############################################################
+##  Transport protocol configuration
+
+# The port this peer is listening on for incoming connections (TCP and SCTP).
+# Default: 3868. Use 0 to disable.
+#Port = 3868;
+
+# The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP).
+# See TLS_old_method for more information about TLS flavours.
+# Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter.
+# Default: 5868. Use 0 to disable.
+#SecPort = 5868;
+
+# Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed 
+# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the 
+# CER/CEA exchange on a dedicated secure port.
+# This parameter only affects outgoing connections. 
+# The setting can be also defined per-peer (see Peers configuration section).
+# Default: use RFC6733 method with separate port for TLS.
+#TLS_old_method;
+
+# Disable use of TCP protocol (only listen and connect over SCTP)
+# Default : TCP enabled
+#No_TCP;
+
+# Disable use of SCTP protocol (only listen and connect over TCP)
+# Default : SCTP enabled
+#No_SCTP;
+# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option.
+
+# Prefer TCP instead of SCTP for establishing new connections.
+# This setting may be overwritten per peer in peer configuration blocs.
+# Default : SCTP is attempted first.
+#Prefer_TCP;
+
+# Default number of streams per SCTP associations.
+# This setting may be overwritten per peer basis.
+# Default : 30 streams
+#SCTP_streams = 30;
+
+##############################################################
+##  Endpoint configuration
+
+# Disable use of IP addresses (only IPv6)
+# Default : IP enabled
+#No_IP;
+
+# Disable use of IPv6 addresses (only IP)
+# Default : IPv6 enabled
+#No_IPv6;
+
+# Specify local addresses the server must bind to
+# Default : listen on all addresses available.
+#ListenOn = "202.249.37.5";
+#ListenOn = "2001:200:903:2::202:1";
+#ListenOn = "fe80::21c:5ff:fe98:7d62%eth0";
+
+
+##############################################################
+##  Server configuration
+
+# How many Diameter peers are allowed to be connecting at the same time ?
+# This parameter limits the number of incoming connections from the time
+# the connection is accepted until the first CER is received.
+# Default: 5 unidentified clients in paralel.
+#ThreadsPerServer = 5;
+
+##############################################################
+##  TLS Configuration
+
+# TLS is managed by the GNUTLS library in the freeDiameter daemon.
+# You may find more information about parameters and special behaviors
+# in the relevant documentation.
+# http://www.gnu.org/software/gnutls/manual/
+
+# Credentials of the local peer
+# The X509 certificate and private key file to use for the local peer.
+# The files must contain PKCS-1 encoded RSA key, in PEM format.
+# (These parameters are passed to gnutls_certificate_set_x509_key_file function)
+# Default : NO DEFAULT
+#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>";
+#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
+
+# Certificate authority / trust anchors
+# The file containing the list of trusted Certificate Authorities (PEM list)
+# (This parameter is passed to gnutls_certificate_set_x509_trust_file function)
+# The directive can appear several times to specify several files.
+# Default : GNUTLS default behavior
+#TLS_CA = "<file.PEM>";
+
+# Certificate Revocation List file
+# The information about revoked certificates.
+# The file contains a list of trusted CRLs in PEM format. They should have been verified before. 
+# (This parameter is passed to gnutls_certificate_set_x509_crl_file function)
+# Note: openssl CRL format might have interoperability issue with GNUTLS format.
+# Default : GNUTLS default behavior
+#TLS_CRL = "<file.PEM>";
+
+# GNU TLS Priority string
+# This string allows to configure the behavior of GNUTLS key exchanges 
+# algorithms. See gnutls_priority_init function documentation for information.
+# You should also refer to the Diameter required TLS support here:
+#   http://tools.ietf.org/html/rfc6733#section-13.1
+# Default : "NORMAL"
+# Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL";
+#TLS_Prio = "NORMAL";
+
+# Diffie-Hellman parameters size
+# Set the number of bits for generated DH parameters
+# Valid value should be 768, 1024, 2048, 3072 or 4096.
+# (This parameter is passed to gnutls_dh_params_generate2 function, 
+# it usually should match RSA key size)
+# Default : 1024
+#TLS_DH_Bits = 1024;
+
+# Alternatively, you can specify a file to load the PKCS#3 encoded
+# DH parameters directly from. This accelerates the daemon start 
+# but is slightly less secure. If this file is provided, the
+# TLS_DH_Bits parameters has no effect.
+# Default : no default.
+#TLS_DH_File = "<file.PEM>";
+
+
+##############################################################
+##  Timers configuration
+
+# The Tc timer of this peer.
+# It is the delay before a new attempt is made to reconnect a disconnected peer.
+# The value is expressed in seconds. The recommended value is 30 seconds.
+# Default: 30
+#TcTimer = 30;
+
+# The Tw timer of this peer.
+# It is the delay before a watchdog message is sent, as described in RFC 3539.
+# The value is expressed in seconds. The default value is 30 seconds. Value must
+# be greater or equal to 6 seconds. See details in the RFC.
+# Default: 30
+#TwTimer = 30;
+
+##############################################################
+##  Applications configuration
+
+# Disable the relaying of Diameter messages?
+# For messages not handled locally, the default behavior is to forward the
+# message to another peer if any is available, according to the routing 
+# algorithms. In addition the "0xffffff" application is advertised in CER/CEA 
+# exchanges.
+# Default: Relaying is enabled.
+#NoRelay;
+
+# Number of server threads that can handle incoming messages at the same time.
+# Default: 4
+#AppServThreads = 4;
+
+# Other applications are configured by loaded extensions.
+
+##############################################################
+##  Extensions configuration
+
+#  The freeDiameter framework merely provides support for
+# Diameter Base Protocol. The specific application behaviors,
+# as well as advanced functions, are provided
+# by loadable extensions (plug-ins).
+#  These extensions may in addition receive the name of a 
+# configuration file, the format of which is extension-specific.
+#
+# Format:
+#LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ;
+#
+# Examples:
+#LoadExtension = "extensions/sample.fdx";
+#LoadExtension = "extensions/sample.fdx":"conf/sample.conf";
+
+# Extensions are named as follow:
+# dict_* for extensions that add content to the dictionary definitions.
+# dbg_*  for extensions useful only to retrieve more information on the framework execution.
+# acl_*  : Access control list, to control which peers are allowed to connect.
+# rt_*   : routing extensions that impact how messages are forwarded to other peers.
+# app_*  : applications, these extensions usually register callbacks to handle specific messages.
+# test_* : dummy extensions that are useful only in testing environments.
+
+
+# The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some
+# information about some events. This extension does not actually use a configuration file
+# but receives directly a parameter in the string passed to the extension. Here are some examples:
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors.
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details.
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages.
+# The four digits respectively control: connections, routing decisions, sent/received messages, errors.
+# The values for each digit are:
+#  0 - default - keep the default behavior
+#  1 - quiet   - remove any specific log
+#  2 - compact - display only a summary of the information
+#  4 - full    - display the complete information on a single long line
+#  8 - tree    - display the complete information in an easier to read format spanning several lines.
+
+
+##############################################################
+##  Peers configuration
+
+#  The local server listens for incoming connections. By default,
+# all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl).
+# 
+#  In addition to incoming connections, the local peer can
+# be configured to establish and maintain connections to some 
+# Diameter nodes and allow connections from these nodes.
+#  This is achieved with the ConnectPeer directive described below.
+#
+# Note that the configured Diameter Identity MUST match
+# the information received inside CEA, or the connection will be aborted.
+#
+# Format:
+#ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ;
+# Parameters that can be specified in the peer's parameter list:
+#  No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method;
+#  No_TLS;       # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions).
+#  Port = 5868;  # The port to connect to
+#  TcTimer = 30;
+#  TwTimer = 30;
+#  ConnectTo = "202.249.37.5";
+#  ConnectTo = "2001:200:903:2::202:1";
+#  TLS_Prio = "NORMAL";
+#  Realm = "realm.net"; # Reject the peer if it does not advertise this realm.
+# Examples:
+#ConnectPeer = "aaa.wide.ad.jp";
+#ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ;
+##############################################################
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.init b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.init
new file mode 100755
index 0000000..e63a42a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.init
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          freediameter
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Short-Description: Start freeDiameter daemon at boot time
+# Description:       Start the freeDiameter daemon at boot time.
+#       freeDiameter is an extensible implementation of the Diameter protocol,
+#       designed for Authentication, Authorization and Accounting. Diameter is
+#       an evolution of the RADIUS protocol.
+### END INIT INFO#
+DAEMON=/usr/bin/freeDiameterd
+CONF=/etc/freeDiameter/freeDiameter.conf
+NAME=freediameter
+DESC="freeDiameter daemon"
+
+. /etc/init.d/functions
+start() {
+	[ -x $DAEMON ] || exit 5
+	echo -n $"Starting $DAEMON: "
+	start-stop-daemon -S -b -x ${DAEMON} && success || failure
+	retval=$?
+	echo ""
+	return $retval
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	start-stop-daemon -K -x $DAEMON
+	retval=$?
+	echo ""
+	return $retval
+}
+
+restart() {
+	stop
+	sleep 3
+	start
+}
+
+rh_status() {
+	status $DAEMON
+}
+
+rh_status_q() {
+	rh_status > /dev/null 2>&1
+}
+
+case "$1" in
+  start)
+	rh_status_q && exit 0
+	start
+	;;
+  stop)
+	rh_status_q || exit 0
+	stop
+	;;
+  restart)
+	restart
+	;;
+  status)
+	rh_status
+	;;
+  *)
+	echo $"Usage: $prog {start|stop|status|restart}"
+	exit 2
+esac
+
+exit $?
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.service b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.service
new file mode 100644
index 0000000..514481b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/freediameter.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=freediameter daemon
+After=network.target
+
+[Service]
+Type=simple
+PIDFile=/var/run/freediameter.pid
+ExecStart=@BINDIR@/freeDiameterd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/install_test.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/install_test.patch
new file mode 100644
index 0000000..151037d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/install_test.patch
@@ -0,0 +1,22 @@
+CMakeLists: add an option to install tests
+
+Upstream-Status: Inappropriate [OE ptest specific]
+
+Original author: Yao Zhao <yao.zhao@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index da8da1b..de04059 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -113,4 +113,9 @@ ENDFOREACH( TEST )
+ ####
+ ## INSTALL section ##
+ 
+-# we do not install the tests
++# install the tests
++SET(INSTALL_TEST_SUFFIX       /opt/${FD_PROJECT_NAME}-tests   CACHE PATH "Directory where the test binary is installed.")
++
++INSTALL(TARGETS ${TEST_LIST}
++        RUNTIME DESTINATION ${INSTALL_TEST_SUFFIX}
++        COMPONENT freeDiameter-common)
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch
new file mode 100644
index 0000000..ea857af
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch
@@ -0,0 +1,72 @@
+freediameter ptest cases testmesg_stress.c and testloadext.c need load
+extensions both build time and runtime. Then they search extensions with
+build directory that causes runtime failures.
+
+Pass an environment variable to define runtime extension path.
+
+Upstream-Status: Inappropriate [OE ptest specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff -Nur freeDiameter-1.2.0.orig/tests/testloadext.c freeDiameter-1.2.0/tests/testloadext.c
+--- freeDiameter-1.2.0.orig/tests/testloadext.c	2014-02-19 17:33:24.785405032 +0800
++++ freeDiameter-1.2.0/tests/testloadext.c	2014-02-19 20:08:03.871403924 +0800
+@@ -49,7 +49,7 @@
+ {
+ 	DIR *dir;
+ 	struct dirent *dp;
+-	char fullname[512];
++	char fullname[1024];
+ 	int pathlen;
+ 
+ 	/* First, initialize the daemon modules */
+@@ -57,11 +57,16 @@
+ 	CHECK( 0, fd_queues_init()  );
+ 	CHECK( 0, fd_msg_init()  );
+ 	CHECK( 0, fd_rtdisp_init()  );
+-	
++
++	char *ext_dir = getenv("EXTENSIONS_DIR");
++	if (ext_dir)
++		pathlen = snprintf(fullname, sizeof(fullname), "%s", ext_dir);
++	else
++		pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++
+ 	/* Find all extensions which have been compiled along the test */
+-	TRACE_DEBUG(INFO, "Loading from: '%s'", BUILD_DIR "/extensions");
+-	CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 );
+-	pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++	TRACE_DEBUG(INFO, "Loading from: '%s'", fullname);
++	CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 );
+ 	
+ 	while ((dp = readdir (dir)) != NULL) {
+ 		char * dot = strrchr(dp->d_name, '.');
+diff -Nur freeDiameter-1.2.0.orig/tests/testmesg_stress.c freeDiameter-1.2.0/tests/testmesg_stress.c
+--- freeDiameter-1.2.0.orig/tests/testmesg_stress.c	2014-02-19 17:33:24.785405032 +0800
++++ freeDiameter-1.2.0/tests/testmesg_stress.c	2014-02-19 20:08:03.928403924 +0800
+@@ -67,15 +67,20 @@
+ {
+ 	DIR *dir;
+ 	struct dirent *dp;
+-	char fullname[512];
++	char fullname[1024];
+ 	int pathlen;
+ 	struct fd_list all_extensions = FD_LIST_INITIALIZER(all_extensions);
+ 	struct fd_list ext_with_depends = FD_LIST_INITIALIZER(ext_with_depends);
+ 
++	char *ext_dir = getenv("EXTENSIONS_DIR");
++	if (ext_dir)
++		pathlen = snprintf(fullname, sizeof(fullname), "%s", ext_dir);
++	else
++		pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++
+ 	/* Find all extensions which have been compiled along the test */
+-	LOG_D("Loading %s*.fdx from: '%s'", BUILD_DIR "/extensions", prefix ?: "");
+-	CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 );
+-	pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
++	TRACE_DEBUG(INFO, "Loading from: '%s'", fullname);
++	CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 );
+ 	
+ 	while ((dp = readdir (dir)) != NULL) {
+ 		char * dot = strrchr(dp->d_name, '.');
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/run-ptest
new file mode 100644
index 0000000..d0ca8d9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if ! lsmod | grep -q sctp && ! modprobe sctp 2>/dev/null; then
+        echo "Couldn't load kernel module sctp."
+        echo "Test cases testsctp and testcnx will fail."
+        echo
+fi
+
+export EXTENSIONS_DIR=$EXTENSIONS_DIR
+cmake  -E cmake_echo_color --cyan "Running tests..."
+ctest --force-new-ctest-process
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb
new file mode 100644
index 0000000..c556eb4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb
@@ -0,0 +1,138 @@
+SUMMARY = "An open source implementation of the diameter protocol"
+DESCRIPTION = "\
+freeDiameter is an open source Diameter protocol implementation \
+(RFC3588). It provides an extensible platform for deploying a \
+Diameter network for your Authentication, Authorization and \
+Accounting needs."
+
+HOMEPAGE = "http://www.freediameter.net"
+
+DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn lksctp-tools virtual/kernel"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+fd_pkgname = "freeDiameter"
+
+SRC_URI = "\
+    http://www.freediameter.net/hg/${fd_pkgname}/archive/${PV}.tar.gz;downloadfilename=${fd_pkgname}-${PV}.tar.gz \
+    file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \
+    file://freediameter.service \
+    file://freediameter.init \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://install_test.patch file://run-ptest file://pass-ptest-env.patch', '', d)} \
+    file://freeDiameter.conf \
+    "
+
+SRC_URI[md5sum] = "61b1062aa144b5f12eed514611e6d697"
+SRC_URI[sha256sum] = "bd7f105542e9903e776aa006c6931c1f5d3d477cb59af33a9162422efa477097"
+
+S = "${WORKDIR}/${fd_pkgname}-${PV}"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=892b2ed6ae815488a08416ff7ee74a35"
+
+PTEST_PATH = "${libdir}/${fd_pkgname}/ptest"
+
+inherit cmake pkgconfig update-rc.d ptest systemd
+
+EXTRA_OECMAKE = " \
+    -DDEFAULT_CONF_PATH:PATH=${sysconfdir}/${fd_pkgname} \
+    -DBUILD_DBG_MONITOR:BOOL=ON  \
+    -DBUILD_TEST_APP:BOOL=ON \
+    -DBUILD_TESTING:BOOL=ON \
+    -DBUILD_APP_RADGW:BOOL=ON \
+    -DBUILD_APP_REDIRECT:BOOL=ON \
+    -DBUILD_TEST_ACCT:BOOL=ON \
+    -DBUILD_TEST_NETEMUL:BOOL=ON \
+    -DBUILD_TEST_RT_ANY:BOOL=ON \
+    -DINSTALL_LIBRARY_SUFFIX:PATH=${baselib} \
+    -DINSTALL_EXTENSIONS_SUFFIX:PATH=${baselib}/${fd_pkgname} \
+    -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \
+    -DCMAKE_SKIP_RPATH:BOOL=ON \
+"
+# INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX
+# specify it on cmd line will fix the SET bug in CMakeList.txt
+
+# -DBUILD_APP_ACCT:BOOL=ON This needs POSTGRESQL support
+
+# -DBUILD_APP_DIAMEAP:BOOL=ON  -DBUILD_APP_SIP:BOOL=ON -DBUILD_TEST_SIP:BOOL=ON
+# These need MySQL support
+
+# -DBUILD_DBG_INTERACTIVE:BOOL=ON This needs SWIG support
+
+# -DALL_EXTENSIONS=ON will enable all
+
+FD_KEY ?="${BPN}.key"
+FD_PEM ?= "${BPN}.pem"
+FD_CA ?= "${BPN}.pem"
+FD_DH_PEM ?= "${BPN}-dh.pem"
+FD_HOSTNAME ?= "${MACHINE}"
+FD_REALM ?= "openembedded.org"
+
+do_install_append() {
+    # install the sample configuration files
+    install -d -m 0755 ${D}${sysconfdir}/${fd_pkgname}
+    for i in ${S}/doc/*.conf.sample; do
+        install -m 0644 $i ${D}${sysconfdir}/${fd_pkgname}/
+    done
+    mv ${D}${sysconfdir}/${fd_pkgname}/freediameter.conf.sample \
+       ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf.sample
+    install -d ${D}${sysconfdir}/freeDiameter
+	 install ${WORKDIR}/freeDiameter.conf ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf
+
+    # install daemon init related files
+    install -d -m 0755 ${D}${sysconfdir}/default
+    install -d -m 0755 ${D}${sysconfdir}/init.d
+    install -m 0644 ${S}/contrib/debian/freediameter-daemon.default \
+      ${D}${sysconfdir}/default/${BPN}
+    install -m 0755 ${WORKDIR}/freediameter.init ${D}${sysconfdir}/init.d/${BPN}
+
+    # install for systemd
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${WORKDIR}/freediameter.service ${D}${systemd_system_unitdir}
+    sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/*.service
+
+    cat >> ${D}${sysconfdir}/freeDiameter/freeDiameter.conf <<EOF
+## OE specific ##
+#Identity="${FD_HOSTNAME}";
+Identity = "${FD_HOSTNAME}.${FD_REALM}";
+Realm = "${FD_REALM}";
+Port = 30868;
+SecPort = 30869;
+TLS_Cred = "/etc/freeDiameter/${FD_PEM}" , "/etc/freeDiameter/${FD_KEY}";
+TLS_CA = "/etc/freeDiameter/${FD_CA}";
+TLS_DH_File = "/etc/freeDiameter/${FD_DH_PEM}";
+EOF
+
+    # create self cert
+    openssl req -x509 -config ${STAGING_DIR_NATIVE}/etc/ssl/openssl.cnf -newkey rsa:4096 -sha256 -nodes -out ${D}${sysconfdir}/freeDiameter/${FD_PEM} -keyout ${D}${sysconfdir}/freeDiameter/${FD_KEY} -days 3650 -subj '/CN=${FD_HOSTNAME}.${FD_REALM}'
+    openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024
+
+}
+
+do_install_ptest() {
+    sed -i "s#\(EXTENSIONS_DIR=\).*\$#\1${libdir}/${fd_pkgname}/#" ${D}${PTEST_PATH}/run-ptest
+    mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/
+    rmdir ${D}${PTEST_PATH}-tests
+    install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/
+}
+
+FILES_${PN}-dbg += "${libdir}/${fd_pkgname}/.debug/*"
+
+# include the extensions in main package
+FILES_${PN} += "${libdir}/${fd_pkgname}/*"
+
+RDEPENDS_${PN}  = "glib-2.0 gnutls libidn"
+RDEPENDS_${PN} += "openssl openssl-conf openssl-engines"
+RRECOMMENDS_${PN} += "kernel-module-tipc kernel-module-sctp" 
+RRECOMMENDS_${PN} += "kernel-module-udp-tunnel kernel-module-ipip"
+RDEPENDS_${PN}-ptest = "cmake"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "${BPN}"
+INITSCRIPT_PARAMS$_${PN} = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "freediameter.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+CONFFILES_${PN} = "${sysconfdir}/freediameter.conf"
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch
new file mode 100644
index 0000000..863866d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch
@@ -0,0 +1,42 @@
+From d3082d2c606c810aa0a39378bf1e02575af3a301 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Feb 2018 21:54:11 -0800
+Subject: [PATCH] nss_mdns: Do not include nss.h when libc != glibc
+
+Provide nss_status macro instead for non-glibc case
+where nss.h is absent
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mDNSPosix/nss_mdns.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/mDNSPosix/nss_mdns.c b/mDNSPosix/nss_mdns.c
+index afadb3c..c469584 100755
+--- a/mDNSPosix/nss_mdns.c
++++ b/mDNSPosix/nss_mdns.c
+@@ -378,8 +378,19 @@ init_config ();
+ 
+ #define ENTNAME  hostent
+ #define DATABASE "hosts"
+-
++#ifdef __GLIBC__
+ #include <nss.h>
++#else
++enum nss_status
++{
++    NSS_STATUS_TRYAGAIN = -2,
++    NSS_STATUS_UNAVAIL,
++    NSS_STATUS_NOTFOUND,
++    NSS_STATUS_SUCCESS,
++    NSS_STATUS_RETURN
++};
++#define NETDB_INTERNAL NULL
++#endif
+ // For nss_status
+ #include <netdb.h>
+ // For hostent
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
index 1a80f7a..9a7152f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
@@ -9,6 +9,7 @@
 SRC_URI = "http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \
            file://build.patch;patchdir=.. \
            file://mdns.service \
+           file://0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch;patchdir=.. \
            "
 
 SRC_URI[md5sum] = "4a6bc1628851002634ea3833a4dca317"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-BUG-a2584-Fix-snmptrap-to-use-clientaddr-from-snmp.c.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-BUG-a2584-Fix-snmptrap-to-use-clientaddr-from-snmp.c.patch
index b05eea5..b14b761 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-BUG-a2584-Fix-snmptrap-to-use-clientaddr-from-snmp.c.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-BUG-a2584-Fix-snmptrap-to-use-clientaddr-from-snmp.c.patch
@@ -11,13 +11,13 @@
  snmplib/transports/snmpUDPIPv6Domain.c | 21 +++++++++++++++++++++
  1 file changed, 21 insertions(+)
 
-diff --git a/snmplib/transports/snmpUDPIPv6Domain.c b/snmplib/transports/snmpUDPIPv6Domain.c
-index 55e3610..aca69ae 100644
---- a/snmplib/transports/snmpUDPIPv6Domain.c
-+++ b/snmplib/transports/snmpUDPIPv6Domain.c
-@@ -256,6 +256,27 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
-         t->data = NULL;
-         t->data_length = 0;
+Index: net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c
+===================================================================
+--- net-snmp-5.7.3.orig/snmplib/transports/snmpUDPIPv6Domain.c
++++ net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c
+@@ -286,6 +286,27 @@ netsnmp_udp6_transport(struct sockaddr_i
+         return NULL;
+ #endif /* NETSNMP_NO_LISTEN_SUPPORT */
      } else {
 +        char           *client_socket = NULL;
 +        /*
@@ -43,6 +43,3 @@
          /*
           * This is a client session.  Save the address in the
           * transport-specific data pointer for later use by netsnmp_udp6_send.
--- 
-2.9.3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Remove-U64-typedef.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Remove-U64-typedef.patch
new file mode 100644
index 0000000..7314ab1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Remove-U64-typedef.patch
@@ -0,0 +1,2524 @@
+net-snmp: remove U64 typedef
+
+From git://git.code.sf.net/p/net-snmp/code
+
+Upstream-Status: Backport (unmodified)
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+From 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Sat, 20 Feb 2016 18:58:18 -0800
+Subject: [PATCH 1/1] Remove U64 typedef
+
+The U64 typedef conflicts with a typedef in a Perl header file. Hence
+remove the U64 typedef from the Net-SNMP header files. This patch does
+not modify the Net-SNMP ABI.
+---
+ agent/mibgroup/if-mib/ifXTable/ifXTable.c          |  16 +-
+ agent/mibgroup/if-mib/ifXTable/ifXTable.h          |  48 +-
+ .../mibgroup/if-mib/ifXTable/ifXTable_interface.c  |  32 +-
+ .../ip-mib/data_access/systemstats_common.c        |   2 +-
+ .../ipIfStatsTable/ipIfStatsTable_data_get.c       |  28 +-
+ .../ipIfStatsTable/ipIfStatsTable_data_get.h       |  28 +-
+ .../ipIfStatsTable/ipIfStatsTable_interface.c      |  56 +-
+ .../ip-mib/ipSystemStatsTable/ipSystemStatsTable.c |  28 +-
+ .../ip-mib/ipSystemStatsTable/ipSystemStatsTable.h | 921 ++-------------------
+ .../ipSystemStatsTable_interface.c                 |  56 +-
+ include/net-snmp/data_access/ipstats.h             |  42 +-
+ include/net-snmp/library/int64.h                   |  34 +-
+ snmplib/int64.c                                    |  38 +-
+ snmplib/read_config.c                              |   6 +-
+ testing/fulltests/unit-tests/T015int64_clib.c      |  10 +-
+ 15 files changed, 274 insertions(+), 1071 deletions(-)
+
+Index: net-snmp-5.7.3/agent/mibgroup/if-mib/ifXTable/ifXTable.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/if-mib/ifXTable/ifXTable.c
++++ net-snmp-5.7.3/agent/mibgroup/if-mib/ifXTable/ifXTable.c
+@@ -722,7 +722,7 @@ The total number of octets received on t
+  */
+ int
+ ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                 U64 * ifHCInOctets_val_ptr)
++                 struct counter64 *ifHCInOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCInOctets_val_ptr);
+@@ -779,7 +779,7 @@ The number of packets, delivered by this
+  */
+ int
+ ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                    U64 * ifHCInUcastPkts_val_ptr)
++                    struct counter64 *ifHCInUcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCInUcastPkts_val_ptr);
+@@ -838,7 +838,7 @@ The number of packets, delivered by this
+  */
+ int
+ ifHCInMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                        U64 * ifHCInMulticastPkts_val_ptr)
++                        struct counter64 *ifHCInMulticastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCInMulticastPkts_val_ptr);
+@@ -897,7 +897,7 @@ The number of packets, delivered by this
+  */
+ int
+ ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                        U64 * ifHCInBroadcastPkts_val_ptr)
++                        struct counter64 *ifHCInBroadcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCInBroadcastPkts_val_ptr);
+@@ -955,7 +955,7 @@ The total number of octets transmitted o
+  */
+ int
+ ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                  U64 * ifHCOutOctets_val_ptr)
++                  struct counter64 *ifHCOutOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCOutOctets_val_ptr);
+@@ -1013,7 +1013,7 @@ The total number of packets that higher-
+  */
+ int
+ ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                     U64 * ifHCOutUcastPkts_val_ptr)
++                     struct counter64 *ifHCOutUcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCOutUcastPkts_val_ptr);
+@@ -1074,7 +1074,7 @@ The total number of packets that higher-
+  */
+ int
+ ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                         U64 * ifHCOutMulticastPkts_val_ptr)
++                         struct counter64 *ifHCOutMulticastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCOutMulticastPkts_val_ptr);
+@@ -1134,7 +1134,7 @@ The total number of packets that higher-
+  */
+ int
+ ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                         U64 * ifHCOutBroadcastPkts_val_ptr)
++                         struct counter64 *ifHCOutBroadcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ifHCOutBroadcastPkts_val_ptr);
+Index: net-snmp-5.7.3/agent/mibgroup/if-mib/ifXTable/ifXTable.h
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/if-mib/ifXTable/ifXTable.h
++++ net-snmp-5.7.3/agent/mibgroup/if-mib/ifXTable/ifXTable.h
+@@ -143,28 +143,28 @@ config_require(if-mib/ifXTable/ifXTable_
+                                            u_long *
+                                            ifOutBroadcastPkts_val_ptr);
+     int             ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                     U64 * ifHCInOctets_val_ptr);
++                                     struct counter64 *ifHCInOctets_val_ptr);
+     int             ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                        U64 * ifHCInUcastPkts_val_ptr);
++                                        struct counter64 *ifHCInUcastPkts_val_ptr);
+     int             ifHCInMulticastPkts_get(ifXTable_rowreq_ctx *
+                                             rowreq_ctx,
+-                                            U64 *
++                                            struct counter64 *
+                                             ifHCInMulticastPkts_val_ptr);
+     int             ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx *
+                                             rowreq_ctx,
+-                                            U64 *
++                                            struct counter64 *
+                                             ifHCInBroadcastPkts_val_ptr);
+     int             ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                      U64 * ifHCOutOctets_val_ptr);
++                                      struct counter64 *ifHCOutOctets_val_ptr);
+     int             ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                         U64 * ifHCOutUcastPkts_val_ptr);
++                                         struct counter64 *ifHCOutUcastPkts_val_ptr);
+     int             ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx *
+                                              rowreq_ctx,
+-                                             U64 *
++                                             struct counter64 *
+                                              ifHCOutMulticastPkts_val_ptr);
+     int             ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx *
+                                              rowreq_ctx,
+-                                             U64 *
++                                             struct counter64 *
+                                              ifHCOutBroadcastPkts_val_ptr);
+     int             ifLinkUpDownTrapEnable_get(ifXTable_rowreq_ctx *
+                                                rowreq_ctx,
+@@ -284,86 +284,86 @@ config_require(if-mib/ifXTable/ifXTable_
+ 
+     int             ifHCInOctets_check_value(ifXTable_rowreq_ctx *
+                                              rowreq_ctx,
+-                                             U64 ifHCInOctets_val);
++                                             struct counter64 ifHCInOctets_val);
+     int             ifHCInOctets_undo_setup(ifXTable_rowreq_ctx *
+                                             rowreq_ctx);
+     int             ifHCInOctets_set(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                     U64 ifHCInOctets_val);
++                                     struct counter64 ifHCInOctets_val);
+     int             ifHCInOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx);
+ 
+     int             ifHCInUcastPkts_check_value(ifXTable_rowreq_ctx *
+                                                 rowreq_ctx,
+-                                                U64 ifHCInUcastPkts_val);
++                                                struct counter64 ifHCInUcastPkts_val);
+     int             ifHCInUcastPkts_undo_setup(ifXTable_rowreq_ctx *
+                                                rowreq_ctx);
+     int             ifHCInUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                        U64 ifHCInUcastPkts_val);
++                                        struct counter64 ifHCInUcastPkts_val);
+     int             ifHCInUcastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx);
+ 
+     int             ifHCInMulticastPkts_check_value(ifXTable_rowreq_ctx *
+                                                     rowreq_ctx,
+-                                                    U64
++                                                    struct counter64
+                                                     ifHCInMulticastPkts_val);
+     int             ifHCInMulticastPkts_undo_setup(ifXTable_rowreq_ctx *
+                                                    rowreq_ctx);
+     int             ifHCInMulticastPkts_set(ifXTable_rowreq_ctx *
+                                             rowreq_ctx,
+-                                            U64 ifHCInMulticastPkts_val);
++                                            struct counter64 ifHCInMulticastPkts_val);
+     int             ifHCInMulticastPkts_undo(ifXTable_rowreq_ctx *
+                                              rowreq_ctx);
+ 
+     int             ifHCInBroadcastPkts_check_value(ifXTable_rowreq_ctx *
+                                                     rowreq_ctx,
+-                                                    U64
++                                                    struct counter64
+                                                     ifHCInBroadcastPkts_val);
+     int             ifHCInBroadcastPkts_undo_setup(ifXTable_rowreq_ctx *
+                                                    rowreq_ctx);
+     int             ifHCInBroadcastPkts_set(ifXTable_rowreq_ctx *
+                                             rowreq_ctx,
+-                                            U64 ifHCInBroadcastPkts_val);
++                                            struct counter64 ifHCInBroadcastPkts_val);
+     int             ifHCInBroadcastPkts_undo(ifXTable_rowreq_ctx *
+                                              rowreq_ctx);
+ 
+     int             ifHCOutOctets_check_value(ifXTable_rowreq_ctx *
+                                               rowreq_ctx,
+-                                              U64 ifHCOutOctets_val);
++                                              struct counter64 ifHCOutOctets_val);
+     int             ifHCOutOctets_undo_setup(ifXTable_rowreq_ctx *
+                                              rowreq_ctx);
+     int             ifHCOutOctets_set(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                      U64 ifHCOutOctets_val);
++                                      struct counter64 ifHCOutOctets_val);
+     int             ifHCOutOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx);
+ 
+     int             ifHCOutUcastPkts_check_value(ifXTable_rowreq_ctx *
+                                                  rowreq_ctx,
+-                                                 U64 ifHCOutUcastPkts_val);
++                                                 struct counter64 ifHCOutUcastPkts_val);
+     int             ifHCOutUcastPkts_undo_setup(ifXTable_rowreq_ctx *
+                                                 rowreq_ctx);
+     int             ifHCOutUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx,
+-                                         U64 ifHCOutUcastPkts_val);
++                                         struct counter64 ifHCOutUcastPkts_val);
+     int             ifHCOutUcastPkts_undo(ifXTable_rowreq_ctx *
+                                           rowreq_ctx);
+ 
+     int             ifHCOutMulticastPkts_check_value(ifXTable_rowreq_ctx *
+                                                      rowreq_ctx,
+-                                                     U64
++                                                     struct counter64
+                                                      ifHCOutMulticastPkts_val);
+     int             ifHCOutMulticastPkts_undo_setup(ifXTable_rowreq_ctx *
+                                                     rowreq_ctx);
+     int             ifHCOutMulticastPkts_set(ifXTable_rowreq_ctx *
+                                              rowreq_ctx,
+-                                             U64 ifHCOutMulticastPkts_val);
++                                             struct counter64 ifHCOutMulticastPkts_val);
+     int             ifHCOutMulticastPkts_undo(ifXTable_rowreq_ctx *
+                                               rowreq_ctx);
+ 
+     int             ifHCOutBroadcastPkts_check_value(ifXTable_rowreq_ctx *
+                                                      rowreq_ctx,
+-                                                     U64
++                                                     struct counter64
+                                                      ifHCOutBroadcastPkts_val);
+     int             ifHCOutBroadcastPkts_undo_setup(ifXTable_rowreq_ctx *
+                                                     rowreq_ctx);
+     int             ifHCOutBroadcastPkts_set(ifXTable_rowreq_ctx *
+                                              rowreq_ctx,
+-                                             U64 ifHCOutBroadcastPkts_val);
++                                             struct counter64 ifHCOutBroadcastPkts_val);
+     int             ifHCOutBroadcastPkts_undo(ifXTable_rowreq_ctx *
+                                               rowreq_ctx);
+ 
+Index: net-snmp-5.7.3/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c
++++ net-snmp-5.7.3/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c
+@@ -729,72 +729,72 @@ _ifXTable_get_column(ifXTable_rowreq_ctx
+          * ifHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCINOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCInOctets_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+          * ifHCInUcastPkts(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCINUCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCInUcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCInUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+          * ifHCInMulticastPkts(8)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCINMULTICASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCInMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCInMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+          * ifHCInBroadcastPkts(9)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCINBROADCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCInBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCInBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+          * ifHCOutOctets(10)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCOUTOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+          * ifHCOutUcastPkts(11)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCOUTUCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCOutUcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCOutUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+          * ifHCOutMulticastPkts(12)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCOUTMULTICASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCOutMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCOutMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+          * ifHCOutBroadcastPkts(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IFHCOUTBROADCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+Index: net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/systemstats_common.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/ip-mib/data_access/systemstats_common.c
++++ net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/systemstats_common.c
+@@ -264,7 +264,7 @@ _calculate_entries(netsnmp_systemstats_e
+            && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES]
+         && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS]) {
+ 
+-        U64 tmp, tmp2, tmp3;
++        struct counter64 tmp, tmp2, tmp3;
+         tmp = entry->stats.HCOutRequests;
+         u64Incr(&tmp, &entry->stats.HCOutForwDatagrams);
+         u64Incr(&tmp, &entry->stats.HCOutFragCreates);
+Index: net-snmp-5.7.3/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c
++++ net-snmp-5.7.3/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c
+@@ -270,7 +270,7 @@ The total number of input IP datagrams r
+  */
+ int
+ ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                          U64 * ipIfStatsHCInReceives_val_ptr)
++                          struct counter64 *ipIfStatsHCInReceives_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCInReceives_val_ptr);
+@@ -395,7 +395,7 @@ The total number of octets received in i
+  */
+ int
+ ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                        U64 * ipIfStatsHCInOctets_val_ptr)
++                        struct counter64 *ipIfStatsHCInOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCInOctets_val_ptr);
+@@ -862,7 +862,7 @@ The number of input datagrams for which
+  */
+ int
+ ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                               U64 * ipIfStatsHCInForwDatagrams_val_ptr)
++                               struct counter64 *ipIfStatsHCInForwDatagrams_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCInForwDatagrams_val_ptr);
+@@ -1267,7 +1267,7 @@ The total number of datagrams successful
+  */
+ int
+ ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                          U64 * ipIfStatsHCInDelivers_val_ptr)
++                          struct counter64 *ipIfStatsHCInDelivers_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCInDelivers_val_ptr);
+@@ -1396,7 +1396,7 @@ The total number of IP datagrams that lo
+  */
+ int
+ ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                           U64 * ipIfStatsHCOutRequests_val_ptr)
++                           struct counter64 *ipIfStatsHCOutRequests_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCOutRequests_val_ptr);
+@@ -1532,7 +1532,7 @@ The number of datagrams for which this e
+  */
+ int
+ ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                                U64 * ipIfStatsHCOutForwDatagrams_val_ptr)
++                                struct counter64 *ipIfStatsHCOutForwDatagrams_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCOutForwDatagrams_val_ptr);
+@@ -1999,7 +1999,7 @@ The total number of IP datagrams that th
+  */
+ int
+ ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                            U64 * ipIfStatsHCOutTransmits_val_ptr)
++                            struct counter64 *ipIfStatsHCOutTransmits_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCOutTransmits_val_ptr);
+@@ -2123,7 +2123,7 @@ The total number of octets in IP datagra
+  */
+ int
+ ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                         U64 * ipIfStatsHCOutOctets_val_ptr)
++                         struct counter64 *ipIfStatsHCOutOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCOutOctets_val_ptr);
+@@ -2245,7 +2245,7 @@ The number of IP multicast datagrams rec
+  */
+ int
+ ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                           U64 * ipIfStatsHCInMcastPkts_val_ptr)
++                           struct counter64 *ipIfStatsHCInMcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCInMcastPkts_val_ptr);
+@@ -2372,7 +2372,7 @@ The total number of octets received in I
+  */
+ int
+ ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                             U64 * ipIfStatsHCInMcastOctets_val_ptr)
++                             struct counter64 *ipIfStatsHCInMcastOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCInMcastOctets_val_ptr);
+@@ -2497,7 +2497,7 @@ The number of IP multicast datagrams tra
+  */
+ int
+ ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                            U64 * ipIfStatsHCOutMcastPkts_val_ptr)
++                            struct counter64 *ipIfStatsHCOutMcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCOutMcastPkts_val_ptr);
+@@ -2621,7 +2621,7 @@ The total number of octets transmitted i
+  */
+ int
+ ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                              U64 * ipIfStatsHCOutMcastOctets_val_ptr)
++                              struct counter64 *ipIfStatsHCOutMcastOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCOutMcastOctets_val_ptr);
+@@ -2743,7 +2743,7 @@ The number of IP broadcast datagrams rec
+  */
+ int
+ ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                           U64 * ipIfStatsHCInBcastPkts_val_ptr)
++                           struct counter64 *ipIfStatsHCInBcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCInBcastPkts_val_ptr);
+@@ -2865,7 +2865,7 @@ The number of IP broadcast datagrams tra
+  */
+ int
+ ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+-                            U64 * ipIfStatsHCOutBcastPkts_val_ptr)
++                            struct counter64 *ipIfStatsHCOutBcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipIfStatsHCOutBcastPkts_val_ptr);
+Index: net-snmp-5.7.3/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
++++ net-snmp-5.7.3/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
+@@ -50,7 +50,7 @@ extern          "C" {
+                                             ipIfStatsInReceives_val_ptr);
+     int             ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx *
+                                               rowreq_ctx,
+-                                              U64 *
++                                              struct counter64 *
+                                               ipIfStatsHCInReceives_val_ptr);
+     int             ipIfStatsInOctets_get(ipIfStatsTable_rowreq_ctx *
+                                           rowreq_ctx,
+@@ -58,7 +58,7 @@ extern          "C" {
+                                           ipIfStatsInOctets_val_ptr);
+     int             ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx *
+                                             rowreq_ctx,
+-                                            U64 *
++                                            struct counter64 *
+                                             ipIfStatsHCInOctets_val_ptr);
+     int             ipIfStatsInHdrErrors_get(ipIfStatsTable_rowreq_ctx *
+                                              rowreq_ctx,
+@@ -87,7 +87,7 @@ extern          "C" {
+     int            
+         ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
+                                        rowreq_ctx,
+-                                       U64 *
++                                       struct counter64 *
+                                        ipIfStatsHCInForwDatagrams_val_ptr);
+     int             ipIfStatsReasmReqds_get(ipIfStatsTable_rowreq_ctx *
+                                             rowreq_ctx,
+@@ -111,7 +111,7 @@ extern          "C" {
+                                             ipIfStatsInDelivers_val_ptr);
+     int             ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx *
+                                               rowreq_ctx,
+-                                              U64 *
++                                              struct counter64 *
+                                               ipIfStatsHCInDelivers_val_ptr);
+     int             ipIfStatsOutRequests_get(ipIfStatsTable_rowreq_ctx *
+                                              rowreq_ctx,
+@@ -119,7 +119,7 @@ extern          "C" {
+                                              ipIfStatsOutRequests_val_ptr);
+     int             ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx *
+                                                rowreq_ctx,
+-                                               U64 *
++                                               struct counter64 *
+                                                ipIfStatsHCOutRequests_val_ptr);
+     int             ipIfStatsOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx
+                                                   * rowreq_ctx,
+@@ -128,7 +128,7 @@ extern          "C" {
+     int            
+         ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
+                                         rowreq_ctx,
+-                                        U64 *
++                                        struct counter64 *
+                                         ipIfStatsHCOutForwDatagrams_val_ptr);
+     int             ipIfStatsOutDiscards_get(ipIfStatsTable_rowreq_ctx *
+                                              rowreq_ctx,
+@@ -156,7 +156,7 @@ extern          "C" {
+                                               ipIfStatsOutTransmits_val_ptr);
+     int             ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx *
+                                                 rowreq_ctx,
+-                                                U64 *
++                                                struct counter64 *
+                                                 ipIfStatsHCOutTransmits_val_ptr);
+     int             ipIfStatsOutOctets_get(ipIfStatsTable_rowreq_ctx *
+                                            rowreq_ctx,
+@@ -164,7 +164,7 @@ extern          "C" {
+                                            ipIfStatsOutOctets_val_ptr);
+     int             ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx *
+                                              rowreq_ctx,
+-                                             U64 *
++                                             struct counter64 *
+                                              ipIfStatsHCOutOctets_val_ptr);
+     int             ipIfStatsInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                              rowreq_ctx,
+@@ -172,7 +172,7 @@ extern          "C" {
+                                              ipIfStatsInMcastPkts_val_ptr);
+     int             ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                                rowreq_ctx,
+-                                               U64 *
++                                               struct counter64 *
+                                                ipIfStatsHCInMcastPkts_val_ptr);
+     int             ipIfStatsInMcastOctets_get(ipIfStatsTable_rowreq_ctx *
+                                                rowreq_ctx,
+@@ -180,7 +180,7 @@ extern          "C" {
+                                                ipIfStatsInMcastOctets_val_ptr);
+     int             ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx
+                                                  * rowreq_ctx,
+-                                                 U64 *
++                                                 struct counter64 *
+                                                  ipIfStatsHCInMcastOctets_val_ptr);
+     int             ipIfStatsOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                               rowreq_ctx,
+@@ -188,7 +188,7 @@ extern          "C" {
+                                               ipIfStatsOutMcastPkts_val_ptr);
+     int             ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                                 rowreq_ctx,
+-                                                U64 *
++                                                struct counter64 *
+                                                 ipIfStatsHCOutMcastPkts_val_ptr);
+     int             ipIfStatsOutMcastOctets_get(ipIfStatsTable_rowreq_ctx *
+                                                 rowreq_ctx,
+@@ -196,7 +196,7 @@ extern          "C" {
+                                                 ipIfStatsOutMcastOctets_val_ptr);
+     int             ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx
+                                                   * rowreq_ctx,
+-                                                  U64 *
++                                                  struct counter64 *
+                                                   ipIfStatsHCOutMcastOctets_val_ptr);
+     int             ipIfStatsInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                              rowreq_ctx,
+@@ -204,7 +204,7 @@ extern          "C" {
+                                              ipIfStatsInBcastPkts_val_ptr);
+     int             ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                                rowreq_ctx,
+-                                               U64 *
++                                               struct counter64 *
+                                                ipIfStatsHCInBcastPkts_val_ptr);
+     int             ipIfStatsOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                               rowreq_ctx,
+@@ -212,7 +212,7 @@ extern          "C" {
+                                               ipIfStatsOutBcastPkts_val_ptr);
+     int             ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+                                                 rowreq_ctx,
+-                                                U64 *
++                                                struct counter64 *
+                                                 ipIfStatsHCOutBcastPkts_val_ptr);
+     int            
+         ipIfStatsDiscontinuityTime_get(ipIfStatsTable_rowreq_ctx *
+Index: net-snmp-5.7.3/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c
++++ net-snmp-5.7.3/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c
+@@ -722,10 +722,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCINRECEIVES:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCInReceives_get(rowreq_ctx,
+-                                       (U64 *) var->val.string);
++                                       (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -741,9 +741,9 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCINOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ipIfStatsHCInOctets_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ipIfStatsHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -810,10 +810,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCINFORWDATAGRAMS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCInForwDatagrams_get(rowreq_ctx,
+-                                            (U64 *) var->val.string);
++                                            (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -869,10 +869,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCINDELIVERS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCInDelivers_get(rowreq_ctx,
+-                                       (U64 *) var->val.string);
++                                       (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -889,10 +889,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCOUTREQUESTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCOutRequests_get(rowreq_ctx,
+-                                        (U64 *) var->val.string);
++                                        (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -909,10 +909,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCOUTFORWDATAGRAMS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCOutForwDatagrams_get(rowreq_ctx,
+-                                             (U64 *) var->val.string);
++                                             (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -979,10 +979,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCOUTTRANSMITS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCOutTransmits_get(rowreq_ctx,
+-                                         (U64 *) var->val.string);
++                                         (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -999,9 +999,9 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCOUTOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+-        rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string);
++        rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1018,10 +1018,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCINMCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCInMcastPkts_get(rowreq_ctx,
+-                                        (U64 *) var->val.string);
++                                        (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1038,10 +1038,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCINMCASTOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCInMcastOctets_get(rowreq_ctx,
+-                                          (U64 *) var->val.string);
++                                          (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1058,10 +1058,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCOUTMCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCOutMcastPkts_get(rowreq_ctx,
+-                                         (U64 *) var->val.string);
++                                         (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1078,10 +1078,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCOUTMCASTOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCOutMcastOctets_get(rowreq_ctx,
+-                                           (U64 *) var->val.string);
++                                           (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1098,10 +1098,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCINBCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCInBcastPkts_get(rowreq_ctx,
+-                                        (U64 *) var->val.string);
++                                        (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1118,10 +1118,10 @@ _ipIfStatsTable_get_column(ipIfStatsTabl
+          * ipIfStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPIFSTATSHCOUTBCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipIfStatsHCOutBcastPkts_get(rowreq_ctx,
+-                                         (U64 *) var->val.string);
++                                         (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+Index: net-snmp-5.7.3/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c
++++ net-snmp-5.7.3/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c
+@@ -452,7 +452,7 @@ The total number of input IP datagrams r
+  */
+ int
+ ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                              U64 * ipSystemStatsHCInReceives_val_ptr)
++                              struct counter64 *ipSystemStatsHCInReceives_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCInReceives_val_ptr);
+@@ -579,7 +579,7 @@ The total number of octets received in i
+  */
+ int
+ ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                            U64 * ipSystemStatsHCInOctets_val_ptr)
++                            struct counter64 *ipSystemStatsHCInOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCInOctets_val_ptr);
+@@ -1058,7 +1058,7 @@ The number of input datagrams for which
+ int
+ ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
+                                    rowreq_ctx,
+-                                   U64 *
++                                   struct counter64 *
+                                    ipSystemStatsHCInForwDatagrams_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+@@ -1474,7 +1474,7 @@ The total number of datagrams successful
+  */
+ int
+ ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                              U64 * ipSystemStatsHCInDelivers_val_ptr)
++                              struct counter64 *ipSystemStatsHCInDelivers_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCInDelivers_val_ptr);
+@@ -1602,7 +1602,7 @@ The total number of IP datagrams which l
+  */
+ int
+ ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                               U64 * ipSystemStatsHCOutRequests_val_ptr)
++                               struct counter64 *ipSystemStatsHCOutRequests_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCOutRequests_val_ptr);
+@@ -1809,7 +1809,7 @@ The number of datagrams for which this e
+ int
+ ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+-                                    U64 *
++                                    struct counter64 *
+                                     ipSystemStatsHCOutForwDatagrams_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+@@ -2288,7 +2288,7 @@ The total number of IP datagrams that th
+  */
+ int
+ ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                                U64 * ipSystemStatsHCOutTransmits_val_ptr)
++                                struct counter64 *ipSystemStatsHCOutTransmits_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCOutTransmits_val_ptr);
+@@ -2415,7 +2415,7 @@ The total number of octets in IP datagra
+  */
+ int
+ ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                             U64 * ipSystemStatsHCOutOctets_val_ptr)
++                             struct counter64 *ipSystemStatsHCOutOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCOutOctets_val_ptr);
+@@ -2539,7 +2539,7 @@ The number of IP multicast datagrams rec
+  */
+ int
+ ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                               U64 * ipSystemStatsHCInMcastPkts_val_ptr)
++                               struct counter64 *ipSystemStatsHCInMcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCInMcastPkts_val_ptr);
+@@ -2665,7 +2665,7 @@ The total number of octets received in I
+ int
+ ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                  rowreq_ctx,
+-                                 U64 *
++                                 struct counter64 *
+                                  ipSystemStatsHCInMcastOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+@@ -2790,7 +2790,7 @@ The number of IP multicast datagrams tra
+  */
+ int
+ ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                                U64 * ipSystemStatsHCOutMcastPkts_val_ptr)
++                                struct counter64 *ipSystemStatsHCOutMcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCOutMcastPkts_val_ptr);
+@@ -2921,7 +2921,7 @@ The total number of octets transmitted i
+ int
+ ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                   rowreq_ctx,
+-                                  U64 *
++                                  struct counter64 *
+                                   ipSystemStatsHCOutMcastOctets_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+@@ -3046,7 +3046,7 @@ The number of IP broadcast datagrams rec
+  */
+ int
+ ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                               U64 * ipSystemStatsHCInBcastPkts_val_ptr)
++                               struct counter64 *ipSystemStatsHCInBcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCInBcastPkts_val_ptr);
+@@ -3170,7 +3170,7 @@ The number of IP broadcast datagrams tra
+  */
+ int
+ ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
+-                                U64 * ipSystemStatsHCOutBcastPkts_val_ptr)
++                                struct counter64 *ipSystemStatsHCOutBcastPkts_val_ptr)
+ {
+    /** we should have a non-NULL pointer */
+     netsnmp_assert(NULL != ipSystemStatsHCOutBcastPkts_val_ptr);
+Index: net-snmp-5.7.3/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
++++ net-snmp-5.7.3/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
+@@ -144,93 +144,22 @@ config_require(ip-mib/ipSystemStatsTable
+      *********************************************************************
+      * function prototypes
+      */
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsTable_pre_request(ipSystemStatsTable_registration *
++    int ipSystemStatsTable_pre_request(ipSystemStatsTable_registration *
+                                        user_context);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsTable_post_request(ipSystemStatsTable_registration *
++    int ipSystemStatsTable_post_request(ipSystemStatsTable_registration *
+                                         user_context, int rc);
+ 
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsTable_rowreq_ctx_init(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsTable_rowreq_ctx_init(ipSystemStatsTable_rowreq_ctx *
+                                            rowreq_ctx,
+                                            void *user_init_ctx);
+     void
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+         ipSystemStatsTable_rowreq_ctx_cleanup(ipSystemStatsTable_rowreq_ctx
+                                               * rowreq_ctx);
+ 
+     ipSystemStatsTable_data *ipSystemStatsTable_allocate_data(void);
+     void            ipSystemStatsTable_release_data(ipSystemStatsTable_data
+                                                     * data);
+-
+-
+-         
+-         
+-         
+-         
+-         
+-         
+-        ipSystemStatsTable_rowreq_ctx
++    ipSystemStatsTable_rowreq_ctx
+         * ipSystemStatsTable_row_find_by_mib_index
+         (ipSystemStatsTable_mib_index * mib_idx);
+ 
+@@ -265,226 +194,50 @@ config_require(ip-mib/ipSystemStatsTable
+      * indexes
+      */
+ 
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+                                     u_long *
+                                     ipSystemStatsInReceives_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+-                                      U64 *
++                                      struct counter64 *
+                                       ipSystemStatsHCInReceives_val_ptr);
+     int             ipSystemStatsInOctets_get(ipSystemStatsTable_rowreq_ctx
+                                               * rowreq_ctx,
+                                               u_long *
+                                               ipSystemStatsInOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+-                                    U64 * ipSystemStatsHCInOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx *
++                                    struct counter64 *ipSystemStatsHCInOctets_val_ptr);
++    int ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+                                      u_long *
+                                      ipSystemStatsInHdrErrors_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+                                     u_long *
+                                     ipSystemStatsInNoRoutes_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+                                       u_long *
+                                       ipSystemStatsInAddrErrors_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx *
+                                          rowreq_ctx,
+                                          u_long *
+                                          ipSystemStatsInUnknownProtos_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                          rowreq_ctx,
+                                          u_long *
+                                          ipSystemStatsInTruncatedPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
+                                          rowreq_ctx,
+                                          u_long *
+                                          ipSystemStatsInForwDatagrams_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
+                                            rowreq_ctx,
+-                                           U64 *
++                                           struct counter64 *
+                                            ipSystemStatsHCInForwDatagrams_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+                                     u_long *
+                                     ipSystemStatsReasmReqds_val_ptr);
+@@ -492,690 +245,142 @@ config_require(ip-mib/ipSystemStatsTable
+                                               * rowreq_ctx,
+                                               u_long *
+                                               ipSystemStatsReasmOKs_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+                                     u_long *
+                                     ipSystemStatsReasmFails_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+                                     u_long *
+                                     ipSystemStatsInDiscards_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+                                     u_long *
+                                     ipSystemStatsInDelivers_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+-                                      U64 *
++                                      struct counter64 *
+                                       ipSystemStatsHCInDelivers_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+                                      u_long *
+                                      ipSystemStatsOutRequests_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx *
+                                        rowreq_ctx,
+-                                       U64 *
++                                       struct counter64 *
+                                        ipSystemStatsHCOutRequests_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+                                      u_long *
+                                      ipSystemStatsOutNoRoutes_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
+                                           rowreq_ctx,
+                                           u_long *
+                                           ipSystemStatsOutForwDatagrams_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
+                                             rowreq_ctx,
+-                                            U64 *
++                                            struct counter64 *
+                                             ipSystemStatsHCOutForwDatagrams_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+                                      u_long *
+                                      ipSystemStatsOutDiscards_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+                                       u_long *
+                                       ipSystemStatsOutFragReqds_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx *
+                                     rowreq_ctx,
+                                     u_long *
+                                     ipSystemStatsOutFragOKs_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+                                       u_long *
+                                       ipSystemStatsOutFragFails_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx *
+                                         rowreq_ctx,
+                                         u_long *
+                                         ipSystemStatsOutFragCreates_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+                                       u_long *
+                                       ipSystemStatsOutTransmits_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
+                                         rowreq_ctx,
+-                                        U64 *
++                                        struct counter64 *
+                                         ipSystemStatsHCOutTransmits_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                    rowreq_ctx,
+                                    u_long *
+                                    ipSystemStatsOutOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+-                                     U64 *
++                                     struct counter64 *
+                                      ipSystemStatsHCOutOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+                                      u_long *
+                                      ipSystemStatsInMcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                        rowreq_ctx,
+-                                       U64 *
++                                       struct counter64 *
+                                        ipSystemStatsHCInMcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                        rowreq_ctx,
+                                        u_long *
+                                        ipSystemStatsInMcastOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                          rowreq_ctx,
+-                                         U64 *
++                                         struct counter64 *
+                                          ipSystemStatsHCInMcastOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+                                       u_long *
+                                       ipSystemStatsOutMcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                         rowreq_ctx,
+-                                        U64 *
++                                        struct counter64 *
+                                         ipSystemStatsHCOutMcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                         rowreq_ctx,
+                                         u_long *
+                                         ipSystemStatsOutMcastOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
+                                           rowreq_ctx,
+-                                          U64 *
++                                          struct counter64 *
+                                           ipSystemStatsHCOutMcastOctets_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+                                      u_long *
+                                      ipSystemStatsInBcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                        rowreq_ctx,
+-                                       U64 *
++                                       struct counter64 *
+                                        ipSystemStatsHCInBcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                       rowreq_ctx,
+                                       u_long *
+                                       ipSystemStatsOutBcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
+                                         rowreq_ctx,
+-                                        U64 *
++                                        struct counter64 *
+                                         ipSystemStatsHCOutBcastPkts_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx *
+                                            rowreq_ctx,
+                                            u_long *
+                                            ipSystemStatsDiscontinuityTime_val_ptr);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx *
+                                      rowreq_ctx,
+                                      u_long *
+                                      ipSystemStatsRefreshRate_val_ptr);
+-
+-
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsTable_indexes_set_tbl_idx(ipSystemStatsTable_mib_index
++    int ipSystemStatsTable_indexes_set_tbl_idx(ipSystemStatsTable_mib_index
+                                                * tbl_idx,
+                                                u_long
+                                                ipSystemStatsIPVersion_val);
+-    int
+-     
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        
+-        ipSystemStatsTable_indexes_set(ipSystemStatsTable_rowreq_ctx *
++    int ipSystemStatsTable_indexes_set(ipSystemStatsTable_rowreq_ctx *
+                                        rowreq_ctx,
+                                        u_long ipSystemStatsIPVersion_val);
+ 
+-
+-
+     /*
+      *********************************************************************
+      * SET function declarations
+Index: net-snmp-5.7.3/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c
++++ net-snmp-5.7.3/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c
+@@ -674,10 +674,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCINRECEIVES:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCInReceives_get(rowreq_ctx,
+-                                           (U64 *) var->val.string);
++                                           (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -694,10 +694,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCINOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCInOctets_get(rowreq_ctx,
+-                                         (U64 *) var->val.string);
++                                         (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -764,10 +764,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCINFORWDATAGRAMS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCInForwDatagrams_get(rowreq_ctx,
+-                                                (U64 *) var->val.string);
++                                                (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -824,10 +824,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCINDELIVERS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCInDelivers_get(rowreq_ctx,
+-                                           (U64 *) var->val.string);
++                                           (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -844,10 +844,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCOUTREQUESTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCOutRequests_get(rowreq_ctx,
+-                                            (U64 *) var->val.string);
++                                            (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -874,10 +874,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCOUTFORWDATAGRAMS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCOutForwDatagrams_get(rowreq_ctx,
+-                                                 (U64 *) var->val.string);
++                                                 (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -944,10 +944,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCOUTTRANSMITS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCOutTransmits_get(rowreq_ctx,
+-                                             (U64 *) var->val.string);
++                                             (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -964,10 +964,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCOUTOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCOutOctets_get(rowreq_ctx,
+-                                          (U64 *) var->val.string);
++                                          (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -984,10 +984,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCINMCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCInMcastPkts_get(rowreq_ctx,
+-                                            (U64 *) var->val.string);
++                                            (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1004,10 +1004,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCINMCASTOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCInMcastOctets_get(rowreq_ctx,
+-                                              (U64 *) var->val.string);
++                                              (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1024,10 +1024,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCOUTMCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCOutMcastPkts_get(rowreq_ctx,
+-                                             (U64 *) var->val.string);
++                                             (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1044,10 +1044,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCOUTMCASTOCTETS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCOutMcastOctets_get(rowreq_ctx,
+-                                               (U64 *) var->val.string);
++                                               (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1064,10 +1064,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCINBCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCInBcastPkts_get(rowreq_ctx,
+-                                            (U64 *) var->val.string);
++                                            (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+@@ -1084,10 +1084,10 @@ _ipSystemStatsTable_get_column(ipSystemS
+          * ipSystemStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
+          */
+     case COLUMN_IPSYSTEMSTATSHCOUTBCASTPKTS:
+-        var->val_len = sizeof(U64);
++        var->val_len = sizeof(struct counter64);
+         var->type = ASN_COUNTER64;
+         rc = ipSystemStatsHCOutBcastPkts_get(rowreq_ctx,
+-                                             (U64 *) var->val.string);
++                                             (struct counter64 *) var->val.string);
+         break;
+ 
+         /*
+Index: net-snmp-5.7.3/include/net-snmp/data_access/ipstats.h
+===================================================================
+--- net-snmp-5.7.3.orig/include/net-snmp/data_access/ipstats.h
++++ net-snmp-5.7.3/include/net-snmp/data_access/ipstats.h
+@@ -58,45 +58,45 @@ typedef struct netsnmp_ipstats_s {
+     * other columns, when underlying OS does not provide them.
+     * Always fill at least 32 bits, the table is periodically polled -> 32 bit
+     * overflow shall be detected and 64 bit value should be computed automatically. */
+-   U64             HCInReceives;
+-   U64             HCInOctets;
++   struct counter64 HCInReceives;
++   struct counter64 HCInOctets;
+    u_long          InHdrErrors;
+-   U64             HCInNoRoutes; 
++   struct counter64 HCInNoRoutes; 
+    u_long          InAddrErrors;
+    u_long          InUnknownProtos;
+    u_long          InTruncatedPkts;
+    
+    /* optional, can be computed from HCInNoRoutes and HCOutForwDatagrams */
+-   U64             HCInForwDatagrams; 
++   struct counter64 HCInForwDatagrams; 
+    
+    u_long          ReasmReqds;
+    u_long          ReasmOKs;
+    u_long          ReasmFails;
+    u_long          InDiscards;
+-   U64             HCInDelivers;
+-   U64             HCOutRequests;
+-   U64             HCOutNoRoutes;
+-   U64             HCOutForwDatagrams;
+-   U64             HCOutDiscards;
++   struct counter64 HCInDelivers;
++   struct counter64 HCOutRequests;
++   struct counter64 HCOutNoRoutes;
++   struct counter64 HCOutForwDatagrams;
++   struct counter64 HCOutDiscards;
+    
+    /* optional, can be computed from HCOutFragOKs + HCOutFragFails*/
+-   U64             HCOutFragReqds;
+-   U64             HCOutFragOKs;
+-   U64             HCOutFragFails;
+-   U64             HCOutFragCreates;
++   struct counter64 HCOutFragReqds;
++   struct counter64 HCOutFragOKs;
++   struct counter64 HCOutFragFails;
++   struct counter64 HCOutFragCreates;
+    
+    /* optional, can be computed from 
+     * HCOutRequests +HCOutForwDatagrams + HCOutFragCreates
+     * - HCOutFragReqds - HCOutNoRoutes  - HCOutDiscards */
+-   U64             HCOutTransmits;
++   struct counter64 HCOutTransmits;
+    
+-   U64             HCOutOctets;
+-   U64             HCInMcastPkts;
+-   U64             HCInMcastOctets;
+-   U64             HCOutMcastPkts;
+-   U64             HCOutMcastOctets;
+-   U64             HCInBcastPkts;
+-   U64             HCOutBcastPkts;
++   struct counter64 HCOutOctets;
++   struct counter64 HCInMcastPkts;
++   struct counter64 HCInMcastOctets;
++   struct counter64 HCOutMcastPkts;
++   struct counter64 HCOutMcastOctets;
++   struct counter64 HCInBcastPkts;
++   struct counter64 HCOutBcastPkts;
+ 
+    /* Array of available columns.*/
+    int             columnAvail[IPSYSTEMSTATSTABLE_LAST+1];
+Index: net-snmp-5.7.3/include/net-snmp/library/int64.h
+===================================================================
+--- net-snmp-5.7.3.orig/include/net-snmp/library/int64.h
++++ net-snmp-5.7.3/include/net-snmp/library/int64.h
+@@ -5,31 +5,29 @@
+ extern          "C" {
+ #endif
+ 
+-    typedef struct counter64 U64;
+-
+ #define I64CHARSZ 21
+ 
+-    void            divBy10(U64, U64 *, unsigned int *);
+-    void            multBy10(U64, U64 *);
+-    void            incrByU16(U64 *, unsigned int);
+-    void            incrByU32(U64 *, unsigned int);
++    void            divBy10(struct counter64, struct counter64 *, unsigned int *);
++    void            multBy10(struct counter64, struct counter64 *);
++    void            incrByU16(struct counter64 *, unsigned int);
++    void            incrByU32(struct counter64 *, unsigned int);
+     NETSNMP_IMPORT
+-    void            zeroU64(U64 *);
+-    int             isZeroU64(const U64 *);
++    void            zeroU64(struct counter64 *);
++    int             isZeroU64(const struct counter64 *);
+     NETSNMP_IMPORT
+-    void            printU64(char *, const U64 *);
++    void            printU64(char *, const struct counter64 *);
+     NETSNMP_IMPORT
+-    void            printI64(char *, const U64 *);
+-    int             read64(U64 *, const char *);
++    void            printI64(char *, const struct counter64 *);
++    int             read64(struct counter64 *, const char *);
+     NETSNMP_IMPORT
+-    void            u64Subtract(const U64 * pu64one, const U64 * pu64two,
+-                                U64 * pu64out);
+-    void            u64Incr(U64 * pu64out, const U64 * pu64one);
+-    void            u64UpdateCounter(U64 * pu64out, const U64 * pu64one,
+-                                     const U64 * pu64two);
+-    void            u64Copy(U64 * pu64one, const U64 * pu64two);
++    void            u64Subtract(const struct counter64 *pu64one, const struct counter64 *pu64two,
++                                struct counter64 *pu64out);
++    void            u64Incr(struct counter64 *pu64out, const struct counter64 *pu64one);
++    void            u64UpdateCounter(struct counter64 *pu64out, const struct counter64 *pu64one,
++                                     const struct counter64 *pu64two);
++    void            u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two);
+ 
+-    int             netsnmp_c64_check_for_32bit_wrap(U64 *old_val, U64 *new_val,
++    int             netsnmp_c64_check_for_32bit_wrap(struct counter64 *old_val, struct counter64 *new_val,
+                                                      int adjust);
+     NETSNMP_IMPORT
+     int             netsnmp_c64_check32_and_update(struct counter64 *prev_val,
+Index: net-snmp-5.7.3/snmplib/int64.c
+===================================================================
+--- net-snmp-5.7.3.orig/snmplib/int64.c
++++ net-snmp-5.7.3/snmplib/int64.c
+@@ -33,7 +33,7 @@
+  * @param[out] puR   Remainder.
+  */
+ void
+-divBy10(U64 u64, U64 * pu64Q, unsigned int *puR)
++divBy10(struct counter64 u64, struct counter64 *pu64Q, unsigned int *puR)
+ {
+     unsigned long   ulT;
+     unsigned long   ulQ;
+@@ -83,7 +83,7 @@ divBy10(U64 u64, U64 * pu64Q, unsigned i
+  * @param[out] pu64P Product.
+  */
+ void
+-multBy10(U64 u64, U64 * pu64P)
++multBy10(struct counter64 u64, struct counter64 *pu64P)
+ {
+     unsigned long   ulT;
+     unsigned long   ulP;
+@@ -130,7 +130,7 @@ multBy10(U64 u64, U64 * pu64P)
+  *
+  */
+ void
+-incrByU16(U64 * pu64, unsigned int u16)
++incrByU16(struct counter64 *pu64, unsigned int u16)
+ {
+     incrByU32(pu64, u16);
+ }
+@@ -143,7 +143,7 @@ incrByU16(U64 * pu64, unsigned int u16)
+  *
+  */
+ void
+-incrByU32(U64 * pu64, unsigned int u32)
++incrByU32(struct counter64 *pu64, unsigned int u32)
+ {
+     uint32_t tmp;
+ 
+@@ -161,7 +161,7 @@ incrByU32(U64 * pu64, unsigned int u32)
+  * @param[out] pu64out pu64one - pu64two.
+  */
+ void
+-u64Subtract(const U64 * pu64one, const U64 * pu64two, U64 * pu64out)
++u64Subtract(const struct counter64 *pu64one, const struct counter64 *pu64two, struct counter64 *pu64out)
+ {
+     int carry;
+ 
+@@ -177,7 +177,7 @@ u64Subtract(const U64 * pu64one, const U
+  * @param[in,out] pu64out pu64out += pu64one.
+  */
+ void
+-u64Incr(U64 * pu64out, const U64 * pu64one)
++u64Incr(struct counter64 *pu64out, const struct counter64 *pu64one)
+ {
+     pu64out->high = (uint32_t)(pu64out->high + pu64one->high);
+     incrByU32(pu64out, pu64one->low);
+@@ -191,9 +191,9 @@ u64Incr(U64 * pu64out, const U64 * pu64o
+  * @param[out] pu64out pu64out += (pu64one - pu64two)
+  */
+ void
+-u64UpdateCounter(U64 * pu64out, const U64 * pu64one, const U64 * pu64two)
++u64UpdateCounter(struct counter64 *pu64out, const struct counter64 *pu64one, const struct counter64 *pu64two)
+ {
+-    U64 tmp;
++    struct counter64 tmp;
+ 
+     u64Subtract(pu64one, pu64two, &tmp);
+     u64Incr(pu64out, &tmp);
+@@ -208,7 +208,7 @@ netsnmp_feature_child_of(u64copy, netsnm
+  * @param[out] pu64one Where to store the copy - *pu64one = *pu64two.
+  */
+ void
+-u64Copy(U64 * pu64one, const U64 * pu64two)
++u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two)
+ {
+     *pu64one = *pu64two;
+ }
+@@ -220,7 +220,7 @@ u64Copy(U64 * pu64one, const U64 * pu64t
+  * @param[in] pu64 Number to be zeroed.
+  */
+ void
+-zeroU64(U64 * pu64)
++zeroU64(struct counter64 *pu64)
+ {
+     pu64->low = 0;
+     pu64->high = 0;
+@@ -232,7 +232,7 @@ zeroU64(U64 * pu64)
+  * @param[in] pu64 Number to be checked.
+  */
+ int
+-isZeroU64(const U64 * pu64)
++isZeroU64(const struct counter64 *pu64)
+ {
+     return pu64->low == 0 && pu64->high == 0;
+ }
+@@ -390,10 +390,10 @@ netsnmp_c64_check32_and_update(struct co
+ /** Convert an unsigned 64-bit number to ASCII. */
+ void
+ printU64(char *buf, /* char [I64CHARSZ+1]; */
+-         const U64 * pu64)
++         const struct counter64 *pu64)
+ {
+-    U64             u64a;
+-    U64             u64b;
++    struct counter64 u64a;
++    struct counter64 u64b;
+ 
+     char            aRes[I64CHARSZ + 1];
+     unsigned int    u;
+@@ -414,9 +414,9 @@ printU64(char *buf, /* char [I64CHARSZ+1
+ /** Convert a signed 64-bit number to ASCII. */
+ void
+ printI64(char *buf, /* char [I64CHARSZ+1]; */
+-         const U64 * pu64)
++         const struct counter64 *pu64)
+ {
+-    U64             u64a;
++    struct counter64 u64a;
+ 
+     if (pu64->high & 0x80000000) {
+         u64a.high = (uint32_t) ~pu64->high;
+@@ -429,11 +429,11 @@ printI64(char *buf, /* char [I64CHARSZ+1
+     }
+ }
+ 
+-/** Convert a signed 64-bit integer from ASCII to U64. */
++/** Convert a signed 64-bit integer from ASCII to struct counter64. */
+ int
+-read64(U64 * i64, const char *str)
++read64(struct counter64 *i64, const char *str)
+ {
+-    U64             i64p;
++    struct counter64 i64p;
+     unsigned int    u;
+     int             sign = 0;
+     int             ok = 0;
+Index: net-snmp-5.7.3/snmplib/read_config.c
+===================================================================
+--- net-snmp-5.7.3.orig/snmplib/read_config.c
++++ net-snmp-5.7.3/snmplib/read_config.c
+@@ -2270,10 +2270,10 @@ read_config_read_memory(int type, char *
+         return readfrom;
+ 
+     case ASN_COUNTER64:
+-        if (*len < sizeof(U64))
++        if (*len < sizeof(struct counter64))
+             return NULL;
+-        *len = sizeof(U64);
+-        read64((U64 *) dataptr, readfrom);
++        *len = sizeof(struct counter64);
++        read64((struct counter64 *) dataptr, readfrom);
+         readfrom = skip_token(readfrom);
+         return readfrom;
+     }
+Index: net-snmp-5.7.3/testing/fulltests/unit-tests/T015int64_clib.c
+===================================================================
+--- net-snmp-5.7.3.orig/testing/fulltests/unit-tests/T015int64_clib.c
++++ net-snmp-5.7.3/testing/fulltests/unit-tests/T015int64_clib.c
+@@ -1,4 +1,4 @@
+-/* HEADER Testing 64-bit integer operations (U64). */
++/* HEADER Testing 64-bit integer operations (struct counter64). */
+ 
+ int i, j;
+ char buf[22];
+@@ -15,7 +15,7 @@ static const int64_t intval[] = {
+ };
+ 
+ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
+-    U64 a, b;
++    struct counter64 a, b;
+     a.low = (uint32_t)intval[i];
+     a.high = (uint32_t)(intval[i] >> 32);
+     printI64(buf, &a);
+@@ -27,7 +27,7 @@ for (i = 0; i < sizeof(intval)/sizeof(in
+ 
+ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
+     for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) {
+-        U64 a, b;
++        struct counter64 a, b;
+         uint64_t d;
+         a.low = (uint32_t)intval[i];
+         a.high = (uint32_t)(intval[i] >> 32);
+@@ -43,7 +43,7 @@ for (i = 0; i < sizeof(intval)/sizeof(in
+         
+ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
+     for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) {
+-        U64 a, b, c;
++        struct counter64 a, b, c;
+         uint64_t d;
+         a.low = (uint32_t)intval[i];
+         a.high = (uint32_t)(intval[i] >> 32);
+@@ -58,7 +58,7 @@ for (i = 0; i < sizeof(intval)/sizeof(in
+ }
+         
+ {
+-    U64 old_val, new_val;
++    struct counter64 old_val, new_val;
+     old_val.low = 7;
+     old_val.high = 0;
+     new_val = old_val;
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch
index c6401fe..44359be 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-config_os_headers-Error-Fix.patch
@@ -17,11 +17,11 @@
  configure.d/config_os_headers | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
-index 708aa09..0df32ca 100644
---- a/configure.d/config_os_headers
-+++ b/configure.d/config_os_headers
-@@ -482,8 +482,8 @@ then
+Index: net-snmp-5.7.3/configure.d/config_os_headers
+===================================================================
+--- net-snmp-5.7.3.orig/configure.d/config_os_headers
++++ net-snmp-5.7.3/configure.d/config_os_headers
+@@ -484,8 +484,8 @@ then
      unset ac_cv_header_pkg_h
      netsnmp_save_CPPFLAGS="$CPPFLAGS"
      netsnmp_save_LDFLAGS="$LDFLAGS"
@@ -32,6 +32,3 @@
      AC_CHECK_HEADERS(pkg.h,
          NETSNMP_SEARCH_LIBS(pkg_init, pkg,
  	    AC_DEFINE(HAVE_LIBPKG, 1, [define if you have BSD pkg-ng])))
--- 
-1.8.4.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-UDPIPv6-transport-Add-a-missing-return-state.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-UDPIPv6-transport-Add-a-missing-return-state.patch
index 6255f7c..527aa39 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-UDPIPv6-transport-Add-a-missing-return-state.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-snmplib-UDPIPv6-transport-Add-a-missing-return-state.patch
@@ -12,11 +12,11 @@
  snmplib/transports/snmpUDPIPv6Domain.c | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/snmplib/transports/snmpUDPIPv6Domain.c b/snmplib/transports/snmpUDPIPv6Domain.c
-index 029b164..11c39bb 100644
---- a/snmplib/transports/snmpUDPIPv6Domain.c
-+++ b/snmplib/transports/snmpUDPIPv6Domain.c
-@@ -285,6 +285,7 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local)
+Index: net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c
+===================================================================
+--- net-snmp-5.7.3.orig/snmplib/transports/snmpUDPIPv6Domain.c
++++ net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c
+@@ -305,6 +305,7 @@ netsnmp_udp6_transport(struct sockaddr_i
                                   errno, strerror(errno)));
                  netsnmp_socketbase_close(t);
                  netsnmp_transport_free(t);
@@ -24,6 +24,3 @@
              }
          }
          /*
--- 
-2.9.3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
index a360c3a..d29be33 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
@@ -10,11 +10,11 @@
 
 Signed-off-by: Roy.Li <rongqing.li@windriver.com>
 ---
-diff --git a/Makefile.top b/Makefile.top
-index 862fb94..ed7dcfc 100644
---- a/Makefile.top
-+++ b/Makefile.top
-@@ -86,7 +86,7 @@ LIBREVISION = 2
+Index: net-snmp-5.7.3/Makefile.top
+===================================================================
+--- net-snmp-5.7.3.orig/Makefile.top
++++ net-snmp-5.7.3/Makefile.top
+@@ -87,7 +87,7 @@ LIBREVISION = 3
  LIB_LD_CMD      = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
  LIB_EXTENSION   = la
  LIB_VERSION     =
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch
index efe8038..fbd274b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch
@@ -12,11 +12,11 @@
  snmplib/snmpv3.c | 4 ++--
  2 files changed, 3 insertions(+), 2 deletions(-)
 
-diff --git a/agent/snmpd.c b/agent/snmpd.c
-index 056048a..12a7ea1 100644
---- a/agent/snmpd.c
-+++ b/agent/snmpd.c
-@@ -1246,6 +1246,7 @@ receive(void)
+Index: net-snmp-5.7.3/agent/snmpd.c
+===================================================================
+--- net-snmp-5.7.3.orig/agent/snmpd.c
++++ net-snmp-5.7.3/agent/snmpd.c
+@@ -1253,6 +1253,7 @@ receive(void)
  	    snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n",
  		     netsnmp_get_version());
              update_config();
@@ -24,11 +24,11 @@
              send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3);
  #if HAVE_SIGHOLD
              sigrelse(SIGHUP);
-diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c
-index 435cafd..6ad8208 100644
---- a/snmplib/snmpv3.c
-+++ b/snmplib/snmpv3.c
-@@ -984,9 +984,9 @@ init_snmpv3_post_config(int majorid, int minorid, void *serverarg,
+Index: net-snmp-5.7.3/snmplib/snmpv3.c
+===================================================================
+--- net-snmp-5.7.3.orig/snmplib/snmpv3.c
++++ net-snmp-5.7.3/snmplib/snmpv3.c
+@@ -984,9 +984,9 @@ init_snmpv3_post_config(int majorid, int
      /*
       * if our engineID has changed at all, the boots record must be set to 1 
       */
@@ -40,6 +40,3 @@
          engineBoots = 1;
      }
  
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
index 9fb19b3..8f8336a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
@@ -10,11 +10,11 @@
  testing/RUNTESTS |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
 
-diff --git a/testing/RUNTESTS b/testing/RUNTESTS
-index e11c969..fb90f76 100755
---- a/testing/RUNTESTS
-+++ b/testing/RUNTESTS
-@@ -25,13 +25,17 @@ failed_count=0
+Index: net-snmp-5.7.3/testing/RUNTESTS
+===================================================================
+--- net-snmp-5.7.3.orig/testing/RUNTESTS
++++ net-snmp-5.7.3/testing/RUNTESTS
+@@ -29,13 +29,17 @@ failed_count=0
  rm -f failed_tests
  for i in "${srcdir}"/testing/fulltests/default/T*$1*; do
      echo "RUNNING $i"
@@ -32,6 +32,3 @@
  done
  
  if [ -f failed_tests ]; then
--- 
-1.7.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
index 849ae07..faf73a5 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
@@ -32,6 +32,7 @@
            file://0004-configure-fix-incorrect-variable.patch \
            file://net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch \
            file://net-snmp-fix-for-disable-des.patch \
+           file://0001-Remove-U64-typedef.patch \
            "
 SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee"
 SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e"
@@ -60,7 +61,7 @@
                 --with-defaults \
                 --with-install-prefix=${D} \
                 --with-persistent-directory=${localstatedir}/lib/net-snmp \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
+                ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
 "
 
 # net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
@@ -118,6 +119,10 @@
     sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
         -i ${D}${bindir}/net-snmp-create-v3-user
     sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
+           -e "s@\([^ ]*-fdebug-prefix-map=[^ ]*\)\1*@@g" \
+           -e "s@\([^ ]*--sysroot=[^ ]*\)\1*@@g" \
+           -e "s@\([^ ]*--with-libtool-sysroot=[^ ]*\)\1*@@g" \
+           -e "s@\([^ ]*--with-install-prefix=[^ ]*\)\1*@@g" \
         -i ${D}${bindir}/net-snmp-config
 
     if [ "${HAS_PERL}" = "1" ]; then
@@ -146,6 +151,7 @@
 }
 
 SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess"
+SNMP_DBGDIR = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
 
 net_snmp_sysroot_preprocess () {
     if [ -e ${D}${bindir}/net-snmp-config ]; then
@@ -157,6 +163,12 @@
             -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
             -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
             -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \
+            -e "s@-fdebug-prefix-map=${SNMP_DBGDIR}@-fdebug-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \
+            -e "s@-fdebug-prefix-map= -fdebug-prefix-map=@-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+                  -fdebug-prefix-map=${STAGING_DIR_HOST}=@g" \
+            -e "s@--sysroot=@--sysroot=${STAGING_DIR_HOST}@g" \
+            -e "s@--with-libtool-sysroot=@--with-libtool-sysroot=${STAGING_DIR_HOST}@g" \
+            -e "s@--with-install-prefix=@--with-install-prefix=${D}@g" \
           -i  ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config
     fi
 }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/fix_linux_4.15_compile.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/fix_linux_4.15_compile.patch
new file mode 100644
index 0000000..4597df8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/fix_linux_4.15_compile.patch
@@ -0,0 +1,44 @@
+This fixes a compile issue introduced with linux kernel 4.15
+
+include/linux/in.h:222:8: error: redefinition of 'struct in_pktinfo'
+|  struct in_pktinfo {
+
+
+Upstream-Status: Pending
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: openl2tp-1.8/plugins/ppp_unix.c
+===================================================================
+--- openl2tp-1.8.orig/plugins/ppp_unix.c
++++ openl2tp-1.8/plugins/ppp_unix.c
+@@ -25,9 +25,14 @@
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <signal.h>
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ #include <net/ethernet.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
++#endif
++
+ #include <arpa/inet.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+@@ -41,12 +46,12 @@
+ #define __user
+ #endif
+ #include <sys/ioctl.h>
+-#include <linux/if_ether.h>
+-#include <linux/if_pppox.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_ppp.h>
++#include <linux/if_pppox.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ #include <linux/if_pppol2tp.h>
+-
++#endif
+ #include "usl.h"
+ #include "l2tp_private.h"
+ 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch
new file mode 100644
index 0000000..0bece2f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch
@@ -0,0 +1,24 @@
+commit 3e96a6c41bdd26417265a45ed685138d8eed564e
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date:   Fri Sep 14 02:32:53 2012 -0400
+
+    openl2tp: Enable tests
+    
+    Build the test direcctory as part
+    of the overall build
+    
+    Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 412cf4d..adf4f44 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,7 +16,7 @@ L2TP_FEATURE_LOCAL_CONF_FILE=	y
+ 
+ # Define to include test code. This must be defined to run the
+ # regression tests
+-# L2TP_TEST=		y
++L2TP_TEST=y
+ 
+ # Define to compile in debug code. Also makes default trace flags
+ # enable all messages
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
new file mode 100644
index 0000000..01c9c7b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+TMP_DIR=`mktemp -d /tmp/std.26.tmp.XXXXXX`
+
+# restore the file if exist
+restore_file()
+{
+	filelist="test_procs.tcl tunnel.test session.test"
+	for file in ${filelist}
+	do
+		if [ -f ${TMP_DIR}/${file} ]; then
+			mv ${TMP_DIR}/${file} ${OPENL2TP_DIR}
+		fi
+	done
+}
+
+exit_cus()
+{
+	restore_file
+	echo $1
+	exit $2
+}
+
+if [ -d /usr/lib64/openl2tp/ptest ]; then
+	OPENL2TP_DIR="/usr/lib64/openl2tp"
+elif [ -d /usr/lib/openl2tp/ptest ]; then
+	OPENL2TP_DIR="/usr/lib/openl2tp"
+else
+	exit_cus "The openl2tp ptest directory not installed, skip the test" 1
+fi
+
+#read -p "Please input the network interface you use to test(such as eth0, em1 etc):" ETH_TEST
+echo "Please input the network interface you use to test(such as eth0, em1 etc):"
+read ETH_TEST > /dev/null
+
+if [ x"$ETH_TEST" = x ]; then
+    exit_cus "The network interface cannot be null" 1
+fi
+ifconfig | grep $ETH_TEST > /dev/null || exit_cus "The network interface you provide is invalid" 1
+
+# check openl2tp related kernel config
+zcat /proc/config.gz | grep CONFIG_L2TP=y > /dev/null || exit_cus "Failed to check CONFIG_L2TP=y, skip the tests." 1
+zcat /proc/config.gz | grep CONFIG_PPPOL2TP=m > /dev/null || exit_cus "Failed to check CONFIG_PPPOL2TP=m, skip the tests." 1
+
+SYSV_INIT="/etc/init.d/rpcbind"
+if [ -e ${SYSV_INIT} ]; then
+	${SYSV_INIT} status > /dev/null || ${SYSV_INIT} start > /dev/null
+else
+	systemctl status rpcbind > /dev/null || systemctl start rpcbind > /dev/null
+fi
+
+which systemctl > /dev/null && systemctl status rpcbind > /dev/null || service rpcbind status > /dev/null
+[ $? -ne 0 ] && exit_cus "Failed to start rpcbind service, skip the tests." 1
+
+# backup the below files
+cp ${OPENL2TP_DIR}/ptest/test_procs.tcl $TMP_DIR
+cp ${OPENL2TP_DIR}/ptest/tunnel.test $TMP_DIR
+cp ${OPENL2TP_DIR}/ptest/session.test $TMP_DIR
+
+# customise the config
+if [ x"$ETH_TEST" = x ]; then
+	exit_cus "Please set ETH_TEST which used to test first, skip the tests." 1
+fi
+
+sed -i 's/eth2/'\"$ETH_TEST\"'/g' ${OPENL2TP_DIR}/ptest/test_procs.tcl
+test_ip="`ifconfig $ETH_TEST | grep 'inet ' | sed 's/^.*inet addr://g' | \
+    sed 's/ *Mask.*$//g'|sed 's/ *Bcast.*$//g'`"
+sed -i 's/192.168.0.1/'"$test_ip"'/g' ${OPENL2TP_DIR}/ptest/tunnel.test
+
+# load module l2tp_ppp
+modprobe  l2tp_ppp > /dev/null
+lsmod | grep l2tp_ppp > /dev/null || exit_cus "FAIL: Load module l2tp_ppp" 2
+
+# start openl2tpd
+ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null
+ppp_path=`rpm -ql openl2tp | grep ppp_null.so`
+echo "test it here"
+/usr/sbin/openl2tpd -d all -D -f -p ${ppp_path} &  > /dev/null
+
+# prepare the test env
+rm -rf $OPENL2TP_DIR/results
+mkdir -p $OPENL2TP_DIR/results || exit_cus "FAIL: mkdir $OPENL2TP_DIR/results" 2
+cp /usr/bin/l2tpconfig ${OPENL2TP_DIR} || exit_cus "FAIL: copy /usr/bin/l2tpconfig to ${OPENL2TP_DIR}" 2
+
+# start the test
+cd ${OPENL2TP_DIR}/ptest && tclsh all.tcl -preservecore 3 -verbose bps -tmpdir $OPENL2TP_DIR/results -outfile test-l2tpd.result -constraints "l2tpdRunning peerProfile tunnelProfile sessionProfile pppProfile system" -match "peer_profile-1.1 tunnel_profile-1.1 session_profile-1.1 ppp_profile-1.1 system-1.1"
+
+# check the result
+PASSNUM=`grep PASS $OPENL2TP_DIR/results/test-l2tpd.result | wc -l`
+FAILNUM=`grep FAIL $OPENL2TP_DIR/results/test-l2tpd.result | wc -l`
+if [ $PASSNUM -ne 0 ] && [ $FAILNUM -eq 0 ]; then
+    echo "PASS: openl2tp"
+else
+    echo "FAIL: openl2tp"
+fi
+
+restore_file
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
index bbde8a3..1f6b4de 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
@@ -31,6 +31,9 @@
            file://openl2tpd-initscript-fix-sysconfig.patch \
            file://openl2tpd-initscript-fix-warning.patch \
            file://openl2tpd.service \
+           file://openl2tpd-enable-tests.patch \
+           file://run-ptest \
+           file://fix_linux_4.15_compile.patch \
            "
 
 SRC_URI_append_libc-musl = "\
@@ -41,7 +44,7 @@
 SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
 SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
 
-inherit autotools-brokensep pkgconfig systemd
+inherit autotools-brokensep pkgconfig systemd ptest
 
 SYSTEMD_SERVICE_${PN} = "openl2tpd.service"
 SYSTEMD_AUTO_ENABLE = "disable"
@@ -85,4 +88,12 @@
     fi
 }
 
+do_install_ptest () {
+    for i in all.tcl configfile.test peer_profile.test ppp_profile.test \
+    session_profile.test session.test system.test test_procs.tcl \
+    thirdparty_lns.test tunnel_profile.test tunnel.test; do
+        install -m 0755 ${S}/test/$i ${D}${PTEST_PATH}
+    done
+}
+
 RDEPENDS_${PN} = "ppp ppp-l2tp bash"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.1.bb
deleted file mode 100644
index 4d43d7b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require quagga.inc
-
-SRC_URI[md5sum] = "b1546de89062f7070d56e780b30be4b1"
-SRC_URI[sha256sum] = "aaddba5d4f41ed8e4c2f155f4584c993465d122c9096b5b52ada3fc75266fbcd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb
new file mode 100644
index 0000000..a7697a1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb
@@ -0,0 +1,4 @@
+require quagga.inc
+
+SRC_URI[md5sum] = "eced21b054d71c9e1b7c6ac43286a166"
+SRC_URI[sha256sum] = "e364c082c3309910e1eb7b068bf39ee298e2f2f3f31a6431a5c115193bd653d3"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0001-ppoe-Dont-include-linux-if_ether.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0001-ppoe-Dont-include-linux-if_ether.h.patch
index 11356ce..7601f0d 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0001-ppoe-Dont-include-linux-if_ether.h.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0001-ppoe-Dont-include-linux-if_ether.h.patch
@@ -1,11 +1,12 @@
-From 8d4d452d733bac8c5b55a90bddec8cc323cc9fa8 Mon Sep 17 00:00:00 2001
+From fdb64d21560bfdafeefccc7d20e105e4857faa99 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 28 Mar 2017 19:20:07 -0700
-Subject: [PATCH 1/2] ppoe: Dont include linux/if_ether.h
+Subject: [PATCH] ppoe: Dont include linux/if_ether.h
 
 Fixes build with musl
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/pppoe.h | 4 ----
  1 file changed, 4 deletions(-)
@@ -25,6 +26,3 @@
  #include <netinet/in.h>
  
  #ifdef HAVE_NETINET_IF_ETHER_H
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0002-Enable-support-for-the-kernel-module.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0002-Enable-support-for-the-kernel-module.patch
index 139d1f0..2103b38 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0002-Enable-support-for-the-kernel-module.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/0002-Enable-support-for-the-kernel-module.patch
@@ -1,9 +1,10 @@
-From aca8473a516a8dc013866105da141fe1cd947474 Mon Sep 17 00:00:00 2001
+From 31b6eecd7e5ebfb9a37915f28823e5af9d1062b4 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 28 Mar 2017 19:24:53 -0700
-Subject: [PATCH 2/2] Enable support for the kernel module
+Subject: [PATCH] Enable support for the kernel module
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/configure.in | 1 +
  1 file changed, 1 insertion(+)
@@ -20,6 +21,3 @@
  ])
  
  dnl Checks for typedefs, structures, and compiler characteristics.
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch
index 2661fd3..bbd516f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.in-Error-fix.patch
@@ -1,4 +1,4 @@
-From 71956de46feef962dc0645af4c81ae074ca3b818 Mon Sep 17 00:00:00 2001
+From bdd20b7a584a20504dfabb409a41ee2b9ae41657 Mon Sep 17 00:00:00 2001
 From: Lei Maohui <leimaohui@cn.fujitsu.com>
 Date: Wed, 19 Aug 2015 13:52:57 +0900
 Subject: [PATCH] configure.in: Error fix.
@@ -9,15 +9,16 @@
 Upstream-Status: pending
 
 Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+
 ---
  src/configure.in | 30 ------------------------------
  1 file changed, 30 deletions(-)
 
 diff --git a/src/configure.in b/src/configure.in
-index 0b23df5..31c7fbc 100644
+index 1714e69..cae0976 100644
 --- a/src/configure.in
 +++ b/src/configure.in
-@@ -193,36 +193,6 @@ if test "$GCC" = yes; then
+@@ -195,36 +195,6 @@ if test "$GCC" = yes; then
  	CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes"
  fi
  
@@ -54,6 +55,3 @@
  if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
  	AC_MSG_RESULT(reversed)
  	AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields])
--- 
-1.8.4.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch
index 1380ba4..be89280 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure.patch
@@ -1,7 +1,15 @@
-Index: rp-pppoe-3.8/configure.in
-===================================================================
---- rp-pppoe-3.8.orig/configure.in	2014-07-16 19:31:33.549991388 +0000
-+++ rp-pppoe-3.8/configure.in	2014-07-17 22:01:18.116590827 +0000
+From c96dda04ec024bdef2a15d374e5f8242e041cad4 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Fri, 18 Jul 2014 08:25:16 +0000
+
+---
+ configure.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ac1a7e4..11b9f31 100644
+--- a/configure.in
++++ b/configure.in
 @@ -1,4 +1,4 @@
 -AC_INIT(src/pppoe.c)
 -AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch
index 88cf7e6..3b94593 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/configure_in_cross.patch
@@ -1,4 +1,4 @@
-From cab02076afb808a43c6ff3d7b1c64e71f5a1b397 Mon Sep 17 00:00:00 2001
+From 172907f31d64da4c3f289a439fd605d2ab51b24a Mon Sep 17 00:00:00 2001
 From: Lei Maohui <leimaohui@cn.fujitsu.com>
 Date: Wed, 19 Aug 2015 12:17:03 +0900
 Subject: [PATCH] configure in cross
@@ -14,7 +14,7 @@
  1 file changed, 16 insertions(+), 50 deletions(-)
 
 diff --git a/src/configure.in b/src/configure.in
-index e194295..82d64d6 100644
+index 90a07df..1d30243 100644
 --- a/src/configure.in
 +++ b/src/configure.in
 @@ -5,6 +5,13 @@ AC_INIT(pppoe.c)
@@ -40,7 +40,7 @@
  fi
  
  dnl Check for N_HDLC line discipline
-@@ -56,7 +63,7 @@ AC_TRY_COMPILE([#include <linux/termios.h>],
+@@ -58,7 +65,7 @@ AC_TRY_COMPILE([
  	ac_cv_n_hdlc=no)
  AC_MSG_RESULT($ac_cv_n_hdlc)
  if test "$ac_cv_n_hdlc" = yes ; then
@@ -49,7 +49,7 @@
  fi
  
  AC_ARG_ENABLE(plugin, [  --enable-plugin=pppd_src_path   build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
-@@ -104,7 +111,7 @@ PPPD_INCDIR=""
+@@ -106,7 +113,7 @@ PPPD_INCDIR=""
  if test "$ac_cv_header_linux_if_pppox_h" = yes ; then
  	if test "$ac_cv_pluginpath" != no ; then
  		LINUX_KERNELMODE_PLUGIN=rp-pppoe.so
@@ -58,7 +58,7 @@
  		PPPD_INCDIR=$ac_cv_pluginpath
  	fi
  fi
-@@ -114,7 +121,7 @@ if test "$PPPD_INCDIR" = "" ; then
+@@ -116,7 +123,7 @@ if test "$PPPD_INCDIR" = "" ; then
  fi
  
  if test "$ac_cv_debugging" = "yes" ; then
@@ -67,7 +67,7 @@
  fi
  
  AC_SUBST(LINUX_KERNELMODE_PLUGIN)
-@@ -140,15 +147,8 @@ AC_CHECK_SIZEOF(unsigned short)
+@@ -142,15 +149,8 @@ AC_CHECK_SIZEOF(unsigned short)
  AC_CHECK_SIZEOF(unsigned int)
  AC_CHECK_SIZEOF(unsigned long)
  
@@ -84,7 +84,7 @@
  
  dnl Check for Linux-specific kernel support for PPPoE
  AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
-@@ -193,44 +193,8 @@ if test "$GCC" = yes; then
+@@ -195,44 +195,8 @@ if test "$GCC" = yes; then
  	CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes"
  fi
  
@@ -130,7 +130,7 @@
  if test "${rpppoe_cv_pack_bitfields+set}" != set ; then
  AC_TRY_RUN([
  union foo {
-@@ -257,10 +221,11 @@ main(void)
+@@ -259,10 +223,11 @@ main(void)
  }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
  $ECHO "no defaults for cross-compiling"; exit 0)
  fi
@@ -143,7 +143,7 @@
  else
  	AC_MSG_RESULT(normal)
  fi
-@@ -324,6 +289,7 @@ AC_SUBST(PPPOE_SERVER_DEPS)
+@@ -326,6 +291,7 @@ AC_SUBST(PPPOE_SERVER_DEPS)
  AC_SUBST(RDYNAMIC)
  AC_SUBST(LIBEVENT)
  AC_SUBST(ECHO)
@@ -151,6 +151,3 @@
  AC_SUBST(LDFLAGS)
  
  datadir_evaluated=`eval echo $datadir`
--- 
-1.8.4.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch
index 8b78864..9801f6e 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/discard-use-of-dnl-in-Makefile.am.patch
@@ -1,4 +1,4 @@
-From 611c9fe719c5aa264a2ad2eb920cf4522ae2ddec Mon Sep 17 00:00:00 2001
+From f658181c58347c3e2b0ee4f0a6a3d19162921471 Mon Sep 17 00:00:00 2001
 From: Ting Liu <b28495@freescale.com>
 Date: Tue, 12 Jun 2012 14:26:16 -0400
 Subject: [PATCH] discard use of dnl in Makefile.am
@@ -7,9 +7,10 @@
 not introduce a comment.
 
 Signed-off-by: Ting Liu <b28495@freescale.com>
+
 ---
- Makefile.am |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile.am b/Makefile.am
 index eff6977..3091c33 100644
@@ -22,6 +23,3 @@
 -dnl AM_CFLAGS = -Wall -DDEBUG
 +##dnl AM_CFLAGS = -Wall -DDEBUG
  SUBDIRS = src
--- 
-1.7.6.5
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch
index f61337f..8a85788 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/dont-swallow-errors.patch
@@ -1,4 +1,4 @@
-From bbdadb803b19f002e76e7bb5ce3faf770dd7c413 Mon Sep 17 00:00:00 2001
+From a9a7322273c51882af58c35ba288a0fae00ba841 Mon Sep 17 00:00:00 2001
 From: Lei Maohui <leimaohui@cn.fujitsu.com>
 Date: Wed, 19 Aug 2015 12:33:41 +0900
 Subject: [PATCH] don't swallow errors
@@ -6,15 +6,16 @@
 Further fixup to the configure scripts to not swallow errors
 
 Upstream-Status: Pending
+
 ---
  src/configure.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/configure.in b/src/configure.in
-index 82d64d6..0b23df5 100644
+index 1d30243..1714e69 100644
 --- a/src/configure.in
 +++ b/src/configure.in
-@@ -219,7 +219,7 @@ main(void)
+@@ -221,7 +221,7 @@ main(void)
  	return 2;
      }
  }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
@@ -23,6 +24,3 @@
  fi
  ])
  
--- 
-1.8.4.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch
index bcf4d11..03697ff 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/pppoe-src-restrictions.patch
@@ -1,3 +1,8 @@
+From a6a85ec5c85cbd3c86743b6e2fa391198869bff8 Mon Sep 17 00:00:00 2001
+From: Tom Rini <tom_rini@mentor.com>
+Date: Wed, 27 Jul 2011 03:46:52 +0000
+Subject: [PATCH] rp-pppoe: Port from oe.dev
+
 Relax restrictions on the PPPoE src address, as per debian bug
 293811:
 
@@ -5,9 +10,15 @@
 
 Upstream-Status: Inappropriate [Backport from Debian]
 
---- rp-pppoe-3.8.orig/src/discovery.c
-+++ rp-pppoe-3.8/src/discovery.c
-@@ -376,8 +376,8 @@
+---
+ src/discovery.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/discovery.c b/src/discovery.c
+index 7ee259d..5213a37 100644
+--- a/src/discovery.c
++++ b/src/discovery.c
+@@ -472,8 +472,8 @@ waitForPADO(PPPoEConnection *conn, int timeout)
  	if (!packetIsForMe(conn, &packet)) continue;
  
  	if (packet.code == CODE_PADO) {
@@ -17,4 +28,4 @@
 +		printErr("Ignoring broadcast PADO packet");
  		continue;
  	    }
- 	    parsePacket(&packet, parsePADOTags, &pc);
+ #ifdef PLUGIN
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch
index 4fe73d0..f64da4f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/top-autoconf.patch
@@ -1,3 +1,8 @@
+From 0b62f71eb5d44d4a57103566ba58022b6304fa4f Mon Sep 17 00:00:00 2001
+From: Tom Rini <tom_rini@mentor.com>
+Date: Wed, 27 Jul 2011 03:46:52 +0000
+Subject: [PATCH] rp-pppoe: Port from oe.dev
+
 The autoconf stuff is all in a subdirectory, which is rather annoying
 as OE expects patches to be applied and autoconf stuff to be done in
 S. This adds enough autoconf at the top level to allow it to be
@@ -6,20 +11,29 @@
 
 Upstream-Status: Inappropriate [build system specific change]
 
-Index: rp-pppoe-3.8/Makefile.am
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ rp-pppoe-3.8/Makefile.am	2007-06-08 15:58:16.000000000 +1000
+---
+ Makefile.am  | 5 +++++
+ configure.in | 4 ++++
+ 2 files changed, 9 insertions(+)
+ create mode 100644 Makefile.am
+ create mode 100644 configure.in
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..eff6977
+--- /dev/null
++++ b/Makefile.am
 @@ -0,0 +1,5 @@
 +PACKAGE = rp-pppoe
 +VERSION = 3.8
 +
 +dnl AM_CFLAGS = -Wall -DDEBUG
 +SUBDIRS = src
-Index: rp-pppoe-3.8/configure.in
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ rp-pppoe-3.8/configure.in	2007-06-08 15:58:16.000000000 +1000
+diff --git a/configure.in b/configure.in
+new file mode 100644
+index 0000000..ac1a7e4
+--- /dev/null
++++ b/configure.in
 @@ -0,0 +1,4 @@
 +AC_INIT(src/pppoe.c)
 +AM_INIT_AUTOMAKE([rp-pppoe], [3.8])
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch
index 42a3bc6..c759e09 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.12/update-config.patch
@@ -1,3 +1,8 @@
+From 4d34e0d7d790ec41b0afb731c7dc1b1ee90dd377 Mon Sep 17 00:00:00 2001
+From: Tom Rini <tom_rini@mentor.com>
+Date: Wed, 27 Jul 2011 03:46:52 +0000
+Subject: [PATCH] rp-pppoe: Port from oe.dev
+
 Set the timeout to 0 since we don't want pppoe to try reconnecting,
 we want whatever is calling it to reconnect. Lots of odd things
 happen when you have pppoe retrying itself.
@@ -8,11 +13,15 @@
 
 Upstream-Status: Inappropriate [configuration]
 
-Index: rp-pppoe-3.8/configs/pppoe.conf
-===================================================================
---- rp-pppoe-3.8.orig/configs/pppoe.conf	2006-04-03 00:29:41.000000000 +1000
-+++ rp-pppoe-3.8/configs/pppoe.conf	2007-06-08 16:02:47.000000000 +1000
-@@ -66,7 +66,7 @@
+---
+ configs/pppoe.conf | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configs/pppoe.conf b/configs/pppoe.conf
+index c222b2f..65618a5 100644
+--- a/configs/pppoe.conf
++++ b/configs/pppoe.conf
+@@ -66,7 +66,7 @@ DEFAULTROUTE=yes
  # to connect forever after pppoe-start is called.  Otherwise, it will
  # give out after CONNECT_TIMEOUT seconds and will not attempt to
  # connect again, making it impossible to reach.
@@ -21,7 +30,7 @@
  
  # How often in seconds pppoe-start polls to check if link is up
  CONNECT_POLL=2
-@@ -115,7 +115,7 @@
+@@ -115,7 +115,7 @@ PPPOE_TIMEOUT=80
  FIREWALL=NONE
  
  # Linux kernel-mode plugin for pppd.  If you want to try the kernel-mode
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
deleted file mode 100644
index 0fb18d5..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Tools for ethernet bridging"
-HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
-SECTION = "net"
-LICENSE = "GPLv2"
-
-DEPENDS = "sysfsutils"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz \
-          file://bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch \
-          file://bridge-utils-1.5-fix-error-message-for-incorrect-command.patch \
-          file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \
-"
-
-inherit autotools-brokensep update-alternatives
-
-ALTERNATIVE_${PN} = "brctl"
-ALTERNATIVE_PRIORITY[brctl] = "100"
-ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl"
-
-EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"
-
-do_install_append () {
-    install -d ${D}/${datadir}/bridge-utils
-    install -d ${D}/${sysconfdir}/network/if-pre-up.d
-    install -d ${D}/${sysconfdir}/network/if-post-down.d
-}
-
-RRECOMMENDS_${PN} = "kernel-module-bridge"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch
deleted file mode 100644
index c6897b4..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 5e102b453e254d16af1f95053134f58348e0f83a Mon Sep 17 00:00:00 2001
-From: root <git@andred.net>
-Date: Wed, 20 Jul 2016 23:40:30 +0100
-Subject: [PATCH 1/5] build: error out correctly if a submake fails
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Due to use of a for loop, return status from submake was always
-ignored.
-
-In the context of build-systems like OE this causes them to not
-detect any errors and continue happily, resulting in a successful,
-but incomplete, build.
-
-Fix by having a nicer Makefile.in which now has rules for the
-individual targets (directories) so that make itself can
-figure out all the dependencies and build those targets as
-needed rather than using a for loop to iterate over the
-directories in a shell and thus loosing the return status of
-the command inside the loop.
-
-This has the added advantage that parallel builds work now.
-
-Upstream-Status: Pending
-
-Signed-off-by: André Draszik <git@andred.net>
----
- Makefile.in | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 6028513..dab88bb 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -13,11 +13,11 @@ distdir = $(PACKAGE)-$(VERSION)
- 
- SUBDIRS=libbridge brctl doc
- 
--all:
--	for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x ; done
-+all: override ACTION=
-+all: $(SUBDIRS)
- 
--clean:
--	for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x clean ; done
-+clean: override ACTION=clean
-+clean: $(SUBDIRS)
- 
- distclean:	clean
- 	rm -f config.log
-@@ -30,6 +30,12 @@ maintainer-clean: distclean
- 	rm -f libbridge/Makefile
- 	rm -f doc/Makefile
- 
--install:
--	for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x install; done
-+install: override ACTION=install
-+install: $(SUBDIRS)
- 
-+
-+brctl: libbridge
-+$(SUBDIRS):
-+	$(MAKE) $(MFLAGS) -C $@ $(ACTION)
-+
-+.PHONY: $(SUBDIRS)
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch
deleted file mode 100644
index 25d08ab..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 68fafc4ea10365ac2e74ab7c660d097696857677 Mon Sep 17 00:00:00 2001
-From: root <git@andred.net>
-Date: Wed, 20 Jul 2016 23:40:32 +0100
-Subject: [PATCH 2/5] libbridge: fix some build-time warnings (fcntl.h)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-There are build-time warnings at the moment when building
-against musl, as the code here #include's the wrong file,
-sys/fcntl.h instead of fcntl.h
-
-In file included from libbridge_devif.c:26:0:
-<sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
- #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-  ^~~~~~~
-In file included from libbridge_if.c:23:0:
-<sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
- #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-  ^~~~~~~
-
-glibc headers silently redirect sys/fcntl.h to fcntl.h so the
-issue is not seen there.
-
-Let's fix the #include's to so as to use the correct ones
-and silence the compiler.
-
-Upstream-Status: Pending
-
-Signed-off-by: André Draszik <git@andred.net>
----
- libbridge/libbridge_devif.c | 2 +-
- libbridge/libbridge_if.c    | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
-index 1e83925..2cf78f6 100644
---- a/libbridge/libbridge_devif.c
-+++ b/libbridge/libbridge_devif.c
-@@ -23,7 +23,7 @@
- #include <errno.h>
- #include <string.h>
- #include <dirent.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- 
- #include "libbridge.h"
- #include "libbridge_private.h"
-diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c
-index 77d3f8a..9cf4bac 100644
---- a/libbridge/libbridge_if.c
-+++ b/libbridge/libbridge_if.c
-@@ -20,7 +20,7 @@
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/ioctl.h>
- 
- #include "libbridge.h"
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch
deleted file mode 100644
index 72f2a62..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 2b9dc245f93ab27d7da42a16ddbb9212888006e4 Mon Sep 17 00:00:00 2001
-From: root <git@andred.net>
-Date: Wed, 20 Jul 2016 23:40:33 +0100
-Subject: [PATCH 3/5] bridge: fix some build-time warnings (errno.h)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-There is a build-time warning at the moment when building
-against musl, as the code here #include's the wrong file,
-sys/errno.h instead of errno.h
-
-In file included from brctl.c:22:0:
-<sysroot>/usr/include/sys/errno.h:1:2: warning: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Wcpp]
- #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
-  ^~~~~~~
-
-glibc headers silently redirect sys/errno.h to errno.h so the
-issue is not seen there.
-
-Let's fix the #include's to so as to use the correct ones
-and silence the compiler.
-
-Upstream-Status: Pending
-
-Signed-off-by: André Draszik <git@andred.net>
----
- brctl/brctl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/brctl/brctl.c b/brctl/brctl.c
-index 46ca352..8855234 100644
---- a/brctl/brctl.c
-+++ b/brctl/brctl.c
-@@ -19,7 +19,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/errno.h>
-+#include <errno.h>
- #include <getopt.h>
- 
- #include "libbridge.h"
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch
deleted file mode 100644
index 565186e..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From c45b73829a8b8c7924df528baa7e16498f917288 Mon Sep 17 00:00:00 2001
-From: root <git@andred.net>
-Date: Wed, 20 Jul 2016 23:40:33 +0100
-Subject: [PATCH 4/5] libbridge: add missing #include's (fix build against
- musl)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes error like:
-
-In file included from libbridge_devif.c:28:0:
-libbridge.h:45:17: error: field 'max_age' has incomplete type
-  struct timeval max_age;
-                 ^~~~~~~
-In file included from libbridge_devif.c:28:0:
-libbridge.h:51:2: error: unknown type name 'u_int16_t'
-  u_int16_t root_port;
-  ^~~~~~~~~
-
-These types are not standard C but rather Posix,
-for struct timeval see:
-http://pubs.opengroup.org/onlinepubs/7908799/xsh/systime.h.html
-
-Upstream-Status: Pending
-
-Signed-off-by: André Draszik <git@andred.net>
----
- libbridge/libbridge.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
-index 53ec869..b0727c1 100644
---- a/libbridge/libbridge.h
-+++ b/libbridge/libbridge.h
-@@ -20,6 +20,8 @@
- #define _LIBBRIDGE_H
- 
- #include <sys/socket.h>
-+#include <sys/time.h>
-+#include <sys/types.h>
- #include <linux/in6.h>
- #include <linux/if.h>
- #include <linux/if_bridge.h>
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
index 9f2155e..0a72c6b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
@@ -1,7 +1,7 @@
-From 7bc1932cabfafca8c68e18bd43e3d203c70d2dd8 Mon Sep 17 00:00:00 2001
-From: root <git@andred.net>
-Date: Wed, 20 Jul 2016 23:40:33 +0100
-Subject: [PATCH 5/5] build: don't ignore CFLAGS from environment
+From 9d63838d12c772dfe33371e2bb8b8191625539f2 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:37:48 -0400
+Subject: [PATCH] build: don't ignore CFLAGS from environment
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -17,10 +17,10 @@
 Upstream-Status: Pending
 
 Signed-off-by: André Draszik <git@andred.net>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
 ---
- brctl/Makefile.in     | 2 +-
- libbridge/Makefile.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ brctl/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/brctl/Makefile.in b/brctl/Makefile.in
 index e1956d6..eff260c 100644
@@ -35,19 +35,6 @@
  
  %.o: %.c brctl.h
  	$(CC) $(CFLAGS) $(INCLUDE) -c $< 
-diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in
-index 20512c4..4e1cddc 100644
---- a/libbridge/Makefile.in
-+++ b/libbridge/Makefile.in
-@@ -5,7 +5,7 @@ AR=ar
- RANLIB=@RANLIB@
- 
- CC=@CC@
--CFLAGS = -Wall -g $(KERNEL_HEADERS)
-+CFLAGS = -Wall -g $(KERNEL_HEADERS) @CFLAGS@
- 
- prefix=@prefix@
- exec_prefix=@exec_prefix@
 -- 
-2.8.1
+2.7.4
 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch
new file mode 100644
index 0000000..3f65761
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch
@@ -0,0 +1,51 @@
+From c924f66743c054d7ebafef90ca1bbebc96732357 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:48:33 -0400
+Subject: [PATCH] libbridge: Modifying the AR to cross toolchain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Makefile uses the host “ar” tool when it should be using the ar from
+the target toolchain.
+
+Upstream-Status: Pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ configure.ac          | 1 +
+ libbridge/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8b2e2ea..8426b7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,6 +12,10 @@ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
+ 
+ dnl Checks for header files.
+ AC_HEADER_STDC
+diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in
+index 7932bfe..bd55e9b 100644
+--- a/libbridge/Makefile.in
++++ b/libbridge/Makefile.in
+@@ -1,7 +1,7 @@
+ 
+ KERNEL_HEADERS=-I@KERNEL_HEADERS@
+ 
+-AR=ar
++AR=@AR@
+ RANLIB=@RANLIB@
+ 
+ CC=@CC@
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch
deleted file mode 100644
index d00af9c..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08]
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-
-From bb9970a9df95837e39d680021b1f73d231e85406 Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <shemminger@vyatta.com>
-Date: Tue, 3 May 2011 09:52:43 -0700
-Subject: [PATCH 3/3] Check error returns from write to sysfs
-
-Add helper function to check write to sysfs files.
-
-Signed-off-by: Petr Sabata <contyk@redhat.com>
----
- libbridge/libbridge_devif.c |   37 +++++++++++++++++++++++--------------
- 1 files changed, 23 insertions(+), 14 deletions(-)
-
-diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
-index aa8bc36..1e83925 100644
---- a/libbridge/libbridge_devif.c
-+++ b/libbridge/libbridge_devif.c
-@@ -280,25 +280,38 @@ fallback:
- 	return old_get_port_info(brname, port, info);
- }
- 
-+static int set_sysfs(const char *path, unsigned long value)
-+{
-+	int fd, ret = 0, cc;
-+	char buf[32];
-+
-+	fd = open(path, O_WRONLY);
-+	if (fd < 0)
-+		return -1;
-+
-+	cc = snprintf(buf, sizeof(buf), "%lu\n", value);
-+	if (write(fd, buf, cc) < 0)
-+		ret = -1;
-+	close(fd);
-+
-+	return ret;
-+}
-+
- 
- static int br_set(const char *bridge, const char *name,
- 		  unsigned long value, unsigned long oldcode)
- {
- 	int ret;
- 	char path[SYSFS_PATH_MAX];
--	FILE *f;
- 
--	snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name);
-+	snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s",
-+		 bridge, name);
- 
--	f = fopen(path, "w");
--	if (f) {
--		ret = fprintf(f, "%ld\n", value);
--		fclose(f);
--	} else {
-+	if ((ret = set_sysfs(path, value)) < 0) {
- 		/* fallback to old ioctl */
- 		struct ifreq ifr;
- 		unsigned long args[4] = { oldcode, value, 0, 0 };
--		
-+
- 		strncpy(ifr.ifr_name, bridge, IFNAMSIZ);
- 		ifr.ifr_data = (char *) &args;
- 		ret = ioctl(br_socket_fd, SIOCDEVPRIVATE, &ifr);
-@@ -348,14 +361,10 @@ static int port_set(const char *bridge, const char *ifname,
- {
- 	int ret;
- 	char path[SYSFS_PATH_MAX];
--	FILE *f;
- 
- 	snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brport/%s", ifname, name);
--	f = fopen(path, "w");
--	if (f) {
--		ret = fprintf(f, "%ld\n", value);
--		fclose(f);
--	} else {
-+
-+	if ((ret = set_sysfs(path, value)) < 0) {
- 		int index = get_portno(bridge, ifname);
- 
- 		if (index < 0)
--- 
-1.7.5.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch
deleted file mode 100644
index 2d0494e..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08]
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-
-From c7ed0996ef58b497d3d30be802ab5ae6c37099b5 Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <shemminger@vyatta.com>
-Date: Tue, 3 May 2011 09:49:57 -0700
-Subject: [PATCH 2/3] Fix error message for incorrect command
-
-Debian bug 406907
-Error message was refering to incorrect command argument.
-
-Signed-off-by: Petr Sabata <contyk@redhat.com>
----
- brctl/brctl.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/brctl/brctl.c b/brctl/brctl.c
-index 454b8dd..46ca352 100644
---- a/brctl/brctl.c
-+++ b/brctl/brctl.c
-@@ -69,7 +69,7 @@ int main(int argc, char *const* argv)
- 	argc -= optind;
- 	argv += optind;
- 	if ((cmd = command_lookup(*argv)) == NULL) {
--		fprintf(stderr, "never heard of command [%s]\n", argv[1]);
-+		fprintf(stderr, "never heard of command [%s]\n", *argv);
- 		goto help;
- 	}
- 	
--- 
-1.7.5.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch
deleted file mode 100644
index 6f6d6d4..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-incorrect-command-in-manual.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08]
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-
-From 8ef7b77562b636efcbd8b759eb324d6c069200f2 Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <shemminger@vyatta.com>
-Date: Tue, 3 May 2011 09:48:40 -0700
-Subject: [PATCH 1/3] Fix incorrect command in manual
-
-Command is "setageing" not "setageingtime"; fix man page.
-Debian bug report.
-
-Signed-off-by: Petr Sabata <contyk@redhat.com>
----
- doc/brctl.8 |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/doc/brctl.8 b/doc/brctl.8
-index d904047..771f323 100644
---- a/doc/brctl.8
-+++ b/doc/brctl.8
-@@ -89,7 +89,7 @@ data. Machines can move to other ports, network cards can be replaced
- .B brctl showmacs <brname>
- shows a list of learned MAC addresses for this bridge.
- 
--.B brctl setageingtime <brname> <time>
-+.B brctl setageing <brname> <time>
- sets the ethernet (MAC) address ageing time, in seconds. After <time>
- seconds of not having seen a frame coming from a certain address, the
- bridge will time out (delete) that address from the Forwarding
--- 
-1.7.5.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
index de36f05..8a23a30 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch
@@ -1,22 +1,33 @@
-include missing kernel header
+From 824f838cc9c7b8a44174358446993d61be7bbb3f Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 30 Oct 2017 13:18:20 -0400
+Subject: [PATCH] include missing kernel header
 
 Fixes errors like
 
 | /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type
 | In file included from ../libbridge/libbridge.h:24:0,
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
 
-Index: bridge-utils-1.5/libbridge/libbridge.h
-===================================================================
---- bridge-utils-1.5.orig/libbridge/libbridge.h	2011-03-28 17:52:54.000000000 -0700
-+++ bridge-utils-1.5/libbridge/libbridge.h	2013-03-04 21:16:25.781188309 -0800
-@@ -20,6 +20,7 @@
- #define _LIBBRIDGE_H
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+---
+ libbridge/libbridge.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
+index c038b92..fd09306 100644
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -24,6 +24,7 @@
+ #include <sys/time.h>
+ #include <netinet/in.h>
  
- #include <sys/socket.h>
 +#include <linux/in6.h>
  #include <linux/if.h>
  #include <linux/if_bridge.h>
  
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb
deleted file mode 100644
index 6032ab0..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require bridge-utils.inc
-
-SRC_URI += "\
-    file://kernel-headers.patch \
-    file://0001-build-error-out-correctly-if-a-submake-fails.patch \
-    file://0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch \
-    file://0003-bridge-fix-some-build-time-warnings-errno.h.patch \
-    file://0004-libbridge-add-missing-include-s-fix-build-against-mu.patch \
-    file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \
-"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
-
-SRC_URI[md5sum] = "ec7b381160b340648dede58c31bb2238"
-SRC_URI[sha256sum] = "42f9e5fb8f6c52e63a98a43b81bd281c227c529f194913e1c51ec48a393b6688"
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
new file mode 100644
index 0000000..1c87c48
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Tools for ethernet bridging"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
+SECTION = "net"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
+
+SRCREV = "42c1aefc303fdf891fbb099ea51f00dca83ab606"
+
+SRC_URI = "\
+    git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git \
+    file://kernel-headers.patch \
+    file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \
+    file://0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch \
+"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "sysfsutils"
+
+inherit autotools-brokensep update-alternatives
+
+ALTERNATIVE_${PN} = "brctl"
+ALTERNATIVE_PRIORITY[brctl] = "100"
+ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl"
+
+EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"
+
+do_install_append () {
+    install -d ${D}/${datadir}/bridge-utils
+    install -d ${D}/${sysconfdir}/network/if-pre-up.d
+    install -d ${D}/${sysconfdir}/network/if-post-down.d
+}
+
+RRECOMMENDS_${PN} = "kernel-module-bridge"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch
index d1586bb..92a2dbd 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony/arm_eabi.patch
@@ -1,48 +1,54 @@
     chrony: fix build failure for arma9
-    
+
     Eliminate references to syscalls not available
     for ARM_EABI.  Also add a dependency on libseccomp
     which is needed for scfilter to work.
-    
+
     Set PACKAGECONFIG to not enable scfilter, since
     kernel CONFIG_SECCOMP is unlikely to be set.  This
     aligns the usage of libseccomp with that of other packages.
 
     Upstream-Status: Pending
-    
+
     Signed-off-by: Joe Slater <jslater@windriver.com>
 
+    Refresh patch for new upstream version.
+
+    Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
+
 --- a/sys_linux.c
 +++ b/sys_linux.c
-@@ -453,13 +453,12 @@ SYS_Linux_EnableSystemCallFilter(int lev
+@@ -465,14 +465,14 @@ SYS_Linux_EnableSystemCallFilter(int lev
    const int syscalls[] = {
      /* Clock */
-     SCMP_SYS(adjtimex), SCMP_SYS(gettimeofday), SCMP_SYS(settimeofday),
--    SCMP_SYS(time),
+     SCMP_SYS(adjtimex), SCMP_SYS(clock_gettime), SCMP_SYS(gettimeofday),
+-    SCMP_SYS(settimeofday), SCMP_SYS(time),
++    SCMP_SYS(settimeofday),
      /* Process */
--    SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group), SCMP_SYS(getrlimit),
-+    SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group),
-     SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn), SCMP_SYS(rt_sigprocmask),
-     SCMP_SYS(set_tid_address), SCMP_SYS(sigreturn), SCMP_SYS(wait4),
+     SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group), SCMP_SYS(getpid),
+-    SCMP_SYS(getrlimit), SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn),
++    SCMP_SYS(rt_sigaction), SCMP_SYS(rt_sigreturn),
+     SCMP_SYS(rt_sigprocmask), SCMP_SYS(set_tid_address), SCMP_SYS(sigreturn),
+     SCMP_SYS(wait4),
      /* Memory */
 -    SCMP_SYS(brk), SCMP_SYS(madvise), SCMP_SYS(mmap), SCMP_SYS(mmap2),
 +    SCMP_SYS(brk), SCMP_SYS(madvise), SCMP_SYS(mmap2),
      SCMP_SYS(mprotect), SCMP_SYS(mremap), SCMP_SYS(munmap), SCMP_SYS(shmdt),
      /* Filesystem */
      SCMP_SYS(access), SCMP_SYS(chmod), SCMP_SYS(chown), SCMP_SYS(chown32),
-@@ -470,14 +469,21 @@ SYS_Linux_EnableSystemCallFilter(int lev
+@@ -483,14 +483,21 @@
      SCMP_SYS(bind), SCMP_SYS(connect), SCMP_SYS(getsockname),
-     SCMP_SYS(recvfrom), SCMP_SYS(recvmsg), SCMP_SYS(sendmmsg),
-     SCMP_SYS(sendmsg), SCMP_SYS(sendto),
+     SCMP_SYS(recvfrom), SCMP_SYS(recvmmsg), SCMP_SYS(recvmsg),
+     SCMP_SYS(sendmmsg), SCMP_SYS(sendmsg), SCMP_SYS(sendto),
 -    /* TODO: check socketcall arguments */
 -    SCMP_SYS(socketcall),
      /* General I/O */
-     SCMP_SYS(_newselect), SCMP_SYS(close), SCMP_SYS(open), SCMP_SYS(pipe),
+     SCMP_SYS(_newselect), SCMP_SYS(close), SCMP_SYS(open), SCMP_SYS(openat), SCMP_SYS(pipe),
 -    SCMP_SYS(poll), SCMP_SYS(read), SCMP_SYS(futex), SCMP_SYS(select),
 +    SCMP_SYS(poll), SCMP_SYS(read), SCMP_SYS(futex),
      SCMP_SYS(set_robust_list), SCMP_SYS(write),
      /* Miscellaneous */
-     SCMP_SYS(uname),
+     SCMP_SYS(getrandom), SCMP_SYS(sysinfo), SCMP_SYS(uname),
 +    /* not always available */
 +#if ! defined(__ARM_EABI__)
 +    SCMP_SYS(time),
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony_2.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony_2.4.bb
deleted file mode 100644
index 71431f4..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony_2.4.bb
+++ /dev/null
@@ -1,134 +0,0 @@
-SUMMARY = "Versatile implementation of the Network Time Protocol"
-DESCRIPTION = "Chrony can synchronize the system clock with NTP \
-servers, reference clocks (e.g. GPS receiver), and manual input using \
-wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) \
-server and peer to provide a time service to other computers in the \
-network. \
-\
-It is designed to perform well in a wide range of conditions, \
-including intermittent network connections, heavily congested \
-networks, changing temperatures (ordinary computer clocks are \
-sensitive to temperature), and systems that do not run continuously, or \
-run on a virtual machine. \
-\
-Typical accuracy between two machines on a LAN is in tens, or a few \
-hundreds, of microseconds; over the Internet, accuracy is typically \
-within a few milliseconds. With a good hardware reference clock \
-sub-microsecond accuracy is possible. \
-\
-Two programs are included in chrony: chronyd is a daemon that can be \
-started at boot time and chronyc is a command-line interface program \
-which can be used to monitor chronyd's performance and to change \
-various operating parameters whilst it is running. \
-\
-This recipe produces two binary packages: 'chrony' which contains chronyd, \
-the configuration file and the init script, and 'chronyc' which contains \
-the client program only."
-
-HOMEPAGE = "http://chrony.tuxfamily.org/"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "https://download.tuxfamily.org/chrony/chrony-${PV}.tar.gz \
-    file://chrony.conf \
-    file://chronyd \
-    file://arm_eabi.patch \
-"
-SRC_URI[md5sum] = "d0598aa8a9be8faccef9386f6fc0d5f2"
-SRC_URI[sha256sum] = "8d04e7cda2333289c2104b731d39c3c1db94816e43bae35d7ee4e7ae8af6391f"
-
-DEPENDS = "pps-tools"
-
-# Note: Despite being built via './configure; make; make install',
-#       chrony does not use GNU Autotools.
-inherit update-rc.d systemd
-
-# Configuration options:
-# - For command line editing support in chronyc, you may specify either
-#   'editline' or 'readline' but not both.  editline is smaller, but
-#   many systems already have readline for other purposes so you might want
-#   to choose that instead.  However, beware license incompatibility
-#   since chrony is GPLv2 and readline versions after 6.0 are GPLv3+.
-#   You can of course choose neither, but if you're that tight on space
-#   consider dropping chronyc entirely (you can use it remotely with
-#   appropriate chrony.conf options).
-# - Security-related:
-#   - 'sechash' is omitted by default because it pulls in nss which is huge.
-#   - 'privdrop' allows chronyd to run as non-root; would need changes to
-#     chrony.conf and init script.
-#   - 'scfilter' enables support for system call filtering, but requires the
-#     kernel to have CONFIG_SECCOMP enabled.
-PACKAGECONFIG ??= "editline \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-"
-PACKAGECONFIG[readline] = "--without-editline,--without-readline,readline"
-PACKAGECONFIG[editline] = ",--without-editline,libedit"
-PACKAGECONFIG[sechash] = "--without-tomcrypt,--disable-sechash,nss"
-PACKAGECONFIG[privdrop] = ",--disable-privdrop,libcap"
-PACKAGECONFIG[scfilter] = "--enable-scfilter,--without-seccomp,libseccomp"
-PACKAGECONFIG[ipv6] = ",--disable-ipv6,"
-PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
-PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
-
-# --disable-static isn't supported by chrony's configure script.
-DISABLE_STATIC = ""
-
-do_configure() {
-    ./configure --sysconfdir=${sysconfdir} --bindir=${bindir} --sbindir=${sbindir} \
-                --localstatedir=${localstatedir} --datarootdir=${datadir} \
-                ${PACKAGECONFIG_CONFARGS}
-}
-
-do_install() {
-    # Binaries
-    install -d ${D}${bindir}
-    install -m 0755 ${S}/chronyc ${D}${bindir}
-    install -d ${D}${sbindir}
-    install -m 0755 ${S}/chronyd ${D}${sbindir}
-
-    # Config file
-    install -d ${D}${sysconfdir}
-    install -m 644 ${WORKDIR}/chrony.conf ${D}${sysconfdir}
-
-    # System V init script
-    install -d ${D}${sysconfdir}/init.d
-    install -m 755 ${WORKDIR}/chronyd ${D}${sysconfdir}/init.d
-
-    # systemd unit configuration file
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
-
-    # Variable data (for drift and/or rtc file)
-    install -d ${D}${localstatedir}/lib/chrony
-
-    # Log files
-    install -d ${D}${localstatedir}/log/chrony
-
-    # Fix hard-coded paths in config files and init scripts
-    sed -i -e 's!/var/!${localstatedir}/!g' -e 's!/etc/!${sysconfdir}/!g' \
-           -e 's!/usr/sbin/!${sbindir}/!g' -e 's!/usr/bin/!${bindir}/!g' \
-           ${D}${sysconfdir}/chrony.conf \
-           ${D}${sysconfdir}/init.d/chronyd \
-           ${D}${systemd_unitdir}/system/chronyd.service
-    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/chronyd
-    sed -i 's!^EnvironmentFile=.*!EnvironmentFile=-${sysconfdir}/default/chronyd!' ${D}${systemd_unitdir}/system/chronyd.service
-}
-
-FILES_${PN} = "${sbindir}/chronyd ${sysconfdir} ${localstatedir}"
-CONFFILES_${PN} = "${sysconfdir}/chrony.conf"
-INITSCRIPT_NAME = "chronyd"
-INITSCRIPT_PARAMS = "defaults"
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "chronyd.service"
-
-# It's probably a bad idea to run chrony and another time daemon on
-# the same system.  systemd includes the SNTP client 'timesyncd', which
-# will be disabled by chronyd.service, however it will remain on the rootfs
-# wasting 150 kB unless you put 'PACKAGECONFIG_remove_pn-systemd = "timesyncd"'
-# in a conf file or bbappend somewhere.
-RCONFLICTS_${PN} = "ntp ntimed"
-
-# Separate the client program into its own package
-PACKAGES =+ "chronyc"
-FILES_chronyc = "${bindir}/chronyc"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.2.bb
new file mode 100644
index 0000000..8b90a35
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/chrony/chrony_3.2.bb
@@ -0,0 +1,134 @@
+SUMMARY = "Versatile implementation of the Network Time Protocol"
+DESCRIPTION = "Chrony can synchronize the system clock with NTP \
+servers, reference clocks (e.g. GPS receiver), and manual input using \
+wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) \
+server and peer to provide a time service to other computers in the \
+network. \
+\
+It is designed to perform well in a wide range of conditions, \
+including intermittent network connections, heavily congested \
+networks, changing temperatures (ordinary computer clocks are \
+sensitive to temperature), and systems that do not run continuously, or \
+run on a virtual machine. \
+\
+Typical accuracy between two machines on a LAN is in tens, or a few \
+hundreds, of microseconds; over the Internet, accuracy is typically \
+within a few milliseconds. With a good hardware reference clock \
+sub-microsecond accuracy is possible. \
+\
+Two programs are included in chrony: chronyd is a daemon that can be \
+started at boot time and chronyc is a command-line interface program \
+which can be used to monitor chronyd's performance and to change \
+various operating parameters whilst it is running. \
+\
+This recipe produces two binary packages: 'chrony' which contains chronyd, \
+the configuration file and the init script, and 'chronyc' which contains \
+the client program only."
+
+HOMEPAGE = "https://chrony.tuxfamily.org/"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "https://download.tuxfamily.org/chrony/chrony-${PV}.tar.gz \
+    file://chrony.conf \
+    file://chronyd \
+    file://arm_eabi.patch \
+"
+SRC_URI[md5sum] = "f4c4eb0dc92f35ee4bb7d3dcd8029ecb"
+SRC_URI[sha256sum] = "329f6718dd8c3ece3eee78be1f4821cbbeb62608e7d23f25da293cfa433c4116"
+
+DEPENDS = "pps-tools"
+
+# Note: Despite being built via './configure; make; make install',
+#       chrony does not use GNU Autotools.
+inherit update-rc.d systemd
+
+# Configuration options:
+# - For command line editing support in chronyc, you may specify either
+#   'editline' or 'readline' but not both.  editline is smaller, but
+#   many systems already have readline for other purposes so you might want
+#   to choose that instead.  However, beware license incompatibility
+#   since chrony is GPLv2 and readline versions after 6.0 are GPLv3+.
+#   You can of course choose neither, but if you're that tight on space
+#   consider dropping chronyc entirely (you can use it remotely with
+#   appropriate chrony.conf options).
+# - Security-related:
+#   - 'sechash' is omitted by default because it pulls in nss which is huge.
+#   - 'privdrop' allows chronyd to run as non-root; would need changes to
+#     chrony.conf and init script.
+#   - 'scfilter' enables support for system call filtering, but requires the
+#     kernel to have CONFIG_SECCOMP enabled.
+PACKAGECONFIG ??= "editline \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[readline] = "--without-editline,--without-readline,readline"
+PACKAGECONFIG[editline] = ",--without-editline,libedit"
+PACKAGECONFIG[sechash] = "--without-tomcrypt,--disable-sechash,nss"
+PACKAGECONFIG[privdrop] = ",--disable-privdrop,libcap"
+PACKAGECONFIG[scfilter] = "--enable-scfilter,--without-seccomp,libseccomp"
+PACKAGECONFIG[ipv6] = ",--disable-ipv6,"
+PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+
+# --disable-static isn't supported by chrony's configure script.
+DISABLE_STATIC = ""
+
+do_configure() {
+    ./configure --sysconfdir=${sysconfdir} --bindir=${bindir} --sbindir=${sbindir} \
+                --localstatedir=${localstatedir} --datarootdir=${datadir} \
+                ${PACKAGECONFIG_CONFARGS}
+}
+
+do_install() {
+    # Binaries
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/chronyc ${D}${bindir}
+    install -d ${D}${sbindir}
+    install -m 0755 ${S}/chronyd ${D}${sbindir}
+
+    # Config file
+    install -d ${D}${sysconfdir}
+    install -m 644 ${WORKDIR}/chrony.conf ${D}${sysconfdir}
+
+    # System V init script
+    install -d ${D}${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/chronyd ${D}${sysconfdir}/init.d
+
+    # systemd unit configuration file
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
+
+    # Variable data (for drift and/or rtc file)
+    install -d ${D}${localstatedir}/lib/chrony
+
+    # Log files
+    install -d ${D}${localstatedir}/log/chrony
+
+    # Fix hard-coded paths in config files and init scripts
+    sed -i -e 's!/var/!${localstatedir}/!g' -e 's!/etc/!${sysconfdir}/!g' \
+           -e 's!/usr/sbin/!${sbindir}/!g' -e 's!/usr/bin/!${bindir}/!g' \
+           ${D}${sysconfdir}/chrony.conf \
+           ${D}${sysconfdir}/init.d/chronyd \
+           ${D}${systemd_unitdir}/system/chronyd.service
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/chronyd
+    sed -i 's!^EnvironmentFile=.*!EnvironmentFile=-${sysconfdir}/default/chronyd!' ${D}${systemd_unitdir}/system/chronyd.service
+}
+
+FILES_${PN} = "${sbindir}/chronyd ${sysconfdir} ${localstatedir}"
+CONFFILES_${PN} = "${sysconfdir}/chrony.conf"
+INITSCRIPT_NAME = "chronyd"
+INITSCRIPT_PARAMS = "defaults"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "chronyd.service"
+
+# It's probably a bad idea to run chrony and another time daemon on
+# the same system.  systemd includes the SNTP client 'timesyncd', which
+# will be disabled by chronyd.service, however it will remain on the rootfs
+# wasting 150 kB unless you put 'PACKAGECONFIG_remove_pn-systemd = "timesyncd"'
+# in a conf file or bbappend somewhere.
+RCONFLICTS_${PN} = "ntp ntimed"
+
+# Separate the client program into its own package
+PACKAGES =+ "chronyc"
+FILES_chronyc = "${bindir}/chronyc"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
index 3ca5b78..198e3ef 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_git.bb
@@ -7,7 +7,9 @@
 PV = "6.7"
 
 SRCREV = "8101a07871f185c7044fa2ca221b282ab4607c8b"
-SRC_URI = "git://git.samba.org/cifs-utils.git"
+SRC_URI = "git://git.samba.org/cifs-utils.git \
+           file://0001-mount.cifs-Remove-data_blob.h-include.patch \
+          "
 
 S = "${WORKDIR}/git"
 DEPENDS += "libtalloc"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/files/0001-mount.cifs-Remove-data_blob.h-include.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/files/0001-mount.cifs-Remove-data_blob.h-include.patch
new file mode 100644
index 0000000..07f2a57
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/cifs/files/0001-mount.cifs-Remove-data_blob.h-include.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Backport
+Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
+
+From 272d523a57a4e8791d625a479128613be5e401f5 Mon Sep 17 00:00:00 2001
+From: Thomas Witt <pyromaniac@exherbo.org>
+Date: Wed, 15 Mar 2017 20:20:44 +0000
+Subject: [PATCH] mount.cifs: Remove data_blob.h include
+
+data_blob.h includes talloc.h from libtalloc, but that is only marked as
+a dependency for cifs.upcall. No symbols from that header are used by
+cifs.mount, so remove it to avoid the libtalloc dependency
+
+Signed-off-by: Thomas Witt <pyromaniac@exherbo.org>
+---
+ mount.cifs.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/mount.cifs.c b/mount.cifs.c
+index 13b71ef..2612feb 100644
+--- a/mount.cifs.c
++++ b/mount.cifs.c
+@@ -61,7 +61,6 @@
+ #include "mount.h"
+ #include "util.h"
+ #include "resolve_host.h"
+-#include "data_blob.h"
+ 
+ #ifndef MS_MOVE 
+ #define MS_MOVE 8192 
+-- 
+1.9.4
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.39.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.39.0.bb
deleted file mode 100644
index 2b49096..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.39.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-require cim-schema.inc
-
-LICENSE = "DMTF"
-
-RCONFLICTS_${PN} = "cim-schema-final"
-
-SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2390/cim_schema_${PV}Experimental-MOFs.zip;subdir=${BPN}-${PV} \
-    file://LICENSE \
-"
-SRC_URI[md5sum] = "b82b31c609c6bcc69521829409f58ccc"
-SRC_URI[sha256sum] = "ed2096ef1ea25d189a02bbc6603fed7a48297f2987f254265763a6eecb7fc870"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
-
-do_install() {
-    install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
-    install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
-    install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
-
-    cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
-    chown -R root:root ${D}${datadir}/mof/cimv${PV}
-    for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
-        sed -i -e 's/\r//g' $i
-    done
-    ln -s cimv${PV} ${D}${datadir}/mof/cim-current
-    ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
-}
-
-FILES_${PN} = "${datadir}/mof/* ${datadir}/doc/*"
-FILES_${PN}-doc = ""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb
new file mode 100644
index 0000000..90ea882
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/cim-schema/cim-schema-exper_2.50.0.bb
@@ -0,0 +1,29 @@
+require cim-schema.inc
+
+LICENSE = "DMTF"
+
+RCONFLICTS_${PN} = "cim-schema-final"
+
+SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2500/cim_schema_${PV}Experimental-MOFs.zip;subdir=${BPN}-${PV} \
+    file://LICENSE \
+"
+SRC_URI[md5sum] = "ee4ad6441a2b65ca60a3abc53e3ec629"
+SRC_URI[sha256sum] = "a44d67881325e267ef46b72eabe0c69f90470b1033b1ce7c26d9ba99072adb50"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
+
+do_install() {
+    install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
+    install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
+    install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
+
+    cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
+    chown -R root:root ${D}${datadir}/mof/cimv${PV}
+    for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
+        sed -i -e 's/\r//g' $i
+    done
+    ln -s cimv${PV} ${D}${datadir}/mof/cim-current
+    ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
+}
+
+FILES_${PN} = "${datadir}/mof/* ${datadir}/doc/*"
+FILES_${PN}-doc = ""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
index 1dd9b93..1294fe4 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
@@ -2,15 +2,16 @@
 
 Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
 
-diff -Nurp ctdb-2.5.1.orig/Makefile.in ctdb-2.5.1/Makefile.in
---- ctdb-2.5.1.orig/Makefile.in	2015-05-07 16:43:39.276000236 +0900
-+++ ctdb-2.5.1/Makefile.in	2015-05-07 16:44:09.627000237 +0900
-@@ -170,7 +170,7 @@ bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb.
+Index: ctdb-2.5.6/Makefile.in
+===================================================================
+--- ctdb-2.5.6.orig/Makefile.in
++++ ctdb-2.5.6/Makefile.in
+@@ -176,7 +176,7 @@ bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb.
  	@echo Linking $@
  	$(WRAPPER) $(CC) $(CFLAGS) -o $@ tools/ctdb.o tools/ctdb_vacuum.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
  
 -bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ)
 +bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ) lib/replace/snprintf.o
  	@echo Linking $@
- 	$(WRAPPER) $(CC) $(CFLAGS) -o $@ $+ $(TDB_LIBS) $(LIB_FLAGS)
+ 	$(WRAPPER) $(CC) $(CFLAGS) -o $@ $+ $(LIB_FLAGS)
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.29.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.29.bb
deleted file mode 100644
index 1663408..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.29.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
-HOMEPAGE = "https://www.dovecot.org/"
-DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory."
-SECTION = "mail"
-LICENSE = "LGPLv2.1 & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a981379bd0f1c362f8d1d21515e5b30b"
-
-SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \
-           file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
-           file://dovecot.service \
-           file://dovecot.socket \
-           file://0001-doveadm-Fix-parallel-build.patch \
-           "
-
-SRC_URI[md5sum] = "ff95486a5c43025a2c3f5a712e7962b9"
-SRC_URI[sha256sum] = "d939ea99126eb8a8c6955390b422b6e27ec0fa43a3b59b2b3218cb5ad67139a6"
-
-DEPENDS = "openssl xz zlib bzip2 libcap icu"
-
-DEPENDS_append_libc-musl = " libtirpc"
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
-LDFLAGS_append_libc-musl = " -ltirpc"
-
-inherit autotools pkgconfig systemd useradd
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
-
-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
-PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
-PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
-
-# From native build in armv7a-hf/eglibc
-CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \
-                         i_cv_gmtime_max_time_t=32 \
-                         i_cv_signed_time_t=yes \
-                         i_cv_mmap_plays_with_write=yes \
-                         i_cv_fd_passing=yes \
-                         i_cv_c99_vsnprintf=yes \
-                         lib_cv___va_copy=yes \
-                         lib_cv_va_copy=yes \
-                         lib_cv_va_val_copy=yes \
-                        "
-
-# hardcode epoll() to avoid running unsafe tests
-# BSD needs kqueue and uclibc poll()
-EXTRA_OECONF = " --with-ioloop=epoll \
-                 --with-systemdsystemunitdir=${systemd_unitdir}/system"
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "dovecot.service dovecot.socket"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-do_install_append () {
-    install -d 755 ${D}/etc/dovecot
-    touch 644 ${D}/etc/dovecot/dovecot.conf
-    install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
-    sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
-    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
-}
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
-                      -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
-GROUPADD_PARAM_${PN} = "-f -r dovecot;-f -r dovenull"
-
-FILES_${PN} += "${libdir}/dovecot/*plugin.so \
-                ${libdir}/dovecot/libfs_compress.so \
-                ${libdir}/dovecot/libssl_iostream_openssl.so"
-FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a"
-FILES_${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
-FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.33.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.33.bb
new file mode 100644
index 0000000..5ebda19
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.2.33.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
+HOMEPAGE = "https://www.dovecot.org/"
+DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory."
+SECTION = "mail"
+LICENSE = "LGPLv2.1 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a981379bd0f1c362f8d1d21515e5b30b"
+
+SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \
+           file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
+           file://dovecot.service \
+           file://dovecot.socket \
+           file://0001-doveadm-Fix-parallel-build.patch \
+           "
+
+SRC_URI[md5sum] = "d61d1e923a22f9062cc9f47696882666"
+SRC_URI[sha256sum] = "e9483d68a7698d701bc06124fcf6e1b1f16380c2986c7ec0cf4e1475b9d0c218"
+
+DEPENDS = "openssl xz zlib bzip2 libcap icu"
+
+DEPENDS_append_libc-musl = " libtirpc"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS_append_libc-musl = " -ltirpc"
+
+inherit autotools pkgconfig systemd useradd
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
+
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
+PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
+PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
+
+# From native build in armv7a-hf/eglibc
+CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \
+                         i_cv_gmtime_max_time_t=32 \
+                         i_cv_signed_time_t=yes \
+                         i_cv_mmap_plays_with_write=yes \
+                         i_cv_fd_passing=yes \
+                         i_cv_c99_vsnprintf=yes \
+                         lib_cv___va_copy=yes \
+                         lib_cv_va_copy=yes \
+                         lib_cv_va_val_copy=yes \
+                        "
+
+# hardcode epoll() to avoid running unsafe tests
+# BSD needs kqueue and uclibc poll()
+EXTRA_OECONF = " --with-ioloop=epoll \
+                 --with-systemdsystemunitdir=${systemd_unitdir}/system"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "dovecot.service dovecot.socket"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append () {
+    install -d 755 ${D}/etc/dovecot
+    touch 644 ${D}/etc/dovecot/dovecot.conf
+    install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
+    sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
+                      -r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
+GROUPADD_PARAM_${PN} = "-f -r dovecot;-f -r dovenull"
+
+FILES_${PN} += "${libdir}/dovecot/*plugin.so \
+                ${libdir}/dovecot/libfs_compress.so \
+                ${libdir}/dovecot/libssl_iostream_openssl.so"
+FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a"
+FILES_${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
+FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb
index 5f6c43f..81f1cfe 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_8.9.6.bb
@@ -8,7 +8,7 @@
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
 
-SRC_URI = "http://oss.linbit.com/drbd/${BP}.tar.gz \
+SRC_URI = "http://www.linbit.com/downloads/drbd/utils/archive/${BP}.tar.gz \
            file://0001-Makefile.in-fix-permission-bits-for-drbd.service.patch \
           "
 SRC_URI[md5sum] = "76ed6d3190cd77b00890f3365353124b"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb
index e943f24..fa4d10b 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd_9.0.8-1.bb
@@ -20,3 +20,5 @@
 do_install () {
     oe_runmake install DESTDIR="${D}"
 }
+
+PNBLACKLIST[drbd] = "implicit declaration of function 'setup_timer'; 4.15 head file issue?" 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb
index 49b11ad..0fd5f6f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/fwknop/fwknop_2.6.9.bb
@@ -17,6 +17,9 @@
                "
 
 do_configure () {
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/config
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config
+
 	aclocal
 	libtoolize --automake --copy --force
 	autoconf
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb
index a8c8bcf..95147bd 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb
@@ -9,17 +9,12 @@
 LICENSE = "Artistic-1.0 | GPL-1.0+"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b7a36f55e8ba62aadd74e4f0886a405e"
 
-# Note that we do not want to use the upstream file name locally.
-#
-SRC_URI = "http://github.com/maxmind/geoip-api-perl/archive/v${PV}.tar.gz;downloadfilename=${BPN}-${PV}.tar.gz \
+S = "${WORKDIR}/git"
+SRCREV = "47f7d49bd15cfc2e5f8c0f5c4068dc8bb0e10e96"
+SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;protocol=https; \
     file://run-ptest \
 "
 
-SRC_URI[md5sum] = "2d7f8b1b54e6ba6d9e3fefce52675815"
-SRC_URI[sha256sum] = "86da0dd67f417a43dc70f15a49bd3619f668970c117b9e7f737b4ab246c240a6"
-
-S = "${WORKDIR}/geoip-api-perl-${PV}"
-
 DEPENDS += "geoip"
 
 inherit cpan ptest
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb
new file mode 100644
index 0000000..3527d0c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb
@@ -0,0 +1,90 @@
+SUMMARY = "C library for country/city/organization to IP address or hostname mapping"
+DESCRIPTION = "GeoIP is a C library that enables the user to find the country that any IP \
+address or hostname originates from. It uses a file based database that is \
+accurate as of March 2003. This database simply contains IP blocks as keys, and \
+countries as values. This database should be more complete and accurate than \
+using reverse DNS lookups."
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "libdevel"
+
+SRC_URI = "git://github.com/maxmind/geoip-api-c.git \
+           http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz;apply=no;name=GeoIP-dat \
+           http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz;apply=no;name=GeoIPv6-dat \
+           http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz;apply=no;name=GeoLiteCity-dat \
+           http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz;apply=no;name=GeoLiteCityv6-dat \
+           file://run-ptest \
+"
+SRCREV = "3169a8a88808c8df862e0b0355f99c738cce9f7e"
+
+SRC_URI[GeoIP-dat.md5sum] = "37c84ead332dda0362a5ac7b049b72d4"
+SRC_URI[GeoIP-dat.sha256sum] = "79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07"
+
+SRC_URI[GeoIPv6-dat.md5sum] = "e75b84a4044e81d6d4484e33816bc762"
+SRC_URI[GeoIPv6-dat.sha256sum] = "a009b0f21968d2868e6dd19d14f3c3b8cd60ae84a4bfc2970df34d771a04811e"
+
+SRC_URI[GeoLiteCity-dat.md5sum] = "4b6588d0bfe1af22e267ac90aa97f769"
+SRC_URI[GeoLiteCity-dat.sha256sum] = "8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7"
+
+SRC_URI[GeoLiteCityv6-dat.md5sum] = "ad0cb42518af7f752499425dca0952bb"
+SRC_URI[GeoLiteCityv6-dat.sha256sum] = "eda67f4204ba9fa5204a53cdb629167cca9394c712f5378bc723a8c29c0b440f"
+
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad \
+                    file://LICENSE;md5=0388276749a542b0d611601fa7c1dcc8 "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-static               \
+                --disable-dependency-tracking  "
+
+do_install() {
+    make DESTDIR=${D} install
+    install -d ${D}/${datadir}/GeoIP
+    install ${WORKDIR}/GeoIP.dat ${D}/${datadir}/GeoIP/
+    install ${WORKDIR}/GeoIPv6.dat ${D}/${datadir}/GeoIP/
+    install ${WORKDIR}/GeoLiteCity.dat ${D}/${datadir}/GeoIP/
+    install ${WORKDIR}/GeoLiteCityv6.dat ${D}/${datadir}/GeoIP/
+    ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat
+}
+
+PACKAGES =+ "${PN}-database"
+FILES_${PN}-database = ""
+FILES_${PN}-database += "${datadir}/GeoIP/*"
+
+# We cannot do much looking up without databases.
+#
+RDEPENDS_${PN} += "${PN}-database"
+
+inherit ptest
+
+do_configure_ptest() {
+    sed -i -e "s/noinst_PROGRAMS = /test_PROGRAMS = /g" \
+        -e 's:SRCDIR=\\"$(top_srcdir)\\":SRCDIR=\\"$(testdir)\\":' \
+        ${S}/test/Makefile.am
+
+    if ! grep "^testdir = " ${S}/test/Makefile.am ; then
+        sed -e '/EXTRA_PROGRAMS = /itestdir = ${PTEST_PATH}/tests' \
+            -i ${S}/test/Makefile.am
+    fi
+
+    sed -i -e "s:/usr/local/share:/usr/share:g" \
+        ${S}/test/benchmark.c
+
+    sed -i -e 's:"../data/:"/usr/share/GeoIP/:g' \
+        ${S}/test/test-geoip-city.c \
+        ${S}/test/test-geoip-isp.c \
+        ${S}/test/test-geoip-asnum.c \
+        ${S}/test/test-geoip-netspeed.c \
+        ${S}/test/test-geoip-org.c \
+        ${S}/test/test-geoip-region.c
+}
+
+
+do_install_ptest() {
+    oe_runmake -C test DESTDIR=${D}  install-testPROGRAMS
+    install ${S}/test/*.txt ${D}${PTEST_PATH}/tests
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.9.bb
deleted file mode 100644
index 9e8e071..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.9.bb
+++ /dev/null
@@ -1,90 +0,0 @@
-SUMMARY = "C library for country/city/organization to IP address or hostname mapping"
-DESCRIPTION = "GeoIP is a C library that enables the user to find the country that any IP \
-address or hostname originates from. It uses a file based database that is \
-accurate as of March 2003. This database simply contains IP blocks as keys, and \
-countries as values. This database should be more complete and accurate than \
-using reverse DNS lookups."
-
-HOMEPAGE = "http://dev.maxmind.com/geoip/"
-SECTION = "libdevel"
-
-SRC_URI = "git://github.com/maxmind/geoip-api-c.git \
-           http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz;apply=no;name=GeoIP-dat \
-           http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz;apply=no;name=GeoIPv6-dat \
-           http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz;apply=no;name=GeoLiteCity-dat \
-           http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz;apply=no;name=GeoLiteCityv6-dat \
-           file://run-ptest \
-"
-SRCREV = "4f487bf95532e0bba7783d591faff178ab0aa462"
-
-SRC_URI[GeoIP-dat.md5sum] = "37c84ead332dda0362a5ac7b049b72d4"
-SRC_URI[GeoIP-dat.sha256sum] = "79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07"
-
-SRC_URI[GeoIPv6-dat.md5sum] = "e75b84a4044e81d6d4484e33816bc762"
-SRC_URI[GeoIPv6-dat.sha256sum] = "a009b0f21968d2868e6dd19d14f3c3b8cd60ae84a4bfc2970df34d771a04811e"
-
-SRC_URI[GeoLiteCity-dat.md5sum] = "4b6588d0bfe1af22e267ac90aa97f769"
-SRC_URI[GeoLiteCity-dat.sha256sum] = "8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7"
-
-SRC_URI[GeoLiteCityv6-dat.md5sum] = "ad0cb42518af7f752499425dca0952bb"
-SRC_URI[GeoLiteCityv6-dat.sha256sum] = "eda67f4204ba9fa5204a53cdb629167cca9394c712f5378bc723a8c29c0b440f"
-
-LICENSE = "LGPL-2.1"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad \
-                    file://LICENSE;md5=0388276749a542b0d611601fa7c1dcc8 "
-
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-EXTRA_OECONF = "--disable-static               \
-                --disable-dependency-tracking  "
-
-do_install() {
-    make DESTDIR=${D} install
-    install -d ${D}/${datadir}/GeoIP
-    install ${WORKDIR}/GeoIP.dat ${D}/${datadir}/GeoIP/
-    install ${WORKDIR}/GeoIPv6.dat ${D}/${datadir}/GeoIP/
-    install ${WORKDIR}/GeoLiteCity.dat ${D}/${datadir}/GeoIP/
-    install ${WORKDIR}/GeoLiteCityv6.dat ${D}/${datadir}/GeoIP/
-    ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat
-}
-
-PACKAGES =+ "${PN}-database"
-FILES_${PN}-database = ""
-FILES_${PN}-database += "${datadir}/GeoIP/*"
-
-# We cannot do much looking up without databases.
-#
-RDEPENDS_${PN} += "${PN}-database"
-
-inherit ptest
-
-do_configure_ptest() {
-    sed -i -e "s/noinst_PROGRAMS = /test_PROGRAMS = /g" \
-        -e 's:SRCDIR=\\"$(top_srcdir)\\":SRCDIR=\\"$(testdir)\\":' \
-        ${S}/test/Makefile.am
-
-    if ! grep "^testdir = " ${S}/test/Makefile.am ; then
-        sed -e '/EXTRA_PROGRAMS = /itestdir = ${PTEST_PATH}/tests' \
-            -i ${S}/test/Makefile.am
-    fi
-
-    sed -i -e "s:/usr/local/share:/usr/share:g" \
-        ${S}/test/benchmark.c
-
-    sed -i -e 's:"../data/:"/usr/share/GeoIP/:g' \
-        ${S}/test/test-geoip-city.c \
-        ${S}/test/test-geoip-isp.c \
-        ${S}/test/test-geoip-asnum.c \
-        ${S}/test/test-geoip-netspeed.c \
-        ${S}/test/test-geoip-org.c \
-        ${S}/test/test-geoip-region.c
-}
-
-
-do_install_ptest() {
-    oe_runmake -C test DESTDIR=${D}  install-testPROGRAMS
-    install ${S}/test/*.txt ${D}${PTEST_PATH}/tests
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/GeoIP.conf b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/GeoIP.conf
rename to import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/geoipupdate.cron b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron
similarity index 100%
rename from import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.4.0/geoipupdate.cron
rename to import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.4.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.4.0.bb
deleted file mode 100644
index 3e045bb..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.4.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
-DESCRIPTION = "update databases for GeoIP"
-
-HOMEPAGE = "http://dev.maxmind.com/geoip/"
-SECTION = "net"
-
-DEPENDS = "zlib curl"
-
-SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.4.0/geoipupdate-2.4.0.tar.gz \
-           file://GeoIP.conf \
-           file://geoipupdate.cron \
-          "
-SRC_URI[md5sum] = "02f9712fb80e8e979d3d54cda7f7704f"
-SRC_URI[sha256sum] = "8b4e88ce8d84e9c75bc681704d19ec5c63c54f01e945f7669f97fb0df7e13952"
-
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "\
-file://ChangeLog.md;md5=334337b6ecbb65093bae66b3ae21c8c2 \
-"
-FILES_${PN} = "/usr/share/GeoIP \
-              /etc/GeoIP.conf \
-             /etc/cron.d/geoipupdate.cron \
-             /usr/bin/geoipupdate \
-"
-inherit autotools
-
-do_install_append() {
-    install -d ${D}/${sysconfdir}
-    install -d ${D}/${sysconfdir}/cron.d
-    install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
-    install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb
new file mode 100644
index 0000000..f4eb2b7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
+DESCRIPTION = "update databases for GeoIP"
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "net"
+
+DEPENDS = "zlib curl"
+
+SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.5.0/geoipupdate-2.5.0.tar.gz \
+           file://GeoIP.conf \
+           file://geoipupdate.cron \
+          "
+SRC_URI[md5sum] = "28f633c49ec87ab01ad3c0fb0228a696"
+SRC_URI[sha256sum] = "5119fd0e338cd083e886228b26679c64bcbaade8a815be092aecf865a610ab26"
+
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "\
+file://ChangeLog.md;md5=11d2e31df0de2be3ccc3e2286c4dafcb \
+"
+FILES_${PN} = "/usr/share/GeoIP \
+              /etc/GeoIP.conf \
+             /etc/cron.d/geoipupdate.cron \
+             /usr/bin/geoipupdate \
+"
+inherit autotools
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}
+    install -d ${D}/${sysconfdir}/cron.d
+    install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
+    install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch
new file mode 100644
index 0000000..38d3064
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc/0001-Makefile-pass-extra-linker-flags.patch
@@ -0,0 +1,31 @@
+From fd80c0599083013a1b583feba5d7473f52b35938 Mon Sep 17 00:00:00 2001
+From: Mariia Movchan <mmovchan@cisco.com>
+Date: Tue, 6 Mar 2018 16:03:39 +0200
+Subject: [PATCH] Makefile: pass extra linker flags
+
+Fixes
+ERROR: QA Issue: No GNU_HASH in the elf binary
+
+Upstream-Status: Pending
+
+Signed-off-by: Mariia Movchan <mmovchan@cisco.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8beff8f..047f02a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@ LIBS?=
+ VERSION=0.2.2
+ CC?=gcc
+ CFLAGS?=-O2 -g -Wall
+-LDFLAGS=$(LIBS)
++LDFLAGS+=$(LIBS)
+ 
+ ifeq ($(USE_GEOIP),yes)
+ ifeq ($(USE_DYN_GEOIP),yes)
+-- 
+2.15.1
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.2.bb
new file mode 100644
index 0000000..b456424
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipcalc/ipcalc_0.2.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool to assist in network address calculations for IPv4 and IPv6."
+HOMEPAGE = "https://github.com/nmav/ipcalc"
+
+SECTION = "net"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git"
+SRCREV = "8348808a7869ca8f25a5b5deeaa418c2f6d52758"
+SRC_URI = "\
+    git://github.com/nmav/ipcalc.git;protocol=https; \
+    file://0001-Makefile-pass-extra-linker-flags.patch \
+"
+
+export USE_GEOIP = "no"
+
+do_install() {
+    install -d ${D}/${bindir}
+    install -m 0755 ${S}/ipcalc ${D}/${bindir}
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/ldb-Add-configure-options-for-packages.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/ldb-Add-configure-options-for-packages.patch
deleted file mode 100644
index 93bd457..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/ldb-Add-configure-options-for-packages.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From 49dde22e798fd7f39fd59250036c0ae1fe2b9152 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Wed, 21 Sep 2016 10:06:39 +0800
-Subject: [PATCH] ldb: Add configure options for packages
-
-Add configure options for the following packages:
- - acl
- - attr
- - libaio
- - libbsd
- - libcap
- - valgrind
-
-Upstream-Status: Inappropriate [oe deterministic build specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- lib/replace/system/wscript_configure |  6 ++-
- lib/replace/wscript                  | 85 ++++++++++++++++++++++++++++--------
- wscript                              |  7 +++
- 3 files changed, 80 insertions(+), 18 deletions(-)
-
-diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
-index 2035474..10f9ae7 100644
---- a/lib/replace/system/wscript_configure
-+++ b/lib/replace/system/wscript_configure
-@@ -1,6 +1,10 @@
- #!/usr/bin/env python
- 
--conf.CHECK_HEADERS('sys/capability.h')
-+import Options
-+
-+if Options.options.enable_libcap:
-+    conf.CHECK_HEADERS('sys/capability.h')
-+
- conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
- 
- # solaris varients of getXXent_r
-diff --git a/lib/replace/wscript b/lib/replace/wscript
-index 145300d..8218fa5 100644
---- a/lib/replace/wscript
-+++ b/lib/replace/wscript
-@@ -23,6 +23,41 @@ def set_options(opt):
-     opt.PRIVATE_EXTENSION_DEFAULT('')
-     opt.RECURSE('buildtools/wafsamba')
- 
-+    opt.add_option('--with-acl',
-+                   help=("Enable use of acl"),
-+                   action="store_true", dest='enable_acl')
-+    opt.add_option('--without-acl',
-+                   help=("Disable use of acl"),
-+                   action="store_false", dest='enable_acl', default=False)
-+
-+    opt.add_option('--with-attr',
-+                   help=("Enable use of attr"),
-+                   action="store_true", dest='enable_attr')
-+    opt.add_option('--without-attr',
-+                   help=("Disable use of attr"),
-+                   action="store_false", dest='enable_attr', default=False)
-+
-+    opt.add_option('--with-libaio',
-+                   help=("Enable use of libaio"),
-+                   action="store_true", dest='enable_libaio')
-+    opt.add_option('--without-libaio',
-+                   help=("Disable use of libaio"),
-+                   action="store_false", dest='enable_libaio', default=False)
-+
-+    opt.add_option('--with-libbsd',
-+                   help=("Enable use of libbsd"),
-+                   action="store_true", dest='enable_libbsd')
-+    opt.add_option('--without-libbsd',
-+                   help=("Disable use of libbsd"),
-+                   action="store_false", dest='enable_libbsd', default=False)
-+
-+    opt.add_option('--with-libcap',
-+                   help=("Enable use of libcap"),
-+                   action="store_true", dest='enable_libcap')
-+    opt.add_option('--without-libcap',
-+                   help=("Disable use of libcap"),
-+                   action="store_false", dest='enable_libcap', default=False)
-+
- @Utils.run_once
- def configure(conf):
-     conf.RECURSE('buildtools/wafsamba')
-@@ -32,12 +67,25 @@ def configure(conf):
-     conf.DEFINE('HAVE_LIBREPLACE', 1)
-     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
- 
--    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
--    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
-+    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
-+    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
-     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
--    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
--    conf.CHECK_HEADERS('shadow.h sys/acl.h')
--    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
-+    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
-+    conf.CHECK_HEADERS('shadow.h')
-+    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
-+
-+    if Options.options.enable_acl:
-+        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
-+
-+    if Options.options.enable_attr:
-+        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
-+
-+    if Options.options.enable_libaio:
-+        conf.CHECK_HEADERS('libaio.h')
-+
-+    if Options.options.enable_libcap:
-+        conf.CHECK_HEADERS('sys/capability.h')
-+
-     conf.CHECK_HEADERS('port.h')
-     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
-     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
-@@ -73,7 +121,9 @@ def configure(conf):
- 
-     conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
- 
--    conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+    if Options.options.enable_valgrind:
-+        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+
-     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
-     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
-     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
-@@ -248,17 +298,18 @@ def configure(conf):
- 
-     conf.CHECK_FUNCS('prctl dirname basename')
- 
--    # libbsd on some platforms provides strlcpy and strlcat
--    if not conf.CHECK_FUNCS('strlcpy strlcat'):
--        conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
--                checklibc=True)
--    if not conf.CHECK_FUNCS('getpeereid'):
--        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
--    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
--        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
--
--    if not conf.CHECK_FUNCS('closefrom'):
--        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
-+    if Options.options.enable_libbsd:
-+        # libbsd on some platforms provides strlcpy and strlcat
-+        if not conf.CHECK_FUNCS('strlcpy strlcat'):
-+            conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
-+                    checklibc=True)
-+        if not conf.CHECK_FUNCS('getpeereid'):
-+            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
-+        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
-+            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
-+
-+        if not conf.CHECK_FUNCS('closefrom'):
-+            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
- 
-     conf.CHECK_CODE('''
-                 struct ucred cred;
-diff --git a/wscript b/wscript
-index 2af8571..059408b 100755
---- a/wscript
-+++ b/wscript
-@@ -29,6 +29,13 @@ def set_options(opt):
-     opt.RECURSE('lib/replace')
-     opt.tool_options('python') # options for disabling pyc or pyo compilation
- 
-+    opt.add_option('--with-valgrind',
-+                   help=("enable use of valgrind"),
-+                   action="store_true", dest='enable_valgrind')
-+    opt.add_option('--without-valgrind',
-+                   help=("disable use of valgrind"),
-+                   action="store_false", dest='enable_valgrind', default=False)
-+
- def configure(conf):
-     conf.RECURSE('lib/tdb')
-     conf.RECURSE('lib/tevent')
--- 
-2.8.3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch
new file mode 100644
index 0000000..ffe253b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch
@@ -0,0 +1,193 @@
+From a4da3ab4d76013aaa731d43d52ccca1ebd37c395 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 21 Sep 2016 10:06:39 +0800
+Subject: [PATCH 1/1] ldb: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ lib/replace/system/wscript_configure |  6 ++-
+ lib/replace/wscript                  | 94 +++++++++++++++++++++++++++---------
+ wscript                              |  7 +++
+ 3 files changed, 83 insertions(+), 24 deletions(-)
+
+diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
+index 2035474..10f9ae7 100644
+--- a/lib/replace/system/wscript_configure
++++ b/lib/replace/system/wscript_configure
+@@ -1,6 +1,10 @@
+ #!/usr/bin/env python
+ 
+-conf.CHECK_HEADERS('sys/capability.h')
++import Options
++
++if Options.options.enable_libcap:
++    conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
+ 
+ # solaris varients of getXXent_r
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 2f94d49..68b2d3a 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -23,6 +23,41 @@ def set_options(opt):
+     opt.PRIVATE_EXTENSION_DEFAULT('')
+     opt.RECURSE('buildtools/wafsamba')
+ 
++    opt.add_option('--with-acl',
++                   help=("Enable use of acl"),
++                   action="store_true", dest='enable_acl')
++    opt.add_option('--without-acl',
++                   help=("Disable use of acl"),
++                   action="store_false", dest='enable_acl', default=False)
++
++    opt.add_option('--with-attr',
++                   help=("Enable use of attr"),
++                   action="store_true", dest='enable_attr')
++    opt.add_option('--without-attr',
++                   help=("Disable use of attr"),
++                   action="store_false", dest='enable_attr', default=False)
++
++    opt.add_option('--with-libaio',
++                   help=("Enable use of libaio"),
++                   action="store_true", dest='enable_libaio')
++    opt.add_option('--without-libaio',
++                   help=("Disable use of libaio"),
++                   action="store_false", dest='enable_libaio', default=False)
++
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
++    opt.add_option('--with-libcap',
++                   help=("Enable use of libcap"),
++                   action="store_true", dest='enable_libcap')
++    opt.add_option('--without-libcap',
++                   help=("Disable use of libcap"),
++                   action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+     conf.RECURSE('buildtools/wafsamba')
+@@ -32,12 +67,25 @@ def configure(conf):
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+ 
+-    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+-    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+-    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+-    conf.CHECK_HEADERS('shadow.h sys/acl.h')
+-    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++    conf.CHECK_HEADERS('shadow.h')
++    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++    if Options.options.enable_acl:
++        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++    if Options.options.enable_attr:
++        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++    if Options.options.enable_libaio:
++        conf.CHECK_HEADERS('libaio.h')
++
++    if Options.options.enable_libcap:
++        conf.CHECK_HEADERS('sys/capability.h')
++
+     conf.CHECK_HEADERS('port.h')
+     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -73,7 +121,9 @@ def configure(conf):
+ 
+     conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+ 
+-    conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++    if Options.options.enable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++
+     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+@@ -266,22 +316,20 @@ def configure(conf):
+ 
+     conf.CHECK_FUNCS('prctl dirname basename')
+ 
+-    strlcpy_in_bsd = False
+-
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++    if Options.options.enable_libbsd:
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++                    checklibc=True)
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS('setproctitle_init'):
++            conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+@@ -632,7 +680,7 @@ removeea setea
+     # look for a method of finding the list of network interfaces
+     for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+         bsd_for_strlcpy = ''
+-        if strlcpy_in_bsd:
++        if Options.options.enable_libbsd:
+             bsd_for_strlcpy = ' bsd'
+         if conf.CHECK_CODE('''
+                            #define %s 1
+diff --git a/wscript b/wscript
+index 8ae5be3..a178cc4 100644
+--- a/wscript
++++ b/wscript
+@@ -31,6 +31,13 @@ def set_options(opt):
+     opt.RECURSE('lib/replace')
+     opt.tool_options('python') # options for disabling pyc or pyo compilation
+ 
++    opt.add_option('--with-valgrind',
++                   help=("enable use of valgrind"),
++                   action="store_true", dest='enable_valgrind')
++    opt.add_option('--without-valgrind',
++                   help=("disable use of valgrind"),
++                   action="store_false", dest='enable_valgrind', default=False)
++
+ def configure(conf):
+     conf.RECURSE('lib/tdb')
+     conf.RECURSE('lib/tevent')
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.1.29.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.1.29.bb
deleted file mode 100644
index a90919b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.1.29.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
-HOMEPAGE = "http://ldb.samba.org"
-SECTION = "libs"
-LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+"
-
-DEPENDS += "libtdb libtalloc libtevent popt"
-RDEPENDS_pyldb += "python"
-
-SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \
-           file://do-not-import-target-module-while-cross-compile.patch \
-           file://ldb-Add-configure-options-for-packages.patch \
-          "
-
-PACKAGECONFIG ??= "\
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[ldap] = ",,openldap"
-PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
-PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
-PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-
-SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}"
-
-LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \
-                    file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \
-                    file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42"
-
-SRC_URI[md5sum] = "9c90abfb94c1e2a693399392cf4cddb9"
-SRC_URI[sha256sum] = "59d84f9a5b799f519ba7b2685bb46f5a26f1bbf05b7a144b2f5e017d01d80f97"
-
-inherit waf-samba
-
-S = "${WORKDIR}/ldb-${PV}"
-
-EXTRA_OECONF += "--disable-rpath \
-                 --disable-rpath-install \
-                 --bundled-libraries=NONE \
-                 --builtin-libraries=replace \
-                 --with-modulesdir=${libdir}/ldb/modules \
-                 --with-privatelibdir=${libdir}/ldb \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
-                "
-
-PACKAGES =+ "pyldb pyldb-dbg pyldb-dev"
-
-NOAUTOPACKAGEDEBUG = "1"
-
-FILES_${PN} += "${libdir}/ldb/*"
-FILES_${PN}-dbg += "${bindir}/.debug/* \
-                    ${libdir}/.debug/* \
-                    ${libdir}/ldb/.debug/* \
-                    ${libdir}/ldb/modules/ldb/.debug/*"
-
-FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
-               ${libdir}/libpyldb-util.so.* \
-              "
-FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
-                   ${libdir}/.debug/libpyldb-util.so.*"
-FILES_pyldb-dev = "${libdir}/libpyldb-util.so"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.3.1.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.3.1.bb
new file mode 100644
index 0000000..7e14cde
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libldb/libldb_1.3.1.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://ldb.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+"
+
+DEPENDS += "libtdb libtalloc libtevent popt"
+RDEPENDS_pyldb += "python"
+
+SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \
+           file://do-not-import-target-module-while-cross-compile.patch \
+           file://options-1.3.1.patch \
+          "
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[ldap] = ",,openldap"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}"
+
+LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \
+                    file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \
+                    file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42"
+
+SRC_URI[md5sum] = "e5233f202bca27f6ce8474fb8ae65983"
+SRC_URI[sha256sum] = "b19f2c9f55ae0f46aa5ebaea0bf1a47ec1ac135e1d78af0f6318cf50bf62cbd2"
+
+inherit waf-samba
+
+S = "${WORKDIR}/ldb-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --disable-rpath-install \
+                 --bundled-libraries=cmocka \
+                 --builtin-libraries=replace \
+                 --with-modulesdir=${libdir}/ldb/modules \
+                 --with-privatelibdir=${libdir}/ldb \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+
+PACKAGES =+ "pyldb pyldb-dbg pyldb-dev"
+
+NOAUTOPACKAGEDEBUG = "1"
+
+FILES_${PN} += "${libdir}/ldb/*"
+FILES_${PN}-dbg += "${bindir}/.debug/* \
+                    ${libdir}/.debug/* \
+                    ${libdir}/ldb/.debug/* \
+                    ${libdir}/ldb/modules/ldb/.debug/*"
+
+FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+               ${libdir}/libpyldb-util.so.* \
+              "
+FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
+                   ${libdir}/.debug/libpyldb-util.so.*"
+FILES_pyldb-dev = "${libdir}/libpyldb-util.so"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch
new file mode 100644
index 0000000..63f21e7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch
@@ -0,0 +1,184 @@
+From efc1b02144f23fdf84dbc5ff15307815e0f2a425 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 14 Sep 2016 11:11:35 +0800
+Subject: [PATCH] talloc: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Modified to apply to version 2.1.10.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+ lib/replace/system/wscript_configure |  6 ++-
+ lib/replace/wscript                  | 85 ++++++++++++++++++++++++++++--------
+ wscript                              |  7 ++-
+ 3 files changed, 79 insertions(+), 19 deletions(-)
+
+Index: talloc-2.1.11/lib/replace/system/wscript_configure
+===================================================================
+--- talloc-2.1.11.orig/lib/replace/system/wscript_configure
++++ talloc-2.1.11/lib/replace/system/wscript_configure
+@@ -1,6 +1,10 @@
+ #!/usr/bin/env python
+ 
+-conf.CHECK_HEADERS('sys/capability.h')
++import Options
++
++if Options.options.enable_libcap:
++    conf.CHECK_HEADERS('sys/capability.h')
++
+ conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
+ 
+ # solaris varients of getXXent_r
+Index: talloc-2.1.11/lib/replace/wscript
+===================================================================
+--- talloc-2.1.11.orig/lib/replace/wscript
++++ talloc-2.1.11/lib/replace/wscript
+@@ -23,6 +23,41 @@ def set_options(opt):
+     opt.PRIVATE_EXTENSION_DEFAULT('')
+     opt.RECURSE('buildtools/wafsamba')
+ 
++    opt.add_option('--with-acl',
++                   help=("Enable use of acl"),
++                   action="store_true", dest='enable_acl')
++    opt.add_option('--without-acl',
++                   help=("Disable use of acl"),
++                   action="store_false", dest='enable_acl', default=False)
++
++    opt.add_option('--with-attr',
++                   help=("Enable use of attr"),
++                   action="store_true", dest='enable_attr')
++    opt.add_option('--without-attr',
++                   help=("Disable use of attr"),
++                   action="store_false", dest='enable_attr', default=False)
++
++    opt.add_option('--with-libaio',
++                   help=("Enable use of libaio"),
++                   action="store_true", dest='enable_libaio')
++    opt.add_option('--without-libaio',
++                   help=("Disable use of libaio"),
++                   action="store_false", dest='enable_libaio', default=False)
++
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
++    opt.add_option('--with-libcap',
++                   help=("Enable use of libcap"),
++                   action="store_true", dest='enable_libcap')
++    opt.add_option('--without-libcap',
++                   help=("Disable use of libcap"),
++                   action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+     conf.RECURSE('buildtools/wafsamba')
+@@ -32,12 +67,25 @@ def configure(conf):
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+ 
+-    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+-    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+-    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+-    conf.CHECK_HEADERS('shadow.h sys/acl.h')
+-    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++    conf.CHECK_HEADERS('shadow.h')
++    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++    if Options.options.enable_acl:
++        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++    if Options.options.enable_attr:
++        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++    if Options.options.enable_libaio:
++        conf.CHECK_HEADERS('libaio.h')
++
++    if Options.options.enable_libcap:
++        conf.CHECK_HEADERS('sys/capability.h')
++
+     conf.CHECK_HEADERS('port.h')
+     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -73,7 +121,9 @@ def configure(conf):
+ 
+     conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+ 
+-    conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++    if Options.options.enable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++
+     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+@@ -267,21 +317,21 @@ def configure(conf):
+     conf.CHECK_FUNCS('prctl dirname basename')
+ 
+     strlcpy_in_bsd = False
+-
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++    if Options.options.enable_libbsd:
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+                                checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++                strlcpy_in_bsd = True
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS('setproctitle_init'):
++            conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+ 
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+Index: talloc-2.1.11/wscript
+===================================================================
+--- talloc-2.1.11.orig/wscript
++++ talloc-2.1.11/wscript
+@@ -32,7 +32,12 @@ def set_options(opt):
+         opt.add_option('--enable-talloc-compat1',
+                        help=("Build talloc 1.x.x compat library [False]"),
+                        action="store_true", dest='TALLOC_COMPAT1', default=False)
+-
++        opt.add_option('--with-valgrind',
++                       help=("enable use of valgrind"),
++                       action="store_true", dest='enable_valgrind')
++        opt.add_option('--without-valgrind',
++                       help=("disable use of valgrind"),
++                       action="store_false", dest='enable_valgrind', default=False)
+ 
+ def configure(conf):
+     conf.RECURSE('lib/replace')
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/talloc-Add-configure-options-for-packages.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/talloc-Add-configure-options-for-packages.patch
deleted file mode 100644
index 46b2405..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc/talloc-Add-configure-options-for-packages.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From efc1b02144f23fdf84dbc5ff15307815e0f2a425 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Wed, 14 Sep 2016 11:11:35 +0800
-Subject: [PATCH] talloc: Add configure options for packages
-
-Add configure options for the following packages:
- - acl
- - attr
- - libaio
- - libbsd
- - libcap
- - valgrind
-
-Upstream-Status: Inappropriate [oe deterministic build specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- lib/replace/system/wscript_configure |  6 ++-
- lib/replace/wscript                  | 85 ++++++++++++++++++++++++++++--------
- wscript                              |  7 ++-
- 3 files changed, 79 insertions(+), 19 deletions(-)
-
-diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
-index 2035474..10f9ae7 100644
---- a/lib/replace/system/wscript_configure
-+++ b/lib/replace/system/wscript_configure
-@@ -1,6 +1,10 @@
- #!/usr/bin/env python
- 
--conf.CHECK_HEADERS('sys/capability.h')
-+import Options
-+
-+if Options.options.enable_libcap:
-+    conf.CHECK_HEADERS('sys/capability.h')
-+
- conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
- 
- # solaris varients of getXXent_r
-diff --git a/lib/replace/wscript b/lib/replace/wscript
-index fc43e1a..12d2a70 100644
---- a/lib/replace/wscript
-+++ b/lib/replace/wscript
-@@ -23,6 +23,41 @@ def set_options(opt):
-     opt.PRIVATE_EXTENSION_DEFAULT('')
-     opt.RECURSE('buildtools/wafsamba')
- 
-+    opt.add_option('--with-acl',
-+                   help=("Enable use of acl"),
-+                   action="store_true", dest='enable_acl')
-+    opt.add_option('--without-acl',
-+                   help=("Disable use of acl"),
-+                   action="store_false", dest='enable_acl', default=False)
-+
-+    opt.add_option('--with-attr',
-+                   help=("Enable use of attr"),
-+                   action="store_true", dest='enable_attr')
-+    opt.add_option('--without-attr',
-+                   help=("Disable use of attr"),
-+                   action="store_false", dest='enable_attr', default=False)
-+
-+    opt.add_option('--with-libaio',
-+                   help=("Enable use of libaio"),
-+                   action="store_true", dest='enable_libaio')
-+    opt.add_option('--without-libaio',
-+                   help=("Disable use of libaio"),
-+                   action="store_false", dest='enable_libaio', default=False)
-+
-+    opt.add_option('--with-libbsd',
-+                   help=("Enable use of libbsd"),
-+                   action="store_true", dest='enable_libbsd')
-+    opt.add_option('--without-libbsd',
-+                   help=("Disable use of libbsd"),
-+                   action="store_false", dest='enable_libbsd', default=False)
-+
-+    opt.add_option('--with-libcap',
-+                   help=("Enable use of libcap"),
-+                   action="store_true", dest='enable_libcap')
-+    opt.add_option('--without-libcap',
-+                   help=("Disable use of libcap"),
-+                   action="store_false", dest='enable_libcap', default=False)
-+
- @Utils.run_once
- def configure(conf):
-     conf.RECURSE('buildtools/wafsamba')
-@@ -32,12 +67,25 @@ def configure(conf):
-     conf.DEFINE('HAVE_LIBREPLACE', 1)
-     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
- 
--    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
--    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
-+    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
-+    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
-     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
--    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
--    conf.CHECK_HEADERS('shadow.h sys/acl.h')
--    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
-+    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
-+    conf.CHECK_HEADERS('shadow.h')
-+    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
-+
-+    if Options.options.enable_acl:
-+        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
-+
-+    if Options.options.enable_attr:
-+        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
-+
-+    if Options.options.enable_libaio:
-+        conf.CHECK_HEADERS('libaio.h')
-+
-+    if Options.options.enable_libcap:
-+        conf.CHECK_HEADERS('sys/capability.h')
-+
-     conf.CHECK_HEADERS('port.h')
-     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
-     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
-@@ -73,7 +121,9 @@ def configure(conf):
- 
-     conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
- 
--    conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+    if Options.options.enable_valgrind:
-+        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+
-     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
-     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
-     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
-@@ -248,17 +298,18 @@ def configure(conf):
- 
-     conf.CHECK_FUNCS('prctl dirname basename')
- 
--    # libbsd on some platforms provides strlcpy and strlcat
--    if not conf.CHECK_FUNCS('strlcpy strlcat'):
--        conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
--                checklibc=True)
--    if not conf.CHECK_FUNCS('getpeereid'):
--        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
--    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
--        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
--
--    if not conf.CHECK_FUNCS('closefrom'):
--        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
-+    if Options.options.enable_libbsd:
-+        # libbsd on some platforms provides strlcpy and strlcat
-+        if not conf.CHECK_FUNCS('strlcpy strlcat'):
-+            conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
-+                    checklibc=True)
-+        if not conf.CHECK_FUNCS('getpeereid'):
-+            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
-+        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
-+            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
-+
-+        if not conf.CHECK_FUNCS('closefrom'):
-+            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
- 
-     conf.CHECK_CODE('''
-                 struct ucred cred;
-diff --git a/wscript b/wscript
-index 41f3be7..556c1c8 100644
---- a/wscript
-+++ b/wscript
-@@ -35,7 +35,12 @@ def set_options(opt):
-         opt.add_option('--disable-python',
-                        help=("disable the pytalloc module"),
-                        action="store_true", dest='disable_python', default=False)
--
-+        opt.add_option('--with-valgrind',
-+                       help=("enable use of valgrind"),
-+                       action="store_true", dest='enable_valgrind')
-+        opt.add_option('--without-valgrind',
-+                       help=("disable use of valgrind"),
-+                       action="store_false", dest='enable_valgrind', default=False)
- 
- def configure(conf):
-     conf.RECURSE('lib/replace')
--- 
-2.8.3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.11.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.11.bb
new file mode 100644
index 0000000..848cf4d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.11.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://talloc.samba.org"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+LIC_FILES_CHKSUM = "file://talloc.h;beginline=3;endline=27;md5=a301712782cad6dd6d5228bfa7825249 \
+                    file://pytalloc.h;beginline=1;endline=18;md5=2c498cc6f2263672483237b20f46b43d"
+
+
+SRC_URI = "https://samba.org/ftp/talloc/talloc-${PV}.tar.gz \
+           file://options-2.1.10.patch \
+"
+SRC_URI[md5sum] = "452596f904ca2b10322bdaabf147a721"
+SRC_URI[sha256sum] = "639eb35556a0af999123c4d883e79be05ff9f00ab4f9e4ac2e5775f9c5eeeed3"
+
+inherit waf-samba
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
+
+S = "${WORKDIR}/talloc-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --disable-rpath-install \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --disable-silent-rules \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+
+PACKAGES += "pytalloc pytalloc-dbg pytalloc-dev"
+
+FILES_pytalloc = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
+                  ${libdir}/libpytalloc-util.so.2 \
+                  ${libdir}/libpytalloc-util.so.2.1.1 \
+                 "
+FILES_pytalloc-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
+                      ${libdir}/.debug/libpytalloc-util.so.2.1.1"
+FILES_pytalloc-dev = "${libdir}/libpytalloc-util.so"
+RDEPENDS_pytalloc = "python"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.9.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.9.bb
deleted file mode 100644
index d80af50..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.9.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
-HOMEPAGE = "http://talloc.samba.org"
-SECTION = "libs"
-LICENSE = "LGPL-3.0+ & GPL-3.0+"
-LIC_FILES_CHKSUM = "file://talloc.h;beginline=3;endline=27;md5=a301712782cad6dd6d5228bfa7825249 \
-                    file://pytalloc.h;beginline=1;endline=18;md5=2c498cc6f2263672483237b20f46b43d"
-
-
-SRC_URI = "https://samba.org/ftp/talloc/talloc-${PV}.tar.gz \
-           file://talloc-Add-configure-options-for-packages.patch \
-"
-SRC_URI[md5sum] = "19ba14eba97d79a169fa92ea824d2b9e"
-SRC_URI[sha256sum] = "f0aad4cb88a3322207c82136ddc07bed48a37c2c21f82962d6c5ccb422711062"
-
-inherit waf-samba
-
-PACKAGECONFIG ??= "\
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
-PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
-PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-
-SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
-
-S = "${WORKDIR}/talloc-${PV}"
-
-EXTRA_OECONF += "--disable-rpath \
-                 --disable-rpath-install \
-                 --bundled-libraries=NONE \
-                 --builtin-libraries=replace \
-                 --disable-silent-rules \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
-                "
-
-PACKAGES += "pytalloc pytalloc-dbg pytalloc-dev"
-
-FILES_pytalloc = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
-                  ${libdir}/libpytalloc-util.so.2 \
-                  ${libdir}/libpytalloc-util.so.2.1.1 \
-                 "
-FILES_pytalloc-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
-                      ${libdir}/.debug/libpytalloc-util.so.2.1.1"
-FILES_pytalloc-dev = "${libdir}/libpytalloc-util.so"
-RDEPENDS_pytalloc = "python"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.14.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.14.bb
deleted file mode 100644
index 3122b93..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.14.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "The tdb library"
-HOMEPAGE = "http://tdb.samba.org/"
-SECTION = "libs"
-LICENSE = "LGPL-3.0+ & GPL-3.0+"
-
-LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \
-                    file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6"
-
-SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
-           file://do-not-check-xsltproc-manpages.patch \
-           file://tdb-Add-configure-options-for-packages.patch \
-"
-
-SRC_URI[md5sum] = "dd23f2ba8ca2bfdcb833bc79d5b5ac6f"
-SRC_URI[sha256sum] = "3a7d4bb79229460df530c7e1c7067ba9fb9d370aa61fff537fdc2bdf918acbe9"
-
-PACKAGECONFIG ??= "\
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
-PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
-PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-
-S = "${WORKDIR}/tdb-${PV}"
-
-inherit waf-samba
-
-EXTRA_OECONF += "--disable-rpath \
-                 --bundled-libraries=NONE \
-                 --builtin-libraries=replace \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
-                "
-
-PACKAGES += "tdb-tools python-tdb python-tdb-dbg"
-
-FILES_${PN} = "${libdir}/*.so.*"
-FILES_tdb-tools = "${bindir}/*"
-FILES_python-tdb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
-FILES_python-tdb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
-RDEPENDS_python-tdb = "python"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.15.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.15.bb
new file mode 100644
index 0000000..302a306
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtdb/libtdb_1.3.15.bb
@@ -0,0 +1,44 @@
+SUMMARY = "The tdb library"
+HOMEPAGE = "http://tdb.samba.org/"
+SECTION = "libs"
+LICENSE = "LGPL-3.0+ & GPL-3.0+"
+
+LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c98f48018c4 \
+                    file://include/tdb.h;endline=27;md5=f5bb544641d3081821bcc1dd58310be6"
+
+SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
+           file://do-not-check-xsltproc-manpages.patch \
+           file://tdb-Add-configure-options-for-packages.patch \
+"
+
+SRC_URI[md5sum] = "60ece3996acc8d85b6f713199da971a6"
+SRC_URI[sha256sum] = "b4a1bf3833601bd9f10aff363cb750860aef9ce5b4617989239923192f946728"
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+S = "${WORKDIR}/tdb-${PV}"
+
+inherit waf-samba
+
+EXTRA_OECONF += "--disable-rpath \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                "
+
+PACKAGES += "tdb-tools python-tdb python-tdb-dbg"
+
+FILES_${PN} = "${libdir}/*.so.*"
+FILES_tdb-tools = "${bindir}/*"
+FILES_python-tdb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_python-tdb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
+RDEPENDS_python-tdb = "python"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
index 2fc5523..3589033 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/avoid-attr-unless-wanted.patch
@@ -1,20 +1,22 @@
---- a/lib/replace/wscript	2015-11-18 15:40:19.000000000 +0100
-+++ b/lib/replace/wscript	2015-11-18 15:48:09.000000000 +0100
-@@ -618,8 +618,6 @@
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 079761d..07e0104 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -793,8 +793,6 @@ def build(bld):
      if not bld.CONFIG_SET('HAVE_INET_ATON'):     REPLACE_SOURCE += ' inet_aton.c'
      if not bld.CONFIG_SET('HAVE_INET_NTOP'):     REPLACE_SOURCE += ' inet_ntop.c'
      if not bld.CONFIG_SET('HAVE_INET_PTON'):     REPLACE_SOURCE += ' inet_pton.c'
 -    if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'):
 -                                                 REPLACE_SOURCE += ' xattr.c'
  
-     bld.SAMBA_LIBRARY('replace',
-                       source=REPLACE_SOURCE,
-@@ -630,7 +628,7 @@
+     if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
+         REPLACE_SOURCE += ' closefrom.c'
+@@ -808,7 +806,7 @@ def build(bld):
                        # at the moment:
                        # hide_symbols=bld.BUILTIN_LIBRARY('replace'),
                        private_library=True,
 -                      deps='crypt dl nsl socket rt attr' + extra_libs)
 +                      deps='crypt dl nsl socket rt ' + extra_libs)
  
-     bld.SAMBA_SUBSYSTEM('replace-test',
-                       source='''test/testsuite.c test/strptime.c
+     replace_test_cflags="-Wno-format-zero-length"
+     if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch
new file mode 100644
index 0000000..363c586
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/options-0.9.36.patch
@@ -0,0 +1,176 @@
+From c3e2e4f89cf37b27609fd02ad67eb02d0015cc1e Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 21 Sep 2016 09:57:49 +0800
+Subject: [PATCH 1/1] tevent: Add configure options for packages
+
+Add configure options for the following packages:
+ - acl
+ - attr
+ - libaio
+ - libbsd
+ - libcap
+ - valgrind
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Modified to apply to version 0.9.33.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+---
+ lib/replace/wscript | 89 ++++++++++++++++++++++++++++++++++++++++-------------
+ wscript             |  7 ++++-
+ 2 files changed, 73 insertions(+), 23 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 2c638b7..079761d 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -23,6 +23,41 @@ def set_options(opt):
+     opt.PRIVATE_EXTENSION_DEFAULT('')
+     opt.RECURSE('buildtools/wafsamba')
+ 
++    opt.add_option('--with-acl',
++                   help=("Enable use of acl"),
++                   action="store_true", dest='enable_acl')
++    opt.add_option('--without-acl',
++                   help=("Disable use of acl"),
++                   action="store_false", dest='enable_acl', default=False)
++
++    opt.add_option('--with-attr',
++                   help=("Enable use of attr"),
++                   action="store_true", dest='enable_attr')
++    opt.add_option('--without-attr',
++                   help=("Disable use of attr"),
++                   action="store_false", dest='enable_attr', default=False)
++
++    opt.add_option('--with-libaio',
++                   help=("Enable use of libaio"),
++                   action="store_true", dest='enable_libaio')
++    opt.add_option('--without-libaio',
++                   help=("Disable use of libaio"),
++                   action="store_false", dest='enable_libaio', default=False)
++
++    opt.add_option('--with-libbsd',
++                   help=("Enable use of libbsd"),
++                   action="store_true", dest='enable_libbsd')
++    opt.add_option('--without-libbsd',
++                   help=("Disable use of libbsd"),
++                   action="store_false", dest='enable_libbsd', default=False)
++
++    opt.add_option('--with-libcap',
++                   help=("Enable use of libcap"),
++                   action="store_true", dest='enable_libcap')
++    opt.add_option('--without-libcap',
++                   help=("Disable use of libcap"),
++                   action="store_false", dest='enable_libcap', default=False)
++
+ @Utils.run_once
+ def configure(conf):
+     conf.RECURSE('buildtools/wafsamba')
+@@ -32,12 +67,25 @@ def configure(conf):
+     conf.DEFINE('HAVE_LIBREPLACE', 1)
+     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
+ 
+-    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
+-    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
++    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
++    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
+     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
+-    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
+-    conf.CHECK_HEADERS('shadow.h sys/acl.h')
+-    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
++    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
++    conf.CHECK_HEADERS('shadow.h')
++    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
++
++    if Options.options.enable_acl:
++        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
++
++    if Options.options.enable_attr:
++        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
++
++    if Options.options.enable_libaio:
++        conf.CHECK_HEADERS('libaio.h')
++
++    if Options.options.enable_libcap:
++        conf.CHECK_HEADERS('sys/capability.h')
++
+     conf.CHECK_HEADERS('port.h')
+     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
+     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
+@@ -101,7 +149,8 @@ def configure(conf):
+     conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
+     conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
+ 
+-    conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
++    if Options.options.enable_valgrind:
++        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
+     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+@@ -294,22 +343,18 @@ def configure(conf):
+ 
+     conf.CHECK_FUNCS('prctl dirname basename')
+ 
+-    strlcpy_in_bsd = False
+-
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    if not conf.CHECK_FUNCS('getpeereid'):
+-        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+-        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+-    if not conf.CHECK_FUNCS('setproctitle_init'):
+-        conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++    if Options.options.enable_libbsd:
++        # libbsd on some platforms provides strlcpy and strlcat
++        if not conf.CHECK_FUNCS('strlcpy strlcat'):
++            conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++                    checklibc=True)
++        if not conf.CHECK_FUNCS('getpeereid'):
++            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+ 
+-    if not conf.CHECK_FUNCS('closefrom'):
+-        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++        if not conf.CHECK_FUNCS('closefrom'):
++            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ 
+     conf.CHECK_CODE('''
+                 struct ucred cred;
+@@ -660,7 +705,7 @@ removeea setea
+     # look for a method of finding the list of network interfaces
+     for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+         bsd_for_strlcpy = ''
+-        if strlcpy_in_bsd:
++        if Options.options.enable_libbsd:
+             bsd_for_strlcpy = ' bsd'
+         if conf.CHECK_CODE('''
+                            #define %s 1
+diff --git a/wscript b/wscript
+index 94d190f..742f779 100644
+--- a/wscript
++++ b/wscript
+@@ -22,7 +22,12 @@ def set_options(opt):
+     opt.PRIVATE_EXTENSION_DEFAULT('tevent', noextension='tevent')
+     opt.RECURSE('lib/replace')
+     opt.RECURSE('lib/talloc')
+-
++    opt.add_option('--with-valgrind',
++                   help=("enable use of valgrind"),
++                   action="store_true", dest='enable_valgrind')
++    opt.add_option('--without-valgrind',
++                   help=("disable use of valgrind"),
++                   action="store_false", dest='enable_valgrind', default=False)
+ 
+ def configure(conf):
+     conf.RECURSE('lib/replace')
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/tevent-Add-configure-options-for-packages.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/tevent-Add-configure-options-for-packages.patch
deleted file mode 100644
index ddb8e4e..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent/tevent-Add-configure-options-for-packages.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From c00f6d35bdc06dffb54daa815e57b44210a5de04 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Wed, 21 Sep 2016 09:57:49 +0800
-Subject: [PATCH] tevent: Add configure options for packages
-
-Add configure options for the following packages:
- - acl
- - attr
- - libaio
- - libbsd
- - libcap
- - valgrind
-
-Upstream-Status: Inappropriate [oe deterministic build specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- lib/replace/system/wscript_configure |  6 ++-
- lib/replace/wscript                  | 85 ++++++++++++++++++++++++++++--------
- wscript                              |  7 ++-
- 3 files changed, 79 insertions(+), 19 deletions(-)
- mode change 100755 => 100644 wscript
-
-diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
-index 2035474..10f9ae7 100644
---- a/lib/replace/system/wscript_configure
-+++ b/lib/replace/system/wscript_configure
-@@ -1,6 +1,10 @@
- #!/usr/bin/env python
- 
--conf.CHECK_HEADERS('sys/capability.h')
-+import Options
-+
-+if Options.options.enable_libcap:
-+    conf.CHECK_HEADERS('sys/capability.h')
-+
- conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
- 
- # solaris varients of getXXent_r
-diff --git a/lib/replace/wscript b/lib/replace/wscript
-index fc43e1a..12d2a70 100644
---- a/lib/replace/wscript
-+++ b/lib/replace/wscript
-@@ -23,6 +23,41 @@ def set_options(opt):
-     opt.PRIVATE_EXTENSION_DEFAULT('')
-     opt.RECURSE('buildtools/wafsamba')
- 
-+    opt.add_option('--with-acl',
-+                   help=("Enable use of acl"),
-+                   action="store_true", dest='enable_acl')
-+    opt.add_option('--without-acl',
-+                   help=("Disable use of acl"),
-+                   action="store_false", dest='enable_acl', default=False)
-+
-+    opt.add_option('--with-attr',
-+                   help=("Enable use of attr"),
-+                   action="store_true", dest='enable_attr')
-+    opt.add_option('--without-attr',
-+                   help=("Disable use of attr"),
-+                   action="store_false", dest='enable_attr', default=False)
-+
-+    opt.add_option('--with-libaio',
-+                   help=("Enable use of libaio"),
-+                   action="store_true", dest='enable_libaio')
-+    opt.add_option('--without-libaio',
-+                   help=("Disable use of libaio"),
-+                   action="store_false", dest='enable_libaio', default=False)
-+
-+    opt.add_option('--with-libbsd',
-+                   help=("Enable use of libbsd"),
-+                   action="store_true", dest='enable_libbsd')
-+    opt.add_option('--without-libbsd',
-+                   help=("Disable use of libbsd"),
-+                   action="store_false", dest='enable_libbsd', default=False)
-+
-+    opt.add_option('--with-libcap',
-+                   help=("Enable use of libcap"),
-+                   action="store_true", dest='enable_libcap')
-+    opt.add_option('--without-libcap',
-+                   help=("Disable use of libcap"),
-+                   action="store_false", dest='enable_libcap', default=False)
-+
- @Utils.run_once
- def configure(conf):
-     conf.RECURSE('buildtools/wafsamba')
-@@ -32,12 +67,25 @@ def configure(conf):
-     conf.DEFINE('HAVE_LIBREPLACE', 1)
-     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
- 
--    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
--    conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
-+    conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
-+    conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
-     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
--    conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
--    conf.CHECK_HEADERS('shadow.h sys/acl.h')
--    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
-+    conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
-+    conf.CHECK_HEADERS('shadow.h')
-+    conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
-+
-+    if Options.options.enable_acl:
-+        conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
-+
-+    if Options.options.enable_attr:
-+        conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
-+
-+    if Options.options.enable_libaio:
-+        conf.CHECK_HEADERS('libaio.h')
-+
-+    if Options.options.enable_libcap:
-+        conf.CHECK_HEADERS('sys/capability.h')
-+
-     conf.CHECK_HEADERS('port.h')
-     conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
-     conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
-@@ -73,7 +121,9 @@ def configure(conf):
- 
-     conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
- 
--    conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+    if Options.options.enable_valgrind:
-+        conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+
-     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
-     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
-     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
-@@ -248,17 +298,18 @@ def configure(conf):
- 
-     conf.CHECK_FUNCS('prctl dirname basename')
- 
--    # libbsd on some platforms provides strlcpy and strlcat
--    if not conf.CHECK_FUNCS('strlcpy strlcat'):
--        conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
--                checklibc=True)
--    if not conf.CHECK_FUNCS('getpeereid'):
--        conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
--    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
--        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
--
--    if not conf.CHECK_FUNCS('closefrom'):
--        conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
-+    if Options.options.enable_libbsd:
-+        # libbsd on some platforms provides strlcpy and strlcat
-+        if not conf.CHECK_FUNCS('strlcpy strlcat'):
-+            conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
-+                    checklibc=True)
-+        if not conf.CHECK_FUNCS('getpeereid'):
-+            conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
-+        if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
-+            conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
-+
-+        if not conf.CHECK_FUNCS('closefrom'):
-+            conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
- 
-     conf.CHECK_CODE('''
-                 struct ucred cred;
-diff --git a/wscript b/wscript
-old mode 100755
-new mode 100644
-index 71b9475..50793db
---- a/wscript
-+++ b/wscript
-@@ -26,7 +26,12 @@ def set_options(opt):
-         opt.add_option('--disable-python',
-                        help=("disable the pytevent module"),
-                        action="store_true", dest='disable_python', default=False)
--
-+        opt.add_option('--with-valgrind',
-+                       help=("enable use of valgrind"),
-+                       action="store_true", dest='enable_valgrind')
-+        opt.add_option('--without-valgrind',
-+                       help=("disable use of valgrind"),
-+                       action="store_false", dest='enable_valgrind', default=False)
- 
- def configure(conf):
-     conf.RECURSE('lib/replace')
--- 
-2.8.3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.31.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.31.bb
deleted file mode 100644
index ad711e7..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.31.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
-HOMEPAGE = "http://tevent.samba.org"
-SECTION = "libs"
-LICENSE = "LGPLv3+"
-
-DEPENDS += "libtalloc"
-RDEPENDS_python-tevent = "python"
-
-SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \
-           file://tevent-Add-configure-options-for-packages.patch \
-"
-LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a"
-
-SRC_URI[md5sum] = "5453847664ae6bc4ec0153e59ac635b9"
-SRC_URI[sha256sum] = "4a13f2256ad804c860e84068258bd0f8be31cf0c79aa8f3019fa32f6928c2bfc"
-
-inherit waf-samba
-
-PACKAGECONFIG ??= "\
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
-PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
-PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-
-SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
-
-S = "${WORKDIR}/tevent-${PV}"
-
-EXTRA_OECONF += "--disable-rpath \
-                 --bundled-libraries=NONE \
-                 --builtin-libraries=replace \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
-                 --without-gettext \
-                "
-
-PACKAGES += "python-tevent python-tevent-dbg"
-
-FILES_python-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
-FILES_python-tevent-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.36.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.36.bb
new file mode 100644
index 0000000..c91b221
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/libtevent/libtevent_0.9.36.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
+HOMEPAGE = "http://tevent.samba.org"
+SECTION = "libs"
+LICENSE = "LGPLv3+"
+
+DEPENDS += "libtalloc libtirpc"
+RDEPENDS_python-tevent = "python"
+
+SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \
+           file://options-0.9.36.patch \
+"
+LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a"
+
+SRC_URI[md5sum] = "87d67bca75b231814435c47bec0aff8a"
+SRC_URI[sha256sum] = "bd2b6be3fd1601ed7f176e99111e322c57d58e425cc149ee80c7dd4fed263b4c"
+
+inherit waf-samba
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
+PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', '', 'file://avoid-attr-unless-wanted.patch', d)}"
+
+S = "${WORKDIR}/tevent-${PV}"
+
+EXTRA_OECONF += "--disable-rpath \
+                 --bundled-libraries=NONE \
+                 --builtin-libraries=replace \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
+                 --without-gettext \
+                "
+
+PACKAGES += "python-tevent python-tevent-dbg"
+
+FILES_python-tevent = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_python-tevent-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb
index 11c43ff..121cc99 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb
@@ -8,22 +8,19 @@
     file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e \
 "
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/lksctp/${BP}.tar.gz \
+SRCREV = "736b91d340e3f2519714f2930ed63b164d363511"
+
+PV .= "+git${SRCPV}"
+LK_REL = "1.0.17"
+
+SRC_URI = " \
+    git://github.com/sctp/lksctp-tools.git \
     file://run-ptest \
     file://v4test.sh \
     file://v6test.sh \
 "
 
-SRC_URI[md5sum] = "68e9b8fa4d4e331029b247b72d46d7a5"
-SRC_URI[sha256sum] = "1aeb204cdb2befc94d9eb3037d1609c9d1d2cd5379d6dd2c0a8ca9b10533aa15"
-
-#| arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc  -march=armv5te -marm -mthumb-interwork --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm -shared  -fPIC -DPIC  .libs/bindx.o .libs/connectx.o .libs/peeloff.o .libs/opt_info.o .libs/addrs.o .libs/sendmsg.o .libs/recvmsg.o    -march=armv5te -marm -mthumb-interwork --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm -O2 -Wl,--version-script=/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/lksctp-tools/1.0.16-r0/lksctp-tools-1.0.16/src/lib/Versions.map -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed   -Wl,-soname -Wl,libsctp.so.1 -o .libs/libsctp.so.1.0.16
-#| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.0/ld: error: symbol sctp_connectx has undefined version
-#| collect2: error: ld returned 1 exit status
-#| make[4]: *** [libsctp.la] Error 1
-PNBLACKLIST[lksctp-tools] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "BROKEN: fails to link against sctp_connectx symbol", '', d)}"
-
-S = "${WORKDIR}/${BP}"
+S = "${WORKDIR}/git"
 
 BBCLASSEXTEND = "native"
 
@@ -37,7 +34,7 @@
     done
 }
 
-SOLIBVERSION="${PV}"
+SOLIBVERSION="${LK_REL}"
 SOLIBMAJORVERSION="1"
 
 PACKAGES =+ "${PN}-withsctp ${PN}-utils"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
new file mode 100644
index 0000000..493832b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
@@ -0,0 +1,30 @@
+From f017353b8f3170ce79e7addc127056c0142f087b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 1 Apr 2018 14:31:05 -0700
+Subject: [PATCH] coordinator: Fix strncpy range warning
+
+Fixes
+error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/coordinator.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/coordinator.c b/src/coordinator.c
+index c139aae..ca49418 100644
+--- a/src/coordinator.c
++++ b/src/coordinator.c
+@@ -296,7 +296,8 @@ int main(int argc, char **argv)
+ 	if(!lease_file)
+ 		lease_file = LEASE_FILE;
+ 
+-	strncpy(pname, argv[0], PATH_MAX);
++	strncpy(pname, argv[0], PATH_MAX - 1);
++	pname[PATH_MAX - 1] = '\0';
+ 
+ 	pid_file = getenv("PID_FILE");
+ 	if (!pid_file)
+-- 
+2.16.3
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
index be73f8a..d0fe59c 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -8,14 +8,15 @@
 DEPENDS = "flex-native bison-native libnl python"
 
 PV = "0.3.1+git${SRCPV}"
-SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \
+SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
            file://no-help2man.patch \
            file://0001-Fix-build-errors-with-clang.patch \
            file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
            file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
            file://0001-Remove-newline-from-format-line.patch \
+           file://0001-coordinator-Fix-strncpy-range-warning.patch \
            "
-SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733"
+SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
index 48a83b8..cebc1d9 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
@@ -20,8 +20,12 @@
 EXTRA_OECONF += "PERL=${USRBINPATH}/perl"
 
 LDFLAGS += "-fuse-ld=gold"
+LDFLAGS_remove_riscv64 = "-fuse-ld=gold"
+
 TOOLCHAIN = "gcc"
 
+USE_NLS = "yes"
+
 do_configure_prepend() {
     cp ${STAGING_DATADIR_NATIVE}/gettext/gettext.h ${S}/include
     ${S}/autogen.sh
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb
new file mode 100644
index 0000000..3ccd486
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "HTTP/2 C Library and tools"
+HOMEPAGE = "https://nghttp2.org/"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec"
+
+SRC_URI = "https://github.com/nghttp2/nghttp2/releases/download/v${PV}/nghttp2-${PV}.tar.bz2"
+SRC_URI[md5sum] = "926f07ad3b50f38f7d8935ced04716cf"
+SRC_URI[sha256sum] = "0df4229f4123b5aa96e834ebcfdffe954e93d986f0252fd10123d50c6f010983"
+
+DEPENDS = "libxml2 openssl zlib jansson cunit c-ares"
+
+inherit cmake pythonnative python-dir
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
index e027a1c..200eaf7 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/nis.inc
@@ -27,5 +27,5 @@
 python () {
     os = d.getVar("TARGET_OS", True)
     if os == "linux-uclibc":
-        raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
+        raise bb.parse.SkipRecipe("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
 }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch
deleted file mode 100644
index 3d4d4f2..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 420cb6927553bbca5b49b7681cf208e6df6e4d7c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Sep 2017 08:42:45 -0700
-Subject: [PATCH 1/2] ypbind3_binding_dup.c: Include string.h for strdup
- declaration
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- lib/ypbind3_binding_dup.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/ypbind3_binding_dup.c b/lib/ypbind3_binding_dup.c
-index ce4aadf..8199c0b 100644
---- a/lib/ypbind3_binding_dup.c
-+++ b/lib/ypbind3_binding_dup.c
-@@ -19,6 +19,7 @@
- 
- #if defined(HAVE_YPBIND3)
- 
-+#include <string.h>
- #include <rpcsvc/yp_prot.h>
- #include "internal.h"
- 
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch
deleted file mode 100644
index 0562e58..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 03ccabb6264c008430c4b1739351df5a63829f8e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Sep 2017 08:52:32 -0700
-Subject: [PATCH 2/2] yp_dump_bindings.c: Include string.h for memset
-
-Fixes
-error: implicitly declaring library function 'memset'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- src/yp_dump_binding.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/yp_dump_binding.c b/src/yp_dump_binding.c
-index a5ab920..d75e2c2 100644
---- a/src/yp_dump_binding.c
-+++ b/src/yp_dump_binding.c
-@@ -26,6 +26,7 @@
- #include <libintl.h>
- #include <locale.h>
- #include <getopt.h>
-+#include <string.h>
- #include <sys/stat.h>
- #include <arpa/inet.h>
- #include <rpcsvc/ypclnt.h>
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb
deleted file mode 100644
index 9ac9738..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-# This package builds tools to manage NIS
-# The source package is utils/net/NIS/yp-tools
-#
-require nis.inc
-
-SUMMARY = "NIS client programs"
-DESCRIPTION = " \
-Network Information Service tools.  \
-This package contains ypcat, ypmatch, ypset, \
-ypwhich, yppasswd, domainname, nisdomainname \
-and ypdomainname. \
-"
-
-SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
-           file://domainname.service \
-           file://0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch \
-           file://0002-yp_dump_bindings.c-Include-string.h-for-memset.patch \
-           "
-SRC_URI[md5sum] = "fb4a8bffb44ae5d3390351d67f320ef3"
-SRC_URI[sha256sum] = "137f19a986382b275bf4a2b1a69eb26689d6f4ac056ddaa21784d6b80eb98faa"
-
-DEPENDS = "libtirpc libnsl2"
-
-inherit autotools systemd
-SYSTEMD_SERVICE_${PN} = "domainname.service"
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-
-CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
-
-EXTRA_OECONF = " \
-                --disable-rpath --disable-domainname \
-               "
-CFLAGS_append_libc-musl = " -Wno-error=cpp"
-
-FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
-FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
-FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
-FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
-
-do_install_append() {
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
-}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
new file mode 100644
index 0000000..4e27e32
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
@@ -0,0 +1,47 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+require nis.inc
+
+SUMMARY = "NIS client programs"
+DESCRIPTION = " \
+Network Information Service tools.  \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname. \
+"
+
+# v4.2.3
+SRCREV = "1bfda29c342a81b97cb1995ffd9e8da5de63e7ab"
+
+SRC_URI = "git://github.com/thkukuk/yp-tools \
+           file://domainname.service \
+           "
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libtirpc libnsl2"
+
+inherit autotools systemd
+SYSTEMD_SERVICE_${PN} = "domainname.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
+
+EXTRA_OECONF = " \
+                --disable-rpath --disable-domainname \
+               "
+CFLAGS_append_libc-musl = " -Wno-error=cpp"
+
+FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
+FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
+FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
+FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
+
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
+}
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
index 527ea33..a749b16 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntimed/ntimed_git.bb
@@ -6,7 +6,7 @@
 SECTION = "net"
 
 LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://main.c;startline=2;endline=24;md5=eda11d21005319bb76cbb6f911f0f66d"
+LIC_FILES_CHKSUM = "file://main.c;beginline=2;endline=24;md5=89db8e76f2951f3fad167e7aa9718a44"
 
 SRC_URI = "git://github.com/bsdphk/Ntimed \
            file://use-ldflags.patch"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
index cb1e2f7..d45b7e3 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch
@@ -1,6 +1,16 @@
---- a/include/ntp_syscall.h.orig	2009-05-19 16:44:55.048156467 -0400
-+++ b/include/ntp_syscall.h	2009-05-19 16:46:19.293323686 -0400
-@@ -14,6 +14,14 @@
+From 2310898533f059d875dcffd26ab6cf1b280292fd Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 12 Jan 2011 21:38:46 +0100
+
+---
+ include/ntp_syscall.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/include/ntp_syscall.h b/include/ntp_syscall.h
+index d1ce03e..9e18432 100644
+--- a/include/ntp_syscall.h
++++ b/include/ntp_syscall.h
+@@ -10,6 +10,14 @@
  # include <sys/timex.h>
  #endif
  
@@ -13,5 +23,5 @@
 +#endif
 +
  #ifndef NTP_SYSCALLS_LIBC
- #ifdef NTP_SYSCALLS_STD
- # define ntp_adjtime(t)		syscall(SYS_ntp_adjtime, (t))
+ # ifdef NTP_SYSCALLS_STD
+ #  define ntp_adjtime(t)	syscall(SYS_ntp_adjtime, (t))
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb
deleted file mode 100644
index 719c60b..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p10.bb
+++ /dev/null
@@ -1,170 +0,0 @@
-SUMMARY = "Network Time Protocol daemon and utilities"
-DESCRIPTION = "The Network Time Protocol (NTP) is used to \
-synchronize the time of a computer client or server to \
-another server or reference time source, such as a radio \
-or satellite receiver or modem."
-HOMEPAGE = "http://support.ntp.org"
-SECTION = "net"
-LICENSE = "NTP"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=e877a1d567a6a58996d2b66e3e387003"
-
-DEPENDS = "libevent"
-
-SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
-           file://ntp-4.2.4_p6-nano.patch \
-           file://ntpd \
-           file://ntp.conf \
-           file://ntpdate \
-           file://ntpdate.default \
-           file://ntpdate.service \
-           file://ntpd.service \
-           file://sntp.service \
-           file://sntp \
-           file://ntpd.list \
-"
-
-SRC_URI[md5sum] = "745384ed0dedb3f66b33fe84d66466f9"
-SRC_URI[sha256sum] = "ddd2366e64219b9efa0f7438e06800d0db394ac5c88e13c17b70d0dcdf99b99f"
-
-inherit autotools update-rc.d useradd systemd pkgconfig
-
-# The ac_cv_header_readline_history is to stop ntpdc depending on either
-# readline or curses
-EXTRA_OECONF += "--with-net-snmp-config=no \
-                 --without-ntpsnmpd \
-                 ac_cv_header_readline_history_h=no \
-                 --with-yielding_select=yes \
-                 --with-locfile=redhat \
-                 --without-rpath \
-                 "
-CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
-
-USERADD_PACKAGES = "${PN}"
-NTP_USER_HOME ?= "/var/lib/ntp"
-USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \
-                       --no-create-home \
-                       --shell /bin/false --user-group ntp"
-
-# NB: debug is default-enabled by NTP; keep it default-enabled here.
-PACKAGECONFIG ??= "cap debug refclocks openssl \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-"
-PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
-                          --with-openssl-incdir=${STAGING_INCDIR} \
-                          --with-crypto, \
-                          --without-openssl --without-crypto, \
-                          openssl"
-PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
-PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
-PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools"
-PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
-PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-do_install_append() {
-    install -d ${D}${sysconfdir}/init.d
-    install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
-    install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
-    install -d ${D}${bindir}
-    install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
-
-    install -m 755 -d ${D}${NTP_USER_HOME}
-    chown ntp:ntp ${D}${NTP_USER_HOME}
-
-    # Fix hardcoded paths in scripts
-    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
-    sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
-    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
-    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
-    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
-    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace
-    sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace
-    sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait
-    sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait
-    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj
-    sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj
-
-    install -d ${D}/${sysconfdir}/default
-    install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
-    install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/
-
-    install -d ${D}/${sysconfdir}/network/if-up.d
-    ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
-    install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
-    install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/
-
-    install -d ${D}${systemd_unitdir}/ntp-units.d
-    install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list
-
-    # Remove an empty libexecdir.
-    rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
-}
-
-PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils"
-# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
-
-# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
-# with wonky clocks (e.g. OpenSlug)
-RDEPENDS_${PN} = "${PN}-tickadj"
-# Handle move from bin to utils package
-RPROVIDES_${PN}-utils = "${PN}-bin"
-RREPLACES_${PN}-utils = "${PN}-bin"
-RCONFLICTS_${PN}-utils = "${PN}-bin"
-
-SYSTEMD_PACKAGES = "${PN} ntpdate sntp"
-SYSTEMD_SERVICE_${PN} = "ntpd.service"
-SYSTEMD_SERVICE_ntpdate = "ntpdate.service"
-SYSTEMD_SERVICE_sntp = "sntp.service"
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-
-RPROVIDES_ntpdate += "ntpdate-systemd"
-RREPLACES_ntpdate += "ntpdate-systemd"
-RCONFLICTS_ntpdate += "ntpdate-systemd"
-
-RSUGGESTS_${PN} = "iana-etc"
-
-FILES_${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \
-    ${NTP_USER_HOME} \
-    ${systemd_unitdir}/ntp-units.d/60-ntpd.list ${libexecdir}\
-"
-FILES_${PN}-tickadj = "${sbindir}/tickadj"
-FILES_${PN}-utils = "${sbindir} ${datadir}/ntp/lib"
-RDEPENDS_${PN}-utils += "perl"
-FILES_ntpdate = "${sbindir}/ntpdate \
-    ${sysconfdir}/network/if-up.d/ntpdate-sync \
-    ${bindir}/ntpdate-sync \
-    ${sysconfdir}/default/ntpdate \
-    ${systemd_unitdir}/system/ntpdate.service \
-"
-FILES_sntp = "${sbindir}/sntp \
-              ${sysconfdir}/default/sntp \
-              ${systemd_unitdir}/system/sntp.service \
-             "
-
-CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
-CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
-
-INITSCRIPT_NAME = "ntpd"
-# No dependencies, so just go in at the standard level (20)
-INITSCRIPT_PARAMS = "defaults"
-
-pkg_postinst_ntpdate() {
-    if ! grep -q -s ntpdate $D/var/spool/cron/root; then
-        echo "adding crontab"
-        test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron
-        echo "30 * * * *    ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root
-    fi
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "ntpd"
-ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p11.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p11.bb
new file mode 100644
index 0000000..c698fa0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ntp/ntp_4.2.8p11.bb
@@ -0,0 +1,172 @@
+SUMMARY = "Network Time Protocol daemon and utilities"
+DESCRIPTION = "The Network Time Protocol (NTP) is used to \
+synchronize the time of a computer client or server to \
+another server or reference time source, such as a radio \
+or satellite receiver or modem."
+HOMEPAGE = "http://support.ntp.org"
+SECTION = "net"
+LICENSE = "NTP"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=e877a1d567a6a58996d2b66e3e387003"
+
+DEPENDS = "libevent"
+
+SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
+           file://ntp-4.2.4_p6-nano.patch \
+           file://ntpd \
+           file://ntp.conf \
+           file://ntpdate \
+           file://ntpdate.default \
+           file://ntpdate.service \
+           file://ntpd.service \
+           file://sntp.service \
+           file://sntp \
+           file://ntpd.list \
+"
+
+SRC_URI[md5sum] = "00950ca2855579541896513e78295361"
+SRC_URI[sha256sum] = "f14a39f753688252d683ff907035ffff106ba8d3db21309b742e09b5c3cd278e"
+
+inherit autotools update-rc.d useradd systemd pkgconfig
+
+# The ac_cv_header_readline_history is to stop ntpdc depending on either
+# readline or curses
+EXTRA_OECONF += "--with-net-snmp-config=no \
+                 --without-ntpsnmpd \
+                 ac_cv_header_readline_history_h=no \
+                 --with-yielding_select=yes \
+                 --with-locfile=redhat \
+                 --without-rpath \
+                 "
+CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
+
+USERADD_PACKAGES = "${PN}"
+NTP_USER_HOME ?= "/var/lib/ntp"
+USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \
+                       --no-create-home \
+                       --shell /bin/false --user-group ntp"
+
+# NB: debug is default-enabled by NTP; keep it default-enabled here.
+PACKAGECONFIG ??= "cap debug refclocks openssl \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
+                          --with-openssl-incdir=${STAGING_INCDIR} \
+                          --with-crypto, \
+                          --without-openssl --without-crypto, \
+                          openssl"
+PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
+PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
+PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools"
+PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
+PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/init.d
+    install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
+    install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
+    install -d ${D}${bindir}
+    install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
+
+    install -m 755 -d ${D}${NTP_USER_HOME}
+    chown ntp:ntp ${D}${NTP_USER_HOME}
+
+    # Fix hardcoded paths in scripts
+    sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+    sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
+    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace
+    sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace
+    sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait
+    sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait
+    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj
+    sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj
+
+    install -d ${D}/${sysconfdir}/default
+    install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
+    install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/
+
+    install -d ${D}/${sysconfdir}/network/if-up.d
+    ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/
+
+    install -d ${D}${systemd_unitdir}/ntp-units.d
+    install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list
+
+    # Remove an empty libexecdir.
+    rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
+}
+
+PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils"
+# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
+
+# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
+# with wonky clocks (e.g. OpenSlug)
+RDEPENDS_${PN} = "${PN}-tickadj"
+# ntpd require libgcc for execution
+RDEPENDS_${PN} += "libgcc"
+# Handle move from bin to utils package
+RPROVIDES_${PN}-utils = "${PN}-bin"
+RREPLACES_${PN}-utils = "${PN}-bin"
+RCONFLICTS_${PN}-utils = "${PN}-bin"
+
+SYSTEMD_PACKAGES = "${PN} ntpdate sntp"
+SYSTEMD_SERVICE_${PN} = "ntpd.service"
+SYSTEMD_SERVICE_ntpdate = "ntpdate.service"
+SYSTEMD_SERVICE_sntp = "sntp.service"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+
+RPROVIDES_ntpdate += "ntpdate-systemd"
+RREPLACES_ntpdate += "ntpdate-systemd"
+RCONFLICTS_ntpdate += "ntpdate-systemd"
+
+RSUGGESTS_${PN} = "iana-etc"
+
+FILES_${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \
+    ${NTP_USER_HOME} \
+    ${systemd_unitdir}/ntp-units.d/60-ntpd.list ${libexecdir}\
+"
+FILES_${PN}-tickadj = "${sbindir}/tickadj"
+FILES_${PN}-utils = "${sbindir} ${datadir}/ntp/lib"
+RDEPENDS_${PN}-utils += "perl"
+FILES_ntpdate = "${sbindir}/ntpdate \
+    ${sysconfdir}/network/if-up.d/ntpdate-sync \
+    ${bindir}/ntpdate-sync \
+    ${sysconfdir}/default/ntpdate \
+    ${systemd_unitdir}/system/ntpdate.service \
+"
+FILES_sntp = "${sbindir}/sntp \
+              ${sysconfdir}/default/sntp \
+              ${systemd_unitdir}/system/sntp.service \
+             "
+
+CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
+CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
+
+INITSCRIPT_NAME = "ntpd"
+# No dependencies, so just go in at the standard level (20)
+INITSCRIPT_PARAMS = "defaults"
+
+pkg_postinst_ntpdate() {
+    if ! grep -q -s ntpdate $D/var/spool/cron/root; then
+        echo "adding crontab"
+        test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron
+        echo "30 * * * *    ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root
+    fi
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "ntpd"
+ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
index cc2959e..abfa7510 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/open-isns/open-isns_0.97.bb
@@ -11,7 +11,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=321bf41f280cf805086dd5a720b37785"
 SECTION = "net"
 
-DEPENDS = "openssl systemd"
+DEPENDS = "openssl"
 
 SRC_URI = "git://github.com/open-iscsi/open-isns \
            file://0001-util.h-endian.h-is-available-on-musl-on-linux.patch \
@@ -21,9 +21,7 @@
 
 S = "${WORKDIR}/git"
 
-inherit systemd autotools-brokensep distro_features_check
-# depends on systemd
-REQUIRED_DISTRO_FEATURES = "systemd"
+inherit systemd autotools-brokensep update-rc.d
 
 EXTRA_OECONF = " --prefix=${prefix} --enable-shared"
 EXTRA_OEMAKE += "SYSTEMDDIR=${D}${systemd_unitdir}/system"
@@ -31,6 +29,12 @@
 do_install_append () {
     oe_runmake INCDIR=${D}${includedir}/libisns/ install_hdrs
     oe_runmake LIBDIR=${D}${libdir} install_lib
+
+    install -D -m 755 ${S}/etc/openisns.init ${D}${sysconfdir}/init.d/openisns
+    sed -i 's|daemon isnsd|start-stop-daemon --start --quiet --oknodo --exec ${sbindir}/isnsd --|' \
+        ${D}${sysconfdir}/init.d/openisns
 }
 
 FILES_${PN} += "${libdir} ${systemd_unitdir}"
+
+INITSCRIPT_NAME = "openisns"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
index 9a568b2..449142f 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
@@ -8,11 +8,11 @@
     
     Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
 
-diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am
-index 92d6e83..f6039f9 100644
---- a/cmdlang/Makefile.am
-+++ b/cmdlang/Makefile.am
-@@ -36,6 +36,7 @@ CLEANFILES = libOpenIPMIcmdlang.map
+Index: OpenIPMI-2.0.24/cmdlang/Makefile.am
+===================================================================
+--- OpenIPMI-2.0.24.orig/cmdlang/Makefile.am
++++ OpenIPMI-2.0.24/cmdlang/Makefile.am
+@@ -35,6 +35,7 @@ openipmish_LDADD =  libOpenIPMIcmdlang.l
  # compatability.
  install-data-local:
  	rm -f $(DESTDIR)$(bindir)/ipmish
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
index 58ec5d8..082511a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openipmi/files/include_sys_types.patch
@@ -3,10 +3,10 @@
 ui.c:340:5: error: unknown type name 'u_int32_t'; did you mean 'uint32_t'?
      u_int32_t     addr;
      ^~~~~~~~~
-Index: OpenIPMI-2.0.22/ui/ui.c
+Index: OpenIPMI-2.0.24/ui/ui.c
 ===================================================================
---- OpenIPMI-2.0.22.orig/ui/ui.c
-+++ OpenIPMI-2.0.22/ui/ui.c
+--- OpenIPMI-2.0.24.orig/ui/ui.c
++++ OpenIPMI-2.0.24/ui/ui.c
 @@ -42,6 +42,7 @@
  #include <fcntl.h>
  #include <time.h>
@@ -14,4 +14,4 @@
 +#include <sys/types.h>
  #include <ctype.h>
  
- #include <OpenIPMI/selector.h>
+ #include <OpenIPMI/ipmi_err.h>
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.3.bb
deleted file mode 100644
index 90097f3..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.3.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-SUMMARY = "A full-featured SSL VPN solution via tun device."
-HOMEPAGE = "http://openvpn.sourceforge.net"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9b64491ec98eb6c6493ac5e4118f107"
-DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-inherit autotools systemd
-
-SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
-           file://openvpn \
-           file://openvpn@.service \
-           file://openvpn-volatile.conf"
-
-SRC_URI[md5sum] = "e1929f82aff40f3d105e5f72aacff9c1"
-SRC_URI[sha256sum] = "cee3d3ca462960a50a67c0ebd186e01b6d13db70275205663695152c9aca8579"
-
-SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-CFLAGS += "-fno-inline"
-
-# I want openvpn to be able to read password from file (hrw)
-EXTRA_OECONF += "--enable-iproute2"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
-
-# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
-EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
-
-do_install_append() {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
-
-    install -d ${D}/${sysconfdir}/openvpn
-    install -d ${D}/${sysconfdir}/openvpn/sample
-    install -m 755 ${S}/sample/sample-config-files/loopback-server  ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
-    install -m 755 ${S}/sample/sample-config-files/loopback-client  ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
-    install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
-    install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
-
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
-
-        install -d ${D}/${localstatedir}
-        install -d ${D}/${localstatedir}/lib
-        install -d -m 710 ${D}/${localstatedir}/lib/openvpn
-
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
-        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
-    fi
-}
-
-PACKAGES =+ " ${PN}-sample "
-
-RRECOMMENDS_${PN} = "kernel-module-tun"
-
-FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
-FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \
-                ${sysconfdir}/tmpfiles.d \
-               "
-FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
-                       ${systemd_unitdir}/system/openvpn@loopback-client.service \
-                       ${sysconfdir}/openvpn/sample/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.4.bb
new file mode 100644
index 0000000..4cad998
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.4.4.bb
@@ -0,0 +1,67 @@
+SUMMARY = "A full-featured SSL VPN solution via tun device."
+HOMEPAGE = "http://openvpn.sourceforge.net"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9b64491ec98eb6c6493ac5e4118f107"
+DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+inherit autotools systemd
+
+SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
+           file://openvpn \
+           file://openvpn@.service \
+           file://openvpn-volatile.conf"
+
+SRC_URI[md5sum] = "705a79d005558d94fa1e2b74e4413e97"
+SRC_URI[sha256sum] = "1ae883d9522c9fa6d189e5e4aaa058a93edd3d0b897e3c2664107c4785099fc3"
+
+SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+CFLAGS += "-fno-inline"
+
+# I want openvpn to be able to read password from file (hrw)
+EXTRA_OECONF += "--enable-iproute2"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
+
+# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
+EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
+
+    install -d ${D}/${sysconfdir}/openvpn
+    install -d ${D}/${sysconfdir}/openvpn/sample
+    install -m 755 ${S}/sample/sample-config-files/loopback-server  ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
+    install -m 755 ${S}/sample/sample-config-files/loopback-client  ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
+    install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
+    install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
+
+        install -d ${D}/${localstatedir}
+        install -d ${D}/${localstatedir}/lib
+        install -d -m 710 ${D}/${localstatedir}/lib/openvpn
+
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+    fi
+}
+
+PACKAGES =+ " ${PN}-sample "
+
+RRECOMMENDS_${PN} = "kernel-module-tun"
+
+FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
+FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \
+                ${sysconfdir}/tmpfiles.d \
+               "
+FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
+                       ${systemd_unitdir}/system/openvpn@loopback-client.service \
+                       ${sysconfdir}/openvpn/sample/"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch
new file mode 100644
index 0000000..e087bc7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp/ssmtp-bug584162-fix.patch
@@ -0,0 +1,126 @@
+Bug-Debian: http://bugs.debian.org/584162
+Reported-By: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Forwarded: not-needed
+Reviewed-By: Anibal Monsalve Salazar <anibal@debian.org>
+Last-Update: 2014-08-15
+
+From: "Daniel Richard G." <skunk@iSKUNK.ORG>
+Subject: Re: ssmtp: Partial loss of message body, sending message to wrong recipicients
+Date: Thu, 19 Jun 2014 14:44:30 -0400
+
+Attached is a patch against the original 2.64 source that should address
+this bug, and hopefully not break anything. An overview of my changes:
+
+* Added code to standarise() to drop the trailing '\r' if the line
+  originally ended with "\r\n".
+
+* Added a check to header_parse() that effectively converts an "\r\n" in
+  the input into '\n'.
+
+* Added a conditional so that header_parse() doesn't pass the empty
+  string to header_save()---a behavior I observed in testing, at the end
+  of a header block with "\r\n" line endings.
+
+* Simplified the last if(in_header) conditional in header_parse(),
+  because it erroneously assumes that if in_header == True, then c could
+  have some value other than EOF. (See the condition on the previous
+  "while" loop, and the lack of any other way to exit said loop.)
+
+  header_parse() will now properly grab a header if fed a message
+  without a body (i.e. no "\n\n" ending the header block), although this
+  code will still drop a header if there is no newline at the end.
+
+Christoph, thank you for your excellent analysis, and the test cases. I
+made use of them, and with my changes sSMTP appears to do the right
+thing.
+
+Debian patch from: https://sources.debian.net/patches/ssmtp/2.64-8/
+
+Upstream-Status: Backport [debian]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+Index: ssmtp-2.64/ssmtp.c
+===================================================================
+--- ssmtp-2.64.orig/ssmtp.c
++++ ssmtp-2.64/ssmtp.c
+@@ -375,6 +375,12 @@ bool_t standardise(char *str, bool_t *li
+ 	if((p = strchr(str, '\n'))) {
+ 		*p = (char)NULL;
+ 		*linestart = True;
++
++		/* If the line ended in "\r\n", then drop the '\r' too */
++		sl = strlen(str);
++		if(sl >= 1 && str[sl - 1] == '\r') {
++			str[sl - 1] = (char)NULL;
++		}
+ 	}
+ 	return(leadingdot);
+ }
+@@ -768,6 +774,14 @@ void header_parse(FILE *stream)
+ 		}
+ 		len++;
+ 
++		if(l == '\r' && c == '\n') {
++			/* Properly handle input that already has "\r\n"
++			   line endings; see https://bugs.debian.org/584162 */
++			l = (len >= 2 ? *(q - 2) : '\n');
++			q--;
++			len--;
++		}
++
+ 		if(l == '\n') {
+ 			switch(c) {
+ 				case ' ':
+@@ -790,7 +804,9 @@ void header_parse(FILE *stream)
+ 						if((q = strrchr(p, '\n'))) {
+ 							*q = (char)NULL;
+ 						}
+-						header_save(p);
++						if(len > 0) {
++							header_save(p);
++						}
+ 
+ 						q = p;
+ 						len = 0;
+@@ -800,35 +816,12 @@ void header_parse(FILE *stream)
+ 
+ 		l = c;
+ 	}
+-	if(in_header) {
+-		if(l == '\n') {
+-			switch(c) {
+-				case ' ':
+-				case '\t':
+-						/* Must insert '\r' before '\n's embedded in header
+-						   fields otherwise qmail won't accept our mail
+-						   because a bare '\n' violates some RFC */
+-						
+-						*(q - 1) = '\r';	/* Replace previous \n with \r */
+-						*q++ = '\n';		/* Insert \n */
+-						len++;
+-						
+-						break;
+-
+-				case '\n':
+-						in_header = False;
+-
+-				default:
+-						*q = (char)NULL;
+-						if((q = strrchr(p, '\n'))) {
+-							*q = (char)NULL;
+-						}
+-						header_save(p);
+-
+-						q = p;
+-						len = 0;
+-			}
++	if(in_header && l == '\n') {
++		/* Got EOF while reading the header */
++		if((q = strrchr(p, '\n'))) {
++			*q = (char)NULL;
+ 		}
++		header_save(p);
+ 	}
+ 	(void)free(p);
+ }
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
index 9d4864d..07e3ffe 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
@@ -1,25 +1,29 @@
 SUMMARY = "extremely simple MTA to get mail off the system to a mail hub"
 HOMEPAGE = "http://packages.qa.debian.org/s/ssmtp.html"
-
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
 
-SRC_URI = "\
-           ${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.bz2 \
+SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.bz2 \
+           file://ssmtp-bug584162-fix.patch \
            file://build-ouside_srcdir.patch \
            file://use-DESTDIR.patch \
-          "
+"
+
+SRC_URI[md5sum] = "65b4e0df4934a6cd08c506cabcbe584f"
+SRC_URI[sha256sum] = "22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36"
+
+inherit autotools
+
+PACKAGECONFIG ?= "ssl ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[ssl] = "--enable-ssl,--disable-ssl,openssl"
+PACKAGECONFIG[ipv6] = "--enable-inet6,--disable-inet6"
 
 EXTRA_OECONF += "--mandir=${mandir}"
 
 EXTRA_OEMAKE = "GEN_CONFIG='/bin/true'"
 
-SRC_URI[md5sum] = "65b4e0df4934a6cd08c506cabcbe584f"
-SRC_URI[sha256sum] = "22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36"
-
-inherit autotools pkgconfig
-
-DEPENDS += "openssl inetutils"
+LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'ssl', '-lssl -lcrypto', '', d)}"
 
 do_install_append () {
     install -d ${D}${mandir}/
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
index 7ebc398..00178c8 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
@@ -1,15 +1,16 @@
-From 2a3ab04bbdc4624792886aa51579eadb427ef99e Mon Sep 17 00:00:00 2001
+From 33a53dc13fd924949a582109b45fedd8d0bed59b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 27 Jun 2017 07:42:11 -0700
 Subject: [PATCH] memory.h: Include stdint.h for uintptr_t
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/libstrongswan/utils/utils/memory.h | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/src/libstrongswan/utils/utils/memory.h b/src/libstrongswan/utils/utils/memory.h
-index b978e7c..55aaaf5 100644
+index e840330..8a356a8 100644
 --- a/src/libstrongswan/utils/utils/memory.h
 +++ b/src/libstrongswan/utils/utils/memory.h
 @@ -22,6 +22,8 @@
@@ -21,6 +22,3 @@
  /**
   * Helper function that compares two binary blobs for equality
   */
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
index da96983..be660d1 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
@@ -1,4 +1,7 @@
-fix the function parameter
+From 9f97479373f3fceedc471074b81486d77a49618d Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Tue, 4 Mar 2014 14:38:42 +0800
+Subject: [PATCH] fix the function parameter
 
 Upstream-Status: pending
 
@@ -31,9 +34,10 @@
     #11 0x4836c378 in process_message (this=0x514005f0, message=0x51500778)
          at sa/ike_sa.c:1317
     #12 0x48362270 in execute (this=0x515008d0)
-         at processing/jobs/process_message_job.c:74 
+         at processing/jobs/process_message_job.c:74
 
 Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
 ---
  src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | 8 +++++++-
  src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | 4 +++-
@@ -41,20 +45,20 @@
  3 files changed, 11 insertions(+), 2 deletions(-)
 
 diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
-index ff33824..bd21446 100644
+index 8e9c118..a73b038 100644
 --- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
 +++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
-@@ -142,7 +142,7 @@ METHOD(diffie_hellman_t, destroy, void,
+@@ -192,7 +192,7 @@ METHOD(diffie_hellman_t, destroy, void,
  /*
   * Described in header.
   */
 -openssl_diffie_hellman_t *openssl_diffie_hellman_create(
 +openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
- 							diffie_hellman_group_t group, chunk_t g, chunk_t p)
+ 											diffie_hellman_group_t group, ...)
  {
  	private_openssl_diffie_hellman_t *this;
-@@ -197,5 +197,11 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(
- 
+@@ -255,5 +255,11 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(
+ 	DBG2(DBG_LIB, "size of DH secret exponent: %d bits", BN_num_bits(privkey));
  	return &this->public;
  }
 +openssl_diffie_hellman_t *openssl_diffie_hellman_create( diffie_hellman_group_t group)
@@ -66,26 +70,26 @@
  
  #endif /* OPENSSL_NO_DH */
 diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
-index 53dc59c..eb69eaa 100644
+index 5de5520..22586e0 100644
 --- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
 +++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
-@@ -44,8 +44,10 @@ struct openssl_diffie_hellman_t {
-  * @param p				custom prime, if MODP_CUSTOM
+@@ -43,8 +43,10 @@ struct openssl_diffie_hellman_t {
+  * @param ...			expects generator and prime as chunk_t if MODP_CUSTOM
   * @return				openssl_diffie_hellman_t object, NULL if not supported
   */
 -openssl_diffie_hellman_t *openssl_diffie_hellman_create(
 +openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
- 							diffie_hellman_group_t group, chunk_t g, chunk_t p);
+ 											diffie_hellman_group_t group, ...);
 +openssl_diffie_hellman_t *openssl_diffie_hellman_create(
 +							diffie_hellman_group_t group);
  
  #endif /** OPENSSL_DIFFIE_HELLMAN_H_ @}*/
  
 diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c
-index ff25086..c76873d 100644
+index 8b0a7c5..114d575 100644
 --- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
 +++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
-@@ -388,6 +388,7 @@ METHOD(plugin_t, get_features, int,
+@@ -609,6 +609,7 @@ METHOD(plugin_t, get_features, int,
  			PLUGIN_PROVIDE(DH, MODP_1024_BIT),
  			PLUGIN_PROVIDE(DH, MODP_1024_160),
  			PLUGIN_PROVIDE(DH, MODP_768_BIT),
@@ -93,6 +97,3 @@
  			PLUGIN_PROVIDE(DH, MODP_CUSTOM),
  #endif
  #ifndef OPENSSL_NO_RSA
--- 
-1.8.3
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
deleted file mode 100644
index 3fb56bc..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb
+++ /dev/null
@@ -1,131 +0,0 @@
-DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
-Linux operating system."
-SUMMARY = "strongSwan is an OpenSource IPsec implementation"
-HOMEPAGE = "http://www.strongswan.org"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "gmp openssl flex-native flex bison-native"
-
-SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
-           file://fix-funtion-parameter.patch \
-           file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
-           "
-
-SRC_URI[md5sum] = "4afffe3c219bb2e04f09510905af836b"
-SRC_URI[sha256sum] = "c5ea54b199174708de11af9b8f4ecf28b5b0743d4bc0e380e741f25b28c0f8d4"
-
-EXTRA_OECONF = " \
-        --without-lib-prefix \
-"
-
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
-
-
-PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
-        ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \
-"
-PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
-PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
-PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
-PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
-PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
-PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
-PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
-PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
-PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
-PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
-
-# requires swanctl
-PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
-
-inherit autotools systemd pkgconfig
-
-RRECOMMENDS_${PN} = "kernel-module-ipsec"
-
-FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
-FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
-FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la"
-FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
-
-CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
-
-PACKAGES += "${PN}-plugins"
-ALLOW_EMPTY_${PN}-plugins = "1"
-
-PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
-NOAUTOPACKAGEDEBUG = "1"
-
-python split_strongswan_plugins () {
-    sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
-    libdir = d.expand('${libdir}/ipsec/plugins')
-    dbglibdir = os.path.join(libdir, '.debug')
-
-    def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
-        dvar = d.getVar('PKGD', True)
-        oldfiles = d.getVar('CONFFILES_' + pkg, True)
-        newfile = '/' + os.path.relpath(f, dvar)
-
-        if not oldfiles:
-            d.setVar('CONFFILES_' + pkg, newfile)
-        else:
-            d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile)
-
-    split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
-    do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
-
-    split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
-    split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
-    split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
-
-    if split_packages:
-        pn = d.getVar('PN', True)
-        d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages))
-        d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
-        d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
-        d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
-}
-
-PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins "
-
-# Install some default plugins based on default strongSwan ./configure options
-# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
-RDEPENDS_${PN} += "\
-    ${PN}-plugin-aes \
-    ${PN}-plugin-attr \
-    ${PN}-plugin-cmac \
-    ${PN}-plugin-constraints \
-    ${PN}-plugin-des \
-    ${PN}-plugin-dnskey \
-    ${PN}-plugin-hmac \
-    ${PN}-plugin-kernel-netlink \
-    ${PN}-plugin-md5 \
-    ${PN}-plugin-nonce \
-    ${PN}-plugin-pem \
-    ${PN}-plugin-pgp \
-    ${PN}-plugin-pkcs1 \
-    ${PN}-plugin-pkcs7 \
-    ${PN}-plugin-pkcs8 \
-    ${PN}-plugin-pkcs12 \
-    ${PN}-plugin-pubkey \
-    ${PN}-plugin-random \
-    ${PN}-plugin-rc2 \
-    ${PN}-plugin-resolve \
-    ${PN}-plugin-revocation \
-    ${PN}-plugin-sha1 \
-    ${PN}-plugin-sha2 \
-    ${PN}-plugin-socket-default \
-    ${PN}-plugin-sshkey \
-    ${PN}-plugin-updown \
-    ${PN}-plugin-vici \
-    ${PN}-plugin-x509 \
-    ${PN}-plugin-xauth-generic \
-    ${PN}-plugin-xcbc \
-    "
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.6.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.6.2.bb
new file mode 100644
index 0000000..f2fe1f1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.6.2.bb
@@ -0,0 +1,132 @@
+DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
+Linux operating system."
+SUMMARY = "strongSwan is an OpenSource IPsec implementation"
+HOMEPAGE = "http://www.strongswan.org"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "gmp openssl flex-native flex bison-native"
+
+SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
+           file://fix-funtion-parameter.patch \
+           file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
+           "
+
+SRC_URI[md5sum] = "46aa3aa18fbc4bd528f9a0345ce79913"
+SRC_URI[sha256sum] = "e0a60a30ebf3c534c223559e1686497a21ded709a5d605c5123c2f52bcc22e92"
+
+EXTRA_OECONF = " \
+        --without-lib-prefix \
+"
+
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
+
+PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \
+        ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \
+"
+PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
+PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
+PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
+PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
+PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
+PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
+PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
+PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
+
+# requires swanctl
+PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
+
+inherit autotools systemd pkgconfig
+
+RRECOMMENDS_${PN} = "kernel-module-ipsec"
+
+FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
+FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
+FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la"
+FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
+
+CONFFILES_${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
+
+PACKAGES += "${PN}-plugins"
+ALLOW_EMPTY_${PN}-plugins = "1"
+
+PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
+NOAUTOPACKAGEDEBUG = "1"
+
+python split_strongswan_plugins () {
+    sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
+    libdir = d.expand('${libdir}/ipsec/plugins')
+    dbglibdir = os.path.join(libdir, '.debug')
+
+    def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
+        dvar = d.getVar('PKGD', True)
+        oldfiles = d.getVar('CONFFILES_' + pkg, True)
+        newfile = '/' + os.path.relpath(f, dvar)
+
+        if not oldfiles:
+            d.setVar('CONFFILES_' + pkg, newfile)
+        else:
+            d.setVar('CONFFILES_' + pkg, oldfiles + " " + newfile)
+
+    split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
+    do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
+
+    split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
+    split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
+    split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
+
+    if split_packages:
+        pn = d.getVar('PN', True)
+        d.setVar('RRECOMMENDS_' + pn + '-plugins', ' '.join(split_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
+        d.appendVar('RRECOMMENDS_' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
+}
+
+PACKAGESPLITFUNCS_prepend = "split_strongswan_plugins "
+
+# Install some default plugins based on default strongSwan ./configure options
+# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
+RDEPENDS_${PN} += "\
+    ${PN}-plugin-aes \
+    ${PN}-plugin-attr \
+    ${PN}-plugin-cmac \
+    ${PN}-plugin-constraints \
+    ${PN}-plugin-des \
+    ${PN}-plugin-dnskey \
+    ${PN}-plugin-hmac \
+    ${PN}-plugin-kernel-netlink \
+    ${PN}-plugin-md5 \
+    ${PN}-plugin-nonce \
+    ${PN}-plugin-pem \
+    ${PN}-plugin-pgp \
+    ${PN}-plugin-pkcs1 \
+    ${PN}-plugin-pkcs7 \
+    ${PN}-plugin-pkcs8 \
+    ${PN}-plugin-pkcs12 \
+    ${PN}-plugin-pubkey \
+    ${PN}-plugin-random \
+    ${PN}-plugin-rc2 \
+    ${PN}-plugin-resolve \
+    ${PN}-plugin-revocation \
+    ${PN}-plugin-sha1 \
+    ${PN}-plugin-sha2 \
+    ${PN}-plugin-socket-default \
+    ${PN}-plugin-sshkey \
+    ${PN}-plugin-updown \
+    ${PN}-plugin-vici \
+    ${PN}-plugin-x509 \
+    ${PN}-plugin-xauth-generic \
+    ${PN}-plugin-xcbc \
+    ${PN}-plugin-curve25519 \
+    "
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}-swanctl.service', '${BPN}.service', d)}"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
index 196cec7..b71435a 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch
@@ -1,4 +1,4 @@
-From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001
+From 8ee1ab1ac89557d48ac1ab7ddcc3c51be9b734ad Mon Sep 17 00:00:00 2001
 From: "Hongjun.Yang" <hongjun.yang@windriver.com>
 Date: Wed, 22 Oct 2014 10:02:48 +0800
 Subject: [PATCH] Add ptest for tcpdump
@@ -6,15 +6,16 @@
 Upstream-Status: Pending
 
 Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
+
 ---
  Makefile.in | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)
 
-Index: tcpdump-4.9.0/Makefile.in
-===================================================================
---- tcpdump-4.9.0.orig/Makefile.in
-+++ tcpdump-4.9.0/Makefile.in
-@@ -436,9 +436,17 @@ distclean:
+diff --git a/Makefile.in b/Makefile.in
+index 0941f0e..3ce40c6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -437,9 +437,17 @@ distclean:
  	    tests/failure-outputs.txt
  	rm -rf autom4te.cache tests/DIFF tests/NEW
  
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
index d7a3ac2..8cefadf 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
@@ -1,4 +1,7 @@
-unnecessary to check libpcap
+From 741d77e42fc4af49804f7ee43b7237e01633cbcd Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 8 Jul 2014 13:20:47 +0800
+Subject: [PATCH] unnecessary to check libpcap
 
 Upstream-Status: Pending
 
@@ -11,23 +14,21 @@
 check if libpcap existed.
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
- configure.in |    2 +-
+ configure.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.in b/configure.in
-index 06fade1..9125de7 100644
+index b2305a5..b3b5dbf 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -567,7 +567,7 @@ AC_SEARCH_LIBS(getrpcbynumber, nsl,
- dnl AC_CHECK_LIB(z, uncompress)
- dnl AC_CHECK_HEADERS(zlib.h)
+@@ -418,7 +418,7 @@ dnl Some platforms may need -lnsl for getrpcbynumber.
+ AC_SEARCH_LIBS(getrpcbynumber, nsl,
+     AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()]))
  
 -AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
 +#AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
  
  #
  # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb
index e8025c4..98192dc 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/tinyproxy/tinyproxy_1.8.4.bb
@@ -23,8 +23,8 @@
 
 #User specific
 USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "nobody"
-GROUPADD_PARAM_${PN} = "--system tinyproxy"
+USERADD_PARAM_${PN} = "--system --home /dev/null \
+                       --no-user-group --gid nogroup tinypoxy"
 
 SYSTEMD_PACKAGES += "${BPN}"
 SYSTEMD_SERVICE_${PN} = "tinyproxy.service"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/files/libgcrypt.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/files/libgcrypt.patch
new file mode 100644
index 0000000..2aa58f7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/files/libgcrypt.patch
@@ -0,0 +1,53 @@
+use OR PKG_CONFIG scheme for libgcrypt
+
+Upstream-Status: Inappropriate OE specific
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: wireshark-2.4.4/m4/libgcrypt.m4
+===================================================================
+--- wireshark-2.4.4.orig/m4/libgcrypt.m4
++++ wireshark-2.4.4/m4/libgcrypt.m4
+@@ -27,11 +27,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+      libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
+   if test x$libgcrypt_config_prefix != x ; then
+      if test x${LIBGCRYPT_CONFIG+set} != xset ; then
+-        LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
++        LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/libgcrypt.pc
+      fi
+   fi
+ 
+-  AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
++  AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt.pc, no)
+   tmp=ifelse([$1], ,1:1.2.0,$1)
+   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+      req_libgcrypt_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -50,7 +50,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+     req_micro=`echo $min_libgcrypt_version | \
+                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+-    libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
++    libgcrypt_config_version=`$PKG_CONFIG --modversion libgcrypt`
+     major=`echo $libgcrypt_config_version | \
+                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+     minor=`echo $libgcrypt_config_version | \
+@@ -82,7 +82,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+      # If we have a recent libgcrypt, we should also check that the
+      # API is compatible
+      if test "$req_libgcrypt_api" -gt 0 ; then
+-        tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
++        tmp=`$PKG_CONFIG --api-version libgcrypt 2>/dev/null || echo 0`
+         if test "$tmp" -gt 0 ; then
+            AC_MSG_CHECKING([LIBGCRYPT API version])
+            if test "$req_libgcrypt_api" -eq "$tmp" ; then
+@@ -95,8 +95,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+      fi
+   fi
+   if test $ok = yes; then
+-    LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
+-    LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
++    LIBGCRYPT_CFLAGS=`$PKG_CONFIG --cflags libgcrypt`
++    LIBGCRYPT_LIBS=`$PKG_CONFIG --libs libgcrypt`
+     ifelse([$2], , :, [$2])
+   else
+     LIBGCRYPT_CFLAGS=""
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.10.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.10.bb
deleted file mode 100644
index 5358ba0..0000000
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.10.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-DESCRIPTION = "wireshark - a popular network protocol analyzer"
-HOMEPAGE = "http://www.wireshark.org"
-SECTION = "net"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6e271234ba1a13c6e512e76b94ac2f77"
-
-DEPENDS = "pcre expat glib-2.0 glib-2.0-native"
-
-SRC_URI = "https://2.na.dl.wireshark.org/src/all-versions/${BP}.tar.bz2"
-
-PE = "1"
-
-SRC_URI[md5sum] = "ae3a1a43a6e3687f44a738fd15d78021"
-SRC_URI[sha256sum] = "8574a5e1fdec7affae640924bd46c1aed1bd866e02632fa5625e1450e4a50707"
-
-inherit autotools pkgconfig perlnative
-
-ARM_INSTRUCTION_SET = "arm"
-
-PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc"
-PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk2 graphics", "", d)}"
-#PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gtk3", "", d)}"
-
-PACKAGECONFIG[libcap] = "--with-libcap=${STAGING_LIBDIR}, --with-libcap=no --enable-pcap-ng-default , libcap"
-PACKAGECONFIG[libpcap] = "--with-pcap=${STAGING_LIBDIR} --with-pcap-remote, --with-pcap=no --enable-pcap-ng-default  , libpcap"
-PACKAGECONFIG[libsmi] = "--with-libsmi=yes, --with-libsmi=no, libsmi"
-PACKAGECONFIG[libnl] = "--with-libnl=yes, --with-libnl=no, libnl"
-PACKAGECONFIG[portaudio] = "--with-portaudio=yes, --with-portaudio=no, portaudio-v19"
-PACKAGECONFIG[gtk2] = "--with-gtk=2, , gtk+"
-PACKAGECONFIG[gtk3] = "--with-gtk=3, , gtk+3"
-PACKAGECONFIG[graphics] = "--enable-wireshark, --with-gtk=no --disable-wireshark,"
-PACKAGECONFIG[gnutls] = "--with-gnutls=yes, --with-gnutls=no, gnutls"
-PACKAGECONFIG[gcrypt] = "--with-gcrypt=yes, --with-gcrypt=no, libgcrypt"
-PACKAGECONFIG[ssl] = "--with-ssl=yes, --with-ssl=no, openssl"
-PACKAGECONFIG[krb5] = "--with-krb5=yes, --with-krb5=no, krb5"
-PACKAGECONFIG[lua] = "--with-lua=yes, --with-lua=no, lua"
-PACKAGECONFIG[zlib] = "--with-zlib=yes, --with-zlib=no, zlib"
-PACKAGECONFIG[geoip] = "--with-geoip=yes, --with-geoip=no, geoip"
-PACKAGECONFIG[plugins] = "--with-plugins=yes, --with-plugins=no"
-PACKAGECONFIG[sbc] = "--with-sbc=yes, --with-sbc=no, sbc"
-
-PACKAGECONFIG[libssh] = "--with-ssh=yes, --with-ssh=no, libssh2"
-
-
-# these next two options require addional layers
-PACKAGECONFIG[c-ares] = "--with-c-ares=yes, --with-c-ares=no, c-ares"
-
-EXTRA_OECONF += "--with-qt=no --enable-tshark --enable-rawshark"
-
-# Currently wireshark does not install header files
-do_install_append () {
-
-	install -d ${D}/${includedir}/${BPN}
-	install -d ${D}/${includedir}/${BPN}/epan
-	install -d ${D}/${includedir}/${BPN}/epan/crypt
-	install -d ${D}/${includedir}/${BPN}/epan/dfilter
-	install -d ${D}/${includedir}/${BPN}/epan/dissectors
-	install -d ${D}/${includedir}/${BPN}/epan/ftypes
-	install -d ${D}/${includedir}/${BPN}/epan/wmem
-
-	install config.h ${D}/${includedir}/${BPN}
-	install ${S}/register.h ${D}/${includedir}/${BPN}
-	install -D ${S}/epan/*.h ${D}/${includedir}/${BPN}/epan
-	install -D ${S}/epan/crypt/*.h ${D}/${includedir}/${BPN}/epan/crypt
-	install -D ${S}/epan/dfilter/*.h ${D}/${includedir}/${BPN}/epan/dfilter
-	install -D ${S}/epan/dissectors/*.h ${D}/${includedir}/${BPN}/epan/dissectors
-	install -D ${S}/epan/ftypes/*.h ${D}/${includedir}/${BPN}/epan/ftypes
-	install -D ${S}/epan/wmem/*.h ${D}/${includedir}/${BPN}/epan/wmem
-}
-
-FILES_${PN} += "${datadir}*"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb
new file mode 100644
index 0000000..3da0a7b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb
@@ -0,0 +1,73 @@
+DESCRIPTION = "wireshark - a popular network protocol analyzer"
+HOMEPAGE = "http://www.wireshark.org"
+SECTION = "net"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e271234ba1a13c6e512e76b94ac2f77"
+
+DEPENDS = "pcre expat glib-2.0 glib-2.0-native libgcrypt libgpg-error"
+
+SRC_URI = "https://1.as.dl.wireshark.org/src/${BP}.tar.xz"
+SRC_URI += "file://libgcrypt.patch"
+
+UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"
+
+SRC_URI[md5sum] = "8cfb73e286dd6427ca4405e6e802d13e"
+SRC_URI[sha256sum] = "8e965fd282bc0c09e7c4eba5f08a555d0ccf40a7d1544b939e01b90bc893d5fe"
+
+PE = "1"
+
+inherit autotools pkgconfig perlnative upstream-version-is-even
+
+ARM_INSTRUCTION_SET = "arm"
+
+PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc"
+PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk2 graphics", "", d)}"
+
+PACKAGECONFIG[libcap] = "--with-libcap=${STAGING_DIR_HOST}/usr, --with-libcap=no --enable-pcap-ng-default , libcap"
+PACKAGECONFIG[libpcap] = "--with-pcap=${STAGING_DIR_HOST}/usr --with-pcap-remote, --with-pcap=no --enable-pcap-ng-default  , libpcap"
+PACKAGECONFIG[libsmi] = "--with-libsmi=yes, --with-libsmi=no, libsmi"
+PACKAGECONFIG[libnl] = "--with-libnl=yes, --with-libnl=no, libnl"
+PACKAGECONFIG[portaudio] = "--with-portaudio=yes, --with-portaudio=no, portaudio-v19"
+PACKAGECONFIG[gtk2] = "--with-gtk=2, , gtk+"
+PACKAGECONFIG[gtk3] = "--with-gtk=3, , gtk+3"
+PACKAGECONFIG[graphics] = "--enable-wireshark, --with-gtk=no --disable-wireshark,"
+PACKAGECONFIG[gnutls] = "--with-gnutls=yes, --with-gnutls=no, gnutls"
+PACKAGECONFIG[ssl] = "--with-ssl=yes, --with-ssl=no, openssl"
+PACKAGECONFIG[krb5] = "--with-krb5=yes, --with-krb5=no, krb5"
+PACKAGECONFIG[lua] = "--with-lua=yes, --with-lua=no, lua"
+PACKAGECONFIG[zlib] = "--with-zlib=yes, --with-zlib=no, zlib"
+PACKAGECONFIG[geoip] = "--with-geoip=yes, --with-geoip=no, geoip"
+PACKAGECONFIG[plugins] = "--with-plugins=yes, --with-plugins=no"
+PACKAGECONFIG[sbc] = "--with-sbc=yes, --with-sbc=no, sbc"
+PACKAGECONFIG[libssh] = "--with-libssh=${STAGING_DIR_HOST}/usr, --with-libssh=no, libssh2"
+PACKAGECONFIG[lz4] = "--with-lz4=${STAGING_DIR_HOST}/usr, --with-lz4=no, lz4"
+
+# these next two options require addional layers
+PACKAGECONFIG[c-ares] = "--with-c-ares=yes, --with-c-ares=no, c-ares"
+
+EXTRA_OECONF += "--with-libgcrypt-prefix=${PKG_CONFIG_DIR} --with-qt=no --enable-tshark --enable-rawshark"
+
+LDFLAGS_append = " -lgpg-error"
+
+# Currently wireshark does not install header files
+do_install_append () {
+
+	install -d ${D}/${includedir}/${BPN}
+	install -d ${D}/${includedir}/${BPN}/epan
+	install -d ${D}/${includedir}/${BPN}/epan/crypt
+	install -d ${D}/${includedir}/${BPN}/epan/dfilter
+	install -d ${D}/${includedir}/${BPN}/epan/dissectors
+	install -d ${D}/${includedir}/${BPN}/epan/ftypes
+	install -d ${D}/${includedir}/${BPN}/epan/wmem
+
+	install config.h ${D}/${includedir}/${BPN}
+	install ${S}/register.h ${D}/${includedir}/${BPN}
+	install -D ${S}/epan/*.h ${D}/${includedir}/${BPN}/epan
+	install -D ${S}/epan/crypt/*.h ${D}/${includedir}/${BPN}/epan/crypt
+	install -D ${S}/epan/dfilter/*.h ${D}/${includedir}/${BPN}/epan/dfilter
+	install -D ${S}/epan/dissectors/*.h ${D}/${includedir}/${BPN}/epan/dissectors
+	install -D ${S}/epan/ftypes/*.h ${D}/${includedir}/${BPN}/epan/ftypes
+	install -D ${S}/epan/wmem/*.h ${D}/${includedir}/${BPN}/epan/wmem
+}
+
+FILES_${PN} += "${datadir}*"
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_git.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_git.bb
new file mode 100644
index 0000000..b6d2f69
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/wpan-tools/wpan-tools_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Userspace tools for Linux IEEE 802.15.4 stack"
+HOMEPAGE = "http://wpan.cakelab.org/releases/"
+DESCRIPTION = "This is a set of utils to manage the Linux WPAN stack via \
+netlink interface. This requires recent kernel with nl802154 interface."
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4cfd939b1d7e6aba9fcefb7f6e2fd45d"
+
+DEPENDS = "libnl"
+
+PV = "0.8+git${SRCPV}"
+SRC_URI = "git://github.com/linux-wpan/wpan-tools \
+           "
+SRCREV = "3f473f5136f89773997cb4fff2d8ed647734e2f5"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/import-layers/meta-openembedded/meta-oe/site/endian-big b/import-layers/meta-openembedded/meta-networking/site/endian-big
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/site/endian-big
rename to import-layers/meta-openembedded/meta-networking/site/endian-big
diff --git a/import-layers/meta-openembedded/meta-oe/site/endian-little b/import-layers/meta-openembedded/meta-networking/site/endian-little
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/site/endian-little
rename to import-layers/meta-openembedded/meta-networking/site/endian-little
diff --git a/import-layers/meta-openembedded/meta-oe/README b/import-layers/meta-openembedded/meta-oe/README
index dabed2f..7cde0a2 100644
--- a/import-layers/meta-openembedded/meta-oe/README
+++ b/import-layers/meta-openembedded/meta-oe/README
@@ -1,15 +1,14 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: rocko
+branch: master
 revision: HEAD
 
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-oe][rocko]' in the subject'
+Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-oe]' in the subject'
 
 When sending single patches, please use something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-oe][rocko][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-oe][PATCH'
 
 You are encouraged to fork the mirror on github https://github.com/openembedded/meta-oe/ to share your patches, this is preferred for patch sets consisting of more than one patch. Other services like gitorious, repo.or.cz or self hosted setups are of course accepted as well, 'git fetch <remote>' works the same on all of them. We recommend github because it is free, easy to use, has been proven to be reliable and has a really good web GUI.
 
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
+Main layer maintainer: Armin Kuster <akuster808@gmail.com>
diff --git a/import-layers/meta-openembedded/meta-oe/classes/gitver.bbclass b/import-layers/meta-openembedded/meta-oe/classes/gitver.bbclass
index 380374a..07f44c3 100644
--- a/import-layers/meta-openembedded/meta-oe/classes/gitver.bbclass
+++ b/import-layers/meta-openembedded/meta-oe/classes/gitver.bbclass
@@ -36,7 +36,7 @@
                 return "0.0"
 
         except Exception as exc:
-            raise bb.parse.SkipPackage(str(exc))
+            raise bb.parse.SkipRecipe(str(exc))
 
     if ver and tagadjust:
         ver = tagadjust(ver)
diff --git a/import-layers/meta-openembedded/meta-oe/classes/meson.bbclass b/import-layers/meta-openembedded/meta-oe/classes/meson.bbclass
deleted file mode 100644
index a09bc24..0000000
--- a/import-layers/meta-openembedded/meta-oe/classes/meson.bbclass
+++ /dev/null
@@ -1,106 +0,0 @@
-inherit python3native
-
-DEPENDS_append = " meson-native ninja-native"
-
-# As Meson enforces out-of-tree builds we can just use cleandirs
-B = "${WORKDIR}/build"
-do_configure[cleandirs] = "${B}"
-
-# Where the meson.build build configuration is
-MESON_SOURCEPATH = "${S}"
-
-# These variables in the environment override the *native* tools, not the cross.
-export CPPFLAGS = "${BUILD_CPPFLAGS}"
-export CC = "${BUILD_CC}"
-export CFLAGS = "${BUILD_CFLAGS}"
-export CXX = "${BUILD_CXX}"
-export CXXFLAGS = "${BUILD_CXXFLAGS}"
-export LD = "${BUILD_LD}"
-export LDFLAGS = "${BUILD_LDFLAGS}"
-export AR = "${BUILD_AR}"
-export PKG_CONFIG = "pkg-config-native"
-
-def noprefix(var, d):
-    return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
-
-MESONOPTS = " --prefix ${prefix} \
-              --bindir ${@noprefix('bindir', d)} \
-              --sbindir ${@noprefix('sbindir', d)} \
-              --datadir ${@noprefix('datadir', d)} \
-              --libdir ${@noprefix('libdir', d)} \
-              --libexecdir ${@noprefix('libexecdir', d)} \
-              --includedir ${@noprefix('includedir', d)} \
-              --mandir ${@noprefix('mandir', d)} \
-              --infodir ${@noprefix('infodir', d)} \
-              --sysconfdir ${sysconfdir} \
-              --localstatedir ${localstatedir} \
-              --sharedstatedir ${sharedstatedir}"
-
-MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
-MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
-
-MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be', 'big', 'little', d)}"
-MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big', 'little', d)}"
-
-EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
-
-MESON_CROSS_FILE = ""
-MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
-
-def meson_array(var, d):
-    return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
-
-addtask write_config before do_configure
-do_write_config[vardeps] += "MESON_C_ARGS TOOLCHAIN_OPTIONS"
-do_write_config() {
-    # This needs to be Py to split the args into single-element lists
-    cat >${WORKDIR}/meson.cross <<EOF
-[binaries]
-c = '${HOST_PREFIX}gcc'
-cpp = '${HOST_PREFIX}g++'
-ar = '${HOST_PREFIX}ar'
-ld = '${HOST_PREFIX}ld'
-strip = '${HOST_PREFIX}strip'
-readelf = '${HOST_PREFIX}readelf'
-pkgconfig = 'pkg-config'
-
-[properties]
-needs_exe_wrapper = true
-c_args = [${@meson_array('MESON_C_ARGS', d)}]
-c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
-cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
-cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
-
-[host_machine]
-system = '${HOST_OS}'
-cpu_family = '${HOST_ARCH}'
-cpu = '${HOST_ARCH}'
-endian = '${MESON_HOST_ENDIAN}'
-
-[target_machine]
-system = '${TARGET_OS}'
-cpu_family = '${TARGET_ARCH}'
-cpu = '${TARGET_ARCH}'
-endian = '${MESON_TARGET_ENDIAN}'
-EOF
-}
-
-CONFIGURE_FILES = "meson.build"
-
-meson_do_configure() {
-    if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
-        cat ${B}/meson-logs/meson-log.txt
-        bbfatal_log meson failed
-    fi
-}
-
-do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
-meson_do_compile() {
-    ninja ${PARALLEL_MAKE}
-}
-
-meson_do_install() {
-    DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
-}
-
-EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/import-layers/meta-openembedded/meta-oe/conf/layer.conf b/import-layers/meta-openembedded/meta-oe/conf/layer.conf
index d84bd09..1a43575 100644
--- a/import-layers/meta-openembedded/meta-oe/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-oe/conf/layer.conf
@@ -29,6 +29,8 @@
 
 LAYERDEPENDS_openembedded-layer = "core"
 
+LAYERSERIES_COMPAT_openembedded-layer = "sumo"
+
 LICENSE_PATH += "${LAYERDIR}/licenses"
 
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch
index fde8238..7de05ee 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch
@@ -1,13 +1,21 @@
-Index: git/wscript
-===================================================================
---- git.orig/wscript	2016-07-29 13:15:44.954249796 -0500
-+++ git/wscript	2016-07-29 15:52:06.196768865 -0500
-@@ -90,7 +90,7 @@
-         ctx.check_cxx(lib = lib, uselib_store = uselib)
+From 9fb298c398f88a63d71432be1410d52fae089063 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Mon, 8 Aug 2016 11:39:54 -0500
+
+---
+ wscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index ca843f4..eb4a26a 100644
+--- a/wscript
++++ b/wscript
+@@ -84,7 +84,7 @@ def configure(ctx):
+         ctx.check_cc(lib = lib, uselib_store = uselib)
  
      # Check required functions
 -    req_funcs = [('memset', 'string.h', []) ,('sqrt', 'math.h', ['m'])]
 +    req_funcs = [('memset', 'string.h', [])]
      for func, header, uselib in req_funcs:
-         ctx.check_cxx(function_name = func, header_name = header,
+         ctx.check_cc(function_name = func, header_name = header,
                        uselib = uselib, mandatory = True)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.10.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.10.bb
new file mode 100644
index 0000000..1322d07
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.10.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics"
+HOMEPAGE = "https://sourceforge.net/projects/iperf2/"
+SECTION = "console/network"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e136a7b2560d80bcbf0d9b3e1356ecff"
+
+SRC_URI = " ${SOURCEFORGE_MIRROR}/iperf2/iperf-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "097cf0754bc1afa165975c06a91e6906"
+SRC_URI[sha256sum] = "7fe4348dcca313b74e0aa9c34a8ccd713b84a5615b8578f4aa94cedce9891ef2"
+
+S = "${WORKDIR}/iperf-${PV}"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--exec-prefix=${STAGING_DIR_HOST}${layout_exec_prefix}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch
deleted file mode 100644
index ae36208..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From be653711fb92d2430b3ecc546b4e3ad927d19ec5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 14 Jul 2017 12:59:42 -0700
-Subject: [PATCH 1/2] include stdint.h for various std c99 int types
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/cjson.h | 2 ++
- src/timer.h | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/src/cjson.h b/src/cjson.h
-index fb8cd3b..69cd272 100644
---- a/src/cjson.h
-+++ b/src/cjson.h
-@@ -23,6 +23,8 @@
- #ifndef cJSON__h
- #define cJSON__h
- 
-+#include <stdint.h>
-+
- #ifdef __cplusplus
- extern "C"
- {
-diff --git a/src/timer.h b/src/timer.h
-index 0f9c5eb..0b195be 100644
---- a/src/timer.h
-+++ b/src/timer.h
-@@ -31,6 +31,7 @@
- #define __TIMER_H
- 
- #include <sys/time.h>
-+#include <stdint.h>
- 
- /* TimerClientData is an opaque value that tags along with a timer.  The
- ** client can use it for whatever, and it gets passed to the callback when
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.2.bb
index 4d1b0c4..2ed0811 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/iperf3/iperf3_3.2.bb
@@ -15,7 +15,6 @@
 
 SRC_URI = "git://github.com/esnet/iperf.git \
            file://automake-foreign.patch \
-           file://0001-include-stdint.h-for-various-std-c99-int-types.patch \
            file://0002-Remove-pg-from-profile_CFLAGS.patch \
            "
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_20110206.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_20110206.bb
new file mode 100644
index 0000000..f534c73
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/libc-bench/libc-bench_20110206.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Tests to compare standard functions of different libc implementations"
+DESCRIPTION = "libc-bench is a set of time- and memory-efficiency tests to compare \
+implementations of various C/POSIX standard library functions."
+HOMEPAGE = "http://www.etalabs.net/libc-bench.html"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://Makefile;md5=e12f113da27dfe9cfb6c2c537da8d8df"
+
+SRC_URI = "http://www.etalabs.net/releases/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "f763de90f95fe68e4e03e5b6f49698ac"
+SRC_URI[sha256sum] = "6825260aa5f15f4fbc7957ec578e9c859cbbe210e025ec74c4a0d05677523794"
+
+do_install () {
+    install -d ${D}${bindir}
+    install -m 0755 ${B}/libc-bench ${D}${bindir}
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb
new file mode 100644
index 0000000..aed95cd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "LINPACK Benchmarks are a measure of a system's floating point computing power"
+SUMMARY = "LINPACK is a software library for performing numerical linear algebra on digital computers"
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM ="file://${WORKDIR}/linpacknew.c;beginline=1;endline=23;md5=aa025e3bc44190c71e4c5e3b084fed87"
+
+SRC_URI = "http://www.netlib.org/benchmark/linpackc.new;downloadfilename=linpacknew.c"
+SRC_URI[md5sum] = "1c5d0b6a31264685d2e651c920e3cdf4"
+SRC_URI[sha256sum] = "a63f2ec86512959f1fd926bfafb85905b2d7b7402942ffae3af374d48745e97e"
+
+S = "${WORKDIR}"
+
+do_compile () {
+	${CC} ${CFLAGS} ${LDFLAGS} -o linpack linpacknew.c -lm
+}
+
+do_install () {
+	install -Dm 0755 linpack ${D}${bindir}/linpack
+}
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch
index 20791bf..d716949 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-Check-for-musl-define-guard-before-redefining-sockle.patch
@@ -1,12 +1,13 @@
-From 31d58ed7e6552781f415501e96d7cc74f83b910d Mon Sep 17 00:00:00 2001
+From ac1657e11cbb0545bdf4d1124def8c013958ed7e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 12 Jul 2017 18:08:51 -0700
-Subject: [PATCH 1/2] Check for musl define guard before redefining socklen_t
+Subject: [PATCH] Check for musl define guard before redefining socklen_t
 
 musl uses __DEFINED_socklen_t so check for that as well
 along with HAVE_socklen_t
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/bench.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -24,6 +25,3 @@
  typedef int socklen_t;
  #endif
  
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch
index 18ed43d..943b3ec 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch
@@ -1,9 +1,10 @@
-From 6faa6acdf20aa6f738eed1483b7dceed94286adb Mon Sep 17 00:00:00 2001
+From 7c05fa5353ad91acae6e5e8a01f65d54935ef778 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 27 Jun 2017 14:39:10 -0700
 Subject: [PATCH] lat_http.c: Add printf format
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/lat_http.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21,6 +22,3 @@
  	}
  	write(sock, buf, strlen(buf));
  	while ((n = read(sock, buf, XFERSIZE)) > 0) {
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch
index d5c8f5f..353d80b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch
@@ -1,13 +1,13 @@
-From 76f3a9abc2ff96155425ef97d8c5520cfbc8fe6a Mon Sep 17 00:00:00 2001
+From b27c253bfb78fa3c5f416e6caee101098a4b58cc Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 12 Jul 2017 18:09:46 -0700
-Subject: [PATCH 2/2] build: Adjust CFLAGS/LDFLAGS to append values passed from
- env
+Subject: [PATCH] build: Adjust CFLAGS/LDFLAGS to append values passed from env
 
 For musl we have to pass additional arguments via cflags and ldflags
 to link in librirpc, make room for those changes to take effect
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  scripts/build |  2 +-
  src/Makefile  | 14 +++++++-------
@@ -71,6 +71,3 @@
  
  
  tag:
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch
index 549a114..cbab5c4 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch
@@ -1,4 +1,7 @@
-lmbench: Can't proceed on some targets
+From 65180976c9963432d166b47a0b692260a69c0d47 Mon Sep 17 00:00:00 2001
+From: Qingming Su <qingming.su@windriver.com>
+Date: Tue, 19 Aug 2014 05:16:17 -0400
+Subject: [PATCH] lmbench: Can't proceed on some targets
 
 lmbench can't proceed on some targets.  The memory check fails because the
 memory latency of each page is longer then 10us, which is a time limit set
@@ -25,13 +28,19 @@
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
+---
+ scripts/config-run | 12 +++++++---
+ src/Makefile       |  4 ++--
+ src/memsize.c      | 66 +++++++++++++++++++++++++++++++++++-------------------
+ 3 files changed, 54 insertions(+), 28 deletions(-)
+
 diff --git a/scripts/config-run b/scripts/config-run
-index e1f7b6d..31b9256 100755
+index 918cbdf..096ed12 100755
 --- a/scripts/config-run
 +++ b/scripts/config-run
-@@ -214,6 +214,12 @@ The bigger the range, the more accurate the results, but larger sizes
+@@ -197,6 +197,12 @@ The bigger the range, the more accurate the results, but larger sizes
  take somewhat longer to run the benchmark.
-
+ 
  EOF
 +
 +# By default, use 512M memory as the upper limit for lmbench test
@@ -40,12 +49,12 @@
 +fi
 +
  echo $ECHON "MB [default $MB]: $ECHOC"
- #read TMP
- TMP=""
-@@ -718,10 +724,10 @@ case $MAIL in
-		;;
+ read TMP
+ if [ X$TMP != X ]
+@@ -687,10 +693,10 @@ case $MAIL in
+ 		;;
  esac
-
+ 
 -INFO=`../scripts/info`
 +INFO=`../scripts/hostinfo`
  if [ $MAIL = yes ]
@@ -54,8 +63,8 @@
 +	then	cp ../scripts/hostinfo-template $INFO
  		chmod +w $INFO
  		REUSE=no
- 	else
-@@ -765,7 +771,7 @@ EOF
+ 	else	
+@@ -733,7 +739,7 @@ EOF
  		then	EDITOR=$TMP
  		fi
  		if [ X$EDITOR != "none" ]
@@ -65,10 +74,10 @@
  	fi
  fi
 diff --git a/src/Makefile b/src/Makefile
-index d1f0dc6..5098998 100644
+index c7e4e3c..d9efd54 100644
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -49,7 +49,7 @@ TARGET=`../scripts/target`
+@@ -50,7 +50,7 @@ TARGET=`../scripts/target`
  BINDIR=../bin/$(OS)
  CONFIG=../bin/$(OS)/`../scripts/config`
  UTILS=../scripts/target ../scripts/os ../scripts/gnu-os ../scripts/compiler \
@@ -79,21 +88,21 @@
  INSTALL=cp
 @@ -240,7 +240,7 @@ $O/getopt.o : getopt.c $(INCS)
  	$(COMPILE) -c getopt.c -o $O/getopt.o
-
+ 
  $(UTILS) :
 -	-cd ../scripts; make get
 +	-cd ../scripts; cp info hostinfo; cp info-template hostinfo-template
-
+ 
  # Do not remove the next line, $(MAKE) depend needs it
  # MAKEDEPEND follows
 diff --git a/src/memsize.c b/src/memsize.c
-index eb25a09..cf9fe0c 100644
+index eb25a09..82d7faf 100644
 --- a/src/memsize.c
 +++ b/src/memsize.c
 @@ -14,9 +14,12 @@ char	*id = "$Id$\n";
-
+ 
  #define	CHK(x)	if ((x) == -1) { perror("x"); exit(1); }
-
+ 
 -#ifndef	TOO_LONG
 -#define	TOO_LONG	10	/* usecs */
 -#endif
@@ -103,12 +112,12 @@
 +
 +#define	MEMORY_SIZE_1MB (1024 * 1024)
 +#define	MEMORY_SIZE_8MB (8 * 1024 * 1024)
-
+ 
  int	alarm_triggered = 0;
-
+ 
 @@ -35,10 +38,10 @@ main(int ac, char **av)
  	size_t	delta;
-
+ 
  	if (ac == 2) {
 -		max = size = bytes(av[1]) * 1024 * 1024;
 +		max = size = bytes(av[1]) * MEMORY_SIZE_1MB;
@@ -170,7 +179,7 @@
 +		time_each_page = 1;
 +	//Set the uper limit of time spending on one page
 +        too_long = 10 * time_each_page;
-
+ 
 -	range = 1024 * 1024;
 -	incr = 1024 * 1024;
 -	touchRange(where, range, pagesize);
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch
index cda2f0c..30708c8 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch
@@ -1,4 +1,7 @@
-lmbench: Fix "make html" graph failure
+From b21ca9f3911628fb66f308c6916485bbbcfb29a4 Mon Sep 17 00:00:00 2001
+From: Lin Yu <lin.yu@windriver.com>
+Date: Tue, 19 Aug 2014 05:16:16 -0400
+Subject: [PATCH] lmbench: Fix "make html" graph failure
 
 The html-list perl script cannot parse the first line of the result
 files about the lmbench version.
@@ -14,6 +17,11 @@
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
+---
+ results/Makefile  | 1 +
+ scripts/html-list | 7 ++-----
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
 diff --git a/results/Makefile b/results/Makefile
 index 0935376..1ef9a15 100644
 --- a/results/Makefile
@@ -38,7 +46,7 @@
 +<h2><a href=summary.out>Summary of results</a></h2>
  <hr>
  EOF
-
+ 
 @@ -47,7 +47,7 @@ foreach $os (@os) {
  		open(F, $file);
  		$_ = <F>;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch
index 41a3b32..fa5e6db 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/obey-ranlib.patch
@@ -1,16 +1,22 @@
+From 182a5d3dba3f440bbf35551da6d21ab1c990eb58 Mon Sep 17 00:00:00 2001
+From: Noor Ahsan <noor_ahsan@mentor.com>
+Date: Mon, 29 Aug 2011 16:17:51 +0000
+Subject: [PATCH] lmbench: Add version 3.0-a9 (initial recipe)
+
 In some cases the host may have too old of a ranlib to work.  Since it's
 not exactly a great idea to not be using the cross ranlib anyhow, fix the
 Makefile so we can override ranlib and then override it
 
 Upstream-Status: Inappropriate [build system specific change]
+
 ---
- src/Makefile |    3 ++-
+ src/Makefile | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
-Index: lmbench-3.0-a9/src/Makefile
-===================================================================
---- lmbench-3.0-a9.orig/src/Makefile
-+++ lmbench-3.0-a9/src/Makefile
+diff --git a/src/Makefile b/src/Makefile
+index 4962815..c7a8c79 100644
+--- a/src/Makefile
++++ b/src/Makefile
 @@ -38,6 +38,7 @@ CC=`../scripts/compiler`
  MAKE=`../scripts/make`
  AR=ar
@@ -19,7 +25,7 @@
  
  # base of installation location
  BASE=/usr/local
-@@ -217,7 +218,7 @@ $O/lmbench : ../scripts/lmbench version.
+@@ -217,7 +218,7 @@ $O/lmbench : ../scripts/lmbench version.h
  $O/lmbench.a: $(LIBOBJS)
  	/bin/rm -f $O/lmbench.a
  	$(AR) $(ARCREATE) $O/lmbench.a $(LIBOBJS)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch
index b46e09a..44bc7bb 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-config-script.patch
@@ -1,8 +1,18 @@
+From aca1a59d888421c1fc553229b8049be47e8b3ddf Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <b40290@freescale.com>
+Date: Fri, 1 Mar 2013 09:50:42 +0000
+Subject: [PATCH] lmbench: update config script
+
 Upstream-Status: Pending
-Index: lmbench-3.0-a9/scripts/config
-===================================================================
---- lmbench-3.0-a9/scripts/config	2000-01-31 18:29:31.000000000 -0600
-+++ lmbench-3.0-a9/scripts/config	2013-03-01 00:19:41.032984315 -0600
+
+---
+ scripts/config | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/config b/scripts/config
+index b58cb60..25d9d77 100755
+--- a/scripts/config
++++ b/scripts/config
 @@ -3,5 +3,5 @@
  UNAME=`uname -n 2>/dev/null`
  if [ X$UNAME = X ]
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch
index 894f146..31c4aec 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/update-results-script.patch
@@ -1,45 +1,24 @@
+From 4955021bc283be404df62b97b86af3943efd29de Mon Sep 17 00:00:00 2001
+From: Noor Ahsan <noor_ahsan@mentor.com>
+Date: Mon, 29 Aug 2011 16:17:51 +0000
+Subject: [PATCH] lmbench: Add version 3.0-a9 (initial recipe)
+
 Now that we have our binaries in /usr/bin rather than the normal
 lmbench hierarchy we need to update the scripts as well to behave well here.
 
 Upstream-Status: Inappropriate [This is related to the OE-specific behavior
-of installing into /usr/bin, etc, rather than dumping everything into 
+of installing into /usr/bin, etc, rather than dumping everything into
 /usr/share/lmbench or similar]
 
-Index: lmbench-3.0-a9/scripts/results
-===================================================================
---- lmbench-3.0-a9.orig/scripts/results
-+++ lmbench-3.0-a9/scripts/results
-@@ -8,11 +8,11 @@ RESULTS=results/$OS
- BASE=../$RESULTS/`uname -n`
- EXT=0
- 
--if [ ! -f "../bin/$OS/$CONFIG" ]
-+if [ ! -f "$CONFIG" ]
- then	echo "No config file?"
- 	exit 1
- fi
--. ../bin/$OS/$CONFIG
-+. $CONFIG
- 
- if [ ! -d ../$RESULTS ]
- then	mkdir -p ../$RESULTS
-@@ -23,11 +23,9 @@ do      EXT=`expr $EXT + 1`
- 	RESULTS=$BASE.$EXT
- done
- 
--cd ../bin/$OS 
--PATH=.:${PATH}; export PATH
- export SYNC_MAX
- export OUTPUT
--lmbench $CONFIG 2>../${RESULTS}
-+lmbench $CONFIG 2>${RESULTS}
- 
- if [ X$MAIL = Xyes ]
- then	echo Mailing results
-Index: lmbench-3.0-a9/scripts/config-run
-===================================================================
---- lmbench-3.0-a9.orig/scripts/config-run
-+++ lmbench-3.0-a9/scripts/config-run
+---
+ scripts/config-run | 40 ++++++++++++++++++++--------------------
+ scripts/results    |  8 +++-----
+ 2 files changed, 23 insertions(+), 25 deletions(-)
+
+diff --git a/scripts/config-run b/scripts/config-run
+index a2d5ba4..918cbdf 100755
+--- a/scripts/config-run
++++ b/scripts/config-run
 @@ -132,20 +132,20 @@ export LMBENCH_SCHED
  ############################################################################
  echo $L; echo "";
@@ -89,7 +68,7 @@
  if [ `expr $SYNC_MAX \* $MB` -gt `expr $TOTAL_MEM` ]
  then
  	MB=`expr $TOTAL_MEM / $SYNC_MAX`
-@@ -223,8 +223,8 @@ then	echo Warning: you have only ${MB}MB
+@@ -223,8 +223,8 @@ then	echo Warning: you have only ${MB}MB available memory.
  fi
  
  echo "Hang on, we are calculating your cache line size."
@@ -158,3 +137,34 @@
  echo DISKS=\"$DISKS\" > $C
  echo DISK_DESC=\"$DISK_DESC\" >> $C
  echo OUTPUT=$OUTPUT >> $C
+diff --git a/scripts/results b/scripts/results
+index cd07c15..d5aa558 100755
+--- a/scripts/results
++++ b/scripts/results
+@@ -8,11 +8,11 @@ RESULTS=results/$OS
+ BASE=../$RESULTS/`uname -n`
+ EXT=0
+ 
+-if [ ! -f "../bin/$OS/$CONFIG" ]
++if [ ! -f "$CONFIG" ]
+ then	echo "No config file?"
+ 	exit 1
+ fi
+-. ../bin/$OS/$CONFIG
++. $CONFIG
+ 
+ if [ ! -d ../$RESULTS ]
+ then	mkdir -p ../$RESULTS
+@@ -23,11 +23,9 @@ do      EXT=`expr $EXT + 1`
+ 	RESULTS=$BASE.$EXT
+ done
+ 
+-cd ../bin/$OS 
+-PATH=.:${PATH}; export PATH
+ export SYNC_MAX
+ export OUTPUT
+-lmbench $CONFIG 2>../${RESULTS}
++lmbench $CONFIG 2>${RESULTS}
+ 
+ if [ X$MAIL = Xyes ]
+ then	echo Mailing results
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/use-base_libdir-instead-of-hardcoded-lib.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/use-base_libdir-instead-of-hardcoded-lib.patch
index 3351ce8..c6e9465 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/use-base_libdir-instead-of-hardcoded-lib.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/use-base_libdir-instead-of-hardcoded-lib.patch
@@ -1,14 +1,15 @@
-From 0d09e31970616e09beb7f238c2b59bfc541148fb Mon Sep 17 00:00:00 2001
+From 73fdc58ca4eb9e2f24d854b3af3a4e5daac5a33e Mon Sep 17 00:00:00 2001
 From: Ting Liu <b28495@freescale.com>
 Date: Fri, 22 Nov 2013 15:20:08 +0800
 Subject: [PATCH] use base_libdir instead of hardcoded /lib
 
-Upsteam Status: Inappropriate [configuration]
+Upstream Status: Inappropriate [configuration]
 
 Signed-off-by: Ting Liu <b28495@freescale.com>
+
 ---
- src/Makefile |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
+ src/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/src/Makefile b/src/Makefile
 index c7a8c79..c7e4e3c 100644
@@ -27,6 +28,3 @@
  	cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install
  
  
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch
index 2d8a246..b964bef 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/0001-avoid-gcc-optimize-away-the-loops.patch
@@ -1,4 +1,7 @@
-[PATCH] avoid gcc optimize-away the loops
+From 25738bb9c75f94b451201acfd6bcab13bdeee512 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Thu, 5 May 2016 09:52:01 +0800
+Subject: [PATCH] [PATCH] avoid gcc optimize-away the loops
 
 Upstream-Status: pending
 
@@ -15,6 +18,7 @@
 	#define TEN(a) a a a a a a a a a a
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
  src/lat_ops.c | 30 +++++++++++++++++++++++++-----
  1 file changed, 25 insertions(+), 5 deletions(-)
@@ -74,6 +78,3 @@
  	}
  	use_int((int)r);
  }
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch
index 9a40521..b42ee7d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench/rename-line-binary.patch
@@ -1,3 +1,8 @@
+From 16823f5c3d3d5adad0b70e9055c08cb4e18d255b Mon Sep 17 00:00:00 2001
+From: Noor Ahsan <noor_ahsan@mentor.com>
+Date: Mon, 29 Aug 2011 16:17:51 +0000
+Subject: [PATCH] lmbench: Add version 3.0-a9 (initial recipe)
+
 Both lmbench and util-linux-ng packages provide own /usr/bin/line binaries.
 Even though the binaries name is the same, their functionality is different.
 This patch renames lmbench's line binary as lm_line to avoid conflicts with
@@ -6,8 +11,14 @@
 
 Upstream-Status: Inappropriate [build system specific change]
 
---- patches/scripts/config-run	2006-11-26 15:11:04.000000000 -0500
-+++ patches/scripts/config-run	2011-04-01 09:35:50.000000000 -0400
+---
+ scripts/config-run | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/config-run b/scripts/config-run
+index f620c15..a2d5ba4 100755
+--- a/scripts/config-run
++++ b/scripts/config-run
 @@ -224,7 +224,7 @@ fi
  
  echo "Hang on, we are calculating your cache line size."
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.4.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.4.0.bb
deleted file mode 100644
index 3ccd5db..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.4.0.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Phoronix Test Suite"
-DESCRIPTION = "The Phoronix Test Suite is designed to carry out both qualitative \
-and quantitative benchmarks in a clean, reproducible, and easy-to-use manner."
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SECTION = "console/tests"
-
-SRC_URI = "http://www.phoronix-test-suite.com/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "86fa3eede43ffff88992fe21368b11b7"
-SRC_URI[sha256sum] = "de9aec3ef4f980581756fd0bf7b30dd1ccb20e7aae637078a587606bf75a6b67"
-
-S = "${WORKDIR}/phoronix-test-suite"
-
-inherit systemd allarch
-
-do_install() {
-    DESTDIR=${D} ./install-sh ${exec_prefix}
-
-    if [ "${systemd_unitdir}" != "/usr/lib/systemd" ]; then
-        install -d ${D}/${systemd_unitdir}/system/
-        mv ${D}/usr/lib/systemd/system/* ${D}/${systemd_unitdir}/system/
-        rm -rf ${D}/usr/lib/
-    fi
-}
-
-SYSTEMD_SERVICE_${PN} = "phoromatic-client.service phoromatic-server.service"
-RDEPENDS_${PN} += "bash python php-cli"
-
-FILES_${PN} += " \
-    ${datadir}/phoronix-test-suite \
-    ${datadir}/appdata/phoronix-test-suite.appdata.xml \
-    ${datadir}/icons/hicolor/48x48/apps/phoronix-test-suite.png \
-    ${datadir}/icons/hicolor/64x64/mimetypes/application-x-openbenchmarking.png \
-    ${datadir}/mime/packages/openbenchmarking-mime.xml \
-    ${systemd_unitdir}/* \
-"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.8.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.8.0.bb
new file mode 100644
index 0000000..1f90a71
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/phoronix-test-suite/phoronix-test-suite_7.8.0.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Phoronix Test Suite"
+DESCRIPTION = "The Phoronix Test Suite is designed to carry out both qualitative \
+and quantitative benchmarks in a clean, reproducible, and easy-to-use manner."
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+SECTION = "console/tests"
+
+SRC_URI = "http://www.phoronix-test-suite.com/releases/${BP}.tar.gz"
+SRC_URI[md5sum] = "850843bd9252823e7e24bc0849773000"
+SRC_URI[sha256sum] = "cd6c869841f28e4ac1e8a5e4cda05fafce9a523a6b4f0f3a47805efd30494d88"
+
+S = "${WORKDIR}/phoronix-test-suite"
+
+inherit systemd allarch
+
+do_install() {
+    DESTDIR=${D} ./install-sh ${exec_prefix}
+
+    if [ "${systemd_unitdir}" != "/usr/lib/systemd" ]; then
+        install -d ${D}/${systemd_unitdir}/system/
+        mv ${D}/usr/lib/systemd/system/* ${D}/${systemd_unitdir}/system/
+        rm -rf ${D}/usr/lib/
+    fi
+}
+
+# It is not advisable to enable these services by default since they can cause
+# continual target reboots if they encounter network problems.
+#
+SYSTEMD_AUTO_ENABLE = "disable"
+SYSTEMD_SERVICE_${PN} = "phoromatic-client.service phoromatic-server.service"
+
+RDEPENDS_${PN} += "bash python php-cli"
+
+FILES_${PN} += " \
+    ${datadir}/phoronix-test-suite \
+    ${datadir}/appdata/phoronix-test-suite.appdata.xml \
+    ${datadir}/icons/hicolor/48x48/apps/phoronix-test-suite.png \
+    ${datadir}/icons/hicolor/64x64/mimetypes/application-x-openbenchmarking.png \
+    ${datadir}/mime/packages/openbenchmarking-mime.xml \
+    ${systemd_unitdir}/* \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb
new file mode 100644
index 0000000..8fad04e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-benchmark/whetstone/whetstone_1.2.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Whetstone benchmark is a synthetic benchmark for evaluating the performance of computers"
+SUMMARY = "CPU benchmark to measure floating point performance"
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM ="file://${WORKDIR}/whetstone.c;beginline=1;endline=52;md5=c795edc15e7e1d92ca8f88ad718449f5"
+
+SRC_URI = "http://www.netlib.org/benchmark/whetstone.c"
+SRC_URI[md5sum] = "d8eb2cd7104bb5a12d614ac6d3f1f9fb"
+SRC_URI[sha256sum] = "333e4ceca042c146f63eec605573d16ae8b07166cbc44a17bec1ea97c6f1efbf"
+
+S = "${WORKDIR}"
+
+do_compile () {
+	${CC} ${CFLAGS} ${LDFLAGS} -Ofast -o whetstone whetstone.c -lm
+}
+
+do_install () {
+	install -Dm 0755 whetstone ${D}${bindir}/whetstone
+}
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/acpitool/acpitool_0.5.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/acpitool/acpitool_0.5.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/acpitool/acpitool_0.5.1.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/acpitool/acpitool_0.5.1.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/cpufrequtils/cpufrequtils_008.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/cpufrequtils/cpufrequtils_008.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/edac-utils_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/edac-utils_git.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/files/add-restart-to-initscript.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/files/add-restart-to-initscript.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/files/add-restart-to-initscript.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/files/add-restart-to-initscript.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/files/edac.service b/import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/files/edac.service
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/files/edac.service
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/files/edac.service
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/files/make-init-script-be-able-to-automatically-load-EDAC-.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/files/make-init-script-be-able-to-automatically-load-EDAC-.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/edac-utils/files/make-init-script-be-able-to-automatically-load-EDAC-.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/edac-utils/files/make-init-script-be-able-to-automatically-load-EDAC-.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.15.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efibootmgr/efibootmgr_0.15.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.15.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/efibootmgr/efibootmgr_0.15.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch
new file mode 100644
index 0000000..b4ce132
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch
@@ -0,0 +1,33 @@
+From d65c325dd8681edf2ee3332eeb0a547229c7ffb5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 24 Aug 2017 15:54:47 -0700
+Subject: [PATCH] efivar-dp.h: Add -Wunknown-attributes when using clang
+
+change !dp check to a comparision against NULL to silent clang warning
+nonnull parameter 'dp' will evaluate to 'true' on first encounter
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/include/efivar/efivar-dp.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/include/efivar/efivar-dp.h b/src/include/efivar/efivar-dp.h
+index 3a509b7..c140e8d 100644
+--- a/src/include/efivar/efivar-dp.h
++++ b/src/include/efivar/efivar-dp.h
+@@ -783,9 +783,14 @@ extern int efidp_append_instance(const_efidp dp, const_efidp dpi, efidp *out);
+  * though older or other compilers might just ignore that attribute if they
+  * don't support it.  Ugh.
+  */
++#pragma GCC diagnostic push
+ #if defined(__GNUC__) && __GNUC__ >= 6
+ #pragma GCC diagnostic ignored "-Wnonnull-compare"
+ #endif
++#if defined(__clang__)
++#pragma GCC diagnostic ignored "-Wunknown-attributes"
++#pragma GCC diagnostic ignored "-Wpointer-bool-conversion"
++#endif
+ 
+ static inline int16_t
+ __attribute__((__artificial__))
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
new file mode 100644
index 0000000..251e50c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
@@ -0,0 +1,32 @@
+From a9115d9e6f0f62d6bb735ce3698858d1f89f8d73 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Fri, 25 Sep 2015 18:14:31 +0800
+Subject: [PATCH] efivar: fix for cross compile
+
+It builds and calls elf file makeguids to generate a header file which
+doesn't work for cross compile. Fix it.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ src/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 0c16597..dcc7fc8 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -40,8 +40,8 @@ abicheck : $(patsubst %.so,%.abicheck,$(LIBTARGETS))
+ ./guid-symbols.c : include/efivar/efivar-guids.h
+ ./guids.bin : include/efivar/efivar-guids.h
+ ./names.bin : include/efivar/efivar-guids.h
+-include/efivar/efivar-guids.h : makeguids guids.txt
+-	./makeguids guids.txt guids.bin names.bin \
++include/efivar/efivar-guids.h : guids.txt
++	makeguids guids.txt guids.bin names.bin \
+ 		guid-symbols.c include/efivar/efivar-guids.h
+ 
+ makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch
new file mode 100644
index 0000000..2a6eb06
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch
@@ -0,0 +1,35 @@
+From dd4291265b7b3d7d7ffa1d8adf32781ae25dbfeb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 00:29:42 -0700
+Subject: [PATCH] makeguids: Do not use __bswap_constant_{16|32} macros
+
+not available on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/makeguids.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/makeguids.c b/src/makeguids.c
+index da2f5f7..daf821a 100644
+--- a/src/makeguids.c
++++ b/src/makeguids.c
+@@ -155,13 +155,13 @@ main(int argc, char *argv[])
+ #if BYTE_ORDER == BIG_ENDIAN\n\
+ #define cpu_to_be32(n) (n)\n\
+ #define cpu_to_be16(n) (n)\n\
+-#define cpu_to_le32(n) (__bswap_constant_32(n))\n\
+-#define cpu_to_le16(n) (__bswap_constant_16(n))\n\
++#define cpu_to_le32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\
++#define cpu_to_le16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\
+ #else\n\
+ #define cpu_to_le32(n) (n)\n\
+ #define cpu_to_le16(n) (n)\n\
+-#define cpu_to_be32(n) (__bswap_constant_32(n))\n\
+-#define cpu_to_be16(n) (__bswap_constant_16(n))\n\
++#define cpu_to_be32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\
++#define cpu_to_be16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\
+ #endif\n\
+ """);
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0003-efivar-fix-for-cross-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0003-efivar-fix-for-cross-compile.patch
new file mode 100644
index 0000000..83105fe
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0003-efivar-fix-for-cross-compile.patch
@@ -0,0 +1,42 @@
+From dea4a55714249b2734a36701120fd22c91c64ec2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 7 May 2016 02:06:47 -0400
+Subject: [PATCH] Makefile: fix efivar.pc not found
+
+It fixes efivar.pc not found:
+...
+| install -d -m 755 efivar/0.23-r0/image/usr/lib/pkgconfig/
+| install -m 644 efivar.pc efivar/0.23-r0/image/usr/lib/pkgconfig/
+;  install -m 644 efiboot.pc efivar/0.23-r0/image/usr/lib/pkgconfig/
+;
+| install: cannot stat 'efivar.pc': No such file or directory
+| install: cannot stat 'efiboot.pc': No such file or directory
+| make[1]: *** [install] Error 1
+| make[1]: Leaving directory `efivar/0.23-r0/git/src'
+| make: *** [install] Error 2
+| ERROR: oe_runmake failed
+...
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ src/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index dcc7fc8..691aa8a 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -94,7 +94,9 @@ install : all
+ 		ln -fs $(x).1.$(VERSION) $(DESTDIR)$(libdir)/$(x) ;\
+ 		)
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(PCDIR)
+-	$(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(PCDIR) ;)
++	$(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(TOPDIR)/src/$(x).in $(DESTDIR)$(PCDIR)/$(x) ;\
++		sed -i -e "s:@@LIBDIR@@:$(libdir):g" -e "s:@@VERSION@@:$(VERSION):g" \
++			$(DESTDIR)$(PCDIR)/$(x); )
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)/efivar
+ 	$(foreach x, $(wildcard $(TOPDIR)/src/include/efivar/*.h), $(INSTALL) -m 644 $(x) $(DESTDIR)$(includedir)/efivar/$(notdir $(x));)
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/allow-multi-definitions-for-native.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/allow-multi-definitions-for-native.patch
new file mode 100644
index 0000000..f88af1f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/allow-multi-definitions-for-native.patch
@@ -0,0 +1,32 @@
+From c801dcb03d42eb533a9bead0b397d7ce4fc5a6fe Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Wed, 10 Aug 2016 17:49:50 +0800
+Subject: [PATCH] allow multi definitions for native
+
+Upstream-Status: Pending
+
+It fails to create .so file when build efivar-native:
+
+| lib.o:(*IND*+0x0): multiple definition of `efi_set_variable'
+| lib.o:lib.c:(.text+0xa0): first defined here
+
+Add link option '-z muldefs' to fix it.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ Make.rules | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Make.rules b/Make.rules
+index 88b9aa7..799332f 100644
+--- a/Make.rules
++++ b/Make.rules
+@@ -20,6 +20,7 @@ include $(TOPDIR)/Make.version
+ 	$(CCLD) $(ccldflags) $(CPPFLAGS) $(SOFLAGS) \
+ 	  -Wl,-soname,$@.1 \
+ 	  -Wl,--version-script=$(MAP) \
++	  -Wl,-z,muldefs \
+ 	  -o $@ $^ $(LDLIBS)
+ 
+ %.abixml : %.so
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch
new file mode 100644
index 0000000..dbc9a57
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch
@@ -0,0 +1,43 @@
+From 3edce6a0019bcb90febc1f654b5b2e2bad5c59bd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 26 May 2016 21:50:01 -0400
+Subject: [PATCH] fix compile failure with older host gcc (<=4.6)
+
+While host gcc version is 4.6.3 in ubuntu 1204, it
+did not recognize -std=gnu11 and -Wmaybe-uninitialized.
+
+While host gcc version is 4.4.7 in centos6, it
+did not recognize -std=gnu11, -Wmaybe-uninitialized,
+and -flto.
+
+For native build, use -std=gnu99 to replace -std=gnu11,
+and directly remove -Wmaybe-uninitialized and -flto.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ gcc.specs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc.specs b/gcc.specs
+index 45d43d1..f1c6944 100644
+--- a/gcc.specs
++++ b/gcc.specs
+@@ -2,13 +2,13 @@
+ + -D_GNU_SOURCE
+ 
+ *efivar_cpp_options:
+- -Werror -Wall -std=gnu11 -Wextra
++ -Werror -Wall -std=gnu99 -Wextra
+ 
+ *cpp_options:
+ + %(efivar_cpp_options)
+ 
+ *cc1_options:
+-+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
+++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
+ 
+ *self_spec:
+ + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch
new file mode 100644
index 0000000..5864ac6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch
@@ -0,0 +1,25 @@
+From 8000b9afc858472912aace985004b44f8eb467e0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 18 Aug 2017 09:49:49 -0700
+Subject: [PATCH] support musl
+
+Upstream-Status: Pending
+---
+ src/linux.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/linux.c b/src/linux.c
+index 34ed479..1304f2b 100644
+--- a/src/linux.c
++++ b/src/linux.c
+@@ -40,6 +40,10 @@
+ #include <efivar.h>
+ #include <efiboot.h>
+ 
++#if !defined(__GLIBC__)
++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
++#endif
++
+ #include "dp.h"
+ #include "linux.h"
+ #include "util.h"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar_0.31.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar_0.31.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar_0.31.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/efivar/efivar_0.31.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom/0001-platform-Add-riscv-to-known-platforms.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom/0001-platform-Add-riscv-to-known-platforms.patch
new file mode 100644
index 0000000..7ba69a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom/0001-platform-Add-riscv-to-known-platforms.patch
@@ -0,0 +1,37 @@
+From d2a28dcdbd1051d2f48320e2eda3393581fe0519 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Mar 2018 23:08:29 -0700
+Subject: [PATCH] platform: Add riscv to known platforms
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://review.coreboot.org/#/c/flashrom/+/25260/]
+ platform.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/platform.h b/platform.h
+index b2fdcd0..2cadbb3 100644
+--- a/platform.h
++++ b/platform.h
+@@ -69,6 +69,9 @@
+ #elif defined (__m68k__)
+ 	#define __FLASHROM_ARCH__ "m68k"
+ 	#define IS_M68K 1
++#elif defined (__riscv)
++	#define __FLASHROM_ARCH__ "riscv"
++	#define IS_RISCV 1
+ #elif defined (__sh__)
+ 	#define __FLASHROM_ARCH__ "sh"
+ 	#define IS_SH 1
+@@ -77,7 +80,7 @@
+ 	#define IS_S390 1
+ #endif
+ 
+-#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_SH || IS_S390)
++#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_RISCV || IS_SH || IS_S390)
+ #error Unknown architecture
+ #endif
+ 
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/sst26.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom/sst26.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/sst26.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom/sst26.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom_1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom_1.0.bb
new file mode 100644
index 0000000..9eac876
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-bsp/flashrom/flashrom_1.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips"
+LICENSE = "GPLv2"
+HOMEPAGE = "http://flashrom.org"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS = "pciutils libusb libusb-compat"
+
+SRC_URI = "https://download.flashrom.org/releases/flashrom-${PV}.tar.bz2 \
+           file://sst26.patch \
+           file://0001-platform-Add-riscv-to-known-platforms.patch \
+           "
+SRC_URI[md5sum] = "42d999990c735d88653627cefcc13b9a"
+SRC_URI[sha256sum] = "3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64"
+
+inherit pkgconfig
+
+do_install() {
+    oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/fancontrol b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/fancontrol
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/fancontrol
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/fancontrol
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensord b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensord
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensord
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensord
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensord.cgi b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensord.cgi
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensord.cgi
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensord.cgi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensord.conf b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensord.conf
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensord.conf
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensord.conf
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensors.conf b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensors.conf
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config/sensors.conf
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config/sensors.conf
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config_1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors-config_1.0.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-prog-Do-not-limit-sys-io.h-header-include-to-just-gl.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/fancontrol.init
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/fancontrol.init
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/sensord.init b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/sensord.init
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/sensord.init
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/sensord.init
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.4.0.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/lssci/lsscsi_0.28.bb b/import-layers/meta-openembedded/meta-oe/recipes-bsp/lssci/lsscsi_0.28.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/lssci/lsscsi_0.28.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-bsp/lssci/lsscsi_0.28.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
new file mode 100644
index 0000000..5535a3c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
@@ -0,0 +1,177 @@
+From 044ae35c5694c39a4aca2a33502cc3897e88f79e Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Fri, 14 Jul 2017 15:15:35 +0200
+Subject: [PATCH 1/7] hostapd: Avoid key reinstallation in FT handshake
+
+Do not reinstall TK to the driver during Reassociation Response frame
+processing if the first attempt of setting the TK succeeded. This avoids
+issues related to clearing the TX/RX PN that could result in reusing
+same PN values for transmitted frames (e.g., due to CCM nonce reuse and
+also hitting replay protection on the receiver) and accepting replayed
+frames on RX side.
+
+This issue was introduced by the commit
+0e84c25434e6a1f283c7b4e62e483729085b78d2 ('FT: Fix PTK configuration in
+authenticator') which allowed wpa_ft_install_ptk() to be called multiple
+times with the same PTK. While the second configuration attempt is
+needed with some drivers, it must be done only if the first attempt
+failed.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+
+Upstream-Status: Backport
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/ap/ieee802_11.c  | 16 +++++++++++++---
+ src/ap/wpa_auth.c    | 11 +++++++++++
+ src/ap/wpa_auth.h    |  3 ++-
+ src/ap/wpa_auth_ft.c | 10 ++++++++++
+ src/ap/wpa_auth_i.h  |  1 +
+ 5 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index 4e04169..333035f 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -1841,6 +1841,7 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ {
+ 	struct ieee80211_ht_capabilities ht_cap;
+ 	struct ieee80211_vht_capabilities vht_cap;
++	int set = 1;
+ 
+ 	/*
+ 	 * Remove the STA entry to ensure the STA PS state gets cleared and
+@@ -1848,9 +1849,18 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ 	 * FT-over-the-DS, where a station re-associates back to the same AP but
+ 	 * skips the authentication flow, or if working with a driver that
+ 	 * does not support full AP client state.
++	 *
++	 * Skip this if the STA has already completed FT reassociation and the
++	 * TK has been configured since the TX/RX PN must not be reset to 0 for
++	 * the same key.
+ 	 */
+-	if (!sta->added_unassoc)
++	if (!sta->added_unassoc &&
++	    (!(sta->flags & WLAN_STA_AUTHORIZED) ||
++	     !wpa_auth_sta_ft_tk_already_set(sta->wpa_sm))) {
+ 		hostapd_drv_sta_remove(hapd, sta->addr);
++		wpa_auth_sm_event(sta->wpa_sm, WPA_DRV_STA_REMOVED);
++		set = 0;
++	}
+ 
+ #ifdef CONFIG_IEEE80211N
+ 	if (sta->flags & WLAN_STA_HT)
+@@ -1873,11 +1883,11 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ 			    sta->flags & WLAN_STA_VHT ? &vht_cap : NULL,
+ 			    sta->flags | WLAN_STA_ASSOC, sta->qosinfo,
+ 			    sta->vht_opmode, sta->p2p_ie ? 1 : 0,
+-			    sta->added_unassoc)) {
++			    set)) {
+ 		hostapd_logger(hapd, sta->addr,
+ 			       HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE,
+ 			       "Could not %s STA to kernel driver",
+-			       sta->added_unassoc ? "set" : "add");
++			       set ? "set" : "add");
+ 
+ 		if (sta->added_unassoc) {
+ 			hostapd_drv_sta_remove(hapd, sta->addr);
+diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
+index 3587086..707971d 100644
+--- a/src/ap/wpa_auth.c
++++ b/src/ap/wpa_auth.c
+@@ -1745,6 +1745,9 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event)
+ #else /* CONFIG_IEEE80211R */
+ 		break;
+ #endif /* CONFIG_IEEE80211R */
++	case WPA_DRV_STA_REMOVED:
++		sm->tk_already_set = FALSE;
++		return 0;
+ 	}
+ 
+ #ifdef CONFIG_IEEE80211R
+@@ -3250,6 +3253,14 @@ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm)
+ }
+ 
+ 
++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm)
++{
++	if (!sm || !wpa_key_mgmt_ft(sm->wpa_key_mgmt))
++		return 0;
++	return sm->tk_already_set;
++}
++
++
+ int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
+ 			     struct rsn_pmksa_cache_entry *entry)
+ {
+diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h
+index 0de8d97..97461b0 100644
+--- a/src/ap/wpa_auth.h
++++ b/src/ap/wpa_auth.h
+@@ -267,7 +267,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
+ 		 u8 *data, size_t data_len);
+ enum wpa_event {
+ 	WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,
+-	WPA_REAUTH_EAPOL, WPA_ASSOC_FT
++	WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED
+ };
+ void wpa_remove_ptk(struct wpa_state_machine *sm);
+ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event);
+@@ -280,6 +280,7 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm);
+ int wpa_auth_get_pairwise(struct wpa_state_machine *sm);
+ int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm);
+ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm);
++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm);
+ int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
+ 			     struct rsn_pmksa_cache_entry *entry);
+ struct rsn_pmksa_cache_entry *
+diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
+index 42242a5..e63b99a 100644
+--- a/src/ap/wpa_auth_ft.c
++++ b/src/ap/wpa_auth_ft.c
+@@ -780,6 +780,14 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
+ 		return;
+ 	}
+ 
++	if (sm->tk_already_set) {
++		/* Must avoid TK reconfiguration to prevent clearing of TX/RX
++		 * PN in the driver */
++		wpa_printf(MSG_DEBUG,
++			   "FT: Do not re-install same PTK to the driver");
++		return;
++	}
++
+ 	/* FIX: add STA entry to kernel/driver here? The set_key will fail
+ 	 * most likely without this.. At the moment, STA entry is added only
+ 	 * after association has been completed. This function will be called
+@@ -792,6 +800,7 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
+ 
+ 	/* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */
+ 	sm->pairwise_set = TRUE;
++	sm->tk_already_set = TRUE;
+ }
+ 
+ 
+@@ -898,6 +907,7 @@ static int wpa_ft_process_auth_req(struct wpa_state_machine *sm,
+ 
+ 	sm->pairwise = pairwise;
+ 	sm->PTK_valid = TRUE;
++	sm->tk_already_set = FALSE;
+ 	wpa_ft_install_ptk(sm);
+ 
+ 	buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
+diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h
+index 72b7eb3..7fd8f05 100644
+--- a/src/ap/wpa_auth_i.h
++++ b/src/ap/wpa_auth_i.h
+@@ -65,6 +65,7 @@ struct wpa_state_machine {
+ 	struct wpa_ptk PTK;
+ 	Boolean PTK_valid;
+ 	Boolean pairwise_set;
++	Boolean tk_already_set;
+ 	int keycount;
+ 	Boolean Pair;
+ 	struct wpa_key_replay_counter {
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
new file mode 100644
index 0000000..4e57bca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
@@ -0,0 +1,253 @@
+From c623cc973de525f7411dffe438e957ba86ef4733 Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Wed, 12 Jul 2017 16:03:24 +0200
+Subject: [PATCH 2/7] Prevent reinstallation of an already in-use group key
+
+Track the current GTK and IGTK that is in use and when receiving a
+(possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do
+not install the given key if it is already in use. This prevents an
+attacker from trying to trick the client into resetting or lowering the
+sequence counter associated to the group key.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+
+Upstream-Status: Backport
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/common/wpa_common.h |  11 +++++
+ src/rsn_supp/wpa.c      | 116 ++++++++++++++++++++++++++++++------------------
+ src/rsn_supp/wpa_i.h    |   4 ++
+ 3 files changed, 87 insertions(+), 44 deletions(-)
+
+diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
+index af1d0f0..d200285 100644
+--- a/src/common/wpa_common.h
++++ b/src/common/wpa_common.h
+@@ -217,6 +217,17 @@ struct wpa_ptk {
+ 	size_t tk_len;
+ };
+ 
++struct wpa_gtk {
++	u8 gtk[WPA_GTK_MAX_LEN];
++	size_t gtk_len;
++};
++
++#ifdef CONFIG_IEEE80211W
++struct wpa_igtk {
++	u8 igtk[WPA_IGTK_MAX_LEN];
++	size_t igtk_len;
++};
++#endif /* CONFIG_IEEE80211W */
+ 
+ /* WPA IE version 1
+  * 00-50-f2:1 (OUI:OUI type)
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 3c47879..95bd7be 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -714,6 +714,15 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ 	const u8 *_gtk = gd->gtk;
+ 	u8 gtk_buf[32];
+ 
++	/* Detect possible key reinstallation */
++	if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
++	    os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
++		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++			"WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
++			gd->keyidx, gd->tx, gd->gtk_len);
++		return 0;
++	}
++
+ 	wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len);
+ 	wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ 		"WPA: Installing GTK to the driver (keyidx=%d tx=%d len=%d)",
+@@ -748,6 +757,9 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ 	}
+ 	os_memset(gtk_buf, 0, sizeof(gtk_buf));
+ 
++	sm->gtk.gtk_len = gd->gtk_len;
++	os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++
+ 	return 0;
+ }
+ 
+@@ -854,6 +866,48 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+ }
+ 
+ 
++#ifdef CONFIG_IEEE80211W
++static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
++				       const struct wpa_igtk_kde *igtk)
++{
++	size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
++	u16 keyidx = WPA_GET_LE16(igtk->keyid);
++
++	/* Detect possible key reinstallation */
++	if (sm->igtk.igtk_len == len &&
++	    os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
++		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++			"WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
++			keyidx);
++		return  0;
++	}
++
++	wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++		"WPA: IGTK keyid %d pn %02x%02x%02x%02x%02x%02x",
++		keyidx, MAC2STR(igtk->pn));
++	wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", igtk->igtk, len);
++	if (keyidx > 4095) {
++		wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
++			"WPA: Invalid IGTK KeyID %d", keyidx);
++		return -1;
++	}
++	if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
++			   broadcast_ether_addr,
++			   keyidx, 0, igtk->pn, sizeof(igtk->pn),
++			   igtk->igtk, len) < 0) {
++		wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
++			"WPA: Failed to configure IGTK to the driver");
++		return -1;
++	}
++
++	sm->igtk.igtk_len = len;
++	os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++
++	return 0;
++}
++#endif /* CONFIG_IEEE80211W */
++
++
+ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ 			       struct wpa_eapol_ie_parse *ie)
+ {
+@@ -864,30 +918,14 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ 	if (ie->igtk) {
+ 		size_t len;
+ 		const struct wpa_igtk_kde *igtk;
+-		u16 keyidx;
++
+ 		len = wpa_cipher_key_len(sm->mgmt_group_cipher);
+ 		if (ie->igtk_len != WPA_IGTK_KDE_PREFIX_LEN + len)
+ 			return -1;
++
+ 		igtk = (const struct wpa_igtk_kde *) ie->igtk;
+-		keyidx = WPA_GET_LE16(igtk->keyid);
+-		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d "
+-			"pn %02x%02x%02x%02x%02x%02x",
+-			keyidx, MAC2STR(igtk->pn));
+-		wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK",
+-				igtk->igtk, len);
+-		if (keyidx > 4095) {
+-			wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
+-				"WPA: Invalid IGTK KeyID %d", keyidx);
+-			return -1;
+-		}
+-		if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
+-				   broadcast_ether_addr,
+-				   keyidx, 0, igtk->pn, sizeof(igtk->pn),
+-				   igtk->igtk, len) < 0) {
+-			wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
+-				"WPA: Failed to configure IGTK to the driver");
++		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
+ 			return -1;
+-		}
+ 	}
+ 
+ 	return 0;
+@@ -2307,7 +2345,7 @@ void wpa_sm_deinit(struct wpa_sm *sm)
+  */
+ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ {
+-	int clear_ptk = 1;
++	int clear_keys = 1;
+ 
+ 	if (sm == NULL)
+ 		return;
+@@ -2333,11 +2371,11 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ 		/* Prepare for the next transition */
+ 		wpa_ft_prepare_auth_request(sm, NULL);
+ 
+-		clear_ptk = 0;
++		clear_keys = 0;
+ 	}
+ #endif /* CONFIG_IEEE80211R */
+ 
+-	if (clear_ptk) {
++	if (clear_keys) {
+ 		/*
+ 		 * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if
+ 		 * this is not part of a Fast BSS Transition.
+@@ -2347,6 +2385,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ 		os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ 		sm->tptk_set = 0;
+ 		os_memset(&sm->tptk, 0, sizeof(sm->tptk));
++		os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++#ifdef CONFIG_IEEE80211W
++		os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++#endif /* CONFIG_IEEE80211W */
+ 	}
+ 
+ #ifdef CONFIG_TDLS
+@@ -2877,6 +2919,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
+ 	os_memset(sm->pmk, 0, sizeof(sm->pmk));
+ 	os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ 	os_memset(&sm->tptk, 0, sizeof(sm->tptk));
++	os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++#ifdef CONFIG_IEEE80211W
++	os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++#endif /* CONFIG_IEEE80211W */
+ #ifdef CONFIG_IEEE80211R
+ 	os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
+ 	os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0));
+@@ -2949,29 +2995,11 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+ 		os_memset(&gd, 0, sizeof(gd));
+ #ifdef CONFIG_IEEE80211W
+ 	} else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) {
+-		struct wpa_igtk_kde igd;
+-		u16 keyidx;
+-
+-		os_memset(&igd, 0, sizeof(igd));
+-		keylen = wpa_cipher_key_len(sm->mgmt_group_cipher);
+-		os_memcpy(igd.keyid, buf + 2, 2);
+-		os_memcpy(igd.pn, buf + 4, 6);
+-
+-		keyidx = WPA_GET_LE16(igd.keyid);
+-		os_memcpy(igd.igtk, buf + 10, keylen);
+-
+-		wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)",
+-				igd.igtk, keylen);
+-		if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
+-				   broadcast_ether_addr,
+-				   keyidx, 0, igd.pn, sizeof(igd.pn),
+-				   igd.igtk, keylen) < 0) {
+-			wpa_printf(MSG_DEBUG, "Failed to install the IGTK in "
+-				   "WNM mode");
+-			os_memset(&igd, 0, sizeof(igd));
++		const struct wpa_igtk_kde *igtk;
++
++		igtk = (const struct wpa_igtk_kde *) (buf + 2);
++		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
+ 			return -1;
+-		}
+-		os_memset(&igd, 0, sizeof(igd));
+ #endif /* CONFIG_IEEE80211W */
+ 	} else {
+ 		wpa_printf(MSG_DEBUG, "Unknown element id");
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index f653ba6..afc9e37 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -31,6 +31,10 @@ struct wpa_sm {
+ 	u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN];
+ 	int rx_replay_counter_set;
+ 	u8 request_counter[WPA_REPLAY_COUNTER_LEN];
++	struct wpa_gtk gtk;
++#ifdef CONFIG_IEEE80211W
++	struct wpa_igtk igtk;
++#endif /* CONFIG_IEEE80211W */
+ 
+ 	struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
+ 
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
new file mode 100644
index 0000000..e39bbf6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
@@ -0,0 +1,187 @@
+From a6caab8060ab60876e233306f5c586451169eba1 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sun, 1 Oct 2017 12:12:24 +0300
+Subject: [PATCH 3/7] Extend protection of GTK/IGTK reinstallation of WNM-Sleep
+ Mode cases
+
+This extends the protection to track last configured GTK/IGTK value
+separately from EAPOL-Key frames and WNM-Sleep Mode frames to cover a
+corner case where these two different mechanisms may get used when the
+GTK/IGTK has changed and tracking a single value is not sufficient to
+detect a possible key reconfiguration.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+
+Upstream-Status: Backport
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/rsn_supp/wpa.c   | 53 +++++++++++++++++++++++++++++++++++++---------------
+ src/rsn_supp/wpa_i.h |  2 ++
+ 2 files changed, 40 insertions(+), 15 deletions(-)
+
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 95bd7be..7a2c68d 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -709,14 +709,17 @@ struct wpa_gtk_data {
+ 
+ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ 				      const struct wpa_gtk_data *gd,
+-				      const u8 *key_rsc)
++				      const u8 *key_rsc, int wnm_sleep)
+ {
+ 	const u8 *_gtk = gd->gtk;
+ 	u8 gtk_buf[32];
+ 
+ 	/* Detect possible key reinstallation */
+-	if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
+-	    os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
++	if ((sm->gtk.gtk_len == (size_t) gd->gtk_len &&
++	     os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) ||
++	    (sm->gtk_wnm_sleep.gtk_len == (size_t) gd->gtk_len &&
++	     os_memcmp(sm->gtk_wnm_sleep.gtk, gd->gtk,
++		       sm->gtk_wnm_sleep.gtk_len) == 0)) {
+ 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ 			"WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
+ 			gd->keyidx, gd->tx, gd->gtk_len);
+@@ -757,8 +760,14 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ 	}
+ 	os_memset(gtk_buf, 0, sizeof(gtk_buf));
+ 
+-	sm->gtk.gtk_len = gd->gtk_len;
+-	os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++	if (wnm_sleep) {
++		sm->gtk_wnm_sleep.gtk_len = gd->gtk_len;
++		os_memcpy(sm->gtk_wnm_sleep.gtk, gd->gtk,
++			  sm->gtk_wnm_sleep.gtk_len);
++	} else {
++		sm->gtk.gtk_len = gd->gtk_len;
++		os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++	}
+ 
+ 	return 0;
+ }
+@@ -852,7 +861,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+ 	    (wpa_supplicant_check_group_cipher(sm, sm->group_cipher,
+ 					       gtk_len, gtk_len,
+ 					       &gd.key_rsc_len, &gd.alg) ||
+-	     wpa_supplicant_install_gtk(sm, &gd, key_rsc))) {
++	     wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0))) {
+ 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ 			"RSN: Failed to install GTK");
+ 		os_memset(&gd, 0, sizeof(gd));
+@@ -868,14 +877,18 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+ 
+ #ifdef CONFIG_IEEE80211W
+ static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
+-				       const struct wpa_igtk_kde *igtk)
++				       const struct wpa_igtk_kde *igtk,
++				       int wnm_sleep)
+ {
+ 	size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
+ 	u16 keyidx = WPA_GET_LE16(igtk->keyid);
+ 
+ 	/* Detect possible key reinstallation */
+-	if (sm->igtk.igtk_len == len &&
+-	    os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
++	if ((sm->igtk.igtk_len == len &&
++	     os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) ||
++	    (sm->igtk_wnm_sleep.igtk_len == len &&
++	     os_memcmp(sm->igtk_wnm_sleep.igtk, igtk->igtk,
++		       sm->igtk_wnm_sleep.igtk_len) == 0)) {
+ 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ 			"WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
+ 			keyidx);
+@@ -900,8 +913,14 @@ static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
+ 		return -1;
+ 	}
+ 
+-	sm->igtk.igtk_len = len;
+-	os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++	if (wnm_sleep) {
++		sm->igtk_wnm_sleep.igtk_len = len;
++		os_memcpy(sm->igtk_wnm_sleep.igtk, igtk->igtk,
++			  sm->igtk_wnm_sleep.igtk_len);
++	} else {
++		sm->igtk.igtk_len = len;
++		os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++	}
+ 
+ 	return 0;
+ }
+@@ -924,7 +943,7 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ 			return -1;
+ 
+ 		igtk = (const struct wpa_igtk_kde *) ie->igtk;
+-		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
++		if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0)
+ 			return -1;
+ 	}
+ 
+@@ -1574,7 +1593,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm,
+ 	if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc))
+ 		key_rsc = null_rsc;
+ 
+-	if (wpa_supplicant_install_gtk(sm, &gd, key_rsc) ||
++	if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0) ||
+ 	    wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0)
+ 		goto failed;
+ 	os_memset(&gd, 0, sizeof(gd));
+@@ -2386,8 +2405,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ 		sm->tptk_set = 0;
+ 		os_memset(&sm->tptk, 0, sizeof(sm->tptk));
+ 		os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++		os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
+ #ifdef CONFIG_IEEE80211W
+ 		os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++		os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
+ #endif /* CONFIG_IEEE80211W */
+ 	}
+ 
+@@ -2920,8 +2941,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
+ 	os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ 	os_memset(&sm->tptk, 0, sizeof(sm->tptk));
+ 	os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++	os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
+ #ifdef CONFIG_IEEE80211W
+ 	os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++	os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
+ #endif /* CONFIG_IEEE80211W */
+ #ifdef CONFIG_IEEE80211R
+ 	os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
+@@ -2986,7 +3009,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+ 
+ 		wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)",
+ 				gd.gtk, gd.gtk_len);
+-		if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) {
++		if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 1)) {
+ 			os_memset(&gd, 0, sizeof(gd));
+ 			wpa_printf(MSG_DEBUG, "Failed to install the GTK in "
+ 				   "WNM mode");
+@@ -2998,7 +3021,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+ 		const struct wpa_igtk_kde *igtk;
+ 
+ 		igtk = (const struct wpa_igtk_kde *) (buf + 2);
+-		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
++		if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0)
+ 			return -1;
+ #endif /* CONFIG_IEEE80211W */
+ 	} else {
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index afc9e37..9a54631 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -32,8 +32,10 @@ struct wpa_sm {
+ 	int rx_replay_counter_set;
+ 	u8 request_counter[WPA_REPLAY_COUNTER_LEN];
+ 	struct wpa_gtk gtk;
++	struct wpa_gtk gtk_wnm_sleep;
+ #ifdef CONFIG_IEEE80211W
+ 	struct wpa_igtk igtk;
++	struct wpa_igtk igtk_wnm_sleep;
+ #endif /* CONFIG_IEEE80211W */
+ 
+ 	struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch
new file mode 100644
index 0000000..5103625
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0004-Prevent-installation-of-an-all-zero-TK.patch
@@ -0,0 +1,82 @@
+From abf941647f2dc33b0b59612f525e1b292331cc9f Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Fri, 29 Sep 2017 04:22:51 +0200
+Subject: [PATCH 4/7] Prevent installation of an all-zero TK
+
+Properly track whether a PTK has already been installed to the driver
+and the TK part cleared from memory. This prevents an attacker from
+trying to trick the client into installing an all-zero TK.
+
+This fixes the earlier fix in commit
+ad00d64e7d8827b3cebd665a0ceb08adabf15e1e ('Fix TK configuration to the
+driver in EAPOL-Key 3/4 retry case') which did not take into account
+possibility of an extra message 1/4 showing up between retries of
+message 3/4.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+
+Upstream-Status: Backport
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/common/wpa_common.h | 1 +
+ src/rsn_supp/wpa.c      | 5 ++---
+ src/rsn_supp/wpa_i.h    | 1 -
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
+index d200285..1021ccb 100644
+--- a/src/common/wpa_common.h
++++ b/src/common/wpa_common.h
+@@ -215,6 +215,7 @@ struct wpa_ptk {
+ 	size_t kck_len;
+ 	size_t kek_len;
+ 	size_t tk_len;
++	int installed; /* 1 if key has already been installed to driver */
+ };
+ 
+ struct wpa_gtk {
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 7a2c68d..0550a41 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -510,7 +510,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
+ 		os_memset(buf, 0, sizeof(buf));
+ 	}
+ 	sm->tptk_set = 1;
+-	sm->tk_to_set = 1;
+ 
+ 	kde = sm->assoc_wpa_ie;
+ 	kde_len = sm->assoc_wpa_ie_len;
+@@ -615,7 +614,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
+ 	enum wpa_alg alg;
+ 	const u8 *key_rsc;
+ 
+-	if (!sm->tk_to_set) {
++	if (sm->ptk.installed) {
+ 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ 			"WPA: Do not re-install same PTK to the driver");
+ 		return 0;
+@@ -659,7 +658,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
+ 
+ 	/* TK is not needed anymore in supplicant */
+ 	os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN);
+-	sm->tk_to_set = 0;
++	sm->ptk.installed = 1;
+ 
+ 	if (sm->wpa_ptk_rekey) {
+ 		eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL);
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index 9a54631..41f371f 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -24,7 +24,6 @@ struct wpa_sm {
+ 	struct wpa_ptk ptk, tptk;
+ 	int ptk_set, tptk_set;
+ 	unsigned int msg_3_of_4_ok:1;
+-	unsigned int tk_to_set:1;
+ 	u8 snonce[WPA_NONCE_LEN];
+ 	u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */
+ 	int renew_snonce;
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
new file mode 100644
index 0000000..b0e1df3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
@@ -0,0 +1,67 @@
+From 804b9d72808cddd822e7dcec4d60f40c1aceda82 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sun, 1 Oct 2017 12:32:57 +0300
+Subject: [PATCH 5/7] Fix PTK rekeying to generate a new ANonce
+
+The Authenticator state machine path for PTK rekeying ended up bypassing
+the AUTHENTICATION2 state where a new ANonce is generated when going
+directly to the PTKSTART state since there is no need to try to
+determine the PMK again in such a case. This is far from ideal since the
+new PTK would depend on a new nonce only from the supplicant.
+
+Fix this by generating a new ANonce when moving to the PTKSTART state
+for the purpose of starting new 4-way handshake to rekey PTK.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+
+Upstream-Status: Backport
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/ap/wpa_auth.c | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
+index 707971d..bf10cc1 100644
+--- a/src/ap/wpa_auth.c
++++ b/src/ap/wpa_auth.c
+@@ -1901,6 +1901,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2)
+ }
+ 
+ 
++static int wpa_auth_sm_ptk_update(struct wpa_state_machine *sm)
++{
++	if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
++		wpa_printf(MSG_ERROR,
++			   "WPA: Failed to get random data for ANonce");
++		sm->Disconnect = TRUE;
++		return -1;
++	}
++	wpa_hexdump(MSG_DEBUG, "WPA: Assign new ANonce", sm->ANonce,
++		    WPA_NONCE_LEN);
++	sm->TimeoutCtr = 0;
++	return 0;
++}
++
++
+ SM_STATE(WPA_PTK, INITPMK)
+ {
+ 	u8 msk[2 * PMK_LEN];
+@@ -2458,9 +2473,12 @@ SM_STEP(WPA_PTK)
+ 		SM_ENTER(WPA_PTK, AUTHENTICATION);
+ 	else if (sm->ReAuthenticationRequest)
+ 		SM_ENTER(WPA_PTK, AUTHENTICATION2);
+-	else if (sm->PTKRequest)
+-		SM_ENTER(WPA_PTK, PTKSTART);
+-	else switch (sm->wpa_ptk_state) {
++	else if (sm->PTKRequest) {
++		if (wpa_auth_sm_ptk_update(sm) < 0)
++			SM_ENTER(WPA_PTK, DISCONNECTED);
++		else
++			SM_ENTER(WPA_PTK, PTKSTART);
++	} else switch (sm->wpa_ptk_state) {
+ 	case WPA_PTK_INITIALIZE:
+ 		break;
+ 	case WPA_PTK_DISCONNECT:
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch
new file mode 100644
index 0000000..72c7d51
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0006-TDLS-Reject-TPK-TK-reconfiguration.patch
@@ -0,0 +1,135 @@
+From 7fd26db2d8147ed662db192c41d7bc15752a601d Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 11:03:15 +0300
+Subject: [PATCH 6/7] TDLS: Reject TPK-TK reconfiguration
+
+Do not try to reconfigure the same TPK-TK to the driver after it has
+been successfully configured. This is an explicit check to avoid issues
+related to resetting the TX/RX packet number. There was already a check
+for this for TPK M2 (retries of that message are ignored completely), so
+that behavior does not get modified.
+
+For TPK M3, the TPK-TK could have been reconfigured, but that was
+followed by immediate teardown of the link due to an issue in updating
+the STA entry. Furthermore, for TDLS with any real security (i.e.,
+ignoring open/WEP), the TPK message exchange is protected on the AP path
+and simple replay attacks are not feasible.
+
+As an additional corner case, make sure the local nonce gets updated if
+the peer uses a very unlikely "random nonce" of all zeros.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+
+Upstream-Status: Backport
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/rsn_supp/tdls.c | 38 ++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
+index e424168..9eb9738 100644
+--- a/src/rsn_supp/tdls.c
++++ b/src/rsn_supp/tdls.c
+@@ -112,6 +112,7 @@ struct wpa_tdls_peer {
+ 		u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */
+ 	} tpk;
+ 	int tpk_set;
++	int tk_set; /* TPK-TK configured to the driver */
+ 	int tpk_success;
+ 	int tpk_in_progress;
+ 
+@@ -192,6 +193,20 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ 	u8 rsc[6];
+ 	enum wpa_alg alg;
+ 
++	if (peer->tk_set) {
++		/*
++		 * This same TPK-TK has already been configured to the driver
++		 * and this new configuration attempt (likely due to an
++		 * unexpected retransmitted frame) would result in clearing
++		 * the TX/RX sequence number which can break security, so must
++		 * not allow that to happen.
++		 */
++		wpa_printf(MSG_INFO, "TDLS: TPK-TK for the peer " MACSTR
++			   " has already been configured to the driver - do not reconfigure",
++			   MAC2STR(peer->addr));
++		return -1;
++	}
++
+ 	os_memset(rsc, 0, 6);
+ 
+ 	switch (peer->cipher) {
+@@ -209,12 +224,15 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ 		return -1;
+ 	}
+ 
++	wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR,
++		   MAC2STR(peer->addr));
+ 	if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1,
+ 			   rsc, sizeof(rsc), peer->tpk.tk, key_len) < 0) {
+ 		wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the "
+ 			   "driver");
+ 		return -1;
+ 	}
++	peer->tk_set = 1;
+ 	return 0;
+ }
+ 
+@@ -696,7 +714,7 @@ static void wpa_tdls_peer_clear(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ 	peer->cipher = 0;
+ 	peer->qos_info = 0;
+ 	peer->wmm_capable = 0;
+-	peer->tpk_set = peer->tpk_success = 0;
++	peer->tk_set = peer->tpk_set = peer->tpk_success = 0;
+ 	peer->chan_switch_enabled = 0;
+ 	os_memset(&peer->tpk, 0, sizeof(peer->tpk));
+ 	os_memset(peer->inonce, 0, WPA_NONCE_LEN);
+@@ -1159,6 +1177,7 @@ skip_rsnie:
+ 		wpa_tdls_peer_free(sm, peer);
+ 		return -1;
+ 	}
++	peer->tk_set = 0; /* A new nonce results in a new TK */
+ 	wpa_hexdump(MSG_DEBUG, "TDLS: Initiator Nonce for TPK handshake",
+ 		    peer->inonce, WPA_NONCE_LEN);
+ 	os_memcpy(ftie->Snonce, peer->inonce, WPA_NONCE_LEN);
+@@ -1751,6 +1770,19 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, struct wpa_tdls_peer *peer,
+ }
+ 
+ 
++static int tdls_nonce_set(const u8 *nonce)
++{
++	int i;
++
++	for (i = 0; i < WPA_NONCE_LEN; i++) {
++		if (nonce[i])
++			return 1;
++	}
++
++	return 0;
++}
++
++
+ static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
+ 				   const u8 *buf, size_t len)
+ {
+@@ -2004,7 +2036,8 @@ skip_rsn:
+ 	peer->rsnie_i_len = kde.rsn_ie_len;
+ 	peer->cipher = cipher;
+ 
+-	if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0) {
++	if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0 ||
++	    !tdls_nonce_set(peer->inonce)) {
+ 		/*
+ 		 * There is no point in updating the RNonce for every obtained
+ 		 * TPK M1 frame (e.g., retransmission due to timeout) with the
+@@ -2020,6 +2053,7 @@ skip_rsn:
+ 				"TDLS: Failed to get random data for responder nonce");
+ 			goto error;
+ 		}
++		peer->tk_set = 0; /* A new nonce results in a new TK */
+ 	}
+ 
+ #if 0
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
new file mode 100644
index 0000000..d0978c7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
@@ -0,0 +1,85 @@
+From a42eb67c42f845faf266b0633d52e17f2a82f511 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 12:06:37 +0300
+Subject: [PATCH 7/7] FT: Do not allow multiple Reassociation Response frames
+
+The driver is expected to not report a second association event without
+the station having explicitly request a new association. As such, this
+case should not be reachable. However, since reconfiguring the same
+pairwise or group keys to the driver could result in nonce reuse issues,
+be extra careful here and do an additional state check to avoid this
+even if the local driver ends up somehow accepting an unexpected
+Reassociation Response frame.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+
+Upstream-Status: Backport
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/rsn_supp/wpa.c    | 3 +++
+ src/rsn_supp/wpa_ft.c | 8 ++++++++
+ src/rsn_supp/wpa_i.h  | 1 +
+ 3 files changed, 12 insertions(+)
+
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 0550a41..2a53c6f 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -2440,6 +2440,9 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm)
+ #ifdef CONFIG_TDLS
+ 	wpa_tdls_disassoc(sm);
+ #endif /* CONFIG_TDLS */
++#ifdef CONFIG_IEEE80211R
++	sm->ft_reassoc_completed = 0;
++#endif /* CONFIG_IEEE80211R */
+ 
+ 	/* Keys are not needed in the WPA state machine anymore */
+ 	wpa_sm_drop_sa(sm);
+diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c
+index 205793e..d45bb45 100644
+--- a/src/rsn_supp/wpa_ft.c
++++ b/src/rsn_supp/wpa_ft.c
+@@ -153,6 +153,7 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len,
+ 	u16 capab;
+ 
+ 	sm->ft_completed = 0;
++	sm->ft_reassoc_completed = 0;
+ 
+ 	buf_len = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
+ 		2 + sm->r0kh_id_len + ric_ies_len + 100;
+@@ -681,6 +682,11 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
+ 		return -1;
+ 	}
+ 
++	if (sm->ft_reassoc_completed) {
++		wpa_printf(MSG_DEBUG, "FT: Reassociation has already been completed for this FT protocol instance - ignore unexpected retransmission");
++		return 0;
++	}
++
+ 	if (wpa_ft_parse_ies(ies, ies_len, &parse) < 0) {
+ 		wpa_printf(MSG_DEBUG, "FT: Failed to parse IEs");
+ 		return -1;
+@@ -781,6 +787,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
+ 		return -1;
+ 	}
+ 
++	sm->ft_reassoc_completed = 1;
++
+ 	if (wpa_ft_process_gtk_subelem(sm, parse.gtk, parse.gtk_len) < 0)
+ 		return -1;
+ 
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index 41f371f..56f88dc 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -128,6 +128,7 @@ struct wpa_sm {
+ 	size_t r0kh_id_len;
+ 	u8 r1kh_id[FT_R1KH_ID_LEN];
+ 	int ft_completed;
++	int ft_reassoc_completed;
+ 	int over_the_ds_in_progress;
+ 	u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */
+ 	int set_ptk_after_assoc;
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/key-replay-cve-multiple.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/key-replay-cve-multiple.patch
deleted file mode 100644
index 694da8f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/key-replay-cve-multiple.patch
+++ /dev/null
@@ -1,984 +0,0 @@
-The WPA2 four-way handshake protocol is vulnerable to replay attacks which can
-result in unauthenticated clients gaining access to the network.
-
-Backport a number of patches from upstream to fix this.
-
-CVE: CVE-2017-13077
-CVE: CVE-2017-13078
-CVE: CVE-2017-13079
-CVE: CVE-2017-13080
-CVE: CVE-2017-13081
-CVE: CVE-2017-13082
-CVE: CVE-2017-13086
-CVE: CVE-2017-13087
-CVE: CVE-2017-13088
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From cf4cab804c7afd5c45505528a8d16e46163243a2 Mon Sep 17 00:00:00 2001
-From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
-Date: Fri, 14 Jul 2017 15:15:35 +0200
-Subject: [PATCH 1/8] hostapd: Avoid key reinstallation in FT handshake
-
-Do not reinstall TK to the driver during Reassociation Response frame
-processing if the first attempt of setting the TK succeeded. This avoids
-issues related to clearing the TX/RX PN that could result in reusing
-same PN values for transmitted frames (e.g., due to CCM nonce reuse and
-also hitting replay protection on the receiver) and accepting replayed
-frames on RX side.
-
-This issue was introduced by the commit
-0e84c25434e6a1f283c7b4e62e483729085b78d2 ('FT: Fix PTK configuration in
-authenticator') which allowed wpa_ft_install_ptk() to be called multiple
-times with the same PTK. While the second configuration attempt is
-needed with some drivers, it must be done only if the first attempt
-failed.
-
-Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
----
- src/ap/ieee802_11.c  | 16 +++++++++++++---
- src/ap/wpa_auth.c    | 11 +++++++++++
- src/ap/wpa_auth.h    |  3 ++-
- src/ap/wpa_auth_ft.c | 10 ++++++++++
- src/ap/wpa_auth_i.h  |  1 +
- 5 files changed, 37 insertions(+), 4 deletions(-)
-
-diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
-index 4e04169..333035f 100644
---- a/src/ap/ieee802_11.c
-+++ b/src/ap/ieee802_11.c
-@@ -1841,6 +1841,7 @@ static int add_associated_sta(struct hostapd_data *hapd,
- {
- 	struct ieee80211_ht_capabilities ht_cap;
- 	struct ieee80211_vht_capabilities vht_cap;
-+	int set = 1;
- 
- 	/*
- 	 * Remove the STA entry to ensure the STA PS state gets cleared and
-@@ -1848,9 +1849,18 @@ static int add_associated_sta(struct hostapd_data *hapd,
- 	 * FT-over-the-DS, where a station re-associates back to the same AP but
- 	 * skips the authentication flow, or if working with a driver that
- 	 * does not support full AP client state.
-+	 *
-+	 * Skip this if the STA has already completed FT reassociation and the
-+	 * TK has been configured since the TX/RX PN must not be reset to 0 for
-+	 * the same key.
- 	 */
--	if (!sta->added_unassoc)
-+	if (!sta->added_unassoc &&
-+	    (!(sta->flags & WLAN_STA_AUTHORIZED) ||
-+	     !wpa_auth_sta_ft_tk_already_set(sta->wpa_sm))) {
- 		hostapd_drv_sta_remove(hapd, sta->addr);
-+		wpa_auth_sm_event(sta->wpa_sm, WPA_DRV_STA_REMOVED);
-+		set = 0;
-+	}
- 
- #ifdef CONFIG_IEEE80211N
- 	if (sta->flags & WLAN_STA_HT)
-@@ -1873,11 +1883,11 @@ static int add_associated_sta(struct hostapd_data *hapd,
- 			    sta->flags & WLAN_STA_VHT ? &vht_cap : NULL,
- 			    sta->flags | WLAN_STA_ASSOC, sta->qosinfo,
- 			    sta->vht_opmode, sta->p2p_ie ? 1 : 0,
--			    sta->added_unassoc)) {
-+			    set)) {
- 		hostapd_logger(hapd, sta->addr,
- 			       HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE,
- 			       "Could not %s STA to kernel driver",
--			       sta->added_unassoc ? "set" : "add");
-+			       set ? "set" : "add");
- 
- 		if (sta->added_unassoc) {
- 			hostapd_drv_sta_remove(hapd, sta->addr);
-diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
-index 3587086..707971d 100644
---- a/src/ap/wpa_auth.c
-+++ b/src/ap/wpa_auth.c
-@@ -1745,6 +1745,9 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event)
- #else /* CONFIG_IEEE80211R */
- 		break;
- #endif /* CONFIG_IEEE80211R */
-+	case WPA_DRV_STA_REMOVED:
-+		sm->tk_already_set = FALSE;
-+		return 0;
- 	}
- 
- #ifdef CONFIG_IEEE80211R
-@@ -3250,6 +3253,14 @@ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm)
- }
- 
- 
-+int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm)
-+{
-+	if (!sm || !wpa_key_mgmt_ft(sm->wpa_key_mgmt))
-+		return 0;
-+	return sm->tk_already_set;
-+}
-+
-+
- int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
- 			     struct rsn_pmksa_cache_entry *entry)
- {
-diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h
-index 0de8d97..97461b0 100644
---- a/src/ap/wpa_auth.h
-+++ b/src/ap/wpa_auth.h
-@@ -267,7 +267,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
- 		 u8 *data, size_t data_len);
- enum wpa_event {
- 	WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,
--	WPA_REAUTH_EAPOL, WPA_ASSOC_FT
-+	WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED
- };
- void wpa_remove_ptk(struct wpa_state_machine *sm);
- int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event);
-@@ -280,6 +280,7 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm);
- int wpa_auth_get_pairwise(struct wpa_state_machine *sm);
- int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm);
- int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm);
-+int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm);
- int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
- 			     struct rsn_pmksa_cache_entry *entry);
- struct rsn_pmksa_cache_entry *
-diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
-index 42242a5..e63b99a 100644
---- a/src/ap/wpa_auth_ft.c
-+++ b/src/ap/wpa_auth_ft.c
-@@ -780,6 +780,14 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
- 		return;
- 	}
- 
-+	if (sm->tk_already_set) {
-+		/* Must avoid TK reconfiguration to prevent clearing of TX/RX
-+		 * PN in the driver */
-+		wpa_printf(MSG_DEBUG,
-+			   "FT: Do not re-install same PTK to the driver");
-+		return;
-+	}
-+
- 	/* FIX: add STA entry to kernel/driver here? The set_key will fail
- 	 * most likely without this.. At the moment, STA entry is added only
- 	 * after association has been completed. This function will be called
-@@ -792,6 +800,7 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
- 
- 	/* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */
- 	sm->pairwise_set = TRUE;
-+	sm->tk_already_set = TRUE;
- }
- 
- 
-@@ -898,6 +907,7 @@ static int wpa_ft_process_auth_req(struct wpa_state_machine *sm,
- 
- 	sm->pairwise = pairwise;
- 	sm->PTK_valid = TRUE;
-+	sm->tk_already_set = FALSE;
- 	wpa_ft_install_ptk(sm);
- 
- 	buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
-diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h
-index 72b7eb3..7fd8f05 100644
---- a/src/ap/wpa_auth_i.h
-+++ b/src/ap/wpa_auth_i.h
-@@ -65,6 +65,7 @@ struct wpa_state_machine {
- 	struct wpa_ptk PTK;
- 	Boolean PTK_valid;
- 	Boolean pairwise_set;
-+	Boolean tk_already_set;
- 	int keycount;
- 	Boolean Pair;
- 	struct wpa_key_replay_counter {
--- 
-2.7.4
-
-From 927f891007c402fefd1ff384645b3f07597c3ede Mon Sep 17 00:00:00 2001
-From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
-Date: Wed, 12 Jul 2017 16:03:24 +0200
-Subject: [PATCH 2/8] Prevent reinstallation of an already in-use group key
-
-Track the current GTK and IGTK that is in use and when receiving a
-(possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do
-not install the given key if it is already in use. This prevents an
-attacker from trying to trick the client into resetting or lowering the
-sequence counter associated to the group key.
-
-Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
----
- src/common/wpa_common.h |  11 +++++
- src/rsn_supp/wpa.c      | 116 ++++++++++++++++++++++++++++++------------------
- src/rsn_supp/wpa_i.h    |   4 ++
- 3 files changed, 87 insertions(+), 44 deletions(-)
-
-diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
-index af1d0f0..d200285 100644
---- a/src/common/wpa_common.h
-+++ b/src/common/wpa_common.h
-@@ -217,6 +217,17 @@ struct wpa_ptk {
- 	size_t tk_len;
- };
- 
-+struct wpa_gtk {
-+	u8 gtk[WPA_GTK_MAX_LEN];
-+	size_t gtk_len;
-+};
-+
-+#ifdef CONFIG_IEEE80211W
-+struct wpa_igtk {
-+	u8 igtk[WPA_IGTK_MAX_LEN];
-+	size_t igtk_len;
-+};
-+#endif /* CONFIG_IEEE80211W */
- 
- /* WPA IE version 1
-  * 00-50-f2:1 (OUI:OUI type)
-diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
-index 3c47879..95bd7be 100644
---- a/src/rsn_supp/wpa.c
-+++ b/src/rsn_supp/wpa.c
-@@ -714,6 +714,15 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
- 	const u8 *_gtk = gd->gtk;
- 	u8 gtk_buf[32];
- 
-+	/* Detect possible key reinstallation */
-+	if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
-+	    os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
-+		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
-+			"WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
-+			gd->keyidx, gd->tx, gd->gtk_len);
-+		return 0;
-+	}
-+
- 	wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len);
- 	wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
- 		"WPA: Installing GTK to the driver (keyidx=%d tx=%d len=%d)",
-@@ -748,6 +757,9 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
- 	}
- 	os_memset(gtk_buf, 0, sizeof(gtk_buf));
- 
-+	sm->gtk.gtk_len = gd->gtk_len;
-+	os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
-+
- 	return 0;
- }
- 
-@@ -854,6 +866,48 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
- }
- 
- 
-+#ifdef CONFIG_IEEE80211W
-+static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
-+				       const struct wpa_igtk_kde *igtk)
-+{
-+	size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
-+	u16 keyidx = WPA_GET_LE16(igtk->keyid);
-+
-+	/* Detect possible key reinstallation */
-+	if (sm->igtk.igtk_len == len &&
-+	    os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
-+		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
-+			"WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
-+			keyidx);
-+		return  0;
-+	}
-+
-+	wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
-+		"WPA: IGTK keyid %d pn %02x%02x%02x%02x%02x%02x",
-+		keyidx, MAC2STR(igtk->pn));
-+	wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", igtk->igtk, len);
-+	if (keyidx > 4095) {
-+		wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
-+			"WPA: Invalid IGTK KeyID %d", keyidx);
-+		return -1;
-+	}
-+	if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
-+			   broadcast_ether_addr,
-+			   keyidx, 0, igtk->pn, sizeof(igtk->pn),
-+			   igtk->igtk, len) < 0) {
-+		wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
-+			"WPA: Failed to configure IGTK to the driver");
-+		return -1;
-+	}
-+
-+	sm->igtk.igtk_len = len;
-+	os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
-+
-+	return 0;
-+}
-+#endif /* CONFIG_IEEE80211W */
-+
-+
- static int ieee80211w_set_keys(struct wpa_sm *sm,
- 			       struct wpa_eapol_ie_parse *ie)
- {
-@@ -864,30 +918,14 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
- 	if (ie->igtk) {
- 		size_t len;
- 		const struct wpa_igtk_kde *igtk;
--		u16 keyidx;
-+
- 		len = wpa_cipher_key_len(sm->mgmt_group_cipher);
- 		if (ie->igtk_len != WPA_IGTK_KDE_PREFIX_LEN + len)
- 			return -1;
-+
- 		igtk = (const struct wpa_igtk_kde *) ie->igtk;
--		keyidx = WPA_GET_LE16(igtk->keyid);
--		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d "
--			"pn %02x%02x%02x%02x%02x%02x",
--			keyidx, MAC2STR(igtk->pn));
--		wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK",
--				igtk->igtk, len);
--		if (keyidx > 4095) {
--			wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
--				"WPA: Invalid IGTK KeyID %d", keyidx);
--			return -1;
--		}
--		if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
--				   broadcast_ether_addr,
--				   keyidx, 0, igtk->pn, sizeof(igtk->pn),
--				   igtk->igtk, len) < 0) {
--			wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
--				"WPA: Failed to configure IGTK to the driver");
-+		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
- 			return -1;
--		}
- 	}
- 
- 	return 0;
-@@ -2307,7 +2345,7 @@ void wpa_sm_deinit(struct wpa_sm *sm)
-  */
- void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
- {
--	int clear_ptk = 1;
-+	int clear_keys = 1;
- 
- 	if (sm == NULL)
- 		return;
-@@ -2333,11 +2371,11 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
- 		/* Prepare for the next transition */
- 		wpa_ft_prepare_auth_request(sm, NULL);
- 
--		clear_ptk = 0;
-+		clear_keys = 0;
- 	}
- #endif /* CONFIG_IEEE80211R */
- 
--	if (clear_ptk) {
-+	if (clear_keys) {
- 		/*
- 		 * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if
- 		 * this is not part of a Fast BSS Transition.
-@@ -2347,6 +2385,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
- 		os_memset(&sm->ptk, 0, sizeof(sm->ptk));
- 		sm->tptk_set = 0;
- 		os_memset(&sm->tptk, 0, sizeof(sm->tptk));
-+		os_memset(&sm->gtk, 0, sizeof(sm->gtk));
-+#ifdef CONFIG_IEEE80211W
-+		os_memset(&sm->igtk, 0, sizeof(sm->igtk));
-+#endif /* CONFIG_IEEE80211W */
- 	}
- 
- #ifdef CONFIG_TDLS
-@@ -2877,6 +2919,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
- 	os_memset(sm->pmk, 0, sizeof(sm->pmk));
- 	os_memset(&sm->ptk, 0, sizeof(sm->ptk));
- 	os_memset(&sm->tptk, 0, sizeof(sm->tptk));
-+	os_memset(&sm->gtk, 0, sizeof(sm->gtk));
-+#ifdef CONFIG_IEEE80211W
-+	os_memset(&sm->igtk, 0, sizeof(sm->igtk));
-+#endif /* CONFIG_IEEE80211W */
- #ifdef CONFIG_IEEE80211R
- 	os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
- 	os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0));
-@@ -2949,29 +2995,11 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
- 		os_memset(&gd, 0, sizeof(gd));
- #ifdef CONFIG_IEEE80211W
- 	} else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) {
--		struct wpa_igtk_kde igd;
--		u16 keyidx;
--
--		os_memset(&igd, 0, sizeof(igd));
--		keylen = wpa_cipher_key_len(sm->mgmt_group_cipher);
--		os_memcpy(igd.keyid, buf + 2, 2);
--		os_memcpy(igd.pn, buf + 4, 6);
--
--		keyidx = WPA_GET_LE16(igd.keyid);
--		os_memcpy(igd.igtk, buf + 10, keylen);
--
--		wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)",
--				igd.igtk, keylen);
--		if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
--				   broadcast_ether_addr,
--				   keyidx, 0, igd.pn, sizeof(igd.pn),
--				   igd.igtk, keylen) < 0) {
--			wpa_printf(MSG_DEBUG, "Failed to install the IGTK in "
--				   "WNM mode");
--			os_memset(&igd, 0, sizeof(igd));
-+		const struct wpa_igtk_kde *igtk;
-+
-+		igtk = (const struct wpa_igtk_kde *) (buf + 2);
-+		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
- 			return -1;
--		}
--		os_memset(&igd, 0, sizeof(igd));
- #endif /* CONFIG_IEEE80211W */
- 	} else {
- 		wpa_printf(MSG_DEBUG, "Unknown element id");
-diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
-index f653ba6..afc9e37 100644
---- a/src/rsn_supp/wpa_i.h
-+++ b/src/rsn_supp/wpa_i.h
-@@ -31,6 +31,10 @@ struct wpa_sm {
- 	u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN];
- 	int rx_replay_counter_set;
- 	u8 request_counter[WPA_REPLAY_COUNTER_LEN];
-+	struct wpa_gtk gtk;
-+#ifdef CONFIG_IEEE80211W
-+	struct wpa_igtk igtk;
-+#endif /* CONFIG_IEEE80211W */
- 
- 	struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
- 
--- 
-2.7.4
-
-From 8280294e74846ea342389a0cd17215050fa5afe8 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Sun, 1 Oct 2017 12:12:24 +0300
-Subject: [PATCH 3/8] Extend protection of GTK/IGTK reinstallation of WNM-Sleep
- Mode cases
-
-This extends the protection to track last configured GTK/IGTK value
-separately from EAPOL-Key frames and WNM-Sleep Mode frames to cover a
-corner case where these two different mechanisms may get used when the
-GTK/IGTK has changed and tracking a single value is not sufficient to
-detect a possible key reconfiguration.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/rsn_supp/wpa.c   | 53 +++++++++++++++++++++++++++++++++++++---------------
- src/rsn_supp/wpa_i.h |  2 ++
- 2 files changed, 40 insertions(+), 15 deletions(-)
-
-diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
-index 95bd7be..7a2c68d 100644
---- a/src/rsn_supp/wpa.c
-+++ b/src/rsn_supp/wpa.c
-@@ -709,14 +709,17 @@ struct wpa_gtk_data {
- 
- static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
- 				      const struct wpa_gtk_data *gd,
--				      const u8 *key_rsc)
-+				      const u8 *key_rsc, int wnm_sleep)
- {
- 	const u8 *_gtk = gd->gtk;
- 	u8 gtk_buf[32];
- 
- 	/* Detect possible key reinstallation */
--	if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
--	    os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
-+	if ((sm->gtk.gtk_len == (size_t) gd->gtk_len &&
-+	     os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) ||
-+	    (sm->gtk_wnm_sleep.gtk_len == (size_t) gd->gtk_len &&
-+	     os_memcmp(sm->gtk_wnm_sleep.gtk, gd->gtk,
-+		       sm->gtk_wnm_sleep.gtk_len) == 0)) {
- 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
- 			"WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
- 			gd->keyidx, gd->tx, gd->gtk_len);
-@@ -757,8 +760,14 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
- 	}
- 	os_memset(gtk_buf, 0, sizeof(gtk_buf));
- 
--	sm->gtk.gtk_len = gd->gtk_len;
--	os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
-+	if (wnm_sleep) {
-+		sm->gtk_wnm_sleep.gtk_len = gd->gtk_len;
-+		os_memcpy(sm->gtk_wnm_sleep.gtk, gd->gtk,
-+			  sm->gtk_wnm_sleep.gtk_len);
-+	} else {
-+		sm->gtk.gtk_len = gd->gtk_len;
-+		os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
-+	}
- 
- 	return 0;
- }
-@@ -852,7 +861,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
- 	    (wpa_supplicant_check_group_cipher(sm, sm->group_cipher,
- 					       gtk_len, gtk_len,
- 					       &gd.key_rsc_len, &gd.alg) ||
--	     wpa_supplicant_install_gtk(sm, &gd, key_rsc))) {
-+	     wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0))) {
- 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
- 			"RSN: Failed to install GTK");
- 		os_memset(&gd, 0, sizeof(gd));
-@@ -868,14 +877,18 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
- 
- #ifdef CONFIG_IEEE80211W
- static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
--				       const struct wpa_igtk_kde *igtk)
-+				       const struct wpa_igtk_kde *igtk,
-+				       int wnm_sleep)
- {
- 	size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
- 	u16 keyidx = WPA_GET_LE16(igtk->keyid);
- 
- 	/* Detect possible key reinstallation */
--	if (sm->igtk.igtk_len == len &&
--	    os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
-+	if ((sm->igtk.igtk_len == len &&
-+	     os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) ||
-+	    (sm->igtk_wnm_sleep.igtk_len == len &&
-+	     os_memcmp(sm->igtk_wnm_sleep.igtk, igtk->igtk,
-+		       sm->igtk_wnm_sleep.igtk_len) == 0)) {
- 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
- 			"WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
- 			keyidx);
-@@ -900,8 +913,14 @@ static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
- 		return -1;
- 	}
- 
--	sm->igtk.igtk_len = len;
--	os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
-+	if (wnm_sleep) {
-+		sm->igtk_wnm_sleep.igtk_len = len;
-+		os_memcpy(sm->igtk_wnm_sleep.igtk, igtk->igtk,
-+			  sm->igtk_wnm_sleep.igtk_len);
-+	} else {
-+		sm->igtk.igtk_len = len;
-+		os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
-+	}
- 
- 	return 0;
- }
-@@ -924,7 +943,7 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
- 			return -1;
- 
- 		igtk = (const struct wpa_igtk_kde *) ie->igtk;
--		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
-+		if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0)
- 			return -1;
- 	}
- 
-@@ -1574,7 +1593,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm,
- 	if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc))
- 		key_rsc = null_rsc;
- 
--	if (wpa_supplicant_install_gtk(sm, &gd, key_rsc) ||
-+	if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0) ||
- 	    wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0)
- 		goto failed;
- 	os_memset(&gd, 0, sizeof(gd));
-@@ -2386,8 +2405,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
- 		sm->tptk_set = 0;
- 		os_memset(&sm->tptk, 0, sizeof(sm->tptk));
- 		os_memset(&sm->gtk, 0, sizeof(sm->gtk));
-+		os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
- #ifdef CONFIG_IEEE80211W
- 		os_memset(&sm->igtk, 0, sizeof(sm->igtk));
-+		os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
- #endif /* CONFIG_IEEE80211W */
- 	}
- 
-@@ -2920,8 +2941,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
- 	os_memset(&sm->ptk, 0, sizeof(sm->ptk));
- 	os_memset(&sm->tptk, 0, sizeof(sm->tptk));
- 	os_memset(&sm->gtk, 0, sizeof(sm->gtk));
-+	os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
- #ifdef CONFIG_IEEE80211W
- 	os_memset(&sm->igtk, 0, sizeof(sm->igtk));
-+	os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
- #endif /* CONFIG_IEEE80211W */
- #ifdef CONFIG_IEEE80211R
- 	os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
-@@ -2986,7 +3009,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
- 
- 		wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)",
- 				gd.gtk, gd.gtk_len);
--		if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) {
-+		if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 1)) {
- 			os_memset(&gd, 0, sizeof(gd));
- 			wpa_printf(MSG_DEBUG, "Failed to install the GTK in "
- 				   "WNM mode");
-@@ -2998,7 +3021,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
- 		const struct wpa_igtk_kde *igtk;
- 
- 		igtk = (const struct wpa_igtk_kde *) (buf + 2);
--		if (wpa_supplicant_install_igtk(sm, igtk) < 0)
-+		if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0)
- 			return -1;
- #endif /* CONFIG_IEEE80211W */
- 	} else {
-diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
-index afc9e37..9a54631 100644
---- a/src/rsn_supp/wpa_i.h
-+++ b/src/rsn_supp/wpa_i.h
-@@ -32,8 +32,10 @@ struct wpa_sm {
- 	int rx_replay_counter_set;
- 	u8 request_counter[WPA_REPLAY_COUNTER_LEN];
- 	struct wpa_gtk gtk;
-+	struct wpa_gtk gtk_wnm_sleep;
- #ifdef CONFIG_IEEE80211W
- 	struct wpa_igtk igtk;
-+	struct wpa_igtk igtk_wnm_sleep;
- #endif /* CONFIG_IEEE80211W */
- 
- 	struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
--- 
-2.7.4
-
-From 8f82bc94e8697a9d47fa8774dfdaaede1084912c Mon Sep 17 00:00:00 2001
-From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
-Date: Fri, 29 Sep 2017 04:22:51 +0200
-Subject: [PATCH 4/8] Prevent installation of an all-zero TK
-
-Properly track whether a PTK has already been installed to the driver
-and the TK part cleared from memory. This prevents an attacker from
-trying to trick the client into installing an all-zero TK.
-
-This fixes the earlier fix in commit
-ad00d64e7d8827b3cebd665a0ceb08adabf15e1e ('Fix TK configuration to the
-driver in EAPOL-Key 3/4 retry case') which did not take into account
-possibility of an extra message 1/4 showing up between retries of
-message 3/4.
-
-Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
----
- src/common/wpa_common.h | 1 +
- src/rsn_supp/wpa.c      | 5 ++---
- src/rsn_supp/wpa_i.h    | 1 -
- 3 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
-index d200285..1021ccb 100644
---- a/src/common/wpa_common.h
-+++ b/src/common/wpa_common.h
-@@ -215,6 +215,7 @@ struct wpa_ptk {
- 	size_t kck_len;
- 	size_t kek_len;
- 	size_t tk_len;
-+	int installed; /* 1 if key has already been installed to driver */
- };
- 
- struct wpa_gtk {
-diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
-index 7a2c68d..0550a41 100644
---- a/src/rsn_supp/wpa.c
-+++ b/src/rsn_supp/wpa.c
-@@ -510,7 +510,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
- 		os_memset(buf, 0, sizeof(buf));
- 	}
- 	sm->tptk_set = 1;
--	sm->tk_to_set = 1;
- 
- 	kde = sm->assoc_wpa_ie;
- 	kde_len = sm->assoc_wpa_ie_len;
-@@ -615,7 +614,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
- 	enum wpa_alg alg;
- 	const u8 *key_rsc;
- 
--	if (!sm->tk_to_set) {
-+	if (sm->ptk.installed) {
- 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
- 			"WPA: Do not re-install same PTK to the driver");
- 		return 0;
-@@ -659,7 +658,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
- 
- 	/* TK is not needed anymore in supplicant */
- 	os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN);
--	sm->tk_to_set = 0;
-+	sm->ptk.installed = 1;
- 
- 	if (sm->wpa_ptk_rekey) {
- 		eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL);
-diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
-index 9a54631..41f371f 100644
---- a/src/rsn_supp/wpa_i.h
-+++ b/src/rsn_supp/wpa_i.h
-@@ -24,7 +24,6 @@ struct wpa_sm {
- 	struct wpa_ptk ptk, tptk;
- 	int ptk_set, tptk_set;
- 	unsigned int msg_3_of_4_ok:1;
--	unsigned int tk_to_set:1;
- 	u8 snonce[WPA_NONCE_LEN];
- 	u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */
- 	int renew_snonce;
--- 
-2.7.4
-
-From 12fac09b437a1dc8a0f253e265934a8aaf4d2f8b Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Sun, 1 Oct 2017 12:32:57 +0300
-Subject: [PATCH 5/8] Fix PTK rekeying to generate a new ANonce
-
-The Authenticator state machine path for PTK rekeying ended up bypassing
-the AUTHENTICATION2 state where a new ANonce is generated when going
-directly to the PTKSTART state since there is no need to try to
-determine the PMK again in such a case. This is far from ideal since the
-new PTK would depend on a new nonce only from the supplicant.
-
-Fix this by generating a new ANonce when moving to the PTKSTART state
-for the purpose of starting new 4-way handshake to rekey PTK.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/ap/wpa_auth.c | 24 +++++++++++++++++++++---
- 1 file changed, 21 insertions(+), 3 deletions(-)
-
-diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
-index 707971d..bf10cc1 100644
---- a/src/ap/wpa_auth.c
-+++ b/src/ap/wpa_auth.c
-@@ -1901,6 +1901,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2)
- }
- 
- 
-+static int wpa_auth_sm_ptk_update(struct wpa_state_machine *sm)
-+{
-+	if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
-+		wpa_printf(MSG_ERROR,
-+			   "WPA: Failed to get random data for ANonce");
-+		sm->Disconnect = TRUE;
-+		return -1;
-+	}
-+	wpa_hexdump(MSG_DEBUG, "WPA: Assign new ANonce", sm->ANonce,
-+		    WPA_NONCE_LEN);
-+	sm->TimeoutCtr = 0;
-+	return 0;
-+}
-+
-+
- SM_STATE(WPA_PTK, INITPMK)
- {
- 	u8 msk[2 * PMK_LEN];
-@@ -2458,9 +2473,12 @@ SM_STEP(WPA_PTK)
- 		SM_ENTER(WPA_PTK, AUTHENTICATION);
- 	else if (sm->ReAuthenticationRequest)
- 		SM_ENTER(WPA_PTK, AUTHENTICATION2);
--	else if (sm->PTKRequest)
--		SM_ENTER(WPA_PTK, PTKSTART);
--	else switch (sm->wpa_ptk_state) {
-+	else if (sm->PTKRequest) {
-+		if (wpa_auth_sm_ptk_update(sm) < 0)
-+			SM_ENTER(WPA_PTK, DISCONNECTED);
-+		else
-+			SM_ENTER(WPA_PTK, PTKSTART);
-+	} else switch (sm->wpa_ptk_state) {
- 	case WPA_PTK_INITIALIZE:
- 		break;
- 	case WPA_PTK_DISCONNECT:
--- 
-2.7.4
-
-From 6c4bed4f47d1960ec04981a9d50e5076aea5223d Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Fri, 22 Sep 2017 11:03:15 +0300
-Subject: [PATCH 6/8] TDLS: Reject TPK-TK reconfiguration
-
-Do not try to reconfigure the same TPK-TK to the driver after it has
-been successfully configured. This is an explicit check to avoid issues
-related to resetting the TX/RX packet number. There was already a check
-for this for TPK M2 (retries of that message are ignored completely), so
-that behavior does not get modified.
-
-For TPK M3, the TPK-TK could have been reconfigured, but that was
-followed by immediate teardown of the link due to an issue in updating
-the STA entry. Furthermore, for TDLS with any real security (i.e.,
-ignoring open/WEP), the TPK message exchange is protected on the AP path
-and simple replay attacks are not feasible.
-
-As an additional corner case, make sure the local nonce gets updated if
-the peer uses a very unlikely "random nonce" of all zeros.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/rsn_supp/tdls.c | 38 ++++++++++++++++++++++++++++++++++++--
- 1 file changed, 36 insertions(+), 2 deletions(-)
-
-diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
-index e424168..9eb9738 100644
---- a/src/rsn_supp/tdls.c
-+++ b/src/rsn_supp/tdls.c
-@@ -112,6 +112,7 @@ struct wpa_tdls_peer {
- 		u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */
- 	} tpk;
- 	int tpk_set;
-+	int tk_set; /* TPK-TK configured to the driver */
- 	int tpk_success;
- 	int tpk_in_progress;
- 
-@@ -192,6 +193,20 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
- 	u8 rsc[6];
- 	enum wpa_alg alg;
- 
-+	if (peer->tk_set) {
-+		/*
-+		 * This same TPK-TK has already been configured to the driver
-+		 * and this new configuration attempt (likely due to an
-+		 * unexpected retransmitted frame) would result in clearing
-+		 * the TX/RX sequence number which can break security, so must
-+		 * not allow that to happen.
-+		 */
-+		wpa_printf(MSG_INFO, "TDLS: TPK-TK for the peer " MACSTR
-+			   " has already been configured to the driver - do not reconfigure",
-+			   MAC2STR(peer->addr));
-+		return -1;
-+	}
-+
- 	os_memset(rsc, 0, 6);
- 
- 	switch (peer->cipher) {
-@@ -209,12 +224,15 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
- 		return -1;
- 	}
- 
-+	wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR,
-+		   MAC2STR(peer->addr));
- 	if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1,
- 			   rsc, sizeof(rsc), peer->tpk.tk, key_len) < 0) {
- 		wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the "
- 			   "driver");
- 		return -1;
- 	}
-+	peer->tk_set = 1;
- 	return 0;
- }
- 
-@@ -696,7 +714,7 @@ static void wpa_tdls_peer_clear(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
- 	peer->cipher = 0;
- 	peer->qos_info = 0;
- 	peer->wmm_capable = 0;
--	peer->tpk_set = peer->tpk_success = 0;
-+	peer->tk_set = peer->tpk_set = peer->tpk_success = 0;
- 	peer->chan_switch_enabled = 0;
- 	os_memset(&peer->tpk, 0, sizeof(peer->tpk));
- 	os_memset(peer->inonce, 0, WPA_NONCE_LEN);
-@@ -1159,6 +1177,7 @@ skip_rsnie:
- 		wpa_tdls_peer_free(sm, peer);
- 		return -1;
- 	}
-+	peer->tk_set = 0; /* A new nonce results in a new TK */
- 	wpa_hexdump(MSG_DEBUG, "TDLS: Initiator Nonce for TPK handshake",
- 		    peer->inonce, WPA_NONCE_LEN);
- 	os_memcpy(ftie->Snonce, peer->inonce, WPA_NONCE_LEN);
-@@ -1751,6 +1770,19 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, struct wpa_tdls_peer *peer,
- }
- 
- 
-+static int tdls_nonce_set(const u8 *nonce)
-+{
-+	int i;
-+
-+	for (i = 0; i < WPA_NONCE_LEN; i++) {
-+		if (nonce[i])
-+			return 1;
-+	}
-+
-+	return 0;
-+}
-+
-+
- static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
- 				   const u8 *buf, size_t len)
- {
-@@ -2004,7 +2036,8 @@ skip_rsn:
- 	peer->rsnie_i_len = kde.rsn_ie_len;
- 	peer->cipher = cipher;
- 
--	if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0) {
-+	if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0 ||
-+	    !tdls_nonce_set(peer->inonce)) {
- 		/*
- 		 * There is no point in updating the RNonce for every obtained
- 		 * TPK M1 frame (e.g., retransmission due to timeout) with the
-@@ -2020,6 +2053,7 @@ skip_rsn:
- 				"TDLS: Failed to get random data for responder nonce");
- 			goto error;
- 		}
-+		peer->tk_set = 0; /* A new nonce results in a new TK */
- 	}
- 
- #if 0
--- 
-2.7.4
-
-Note: [PATCH 7/8] only applies to wpa_supplicant
-
-From b372ab0b7daea719749194dc554b26e6367603f2 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Fri, 22 Sep 2017 12:06:37 +0300
-Subject: [PATCH 8/8] FT: Do not allow multiple Reassociation Response frames
-
-The driver is expected to not report a second association event without
-the station having explicitly request a new association. As such, this
-case should not be reachable. However, since reconfiguring the same
-pairwise or group keys to the driver could result in nonce reuse issues,
-be extra careful here and do an additional state check to avoid this
-even if the local driver ends up somehow accepting an unexpected
-Reassociation Response frame.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/rsn_supp/wpa.c    | 3 +++
- src/rsn_supp/wpa_ft.c | 8 ++++++++
- src/rsn_supp/wpa_i.h  | 1 +
- 3 files changed, 12 insertions(+)
-
-diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
-index 0550a41..2a53c6f 100644
---- a/src/rsn_supp/wpa.c
-+++ b/src/rsn_supp/wpa.c
-@@ -2440,6 +2440,9 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm)
- #ifdef CONFIG_TDLS
- 	wpa_tdls_disassoc(sm);
- #endif /* CONFIG_TDLS */
-+#ifdef CONFIG_IEEE80211R
-+	sm->ft_reassoc_completed = 0;
-+#endif /* CONFIG_IEEE80211R */
- 
- 	/* Keys are not needed in the WPA state machine anymore */
- 	wpa_sm_drop_sa(sm);
-diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c
-index 205793e..d45bb45 100644
---- a/src/rsn_supp/wpa_ft.c
-+++ b/src/rsn_supp/wpa_ft.c
-@@ -153,6 +153,7 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len,
- 	u16 capab;
- 
- 	sm->ft_completed = 0;
-+	sm->ft_reassoc_completed = 0;
- 
- 	buf_len = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
- 		2 + sm->r0kh_id_len + ric_ies_len + 100;
-@@ -681,6 +682,11 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
- 		return -1;
- 	}
- 
-+	if (sm->ft_reassoc_completed) {
-+		wpa_printf(MSG_DEBUG, "FT: Reassociation has already been completed for this FT protocol instance - ignore unexpected retransmission");
-+		return 0;
-+	}
-+
- 	if (wpa_ft_parse_ies(ies, ies_len, &parse) < 0) {
- 		wpa_printf(MSG_DEBUG, "FT: Failed to parse IEs");
- 		return -1;
-@@ -781,6 +787,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
- 		return -1;
- 	}
- 
-+	sm->ft_reassoc_completed = 1;
-+
- 	if (wpa_ft_process_gtk_subelem(sm, parse.gtk, parse.gtk_len) < 0)
- 		return -1;
- 
-diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
-index 41f371f..56f88dc 100644
---- a/src/rsn_supp/wpa_i.h
-+++ b/src/rsn_supp/wpa_i.h
-@@ -128,6 +128,7 @@ struct wpa_sm {
- 	size_t r0kh_id_len;
- 	u8 r1kh_id[FT_R1KH_ID_LEN];
- 	int ft_completed;
-+	int ft_reassoc_completed;
- 	int over_the_ds_in_progress;
- 	u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */
- 	int set_ptk_after_assoc;
--- 
-2.7.4
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb
index c3a1ead..250add8 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb
@@ -1,34 +1,48 @@
+SUMMARY = "User space daemon for extended IEEE 802.11 management"
 HOMEPAGE = "http://w1.fi/hostapd/"
 SECTION = "kernel/userland"
-LICENSE = "GPLv2 | BSD"
-LIC_FILES_CHKSUM = "file://${B}/README;md5=8aa4e8c78b59b12016c4cb2d0a8db350"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://hostapd/README;md5=8aa4e8c78b59b12016c4cb2d0a8db350"
+
 DEPENDS = "libnl openssl"
-SUMMARY = "User space daemon for extended IEEE 802.11 management"
-
-inherit update-rc.d systemd
-INITSCRIPT_NAME = "hostapd"
-
-SYSTEMD_SERVICE_${PN} = "hostapd.service"
-SYSTEMD_AUTO_ENABLE_${PN} = "disable"
 
 SRC_URI = " \
     http://w1.fi/releases/hostapd-${PV}.tar.gz \
     file://defconfig \
     file://init \
     file://hostapd.service \
-    file://key-replay-cve-multiple.patch \
+    file://0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch \
+    file://0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch \
+    file://0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch \
+    file://0004-Prevent-installation-of-an-all-zero-TK.patch \
+    file://0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch \
+    file://0006-TDLS-Reject-TPK-TK-reconfiguration.patch \
+    file://0007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch \
 "
 
+SRC_URI[md5sum] = "eaa56dce9bd8f1d195eb62596eab34c7"
+SRC_URI[sha256sum] = "01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d"
+
 S = "${WORKDIR}/hostapd-${PV}"
 B = "${WORKDIR}/hostapd-${PV}/hostapd"
 
-do_configure() {
+inherit update-rc.d systemd pkgconfig distro_features_check
+
+CONFLICT_DISTRO_FEATURES = "openssl-no-weak-ciphers"
+
+INITSCRIPT_NAME = "hostapd"
+
+SYSTEMD_SERVICE_${PN} = "hostapd.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
+do_configure_append() {
     install -m 0644 ${WORKDIR}/defconfig ${B}/.config
 }
 
 do_compile() {
-    export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3"
-    make
+    export CFLAGS="-MMD -O2 -Wall -g"
+    export EXTRA_CFLAGS="${CFLAGS}"
+    make V=1
 }
 
 do_install() {
@@ -42,7 +56,3 @@
 }
 
 CONFFILES_${PN} += "${sysconfdir}/hostapd.conf"
-
-SRC_URI[md5sum] = "eaa56dce9bd8f1d195eb62596eab34c7"
-SRC_URI[sha256sum] = "01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch
index f0c310c..cbd5d71 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch
@@ -1,18 +1,19 @@
-From ecb62f3467f493cc0d679323f05367eebbf0fb67 Mon Sep 17 00:00:00 2001
+From a9e4057bfda190ad365b503af058b460ab8c7616 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Tue, 1 Oct 2013 22:22:57 +0200
 Subject: [PATCH] aclocal: Add parameter to disable keyutils detection
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
  aclocal.m4 | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/aclocal.m4 b/aclocal.m4
-index 210c473..83b1f02 100644
+index d6d1279..80ce604 100644
 --- a/aclocal.m4
 +++ b/aclocal.m4
-@@ -1650,11 +1650,15 @@ fi
+@@ -1679,12 +1679,16 @@ fi
  dnl
  dnl If libkeyutils exists (on Linux) include it and use keyring ccache
  AC_DEFUN(KRB5_AC_KEYRING_CCACHE,[
@@ -28,6 +29,4 @@
 +fi
  ])dnl
  dnl
--- 
-1.8.3.2
-
+ dnl If libkeyutils supports persistent keyrings, use them
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2017-11462.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2017-11462.patch
deleted file mode 100644
index 4b82f02..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/CVE-2017-11462.patch
+++ /dev/null
@@ -1,419 +0,0 @@
-From 56f7b1bc95a2a3eeb420e069e7655fb181ade5cf Mon Sep 17 00:00:00 2001
-From: Greg Hudson <ghudson@mit.edu>
-Date: Fri, 14 Jul 2017 13:02:46 -0400
-Subject: [PATCH] Preserve GSS context on init/accept failure
-
-After gss_init_sec_context() or gss_accept_sec_context() has created a
-context, don't delete the mechglue context on failures from subsequent
-calls, even if the mechanism deletes the mech-specific context (which
-is allowed by RFC 2744 but not preferred).  Check for union contexts
-with no mechanism context in each GSS function which accepts a
-gss_ctx_id_t.
-
-CVE-2017-11462:
-
-RFC 2744 permits a GSS-API implementation to delete an existing
-security context on a second or subsequent call to
-gss_init_sec_context() or gss_accept_sec_context() if the call results
-in an error.  This API behavior has been found to be dangerous,
-leading to the possibility of memory errors in some callers.  For
-safety, GSS-API implementations should instead preserve existing
-security contexts on error until the caller deletes them.
-
-All versions of MIT krb5 prior to this change may delete acceptor
-contexts on error.  Versions 1.13.4 through 1.13.7, 1.14.1 through
-1.14.5, and 1.15 through 1.15.1 may also delete initiator contexts on
-error.
-
-ticket: 8598 (new)
-target_version: 1.15-next
-target_version: 1.14-next
-tags: pullup
-
-Upstream-Status: Backport
-CVE: CVE-2017-11462
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- src/lib/gssapi/mechglue/g_accept_sec_context.c  | 22 +++++++++++++++-------
- src/lib/gssapi/mechglue/g_complete_auth_token.c |  2 ++
- src/lib/gssapi/mechglue/g_context_time.c        |  2 ++
- src/lib/gssapi/mechglue/g_delete_sec_context.c  | 14 ++++++++------
- src/lib/gssapi/mechglue/g_exp_sec_context.c     |  2 ++
- src/lib/gssapi/mechglue/g_init_sec_context.c    | 19 +++++++++++--------
- src/lib/gssapi/mechglue/g_inq_context.c         |  2 ++
- src/lib/gssapi/mechglue/g_prf.c                 |  2 ++
- src/lib/gssapi/mechglue/g_process_context.c     |  2 ++
- src/lib/gssapi/mechglue/g_seal.c                |  4 ++++
- src/lib/gssapi/mechglue/g_sign.c                |  2 ++
- src/lib/gssapi/mechglue/g_unseal.c              |  2 ++
- src/lib/gssapi/mechglue/g_unwrap_aead.c         |  2 ++
- src/lib/gssapi/mechglue/g_unwrap_iov.c          |  4 ++++
- src/lib/gssapi/mechglue/g_verify.c              |  2 ++
- src/lib/gssapi/mechglue/g_wrap_aead.c           |  2 ++
- src/lib/gssapi/mechglue/g_wrap_iov.c            |  8 ++++++++
- 17 files changed, 72 insertions(+), 21 deletions(-)
-
-diff --git a/src/lib/gssapi/mechglue/g_accept_sec_context.c b/src/lib/gssapi/mechglue/g_accept_sec_context.c
-index ddaf874..f28e2b1 100644
---- a/src/lib/gssapi/mechglue/g_accept_sec_context.c
-+++ b/src/lib/gssapi/mechglue/g_accept_sec_context.c
-@@ -216,6 +216,8 @@ gss_cred_id_t *		d_cred;
-     } else {
- 	union_ctx_id = (gss_union_ctx_id_t)*context_handle;
- 	selected_mech = union_ctx_id->mech_type;
-+	if (union_ctx_id->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	    return (GSS_S_NO_CONTEXT);
-     }
- 
-     /* Now create a new context if we didn't get one. */
-@@ -234,9 +236,6 @@ gss_cred_id_t *		d_cred;
- 	    free(union_ctx_id);
- 	    return (status);
- 	}
--
--	/* set the new context handle to caller's data */
--	*context_handle = (gss_ctx_id_t)union_ctx_id;
-     }
- 
-     /*
-@@ -277,8 +276,10 @@ gss_cred_id_t *		d_cred;
- 					d_cred ? &tmp_d_cred : NULL);
- 
- 	    /* If there's more work to do, keep going... */
--	    if (status == GSS_S_CONTINUE_NEEDED)
-+	    if (status == GSS_S_CONTINUE_NEEDED) {
-+		*context_handle = (gss_ctx_id_t)union_ctx_id;
- 		return GSS_S_CONTINUE_NEEDED;
-+	    }
- 
- 	    /* if the call failed, return with failure */
- 	    if (status != GSS_S_COMPLETE) {
-@@ -364,14 +365,22 @@ gss_cred_id_t *		d_cred;
- 		*mech_type = gssint_get_public_oid(actual_mech);
- 	    if (ret_flags != NULL)
- 		*ret_flags = temp_ret_flags;
--	    return	(status);
-+	    *context_handle = (gss_ctx_id_t)union_ctx_id;
-+	    return GSS_S_COMPLETE;
-     } else {
- 
- 	status = GSS_S_BAD_MECH;
-     }
- 
- error_out:
--    if (union_ctx_id) {
-+	/*
-+	 * RFC 2744 5.1 requires that we not create a context on a failed first
-+	 * call to accept, and recommends that on a failed subsequent call we
-+	 * make the caller responsible for calling gss_delete_sec_context.
-+	 * Even if the mech deleted its context, keep the union context around
-+	 * for the caller to delete.
-+	 */
-+    if (union_ctx_id && *context_handle == GSS_C_NO_CONTEXT) {
- 	if (union_ctx_id->mech_type) {
- 	    if (union_ctx_id->mech_type->elements)
- 		free(union_ctx_id->mech_type->elements);
-@@ -384,7 +393,6 @@ error_out:
- 					 GSS_C_NO_BUFFER);
- 	}
- 	free(union_ctx_id);
--	*context_handle = GSS_C_NO_CONTEXT;
-     }
- 
-     if (src_name)
-diff --git a/src/lib/gssapi/mechglue/g_complete_auth_token.c b/src/lib/gssapi/mechglue/g_complete_auth_token.c
-index 9181551..4bcb47e 100644
---- a/src/lib/gssapi/mechglue/g_complete_auth_token.c
-+++ b/src/lib/gssapi/mechglue/g_complete_auth_token.c
-@@ -52,6 +52,8 @@ gss_complete_auth_token (OM_uint32 *minor_status,
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return GSS_S_NO_CONTEXT;
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech != NULL) {
-diff --git a/src/lib/gssapi/mechglue/g_context_time.c b/src/lib/gssapi/mechglue/g_context_time.c
-index 2ff8d09..c947e76 100644
---- a/src/lib/gssapi/mechglue/g_context_time.c
-+++ b/src/lib/gssapi/mechglue/g_context_time.c
-@@ -58,6 +58,8 @@ OM_uint32 *		time_rec;
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-diff --git a/src/lib/gssapi/mechglue/g_delete_sec_context.c b/src/lib/gssapi/mechglue/g_delete_sec_context.c
-index 4bf0dec..574ff02 100644
---- a/src/lib/gssapi/mechglue/g_delete_sec_context.c
-+++ b/src/lib/gssapi/mechglue/g_delete_sec_context.c
-@@ -87,12 +87,14 @@ gss_buffer_t		output_token;
-     if (GSSINT_CHK_LOOP(ctx))
- 	return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT);
- 
--    status = gssint_delete_internal_sec_context(minor_status,
--						ctx->mech_type,
--						&ctx->internal_ctx_id,
--						output_token);
--    if (status)
--	return status;
-+    if (ctx->internal_ctx_id != GSS_C_NO_CONTEXT) {
-+	status = gssint_delete_internal_sec_context(minor_status,
-+						    ctx->mech_type,
-+						    &ctx->internal_ctx_id,
-+						    output_token);
-+	if (status)
-+	    return status;
-+    }
- 
-     /* now free up the space for the union context structure */
-     free(ctx->mech_type->elements);
-diff --git a/src/lib/gssapi/mechglue/g_exp_sec_context.c b/src/lib/gssapi/mechglue/g_exp_sec_context.c
-index b637452..1d7990b 100644
---- a/src/lib/gssapi/mechglue/g_exp_sec_context.c
-+++ b/src/lib/gssapi/mechglue/g_exp_sec_context.c
-@@ -95,6 +95,8 @@ gss_buffer_t		interprocess_token;
-      */
- 
-     ctx = (gss_union_ctx_id_t) *context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
-     if (!mech)
- 	return GSS_S_BAD_MECH;
-diff --git a/src/lib/gssapi/mechglue/g_init_sec_context.c b/src/lib/gssapi/mechglue/g_init_sec_context.c
-index 9f154b8..e2df1ce 100644
---- a/src/lib/gssapi/mechglue/g_init_sec_context.c
-+++ b/src/lib/gssapi/mechglue/g_init_sec_context.c
-@@ -192,8 +192,13 @@ OM_uint32 *		time_rec;
- 
- 	/* copy the supplied context handle */
- 	union_ctx_id->internal_ctx_id = GSS_C_NO_CONTEXT;
--    } else
-+    } else {
- 	union_ctx_id = (gss_union_ctx_id_t)*context_handle;
-+	if (union_ctx_id->internal_ctx_id == GSS_C_NO_CONTEXT) {
-+	    status = GSS_S_NO_CONTEXT;
-+	    goto end;
-+	}
-+    }
- 
-     /*
-      * get the appropriate cred handle from the union cred struct.
-@@ -224,15 +229,13 @@ OM_uint32 *		time_rec;
- 
-     if (status != GSS_S_COMPLETE && status != GSS_S_CONTINUE_NEEDED) {
- 	/*
--	 * The spec says the preferred method is to delete all context info on
--	 * the first call to init, and on all subsequent calls make the caller
--	 * responsible for calling gss_delete_sec_context.  However, if the
--	 * mechanism decided to delete the internal context, we should also
--	 * delete the union context.
-+	 * RFC 2744 5.19 requires that we not create a context on a failed
-+	 * first call to init, and recommends that on a failed subsequent call
-+	 * we make the caller responsible for calling gss_delete_sec_context.
-+	 * Even if the mech deleted its context, keep the union context around
-+	 * for the caller to delete.
- 	 */
- 	map_error(minor_status, mech);
--	if (union_ctx_id->internal_ctx_id == GSS_C_NO_CONTEXT)
--	    *context_handle = GSS_C_NO_CONTEXT;
- 	if (*context_handle == GSS_C_NO_CONTEXT) {
- 	    free(union_ctx_id->mech_type->elements);
- 	    free(union_ctx_id->mech_type);
-diff --git a/src/lib/gssapi/mechglue/g_inq_context.c b/src/lib/gssapi/mechglue/g_inq_context.c
-index 6f1c71e..6c0d98d 100644
---- a/src/lib/gssapi/mechglue/g_inq_context.c
-+++ b/src/lib/gssapi/mechglue/g_inq_context.c
-@@ -104,6 +104,8 @@ gss_inquire_context(
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (!mech || !mech->gss_inquire_context || !mech->gss_display_name ||
-diff --git a/src/lib/gssapi/mechglue/g_prf.c b/src/lib/gssapi/mechglue/g_prf.c
-index fcca3e4..9e168ad 100644
---- a/src/lib/gssapi/mechglue/g_prf.c
-+++ b/src/lib/gssapi/mechglue/g_prf.c
-@@ -59,6 +59,8 @@ gss_pseudo_random (OM_uint32 *minor_status,
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return GSS_S_NO_CONTEXT;
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech != NULL) {
-diff --git a/src/lib/gssapi/mechglue/g_process_context.c b/src/lib/gssapi/mechglue/g_process_context.c
-index bc260ae..3968b5d 100644
---- a/src/lib/gssapi/mechglue/g_process_context.c
-+++ b/src/lib/gssapi/mechglue/g_process_context.c
-@@ -61,6 +61,8 @@ gss_buffer_t		token_buffer;
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-diff --git a/src/lib/gssapi/mechglue/g_seal.c b/src/lib/gssapi/mechglue/g_seal.c
-index f17241c..3db1ee0 100644
---- a/src/lib/gssapi/mechglue/g_seal.c
-+++ b/src/lib/gssapi/mechglue/g_seal.c
-@@ -92,6 +92,8 @@ gss_wrap( OM_uint32 *minor_status,
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+        return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-@@ -226,6 +228,8 @@ gss_wrap_size_limit(OM_uint32  *minor_status,
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+        return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (!mech)
-diff --git a/src/lib/gssapi/mechglue/g_sign.c b/src/lib/gssapi/mechglue/g_sign.c
-index 86d641a..03fbd8c 100644
---- a/src/lib/gssapi/mechglue/g_sign.c
-+++ b/src/lib/gssapi/mechglue/g_sign.c
-@@ -94,6 +94,8 @@ gss_buffer_t		msg_token;
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-diff --git a/src/lib/gssapi/mechglue/g_unseal.c b/src/lib/gssapi/mechglue/g_unseal.c
-index 3e8053c..c208635 100644
---- a/src/lib/gssapi/mechglue/g_unseal.c
-+++ b/src/lib/gssapi/mechglue/g_unseal.c
-@@ -76,6 +76,8 @@ gss_qop_t *		qop_state;
-      * call it.
-      */
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-diff --git a/src/lib/gssapi/mechglue/g_unwrap_aead.c b/src/lib/gssapi/mechglue/g_unwrap_aead.c
-index e78bff2..0682bd8 100644
---- a/src/lib/gssapi/mechglue/g_unwrap_aead.c
-+++ b/src/lib/gssapi/mechglue/g_unwrap_aead.c
-@@ -186,6 +186,8 @@ gss_qop_t		*qop_state;
-      * call it.
-      */
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (!mech)
-diff --git a/src/lib/gssapi/mechglue/g_unwrap_iov.c b/src/lib/gssapi/mechglue/g_unwrap_iov.c
-index c0dd314..599be2c 100644
---- a/src/lib/gssapi/mechglue/g_unwrap_iov.c
-+++ b/src/lib/gssapi/mechglue/g_unwrap_iov.c
-@@ -89,6 +89,8 @@ int			iov_count;
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-@@ -128,6 +130,8 @@ gss_verify_mic_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
- 
-     /* Select the approprate underlying mechanism routine and call it. */
-     ctx = (gss_union_ctx_id_t)context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return GSS_S_NO_CONTEXT;
-     mech = gssint_get_mechanism(ctx->mech_type);
-     if (mech == NULL)
- 	return GSS_S_BAD_MECH;
-diff --git a/src/lib/gssapi/mechglue/g_verify.c b/src/lib/gssapi/mechglue/g_verify.c
-index 1578ae1..8996fce 100644
---- a/src/lib/gssapi/mechglue/g_verify.c
-+++ b/src/lib/gssapi/mechglue/g_verify.c
-@@ -65,6 +65,8 @@ gss_qop_t *		qop_state;
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-diff --git a/src/lib/gssapi/mechglue/g_wrap_aead.c b/src/lib/gssapi/mechglue/g_wrap_aead.c
-index 96cdf3c..7fe3b7b 100644
---- a/src/lib/gssapi/mechglue/g_wrap_aead.c
-+++ b/src/lib/gssapi/mechglue/g_wrap_aead.c
-@@ -256,6 +256,8 @@ gss_buffer_t		output_message_buffer;
-      * call it.
-      */
-     ctx = (gss_union_ctx_id_t)context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
-     if (!mech)
- 	return (GSS_S_BAD_MECH);
-diff --git a/src/lib/gssapi/mechglue/g_wrap_iov.c b/src/lib/gssapi/mechglue/g_wrap_iov.c
-index 40cd98f..14447c4 100644
---- a/src/lib/gssapi/mechglue/g_wrap_iov.c
-+++ b/src/lib/gssapi/mechglue/g_wrap_iov.c
-@@ -93,6 +93,8 @@ int			iov_count;
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-@@ -151,6 +153,8 @@ int			iov_count;
-      */
- 
-     ctx = (gss_union_ctx_id_t) context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return (GSS_S_NO_CONTEXT);
-     mech = gssint_get_mechanism (ctx->mech_type);
- 
-     if (mech) {
-@@ -190,6 +194,8 @@ gss_get_mic_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
- 
-     /* Select the approprate underlying mechanism routine and call it. */
-     ctx = (gss_union_ctx_id_t)context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return GSS_S_NO_CONTEXT;
-     mech = gssint_get_mechanism(ctx->mech_type);
-     if (mech == NULL)
- 	return GSS_S_BAD_MECH;
-@@ -218,6 +224,8 @@ gss_get_mic_iov_length(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
- 
-     /* Select the approprate underlying mechanism routine and call it. */
-     ctx = (gss_union_ctx_id_t)context_handle;
-+    if (ctx->internal_ctx_id == GSS_C_NO_CONTEXT)
-+	return GSS_S_NO_CONTEXT;
-     mech = gssint_get_mechanism(ctx->mech_type);
-     if (mech == NULL)
- 	return GSS_S_BAD_MECH;
--- 
-2.10.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server
index 2835929..e097353 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server
@@ -1,6 +1,4 @@
 # Automatically generated.  If you change anything in this file other than the
-# values of RUN_KADMIND or DAEMON_ARGS, first run dpkg-reconfigure
+# values of DAEMON_ARGS, first run dpkg-reconfigure
 # krb5-admin-server and disable managing the kadmin configuration with
 # debconf.  Otherwise, changes will be overwritten.
-
-RUN_KADMIND=true
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/fix-CVE-2017-11368.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/fix-CVE-2017-11368.patch
deleted file mode 100644
index a2eb7bc..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/fix-CVE-2017-11368.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Upstream-Status: Backport [https://github.com/krb5/krb5/commit/ffb35baac6981f9e8914f8f3bffd37f284b85970]
-
-Backport patch to fix CVE-2017-11368.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From ffb35baac6981f9e8914f8f3bffd37f284b85970 Mon Sep 17 00:00:00 2001
-From: Greg Hudson <ghudson@mit.edu>
-Date: Thu, 13 Jul 2017 12:14:20 -0400
-Subject: [PATCH] Prevent KDC unset status assertion failures
-
-Assign status values if S4U2Self padata fails to decode, if an
-S4U2Proxy request uses invalid KDC options, or if an S4U2Proxy request
-uses an evidence ticket which does not match the canonicalized request
-server principal name.  Reported by Samuel Cabrero.
-
-If a status value is not assigned during KDC processing, default to
-"UNKNOWN_REASON" rather than failing an assertion.  This change will
-prevent future denial of service bugs due to similar mistakes, and
-will allow us to omit assigning status values for unlikely errors such
-as small memory allocation failures.
-
-CVE-2017-11368:
-
-In MIT krb5 1.7 and later, an authenticated attacker can cause an
-assertion failure in krb5kdc by sending an invalid S4U2Self or
-S4U2Proxy request.
-
-  CVSSv3 Vector: AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C
-
-ticket: 8599 (new)
-target_version: 1.15-next
-target_version: 1.14-next
-tags: pullup
----
- src/kdc/do_as_req.c  |  4 ++--
- src/kdc/do_tgs_req.c |  3 ++-
- src/kdc/kdc_util.c   | 10 ++++++++--
- 3 files changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c
-index 2d3ad13..9b256c8 100644
---- a/src/kdc/do_as_req.c
-+++ b/src/kdc/do_as_req.c
-@@ -366,8 +366,8 @@ finish_process_as_req(struct as_req_state *state, krb5_error_code errcode)
-     did_log = 1;
- 
- egress:
--    if (errcode != 0)
--        assert (state->status != 0);
-+    if (errcode != 0 && state->status == NULL)
-+        state->status = "UNKNOWN_REASON";
- 
-     au_state->status = state->status;
-     au_state->reply = &state->reply;
-diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c
-index cdc79ad..d8d6719 100644
---- a/src/kdc/do_tgs_req.c
-+++ b/src/kdc/do_tgs_req.c
-@@ -823,7 +823,8 @@ process_tgs_req(struct server_handle *handle, krb5_data *pkt,
-     free(reply.enc_part.ciphertext.data);
- 
- cleanup:
--    assert(status != NULL);
-+    if (status == NULL)
-+        status = "UNKNOWN_REASON";
-     if (reply_key)
-         krb5_free_keyblock(kdc_context, reply_key);
-     if (errcode)
-diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c
-index 778a629..b710aef 100644
---- a/src/kdc/kdc_util.c
-+++ b/src/kdc/kdc_util.c
-@@ -1220,8 +1220,10 @@ kdc_process_for_user(kdc_realm_t *kdc_active_realm,
-     req_data.data = (char *)pa_data->contents;
- 
-     code = decode_krb5_pa_for_user(&req_data, &for_user);
--    if (code)
-+    if (code) {
-+        *status = "DECODE_PA_FOR_USER";
-         return code;
-+    }
- 
-     code = verify_for_user_checksum(kdc_context, tgs_session, for_user);
-     if (code) {
-@@ -1320,8 +1322,10 @@ kdc_process_s4u_x509_user(krb5_context context,
-     req_data.data = (char *)pa_data->contents;
- 
-     code = decode_krb5_pa_s4u_x509_user(&req_data, s4u_x509_user);
--    if (code)
-+    if (code) {
-+        *status = "DECODE_PA_S4U_X509_USER";
-         return code;
-+    }
- 
-     code = verify_s4u_x509_user_checksum(context,
-                                          tgs_subkey ? tgs_subkey :
-@@ -1624,6 +1628,7 @@ kdc_process_s4u2proxy_req(kdc_realm_t *kdc_active_realm,
-      * that is validated previously in validate_tgs_request().
-      */
-     if (request->kdc_options & (NON_TGT_OPTION | KDC_OPT_ENC_TKT_IN_SKEY)) {
-+        *status = "INVALID_S4U2PROXY_OPTIONS";
-         return KRB5KDC_ERR_BADOPTION;
-     }
- 
-@@ -1631,6 +1636,7 @@ kdc_process_s4u2proxy_req(kdc_realm_t *kdc_active_realm,
-     if (!krb5_principal_compare(kdc_context,
-                                 server->princ, /* after canon */
-                                 server_princ)) {
-+        *status = "EVIDENCE_TICKET_MISMATCH";
-         return KRB5KDC_ERR_SERVER_NOMATCH;
-     }
- 
--- 
-2.10.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
index 1b42716..21939a1 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
@@ -7,6 +7,7 @@
 Type=forking
 ExecStartPre=/bin/sh -c "test ! -f /var/log/kadmind.log || test ! -x /sbin/restorecon || /sbin/restorecon -F /var/log/kadmind.log"
 ExecStart=/usr/sbin/kadmind
+EnvironmentFile=-/etc/default/krb5-admin-server
 SuccessExitStatus=1 2 SIGKILL
 TimeoutStopSec=30
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
index d5e5a95..bf37c45 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
@@ -6,6 +6,7 @@
 [Service]
 Type=forking
 ExecStart=/usr/sbin/krb5kdc
+EnvironmentFile=-/etc/default/krb5-kdc
 SuccessExitStatus=1 2 SIGKILL
 TimeoutStopSec=30
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.15.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.15.1.bb
deleted file mode 100644
index e75e861..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.15.1.bb
+++ /dev/null
@@ -1,184 +0,0 @@
-SUMMARY = "A network authentication protocol"
-DESCRIPTION = "Kerberos is a system for authenticating users and services on a network. \
- Kerberos is a trusted third-party service.  That means that there is a \
- third party (the Kerberos server) that is trusted by all the entities on \
- the network (users and services, usually called "principals"). \
- . \
- This is the MIT reference implementation of Kerberos V5. \
- . \
- This package contains the Kerberos key server (KDC).  The KDC manages all \
- authentication credentials for a Kerberos realm, holds the master keys \
- for the realm, and responds to authentication requests.  This package \
- should be installed on both master and slave KDCs."
-
-HOMEPAGE = "http://web.mit.edu/Kerberos/"
-SECTION = "console/network"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=3e12b8a065cca25dfdcac734fb3ec0b9"
-DEPENDS = "ncurses util-linux e2fsprogs e2fsprogs-native"
-
-inherit autotools-brokensep binconfig perlnative systemd update-rc.d
-
-SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \
-           file://0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch \
-           file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \
-           file://crosscompile_nm.patch \
-           file://etc/init.d/krb5-kdc \
-           file://etc/init.d/krb5-admin-server \
-           file://etc/default/krb5-kdc \
-           file://etc/default/krb5-admin-server \
-           file://krb5-kdc.service \
-           file://krb5-admin-server.service \
-           file://fix-CVE-2017-11368.patch;striplevel=2 \
-           file://CVE-2017-11462.patch;striplevel=2 \
-"
-SRC_URI[md5sum] = "8022f3a1cde8463e44fd35ef42731f85"
-SRC_URI[sha256sum] = "437c8831ddd5fde2a993fef425dedb48468109bb3d3261ef838295045a89eb45"
-
-CVE_PRODUCT = "kerberos"
-
-S = "${WORKDIR}/${BP}/src"
-
-PACKAGECONFIG ??= "openssl"
-PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
-PACKAGECONFIG[openssl] = "--with-pkinit-crypto-impl=openssl,,openssl"
-PACKAGECONFIG[keyutils] = "--enable-keyutils,--disable-keyutils,keyutils"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
-
-EXTRA_OECONF += " --without-tcl --with-system-et --disable-rpath"
-CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regcomp=yes \
-                  ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \
-                  ac_cv_file__etc_TIMEZONE=no"
-
-CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et"
-LDFLAGS_append = " -pthread"
-
-do_configure() {
-    gnu-configize --force
-    autoreconf
-    oe_runconf
-}
-
-do_install_append() {
-    rm -rf ${D}/${localstatedir}/run
-    rm -f ${D}${bindir}/sclient
-    rm -f ${D}${bindir}/sim_client
-    rm -f ${D}${bindir}/uuclient
-    rm -f ${D}${sbindir}/krb5-send-pr
-    rm -f ${D}${sbindir}/sim_server
-    rm -f ${D}${sbindir}/sserver
-    rm -f ${D}${sbindir}/uuserver
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
-        mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default
-        install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d
-        install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default
-
-        mkdir -p ${D}/${sysconfdir}/default/volatiles
-        echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \
-              > ${D}${sysconfdir}/default/volatiles/87_krb5
-    fi
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        echo "d /run/krb5kdc - - - -" \
-              > ${D}${sysconfdir}/tmpfiles.d/krb5.conf
-
-        install -d ${D}${systemd_system_unitdir}
-        install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir}
-        install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir}
-    fi
-}
-
-PACKAGES =+ "${PN}-admin-server \
-             ${PN}-gss-samples \
-             ${PN}-k5tls \
-             ${PN}-kdc \
-             ${PN}-kdc-ldap \
-             ${PN}-kpropd \
-             ${PN}-otp \
-             ${PN}-pkinit \
-             ${PN}-user \
-             libgssapi-krb5 \
-             libgssrpc \
-             libk5crypto \
-             libkadm5clnt-mit \
-             libkadm5srv-mit \
-             libkdb5 \
-             libkrad \
-             libkrb5 \
-             libkrb5support \
-             libverto"
-
-FILES_${PN} = "${libdir}/krb5/plugins/preauth/test.so"
-FILES_${PN}-doc += "${datadir}/examples"
-FILES_${PN}-dbg += "${libdir}/krb5/plugins/*/.debug"
-
-FILES_${PN}-admin-server = "${sbindir}/kadmin.local \
-                            ${sbindir}/kadmind \
-                            ${sbindir}/kprop \
-                            ${sysconfdir}/default/krb5-admin-server \
-                            ${sysconfdir}/init.d/krb5-admin-server \
-                            ${systemd_system_unitdir}/krb5-admin-server.service"
-
-FILES_${PN}-gss-samples = "${bindir}/gss-client \
-                           ${sbindir}/gss-server"
-
-FILES_${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so"
-
-FILES_${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \
-                   ${localstatedir}/krb5kdc \
-                   ${sbindir}/kdb5_util \
-                   ${sbindir}/kproplog \
-                   ${sbindir}/krb5kdc \
-                   ${sysconfdir}/default/krb5-kdc \
-                   ${sysconfdir}/default/volatiles/87_krb5 \
-                   ${sysconfdir}/init.d/krb5-kdc \
-                   ${sysconfdir}/tmpfiles.d/krb5.conf \
-                   ${systemd_system_unitdir}/krb5-kdc.service"
-
-FILES_${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \
-                        ${libdir}/krb5/plugins/kdb/kldap.so \
-                        ${sbindir}/kdb5_ldap_util"
-
-FILES_${PN}-kpropd = "${sbindir}/kpropd"
-FILES_${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so"
-FILES_${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so"
-FILES_${PN}-user = "${bindir}/k*"
-
-FILES_libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}"
-FILES_libgssrpc = "${libdir}/libgssrpc${SOLIBS}"
-FILES_libk5crypto = "${libdir}/libk5crypto${SOLIBS}"
-FILES_libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}"
-FILES_libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}"
-FILES_libkdb5 = "${libdir}/libkdb5${SOLIBS}"
-FILES_libkrad = "${libdir}/libkrad${SOLIBS}"
-FILES_libkrb5 = "${libdir}/libkrb5${SOLIBS} \
-                 ${libdir}/krb5/plugins/authdata \
-                 ${libdir}/krb5/plugins/libkrb5"
-FILES_libkrb5support = "${libdir}/libkrb5support${SOLIBS}"
-FILES_libverto = "${libdir}/libverto${SOLIBS}"
-
-RDEPENDS_${PN}-kadmin-server = "${PN}-kdc"
-RDEPENDS_${PN}-kpropd = "${PN}-kdc"
-
-INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc"
-INITSCRIPT_NAME_${PN}-admin-server = "krb5-admin-server"
-INITSCRIPT_NAME_${PN}-kdc = "krb5-kdc"
-
-SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc"
-SYSTEMD_SERVICE_${PN}-admin-server = "krb5-admin-server.service"
-SYSTEMD_SERVICE_${PN}-kdc = "krb5-kdc.service"
-
-pkg_postinst_${PN}-kdc () {
-    if [ -z "$D" ]; then
-        if command -v systemd-tmpfiles >/dev/null; then
-            systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf
-        elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
-            ${sysconfdir}/init.d/populate-volatile.sh update
-        fi
-    fi
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb
new file mode 100644
index 0000000..f95240f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb
@@ -0,0 +1,188 @@
+SUMMARY = "A network authentication protocol"
+DESCRIPTION = "Kerberos is a system for authenticating users and services on a network. \
+ Kerberos is a trusted third-party service.  That means that there is a \
+ third party (the Kerberos server) that is trusted by all the entities on \
+ the network (users and services, usually called "principals"). \
+ . \
+ This is the MIT reference implementation of Kerberos V5. \
+ . \
+ This package contains the Kerberos key server (KDC).  The KDC manages all \
+ authentication credentials for a Kerberos realm, holds the master keys \
+ for the realm, and responds to authentication requests.  This package \
+ should be installed on both master and slave KDCs."
+
+HOMEPAGE = "http://web.mit.edu/Kerberos/"
+SECTION = "console/network"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=59b8da652f07186b44782a8454574f30"
+DEPENDS = "ncurses util-linux e2fsprogs e2fsprogs-native openssl"
+
+inherit autotools-brokensep binconfig perlnative systemd update-rc.d
+
+SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \
+           file://0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch \
+           file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \
+           file://crosscompile_nm.patch \
+           file://etc/init.d/krb5-kdc \
+           file://etc/init.d/krb5-admin-server \
+           file://etc/default/krb5-kdc \
+           file://etc/default/krb5-admin-server \
+           file://krb5-kdc.service \
+           file://krb5-admin-server.service \
+"
+SRC_URI[md5sum] = "23c5e9f07642db4a67f7a5b6168b1319"
+SRC_URI[sha256sum] = "faeb125f83b0fb4cdb2f99f088140631bb47d975982de0956d18c85842969e08"
+
+CVE_PRODUCT = "kerberos"
+
+S = "${WORKDIR}/${BP}/src"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
+PACKAGECONFIG[openssl] = "--with-crypto-impl=openssl,,openssl"
+PACKAGECONFIG[keyutils] = "--enable-keyutils,--disable-keyutils,keyutils"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
+
+EXTRA_OECONF += " --without-tcl --with-system-et --disable-rpath"
+CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regcomp=yes \
+                  ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \
+                  ac_cv_file__etc_TIMEZONE=no"
+
+CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et"
+CFLAGS_append_riscv64 = " -D_REENTRANT -pthread"
+LDFLAGS_append = " -pthread"
+
+do_configure() {
+    gnu-configize --force
+    autoreconf
+    oe_runconf
+}
+
+do_install_append() {
+    rm -rf ${D}/${localstatedir}/run
+    rm -f ${D}${bindir}/sclient
+    rm -f ${D}${bindir}/sim_client
+    rm -f ${D}${bindir}/uuclient
+    rm -f ${D}${sbindir}/krb5-send-pr
+    rm -f ${D}${sbindir}/sim_server
+    rm -f ${D}${sbindir}/sserver
+    rm -f ${D}${sbindir}/uuserver
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default
+        install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d
+        install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default
+
+        mkdir -p ${D}/${sysconfdir}/default/volatiles
+        echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \
+              > ${D}${sysconfdir}/default/volatiles/87_krb5
+
+        echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server
+    fi
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /run/krb5kdc - - - -" \
+              > ${D}${sysconfdir}/tmpfiles.d/krb5.conf
+
+        mkdir -p ${D}/${sysconfdir}/default
+        install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default
+
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir}
+        install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir}
+    fi
+}
+
+PACKAGES =+ "${PN}-admin-server \
+             ${PN}-gss-samples \
+             ${PN}-k5tls \
+             ${PN}-kdc \
+             ${PN}-kdc-ldap \
+             ${PN}-kpropd \
+             ${PN}-otp \
+             ${PN}-pkinit \
+             ${PN}-user \
+             libgssapi-krb5 \
+             libgssrpc \
+             libk5crypto \
+             libkadm5clnt-mit \
+             libkadm5srv-mit \
+             libkdb5 \
+             libkrad \
+             libkrb5 \
+             libkrb5support \
+             libverto"
+
+FILES_${PN} = "${libdir}/krb5/plugins/preauth/test.so"
+FILES_${PN}-doc += "${datadir}/examples"
+FILES_${PN}-dbg += "${libdir}/krb5/plugins/*/.debug"
+
+FILES_${PN}-admin-server = "${sbindir}/kadmin.local \
+                            ${sbindir}/kadmind \
+                            ${sbindir}/kprop \
+                            ${sysconfdir}/default/krb5-admin-server \
+                            ${sysconfdir}/init.d/krb5-admin-server \
+                            ${systemd_system_unitdir}/krb5-admin-server.service"
+
+FILES_${PN}-gss-samples = "${bindir}/gss-client \
+                           ${sbindir}/gss-server"
+
+FILES_${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so"
+
+FILES_${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \
+                   ${localstatedir}/krb5kdc \
+                   ${sbindir}/kdb5_util \
+                   ${sbindir}/kproplog \
+                   ${sbindir}/krb5kdc \
+                   ${sysconfdir}/default/krb5-kdc \
+                   ${sysconfdir}/default/volatiles/87_krb5 \
+                   ${sysconfdir}/init.d/krb5-kdc \
+                   ${sysconfdir}/tmpfiles.d/krb5.conf \
+                   ${systemd_system_unitdir}/krb5-kdc.service"
+
+FILES_${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \
+                        ${libdir}/krb5/plugins/kdb/kldap.so \
+                        ${sbindir}/kdb5_ldap_util"
+
+FILES_${PN}-kpropd = "${sbindir}/kpropd"
+FILES_${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so"
+FILES_${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so"
+FILES_${PN}-user = "${bindir}/k*"
+
+FILES_libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}"
+FILES_libgssrpc = "${libdir}/libgssrpc${SOLIBS}"
+FILES_libk5crypto = "${libdir}/libk5crypto${SOLIBS}"
+FILES_libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}"
+FILES_libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}"
+FILES_libkdb5 = "${libdir}/libkdb5${SOLIBS}"
+FILES_libkrad = "${libdir}/libkrad${SOLIBS}"
+FILES_libkrb5 = "${libdir}/libkrb5${SOLIBS} \
+                 ${libdir}/krb5/plugins/authdata \
+                 ${libdir}/krb5/plugins/libkrb5"
+FILES_libkrb5support = "${libdir}/libkrb5support${SOLIBS}"
+FILES_libverto = "${libdir}/libverto${SOLIBS}"
+
+RDEPENDS_${PN}-kadmin-server = "${PN}-kdc"
+RDEPENDS_${PN}-kpropd = "${PN}-kdc"
+
+INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc"
+INITSCRIPT_NAME_${PN}-admin-server = "krb5-admin-server"
+INITSCRIPT_NAME_${PN}-kdc = "krb5-kdc"
+
+SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc"
+SYSTEMD_SERVICE_${PN}-admin-server = "krb5-admin-server.service"
+SYSTEMD_SERVICE_${PN}-kdc = "krb5-kdc.service"
+
+pkg_postinst_${PN}-kdc () {
+    if [ -z "$D" ]; then
+        if command -v systemd-tmpfiles >/dev/null; then
+            systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf
+        elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+            ${sysconfdir}/init.d/populate-volatile.sh update
+        fi
+    fi
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch
index 4047ffb..7a3429b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch
@@ -12,6 +12,7 @@
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
+
 ---
  m4/compiler-warnings.m4 | 29 +++++++++++++++++++++++++----
  1 file changed, 25 insertions(+), 4 deletions(-)
@@ -53,7 +54,7 @@
  		      -Wdeclaration-after-statement -Wstrict-prototypes \
 @@ -17,22 +37,23 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
  		      -Wmissing-include-dirs -Waggregate-return \
- 		      -Wformat-security; do
+ 		      -Wformat-security -Wtype-limits; do
  		SAVE_CFLAGS="$CFLAGS"
 -		CFLAGS="$CFLAGS $option"
 +		CFLAGS="$CFLAGS $option $WERROR"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.16.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.16.0.bb
deleted file mode 100644
index 80c26c0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.16.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol"
-DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi"
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = " \
-    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
-"
-
-DEPENDS = "glib-2.0 libgudev libmbim glib-2.0-native"
-
-inherit autotools pkgconfig bash-completion
-
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \
-           file://0001-Detect-clang.patch \
-           "
-SRC_URI[md5sum] = "4970c110f160b33637a3515004c637b2"
-SRC_URI[sha256sum] = "7ab6bb47fd23bf4d3fa17424e40ea5552d08b19e5ee4f125f21f316c8086ba2a"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.0.bb
new file mode 100644
index 0000000..9301cbd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libqmi/libqmi_1.20.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol"
+DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi"
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+"
+
+DEPENDS = "glib-2.0 libgudev libmbim glib-2.0-native"
+
+inherit autotools pkgconfig bash-completion
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \
+           file://0001-Detect-clang.patch \
+           "
+SRC_URI[md5sum] = "797e365521df76b77b067e6317618b41"
+SRC_URI[sha256sum] = "21428cd3749c56246565123f707fee51238651a22c60bdc85ebce97388626eb4"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.11.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.11.0.bb
index 0a5846b..ca4685a 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.11.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libuv/libuv_1.11.0.bb
@@ -4,10 +4,10 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=bb5ea0d651f4c3519327171906045775"
 
-SRC_URI = "https://github.com/libuv/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
-
-SRC_URI[md5sum] = "15550a9f5f45f7f32ae2d9bb0a21a2a7"
-SRC_URI[sha256sum] = "6ec7eec6ecc24b1a8ffedebedb2fe9313fffb5410de89aaf784dd01080411c7a"
+S = "${WORKDIR}/git"
+SRCREV = "7452ef4e06a4f99ee26b694c65476401534f2725"
+BRANCH = "v1.x"
+SRC_URI = "git://github.com/libuv/libuv.git;protocol=https;branch=${BRANCH};"
 
 inherit autotools
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_2.1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_2.1.0.bb
index 9354799..100f3a3 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_2.1.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_2.1.0.bb
@@ -5,10 +5,9 @@
 
 DEPENDS = "zlib"
 
-SRC_URI = "https://github.com/warmcat/libwebsockets/archive/v${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4df3be57dee43aeebd54a3ed56568f50"
-SRC_URI[sha256sum] = "bcc96aaa609daae4d3f7ab1ee480126709ef4f6a8bf9c85de40aae48e38cce66"
+S = "${WORKDIR}/git"
+SRCREV = "73557509bd15f95a1ad081a6f4fab48ff7743215"
+SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;"
 
 inherit cmake pkgconfig
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch
new file mode 100644
index 0000000..a5aa277
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch
@@ -0,0 +1,35 @@
+From 0be38301249d797ec1f59071cc868ceda6d4720a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Tue, 12 Apr 2016 12:50:32 +0100
+Subject: [PATCH 1/2] config.mk: allow prefix / mandir / localedir from
+ environment
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We want to control them using OE environment variables.
+
+Upstream-Status: Inappropriate [embedded-specific]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ config.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/config.mk b/config.mk
+index 71f17e5..81d9702 100644
+--- a/config.mk
++++ b/config.mk
+@@ -249,7 +249,7 @@ ifeq ($(WITH_DOCS),yes)
+ endif
+ 
+ INSTALL?=install
+-prefix=/usr/local
+-mandir=${prefix}/share/man
+-localedir=${prefix}/share/locale
++prefix?=/usr/local
++mandir?=${prefix}/share/man
++localedir?=${prefix}/share/locale
+ STRIP?=strip
+-- 
+2.15.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch
new file mode 100644
index 0000000..c89dfe6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch
@@ -0,0 +1,975 @@
+From d9aeef8d95a325942cc92f4d72415771d75d904c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Tue, 12 Apr 2016 13:05:10 +0100
+Subject: [PATCH 2/2] uthash: remove in-tree version
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We don't need it as we want to use the version provided by
+meta-oe instead.
+
+Upstream-Status: Inappropriate [embedded-specific]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ src/uthash.h | 948 -----------------------------------------------------------
+ 1 file changed, 948 deletions(-)
+ delete mode 100644 src/uthash.h
+
+diff --git a/src/uthash.h b/src/uthash.h
+deleted file mode 100644
+index 915a825..0000000
+--- a/src/uthash.h
++++ /dev/null
+@@ -1,948 +0,0 @@
+-/*
+-Copyright (c) 2003-2013, Troy D. Hanson     http://troydhanson.github.com/uthash/
+-All rights reserved.
+-
+-Redistribution and use in source and binary forms, with or without
+-modification, are permitted provided that the following conditions are met:
+-
+-    * Redistributions of source code must retain the above copyright
+-      notice, this list of conditions and the following disclaimer.
+-
+-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-*/
+-
+-#ifndef UTHASH_H
+-#define UTHASH_H 
+-
+-#include <string.h>   /* memcmp,strlen */
+-#include <stddef.h>   /* ptrdiff_t */
+-#include <stdlib.h>   /* exit() */
+-
+-/* These macros use decltype or the earlier __typeof GNU extension.
+-   As decltype is only available in newer compilers (VS2010 or gcc 4.3+
+-   when compiling c++ source) this code uses whatever method is needed
+-   or, for VS2008 where neither is available, uses casting workarounds. */
+-#ifdef _MSC_VER         /* MS compiler */
+-#if _MSC_VER >= 1600 && defined(__cplusplus)  /* VS2010 or newer in C++ mode */
+-#define DECLTYPE(x) (decltype(x))
+-#else                   /* VS2008 or older (or VS2010 in C mode) */
+-#define NO_DECLTYPE
+-#define DECLTYPE(x)
+-#endif
+-#else                   /* GNU, Sun and other compilers */
+-#define DECLTYPE(x) (__typeof(x))
+-#endif
+-
+-#ifdef NO_DECLTYPE
+-#define DECLTYPE_ASSIGN(dst,src)                                                 \
+-do {                                                                             \
+-  char **_da_dst = (char**)(&(dst));                                             \
+-  *_da_dst = (char*)(src);                                                       \
+-} while(0)
+-#else 
+-#define DECLTYPE_ASSIGN(dst,src)                                                 \
+-do {                                                                             \
+-  (dst) = DECLTYPE(dst)(src);                                                    \
+-} while(0)
+-#endif
+-
+-/* a number of the hash function use uint32_t which isn't defined on win32 */
+-#ifdef _MSC_VER
+-typedef unsigned int uint32_t;
+-typedef unsigned char uint8_t;
+-#else
+-#include <inttypes.h>   /* uint32_t */
+-#endif
+-
+-#define UTHASH_VERSION 1.9.8
+-
+-#ifndef uthash_fatal
+-#define uthash_fatal(msg) exit(-1)        /* fatal error (out of memory,etc) */
+-#endif
+-#ifndef uthash_malloc
+-#define uthash_malloc(sz) malloc(sz)      /* malloc fcn                      */
+-#endif
+-#ifndef uthash_free
+-#define uthash_free(ptr,sz) free(ptr)     /* free fcn                        */
+-#endif
+-
+-#ifndef uthash_noexpand_fyi
+-#define uthash_noexpand_fyi(tbl)          /* can be defined to log noexpand  */
+-#endif
+-#ifndef uthash_expand_fyi
+-#define uthash_expand_fyi(tbl)            /* can be defined to log expands   */
+-#endif
+-
+-/* initial number of buckets */
+-#define HASH_INITIAL_NUM_BUCKETS 32      /* initial number of buckets        */
+-#define HASH_INITIAL_NUM_BUCKETS_LOG2 5  /* lg2 of initial number of buckets */
+-#define HASH_BKT_CAPACITY_THRESH 10      /* expand when bucket count reaches */
+-
+-/* calculate the element whose hash handle address is hhe */
+-#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho)))
+-
+-#define HASH_FIND(hh,head,keyptr,keylen,out)                                     \
+-do {                                                                             \
+-  unsigned _hf_bkt,_hf_hashv;                                                    \
+-  out=NULL;                                                                      \
+-  if (head) {                                                                    \
+-     HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt);   \
+-     if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) {                           \
+-       HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ],  \
+-                        keyptr,keylen,out);                                      \
+-     }                                                                           \
+-  }                                                                              \
+-} while (0)
+-
+-#ifdef HASH_BLOOM
+-#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM)
+-#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0)
+-#define HASH_BLOOM_MAKE(tbl)                                                     \
+-do {                                                                             \
+-  (tbl)->bloom_nbits = HASH_BLOOM;                                               \
+-  (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN);                 \
+-  if (!((tbl)->bloom_bv))  { uthash_fatal( "out of memory"); }                   \
+-  memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN);                                \
+-  (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE;                                       \
+-} while (0) 
+-
+-#define HASH_BLOOM_FREE(tbl)                                                     \
+-do {                                                                             \
+-  uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN);                              \
+-} while (0) 
+-
+-#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8)))
+-#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8)))
+-
+-#define HASH_BLOOM_ADD(tbl,hashv)                                                \
+-  HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+-
+-#define HASH_BLOOM_TEST(tbl,hashv)                                               \
+-  HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+-
+-#else
+-#define HASH_BLOOM_MAKE(tbl) 
+-#define HASH_BLOOM_FREE(tbl) 
+-#define HASH_BLOOM_ADD(tbl,hashv) 
+-#define HASH_BLOOM_TEST(tbl,hashv) (1)
+-#define HASH_BLOOM_BYTELEN 0
+-#endif
+-
+-#define HASH_MAKE_TABLE(hh,head)                                                 \
+-do {                                                                             \
+-  (head)->hh.tbl = (UT_hash_table*)uthash_malloc(                                \
+-                  sizeof(UT_hash_table));                                        \
+-  if (!((head)->hh.tbl))  { uthash_fatal( "out of memory"); }                    \
+-  memset((head)->hh.tbl, 0, sizeof(UT_hash_table));                              \
+-  (head)->hh.tbl->tail = &((head)->hh);                                          \
+-  (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS;                        \
+-  (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2;              \
+-  (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head);                    \
+-  (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc(                      \
+-          HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket));               \
+-  if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); }             \
+-  memset((head)->hh.tbl->buckets, 0,                                             \
+-          HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket));               \
+-  HASH_BLOOM_MAKE((head)->hh.tbl);                                               \
+-  (head)->hh.tbl->signature = HASH_SIGNATURE;                                    \
+-} while(0)
+-
+-#define HASH_ADD(hh,head,fieldname,keylen_in,add)                                \
+-        HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add)
+-
+-#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced)                   \
+-do {                                                                             \
+-  replaced=NULL;                                                                 \
+-  HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced);                     \
+-  if (replaced!=NULL) {                                                          \
+-     HASH_DELETE(hh,head,replaced);                                              \
+-  };                                                                             \
+-  HASH_ADD(hh,head,fieldname,keylen_in,add);                                     \
+-} while(0)
+- 
+-#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add)                            \
+-do {                                                                             \
+- unsigned _ha_bkt;                                                               \
+- (add)->hh.next = NULL;                                                          \
+- (add)->hh.key = (char*)keyptr;                                                  \
+- (add)->hh.keylen = (unsigned)keylen_in;                                                   \
+- if (!(head)) {                                                                  \
+-    head = (add);                                                                \
+-    (head)->hh.prev = NULL;                                                      \
+-    HASH_MAKE_TABLE(hh,head);                                                    \
+- } else {                                                                        \
+-    (head)->hh.tbl->tail->next = (add);                                          \
+-    (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail);         \
+-    (head)->hh.tbl->tail = &((add)->hh);                                         \
+- }                                                                               \
+- (head)->hh.tbl->num_items++;                                                    \
+- (add)->hh.tbl = (head)->hh.tbl;                                                 \
+- HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets,                         \
+-         (add)->hh.hashv, _ha_bkt);                                              \
+- HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh);                   \
+- HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv);                                 \
+- HASH_EMIT_KEY(hh,head,keyptr,keylen_in);                                        \
+- HASH_FSCK(hh,head);                                                             \
+-} while(0)
+-
+-#define HASH_TO_BKT( hashv, num_bkts, bkt )                                      \
+-do {                                                                             \
+-  bkt = ((hashv) & ((num_bkts) - 1));                                            \
+-} while(0)
+-
+-/* delete "delptr" from the hash table.
+- * "the usual" patch-up process for the app-order doubly-linked-list.
+- * The use of _hd_hh_del below deserves special explanation.
+- * These used to be expressed using (delptr) but that led to a bug
+- * if someone used the same symbol for the head and deletee, like
+- *  HASH_DELETE(hh,users,users);
+- * We want that to work, but by changing the head (users) below
+- * we were forfeiting our ability to further refer to the deletee (users)
+- * in the patch-up process. Solution: use scratch space to
+- * copy the deletee pointer, then the latter references are via that
+- * scratch pointer rather than through the repointed (users) symbol.
+- */
+-#define HASH_DELETE(hh,head,delptr)                                              \
+-do {                                                                             \
+-    unsigned _hd_bkt;                                                            \
+-    struct UT_hash_handle *_hd_hh_del;                                           \
+-    if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) )  {         \
+-        uthash_free((head)->hh.tbl->buckets,                                     \
+-                    (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+-        HASH_BLOOM_FREE((head)->hh.tbl);                                         \
+-        uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                      \
+-        head = NULL;                                                             \
+-    } else {                                                                     \
+-        _hd_hh_del = &((delptr)->hh);                                            \
+-        if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) {     \
+-            (head)->hh.tbl->tail =                                               \
+-                (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) +               \
+-                (head)->hh.tbl->hho);                                            \
+-        }                                                                        \
+-        if ((delptr)->hh.prev) {                                                 \
+-            ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) +                  \
+-                    (head)->hh.tbl->hho))->next = (delptr)->hh.next;             \
+-        } else {                                                                 \
+-            DECLTYPE_ASSIGN(head,(delptr)->hh.next);                             \
+-        }                                                                        \
+-        if (_hd_hh_del->next) {                                                  \
+-            ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next +                     \
+-                    (head)->hh.tbl->hho))->prev =                                \
+-                    _hd_hh_del->prev;                                            \
+-        }                                                                        \
+-        HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt);   \
+-        HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del);        \
+-        (head)->hh.tbl->num_items--;                                             \
+-    }                                                                            \
+-    HASH_FSCK(hh,head);                                                          \
+-} while (0)
+-
+-
+-/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */
+-#define HASH_FIND_STR(head,findstr,out)                                          \
+-    HASH_FIND(hh,head,findstr,strlen(findstr),out)
+-#define HASH_ADD_STR(head,strfield,add)                                          \
+-    HASH_ADD(hh,head,strfield,strlen(add->strfield),add)
+-#define HASH_REPLACE_STR(head,strfield,add,replaced)                             \
+-  HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced)
+-#define HASH_FIND_INT(head,findint,out)                                          \
+-    HASH_FIND(hh,head,findint,sizeof(int),out)
+-#define HASH_ADD_INT(head,intfield,add)                                          \
+-    HASH_ADD(hh,head,intfield,sizeof(int),add)
+-#define HASH_REPLACE_INT(head,intfield,add,replaced)                             \
+-    HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced)
+-#define HASH_FIND_PTR(head,findptr,out)                                          \
+-    HASH_FIND(hh,head,findptr,sizeof(void *),out)
+-#define HASH_ADD_PTR(head,ptrfield,add)                                          \
+-    HASH_ADD(hh,head,ptrfield,sizeof(void *),add)
+-#define HASH_REPLACE_PTR(head,ptrfield,add)                                      \
+-    HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced)
+-#define HASH_DEL(head,delptr)                                                    \
+-    HASH_DELETE(hh,head,delptr)
+-
+-/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined.
+- * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined.
+- */
+-#ifdef HASH_DEBUG
+-#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
+-#define HASH_FSCK(hh,head)                                                       \
+-do {                                                                             \
+-    unsigned _bkt_i;                                                             \
+-    unsigned _count, _bkt_count;                                                 \
+-    char *_prev;                                                                 \
+-    struct UT_hash_handle *_thh;                                                 \
+-    if (head) {                                                                  \
+-        _count = 0;                                                              \
+-        for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) {       \
+-            _bkt_count = 0;                                                      \
+-            _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head;                      \
+-            _prev = NULL;                                                        \
+-            while (_thh) {                                                       \
+-               if (_prev != (char*)(_thh->hh_prev)) {                            \
+-                   HASH_OOPS("invalid hh_prev %p, actual %p\n",                  \
+-                    _thh->hh_prev, _prev );                                      \
+-               }                                                                 \
+-               _bkt_count++;                                                     \
+-               _prev = (char*)(_thh);                                            \
+-               _thh = _thh->hh_next;                                             \
+-            }                                                                    \
+-            _count += _bkt_count;                                                \
+-            if ((head)->hh.tbl->buckets[_bkt_i].count !=  _bkt_count) {          \
+-               HASH_OOPS("invalid bucket count %d, actual %d\n",                 \
+-                (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count);              \
+-            }                                                                    \
+-        }                                                                        \
+-        if (_count != (head)->hh.tbl->num_items) {                               \
+-            HASH_OOPS("invalid hh item count %d, actual %d\n",                   \
+-                (head)->hh.tbl->num_items, _count );                             \
+-        }                                                                        \
+-        /* traverse hh in app order; check next/prev integrity, count */         \
+-        _count = 0;                                                              \
+-        _prev = NULL;                                                            \
+-        _thh =  &(head)->hh;                                                     \
+-        while (_thh) {                                                           \
+-           _count++;                                                             \
+-           if (_prev !=(char*)(_thh->prev)) {                                    \
+-              HASH_OOPS("invalid prev %p, actual %p\n",                          \
+-                    _thh->prev, _prev );                                         \
+-           }                                                                     \
+-           _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh);                    \
+-           _thh = ( _thh->next ?  (UT_hash_handle*)((char*)(_thh->next) +        \
+-                                  (head)->hh.tbl->hho) : NULL );                 \
+-        }                                                                        \
+-        if (_count != (head)->hh.tbl->num_items) {                               \
+-            HASH_OOPS("invalid app item count %d, actual %d\n",                  \
+-                (head)->hh.tbl->num_items, _count );                             \
+-        }                                                                        \
+-    }                                                                            \
+-} while (0)
+-#else
+-#define HASH_FSCK(hh,head) 
+-#endif
+-
+-/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to 
+- * the descriptor to which this macro is defined for tuning the hash function.
+- * The app can #include <unistd.h> to get the prototype for write(2). */
+-#ifdef HASH_EMIT_KEYS
+-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)                                   \
+-do {                                                                             \
+-    unsigned _klen = fieldlen;                                                   \
+-    write(HASH_EMIT_KEYS, &_klen, sizeof(_klen));                                \
+-    write(HASH_EMIT_KEYS, keyptr, fieldlen);                                     \
+-} while (0)
+-#else 
+-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)                    
+-#endif
+-
+-/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */
+-#ifdef HASH_FUNCTION 
+-#define HASH_FCN HASH_FUNCTION
+-#else
+-#define HASH_FCN HASH_JEN
+-#endif
+-
+-/* The Bernstein hash function, used in Perl prior to v5.6 */
+-#define HASH_BER(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _hb_keylen=keylen;                                                    \
+-  char *_hb_key=(char*)(key);                                                    \
+-  (hashv) = 0;                                                                   \
+-  while (_hb_keylen--)  { (hashv) = ((hashv) * 33) + *_hb_key++; }               \
+-  bkt = (hashv) & (num_bkts-1);                                                  \
+-} while (0)
+-
+-
+-/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at 
+- * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
+-#define HASH_SAX(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _sx_i;                                                                \
+-  char *_hs_key=(char*)(key);                                                    \
+-  hashv = 0;                                                                     \
+-  for(_sx_i=0; _sx_i < keylen; _sx_i++)                                          \
+-      hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i];                     \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while (0)
+-
+-#define HASH_FNV(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _fn_i;                                                                \
+-  char *_hf_key=(char*)(key);                                                    \
+-  hashv = 2166136261UL;                                                          \
+-  for(_fn_i=0; _fn_i < keylen; _fn_i++)                                          \
+-      hashv = (hashv * 16777619) ^ _hf_key[_fn_i];                               \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while(0) 
+- 
+-#define HASH_OAT(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _ho_i;                                                                \
+-  char *_ho_key=(char*)(key);                                                    \
+-  hashv = 0;                                                                     \
+-  for(_ho_i=0; _ho_i < keylen; _ho_i++) {                                        \
+-      hashv += _ho_key[_ho_i];                                                   \
+-      hashv += (hashv << 10);                                                    \
+-      hashv ^= (hashv >> 6);                                                     \
+-  }                                                                              \
+-  hashv += (hashv << 3);                                                         \
+-  hashv ^= (hashv >> 11);                                                        \
+-  hashv += (hashv << 15);                                                        \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while(0)
+-
+-#define HASH_JEN_MIX(a,b,c)                                                      \
+-do {                                                                             \
+-  a -= b; a -= c; a ^= ( c >> 13 );                                              \
+-  b -= c; b -= a; b ^= ( a << 8 );                                               \
+-  c -= a; c -= b; c ^= ( b >> 13 );                                              \
+-  a -= b; a -= c; a ^= ( c >> 12 );                                              \
+-  b -= c; b -= a; b ^= ( a << 16 );                                              \
+-  c -= a; c -= b; c ^= ( b >> 5 );                                               \
+-  a -= b; a -= c; a ^= ( c >> 3 );                                               \
+-  b -= c; b -= a; b ^= ( a << 10 );                                              \
+-  c -= a; c -= b; c ^= ( b >> 15 );                                              \
+-} while (0)
+-
+-#define HASH_JEN(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned _hj_i,_hj_j,_hj_k;                                                    \
+-  unsigned char *_hj_key=(unsigned char*)(key);                                  \
+-  hashv = 0xfeedbeef;                                                            \
+-  _hj_i = _hj_j = 0x9e3779b9;                                                    \
+-  _hj_k = (unsigned)keylen;                                                      \
+-  while (_hj_k >= 12) {                                                          \
+-    _hj_i +=    (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 )                      \
+-        + ( (unsigned)_hj_key[2] << 16 )                                         \
+-        + ( (unsigned)_hj_key[3] << 24 ) );                                      \
+-    _hj_j +=    (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 )                      \
+-        + ( (unsigned)_hj_key[6] << 16 )                                         \
+-        + ( (unsigned)_hj_key[7] << 24 ) );                                      \
+-    hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 )                         \
+-        + ( (unsigned)_hj_key[10] << 16 )                                        \
+-        + ( (unsigned)_hj_key[11] << 24 ) );                                     \
+-                                                                                 \
+-     HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                          \
+-                                                                                 \
+-     _hj_key += 12;                                                              \
+-     _hj_k -= 12;                                                                \
+-  }                                                                              \
+-  hashv += keylen;                                                               \
+-  switch ( _hj_k ) {                                                             \
+-     case 11: hashv += ( (unsigned)_hj_key[10] << 24 );                          \
+-     case 10: hashv += ( (unsigned)_hj_key[9] << 16 );                           \
+-     case 9:  hashv += ( (unsigned)_hj_key[8] << 8 );                            \
+-     case 8:  _hj_j += ( (unsigned)_hj_key[7] << 24 );                           \
+-     case 7:  _hj_j += ( (unsigned)_hj_key[6] << 16 );                           \
+-     case 6:  _hj_j += ( (unsigned)_hj_key[5] << 8 );                            \
+-     case 5:  _hj_j += _hj_key[4];                                               \
+-     case 4:  _hj_i += ( (unsigned)_hj_key[3] << 24 );                           \
+-     case 3:  _hj_i += ( (unsigned)_hj_key[2] << 16 );                           \
+-     case 2:  _hj_i += ( (unsigned)_hj_key[1] << 8 );                            \
+-     case 1:  _hj_i += _hj_key[0];                                               \
+-  }                                                                              \
+-  HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                             \
+-  bkt = hashv & (num_bkts-1);                                                    \
+-} while(0)
+-
+-/* The Paul Hsieh hash function */
+-#undef get16bits
+-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__)             \
+-  || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
+-#define get16bits(d) (*((const uint16_t *) (d)))
+-#endif
+-
+-#if !defined (get16bits)
+-#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)             \
+-                       +(uint32_t)(((const uint8_t *)(d))[0]) )
+-#endif
+-#define HASH_SFH(key,keylen,num_bkts,hashv,bkt)                                  \
+-do {                                                                             \
+-  unsigned char *_sfh_key=(unsigned char*)(key);                                 \
+-  uint32_t _sfh_tmp, _sfh_len = keylen;                                          \
+-                                                                                 \
+-  int _sfh_rem = _sfh_len & 3;                                                   \
+-  _sfh_len >>= 2;                                                                \
+-  hashv = 0xcafebabe;                                                            \
+-                                                                                 \
+-  /* Main loop */                                                                \
+-  for (;_sfh_len > 0; _sfh_len--) {                                              \
+-    hashv    += get16bits (_sfh_key);                                            \
+-    _sfh_tmp       = (uint32_t)(get16bits (_sfh_key+2)) << 11  ^ hashv;          \
+-    hashv     = (hashv << 16) ^ _sfh_tmp;                                        \
+-    _sfh_key += 2*sizeof (uint16_t);                                             \
+-    hashv    += hashv >> 11;                                                     \
+-  }                                                                              \
+-                                                                                 \
+-  /* Handle end cases */                                                         \
+-  switch (_sfh_rem) {                                                            \
+-    case 3: hashv += get16bits (_sfh_key);                                       \
+-            hashv ^= hashv << 16;                                                \
+-            hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18);              \
+-            hashv += hashv >> 11;                                                \
+-            break;                                                               \
+-    case 2: hashv += get16bits (_sfh_key);                                       \
+-            hashv ^= hashv << 11;                                                \
+-            hashv += hashv >> 17;                                                \
+-            break;                                                               \
+-    case 1: hashv += *_sfh_key;                                                  \
+-            hashv ^= hashv << 10;                                                \
+-            hashv += hashv >> 1;                                                 \
+-  }                                                                              \
+-                                                                                 \
+-    /* Force "avalanching" of final 127 bits */                                  \
+-    hashv ^= hashv << 3;                                                         \
+-    hashv += hashv >> 5;                                                         \
+-    hashv ^= hashv << 4;                                                         \
+-    hashv += hashv >> 17;                                                        \
+-    hashv ^= hashv << 25;                                                        \
+-    hashv += hashv >> 6;                                                         \
+-    bkt = hashv & (num_bkts-1);                                                  \
+-} while(0) 
+-
+-#ifdef HASH_USING_NO_STRICT_ALIASING
+-/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads.
+- * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error.
+- * MurmurHash uses the faster approach only on CPU's where we know it's safe. 
+- *
+- * Note the preprocessor built-in defines can be emitted using:
+- *
+- *   gcc -m64 -dM -E - < /dev/null                  (on gcc)
+- *   cc -## a.c (where a.c is a simple test file)   (Sun Studio)
+- */
+-#if (defined(__i386__) || defined(__x86_64__)  || defined(_M_IX86))
+-#define MUR_GETBLOCK(p,i) p[i]
+-#else /* non intel */
+-#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0)
+-#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1)
+-#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2)
+-#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3)
+-#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL))
+-#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__))
+-#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24))
+-#define MUR_TWO_TWO(p)   ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16))
+-#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >>  8))
+-#else /* assume little endian non-intel */
+-#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24))
+-#define MUR_TWO_TWO(p)   ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16))
+-#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) <<  8))
+-#endif
+-#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) :           \
+-                            (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \
+-                             (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) :  \
+-                                                      MUR_ONE_THREE(p))))
+-#endif
+-#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))
+-#define MUR_FMIX(_h) \
+-do {                 \
+-  _h ^= _h >> 16;    \
+-  _h *= 0x85ebca6b;  \
+-  _h ^= _h >> 13;    \
+-  _h *= 0xc2b2ae35l; \
+-  _h ^= _h >> 16;    \
+-} while(0)
+-
+-#define HASH_MUR(key,keylen,num_bkts,hashv,bkt)                        \
+-do {                                                                   \
+-  const uint8_t *_mur_data = (const uint8_t*)(key);                    \
+-  const int _mur_nblocks = (keylen) / 4;                               \
+-  uint32_t _mur_h1 = 0xf88D5353;                                       \
+-  uint32_t _mur_c1 = 0xcc9e2d51;                                       \
+-  uint32_t _mur_c2 = 0x1b873593;                                       \
+-  uint32_t _mur_k1 = 0;                                                \
+-  const uint8_t *_mur_tail;                                            \
+-  const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \
+-  int _mur_i;                                                          \
+-  for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) {                      \
+-    _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i);                        \
+-    _mur_k1 *= _mur_c1;                                                \
+-    _mur_k1 = MUR_ROTL32(_mur_k1,15);                                  \
+-    _mur_k1 *= _mur_c2;                                                \
+-                                                                       \
+-    _mur_h1 ^= _mur_k1;                                                \
+-    _mur_h1 = MUR_ROTL32(_mur_h1,13);                                  \
+-    _mur_h1 = _mur_h1*5+0xe6546b64;                                    \
+-  }                                                                    \
+-  _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4);            \
+-  _mur_k1=0;                                                           \
+-  switch((keylen) & 3) {                                               \
+-    case 3: _mur_k1 ^= _mur_tail[2] << 16;                             \
+-    case 2: _mur_k1 ^= _mur_tail[1] << 8;                              \
+-    case 1: _mur_k1 ^= _mur_tail[0];                                   \
+-    _mur_k1 *= _mur_c1;                                                \
+-    _mur_k1 = MUR_ROTL32(_mur_k1,15);                                  \
+-    _mur_k1 *= _mur_c2;                                                \
+-    _mur_h1 ^= _mur_k1;                                                \
+-  }                                                                    \
+-  _mur_h1 ^= (keylen);                                                 \
+-  MUR_FMIX(_mur_h1);                                                   \
+-  hashv = _mur_h1;                                                     \
+-  bkt = hashv & (num_bkts-1);                                          \
+-} while(0)
+-#endif  /* HASH_USING_NO_STRICT_ALIASING */
+-
+-/* key comparison function; return 0 if keys equal */
+-#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) 
+-
+-/* iterate over items in a known bucket to find desired item */
+-#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out)                       \
+-do {                                                                             \
+- if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head));          \
+- else out=NULL;                                                                  \
+- while (out) {                                                                   \
+-    if ((out)->hh.keylen == keylen_in) {                                           \
+-        if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break;             \
+-    }                                                                            \
+-    if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \
+-    else out = NULL;                                                             \
+- }                                                                               \
+-} while(0)
+-
+-/* add an item to a bucket  */
+-#define HASH_ADD_TO_BKT(head,addhh)                                              \
+-do {                                                                             \
+- head.count++;                                                                   \
+- (addhh)->hh_next = head.hh_head;                                                \
+- (addhh)->hh_prev = NULL;                                                        \
+- if (head.hh_head) { (head).hh_head->hh_prev = (addhh); }                        \
+- (head).hh_head=addhh;                                                           \
+- if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH)             \
+-     && (addhh)->tbl->noexpand != 1) {                                           \
+-       HASH_EXPAND_BUCKETS((addhh)->tbl);                                        \
+- }                                                                               \
+-} while(0)
+-
+-/* remove an item from a given bucket */
+-#define HASH_DEL_IN_BKT(hh,head,hh_del)                                          \
+-    (head).count--;                                                              \
+-    if ((head).hh_head == hh_del) {                                              \
+-      (head).hh_head = hh_del->hh_next;                                          \
+-    }                                                                            \
+-    if (hh_del->hh_prev) {                                                       \
+-        hh_del->hh_prev->hh_next = hh_del->hh_next;                              \
+-    }                                                                            \
+-    if (hh_del->hh_next) {                                                       \
+-        hh_del->hh_next->hh_prev = hh_del->hh_prev;                              \
+-    }                                                                
+-
+-/* Bucket expansion has the effect of doubling the number of buckets
+- * and redistributing the items into the new buckets. Ideally the
+- * items will distribute more or less evenly into the new buckets
+- * (the extent to which this is true is a measure of the quality of
+- * the hash function as it applies to the key domain). 
+- * 
+- * With the items distributed into more buckets, the chain length
+- * (item count) in each bucket is reduced. Thus by expanding buckets
+- * the hash keeps a bound on the chain length. This bounded chain 
+- * length is the essence of how a hash provides constant time lookup.
+- * 
+- * The calculation of tbl->ideal_chain_maxlen below deserves some
+- * explanation. First, keep in mind that we're calculating the ideal
+- * maximum chain length based on the *new* (doubled) bucket count.
+- * In fractions this is just n/b (n=number of items,b=new num buckets).
+- * Since the ideal chain length is an integer, we want to calculate 
+- * ceil(n/b). We don't depend on floating point arithmetic in this
+- * hash, so to calculate ceil(n/b) with integers we could write
+- * 
+- *      ceil(n/b) = (n/b) + ((n%b)?1:0)
+- * 
+- * and in fact a previous version of this hash did just that.
+- * But now we have improved things a bit by recognizing that b is
+- * always a power of two. We keep its base 2 log handy (call it lb),
+- * so now we can write this with a bit shift and logical AND:
+- * 
+- *      ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0)
+- * 
+- */
+-#define HASH_EXPAND_BUCKETS(tbl)                                                 \
+-do {                                                                             \
+-    unsigned _he_bkt;                                                            \
+-    unsigned _he_bkt_i;                                                          \
+-    struct UT_hash_handle *_he_thh, *_he_hh_nxt;                                 \
+-    UT_hash_bucket *_he_new_buckets, *_he_newbkt;                                \
+-    _he_new_buckets = (UT_hash_bucket*)uthash_malloc(                            \
+-             2 * tbl->num_buckets * sizeof(struct UT_hash_bucket));              \
+-    if (!_he_new_buckets) { uthash_fatal( "out of memory"); }                    \
+-    memset(_he_new_buckets, 0,                                                   \
+-            2 * tbl->num_buckets * sizeof(struct UT_hash_bucket));               \
+-    tbl->ideal_chain_maxlen =                                                    \
+-       (tbl->num_items >> (tbl->log2_num_buckets+1)) +                           \
+-       ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0);                    \
+-    tbl->nonideal_items = 0;                                                     \
+-    for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++)                \
+-    {                                                                            \
+-        _he_thh = tbl->buckets[ _he_bkt_i ].hh_head;                             \
+-        while (_he_thh) {                                                        \
+-           _he_hh_nxt = _he_thh->hh_next;                                        \
+-           HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt);            \
+-           _he_newbkt = &(_he_new_buckets[ _he_bkt ]);                           \
+-           if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) {                \
+-             tbl->nonideal_items++;                                              \
+-             _he_newbkt->expand_mult = _he_newbkt->count /                       \
+-                                        tbl->ideal_chain_maxlen;                 \
+-           }                                                                     \
+-           _he_thh->hh_prev = NULL;                                              \
+-           _he_thh->hh_next = _he_newbkt->hh_head;                               \
+-           if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev =               \
+-                _he_thh;                                                         \
+-           _he_newbkt->hh_head = _he_thh;                                        \
+-           _he_thh = _he_hh_nxt;                                                 \
+-        }                                                                        \
+-    }                                                                            \
+-    uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+-    tbl->num_buckets *= 2;                                                       \
+-    tbl->log2_num_buckets++;                                                     \
+-    tbl->buckets = _he_new_buckets;                                              \
+-    tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ?         \
+-        (tbl->ineff_expands+1) : 0;                                              \
+-    if (tbl->ineff_expands > 1) {                                                \
+-        tbl->noexpand=1;                                                         \
+-        uthash_noexpand_fyi(tbl);                                                \
+-    }                                                                            \
+-    uthash_expand_fyi(tbl);                                                      \
+-} while(0)
+-
+-
+-/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */
+-/* Note that HASH_SORT assumes the hash handle name to be hh. 
+- * HASH_SRT was added to allow the hash handle name to be passed in. */
+-#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn)
+-#define HASH_SRT(hh,head,cmpfcn)                                                 \
+-do {                                                                             \
+-  unsigned _hs_i;                                                                \
+-  unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize;               \
+-  struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail;            \
+-  if (head) {                                                                    \
+-      _hs_insize = 1;                                                            \
+-      _hs_looping = 1;                                                           \
+-      _hs_list = &((head)->hh);                                                  \
+-      while (_hs_looping) {                                                      \
+-          _hs_p = _hs_list;                                                      \
+-          _hs_list = NULL;                                                       \
+-          _hs_tail = NULL;                                                       \
+-          _hs_nmerges = 0;                                                       \
+-          while (_hs_p) {                                                        \
+-              _hs_nmerges++;                                                     \
+-              _hs_q = _hs_p;                                                     \
+-              _hs_psize = 0;                                                     \
+-              for ( _hs_i = 0; _hs_i  < _hs_insize; _hs_i++ ) {                  \
+-                  _hs_psize++;                                                   \
+-                  _hs_q = (UT_hash_handle*)((_hs_q->next) ?                      \
+-                          ((void*)((char*)(_hs_q->next) +                        \
+-                          (head)->hh.tbl->hho)) : NULL);                         \
+-                  if (! (_hs_q) ) break;                                         \
+-              }                                                                  \
+-              _hs_qsize = _hs_insize;                                            \
+-              while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) {           \
+-                  if (_hs_psize == 0) {                                          \
+-                      _hs_e = _hs_q;                                             \
+-                      _hs_q = (UT_hash_handle*)((_hs_q->next) ?                  \
+-                              ((void*)((char*)(_hs_q->next) +                    \
+-                              (head)->hh.tbl->hho)) : NULL);                     \
+-                      _hs_qsize--;                                               \
+-                  } else if ( (_hs_qsize == 0) || !(_hs_q) ) {                   \
+-                      _hs_e = _hs_p;                                             \
+-                      if (_hs_p){                                                \
+-                        _hs_p = (UT_hash_handle*)((_hs_p->next) ?                \
+-                                ((void*)((char*)(_hs_p->next) +                  \
+-                                (head)->hh.tbl->hho)) : NULL);                   \
+-                       }                                                         \
+-                      _hs_psize--;                                               \
+-                  } else if ((                                                   \
+-                      cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \
+-                             DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \
+-                             ) <= 0) {                                           \
+-                      _hs_e = _hs_p;                                             \
+-                      if (_hs_p){                                                \
+-                        _hs_p = (UT_hash_handle*)((_hs_p->next) ?                \
+-                               ((void*)((char*)(_hs_p->next) +                   \
+-                               (head)->hh.tbl->hho)) : NULL);                    \
+-                       }                                                         \
+-                      _hs_psize--;                                               \
+-                  } else {                                                       \
+-                      _hs_e = _hs_q;                                             \
+-                      _hs_q = (UT_hash_handle*)((_hs_q->next) ?                  \
+-                              ((void*)((char*)(_hs_q->next) +                    \
+-                              (head)->hh.tbl->hho)) : NULL);                     \
+-                      _hs_qsize--;                                               \
+-                  }                                                              \
+-                  if ( _hs_tail ) {                                              \
+-                      _hs_tail->next = ((_hs_e) ?                                \
+-                            ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL);          \
+-                  } else {                                                       \
+-                      _hs_list = _hs_e;                                          \
+-                  }                                                              \
+-                  if (_hs_e) {                                                   \
+-                  _hs_e->prev = ((_hs_tail) ?                                    \
+-                     ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL);              \
+-                  }                                                              \
+-                  _hs_tail = _hs_e;                                              \
+-              }                                                                  \
+-              _hs_p = _hs_q;                                                     \
+-          }                                                                      \
+-          if (_hs_tail){                                                         \
+-            _hs_tail->next = NULL;                                               \
+-          }                                                                      \
+-          if ( _hs_nmerges <= 1 ) {                                              \
+-              _hs_looping=0;                                                     \
+-              (head)->hh.tbl->tail = _hs_tail;                                   \
+-              DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list));      \
+-          }                                                                      \
+-          _hs_insize *= 2;                                                       \
+-      }                                                                          \
+-      HASH_FSCK(hh,head);                                                        \
+- }                                                                               \
+-} while (0)
+-
+-/* This function selects items from one hash into another hash. 
+- * The end result is that the selected items have dual presence 
+- * in both hashes. There is no copy of the items made; rather 
+- * they are added into the new hash through a secondary hash 
+- * hash handle that must be present in the structure. */
+-#define HASH_SELECT(hh_dst, dst, hh_src, src, cond)                              \
+-do {                                                                             \
+-  unsigned _src_bkt, _dst_bkt;                                                   \
+-  void *_last_elt=NULL, *_elt;                                                   \
+-  UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL;                         \
+-  ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst));                 \
+-  if (src) {                                                                     \
+-    for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) {     \
+-      for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head;                \
+-          _src_hh;                                                               \
+-          _src_hh = _src_hh->hh_next) {                                          \
+-          _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh);                       \
+-          if (cond(_elt)) {                                                      \
+-            _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho);               \
+-            _dst_hh->key = _src_hh->key;                                         \
+-            _dst_hh->keylen = _src_hh->keylen;                                   \
+-            _dst_hh->hashv = _src_hh->hashv;                                     \
+-            _dst_hh->prev = _last_elt;                                           \
+-            _dst_hh->next = NULL;                                                \
+-            if (_last_elt_hh) { _last_elt_hh->next = _elt; }                     \
+-            if (!dst) {                                                          \
+-              DECLTYPE_ASSIGN(dst,_elt);                                         \
+-              HASH_MAKE_TABLE(hh_dst,dst);                                       \
+-            } else {                                                             \
+-              _dst_hh->tbl = (dst)->hh_dst.tbl;                                  \
+-            }                                                                    \
+-            HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt);    \
+-            HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh);            \
+-            (dst)->hh_dst.tbl->num_items++;                                      \
+-            _last_elt = _elt;                                                    \
+-            _last_elt_hh = _dst_hh;                                              \
+-          }                                                                      \
+-      }                                                                          \
+-    }                                                                            \
+-  }                                                                              \
+-  HASH_FSCK(hh_dst,dst);                                                         \
+-} while (0)
+-
+-#define HASH_CLEAR(hh,head)                                                      \
+-do {                                                                             \
+-  if (head) {                                                                    \
+-    uthash_free((head)->hh.tbl->buckets,                                         \
+-                (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket));      \
+-    HASH_BLOOM_FREE((head)->hh.tbl);                                             \
+-    uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                          \
+-    (head)=NULL;                                                                 \
+-  }                                                                              \
+-} while(0)
+-
+-#define HASH_OVERHEAD(hh,head)                                                   \
+- (size_t)((((head)->hh.tbl->num_items   * sizeof(UT_hash_handle))   +            \
+-           ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket))   +            \
+-            (sizeof(UT_hash_table))                                 +            \
+-            (HASH_BLOOM_BYTELEN)))
+-
+-#ifdef NO_DECLTYPE
+-#define HASH_ITER(hh,head,el,tmp)                                                \
+-for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL);       \
+-  el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) 
+-#else
+-#define HASH_ITER(hh,head,el,tmp)                                                \
+-for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL);                 \
+-  el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL))
+-#endif
+-
+-/* obtain a count of items in the hash */
+-#define HASH_COUNT(head) HASH_CNT(hh,head) 
+-#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0)
+-
+-typedef struct UT_hash_bucket {
+-   struct UT_hash_handle *hh_head;
+-   unsigned count;
+-
+-   /* expand_mult is normally set to 0. In this situation, the max chain length
+-    * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If
+-    * the bucket's chain exceeds this length, bucket expansion is triggered). 
+-    * However, setting expand_mult to a non-zero value delays bucket expansion
+-    * (that would be triggered by additions to this particular bucket)
+-    * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH.
+-    * (The multiplier is simply expand_mult+1). The whole idea of this
+-    * multiplier is to reduce bucket expansions, since they are expensive, in
+-    * situations where we know that a particular bucket tends to be overused.
+-    * It is better to let its chain length grow to a longer yet-still-bounded
+-    * value, than to do an O(n) bucket expansion too often. 
+-    */
+-   unsigned expand_mult;
+-
+-} UT_hash_bucket;
+-
+-/* random signature used only to find hash tables in external analysis */
+-#define HASH_SIGNATURE 0xa0111fe1
+-#define HASH_BLOOM_SIGNATURE 0xb12220f2
+-
+-typedef struct UT_hash_table {
+-   UT_hash_bucket *buckets;
+-   unsigned num_buckets, log2_num_buckets;
+-   unsigned num_items;
+-   struct UT_hash_handle *tail; /* tail hh in app order, for fast append    */
+-   ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */
+-
+-   /* in an ideal situation (all buckets used equally), no bucket would have
+-    * more than ceil(#items/#buckets) items. that's the ideal chain length. */
+-   unsigned ideal_chain_maxlen;
+-
+-   /* nonideal_items is the number of items in the hash whose chain position
+-    * exceeds the ideal chain maxlen. these items pay the penalty for an uneven
+-    * hash distribution; reaching them in a chain traversal takes >ideal steps */
+-   unsigned nonideal_items;
+-
+-   /* ineffective expands occur when a bucket doubling was performed, but 
+-    * afterward, more than half the items in the hash had nonideal chain
+-    * positions. If this happens on two consecutive expansions we inhibit any
+-    * further expansion, as it's not helping; this happens when the hash
+-    * function isn't a good fit for the key domain. When expansion is inhibited
+-    * the hash will still work, albeit no longer in constant time. */
+-   unsigned ineff_expands, noexpand;
+-
+-   uint32_t signature; /* used only to find hash tables in external analysis */
+-#ifdef HASH_BLOOM
+-   uint32_t bloom_sig; /* used only to test bloom exists in external analysis */
+-   uint8_t *bloom_bv;
+-   char bloom_nbits;
+-#endif
+-
+-} UT_hash_table;
+-
+-typedef struct UT_hash_handle {
+-   struct UT_hash_table *tbl;
+-   void *prev;                       /* prev element in app order      */
+-   void *next;                       /* next element in app order      */
+-   struct UT_hash_handle *hh_prev;   /* previous hh in bucket order    */
+-   struct UT_hash_handle *hh_next;   /* next hh in bucket order        */
+-   void *key;                        /* ptr to enclosing struct's key  */
+-   unsigned keylen;                  /* enclosing struct's key len     */
+-   unsigned hashv;                   /* result of hash-fcn(key)        */
+-} UT_hash_handle;
+-
+-#endif /* UTHASH_H */
+-- 
+2.15.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/build.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/build.patch
deleted file mode 100644
index 0d0912b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/files/build.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From ebd7c8e548e9b8e096ee4c390173db9a701f2604 Mon Sep 17 00:00:00 2001
-From: Bruno Bottazzini <bruno.bottazzini@intel.com>
-Date: Wed, 23 Mar 2016 11:18:26 -0300
-Subject: [PATCH] build
-
-Disable stripping and allow easily overriding prefix
-
-Upstream-Status: Pending
-
-Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
----
- client/Makefile  | 4 ++--
- config.mk        | 2 +-
- lib/Makefile     | 2 +-
- lib/cpp/Makefile | 2 +-
- src/Makefile     | 4 ++--
- 5 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/client/Makefile b/client/Makefile
-index bd65355..4e5a640 100644
---- a/client/Makefile
-+++ b/client/Makefile
-@@ -24,8 +24,8 @@ client_shared.o : client_shared.c client
- 
- install : all
- 	$(INSTALL) -d ${DESTDIR}$(prefix)/bin
--	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub
--	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub
-+	$(INSTALL) mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub
-+	$(INSTALL) mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub
- 
- uninstall :
- 	-rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub
-diff --git a/config.mk b/config.mk
-index c0f175f..3427b83 100644
---- a/config.mk
-+++ b/config.mk
-@@ -241,7 +241,7 @@ ifeq ($(WITH_DOCS),yes)
- endif
- 
- INSTALL?=install
--prefix=/usr/local
-+prefix?=/usr
- mandir=${prefix}/share/man
- localedir=${prefix}/share/locale
- STRIP?=strip
-diff --git a/lib/Makefile b/lib/Makefile
-index 825fcea..9b7c05c 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -25,7 +25,7 @@ all : libmosquitto.so.${SOVERSION} libmo
- 
- install : all
- 	$(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/
--	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
-+	$(INSTALL) libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
- 	ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so
- 	$(INSTALL) -d ${DESTDIR}${prefix}/include/
- 	$(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h
-diff --git a/lib/cpp/Makefile b/lib/cpp/Makefile
-index 8b627d3..cdb2923 100644
---- a/lib/cpp/Makefile
-+++ b/lib/cpp/Makefile
-@@ -10,7 +10,7 @@ all : libmosquittopp.so.${SOVERSION}
- 
- install : all
- 	$(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/
--	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION}
-+	$(INSTALL) libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION}
- 	ln -sf libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so
- 	$(INSTALL) -d ${DESTDIR}${prefix}/include/
- 	$(INSTALL) mosquittopp.h ${DESTDIR}${prefix}/include/mosquittopp.h
-diff --git a/src/Makefile b/src/Makefile
-index 2cfb7d4..9a97644 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -103,12 +103,12 @@ mosquitto_passwd.o : mosquitto_passwd.c
- 
- install : all
- 	$(INSTALL) -d ${DESTDIR}$(prefix)/sbin
--	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
-+	$(INSTALL) mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
-	$(INSTALL) -d ${DESTDIR}$(prefix)/include
- 	$(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h
- ifeq ($(WITH_TLS),yes)
-	$(INSTALL) -d ${DESTDIR}$(prefix)/bin
--	$(INSTALL) -s --strip-program=${CROSS_COMPILE}${STRIP} mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd
-+	$(INSTALL) mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd
- endif
- 
- uninstall :
--- 
-2.7.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb
index 7554248..13ce381 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb
@@ -8,9 +8,11 @@
                     file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \
                     file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \
 "
+DEPENDS = "uthash"
 
 SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
-           file://build.patch \
+           file://0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch \
+           file://0002-uthash-remove-in-tree-version.patch \
            file://mosquitto.service \
            file://mosquitto.init \
 "
@@ -26,6 +28,7 @@
 PACKAGECONFIG[ssl] = ",,openssl"
 PACKAGECONFIG[uuid] = ",,util-linux"
 EXTRA_OEMAKE = "${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \
+                STRIP=/bin/true \
                 WITH_DOCS=no \
                 ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \
                 ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb
index e10b89c..715b023 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/obex-data-server_0.4.6.bb
@@ -11,6 +11,8 @@
 SRC_URI[md5sum] = "961ca5db6fe9c97024e133cc6203cc4d"
 SRC_URI[sha256sum] = "b399465ddbd6d0217abedd9411d9d74a820effa0a6a142adc448268d3920094f"
 
-inherit autotools-brokensep pkgconfig
+inherit distro_features_check autotools-brokensep pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 FILES_${PN} += "${datadir}/dbus-1/"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb
index 2db48f3..1b56685 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obex/openobex_1.7.2.bb
@@ -25,6 +25,8 @@
 
 #--enable-apps --enable-syslog
 
+ASNEEDED = ""
+
 do_install_append () {
     rmdir ${D}${bindir}
 }
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb
index 489861c..b4a914d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/obexftp/obexftp_0.24.2.bb
@@ -16,6 +16,8 @@
 
 inherit cmake pkgconfig
 
+OECMAKE_GENERATOR = "Unix Makefiles"
+
 PACKAGECONFIG ?= ""
 # fuse support will need meta-filesystems layer
 PACKAGECONFIG[fuse] = "-DENABLE_FUSE=ON,-DENABLE_FUSE=OFF,fuse"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/fix-makefile-override.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/fix-makefile-override.patch
deleted file mode 100644
index f0a1d33..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/fix-makefile-override.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Backport [debian]
-
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -37,16 +37,15 @@
- # Use the following only on GNU/Linux and only if you need ps listing like "smsd: MAINPROCESS" and "smsd: GSM1"
- # CFLAGS += -D USE_LINUX_PS_TRICK
- 
--all: smsd 
--
--smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o
--
- ifneq (,$(findstring SOLARIS,$(CFLAGS)))
- ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS)))
- override LFLAGS += -lsocket -lnsl
- endif
- endif
- 
-+all: smsd 
-+
-+smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o
- ifneq (,$(findstring NOSTATS,$(CFLAGS)))
- 	$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
- else 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch
new file mode 100644
index 0000000..49b4d1d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/scripts_no_bash.patch
@@ -0,0 +1,51 @@
+From 85602c3e531d39e89dc8cee0c4a592f85006a064 Mon Sep 17 00:00:00 2001
+From: Bill Randle <bill.randle@gmail.com>
+Date: Sun, 31 Dec 2017 09:08:23 -0800
+
+---
+ scripts/sendsms     | 2 +-
+ scripts/sms2html    | 2 +-
+ scripts/sms2unicode | 2 +-
+ scripts/unicode2sms | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/scripts/sendsms b/scripts/sendsms
+index 512026d..bb56856 100755
+--- a/scripts/sendsms
++++ b/scripts/sendsms
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # This script send a text sms at the command line by creating
+ # a sms file in the outgoing queue.
+ 
+diff --git a/scripts/sms2html b/scripts/sms2html
+index ff253e3..946185e 100755
+--- a/scripts/sms2html
++++ b/scripts/sms2html
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # This script converts a received sms file into a html file. 
+ 
+diff --git a/scripts/sms2unicode b/scripts/sms2unicode
+index 46e2756..2826dc1 100755
+--- a/scripts/sms2unicode
++++ b/scripts/sms2unicode
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # This script converts a received sms file into a pure unicode text file.
+ 
+diff --git a/scripts/unicode2sms b/scripts/unicode2sms
+index 2ae86dc..3fccf0d 100755
+--- a/scripts/unicode2sms
++++ b/scripts/unicode2sms
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # This script converts a pure unicode text file into an sms file for sending.
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch
new file mode 100644
index 0000000..e1d79d3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath.patch
@@ -0,0 +1,24 @@
+From 9a4a872dca78ca9cb6bdc228be61f5a4c2d68b1f Mon Sep 17 00:00:00 2001
+From: Kai Ulrich <kaiu@gmx.de>
+Date: Wed, 18 Mar 2015 11:20:53 +0100
+
+---
+ scripts/sms3 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/sms3 b/scripts/sms3
+index 6b990bf..09c063b 100755
+--- a/scripts/sms3
++++ b/scripts/sms3
+@@ -24,9 +24,9 @@ INFOFILE="/var/run/smsd.working"
+ # Logfile can also be defined in here:
+ LOGFILE="/var/log/smsd.log"
+ 
+-DAEMON=/usr/local/bin/smsd
++DAEMON=/usr/bin/smsd
+ # A program which turns power off for couple of seconds:
+-RESETMODEMS=/usr/local/bin/smsd_resetmodems
++RESETMODEMS=/usr/bin/smsd_resetmodems
+ NAME=smsd
+ PSOPT="-e"
+ ECHO=echo
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath_and_psops.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath_and_psops.patch
deleted file mode 100644
index ffcaa09..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3/sms_binpath_and_psops.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: smstools3/scripts/sms3
-===================================================================
---- smstools3.orig/scripts/sms3	2010-05-04 11:21:44.000000000 +0200
-+++ smstools3/scripts/sms3	2015-02-22 20:05:51.615074469 +0100
-@@ -24,11 +24,11 @@
- # Logfile can also be defined in here:
- LOGFILE="/var/log/smsd.log"
- 
--DAEMON=/usr/local/bin/smsd
-+DAEMON=/usr/bin/smsd
- # A program which turns power off for couple of seconds:
--RESETMODEMS=/usr/local/bin/smsd_resetmodems
-+RESETMODEMS=/usr/bin/smsd_resetmodems
- NAME=smsd
--PSOPT="-e"
-+PSOPT=""
- ECHO=echo
- case `uname` in
-   *BSD|Darwin)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.15.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.15.bb
deleted file mode 100644
index 310a13c..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.15.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "SMS Gateway software"
-DESCRIPTION = "The SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones."
-SECTION = "console/network"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4d21efa1bb2a186360dde4035f860682"
-HOMEPAGE = "http://smstools3.kekekasvi.com"
-
-SRC_URI = "http://smstools3.kekekasvi.com/packages/${BP}.tar.gz \
-           file://sms_binpath_and_psops.patch \
-           file://fix-makefile-override.patch"
-
-SRC_URI[md5sum] = "0241ef60e646fac1a06254a848e61ed7"
-SRC_URI[sha256sum] = "ed00ffaeaa312a5b4f969f4e97a64603a866bbe16e393ea02f5bf05234814d59"
-
-
-S = "${WORKDIR}/${BPN}"
-
-EXTRA_OEMAKE += "LFLAGS='${LDFLAGS}'"
-
-RDEPENDS_${PN} = "bash"
-INITSCRIPT_NAME = "sms3"
-INITSCRIPT_PARAMS = "defaults"
-
-inherit update-rc.d
-
-do_install () {
-
-    install -d ${D}${bindir}
-    install -m 755 ${S}/src/smsd "${D}${bindir}/smsd"
-
-    install -m 755 ${S}/scripts/sendsms "${D}${bindir}/sendsms"
-    install -m 755 ${S}/scripts/sms2html "${D}${bindir}/sms2html"
-    install -m 755 ${S}/scripts/sms2unicode "${D}${bindir}/sms2unicode"
-    install -m 755 ${S}/scripts/unicode2sms "${D}${bindir}/unicode2sms"
-
-    install -d ${D}${sysconfdir}
-    install -m 644 ${S}/examples/smsd.conf.easy "${D}${sysconfdir}/smsd.conf"
-
-    install -d "${D}${localstatedir}/spool"
-    install -d "${D}${localstatedir}/spool/sms"
-    install -d "${D}${localstatedir}/spool/sms/incoming"
-    install -d "${D}${localstatedir}/spool/sms/outgoing"
-    install -d "${D}${localstatedir}/spool/sms/checked"
-
-    install -d ${D}${sysconfdir}/init.d
-    install -m 755 ${S}/scripts/sms3 "${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}"
-
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb
new file mode 100644
index 0000000..6e6413b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb
@@ -0,0 +1,47 @@
+SUMMARY = "SMS Gateway software"
+DESCRIPTION = "The SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones."
+SECTION = "console/network"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4d21efa1bb2a186360dde4035f860682"
+HOMEPAGE = "http://smstools3.kekekasvi.com"
+
+SRC_URI = "http://smstools3.kekekasvi.com/packages/${BP}.tar.gz \
+           file://sms_binpath.patch \
+           file://scripts_no_bash.patch"
+
+SRC_URI[md5sum] = "6a9f038fb38a49cc3a4f8f14a88fb8af"
+SRC_URI[sha256sum] = "a26ba4c02b16f6cf13177bffca6c9230dc5fefaeba8e3030cd4e4905f6a92084"
+
+
+S = "${WORKDIR}/${BPN}"
+
+EXTRA_OEMAKE += "LFLAGS='${LDFLAGS}'"
+
+INITSCRIPT_NAME = "sms3"
+INITSCRIPT_PARAMS = "defaults"
+
+inherit update-rc.d
+
+do_install () {
+
+    install -d ${D}${bindir}
+    install -m 755 ${S}/src/smsd "${D}${bindir}/smsd"
+
+    install -m 755 ${S}/scripts/sendsms "${D}${bindir}/sendsms"
+    install -m 755 ${S}/scripts/sms2html "${D}${bindir}/sms2html"
+    install -m 755 ${S}/scripts/sms2unicode "${D}${bindir}/sms2unicode"
+    install -m 755 ${S}/scripts/unicode2sms "${D}${bindir}/unicode2sms"
+
+    install -d ${D}${sysconfdir}
+    install -m 644 ${S}/examples/smsd.conf.easy "${D}${sysconfdir}/smsd.conf"
+
+    install -d "${D}${localstatedir}/spool"
+    install -d "${D}${localstatedir}/spool/sms"
+    install -d "${D}${localstatedir}/spool/sms/incoming"
+    install -d "${D}${localstatedir}/spool/sms/outgoing"
+    install -d "${D}${localstatedir}/spool/sms/checked"
+
+    install -d ${D}${sysconfdir}/init.d
+    install -m 755 ${S}/scripts/sms3 "${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}"
+
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch
new file mode 100644
index 0000000..8192056
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch
@@ -0,0 +1,49 @@
+From f567740cf64978ac9db014c786b6d0267b244f33 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Mar 2018 22:30:30 -0800
+Subject: [PATCH 1/2] replace SIGCLD with SIGCHLD and include sys/types.h
+
+Fixes
+main.c:129:10: error: 'SIGCLD' undeclared (first use in this function); did you mean 'SIGCHLD'?
+   signal(SIGCLD, sig_child);
+          ^~~~~~
+          SIGCHLD
+
+main.c:125:2: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
+  umask(0);
+  ^~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/main.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index 3cf4072..cd34196 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -31,6 +31,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/wait.h>
+ #include <sys/param.h>
++#include <sys/types.h>
+ #include <pthread.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -126,9 +127,9 @@ static void daemon_start(int ignsigcld)
+ 
+ 	if (ignsigcld) {
+ #ifdef SIGTSTP
+-		signal(SIGCLD, sig_child);
++		signal(SIGCHLD, sig_child);
+ #else
+-		signal(SIGCLD, SIG_IGN);
++		signal(SIGCHLD, SIG_IGN);
+ #endif
+ 	}
+ }
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch
new file mode 100644
index 0000000..90d12da
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/files/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch
@@ -0,0 +1,143 @@
+From 19b6cf8099e1974b5fc39086fc54103b0cbc2658 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Mar 2018 23:01:25 -0800
+Subject: [PATCH 2/2] replace PTHREAD_MUTEX_FAST_NP with PTHREAD_MUTEX_NORMAL
+
+PTHREAD_MUTEX_FAST_NP is not available on non-posix systems
+e.g. musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ha.c        | 2 +-
+ src/icmp6.c     | 2 +-
+ src/mh.c        | 2 +-
+ src/mn.c        | 2 +-
+ src/movement.c  | 2 +-
+ src/mpdisc_ha.c | 2 +-
+ src/mpdisc_mn.c | 2 +-
+ src/tqueue.c    | 2 +-
+ src/tunnelctl.c | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/ha.c b/src/ha.c
+index fbdcff0..b2f811e 100644
+--- a/src/ha.c
++++ b/src/ha.c
+@@ -1246,7 +1246,7 @@ int ha_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&bu_worker_mutex, &mattrs) ||
+ 	    pthread_cond_init(&cond, NULL))
+ 		return -1;
+diff --git a/src/icmp6.c b/src/icmp6.c
+index 3695135..6460634 100644
+--- a/src/icmp6.c
++++ b/src/icmp6.c
+@@ -243,7 +243,7 @@ int icmp6_init(void)
+ 		return -1;
+ 	/* create ICMP listener thread */
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&icmp6_sock.send_mutex, &mattrs) ||
+ 	    pthread_rwlock_init(&handler_lock, NULL) ||
+ 	    pthread_create(&icmp6_listener, NULL, icmp6_listen, NULL))
+diff --git a/src/mh.c b/src/mh.c
+index 60e345e..7928f4c 100644
+--- a/src/mh.c
++++ b/src/mh.c
+@@ -204,7 +204,7 @@ int mh_init(void)
+ 		return -1;
+ 
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mh_sock.send_mutex, &mattrs) ||
+ 	    pthread_rwlock_init(&handler_lock, NULL) ||
+ 	    pthread_create(&mh_listener, NULL, mh_listen, NULL))
+diff --git a/src/mn.c b/src/mn.c
+index 092cfcb..8f7f448 100644
+--- a/src/mn.c
++++ b/src/mn.c
+@@ -1478,7 +1478,7 @@ static struct home_addr_info *hai_copy(struct home_addr_info *conf_hai)
+ 	if (hai != NULL) {
+ 		pthread_mutexattr_t mattrs;
+ 		pthread_mutexattr_init(&mattrs);
+-		pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++		pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 
+ 		memcpy(hai, conf_hai, sizeof(struct home_addr_info));
+ 
+diff --git a/src/movement.c b/src/movement.c
+index d985937..6400448 100644
+--- a/src/movement.c
++++ b/src/movement.c
+@@ -2013,7 +2013,7 @@ int md_init(void)
+ 	int val;
+ 
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&iface_lock, &mattrs))
+ 		return -1;
+ 
+diff --git a/src/mpdisc_ha.c b/src/mpdisc_ha.c
+index 40ba05f..fd7a90d 100644
+--- a/src/mpdisc_ha.c
++++ b/src/mpdisc_ha.c
+@@ -559,7 +559,7 @@ int mpd_ha_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mpa_lock, &mattrs) ||
+ 	    pthread_rwlock_init(&prefix_lock, NULL) ||
+ 	    hash_init(&mpa_hash, DOUBLE_ADDR, MPA_BUCKETS) < 0)
+diff --git a/src/mpdisc_mn.c b/src/mpdisc_mn.c
+index 4873bd6..ada02bd 100644
+--- a/src/mpdisc_mn.c
++++ b/src/mpdisc_mn.c
+@@ -267,7 +267,7 @@ int mpd_mn_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mps_lock, &mattrs))
+ 		return -1;
+ 	if (hash_init(&mps_hash, DOUBLE_ADDR, MPS_BUCKETS) < 0)
+diff --git a/src/tqueue.c b/src/tqueue.c
+index 2f7aa0b..9c185b8 100644
+--- a/src/tqueue.c
++++ b/src/tqueue.c
+@@ -65,7 +65,7 @@ int taskqueue_init(void)
+ {
+ 	pthread_mutexattr_t mattrs;
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&mutex, &mattrs) ||
+ 	    pthread_cond_init(&cond, NULL) ||
+ 	    pthread_create(&tq_runner, NULL, runner, NULL))
+diff --git a/src/tunnelctl.c b/src/tunnelctl.c
+index 23fc20b..813b8ec 100644
+--- a/src/tunnelctl.c
++++ b/src/tunnelctl.c
+@@ -433,7 +433,7 @@ int tunnelctl_init(void)
+ 		return -1;
+ 
+ 	pthread_mutexattr_init(&mattrs);
+-	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++	pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ 	if (pthread_mutex_init(&tnl_lock, &mattrs))
+ 		return -1;
+ 
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb
index 2129e37..0c120bf 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/umip/umip_1.0.bb
@@ -14,6 +14,8 @@
            file://mip6d \
            file://mip6d.service \
            file://0001-Add-format-string-to-fprintf-call.patch \
+           file://0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch \
+           file://0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch \
            "
 SRCREV = "7d67209cd1bba2dd0e183a0fa07eeef07964dd14"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
index a64745c..4920bce 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
@@ -4,8 +4,8 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=db174eaf7b55a34a7c89551197f66e94"
 DEPENDS = "zeromq"
 
-SRCREV = "68a7b09cfce01c4c279fba2cf91686fcfc566848"
-PV = "4.1.5+git${SRCPV}"
+SRCREV = "6aa3ab686e916cb0e62df7fa7d12e0b13ae9fae6"
+PV = "4.2.3+git${SRCPV}"
 
 SRC_URI = "git://github.com/zeromq/cppzmq.git"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.1.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.1.6.bb
deleted file mode 100644
index e126f32..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.1.6.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-DESCRIPTION = "ZeroMQ looks like an embeddable networking library but acts like a concurrency framework"
-HOMEPAGE = "http://www.zeromq.org"
-LICENSE = "LGPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=d5311495d952062e0e4fbba39cbf3de1"
-
-PACKAGECONFIG ??= "libsodium"
-PACKAGECONFIG[libsodium] = "--with-libsodium, --without-libsodium, libsodium"
-
-SRC_URI = "http://github.com/zeromq/zeromq4-1/releases/download/v${PV}/zeromq-${PV}.tar.gz \
-    file://run-ptest \
-"
-SRC_URI[md5sum] = "c89db4dbc0b90c34c9f4983cbff6d321"
-SRC_URI[sha256sum] = "02ebf60a43011e770799336365bcbce2eb85569e9b5f52aa0d8cc04672438a0a"
-
-S = "${WORKDIR}/zeromq-${PV}"
-
-#Uncomment to choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select
-#EXTRA_OECONF += "--with-poller=kqueue"
-#CFLAGS_append = " -O0"
-#CXXFLAGS_append = " -O0"
-
-inherit autotools ptest pkgconfig
-
-do_compile_ptest () {
-    echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${B}/Makefile
-    oe_runmake buildtest-TESTS
-}
-
-do_install_ptest () {
-    install -d ${D}${PTEST_PATH}/tests
-    install -m 0755 ${B}/.libs/test_* ${D}${PTEST_PATH}/tests
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb
new file mode 100644
index 0000000..356348b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-connectivity/zeromq/zeromq_4.2.5.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "ZeroMQ looks like an embeddable networking library but acts like a concurrency framework"
+HOMEPAGE = "http://www.zeromq.org"
+LICENSE = "LGPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=d5311495d952062e0e4fbba39cbf3de1"
+
+PACKAGECONFIG ??= "libsodium"
+PACKAGECONFIG[libsodium] = "--with-libsodium, --without-libsodium, libsodium"
+
+SRC_URI = "http://github.com/zeromq/libzmq/releases/download/v${PV}/zeromq-${PV}.tar.gz \
+    file://run-ptest \
+"
+SRC_URI[md5sum] = "a1c95b34384257e986842f4d006957b8"
+SRC_URI[sha256sum] = "cc9090ba35713d59bb2f7d7965f877036c49c5558ea0c290b0dcc6f2a17e489f"
+
+S = "${WORKDIR}/zeromq-${PV}"
+
+#Uncomment to choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select
+#EXTRA_OECONF += "--with-poller=kqueue"
+#CFLAGS_append = " -O0"
+#CXXFLAGS_append = " -O0"
+
+inherit autotools ptest pkgconfig
+
+do_compile_ptest () {
+    echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${B}/Makefile
+    oe_runmake buildtest-TESTS
+}
+
+do_install_ptest () {
+    install -d ${D}${PTEST_PATH}/tests
+    install -m 0755 ${B}/tests/.libs/test_* ${D}${PTEST_PATH}/tests
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-Comment-rst2man-related-stuff.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-Comment-rst2man-related-stuff.patch
new file mode 100644
index 0000000..f10c49e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-Comment-rst2man-related-stuff.patch
@@ -0,0 +1,34 @@
+From a92fd7da3a262e21c0970a3908eb0b4502819a01 Mon Sep 17 00:00:00 2001
+From: Yang Lyu <yangl@axis.com>
+Date: Fri, 23 Feb 2018 16:31:49 +0100
+Subject: [PATCH] Comment rst2man related stuff
+
+---
+ meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 56d38e4..3c3b109 100644
+--- a/meson.build
++++ b/meson.build
+@@ -15,7 +15,7 @@ add_project_arguments('-DBINDIR="' + join_paths(get_option('prefix'), get_option
+ cc = meson.get_compiler('c')
+ conf = configuration_data()
+ mod_pkgconfig = import('pkgconfig')
+-prog_rst2man = find_program('rst2man', 'rst2man.py')
++#prog_rst2man = find_program('rst2man', 'rst2man.py')
+ 
+ sub_cdvar = subproject('c-dvar', version: '>=1')
+ sub_clist = subproject('c-list', version: '>=3')
+@@ -56,7 +56,7 @@ endif
+ 
+ conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+ 
+-subdir('docs')
++#subdir('docs')
+ subdir('src')
+ 
+ if use_launcher
+-- 
+2.1.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0002-Correct-including-directory-for-conf.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0002-Correct-including-directory-for-conf.patch
new file mode 100644
index 0000000..4909dea
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0002-Correct-including-directory-for-conf.patch
@@ -0,0 +1,25 @@
+From 4b79f603b948709906c108796087de7b5643f61a Mon Sep 17 00:00:00 2001
+From: Yang Lyu <yangl@axis.com>
+Date: Mon, 26 Feb 2018 12:48:34 +0100
+Subject: [PATCH] Correct including directory for conf
+
+---
+ src/launch/config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/launch/config.c b/src/launch/config.c
+index 6a68699..579471b 100644
+--- a/src/launch/config.c
++++ b/src/launch/config.c
+@@ -1022,7 +1022,7 @@ static void config_parser_end_fn(void *userdata, const XML_Char *name) {
+                                     state->file,
+                                     state->current->include.selinux_root_relative ?
+                                         bus_selinux_policy_root() :
+-                                        state->file->path,
++                                        NULL,
+                                     state->current->cdata);
+                 if (r) {
+                         state->error = error_trace(r);
+-- 
+2.1.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_git.bb
new file mode 100644
index 0000000..b62bccf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "dbus broker"
+DESCRIPTION = "Drop-in replacement for dbus-daemon."
+
+SECTION = "base"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7b486c2338d225a1405d979ed2c15ce8"
+
+DEPENDS = "dbus glib-2.0 expat"
+
+PV = "9+git${SRCPV}"
+SRCREV = "ccd06b284892182af569e69046262331150e3536"
+
+SRC_URI = "git://github.com/bus1/dbus-broker;protocol=git"
+SRC_URI += "file://0001-Comment-rst2man-related-stuff.patch"
+SRC_URI += "file://0002-Correct-including-directory-for-conf.patch"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig systemd distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SYSTEMD_SERVICE_${PN} = "${BPN}.service"
+
+FILES_${PN} += "${systemd_system_unitdir}"
+FILES_${PN} += "${systemd_user_unitdir}"
+
+RDEPENDS_${PN} = "dbus"
+
+BBCLASSEXTEND = "native"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch
index 0c2c487..b108a4c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch
@@ -33,10 +33,10 @@
  src/pipe.cpp                  | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/src/eventloop-integration.cpp b/src/eventloop-integration.cpp
-index 5776971..271b503 100644
---- a/src/eventloop-integration.cpp
-+++ b/src/eventloop-integration.cpp
+Index: libdbus-c++-0.9.0/src/eventloop-integration.cpp
+===================================================================
+--- libdbus-c++-0.9.0.orig/src/eventloop-integration.cpp
++++ libdbus-c++-0.9.0/src/eventloop-integration.cpp
 @@ -36,7 +36,7 @@
  /* STD */
  #include <string.h>
@@ -44,12 +44,12 @@
 -#include <sys/poll.h>
 +#include <poll.h>
  #include <fcntl.h>
- #include <unistd.h>
  
-diff --git a/src/eventloop.cpp b/src/eventloop.cpp
-index f622812..7790e1e 100644
---- a/src/eventloop.cpp
-+++ b/src/eventloop.cpp
+ using namespace DBus;
+Index: libdbus-c++-0.9.0/src/eventloop.cpp
+===================================================================
+--- libdbus-c++-0.9.0.orig/src/eventloop.cpp
++++ libdbus-c++-0.9.0/src/eventloop.cpp
 @@ -28,7 +28,7 @@
  #include <dbus-c++/eventloop.h>
  #include <dbus-c++/debug.h>
@@ -59,10 +59,10 @@
  #include <sys/time.h>
  
  #include <dbus/dbus.h>
-diff --git a/src/pipe.cpp b/src/pipe.cpp
-index 01211b3..45c2ba6 100644
---- a/src/pipe.cpp
-+++ b/src/pipe.cpp
+Index: libdbus-c++-0.9.0/src/pipe.cpp
+===================================================================
+--- libdbus-c++-0.9.0.orig/src/pipe.cpp
++++ libdbus-c++-0.9.0/src/pipe.cpp
 @@ -32,7 +32,7 @@
  
  /* STD */
@@ -72,6 +72,3 @@
  #include <fcntl.h>
  #include <errno.h>
  #include <cassert>
--- 
-2.10.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
index 903a720..bf6870e 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
@@ -24,17 +24,15 @@
  include/dbus-c++/eventloop-integration.h |    1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/include/dbus-c++/eventloop-integration.h b/include/dbus-c++/eventloop-integration.h
-index 5108340..1b56ab5 100644
---- a/include/dbus-c++/eventloop-integration.h
-+++ b/include/dbus-c++/eventloop-integration.h
-@@ -27,6 +27,7 @@
+Index: libdbus-c++-0.9.0/include/dbus-c++/eventloop-integration.h
+===================================================================
+--- libdbus-c++-0.9.0.orig/include/dbus-c++/eventloop-integration.h
++++ libdbus-c++-0.9.0/include/dbus-c++/eventloop-integration.h
+@@ -26,6 +26,7 @@
+ #define __DBUSXX_EVENTLOOP_INTEGRATION_H
  
- #include <cstring>
  #include <errno.h>
 +#include <unistd.h>
  #include "api.h"
  #include "dispatcher.h"
  #include "util.h"
--- 
-1.7.9.7
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell/0001-ell-fix-build-with-musl-libc.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell/0001-ell-fix-build-with-musl-libc.patch
new file mode 100644
index 0000000..a172a93
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell/0001-ell-fix-build-with-musl-libc.patch
@@ -0,0 +1,39 @@
+From 4f8c68757b05d12392cd1a8aed174cb8e56f80e3 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Thu, 5 Apr 2018 17:19:44 +0300
+Subject: [PATCH] ell: fix build with musl libc
+
+musl libc doesn't implement TEMP_FAILURE_RETRY. Use the
+TEMP_FAILURE_RETRY from glibc to fix build.
+
+Upstream-Status: Submitted [https://lists.01.org/pipermail/ell/2018-April/001209.html]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ ell/dbus.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/ell/dbus.h b/ell/dbus.h
+index a7c08d2..3ff5e0f 100644
+--- a/ell/dbus.h
++++ b/ell/dbus.h
+@@ -28,6 +28,16 @@
+ #include <stddef.h>
+ #include <stdarg.h>
+ 
++/* taken from glibc unistd.h for musl support */
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression)             \
++  (__extension__                                   \
++    ({ long int __result;                          \
++       do __result = (long int) (expression);      \
++       while (__result == -1L && errno == EINTR);  \
++       __result; }))
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+-- 
+2.4.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_0.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_0.4.bb
new file mode 100644
index 0000000..1524bd6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_0.4.bb
@@ -0,0 +1,19 @@
+SUMMARY  = "Embedded Linux Library"
+DESCRIPTION = "ELL is a DBUS library which provides DBUS bindings."
+LICENSE  = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
+SECTION = "libs"
+
+inherit autotools pkgconfig
+
+S = "${WORKDIR}/git"
+SRCREV = "b4aea06fabb2af1af01f861f8f394c75950b6d47"
+SRC_URI = "git://git.kernel.org/pub/scm/libs/ell/ell.git \
+           file://0001-ell-fix-build-with-musl-libc.patch \
+          "
+
+do_configure_prepend () {
+    mkdir ${S}/build-aux
+}
+
+DEPENDS = "dbus"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_git.bb
deleted file mode 100644
index 10df6e1..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/ell/ell_git.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY  = "Embedded Linux Library"
-DESCRIPTION = "ELL is a DBUS library which provides DBUS bindings."
-LICENSE  = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
-SECTION = "libs"
-
-inherit autotools pkgconfig
-
-S = "${WORKDIR}/git"
-SRCREV = "7b7c15c2e5caff88fc45e7a8b874a47196a0eddd"
-SRC_URI = "git://git.kernel.org/pub/scm/libs/ell/ell.git"
-
-do_configure_prepend () {
-    mkdir ${S}/build-aux
-}
-
-DEPENDS = "dbus"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/0001-Glib-Threads-Private-Fix-gobj.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/0001-Glib-Threads-Private-Fix-gobj.patch
new file mode 100644
index 0000000..7899022
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/0001-Glib-Threads-Private-Fix-gobj.patch
@@ -0,0 +1,40 @@
+From 838fe84c2ddcc9af51c34f751defbf3dd0ba8a06 Mon Sep 17 00:00:00 2001
+From: Kjell Ahlstedt <kjellahlstedt@gmail.com>
+Date: Wed, 20 Dec 2017 20:00:32 +0100
+Subject: [PATCH] Glib::Threads::Private: Fix gobj()
+
+Bug 791711
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Backport [https://github.com/GNOME/glibmm/commit/37d57ae9572b7d74aa385a30313eceae7f2d3fce]
+ glib/glibmm/threads.h | 2 +-
+ glib/src/threads.hg   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/glib/glibmm/threads.h b/glib/glibmm/threads.h
+index f7e2b82a..2c0cbe8c 100644
+--- a/glib/glibmm/threads.h
++++ b/glib/glibmm/threads.h
+@@ -657,7 +657,7 @@ public:
+    */
+   inline void replace(T* data);
+ 
+-  GPrivate* gobj() { return gobject_; }
++  GPrivate* gobj() { return &gobject_; }
+ 
+ private:
+   GPrivate gobject_;
+diff --git a/glib/src/threads.hg b/glib/src/threads.hg
+index 86d7a17b..c82a6130 100644
+--- a/glib/src/threads.hg
++++ b/glib/src/threads.hg
+@@ -628,7 +628,7 @@ public:
+    */
+   inline void replace(T* data);
+ 
+-  GPrivate* gobj() { return gobject_; }
++  GPrivate* gobj() { return &gobject_; }
+ 
+ private:
+   GPrivate gobject_;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/remove-examples.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/remove-examples.patch
index a5944c2..d32fe78 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/remove-examples.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/remove-examples.patch
@@ -1,7 +1,16 @@
-Index: glibmm-2.22.1/Makefile.am
-===================================================================
---- glibmm-2.22.1.orig/Makefile.am
-+++ glibmm-2.22.1/Makefile.am
+From f48a69fd11b2eda6c43ff046c202cbc4dcd4e92d Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Tue, 12 Jul 2011 11:46:37 +0200
+
+---
+ Makefile.am  | 7 +------
+ configure.ac | 1 -
+ 2 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a0df8af..c3d5e06 100644
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -23,12 +23,7 @@ src_subdirs = glib/src gio/src
  else
  src_subdirs =
@@ -16,15 +25,15 @@
  
  glibmm_includedir = $(includedir)/$(GLIBMM_MODULE_NAME)
  glibmm_include_HEADERS = glib/glibmm.h
-Index: glibmm-2.22.1/configure.ac
-===================================================================
---- glibmm-2.22.1.orig/configure.ac
-+++ glibmm-2.22.1/configure.ac
-@@ -136,7 +136,6 @@ AC_CONFIG_FILES([Makefile
+diff --git a/configure.ac b/configure.ac
+index c20e778..74203be 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -166,7 +166,6 @@ AC_CONFIG_FILES([Makefile
                   gio/src/Makefile
                   gio/giomm/Makefile
                   tests/Makefile
 -                 examples/Makefile
                   docs/Makefile
                   docs/reference/Doxyfile
-                  MSVC_Net2005/glibmm/glibmm.rc
+                  MSVC_Net2013/glibmm/glibmm.rc
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.1.bb
deleted file mode 100644
index 9cc558f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "C++ bindings for the glib library"
-HOMEPAGE = "http://www.gtkmm.org/"
-SECTION = "libs"
-LICENSE = "LGPLv2.1 & GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
-                    file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "mm-common glib-2.0 libsigc++-2.0 glib-2.0-native"
-inherit autotools pkgconfig
-
-SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
-
-SRC_URI = " \
-    ftp://ftp.gnome.org/pub/GNOME/sources/glibmm/${SHRT_VER}/glibmm-${PV}.tar.xz \
-    file://remove-examples.patch \
-"
-SRC_URI[md5sum] = "a5b915dc42fc62983fa78ca8486f4391"
-SRC_URI[sha256sum] = "1fd85051da9cb402cc8348cec72dfe4d79f9345df4a1dbf68703a4ded45846a4"
-
-do_install_append() {
-    install -d ${D}${datadir}/glibmm-2.4
-    install -d ${D}${datadir}/aclocal
-
-    install -m 0644 glib/glibmmconfig.h ${D}${datadir}/glibmm-2.4/
-    install -m 0644 scripts/glibmm_check_perl.m4 ${D}${datadir}/aclocal/ || true
-
-    for i in generate_wrap_init.pl gmmproc; do
-        sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/glibmm-2.4/proc/$i
-    done
-}
-
-FILES_${PN} = "${libdir}/lib*.so.*"
-FILES_${PN}-dev += "${datadir}/glibmm-* ${libdir}/glibmm-2.4/include/ ${libdir}/glibmm-2.4/proc/ ${libdir}/giomm-2.4/include/"
-
-RDEPENDS_${PN}-dev = "perl"
-SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.54.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.54.1.bb
new file mode 100644
index 0000000..4706432
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.54.1.bb
@@ -0,0 +1,37 @@
+SUMMARY = "C++ bindings for the glib library"
+HOMEPAGE = "http://www.gtkmm.org/"
+SECTION = "libs"
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=42dfffebc56fec7527aac53b7a89d1d8 \
+                    file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "mm-common glib-2.0 libsigc++-2.0 glib-2.0-native"
+inherit autotools pkgconfig
+
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+SRC_URI = " \
+    ftp://ftp.gnome.org/pub/GNOME/sources/glibmm/${SHRT_VER}/glibmm-${PV}.tar.xz \
+    file://remove-examples.patch \
+    file://0001-Glib-Threads-Private-Fix-gobj.patch \
+"
+SRC_URI[md5sum] = "dee5ebe309f5976c3dacfcf5c43a062b"
+SRC_URI[sha256sum] = "7cc28c732b04d70ed34f0c923543129083cfb90580ea4a2b4be5b38802bf6a4a"
+
+do_install_append() {
+    install -d ${D}${datadir}/glibmm-2.4
+    install -d ${D}${datadir}/aclocal
+
+    install -m 0644 glib/glibmmconfig.h ${D}${datadir}/glibmm-2.4/
+    install -m 0644 scripts/glibmm_check_perl.m4 ${D}${datadir}/aclocal/ || true
+
+    for i in generate_wrap_init.pl gmmproc; do
+        sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/glibmm-2.4/proc/$i
+    done
+}
+
+FILES_${PN} = "${libdir}/lib*.so.*"
+FILES_${PN}-dev += "${datadir}/glibmm-* ${libdir}/glibmm-2.4/include/ ${libdir}/glibmm-2.4/proc/ ${libdir}/giomm-2.4/include/"
+
+RDEPENDS_${PN}-dev = "perl"
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_0.9.10.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_0.9.10.bb
deleted file mode 100644
index 899eb8a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_0.9.10.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-inherit gnomebase
-
-GNOME_COMPRESS_TYPE="xz"
-
-SRC_URI[archive.md5sum] = "49dc47af8c89ce5b3c768306b9a0f922"
-SRC_URI[archive.sha256sum] = "16c0e2bc196b67fbc145edaecb5dbe5818386504fe5703de27002d77140fa217"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-BBCLASSEXTEND = "native"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_0.9.11.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_0.9.11.bb
new file mode 100644
index 0000000..591caa7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/mm-common/mm-common_0.9.11.bb
@@ -0,0 +1,9 @@
+inherit gnomebase
+
+SRC_URI[archive.md5sum] = "d6f2a43589480d2315672da0b5839b56"
+SRC_URI[archive.sha256sum] = "20d1e7466ca4c83c92e29f9e8dfcc8e5721fdf1337f53157bed97be3b73b32a8"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/plymouth/files/0001-Make-full-path-to-systemd-tty-ask-password-agent-con.patch b/import-layers/meta-openembedded/meta-oe/recipes-core/plymouth/files/0001-Make-full-path-to-systemd-tty-ask-password-agent-con.patch
new file mode 100644
index 0000000..6a86c76
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/plymouth/files/0001-Make-full-path-to-systemd-tty-ask-password-agent-con.patch
@@ -0,0 +1,34 @@
+From 746c690f57b52e6fe21cc2a11b5bb71d25af3128 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Wed, 13 Dec 2017 16:15:57 +0100
+Subject: [PATCH] Make full path to systemd-tty-ask-password-agent configurable
+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@gmail.com>
+---
+ configure.ac | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index aad673e..6b37179 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,7 +48,10 @@ PLYMOUTH_LIBS="-lm -lrt -ldl"
+ AC_SUBST(PLYMOUTH_CFLAGS)
+ AC_SUBST(PLYMOUTH_LIBS)
+ 
+-AC_PATH_PROG([SYSTEMD_ASK_PASSWORD_AGENT], [systemd-tty-ask-password-agent])
++AC_ARG_WITH(systemd-tty-ask-password-agent, AS_HELP_STRING([--with-systemd-tty-ask-password-agent],[path of systemd-tty-ask-password-agent]),SYSTEMD_ASK_PASSWORD_AGENT=${withval},SYSTEMD_ASK_PASSWORD_AGENT=/bin/systemd-tty-ask-password-agent)
++AC_SUBST(SYSTEMD_ASK_PASSWORD_AGENT)
++
++# checked: UDEVADM is not used
+ AC_PATH_PROG([UDEVADM], [udevadm])
+ 
+ AC_ARG_ENABLE(pango, AS_HELP_STRING([--enable-pango],[enable building with pango, disabled there is no encryption prompts]),enable_pango=$enableval,enable_pango=yes)
+-- 
+2.9.5
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
index 6163cff..7e8d6e3 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
@@ -16,13 +16,16 @@
 PROVIDES = "virtual/psplash"
 RPROVIDES_${PN} = "virtual-psplash virtual-psplash-support"
 
-SRC_URI = "http://www.freedesktop.org/software/plymouth/releases/${BPN}-${PV}.tar.bz2"
+SRC_URI = " \
+    http://www.freedesktop.org/software/plymouth/releases/${BPN}-${PV}.tar.bz2 \
+    file://0001-Make-full-path-to-systemd-tty-ask-password-agent-con.patch \
+"
 SRC_URI[md5sum] = "ff420994deb7ea203df678df92e7ab7d"
 SRC_URI[sha256sum] = "2f0ce82042cf9c7eadd2517a1f74c8a85fa8699781d9f294a06eade29fbed57f"
 
 EXTRA_OECONF += " --enable-shared --disable-static --disable-gtk --disable-documentation \
     --with-logo=${LOGO} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd-integration --with-system-root-install', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd-integration --with-system-root-install --with-systemd-tty-ask-password-agent=${base_bindir}/systemd-tty-ask-password-agent', '', d)} \
 "
 
 PACKAGECONFIG ??= "pango initrd"
@@ -31,7 +34,7 @@
 
 PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
 PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
-PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
+PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
 PACKAGECONFIG[initrd] = ",,,"
 
 LOGO ??= "${datadir}/plymouth/bizcom.png"
@@ -39,9 +42,6 @@
 inherit autotools pkgconfig systemd
 
 do_install_append() {
-    install -d ${D}${systemd_unitdir}/system
-    install -m 644 ${B}/systemd-units/*.service ${D}${systemd_unitdir}/system
-    install -m 644 ${B}/systemd-units/systemd-ask-password-plymouth.path ${D}${systemd_unitdir}/system
     # Remove /var/run from package as plymouth will populate it on startup
     rm -fr "${D}${localstatedir}/run"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_0.7.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_0.7.5.bb
new file mode 100644
index 0000000..347c285
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_0.7.5.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Toybox combines common utilities together into a single executable."
+HOMEPAGE = "http://www.landley.net/toybox/"
+DEPENDS = "attr"
+
+LICENSE = "BSD-0-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f0b8b3dd6431bcaa245da0a08bd0d511"
+
+SRC_URI = "http://www.landley.net/toybox/downloads/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "a8bb502a1be941f06dd2644fff25f547"
+SRC_URI[sha256sum] = "3ada450ac1eab1dfc352fee915ea6129b9a4349c1885f1394b61bd2d89a46c04"
+
+SECTION = "base"
+
+TOYBOX_BIN = "generated/unstripped/toybox"
+
+EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()}'
+
+do_configure() {
+    oe_runmake defconfig
+
+    # Disable killall5 as it isn't managed by update-alternatives
+    sed -e 's/CONFIG_KILLALL5=y/# CONFIG_KILLALL5 is not set/' -i .config
+
+    # Disable swapon as it doesn't handle the '-a' argument used during boot
+    sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config
+}
+
+do_compile() {
+    oe_runmake ${TOYBOX_BIN}
+
+    # Create a list of links needed
+    ${BUILD_CC} -I . scripts/install.c -o generated/instlist
+    ./generated/instlist long | sed -e 's#^#/#' > toybox.links
+}
+
+do_install() {
+    # Install manually instead of using 'make install'
+    install -d ${D}${base_bindir}
+    if grep -q "CONFIG_TOYBOX_SUID=y" ${B}/.config; then
+        install -m 4755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
+    else
+        install -m 0755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
+    fi
+
+    install -d ${D}${sysconfdir}
+    install -m 0644 ${B}/toybox.links ${D}${sysconfdir}
+}
+
+inherit update-alternatives
+
+# If you've chosen to install toybox you probably want it to take precedence
+# over busybox where possible but not over other packages
+ALTERNATIVE_PRIORITY = "60"
+
+python do_package_prepend () {
+    # Read links from /etc/toybox.links and create appropriate
+    # update-alternatives variables
+
+    dvar = d.getVar('D')
+    pn = d.getVar('PN')
+    target = "/bin/toybox"
+
+    f = open('%s/etc/toybox.links' % (dvar), 'r')
+    for alt_link_name in f:
+        alt_link_name = alt_link_name.strip()
+        alt_name = os.path.basename(alt_link_name)
+        d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
+        d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)
+    f.close()
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_git.bb
deleted file mode 100644
index 08f9715..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-core/toybox/toybox_git.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-SUMMARY = "Toybox combines common utilities together into a single executable."
-HOMEPAGE = "http://www.landley.net/toybox/"
-DEPENDS = "attr"
-
-LICENSE = "BSD-0-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f0b8b3dd6431bcaa245da0a08bd0d511"
-
-PV = "0.7.4+git${SRCPV}"
-
-SRCREV = "78289203031afc23585035c362beec10db54958d"
-SRC_URI = "git://github.com/landley/toybox;protocol=https \
-"
-
-S = "${WORKDIR}/git"
-
-SECTION = "base"
-
-TOYBOX_BIN = "generated/unstripped/toybox"
-
-EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()}'
-
-do_configure() {
-    oe_runmake defconfig
-
-    # Disable killall5 as it isn't managed by update-alternatives
-    sed -e 's/CONFIG_KILLALL5=y/# CONFIG_KILLALL5 is not set/' -i .config
-
-    # Disable swapon as it doesn't handle the '-a' argument used during boot
-    sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config
-}
-
-do_compile() {
-    oe_runmake ${TOYBOX_BIN}
-
-    # Create a list of links needed
-    ${BUILD_CC} -I . scripts/install.c -o generated/instlist
-    ./generated/instlist long | sed -e 's#^#/#' > toybox.links
-}
-
-do_install() {
-    # Install manually instead of using 'make install'
-    install -d ${D}${base_bindir}
-    if grep -q "CONFIG_TOYBOX_SUID=y" ${B}/.config; then
-        install -m 4755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
-    else
-        install -m 0755 ${B}/${TOYBOX_BIN} ${D}${base_bindir}/toybox
-    fi
-
-    install -d ${D}${sysconfdir}
-    install -m 0644 ${B}/toybox.links ${D}${sysconfdir}
-}
-
-inherit update-alternatives
-
-# If you've chosen to install toybox you probably want it to take precedence
-# over busybox where possible but not over other packages
-ALTERNATIVE_PRIORITY = "60"
-
-python do_package_prepend () {
-    # Read links from /etc/toybox.links and create appropriate
-    # update-alternatives variables
-
-    dvar = d.getVar('D')
-    pn = d.getVar('PN')
-    target = "/bin/toybox"
-
-    f = open('%s/etc/toybox.links' % (dvar), 'r')
-    for alt_link_name in f:
-        alt_link_name = alt_link_name.strip()
-        alt_name = os.path.basename(alt_link_name)
-        d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
-        d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)
-    f.close()
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/cryptsetup/cryptsetup_1.7.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_1.7.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/cryptsetup/cryptsetup_1.7.4.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_1.7.4.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-crypto/engine-pkcs11/engine-pkcs11_0.2.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-crypto/engine-pkcs11/engine-pkcs11_0.2.2.bb
new file mode 100644
index 0000000..bc79f35
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-crypto/engine-pkcs11/engine-pkcs11_0.2.2.bb
@@ -0,0 +1,31 @@
+SUMMARY = "A PKCS"
+DESCRIPTION = "\
+Engine_pkcs11 is an implementation of an engine for OpenSSL. It can be \
+loaded using code, config file or command line and will pass any function \
+call by openssl to a PKCS cards and software for using smart cards in PKCS"
+HOMEPAGE = "https://github.com/OpenSC/engine_pkcs11"
+SECTION = "Development/Libraries"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://src/engine_pkcs11.h;beginline=1;endline=26;md5=973a19f8a6105de047f2adfbbfc04c33"
+DEPENDS = "openssl libp11"
+
+SRC_URI = "git://github.com/OpenSC/engine_pkcs11.git"
+SRCREV = "132fcf2c8b319f9f4b2ebdc8dcb54ff496dc0519"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "\
+    --disable-static \
+    --libdir ${libdir}/engines \
+"
+
+do_install_append () {
+    rm -f ${D}${libdir}/engines/libpkcs11.la
+}
+
+FILES_${PN} += "${libdir}/engines/libpkcs11${SOLIBSDEV}"
+FILES_${PN}-dbg += "${libdir}/engines/.debug/"
+
+RDEPENDS_${PN} += "openssl libp11 opensc"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libmcrypt/libmcrypt_2.5.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-crypto/libmcrypt/libmcrypt_2.5.8.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/libmcrypt/libmcrypt_2.5.8.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-crypto/libmcrypt/libmcrypt_2.5.8.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libsodium/libsodium_1.0.11.bb b/import-layers/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.11.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/libsodium/libsodium_1.0.11.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.11.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/pkcs11-helper/pkcs11-helper_1.11.bb b/import-layers/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.11.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/pkcs11-helper/pkcs11-helper_1.11.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.11.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_git.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/leveldb/leveldb_git.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_git.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libdbi/libdbi.inc b/import-layers/meta-openembedded/meta-oe/recipes-dbs/libdbi/libdbi.inc
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/libdbi/libdbi.inc
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/libdbi/libdbi.inc
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libdbi/libdbi_0.9.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/libdbi/libdbi_0.9.0.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
new file mode 100644
index 0000000..aa01e95
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
@@ -0,0 +1,64 @@
+From 53368d3f4adc09dd84234a9af31771bcd8ca2757 Mon Sep 17 00:00:00 2001
+From: Sven Ebenfeld <sven.ebenfeld@gmail.com>
+Date: Fri, 15 Jan 2016 22:41:28 +0100
+Subject: [PATCH] Tell scons to use build settings from environment variables
+
+Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
+---
+ SConstruct                | 8 ++++++--
+ src/mongo/util/SConscript | 2 ++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+Index: git/SConstruct
+===================================================================
+--- git.orig/SConstruct
++++ git/SConstruct
+@@ -548,6 +548,7 @@ def variable_arch_converter(val):
+         'amd64':  'x86_64',
+         'emt64':   'x86_64',
+         'x86':    'i386',
++        'aarch64': 'arm64',
+     }
+     val = val.lower()
+ 
+@@ -627,7 +628,8 @@ env_vars.Add(
+ )
+ 
+ env_vars.Add('CC',
+-    help='Select the C compiler to use')
++    help='Select the C compiler to use',
++    default=os.getenv('CC'))
+ 
+ env_vars.Add('CCFLAGS',
+     help='Sets flags for the C and C++ compiler',
+@@ -647,7 +649,8 @@ env_vars.Add('CPPPATH',
+     converter=variable_shlex_converter)
+ 
+ env_vars.Add('CXX',
+-    help='Select the C++ compiler to use')
++    help='Select the C++ compiler to use',
++    default=os.getenv('CXX'))
+ 
+ env_vars.Add('CXXFLAGS',
+     help='Sets flags for the C++ compiler',
+@@ -895,6 +898,7 @@ envDict = dict(BUILD_ROOT=buildDir,
+                )
+ 
+ env = Environment(variables=env_vars, **envDict)
++env.PrependENVPath('PATH', os.getenv('PATH'))
+ del envDict
+ 
+ env.AddMethod(env_os_is_wrapper, 'TargetOSIs')
+Index: git/src/mongo/util/SConscript
+===================================================================
+--- git.orig/src/mongo/util/SConscript
++++ git/src/mongo/util/SConscript
+@@ -274,6 +274,8 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc':
+                 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS'
+             ]
+         )
++    if not use_system_version_of_library('valgrind'):
++        tcmspEnv.InjectThirdPartyIncludePaths('valgrind')
+ 
+     if not use_system_version_of_library('valgrind'):
+         # Include valgrind since tcmalloc disables itself while running under valgrind
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
new file mode 100644
index 0000000..389b302
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
@@ -0,0 +1,64 @@
+From a4951489d649c2b609cbb80f6cfb49fdcad8bd43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 10:03:37 -0700
+Subject: [PATCH] Use long long instead of int64_t
+
+Fixes
+error: call to member function 'appendNumber' is ambiguous
+since this function expects long long as parameter and not int64_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+ src/mongo/util/procparser.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+Index: git/src/mongo/util/procparser.cpp
+===================================================================
+--- git.orig/src/mongo/util/procparser.cpp
++++ git/src/mongo/util/procparser.cpp
+@@ -260,7 +260,7 @@ Status parseProcStat(const std::vector<S
+ 
+                     StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
+ 
+-                    uint64_t value;
++                    long long  value;
+ 
+                     if (!parseNumberFromString(stringValue, &value).isOK()) {
+                         value = 0;
+@@ -272,7 +272,7 @@ Status parseProcStat(const std::vector<S
+             } else {
+                 StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
+ 
+-                uint64_t value;
++                long long value;
+ 
+                 if (!parseNumberFromString(stringValue, &value).isOK()) {
+                     value = 0;
+@@ -365,7 +365,7 @@ Status parseProcMemInfo(const std::vecto
+ 
+             StringData stringValue((*partIt).begin(), (*partIt).end());
+ 
+-            uint64_t value;
++            long long value;
+ 
+             if (!parseNumberFromString(stringValue, &value).isOK()) {
+                 value = 0;
+@@ -426,7 +426,7 @@ Status parseProcDiskStats(const std::vec
+                           StringData data,
+                           BSONObjBuilder* builder) {
+     bool foundKeys = false;
+-    std::vector<uint64_t> stats;
++    std::vector<long long> stats;
+     stats.reserve(kDiskFieldCount);
+ 
+     using string_split_iterator = boost::split_iterator<StringData::const_iterator>;
+@@ -501,7 +501,7 @@ Status parseProcDiskStats(const std::vec
+ 
+                 StringData stringValue((*partIt).begin(), (*partIt).end());
+ 
+-                uint64_t value;
++                long long value;
+ 
+                 if (!parseNumberFromString(stringValue, &value).isOK()) {
+                     value = 0;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
new file mode 100644
index 0000000..dc488ad
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
@@ -0,0 +1,25 @@
+From 5759878e5d278f11a1063e8fccd1e6b7b54caadf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 2 Aug 2017 16:25:37 -0700
+Subject: [PATCH 2/2] d_state.cpp: Add missing dependenncy on
+ local_sharding_info
+
+Fixes
+| src/mongo/s/d_state.cpp:81: error: undefined reference to 'mongo::enableLocalShardingInfo(mongo::ServiceContext*, std::function<bool (mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>)'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mongo/s/SConscript | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: git/src/mongo/s/SConscript
+===================================================================
+--- git.orig/src/mongo/s/SConscript
++++ git/src/mongo/s/SConscript
+@@ -317,5 +317,6 @@ env.Library(
+         "$BUILD_DIR/mongo/db/s/sharding",
+         "$BUILD_DIR/mongo/executor/network_interface_factory",
+         "$BUILD_DIR/mongo/s/client/shard_local",
++        "$BUILD_DIR/mongo/s/local_sharding_info",
+     ],
+ )
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/arm64-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/arm64-support.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
new file mode 100644
index 0000000..bb3ff3b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
@@ -0,0 +1,76 @@
+SUMMARY = "mongodb"
+LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib"
+LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \
+                    file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+DEPENDS = "openssl libpcre libpcap zlib python boost"
+
+inherit scons dos2unix siteinfo
+
+PV = "3.4.13+git${SRCPV}"
+SRCREV = "fbdef2ccc53e0fcc9afb570063633d992b2aae42"
+SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \
+           file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
+           file://0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch \
+           file://0001-Use-long-long-instead-of-int64_t.patch \
+           file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
+           file://0001-Use-strerror_r-only-on-glibc-systems.patch \
+           file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
+           file://0003-Conditionalize-glibc-specific-strerror_r.patch \
+           file://arm64-support.patch \
+           file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
+           file://disable-hw-crc32-on-arm64-s390x.patch \
+           "
+SRC_URI_append_libc-musl ="\
+           file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
+           "
+S = "${WORKDIR}/git"
+
+# Wiredtiger supports only 64-bit platforms
+PACKAGECONFIG_x86-64 ??= "tcmalloc wiredtiger"
+PACKAGECONFIG_aarch64 ??= "tcmalloc wiredtiger"
+PACKAGECONFIG ??= "tcmalloc"
+# gperftools compilation fails for arm below v7 because of missing support of
+# dmb operation. So we use system-allocator instead of tcmalloc
+PACKAGECONFIG_remove_armv6 = "tcmalloc"
+PACKAGECONFIG_remove_libc-musl = "tcmalloc"
+
+#std::current_exception is undefined for arm < v6
+COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
+COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
+COMPATIBLE_MACHINE_armv7a = "(!.*armv7a).*"
+COMPATIBLE_MACHINE_armv7ve = "(!.*armv7ve).*"
+COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
+COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*"
+
+PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
+PACKAGECONFIG[wiredtiger] = "--wiredtiger=on,--wiredtiger=off,,"
+
+EXTRA_OESCONS = "--prefix=${D}${prefix} \
+                 LIBPATH=${STAGING_LIBDIR} \
+                 LINKFLAGS='${LDFLAGS}' \
+                 CXXFLAGS='${CXXFLAGS}' \
+                 TARGET_ARCH=${TARGET_ARCH} \
+                 --ssl \
+                 --disable-warnings-as-errors \
+                 --use-system-pcre \
+                 --use-system-zlib \
+                 --js-engine=none \
+                 --nostrip \
+                 --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
+                 ${PACKAGECONFIG_CONFARGS} \
+                 mongod mongos"
+
+do_configure_prepend() {
+        # tests use hex floats, not supported in plain C++
+        sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
+}
+scons_do_compile() {
+        ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
+        die "scons build execution failed."
+}
+
+scons_do_install() {
+        ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
+        die "scons install execution failed."
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb-native_5.5.57.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.59.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb-native_5.5.57.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.59.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc
new file mode 100644
index 0000000..99e7050
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -0,0 +1,297 @@
+SUMMARY = "A robust, scalable, and reliable SQL server"
+HOMEPAGE = "http://mariadb.org"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "https://downloads.mariadb.org/f/${BP}/source/${BP}.tar.gz \
+           file://fix-cmake-module-path.patch \
+           file://remove-bad-path.patch \
+           file://fix-mysqlclient-r-version.patch \
+           file://my.cnf \
+           file://mysqld.service \
+           file://install_db.service \
+           file://install_db \
+           file://mysql-systemd-start \
+           file://configure.cmake-fix-valgrind.patch \
+           file://fix-a-building-failure.patch \
+           file://change-cc-to-cc-version.patch \
+           file://0001-disable-ucontext-on-musl.patch \
+          "
+
+SRC_URI[md5sum] = "3cec4afc06b468687ef576c90148d10d"
+SRC_URI[sha256sum] = "c3269ce20b45b177239fd1e3d6d9428a94131711f12758ebf5f65222278bb110"
+
+S = "${WORKDIR}/mariadb-${PV}"
+
+BINCONFIG_GLOB = "mysql_config"
+
+inherit cmake gettext binconfig update-rc.d useradd systemd
+
+INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb"
+INITSCRIPT_NAME_${PN}-server = "mysqld"
+INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ."
+
+USERADD_PACKAGES = "${PN}-server"
+USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql"
+GROUPADD_PARAM_${PN}-server = "--system mysql"
+
+INITSCRIPT_NAME_${PN}-setupdb = "install_db"
+INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44"
+
+SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb"
+SYSTEMD_SERVICE_${PN}-server = "mysqld.service"
+SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable"
+
+SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service"
+SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable"
+ALLOW_EMPTY_${PN}-setupdb ?= "1"
+FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db"
+
+EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
+PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind"
+PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit"
+PACKAGECONFIG[krb5] = ", ,krb5"
+PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb"
+
+# MariaDB doesn't link properly with gold
+# https://mariadb.atlassian.net/browse/MDEV-5982
+TARGET_CFLAGS += "-fuse-ld=bfd"
+
+BUILD_CFLAGS += "-fuse-ld=bfd"
+BUILD_CXXFLAGS += "-fuse-ld=bfd"
+
+EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
+                 -DWITH_JEMALLOC=no \
+                 -DWITHOUT_TOKUDB=TRUE \
+                 -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
+                 -DGROFF=FALSE \
+                 -DNROFF=FALSE \
+                 -DENABLE_DTRACE=FALSE \
+                 -DWITH_PIC=ON \
+                 -DINSTALL_LAYOUT=RPM \
+                 -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \
+                 -DINSTALL_LIBDIR:PATH=${baselib} \
+                 -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \
+                 -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
+                 -DMYSQL_DATADIR:PATH=/var/mysql \
+                 -DCAT_EXECUTABLE=`which cat` \
+                 -DCMAKE_AR:FILEPATH=${AR}"
+
+# With Ninja it fails with:
+# make: *** No rule to make target `install'.  Stop.
+OECMAKE_GENERATOR = "Unix Makefiles"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+do_configure_append() {
+    # handle distros with different values of ${libexecdir}
+    libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
+    sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
+    sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh
+    sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
+}
+
+do_generate_toolchain_file_append_class-native () {
+    # If these are set cmake will assume we're cross-compiling, which will
+    # result in certain things we want being disabled
+    sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
+    sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
+}
+
+do_compile_prepend_class-target () {
+    # These need to be in-tree or make will think they need to be built,
+    # and since we're cross-compiling that is disabled
+    cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
+    cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
+
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then
+        if ! [ -e ${B}/include/openssl/kssl.h ] ; then
+            mkdir -p ${B}/include/openssl
+            echo "#ifndef KSSL_H" >${B}/include/openssl/kssl.h
+            echo "#define KSSL_H" >>${B}/include/openssl/kssl.h
+            echo "#include <openssl/opensslconf.h>">>${B}/include/openssl/kssl.h
+            echo "#endif" >>${B}/include/openssl/kssl.h
+        fi
+    fi
+}
+
+SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
+
+# We need to append this so it runs *after* binconfig's preprocess function
+#
+# We really don't care exactly what the directories were set to originally.
+# plugindir is not fixed, but we don't create any plugins.
+#
+mariadb_sysroot_preprocess () {
+    sed -i -es,^pkgincludedir=.*,pkgincludedir=\'${STAGING_INCDIR}/mysql\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
+    sed -i -es,^pkglibdir=.*,pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
+}
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install
+
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
+    install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/
+    mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system
+    sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \
+                                                                   ${D}${systemd_unitdir}/system/install_db.service
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "f /var/log/mysqld.err 0640 mysql mysql -" \
+            > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf
+    fi
+    install -d ${D}${bindir}
+    install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir}
+    install -d ${D}${datadir}/doc/${PN}
+    if [ -f ${D}${datadir}/doc/README ]; then
+        mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
+    fi
+}
+
+PACKAGES = "${PN}-dbg ${PN} \
+    libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev libmysqlclient-r-dbg \
+    libmysqlclient libmysqlclient-dev libmysqlclient-staticdev libmysqlclient-dbg \
+    libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers"
+CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf"
+CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf"
+CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf"
+
+FILES_${PN} = " "
+RDEPENDS_${PN} = "${PN}-client ${PN}-server"
+ALLOW_EMPTY_${PN} = "1"
+
+RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \
+    perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \
+    perl-module-exporter"
+RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \
+    perl-module-file-basename perl-module-file-path perl-module-sys-hostname \
+    perl-module-file-copy perl-module-file-temp perl-module-posix \
+    ${PN}-client libdbi-perl libdbd-mysql-perl"
+RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \
+    perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \
+    perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \
+    perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \
+    perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \
+    perl-module-io-socket-inet perl-module-io-select"
+RDEPENDS_${PN}-setupdb = "coreutils"
+
+# Allow old code to link to the backward compatible library
+RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev"
+
+FILES_libmysqlclient = "\
+    ${libdir}/libmysqlclient.so.* \
+    ${sysconfdir}/my.cnf.d/client.cnf"
+FILES_libmysqlclient-dev = " \
+    ${includedir}/mysql/ \
+    ${libdir}/libmysqlclient.so \
+    ${sysconfdir}/aclocal \
+    ${bindir}/mysql_config"
+FILES_libmysqlclient-staticdev = "\
+    ${libdir}/*.a"
+FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
+    ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
+
+# Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0
+# which are intentionally non-PIC on 32-bit x86 (see e.g.
+# storage/xtradb/plug.in in the source)
+INSANE_SKIP_libmysqlclient_append_x86 = " textrel"
+
+FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
+FILES_libmysqlclient-r-dev = "\
+    ${libdir}/libmysqlclient_r.so"
+FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
+FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*"
+
+FILES_libmysqld = "\
+    ${libdir}/libmysqld.so.*"
+FILES_libmysqld-dev = "\
+    ${libdir}/libmysqld.so"
+
+FILES_${PN}-client = "\
+    ${bindir}/myisam_ftdump \
+    ${bindir}/mysql \
+    ${bindir}/mysql_client_test \
+    ${bindir}/mysql_client_test_embedded \
+    ${bindir}/mysql_find_rows \
+    ${bindir}/mysql_fix_extensions \
+    ${bindir}/mysql_waitpid \
+    ${bindir}/mysqlaccess \
+    ${bindir}/mysqladmin \
+    ${bindir}/mysqlbug \
+    ${bindir}/mysqlcheck \
+    ${bindir}/mysqldump \
+    ${bindir}/mysqldumpslow \
+    ${bindir}/mysqlimport \
+    ${bindir}/mysqlshow \
+    ${bindir}/mysqlslap \
+    ${bindir}/mysqltest_embedded \
+    ${libexecdir}/mysqlmanager \
+    ${sysconfdir}/my.cnf.d/mysql-clients.cnf"
+
+FILES_${PN}-server = "\
+    ${bindir}/comp_err \
+    ${bindir}/isamchk \
+    ${bindir}/isamlog \
+    ${bindir}/msql2mysql \
+    ${bindir}/my_print_defaults \
+    ${bindir}/myisamchk \
+    ${bindir}/myisamlog \
+    ${bindir}/myisampack \
+    ${bindir}/mysql_convert_table_format \
+    ${bindir}/mysql_fix_privilege_tables \
+    ${bindir}/mysql_install_db \
+    ${bindir}/mysql_secure_installation \
+    ${bindir}/mysql_setpermission \
+    ${bindir}/mysql-systemd-start \
+    ${bindir}/mysql_tzinfo_to_sql \
+    ${bindir}/mysql_upgrade \
+    ${bindir}/mysql_plugin \
+    ${bindir}/mysql_zap \
+    ${bindir}/mysqlbinlog \
+    ${bindir}/mysqld_multi \
+    ${bindir}/mysqld_safe \
+    ${bindir}/mysqld_safe_helper \
+    ${bindir}/mysqlhotcopy \
+    ${bindir}/mysqltest \
+    ${bindir}/ndb_delete_all \
+    ${bindir}/ndb_desc \
+    ${bindir}/ndb_drop_index \
+    ${bindir}/ndb_drop_table \
+    ${bindir}/ndb_mgm \
+    ${bindir}/ndb_restore \
+    ${bindir}/ndb_select_all \
+    ${bindir}/ndb_select_count \
+    ${bindir}/ndb_show_tables \
+    ${bindir}/ndb_waiter \
+    ${bindir}/pack_isam \
+    ${bindir}/perror \
+    ${bindir}/replace \
+    ${bindir}/resolve_stack_dump \
+    ${bindir}/resolveip \
+    ${libexecdir}/mysqld \
+    ${sbindir}/mysqld \
+    ${sbindir}/ndb_cpcd \
+    ${sbindir}/ndbd \
+    ${sbindir}/ndb_mgmd \
+    ${libdir}/plugin/*.so \
+    ${datadir}/mysql/ \
+    ${localstatedir}/mysql/ \
+    ${sysconfdir}/init.d/mysqld \
+    ${sysconfdir}/my.cnf \
+    ${sysconfdir}/my.cnf.d/server.cnf \
+    ${sysconfdir}/tmpfiles.d"
+
+DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}"
+FILES_${PN}-leftovers = "/"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/0001-disable-ucontext-on-musl.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/0001-disable-ucontext-on-musl.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/change-cc-to-cc-version.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/change-cc-to-cc-version.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/configure.cmake-fix-valgrind.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/configure.cmake-fix-valgrind.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/fix-a-building-failure.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/fix-a-building-failure.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch
new file mode 100644
index 0000000..a519e42
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch
@@ -0,0 +1,160 @@
+From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001
+From: Tor Didriksen <tor.didriksen@oracle.com>
+Date: Mon, 24 Jun 2013 17:15:35 +0200
+Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18
+
+With this patch, the libmysql/ directory contains:
+libmysqlclient.a
+libmysqlclient_r.a -> libmysqlclient.a
+libmysqlclient_r.so -> libmysqlclient.so*
+libmysqlclient_r.so.18 -> libmysqlclient.so.18*
+libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so -> libmysqlclient.so.18*
+libmysqlclient.so.18 -> libmysqlclient.so.18.1.0*
+libmysqlclient.so.18.1.0*
+
+This fixes libmysqlclient_r symlinks pointing to the unversioned
+libmysqlclient.so symlink (leading to package QA errors since the
+libmysqlclient-r package ends up depending on libmysqlclient-dev).
+
+Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+---
+ cmake/install_macros.cmake | 25 +++++++++++++++----------
+ libmysql/CMakeLists.txt    | 34 +++++++++++++++++++++++++++-------
+ 2 files changed, 42 insertions(+), 17 deletions(-)
+
+diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
+index b8efdf8..a0d0e68 100644
+--- a/cmake/install_macros.cmake
++++ b/cmake/install_macros.cmake
+@@ -1,4 +1,4 @@
+-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ # 
+ # 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
+@@ -167,28 +167,33 @@ ENDFUNCTION()
+ 
+ 
+ # Install symbolic link to CMake target. 
+-# the link is created in the same directory as target
+-# and extension will be the same as for target file.
+-MACRO(INSTALL_SYMLINK linkname target destination component)
++# We do 'cd path; ln -s target_name link_name'
++# We also add an INSTALL target for "${path}/${link_name}"
++MACRO(INSTALL_SYMLINK target target_name link_name destination component)
+ IF(UNIX)
+   GET_TARGET_PROPERTY(location ${target} LOCATION)
+   GET_FILENAME_COMPONENT(path ${location} PATH)
+-  GET_FILENAME_COMPONENT(name ${location} NAME)
+-  SET(output ${path}/${linkname})
++  MESSAGE(STATUS "target ${target}")
++  MESSAGE(STATUS "link_name ${link_name}")
++  MESSAGE(STATUS "target_name ${target_name}")
++  MESSAGE(STATUS "path ${path}")
++  MESSAGE(STATUS "")
++
++  SET(output ${path}/${link_name})
+   ADD_CUSTOM_COMMAND(
+     OUTPUT ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
+     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink 
+-      ${name} 
+-      ${linkname}
++      ${target_name} 
++      ${link_name}
+     WORKING_DIRECTORY ${path}
+     DEPENDS ${target}
+     )
+   
+-  ADD_CUSTOM_TARGET(symlink_${linkname}
++  ADD_CUSTOM_TARGET(symlink_${link_name}
+     ALL
+     DEPENDS ${output})
+-  SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++  SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+   IF(CMAKE_GENERATOR MATCHES "Xcode")
+     # For Xcode, replace project config with install config
+     STRING(REPLACE "${CMAKE_CFG_INTDIR}" 
+diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
+index be5760f..96286ff 100644
+--- a/libmysql/CMakeLists.txt
++++ b/libmysql/CMakeLists.txt
+@@ -433,6 +433,12 @@ IF(MSVC)
+  INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
+ ENDIF()
+ 
++MACRO(GET_TARGET_NAME target out_name)
++  GET_TARGET_PROPERTY(location ${target} LOCATION)
++  GET_FILENAME_COMPONENT(name ${location} NAME)
++  SET(${out_name} ${name})
++ENDMACRO()
++
+ IF(UNIX)
+   MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME)
+     SET(DOT_VERSION ".${VERSION}")
+@@ -445,7 +451,13 @@ IF(UNIX)
+       SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
+     ENDIF() 
+   ENDMACRO()
+-  INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
++ENDIF()
++
++IF(UNIX)
++  GET_TARGET_NAME(mysqlclient lib_name)
++  INSTALL_SYMLINK(mysqlclient
++    ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a
++    ${INSTALL_LIBDIR} Development)
+ ENDIF()
+ 
+ IF(NOT DISABLE_SHARED)
+@@ -456,10 +468,9 @@ IF(NOT DISABLE_SHARED)
+     # libtool compatability
+     IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
+       SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
+-    ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
+     ELSE()
+-      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
++      SET(OS_SHARED_LIB_VERSION
++        "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0")
+     ENDIF()
+     # Name of shared library is mysqlclient on Unix
+     SET_TARGET_PROPERTIES(libmysql PROPERTIES 
+@@ -482,8 +493,13 @@ IF(NOT DISABLE_SHARED)
+       "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+       ""
+       linkname)
+-    INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
+-    SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
++    GET_TARGET_NAME(libmysql lib_name)
++    GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE)
++    INSTALL_SYMLINK(libmysql
++      ${lib_name} ${linkname}
++      ${INSTALL_LIBDIR} SharedLibraries)
++    SET(OS_SHARED_LIB_SYMLINKS
++      "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
+     LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
+     FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
+       GET_VERSIONED_LIBNAME(
+@@ -491,7 +507,11 @@ IF(NOT DISABLE_SHARED)
+         "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+         "${ver}"
+         linkname)
+-      INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
++      GET_VERSIONED_LIBNAME(
++        ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver)
++      INSTALL_SYMLINK(libmysql
++        ${lib_name_ver} ${linkname}
++        ${INSTALL_LIBDIR} SharedLibraries)
+     ENDFOREACH()
+   ENDIF()
+ ENDIF()
+-- 
+2.0.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/install_db b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/install_db
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/install_db
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/install_db
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/install_db.service b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/install_db.service
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/install_db.service
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/install_db.service
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/my.cnf b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/my.cnf
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/my.cnf
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/my.cnf
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/mysql-systemd-start b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mysql-systemd-start
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/mysql-systemd-start
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mysql-systemd-start
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/mysqld.service b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mysqld.service
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/mysqld.service
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mysqld.service
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb_5.5.57.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_5.5.59.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb_5.5.57.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_5.5.59.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mysql-python_1.2.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mysql-python_1.2.5.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
new file mode 100644
index 0000000..ce2a60c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
@@ -0,0 +1,40 @@
+From d52e330be895bb8c5f0fb3e2884766acbd942a85 Mon Sep 17 00:00:00 2001
+From: Philip Balister <philip@balister.org>
+Date: Tue, 1 Jul 2014 09:40:44 -0400
+Subject: [PATCH] Use pkg-config for libxml2 detection.
+
+Upstream-Status: Inappropriate [configuration]
+
+xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS.
+
+Signed-off-by: Philip Balister <philip@balister.org>
+---
+ configure.in | 15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+Index: postgresql-9.4.15/configure.in
+===================================================================
+--- postgresql-9.4.15.orig/configure.in
++++ postgresql-9.4.15/configure.in
+@@ -759,19 +759,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build w
+               [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
+ 
+ if test "$with_libxml" = yes ; then
+-  AC_CHECK_PROGS(XML2_CONFIG, xml2-config)
+-  if test -n "$XML2_CONFIG"; then
+-    for pgac_option in `$XML2_CONFIG --cflags`; do
+-      case $pgac_option in
+-        -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
+-      esac
+-    done
+-    for pgac_option in `$XML2_CONFIG --libs`; do
+-      case $pgac_option in
+-        -L*) LDFLAGS="$LDFLAGS $pgac_option";;
+-      esac
+-    done
+-  fi
++  CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`"
++  LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS"
+ fi
+ 
+ AC_SUBST(with_libxml)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
new file mode 100644
index 0000000..9715109
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
@@ -0,0 +1,28 @@
+[PATCH] not check libperl under cross compiling
+
+Upstream-Status: Inappropriate [configuration]
+
+libperl ldflags returned by PGAC_CHECK_PERL_EMBED_LDFLAGS are native,
+can not be used to check target library.
+
+postpresql has the dependency on perl, so not need to check libperl
+again, like in postgresql-9.2.4 
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: postgresql-9.4.15/configure.in
+===================================================================
+--- postgresql-9.4.15.orig/configure.in
++++ postgresql-9.4.15/configure.in
+@@ -1879,7 +1879,7 @@ if test "$with_tcl" = yes; then
+ fi
+ 
+ # check for <perl.h>
+-if test "$with_perl" = yes; then
++if test "$with_perl" = yes && test "$cross_compiling" = no; then
+   ac_save_CPPFLAGS=$CPPFLAGS
+   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
+   AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql-bashprofile
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql-bashprofile
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql-setup b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql-setup
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql-setup
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql-setup
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql.init b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql.init
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql.pam b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.pam
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql.pam
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.pam
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql.service b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.service
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/postgresql.service
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.service
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/postgresql.inc b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/postgresql.inc
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_9.4.17.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_9.4.17.bb
new file mode 100644
index 0000000..061184a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_9.4.17.bb
@@ -0,0 +1,14 @@
+require postgresql.inc
+
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=6dc95e63aa4d72502ff8193dfe2ddd38"
+
+SRC_URI += "\
+    file://not-check-libperl.patch \
+"
+
+do_compile_prepend_libc-musl() {
+    sed -i -e 's/\-lnsl//g' ${B}/src/Makefile.global
+}
+
+SRC_URI[md5sum] = "0a08f4078f5e4a54e764f63ad38a6de3"
+SRC_URI[sha256sum] = "7a320cd335052b840d209dc9688f09965763351c590e3cc7bf577591179fd7c6"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/run-ptest b/import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/run-ptest
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/files/run-ptest
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/files/run-ptest
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/psqlodbc.inc b/import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/psqlodbc.inc
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/psqlodbc_09.05.0300.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/psqlodbc/psqlodbc_09.05.0300.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
new file mode 100644
index 0000000..1e6cbae
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "RocksDB an embeddable, persistent key-value store"
+DESCRIPTION = "RocksDB is library that provides an embeddable, persistent key-value store for fast storage."
+HOMEPAGE = "http://rocksdb.org/"
+LICENSE = "(Apache-2.0 | GPL-2.0) & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \
+                    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
+
+SRCREV = "8969445642039566214d650cc6614849e7dd5e17"
+SRCBRANCH = "5.12.fb"
+PV = "5.12.2"
+
+SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH}"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+PACKAGECONFIG ??= "bzip2 zlib lz4"
+PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2"
+PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4"
+PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib"
+PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF"
+
+# Tools and tests currently don't compile on armv5 so we disable them
+EXTRA_OECMAKE = "\
+    -DPORTABLE=ON \
+    -DWITH_TESTS=OFF \
+    -DWITH_TOOLS=OFF \
+"
+
+FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/soci/soci/soci_libdir.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/soci/soci/soci_libdir.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-dbs/soci/soci_3.2.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/soci/soci_3.2.3.bb
new file mode 100644
index 0000000..3f22d38
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-dbs/soci/soci_3.2.3.bb
@@ -0,0 +1,49 @@
+# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "The C++ Database Access Library"
+HOMEPAGE = "http://soci.sourceforge.net"
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+SECTION = "libs"
+DEPENDS = "boost"
+
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BP}/${BP}.tar.gz \
+           file://soci_libdir.patch \
+          "
+SRC_URI[md5sum] = "acfbccf176cd20e06833a8037a2d3699"
+SRC_URI[sha256sum] = "2c659db0f4f7b424bbcffe195c03c293a1dbf676189a27b077fb2aab4d53a610"
+
+TESTCONFIG = '-DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" \
+              -DSOCI_TEST_POSTGRESQL_CONNSTR:STRING="dbname=soci_test" \
+              -DSOCI_TEST_MYSQL_CONNSTR:STRING="db=soci_test user=oe password=oe"'
+
+OBASEDIR ?= "/opt/oracle"
+OINCDIR = "rdbms/public"
+OLIBDIR = "lib"
+
+PACKAGECONFIG[sqlite3] = "-DSOCI_SQLITE3=ON,-DSOCI_SQLITE3=OFF,sqlite3,"
+PACKAGECONFIG[mysql] = "-DSOCI_MYSQL=ON,-DSOCI_MYSQL=OFF,mariadb,"
+PACKAGECONFIG[postgresql] = "-DSOCI_POSTGRESQL=ON,-DSOCI_POSTGRESQL=OFF,postgresql,"
+PACKAGECONFIG[odbc] = "-DSOCI_ODBC=ON,-DSOCI_ODBC=OFF,,"
+PACKAGECONFIG[empty] = "-DSOCI_EMPTY=ON,-DSOCI_EMPTY=OFF,,"
+PACKAGECONFIG[oracle] = "-DWITH_ORACLE=ON --with-oracle-include=${OINCDIR} --with-oracle-lib=${OLIBDIR},-DWITH_ORACLE=OFF,,"
+PACKAGECONFIG[ptest] = "${TESTCONFIG},,,"
+
+# enable your backend by default we enable 'empty'
+PACKAGECONFIG ??= "empty"
+
+# Take the flags added by PACKAGECONFIG and pass them to cmake.
+EXTRA_OECMAKE = "${EXTRA_OECONF} -DSOCI_LIBDIR=${libdir}"
+DISABLE_STATIC = ""
+
+inherit dos2unix cmake
+
+PACKAGES += "${PN}-sqlite3 ${PN}-mysql ${PN}-postgresql ${PN}-odbc ${PN}-oracle"
+
+FILES_${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*"
+FILES_${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*"
+FILES_${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*"
+FILES_${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*"
+FILES_${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch b/import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc b/import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite_2.8.17.bb b/import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/sqlite/sqlite_2.8.17.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/preserve-ownership.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/preserve-ownership.patch
index 85af81f..5c90397 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/preserve-ownership.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/preserve-ownership.patch
@@ -1,19 +1,50 @@
+From aa669312a380611d280d126cb509fa282080707e Mon Sep 17 00:00:00 2001
+From: Markus Mayer <mmayer@mmayer.net>
+Date: Wed, 7 Sep 2016 12:58:47 +0300
+Subject: [PATCH] android-tools: add recipe from AOSP tag android-5.1.1_r37
+
 Description: add -o argument to preserve ownership
-Author: Markus Mayer <mmayer@mmayer.net>
 
 See also https://android-review.googlesource.com/#/c/100312/
 
 Upstream-Status: Inappropriate
+
 ---
- system/extras/ext4_utils/make_ext4fs.c      |    6 ++++++
- system/extras/ext4_utils/make_ext4fs_main.c |   10 ++++++++--
+ ext4_utils/make_ext4fs.c      |  6 ++++++
+ ext4_utils/make_ext4fs_main.c | 10 ++++++++--
  2 files changed, 14 insertions(+), 2 deletions(-)
 
---- a/system/extras/ext4_utils/make_ext4fs_main.c
-+++ b/system/extras/ext4_utils/make_ext4fs_main.c
-@@ -49,13 +49,15 @@ extern struct fs_info info;
+diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
+index 2f89ae8a..cc41d623 100644
+--- a/ext4_utils/make_ext4fs.c
++++ b/ext4_utils/make_ext4fs.c
+@@ -68,6 +68,8 @@
  
- extern struct selabel_handle* selinux_android_file_context_handle(void);
+ #endif
+ 
++int preserve_owner = 0;
++
+ /* TODO: Not implemented:
+    Allocating blocks in the same block group as the file inode
+    Hash or binary tree directories
+@@ -186,6 +188,10 @@ static u32 build_directory_structure(const char *full_path, const char *dir_path
+ 		} else {
+ 			dentries[i].mtime = fixed_time;
+ 		}
++		if (preserve_owner) {
++			dentries[i].uid = stat.st_uid;
++			dentries[i].gid = stat.st_gid;
++		}
+ 		uint64_t capabilities;
+ 		if (fs_config_func != NULL) {
+ #ifdef ANDROID
+diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c
+index a6c5f616..7af0dddf 100644
+--- a/ext4_utils/make_ext4fs_main.c
++++ b/ext4_utils/make_ext4fs_main.c
+@@ -48,13 +48,15 @@ struct selabel_handle;
+ extern struct fs_info info;
+ 
  
 +extern int preserve_owner;
 +
@@ -28,7 +59,7 @@
  	fprintf(stderr, "    <filename> [<directory>]\n");
  }
  
-@@ -81,7 +83,7 @@ int main(int argc, char **argv)
+@@ -80,7 +82,7 @@ int main(int argc, char **argv)
  	struct selinux_opt seopts[] = { { SELABEL_OPT_PATH, "" } };
  #endif
  
@@ -37,7 +68,7 @@
  		switch (opt) {
  		case 'l':
  			info.len = parse_num(optarg);
-@@ -144,6 +146,10 @@ int main(int argc, char **argv)
+@@ -143,6 +145,10 @@ int main(int argc, char **argv)
  			}
  #endif
  			break;
@@ -48,25 +79,3 @@
  		case 'v':
  			verbose = 1;
  			break;
---- a/system/extras/ext4_utils/make_ext4fs.c
-+++ b/system/extras/ext4_utils/make_ext4fs.c
-@@ -67,6 +67,8 @@
- 
- #endif
- 
-+int preserve_owner = 0;
-+
- /* TODO: Not implemented:
-    Allocating blocks in the same block group as the file inode
-    Hash or binary tree directories
-@@ -185,6 +187,10 @@ static u32 build_directory_structure(con
- 		} else {
- 			dentries[i].mtime = fixed_time;
- 		}
-+		if (preserve_owner) {
-+			dentries[i].uid = stat.st_uid;
-+			dentries[i].gid = stat.st_gid;
-+		}
- 		uint64_t capabilities;
- 		if (fs_config_func != NULL) {
- #ifdef ANDROID
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
index d3ccd1d..780ecaa 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
@@ -9,7 +9,6 @@
 "
 DEPENDS = "libbsd libpcre openssl zlib libcap"
 
-ANDROID_TAG = "android-5.1.1_r37"
 ANDROID_MIRROR = "android.googlesource.com"
 CORE_REPO = "${ANDROID_MIRROR}/platform/system/core"
 EXTRAS_REPO = "${ANDROID_MIRROR}/platform/system/extras"
@@ -17,16 +16,23 @@
 LIBSELINUX_REPO = "${ANDROID_MIRROR}/platform/external/libselinux"
 BUILD_REPO = "${ANDROID_MIRROR}/platform/build"
 
+# matches with android-5.1.1_r37
+SRCREV_core = "2314b110bdebdbfd2d94c502282f9e57c849897e"
+SRCREV_extras = "3ecbe8d841df96127d7855661293e5ab6ba6c205"
+SRCREV_libhardware = "be55eb1f4d840c82ffaf7c47460df17ff5bc4d9b"
+SRCREV_libselinux = "07e9e1339ad1ba608acfba9dce2d0f474b252feb"
+SRCREV_build = "16e987def3d7d8f7d30805eb95cef69e52a87dbc"
+
 SRC_URI = " \
-    git://${CORE_REPO};name=core;protocol=https;nobranch=1;destsuffix=git/system/core;tag=${ANDROID_TAG} \
-    git://${EXTRAS_REPO};name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras;tag=${ANDROID_TAG} \
-    git://${LIBHARDWARE_REPO};name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware;tag=${ANDROID_TAG} \
-    git://${LIBSELINUX_REPO};name=libselinux;protocol=https;nobranch=1;destsuffix=git/external/libselinux;tag=${ANDROID_TAG} \
-    git://${BUILD_REPO};name=build;protocol=https;nobranch=1;destsuffix=git/build;tag=${ANDROID_TAG} \
+    git://${CORE_REPO};name=core;protocol=https;nobranch=1;destsuffix=git/system/core \
+    git://${EXTRAS_REPO};name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \
+    git://${LIBHARDWARE_REPO};name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware \
+    git://${LIBSELINUX_REPO};name=libselinux;protocol=https;nobranch=1;destsuffix=git/external/libselinux \
+    git://${BUILD_REPO};name=build;protocol=https;nobranch=1;destsuffix=git/build \
     file://remove-selinux-android.patch \
     file://use-capability.patch \
     file://use-local-socket.patch \
-    file://preserve-ownership.patch \
+    file://preserve-ownership.patch;patchdir=system/extras \
     file://mkbootimg-Add-dt-parameter-to-specify-DT-image.patch \
     file://remove-bionic-android.patch \
     file://define-shell-command.patch \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch
new file mode 100644
index 0000000..c762754
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0001-disable-calls-to-getcontext-with-musl.patch
@@ -0,0 +1,52 @@
+From 57ecf7205feedd23f901e1bb9d193787e559e433 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 23 Jan 2018 15:13:26 -0800
+Subject: [PATCH] disable calls to getcontext() with musl
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ src/client/linux/handler/exception_handler.cc | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index cca023f..f3e460c 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -495,7 +495,19 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) {
+   siginfo.si_code = SI_USER;
+   siginfo.si_pid = getpid();
+   ucontext_t context;
++#if defined(__GLIBC__)
+   getcontext(&context);
++#else
++  // Extreme hack: Allow musl builds to compile - but don't expect them to work.
++  // Although musl provides a definition for getcontext() in ucontext.h (which
++  // enough to build libbreakpad_client) musl does not provide a corresponding
++  // getcontext() function, so builds will fail when attempting to link anything
++  // with libbreakpad_client. Disabling calls to getcontext() is a temporary
++  // hack. The real fix is probably to enable Breakpad's own implementation of
++  // getcontext() when building for musl (it's currently only enabled when
++  // building for Android).
++  memset (&context, 0, sizeof(context));
++#endif
+   return HandleSignal(sig, &siginfo, &context);
+ }
+ 
+@@ -680,9 +692,14 @@ bool ExceptionHandler::WriteMinidump() {
+   sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
+ 
+   CrashContext context;
++#if defined(__GLIBC__)
+   int getcontext_result = getcontext(&context.context);
+   if (getcontext_result)
+     return false;
++#else
++  // Extreme hack - see comments above.
++  memset (&context.context, 0, sizeof(&context.context));
++#endif
+ 
+ #if defined(__i386__)
+   // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch
deleted file mode 100644
index 80de8c6..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-From fa7a3b7312307acad0045549d5f306e7fd117804 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Sun, 1 Feb 2015 14:34:44 +0100
-Subject: [PATCH 5/6] Import necessary definitions from stab.h
-
----
- configure.ac                        |   1 -
- src/common/android/include/stab.h   | 100 ------------------------------------
- src/common/common.gyp               |   1 -
- src/common/stabs_reader.cc          |   1 -
- src/common/stabs_reader.h           |  13 +++--
- src/common/stabs_reader_unittest.cc |   1 -
- 6 files changed, 10 insertions(+), 107 deletions(-)
- delete mode 100644 src/common/android/include/stab.h
-
-diff --git a/configure.ac b/configure.ac
-index 2223920..0e55cd9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -73,7 +73,6 @@ AC_HEADER_STDC
- AC_SYS_LARGEFILE
- m4_include(m4/ax_pthread.m4)
- AX_PTHREAD
--AC_CHECK_HEADERS([a.out.h])
- 
- # Only build Linux client libs when compiling for Linux
- case $host in
-diff --git a/src/common/android/include/stab.h b/src/common/android/include/stab.h
-deleted file mode 100644
-index cd92902..0000000
---- a/src/common/android/include/stab.h
-+++ /dev/null
-@@ -1,100 +0,0 @@
--// Copyright (c) 2012, Google Inc.
--// All rights reserved.
--//
--// Redistribution and use in source and binary forms, with or without
--// modification, are permitted provided that the following conditions are
--// met:
--//
--//     * Redistributions of source code must retain the above copyright
--// notice, this list of conditions and the following disclaimer.
--//     * Redistributions in binary form must reproduce the above
--// copyright notice, this list of conditions and the following disclaimer
--// in the documentation and/or other materials provided with the
--// distribution.
--//     * Neither the name of Google Inc. nor the names of its
--// contributors may be used to endorse or promote products derived from
--// this software without specific prior written permission.
--//
--// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
--// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
--// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
--// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
--// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
--// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
--// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
--// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
--// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
--// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
--#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
--#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
--
--#include <sys/cdefs.h>
--
--#ifdef __BIONIC_HAVE_STAB_H
--#include <stab.h>
--#else
--
--#ifdef __cplusplus
--extern "C" {
--#endif  // __cplusplus
--
--#define _STAB_CODE_LIST       \
--  _STAB_CODE_DEF(UNDF,0x00)   \
--  _STAB_CODE_DEF(GSYM,0x20)   \
--  _STAB_CODE_DEF(FNAME,0x22)  \
--  _STAB_CODE_DEF(FUN,0x24)    \
--  _STAB_CODE_DEF(STSYM,0x26)  \
--  _STAB_CODE_DEF(LCSYM,0x28)  \
--  _STAB_CODE_DEF(MAIN,0x2a)   \
--  _STAB_CODE_DEF(PC,0x30)     \
--  _STAB_CODE_DEF(NSYMS,0x32)  \
--  _STAB_CODE_DEF(NOMAP,0x34)  \
--  _STAB_CODE_DEF(OBJ,0x38)    \
--  _STAB_CODE_DEF(OPT,0x3c)    \
--  _STAB_CODE_DEF(RSYM,0x40)   \
--  _STAB_CODE_DEF(M2C,0x42)    \
--  _STAB_CODE_DEF(SLINE,0x44)  \
--  _STAB_CODE_DEF(DSLINE,0x46) \
--  _STAB_CODE_DEF(BSLINE,0x48) \
--  _STAB_CODE_DEF(BROWS,0x48)  \
--  _STAB_CODE_DEF(DEFD,0x4a)   \
--  _STAB_CODE_DEF(EHDECL,0x50) \
--  _STAB_CODE_DEF(MOD2,0x50)   \
--  _STAB_CODE_DEF(CATCH,0x54)  \
--  _STAB_CODE_DEF(SSYM,0x60)   \
--  _STAB_CODE_DEF(SO,0x64)     \
--  _STAB_CODE_DEF(LSYM,0x80)   \
--  _STAB_CODE_DEF(BINCL,0x82)  \
--  _STAB_CODE_DEF(SOL,0x84)    \
--  _STAB_CODE_DEF(PSYM,0xa0)   \
--  _STAB_CODE_DEF(EINCL,0xa2)  \
--  _STAB_CODE_DEF(ENTRY,0xa4)  \
--  _STAB_CODE_DEF(LBRAC,0xc0)  \
--  _STAB_CODE_DEF(EXCL,0xc2)   \
--  _STAB_CODE_DEF(SCOPE,0xc4)  \
--  _STAB_CODE_DEF(RBRAC,0xe0)  \
--  _STAB_CODE_DEF(BCOMM,0xe2)  \
--  _STAB_CODE_DEF(ECOMM,0xe4)  \
--  _STAB_CODE_DEF(ECOML,0xe8)  \
--  _STAB_CODE_DEF(NBTEXT,0xf0) \
--  _STAB_CODE_DEF(NBDATA,0xf2) \
--  _STAB_CODE_DEF(NBBSS,0xf4)  \
--  _STAB_CODE_DEF(NBSTS,0xf6)  \
--  _STAB_CODE_DEF(NBLCS,0xf8)  \
--  _STAB_CODE_DEF(LENG,0xfe)
--
--enum __stab_debug_code {
--#define _STAB_CODE_DEF(x,y)  N_##x = y,
--_STAB_CODE_LIST
--#undef _STAB_CODE_DEF
--};
--
--#ifdef __cplusplus
--}  // extern "C"
--#endif  // __cplusplus
--
--#endif  // __BIONIC_HAVE_STAB_H
--
--#endif  // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
-diff --git a/src/common/common.gyp b/src/common/common.gyp
-index f01ede5..c49ff85 100644
---- a/src/common/common.gyp
-+++ b/src/common/common.gyp
-@@ -46,7 +46,6 @@
-         'android/include/elf.h',
-         'android/include/link.h',
-         'android/include/sgidefs.h',
--        'android/include/stab.h',
-         'android/include/sys/procfs.h',
-         'android/include/sys/signal.h',
-         'android/include/sys/user.h',
-diff --git a/src/common/stabs_reader.cc b/src/common/stabs_reader.cc
-index 6019fc7..9562caa 100644
---- a/src/common/stabs_reader.cc
-+++ b/src/common/stabs_reader.cc
-@@ -34,7 +34,6 @@
- #include "common/stabs_reader.h"
- 
- #include <assert.h>
--#include <stab.h>
- #include <string.h>
- 
- #include <string>
-diff --git a/src/common/stabs_reader.h b/src/common/stabs_reader.h
-index d89afc0..591f007 100644
---- a/src/common/stabs_reader.h
-+++ b/src/common/stabs_reader.h
-@@ -53,12 +53,19 @@
- #include <config.h>
- #endif
- 
--#ifdef HAVE_A_OUT_H
--#include <a.out.h>
--#endif
- #ifdef HAVE_MACH_O_NLIST_H
- #include <mach-o/nlist.h>
- #endif
-+// Definitions from <stab.h> and <a.out.h> for systems which
-+// do not have them
-+#undef N_UNDF
-+#define N_UNDF 0x0
-+#define N_FUN 0x24
-+#define N_SLINE 0x44
-+#define N_SO 0x64
-+#define N_LSYM 0x80
-+#define N_BINCL 0x82
-+#define N_SOL 0x84
- 
- #include <string>
- #include <vector>
-diff --git a/src/common/stabs_reader_unittest.cc b/src/common/stabs_reader_unittest.cc
-index a84da1c..854ac42 100644
---- a/src/common/stabs_reader_unittest.cc
-+++ b/src/common/stabs_reader_unittest.cc
-@@ -33,7 +33,6 @@
- 
- #include <assert.h>
- #include <errno.h>
--#include <stab.h>
- #include <stdarg.h>
- #include <stdlib.h>
- #include <string.h>
--- 
-2.0.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
index 5f6d82c..d9773c9 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
@@ -41,6 +41,7 @@
            file://0005-md2core-Replace-basename.patch \
            file://0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch \
            file://mcontext.patch \
+           file://0001-disable-calls-to-getcontext-with-musl.patch \
            file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \
            file://mips_asm_sgidefs.patch;patchdir=src/third_party/lss \
 "
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch
index d3bfab7..9e5058f 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch
@@ -1,8 +1,16 @@
-Index: git/configure
-===================================================================
---- git.orig/configure	2012-11-19 21:07:51.917429465 -0800
-+++ git/configure	2012-11-19 21:13:19.337437278 -0800
-@@ -439,14 +442,18 @@
+From ab0eec78382bd00ce533aec2c84fd50c1733033d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Jan 2013 19:42:51 -0800
+
+---
+ configure | 32 ++++++++++++++++++--------------
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+diff --git a/configure b/configure
+index 76c2812..78ce2ff 100755
+--- a/configure
++++ b/configure
+@@ -535,14 +535,18 @@ else
  	GZIP_SUFFIX=".gz"
  fi
  
@@ -25,12 +33,16 @@
 +	cat << EOF > .1.c
  #include <stdio.h>
  int main(void) {
- #if defined(__GNUC__) && (__GNUC__ >= 4)
-@@ -569,16 +576,16 @@
+ #if defined(_WIN32)
+@@ -569,16 +573,16 @@ int main(void) {
  #endif
  }
  EOF
--
++	$CC -o .1 .1.c
++	COMPILER=`./.1`
++	r=$?
++	rm -f .1.c .1
+ 
 -$CC -o .1 .1.c
 -COMPILER=`./.1`
 -r=$?
@@ -40,11 +52,6 @@
 -	assert "" "update compiler"
 -else
 -	echo "success [$CC]"
-+	$CC -o .1 .1.c
-+	COMPILER=`./.1`
-+	r=$?
-+	rm -f .1.c .1
-+
 +	if test "$r" -ne 0; then
 +		assert "" "update compiler"
 +	else
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cpuid/cpuid_20170122.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/cpuid/cpuid_20170122.bb
new file mode 100644
index 0000000..7a70f75
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/cpuid/cpuid_20170122.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Linux tool to dump x86 CPUID information about the CPU(s)"
+DESCRIPTION = "cpuid dumps detailed information about the CPU(s) gathered \
+from the CPUID instruction, and also determines the exact model of CPU(s). \
+It supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, \
+UMC, NexGen, Rise, and SiS CPUs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://www.etallen.com/${BPN}/${BP}.src.tar.gz"
+SRC_URI[md5sum] = "1c46a6662626c5a6eaca626f23a5a7d7"
+SRC_URI[sha256sum] = "667612aae6704341dd10844e97c84c5c5c8700817a5937a3c293b55013bc4865"
+
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+# The install rule from the Makefile has hardcoded paths, so we duplicate
+# the actions to accommodate different paths.
+do_install () {
+    install -d -m755 ${D}/${bindir}
+    install -m755 ${B}/cpuid ${D}/${bindir}/cpuid
+    install -d -m755 ${D}/${mandir}
+    install -m444 ${B}/cpuid.man.gz ${D}/${mandir}
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.7.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.9.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.7.1.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.9.0.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.31.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.31.bb
index 27fe860..d8f2f89 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.31.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany-plugins_1.31.bb
@@ -11,6 +11,7 @@
 }
 
 DEPENDS = " \
+    fribidi \
     geany \
     libxml2 \
     libsoup-2.4 \
@@ -22,7 +23,9 @@
     libgit2 \
 "
 
-inherit autotools pkgconfig gtk-icon-cache
+inherit distro_features_check autotools pkgconfig gtk-icon-cache
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://plugins.geany.org/${PN}/${PN}-${PV}.tar.bz2"
 SRC_URI[md5sum] = "808f9048b77fd9704569ed2ba12a56e9"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.31.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.31.bb
index ce36e1e..bb9d8bc 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.31.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.31.bb
@@ -5,7 +5,9 @@
 
 DEPENDS = "gtk+ libxml-parser-perl-native python3-docutils-native intltool-native"
 
-inherit autotools pkgconfig perlnative pythonnative gettext
+inherit distro_features_check autotools pkgconfig perlnative pythonnative gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://download.geany.org/${BP}.tar.bz2"
 SRC_URI[md5sum] = "386000be6b26972c6a699939c37cda34"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3_3.8.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3_3.8.5.bb
deleted file mode 100644
index c4f6000..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade3_3.8.5.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Glade - A User Interface Designer"
-HOMEPAGE = "http://www.gnu.org/software/gnash"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \
-                    file://COPYING.GPL;md5=9ac2e7cff1ddaf48b6eab6028f23ef88 \
-                    file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475"
-DEPENDS = "gtk+ gnome-doc-utils gnome-common libxml2 intltool-native"
-
-inherit autotools pkgconfig pythonnative gtk-icon-cache
-
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade3/3.8/glade3-${PV}.tar.xz \
-           file://0001-gnome-doc-utils.make-sysrooted-pkg-config.patch \
-           file://0002-fix-gcc-6-build.patch \
-           file://0001-Add-G_GNUC_PRINTF-on-functions-with-format-strings.patch \
-           "
-SRC_URI[md5sum] = "4e4b4f5ee34a03e017e4cef97d796c1f"
-SRC_URI[sha256sum] = "58a5f6e4df4028230ddecc74c564808b7ec4471b1925058e29304f778b6b2735"
-
-EXTRA_OECONF += "--disable-scrollkeeper"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gnome] = "--enable-gnome,--disable-gnome,libbonoboui libgnomeui"
-
-FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.0.bb
deleted file mode 100644
index f33b6e3..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Glade - A User Interface Designer"
-HOMEPAGE = "http://www.gnu.org/software/gnash"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \
-                    file://COPYING.GPL;md5=9ac2e7cff1ddaf48b6eab6028f23ef88 \
-                    file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475"
-DEPENDS = "gtk+ gtk+3 glib-2.0 libxml2 intltool-native \
-           gnome-common-native \
-"
-
-
-inherit autotools pkgconfig gnomebase gobject-introspection
-
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.20/glade-${PV}.tar.xz \
-           file://remove-yelp-help-rules-var.patch \
-          "
-SRC_URI[md5sum] = "9964a2da14c5f845eae363889586ca43"
-SRC_URI[sha256sum] = "82d96dca5dec40ee34e2f41d49c13b4ea50da8f32a3a49ca2da802ff14dc18fe"
-
-EXTRA_OECONF += "--disable-man-pages"
-
-FILES_${PN} += "${datadir}/* ${libdir}/glade/modules/libgladegtk.so"
-FILES_${PN}-dev += "${libdir}/glade/modules/libgladegtk.la"
-FILES_${PN}-dbg += "${libdir}/glade/modules/.debug/libgladegtk.so"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.2.bb
new file mode 100644
index 0000000..95e1737
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.20.2.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Glade - A User Interface Designer"
+HOMEPAGE = "http://www.gnu.org/software/gnash"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=aabe87591cb8ae0f3c68be6977bb5522 \
+                    file://COPYING.GPL;md5=9ac2e7cff1ddaf48b6eab6028f23ef88 \
+                    file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475"
+DEPENDS = "gtk+ gtk+3 glib-2.0 libxml2 intltool-native \
+           gnome-common-native \
+"
+
+
+inherit distro_features_check autotools pkgconfig gnomebase gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.20/glade-${PV}.tar.xz \
+           file://remove-yelp-help-rules-var.patch \
+          "
+SRC_URI[md5sum] = "d3dd9ba33c7d7c854ab207e1ba844dda"
+SRC_URI[sha256sum] = "07d1545570951aeded20e9fdc6d3d8a56aeefe2538734568c5335be336c6abed"
+
+EXTRA_OECONF += "--disable-man-pages"
+
+FILES_${PN} += "${datadir}/* ${libdir}/glade/modules/libgladegtk.so"
+FILES_${PN}-dev += "${libdir}/glade/modules/libgladegtk.la"
+FILES_${PN}-dbg += "${libdir}/glade/modules/.debug/libgladegtk.so"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
new file mode 100644
index 0000000..5774e62
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch
@@ -0,0 +1,68 @@
+From cc6dbabea0e452ebc93682df860a79ed9a45722e Mon Sep 17 00:00:00 2001
+From: Alexey Firago <alexey_firago@mentor.com>
+Date: Fri, 20 Oct 2017 00:04:19 +0300
+Subject: [PATCH] CMakeLists.txt: Fix grpc_cpp_plugin path during
+ cross-compilation
+
+Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
+---
+ CMakeLists.txt                    | 9 ++++++++-
+ templates/CMakeLists.txt.template | 9 ++++++++-
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f9cd630..9663934 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -328,6 +328,13 @@ function(protobuf_generate_grpc_cpp)
+     return()
+   endif()
+
++  #if cross-compiling, find host plugin
++  if(CMAKE_CROSSCOMPILING)
++      find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin)
++  else()
++      set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)
++  endif()
++
+   set(_protobuf_include_path -I . -I ${PROTOBUF_WELLKNOWN_IMPORT_DIR})
+   foreach(FIL ${ARGN})
+     get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
+@@ -345,7 +352,7 @@ function(protobuf_generate_grpc_cpp)
+       COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}
+       ARGS --grpc_out=generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}
+            --cpp_out=${_gRPC_PROTO_GENS_DIR}
+-           --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
++           --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN}
+            ${_protobuf_include_path}
+            ${REL_FIL}
+       DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin
+diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
+index 64daf04..a7e8629 100644
+--- a/templates/CMakeLists.txt.template
++++ b/templates/CMakeLists.txt.template
+@@ -373,6 +373,13 @@
+       return()
+     endif()
+
++    #if cross-compiling, find host plugin
++    if(CMAKE_CROSSCOMPILING)
++        find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin)
++    else()
++        set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)
++    endif()
++
+     set(_protobuf_include_path -I . -I <%text>${PROTOBUF_WELLKNOWN_IMPORT_DIR}</%text>)
+     foreach(FIL <%text>${ARGN}</%text>)
+       get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE)
+@@ -390,7 +397,7 @@
+         COMMAND <%text>${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}</%text>
+         ARGS --grpc_out=<%text>generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}</%text>
+              --cpp_out=<%text>${_gRPC_PROTO_GENS_DIR}</%text>
+-             --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
++             --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN}
+              <%text>${_protobuf_include_path}</%text>
+              <%text>${REL_FIL}</%text>
+         DEPENDS <%text>${ABS_FIL}</%text> <%text>${_gRPC_PROTOBUF_PROTOC}</%text> grpc_cpp_plugin
+--
+2.7.4
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
new file mode 100644
index 0000000..f8d9652
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
@@ -0,0 +1,166 @@
+From 8e9bf962a45a82f1c2eb5858e29fa89a3a60b564 Mon Sep 17 00:00:00 2001
+From: Alexey Firago <alexey_firago@mentor.com>
+Date: Mon, 30 Oct 2017 23:24:49 +0300
+Subject: [PATCH 1/4] CMakeLists.txt: Fix libraries installation for Linux
+
+* Set libs versions as in Makefile
+
+Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
+
+%% original patch: 0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch
+---
+ CMakeLists.txt                        | 55 +++++++++++++++++++++++++++++++++++
+ CMakeLists.txt => CMakeLists.txt.orig |  0
+ 2 files changed, 55 insertions(+)
+ copy CMakeLists.txt => CMakeLists.txt.orig (100%)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b1a49df..13e64ac 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -30,6 +30,15 @@ set(PACKAGE_TARNAME   "${PACKAGE_NAME}-${PACKAGE_VERSION}")
+ set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
+ project(${PACKAGE_NAME} C CXX)
+ 
++set (CORE_VERSION_MAJOR "4")
++set (CORE_VERSION "4.0.0")
++
++set (CPP_VERSION_MAJOR "1")
++set (CPP_VERSION "${PACKAGE_VERSION}")
++
++set (CSHARP_VERSION_MAJOR "1")
++set (CSHARP_VERSION "${PACKAGE_VERSION}")
++
+ set(gRPC_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
+ set(gRPC_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
+ set(gRPC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
+@@ -841,6 +850,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET gpr PROPERTY VERSION ${CORE_VERSION})
++  set_property(TARGET gpr PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(gpr
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -1221,6 +1234,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc PROPERTY VERSION ${CORE_VERSION})
++  set_property(TARGET grpc PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -1535,6 +1552,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc_cronet PROPERTY VERSION ${CORE_VERSION})
++  set_property(TARGET grpc_cronet PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc_cronet
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -2377,6 +2398,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc_unsecure PROPERTY VERSION ${CORE_VERSION})
++  set_property(TARGET grpc_unsecure PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc_unsecure
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -2592,6 +2617,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc++ PROPERTY VERSION ${CPP_VERSION})
++  set_property(TARGET grpc++ PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc++
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -3078,6 +3107,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc++_cronet PROPERTY VERSION ${CPP_VERSION})
++  set_property(TARGET grpc++_cronet PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc++_cronet
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -3282,6 +3315,11 @@ protobuf_generate_grpc_cpp(
+   src/proto/grpc/status/status.proto
+ )
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc++_error_details PROPERTY VERSION ${CPP_VERSION})
++  set_property(TARGET grpc++_error_details PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
++endif()
++
+ target_include_directories(grpc++_error_details
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+   PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+@@ -3408,6 +3446,11 @@ protobuf_generate_grpc_cpp(
+   src/proto/grpc/reflection/v1alpha/reflection.proto
+ )
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc++_reflection PROPERTY VERSION ${CPP_VERSION})
++  set_property(TARGET grpc++_reflection PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
++endif()
++
+ target_include_directories(grpc++_reflection
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+   PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+@@ -3827,6 +3870,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc++_unsecure PROPERTY VERSION ${CPP_VERSION})
++  set_property(TARGET grpc++_unsecure PROPERTY SOVERSION ${CPP_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc++_unsecure
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -4140,6 +4187,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc_plugin_support PROPERTY VERSION ${CORE_VERSION})
++  set_property(TARGET grpc_plugin_support PROPERTY SOVERSION ${CORE_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc_plugin_support
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+@@ -4649,6 +4700,10 @@ if(WIN32 AND MSVC)
+   endif()
+ endif()
+ 
++if(_gRPC_PLATFORM_LINUX)
++  set_property(TARGET grpc_csharp_ext PROPERTY VERSION ${CSHARP_VERSION})
++  set_property(TARGET grpc_csharp_ext PROPERTY SOVERSION ${CSHARP_VERSION_MAJOR})
++endif()
+ 
+ target_include_directories(grpc_csharp_ext
+   PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+diff --git a/CMakeLists.txt b/CMakeLists.txt.orig
+similarity index 100%
+copy from CMakeLists.txt
+copy to CMakeLists.txt.orig
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch
new file mode 100644
index 0000000..8985022
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch
@@ -0,0 +1,42 @@
+From a498b56ba96948015f0f2784b2ab8296946716ee Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 1 Feb 2018 23:28:17 -0800
+Subject: [PATCH 4/4] CMakeLists.txt: Find c-ares in target sysroot alone
+
+Current code lets it look into native sysroot as well
+which is then preferred during cross compile and it adds
+absolute path to libcares into linker flags
+on heterogenous architectures linker complains and build
+fails
+
+| /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/grpc/1.8.5-r0/recipe-sysroot-native/usr/lib/lib
+cares.so.2.2.0: file not recognized: File format not recognized
+| collect2: error: ld returned 1 exit status
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ CMakeLists.txt | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1d7eef1..058423d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -153,10 +153,8 @@ if("${gRPC_CARES_PROVIDER}" STREQUAL "module")
+     set(gRPC_INSTALL FALSE)
+   endif()
+ elseif("${gRPC_CARES_PROVIDER}" STREQUAL "package")
+-  find_package(c-ares REQUIRED CONFIG)
+-  if(TARGET c-ares::cares)
+-    set(_gRPC_CARES_LIBRARIES c-ares::cares)
+-  endif()
++  find_package(c-ares REQUIRED)
++  set(_gRPC_CARES_LIBRARIES cares)
+   set(_gRPC_FIND_CARES "if(NOT c-ares_FOUND)\n  find_package(c-ares CONFIG)\nendif()")
+ endif()
+ 
+-- 
+2.16.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb
new file mode 100644
index 0000000..0883ec1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.8.5.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "A high performance, open source, general-purpose RPC framework. \
+Provides gRPC libraries for multiple languages written on top of shared C core library \
+(C++, Node.js, Python, Ruby, Objective-C, PHP, C#)"
+HOMEPAGE = "https://github.com/grpc/grpc"
+SECTION = "libs"
+LICENSE = "Apache-2"
+
+DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native openssl"
+DEPENDS_append_class-target = " gtest grpc-native "
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/grpc/grpc/archive/v${PV}.tar.gz \
+           file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \
+           file://0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch \
+           "
+SRC_URI[md5sum] = "b565fa6787e42f4969395870c2ad436e"
+SRC_URI[sha256sum] = "df9168da760fd2ee970c74c9d1b63377e0024be248deaa844e784d0df47599de"
+
+SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch"
+
+inherit cmake
+
+EXTRA_OECMAKE = " \
+    -DgRPC_CARES_PROVIDER=package \
+    -DgRPC_ZLIB_PROVIDER=package \
+    -DgRPC_SSL_PROVIDER=package \
+    -DgRPC_PROTOBUF_PROVIDER=package \
+    -DgRPC_GFLAGS_PROVIDER=package \
+    -DgRPC_INSTALL=1 \
+    -DBUILD_SHARED_LIBS=ON \
+    "
+
+FILES_${PN}-dev += "${libdir}/cmake"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.3.bb
deleted file mode 100644
index b7a02ef..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.3.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "JSON C++ lib used to read and write json file."
-DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
-               and writer in C++. JSON (JavaScript Object Notation) is a \
-               lightweight data-interchange format. It is easy for humans to \
-               read and write. It is easy for machines to parse and generate."
-
-HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
-
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
-
-SRCREV = "2de18021fcb11370e9b5a1fbe7dcfd673533a134"
-SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.4.bb
new file mode 100644
index 0000000..88e3320
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.8.4.bb
@@ -0,0 +1,21 @@
+SUMMARY = "JSON C++ lib used to read and write json file."
+DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
+               and writer in C++. JSON (JavaScript Object Notation) is a \
+               lightweight data-interchange format. It is easy for humans to \
+               read and write. It is easy for machines to parse and generate."
+
+HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
+
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
+
+SRCREV = "ddabf50f72cf369bf652a95c4d9fe31a1865a781"
+SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb
index 43eff72..267c0e7 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb
@@ -50,3 +50,5 @@
 FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibRcf.cmake"
 
 BBCLASSEXTEND = "nativesdk"
+
+PNBLACKLIST[librcf] = " error: invalid use of incomplete type 'RCF::AsioIoService {aka class boost::asio::io_service}; among others?" 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb
index 73c3811..1d69b3c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb
@@ -53,6 +53,7 @@
     \
     'PREFIX=${prefix}' \
     'MULTILIB=${baselib}' \
+    'LDCONFIG=:' \
 "
 
 do_compile () {
@@ -90,3 +91,5 @@
 "
 FILES_luajit-common = "${datadir}/${BPN}-${PV}"
 
+# Aarch64 is not supported in this release 
+COMPATIBLE_HOST = "^(?!aarch64).*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/files/mercurial-CVE-2017-9462.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/files/mercurial-CVE-2017-9462.patch
deleted file mode 100644
index 3564661..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/files/mercurial-CVE-2017-9462.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-# HG changeset patch
-# User Augie Fackler <augie@google.com>
-# Date 1492021435 25200
-#      Wed Apr 12 11:23:55 2017 -0700
-# Branch stable
-# Node ID 77eaf9539499a1b8be259ffe7ada787d07857f80
-# Parent  68f263f52d2e3e2798b4f1e55cb665c6b043f93b
-dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
-
-Some shared-ssh installations assume that 'hg serve --stdio' is a safe
-command to run for minimally trusted users. Unfortunately, the messy
-implementation of argument parsing here meant that trying to access a
-repo named '--debugger' would give the user a pdb prompt, thereby
-sidestepping any hoped-for sandboxing. Serving repositories over HTTP(S)
-is unaffected.
-
-We're not currently hardening any subcommands other than 'serve'. If
-your service exposes other commands to users with arbitrary repository
-names, it is imperative that you defend against repository names of
-'--debugger' and anything starting with '--config'.
-
-The read-only mode of hg-ssh stopped working because it provided its hook
-configuration to "hg serve --stdio" via --config parameter. This is banned for
-security reasons now. This patch switches it to directly call ui.setconfig().
-If your custom hosting infrastructure relies on passing --config to
-"hg serve --stdio", you'll need to find a different way to get that configuration
-into Mercurial, either by using ui.setconfig() as hg-ssh does in this patch,
-or by placing an hgrc file someplace where Mercurial will read it.
-
-mitrandir@fb.com provided some extra fixes for the dispatch code and
-for hg-ssh in places that I overlooked.
-
-CVE: CVE-2017-9462
-
-Upstream-Status: Backport
-
-diff --git a/contrib/hg-ssh b/contrib/hg-ssh
---- a/contrib/hg-ssh
-+++ b/contrib/hg-ssh
-@@ -32,7 +32,7 @@
- # enable importing on demand to reduce startup time
- from mercurial import demandimport; demandimport.enable()
- 
--from mercurial import dispatch
-+from mercurial import dispatch, ui as uimod
- 
- import sys, os, shlex
- 
-@@ -61,14 +61,15 @@
-         repo = os.path.normpath(os.path.join(cwd, os.path.expanduser(path)))
-         if repo in allowed_paths:
-             cmd = ['-R', repo, 'serve', '--stdio']
-+            req = dispatch.request(cmd)
-             if readonly:
--                cmd += [
--                    '--config',
--                    'hooks.pretxnopen.hg-ssh=python:__main__.rejectpush',
--                    '--config',
--                    'hooks.prepushkey.hg-ssh=python:__main__.rejectpush'
--                    ]
--            dispatch.dispatch(dispatch.request(cmd))
-+                if not req.ui:
-+                    req.ui = uimod.ui.load()
-+                req.ui.setconfig('hooks', 'pretxnopen.hg-ssh',
-+                                 'python:__main__.rejectpush', 'hg-ssh')
-+                req.ui.setconfig('hooks', 'prepushkey.hg-ssh',
-+                                 'python:__main__.rejectpush', 'hg-ssh')
-+            dispatch.dispatch(req)
-         else:
-             sys.stderr.write('Illegal repository "%s"\n' % repo)
-             sys.exit(255)
-diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
---- a/mercurial/dispatch.py
-+++ b/mercurial/dispatch.py
-@@ -155,6 +155,37 @@
-         pass # happens if called in a thread
- 
-     def _runcatchfunc():
-+        realcmd = None
-+        try:
-+            cmdargs = fancyopts.fancyopts(req.args[:], commands.globalopts, {})
-+            cmd = cmdargs[0]
-+            aliases, entry = cmdutil.findcmd(cmd, commands.table, False)
-+            realcmd = aliases[0]
-+        except (error.UnknownCommand, error.AmbiguousCommand,
-+                IndexError, getopt.GetoptError):
-+            # Don't handle this here. We know the command is
-+            # invalid, but all we're worried about for now is that
-+            # it's not a command that server operators expect to
-+            # be safe to offer to users in a sandbox.
-+            pass
-+        if realcmd == 'serve' and '--stdio' in cmdargs:
-+            # We want to constrain 'hg serve --stdio' instances pretty
-+            # closely, as many shared-ssh access tools want to grant
-+            # access to run *only* 'hg -R $repo serve --stdio'. We
-+            # restrict to exactly that set of arguments, and prohibit
-+            # any repo name that starts with '--' to prevent
-+            # shenanigans wherein a user does something like pass
-+            # --debugger or --config=ui.debugger=1 as a repo
-+            # name. This used to actually run the debugger.
-+            if (len(req.args) != 4 or
-+                req.args[0] != '-R' or
-+                req.args[1].startswith('--') or
-+                req.args[2] != 'serve' or
-+                req.args[3] != '--stdio'):
-+                raise error.Abort(
-+                    _('potentially unsafe serve --stdio invocation: %r') %
-+                    (req.args,))
-+
-         try:
-             debugger = 'pdb'
-             debugtrace = {
-diff --git a/tests/test-ssh.t b/tests/test-ssh.t
---- a/tests/test-ssh.t
-+++ b/tests/test-ssh.t
-@@ -357,6 +357,19 @@
-   abort: destination 'a repo' is not empty
-   [255]
- 
-+Make sure hg is really paranoid in serve --stdio mode. It used to be
-+possible to get a debugger REPL by specifying a repo named --debugger.
-+  $ hg -R --debugger serve --stdio
-+  abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio']
-+  [255]
-+  $ hg -R --config=ui.debugger=yes serve --stdio
-+  abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio']
-+  [255]
-+Abbreviations of 'serve' also don't work, to avoid shenanigans.
-+  $ hg -R narf serv --stdio
-+  abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio']
-+  [255]
-+
- Test hg-ssh using a helper script that will restore PYTHONPATH (which might
- have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
- parameters:
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial-native_4.0.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial-native_4.0.1.bb
deleted file mode 100644
index a08acd9..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial-native_4.0.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "The Mercurial distributed SCM"
-HOMEPAGE = "http://mercurial.selenic.com/"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "python-native"
-
-SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz \
-           file://mercurial-CVE-2017-9462.patch \
-"
-SRC_URI[md5sum] = "22a9b1d7c0c06a53f0ae5b386d536d08"
-SRC_URI[sha256sum] = "6aa4ade93c1b5e11937820880a466ebf1c824086d443cd799fc46e2617250d40"
-
-S = "${WORKDIR}/mercurial-${PV}"
-
-inherit native
-
-EXTRA_OEMAKE = "STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \
-    PREFIX=${prefix}"
-
-do_configure_append () {
-    sed -i -e 's:PYTHON=python:PYTHON=${STAGING_BINDIR_NATIVE}/python-native/python:g' ${S}/Makefile
-}
-
-do_install () {
-    oe_runmake -e install-bin DESTDIR=${D} PREFIX=${prefix}
-}
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_4.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_4.4.bb
new file mode 100644
index 0000000..9052497
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mercurial/mercurial_4.4.bb
@@ -0,0 +1,31 @@
+SUMMARY = "The Mercurial distributed SCM"
+HOMEPAGE = "http://mercurial.selenic.com/"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "python python-native"
+DEPENDS_class-native = "python-native"
+RDEPENDS_${PN} = "python python-modules"
+
+inherit python-dir
+
+SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz"
+SRC_URI[md5sum] = "c1d9fad1b7ed7077b0d4ae82e71154db"
+SRC_URI[sha256sum] = "234af4a67565c85923b0a1910c704ab44bcf12f69b85532687208776563d87de"
+
+S = "${WORKDIR}/mercurial-${PV}"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OEMAKE = "STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \
+    PREFIX=${prefix}"
+
+do_configure_append () {
+    sed -i -e 's:PYTHON=python:PYTHON=${STAGING_BINDIR_NATIVE}/python-native/python:g' ${S}/Makefile
+}
+
+do_install () {
+    oe_runmake -e install-bin DESTDIR=${D} PREFIX=${prefix}
+}
+
+FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson/native_bindir.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
deleted file mode 100644
index 993e975..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-There are some discussions upstream to merge this patch, but I presonaly believe
-that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
-
-Upstream-Status: Inappropriate [OE specific]
-Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
-index 04a22f985941..3e33bc4a79e7 100644
---- a/mesonbuild/dependencies.py
-+++ b/mesonbuild/dependencies.py
-@@ -95,7 +95,7 @@ class Dependency:
-     def need_threads(self):
-         return False
- 
--    def get_pkgconfig_variable(self, variable_name):
-+    def get_pkgconfig_variable(self, variable_name, use_native=False):
-         raise MesonException('Tried to get a pkg-config variable from a non-pkgconfig dependency.')
- 
- class InternalDependency(Dependency):
-@@ -224,8 +224,12 @@ class PkgConfigDependency(Dependency):
-         return s.format(self.__class__.__name__, self.name, self.is_found,
-                         self.version_reqs)
- 
--    def _call_pkgbin(self, args):
--        p, out = Popen_safe([self.pkgbin] + args, env=os.environ)[0:2]
-+    def _call_pkgbin(self, args, use_native=False):
-+        if use_native:
-+            pkgbin = [self.pkgbin + "-native"]
-+        else:
-+            pkgbin = [self.pkgbin]
-+        p, out = Popen_safe(pkgbin + args, env=os.environ)[0:2]
-         return p.returncode, out.strip()
- 
-     def _set_cargs(self):
-@@ -259,8 +263,8 @@ class PkgConfigDependency(Dependency):
-                 self.is_libtool = True
-             self.libs.append(lib)
- 
--    def get_pkgconfig_variable(self, variable_name):
--        ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name])
-+    def get_pkgconfig_variable(self, variable_name, use_native=False):
-+        ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name], use_native=use_native)
-         variable = ''
-         if ret != 0:
-             if self.required:
-@@ -1091,7 +1095,7 @@ class QtBaseDependency(Dependency):
-         self.bindir = self.get_pkgconfig_host_bins(core)
-         if not self.bindir:
-             # If exec_prefix is not defined, the pkg-config file is broken
--            prefix = core.get_pkgconfig_variable('exec_prefix')
-+            prefix = core.get_pkgconfig_variable('exec_prefix', use_native=True)
-             if prefix:
-                 self.bindir = os.path.join(prefix, 'bin')
- 
-@@ -1202,7 +1206,7 @@ class Qt5Dependency(QtBaseDependency):
-         QtBaseDependency.__init__(self, 'qt5', env, kwargs)
- 
-     def get_pkgconfig_host_bins(self, core):
--        return core.get_pkgconfig_variable('host_bins')
-+        return core.get_pkgconfig_variable('host_bins', use_native=True)
- 
- class Qt4Dependency(QtBaseDependency):
-     def __init__(self, env, kwargs):
-@@ -1216,7 +1220,7 @@ class Qt4Dependency(QtBaseDependency):
-         applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
-         for application in applications:
-             try:
--                return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application))
-+                return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, use_native=True))
-             except MesonException:
-                 pass
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.40.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.40.1.bb
deleted file mode 100644
index 14644ba..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/meson/meson_0.40.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-HOMEPAGE = "http://mesonbuild.com"
-SUMMARY = "A high performance build system"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
-
-SRC_URI = " \
-    git://github.com/mesonbuild/meson.git \
-    file://native_bindir.patch \
-"
-
-SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240"
-
-S = "${WORKDIR}/git"
-
-inherit setuptools3
-
-RDEPENDS_${PN} = "ninja python3-core python3-modules"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb
index 4a2c377..51b313c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/mpich/mpich_3.2.bb
@@ -31,6 +31,11 @@
 inherit autotools-brokensep gettext
 
 do_configure_prepend() {
+    for d in confdb test/mpi/confdb src/openpa/confdb src/pm/hydra/confdb src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb src/mpl/confdb src/mpi/romio/confdb;  do
+        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d
+        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d
+    done
+
     autoreconf --verbose --install --force -I . -I confdb/ -I maint/
     oe_runconf
     exit
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Fix-Werror-class-memaccess.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Fix-Werror-class-memaccess.patch
new file mode 100644
index 0000000..b0d772d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Fix-Werror-class-memaccess.patch
@@ -0,0 +1,35 @@
+From a05d92ae85024d0648f69f95307a1d3e8e51109c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 1 Apr 2018 19:55:38 -0700
+Subject: [PATCH] Fix -Werror=class-memaccess
+
+Casting to void* make gcc happy since its upset about
+object types and rightly so
+
+Fixes
+
+'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'struct msgpack::v2::object' from an array of 'const msgpack_object' {aka 'const struct msgpack_object'} [-Werror=class-memaccess]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/msgpack/msgpack-c/pull/659]
+
+ include/msgpack/v1/object.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/msgpack/v1/object.hpp b/include/msgpack/v1/object.hpp
+index 64da8c53..9721f705 100644
+--- a/include/msgpack/v1/object.hpp
++++ b/include/msgpack/v1/object.hpp
+@@ -661,7 +661,7 @@ inline object::object(const msgpack_object& o)
+ inline void operator<< (msgpack::object& o, const msgpack_object& v)
+ {
+     // FIXME beter way?
+-    std::memcpy(&o, &v, sizeof(v));
++    std::memcpy(static_cast<void*>(&o), &v, sizeof(v));
+ }
+ 
+ inline object::operator msgpack_object() const
+-- 
+2.16.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb
index d9f6956..02c0cd2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb
@@ -9,9 +9,10 @@
 
 PV .= "+git${SRCPV}"
 
-SRCREV = "7a98138f27f27290e680bf8fbf1f8d1b089bf138"
+SRCREV = "208595b2620cf6260ce3d6d4cf8543f13b206449"
 
 SRC_URI = "git://github.com/msgpack/msgpack-c \
+           file://0001-Fix-Werror-class-memaccess.patch \
            "
 
 inherit cmake pkgconfig
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
deleted file mode 100644
index 324a468..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From c2aff16cc196a61f4ab1cdae4a91c7926123c239 Mon Sep 17 00:00:00 2001
-From: Zuzana Svetlikova <zsvetlik@redhat.com>
-Date: Thu, 27 Apr 2017 14:25:42 +0200
-Subject: [PATCH] Disable running gyp on shared deps
-
----
- Makefile | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 0a217bd893..e1229ad07f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -79,10 +79,9 @@ $(NODE_G_EXE): config.gypi out/Makefile
- 	$(MAKE) -C out BUILDTYPE=Debug V=$(V)
- 	if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
- 
--out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
--              deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
--              deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp \
--              config.gypi
-+out/Makefile: common.gypi deps/http_parser/http_parser.gyp \
-+              deps/v8/gypfiles/toolchain.gypi deps/v8/gypfiles/features.gypi \
-+			  deps/v8/src/v8.gyp node.gyp config.gypi
- 	$(PYTHON) tools/gyp_node.py -f make
- 
- config.gypi: configure
--- 
-2.12.2
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/no-registry.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/no-registry.patch
deleted file mode 100644
index ed24738..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/no-registry.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Bugfix for --no-registry in nodejs-v0.12.2
-
-diff -u -r node-v0.12.2_def/deps/npm/lib/cache/caching-client.js node-v0.12.2/deps/npm/lib/cache/caching-client.js
---- node-v0.12.2_def/deps/npm/lib/cache/caching-client.js	2015-04-01 01:13:01.000000000 +0300
-+++ node-v0.12.2/deps/npm/lib/cache/caching-client.js	2015-05-18 00:47:10.738599686 +0300
-@@ -67,6 +67,22 @@
-   var cacheBase = cacheFile(npm.config.get("cache"))(uri)
-   var cachePath = path.join(cacheBase, ".cache.json")
- 
-+  if (parsed.host === "noregistry") (function() {
-+    var stat = null
-+    var file = npm.config.get("cache") + parsed.pathname + "/.cache.json"
-+    try {
-+      stat = fs.statSync(cachePath)
-+    } catch (ex) {}
-+    if (!stat) try {
-+      stat = fs.statSync(file) 
-+      cachePath = file
-+    } catch (ex) {
-+      stat = "Registry not defined and registry files not found: \"" +
-+             cachePath + "\", \"" + file + "\"."
-+      throw new Error(stat)
-+    }
-+  })()
-+
-   // If the GET is part of a write operation (PUT or DELETE), then
-   // skip past the cache entirely, but still save the results.
-   if (uri.match(/\?write=true$/)) {
-@@ -83,12 +99,17 @@
-         }
-         catch (ex) {
-           data = null
-+          if (parsed.host === "noregistry")
-+            throw new Error("File \"" + cachePath+"\"" + " corrupted.")
-         }
- 
-         params.stat = stat
-         params.data = data
- 
--        get_.call(client, uri, cachePath, params, cb)
-+        if (parsed.host === "noregistry")
-+          cb(null, data, JSON.stringify(data), { statusCode : 304 })
-+        else
-+          get_.call(client, uri, cachePath, params, cb)
-       })
-     }
-     else {
-diff -u -r node-v0.12.2_def/deps/npm/lib/utils/map-to-registry.js node-v0.12.2/deps/npm/lib/utils/map-to-registry.js
---- node-v0.12.2_def/deps/npm/lib/utils/map-to-registry.js	2015-04-01 01:13:01.000000000 +0300
-+++ node-v0.12.2/deps/npm/lib/utils/map-to-registry.js	2015-05-18 01:15:10.030569613 +0300
-@@ -45,6 +45,8 @@
- 
-   log.silly("mapToRegistry", "registry", registry)
- 
-+  if (!registry) return cb(null, "http://noregistry/" + name, {})
-+
-   var auth = config.getCredentialsByURI(registry)
- 
-   // normalize registry URL so resolution doesn't drop a piece of registry URL
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb
deleted file mode 100644
index 5bcbc00..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb
+++ /dev/null
@@ -1,89 +0,0 @@
-DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
-HOMEPAGE = "http://nodejs.org"
-LICENSE = "MIT & BSD & Artistic-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e4d35c6120f175e1fbe5ff908b1cf2d6"
-
-DEPENDS = "openssl10 zlib"
-
-COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
-COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
-COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
-
-SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
-           file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
-"
-SRC_URI[md5sum] = "e6c85c83001340b30671e9432e1bd337"
-SRC_URI[sha256sum] = "5d5aa2a101dcc617231a475812eb8ed87cac21491f1dcc7997b9dd463563f361"
-
-S = "${WORKDIR}/node-v${PV}"
-
-# v8 errors out if you have set CCACHE
-CCACHE = ""
-
-def map_nodejs_arch(a, d):
-    import re
-
-    if   re.match('i.86$', a): return 'ia32'
-    elif re.match('x86_64$', a): return 'x64'
-    elif re.match('aarch64$', a): return 'arm64'
-    elif re.match('powerpc64$', a): return 'ppc64'
-    elif re.match('powerpc$', a): return 'ppc'
-    return a
-
-ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
-                 ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
-                    bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
-                    bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
-                    '--with-arm-fpu=vfp', d), d), d)}"
-GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
-ARCHFLAGS ?= ""
-
-# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
-do_configure () {
-    rm -rf ${S}/deps/openssl
-    export LD="${CXX}"
-    GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
-    # $TARGET_ARCH settings don't match --dest-cpu settings
-   ./configure --prefix=${prefix} --without-intl --without-snapshot --shared-openssl --shared-zlib \
-               --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
-               --dest-os=linux \
-               ${ARCHFLAGS}
-}
-
-do_compile () {
-    export LD="${CXX}"
-    oe_runmake BUILDTYPE=Release
-}
-
-do_install () {
-    oe_runmake install DESTDIR=${D}
-}
-
-do_install_append_class-native() {
-    # use node from PATH instead of absolute path to sysroot
-    # node-v0.10.25/tools/install.py is using:
-    # shebang = os.path.join(node_prefix, 'bin/node')
-    # update_shebang(link_path, shebang)
-    # and node_prefix can be very long path to bindir in native sysroot and
-    # when it exceeds 128 character shebang limit it's stripped to incorrect path
-    # and npm fails to execute like in this case with 133 characters show in log.do_install:
-    # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node
-    # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
-    # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
-    # npm-cli.js continues to use old shebang
-    sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
-}
-
-do_install_append_class-target() {
-    sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
-}
-
-PACKAGES =+ "${PN}-npm"
-FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
-RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils"
-
-PACKAGES =+ "${PN}-systemtap"
-FILES_${PN}-systemtap = "${datadir}/systemtap"
-
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.9.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.9.4.bb
new file mode 100644
index 0000000..8930cd9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_8.9.4.bb
@@ -0,0 +1,90 @@
+DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
+HOMEPAGE = "http://nodejs.org"
+LICENSE = "MIT & BSD & Artistic-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=270f7477a1705f7cd3e29d3d4512915d"
+
+DEPENDS = "openssl10 zlib"
+
+COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
+COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
+COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
+
+SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
+           file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
+"
+SRC_URI[md5sum] = "631ed102fe58c13cf63bc92a68cf4759"
+SRC_URI[sha256sum] = "6cdcde9c9c1ca9f450a0b24eafa229ca759e576daa0fae892ce74d541ecdc86f"
+
+S = "${WORKDIR}/node-v${PV}"
+
+# v8 errors out if you have set CCACHE
+CCACHE = ""
+
+def map_nodejs_arch(a, d):
+    import re
+
+    if   re.match('i.86$', a): return 'ia32'
+    elif re.match('x86_64$', a): return 'x64'
+    elif re.match('aarch64$', a): return 'arm64'
+    elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64'
+    elif re.match('powerpc$', a): return 'ppc'
+    return a
+
+ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
+                 ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
+                    bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
+                    bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
+                    '--with-arm-fpu=vfp', d), d), d)}"
+GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
+ARCHFLAGS ?= ""
+
+# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
+do_configure () {
+    rm -rf ${S}/deps/openssl
+    export LD="${CXX}"
+    GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
+    # $TARGET_ARCH settings don't match --dest-cpu settings
+   ./configure --prefix=${prefix} --without-intl --without-snapshot --shared-openssl --shared-zlib \
+               --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
+               --dest-os=linux \
+               ${ARCHFLAGS}
+}
+
+do_compile () {
+    export LD="${CXX}"
+    oe_runmake BUILDTYPE=Release
+}
+
+do_install () {
+    oe_runmake install DESTDIR=${D}
+}
+
+do_install_append_class-native() {
+    # use node from PATH instead of absolute path to sysroot
+    # node-v0.10.25/tools/install.py is using:
+    # shebang = os.path.join(node_prefix, 'bin/node')
+    # update_shebang(link_path, shebang)
+    # and node_prefix can be very long path to bindir in native sysroot and
+    # when it exceeds 128 character shebang limit it's stripped to incorrect path
+    # and npm fails to execute like in this case with 133 characters show in log.do_install:
+    # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node
+    # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
+    # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
+    # npm-cli.js continues to use old shebang
+    sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+}
+
+do_install_append_class-target() {
+    sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+}
+
+PACKAGES =+ "${PN}-npm"
+FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
+RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils \
+    python-compiler python-misc python-multiprocessing"
+
+PACKAGES =+ "${PN}-systemtap"
+FILES_${PN}-systemtap = "${datadir}/systemtap"
+
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb
index 1be7f6a..53fc159 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/packagegroups/packagegroup-sdk-target.bb
@@ -4,7 +4,7 @@
 
 PR = "r1"
 
-inherit packagegroup allarch
+inherit packagegroup
 
 RPROVIDES_${PN} += "packagegroup-native-sdk"
 RREPLACES_${PN} += "packagegroup-native-sdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.94.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.94.bb
deleted file mode 100644
index 3b58939..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.94.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-DESCRIPTION = "\
-IPC::Run allows you run and interact with child processes \
-using files, pipes, and pseudo-ttys. Both system()-style and scripted \
-usages are supported and may be mixed. Likewise, functional and OO API \
-styles are both supported and may be mixed."
-HOMEPAGE = "https://metacpan.org/release/IPC-Run"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0ebd37caf53781e8b7223e6b99b63f4e"
-DEPENDS = "perl"
-
-SRC_URI = "git://github.com/toddr/IPC-Run.git"
-SRCREV = "6bdf41e276e06d23e140783b13a6eaef4745c216"
-
-S = "${WORKDIR}/git"
-
-inherit cpan
-
-EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-
-do_compile() {
-    export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
-    cpan_do_compile
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.96.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.96.bb
new file mode 100644
index 0000000..08c966d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/ipc-run_0.96.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "\
+IPC::Run allows you run and interact with child processes \
+using files, pipes, and pseudo-ttys. Both system()-style and scripted \
+usages are supported and may be mixed. Likewise, functional and OO API \
+styles are both supported and may be mixed."
+HOMEPAGE = "https://metacpan.org/release/IPC-Run"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0ebd37caf53781e8b7223e6b99b63f4e"
+DEPENDS = "perl"
+
+SRC_URI = "git://github.com/toddr/IPC-Run.git"
+SRCREV = "96066366ac8c401dff9c979d04f25dc8219ffcc1"
+
+S = "${WORKDIR}/git"
+
+inherit cpan
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
+
+do_compile() {
+    export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+    cpan_do_compile
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.036.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.036.bb
deleted file mode 100644
index f5dbef2..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.036.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "A Perl DBI driver for MySQL"
-DESCRIPTION = "DBD::mysql is the Perl5 Database Interface driver for \
-the MySQL database. In other words: DBD::mysql is an interface between \
-the Perl programming language and the MySQL programming API that comes \
-with the MySQL relational database management system. Most functions \
-provided by this programming API are supported. Some rarely used \
-functions are missing, mainly because no-one ever requested them. \
-"
-HOMEPAGE = "http://search.cpan.org/~michielb/DBD-mysql-4.036/lib/DBD/mysql.pm"
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-DEPENDS += "libdbi-perl-native libmysqlclient"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MI/MICHIELB/DBD-mysql-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "fdee1d8dc4ae54bc6cb7cd5a3f3d3342"
-SRC_URI[sha256sum] = "5c48a823f86b8110ccb6504c6176ca248b52f56829dd4548bc39c3509f4154cf"
-
-S = "${WORKDIR}/DBD-mysql-${PV}"
-
-inherit cpan
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.043.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.043.bb
new file mode 100644
index 0000000..bd8ba78
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.043.bb
@@ -0,0 +1,25 @@
+SUMMARY = "A Perl DBI driver for MySQL"
+DESCRIPTION = "DBD::mysql is the Perl5 Database Interface driver for \
+the MySQL database. In other words: DBD::mysql is an interface between \
+the Perl programming language and the MySQL programming API that comes \
+with the MySQL relational database management system. Most functions \
+provided by this programming API are supported. Some rarely used \
+functions are missing, mainly because no-one ever requested them. \
+"
+HOMEPAGE = "http://search.cpan.org/~michielb/DBD-mysql-4.036/lib/DBD/mysql.pm"
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+DEPENDS += "libdbi-perl-native libmysqlclient"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MI/MICHIELB/DBD-mysql-${PV}.tar.gz \
+"
+
+SRC_URI[md5sum] = "4a00dd7f1c057931147c65dfc4901c36"
+SRC_URI[sha256sum] = "629f865e8317f52602b2f2efd2b688002903d2e4bbcba5427cb6188b043d6f99"
+
+S = "${WORKDIR}/DBD-mysql-${PV}"
+
+inherit cpan
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.636.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.636.bb
deleted file mode 100644
index 085b904..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.636.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "The Perl Database Interface"
-DESCRIPTION = "DBI is a database access Application Programming Interface \
-(API) for the Perl Language. The DBI API Specification defines a set \
-of functions, variables and conventions that provide a consistent \
-database interface independent of the actual database being used. \
-"
-HOMEPAGE = "http://search.cpan.org/dist/DBI/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-RDEPENDS_${PN} = " perl-module-carp \
-                   perl-module-exporter \
-                   perl-module-exporter-heavy \
-                   perl-module-dynaloader \
-"
-
-LIC_FILES_CHKSUM = "file://DBI.pm;beginline=8147;endline=8151;md5=2e5f6cf47e5ad7b77dcb6172edc29292"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz"
-SRC_URI[md5sum] = "60f291e5f015550dde71d1858dfe93ba"
-SRC_URI[sha256sum] = "8f7ddce97c04b4b7a000e65e5d05f679c964d62c8b02c94c1a7d815bb2dd676c"
-
-S = "${WORKDIR}/DBI-${PV}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.641.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.641.bb
new file mode 100644
index 0000000..24a1245
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/perl/libdbi-perl_1.641.bb
@@ -0,0 +1,36 @@
+SUMMARY = "The Perl Database Interface"
+DESCRIPTION = "DBI is a database access Application Programming Interface \
+(API) for the Perl Language. The DBI API Specification defines a set \
+of functions, variables and conventions that provide a consistent \
+database interface independent of the actual database being used. \
+"
+HOMEPAGE = "http://search.cpan.org/dist/DBI/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+RDEPENDS_${PN} = " perl-module-carp \
+                   perl-module-exporter \
+                   perl-module-exporter-heavy \
+                   perl-module-dynaloader \
+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=10982c7148e0a012c0fd80534522f5c5"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz"
+SRC_URI[md5sum] = "e77fd37fcf77fc88fde029c1b75ded54"
+SRC_URI[sha256sum] = "5509e532cdd0e3d91eda550578deaac29e2f008a12b64576e8c261bb92e8c2c1"
+
+S = "${WORKDIR}/DBI-${PV}"
+
+inherit cpan ptest-perl
+
+do_install_prepend() {
+	# test requires "-T" (taint) command line option
+	rm -rf ${B}/t/pod-coverage.t
+	rm -rf ${B}/t/13taint.t
+	# source of test failure not obvious
+	rm -rf ${B}/t/85gofer.t
+	# unclear why there are several duplicates of tests in tarball
+	rm -rf ${B}/t/z*.t
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
deleted file mode 100644
index 39c334f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-[PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK
-
-Upstream-Status: Pending
-
-AC_TRY_RUN is not suitable for cross-compile
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- ext/fileinfo/config.m4 | 31 ++++++-------------------------
- 1 file changed, 6 insertions(+), 25 deletions(-)
-
-diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4
-index 7e98d62..8a8ea0e 100644
---- a/ext/fileinfo/config.m4
-+++ b/ext/fileinfo/config.m4
-@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then
-     libmagic/readcdf.c libmagic/softmagic.c"
- 
-   AC_MSG_CHECKING([for strcasestr])
--  AC_TRY_RUN([
--#include <string.h>
--#include <strings.h>
--#include <stdlib.h>
--
--int main(void)
--{
--        char *s0, *s1, *ret;
--
--        s0 = (char *) malloc(42);
--        s1 = (char *) malloc(8);
--
--        memset(s0, 'X', 42);
--        s0[24] = 'Y';
--        s0[26] = 'Z';
--        s0[41] = '\0';
--        memset(s1, 'x', 8);
--        s1[0] = 'y';
--        s1[2] = 'Z';
--        s1[7] = '\0';
--
--        ret = strcasestr(s0, s1);
--
--        return !(NULL != ret);
--}
-+  AC_TRY_COMPILE([
-+     #include <string.h>
-+     #include <strings.h>
-+     #include <stdlib.h>
-+  ],[
-+     strcasestr(NULL, NULL);
-   ],[
-     dnl using the platform implementation
-     AC_MSG_RESULT(yes)
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/0001-Specify-tag-with-libtool.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/0001-Specify-tag-with-libtool.patch
deleted file mode 100644
index 18b4937..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/0001-Specify-tag-with-libtool.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 5c84b039e97abd88f6a18da0e6d27383c00fea92 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 26 Jul 2017 23:06:56 -0700
-Subject: [PATCH] Specify --tag with libtool
-
-This helps in compiling with external toolchains
-with -fPIE appended to CC e.g. via hardening flags
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- acinclude.m4 | 8 ++++----
- configure.in | 4 ++--
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index a114a98..1cc7a26 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -806,10 +806,10 @@ dnl
- dnl PHP_BUILD_PROGRAM
- dnl
- AC_DEFUN([PHP_BUILD_PROGRAM],[
--  php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
-+  php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
-   php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
-   php_c_post=
--  php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
-+  php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
-   php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
-   php_cxx_post=
-   php_lo=lo
-@@ -819,10 +819,10 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[
-     no)  pic_setting='-prefer-non-pic';;
-   esac
- 
--  shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
-+  shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
-   shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
-   shared_c_post=
--  shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
-+  shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
-   shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
-   shared_cxx_post=
-   shared_lo=lo
-diff --git a/configure.in b/configure.in
-index 7d65b63..7221af9 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1431,8 +1431,8 @@ PHP_SET_LIBTOOL_VARIABLE([--silent])
- dnl libtool 1.4.3 needs this.
- PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps])
- 
--test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
--test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
-+test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --tag=CC --mode=compile $(COMPILE) -c $<'
-+test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --tag=CXX --mode=compile $(CXX_COMPILE) -c $<'
- SHARED_LIBTOOL='$(LIBTOOL)'
- 
- CC=$old_CC
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/CVE-2017-16642.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/CVE-2017-16642.patch
deleted file mode 100644
index 41d2a0f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/CVE-2017-16642.patch
+++ /dev/null
@@ -1,5241 +0,0 @@
-From f2f90767311355cafabff604a7a857ca60ee3f01 Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Wed, 22 Nov 2017 21:14:59 -0800
-Subject: [PATCH] Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian()
-
-Upstream-Status: Backport
-CVE: CVE-2017-16642
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- ext/date/lib/parse_date.c         | 1544 +++++++++++++++++++++----------------
- ext/date/lib/parse_date.re        |    4 +-
- ext/date/tests/bug53437_var3.phpt |    2 +-
- ext/wddx/tests/bug75055.phpt      |   20 +
- ext/wddx/tests/bug75055.wddx      |   13 +
- 5 files changed, 911 insertions(+), 672 deletions(-)
- create mode 100644 ext/wddx/tests/bug75055.phpt
- create mode 100644 ext/wddx/tests/bug75055.wddx
-
-diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
-index f929619..6b11418 100644
---- a/ext/date/lib/parse_date.c
-+++ b/ext/date/lib/parse_date.c
-@@ -1,4 +1,5 @@
--/* Generated by re2c 0.15.3 on Tue Jul  4 21:15:17 2017 */
-+/* Generated by re2c 0.15.3 on Wed Nov 22 21:14:47 2017 */
-+#line 1 "ext/date/lib/parse_date.re"
- /*
-  * The MIT License (MIT)
-  *
-@@ -837,9 +838,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
- std:
- 	s->tok = cursor;
- 	s->len = 0;
-+#line 965 "ext/date/lib/parse_date.re"
- 
- 
- 
-+#line 846 "ext/date/lib/parse_date.c"
- {
- 	YYCTYPE yych;
- 	unsigned int yyaccept = 0;
-@@ -962,18 +965,19 @@ yy2:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'D') goto yy165;
--			goto yy1521;
-+			goto yy1523;
- 		}
- 	} else {
- 		if (yych <= 'd') {
- 			if (yych <= 'Z') goto yy165;
- 			if (yych >= 'a') goto yy170;
- 		} else {
--			if (yych <= 'e') goto yy1530;
-+			if (yych <= 'e') goto yy1532;
- 			if (yych <= 'z') goto yy170;
- 		}
- 	}
- yy3:
-+#line 1673 "ext/date/lib/parse_date.re"
- 	{
- 		int tz_not_found;
- 		DEBUG_OUTPUT("tzcorrection | tz");
-@@ -986,6 +990,7 @@ yy3:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_TIMEZONE;
- 	}
-+#line 994 "ext/date/lib/parse_date.c"
- yy4:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'E') {
-@@ -995,7 +1000,7 @@ yy4:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'D') goto yy165;
--			goto yy1521;
-+			goto yy1523;
- 		}
- 	} else {
- 		if (yych <= 'd') {
-@@ -1003,7 +1008,7 @@ yy4:
- 			if (yych <= '`') goto yy3;
- 			goto yy165;
- 		} else {
--			if (yych <= 'e') goto yy1521;
-+			if (yych <= 'e') goto yy1523;
- 			if (yych <= 'z') goto yy165;
- 			goto yy3;
- 		}
-@@ -1017,12 +1022,12 @@ yy5:
- 			goto yy165;
- 		} else {
- 			if (yych <= 'H') {
--				if (yych <= 'E') goto yy1492;
-+				if (yych <= 'E') goto yy1494;
- 				goto yy165;
- 			} else {
--				if (yych <= 'I') goto yy1493;
-+				if (yych <= 'I') goto yy1495;
- 				if (yych <= 'N') goto yy165;
--				goto yy1491;
-+				goto yy1493;
- 			}
- 		}
- 	} else {
-@@ -1031,15 +1036,15 @@ yy5:
- 				if (yych <= 'Z') goto yy165;
- 				goto yy3;
- 			} else {
--				if (yych == 'e') goto yy1508;
-+				if (yych == 'e') goto yy1510;
- 				goto yy170;
- 			}
- 		} else {
- 			if (yych <= 'n') {
--				if (yych <= 'i') goto yy1509;
-+				if (yych <= 'i') goto yy1511;
- 				goto yy170;
- 			} else {
--				if (yych <= 'o') goto yy1507;
-+				if (yych <= 'o') goto yy1509;
- 				if (yych <= 'z') goto yy170;
- 				goto yy3;
- 			}
-@@ -1054,12 +1059,12 @@ yy6:
- 			goto yy165;
- 		} else {
- 			if (yych <= 'H') {
--				if (yych <= 'E') goto yy1492;
-+				if (yych <= 'E') goto yy1494;
- 				goto yy165;
- 			} else {
--				if (yych <= 'I') goto yy1493;
-+				if (yych <= 'I') goto yy1495;
- 				if (yych <= 'N') goto yy165;
--				goto yy1491;
-+				goto yy1493;
- 			}
- 		}
- 	} else {
-@@ -1068,15 +1073,15 @@ yy6:
- 				if (yych <= 'Z') goto yy165;
- 				goto yy3;
- 			} else {
--				if (yych == 'e') goto yy1492;
-+				if (yych == 'e') goto yy1494;
- 				goto yy165;
- 			}
- 		} else {
- 			if (yych <= 'n') {
--				if (yych <= 'i') goto yy1493;
-+				if (yych <= 'i') goto yy1495;
- 				goto yy165;
- 			} else {
--				if (yych <= 'o') goto yy1491;
-+				if (yych <= 'o') goto yy1493;
- 				if (yych <= 'z') goto yy165;
- 				goto yy3;
- 			}
-@@ -1088,24 +1093,24 @@ yy7:
- 		if (yych <= 'A') {
- 			if (yych == ')') goto yy164;
- 			if (yych <= '@') goto yy3;
--			goto yy1461;
-+			goto yy1463;
- 		} else {
--			if (yych == 'I') goto yy1462;
-+			if (yych == 'I') goto yy1464;
- 			if (yych <= 'N') goto yy165;
--			goto yy1463;
-+			goto yy1465;
- 		}
- 	} else {
- 		if (yych <= 'h') {
- 			if (yych <= 'Z') goto yy165;
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1476;
-+			if (yych <= 'a') goto yy1478;
- 			goto yy170;
- 		} else {
- 			if (yych <= 'n') {
--				if (yych <= 'i') goto yy1477;
-+				if (yych <= 'i') goto yy1479;
- 				goto yy170;
- 			} else {
--				if (yych <= 'o') goto yy1478;
-+				if (yych <= 'o') goto yy1480;
- 				if (yych <= 'z') goto yy170;
- 				goto yy3;
- 			}
-@@ -1117,24 +1122,24 @@ yy8:
- 		if (yych <= 'A') {
- 			if (yych == ')') goto yy164;
- 			if (yych <= '@') goto yy3;
--			goto yy1461;
-+			goto yy1463;
- 		} else {
--			if (yych == 'I') goto yy1462;
-+			if (yych == 'I') goto yy1464;
- 			if (yych <= 'N') goto yy165;
--			goto yy1463;
-+			goto yy1465;
- 		}
- 	} else {
- 		if (yych <= 'h') {
- 			if (yych <= 'Z') goto yy165;
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1461;
-+			if (yych <= 'a') goto yy1463;
- 			goto yy165;
- 		} else {
- 			if (yych <= 'n') {
--				if (yych <= 'i') goto yy1462;
-+				if (yych <= 'i') goto yy1464;
- 				goto yy165;
- 			} else {
--				if (yych <= 'o') goto yy1463;
-+				if (yych <= 'o') goto yy1465;
- 				if (yych <= 'z') goto yy165;
- 				goto yy3;
- 			}
-@@ -1146,15 +1151,15 @@ yy9:
- 	switch (yych) {
- 	case ')':	goto yy164;
- 	case '0':
--	case '1':	goto yy1391;
--	case '2':	goto yy1392;
-+	case '1':	goto yy1393;
-+	case '2':	goto yy1394;
- 	case '3':
- 	case '4':
- 	case '5':
- 	case '6':
- 	case '7':
- 	case '8':
--	case '9':	goto yy1393;
-+	case '9':	goto yy1395;
- 	case 'A':
- 	case 'B':
- 	case 'C':
-@@ -1176,11 +1181,11 @@ yy9:
- 	case 'X':
- 	case 'Y':
- 	case 'Z':	goto yy165;
--	case 'E':	goto yy1386;
--	case 'H':	goto yy1387;
--	case 'O':	goto yy1388;
--	case 'U':	goto yy1389;
--	case 'W':	goto yy1390;
-+	case 'E':	goto yy1388;
-+	case 'H':	goto yy1389;
-+	case 'O':	goto yy1390;
-+	case 'U':	goto yy1391;
-+	case 'W':	goto yy1392;
- 	case 'a':
- 	case 'b':
- 	case 'c':
-@@ -1202,11 +1207,11 @@ yy9:
- 	case 'x':
- 	case 'y':
- 	case 'z':	goto yy170;
--	case 'e':	goto yy1429;
--	case 'h':	goto yy1430;
--	case 'o':	goto yy1431;
--	case 'u':	goto yy1432;
--	case 'w':	goto yy1433;
-+	case 'e':	goto yy1431;
-+	case 'h':	goto yy1432;
-+	case 'o':	goto yy1433;
-+	case 'u':	goto yy1434;
-+	case 'w':	goto yy1435;
- 	default:	goto yy3;
- 	}
- yy10:
-@@ -1215,15 +1220,15 @@ yy10:
- 	switch (yych) {
- 	case ')':	goto yy164;
- 	case '0':
--	case '1':	goto yy1391;
--	case '2':	goto yy1392;
-+	case '1':	goto yy1393;
-+	case '2':	goto yy1394;
- 	case '3':
- 	case '4':
- 	case '5':
- 	case '6':
- 	case '7':
- 	case '8':
--	case '9':	goto yy1393;
-+	case '9':	goto yy1395;
- 	case 'A':
- 	case 'B':
- 	case 'C':
-@@ -1267,28 +1272,30 @@ yy10:
- 	case 'y':
- 	case 'z':	goto yy165;
- 	case 'E':
--	case 'e':	goto yy1386;
-+	case 'e':	goto yy1388;
- 	case 'H':
--	case 'h':	goto yy1387;
-+	case 'h':	goto yy1389;
- 	case 'O':
--	case 'o':	goto yy1388;
-+	case 'o':	goto yy1390;
- 	case 'U':
--	case 'u':	goto yy1389;
-+	case 'u':	goto yy1391;
- 	case 'W':
--	case 'w':	goto yy1390;
-+	case 'w':	goto yy1392;
- 	default:	goto yy3;
- 	}
- yy11:
- 	yyaccept = 1;
- 	yych = *(YYMARKER = ++YYCURSOR);
--	if (yych == '-') goto yy1374;
-+	if (yych == '-') goto yy1376;
- 	if (yych <= '/') goto yy12;
--	if (yych <= '9') goto yy1375;
-+	if (yych <= '9') goto yy1377;
- yy12:
-+#line 1768 "ext/date/lib/parse_date.re"
- 	{
- 		add_error(s, "Unexpected character");
- 		goto std;
- 	}
-+#line 1299 "ext/date/lib/parse_date.c"
- yy13:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'R') {
-@@ -1299,16 +1306,16 @@ yy13:
- 			} else {
- 				if (yych <= '@') goto yy3;
- 				if (yych <= 'D') goto yy165;
--				goto yy1310;
-+				goto yy1311;
- 			}
- 		} else {
- 			if (yych <= 'N') {
--				if (yych == 'I') goto yy1311;
-+				if (yych == 'I') goto yy1312;
- 				goto yy165;
- 			} else {
--				if (yych <= 'O') goto yy1312;
-+				if (yych <= 'O') goto yy1313;
- 				if (yych <= 'Q') goto yy165;
--				goto yy1313;
-+				goto yy1314;
- 			}
- 		}
- 	} else {
-@@ -1318,16 +1325,16 @@ yy13:
- 				if (yych <= '`') goto yy3;
- 				goto yy170;
- 			} else {
--				if (yych <= 'e') goto yy1351;
-+				if (yych <= 'e') goto yy1353;
- 				if (yych <= 'h') goto yy170;
--				goto yy1352;
-+				goto yy1354;
- 			}
- 		} else {
- 			if (yych <= 'q') {
--				if (yych == 'o') goto yy1353;
-+				if (yych == 'o') goto yy1355;
- 				goto yy170;
- 			} else {
--				if (yych <= 'r') goto yy1354;
-+				if (yych <= 'r') goto yy1356;
- 				if (yych <= 'z') goto yy170;
- 				goto yy3;
- 			}
-@@ -1343,16 +1350,16 @@ yy14:
- 			} else {
- 				if (yych <= '@') goto yy3;
- 				if (yych <= 'D') goto yy165;
--				goto yy1310;
-+				goto yy1311;
- 			}
- 		} else {
- 			if (yych <= 'N') {
--				if (yych == 'I') goto yy1311;
-+				if (yych == 'I') goto yy1312;
- 				goto yy165;
- 			} else {
--				if (yych <= 'O') goto yy1312;
-+				if (yych <= 'O') goto yy1313;
- 				if (yych <= 'Q') goto yy165;
--				goto yy1313;
-+				goto yy1314;
- 			}
- 		}
- 	} else {
-@@ -1362,16 +1369,16 @@ yy14:
- 				if (yych <= '`') goto yy3;
- 				goto yy165;
- 			} else {
--				if (yych <= 'e') goto yy1310;
-+				if (yych <= 'e') goto yy1311;
- 				if (yych <= 'h') goto yy165;
--				goto yy1311;
-+				goto yy1312;
- 			}
- 		} else {
- 			if (yych <= 'q') {
--				if (yych == 'o') goto yy1312;
-+				if (yych == 'o') goto yy1313;
- 				goto yy165;
- 			} else {
--				if (yych <= 'r') goto yy1313;
-+				if (yych <= 'r') goto yy1314;
- 				if (yych <= 'z') goto yy165;
- 				goto yy3;
- 			}
-@@ -1382,13 +1389,13 @@ yy15:
- 	if (yych <= 'A') {
- 		if (yych == ')') goto yy164;
- 		if (yych <= '@') goto yy3;
--		goto yy1296;
-+		goto yy1297;
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') goto yy165;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1307;
-+			if (yych <= 'a') goto yy1308;
- 			if (yych <= 'z') goto yy170;
- 			goto yy3;
- 		}
-@@ -1398,13 +1405,13 @@ yy16:
- 	if (yych <= 'A') {
- 		if (yych == ')') goto yy164;
- 		if (yych <= '@') goto yy3;
--		goto yy1296;
-+		goto yy1297;
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') goto yy165;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1296;
-+			if (yych <= 'a') goto yy1297;
- 			if (yych <= 'z') goto yy165;
- 			goto yy3;
- 		}
-@@ -1420,7 +1427,7 @@ yy17:
- 			if (yych <= 'Z') goto yy165;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1293;
-+			if (yych <= 'a') goto yy1294;
- 			if (yych <= 'z') goto yy170;
- 			goto yy3;
- 		}
-@@ -2495,18 +2502,22 @@ yy48:
- 	if (yych <= '/') goto yy49;
- 	if (yych <= '9') goto yy54;
- yy49:
-+#line 1757 "ext/date/lib/parse_date.re"
- 	{
- 		goto std;
- 	}
-+#line 2510 "ext/date/lib/parse_date.c"
- yy50:
- 	yych = *++YYCURSOR;
- 	goto yy49;
- yy51:
- 	++YYCURSOR;
-+#line 1762 "ext/date/lib/parse_date.re"
- 	{
- 		s->pos = cursor; s->line++;
- 		goto std;
- 	}
-+#line 2521 "ext/date/lib/parse_date.c"
- yy53:
- 	yych = *++YYCURSOR;
- 	goto yy12;
-@@ -2693,23 +2704,23 @@ yy56:
- 					}
- 				} else {
- 					if (yyaccept == 28) {
--						goto yy1377;
-+						goto yy1379;
- 					} else {
--						goto yy1415;
-+						goto yy1417;
- 					}
- 				}
- 			} else {
- 				if (yyaccept <= 31) {
- 					if (yyaccept == 30) {
--						goto yy1418;
-+						goto yy1420;
- 					} else {
--						goto yy1498;
-+						goto yy1500;
- 					}
- 				} else {
- 					if (yyaccept == 32) {
--						goto yy1506;
-+						goto yy1508;
- 					} else {
--						goto yy1529;
-+						goto yy1531;
- 					}
- 				}
- 			}
-@@ -2920,6 +2931,7 @@ yy73:
- 	if (yych == 'S') goto yy75;
- 	if (yych == 's') goto yy75;
- yy74:
-+#line 1741 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_ull i;
- 		DEBUG_OUTPUT("relative");
-@@ -2934,6 +2946,7 @@ yy74:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
-+#line 2950 "ext/date/lib/parse_date.c"
- yy75:
- 	yych = *++YYCURSOR;
- 	if (yych == 'D') goto yy76;
-@@ -3719,6 +3732,7 @@ yy190:
- 		}
- 	}
- yy191:
-+#line 1604 "ext/date/lib/parse_date.re"
- 	{
- 		const timelib_relunit* relunit;
- 		DEBUG_OUTPUT("daytext");
-@@ -3735,6 +3749,7 @@ yy191:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_WEEKDAY;
- 	}
-+#line 3753 "ext/date/lib/parse_date.c"
- yy192:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'K') {
-@@ -4227,6 +4242,7 @@ yy217:
- 		}
- 	}
- yy218:
-+#line 1663 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("monthtext");
- 		TIMELIB_INIT;
-@@ -4235,6 +4251,7 @@ yy218:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_TEXT;
- 	}
-+#line 4255 "ext/date/lib/parse_date.c"
- yy219:
- 	++YYCURSOR;
- 	if ((YYLIMIT - YYCURSOR) < 23) YYFILL(23);
-@@ -4469,6 +4486,7 @@ yy231:
- 	if (yych == 't') goto yy319;
- 	goto yy237;
- yy232:
-+#line 1409 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("datetextual | datenoyear");
-@@ -4481,6 +4499,7 @@ yy232:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_TEXT;
- 	}
-+#line 4503 "ext/date/lib/parse_date.c"
- yy233:
- 	yyaccept = 6;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -4593,6 +4612,7 @@ yy245:
- 		if (yych <= ':') goto yy248;
- 	}
- yy246:
-+#line 1711 "ext/date/lib/parse_date.re"
- 	{
- 		int tz_not_found;
- 		DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
-@@ -4621,6 +4641,7 @@ yy246:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_SHORTDATE_WITH_TIME;
- 	}
-+#line 4645 "ext/date/lib/parse_date.c"
- yy247:
- 	yyaccept = 7;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -4893,6 +4914,7 @@ yy269:
- 	}
- yy270:
- 	++YYCURSOR;
-+#line 1687 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
- 		TIMELIB_INIT;
-@@ -4915,6 +4937,7 @@ yy270:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_SHORTDATE_WITH_TIME;
- 	}
-+#line 4941 "ext/date/lib/parse_date.c"
- yy272:
- 	yych = *++YYCURSOR;
- 	if (yych <= 0x1F) {
-@@ -5470,6 +5493,7 @@ yy320:
- 	if (yych <= '/') goto yy56;
- 	if (yych >= ':') goto yy56;
- 	++YYCURSOR;
-+#line 1381 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("datenoday");
-@@ -5482,6 +5506,7 @@ yy320:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_NO_DAY;
- 	}
-+#line 5510 "ext/date/lib/parse_date.c"
- yy323:
- 	yych = *++YYCURSOR;
- 	if (yych <= '9') {
-@@ -5704,6 +5729,7 @@ yy327:
- 	if ((yych = *YYCURSOR) <= '/') goto yy330;
- 	if (yych <= '9') goto yy331;
- yy330:
-+#line 1525 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("pgtextshort");
-@@ -5716,6 +5742,7 @@ yy330:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_PG_TEXT;
- 	}
-+#line 5746 "ext/date/lib/parse_date.c"
- yy331:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy330;
-@@ -6270,6 +6297,7 @@ yy356:
- 		if (yych <= 'z') goto yy167;
- 	}
- yy357:
-+#line 1583 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("ago");
- 		TIMELIB_INIT;
-@@ -6289,6 +6317,7 @@ yy357:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_AGO;
- 	}
-+#line 6321 "ext/date/lib/parse_date.c"
- yy358:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -8009,6 +8038,7 @@ yy417:
- yy418:
- 	++YYCURSOR;
- yy419:
-+#line 1286 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
- 		TIMELIB_INIT;
-@@ -8019,6 +8049,7 @@ yy419:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_ISO_DATE;
- 	}
-+#line 8053 "ext/date/lib/parse_date.c"
- yy420:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -8641,6 +8672,7 @@ yy439:
- 		}
- 	}
- yy440:
-+#line 1423 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("datenoyearrev");
- 		TIMELIB_INIT;
-@@ -8651,6 +8683,7 @@ yy440:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_TEXT;
- 	}
-+#line 8687 "ext/date/lib/parse_date.c"
- yy441:
- 	yyaccept = 9;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -8778,6 +8811,7 @@ yy450:
- 	}
- yy452:
- 	++YYCURSOR;
-+#line 1141 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
- 		TIMELIB_INIT;
-@@ -8793,6 +8827,7 @@ yy452:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_TIME12;
- 	}
-+#line 8831 "ext/date/lib/parse_date.c"
- yy454:
- 	yyaccept = 10;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -8803,6 +8838,7 @@ yy454:
- 		if (yych <= ':') goto yy457;
- 	}
- yy455:
-+#line 1178 "ext/date/lib/parse_date.re"
- 	{
- 		int tz_not_found;
- 		DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
-@@ -8827,6 +8863,7 @@ yy455:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_TIME24_WITH_ZONE;
- 	}
-+#line 8867 "ext/date/lib/parse_date.c"
- yy456:
- 	yyaccept = 10;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -9103,6 +9140,7 @@ yy485:
- 	}
- yy487:
- 	++YYCURSOR;
-+#line 1158 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("mssqltime");
- 		TIMELIB_INIT;
-@@ -9121,6 +9159,7 @@ yy487:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_TIME24_WITH_ZONE;
- 	}
-+#line 9163 "ext/date/lib/parse_date.c"
- yy489:
- 	yyaccept = 10;
- 	YYMARKER = ++YYCURSOR;
-@@ -9215,6 +9254,7 @@ yy498:
- 	if ((yych = *YYCURSOR) <= '/') goto yy499;
- 	if (yych <= '9') goto yy505;
- yy499:
-+#line 1340 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("datefull");
-@@ -9228,6 +9268,7 @@ yy499:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_FULL;
- 	}
-+#line 9272 "ext/date/lib/parse_date.c"
- yy500:
- 	yych = *++YYCURSOR;
- 	if (yych == 'M') goto yy501;
-@@ -9891,6 +9932,7 @@ yy569:
- 	if (yych <= '/') goto yy56;
- 	if (yych >= ':') goto yy56;
- 	++YYCURSOR;
-+#line 1355 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("pointed date YYYY");
- 		TIMELIB_INIT;
-@@ -9901,6 +9943,7 @@ yy569:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_FULL_POINTED;
- 	}
-+#line 9947 "ext/date/lib/parse_date.c"
- yy572:
- 	yyaccept = 10;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -9931,6 +9974,7 @@ yy575:
- 	if (yych <= '/') goto yy576;
- 	if (yych <= '9') goto yy569;
- yy576:
-+#line 1367 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("pointed date YY");
-@@ -9943,6 +9987,7 @@ yy576:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_FULL_POINTED;
- 	}
-+#line 9991 "ext/date/lib/parse_date.c"
- yy577:
- 	yyaccept = 10;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -10538,6 +10583,7 @@ yy620:
- 		}
- 	}
- yy621:
-+#line 1326 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("gnudateshort");
-@@ -10550,6 +10596,7 @@ yy621:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_ISO_DATE;
- 	}
-+#line 10600 "ext/date/lib/parse_date.c"
- yy622:
- 	yyaccept = 12;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -10645,6 +10692,7 @@ yy630:
- 		}
- 	}
- yy631:
-+#line 1270 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("americanshort | american");
-@@ -10659,6 +10707,7 @@ yy631:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_AMERICAN;
- 	}
-+#line 10711 "ext/date/lib/parse_date.c"
- yy632:
- 	yyaccept = 13;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -10857,6 +10906,7 @@ yy664:
- 	if (yych <= '9') goto yy667;
- 	if (yych <= ':') goto yy668;
- yy665:
-+#line 1553 "ext/date/lib/parse_date.re"
- 	{
- 		int tz_not_found;
- 		DEBUG_OUTPUT("clf");
-@@ -10876,6 +10926,7 @@ yy665:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_CLF;
- 	}
-+#line 10930 "ext/date/lib/parse_date.c"
- yy666:
- 	yych = *++YYCURSOR;
- 	if (yych <= '5') {
-@@ -11362,6 +11413,7 @@ yy727:
- 		if (yych <= 't') goto yy627;
- 	}
- yy728:
-+#line 1298 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("iso8601date2");
-@@ -11374,6 +11426,7 @@ yy728:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_ISO_DATE;
- 	}
-+#line 11430 "ext/date/lib/parse_date.c"
- yy729:
- 	yych = *++YYCURSOR;
- 	if (yych == 'C') goto yy730;
-@@ -11404,6 +11457,7 @@ yy734:
- 	if (yych >= '2') goto yy56;
- yy735:
- 	++YYCURSOR;
-+#line 1539 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("pgtextreverse");
-@@ -11416,6 +11470,7 @@ yy735:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_PG_TEXT;
- 	}
-+#line 11474 "ext/date/lib/parse_date.c"
- yy737:
- 	yych = *++YYCURSOR;
- 	if (yych == 'V') goto yy730;
-@@ -11568,6 +11623,7 @@ yy747:
- 		}
- 	}
- yy748:
-+#line 1574 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("year4");
- 		TIMELIB_INIT;
-@@ -11575,6 +11631,7 @@ yy748:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_CLF;
- 	}
-+#line 11635 "ext/date/lib/parse_date.c"
- yy749:
- 	yych = *++YYCURSOR;
- 	switch (yych) {
-@@ -11769,6 +11826,7 @@ yy757:
- 		if (yych <= 'X') goto yy848;
- 	}
- yy758:
-+#line 1395 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("datenodayrev");
-@@ -11781,6 +11839,7 @@ yy758:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_NO_DAY;
- 	}
-+#line 11843 "ext/date/lib/parse_date.c"
- yy759:
- 	yych = *++YYCURSOR;
- 	if (yych == 'I') goto yy892;
-@@ -11980,6 +12039,7 @@ yy778:
- 	if (yych <= '/') goto yy779;
- 	if (yych <= '7') goto yy781;
- yy779:
-+#line 1506 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_sll w, d;
- 		DEBUG_OUTPUT("isoweek");
-@@ -11997,12 +12057,14 @@ yy779:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_ISO_WEEK;
- 	}
-+#line 12061 "ext/date/lib/parse_date.c"
- yy780:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy56;
- 	if (yych >= '8') goto yy56;
- yy781:
- 	++YYCURSOR;
-+#line 1487 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_sll w, d;
- 		DEBUG_OUTPUT("isoweekday");
-@@ -12020,6 +12082,7 @@ yy781:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_ISO_WEEK;
- 	}
-+#line 12086 "ext/date/lib/parse_date.c"
- yy783:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy60;
-@@ -12085,6 +12148,7 @@ yy785:
- 		}
- 	}
- yy786:
-+#line 1473 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("pgydotd");
-@@ -12097,6 +12161,7 @@ yy786:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_PG_YEARDAY;
- 	}
-+#line 12165 "ext/date/lib/parse_date.c"
- yy787:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy60;
-@@ -12178,6 +12243,7 @@ yy805:
- yy806:
- 	++YYCURSOR;
- yy807:
-+#line 1447 "ext/date/lib/parse_date.re"
- 	{
- 		int tz_not_found;
- 		DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
-@@ -12202,6 +12268,7 @@ yy807:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_XMLRPC_SOAP;
- 	}
-+#line 12272 "ext/date/lib/parse_date.c"
- yy808:
- 	yych = *++YYCURSOR;
- 	if (yych <= '2') {
-@@ -12490,6 +12557,7 @@ yy812:
- 		}
- 	}
- yy813:
-+#line 1435 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("datenocolon");
- 		TIMELIB_INIT;
-@@ -12500,6 +12568,7 @@ yy813:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_DATE_NOCOLON;
- 	}
-+#line 12572 "ext/date/lib/parse_date.c"
- yy814:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'H') {
-@@ -13293,6 +13362,7 @@ yy937:
- 	if (yych <= '/') goto yy938;
- 	if (yych <= '9') goto yy960;
- yy938:
-+#line 1312 "ext/date/lib/parse_date.re"
- 	{
- 		int length = 0;
- 		DEBUG_OUTPUT("gnudateshorter");
-@@ -13305,6 +13375,7 @@ yy938:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_ISO_DATE;
- 	}
-+#line 13379 "ext/date/lib/parse_date.c"
- yy939:
- 	yyaccept = 21;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -14303,6 +14374,7 @@ yy1030:
- 		}
- 	}
- yy1032:
-+#line 1204 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("gnunocolon");
- 		TIMELIB_INIT;
-@@ -14324,6 +14396,7 @@ yy1032:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_GNU_NOCOLON;
- 	}
-+#line 14400 "ext/date/lib/parse_date.c"
- yy1033:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy60;
-@@ -14413,6 +14486,7 @@ yy1039:
- 		}
- 	}
- yy1040:
-+#line 1250 "ext/date/lib/parse_date.re"
- 	{
- 		int tz_not_found;
- 		DEBUG_OUTPUT("iso8601nocolon");
-@@ -14431,6 +14505,7 @@ yy1040:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_ISO_NOCOLON;
- 	}
-+#line 14509 "ext/date/lib/parse_date.c"
- yy1041:
- 	yyaccept = 24;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -15362,6 +15437,7 @@ yy1083:
- 		}
- 	}
- yy1084:
-+#line 1646 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_sll i;
- 		int         behavior = 0;
-@@ -15377,6 +15453,7 @@ yy1084:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
-+#line 15457 "ext/date/lib/parse_date.c"
- yy1085:
- 	++YYCURSOR;
- 	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-@@ -15418,6 +15495,7 @@ yy1091:
- 	if (yych != 'f') goto yy56;
- yy1092:
- 	++YYCURSOR;
-+#line 1119 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_sll i;
- 		int         behavior = 0;
-@@ -15438,6 +15516,7 @@ yy1092:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_WEEK_DAY_OF_MONTH;
- 	}
-+#line 15520 "ext/date/lib/parse_date.c"
- yy1094:
- 	yyaccept = 25;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -15530,6 +15609,7 @@ yy1107:
- 		}
- 	}
- yy1108:
-+#line 1622 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_sll i;
- 		int         behavior = 0;
-@@ -15552,6 +15632,7 @@ yy1108:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
-+#line 15636 "ext/date/lib/parse_date.c"
- yy1109:
- 	yych = *++YYCURSOR;
- 	goto yy1084;
-@@ -18206,10 +18287,25 @@ yy1281:
- yy1283:
- 	yyaccept = 27;
- 	yych = *(YYMARKER = ++YYCURSOR);
--	if (yych <= '/') goto yy1287;
--	if (yych <= '9') goto yy1286;
--	goto yy1287;
-+	if (yych <= '@') {
-+		if (yych <= 0x1F) {
-+			if (yych == '\t') goto yy1287;
-+		} else {
-+			if (yych <= ' ') goto yy1287;
-+			if (yych <= '/') goto yy1284;
-+			if (yych <= '9') goto yy1286;
-+		}
-+	} else {
-+		if (yych <= '`') {
-+			if (yych <= 'A') goto yy1289;
-+			if (yych == 'P') goto yy1289;
-+		} else {
-+			if (yych <= 'a') goto yy1289;
-+			if (yych == 'p') goto yy1289;
-+		}
-+	}
- yy1284:
-+#line 1096 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("backof | frontof");
- 		TIMELIB_INIT;
-@@ -18231,66 +18327,104 @@ yy1284:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_LF_DAY_OF_MONTH;
- 	}
-+#line 18331 "ext/date/lib/parse_date.c"
- yy1285:
- 	yyaccept = 27;
- 	yych = *(YYMARKER = ++YYCURSOR);
--	if (yych <= '/') goto yy1287;
--	if (yych >= '5') goto yy1287;
-+	if (yych <= '@') {
-+		if (yych <= 0x1F) {
-+			if (yych == '\t') goto yy1287;
-+			goto yy1284;
-+		} else {
-+			if (yych <= ' ') goto yy1287;
-+			if (yych <= '/') goto yy1284;
-+			if (yych >= '5') goto yy1284;
-+		}
-+	} else {
-+		if (yych <= '`') {
-+			if (yych <= 'A') goto yy1289;
-+			if (yych == 'P') goto yy1289;
-+			goto yy1284;
-+		} else {
-+			if (yych <= 'a') goto yy1289;
-+			if (yych == 'p') goto yy1289;
-+			goto yy1284;
-+		}
-+	}
- yy1286:
- 	yyaccept = 27;
--	YYMARKER = ++YYCURSOR;
-+	yych = *(YYMARKER = ++YYCURSOR);
-+	if (yych <= 'A') {
-+		if (yych <= 0x1F) {
-+			if (yych != '\t') goto yy1284;
-+		} else {
-+			if (yych <= ' ') goto yy1287;
-+			if (yych <= '@') goto yy1284;
-+			goto yy1289;
-+		}
-+	} else {
-+		if (yych <= '`') {
-+			if (yych == 'P') goto yy1289;
-+			goto yy1284;
-+		} else {
-+			if (yych <= 'a') goto yy1289;
-+			if (yych == 'p') goto yy1289;
-+			goto yy1284;
-+		}
-+	}
-+yy1287:
-+	++YYCURSOR;
- 	if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
- 	yych = *YYCURSOR;
--yy1287:
- 	if (yych <= 'A') {
- 		if (yych <= 0x1F) {
--			if (yych == '\t') goto yy1286;
--			goto yy1284;
-+			if (yych == '\t') goto yy1287;
-+			goto yy56;
- 		} else {
--			if (yych <= ' ') goto yy1286;
--			if (yych <= '@') goto yy1284;
-+			if (yych <= ' ') goto yy1287;
-+			if (yych <= '@') goto yy56;
- 		}
- 	} else {
- 		if (yych <= '`') {
--			if (yych != 'P') goto yy1284;
-+			if (yych != 'P') goto yy56;
- 		} else {
--			if (yych <= 'a') goto yy1288;
--			if (yych != 'p') goto yy1284;
-+			if (yych <= 'a') goto yy1289;
-+			if (yych != 'p') goto yy56;
- 		}
- 	}
--yy1288:
-+yy1289:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'L') {
- 		if (yych != '.') goto yy56;
- 	} else {
--		if (yych <= 'M') goto yy1290;
--		if (yych == 'm') goto yy1290;
-+		if (yych <= 'M') goto yy1291;
-+		if (yych == 'm') goto yy1291;
- 		goto yy56;
- 	}
- 	yych = *++YYCURSOR;
--	if (yych == 'M') goto yy1290;
-+	if (yych == 'M') goto yy1291;
- 	if (yych != 'm') goto yy56;
--yy1290:
-+yy1291:
- 	yych = *++YYCURSOR;
- 	if (yych <= 0x1F) {
--		if (yych <= 0x00) goto yy1292;
--		if (yych == '\t') goto yy1292;
-+		if (yych <= 0x00) goto yy1293;
-+		if (yych == '\t') goto yy1293;
- 		goto yy56;
- 	} else {
--		if (yych <= ' ') goto yy1292;
-+		if (yych <= ' ') goto yy1293;
- 		if (yych != '.') goto yy56;
- 	}
- 	yych = *++YYCURSOR;
- 	if (yych <= '\t') {
--		if (yych <= 0x00) goto yy1292;
-+		if (yych <= 0x00) goto yy1293;
- 		if (yych <= 0x08) goto yy56;
- 	} else {
- 		if (yych != ' ') goto yy56;
- 	}
--yy1292:
-+yy1293:
- 	yych = *++YYCURSOR;
- 	goto yy1284;
--yy1293:
-+yy1294:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'B') {
-@@ -18314,13 +18448,13 @@ yy1293:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'c') goto yy1294;
-+				if (yych <= 'c') goto yy1295;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1294:
-+yy1295:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'J') {
-@@ -18344,13 +18478,13 @@ yy1294:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 'k') goto yy1295;
-+				if (yych <= 'k') goto yy1296;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1295:
-+yy1296:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '.') {
-@@ -18375,7 +18509,7 @@ yy1295:
- 			goto yy3;
- 		}
- 	}
--yy1296:
-+yy1297:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'S') {
- 		if (yych <= ')') {
-@@ -18391,12 +18525,12 @@ yy1296:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 's') goto yy1297;
-+			if (yych <= 's') goto yy1298;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1297:
-+yy1298:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -18412,12 +18546,12 @@ yy1297:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 't') goto yy1298;
-+			if (yych <= 't') goto yy1299;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1298:
-+yy1299:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '(') {
-@@ -18438,19 +18572,19 @@ yy1298:
- 			goto yy3;
- 		}
- 	}
--yy1299:
-+yy1300:
- 	yych = *++YYCURSOR;
--	if (yych == 'D') goto yy1300;
-+	if (yych == 'D') goto yy1301;
- 	if (yych != 'd') goto yy1070;
--yy1300:
-+yy1301:
- 	yych = *++YYCURSOR;
--	if (yych == 'A') goto yy1301;
-+	if (yych == 'A') goto yy1302;
- 	if (yych != 'a') goto yy56;
--yy1301:
-+yy1302:
- 	yych = *++YYCURSOR;
--	if (yych == 'Y') goto yy1302;
-+	if (yych == 'Y') goto yy1303;
- 	if (yych != 'y') goto yy56;
--yy1302:
-+yy1303:
- 	yyaccept = 25;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -18461,14 +18595,15 @@ yy1302:
- 		goto yy1084;
- 	}
- 	yych = *++YYCURSOR;
--	if (yych == 'O') goto yy1304;
-+	if (yych == 'O') goto yy1305;
- 	if (yych != 'o') goto yy56;
--yy1304:
-+yy1305:
- 	yych = *++YYCURSOR;
--	if (yych == 'F') goto yy1305;
-+	if (yych == 'F') goto yy1306;
- 	if (yych != 'f') goto yy56;
--yy1305:
-+yy1306:
- 	++YYCURSOR;
-+#line 1079 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("firstdayof | lastdayof");
- 		TIMELIB_INIT;
-@@ -18484,7 +18619,8 @@ yy1305:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_LF_DAY_OF_MONTH;
- 	}
--yy1307:
-+#line 18623 "ext/date/lib/parse_date.c"
-+yy1308:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -18499,7 +18635,7 @@ yy1307:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'S') goto yy1297;
-+			if (yych <= 'S') goto yy1298;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -18508,13 +18644,13 @@ yy1307:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 's') goto yy1308;
-+				if (yych <= 's') goto yy1309;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1308:
-+yy1309:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -18529,7 +18665,7 @@ yy1308:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1298;
-+			if (yych <= 'T') goto yy1299;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -18538,20 +18674,20 @@ yy1308:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 't') goto yy1309;
-+				if (yych <= 't') goto yy1310;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1309:
-+yy1310:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '-') {
- 		if (yych <= ' ') {
- 			if (yych == '\t') goto yy1069;
- 			if (yych <= 0x1F) goto yy3;
--			goto yy1299;
-+			goto yy1300;
- 		} else {
- 			if (yych == ')') goto yy164;
- 			if (yych <= ',') goto yy3;
-@@ -18573,7 +18709,7 @@ yy1309:
- 			}
- 		}
- 	}
--yy1310:
-+yy1311:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'B') {
- 		if (yych <= ')') {
-@@ -18582,7 +18718,7 @@ yy1310:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'A') goto yy166;
--			goto yy1346;
-+			goto yy1348;
- 		}
- 	} else {
- 		if (yych <= 'a') {
-@@ -18590,35 +18726,35 @@ yy1310:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'b') goto yy1346;
-+			if (yych <= 'b') goto yy1348;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1311:
-+yy1312:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'R') {
- 		if (yych <= '@') {
- 			if (yych == ')') goto yy164;
- 			goto yy3;
- 		} else {
--			if (yych == 'F') goto yy1336;
-+			if (yych == 'F') goto yy1338;
- 			if (yych <= 'Q') goto yy166;
--			goto yy1335;
-+			goto yy1337;
- 		}
- 	} else {
- 		if (yych <= 'f') {
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '`') goto yy3;
- 			if (yych <= 'e') goto yy166;
--			goto yy1336;
-+			goto yy1338;
- 		} else {
--			if (yych == 'r') goto yy1335;
-+			if (yych == 'r') goto yy1337;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1312:
-+yy1313:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'U') {
- 		if (yych <= ')') {
-@@ -18627,7 +18763,7 @@ yy1312:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'T') goto yy166;
--			goto yy1332;
-+			goto yy1334;
- 		}
- 	} else {
- 		if (yych <= 't') {
-@@ -18635,19 +18771,19 @@ yy1312:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'u') goto yy1332;
-+			if (yych <= 'u') goto yy1334;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1313:
-+yy1314:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'O') {
- 		if (yych <= '@') {
- 			if (yych == ')') goto yy164;
- 			goto yy3;
- 		} else {
--			if (yych == 'I') goto yy1315;
-+			if (yych == 'I') goto yy1316;
- 			if (yych <= 'N') goto yy166;
- 		}
- 	} else {
-@@ -18655,14 +18791,14 @@ yy1313:
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '`') goto yy3;
- 			if (yych <= 'h') goto yy166;
--			goto yy1315;
-+			goto yy1316;
- 		} else {
--			if (yych == 'o') goto yy1314;
-+			if (yych == 'o') goto yy1315;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1314:
-+yy1315:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'N') {
- 		if (yych <= ')') {
-@@ -18671,7 +18807,7 @@ yy1314:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'M') goto yy167;
--			goto yy1318;
-+			goto yy1319;
- 		}
- 	} else {
- 		if (yych <= 'm') {
-@@ -18679,12 +18815,12 @@ yy1314:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 'n') goto yy1318;
-+			if (yych <= 'n') goto yy1319;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1315:
-+yy1316:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'D') {
- 		if (yych <= ')') {
-@@ -18700,12 +18836,12 @@ yy1315:
- 			if (yych <= '`') goto yy191;
- 			goto yy167;
- 		} else {
--			if (yych <= 'd') goto yy1316;
-+			if (yych <= 'd') goto yy1317;
- 			if (yych <= 'z') goto yy167;
- 			goto yy191;
- 		}
- 	}
--yy1316:
-+yy1317:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'A') {
- 		if (yych == ')') goto yy164;
-@@ -18715,12 +18851,12 @@ yy1316:
- 			if (yych <= 'Z') goto yy168;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1317;
-+			if (yych <= 'a') goto yy1318;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1317:
-+yy1318:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'Y') {
- 		if (yych <= ')') {
-@@ -18742,7 +18878,7 @@ yy1317:
- 			goto yy3;
- 		}
- 	}
--yy1318:
-+yy1319:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -18758,16 +18894,16 @@ yy1318:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 't') goto yy1319;
-+			if (yych <= 't') goto yy1320;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1319:
-+yy1320:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= ')') {
--		if (yych == ' ') goto yy1320;
-+		if (yych == ' ') goto yy1321;
- 		if (yych <= '(') goto yy3;
- 		goto yy164;
- 	} else {
-@@ -18780,88 +18916,143 @@ yy1319:
- 			goto yy3;
- 		}
- 	}
--yy1320:
-+yy1321:
- 	yych = *++YYCURSOR;
--	if (yych == 'O') goto yy1321;
-+	if (yych == 'O') goto yy1322;
- 	if (yych != 'o') goto yy56;
--yy1321:
-+yy1322:
- 	yych = *++YYCURSOR;
--	if (yych == 'F') goto yy1322;
-+	if (yych == 'F') goto yy1323;
- 	if (yych != 'f') goto yy56;
--yy1322:
-+yy1323:
- 	yych = *++YYCURSOR;
- 	if (yych != ' ') goto yy56;
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy56;
--	if (yych <= '1') goto yy1324;
--	if (yych <= '2') goto yy1325;
--	if (yych <= '9') goto yy1326;
-+	if (yych <= '1') goto yy1325;
-+	if (yych <= '2') goto yy1326;
-+	if (yych <= '9') goto yy1327;
- 	goto yy56;
--yy1324:
--	yyaccept = 27;
--	yych = *(YYMARKER = ++YYCURSOR);
--	if (yych <= '/') goto yy1327;
--	if (yych <= '9') goto yy1326;
--	goto yy1327;
- yy1325:
- 	yyaccept = 27;
- 	yych = *(YYMARKER = ++YYCURSOR);
--	if (yych <= '/') goto yy1327;
--	if (yych >= '5') goto yy1327;
-+	if (yych <= '@') {
-+		if (yych <= 0x1F) {
-+			if (yych == '\t') goto yy1328;
-+			goto yy1284;
-+		} else {
-+			if (yych <= ' ') goto yy1328;
-+			if (yych <= '/') goto yy1284;
-+			if (yych <= '9') goto yy1327;
-+			goto yy1284;
-+		}
-+	} else {
-+		if (yych <= '`') {
-+			if (yych <= 'A') goto yy1330;
-+			if (yych == 'P') goto yy1330;
-+			goto yy1284;
-+		} else {
-+			if (yych <= 'a') goto yy1330;
-+			if (yych == 'p') goto yy1330;
-+			goto yy1284;
-+		}
-+	}
- yy1326:
- 	yyaccept = 27;
--	YYMARKER = ++YYCURSOR;
--	if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
--	yych = *YYCURSOR;
-+	yych = *(YYMARKER = ++YYCURSOR);
-+	if (yych <= '@') {
-+		if (yych <= 0x1F) {
-+			if (yych == '\t') goto yy1328;
-+			goto yy1284;
-+		} else {
-+			if (yych <= ' ') goto yy1328;
-+			if (yych <= '/') goto yy1284;
-+			if (yych >= '5') goto yy1284;
-+		}
-+	} else {
-+		if (yych <= '`') {
-+			if (yych <= 'A') goto yy1330;
-+			if (yych == 'P') goto yy1330;
-+			goto yy1284;
-+		} else {
-+			if (yych <= 'a') goto yy1330;
-+			if (yych == 'p') goto yy1330;
-+			goto yy1284;
-+		}
-+	}
- yy1327:
-+	yyaccept = 27;
-+	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'A') {
- 		if (yych <= 0x1F) {
--			if (yych == '\t') goto yy1326;
--			goto yy1284;
-+			if (yych != '\t') goto yy1284;
- 		} else {
--			if (yych <= ' ') goto yy1326;
-+			if (yych <= ' ') goto yy1328;
- 			if (yych <= '@') goto yy1284;
-+			goto yy1330;
- 		}
- 	} else {
- 		if (yych <= '`') {
--			if (yych != 'P') goto yy1284;
-+			if (yych == 'P') goto yy1330;
-+			goto yy1284;
- 		} else {
--			if (yych <= 'a') goto yy1328;
--			if (yych != 'p') goto yy1284;
-+			if (yych <= 'a') goto yy1330;
-+			if (yych == 'p') goto yy1330;
-+			goto yy1284;
- 		}
- 	}
- yy1328:
-+	++YYCURSOR;
-+	if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
-+	yych = *YYCURSOR;
-+	if (yych <= 'A') {
-+		if (yych <= 0x1F) {
-+			if (yych == '\t') goto yy1328;
-+			goto yy56;
-+		} else {
-+			if (yych <= ' ') goto yy1328;
-+			if (yych <= '@') goto yy56;
-+		}
-+	} else {
-+		if (yych <= '`') {
-+			if (yych != 'P') goto yy56;
-+		} else {
-+			if (yych <= 'a') goto yy1330;
-+			if (yych != 'p') goto yy56;
-+		}
-+	}
-+yy1330:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'L') {
- 		if (yych != '.') goto yy56;
- 	} else {
--		if (yych <= 'M') goto yy1330;
--		if (yych == 'm') goto yy1330;
-+		if (yych <= 'M') goto yy1332;
-+		if (yych == 'm') goto yy1332;
- 		goto yy56;
- 	}
- 	yych = *++YYCURSOR;
--	if (yych == 'M') goto yy1330;
-+	if (yych == 'M') goto yy1332;
- 	if (yych != 'm') goto yy56;
--yy1330:
-+yy1332:
- 	yych = *++YYCURSOR;
- 	if (yych <= 0x1F) {
--		if (yych <= 0x00) goto yy1292;
--		if (yych == '\t') goto yy1292;
-+		if (yych <= 0x00) goto yy1293;
-+		if (yych == '\t') goto yy1293;
- 		goto yy56;
- 	} else {
--		if (yych <= ' ') goto yy1292;
-+		if (yych <= ' ') goto yy1293;
- 		if (yych != '.') goto yy56;
- 	}
- 	yych = *++YYCURSOR;
- 	if (yych <= '\t') {
--		if (yych <= 0x00) goto yy1292;
-+		if (yych <= 0x00) goto yy1293;
- 		if (yych <= 0x08) goto yy56;
--		goto yy1292;
-+		goto yy1293;
- 	} else {
--		if (yych == ' ') goto yy1292;
-+		if (yych == ' ') goto yy1293;
- 		goto yy56;
- 	}
--yy1332:
-+yy1334:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'R') {
- 		if (yych <= ')') {
-@@ -18877,12 +19068,12 @@ yy1332:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 'r') goto yy1333;
-+			if (yych <= 'r') goto yy1335;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1333:
-+yy1335:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -18898,12 +19089,12 @@ yy1333:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 't') goto yy1334;
-+			if (yych <= 't') goto yy1336;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1334:
-+yy1336:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'H') {
- 		if (yych <= ')') {
-@@ -18925,7 +19116,7 @@ yy1334:
- 			goto yy3;
- 		}
- 	}
--yy1335:
-+yy1337:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'S') {
- 		if (yych <= ')') {
-@@ -18934,7 +19125,7 @@ yy1335:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'R') goto yy167;
--			goto yy1338;
-+			goto yy1340;
- 		}
- 	} else {
- 		if (yych <= 'r') {
-@@ -18942,12 +19133,12 @@ yy1335:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 's') goto yy1338;
-+			if (yych <= 's') goto yy1340;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1336:
-+yy1338:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -18963,12 +19154,12 @@ yy1336:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 't') goto yy1337;
-+			if (yych <= 't') goto yy1339;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1337:
-+yy1339:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'H') {
- 		if (yych <= ')') {
-@@ -18990,7 +19181,7 @@ yy1337:
- 			goto yy3;
- 		}
- 	}
--yy1338:
-+yy1340:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -19006,12 +19197,12 @@ yy1338:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 't') goto yy1339;
-+			if (yych <= 't') goto yy1341;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1339:
-+yy1341:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '(') {
-@@ -19032,19 +19223,19 @@ yy1339:
- 			goto yy3;
- 		}
- 	}
--yy1340:
-+yy1342:
- 	yych = *++YYCURSOR;
--	if (yych == 'D') goto yy1341;
-+	if (yych == 'D') goto yy1343;
- 	if (yych != 'd') goto yy1197;
--yy1341:
-+yy1343:
- 	yych = *++YYCURSOR;
--	if (yych == 'A') goto yy1342;
-+	if (yych == 'A') goto yy1344;
- 	if (yych != 'a') goto yy56;
--yy1342:
-+yy1344:
- 	yych = *++YYCURSOR;
--	if (yych == 'Y') goto yy1343;
-+	if (yych == 'Y') goto yy1345;
- 	if (yych != 'y') goto yy56;
--yy1343:
-+yy1345:
- 	yyaccept = 25;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -19055,14 +19246,14 @@ yy1343:
- 		goto yy1084;
- 	}
- 	yych = *++YYCURSOR;
--	if (yych == 'O') goto yy1345;
-+	if (yych == 'O') goto yy1347;
- 	if (yych != 'o') goto yy56;
--yy1345:
-+yy1347:
- 	yych = *++YYCURSOR;
--	if (yych == 'F') goto yy1305;
--	if (yych == 'f') goto yy1305;
-+	if (yych == 'F') goto yy1306;
-+	if (yych == 'f') goto yy1306;
- 	goto yy56;
--yy1346:
-+yy1348:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '/') {
-@@ -19097,13 +19288,13 @@ yy1346:
- 				if (yych <= '`') goto yy218;
- 				goto yy167;
- 			} else {
--				if (yych <= 'r') goto yy1347;
-+				if (yych <= 'r') goto yy1349;
- 				if (yych <= 'z') goto yy167;
- 				goto yy218;
- 			}
- 		}
- 	}
--yy1347:
-+yy1349:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'U') {
- 		if (yych <= ')') {
-@@ -19119,12 +19310,12 @@ yy1347:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'u') goto yy1348;
-+			if (yych <= 'u') goto yy1350;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1348:
-+yy1350:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'A') {
- 		if (yych == ')') goto yy164;
-@@ -19134,27 +19325,27 @@ yy1348:
- 			if (yych <= 'Z') goto yy169;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1349;
-+			if (yych <= 'a') goto yy1351;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1349:
-+yy1351:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
- 		if (yych == ')') goto yy164;
- 		goto yy3;
- 	} else {
--		if (yych <= 'R') goto yy1350;
-+		if (yych <= 'R') goto yy1352;
- 		if (yych != 'r') goto yy3;
- 	}
--yy1350:
-+yy1352:
- 	yych = *++YYCURSOR;
- 	if (yych == 'Y') goto yy229;
- 	if (yych == 'y') goto yy229;
- 	goto yy56;
--yy1351:
-+yy1353:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'A') {
-@@ -19169,7 +19360,7 @@ yy1351:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'B') goto yy1346;
-+			if (yych <= 'B') goto yy1348;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19178,13 +19369,13 @@ yy1351:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'b') goto yy1369;
-+				if (yych <= 'b') goto yy1371;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1352:
-+yy1354:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
-@@ -19201,14 +19392,14 @@ yy1352:
- 				if (yych <= '/') goto yy172;
- 				goto yy3;
- 			} else {
--				if (yych == 'F') goto yy1336;
-+				if (yych == 'F') goto yy1338;
- 				goto yy166;
- 			}
- 		}
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') {
--				if (yych <= 'R') goto yy1335;
-+				if (yych <= 'R') goto yy1337;
- 				goto yy166;
- 			} else {
- 				if (yych == '_') goto yy172;
-@@ -19216,16 +19407,16 @@ yy1352:
- 			}
- 		} else {
- 			if (yych <= 'q') {
--				if (yych == 'f') goto yy1365;
-+				if (yych == 'f') goto yy1367;
- 				goto yy171;
- 			} else {
--				if (yych <= 'r') goto yy1364;
-+				if (yych <= 'r') goto yy1366;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1353:
-+yy1355:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'T') {
-@@ -19240,7 +19431,7 @@ yy1353:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'U') goto yy1332;
-+			if (yych <= 'U') goto yy1334;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19249,13 +19440,13 @@ yy1353:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'u') goto yy1361;
-+				if (yych <= 'u') goto yy1363;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1354:
-+yy1356:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'N') {
-@@ -19272,14 +19463,14 @@ yy1354:
- 				if (yych <= '/') goto yy172;
- 				goto yy3;
- 			} else {
--				if (yych == 'I') goto yy1315;
-+				if (yych == 'I') goto yy1316;
- 				goto yy166;
- 			}
- 		}
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') {
--				if (yych <= 'O') goto yy1314;
-+				if (yych <= 'O') goto yy1315;
- 				goto yy166;
- 			} else {
- 				if (yych == '_') goto yy172;
-@@ -19287,16 +19478,16 @@ yy1354:
- 			}
- 		} else {
- 			if (yych <= 'n') {
--				if (yych == 'i') goto yy1356;
-+				if (yych == 'i') goto yy1358;
- 				goto yy171;
- 			} else {
--				if (yych <= 'o') goto yy1355;
-+				if (yych <= 'o') goto yy1357;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1355:
-+yy1357:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'M') {
-@@ -19311,7 +19502,7 @@ yy1355:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'N') goto yy1318;
-+			if (yych <= 'N') goto yy1319;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19320,13 +19511,13 @@ yy1355:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 'n') goto yy1359;
-+				if (yych <= 'n') goto yy1361;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1356:
-+yy1358:
- 	yyaccept = 4;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
-@@ -19341,7 +19532,7 @@ yy1356:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'D') goto yy1316;
-+			if (yych <= 'D') goto yy1317;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy191;
- 			goto yy172;
-@@ -19350,13 +19541,13 @@ yy1356:
- 				if (yych <= '`') goto yy191;
- 				goto yy175;
- 			} else {
--				if (yych <= 'd') goto yy1357;
-+				if (yych <= 'd') goto yy1359;
- 				if (yych <= 'z') goto yy175;
- 				goto yy191;
- 			}
- 		}
- 	}
--yy1357:
-+yy1359:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '@') {
-@@ -19370,18 +19561,18 @@ yy1357:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'A') goto yy1317;
-+			if (yych <= 'A') goto yy1318;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
- 		} else {
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1358;
-+			if (yych <= 'a') goto yy1360;
- 			if (yych <= 'z') goto yy176;
- 			goto yy3;
- 		}
- 	}
--yy1358:
-+yy1360:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'X') {
-@@ -19411,7 +19602,7 @@ yy1358:
- 			}
- 		}
- 	}
--yy1359:
-+yy1361:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -19426,7 +19617,7 @@ yy1359:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1319;
-+			if (yych <= 'T') goto yy1320;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19435,18 +19626,18 @@ yy1359:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 't') goto yy1360;
-+				if (yych <= 't') goto yy1362;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1360:
-+yy1362:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '.') {
- 		if (yych <= '(') {
--			if (yych == ' ') goto yy1320;
-+			if (yych == ' ') goto yy1321;
- 			goto yy3;
- 		} else {
- 			if (yych <= ')') goto yy164;
-@@ -19466,7 +19657,7 @@ yy1360:
- 			goto yy3;
- 		}
- 	}
--yy1361:
-+yy1363:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
-@@ -19481,7 +19672,7 @@ yy1361:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'R') goto yy1333;
-+			if (yych <= 'R') goto yy1335;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19490,13 +19681,13 @@ yy1361:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 'r') goto yy1362;
-+				if (yych <= 'r') goto yy1364;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1362:
-+yy1364:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -19511,7 +19702,7 @@ yy1362:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1334;
-+			if (yych <= 'T') goto yy1336;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19520,13 +19711,13 @@ yy1362:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 't') goto yy1363;
-+				if (yych <= 't') goto yy1365;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1363:
-+yy1365:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -19556,7 +19747,7 @@ yy1363:
- 			}
- 		}
- 	}
--yy1364:
-+yy1366:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -19571,7 +19762,7 @@ yy1364:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'S') goto yy1338;
-+			if (yych <= 'S') goto yy1340;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19580,13 +19771,13 @@ yy1364:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 's') goto yy1367;
-+				if (yych <= 's') goto yy1369;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1365:
-+yy1367:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -19601,7 +19792,7 @@ yy1365:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1337;
-+			if (yych <= 'T') goto yy1339;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19610,13 +19801,13 @@ yy1365:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 't') goto yy1366;
-+				if (yych <= 't') goto yy1368;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1366:
-+yy1368:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -19646,7 +19837,7 @@ yy1366:
- 			}
- 		}
- 	}
--yy1367:
-+yy1369:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -19661,7 +19852,7 @@ yy1367:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1339;
-+			if (yych <= 'T') goto yy1341;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19670,20 +19861,20 @@ yy1367:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 't') goto yy1368;
-+				if (yych <= 't') goto yy1370;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1368:
-+yy1370:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '-') {
- 		if (yych <= ' ') {
- 			if (yych == '\t') goto yy1196;
- 			if (yych <= 0x1F) goto yy3;
--			goto yy1340;
-+			goto yy1342;
- 		} else {
- 			if (yych == ')') goto yy164;
- 			if (yych <= ',') goto yy3;
-@@ -19705,7 +19896,7 @@ yy1368:
- 			}
- 		}
- 	}
--yy1369:
-+yy1371:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '9') {
-@@ -19733,7 +19924,7 @@ yy1369:
- 				if (yych <= '@') goto yy218;
- 				goto yy167;
- 			} else {
--				if (yych <= 'R') goto yy1347;
-+				if (yych <= 'R') goto yy1349;
- 				if (yych <= 'Z') goto yy167;
- 				goto yy218;
- 			}
-@@ -19743,13 +19934,13 @@ yy1369:
- 				if (yych <= '`') goto yy218;
- 				goto yy175;
- 			} else {
--				if (yych <= 'r') goto yy1370;
-+				if (yych <= 'r') goto yy1372;
- 				if (yych <= 'z') goto yy175;
- 				goto yy218;
- 			}
- 		}
- 	}
--yy1370:
-+yy1372:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'T') {
-@@ -19764,7 +19955,7 @@ yy1370:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'U') goto yy1348;
-+			if (yych <= 'U') goto yy1350;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -19773,13 +19964,13 @@ yy1370:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'u') goto yy1371;
-+				if (yych <= 'u') goto yy1373;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1371:
-+yy1373:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '@') {
-@@ -19793,18 +19984,18 @@ yy1371:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'A') goto yy1349;
-+			if (yych <= 'A') goto yy1351;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
- 		} else {
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1372;
-+			if (yych <= 'a') goto yy1374;
- 			if (yych <= 'z') goto yy177;
- 			goto yy3;
- 		}
- 	}
--yy1372:
-+yy1374:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
-@@ -19818,33 +20009,34 @@ yy1372:
- 		}
- 	} else {
- 		if (yych <= '`') {
--			if (yych <= 'R') goto yy1350;
-+			if (yych <= 'R') goto yy1352;
- 			if (yych == '_') goto yy172;
- 			goto yy3;
- 		} else {
--			if (yych == 'r') goto yy1373;
-+			if (yych == 'r') goto yy1375;
- 			if (yych <= 'z') goto yy178;
- 			goto yy3;
- 		}
- 	}
--yy1373:
-+yy1375:
- 	yych = *++YYCURSOR;
- 	if (yych == 'Y') goto yy229;
- 	if (yych == 'y') goto yy341;
- 	goto yy179;
--yy1374:
-+yy1376:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy56;
- 	if (yych >= ':') goto yy56;
--yy1375:
-+yy1377:
- 	yyaccept = 28;
- 	YYMARKER = ++YYCURSOR;
- 	if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
- 	yych = *YYCURSOR;
--	if (yych == '.') goto yy1378;
--	if (yych <= '/') goto yy1377;
--	if (yych <= '9') goto yy1375;
--yy1377:
-+	if (yych == '.') goto yy1380;
-+	if (yych <= '/') goto yy1379;
-+	if (yych <= '9') goto yy1377;
-+yy1379:
-+#line 1025 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_ull i;
- 
-@@ -19869,7 +20061,8 @@ yy1377:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
--yy1378:
-+#line 20065 "ext/date/lib/parse_date.c"
-+yy1380:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy56;
- 	if (yych >= ':') goto yy56;
-@@ -19889,6 +20082,7 @@ yy1378:
- 	if (yych <= '/') goto yy56;
- 	if (yych >= ':') goto yy56;
- 	++YYCURSOR;
-+#line 1051 "ext/date/lib/parse_date.re"
- 	{
- 		timelib_ull i, ms;
- 
-@@ -19915,7 +20109,8 @@ yy1378:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
--yy1386:
-+#line 20113 "ext/date/lib/parse_date.c"
-+yy1388:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'N') {
- 		if (yych <= ')') {
-@@ -19924,7 +20119,7 @@ yy1386:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'M') goto yy166;
--			goto yy1427;
-+			goto yy1429;
- 		}
- 	} else {
- 		if (yych <= 'm') {
-@@ -19932,58 +20127,58 @@ yy1386:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'n') goto yy1427;
-+			if (yych <= 'n') goto yy1429;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1387:
-+yy1389:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'U') {
- 		if (yych <= '@') {
- 			if (yych == ')') goto yy164;
- 			goto yy3;
- 		} else {
--			if (yych == 'I') goto yy1419;
-+			if (yych == 'I') goto yy1421;
- 			if (yych <= 'T') goto yy166;
--			goto yy1420;
-+			goto yy1422;
- 		}
- 	} else {
- 		if (yych <= 'i') {
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '`') goto yy3;
- 			if (yych <= 'h') goto yy166;
--			goto yy1419;
-+			goto yy1421;
- 		} else {
--			if (yych == 'u') goto yy1420;
-+			if (yych == 'u') goto yy1422;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1388:
-+yy1390:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'M') {
- 		if (yych <= '@') {
- 			if (yych == ')') goto yy164;
- 			goto yy3;
- 		} else {
--			if (yych == 'D') goto yy1408;
-+			if (yych == 'D') goto yy1410;
- 			if (yych <= 'L') goto yy166;
--			goto yy1409;
-+			goto yy1411;
- 		}
- 	} else {
- 		if (yych <= 'd') {
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '`') goto yy3;
- 			if (yych <= 'c') goto yy166;
--			goto yy1408;
-+			goto yy1410;
- 		} else {
--			if (yych == 'm') goto yy1409;
-+			if (yych == 'm') goto yy1411;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1389:
-+yy1391:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'E') {
- 		if (yych <= ')') {
-@@ -19992,7 +20187,7 @@ yy1389:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'D') goto yy166;
--			goto yy1404;
-+			goto yy1406;
- 		}
- 	} else {
- 		if (yych <= 'd') {
-@@ -20000,12 +20195,12 @@ yy1389:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'e') goto yy1404;
-+			if (yych <= 'e') goto yy1406;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1390:
-+yy1392:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'E') {
- 		if (yych <= ')') {
-@@ -20014,7 +20209,7 @@ yy1390:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'D') goto yy166;
--			goto yy1400;
-+			goto yy1402;
- 		}
- 	} else {
- 		if (yych <= 'd') {
-@@ -20022,68 +20217,68 @@ yy1390:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'e') goto yy1400;
-+			if (yych <= 'e') goto yy1402;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1391:
-+yy1393:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') {
- 		if (yych == '.') goto yy1029;
- 		goto yy56;
- 	} else {
--		if (yych <= '9') goto yy1394;
-+		if (yych <= '9') goto yy1396;
- 		if (yych <= ':') goto yy1029;
- 		goto yy56;
- 	}
--yy1392:
-+yy1394:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') {
- 		if (yych == '.') goto yy1029;
- 		goto yy56;
- 	} else {
--		if (yych <= '4') goto yy1394;
-+		if (yych <= '4') goto yy1396;
- 		if (yych == ':') goto yy1029;
- 		goto yy56;
- 	}
--yy1393:
-+yy1395:
- 	yych = *++YYCURSOR;
- 	if (yych == '.') goto yy1029;
- 	if (yych == ':') goto yy1029;
- 	goto yy56;
--yy1394:
-+yy1396:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') {
- 		if (yych == '.') goto yy1029;
- 		goto yy56;
- 	} else {
--		if (yych <= '5') goto yy1395;
-+		if (yych <= '5') goto yy1397;
- 		if (yych == ':') goto yy1029;
- 		goto yy56;
- 	}
--yy1395:
-+yy1397:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy56;
- 	if (yych >= ':') goto yy56;
- 	yyaccept = 23;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '/') goto yy1032;
--	if (yych <= '5') goto yy1397;
--	if (yych <= '6') goto yy1398;
-+	if (yych <= '5') goto yy1399;
-+	if (yych <= '6') goto yy1400;
- 	goto yy1032;
--yy1397:
-+yy1399:
- 	yych = *++YYCURSOR;
- 	if (yych <= '/') goto yy56;
--	if (yych <= '9') goto yy1399;
-+	if (yych <= '9') goto yy1401;
- 	goto yy56;
--yy1398:
-+yy1400:
- 	yych = *++YYCURSOR;
- 	if (yych != '0') goto yy56;
--yy1399:
-+yy1401:
- 	yych = *++YYCURSOR;
- 	goto yy1040;
--yy1400:
-+yy1402:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'L') {
- 		if (yych <= ')') {
-@@ -20099,12 +20294,12 @@ yy1400:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 'l') goto yy1401;
-+			if (yych <= 'l') goto yy1403;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1401:
-+yy1403:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'F') {
- 		if (yych <= ')') {
-@@ -20120,12 +20315,12 @@ yy1401:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'f') goto yy1402;
-+			if (yych <= 'f') goto yy1404;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1402:
-+yy1404:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -20141,12 +20336,12 @@ yy1402:
- 			if (yych <= '`') goto yy3;
- 			goto yy169;
- 		} else {
--			if (yych <= 't') goto yy1403;
-+			if (yych <= 't') goto yy1405;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1403:
-+yy1405:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -20157,7 +20352,7 @@ yy1403:
- 		if (yych == 'h') goto yy1195;
- 		goto yy3;
- 	}
--yy1404:
-+yy1406:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'S') {
- 		if (yych <= ')') {
-@@ -20173,12 +20368,12 @@ yy1404:
- 			if (yych <= '`') goto yy191;
- 			goto yy167;
- 		} else {
--			if (yych <= 's') goto yy1405;
-+			if (yych <= 's') goto yy1407;
- 			if (yych <= 'z') goto yy167;
- 			goto yy191;
- 		}
- 	}
--yy1405:
-+yy1407:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'D') {
- 		if (yych <= ')') {
-@@ -20194,12 +20389,12 @@ yy1405:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'd') goto yy1406;
-+			if (yych <= 'd') goto yy1408;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1406:
-+yy1408:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'A') {
- 		if (yych == ')') goto yy164;
-@@ -20209,12 +20404,12 @@ yy1406:
- 			if (yych <= 'Z') goto yy169;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1407;
-+			if (yych <= 'a') goto yy1409;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1407:
-+yy1409:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'X') {
- 		if (yych == ')') goto yy164;
-@@ -20224,23 +20419,23 @@ yy1407:
- 		if (yych == 'y') goto yy197;
- 		goto yy3;
- 	}
--yy1408:
-+yy1410:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'A') {
- 		if (yych == ')') goto yy164;
- 		if (yych <= '@') goto yy3;
--		goto yy1416;
-+		goto yy1418;
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') goto yy167;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1416;
-+			if (yych <= 'a') goto yy1418;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1409:
-+yy1411:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'O') {
- 		if (yych <= ')') {
-@@ -20256,12 +20451,12 @@ yy1409:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 'o') goto yy1410;
-+			if (yych <= 'o') goto yy1412;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1410:
-+yy1412:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'R') {
- 		if (yych <= ')') {
-@@ -20277,12 +20472,12 @@ yy1410:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'r') goto yy1411;
-+			if (yych <= 'r') goto yy1413;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1411:
-+yy1413:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'R') {
- 		if (yych <= ')') {
-@@ -20298,28 +20493,29 @@ yy1411:
- 			if (yych <= '`') goto yy3;
- 			goto yy169;
- 		} else {
--			if (yych <= 'r') goto yy1412;
-+			if (yych <= 'r') goto yy1414;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1412:
-+yy1414:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'N') {
- 		if (yych == ')') goto yy164;
- 		goto yy3;
- 	} else {
--		if (yych <= 'O') goto yy1413;
-+		if (yych <= 'O') goto yy1415;
- 		if (yych != 'o') goto yy3;
- 	}
--yy1413:
-+yy1415:
- 	yych = *++YYCURSOR;
--	if (yych == 'W') goto yy1414;
-+	if (yych == 'W') goto yy1416;
- 	if (yych != 'w') goto yy56;
--yy1414:
-+yy1416:
- 	++YYCURSOR;
--yy1415:
-+yy1417:
-+#line 1013 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("tomorrow");
- 		TIMELIB_INIT;
-@@ -20330,7 +20526,8 @@ yy1415:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
--yy1416:
-+#line 20530 "ext/date/lib/parse_date.c"
-+yy1418:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'Y') {
- 		if (yych <= ')') {
-@@ -20346,21 +20543,22 @@ yy1416:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'y') goto yy1417;
-+			if (yych <= 'y') goto yy1419;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1417:
-+yy1419:
- 	++YYCURSOR;
- 	if ((yych = *YYCURSOR) <= '@') {
- 		if (yych == ')') goto yy164;
- 	} else {
- 		if (yych <= 'Z') goto yy169;
--		if (yych <= '`') goto yy1418;
-+		if (yych <= '`') goto yy1420;
- 		if (yych <= 'z') goto yy169;
- 	}
--yy1418:
-+yy1420:
-+#line 1003 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("midnight | today");
- 		TIMELIB_INIT;
-@@ -20369,7 +20567,8 @@ yy1418:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
--yy1419:
-+#line 20571 "ext/date/lib/parse_date.c"
-+yy1421:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'S') {
- 		if (yych <= '@') {
-@@ -20377,8 +20576,8 @@ yy1419:
- 			goto yy3;
- 		} else {
- 			if (yych <= 'Q') goto yy167;
--			if (yych <= 'R') goto yy1425;
--			goto yy1426;
-+			if (yych <= 'R') goto yy1427;
-+			goto yy1428;
- 		}
- 	} else {
- 		if (yych <= 'q') {
-@@ -20386,13 +20585,13 @@ yy1419:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 'r') goto yy1425;
--			if (yych <= 's') goto yy1426;
-+			if (yych <= 'r') goto yy1427;
-+			if (yych <= 's') goto yy1428;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1420:
-+yy1422:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'R') {
- 		if (yych <= ')') {
-@@ -20408,12 +20607,12 @@ yy1420:
- 			if (yych <= '`') goto yy191;
- 			goto yy167;
- 		} else {
--			if (yych <= 'r') goto yy1421;
-+			if (yych <= 'r') goto yy1423;
- 			if (yych <= 'z') goto yy167;
- 			goto yy191;
- 		}
- 	}
--yy1421:
-+yy1423:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'S') {
- 		if (yych <= ')') {
-@@ -20429,12 +20628,12 @@ yy1421:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 's') goto yy1422;
-+			if (yych <= 's') goto yy1424;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1422:
-+yy1424:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'D') {
- 		if (yych <= ')') {
-@@ -20450,27 +20649,27 @@ yy1422:
- 			if (yych <= '`') goto yy3;
- 			goto yy169;
- 		} else {
--			if (yych <= 'd') goto yy1423;
-+			if (yych <= 'd') goto yy1425;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1423:
-+yy1425:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '@') {
- 		if (yych == ')') goto yy164;
- 		goto yy3;
- 	} else {
--		if (yych <= 'A') goto yy1424;
-+		if (yych <= 'A') goto yy1426;
- 		if (yych != 'a') goto yy3;
- 	}
--yy1424:
-+yy1426:
- 	yych = *++YYCURSOR;
- 	if (yych == 'Y') goto yy197;
- 	if (yych == 'y') goto yy197;
- 	goto yy56;
--yy1425:
-+yy1427:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'D') {
- 		if (yych <= ')') {
-@@ -20492,7 +20691,7 @@ yy1425:
- 			goto yy3;
- 		}
- 	}
--yy1426:
-+yy1428:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '(') {
-@@ -20514,7 +20713,7 @@ yy1426:
- 			goto yy3;
- 		}
- 	}
--yy1427:
-+yy1429:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -20530,12 +20729,12 @@ yy1427:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 't') goto yy1428;
-+			if (yych <= 't') goto yy1430;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1428:
-+yy1430:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'H') {
- 		if (yych <= ')') {
-@@ -20557,7 +20756,7 @@ yy1428:
- 			goto yy3;
- 		}
- 	}
--yy1429:
-+yy1431:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'M') {
-@@ -20572,7 +20771,7 @@ yy1429:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'N') goto yy1427;
-+			if (yych <= 'N') goto yy1429;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20581,13 +20780,13 @@ yy1429:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'n') goto yy1459;
-+				if (yych <= 'n') goto yy1461;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1430:
-+yy1432:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'T') {
-@@ -20604,14 +20803,14 @@ yy1430:
- 				if (yych <= '/') goto yy172;
- 				goto yy3;
- 			} else {
--				if (yych == 'I') goto yy1419;
-+				if (yych == 'I') goto yy1421;
- 				goto yy166;
- 			}
- 		}
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') {
--				if (yych <= 'U') goto yy1420;
-+				if (yych <= 'U') goto yy1422;
- 				goto yy166;
- 			} else {
- 				if (yych == '_') goto yy172;
-@@ -20619,16 +20818,16 @@ yy1430:
- 			}
- 		} else {
- 			if (yych <= 't') {
--				if (yych == 'i') goto yy1451;
-+				if (yych == 'i') goto yy1453;
- 				goto yy171;
- 			} else {
--				if (yych <= 'u') goto yy1452;
-+				if (yych <= 'u') goto yy1454;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1431:
-+yy1433:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'L') {
-@@ -20645,14 +20844,14 @@ yy1431:
- 				if (yych <= '/') goto yy172;
- 				goto yy3;
- 			} else {
--				if (yych == 'D') goto yy1408;
-+				if (yych == 'D') goto yy1410;
- 				goto yy166;
- 			}
- 		}
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') {
--				if (yych <= 'M') goto yy1409;
-+				if (yych <= 'M') goto yy1411;
- 				goto yy166;
- 			} else {
- 				if (yych == '_') goto yy172;
-@@ -20660,16 +20859,16 @@ yy1431:
- 			}
- 		} else {
- 			if (yych <= 'l') {
--				if (yych == 'd') goto yy1442;
-+				if (yych == 'd') goto yy1444;
- 				goto yy171;
- 			} else {
--				if (yych <= 'm') goto yy1443;
-+				if (yych <= 'm') goto yy1445;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1432:
-+yy1434:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'D') {
-@@ -20684,7 +20883,7 @@ yy1432:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'E') goto yy1404;
-+			if (yych <= 'E') goto yy1406;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20693,13 +20892,13 @@ yy1432:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'e') goto yy1438;
-+				if (yych <= 'e') goto yy1440;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1433:
-+yy1435:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'D') {
-@@ -20714,7 +20913,7 @@ yy1433:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'E') goto yy1400;
-+			if (yych <= 'E') goto yy1402;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20723,13 +20922,13 @@ yy1433:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'e') goto yy1434;
-+				if (yych <= 'e') goto yy1436;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1434:
-+yy1436:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'K') {
-@@ -20744,7 +20943,7 @@ yy1434:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'L') goto yy1401;
-+			if (yych <= 'L') goto yy1403;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20753,13 +20952,13 @@ yy1434:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 'l') goto yy1435;
-+				if (yych <= 'l') goto yy1437;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1435:
-+yy1437:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'E') {
-@@ -20774,7 +20973,7 @@ yy1435:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'F') goto yy1402;
-+			if (yych <= 'F') goto yy1404;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20783,13 +20982,13 @@ yy1435:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'f') goto yy1436;
-+				if (yych <= 'f') goto yy1438;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1436:
-+yy1438:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -20804,7 +21003,7 @@ yy1436:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1403;
-+			if (yych <= 'T') goto yy1405;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20813,13 +21012,13 @@ yy1436:
- 				if (yych <= '`') goto yy3;
- 				goto yy177;
- 			} else {
--				if (yych <= 't') goto yy1437;
-+				if (yych <= 't') goto yy1439;
- 				if (yych <= 'z') goto yy177;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1437:
-+yy1439:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -20842,7 +21041,7 @@ yy1437:
- 			goto yy3;
- 		}
- 	}
--yy1438:
-+yy1440:
- 	yyaccept = 4;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -20857,7 +21056,7 @@ yy1438:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'S') goto yy1405;
-+			if (yych <= 'S') goto yy1407;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy191;
- 			goto yy172;
-@@ -20866,13 +21065,13 @@ yy1438:
- 				if (yych <= '`') goto yy191;
- 				goto yy175;
- 			} else {
--				if (yych <= 's') goto yy1439;
-+				if (yych <= 's') goto yy1441;
- 				if (yych <= 'z') goto yy175;
- 				goto yy191;
- 			}
- 		}
- 	}
--yy1439:
-+yy1441:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
-@@ -20887,7 +21086,7 @@ yy1439:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'D') goto yy1406;
-+			if (yych <= 'D') goto yy1408;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20896,13 +21095,13 @@ yy1439:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'd') goto yy1440;
-+				if (yych <= 'd') goto yy1442;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1440:
-+yy1442:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '@') {
-@@ -20916,18 +21115,18 @@ yy1440:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'A') goto yy1407;
-+			if (yych <= 'A') goto yy1409;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
- 		} else {
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1441;
-+			if (yych <= 'a') goto yy1443;
- 			if (yych <= 'z') goto yy177;
- 			goto yy3;
- 		}
- 	}
--yy1441:
-+yy1443:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'X') {
-@@ -20950,7 +21149,7 @@ yy1441:
- 			goto yy3;
- 		}
- 	}
--yy1442:
-+yy1444:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '@') {
-@@ -20964,18 +21163,18 @@ yy1442:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'A') goto yy1416;
-+			if (yych <= 'A') goto yy1418;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
- 		} else {
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1449;
-+			if (yych <= 'a') goto yy1451;
- 			if (yych <= 'z') goto yy175;
- 			goto yy3;
- 		}
- 	}
--yy1443:
-+yy1445:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'N') {
-@@ -20990,7 +21189,7 @@ yy1443:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'O') goto yy1410;
-+			if (yych <= 'O') goto yy1412;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -20999,13 +21198,13 @@ yy1443:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 'o') goto yy1444;
-+				if (yych <= 'o') goto yy1446;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1444:
-+yy1446:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
-@@ -21020,7 +21219,7 @@ yy1444:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'R') goto yy1411;
-+			if (yych <= 'R') goto yy1413;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21029,13 +21228,13 @@ yy1444:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'r') goto yy1445;
-+				if (yych <= 'r') goto yy1447;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1445:
-+yy1447:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
-@@ -21050,7 +21249,7 @@ yy1445:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'R') goto yy1412;
-+			if (yych <= 'R') goto yy1414;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21059,13 +21258,13 @@ yy1445:
- 				if (yych <= '`') goto yy3;
- 				goto yy177;
- 			} else {
--				if (yych <= 'r') goto yy1446;
-+				if (yych <= 'r') goto yy1448;
- 				if (yych <= 'z') goto yy177;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1446:
-+yy1448:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'N') {
-@@ -21079,18 +21278,18 @@ yy1446:
- 		}
- 	} else {
- 		if (yych <= '`') {
--			if (yych <= 'O') goto yy1413;
-+			if (yych <= 'O') goto yy1415;
- 			if (yych == '_') goto yy172;
- 			goto yy3;
- 		} else {
--			if (yych == 'o') goto yy1447;
-+			if (yych == 'o') goto yy1449;
- 			if (yych <= 'z') goto yy178;
- 			goto yy3;
- 		}
- 	}
--yy1447:
-+yy1449:
- 	yych = *++YYCURSOR;
--	if (yych == 'W') goto yy1414;
-+	if (yych == 'W') goto yy1416;
- 	if (yych != 'w') goto yy179;
- 	yyaccept = 29;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -21099,13 +21298,13 @@ yy1447:
- 	}
- 	if (yych <= '.') {
- 		if (yych == '-') goto yy172;
--		goto yy1415;
-+		goto yy1417;
- 	} else {
- 		if (yych <= '/') goto yy172;
- 		if (yych == '_') goto yy172;
--		goto yy1415;
-+		goto yy1417;
- 	}
--yy1449:
-+yy1451:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'X') {
-@@ -21120,7 +21319,7 @@ yy1449:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'Y') goto yy1417;
-+			if (yych <= 'Y') goto yy1419;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21129,36 +21328,36 @@ yy1449:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'y') goto yy1450;
-+				if (yych <= 'y') goto yy1452;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1450:
-+yy1452:
- 	yyaccept = 30;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '/') {
- 		if (yych <= ',') {
- 			if (yych == ')') goto yy164;
--			goto yy1418;
-+			goto yy1420;
- 		} else {
--			if (yych == '.') goto yy1418;
-+			if (yych == '.') goto yy1420;
- 			goto yy172;
- 		}
- 	} else {
- 		if (yych <= '^') {
--			if (yych <= '@') goto yy1418;
-+			if (yych <= '@') goto yy1420;
- 			if (yych <= 'Z') goto yy169;
--			goto yy1418;
-+			goto yy1420;
- 		} else {
- 			if (yych <= '_') goto yy172;
--			if (yych <= '`') goto yy1418;
-+			if (yych <= '`') goto yy1420;
- 			if (yych <= 'z') goto yy177;
--			goto yy1418;
-+			goto yy1420;
- 		}
- 	}
--yy1451:
-+yy1453:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -21173,13 +21372,13 @@ yy1451:
- 			} else {
- 				if (yych <= '@') goto yy3;
- 				if (yych <= 'Q') goto yy167;
--				goto yy1425;
-+				goto yy1427;
- 			}
- 		}
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') {
--				if (yych <= 'S') goto yy1426;
-+				if (yych <= 'S') goto yy1428;
- 				goto yy167;
- 			} else {
- 				if (yych == '_') goto yy172;
-@@ -21188,15 +21387,15 @@ yy1451:
- 		} else {
- 			if (yych <= 'r') {
- 				if (yych <= 'q') goto yy175;
--				goto yy1457;
-+				goto yy1459;
- 			} else {
--				if (yych <= 's') goto yy1458;
-+				if (yych <= 's') goto yy1460;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1452:
-+yy1454:
- 	yyaccept = 4;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
-@@ -21211,7 +21410,7 @@ yy1452:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'R') goto yy1421;
-+			if (yych <= 'R') goto yy1423;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy191;
- 			goto yy172;
-@@ -21220,13 +21419,13 @@ yy1452:
- 				if (yych <= '`') goto yy191;
- 				goto yy175;
- 			} else {
--				if (yych <= 'r') goto yy1453;
-+				if (yych <= 'r') goto yy1455;
- 				if (yych <= 'z') goto yy175;
- 				goto yy191;
- 			}
- 		}
- 	}
--yy1453:
-+yy1455:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -21241,7 +21440,7 @@ yy1453:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'S') goto yy1422;
-+			if (yych <= 'S') goto yy1424;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21250,13 +21449,13 @@ yy1453:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 's') goto yy1454;
-+				if (yych <= 's') goto yy1456;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1454:
-+yy1456:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
-@@ -21271,7 +21470,7 @@ yy1454:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'D') goto yy1423;
-+			if (yych <= 'D') goto yy1425;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21280,13 +21479,13 @@ yy1454:
- 				if (yych <= '`') goto yy3;
- 				goto yy177;
- 			} else {
--				if (yych <= 'd') goto yy1455;
-+				if (yych <= 'd') goto yy1457;
- 				if (yych <= 'z') goto yy177;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1455:
-+yy1457:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '@') {
-@@ -21300,22 +21499,22 @@ yy1455:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'A') goto yy1424;
-+			if (yych <= 'A') goto yy1426;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
- 		} else {
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1456;
-+			if (yych <= 'a') goto yy1458;
- 			if (yych <= 'z') goto yy178;
- 			goto yy3;
- 		}
- 	}
--yy1456:
-+yy1458:
- 	yych = *++YYCURSOR;
- 	if (yych == 'Y') goto yy197;
- 	if (yych == 'y') goto yy210;
- 	goto yy179;
--yy1457:
-+yy1459:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
-@@ -21345,7 +21544,7 @@ yy1457:
- 			}
- 		}
- 	}
--yy1458:
-+yy1460:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '-') {
-@@ -21374,7 +21573,7 @@ yy1458:
- 			}
- 		}
- 	}
--yy1459:
-+yy1461:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -21389,7 +21588,7 @@ yy1459:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1428;
-+			if (yych <= 'T') goto yy1430;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21398,13 +21597,13 @@ yy1459:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 't') goto yy1460;
-+				if (yych <= 't') goto yy1462;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1460:
-+yy1462:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -21434,30 +21633,30 @@ yy1460:
- 			}
- 		}
- 	}
--yy1461:
-+yy1463:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'Y') {
- 		if (yych <= '@') {
- 			if (yych == ')') goto yy164;
- 			goto yy3;
- 		} else {
--			if (yych == 'R') goto yy1473;
-+			if (yych == 'R') goto yy1475;
- 			if (yych <= 'X') goto yy166;
--			goto yy1474;
-+			goto yy1476;
- 		}
- 	} else {
- 		if (yych <= 'r') {
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '`') goto yy3;
- 			if (yych <= 'q') goto yy166;
--			goto yy1473;
-+			goto yy1475;
- 		} else {
--			if (yych == 'y') goto yy1474;
-+			if (yych == 'y') goto yy1476;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1462:
-+yy1464:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'D') {
- 		if (yych <= ')') {
-@@ -21466,7 +21665,7 @@ yy1462:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'C') goto yy166;
--			goto yy1467;
-+			goto yy1469;
- 		}
- 	} else {
- 		if (yych <= 'c') {
-@@ -21474,12 +21673,12 @@ yy1462:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'd') goto yy1467;
-+			if (yych <= 'd') goto yy1469;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1463:
-+yy1465:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'N') {
- 		if (yych <= ')') {
-@@ -21495,12 +21694,12 @@ yy1463:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'n') goto yy1464;
-+			if (yych <= 'n') goto yy1466;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1464:
-+yy1466:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'D') {
- 		if (yych <= ')') {
-@@ -21516,12 +21715,12 @@ yy1464:
- 			if (yych <= '`') goto yy191;
- 			goto yy167;
- 		} else {
--			if (yych <= 'd') goto yy1465;
-+			if (yych <= 'd') goto yy1467;
- 			if (yych <= 'z') goto yy167;
- 			goto yy191;
- 		}
- 	}
--yy1465:
-+yy1467:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'A') {
- 		if (yych == ')') goto yy164;
-@@ -21531,12 +21730,12 @@ yy1465:
- 			if (yych <= 'Z') goto yy168;
- 			goto yy3;
- 		} else {
--			if (yych <= 'a') goto yy1466;
-+			if (yych <= 'a') goto yy1468;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1466:
-+yy1468:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'Y') {
- 		if (yych <= ')') {
-@@ -21558,7 +21757,7 @@ yy1466:
- 			goto yy3;
- 		}
- 	}
--yy1467:
-+yy1469:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'N') {
- 		if (yych <= ')') {
-@@ -21574,12 +21773,12 @@ yy1467:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 'n') goto yy1468;
-+			if (yych <= 'n') goto yy1470;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1468:
-+yy1470:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'I') {
- 		if (yych <= ')') {
-@@ -21595,12 +21794,12 @@ yy1468:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'i') goto yy1469;
-+			if (yych <= 'i') goto yy1471;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1469:
-+yy1471:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'G') {
- 		if (yych <= ')') {
-@@ -21616,29 +21815,29 @@ yy1469:
- 			if (yych <= '`') goto yy3;
- 			goto yy169;
- 		} else {
--			if (yych <= 'g') goto yy1470;
-+			if (yych <= 'g') goto yy1472;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1470:
-+yy1472:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
- 		if (yych == ')') goto yy164;
- 		goto yy3;
- 	} else {
--		if (yych <= 'H') goto yy1471;
-+		if (yych <= 'H') goto yy1473;
- 		if (yych != 'h') goto yy3;
- 	}
--yy1471:
-+yy1473:
- 	yych = *++YYCURSOR;
--	if (yych == 'T') goto yy1472;
-+	if (yych == 'T') goto yy1474;
- 	if (yych != 't') goto yy56;
--yy1472:
-+yy1474:
- 	yych = *++YYCURSOR;
--	goto yy1418;
--yy1473:
-+	goto yy1420;
-+yy1475:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '/') {
-@@ -21666,7 +21865,7 @@ yy1473:
- 				if (yych <= '9') goto yy220;
- 				goto yy218;
- 			} else {
--				if (yych == 'C') goto yy1475;
-+				if (yych == 'C') goto yy1477;
- 				goto yy167;
- 			}
- 		} else {
-@@ -21674,13 +21873,13 @@ yy1473:
- 				if (yych <= '`') goto yy218;
- 				goto yy167;
- 			} else {
--				if (yych <= 'c') goto yy1475;
-+				if (yych <= 'c') goto yy1477;
- 				if (yych <= 'z') goto yy167;
- 				goto yy218;
- 			}
- 		}
- 	}
--yy1474:
-+yy1476:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '-') {
-@@ -21705,7 +21904,7 @@ yy1474:
- 			goto yy218;
- 		}
- 	}
--yy1475:
-+yy1477:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'H') {
- 		if (yych <= ')') {
-@@ -21727,7 +21926,7 @@ yy1475:
- 			goto yy3;
- 		}
- 	}
--yy1476:
-+yy1478:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'X') {
-@@ -21744,14 +21943,14 @@ yy1476:
- 				if (yych <= '/') goto yy172;
- 				goto yy3;
- 			} else {
--				if (yych == 'R') goto yy1473;
-+				if (yych == 'R') goto yy1475;
- 				goto yy166;
- 			}
- 		}
- 	} else {
- 		if (yych <= '`') {
- 			if (yych <= 'Z') {
--				if (yych <= 'Y') goto yy1474;
-+				if (yych <= 'Y') goto yy1476;
- 				goto yy166;
- 			} else {
- 				if (yych == '_') goto yy172;
-@@ -21759,16 +21958,16 @@ yy1476:
- 			}
- 		} else {
- 			if (yych <= 'x') {
--				if (yych == 'r') goto yy1488;
-+				if (yych == 'r') goto yy1490;
- 				goto yy171;
- 			} else {
--				if (yych <= 'y') goto yy1489;
-+				if (yych <= 'y') goto yy1491;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1477:
-+yy1479:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
-@@ -21783,7 +21982,7 @@ yy1477:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'D') goto yy1467;
-+			if (yych <= 'D') goto yy1469;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21792,13 +21991,13 @@ yy1477:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'd') goto yy1482;
-+				if (yych <= 'd') goto yy1484;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1478:
-+yy1480:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'M') {
-@@ -21813,7 +22012,7 @@ yy1478:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'N') goto yy1464;
-+			if (yych <= 'N') goto yy1466;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21822,13 +22021,13 @@ yy1478:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'n') goto yy1479;
-+				if (yych <= 'n') goto yy1481;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1479:
-+yy1481:
- 	yyaccept = 4;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
-@@ -21843,7 +22042,7 @@ yy1479:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'D') goto yy1465;
-+			if (yych <= 'D') goto yy1467;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy191;
- 			goto yy172;
-@@ -21852,13 +22051,13 @@ yy1479:
- 				if (yych <= '`') goto yy191;
- 				goto yy175;
- 			} else {
--				if (yych <= 'd') goto yy1480;
-+				if (yych <= 'd') goto yy1482;
- 				if (yych <= 'z') goto yy175;
- 				goto yy191;
- 			}
- 		}
- 	}
--yy1480:
-+yy1482:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '@') {
-@@ -21872,18 +22071,18 @@ yy1480:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'A') goto yy1466;
-+			if (yych <= 'A') goto yy1468;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
- 		} else {
- 			if (yych <= '`') goto yy3;
--			if (yych <= 'a') goto yy1481;
-+			if (yych <= 'a') goto yy1483;
- 			if (yych <= 'z') goto yy176;
- 			goto yy3;
- 		}
- 	}
--yy1481:
-+yy1483:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'X') {
-@@ -21913,7 +22112,7 @@ yy1481:
- 			}
- 		}
- 	}
--yy1482:
-+yy1484:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'M') {
-@@ -21928,7 +22127,7 @@ yy1482:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'N') goto yy1468;
-+			if (yych <= 'N') goto yy1470;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21937,13 +22136,13 @@ yy1482:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 'n') goto yy1483;
-+				if (yych <= 'n') goto yy1485;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1483:
-+yy1485:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'H') {
-@@ -21958,7 +22157,7 @@ yy1483:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'I') goto yy1469;
-+			if (yych <= 'I') goto yy1471;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21967,13 +22166,13 @@ yy1483:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'i') goto yy1484;
-+				if (yych <= 'i') goto yy1486;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1484:
-+yy1486:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'F') {
-@@ -21988,7 +22187,7 @@ yy1484:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'G') goto yy1470;
-+			if (yych <= 'G') goto yy1472;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -21997,13 +22196,13 @@ yy1484:
- 				if (yych <= '`') goto yy3;
- 				goto yy177;
- 			} else {
--				if (yych <= 'g') goto yy1485;
-+				if (yych <= 'g') goto yy1487;
- 				if (yych <= 'z') goto yy177;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1485:
-+yy1487:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -22017,18 +22216,18 @@ yy1485:
- 		}
- 	} else {
- 		if (yych <= '`') {
--			if (yych <= 'H') goto yy1471;
-+			if (yych <= 'H') goto yy1473;
- 			if (yych == '_') goto yy172;
- 			goto yy3;
- 		} else {
--			if (yych == 'h') goto yy1486;
-+			if (yych == 'h') goto yy1488;
- 			if (yych <= 'z') goto yy178;
- 			goto yy3;
- 		}
- 	}
--yy1486:
-+yy1488:
- 	yych = *++YYCURSOR;
--	if (yych == 'T') goto yy1472;
-+	if (yych == 'T') goto yy1474;
- 	if (yych != 't') goto yy179;
- 	yyaccept = 30;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -22037,13 +22236,13 @@ yy1486:
- 	}
- 	if (yych <= '.') {
- 		if (yych == '-') goto yy172;
--		goto yy1418;
-+		goto yy1420;
- 	} else {
- 		if (yych <= '/') goto yy172;
- 		if (yych == '_') goto yy172;
--		goto yy1418;
-+		goto yy1420;
- 	}
--yy1488:
-+yy1490:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '9') {
-@@ -22071,7 +22270,7 @@ yy1488:
- 				if (yych <= '@') goto yy218;
- 				goto yy167;
- 			} else {
--				if (yych <= 'C') goto yy1475;
-+				if (yych <= 'C') goto yy1477;
- 				if (yych <= 'Z') goto yy167;
- 				goto yy218;
- 			}
-@@ -22081,13 +22280,13 @@ yy1488:
- 				if (yych <= '`') goto yy218;
- 				goto yy175;
- 			} else {
--				if (yych <= 'c') goto yy1490;
-+				if (yych <= 'c') goto yy1492;
- 				if (yych <= 'z') goto yy175;
- 				goto yy218;
- 			}
- 		}
- 	}
--yy1489:
-+yy1491:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '.') {
-@@ -22122,7 +22321,7 @@ yy1489:
- 			}
- 		}
- 	}
--yy1490:
-+yy1492:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -22152,7 +22351,7 @@ yy1490:
- 			}
- 		}
- 	}
--yy1491:
-+yy1493:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'W') {
- 		if (yych <= 'N') {
-@@ -22160,29 +22359,29 @@ yy1491:
- 			if (yych <= '@') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'O') goto yy1499;
-+			if (yych <= 'O') goto yy1501;
- 			if (yych <= 'U') goto yy166;
--			if (yych <= 'V') goto yy1500;
--			goto yy1497;
-+			if (yych <= 'V') goto yy1502;
-+			goto yy1499;
- 		}
- 	} else {
- 		if (yych <= 'o') {
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '`') goto yy3;
- 			if (yych <= 'n') goto yy166;
--			goto yy1499;
-+			goto yy1501;
- 		} else {
- 			if (yych <= 'v') {
- 				if (yych <= 'u') goto yy166;
--				goto yy1500;
-+				goto yy1502;
- 			} else {
--				if (yych <= 'w') goto yy1497;
-+				if (yych <= 'w') goto yy1499;
- 				if (yych <= 'z') goto yy166;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1492:
-+yy1494:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'X') {
- 		if (yych <= ')') {
-@@ -22191,7 +22390,7 @@ yy1492:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'W') goto yy166;
--			goto yy1496;
-+			goto yy1498;
- 		}
- 	} else {
- 		if (yych <= 'w') {
-@@ -22199,12 +22398,12 @@ yy1492:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'x') goto yy1496;
-+			if (yych <= 'x') goto yy1498;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1493:
-+yy1495:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'N') {
- 		if (yych <= ')') {
-@@ -22220,12 +22419,12 @@ yy1493:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 'n') goto yy1494;
-+			if (yych <= 'n') goto yy1496;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1494:
-+yy1496:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -22241,12 +22440,12 @@ yy1494:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 't') goto yy1495;
-+			if (yych <= 't') goto yy1497;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1495:
-+yy1497:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'H') {
- 		if (yych <= ')') {
-@@ -22268,7 +22467,7 @@ yy1495:
- 			goto yy3;
- 		}
- 	}
--yy1496:
-+yy1498:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -22277,7 +22476,7 @@ yy1496:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'S') goto yy167;
--			goto yy1426;
-+			goto yy1428;
- 		}
- 	} else {
- 		if (yych <= 's') {
-@@ -22285,21 +22484,22 @@ yy1496:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 't') goto yy1426;
-+			if (yych <= 't') goto yy1428;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1497:
-+yy1499:
- 	++YYCURSOR;
- 	if ((yych = *YYCURSOR) <= '@') {
- 		if (yych == ')') goto yy164;
- 	} else {
- 		if (yych <= 'Z') goto yy167;
--		if (yych <= '`') goto yy1498;
-+		if (yych <= '`') goto yy1500;
- 		if (yych <= 'z') goto yy167;
- 	}
--yy1498:
-+yy1500:
-+#line 982 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("now");
- 		TIMELIB_INIT;
-@@ -22307,7 +22507,8 @@ yy1498:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
--yy1499:
-+#line 22511 "ext/date/lib/parse_date.c"
-+yy1501:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'N') {
- 		if (yych <= ')') {
-@@ -22316,7 +22517,7 @@ yy1499:
- 		} else {
- 			if (yych <= '@') goto yy3;
- 			if (yych <= 'M') goto yy167;
--			goto yy1505;
-+			goto yy1507;
- 		}
- 	} else {
- 		if (yych <= 'm') {
-@@ -22324,12 +22525,12 @@ yy1499:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 'n') goto yy1505;
-+			if (yych <= 'n') goto yy1507;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1500:
-+yy1502:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '/') {
-@@ -22364,13 +22565,13 @@ yy1500:
- 				if (yych <= '`') goto yy218;
- 				goto yy167;
- 			} else {
--				if (yych <= 'e') goto yy1501;
-+				if (yych <= 'e') goto yy1503;
- 				if (yych <= 'z') goto yy167;
- 				goto yy218;
- 			}
- 		}
- 	}
--yy1501:
-+yy1503:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'M') {
- 		if (yych <= ')') {
-@@ -22386,12 +22587,12 @@ yy1501:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'm') goto yy1502;
-+			if (yych <= 'm') goto yy1504;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1502:
-+yy1504:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'B') {
- 		if (yych <= ')') {
-@@ -22407,36 +22608,37 @@ yy1502:
- 			if (yych <= '`') goto yy3;
- 			goto yy169;
- 		} else {
--			if (yych <= 'b') goto yy1503;
-+			if (yych <= 'b') goto yy1505;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1503:
-+yy1505:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'D') {
- 		if (yych == ')') goto yy164;
- 		goto yy3;
- 	} else {
--		if (yych <= 'E') goto yy1504;
-+		if (yych <= 'E') goto yy1506;
- 		if (yych != 'e') goto yy3;
- 	}
--yy1504:
-+yy1506:
- 	yych = *++YYCURSOR;
- 	if (yych == 'R') goto yy229;
- 	if (yych == 'r') goto yy229;
- 	goto yy56;
--yy1505:
-+yy1507:
- 	++YYCURSOR;
- 	if ((yych = *YYCURSOR) <= '@') {
- 		if (yych == ')') goto yy164;
- 	} else {
- 		if (yych <= 'Z') goto yy168;
--		if (yych <= '`') goto yy1506;
-+		if (yych <= '`') goto yy1508;
- 		if (yych <= 'z') goto yy168;
- 	}
--yy1506:
-+yy1508:
-+#line 991 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("noon");
- 		TIMELIB_INIT;
-@@ -22447,7 +22649,8 @@ yy1506:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
--yy1507:
-+#line 22653 "ext/date/lib/parse_date.c"
-+yy1509:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'V') {
-@@ -22465,15 +22668,15 @@ yy1507:
- 				if (yych <= '@') goto yy3;
- 				goto yy166;
- 			} else {
--				if (yych <= 'O') goto yy1499;
-+				if (yych <= 'O') goto yy1501;
- 				if (yych <= 'U') goto yy166;
--				goto yy1500;
-+				goto yy1502;
- 			}
- 		}
- 	} else {
- 		if (yych <= 'n') {
- 			if (yych <= '^') {
--				if (yych <= 'W') goto yy1497;
-+				if (yych <= 'W') goto yy1499;
- 				if (yych <= 'Z') goto yy166;
- 				goto yy3;
- 			} else {
-@@ -22483,17 +22686,17 @@ yy1507:
- 			}
- 		} else {
- 			if (yych <= 'v') {
--				if (yych <= 'o') goto yy1514;
-+				if (yych <= 'o') goto yy1516;
- 				if (yych <= 'u') goto yy171;
--				goto yy1515;
-+				goto yy1517;
- 			} else {
--				if (yych <= 'w') goto yy1513;
-+				if (yych <= 'w') goto yy1515;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1508:
-+yy1510:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'W') {
-@@ -22508,7 +22711,7 @@ yy1508:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'X') goto yy1496;
-+			if (yych <= 'X') goto yy1498;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22517,13 +22720,13 @@ yy1508:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'x') goto yy1512;
-+				if (yych <= 'x') goto yy1514;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1509:
-+yy1511:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'M') {
-@@ -22538,7 +22741,7 @@ yy1509:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'N') goto yy1494;
-+			if (yych <= 'N') goto yy1496;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22547,13 +22750,13 @@ yy1509:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 'n') goto yy1510;
-+				if (yych <= 'n') goto yy1512;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1510:
-+yy1512:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -22568,7 +22771,7 @@ yy1510:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1495;
-+			if (yych <= 'T') goto yy1497;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22577,13 +22780,13 @@ yy1510:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 't') goto yy1511;
-+				if (yych <= 't') goto yy1513;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1511:
-+yy1513:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'G') {
-@@ -22613,7 +22816,7 @@ yy1511:
- 			}
- 		}
- 	}
--yy1512:
-+yy1514:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -22628,7 +22831,7 @@ yy1512:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1426;
-+			if (yych <= 'T') goto yy1428;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22637,36 +22840,36 @@ yy1512:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 't') goto yy1458;
-+				if (yych <= 't') goto yy1460;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1513:
-+yy1515:
- 	yyaccept = 31;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '/') {
- 		if (yych <= ',') {
- 			if (yych == ')') goto yy164;
--			goto yy1498;
-+			goto yy1500;
- 		} else {
--			if (yych == '.') goto yy1498;
-+			if (yych == '.') goto yy1500;
- 			goto yy172;
- 		}
- 	} else {
- 		if (yych <= '^') {
--			if (yych <= '@') goto yy1498;
-+			if (yych <= '@') goto yy1500;
- 			if (yych <= 'Z') goto yy167;
--			goto yy1498;
-+			goto yy1500;
- 		} else {
- 			if (yych <= '_') goto yy172;
--			if (yych <= '`') goto yy1498;
-+			if (yych <= '`') goto yy1500;
- 			if (yych <= 'z') goto yy175;
--			goto yy1498;
-+			goto yy1500;
- 		}
- 	}
--yy1514:
-+yy1516:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'M') {
-@@ -22681,7 +22884,7 @@ yy1514:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'N') goto yy1505;
-+			if (yych <= 'N') goto yy1507;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22690,13 +22893,13 @@ yy1514:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 'n') goto yy1520;
-+				if (yych <= 'n') goto yy1522;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1515:
-+yy1517:
- 	yyaccept = 5;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '9') {
-@@ -22724,7 +22927,7 @@ yy1515:
- 				if (yych <= '@') goto yy218;
- 				goto yy167;
- 			} else {
--				if (yych <= 'E') goto yy1501;
-+				if (yych <= 'E') goto yy1503;
- 				if (yych <= 'Z') goto yy167;
- 				goto yy218;
- 			}
-@@ -22734,13 +22937,13 @@ yy1515:
- 				if (yych <= '`') goto yy218;
- 				goto yy175;
- 			} else {
--				if (yych <= 'e') goto yy1516;
-+				if (yych <= 'e') goto yy1518;
- 				if (yych <= 'z') goto yy175;
- 				goto yy218;
- 			}
- 		}
- 	}
--yy1516:
-+yy1518:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'L') {
-@@ -22755,7 +22958,7 @@ yy1516:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'M') goto yy1502;
-+			if (yych <= 'M') goto yy1504;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22764,13 +22967,13 @@ yy1516:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'm') goto yy1517;
-+				if (yych <= 'm') goto yy1519;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1517:
-+yy1519:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'A') {
-@@ -22785,7 +22988,7 @@ yy1517:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'B') goto yy1503;
-+			if (yych <= 'B') goto yy1505;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22794,13 +22997,13 @@ yy1517:
- 				if (yych <= '`') goto yy3;
- 				goto yy177;
- 			} else {
--				if (yych <= 'b') goto yy1518;
-+				if (yych <= 'b') goto yy1520;
- 				if (yych <= 'z') goto yy177;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1518:
-+yy1520:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'D') {
-@@ -22814,44 +23017,44 @@ yy1518:
- 		}
- 	} else {
- 		if (yych <= '`') {
--			if (yych <= 'E') goto yy1504;
-+			if (yych <= 'E') goto yy1506;
- 			if (yych == '_') goto yy172;
- 			goto yy3;
- 		} else {
--			if (yych == 'e') goto yy1519;
-+			if (yych == 'e') goto yy1521;
- 			if (yych <= 'z') goto yy178;
- 			goto yy3;
- 		}
- 	}
--yy1519:
-+yy1521:
- 	yych = *++YYCURSOR;
- 	if (yych == 'R') goto yy229;
- 	if (yych == 'r') goto yy341;
- 	goto yy179;
--yy1520:
-+yy1522:
- 	yyaccept = 32;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= '/') {
- 		if (yych <= ',') {
- 			if (yych == ')') goto yy164;
--			goto yy1506;
-+			goto yy1508;
- 		} else {
--			if (yych == '.') goto yy1506;
-+			if (yych == '.') goto yy1508;
- 			goto yy172;
- 		}
- 	} else {
- 		if (yych <= '^') {
--			if (yych <= '@') goto yy1506;
-+			if (yych <= '@') goto yy1508;
- 			if (yych <= 'Z') goto yy168;
--			goto yy1506;
-+			goto yy1508;
- 		} else {
- 			if (yych <= '_') goto yy172;
--			if (yych <= '`') goto yy1506;
-+			if (yych <= '`') goto yy1508;
- 			if (yych <= 'z') goto yy176;
--			goto yy1506;
-+			goto yy1508;
- 		}
- 	}
--yy1521:
-+yy1523:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'S') {
- 		if (yych <= ')') {
-@@ -22867,12 +23070,12 @@ yy1521:
- 			if (yych <= '`') goto yy3;
- 			goto yy166;
- 		} else {
--			if (yych <= 's') goto yy1522;
-+			if (yych <= 's') goto yy1524;
- 			if (yych <= 'z') goto yy166;
- 			goto yy3;
- 		}
- 	}
--yy1522:
-+yy1524:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'T') {
- 		if (yych <= ')') {
-@@ -22888,12 +23091,12 @@ yy1522:
- 			if (yych <= '`') goto yy3;
- 			goto yy167;
- 		} else {
--			if (yych <= 't') goto yy1523;
-+			if (yych <= 't') goto yy1525;
- 			if (yych <= 'z') goto yy167;
- 			goto yy3;
- 		}
- 	}
--yy1523:
-+yy1525:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'E') {
- 		if (yych <= ')') {
-@@ -22909,12 +23112,12 @@ yy1523:
- 			if (yych <= '`') goto yy3;
- 			goto yy168;
- 		} else {
--			if (yych <= 'e') goto yy1524;
-+			if (yych <= 'e') goto yy1526;
- 			if (yych <= 'z') goto yy168;
- 			goto yy3;
- 		}
- 	}
--yy1524:
-+yy1526:
- 	yych = *++YYCURSOR;
- 	if (yych <= 'R') {
- 		if (yych <= ')') {
-@@ -22930,32 +23133,33 @@ yy1524:
- 			if (yych <= '`') goto yy3;
- 			goto yy169;
- 		} else {
--			if (yych <= 'r') goto yy1525;
-+			if (yych <= 'r') goto yy1527;
- 			if (yych <= 'z') goto yy169;
- 			goto yy3;
- 		}
- 	}
--yy1525:
-+yy1527:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
- 		if (yych == ')') goto yy164;
- 		goto yy3;
- 	} else {
--		if (yych <= 'D') goto yy1526;
-+		if (yych <= 'D') goto yy1528;
- 		if (yych != 'd') goto yy3;
- 	}
--yy1526:
-+yy1528:
- 	yych = *++YYCURSOR;
--	if (yych == 'A') goto yy1527;
-+	if (yych == 'A') goto yy1529;
- 	if (yych != 'a') goto yy56;
--yy1527:
-+yy1529:
- 	yych = *++YYCURSOR;
--	if (yych == 'Y') goto yy1528;
-+	if (yych == 'Y') goto yy1530;
- 	if (yych != 'y') goto yy56;
--yy1528:
-+yy1530:
- 	++YYCURSOR;
--yy1529:
-+yy1531:
-+#line 970 "ext/date/lib/parse_date.re"
- 	{
- 		DEBUG_OUTPUT("yesterday");
- 		TIMELIB_INIT;
-@@ -22966,7 +23170,8 @@ yy1529:
- 		TIMELIB_DEINIT;
- 		return TIMELIB_RELATIVE;
- 	}
--yy1530:
-+#line 23174 "ext/date/lib/parse_date.c"
-+yy1532:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'R') {
-@@ -22981,7 +23186,7 @@ yy1530:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'S') goto yy1522;
-+			if (yych <= 'S') goto yy1524;
- 			if (yych <= 'Z') goto yy166;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -22990,13 +23195,13 @@ yy1530:
- 				if (yych <= '`') goto yy3;
- 				goto yy171;
- 			} else {
--				if (yych <= 's') goto yy1531;
-+				if (yych <= 's') goto yy1533;
- 				if (yych <= 'z') goto yy171;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1531:
-+yy1533:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'S') {
-@@ -23011,7 +23216,7 @@ yy1531:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'T') goto yy1523;
-+			if (yych <= 'T') goto yy1525;
- 			if (yych <= 'Z') goto yy167;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -23020,13 +23225,13 @@ yy1531:
- 				if (yych <= '`') goto yy3;
- 				goto yy175;
- 			} else {
--				if (yych <= 't') goto yy1532;
-+				if (yych <= 't') goto yy1534;
- 				if (yych <= 'z') goto yy175;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1532:
-+yy1534:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'D') {
-@@ -23041,7 +23246,7 @@ yy1532:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'E') goto yy1524;
-+			if (yych <= 'E') goto yy1526;
- 			if (yych <= 'Z') goto yy168;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -23050,13 +23255,13 @@ yy1532:
- 				if (yych <= '`') goto yy3;
- 				goto yy176;
- 			} else {
--				if (yych <= 'e') goto yy1533;
-+				if (yych <= 'e') goto yy1535;
- 				if (yych <= 'z') goto yy176;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1533:
-+yy1535:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'Q') {
-@@ -23071,7 +23276,7 @@ yy1533:
- 		}
- 	} else {
- 		if (yych <= '_') {
--			if (yych <= 'R') goto yy1525;
-+			if (yych <= 'R') goto yy1527;
- 			if (yych <= 'Z') goto yy169;
- 			if (yych <= '^') goto yy3;
- 			goto yy172;
-@@ -23080,13 +23285,13 @@ yy1533:
- 				if (yych <= '`') goto yy3;
- 				goto yy177;
- 			} else {
--				if (yych <= 'r') goto yy1534;
-+				if (yych <= 'r') goto yy1536;
- 				if (yych <= 'z') goto yy177;
- 				goto yy3;
- 			}
- 		}
- 	}
--yy1534:
-+yy1536:
- 	yyaccept = 0;
- 	yych = *(YYMARKER = ++YYCURSOR);
- 	if (yych <= 'C') {
-@@ -23100,21 +23305,21 @@ yy1534:
- 		}
- 	} else {
- 		if (yych <= '`') {
--			if (yych <= 'D') goto yy1526;
-+			if (yych <= 'D') goto yy1528;
- 			if (yych == '_') goto yy172;
- 			goto yy3;
- 		} else {
--			if (yych == 'd') goto yy1535;
-+			if (yych == 'd') goto yy1537;
- 			if (yych <= 'z') goto yy178;
- 			goto yy3;
- 		}
- 	}
--yy1535:
-+yy1537:
- 	yych = *++YYCURSOR;
--	if (yych == 'A') goto yy1527;
-+	if (yych == 'A') goto yy1529;
- 	if (yych != 'a') goto yy179;
- 	yych = *++YYCURSOR;
--	if (yych == 'Y') goto yy1528;
-+	if (yych == 'Y') goto yy1530;
- 	if (yych != 'y') goto yy179;
- 	yyaccept = 33;
- 	yych = *(YYMARKER = ++YYCURSOR);
-@@ -23123,13 +23328,14 @@ yy1535:
- 	}
- 	if (yych <= '.') {
- 		if (yych == '-') goto yy172;
--		goto yy1529;
-+		goto yy1531;
- 	} else {
- 		if (yych <= '/') goto yy172;
- 		if (yych == '_') goto yy172;
--		goto yy1529;
-+		goto yy1531;
- 	}
- }
-+#line 1772 "ext/date/lib/parse_date.re"
- 
- }
- 
-diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
-index 74d9ea3..f26e276 100644
---- a/ext/date/lib/parse_date.re
-+++ b/ext/date/lib/parse_date.re
-@@ -931,8 +931,8 @@ isoweek          = year4 "-"? "W" weekofyear;
- exif             = year4 ":" monthlz ":" daylz " " hour24lz ":" minutelz ":" secondlz;
- firstdayof       = 'first day of';
- lastdayof        = 'last day of';
--backof           = 'back of ' hour24 space? meridian?;
--frontof          = 'front of ' hour24 space? meridian?;
-+backof           = 'back of ' hour24 (space? meridian)?;
-+frontof          = 'front of ' hour24 (space? meridian)?;
- 
- /* Common Log Format: 10/Oct/2000:13:55:36 -0700 */
- clf              = day "/" monthabbr "/" year4 ":" hour24lz ":" minutelz ":" secondlz space tzcorrection;
-diff --git a/ext/date/tests/bug53437_var3.phpt b/ext/date/tests/bug53437_var3.phpt
-index 8f48b1b..8dcd4c8 100644
---- a/ext/date/tests/bug53437_var3.phpt
-+++ b/ext/date/tests/bug53437_var3.phpt
-@@ -40,7 +40,7 @@ object(DateInterval)#%d (16) {
-   ["special_amount"]=>
-   int(-1)
-   ["have_weekday_relative"]=>
--  int(9)
-+  int(0)
-   ["have_special_relative"]=>
-   int(0)
-   ["f"]=>
-diff --git a/ext/wddx/tests/bug75055.phpt b/ext/wddx/tests/bug75055.phpt
-new file mode 100644
-index 0000000..2956284
---- /dev/null
-+++ b/ext/wddx/tests/bug75055.phpt
-@@ -0,0 +1,20 @@
-+--TEST--
-+Bug #75055 Out-Of-Bounds Read in timelib_meridian()
-+--SKIPIF--
-+<?php if (!extension_loaded("wddx")) print "skip"; ?>
-+--FILE--
-+<?php
-+
-+$file_str = dirname(__FILE__) . "/bug75055.wddx";
-+
-+$wddx_str = file_get_contents($file_str);
-+print strlen($wddx_str) . " bytes read.\n";
-+
-+var_dump(wddx_deserialize($wddx_str));
-+?>
-+--EXPECT--
-+323 bytes read.
-+array(1) {
-+  ["aDateTime"]=>
-+  string(12) "frONt of 0 0"
-+}
-diff --git a/ext/wddx/tests/bug75055.wddx b/ext/wddx/tests/bug75055.wddx
-new file mode 100644
-index 0000000..6493352
---- /dev/null
-+++ b/ext/wddx/tests/bug75055.wddx
-@@ -0,0 +1,13 @@
-+<?xml version='1.0'?>
-+<!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'>
-+<wddxPacket version='1.0'>
-+<header/>
-+	<data>
-+        	<struct>
-+                    <var name='aDateTime'>
-+                         <dateTime>frONt of 0 0</dateTime>
-+                     </var>
-+                </struct>
-+	</data>
-+</wddxPacket>
-+
--- 
-2.11.0
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
deleted file mode 100644
index 39c334f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-7.1.9/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-[PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK
-
-Upstream-Status: Pending
-
-AC_TRY_RUN is not suitable for cross-compile
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- ext/fileinfo/config.m4 | 31 ++++++-------------------------
- 1 file changed, 6 insertions(+), 25 deletions(-)
-
-diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4
-index 7e98d62..8a8ea0e 100644
---- a/ext/fileinfo/config.m4
-+++ b/ext/fileinfo/config.m4
-@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then
-     libmagic/readcdf.c libmagic/softmagic.c"
- 
-   AC_MSG_CHECKING([for strcasestr])
--  AC_TRY_RUN([
--#include <string.h>
--#include <strings.h>
--#include <stdlib.h>
--
--int main(void)
--{
--        char *s0, *s1, *ret;
--
--        s0 = (char *) malloc(42);
--        s1 = (char *) malloc(8);
--
--        memset(s0, 'X', 42);
--        s0[24] = 'Y';
--        s0[26] = 'Z';
--        s0[41] = '\0';
--        memset(s1, 'x', 8);
--        s1[0] = 'y';
--        s1[2] = 'Z';
--        s1[7] = '\0';
--
--        ret = strcasestr(s0, s1);
--
--        return !(NULL != ret);
--}
-+  AC_TRY_COMPILE([
-+     #include <string.h>
-+     #include <strings.h>
-+     #include <stdlib.h>
-+  ],[
-+     strcasestr(NULL, NULL);
-   ],[
-     dnl using the platform implementation
-     AC_MSG_RESULT(yes)
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php.inc b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php.inc
index 283d630..066b97c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php.inc
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php.inc
@@ -6,26 +6,22 @@
 
 BBCLASSEXTEND = "native"
 DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native \
-           openssl libmcrypt"
+           openssl"
 DEPENDS_class-native = "zlib-native libxml2-native"
 
 PHP_MAJOR_VERSION = "${@d.getVar('PV', True).split('.')[0]}"
 
 SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \
-           file://acinclude-xml2-config.patch \
            file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \
-           file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \
           "
 
 SRC_URI_append_class-target = " \
             file://iconv.patch \
             file://imap-fix-autofoo.patch \
-            file://pear-makefile.patch \
-            file://phar-makefile.patch \
             file://php_exec_native.patch \
             file://php-fpm.conf \
             file://php-fpm-apache.conf \
-            file://configure.patch \
+            file://0001-acinclude.m4-don-t-unset-cache-variables.patch \
             file://70_mod_php${PHP_MAJOR_VERSION}.conf \
             file://php-fpm.service \
           "
@@ -44,7 +40,6 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                        --enable-pcntl \
                        --enable-shared \
-                       --disable-opcache \
                        --disable-rpath \
                        --with-pic \
                        --libdir=${PHP_LIBDIR} \
@@ -57,20 +52,22 @@
                 --with-gettext=${STAGING_LIBDIR}/.. \
                 --with-zlib=${STAGING_LIBDIR}/.. \
                 --with-iconv=${STAGING_LIBDIR}/.. \
-                --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \
                 --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \
                 --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
+                ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
                 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \
                 ${COMMON_EXTRA_OECONF} \
 "
+
+CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes"
+
 EXTRA_OECONF_class-native = " \
                 --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
                 --without-iconv \
                 ${COMMON_EXTRA_OECONF} \
 "
 
-PACKAGECONFIG ??= "mysql sqlite3 imap \
+PACKAGECONFIG ??= "mysql sqlite3 imap opcache \
                    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
 "
 PACKAGECONFIG_class-native = ""
@@ -94,7 +91,7 @@
                        ,--without-imap --without-imap-ssl \
                        ,uw-imap"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
+PACKAGECONFIG[opcache] = ",--disable-opcache"
 
 export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
 export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
@@ -201,14 +198,14 @@
 
 MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}"
 
-PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
+PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}"
 
 RDEPENDS_${PN} += "libgcc"
 RDEPENDS_${PN}-pear = "${PN}"
 RDEPENDS_${PN}-phar = "${PN}-cli"
 RDEPENDS_${PN}-cli = "${PN}"
 RDEPENDS_${PN}-modphp = "${PN} apache2"
-RDEPENDS_${PN}-dev = "${PN}"
+RDEPENDS_${PN}-opcache = "${PN}"
 
 INITSCRIPT_PACKAGES = "${PN}-fpm"
 inherit update-rc.d
@@ -237,6 +234,8 @@
                 ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \
                 ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \
                 ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test"
+FILES_${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a"
+FILES_${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}"
 FILES_${PN} = "${PHP_LIBDIR}/php"
 FILES_${PN} += "${bindir}"
 
@@ -253,18 +252,6 @@
         PHP_PEAR_SYSCONF_DIR=${sysconfdir}/
 }
 
-SSTATEPOSTINSTFUNCS_append_class-native = " php_sstate_postinst "
-
-php_sstate_postinst() {
-    if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
-    then
-        head -n1 ${sysconfdir}/pear.conf > ${sysconfdir}/pear.tmp.conf
-        for p in `tail -n1  ${sysconfdir}/pear.conf | sed -s 's/;/ /g'`; do
-            echo $p | awk -F: 'BEGIN {OFS = ":"; ORS = ";"}{if(NF==3){print $1, length($3)-2*match($3, /^"/), $3} else {print $0}}';
-        done >> ${sysconfdir}/pear.tmp.conf
-        mv -f ${sysconfdir}/pear.tmp.conf ${sysconfdir}/pear.conf
-    fi
-}
 
 # Fails to build with thumb-1 (qemuarm)
 # | {standard input}: Assembler messages:
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/0001-Add-lpthread-to-link.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-Add-lpthread-to-link.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php-5.6.31/0001-Add-lpthread-to-link.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-Add-lpthread-to-link.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch
new file mode 100644
index 0000000..a250cac
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch
@@ -0,0 +1,39 @@
+From dfebe81f946a83fe2499fc84d4f3dbdc5612276c Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 3 Apr 2018 11:35:03 +0800
+Subject: [PATCH] acinclude.m4: don't unset cache variables
+
+Unsetting prevents cache variable from being passed to configure.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ acinclude.m4 | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index f6a55ec..d3346df 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -1890,8 +1890,6 @@ define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,]))
+ dnl
+ AC_DEFUN([PHP_CHECK_FUNC_LIB],[
+   ifelse($2,,:,[
+-  unset ac_cv_lib_$2[]_$1
+-  unset ac_cv_lib_$2[]___$1
+   unset found
+   AC_CHECK_LIB($2, $1, [found=yes], [
+     AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
+@@ -1923,8 +1921,6 @@ dnl in the default libraries and as a fall back in the specified library.
+ dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
+ dnl
+ AC_DEFUN([PHP_CHECK_FUNC],[
+-  unset ac_cv_func_$1
+-  unset ac_cv_func___$1
+   unset found
+   
+   AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch
new file mode 100644
index 0000000..1532926
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch
@@ -0,0 +1,56 @@
+From a2d146b8dd9d02f523d1e205d79792626a71dec3 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Mon, 2 Apr 2018 15:27:09 +0800
+Subject: [PATCH] acinclude.m4: skip binconfig check for libxml
+
+We want libxml flags to be picked up using pkg-config instead of the
+xml2-config file.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+---
+ acinclude.m4 | 29 -----------------------------
+ 1 file changed, 29 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index d42d708..d32766a 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2525,35 +2525,6 @@ dnl
+ AC_DEFUN([PHP_SETUP_LIBXML], [
+   found_libxml=no
+ 
+-  dnl First try to find xml2-config
+-  AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
+-  [
+-    for i in $PHP_LIBXML_DIR /usr/local /usr; do
+-      if test -x "$i/bin/xml2-config"; then
+-        ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+-        break
+-      fi
+-    done
+-  ])
+-
+-  if test -x "$ac_cv_php_xml2_config_path"; then
+-    XML2_CONFIG="$ac_cv_php_xml2_config_path"
+-    libxml_full_version=`$XML2_CONFIG --version`
+-    ac_IFS=$IFS
+-    IFS="."
+-    set $libxml_full_version
+-    IFS=$ac_IFS
+-    LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
+-    if test "$LIBXML_VERSION" -ge "2006011"; then
+-      found_libxml=yes
+-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+-      LIBXML_INCS=`$XML2_CONFIG --cflags`
+-    else
+-      AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
+-    fi
+-  fi
+-
+-  dnl If xml2-config fails, try pkg-config
+   if test "$found_libxml" = "no"; then
+     if test -z "$PKG_CONFIG"; then
+       AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-fix-error-caused-by-a-new-variable-is-declared-after.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-fix-error-caused-by-a-new-variable-is-declared-after.patch
new file mode 100644
index 0000000..6ab101b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-fix-error-caused-by-a-new-variable-is-declared-after.patch
@@ -0,0 +1,45 @@
+From 0d88d735887c6f2fa00a743c27124c7a52006a41 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sun, 15 Apr 2018 19:17:27 -0700
+Subject: [PATCH] fix error caused by a new variable is declared after the
+ label
+
+There is a build failure on mips:
+...
+|sljitNativeMIPS_common.c: In function 'sljit_has_cpu_feature':
+|sljitNativeMIPS_common.c:506:3: error: a label can only be part
+of a statement and a declaration is not a statement
+|   sljit_sw fir;
+|   ^~~~~~~~
+...
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c
+index ee207fe..adfd342 100644
+--- a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c
++++ b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c
+@@ -498,12 +498,14 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil
+ 
+ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type)
+ {
++#if defined(__GNUC__)
++	sljit_sw fir;
++#endif
+ 	switch (feature_type) {
+ 	case SLJIT_HAS_FPU:
+ #ifdef SLJIT_IS_FPU_AVAILABLE
+ 		return SLJIT_IS_FPU_AVAILABLE;
+ #elif defined(__GNUC__)
+-		sljit_sw fir;
+ 		asm ("cfc1 %0, $0" : "=r"(fir));
+ 		return (fir >> 22) & 0x1;
+ #else
+-- 
+2.10.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch
new file mode 100644
index 0000000..fce9738
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch
@@ -0,0 +1,63 @@
+From 2842aa2a078eb1cad55540b61e7edf111395150d Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Mon, 26 Feb 2018 19:30:55 +0100
+Subject: [PATCH] main/php_ini.c: build empty php_load_zend_extension_cb() when
+ !HAVE_LIBDL
+
+Commit 0782a7fc6314c8bd3cbfd57f12d0479bf9cc8dc7 ("Fixed bug #74866
+extension_dir = "./ext" now use current directory for base") modified
+the php_load_zend_extension_cb() function to use php_load_shlib(), and
+pass a handle to the newly introduced zend_load_extension_handle()
+function instead of passing the extension path to
+zend_load_extension().
+
+While doing so, it introduced a call to php_load_shlib() from code
+that is built even when HAVE_LIBDL is not defined. However,
+php_load_shlib() is not implemented when HAVE_LIBDL is not defined,
+for obvious reasons.
+
+It turns out that zend_load_extension_handle() anyway doesn't do
+anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and
+ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined
+(Zend/zend_portability.h).
+
+Fixes the following build failure when building on a system that
+doesn't have libdl:
+
+main/php_ini.o: In function `php_load_zend_extension_cb':
+php_ini.c:(.text+0x478): undefined reference to `php_load_shlib'
+php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib'
+collect2: error: ld returned 1 exit status
+
+Upstream-Status: Backport [http://git.php.net/?p=php-src.git;a=commit;h=2842aa2a078eb1cad55540b61e7edf111395150d]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ main/php_ini.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/main/php_ini.c b/main/php_ini.c
+index ba58eb1..fca263e 100644
+--- a/main/php_ini.c
++++ b/main/php_ini.c
+@@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg)
+ 
+ /* {{{ php_load_zend_extension_cb
+  */
++#ifdef HAVE_LIBDL
+ static void php_load_zend_extension_cb(void *arg)
+ {
+ 	char *filename = *((char **) arg);
+@@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg)
+ 		efree(libpath);
+ 	}
+ }
++#else
++static void php_load_zend_extension_cb(void *arg) { }
++#endif
+ /* }}} */
+ 
+ /* {{{ php_init_config
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch
new file mode 100644
index 0000000..0d24d34
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch
@@ -0,0 +1,385 @@
+From b2fb725dc404d471371731b663234e87cb0fca84 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Mon, 2 Apr 2018 17:54:52 +0800
+Subject: [PATCH] opcache/config.m4: enable opcache
+
+We can't use AC_TRY_RUN to run programs in a cross compile environment. Set
+the variables directly instead since we know that we'd be running on latest
+enough linux kernel.
+
+Upstream-Status: Inappropriate [Configuration]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ ext/opcache/config.m4 | 349 ++------------------------------------------------
+ 1 file changed, 8 insertions(+), 341 deletions(-)
+
+diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
+index 7b500f0..10bb99a 100644
+--- a/ext/opcache/config.m4
++++ b/ext/opcache/config.m4
+@@ -28,353 +28,20 @@ if test "$PHP_OPCACHE" != "no"; then
+ 
+   AC_CHECK_HEADERS([unistd.h sys/uio.h])
+ 
+-  AC_MSG_CHECKING(for sysvipc shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/ipc.h>
+-#include <sys/shm.h>
+-#include <unistd.h>
+-#include <string.h>
++  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
+ 
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int ipc_id;
+-  char *shm;
+-  struct shmid_ds shmbuf;
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+ 
+-  ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W));
+-  if (ipc_id == -1) {
+-    return 1;
+-  }
++  AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support])
+ 
+-  shm = shmat(ipc_id, NULL, 0);
+-  if (shm == (void *)-1) {
+-    shmctl(ipc_id, IPC_RMID, NULL);
+-    return 2;
+-  }
+-
+-  if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) {
+-    shmdt(shm);
+-    shmctl(ipc_id, IPC_RMID, NULL);
+-    return 3;
+-  }
+-
+-  shmbuf.shm_perm.uid = getuid();
+-  shmbuf.shm_perm.gid = getgid();
+-  shmbuf.shm_perm.mode = 0600;
+-
+-  if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) {
+-    shmdt(shm);
+-    shmctl(ipc_id, IPC_RMID, NULL);
+-    return 4;
+-  }
+-
+-  shmctl(ipc_id, IPC_RMID, NULL);
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-  AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#include <string.h>
+-
+-#ifndef MAP_ANON
+-# ifdef MAP_ANONYMOUS
+-#  define MAP_ANON MAP_ANONYMOUS
+-# endif
+-#endif
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  char *shm;
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+-  if (shm == MAP_FAILED) {
+-    return 1;
+-  }
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-  AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-#include <string.h>
+-
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int fd;
+-  char *shm;
+-
+-  fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR);
+-  if (fd == -1) {
+-    return 1;
+-  }
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+-  if (shm == MAP_FAILED) {
+-    return 2;
+-  }
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-  AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-#include <string.h>
+-#include <stdlib.h>
+-#include <stdio.h>
+-
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int fd;
+-  char *shm;
+-  char tmpname[4096];
+-
+-  sprintf(tmpname,"test.shm.%dXXXXXX", getpid());
+-  if (mktemp(tmpname) == NULL) {
+-    return 1;
+-  }
+-  fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+-  if (fd == -1) {
+-    return 2;
+-  }
+-  if (ftruncate(fd, 4096) < 0) {
+-    close(fd);
+-    shm_unlink(tmpname);
+-    return 3;
+-  }
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+-  if (shm == MAP_FAILED) {
+-    return 4;
+-  }
+-  shm_unlink(tmpname);
+-  close(fd);
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
++  AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support])
+ 
+   AC_MSG_CHECKING(for mmap() using regular file shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-#include <string.h>
+-#include <stdlib.h>
+-#include <stdio.h>
+-
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int fd;
+-  char *shm;
+-  char tmpname[4096];
+-
+-  sprintf(tmpname,"test.shm.%dXXXXXX", getpid());
+-  if (mktemp(tmpname) == NULL) {
+-    return 1;
+-  }
+-  fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+-  if (fd == -1) {
+-    return 2;
+-  }
+-  if (ftruncate(fd, 4096) < 0) {
+-    close(fd);
+-    unlink(tmpname);
+-    return 3;
+-  }
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+-  if (shm == MAP_FAILED) {
+-    return 4;
+-  }
+-  unlink(tmpname);
+-  close(fd);
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-flock_type=unknown
+-AC_MSG_CHECKING("whether flock struct is linux ordered")
+-AC_TRY_RUN([
+-  #include <fcntl.h>
+-  struct flock lock = { 1, 2, 3, 4, 5 };
+-  int main() { 
+-    if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
+-		return 0;
+-    }
+-    return 1;
+-  } 
+-], [
+-	flock_type=linux
+-    AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
+-    AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
++  
++  AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support])
+ 
+-AC_MSG_CHECKING("whether flock struct is BSD ordered")
+-AC_TRY_RUN([
+-  #include <fcntl.h>
+-  struct flock lock = { 1, 2, 3, 4, 5 };
+-  int main() { 
+-    if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
+-		return 0;
+-    }
+-    return 1;
+-  } 
+-], [
+-	flock_type=bsd
+-    AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) 
+-    AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
++  flock_type=linux
++  AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
+ 
+ if test "$flock_type" = "unknown"; then
+ 	AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
new file mode 100644
index 0000000..3e90184
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch
@@ -0,0 +1,61 @@
+From 3bfcc7fdd22261eaed10949714de0a90d31e10ab Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Thu, 20 Aug 2015 16:29:35 +0800
+Subject: [PATCH] [PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK
+
+Upstream-Status: Pending
+
+AC_TRY_RUN is not suitable for cross-compile
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+%% original patch: change-AC_TRY_RUN-to-AC_TRY_LINK.patch
+---
+ ext/fileinfo/config.m4 | 31 ++++++-------------------------
+ 1 file changed, 6 insertions(+), 25 deletions(-)
+
+diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4
+index 523b4fd..0aaa4c8 100644
+--- a/ext/fileinfo/config.m4
++++ b/ext/fileinfo/config.m4
+@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then
+     libmagic/readcdf.c libmagic/softmagic.c libmagic/der.c"
+ 
+   AC_MSG_CHECKING([for strcasestr])
+-  AC_TRY_RUN([
+-#include <string.h>
+-#include <strings.h>
+-#include <stdlib.h>
+-
+-int main(void)
+-{
+-        char *s0, *s1, *ret;
+-
+-        s0 = (char *) malloc(42);
+-        s1 = (char *) malloc(8);
+-
+-        memset(s0, 'X', 42);
+-        s0[24] = 'Y';
+-        s0[26] = 'Z';
+-        s0[41] = '\0';
+-        memset(s1, 'x', 8);
+-        s1[0] = 'y';
+-        s1[2] = 'Z';
+-        s1[7] = '\0';
+-
+-        ret = strcasestr(s0, s1);
+-
+-        return !(NULL != ret);
+-}
++  AC_TRY_COMPILE([
++     #include <string.h>
++     #include <strings.h>
++     #include <stdlib.h>
++  ],[
++     strcasestr(NULL, NULL);
+   ],[
+     dnl using the platform implementation
+     AC_MSG_RESULT(yes)
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/configure.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/configure.patch
deleted file mode 100644
index c5334c7..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/configure.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- php-5.1.6/configure.old	2006-09-12 07:54:14.000000000 -0700
-+++ php-5.1.6/configure	2006-09-12 07:54:37.000000000 -0700
-@@ -14715,8 +14715,6 @@
- 
- 
- 
--  unset ac_cv_func_dlopen
--  unset ac_cv_func___dlopen
-   unset found
-   
-   echo $ac_n "checking for dlopen""... $ac_c" 1>&6
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch
index 255fbb0..b6e3ceb 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch
@@ -1,10 +1,18 @@
-Upstream-status: Unknown
+From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 2 Nov 2011 16:54:57 +0100
+Subject: [PATCH] Upstream-status: Unknown
+
+---
+ acinclude.m4        | 3 ++-
+ ext/iconv/config.m4 | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/acinclude.m4 b/acinclude.m4
-index a6c0d84..df11abd 100644
+index d32766a..ad5166e 100644
 --- a/acinclude.m4
 +++ b/acinclude.m4
-@@ -2452,7 +2452,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+@@ -2445,7 +2445,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
    dnl Check libc first if no path is provided in --with-iconv
    dnl
  
@@ -15,7 +23,7 @@
      dnl -liconv in.
      LIBS_save="$LIBS"
 diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
-index d673b0a..1fbef13 100644
+index 6a05697..973e750 100644
 --- a/ext/iconv/config.m4
 +++ b/ext/iconv/config.m4
 @@ -15,7 +15,7 @@ if test "$PHP_ICONV" != "no"; then
@@ -27,6 +35,3 @@
          if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
            PHP_ICONV_PREFIX="$i"
            break
--- 
-1.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
index da04c2d..b5fb7d4 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
@@ -1,10 +1,18 @@
-Upstream-status: Unknown
+From c084c8349d1780980e232cb28b60a109e3d89438 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 2 Nov 2011 16:54:57 +0100
+Subject: [PATCH] Upstream-status: Unknown
+
+---
+ acinclude.m4       |  2 +-
+ ext/imap/config.m4 | 10 ++--------
+ 2 files changed, 3 insertions(+), 9 deletions(-)
 
 diff --git a/acinclude.m4 b/acinclude.m4
-index df11abd..06e7236 100644
+index ad5166e..f6a55ec 100644
 --- a/acinclude.m4
 +++ b/acinclude.m4
-@@ -2357,7 +2357,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
+@@ -2350,7 +2350,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
        PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
      fi
  
@@ -14,7 +22,7 @@
          OPENSSL_INCDIR=$i/include
        fi
 diff --git a/ext/imap/config.m4 b/ext/imap/config.m4
-index 3fcf674..f08caf7 100644
+index badb6e2..8ff803c 100644
 --- a/ext/imap/config.m4
 +++ b/ext/imap/config.m4
 @@ -109,7 +109,7 @@ if test "$PHP_IMAP" != "no"; then
@@ -41,6 +49,3 @@
        IMAP_LIB=$lib
        IMAP_LIB_CHK($PHP_LIBDIR)
        IMAP_LIB_CHK(c-client)
--- 
-1.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch
index 9927d2d..4bc1025 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch
@@ -1,11 +1,18 @@
-Upstream-status: Unknown
+From edd575a546d56bb5683aff19782b16963d61fd0b Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 2 Nov 2011 16:54:57 +0100
+Subject: [PATCH] Upstream-status: Unknown
+
+---
+ pear/Makefile.frag | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/pear/Makefile.frag b/pear/Makefile.frag
-index 00bacae..739eeca 100644
+index bbe8ec3..16f43e2 100644
 --- a/pear/Makefile.frag
 +++ b/pear/Makefile.frag
-@@ -11,7 +11,7 @@ PEAR_PREFIX = -dp a${program_prefix}
- PEAR_SUFFIX = -ds a$(program_suffix)
+@@ -12,7 +12,7 @@ PEAR_SUFFIX = -ds a$(program_suffix)
+ PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar
  
  install-pear-installer: $(SAPI_CLI_PATH)
 -	@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
@@ -13,6 +20,3 @@
  
  install-pear:
  	@echo "Installing PEAR environment:      $(INSTALL_ROOT)$(peardir)/"
--- 
-1.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch
index 2f7fe34..336cf0d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch
@@ -1,17 +1,24 @@
-Fix phar packaging
+From 08962a56f69963e01892d98ca5b75de8354bd3f5 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 2 Nov 2011 16:54:57 +0100
+Subject: [PATCH] Fix phar packaging
 
 Inherited from OE-Classic, with some additions to fix host paths leaking
 into the target package.
 
 Upstream-Status: Inappropriate [config]
 
+---
+ ext/phar/Makefile.frag | 17 +++--------------
+ 1 file changed, 3 insertions(+), 14 deletions(-)
+
 diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
-index 6516ddf..36e6cf4 100644
+index 0e3713f..22f7898 100644
 --- a/ext/phar/Makefile.frag
 +++ b/ext/phar/Makefile.frag
-@@ -5,20 +5,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
+@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
  
- PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
+ PHP_PHARCMD_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
  PHP_PHARCMD_EXECUTABLE = ` \
 -	if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \
 -		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch
new file mode 100644
index 0000000..7be67ea
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch
@@ -0,0 +1,387 @@
+From fafcfac0933c17e1bf551600080eb0541186caf5 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Mon, 2 Apr 2018 17:54:52 +0800
+Subject: [PATCH] opcache/config.m4: enable opcache
+
+We can't use AC_TRY_RUN to run programs in a cross compile environment. Set
+the variables directly instead since we know that we'd be running on latest
+enough linux kernel.
+
+Upstream-Status: Inappropriate [Configuration]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+%% original patch: php5-0001-opcache-config.m4-enable-opcache.patch
+---
+ ext/opcache/config.m4 | 349 ++------------------------------------------------
+ 1 file changed, 8 insertions(+), 341 deletions(-)
+
+diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
+index 5a8b86c..6e87fa5 100644
+--- a/ext/opcache/config.m4
++++ b/ext/opcache/config.m4
+@@ -11,353 +11,20 @@ if test "$PHP_OPCACHE" != "no"; then
+     AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
+   ])
+ 
+-  AC_MSG_CHECKING(for sysvipc shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/ipc.h>
+-#include <sys/shm.h>
+-#include <unistd.h>
+-#include <string.h>
++  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
+ 
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int ipc_id;
+-  char *shm;
+-  struct shmid_ds shmbuf;
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+ 
+-  ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W));
+-  if (ipc_id == -1) {
+-    return 1;
+-  }
++  AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support])
+ 
+-  shm = shmat(ipc_id, NULL, 0);
+-  if (shm == (void *)-1) {
+-    shmctl(ipc_id, IPC_RMID, NULL);
+-    return 2;
+-  }
+-
+-  if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) {
+-    shmdt(shm);
+-    shmctl(ipc_id, IPC_RMID, NULL);
+-    return 3;
+-  }
+-
+-  shmbuf.shm_perm.uid = getuid();
+-  shmbuf.shm_perm.gid = getgid();
+-  shmbuf.shm_perm.mode = 0600;
+-
+-  if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) {
+-    shmdt(shm);
+-    shmctl(ipc_id, IPC_RMID, NULL);
+-    return 4;
+-  }
+-
+-  shmctl(ipc_id, IPC_RMID, NULL);
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-  AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#include <string.h>
+-
+-#ifndef MAP_ANON
+-# ifdef MAP_ANONYMOUS
+-#  define MAP_ANON MAP_ANONYMOUS
+-# endif
+-#endif
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  char *shm;
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+-  if (shm == MAP_FAILED) {
+-    return 1;
+-  }
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-  AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-#include <string.h>
+-
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int fd;
+-  char *shm;
+-
+-  fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR);
+-  if (fd == -1) {
+-    return 1;
+-  }
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+-  if (shm == MAP_FAILED) {
+-    return 2;
+-  }
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-  AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-#include <string.h>
+-#include <stdlib.h>
+-#include <stdio.h>
+-
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int fd;
+-  char *shm;
+-  char tmpname[4096];
+-
+-  sprintf(tmpname,"test.shm.%dXXXXXX", getpid());
+-  if (mktemp(tmpname) == NULL) {
+-    return 1;
+-  }
+-  fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+-  if (fd == -1) {
+-    return 2;
+-  }
+-  if (ftruncate(fd, 4096) < 0) {
+-    close(fd);
+-    shm_unlink(tmpname);
+-    return 3;
+-  }
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+-  if (shm == MAP_FAILED) {
+-    return 4;
+-  }
+-  shm_unlink(tmpname);
+-  close(fd);
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
++  AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support])
+ 
+   AC_MSG_CHECKING(for mmap() using regular file shared memory support)
+-  AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#include <sys/mman.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-#include <string.h>
+-#include <stdlib.h>
+-#include <stdio.h>
+-
+-#ifndef MAP_FAILED
+-# define MAP_FAILED ((void*)-1)
+-#endif
+-
+-int main() {
+-  pid_t pid;
+-  int status;
+-  int fd;
+-  char *shm;
+-  char tmpname[4096];
+-
+-  sprintf(tmpname,"test.shm.%dXXXXXX", getpid());
+-  if (mktemp(tmpname) == NULL) {
+-    return 1;
+-  }
+-  fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+-  if (fd == -1) {
+-    return 2;
+-  }
+-  if (ftruncate(fd, 4096) < 0) {
+-    close(fd);
+-    unlink(tmpname);
+-    return 3;
+-  }
+-
+-  shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+-  if (shm == MAP_FAILED) {
+-    return 4;
+-  }
+-  unlink(tmpname);
+-  close(fd);
+-
+-  strcpy(shm, "hello");
+-
+-  pid = fork();
+-  if (pid < 0) {
+-    return 5;
+-  } else if (pid == 0) {
+-    strcpy(shm, "bye");
+-    return 6;
+-  }
+-  if (wait(&status) != pid) {
+-    return 7;
+-  }
+-  if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
+-    return 8;
+-  }
+-  if (strcmp(shm, "bye") != 0) {
+-    return 9;
+-  }
+-  return 0;
+-}
+-],dnl
+-    AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support])
+-    msg=yes,msg=no,msg=no)
+-  AC_MSG_RESULT([$msg])
+-
+-flock_type=unknown
+-AC_MSG_CHECKING("whether flock struct is linux ordered")
+-AC_TRY_RUN([
+-  #include <fcntl.h>
+-  struct flock lock = { 1, 2, 3, 4, 5 };
+-  int main() { 
+-    if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
+-		return 0;
+-    }
+-    return 1;
+-  } 
+-], [
+-	flock_type=linux
+-    AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
+-    AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
++  
++  AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support])
+ 
+-AC_MSG_CHECKING("whether flock struct is BSD ordered")
+-AC_TRY_RUN([
+-  #include <fcntl.h>
+-  struct flock lock = { 1, 2, 3, 4, 5 };
+-  int main() { 
+-    if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
+-		return 0;
+-    }
+-    return 1;
+-  } 
+-], [
+-	flock_type=bsd
+-    AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) 
+-    AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
++  flock_type=linux
++  AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
+ 
+ if test "$flock_type" = "unknown"; then
+ 	AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch
new file mode 100644
index 0000000..1d21f8c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch
@@ -0,0 +1,63 @@
+From 5f49987e88dfcbdb84be6e0c9025432fbd998709 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Thu, 20 Aug 2015 16:29:35 +0800
+Subject: [PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK
+
+Upstream-Status: Pending
+
+AC_TRY_RUN is not suitable for cross-compile
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+%% original patch: change-AC_TRY_RUN-to-AC_TRY_LINK.patch
+
+%% original patch: php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch
+---
+ ext/fileinfo/config.m4 | 31 ++++++-------------------------
+ 1 file changed, 6 insertions(+), 25 deletions(-)
+
+diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4
+index 7e98d62..8a8ea0e 100644
+--- a/ext/fileinfo/config.m4
++++ b/ext/fileinfo/config.m4
+@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then
+     libmagic/readcdf.c libmagic/softmagic.c"
+ 
+   AC_MSG_CHECKING([for strcasestr])
+-  AC_TRY_RUN([
+-#include <string.h>
+-#include <strings.h>
+-#include <stdlib.h>
+-
+-int main(void)
+-{
+-        char *s0, *s1, *ret;
+-
+-        s0 = (char *) malloc(42);
+-        s1 = (char *) malloc(8);
+-
+-        memset(s0, 'X', 42);
+-        s0[24] = 'Y';
+-        s0[26] = 'Z';
+-        s0[41] = '\0';
+-        memset(s1, 'x', 8);
+-        s1[0] = 'y';
+-        s1[2] = 'Z';
+-        s1[7] = '\0';
+-
+-        ret = strcasestr(s0, s1);
+-
+-        return !(NULL != ret);
+-}
++  AC_TRY_COMPILE([
++     #include <string.h>
++     #include <strings.h>
++     #include <stdlib.h>
++  ],[
++     strcasestr(NULL, NULL);
+   ],[
+     dnl using the platform implementation
+     AC_MSG_RESULT(yes)
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch
new file mode 100644
index 0000000..cff6426
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch
@@ -0,0 +1,26 @@
+From 79725e82d5981fc94eb657f0f46a499dbfc1cc40 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 2 Nov 2011 16:54:57 +0100
+Subject: [PATCH] Upstream-status: Unknown
+
+%% original patch: php5-pear-makefile.patch
+---
+ pear/Makefile.frag | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pear/Makefile.frag b/pear/Makefile.frag
+index 00bacae..739eeca 100644
+--- a/pear/Makefile.frag
++++ b/pear/Makefile.frag
+@@ -11,7 +11,7 @@ PEAR_PREFIX = -dp a${program_prefix}
+ PEAR_SUFFIX = -ds a$(program_suffix)
+ 
+ install-pear-installer: $(SAPI_CLI_PATH)
+-	@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
++	@$(PHP_NATIVE_DIR)/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
+ 
+ install-pear:
+ 	@echo "Installing PEAR environment:      $(INSTALL_ROOT)$(peardir)/"
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-phar-makefile.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-phar-makefile.patch
new file mode 100644
index 0000000..4e1efd4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-phar-makefile.patch
@@ -0,0 +1,46 @@
+From 3ea626a8d081f56b01004b7992534d4e6b81a9cc Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 2 Nov 2011 16:54:57 +0100
+Subject: [PATCH] Fix phar packaging
+
+Inherited from OE-Classic, with some additions to fix host paths leaking
+into the target package.
+
+Upstream-Status: Inappropriate [config]
+
+%% original patch: php5-phar-makefile.patch
+---
+ ext/phar/Makefile.frag | 17 +++--------------
+ 1 file changed, 3 insertions(+), 14 deletions(-)
+
+diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
+index b8b1b42..1005b2d 100644
+--- a/ext/phar/Makefile.frag
++++ b/ext/phar/Makefile.frag
+@@ -5,20 +5,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
+ 
+ PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
+ PHP_PHARCMD_EXECUTABLE = ` \
+-	if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \
+-		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
+-		if test "x$(PHP_MODULES)" != "x"; then \
+-		$(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
+-		for i in bz2 zlib phar; do \
+-			if test -f "$(top_builddir)/modules/$$i.la"; then \
+-				. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
+-			fi; \
+-		done; \
+-		fi; \
+-	else \
+-		$(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
+-	fi;`
+-PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
++		$(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
++
++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
+ 
+ $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
+ 	-@test -d $(builddir)/phar || mkdir $(builddir)/phar
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch
index 0506bdd..6af0dc8 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch
@@ -1,10 +1,17 @@
-Upstream-status: Inappriate
+From d251b5aa3d23803d016ca16818e2e1d2f2b70a02 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 2 Nov 2011 16:54:57 +0100
+Subject: [PATCH] Upstream-status: Inappriate
+
+---
+ sapi/cli/config.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4
-index cdfa1f7..0fe11e3 100644
+index 2168151..20a81db 100644
 --- a/sapi/cli/config.m4
 +++ b/sapi/cli/config.m4
-@@ -36,7 +36,7 @@ if test "$PHP_CLI" != "no"; then
+@@ -50,7 +50,7 @@ if test "$PHP_CLI" != "no"; then
    esac
  
    dnl Set executable for tests
@@ -13,6 +20,3 @@
    PHP_SUBST(PHP_EXECUTABLE)
  
    dnl Expose to Makefile
--- 
-1.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.31.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.31.bb
deleted file mode 100644
index dd8047b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.31.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require php.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b602636d46a61c0ac0432bbf5c078fe4"
-
-SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \
-            file://pthread-check-threads-m4.patch \
-            file://0001-Add-lpthread-to-link.patch \
-           "
-SRC_URI[md5sum] = "620abe25e0d6cd5f041a360a30ce5783"
-SRC_URI[sha256sum] = "8f397169cb65f0539f3bcb04060f97770d73e19074a37bd2c58b98ebf6ecb10f"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.35.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.35.bb
new file mode 100644
index 0000000..c17c0d6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.35.bb
@@ -0,0 +1,23 @@
+require php.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b602636d46a61c0ac0432bbf5c078fe4"
+
+SRC_URI += "file://php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch \
+            file://pthread-check-threads-m4.patch \
+            file://0001-Add-lpthread-to-link.patch \
+            file://acinclude-xml2-config.patch \
+            file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \
+            "
+
+SRC_URI_append_class-target = " \
+                                file://php5-pear-makefile.patch \
+                                file://php5-phar-makefile.patch \
+                                file://php5-0001-opcache-config.m4-enable-opcache.patch \
+                                "
+
+SRC_URI[md5sum] = "905ae5f586351f3ca29d044c9484d475"
+SRC_URI[sha256sum] = "ee78a7e9ca21d8ea394d037c55effff477a49dbae31c7753c547036f5bd73b92"
+
+DEPENDS += "libmcrypt"
+EXTRA_OECONF += "--with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \
+                 " 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_7.1.9.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_7.1.9.bb
deleted file mode 100644
index acf68a0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_7.1.9.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require php.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c0af599f66d0461c5837c695fcbc5c1e"
-
-SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \
-            file://0001-Specify-tag-with-libtool.patch \
-            file://CVE-2017-16642.patch \
-           "
-SRC_URI[md5sum] = "2397be54f3281cdf30c7ef076b28f7d0"
-SRC_URI[sha256sum] = "314dcc10dfdd7c4443edb4fe1e133a44f2b2a8351be8c9eb6ab9222d45fd9bae"
-
-PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \
-                        --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \
-                        ,--without-mysqli --without-pdo-mysql \
-                        ,mysql5"
-
-FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/www.conf.default"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb
new file mode 100644
index 0000000..2fd1e66
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb
@@ -0,0 +1,24 @@
+require php.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=67e369bc8d1f2e641236b8002039a6a2"
+
+SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \
+            file://0001-acinclude.m4-skip-binconfig-check-for-libxml.patch \
+            file://0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch \
+            file://0001-fix-error-caused-by-a-new-variable-is-declared-after.patch \
+           "
+SRC_URI_append_class-target = " \
+                                file://pear-makefile.patch \
+                                file://phar-makefile.patch \
+                                file://0001-opcache-config.m4-enable-opcache.patch \
+                                "
+
+SRC_URI[md5sum] = "864c64ffd2f1686b035ef8ce6a6d8478"
+SRC_URI[sha256sum] = "11658a0d764dc94023b9fb60d4b5eb75d438ad17981efe70abb0d0d09a447ef3"
+
+PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \
+                        --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \
+                        ,--without-mysqli --without-pdo-mysql \
+                        ,mysql5"
+
+FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/www.conf.default"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest b/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
new file mode 100644
index 0000000..7c3a8d1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
@@ -0,0 +1,38 @@
+#!/bin/bash
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+TEST_FILE="/tmp/test.data"
+
+RETVAL=0
+# Test every writing test application
+for write_exe_full_path in ${DIR}/add_person_*; do
+	if [ -x "${write_exe_full_path}" ]; then
+		write_exe=`basename ${write_exe_full_path}`
+		echo "Generating new test file using ${write_exe}..."
+		${write_exe_full_path} "${TEST_FILE}"
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] || exit $RETVAL
+
+		# Test every reading test application
+		for read_exe_full_path in ${DIR}/list_people_*; do
+			read_exe=`basename ${read_exe_full_path}`
+			echo "Test: Write with ${write_exe}; Read with ${read_exe}..."
+			if [ -x "${read_exe_full_path}" ]; then
+				${read_exe_full_path} "${TEST_FILE}"
+				RETVAL=$?
+				[ $RETVAL -eq 0 ] || exit $RETVAL
+			fi
+		done
+
+		# Cleanup...
+		if [ -e "${TEST_FILE}" ]; then
+			rm "${TEST_FILE}"
+		fi
+	fi
+done
+
+if [ $RETVAL -eq 0 ] ; then
+    echo "PASS: protobuf"
+else
+    echo "FAIL: protobuf"
+fi
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.4.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.4.1.bb
deleted file mode 100644
index fae7c18..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.4.1.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Protocol Buffers - structured data serialisation mechanism"
-DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \
-efficient yet extensible format. Google uses Protocol Buffers for almost \
-all of its internal RPC protocols and file formats."
-HOMEPAGE = "https://github.com/google/protobuf"
-SECTION = "console/tools"
-LICENSE = "BSD-3-Clause"
-
-PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite"
-
-DEPENDS = "zlib"
-RDEPENDS_${PN}-compiler = "${PN}"
-RDEPENDS_${PN}-dev += "${PN}-compiler"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095"
-
-SRCREV = "b04e5cba356212e4e8c66c61bbe0c3a20537c5b9"
-
-PV = "3.4.1+git${SRCPV}"
-
-SRC_URI = "git://github.com/google/protobuf.git;branch=3.4.x"
-
-EXTRA_OECONF += " --with-protoc=echo"
-
-inherit autotools-brokensep
-
-S = "${WORKDIR}/git"
-
-FILES_${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
-FILES_${PN}-lite = "${bindir} ${libdir}/libprotobuf-lite${SOLIBS}"
-
-MIPS_INSTRUCTION_SET = "mips"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
new file mode 100644
index 0000000..1ffb79d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
@@ -0,0 +1,84 @@
+SUMMARY = "Protocol Buffers - structured data serialisation mechanism"
+DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \
+efficient yet extensible format. Google uses Protocol Buffers for almost \
+all of its internal RPC protocols and file formats."
+HOMEPAGE = "https://github.com/google/protobuf"
+SECTION = "console/tools"
+LICENSE = "BSD-3-Clause"
+
+PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite"
+
+DEPENDS = "zlib"
+DEPENDS_append_class-target  = " protobuf-native"
+RDEPENDS_${PN}-compiler = "${PN}"
+RDEPENDS_${PN}-dev += "${PN}-compiler"
+RDEPENDS_${PN}-ptest = "bash python-protobuf"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095"
+
+SRCREV = "106ffc04be1abf3ff3399f54ccf149815b287dd9"
+
+PV = "3.5.1+git${SRCPV}"
+
+SRC_URI = "git://github.com/google/protobuf.git;branch=3.5.x \
+	   file://run-ptest \
+          "
+
+EXTRA_OECONF += " --with-protoc=echo"
+
+inherit autotools-brokensep pkgconfig ptest
+
+S = "${WORKDIR}/git"
+TEST_SRC_DIR="examples"
+LANG_SUPPORT="cpp python"
+
+do_compile_ptest() {
+	# Modify makefile to use the cross-compiler
+	sed -e "s|c++|${CXX} \$(LDFLAGS)|g" -i "${S}/${TEST_SRC_DIR}/Makefile"
+
+	mkdir -p "${B}/${TEST_SRC_DIR}"
+
+	# Add the location of the cross-compiled header and library files
+	# which haven't been installed yet.
+	cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc"
+	sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
+	sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
+	sed -e 's|Libs:|Libs: -L${B}/src/.libs|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
+	export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"
+
+	# Save the pkgcfg sysroot variable, and update it to nothing so
+	# that it doesn't append the sysroot to the beginning of paths.
+	# The header and library files aren't installed to the target
+	# system yet.  So the absolute paths were specified above.
+	save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR
+	export PKG_CONFIG_SYSROOT_DIR=
+
+	# Compile the tests
+	for lang in ${LANG_SUPPORT}; do
+		oe_runmake -C "${S}/${TEST_SRC_DIR}" ${lang}
+	done
+
+	# Restore the pkgconfig sysroot variable
+	export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir
+}
+
+do_install_ptest() {
+	local olddir=`pwd`
+
+	cd "${S}/${TEST_SRC_DIR}"
+	install -d "${D}/${PTEST_PATH}"
+	for i in add_person* list_people*; do
+		if [ -x "$i" ]; then
+			install "$i" "${D}/${PTEST_PATH}"
+		fi
+	done
+	cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}"
+	cd "$olddir"
+}
+
+FILES_${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
+FILES_${PN}-lite = "${bindir} ${libdir}/libprotobuf-lite${SOLIBS}"
+
+MIPS_INSTRUCTION_SET = "mips"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-cpuset_1.5.7.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-cpuset_1.5.7.bb
index 8f6532c..156e52a 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-cpuset_1.5.7.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-cpuset_1.5.7.bb
@@ -3,14 +3,9 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-SRCNAME = "cpuset"
-
-SRC_URI = "https://github.com/lpechacek/${SRCNAME}/archive/v${PV}.tar.gz"
-
-SRC_URI[md5sum] = "6ad79b26ba03f559604d74513cc34392"
-SRC_URI[sha256sum] = "32334e164415ed5aec83c5ffc3dc01c418406eb02d96d881fdfd495587ff0c01"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
+S = "${WORKDIR}/git"
+SRCREV = "ae629aa1dc959342745ad97406adddf63bb6dbdd"
+SRC_URI = "git://github.com/lpechacek/cpuset.git;protocol=https;"
 
 inherit distutils
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-futures_3.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-futures_3.0.5.bb
deleted file mode 100644
index c85fc56..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-futures_3.0.5.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "The concurrent.futures module provides a high-level interface for asynchronously executing callables."
-SECTION = "devel/python"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=3d78c5bb15ac641d34f2ddc3bd7f51fa"
-HOMEPAGE = "http://code.google.com/p/pythonfutures"
-DEPENDS = "python"
-
-SRC_URI = "https://pypi.python.org/packages/source/f/futures/futures-${PV}.tar.gz"
-SRC_URI[md5sum] = "ced2c365e518242512d7a398b515ff95"
-SRC_URI[sha256sum] = "0542525145d5afc984c88f914a0c85c77527f65946617edb5274f72406f981df"
-
-S = "${WORKDIR}/futures-${PV}"
-
-inherit setuptools
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-futures_3.2.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-futures_3.2.0.bb
new file mode 100644
index 0000000..3ee945f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-futures_3.2.0.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "The concurrent.futures module provides a high-level interface for asynchronously executing callables."
+SECTION = "devel/python"
+LICENSE = "PSF"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=834d982f973c48b6d662b5944c5ab567"
+HOMEPAGE = "https://github.com/agronholm/pythonfutures"
+DEPENDS = "python"
+
+SRC_URI[md5sum] = "d1b299a06b96ccb59f70324716dc0016"
+SRC_URI[sha256sum] = "9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265"
+
+inherit pypi setuptools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
index a391f7e..9a11442 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
@@ -14,28 +14,15 @@
 index 2c0cfbd..cfcb3bf 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -194,7 +194,7 @@ PKG_CHECK_MODULES(GI,
-     gobject-introspection-1.0 >= introspection_required_version
- )
+@@ -155,7 +155,7 @@ PKG_CHECK_MODULES(GI,
+ 
+ GOBJECT_INTROSPECTION_CHECK(introspection_required_version)
  
 -GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
 +GI_DATADIR=$PKG_CONFIG_SYSROOT_DIR$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
  AC_SUBST(GI_DATADIR)
  
  if test "$enable_cairo" != no; then
-@@ -219,12 +219,6 @@ AC_ARG_WITH(common,
-     with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
- 
--INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
--INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
--
--AC_SUBST(INTROSPECTION_SCANNER)
--AC_SUBST(INTROSPECTION_COMPILER)
--
- # compiler warnings, errors, required cflags, and code coverage support
- GNOME_COMPILE_WARNINGS([maximum])
- AC_MSG_CHECKING(for Gnome code coverage support)
 -- 
 2.1.4
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject_3.22.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject_3.22.0.bb
deleted file mode 100644
index 9d2e165..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject_3.22.0.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Python GObject bindings"
-HOMEPAGE = "http://www.pygtk.org/"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-
-inherit autotools pkgconfig gnomebase distutils-base gobject-introspection
-
-PYTHON_BASEVERSION = "2.7"
-PYTHON_PN = "python"
-
-DEPENDS += "gnome-common-native python glib-2.0"
-
-SRCNAME="pygobject"
-SRC_URI = " \
-    http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
-    file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
-"
-
-SRC_URI[md5sum] = "ed4117ed5d554d25fd7718807fbf819f"
-SRC_URI[sha256sum] = "08b29cfb08efc80f7a8630a2734dec65a99c1b59f1e5771c671d2e4ed8a5cbe7"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-cairo --with-python=${PYTHON}"
-
-RDEPENDS_${PN} += "python-setuptools python-importlib"
-RDEPENDS_${PN}_class-native = ""
-
-do_install_append() {
-    # Remove files that clash with python3-pygobject; their content is same
-    rm -rf ${D}${includedir}/pygobject-3.0//pygobject.h ${D}${libdir}/pkgconfig
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject_3.28.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject_3.28.0.bb
new file mode 100644
index 0000000..ab65ba1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/python/python-pygobject_3.28.0.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Python GObject bindings"
+HOMEPAGE = "http://www.pygtk.org/"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+inherit autotools pkgconfig gnomebase distutils-base gobject-introspection
+
+PYTHON_BASEVERSION = "2.7"
+PYTHON_PN = "python"
+
+DEPENDS += "gnome-common-native python glib-2.0"
+
+SRCNAME="pygobject"
+SRC_URI = " \
+    http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
+    file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
+"
+
+SRC_URI[md5sum] = "b29d69edb63ae1f555afeb19f90b9996"
+SRC_URI[sha256sum] = "42b47b261b45aedfc77e02e3c90a01cd74d6f86c3273c1860a054d531d606e5a"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-cairo --with-python=${PYTHON}"
+
+RDEPENDS_${PN} += "python-setuptools"
+RDEPENDS_${PN}_class-native = ""
+
+do_install_append() {
+    # Remove files that clash with python3-pygobject; their content is same
+    rm -rf ${D}${includedir}/pygobject-3.0//pygobject.h ${D}${libdir}/pkgconfig
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/sip/sip_4.19.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/sip/sip_4.19.2.bb
deleted file mode 100644
index 1d837c5..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/sip/sip_4.19.2.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "SIP is a C++/Python Wrapper Generator"
-HOMEPAGE = "http://www.riverbankcomputing.co.uk/sip"
-SECTION = "devel"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://LICENSE-GPL2;md5=e91355d8a6f8bd8f7c699d62863c7303"
-
-inherit python-dir
-
-DEPENDS = "python"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/pyqt/sip/sip-${PV}/sip-${PV}.tar.gz"
-SRC_URI[md5sum] = "4f48e212890ebe584e8d804cfbcfc61e"
-SRC_URI[sha256sum] = "432b4aad25254e6997913e33b1ca3cf5fd21d5729a50a3ce2edccbea82c80533"
-
-BBCLASSEXTEND = "native"
-
-PACKAGES += "python-sip"
-
-do_configure_prepend_class-target() {
-    echo "py_platform = linux" > sip.cfg
-    echo "py_inc_dir = %(sysroot)/${includedir}/python%(py_major).%(py_minor)" >> sip.cfg
-    echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
-    echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
-    echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
-    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
-    python configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_HOST} CC="${CC}" CXX="${CXX}" LINK="${CXX}" STRIP="" LINK_SHLIB="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LFLAGS="${LDFLAGS}"
-}
-do_configure_prepend_class-native() {
-    echo "py_platform = linux" > sip.cfg
-    echo "py_inc_dir = ${includedir}/python%(py_major).%(py_minor)" >> sip.cfg
-    echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
-    echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
-    echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
-    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
-    python configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_NATIVE}
-}
-do_install() {
-    oe_runmake install
-}
-
-FILES_python-sip = "${libdir}/${PYTHON_DIR}/site-packages/"
-FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/sip/sip_4.19.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/sip/sip_4.19.8.bb
new file mode 100644
index 0000000..ea944b3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/sip/sip_4.19.8.bb
@@ -0,0 +1,42 @@
+SUMMARY = "SIP is a C++/Python Wrapper Generator"
+HOMEPAGE = "http://www.riverbankcomputing.co.uk/sip"
+SECTION = "devel"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE-GPL2;md5=e91355d8a6f8bd8f7c699d62863c7303"
+
+inherit python-dir
+
+DEPENDS = "python"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/pyqt/sip/sip-${PV}/sip-${PV}.tar.gz"
+SRC_URI[md5sum] = "0625fb20347d4ff1b5da551539be0727"
+SRC_URI[sha256sum] = "7eaf7a2ea7d4d38a56dd6d2506574464bddf7cf284c960801679942377c297bc"
+
+BBCLASSEXTEND = "native"
+
+PACKAGES += "python-sip"
+
+do_configure_prepend_class-target() {
+    echo "py_platform = linux" > sip.cfg
+    echo "py_inc_dir = %(sysroot)/${includedir}/python%(py_major).%(py_minor)" >> sip.cfg
+    echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
+    echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
+    echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
+    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
+    python configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_HOST} CC="${CC}" CXX="${CXX}" LINK="${CXX}" STRIP="" LINK_SHLIB="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LFLAGS="${LDFLAGS}"
+}
+do_configure_prepend_class-native() {
+    echo "py_platform = linux" > sip.cfg
+    echo "py_inc_dir = ${includedir}/python%(py_major).%(py_minor)" >> sip.cfg
+    echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
+    echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
+    echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
+    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
+    python configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_NATIVE}
+}
+do_install() {
+    oe_runmake install
+}
+
+FILES_python-sip = "${libdir}/${PYTHON_DIR}/site-packages/"
+FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff b/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff
index c51e475..4dbd9a4 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff
@@ -4,29 +4,32 @@
 
 --- tk8.5-8.5.8.orig/unix/configure
 +++ tk8.5-8.5.8/unix/configure
-@@ -1431,6 +1431,7 @@
- 			`ls -d ${prefix}/lib 2>/dev/null` \
- 			`ls -d /usr/local/lib 2>/dev/null` \
+@@ -1431,7 +1431,8 @@
  			`ls -d /usr/contrib/lib 2>/dev/null` \
+ 			`ls -d /usr/local/lib 2>/dev/null` \
+ 			`ls -d /usr/pkg/lib 2>/dev/null` \
 +			`ls -d /usr/share/tcltk/tcl8.5 2>/dev/null` \
  			`ls -d /usr/lib 2>/dev/null` \
+ 			`ls -d /usr/lib64 2>/dev/null` \
  			; do
  		    if test -f "$i/tclConfig.sh" ; then
 --- tk8.5-8.5.8.orig/unix/tcl.m4
 +++ tk8.5-8.5.8/unix/tcl.m4
-@@ -93,6 +93,7 @@
- 			`ls -d ${prefix}/lib 2>/dev/null` \
- 			`ls -d /usr/local/lib 2>/dev/null` \
+@@ -93,7 +93,8 @@
  			`ls -d /usr/contrib/lib 2>/dev/null` \
+ 			`ls -d /usr/local/lib 2>/dev/null` \
+ 			`ls -d /usr/pkg/lib 2>/dev/null` \
 +			`ls -d /usr/share/tcltk/tcl8.5 2>/dev/null` \
  			`ls -d /usr/lib 2>/dev/null` \
+ 			`ls -d /usr/lib64 2>/dev/null` \
  			; do
  		    if test -f "$i/tclConfig.sh" ; then
-@@ -223,6 +224,7 @@
+@@ -223,7 +224,8 @@
  			`ls -d ${prefix}/lib 2>/dev/null` \
  			`ls -d /usr/local/lib 2>/dev/null` \
  			`ls -d /usr/contrib/lib 2>/dev/null` \
 +			`ls -d /usr/share/tcltk/tk8.5 2>/dev/null` \
  			`ls -d /usr/lib 2>/dev/null` \
+ 			`ls -d /usr/lib64 2>/dev/null` \
  			; do
  		    if test -f "$i/tkConfig.sh" ; then
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.6.bb
deleted file mode 100644
index d3bf397..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.6.bb
+++ /dev/null
@@ -1,79 +0,0 @@
-SUMMARY = "Tool Command Language ToolKit Extension"
-HOMEPAGE = "http://tcl.sourceforge.net"
-SECTION = "devel/tcltk"
-
-# http://www.tcl.tk/software/tcltk/license.html
-LICENSE = "tcl"
-LIC_FILES_CHKSUM = "file://../license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../compat/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../doc/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../library/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../macosx/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../tests/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../unix/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../win/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-    file://../xlib/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
-"
-
-DEPENDS = "tcl virtual/libx11 libxt"
-
-SRC_URI = "\
-    ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
-    file://confsearch.diff;striplevel=2 \
-    file://non-linux.diff;striplevel=2 \
-    file://tklibrary.diff;striplevel=2 \
-    file://tkprivate.diff;striplevel=2 \
-    file://fix-xft.diff \
-    file://configure.use.fontconfig.with.xft.patch \
-"
-SRC_URI[md5sum] = "dd7dbb3a6523c42d05f6ab6e86096e99"
-SRC_URI[sha256sum] = "d62c371a71b4744ed830e3c21d27968c31dba74dd2c45f36b9b071e6d88eb19d"
-
-S = "${WORKDIR}/${BPN}${PV}/unix"
-
-# Short version format: "8.6"
-VER = "${@os.path.splitext(d.getVar('PV'))[0]}"
-
-LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib"
-inherit autotools distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "\
-    --enable-threads \
-    --with-x \
-    --with-tcl=${STAGING_BINDIR_CROSS} \
-    --libdir=${libdir} \
-"
-
-do_install_append() {
-    ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0
-    oe_libinstall -so libtk${VER} ${D}${libdir}
-    ln -sf wish${VER} ${D}${bindir}/wish
-
-    # Even after passing libdir=${libdir} at config, some incorrect dirs are still generated for the multilib build
-    if [ "$libdir" != "/usr/lib" ]; then
-        # Move files to correct library directory
-        mv ${D}/usr/lib/tk${VER}/* ${D}/${libdir}/tk${VER}/
-        # Remove unneeded/incorrect dir ('usr/lib/')
-        rm -rf ${D}/usr/lib
-    fi
-}
-
-PACKAGECONFIG ??= "xft"
-PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,xft"
-PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext"
-
-PACKAGES =+ "${PN}-lib"
-
-FILES_${PN}-lib = "${libdir}/libtk${VER}.so*"
-FILES_${PN} += "${libdir}/tk*"
-
-# isn't getting picked up by shlibs code
-RDEPENDS_${PN} += "tk-lib"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native"
-
-# Fix the path in sstate
-SSTATE_SCAN_FILES += "*Config.sh"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.8.bb
new file mode 100644
index 0000000..13dc4d7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/tcltk/tk_8.6.8.bb
@@ -0,0 +1,79 @@
+SUMMARY = "Tool Command Language ToolKit Extension"
+HOMEPAGE = "http://tcl.sourceforge.net"
+SECTION = "devel/tcltk"
+
+# http://www.tcl.tk/software/tcltk/license.html
+LICENSE = "tcl"
+LIC_FILES_CHKSUM = "file://../license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../compat/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../doc/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../library/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../macosx/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../tests/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../unix/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../win/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+    file://../xlib/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
+"
+
+DEPENDS = "tcl virtual/libx11 libxt"
+
+SRC_URI = "\
+    ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
+    file://confsearch.diff;striplevel=2 \
+    file://non-linux.diff;striplevel=2 \
+    file://tklibrary.diff;striplevel=2 \
+    file://tkprivate.diff;striplevel=2 \
+    file://fix-xft.diff \
+    file://configure.use.fontconfig.with.xft.patch \
+"
+SRC_URI[md5sum] = "5e0faecba458ee1386078fb228d008ba"
+SRC_URI[sha256sum] = "49e7bca08dde95195a27f594f7c850b088be357a7c7096e44e1158c7a5fd7b33"
+
+S = "${WORKDIR}/${BPN}${PV}/unix"
+
+# Short version format: "8.6"
+VER = "${@os.path.splitext(d.getVar('PV'))[0]}"
+
+LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib"
+inherit autotools distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "\
+    --enable-threads \
+    --with-x \
+    --with-tcl=${STAGING_BINDIR_CROSS} \
+    --libdir=${libdir} \
+"
+
+do_install_append() {
+    ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0
+    oe_libinstall -so libtk${VER} ${D}${libdir}
+    ln -sf wish${VER} ${D}${bindir}/wish
+
+    # Even after passing libdir=${libdir} at config, some incorrect dirs are still generated for the multilib build
+    if [ "$libdir" != "/usr/lib" ]; then
+        # Move files to correct library directory
+        mv ${D}/usr/lib/tk${VER}/* ${D}/${libdir}/tk${VER}/
+        # Remove unneeded/incorrect dir ('usr/lib/')
+        rm -rf ${D}/usr/lib
+    fi
+}
+
+PACKAGECONFIG ??= "xft"
+PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,xft"
+PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext"
+
+PACKAGES =+ "${PN}-lib"
+
+FILES_${PN}-lib = "${libdir}/libtk${VER}.so*"
+FILES_${PN} += "${libdir}/tk*"
+
+# isn't getting picked up by shlibs code
+RDEPENDS_${PN} += "tk-lib"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
+
+# Fix the path in sstate
+SSTATE_SCAN_FILES += "*Config.sh"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch
deleted file mode 100644
index 3f8debc..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Directory /usr/local is not used for us. Remove the policy that not to install
-binaries to /usr/local/sbin.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff --git a/cfe_internal/update/update_bins.cf b/cfe_internal/update/update_bins.cf
-index 1796caa..697af0d 100644
---- a/cfe_internal/update/update_bins.cf
-+++ b/cfe_internal/update/update_bins.cf
-@@ -55,16 +55,6 @@ bundle agent cfe_internal_bins
-       depth_search => u_recurse_basedir("inf"),
-       action => u_immediate;
- 
--      "/usr/local/sbin/$(agents)"
--      comment => "Create symlinks of CFE binaries in /usr/local/sbin",
--      handle => canonify("cfe_internal_bins_files_sbin_$(agents)"),
--      move_obstructions => "true",
--      link_from => u_ln_s("$(sys.workdir)/bin/$(agents)");
--
--      "/usr/local/sbin/$(agents).cfsaved"
--      comment => "Remove all .cfsaved file extension",
--      handle => canonify("cfe_internal_bins_files_remove_$(agent)_cfsaved"),
--      delete => u_tidy;
- }
- 
- bundle agent cfe_internal_update_bins
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.10.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.10.2.bb
new file mode 100644
index 0000000..b52e7cc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.10.2.bb
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2014 - 2017 Wind River Systems, Inc.
+#
+SUMMARY = "Base policy for CFEngine"
+
+DESCRIPTION = "CFEngine is an IT infrastructure automation framework \
+that helps engineers, system administrators and other stakeholders \
+in an IT system to manage and understand IT infrastructure throughout \
+its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit. \
+ \
+This package is intended to provide a stable base policy for \
+installations and upgrades, and is used by CFEngine 3.6 and newer. \
+ \
+The contents of this packge are intended to live in `/var/cfengine/masterfiles` \
+or wherever `$(sys.masterdir)` points. \
+"
+
+HOMEPAGE = "http://cfengine.com"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9f76426f9ef8c6f6739fadd21d817a4f"
+
+SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "1247ef4e8f3cee5efa98da50c326e5a4"
+SRC_URI[sha256sum] = "5d18a8d71f451d0b5dd1f5e579452b29b99b664f2bb0827dbba9a615f2764df6"
+
+inherit autotools
+
+export EXPLICIT_VERSION="${PV}"
+
+EXTRA_OECONF = "--prefix=${datadir}/cfengine"
+
+FILES_${PN} = "${datadir}/cfengine"
+
+RDEPENDS_${PN} += "python-core"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb
deleted file mode 100644
index 9d01c51..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Copyright (C) 2014 - 2016 Wind River Systems, Inc.
-#
-SUMMARY = "Base policy for CFEngine"
-
-DESCRIPTION = "CFEngine is an IT infrastructure automation framework \
-that helps engineers, system administrators and other stakeholders \
-in an IT system to manage and understand IT infrastructure throughout \
-its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit. \
- \
-This package is intended to provide a stable base policy for \
-installations and upgrades, and is used by CFEngine 3.6 and newer. \
- \
-The contents of this packge are intended to live in `/var/cfengine/masterfiles` \
-or wherever `$(sys.masterdir)` points. \
-"
-
-HOMEPAGE = "http://cfengine.com"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=52cd3d13af93180822888ab0088e9328"
-
-SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
-           file://remove-policy-of-usr-local-sbin.patch \
-"
-SRC_URI[md5sum] = "b101ddcd546738af6ec91be5c297cb24"
-SRC_URI[sha256sum] = "63dec2f8649f5f2788cd463dccf47f8dbe941522acfcf3093517f983bbfa0606"
-
-inherit autotools
-
-export EXPLICIT_VERSION="${PV}"
-
-EXTRA_OECONF = "--prefix=${localstatedir}/cfengine"
-
-FILES_${PN} += "${localstatedir}/cfengine"
-
-RDEPENDS_${PN} += "python-core"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.10.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.10.2.bb
new file mode 100644
index 0000000..b86b0a1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.10.2.bb
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2014 - 2017 Wind River Systems, Inc.
+#
+SUMMARY = "CFEngine is an IT infrastructure automation framework"
+
+DESCRIPTION = "CFEngine is an IT infrastructure automation framework \
+that helps engineers, system administrators and other stakeholders \
+in an IT system to manage and understand IT infrastructure throughout \
+its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit."
+
+HOMEPAGE = "http://cfengine.com"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f8b34828ab373d6b1bb4b0fc60a78494"
+
+DEPENDS = "attr tokyocabinet"
+
+SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
+           file://change-hard-coded-lib-path.patch \
+           file://set-path-of-default-config-file.patch \
+"
+
+SRC_URI[md5sum] = "c16baf08189a1af6fcf2e2ff61102992"
+SRC_URI[sha256sum] = "d4fa9ac7276dba7b85d6757aab2f0929ab8d3b115cb0e7b0cf984760347429d7"
+
+inherit autotools systemd
+
+export EXPLICIT_VERSION="${PV}"
+
+SYSTEMD_SERVICE_${PN} = "cfengine3.service cf-apache.service cf-hub.service cf-postgres.service \
+                         cf-runalerts.service cf-consumer.service cf-execd.service \
+                         cf-monitord.service  cf-redis-server.service  cf-serverd.service \
+"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
+PACKAGECONFIG ??= "libpcre openssl \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \
+"
+PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2,"
+PACKAGECONFIG[mysql] = "--with-mysql=yes,--with-mysql=no,mysql,"
+PACKAGECONFIG[postgresql] = "--with-postgresql=yes,--with-postgresql=no,postgresql,"
+PACKAGECONFIG[acl] = "--with-libacl=yes,--with-libacl=no,acl,"
+PACKAGECONFIG[libvirt] = "--with-libvirt=yes,--with-libvirt=no,libvirt,"
+PACKAGECONFIG[libpcre] = "--with-pcre=yes,--with-pcre=no,libpcre,"
+PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl,"
+PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam,"
+PACKAGECONFIG[libyaml] = "--with-libyaml,--without-libyaml,libyaml,"
+PACKAGECONFIG[systemd] = "--with-systemd-service=${systemd_system_unitdir},--without-systemd-service"
+PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl,"
+
+EXTRA_OECONF = "hw_cv_func_va_copy=yes --with-init-script=${sysconfdir}/init.d --with-tokyocabinet"
+
+do_install_append() {
+    install -d ${D}${localstatedir}/${BPN}/bin
+    for f in `ls ${D}${bindir}`; do
+        ln -s ${bindir}/`basename $f` ${D}${localstatedir}/${BPN}/bin/
+    done
+
+    install -d ${D}${sysconfdir}/default
+    cat << EOF > ${D}${sysconfdir}/default/cfengine3
+RUN_CF_SERVERD=1
+RUN_CF_EXECD=1
+RUN_CF_MONITORD=1
+RUN_CF_HUB=0
+EOF
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3
+        sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service
+    fi
+}
+
+RDEPENDS_${PN} += "${BPN}-masterfiles"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb
deleted file mode 100644
index 4aa8ded..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Copyright (C) 2014 - 2016 Wind River Systems, Inc.
-#
-SUMMARY = "CFEngine is an IT infrastructure automation framework"
-
-DESCRIPTION = "CFEngine is an IT infrastructure automation framework \
-that helps engineers, system administrators and other stakeholders \
-in an IT system to manage and understand IT infrastructure throughout \
-its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit."
-
-HOMEPAGE = "http://cfengine.com"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cd59c3650c8b7ff36bab1cc6587b097a"
-
-DEPENDS = "attr tokyocabinet"
-
-SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
-           file://change-hard-coded-lib-path.patch \
-           file://set-path-of-default-config-file.patch \
-"
-
-SRC_URI[md5sum] = "63da39655cfca30ca885fcc4a1bf8aa4"
-SRC_URI[sha256sum] = "32a38aedf1199c2361e1335e0d4a1d98f9efa7cd591bcb647f35c7395bb66f2d"
-
-inherit autotools systemd
-
-export EXPLICIT_VERSION="${PV}"
-
-SYSTEMD_SERVICE_${PN} = "cfengine3.service cfengine3-web.service"
-SYSTEMD_AUTO_ENABLE_${PN} = "disable"
-
-PACKAGECONFIG ??= "libpcre openssl \
-                   ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \
-"
-PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2,"
-PACKAGECONFIG[mysql] = "--with-mysql=yes,--with-mysql=no,mysql,"
-PACKAGECONFIG[postgresql] = "--with-postgresql=yes,--with-postgresql=no,postgresql,"
-PACKAGECONFIG[acl] = "--with-libacl=yes,--with-libacl=no,acl,"
-PACKAGECONFIG[libvirt] = "--with-libvirt=yes,--with-libvirt=no,libvirt,"
-PACKAGECONFIG[libpcre] = "--with-pcre=yes,--with-pcre=no,libpcre,"
-PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl,"
-PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam,"
-PACKAGECONFIG[libyaml] = "--with-libyaml,--without-libyaml,libyaml,"
-PACKAGECONFIG[systemd] = "--with-systemd-service=${systemd_system_unitdir},--without-systemd-service"
-PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl,"
-
-EXTRA_OECONF = "hw_cv_func_va_copy=yes --with-init-script=${sysconfdir}/init.d --with-tokyocabinet"
-
-do_install_append() {
-    install -d ${D}${localstatedir}/${BPN}/bin
-    for f in `ls ${D}${bindir}`; do
-        ln -s ${bindir}/`basename $f` ${D}${localstatedir}/${BPN}/bin/
-    done
-
-    install -d ${D}${sysconfdir}/default
-    cat << EOF > ${D}${sysconfdir}/default/cfengine3
-RUN_CF_SERVERD=1
-RUN_CF_EXECD=1
-RUN_CF_MONITORD=1
-RUN_CF_HUB=0
-EOF
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3
-        sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service
-    fi
-}
-
-RDEPENDS_${PN} += "${BPN}-masterfiles"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb
index 25166ab..987c09f 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb
@@ -24,6 +24,10 @@
 EXTRA_OECMAKE = "-DLIB='${baselib}' \
                  -DPYTHON_INCLUDE_PATH=${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
 
+# With Ninja it fails with:
+# ninja: error: build.ninja:282: bad $-escape (literal $ must be written as $$)
+OECMAKE_GENERATOR = "Unix Makefiles"
+
 do_configure_prepend() {
     export STAGING_LIBDIR=${STAGING_LIBDIR}
     export STAGING_INCDIR=${STAGING_INCDIR}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/dash/dash_0.5.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/dash/dash_0.5.8.bb
deleted file mode 100644
index 78ca60d..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/dash/dash_0.5.8.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Small and fast POSIX-compliant shell"
-HOMEPAGE = "http://gondor.apana.org.au/~herbert/dash/"
-SECTION = "System Environment/Shells"
-
-LICENSE = "BSD & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b5262b4a1a1bff72b48e935531976d2e"
-
-inherit autotools update-alternatives
-
-SRC_URI = "http://gondor.apana.org.au/~herbert/${BPN}/files/${BP}.tar.gz \
-           file://0001-Fix-printf-format-errors-with-clang.patch \
-           "
-SRC_URI[md5sum] = "5c152209680dab3c319e8923f6c51378"
-SRC_URI[sha256sum] = "c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f"
-
-EXTRA_OECONF += "--bindir=${base_bindir}"
-
-ALTERNATIVE_${PN} = "sh"
-ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
-ALTERNATIVE_TARGET[sh] = "${base_bindir}/dash"
-ALTERNATIVE_PRIORITY = "10"
-
-pkg_postinst_${PN} () {
-    grep -q "^${base_bindir}/dash$" $D${sysconfdir}/shells || echo ${base_bindir}/dash >> $D${sysconfdir}/shells
-}
-
-pkg_postrm_${PN} () {
-    printf "$(grep -v "^${base_bindir}/dash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.19.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.19.bb
deleted file mode 100644
index 27e00a5..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.19.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Data recovery tool"
-DESCRIPTION = "GNU ddrescue is a data recovery tool. It copies data \
-    from one file or block device (hard disc, cdrom, etc) to another, \
-    trying hard to rescue data in case of read errors."
-HOMEPAGE = "http://www.gnu.org/software/ddrescue/ddrescue.html"
-SECTION = "console"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=76d6e300ffd8fb9d18bd9b136a9bba13 \
-                    file://main_common.cc;beginline=5;endline=16;md5=3ec288b2676528cd2b069364e313016f"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.lz"
-SRC_URI[md5sum] = "ed6b5b82d74cbd925db2b829350e74b1"
-SRC_URI[sha256sum] = "ed8d0c9d9aac80a9110e9cb0d0a91a7390d3bf9f816b67a62ca4eb140f4747b8"
-
-# This isn't already added by base.bbclass
-do_unpack[depends] += "lzip-native:do_populate_sysroot"
-
-CONFIGUREOPTS = "\
-    '--srcdir=${S}' \
-    '--prefix=${prefix}' \
-    '--exec-prefix=${exec_prefix}' \
-    '--bindir=${bindir}' \
-    '--datadir=${datadir}' \
-    '--infodir=${infodir}' \
-    '--sysconfdir=${sysconfdir}' \
-    'CXX=${CXX}' \
-    'CPPFLAGS=${CPPFLAGS}' \
-    'CXXFLAGS=${CXXFLAGS}' \
-    'LDFLAGS=${LDFLAGS}' \
-"
-EXTRA_OEMAKE = ""
-
-do_configure () {
-    ${S}/configure ${CONFIGUREOPTS}
-}
-
-do_install () {
-    oe_runmake 'DESTDIR=${D}' install
-    # Info dir listing isn't interesting at this point so remove it if it exists.
-    if [ -e "${D}${infodir}/dir" ]; then
-        rm -f ${D}${infodir}/dir
-    fi
-}
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.22.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.22.bb
new file mode 100644
index 0000000..2df7db9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.22.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Data recovery tool"
+DESCRIPTION = "GNU ddrescue is a data recovery tool. It copies data \
+    from one file or block device (hard disc, cdrom, etc) to another, \
+    trying hard to rescue data in case of read errors."
+HOMEPAGE = "http://www.gnu.org/software/ddrescue/ddrescue.html"
+SECTION = "console"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=76d6e300ffd8fb9d18bd9b136a9bba13 \
+                    file://main_common.cc;beginline=5;endline=16;md5=3ec288b2676528cd2b069364e313016f"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.lz"
+SRC_URI[md5sum] = "49c845ed89d25b534842e40366154cb4"
+SRC_URI[sha256sum] = "09857b2e8074813ac19da5d262890f722e5f7900e521a4c60354cef95eea10a7"
+
+# This isn't already added by base.bbclass
+do_unpack[depends] += "lzip-native:do_populate_sysroot"
+
+CONFIGUREOPTS = "\
+    '--srcdir=${S}' \
+    '--prefix=${prefix}' \
+    '--exec-prefix=${exec_prefix}' \
+    '--bindir=${bindir}' \
+    '--datadir=${datadir}' \
+    '--infodir=${infodir}' \
+    '--sysconfdir=${sysconfdir}' \
+    'CXX=${CXX}' \
+    'CPPFLAGS=${CPPFLAGS}' \
+    'CXXFLAGS=${CXXFLAGS}' \
+    'LDFLAGS=${LDFLAGS}' \
+"
+EXTRA_OEMAKE = ""
+
+do_configure () {
+    ${S}/configure ${CONFIGUREOPTS}
+}
+
+do_install () {
+    oe_runmake 'DESTDIR=${D}' install
+    # Info dir listing isn't interesting at this point so remove it if it exists.
+    if [ -e "${D}${infodir}/dir" ]; then
+        rm -f ${D}${infodir}/dir
+    fi
+}
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20160828.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20160828.bb
deleted file mode 100644
index 85dede1..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20160828.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "display dialog boxes from shell scripts"
-DESCRIPTION = "Dialog lets you to present a variety of questions \
-or display messages using dialog boxes from a shell \
-script (or any scripting language)."
-HOMEPAGE = "http://invisible-island.net/dialog/"
-SECTION = "console/utils"
-DEPENDS = "ncurses"
-LICENSE = "LGPL-2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "ftp://ftp.invisible-island.net/${BPN}/${BP}.tgz \
-          "
-SRC_URI[md5sum] = "a39ec183517bc1feaff017d067300b8c"
-SRC_URI[sha256sum] = "453095abaec288bfbc1ca9faced917e17742cff1ea45ec46210071ac153562f9"
-
-# hardcoded here for use in dialog-static recipe
-S = "${WORKDIR}/dialog-${PV}"
-
-inherit autotools-brokensep pkgconfig
-
-EXTRA_OECONF = "--with-ncurses \
-                --disable-rpath-hack"
-
-do_configure() {
-    gnu-configize --force
-    sed -i 's,${cf_ncuconfig_root}6-config,${cf_ncuconfig_root}-config,g' -i configure
-    sed -i 's,cf_have_ncuconfig=unknown,cf_have_ncuconfig=yes,g' -i configure
-    oe_runconf
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20171209.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20171209.bb
new file mode 100644
index 0000000..63c65c4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20171209.bb
@@ -0,0 +1,29 @@
+SUMMARY = "display dialog boxes from shell scripts"
+DESCRIPTION = "Dialog lets you to present a variety of questions \
+or display messages using dialog boxes from a shell \
+script (or any scripting language)."
+HOMEPAGE = "http://invisible-island.net/dialog/"
+SECTION = "console/utils"
+DEPENDS = "ncurses"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI = "ftp://ftp.invisible-island.net/${BPN}/${BP}.tgz \
+          "
+SRC_URI[md5sum] = "f66f28beca900b54f5fc90fdcce93508"
+SRC_URI[sha256sum] = "20139442119e2eff5c35236e8e5e313c901539008d9cccf8c8ab3851b41267e6"
+
+# hardcoded here for use in dialog-static recipe
+S = "${WORKDIR}/dialog-${PV}"
+
+inherit autotools-brokensep pkgconfig
+
+EXTRA_OECONF = "--with-ncurses \
+                --disable-rpath-hack"
+
+do_configure() {
+    gnu-configize --force
+    sed -i 's,${cf_ncuconfig_root}6-config,${cf_ncuconfig_root}-config,g' -i configure
+    sed -i 's,cf_have_ncuconfig=unknown,cf_have_ncuconfig=yes,g' -i configure
+    oe_runconf
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.0.bb
new file mode 100644
index 0000000..e1a6d95
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.0.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Simple wrapper script which proxies signals to a child"
+HOMEPAGE = "https://github.com/Yelp/dumb-init/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5940d39995ea6857d01b8227109c2e9c"
+
+SRC_URI = "https://github.com/Yelp/dumb-init/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "4eb7f43d7823686723ff7ac1bad097cb"
+SRC_URI[sha256sum] = "74486997321bd939cad2ee6af030f481d39751bc9aa0ece84ed55f864e309a3f"
+
+EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS} ${LDFLAGS}'"
+
+do_install() {
+    install -d ${D}${base_sbindir}
+    install ${S}/dumb-init ${D}${base_sbindir}/
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch
deleted file mode 100644
index 1b8815e..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 3d43c5efdb632da5d7387dcadce4e87b83929c64 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 24 Aug 2017 15:54:47 -0700
-Subject: [PATCH] efivar-dp.h: Add -Wunknown-attributes when using clang
-
-change !dp check to a comparision against NULL to silent clang warning
-nonnull parameter 'dp' will evaluate to 'true' on first encounter
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/include/efivar/efivar-dp.h | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-Index: git/src/include/efivar/efivar-dp.h
-===================================================================
---- git.orig/src/include/efivar/efivar-dp.h
-+++ git/src/include/efivar/efivar-dp.h
-@@ -783,9 +783,14 @@ extern int efidp_append_instance(const_e
-  * though older or other compilers might just ignore that attribute if they
-  * don't support it.  Ugh.
-  */
-+#pragma GCC diagnostic push
- #if defined(__GNUC__) && __GNUC__ >= 6
- #pragma GCC diagnostic ignored "-Wnonnull-compare"
- #endif
-+#if defined(__clang__)
-+#pragma GCC diagnostic ignored "-Wunknown-attributes"
-+#pragma GCC diagnostic ignored "-Wpointer-bool-conversion"
-+#endif
- 
- static inline int16_t
- __attribute__((__artificial__))
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
deleted file mode 100644
index 6f6ca64..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 9a3c480af653b37e62d1be04d49fe7a60a80168f Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Fri, 25 Sep 2015 18:14:31 +0800
-Subject: [PATCH 1/2] efivar: fix for cross compile
-
-It builds and calls elf file makeguids to generate a header file which
-doesn't work for cross compile. Fix it.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-Upstream-Status: Pending
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
----
- src/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index 5fc7887..1829d22 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -29,8 +29,8 @@ all : deps $(TARGETS)
- ./guid-symbols.c : include/efivar/efivar-guids.h
- ./guids.bin : include/efivar/efivar-guids.h
- ./names.bin : include/efivar/efivar-guids.h
--include/efivar/efivar-guids.h : makeguids guids.txt
--	./makeguids guids.txt guids.bin names.bin \
-+include/efivar/efivar-guids.h : guids.txt
-+	makeguids guids.txt guids.bin names.bin \
- 		guid-symbols.c include/efivar/efivar-guids.h
- 
- makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT
--- 
-2.4.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch
deleted file mode 100644
index 73a7721..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 98b33d4193998687aa3a78c097f7bd4c393e0c85 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 15 Jul 2017 00:29:42 -0700
-Subject: [PATCH] makeguids: Do not use __bswap_constant_{16|32} macros
-
-not available on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/makeguids.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/makeguids.c b/src/makeguids.c
-index da2f5f7..daf821a 100644
---- a/src/makeguids.c
-+++ b/src/makeguids.c
-@@ -155,13 +155,13 @@ main(int argc, char *argv[])
- #if BYTE_ORDER == BIG_ENDIAN\n\
- #define cpu_to_be32(n) (n)\n\
- #define cpu_to_be16(n) (n)\n\
--#define cpu_to_le32(n) (__bswap_constant_32(n))\n\
--#define cpu_to_le16(n) (__bswap_constant_16(n))\n\
-+#define cpu_to_le32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\
-+#define cpu_to_le16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\
- #else\n\
- #define cpu_to_le32(n) (n)\n\
- #define cpu_to_le16(n) (n)\n\
--#define cpu_to_be32(n) (__bswap_constant_32(n))\n\
--#define cpu_to_be16(n) (__bswap_constant_16(n))\n\
-+#define cpu_to_be32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\
-+#define cpu_to_be16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\
- #endif\n\
- """);
- 
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0003-efivar-fix-for-cross-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0003-efivar-fix-for-cross-compile.patch
deleted file mode 100644
index 3f43f2a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/0003-efivar-fix-for-cross-compile.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 7ead29ca6bb5e280ae07551cc3521281ecf73682 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Sat, 7 May 2016 02:06:47 -0400
-Subject: [PATCH] Makefile: fix efivar.pc not found
-
-It fixes efivar.pc not found:
-...
-| install -d -m 755 efivar/0.23-r0/image/usr/lib/pkgconfig/
-| install -m 644 efivar.pc efivar/0.23-r0/image/usr/lib/pkgconfig/
-;  install -m 644 efiboot.pc efivar/0.23-r0/image/usr/lib/pkgconfig/
-;
-| install: cannot stat 'efivar.pc': No such file or directory
-| install: cannot stat 'efiboot.pc': No such file or directory
-| make[1]: *** [install] Error 1
-| make[1]: Leaving directory `efivar/0.23-r0/git/src'
-| make: *** [install] Error 2
-| ERROR: oe_runmake failed
-...
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- src/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index c7a0ca3..ad9c427 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -78,7 +78,9 @@ install : all
- 		ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x).$(MAJOR_VERSION);\
- 		ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x); )
- 	$(INSTALL) -d -m 755 $(DESTDIR)$(PCDIR)
--	$(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(PCDIR) ;)
-+	$(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(TOPDIR)/src/$(x).in $(DESTDIR)$(PCDIR)/$(x) ;\
-+		sed -i -e "s:@@LIBDIR@@:$(libdir):g" -e "s:@@VERSION@@:$(VERSION):g" \
-+			$(DESTDIR)$(PCDIR)/$(x); )
- 	$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)/efivar
- 	$(foreach x, $(wildcard $(TOPDIR)/src/include/efivar/*.h), $(INSTALL) -m 644 $(x) $(DESTDIR)$(includedir)/efivar/$(notdir $(x));)
- 	$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/allow-multi-definitions-for-native.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/allow-multi-definitions-for-native.patch
deleted file mode 100644
index 87f5555..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/allow-multi-definitions-for-native.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
-It fails to create .so file when build efivar-native:
-
-| lib.o:(*IND*+0x0): multiple definition of `efi_set_variable'
-| lib.o:lib.c:(.text+0xa0): first defined here
-
-Add link option '-z muldefs' to fix it.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff --git a/Make.rules b/Make.rules
-index d9c0609..874bce0 100644
---- a/Make.rules
-+++ b/Make.rules
-@@ -20,6 +20,7 @@ include $(TOPDIR)/Make.version
- 	$(CCLD) $(ccldflags) $(CPPFLAGS) $(SOFLAGS) \
- 	  -Wl,-soname,$@.$(MAJOR_VERSION) \
- 	  -Wl,--version-script=$(MAP) \
-+	  -Wl,-z,muldefs \
- 	  -o $@ $^ $(LDLIBS)
- 
- %.o : %.c
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch
deleted file mode 100644
index e3fa2e1..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1361225abbaba878960f970df39a4570bbc39553 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 26 May 2016 21:50:01 -0400
-Subject: [PATCH] fix compile failure with older host gcc (<=4.6)
-
-While host gcc version is 4.6.3 in ubuntu 1204, it
-did not recognize -std=gnu11 and -Wmaybe-uninitialized.
-
-While host gcc version is 4.4.7 in centos6, it
-did not recognize -std=gnu11, -Wmaybe-uninitialized,
-and -flto.
-
-For native build, use -std=gnu99 to replace -std=gnu11,
-and directly remove -Wmaybe-uninitialized and -flto.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc.specs | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: git/gcc.specs
-===================================================================
---- git.orig/gcc.specs
-+++ git/gcc.specs
-@@ -2,13 +2,13 @@
- + -D_GNU_SOURCE
- 
- *efivar_cpp_options:
-- -Werror -Wall -std=gnu11 -Wextra
-+ -Werror -Wall -std=gnu99 -Wextra
- 
- *cpp_options:
- + %(efivar_cpp_options)
- 
- *cc1_options:
--+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
-++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
- 
- *self_spec:
- + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch
deleted file mode 100644
index fc8f8c8..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Taken from void linux
-
-Index: git/src/linux.c
-===================================================================
---- git.orig/src/linux.c
-+++ git/src/linux.c
-@@ -40,6 +40,10 @@
- #include <efivar.h>
- #include <efiboot.h>
- 
-+#if !defined(__GLIBC__)
-+#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
-+#endif
-+
- #include "dp.h"
- #include "linux.h"
- #include "util.h"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/0001-Remove-undefined-behavior.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/0001-Remove-undefined-behavior.patch
deleted file mode 100644
index 51397dc..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/0001-Remove-undefined-behavior.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From d2a03b3e43043b596a79803bcb93f70e513bbb50 Mon Sep 17 00:00:00 2001
-From: Patrick Georgi <pgeorgi@google.com>
-Date: Mon, 13 Mar 2017 13:48:03 +0100
-Subject: [PATCH] Remove undefined behavior
-
-Per clang-3.9, the compiler fails on #define ...defined(...) statements
-as they're undefined behavior (apparently with different behavior
-between gcc/clang and msvc, too).
-
-See clang's cfe repo commit r258128 for details.
-
-Change-Id: I82b6235e11b425fae45eebbe06b08f81c5bdbb98
-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
-Reviewed-on: https://review.coreboot.org/18792
-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
----
- hwaccess.c | 18 +++++++++++++++---
- platform.h | 18 +++++++++++++++---
- 2 files changed, 30 insertions(+), 6 deletions(-)
-
-diff --git a/hwaccess.c b/hwaccess.c
-index aede7e3..2bf6f42 100644
---- a/hwaccess.c
-+++ b/hwaccess.c
-@@ -37,9 +37,21 @@
- #error "Unknown operating system"
- #endif
- 
--#define USE_IOPL	(IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__))
--#define USE_DEV_IO	(defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__))
--#define USE_IOPERM	(defined(__gnu_hurd__))
-+#if IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__)
-+#define USE_IOPL 1
-+#else
-+#define USE_IOPL 0
-+#endif
-+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-+#define USE_DEV_IO 1
-+#else
-+#define USE_DEV_IO 0
-+#endif
-+#if defined(__gnu_hurd__)
-+#define USE_IOPERM 1
-+#else
-+#define USE_IOPERM 0
-+#endif
- 
- #if USE_IOPERM
- #include <sys/io.h>
-diff --git a/platform.h b/platform.h
-index c5a52ef..b2fdcd0 100644
---- a/platform.h
-+++ b/platform.h
-@@ -25,9 +25,21 @@
- #define __PLATFORM_H__ 1
- 
- // Helper defines for operating systems
--#define IS_LINUX	(defined(__gnu_linux__) || defined(__linux__))
--#define IS_MACOSX	(defined(__APPLE__) && defined(__MACH__)) /* yes, both. */
--#define IS_WINDOWS	(defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__WINDOWS__))
-+#if defined(__gnu_linux__) || defined(__linux__)
-+#define IS_LINUX 1
-+#else
-+#define IS_LINUX 0
-+#endif
-+#if defined(__APPLE__) && defined(__MACH__) /* yes, both. */
-+#define IS_MACOSX 1
-+#else
-+#define IS_MACOSX 0
-+#endif
-+#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__WINDOWS__)
-+#define IS_WINDOWS 1
-+#else
-+#define IS_WINDOWS 0
-+#endif
- 
- // Likewise for target architectures
- #if defined (__i386__) || defined (__x86_64__) || defined(__amd64__)
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/0001-spi-Define-_XOPEN_SOURCE-to-enable-ffs-libc-API.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/0001-spi-Define-_XOPEN_SOURCE-to-enable-ffs-libc-API.patch
deleted file mode 100644
index 4170fef..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom/0001-spi-Define-_XOPEN_SOURCE-to-enable-ffs-libc-API.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 7c65a465a3ddeb7afb9a7c49d010ae7e5d5b1ad1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 18 Jul 2017 20:25:49 -0700
-Subject: [PATCH] spi: Define _XOPEN_SOURCE to enable ffs() libc API
-
-musl exposes this issue
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- spi.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/spi.c b/spi.c
-index 894f73f..aeb6518 100644
---- a/spi.c
-+++ b/spi.c
-@@ -21,7 +21,7 @@
- /*
-  * Contains the generic SPI framework
-  */
--
-+#define _XOPEN_SOURCE
- #include <strings.h>
- #include <string.h>
- #include "flash.h"
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom_0.9.9.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom_0.9.9.bb
deleted file mode 100644
index 4cdd8ad..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/flashrom/flashrom_0.9.9.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-DESCRIPTION = "flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips"
-LICENSE = "GPLv2"
-HOMEPAGE = "http://flashrom.org"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "pciutils libusb libusb-compat"
-
-SRC_URI = "http://download.flashrom.org/releases/flashrom-${PV}.tar.bz2 \
-           file://0001-spi-Define-_XOPEN_SOURCE-to-enable-ffs-libc-API.patch \
-           file://sst26.patch \
-           file://0001-Remove-undefined-behavior.patch \
-           "
-SRC_URI[md5sum] = "aab9c98925d9cfb5ffb28b67a6112530"
-SRC_URI[sha256sum] = "cb3156b0f63eb192024b76c0814135930297aac41f80761a5d293de769783c45"
-
-inherit pkgconfig
-
-do_install() {
-    oe_runmake PREFIX=${prefix} DESTDIR=${D} install
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_0.12.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_0.12.1.bb
index e2edd09..99f680f 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_0.12.1.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_0.12.1.bb
@@ -21,6 +21,10 @@
 
 EXTRA_OECMAKE = "-DGNU_HOST=${HOST_SYS} -DFLB_ALL=ON -DFLB_TD=1"
 
+# With Ninja it fails with:
+# ninja: error: build.ninja:134: bad $-escape (literal $ must be written as $$)
+OECMAKE_GENERATOR = "Unix Makefiles"
+
 SYSTEMD_SERVICE_${PN} = "td-agent-bit.service"
 
 TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot.inc b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot.inc
deleted file mode 100644
index 19ee874..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-DESCRIPTION = "Gnuplot is a portable command-line driven interactive datafile \
-(text or binary) and function plotting utility."
-HOMEPAGE = "http://www.gnuplot.info/"
-SECTION = "console/scientific"
-LICENSE = "gnuplot"
-LIC_FILES_CHKSUM = "file://Copyright;md5=243a186fc2fd3b992125d60d5b1bab8f"
-DEPENDS = "virtual/libx11 gd readline"
-
-inherit autotools distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-acpaths = ""
-
-PACKAGECONFIG ??= "cairo"
-PACKAGECONFIG[cairo] = "--with-cairo,--without-cairo,cairo pango"
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
-# there's compilation failure if qt4 is enabled
-PACKAGECONFIG[qt4] = "--with-qt,--without-qt,qt4-x11-free"
-
-EXTRA_OECONF = "--with-readline=${STAGING_LIBDIR}/.. \
-                --without-tutorial \
-                --disable-wxwidgets"
-
-do_compile_prepend() {
-    install -m 0644 ${WORKDIR}/qtplot-0.2/qtopia.trm ${S}/term/
-}
-
-do_install_append() {
-    install -d ${D}${datadir}/applications/
-    install -m 0644 ${WORKDIR}/gnuplot.desktop ${D}${datadir}/applications/
-    install -d ${D}${datadir}/pixmaps/
-    install -m 0644 ${WORKDIR}/gnuplot.png ${D}${datadir}/pixmaps/
-}
-
-PACKAGES =+ "${PN}-x11-dbg ${PN}-x11"
-DESCRIPTION_${PN}-x11 = "X11 display terminal for Gnuplot."
-SECTION_${PN}-x11 = "x11/scientific"
-FILES_${PN}-x11 = "${libexecdir} ${datadir}/applications ${datadir}/pixmaps ${libdir}/X11 "
-
-FILES_${PN} += "${datadir}/texmf"
-FILES_${PN}-x11-dbg += "${libexecdir}/gnuplot/*/.debug"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0001-reduce-build-to-conversion-tools-for-native-build.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0001-reduce-build-to-conversion-tools-for-native-build.patch
new file mode 100644
index 0000000..f8f1fd0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0001-reduce-build-to-conversion-tools-for-native-build.patch
@@ -0,0 +1,31 @@
+From a2ac966813fdc04b788be9c8474a4c5e36c109a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 6 Mar 2018 21:53:26 +0100
+Subject: [PATCH] reduce build to conversion tools for native build
+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@gmail.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 9241ce5..b24e291 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in -*-Makefile-*-
+ AUTOMAKE_OPTIONS = foreign
+ 
+-SUBDIRS = config m4 term src docs man demo tutorial share
++SUBDIRS = docs
+ 
+ EXTRA_DIST = BUGS Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \
+ Makefile.maint PATCHLEVEL PGPKEYS README RELEASE_NOTES \
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0002-do-not-build-demos.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0002-do-not-build-demos.patch
new file mode 100644
index 0000000..8e0b4a2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0002-do-not-build-demos.patch
@@ -0,0 +1,31 @@
+From a2ac966813fdc04b788be9c8474a4c5e36c109a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 6 Mar 2018 21:53:26 +0100
+Subject: [PATCH] Do not build demos
+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@gmail.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 9241ce5..b24e291 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in -*-Makefile-*-
+ AUTOMAKE_OPTIONS = foreign
+ 
+-SUBDIRS = config m4 term src docs man demo tutorial share
++SUBDIRS = config m4 term src docs man tutorial share
+ 
+ EXTRA_DIST = BUGS Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \
+ Makefile.maint PATCHLEVEL PGPKEYS README RELEASE_NOTES \
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0003-Use-native-tools-to-build-docs.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0003-Use-native-tools-to-build-docs.patch
new file mode 100644
index 0000000..a4039c3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0003-Use-native-tools-to-build-docs.patch
@@ -0,0 +1,111 @@
+From 1128a98fd1676981e536d8773f363cb832cfa6bb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 6 Mar 2018 22:28:56 +0100
+Subject: [PATCH] Use native tools to build docs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ docs/Makefile.am | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/docs/Makefile.am b/docs/Makefile.am
+index 3baf0c4..e82f87d 100644
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -152,7 +152,7 @@ gnuplot-groff.ps: gnuplot.ms $(srcdir)/titlepag.ms
+ 
+ ### doc2xxx dependencies
+ gnuplot.ms: doc2ms$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN) ./doc2ms$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.ms "$(srcdir)/titlepag.ms"
++	$(AM_V_GEN) doc2ms$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.ms "$(srcdir)/titlepag.ms"
+ 
+ doc2ms_SOURCES = doc2ms.c termdoc.c
+ doc2ms_CPPFLAGS = -DALL_TERM_DOC $(AM_CPPFLAGS)
+@@ -173,10 +173,10 @@ pdf_figures: $(GNUPLOT_EXE) $(srcdir)/plotstyles.gnu
+ 	$(AM_V_GEN)touch $@
+ 
+ figures.tex: allterm.h doc2tex$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN)./doc2tex$(EXEEXT) -figures $(srcdir)/gnuplot.doc $@
++	$(AM_V_GEN) doc2tex$(EXEEXT) -figures $(srcdir)/gnuplot.doc $@
+ 
+ nofigures.tex: allterm.h doc2tex$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN)./doc2tex$(EXEEXT) $(srcdir)/gnuplot.doc $@
++	$(AM_V_GEN) doc2tex$(EXEEXT) $(srcdir)/gnuplot.doc $@
+ 
+ pdf: gnuplot.pdf
+ pdf_nofig: nofigures.pdf
+@@ -256,7 +256,7 @@ gnuplot.ps: gnuplot.dvi
+ hlp: gnuplot.hlp
+ 
+ gnuplot.hlp: doc2hlp$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN)./doc2hlp$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.hlp
++	$(AM_V_GEN)doc2hlp$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.hlp
+ 
+ doc2hlp_SOURCES = doc2hlp.c termdoc.c
+ 
+@@ -264,14 +264,14 @@ doc2hlp_SOURCES = doc2hlp.c termdoc.c
+ gih: gnuplot.gih
+ 
+ gnuplot.gih: doc2gih$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN)./doc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih
++	$(AM_V_GEN)doc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih
+ 
+ doc2gih_SOURCES = doc2gih.c termdoc.c
+ 
+ # To include all terminals in the .gih file
+ allgih: alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc
+ 	@echo "generate gnuplot.gih with all terminals"
+-	$(AM_V_at)./alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih
++	$(AM_V_at)alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih
+ 
+ alldoc2gih_SOURCES = doc2gih.c termdoc.c
+ alldoc2gih_CPPFLAGS = -DALL_TERM_DOC $(AM_CPPFLAGS)
+@@ -286,7 +286,7 @@ $(srcdir)/windows/wgnuplot.hhk
+ wxhelp/wgnuplot.hhc wxhelp/wgnuplot.hhk wxhelp/*.html windows/*.png
+ 
+ wxhelp/wgnuplot.html: doc2wxhtml$(EXEEXT) $(srcdir)/gnuplot.doc 
+-	$(AM_V_GEN) ./doc2wxhtml$(EXEEXT) $(srcdir)/gnuplot.doc wxhelp/
++	$(AM_V_GEN) doc2wxhtml$(EXEEXT) $(srcdir)/gnuplot.doc wxhelp/
+ 
+ #doc2wxhtml_SOURCES = windows/doc2html.c termdoc.c xref.c allterm.h
+ #doc2wxhtml_CPPFLAGS = -DALL_TERM_DOC -DWXHELP -I../src $(AM_CPPFLAGS)
+@@ -336,7 +336,7 @@ install-info: gnuplot.info
+ ipf: gnuplot.ipf
+ 
+ gnuplot.ipf: doc2ipf$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN) ./doc2ipf$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.ipf
++	$(AM_V_GEN) doc2ipf$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.ipf
+ 
+ doc2ipf_SOURCES = doc2ipf.c termdoc.c xref.c
+ 
+@@ -344,7 +344,7 @@ doc2ipf_SOURCES = doc2ipf.c termdoc.c xref.c
+ rtf: gnuplot.rtf
+ 
+ gnuplot.rtf: doc2rtf$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN) ./doc2rtf$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.rtf
++	$(AM_V_GEN) doc2rtf$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.rtf
+ 
+ doc2rtf_SOURCES = doc2rtf.c termdoc.c xref.c
+ 
+@@ -352,13 +352,13 @@ doc2rtf_SOURCES = doc2rtf.c termdoc.c xref.c
+ rnh: gnuplot.rnh
+ 
+ gnuplot.rnh: doc2rnh$(EXEEXT) $(srcdir)/gnuplot.doc
+-	$(AM_V_GEN) ./doc2rnh$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.rnh
++	$(AM_V_GEN) doc2rnh$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.rnh
+ 
+ doc2rnh_SOURCES = doc2rnh.c termdoc.c
+ 
+ # this is how to check the gnuplot.doc file
+ check-local: checkdoc$(EXEEXT)
+-	$(AM_V_at)./checkdoc$(EXEEXT) < $(srcdir)/gnuplot.doc; \
++	$(AM_V_at)checkdoc$(EXEEXT) < $(srcdir)/gnuplot.doc; \
+ 	if test $$? -eq 0; then \
+ 	  echo "PASS: gnuplot.doc"; \
+ 	else \
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0004-Add-configure-option-to-find-qt5-native-tools.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0004-Add-configure-option-to-find-qt5-native-tools.patch
new file mode 100644
index 0000000..7ed9e76
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/0004-Add-configure-option-to-find-qt5-native-tools.patch
@@ -0,0 +1,42 @@
+From 577e21622475fa29fd471149cf2380c53fdbfcbd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Tue, 6 Mar 2018 22:26:48 +0100
+Subject: [PATCH] Add configure option to find qt5 native tools
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Pkg-config checks for target locations. With these qt5 tools as uic/moc..
+cannot be used.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ configure.ac | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index cdd831a..fdd192b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1133,11 +1133,15 @@ if test "${enable_qt}" = yes ; then
+   else
+     try_qt4=yes
+   fi
++  AC_ARG_WITH(qt5nativesysroot,
++    AC_HELP_STRING([--with-qt5nativesysroot=PATH], [prepend path - for native qt5 tools]),
++    [QT5NATIVESYSROOT="$withval"], [QT5NATIVESYSROOT=""])
++
+   if test "x${with_qt}" != "xqt4"; then
+     PKG_CHECK_MODULES_NOFAIL(QT, [Qt5Core Qt5Gui Qt5Network Qt5Svg Qt5PrintSupport])
+     if test $pkg_failed = no; then
+       try_qt4=no
+-      QT5LOC=`$PKG_CONFIG --variable=host_bins Qt5Core`
++      QT5LOC=${QT5NATIVESYSROOT}`$PKG_CONFIG --variable=host_bins Qt5Core`
+       if test "x${QT5LOC}" != "x"; then
+         UIC=${QT5LOC}/uic
+         MOC=${QT5LOC}/moc
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/gnuplot.desktop b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/gnuplot.desktop
index f67df9e..1012e47 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/gnuplot.desktop
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/gnuplot.desktop
@@ -1,8 +1,8 @@
 [Desktop Entry]
 Name=Gnuplot
 Comment=Plot data and function graphs
-Exec=x-terminal-emulator -e gnuplot
-Terminal=false
+Exec=gnuplot
+Terminal=true
 Type=Application
 Icon=gnuplot
 Categories=Science;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/lua-loadlibs-configure-in-fix.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/lua-loadlibs-configure-in-fix.patch
deleted file mode 100644
index 23f2cd2..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/lua-loadlibs-configure-in-fix.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: gnuplot-4.6.5/configure.in
-===================================================================
---- gnuplot-4.6.5.orig/configure.in
-+++ gnuplot-4.6.5/configure.in
-@@ -690,6 +690,11 @@ if test "${with_lua}" = yes ; then
-   fi
- 
-   if test "$with_lua" != no; then
-+    dnl check for dlopen/dl to fix loadlibs link failure
-+    AC_CHECK_FUNC([dlopen], [],
-+      AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
-+    AC_SUBST(DLOPEN_LIBS)
-+    LUA_LIBS="$LUA_LIBS $DLOPEN_LIBS"
-     TERMLIBS="$TERMLIBS $LUA_LIBS"
-     CPPFLAGS="$CPPFLAGS $LUA_CFLAGS"
-   else
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/qtopia.trm b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/qtopia.trm
deleted file mode 100644
index b52f9bb..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/qtopia.trm
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
- * $Id: dumb.trm,v 1.16 2004/04/13 17:24:16 broeker Exp $
- *
- */
-
-/* GNUPLOT - qtopia.trm */
-
-/*[
- * Copyright 1991 - 1993, 1998, 2004   Thomas Williams, Colin Kelley
- *
- * Permission to use, copy, and distribute this software and its
- * documentation for any purpose with or without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.
- *
- * Permission to modify the software is granted, but not the right to
- * distribute the complete modified source code.  Modifications are to
- * be distributed as patches to the released version.  Permission to
- * distribute binaries produced by compiling modified sources is granted,
- * provided you
- *   1. distribute the corresponding source modifications from the
- *    released version in the form of a patch file along with the binaries,
- *   2. add special version identification to distinguish your version
- *    in addition to the base release version number,
- *   3. provide your name and address as the primary contact for the
- *    support of your modified version, and
- *   4. retain our contact information in regard to use of the base
- *    software.
- * Permission to distribute the released version of the source code along
- * with corresponding source modifications in the form of a patch file is
- * granted with same provisions 2 through 4 for binary distributions.
- *
- * This software is provided "as is" without express or implied warranty
- * to the extent permitted by applicable law.
-]*/
-
-/*
- * This file is included by ../term.c.
- *
- * This terminal driver supports:
- *   qtopia terminals
- *
- * AUTHORS
- *   Michael Neuroth, 2004-05-16
- *           INTERNET: michael.neuroth@freenet.de
- *
- * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
- *
- */
-#include "driver.h"
-
-#define NO_QTOPIA_ENHANCED_SUPPORT
-
-#ifdef TERM_REGISTER
-register_term(qtopia_driver)
-#endif
-
-#ifdef TERM_PROTO
-TERM_PUBLIC void QTOPIA_options __PROTO((void));
-TERM_PUBLIC void QTOPIA_init __PROTO((void));
-TERM_PUBLIC void QTOPIA_graphics __PROTO((void));
-TERM_PUBLIC void QTOPIA_text __PROTO((void));
-TERM_PUBLIC void QTOPIA_reset __PROTO((void));
-TERM_PUBLIC void QTOPIA_linetype __PROTO((int linetype));
-TERM_PUBLIC void QTOPIA_move __PROTO((unsigned int x, unsigned int y));
-TERM_PUBLIC void QTOPIA_point __PROTO((unsigned int x, unsigned int y,
-				     int point));
-TERM_PUBLIC void QTOPIA_vector __PROTO((unsigned int x, unsigned int y));
-TERM_PUBLIC void QTOPIA_put_text __PROTO((unsigned int x, unsigned int y,
-					const char *str));
-TERM_PUBLIC void QTOPIA_arrow __PROTO((unsigned int sx, unsigned int sy,
-				     unsigned int ex, unsigned int ey,
-				     int head));
-
-#define ENHqtopia_put_text NULL
-
-
-#define QTOPIA_XMAX 4096
-#define QTOPIA_YMAX 4096
-
-#ifdef ZAURUS
-#define QTOPIA_VCHAR (QTOPIA_YMAX/25)
-#define QTOPIA_HCHAR (QTOPIA_XMAX/40)
-#define QTOPIA_VTIC (QTOPIA_YMAX/50)
-#define QTOPIA_HTIC (QTOPIA_XMAX/40)
-#else
-#define QTOPIA_VCHAR (QTOPIA_YMAX/25)
-#define QTOPIA_HCHAR (QTOPIA_XMAX/50)
-#define QTOPIA_VTIC (QTOPIA_YMAX/100)
-#define QTOPIA_HTIC (QTOPIA_XMAX/150)
-#endif
-
-#endif /* TERM_PROTO */
-
-#ifdef TERM_BODY
-
-/*#include <winsock2.h>*/
-/* needs: ws2_32.lib */
-#ifndef _MSC_VER
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#endif
-
-#define QTOPIA_MAX_BUFFER		512
-#define QTOPIA_MAX_DELAY_COUNT	20	/* * 100 ms = 2 s */
-
-#ifdef _MSC_VER
-#define QTOPIA_BAD_SOCKET		INVALID_SOCKET		/* -1 */
-#define QTOPIA_BAD_CONNECT		SOCKET_ERROR
-#else
-#define QTOPIA_BAD_SOCKET		-1
-#define QTOPIA_BAD_CONNECT		-1
-#endif
-#define QTOPIA_PORT_NO			5050
-
-static int qtopia_client_socket = QTOPIA_BAD_SOCKET;
-static unsigned short qtopia_port_no = QTOPIA_PORT_NO;
-static char qtopia_host_name[QTOPIA_MAX_BUFFER+1] = { "localhost" };
-
-static int OpenClient __PROTO(( int test));
-static void CloseClient();
-
-static void MySleep( delay )
-int delay;
-{
-#ifdef _MSC_VER
-	Sleep( delay );
-#else
-	usleep( delay );
-#endif
-}
-
-static void InitSockets()
-{
-#ifdef _MSC_VER
-	WORD wVersionRequested;
-	WSADATA wsaData;
-	int err;
-
-	wVersionRequested = MAKEWORD( 2, 2 );
-
-	err = WSAStartup( wVersionRequested, &wsaData );
-#endif
-}
-
-static void ExitSockets()
-{
-#ifdef _MSC_VER
-	WSACleanup();
-#endif
-}
-
-static int CheckForQtplot( count )
-int count;
-{
-	/* test (via sockets) if qtplot is allready running */
-	if( !OpenClient( 1 ) )
-	{
-		/* give qtplot a litle bit time to start... */
-		if( count < QTOPIA_MAX_DELAY_COUNT )
-		{
-			if( count == 0 )
-			{
-#ifdef _MSC_VER
-				system( "start qtplot" );
-#else
-				system( "qtplot&" );
-#endif
-			}
-		
-			MySleep(100);
-
-			return CheckForQtplot( count+1 );
-		}
-		else
-		{
-			return 0;
-		}
-	}
-	else
-	{
-		CloseClient();
-
-		return 1;
-	}
-}
-
-static int OpenClient( test )
-int test;
-{
-    int len;
-    struct sockaddr_in address;
-    int result;
-
-	/*  Create a socket for the client.  */
-
-    qtopia_client_socket = socket(AF_INET, SOCK_STREAM, 0);
-
-	if( qtopia_client_socket != QTOPIA_BAD_SOCKET )
-	{
-		/*  Name the socket, as agreed with the server.  */
-
-		address.sin_family = AF_INET;
-		address.sin_addr.s_addr = inet_addr(/*qtopia_host_name*/"127.0.0.1");	/* localhost */
-		address.sin_port = htons(qtopia_port_no);
-		len = sizeof(address);
-
-		/*  Now connect our socket to the server's socket.  */
-
-		result = connect(qtopia_client_socket, (struct sockaddr *)&address, len);
-		
-		if( result == QTOPIA_BAD_SOCKET )
-		{
-			/* mark this socket as bad */
-
-			close( qtopia_client_socket );
-
-			qtopia_client_socket = QTOPIA_BAD_SOCKET;
-
-			if( !test )
-			{
-				fprintf( gpoutfile, "error connecting to server !\n" );
-			}
-			return 0;	/* something went wrong */
-		}
-	}
-	else
-	{
-		if( !test )
-		{
-			fprintf( gpoutfile, "error creating socket !\n" );
-		}
-		return 0;	/* something went wrong */
-	}
-
-	return 1;	/* everything ist ok ! */
-}
-
-static void CloseClient()
-{
-    close( qtopia_client_socket );
-}
-
-static int IsClientOk()
-{
-	return qtopia_client_socket != QTOPIA_BAD_SOCKET;
-}
-
-static void SendDataToSocket( sLine )
-const char * sLine;
-{
-	if( IsClientOk() )
-	{
-		int send_count;
-
-		send_count = send( qtopia_client_socket, sLine, strlen( sLine ), 0 );
-
-		if( send_count <= 0 )
-		{
-			fprintf( gpoutfile, "error writing to socket str=%s!\n", sLine );
-		}
-		/*
-		else
-		{
-			fprintf( gpoutfile, "wrote %d bytes\n", send_count );
-		}
-		*/
-	}
-	else
-	{
-		/* for testing... */
-		/*fprintf( gpoutfile, sLine );*/
-	}
-}
-
-/* ************************************************** */
-
-enum QTOPIA_id { QTOPIA_PORT, QTOPIA_HOST, QTOPIA_OTHER };
-
-static struct gen_table QTOPIA_opts[] =
-{
-    { "po$rt", QTOPIA_PORT },
-    { "ho$st", QTOPIA_HOST },
-    { NULL, QTOPIA_OTHER }
-};
-
-TERM_PUBLIC void
-QTOPIA_options()
-{
-    /* this is not for the qtopia terminal ! */
-	/*SendDataToSocket( "qtd options\n" );*/
-
-    int x, y;
-    struct value a;
-
-    while (!END_OF_COMMAND) 
-	{
-		switch(lookup_table(&QTOPIA_opts[0],c_token)) 
-		{
-			case QTOPIA_PORT:
-				c_token++;
-				if (END_OF_COMMAND)
-					int_error(c_token, "expecting port number");
-				qtopia_port_no = (int) real(const_express(&a));
-				break;
-			case QTOPIA_HOST:
-				c_token++;
-				if (END_OF_COMMAND)
-					int_error(c_token, "expecting host name");
-				if (isstring(c_token))
-					quote_str( qtopia_host_name, c_token, sizeof(qtopia_host_name) );
-				else
- 					copy_str( qtopia_host_name, c_token, sizeof(qtopia_host_name) );
-				c_token++;
-				break;
-			case QTOPIA_OTHER:
-			default:
-				break;
-		}
-    }
-
-    sprintf(term_options, "host=%s port=%d",qtopia_host_name,qtopia_port_no);
-}
-
-
-TERM_PUBLIC void
-QTOPIA_init()
-{
-	/* initialize lib (if necassary) */
-	InitSockets();
-	CheckForQtplot( 0 );
-	OpenClient( 0 ); 
-
-	SendDataToSocket( "qtd init\n" );
-}
-
-
-TERM_PUBLIC void
-QTOPIA_graphics()
-{
-	SendDataToSocket( "qtd graphics\n" );
-}
-
-TERM_PUBLIC void
-QTOPIA_text()
-{
-	SendDataToSocket( "qtd text\n" );
-}
-
-
-TERM_PUBLIC void
-QTOPIA_reset()
-{
-	SendDataToSocket( "qtd reset\n" );
-
-	/* give the qtplot a litle bit time to shutdown */
-	MySleep(100);
-
-	CloseClient();
-	ExitSockets();
-}
-
-
-TERM_PUBLIC void
-QTOPIA_linetype(linetype)
-int linetype;
-{
-	char sBuffer[QTOPIA_MAX_BUFFER];
-
-	sprintf( sBuffer, "qtd linetype type=%d\n",linetype );
-
-	SendDataToSocket( sBuffer );
-}
-
-
-TERM_PUBLIC void
-QTOPIA_move(x, y)
-unsigned int x, y;
-{
-	char sBuffer[QTOPIA_MAX_BUFFER];
-
-	sprintf( sBuffer, "qtd move x=%d y=%d\n",x,y );
-
-	SendDataToSocket( sBuffer );
-}
-
-
-TERM_PUBLIC void
-QTOPIA_point(x, y, point)
-unsigned int x, y;
-int point;
-{
-	char sBuffer[QTOPIA_MAX_BUFFER];
-
-	sprintf( sBuffer, "qtd point x=%d y=%d point=%d\n",x,y,point );
-
-	SendDataToSocket( sBuffer );
-}
-
-
-TERM_PUBLIC void
-QTOPIA_vector(_x, _y)
-unsigned int _x, _y;
-{
-	char sBuffer[QTOPIA_MAX_BUFFER];
-
-	sprintf( sBuffer, "qtd vector x=%d y=%d\n",_x,_y );
-
-	SendDataToSocket( sBuffer );
-}
-
-
-TERM_PUBLIC void
-QTOPIA_put_text(x, y, str)
-unsigned int x, y;
-const char *str;
-{
-	char sBuffer[QTOPIA_MAX_BUFFER];
-
-	sprintf( sBuffer, "qtd put_text x=%d y=%d str=%s\n",x,y,str );
-
-	SendDataToSocket( sBuffer );
-}
-
-/* not suported yet ! */
-TERM_PUBLIC void
-QTOPIA_arrow(sx, sy, ex, ey, head)
-    unsigned int sx, sy, ex, ey;
-    int head;		/* ignored */
-{
-	char sBuffer[QTOPIA_MAX_BUFFER];
-
-	sprintf( sBuffer, "qtd arrow sx=%d sy=%d ex=%d ey=%d head=%d\n",sx,sy,ex,ey,head );
-
-	SendDataToSocket( sBuffer );
-}
-
-
-#endif /* TERM_BODY */
-
-#ifdef TERM_TABLE
-TERM_TABLE_START(qtopia_driver)
-    "qtopia", "qtopia or Qt",
-    QTOPIA_XMAX, QTOPIA_YMAX, QTOPIA_VCHAR, QTOPIA_HCHAR,
-    QTOPIA_VTIC, QTOPIA_HTIC, QTOPIA_options, QTOPIA_init, QTOPIA_reset,
-    QTOPIA_text, null_scale, QTOPIA_graphics, QTOPIA_move, QTOPIA_vector,
-    QTOPIA_linetype, QTOPIA_put_text, null_text_angle,
-    null_justify_text, QTOPIA_point, /*QTOPIA_arrow*/0, set_font_null,
-    0,				/* pointsize */
-    TERM_CAN_MULTIPLOT,
-    NULL, NULL, NULL, NULL
-#ifdef USE_MOUSE
-    , NULL, NULL, NULL, NULL, NULL
-#endif
-#ifdef PM3D
-    , NULL, NULL, NULL, NULL
-#endif
-TERM_TABLE_END(qtopia_driver)
-
-#undef LAST_TERM
-#define LAST_TERM qtopia_driver
-
-#endif /* TERM_TABLE */
-
-#ifdef TERM_HELP
-START_HELP(qtopia)
-"1 qtopia",
-"?commands set terminal qtopia",
-"?set terminal qtopia",
-"?set term qtopia",
-"?terminal qtopia",
-"?term qtopia",
-"?qtopia",
-" The `qtopia` terminal driver has no additional options.",
-"",
-" Syntax:",
-"       set terminal qtopia",
-""
-END_HELP(qtopia)
-#endif /* TERM_HELP */
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/subdirs.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/subdirs.patch
deleted file mode 100644
index 8c7d1f0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot/subdirs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- /tmp/Makefile.am	2007-08-23 13:10:15.560659023 +0200
-+++ gnuplot-4.2.0/Makefile.am	2007-08-23 13:10:34.961764629 +0200
-@@ -1,7 +1,7 @@
- ## Process this file with automake to produce Makefile.in -*-Makefile-*-
- AUTOMAKE_OPTIONS = foreign 1.2h
- 
--SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share
-+SUBDIRS = config m4 term src  $(LISPDIR) man share
- 
- EXTRA_DIST = BUGS CodeStyle Copyright FAQ GNUmakefile INSTALL INSTALL.gnu \
- Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST README.exp \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.0.5.bb
deleted file mode 100644
index 42308ba..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.0.5.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require gnuplot.inc
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/gnuplot/${BP}.tar.gz;name=archive \
-    http://www.mneuroth.de/privat/zaurus/qtplot-0.2.tar.gz;name=qtplot \
-    file://subdirs.patch \
-    file://lua-loadlibs-configure-in-fix.patch \
-    file://gnuplot.desktop \
-    file://gnuplot.png \
-"
-
-SRC_URI[archive.md5sum] = "c5e96fca73afbee4f57cbc1bfce6b3b8"
-SRC_URI[archive.sha256sum] = "25f3e0bf192e01115c580f278c3725d7a569eb848786e12b455a3fda70312053"
-SRC_URI[qtplot.md5sum] = "0a481885a496092c77eb4017540b5cf6"
-SRC_URI[qtplot.sha256sum] = "6df317183ff62cc82f3dcf88207a267cd6478cb5147f55d7530c94f1ad5f4132"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.2.bb
new file mode 100644
index 0000000..4cc289d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.2.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Gnuplot is a portable command-line driven graphing utility"
+DESCRIPTION = "Gnuplot is a portable command-line driven interactive datafile \
+(text or binary) and function plotting utility."
+HOMEPAGE = "http://www.gnuplot.info/"
+SECTION = "console/scientific"
+LICENSE = "gnuplot"
+LIC_FILES_CHKSUM = "file://Copyright;md5=243a186fc2fd3b992125d60d5b1bab8f"
+DEPENDS = "${BPN}-native virtual/libx11 gd readline"
+
+inherit autotools distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gnuplot/${BP}.tar.gz;name=archive \
+    http://www.mneuroth.de/privat/zaurus/qtplot-0.2.tar.gz;name=qtplot \
+    file://gnuplot.desktop \
+    file://gnuplot.png \
+"
+SRC_URI_append_class-target = " \
+    file://0002-do-not-build-demos.patch \
+    file://0003-Use-native-tools-to-build-docs.patch \
+    file://0004-Add-configure-option-to-find-qt5-native-tools.patch \
+"
+
+SRC_URI[archive.md5sum] = "60aedd08998160593199459dea8467fe"
+SRC_URI[archive.sha256sum] = "a416d22f02bdf3873ef82c5eb7f8e94146795811ef808e12b035ada88ef7b1a1"
+SRC_URI[qtplot.md5sum] = "0a481885a496092c77eb4017540b5cf6"
+SRC_URI[qtplot.sha256sum] = "6df317183ff62cc82f3dcf88207a267cd6478cb5147f55d7530c94f1ad5f4132"
+
+# for building docs (they deserve it) we need *doc2* tools native
+BBCLASSEXTEND = "native"
+DEPENDS_class-native = "readline-native"
+PACKAGECONFIG_class-native = ""
+
+SRC_URI_append_class-native = "file://0001-reduce-build-to-conversion-tools-for-native-build.patch"
+
+do_install_class-native() {
+    install -d ${D}${bindir}
+	install ${B}/docs/*doc* ${D}${bindir}
+    rm ${D}${bindir}/*.o
+}
+
+PACKAGECONFIG ??= "cairo"
+PACKAGECONFIG[cairo] = "--with-cairo,--without-cairo,cairo pango"
+PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
+PACKAGECONFIG[qt5] = "--with-qt --with-qt5nativesysroot=${STAGING_DIR_NATIVE},--without-qt,qtbase-native qtbase qtsvg qttools-native"
+
+EXTRA_OECONF = "--with-readline=${STAGING_LIBDIR}/.. \
+                --without-tutorial \
+                --disable-wxwidgets"
+
+do_compile_prepend() {
+    install -m 0644 ${WORKDIR}/qtplot-0.2/qtopia.trm ${S}/term/
+}
+
+do_install_append_class-target() {
+    install -d ${D}${datadir}/applications/
+    install -m 0644 ${WORKDIR}/gnuplot.desktop ${D}${datadir}/applications/
+    install -d ${D}${datadir}/pixmaps/
+    install -m 0644 ${WORKDIR}/gnuplot.png ${D}${datadir}/pixmaps/
+}
+
+PACKAGES =+ "${PN}-x11-dbg ${PN}-x11"
+DESCRIPTION_${PN}-x11 = "X11 display terminal for Gnuplot."
+SECTION_${PN}-x11 = "x11/scientific"
+FILES_${PN}-x11 = "${libexecdir} ${datadir}/applications ${datadir}/pixmaps ${libdir}/X11 "
+
+FILES_${PN} += "${datadir}/texmf"
+FILES_${PN}-x11-dbg += "${libexecdir}/gnuplot/*/.debug"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/haveged-init.d-Makefile.am-add-missing-dependency.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/haveged-init.d-Makefile.am-add-missing-dependency.patch
new file mode 100644
index 0000000..36fd57c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/haveged-init.d-Makefile.am-add-missing-dependency.patch
@@ -0,0 +1,32 @@
+From b04eeea777df32364df74bd63fc5b7fb05d21c8d Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 27 Mar 2018 10:21:09 +0800
+Subject: [PATCH] init.d/Makefile.am: add missing dependency
+
+install-data-hook should epend on install-exec-hook, or the
+haveged.service might be installed incorrectly when build
+with -j option.
+
+Upstream-Status: Inappropriate [no upstream mailing list]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ init.d/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/init.d/Makefile.am b/init.d/Makefile.am
+index 5940f78..07bcdf7 100644
+--- a/init.d/Makefile.am
++++ b/init.d/Makefile.am
+@@ -33,7 +33,7 @@ if ENABLE_SYSTEMD
+ install-exec-hook:
+ 	$(do_subst) < $(srcdir)/$(src_tmpl) > haveged.service;
+ 
+-install-data-hook:
++install-data-hook: install-exec-hook
+ if ENABLE_SYSTEMD_LOOKUP
+ 	install -p -D -m644 haveged.service $(DESTDIR)`pkg-config --variable=systemdsystemunitdir systemd`/haveged.service;
+ else
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/remove-systemd-unit-503.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/remove-systemd-unit-503.patch
deleted file mode 100644
index df27bcb..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/remove-systemd-unit-503.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/init.d/Makefile.am	2014-01-02 18:55:53.000000000 +0100
-+++ b/init.d/Makefile.am	2014-08-11 10:59:40.000000000 +0200
-@@ -34,11 +34,11 @@
- 	$(do_subst) < $(srcdir)/$(src_tmpl) > haveged.service;
- 
- install-data-hook:
--if ENABLE_SYSTEMD_LOOKUP
--	install -p -m644 haveged.service `pkg-config --variable=systemdsystemunitdir systemd`/haveged.service;
--else
--	install -p -m644 haveged.service ($unit_dir)/haveged.service;
--endif
--	systemctl enable haveged.service;
-+#if ENABLE_SYSTEMD_LOOKUP
-+#	install -p -m644 haveged.service `pkg-config --variable=systemdsystemunitdir systemd`/haveged.service;
-+#else
-+#	install -p -m644 haveged.service ($unit_dir)/haveged.service;
-+#endif
-+#	systemctl enable haveged.service;
- 
- endif
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.1.bb
deleted file mode 100644
index bb44c41..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "haveged - A simple entropy daemon"
-DESCRIPTION = "The haveged project is an attempt to provide an easy-to-use, unpredictable random number generator based upon an adaptation of the HAVEGE algorithm. Haveged was created to remedy low-entropy conditions in the Linux random device that can occur under some workloads, especially on headless servers."
-AUTHOR = "Gary Wuertz"
-HOMEPAGE = "http://www.issihosts.com/haveged/index.html"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "http://www.issihosts.com/haveged/haveged-${PV}.tar.gz \
-    file://remove-systemd-unit-503.patch \
-"
-
-SRC_URI[md5sum] = "015ff58cd10607db0e0de60aeca2f5f8"
-SRC_URI[sha256sum] = "9c2363ed9542a6784ff08e247182137e71f2ddb79e8e6c1ac4ad50d21ced3715"
-
-inherit autotools systemd
-
-EXTRA_OECONF = "\
-    --enable-init=service.redhat \
-    --enable-nistest=yes \
-    --enable-olt=yes \
-    --enable-threads=no \
-"
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "haveged.service"
-
-do_install_append() {
-    mkdir -p ${D}${systemd_unitdir}/system
-    install -p -m644 ${B}/init.d/haveged.service ${D}${systemd_unitdir}/system
-}
-
-MIPS_INSTRUCTION_SET = "mips"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.2.bb
new file mode 100644
index 0000000..05ee842
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.2.bb
@@ -0,0 +1,40 @@
+SUMMARY = "haveged - A simple entropy daemon"
+DESCRIPTION = "The haveged project is an attempt to provide an easy-to-use, unpredictable random number generator based upon an adaptation of the HAVEGE algorithm. Haveged was created to remedy low-entropy conditions in the Linux random device that can occur under some workloads, especially on headless servers."
+AUTHOR = "Gary Wuertz"
+HOMEPAGE = "http://www.issihosts.com/haveged/index.html"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "http://www.issihosts.com/haveged/haveged-${PV}.tar.gz \
+           file://haveged-init.d-Makefile.am-add-missing-dependency.patch \
+"
+
+SRC_URI[md5sum] = "fb1d8b3dcbb9d06b30eccd8aa500fd31"
+SRC_URI[sha256sum] = "f77d9adbdf421b61601fa29faa9ce3b479d910f73c66b9e364ba8642ccbfbe70"
+
+inherit autotools update-rc.d systemd
+
+EXTRA_OECONF = "\
+    --enable-nistest=yes \
+    --enable-olt=yes \
+    --enable-threads=no \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--enable-init=service.redhat --enable-initdir=${systemd_system_unitdir}, --enable-init=sysv.redhat, systemd"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME = "haveged"
+INITSCRIPT_PARAMS_${PN} = "defaults 9"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "haveged.service"
+
+do_install_append() {
+    # The exit status is 143 when the service is stopped
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        sed -i '/ExecStart/a SuccessExitStatus=143' ${D}${systemd_system_unitdir}/haveged.service
+    fi
+}
+
+MIPS_INSTRUCTION_SET = "mips"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit/0001-don-t-strip-when-installing.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit/0001-don-t-strip-when-installing.patch
deleted file mode 100644
index a384b05..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit/0001-don-t-strip-when-installing.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From cc67246ca6839e5b3f6a286f10ed24c225b77a5e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
-Date: Thu, 4 Jul 2013 12:34:32 +0200
-Subject: [PATCH] don't strip when installing
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Eric Bénard <eric@eukrea.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- Makefile.in |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 159463e..735cc72 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -42,6 +42,6 @@ distclean: clean
- 
- install: $(PRODUCT)
- 	$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
--	$(INSTALL) -s -m 755 $(PRODUCT) $(DESTDIR)$(bindir)
-+	$(INSTALL) -m 755 $(PRODUCT) $(DESTDIR)$(bindir)
- 	$(INSTALL) -d -m 755 $(DESTDIR)$(mandir)/man1
- 	$(INSTALL) -m 644 $(PRODUCT).1 $(DESTDIR)$(mandir)/man1
--- 
-1.7.10.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit_1.2.13.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit_1.2.13.bb
deleted file mode 100644
index 39df5b2..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit_1.2.13.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "view and edit files in hexadecimal or in ASCII"
-HOMEPAGE = "http://rigaux.org/hexedit.html"
-SECTION = "console/utils"
-LICENSE = "GPLv2+"
-DEPENDS = "ncurses"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-SRC_URI = "http://rigaux.org/${BP}.src.tgz \
-    file://0001-don-t-strip-when-installing.patch "
-
-SRC_URI[md5sum] = "a5af1378d028512a9cad27a5ba3e15f9"
-SRC_URI[sha256sum] = "6a126da30a77f5c0b08038aa7a881d910e3b65d13767fb54c58c983963b88dd7"
-
-inherit autotools-brokensep
-
-S = "${WORKDIR}/${BPN}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb
new file mode 100644
index 0000000..050b7da
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb
@@ -0,0 +1,16 @@
+SUMMARY = "view and edit files in hexadecimal or in ASCII"
+HOMEPAGE = "http://rigaux.org/hexedit.html"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+DEPENDS = "ncurses"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "git://github.com/pixel/hexedit.git \
+    "
+
+SRCREV = "800e4b2e6280531a84fd23ee0b48e16baeb90878"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb
index cbf0473..0f798d2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb
@@ -20,8 +20,8 @@
 inherit cmake
 
 EXTRA_OECMAKE = "-DWITH_PYTHON=ON \
-                 ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
-                 ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
+                 ${@oe.utils.conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
+                 ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
                 "
 
 LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
index 914ee99..745883e 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
@@ -33,7 +33,7 @@
  1 file changed, 4 insertions(+), 6 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 0270c99..b7c7368 100644
+index d41a307..b036e04 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -9,6 +9,8 @@ AC_DISABLE_STATIC
@@ -45,7 +45,7 @@
  AM_PATH_PYTHON
  
  AM_PROG_AR
-@@ -129,7 +131,6 @@ LIBBLOCKDEV_PKG_CHECK_MODULES([UDEV], [libudev >= 216])
+@@ -154,7 +156,6 @@ LIBBLOCKDEV_PKG_CHECK_MODULES([KMOD], [libkmod >= 19])
  AS_IF([test "x$with_crypto" != "xno"],
        [LIBBLOCKDEV_PKG_CHECK_MODULES([CRYPTSETUP], [libcryptsetup >= 1.6.7])
         LIBBLOCKDEV_PKG_CHECK_MODULES([NSS], [nss >= 3.18.0])
@@ -53,7 +53,7 @@
        ],
        [])
  
-@@ -137,10 +138,6 @@ AS_IF([test "x$with_dm" != "xno" -o "x$with_lvm" != "xno" -o "x$with_lvm_dbus" !
+@@ -162,10 +163,6 @@ AS_IF([test "x$with_dm" != "xno" -o "x$with_lvm" != "xno" -o "x$with_lvm_dbus" !
        [LIBBLOCKDEV_PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= 1.02.93])],
        [])
  
@@ -61,10 +61,10 @@
 -      [LIBBLOCKDEV_CHECK_HEADER([dmraid/dmraid.h], [], [dmraid.h not available])],
 -      [])
 -
- AS_IF([test "x$with_kbd" != "xno"],
-       [LIBBLOCKDEV_PKG_CHECK_MODULES([KMOD], [libkmod >= 19])],
+ AS_IF([test "x$with_part" != "xno" -o "x$with_fs" != "xno"],
+       [LIBBLOCKDEV_PKG_CHECK_MODULES([PARTED], [libparted >= 3.1])]
        [])
-@@ -154,7 +151,8 @@ AS_IF([test "x$with_fs" != "xno"],
+@@ -174,7 +171,8 @@ AS_IF([test "x$with_fs" != "xno"],
        [LIBBLOCKDEV_PKG_CHECK_MODULES([MOUNT], [mount >= 2.23.0])
         # new versions of libmount has some new functions we can use
         AS_IF([$PKG_CONFIG --atleast-version=2.30.0 mount],
@@ -75,5 +75,5 @@
         LIBBLOCKDEV_PKG_CHECK_MODULES([BLKID], [blkid >= 2.23.0])
         # older versions of libblkid don't support BLKID_SUBLKS_BADCSUM so let's just
 -- 
-1.8.3.1
+2.14.3
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
index 3d9cb6d..ac5b5e2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
@@ -22,21 +22,22 @@
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
- src/lib/plugin_apis/dm.api          |  41 -----
+ src/lib/plugin_apis/dm.api          |  50 ------
  src/plugins/Makefile.am             |   2 +-
- src/plugins/dm.c                    | 318 ------------------------------------
+ src/plugins/dm.c                    | 330 ------------------------------------
  src/plugins/dm.h                    |   5 -
  src/python/gi/overrides/BlockDev.py |   6 -
- 5 files changed, 1 insertion(+), 371 deletions(-)
+ 5 files changed, 1 insertion(+), 392 deletions(-)
 
 diff --git a/src/lib/plugin_apis/dm.api b/src/lib/plugin_apis/dm.api
-index a885bba..ec86b80 100644
+index 04fd8d8..5d30b6a 100644
 --- a/src/lib/plugin_apis/dm.api
 +++ b/src/lib/plugin_apis/dm.api
-@@ -68,44 +68,3 @@ gchar* bd_dm_node_from_name (const gchar *map_name, GError **error);
+@@ -111,53 +111,3 @@ gchar* bd_dm_get_subsystem_from_name (const gchar *device_name, GError **error);
+  * Tech category: %BD_DM_TECH_MAP-%BD_DM_TECH_MODE_QUERY
   */
  gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error);
- 
+-
 -/**
 - * bd_dm_get_member_raid_sets:
 - * @name: (allow-none): name of the member
@@ -49,6 +50,8 @@
 - * the member or %NULL in case of error
 - *
 - * One of @name, @uuid or @major:@minor has to be given.
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_MODE_QUERY
 - */
 -gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
 -
@@ -58,6 +61,8 @@
 - * @error: (out): variable to store error (if any)
 - *
 - * Returns: whether the RAID set @name was successfully activate or not
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_CREATE_ACTIVATE
 - */
 -gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
 -
@@ -67,6 +72,8 @@
 - * @error: (out): variable to store error (if any)
 - *
 - * Returns: whether the RAID set @name was successfully deactivate or not
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_REMOVE_DEACTIVATE
 - */
 -gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
 -
@@ -76,13 +83,15 @@
 - * @error: (out): variable to store error (if any)
 - *
 - * Returns: string representation of the @name RAID set's type
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_QUERY
 - */
 -gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error);
 diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
-index 6c4038f..59dc5e3 100644
+index b69c8f7..7575f4a 100644
 --- a/src/plugins/Makefile.am
 +++ b/src/plugins/Makefile.am
-@@ -76,7 +76,7 @@ endif
+@@ -75,7 +75,7 @@ endif
  
  if WITH_DM
  libbd_dm_la_CFLAGS = $(GLIB_CFLAGS) $(DEVMAPPER_CFLAGS) $(UDEV_CFLAGS) -Wall -Wextra -Werror
@@ -92,10 +101,10 @@
  # Dear author of libdmdraid, VERSION really is not a good name for an enum member!
  libbd_dm_la_CPPFLAGS = -I${builddir}/../../include/ -UVERSION
 diff --git a/src/plugins/dm.c b/src/plugins/dm.c
-index 9cee742..fd7c7ba 100644
+index 0e5466c..31ebe96 100644
 --- a/src/plugins/dm.c
 +++ b/src/plugins/dm.c
-@@ -21,16 +21,10 @@
+@@ -21,17 +21,11 @@
  #include <unistd.h>
  #include <blockdev/utils.h>
  #include <libdevmapper.h>
@@ -103,6 +112,7 @@
  #include <libudev.h>
  
  #include "dm.h"
+ #include "check_deps.h"
  
 -/* macros taken from the pyblock/dmraid.h file plus one more*/
 -#define for_each_raidset(_c, _n) list_for_each_entry(_n, LC_RS(_c), list)
@@ -112,10 +122,11 @@
  /**
   * SECTION: dm
   * @short_description: plugin for basic operations with device mapper
-@@ -286,315 +280,3 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
+@@ -380,327 +374,3 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
+ 
      return ret;
  }
- 
+-
 -/**
 - * init_dmraid_stack: (skip)
 - *
@@ -191,6 +202,9 @@
 -    /* if we don't have the name, we cannot check any match */
 -    g_return_val_if_fail (dev_name, FALSE);
 -
+-    /* g_return_val_if_fail above checks value of dev_name and returns FALSE if
+-     * it is NULL so we don't need to check it here */
+-    /* coverity[var_deref_model] */
 -    if (name && strcmp (dev_name, name) != 0) {
 -        return FALSE;
 -    }
@@ -220,8 +234,8 @@
 - * find_raid_sets_for_dev: (skip)
 - */
 -static void find_raid_sets_for_dev (const gchar *name, const gchar *uuid, gint major, gint minor, struct lib_context *lc, struct raid_set *rs, GPtrArray *ret_sets) {
--    struct raid_set *subset;
--    struct raid_dev *dev;
+-    struct raid_set *subset = NULL;
+-    struct raid_dev *dev = NULL;
 -
 -    if (T_GROUP(rs) || !list_empty(&(rs->sets))) {
 -        for_each_subset (rs, subset)
@@ -246,6 +260,8 @@
 - * the member or %NULL in case of error
 - *
 - * One of @name, @uuid or @major:@minor has to be given.
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_MODE_QUERY
 - */
 -gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error) {
 -    guint64 i = 0;
@@ -312,8 +328,8 @@
 -
 -static gboolean change_set_by_name (const gchar *name, enum activate_type action, GError **error) {
 -    gint rc = 0;
--    struct lib_context *lc;
--    struct raid_set *iter_rs;
+-    struct lib_context *lc = NULL;
+-    struct raid_set *iter_rs = NULL;
 -    struct raid_set *match_rs = NULL;
 -
 -    lc = init_dmraid_stack (error);
@@ -352,6 +368,8 @@
 - * @error: (out): variable to store error (if any)
 - *
 - * Returns: whether the RAID set @name was successfully activate or not
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_CREATE_ACTIVATE
 - */
 -gboolean bd_dm_activate_raid_set (const gchar *name, GError **error) {
 -    guint64 progress_id = 0;
@@ -372,6 +390,8 @@
 - * @error: (out): variable to store error (if any)
 - *
 - * Returns: whether the RAID set @name was successfully deactivate or not
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_REMOVE_DEACTIVATE
 - */
 -gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error) {
 -    guint64 progress_id = 0;
@@ -392,10 +412,12 @@
 - * @error: (out): variable to store error (if any)
 - *
 - * Returns: string representation of the @name RAID set's type
+- *
+- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_QUERY
 - */
 -gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error) {
--    struct lib_context *lc;
--    struct raid_set *iter_rs;
+-    struct lib_context *lc = NULL;
+-    struct raid_set *iter_rs = NULL;
 -    struct raid_set *match_rs = NULL;
 -    const gchar *type = NULL;
 -
@@ -429,7 +451,7 @@
 -    return g_strdup (type);
 -}
 diff --git a/src/plugins/dm.h b/src/plugins/dm.h
-index 859fb80..80acd49 100644
+index 0dce6ac..1ee3788 100644
 --- a/src/plugins/dm.h
 +++ b/src/plugins/dm.h
 @@ -1,5 +1,4 @@
@@ -438,10 +460,10 @@
  
  #ifndef BD_DM
  #define BD_DM
-@@ -35,9 +34,5 @@ gboolean bd_dm_remove (const gchar *map_name, GError **error);
+@@ -48,9 +47,5 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
  gchar* bd_dm_name_from_node (const gchar *dm_node, GError **error);
  gchar* bd_dm_node_from_name (const gchar *map_name, GError **error);
- gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error);
+ gchar* bd_dm_get_subsystem_from_name (const gchar *device_name, GError **error);
 -gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
 -gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
 -gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
@@ -466,5 +488,5 @@
  _loop_setup = BlockDev.loop_setup
  @override(BlockDev.loop_setup)
 -- 
-1.8.3.1
+2.14.3
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
index f18b569..0b5b809 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
@@ -12,7 +12,7 @@
  2 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
-index 8fbce4f..66e11e5 100644
+index b961471..2d3d251 100644
 --- a/src/plugins/crypto.c
 +++ b/src/plugins/crypto.c
 @@ -22,7 +22,7 @@
@@ -25,7 +25,7 @@
  #include <linux/random.h>
  #include <locale.h>
 diff --git a/src/plugins/part.c b/src/plugins/part.c
-index 12d2ef7..3afe297 100644
+index 6b2a690..ab490d9 100644
 --- a/src/plugins/part.c
 +++ b/src/plugins/part.c
 @@ -25,6 +25,7 @@
@@ -33,10 +33,10 @@
  #include <unistd.h>
  #include <sys/file.h>
 +#include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <linux/fs.h>
  #include <blockdev/utils.h>
- #include <part_err.h>
- 
-@@ -1224,7 +1225,7 @@ static gboolean set_gpt_flags (const gchar *device, int part_num, guint64 flags,
+@@ -1354,7 +1355,7 @@ static gboolean set_gpt_flags (const gchar *device, int part_num, guint64 flags,
          real_flags |= 0x4000000000000000; /* 1 << 62 */
      if (flags & BD_PART_FLAG_GPT_NO_AUTOMOUNT)
          real_flags |= 0x8000000000000000; /* 1 << 63 */
@@ -46,5 +46,5 @@
      args[2] = g_strdup_printf ("%d:=:%s", part_num, mask_str);
      g_free (mask_str);
 -- 
-1.8.3.1
+2.14.3
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch
index 3818936..b214f0b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch
@@ -19,17 +19,17 @@
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
- src/plugins/crypto.c | 6 +++---
- src/plugins/fs.c     | 4 ++--
- src/plugins/part.c   | 4 ++--
- src/utils/exec.c     | 2 +-
+ src/plugins/crypto.c  | 6 +++---
+ src/plugins/fs/vfat.c | 4 ++--
+ src/plugins/part.c    | 4 ++--
+ src/utils/exec.c      | 2 +-
  4 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
-index 8fbce4f..7ee7cdc 100644
+index 563093e..b961471 100644
 --- a/src/plugins/crypto.c
 +++ b/src/plugins/crypto.c
-@@ -881,7 +881,7 @@ gboolean bd_crypto_tc_open (const gchar *device, const gchar *name, const guint8
+@@ -970,7 +970,7 @@ gboolean bd_crypto_tc_open (const gchar *device, const gchar *name, const guint8
      gint ret = 0;
      guint64 progress_id = 0;
      gchar *msg = NULL;
@@ -38,7 +38,7 @@
  
      msg = g_strdup_printf ("Started opening '%s' TrueCrypt/VeraCrypt device", device);
      progress_id = bd_utils_report_started (msg);
-@@ -999,7 +999,7 @@ static gchar *replace_char (gchar *str, gchar orig, gchar new) {
+@@ -1090,7 +1090,7 @@ static gchar *replace_char (gchar *str, gchar orig, gchar new) {
      return str;
  }
  
@@ -47,7 +47,7 @@
                                          CERTCertificate *cert, GError **error) {
      gpointer packet_data = NULL;
      gsize packet_data_size = 0;
-@@ -1008,7 +1008,7 @@ static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libv
+@@ -1099,7 +1099,7 @@ static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libv
      gsize bytes_written = 0;
      GError *tmp_error = NULL;
  
@@ -56,11 +56,11 @@
                                                                       ui, LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY, error);
  
      if (!packet_data) {
-diff --git a/src/plugins/fs.c b/src/plugins/fs.c
-index c4b6ac8..647096d 100644
---- a/src/plugins/fs.c
-+++ b/src/plugins/fs.c
-@@ -2614,8 +2614,8 @@ BDFSVfatInfo* bd_fs_vfat_get_info (const gchar *device, GError **error) {
+diff --git a/src/plugins/fs/vfat.c b/src/plugins/fs/vfat.c
+index 3ed7d4a..5ff7795 100644
+--- a/src/plugins/fs/vfat.c
++++ b/src/plugins/fs/vfat.c
+@@ -376,8 +376,8 @@ BDFSVfatInfo* bd_fs_vfat_get_info (const gchar *device, GError **error) {
   */
  gboolean bd_fs_vfat_resize (const gchar *device, guint64 new_size, GError **error) {
      PedDevice *ped_dev = NULL;
@@ -72,10 +72,10 @@
      PedSector start = 0;
      PedSector length = 0;
 diff --git a/src/plugins/part.c b/src/plugins/part.c
-index 12d2ef7..d277688 100644
+index fed8300..6b2a690 100644
 --- a/src/plugins/part.c
 +++ b/src/plugins/part.c
-@@ -849,7 +849,7 @@ static PedPartition* add_part_to_disk (PedDevice *dev, PedDisk *disk, BDPartType
+@@ -926,7 +926,7 @@ static PedPartition* add_part_to_disk (PedDevice *dev, PedDisk *disk, BDPartType
          return NULL;
      }
  
@@ -84,7 +84,7 @@
      if (!part) {
          set_parted_error (error, BD_PART_ERROR_FAIL);
          g_prefix_error (error, "Failed to create new partition on device '%s'", dev->path);
-@@ -1427,7 +1427,7 @@ gboolean bd_part_set_part_flags (const gchar *disk, const gchar *part, guint64 f
+@@ -1564,7 +1564,7 @@ gboolean bd_part_set_part_flags (const gchar *disk, const gchar *part, guint64 f
      PedPartition *ped_part = NULL;
      const gchar *part_num_str = NULL;
      gint part_num = 0;
@@ -94,7 +94,7 @@
      gboolean ret = FALSE;
      guint64 progress_id = 0;
 diff --git a/src/utils/exec.c b/src/utils/exec.c
-index 7ac44fd..0a3094c 100644
+index 11c1489..dcf87e5 100644
 --- a/src/utils/exec.c
 +++ b/src/utils/exec.c
 @@ -354,7 +354,7 @@ gboolean bd_utils_exec_and_report_progress (const gchar **argv, const BDExtraArg
@@ -107,5 +107,5 @@
      gboolean err_done = FALSE;
      GString *stdout_data = g_string_new (NULL);
 -- 
-1.8.3.1
+2.14.3
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
deleted file mode 100644
index 2a92354..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-DESCRIPTION = "libblockdev is a C library supporting GObject introspection for manipulation of \
-block devices. It has a plugin-based architecture where each technology (like \
-LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly \
-with multiple implementations (e.g. using LVM CLI or the new LVM DBus API)."
-HOMEPAGE = "http://rhinstaller.github.io/libblockdev/"
-LICENSE = "LGPLv2+"
-SECTION = "devel/lib"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c"
-
-S = "${WORKDIR}/git"
-B = "${S}"
-
-SRCREV = "c1dda45001542edd7d7f1ffc6451c5a74623f805"
-SRC_URI = "git://github.com/rhinstaller/libblockdev;branch=master \
-           file://0001-fix-configure-and-compile-failures.patch \
-           file://0002-remove-python2-support.patch \
-           file://0003-remove-dmraid-while-compiling-with-with-dm.patch \
-           file://0005-fix-a-clang-compiling-issue.patch \
-"
-SRC_URI_append_libc-musl = " \
-           file://0004-fix-compile-failure-against-musl-C-library.patch \
-"
-
-inherit autotools python3native gobject-introspection
-
-DEPENDS += " \
-    cryptsetup \
-    nss \
-    volume-key \
-    libbytesize \
-    btrfs-tools \
-"
-RDEPENDS_${PN} += " \
-    lvm2 \
-"
-
-FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}"
-
-PACKAGECONFIG ??= "python3 lvm dm kmod parted fs"
-PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3"
-PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools"
-PACKAGECONFIG[dm] = "--with-dm, --without-dm"
-PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd, kmod"
-PACKAGECONFIG[parted] = "--with-part, --without-part, parted"
-PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux"
-PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native"
-
-export STAGING_INCDIR
-export GIR_EXTRA_LIBS_PATH="${B}/src/utils/.libs"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.16.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.16.bb
new file mode 100644
index 0000000..0c954aa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.16.bb
@@ -0,0 +1,51 @@
+DESCRIPTION = "libblockdev is a C library supporting GObject introspection for manipulation of \
+block devices. It has a plugin-based architecture where each technology (like \
+LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly \
+with multiple implementations (e.g. using LVM CLI or the new LVM DBus API)."
+HOMEPAGE = "http://rhinstaller.github.io/libblockdev/"
+LICENSE = "LGPLv2+"
+SECTION = "devel/lib"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c"
+
+inherit autotools python3native gobject-introspection
+
+DEPENDS += " \
+    cryptsetup \
+    nss \
+    volume-key \
+    libbytesize \
+    btrfs-tools \
+"
+
+SRCREV = "e2e0899efe8dd3f111ff955fb6c1dc10b0bd2075"
+SRC_URI = " \
+    git://github.com/rhinstaller/libblockdev;branch=master \
+    file://0001-fix-configure-and-compile-failures.patch \
+    file://0002-remove-python2-support.patch \
+    file://0003-remove-dmraid-while-compiling-with-with-dm.patch \
+    file://0005-fix-a-clang-compiling-issue.patch \
+"
+SRC_URI_append_libc-musl = " \
+    file://0004-fix-compile-failure-against-musl-C-library.patch \
+"
+
+S = "${WORKDIR}/git"
+
+RDEPENDS_${PN} += " \
+    lvm2 \
+"
+
+FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}"
+
+PACKAGECONFIG ??= "python3 lvm dm kmod parted fs"
+PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3"
+PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools"
+PACKAGECONFIG[dm] = "--with-dm, --without-dm"
+PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd, kmod"
+PACKAGECONFIG[parted] = "--with-part, --without-part, parted"
+PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux"
+PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native"
+
+export GIR_EXTRA_LIBS_PATH="${B}/src/utils/.libs"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/files/fix-ar.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/files/fix-ar.patch
index cc3f5d4..f65d26a 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/files/fix-ar.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/files/fix-ar.patch
@@ -2,11 +2,11 @@
  configure.ac |    1 +
  1 file changed, 1 insertion(+)
 
+Index: git/configure.ac
+===================================================================
 --- git.orig/configure.ac
 +++ git/configure.ac
-@@ -24,10 +24,11 @@ LT_INIT([win32-dll])
- LT_PROG_RC
- 
+@@ -56,6 +56,7 @@ AM_CONDITIONAL([ENABLE_EXAMPLES], [test
  # Checks for programs.
  AC_PROG_CC
  AC_PROG_CC_C99
@@ -14,5 +14,3 @@
  
  # Enable automake silent build rules.
  m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
- 
- # Checks for native Windows.
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb
index 5bf7c6e..7e4c330 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb
@@ -26,4 +26,6 @@
 EXTRA_OECONF = " --disable-static --disable-rebuilds --enable-compile-warnings=minimum"
 DEPENDS += "gtk+ glib-2.0 glib-2.0-native ruby-native intltool-native gnome-common-native"
 
-inherit autotools pkgconfig gettext
+inherit distro_features_check autotools pkgconfig gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb/0001-Remove-runtime-check-for-CLOCK_MONOTONIC.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb/0001-Remove-runtime-check-for-CLOCK_MONOTONIC.patch
deleted file mode 100644
index 28bc5c0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb/0001-Remove-runtime-check-for-CLOCK_MONOTONIC.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From e6fbad0c122ba8e87b67a9e2447505adcaafe204 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 29 Mar 2017 16:31:38 -0700
-Subject: [PATCH] Remove runtime check for CLOCK_MONOTONIC
-
-Does not work during cross compile
-
-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: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index fa13ae6..f4f0f46 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -175,9 +175,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                  )
- 
- AC_MSG_CHECKING(for a working clock_getres(CLOCK_MONOTONIC, &ts))
--AC_RUN_IFELSE([AC_LANG_PROGRAM(
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[#include <time.h>]],
--[[struct timespec ts; if(clock_getres(CLOCK_MONOTONIC, &ts)) return -1;]])],
-+[[
-+#include <unistd.h>
-+int main() {
-+#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
-+        #error No monotonic clock
-+#endif
-+    return 0;
-+
-+]])],
-                     [
-                       AC_MSG_RESULT([yes])
-                       AC_DEFINE_UNQUOTED([HAVE_CLOCK_GETRES_MONOTONIC], 1, [Define to 1 if clock_getres(CLOCK_MONOTONIC, &ts) works])
--- 
-2.12.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb/0001-build-fix-configure-script-neglecting-re-enable-out-.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb/0001-build-fix-configure-script-neglecting-re-enable-out-.patch
new file mode 100644
index 0000000..c82f3bf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb/0001-build-fix-configure-script-neglecting-re-enable-out-.patch
@@ -0,0 +1,56 @@
+From 73d2aea33e32272bac693550e8a3b0e3ad89707f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
+Date: Tue, 26 Dec 2017 00:02:26 +0100
+Subject: [PATCH] build: fix configure script neglecting, re-enable out-of-tree
+ builds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For the former, a prototype and the final code got (hm, mysteriously)
+intertwisted.  For the latter, I am clearly guilty of (rare, anyway)
+testing of the out-of-tree builds only with libqb-already-system-wide
+scenario, which is rather shortsighted.
+
+Thanks Fabio and his ci.kronosnet.org project for spotting that.
+
+X-mas-present-for: Fabio M. Di Nitto <fdinitto@redhat.com>
+Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
+---
+Upstream-Status: Backport
+
+ configure.ac    | 2 +-
+ lib/Makefile.am | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9900310..f9761cc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -710,7 +710,7 @@ if test "x${GCC}" = xyes; then
+ 			                      | grep __stop___verbose | cut -d" " -f 3)
+ 			 test "${verbose_start_addr}" = "${verbose_stop_addr}" \
+ 			   && gcc_has_attribute_section_visible=no \
+-			   || { verbose_start_type=$(${READELF} -s backup \
++			   || { verbose_start_type=$(${READELF} -s "conftest${shrext_cmds}" \
+ 			                             | sed -n '/__start___verbose/{s/^\s*//p;q}' \
+ 			                             | tr -s ' ' \
+ 			                             | cut -d" " -f6)
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 6ca6b15..b035f0b 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -101,7 +101,9 @@ endif
+ endif
+ 
+ qblog_script.ld: %.ld: %.ld.in
+-	$(AM_V_GEN)$(CPP) -xc -I$(top_srcdir)/include -D_GNU_SOURCE -C -P $< \
++	$(AM_V_GEN)$(CPP) -C -D_GNU_SOURCE -P \
++	  -I$(top_srcdir)/include -I$(top_builddir)/include \
++	  -xc $< \
+ 	  | sed -n "/$$(sed -n '/^[^#]/{s/[*\/]/\\&/g;p;q;}' $<)/,$$ p" \
+ 	  > $@
+ 
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.2.bb
deleted file mode 100644
index 574f660..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.2.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "An IPC library for high performance servers"
-DESCRIPTION = "libqb is a library with the primary purpose of providing high performance client server reusable features. \
-It provides high performance logging, tracing, ipc, and poll."
-
-HOMEPAGE = "https://github.com/clusterlabs/libqb/wiki"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=321bf41f280cf805086dd5a720b37785"
-
-inherit autotools pkgconfig
-
-PV .= "+git${SRCPV}"
-
-SRCREV = "608de6d59a3de0eef0fbcbd8f284acbc018daa9a"
-SRC_URI = "git://github.com/ClusterLabs/${BPN}.git \
-           file://0001-Remove-runtime-check-for-CLOCK_MONOTONIC.patch \
-          "
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
-    ( cd ${S}
-    ${S}/autogen.sh )
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.3.bb
new file mode 100644
index 0000000..73cea5e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.3.bb
@@ -0,0 +1,25 @@
+SUMMARY = "An IPC library for high performance servers"
+DESCRIPTION = "libqb is a library with the primary purpose of providing high performance client server reusable features. \
+It provides high performance logging, tracing, ipc, and poll."
+
+HOMEPAGE = "https://github.com/clusterlabs/libqb/wiki"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=321bf41f280cf805086dd5a720b37785"
+
+inherit autotools pkgconfig
+
+PV .= "+git${SRCPV}"
+
+# v1.0.3
+SRCREV = "28dff090c74b6ba8609c4797294a5afe3fe73987"
+SRC_URI = "git://github.com/ClusterLabs/${BPN}.git \
+           file://0001-build-fix-configure-script-neglecting-re-enable-out-.patch \
+          "
+S = "${WORKDIR}/git"
+
+CFLAGS += "-pthread -D_REENTRANT"
+do_configure_prepend() {
+    ( cd ${S}
+    ${S}/autogen.sh )
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.9.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.9.2.bb
index 525437b..f2c661c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.9.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.9.2.bb
@@ -5,7 +5,7 @@
 LICENSE = "GPLv2+"
 DEPENDS = "xmlrpc-c xmlrpc-c-native intltool-native \
         json-c libtar libnewt libproxy rpm \
-        augeas satyr systemd gtk+3 \
+        augeas satyr systemd \
 "
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
@@ -26,6 +26,9 @@
 
 inherit gettext autotools python3native pkgconfig
 
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES','x11','gtk','',d)}"
+PACKAGECONFIG[gtk] = "--with-gtk, --without-gtk, gtk+3,"
+
 RDEPENDS_python3-libreport += "${PN}"
 
 do_patch[prefuncs] += "do_gen_version"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb
index 8ad5457..2c31a21 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb
@@ -12,7 +12,9 @@
 
 BBCLASSEXTEND = "native"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/wvware/${BPN}/${PV}/${BPN}-${PV}.tar.gz;name=tarball \
            file://libwmf-0.2.8.4-intoverflow.patch \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview_0.8.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview_0.8.0.bb
index 15935c8..df82bef 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview_0.8.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview_0.8.0.bb
@@ -17,7 +17,9 @@
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_configure_append() {
     # avoid host polution inf pkg-config files
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/Manually_mmap_heap_memory_esr17.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/Manually_mmap_heap_memory_esr17.patch
index 15ad03f..83f4543 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/Manually_mmap_heap_memory_esr17.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/Manually_mmap_heap_memory_esr17.patch
@@ -1,4 +1,4 @@
-From a0c0f32299419359b44ac0f880c1ea9073ae51e1 Mon Sep 17 00:00:00 2001
+From 1d1fa95c8ff7697e46343385a79a8f7e5c514a87 Mon Sep 17 00:00:00 2001
 From: Zheng Xu <zheng.xu@linaro.org>
 Date: Fri, 2 Sep 2016 17:40:05 +0800
 Subject: [PATCH] Bug 1143022 - Manually mmap on arm64 to ensure high 17 bits
@@ -16,11 +16,11 @@
  1 file changed, 71 insertions(+), 2 deletions(-)
 
 diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
-index 5b386a2..38101cf 100644
+index e5ad018..4149adf 100644
 --- a/js/src/gc/Memory.cpp
 +++ b/js/src/gc/Memory.cpp
-@@ -306,6 +306,75 @@ InitMemorySubsystem()
-         MOZ_CRASH();
+@@ -309,6 +309,75 @@ InitMemorySubsystem()
+ #endif
  }
  
 +static inline void *
@@ -95,7 +95,7 @@
  void *
  MapAlignedPages(size_t size, size_t alignment)
  {
-@@ -319,12 +388,12 @@ MapAlignedPages(size_t size, size_t alignment)
+@@ -322,12 +391,12 @@ MapAlignedPages(size_t size, size_t alignment)
  
      /* Special case: If we want page alignment, no further work is needed. */
      if (alignment == PageSize) {
@@ -110,6 +110,3 @@
      if (region == MAP_FAILED)
          return NULL;
  
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb
index 616048f..930c041 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb
@@ -3,12 +3,13 @@
 SECTION = "libs"
 
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=66493d54e65bfc12c7983ff2e884f37f"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4b92a3b497d7943042a6db40c088c3f2"
 
-SRCREV = "8ddbcde84e2d146bc0f9e38504d6c89c14291480"
-PV = "1.7.0-git${SRCPV}"
+SRCREV = "fbb7d9232067eac3f4508a37a8f7ea0c4fcebacb"
+PV = "1.9.0-git${SRCPV}"
 
-SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http"
+SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
+           "
 
 S = "${WORKDIR}/git"
 
@@ -31,7 +32,13 @@
 # override this in local.conf to get needed bindings.
 # BINDINGS_pn-mraa="python"
 # will result in only the python bindings being built/packaged.
-BINDINGS ??= "python ${@ 'nodejs' if oe.types.boolean(d.getVar('HAVE_NODEJS') or '0') else '' }"
+# Note: 'nodejs' is disabled by default because the bindings
+# generation currently fails with nodejs (>v7.x).
+BINDINGS ??= "python"
+
+# nodejs isn't available for armv4/armv5 architectures
+BINDINGS_armv4 ??= "python"
+BINDINGS_armv5 ??= "python"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
  ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.3.bb
index c4778ca..f618f02 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.3.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.3.bb
@@ -12,6 +12,9 @@
 
 DEPENDS = "curl libxml2 openssl libpam"
 
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
 SRCREV = "feb7ec9b004fcaea0dbe65ce8a1a79cc29dd994c"
 PV = "2.6.3"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch
new file mode 100644
index 0000000..ae27517
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch
@@ -0,0 +1,48 @@
+From b6b1782af4aa7f9084d32e4144738dc2535c8d6f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Apr 2018 23:07:21 -0700
+Subject: [PATCH] Fix narrowing errors -Wc++11-narrowing
+
+Clang 6.x finds these errors
+
+    ../../../../CPP/Windows/ErrorMsg.cpp:24:10: error: case value evaluates to -2147024809, which cannot be narrowed to type 'DWORD' (aka 'unsigned int') [-Wc++11-narrowing]
+        case E_INVALIDARG          : txt = "E_INVALIDARG"; break ;
+             ^
+
+HRESULT causes the macro to be parsed as a signed long, so we need to force it
+to be checked as an unsigned long instead.
+
+also reported here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224930
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ CPP/Windows/ErrorMsg.cpp | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp
+index 99684ae..78a64ba 100644
+--- a/CPP/Windows/ErrorMsg.cpp
++++ b/CPP/Windows/ErrorMsg.cpp
+@@ -15,13 +15,13 @@ UString MyFormatMessage(DWORD errorCode)
+ 
+   switch(errorCode) {
+     case ERROR_NO_MORE_FILES   : txt = "No more files"; break ;
+-    case E_NOTIMPL             : txt = "E_NOTIMPL"; break ;
+-    case E_NOINTERFACE         : txt = "E_NOINTERFACE"; break ;
+-    case E_ABORT               : txt = "E_ABORT"; break ;
+-    case E_FAIL                : txt = "E_FAIL"; break ;
+-    case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ;
+-    case E_OUTOFMEMORY         : txt = "E_OUTOFMEMORY"; break ;
+-    case E_INVALIDARG          : txt = "E_INVALIDARG"; break ;
++    case (DWORD) E_NOTIMPL             : txt = "E_NOTIMPL"; break ;
++    case (DWORD) E_NOINTERFACE         : txt = "E_NOINTERFACE"; break ;
++    case (DWORD) E_ABORT               : txt = "E_ABORT"; break ;
++    case (DWORD) E_FAIL                : txt = "E_FAIL"; break ;
++    case (DWORD) STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ;
++    case (DWORD) E_OUTOFMEMORY         : txt = "E_OUTOFMEMORY"; break ;
++    case (DWORD) E_INVALIDARG          : txt = "E_INVALIDARG"; break ;
+     case ERROR_DIRECTORY          : txt = "Error Directory"; break ;
+     default:
+       txt = strerror(errorCode);
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch
new file mode 100644
index 0000000..177d145
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch
@@ -0,0 +1,31 @@
+p7zip: Fix CVE-2017-17969
+
+[No upstream tracking] -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888297
+
+Heap-based buffer overflow in 7zip
+
+Compress/ShrinkDecoder.cpp: Heap-based buffer overflow
+in the NCompress::NShrink::CDecoder::CodeReal method
+in 7-Zip before 18.00 and p7zip allows remote attackers
+to cause a denial of service (out-of-bounds write)
+or potentially execute arbitrary code via a crafted ZIP archive. 
+
+Upstream-Status: Backport [https://sourceforge.net/p/p7zip/bugs/_discuss/thread/0920f369/8316/attachment/CVE-2017-17969.patch]
+CVE: CVE-2017-17969
+Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
+
+--- a/CPP/7zip/Compress/ShrinkDecoder.cpp
++++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
+@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
+     {
+       _stack[i++] = _suffixes[cur];
+       cur = _parents[cur];
++	  if (cur >= kNumItems || i >= kNumItems)
++	  	break;
+     }
++	
++	if (cur >= kNumItems || i >= kNumItems)
++		break;
+     
+     _stack[i++] = (Byte)cur;
+     lastChar2 = (Byte)cur;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
index 67ffbc6..d986da9 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
@@ -6,7 +6,10 @@
                     file://DOC/License.txt;md5=879598edf1f54dddb6930d7581357f8b"
 
 SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_all.tar.bz2 \
-          file://do_not_override_compiler_and_do_not_strip.patch"
+           file://do_not_override_compiler_and_do_not_strip.patch \
+           file://CVE-2017-17969.patch \
+           file://0001-Fix-narrowing-errors-Wc-11-narrowing.patch \
+           "
 
 SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf"
 SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb
index ff88533..1638c41 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb
@@ -13,6 +13,9 @@
 
 DEPENDS += "libpam openssl"
 
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
 # This gets us ssh-agent, which we are almost certain to want.
 #
 RDEPENDS_${PN} += "openssh-misc"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/polkit/files/gtk-doc-check.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/polkit/files/gtk-doc-check.patch
deleted file mode 100644
index 4b6ad75..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/polkit/files/gtk-doc-check.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- polkit-gnome-0.105/configure.ac.org	2015-05-04 22:33:03.925977953 -0700
-+++ polkit-gnome-0.105/configure.ac	2015-05-04 22:33:16.862288030 -0700
-@@ -120,6 +120,9 @@
- # Check for required packages
- # ***************************
- 
-+# check for gtk-doc
-+GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
-+
- POLKIT_AGENT_REQUIRED=0.97
- POLKIT_GOBJECT_REQUIRED=0.97
- GTK_REQUIRED=3.0.0
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-gnome_0.105.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-gnome_0.105.bb
deleted file mode 100644
index 8e99731..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-gnome_0.105.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "GNOME Authentication Agent for PolicyKit"
-DESCRIPTION = "PolicyKit-gnome provides an Authentication Agent for PolicyKit that integrates well with the GNOME desktop environment"
-HOMEPAGE = "http://www.packagekit.org/"
-BUGTRACKER = "http://bugzilla.gnome.org/"
-DEPENDS = "polkit dbus-glib gconf gtk+ intltool-native gnome-common"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=74579fab173e4c5e12aac0cd83ee98ec \
-                    file://src/main.c;beginline=1;endline=20;md5=aba145d1802f2329ba561e3e48ecb795"
-
-SRC_URI = "https://download.gnome.org/sources/polkit-gnome/${PV}/polkit-gnome-${PV}.tar.xz \
-           file://gtk-doc-check.patch \
-"
-SRC_URI[md5sum] = "50ecad37c8342fb4a52f590db7530621"
-SRC_URI[sha256sum] = "1784494963b8bf9a00eedc6cd3a2868fb123b8a5e516e66c5eda48df17ab9369"
-
-EXTRA_OECONF = "\
-    --disable-static \
-"
-
-DEPENDS += "gtk+3"
-
-inherit autotools gtk-doc pkgconfig
-
-FILES_${PN} += " ${datadir}/dbus-1 \
-                 ${datadir}/PolicyKit \
-"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb
index 4025b80..7c9f2df 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd_ss981107.bb
@@ -38,13 +38,11 @@
     install -m 644 rarpd.8 ${D}${mandir}/man8/rarpd.8
     install -m 644 ${WORKDIR}/ethers.sample ${D}${sysconfdir}/ethers
 
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}${systemd_unitdir}/system
-        install -m 0644 ${WORKDIR}/rarpd.service ${D}${systemd_unitdir}/system/
-    fi
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/rarpd.service ${D}${systemd_unitdir}/system/
 }
 
-inherit ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd', d)}
+inherit systemd
 
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "rarpd.service"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/rocksdb/rocksdb_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/rocksdb/rocksdb_git.bb
deleted file mode 100644
index 9b19c1a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/rocksdb/rocksdb_git.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "RocksDB an embeddable, persistent key-value store"
-DESCRIPTION = "RocksDB is library that provides an embeddable, persistent key-value store for fast storage."
-HOMEPAGE = "http://rocksdb.org/"
-LICENSE = "(Apache-2.0 | GPL-2.0) & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \
-                    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
-
-SRCREV = "266ac245affd69555643b735d19d3715c4eff91a"
-PV = "5.8+git${SRCPV}"
-
-SRC_URI = "git://github.com/facebook/${BPN}.git"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-PACKAGECONFIG ??= "bzip2 zlib lz4"
-PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2"
-PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4"
-PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib"
-PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF"
-
-# Tools and tests currently don't compile on armv5 so we disable them
-EXTRA_OECMAKE = "\
-    -DPORTABLE=ON \
-    -DWITH_TESTS=OFF \
-    -DWITH_TOOLS=OFF \
-"
-
-FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
index 23c0f25..ca88dd3 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
@@ -1,4 +1,4 @@
-From 3c3c21f4735eb215206273bc714c57c969926d3d Mon Sep 17 00:00:00 2001
+From 9739095de6ae5f844354756ae968f5f8864eb3e3 Mon Sep 17 00:00:00 2001
 From: Ming Liu <peter.x.liu@external.atlascopco.com>
 Date: Sun, 26 Feb 2017 14:10:21 +0100
 Subject: [PATCH] Include sys/time.h
@@ -8,6 +8,7 @@
 Upstream-Status: Inappropriate [musl libc specific]
 
 Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
+
 ---
  tests/msleep.c | 4 ----
  1 file changed, 4 deletions(-)
@@ -28,6 +29,3 @@
  
  int main(int argc, char *argv[])
  {
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Undefine-GLOB_BRACE.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Undefine-GLOB_BRACE.patch
deleted file mode 100644
index 7903bb1..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Undefine-GLOB_BRACE.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 6746e3a9615d1566bf228e9012d0841b15178810 Mon Sep 17 00:00:00 2001
-From: Ming Liu <liu.ming50@gmail.com>
-Date: Sun, 26 Feb 2017 13:50:33 +0100
-Subject: [PATCH] Undefine GLOB_BRACE
-
-GLOB_BRACE is not defined in posix and thus not implemented in musl libc.
-
-Fixed by defining it to 0 if it is undefined.
-
-Upstream-Status: Inappropriate [musl libc specific]
-
-Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
----
- plugins/imfile/imfile.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
-index d20471f..f9aff81 100644
---- a/plugins/imfile/imfile.c
-+++ b/plugins/imfile/imfile.c
-@@ -85,6 +85,11 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para
- 
- #define ADD_METADATA_UNSPECIFIED -1
- 
-+/* fixes build with musl libc */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
- /* this structure is used in pure polling mode as well one of the support
-  * structures for inotify.
-  */
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch
index bdcb6e2..a248f75 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch
@@ -1,3 +1,8 @@
+From 07ad2a1905089b9124623324a9969e4522317110 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Fri, 12 Sep 2014 03:41:11 -0400
+Subject: [PATCH] rsyslog: update configure to fix ptest
+
 $MaxMessageSize doesn't work if before $IncludeConfig diag-common.conf, then
 test cases fall into infinite loop with error message:
 
@@ -6,13 +11,24 @@
 
 Update configure to fix it.
 
-Upstream-Status: pending
+Upstream-Status: Pending
 
-Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
 ---
-diff -Nru rsyslog-7.4.4/tests/testsuites/complex1.conf rsyslog-7.4.4.new/tests/testsuites/complex1.conf
---- rsyslog-7.4.4/tests/testsuites/complex1.conf	2013-08-31 00:30:41.000000000 +0800
-+++ rsyslog-7.4.4.new/tests/testsuites/complex1.conf	2013-12-18 14:28:10.644004184 +0800
+ tests/testsuites/complex1.conf             | 2 +-
+ tests/testsuites/gzipwr_large.conf         | 2 +-
+ tests/testsuites/gzipwr_large_dynfile.conf | 2 +-
+ tests/testsuites/imptcp_conndrop.conf      | 2 +-
+ tests/testsuites/imptcp_large.conf         | 2 +-
+ tests/testsuites/imtcp_conndrop.conf       | 2 +-
+ tests/testsuites/wr_large.conf             | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/tests/testsuites/complex1.conf b/tests/testsuites/complex1.conf
+index 9b6a9f3..e00caa4 100644
+--- a/tests/testsuites/complex1.conf
++++ b/tests/testsuites/complex1.conf
 @@ -1,7 +1,7 @@
  # complex test case with multiple actions in gzip mode
  # rgerhards, 2009-05-22
@@ -22,9 +38,10 @@
  
  $MainMsgQueueTimeoutEnqueue 5000
  
-diff -Nru rsyslog-7.4.4/tests/testsuites/gzipwr_large.conf rsyslog-7.4.4.new/tests/testsuites/gzipwr_large.conf
---- rsyslog-7.4.4/tests/testsuites/gzipwr_large.conf	2012-04-04 14:29:55.000000000 +0800
-+++ rsyslog-7.4.4.new/tests/testsuites/gzipwr_large.conf	2013-12-18 14:28:10.645004186 +0800
+diff --git a/tests/testsuites/gzipwr_large.conf b/tests/testsuites/gzipwr_large.conf
+index 54ad3bb..e8247a9 100644
+--- a/tests/testsuites/gzipwr_large.conf
++++ b/tests/testsuites/gzipwr_large.conf
 @@ -1,7 +1,7 @@
  # simple async writing test
  # rgerhards, 2010-03-09
@@ -34,9 +51,10 @@
  
  $ModLoad ../plugins/imtcp/.libs/imtcp
  $MainMsgQueueTimeoutShutdown 10000
-diff -Nru rsyslog-7.4.4/tests/testsuites/gzipwr_large_dynfile.conf rsyslog-7.4.4.new/tests/testsuites/gzipwr_large_dynfile.conf
---- rsyslog-7.4.4/tests/testsuites/gzipwr_large_dynfile.conf	2012-04-04 14:29:55.000000000 +0800
-+++ rsyslog-7.4.4.new/tests/testsuites/gzipwr_large_dynfile.conf	2013-12-18 14:28:10.645004186 +0800
+diff --git a/tests/testsuites/gzipwr_large_dynfile.conf b/tests/testsuites/gzipwr_large_dynfile.conf
+index 3a1b255..297cb70 100644
+--- a/tests/testsuites/gzipwr_large_dynfile.conf
++++ b/tests/testsuites/gzipwr_large_dynfile.conf
 @@ -1,7 +1,7 @@
  # simple async writing test
  # rgerhards, 2010-03-09
@@ -46,9 +64,10 @@
  
  $ModLoad ../plugins/imtcp/.libs/imtcp
  $MainMsgQueueTimeoutShutdown 10000
-diff -Nru rsyslog-7.4.4/tests/testsuites/imptcp_conndrop.conf rsyslog-7.4.4.new/tests/testsuites/imptcp_conndrop.conf
---- rsyslog-7.4.4/tests/testsuites/imptcp_conndrop.conf	2013-08-31 00:30:41.000000000 +0800
-+++ rsyslog-7.4.4.new/tests/testsuites/imptcp_conndrop.conf	2013-12-18 14:28:10.646004189 +0800
+diff --git a/tests/testsuites/imptcp_conndrop.conf b/tests/testsuites/imptcp_conndrop.conf
+index 77a5d79..d9a14a8 100644
+--- a/tests/testsuites/imptcp_conndrop.conf
++++ b/tests/testsuites/imptcp_conndrop.conf
 @@ -1,7 +1,7 @@
  # simple async writing test
  # rgerhards, 2010-03-09
@@ -58,9 +77,10 @@
  
  $ModLoad ../plugins/imptcp/.libs/imptcp
  $MainMsgQueueTimeoutShutdown 10000
-diff -Nru rsyslog-7.4.4/tests/testsuites/imptcp_large.conf rsyslog-7.4.4.new/tests/testsuites/imptcp_large.conf
---- rsyslog-7.4.4/tests/testsuites/imptcp_large.conf	2013-08-31 00:30:41.000000000 +0800
-+++ rsyslog-7.4.4.new/tests/testsuites/imptcp_large.conf	2013-12-18 14:28:10.646004189 +0800
+diff --git a/tests/testsuites/imptcp_large.conf b/tests/testsuites/imptcp_large.conf
+index 77a5d79..d9a14a8 100644
+--- a/tests/testsuites/imptcp_large.conf
++++ b/tests/testsuites/imptcp_large.conf
 @@ -1,7 +1,7 @@
  # simple async writing test
  # rgerhards, 2010-03-09
@@ -70,9 +90,10 @@
  
  $ModLoad ../plugins/imptcp/.libs/imptcp
  $MainMsgQueueTimeoutShutdown 10000
-diff -Nru rsyslog-7.4.4/tests/testsuites/imtcp_conndrop.conf rsyslog-7.4.4.new/tests/testsuites/imtcp_conndrop.conf
---- rsyslog-7.4.4/tests/testsuites/imtcp_conndrop.conf	2013-07-19 20:59:03.000000000 +0800
-+++ rsyslog-7.4.4.new/tests/testsuites/imtcp_conndrop.conf	2013-12-18 14:28:10.646004189 +0800
+diff --git a/tests/testsuites/imtcp_conndrop.conf b/tests/testsuites/imtcp_conndrop.conf
+index de41bc4..7844dc7 100644
+--- a/tests/testsuites/imtcp_conndrop.conf
++++ b/tests/testsuites/imtcp_conndrop.conf
 @@ -1,7 +1,7 @@
  # simple async writing test
  # rgerhards, 2010-03-09
@@ -82,9 +103,10 @@
  
  $ModLoad ../plugins/imtcp/.libs/imtcp
  $MainMsgQueueTimeoutShutdown 10000
-diff -Nru rsyslog-7.4.4/tests/testsuites/wr_large.conf rsyslog-7.4.4.new/tests/testsuites/wr_large.conf
---- rsyslog-7.4.4/tests/testsuites/wr_large.conf	2012-04-04 14:29:55.000000000 +0800
-+++ rsyslog-7.4.4.new/tests/testsuites/wr_large.conf	2013-12-18 14:28:10.647004190 +0800
+diff --git a/tests/testsuites/wr_large.conf b/tests/testsuites/wr_large.conf
+index b64f132..b0ae264 100644
+--- a/tests/testsuites/wr_large.conf
++++ b/tests/testsuites/wr_large.conf
 @@ -1,7 +1,7 @@
  # simple async writing test
  # rgerhards, 2010-03-09
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
index 46eddd6..162d239 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
@@ -1,5 +1,5 @@
-From 5c3ba79177f7d1763db33c4358af2af60ff214b7 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com> 
+From d0852006bf3d305e8984b85b41997d43d4476937 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
 Date: Wed, 18 Jun 2014 13:46:52 +0800
 Subject: [PATCH] use pkgconfig to check libgcrypt
 
@@ -10,15 +10,16 @@
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
 ---
  configure.ac | 15 +--------------
  1 file changed, 1 insertion(+), 14 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 0f31869..d35db42 100644
+index 62178c3..b56c9c7 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -777,20 +777,7 @@ AC_ARG_ENABLE(libgcrypt,
+@@ -889,20 +889,7 @@ AC_ARG_ENABLE(libgcrypt,
          [enable_libgcrypt=yes]
  )
  if test "x$enable_libgcrypt" = "xyes"; then
@@ -40,6 +41,3 @@
  fi
  AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes)
  AC_SUBST(LIBGCRYPT_CFLAGS)
--- 
-2.8.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.29.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.29.0.bb
index 7056e1c..476540d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.29.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.29.0.bb
@@ -27,7 +27,6 @@
 "
 
 SRC_URI_append_libc-musl = " \
-    file://0001-Undefine-GLOB_BRACE.patch \
     file://0001-Include-sys-time-h.patch \
 "
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
index c6b9f10..10ffaaa 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
@@ -11,6 +11,9 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261"
 DEPENDS = "curl libpam openssl sblim-sfc-common unzip-native"
 
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
 SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
            file://sfcb.service \
            file://sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch \
@@ -28,7 +31,7 @@
 SRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd"
 
 inherit autotools
-inherit ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd', d)}
+inherit systemd
 
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "sblim-sfcb.service"
@@ -53,10 +56,8 @@
 
     oe_runmake DESTDIR=${D} install
 
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}${systemd_unitdir}/system
-        install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
-    fi
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
 
     install -d ${D}${sysconfdir}/init.d
     mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.5.bb
deleted file mode 100644
index 0970d2a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.5.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Control and monitor storage systems using S.M.A.R.T"
-DESCRIPTION = \
-"The smartmontools package contains two utility programs (smartctl \
-and smartd) to control and monitor storage systems using the Self-\
-Monitoring, Analysis and Reporting Technology System (SMART) built \
-into most modern ATA and SCSI hard disks. In many cases, these \
-utilities will provide advanced warning of disk degradation and failure."
-
-HOMEPAGE = "http://smartmontools.sourceforge.net/"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz \
-    file://initd.smartd \
-    file://smartmontools.default \
-    file://smartd.service \
-"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'libcap-ng selinux', d)}"
-PACKAGECONFIG[libcap-ng] = "--with-libcap-ng=yes,--with-libcap-ng=no,libcap-ng"
-PACKAGECONFIG[selinux] = "--with-selinux=yes,--with-selinux=no,libselinux"
-
-SRC_URI[md5sum] = "093aeec3f8f39fa9a37593c4012d3156"
-SRC_URI[sha256sum] = "89e8bb080130bc6ce148573ba5bb91bfe30236b64b1b5bbca26515d4b5c945bc"
-
-inherit autotools update-rc.d systemd
-
-SYSTEMD_SERVICE_${PN} = "smartd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-do_install_append () {
-    #install the init.d/smartd
-    install -d ${D}${sysconfdir}/init.d
-    install -p -m 0755 ${WORKDIR}/initd.smartd ${D}${sysconfdir}/init.d/smartd
-    install -d ${D}${sysconfdir}/default
-    install -p -m 0644 ${WORKDIR}/smartmontools.default ${D}${sysconfdir}/default/smartmontools
-
-    #install systemd service file
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/smartd.service ${D}${systemd_unitdir}/system
-    sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
-        -e 's,@SBINDIR@,${sbindir},g' \
-        ${D}${systemd_unitdir}/system/smartd.service
-}
-
-INITSCRIPT_NAME = "smartd"
-INITSCRIPT_PARAMS = "start 60 2 3 4 5 . stop 60 0 1 6 ."
-
-RDEPENDS_${PN} += "mailx"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.6.bb
new file mode 100644
index 0000000..1a1767e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.6.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Control and monitor storage systems using S.M.A.R.T"
+DESCRIPTION = \
+"The smartmontools package contains two utility programs (smartctl \
+and smartd) to control and monitor storage systems using the Self-\
+Monitoring, Analysis and Reporting Technology System (SMART) built \
+into most modern ATA and SCSI hard disks. In many cases, these \
+utilities will provide advanced warning of disk degradation and failure."
+
+HOMEPAGE = "http://smartmontools.sourceforge.net/"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz \
+    file://initd.smartd \
+    file://smartmontools.default \
+    file://smartd.service \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'libcap-ng selinux', d)}"
+PACKAGECONFIG[libcap-ng] = "--with-libcap-ng=yes,--with-libcap-ng=no,libcap-ng"
+PACKAGECONFIG[selinux] = "--with-selinux=yes,--with-selinux=no,libselinux"
+
+SRC_URI[md5sum] = "9ae2c6e7131cd2813edcc65cbe5f223f"
+SRC_URI[sha256sum] = "51f43d0fb064fccaf823bbe68cf0d317d0895ff895aa353b3339a3b316a53054"
+
+inherit autotools update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "smartd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append () {
+    #install the init.d/smartd
+    install -d ${D}${sysconfdir}/init.d
+    install -p -m 0755 ${WORKDIR}/initd.smartd ${D}${sysconfdir}/init.d/smartd
+    install -d ${D}${sysconfdir}/default
+    install -p -m 0644 ${WORKDIR}/smartmontools.default ${D}${sysconfdir}/default/smartmontools
+
+    #install systemd service file
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/smartd.service ${D}${systemd_unitdir}/system
+    sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        -e 's,@SBINDIR@,${sbindir},g' \
+        ${D}${systemd_unitdir}/system/smartd.service
+}
+
+INITSCRIPT_NAME = "smartd"
+INITSCRIPT_PARAMS = "start 60 2 3 4 5 . stop 60 0 1 6 ."
+
+RDEPENDS_${PN} += "mailx"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb
new file mode 100644
index 0000000..3c019eb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb
@@ -0,0 +1,12 @@
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=72d977d697c3c05830fdff00a7448931"
+SRCREV = "d1248b0f22ea8dc3b9d84a61bd35a83309bdb4b4"
+PV = "1.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https"
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+EXTRA_OEMAKE += "KERNELDIR=${STAGING_KERNEL_DIR}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb
index bc6fec0..4f58281 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb
@@ -8,6 +8,8 @@
 
 inherit cmake pkgconfig
 
+OECMAKE_GENERATOR = "Unix Makefiles"
+
 DEPENDS = "luajit zlib ncurses"
 RDEPENDS_${PN} = "bash"
 
@@ -33,3 +35,7 @@
     ${datadir}/zsh/* \
     ${prefix}/src/*  \
 "
+
+# luajit not supported on Aarch64
+COMPATIBLE_HOST = "^(?!aarch64).*"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/configure.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/configure.patch
index 8b98707..976e038 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/configure.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/configure.patch
@@ -1,11 +1,21 @@
+From 81c1ba940415595584a837ab1078c64855072f0c Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Mon, 21 Nov 2011 12:00:54 +0100
+Subject: [PATCH] t1lib: add 5.1.2
 
 #
 # Patch managed by http://www.holgerschurig.de/patcher.html
 #
 
---- t1lib-5.0.2/configure.in~configure.patch
-+++ t1lib-5.0.2/configure.in
-@@ -75,9 +75,9 @@
+---
+ configure.in | 95 ++++++++++++++++++++++++------------------------------------
+ 1 file changed, 38 insertions(+), 57 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index eade4c0..e649ea9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -74,9 +74,9 @@ T1LIB_PATCHLEVEL=builtin(eval, MACRO_T1LIB_LT_REVISION)
  T1LIB_VERSIONSTRING=\"MACRO_T1LIB_IDENTIFIER\"
  
  
@@ -18,7 +28,7 @@
  
  dnl We want these before the checks, so the checks can modify their values.
  test -z "$LDLIBS" && LDLIBS=-lm   AC_SUBST(LDLIBS)
-@@ -161,6 +161,7 @@
+@@ -162,6 +162,7 @@ fi
  
  dnl **** Check for underscore on external symbols ****
  
@@ -26,21 +36,12 @@
  AC_CACHE_CHECK("whether external symbols need an underscore prefix",
                 ac_cv_c_extern_prefix,
  [saved_libs=$LIBS
-@@ -178,68 +179,48 @@
+@@ -179,68 +180,48 @@ then
    AC_DEFINE(NEED_UNDERSCORE_PREFIX)
  fi
  
 -dnl **** Check which ANSI integer type is 16 bit 
-+dnl **** Check which ANSI integer type is 16 bit
-+T1_AA_TYPE16=""
-+for type in short int; do
-+	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x2"; then
-+		T1_AA_TYPE16="-DT1_AA_TYPE16=$type"
-+		T1_INT16="$type"
-+		break
-+	fi
-+done
- 
+-
 -AC_CACHE_CHECK( "which ANSI integer type is 16 bit", ac_16bit_type,
 -		AC_TRY_RUN([
 -int main(void) {
@@ -58,21 +59,23 @@
 -else
 -  T1_AA_TYPE16="-DT1_AA_TYPE16=int"
 -  T1_INT16="int"
++dnl **** Check which ANSI integer type is 16 bit
++T1_AA_TYPE16=""
++for type in short int; do
++	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x2"; then
++		T1_AA_TYPE16="-DT1_AA_TYPE16=$type"
++		T1_INT16="$type"
++		break
++	fi
++done
++
 +if test x"$T1_AA_TYPE16" = "x"; then
 +	AC_MSG_ERROR("Unable to determine which integer type is 16 bit.")
  fi
  
 -
  dnl **** Check which ANSI integer type is 32 bit 
-+T1_AA_TYPE32=""
-+for type in int long; do
-+	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x4"; then
-+		T1_AA_TYPE32="-DT1_AA_TYPE32=$type"
-+		T1_INT32="$type"
-+		break
-+	fi
-+done
- 
+-
 -AC_CACHE_CHECK( "which ANSI integer type is 32 bit", ac_32bit_type,
 -		AC_TRY_RUN([
 -int main(void) {
@@ -90,21 +93,22 @@
 -else
 -  T1_AA_TYPE32="-DT1_AA_TYPE32=long"
 -  T1_INT32="long"
++T1_AA_TYPE32=""
++for type in int long; do
++	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x4"; then
++		T1_AA_TYPE32="-DT1_AA_TYPE32=$type"
++		T1_INT32="$type"
++		break
++	fi
++done
++
 +if test x"$T1_AA_TYPE32" = "x"; then
 +	AC_MSG_ERROR("Unable to determine which integer type is 32 bit.")
  fi
  
 -
  dnl **** Check which ANSI integer type is 64 bit 
-+T1_AA_TYPE64=""
-+for type in long long_long; do
-+	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x8"; then
-+		AC_MSG_WARN("$type is 64 bit")
-+		T1_AA_TYPE64="-DT1_AA_TYPE64=\"`echo $type|tr '_' ' '`\""
-+		break
-+	fi
-+done
- 
+-
 -AC_CACHE_CHECK( "which ANSI integer type is 64 bit", ac_64bit_type,
 -		AC_TRY_RUN([
 -int main(void) {
@@ -118,6 +122,15 @@
 -  T1_AA_TYPE64="-DT1_AA_TYPE64=long"
 -else
 -  T1_AA_TYPE64=
++T1_AA_TYPE64=""
++for type in long long_long; do
++	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x8"; then
++		AC_MSG_WARN("$type is 64 bit")
++		T1_AA_TYPE64="-DT1_AA_TYPE64=\"`echo $type|tr '_' ' '`\""
++		break
++	fi
++done
++
 +if test x"$T1_AA_TYPE64" = "x"; then
 +	AC_MSG_ERROR("Unable to determine which integer type is 64 bit.")
  fi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch
index 8b4ce40..bc2476b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch
@@ -1,3 +1,8 @@
+From cea83003de3ffebde92becd1e599fe3b28f0a7c4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Mar 2017 23:13:36 -0800
+Subject: [PATCH] t1lib: Fix printf format string errors
+
 Fix printf formats to use format qualifiers
 fixes
 
@@ -6,20 +11,17 @@
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
 
---- a/lib/type1/objects.c
-+++ b/lib/type1/objects.c
-@@ -957,7 +957,7 @@
-  
-        sprintf(typemsg, "Wrong object type in %s; expected %s, found %s.\n",
-                   name, TypeFmt(expect), TypeFmt(obj->type));
--       IfTrace0(TRUE,typemsg);
-+       IfTrace1(TRUE, "%s", typemsg);
-  
-        ObjectPostMortem(obj);
-  
+---
+ lib/t1lib/t1subset.c | 2 +-
+ lib/type1/objects.c  | 2 +-
+ lib/type1/objects.h  | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/t1lib/t1subset.c b/lib/t1lib/t1subset.c
+index da427b2..e76974f 100644
 --- a/lib/t1lib/t1subset.c
 +++ b/lib/t1lib/t1subset.c
-@@ -759,7 +759,7 @@
+@@ -759,7 +759,7 @@ char *T1_SubsetFont( int FontID,
  	     tr_len);
      T1_PrintLog( "T1_SubsetFont()", err_warn_msg_buf,
  		 T1LOG_DEBUG);
@@ -28,9 +30,24 @@
    }
    
    /* compute size of output file */
+diff --git a/lib/type1/objects.c b/lib/type1/objects.c
+index c413a0f..f828e6a 100644
+--- a/lib/type1/objects.c
++++ b/lib/type1/objects.c
+@@ -957,7 +957,7 @@ struct xobject *TypeErr(name, obj, expect, ret) /* non-ANSI avoids overly strict
+  
+        sprintf(typemsg, "Wrong object type in %s; expected %s, found %s.\n",
+                   name, TypeFmt(expect), TypeFmt(obj->type));
+-       IfTrace0(TRUE,typemsg);
++       IfTrace1(TRUE, "%s", typemsg);
+  
+        ObjectPostMortem(obj);
+  
+diff --git a/lib/type1/objects.h b/lib/type1/objects.h
+index 13cbae7..3a1d337 100644
 --- a/lib/type1/objects.h
 +++ b/lib/type1/objects.h
-@@ -214,7 +214,7 @@
+@@ -214,7 +214,7 @@ struct xobject {
  /*SHARED*/
  /* NDW: personally, I want to see status and error messages! */
  #define IfTrace0(condition,model)                                 \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/libtool.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/libtool.patch
index e050025..da54f87 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/libtool.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/libtool.patch
@@ -1,12 +1,28 @@
+From bab41f5e1fc1fc809da1371e6a0222e0eb21e5f0 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Mon, 21 Nov 2011 12:00:54 +0100
+Subject: [PATCH] t1lib: add 5.1.2
 
 #
 # Patch managed by http://www.holgerschurig.de/patcher.html
 #
 
---- t1lib-5.0.2/Makefile.in~libtool
-+++ t1lib-5.0.2/Makefile.in
+---
+ Makefile.in           | 5 +++--
+ examples/Makefile.in  | 5 +++--
+ lib/Makefile.in       | 6 ++++--
+ lib/t1lib/Makefile.in | 6 ++++--
+ lib/type1/Makefile.in | 6 ++++--
+ type1afm/Makefile.in  | 6 ++++--
+ xglyph/Makefile.in    | 6 ++++--
+ 7 files changed, 26 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 29c3468..396c020 100644
+--- a/Makefile.in
++++ b/Makefile.in
 @@ -18,7 +18,8 @@
- # Last modified:       2001-04-01
+ # Last modified:       2005-05-01
  #
  
 -SHELL     = /bin/sh
@@ -15,7 +31,7 @@
  CC        = @CC@
  CPP       = @CPP@
  CFLAGS    = @CFLAGS@
-@@ -150,7 +151,7 @@
+@@ -149,7 +150,7 @@ distclean: clean
  	$(RM) examples/Makefile
  	$(RM) xglyph/Makefile
  	$(RM) doc/Makefile
@@ -24,8 +40,10 @@
  
  
  # The following two targets are for building and cleaning the python-
---- t1lib-5.0.2/examples/Makefile.in~libtool
-+++ t1lib-5.0.2/examples/Makefile.in
+diff --git a/examples/Makefile.in b/examples/Makefile.in
+index b301db5..7a6a514 100644
+--- a/examples/Makefile.in
++++ b/examples/Makefile.in
 @@ -14,9 +14,10 @@
  # Last modified:       2001-04-01
  #
@@ -39,8 +57,10 @@
  CC        = @CC@
  CPP       = @CPP@
  CFLAGS    = @CFLAGS@
---- t1lib-5.0.2/lib/Makefile.in~libtool
-+++ t1lib-5.0.2/lib/Makefile.in
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index 89e5e86..6e0f960 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
 @@ -15,8 +15,10 @@
  #
  # Contributions by H.Kakugawa to use libtool!
@@ -54,8 +74,10 @@
  CC        = @CC@
  CPP       = @CPP@
  CFLAGS    = @CFLAGS@
---- t1lib-5.0.2/lib/t1lib/Makefile.in~libtool
-+++ t1lib-5.0.2/lib/t1lib/Makefile.in
+diff --git a/lib/t1lib/Makefile.in b/lib/t1lib/Makefile.in
+index a6c2478..32434b3 100644
+--- a/lib/t1lib/Makefile.in
++++ b/lib/t1lib/Makefile.in
 @@ -14,8 +14,10 @@
  #
  # Modified by H.Kakugawa to use libtool
@@ -69,8 +91,10 @@
  CC        = @CC@
  CPP       = @CPP@
  CFLAGS    = @CFLAGS@
---- t1lib-5.0.2/lib/type1/Makefile.in~libtool
-+++ t1lib-5.0.2/lib/type1/Makefile.in
+diff --git a/lib/type1/Makefile.in b/lib/type1/Makefile.in
+index 241f124..42efa94 100644
+--- a/lib/type1/Makefile.in
++++ b/lib/type1/Makefile.in
 @@ -14,8 +14,10 @@
  #
  # Modified by H.Kakugawa to use libtool
@@ -84,8 +108,10 @@
  CC        = @CC@
  CPP       = @CPP@
  CFLAGS    = @CFLAGS@
---- t1lib-5.0.2/type1afm/Makefile.in~libtool
-+++ t1lib-5.0.2/type1afm/Makefile.in
+diff --git a/type1afm/Makefile.in b/type1afm/Makefile.in
+index 61611e1..9b51406 100644
+--- a/type1afm/Makefile.in
++++ b/type1afm/Makefile.in
 @@ -15,8 +15,10 @@
  #
  # Modified by H.Kakugawa to use libtool
@@ -99,8 +125,10 @@
  CC        = @CC@
  CPP       = @CPP@
  CFLAGS    = @CFLAGS@
---- t1lib-5.0.2/xglyph/Makefile.in~libtool
-+++ t1lib-5.0.2/xglyph/Makefile.in
+diff --git a/xglyph/Makefile.in b/xglyph/Makefile.in
+index 8da9b63..741334c 100644
+--- a/xglyph/Makefile.in
++++ b/xglyph/Makefile.in
 @@ -15,8 +15,10 @@
  #
  # Modified by H.Kakugawa to use libtool
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils/0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils/0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch
new file mode 100644
index 0000000..e495285
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils/0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch
@@ -0,0 +1,33 @@
+From 1ce892749e4f53bd0aeaa4c3ce45f80178799411 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 3 Mar 2018 17:52:51 -0800
+Subject: [PATCH] multicast_blast/tipcc: Fix struct type for TIPC_GROUP_JOIN
+
+Kernel defines it as tipc_group_req and not tipc_mreq
+this code was not excercised with older kernels so we
+never ran into the compiler failures since TIPC_GROUP_JOIN
+is only defined in kernel starting 4.15
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ multicast_blast/tipcc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/multicast_blast/tipcc.c b/multicast_blast/tipcc.c
+index 90644d3..911c759 100755
+--- a/multicast_blast/tipcc.c
++++ b/multicast_blast/tipcc.c
+@@ -213,7 +213,7 @@ int tipc_accept(int sd, struct tipc_addr *src)
+ int tipc_join(int sd, struct tipc_addr *member)
+ {
+ #ifdef TIPC_GROUP_JOIN
+-	struct tipc_mreq mreq = {
++	struct tipc_group_req mreq = {
+ 		.type = member->type,
+ 		.instance = member->instance,
+ 		.scope = domain2scope(member->domain)
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
index 720aa3c..54ed043 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
@@ -5,6 +5,7 @@
 SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils \
            file://0001-include-sys-select.h-for-FD_-definitions.patch \
            file://0002-replace-non-standard-uint-with-unsigned-int.patch \
+           file://0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch \
            "
 SRCREV = "7ab2211b87414ba240b0b2e4af219c1057c9cf9a"
 PV = "2.2.0+git${SRCPV}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tiptop/tiptop_2.3.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/tiptop/tiptop_2.3.1.bb
new file mode 100644
index 0000000..0a00a36
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/tiptop/tiptop_2.3.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Hardware performance monitoring counters"
+HOMEPAGE = "http://tiptop.gforge.inria.fr/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "ncurses libxml2"
+
+SRC_URI = "http://tiptop.gforge.inria.fr/releases/${BP}.tar.gz"
+SRC_URI[md5sum] = "46ca0fdf0236f02dd2b96d347626d2a2"
+SRC_URI[sha256sum] = "51c4449c95bba34f16b429729c2f58431490665d8093efaa8643b2e1d1084182"
+
+inherit autotools-brokensep
+EXTRA_OECONF = "CFLAGS="$CFLAGS -I${STAGING_INCDIR}/libxml2""
+COMPATIBLE_HOST = "(i.86|x86_64|arm|powerpc).*-linux"
+
+do_configure_prepend () {
+    # Two bugs in configure.ac when cross-compiling.
+    # 1. The path of libxml2. Specify it in EXTRA_OECONF.
+    # 2. hw's value on other platforms. Replace it if the target is
+    #    not i*86/x86_64.
+    if ( echo "${TARGET_ARCH}" | grep -q -e 'i.86' -e 'x86_64' ); then
+        sed -i 's= -I/usr/include/libxml2=='    ${S}/configure.ac
+    else
+        sed -i 's/hw=`uname -m`/hw="unknown"/'  ${S}/configure.ac
+        sed -i 's= -I/usr/include/libxml2=='    ${S}/configure.ac
+    fi
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tiptop/tiptop_2.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/tiptop/tiptop_2.3.bb
deleted file mode 100644
index d729de9..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/tiptop/tiptop_2.3.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Hardware performance monitoring counters"
-HOMEPAGE = "http://tiptop.gforge.inria.fr/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "ncurses libxml2"
-
-SRC_URI = "http://tiptop.gforge.inria.fr/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "f1fba1e90465b0e5a3865b19133fa19d"
-SRC_URI[sha256sum] = "3f07e958b40acaeab98e9eb1326c9f91b0be0a782c1cc2bd7a9e18d31fab18ca"
-
-inherit autotools-brokensep
-EXTRA_OECONF = "CFLAGS="$CFLAGS -I${STAGING_INCDIR}/libxml2""
-COMPATIBLE_HOST = "(i.86|x86_64|arm|powerpc).*-linux"
-
-do_configure_prepend () {
-    # Two bugs in configure.ac when cross-compiling.
-    # 1. The path of libxml2. Specify it in EXTRA_OECONF.
-    # 2. hw's value on other platforms. Replace it if the target is
-    #    not i*86/x86_64.
-    if ( echo "${TARGET_ARCH}" | grep -q -e 'i.86' -e 'x86_64' ); then
-        sed -i 's= -I/usr/include/libxml2=='    ${S}/configure.ac
-    else
-        sed -i 's/hw=`uname -m`/hw="unknown"/'  ${S}/configure.ac
-        sed -i 's= -I/usr/include/libxml2=='    ${S}/configure.ac
-    fi
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.1.bb
deleted file mode 100644
index bf21de5..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Terminal multiplexer"
-HOMEPAGE = "http://tmux.sourceforge.net"
-SECTION = "console/utils"
-
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://tmux.c;beginline=3;endline=17;md5=8685b4455330a940fab1ff451aa941a0"
-
-DEPENDS = "ncurses libevent"
-
-
-SRC_URI = "git://github.com/tmux/tmux.git;branch=master"
-SRCREV ?= "310f0a960ca64fa3809545badc629c0c166c6cd2"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.6.bb
new file mode 100644
index 0000000..fba5156
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.6.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Terminal multiplexer"
+HOMEPAGE = "http://tmux.sourceforge.net"
+SECTION = "console/utils"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://tmux.c;beginline=3;endline=17;md5=f256b76d52e7b4d02bf19144bdaca107"
+
+DEPENDS = "ncurses libevent"
+
+SRC_URI = "https://github.com/tmux/tmux/releases/download/${PV}/tmux-${PV}.tar.gz"
+SRC_URI[md5sum] = "d541ff392249f94c4f3635793556f827"
+SRC_URI[sha256sum] = "b17cd170a94d7b58c0698752e1f4f263ab6dc47425230df7e53a6435cc7cd7e8"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
+
+do_configure_prepend() {
+    # The 'compat' directory is needed for output during the build but it's
+    # not automatically created when building outside the source directory.
+    mkdir ${B}/compat
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/upm/files/ads1x15-fixed-case-logic-in-getThresh-function.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/upm/files/ads1x15-fixed-case-logic-in-getThresh-function.patch
deleted file mode 100644
index c617d14..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/upm/files/ads1x15-fixed-case-logic-in-getThresh-function.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c64d04d084f47b4cb3e1cdee6e96348fcc6a756e Mon Sep 17 00:00:00 2001
-From: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
-Date: Tue, 30 May 2017 15:14:09 -0700
-Subject: [PATCH 1/1] ads1x15: fixed case logic in getThresh() function
-
-Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
-
-Upstream-Status: Backported [c64d04d084f47b4cb3e1cdee6e96348fcc6a756e]
-
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-
----
- src/ads1x15/ads1x15.cxx | 4 ++--
- src/ads1x15/ads1x15.hpp | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/ads1x15/ads1x15.cxx b/src/ads1x15/ads1x15.cxx
-index 35782709..47701b2a 100644
---- a/src/ads1x15/ads1x15.cxx
-+++ b/src/ads1x15/ads1x15.cxx
-@@ -116,7 +116,7 @@ ADS1X15::setContinuous(bool mode){
- 
- float
- ADS1X15::getThresh(ADSTHRESH reg){
--     if( THRESH_HIGH && THRESH_LOW) return getLastSample(reg);
-+     if(reg == THRESH_HIGH || reg == THRESH_LOW) return getLastSample(reg);
-      else return 0.0;
- }
- 
-@@ -137,7 +137,7 @@ ADS1X15::setThresh(ADSTHRESH reg, float value){
-      case 2:
-      case 3:
-           set_value = value / getMultiplier();
--         set_value = set_value << m_bitShift;
-+          set_value = set_value << m_bitShift;
-           if(i2c->writeWordReg(reg, swapWord(set_value)) != mraa::SUCCESS){
-             throw std::runtime_error(std::string(__FUNCTION__) + ": I2c.write() failed");
-             return;
-diff --git a/src/ads1x15/ads1x15.hpp b/src/ads1x15/ads1x15.hpp
-index 7524572d..efd8c8ec 100644
---- a/src/ads1x15/ads1x15.hpp
-+++ b/src/ads1x15/ads1x15.hpp
-@@ -390,7 +390,7 @@ namespace upm {
-              * @param reg ADSTHRES enum value.
-              * Returns 0.0 unless THRESH_HIGH or THRESH_LOW requested.
-              */
--            float getThresh(ADSTHRESH reg = THRESH_LOW);
-+            float getThresh(ADSTHRESH reg = THRESH_DEFAULT);
- 
-             /**
-              * Sets threshold levels or configures for conversion ready
--- 
-2.11.0
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
index 38065ce..d742a5e 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
@@ -7,12 +7,11 @@
 
 DEPENDS = "libjpeg-turbo mraa"
 
-SRCREV = "106b6c706268522ab0168a4ddb19e89ce832e084"
-PV = "1.3.0-git${SRCPV}"
+SRCREV = "cc7fec9ae0228add9011bf1c2cd5e0ca2ba0d4f0"
+PV = "1.6.0-git${SRCPV}"
 
 SRC_URI = " \
     git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
-    file://ads1x15-fixed-case-logic-in-getThresh-function.patch \
 "
 
 S = "${WORKDIR}/git"
@@ -26,7 +25,13 @@
 # override this in local.conf to get needed bindings.
 # BINDINGS_pn-upm="python"
 # will result in only the python bindings being built/packaged.
-BINDINGS ??= "python ${@ 'nodejs' if oe.types.boolean(d.getVar('HAVE_NODEJS') or '0') else '' }"
+# Note: 'nodejs' is disabled by default because the bindings
+# generation currently fails with nodejs (>v7.x).
+BINDINGS ??= "python"
+
+# nodejs isn't available for armv4/armv5 architectures
+BINDINGS_armv4 ??= "python"
+BINDINGS_armv5 ??= "python"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
  ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
index ee0d074..2412bb8 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
@@ -1,13 +1,23 @@
+From f71cc920528c3496b0118964ebbcf5440cda4ed1 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 16 Aug 2017 13:37:40 +0800
+Subject: [PATCH] vlock: add new recipe
+
 Upstream-Status: Inappropriate [configuration]
 
 written by: Jeff Polk <jeff.polk@windriver.com>
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
 
-Index: vlock-2.2.2/man/vlock.1
-===================================================================
---- vlock-2.2.2.orig/man/vlock.1	2010-07-26 14:12:42.000000000 -0400
-+++ vlock-2.2.2/man/vlock.1	2010-07-26 14:13:06.000000000 -0400
-@@ -111,11 +111,6 @@
+---
+ man/vlock.1  | 5 -----
+ src/vlock.sh | 5 -----
+ 2 files changed, 10 deletions(-)
+
+diff --git a/man/vlock.1 b/man/vlock.1
+index 0d29b49..01cb944 100644
+--- a/man/vlock.1
++++ b/man/vlock.1
+@@ -111,11 +111,6 @@ enter your password at the password prompt.  If this variable is unset or set
  to an invalid value or 0 no timeout is used.  \fBWarning\fR: If this value is
  too low, you may not be able to unlock your session.
  .PP
@@ -19,11 +29,11 @@
  .SH SECURITY
  See the SECURITY file in the \fBvlock\fR distribution for more information.
  .PP
-Index: vlock-2.2.2/src/vlock.sh
-===================================================================
---- vlock-2.2.2.orig/src/vlock.sh	2010-07-26 14:12:32.000000000 -0400
-+++ vlock-2.2.2/src/vlock.sh	2010-07-26 14:13:33.000000000 -0400
-@@ -35,11 +35,6 @@
+diff --git a/src/vlock.sh b/src/vlock.sh
+index 75f1369..f572776 100644
+--- a/src/vlock.sh
++++ b/src/vlock.sh
+@@ -35,11 +35,6 @@ This TTY is now locked.
  
  ${VLOCK_ENTER_PROMPT}"
  
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
index 6e8a6a9..3a344b2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
@@ -1,8 +1,21 @@
+From 17e5c8d32abc214aea408f0837be41e88bce7eb2 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 16 Aug 2017 13:37:40 +0800
+Subject: [PATCH] vlock: add new recipe
+
 Upstream-Status: Pending
 
 written by: Jeff Polk <jeff.polk@windriver.com>
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
 
+---
+ Makefile         | 4 ++++
+ configure        | 9 +++++++++
+ src/vlock-main.c | 8 ++++++++
+ 3 files changed, 21 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 4eeb42a..834cd2c 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -126,6 +126,10 @@ ifeq ($(AUTH_METHOD),shadow)
@@ -16,6 +29,8 @@
  ifeq ($(ENABLE_PLUGINS),yes)
  vlock-main: plugins.o plugin.o module.o process.o script.o tsort.o list.o
  # -rdynamic is needed so that the all plugin can access the symbols from console_switch.o
+diff --git a/configure b/configure
+index d5d84d6..1303598 100755
 --- a/configure
 +++ b/configure
 @@ -44,6 +44,7 @@ Optional Features:
@@ -36,7 +51,7 @@
      pam|shadow)
        if [ "$2" = "yes" ] ; then
          if [ -n "$auth_method" ] && [ "$auth_method" != "$1" ] ; then
-@@ -232,6 +232,7 @@ set_defaults() {
+@@ -228,6 +232,7 @@ set_defaults() {
    AUTH_METHOD="pam"
    ENABLE_ROOT_PASSWORD="yes"
    ENABLE_PLUGINS="yes"
@@ -44,9 +59,7 @@
    SCRIPTS=""
  
    VLOCK_GROUP="vlock"
-@@ -356,10 +356,14 @@ ENABLE_PLUGINS = ${ENABLE_PLUGINS}
- # which plugins should be build
- MODULES = ${MODULES}
+@@ -353,6 +358,10 @@ MODULES = ${MODULES}
  # which scripts should be installed
  SCRIPTS = ${SCRIPTS}
  
@@ -57,12 +70,12 @@
  # root's group
  ROOT_GROUP = ${ROOT_GROUP}
  
- # group for privileged plugins
- VLOCK_GROUP = ${VLOCK_GROUP}
+diff --git a/src/vlock-main.c b/src/vlock-main.c
+index 008f6f0..108ce8b 100644
 --- a/src/vlock-main.c
 +++ b/src/vlock-main.c
-@@ -111,7 +111,9 @@ static void restore_terminal(void)
-   (void) tcsetattr(STDIN_FILENO, TCSANOW, &term);
+@@ -112,7 +112,9 @@ static void restore_terminal(void)
+   (void) tcsetattr(STDIN_FILENO, TCSANOW, &old_term);
  }
  
 +#ifdef ENABLE_FAIL_COUNT
@@ -71,7 +84,7 @@
  
  static void auth_loop(const char *username)
  {
-@@ -181,7 +183,9 @@ static void auth_loop(const char *userna
+@@ -182,7 +184,9 @@ static void auth_loop(const char *username)
      }
  #endif
  
@@ -81,7 +94,7 @@
    }
  
    /* Free timeouts memory. */
-@@ -189,11 +193,13 @@ static void auth_loop(const char *userna
+@@ -190,11 +194,13 @@ static void auth_loop(const char *username)
    free(prompt_timeout);
  }
  
@@ -95,7 +108,7 @@
  
  #ifdef USE_PLUGINS
  static void call_end_hook(void)
-@@ -216,7 +222,9 @@ int main(int argc, char *const argv[])
+@@ -217,7 +223,9 @@ int main(int argc, char *const argv[])
    if (username == NULL)
      fatal_perror("vlock: could not get username");
  
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch b/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch
index 4ce0abc..460b292 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch
@@ -1,13 +1,22 @@
+From fcec4e7fe899f8c0077b3004eeccb7292a945a67 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 16 Aug 2017 13:37:40 +0800
+Subject: [PATCH] vlock: add new recipe
+
 Upstream-Status: Pending
 
 written by: Jeff Polk <jeff.polk@windriver.com>
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
 
-Index: vlock-2.2.2/src/auth-pam.c
-===================================================================
---- vlock-2.2.2.orig/src/auth-pam.c	2010-06-14 14:38:51.000000000 -0400
-+++ vlock-2.2.2/src/auth-pam.c	2010-06-14 14:39:12.000000000 -0400
-@@ -148,6 +148,9 @@
+---
+ src/auth-pam.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/auth-pam.c b/src/auth-pam.c
+index 5cf93f6..c5cc67a 100644
+--- a/src/auth-pam.c
++++ b/src/auth-pam.c
+@@ -148,6 +148,9 @@ bool auth(const char *user, struct timespec *timeout)
  
    if (pam_status != PAM_SUCCESS) {
      fprintf(stderr, "vlock: %s\n", pam_strerror(pamh, pam_status));
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/zram/zram/init b/import-layers/meta-openembedded/meta-oe/recipes-extended/zram/zram/init
index 7b6cbf4..a2c9c21 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/zram/zram/init
+++ b/import-layers/meta-openembedded/meta-oe/recipes-extended/zram/zram/init
@@ -34,7 +34,7 @@
     mem_by_cpu=$(($memtotal/$num_cpus*$factor/100*1024))
 
     # load dependency modules
-    modprobe zram zram_num_devices=$num_cpus
+    modprobe zram num_devices=$num_cpus
     echo "zram devices probed successfully"
 
     # initialize the devices
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/zsh/zsh_5.3.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-extended/zsh/zsh_5.3.1.bb
deleted file mode 100644
index 1f5e390..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-extended/zsh/zsh_5.3.1.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-SUMMARY = "UNIX Shell similar to the Korn shell"
-DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \
-               powerful scripting language. Many of the useful features of bash, \
-               ksh, and tcsh were incorporated into zsh; many original features were added."
-HOMEPAGE = "http://www.zsh.org"
-SECTION = "base/shell"
-
-LICENSE = "zsh"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=b7bc853894664be455a922db9805288e"
-
-DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz"
-SRC_URI[md5sum] = "d583fbca0c2410bf9542ce8a651c26ca"
-SRC_URI[sha256sum] = "3d94a590ff3c562ecf387da78ac356d6bea79b050a9ef81e3ecb9f8ee513040e"
-
-inherit autotools gettext update-alternatives
-
-EXTRA_OECONF = " \
-    --bindir=${base_bindir} \
-    --enable-etcdir=${sysconfdir} \
-    --enable-fndir=${datadir}/${PN}/${PV}/functions \
-    --enable-site-fndir=${datadir}/${PN}/site-functions \
-    --with-term-lib='ncursesw ncurses' \
-    --with-tcsetpgrp \
-    --enable-cap \
-    --enable-multibyte \
-    --disable-gdbm \
-    --disable-dynamic \
-    zsh_cv_shared_environ=yes \
-"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-ALTERNATIVE_${PN} = "sh"
-ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
-ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
-ALTERNATIVE_PRIORITY = "100"
-
-export AUTOHEADER = "true"
-
-do_configure () {
-    gnu-configize --force ${S}
-    oe_runconf
-}
-
-do_install_append () {
-    rm -fr ${D}/usr/share
-}
-
-pkg_postinst_${PN} () {
-    touch $D${sysconfdir}/shells
-    grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells
-    grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
-}
-
-FILES_${PN}-dbg += "\
-    ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
-    ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
-    ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
-"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm_2.24.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm_2.24.2.bb
index 30ac90a..307774b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm_2.24.2.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-gnome/atk/atkmm_2.24.2.bb
@@ -7,7 +7,9 @@
 
 DEPENDS = "atk glibmm"
 
-inherit gnome autotools pkgconfig
+inherit distro_features_check gnome autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI[archive.md5sum] = "d53b60b0f1be597e86070954a49cf0c3"
 SRC_URI[archive.sha256sum] = "ff95385759e2af23828d4056356f25376cfabc41e690ac1df055371537e458bd"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb
index 06f3bb3..d874164 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb
@@ -14,6 +14,10 @@
 EXTRA_AUTORECONF = ""
 DEPENDS = ""
 
+# Default to enable autoconf-archive to avoid conflicts
+PACKAGECONFIG ??= "autoconf-archive"
+PACKAGECONFIG[autoconf-archive] = "--with-autoconf-archive, --without-autoconf-archive, autoconf-archive"
+
 FILES_${PN} += "${datadir}/aclocal"
 FILES_${PN}-dev = ""
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/files/0001-do-not-build-demos.patch b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/files/0001-do-not-build-demos.patch
new file mode 100644
index 0000000..176e979
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/files/0001-do-not-build-demos.patch
@@ -0,0 +1,51 @@
+From 6914eccee34376f9067b0ee9f17039fe182125e8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sat, 31 Mar 2018 22:29:16 +0200
+Subject: [PATCH] do not build demos
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+They are not installed anyway and add libepoxy dependency
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ Makefile.am  | 3 ++-
+ configure.ac | 3 ---
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 984b6a7..6c754a6 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -28,7 +28,8 @@ doc_subdirs = docs
+ else
+ doc_subdirs =
+ endif
+-SUBDIRS = tools $(src_subdirs) gdk/gdkmm gtk/gtkmm tests demos $(doc_subdirs)
++
++SUBDIRS = tools $(src_subdirs) gdk/gdkmm gtk/gtkmm tests $(doc_subdirs)
+ 
+ gdkmm_includedir = $(includedir)/$(GDKMM_MODULE_NAME)
+ gdkmm_include_HEADERS = gdk/gdkmm.h
+diff --git a/configure.ac b/configure.ac
+index e5e82dc..c1c7658 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -109,11 +109,8 @@ AS_IF([test "x$gtkmm_enable_api_atkmm" != xno],
+       [GTKMM_MODULES="atkmm-1.6 >= 2.24.2 $GTKMM_MODULES"])
+ AC_SUBST([GTKMM_MODULES])
+ 
+-AC_SUBST([GTKMM_DEMOS_EXTRA_MODULES], ['epoxy >= 1.2'])
+-
+ PKG_CHECK_MODULES([GDKMM], [$GDKMM_MODULES])
+ PKG_CHECK_MODULES([GTKMM], [$GTKMM_MODULES])
+-PKG_CHECK_MODULES([GTKMM_DEMOS_EXTRA], [$GTKMM_DEMOS_EXTRA_MODULES])
+ 
+ MM_PKG_CONFIG_SUBST([GTHREAD_CFLAGS], [--cflags-only-other gthread-2.0])
+ MM_PKG_CONFIG_SUBST([GTHREAD_LIBS], [--libs gthread-2.0])
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtkmm3_3.22.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtkmm3_3.22.2.bb
new file mode 100644
index 0000000..96b54dd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtkmm3_3.22.2.bb
@@ -0,0 +1,23 @@
+SUMMARY = "C++ bindings for the GTK+ toolkit V3"
+HOMEPAGE = "http://www.gtkmm.org/"
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "atkmm pangomm glibmm gtk+3 cairomm"
+
+BPN = "gtkmm"
+
+inherit gnomebase distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.md5sum] = "883e9046768b3a5afc8e365988823e77"
+SRC_URI[archive.sha256sum] = "91afd98a31519536f5f397c2d79696e3d53143b80b75778521ca7b48cb280090"
+SRC_URI += "file://0001-do-not-build-demos.patch"
+
+EXTRA_OECONF = " --disable-documentation "
+
+FILES_${PN}-dev += "${libdir}/*/include ${libdir}/*/proc/m4"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtkmm_2.24.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtkmm_2.24.5.bb
index 195bb21..b780d09 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtkmm_2.24.5.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-gnome/gtk+/gtkmm_2.24.5.bb
@@ -8,12 +8,10 @@
 
 DEPENDS = "atkmm pangomm glibmm gtk+ cairomm"
 
-inherit gnome autotools pkgconfig distro_features_check
+inherit gnomebase distro_features_check
 
 REQUIRED_DISTRO_FEATURES = "x11"
 
-GNOME_COMPRESS_TYPE = "xz"
-
 SRC_URI[archive.md5sum] = "6c59ae8bbff48fad9132f23af347acf1"
 SRC_URI[archive.sha256sum] = "0680a53b7bf90b4e4bf444d1d89e6df41c777e0bacc96e9c09fc4dd2f5fe6b72"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/0001-configure.in-remove-deprecated-GNOME_COMMON_INIT.patch b/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/0001-configure.in-remove-deprecated-GNOME_COMMON_INIT.patch
deleted file mode 100644
index 4738274..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/0001-configure.in-remove-deprecated-GNOME_COMMON_INIT.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From ceefcb19cebf8bc3d45ee502f8eabd3bc5bd0aac Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Sat, 11 Feb 2017 16:42:12 +0100
-Subject: [PATCH] configure.in: remove deprecated GNOME_COMMON_INIT
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.in | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 8905f1c..3901398 100644
---- a/configure.in
-+++ b/configure.in
-@@ -15,7 +15,6 @@ AC_CONFIG_HEADERS([config.h])
- 
- AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
- 
--GNOME_COMMON_INIT
- 
- if test "$enable_debug" != "no"; then
-   AC_DEFINE([DEBUG],[1],[enable use of LIBGLADE_DEBUG environment variable])
--- 
-2.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/glade-cruft.patch b/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/glade-cruft.patch
deleted file mode 100644
index c5d5864..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/glade-cruft.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Upstream-Status: Pending
-
-diff -ur libglade-2.4.0~/configure.in libglade-2.4.0/configure.in
---- libglade-2.4.0~/configure.in	2004-05-17 12:38:31.000000000 +0100
-+++ libglade-2.4.0/configure.in	2004-07-28 16:53:09.000000000 +0100
-@@ -147,6 +147,18 @@
- AM_CONDITIONAL(HAVE_PYTHON, $have_python)
- AC_SUBST(PYTHON)
- 
-+AC_MSG_CHECKING([for cruft in libgtk])
-+AC_TRY_LINK([
-+#include <gtk/gtk.h>
-+#include <stdio.h>
-+],      [ gtk_tree_get_type (); return 0; ],
-+        [ AC_MSG_RESULT(yes)
-+          have_cruft=yes ],
-+        [ AC_MSG_RESULT(no)
-+	  AC_DEFINE(DISABLE_CRUFT,,[leave out support for old, broken widgets])
-+          have_cruft=no ])
-+AC_SUBST(DISABLE_CRUFT)
-+
- dnl add debugging options ...
- changequote(,)dnl
- if test "x$GCC" = xyes; then
-Only in libglade-2.4.0: configure.in.orig
-diff -ur libglade-2.4.0~/glade/glade-gtk.c libglade-2.4.0/glade/glade-gtk.c
---- libglade-2.4.0~/glade/glade-gtk.c	2004-03-13 13:47:35.000000000 +0000
-+++ libglade-2.4.0/glade/glade-gtk.c	2004-07-28 16:53:52.000000000 +0100
-@@ -213,6 +213,8 @@
- 	gtk_clist_column_titles_hide (GTK_CLIST (w));
- }
- 
-+#ifndef DISABLE_CRUFT
-+
- static void
- tree_set_selection_mode (GladeXML *xml, GtkWidget *w,
- 			 const char *name, const char *value)
-@@ -238,6 +240,8 @@
-     gtk_tree_set_view_lines (GTK_TREE (w), BOOL (value));
- }
- 
-+#endif
-+
- static void
- list_set_selection_mode (GladeXML *xml, GtkWidget *w,
- 			 const char *name, const char *value)
-@@ -254,6 +258,7 @@
-     gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (w), BOOL (value));
- }
- 
-+#ifndef DISABLE_CRUFT
- static void
- text_set_text (GladeXML *xml, GtkWidget *w,
- 	       const char *name, const char *value)
-@@ -262,6 +267,7 @@
- 
-     gtk_editable_insert_text (GTK_EDITABLE (w), value, -1, &pos);
- }
-+#endif
- 
- static void
- radio_menu_item_set_group (GladeXML *xml, GtkWidget *w,
-@@ -1125,13 +1131,17 @@
-     glade_register_custom_prop (GTK_TYPE_CLIST, "selection_mode", clist_set_selection_mode);
-     glade_register_custom_prop (GTK_TYPE_CLIST, "shadow_type", clist_set_shadow_type);
-     glade_register_custom_prop (GTK_TYPE_CLIST, "show_titles", clist_set_show_titles);
-+#ifndef DISABLE_CRUFT
-     glade_register_custom_prop (GTK_TYPE_TREE, "selection_mode", tree_set_selection_mode);
-     glade_register_custom_prop (GTK_TYPE_TREE, "view_mode", tree_set_view_mode);
-     glade_register_custom_prop (GTK_TYPE_TREE, "view_line", tree_set_view_line);
-+#endif
-     glade_register_custom_prop (GTK_TYPE_LIST, "selection_mode", list_set_selection_mode);
-     glade_register_custom_prop (GTK_TYPE_CHECK_MENU_ITEM, "always_show_toggle",
- 				check_menu_item_set_always_show_toggle);
-+#ifndef DISABLE_CRUFT
-     glade_register_custom_prop (GTK_TYPE_TEXT, "text", text_set_text);
-+#endif
-     glade_register_custom_prop (GTK_TYPE_RADIO_MENU_ITEM, "group",
- 				radio_menu_item_set_group);
-     glade_register_custom_prop (GTK_TYPE_TOOLBAR, "tooltips", toolbar_set_tooltips);
-@@ -1288,8 +1298,10 @@
- 			   glade_standard_build_children, NULL);
-     glade_register_widget (GTK_TYPE_TEAROFF_MENU_ITEM, glade_standard_build_widget,
- 			   NULL, NULL);
-+#ifndef DISABLE_CRUFT
-     glade_register_widget (GTK_TYPE_TEXT, glade_standard_build_widget,
- 			   NULL, NULL);
-+#endif
-     glade_register_widget (GTK_TYPE_TEXT_VIEW, glade_standard_build_widget,
- 			   NULL, NULL);
-     glade_register_widget (GTK_TYPE_TIPS_QUERY, glade_standard_build_widget,
-@@ -1304,8 +1316,10 @@
- 			   glade_standard_build_children, NULL);
-     glade_register_widget (GTK_TYPE_TOOL_BUTTON, glade_standard_build_widget,
- 			   NULL, NULL);
-+#ifndef DISABLE_CRUFT
-     glade_register_widget (GTK_TYPE_TREE, glade_standard_build_widget,
- 			   NULL, NULL);
-+#endif
-     glade_register_widget (GTK_TYPE_TREE_VIEW, glade_standard_build_widget,
- 			   NULL, NULL);
-     glade_register_widget (GTK_TYPE_VBUTTON_BOX, glade_standard_build_widget,
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/no-xml2.patch b/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/no-xml2.patch
deleted file mode 100644
index dc4c092..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/no-xml2.patch
+++ /dev/null
@@ -1,501 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff -urN libglade-2.4.2.orig/configure.in libglade-2.4.2/configure.in
---- libglade-2.4.2.orig/configure.in	2005-02-11 12:42:58.000000000 +0100
-+++ libglade-2.4.2/configure.in	2005-03-22 01:22:00.000000000 +0100
-@@ -52,11 +52,33 @@
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- 
- PKG_CHECK_MODULES(LIBGLADE, [dnl
--  libxml-2.0 >= required_libxml_version dnl
-   atk >= required_atk_version dnl
-   gtk+-2.0 >= required_gtk_version dnl
-   glib-2.0 >= required_glib_version])
- 
-+disable_xml2=no
-+AC_ARG_WITH([libxml2],
-+  AC_HELP_STRING([--without-libxml2], [Don't use libxml2, use Glib's GMarkupParser instead]),
-+  [disable_xml2=yes],
-+  [disable_xml2=no])
-+
-+AC_MSG_CHECKING([if we are using libxml2])
-+if test "x$disable_xml2" == "xno"; then
-+  AC_MSG_RESULT(yes)
-+  PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.4.10)
-+  PKGCFG_REQUIRE_LIBXML2="libxml-2.0"
-+  LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS $XML2_CFLAGS"
-+  LIBGLADE_LIBS="$LIBGLADE_LIBS $XML2_LIBS"
-+else
-+  LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS -DUSE_GMARKUP_PARSER"
-+  PKGCFG_REQUIRE_LIBXML2=""
-+  AC_MSG_RESULT(no)
-+fi
-+
-+AC_SUBST(XML2_LIBS)
-+AC_SUBST(XML2_CFLAGS)
-+AC_SUBST(PKGCFG_REQUIRE_LIBXML2)
-+
- AC_MSG_CHECKING([for native Win32])
- case "$host" in
-   *-*-mingw*)
-@@ -116,6 +138,21 @@
-   fi
- fi
- 
-+if test "x$disable_xml2" == "xyes"; then
-+  echo "*****************************************************"
-+  echo "  You chose to disable libxml2 and use Glib's"
-+  echo "  GMarkupParser instead." 
-+  echo  
-+  echo "  Please bear in mind that using libglade with"
-+  echo "  GMarkupParser is an experimental feature only."
-+  echo
-+  echo "  Please post problems or success stories to"
-+  echo "  the glade-devel mailing list. Thank you."
-+  echo "*****************************************************"
-+fi
-+
-+
-+
- GTK_DOC_CHECK(1.0)
- 
- dnl gettext stuff ... there is no message catalog for libglade -- libglade
-diff -urN libglade-2.4.2.orig/glade/glade-parser.c libglade-2.4.2/glade/glade-parser.c
---- libglade-2.4.2.orig/glade/glade-parser.c	2004-11-11 11:56:13.000000000 +0100
-+++ libglade-2.4.2/glade/glade-parser.c	2005-03-22 01:20:00.000000000 +0100
-@@ -34,7 +34,15 @@
- #  define dgettext(Domain, String) (String)
- #endif
- 
--#include <libxml/parser.h>
-+#ifdef USE_GMARKUP_PARSER
-+#  include <zlib.h>
-+#else
-+#  include <libxml/parser.h>
-+#endif
-+
-+#ifdef USE_GMARKUP_PARSER
-+#  define xmlChar gchar
-+#endif
- 
- #include "glade-parser.h"
- #include "glade-private.h"
-@@ -508,7 +516,9 @@
-     case PARSER_START:
- 	if (!strcmp(name, "glade-interface")) {
- 	    state->state = PARSER_GLADE_INTERFACE;
--#if 0
-+
-+#ifndef USE_GMARKUP_PARSER
-+ #if 0
- 	    /* check for correct XML namespace */
- 	    for (i = 0; attrs && attrs[i] != NULL; i += 2) {
- 		if (!strcmp(attrs[i], "xmlns") &&
-@@ -518,7 +528,9 @@
- 		    g_warning("unknown attribute `%s' for <glade-interface>",
- 			      attrs[i]);
- 	    }
-+ #endif
- #endif
-+
- 	} else {
- 	    g_warning("Expected <glade-interface>.  Got <%s>.", name);
- 	    state->prev_state = state->state;
-@@ -1063,12 +1075,18 @@
-     }
- }
- 
-+#ifndef USE_GMARKUP_PARSER
-+
- static xmlEntityPtr
- glade_parser_get_entity(GladeParseState *state, const xmlChar *name)
- {
-     return xmlGetPredefinedEntity(name);
- }
- 
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- glade_parser_warning(GladeParseState *state, const char *msg, ...)
- {
-@@ -1079,6 +1097,10 @@
-     va_end(args);
- }
- 
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- glade_parser_error(GladeParseState *state, const char *msg, ...)
- {
-@@ -1089,6 +1111,10 @@
-     va_end(args);
- }
- 
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- glade_parser_fatal_error(GladeParseState *state, const char *msg, ...)
- {
-@@ -1099,6 +1125,10 @@
-     va_end(args);
- }
- 
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static xmlSAXHandler glade_parser = {
-     (internalSubsetSAXFunc)NULL,                       /* internalSubset */
-     (isStandaloneSAXFunc)NULL,                         /* isStandalone */
-@@ -1126,6 +1156,82 @@
-     (fatalErrorSAXFunc)glade_parser_fatal_error,       /* fatalError */
- };
- 
-+#else /* USE_GMARKUP_PARSER */
-+
-+static void
-+glade_parser_start_element_wrapper(GMarkupParseContext *context,
-+                                   const gchar         *name, 
-+                                   const gchar        **attr_names,
-+                                   const gchar        **attr_values,
-+                                   gpointer             state,
-+                                   GError             **error)
-+{
-+    guint i = 0;
-+
-+    /* Pack attribute names/values from two separate
-+     *  arrays (GMarkupParser style) into one single
-+     *  array (libxml SAXParser style). This is not
-+     *  very efficient, but we do it to make the
-+     *  GMarkupParser code as little invasive as
-+     *  possible. */
-+
-+    while (attr_names[i] != NULL) {
-+      ++i;
-+    }
-+
-+    if (1)
-+    {
-+        const gchar *attr[(i*2)+1];
-+        guint j, k;
-+       
-+        for (j=0, k=0;  k < i;  j += 2)
-+        {
-+            attr[j] = attr_names[k];
-+            attr[j+1] = attr_values[k];
-+            ++k;
-+        }
-+        attr[i*2] = NULL;
-+
-+        glade_parser_start_element((GladeParseState*)state, name, attr);
-+    }
-+}
-+
-+static void
-+glade_parser_end_element_wrapper(GMarkupParseContext *context, 
-+                                 const gchar         *name,
-+                                 gpointer             state,
-+                                 GError             **err)
-+{
-+    glade_parser_end_element((GladeParseState*)state, name);
-+}
-+
-+static void
-+glade_parser_characters_wrapper(GMarkupParseContext *context, 
-+                                const gchar         *chars, 
-+                                gsize                len,
-+                                gpointer             state,
-+                                GError             **err)
-+{
-+    glade_parser_characters((GladeParseState*)state, chars, (int) len);
-+}
-+
-+static void
-+glade_parser_error(GMarkupParseContext *context, GError *err, gpointer data)
-+{
-+    g_log("Glade-Parser", G_LOG_LEVEL_CRITICAL, "%s", err->message);
-+}
-+
-+static const GMarkupParser   glade_parser = {
-+    glade_parser_start_element_wrapper,  /* element open   */
-+    glade_parser_end_element_wrapper,    /* element close  */
-+    glade_parser_characters_wrapper,     /* text content   */
-+    NULL,                                /* passthrough    */
-+    glade_parser_error,                  /* parse error    */
-+};
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
-+
- static void
- widget_info_free(GladeWidgetInfo *info)
- {
-@@ -1191,6 +1297,9 @@
-  *
-  * Returns: the GladeInterface structure for the XML file.
-  */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- GladeInterface *
- glade_parser_parse_file(const gchar *file, const gchar *domain)
- {
-@@ -1222,6 +1331,31 @@
-     return state.interface;
- }
- 
-+#else /* defined(USE_GMARKUP_PARSER) */
-+
-+GladeInterface *
-+glade_parser_parse_file(const gchar *file, const gchar *domain)
-+{
-+    GladeInterface  *interface;
-+    GError          *err     = NULL;
-+    gchar           *content = NULL;
-+    gsize            clen;
-+
-+    if (!g_file_get_contents(file, &content, &clen, &err)) {
-+        g_warning("could not load glade file: %s", err->message);
-+        g_error_free(err);
-+        return NULL;
-+    }
-+
-+    interface = glade_parser_parse_buffer(content, (gint) clen, domain);
-+
-+    g_free(content);
-+
-+    return interface;
-+}
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
- /**
-  * glade_parser_parse_buffer
-  * @buffer: a buffer in memory containing XML data.
-@@ -1237,6 +1371,9 @@
-  *
-  * Returns: the GladeInterface structure for the XML buffer.
-  */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- GladeInterface *
- glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain)
- {
-@@ -1263,6 +1400,161 @@
-     return state.interface;
- }
- 
-+#else /* defined(USE_GMARKUP_PARSER) */
-+
-+
-+static GladeInterface *
-+glade_parser_parse_buffer_internal(const gchar *buffer, gint len, const gchar *domain)
-+{
-+	GMarkupParseContext  *context;
-+	GladeParseState       state = { 0 };
-+	GError               *err   = NULL;
-+
-+	state.interface = NULL;
-+	if (domain)
-+		state.domain = domain;
-+	else
-+		state.domain = textdomain(NULL);
-+
-+	/* FIXME: This strstr() is not safe, as it ignores the len
-+	 *        argument and assumes the buffer is NUL-terminated */
-+	if (strstr(buffer, "<?xml") == NULL) {
-+		g_warning("No XML header found in document!");
-+		return NULL;
-+	}
-+
-+	context = g_markup_parse_context_new(&glade_parser, (GMarkupParseFlags) 0, &state, NULL);
-+
-+	glade_parser_start_document(&state);
-+
-+	if (!g_markup_parse_context_parse(context, buffer, (gssize) len, &err)) {
-+		g_warning("document not well formed: %s", err->message);
-+		g_error_free(err);
-+		if (state.interface)
-+			glade_interface_destroy (state.interface);
-+		return NULL;
-+	}
-+
-+	glade_parser_end_document(&state);
-+
-+	if (state.state != PARSER_FINISH) {
-+		g_warning("did not finish in PARSER_FINISH state!");
-+
-+		if (state.interface)
-+			glade_interface_destroy(state.interface);
-+
-+		return NULL;
-+	}
-+
-+	return state.interface;
-+}
-+
-+struct _gzip_rfc1952_hdr
-+{
-+	guint8	id1, id2, cm, flags;
-+	guint32 mtime;
-+	guint8  xflags;
-+	guint8  os;
-+};
-+
-+static GladeInterface *
-+glade_parser_parse_gzipped_buffer(const gchar *buffer, gint len, const gchar *domain)
-+{
-+	struct _gzip_rfc1952_hdr *hdr = (struct _gzip_rfc1952_hdr*)buffer;
-+	struct z_stream_s         zstream;
-+	GladeInterface           *interface;
-+	const guint8             *cbuf;              /* start of compressed data */
-+	guint8                   *decompress_buf;
-+	gulong                    decompress_len = 0;
-+	gint                      ret;
-+
-+	g_assert(hdr != NULL && hdr->id1 == 0x1f && hdr->id2 == 0x8b);
-+
-+	if (hdr->cm != Z_DEFLATED) {
-+		g_warning("Unknown decompression method %u", (guint) hdr->cm);
-+		return NULL;
-+	}
-+
-+	/* Uncompressed size (modulo 2^32) is last
-+	 *  4 bytes of gzipped file, and little endian.
-+	 *  See RFC 1952 */
-+	decompress_len = GUINT32_FROM_LE(*((guint32*)(((guint8*)buffer) + len - 4)));
-+
-+	/* paranoid mode: glade files > 5MB are unlikely */
-+	g_return_val_if_fail(decompress_len < 5*1024*1024, NULL);
-+
-+	decompress_buf = g_malloc0(decompress_len + 1); /* +1 for NUL-terminator */
-+
-+	/* find start of compressed data, skipping header stuff */
-+	cbuf = (guint8*)buffer + 10;
-+	if (hdr->flags & 0x04) {
-+		guint16 xlen = GUINT16_FROM_LE(*((guint16*)cbuf));
-+		cbuf += xlen + 2;
-+	}
-+	if (hdr->flags & 0x08) {
-+		guint16 onamelen = strlen(cbuf);
-+		cbuf += onamelen + 1;
-+	}
-+	if (hdr->flags & 0x10) {
-+		guint16 commentlen = strlen(cbuf);
-+		cbuf += commentlen + 1;
-+	}
-+	if (hdr->flags & 0x02)
-+	{
-+		cbuf += 2; /* skip header CRC16 */
-+	}
-+
-+	zstream.next_in  = (void*)cbuf;
-+	zstream.avail_in = (uLongf) len - ((void*)cbuf-(void*)buffer) - 4 - 4 +1; 
-+	zstream.next_out = decompress_buf;
-+	zstream.avail_out= decompress_len;
-+	zstream.zalloc   = Z_NULL;
-+	zstream.zfree    = Z_NULL;
-+	zstream.opaque   = Z_NULL;
-+
-+	ret = inflateInit2(&zstream, -MAX_WBITS);
-+
-+	if (ret != Z_OK) {
-+		g_warning("inflateInit2() failed. zlib error code: %d", ret);
-+		g_free(decompress_buf);
-+		return NULL;
-+	}
-+
-+	ret = inflate(&zstream, Z_FINISH);
-+
-+	if (ret != Z_STREAM_END) {
-+		g_warning("zlib decompression failed. zlib error code: %d", ret);
-+		g_free(decompress_buf);
-+		return NULL;
-+	}
-+
-+	interface = glade_parser_parse_buffer_internal(decompress_buf, decompress_len, domain);
-+
-+	g_free(decompress_buf);
-+
-+	return interface;
-+}
-+
-+GladeInterface *
-+glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain)
-+{
-+	g_return_val_if_fail(buffer != NULL, NULL);
-+	g_return_val_if_fail(len > 0, NULL);
-+
-+	/* Check if buffer is gzipped */
-+	if (buffer[0] == 0x1f && buffer[1] == (gchar)0x8b) {
-+		return glade_parser_parse_gzipped_buffer(buffer, len, domain);
-+	}
-+
-+	/* Buffer is cleartext. */
-+	return glade_parser_parse_buffer_internal(buffer, len, domain);
-+}
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- dump_widget(xmlNode *parent, GladeWidgetInfo *info, gint indent)
- {
-@@ -1382,6 +1674,8 @@
- 	xmlNodeAddContent(widget, "  ");
- }
- 
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
- /**
-  * glade_interface_dump
-  * @interface: the GladeInterface
-@@ -1390,6 +1684,9 @@
-  * This function dumps the contents of a GladeInterface into a file as
-  * XML.  It is intended mainly as a debugging tool.
-  */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- void
- glade_interface_dump(GladeInterface *interface, const gchar *filename)
- {
-@@ -1428,6 +1725,17 @@
-     xmlFreeDoc(doc);
- }
- 
-+#else /* defined(USE_GMARKUP_PARSER) */
-+
-+void
-+glade_interface_dump(GladeInterface *interface, const gchar *filename)
-+{
-+    g_warning("glade_interface_dump() is only available with libxml2.");
-+}
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
-+
- #if 0
- int
- main(int argc, char **argv) {
-diff -urN libglade-2.4.2.orig/libglade-2.0.pc.in libglade-2.4.2/libglade-2.0.pc.in
---- libglade-2.4.2.orig/libglade-2.0.pc.in	2001-12-12 15:28:23.000000000 +0100
-+++ libglade-2.4.2/libglade-2.0.pc.in	2005-03-22 01:20:00.000000000 +0100
-@@ -11,7 +11,7 @@
- Name: Libglade
- Description: a library for dynamically loading GLADE interface files
- Version: @VERSION@
--Requires: gtk+-2.0 libxml-2.0
-+Requires: gtk+-2.0 @PKGCFG_REQUIRE_LIBXML2@
- Libs: -L${libdir} -lglade-2.0
- Cflags: -I${includedir}/libglade-2.0
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/python_environment.patch b/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/python_environment.patch
deleted file mode 100644
index b5b2ec4..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade-2.6.4/python_environment.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Using @PYTHON@ for this path would result in the build system python being 
-referred to. Instead we want to locate python from the environment.
-
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN libglade-2.6.4-orig//libglade-convert.in libglade-2.6.4/libglade-convert.in
---- libglade-2.6.4-orig//libglade-convert.in	2011-09-22 10:18:28.991164003 +0800
-+++ libglade-2.6.4/libglade-convert.in	2011-09-22 10:18:55.431164003 +0800
-@@ -1,4 +1,4 @@
--#!@PYTHON@
-+#!/usr/bin/env python
- # -*- mode: python -*-
- 
- # yes, this requires python 2.x and an XML parser module (eg. PyExpat)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade_2.6.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade_2.6.4.bb
deleted file mode 100644
index fdb9f8a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libglade/libglade_2.6.4.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Runtime support for the GTK+ interface builder"
-HOMEPAGE = "http://library.gnome.org/devel/libglade/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
-                    file://glade/glade.h;endline=22;md5=a04f461c964ba4b57a172d1fbcd8f8fc \
-                    file://glade/glade-gtk.c;endline=22;md5=766f993433e2642fec87936d319990ff"
-
-SECTION = "libs"
-PR = "r5"
-DEPENDS = "zlib gdk-pixbuf gtk+"
-
-inherit autotools pkgconfig gnomebase gtk-doc distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-GNOME_COMPRESS_TYPE="bz2"
-
-SRC_URI += " \
-    file://glade-cruft.patch \
-    file://no-xml2.patch \
-    file://python_environment.patch \
-    file://0001-configure.in-remove-deprecated-GNOME_COMMON_INIT.patch \
-"
-
-SRC_URI[archive.md5sum] = "d1776b40f4e166b5e9c107f1c8fe4139"
-SRC_URI[archive.sha256sum] = "64361e7647839d36ed8336d992fd210d3e8139882269bed47dc4674980165dec"
-
-EXTRA_OECONF += "--without-libxml2 --disable-gtk-doc"
-
-CFLAGS += "-lz -lgmodule-2.0"
-
-PACKAGES += " ${PN}-data"
-FILES_${PN} = "${libdir}/lib*.so.*"
-FILES_${PN}-data = "${datadir}/xml/libglade/glade-2.0.dtd"
-FILES_${PN}-dev += "${bindir}/libglade-convert"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique_1.1.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique_1.1.6.bb
deleted file mode 100644
index 9133ccc..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique_1.1.6.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Library for supporting single instance GTK+ applications"
-DESCRIPTION = "Unique is a library for writing single instance GTK+ applications. If you launch a single instance application twice, the second instance will either just quit or will send a message to the running instance."
-HOMEPAGE = "https://wiki.gnome.org/Attic/LibUnique"
-BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=libunique"
-
-SRC_URI = "${GNOME_MIRROR}/libunique/1.1/libunique-${PV}.tar.bz2 \
-           file://fix_for_compile_with_gcc-4.6.0.patch \
-           file://noconst.patch \
-           file://build.patch \
-           file://0001-Makefile.am-use-LIBTOOL-instead-of-hardcoded-libtool.patch \
-           file://0001-test-unique-Add-format-qualifier-s-for-string.patch \
-           "
-
-SRC_URI[md5sum] = "7955769ef31f1bc4f83446dbb3625e6d"
-SRC_URI[sha256sum] = "e5c8041cef8e33c55732f06a292381cb345db946cf792a4ae18aa5c66cdd4fbb"
-
-PR = "r7"
-
-DEPENDS = "dbus-glib-native glib-2.0 gtk+"
-
-PACKAGECONFIG ??= "dbus"
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus dbus-glib"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-
-inherit autotools pkgconfig gobject-introspection distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc b/import-layers/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc
index bfbd9c2..bd66a28 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/directfb/directfb.inc
@@ -41,16 +41,16 @@
 PACKAGECONFIG[tslib] = "--with-inputdrivers=tslib,,tslib"
 PACKAGECONFIG[linuxinput] = "--with-inputdrivers=linuxinput,,"
 PACKAGECONFIG[noinput] = "--with-inputdrivers=none,,"
+PACKAGECONFIG[mesa] = "--enable-mesa,--disable-mesa,virtual/mesa,"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,xserver-xorg,"
 
 EXTRA_OECONF = "\
   --with-gfxdrivers=none \
   --enable-freetype=yes \
   --enable-zlib \
   --disable-imlib2 \
-  --disable-mesa \
   --disable-sdl \
   --disable-vnc \
-  --disable-x11 \
   --disable-x11vdpau \
   --disable-xine-vdpau \
 "
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 0000000..46d4dbd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,26 @@
+From 80179c297abb9de2829bd02356257241dd414d70 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Mon, 18 Dec 2017 16:25:54 +0900
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python.
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c66b39..1489ef6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,7 +19,7 @@ else(NOT SPHINX_EXECUTABLE-NOTFOUND)
+ 	message(STATUS "Could NOT find sphinx-build.")
+ endif(NOT SPHINX_EXECUTABLE-NOTFOUND)
+ 
+-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(), end='')" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(), end='')" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ string(REGEX REPLACE "\n$" "" ${PYTHON_INSTALL_DIR} "${PYTHON_INSTALL_DIR}")
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write('%s.%s' % (sys.version_info.major, sys.version_info.minor))" OUTPUT_VARIABLE PYTHON_MAJOR_DOT_MINOR_VERSION)
+ message(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-Run-python-scripts-using-env.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-Run-python-scripts-using-env.patch
new file mode 100644
index 0000000..75b6b8f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-Run-python-scripts-using-env.patch
@@ -0,0 +1,25 @@
+From 15d0afcfa4868b7b072b3434bac0064617d61f99 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Tue, 19 Dec 2017 14:53:14 +0900
+Subject: [PATCH] Run python scripts using env
+
+Otherwise the build tools hardcode the python path into them.
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ bin/dnfdragora | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/dnfdragora b/bin/dnfdragora
+index b8e0550..cd80f7f 100755
+--- a/bin/dnfdragora
++++ b/bin/dnfdragora
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/env python3
+ # vim: set et ts=4 sw=4:
+ #    Copyright 2016-2017 Angelo Naselli <anaselli@linux.it>
+ #
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-To-fix-error-when-do_package.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-To-fix-error-when-do_package.patch
new file mode 100644
index 0000000..90ce1d0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-To-fix-error-when-do_package.patch
@@ -0,0 +1,31 @@
+From 56d9b838b3475729d7ed9c6c156d72c28943c2b6 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Tue, 19 Dec 2017 11:15:29 +0900
+Subject: [PATCH] To fix error when do_package
+
+QA Issue: nativesdk-dnfdragora: Files/directories were installed but not shipped in any package:
+  /etc
+  /etc/dnfdragora
+  /etc/dnfdragora/dnfdragora.yaml
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c66b39..a5659f7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -52,7 +52,7 @@ endif(ENABLE_COMPS)
+ set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
+ set(CMAKE_INSTALL_DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share")
+ set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
+-set(CMAKE_INSTALL_FULL_SYSCONFDIR "/etc")
++set(CMAKE_INSTALL_FULL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/../etc")
+ 
+ # Configure files
+ configure_file(${CMAKE_SOURCE_DIR}/etc/dnfdragora.yaml.in ${CMAKE_BINARY_DIR}/etc/dnfdragora.yaml @ONLY)
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-disable-build-manpages.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-disable-build-manpages.patch
new file mode 100644
index 0000000..88bb634
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora/0001-disable-build-manpages.patch
@@ -0,0 +1,25 @@
+From 2e6a0db24be373a5b7741dc5a0d322a28389fbf0 Mon Sep 17 00:00:00 2001
+From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+Date: Thu, 23 Nov 2017 16:35:44 +0900
+Subject: [PATCH] disable build manpages.
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c66b39..fc32750 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -65,7 +65,6 @@ endif(GETTEXT_FOUND)
+ 
+ # Build and install the man-pages
+ if(NOT SPHINX_EXECUTABLE-NOTFOUND)
+-	add_subdirectory(man)
+ endif(NOT SPHINX_EXECUTABLE-NOTFOUND)
+ 
+ # Installing application code
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb
new file mode 100644
index 0000000..9cd1efb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb
@@ -0,0 +1,30 @@
+SUMMARY = "dnfdragora is a DNF frontend, based on rpmdragora from Mageia (originally rpmdrake) Perl code."
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \
+                   "
+
+SRC_URI = "git://github.com/manatools/dnfdragora.git \
+           file://0001-disable-build-manpages.patch \
+           file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+           file://0001-To-fix-error-when-do_package.patch \
+           file://0001-Run-python-scripts-using-env.patch \
+           "
+
+PV = "1.0.1+git${SRCPV}"
+SRCREV = "4fef4ce889b8e4fa03191d414f63bfd50796152a"
+
+S = "${WORKDIR}/git"
+
+inherit cmake gettext pkgconfig python3-dir python3native distutils3-base
+
+DEPENDS += "dnf python3 "
+#DEPENDS_class-nativesdk += "nativesdk-python3"
+
+RDEPENDS_${PN}_class-target = " python3-core libyui libyui-ncurses "
+
+# manpages generation requires http://www.sphinx-doc.org/
+EXTRA_OECMAKE = " -DWITH_MAN=OFF -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+
+BBCLASSEXTEND = "nativesdk"
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/ ${datadir}/ ${bindir}/ ${sysconfdir}/dnfdragora "
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20170731.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20170731.bb
index d9f0867..481fedf 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20170731.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20170731.bb
@@ -6,7 +6,7 @@
     file://LICENSE;md5=3f922b42ed0033fa0fd4cd3268f6429c \
 "
 
-DEPENDS = "glib-2.0 pango giflib tiff libxml2 jpeg python libtool uthash gnulib"
+DEPENDS = "glib-2.0 pango giflib tiff libxml2 jpeg python libtool uthash gnulib gettext-native"
 DEPENDS_append_class-target = " libxi"
 
 inherit autotools pkgconfig pythonnative distro_features_check gettext
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0001-Fix-compilation-for-disabled-gnome.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0001-Fix-compilation-for-disabled-gnome.patch
new file mode 100644
index 0000000..5a76474
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0001-Fix-compilation-for-disabled-gnome.patch
@@ -0,0 +1,69 @@
+From 60c17eb49121bf2aa485acd30750b2fc6c8eb61f Mon Sep 17 00:00:00 2001
+From: Jarmo Jaakkola <jarmo.jaakkola@vincit.fi>
+Date: Mon, 19 Jun 2017 16:41:36 +0300
+Subject: [PATCH] Fix compilation for Helix.
+
+Gnome support, including GNOME_INIT_HOOK, has been removed, but it was
+still being called.
+
+COMPAT_OLD_KEYSYMDEF is a check for a legacy system, which our system
+most definitely is not.  It is accomplished by trying to execute
+a program, which does not work when cross compiling.
+
+The fvwm(1) man page is created from Docbook XML which is set for
+a Windows code page that is not available when compiling.  Easiest is
+to just not create the man page as those are not needed on the monitor.
+
+Upstream-Status: inappropriate [OE specific]
+Signed-off-by: Jarmo Jaakkola <jarmo.jaakkola@vincit.fi>
+Signed-off-by: Riku Hämäläinen <riku.hamalainen@ge.com>
+Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
+---
+ configure.ac         | 20 ++++----------------
+ doc/fvwm/Makefile.am |  2 +-
+ 3 files changed, 7 insertions(+), 17 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 48ce264..fab7b44 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1413,23 +1413,7 @@ else
+   problem_gdkimlib=": Failed on gdk-imlib, see config.log"
+ fi
+ 
+-GNOME_INIT_HOOK
+-
+-# Unfortunately we have 2 gnome supports: WM hints and gnome libs.
+-# The $with_gnomehints below refers to the first, not GNOME_INIT_HOOK.
+-if test ! x"$enable_gnome_hints" = xno; then
+-  with_gnomehints=yes
+-  problem_gnomehints=""
+-else
+-  with_gnomehints=no
+-  problem_gnomehints=": Explicitly disabled"
+-fi
+-
+ # Define some compatibility macros needed for config.h.
+-mg_DEFINE_IF_NOT([#include <X11/keysym.h>],
+-  [defined XK_Page_Up && defined XK_Page_Down],
+-  [COMPAT_OLD_KEYSYMDEF], [$X_CFLAGS],
+-  [Old AIX systems (3.2.5) don't define some common keysyms.])
+ AH_VERBATIM([_COMPAT_OLD_KEYSYMDEF],
+ [#ifdef COMPAT_OLD_KEYSYMDEF
+ #  define XK_Page_Up   XK_Prior
+diff --git a/doc/fvwm/Makefile.am b/doc/fvwm/Makefile.am
+index cddb102..ff00149 100755
+--- a/doc/fvwm/Makefile.am
++++ b/doc/fvwm/Makefile.am
+@@ -10,7 +10,7 @@ XSL_PROFILE = $(srcdir)/../docbook-xsl/profiling/profile.xsl
+ HTML_FILES = fvwm.man.html
+ XML_FILES = @DOC_SECTIONS_XML_PATH@
+ EXTRA_DIST = @DOC_SECTIONS_XML@ $(man_MANS) sections
+-man_MANS = fvwm.1
++man_MANS =
+ 
+ if FVWM_BUILD_HTMLDOC
+ doc_DATA = $(HTML_FILES)
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0002-Avoid-absolute-symlinks.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0002-Avoid-absolute-symlinks.patch
new file mode 100644
index 0000000..756cc86
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm/0002-Avoid-absolute-symlinks.patch
@@ -0,0 +1,27 @@
+From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
+Date: Tue, 29 Auf 2017 16:08:42 +0200
+Subject: [PATCH] Avoid absolute symlinks
+
+Avoid usage of absolute symlinks, which breaks yocto builds
+since pyro.
+
+Upstream-Status: Pending
+Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
+
+diff --git a/default-config/Makefile.am b/default-config/Makefile.am
+index 5e16d095a137..5404145a742c 100644
+--- a/default-config/Makefile.am
++++ b/default-config/Makefile.am
+@@ -17,9 +17,9 @@ EXTRA_DIST  = images \
+ 
+ install-data-hook:
+ 	cp -r $(srcdir)/images $(inst_location)
+-	ln -sf $(inst_location)/FvwmScript-DateTime $(inst_location)/..
+-	ln -sf $(inst_location)/FvwmScript-ConfirmQuit $(inst_location)/..
+-	ln -sf $(inst_location)/FvwmScript-ConfirmCopyConfig $(inst_location)/..
++	ln -sf default-config/FvwmScript-DateTime $(inst_location)/..
++	ln -sf default-config/FvwmScript-ConfirmQuit $(inst_location)/..
++	ln -sf default-config/FvwmScript-ConfirmCopyConfig $(inst_location)/..
+ 
+ uninstall-hook:
+ 	rm -fr $(DESTDIR)/$(configdir)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm_2.6.7.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm_2.6.7.bb
new file mode 100644
index 0000000..cb851bf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/fvwm/fvwm_2.6.7.bb
@@ -0,0 +1,114 @@
+SUMMARY = "F Virtual Window Manager "
+HOMEPAGE = "http://www.fvwm.org/"
+SECTION = "x11/wm"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=363fbcfb59124689af72c914560eaf6e"
+
+DEPENDS = " \
+    bison-native \
+    flex-native \
+    freetype-native \
+    gettext-native \
+    libxslt-native \
+    fontconfig \
+    libice \
+    libpng \
+    librsvg \
+    libsm \
+    libxau \
+    libxcb \
+    libxcursor \
+    libxdmcp \
+    libxext \
+    libxfixes \
+    libxft \
+    libxinerama \
+    libxml2 \
+    libxrender \
+    libxt \
+    virtual/libx11 \
+    xrandr \
+    zlib \
+"
+
+PV = "2.6.7+git${SRCPV}"
+
+SRC_URI = " \
+    git://github.com/fvwmorg/fvwm.git;protocol=https \
+    file://0001-Fix-compilation-for-disabled-gnome.patch \
+    file://0002-Avoid-absolute-symlinks.patch \
+"
+
+SRCREV = "597a4e296da4f21e71a17facab297e016a3a80a8"
+
+S = "${WORKDIR}/git"
+
+inherit autotools gettext update-alternatives pkgconfig pythonnative perlnative distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+ALTERNATIVE_${PN} = "x-window-manager"
+ALTERNATIVE_TARGET[x-window-manager] = "${bindir}/fvwm"
+ALTERNATIVE_PRIORITY[x-window-manager] = "20"
+
+EXTRA_OECONF = " \
+    --disable-bidi \
+    --disable-fontconfigtest \
+    --disable-freetypetest \
+    --disable-htmldoc \
+    --disable-imlibtest \
+    --disable-mandoc \
+    --disable-nls \
+    --disable-perllib \
+    --disable-rsvg \
+    --disable-shape \
+    --disable-sm \
+    --disable-xfttest \
+    --with-imlib-exec-prefix=/nonexistent \
+    --with-imlib-prefix=/nonexistent \
+    --without-ncurses-library \
+    --without-readline-library \
+    --without-rplay-library \
+    --without-stroke-library \
+    --without-termcap-library \
+    --without-xpm-library \
+    ac_cv_func_mkstemp=no \
+    has_safety_mkstemp=yes \
+"
+
+# show the exact commands in the log file
+EXTRA_OEMAKE = " \
+    V=1 \
+"
+
+do_install_append() {
+    install -d -m 0755 ${D}/${sysconfdir}/xdg/fvwm
+    # You can install the config file here
+
+    install -d -m 0755 ${D}/${datadir}/fvwm
+    touch ${D}/${datadir}/fvwm/ConfigFvwmDefaults
+}
+
+# the only needed packages (note: locale packages are automatically generated
+# as well)
+PACKAGES = " \
+    ${PN} \
+    ${PN}-dbg \
+"
+
+# minimal set of binaries
+FILES_${PN} = " \
+    ${bindir}/fvwm \
+    ${bindir}/fvwm-root \
+    ${datadir}/fvwm/ConfigFvwmDefaults \
+"
+
+RDEPENDS_${PN} = " \
+    xuser-account \
+"
+
+# by default a lot of stuff is installed and it's not easy to control what to
+# install, so install everything, but skip the check
+INSANE_SKIP_${PN} = " \
+    installed-vs-shipped \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gegl/gegl_0.3.18.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gegl/gegl_0.3.18.bb
index 6cc20f5..0053c0c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gegl/gegl_0.3.18.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gegl/gegl_0.3.18.bb
@@ -5,7 +5,9 @@
 
 EXTRA_OECONF = "--disable-docs"
 
-inherit gnomebase vala gobject-introspection
+inherit distro_features_check gnomebase vala gobject-introspection
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[jasper] = "--with-jasper,--without-jasper,jasper"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gimp/gimp_2.8.22.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gimp/gimp_2.8.22.bb
index cd7e27a..943986e 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gimp/gimp_2.8.22.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gimp/gimp_2.8.22.bb
@@ -24,7 +24,9 @@
 "
 DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxmu libxpm', '', d)}"
 
-inherit gnome gtk-doc
+inherit distro_features_check gnome gtk-doc
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://ftp.gimp.org/pub/gimp/v2.8/gimp-${PV}.tar.bz2 \
            file://0001-configure-ac-do-not-check-for-freetype-config.patch \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/files/0001-Make-GLM_ENABLE_EXPERIMENTAL-a-configurable-option.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/files/0001-Make-GLM_ENABLE_EXPERIMENTAL-a-configurable-option.patch
new file mode 100644
index 0000000..d69c5af
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/files/0001-Make-GLM_ENABLE_EXPERIMENTAL-a-configurable-option.patch
@@ -0,0 +1,860 @@
+From 99a9676a0193f6291d7202d7af72e24580abe565 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Fri, 16 Mar 2018 13:55:29 +0100
+Subject: [PATCH 1/2] Make GLM_ENABLE_EXPERIMENTAL a configurable option
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It seems that erroring out if GLM_ENABLE_EXPERIMENTAL is not set turns into
+packagers nightmare: There are packages around expecting glx headers. E.g
+libgltf [1] fails during configure checking for usable headers AND during
+compile. Paticularly fixing configure for those packages is time-consuming:
+The only way (correct me if I am wrong) is creating a patch adding
+
+AC_DEFINE([GLM_ENABLE_EXPERIMENTAL], [1], [glm needs this for gtx headers])
+
+By adding a configure option 'GLM_ENABLE_EXPERIMENTAL', the decision to use
+glm/glx is done at one (and the right) place.
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+
+[1] https://gerrit.libreoffice.org/gitweb?p=libgltf.git
+
+Uptream-Status: Submitted [2]
+
+[2] https://github.com/g-truc/glm/pull/741
+---
+ CMakeLists.txt                      | 6 ++++++
+ glm/CMakeLists.txt                  | 2 ++
+ glm/experimental.hpp.in             | 1 +
+ glm/ext.hpp                         | 1 +
+ glm/gtx/associated_min_max.hpp      | 1 +
+ glm/gtx/bit.hpp                     | 1 +
+ glm/gtx/closest_point.hpp           | 1 +
+ glm/gtx/color_space.hpp             | 1 +
+ glm/gtx/color_space_YCoCg.hpp       | 1 +
+ glm/gtx/common.hpp                  | 1 +
+ glm/gtx/compatibility.hpp           | 1 +
+ glm/gtx/component_wise.hpp          | 1 +
+ glm/gtx/dual_quaternion.hpp         | 1 +
+ glm/gtx/euler_angles.hpp            | 1 +
+ glm/gtx/extend.hpp                  | 1 +
+ glm/gtx/extended_min_max.hpp        | 1 +
+ glm/gtx/fast_exponential.hpp        | 1 +
+ glm/gtx/fast_square_root.hpp        | 1 +
+ glm/gtx/fast_trigonometry.hpp       | 1 +
+ glm/gtx/gradient_paint.hpp          | 1 +
+ glm/gtx/handed_coordinate_space.hpp | 1 +
+ glm/gtx/hash.hpp                    | 1 +
+ glm/gtx/integer.hpp                 | 1 +
+ glm/gtx/intersect.hpp               | 1 +
+ glm/gtx/io.hpp                      | 1 +
+ glm/gtx/log_base.hpp                | 1 +
+ glm/gtx/matrix_cross_product.hpp    | 1 +
+ glm/gtx/matrix_decompose.hpp        | 1 +
+ glm/gtx/matrix_factorisation.hpp    | 1 +
+ glm/gtx/matrix_interpolation.hpp    | 1 +
+ glm/gtx/matrix_major_storage.hpp    | 1 +
+ glm/gtx/matrix_operation.hpp        | 1 +
+ glm/gtx/matrix_query.hpp            | 1 +
+ glm/gtx/matrix_transform_2d.hpp     | 1 +
+ glm/gtx/mixed_product.hpp           | 1 +
+ glm/gtx/norm.hpp                    | 1 +
+ glm/gtx/normal.hpp                  | 1 +
+ glm/gtx/normalize_dot.hpp           | 1 +
+ glm/gtx/number_precision.hpp        | 1 +
+ glm/gtx/optimum_pow.hpp             | 1 +
+ glm/gtx/orthonormalize.hpp          | 1 +
+ glm/gtx/perpendicular.hpp           | 1 +
+ glm/gtx/polar_coordinates.hpp       | 1 +
+ glm/gtx/projection.hpp              | 1 +
+ glm/gtx/quaternion.hpp              | 1 +
+ glm/gtx/range.hpp                   | 1 +
+ glm/gtx/raw_data.hpp                | 1 +
+ glm/gtx/rotate_normalized_axis.hpp  | 1 +
+ glm/gtx/rotate_vector.hpp           | 1 +
+ glm/gtx/scalar_multiplication.hpp   | 1 +
+ glm/gtx/scalar_relational.hpp       | 1 +
+ glm/gtx/spline.hpp                  | 1 +
+ glm/gtx/std_based_type.hpp          | 1 +
+ glm/gtx/string_cast.hpp             | 1 +
+ glm/gtx/texture.hpp                 | 1 +
+ glm/gtx/transform.hpp               | 1 +
+ glm/gtx/transform2.hpp              | 1 +
+ glm/gtx/type_aligned.hpp            | 1 +
+ glm/gtx/type_trait.hpp              | 1 +
+ glm/gtx/vec_swizzle.hpp             | 1 +
+ glm/gtx/vector_angle.hpp            | 1 +
+ glm/gtx/vector_query.hpp            | 1 +
+ glm/gtx/wrap.hpp                    | 1 +
+ 63 files changed, 69 insertions(+)
+ create mode 100644 glm/experimental.hpp.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e5159b0f..bd4dd654 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -82,6 +82,11 @@ option(GLM_TEST_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF)
+ option(GLM_TEST_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF)
+ option(GLM_TEST_FORCE_PURE "Force 'pure' instructions" OFF)
+ 
++option(GLM_ENABLE_EXPERIMENTAL "Enable experimental GLM_GTX" OFF)
++configure_file(glm/experimental.hpp.in experimental.hpp @ONLY)
++include_directories(${CMAKE_BINARY_DIR}/glm)
++include_directories(${CMAKE_BINARY_DIR})
++
+ if(GLM_TEST_FORCE_PURE)
+ 	add_definitions(-DGLM_FORCE_PURE)
+ 
+@@ -167,6 +172,7 @@ option(GLM_INSTALL_ENABLE "GLM install" ON)
+ set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
+ if (GLM_INSTALL_ENABLE)
+ 	install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++	install(FILES "${CMAKE_CURRENT_BINARY_DIR}/experimental.hpp" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glm)
+ endif()
+ 
+ write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion)
+diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt
+index df9c9ee5..dc5db4bc 100644
+--- a/glm/CMakeLists.txt
++++ b/glm/CMakeLists.txt
+@@ -43,6 +43,8 @@ source_group("SIMD Files" FILES ${SIMD_INLINE})
+ source_group("SIMD Files" FILES ${SIMD_HEADER})
+ 
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
++# make out-of tree builds find experimental.hpp
++include_directories(${CMAKE_BINARY_DIR}/glm)
+ 
+ if(GLM_STATIC_LIBRARY_ENABLE OR GLM_DYNAMIC_LIBRARY_ENABLE)
+ 	if(GLM_STATIC_LIBRARY_ENABLE)
+diff --git a/glm/experimental.hpp.in b/glm/experimental.hpp.in
+new file mode 100644
+index 00000000..bfab5138
+--- /dev/null
++++ b/glm/experimental.hpp.in
+@@ -0,0 +1 @@
++#cmakedefine GLM_ENABLE_EXPERIMENTAL
+diff --git a/glm/ext.hpp b/glm/ext.hpp
+index d085bfd5..a2948447 100644
+--- a/glm/ext.hpp
++++ b/glm/ext.hpp
+@@ -39,6 +39,7 @@
+ #	include "./gtc/type_aligned.hpp"
+ #endif
+ 
++#include "experimental.hpp"
+ #ifdef GLM_ENABLE_EXPERIMENTAL
+ #include "./gtx/associated_min_max.hpp"
+ #include "./gtx/bit.hpp"
+diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp
+index 0c9935f3..d00c2bc4 100644
+--- a/glm/gtx/associated_min_max.hpp
++++ b/glm/gtx/associated_min_max.hpp
+@@ -16,6 +16,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GTX_associated_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/bit.hpp b/glm/gtx/bit.hpp
+index 1447fa00..31957083 100644
+--- a/glm/gtx/bit.hpp
++++ b/glm/gtx/bit.hpp
+@@ -15,6 +15,7 @@
+ // Dependencies
+ #include "../gtc/bitfield.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_bit is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp
+index 6859bb96..ebd9fe5a 100644
+--- a/glm/gtx/closest_point.hpp
++++ b/glm/gtx/closest_point.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp
+index d1e655c3..51416819 100644
+--- a/glm/gtx/color_space.hpp
++++ b/glm/gtx/color_space.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_color_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp
+index e82cbd8b..7ae71041 100644
+--- a/glm/gtx/color_space_YCoCg.hpp
++++ b/glm/gtx/color_space_YCoCg.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_color_space_YCoCg is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/common.hpp b/glm/gtx/common.hpp
+index 8081bff7..57a68a8d 100644
+--- a/glm/gtx/common.hpp
++++ b/glm/gtx/common.hpp
+@@ -18,6 +18,7 @@
+ #include "../vec4.hpp"
+ #include "../gtc/vec1.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_common is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp
+index e5b60399..9876669c 100644
+--- a/glm/gtx/compatibility.hpp
++++ b/glm/gtx/compatibility.hpp
+@@ -16,6 +16,7 @@
+ #include "../glm.hpp"
+ #include "../gtc/quaternion.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_compatibility is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/component_wise.hpp b/glm/gtx/component_wise.hpp
+index 39bab5d5..4fe0e4e2 100644
+--- a/glm/gtx/component_wise.hpp
++++ b/glm/gtx/component_wise.hpp
+@@ -18,6 +18,7 @@
+ #include "../detail/setup.hpp"
+ #include "../detail/qualifier.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_component_wise is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp
+index c4343e9d..d59fb459 100644
+--- a/glm/gtx/dual_quaternion.hpp
++++ b/glm/gtx/dual_quaternion.hpp
+@@ -20,6 +20,7 @@
+ #include "../gtc/constants.hpp"
+ #include "../gtc/quaternion.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_dual_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp
+index e66e9281..ad5988c1 100644
+--- a/glm/gtx/euler_angles.hpp
++++ b/glm/gtx/euler_angles.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_euler_angles is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp
+index eda4e470..cde6db63 100644
+--- a/glm/gtx/extend.hpp
++++ b/glm/gtx/extend.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/extended_min_max.hpp b/glm/gtx/extended_min_max.hpp
+index 3e767b0c..0bcffcc6 100644
+--- a/glm/gtx/extended_min_max.hpp
++++ b/glm/gtx/extended_min_max.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_extented_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/fast_exponential.hpp b/glm/gtx/fast_exponential.hpp
+index 2d4918e7..e6d11f0a 100644
+--- a/glm/gtx/fast_exponential.hpp
++++ b/glm/gtx/fast_exponential.hpp
+@@ -16,6 +16,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_fast_exponential is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/fast_square_root.hpp b/glm/gtx/fast_square_root.hpp
+index 1e1ec3cf..f758aeef 100644
+--- a/glm/gtx/fast_square_root.hpp
++++ b/glm/gtx/fast_square_root.hpp
+@@ -19,6 +19,7 @@
+ #include "../exponential.hpp"
+ #include "../geometric.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_fast_square_root is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/fast_trigonometry.hpp b/glm/gtx/fast_trigonometry.hpp
+index 739065fb..f1332958 100644
+--- a/glm/gtx/fast_trigonometry.hpp
++++ b/glm/gtx/fast_trigonometry.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../gtc/constants.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_fast_trigonometry is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/gradient_paint.hpp b/glm/gtx/gradient_paint.hpp
+index 2713cec0..d4703991 100644
+--- a/glm/gtx/gradient_paint.hpp
++++ b/glm/gtx/gradient_paint.hpp
+@@ -17,6 +17,7 @@
+ #include "../glm.hpp"
+ #include "../gtx/optimum_pow.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_gradient_paint is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp
+index 1d0d4104..3a52ddcf 100644
+--- a/glm/gtx/handed_coordinate_space.hpp
++++ b/glm/gtx/handed_coordinate_space.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_handed_coordinate_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/hash.hpp b/glm/gtx/hash.hpp
+index fe8a3efd..92bfc9b2 100644
+--- a/glm/gtx/hash.hpp
++++ b/glm/gtx/hash.hpp
+@@ -12,6 +12,7 @@
+ 
+ #pragma once
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_hash is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/integer.hpp b/glm/gtx/integer.hpp
+index 96637a13..5d1a16c6 100644
+--- a/glm/gtx/integer.hpp
++++ b/glm/gtx/integer.hpp
+@@ -16,6 +16,7 @@
+ #include "../glm.hpp"
+ #include "../gtc/integer.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_integer is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp
+index 61e2226a..4895ba93 100644
+--- a/glm/gtx/intersect.hpp
++++ b/glm/gtx/intersect.hpp
+@@ -21,6 +21,7 @@
+ #include "../gtx/closest_point.hpp"
+ #include "../gtx/vector_query.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/io.hpp b/glm/gtx/io.hpp
+index 49a1ec11..ae39cd60 100644
+--- a/glm/gtx/io.hpp
++++ b/glm/gtx/io.hpp
+@@ -23,6 +23,7 @@
+ #include "../glm.hpp"
+ #include "../gtx/quaternion.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_io is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/log_base.hpp b/glm/gtx/log_base.hpp
+index e873e356..45b8d53c 100644
+--- a/glm/gtx/log_base.hpp
++++ b/glm/gtx/log_base.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_log_base is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp
+index 967743b8..52d6c173 100644
+--- a/glm/gtx/matrix_cross_product.hpp
++++ b/glm/gtx/matrix_cross_product.hpp
+@@ -16,6 +16,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_cross_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_decompose.hpp b/glm/gtx/matrix_decompose.hpp
+index b7ec0e83..6793fee2 100644
+--- a/glm/gtx/matrix_decompose.hpp
++++ b/glm/gtx/matrix_decompose.hpp
+@@ -20,6 +20,7 @@
+ #include "../gtc/quaternion.hpp"
+ #include "../gtc/matrix_transform.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_decompose is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_factorisation.hpp b/glm/gtx/matrix_factorisation.hpp
+index e30a7746..79c293be 100644
+--- a/glm/gtx/matrix_factorisation.hpp
++++ b/glm/gtx/matrix_factorisation.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_factorisation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp
+index 89c4596c..799983bb 100644
+--- a/glm/gtx/matrix_interpolation.hpp
++++ b/glm/gtx/matrix_interpolation.hpp
+@@ -16,6 +16,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_interpolation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp
+index 7f264a59..e68467cd 100644
+--- a/glm/gtx/matrix_major_storage.hpp
++++ b/glm/gtx/matrix_major_storage.hpp
+@@ -16,6 +16,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_major_storage is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp
+index bce938bb..1e85bb5e 100644
+--- a/glm/gtx/matrix_operation.hpp
++++ b/glm/gtx/matrix_operation.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_operation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp
+index 5df5f52f..eec1eec0 100644
+--- a/glm/gtx/matrix_query.hpp
++++ b/glm/gtx/matrix_query.hpp
+@@ -18,6 +18,7 @@
+ #include "../gtx/vector_query.hpp"
+ #include <limits>
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_query is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/matrix_transform_2d.hpp b/glm/gtx/matrix_transform_2d.hpp
+index 239ab9f4..3ca8d2f2 100644
+--- a/glm/gtx/matrix_transform_2d.hpp
++++ b/glm/gtx/matrix_transform_2d.hpp
+@@ -17,6 +17,7 @@
+ #include "../mat3x3.hpp"
+ #include "../vec2.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_matrix_transform_2d is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp
+index 58562aab..5c7460d5 100644
+--- a/glm/gtx/mixed_product.hpp
++++ b/glm/gtx/mixed_product.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_mixed_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/norm.hpp b/glm/gtx/norm.hpp
+index 46474e07..3cf2c3ea 100644
+--- a/glm/gtx/norm.hpp
++++ b/glm/gtx/norm.hpp
+@@ -17,6 +17,7 @@
+ #include "../geometric.hpp"
+ #include "../gtx/quaternion.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_norm is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp
+index 15cec9c2..7bb4c096 100644
+--- a/glm/gtx/normal.hpp
++++ b/glm/gtx/normal.hpp
+@@ -16,6 +16,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_normal is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/normalize_dot.hpp b/glm/gtx/normalize_dot.hpp
+index 86048e70..c6604da4 100644
+--- a/glm/gtx/normalize_dot.hpp
++++ b/glm/gtx/normalize_dot.hpp
+@@ -16,6 +16,7 @@
+ // Dependency:
+ #include "../gtx/fast_square_root.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_normalize_dot is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/number_precision.hpp b/glm/gtx/number_precision.hpp
+index 3732a56c..b48845f7 100644
+--- a/glm/gtx/number_precision.hpp
++++ b/glm/gtx/number_precision.hpp
+@@ -18,6 +18,7 @@
+ #include "../glm.hpp"
+ #include "../gtc/type_precision.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_number_precision is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/optimum_pow.hpp b/glm/gtx/optimum_pow.hpp
+index eb09f1c3..94a6bbb2 100644
+--- a/glm/gtx/optimum_pow.hpp
++++ b/glm/gtx/optimum_pow.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_optimum_pow is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp
+index 2a684ee4..4ff47e53 100644
+--- a/glm/gtx/orthonormalize.hpp
++++ b/glm/gtx/orthonormalize.hpp
+@@ -18,6 +18,7 @@
+ #include "../mat3x3.hpp"
+ #include "../geometric.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_orthonormalize is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/perpendicular.hpp b/glm/gtx/perpendicular.hpp
+index 35601ac7..17251ebe 100644
+--- a/glm/gtx/perpendicular.hpp
++++ b/glm/gtx/perpendicular.hpp
+@@ -17,6 +17,7 @@
+ #include "../glm.hpp"
+ #include "../gtx/projection.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_perpendicular is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp
+index b8421db4..5125215d 100644
+--- a/glm/gtx/polar_coordinates.hpp
++++ b/glm/gtx/polar_coordinates.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_polar_coordinates is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/projection.hpp b/glm/gtx/projection.hpp
+index 9a24abf9..4d5bf76f 100644
+--- a/glm/gtx/projection.hpp
++++ b/glm/gtx/projection.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../geometric.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp
+index c3d99a5c..808ba0fd 100644
+--- a/glm/gtx/quaternion.hpp
++++ b/glm/gtx/quaternion.hpp
+@@ -19,6 +19,7 @@
+ #include "../gtc/quaternion.hpp"
+ #include "../gtx/norm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/range.hpp b/glm/gtx/range.hpp
+index e0ef46af..03c797c3 100644
+--- a/glm/gtx/range.hpp
++++ b/glm/gtx/range.hpp
+@@ -15,6 +15,7 @@
+ // Dependencies
+ #include "../detail/setup.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_range is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/raw_data.hpp b/glm/gtx/raw_data.hpp
+index fb34c8cb..0084fec6 100644
+--- a/glm/gtx/raw_data.hpp
++++ b/glm/gtx/raw_data.hpp
+@@ -16,6 +16,7 @@
+ #include "../detail/setup.hpp"
+ #include "../detail/type_int.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_raw_data is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/rotate_normalized_axis.hpp b/glm/gtx/rotate_normalized_axis.hpp
+index eee90d6e..82612928 100644
+--- a/glm/gtx/rotate_normalized_axis.hpp
++++ b/glm/gtx/rotate_normalized_axis.hpp
+@@ -19,6 +19,7 @@
+ #include "../gtc/epsilon.hpp"
+ #include "../gtc/quaternion.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_rotate_normalized_axis is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/rotate_vector.hpp b/glm/gtx/rotate_vector.hpp
+index c8ace89e..e954b041 100644
+--- a/glm/gtx/rotate_vector.hpp
++++ b/glm/gtx/rotate_vector.hpp
+@@ -17,6 +17,7 @@
+ #include "../glm.hpp"
+ #include "../gtx/transform.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_rotate_vector is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/scalar_multiplication.hpp b/glm/gtx/scalar_multiplication.hpp
+index b73edf67..22baa52a 100644
+--- a/glm/gtx/scalar_multiplication.hpp
++++ b/glm/gtx/scalar_multiplication.hpp
+@@ -16,6 +16,7 @@
+ 
+ #include "../detail/setup.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_scalar_multiplication is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/scalar_relational.hpp b/glm/gtx/scalar_relational.hpp
+index 7fc8c1cc..f21f3b2b 100644
+--- a/glm/gtx/scalar_relational.hpp
++++ b/glm/gtx/scalar_relational.hpp
+@@ -15,6 +15,7 @@
+ // Dependency:
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp
+index f96d7e07..76359cfd 100644
+--- a/glm/gtx/spline.hpp
++++ b/glm/gtx/spline.hpp
+@@ -16,6 +16,7 @@
+ #include "../glm.hpp"
+ #include "../gtx/optimum_pow.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_spline is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/std_based_type.hpp b/glm/gtx/std_based_type.hpp
+index 55a2f074..92532b9e 100644
+--- a/glm/gtx/std_based_type.hpp
++++ b/glm/gtx/std_based_type.hpp
+@@ -17,6 +17,7 @@
+ #include "../glm.hpp"
+ #include <cstdlib>
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_std_based_type is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp
+index 4b4e280f..dfcd5085 100644
+--- a/glm/gtx/string_cast.hpp
++++ b/glm/gtx/string_cast.hpp
+@@ -24,6 +24,7 @@
+ #include <string>
+ #include <cmath>
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_string_cast is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/texture.hpp b/glm/gtx/texture.hpp
+index 312bf398..7af185f6 100644
+--- a/glm/gtx/texture.hpp
++++ b/glm/gtx/texture.hpp
+@@ -17,6 +17,7 @@
+ #include "../gtc/integer.hpp"
+ #include "../gtx/component_wise.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_texture is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp
+index d23b99ce..5a5d9619 100644
+--- a/glm/gtx/transform.hpp
++++ b/glm/gtx/transform.hpp
+@@ -19,6 +19,7 @@
+ #include "../glm.hpp"
+ #include "../gtc/matrix_transform.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_transform is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp
+index 85f5bea4..5d7c83fc 100644
+--- a/glm/gtx/transform2.hpp
++++ b/glm/gtx/transform2.hpp
+@@ -17,6 +17,7 @@
+ #include "../glm.hpp"
+ #include "../gtx/transform.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_transform2 is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/type_aligned.hpp b/glm/gtx/type_aligned.hpp
+index 6ff9f276..6ad92fad 100644
+--- a/glm/gtx/type_aligned.hpp
++++ b/glm/gtx/type_aligned.hpp
+@@ -18,6 +18,7 @@
+ // Dependency:
+ #include "../gtc/type_precision.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_type_aligned is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/type_trait.hpp b/glm/gtx/type_trait.hpp
+index 637bbd19..65519cab 100644
+--- a/glm/gtx/type_trait.hpp
++++ b/glm/gtx/type_trait.hpp
+@@ -12,6 +12,7 @@
+ 
+ #pragma once
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_type_trait is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/vec_swizzle.hpp b/glm/gtx/vec_swizzle.hpp
+index daebac38..13d523dc 100644
+--- a/glm/gtx/vec_swizzle.hpp
++++ b/glm/gtx/vec_swizzle.hpp
+@@ -14,6 +14,7 @@
+ 
+ #include "../glm.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_vec_swizzle is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp
+index 401a47eb..98c9d110 100644
+--- a/glm/gtx/vector_angle.hpp
++++ b/glm/gtx/vector_angle.hpp
+@@ -20,6 +20,7 @@
+ #include "../gtx/quaternion.hpp"
+ #include "../gtx/rotate_vector.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_vector_angle is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp
+index 6560eaa5..5ab1ffda 100644
+--- a/glm/gtx/vector_query.hpp
++++ b/glm/gtx/vector_query.hpp
+@@ -17,6 +17,7 @@
+ #include <cfloat>
+ #include <limits>
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_vector_query is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+diff --git a/glm/gtx/wrap.hpp b/glm/gtx/wrap.hpp
+index 2c4b55df..5bf26a33 100644
+--- a/glm/gtx/wrap.hpp
++++ b/glm/gtx/wrap.hpp
+@@ -16,6 +16,7 @@
+ #include "../glm.hpp"
+ #include "../gtc/vec1.hpp"
+ 
++#include "../experimental.hpp"
+ #ifndef GLM_ENABLE_EXPERIMENTAL
+ #	error "GLM: GLM_GTX_wrap is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
+ #endif
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/files/0002-glm-install-headers-only.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/files/0002-glm-install-headers-only.patch
new file mode 100644
index 0000000..1be3318
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/files/0002-glm-install-headers-only.patch
@@ -0,0 +1,46 @@
+From 7fdd36d7496238e03e43fcc32839f75588116c5d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Fri, 16 Mar 2018 15:44:48 +0100
+Subject: [PATCH 2/2] glm: install headers only
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Plausibility check in root source path
+
+$ find glm -type f ! -name '*.hpp' ! -name '*.h' ! -name '*.inl'
+glm/detail/glm.cpp
+glm/detail/dummy.cpp
+glm/experimental.hpp.in
+glm/CMakeLists.txt
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+
+Uptream-Status: Submitted [1]
+
+[1] https://github.com/g-truc/glm/pull/741
+---
+ CMakeLists.txt | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bd4dd654..113dd735 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -171,7 +171,12 @@ option(GLM_INSTALL_ENABLE "GLM install" ON)
+ 
+ set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
+ if (GLM_INSTALL_ENABLE)
+-	install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++	install(DIRECTORY glm
++		DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
++		FILES_MATCHING
++			PATTERN "*.h"
++			PATTERN "*.hpp"
++			PATTERN "*.inl")
+ 	install(FILES "${CMAKE_CURRENT_BINARY_DIR}/experimental.hpp" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glm)
+ endif()
+ 
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.8.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.8.5.bb
deleted file mode 100644
index a174f2a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.8.5.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "OpenGL Mathematics Library"
-DESCRIPTION = "OpenGL Mathematics (GLM) is a header only C++ \
-mathematics library for graphics software based on the OpenGL \
-Shading Language (GLSL) specifications."
-HOMEPAGE = "https://glm.g-truc.net"
-BUGTRACKER = "https://github.com/g-truc/glm/issues"
-
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://copying.txt;md5=4431606d144252143c9c3df384a74cad"
-
-SRC_URI = "git://github.com/g-truc/glm;branch=0.9.8"
-SRCREV = "6fa203eeb7fbcbb6f620501fad40359c8a456049"
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-FILES_${PN}-dev += "${libdir}/cmake"
-RDEPENDS_${PN}-dev = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.9-a2.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.9-a2.bb
new file mode 100644
index 0000000..4e2ee23
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/glm/glm_0.9.9-a2.bb
@@ -0,0 +1,28 @@
+SUMMARY = "OpenGL Mathematics Library"
+DESCRIPTION = "OpenGL Mathematics (GLM) is a header only C++ \
+mathematics library for graphics software based on the OpenGL \
+Shading Language (GLSL) specifications."
+HOMEPAGE = "https://glm.g-truc.net"
+BUGTRACKER = "https://github.com/g-truc/glm/issues"
+
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://readme.md;beginline=21;endline=22;md5=3075b5727d36f29edccf97b93e72b790"
+
+SRC_URI = " \
+    git://github.com/g-truc/glm;branch=master \
+    file://0001-Make-GLM_ENABLE_EXPERIMENTAL-a-configurable-option.patch \
+    file://0002-glm-install-headers-only.patch \
+"
+SRCREV = "fcbedf5058ef8613dd02aac62ef00d55dcfeadd7"
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DGLM_ENABLE_EXPERIMENTAL=ON"
+
+FILES_${PN}-dev += "${libdir}/cmake"
+RDEPENDS_${PN}-dev = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2-2.5.8/0001-configure.ac-remove-AM_PO_SUBDIRS.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure.ac-remove-AM_PO_SUBDIRS.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2-2.5.8/0001-configure.ac-remove-AM_PO_SUBDIRS.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure.ac-remove-AM_PO_SUBDIRS.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2-2.5.8/0002-Look-for-popt-with-GP_CHECK_LIBRARY-function.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2/0002-Look-for-popt-with-GP_CHECK_LIBRARY-function.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2-2.5.8/0002-Look-for-popt-with-GP_CHECK_LIBRARY-function.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2/0002-Look-for-popt-with-GP_CHECK_LIBRARY-function.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.14.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.14.bb
new file mode 100644
index 0000000..75ad7f4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.14.bb
@@ -0,0 +1,22 @@
+SUMMARY = "gphoto2 - a command-line frontend to libgphoto2"
+HOMEPAGE = "http://www.gphoto.com/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "libgphoto2 popt readline"
+RDEPENDS_gphoto2 = "libgphoto2"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/gphoto2-${PV}.tar.bz2;name=gphoto2 \
+           file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
+           file://0002-Look-for-popt-with-GP_CHECK_LIBRARY-function.patch \
+"
+
+SRC_URI[gphoto2.md5sum] = "6c6a21b5e879330cdd71ef92dce36399"
+SRC_URI[gphoto2.sha256sum] = "9302d02fb472d4936988382b7277ccdc4edaf7ede56c490278912ffd0627699c"
+
+inherit autotools pkgconfig gettext
+
+EXTRA_OECONF += "--with-jpeg-prefix=${STAGING_INCDIR} \
+                 --without-cdk \
+"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.8.bb
deleted file mode 100644
index 62d283b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.8.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "gphoto2 - a command-line frontend to libgphoto2"
-HOMEPAGE = "http://www.gphoto.com/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-DEPENDS = "libgphoto2 popt readline"
-RDEPENDS_gphoto2 = "libgphoto2"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/gphoto2-${PV}.tar.bz2;name=gphoto2 \
-           file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
-           file://0002-Look-for-popt-with-GP_CHECK_LIBRARY-function.patch \
-"
-
-SRC_URI[gphoto2.md5sum] = "bae369aee6881e590c5c91bdbb11a5f8"
-SRC_URI[gphoto2.sha256sum] = "a9abcd15d95f205318d17e3ac12af7ce523d2bc4943709d50b0a12c30cc5ee4d"
-
-inherit autotools pkgconfig gettext
-
-EXTRA_OECONF += "--with-jpeg-prefix=${STAGING_INCDIR} \
-                 --without-cdk \
-"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-scripts-remove-bashisms.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-scripts-remove-bashisms.patch
deleted file mode 100644
index 0e0dc87..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-scripts-remove-bashisms.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From c00e63e97d8718836ba011d9172128732eecf001 Mon Sep 17 00:00:00 2001
-From: Ismo Puustinen <ismo.puustinen@intel.com>
-Date: Tue, 24 Jan 2017 22:24:05 +0200
-Subject: [PATCH] scripts: remove bashisms.
-
-Convert bash scripts to more generic shell scripts. This removes the
-strict bash dependency and the scripts should now run with any posix
-shell. Also fix the issues reported by shellcheck while at it.
-
-Upstream-status: Accepted [https://github.com/gphoto/libgphoto2/commit/39b4395532058c0edb9a56d0ff04e48a472e4743]
-
----
- packaging/generic/check-ptp-camera          | 12 ++++++------
- packaging/linux-hotplug/gphoto-set-procperm | 14 +++++++-------
- packaging/linux-hotplug/usbcam.console      |  4 ++--
- packaging/linux-hotplug/usbcam.group        |  2 +-
- packaging/linux-hotplug/usbcam.user         |  2 +-
- packaging/linux-hotplug/usbcam.x11-app      |  4 ++--
- 6 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/packaging/generic/check-ptp-camera b/packaging/generic/check-ptp-camera
-index 1793fc8..bc3c6ac 100644
---- a/packaging/generic/check-ptp-camera
-+++ b/packaging/generic/check-ptp-camera
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
-@@ -20,13 +20,13 @@ INTERFACE="${1:-06/01/01}"
- 
- BASENAME=${DEVPATH##*/}
- for d in /sys/${DEVPATH}/${BASENAME}:*; do
--	[[ -d ${d} ]] || continue
--	INTERFACEID="$(< ${d}/bInterfaceClass)"
--	INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceSubClass)"
--	INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceProtocol)"
-+	[ -d "${d}" ] || continue
-+	INTERFACEID="$(cat "${d}"/bInterfaceClass)"
-+	INTERFACEID="${INTERFACEID}/$(cat "${d}"/bInterfaceSubClass)"
-+	INTERFACEID="${INTERFACEID}/$(cat "${d}"/bInterfaceProtocol)"
- 
- 	#echo ${d}: ${INTERFACEID}
--	if [[ ${INTERFACE} == ${INTERFACEID} ]]; then
-+	if [ "${INTERFACE}" = "${INTERFACEID}" ]; then
- 		# Found interface
- 		exit 0
- 	fi
-diff --git a/packaging/linux-hotplug/gphoto-set-procperm b/packaging/linux-hotplug/gphoto-set-procperm
-index d72ee68..977cbf5 100644
---- a/packaging/linux-hotplug/gphoto-set-procperm
-+++ b/packaging/linux-hotplug/gphoto-set-procperm
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
-@@ -18,22 +18,22 @@
- # This is taken from Fedora Core gphoto2 package.
- # http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/gphoto2/gphoto-set-procperm
- 
--console_user=`cat /var/run/console/console.lock` 
-+console_user=$(cat /var/run/console/console.lock)
- 
- if [ -z "$console_user" ] ; then
-   exit 1 
- fi
- 
--if [ -z "$HAL_PROP_USB_BUS_NUMBER" -o -z "$HAL_PROP_USB_LINUX_DEVICE_NUMBER" ] ; then
-+if [ -z "$HAL_PROP_USB_BUS_NUMBER" ] || [ -z "$HAL_PROP_USB_LINUX_DEVICE_NUMBER" ] ; then
-   exit 1 
- fi
- 
--if [ $HAL_PROP_USB_BUS_NUMBER -lt 0 -o  $HAL_PROP_USB_LINUX_DEVICE_NUMBER -lt 0 ] ; then
-+if [ "$HAL_PROP_USB_BUS_NUMBER" -lt 0 ] || [ "$HAL_PROP_USB_LINUX_DEVICE_NUMBER" -lt 0 ] ; then
-   exit 1 
- fi
- 
- 
--bus_num=`printf %.3u $HAL_PROP_USB_BUS_NUMBER`
--dev_num=`printf %.3u $HAL_PROP_USB_LINUX_DEVICE_NUMBER`
-+bus_num=$(printf %.3u "$HAL_PROP_USB_BUS_NUMBER")
-+dev_num=$(printf %.3u "$HAL_PROP_USB_LINUX_DEVICE_NUMBER")
- 
--chown $console_user /proc/bus/usb/$bus_num/$dev_num 
-+chown "$console_user" /proc/bus/usb/"$bus_num"/"$dev_num"
-diff --git a/packaging/linux-hotplug/usbcam.console b/packaging/linux-hotplug/usbcam.console
-index d72128f..7ac6dc5 100755
---- a/packaging/linux-hotplug/usbcam.console
-+++ b/packaging/linux-hotplug/usbcam.console
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
-@@ -50,7 +50,7 @@ then
-         /var/lock/console.lock
-     do
-         if [ -f "$conlock" ]; then
--	    CONSOLEOWNER=`cat $conlock`
-+            CONSOLEOWNER=$(cat $conlock)
-         fi
-     done
-     if [ -n "$CONSOLEOWNER" ]
-diff --git a/packaging/linux-hotplug/usbcam.group b/packaging/linux-hotplug/usbcam.group
-index f96c33d..8761fac 100755
---- a/packaging/linux-hotplug/usbcam.group
-+++ b/packaging/linux-hotplug/usbcam.group
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
-diff --git a/packaging/linux-hotplug/usbcam.user b/packaging/linux-hotplug/usbcam.user
-index c46f155..a3ba71a 100644
---- a/packaging/linux-hotplug/usbcam.user
-+++ b/packaging/linux-hotplug/usbcam.user
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
-diff --git a/packaging/linux-hotplug/usbcam.x11-app b/packaging/linux-hotplug/usbcam.x11-app
-index 023ae9b..618e7db 100644
---- a/packaging/linux-hotplug/usbcam.x11-app
-+++ b/packaging/linux-hotplug/usbcam.x11-app
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
-@@ -69,7 +69,7 @@ then
-     if [ "${USER}" != "root" ]
-     then
- 	# we don't want to run this as root. definitely not.
--	cd "${DIRECTORY}"
-+	cd "${DIRECTORY}" || exit 1
- 	usrhome=~${USER}
- 	"${SU}" "${USER}" -c "${ENV} DISPLAY=${DISPLAY} HOME=${usrhome} ${X11_APP}"
-     fi
--- 
-2.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0002-correct-jpeg-memsrcdest-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0002-correct-jpeg-memsrcdest-support.patch
deleted file mode 100644
index cf2d86d..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0002-correct-jpeg-memsrcdest-support.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.h.orig	2016-06-15 09:03:20.625774684 -0400
-+++ libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.h	2016-06-15 09:03:47.049774148 -0400
-@@ -1,5 +1,7 @@
- #include <jpeglib.h>
- 
-+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
-+
- void
- jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
- 	unsigned long bufsize);
-@@ -7,3 +9,5 @@
- void
- jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
- 	unsigned long * outsize);
-+
-+#endif
---- libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.c.orig	2016-06-15 09:03:58.689773913 -0400
-+++ libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.c	2016-06-15 09:04:17.769773526 -0400
-@@ -26,7 +26,7 @@
- 
- /* libjpeg8 and later come with their own (API compatible) memory source
-    and dest */
--#if JPEG_LIB_VERSION < 80
-+#if JPEG_LIB_VERSION < 80  && !defined(MEM_SRCDST_SUPPORTED)
- 
- /* Expanded data source object for memory input */
- 
---- libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.h.orig	2016-06-15 09:05:01.893772632 -0400
-+++ libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.h	2016-06-15 09:05:17.433772318 -0400
-@@ -1,5 +1,7 @@
- #include <jpeglib.h>
- 
-+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
-+
- void
- jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
- 	unsigned long bufsize);
-@@ -7,3 +9,5 @@
- void
- jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
- 	unsigned long * outsize);
-+
-+#endif
---- libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.c.orig	2016-06-15 09:04:42.641773022 -0400
-+++ libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.c	2016-06-15 09:04:48.657772901 -0400
-@@ -26,7 +26,7 @@
- 
- /* libjpeg8 and later come with their own (API compatible) memory source
-    and dest */
--#if JPEG_LIB_VERSION < 80
-+#if JPEG_LIB_VERSION < 80  && !defined(MEM_SRCDST_SUPPORTED)
- 
- /* Expanded data source object for memory input */
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/avoid_using_sprintf.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/avoid_using_sprintf.patch
deleted file mode 100644
index fba4c69..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/avoid_using_sprintf.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 4adfe5a6c9db07537df302f3c17713515bf23a2e Mon Sep 17 00:00:00 2001
-From: Marcus Meissner <marcus@jet.franken.de>
-Date: Sat, 11 Jul 2015 09:38:13 +0000
-Subject: [PATCH] avoid use of sprintf to convert %% to %, duplicate the macro
-
-git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15490 67ed7778-7388-44ab-90cf-0a291f65f57c
----
- camlibs/ptp2/chdk.c     |  8 ++---
- camlibs/ptp2/chdk_ptp.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 84 insertions(+), 6 deletions(-)
-
-diff --git a/camlibs/ptp2/chdk.c b/camlibs/ptp2/chdk.c
-index 5fb84ea..3b8a995 100644
---- a/camlibs/ptp2/chdk.c
-+++ b/camlibs/ptp2/chdk.c
-@@ -1119,18 +1119,14 @@ chdk_camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
- 	int		ret, retint;
- 	char		*table, *s;
- 	PTPParams	*params = &camera->pl->params;
--	char		*lua;
--	const char	*luascript =	PTP_CHDK_LUA_SERIALIZE_MSGS \
-+	const char	*luascript = PTP_CHDK_LUA_SERIALIZE_MSGS_SIMPLEQUOTE \
- 				PTP_CHDK_LUA_RLIB_SHOOT	\
- 				"return rlib_shoot({info=true});\n";
- 
- 	ret =  camera_prepare_chdk_capture(camera, context);
- 	if (ret != GP_OK) return ret;
- 
--	lua = malloc(strlen(luascript)+1);
--	sprintf(lua,luascript); /* This expands the %q inside the string too ... do not optimize away. */
--	ret = chdk_generic_script_run (params, lua, &table, &retint, context);
--	free (lua);
-+	ret = chdk_generic_script_run (params, luascript, &table, &retint, context);
- 	GP_LOG_D("rlib_shoot returned table %s, retint %d\n", table, retint);
- 	s = strstr(table, "exp=");
- 	if (s) {
-diff --git a/camlibs/ptp2/chdk_ptp.h b/camlibs/ptp2/chdk_ptp.h
-index d11e0b7..65dcfd7 100644
---- a/camlibs/ptp2/chdk_ptp.h
-+++ b/camlibs/ptp2/chdk_ptp.h
-@@ -198,10 +198,92 @@ function serialize(v,opts)\n\
- 	return table.concat(r)\n\
- end\n"
- 
-+#define PTP_CHDK_LUA_SERIALIZE_SIMPLEQUOTE "\n\
-+serialize_r = function(v,opts,r,seen,depth)\n\
-+	local vt = type(v)\n\
-+	if vt == 'nil' or  vt == 'boolean' or vt == 'number' then\n\
-+		table.insert(r,tostring(v))\n\
-+		return\n\
-+	end\n\
-+	if vt == 'string' then\n\
-+		table.insert(r,string.format('%q',v))\n\
-+		return\n\
-+	end\n\
-+	if vt == 'table' then\n\
-+		if not depth then\n\
-+			depth = 1\n\
-+		end\n\
-+		if depth >= opts.maxdepth then\n\
-+			error('serialize: max depth')\n\
-+		end\n\
-+		if not seen then\n\
-+			seen={}\n\
-+		elseif seen[v] then\n\
-+			if opts.err_cycle then\n\
-+				error('serialize: cycle')\n\
-+			else\n\
-+				table.insert(r,'\"cycle:'..tostring(v)..'\"')\n\
-+				return\n\
-+			end\n\
-+		end\n\
-+		seen[v] = true;\n\
-+		table.insert(r,'{')\n\
-+		for k,v1 in pairs(v) do\n\
-+			if opts.pretty then\n\
-+				table.insert(r,'\\n'..string.rep(' ',depth))\n\
-+			end\n\
-+			if type(k) == 'string' and string.match(k,'^[_%a][%a%d_]*$') then\n\
-+				table.insert(r,k)\n\
-+			else\n\
-+				table.insert(r,'[')\n\
-+				serialize_r(k,opts,r,seen,depth+1)\n\
-+				table.insert(r,']')\n\
-+			end\n\
-+			table.insert(r,'=')\n\
-+			serialize_r(v1,opts,r,seen,depth+1)\n\
-+			table.insert(r,',')\n\
-+		end\n\
-+		if opts.pretty then\n\
-+			table.insert(r,'\\n'..string.rep(' ',depth-1))\n\
-+		end\n\
-+		table.insert(r,'}')\n\
-+		return\n\
-+	end\n\
-+	if opts.err_type then\n\
-+		error('serialize: unsupported type ' .. vt, 2)\n\
-+	else\n\
-+		table.insert(r,'\"'..tostring(v)..'\"')\n\
-+	end\n\
-+end\n\
-+serialize_defaults = {\n\
-+	maxdepth=10,\n\
-+	err_type=true,\n\
-+	err_cycle=true,\n\
-+	pretty=false,\n\
-+}\n\
-+function serialize(v,opts)\n\
-+	if opts then\n\
-+		for k,v in pairs(serialize_defaults) do\n\
-+			if not opts[k] then\n\
-+				opts[k]=v\n\
-+			end\n\
-+		end\n\
-+	else\n\
-+		opts=serialize_defaults\n\
-+	end\n\
-+	local r={}\n\
-+	serialize_r(v,opts,r)\n\
-+	return table.concat(r)\n\
-+end\n"
-+
- #define PTP_CHDK_LUA_SERIALIZE_MSGS \
- PTP_CHDK_LUA_SERIALIZE\
- "usb_msg_table_to_string=serialize\n"
- 
-+#define PTP_CHDK_LUA_SERIALIZE_MSGS_SIMPLEQUOTE \
-+PTP_CHDK_LUA_SERIALIZE_SIMPLEQUOTE\
-+"usb_msg_table_to_string=serialize\n"
-+
- #define PTP_CHDK_LUA_EXTEND_TABLE \
- "function extend_table(target,source,deep)\n\
- 	if type(target) ~= 'table' then\n\
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-configure.ac-remove-AM_PO_SUBDIRS.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure.ac-remove-AM_PO_SUBDIRS.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-configure.ac-remove-AM_PO_SUBDIRS.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure.ac-remove-AM_PO_SUBDIRS.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/10-camera-libgphoto2-device.fdi b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/10-camera-libgphoto2-device.fdi
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/10-camera-libgphoto2-device.fdi
rename to import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/10-camera-libgphoto2-device.fdi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/10-camera-libgphoto2.fdi b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/10-camera-libgphoto2.fdi
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/10-camera-libgphoto2.fdi
rename to import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/10-camera-libgphoto2.fdi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/40-libgphoto2.rules b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/40-libgphoto2.rules
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/40-libgphoto2.rules
rename to import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/40-libgphoto2.rules
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.16.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.16.bb
new file mode 100644
index 0000000..7a691c6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.16.bb
@@ -0,0 +1,54 @@
+SUMMARY = "libgphoto2 allows you to access digital cameras"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0448d3676bc0de00406af227d341a4d1"
+
+DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
+
+# The .fdi and .rules files were generated with:
+#  libgphoto2-2.5.8/packaging/generic$ qemu-arm -s 1048576 -r 2.6.24 -L /OE/angstrom-dev/staging/armv5te-angstrom-linux-gnueabi/ .libs/print-camera-list
+# They are release specific, so please regen when adding new releases
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
+           file://10-camera-libgphoto2-device.fdi \
+           file://10-camera-libgphoto2.fdi \
+           file://40-libgphoto2.rules \
+           file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
+"
+
+SRC_URI[libgphoto2.md5sum] = "084d220d078d28c0c7a3ba13f4476128"
+SRC_URI[libgphoto2.sha256sum] = "e757416d1623e01a9d0d294b2e790162e434c0964f50d3b7ff1a3424b62a2906"
+
+inherit autotools pkgconfig gettext lib_package
+
+EXTRA_OECONF = " --with-drivers=all udevscriptdir=${nonarch_base_libdir}/udev ac_cv_lib_ltdl_lt_dlcaller_register=yes"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gd] = ",--without-gdlib,gd"
+PACKAGECONFIG[serial] = "--enable-serial,--disable-serial,lockdev"
+
+do_configure_append() {
+    cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
+    cd ${S}/libgphoto2_port/
+    autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
+    cd ${S}
+}
+
+do_install_append() {
+    install -d ${D}${datadir}/hal/fdi/information/20thirdparty
+    install -m 0644 ${WORKDIR}/*.fdi ${D}${datadir}/hal/fdi/information/20thirdparty/
+
+    install -d ${D}${sysconfdir}/udev/rules.d/
+    install -m 0755 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+}
+
+PACKAGES =+ "libgphotoport libgphoto2-camlibs"
+FILES_libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*"
+RRECOMMENDS_${PN} = "libgphoto2-camlibs"
+
+FILES_libgphotoport = "${libdir}/libgphoto2_port.so.*"
+
+FILES_${PN} += "${nonarch_base_libdir}/udev/* ${datadir}/hal"
+FILES_${PN}-dbg += "${libdir}/*/*/.debug"
+FILES_${PN}-dev += "${libdir}/*/*/*.la"
+FILES_${PN}-doc += "${datadir}/libgphoto2_port/0.12.0/vcamera/README.txt"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb
deleted file mode 100644
index 4434af9..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "libgphoto2 allows you to access digital cameras"
-SECTION = "libs"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0448d3676bc0de00406af227d341a4d1"
-
-DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
-
-# The .fdi and .rules files were generated with:
-#  libgphoto2-2.5.8/packaging/generic$ qemu-arm -s 1048576 -r 2.6.24 -L /OE/angstrom-dev/staging/armv5te-angstrom-linux-gnueabi/ .libs/print-camera-list
-# They are release specific, so please regen when adding new releases
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
-           file://10-camera-libgphoto2-device.fdi \
-           file://10-camera-libgphoto2.fdi \
-           file://40-libgphoto2.rules \
-           file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
-           file://0002-correct-jpeg-memsrcdest-support.patch \
-           file://avoid_using_sprintf.patch \
-           file://0001-scripts-remove-bashisms.patch \
-"
-
-SRC_URI[libgphoto2.md5sum] = "873ab01aced49c6b92a98e515db5dcef"
-SRC_URI[libgphoto2.sha256sum] = "031a262e342fae43f724afe66787947ce1fb483277dfe5a8cf1fbe92c58e27b6"
-
-inherit autotools pkgconfig gettext lib_package
-
-EXTRA_OECONF = " --with-drivers=all udevscriptdir=${nonarch_base_libdir}/udev ac_cv_lib_ltdl_lt_dlcaller_register=yes"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gd] = ",--without-gdlib,gd"
-PACKAGECONFIG[serial] = "--enable-serial,--disable-serial,lockdev"
-
-do_configure_append() {
-    cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
-    cd ${S}/libgphoto2_port/
-    autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
-    cd ${S}
-}
-
-do_install_append() {
-    install -d ${D}${datadir}/hal/fdi/information/20thirdparty
-    install -m 0644 ${WORKDIR}/*.fdi ${D}${datadir}/hal/fdi/information/20thirdparty/
-
-    install -d ${D}${sysconfdir}/udev/rules.d/
-    install -m 0755 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
-}
-
-PACKAGES =+ "libgphotoport libgphoto2-camlibs"
-FILES_libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*"
-RRECOMMENDS_${PN} = "libgphoto2-camlibs"
-
-FILES_libgphotoport = "${libdir}/libgphoto2_port.so.*"
-
-FILES_${PN} += "${nonarch_base_libdir}/udev/* ${datadir}/hal"
-FILES_${PN}-dbg += "${libdir}/*/*/.debug"
-FILES_${PN}-dev += "${libdir}/*/*/*.la"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb
index 2db9190..4094513 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb
@@ -16,7 +16,9 @@
 
 S = "${WORKDIR}/${BPN}"
 
-inherit autotools binconfig pkgconfig gettext
+inherit distro_features_check autotools binconfig pkgconfig gettext
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_configure_prepend () {
     rm -f ${S}/m4/init.m4
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.11.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.11.bb
index 457d721..38dac06 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.11.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.11.bb
@@ -12,7 +12,9 @@
 
 RDEPENDS_${PN} += "libpng gtk+ libgcrypt"
 
-inherit autotools binconfig pkgconfig
+inherit distro_features_check autotools binconfig pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${PV}.tar.gz"
 SRC_URI[md5sum] = "7f06104d5c009813e95142932c4ddb06"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-Fix-the-error-of-can-t-find-header-file.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-Fix-the-error-of-can-t-find-header-file.patch
new file mode 100644
index 0000000..045f3ca
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-Fix-the-error-of-can-t-find-header-file.patch
@@ -0,0 +1,101 @@
+From eb0086dc4ea8fe9cda069456287b3a29a2631d30 Mon Sep 17 00:00:00 2001
+From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+Date: Wed, 13 Dec 2017 16:18:45 +0900
+Subject: [PATCH] Fix the error of can't find header file
+
+Upstream-Status: Inappropriate [embedded specific]
+This fix is just for yocto.
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/NCApplication.cc | 2 +-
+ src/NCstyle.h        | 2 +-
+ src/NCurses.h        | 2 +-
+ src/ncursesp.h       | 2 +-
+ src/ncursesw.cc      | 2 +-
+ src/ncursesw.h       | 4 ++--
+ 6 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/NCApplication.cc b/src/NCApplication.cc
+index 5bcf969..510f034 100644
+--- a/src/NCApplication.cc
++++ b/src/NCApplication.cc
+@@ -23,7 +23,7 @@
+ 
+ /-*/
+ 
+-#include <ncursesw/curses.h>
++#include <curses.h>
+ 
+ #define  YUILogComponent "ncurses"
+ #include <yui/YUILog.h>
+diff --git a/src/NCstyle.h b/src/NCstyle.h
+index a40d5a8..3657917 100644
+--- a/src/NCstyle.h
++++ b/src/NCstyle.h
+@@ -25,7 +25,7 @@
+ #ifndef NCstyle_h
+ #define NCstyle_h
+ 
+-#include <ncursesw/ncurses.h>
++#include <ncurses.h>
+ 
+ #include <iosfwd>
+ #include <string>
+diff --git a/src/NCurses.h b/src/NCurses.h
+index a07c6bf..d17d3c3 100644
+--- a/src/NCurses.h
++++ b/src/NCurses.h
+@@ -34,7 +34,7 @@
+ #include <yui/YWidget.h>
+ #include <yui/YMenuItem.h>
+ 
+-#include <ncursesw/curses.h>	/* curses.h: #define  NCURSES_CH_T cchar_t */
++#include <curses.h>	/* curses.h: #define  NCURSES_CH_T cchar_t */
+ #include <wchar.h>
+ 
+ #include "ncursesw.h"
+diff --git a/src/ncursesp.h b/src/ncursesp.h
+index d478347..2fcfea5 100644
+--- a/src/ncursesp.h
++++ b/src/ncursesp.h
+@@ -28,7 +28,7 @@
+ #include <iosfwd>
+ 
+ #include "ncursesw.h"
+-#include <ncursesw/panel.h>
++#include <panel.h>
+ 
+ class NCursesPanel : public NCursesWindow
+ {
+diff --git a/src/ncursesw.cc b/src/ncursesw.cc
+index 3c771af..bb83210 100644
+--- a/src/ncursesw.cc
++++ b/src/ncursesw.cc
+@@ -47,7 +47,7 @@
+ #include <iostream>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ncursesw/term.h>
++#include <term.h>
+ #undef line
+ #undef columns
+ 
+diff --git a/src/ncursesw.h b/src/ncursesw.h
+index d25923a..c140d37 100644
+--- a/src/ncursesw.h
++++ b/src/ncursesw.h
+@@ -27,8 +27,8 @@
+ 
+ #include <iosfwd>
+ 
+-#include <ncursesw/curses.h>
+-#include <ncursesw/etip.h>
++#include <curses.h>
++#include <etip.h>
+ #include <cstdio>
+ #include <cstdarg>
+ #include <climits>
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-use-_nl_msg_cat_cntr-only-with-glibc.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-use-_nl_msg_cat_cntr-only-with-glibc.patch
new file mode 100644
index 0000000..8e3774c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-use-_nl_msg_cat_cntr-only-with-glibc.patch
@@ -0,0 +1,40 @@
+From 4b84f243a70a8c07f6a38dad3c9411fa707f25c9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Mar 2018 17:08:43 -0800
+Subject: [PATCH] use _nl_msg_cat_cntr only with glibc
+
+The musl libc provides libintl (similar to glibc)
+but does not use the same internals,
+so even though we are using the GNU gettext
+the libintl included with the libc does not define
+_nl_msg_cat_cntr and it does not need to.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/NCi18n.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/NCi18n.h b/src/NCi18n.h
+index 165b0e7..bfc4ed7 100644
+--- a/src/NCi18n.h
++++ b/src/NCi18n.h
+@@ -59,12 +59,13 @@ inline void setTextdomain( const char * domain )
+     bindtextdomain( domain,  YSettings::localeDir().c_str() );
+     bind_textdomain_codeset( domain, "UTF-8" );
+     textdomain( domain );
+-
++#if defined(__GLIBC__)
+     // Make change known
+     {
+ 	extern int _nl_msg_cat_cntr;
+ 	++_nl_msg_cat_cntr;
+     }
++#endif
+ }
+ 
+ 
+-- 
+2.16.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_git.bb
new file mode 100644
index 0000000..578c713
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui-ncurses_git.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Character Based User Interface for libyui"
+LICENSE = "LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+    file://COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \
+"
+
+SRC_URI = "git://github.com/libyui/libyui-ncurses.git \
+           file://0001-use-_nl_msg_cat_cntr-only-with-glibc.patch \
+          "
+
+SRC_URI_append_class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch"
+
+PV = "2.48.3+git${SRCPV}"
+SRCREV = "79b804b45ffc6a0d92e28e793ff389a20b63b54b"
+
+S = "${WORKDIR}/git"
+
+inherit cmake gettext pkgconfig
+
+DEPENDS += "boost libyui ncurses"
+
+BBCLASSEXTEND = "nativesdk"
+
+do_configure_prepend () {
+    cd ${S}
+    git checkout bootstrap.sh
+    sed -i "s#/usr#${PKG_CONFIG_SYSROOT_DIR}${base_prefix}&#" bootstrap.sh
+    ./bootstrap.sh
+    mkdir -p ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/
+    cp ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so* ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/
+    cd -
+    sed -i "s#\${YPREFIX}#\${PKG_CONFIG_SYSROOT_DIR}${base_prefix}&#" ${S}/CMakeLists.txt
+    sed -i "s#/usr#${PKG_CONFIG_SYSROOT_DIR}${base_prefix}&#" ${PKG_CONFIG_SYSROOT_DIR}${libdir}/cmake/libyui/LibyuiLibraryDepends-release.cmake
+}
+
+do_install_append () {
+    if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then
+        mv ${D}/usr/lib64 ${D}/usr/lib
+    fi
+}
+
+do_install_append_class-nativesdk () {
+    mkdir -p ${D}/${base_prefix}
+    mv ${D}/usr ${D}/${base_prefix}
+}
+
+FILES_${PN} += "${datadir}/*"
+
+FILES_${PN}-dev += "${libdir}/*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui/0001-Fix-GCC-8-warning.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui/0001-Fix-GCC-8-warning.patch
new file mode 100644
index 0000000..c1ba42e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui/0001-Fix-GCC-8-warning.patch
@@ -0,0 +1,48 @@
+From 1e6d40fec16a94d1a4bd40634405267200b7e969 Mon Sep 17 00:00:00 2001
+From: marxin <mliska@suse.cz>
+Date: Tue, 10 Apr 2018 15:21:40 +0200
+Subject: [PATCH] Fix GCC 8 warning:
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+/home/marxin/Programming/libyui/src/YDialog.cc: In static member function ‘static void YDialog::showText(const string&, bool)’:
+/home/marxin/Programming/libyui/src/YDialog.cc:690:26: error: catching polymorphic type ‘class YUIException’ by value [-Werror=catch-value=]
+     catch ( YUIException exception )
+                          ^~~~~~~~~
+/home/marxin/Programming/libyui/src/YDialog.cc: In static member function ‘static bool YDialog::showRelNotesText()’:
+/home/marxin/Programming/libyui/src/YDialog.cc:814:26: error: catching polymorphic type ‘class YUIException’ by value [-Werror=catch-value=]
+     catch ( YUIException exception )
+                          ^~~~~~~~~
+---
+Upstream-Status: Submitted [https://github.com/libyui/libyui/pull/122]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ src/YDialog.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/YDialog.cc b/src/YDialog.cc
+index 92e5031..8ecff90 100644
+--- a/src/YDialog.cc
++++ b/src/YDialog.cc
+@@ -687,7 +687,7 @@ YDialog::showText( const std::string & text, bool useRichText )
+ 	dialog->waitForEvent();
+ 	dialog->destroy();
+     }
+-    catch ( YUIException exception )
++    catch ( YUIException &exception )
+     {
+ 	// Don't let the application die just because help couldn't be displayed.
+ 
+@@ -811,7 +811,7 @@ YDialog::showRelNotesText()
+ 	}
+         dialog->destroy();
+     }
+-    catch ( YUIException exception )
++    catch ( YUIException &exception )
+     {
+         // Don't let the application die just because RN couldn't be displayed.
+ 
+-- 
+2.17.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui/0001-Fix-build-with-clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui/0001-Fix-build-with-clang.patch
new file mode 100644
index 0000000..4269018
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui/0001-Fix-build-with-clang.patch
@@ -0,0 +1,687 @@
+From 18562671982ad97549bccb444fdbb5905b6e9335 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 24 Apr 2018 15:06:14 -0700
+Subject: [PATCH] Fix build with clang
+
+Fix warnings found with clang
+
+error: class 'YButtonBoxPrivate' was previously declared as a struct [-Werror,-Wmismatched-tags]
+|     friend class YButtonBoxPrivate;
+
+YTimezoneSelector.cc:35:9: error: private field 'dummy' is not used [-Werror,-Wunused-private-field]
+   bool dummy;
+        ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/libyui/libyui/pull/123]
+
+ src/YAlignment.h          | 2 +-
+ src/YBarGraph.h           | 2 +-
+ src/YBusyIndicator.h      | 2 +-
+ src/YButtonBox.h          | 4 ++--
+ src/YCheckBox.h           | 2 +-
+ src/YCheckBoxFrame.h      | 2 +-
+ src/YComboBox.h           | 2 +-
+ src/YCommandLine.h        | 2 +-
+ src/YContextMenu.h        | 2 +-
+ src/YDateField.h          | 2 +-
+ src/YDialog.h             | 2 +-
+ src/YDownloadProgress.h   | 2 +-
+ src/YDumbTab.h            | 2 +-
+ src/YEmpty.h              | 2 +-
+ src/YEventFilter.h        | 2 +-
+ src/YFrame.h              | 2 +-
+ src/YGraph.h              | 2 +-
+ src/YImage.h              | 2 +-
+ src/YInputField.h         | 2 +-
+ src/YIntField.h           | 2 +-
+ src/YLabel.h              | 2 +-
+ src/YLayoutBox.h          | 2 +-
+ src/YLogView.h            | 2 +-
+ src/YMenuButton.h         | 2 +-
+ src/YMultiLineEdit.h      | 2 +-
+ src/YMultiProgressMeter.h | 2 +-
+ src/YMultiSelectionBox.h  | 2 +-
+ src/YPartitionSplitter.h  | 2 +-
+ src/YProgressBar.h        | 2 +-
+ src/YPushButton.h         | 2 +-
+ src/YRadioButton.h        | 2 +-
+ src/YRadioButtonGroup.h   | 2 +-
+ src/YRichText.h           | 2 +-
+ src/YSelectionBox.h       | 2 +-
+ src/YSelectionWidget.h    | 2 +-
+ src/YSimpleInputField.h   | 2 +-
+ src/YSlider.h             | 2 +-
+ src/YSpacing.h            | 2 +-
+ src/YSquash.h             | 2 +-
+ src/YTable.h              | 2 +-
+ src/YTableHeader.h        | 2 +-
+ src/YTimeField.h          | 2 +-
+ src/YTimezoneSelector.cc  | 2 +-
+ src/YTree.h               | 2 +-
+ src/YUILog.h              | 2 +-
+ src/YWidget.h             | 2 +-
+ src/YWizard.h             | 2 +-
+ 47 files changed, 48 insertions(+), 48 deletions(-)
+
+diff --git a/src/YAlignment.h b/src/YAlignment.h
+index d716c77..7276944 100644
+--- a/src/YAlignment.h
++++ b/src/YAlignment.h
+@@ -28,7 +28,7 @@
+ #include "YSingleChildContainerWidget.h"
+ 
+ 
+-class YAlignmentPrivate;
++struct YAlignmentPrivate;
+ 
+ /**
+  * Implementation of all the alignment widgets:
+diff --git a/src/YBarGraph.h b/src/YBarGraph.h
+index 29f7f26..d7eaad2 100644
+--- a/src/YBarGraph.h
++++ b/src/YBarGraph.h
+@@ -29,7 +29,7 @@
+ #include "YColor.h"
+ 
+ 
+-class YBarGraphPrivate;
++struct YBarGraphPrivate;
+ class YBarGraphSegment;
+ 
+ /**
+diff --git a/src/YBusyIndicator.h b/src/YBusyIndicator.h
+index 9530fa5..75297d8 100644
+--- a/src/YBusyIndicator.h
++++ b/src/YBusyIndicator.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YWidget.h"
+ 
+-class YBusyIndicatorPrivate;
++struct YBusyIndicatorPrivate;
+ 
+ 
+ /**
+diff --git a/src/YButtonBox.h b/src/YButtonBox.h
+index 84f8dbb..ca51f57 100644
+--- a/src/YButtonBox.h
++++ b/src/YButtonBox.h
+@@ -30,7 +30,7 @@
+ #include "YWidget.h"
+ #include "YPushButton.h"
+ 
+-class YButtonBoxPrivate;
++struct YButtonBoxPrivate;
+ class YPushButton;
+ 
+ 
+@@ -147,7 +147,7 @@ struct YButtonBoxMargins
+  **/
+ class YButtonBox : public YWidget
+ {
+-    friend class YButtonBoxPrivate;
++    friend struct YButtonBoxPrivate;
+ 
+ protected:
+     /**
+diff --git a/src/YCheckBox.h b/src/YCheckBox.h
+index 793cc77..03f3faa 100644
+--- a/src/YCheckBox.h
++++ b/src/YCheckBox.h
+@@ -30,7 +30,7 @@
+ #include "YWidget.h"
+ #include "ImplPtr.h"
+ 
+-class YCheckBoxPrivate;
++struct YCheckBoxPrivate;
+ 
+ enum YCheckBoxState
+ {
+diff --git a/src/YCheckBoxFrame.h b/src/YCheckBoxFrame.h
+index 243f1a0..7017110 100644
+--- a/src/YCheckBoxFrame.h
++++ b/src/YCheckBoxFrame.h
+@@ -29,7 +29,7 @@
+ #include "YSingleChildContainerWidget.h"
+ #include "ImplPtr.h"
+ 
+-class YCheckBoxFramePrivate;
++struct YCheckBoxFramePrivate;
+ 
+ 
+ /**
+diff --git a/src/YComboBox.h b/src/YComboBox.h
+index 416359a..ad0e550 100644
+--- a/src/YComboBox.h
++++ b/src/YComboBox.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YSelectionWidget.h"
+ 
+-class YComboBoxPrivate;
++struct YComboBoxPrivate;
+ 
+ 
+ /**
+diff --git a/src/YCommandLine.h b/src/YCommandLine.h
+index 70cb4fe..f344a3b 100644
+--- a/src/YCommandLine.h
++++ b/src/YCommandLine.h
+@@ -28,7 +28,7 @@
+ #include <string>
+ #include "ImplPtr.h"
+ 
+-class YCommandLinePrivate;
++struct YCommandLinePrivate;
+ 
+ 
+ /**
+diff --git a/src/YContextMenu.h b/src/YContextMenu.h
+index a4acb1c..1253002 100644
+--- a/src/YContextMenu.h
++++ b/src/YContextMenu.h
+@@ -29,7 +29,7 @@
+ #include "YMenuItem.h"
+ 
+ class YMenuItem;
+-class YContextMenuPrivate;
++struct YContextMenuPrivate;
+ 
+ 
+ /**
+diff --git a/src/YDateField.h b/src/YDateField.h
+index e5a468d..6164fba 100644
+--- a/src/YDateField.h
++++ b/src/YDateField.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YSimpleInputField.h"
+ 
+-class YDateFieldPrivate;
++struct YDateFieldPrivate;
+ 
+ /**
+  * Input field for entering a date.
+diff --git a/src/YDialog.h b/src/YDialog.h
+index 66c25c0..371209b 100644
+--- a/src/YDialog.h
++++ b/src/YDialog.h
+@@ -32,7 +32,7 @@
+ 
+ class YShortcutManager;
+ class YPushButton;
+-class YDialogPrivate;
++struct YDialogPrivate;
+ class YEvent;
+ class YEventFilter;
+ 
+diff --git a/src/YDownloadProgress.h b/src/YDownloadProgress.h
+index c47ec4f..fe09a9d 100644
+--- a/src/YDownloadProgress.h
++++ b/src/YDownloadProgress.h
+@@ -28,7 +28,7 @@
+ #include "YWidget.h"
+ 
+ 
+-class YDownloadProgressPrivate;
++struct YDownloadProgressPrivate;
+ 
+ /**
+  * DownloadProgress: A progress bar that monitors downloading a file by
+diff --git a/src/YDumbTab.h b/src/YDumbTab.h
+index aec17a3..f8fb250 100644
+--- a/src/YDumbTab.h
++++ b/src/YDumbTab.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YSelectionWidget.h"
+ 
+-class YDumbTabPrivate;
++struct YDumbTabPrivate;
+ 
+ /**
+  * DumbTab: A very simple tab widget that can display and switch between a
+diff --git a/src/YEmpty.h b/src/YEmpty.h
+index 9a3cb36..9b88fbc 100644
+--- a/src/YEmpty.h
++++ b/src/YEmpty.h
+@@ -29,7 +29,7 @@
+ #include "ImplPtr.h"
+ 
+ 
+-class YEmptyPrivate;
++struct YEmptyPrivate;
+ 
+ /**
+  * A widget with zero size, useful as a placeholder.
+diff --git a/src/YEventFilter.h b/src/YEventFilter.h
+index 3dc1803..74aa62d 100644
+--- a/src/YEventFilter.h
++++ b/src/YEventFilter.h
+@@ -32,7 +32,7 @@
+ class YEvent;
+ class YDialog;
+ 
+-class YEventFilterPrivate;
++struct YEventFilterPrivate;
+ 
+ 
+ /**
+diff --git a/src/YFrame.h b/src/YFrame.h
+index 111e8ec..4f8c61e 100644
+--- a/src/YFrame.h
++++ b/src/YFrame.h
+@@ -29,7 +29,7 @@
+ #include "YSingleChildContainerWidget.h"
+ #include "ImplPtr.h"
+ 
+-class YFramePrivate;
++struct YFramePrivate;
+ 
+ 
+ /**
+diff --git a/src/YGraph.h b/src/YGraph.h
+index d90d1ae..287d800 100644
+--- a/src/YGraph.h
++++ b/src/YGraph.h
+@@ -37,7 +37,7 @@
+  * For that reason a lot of functions simply take a void* instead of graph_t*.
+  */
+ 
+-class YGraphPrivate;
++struct YGraphPrivate;
+ 
+ /**
+  * A graph with nodes and edges, rendered with Graphviz.
+diff --git a/src/YImage.h b/src/YImage.h
+index 17bea21..84eb674 100644
+--- a/src/YImage.h
++++ b/src/YImage.h
+@@ -29,7 +29,7 @@
+ #include <string>
+ 
+ 
+-class YImagePrivate;
++struct YImagePrivate;
+ 
+ /**
+  * A picture, possibly animated, loaded from a file.
+diff --git a/src/YInputField.h b/src/YInputField.h
+index 70641ce..fa29b42 100644
+--- a/src/YInputField.h
++++ b/src/YInputField.h
+@@ -28,7 +28,7 @@
+ #include <string>
+ #include "YWidget.h"
+ 
+-class YInputFieldPrivate;
++struct YInputFieldPrivate;
+ 
+ 
+ 
+diff --git a/src/YIntField.h b/src/YIntField.h
+index 9da0537..8ad2949 100644
+--- a/src/YIntField.h
++++ b/src/YIntField.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YWidget.h"
+ 
+-class YIntFieldPrivate;
++struct YIntFieldPrivate;
+ 
+ 
+ 
+diff --git a/src/YLabel.h b/src/YLabel.h
+index d2fff61..bf06d8b 100644
+--- a/src/YLabel.h
++++ b/src/YLabel.h
+@@ -30,7 +30,7 @@
+ #include "ImplPtr.h"
+ 
+ 
+-class YLabelPrivate;
++struct YLabelPrivate;
+ 
+ /**
+  * Implementation of the Label, Heading and OutputField widgets
+diff --git a/src/YLayoutBox.h b/src/YLayoutBox.h
+index e652a45..070eaff 100644
+--- a/src/YLayoutBox.h
++++ b/src/YLayoutBox.h
+@@ -29,7 +29,7 @@
+ #include "YWidget.h"
+ 
+ 
+-class YLayoutBoxPrivate;
++struct YLayoutBoxPrivate;
+ 
+ /**
+  * A vertical or horizontal stacking of widgets, implementing HBox and VBox.
+diff --git a/src/YLogView.h b/src/YLogView.h
+index 53fb9ee..5b44229 100644
+--- a/src/YLogView.h
++++ b/src/YLogView.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YWidget.h"
+ 
+-class YLogViewPrivate;
++struct YLogViewPrivate;
+ 
+ 
+ /**
+diff --git a/src/YMenuButton.h b/src/YMenuButton.h
+index 205e730..5df7efb 100644
+--- a/src/YMenuButton.h
++++ b/src/YMenuButton.h
+@@ -29,7 +29,7 @@
+ #include "YMenuItem.h"
+ 
+ class YMenuItem;
+-class YMenuButtonPrivate;
++struct YMenuButtonPrivate;
+ 
+ 
+ /**
+diff --git a/src/YMultiLineEdit.h b/src/YMultiLineEdit.h
+index c52a6ae..1f792f8 100644
+--- a/src/YMultiLineEdit.h
++++ b/src/YMultiLineEdit.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YWidget.h"
+ 
+-class YMultiLineEditPrivate;
++struct YMultiLineEditPrivate;
+ 
+ /**
+  * A multi-line plain-text area
+diff --git a/src/YMultiProgressMeter.h b/src/YMultiProgressMeter.h
+index 57c758d..f6bec91 100644
+--- a/src/YMultiProgressMeter.h
++++ b/src/YMultiProgressMeter.h
+@@ -28,7 +28,7 @@
+ #include "YWidget.h"
+ #include <vector>
+ 
+-class YMultiProgressMeterPrivate;
++struct YMultiProgressMeterPrivate;
+ 
+ 
+ /**
+diff --git a/src/YMultiSelectionBox.h b/src/YMultiSelectionBox.h
+index bbe5a20..f3a2947 100644
+--- a/src/YMultiSelectionBox.h
++++ b/src/YMultiSelectionBox.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YSelectionWidget.h"
+ 
+-class YMultiSelectionBoxPrivate;
++struct YMultiSelectionBoxPrivate;
+ 
+ 
+ /**
+diff --git a/src/YPartitionSplitter.h b/src/YPartitionSplitter.h
+index 2839bbc..9de1174 100644
+--- a/src/YPartitionSplitter.h
++++ b/src/YPartitionSplitter.h
+@@ -28,7 +28,7 @@
+ #include "YWidget.h"
+ 
+ 
+-class YPartitionSplitterPrivate;
++struct YPartitionSplitterPrivate;
+ 
+ 
+ /**
+diff --git a/src/YProgressBar.h b/src/YProgressBar.h
+index 718352f..baab662 100644
+--- a/src/YProgressBar.h
++++ b/src/YProgressBar.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YWidget.h"
+ 
+-class YProgressBarPrivate;
++struct YProgressBarPrivate;
+ 
+ 
+ /**
+diff --git a/src/YPushButton.h b/src/YPushButton.h
+index 5b65c98..e288252 100644
+--- a/src/YPushButton.h
++++ b/src/YPushButton.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YWidget.h"
+ 
+-class YPushButtonPrivate;
++struct YPushButtonPrivate;
+ 
+ 
+ 
+diff --git a/src/YRadioButton.h b/src/YRadioButton.h
+index 9dc62de..5a7c0dd 100644
+--- a/src/YRadioButton.h
++++ b/src/YRadioButton.h
+@@ -28,7 +28,7 @@
+ #include "YWidget.h"
+ 
+ class YRadioButtonGroup;
+-class YRadioButtonPrivate;
++struct YRadioButtonPrivate;
+ 
+ 
+ /**
+diff --git a/src/YRadioButtonGroup.h b/src/YRadioButtonGroup.h
+index 063a52e..671a257 100644
+--- a/src/YRadioButtonGroup.h
++++ b/src/YRadioButtonGroup.h
+@@ -28,7 +28,7 @@
+ #include "YSingleChildContainerWidget.h"
+ 
+ class YRadioButton;
+-class YRadioButtonGroupPrivate;
++struct YRadioButtonGroupPrivate;
+ 
+ typedef std::list<YRadioButton *> 		YRadioButtonList;
+ typedef YRadioButtonList::iterator		YRadioButtonListIterator;
+diff --git a/src/YRichText.h b/src/YRichText.h
+index 149bfb3..86b3f80 100644
+--- a/src/YRichText.h
++++ b/src/YRichText.h
+@@ -30,7 +30,7 @@
+ #include "ImplPtr.h"
+ 
+ 
+-class YRichTextPrivate;
++struct YRichTextPrivate;
+ 
+ 
+ /**
+diff --git a/src/YSelectionBox.h b/src/YSelectionBox.h
+index 7fc4fb8..9bbf9f3 100644
+--- a/src/YSelectionBox.h
++++ b/src/YSelectionBox.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YSelectionWidget.h"
+ 
+-class YSelectionBoxPrivate;
++struct YSelectionBoxPrivate;
+ 
+ 
+ /**
+diff --git a/src/YSelectionWidget.h b/src/YSelectionWidget.h
+index abbdfb4..cf05afd 100644
+--- a/src/YSelectionWidget.h
++++ b/src/YSelectionWidget.h
+@@ -29,7 +29,7 @@
+ #include "YItem.h"
+ #include "ImplPtr.h"
+ 
+-class YSelectionWidgetPrivate;
++struct YSelectionWidgetPrivate;
+ 
+ /**
+  * Base class for various kinds of multi-value widgets.
+diff --git a/src/YSimpleInputField.h b/src/YSimpleInputField.h
+index 6d926d4..b93fe6b 100644
+--- a/src/YSimpleInputField.h
++++ b/src/YSimpleInputField.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YWidget.h"
+ 
+-class YSimpleInputFieldPrivate;
++struct YSimpleInputFieldPrivate;
+ 
+ 
+ /**
+diff --git a/src/YSlider.h b/src/YSlider.h
+index d29f6b8..4bcd7d3 100644
+--- a/src/YSlider.h
++++ b/src/YSlider.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YIntField.h"
+ 
+-class YSliderPrivate;
++struct YSliderPrivate;
+ 
+ 
+ /**
+diff --git a/src/YSpacing.h b/src/YSpacing.h
+index e8aafd3..066cd68 100644
+--- a/src/YSpacing.h
++++ b/src/YSpacing.h
+@@ -28,7 +28,7 @@
+ #include "YWidget.h"
+ #include "ImplPtr.h"
+ 
+-class YSpacingPrivate;
++struct YSpacingPrivate;
+ 
+ 
+ /**
+diff --git a/src/YSquash.h b/src/YSquash.h
+index 4bd0fb6..3804cc4 100644
+--- a/src/YSquash.h
++++ b/src/YSquash.h
+@@ -29,7 +29,7 @@
+ #include "ImplPtr.h"
+ 
+ 
+-class YSquashPrivate;
++struct YSquashPrivate;
+ 
+ /**
+  * HSquash, VSquash HVSquash: reduce child to its preferred size.
+diff --git a/src/YTable.h b/src/YTable.h
+index 6694f10..469b8ca 100644
+--- a/src/YTable.h
++++ b/src/YTable.h
+@@ -30,7 +30,7 @@
+ #include "YTableItem.h"
+ #include "YTableHeader.h"
+ 
+-class YTablePrivate;
++struct YTablePrivate;
+ 
+ 
+ 
+diff --git a/src/YTableHeader.h b/src/YTableHeader.h
+index 70166c2..4ae99b4 100644
+--- a/src/YTableHeader.h
++++ b/src/YTableHeader.h
+@@ -31,7 +31,7 @@
+ 
+ 
+ 
+-class YTableHeaderPrivate;
++struct YTableHeaderPrivate;
+ 
+ /**
+  * Helper class for YTable for table column properties:
+diff --git a/src/YTimeField.h b/src/YTimeField.h
+index ab2f9a3..f3a7b94 100644
+--- a/src/YTimeField.h
++++ b/src/YTimeField.h
+@@ -27,7 +27,7 @@
+ 
+ #include "YSimpleInputField.h"
+ 
+-class YTimeFieldPrivate;
++struct YTimeFieldPrivate;
+ 
+ 
+ /**
+diff --git a/src/YTimezoneSelector.cc b/src/YTimezoneSelector.cc
+index 9259b64..e2f9b6f 100644
+--- a/src/YTimezoneSelector.cc
++++ b/src/YTimezoneSelector.cc
+@@ -32,7 +32,7 @@
+ 
+ class YTimezoneSelectorPrivate
+ {
+-   bool dummy;
++//   bool dummy;
+ };
+ 
+ 
+diff --git a/src/YTree.h b/src/YTree.h
+index 14fa279..70e1364 100644
+--- a/src/YTree.h
++++ b/src/YTree.h
+@@ -28,7 +28,7 @@
+ #include "YSelectionWidget.h"
+ 
+ class YTreeItem;
+-class YTreePrivate;
++struct YTreePrivate;
+ 
+ 
+ /**
+diff --git a/src/YUILog.h b/src/YUILog.h
+index 0890bc5..4a927a7 100644
+--- a/src/YUILog.h
++++ b/src/YUILog.h
+@@ -64,7 +64,7 @@
+ 
+ 
+ 
+-class YUILogPrivate;
++struct YUILogPrivate;
+ 
+ enum YUILogLevel_t
+ {
+diff --git a/src/YWidget.h b/src/YWidget.h
+index 5b285d0..636a41b 100644
+--- a/src/YWidget.h
++++ b/src/YWidget.h
+@@ -45,7 +45,7 @@ typedef YChildrenManager<YWidget>	YWidgetChildrenManager;
+ typedef YSingleChildManager<YWidget>	YSingleWidgetChildManager;
+ typedef YChildrenRejector<YWidget>	YWidgetChildrenRejector;
+ 
+-class YWidgetPrivate;
++struct YWidgetPrivate;
+ 
+ 
+ /**
+diff --git a/src/YWizard.h b/src/YWizard.h
+index 7671cbf..975b597 100644
+--- a/src/YWizard.h
++++ b/src/YWizard.h
+@@ -28,7 +28,7 @@
+ #include "YWidget.h"
+ 
+ class YMacroRecorder;
+-class YWizardPrivate;
++struct YWizardPrivate;
+ class YPushButton;
+ class YReplacePoint;
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_git.bb
new file mode 100644
index 0000000..4294528
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/libyui/libyui_git.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Libyui is a widget abstraction library providing Qt, GTK and ncurses frontends."
+LICENSE = "LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING.gpl-3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \
+                    file://COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+                   "
+
+SRC_URI = "git://github.com/libyui/libyui.git \
+           file://0001-Fix-GCC-8-warning.patch \
+           file://0001-Fix-build-with-clang.patch \
+           "
+
+PV = "3.3.3+git"
+SRCREV = "2b634cb7821e2e79dd4b7a73caf8e67c50189376"
+
+S = "${WORKDIR}/git"
+
+inherit cmake gettext pkgconfig
+
+DEPENDS += "boost"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_configure_prepend () {
+        cd ${S}
+        ./bootstrap.sh
+        cd -
+}
+
+do_install_append () {
+        if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then
+            mv ${D}/usr/lib64 ${D}/usr/lib
+        fi
+}
+
+do_install_append_class-nativesdk () {
+        mkdir -p ${D}/${base_prefix}
+        mv ${D}/usr ${D}/${base_prefix}
+}
+
+FILES_${PN}-dev = "${libdir}/* ${includedir}/yui*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb
index b354ae7..c35a0c7 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb
@@ -16,9 +16,11 @@
 # depends on virtual/libx11
 REQUIRED_DISTRO_FEATURES = "x11"
 
-ALTERNATIVE_${PN}-core = "x-window-manager"
+ALTERNATIVE_${PN}-core = "x-window-manager x-session-manager"
 ALTERNATIVE_TARGET[x-window-manager] = "${bindir}/openbox"
 ALTERNATIVE_PRIORITY[x-window-manager] = "10"
+ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/openbox-session"
+ALTERNATIVE_PRIORITY[x-session-manager] = "100"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[imlib2] = "--enable-imlib2,--disable-imlib2,imlib2"
@@ -38,7 +40,7 @@
 }
 
 RDEPENDS_${PN} += "${PN}-core ${PN}-config ${PN}-theme-clearlooks"
-FILES_${PN}-core = "${bindir}/openbox ${libdir}/*${SOLIBS}"
+FILES_${PN}-core = "${bindir}/openbox ${bindir}/openbox-session ${libdir}/*${SOLIBS}"
 
 FILES_${PN}-lxde += "${datadir}/lxde/ \
                      ${datadir}/lxpanel \
@@ -46,6 +48,7 @@
                      ${datadir}/icons"
 
 FILES_${PN}-gnome += " \
+    ${bindir}/openbox-gnome-session \
     ${datadir}/gnome \
     ${datadir}/gnome-session \
 "
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/packagegroups/packagegroup-fonts-truetype.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/packagegroups/packagegroup-fonts-truetype.bb
index 632e7d4..3069d2d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/packagegroups/packagegroup-fonts-truetype.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/packagegroups/packagegroup-fonts-truetype.bb
@@ -5,7 +5,7 @@
 PV = "1.0"
 PR = "r2"
 
-inherit packagegroup allarch
+inherit packagegroup
 
 PACKAGES += "\
     ${PN}-core \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm_2.40.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm_2.40.1.bb
index 02bb1cc..e0f72cd 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm_2.40.1.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/pango/pangomm_2.40.1.bb
@@ -12,7 +12,9 @@
 SRC_URI[md5sum] = "874eadd9434613dbacf0272c82c3ac23"
 SRC_URI[sha256sum] = "9762ee2a2d5781be6797448d4dd2383ce14907159b30bc12bf6b08e7227be3af"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 EXTRA_OECONF = " --disable-documentation "
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/qrencode/qrencode_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/qrencode/qrencode_git.bb
index 6a159a7..f539775 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/qrencode/qrencode_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/qrencode/qrencode_git.bb
@@ -4,9 +4,9 @@
 SECTION = "libs"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
-PV = "3.4.4+git${SRCPV}"
+PV = "4.0.0+git${SRCPV}"
 
-SRCREV = "1b565c7b599029818fc596e7da4371a3083da36c"
+SRCREV = "07f3c5d4bf9136711422cc7dbf28aff469da220a"
 SRC_URI = "git://github.com/fukuchi/libqrencode.git"
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/Makefile.oe b/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/Makefile.oe
deleted file mode 100644
index 2ee6934..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/Makefile.oe
+++ /dev/null
@@ -1,64 +0,0 @@
-# Makefile for slim - OpenEmbedded
-#######################################################
-
-
-SLIMLDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg -lrt -lpthread
-CUSTOM=-DHAVE_SHADOW
-
-USE_PAM=1
-ifdef USE_PAM
-SLIMLDFLAGS+= -lpam
-CUSTOM+= -DUSE_PAM
-endif
-
-#######################################################
-
-NAME=slim
-VERSION=1.3.2
-
-DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
-		-DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
-
-OBJECTS=jpeg.o png.o main.o image.o numlock.o cfg.o switchuser.o app.o \
-	panel.o util.o
-ifdef USE_PAM
-OBJECTS+=PAM.o
-endif
-
-all: slim
-
-slim: $(OBJECTS)
-	$(CXX) $(OBJECTS) $(LDFLAGS) $(SLIMLDFLAGS) -o $(NAME)
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
-
-.c.o:
-	$(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
-
-install: slim install-theme
-	install -D -m 755 slim $(DESTDIR)$(PREFIX)/bin/slim
-	install -D -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1/slim.1
-	test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
-		install -D -m 644 slim.conf $(DESTDIR)$(CFGDIR)/slim.conf
-
-clean:
-	@rm -f slim *.o
-
-dist:
-	@rm -rf $(NAME)-$(VERSION)
-	@mkdir $(NAME)-$(VERSION)
-	@cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog INSTALL README TODO \
-		xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
-	@rm -rf $(NAME)-$(VERSION)/themes/.svn	$(NAME)-$(VERSION)/themes/default/.svn
-	@tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
-	@rm -rf $(NAME)-$(VERSION)
-
-
-install-theme:
-	install -D -m 644 themes/default/slim.theme \
-		 $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
-	install -D -m 644 themes/default/panel.png \
-		 $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
-	install -D -m 644 themes/default/background.jpg \
-		 $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim-dynwm b/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim-dynwm
deleted file mode 100644
index 49c9d47..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim-dynwm
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-update_slim_wmlist
-if [ "x$1" = "x-nodaemon" ]; then
-  shift
-  exec slim "$@"
-else
-  slim -d "$@"
-fi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim.pamd b/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim.pamd
deleted file mode 100644
index 80c34b1..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim.pamd
+++ /dev/null
@@ -1,19 +0,0 @@
-# Begin /etc/pam.d/slim
-
-auth       required     pam_shells.so
-auth       include      common-auth
-auth       optional     pam_securetty.so
-auth       optional     pam_gnome_keyring.so
-
-account    required     pam_nologin.so
-account    include      common-account
-
-password   include      common-password
-
-session    include      common-session
-session    required     pam_mkhomedir.so skel=/etc/skel/ umask=0022
-session    optional     pam_lastlog.so nowtmp
-session    optional     pam_mail.so dir=/var/mail standard
-session    optional     pam_gnome_keyring.so  auto_start
-
-# End /etc/pam.d/slim
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim.service b/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim.service
deleted file mode 100644
index 341351a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/slim.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=SLiM Simple Login Manager
-Requires=dev-tty7.device
-After=dev-tty7.device systemd-user-sessions.service
-
-[Service]
-ExecStart=/usr/bin/slim -nodaemon
-StandardOutput=syslog
-
-[Install]
-WantedBy=graphical.target
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/update_slim_wmlist b/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/update_slim_wmlist
deleted file mode 100644
index 0f11653..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/slim/slim/update_slim_wmlist
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/perl -w
-#
-# update_slim_wmlist, based on:
-# update_wdm_wmlist, (c) 1998 Marcelo Magallón <mmagallo@debian.org>
-# rewriten to use the x-window-manager alternative
-# modified to also use the x-session-manager alternative by Arthur Korn
-# Copyright 2000 Wichert Akkerman <wakkerma@debian.org>
-# Modified to use the freedesktop.org .desktop like kdm and gdm
-#
-# This script will read the list of installed window managers from
-# the freedesktop .desktop files in <etc>/X11/sessions/:<etc>/dm/Sessions/:
-# <share>/xsessions/
-# and update the sessions line in /etc/slim.conf.
-# BEWARE: It doesn't ask any questions about this. It just does it. It
-# takes an optional list of window managers.
-
-use strict;
-use File::DesktopEntry;
-
-my $wm_list='';
-my %desktop_files;
-
-unless (@ARGV) {
-    #my @wm_list = ('default');
-    my @wm_list;
-    foreach my $dir ('/etc/X11/sessions/','/etc/dm/Sessions/','/usr/share/xsessions/') {
-	    next unless (opendir DIR, $dir);
-	    my @files;
-	    @files = grep { /\.desktop$/ && -r "$dir/$_" } readdir(DIR);
-	    foreach my $file (@files) {
-		   push @{$desktop_files{$file}}, "$dir/$file";
-	    }
-    }
-    DESKTOP: foreach my $desktop_file (keys(%desktop_files)) {
-	    foreach my $file (@{$desktop_files{$desktop_file}}) {
-		    my $entry = File::DesktopEntry->new_from_file($file);
-		    next DESKTOP if (defined($entry->get_value('Hidden'))
-			and $entry->get_value('Hidden') eq 'true');
-		    if ($entry->get_value('Name') =~ /^gnome$/i) {
-			    push (@wm_list, 'gnome');
-		    }
-		    elsif ($entry->get_value('Name') =~ /^kde$/i) {
-			    push (@wm_list, 'kde');
-		    }
-		    elsif (defined($entry->get_value('Exec'))) {
-			    push (@wm_list, $entry->get_value('Exec'));
-		    }
-		    else { # not found, go to next file
-			    next;
-		    }
-		    # found, proceed to next destop file
-		    next DESKTOP;
-	    }
-    }
-   $wm_list = join (',', sort @wm_list) . ',custom';
-} else {
-    $wm_list = join (',', sort @ARGV);
-}
-
-open (SLIM_CONFIG_FILE, '</etc/slim.conf')
-    or die "Can't open /etc/slim.conf for reading: $!";
-open (NEW_SLIM_CONFIG_FILE, '>/etc/slim.conf.new')
-    or die "Can't open /etc/slim.conf.new for writing: $!";
-
-while (<SLIM_CONFIG_FILE>) {
-    s|^(sessions\s*).*|$1$wm_list|;
-    print NEW_SLIM_CONFIG_FILE;
-}
-
-close(SLIM_CONFIG_FILE);
-close(NEW_SLIM_CONFIG_FILE);
-
-rename '/etc/slim.conf.new', '/etc/slim.conf'
-    or die "Can't rename /etc/slim.conf.new: $!";
-
-exit 0;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.1.bb
deleted file mode 100644
index e7c48ff..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.1.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "An abstraction layer for touchscreen panel events"
-DESCRIPTION = "Tslib is an abstraction layer for touchscreen panel \
-events, as well as a filter stack for the manipulation of those events. \
-Tslib is generally used on embedded devices to provide a common user \
-space interface to touchscreen functionality."
-HOMEPAGE = "http://tslib.org/"
-
-AUTHOR = "Russell King w/ plugins by Chris Larson et. al."
-SECTION = "base"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f30a9716ef3762e3467a2f62bf790f0a"
-
-SRC_URI = "https://github.com/kergoth/tslib/releases/download/${PV}/tslib-${PV}.tar.xz;downloadfilename=tslib-${PV}.tar.xz \
-           file://ts.conf \
-           file://tslib.sh \
-"
-
-SRC_URI[md5sum] = "14771f8607b341bb4b297819d37e837d"
-SRC_URI[sha256sum] = "fe35e5f710ea933b118f710e2ce4403ac076fe69926b570333867d4de082a51c"
-
-UPSTREAM_CHECK_URI = "https://github.com/kergoth/tslib/releases"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--enable-shared --disable-h3600 --enable-input --disable-corgi --disable-collie --disable-mk712 --disable-arctic2 --disable-ucb1x00"
-
-do_install_prepend() {
-    install -m 0644 ${WORKDIR}/ts.conf ${S}/etc/ts.conf
-}
-
-do_install_append() {
-    install -d ${D}${sysconfdir}/profile.d/
-    install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/
-}
-
-# People should consider using udev's /dev/input/touchscreen0 symlink
-# instead of detect-stylus
-#RDEPENDS_tslib-conf_weird-machine = "detect-stylus"
-RPROVIDES_tslib-conf = "libts-0.0-conf"
-
-PACKAGES =+ "tslib-conf tslib-tests tslib-calibrate"
-DEBIAN_NOAUTONAME_tslib-conf = "1"
-DEBIAN_NOAUTONAME_tslib-tests = "1"
-DEBIAN_NOAUTONAME_tslib-calibrate = "1"
-
-RDEPENDS_${PN} = "tslib-conf"
-RRECOMMENDS_${PN} = "pointercal"
-
-FILES_${PN}-dev += "${libdir}/ts/*.la"
-FILES_tslib-conf = "${sysconfdir}/ts.conf ${sysconfdir}/profile.d/tslib.sh ${datadir}/tslib"
-FILES_${PN} = "${libdir}/*.so.* ${libdir}/ts/*.so*"
-FILES_tslib-calibrate += "${bindir}/ts_calibrate"
-FILES_tslib-tests = "${bindir}/ts_harvest ${bindir}/ts_print ${bindir}/ts_print_raw ${bindir}/ts_test"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.15.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.15.bb
new file mode 100644
index 0000000..7ae941a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/tslib/tslib_1.15.bb
@@ -0,0 +1,82 @@
+SUMMARY = "An abstraction layer for touchscreen panel events"
+DESCRIPTION = "Tslib is an abstraction layer for touchscreen panel \
+events, as well as a filter stack for the manipulation of those events. \
+Tslib is generally used on embedded devices to provide a common user \
+space interface to touchscreen functionality."
+HOMEPAGE = "http://tslib.org/"
+
+AUTHOR = "Martin Kepplinger <martink@posteo.de>"
+SECTION = "base"
+LICENSE = "LGPLv2+ & GPLv2+"
+LIC_FILES_CHKSUM = "\
+    file://COPYING;md5=fc178bcd425090939a8b634d1d6a9594 \
+    file://tests/COPYING;md5=a23a74b3f4caf9616230789d94217acb \
+"
+
+SRC_URI = "https://github.com/kergoth/tslib/releases/download/${PV}/tslib-${PV}.tar.xz;downloadfilename=tslib-${PV}.tar.xz \
+           file://ts.conf \
+           file://tslib.sh \
+"
+SRC_URI[md5sum] = "9ff36788c9ab76a10b58422227b9629e"
+SRC_URI[sha256sum] = "7ce48807cab655076d71a1ceef3ed0ab8a25df98074981d4a8fd1477ee5f710c"
+
+UPSTREAM_CHECK_URI = "https://github.com/kergoth/tslib/releases"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "debounce dejitter iir linear median pthres skip lowpass invert variance input touchkit waveshare"
+PACKAGECONFIG[debounce] = "--enable-debounce,--disable-debounce"
+PACKAGECONFIG[dejitter] = "--enable-dejitter,--disable-dejitter"
+PACKAGECONFIG[iir] = "--enable-iir,--disable-iir"
+PACKAGECONFIG[linear] = "--enable-linear,--disable-linear"
+PACKAGECONFIG[median] = "--enable-median,--disable-median"
+PACKAGECONFIG[pthres] = "--enable-pthres,--disable-pthres"
+PACKAGECONFIG[skip] = "--enable-skip,--disable-skip"
+PACKAGECONFIG[lowpass] = "--enable-lowpass,--disable-lowpass"
+PACKAGECONFIG[invert] = "--enable-invert,--disable-invert"
+PACKAGECONFIG[variance] = "--enable-variance,--disable-variance"
+PACKAGECONFIG[input] = "--enable-input,--disable-input"
+PACKAGECONFIG[tatung] = "--enable-tatung,--disable-tatung"
+PACKAGECONFIG[touchkit] = "--enable-touchkit,--disable-touchkit"
+PACKAGECONFIG[waveshare] = "--enable-waveshare,--disable-waveshare"
+PACKAGECONFIG[ucb1x00] = "--enable-ucb1x00,--disable-ucb1x00"
+PACKAGECONFIG[mk712] = "--enable-mk712,--disable-mk712"
+PACKAGECONFIG[h3600] = "--enable-h3600,--disable-h3600"
+PACKAGECONFIG[dmc] = "--enable-dmc,--disable-dmc"
+PACKAGECONFIG[linear-h2200] = "--enable-linear-h2200,--disable-linear-h2200"
+PACKAGECONFIG[corgi] = "--enable-corgi,--disable-corgi"
+PACKAGECONFIG[collie] = "--enable-collie,--disable-collie"
+PACKAGECONFIG[arctic2] = "--enable-arctic2,--disable-arctic2"
+PACKAGECONFIG[dmc_dus3000] = "--enable-dmc_dus3000,--disable-dmc_dus3000"
+PACKAGECONFIG[cy8mrln-palmpre] = "--enable-cy8mrln-palmpre,--disable-cy8mrln-palmpre"
+PACKAGECONFIG[galax] = "--enable-galax,--disable-galax"
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+
+do_install_prepend() {
+    install -m 0644 ${WORKDIR}/ts.conf ${S}/etc/ts.conf
+}
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/profile.d/
+    install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/
+}
+
+RPROVIDES_tslib-conf = "libts-0.0-conf"
+
+PACKAGES =+ "tslib-conf tslib-tests tslib-calibrate tslib-uinput"
+DEBIAN_NOAUTONAME_tslib-conf = "1"
+DEBIAN_NOAUTONAME_tslib-tests = "1"
+DEBIAN_NOAUTONAME_tslib-calibrate = "1"
+DEBIAN_NOAUTONAME_tslib-uinput = "1"
+
+RDEPENDS_${PN} = "tslib-conf"
+RRECOMMENDS_${PN} = "pointercal"
+
+FILES_${PN}-dev += "${libdir}/ts/*.la"
+FILES_tslib-conf = "${sysconfdir}/ts.conf ${sysconfdir}/profile.d/tslib.sh ${datadir}/tslib"
+FILES_${PN} = "${libdir}/*.so.* ${libdir}/ts/*.so*"
+FILES_tslib-calibrate += "${bindir}/ts_calibrate"
+FILES_tslib-uinput += "${bindir}/ts_uinput"
+
+FILES_tslib-tests = "${bindir}/ts_harvest ${bindir}/ts_print ${bindir}/ts_print_raw ${bindir}/ts_print_mt \
+                     ${bindir}/ts_test ${bindir}/ts_test_mt ${bindir}/ts_verify ${bindir}/ts_finddev"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/vdpau/libvdpau_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/vdpau/libvdpau_git.bb
index 31f4df4..31bcce0 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/vdpau/libvdpau_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/vdpau/libvdpau_git.bb
@@ -12,7 +12,9 @@
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_install_append() {
     rm -f ${D}${libdir}/*/*.la
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xcursorgen/xcursorgen_1.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xcursorgen/xcursorgen_1.0.5.bb
index 27a38c1..a21dc42 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xcursorgen/xcursorgen_1.0.5.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xcursorgen/xcursorgen_1.0.5.bb
@@ -7,6 +7,8 @@
 SRC_URI[md5sum] = "09f56978a62854534deacc8aa8ff3031"
 SRC_URI[sha256sum] = "bc7171a0fa212da866fca2301241630e2009aea8c4ddb75f21b51a31c2e4c581"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/bdftopcf_1.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/bdftopcf_1.0.5.bb
deleted file mode 100644
index 35d5002..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/bdftopcf_1.0.5.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require recipes-graphics/xorg-app/xorg-app-common.inc
-
-SUMMARY = "bdftopcf is a tool to convert BDF fonts to PCF fonts"
-HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/bdftopcf/"
-SECTION = "x11/app"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f9a35333adf75edd1eaef84bca65a490"
-DEPENDS = "libxfont"
-
-SRC_URI[md5sum] = "53a48e1fdfec29ab2e89f86d4b7ca902"
-SRC_URI[sha256sum] = "38f447be0c61f94c473f128cf519dd0cff63b5d7775240a2e895a183a61e2026"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/bdftopcf_1.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/bdftopcf_1.1.bb
new file mode 100644
index 0000000..9116b5f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/bdftopcf_1.1.bb
@@ -0,0 +1,13 @@
+require recipes-graphics/xorg-app/xorg-app-common.inc
+
+SUMMARY = "bdftopcf is a tool to convert BDF fonts to PCF fonts"
+HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/bdftopcf/"
+SECTION = "x11/app"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f9a35333adf75edd1eaef84bca65a490"
+DEPENDS = "libxfont"
+
+SRC_URI[md5sum] = "2a455d3c02390597feb9cefb3fe97a45"
+SRC_URI[sha256sum] = "4b4df05fc53f1e98993638d6f7e178d95b31745c4568cee407e167491fd311a2"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/sessreg_1.1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/sessreg_1.1.0.bb
deleted file mode 100644
index 3885d61..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/sessreg_1.1.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require recipes-graphics/xorg-app/xorg-app-common.inc
-
-SUMMARY = "a simple program for managing utmp/wtmp entries"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d938a70c8280c265a1ccd2954365d185"
-SRC_URI += "file://0001-Makefile.am-Error-Fix.patch"
-SRC_URI[md5sum] = "e238c89dabc566e1835e1ecb61b605b9"
-SRC_URI[sha256sum] = "551177657835e0902b5eee7b19713035beaa1581bbd3c6506baa553e751e017c"
-
-CFLAGS_append_libc-musl = " -D_WTMPX_FILE=WTMP_FILE -D_PATH_WTMPX=_PATH_WTMP -D_UTMPX_FILE=UTMP_FILE -D_PATH_UTMPX=_PATH_UTMP "
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/sessreg_1.1.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/sessreg_1.1.1.bb
new file mode 100644
index 0000000..d2afa78
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/sessreg_1.1.1.bb
@@ -0,0 +1,11 @@
+require recipes-graphics/xorg-app/xorg-app-common.inc
+
+SUMMARY = "a simple program for managing utmp/wtmp entries"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d938a70c8280c265a1ccd2954365d185"
+SRC_URI += "file://0001-Makefile.am-Error-Fix.patch"
+SRC_URI[md5sum] = "e475167a892b589da23edf8edf8c942d"
+SRC_URI[sha256sum] = "78a76ae3f3f6a26547a34630d1b740f42344848b5fb6d7c9c7f7da255e35a6e1"
+
+CFLAGS_append_libc-musl = " -D_WTMPX_FILE=WTMP_FILE -D_PATH_WTMPX=_PATH_WTMP -D_UTMPX_FILE=UTMP_FILE -D_PATH_UTMPX=_PATH_UTMP "
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsclients_1.1.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsclients_1.1.3.bb
deleted file mode 100644
index 583a531..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsclients_1.1.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require recipes-graphics/xorg-app/xorg-app-common.inc
-
-SUMMARY = "X.Org X11 X client utilities"
-HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xlsclients/"
-DESCRIPTION = "xlsclients is a utility for listing information about the \
-client applications running on a X11 server."
-SECTION = "x11/app"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=350e1b718a56df39cfe8ca9345ea4575"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "9fbf6b174a5138a61738a42e707ad8f5"
-SRC_URI[sha256sum] = "5d9666fcc6c3de210fc70d5a841a404955af709a616fde530fe4e8f7723e3d3d"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsclients_1.1.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsclients_1.1.4.bb
new file mode 100644
index 0000000..42bda7e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsclients_1.1.4.bb
@@ -0,0 +1,14 @@
+require recipes-graphics/xorg-app/xorg-app-common.inc
+
+SUMMARY = "X.Org X11 X client utilities"
+HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xlsclients/"
+DESCRIPTION = "xlsclients is a utility for listing information about the \
+client applications running on a X11 server."
+SECTION = "x11/app"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=350e1b718a56df39cfe8ca9345ea4575"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "4fa92377e0ddc137cd226a7a87b6b29a"
+SRC_URI[sha256sum] = "773f2af49c7ea2c44fba4213bee64325875c1b3c9bc4bbcd8dac9261751809c1"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.5.bb
deleted file mode 100644
index 9feed75..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.5.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require recipes-graphics/xorg-app/xorg-app-common.inc
-
-SUMMARY = "server font list displayer for X"
-HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xlsfonts/"
-SECTION = "x11/app"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5ec74dd7ea4d10c4715a7c44f159a40b"
-
-SRC_URI[md5sum] = "6f5711bef8c765857a0887a91476283b"
-SRC_URI[sha256sum] = "40295bec35077cee93be2e4c26cc00268ed6ace779ae6e97766a866c1e3927fa"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.6.bb
new file mode 100644
index 0000000..76b76e4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xlsfonts_1.0.6.bb
@@ -0,0 +1,10 @@
+require recipes-graphics/xorg-app/xorg-app-common.inc
+
+SUMMARY = "server font list displayer for X"
+HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xlsfonts/"
+SECTION = "x11/app"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5ec74dd7ea4d10c4715a7c44f159a40b"
+
+SRC_URI[md5sum] = "5774fd4f518b3f338f2b28f270e04bfc"
+SRC_URI[sha256sum] = "89b80b3a030006ab6cef717be286c12f2477894b227158b1e6133274f6ebd368"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_330.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_330.bb
index e3bb0fb..16f9b78 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_330.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xterm_330.bb
@@ -27,3 +27,8 @@
 }
 
 FILES_${PN} += "/usr/lib/X11"
+
+# busybox can supply resize too
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "resize"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xwud_1.0.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xwud_1.0.4.bb
deleted file mode 100644
index 33bd7f0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xwud_1.0.4.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require recipes-graphics/xorg-app/xorg-app-common.inc
-
-SUMMARY = "X.Org X11 X client utilities"
-HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xwud/"
-DESCRIPTION = "xwud allows X users to display in a window an image saved \
-in a specially formatted dump file, such as produced by xwd."
-SECTION = "x11/app"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=31e8892c80b7a0c1c5f37c8e8ae6d794"
-
-SRC_URI[md5sum] = "3025b152b4f13fdffd0c46d0be587be6"
-SRC_URI[sha256sum] = "d6b3a09ccfe750868e26bd2384900ab5ff0d434f7f40cd272a50eda8aaa1f8bd"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xwud_1.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xwud_1.0.5.bb
new file mode 100644
index 0000000..7cb550d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xwud_1.0.5.bb
@@ -0,0 +1,12 @@
+require recipes-graphics/xorg-app/xorg-app-common.inc
+
+SUMMARY = "X.Org X11 X client utilities"
+HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xwud/"
+DESCRIPTION = "xwud allows X users to display in a window an image saved \
+in a specially formatted dump file, such as produced by xwd."
+SECTION = "x11/app"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=31e8892c80b7a0c1c5f37c8e8ae6d794"
+
+SRC_URI[md5sum] = "79972093bb0766fcd0223b2bd6d11932"
+SRC_URI[sha256sum] = "99997051f8a892313f22edf41dab45864e86e7062ee9012d5dbb6a40fc6b10a9"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-data/xorg-data-common.inc b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-data/xorg-data-common.inc
index b230962..cb6b5ac 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-data/xorg-data-common.inc
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xorg-data/xorg-data-common.inc
@@ -7,4 +7,6 @@
 SRC_URI = "${XORG_MIRROR}/individual/data/${BP}.tar.bz2"
 S = "${WORKDIR}/${XORG_PN}-${PV}"
 
-inherit autotools pkgconfig
+inherit distro_features_check autotools pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-COPYING-add-GPLv2-license-file.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-COPYING-add-GPLv2-license-file.patch
index 29dd71a..2bfe85b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-COPYING-add-GPLv2-license-file.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-COPYING-add-GPLv2-license-file.patch
@@ -1,7 +1,7 @@
-From 834fa06920f88ceedf752964c8e296c653d541e4 Mon Sep 17 00:00:00 2001
+From f919725918fad2b32504f89a28310fcae4ab0406 Mon Sep 17 00:00:00 2001
 From: Yu Ke <ke.yu@intel.com>
 Date: Wed, 11 Apr 2012 14:26:16 +0200
-Subject: [PATCH 01/12] COPYING: add GPLv2 license file
+Subject: [PATCH] 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
@@ -9,9 +9,10 @@
 
 Signed-off-by: Yu Ke <ke.yu@intel.com>
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- COPYING |  339 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 339 insertions(+), 0 deletions(-)
+ COPYING | 339 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 339 insertions(+)
  create mode 100644 COPYING
 
 diff --git a/COPYING b/COPYING
@@ -359,6 +360,3 @@
 +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.
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-Don-t-install-Xsession-or-Xserver.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-Don-t-install-Xsession-or-Xserver.patch
index 26288d6..0ed12d1 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-Don-t-install-Xsession-or-Xserver.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0001-Don-t-install-Xsession-or-Xserver.patch
@@ -1,4 +1,4 @@
-From c92ce6a4b3622874f820b5ec487a2b63f519826c Mon Sep 17 00:00:00 2001
+From 1002a1137b140dad3319bf3206fec5b6c6b74fea Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Thu, 10 Nov 2016 14:33:05 +0200
 Subject: [PATCH] Don't install Xsession or Xserver
@@ -8,15 +8,16 @@
 be used as before.
 
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
 ---
- Makefile | 1 -
- 1 file changed, 1 deletion(-)
+ Makefile | 2 --
+ 1 file changed, 2 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index caa5de1..7e36bbc 100644
+index caa5de1..9428205 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -20,7 +20,5 @@ install-program:
+@@ -20,8 +20,6 @@ install-program:
  	install -m 755 run-calibrate.sh $(DESTDIR)$(PREFIX)/bin/run-calibrate.sh
  	install -m 644 X11/Xdefaults $(DESTDIR)/etc/X11/Xdefaults
  	install -m 755 X11/Xinit $(DESTDIR)/etc/X11/Xinit
@@ -25,6 +26,3 @@
  	install -m 755 X11/xserver-common $(DESTDIR)/etc/X11/xserver-common
  	install -m 755 X11/functions $(DESTDIR)/etc/X11/functions
  	install -d $(DESTDIR)/etc/X11/xmodmap
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0002-add-setdpi-Xinit.d-script.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0002-add-setdpi-Xinit.d-script.patch
index 23b5345..0be3fa5 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0002-add-setdpi-Xinit.d-script.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0002-add-setdpi-Xinit.d-script.patch
@@ -1,12 +1,13 @@
-From 3d1a1a8273112668927a6c6bb3e361e896f5b229 Mon Sep 17 00:00:00 2001
+From 3b5f431a370054bfc090796e8d55de8c8cea46f4 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:28:45 +0200
-Subject: [PATCH 02/12] add setdpi Xinit.d script
+Subject: [PATCH] add setdpi Xinit.d script
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/Xinit.d/50setdpi |   92 ++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 92 insertions(+), 0 deletions(-)
+ X11/Xinit.d/50setdpi | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 92 insertions(+)
  create mode 100644 X11/Xinit.d/50setdpi
 
 diff --git a/X11/Xinit.d/50setdpi b/X11/Xinit.d/50setdpi
@@ -107,6 +108,3 @@
 +
 +set_dpi "$SET_SCREEN_DPI"
 +set_rxvt_font "$SCREEN_DPI"
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0006-add-support-for-etc-X11-xserver-system.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0006-add-support-for-etc-X11-xserver-system.patch
index 7ee8572..53a283f 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0006-add-support-for-etc-X11-xserver-system.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0006-add-support-for-etc-X11-xserver-system.patch
@@ -1,15 +1,16 @@
-From 0c42e1fb84cc2bfe768bed17f3b979aca868cf64 Mon Sep 17 00:00:00 2001
+From b60e364c35d56a2a3164254d98c9931bfa3feed4 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:34:43 +0200
-Subject: [PATCH 06/12] add support for /etc/X11/xserver-system
+Subject: [PATCH] add support for /etc/X11/xserver-system
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/xserver-common |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
+ X11/xserver-common | 5 +++++
+ 1 file changed, 5 insertions(+)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
-index 4c7ed6e..6d8c9df 100644
+index 52655cb..bb7c2ff 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -204,3 +204,8 @@ fi
@@ -21,6 +22,3 @@
 +if [ -e /etc/X11/xserver-system ] ; then                    
 +       . /etc/X11/xserver-system                    
 +fi                    
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0007-use-own-functions-file-instead-etc-init.d-functions.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0007-use-own-functions-file-instead-etc-init.d-functions.patch
index 8791226..94a3540 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0007-use-own-functions-file-instead-etc-init.d-functions.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0007-use-own-functions-file-instead-etc-init.d-functions.patch
@@ -1,17 +1,18 @@
-From 63e6b9a54e1f12dbf7ddbfe3376fff4c382421a5 Mon Sep 17 00:00:00 2001
+From 492c65a32a4ae44c34580ed8ac5d3f50a155cfef Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:36:02 +0200
-Subject: [PATCH 07/12] use own functions file instead /etc/init.d/functions
+Subject: [PATCH] use own functions file instead /etc/init.d/functions
 
 * so we don't have to depend on initscripts
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- Makefile             |    1 +
- X11/Xinit.d/11zaurus |    2 +-
- X11/Xinit.d/12keymap |    2 +-
- X11/functions        |   11 +++++++++++
- X11/xserver-common   |    2 +-
+ Makefile             |  1 +
+ X11/Xinit.d/11zaurus |  2 +-
+ X11/Xinit.d/12keymap |  2 +-
+ X11/functions        | 11 +++++++++++
+ X11/xserver-common   |  2 +-
  5 files changed, 15 insertions(+), 3 deletions(-)
  create mode 100644 X11/functions
 
@@ -70,7 +71,7 @@
 +		{ gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
 +}
 diff --git a/X11/xserver-common b/X11/xserver-common
-index 6d8c9df..de92bb7 100644
+index bb7c2ff..d622f2a 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -30,7 +30,7 @@ if [ -f /etc/profile ]; then
@@ -82,6 +83,3 @@
  
  fallback_screen_arg() {
      geom=`fbset | grep geometry`
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0008-xserver-common-add-dpi-and-nocursor-params-for-gta01.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0008-xserver-common-add-dpi-and-nocursor-params-for-gta01.patch
index e35e4a7..90d0f25 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0008-xserver-common-add-dpi-and-nocursor-params-for-gta01.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0008-xserver-common-add-dpi-and-nocursor-params-for-gta01.patch
@@ -1,16 +1,17 @@
-From 0ee7bf87e0c83abc79de3a99dfa3c87dd5c5b229 Mon Sep 17 00:00:00 2001
+From e2abbe110e71a7b4b56564e6b9d58ffa7f34a9e8 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:37:29 +0200
-Subject: [PATCH 08/12] xserver-common: add dpi and nocursor params for gta01
- and gta02
+Subject: [PATCH] xserver-common: add dpi and nocursor params for gta01 and
+ gta02
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/xserver-common |    8 ++++++--
- 1 files changed, 6 insertions(+), 2 deletions(-)
+ X11/xserver-common | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
-index de92bb7..f76fa5f 100644
+index d622f2a..a2c0591 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -133,15 +133,19 @@ else
@@ -35,6 +36,3 @@
              fi
              ;;
          "motorola_ezx_platform")
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0009-xserver-common-add-support-for-n900-alias-nokia_rx-5.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0009-xserver-common-add-support-for-n900-alias-nokia_rx-5.patch
index 1a0bde8..8fb69b3 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0009-xserver-common-add-support-for-n900-alias-nokia_rx-5.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0009-xserver-common-add-support-for-n900-alias-nokia_rx-5.patch
@@ -1,16 +1,16 @@
-From 6d6caecb7172b9b33e7364564b0e6eabf67b6e8b Mon Sep 17 00:00:00 2001
+From f2d808cea5b9f69158f82e16c06f882a6db10d63 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:40:14 +0200
-Subject: [PATCH 09/12] xserver-common: add support for n900 alias
- nokia_rx-51_board
+Subject: [PATCH] xserver-common: add support for n900 alias nokia_rx-51_board
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/xserver-common |    7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
+ X11/xserver-common | 7 +++++++
+ 1 file changed, 7 insertions(+)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
-index f76fa5f..86ed17f 100644
+index a2c0591..b8c37e6 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -132,6 +132,13 @@ else
@@ -27,6 +27,3 @@
          "gta01" )
              DPI="280"
              if [ "$XSERVER" != "Xorg" ] ; then
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0010-xserver-common-add-support-for-nexus-S-alias-herring.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0010-xserver-common-add-support-for-nexus-S-alias-herring.patch
index 688be40..d30c7bb 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0010-xserver-common-add-support-for-nexus-S-alias-herring.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0010-xserver-common-add-support-for-nexus-S-alias-herring.patch
@@ -1,15 +1,16 @@
-From 52003e6b52b1417c1a0e57243d83349addcdacf6 Mon Sep 17 00:00:00 2001
+From a194ba2013f9e58cf73cd39b57be68386e501eda Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:40:44 +0200
-Subject: [PATCH 10/12] xserver-common: add support for nexus S alias herring
+Subject: [PATCH] xserver-common: add support for nexus S alias herring
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/xserver-common |    3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
+ X11/xserver-common | 3 +++
+ 1 file changed, 3 insertions(+)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
-index 86ed17f..5c9a6eb 100644
+index b8c37e6..9aa6b24 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -126,6 +126,9 @@ else
@@ -22,6 +23,3 @@
          "generic_omap1510/1610/1710")
              ARGS="$ARGS -screen ${SCREEN_SIZE}"
              DPI="225" ;;
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0011-xserver-common-add-support-for-nexus-one-alias-mahim.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0011-xserver-common-add-support-for-nexus-one-alias-mahim.patch
index f80456d..23e17f0 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0011-xserver-common-add-support-for-nexus-one-alias-mahim.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0011-xserver-common-add-support-for-nexus-one-alias-mahim.patch
@@ -1,16 +1,16 @@
-From 0ecc978b7d8cb6867646fb2a29523ebef3afa016 Mon Sep 17 00:00:00 2001
+From dfd832b35b6cb4cf2b6f2b51df7b0999f10c8ca1 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:41:06 +0200
-Subject: [PATCH 11/12] xserver-common: add support for nexus one alias
- mahimahi
+Subject: [PATCH] xserver-common: add support for nexus one alias mahimahi
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/xserver-common |    3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
+ X11/xserver-common | 3 +++
+ 1 file changed, 3 insertions(+)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
-index 5c9a6eb..55594fd 100644
+index 9aa6b24..8da926e 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -129,6 +129,9 @@ else
@@ -23,6 +23,3 @@
          "generic_omap1510/1610/1710")
              ARGS="$ARGS -screen ${SCREEN_SIZE}"
              DPI="225" ;;
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0012-xserver-common-add-support-for-gta04-alias-OpenPhoen.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0012-xserver-common-add-support-for-gta04-alias-OpenPhoen.patch
index 54a0329..5e794f6 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0012-xserver-common-add-support-for-gta04-alias-OpenPhoen.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0012-xserver-common-add-support-for-gta04-alias-OpenPhoen.patch
@@ -1,16 +1,16 @@
-From d194f0302582f1ca599f2ea58c15e15f4fd6bdef Mon Sep 17 00:00:00 2001
+From d9e05e53b30c66705852256ff5c603252aa94b2c Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Wed, 11 Apr 2012 14:41:52 +0200
-Subject: [PATCH 12/12] xserver-common: add support for gta04 alias
- OpenPhoenux
+Subject: [PATCH] xserver-common: add support for gta04 alias OpenPhoenux
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/xserver-common |    8 ++++++++
- 1 files changed, 8 insertions(+), 0 deletions(-)
+ X11/xserver-common | 8 ++++++++
+ 1 file changed, 8 insertions(+)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
-index 55594fd..434333e 100644
+index 8da926e..d9325dd 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -161,6 +161,14 @@ else
@@ -28,6 +28,3 @@
          "motorola_ezx_platform")
              ARGS="$ARGS -screen 240x320"
              DPI="170" ;;
--- 
-1.7.8.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0013-xserver-common-add-support-for-tuna-alias-Galaxy-Nex.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0013-xserver-common-add-support-for-tuna-alias-Galaxy-Nex.patch
index 49321eb..78d2e40 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0013-xserver-common-add-support-for-tuna-alias-Galaxy-Nex.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0013-xserver-common-add-support-for-tuna-alias-Galaxy-Nex.patch
@@ -1,13 +1,13 @@
-From 176c3bd3d86c223fd44b0f15b62d38526bb3b0d2 Mon Sep 17 00:00:00 2001
+From 57ab521ffc1024f21105ca14be2d041a477942b1 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Fri, 17 Aug 2012 13:00:56 +0200
-Subject: [PATCH 13/13] xserver-common: add support for tuna alias Galaxy
- Nexus
+Subject: [PATCH] xserver-common: add support for tuna alias Galaxy Nexus
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- X11/xserver-common |    8 ++++++++
- 1 files changed, 8 insertions(+), 0 deletions(-)
+ X11/xserver-common | 8 ++++++++
+ 1 file changed, 8 insertions(+)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
 index d9325dd..017e5ae 100644
@@ -28,6 +28,3 @@
          "motorola_ezx_platform")
              ARGS="$ARGS -screen 240x320"
              DPI="170" ;;
--- 
-1.7.8.6
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0015-xserver-common-disable-TCP-connections.patch b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0015-xserver-common-disable-TCP-connections.patch
index 06df261..a731917 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0015-xserver-common-disable-TCP-connections.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/0015-xserver-common-disable-TCP-connections.patch
@@ -1,3 +1,4 @@
+From 5236209e30e0f45113e140f0667c8ffcfe621536 Mon Sep 17 00:00:00 2001
 From: Javier Viguera <javier.viguera@digi.com>
 Date: Wed, 26 Nov 2014 09:24:44 +0100
 Subject: [PATCH] xserver-common: disable TCP connections
@@ -5,12 +6,13 @@
 Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
+
 ---
  X11/xserver-common | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/X11/xserver-common b/X11/xserver-common
-index 017e5aee1ab0..4dc48c412741 100644
+index 017e5ae..4dc48c4 100644
 --- a/X11/xserver-common
 +++ b/X11/xserver-common
 @@ -44,7 +44,7 @@ SCREEN_SIZE=`fallback_screen_arg`
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common_1.34.bb b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common_1.34.bb
index cc30541..a5ed21d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common_1.34.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-graphics/xserver-common/xserver-common_1.34.bb
@@ -5,7 +5,9 @@
 PR = "r9"
 
 # we are using a gpe-style Makefile
-inherit gpe
+inherit distro_features_check gpe
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI[md5sum] = "82f2f84cd96610e8f7b92c700cd31c14"
 SRC_URI[sha256sum] = "cd04c33418f776b1e13fcc7af3d6bd0c7cccd03fbabd7dbcd97f88166cc34210"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb
index c963c8e..4abd273 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb
@@ -3,7 +3,7 @@
 saving related features of your processor."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-DEPENDS = "pciutils"
+DEPENDS = "pciutils gettext-native"
 PROVIDES = "virtual/cpupower"
 
 inherit kernelsrc kernel-arch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0004-crash-fix-build-failure-with-mips.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0004-crash-fix-build-failure-with-mips.patch
deleted file mode 100644
index 1e7ce6b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0004-crash-fix-build-failure-with-mips.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 423ebdce07aa9f398f32c0adf659353069d023c6 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 4 May 2017 07:14:13 +0000
-Subject: [PATCH] crash: fix build failure with mips
-
-When build crash with mips:
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-mips-linux-nat.c:157:1: error: conflicting types for 'ps_get_thread_area'
- ps_get_thread_area (const struct ps_prochandle *ph,
- ^~~~~~~~~~~~~~~~~~
-In file included from gdb_proc_service.h:26:0,
-                 from mips-linux-nat.c:32:
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This problem have been fixed on intel and arm plantform, we can use the
-similar approch to fix it on mips.
-
-Upstream-status: Submitted [https://github.com/crash-utility/crash/pull/11]
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- Makefile                                |  1 +
- crash-fix-build-failure-with-mips.patch | 39 +++++++++++++++++++++++++++++++++
- 2 files changed, 40 insertions(+)
- create mode 100644 crash-fix-build-failure-with-mips.patch
-
-diff --git a/Makefile b/Makefile
-index 5496523..2ec3325 100644
---- a/Makefile
-+++ b/Makefile
-@@ -268,6 +268,7 @@ gdb_patch:
- 		grep 'extern ps_err_e ps_get_thread_area (struct' ${RECIPE_SYSROOT}/usr/include/proc_service.h; \
- 		if [ $$? -eq 0 ]; then \
- 			patch -p0 < ${GDB}-proc_service.h.patch; \
-+			patch -p1 < crash-fix-build-failure-with-mips.patch; \
- 		fi; \
- 	fi
- 
-diff --git a/crash-fix-build-failure-with-mips.patch b/crash-fix-build-failure-with-mips.patch
-new file mode 100644
-index 0000000..0c70c5f
---- /dev/null
-+++ b/crash-fix-build-failure-with-mips.patch
-@@ -0,0 +1,39 @@
-+From 615c802d9c73fad48723b6567042cd54f6795849 Mon Sep 17 00:00:00 2001
-+From: Dengke Du <dengke.du@windriver.com>
-+Date: Thu, 4 May 2017 06:14:47 +0000
-+Subject: [PATCH] crash: fix build failure with mips
-+
-+When build crash with mips:
-+
-+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+mips-linux-nat.c:157:1: error: conflicting types for 'ps_get_thread_area'
-+ ps_get_thread_area (const struct ps_prochandle *ph,
-+ ^~~~~~~~~~~~~~~~~~
-+In file included from gdb_proc_service.h:26:0,
-+                 from mips-linux-nat.c:32:
-+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+
-+This problem have been fixed on intel and arm plantform, we can use the
-+similar approch to fix it on mips.
-+
-+Signed-off-by: Dengke Du <dengke.du@windriver.com>
-+---
-+ gdb-7.6/gdb/mips-linux-nat.c | 2 +-
-+ 1 file changed, 1 insertion(+), 1 deletion(-)
-+
-+diff --git a/gdb-7.6/gdb/mips-linux-nat.c b/gdb-7.6/gdb/mips-linux-nat.c
-+index 61e83c6..d517e37 100644
-+--- a/gdb-7.6/gdb/mips-linux-nat.c
-++++ b/gdb-7.6/gdb/mips-linux-nat.c
-+@@ -154,7 +154,7 @@ mips64_linux_register_addr (struct gdbarch *gdbarch, int regno, int store)
-+ /* Fetch the thread-local storage pointer for libthread_db.  */
-+ 
-+ ps_err_e
-+-ps_get_thread_area (const struct ps_prochandle *ph,
-++ps_get_thread_area (struct ps_prochandle *ph,
-+                     lwpid_t lwpid, int idx, void **base)
-+ {
-+   if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
-+-- 
-+2.11.0
-+
--- 
-2.11.0
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.9.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.9.bb
deleted file mode 100644
index d40937e..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.9.bb
+++ /dev/null
@@ -1,116 +0,0 @@
-SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles"
-DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\
-investigate either live systems, kernel core dumps created from the\
-netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\
-offered by Mission Critical Linux, or the LKCD kernel patch."
-
-HOMEPAGE = "http://people.redhat.com/anderson"
-SECTION = "devel"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "zlib readline coreutils-native"
-
-SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
-           http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz;name=gdb;subdir=${BP} \
-           file://7001force_define_architecture.patch \
-           file://7003cross_ranlib.patch \
-           file://0001-cross_add_configure_option.patch \
-           file://sim-ppc-drop-LIBS-from-psim-dependency.patch \
-           file://sim-common-sim-arange-fix-extern-inline-handling.patch \
-           file://donnot-extract-gdb-during-do-compile.patch \
-           file://gdb_build_jobs_and_not_write_crash_target.patch \
-           file://remove-unrecognized-gcc-option-m32-for-mips.patch \
-           file://0002-crash-fix-build-error-unknown-type-name-gdb_fpregset.patch \
-           file://0003-crash-detect-the-sysroot-s-glibc-header-file.patch \
-           file://0004-crash-fix-build-failure-with-mips.patch \
-           "
-SRC_URI[md5sum] = "f3b44a151dbe7046462b9caaa9847ca6"
-SRC_URI[sha256sum] = "c48e1269443a6a8e8337e328b21b03e4e50248f607eed83fbb27eb0d833d6aa4"
-
-SRC_URI[gdb.md5sum] = "a9836707337e5f7bf76a009a8904f470"
-SRC_URI[gdb.sha256sum] = "8070389a5dcc104eb0be483d582729f98ed4d761ad19cedd3f17b5d2502faa36"
-
-inherit gettext
-
-BBCLASSEXTEND = "native cross"
-TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
-
-# crash 7.1.3 and before don't support mips64
-COMPATIBLE_HOST = "^(?!mips64).*"
-
-EXTRA_OEMAKE = 'RPMPKG="${PV}" \
-                GDB_TARGET="${TARGET_SYS}" \
-                GDB_HOST="${BUILD_SYS}" \
-                GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
-                LDFLAGS="${LDFLAGS}" \
-                '
-
-EXTRA_OEMAKE_class-cross = 'RPMPKG="${PV}" \
-                            GDB_TARGET="${BUILD_SYS} \
-                                        \${GDB_CONF_FLAGS} \
-                                        --target=${TARGET_SYS}" \
-                            GDB_HOST="${BUILD_SYS}" \
-                            GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
-                            '
-
-EXTRA_OEMAKE_append_class-native = " LDFLAGS='${BUILD_LDFLAGS}'"
-EXTRA_OEMAKE_append_class-cross = " LDFLAGS='${BUILD_LDFLAGS}'"
-
-REMOVE_M32 = "sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c"
-
-REMOVE_M32_class-cross = ""
-
-do_configure() {
-    :
-}
-
-do_compile_prepend() {
-    case ${TARGET_ARCH} in
-        aarch64*)    ARCH=ARM64 ;;
-        arm*)        ARCH=ARM ;;
-        i*86*)       ARCH=X86 ;;
-        x86_64*)     ARCH=X86_64 ;;
-        powerpc64*)  ARCH=PPC64 ;;
-        powerpc*)    ARCH=PPC ;;
-        mips*)       ARCH=MIPS ;;
-    esac
-
-    sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c
-    ${REMOVE_M32}
-    sed -i 's/&gt;/>/g' ${S}/Makefile
-}
-
-do_compile() {
-    oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT}
-}
-
-do_install_prepend () {
-    install -d ${D}${bindir}
-    install -d ${D}/${mandir}/man8
-    install -d ${D}${includedir}/crash
-
-    install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/
-    install -m 0644 ${S}/defs.h ${D}${includedir}/crash
-}
-
-do_install_class-target () {
-    oe_runmake DESTDIR=${D} install
-}
-
-do_install_class-native () {
-    oe_runmake DESTDIR=${D}${STAGING_DIR_NATIVE} install
-}
-
-do_install_class-cross () {
-    install -m 0755 ${S}/crash ${D}/${bindir}
-}
-
-RDEPENDS_${PN} += "liblzma"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-cross = ""
-
-# Causes gcc to get stuck and eat all available memory in qemuarm builds
-# jenkins  15161  100 12.5 10389596 10321284 ?   R    11:40  28:17 /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.2/cc1 -quiet -I . -I . -I ./common -I ./config -I ./../include/opcode -I ./../opcodes/.. -I ./../readline/.. -I ../bfd -I ./../bfd -I ./../include -I ../libdecnumber -I ./../libdecnumber -I ./gnulib/import -I build-gnulib/import -isysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm -MMD eval.d -MF .deps/eval.Tpo -MP -MT eval.o -D LOCALEDIR="/usr/local/share/locale" -D CRASH_MERGE -D HAVE_CONFIG_H -D TUI=1 eval.c -quiet -dumpbase eval.c -march=armv5te -mthumb -mthumb-interwork -mtls-dialect=gnu -auxbase-strip eval.o -g -O2 -Wall -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -feliminate-unused-debug-types -o -
-ARM_INSTRUCTION_SET = "arm"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.0.bb
new file mode 100644
index 0000000..9bea48e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.2.0.bb
@@ -0,0 +1,115 @@
+SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles"
+DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\
+investigate either live systems, kernel core dumps created from the\
+netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\
+offered by Mission Critical Linux, or the LKCD kernel patch."
+
+HOMEPAGE = "http://people.redhat.com/anderson"
+SECTION = "devel"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "zlib readline coreutils-native"
+
+SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+           http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz;name=gdb;subdir=${BP} \
+           file://7001force_define_architecture.patch \
+           file://7003cross_ranlib.patch \
+           file://0001-cross_add_configure_option.patch \
+           file://sim-ppc-drop-LIBS-from-psim-dependency.patch \
+           file://sim-common-sim-arange-fix-extern-inline-handling.patch \
+           file://donnot-extract-gdb-during-do-compile.patch \
+           file://gdb_build_jobs_and_not_write_crash_target.patch \
+           file://remove-unrecognized-gcc-option-m32-for-mips.patch \
+           file://0002-crash-fix-build-error-unknown-type-name-gdb_fpregset.patch \
+           file://0003-crash-detect-the-sysroot-s-glibc-header-file.patch \
+           "
+SRC_URI[md5sum] = "48899de3118e04cfa40a2364f5618193"
+SRC_URI[sha256sum] = "5d076e1fefb41aa178ad3e1cef6511670efc47de5cb04d4af9bdd4e8f2f18cbc"
+
+SRC_URI[gdb.md5sum] = "a9836707337e5f7bf76a009a8904f470"
+SRC_URI[gdb.sha256sum] = "8070389a5dcc104eb0be483d582729f98ed4d761ad19cedd3f17b5d2502faa36"
+
+inherit gettext
+
+BBCLASSEXTEND = "native cross"
+TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
+
+# crash 7.1.3 and before don't support mips64
+COMPATIBLE_HOST = "^(?!mips64).*"
+
+EXTRA_OEMAKE = 'RPMPKG="${PV}" \
+                GDB_TARGET="${TARGET_SYS}" \
+                GDB_HOST="${BUILD_SYS}" \
+                GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
+                LDFLAGS="${LDFLAGS}" \
+                '
+
+EXTRA_OEMAKE_class-cross = 'RPMPKG="${PV}" \
+                            GDB_TARGET="${BUILD_SYS} \
+                                        \${GDB_CONF_FLAGS} \
+                                        --target=${TARGET_SYS}" \
+                            GDB_HOST="${BUILD_SYS}" \
+                            GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
+                            '
+
+EXTRA_OEMAKE_append_class-native = " LDFLAGS='${BUILD_LDFLAGS}'"
+EXTRA_OEMAKE_append_class-cross = " LDFLAGS='${BUILD_LDFLAGS}'"
+
+REMOVE_M32 = "sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c"
+
+REMOVE_M32_class-cross = ""
+
+do_configure() {
+    :
+}
+
+do_compile_prepend() {
+    case ${TARGET_ARCH} in
+        aarch64*)    ARCH=ARM64 ;;
+        arm*)        ARCH=ARM ;;
+        i*86*)       ARCH=X86 ;;
+        x86_64*)     ARCH=X86_64 ;;
+        powerpc64*)  ARCH=PPC64 ;;
+        powerpc*)    ARCH=PPC ;;
+        mips*)       ARCH=MIPS ;;
+    esac
+
+    sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c
+    ${REMOVE_M32}
+    sed -i 's/&gt;/>/g' ${S}/Makefile
+}
+
+do_compile() {
+    oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT}
+}
+
+do_install_prepend () {
+    install -d ${D}${bindir}
+    install -d ${D}/${mandir}/man8
+    install -d ${D}${includedir}/crash
+
+    install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/
+    install -m 0644 ${S}/defs.h ${D}${includedir}/crash
+}
+
+do_install_class-target () {
+    oe_runmake DESTDIR=${D} install
+}
+
+do_install_class-native () {
+    oe_runmake DESTDIR=${D}${STAGING_DIR_NATIVE} install
+}
+
+do_install_class-cross () {
+    install -m 0755 ${S}/crash ${D}/${bindir}
+}
+
+RDEPENDS_${PN} += "liblzma"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-cross = ""
+
+# Causes gcc to get stuck and eat all available memory in qemuarm builds
+# jenkins  15161  100 12.5 10389596 10321284 ?   R    11:40  28:17 /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.2/cc1 -quiet -I . -I . -I ./common -I ./config -I ./../include/opcode -I ./../opcodes/.. -I ./../readline/.. -I ../bfd -I ./../bfd -I ./../include -I ../libdecnumber -I ./../libdecnumber -I ./gnulib/import -I build-gnulib/import -isysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm -MMD eval.d -MF .deps/eval.Tpo -MP -MT eval.o -D LOCALEDIR="/usr/local/share/locale" -D CRASH_MERGE -D HAVE_CONFIG_H -D TUI=1 eval.c -quiet -dumpbase eval.c -march=armv5te -mthumb -mthumb-interwork -mtls-dialect=gnu -auxbase-strip eval.o -g -O2 -Wall -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -feliminate-unused-debug-types -o -
+ARM_INSTRUCTION_SET = "arm"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/ipmitool/ipmitool_1.8.18.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/ipmitool/ipmitool_1.8.18.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/ipmiutil/ipmiutil/fix_systemd_path.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/ipmiutil/ipmiutil/fix_systemd_path.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/ipmiutil/ipmiutil_3.0.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/ipmiutil/ipmiutil_3.0.5.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch.inc b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch.inc
new file mode 100644
index 0000000..b1e73e9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch.inc
@@ -0,0 +1,49 @@
+SUMMARY = "Linux dynamic kernel patching infrastructure"
+DESCRIPTION = "kpatch is a Linux dynamic kernel patching infrastructure which allows you to patch a running kernel without rebooting or restarting any processes."
+LICENSE = "GPLv2 & LGPLv2"
+DEPENDS = "elfutils bash"
+
+SRC_URI = "git://github.com/dynup/kpatch.git;protocol=https \
+	file://0001-kpatch-build-add-cross-compilation-support.patch \
+	file://0002-kpatch-build-allow-overriding-of-distro-name.patch \
+	"
+
+EXTRA_OEMAKE = " \
+	PREFIX=${prefix} \
+	BINDIR=${D}${bindir} \
+	SBINDIR=${D}${sbindir} \
+	LIBDIR=${D}${libdir} \
+	MANDIR=${D}${mandir}/man1 \
+	SYSTEMDDIR=${D}${systemd_system_unitdir} \
+	DESTDIR=${D} \
+	BUILDMOD=no \
+	CC='${CC}' \
+	"
+
+S = "${WORKDIR}/git"
+
+do_install () {
+	oe_runmake install
+}
+
+PACKAGES =+ "kpatch-build"
+PROVIDES += "kpatch-build"
+
+COMPATIBLE_HOST = "(x86_64).*-linux"
+
+RDEPENDS_${PN} = "bash binutils"
+RDEPENDS_kpatch-build = "bash glibc-utils"
+
+FILES_${PN} = " \
+	${sbindir}/kpatch \
+	${systemd_system_unitdir}/kpatch.service \
+	${mandir}/man1/kpatch.1.gz \
+	"
+FILES_kpatch-build = " \
+	${bindir}/kpatch-build \
+	${libexecdir}/* \
+	${datadir}/kpatch \
+	${mandir}/man1/kpatch-build.1.gz \
+	"
+
+SYSTEMD_SERVICE_${PN} = "kpatch.service"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch
new file mode 100644
index 0000000..459fb21
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch
@@ -0,0 +1,103 @@
+From a9a80a1f4df65892a0269295ce8a64b06f2ff61d Mon Sep 17 00:00:00 2001
+From: Ruslan Bilovol <rbilovol@cisco.com>
+Date: Tue, 19 Dec 2017 15:59:04 +0200
+Subject: [PATCH] kpatch-build: add cross-compilation support
+
+This patch introduces new option for kpatch-build
+script "--cross-compile" which can be used for
+specifying cross-complier prefix.
+It allows to build live patches not only on
+target system, but also on hosts for a target other
+than the one on which the compiler is running
+
+Also removed quotes in exec lines, so it is
+possible to pass multy-component strings like
+"ccache x86_64-xelinux-linux-" as cross-compiler
+
+Upstream-Status: Pending
+
+Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
+---
+ kpatch-build/kpatch-build | 13 +++++++++++--
+ kpatch-build/kpatch-gcc   |  4 ++--
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build
+index 166ecbd..af24cc4 100755
+--- a/kpatch-build/kpatch-build
++++ b/kpatch-build/kpatch-build
+@@ -195,7 +195,7 @@ gcc_version_check() {
+ 	# gcc --version varies between distributions therefore extract version
+ 	# by compiling a test file and compare it to vmlinux's version.
+ 	echo 'void main(void) {}' > "$c"
+-	out="$(gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)"
++	out="$(${KPATCH_CROSS_COMPILE}gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)"
+ 	gccver="$(gcc_version_from_file "$o")"
+ 	kgccver="$(gcc_version_from_file "$VMLINUX")"
+ 	rm -f "$c" "$o"
+@@ -381,12 +381,14 @@ usage() {
+ 	echo "		-d, --debug        Enable 'xtrace' and keep scratch files" >&2
+ 	echo "		                   in <CACHEDIR>/tmp" >&2
+ 	echo "		                   (can be specified multiple times)" >&2
++	echo "		--cross-compile    Specify the prefix used for all executables" >&2
++	echo "		                   used during compilation" >&2
+ 	echo "		--skip-cleanup     Skip post-build cleanup" >&2
+ 	echo "		--skip-gcc-check   Skip gcc version matching check" >&2
+ 	echo "		                   (not recommended)" >&2
+ }
+ 
+-options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
++options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
+ 
+ eval set -- "$options"
+ 
+@@ -444,6 +446,10 @@ while [[ $# -gt 0 ]]; do
+ 			echo "DEBUG mode enabled"
+ 		fi
+ 		;;
++	--cross-compile)
++		KPATCH_CROSS_COMPILE="$2"
++		shift
++		;;
+ 	--skip-cleanup)
+ 		echo "Skipping cleanup"
+ 		SKIPCLEANUP=1
+@@ -691,6 +697,8 @@ if [[ $DEBUG -ge 4 ]]; then
+ 	export KPATCH_GCC_DEBUG=1
+ fi
+ 
++export KPATCH_CROSS_COMPILE
++
+ echo "Building original kernel"
+ ./scripts/setlocalversion --save-scmversion || die
+ make mrproper 2>&1 | logger || die
+@@ -840,6 +848,7 @@ cd "$TEMPDIR/patch" || die
+ KPATCH_BUILD="$SRCDIR" KPATCH_NAME="$MODNAME" \
+ KBUILD_EXTRA_SYMBOLS="$KBUILD_EXTRA_SYMBOLS" \
+ KPATCH_LDFLAGS="$KPATCH_LDFLAGS" \
++CROSS_COMPILE="$KPATCH_CROSS_COMPILE" \
+ 	make 2>&1 | logger || die
+ 
+ if ! "$KPATCH_MODULE"; then
+diff --git a/kpatch-build/kpatch-gcc b/kpatch-build/kpatch-gcc
+index 6ba133c..3937948 100755
+--- a/kpatch-build/kpatch-gcc
++++ b/kpatch-build/kpatch-gcc
+@@ -8,7 +8,7 @@ TOOLCHAINCMD="$1"
+ shift
+ 
+ if [[ -z "$KPATCH_GCC_TEMPDIR" ]]; then
+-	exec "$TOOLCHAINCMD" "$@"
++	exec ${KPATCH_CROSS_COMPILE}${TOOLCHAINCMD} "$@"
+ fi
+ 
+ declare -a args=("$@")
+@@ -80,4 +80,4 @@ elif [[ "$TOOLCHAINCMD" = "ld" ]] ; then
+ 	done
+ fi
+ 
+-exec "$TOOLCHAINCMD" "${args[@]}"
++exec ${KPATCH_CROSS_COMPILE}${TOOLCHAINCMD} "${args[@]}"
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch
new file mode 100644
index 0000000..a9d8a7f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch
@@ -0,0 +1,62 @@
+From d418d716dae1e2a05131dfb42a19a4da2fc8a85d Mon Sep 17 00:00:00 2001
+From: Ruslan Bilovol <rbilovol@cisco.com>
+Date: Tue, 2 Jan 2018 14:50:03 +0200
+Subject: [PATCH] kpatch-build: allow overriding of distro name
+
+It is sometimes useful to have ability to override
+distro name, for example during cross-compilation
+build when livepatch modules will be ran on the
+target which differs from host.
+
+This patch adds a new --distro option which
+implements all needed functionality
+
+Upstream-Status: Pending
+
+Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
+---
+ kpatch-build/kpatch-build | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build
+index af24cc4..4f9f78d 100755
+--- a/kpatch-build/kpatch-build
++++ b/kpatch-build/kpatch-build
+@@ -383,12 +383,13 @@ usage() {
+ 	echo "		                   (can be specified multiple times)" >&2
+ 	echo "		--cross-compile    Specify the prefix used for all executables" >&2
+ 	echo "		                   used during compilation" >&2
++	echo "		--distro           Override distro name" >&2
+ 	echo "		--skip-cleanup     Skip post-build cleanup" >&2
+ 	echo "		--skip-gcc-check   Skip gcc version matching check" >&2
+ 	echo "		                   (not recommended)" >&2
+ }
+ 
+-options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
++options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,distro:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
+ 
+ eval set -- "$options"
+ 
+@@ -450,6 +451,10 @@ while [[ $# -gt 0 ]]; do
+ 		KPATCH_CROSS_COMPILE="$2"
+ 		shift
+ 		;;
++	--distro)
++		DISTRO="$2"
++		shift
++		;;
+ 	--skip-cleanup)
+ 		echo "Skipping cleanup"
+ 		SKIPCLEANUP=1
+@@ -526,7 +531,7 @@ fi
+ # Don't check external file.
+ # shellcheck disable=SC1091
+ source /etc/os-release
+-DISTRO="$ID"
++DISTRO="${DISTRO:-${ID}}"
+ if [[ "$DISTRO" = fedora ]] || [[ "$DISTRO" = rhel ]] || [[ "$DISTRO" = ol ]] || [[ "$DISTRO" = centos ]]; then
+ 	[[ -z "$VMLINUX" ]] && VMLINUX="/usr/lib/debug/lib/modules/$ARCHVERSION/vmlinux"
+ 	[[ -e "$VMLINUX" ]] || die "kernel-debuginfo-$ARCHVERSION not installed"
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch_git.bb
new file mode 100644
index 0000000..e495e28
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/kpatch/kpatch_git.bb
@@ -0,0 +1,11 @@
+require kpatch.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRCREV = "db6efbb8c7e90d2b761272cf563047119072768f"
+
+PV = "0.5.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc b/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
index e200127..9f14370 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
@@ -16,7 +16,7 @@
 
 # Kernel bootlogo is distro-specific (default is OE logo).
 # Logo resolution (qvga, vga, ...) is machine-specific.
-LOGO_SIZE ?= '${@base_conditional("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
+LOGO_SIZE ?= '${@oe.utils.conditional("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
 # To use this, add file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2 or similar
 # to your kernel recipe, and then structure your logos for each resolution
 # accordingly.
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
index 90ef7fa..9c96e31 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
@@ -22,7 +22,7 @@
 
 case "$1" in
     start)
-        echo "|/usr/bin/minicoredumper %p %u %g %s %t %h %e" > /proc/sys/kernel/core_pattern
+        echo "|/usr/sbin/minicoredumper %p %u %g %s %t %h %e" > /proc/sys/kernel/core_pattern
         ;;
     stop)
         echo "core" > /proc/sys/kernel/core_pattern
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
index 851b54c..45d098f 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
@@ -4,7 +4,7 @@
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/bin/sh -c '/bin/echo "|/usr/bin/minicoredumper %%p %%u %%g %%s %%t %%h %%e" > /proc/sys/kernel/core_pattern'
+ExecStart=/bin/sh -c '/bin/echo "|/usr/sbin/minicoredumper %%p %%u %%g %%s %%t %%h %%e" > /proc/sys/kernel/core_pattern'
 ExecStop=/bin/sh -c '/bin/echo "core" > /proc/sys/kernel/core_pattern'
 
 [Install]
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
index 1858e10..0d3c66b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb
@@ -38,4 +38,8 @@
     install -m 0644 ${WORKDIR}/minicoredumper.service ${D}${systemd_system_unitdir}
     install -d ${D}${sysconfdir}/init.d
     install -m 0644 ${WORKDIR}/minicoredumper.init ${D}${sysconfdir}/init.d/minicoredumper
+
+    # correct path of minicoredumper
+    sed -i -e s:/usr/bin/minicoredumper:${sbindir}/minicoredumper:g ${D}${sysconfdir}/init.d/minicoredumper
+    sed -i -e s:/usr/bin/minicoredumper:${sbindir}/minicoredumper:g ${D}${systemd_system_unitdir}/minicoredumper.service
 }
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss-1.0.17/libio.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss-1.0.17/libio.patch
deleted file mode 100644
index a053e4c..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss-1.0.17/libio.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Index: alsa-oss-1.0.15/alsa/stdioemu.c
-===================================================================
---- alsa-oss-1.0.15.orig/alsa/stdioemu.c	2007-10-15 10:50:40.000000000 +0200
-+++ alsa-oss-1.0.15/alsa/stdioemu.c	2008-07-21 22:17:06.303161438 +0200
-@@ -37,7 +37,9 @@
- #endif
- 
- #include <stdio.h>
-+#ifdef HAVE_LIBIO_H
- #include <libio.h>
-+#endif
- 
- struct fd_cookie {
- 	int fd;
-@@ -99,7 +101,11 @@
- 
- 	if (open_mode && fdc->fd > 0) {
- 		result = fopencookie (fdc,"w", fns);
-+#ifdef HAVE_FILENO
- 		result->_fileno = fdc->fd;		/* ugly patchy slimy kludgy hack */
-+#else
-+		result->__filedes = fdc->fd;
-+#endif
- 	}
- 	return result;
- }
-Index: alsa-oss-1.0.15/configure.in
-===================================================================
---- alsa-oss-1.0.15.orig/configure.in	2007-10-15 10:50:40.000000000 +0200
-+++ alsa-oss-1.0.15/configure.in	2008-07-21 22:16:11.719837298 +0200
-@@ -33,6 +33,12 @@
-   LIBS="$OLD_LIBS"
- fi
- 
-+AC_CHECK_HEADERS_ONCE([libio.h])
-+
-+AC_CHECK_MEMBER([struct _IO_FILE._fileno],
-+		[AC_DEFINE([HAVE_FILENO], [1],[Define if _fileno exists.])],
-+		[],[])
-+
- AC_OUTPUT(Makefile alsa/Makefile alsa/aoss alsa/aoss.old \
- 	  oss-redir/Makefile test/Makefile \
-           alsa/testaoss test/testaoss)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch
new file mode 100644
index 0000000..5299945
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch
@@ -0,0 +1,43 @@
+Index: alsa-oss-1.0.28/alsa/stdioemu.c
+===================================================================
+--- alsa-oss-1.0.28.orig/alsa/stdioemu.c
++++ alsa-oss-1.0.28/alsa/stdioemu.c
+@@ -37,7 +37,9 @@
+ #endif
+ 
+ #include <stdio.h>
++#ifdef HAVE_LIBIO_H
+ #include <libio.h>
++#endif
+ 
+ struct fd_cookie {
+ 	int fd;
+@@ -99,7 +101,11 @@ static FILE *fake_fopen(const char *path
+ 
+ 	if (open_mode && fdc->fd > 0) {
+ 		result = fopencookie (fdc,"w", fns);
++#ifdef HAVE_FILENO
+ 		result->_fileno = fdc->fd;		/* ugly patchy slimy kludgy hack */
++#else
++		result->__filedes = fdc->fd;
++#endif
+ 	}
+ 	return result;
+ }
+Index: alsa-oss-1.0.28/configure.ac
+===================================================================
+--- alsa-oss-1.0.28.orig/configure.ac
++++ alsa-oss-1.0.28/configure.ac
+@@ -35,6 +35,12 @@ if test "$with_aoss" = "yes"; then
+   LIBS="$OLD_LIBS"
+ fi
+ 
++AC_CHECK_HEADERS_ONCE([libio.h])
++
++AC_CHECK_MEMBER([struct _IO_FILE._fileno],
++		[AC_DEFINE([HAVE_FILENO], [1],[Define if _fileno exists.])],
++		[],[])
++
+ AC_OUTPUT(Makefile alsa/Makefile alsa/aoss alsa/aoss.old \
+ 	  oss-redir/Makefile test/Makefile \
+           alsa/testaoss test/testaoss)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss_1.0.17.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss_1.0.17.bb
deleted file mode 100644
index 8966dbb..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss_1.0.17.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Alsa OSS Compatibility Package"
-SECTION = "libs/multimedia"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-DEPENDS = "alsa-lib"
-PR = "r1"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-${PV}.tar.bz2 \
-    file://libio.patch \
-"
-
-inherit autotools
-
-LEAD_SONAME = "libaoss.so.0"
-
-do_configure_prepend () {
-    touch NEWS README AUTHORS ChangeLog
-    sed -i "s/libaoss.so/${LEAD_SONAME}/" ${S}/alsa/aoss.in
-}
-
-SRC_URI[md5sum] = "1b1850c2fc91476a73d50f537cbd402f"
-SRC_URI[sha256sum] = "8d009e23e2cbee1691ec3c95d1838056a804d98440eae7715d6c3aebc710f9ca"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss_1.0.28.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss_1.0.28.bb
new file mode 100644
index 0000000..0c4a9f5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/alsa/alsa-oss_1.0.28.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Alsa OSS Compatibility Package"
+SECTION = "libs/multimedia"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+DEPENDS = "alsa-lib"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-${PV}.tar.bz2 \
+    file://libio.patch \
+"
+SRC_URI[md5sum] = "91f57e8cee1ad4cc956caa8b62ac5d43"
+SRC_URI[sha256sum] = "3ae62caa88a0bc7b30ed836dcb794dc6ef4d3650439e2260db54cace7d5c6ad5"
+
+inherit autotools
+
+LEAD_SONAME = "libaoss.so.0"
+
+do_configure_prepend () {
+    touch NEWS README AUTHORS ChangeLog
+    sed -i "s/libaoss.so/${LEAD_SONAME}/" ${S}/alsa/aoss.in
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
index c0f220f..3b10e97 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
@@ -18,3 +18,7 @@
 
 DEPENDS = "libcap file bzip2"
 RDEPENDS_${PN} = "perl"
+
+do_install_append() {
+    ln -sf ${bindir}/genisoimage ${D}${bindir}/mkisofs
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0001-audio_alsa09.c-alsa-drain-fix.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0001-audio_alsa09.c-alsa-drain-fix.patch
index 6c7f3bd..130f3c2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0001-audio_alsa09.c-alsa-drain-fix.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0001-audio_alsa09.c-alsa-drain-fix.patch
@@ -1,9 +1,10 @@
-From a860fe0796c43e35eac9783140fcb563cab9f55a Mon Sep 17 00:00:00 2001
+From 945df2da87a412758ceab4ac5711abbb269a47c1 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 8 Jun 2017 23:09:51 -0700
-Subject: [PATCH 1/3] audio_alsa09.c: alsa drain fix
+Subject: [PATCH] audio_alsa09.c: alsa drain fix
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  audio_alsa09.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21,6 +22,3 @@
    
  	if (alsadbg) 
  		print_state();
--- 
-2.13.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0002-Undefine-open64-and-fopen64.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0002-Undefine-open64-and-fopen64.patch
index 337546a..10a6ba0 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0002-Undefine-open64-and-fopen64.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0002-Undefine-open64-and-fopen64.patch
@@ -1,11 +1,12 @@
-From 1fbee6e96384f340b816e221fe1c2f3ff0b487bf Mon Sep 17 00:00:00 2001
+From e218d5a0a545ebb9623d62da5cfca478f9c90fce Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 8 Jun 2017 23:11:31 -0700
-Subject: [PATCH 2/3] Undefine open64 and fopen64
+Subject: [PATCH] Undefine open64 and fopen64
 
 Since the signatures do not match with libc
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  esddsp.c | 2 ++
  1 file changed, 2 insertions(+)
@@ -30,6 +31,3 @@
  FILE *
  fopen64 (const char *path, const char *mode)
  {
--- 
-2.13.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0003-Use-I-path-in-configure.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0003-Use-I-path-in-configure.patch
index 62c880d..83365b4 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0003-Use-I-path-in-configure.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/0003-Use-I-path-in-configure.patch
@@ -1,12 +1,13 @@
-From 979a02d9ec9c28686021cd2b49ca55d2195c9dce Mon Sep 17 00:00:00 2001
+From 89c62db54716d514e639f9e1bfd3c1f7d82641dd Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 8 Jun 2017 23:12:36 -0700
-Subject: [PATCH 3/3] Use -I=<path> in configure
+Subject: [PATCH] Use -I=<path> in configure
 
 This helps to use proper sysroot in
 cross build environment
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  configure.ac | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
@@ -33,6 +34,3 @@
  	SOUND_LIBS=-lmme
        esac
     fi
--- 
-2.13.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/no-docs.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/no-docs.patch
index fc69f1a..8a546e6 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/no-docs.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/esound/esound/no-docs.patch
@@ -1,11 +1,19 @@
-Index: esound-0.2.36/Makefile.am
-===================================================================
---- esound-0.2.36.orig/Makefile.am
-+++ esound-0.2.36/Makefile.am
+From bfcaa9bdc70440db96f10afc0c2a792870f75acb Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Fri, 3 Jun 2011 19:39:02 +0200
+
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 08c4c94..ede9d26 100644
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -1,5 +1,5 @@
  
 -SUBDIRS = docs
 +SUBDIRS = 
  
- ACLOCAL_FLAGS = -I m4
+ ACLOCAL_AMFLAGS = -I m4
  
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/jack/jack/0001-typecast-input-parameter-to-int-for-abs.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/jack/jack/0001-typecast-input-parameter-to-int-for-abs.patch
deleted file mode 100644
index c119f19..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/jack/jack/0001-typecast-input-parameter-to-int-for-abs.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 8ec6f75bf7a318a3a1e352df7c97630cfaba537a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 21 Apr 2017 16:18:39 -0700
-Subject: [PATCH] typecast input parameter to int for abs()
-
-Fixes
-../tests/test.cpp:482:73: error: call of overloaded 'abs(jack_nframes_t)' is ambiguous
-
-because the signature is int abs(int) and its passing
-unsigned int to it.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- tests/test.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/test.cpp b/tests/test.cpp
-index 8a8a8117..9655742e 100644
---- a/tests/test.cpp
-+++ b/tests/test.cpp
-@@ -479,7 +479,7 @@ int process4(jack_nframes_t nframes, void *arg)
- 	jack_nframes_t delta_time = cur_time - last_time;
- 
- 	Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time);
--	if (delta_time > 0  && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) {
-+	if (delta_time > 0  && (jack_nframes_t)abs(int(delta_time - cur_buffer_size)) > tolerance) {
- 		printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance);
- 	}
- 
--- 
-2.12.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_git.bb
index b85ba8a..11da6b1 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_git.bb
@@ -14,11 +14,9 @@
 
 DEPENDS = "libsamplerate0 libsndfile1 readline"
 
-SRC_URI = "git://github.com/jackaudio/jack2.git \
-           file://0001-typecast-input-parameter-to-int-for-abs.patch \
-          "
-SRCREV = "2d1d323505585d406a7e64fb932953baefc5945e"
-PV = "1.9.10+git${SRCPV}"
+SRC_URI = "git://github.com/jackaudio/jack2.git"
+SRCREV = "c1647819eed6d11f94b21981d9c869629299f357"
+PV = "1.9.12"
 S = "${WORKDIR}/git"
 
 inherit waf pkgconfig
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass.inc b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass.inc
deleted file mode 100644
index 4bc3db0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-DESCRIPTION = "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. It is mostly compatible with VSFilter."
-HOMEPAGE = "https://github.com/libass/libass"
-SECTION = "libs/multimedia"
-
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a42532a0684420bdb15556c3cdd49a75"
-
-DEPENDS = "enca fontconfig freetype libpng fribidi"
-
-SRC_URI = "https://github.com/libass/libass/releases/download/${PV}/libass-${PV}.tar.xz"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[harfbuzz] = "--enable-harfbuzz,--disable-harfbuzz,harfbuzz"
-
-EXTRA_OECONF = " \
-    --enable-fontconfig \
-"
-
-# Disable compiling with ASM for x86 to avoid textrel
-EXTRA_OECONF_append_x86 = " --disable-asm"
-
-PACKAGES =+ "${PN}-tests"
-
-FILES_${PN}-tests = " \
-    ${libdir}/test/test \
-"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.13.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.13.6.bb
deleted file mode 100644
index 40ac0f8..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.13.6.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require recipes-multimedia/${BPN}/${BPN}.inc
-
-SRC_URI[md5sum] = "daa6cfca437c0776af5f79750cdd9b4e"
-SRC_URI[sha256sum] = "f8a874d104e3e72e2cc057e5a1710c650b10367486845a26e5ff28ed7a912c2d"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.14.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.14.0.bb
new file mode 100644
index 0000000..3454a5c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libass/libass_0.14.0.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. It is mostly compatible with VSFilter."
+HOMEPAGE = "https://github.com/libass/libass"
+SECTION = "libs/multimedia"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a42532a0684420bdb15556c3cdd49a75"
+
+DEPENDS = "enca fontconfig freetype libpng fribidi"
+
+SRC_URI = "git://github.com/libass/libass.git"
+SRCREV = "73284b676b12b47e17af2ef1b430527299e10c17"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[harfbuzz] = "--enable-harfbuzz,--disable-harfbuzz,harfbuzz"
+
+EXTRA_OECONF = " \
+    --enable-fontconfig \
+"
+
+# Disable compiling with ASM for x86 to avoid textrel
+EXTRA_OECONF_append_x86 = " --disable-asm"
+
+PACKAGES =+ "${PN}-tests"
+
+FILES_${PN}-tests = " \
+    ${libdir}/test/test \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio_0.93.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio_0.93.bb
deleted file mode 100644
index 99e6a84..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio_0.93.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "The GNU Compact Disc Input and Control library (libcdio) contains a library for CD-ROM and CD image access."
-HOMEPAGE = "http://www.gnu.org/software/libcdio/"
-SECTION = "libs"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
-SRC_URI[md5sum] = "d154476feaac5a7b5f180e83eaf3d689"
-SRC_URI[sha256sum] = "4972cd22fd8d0e8bff922d35c7a645be0db0ab0e7b3dfaecc9cd8272429d6975"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "cdda-player"
-PACKAGECONFIG[cdda-player] = "--with-cdda-player,--without-cdda-player,ncurses"
-PACKAGECONFIG[cddb] = "--enable-cddb,--disable-cddb,libcddb"
-PACKAGECONFIG[vcd-info] = "--enable-vcd-info,--disable-vcd-info,vcdimager"
-
-PACKAGES += "${PN}-utils"
-
-FILES_${PN} = "${libdir}/${BPN}${SOLIB}"
-FILES_${PN}-utils = "${bindir}/*"
-
-python libcdio_split_packages() {
-    libdir = d.expand('${libdir}')
-    do_split_packages(d, libdir, '^lib(.*)\.so\..*', 'lib%s', 'libcdio %s library', extra_depends='', allow_links=True)
-}
-
-PACKAGESPLITFUNCS =+ "libcdio_split_packages"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio_2.0.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio_2.0.0.bb
new file mode 100644
index 0000000..6bf64d6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio_2.0.0.bb
@@ -0,0 +1,29 @@
+SUMMARY = "The GNU Compact Disc Input and Control library (libcdio) contains a library for CD-ROM and CD image access."
+HOMEPAGE = "http://www.gnu.org/software/libcdio/"
+SECTION = "libs"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "0cb25905113b930e4539d2f4eb6574b0"
+SRC_URI[sha256sum] = "1b481b5da009bea31db875805665974e2fc568e2b2afa516f4036733657cf958"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "cdda-player"
+PACKAGECONFIG[cdda-player] = "--with-cdda-player,--without-cdda-player,ncurses"
+PACKAGECONFIG[cddb] = "--enable-cddb,--disable-cddb,libcddb"
+PACKAGECONFIG[vcd-info] = "--enable-vcd-info,--disable-vcd-info,vcdimager"
+
+PACKAGES += "${PN}-utils"
+
+FILES_${PN} = "${libdir}/${BPN}${SOLIB}"
+FILES_${PN}-utils = "${bindir}/*"
+
+python libcdio_split_packages() {
+    libdir = d.expand('${libdir}')
+    do_split_packages(d, libdir, '^lib(.*)\.so\..*', 'lib%s', 'libcdio %s library', extra_depends='', allow_links=True)
+}
+
+PACKAGESPLITFUNCS =+ "libcdio_split_packages"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libsdl-mixer/libsdl2-mixer_2.0.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libsdl-mixer/libsdl2-mixer_2.0.1.bb
deleted file mode 100644
index 8276b44..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libsdl-mixer/libsdl2-mixer_2.0.1.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Simple DirectMedia Layer mixer library V2"
-SECTION = "libs"
-DEPENDS = "virtual/libsdl2 flac libmikmod libvorbis"
-LICENSE = "Zlib"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=29d8bc7c38aa44b1cf3a633a46589917"
-
-SRC_URI = "http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "c6c4f556d4415871f526248f5c9a627d"
-SRC_URI[sha256sum] = "5a24f62a610249d744cbd8d28ee399d8905db7222bf3bdbc8a8b4a76e597695f"
-
-S = "${WORKDIR}/SDL2_mixer-${PV}"
-
-inherit autotools-brokensep pkgconfig
-
-EXTRA_AUTORECONF += "--include=acinclude"
-EXTRA_OECONF = "--disable-music-mp3 --enable-music-ogg --enable-music-ogg-tremor LIBS=-L${STAGING_LIBDIR}"
-
-PACKAGECONFIG[mad] = "--enable-music-mp3-mad-gpl,--disable-music-mp3-mad-gpl,libmad"
-
-do_configure_prepend () {
-    # Remove old libtool macros.
-    MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
-    for i in ${MACROS}; do
-        rm -f acinclude/$i
-    done
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libsdl-mixer/libsdl2-mixer_2.0.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libsdl-mixer/libsdl2-mixer_2.0.2.bb
new file mode 100644
index 0000000..718f3f5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/libsdl-mixer/libsdl2-mixer_2.0.2.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Simple DirectMedia Layer mixer library V2"
+SECTION = "libs"
+DEPENDS = "virtual/libsdl2 flac libmikmod libvorbis"
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=95e0c3cf63f71b950911e698a54b7fc5"
+
+SRC_URI = "http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "aaa0551393993c14a13f72b339c0ed6c"
+SRC_URI[sha256sum] = "4e615e27efca4f439df9af6aa2c6de84150d17cbfd12174b54868c12f19c83bb"
+
+S = "${WORKDIR}/SDL2_mixer-${PV}"
+
+inherit autotools-brokensep pkgconfig
+
+EXTRA_AUTORECONF += "--include=acinclude"
+EXTRA_OECONF = "--disable-music-mp3 --enable-music-ogg --enable-music-ogg-tremor LIBS=-L${STAGING_LIBDIR}"
+
+PACKAGECONFIG[mad] = "--enable-music-mp3-mad-gpl,--disable-music-mp3-mad-gpl,libmad"
+
+do_configure_prepend () {
+    # Remove old libtool macros.
+    MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
+    for i in ${MACROS}; do
+        rm -f acinclude/$i
+    done
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb
index 44d92a0..de78de2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb
@@ -16,7 +16,7 @@
 
 SRC_URI = " \
     https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz;name=mpv \
-    http://www.freehackers.org/~tnagy/release/waf-1.8.12;name=waf;subdir=${BPN}-${PV} \
+    http://www.freehackers.org/~tnagy/release/waf-1.8.12;name=waf;downloadfilename=waf;subdir=${BPN}-${PV} \
 "
 SRC_URI[mpv.md5sum] = "038d0b660de07ff645ad6a741704ecab"
 SRC_URI[mpv.sha256sum] = "daf3ef358d5f260f2269f7caabce27f446c291457ec330077152127133b71b46"
@@ -64,9 +64,10 @@
     ${PACKAGECONFIG_CONFARGS} \
 "
 
-do_configure_prepend () {
-    ln -sf waf-1.8.12 ${S}/waf
+adjust_waf_perms() {
     chmod +x ${S}/waf
 }
 
+do_patch[postfuncs] += "adjust_waf_perms"
+
 FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-Revert-media-ctl-Don-t-install-libmediactl-and-libv4.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-Revert-media-ctl-Don-t-install-libmediactl-and-libv4.patch
index 7413094..eb294b3 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-Revert-media-ctl-Don-t-install-libmediactl-and-libv4.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-Revert-media-ctl-Don-t-install-libmediactl-and-libv4.patch
@@ -1,4 +1,4 @@
-From 2d6bfa75b2e16b4d764f1bf00bb902fb4b5e507b Mon Sep 17 00:00:00 2001
+From 67a6e919b8263d6d2b7150e62f26fb06bbc526ef Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 27 Feb 2015 21:55:36 +0000
 Subject: [PATCH] Revert "media-ctl: Don't install libmediactl and
@@ -10,6 +10,7 @@
 
 Conflicts:
 	utils/media-ctl/Makefile.am
+
 ---
  utils/media-ctl/Makefile.am | 10 +++-------
  1 file changed, 3 insertions(+), 7 deletions(-)
@@ -40,6 +41,3 @@
  mediactl_includedir=$(includedir)/mediactl
  noinst_HEADERS = mediactl.h v4l2subdev.h
  
--- 
-2.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-buildsystem-do-not-assume-building-in-source-tree.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-buildsystem-do-not-assume-building-in-source-tree.patch
index 54161f9..12609d3 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-buildsystem-do-not-assume-building-in-source-tree.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-buildsystem-do-not-assume-building-in-source-tree.patch
@@ -1,7 +1,7 @@
-From 806822f5acb756d5acda0f9063c84b28b38b3ffb Mon Sep 17 00:00:00 2001
+From 75372b8088c20474497b79ec6cf1e99f2d17f56d Mon Sep 17 00:00:00 2001
 From: Ismo Puustinen <ismo.puustinen@intel.com>
 Date: Mon, 3 Apr 2017 13:23:38 +0300
-Subject: [PATCH v4l-utils] buildsystem: do not assume building in source tree.
+Subject: [PATCH] buildsystem: do not assume building in source tree.
 
 Use $(top_srcdir) as reference for include paths and buildtime scripts.
 Otherwise compilation outside of project root directory will fail
@@ -12,6 +12,7 @@
 Upstream-status: Accepted [https://git.linuxtv.org//v4l-utils.git/commit/?id=bd98c9a99bffc8d44c54859345e4dfee0ada4275]
 
 Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
+
 ---
  utils/cec-compliance/Makefile.am  | 2 +-
  utils/cec-ctl/Makefile.am         | 2 +-
@@ -22,7 +23,7 @@
  6 files changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/utils/cec-compliance/Makefile.am b/utils/cec-compliance/Makefile.am
-index ec5de51..8331aa0 100644
+index f05fe6c..f7d1535 100644
 --- a/utils/cec-compliance/Makefile.am
 +++ b/utils/cec-compliance/Makefile.am
 @@ -7,7 +7,7 @@ cec_compliance_LDFLAGS = -lrt
@@ -35,10 +36,10 @@
  cec-compliance.cpp: version.h
  
 diff --git a/utils/cec-ctl/Makefile.am b/utils/cec-ctl/Makefile.am
-index 0a7ef22..6afb6c9 100644
+index 4a6eae5..570a070 100644
 --- a/utils/cec-ctl/Makefile.am
 +++ b/utils/cec-ctl/Makefile.am
-@@ -7,7 +7,7 @@ cec_ctl_LDFLAGS = -lrt
+@@ -6,7 +6,7 @@ cec_ctl_SOURCES = cec-ctl.cpp
  cec-ctl.cpp: cec-ctl-gen.h
  
  cec-ctl-gen.h: msg2ctl.pl ../../include/linux/cec.h ../../include/linux/cec-funcs.h
@@ -48,7 +49,7 @@
  clean-local:
  	-rm -vf cec-ctl-gen.h
 diff --git a/utils/cec-follower/Makefile.am b/utils/cec-follower/Makefile.am
-index 538edb2..fdbf3d9 100644
+index d8ad292..e3553eb 100644
 --- a/utils/cec-follower/Makefile.am
 +++ b/utils/cec-follower/Makefile.am
 @@ -7,12 +7,12 @@ cec_follower_LDFLAGS = -lrt
@@ -65,7 +66,7 @@
 +	$(top_srcdir)/utils/cec-ctl/msg2ctl.pl 2 $(top_srcdir)/include/linux/cec.h $(top_srcdir)/include/linux/cec-funcs.h >$@
  
  version.h:
- 	@if git rev-parse HEAD >/dev/null 2>&1; then \
+ 	@if git show-ref -s HEAD >/dev/null 2>&1; then \
 diff --git a/utils/qv4l2/Makefile.am b/utils/qv4l2/Makefile.am
 index fd58486..ccd1a2a 100644
 --- a/utils/qv4l2/Makefile.am
@@ -80,7 +81,7 @@
  if WITH_QTGL
  qv4l2_CPPFLAGS += $(QTGL_CFLAGS)
 diff --git a/utils/v4l2-compliance/Makefile.am b/utils/v4l2-compliance/Makefile.am
-index 03db8df..18b9892 100644
+index c2b5919..fb8d12e 100644
 --- a/utils/v4l2-compliance/Makefile.am
 +++ b/utils/v4l2-compliance/Makefile.am
 @@ -5,7 +5,7 @@ DEFS :=
@@ -105,6 +106,3 @@
  
  if WITH_V4L2_CTL_LIBV4L
  v4l2_ctl_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la -lrt -lpthread
--- 
-2.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-ir-ctl-Define-TEMP_FAILURE_RETRY-if-undefined.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-ir-ctl-Define-TEMP_FAILURE_RETRY-if-undefined.patch
index f1e11da..82fc3e1 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-ir-ctl-Define-TEMP_FAILURE_RETRY-if-undefined.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-ir-ctl-Define-TEMP_FAILURE_RETRY-if-undefined.patch
@@ -1,7 +1,7 @@
-From e60aea50e41ae8a17672beb5859beecb66e7a305 Mon Sep 17 00:00:00 2001
+From b2efcc20617d6317f74c4acb2a6af5b765f20b34 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 14 Jul 2017 13:11:25 -0700
-Subject: [PATCH 1/3] ir-ctl: Define TEMP_FAILURE_RETRY if undefined
+Subject: [PATCH] ir-ctl: Define TEMP_FAILURE_RETRY if undefined
 
 use strndup() instead of strndupa() which is not
 universally available in C libraries
@@ -9,6 +9,7 @@
 Taken from AlpineLinux
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  utils/ir-ctl/ir-ctl.c | 14 +++++++++++++-
  1 file changed, 13 insertions(+), 1 deletion(-)
@@ -50,6 +51,3 @@
  
  	if (!strtoscancode(p + 1, &scancode)) {
  		fprintf(stderr, _("error: invalid scancode '%s'\n"), p + 1);
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch
index 2fb4057..a779a30 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch
@@ -1,11 +1,12 @@
-From b3acc4c6407f9553f32582a9aee6a11b5fcd1d8a Mon Sep 17 00:00:00 2001
+From 49f865a17d62db7bbd333a9b83fadeea55686e35 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 14 Jul 2017 13:17:19 -0700
-Subject: [PATCH 2/3] contrib/test: Link mc_nextgen_test with libargp if needed
+Subject: [PATCH] contrib/test: Link mc_nextgen_test with libargp if needed
 
 musl depends on external argp implementation e.g.
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  contrib/test/Makefile.am | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -23,6 +24,3 @@
  
  
  ioctl_test_SOURCES = ioctl-test.c ioctl-test.h ioctl_32.h ioctl_64.h
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch
index 0a986ae..5b84af2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch
@@ -1,7 +1,7 @@
-From d04aa6866cbea57c4a81b033cd60586a9436ac6b Mon Sep 17 00:00:00 2001
+From f7a4b79b3323534460a63b3e6c58ebaf06adf207 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 14 Jul 2017 13:20:05 -0700
-Subject: [PATCH 3/3] v4l2-ctl: Do not use getsubopt
+Subject: [PATCH] v4l2-ctl: Do not use getsubopt
 
 POSIX says that behavior when subopts list is empty is undefined.
 musl libs will set value to NULL which leads to crash.
@@ -9,6 +9,7 @@
 Taken from AlpineLinux
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  utils/v4l2-ctl/v4l2-ctl-common.cpp | 19 ++++++++++---------
  1 file changed, 10 insertions(+), 9 deletions(-)
@@ -44,6 +45,3 @@
  }
  
  void common_cmd(int ch, char *optarg)
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/export-mediactl-headers.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/export-mediactl-headers.patch
index c610e7e..55a5cdc 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/export-mediactl-headers.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/export-mediactl-headers.patch
@@ -1,9 +1,17 @@
-Index: v4l-utils-1.6.2/utils/media-ctl/Makefile.am
-===================================================================
---- v4l-utils-1.6.2.orig/utils/media-ctl/Makefile.am
-+++ v4l-utils-1.6.2/utils/media-ctl/Makefile.am
-@@ -4,8 +4,8 @@ libmediactl_la_CFLAGS = $(LIBUDEV_CFLAGS
- libmediactl_la_LDFLAGS = $(LIBUDEV_LIBS)
+From b82e509c10659a4647961a6da3adf4d285dea2dd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 1 Mar 2015 22:25:07 +0000
+
+---
+ utils/media-ctl/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/media-ctl/Makefile.am b/utils/media-ctl/Makefile.am
+index 7c520a2..748353d 100644
+--- a/utils/media-ctl/Makefile.am
++++ b/utils/media-ctl/Makefile.am
+@@ -17,8 +17,8 @@ CLEANFILES = $(BUILT_SOURCES)
+ nodist_libv4l2subdev_la_SOURCES = $(BUILT_SOURCES)
  libv4l2subdev_la_SOURCES = libv4l2subdev.c
  libv4l2subdev_la_LIBADD = libmediactl.la
 -mediactl_includedir=$(includedir)/mediactl
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/mediactl-pkgconfig.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/mediactl-pkgconfig.patch
index 34fb3cf..9fcf611 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/mediactl-pkgconfig.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/mediactl-pkgconfig.patch
@@ -1,8 +1,16 @@
-Index: v4l-utils-1.6.2/utils/media-ctl/Makefile.am
-===================================================================
---- v4l-utils-1.6.2.orig/utils/media-ctl/Makefile.am
-+++ v4l-utils-1.6.2/utils/media-ctl/Makefile.am
-@@ -7,6 +7,7 @@ libv4l2subdev_la_LIBADD = libmediactl.la
+From 480c04ac6a9d11bfef9d4aca073052fdcee4fdea Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 1 Mar 2015 22:25:07 +0000
+
+---
+ utils/media-ctl/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/utils/media-ctl/Makefile.am b/utils/media-ctl/Makefile.am
+index d11fa2e..7c520a2 100644
+--- a/utils/media-ctl/Makefile.am
++++ b/utils/media-ctl/Makefile.am
+@@ -20,6 +20,7 @@ libv4l2subdev_la_LIBADD = libmediactl.la
  mediactl_includedir=$(includedir)/mediactl
  noinst_HEADERS = mediactl.h v4l2subdev.h
  
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch
index c7a6e51..6ad7f2b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch
@@ -1,19 +1,28 @@
-Upstream: not yet
+From dc0a5c3d2dd4e79d12a150a246a95c4dc88326f1 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Tue, 16 Aug 2011 16:04:35 +0200
+Subject: [PATCH] Upstream: not yet
 
 Fix configure to accept "--prefix=" (a blank prefix).
 
---- libvpx-0.9.1/build/make/configure.sh.orig	2010-06-17 09:08:56.000000000 -0400
-+++ libvpx-0.9.1/build/make/configure.sh	2010-09-23 14:27:48.000000000 -0400
-@@ -444,6 +444,8 @@
+---
+ build/make/configure.sh | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 007e020..04d5cbf 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -581,6 +581,8 @@ process_common_cmdline() {
          ;;
-         --prefix=*)
+       --prefix=*)
          prefix="${optval}"
 +        # Distinguish between "prefix not set" and "prefix set to ''"
 +        prefixset=1
          ;;
-         --libdir=*)
+       --libdir=*)
          libdir="${optval}"
-@@ -587,13 +587,23 @@ process_cmdline() {
+@@ -614,13 +616,23 @@ process_cmdline() {
  }
  
  post_process_common_cmdline() {
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.4.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.4.4.bb
index 1d531ae..b31d8eb 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.4.4.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.4.4.bb
@@ -8,9 +8,9 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=8114b83a0435d8136b47bd70111ce5cd"
 
-DEPENDS = "glib-2.0 dbus json-glib libsoup-2.4 intltool-native gobject-introspection-native"
+DEPENDS = "glib-2.0 dbus json-glib libsoup-2.4 intltool-native"
 
-inherit autotools pkgconfig gtk-doc
+inherit autotools pkgconfig gtk-doc gobject-introspection
 
 SRC_URI = " \
     http://www.freedesktop.org/software/geoclue/releases/2.4/geoclue-${PV}.tar.xz \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
deleted file mode 100644
index 2ea3226..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 1e2cea8945bc2183fbe1a012dcd633a352125952 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Tue, 24 Apr 2012 18:45:14 +0200
-Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot
- from python_lib_dir
-
-* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix
-  and with PYTHONPATH from OE it's pointing to native python dir
-
-    $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/
-    $ python
-    Python 2.7.2 (default, Apr 18 2012, 09:19:59)
-    [GCC 4.6.2] on linux2
-    Type "help", "copyright", "credits" or "license" for more information.
-    >>> from distutils import sysconfig
-    >>> sysconfig.get_config_vars('INCLUDEPY')
-    ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
-    >>>
-    $ unset PYTHONPATH
-    $ python
-    Python 2.7.2 (default, Apr 18 2012, 09:19:59)
-    [GCC 4.6.2] on linux2
-    Type "help", "copyright", "credits" or "license" for more information.
-    >>> from distutils import sysconfig
-    >>> sysconfig.get_config_vars('INCLUDEPY')
-    ['/python2.7']
-    >>> import sysconfig
-    >>> sysconfig.get_config_vars('INCLUDEPY')
-    ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
-* python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
-  returns path to target sysroot
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- SConstruct | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/SConstruct b/SConstruct
-index 6c93311..cde8b3d 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1148,6 +1148,12 @@ else:
-         basecflags += ' -coverage'
-         ldflags += ' -coverage'
-         ldshared += ' -coverage'
-+
-+    if env['sysroot']:
-+        print "Prefixing includepy '%s' with sysroot prefix" % includepy
-+        includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy))
-+        print "'%s'" % includepy
-+
-     # in case CC/CXX was set to the scan-build wrapper,
-     # ensure that we build the python modules with scan-build, too
-     if env['CC'] is None or env['CC'].find('scan-build') < 0:
-@@ -1408,11 +1414,14 @@ if not env['python']:
-     python_install = []
- else:
-     python_lib_dir = env['python_libdir']
-+    python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
-     python_module_dir = python_lib_dir + os.sep + 'gps'
-     python_extensions_install = python_env.Install( DESTDIR + python_module_dir,
-                                                     python_built_extensions)
-     if not env['debug'] and not env['profiling'] and not env['nostrip'] and not sys.platform.startswith('darwin'):
-         python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET')
-+    env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \
-+                     % (python_lib_dir, ))
- 
-     python_modules_install = python_env.Install( DESTDIR + python_module_dir,
-                                                 python_modules)
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch
deleted file mode 100644
index f496b5e..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f221fa959c80b43c65426500a6836a1b5cf6fe0c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 17 Aug 2016 02:16:12 +0000
-Subject: [PATCH] include sys/ttydefaults.h
-
-This is needed for CTRL definition, as exposed by musl on glibc
-this include file gets pulled indirectly.
-
-/usr/src/debug/gpsd/3.14-r0/gpsd-3.14/gpsmon.c:605: undefined reference to `CTRL'
-clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
-scons: *** [gpsmon] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Foreward port to gpsd 3.16
-Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
----
- gpsmon.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gpsmon.c b/gpsmon.c
-index ead84d0..f205cb1 100644
---- a/gpsmon.c
-+++ b/gpsmon.c
-@@ -20,6 +20,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/select.h>
-+#include <sys/ttydefaults.h>
- #include <fcntl.h>
- #include <unistd.h>
- 
--- 
-2.12.0
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
deleted file mode 100644
index 8527f0d..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.16/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 697e2e9ff97487266d817cdd41bacc83f681e3d7 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sun, 29 Apr 2012 00:05:59 +0200
-Subject: [PATCH 4/4] SConstruct: disable html and man docs building because
- xmlto-native from OE is broken
-
-It will try to load dtd and fail:
-| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1
-| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3)
-| xmlto: Fix document syntax or use --skip-validation option
-| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
-| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
-|    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-|                                                               ^
-| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
-| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
-| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
-| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate
-| mv: cannot stat `gpsctl.1': No such file or directory
-| scons: *** [gpsctl.1] Error 1
-| scons: building terminated because of errors.
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- SConstruct | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 0e518e7..c01a71b 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -704,12 +704,12 @@ size_t strlcpy(/*@out@*/char *dst, /*@in@*/const char *src, size_t size);
- 
-     manbuilder = mangenerator = htmlbuilder = None
-     if env['manbuild']:
--        if config.CheckXsltproc():
-+        if False and config.CheckXsltproc():
-             mangenerator = 'xsltproc'
-             build = "xsltproc --nonet %s $SOURCE >$TARGET"
-             htmlbuilder = build % docbook_html_uri
-             manbuilder = build % docbook_man_uri
--        elif WhereIs("xmlto"):
-+        elif False and WhereIs("xmlto"):
-             mangenerator = 'xmlto'
-             xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`"
-             htmlbuilder = xmlto % "html-nochunks"
--- 
-1.8.5.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
new file mode 100644
index 0000000..1fa27c2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
@@ -0,0 +1,81 @@
+From 1e2cea8945bc2183fbe1a012dcd633a352125952 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 24 Apr 2012 18:45:14 +0200
+Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot
+ from python_lib_dir
+
+* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix
+  and with PYTHONPATH from OE it's pointing to native python dir
+
+    $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/
+    $ python
+    Python 2.7.2 (default, Apr 18 2012, 09:19:59)
+    [GCC 4.6.2] on linux2
+    Type "help", "copyright", "credits" or "license" for more information.
+    >>> from distutils import sysconfig
+    >>> sysconfig.get_config_vars('INCLUDEPY')
+    ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
+    >>>
+    $ unset PYTHONPATH
+    $ python
+    Python 2.7.2 (default, Apr 18 2012, 09:19:59)
+    [GCC 4.6.2] on linux2
+    Type "help", "copyright", "credits" or "license" for more information.
+    >>> from distutils import sysconfig
+    >>> sysconfig.get_config_vars('INCLUDEPY')
+    ['/python2.7']
+    >>> import sysconfig
+    >>> sysconfig.get_config_vars('INCLUDEPY')
+    ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
+* python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
+  returns path to target sysroot
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+---
+ SConstruct | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/SConstruct b/SConstruct
+index 3318bb48..e1c4f963 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -934,7 +934,7 @@ else:
+ 
+ # Set up configuration for target Python
+ 
+-PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib()'
++PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib(plat_specific=1)'
+ 
+ PYTHON_CONFIG_NAMES = ['CC', 'CXX', 'OPT', 'BASECFLAGS',
+                        'CCSHARED', 'LDSHARED', 'SO', 'INCLUDEPY', 'LDFLAGS']
+@@ -1364,7 +1364,7 @@ else:
+                        LINK=ldshared,
+                        SHLIBPREFIX="",
+                        SHLIBSUFFIX=python_config['SO'],
+-                       CPPPATH=[python_config['INCLUDEPY']],
++                       CPPPATH=[os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY']))] if env['sysroot'] else [python_config['INCLUDEPY']],
+                        CPPFLAGS=python_config['OPT'],
+                        CFLAGS=python_config['BASECFLAGS'],
+                        CXXFLAGS=python_config['BASECFLAGS'])
+@@ -1662,12 +1662,15 @@ if ((not env['debug'] and not env['profiling'] and not env['nostrip']
+ if not env['python']:
+     python_install = []
+ else:
++    python_libdir = python_libdir.replace(env['sysroot'], '')
+     python_module_dir = python_libdir + os.sep + 'gps'
+     python_extensions_install = python_env.Install(DESTDIR + python_module_dir,
+                                                    python_built_extensions)
+     if ((not env['debug'] and not env['profiling']
+          and not env['nostrip'] and not sys.platform.startswith('darwin'))):
+         python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET')
++    env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \
++                     % (python_libdir, ))
+ 
+     python_modules_install = python_env.Install(DESTDIR + python_module_dir,
+                                                 python_modules)
+-- 
+2.1.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-include-sys-ttydefaults.h.patch b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-include-sys-ttydefaults.h.patch
new file mode 100644
index 0000000..e91e4e9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-include-sys-ttydefaults.h.patch
@@ -0,0 +1,35 @@
+From f221fa959c80b43c65426500a6836a1b5cf6fe0c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 17 Aug 2016 02:16:12 +0000
+Subject: [PATCH] include sys/ttydefaults.h
+
+This is needed for CTRL definition, as exposed by musl on glibc
+this include file gets pulled indirectly.
+
+/usr/src/debug/gpsd/3.14-r0/gpsd-3.14/gpsmon.c:605: undefined reference to `CTRL'
+clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
+scons: *** [gpsmon] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Foreward port to gpsd 3.16
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+---
+ gpsmon.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gpsmon.c b/gpsmon.c
+index 89c43ee2..5cc0dabd 100644
+--- a/gpsmon.c
++++ b/gpsmon.c
+@@ -24,6 +24,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/select.h>
++#include <sys/ttydefaults.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ 
+-- 
+2.12.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
new file mode 100644
index 0000000..ba3d205
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
@@ -0,0 +1,51 @@
+From 697e2e9ff97487266d817cdd41bacc83f681e3d7 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sun, 29 Apr 2012 00:05:59 +0200
+Subject: [PATCH 4/4] SConstruct: disable html and man docs building because
+ xmlto-native from OE is broken
+
+It will try to load dtd and fail:
+| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1
+| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3)
+| xmlto: Fix document syntax or use --skip-validation option
+| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+|    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+|                                                               ^
+| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate
+| mv: cannot stat `gpsctl.1': No such file or directory
+| scons: *** [gpsctl.1] Error 1
+| scons: building terminated because of errors.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+---
+ SConstruct | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 3318bb48..a5bb756d 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -889,11 +889,11 @@ else:
+ 
+     manbuilder = htmlbuilder = None
+     if env['manbuild']:
+-        if config.CheckXsltproc():
++        if False and config.CheckXsltproc():
+             build = "xsltproc --nonet %s $SOURCE >$TARGET"
+             htmlbuilder = build % docbook_html_uri
+             manbuilder = build % docbook_man_uri
+-        elif WhereIs("xmlto"):
++        elif False and WhereIs("xmlto"):
+             xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` " \
+                     "`dirname $TARGET`"
+             htmlbuilder = xmlto % "html-nochunks"
+-- 
+1.8.5.5
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/60-gpsd.rules b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/60-gpsd.rules
deleted file mode 100644
index 61143b8..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/60-gpsd.rules
+++ /dev/null
@@ -1,47 +0,0 @@
-# udev rules for gpsd
-# $Id$
-#
-# GPSes don't have their own USB device class.  They're serial-over-USB
-# devices, so what you see is actually the ID of the serial-over-USB chip.
-# Fortunately, just two of these account for over 80% of consumer-grade
-# GPS sensors.  The gpsd.hotplug.wrapper script will tell a running gpsd
-# that it should look at the device that just went active, because it
-# might be a GPS.
-#
-# The following setup works on Debian - something similar will apply on 
-# other distributions:
-# 
-#   /etc/udev/gpsd.rules
-#   /etc/udev/rules.d/025_gpsd.rules -> ../gpsd.rules
-#   /lib/udev/gpsd.hotplug.wrapper
-#   /lib/udev/gpsd.hotplug
-# 
-# Setting the link in /etc/udev/rules.d activates the rule and determines
-# when to run it on boot (similar to init.d processing).
-
-SUBSYSTEM!="tty", GOTO="gpsd_rules_end"
-
-# Prolific Technology, Inc. PL2303 Serial Port
-ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# ATEN International Co., Ltd UC-232A Serial Port [pl2303]
-ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# FTDI 8U232AM
-ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# Cypress M8/CY7C64013 (DeLorme uses these)
-ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# PS-360 OEM (Microsoft GPS sold with Street and Trips 2005)
-ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB)
-ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241)
-ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# u-blox AG, u-blox 5 (tested with Navilock NL-402U)
-ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# FTDI FT232
-ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-# u-blox 4
-ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-
-ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper"
-
-LABEL="gpsd_rules_end"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd
deleted file mode 100755
index ba73daf..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          gpsd
-# Required-Start:    $remote_fs $network
-# Should-Start:      bluetooth dbus udev
-# Required-Stop:     $remote_fs $network
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: GPS (Global Positioning System) daemon start/stop script
-# Description:       Start/Stop script for the gpsd service daemon,
-#                    which is able to monitor one or more GPS devices
-#                    connected to a host computer, making all data on
-#                    the location and movements of the sensors available
-#                    to be queried on TCP port 2947.
-### END INIT INFO
-
-# Author: Bernd Zeimetz <bzed@debian.org>
-#
-# Please remove the "Author" lines above and replace them
-# with your own name if you copy and modify this script.
-
-# Do NOT "set -e"
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="GPS (Global Positioning System) daemon"
-NAME=gpsd
-DAEMON=/usr/sbin/$NAME
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit 0
-
-# Read configuration, if present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then
-	GPSD_SOCKET=/var/run/gpsd.sock
-fi
-
-if [ -n "$GPSD_SOCKET" ]; then
-        GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET"
-fi
-
-#
-# Function that starts the daemon/service
-#
-do_start()
-{
-	# Return
-	#   0 if daemon has been started
-	#   1 if daemon was already running
-	#   2 if daemon could not be started
-	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \
-        -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \
-		|| return 1
-	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
-		$GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES \
-		|| return 2
-}
-
-#
-# Function that stops the daemon/service
-#
-do_stop()
-{
-	# Return
-	#   0 if daemon has been stopped
-	#   1 if daemon was already stopped
-	#   2 if daemon could not be stopped
-	#   other if a failure occurred
-	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
-	RETVAL="$?"
-	[ "$RETVAL" = 2 ] && return 2
-	# Many daemons don't delete their pidfiles when they exit.
-	rm -f $PIDFILE
-	return "$RETVAL"
-}
-
-#
-# Function that sends a SIGHUP to the daemon/service
-#
-do_reload() {
-	#
-	# If the daemon can reload its configuration without
-	# restarting (for example, when it is sent a SIGHUP),
-	# then implement that here.
-	#
-	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
-	return 0
-}
-
-case "$1" in
-  start)
-		echo "Starting $DESC" "$NAME"
-		do_start
-		exit $?
-	;;
-  stop)
-	echo "Stopping $DESC" "$NAME"
-	do_stop
-	exit $?
-	;;
-  status)
-       ;;
-  reload|force-reload)
-	echo "Reloading $DESC" "$NAME"
-	do_reload
-	exit $?
-	;;
-  restart)
-	#
-	# If the "reload" option is implemented then remove the
-	# 'force-reload' alias
-	#
-	echo "Restarting $DESC" "$NAME"
-	do_stop
-	case "$?" in
-	  0|1)
-		do_start
-		exit $?
-		;;
-	  *)
-	 	# Failed to stop
-		exit 1
-		;;
-	esac
-	;;
-  *)
-	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-	exit 3
-	;;
-esac
-
-:
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd-default b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd-default
deleted file mode 100644
index 0ceff03..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd-default
+++ /dev/null
@@ -1,5 +0,0 @@
-# If you must specify a non-NMEA driver, uncomment and modify the next line
-GPSD_SOCKET="/var/run/gpsd.sock"
-GPSD_OPTIONS="" 
-GPS_DEVICES=""
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service
deleted file mode 100644
index 7131a58..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=GPS (Global Positioning System) Daemon
-Requires=gpsd.socket
-
-[Service]
-EnvironmentFile=/etc/default/gpsd
-ExecStart=/usr/sbin/gpsd -N $GPS_DEVICES
-
-[Install]
-Also=gpsd.socket
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
deleted file mode 100644
index 26d7486..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
+++ /dev/null
@@ -1,140 +0,0 @@
-SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
-SECTION = "console/network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
-DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools"
-PROVIDES = "virtual/gpsd"
-
-EXTRANATIVEPATH += "chrpath-native"
-
-SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
-    file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
-    file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \
-    file://0001-include-sys-ttydefaults.h.patch \
-    file://gpsd-default \
-    file://gpsd \
-    file://60-gpsd.rules \
-    file://gpsd.service \
-"
-SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63"
-SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029"
-
-inherit scons update-rc.d python-dir pythonnative systemd bluetooth update-alternatives
-
-INITSCRIPT_PACKAGES = "gpsd-conf"
-INITSCRIPT_NAME = "gpsd"
-INITSCRIPT_PARAMS = "defaults 35"
-
-SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}"
-
-export STAGING_INCDIR
-export STAGING_LIBDIR
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
-PACKAGECONFIG[bluez] = "bluez='true',bluez='false',${BLUEZ}"
-PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free"
-EXTRA_OESCONS = " \
-    sysroot=${STAGING_DIR_TARGET} \
-    libQgpsmm='false' \
-    debug='true' \
-    strip='false' \
-    chrpath='yes' \
-    systemd='${SYSTEMD_OESCONS}' \
-    libdir='${libdir}' \
-    ${PACKAGECONFIG_CONFARGS} \
-"
-# this cannot be used, because then chrpath is not found and only static lib is built
-# target=${HOST_SYS}
-
-do_compile_prepend() {
-    export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
-    export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
-    export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
-    export LINKFLAGS="${LDFLAGS}"
-}
-
-do_install() {
-    export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
-    export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
-    export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
-    export LINKFLAGS="${LDFLAGS}"
-
-    export DESTDIR="${D}"
-    # prefix is used for RPATH and DESTDIR/prefix for instalation
-    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \
-      bbfatal "scons install execution failed."
-}
-
-do_install_append() {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/
-    install -d ${D}/${sysconfdir}/default
-    install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default
-
-    #support for udev
-    install -d ${D}/${sysconfdir}/udev/rules.d
-    install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d
-    install -d ${D}${base_libdir}/udev/
-    install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
-
-    #support for python
-    install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
-    install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
-
-    #support for systemd
-    install -d ${D}${systemd_unitdir}/system/
-    install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service
-    install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket
-}
-
-PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
-
-FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
-                    ${libdir}/libQgpsmm.prl"
-
-FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
-
-RDEPENDS_${PN} = "gpsd-gpsctl"
-RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
-
-SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging"
-FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
-RDEPENDS_gpsd-udev += "udev gpsd-conf"
-
-SUMMARY_libgpsd = "C service library used for communicating with gpsd"
-FILES_libgpsd = "${libdir}/libgpsd.so.*"
-
-SUMMARY_libgps = "C service library used for communicating with gpsd"
-FILES_libgps = "${libdir}/libgps.so.*"
-
-SUMMARY_gpsd-conf = "gpsd configuration files and init scripts"
-FILES_gpsd-conf = "${sysconfdir}"
-CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default"
-
-SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes"
-FILES_gpsd-gpsctl = "${bindir}/gpsctl"
-
-SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS"
-FILES_gps-utils = "${bindir}/*"
-RDEPENDS_gps-utils = "python-pygps"
-
-SUMMARY_python-pygps = "Python bindings to gpsd"
-FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
-RDEPENDS_python-pygps = " \
-    python-core \
-    python-io \
-    python-threading \
-    python-terminal \
-    python-curses \
-    gpsd \
-    python-json"
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "${PN}.socket"
-
-
-ALTERNATIVE_${PN} = "gpsd-defaults"
-ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
-ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb
new file mode 100644
index 0000000..d526db2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb
@@ -0,0 +1,137 @@
+SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
+SECTION = "console/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
+DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools"
+PROVIDES = "virtual/gpsd"
+
+EXTRANATIVEPATH += "chrpath-native"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+    file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
+    file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \
+    file://0001-include-sys-ttydefaults.h.patch \
+"
+SRC_URI[md5sum] = "e0cfadcf4a65dfbdd2afb11c58f4e4a1"
+SRC_URI[sha256sum] = "68e0dbecfb5831997f8b3d6ba48aed812eb465d8c0089420ab68f9ce4d85e77a"
+
+inherit scons update-rc.d python-dir pythonnative systemd bluetooth update-alternatives
+
+INITSCRIPT_PACKAGES = "gpsd-conf"
+INITSCRIPT_NAME = "gpsd"
+INITSCRIPT_PARAMS = "defaults 35"
+
+SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}"
+
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
+PACKAGECONFIG[bluez] = "bluez='true',bluez='false',${BLUEZ}"
+PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free"
+EXTRA_OESCONS = " \
+    sysroot=${STAGING_DIR_TARGET} \
+    libQgpsmm='false' \
+    debug='true' \
+    strip='false' \
+    chrpath='yes' \
+    systemd='${SYSTEMD_OESCONS}' \
+    libdir='${libdir}' \
+    ${PACKAGECONFIG_CONFARGS} \
+"
+# this cannot be used, because then chrpath is not found and only static lib is built
+# target=${HOST_SYS}
+
+do_compile_prepend() {
+    export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+    export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
+    export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
+    export LINKFLAGS="${LDFLAGS}"
+}
+
+do_install() {
+    export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+    export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
+    export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
+    export LINKFLAGS="${LDFLAGS}"
+
+    export DESTDIR="${D}"
+    # prefix is used for RPATH and DESTDIR/prefix for instalation
+    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \
+      bbfatal "scons install execution failed."
+}
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 0755 ${S}/packaging/deb/etc_init.d_gpsd ${D}/${sysconfdir}/init.d/gpsd
+    install -d ${D}/${sysconfdir}/default
+    install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default
+
+    #support for udev
+    install -d ${D}/${sysconfdir}/udev/rules.d
+    install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d/
+    install -d ${D}${base_libdir}/udev/
+    install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
+
+    #support for python
+    install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
+    install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
+
+    #support for systemd
+    install -d ${D}${systemd_unitdir}/system/
+    install -m 0644 ${S}/systemd/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service
+    install -m 0644 ${S}/systemd/${BPN}ctl@.service ${D}${systemd_unitdir}/system/${BPN}ctl@.service
+    install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket
+}
+
+PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
+
+FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
+                    ${libdir}/libQgpsmm.prl"
+
+FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
+
+RDEPENDS_${PN} = "gpsd-gpsctl"
+RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
+
+SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging"
+FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
+RDEPENDS_gpsd-udev += "udev gpsd-conf"
+
+SUMMARY_libgpsd = "C service library used for communicating with gpsd"
+FILES_libgpsd = "${libdir}/libgpsd.so.*"
+
+SUMMARY_libgps = "C service library used for communicating with gpsd"
+FILES_libgps = "${libdir}/libgps.so.*"
+
+SUMMARY_gpsd-conf = "gpsd configuration files and init scripts"
+FILES_gpsd-conf = "${sysconfdir}"
+CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default"
+
+SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes"
+FILES_gpsd-gpsctl = "${bindir}/gpsctl"
+
+SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS"
+FILES_gps-utils = "${bindir}/*"
+RDEPENDS_gps-utils = "python-pygps"
+
+SUMMARY_python-pygps = "Python bindings to gpsd"
+FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
+RDEPENDS_python-pygps = " \
+    python-core \
+    python-io \
+    python-threading \
+    python-terminal \
+    python-curses \
+    gpsd \
+    python-json"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "${BPN}.socket ${BPN}ctl@.service"
+
+
+ALTERNATIVE_${PN} = "gpsd-defaults"
+ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
+ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb b/import-layers/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb
index 1a00b08..010f65f 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-navigation/orrery/orrery_2.7.bb
@@ -5,7 +5,9 @@
 LIC_FILES_CHKSUM = "file://orrery.c;endline=25;md5=d792bdf2b591972da175aecc38d88cfe"
 DEPENDS = "gtk+"
 
-inherit autotools-brokensep pkgconfig
+inherit distro_features_check autotools-brokensep pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://projects.openmoko.org/frs/download.php/923/orrery_2.7_clean.tar.gz \
            file://orrery.png \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/passwdqc/passwdqc/makefile-add-ldflags.patch b/import-layers/meta-openembedded/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/passwdqc/passwdqc/makefile-add-ldflags.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-security/passwdqc/passwdqc_1.3.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-security/passwdqc/passwdqc_1.3.1.bb
new file mode 100644
index 0000000..8fc0b35
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-security/passwdqc/passwdqc_1.3.1.bb
@@ -0,0 +1,66 @@
+SUMMARY = "A password/passphrase strength checking and enforcement toolset"
+DESCRIPTION = "\
+passwdqc is a password/passphrase strength checking and policy enforcement \
+toolset, including an optional PAM module (pam_passwdqc), command-line \
+programs (pwqcheck and pwqgen), and a library (libpasswdqc). \
+pam_passwdqc is normally invoked on password changes by programs such as \
+passwd(1).  It is capable of checking password or passphrase strength, \
+enforcing a policy, and offering randomly-generated passphrases, with \
+all of these features being optional and easily (re-)configurable. \
+\
+pwqcheck and pwqgen are standalone password/passphrase strength checking \
+and random passphrase generator programs, respectively, which are usable \
+from scripts. \
+\
+libpasswdqc is the underlying library, which may also be used from \
+third-party programs. \
+"
+
+HOMEPAGE = "http://www.openwall.com/passwdqc"
+SECTION = "System Environment/Base"
+
+DEPENDS += "libpam"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1b4af6f3d4ee079a38107366e93b334d"
+
+SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \
+           file://makefile-add-ldflags.patch \
+          "
+SRC_URI[md5sum] = "3878b57bcd3fdbcf3d4b362dbc6228b9"
+SRC_URI[sha256sum] = "d1fedeaf759e8a0f32d28b5811ef11b5a5365154849190f4b7fab670a70ffb14"
+
+# explicitly define LINUX_PAM in case DISTRO_FEATURES no pam
+# this package's pam_passwdqc.so needs pam
+CFLAGS_append += "-Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM"
+
+# -e is no longer default setting in bitbake.conf
+EXTRA_OEMAKE = "-e"
+
+do_compile() {
+    # make sure sub make use environment to override variables in Makefile
+    # Linux)    $(MAKE), there is a tab between
+    sed -i -e 's/Linux)	$(MAKE) CFLAGS_lib/Linux)	$(MAKE) -e CFLAGS_lib/' ${S}/Makefile
+
+    # LD_lib and LD must be CC because of Makefile
+    oe_runmake LD="${CC}"
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D} SHARED_LIBDIR=${base_libdir} \
+           DEVEL_LIBDIR=${libdir} SECUREDIR=${base_libdir}/security \
+           INSTALL="install -p"
+}
+
+PROVIDES += "pam-${BPN}"
+PACKAGES =+ "lib${BPN} pam-${BPN}"
+
+FILES_lib${BPN} = "${base_libdir}/libpasswdqc.so.0"
+FILES_pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so"
+FILES_${PN}-dbg += "${base_libdir}/security/.debug"
+
+RDEPENDS_${PN} = "lib${BPN} pam-${BPN}"
+RDEPENDS_pam-${BPN} = "lib${BPN}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.5.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.5.0.bb
new file mode 100644
index 0000000..f362775
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-security/tomoyo-tools/tomoyo-tools_2.5.0.bb
@@ -0,0 +1,30 @@
+SUMMARY = "TOMOYO Linux tools"
+DESCRIPTION = "TOMOYO Linux is a Mandatory Access Control (MAC) implementation \
+for Linux that can be used to increase the security of a system, while also \
+being useful purely as a system analysis tool."
+HOMEPAGE = "http://tomoyo.sourceforge.jp/"
+SECTION = "System Environment/Kernel"
+
+SRC_URI = "http://jaist.dl.sourceforge.jp/tomoyo/53357/${BP}-20170102.tar.gz"
+SRC_URI[md5sum] = "888804d58742452fe213a68f7eadd0ad"
+SRC_URI[sha256sum] = "00fedfac5e514321250bbe69eaccc732c8a8158596f77a785c2e3ae9f9968283"
+
+S = "${WORKDIR}/${BPN}"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.tomoyo;md5=751419260aa954499f7abaabaa882bbe"
+
+FILES_${PN}     += "${libdir}/tomoyo"
+FILES_${PN}-dbg += "${libdir}/tomoyo/.debug"
+
+DEPENDS = "linux-libc-headers ncurses"
+
+EXTRA_OEMAKE = "-e USRLIBDIR=${libdir}"
+
+do_compile () {
+    oe_runmake 'CC=${CC}'
+}
+
+do_install() {
+    oe_runmake install INSTALLDIR=${D}
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/dash/dash/0001-Fix-printf-format-errors-with-clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-shells/dash/dash/0001-Fix-printf-format-errors-with-clang.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/dash/dash/0001-Fix-printf-format-errors-with-clang.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-shells/dash/dash/0001-Fix-printf-format-errors-with-clang.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-shells/dash/dash_0.5.9.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-shells/dash/dash_0.5.9.1.bb
new file mode 100644
index 0000000..6dee66f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-shells/dash/dash_0.5.9.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Small and fast POSIX-compliant shell"
+HOMEPAGE = "http://gondor.apana.org.au/~herbert/dash/"
+SECTION = "System Environment/Shells"
+
+LICENSE = "BSD & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b5262b4a1a1bff72b48e935531976d2e"
+
+inherit autotools update-alternatives
+
+SRC_URI = "http://gondor.apana.org.au/~herbert/${BPN}/files/${BP}.tar.gz \
+           file://0001-Fix-printf-format-errors-with-clang.patch \
+           "
+SRC_URI[md5sum] = "6472702a8d9760d166ef8333dcb527a6"
+SRC_URI[sha256sum] = "5ecd5bea72a93ed10eb15a1be9951dd51b52e5da1d4a7ae020efd9826b49e659"
+
+EXTRA_OECONF += "--bindir=${base_bindir}"
+
+ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/dash"
+ALTERNATIVE_PRIORITY = "10"
+
+pkg_postinst_${PN} () {
+    grep -q "^${base_bindir}/dash$" $D${sysconfdir}/shells || echo ${base_bindir}/dash >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+    printf "$(grep -v "^${base_bindir}/dash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tcsh/tcsh/0001-Enable-system-malloc-on-all-linux.patch b/import-layers/meta-openembedded/meta-oe/recipes-shells/tcsh/tcsh/0001-Enable-system-malloc-on-all-linux.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/tcsh/tcsh/0001-Enable-system-malloc-on-all-linux.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-shells/tcsh/tcsh/0001-Enable-system-malloc-on-all-linux.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tcsh/tcsh/0002-Add-debian-csh-scripts.patch b/import-layers/meta-openembedded/meta-oe/recipes-shells/tcsh/tcsh/0002-Add-debian-csh-scripts.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/tcsh/tcsh/0002-Add-debian-csh-scripts.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-shells/tcsh/tcsh/0002-Add-debian-csh-scripts.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/tcsh/tcsh_6.20.00.bb b/import-layers/meta-openembedded/meta-oe/recipes-shells/tcsh/tcsh_6.20.00.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/tcsh/tcsh_6.20.00.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-shells/tcsh/tcsh_6.20.00.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.4.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.4.2.bb
new file mode 100644
index 0000000..100c449
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-shells/zsh/zsh_5.4.2.bb
@@ -0,0 +1,64 @@
+SUMMARY = "UNIX Shell similar to the Korn shell"
+DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \
+               powerful scripting language. Many of the useful features of bash, \
+               ksh, and tcsh were incorporated into zsh; many original features were added."
+HOMEPAGE = "http://www.zsh.org"
+SECTION = "base/shell"
+
+LICENSE = "zsh"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec"
+
+DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz"
+SRC_URI[md5sum] = "dfe156fd69b0d8d1745ecf6d6e02e047"
+SRC_URI[sha256sum] = "957bcdb2c57f64c02f673693ea5a7518ef24b6557aeb3a4ce222cefa6d74acc9"
+
+inherit autotools gettext update-alternatives
+
+EXTRA_OECONF = " \
+    --bindir=${base_bindir} \
+    --enable-etcdir=${sysconfdir} \
+    --enable-fndir=${datadir}/${PN}/${PV}/functions \
+    --enable-site-fndir=${datadir}/${PN}/site-functions \
+    --with-term-lib='ncursesw ncurses' \
+    --with-tcsetpgrp \
+    --enable-cap \
+    --enable-multibyte \
+    --disable-gdbm \
+    --disable-dynamic \
+    zsh_cv_shared_environ=yes \
+"
+
+# Configure respects --bindir from EXTRA_OECONF, but then Src/Makefile will read bindir from environment
+export bindir="${base_bindir}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
+ALTERNATIVE_PRIORITY = "100"
+
+export AUTOHEADER = "true"
+
+do_configure () {
+    gnu-configize --force ${S}
+    oe_runconf
+}
+
+do_install_append () {
+    rm -fr ${D}/usr/share
+}
+
+pkg_postinst_${PN} () {
+    touch $D${sysconfdir}/shells
+    grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells
+    grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
+}
+
+FILES_${PN}-dbg += "\
+    ${libdir}/${PN}/${PV}/${PN}/.debug/*.so \
+    ${libdir}/${PN}/${PV}/${PN}/db/.debug/*.so \
+    ${libdir}/${PN}/${PV}/${PN}/net/.debug/*.so \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/native-helpers.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/native-helpers.patch
index 291b66b..47ce007 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/native-helpers.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/native-helpers.patch
@@ -3,20 +3,24 @@
 comment: Stage the native anthy helpers mkfiledic, mkdepgraph, mkworddic, 
 comment: calctrans and proccorpus.
 
---- anthy-7811/mkanthydic/Makefile.am~	2006-05-13 18:28:35.000000000 +0900
-+++ anthy-7811/mkanthydic/Makefile.am	2006-06-18 10:56:25.770000000 +0900
-@@ -3,7 +3,7 @@
+Index: anthy-9100h/mkanthydic/Makefile.am
+===================================================================
+--- anthy-9100h.orig/mkanthydic/Makefile.am
++++ anthy-9100h/mkanthydic/Makefile.am
+@@ -3,7 +3,7 @@ noinst_SCRIPTS =
  CLEANFILES = anthy.dic
- INCLUDES = -I$(top_srcdir)/include -DSRCDIR=\"$(srcdir)\"
+ INCLUDES = -I$(top_srcdir)/ -DSRCDIR=\"$(srcdir)\"
  
 -noinst_PROGRAMS = mkfiledic
 +bin_PROGRAMS = mkfiledic
  mkfiledic_SOURCES = mkfiledic.c
  mkfiledic_LDADD = ../src-diclib/libdiclib.la
  
---- anthy-7811/depgraph/Makefile.am~	2006-06-02 00:20:54.000000000 +0900
-+++ anthy-7811/depgraph/Makefile.am	2006-06-18 10:57:19.420000000 +0900
-@@ -9,7 +9,7 @@
+Index: anthy-9100h/depgraph/Makefile.am
+===================================================================
+--- anthy-9100h.orig/depgraph/Makefile.am
++++ anthy-9100h/depgraph/Makefile.am
+@@ -9,7 +9,7 @@ CLEANFILES = anthy.dep
  EXTRA_DIST = indepword.txt $(DEPWORDS)
  
  # Generate the dictionary
@@ -25,10 +29,12 @@
  mkdepgraph_SOURCES = mkdepgraph.c
  mkdepgraph_LDADD =  ../src-main/libanthy.la ../src-worddic/libanthydic.la
  
---- anthy-7811/mkworddic/Makefile.am~	2006-05-13 18:29:07.000000000 +0900
-+++ anthy-7811/mkworddic/Makefile.am	2006-06-18 11:21:56.300000000 +0900
-@@ -16,7 +16,8 @@
-  udict dict.args.in
+Index: anthy-9100h/mkworddic/Makefile.am
+===================================================================
+--- anthy-9100h.orig/mkworddic/Makefile.am
++++ anthy-9100h/mkworddic/Makefile.am
+@@ -26,7 +26,8 @@ DIC_FILES = @top_srcdir@/alt-cannadic/gc
+ 	    @top_srcdir@/mkworddic/udict
  
  # Generate the dictionary
 -noinst_PROGRAMS = mkworddic
@@ -36,10 +42,12 @@
 +bin_PROGRAMS = mkworddic
  mkworddic_SOURCES = mkdic.c writewords.c mkudic.c calcfreq.c mkdic.h
  mkworddic_LDADD = ../src-worddic/libanthydic.la
-
---- anthy-9100e.orig/calctrans/Makefile.am	2008-05-08 15:04:13.000000000 +0200
-+++ anthy-9100e/calctrans/Makefile.am	2008-05-08 15:04:24.000000000 +0200
-@@ -3,7 +3,7 @@
+ 
+Index: anthy-9100h/calctrans/Makefile.am
+===================================================================
+--- anthy-9100h.orig/calctrans/Makefile.am
++++ anthy-9100h/calctrans/Makefile.am
+@@ -3,7 +3,7 @@ EXTRA_DIST =\
   corpus.3.txt corpus.4.txt corpus.5.txt\
   corpus_info weak_words
  
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/not_build_elc.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/not_build_elc.patch
index bf748f3..1c5c494 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/not_build_elc.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/anthy/anthy/not_build_elc.patch
@@ -1,12 +1,13 @@
 upstream: not applicable
 source: stolen from debian
 
-diff -Naur anthy-7811/src-util.orig/Makefile.am anthy-7811/src-util/Makefile.am
---- anthy-7811/src-util.orig/Makefile.am	2006-06-18 10:47:55.790000000 +0900
-+++ anthy-7811/src-util/Makefile.am	2006-06-18 10:48:23.860000000 +0900
-@@ -6,7 +6,8 @@
+Index: anthy-9100h/src-util/Makefile.am
+===================================================================
+--- anthy-9100h.orig/src-util/Makefile.am
++++ anthy-9100h/src-util/Makefile.am
+@@ -8,7 +8,8 @@ ELISP_FILES = anthy.el anthy-dic.el anth
   anthy-isearch.el anthy-azik.el anthy-kyuri.el
- EXTRA_DIST = $(ELISP_FILES) typetab dic-tool-usage.txt rcsize.rb
+ EXTRA_DIST = $(ELISP_FILES) typetab dic-tool-usage.txt anthy.i
  bin_PROGRAMS = anthy-dic-tool anthy-agent anthy-morphological-analyzer
 -ELCFILES = anthy.elc anthy-dic.elc anthy-azik.elc anthy-conf.elc anthy-isearch.elc anthy-kyuri.elc leim-list.elc
 +#ELCFILES = anthy.elc anthy-dic.elc anthy-azik.elc anthy-conf.elc anthy-isearch.elc anthy-kyuri.elc leim-list.elc
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
index 9a19876..0ba7c76 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -1,4 +1,4 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From 32b15332e2130a54b25f4fbf6f58b407b851dd8f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 13 Apr 2015 17:02:13 -0700
 Subject: [PATCH] Unset need_charset_alias when building for musl
@@ -11,14 +11,15 @@
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
- lib/gnulib.mk | 2 +-
+ gnulib/lib/Makefile.am | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: augeas-1.2.0/gnulib/lib/Makefile.am
-===================================================================
---- augeas-1.2.0.orig/gnulib/lib/Makefile.am
-+++ augeas-1.2.0/gnulib/lib/Makefile.am
+diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
+index 963b22d..75788d2 100644
+--- a/gnulib/lib/Makefile.am
++++ b/gnulib/lib/Makefile.am
 @@ -463,7 +463,7 @@ install-exec-localcharset: all-local
  	  case '$(host_os)' in \
  	    darwin[56]*) \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/add-missing-argz-conditional.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/add-missing-argz-conditional.patch
index abbdbaa..368bb41 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/add-missing-argz-conditional.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/add-missing-argz-conditional.patch
@@ -1,14 +1,21 @@
-Add missing GL_GENERATE_ARGZ_H conditional
+From 9a6e6374da7d7056db0950f0f7d6b8b905009775 Mon Sep 17 00:00:00 2001
+From: Constantin Musca <constantinx.musca@intel.com>
+Date: Fri, 15 Jul 2016 10:04:48 +0300
+Subject: [PATCH] Add missing GL_GENERATE_ARGZ_H conditional
 
 - GL_GENERATE_ARGZ_H is used in gnulib/lib/Makefile.am
 
 Upstream-Status: Pending
 Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
 
-Index: augeas-1.0.0/configure.ac
-===================================================================
---- augeas-1.0.0.orig/configure.ac
-+++ augeas-1.0.0/configure.ac
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 72b6984..fb9653e 100644
+--- a/configure.ac
++++ b/configure.ac
 @@ -55,6 +55,8 @@ AC_ARG_WITH([failmalloc],
  
  AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno])
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/sepbuildfix.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/sepbuildfix.patch
index b82a3ee..2b18618 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/sepbuildfix.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/augeas/augeas/sepbuildfix.patch
@@ -1,15 +1,24 @@
-Ensure that builds in separate builddirs (${B} != ${S}) correctly install the 
+From 8a277957a2579e7149c1850675441b288192077c Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 15 Jul 2016 10:04:48 +0300
+Subject: [PATCH] augeas: fix separate builddirs
+
+Ensure that builds in separate builddirs (${B} != ${S}) correctly install the
 lenses files.
 
 Upstream-Status: Pending
 
 RP 2013/4/17
 
-Index: augeas-1.0.0/Makefile.am
-===================================================================
---- augeas-1.0.0.orig/Makefile.am	2012-11-02 15:20:11.000000000 +0000
-+++ augeas-1.0.0/Makefile.am	2013-04-17 10:36:24.033400125 +0000
-@@ -5,8 +5,8 @@
+---
+ Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 87d511a..7710b3b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5,8 +5,8 @@ ACLOCAL_AMFLAGS = -I gnulib/m4
  lensdir=$(datadir)/augeas/lenses/dist
  lenstestdir=$(datadir)/augeas/lenses/dist/tests
  
@@ -18,5 +27,5 @@
 +dist_lens_DATA=$(wildcard $(top_srcdir)/lenses/*.aug)
 +dist_lenstest_DATA=$(wildcard $(top_srcdir)lenses/tests/*.aug)
  
- EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING
+ EXTRA_DIST=augeas.spec build/ac-aux/move-if-change Makefile.am HACKING.md
  
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/canonical-multitouch/geis_2.2.17.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/canonical-multitouch/geis_2.2.17.bb
index 976aafb..30d41a1 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/canonical-multitouch/geis_2.2.17.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/canonical-multitouch/geis_2.2.17.bb
@@ -30,7 +30,6 @@
 
 FILES_${PN}-bin = "${bindir}"
 RDEPENDS_${PN}-bin = " \
-    python3-argparse \
     python3-compression \
     python3-core \
     python3-crypt \
@@ -40,8 +39,6 @@
     python3-pickle \
     python3-shell \
     python3-stringold \
-    python3-subprocess \
-    python3-textutils \
     python3-threading \
 "
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/ceres-solver/ceres-solver_1.13.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/ceres-solver/ceres-solver_1.13.bb
deleted file mode 100644
index e883c70..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/ceres-solver/ceres-solver_1.13.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-DESCRIPTION = "Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems."
-AUTHOR = "Sameer Agarwal and Keir Mierle and Others"
-HOMEPAGE = "http://ceres-solver.org/"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=35e00f0c4c96a0820a03e0b31e6416be"
-
-SRC_URI = "git://github.com/ceres-solver/ceres-solver.git"
-SRCREV = "19333b0f55c8462381038e70d42af43b52941128"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "libeigen glog"
-
-inherit cmake
-
-# Only a static library and headers are created
-ALLOW_EMPTY_${PN} = "1"
-
-FILES_${PN}-dev += "${libdir}/cmake/*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.bb
new file mode 100644
index 0000000..29917c8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems."
+AUTHOR = "Sameer Agarwal and Keir Mierle and Others"
+HOMEPAGE = "http://ceres-solver.org/"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=35e00f0c4c96a0820a03e0b31e6416be"
+
+SRC_URI = "git://github.com/ceres-solver/ceres-solver.git"
+SRCREV = "facb199f3eda902360f9e1d5271372b7e54febe1"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libeigen glog"
+
+inherit cmake
+
+# Only a static library and headers are created
+ALLOW_EMPTY_${PN} = "1"
+
+FILES_${PN}-dev += "${libdir}/cmake/*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest-2.10.2/fix-cmake-install.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest-2.10.2/fix-cmake-install.patch
new file mode 100644
index 0000000..0feafef
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest-2.10.2/fix-cmake-install.patch
@@ -0,0 +1,17 @@
+Description: install cmake files into /usr/lib/cmake/cpprestsdk
+Author: Gianfranco Costamagna <locutusofborg@debian.org>
+Upstream-Status: https://github.com/Microsoft/cpprestsdk/pull/737
+Forwarded: https://github.com/Microsoft/cpprestsdk/pull/737
+Last-Update: 2018-04-19
+
+--- cpprest-2.10.2.orig/CMakeLists.txt
++++ cpprest-2.10.2/CMakeLists.txt
+@@ -18,7 +18,7 @@ enable_testing()
+ set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
+ set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.")
+ set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.")
+-set(CPPREST_EXPORT_DIR lib/cpprestsdk CACHE STRING "Directory to install CMake config files.")
++set(CPPREST_EXPORT_DIR lib/cmake/cpprestsdk CACHE STRING "Directory to install CMake config files.")
+ set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
+ set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
new file mode 100644
index 0000000..2ba6fc6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design."
+SECTION = "libs/network"
+HOMEPAGE = "https://github.com/Microsoft/cpprestsdk/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${S}/../license.txt;md5=a2e15b954769218ff912468eecd6a02f"
+DEPENDS = "openssl websocketpp zlib boost"
+
+SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master"
+
+SRC_URI += "file://fix-cmake-install.patch"
+
+# tag 2.10.2
+SRCREV= "fea848e2a77563cf2a6f28f8eab396fd6e787fbf"
+
+S = "${WORKDIR}/git/Release"
+
+inherit cmake
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/dos2unix/dos2unix_7.3.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/dos2unix/dos2unix_7.3.4.bb
deleted file mode 100644
index abf7d1c..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/dos2unix/dos2unix_7.3.4.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Convert text file line endings between CRLF and LF"
-DESCRIPTION = "The Dos2unix package includes utilities dos2unix and \
-unix2dos to convert plain text files in DOS or Mac format to Unix \
-format and vice versa."
-HOMEPAGE = "http://waterlan.home.xs4all.nl/dos2unix.html"
-SECTION = "support"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=1b78fca784db24f4a40e30b300787f3f"
-
-SRC_URI = "git://git.code.sf.net/p/dos2unix/dos2unix"
-
-# Release 7.3.4
-SRCREV = "8381ba4e1c4cd5ce98ebd9c24726d51cb203cde0"
-
-S = "${WORKDIR}/git/dos2unix"
-
-inherit gettext perlnative
-
-# The dos2unix NLS relies on po4a-native, while po4a recipe is
-# provided by meta-perl layer, so make it optional here, you
-# need have meta-perl in bblayers.conf before enabling nls in
-# PACKAGECONFIG.
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[nls] = "ENABLE_NLS=1,ENABLE_NLS=,po4a-native"
-
-EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} LDFLAGS_USER='${LDFLAGS}'"
-EXTRA_OEMAKE_class-native = "ENABLE_NLS="
-
-do_install () {
-    oe_runmake DESTDIR="${D}${base_prefix}" install
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/dos2unix/dos2unix_7.4.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/dos2unix/dos2unix_7.4.0.bb
new file mode 100644
index 0000000..8d3c578
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/dos2unix/dos2unix_7.4.0.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Convert text file line endings between CRLF and LF"
+DESCRIPTION = "The Dos2unix package includes utilities dos2unix and \
+unix2dos to convert plain text files in DOS or Mac format to Unix \
+format and vice versa."
+HOMEPAGE = "http://waterlan.home.xs4all.nl/dos2unix.html"
+SECTION = "support"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=1b78fca784db24f4a40e30b300787f3f"
+
+SRC_URI = "git://git.code.sf.net/p/dos2unix/dos2unix"
+
+# Release 7.4.0
+SRCREV = "1182533bde3c1fe65be2ead465e87671faa2c027"
+
+S = "${WORKDIR}/git/dos2unix"
+
+inherit gettext perlnative
+
+# The dos2unix NLS relies on po4a-native, while po4a recipe is
+# provided by meta-perl layer, so make it optional here, you
+# need have meta-perl in bblayers.conf before enabling nls in
+# PACKAGECONFIG.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[nls] = "ENABLE_NLS=1,ENABLE_NLS=,po4a-native"
+
+EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} LDFLAGS_USER='${LDFLAGS}'"
+EXTRA_OEMAKE_class-native = "ENABLE_NLS="
+
+do_install () {
+    oe_runmake DESTDIR="${D}${base_prefix}" install
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/engine-pkcs11/engine-pkcs11_0.2.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/engine-pkcs11/engine-pkcs11_0.2.2.bb
deleted file mode 100644
index 047f701..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/engine-pkcs11/engine-pkcs11_0.2.2.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "A PKCS"
-DESCRIPTION = "\
-Engine_pkcs11 is an implementation of an engine for OpenSSL. It can be \
-loaded using code, config file or command line and will pass any function \
-call by openssl to a PKCS cards and software for using smart cards in PKCS"
-HOMEPAGE = "https://github.com/OpenSC/engine_pkcs11"
-SECTION = "Development/Libraries"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://src/engine_pkcs11.h;startline=1;endline=26;md5=973a19f8a6105de047f2adfbbfc04c33"
-DEPENDS = "openssl libp11"
-
-SRC_URI = "git://github.com/OpenSC/engine_pkcs11.git"
-SRCREV = "132fcf2c8b319f9f4b2ebdc8dcb54ff496dc0519"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "\
-    --disable-static \
-    --libdir ${libdir}/engines \
-"
-
-do_install_append () {
-    rm -f ${D}${libdir}/engines/libpkcs11.la
-}
-
-FILES_${PN} += "${libdir}/engines/libpkcs11${SOLIBSDEV}"
-FILES_${PN}-dbg += "${libdir}/engines/.debug/"
-
-RDEPENDS_${PN} += "openssl libp11 opensc"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/eventlog/eventlog_0.2.13.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/eventlog/eventlog_0.2.13.bb
index 59b01b6..13eb794 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/eventlog/eventlog_0.2.13.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/eventlog/eventlog_0.2.13.bb
@@ -13,7 +13,7 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b8ba8e77bcda9a53fac0fe39fe957767"
 
-SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/3.4.2/source/${BPN}_${PV}.tar.gz"
+SRC_URI = "https://www.balabit.com/downloads/syslog-ng/open-source-edition/3.4.2/source/${BPN}_${PV}.tar.gz"
 
 inherit autotools pkgconfig
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.6.bb
deleted file mode 100644
index ed14e16..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.6.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-DESCRIPTION = "FFTW"
-SECTION = "libs"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-SRC_URI = " \
-    http://www.fftw.org/fftw-${PV}-pl1.tar.gz \
-    file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \
-"
-SRC_URI[md5sum] = "682a0e78d6966ca37c7446d4ab4cc2a1"
-SRC_URI[sha256sum] = "1ef4aa8427d9785839bc767f3eb6a84fcb5e9a37c31ed77a04e7e047519a183d"
-
-S = "${WORKDIR}/fftw-${PV}-pl1"
-
-inherit autotools pkgconfig
-
-# we had multiple recipes in the past
-PROVIDES = "fftwl fftwf"
-
-EXTRA_OECONF = "--disable-fortran --enable-shared --enable-threads"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-FFTW_NEON = "${@bb.utils.contains('TUNE_FEATURES', 'neon', '--enable-neon', '', d)}"
-FFTW_NEON_class-native = ""
-
-do_configure() {
-    # configure fftw
-    rm -rf ${WORKDIR}/build-fftw
-	mkdir -p ${B}
-    cd ${B}
-    # full (re)configure
-    autotools_do_configure
-    mv ${B} ${WORKDIR}/build-fftw
-
-    # configure fftwl
-    rm -rf ${WORKDIR}/build-fftwl
-	mkdir -p ${B}
-    cd ${B}
-    # configure only
-    oe_runconf  --enable-long-double
-    mv ${B} ${WORKDIR}/build-fftwl 
-
-    # configure fftwf
-    rm -rf ${WORKDIR}/build-fftwf
-	mkdir -p ${B}
-    cd ${B}
-    # configure only
-    oe_runconf --enable-single ${FFTW_NEON}
-    mv ${B} ${WORKDIR}/build-fftwf
-}
-
-do_compile() {
-    for lib in fftw fftwl fftwf; do
-        cd ${WORKDIR}/build-$lib
-        autotools_do_compile
-    done
-}
-
-do_install() {
-    for lib in fftw fftwl fftwf; do
-        cd ${WORKDIR}/build-$lib
-        autotools_do_install
-    done
-}
-
-
-PACKAGES =+ "libfftw libfftwl libfftwf"
-FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*"
-FILES_libfftwl = "${libdir}/libfftw3l.so.* ${libdir}/libfftw3l_*.so.*"
-FILES_libfftwf = "${libdir}/libfftw3f.so.* ${libdir}/libfftw3f_*.so.*"
-
-PACKAGES =+ "fftw-wisdom fftwl-wisdom fftwf-wisdom fftw-wisdom-to-conf"
-FILES_fftw-wisdom = "${bindir}/fftw-wisdom"
-FILES_fftwl-wisdom = "${bindir}/fftwl-wisdom"
-FILES_fftwf-wisdom = "${bindir}/fftwf-wisdom"
-FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf"
-
-RDEPENDS_${PN}-dev = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.7.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.7.bb
new file mode 100644
index 0000000..aae6ec9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.7.bb
@@ -0,0 +1,80 @@
+DESCRIPTION = "FFTW"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+SRC_URI = " \
+    http://www.fftw.org/fftw-${PV}.tar.gz \
+    file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \
+"
+SRC_URI[md5sum] = "0d5915d7d39b3253c1cc05030d79ac47"
+SRC_URI[sha256sum] = "3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573"
+
+inherit autotools pkgconfig
+
+# we had multiple recipes in the past
+PROVIDES = "fftwl fftwf"
+
+EXTRA_OECONF = "--disable-fortran --enable-shared --enable-threads"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+FFTW_NEON = "${@bb.utils.contains('TUNE_FEATURES', 'neon', '--enable-neon', '', d)}"
+FFTW_NEON_class-native = ""
+
+do_configure() {
+    # configure fftw
+    rm -rf ${WORKDIR}/build-fftw
+	mkdir -p ${B}
+    cd ${B}
+    # full (re)configure
+    autotools_do_configure
+    mv ${B} ${WORKDIR}/build-fftw
+
+    # configure fftwl
+    rm -rf ${WORKDIR}/build-fftwl
+	mkdir -p ${B}
+    cd ${B}
+    # configure only
+    oe_runconf  --enable-long-double
+    mv ${B} ${WORKDIR}/build-fftwl 
+
+    # configure fftwf
+    rm -rf ${WORKDIR}/build-fftwf
+	mkdir -p ${B}
+    cd ${B}
+    # configure only
+    oe_runconf --enable-single ${FFTW_NEON}
+    mv ${B} ${WORKDIR}/build-fftwf
+}
+
+do_compile() {
+    for lib in fftw fftwl fftwf; do
+        cd ${WORKDIR}/build-$lib
+        autotools_do_compile
+    done
+}
+
+do_install() {
+    for lib in fftw fftwl fftwf; do
+        cd ${WORKDIR}/build-$lib
+        autotools_do_install
+    done
+}
+
+
+PACKAGES =+ "libfftw libfftwl libfftwf"
+FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*"
+FILES_libfftwl = "${libdir}/libfftw3l.so.* ${libdir}/libfftw3l_*.so.*"
+FILES_libfftwf = "${libdir}/libfftw3f.so.* ${libdir}/libfftw3f_*.so.*"
+
+PACKAGES =+ "fftw-wisdom fftwl-wisdom fftwf-wisdom fftw-wisdom-to-conf"
+FILES_fftw-wisdom = "${bindir}/fftw-wisdom"
+FILES_fftwl-wisdom = "${bindir}/fftwl-wisdom"
+FILES_fftwf-wisdom = "${bindir}/fftwf-wisdom"
+FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf"
+
+FILES_${PN}-dev += "${libdir}/cmake"
+RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/flite/flite-alsa-1.3/flite-1.3-alsa_support-1.2.diff b/import-layers/meta-openembedded/meta-oe/recipes-support/flite/flite-alsa-1.3/flite-1.3-alsa_support-1.2.diff
deleted file mode 100644
index b3e4b7a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/flite/flite-alsa-1.3/flite-1.3-alsa_support-1.2.diff
+++ /dev/null
@@ -1,6615 +0,0 @@
-Index: lang/usenglish/Makefile
-===================================================================
---- flite-1.3-release/lang/usenglish/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/lang/usenglish/Makefile	(.../release-1.2)	(revision 7)
-@@ -38,6 +38,7 @@
- DIRNAME=lang/usenglish
- BUILD_DIRS = 
- ALL_DIRS= 
-+include $(TOP)/config/config
- H = usenglish.h us_int_accent_cart.h us_int_tone_cart.h us_durz_cart.h \
-     us_ffeatures.h us_phrasing_cart.h us_text.h us_f0.h us_nums_cart.h
- SRCS = us_int_accent_cart.c us_int_tone_cart.c us_f0_model.c \
-@@ -45,7 +46,11 @@
-        us_phoneset.c us_ffeatures.c us_phrasing_cart.c \
-        us_gpos.c us_text.c us_expand.c us_postlex.c \
-        us_nums_cart.c us_aswd.c usenglish.c 
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- SCM=
- FILES = Makefile $(SCM) $(SRCS) $(H)
- LIBNAME = flite_usenglish
-Index: lang/cmu_us_kal/Makefile
-===================================================================
---- flite-1.3-release/lang/cmu_us_kal/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/lang/cmu_us_kal/Makefile	(.../release-1.2)	(revision 7)
-@@ -43,7 +43,12 @@
-        cmu_us_kal_lpc.c \
-        cmu_us_kal_res.c \
-        cmu_us_kal_residx.c
--OBJS = $(SRCS:.c=.o)
-+include $(TOP)/config/config
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- SCM=
- FILES = Makefile $(SCM) $(SRCS) $(H)
- LIBNAME = flite_cmu_us_kal
-Index: lang/cmu_us_kal16/Makefile
-===================================================================
---- flite-1.3-release/lang/cmu_us_kal16/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/lang/cmu_us_kal16/Makefile	(.../release-1.2)	(revision 7)
-@@ -44,7 +44,12 @@
-        cmu_us_kal16_lpc.c \
-        cmu_us_kal16_res.c \
-        cmu_us_kal16_residx.c
--OBJS = $(SRCS:.c=.o)
-+include $(TOP)/config/config
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- SCM=
- FILES = Makefile $(SCM) $(SRCS) $(H)
- LIBNAME = flite_cmu_us_kal16
-Index: lang/cmu_time_awb/Makefile
-===================================================================
---- flite-1.3-release/lang/cmu_time_awb/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/lang/cmu_time_awb/Makefile	(.../release-1.2)	(revision 7)
-@@ -45,7 +45,12 @@
- 	cmu_time_awb_mcep.c \
- 	cmu_time_awb_lpc.c \
- 	cmu_time_awb_lex_entry.c
--OBJS = $(SRCS:.c=.o)
-+include $(TOP)/config/config
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- SCM=
- FILES = Makefile $(SCM) $(SRCS) $(H)
- LIBNAME = flite_cmu_time_awb
-Index: lang/cmulex/Makefile
-===================================================================
---- flite-1.3-release/lang/cmulex/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/lang/cmulex/Makefile	(.../release-1.2)	(revision 7)
-@@ -38,13 +38,20 @@
- DIRNAME=lang/cmulex
- BUILD_DIRS = 
- ALL_DIRS= 
-+
- H = cmu_lts_model.h cmulex.h
- SRCS = cmu_lts_rules.c cmu_lts_model.c \
-        cmu_lex.c cmu_lex_entries.c cmu_lex_data.c
- LEX_DATA_INCLUDES = cmu_lex_data_raw.c cmu_lex_num_bytes.c \
-      cmu_lex_phones_huff_table.c cmu_lex_entries_huff_table.c
- 
--OBJS = $(SRCS:.c=.o)
-+include $(TOP)/config/config
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
-+
- SCRIPTS=make_cmulex  
- 
- SCM=
-Index: configure
-===================================================================
---- flite-1.3-release/configure	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/configure	(.../release-1.2)	(revision 7)
-@@ -1,324 +1,38 @@
- #! /bin/sh
-+
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.57.
-+# Generated automatically using autoconf version 2.13 
-+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
- #
--# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
--# Free Software Foundation, Inc.
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
--## --------------------- ##
--## M4sh Initialization.  ##
--## --------------------- ##
- 
--# Be Bourne compatible
--if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
--  emulate sh
--  NULLCMD=:
--  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
--  # is contrary to our usage.  Disable this feature.
--  alias -g '${1+"$@"}'='"$@"'
--elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
--  set -o posix
--fi
--
--# Support unset when possible.
--if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
--  as_unset=unset
--else
--  as_unset=false
--fi
--
--
--# Work around bugs in pre-3.0 UWIN ksh.
--$as_unset ENV MAIL MAILPATH
--PS1='$ '
--PS2='> '
--PS4='+ '
--
--# NLS nuisances.
--for as_var in \
--  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
--  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
--  LC_TELEPHONE LC_TIME
--do
--  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
--    eval $as_var=C; export $as_var
--  else
--    $as_unset $as_var
--  fi
--done
--
--# Required to use basename.
--if expr a : '\(a\)' >/dev/null 2>&1; then
--  as_expr=expr
--else
--  as_expr=false
--fi
--
--if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
--  as_basename=basename
--else
--  as_basename=false
--fi
--
--
--# Name of the executable.
--as_me=`$as_basename "$0" ||
--$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
--	 X"$0" : 'X\(//\)$' \| \
--	 X"$0" : 'X\(/\)$' \| \
--	 .     : '\(.\)' 2>/dev/null ||
--echo X/"$0" |
--    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
--  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
--  	  /^X\/\(\/\).*/{ s//\1/; q; }
--  	  s/.*/./; q'`
--
--
--# PATH needs CR, and LINENO needs CR and PATH.
--# Avoid depending upon Character Ranges.
--as_cr_letters='abcdefghijklmnopqrstuvwxyz'
--as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
--as_cr_Letters=$as_cr_letters$as_cr_LETTERS
--as_cr_digits='0123456789'
--as_cr_alnum=$as_cr_Letters$as_cr_digits
--
--# The user is always right.
--if test "${PATH_SEPARATOR+set}" != set; then
--  echo "#! /bin/sh" >conf$$.sh
--  echo  "exit 0"   >>conf$$.sh
--  chmod +x conf$$.sh
--  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
--    PATH_SEPARATOR=';'
--  else
--    PATH_SEPARATOR=:
--  fi
--  rm -f conf$$.sh
--fi
--
--
--  as_lineno_1=$LINENO
--  as_lineno_2=$LINENO
--  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
--  test "x$as_lineno_1" != "x$as_lineno_2" &&
--  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
--  # Find who we are.  Look in the path if we contain no path at all
--  # relative or not.
--  case $0 in
--    *[\\/]* ) as_myself=$0 ;;
--    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
--done
--
--       ;;
--  esac
--  # We did not find ourselves, most probably we were run as `sh COMMAND'
--  # in which case we are not to be found in the path.
--  if test "x$as_myself" = x; then
--    as_myself=$0
--  fi
--  if test ! -f "$as_myself"; then
--    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
--   { (exit 1); exit 1; }; }
--  fi
--  case $CONFIG_SHELL in
--  '')
--    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for as_base in sh bash ksh sh5; do
--	 case $as_dir in
--	 /*)
--	   if ("$as_dir/$as_base" -c '
--  as_lineno_1=$LINENO
--  as_lineno_2=$LINENO
--  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
--  test "x$as_lineno_1" != "x$as_lineno_2" &&
--  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
--	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
--	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
--	     CONFIG_SHELL=$as_dir/$as_base
--	     export CONFIG_SHELL
--	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
--	   fi;;
--	 esac
--       done
--done
--;;
--  esac
--
--  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
--  # uniformly replaced by the line number.  The first 'sed' inserts a
--  # line-number line before each line; the second 'sed' does the real
--  # work.  The second script uses 'N' to pair each line-number line
--  # with the numbered line, and appends trailing '-' during
--  # substitution so that $LINENO is not a special case at line end.
--  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
--  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
--  sed '=' <$as_myself |
--    sed '
--      N
--      s,$,-,
--      : loop
--      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
--      t loop
--      s,-$,,
--      s,^['$as_cr_digits']*\n,,
--    ' >$as_me.lineno &&
--  chmod +x $as_me.lineno ||
--    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
--   { (exit 1); exit 1; }; }
--
--  # Don't try to exec as it changes $[0], causing all sort of problems
--  # (the dirname of $[0] is not the place where we might find the
--  # original and so on.  Autoconf is especially sensible to this).
--  . ./$as_me.lineno
--  # Exit status is that of the last command.
--  exit
--}
--
--
--case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
--  *c*,-n*) ECHO_N= ECHO_C='
--' ECHO_T='	' ;;
--  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
--  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
--esac
--
--if expr a : '\(a\)' >/dev/null 2>&1; then
--  as_expr=expr
--else
--  as_expr=false
--fi
--
--rm -f conf$$ conf$$.exe conf$$.file
--echo >conf$$.file
--if ln -s conf$$.file conf$$ 2>/dev/null; then
--  # We could just check for DJGPP; but this test a) works b) is more generic
--  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
--  if test -f conf$$.exe; then
--    # Don't use ln at all; we don't have any links
--    as_ln_s='cp -p'
--  else
--    as_ln_s='ln -s'
--  fi
--elif ln conf$$.file conf$$ 2>/dev/null; then
--  as_ln_s=ln
--else
--  as_ln_s='cp -p'
--fi
--rm -f conf$$ conf$$.exe conf$$.file
--
--if mkdir -p . 2>/dev/null; then
--  as_mkdir_p=:
--else
--  as_mkdir_p=false
--fi
--
--as_executable_p="test -f"
--
--# Sed expression to map a string onto a valid CPP name.
--as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
--
--# Sed expression to map a string onto a valid variable name.
--as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
--
--
--# IFS
--# We need space, tab and new line, in precisely that order.
--as_nl='
--'
--IFS=" 	$as_nl"
--
--# CDPATH.
--$as_unset CDPATH
--
--
--# Name of the host.
--# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
--# so uname gets run too.
--ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
--
--exec 6>&1
--
--#
--# Initializations.
--#
-+# Defaults:
-+ac_help=
- ac_default_prefix=/usr/local
--ac_config_libobj_dir=.
--cross_compiling=no
--subdirs=
--MFLAGS=
--MAKEFLAGS=
--SHELL=${CONFIG_SHELL-/bin/sh}
-+# Any additions from configure.in:
-+ac_help="$ac_help
-+  --disable-shared     without shared library support"
-+ac_help="$ac_help
-+  --disable-sockets     without socket support"
-+ac_help="$ac_help
-+  --with-audio          with specific audio support (none linux freebsd etc) "
-+ac_help="$ac_help
-+  --with-lang           with language "
-+ac_help="$ac_help
-+  --with-vox            with vox "
-+ac_help="$ac_help
-+  --with-lex            with lexicon "
- 
--# Maximum number of lines to put in a shell here document.
--# This variable seems obsolete.  It should probably be removed, and
--# only ac_max_sed_lines should be used.
--: ${ac_max_here_lines=38}
--
--# Identity of this package.
--PACKAGE_NAME=
--PACKAGE_TARNAME=
--PACKAGE_VERSION=
--PACKAGE_STRING=
--PACKAGE_BUGREPORT=
--
--ac_unique_file="include/flite.h"
--# Factoring default headers for most tests.
--ac_includes_default="\
--#include <stdio.h>
--#if HAVE_SYS_TYPES_H
--# include <sys/types.h>
--#endif
--#if HAVE_SYS_STAT_H
--# include <sys/stat.h>
--#endif
--#if STDC_HEADERS
--# include <stdlib.h>
--# include <stddef.h>
--#else
--# if HAVE_STDLIB_H
--#  include <stdlib.h>
--# endif
--#endif
--#if HAVE_STRING_H
--# if !STDC_HEADERS && HAVE_MEMORY_H
--#  include <memory.h>
--# endif
--# include <string.h>
--#endif
--#if HAVE_STRINGS_H
--# include <strings.h>
--#endif
--#if HAVE_INTTYPES_H
--# include <inttypes.h>
--#else
--# if HAVE_STDINT_H
--#  include <stdint.h>
--# endif
--#endif
--#if HAVE_UNISTD_H
--# include <unistd.h>
--#endif"
--
--ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR ac_ct_AR TARGET_OS TARGET_CPU M68KCC LEXDEFS VOXDEFS HOST_OS HOST_CPU OTHERLIBS SHFLAGS MMAPTYPE STDIOTYPE CPP EGREP AUDIODRIVER AUDIODEFS AUDIOLIBS FL_LANG FL_VOX FL_LEX LIBOBJS LTLIBOBJS'
--ac_subst_files=''
--
- # Initialize some variables set by options.
--ac_init_help=
--ac_init_version=false
- # The variables have the same names as the options, with
- # dashes changed to underlines.
--cache_file=/dev/null
-+build=NONE
-+cache_file=./config.cache
- exec_prefix=NONE
-+host=NONE
- no_create=
-+nonopt=NONE
- no_recursion=
- prefix=NONE
- program_prefix=NONE
-@@ -327,15 +41,10 @@
- silent=
- site=
- srcdir=
-+target=NONE
- verbose=
- x_includes=NONE
- x_libraries=NONE
--
--# Installation directory options.
--# These are left unexpanded so users can "make install exec_prefix=/foo"
--# and all the variables that are supposed to be based on exec_prefix
--# by default will actually change.
--# Use braces instead of parens because sh, perl, etc. also accept them.
- bindir='${exec_prefix}/bin'
- sbindir='${exec_prefix}/sbin'
- libexecdir='${exec_prefix}/libexec'
-@@ -349,9 +58,17 @@
- infodir='${prefix}/info'
- mandir='${prefix}/man'
- 
-+# Initialize some other variables.
-+subdirs=
-+MFLAGS= MAKEFLAGS=
-+SHELL=${CONFIG_SHELL-/bin/sh}
-+# Maximum number of lines to put in a shell here document.
-+ac_max_here_lines=12
-+
- ac_prev=
- for ac_option
- do
-+
-   # If the previous option needs an argument, assign it.
-   if test -n "$ac_prev"; then
-     eval "$ac_prev=\$ac_option"
-@@ -359,59 +76,59 @@
-     continue
-   fi
- 
--  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-+  case "$ac_option" in
-+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-+  *) ac_optarg= ;;
-+  esac
- 
-   # Accept the important Cygnus configure options, so we can diagnose typos.
- 
--  case $ac_option in
-+  case "$ac_option" in
- 
-   -bindir | --bindir | --bindi | --bind | --bin | --bi)
-     ac_prev=bindir ;;
-   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
--    bindir=$ac_optarg ;;
-+    bindir="$ac_optarg" ;;
- 
-   -build | --build | --buil | --bui | --bu)
--    ac_prev=build_alias ;;
-+    ac_prev=build ;;
-   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
--    build_alias=$ac_optarg ;;
-+    build="$ac_optarg" ;;
- 
-   -cache-file | --cache-file | --cache-fil | --cache-fi \
-   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-     ac_prev=cache_file ;;
-   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
--    cache_file=$ac_optarg ;;
-+    cache_file="$ac_optarg" ;;
- 
--  --config-cache | -C)
--    cache_file=config.cache ;;
--
-   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-     ac_prev=datadir ;;
-   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-   | --da=*)
--    datadir=$ac_optarg ;;
-+    datadir="$ac_optarg" ;;
- 
-   -disable-* | --disable-*)
--    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-     # Reject names that are not valid shell variable names.
--    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
--      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
--   { (exit 1); exit 1; }; }
--    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
--    eval "enable_$ac_feature=no" ;;
-+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-+    fi
-+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-+    eval "enable_${ac_feature}=no" ;;
- 
-   -enable-* | --enable-*)
--    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-     # Reject names that are not valid shell variable names.
--    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
--      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
--   { (exit 1); exit 1; }; }
--    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
--    case $ac_option in
--      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-+    fi
-+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-+    case "$ac_option" in
-+      *=*) ;;
-       *) ac_optarg=yes ;;
-     esac
--    eval "enable_$ac_feature='$ac_optarg'" ;;
-+    eval "enable_${ac_feature}='$ac_optarg'" ;;
- 
-   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-@@ -420,47 +137,95 @@
-   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-   | --exec=* | --exe=* | --ex=*)
--    exec_prefix=$ac_optarg ;;
-+    exec_prefix="$ac_optarg" ;;
- 
-   -gas | --gas | --ga | --g)
-     # Obsolete; use --with-gas.
-     with_gas=yes ;;
- 
--  -help | --help | --hel | --he | -h)
--    ac_init_help=long ;;
--  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
--    ac_init_help=recursive ;;
--  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
--    ac_init_help=short ;;
-+  -help | --help | --hel | --he)
-+    # Omit some internal or obsolete options to make the list less imposing.
-+    # This message is too long to be a string in the A/UX 3.1 sh.
-+    cat << EOF
-+Usage: configure [options] [host]
-+Options: [defaults in brackets after descriptions]
-+Configuration:
-+  --cache-file=FILE       cache test results in FILE
-+  --help                  print this message
-+  --no-create             do not create output files
-+  --quiet, --silent       do not print \`checking...' messages
-+  --version               print the version of autoconf that created configure
-+Directory and file names:
-+  --prefix=PREFIX         install architecture-independent files in PREFIX
-+                          [$ac_default_prefix]
-+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-+                          [same as prefix]
-+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-+  --datadir=DIR           read-only architecture-independent data in DIR
-+                          [PREFIX/share]
-+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-+                          [PREFIX/com]
-+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-+  --includedir=DIR        C header files in DIR [PREFIX/include]
-+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-+  --infodir=DIR           info documentation in DIR [PREFIX/info]
-+  --mandir=DIR            man documentation in DIR [PREFIX/man]
-+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-+  --program-prefix=PREFIX prepend PREFIX to installed program names
-+  --program-suffix=SUFFIX append SUFFIX to installed program names
-+  --program-transform-name=PROGRAM
-+                          run sed PROGRAM on installed program names
-+EOF
-+    cat << EOF
-+Host type:
-+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-+  --host=HOST             configure for HOST [guessed]
-+  --target=TARGET         configure for TARGET [TARGET=HOST]
-+Features and packages:
-+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-+  --x-includes=DIR        X include files are in DIR
-+  --x-libraries=DIR       X library files are in DIR
-+EOF
-+    if test -n "$ac_help"; then
-+      echo "--enable and --with options recognized:$ac_help"
-+    fi
-+    exit 0 ;;
- 
-   -host | --host | --hos | --ho)
--    ac_prev=host_alias ;;
-+    ac_prev=host ;;
-   -host=* | --host=* | --hos=* | --ho=*)
--    host_alias=$ac_optarg ;;
-+    host="$ac_optarg" ;;
- 
-   -includedir | --includedir | --includedi | --included | --include \
-   | --includ | --inclu | --incl | --inc)
-     ac_prev=includedir ;;
-   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-   | --includ=* | --inclu=* | --incl=* | --inc=*)
--    includedir=$ac_optarg ;;
-+    includedir="$ac_optarg" ;;
- 
-   -infodir | --infodir | --infodi | --infod | --info | --inf)
-     ac_prev=infodir ;;
-   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
--    infodir=$ac_optarg ;;
-+    infodir="$ac_optarg" ;;
- 
-   -libdir | --libdir | --libdi | --libd)
-     ac_prev=libdir ;;
-   -libdir=* | --libdir=* | --libdi=* | --libd=*)
--    libdir=$ac_optarg ;;
-+    libdir="$ac_optarg" ;;
- 
-   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-   | --libexe | --libex | --libe)
-     ac_prev=libexecdir ;;
-   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-   | --libexe=* | --libex=* | --libe=*)
--    libexecdir=$ac_optarg ;;
-+    libexecdir="$ac_optarg" ;;
- 
-   -localstatedir | --localstatedir | --localstatedi | --localstated \
-   | --localstate | --localstat | --localsta | --localst \
-@@ -469,19 +234,19 @@
-   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
--    localstatedir=$ac_optarg ;;
-+    localstatedir="$ac_optarg" ;;
- 
-   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-     ac_prev=mandir ;;
-   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
--    mandir=$ac_optarg ;;
-+    mandir="$ac_optarg" ;;
- 
-   -nfp | --nfp | --nf)
-     # Obsolete; use --without-fp.
-     with_fp=no ;;
- 
-   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
--  | --no-cr | --no-c | -n)
-+  | --no-cr | --no-c)
-     no_create=yes ;;
- 
-   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-@@ -495,26 +260,26 @@
-   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
--    oldincludedir=$ac_optarg ;;
-+    oldincludedir="$ac_optarg" ;;
- 
-   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-     ac_prev=prefix ;;
-   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
--    prefix=$ac_optarg ;;
-+    prefix="$ac_optarg" ;;
- 
-   -program-prefix | --program-prefix | --program-prefi | --program-pref \
-   | --program-pre | --program-pr | --program-p)
-     ac_prev=program_prefix ;;
-   -program-prefix=* | --program-prefix=* | --program-prefi=* \
-   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
--    program_prefix=$ac_optarg ;;
-+    program_prefix="$ac_optarg" ;;
- 
-   -program-suffix | --program-suffix | --program-suffi | --program-suff \
-   | --program-suf | --program-su | --program-s)
-     ac_prev=program_suffix ;;
-   -program-suffix=* | --program-suffix=* | --program-suffi=* \
-   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
--    program_suffix=$ac_optarg ;;
-+    program_suffix="$ac_optarg" ;;
- 
-   -program-transform-name | --program-transform-name \
-   | --program-transform-nam | --program-transform-na \
-@@ -531,7 +296,7 @@
-   | --program-transfo=* | --program-transf=* \
-   | --program-trans=* | --program-tran=* \
-   | --progr-tra=* | --program-tr=* | --program-t=*)
--    program_transform_name=$ac_optarg ;;
-+    program_transform_name="$ac_optarg" ;;
- 
-   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-   | -silent | --silent | --silen | --sile | --sil)
-@@ -541,7 +306,7 @@
-     ac_prev=sbindir ;;
-   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-   | --sbi=* | --sb=*)
--    sbindir=$ac_optarg ;;
-+    sbindir="$ac_optarg" ;;
- 
-   -sharedstatedir | --sharedstatedir | --sharedstatedi \
-   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-@@ -552,57 +317,58 @@
-   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-   | --sha=* | --sh=*)
--    sharedstatedir=$ac_optarg ;;
-+    sharedstatedir="$ac_optarg" ;;
- 
-   -site | --site | --sit)
-     ac_prev=site ;;
-   -site=* | --site=* | --sit=*)
--    site=$ac_optarg ;;
-+    site="$ac_optarg" ;;
- 
-   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-     ac_prev=srcdir ;;
-   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
--    srcdir=$ac_optarg ;;
-+    srcdir="$ac_optarg" ;;
- 
-   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-   | --syscon | --sysco | --sysc | --sys | --sy)
-     ac_prev=sysconfdir ;;
-   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
--    sysconfdir=$ac_optarg ;;
-+    sysconfdir="$ac_optarg" ;;
- 
-   -target | --target | --targe | --targ | --tar | --ta | --t)
--    ac_prev=target_alias ;;
-+    ac_prev=target ;;
-   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
--    target_alias=$ac_optarg ;;
-+    target="$ac_optarg" ;;
- 
-   -v | -verbose | --verbose | --verbos | --verbo | --verb)
-     verbose=yes ;;
- 
--  -version | --version | --versio | --versi | --vers | -V)
--    ac_init_version=: ;;
-+  -version | --version | --versio | --versi | --vers)
-+    echo "configure generated by autoconf version 2.13"
-+    exit 0 ;;
- 
-   -with-* | --with-*)
--    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-     # Reject names that are not valid shell variable names.
--    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
--      { echo "$as_me: error: invalid package name: $ac_package" >&2
--   { (exit 1); exit 1; }; }
-+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-+    fi
-     ac_package=`echo $ac_package| sed 's/-/_/g'`
--    case $ac_option in
--      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-+    case "$ac_option" in
-+      *=*) ;;
-       *) ac_optarg=yes ;;
-     esac
--    eval "with_$ac_package='$ac_optarg'" ;;
-+    eval "with_${ac_package}='$ac_optarg'" ;;
- 
-   -without-* | --without-*)
--    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-     # Reject names that are not valid shell variable names.
--    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
--      { echo "$as_me: error: invalid package name: $ac_package" >&2
--   { (exit 1); exit 1; }; }
--    ac_package=`echo $ac_package | sed 's/-/_/g'`
--    eval "with_$ac_package=no" ;;
-+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-+    fi
-+    ac_package=`echo $ac_package| sed 's/-/_/g'`
-+    eval "with_${ac_package}=no" ;;
- 
-   --x)
-     # Obsolete; use --with-x.
-@@ -613,110 +379,99 @@
-     ac_prev=x_includes ;;
-   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
--    x_includes=$ac_optarg ;;
-+    x_includes="$ac_optarg" ;;
- 
-   -x-libraries | --x-libraries | --x-librarie | --x-librari \
-   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-     ac_prev=x_libraries ;;
-   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
--    x_libraries=$ac_optarg ;;
-+    x_libraries="$ac_optarg" ;;
- 
--  -*) { echo "$as_me: error: unrecognized option: $ac_option
--Try \`$0 --help' for more information." >&2
--   { (exit 1); exit 1; }; }
-+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-     ;;
- 
--  *=*)
--    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
--    # Reject names that are not valid shell variable names.
--    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
--      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
--   { (exit 1); exit 1; }; }
--    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
--    eval "$ac_envvar='$ac_optarg'"
--    export $ac_envvar ;;
--
-   *)
--    # FIXME: should be removed in autoconf 3.0.
--    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
--    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
--      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
--    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-+      echo "configure: warning: $ac_option: invalid host type" 1>&2
-+    fi
-+    if test "x$nonopt" != xNONE; then
-+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-+    fi
-+    nonopt="$ac_option"
-     ;;
- 
-   esac
- done
- 
- if test -n "$ac_prev"; then
--  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
--  { echo "$as_me: error: missing argument to $ac_option" >&2
--   { (exit 1); exit 1; }; }
-+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
- fi
- 
--# Be sure to have absolute paths.
--for ac_var in exec_prefix prefix
--do
--  eval ac_val=$`echo $ac_var`
--  case $ac_val in
--    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
--    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
--   { (exit 1); exit 1; }; };;
--  esac
--done
-+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- 
--# Be sure to have absolute paths.
--for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
--              localstatedir libdir includedir oldincludedir infodir mandir
-+# File descriptor usage:
-+# 0 standard input
-+# 1 file creation
-+# 2 errors and warnings
-+# 3 some systems may open it to /dev/tty
-+# 4 used on the Kubota Titan
-+# 6 checking for... messages and results
-+# 5 compiler messages saved in config.log
-+if test "$silent" = yes; then
-+  exec 6>/dev/null
-+else
-+  exec 6>&1
-+fi
-+exec 5>./config.log
-+
-+echo "\
-+This file contains any messages produced by compilers while
-+running configure, to aid debugging if configure makes a mistake.
-+" 1>&5
-+
-+# Strip out --no-create and --no-recursion so they do not pile up.
-+# Also quote any args containing shell metacharacters.
-+ac_configure_args=
-+for ac_arg
- do
--  eval ac_val=$`echo $ac_var`
--  case $ac_val in
--    [\\/$]* | ?:[\\/]* ) ;;
--    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
--   { (exit 1); exit 1; }; };;
-+  case "$ac_arg" in
-+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-+  | --no-cr | --no-c) ;;
-+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-   esac
- done
- 
--# There might be people who depend on the old broken behavior: `$host'
--# used to hold the argument of --host etc.
--# FIXME: To remove some day.
--build=$build_alias
--host=$host_alias
--target=$target_alias
-+# NLS nuisances.
-+# Only set these to C if already set.  These must not be set unconditionally
-+# because not all systems understand e.g. LANG=C (notably SCO).
-+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-+# Non-C LC_CTYPE values break the ctype check.
-+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
- 
--# FIXME: To remove some day.
--if test "x$host_alias" != x; then
--  if test "x$build_alias" = x; then
--    cross_compiling=maybe
--    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
--    If a cross compiler is detected then cross compile mode will be used." >&2
--  elif test "x$build_alias" != "x$host_alias"; then
--    cross_compiling=yes
--  fi
--fi
-+# confdefs.h avoids OS command line length limits that DEFS can exceed.
-+rm -rf conftest* confdefs.h
-+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-+echo > confdefs.h
- 
--ac_tool_prefix=
--test -n "$host_alias" && ac_tool_prefix=$host_alias-
-+# A filename unique to this package, relative to the directory that
-+# configure is in, which we can look for to find out if srcdir is correct.
-+ac_unique_file=include/flite.h
- 
--test "$silent" = yes && exec 6>/dev/null
--
--
- # Find the source files, if location was not specified.
- if test -z "$srcdir"; then
-   ac_srcdir_defaulted=yes
-   # Try the directory containing this script, then its parent.
--  ac_confdir=`(dirname "$0") 2>/dev/null ||
--$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
--         X"$0" : 'X\(//\)[^/]' \| \
--         X"$0" : 'X\(//\)$' \| \
--         X"$0" : 'X\(/\)' \| \
--         .     : '\(.\)' 2>/dev/null ||
--echo X"$0" |
--    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
--  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
--  	  /^X\(\/\/\)$/{ s//\1/; q; }
--  	  /^X\(\/\).*/{ s//\1/; q; }
--  	  s/.*/./; q'`
-+  ac_prog=$0
-+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-   srcdir=$ac_confdir
-   if test ! -r $srcdir/$ac_unique_file; then
-     srcdir=..
-@@ -726,441 +481,13 @@
- fi
- if test ! -r $srcdir/$ac_unique_file; then
-   if test "$ac_srcdir_defaulted" = yes; then
--    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
--   { (exit 1); exit 1; }; }
-+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-   else
--    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
--   { (exit 1); exit 1; }; }
-+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-   fi
- fi
--(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
--  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
--   { (exit 1); exit 1; }; }
--srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
--ac_env_build_alias_set=${build_alias+set}
--ac_env_build_alias_value=$build_alias
--ac_cv_env_build_alias_set=${build_alias+set}
--ac_cv_env_build_alias_value=$build_alias
--ac_env_host_alias_set=${host_alias+set}
--ac_env_host_alias_value=$host_alias
--ac_cv_env_host_alias_set=${host_alias+set}
--ac_cv_env_host_alias_value=$host_alias
--ac_env_target_alias_set=${target_alias+set}
--ac_env_target_alias_value=$target_alias
--ac_cv_env_target_alias_set=${target_alias+set}
--ac_cv_env_target_alias_value=$target_alias
--ac_env_CC_set=${CC+set}
--ac_env_CC_value=$CC
--ac_cv_env_CC_set=${CC+set}
--ac_cv_env_CC_value=$CC
--ac_env_CFLAGS_set=${CFLAGS+set}
--ac_env_CFLAGS_value=$CFLAGS
--ac_cv_env_CFLAGS_set=${CFLAGS+set}
--ac_cv_env_CFLAGS_value=$CFLAGS
--ac_env_LDFLAGS_set=${LDFLAGS+set}
--ac_env_LDFLAGS_value=$LDFLAGS
--ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
--ac_cv_env_LDFLAGS_value=$LDFLAGS
--ac_env_CPPFLAGS_set=${CPPFLAGS+set}
--ac_env_CPPFLAGS_value=$CPPFLAGS
--ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
--ac_cv_env_CPPFLAGS_value=$CPPFLAGS
--ac_env_CPP_set=${CPP+set}
--ac_env_CPP_value=$CPP
--ac_cv_env_CPP_set=${CPP+set}
--ac_cv_env_CPP_value=$CPP
-+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
- 
--#
--# Report the --help message.
--#
--if test "$ac_init_help" = "long"; then
--  # Omit some internal or obsolete options to make the list less imposing.
--  # This message is too long to be a string in the A/UX 3.1 sh.
--  cat <<_ACEOF
--\`configure' configures this package to adapt to many kinds of systems.
--
--Usage: $0 [OPTION]... [VAR=VALUE]...
--
--To assign environment variables (e.g., CC, CFLAGS...), specify them as
--VAR=VALUE.  See below for descriptions of some of the useful variables.
--
--Defaults for the options are specified in brackets.
--
--Configuration:
--  -h, --help              display this help and exit
--      --help=short        display options specific to this package
--      --help=recursive    display the short help of all the included packages
--  -V, --version           display version information and exit
--  -q, --quiet, --silent   do not print \`checking...' messages
--      --cache-file=FILE   cache test results in FILE [disabled]
--  -C, --config-cache      alias for \`--cache-file=config.cache'
--  -n, --no-create         do not create output files
--      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
--
--_ACEOF
--
--  cat <<_ACEOF
--Installation directories:
--  --prefix=PREFIX         install architecture-independent files in PREFIX
--                          [$ac_default_prefix]
--  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
--                          [PREFIX]
--
--By default, \`make install' will install all the files in
--\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
--an installation prefix other than \`$ac_default_prefix' using \`--prefix',
--for instance \`--prefix=\$HOME'.
--
--For better control, use the options below.
--
--Fine tuning of the installation directories:
--  --bindir=DIR           user executables [EPREFIX/bin]
--  --sbindir=DIR          system admin executables [EPREFIX/sbin]
--  --libexecdir=DIR       program executables [EPREFIX/libexec]
--  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
--  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
--  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
--  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
--  --libdir=DIR           object code libraries [EPREFIX/lib]
--  --includedir=DIR       C header files [PREFIX/include]
--  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
--  --infodir=DIR          info documentation [PREFIX/info]
--  --mandir=DIR           man documentation [PREFIX/man]
--_ACEOF
--
--  cat <<\_ACEOF
--
--System types:
--  --build=BUILD     configure for building on BUILD [guessed]
--  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
--  --target=TARGET   configure for building compilers for TARGET [HOST]
--_ACEOF
--fi
--
--if test -n "$ac_init_help"; then
--
--  cat <<\_ACEOF
--
--Optional Features:
--  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
--  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
--  --disable-shared     without shared library support
--  --disable-sockets     without socket support
--
--Optional Packages:
--  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
--  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
--  --with-audio          with specific audio support (none linux freebsd etc)
--  --with-lang           with language
--  --with-vox            with vox
--  --with-lex            with lexicon
--
--Some influential environment variables:
--  CC          C compiler command
--  CFLAGS      C compiler flags
--  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
--              nonstandard directory <lib dir>
--  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
--              headers in a nonstandard directory <include dir>
--  CPP         C preprocessor
--
--Use these variables to override the choices made by `configure' or to help
--it to find libraries and programs with nonstandard names/locations.
--
--_ACEOF
--fi
--
--if test "$ac_init_help" = "recursive"; then
--  # If there are subdirs, report their specific --help.
--  ac_popdir=`pwd`
--  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
--    test -d $ac_dir || continue
--    ac_builddir=.
--
--if test "$ac_dir" != .; then
--  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
--  # A "../" for each directory in $ac_dir_suffix.
--  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
--else
--  ac_dir_suffix= ac_top_builddir=
--fi
--
--case $srcdir in
--  .)  # No --srcdir option.  We are building in place.
--    ac_srcdir=.
--    if test -z "$ac_top_builddir"; then
--       ac_top_srcdir=.
--    else
--       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
--    fi ;;
--  [\\/]* | ?:[\\/]* )  # Absolute path.
--    ac_srcdir=$srcdir$ac_dir_suffix;
--    ac_top_srcdir=$srcdir ;;
--  *) # Relative path.
--    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
--    ac_top_srcdir=$ac_top_builddir$srcdir ;;
--esac
--# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
--# absolute.
--ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
--ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
--ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
--ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
--
--    cd $ac_dir
--    # Check for guested configure; otherwise get Cygnus style configure.
--    if test -f $ac_srcdir/configure.gnu; then
--      echo
--      $SHELL $ac_srcdir/configure.gnu  --help=recursive
--    elif test -f $ac_srcdir/configure; then
--      echo
--      $SHELL $ac_srcdir/configure  --help=recursive
--    elif test -f $ac_srcdir/configure.ac ||
--           test -f $ac_srcdir/configure.in; then
--      echo
--      $ac_configure --help
--    else
--      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
--    fi
--    cd $ac_popdir
--  done
--fi
--
--test -n "$ac_init_help" && exit 0
--if $ac_init_version; then
--  cat <<\_ACEOF
--
--Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
--Free Software Foundation, Inc.
--This configure script is free software; the Free Software Foundation
--gives unlimited permission to copy, distribute and modify it.
--_ACEOF
--  exit 0
--fi
--exec 5>config.log
--cat >&5 <<_ACEOF
--This file contains any messages produced by compilers while
--running configure, to aid debugging if configure makes a mistake.
--
--It was created by $as_me, which was
--generated by GNU Autoconf 2.57.  Invocation command line was
--
--  $ $0 $@
--
--_ACEOF
--{
--cat <<_ASUNAME
--## --------- ##
--## Platform. ##
--## --------- ##
--
--hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
--uname -m = `(uname -m) 2>/dev/null || echo unknown`
--uname -r = `(uname -r) 2>/dev/null || echo unknown`
--uname -s = `(uname -s) 2>/dev/null || echo unknown`
--uname -v = `(uname -v) 2>/dev/null || echo unknown`
--
--/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
--/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
--
--/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
--/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
--/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
--hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
--/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
--/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
--/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
--
--_ASUNAME
--
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  echo "PATH: $as_dir"
--done
--
--} >&5
--
--cat >&5 <<_ACEOF
--
--
--## ----------- ##
--## Core tests. ##
--## ----------- ##
--
--_ACEOF
--
--
--# Keep a trace of the command line.
--# Strip out --no-create and --no-recursion so they do not pile up.
--# Strip out --silent because we don't want to record it for future runs.
--# Also quote any args containing shell meta-characters.
--# Make two passes to allow for proper duplicate-argument suppression.
--ac_configure_args=
--ac_configure_args0=
--ac_configure_args1=
--ac_sep=
--ac_must_keep_next=false
--for ac_pass in 1 2
--do
--  for ac_arg
--  do
--    case $ac_arg in
--    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
--    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
--    | -silent | --silent | --silen | --sile | --sil)
--      continue ;;
--    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
--      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
--    esac
--    case $ac_pass in
--    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
--    2)
--      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
--      if test $ac_must_keep_next = true; then
--        ac_must_keep_next=false # Got value, back to normal.
--      else
--        case $ac_arg in
--          *=* | --config-cache | -C | -disable-* | --disable-* \
--          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
--          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
--          | -with-* | --with-* | -without-* | --without-* | --x)
--            case "$ac_configure_args0 " in
--              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
--            esac
--            ;;
--          -* ) ac_must_keep_next=true ;;
--        esac
--      fi
--      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
--      # Get rid of the leading space.
--      ac_sep=" "
--      ;;
--    esac
--  done
--done
--$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
--$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
--
--# When interrupted or exit'd, cleanup temporary files, and complete
--# config.log.  We remove comments because anyway the quotes in there
--# would cause problems or look ugly.
--# WARNING: Be sure not to use single quotes in there, as some shells,
--# such as our DU 5.0 friend, will then `close' the trap.
--trap 'exit_status=$?
--  # Save into config.log some information that might help in debugging.
--  {
--    echo
--
--    cat <<\_ASBOX
--## ---------------- ##
--## Cache variables. ##
--## ---------------- ##
--_ASBOX
--    echo
--    # The following way of writing the cache mishandles newlines in values,
--{
--  (set) 2>&1 |
--    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
--    *ac_space=\ *)
--      sed -n \
--        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
--    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
--      ;;
--    *)
--      sed -n \
--        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
--      ;;
--    esac;
--}
--    echo
--
--    cat <<\_ASBOX
--## ----------------- ##
--## Output variables. ##
--## ----------------- ##
--_ASBOX
--    echo
--    for ac_var in $ac_subst_vars
--    do
--      eval ac_val=$`echo $ac_var`
--      echo "$ac_var='"'"'$ac_val'"'"'"
--    done | sort
--    echo
--
--    if test -n "$ac_subst_files"; then
--      cat <<\_ASBOX
--## ------------- ##
--## Output files. ##
--## ------------- ##
--_ASBOX
--      echo
--      for ac_var in $ac_subst_files
--      do
--	eval ac_val=$`echo $ac_var`
--        echo "$ac_var='"'"'$ac_val'"'"'"
--      done | sort
--      echo
--    fi
--
--    if test -s confdefs.h; then
--      cat <<\_ASBOX
--## ----------- ##
--## confdefs.h. ##
--## ----------- ##
--_ASBOX
--      echo
--      sed "/^$/d" confdefs.h | sort
--      echo
--    fi
--    test "$ac_signal" != 0 &&
--      echo "$as_me: caught signal $ac_signal"
--    echo "$as_me: exit $exit_status"
--  } >&5
--  rm -f core core.* *.core &&
--  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
--    exit $exit_status
--     ' 0
--for ac_signal in 1 2 13 15; do
--  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
--done
--ac_signal=0
--
--# confdefs.h avoids OS command line length limits that DEFS can exceed.
--rm -rf conftest* confdefs.h
--# AIX cpp loses on an empty file, so make sure it contains at least a newline.
--echo >confdefs.h
--
--# Predefined preprocessor variables.
--
--cat >>confdefs.h <<_ACEOF
--#define PACKAGE_NAME "$PACKAGE_NAME"
--_ACEOF
--
--
--cat >>confdefs.h <<_ACEOF
--#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
--_ACEOF
--
--
--cat >>confdefs.h <<_ACEOF
--#define PACKAGE_VERSION "$PACKAGE_VERSION"
--_ACEOF
--
--
--cat >>confdefs.h <<_ACEOF
--#define PACKAGE_STRING "$PACKAGE_STRING"
--_ACEOF
--
--
--cat >>confdefs.h <<_ACEOF
--#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
--_ACEOF
--
--
--# Let the site file select an alternate cache file if it wants to.
- # Prefer explicitly selected file to automatically selected ones.
- if test -z "$CONFIG_SITE"; then
-   if test "x$prefix" != xNONE; then
-@@ -1171,106 +498,42 @@
- fi
- for ac_site_file in $CONFIG_SITE; do
-   if test -r "$ac_site_file"; then
--    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
--echo "$as_me: loading site script $ac_site_file" >&6;}
--    sed 's/^/| /' "$ac_site_file" >&5
-+    echo "loading site script $ac_site_file"
-     . "$ac_site_file"
-   fi
- done
- 
- if test -r "$cache_file"; then
--  # Some versions of bash will fail to source /dev/null (special
--  # files actually), so we avoid doing that.
--  if test -f "$cache_file"; then
--    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
--echo "$as_me: loading cache $cache_file" >&6;}
--    case $cache_file in
--      [\\/]* | ?:[\\/]* ) . $cache_file;;
--      *)                      . ./$cache_file;;
--    esac
--  fi
-+  echo "loading cache $cache_file"
-+  . $cache_file
- else
--  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
--echo "$as_me: creating cache $cache_file" >&6;}
--  >$cache_file
-+  echo "creating cache $cache_file"
-+  > $cache_file
- fi
- 
--# Check that the precious variables saved in the cache have kept the same
--# value.
--ac_cache_corrupted=false
--for ac_var in `(set) 2>&1 |
--               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
--  eval ac_old_set=\$ac_cv_env_${ac_var}_set
--  eval ac_new_set=\$ac_env_${ac_var}_set
--  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
--  eval ac_new_val="\$ac_env_${ac_var}_value"
--  case $ac_old_set,$ac_new_set in
--    set,)
--      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
--echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
--      ac_cache_corrupted=: ;;
--    ,set)
--      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
--echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
--      ac_cache_corrupted=: ;;
--    ,);;
--    *)
--      if test "x$ac_old_val" != "x$ac_new_val"; then
--        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
--echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
--        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
--echo "$as_me:   former value:  $ac_old_val" >&2;}
--        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
--echo "$as_me:   current value: $ac_new_val" >&2;}
--        ac_cache_corrupted=:
--      fi;;
--  esac
--  # Pass precious variables to config.status.
--  if test "$ac_new_set" = set; then
--    case $ac_new_val in
--    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
--      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
--    *) ac_arg=$ac_var=$ac_new_val ;;
--    esac
--    case " $ac_configure_args " in
--      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
--      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
--    esac
--  fi
--done
--if $ac_cache_corrupted; then
--  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
--echo "$as_me: error: changes in the environment can compromise the build" >&2;}
--  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
--echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
--   { (exit 1); exit 1; }; }
--fi
--
- ac_ext=c
-+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
- ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-+cross_compiling=$ac_cv_prog_cc_cross
- 
-+ac_exeext=
-+ac_objext=o
-+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-+    ac_n= ac_c='
-+' ac_t='	'
-+  else
-+    ac_n=-n ac_c= ac_t=
-+  fi
-+else
-+  ac_n= ac_c='\c' ac_t=
-+fi
- 
- 
- 
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
- ac_aux_dir=
- for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-   if test -f $ac_dir/install-sh; then
-@@ -1281,740 +544,312 @@
-     ac_aux_dir=$ac_dir
-     ac_install_sh="$ac_aux_dir/install.sh -c"
-     break
--  elif test -f $ac_dir/shtool; then
--    ac_aux_dir=$ac_dir
--    ac_install_sh="$ac_aux_dir/shtool install -c"
--    break
-   fi
- done
- if test -z "$ac_aux_dir"; then
--  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
--echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
--   { (exit 1); exit 1; }; }
-+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
- fi
--ac_config_guess="$SHELL $ac_aux_dir/config.guess"
--ac_config_sub="$SHELL $ac_aux_dir/config.sub"
--ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-+ac_config_guess=$ac_aux_dir/config.guess
-+ac_config_sub=$ac_aux_dir/config.sub
-+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
- 
--# Make sure we can run config.sub.
--$ac_config_sub sun4 >/dev/null 2>&1 ||
--  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
--echo "$as_me: error: cannot run $ac_config_sub" >&2;}
--   { (exit 1); exit 1; }; }
- 
--echo "$as_me:$LINENO: checking build system type" >&5
--echo $ECHO_N "checking build system type... $ECHO_C" >&6
--if test "${ac_cv_build+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  ac_cv_build_alias=$build_alias
--test -z "$ac_cv_build_alias" &&
--  ac_cv_build_alias=`$ac_config_guess`
--test -z "$ac_cv_build_alias" &&
--  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
--echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
--   { (exit 1); exit 1; }; }
--ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
--  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
--echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
--   { (exit 1); exit 1; }; }
-+# Do some error checking and defaulting for the host and target type.
-+# The inputs are:
-+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-+#
-+# The rules are:
-+# 1. You are not allowed to specify --host, --target, and nonopt at the
-+#    same time.
-+# 2. Host defaults to nonopt.
-+# 3. If nonopt is not specified, then host defaults to the current host,
-+#    as determined by config.guess.
-+# 4. Target and build default to nonopt.
-+# 5. If nonopt is not specified, then target and build default to host.
- 
-+# The aliases save the names the user supplied, while $host etc.
-+# will get canonicalized.
-+case $host---$target---$nonopt in
-+NONE---*---* | *---NONE---* | *---*---NONE) ;;
-+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-+esac
-+
-+
-+# Make sure we can run config.sub.
-+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
- fi
--echo "$as_me:$LINENO: result: $ac_cv_build" >&5
--echo "${ECHO_T}$ac_cv_build" >&6
--build=$ac_cv_build
--build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
--build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
--build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- 
-+echo $ac_n "checking host system type""... $ac_c" 1>&6
-+echo "configure:585: checking host system type" >&5
- 
--echo "$as_me:$LINENO: checking host system type" >&5
--echo $ECHO_N "checking host system type... $ECHO_C" >&6
--if test "${ac_cv_host+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  ac_cv_host_alias=$host_alias
--test -z "$ac_cv_host_alias" &&
--  ac_cv_host_alias=$ac_cv_build_alias
--ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
--  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
--echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
--   { (exit 1); exit 1; }; }
-+host_alias=$host
-+case "$host_alias" in
-+NONE)
-+  case $nonopt in
-+  NONE)
-+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-+    fi ;;
-+  *) host_alias=$nonopt ;;
-+  esac ;;
-+esac
- 
--fi
--echo "$as_me:$LINENO: result: $ac_cv_host" >&5
--echo "${ECHO_T}$ac_cv_host" >&6
--host=$ac_cv_host
--host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
--host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
--host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-+echo "$ac_t""$host" 1>&6
- 
-+echo $ac_n "checking target system type""... $ac_c" 1>&6
-+echo "configure:606: checking target system type" >&5
- 
--echo "$as_me:$LINENO: checking target system type" >&5
--echo $ECHO_N "checking target system type... $ECHO_C" >&6
--if test "${ac_cv_target+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  ac_cv_target_alias=$target_alias
--test "x$ac_cv_target_alias" = "x" &&
--  ac_cv_target_alias=$ac_cv_host_alias
--ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
--  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
--echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
--   { (exit 1); exit 1; }; }
-+target_alias=$target
-+case "$target_alias" in
-+NONE)
-+  case $nonopt in
-+  NONE) target_alias=$host_alias ;;
-+  *) target_alias=$nonopt ;;
-+  esac ;;
-+esac
- 
--fi
--echo "$as_me:$LINENO: result: $ac_cv_target" >&5
--echo "${ECHO_T}$ac_cv_target" >&6
--target=$ac_cv_target
--target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
--target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
--target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-+echo "$ac_t""$target" 1>&6
- 
-+echo $ac_n "checking build system type""... $ac_c" 1>&6
-+echo "configure:624: checking build system type" >&5
- 
--# The aliases save the names the user supplied, while $host etc.
--# will get canonicalized.
--test -n "$target_alias" &&
-+build_alias=$build
-+case "$build_alias" in
-+NONE)
-+  case $nonopt in
-+  NONE) build_alias=$host_alias ;;
-+  *) build_alias=$nonopt ;;
-+  esac ;;
-+esac
-+
-+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-+echo "$ac_t""$build" 1>&6
-+
-+test "$host_alias" != "$target_alias" &&
-   test "$program_prefix$program_suffix$program_transform_name" = \
-     NONENONEs,x,x, &&
-   program_prefix=${target_alias}-
--ac_ext=c
--ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
--if test -n "$ac_tool_prefix"; then
--  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
--set dummy ${ac_tool_prefix}gcc; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_CC+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if test -n "$CC"; then
--  ac_cv_prog_CC="$CC" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_CC="${ac_tool_prefix}gcc"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
- 
--fi
--fi
--CC=$ac_cv_prog_CC
--if test -n "$CC"; then
--  echo "$as_me:$LINENO: result: $CC" >&5
--echo "${ECHO_T}$CC" >&6
--else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
--fi
--
--fi
--if test -z "$ac_cv_prog_CC"; then
--  ac_ct_CC=$CC
--  # Extract the first word of "gcc", so it can be a program name with args.
-+# Extract the first word of "gcc", so it can be a program name with args.
- set dummy gcc; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:649: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  if test -n "$ac_ct_CC"; then
--  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_ac_ct_CC="gcc"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
--fi
--fi
--ac_ct_CC=$ac_cv_prog_ac_ct_CC
--if test -n "$ac_ct_CC"; then
--  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
--echo "${ECHO_T}$ac_ct_CC" >&6
--else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
--fi
--
--  CC=$ac_ct_CC
--else
--  CC="$ac_cv_prog_CC"
--fi
--
--if test -z "$CC"; then
--  if test -n "$ac_tool_prefix"; then
--  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
--set dummy ${ac_tool_prefix}cc; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_CC+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-   if test -n "$CC"; then
-   ac_cv_prog_CC="$CC" # Let the user override the test.
- else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_CC="${ac_tool_prefix}cc"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      ac_cv_prog_CC="gcc"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
- fi
- fi
--CC=$ac_cv_prog_CC
-+CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
--  echo "$as_me:$LINENO: result: $CC" >&5
--echo "${ECHO_T}$CC" >&6
-+  echo "$ac_t""$CC" 1>&6
- else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
-+  echo "$ac_t""no" 1>&6
- fi
- 
--fi
--if test -z "$ac_cv_prog_CC"; then
--  ac_ct_CC=$CC
--  # Extract the first word of "cc", so it can be a program name with args.
--set dummy cc; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if test -n "$ac_ct_CC"; then
--  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_ac_ct_CC="cc"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
--fi
--fi
--ac_ct_CC=$ac_cv_prog_ac_ct_CC
--if test -n "$ac_ct_CC"; then
--  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
--echo "${ECHO_T}$ac_ct_CC" >&6
--else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
--fi
--
--  CC=$ac_ct_CC
--else
--  CC="$ac_cv_prog_CC"
--fi
--
--fi
- if test -z "$CC"; then
-   # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_CC+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:679: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test -n "$CC"; then
-   ac_cv_prog_CC="$CC" # Let the user override the test.
- else
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-   ac_prog_rejected=no
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
--       ac_prog_rejected=yes
--       continue
--     fi
--    ac_cv_prog_CC="cc"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-+        ac_prog_rejected=yes
-+	continue
-+      fi
-+      ac_cv_prog_CC="cc"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
- if test $ac_prog_rejected = yes; then
-   # We found a bogon in the path, so make sure we never use it.
-   set dummy $ac_cv_prog_CC
-   shift
--  if test $# != 0; then
-+  if test $# -gt 0; then
-     # We chose a different compiler from the bogus one.
-     # However, it has the same basename, so the bogon will be chosen
-     # first if we set CC to just the basename; use the full file name.
-     shift
--    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-+    set dummy "$ac_dir/$ac_word" "$@"
-+    shift
-+    ac_cv_prog_CC="$@"
-   fi
- fi
- fi
- fi
--CC=$ac_cv_prog_CC
-+CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
--  echo "$as_me:$LINENO: result: $CC" >&5
--echo "${ECHO_T}$CC" >&6
-+  echo "$ac_t""$CC" 1>&6
- else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
-+  echo "$ac_t""no" 1>&6
- fi
- 
--fi
--if test -z "$CC"; then
--  if test -n "$ac_tool_prefix"; then
--  for ac_prog in cl
--  do
--    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
--set dummy $ac_tool_prefix$ac_prog; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_CC+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+  if test -z "$CC"; then
-+    case "`uname -s`" in
-+    *win32* | *WIN32*)
-+      # Extract the first word of "cl", so it can be a program name with args.
-+set dummy cl; ac_word=$2
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:730: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test -n "$CC"; then
-   ac_cv_prog_CC="$CC" # Let the user override the test.
- else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      ac_cv_prog_CC="cl"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
- fi
- fi
--CC=$ac_cv_prog_CC
-+CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
--  echo "$as_me:$LINENO: result: $CC" >&5
--echo "${ECHO_T}$CC" >&6
-+  echo "$ac_t""$CC" 1>&6
- else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
-+  echo "$ac_t""no" 1>&6
- fi
--
--    test -n "$CC" && break
--  done
--fi
--if test -z "$CC"; then
--  ac_ct_CC=$CC
--  for ac_prog in cl
--do
--  # Extract the first word of "$ac_prog", so it can be a program name with args.
--set dummy $ac_prog; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if test -n "$ac_ct_CC"; then
--  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_ac_ct_CC="$ac_prog"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
-+ ;;
-+    esac
-   fi
--done
--done
--
-+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
- fi
--fi
--ac_ct_CC=$ac_cv_prog_ac_ct_CC
--if test -n "$ac_ct_CC"; then
--  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
--echo "${ECHO_T}$ac_ct_CC" >&6
--else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
--fi
- 
--  test -n "$ac_ct_CC" && break
--done
-+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-+echo "configure:762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
- 
--  CC=$ac_ct_CC
--fi
-+ac_ext=c
-+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-+cross_compiling=$ac_cv_prog_cc_cross
- 
--fi
-+cat > conftest.$ac_ext << EOF
- 
-+#line 773 "configure"
-+#include "confdefs.h"
- 
--test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
--See \`config.log' for more details." >&5
--echo "$as_me: error: no acceptable C compiler found in \$PATH
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
--
--# Provide some information about the compiler.
--echo "$as_me:$LINENO:" \
--     "checking for C compiler version" >&5
--ac_compiler=`set X $ac_compile; echo $2`
--{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
--  (eval $ac_compiler --version </dev/null >&5) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }
--{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
--  (eval $ac_compiler -v </dev/null >&5) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }
--{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
--  (eval $ac_compiler -V </dev/null >&5) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }
--
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--
--int
--main ()
--{
--
--  ;
--  return 0;
--}
--_ACEOF
--ac_clean_files_save=$ac_clean_files
--ac_clean_files="$ac_clean_files a.out a.exe b.out"
--# Try to create an executable without -o first, disregard a.out.
--# It will help us diagnose broken compilers, and finding out an intuition
--# of exeext.
--echo "$as_me:$LINENO: checking for C compiler default output" >&5
--echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
--ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
--if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
--  (eval $ac_link_default) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; then
--  # Find the output, starting from the most likely.  This scheme is
--# not robust to junk in `.', hence go to wildcards (a.*) only as a last
--# resort.
--
--# Be careful to initialize this variable, since it used to be cached.
--# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
--ac_cv_exeext=
--# b.out is created by i960 compilers.
--for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
--do
--  test -f "$ac_file" || continue
--  case $ac_file in
--    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
--        ;;
--    conftest.$ac_ext )
--        # This is the source file.
--        ;;
--    [ab].out )
--        # We found the default executable, but exeext='' is most
--        # certainly right.
--        break;;
--    *.* )
--        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
--        # FIXME: I believe we export ac_cv_exeext for Libtool,
--        # but it would be cool to find out if it's true.  Does anybody
--        # maintain Libtool? --akim.
--        export ac_cv_exeext
--        break;;
--    * )
--        break;;
--  esac
--done
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
--See \`config.log' for more details." >&5
--echo "$as_me: error: C compiler cannot create executables
--See \`config.log' for more details." >&2;}
--   { (exit 77); exit 77; }; }
--fi
--
--ac_exeext=$ac_cv_exeext
--echo "$as_me:$LINENO: result: $ac_file" >&5
--echo "${ECHO_T}$ac_file" >&6
--
--# Check the compiler produces executables we can run.  If not, either
--# the compiler is broken, or we cross compile.
--echo "$as_me:$LINENO: checking whether the C compiler works" >&5
--echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
--# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
--# If not cross compiling, check that we can run a simple program.
--if test "$cross_compiling" != yes; then
--  if { ac_try='./$ac_file'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--    cross_compiling=no
-+main(){return(0);}
-+EOF
-+if { (eval echo configure:778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  ac_cv_prog_cc_works=yes
-+  # If we can't run a trivial program, we are probably using a cross compiler.
-+  if (./conftest; exit) 2>/dev/null; then
-+    ac_cv_prog_cc_cross=no
-   else
--    if test "$cross_compiling" = maybe; then
--	cross_compiling=yes
--    else
--	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
--If you meant to cross compile, use \`--host'.
--See \`config.log' for more details." >&5
--echo "$as_me: error: cannot run C compiled programs.
--If you meant to cross compile, use \`--host'.
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
--    fi
-+    ac_cv_prog_cc_cross=yes
-   fi
-+else
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  ac_cv_prog_cc_works=no
- fi
--echo "$as_me:$LINENO: result: yes" >&5
--echo "${ECHO_T}yes" >&6
-+rm -fr conftest*
-+ac_ext=c
-+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-+cross_compiling=$ac_cv_prog_cc_cross
- 
--rm -f a.out a.exe conftest$ac_cv_exeext b.out
--ac_clean_files=$ac_clean_files_save
--# Check the compiler produces executables we can run.  If not, either
--# the compiler is broken, or we cross compile.
--echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
--echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
--echo "$as_me:$LINENO: result: $cross_compiling" >&5
--echo "${ECHO_T}$cross_compiling" >&6
--
--echo "$as_me:$LINENO: checking for suffix of executables" >&5
--echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
--  (eval $ac_link) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; then
--  # If both `conftest.exe' and `conftest' are `present' (well, observable)
--# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
--# work properly (i.e., refer to `conftest.exe'), while it won't with
--# `rm'.
--for ac_file in conftest.exe conftest conftest.*; do
--  test -f "$ac_file" || continue
--  case $ac_file in
--    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
--    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
--          export ac_cv_exeext
--          break;;
--    * ) break;;
--  esac
--done
--else
--  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
--See \`config.log' for more details." >&5
--echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-+if test $ac_cv_prog_cc_works = no; then
-+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
- fi
-+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-+echo "configure:804: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-+cross_compiling=$ac_cv_prog_cc_cross
- 
--rm -f conftest$ac_cv_exeext
--echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
--echo "${ECHO_T}$ac_cv_exeext" >&6
--
--rm -f conftest.$ac_ext
--EXEEXT=$ac_cv_exeext
--ac_exeext=$EXEEXT
--echo "$as_me:$LINENO: checking for suffix of object files" >&5
--echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
--if test "${ac_cv_objext+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-+echo "configure:809: checking whether we are using GNU C" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--
--int
--main ()
--{
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.o conftest.obj
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; then
--  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
--  case $ac_file in
--    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
--    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
--       break;;
--  esac
--done
-+  cat > conftest.c <<EOF
-+#ifdef __GNUC__
-+  yes;
-+#endif
-+EOF
-+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-+  ac_cv_prog_gcc=yes
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
--See \`config.log' for more details." >&5
--echo "$as_me: error: cannot compute suffix of object files: cannot compile
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+  ac_cv_prog_gcc=no
- fi
--
--rm -f conftest.$ac_cv_objext conftest.$ac_ext
- fi
--echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
--echo "${ECHO_T}$ac_cv_objext" >&6
--OBJEXT=$ac_cv_objext
--ac_objext=$OBJEXT
--echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
--echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
--if test "${ac_cv_c_compiler_gnu+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
- 
--int
--main ()
--{
--#ifndef __GNUC__
--       choke me
--#endif
-+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
- 
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_compiler_gnu=yes
-+if test $ac_cv_prog_gcc = yes; then
-+  GCC=yes
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_compiler_gnu=no
-+  GCC=
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--ac_cv_c_compiler_gnu=$ac_compiler_gnu
- 
--fi
--echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
--echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
--GCC=`test $ac_compiler_gnu = yes && echo yes`
--ac_test_CFLAGS=${CFLAGS+set}
--ac_save_CFLAGS=$CFLAGS
--CFLAGS="-g"
--echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
--echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
--if test "${ac_cv_prog_cc_g+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+ac_test_CFLAGS="${CFLAGS+set}"
-+ac_save_CFLAGS="$CFLAGS"
-+CFLAGS=
-+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-+echo "configure:837: checking whether ${CC-cc} accepts -g" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--
--int
--main ()
--{
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
-+  echo 'void f(){}' > conftest.c
-+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-   ac_cv_prog_cc_g=yes
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_prog_cc_g=no
-+fi
-+rm -f conftest*
- 
--ac_cv_prog_cc_g=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--fi
--echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
--echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-+
-+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
--  CFLAGS=$ac_save_CFLAGS
-+  CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
-   if test "$GCC" = yes; then
-     CFLAGS="-g -O2"
-@@ -2028,304 +863,37 @@
-     CFLAGS=
-   fi
- fi
--echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
--echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
--if test "${ac_cv_prog_cc_stdc+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  ac_cv_prog_cc_stdc=no
--ac_save_CC=$CC
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <stdarg.h>
--#include <stdio.h>
--#include <sys/types.h>
--#include <sys/stat.h>
--/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
--struct buf { int x; };
--FILE * (*rcsopen) (struct buf *, struct stat *, int);
--static char *e (p, i)
--     char **p;
--     int i;
--{
--  return p[i];
--}
--static char *f (char * (*g) (char **, int), char **p, ...)
--{
--  char *s;
--  va_list v;
--  va_start (v,p);
--  s = g (p, va_arg (v,int));
--  va_end (v);
--  return s;
--}
--int test (int i, double x);
--struct s1 {int (*f) (int a);};
--struct s2 {int (*f) (double a);};
--int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
--int argc;
--char **argv;
--int
--main ()
--{
--return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
--  ;
--  return 0;
--}
--_ACEOF
--# Don't try gcc -ansi; that turns off useful extensions and
--# breaks some systems' header files.
--# AIX			-qlanglvl=ansi
--# Ultrix and OSF/1	-std1
--# HP-UX 10.20 and later	-Ae
--# HP-UX older versions	-Aa -D_HPUX_SOURCE
--# SVR4			-Xc -D__EXTENSIONS__
--for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
--do
--  CC="$ac_save_CC $ac_arg"
--  rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_cv_prog_cc_stdc=$ac_arg
--break
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--fi
--rm -f conftest.$ac_objext
--done
--rm -f conftest.$ac_ext conftest.$ac_objext
--CC=$ac_save_CC
--
--fi
--
--case "x$ac_cv_prog_cc_stdc" in
--  x|xno)
--    echo "$as_me:$LINENO: result: none needed" >&5
--echo "${ECHO_T}none needed" >&6 ;;
--  *)
--    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
--echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
--    CC="$CC $ac_cv_prog_cc_stdc" ;;
--esac
--
--# Some people use a C++ compiler to compile C.  Since we use `exit',
--# in C++ we need to declare it.  In case someone uses the same compiler
--# for both compiling C and C++ we need to have the C++ compiler decide
--# the declaration of exit, since it's the most demanding environment.
--cat >conftest.$ac_ext <<_ACEOF
--#ifndef __cplusplus
--  choke me
--#endif
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  for ac_declaration in \
--   ''\
--   '#include <stdlib.h>' \
--   'extern "C" void std::exit (int) throw (); using std::exit;' \
--   'extern "C" void std::exit (int); using std::exit;' \
--   'extern "C" void exit (int) throw ();' \
--   'extern "C" void exit (int);' \
--   'void exit (int);'
--do
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <stdlib.h>
--$ac_declaration
--int
--main ()
--{
--exit (42);
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  :
-+# Extract the first word of "ranlib", so it can be a program name with args.
-+set dummy ranlib; ac_word=$2
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:871: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--continue
--fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_declaration
--int
--main ()
--{
--exit (42);
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  break
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--done
--rm -f conftest*
--if test -n "$ac_declaration"; then
--  echo '#ifdef __cplusplus' >>confdefs.h
--  echo $ac_declaration      >>confdefs.h
--  echo '#endif'             >>confdefs.h
--fi
--
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--ac_ext=c
--ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
--
--if test -n "$ac_tool_prefix"; then
--  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
--set dummy ${ac_tool_prefix}ranlib; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_RANLIB+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-   if test -n "$RANLIB"; then
-   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
- else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      ac_cv_prog_RANLIB="ranlib"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
-+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
- fi
- fi
--RANLIB=$ac_cv_prog_RANLIB
-+RANLIB="$ac_cv_prog_RANLIB"
- if test -n "$RANLIB"; then
--  echo "$as_me:$LINENO: result: $RANLIB" >&5
--echo "${ECHO_T}$RANLIB" >&6
-+  echo "$ac_t""$RANLIB" 1>&6
- else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
-+  echo "$ac_t""no" 1>&6
- fi
- 
--fi
--if test -z "$ac_cv_prog_RANLIB"; then
--  ac_ct_RANLIB=$RANLIB
--  # Extract the first word of "ranlib", so it can be a program name with args.
--set dummy ranlib; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if test -n "$ac_ct_RANLIB"; then
--  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_ac_ct_RANLIB="ranlib"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
--  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
--fi
--fi
--ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
--if test -n "$ac_ct_RANLIB"; then
--  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
--echo "${ECHO_T}$ac_ct_RANLIB" >&6
--else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
--fi
--
--  RANLIB=$ac_ct_RANLIB
--else
--  RANLIB="$ac_cv_prog_RANLIB"
--fi
--
- # Find a good install program.  We prefer a C program (faster),
- # so one script is as good as another.  But avoid the broken or
- # incompatible versions:
-@@ -2333,306 +901,158 @@
- # SunOS /usr/etc/install
- # IRIX /sbin/install
- # AIX /bin/install
--# AmigaOS /C/install, which installs bootblocks on floppy discs
- # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
- # AFS /usr/afsws/bin/install, which mishandles nonexistent args
- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
- # ./install, which can be erroneously created by make from ./install.sh.
--echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
--echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-+echo "configure:910: checking for a BSD compatible install" >&5
- if test -z "$INSTALL"; then
--if test "${ac_cv_path_install+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  # Account for people who put trailing slashes in PATH elements.
--case $as_dir/ in
--  ./ | .// | /cC/* | \
--  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
--  /usr/ucb/* ) ;;
--  *)
--    # OSF1 and SCO ODT 3.0 have their own names for install.
--    # Don't use installbsd from OSF since it installs stuff as root
--    # by default.
--    for ac_prog in ginstall scoinst install; do
--      for ac_exec_ext in '' $ac_executable_extensions; do
--        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
--          if test $ac_prog = install &&
--            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
--            # AIX install.  It has an incompatible calling convention.
--            :
--          elif test $ac_prog = install &&
--            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
--            # program-specific install script used by HP pwplus--don't use.
--            :
--          else
--            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
--            break 3
--          fi
--        fi
-+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-+  for ac_dir in $PATH; do
-+    # Account for people who put trailing slashes in PATH elements.
-+    case "$ac_dir/" in
-+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-+    *)
-+      # OSF1 and SCO ODT 3.0 have their own names for install.
-+      # Don't use installbsd from OSF since it installs stuff as root
-+      # by default.
-+      for ac_prog in ginstall scoinst install; do
-+        if test -f $ac_dir/$ac_prog; then
-+	  if test $ac_prog = install &&
-+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-+	    # AIX install.  It has an incompatible calling convention.
-+	    :
-+	  else
-+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-+	    break 2
-+	  fi
-+	fi
-       done
--    done
--    ;;
--esac
--done
-+      ;;
-+    esac
-+  done
-+  IFS="$ac_save_IFS"
- 
--
- fi
-   if test "${ac_cv_path_install+set}" = set; then
--    INSTALL=$ac_cv_path_install
-+    INSTALL="$ac_cv_path_install"
-   else
-     # As a last resort, use the slow shell script.  We don't cache a
-     # path for INSTALL within a source directory, because that will
-     # break other packages using the cache if that directory is
-     # removed, or if the path is relative.
--    INSTALL=$ac_install_sh
-+    INSTALL="$ac_install_sh"
-   fi
- fi
--echo "$as_me:$LINENO: result: $INSTALL" >&5
--echo "${ECHO_T}$INSTALL" >&6
-+echo "$ac_t""$INSTALL" 1>&6
- 
- # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
- # It thinks the first close brace ends the variable substitution.
- test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
- 
--test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
- 
- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
- 
--if test -n "$ac_tool_prefix"; then
--  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-+if test $host != $build; then
-+  ac_tool_prefix=${host_alias}-
-+else
-+  ac_tool_prefix=
-+fi
-+
-+# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ar; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_AR+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-+echo "configure:971: checking for $ac_word" >&5
-+if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test -n "$AR"; then
-   ac_cv_prog_AR="$AR" # Let the user override the test.
- else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_AR="${ac_tool_prefix}ar"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--
-+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-+  ac_dummy="$PATH"
-+  for ac_dir in $ac_dummy; do
-+    test -z "$ac_dir" && ac_dir=.
-+    if test -f $ac_dir/$ac_word; then
-+      ac_cv_prog_AR="${ac_tool_prefix}ar"
-+      break
-+    fi
-+  done
-+  IFS="$ac_save_ifs"
-+  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
- fi
- fi
--AR=$ac_cv_prog_AR
-+AR="$ac_cv_prog_AR"
- if test -n "$AR"; then
--  echo "$as_me:$LINENO: result: $AR" >&5
--echo "${ECHO_T}$AR" >&6
-+  echo "$ac_t""$AR" 1>&6
- else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
-+  echo "$ac_t""no" 1>&6
- fi
- 
--fi
--if test -z "$ac_cv_prog_AR"; then
--  ac_ct_AR=$AR
--  # Extract the first word of "ar", so it can be a program name with args.
--set dummy ar; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if test -n "$ac_ct_AR"; then
--  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_prog_ac_ct_AR="ar"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
- 
--fi
--fi
--ac_ct_AR=$ac_cv_prog_ac_ct_AR
--if test -n "$ac_ct_AR"; then
--  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
--echo "${ECHO_T}$ac_ct_AR" >&6
--else
--  echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6
--fi
- 
--  AR=$ac_ct_AR
-+echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-+echo "configure:1001: checking whether byte ordering is bigendian" >&5
-+if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  AR="$ac_cv_prog_AR"
--fi
--
--
--echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
--echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
--if test "${ac_cv_c_bigendian+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  # See if sys/param.h defines the BYTE_ORDER macro.
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+  ac_cv_c_bigendian=unknown
-+# See if sys/param.h defines the BYTE_ORDER macro.
-+cat > conftest.$ac_ext <<EOF
-+#line 1008 "configure"
-+#include "confdefs.h"
- #include <sys/types.h>
- #include <sys/param.h>
-+int main() {
- 
--int
--main ()
--{
- #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
-  bogus endian macros
- #endif
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
-+; return 0; }
-+EOF
-+if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-   # It does; now see whether it defined to BIG_ENDIAN or not.
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+cat > conftest.$ac_ext <<EOF
-+#line 1023 "configure"
-+#include "confdefs.h"
- #include <sys/types.h>
- #include <sys/param.h>
-+int main() {
- 
--int
--main ()
--{
- #if BYTE_ORDER != BIG_ENDIAN
-  not big endian
- #endif
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
-+; return 0; }
-+EOF
-+if { (eval echo configure:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-   ac_cv_c_bigendian=yes
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_cv_c_bigendian=no
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  ac_cv_c_bigendian=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest*
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--# It does not; compile a test program.
--if test "$cross_compiling" = yes; then
--  # try to guess the endianness by grepping values into an object file
--  ac_cv_c_bigendian=unknown
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
--short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
--void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
--short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
--short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
--void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
--int
--main ()
--{
-- _ascii (); _ebcdic ();
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
--  ac_cv_c_bigendian=yes
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
- fi
--if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
--  if test "$ac_cv_c_bigendian" = unknown; then
--    ac_cv_c_bigendian=no
--  else
--    # finding both strings is unlikely to happen, but who knows?
--    ac_cv_c_bigendian=unknown
--  fi
--fi
-+rm -f conftest*
-+if test $ac_cv_c_bigendian = unknown; then
-+if test "$cross_compiling" = yes; then
-+    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--int
--main ()
--{
-+  cat > conftest.$ac_ext <<EOF
-+#line 1054 "configure"
-+#include "confdefs.h"
-+main () {
-   /* Are we little or big endian?  From Harbison&Steele.  */
-   union
-   {
-@@ -2642,52 +1062,31 @@
-   u.l = 1;
-   exit (u.c[sizeof (long) - 1] == 1);
- }
--_ACEOF
--rm -f conftest$ac_exeext
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
--  (eval $ac_link) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
-+EOF
-+if { (eval echo configure:1067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+then
-   ac_cv_c_bigendian=no
- else
--  echo "$as_me: program exited with status $ac_status" >&5
--echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--ac_cv_c_bigendian=yes
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -fr conftest*
-+  ac_cv_c_bigendian=yes
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -fr conftest*
- fi
-+
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
--echo "${ECHO_T}$ac_cv_c_bigendian" >&6
--case $ac_cv_c_bigendian in
--  yes)
- 
--cat >>confdefs.h <<\_ACEOF
-+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-+if test $ac_cv_c_bigendian = yes; then
-+  cat >> confdefs.h <<\EOF
- #define WORDS_BIGENDIAN 1
--_ACEOF
-- ;;
--  no)
--     ;;
--  *)
--    { { echo "$as_me:$LINENO: error: unknown endianness
--presetting ac_cv_c_bigendian=no (or yes) will help" >&5
--echo "$as_me: error: unknown endianness
--presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
--   { (exit 1); exit 1; }; } ;;
--esac
-+EOF
- 
-+fi
- 
-+
- if test "x$GCC" = "xyes"; then
- 	CFLAGS="$CFLAGS -Wall"
- fi
-@@ -2697,14 +1096,13 @@
-   case "${enableval}" in
-                  yes) shared=true ;;
-                  no) shared=false ;;
--                 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for shared options" >&5
--echo "$as_me: error: bad value ${enableval} for shared options" >&2;}
--   { (exit 1); exit 1; }; } ;;
-+                 *) { echo "configure: error: bad value ${enableval} for shared options" 1>&2; exit 1; } ;;
-                  esac
- else
-   shared=false
--fi;
-+fi
- 
-+
- case "$target_cpu" in
-      i386|i486|i586|i686)
- 	TARGET_CPU=i386
-@@ -2712,7 +1110,7 @@
-      *)
-         TARGET_CPU=$target_cpu
-      ;;
--esac
-+esac     
- TARGET_OS=$target_os
- 
- M68KCC=
-@@ -2726,7 +1124,7 @@
- 		M68KCC=/usr/m68k-palmos/bin/gcc
- 		# Generic build is ARM or M68K (probably ARM though)
-                 CC="/usr/$TARGET_CPU-palmos/bin/gcc"
--		if test "$target_cpu" = "arm"
-+		if test "$target_cpu" = "arm" 
-                 then
-                    CC="$CC -fPIC -march=armv4t"
-                 fi
-@@ -2762,7 +1160,7 @@
-      *)
-         HOST_CPU=$host_cpu
-      ;;
--esac
-+esac     
- HOST_OS=$host_os
- 
- 
-@@ -2800,138 +1198,91 @@
-   case "${enableval}" in
-                  yes) sockets=true ;;
-                  no) sockets=false ;;
--                 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for sockets options" >&5
--echo "$as_me: error: bad value ${enableval} for sockets options" >&2;}
--   { (exit 1); exit 1; }; } ;;
-+                 *) { echo "configure: error: bad value ${enableval} for sockets options" 1>&2; exit 1; } ;;
-                  esac
- else
-   sockets=true
--fi;
-+fi
-+
- if test "$sockets" = false; then
--   cat >>confdefs.h <<\_ACEOF
-+   cat >> confdefs.h <<\EOF
- #define CST_NO_SOCKETS 1
--_ACEOF
-+EOF
- 
- fi
- 
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+cat > conftest.$ac_ext <<EOF
-+#line 1216 "configure"
-+#include "confdefs.h"
- #include <stdio.h>
--int
--main ()
--{
-+int main() {
-  struct a { union { float b; int c; } d; };
--                 const struct a e = { .d={ .b=3.14 } };
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
-+                 const struct a e = { .d={ .b=3.14 } }; 
-+; return 0; }
-+EOF
-+if { (eval echo configure:1224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+  rm -rf conftest*
-   unioninit=yes
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--unioninit=no
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  unioninit=no
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
-+rm -f conftest*
- if test "$unioninit" = no; then
--   cat >>confdefs.h <<\_ACEOF
-+   cat >> confdefs.h <<\EOF
- #define NO_UNION_INITIALIZATION 1
--_ACEOF
-+EOF
- 
- fi
- 
--echo "$as_me:$LINENO: checking for mmap" >&5
--echo $ECHO_N "checking for mmap... $ECHO_C" >&6
--if test "${ac_cv_func_mmap+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+echo $ac_n "checking for mmap""... $ac_c" 1>&6
-+echo "configure:1242: checking for mmap" >&5
-+if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+  cat > conftest.$ac_ext <<EOF
-+#line 1247 "configure"
-+#include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char mmap (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
-+    which can conflict with char mmap(); below.  */
-+#include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error.  */
--#ifdef __cplusplus
--extern "C"
--{
--#endif
- /* We use char because int might match the return type of a gcc2
--   builtin and then its argument prototype would still apply.  */
--char mmap ();
-+    builtin and then its argument prototype would still apply.  */
-+char mmap();
-+
-+int main() {
-+
- /* The GNU C library defines this for functions which it implements
-     to always fail with ENOSYS.  Some functions are actually named
-     something starting with __ and the normal name is an alias.  */
- #if defined (__stub_mmap) || defined (__stub___mmap)
- choke me
- #else
--char (*f) () = mmap;
-+mmap();
- #endif
--#ifdef __cplusplus
--}
--#endif
- 
--int
--main ()
--{
--return f != mmap;
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
--  (eval $ac_link) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest$ac_exeext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_cv_func_mmap=yes
-+; return 0; }
-+EOF
-+if { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+  rm -rf conftest*
-+  eval "ac_cv_func_mmap=yes"
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_cv_func_mmap=no
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_func_mmap=no"
- fi
--rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-+rm -f conftest*
- fi
--echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
--echo "${ECHO_T}$ac_cv_func_mmap" >&6
--if test $ac_cv_func_mmap = yes; then
-+
-+if eval "test \"`echo '$ac_cv_func_'mmap`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-   MMAPTYPE=posix
-+else
-+  echo "$ac_t""no" 1>&6
- fi
- 
- 
-@@ -2956,1028 +1307,266 @@
- 
- 
- AUDIODRIVER=none
--ac_ext=c
--ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
--echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
--echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-+echo "configure:1312: checking how to run the C preprocessor" >&5
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
-   CPP=
- fi
- if test -z "$CPP"; then
--  if test "${ac_cv_prog_CPP+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--      # Double quotes because CPP needs to be expanded
--    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
--    do
--      ac_preproc_ok=false
--for ac_c_preproc_warn_flag in '' yes
--do
--  # Use a header file that comes with gcc, so configuring glibc
--  # with a fresh cross-compiler works.
--  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--  # <limits.h> exists even on freestanding compilers.
-+    # This must be in double quotes, not single quotes, because CPP may get
-+  # substituted into the Makefile and "${CC-cc}" will confuse make.
-+  CPP="${CC-cc} -E"
-   # On the NeXT, cc -E runs the code through the compiler's parser,
--  # not just through cpp. "Syntax error" is here to catch this case.
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
--                     Syntax error
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
--fi
--if test -z "$ac_cpp_err"; then
-+  # not just through cpp.
-+  cat > conftest.$ac_ext <<EOF
-+#line 1327 "configure"
-+#include "confdefs.h"
-+#include <assert.h>
-+Syntax Error
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-   :
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  # Broken: fails on valid input.
--continue
--fi
--rm -f conftest.err conftest.$ac_ext
--
--  # OK, works on sane cases.  Now check whether non-existent headers
--  # can be detected and how.
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <ac_nonexistent.h>
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
--fi
--if test -z "$ac_cpp_err"; then
--  # Broken: success on invalid input.
--continue
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  # Passes both tests.
--ac_preproc_ok=:
--break
--fi
--rm -f conftest.err conftest.$ac_ext
--
--done
--# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
--rm -f conftest.err conftest.$ac_ext
--if $ac_preproc_ok; then
--  break
--fi
--
--    done
--    ac_cv_prog_CPP=$CPP
--
--fi
--  CPP=$ac_cv_prog_CPP
--else
--  ac_cv_prog_CPP=$CPP
--fi
--echo "$as_me:$LINENO: result: $CPP" >&5
--echo "${ECHO_T}$CPP" >&6
--ac_preproc_ok=false
--for ac_c_preproc_warn_flag in '' yes
--do
--  # Use a header file that comes with gcc, so configuring glibc
--  # with a fresh cross-compiler works.
--  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--  # <limits.h> exists even on freestanding compilers.
--  # On the NeXT, cc -E runs the code through the compiler's parser,
--  # not just through cpp. "Syntax error" is here to catch this case.
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
--                     Syntax error
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
--fi
--if test -z "$ac_cpp_err"; then
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  CPP="${CC-cc} -E -traditional-cpp"
-+  cat > conftest.$ac_ext <<EOF
-+#line 1344 "configure"
-+#include "confdefs.h"
-+#include <assert.h>
-+Syntax Error
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-   :
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  # Broken: fails on valid input.
--continue
--fi
--rm -f conftest.err conftest.$ac_ext
--
--  # OK, works on sane cases.  Now check whether non-existent headers
--  # can be detected and how.
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <ac_nonexistent.h>
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
--fi
--if test -z "$ac_cpp_err"; then
--  # Broken: success on invalid input.
--continue
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  # Passes both tests.
--ac_preproc_ok=:
--break
--fi
--rm -f conftest.err conftest.$ac_ext
--
--done
--# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
--rm -f conftest.err conftest.$ac_ext
--if $ac_preproc_ok; then
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  CPP="${CC-cc} -nologo -E"
-+  cat > conftest.$ac_ext <<EOF
-+#line 1361 "configure"
-+#include "confdefs.h"
-+#include <assert.h>
-+Syntax Error
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-   :
- else
--  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
--See \`config.log' for more details." >&5
--echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  CPP=/lib/cpp
- fi
--
--ac_ext=c
--ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
--
--
--echo "$as_me:$LINENO: checking for egrep" >&5
--echo $ECHO_N "checking for egrep... $ECHO_C" >&6
--if test "${ac_cv_prog_egrep+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
--    then ac_cv_prog_egrep='grep -E'
--    else ac_cv_prog_egrep='egrep'
--    fi
-+rm -f conftest*
- fi
--echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
--echo "${ECHO_T}$ac_cv_prog_egrep" >&6
-- EGREP=$ac_cv_prog_egrep
--
--
--echo "$as_me:$LINENO: checking for ANSI C header files" >&5
--echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
--if test "${ac_cv_header_stdc+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <stdlib.h>
--#include <stdarg.h>
--#include <string.h>
--#include <float.h>
--
--int
--main ()
--{
--
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_cv_header_stdc=yes
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_cv_header_stdc=no
--fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--
--if test $ac_cv_header_stdc = yes; then
--  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <string.h>
--
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "memchr" >/dev/null 2>&1; then
--  :
--else
--  ac_cv_header_stdc=no
--fi
- rm -f conftest*
--
- fi
--
--if test $ac_cv_header_stdc = yes; then
--  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <stdlib.h>
--
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "free" >/dev/null 2>&1; then
--  :
--else
--  ac_cv_header_stdc=no
--fi
- rm -f conftest*
--
-+  ac_cv_prog_CPP="$CPP"
- fi
--
--if test $ac_cv_header_stdc = yes; then
--  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
--  if test "$cross_compiling" = yes; then
--  :
-+  CPP="$ac_cv_prog_CPP"
- else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <ctype.h>
--#if ((' ' & 0x0FF) == 0x020)
--# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
--#else
--# define ISLOWER(c) \
--                   (('a' <= (c) && (c) <= 'i') \
--                     || ('j' <= (c) && (c) <= 'r') \
--                     || ('s' <= (c) && (c) <= 'z'))
--# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
--#endif
--
--#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
--int
--main ()
--{
--  int i;
--  for (i = 0; i < 256; i++)
--    if (XOR (islower (i), ISLOWER (i))
--        || toupper (i) != TOUPPER (i))
--      exit(2);
--  exit (0);
--}
--_ACEOF
--rm -f conftest$ac_exeext
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
--  (eval $ac_link) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  :
--else
--  echo "$as_me: program exited with status $ac_status" >&5
--echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--( exit $ac_status )
--ac_cv_header_stdc=no
-+  ac_cv_prog_CPP="$CPP"
- fi
--rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
--fi
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
--echo "${ECHO_T}$ac_cv_header_stdc" >&6
--if test $ac_cv_header_stdc = yes; then
-+echo "$ac_t""$CPP" 1>&6
- 
--cat >>confdefs.h <<\_ACEOF
--#define STDC_HEADERS 1
--_ACEOF
--
--fi
--
--# On IRIX 5.3, sys/types and inttypes.h are conflicting.
--
--
--
--
--
--
--
--
--
--for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
--                  inttypes.h stdint.h unistd.h
--do
--as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--echo "$as_me:$LINENO: checking for $ac_header" >&5
--echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
--if eval "test \"\${$as_ac_Header+set}\" = set"; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+ac_safe=`echo "sys/soundcard.h" | sed 'y%./+-%__p_%'`
-+echo $ac_n "checking for sys/soundcard.h""... $ac_c" 1>&6
-+echo "configure:1393: checking for sys/soundcard.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
--
--#include <$ac_header>
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  eval "$as_ac_Header=yes"
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--eval "$as_ac_Header=no"
--fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--fi
--echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
--echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
--if test `eval echo '${'$as_ac_Header'}'` = yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
--
--fi
--
--done
--
--
--if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
--  echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
--echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6
--if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5
--echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6
--else
--  # Is the header compilable?
--echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5
--echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
-+  cat > conftest.$ac_ext <<EOF
-+#line 1398 "configure"
-+#include "confdefs.h"
- #include <sys/soundcard.h>
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_header_compiler=yes
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=yes"
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_header_compiler=no
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=no"
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
--echo "${ECHO_T}$ac_header_compiler" >&6
--
--# Is the header present?
--echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5
--echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <sys/soundcard.h>
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
-+rm -f conftest*
- fi
--if test -z "$ac_cpp_err"; then
--  ac_header_preproc=yes
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  ac_header_preproc=no
--fi
--rm -f conftest.err conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
--echo "${ECHO_T}$ac_header_preproc" >&6
--
--# So?  What about this header?
--case $ac_header_compiler:$ac_header_preproc in
--  yes:no )
--    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
--echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
--    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--  no:yes )
--    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5
--echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;}
--    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&2;}
--    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--esac
--echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
--echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6
--if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  ac_cv_header_sys_soundcard_h=$ac_header_preproc
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5
--echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6
--
--fi
--if test $ac_cv_header_sys_soundcard_h = yes; then
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-   AUDIODRIVER="oss"
-                AUDIODEFS=-DCST_AUDIO_LINUX
-+else
-+  echo "$ac_t""no" 1>&6
- fi
- 
--
--if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
--  echo "$as_me:$LINENO: checking for machine/soundcard.h" >&5
--echo $ECHO_N "checking for machine/soundcard.h... $ECHO_C" >&6
--if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_machine_soundcard_h" >&5
--echo "${ECHO_T}$ac_cv_header_machine_soundcard_h" >&6
-+ac_safe=`echo "machine/soundcard.h" | sed 'y%./+-%__p_%'`
-+echo $ac_n "checking for machine/soundcard.h""... $ac_c" 1>&6
-+echo "configure:1427: checking for machine/soundcard.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  # Is the header compilable?
--echo "$as_me:$LINENO: checking machine/soundcard.h usability" >&5
--echo $ECHO_N "checking machine/soundcard.h usability... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
-+  cat > conftest.$ac_ext <<EOF
-+#line 1432 "configure"
-+#include "confdefs.h"
- #include <machine/soundcard.h>
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_header_compiler=yes
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=yes"
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_header_compiler=no
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=no"
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
--echo "${ECHO_T}$ac_header_compiler" >&6
--
--# Is the header present?
--echo "$as_me:$LINENO: checking machine/soundcard.h presence" >&5
--echo $ECHO_N "checking machine/soundcard.h presence... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <machine/soundcard.h>
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
-+rm -f conftest*
- fi
--if test -z "$ac_cpp_err"; then
--  ac_header_preproc=yes
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  ac_header_preproc=no
--fi
--rm -f conftest.err conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
--echo "${ECHO_T}$ac_header_preproc" >&6
--
--# So?  What about this header?
--case $ac_header_compiler:$ac_header_preproc in
--  yes:no )
--    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
--echo "$as_me: WARNING: machine/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
--    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--  no:yes )
--    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: present but cannot be compiled" >&5
--echo "$as_me: WARNING: machine/soundcard.h: present but cannot be compiled" >&2;}
--    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: machine/soundcard.h: check for missing prerequisite headers?" >&2;}
--    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--esac
--echo "$as_me:$LINENO: checking for machine/soundcard.h" >&5
--echo $ECHO_N "checking for machine/soundcard.h... $ECHO_C" >&6
--if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  ac_cv_header_machine_soundcard_h=$ac_header_preproc
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_machine_soundcard_h" >&5
--echo "${ECHO_T}$ac_cv_header_machine_soundcard_h" >&6
--
--fi
--if test $ac_cv_header_machine_soundcard_h = yes; then
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-   AUDIODRIVER="oss"
-                AUDIODEFS=-DCST_AUDIO_FREEBSD
-+else
-+  echo "$ac_t""no" 1>&6
- fi
- 
--
--if test "${ac_cv_header_sys_audioio_h+set}" = set; then
--  echo "$as_me:$LINENO: checking for sys/audioio.h" >&5
--echo $ECHO_N "checking for sys/audioio.h... $ECHO_C" >&6
--if test "${ac_cv_header_sys_audioio_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_sys_audioio_h" >&5
--echo "${ECHO_T}$ac_cv_header_sys_audioio_h" >&6
-+ac_safe=`echo "sys/audioio.h" | sed 'y%./+-%__p_%'`
-+echo $ac_n "checking for sys/audioio.h""... $ac_c" 1>&6
-+echo "configure:1461: checking for sys/audioio.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  # Is the header compilable?
--echo "$as_me:$LINENO: checking sys/audioio.h usability" >&5
--echo $ECHO_N "checking sys/audioio.h usability... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
-+  cat > conftest.$ac_ext <<EOF
-+#line 1466 "configure"
-+#include "confdefs.h"
- #include <sys/audioio.h>
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_header_compiler=yes
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=yes"
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_header_compiler=no
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=no"
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
--echo "${ECHO_T}$ac_header_compiler" >&6
--
--# Is the header present?
--echo "$as_me:$LINENO: checking sys/audioio.h presence" >&5
--echo $ECHO_N "checking sys/audioio.h presence... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <sys/audioio.h>
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
-+rm -f conftest*
- fi
--if test -z "$ac_cpp_err"; then
--  ac_header_preproc=yes
--else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  ac_header_preproc=no
--fi
--rm -f conftest.err conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
--echo "${ECHO_T}$ac_header_preproc" >&6
--
--# So?  What about this header?
--case $ac_header_compiler:$ac_header_preproc in
--  yes:no )
--    { echo "$as_me:$LINENO: WARNING: sys/audioio.h: accepted by the compiler, rejected by the preprocessor!" >&5
--echo "$as_me: WARNING: sys/audioio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
--    { echo "$as_me:$LINENO: WARNING: sys/audioio.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: sys/audioio.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--  no:yes )
--    { echo "$as_me:$LINENO: WARNING: sys/audioio.h: present but cannot be compiled" >&5
--echo "$as_me: WARNING: sys/audioio.h: present but cannot be compiled" >&2;}
--    { echo "$as_me:$LINENO: WARNING: sys/audioio.h: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: sys/audioio.h: check for missing prerequisite headers?" >&2;}
--    { echo "$as_me:$LINENO: WARNING: sys/audioio.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: sys/audioio.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--esac
--echo "$as_me:$LINENO: checking for sys/audioio.h" >&5
--echo $ECHO_N "checking for sys/audioio.h... $ECHO_C" >&6
--if test "${ac_cv_header_sys_audioio_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  ac_cv_header_sys_audioio_h=$ac_header_preproc
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_sys_audioio_h" >&5
--echo "${ECHO_T}$ac_cv_header_sys_audioio_h" >&6
--
--fi
--if test $ac_cv_header_sys_audioio_h = yes; then
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-   AUDIODRIVER="sun"
-                AUDIODEFS=-DCST_AUDIO_SUNOS
-+else
-+  echo "$ac_t""no" 1>&6
- fi
- 
--
--if test "${ac_cv_header_mmsystem_h+set}" = set; then
--  echo "$as_me:$LINENO: checking for mmsystem.h" >&5
--echo $ECHO_N "checking for mmsystem.h... $ECHO_C" >&6
--if test "${ac_cv_header_mmsystem_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--fi
--echo "$as_me:$LINENO: result: $ac_cv_header_mmsystem_h" >&5
--echo "${ECHO_T}$ac_cv_header_mmsystem_h" >&6
-+ ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
-+echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
-+echo "configure:1495: checking for alsa/asoundlib.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  # Is the header compilable?
--echo "$as_me:$LINENO: checking mmsystem.h usability" >&5
--echo $ECHO_N "checking mmsystem.h usability... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
--#include <mmsystem.h>
--_ACEOF
--rm -f conftest.$ac_objext
--if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
--  (eval $ac_compile) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } &&
--         { ac_try='test -s conftest.$ac_objext'
--  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
--  (eval $ac_try) 2>&5
--  ac_status=$?
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; }; then
--  ac_header_compiler=yes
-+  cat > conftest.$ac_ext <<EOF
-+#line 1500 "configure"
-+#include "confdefs.h"
-+#include <alsa/asoundlib.h>
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=yes"
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--ac_header_compiler=no
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=no"
- fi
--rm -f conftest.$ac_objext conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
--echo "${ECHO_T}$ac_header_compiler" >&6
--
--# Is the header present?
--echo "$as_me:$LINENO: checking mmsystem.h presence" >&5
--echo $ECHO_N "checking mmsystem.h presence... $ECHO_C" >&6
--cat >conftest.$ac_ext <<_ACEOF
--#line $LINENO "configure"
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <mmsystem.h>
--_ACEOF
--if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
--  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } >/dev/null; then
--  if test -s conftest.err; then
--    ac_cpp_err=$ac_c_preproc_warn_flag
--  else
--    ac_cpp_err=
--  fi
--else
--  ac_cpp_err=yes
-+rm -f conftest*
- fi
--if test -z "$ac_cpp_err"; then
--  ac_header_preproc=yes
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-+  AUDIODRIVER="alsa"
-+	       AUDIODEFS=-DCST_AUDIO_ALSA
-+               AUDIOLIBS=-lasound
- else
--  echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--  ac_header_preproc=no
-+  echo "$ac_t""no" 1>&6
- fi
--rm -f conftest.err conftest.$ac_ext
--echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
--echo "${ECHO_T}$ac_header_preproc" >&6
- 
--# So?  What about this header?
--case $ac_header_compiler:$ac_header_preproc in
--  yes:no )
--    { echo "$as_me:$LINENO: WARNING: mmsystem.h: accepted by the compiler, rejected by the preprocessor!" >&5
--echo "$as_me: WARNING: mmsystem.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
--    { echo "$as_me:$LINENO: WARNING: mmsystem.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: mmsystem.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--  no:yes )
--    { echo "$as_me:$LINENO: WARNING: mmsystem.h: present but cannot be compiled" >&5
--echo "$as_me: WARNING: mmsystem.h: present but cannot be compiled" >&2;}
--    { echo "$as_me:$LINENO: WARNING: mmsystem.h: check for missing prerequisite headers?" >&5
--echo "$as_me: WARNING: mmsystem.h: check for missing prerequisite headers?" >&2;}
--    { echo "$as_me:$LINENO: WARNING: mmsystem.h: proceeding with the preprocessor's result" >&5
--echo "$as_me: WARNING: mmsystem.h: proceeding with the preprocessor's result" >&2;}
--    (
--      cat <<\_ASBOX
--## ------------------------------------ ##
--## Report this to bug-autoconf@gnu.org. ##
--## ------------------------------------ ##
--_ASBOX
--    ) |
--      sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--esac
--echo "$as_me:$LINENO: checking for mmsystem.h" >&5
--echo $ECHO_N "checking for mmsystem.h... $ECHO_C" >&6
--if test "${ac_cv_header_mmsystem_h+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
-+ac_safe=`echo "mmsystem.h" | sed 'y%./+-%__p_%'`
-+echo $ac_n "checking for mmsystem.h""... $ac_c" 1>&6
-+echo "configure:1530: checking for mmsystem.h" >&5
-+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-+  echo $ac_n "(cached) $ac_c" 1>&6
- else
--  ac_cv_header_mmsystem_h=$ac_header_preproc
-+  cat > conftest.$ac_ext <<EOF
-+#line 1535 "configure"
-+#include "confdefs.h"
-+#include <mmsystem.h>
-+EOF
-+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-+{ (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-+if test -z "$ac_err"; then
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=yes"
-+else
-+  echo "$ac_err" >&5
-+  echo "configure: failed program was:" >&5
-+  cat conftest.$ac_ext >&5
-+  rm -rf conftest*
-+  eval "ac_cv_header_$ac_safe=no"
- fi
--echo "$as_me:$LINENO: result: $ac_cv_header_mmsystem_h" >&5
--echo "${ECHO_T}$ac_cv_header_mmsystem_h" >&6
--
-+rm -f conftest*
- fi
--if test $ac_cv_header_mmsystem_h = yes; then
-+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+  echo "$ac_t""yes" 1>&6
-   AUDIODRIVER="wince"
- 	       AUDIODEFS=-DCST_AUDIO_WINCE
- 	       AUDIOLIBS=-lwinmm
-+else
-+  echo "$ac_t""no" 1>&6
- fi
- 
- 
--
--
- # Check whether --with-audio or --without-audio was given.
- if test "${with_audio+set}" = set; then
-   withval="$with_audio"
--  AUDIODRIVER=$with_audio
--fi;
-+  AUDIODRIVER=$with_audio 
-+fi
- 
-+
- if test "x$AUDIODEFS" = x; then
-     case "$AUDIODRIVER" in
- 	linux|oss)
-@@ -4006,34 +1595,34 @@
- 
- 
- 
--
- # Check whether --with-lang or --without-lang was given.
- if test "${with_lang+set}" = set; then
-   withval="$with_lang"
--  FL_LANG=$with_lang
--fi;
-+  FL_LANG=$with_lang 
-+fi
-+
- if test "x$with_lang" = "x"; then
-         FL_LANG="usenglish"
- fi
- 
- 
--
- # Check whether --with-vox or --without-vox was given.
- if test "${with_vox+set}" = set; then
-   withval="$with_vox"
--  FL_VOX=$with_vox
--fi;
-+  FL_VOX=$with_vox 
-+fi
-+
- if test "x$with_vox" = "x"; then
-         FL_VOX="cmu_us_kal"
- fi
- 
- 
--
- # Check whether --with-lex or --without-lex was given.
- if test "${with_lex+set}" = set; then
-   withval="$with_lex"
--  FL_LEX=$with_lex
--fi;
-+  FL_LEX=$with_lex 
-+fi
-+
- if test "x$with_lex" = "x"; then
-         FL_LEX="cmulex"
- fi
-@@ -4041,921 +1630,300 @@
- 
- 
- 
--                    ac_config_files="$ac_config_files config/config config/system.mak"
--cat >confcache <<\_ACEOF
-+trap '' 1 2 15
-+cat > confcache <<\EOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
--# scripts and configure runs, see configure's option --config-cache.
--# It is not useful on other systems.  If it contains results you don't
--# want to keep, you may remove or edit it.
-+# scripts and configure runs.  It is not useful on other systems.
-+# If it contains results you don't want to keep, you may remove or edit it.
- #
--# config.status only pays attention to the cache file if you give it
--# the --recheck option to rerun configure.
-+# By default, configure uses ./config.cache as the cache file,
-+# creating it if it does not exist already.  You can give configure
-+# the --cache-file=FILE option to use a different cache file; that is
-+# what configure does when it calls configure scripts in
-+# subdirectories, so they share the cache.
-+# Giving --cache-file=/dev/null disables caching, for debugging configure.
-+# config.status only pays attention to the cache file if you give it the
-+# --recheck option to rerun configure.
- #
--# `ac_cv_env_foo' variables (set or unset) will be overridden when
--# loading this file, other *unset* `ac_cv_foo' will be assigned the
--# following values.
--
--_ACEOF
--
-+EOF
- # The following way of writing the cache mishandles newlines in values,
- # but we know of no workaround that is simple, portable, and efficient.
- # So, don't put newlines in cache variables' values.
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
--{
--  (set) 2>&1 |
--    case `(ac_space=' '; set | grep ac_space) 2>&1` in
--    *ac_space=\ *)
--      # `set' does not quote correctly, so add quotes (double-quote
--      # substitution turns \\\\ into \\, and sed turns \\ into \).
--      sed -n \
--        "s/'/'\\\\''/g;
--    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
--      ;;
--    *)
--      # `set' quotes correctly as required by POSIX, so do not add quotes.
--      sed -n \
--        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
--      ;;
--    esac;
--} |
--  sed '
--     t clear
--     : clear
--     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
--     t end
--     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
--     : end' >>confcache
--if diff $cache_file confcache >/dev/null 2>&1; then :; else
-+(set) 2>&1 |
-+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-+  *ac_space=\ *)
-+    # `set' does not quote correctly, so add quotes (double-quote substitution
-+    # turns \\\\ into \\, and sed turns \\ into \).
-+    sed -n \
-+      -e "s/'/'\\\\''/g" \
-+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-+    ;;
-+  *)
-+    # `set' quotes correctly as required by POSIX, so do not add quotes.
-+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-+    ;;
-+  esac >> confcache
-+if cmp -s $cache_file confcache; then
-+  :
-+else
-   if test -w $cache_file; then
--    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
--    cat confcache >$cache_file
-+    echo "updating cache $cache_file"
-+    cat confcache > $cache_file
-   else
-     echo "not updating unwritable cache $cache_file"
-   fi
- fi
- rm -f confcache
- 
-+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-+
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix.
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- 
--# VPATH may cause trouble with some makes, so we remove $(srcdir),
--# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
--# trailing colons and then remove the whole line if VPATH becomes empty
--# (actually we leave an empty line to preserve line numbers).
-+# Any assignment to VPATH causes Sun make to only execute
-+# the first set of double-colon rules, so remove it if not needed.
-+# If there is a colon in the path, we need to keep it.
- if test "x$srcdir" = x.; then
--  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
--s/:*\$(srcdir):*/:/;
--s/:*\${srcdir}:*/:/;
--s/:*@srcdir@:*/:/;
--s/^\([^=]*=[ 	]*\):*/\1/;
--s/:*$//;
--s/^[^=]*=[ 	]*$//;
--}'
-+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
- fi
- 
-+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-+
- # Transform confdefs.h into DEFS.
- # Protect against shell expansion while executing Makefile rules.
- # Protect against Makefile macro expansion.
--#
--# If the first sed substitution is executed (which looks for macros that
--# take arguments), then we branch to the quote section.  Otherwise,
--# look for a macro that doesn't take arguments.
--cat >confdef2opt.sed <<\_ACEOF
--t clear
--: clear
--s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*([^)]*)\)[ 	]*\(.*\),-D\1=\2,g
--t quote
--s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\),-D\1=\2,g
--t quote
--d
--: quote
--s,[ 	`~#$^&*(){}\\|;'"<>?],\\&,g
--s,\[,\\&,g
--s,\],\\&,g
--s,\$,$$,g
--p
--_ACEOF
--# We use echo to avoid assuming a particular line-breaking character.
--# The extra dot is to prevent the shell from consuming trailing
--# line-breaks from the sub-command output.  A line-break within
--# single-quotes doesn't work because, if this script is created in a
--# platform that uses two characters for line-breaks (e.g., DOS), tr
--# would break.
--ac_LF_and_DOT=`echo; echo .`
--DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
--rm -f confdef2opt.sed
-+cat > conftest.defs <<\EOF
-+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-+s%\[%\\&%g
-+s%\]%\\&%g
-+s%\$%$$%g
-+EOF
-+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-+rm -f conftest.defs
- 
- 
--ac_libobjs=
--ac_ltlibobjs=
--for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
--  # 1. Remove the extension, and $U if already installed.
--  ac_i=`echo "$ac_i" |
--         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
--  # 2. Add them.
--  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
--  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
--done
--LIBOBJS=$ac_libobjs
--
--LTLIBOBJS=$ac_ltlibobjs
--
--
--
-+# Without the "./", some shells look in PATH for config.status.
- : ${CONFIG_STATUS=./config.status}
--ac_clean_files_save=$ac_clean_files
--ac_clean_files="$ac_clean_files $CONFIG_STATUS"
--{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
--echo "$as_me: creating $CONFIG_STATUS" >&6;}
--cat >$CONFIG_STATUS <<_ACEOF
--#! $SHELL
--# Generated by $as_me.
-+
-+echo creating $CONFIG_STATUS
-+rm -f $CONFIG_STATUS
-+cat > $CONFIG_STATUS <<EOF
-+#! /bin/sh
-+# Generated automatically by configure.
- # Run this file to recreate the current configuration.
-+# This directory was configured as follows,
-+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-+#
-+# $0 $ac_configure_args
-+#
- # Compiler output produced by configure, useful for debugging
--# configure, is in config.log if it exists.
-+# configure, is in ./config.log if it exists.
- 
--debug=false
--ac_cs_recheck=false
--ac_cs_silent=false
--SHELL=\${CONFIG_SHELL-$SHELL}
--_ACEOF
--
--cat >>$CONFIG_STATUS <<\_ACEOF
--## --------------------- ##
--## M4sh Initialization.  ##
--## --------------------- ##
--
--# Be Bourne compatible
--if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
--  emulate sh
--  NULLCMD=:
--  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
--  # is contrary to our usage.  Disable this feature.
--  alias -g '${1+"$@"}'='"$@"'
--elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
--  set -o posix
--fi
--
--# Support unset when possible.
--if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
--  as_unset=unset
--else
--  as_unset=false
--fi
--
--
--# Work around bugs in pre-3.0 UWIN ksh.
--$as_unset ENV MAIL MAILPATH
--PS1='$ '
--PS2='> '
--PS4='+ '
--
--# NLS nuisances.
--for as_var in \
--  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
--  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
--  LC_TELEPHONE LC_TIME
-+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-+for ac_option
- do
--  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
--    eval $as_var=C; export $as_var
--  else
--    $as_unset $as_var
--  fi
-+  case "\$ac_option" in
-+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-+    exit 0 ;;
-+  -help | --help | --hel | --he | --h)
-+    echo "\$ac_cs_usage"; exit 0 ;;
-+  *) echo "\$ac_cs_usage"; exit 1 ;;
-+  esac
- done
- 
--# Required to use basename.
--if expr a : '\(a\)' >/dev/null 2>&1; then
--  as_expr=expr
--else
--  as_expr=false
--fi
-+ac_given_srcdir=$srcdir
-+ac_given_INSTALL="$INSTALL"
- 
--if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
--  as_basename=basename
--else
--  as_basename=false
--fi
-+trap 'rm -fr `echo "config/config config/system.mak" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-+EOF
-+cat >> $CONFIG_STATUS <<EOF
- 
-+# Protect against being on the right side of a sed subst in config.status.
-+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
-+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-+$ac_vpsub
-+$extrasub
-+s%@SHELL@%$SHELL%g
-+s%@CFLAGS@%$CFLAGS%g
-+s%@CPPFLAGS@%$CPPFLAGS%g
-+s%@CXXFLAGS@%$CXXFLAGS%g
-+s%@FFLAGS@%$FFLAGS%g
-+s%@DEFS@%$DEFS%g
-+s%@LDFLAGS@%$LDFLAGS%g
-+s%@LIBS@%$LIBS%g
-+s%@exec_prefix@%$exec_prefix%g
-+s%@prefix@%$prefix%g
-+s%@program_transform_name@%$program_transform_name%g
-+s%@bindir@%$bindir%g
-+s%@sbindir@%$sbindir%g
-+s%@libexecdir@%$libexecdir%g
-+s%@datadir@%$datadir%g
-+s%@sysconfdir@%$sysconfdir%g
-+s%@sharedstatedir@%$sharedstatedir%g
-+s%@localstatedir@%$localstatedir%g
-+s%@libdir@%$libdir%g
-+s%@includedir@%$includedir%g
-+s%@oldincludedir@%$oldincludedir%g
-+s%@infodir@%$infodir%g
-+s%@mandir@%$mandir%g
-+s%@host@%$host%g
-+s%@host_alias@%$host_alias%g
-+s%@host_cpu@%$host_cpu%g
-+s%@host_vendor@%$host_vendor%g
-+s%@host_os@%$host_os%g
-+s%@target@%$target%g
-+s%@target_alias@%$target_alias%g
-+s%@target_cpu@%$target_cpu%g
-+s%@target_vendor@%$target_vendor%g
-+s%@target_os@%$target_os%g
-+s%@build@%$build%g
-+s%@build_alias@%$build_alias%g
-+s%@build_cpu@%$build_cpu%g
-+s%@build_vendor@%$build_vendor%g
-+s%@build_os@%$build_os%g
-+s%@CC@%$CC%g
-+s%@RANLIB@%$RANLIB%g
-+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-+s%@INSTALL_DATA@%$INSTALL_DATA%g
-+s%@AR@%$AR%g
-+s%@TARGET_OS@%$TARGET_OS%g
-+s%@TARGET_CPU@%$TARGET_CPU%g
-+s%@M68KCC@%$M68KCC%g
-+s%@LEXDEFS@%$LEXDEFS%g
-+s%@VOXDEFS@%$VOXDEFS%g
-+s%@HOST_OS@%$HOST_OS%g
-+s%@HOST_CPU@%$HOST_CPU%g
-+s%@OTHERLIBS@%$OTHERLIBS%g
-+s%@SHFLAGS@%$SHFLAGS%g
-+s%@MMAPTYPE@%$MMAPTYPE%g
-+s%@STDIOTYPE@%$STDIOTYPE%g
-+s%@CPP@%$CPP%g
-+s%@AUDIODRIVER@%$AUDIODRIVER%g
-+s%@AUDIODEFS@%$AUDIODEFS%g
-+s%@AUDIOLIBS@%$AUDIOLIBS%g
-+s%@FL_LANG@%$FL_LANG%g
-+s%@FL_VOX@%$FL_VOX%g
-+s%@FL_LEX@%$FL_LEX%g
-+s%@EXEEXT@%$EXEEXT%g
- 
--# Name of the executable.
--as_me=`$as_basename "$0" ||
--$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
--	 X"$0" : 'X\(//\)$' \| \
--	 X"$0" : 'X\(/\)$' \| \
--	 .     : '\(.\)' 2>/dev/null ||
--echo X/"$0" |
--    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
--  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
--  	  /^X\/\(\/\).*/{ s//\1/; q; }
--  	  s/.*/./; q'`
-+CEOF
-+EOF
- 
-+cat >> $CONFIG_STATUS <<\EOF
- 
--# PATH needs CR, and LINENO needs CR and PATH.
--# Avoid depending upon Character Ranges.
--as_cr_letters='abcdefghijklmnopqrstuvwxyz'
--as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
--as_cr_Letters=$as_cr_letters$as_cr_LETTERS
--as_cr_digits='0123456789'
--as_cr_alnum=$as_cr_Letters$as_cr_digits
--
--# The user is always right.
--if test "${PATH_SEPARATOR+set}" != set; then
--  echo "#! /bin/sh" >conf$$.sh
--  echo  "exit 0"   >>conf$$.sh
--  chmod +x conf$$.sh
--  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
--    PATH_SEPARATOR=';'
-+# Split the substitutions into bite-sized pieces for seds with
-+# small command number limits, like on Digital OSF/1 and HP-UX.
-+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-+ac_file=1 # Number of current file.
-+ac_beg=1 # First line for current file.
-+ac_end=$ac_max_sed_cmds # Line after last line for current file.
-+ac_more_lines=:
-+ac_sed_cmds=""
-+while $ac_more_lines; do
-+  if test $ac_beg -gt 1; then
-+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-   else
--    PATH_SEPARATOR=:
-+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-   fi
--  rm -f conf$$.sh
--fi
--
--
--  as_lineno_1=$LINENO
--  as_lineno_2=$LINENO
--  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
--  test "x$as_lineno_1" != "x$as_lineno_2" &&
--  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
--  # Find who we are.  Look in the path if we contain no path at all
--  # relative or not.
--  case $0 in
--    *[\\/]* ) as_myself=$0 ;;
--    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
--done
--
--       ;;
--  esac
--  # We did not find ourselves, most probably we were run as `sh COMMAND'
--  # in which case we are not to be found in the path.
--  if test "x$as_myself" = x; then
--    as_myself=$0
--  fi
--  if test ! -f "$as_myself"; then
--    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
--echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
--   { (exit 1); exit 1; }; }
--  fi
--  case $CONFIG_SHELL in
--  '')
--    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for as_base in sh bash ksh sh5; do
--	 case $as_dir in
--	 /*)
--	   if ("$as_dir/$as_base" -c '
--  as_lineno_1=$LINENO
--  as_lineno_2=$LINENO
--  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
--  test "x$as_lineno_1" != "x$as_lineno_2" &&
--  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
--	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
--	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
--	     CONFIG_SHELL=$as_dir/$as_base
--	     export CONFIG_SHELL
--	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
--	   fi;;
--	 esac
--       done
--done
--;;
--  esac
--
--  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
--  # uniformly replaced by the line number.  The first 'sed' inserts a
--  # line-number line before each line; the second 'sed' does the real
--  # work.  The second script uses 'N' to pair each line-number line
--  # with the numbered line, and appends trailing '-' during
--  # substitution so that $LINENO is not a special case at line end.
--  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
--  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
--  sed '=' <$as_myself |
--    sed '
--      N
--      s,$,-,
--      : loop
--      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
--      t loop
--      s,-$,,
--      s,^['$as_cr_digits']*\n,,
--    ' >$as_me.lineno &&
--  chmod +x $as_me.lineno ||
--    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
--echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
--   { (exit 1); exit 1; }; }
--
--  # Don't try to exec as it changes $[0], causing all sort of problems
--  # (the dirname of $[0] is not the place where we might find the
--  # original and so on.  Autoconf is especially sensible to this).
--  . ./$as_me.lineno
--  # Exit status is that of the last command.
--  exit
--}
--
--
--case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
--  *c*,-n*) ECHO_N= ECHO_C='
--' ECHO_T='	' ;;
--  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
--  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
--esac
--
--if expr a : '\(a\)' >/dev/null 2>&1; then
--  as_expr=expr
--else
--  as_expr=false
--fi
--
--rm -f conf$$ conf$$.exe conf$$.file
--echo >conf$$.file
--if ln -s conf$$.file conf$$ 2>/dev/null; then
--  # We could just check for DJGPP; but this test a) works b) is more generic
--  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
--  if test -f conf$$.exe; then
--    # Don't use ln at all; we don't have any links
--    as_ln_s='cp -p'
-+  if test ! -s conftest.s$ac_file; then
-+    ac_more_lines=false
-+    rm -f conftest.s$ac_file
-   else
--    as_ln_s='ln -s'
-+    if test -z "$ac_sed_cmds"; then
-+      ac_sed_cmds="sed -f conftest.s$ac_file"
-+    else
-+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-+    fi
-+    ac_file=`expr $ac_file + 1`
-+    ac_beg=$ac_end
-+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-   fi
--elif ln conf$$.file conf$$ 2>/dev/null; then
--  as_ln_s=ln
--else
--  as_ln_s='cp -p'
--fi
--rm -f conf$$ conf$$.exe conf$$.file
--
--if mkdir -p . 2>/dev/null; then
--  as_mkdir_p=:
--else
--  as_mkdir_p=false
--fi
--
--as_executable_p="test -f"
--
--# Sed expression to map a string onto a valid CPP name.
--as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
--
--# Sed expression to map a string onto a valid variable name.
--as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
--
--
--# IFS
--# We need space, tab and new line, in precisely that order.
--as_nl='
--'
--IFS=" 	$as_nl"
--
--# CDPATH.
--$as_unset CDPATH
--
--exec 6>&1
--
--# Open the log real soon, to keep \$[0] and so on meaningful, and to
--# report actual input values of CONFIG_FILES etc. instead of their
--# values after options handling.  Logging --version etc. is OK.
--exec 5>>config.log
--{
--  echo
--  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
--## Running $as_me. ##
--_ASBOX
--} >&5
--cat >&5 <<_CSEOF
--
--This file was extended by $as_me, which was
--generated by GNU Autoconf 2.57.  Invocation command line was
--
--  CONFIG_FILES    = $CONFIG_FILES
--  CONFIG_HEADERS  = $CONFIG_HEADERS
--  CONFIG_LINKS    = $CONFIG_LINKS
--  CONFIG_COMMANDS = $CONFIG_COMMANDS
--  $ $0 $@
--
--_CSEOF
--echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
--echo >&5
--_ACEOF
--
--# Files that config.status was made for.
--if test -n "$ac_config_files"; then
--  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
--fi
--
--if test -n "$ac_config_headers"; then
--  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
--fi
--
--if test -n "$ac_config_links"; then
--  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
--fi
--
--if test -n "$ac_config_commands"; then
--  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
--fi
--
--cat >>$CONFIG_STATUS <<\_ACEOF
--
--ac_cs_usage="\
--\`$as_me' instantiates files from templates according to the
--current configuration.
--
--Usage: $0 [OPTIONS] [FILE]...
--
--  -h, --help       print this help, then exit
--  -V, --version    print version number, then exit
--  -q, --quiet      do not print progress messages
--  -d, --debug      don't remove temporary files
--      --recheck    update $as_me by reconfiguring in the same conditions
--  --file=FILE[:TEMPLATE]
--                   instantiate the configuration file FILE
--
--Configuration files:
--$config_files
--
--Report bugs to <bug-autoconf@gnu.org>."
--_ACEOF
--
--cat >>$CONFIG_STATUS <<_ACEOF
--ac_cs_version="\\
--config.status
--configured by $0, generated by GNU Autoconf 2.57,
--  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
--
--Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
--Free Software Foundation, Inc.
--This config.status script is free software; the Free Software Foundation
--gives unlimited permission to copy, distribute and modify it."
--srcdir=$srcdir
--INSTALL="$INSTALL"
--_ACEOF
--
--cat >>$CONFIG_STATUS <<\_ACEOF
--# If no file are specified by the user, then we need to provide default
--# value.  By we need to know if files were specified by the user.
--ac_need_defaults=:
--while test $# != 0
--do
--  case $1 in
--  --*=*)
--    ac_option=`expr "x$1" : 'x\([^=]*\)='`
--    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
--    ac_shift=:
--    ;;
--  -*)
--    ac_option=$1
--    ac_optarg=$2
--    ac_shift=shift
--    ;;
--  *) # This is not an option, so the user has probably given explicit
--     # arguments.
--     ac_option=$1
--     ac_need_defaults=false;;
--  esac
--
--  case $ac_option in
--  # Handling of the options.
--_ACEOF
--cat >>$CONFIG_STATUS <<\_ACEOF
--  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
--    ac_cs_recheck=: ;;
--  --version | --vers* | -V )
--    echo "$ac_cs_version"; exit 0 ;;
--  --he | --h)
--    # Conflict between --help and --header
--    { { echo "$as_me:$LINENO: error: ambiguous option: $1
--Try \`$0 --help' for more information." >&5
--echo "$as_me: error: ambiguous option: $1
--Try \`$0 --help' for more information." >&2;}
--   { (exit 1); exit 1; }; };;
--  --help | --hel | -h )
--    echo "$ac_cs_usage"; exit 0 ;;
--  --debug | --d* | -d )
--    debug=: ;;
--  --file | --fil | --fi | --f )
--    $ac_shift
--    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
--    ac_need_defaults=false;;
--  --header | --heade | --head | --hea )
--    $ac_shift
--    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
--    ac_need_defaults=false;;
--  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
--  | -silent | --silent | --silen | --sile | --sil | --si | --s)
--    ac_cs_silent=: ;;
--
--  # This is an error.
--  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
--Try \`$0 --help' for more information." >&5
--echo "$as_me: error: unrecognized option: $1
--Try \`$0 --help' for more information." >&2;}
--   { (exit 1); exit 1; }; } ;;
--
--  *) ac_config_targets="$ac_config_targets $1" ;;
--
--  esac
--  shift
- done
--
--ac_configure_extra_args=
--
--if $ac_cs_silent; then
--  exec 6>/dev/null
--  ac_configure_extra_args="$ac_configure_extra_args --silent"
-+if test -z "$ac_sed_cmds"; then
-+  ac_sed_cmds=cat
- fi
-+EOF
- 
--_ACEOF
--cat >>$CONFIG_STATUS <<_ACEOF
--if \$ac_cs_recheck; then
--  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
--  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
--fi
-+cat >> $CONFIG_STATUS <<EOF
- 
--_ACEOF
--
--
--
--
--
--cat >>$CONFIG_STATUS <<\_ACEOF
--for ac_config_target in $ac_config_targets
--do
--  case "$ac_config_target" in
--  # Handling of arguments.
--  "config/config" ) CONFIG_FILES="$CONFIG_FILES config/config" ;;
--  "config/system.mak" ) CONFIG_FILES="$CONFIG_FILES config/system.mak" ;;
--  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
--echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
--   { (exit 1); exit 1; }; };;
-+CONFIG_FILES=\${CONFIG_FILES-"config/config config/system.mak"}
-+EOF
-+cat >> $CONFIG_STATUS <<\EOF
-+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-+  case "$ac_file" in
-+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-+  *) ac_file_in="${ac_file}.in" ;;
-   esac
--done
- 
--# If the user did not use the arguments to specify the items to instantiate,
--# then the envvar interface is used.  Set only those that are not.
--# We use the long form for the default assignment because of an extremely
--# bizarre bug on SunOS 4.1.3.
--if $ac_need_defaults; then
--  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
--fi
-+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
- 
--# Have a temporary directory for convenience.  Make it in the build tree
--# simply because there is no reason to put it here, and in addition,
--# creating and moving files from /tmp can sometimes cause problems.
--# Create a temporary directory, and hook for its removal unless debugging.
--$debug ||
--{
--  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
--  trap '{ (exit 1); exit 1; }' 1 2 13 15
--}
--
--# Create a (secure) tmp directory for tmp files.
--
--{
--  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
--  test -n "$tmp" && test -d "$tmp"
--}  ||
--{
--  tmp=./confstat$$-$RANDOM
--  (umask 077 && mkdir $tmp)
--} ||
--{
--   echo "$me: cannot create a temporary directory in ." >&2
--   { (exit 1); exit 1; }
--}
--
--_ACEOF
--
--cat >>$CONFIG_STATUS <<_ACEOF
--
--#
--# CONFIG_FILES section.
--#
--
--# No need to generate the scripts if there are no CONFIG_FILES.
--# This happens for instance when ./config.status config.h
--if test -n "\$CONFIG_FILES"; then
--  # Protect against being on the right side of a sed subst in config.status.
--  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
--   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
--s,@SHELL@,$SHELL,;t t
--s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
--s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
--s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
--s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
--s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
--s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
--s,@exec_prefix@,$exec_prefix,;t t
--s,@prefix@,$prefix,;t t
--s,@program_transform_name@,$program_transform_name,;t t
--s,@bindir@,$bindir,;t t
--s,@sbindir@,$sbindir,;t t
--s,@libexecdir@,$libexecdir,;t t
--s,@datadir@,$datadir,;t t
--s,@sysconfdir@,$sysconfdir,;t t
--s,@sharedstatedir@,$sharedstatedir,;t t
--s,@localstatedir@,$localstatedir,;t t
--s,@libdir@,$libdir,;t t
--s,@includedir@,$includedir,;t t
--s,@oldincludedir@,$oldincludedir,;t t
--s,@infodir@,$infodir,;t t
--s,@mandir@,$mandir,;t t
--s,@build_alias@,$build_alias,;t t
--s,@host_alias@,$host_alias,;t t
--s,@target_alias@,$target_alias,;t t
--s,@DEFS@,$DEFS,;t t
--s,@ECHO_C@,$ECHO_C,;t t
--s,@ECHO_N@,$ECHO_N,;t t
--s,@ECHO_T@,$ECHO_T,;t t
--s,@LIBS@,$LIBS,;t t
--s,@build@,$build,;t t
--s,@build_cpu@,$build_cpu,;t t
--s,@build_vendor@,$build_vendor,;t t
--s,@build_os@,$build_os,;t t
--s,@host@,$host,;t t
--s,@host_cpu@,$host_cpu,;t t
--s,@host_vendor@,$host_vendor,;t t
--s,@host_os@,$host_os,;t t
--s,@target@,$target,;t t
--s,@target_cpu@,$target_cpu,;t t
--s,@target_vendor@,$target_vendor,;t t
--s,@target_os@,$target_os,;t t
--s,@CC@,$CC,;t t
--s,@CFLAGS@,$CFLAGS,;t t
--s,@LDFLAGS@,$LDFLAGS,;t t
--s,@CPPFLAGS@,$CPPFLAGS,;t t
--s,@ac_ct_CC@,$ac_ct_CC,;t t
--s,@EXEEXT@,$EXEEXT,;t t
--s,@OBJEXT@,$OBJEXT,;t t
--s,@RANLIB@,$RANLIB,;t t
--s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
--s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
--s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
--s,@INSTALL_DATA@,$INSTALL_DATA,;t t
--s,@AR@,$AR,;t t
--s,@ac_ct_AR@,$ac_ct_AR,;t t
--s,@TARGET_OS@,$TARGET_OS,;t t
--s,@TARGET_CPU@,$TARGET_CPU,;t t
--s,@M68KCC@,$M68KCC,;t t
--s,@LEXDEFS@,$LEXDEFS,;t t
--s,@VOXDEFS@,$VOXDEFS,;t t
--s,@HOST_OS@,$HOST_OS,;t t
--s,@HOST_CPU@,$HOST_CPU,;t t
--s,@OTHERLIBS@,$OTHERLIBS,;t t
--s,@SHFLAGS@,$SHFLAGS,;t t
--s,@MMAPTYPE@,$MMAPTYPE,;t t
--s,@STDIOTYPE@,$STDIOTYPE,;t t
--s,@CPP@,$CPP,;t t
--s,@EGREP@,$EGREP,;t t
--s,@AUDIODRIVER@,$AUDIODRIVER,;t t
--s,@AUDIODEFS@,$AUDIODEFS,;t t
--s,@AUDIOLIBS@,$AUDIOLIBS,;t t
--s,@FL_LANG@,$FL_LANG,;t t
--s,@FL_VOX@,$FL_VOX,;t t
--s,@FL_LEX@,$FL_LEX,;t t
--s,@LIBOBJS@,$LIBOBJS,;t t
--s,@LTLIBOBJS@,$LTLIBOBJS,;t t
--CEOF
--
--_ACEOF
--
--  cat >>$CONFIG_STATUS <<\_ACEOF
--  # Split the substitutions into bite-sized pieces for seds with
--  # small command number limits, like on Digital OSF/1 and HP-UX.
--  ac_max_sed_lines=48
--  ac_sed_frag=1 # Number of current file.
--  ac_beg=1 # First line for current file.
--  ac_end=$ac_max_sed_lines # Line after last line for current file.
--  ac_more_lines=:
--  ac_sed_cmds=
--  while $ac_more_lines; do
--    if test $ac_beg -gt 1; then
--      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
--    else
--      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
--    fi
--    if test ! -s $tmp/subs.frag; then
--      ac_more_lines=false
--    else
--      # The purpose of the label and of the branching condition is to
--      # speed up the sed processing (if there are no `@' at all, there
--      # is no need to browse any of the substitutions).
--      # These are the two extra sed commands mentioned above.
--      (echo ':t
--  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
--      if test -z "$ac_sed_cmds"; then
--  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
--      else
--  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
--      fi
--      ac_sed_frag=`expr $ac_sed_frag + 1`
--      ac_beg=$ac_end
--      ac_end=`expr $ac_end + $ac_max_sed_lines`
--    fi
--  done
--  if test -z "$ac_sed_cmds"; then
--    ac_sed_cmds=cat
-+  # Remove last slash and all that follows it.  Not all systems have dirname.
-+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-+    # The file is in a subdirectory.
-+    test ! -d "$ac_dir" && mkdir "$ac_dir"
-+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-+    # A "../" for each directory in $ac_dir_suffix.
-+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-+  else
-+    ac_dir_suffix= ac_dots=
-   fi
--fi # test -n "$CONFIG_FILES"
- 
--_ACEOF
--cat >>$CONFIG_STATUS <<\_ACEOF
--for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
--  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
--  case $ac_file in
--  - | *:- | *:-:* ) # input from stdin
--        cat >$tmp/stdin
--        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
--        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
--  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
--        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
--  * )   ac_file_in=$ac_file.in ;;
-+  case "$ac_given_srcdir" in
-+  .)  srcdir=.
-+      if test -z "$ac_dots"; then top_srcdir=.
-+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-+  *) # Relative path.
-+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-   esac
- 
--  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
--  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
--$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
--         X"$ac_file" : 'X\(//\)[^/]' \| \
--         X"$ac_file" : 'X\(//\)$' \| \
--         X"$ac_file" : 'X\(/\)' \| \
--         .     : '\(.\)' 2>/dev/null ||
--echo X"$ac_file" |
--    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
--  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
--  	  /^X\(\/\/\)$/{ s//\1/; q; }
--  	  /^X\(\/\).*/{ s//\1/; q; }
--  	  s/.*/./; q'`
--  { if $as_mkdir_p; then
--    mkdir -p "$ac_dir"
--  else
--    as_dir="$ac_dir"
--    as_dirs=
--    while test ! -d "$as_dir"; do
--      as_dirs="$as_dir $as_dirs"
--      as_dir=`(dirname "$as_dir") 2>/dev/null ||
--$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
--         X"$as_dir" : 'X\(//\)[^/]' \| \
--         X"$as_dir" : 'X\(//\)$' \| \
--         X"$as_dir" : 'X\(/\)' \| \
--         .     : '\(.\)' 2>/dev/null ||
--echo X"$as_dir" |
--    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
--  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
--  	  /^X\(\/\/\)$/{ s//\1/; q; }
--  	  /^X\(\/\).*/{ s//\1/; q; }
--  	  s/.*/./; q'`
--    done
--    test ! -n "$as_dirs" || mkdir $as_dirs
--  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
--echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
--   { (exit 1); exit 1; }; }; }
-+  case "$ac_given_INSTALL" in
-+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-+  esac
- 
--  ac_builddir=.
--
--if test "$ac_dir" != .; then
--  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
--  # A "../" for each directory in $ac_dir_suffix.
--  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
--else
--  ac_dir_suffix= ac_top_builddir=
--fi
--
--case $srcdir in
--  .)  # No --srcdir option.  We are building in place.
--    ac_srcdir=.
--    if test -z "$ac_top_builddir"; then
--       ac_top_srcdir=.
--    else
--       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
--    fi ;;
--  [\\/]* | ?:[\\/]* )  # Absolute path.
--    ac_srcdir=$srcdir$ac_dir_suffix;
--    ac_top_srcdir=$srcdir ;;
--  *) # Relative path.
--    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
--    ac_top_srcdir=$ac_top_builddir$srcdir ;;
--esac
--# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
--# absolute.
--ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
--ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
--ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
--ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
--
--
--  case $INSTALL in
--  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
--  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
-+  echo creating "$ac_file"
-+  rm -f "$ac_file"
-+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-+  case "$ac_file" in
-+  *Makefile*) ac_comsub="1i\\
-+# $configure_input" ;;
-+  *) ac_comsub= ;;
-   esac
- 
--  if test x"$ac_file" != x-; then
--    { echo "$as_me:$LINENO: creating $ac_file" >&5
--echo "$as_me: creating $ac_file" >&6;}
--    rm -f "$ac_file"
--  fi
--  # Let's still pretend it is `configure' which instantiates (i.e., don't
--  # use $as_me), people would be surprised to read:
--  #    /* config.h.  Generated by config.status.  */
--  if test x"$ac_file" = x-; then
--    configure_input=
--  else
--    configure_input="$ac_file.  "
--  fi
--  configure_input=$configure_input"Generated from `echo $ac_file_in |
--                                     sed 's,.*/,,'` by configure."
-+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-+  sed -e "$ac_comsub
-+s%@configure_input@%$configure_input%g
-+s%@srcdir@%$srcdir%g
-+s%@top_srcdir@%$top_srcdir%g
-+s%@INSTALL@%$INSTALL%g
-+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-+fi; done
-+rm -f conftest.s*
- 
--  # First look for the input files in the build tree, otherwise in the
--  # src tree.
--  ac_file_inputs=`IFS=:
--    for f in $ac_file_in; do
--      case $f in
--      -) echo $tmp/stdin ;;
--      [\\/$]*)
--         # Absolute (can't be DOS-style, as IFS=:)
--         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
--echo "$as_me: error: cannot find input file: $f" >&2;}
--   { (exit 1); exit 1; }; }
--         echo $f;;
--      *) # Relative
--         if test -f "$f"; then
--           # Build tree
--           echo $f
--         elif test -f "$srcdir/$f"; then
--           # Source tree
--           echo $srcdir/$f
--         else
--           # /dev/null tree
--           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
--echo "$as_me: error: cannot find input file: $f" >&2;}
--   { (exit 1); exit 1; }; }
--         fi;;
--      esac
--    done` || { (exit 1); exit 1; }
--_ACEOF
--cat >>$CONFIG_STATUS <<_ACEOF
--  sed "$ac_vpsub
--$extrasub
--_ACEOF
--cat >>$CONFIG_STATUS <<\_ACEOF
--:t
--/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
--s,@configure_input@,$configure_input,;t t
--s,@srcdir@,$ac_srcdir,;t t
--s,@abs_srcdir@,$ac_abs_srcdir,;t t
--s,@top_srcdir@,$ac_top_srcdir,;t t
--s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
--s,@builddir@,$ac_builddir,;t t
--s,@abs_builddir@,$ac_abs_builddir,;t t
--s,@top_builddir@,$ac_top_builddir,;t t
--s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
--s,@INSTALL@,$ac_INSTALL,;t t
--" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
--  rm -f $tmp/stdin
--  if test x"$ac_file" != x-; then
--    mv $tmp/out $ac_file
--  else
--    cat $tmp/out
--    rm -f $tmp/out
--  fi
-+EOF
-+cat >> $CONFIG_STATUS <<EOF
- 
--done
--_ACEOF
-+EOF
-+cat >> $CONFIG_STATUS <<\EOF
- 
--cat >>$CONFIG_STATUS <<\_ACEOF
--
--{ (exit 0); exit 0; }
--_ACEOF
-+exit 0
-+EOF
- chmod +x $CONFIG_STATUS
--ac_clean_files=$ac_clean_files_save
-+rm -fr confdefs* $ac_clean_files
-+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
- 
--
--# configure is writing to config.log, and then calls config.status.
--# config.status does its own redirection, appending to config.log.
--# Unfortunately, on DOS this fails, as config.log is still kept open
--# by configure, so config.status won't be able to write to it; its
--# output is simply discarded.  So we exec the FD to /dev/null,
--# effectively closing config.log, so it can be properly (re)opened and
--# appended to by config.status.  When coming back to configure, we
--# need to make the FD available again.
--if test "$no_create" != yes; then
--  ac_cs_success=:
--  ac_config_status_args=
--  test "$silent" = yes &&
--    ac_config_status_args="$ac_config_status_args --quiet"
--  exec 5>/dev/null
--  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
--  exec 5>>config.log
--  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
--  # would make configure fail if this is the last instruction.
--  $ac_cs_success || { (exit 1); exit 1; }
--fi
--
-Index: configure.in
-===================================================================
---- flite-1.3-release/configure.in	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/configure.in	(.../release-1.2)	(revision 7)
-@@ -206,10 +206,10 @@
- AC_CHECK_HEADER(sys/audioio.h,
-               [AUDIODRIVER="sun"
-                AUDIODEFS=-DCST_AUDIO_SUNOS])
--dnl AC_CHECK_HEADER(sys/asoundlib.h,
--dnl              [AUDIODRIVER="alsa"
--dnl	       AUDIODEFS=-DCST_AUDIO_ALSA
--dnl               AUDIOLIBS=-lasound])
-+ AC_CHECK_HEADER(alsa/asoundlib.h,
-+              [AUDIODRIVER="alsa"
-+	       AUDIODEFS=-DCST_AUDIO_ALSA
-+               AUDIOLIBS=-lasound])
- AC_CHECK_HEADER(mmsystem.h,
- 	      [AUDIODRIVER="wince"
- 	       AUDIODEFS=-DCST_AUDIO_WINCE
-Index: src/hrg/Makefile
-===================================================================
---- flite-1.3-release/src/hrg/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/hrg/Makefile	(.../release-1.2)	(revision 7)
-@@ -39,9 +39,14 @@
- BUILD_DIRS = 
- ALL_DIRS= 
- H = 
-+include $(TOP)/config/config
- SRCS = cst_utterance.c cst_relation.c cst_item.c cst_ffeature.c \
-        cst_rel_io.c
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- FILES = Makefile $(H) $(SRCS)
- LIBNAME = flite
- 
-Index: src/utils/Makefile
-===================================================================
---- flite-1.3-release/src/utils/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/utils/Makefile	(.../release-1.2)	(revision 7)
-@@ -44,8 +44,13 @@
-        cst_tokenstream.c cst_val.c cst_features.c \
-        cst_endian.c cst_socket.c cst_val_const.c \
-        cst_val_user.c cst_args.c 
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os) $(MMAPTYPE:%=cst_mmap_%.os) \
-+        $(STDIOTYPE:%=cst_file_%.os)
-+else
- OBJS := $(SRCS:.c=.o) $(MMAPTYPE:%=cst_mmap_%.o) \
-         $(STDIOTYPE:%=cst_file_%.o)
-+endif
- FILES = Makefile $(H) $(SRCS) \
- 	cst_mmap_posix.c cst_mmap_win32.c cst_mmap_none.c \
- 	cst_file_stdio.c cst_file_wince.c cst_file_palmos.c
-Index: src/audio/au_alsa.c
-===================================================================
---- flite-1.3-release/src/audio/au_alsa.c	(.../flite-1.3-orig)	(revision 0)
-+++ flite-1.3-release/src/audio/au_alsa.c	(.../release-1.2)	(revision 7)
-@@ -0,0 +1,311 @@
-+/*************************************************************************/
-+/*                                                                       */
-+/*                  Language Technologies Institute                      */
-+/*                     Carnegie Mellon University                        */
-+/*                        Copyright (c) 2000                             */
-+/*                        All Rights Reserved.                           */
-+/*                                                                       */
-+/*  Permission is hereby granted, free of charge, to use and distribute  */
-+/*  this software and its documentation without restriction, including   */
-+/*  without limitation the rights to use, copy, modify, merge, publish,  */
-+/*  distribute, sublicense, and/or sell copies of this work, and to      */
-+/*  permit persons to whom this work is furnished to do so, subject to   */
-+/*  the following conditions:                                            */
-+/*   1. The code must retain the above copyright notice, this list of    */
-+/*      conditions and the following disclaimer.                         */
-+/*   2. Any modifications must be clearly marked as such.                */
-+/*   3. Original authors' names are not deleted.                         */
-+/*   4. The authors' names are not used to endorse or promote products   */
-+/*      derived from this software without specific prior written        */
-+/*      permission.                                                      */
-+/*                                                                       */
-+/*  CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK         */
-+/*  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      */
-+/*  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   */
-+/*  SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS 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.                                                       */
-+/*                                                                       */
-+/*********************************************************************** */
-+/*             Author:  Lukas Loehrer (                                  */
-+/*               Date:  January 2005                                     */
-+/*************************************************************************/
-+/*                                                                       */
-+/*  Native access to alsa audio devices on Linux                         */
-+/*  Tested with libasound version 1.0.10                                 */
-+/*************************************************************************/
-+
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <assert.h>
-+#include <errno.h>
-+
-+#include "cst_string.h"
-+#include "cst_wave.h"
-+#include "cst_audio.h"
-+
-+#include <alsa/asoundlib.h>
-+
-+
-+/*static char *pcm_dev_name = "hw:0,0"; */
-+static char *pcm_dev_name ="default";
-+
-+static inline void print_pcm_state(snd_pcm_t *handle, char *msg)
-+{
-+  fprintf(stderr, "PCM state at %s = %s\n", msg,
-+		  snd_pcm_state_name(snd_pcm_state(handle)));
-+}
-+
-+cst_audiodev *audio_open_alsa(int sps, int channels, cst_audiofmt fmt)
-+{
-+  cst_audiodev *ad;
-+  unsigned 	int real_rate;
-+  int err;
-+
-+  /* alsa specific stuff */
-+  snd_pcm_t *pcm_handle;          
-+  snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
-+  snd_pcm_hw_params_t *hwparams;
-+  snd_pcm_format_t format;
-+  snd_pcm_access_t access = SND_PCM_ACCESS_RW_INTERLEAVED;
-+
-+  /* Allocate the snd_pcm_hw_params_t structure on the stack. */
-+  snd_pcm_hw_params_alloca(&hwparams);
-+
-+  /* Open pcm device */
-+  err = snd_pcm_open(&pcm_handle, pcm_dev_name, stream, 0);
-+  if (err < 0) 
-+  {
-+	cst_errmsg("audio_open_alsa: failed to open audio device %s. %s\n",
-+			   pcm_dev_name, snd_strerror(err));
-+	return NULL;
-+  }
-+
-+  /* Init hwparams with full configuration space */
-+  err = snd_pcm_hw_params_any(pcm_handle, hwparams);
-+  if (err < 0) 
-+  {
-+	snd_pcm_close(pcm_handle);
-+	cst_errmsg("audio_open_alsa: failed to get hardware parameters from audio device. %s\n", snd_strerror(err));
-+	return NULL;
-+  }
-+
-+  /* Set access mode */
-+  err = snd_pcm_hw_params_set_access(pcm_handle, hwparams, access);
-+  if (err < 0) 
-+  {
-+	snd_pcm_close(pcm_handle);
-+	cst_errmsg("audio_open_alsa: failed to set access mode. %s.\n", snd_strerror(err));
-+	return NULL;
-+  }
-+
-+  /* Determine matching alsa sample format */
-+  /* This could be implemented in a more */
-+  /* flexible way (byte order conversion). */
-+  switch (fmt)
-+  {
-+  case CST_AUDIO_LINEAR16:
-+	if (CST_LITTLE_ENDIAN)
-+	  format = SND_PCM_FORMAT_S16_LE;
-+	else
-+	  format = SND_PCM_FORMAT_S16_BE;
-+	break;
-+  case CST_AUDIO_LINEAR8:
-+	format = SND_PCM_FORMAT_U8;
-+	break;
-+  case CST_AUDIO_MULAW:
-+	format = SND_PCM_FORMAT_MU_LAW;
-+	break;
-+  default:
-+	snd_pcm_close(pcm_handle);
-+	cst_errmsg("audio_open_alsa: failed to find suitable format.\n");
-+	return NULL;
-+	break;
-+  }
-+
-+  /* Set samble format */
-+  err = snd_pcm_hw_params_set_format(pcm_handle, hwparams, format);
-+  if (err <0) 
-+  {
-+	snd_pcm_close(pcm_handle);
-+	cst_errmsg("audio_open_alsa: failed to set format. %s.\n", snd_strerror(err));
-+	return NULL;
-+  }
-+
-+  /* Set sample rate near the disired rate */
-+  real_rate = sps;
-+  err = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &real_rate, 0);
-+  if (err < 0)   
-+  {
-+	snd_pcm_close(pcm_handle);
-+	cst_errmsg("audio_open_alsa: failed to set sample rate near %d. %s.\n", sps, snd_strerror(err));
-+	return NULL;
-+  }
-+  /*FIXME:  This is probably too strict */
-+  assert(sps == real_rate);
-+
-+  /* Set number of channels */
-+  assert(channels >0);
-+  err = snd_pcm_hw_params_set_channels(pcm_handle, hwparams, channels);
-+  if (err < 0) 
-+  {
-+	snd_pcm_close(pcm_handle);
-+	cst_errmsg("audio_open_alsa: failed to set number of channels to %d. %s.\n", channels, snd_strerror(err));
-+	return NULL;
-+  }
-+
-+  /* Commit hardware parameters */
-+  err = snd_pcm_hw_params(pcm_handle, hwparams);
-+  if (err < 0) 
-+  {
-+	snd_pcm_close(pcm_handle);
-+	cst_errmsg("audio_open_alsa: failed to set hw parameters. %s.\n", snd_strerror(err));
-+	return NULL;
-+  }
-+
-+  /* Make sure the device is ready to accept data */
-+  assert(snd_pcm_state(pcm_handle) == SND_PCM_STATE_PREPARED);
-+
-+  /* Write hardware parameters to flite audio device data structure */
-+  ad = cst_alloc(cst_audiodev, 1);
-+  assert(ad != NULL);
-+  ad->real_sps = ad->sps = sps;
-+  ad->real_channels = ad->channels = channels;
-+  ad->real_fmt = ad->fmt = fmt;
-+  ad->platform_data = (void *) pcm_handle;
-+
-+  return ad;
-+}
-+
-+int audio_close_alsa(cst_audiodev *ad)
-+{
-+  int result;
-+  snd_pcm_t *pcm_handle;
-+
-+  if (ad == NULL)
-+	return 0;
-+
-+  pcm_handle = (snd_pcm_t *) ad->platform_data;
-+  result = snd_pcm_close(pcm_handle);
-+  if (result < 0)
-+  {
-+	cst_errmsg("audio_close_alsa: Error: %s.\n", snd_strerror(result));
-+  }
-+  cst_free(ad);
-+  return result;
-+}
-+
-+/* Returns zero if recovery was successful. */
-+static int recover_from_error(snd_pcm_t *pcm_handle, ssize_t res)
-+{
-+  if (res == -EPIPE) /* xrun */
-+  {
-+	res = snd_pcm_prepare(pcm_handle);
-+	if (res < 0) 
-+	{
-+	  /* Failed to recover from xrun */
-+	  cst_errmsg("recover_from_write_error: failed to recover from xrun. %s\n.", snd_strerror(res));
-+	  return res;
-+	}
-+  } 
-+  else if (res == -ESTRPIPE) /* Suspend */
-+  {
-+	while ((res = snd_pcm_resume(pcm_handle)) == -EAGAIN) 
-+	{
-+	  snd_pcm_wait(pcm_handle, 1000);
-+	}
-+	if (res < 0) 
-+	{
-+	  res = snd_pcm_prepare(pcm_handle);
-+	  if (res <0) 
-+	  {
-+		/* Resume failed */
-+		cst_errmsg("audio_recover_from_write_error: failed to resume after suspend. %s\n.", snd_strerror(res));
-+		return res;
-+	  }
-+	}
-+  } 
-+  else if (res < 0) 
-+  {
-+	/* Unknown failure */
-+	cst_errmsg("audio_recover_from_write_error: %s.\n", snd_strerror(res));
-+	return res;
-+  }
-+  return 0;
-+}
-+
-+int audio_write_alsa(cst_audiodev *ad, void *samples, int num_bytes)
-+{
-+  size_t frame_size;
-+  ssize_t num_frames, res;
-+  snd_pcm_t *pcm_handle;
-+  char *buf = (char *) samples;
-+
-+  /* Determine frame size in bytes */
-+  frame_size  = audio_bps(ad->real_fmt) * ad->real_channels;
-+  /* Require that only complete frames are handed in */
-+  assert((num_bytes % frame_size) == 0);
-+  num_frames = num_bytes / frame_size;
-+  pcm_handle = (snd_pcm_t *) ad->platform_data;
-+
-+  while (num_frames > 0) 
-+  {
-+	res = snd_pcm_writei(pcm_handle, buf, num_frames);
-+	if (res != num_frames) 
-+	{
-+	  if (res == -EAGAIN || (res > 0 && res < num_frames)) 
-+	  {
-+		snd_pcm_wait(pcm_handle, 100);
-+	  }
-+	  else if (recover_from_error(pcm_handle, res) < 0) 
-+	  {
-+		return -1;
-+	  }
-+	}
-+
-+	if (res >0) 
-+	{
-+	  num_frames -= res;
-+	  buf += res * frame_size;
-+	}
-+  }
-+  return num_bytes;
-+}
-+
-+int audio_flush_alsa(cst_audiodev *ad)
-+{
-+  int result;
-+  result = snd_pcm_drain((snd_pcm_t *) ad->platform_data);
-+  if (result < 0)
-+  {
-+	cst_errmsg("audio_flush_alsa: Error: %s.\n", snd_strerror(result));
-+  }
-+	/* Prepare device for more data */
-+  result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data);
-+if (result < 0)
-+  {
-+	cst_errmsg("audio_flush_alsa: Error: %s.\n", snd_strerror(result));
-+  }
-+  return result;
-+}
-+
-+int audio_drain_alsa(cst_audiodev *ad)
-+{
-+  int result;
-+  result = snd_pcm_drop((snd_pcm_t *) ad->platform_data);
-+  if (result < 0)
-+  {
-+	cst_errmsg("audio_drain_alsa: Error: %s.\n", snd_strerror(result));
-+  }
-+/* Prepare device for more data */
-+  result = snd_pcm_prepare((snd_pcm_t *) ad->platform_data);
-+if (result < 0)
-+  {
-+	cst_errmsg("audio_drain_alsa: Error: %s.\n", snd_strerror(result));
-+  }
-+  return result;
-+}
-Index: src/audio/Makefile
-===================================================================
---- flite-1.3-release/src/audio/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/audio/Makefile	(.../release-1.2)	(revision 7)
-@@ -43,9 +43,13 @@
- 
- BASESRCS = auclient.c auserver.c audio.c 
- SRCS = $(BASESRCS) $(AUDIODRIVER:%=au_%.c)
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- FILES = Makefile $(H) $(BASESRCS) au_command.c au_none.c \
--	au_oss.c au_sun.c au_wince.c au_palmos.c
-+	au_oss.c au_sun.c au_wince.c au_palmos.c au_alsa.c
- LIBNAME = flite
- 
- LOCAL_INCLUDES = -I. $(AUDIODEFS)
-Index: src/lexicon/Makefile
-===================================================================
---- flite-1.3-release/src/lexicon/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/lexicon/Makefile	(.../release-1.2)	(revision 7)
-@@ -38,8 +38,13 @@
- DIRNAME=src/lexicon
- BUILD_DIRS = 
- ALL_DIRS= 
-+include $(TOP)/config/config
- SRCS = cst_lexicon.c cst_lts.c cst_lts_rewrites.c
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- FILES = Makefile $(SRCS)
- LIBNAME = flite
- 
-Index: src/synth/Makefile
-===================================================================
---- flite-1.3-release/src/synth/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/synth/Makefile	(.../release-1.2)	(revision 7)
-@@ -38,9 +38,14 @@
- DIRNAME=src/synth
- BUILD_DIRS = 
- ALL_DIRS= 
-+include $(TOP)/config/config
- SRCS = cst_synth.c cst_utt_utils.c cst_voice.c cst_phoneset.c \
-        flite.c 
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- FILES = Makefile $(SRCS)
- LIBNAME = flite
- 
-Index: src/speech/Makefile
-===================================================================
---- flite-1.3-release/src/speech/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/speech/Makefile	(.../release-1.2)	(revision 7)
-@@ -39,9 +39,14 @@
- BUILD_DIRS = 
- ALL_DIRS= 
- H = 
-+include $(TOP)/config/config
- SRCS = cst_wave.c cst_wave_io.c cst_track.c cst_track_io.c \
-        cst_wave_utils.c cst_lpcres.c rateconv.c
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- FILES = Makefile $(H) $(SRCS)
- LIBNAME = flite
- 
-Index: src/wavesynth/Makefile
-===================================================================
---- flite-1.3-release/src/wavesynth/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/wavesynth/Makefile	(.../release-1.2)	(revision 7)
-@@ -38,9 +38,14 @@
- DIRNAME=src/wavesynth
- BUILD_DIRS = 
- ALL_DIRS=
-+include $(TOP)/config/config
- SRCS = cst_units.c cst_sigpr.c cst_clunits.c cst_diphone.c \
-        cst_sigprFP.c cst_sts.c cst_reflpc.c
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- LIBNAME = flite
- FILES = Makefile $(SRCS)
- 
-Index: src/regex/Makefile
-===================================================================
---- flite-1.3-release/src/regex/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/regex/Makefile	(.../release-1.2)	(revision 7)
-@@ -42,8 +42,13 @@
- DIRNAME=src/regex
- BUILD_DIRS = 
- ALL_DIRS= 
-+include $(TOP)/config/config
- SRCS = cst_regex.c regexp.c regsub.c
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- FILES = Makefile $(H) $(SRCS)
- LIBNAME = flite
- 
-Index: src/stats/Makefile
-===================================================================
---- flite-1.3-release/src/stats/Makefile	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/src/stats/Makefile	(.../release-1.2)	(revision 7)
-@@ -39,8 +39,13 @@
- BUILD_DIRS = 
- ALL_DIRS= 
- H = 
-+include $(TOP)/config/config
- SRCS = cst_cart.c cst_viterbi.c cst_ss.c
--OBJS = $(SRCS:.c=.o)
-+ifdef SHFLAGS
-+OBJS := $(SRCS:.c=.os)
-+else
-+OBJS := $(SRCS:.c=.o)
-+endif
- FILES = Makefile $(H) $(SRCS)
- LIBNAME = flite
- 
-Index: config/common_make_rules
-===================================================================
---- flite-1.3-release/config/common_make_rules	(.../flite-1.3-orig)	(revision 7)
-+++ flite-1.3-release/config/common_make_rules	(.../release-1.2)	(revision 7)
-@@ -73,12 +73,13 @@
- ifdef SHFLAGS
- SOOBJS = $(OBJS:.o=.os)
- FULLSHOBJS = $(SOOBJS:%=$(OBJDIR)/%)
--ifdef LIBNAME
--ALL += $(OBJDIR)/.build_so
-+#ifdef LIBNAME
-+#ALL += $(OBJDIR)/.build_so
-+#endif
- endif
--endif
- ifdef LIBNAME
- ALL += $(OBJDIR)/.build_lib
-+ALL += $(OBJDIR)/.build_so
- endif
- # Only do some directories when you are not cross compiling
- ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
-@@ -117,14 +118,17 @@
- 	@ touch $(OBJDIR)/.build_so
- 
- # Used in the lib/ directory and in building new voices
--$(OBJDIR)/%.so: %.shared.a
-+#$(OBJDIR)/%.so: %.shared.a
-+%.so: %.shared.a
- 	@ echo making $@
- 	@ rm -rf shared_os && mkdir shared_os
- 	@ rm -f $@ $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} 
- 	@ (cd shared_os && ar x ../$<)
- 	@ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os)
--	@ ln -s $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION}
--	@ ln -s $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} $(LIBDIR)/$@
-+	#@ ln -s $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION}
-+	#@ ln -s $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} $(LIBDIR)/$@
-+	@ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
-+	@ ln -s $@.${PROJECT_SHLIB_VERSION} $@
- 	@ rm -rf shared_os
- 
- $(OBJDIR)/.make_build_dirs:
-Index: lib/Makefile
-===================================================================
---- flite-1.3-release/lib/Makefile	(.../flite-1.3-orig)	(revision 0)
-+++ flite-1.3-release/lib/Makefile	(.../release-1.2)	(revision 7)
-@@ -0,0 +1,70 @@
-+###########################################################################
-+##                                                                       ##
-+##                  Language Technologies Institute                      ##
-+##                     Carnegie Mellon University                        ##
-+##                        Copyright (c) 1999                             ##
-+##                        All Rights Reserved.                           ##
-+##                                                                       ##
-+##  Permission is hereby granted, free of charge, to use and distribute  ##
-+##  this software and its documentation without restriction, including   ##
-+##  without limitation the rights to use, copy, modify, merge, publish,  ##
-+##  distribute, sublicense, and/or sell copies of this work, and to      ##
-+##  permit persons to whom this work is furnished to do so, subject to   ##
-+##  the following conditions:                                            ##
-+##   1. The code must retain the above copyright notice, this list of    ##
-+##      conditions and the following disclaimer.                         ##
-+##   2. Any modifications must be clearly marked as such.                ##
-+##   3. Original authors' names are not deleted.                         ##
-+##   4. The authors' names are not used to endorse or promote products   ##
-+##      derived from this software without specific prior written        ##
-+##      permission.                                                      ##
-+##                                                                       ##
-+##  CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK         ##
-+##  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ##
-+##  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ##
-+##  SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS 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.                                                       ##
-+##                                                                       ##
-+###########################################################################
-+##                                                                       ##
-+##    FLITE libraries                                                    ##
-+##                                                                       ##
-+###########################################################################
-+TOP=..
-+DIRNAME=lib
-+BUILD_DIRS = 
-+ALL_DIRS=
-+FILES = Makefile
-+LIBNAMES = flite flite_cmulex flite_usenglish \
-+           flite_cmu_us_kal flite_cmu_us_kal16 flite_cmu_time_awb
-+
-+STATICLIBS= $(LIBNAMES:%=lib%.a)
-+SHAREDARLIBS= $(LIBNAMES:%=lib%.shared.a)
-+#SHAREDLIBS = $(LIBNAMES:%=lib%.so)
-+SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so)
-+VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \
-+                    $(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION})
-+ALL_LIBS = $(STATICLIBS) $(SHAREDLIBS) $(VERSIONSHAREDLIBS)
-+
-+ALL = shared_libs
-+
-+LOCAL_CLEAN=*.a *.so *.so.${PROJECT_VERSION} *.so.${PROJECT_SHLIB_VERSION}
-+
-+include $(TOP)/config/common_make_rules
-+
-+ifdef SHFLAGS
-+shared_libs: $(SHAREDLIBS)
-+else
-+shared_libs: nothing
-+endif
-+
-+install:
-+	@ cp -vf $(LIBDIR)/* .
-+	@ $(MAKE) shared_libs
-+	@ echo ARLIBS: $(SHAREDARLIBS)
-+	@ echo SHARLIBS: $(SHAREDLIBS)
-+	@ tar cvf - $(ALL_LIBS) | ( cd $(INSTALLLIBDIR) && tar xf -)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb
index 619d142..ec9e04b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb
@@ -2,7 +2,10 @@
 
 DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
 
-inherit binconfig lib_package gtk-icon-cache mime
+inherit distro_features_check binconfig lib_package gtk-icon-cache mime
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI += "file://0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch"
 
 EXTRA_OECMAKE = " \
     -DOPTION_BUILD_SHARED_LIBS=ON \
@@ -15,6 +18,7 @@
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
 
 PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF,"
+PACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo"
 PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
 PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
 PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes"
@@ -31,4 +35,12 @@
 
 LEAD_SONAME = "libfltk.so"
 
-FILES_${PN} += "${datadir}/mime"
+# .desktop / icons / mime only necessary for fluid app
+FILES_${PN}-bin += " \
+    ${datadir}/applications \
+    ${datadir}/icons \
+    ${datadir}/mime \
+"
+
+# cmake files
+FILES_${PN}-dev += "${datadir}/fltk"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch
new file mode 100644
index 0000000..1f2f8ae
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch
@@ -0,0 +1,41 @@
+From bc38fb41044503c9debf5710910c51dd29674b6a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Fri, 15 Dec 2017 22:14:01 +0100
+Subject: [PATCH] CMake build: Force shared libs with unsuffixed names
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For windows build sake CMake complains when a project wants to build shared and
+static libraries with same name. This caused the authors of fltk to generate
+libraries with names suffixed by '_SHARED' when building fltk with cmake -
+autotools builds do not suffix.
+
+Reasons to build shared libs with correct names:
+
+* Shared libraries are the preferred choice for embedded devices
+* There are projects (e.g yoshimi) expecting shared libraries with unsuffixed
+  names - as created by autotools build. These projects link against static
+  libraries by accident causing unusable binaries.
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ CMake/macros.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMake/macros.cmake b/CMake/macros.cmake
+index 4def62d..ab675f0 100644
+--- a/CMake/macros.cmake
++++ b/CMake/macros.cmake
+@@ -49,7 +49,7 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
+ 	    PROPERTIES
+ 	    VERSION ${FLTK_VERSION_FULL}
+ 	    SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
+-	    PREFIX "lib"    # for MSVC static/shared coexistence
++	    OUTPUT_NAME ${LIBNAME} CLEAN_DIRECT_OUTPUT 1
+ 	    )
+     endif (${LIBTYPE} STREQUAL "SHARED")
+ 
+-- 
+2.9.5
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-FindGStreamer_1_0-fix-build-failure-for-new-gstreame.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-FindGStreamer_1_0-fix-build-failure-for-new-gstreame.patch
deleted file mode 100644
index d5f6485..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-FindGStreamer_1_0-fix-build-failure-for-new-gstreame.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From bea27fd919b64ee8d97996409e279e1e83d13594 Mon Sep 17 00:00:00 2001
-From: Jean-Louis Dupond <jean-louis@dupond.be>
-Date: Sun, 4 Oct 2015 18:17:33 +0200
-Subject: [PATCH] FindGStreamer_1_0: fix build failure for new gstreamer
- versions
-
----
- cmake/FindGStreamer_1_0.cmake | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/cmake/FindGStreamer_1_0.cmake b/cmake/FindGStreamer_1_0.cmake
-index f7bf990..3aa8fc6 100644
---- a/cmake/FindGStreamer_1_0.cmake
-+++ b/cmake/FindGStreamer_1_0.cmake
-@@ -53,17 +53,17 @@ set(GSTREAMER_1_0_MINIMUM_VERSION 1.0.5)
- # Helper macro to find a Gstreamer plugin (or Gstreamer itself)
- #   _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_1_0_AUDIO")
- #   _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
--#   _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
- #   _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
--macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
-+macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library)
-     # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
--    pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
- 
--    find_path(${_component_prefix}_INCLUDE_DIRS
--        NAMES ${_header}
--        HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
--        PATH_SUFFIXES gstreamer-1.0
--    )
-+    string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
-+    if ("${CMAKE_MATCH_2}" STREQUAL "")
-+        pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GStreamer_FIND_VERSION}")
-+    else ()
-+        pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
-+    endif ()
-+    set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS})
- 
-     find_library(${_component_prefix}_LIBRARIES
-         NAMES ${_library} gstreamer_android
-@@ -78,8 +78,8 @@ endmacro()
- # 1.1. Find headers and libraries
- set(GLIB_ROOT_DIR ${GSTREAMER_1_0_ROOT_DIR})
- find_package(Glib REQUIRED)
--FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0 gstreamer-1.0 gst/gst.h gstreamer-1.0)
--FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)
-+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0 gstreamer-1.0 gstreamer-1.0)
-+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_BASE gstreamer-base-1.0 gstbase-1.0)
- 
- # 1.2. Check Gstreamer version
- if (GSTREAMER_1_0_INCLUDE_DIRS)
-@@ -110,11 +110,11 @@ endif ()
- # 2. Find Gstreamer plugins
- # -------------------------
- 
--FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
--FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
--FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
--FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
--FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
-+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_APP gstreamer-app-1.0 gstapp-1.0)
-+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_AUDIO gstreamer-audio-1.0 gstaudio-1.0)
-+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_FFT gstreamer-fft-1.0 gstfft-1.0)
-+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_PBUTILS gstreamer-pbutils-1.0 gstpbutils-1.0)
-+FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_VIDEO gstreamer-video-1.0 gstvideo-1.0)
- 
- # ------------------------------------------------
- # 3. Process the COMPONENTS passed to FIND_PACKAGE
--- 
-2.6.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-gstreamer-1.0-detection.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-gstreamer-1.0-detection.patch
new file mode 100644
index 0000000..a567cba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-gstreamer-1.0-detection.patch
@@ -0,0 +1,27 @@
+From 368989526c32cdf9d680a397fede3cb773fa2609 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 28 Jul 2017 16:31:41 -0400
+Subject: [PATCH] Fix gstreamer-1.0 detection
+
+Upstream State: Backport
+
+---
+ cmake/FindGStreamer_1_0.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/FindGStreamer_1_0.cmake b/cmake/FindGStreamer_1_0.cmake
+index 3aa8fc6..6fbc0ec 100644
+--- a/cmake/FindGStreamer_1_0.cmake
++++ b/cmake/FindGStreamer_1_0.cmake
+@@ -59,7 +59,7 @@ macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library)
+ 
+     string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
+     if ("${CMAKE_MATCH_2}" STREQUAL "")
+-        pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GStreamer_FIND_VERSION}")
++        pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GSTREAMER_1_0_MINIMUM_VERSION}")
+     else ()
+         pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
+     endif ()
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0003-add-missing-define.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0003-add-missing-define.patch
deleted file mode 100644
index 220edef..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0003-add-missing-define.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-libwinpr/comm_seria: fix missing define
-
-FreeRDP uses CMSPAR, which is defined by glibc in bits/termios.h .
-
-glibc has two flavours of bits/termios.h: a genmeric one and an
-architecture-specific one. When installing, glibc will install the
-architecture-specific file if it exists, otherwise it installs the
-generic file. Only Alpha, MIPS, PPC and Sparc have their own
-bits/termios.h.
-
-The generic bits/termios.h, as well as the Alpha, PPC and Sparc flavours
-do define CMSPAR. However, the MIPS flavour does not define it.
-
-Define CMSPAR to the value from the generic value, which is also the
-value known to the Linux kernel for MIPS.
-
-Fixes:
-    http://autobuild.buildroot.org/results/0b4/0b4793f0bf9f4c57933897f3480054a4e06528ad/
-    http://autobuild.buildroot.org/results/7a2/7a2284d0a2987158fa2e78f789b07c8c6fcdb974/
-    http://autobuild.buildroot.org/results/387/3874088c3ccd4bbf76ea0c911ca1ef64c7dc9d1c/
-    ...
-
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Cc: Peter Korsgaard <jacmet@uclibc.org>
-Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-diff -durN freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16.orig/winpr/libwinpr/comm/comm_serial_sys.c freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16/winpr/libwinpr/comm/comm_serial_sys.c
---- freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16.orig/winpr/libwinpr/comm/comm_serial_sys.c	2015-09-04 16:20:17.000000000 +0100
-+++ freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16/winpr/libwinpr/comm/comm_serial_sys.c	2015-10-04 11:07:41.868513726 +0100
-@@ -27,6 +27,14 @@
- #include <fcntl.h>
- #include <sys/ioctl.h>
- #include <termios.h>
-+
-+/* glibc for MIPS has its own bits/termios.h which does not define
-+ * CMSPAR, so we vampirise the value from the generic bits/termios.h
-+ */
-+#ifndef CMSPAR
-+#define CMSPAR 010000000000
-+#endif
-+
- #include <unistd.h>
- 
- #include "comm_serial_sys.h"
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/winpr-makecert-Build-with-install-RPATH.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/winpr-makecert-Build-with-install-RPATH.patch
index d279d6d..0d7dcc2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/winpr-makecert-Build-with-install-RPATH.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/winpr-makecert-Build-with-install-RPATH.patch
@@ -1,31 +1,31 @@
-From 253eafc8c8da83fc2b1a99a9e43824efc6105c7a Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@iot.bzh>
-Date: Sun, 4 Oct 2015 10:44:49 +0200
 Subject: [PATCH] winpr-makecert: Build with install RPATH
 
 As we are installing "winpr-makecert" manually, we do want
 to refer to the library in DESTDIR, not the one resting in
 the build tree.
 
-Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
----
- winpr/tools/makecert/cli/CMakeLists.txt | 4 ++++
- 1 file changed, 4 insertions(+)
+Update it for 2.0.0.
 
-diff --git a/winpr/tools/makecert/cli/CMakeLists.txt b/winpr/tools/makecert/cli/CMakeLists.txt
-index 17954c4..90c446b 100644
---- a/winpr/tools/makecert/cli/CMakeLists.txt
-+++ b/winpr/tools/makecert/cli/CMakeLists.txt
-@@ -45,5 +45,9 @@ set(${MODULE_PREFIX}_LIBS winpr-makecert-tool)
+Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ winpr/tools/makecert-cli/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/winpr/tools/makecert-cli/CMakeLists.txt b/winpr/tools/makecert-cli/CMakeLists.txt
+index 74afa09..8d00ef1 100644
+--- a/winpr/tools/makecert-cli/CMakeLists.txt
++++ b/winpr/tools/makecert-cli/CMakeLists.txt
+@@ -44,6 +44,9 @@ set(${MODULE_PREFIX}_LIBS winpr-tools)
  
  target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
  
-+set_target_properties(${MODULE_NAME} PROPERTIES 
-+	BUILD_WITH_INSTALL_RPATH 1)
++set_target_properties(${MODULE_NAME} PROPERTIES
++       BUILD_WITH_INSTALL_RPATH 1)
 +
  set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools")
  
-+
+ install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tools EXPORT WinPRTargets)
 -- 
-1.8.3.1
+2.7.4
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_git.bb
index f0aa1b6..88aec9c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_git.bb
@@ -10,14 +10,13 @@
 
 inherit pkgconfig cmake gitpkgv
 
-PV = "1.2.5+gitr${SRCPV}"
+PV = "2.0.0+gitr${SRCPV}"
 PKGV = "${GITPKGVTAG}"
 
-SRCREV = "62da9d28c674814c81c245c1c7882eb0da7be76b"
+SRCREV = "1648deb435ad52206f7aa2afe4b4dff71d9329bc"
 SRC_URI = "git://github.com/FreeRDP/FreeRDP.git \
     file://winpr-makecert-Build-with-install-RPATH.patch \
-    file://0001-FindGStreamer_1_0-fix-build-failure-for-new-gstreame.patch \
-    file://0003-add-missing-define.patch \
+    file://0001-Fix-gstreamer-1.0-detection.patch \
 "
 
 S = "${WORKDIR}/git"
@@ -57,7 +56,7 @@
 # we will need winpr-makecert to generate TLS certificates
 do_install_append () {
     install -d ${D}${bindir}
-    install -m755 winpr/tools/makecert/cli/winpr-makecert ${D}${bindir}
+    install -m755 winpr/tools/makecert-cli/winpr-makecert ${D}${bindir}
     rm -rf ${D}${libdir}/cmake
     rm -rf ${D}${libdir}/freerdp
 }
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gd/gd_2.2.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/gd/gd_2.2.4.bb
deleted file mode 100644
index 4932bb7..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gd/gd_2.2.4.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "gd is a library used to create PNG, JPEG, or WBMP images"
-DESCRIPTION = "The gd graphics library allows your code to quickly draw images \
-complete with lines, arcs, text, multiple colors, cut and paste from other \
-images, and flood fills, and to write out the result as a PNG or JPEG file. \
-This is particularly useful in Web applications, where PNG and JPEG are two \
-of the formats accepted for inline images by most browsers. Note that gd is not \
-a paint program."
-HOMEPAGE = "http://libgd.bitbucket.org/"
-
-SECTION = "libs"
-LICENSE = "GD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=07384b3aa2e0d39afca0d6c40286f545"
-
-DEPENDS = "freetype libpng jpeg zlib tiff"
-
-SRC_URI = "git://github.com/libgd/libgd.git;branch=GD-2.2 \
-          "
-
-SRCREV = "de09874b15a4c88772db35ced842330f5de23e76"
-
-S = "${WORKDIR}/git"
-
-inherit autotools binconfig gettext pkgconfig
-
-EXTRA_OECONF += " --disable-rpath \
-                  --with-jpeg=${STAGING_LIBDIR}/.. \
-                  --with-freetype=yes \
-                  --without-fontconfig \
-                  --without-webp \
-                  --without-xpm \
-                  --without-x \
-                "
-
-EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"'
-
-do_install_append() {
-    # cleanup buildpaths from gdlib.pc
-    sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc
-}
-
-PACKAGES += "${PN}-tools"
-
-FILES_${PN} = "${libdir}/lib*${SOLIBS}"
-FILES_${PN}-tools = "${bindir}/*"
-
-PROVIDES += "${PN}-tools"
-RPROVIDES_${PN}-tools = "${PN}-tools"
-RDEPENDS_${PN}-tools = "perl perl-module-strict"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gd/gd_2.2.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/gd/gd_2.2.5.bb
new file mode 100644
index 0000000..63d9acf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gd/gd_2.2.5.bb
@@ -0,0 +1,48 @@
+SUMMARY = "gd is a library used to create PNG, JPEG, or WBMP images"
+DESCRIPTION = "The gd graphics library allows your code to quickly draw images \
+complete with lines, arcs, text, multiple colors, cut and paste from other \
+images, and flood fills, and to write out the result as a PNG or JPEG file. \
+This is particularly useful in Web applications, where PNG and JPEG are two \
+of the formats accepted for inline images by most browsers. Note that gd is not \
+a paint program."
+HOMEPAGE = "http://libgd.bitbucket.org/"
+
+SECTION = "libs"
+LICENSE = "GD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=07384b3aa2e0d39afca0d6c40286f545"
+
+DEPENDS = "freetype libpng jpeg zlib tiff"
+
+SRC_URI = "git://github.com/libgd/libgd.git;branch=GD-2.2 \
+          "
+
+SRCREV = "8255231b68889597d04d451a72438ab92a405aba"
+
+S = "${WORKDIR}/git"
+
+inherit autotools binconfig gettext pkgconfig
+
+EXTRA_OECONF += " --disable-rpath \
+                  --with-jpeg=${STAGING_LIBDIR}/.. \
+                  --with-freetype=yes \
+                  --without-fontconfig \
+                  --without-webp \
+                  --without-xpm \
+                  --without-x \
+                "
+
+EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"'
+
+do_install_append() {
+    # cleanup buildpaths from gdlib.pc
+    sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc
+}
+
+PACKAGES += "${PN}-tools"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS}"
+FILES_${PN}-tools = "${bindir}/*"
+
+PROVIDES += "${PN}-tools"
+RPROVIDES_${PN}-tools = "${PN}-tools"
+RDEPENDS_${PN}-tools = "perl perl-module-strict"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gflags/gflags_2.2.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/gflags/gflags_2.2.0.bb
index 0e85b3f..28b652a 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gflags/gflags_2.2.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gflags/gflags_2.2.0.bb
@@ -19,3 +19,5 @@
 PACKAGES =+ "${PN}-bash-completion"
 FILES_${PN}-bash-completion += "${bindir}/gflags_completions.sh"
 RDEPENDS_${PN}-bash-completion = "bash bash-completion"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2017-08-20.18.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2017-08-20.18.bb
index b505ac1..b72ffa9 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2017-08-20.18.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2017-08-20.18.bb
@@ -29,8 +29,8 @@
 do_compile[noexec] = "1"
 do_package[noexec] = "1"
 do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
+deltask package_write_ipk
+deltask package_write_deb
+deltask package_write_rpm
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch
index e582c0d..2fd21c2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch
@@ -1,4 +1,4 @@
-From ea9f64eb2cdf3be6c4dc65fa1472d854616e43ca Mon Sep 17 00:00:00 2001
+From aa0a63209af6813d87255ec3ab339f2dbbf27d6d Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 6 Mar 2017 13:38:46 -0800
 Subject: [PATCH] Support Atomic ops on clang
@@ -9,25 +9,23 @@
 the atomics and fails for clang
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
+
 Upstream-Status: Pending
 
+---
  src/base/atomicops.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/base/atomicops.h b/src/base/atomicops.h
-index be038f3..f1a21ff 100644
+index dac95be..390733c 100644
 --- a/src/base/atomicops.h
 +++ b/src/base/atomicops.h
-@@ -118,7 +118,7 @@
+@@ -124,7 +124,7 @@
  #include "base/atomicops-internals-linuxppc.h"
  #elif defined(__GNUC__) && defined(__mips__)
  #include "base/atomicops-internals-mips.h"
 -#elif defined(__GNUC__) && GCC_VERSION >= 40700
 +#elif defined(__GNUC__) && GCC_VERSION >= 40700 || defined(__clang__)
  #include "base/atomicops-internals-gcc.h"
- #else
- #error You need to implement atomic operations for this architecture
--- 
-2.12.0
-
+ #elif defined(__clang__) && CLANG_VERSION >= 30400
+ #include "base/atomicops-internals-gcc.h"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Use-ucontext_t-instead-of-struct-ucontext.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Use-ucontext_t-instead-of-struct-ucontext.patch
index 5bd0b6f..b303362 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Use-ucontext_t-instead-of-struct-ucontext.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Use-ucontext_t-instead-of-struct-ucontext.patch
@@ -1,4 +1,4 @@
-From 12ac0dc6742e1bcdfaf1842186c9002f0820a5e8 Mon Sep 17 00:00:00 2001
+From 230cd84486145c5bb1d69d4c9a544e00adbcc9b5 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 1 Jul 2017 13:21:21 -0700
 Subject: [PATCH] Use ucontext_t instead of struct ucontext
@@ -6,12 +6,13 @@
 Newer glibc has dropped the ucontext tag from exposing
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/stacktrace_powerpc-linux-inl.h | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h
-index a9bf775..47ff2d7 100644
+index 3b3843b..a301a46 100644
 --- a/src/stacktrace_powerpc-linux-inl.h
 +++ b/src/stacktrace_powerpc-linux-inl.h
 @@ -53,7 +53,6 @@
@@ -31,6 +32,3 @@
            // We don't care about the rest, since IP value is at 'uc' field.A
          } *sigframe = reinterpret_cast<rt_signal_frame_32*>(current);
          result[n] = (void*) sigframe->uc.uc_mcontext.uc_regs->gregs[PT_NIP];
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch
index 99127e1..ab3ceb9 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch
@@ -1,19 +1,20 @@
-From b5961f17e9d7f2bc44da611b3e4b27c8a641fc72 Mon Sep 17 00:00:00 2001
+From 06605158852f9364519391fa11070ba5ec4303e9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 2 Sep 2017 08:07:17 -0700
 Subject: [PATCH] disbale heap checkers and debug allocator on musl
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
+
 Upstream-Status: Pending
 
+---
  configure.ac | 2 ++
  1 file changed, 2 insertions(+)
 
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
+diff --git a/configure.ac b/configure.ac
+index 70b49a3..8154c5c 100644
+--- a/configure.ac
++++ b/configure.ac
 @@ -51,6 +51,8 @@ case "$host" in
     *-cygwin*) default_enable_heap_checker=no; default_enable_cpu_profiler=no;;
     *-freebsd*) default_enable_heap_checker=no;;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch
index 78621c7..0a72ff2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch
@@ -1,4 +1,4 @@
-From 157914941bd38f1a38bb6bd7294ca6c2bc1b8dcb Mon Sep 17 00:00:00 2001
+From 034e7da08c3fbffcba8cf8d4e24a71a16558db5a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 16 Jul 2017 15:51:28 -0700
 Subject: [PATCH] fix build with musl libc
@@ -6,6 +6,7 @@
 Patch from https://github.com/gperftools/gperftools/pull/765/
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  configure.ac                 | 1 +
  src/malloc_hook_mmap_linux.h | 8 ++++++--
@@ -56,6 +57,3 @@
  // libc's version:
  extern "C" void* __sbrk(ptrdiff_t increment);
  
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch
index 667008a..4c63e73 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch
@@ -1,4 +1,4 @@
-From 04ea8e001501931f4dbf20288aca78469617b08a Mon Sep 17 00:00:00 2001
+From a16a73f0819d26219ee83cd98eea82786d7c1755 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 16 Jul 2017 19:28:17 -0700
 Subject: [PATCH] include fcntl.h for loff_t definition
@@ -7,6 +7,7 @@
 linux_syscall_support.h:2641:26: error: 'loff_t' has not been declared
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/base/linux_syscall_support.h | 1 +
  1 file changed, 1 insertion(+)
@@ -23,6 +24,3 @@
  
  #ifdef __mips__
  /* Include definitions of the ABI currently in use.                          */
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch
index f264740..c3c5784 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch
@@ -1,15 +1,22 @@
-Disable libunwind on aarch64
+From 564f800e3e24647c095f7a321bf3ebdccfbf762d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 12:02:04 -0700
+Subject: [PATCH] Disable libunwind on aarch64
 
 Fixes hangs when using libtcmalloc.so
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -69,6 +69,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [re
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 8154c5c..063b260 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -69,6 +69,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __PPC64__])],
                    [default_enable_libunwind=yes
                     default_tcmalloc_pagesize=8])
  
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch
index 7e1a23b..10274a6 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch
@@ -1,11 +1,19 @@
-sgidef.h does not exist on musl and its not needed to compile
+From 259b420444c52463795b4b582a2ab7511149eea7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 16 Oct 2017 21:26:40 -0700
+Subject: [PATCH] sgidef.h does not exist on musl and its not needed to compile
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
-Index: git/src/base/linux_syscall_support.h
-===================================================================
---- git.orig/src/base/linux_syscall_support.h
-+++ git/src/base/linux_syscall_support.h
+
+---
+ src/base/linux_syscall_support.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h
+index 70431ca..b23ca59 100644
+--- a/src/base/linux_syscall_support.h
++++ b/src/base/linux_syscall_support.h
 @@ -164,7 +164,7 @@ extern "C" {
  #include <endian.h>
  #include <fcntl.h>
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp-0.3-beta15-autodetect-717479.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp-0.3-beta15-autodetect-717479.patch
index 19f8380..1ec6a61 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp-0.3-beta15-autodetect-717479.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp-0.3-beta15-autodetect-717479.patch
@@ -3,9 +3,10 @@
 Refer to:
 https://bugzilla.redhat.com/show_bug.cgi?id=717479
 
-diff -up hddtemp-0.3-beta15/doc/hddtemp.8~ hddtemp-0.3-beta15/doc/hddtemp.8
---- hddtemp-0.3-beta15/doc/hddtemp.8~	2011-08-18 00:36:05.689001470 +0300
-+++ hddtemp-0.3-beta15/doc/hddtemp.8	2011-08-18 00:44:46.753006253 +0300
+Index: hddtemp-0.3-beta15/doc/hddtemp.8
+===================================================================
+--- hddtemp-0.3-beta15.orig/doc/hddtemp.8
++++ hddtemp-0.3-beta15/doc/hddtemp.8
 @@ -19,7 +19,7 @@
  hddtemp \- Utility to monitor hard drive temperature
  .SH SYNOPSIS
@@ -25,9 +26,10 @@
  
  
  .SH "OPTIONS"
-diff -up hddtemp-0.3-beta15/src/hddtemp.c~ hddtemp-0.3-beta15/src/hddtemp.c
---- hddtemp-0.3-beta15/src/hddtemp.c~	2011-08-18 00:36:05.638996861 +0300
-+++ hddtemp-0.3-beta15/src/hddtemp.c	2011-08-18 00:35:55.485060798 +0300
+Index: hddtemp-0.3-beta15/src/hddtemp.c
+===================================================================
+--- hddtemp-0.3-beta15.orig/src/hddtemp.c
++++ hddtemp-0.3-beta15/src/hddtemp.c
 @@ -54,6 +54,7 @@
  #include <linux/hdreg.h>
  #include <ctype.h>
@@ -44,7 +46,7 @@
  
    backtrace_sigsegv();
    backtrace_sigill();
-@@ -419,11 +421,6 @@ int main(int argc, char* argv[]) {
+@@ -423,11 +425,6 @@ int main(int argc, char* argv[]) {
       exit(0);
    }
    
@@ -56,7 +58,7 @@
    if(debug) {
      /*    argc = optind + 1;*/
      quiet = 1;
-@@ -434,6 +431,23 @@ int main(int argc, char* argv[]) {
+@@ -438,6 +435,23 @@ int main(int argc, char* argv[]) {
      exit(1);
    }
  
@@ -80,7 +82,7 @@
    init_bus_types();
  
    /* collect disks informations */
-@@ -527,6 +541,7 @@ int main(int argc, char* argv[]) {
+@@ -531,6 +545,7 @@ int main(int argc, char* argv[]) {
    else {
      do_direct_mode(ldisks);
    }
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp_0.3-beta15-52.diff b/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp_0.3-beta15-52.diff
index f61c164..057b1fd 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp_0.3-beta15-52.diff
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/hddtemp/hddtemp/hddtemp_0.3-beta15-52.diff
@@ -8,9 +8,11 @@
 
 Upstream-Status: unmaintained
 
+Index: hddtemp-0.3-beta15/doc/hddtemp.8
+===================================================================
 --- hddtemp-0.3-beta15.orig/doc/hddtemp.8
 +++ hddtemp-0.3-beta15/doc/hddtemp.8
-@@ -58,6 +58,10 @@
+@@ -58,6 +58,10 @@ Execute hddtemp in TCP/IP daemon mode (p
  .B \-f, \-\-file=\fIfile\fI
  Specify the database file to use.
  .TP
@@ -21,7 +23,7 @@
  .B \-l, \-\-listen=\fIaddr\fR
  Listen on a specific address.  \fIaddr\fR is a string containing a
  host name or a numeric host address string.  The numeric host address
-@@ -80,6 +84,9 @@
+@@ -80,6 +84,9 @@ seconds.
  .B \-q, \-\-quiet
  Don't check if the drive is supported.
  .TP
@@ -31,7 +33,7 @@
  .B \-v, \-\-version
  Display hddtemp version number.
  .TP
-@@ -96,7 +103,7 @@
+@@ -96,7 +103,7 @@ Listen on IPv6 sockets only.
  .SH "DRIVE DATABASE"
  If you know your drive has a temperature sensor but it is being
  reported unsupported, tell me which model and which manufacturer it
@@ -40,7 +42,7 @@
  line of hddtemp.db is either a comment, a blank line or a line
  containing:
  .TP
-@@ -112,7 +119,7 @@
+@@ -112,7 +119,7 @@ set of drives from its model name or fro
  Feedback is welcome (see the REPORT section below).
  
  .SH "TCP/IP DAEMON MODE"
@@ -49,7 +51,7 @@
  .PP
  # hddtemp SATA:/dev/sda PATA:/dev/hda
  .PP
-@@ -120,7 +127,7 @@
+@@ -120,7 +127,7 @@ To test
  .B hddtemp
  in daemon mode, start it like this:
  .PP
@@ -58,7 +60,7 @@
  .PP
  .PP
  and use
-@@ -165,8 +172,8 @@
+@@ -165,8 +172,8 @@ and 12 are often reported to match a tem
  investigation they do not.  But fields 194 (which is the standard
  field for temperature) and 231 are good candidates.
  .PP
@@ -69,13 +71,15 @@
  yourself.
  
  .SH "BUGS"
-@@ -183,5 +190,5 @@
+@@ -183,5 +190,5 @@ supported on i386 architectures only.
  .PP
  Emmanuel Varagnat (hddtemp@guzu.net).
  .PP
 -This manual page was originaly written by Aurelien Jarno <aurel32@debian.org>,
 +This manual page was originally written by Aurelien Jarno <aurel32@debian.org>,
  for the Debian GNU/Linux system (but may be used by others).
+Index: hddtemp-0.3-beta15/po/fr.po
+===================================================================
 --- hddtemp-0.3-beta15.orig/po/fr.po
 +++ hddtemp-0.3-beta15/po/fr.po
 @@ -7,9 +7,9 @@
@@ -91,7 +95,7 @@
  "Last-Translator: Aurelien Jarno <aurelien@aurel32.net>\n"
  "Language-Team: FRANCAIS <fr@li.org>\n"
  "MIME-Version: 1.0\n"
-@@ -17,23 +17,7 @@
+@@ -17,23 +17,7 @@ msgstr ""
  "Content-Transfer-Encoding: 8bit\n"
  "X-Generator: KBabel 1.0.1\n"
  
@@ -116,7 +120,7 @@
  #, c-format
  msgid ""
  "\n"
-@@ -46,7 +30,7 @@
+@@ -46,7 +30,7 @@ msgstr ""
  "Modèle: %s\n"
  "\n"
  
@@ -125,7 +129,7 @@
  #, c-format
  msgid ""
  "WARNING: Drive %s doesn't seem to have a temperature sensor.\n"
-@@ -60,75 +44,60 @@
+@@ -60,75 +44,60 @@ msgstr ""
  "net).\n"
  "ATTENTION : Voir les options --help, --debug et --drivebase.\n"
  
@@ -216,7 +220,7 @@
  "  -b   --drivebase   :  display database file content that allow hddtemp to\n"
  "                        recognize supported drives.\n"
  "  -D   --debug       :  display various S.M.A.R.T. fields and their values.\n"
-@@ -138,6 +107,7 @@
+@@ -138,6 +107,7 @@ msgid ""
  "  -d   --daemon      :  run hddtemp in TCP/IP daemon mode (port %d by "
  "default.)\n"
  "  -f   --file=FILE   :  specify database file to use.\n"
@@ -224,7 +228,7 @@
  "  -l   --listen=addr :  listen on a specific interface (in TCP/IP daemon "
  "mode).\n"
  "  -n   --numeric     :  print only the temperature.\n"
-@@ -145,6 +115,8 @@
+@@ -145,6 +115,8 @@ msgid ""
  "  -s   --separator=C :  separator to use between fields (in TCP/IP daemon "
  "mode).\n"
  "  -S   --syslog=s    :  log temperature to syslog every s seconds.\n"
@@ -233,7 +237,7 @@
  "  -q   --quiet       :  do not check if the drive is supported.\n"
  "  -v   --version     :  display hddtemp version number.\n"
  "  -w   --wake-up     :  wake-up the drive if need.\n"
-@@ -153,11 +125,14 @@
+@@ -153,11 +125,14 @@ msgid ""
  "\n"
  "Report bugs or new drives to <hddtemp@guzu.net>.\n"
  msgstr ""
@@ -249,7 +253,7 @@
  "  -b   --drivebase   :  affiche le contenu du fichier de base de donnée "
  "qui \n"
  "                        permet à hddtemp de reconnaître les lecteurs "
-@@ -172,6 +147,7 @@
+@@ -172,6 +147,7 @@ msgstr ""
  "défaut).\n"
  "  -f   --file=FILE   :  specifie le fichier à utiliser comme base de "
  "données.\n"
@@ -257,7 +261,7 @@
  "  -l   --listen=addr :  écoute sur une interface spécifique (en mode démon "
  "TCP/IP).\n"
  "  -n   --numeric     :  affiche seulement la température.\n"
-@@ -180,6 +156,8 @@
+@@ -180,6 +156,8 @@ msgstr ""
  "démon TCP/IP).\n"
  "  -S   --syslog=s    :  enregistre la température dans syslog tous les s "
  "secondes.\n"
@@ -266,7 +270,7 @@
  "  -q   --quiet       :  ne vérifie pas si le lecteur est supporté.\n"
  "  -v   --version     :  affiche la version de hddtemp.\n"
  "  -w   --wake-up     :  réveiller le lecteur si nécessaire.\n"
-@@ -188,62 +166,95 @@
+@@ -188,62 +166,95 @@ msgstr ""
  "\n"
  "Report bugs or new drives to <hddtemp@guzu.net>.\n"
  
@@ -377,6 +381,8 @@
 +
 +#~ msgid "field(%d)\t = %d\n"
 +#~ msgstr "champ(%d)\t = %d\n"
+Index: hddtemp-0.3-beta15/po/ru.po
+===================================================================
 --- hddtemp-0.3-beta15.orig/po/ru.po
 +++ hddtemp-0.3-beta15/po/ru.po
 @@ -6,8 +6,8 @@
@@ -390,7 +396,7 @@
  "PO-Revision-Date: 2003-03-08 16:42+0300\n"
  "Last-Translator: Michael Shigorin <mike@altlinux.ru>\n"
  "Language-Team: Russian <ru@li.org>\n"
-@@ -15,23 +15,7 @@
+@@ -15,23 +15,7 @@ msgstr ""
  "Content-Type: text/plain; charset=koi8-r\n"
  "Content-Transfer-Encoding: 8bit\n"
  
@@ -415,7 +421,7 @@
  #, c-format
  msgid ""
  "\n"
-@@ -40,7 +24,7 @@
+@@ -40,7 +24,7 @@ msgid ""
  "\n"
  msgstr ""
  
@@ -424,7 +430,7 @@
  #, c-format
  msgid ""
  "WARNING: Drive %s doesn't seem to have a temperature sensor.\n"
-@@ -53,72 +37,59 @@
+@@ -53,72 +37,59 @@ msgstr ""
  "÷îéíáîéå: åÓÌÉ ×Ù ÔÏÞÎÏ ÚÎÁÅÔÅ, ÞÔÏ ÄÁÔÞÉË ÅÓÔØ, ÎÁÐÉÛÉÔÅ hddtemp@guzu.net\n"
  "÷îéíáîéå: (ÓÍ. ÏÐÃÉÉ --help, --debug É --drivebase).\n"
  
@@ -512,7 +518,7 @@
  "  -b   --drivebase   :  display database file content that allow hddtemp to\n"
  "                        recognize supported drives.\n"
  "  -D   --debug       :  display various S.M.A.R.T. fields and their values.\n"
-@@ -128,6 +99,7 @@
+@@ -128,6 +99,7 @@ msgid ""
  "  -d   --daemon      :  run hddtemp in TCP/IP daemon mode (port %d by "
  "default.)\n"
  "  -f   --file=FILE   :  specify database file to use.\n"
@@ -520,7 +526,7 @@
  "  -l   --listen=addr :  listen on a specific interface (in TCP/IP daemon "
  "mode).\n"
  "  -n   --numeric     :  print only the temperature.\n"
-@@ -135,6 +107,8 @@
+@@ -135,6 +107,8 @@ msgid ""
  "  -s   --separator=C :  separator to use between fields (in TCP/IP daemon "
  "mode).\n"
  "  -S   --syslog=s    :  log temperature to syslog every s seconds.\n"
@@ -529,7 +535,7 @@
  "  -q   --quiet       :  do not check if the drive is supported.\n"
  "  -v   --version     :  display hddtemp version number.\n"
  "  -w   --wake-up     :  wake-up the drive if need.\n"
-@@ -168,59 +142,90 @@
+@@ -168,59 +142,90 @@ msgstr ""
  "\n"
  "óÏÏÂÝÅÎÉÑ Ï ÏÛÉÂËÁÈ É ÄÁÎÎÙÅ ÄÌÑ ÄÉÓËÏ× ÏÔÐÒÁ×ÌÑÊÔÅ ÎÁ <hddtemp@guzu.net>.\n"
  
@@ -636,6 +642,8 @@
 +
 +#~ msgid "field(%d)\t = %d\n"
 +#~ msgstr "ÐÏÌÅ(%d)\t = %d\n"
+Index: hddtemp-0.3-beta15/po/sv.po
+===================================================================
 --- hddtemp-0.3-beta15.orig/po/sv.po
 +++ hddtemp-0.3-beta15/po/sv.po
 @@ -6,8 +6,8 @@
@@ -649,7 +657,7 @@
  "PO-Revision-Date: 2005-11-02 19:03+0100\n"
  "Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
  "Language-Team: Swedish <sv@li.org>\n"
-@@ -17,23 +17,7 @@
+@@ -17,23 +17,7 @@ msgstr ""
  "X-Poedit-Language: swe\n"
  "X-Poedit-Country: swe\n"
  
@@ -674,7 +682,7 @@
  #, c-format
  msgid ""
  "\n"
-@@ -46,7 +30,7 @@
+@@ -46,7 +30,7 @@ msgstr ""
  "Modell: %s\n"
  "\n"
  
@@ -683,7 +691,7 @@
  #, c-format
  msgid ""
  "WARNING: Drive %s doesn't seem to have a temperature sensor.\n"
-@@ -60,76 +44,63 @@
+@@ -60,76 +44,63 @@ msgstr ""
  "net).\n"
  "VARNING: Se --help, --debug och --drivebase flaggorna.\n"
  
@@ -777,7 +785,7 @@
  "  -b   --drivebase   :  display database file content that allow hddtemp to\n"
  "                        recognize supported drives.\n"
  "  -D   --debug       :  display various S.M.A.R.T. fields and their values.\n"
-@@ -139,6 +110,7 @@
+@@ -139,6 +110,7 @@ msgid ""
  "  -d   --daemon      :  run hddtemp in TCP/IP daemon mode (port %d by "
  "default.)\n"
  "  -f   --file=FILE   :  specify database file to use.\n"
@@ -785,7 +793,7 @@
  "  -l   --listen=addr :  listen on a specific interface (in TCP/IP daemon "
  "mode).\n"
  "  -n   --numeric     :  print only the temperature.\n"
-@@ -146,6 +118,8 @@
+@@ -146,6 +118,8 @@ msgid ""
  "  -s   --separator=C :  separator to use between fields (in TCP/IP daemon "
  "mode).\n"
  "  -S   --syslog=s    :  log temperature to syslog every s seconds.\n"
@@ -794,7 +802,7 @@
  "  -q   --quiet       :  do not check if the drive is supported.\n"
  "  -v   --version     :  display hddtemp version number.\n"
  "  -w   --wake-up     :  wake-up the drive if need.\n"
-@@ -184,61 +158,91 @@
+@@ -184,61 +158,91 @@ msgstr ""
  "\n"
  "Rapportera buggar eller nya hårddiskar till <hddtemp@guzu.net>.\n"
  
@@ -901,9 +909,11 @@
 +
 +#~ msgid "field(%d)\t = %d\n"
 +#~ msgstr "fält(%d)\t = %d\n"
+Index: hddtemp-0.3-beta15/po/pt.po
+===================================================================
 --- hddtemp-0.3-beta15.orig/po/pt.po
 +++ hddtemp-0.3-beta15/po/pt.po
-@@ -7,7 +7,7 @@
+@@ -7,7 +7,7 @@ msgid ""
  msgstr ""
  "Project-Id-Version: hddtemp 0.3-beta14\n"
  "Report-Msgid-Bugs-To: \n"
@@ -912,7 +922,7 @@
  "PO-Revision-Date: 2006-03-29 23:22+0000\n"
  "Last-Translator: Miguel Figueiredo <elmig@debianp.org>\n"
  "Language-Team: Portuguese <traduz@debianpt.org>\n"
-@@ -15,23 +15,7 @@
+@@ -15,23 +15,7 @@ msgstr ""
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
  
@@ -937,7 +947,7 @@
  #, c-format
  msgid ""
  "\n"
-@@ -44,7 +28,7 @@
+@@ -44,7 +28,7 @@ msgstr ""
  "Modelo: %s\n"
  "\n"
  
@@ -946,7 +956,7 @@
  #, c-format
  msgid ""
  "WARNING: Drive %s doesn't seem to have a temperature sensor.\n"
-@@ -54,79 +38,68 @@
+@@ -54,79 +38,68 @@ msgid ""
  msgstr ""
  "AVISO: O disco %s não parece ter um sensor de temperatura.\n"
  "AVISO: Isto não significa que não tem nenhum.\n"
@@ -1047,7 +1057,7 @@
  "  -b   --drivebase   :  display database file content that allow hddtemp to\n"
  "                        recognize supported drives.\n"
  "  -D   --debug       :  display various S.M.A.R.T. fields and their values.\n"
-@@ -136,6 +109,7 @@
+@@ -136,6 +109,7 @@ msgid ""
  "  -d   --daemon      :  run hddtemp in TCP/IP daemon mode (port %d by "
  "default.)\n"
  "  -f   --file=FILE   :  specify database file to use.\n"
@@ -1055,7 +1065,7 @@
  "  -l   --listen=addr :  listen on a specific interface (in TCP/IP daemon "
  "mode).\n"
  "  -n   --numeric     :  print only the temperature.\n"
-@@ -143,6 +117,8 @@
+@@ -143,6 +117,8 @@ msgid ""
  "  -s   --separator=C :  separator to use between fields (in TCP/IP daemon "
  "mode).\n"
  "  -S   --syslog=s    :  log temperature to syslog every s seconds.\n"
@@ -1064,7 +1074,7 @@
  "  -q   --quiet       :  do not check if the drive is supported.\n"
  "  -v   --version     :  display hddtemp version number.\n"
  "  -w   --wake-up     :  wake-up the drive if need.\n"
-@@ -156,19 +132,23 @@
+@@ -156,19 +132,23 @@ msgstr ""
  "   hddtemp mostra a temperatura dos discos indicados no argumento.\n"
  "   Os discos têm de suportar S.M.A.R.T.\n"
  "\n"
@@ -1096,7 +1106,7 @@
  "  -q   --quiet       :  não verificar se o disco é suportado.\n"
  "  -v   --version     :  mostrar o número da versão do hddtemp.\n"
  "  -w   --wake-up     :  acordar o disco se necessário.\n"
-@@ -177,58 +157,93 @@
+@@ -177,58 +157,93 @@ msgstr ""
  "\n"
  "Relatar bugs ou novos discos para <hddtemp@guzu.net>.\n"
  
@@ -1208,7 +1218,9 @@
 +
 +#~ msgid "field(%d)\t = %d\n"
 +#~ msgstr "campo(%d)\t = %d\n"
---- hddtemp-0.3-beta15.orig/po/de.po
+Index: hddtemp-0.3-beta15/po/de.po
+===================================================================
+--- /dev/null
 +++ hddtemp-0.3-beta15/po/de.po
 @@ -0,0 +1,250 @@
 +# German translation of hddtemp.
@@ -1461,12 +1473,16 @@
 +#, c-format
 +msgid "log sense failed : %s"
 +msgstr "Protokoll-Erkennung fehlgeschlagen : %s"
+Index: hddtemp-0.3-beta15/po/LINGUAS
+===================================================================
 --- hddtemp-0.3-beta15.orig/po/LINGUAS
 +++ hddtemp-0.3-beta15/po/LINGUAS
 @@ -1,2 +1,2 @@
  # Set of available languages.
 -fr pt ru sv 
 +de fr pt ru sv 
+Index: hddtemp-0.3-beta15/po/hddtemp.pot
+===================================================================
 --- hddtemp-0.3-beta15.orig/po/hddtemp.pot
 +++ hddtemp-0.3-beta15/po/hddtemp.pot
 @@ -1,35 +1,22 @@
@@ -1513,7 +1529,7 @@
  #, c-format
  msgid ""
  "\n"
-@@ -38,7 +25,7 @@
+@@ -38,7 +25,7 @@ msgid ""
  "\n"
  msgstr ""
  
@@ -1522,7 +1538,7 @@
  #, c-format
  msgid ""
  "WARNING: Drive %s doesn't seem to have a temperature sensor.\n"
-@@ -47,67 +34,59 @@
+@@ -47,67 +34,59 @@ msgid ""
  "WARNING: See --help, --debug and --drivebase options.\n"
  msgstr ""
  
@@ -1604,7 +1620,7 @@
  "  -b   --drivebase   :  display database file content that allow hddtemp to\n"
  "                        recognize supported drives.\n"
  "  -D   --debug       :  display various S.M.A.R.T. fields and their values.\n"
-@@ -117,6 +96,7 @@
+@@ -117,6 +96,7 @@ msgid ""
  "  -d   --daemon      :  run hddtemp in TCP/IP daemon mode (port %d by "
  "default.)\n"
  "  -f   --file=FILE   :  specify database file to use.\n"
@@ -1612,7 +1628,7 @@
  "  -l   --listen=addr :  listen on a specific interface (in TCP/IP daemon "
  "mode).\n"
  "  -n   --numeric     :  print only the temperature.\n"
-@@ -124,6 +104,8 @@
+@@ -124,6 +104,8 @@ msgid ""
  "  -s   --separator=C :  separator to use between fields (in TCP/IP daemon "
  "mode).\n"
  "  -S   --syslog=s    :  log temperature to syslog every s seconds.\n"
@@ -1621,7 +1637,7 @@
  "  -q   --quiet       :  do not check if the drive is supported.\n"
  "  -v   --version     :  display hddtemp version number.\n"
  "  -w   --wake-up     :  wake-up the drive if need.\n"
-@@ -133,58 +115,69 @@
+@@ -133,58 +115,69 @@ msgid ""
  "Report bugs or new drives to <hddtemp@guzu.net>.\n"
  msgstr ""
  
@@ -1705,9 +1721,11 @@
  #, c-format
  msgid "log sense failed : %s"
  msgstr ""
+Index: hddtemp-0.3-beta15/src/sata.c
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/sata.c
 +++ hddtemp-0.3-beta15/src/sata.c
-@@ -118,11 +118,22 @@
+@@ -118,11 +118,22 @@ static enum e_gettemp sata_get_temperatu
    int              i;
    u16 *            p;
  
@@ -1731,7 +1749,7 @@
    
    /* get SMART values */
    if(sata_enable_smart(dsk->fd) != 0) {
-@@ -154,24 +165,15 @@
+@@ -154,24 +165,15 @@ static enum e_gettemp sata_get_temperatu
    }
  
    /* temperature */
@@ -1759,6 +1777,8 @@
  
    /* never reached */
  }
+Index: hddtemp-0.3-beta15/src/satacmds.c
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/satacmds.c
 +++ hddtemp-0.3-beta15/src/satacmds.c
 @@ -39,7 +39,7 @@
@@ -1770,7 +1790,7 @@
  
  // Application specific includes
  #include "satacmds.h"
-@@ -80,8 +80,8 @@
+@@ -80,8 +80,8 @@ int sata_pass_thru(int device, unsigned
  
    ret = scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction);
   
@@ -1781,7 +1801,7 @@
      return 1;		  
    else 
      return ret;
-@@ -95,10 +95,10 @@
+@@ -95,10 +95,10 @@ void sata_fixstring(unsigned char *s, in
    p = s;
    end = &s[bytecount & ~1]; /* bytecount must be even */
  
@@ -1794,6 +1814,8 @@
    }
  
    /* strip leading blanks */
+Index: hddtemp-0.3-beta15/src/backtrace.c
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/backtrace.c
 +++ hddtemp-0.3-beta15/src/backtrace.c
 @@ -16,9 +16,10 @@
@@ -1822,7 +1844,7 @@
  
  #define MAX_BTSIZE 64
  
-@@ -42,7 +47,6 @@
+@@ -42,7 +47,6 @@ void backtrace_handler(int n, siginfo_t
    static char **messages = NULL;
    static size_t btsize = 0;
    static size_t i;
@@ -1830,7 +1852,7 @@
    static char *strerr = "???";
    static FILE *fstrm;
  
-@@ -61,10 +65,10 @@
+@@ -61,10 +65,10 @@ void backtrace_handler(int n, siginfo_t
        SIC_CASE(SEGV_MAPERR);
        SIC_CASE(SEGV_ACCERR);
      }
@@ -1843,7 +1865,7 @@
      break;
    case SIGILL:
      switch(ist->si_code) {
-@@ -77,10 +81,10 @@
+@@ -77,10 +81,10 @@ void backtrace_handler(int n, siginfo_t
        SIC_CASE(ILL_COPROC);
        SIC_CASE(ILL_BADSTK);
      }
@@ -1856,7 +1878,7 @@
      break;
    case SIGBUS:
      switch(ist->si_code) {
-@@ -88,10 +92,10 @@
+@@ -88,10 +92,10 @@ void backtrace_handler(int n, siginfo_t
        SIC_CASE(BUS_ADRERR);
        SIC_CASE(BUS_OBJERR);
      }
@@ -1869,7 +1891,7 @@
      break;
    }
    fflush(fstrm);
-@@ -101,7 +105,7 @@
+@@ -101,7 +105,7 @@ void backtrace_handler(int n, siginfo_t
    /*
      old_eip = *(unsigned int*)((void*)&n-4);
      old_ebp = *(unsigned int*)((void*)&n-8);
@@ -1878,7 +1900,7 @@
      *(unsigned int*)((void*)&n-8) = puc->uc_mcontext.gregs[REG_EBP];    
      
      btsize = backtrace(btinfo, MAX_BTSIZE);
-@@ -111,14 +115,14 @@
+@@ -111,14 +115,14 @@ void backtrace_handler(int n, siginfo_t
    */
    
    btsize = backtrace(btinfo, MAX_BTSIZE);
@@ -1895,9 +1917,11 @@
    fflush(fstrm);
    fclose(fstrm);
  
+Index: hddtemp-0.3-beta15/src/daemon.c
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/daemon.c
 +++ hddtemp-0.3-beta15/src/daemon.c
-@@ -163,19 +163,16 @@
+@@ -163,19 +163,16 @@ void daemon_send_msg(struct disk *ldisks
  
      switch(dsk->ret) {
      case GETTEMP_NOT_APPLICABLE:
@@ -1922,7 +1946,7 @@
        break;
      case GETTEMP_KNOWN:
        n = snprintf(msg, sizeof(msg), "%s%c%s%c%d%c%c",
-@@ -185,26 +182,23 @@
+@@ -185,26 +182,23 @@ void daemon_send_msg(struct disk *ldisks
                     get_unit(dsk));
        break;
      case GETTEMP_NOSENSOR:
@@ -1955,7 +1979,7 @@
        break;
      }
      write(cfd,&separator, 1);
-@@ -222,14 +216,11 @@
+@@ -222,14 +216,11 @@ void daemon_syslog(struct disk *ldisks)
    for(dsk = ldisks; dsk; dsk = dsk->next) {
      switch(dsk->ret) {
      case GETTEMP_KNOWN:
@@ -1972,7 +1996,7 @@
        break;
      case GETTEMP_DRIVE_SLEEP:
        syslog(LOG_WARNING, _("%s: %s: drive is sleeping"), 
-@@ -270,28 +261,30 @@
+@@ -270,28 +261,30 @@ void do_daemon_mode(struct disk *ldisks)
    fd_set             deffds;
    time_t             next_time;
  
@@ -2025,9 +2049,11 @@
    }
    chdir("/");
    umask(0);
+Index: hddtemp-0.3-beta15/src/hddtemp.c
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/hddtemp.c
 +++ hddtemp-0.3-beta15/src/hddtemp.c
-@@ -75,7 +75,7 @@
+@@ -75,7 +75,7 @@ char *             listen_addr;
  char               separator = SEPARATOR;
  
  struct bustype *   bus[BUS_TYPE_MAX];
@@ -2036,7 +2062,7 @@
  
  static enum { DEFAULT, CELSIUS, FAHRENHEIT } unit;
  
-@@ -194,23 +194,7 @@
+@@ -194,23 +194,7 @@ static void display_temperature(struct d
      if (numeric && quiet)
        printf("0\n");      
      else
@@ -2061,7 +2087,7 @@
  
      break;
    case GETTEMP_KNOWN:
-@@ -232,14 +216,14 @@
+@@ -232,14 +216,14 @@ static void display_temperature(struct d
      if (numeric && quiet)
        printf("0\n");      
      else
@@ -2078,7 +2104,7 @@
        
      break;
    default:
-@@ -268,8 +252,9 @@
+@@ -268,8 +252,9 @@ void do_direct_mode(struct disk *ldisks)
  
  int main(int argc, char* argv[]) {
    int           i, c, lindex = 0, db_loaded = 0;
@@ -2089,16 +2115,16 @@
  
    backtrace_sigsegv();
    backtrace_sigill();
-@@ -279,7 +264,7 @@
-   bindtextdomain (PACKAGE, LOCALEDIR);
+@@ -283,7 +268,7 @@ int main(int argc, char* argv[]) {
    textdomain (PACKAGE);
+ #endif
    
 -  show_db = debug = numeric = quiet = wakeup = af_hint = syslog_interval = 0;
 +  show_db = debug = numeric = quiet = wakeup = af_hint = syslog_interval = foreground = 0;
    unit = DEFAULT;
    portnum = PORT_NUMBER;
    listen_addr = NULL;
-@@ -294,6 +279,7 @@
+@@ -298,6 +283,7 @@ int main(int argc, char* argv[]) {
        {"drivebase",  0, NULL, 'b'},
        {"debug",      0, NULL, 'D'},
        {"file",       1, NULL, 'f'},
@@ -2106,7 +2132,7 @@
        {"listen",     1, NULL, 'l'},
        {"version",    0, NULL, 'v'},
        {"port",       1, NULL, 'p'},
-@@ -305,7 +291,7 @@
+@@ -309,7 +295,7 @@ int main(int argc, char* argv[]) {
        {0, 0, 0, 0}
      };
   
@@ -2115,7 +2141,7 @@
      if (c == -1)
        break;
      
-@@ -382,12 +368,13 @@
+@@ -386,12 +372,13 @@ int main(int argc, char* argv[]) {
  		 "                        (done for every drive supplied).\n"
  		 "  -d   --daemon      :  run hddtemp in TCP/IP daemon mode (port %d by default.)\n"
  		 "  -f   --file=FILE   :  specify database file to use.\n"
@@ -2130,7 +2156,7 @@
  		 "  -q   --quiet       :  do not check if the drive is supported.\n"
  		 "  -v   --version     :  display hddtemp version number.\n"
  		 "  -w   --wake-up     :  wake-up the drive if need.\n"
-@@ -418,6 +405,9 @@
+@@ -422,6 +409,9 @@ int main(int argc, char* argv[]) {
  	  }
          }
  	break;
@@ -2140,7 +2166,7 @@
        default:
  	exit(1);
        }
-@@ -489,6 +479,7 @@
+@@ -493,6 +483,7 @@ int main(int argc, char* argv[]) {
      if( (dsk->fd = open(dsk->drive, O_RDONLY | O_NONBLOCK)) < 0) {
        snprintf(dsk->errormsg, MAX_ERRORMSG_SIZE, "open: %s\n", strerror(errno));
        dsk->type = ERROR;
@@ -2148,7 +2174,7 @@
        continue;
      }
  
-@@ -501,6 +492,7 @@
+@@ -505,6 +496,7 @@ int main(int argc, char* argv[]) {
  
        ldisks = dsk->next;
        free(dsk);
@@ -2156,7 +2182,7 @@
        continue;
      }
  
-@@ -514,11 +506,17 @@
+@@ -518,11 +510,17 @@ int main(int argc, char* argv[]) {
  	db_loaded = 1;
        }      
  
@@ -2177,16 +2203,18 @@
      }
    }
  
-@@ -530,5 +528,5 @@
+@@ -534,5 +532,5 @@ int main(int argc, char* argv[]) {
      do_direct_mode(ldisks);
    }
  
 -  return 0;
 +  return ret;
  }
+Index: hddtemp-0.3-beta15/src/ata.c
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/ata.c
 +++ hddtemp-0.3-beta15/src/ata.c
-@@ -75,7 +75,7 @@
+@@ -75,7 +75,7 @@ static enum e_gettemp ata_get_temperatur
    int              i;
    u16 *            p;
  
@@ -2195,7 +2223,7 @@
      close(dsk->fd);
      dsk->fd = -1;
      return GETTEMP_NOSENSOR;
-@@ -140,24 +140,15 @@
+@@ -140,24 +140,15 @@ static enum e_gettemp ata_get_temperatur
    */
  
    /* temperature */
@@ -2224,9 +2252,11 @@
  
    /* never reached */
  }
+Index: hddtemp-0.3-beta15/src/hddtemp.h
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/hddtemp.h
 +++ hddtemp-0.3-beta15/src/hddtemp.h
-@@ -39,8 +39,6 @@
+@@ -39,8 +39,6 @@ enum e_gettemp {
    GETTEMP_ERROR,            /* Error */
    GETTEMP_NOT_APPLICABLE,   /* */
    GETTEMP_UNKNOWN,          /* Drive is not in database */
@@ -2235,7 +2265,7 @@
    GETTEMP_KNOWN,            /* Drive appear in database */
    GETTEMP_NOSENSOR,         /* Drive appear in database but is known to have no sensor */
    GETTEMP_DRIVE_SLEEP       /* Drive is sleeping */
-@@ -78,7 +76,7 @@
+@@ -78,7 +76,7 @@ struct bustype {
  
  extern struct bustype *   bus[BUS_TYPE_MAX];
  extern char               errormsg[MAX_ERRORMSG_SIZE];
@@ -2244,9 +2274,11 @@
  extern char               separator;
  extern long               portnum, syslog_interval;
  extern char *             listen_addr;
+Index: hddtemp-0.3-beta15/src/scsicmds.c
+===================================================================
 --- hddtemp-0.3-beta15.orig/src/scsicmds.c
 +++ hddtemp-0.3-beta15/src/scsicmds.c
-@@ -147,6 +147,7 @@
+@@ -147,6 +147,7 @@ int scsi_inquiry(int device, unsigned ch
      return 1;
    else {
      scsi_fixstring(buffer + 8, 24);
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/htop/files/0001-Use-pkg-config.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/htop/files/0001-Use-pkg-config.patch
new file mode 100644
index 0000000..fc0d86e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/htop/files/0001-Use-pkg-config.patch
@@ -0,0 +1,39 @@
+We need to use pkg-config to find the ncurses library instead of the
+ncurses*-config applications.
+
+Signed-off-by: Paul Barker <pbarker@toganlabs.com>
+Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
+
+Upstream-status: Inappropriate
+    (`ncurses*-config` can be used outside of OpenEmbedded)
+
+diff --git a/configure.ac b/configure.ac
+index 559dc4d..77aea22 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -185,10 +185,10 @@ m4_define([HTOP_CHECK_LIB],
+ 
+ AC_ARG_ENABLE(unicode, [AS_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="yes")
+ if test "x$enable_unicode" = xyes; then
+-   HTOP_CHECK_SCRIPT([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW], "ncursesw6-config",
+-    HTOP_CHECK_SCRIPT([ncursesw], [addnwstr], [HAVE_LIBNCURSESW], "ncursesw6-config",
+-     HTOP_CHECK_SCRIPT([ncursesw], [addnwstr], [HAVE_LIBNCURSESW], "ncursesw5-config",
+-      HTOP_CHECK_SCRIPT([ncurses], [addnwstr], [HAVE_LIBNCURSESW], "ncurses5-config",
++   HTOP_CHECK_SCRIPT([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW], "pkg-config ncursesw6",
++    HTOP_CHECK_SCRIPT([ncursesw], [addnwstr], [HAVE_LIBNCURSESW], "pkg-config ncursesw6",
++     HTOP_CHECK_SCRIPT([ncursesw], [addnwstr], [HAVE_LIBNCURSESW], "pkg-config ncursesw5",
++      HTOP_CHECK_SCRIPT([ncurses], [addnwstr], [HAVE_LIBNCURSESW], "pkg-config ncurses5",
+        HTOP_CHECK_LIB([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW],
+         HTOP_CHECK_LIB([ncursesw], [addnwstr], [HAVE_LIBNCURSESW],
+          HTOP_CHECK_LIB([ncurses], [addnwstr], [HAVE_LIBNCURSESW],
+@@ -201,8 +201,8 @@ if test "x$enable_unicode" = xyes; then
+          [AC_CHECK_HEADERS([ncurses/curses.h],[:],
+             [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
+ else
+-   HTOP_CHECK_SCRIPT([ncurses6], [refresh], [HAVE_LIBNCURSES], "ncurses6-config",
+-    HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "ncurses5-config",
++   HTOP_CHECK_SCRIPT([ncurses6], [refresh], [HAVE_LIBNCURSES], "pkg-config ncurses6",
++    HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "pkg-config ncurses5",
+      HTOP_CHECK_LIB([ncurses6],  [refresh], [HAVE_LIBNCURSES],
+       HTOP_CHECK_LIB([ncurses],  [refresh], [HAVE_LIBNCURSES],
+       missing_libraries="$missing_libraries libncurses"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/htop/htop_1.0.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/htop/htop_1.0.3.bb
deleted file mode 100644
index 181661a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/htop/htop_1.0.3.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "htop process monitor"
-HOMEPAGE = "http://htop.sf.net"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c312653532e8e669f30e5ec8bdc23be3"
-
-DEPENDS = "ncurses"
-RDEPENDS_${PN} = "ncurses-terminfo"
-
-SRC_URI = "http://hisham.hm/htop/releases/${PV}/htop-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "e768b9b55c033d9c1dffda72db3a6ac7"
-SRC_URI[sha256sum] = "055c57927f75847fdc222b5258b079a9542811a9dcf5421c615c7e17f55d1829"
-
-LDFLAGS_append_libc-uclibc = " -lubacktrace"
-
-do_configure_prepend () {
-    rm -rf ${S}/config.h
-}
-
-inherit autotools
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/htop/htop_2.1.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/htop/htop_2.1.0.bb
new file mode 100644
index 0000000..33508f9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/htop/htop_2.1.0.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Interactive process viewer"
+HOMEPAGE = "http://hisham.hm/htop"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c312653532e8e669f30e5ec8bdc23be3"
+
+DEPENDS = "ncurses"
+
+SRC_URI = "http://hisham.hm/htop/releases/${PV}/${BP}.tar.gz \
+           file://0001-Use-pkg-config.patch"
+SRC_URI[md5sum] = "f262b66ad6c194782f4d3a80627e84c8"
+SRC_URI[sha256sum] = "3260be990d26e25b6b49fc9d96dbc935ad46e61083c0b7f6df413e513bf80748"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "proc \
+                   cgroup \
+                   taskstats \
+                   unicode \
+                   linux-affinity \
+                   delayacct"
+PACKAGECONFIG[proc] = "--enable-proc,--disable-proc"
+PACKAGECONFIG[openvz] = "--enable-openvz,--disable-openvz"
+PACKAGECONFIG[cgroup] = "--enable-cgroup,--disable-cgroup"
+PACKAGECONFIG[vserver] = "--enable-vserver,--disable-vserver"
+PACKAGECONFIG[taskstats] = "--enable-taskstats,--disable-taskstats"
+PACKAGECONFIG[unicode] = "--enable-unicode,--disable-unicode"
+PACKAGECONFIG[linux-affinity] = "--enable-linux-affinity,--disable-linux-affinity"
+PACKAGECONFIG[hwloc] = "--enable-hwloc,--disable-hwloc,hwloc"
+PACKAGECONFIG[setuid] = "--enable-setuid,--disable-setuid"
+PACKAGECONFIG[delayacct] = "--enable-delayacct,--disable-delayacct,libnl"
+
+do_configure_prepend () {
+    rm -rf ${S}/config.h
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell_1.6.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell_1.6.1.bb
deleted file mode 100644
index 125729f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell_1.6.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "A spell checker and morphological analyzer library"
-HOMEPAGE = "http://hunspell.github.io/"
-LICENSE = "GPLv3 | LGPLv3"
-LIC_FILES_CHKSUM = " \
-    file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-    file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02 \
-"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/archive/v${PV}.tar.gz"
-SRC_URI[md5sum] = "0df1c18c1284f8625af5ae5a8d5c4cef"
-SRC_URI[sha256sum] = "30f593733c50b794016bb03d31fd2a2071e4610c6fa4708e33edad2335102c49"
-
-inherit autotools pkgconfig gettext
-
-RDEPENDS_${PN} = "perl"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell_1.6.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell_1.6.2.bb
new file mode 100644
index 0000000..5feea89
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/hunspell/hunspell_1.6.2.bb
@@ -0,0 +1,17 @@
+SUMMARY = "A spell checker and morphological analyzer library"
+HOMEPAGE = "http://hunspell.github.io/"
+LICENSE = "GPLv3 | LGPLv3"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+    file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "1a54504cb470aafa6530bb372a10dc04"
+SRC_URI[sha256sum] = "3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce180cac4d6f4c4"
+
+inherit autotools pkgconfig gettext
+
+RDEPENDS_${PN} = "perl"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb
index 50d35c6..679673b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb
@@ -5,8 +5,8 @@
 LICENSE = "GPL-2.0+"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1556547711e8246992b999edd9445a57"
 
-PV = "0.291+git${SRCPV}"
-SRCREV = "4bfbdcf5913d6dd53336d31b8035708075e6fdfa"
+PV = "0.298+git${SRCPV}"
+SRCREV = "9030fbd6ab1538f4d77d3cf1e0b463a7ec25b5c4"
 SRC_URI = "git://github.com/vcrhonek/${BPN}.git"
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel-1.4/r25.diff b/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel-1.4/r25.diff
deleted file mode 100644
index e666ce0..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel-1.4/r25.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-Taken from upstream subversion repository:
-
-http://code.google.com/p/iksemel/source/detail?r=25
-
-===================================================================
----
- configure.ac |   10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
---- iksemel-1.4.orig/configure.ac
-+++ iksemel-1.4/configure.ac
-@@ -43,11 +43,19 @@ AM_CONDITIONAL(DO_POSIX, test "x$defio"
- dnl Checks for library functions
- AC_SEARCH_LIBS(recv,socket)
- AC_CHECK_FUNCS(getopt_long)
- AC_CHECK_FUNCS(getaddrinfo)
- 
--AM_PATH_LIBGNUTLS(,AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls"))
-+dnl Check GNU TLS
-+PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.0.0, have_gnutls=yes, have_gnutls=no)
-+if test "x$have_gnutls" = "xyes"; then
-+  LIBGNUTLS_CFLAGS="$GNUTLS_CFLAGS"
-+  LIBGNUTLS_LIBS="$GNUTLS_LIBS"
-+  AC_SUBST(LIBGNUTLS_CFLAGS)
-+  AC_SUBST(LIBGNUTLS_LIBS)
-+  AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.])
-+fi
- 
- dnl Check -Wall flag of GCC
- if test "x$GCC" = "xyes"; then
-   if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
-     CFLAGS="$CFLAGS -Wall"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel/avoid-obsolete-gnutls-apis.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel/avoid-obsolete-gnutls-apis.patch
new file mode 100644
index 0000000..41fccc3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel/avoid-obsolete-gnutls-apis.patch
@@ -0,0 +1,55 @@
+From 7136a908a056d0e36c89b6e1c39adff8ce2bb1d4 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 1 Nov 2017 13:17:34 -0700
+Subject: [PATCH] avoid obsolete gnutls apis
+
+The gnutls_*_set_priority() family of functions was marked deprecated
+in gnutls 2.12.x and removed completely in 3.5.x. These functions
+have been superceded by gnutls_priority_set_direct(), which was added
+in gnutls 2.2.0 (released 2007-12-14).
+
+Rather than simply update the custom gnutls_*_set_priority() calls to
+use gnutls_priority_set_direct(), drop the custom priority selection
+completely and use the recommended approach of letting gnutls pick a
+reasonable set of defaults.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ src/tls-gnutls.c | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/tls-gnutls.c b/src/tls-gnutls.c
+index d7b7c91..749e9ef 100644
+--- a/src/tls-gnutls.c
++++ b/src/tls-gnutls.c
+@@ -48,11 +48,6 @@ tls_pull (struct ikstls_data *data, char *buffer, size_t len)
+ static int
+ tls_handshake (struct ikstls_data **datap, ikstransport *trans, void *sock)
+ {
+-	const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 };
+-	const int kx_priority[] = { GNUTLS_KX_RSA, 0 };
+-	const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR, 0};
+-	const int comp_priority[] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0 };
+-	const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 };
+ 	struct ikstls_data *data;
+ 	int ret;
+ 
+@@ -81,11 +76,8 @@ tls_handshake (struct ikstls_data **datap, ikstransport *trans, void *sock)
+ 		return IKS_NOMEM;
+ 	}
+ 
+-	gnutls_protocol_set_priority (data->sess, protocol_priority);
+-	gnutls_cipher_set_priority(data->sess, cipher_priority);
+-	gnutls_compression_set_priority(data->sess, comp_priority);
+-	gnutls_kx_set_priority(data->sess, kx_priority);
+-	gnutls_mac_set_priority(data->sess, mac_priority);
++	gnutls_set_default_priority (data->sess);
++
+ 	gnutls_credentials_set (data->sess, GNUTLS_CRD_CERTIFICATE, data->cred);
+ 
+ 	gnutls_transport_set_push_function (data->sess, (gnutls_push_func) tls_push);
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel/fix-configure-option-parsing.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel/fix-configure-option-parsing.patch
new file mode 100644
index 0000000..05accdd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel/fix-configure-option-parsing.patch
@@ -0,0 +1,62 @@
+From 17a5cf8f70b86d8a2195562e2d9dcccb4fa35c83 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 31 Oct 2017 20:05:58 -0700
+Subject: [PATCH] fix configure option parsing
+
+Don't over-write with_openssl etc by trying to set to $enablevar
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 82e6d2d..823e6c1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,17 +56,17 @@ fi
+ dnl Options for overriding TLS checks
+ AC_ARG_WITH([openssl],
+   AS_HELP_STRING([--without-openssl],[disable checking for openssl]),
+-  [with_openssl=$enableval],
+-  [with_openssl=yes]
++  [],
++  [with_openssl=auto]
+ )
+ AC_ARG_WITH([gnutls],
+   AS_HELP_STRING([--without-gnutls],[disable checking for GNU TLS]),
+-  [with_gnutls=$enableval],
+-  [with_gnutls=yes]
++  [],
++  [with_gnutls=auto]
+ )
+ 
+ dnl Check OpenSSL
+-if test "x$with_openssl" = "xyes"; then
++if test "x$with_openssl" != "xno"; then
+   PKG_CHECK_MODULES([OPENSSL], openssl >= 0.9.8, have_openssl=yes, have_openssl=no)
+   if test "x$have_openssl" = "xyes"; then
+     LIBOPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+@@ -78,7 +78,7 @@ if test "x$with_openssl" = "xyes"; then
+ fi
+ 
+ dnl Check GNU TLS
+-if test "x$with_gnutls" = "xyes"; then
++if test "x$with_gnutls" != "xno"; then
+   if test "x$have_openssl" != "xyes"; then
+     PKG_CHECK_MODULES([GNUTLS], gnutls >= 2.0.0, have_gnutls=yes, have_gnutls=no)
+     if test "x$have_gnutls" = "xyes"; then
+@@ -94,7 +94,7 @@ fi
+ dnl Option for overriding Python check
+ AC_ARG_ENABLE([python],
+   AS_HELP_STRING([--disable-python],[disable checking for Python bindings]),
+-  [with_python=$enableval],
++  [],
+   [with_python=yes]
+ )
+ 
+-- 
+1.9.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel_1.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel_1.5.bb
new file mode 100644
index 0000000..0903e90
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/iksemel/iksemel_1.5.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Fast and portable XML parser and Jabber protocol library"
+HOMEPAGE = "https://github.com/meduketto/iksemel"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
+
+SRCREV = "978b733462e41efd5db72bc9974cb3b0d1d5f6fa"
+PV = "1.5+git${SRCPV}"
+
+SRC_URI = "git://github.com/meduketto/iksemel.git;protocol=https \
+           file://fix-configure-option-parsing.patch \
+           file://avoid-obsolete-gnutls-apis.patch"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig lib_package
+
+# TLS support requires either openssl or gnutls (if both are enabled openssl will be used).
+PACKAGECONFIG ?= "gnutls"
+
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
+
+EXTRA_OECONF = "--disable-python"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen/0001-CMakeLists.txt-install-FindEigen3.cmake-script.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen/0001-CMakeLists.txt-install-FindEigen3.cmake-script.patch
deleted file mode 100644
index 761dadb..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen/0001-CMakeLists.txt-install-FindEigen3.cmake-script.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From fd8bc66efac1059c1068f804746b01b90177c333 Mon Sep 17 00:00:00 2001
-From: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
-Date: Sun, 18 Oct 2015 16:52:25 +0200
-Subject: [PATCH] CMakeLists.txt: install FindEigen3.cmake script
-
-Upstream-Status: Pending
-
-Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
----
- CMakeLists.txt | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 76a11b9..ec6c6ea 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -342,6 +342,8 @@ if(EIGEN_BUILD_PKGCONFIG)
-         )
- endif(EIGEN_BUILD_PKGCONFIG)
- 
-+install(FILES "${PROJECT_SOURCE_DIR}/cmake/FindEigen3.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/cmake/Modules")
-+
- add_subdirectory(Eigen)
- 
- add_subdirectory(doc EXCLUDE_FROM_ALL)
--- 
-1.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.2.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.2.8.bb
deleted file mode 100644
index dcca2e9..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.2.8.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION = "Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms."
-AUTHOR = "Benoît Jacob and Gaël Guennebaud and others"
-HOMEPAGE = "http://eigen.tuxfamily.org/"
-LICENSE = "MPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING.MPL2;md5=815ca599c9df247a0c7f619bab123dad"
-
-SRC_URI = "http://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2;downloadfilename=${BP}.tar.bz2 \
-           file://0001-CMakeLists.txt-install-FindEigen3.cmake-script.patch"
-SRC_URI[md5sum] = "9e3bfaaab3db18253cfd87ea697b3ab1"
-SRC_URI[sha256sum] = "722a63d672b70f39c271c5e2a4a43ba14d12015674331790414fcb167c357e55"
-
-S = "${WORKDIR}/eigen-eigen-07105f7124f9"
-
-inherit cmake
-
-FILES_${PN} = "${includedir} ${libdir}"
-FILES_${PN}-dev = "${datadir}/cmake/Modules ${datadir}/pkgconfig"
-
-# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
-RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
new file mode 100644
index 0000000..bc3b32e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms."
+AUTHOR = "Benoît Jacob and Gaël Guennebaud and others"
+HOMEPAGE = "http://eigen.tuxfamily.org/"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING.MPL2;md5=815ca599c9df247a0c7f619bab123dad"
+
+SRC_URI = "http://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2;downloadfilename=${BP}.tar.bz2"
+SRC_URI[md5sum] = "a7aab9f758249b86c93221ad417fbe18"
+SRC_URI[sha256sum] = "dd254beb0bafc695d0f62ae1a222ff85b52dbaa3a16f76e781dce22d0d20a4a6"
+
+S = "${WORKDIR}/eigen-eigen-5a0156e40feb"
+
+inherit cmake
+
+FILES_${PN} = "${includedir} ${libdir}"
+FILES_${PN}-dev = "${datadir}/eigen3/cmake ${datadir}/cmake/Modules ${datadir}/pkgconfig"
+
+# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.bb
deleted file mode 100644
index c506057..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "C library and tools for interacting with the linux GPIO character device"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
-
-SRC_URI = "https://www.kernel.org/pub/software/libs/libgpiod/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "5f9d855352b1a5272cf6f1c2e20689d2"
-SRC_URI[sha256sum] = "6dfd6aeb544e8b7baf484a05c9ae0e67022c109362a41d87005393046b6beacf"
-
-PV = "0.3.1"
-
-inherit autotools pkgconfig
-
-# enable tools
-PACKAGECONFIG ?= "tools"
-
-PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
-PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,"
-
-PACKAGES += " ${PN}-tools"
-
-FILES_${PN}-tools = "${bindir}/*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.inc b/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.inc
new file mode 100644
index 0000000..cd77506
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod.inc
@@ -0,0 +1,21 @@
+SUMMARY = "C library and tools for interacting with the linux GPIO character device"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
+
+SRC_URI = "https://www.kernel.org/pub/software/libs/libgpiod/${BP}.tar.xz"
+
+inherit autotools pkgconfig
+
+# enable tools
+PACKAGECONFIG ?= "tools"
+
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,"
+
+PACKAGES =+ " ${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/*"
+
+RRECOMMENDS_TOOLS = "${@bb.utils.contains('PACKAGECONFIG', 'tools', '${PN}-tools', '',d)}"
+RRECOMMENDS_${PN} += "${RRECOMMENDS_TOOLS}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_0.3.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_0.3.3.bb
new file mode 100644
index 0000000..09fb65a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_0.3.3.bb
@@ -0,0 +1,4 @@
+require libgpiod.inc
+
+SRC_URI[md5sum] = "2aa1e1a80c3c919ae142ab9a55fb59ca"
+SRC_URI[sha256sum] = "b773e557af1a497f786825462a776b7bf90168e67ee0a5bc5d2473a5674dc38c"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.0.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.0.1.bb
new file mode 100644
index 0000000..51499fd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.0.1.bb
@@ -0,0 +1,4 @@
+require libgpiod.inc
+
+SRC_URI[md5sum] = "2ca0c3eb17d69e367b6f6a109ca86e41"
+SRC_URI[sha256sum] = "972924195367f5fb045c023d65340c4b7dfc8764499516be446553865208dedc"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb
index d66ac58..ba380ed 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -4,21 +4,41 @@
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
 
-SRCREV = "08f947d5e40600259bb698c3b95538e9f2bfecc2"
-PV = "0.8+git${SRCPV}"
+SRCREV = "fa82974d8bd1fded78e630ab71a7ded1b11d0e33"
+PV = "0.14+git${SRCPV}"
 
-SRC_URI = "git://github.com/analogdevicesinc/libiio.git"
+SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "flex-native bison-native avahi libaio libusb1 libxml2"
+inherit cmake pythonnative systemd
 
-inherit cmake pythonnative
+DEPENDS = " \
+    flex-native bison-native libaio \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+"
+
+EXTRA_OECMAKE = " \
+    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+    -DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir}/udev/rules.d \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \
+"
+
+PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND"
+
+PACKAGECONFIG[USB_BACKEND] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1,libxml2"
+PACKAGECONFIG[NETWORK_BACKEND] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
 
 PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-python"
 
 RDEPENDS_${PN}-python = "${PN} python-ctypes python-stringold"
 
-FILES_${PN}-iiod = "${sbindir}/iiod"
+FILES_${PN}-iiod = " \
+    ${sbindir}/iiod \
+    ${systemd_system_unitdir}/iiod.service \
+"
 FILES_${PN}-tests = "${bindir}"
 FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+SYSTEMD_PACKAGES = "${PN}-iiod"
+SYSTEMD_SERVICE_${PN}-iiod = "iiod.service"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.55.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.55.bb
index ee399a7..0930a27 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.55.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.55.bb
@@ -11,6 +11,8 @@
 
 inherit autotools lib_package pkgconfig gettext
 
+CFLAGS += "-pthread -D_REENTRANT"
+
 EXTRA_OECONF += "--disable-static --with-gnutls=${STAGING_LIBDIR}/../"
 
 PACKAGECONFIG ?= "curl"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libol/libol_0.3.18.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libol/libol_0.3.18.bb
index 74e1ef2..d7adb2b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libol/libol_0.3.18.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libol/libol_0.3.18.bb
@@ -4,7 +4,7 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
 
-SRC_URI = "http://www.balabit.com/downloads/files/libol/0.3/${BP}.tar.gz \
+SRC_URI = "http://www.balabit.com/downloads/libol/0.3/${BP}.tar.gz \
            file://configure.patch"
 SRC_URI[md5sum] = "cbadf4b7ea276dfa85acc38a1cc5ff17"
 SRC_URI[sha256sum] = "9de3bf13297ff882e02a1e6e5f6bf760a544aff92a9d8a1cf4328a32005cefe7"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/files/automake_foreign.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/files/automake_foreign.patch
deleted file mode 100644
index 2d5bd6d..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/files/automake_foreign.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: SDL2_ttf-2.0.14/Makefile.am
-===================================================================
---- SDL2_ttf-2.0.14.orig/Makefile.am
-+++ SDL2_ttf-2.0.14/Makefile.am
-@@ -1,6 +1,8 @@
- # Makefile.am for the SDL truetype font loading library and viewer
- lib_LTLIBRARIES = libSDL2_ttf.la
- 
-+AUTOMAKE_OPTIONS = foreign
-+
- libSDL2_ttfincludedir = $(includedir)/SDL2
- libSDL2_ttfinclude_HEADERS =	\
- 	SDL_ttf.h
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/files/use.pkg-config.for.freetype2.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/files/use.pkg-config.for.freetype2.patch
deleted file mode 100644
index 8a11f66..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/files/use.pkg-config.for.freetype2.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-freetype-config was removed from oe-core in
-
-commit 5870bd272b0b077d0826fb900b251884c1c05061
-Author: Richard Purdie <richard.purdie@linuxfoundation.org>
-Date:   Thu May 22 10:59:33 2014 +0100
-
-    binconfig-disabled: Add class and use
-
-diff --git a/configure.in b/configure.in
-index 408e8d6..5f9e730 100644
---- a/configure.in
-+++ b/configure.in
-@@ -86,39 +86,11 @@ case "$host" in
- esac
- AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)
- 
--dnl Check for the FreeType 2 library
--dnl
--dnl Get the cflags and libraries from the freetype-config script
--dnl
--AC_ARG_WITH(freetype-prefix,[  --with-freetype-prefix=PFX   Prefix where FREETYPE is 
--installed (optional)],
--            freetype_prefix="$withval", freetype_prefix="")
--AC_ARG_WITH(freetype-exec-prefix,[  --with-freetype-exec-prefix=PFX Exec prefix 
--where FREETYPE is installed (optional)],
--            freetype_exec_prefix="$withval", freetype_exec_prefix="")
--
--if test x$freetype_exec_prefix != x ; then
--     freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix"
--     if test x${FREETYPE_CONFIG+set} != xset ; then
--        FREETYPE_CONFIG=$freetype_exec_prefix/bin/freetype-config
--     fi
--fi
--if test x$freetype_prefix != x ; then
--     freetype_args="$freetype_args --prefix=$freetype_prefix"
--     if test x${FREETYPE_CONFIG+set} != xset ; then
--        FREETYPE_CONFIG=$freetype_prefix/bin/freetype-config
--     fi
--fi
--AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
--no_freetype=""
--if test "$FREETYPE_CONFIG" = "no" ; then
--    AC_MSG_ERROR([
--*** Unable to find FreeType2 library (http://www.freetype.org/)
--])
--else
--    CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
--    LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
--fi
-+PKG_CHECK_MODULES(FREETYPE2, freetype2, 
-+    CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
-+    LIBS="$LIBS $FREETYPE2_LIBS",
-+    AC_MSG_ERROR([*** Unable to find FreeType2 library (http://www.freetype.org/)])
-+)
- 
- dnl Check for SDL
- SDL_VERSION=2.0.0
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl-ttf/use.pkg-config.for.freetype2.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl-ttf/use.pkg-config.for.freetype2.patch
new file mode 100644
index 0000000..1116c34
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl-ttf/use.pkg-config.for.freetype2.patch
@@ -0,0 +1,62 @@
+From 8cf318197eea91bec6057308befbb29426d69014 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 22 May 2014 10:59:33 +0100
+Subject: [PATCH] freetype-config was removed from oe-core in
+
+commit 5870bd272b0b077d0826fb900b251884c1c05061
+
+    binconfig-disabled: Add class and use
+
+---
+ configure.in | 38 +++++---------------------------------
+ 1 file changed, 5 insertions(+), 33 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 865075e..d7a5a81 100644
+--- a/configure.in
++++ b/configure.in
+@@ -90,39 +90,11 @@ case "$host" in
+ esac
+ AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)
+ 
+-dnl Check for the FreeType 2 library
+-dnl
+-dnl Get the cflags and libraries from the freetype-config script
+-dnl
+-AC_ARG_WITH(freetype-prefix,[  --with-freetype-prefix=PFX   Prefix where FREETYPE is 
+-installed (optional)],
+-            freetype_prefix="$withval", freetype_prefix="")
+-AC_ARG_WITH(freetype-exec-prefix,[  --with-freetype-exec-prefix=PFX Exec prefix 
+-where FREETYPE is installed (optional)],
+-            freetype_exec_prefix="$withval", freetype_exec_prefix="")
+-
+-if test x$freetype_exec_prefix != x ; then
+-     freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix"
+-     if test x${FREETYPE_CONFIG+set} != xset ; then
+-        FREETYPE_CONFIG=$freetype_exec_prefix/bin/freetype-config
+-     fi
+-fi
+-if test x$freetype_prefix != x ; then
+-     freetype_args="$freetype_args --prefix=$freetype_prefix"
+-     if test x${FREETYPE_CONFIG+set} != xset ; then
+-        FREETYPE_CONFIG=$freetype_prefix/bin/freetype-config
+-     fi
+-fi
+-AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+-no_freetype=""
+-if test "$FREETYPE_CONFIG" = "no" ; then
+-    AC_MSG_ERROR([
+-*** Unable to find FreeType2 library (http://www.freetype.org/)
+-])
+-else
+-    CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
+-    LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
+-fi
++PKG_CHECK_MODULES(FREETYPE2, freetype2, 
++    CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
++    LIBS="$LIBS $FREETYPE2_LIBS",
++    AC_MSG_ERROR([*** Unable to find FreeType2 library (http://www.freetype.org/)])
++)
+ 
+ dnl Check for SDL
+ SDL_VERSION=1.2.4
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl2-ttf/automake_foreign.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl2-ttf/automake_foreign.patch
new file mode 100644
index 0000000..871e6e9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl2-ttf/automake_foreign.patch
@@ -0,0 +1,21 @@
+From f9c4ad3a171d676e3818b8f6897f325ccf0b2203 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 9 May 2017 00:57:10 -0700
+
+---
+ Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8166d91..8e05e49 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,6 +2,8 @@
+ 
+ lib_LTLIBRARIES = libSDL2_ttf.la
+ 
++AUTOMAKE_OPTIONS = foreign
++
+ libSDL2_ttfincludedir = $(includedir)/SDL2
+ libSDL2_ttfinclude_HEADERS =	\
+ 	SDL_ttf.h
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl2-ttf/use.pkg-config.for.freetype2.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl2-ttf/use.pkg-config.for.freetype2.patch
new file mode 100644
index 0000000..1dfbec6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libsdl-ttf/libsdl2-ttf/use.pkg-config.for.freetype2.patch
@@ -0,0 +1,62 @@
+From e6d2c0e130811c15b5f5cc10221fae182cb8609e Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 22 May 2014 10:59:33 +0100
+Subject: [PATCH] freetype-config was removed from oe-core in
+
+commit 5870bd272b0b077d0826fb900b251884c1c05061
+
+    binconfig-disabled: Add class and use
+
+---
+ configure.in | 38 +++++---------------------------------
+ 1 file changed, 5 insertions(+), 33 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 9b36e15..f300cae 100644
+--- a/configure.in
++++ b/configure.in
+@@ -86,39 +86,11 @@ case "$host" in
+ esac
+ AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)
+ 
+-dnl Check for the FreeType 2 library
+-dnl
+-dnl Get the cflags and libraries from the freetype-config script
+-dnl
+-AC_ARG_WITH(freetype-prefix,[  --with-freetype-prefix=PFX   Prefix where FREETYPE is 
+-installed (optional)],
+-            freetype_prefix="$withval", freetype_prefix="")
+-AC_ARG_WITH(freetype-exec-prefix,[  --with-freetype-exec-prefix=PFX Exec prefix 
+-where FREETYPE is installed (optional)],
+-            freetype_exec_prefix="$withval", freetype_exec_prefix="")
+-
+-if test x$freetype_exec_prefix != x ; then
+-     freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix"
+-     if test x${FREETYPE_CONFIG+set} != xset ; then
+-        FREETYPE_CONFIG=$freetype_exec_prefix/bin/freetype-config
+-     fi
+-fi
+-if test x$freetype_prefix != x ; then
+-     freetype_args="$freetype_args --prefix=$freetype_prefix"
+-     if test x${FREETYPE_CONFIG+set} != xset ; then
+-        FREETYPE_CONFIG=$freetype_prefix/bin/freetype-config
+-     fi
+-fi
+-AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+-no_freetype=""
+-if test "$FREETYPE_CONFIG" = "no" ; then
+-    AC_MSG_ERROR([
+-*** Unable to find FreeType2 library (http://www.freetype.org/)
+-])
+-else
+-    CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
+-    LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
+-fi
++PKG_CHECK_MODULES(FREETYPE2, freetype2, 
++    CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
++    LIBS="$LIBS $FREETYPE2_LIBS",
++    AC_MSG_ERROR([*** Unable to find FreeType2 library (http://www.freetype.org/)])
++)
+ 
+ dnl Check for SDL
+ SDL_VERSION=2.0.0
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch
new file mode 100644
index 0000000..468a55f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch
@@ -0,0 +1,32 @@
+From 00debe6bd4cf5a3133a8fbaab75f7447a39fa655 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Thu, 12 Apr 2018 01:54:15 +0000
+Subject: [PATCH] team_basic_test.py: disable RedHat specific test
+
+The test _run_teamd_initscripts() is for RedHat ifcfg scripts which are
+incompatible with OE:
+  /etc/sysconfig/network-scripts/ifcfg-*
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ scripts/team_basic_test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/team_basic_test.py b/scripts/team_basic_test.py
+index b05be9e..faabd18 100755
+--- a/scripts/team_basic_test.py
++++ b/scripts/team_basic_test.py
+@@ -171,7 +171,7 @@ TEAM_PORT_CONFIG='{"prio": 10}'
+         try:
+             for mode_name in self._team_modes:
+                 self._run_one_mode(mode_name)
+-            self._run_teamd_initscripts()
++            #self._run_teamd_initscripts()
+         finally:
+             cmd_exec("modprobe -r team_mode_loadbalance team_mode_roundrobin team_mode_activebackup team_mode_broadcast team");
+ 
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam/run-ptest b/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam/run-ptest
new file mode 100644
index 0000000..4ba5acf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python $(dirname $0)/team_basic_test.py
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.27.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.27.bb
index 3222700..442592d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.27.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/libteam/libteam_1.27.bb
@@ -10,6 +10,8 @@
 SRC_URI = "git://github.com/jpirko/libteam \
            file://0001-include-sys-select.h-for-fd_set-definition.patch \
            file://0002-teamd-Re-adjust-include-header-order.patch \
+           file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \
+           file://run-ptest \
            "
 SRCREV = "91a928a56a501daac5ce8b3c16bd9943661f1d16"
 
@@ -18,7 +20,7 @@
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
 FILES_${PN} = "${libdir}/libteam${SOLIBS} \
 "
@@ -33,4 +35,8 @@
 "
 
 RDEPENDS_${PN}-utils = "bash"
+RDEPENDS_${PN}-ptest = "python"
 
+do_install_ptest() {
+	install ${S}/scripts/team_basic_test.py ${D}${PTEST_PATH}/
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
deleted file mode 100644
index 09d49d2..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 53368d3f4adc09dd84234a9af31771bcd8ca2757 Mon Sep 17 00:00:00 2001
-From: Sven Ebenfeld <sven.ebenfeld@gmail.com>
-Date: Fri, 15 Jan 2016 22:41:28 +0100
-Subject: [PATCH] Tell scons to use build settings from environment variables
-
-Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
----
- SConstruct                | 8 ++++++--
- src/mongo/util/SConscript | 2 ++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 5082a4b..3370f70 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -507,6 +507,7 @@ def variable_arch_converter(val):
-         'amd64':  'x86_64',
-         'emt64':   'x86_64',
-         'x86':    'i386',
-+        'aarch64': 'arm64',
-     }
-     val = val.lower()
- 
-@@ -568,7 +569,8 @@ env_vars.Add('ARFLAGS',
-     converter=variable_shlex_converter)
- 
- env_vars.Add('CC',
--    help='Select the C compiler to use')
-+    help='Select the C compiler to use',
-+    default=os.getenv('CC'))
- 
- env_vars.Add('CCFLAGS',
-     help='Sets flags for the C and C++ compiler',
-@@ -588,7 +590,8 @@ env_vars.Add('CPPPATH',
-     converter=variable_shlex_converter)
- 
- env_vars.Add('CXX',
--    help='Select the C++ compiler to use')
-+    help='Select the C++ compiler to use',
-+    default=os.getenv('CXX'))
- 
- env_vars.Add('CXXFLAGS',
-     help='Sets flags for the C++ compiler',
-@@ -818,6 +821,7 @@ envDict = dict(BUILD_ROOT=buildDir,
-                )
- 
- env = Environment(variables=env_vars, **envDict)
-+env.PrependENVPath('PATH', os.getenv('PATH'))
- del envDict
- 
- env.AddMethod(env_os_is_wrapper, 'TargetOSIs')
-diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript
-index 6add602..8d05a62 100644
---- a/src/mongo/util/SConscript
-+++ b/src/mongo/util/SConscript
-@@ -251,6 +251,8 @@ if get_option('allocator') == 'tcmalloc':
-                 'MONGO_HAVE_GPERFTOOLS_GET_THREAD_CACHE_SIZE'
-             ]
-         )
-+    if not use_system_version_of_library('valgrind'):
-+        tcmspEnv.InjectThirdPartyIncludePaths('valgrind')
- 
-     tcmspEnv.Library(
-         target='tcmalloc_set_parameter',
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
deleted file mode 100644
index c43beb4..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From a4951489d649c2b609cbb80f6cfb49fdcad8bd43 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 2 Sep 2017 10:03:37 -0700
-Subject: [PATCH] Use long long instead of int64_t
-
-Fixes
-error: call to member function 'appendNumber' is ambiguous
-since this function expects long long as parameter and not int64_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
- src/mongo/util/procparser.cpp | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/mongo/util/procparser.cpp b/src/mongo/util/procparser.cpp
-index 36f2ae0254..2c164bcbf3 100644
---- a/src/mongo/util/procparser.cpp
-+++ b/src/mongo/util/procparser.cpp
-@@ -260,7 +260,7 @@ Status parseProcStat(const std::vector<StringData>& keys,
- 
-                     StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
- 
--                    uint64_t value;
-+                    long long  value;
- 
-                     if (!parseNumberFromString(stringValue, &value).isOK()) {
-                         value = 0;
-@@ -272,7 +272,7 @@ Status parseProcStat(const std::vector<StringData>& keys,
-             } else {
-                 StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
- 
--                uint64_t value;
-+                long long value;
- 
-                 if (!parseNumberFromString(stringValue, &value).isOK()) {
-                     value = 0;
-@@ -365,7 +365,7 @@ Status parseProcMemInfo(const std::vector<StringData>& keys,
- 
-             StringData stringValue((*partIt).begin(), (*partIt).end());
- 
--            uint64_t value;
-+            long long value;
- 
-             if (!parseNumberFromString(stringValue, &value).isOK()) {
-                 value = 0;
-@@ -426,7 +426,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks,
-                           StringData data,
-                           BSONObjBuilder* builder) {
-     bool foundKeys = false;
--    std::vector<uint64_t> stats;
-+    std::vector<long long> stats;
-     stats.reserve(kDiskFieldCount);
- 
-     using string_split_iterator = boost::split_iterator<StringData::const_iterator>;
-@@ -501,7 +501,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks,
- 
-                 StringData stringValue((*partIt).begin(), (*partIt).end());
- 
--                uint64_t value;
-+                long long value;
- 
-                 if (!parseNumberFromString(stringValue, &value).isOK()) {
-                     value = 0;
--- 
-2.14.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-mongo-Add-using-std-string.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-mongo-Add-using-std-string.patch
deleted file mode 100644
index e517d53..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0001-mongo-Add-using-std-string.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 5fdec9592285f5976345fbccb3d07fae1245ab53 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 2 Aug 2017 15:41:22 -0700
-Subject: [PATCH] mongo: Add using std::string
-
-This is needed with latest clang
-Fixes
-src/mongo/db/dbwebserver.cpp:206:23: error: use of undeclared identifier 'string'; did you mean 'String'?
-        static vector<string> commands;
-                      ^~~~~~
-                      String
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/mongo/db/dbwebserver.cpp             | 1 +
- src/mongo/db/matcher/expression_leaf.cpp | 2 ++
- src/mongo/db/repl/master_slave.cpp       | 1 +
- src/mongo/util/net/miniwebserver.cpp     | 1 +
- 4 files changed, 5 insertions(+)
-
-diff --git a/src/mongo/db/dbwebserver.cpp b/src/mongo/db/dbwebserver.cpp
-index b202e0500b..0255613524 100644
---- a/src/mongo/db/dbwebserver.cpp
-+++ b/src/mongo/db/dbwebserver.cpp
-@@ -67,6 +67,7 @@ namespace mongo {
- using std::map;
- using std::stringstream;
- using std::vector;
-+using std::string;
- 
- using namespace html;
- 
-diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp
-index d562bff141..4d931985e2 100644
---- a/src/mongo/db/matcher/expression_leaf.cpp
-+++ b/src/mongo/db/matcher/expression_leaf.cpp
-@@ -44,6 +44,8 @@
- #include "mongo/stdx/memory.h"
- #include "mongo/util/mongoutils/str.h"
- 
-+using std::string;
-+
- namespace mongo {
- 
- Status LeafMatchExpression::setPath(StringData path) {
-diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp
-index 05faad1259..ea25d7151b 100644
---- a/src/mongo/db/repl/master_slave.cpp
-+++ b/src/mongo/db/repl/master_slave.cpp
-@@ -78,6 +78,7 @@ using std::endl;
- using std::max;
- using std::min;
- using std::set;
-+using std::string;
- using std::stringstream;
- using std::unique_ptr;
- using std::vector;
-diff --git a/src/mongo/util/net/miniwebserver.cpp b/src/mongo/util/net/miniwebserver.cpp
-index 5f4165d42f..239720c349 100644
---- a/src/mongo/util/net/miniwebserver.cpp
-+++ b/src/mongo/util/net/miniwebserver.cpp
-@@ -46,6 +46,7 @@ namespace mongo {
- 
- using std::shared_ptr;
- using std::stringstream;
-+using std::string;
- using std::vector;
- 
- MiniWebServer::MiniWebServer(const string& name, const string& ip, int port, ServiceContext* ctx)
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
deleted file mode 100644
index 95f9c1c..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 5759878e5d278f11a1063e8fccd1e6b7b54caadf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 2 Aug 2017 16:25:37 -0700
-Subject: [PATCH 2/2] d_state.cpp: Add missing dependenncy on
- local_sharding_info
-
-Fixes
-| src/mongo/s/d_state.cpp:81: error: undefined reference to 'mongo::enableLocalShardingInfo(mongo::ServiceContext*, std::function<bool (mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>)'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/mongo/s/SConscript | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
-index 71720be517..51bd199127 100644
---- a/src/mongo/s/SConscript
-+++ b/src/mongo/s/SConscript
-@@ -317,5 +317,6 @@ env.Library(
-         "$BUILD_DIR/mongo/db/s/sharding",
-         "$BUILD_DIR/mongo/executor/network_interface_factory",
-         "$BUILD_DIR/mongo/s/client/shard_local",
-+        "$BUILD_DIR/mongo/s/local_sharding_info",
-     ],
- )
--- 
-2.13.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb_git.bb
deleted file mode 100644
index 0ff7d0b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/mongodb/mongodb_git.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "mongodb"
-LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib"
-LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \
-                    file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
-
-DEPENDS = "openssl libpcre libpcap zlib python boost"
-
-inherit scons dos2unix siteinfo
-
-PV = "3.4.6+git${SRCPV}"
-SRCREV = "c55eb86ef46ee7aede3b1e2a5d184a7df4bfb5b5"
-SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \
-           file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
-           file://0001-mongo-Add-using-std-string.patch \
-           file://0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch \
-           file://0001-Use-long-long-instead-of-int64_t.patch \
-           file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
-           file://0001-Use-strerror_r-only-on-glibc-systems.patch \
-           file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
-           file://0003-Conditionalize-glibc-specific-strerror_r.patch \
-           file://arm64-support.patch \
-           file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
-           file://disable-hw-crc32-on-arm64-s390x.patch \
-           "
-SRC_URI_append_libc-musl ="\
-           file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
-           "
-S = "${WORKDIR}/git"
-
-# Wiredtiger supports only 64-bit platforms
-PACKAGECONFIG_x86-64 ??= "tcmalloc wiredtiger"
-PACKAGECONFIG_aarch64 ??= "tcmalloc wiredtiger"
-PACKAGECONFIG ??= "tcmalloc"
-# gperftools compilation fails for arm below v7 because of missing support of
-# dmb operation. So we use system-allocator instead of tcmalloc
-PACKAGECONFIG_remove_armv6 = "tcmalloc"
-PACKAGECONFIG_remove_libc-musl = "tcmalloc"
-
-#std::current_exception is undefined for arm < v6
-COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
-COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
-COMPATIBLE_MACHINE_armv7a = "(!.*armv7a).*"
-COMPATIBLE_MACHINE_armv7ve = "(!.*armv7ve).*"
-COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
-COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*"
-
-PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
-PACKAGECONFIG[wiredtiger] = "--wiredtiger=on,--wiredtiger=off,,"
-
-EXTRA_OESCONS = "--prefix=${D}${prefix} \
-                 LIBPATH=${STAGING_LIBDIR} \
-                 LINKFLAGS='${LDFLAGS}' \
-                 CXXFLAGS='${CXXFLAGS}' \
-                 TARGET_ARCH=${TARGET_ARCH} \
-                 --ssl \
-                 --disable-warnings-as-errors \
-                 --use-system-pcre \
-                 --use-system-zlib \
-                 --js-engine=none \
-                 --nostrip \
-                 --endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
-                 ${PACKAGECONFIG_CONFARGS} \
-                 mongod mongos"
-
-do_configure_prepend() {
-        # tests use hex floats, not supported in plain C++
-        sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
-}
-scons_do_compile() {
-        ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
-        die "scons build execution failed."
-}
-
-scons_do_install() {
-        ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
-        die "scons install execution failed."
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb.inc b/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb.inc
deleted file mode 100644
index 263b313..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb.inc
+++ /dev/null
@@ -1,293 +0,0 @@
-SUMMARY = "A robust, scalable, and reliable SQL server"
-HOMEPAGE = "http://mariadb.org"
-SECTION = "libs"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "https://downloads.mariadb.org/f/${BP}/source/${BP}.tar.gz \
-           file://fix-cmake-module-path.patch \
-           file://remove-bad-path.patch \
-           file://fix-mysqlclient-r-version.patch \
-           file://my.cnf \
-           file://mysqld.service \
-           file://install_db.service \
-           file://install_db \
-           file://mysql-systemd-start \
-           file://configure.cmake-fix-valgrind.patch \
-           file://fix-a-building-failure.patch \
-           file://change-cc-to-cc-version.patch \
-           file://0001-disable-ucontext-on-musl.patch \
-          "
-
-SRC_URI[md5sum] = "2d4104aae0b9e5efa8878918bd329cb4"
-SRC_URI[sha256sum] = "5dbde98d7e4a5a1721b6cbed7898b2549a88866247951cf586057975c6cea641"
-
-S = "${WORKDIR}/mariadb-${PV}"
-
-BINCONFIG_GLOB = "mysql_config"
-
-inherit cmake gettext binconfig update-rc.d useradd systemd
-
-INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb"
-INITSCRIPT_NAME_${PN}-server = "mysqld"
-INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ."
-
-USERADD_PACKAGES = "${PN}-server"
-USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql"
-GROUPADD_PARAM_${PN}-server = "--system mysql"
-
-INITSCRIPT_NAME_${PN}-setupdb = "install_db"
-INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44"
-
-SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb"
-SYSTEMD_SERVICE_${PN}-server = "mysqld.service"
-SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable"
-
-SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service"
-SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable"
-ALLOW_EMPTY_${PN}-setupdb ?= "1"
-FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db"
-
-EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb"
-PACKAGECONFIG_class-native = ""
-PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
-PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind"
-PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit"
-PACKAGECONFIG[krb5] = ", ,krb5"
-PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb"
-
-# MariaDB doesn't link properly with gold
-# https://mariadb.atlassian.net/browse/MDEV-5982
-TARGET_CFLAGS += "-fuse-ld=bfd"
-
-BUILD_CFLAGS += "-fuse-ld=bfd"
-BUILD_CXXFLAGS += "-fuse-ld=bfd"
-
-EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
-                 -DWITH_JEMALLOC=no \
-                 -DWITHOUT_TOKUDB=TRUE \
-                 -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
-                 -DGROFF=FALSE \
-                 -DNROFF=FALSE \
-                 -DENABLE_DTRACE=FALSE \
-                 -DWITH_PIC=ON \
-                 -DINSTALL_LAYOUT=RPM \
-                 -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \
-                 -DINSTALL_LIBDIR:PATH=${baselib} \
-                 -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \
-                 -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
-                 -DMYSQL_DATADIR:PATH=/var/mysql \
-                 -DCAT_EXECUTABLE=`which cat` \
-                 -DCMAKE_AR:FILEPATH=${AR}"
-
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-do_configure_append() {
-    # handle distros with different values of ${libexecdir}
-    libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
-    sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
-    sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh
-    sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
-}
-
-do_generate_toolchain_file_append_class-native () {
-    # If these are set cmake will assume we're cross-compiling, which will
-    # result in certain things we want being disabled
-    sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
-    sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
-}
-
-do_compile_prepend_class-target () {
-    # These need to be in-tree or make will think they need to be built,
-    # and since we're cross-compiling that is disabled
-    cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
-    cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
-
-    if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then
-        if ! [ -e ${B}/include/openssl/kssl.h ] ; then
-            mkdir -p ${B}/include/openssl
-            echo "#ifndef KSSL_H" >${B}/include/openssl/kssl.h
-            echo "#define KSSL_H" >>${B}/include/openssl/kssl.h
-            echo "#include <openssl/opensslconf.h>">>${B}/include/openssl/kssl.h
-            echo "#endif" >>${B}/include/openssl/kssl.h
-        fi
-    fi
-}
-
-SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
-
-# We need to append this so it runs *after* binconfig's preprocess function
-#
-# We really don't care exactly what the directories were set to originally.
-# plugindir is not fixed, but we don't create any plugins.
-#
-mariadb_sysroot_preprocess () {
-    sed -i -es,^pkgincludedir=.*,pkgincludedir=\'${STAGING_INCDIR}/mysql\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
-    sed -i -es,^pkglibdir=.*,pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
-}
-
-do_install() {
-    oe_runmake 'DESTDIR=${D}' install
-
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
-    install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/
-    mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system
-    sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \
-                                                                   ${D}${systemd_unitdir}/system/install_db.service
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        echo "f /var/log/mysqld.err 0640 mysql mysql -" \
-            > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf
-    fi
-    install -d ${D}${bindir}
-    install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir}
-    install -d ${D}${datadir}/doc/${PN}
-    if [ -f ${D}${datadir}/doc/README ]; then
-        mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
-    fi
-}
-
-PACKAGES = "${PN}-dbg ${PN} \
-    libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev libmysqlclient-r-dbg \
-    libmysqlclient libmysqlclient-dev libmysqlclient-staticdev libmysqlclient-dbg \
-    libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers"
-CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf"
-CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf"
-CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf"
-
-FILES_${PN} = " "
-RDEPENDS_${PN} = "${PN}-client ${PN}-server"
-ALLOW_EMPTY_${PN} = "1"
-
-RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \
-    perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \
-    perl-module-exporter"
-RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \
-    perl-module-file-basename perl-module-file-path perl-module-sys-hostname \
-    perl-module-file-copy perl-module-file-temp perl-module-posix \
-    ${PN}-client libdbi-perl libdbd-mysql-perl"
-RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \
-    perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \
-    perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \
-    perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \
-    perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \
-    perl-module-io-socket-inet perl-module-io-select"
-RDEPENDS_${PN}-setupdb = "coreutils"
-
-# Allow old code to link to the backward compatible library
-RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev"
-
-FILES_libmysqlclient = "\
-    ${libdir}/libmysqlclient.so.* \
-    ${sysconfdir}/my.cnf.d/client.cnf"
-FILES_libmysqlclient-dev = " \
-    ${includedir}/mysql/ \
-    ${libdir}/libmysqlclient.so \
-    ${sysconfdir}/aclocal \
-    ${bindir}/mysql_config"
-FILES_libmysqlclient-staticdev = "\
-    ${libdir}/*.a"
-FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
-    ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
-
-# Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0
-# which are intentionally non-PIC on 32-bit x86 (see e.g.
-# storage/xtradb/plug.in in the source)
-INSANE_SKIP_libmysqlclient_append_x86 = " textrel"
-
-FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
-FILES_libmysqlclient-r-dev = "\
-    ${libdir}/libmysqlclient_r.so"
-FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
-FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*"
-
-FILES_libmysqld = "\
-    ${libdir}/libmysqld.so.*"
-FILES_libmysqld-dev = "\
-    ${libdir}/libmysqld.so"
-
-FILES_${PN}-client = "\
-    ${bindir}/myisam_ftdump \
-    ${bindir}/mysql \
-    ${bindir}/mysql_client_test \
-    ${bindir}/mysql_client_test_embedded \
-    ${bindir}/mysql_find_rows \
-    ${bindir}/mysql_fix_extensions \
-    ${bindir}/mysql_waitpid \
-    ${bindir}/mysqlaccess \
-    ${bindir}/mysqladmin \
-    ${bindir}/mysqlbug \
-    ${bindir}/mysqlcheck \
-    ${bindir}/mysqldump \
-    ${bindir}/mysqldumpslow \
-    ${bindir}/mysqlimport \
-    ${bindir}/mysqlshow \
-    ${bindir}/mysqlslap \
-    ${bindir}/mysqltest_embedded \
-    ${libexecdir}/mysqlmanager \
-    ${sysconfdir}/my.cnf.d/mysql-clients.cnf"
-
-FILES_${PN}-server = "\
-    ${bindir}/comp_err \
-    ${bindir}/isamchk \
-    ${bindir}/isamlog \
-    ${bindir}/msql2mysql \
-    ${bindir}/my_print_defaults \
-    ${bindir}/myisamchk \
-    ${bindir}/myisamlog \
-    ${bindir}/myisampack \
-    ${bindir}/mysql_convert_table_format \
-    ${bindir}/mysql_fix_privilege_tables \
-    ${bindir}/mysql_install_db \
-    ${bindir}/mysql_secure_installation \
-    ${bindir}/mysql_setpermission \
-    ${bindir}/mysql-systemd-start \
-    ${bindir}/mysql_tzinfo_to_sql \
-    ${bindir}/mysql_upgrade \
-    ${bindir}/mysql_plugin \
-    ${bindir}/mysql_zap \
-    ${bindir}/mysqlbinlog \
-    ${bindir}/mysqld_multi \
-    ${bindir}/mysqld_safe \
-    ${bindir}/mysqld_safe_helper \
-    ${bindir}/mysqlhotcopy \
-    ${bindir}/mysqltest \
-    ${bindir}/ndb_delete_all \
-    ${bindir}/ndb_desc \
-    ${bindir}/ndb_drop_index \
-    ${bindir}/ndb_drop_table \
-    ${bindir}/ndb_mgm \
-    ${bindir}/ndb_restore \
-    ${bindir}/ndb_select_all \
-    ${bindir}/ndb_select_count \
-    ${bindir}/ndb_show_tables \
-    ${bindir}/ndb_waiter \
-    ${bindir}/pack_isam \
-    ${bindir}/perror \
-    ${bindir}/replace \
-    ${bindir}/resolve_stack_dump \
-    ${bindir}/resolveip \
-    ${libexecdir}/mysqld \
-    ${sbindir}/mysqld \
-    ${sbindir}/ndb_cpcd \
-    ${sbindir}/ndbd \
-    ${sbindir}/ndb_mgmd \
-    ${libdir}/plugin/*.so \
-    ${datadir}/mysql/ \
-    ${localstatedir}/mysql/ \
-    ${sysconfdir}/init.d/mysqld \
-    ${sysconfdir}/my.cnf \
-    ${sysconfdir}/my.cnf.d/server.cnf \
-    ${sysconfdir}/tmpfiles.d"
-
-DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}"
-FILES_${PN}-leftovers = "/"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
deleted file mode 100644
index 7516619..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001
-From: Tor Didriksen <tor.didriksen@oracle.com>
-Date: Mon, 24 Jun 2013 17:15:35 +0200
-Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18
-
-With this patch, the libmysql/ directory contains:
-libmysqlclient.a
-libmysqlclient_r.a -> libmysqlclient.a
-libmysqlclient_r.so -> libmysqlclient.so*
-libmysqlclient_r.so.18 -> libmysqlclient.so.18*
-libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0*
-libmysqlclient.so -> libmysqlclient.so.18*
-libmysqlclient.so.18 -> libmysqlclient.so.18.1.0*
-libmysqlclient.so.18.1.0*
-
-This fixes libmysqlclient_r symlinks pointing to the unversioned
-libmysqlclient.so symlink (leading to package QA errors since the
-libmysqlclient-r package ends up depending on libmysqlclient-dev).
-
-Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- cmake/install_macros.cmake | 25 +++++++++++++++----------
- cmake/mysql_version.cmake  |  3 ++-
- libmysql/CMakeLists.txt    | 36 ++++++++++++++++++++++++++++--------
- 3 files changed, 45 insertions(+), 19 deletions(-)
-
-diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
-index b8efdf8..a0d0e68 100644
---- a/cmake/install_macros.cmake
-+++ b/cmake/install_macros.cmake
-@@ -1,4 +1,4 @@
--# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
- # 
- # 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
-@@ -111,28 +111,33 @@ FUNCTION(INSTALL_SCRIPT)
- ENDFUNCTION()
- 
- # Install symbolic link to CMake target. 
--# the link is created in the same directory as target
--# and extension will be the same as for target file.
--MACRO(INSTALL_SYMLINK linkname target destination component)
-+# We do 'cd path; ln -s target_name link_name'
-+# We also add an INSTALL target for "${path}/${link_name}"
-+MACRO(INSTALL_SYMLINK target target_name link_name destination component)
- IF(UNIX)
-   GET_TARGET_PROPERTY(location ${target} LOCATION)
-   GET_FILENAME_COMPONENT(path ${location} PATH)
--  GET_FILENAME_COMPONENT(name ${location} NAME)
--  SET(output ${path}/${linkname})
-+  MESSAGE(STATUS "target ${target}")
-+  MESSAGE(STATUS "link_name ${link_name}")
-+  MESSAGE(STATUS "target_name ${target_name}")
-+  MESSAGE(STATUS "path ${path}")
-+  MESSAGE(STATUS "")
-+
-+  SET(output ${path}/${link_name})
-   ADD_CUSTOM_COMMAND(
-     OUTPUT ${output}
-     COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
-     COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink 
--      ${name} 
--      ${linkname}
-+      ${target_name} 
-+      ${link_name}
-     WORKING_DIRECTORY ${path}
-     DEPENDS ${target}
-     )
-   
--  ADD_CUSTOM_TARGET(symlink_${linkname}
-+  ADD_CUSTOM_TARGET(symlink_${link_name}
-     ALL
-     DEPENDS ${output})
--  SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-+  SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-   IF(CMAKE_GENERATOR MATCHES "Xcode")
-     # For Xcode, replace project config with install config
-     STRING(REPLACE "${CMAKE_CFG_INTDIR}" 
-diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
-index be5760f..96286ff 100644
---- a/libmysql/CMakeLists.txt
-+++ b/libmysql/CMakeLists.txt
-@@ -180,6 +180,12 @@ IF(MSVC)
-  INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
- ENDIF()
- 
-+MACRO(GET_TARGET_NAME target out_name)
-+  GET_TARGET_PROPERTY(location ${target} LOCATION)
-+  GET_FILENAME_COMPONENT(name ${location} NAME)
-+  SET(${out_name} ${name})
-+ENDMACRO()
-+
- IF(UNIX)
-   MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME)
-     SET(DOT_VERSION ".${VERSION}")
-@@ -192,7 +198,13 @@ IF(UNIX)
-       SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
-     ENDIF() 
-   ENDMACRO()
--  INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
-+ENDIF()
-+
-+IF(UNIX)
-+  GET_TARGET_NAME(mysqlclient lib_name)
-+  INSTALL_SYMLINK(mysqlclient
-+    ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a
-+    ${INSTALL_LIBDIR} Development)
- ENDIF()
- 
- IF(NOT DISABLE_SHARED)
-@@ -205,10 +217,9 @@ IF(NOT DISABLE_SHARED)
-     # libtool compatability
-     IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
-       SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
--    ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
--      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
-     ELSE()
--      SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
-+      SET(OS_SHARED_LIB_VERSION
-+        "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0")
-     ENDIF()
-     # Name of shared library is mysqlclient on Unix
-     SET_TARGET_PROPERTIES(libmysql PROPERTIES 
-@@ -239,8 +250,13 @@ IF(NOT DISABLE_SHARED)
-       "${CMAKE_SHARED_LIBRARY_SUFFIX}"
-       ""
-       linkname)
--    INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
--    SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
-+    GET_TARGET_NAME(libmysql lib_name)
-+    GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE)
-+    INSTALL_SYMLINK(libmysql
-+      ${lib_name} ${linkname}
-+      ${INSTALL_LIBDIR} SharedLibraries)
-+    SET(OS_SHARED_LIB_SYMLINKS
-+      "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
-     LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
-     FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
-       GET_VERSIONED_LIBNAME(
-@@ -248,7 +264,11 @@ IF(NOT DISABLE_SHARED)
-         "${CMAKE_SHARED_LIBRARY_SUFFIX}"
-         "${ver}"
-         linkname)
--      INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
-+      GET_VERSIONED_LIBNAME(
-+        ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver)
-+      INSTALL_SYMLINK(libmysql
-+        ${lib_name_ver} ${linkname}
-+        ${INSTALL_LIBDIR} SharedLibraries)
-     ENDFOREACH()
-   ENDIF()
- ENDIF()
--- 
-2.0.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/nano/nano_2.7.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/nano/nano_2.7.4.bb
deleted file mode 100644
index eaf393e..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/nano/nano_2.7.4.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include nano.inc
-
-SRC_URI[md5sum] = "c011c7f9e47cb1da27d4e7cc8b56ec6a"
-SRC_URI[sha256sum] = "752170643039e2c95a433de357f0c70a8c4c4c561a90a7e7259a63e225b659b9"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/nano/nano_2.9.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/nano/nano_2.9.3.bb
new file mode 100644
index 0000000..afb0cf2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/nano/nano_2.9.3.bb
@@ -0,0 +1,4 @@
+include nano.inc
+
+SRC_URI[md5sum] = "6dd37f010d6a985bf0e5f8ed091ff919"
+SRC_URI[sha256sum] = "7783bcfd4b2d5dc0bf64d4bd07b1a19e7ba3c91da881a4249772a36b972d4012"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/ne10/ne10_1.2.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
index e5b50ce..76e0741 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
@@ -29,7 +29,7 @@
         d.setVar('NE10_TARGET_ARCH', 'aarch64')
         bb.debug(2, 'Building Ne10 for aarch64')
     else:
-        raise bb.parse.SkipPackage("Incompatible with archs other than armv7 and aarch64")
+        raise bb.parse.SkipRecipe("Incompatible with archs other than armv7 and aarch64")
 }
 
 do_install() {
diff --git a/import-layers/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/neon/neon/pkgconfig.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-support/neon/neon/pkgconfig.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/neon/neon_0.30.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/neon/neon_0.30.2.bb
new file mode 100644
index 0000000..00b79f6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/neon/neon_0.30.2.bb
@@ -0,0 +1,38 @@
+SUMMARY = "An HTTP and WebDAV client library with a C interface"
+HOMEPAGE = "http://www.webdav.org/neon/"
+SECTION = "libs"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
+                    file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/neon27/neon27_${PV}.orig.tar.gz \
+           file://pkgconfig.patch \
+          "
+
+SRC_URI[md5sum] = "e28d77bf14032d7f5046b3930704ef41"
+SRC_URI[sha256sum] = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca"
+
+inherit autotools binconfig-disabled lib_package pkgconfig
+
+# Enable gnutls or openssl, not both
+PACKAGECONFIG ?= "expat gnutls libproxy webdav zlib"
+PACKAGECONFIG_class-native = "expat gnutls webdav zlib"
+
+PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
+PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
+PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
+PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
+PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2"
+PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
+PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+
+EXTRA_OECONF += "--enable-shared"
+
+do_compile_append() {
+    oe_runmake -C test
+}
+
+BINCONFIG = "${bindir}/neon-config"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/nghttp2/nghttp2_1.26.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/nghttp2/nghttp2_1.26.0.bb
deleted file mode 100644
index 3e6b10a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/nghttp2/nghttp2_1.26.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "HTTP/2 C Library and tools"
-HOMEPAGE = "https://nghttp2.org/"
-SECTION = "libs"
-
-DEPENDS = "pkgconfig cunit zlib openssl libxml2 jansson c-ares"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-SRC_URI = "https://github.com/nghttp2/nghttp2/releases/download/v${PV}/nghttp2-${PV}.tar.bz2"
-SRC_URI[md5sum] = "926f07ad3b50f38f7d8935ced04716cf"
-SRC_URI[sha256sum] = "0df4229f4123b5aa96e834ebcfdffe954e93d986f0252fd10123d50c6f010983"
-
-inherit cmake pythonnative python-dir
-
-EXTRA_OECMAKE = ""
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init b/import-layers/meta-openembedded/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init
new file mode 100644
index 0000000..3828046
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/open-vm-tools/files/vmtoolsd.init
@@ -0,0 +1,66 @@
+#!/bin/sh
+#
+#   vmtoolsd          Start/stop the vmware tools daemon
+#
+# chkconfig:  2345 90 60
+# description: vmtoolsd is a daemon that starts up.  for some reason, it
+#              doesn't include a sysv init startup file in the latest release.
+#              so i have to write this
+#
+
+### BEGIN INIT INFO
+# Provides: vmtoolsd
+# Required-Start: $local_fs $syslog
+# Required-Stop: $local_fs $syslog
+# Default-Start: 2345
+# Default-Stop: 90
+# Short-Description: Run vmware tools daemon
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/vmtoolsd
+NAME=vmtoolsd
+DESC="vmware tools daemon"
+VMTOOLSDARGS=" -b /var/run/vmtoolsd.pid "
+RETVAL="1"
+
+# source function library
+. /etc/init.d/functions
+
+test -f $DAEMON || exit 0
+
+
+case "$1" in
+  start)
+    echo -n "Starting vmware tools daemon: "
+    start-stop-daemon --start --quiet --exec $DAEMON -- $VMTOOLSDARGS
+    RETVAL=$?
+    if [ $RETVAL -eq 0 ] ; then
+        echo "OK"
+    else
+        echo "FAIL"
+    fi
+    ;;
+  stop)
+    echo -n "Stopping vmware tools daemon: "
+    start-stop-daemon --stop --quiet --pidfile /var/run/vmtoolsd.pid
+    RETVAL=$?
+    if [ $RETVAL -eq 0 ] ; then
+        echo "OK"
+    else
+        echo "FAIL"
+    fi
+    ;;
+  status)
+    status vmtoolsd
+    exit $?
+    ;;
+  restart)
+    $0 stop && sleep 1 && $0 start
+    ;;
+  *)
+    echo "Usage: /etc/init.d/vmtoolsd {start|stop|status|restart}"
+    exit 1
+esac
+
+exit $RETVAL
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb
index 81e8e96..c32d2c5 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.1.5.bb
@@ -24,6 +24,7 @@
 SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \
            file://tools.conf \
            file://vmtoolsd.service \
+           file://vmtoolsd.init \
            file://0001-configure.ac-don-t-use-dnet-config.patch \
            file://0002-add-include-sys-sysmacros.h.patch \
            file://0001-Remove-assumptions-about-glibc-being-only-libc-imple.patch \
@@ -50,7 +51,7 @@
 # open-vm-tools is supported only on x86.
 COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux'
 
-inherit autotools pkgconfig systemd
+inherit autotools pkgconfig systemd update-rc.d
 
 SYSTEMD_SERVICE_${PN} = "vmtoolsd.service"
 
@@ -85,8 +86,14 @@
 
 do_install_append() {
     ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs
-    install -d ${D}${systemd_unitdir}/system ${D}${sysconfdir}/vmware-tools
-    install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system
+    install -d ${D}${sysconfdir}/vmware-tools
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system
+    else
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${WORKDIR}/vmtoolsd.init ${D}${sysconfdir}/init.d/vmtoolsd
+    fi
     install -m 0644 ${WORKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf
 }
 
@@ -95,6 +102,10 @@
     export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so
 }
 
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "vmtoolsd"
+INITSCRIPT_PARAMS_${PN} = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+
 python() {
     if 'networking-layer' not in d.getVar('BBFILE_COLLECTIONS').split() or \
 	'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split():
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb
index c7d7203..913290c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb
@@ -25,7 +25,7 @@
 LICENSE = "LGPLv2+"
 LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
-inherit ${@bb.utils.filter('VIRTUAL-RUNTIME_init_manager', 'systemd', d)}
+inherit systemd
 SYSTEMD_SERVICE_${PN} += "openct.service "
 SYSTEMD_AUTO_ENABLE = "enable"
 
@@ -77,10 +77,8 @@
     install -Dpm 755 ${WORKDIR}/openct.init ${D}/etc/init.d/openct
     install -Dpm 644 ${WORKDIR}/openct.sysconfig ${D}/etc/sysconfig/openct
 
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/openct.service ${D}/${systemd_unitdir}/system
-    fi
+    install -d ${D}/${systemd_unitdir}/system
+    install -m 644 ${WORKDIR}/openct.service ${D}/${systemd_unitdir}/system
 
     so=$(find ${D} -name \*.so | sed "s|^${D}||")
     sed -i -e 's|\\(LIBPATH\\s*\\).*|\\1$so|' etc/reader.conf
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/already-exists.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/already-exists.patch
new file mode 100644
index 0000000..6e24f2d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/already-exists.patch
@@ -0,0 +1,394 @@
+From e4bf148cddf277834e57c9afeec8daff8378a655 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Wed, 22 Nov 2017 15:27:07 +0100
+Subject: [PATCH] Fix: File already exists in database: caffe.proto
+
+Fixes error when importing python cv
+
+Upstream-status: Backport https://github.com/opencv/opencv/pull/10092
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+---
+ modules/dnn/CMakeLists.txt                                | 6 +++---
+ modules/dnn/src/caffe/caffe_importer.cpp                  | 1 -
+ modules/dnn/src/caffe/caffe_io.cpp                        | 1 -
+ modules/dnn/src/caffe/caffe_io.hpp                        | 2 +-
+ modules/dnn/src/caffe/{caffe.proto => opencv-caffe.proto} | 0
+ 5 files changed, 4 insertions(+), 6 deletions(-)
+ rename modules/dnn/src/caffe/{caffe.proto => opencv-caffe.proto} (100%)
+
+diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt
+index c6329a742263..8ef00ef983ff 100644
+--- a/modules/dnn/CMakeLists.txt
++++ b/modules/dnn/CMakeLists.txt
+@@ -55,13 +55,13 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS
+ 
+ if(PROTOBUF_UPDATE_FILES)
+   file(GLOB proto_files src/tensorflow/*.proto)
+-  list(APPEND proto_files src/caffe/caffe.proto)
++  list(APPEND proto_files src/caffe/opencv-caffe.proto)
+   PROTOBUF_GENERATE_CPP(Protobuf_HDRS Protobuf_SRCS ${proto_files})
+ else()
+   file(GLOB fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/tensorflow/*.cc)
+   file(GLOB fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/tensorflow/*.h)
+-  list(APPEND fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.cc)
+-  list(APPEND fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.h)
++  list(APPEND fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/opencv-caffe.pb.cc)
++  list(APPEND fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/opencv-caffe.pb.h)
+   list(APPEND Protobuf_SRCS ${fw_srcs})
+   list(APPEND Protobuf_HDRS ${fw_hdrs})
+   list(APPEND Protobuf_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe)
+diff --git a/modules/dnn/src/caffe/caffe_importer.cpp b/modules/dnn/src/caffe/caffe_importer.cpp
+index c075651b95b3..2c977c84b0f4 100644
+--- a/modules/dnn/src/caffe/caffe_importer.cpp
++++ b/modules/dnn/src/caffe/caffe_importer.cpp
+@@ -42,7 +42,6 @@
+ #include "../precomp.hpp"
+ 
+ #ifdef HAVE_PROTOBUF
+-#include "caffe.pb.h"
+ 
+ #include <iostream>
+ #include <fstream>
+diff --git a/modules/dnn/src/caffe/caffe_io.cpp b/modules/dnn/src/caffe/caffe_io.cpp
+index 0f46ea77df9a..1d3c518f1328 100644
+--- a/modules/dnn/src/caffe/caffe_io.cpp
++++ b/modules/dnn/src/caffe/caffe_io.cpp
+@@ -99,7 +99,6 @@
+ #include <fstream>
+ #include <vector>
+ 
+-#include "caffe.pb.h"
+ #include "caffe_io.hpp"
+ #include "glog_emulator.hpp"
+ 
+diff --git a/modules/dnn/src/caffe/caffe_io.hpp b/modules/dnn/src/caffe/caffe_io.hpp
+index 09bc5709a24e..f5912c3bcec1 100644
+--- a/modules/dnn/src/caffe/caffe_io.hpp
++++ b/modules/dnn/src/caffe/caffe_io.hpp
+@@ -91,7 +91,7 @@
+ #define __OPENCV_DNN_CAFFE_IO_HPP__
+ #ifdef HAVE_PROTOBUF
+ 
+-#include "caffe.pb.h"
++#include "opencv-caffe.pb.h"
+ 
+ namespace cv {
+ namespace dnn {
+diff --git a/modules/dnn/src/caffe/caffe.proto b/modules/dnn/src/caffe/opencv-caffe.proto
+similarity index 100%
+rename from modules/dnn/src/caffe/caffe.proto
+rename to modules/dnn/src/caffe/opencv-caffe.proto
+diff --git a/modules/dnn/src/layers/detection_output_layer.cpp b/modules/dnn/src/layers/detection_output_layer.cpp
+index 0b72326f7e7d..f413bad5b81a 100644
+--- a/modules/dnn/src/layers/detection_output_layer.cpp
++++ b/modules/dnn/src/layers/detection_output_layer.cpp
+@@ -44,7 +44,7 @@
+ #include "layers_common.hpp"
+ #include <float.h>
+ #include <string>
+-#include <caffe.pb.h>
++#include <opencv-caffe.pb.h>
+ 
+ namespace cv
+ {
+diff --git a/modules/dnn/src/caffe/caffe_importer.cpp b/modules/dnn/src/caffe/caffe_importer.cpp
+index 2c977c84b0f4..a1827a381117 100644
+--- a/modules/dnn/src/caffe/caffe_importer.cpp
++++ b/modules/dnn/src/caffe/caffe_importer.cpp
+@@ -78,8 +78,8 @@ static cv::String toString(const T &v)
+ 
+ class CaffeImporter : public Importer
+ {
+-    caffe::NetParameter net;
+-    caffe::NetParameter netBinary;
++    opencvcaffe::NetParameter net;
++    opencvcaffe::NetParameter netBinary;
+ 
+ public:
+ 
+@@ -197,7 +197,7 @@ public:
+         }
+     }
+ 
+-    void blobShapeFromProto(const caffe::BlobProto &pbBlob, MatShape& shape)
++    void blobShapeFromProto(const opencvcaffe::BlobProto &pbBlob, MatShape& shape)
+     {
+         shape.clear();
+         if (pbBlob.has_num() || pbBlob.has_channels() || pbBlob.has_height() || pbBlob.has_width())
+@@ -209,7 +209,7 @@ public:
+         }
+         else if (pbBlob.has_shape())
+         {
+-            const caffe::BlobShape &_shape = pbBlob.shape();
++            const opencvcaffe::BlobShape &_shape = pbBlob.shape();
+ 
+             for (int i = 0; i < _shape.dim_size(); i++)
+                 shape.push_back((int)_shape.dim(i));
+@@ -218,7 +218,7 @@ public:
+             CV_Error(Error::StsError, "Unknown shape of input blob");
+     }
+ 
+-    void blobFromProto(const caffe::BlobProto &pbBlob, cv::Mat &dstBlob)
++    void blobFromProto(const opencvcaffe::BlobProto &pbBlob, cv::Mat &dstBlob)
+     {
+         MatShape shape;
+         blobShapeFromProto(pbBlob, shape);
+@@ -233,7 +233,7 @@ public:
+             dstData[i] = pbBlob.data(i);
+     }
+ 
+-    void extractBinaryLayerParms(const caffe::LayerParameter& layer, LayerParams& layerParams)
++    void extractBinaryLayerParms(const opencvcaffe::LayerParameter& layer, LayerParams& layerParams)
+     {
+         const std::string &name = layer.name();
+ 
+@@ -247,7 +247,7 @@ public:
+         if (li == netBinary.layer_size() || netBinary.layer(li).blobs_size() == 0)
+             return;
+ 
+-        const caffe::LayerParameter &binLayer = netBinary.layer(li);
++        const opencvcaffe::LayerParameter &binLayer = netBinary.layer(li);
+         layerParams.blobs.resize(binLayer.blobs_size());
+         for (int bi = 0; bi < binLayer.blobs_size(); bi++)
+         {
+@@ -289,7 +289,7 @@ public:
+ 
+         for (int li = 0; li < layersSize; li++)
+         {
+-            const caffe::LayerParameter &layer = net.layer(li);
++            const opencvcaffe::LayerParameter &layer = net.layer(li);
+             String name = layer.name();
+             String type = layer.type();
+             LayerParams layerParams;
+@@ -313,7 +313,7 @@ public:
+         addedBlobs.clear();
+     }
+ 
+-    void addOutput(const caffe::LayerParameter &layer, int layerId, int outNum)
++    void addOutput(const opencvcaffe::LayerParameter &layer, int layerId, int outNum)
+     {
+         const std::string &name = layer.top(outNum);
+ 
+diff --git a/modules/dnn/src/caffe/caffe_io.hpp b/modules/dnn/src/caffe/caffe_io.hpp
+index f5912c3bcec1..24cd5fa254eb 100644
+--- a/modules/dnn/src/caffe/caffe_io.hpp
++++ b/modules/dnn/src/caffe/caffe_io.hpp
+@@ -98,9 +98,9 @@ namespace dnn {
+ 
+ // Read parameters from a file into a NetParameter proto message.
+ void ReadNetParamsFromTextFileOrDie(const char* param_file,
+-                                    caffe::NetParameter* param);
++                                    opencvcaffe::NetParameter* param);
+ void ReadNetParamsFromBinaryFileOrDie(const char* param_file,
+-                                      caffe::NetParameter* param);
++                                      opencvcaffe::NetParameter* param);
+ 
+ }
+ }
+diff --git a/modules/dnn/src/caffe/opencv-caffe.proto b/modules/dnn/src/caffe/opencv-caffe.proto
+index 3d23fb48ea6a..df4e1d3269ae 100644
+--- a/modules/dnn/src/caffe/opencv-caffe.proto
++++ b/modules/dnn/src/caffe/opencv-caffe.proto
+@@ -48,7 +48,7 @@
+ 
+ syntax = "proto2";
+ 
+-package caffe;
++package opencvcaffe;
+ 
+ // Specifies the shape (dimensions) of a Blob.
+ message BlobShape {
+diff --git a/modules/dnn/src/layers/detection_output_layer.cpp b/modules/dnn/src/layers/detection_output_layer.cpp
+index f413bad5b81a..832c257eebf9 100644
+--- a/modules/dnn/src/layers/detection_output_layer.cpp
++++ b/modules/dnn/src/layers/detection_output_layer.cpp
+@@ -72,7 +72,7 @@ public:
+ 
+     int _backgroundLabelId;
+ 
+-    typedef caffe::PriorBoxParameter_CodeType CodeType;
++    typedef opencvcaffe::PriorBoxParameter_CodeType CodeType;
+     CodeType _codeType;
+ 
+     bool _varianceEncodedInTarget;
+@@ -85,7 +85,7 @@ public:
+     enum { _numAxes = 4 };
+     static const std::string _layerName;
+ 
+-    typedef std::map<int, std::vector<caffe::NormalizedBBox> > LabelBBox;
++    typedef std::map<int, std::vector<opencvcaffe::NormalizedBBox> > LabelBBox;
+ 
+     bool getParameterDict(const LayerParams &params,
+                           const std::string &parameterName,
+@@ -131,11 +131,11 @@ public:
+     {
+         String codeTypeString = params.get<String>("code_type").toLowerCase();
+         if (codeTypeString == "corner")
+-            _codeType = caffe::PriorBoxParameter_CodeType_CORNER;
++            _codeType = opencvcaffe::PriorBoxParameter_CodeType_CORNER;
+         else if (codeTypeString == "center_size")
+-            _codeType = caffe::PriorBoxParameter_CodeType_CENTER_SIZE;
++            _codeType = opencvcaffe::PriorBoxParameter_CodeType_CENTER_SIZE;
+         else
+-            _codeType = caffe::PriorBoxParameter_CodeType_CORNER;
++            _codeType = opencvcaffe::PriorBoxParameter_CodeType_CORNER;
+     }
+ 
+     DetectionOutputLayerImpl(const LayerParams &params)
+@@ -215,7 +215,7 @@ public:
+             GetConfidenceScores(confidenceData, num, numPriors, _numClasses, allConfidenceScores);
+ 
+             // Retrieve all prior bboxes
+-            std::vector<caffe::NormalizedBBox> priorBBoxes;
++            std::vector<opencvcaffe::NormalizedBBox> priorBBoxes;
+             std::vector<std::vector<float> > priorVariances;
+             GetPriorBBoxes(priorData, numPriors, priorBBoxes, priorVariances);
+ 
+@@ -272,7 +272,7 @@ public:
+             for (size_t j = 0; j < indices.size(); ++j, ++count)
+             {
+                 int idx = indices[j];
+-                const caffe::NormalizedBBox& decode_bbox = label_bboxes->second[idx];
++                const opencvcaffe::NormalizedBBox& decode_bbox = label_bboxes->second[idx];
+                 outputsData[count * 7] = i;
+                 outputsData[count * 7 + 1] = label;
+                 outputsData[count * 7 + 2] = scores[idx];
+@@ -355,7 +355,7 @@ public:
+ 
+     // Compute bbox size
+     template<bool normalized>
+-    static float BBoxSize(const caffe::NormalizedBBox& bbox)
++    static float BBoxSize(const opencvcaffe::NormalizedBBox& bbox)
+     {
+         if (bbox.xmax() < bbox.xmin() || bbox.ymax() < bbox.ymin())
+         {
+@@ -388,10 +388,10 @@ public:
+     // Decode a bbox according to a prior bbox
+     template<bool variance_encoded_in_target>
+     static void DecodeBBox(
+-        const caffe::NormalizedBBox& prior_bbox, const std::vector<float>& prior_variance,
++        const opencvcaffe::NormalizedBBox& prior_bbox, const std::vector<float>& prior_variance,
+         const CodeType code_type,
+-        const bool clip_bbox, const caffe::NormalizedBBox& bbox,
+-        caffe::NormalizedBBox& decode_bbox)
++        const bool clip_bbox, const opencvcaffe::NormalizedBBox& bbox,
++        opencvcaffe::NormalizedBBox& decode_bbox)
+     {
+         float bbox_xmin = variance_encoded_in_target ? bbox.xmin() : prior_variance[0] * bbox.xmin();
+         float bbox_ymin = variance_encoded_in_target ? bbox.ymin() : prior_variance[1] * bbox.ymin();
+@@ -399,13 +399,13 @@ public:
+         float bbox_ymax = variance_encoded_in_target ? bbox.ymax() : prior_variance[3] * bbox.ymax();
+         switch(code_type)
+         {
+-            case caffe::PriorBoxParameter_CodeType_CORNER:
++            case opencvcaffe::PriorBoxParameter_CodeType_CORNER:
+                 decode_bbox.set_xmin(prior_bbox.xmin() + bbox_xmin);
+                 decode_bbox.set_ymin(prior_bbox.ymin() + bbox_ymin);
+                 decode_bbox.set_xmax(prior_bbox.xmax() + bbox_xmax);
+                 decode_bbox.set_ymax(prior_bbox.ymax() + bbox_ymax);
+                 break;
+-            case caffe::PriorBoxParameter_CodeType_CENTER_SIZE:
++            case opencvcaffe::PriorBoxParameter_CodeType_CENTER_SIZE:
+             {
+                 float prior_width = prior_bbox.xmax() - prior_bbox.xmin();
+                 CV_Assert(prior_width > 0);
+@@ -431,7 +431,7 @@ public:
+         };
+         if (clip_bbox)
+         {
+-            // Clip the caffe::NormalizedBBox such that the range for each corner is [0, 1]
++            // Clip the opencvcaffe::NormalizedBBox such that the range for each corner is [0, 1]
+             decode_bbox.set_xmin(std::max(std::min(decode_bbox.xmin(), 1.f), 0.f));
+             decode_bbox.set_ymin(std::max(std::min(decode_bbox.ymin(), 1.f), 0.f));
+             decode_bbox.set_xmax(std::max(std::min(decode_bbox.xmax(), 1.f), 0.f));
+@@ -443,11 +443,11 @@ public:
+ 
+     // Decode a set of bboxes according to a set of prior bboxes
+     static void DecodeBBoxes(
+-        const std::vector<caffe::NormalizedBBox>& prior_bboxes,
++        const std::vector<opencvcaffe::NormalizedBBox>& prior_bboxes,
+         const std::vector<std::vector<float> >& prior_variances,
+         const CodeType code_type, const bool variance_encoded_in_target,
+-        const bool clip_bbox, const std::vector<caffe::NormalizedBBox>& bboxes,
+-        std::vector<caffe::NormalizedBBox>& decode_bboxes)
++        const bool clip_bbox, const std::vector<opencvcaffe::NormalizedBBox>& bboxes,
++        std::vector<opencvcaffe::NormalizedBBox>& decode_bboxes)
+     {
+         CV_Assert(prior_bboxes.size() == prior_variances.size());
+         CV_Assert(prior_bboxes.size() == bboxes.size());
+@@ -470,7 +470,7 @@ public:
+ 
+     // Decode all bboxes in a batch
+     static void DecodeBBoxesAll(const std::vector<LabelBBox>& all_loc_preds,
+-        const std::vector<caffe::NormalizedBBox>& prior_bboxes,
++        const std::vector<opencvcaffe::NormalizedBBox>& prior_bboxes,
+         const std::vector<std::vector<float> >& prior_variances,
+         const int num, const bool share_location,
+         const int num_loc_classes, const int background_label_id,
+@@ -503,10 +503,10 @@ public:
+     // Get prior bounding boxes from prior_data
+     //    prior_data: 1 x 2 x num_priors * 4 x 1 blob.
+     //    num_priors: number of priors.
+-    //    prior_bboxes: stores all the prior bboxes in the format of caffe::NormalizedBBox.
++    //    prior_bboxes: stores all the prior bboxes in the format of opencvcaffe::NormalizedBBox.
+     //    prior_variances: stores all the variances needed by prior bboxes.
+     static void GetPriorBBoxes(const float* priorData, const int& numPriors,
+-                        std::vector<caffe::NormalizedBBox>& priorBBoxes,
++                        std::vector<opencvcaffe::NormalizedBBox>& priorBBoxes,
+                         std::vector<std::vector<float> >& priorVariances)
+     {
+         priorBBoxes.clear(); priorBBoxes.resize(numPriors);
+@@ -514,7 +514,7 @@ public:
+         for (int i = 0; i < numPriors; ++i)
+         {
+             int startIdx = i * 4;
+-            caffe::NormalizedBBox& bbox = priorBBoxes[i];
++            opencvcaffe::NormalizedBBox& bbox = priorBBoxes[i];
+             bbox.set_xmin(priorData[startIdx]);
+             bbox.set_ymin(priorData[startIdx + 1]);
+             bbox.set_xmax(priorData[startIdx + 2]);
+@@ -565,7 +565,7 @@ public:
+                     {
+                         labelBBox[label].resize(numPredsPerClass);
+                     }
+-                    caffe::NormalizedBBox& bbox = labelBBox[label][p];
++                    opencvcaffe::NormalizedBBox& bbox = labelBBox[label][p];
+                     bbox.set_xmin(locData[startIdx + c * 4]);
+                     bbox.set_ymin(locData[startIdx + c * 4 + 1]);
+                     bbox.set_xmax(locData[startIdx + c * 4 + 2]);
+@@ -612,7 +612,7 @@ public:
+     //    nms_threshold: a threshold used in non maximum suppression.
+     //    top_k: if not -1, keep at most top_k picked indices.
+     //    indices: the kept indices of bboxes after nms.
+-    static void ApplyNMSFast(const std::vector<caffe::NormalizedBBox>& bboxes,
++    static void ApplyNMSFast(const std::vector<opencvcaffe::NormalizedBBox>& bboxes,
+           const std::vector<float>& scores, const float score_threshold,
+           const float nms_threshold, const float eta, const int top_k,
+           std::vector<int>& indices)
+@@ -674,10 +674,10 @@ public:
+ 
+     // Compute the jaccard (intersection over union IoU) overlap between two bboxes.
+     template<bool normalized>
+-    static float JaccardOverlap(const caffe::NormalizedBBox& bbox1,
+-                         const caffe::NormalizedBBox& bbox2)
++    static float JaccardOverlap(const opencvcaffe::NormalizedBBox& bbox1,
++                         const opencvcaffe::NormalizedBBox& bbox2)
+     {
+-        caffe::NormalizedBBox intersect_bbox;
++        opencvcaffe::NormalizedBBox intersect_bbox;
+         if (bbox2.xmin() > bbox1.xmax() || bbox2.xmax() < bbox1.xmin() ||
+             bbox2.ymin() > bbox1.ymax() || bbox2.ymax() < bbox1.ymin())
+         {
+diff --git a/modules/dnn/src/caffe/caffe_io.cpp b/modules/dnn/src/caffe/caffe_io.cpp
+index 1d3c518f1328..3cf6e255aa60 100644
+--- a/modules/dnn/src/caffe/caffe_io.cpp
++++ b/modules/dnn/src/caffe/caffe_io.cpp
+@@ -107,7 +107,7 @@ namespace dnn {
+ 
+ using std::string;
+ using std::map;
+-using namespace caffe;
++using namespace opencvcaffe;
+ using namespace ::google::protobuf;
+ using namespace ::google::protobuf::io;
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/javagen.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/javagen.patch
new file mode 100644
index 0000000..56526ec
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/javagen.patch
@@ -0,0 +1,16 @@
+Upstream-status: Inappropriate [OE specific] https://github.com/opencv/opencv/pull/10039#issuecomment-342539288
+
+Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
+diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt
+index 74bc0ef04169..4622fbf9a5f1 100644
+--- a/modules/java/CMakeLists.txt
++++ b/modules/java/CMakeLists.txt
+@@ -291,7 +291,7 @@ foreach(java_file ${step3_input_files})
+   endif()
+   if(__configure)
+     configure_file("${java_file}" "${java_src_dir}/${output_name}" @ONLY)
+-  elseif(NOT "${java_file}" MATCHES "${OpenCV_BINARY_DIR}/")
++  elseif(EXISTS "${java_file}" AND NOT "${java_file}" MATCHES "${OpenCV_BINARY_DIR}/")
+     configure_file("${java_file}" "${java_src_dir}/${output_name}" COPYONLY)
+   else()
+     add_custom_command(OUTPUT "${java_src_dir}/${output_name}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/protobuf.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/protobuf.patch
new file mode 100644
index 0000000..c63dc14
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/protobuf.patch
@@ -0,0 +1,57 @@
+Upstream-status: Inappropriate [OE specific]
+
+Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
+diff --git a/cmake/OpenCVFindLibProtobuf.cmake b/cmake/OpenCVFindLibProtobuf.cmake
+index b6ce1e7fd56b..e916ec0df2a6 100644
+--- a/cmake/OpenCVFindLibProtobuf.cmake
++++ b/cmake/OpenCVFindLibProtobuf.cmake
+@@ -7,21 +7,21 @@ OCV_OPTION(BUILD_PROTOBUF "Force to build libprotobuf from sources" ON)
+ OCV_OPTION(PROTOBUF_UPDATE_FILES "Force to rebuild .proto files" OFF)
+ 
+ if(PROTOBUF_UPDATE_FILES)
+-  if(NOT DEFINED Protobuf_PROTOC_EXECUTABLE)
++  if(NOT DEFINED PROTOBUF_PROTOC_EXECUTABLE)
+     find_package(Protobuf QUIET)
+   endif()
+-  if(DEFINED Protobuf_PROTOC_EXECUTABLE AND EXISTS ${Protobuf_PROTOC_EXECUTABLE})
+-    message(STATUS "The protocol buffer compiler is found (${Protobuf_PROTOC_EXECUTABLE})")
++  if(DEFINED PROTOBUF_PROTOC_EXECUTABLE AND EXISTS ${PROTOBUF_PROTOC_EXECUTABLE})
++    message(STATUS "The protocol buffer compiler is found (${PROTOBUF_PROTOC_EXECUTABLE})")
+   else()
+-    message(FATAL_ERROR "The protocol buffer compiler is not found (Protobuf_PROTOC_EXECUTABLE='${Protobuf_PROTOC_EXECUTABLE}')")
++    message(FATAL_ERROR "The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='${PROTOBUF_PROTOC_EXECUTABLE}')")
+   endif()
+ endif()
+ 
+-if(NOT BUILD_PROTOBUF AND NOT (DEFINED Protobuf_INCLUDE_DIRS AND DEFINED Protobuf_LIBRARIES))
++if(NOT BUILD_PROTOBUF AND NOT (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES))
+   find_package(Protobuf QUIET)
+ endif()
+ 
+-if(Protobuf_FOUND)
++if(PROTOBUF_FOUND OR (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES))
+   # nothing
+ else()
+   set(Protobuf_LIBRARIES libprotobuf)
+diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt
+index 2a71568d1a44..c6329a742263 100644
+--- a/modules/dnn/CMakeLists.txt
++++ b/modules/dnn/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(DEFINED BUILD_opencv_dnn AND NOT BUILD_opencv_dnn)
+ endif()
+ 
+ include(${OpenCV_SOURCE_DIR}/cmake/OpenCVFindLibProtobuf.cmake)
+-if(NOT Protobuf_FOUND)
++if(NOT PROTOBUF_FOUND)
+   ocv_module_disable(opencv_dnn)
+ endif()
+ 
+@@ -72,7 +72,7 @@ ocv_source_group("Src\\protobuf" FILES ${Protobuf_SRCS} ${Protobuf_HDRS})
+ ocv_module_include_directories(include ${Protobuf_INCLUDE_DIRS})
+ 
+ ocv_glob_module_sources(${Protobuf_SRCS} ${Protobuf_HDRS} ${CBLAS_H_PROXY_PATH})
+-ocv_create_module(${Protobuf_LIBRARIES} ${LAPACK_LIBRARIES})
++ocv_create_module(${PROTOBUF_LIBRARIES} ${LAPACK_LIBRARIES})
+ ocv_add_samples()
+ ocv_add_accuracy_tests()
+ ocv_add_perf_tests()
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/tinydnn.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/tinydnn.patch
new file mode 100644
index 0000000..c433fc3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv/tinydnn.patch
@@ -0,0 +1,34 @@
+Upstream-status: Inappropriate [OE specific]
+
+Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
+diff --git a/modules/dnn_modern/CMakeLists.txt b/modules/dnn_modern/CMakeLists.txt
+index 79b64b12160b..ba06a0a163e4 100644
+--- a/modules/dnn_modern/CMakeLists.txt
++++ b/modules/dnn_modern/CMakeLists.txt
+@@ -15,24 +15,8 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+ # MODULE REQUIREMENTS
+ # ----------------------------------------------------------------------------
+ 
+-set(TINY_DNN_CPP_PATH "${OpenCV_BINARY_DIR}/3rdparty/tinydnn")
+-set(TINY_DNN_CPP_ROOT "${TINY_DNN_CPP_PATH}/tiny-dnn-1.0.0a3")
+-ocv_download(FILENAME "v1.0.0a3.tar.gz"
+-               HASH "adb1c512e09ca2c7a6faef36f9c53e59"
+-               URL
+-                 "${OPENCV_TINY_DNN_URL}"
+-                 "$ENV{OPENCV_TINY_DNN_URL}"
+-                 "https://github.com/tiny-dnn/tiny-dnn/archive/"
+-               DESTINATION_DIR "${TINY_DNN_CPP_PATH}"
+-               STATUS TINY_DNN_DOWNLOAD_SUCCESS
+-               ID "tiny-dnn"
+-               UNPACK RELATIVE_URL)
+-
+-if(NOT TINY_DNN_DOWNLOAD_SUCCESS)
+-  message(STATUS "Failed to download tiny-dnn sources")
+-endif()
+-
+-find_package(TinyDNN QUIET)
++set(TINYDNN_INCLUDE_DIRS "${OpenCV_SOURCE_DIR}/3rdparty/tinydnn/tiny-dnn-1.0.0a3")
++set(TinyDNN_FOUND TRUE)
+ 
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.3.bb
index dd9e4ca..ca62de7 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.3.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.3.bb
@@ -15,6 +15,8 @@
 SRCREV_ipp = "a62e20676a60ee0ad6581e217fe7e4bada3b95db"
 SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
 SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
+SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59"
+SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b"
 
 def ipp_filename(d):
     import re
@@ -41,9 +43,11 @@
     git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20170418;destsuffix=ipp;name=ipp \
     git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
     git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
+    https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \
     file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
     file://fixpkgconfig.patch \
     file://uselocalxfeatures.patch;patchdir=../contrib/ \
+    file://tinydnn.patch;patchdir=../contrib/ \
     file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \
     file://0003-To-fix-errors-as-following.patch \
     file://0001-build-workaround-GCC-7.1.1-compilation-issue-with-sa.patch \
@@ -53,12 +57,17 @@
     file://0001-carotene-don-t-use-__asm__-with-aarch64.patch \
     file://0002-Do-not-enable-asm-with-clang.patch \
     file://CVE-2017-14136.patch \
+    file://javagen.patch \
+    file://protobuf.patch \
+    file://already-exists.patch \
 "
 PV = "3.3+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
 do_unpack_extra() {
+    mkdir -p ${S}/3rdparty/tinydnn/
+    tar xzf ${WORKDIR}/v1.0.0a3.tar.gz -C ${S}/3rdparty/tinydnn/
     tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR}
     cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
     cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
@@ -68,13 +77,13 @@
 EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
     -DWITH_1394=OFF \
     -DCMAKE_SKIP_RPATH=ON \
-    -DOPENCV_ICV_PACKAGE_DOWNLOADED=${IPP_MD5} \
-    -DOPENCV_ICV_PATH=${WORKDIR}/ippicv_lnx \
+    -DOPENCV_ICV_HASH=${IPP_MD5} \
+    -DIPPROOT=${WORKDIR}/ippicv_lnx \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
-    ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
-    ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
+    ${@oe.utils.conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
+    ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
 "
 EXTRA_OECMAKE_append_x86 = " -DX86=ON"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/passwdqc/passwdqc_1.3.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/passwdqc/passwdqc_1.3.1.bb
deleted file mode 100644
index 198db3c..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/passwdqc/passwdqc_1.3.1.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "A password/passphrase strength checking and enforcement toolset"
-DESCRIPTION = "\
-passwdqc is a password/passphrase strength checking and policy enforcement \
-toolset, including an optional PAM module (pam_passwdqc), command-line \
-programs (pwqcheck and pwqgen), and a library (libpasswdqc). \
-pam_passwdqc is normally invoked on password changes by programs such as \
-passwd(1).  It is capable of checking password or passphrase strength, \
-enforcing a policy, and offering randomly-generated passphrases, with \
-all of these features being optional and easily (re-)configurable. \
-\
-pwqcheck and pwqgen are standalone password/passphrase strength checking \
-and random passphrase generator programs, respectively, which are usable \
-from scripts. \
-\
-libpasswdqc is the underlying library, which may also be used from \
-third-party programs. \
-"
-
-HOMEPAGE = "http://www.openwall.com/passwdqc"
-SECTION = "System Environment/Base"
-
-DEPENDS += "libpam"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1b4af6f3d4ee079a38107366e93b334d"
-
-SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \
-           file://makefile-add-ldflags.patch \
-          "
-SRC_URI[md5sum] = "3878b57bcd3fdbcf3d4b362dbc6228b9"
-SRC_URI[sha256sum] = "d1fedeaf759e8a0f32d28b5811ef11b5a5365154849190f4b7fab670a70ffb14"
-
-# explicitly define LINUX_PAM in case DISTRO_FEATURES no pam
-# this package's pam_passwdqc.so needs pam
-CFLAGS_append += "-Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM"
-
-# -e is no longer default setting in bitbake.conf
-EXTRA_OEMAKE = "-e"
-
-do_compile() {
-    # make sure sub make use environment to override variables in Makefile
-    # Linux)    $(MAKE), there is a tab between
-    sed -i -e 's/Linux)	$(MAKE) CFLAGS_lib/Linux)	$(MAKE) -e CFLAGS_lib/' ${S}/Makefile
-
-    # LD_lib and LD must be CC because of Makefile
-    oe_runmake LD="${CC}"
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D} SHARED_LIBDIR=${base_libdir} \
-           DEVEL_LIBDIR=${libdir} SECUREDIR=${base_libdir}/security \
-           INSTALL="install -p"
-}
-
-PROVIDES += "pam-${BPN}"
-PACKAGES =+ "lib${BPN} pam-${BPN}"
-
-FILES_lib${BPN} = "${base_libdir}/libpasswdqc.so.0"
-FILES_pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so"
-FILES_${PN}-dbg += "${base_libdir}/security/.debug"
-
-RDEPENDS_${PN} = "lib${BPN} pam-${BPN}"
-RDEPENDS_pam-${BPN} = "lib${BPN}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/pidgin-cross-python-265.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/pidgin-cross-python-265.patch
index 72bf4ed..312fc85 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/pidgin-cross-python-265.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/pidgin-cross-python-265.patch
@@ -1,9 +1,17 @@
-Use pkg-config instead of ${PYTHON}-config to find python
+From 855cc20bafa30597ae7a62f7672d42654b25cde0 Mon Sep 17 00:00:00 2001
+From: Herrie <github.com@herrie.org>
+Date: Mon, 24 Jul 2017 21:30:16 +0200
+Subject: [PATCH] Use pkg-config instead of ${PYTHON}-config to find python
 
-diff -uNr pidgin-2.10.12.orig/configure.ac pidgin-2.10.12/configure.ac
---- pidgin-2.10.12.orig/configure.ac	2016-01-01 00:19:40.000000000 +0100
-+++ pidgin-2.10.12/configure.ac	2016-05-05 16:55:13.258945925 +0200
-@@ -1585,20 +1585,15 @@
+---
+ configure.ac | 21 ++++++++-------------
+ 1 file changed, 8 insertions(+), 13 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d20a18e..c741829 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1567,20 +1567,15 @@ AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
  dnl Check for Python headers (currently useful only for libgnt)
  dnl (Thanks to XChat)
  if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch
index 293ef70..9a24fbb 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/purple-OE-branding-25.patch
@@ -1,8 +1,16 @@
-Index: pidgin-2.5.0/libpurple/protocols/irc/irc.h
-===================================================================
---- pidgin-2.5.0.orig/libpurple/protocols/irc/irc.h	2008-08-19 01:53:38.000000000 +0000
-+++ pidgin-2.5.0/libpurple/protocols/irc/irc.h	2008-08-27 11:15:58.000000000 +0000
-@@ -36,9 +36,9 @@
+From 43e9db656431ffb22b429d5fca4ce3b4af21bc9e Mon Sep 17 00:00:00 2001
+From: Herrie <github.com@herrie.org>
+Date: Mon, 24 Jul 2017 21:30:16 +0200
+
+---
+ libpurple/protocols/irc/irc.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libpurple/protocols/irc/irc.h b/libpurple/protocols/irc/irc.h
+index fde35c4..66e52dd 100644
+--- a/libpurple/protocols/irc/irc.h
++++ b/libpurple/protocols/irc/irc.h
+@@ -40,9 +40,9 @@
  
  #define IRC_DEFAULT_CHARSET "UTF-8"
  #define IRC_DEFAULT_AUTODETECT FALSE
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/sanitize-configure.ac.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/sanitize-configure.ac.patch
index a77d64f..84dbcdc 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/sanitize-configure.ac.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/pidgin/pidgin/sanitize-configure.ac.patch
@@ -1,6 +1,16 @@
---- /tmp/configure.ac	2007-05-08 17:29:02.000000000 +0200
-+++ pidgin-2.0.0/configure.ac	2007-05-08 17:30:30.325251000 +0200
-@@ -472,7 +472,7 @@
+From c3058f9eadaf5ff28ba776cfed54b609a93a1249 Mon Sep 17 00:00:00 2001
+From: Herrie <github.com@herrie.org>
+Date: Mon, 24 Jul 2017 21:30:16 +0200
+
+---
+ configure.ac | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b8acd2a..d20a18e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -642,7 +642,7 @@ if test "x$enable_consoleui" = "xyes"; then
  	if test "x$enable_consoleui" = "xyes"; then
  		dnl # Some distros put the headers in ncursesw/, some don't
  		found_ncurses_h=no
@@ -8,8 +18,8 @@
 +		for location in $ac_ncurses_includes $NCURSES_HEADERS 
  		do
  			f="$location/ncurses.h"
- 			AC_CHECK_HEADER($f,[
-@@ -1860,10 +1860,6 @@
+ 			orig_CFLAGS="$CFLAGS"
+@@ -2397,10 +2397,6 @@ if test "$kerberos" != "no" ; then
  			KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
  		fi
  		KRB4_LDFLAGS="-L${kerberos}/lib"
@@ -20,7 +30,7 @@
  	fi
  	AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
  
-@@ -1896,10 +1892,6 @@
+@@ -2433,10 +2429,6 @@ if test "$zephyr" != "no" ; then
  		ZEPHYR_LDFLAGS="-L${zephyr}/lib"
  	elif test -d /usr/athena/include/zephyr ; then
  		ZEPHYR_CFLAGS="-I/usr/athena/include"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poco/poco_1.7.9.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/poco/poco_1.7.9.bb
deleted file mode 100644
index ac65735..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/poco/poco_1.7.9.bb
+++ /dev/null
@@ -1,106 +0,0 @@
-SUMMARY = "Modern, powerful open source cross-platform C++ class libraries"
-DESCRIPTION = "Modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems."
-SECTION = "libs"
-HOMEPAGE = "http://pocoproject.org/"
-LICENSE = "BSL-1.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc"
-
-# These dependencies are required by Foundation
-DEPENDS = "libpcre zlib"
-
-inherit cmake ptest
-
-BBCLASSEXTEND = "native"
-
-SRCREV = "bfbe6a328744eaa84cb443b93ee20947aa0be91f"
-SRC_URI = " \
-    git://github.com/pocoproject/poco.git;branch=master \
-    file://run-ptest \
-   "
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \
-                  -DZLIB_LIBRARY_RELEASE:STRING=z -DPCRE_LIBRARY:STRING=pcre \
-                 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
-
-# For the native build we want to use the bundled version
-EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
-
-# do not use rpath
-EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
-
-# By default the most commonly used poco components are built
-# Foundation is built anyway and doesn't need to be listed explicitly
-# these don't have dependencies outside oe-core
-PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip"
-
-PACKAGECONFIG[XML] = "-DENABLE_XML=ON -DEXPAT_LIBRARY:STRING=expat,-DENABLE_XML=OFF,expat"
-PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
-PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
-PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
-PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
-PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
-PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_NETSSL=OFF,openssl"
-PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_CRYPTO=OFF,openssl"
-PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
-PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3"
-PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF"
-
-# Additional components not build by default,
-# they might have dependencies not included in oe-core
-# or they don't work on all architectures
-PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2"
-PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF"
-PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb"
-PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc"
-PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF"
-PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF"
-PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF"
-
-# Make a package for each library
-PACKAGES = "${PN}-dbg ${POCO_PACKAGES}"
-python __anonymous () {
-    packages = []
-    testrunners = []
-    components = d.getVar("PACKAGECONFIG").split()
-    components.append("Foundation")
-    for lib in components:
-        pkg = ("poco-%s" % lib.lower()).replace("_","")
-        packages.append(pkg)
-        if not d.getVar("FILES_%s" % pkg):
-            d.setVar("FILES_%s" % pkg, "${libdir}/libPoco%s.so.*" % lib)
-        testrunners.append("%s" % lib)
-
-    d.setVar("POCO_PACKAGES", " ".join(packages))
-    d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners))
-}
-
-# "poco" is a metapackage which pulls in all Poco components
-PACKAGES += "${PN}"
-RRECOMMENDS_${PN} += "${POCO_PACKAGES}"
-RRECOMMENDS_${PN}_class-native = ""
-ALLOW_EMPTY_${PN} = "1"
-
-# -dev last to pick up the remaining stuff
-PACKAGES += "${PN}-dev ${PN}-staticdev"
-FILES_${PN}-dev = "${includedir} ${libdir}/libPoco*.so ${libdir}/cmake"
-FILES_${PN}-staticdev = "${libdir}/libPoco*.a"
-
-# ptest support
-FILES_${PN}-dbg += "${PTEST_PATH}/bin/.debug"
-
-# cppunit is only built if tests are enabled
-PACKAGES += "${PN}-cppunit"
-FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*"
-ALLOW_EMPTY_${PN}-cppunit = "1"
-
-RDEPENDS_${PN}-ptest += "${PN}-cppunit"
-
-do_install_ptest () {
-       cp -rf ${B}/bin/ ${D}${PTEST_PATH}
-       cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
-       cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
-       find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
-       echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners"
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poco/poco_1.8.0.1.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/poco/poco_1.8.0.1.bb
new file mode 100644
index 0000000..160b4d3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/poco/poco_1.8.0.1.bb
@@ -0,0 +1,106 @@
+SUMMARY = "Modern, powerful open source cross-platform C++ class libraries"
+DESCRIPTION = "Modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems."
+SECTION = "libs"
+HOMEPAGE = "http://pocoproject.org/"
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc"
+
+# These dependencies are required by Foundation
+DEPENDS = "libpcre zlib"
+
+inherit cmake ptest
+
+BBCLASSEXTEND = "native"
+
+SRCREV = "af527ab21fca5ab2659285408aec9920ed7c7b17"
+SRC_URI = " \
+    git://github.com/pocoproject/poco.git \
+    file://run-ptest \
+   "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \
+                  -DZLIB_LIBRARY_RELEASE:STRING=z -DPCRE_LIBRARY:STRING=pcre \
+                 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
+
+# For the native build we want to use the bundled version
+EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
+
+# do not use rpath
+EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
+
+# By default the most commonly used poco components are built
+# Foundation is built anyway and doesn't need to be listed explicitly
+# these don't have dependencies outside oe-core
+PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip"
+
+PACKAGECONFIG[XML] = "-DENABLE_XML=ON -DEXPAT_LIBRARY:STRING=expat,-DENABLE_XML=OFF,expat"
+PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
+PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
+PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
+PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
+PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
+PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_NETSSL=OFF,openssl"
+PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_CRYPTO=OFF,openssl"
+PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
+PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3"
+PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF"
+
+# Additional components not build by default,
+# they might have dependencies not included in oe-core
+# or they don't work on all architectures
+PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2"
+PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF"
+PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb"
+PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc"
+PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF"
+PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF"
+PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF"
+
+# Make a package for each library
+PACKAGES = "${PN}-dbg ${POCO_PACKAGES}"
+python __anonymous () {
+    packages = []
+    testrunners = []
+    components = d.getVar("PACKAGECONFIG").split()
+    components.append("Foundation")
+    for lib in components:
+        pkg = ("poco-%s" % lib.lower()).replace("_","")
+        packages.append(pkg)
+        if not d.getVar("FILES_%s" % pkg):
+            d.setVar("FILES_%s" % pkg, "${libdir}/libPoco%s.so.*" % lib)
+        testrunners.append("%s" % lib)
+
+    d.setVar("POCO_PACKAGES", " ".join(packages))
+    d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners))
+}
+
+# "poco" is a metapackage which pulls in all Poco components
+PACKAGES += "${PN}"
+RRECOMMENDS_${PN} += "${POCO_PACKAGES}"
+RRECOMMENDS_${PN}_class-native = ""
+ALLOW_EMPTY_${PN} = "1"
+
+# -dev last to pick up the remaining stuff
+PACKAGES += "${PN}-dev ${PN}-staticdev"
+FILES_${PN}-dev = "${includedir} ${libdir}/libPoco*.so ${libdir}/cmake"
+FILES_${PN}-staticdev = "${libdir}/libPoco*.a"
+
+# ptest support
+FILES_${PN}-dbg += "${PTEST_PATH}/bin/.debug"
+
+# cppunit is only built if tests are enabled
+PACKAGES += "${PN}-cppunit"
+FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*"
+ALLOW_EMPTY_${PN}-cppunit = "1"
+
+RDEPENDS_${PN}-ptest += "${PN}-cppunit"
+
+do_install_ptest () {
+       cp -rf ${B}/bin/ ${D}${PTEST_PATH}
+       cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
+       cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
+       find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
+       echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners"
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
deleted file mode 100644
index e530a48..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Encoding files for Poppler"
-DESCRIPTION = "Encoding files for use with poppler that enable poppler to \
-               correctly render CJK and Cyrrilic."
-LICENSE = "BSD & GPLv2 & GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4870b98343f0bbb25fa43b9d2ba59448 \
-                    file://COPYING.adobe;md5=63c6a8a9df204c00461fa5f163d8a663 \
-                    file://COPYING.gpl2;md5=751419260aa954499f7abaabaa882bbe \
-"
-
-inherit allarch
-
-INHIBIT_DEFAULT_DEPS = "1"
-
-CMAP_RESOURCES_BASE = "https://github.com/adobe-type-tools/cmap-resources/raw/0561ebca035813ed04c3485bca636a0aa7abdc1d/cmapresources_identity-0/CMap"
-
-SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.gz \
-           ${CMAP_RESOURCES_BASE}/Identity-H;name=idh \
-           ${CMAP_RESOURCES_BASE}/Identity-V;name=idv"
-
-SRC_URI[md5sum] = "636a8f2b9f6df9e7ced8ec0946961eaf"
-SRC_URI[sha256sum] = "e752b0d88a7aba54574152143e7bf76436a7ef51977c55d6bd9a48dccde3a7de"
-SRC_URI[idh.md5sum] = "009c93cf0141ab7bd6acb7eea14306cc"
-SRC_URI[idh.sha256sum] = "ae702c203a82ea124e9b96590f821db6fbf8754e2c4547a9dba0e82f94739e95"
-SRC_URI[idv.md5sum] = "2f32a45d43d001c26eeac6b878855fbf"
-SRC_URI[idv.sha256sum] = "89a85daf7031e93c883e76b9168a226dfd585bf5506e9e1956772163f15cb082"
-
-do_compile() {
-}
-
-do_install() {
-    oe_runmake install DESTDIR=${D} prefix=${prefix} datadir=${datadir}
-    install -d ${D}${datadir}/poppler/cMap
-    install -m644 ${WORKDIR}/Identity-* ${D}${datadir}/poppler/cMap/
-}
-
-FILES_${PN} += "${datadir}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.8.bb
new file mode 100644
index 0000000..343b6db
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.8.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Encoding files for Poppler"
+DESCRIPTION = "Encoding files for use with poppler that enable poppler to \
+               correctly render CJK and Cyrrilic."
+LICENSE = "BSD & GPLv2 & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4870b98343f0bbb25fa43b9d2ba59448 \
+                    file://COPYING.adobe;md5=63c6a8a9df204c00461fa5f163d8a663 \
+                    file://COPYING.gpl2;md5=751419260aa954499f7abaabaa882bbe \
+"
+
+inherit allarch
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+CMAP_RESOURCES_BASE = "https://github.com/adobe-type-tools/cmap-resources/raw/0561ebca035813ed04c3485bca636a0aa7abdc1d/cmapresources_identity-0/CMap"
+
+SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.gz \
+           ${CMAP_RESOURCES_BASE}/Identity-H;name=idh \
+           ${CMAP_RESOURCES_BASE}/Identity-V;name=idv"
+
+SRC_URI[md5sum] = "00f8989c804de84af0ba2ea629949980"
+SRC_URI[sha256sum] = "1096a18161f263cccdc6d8a2eb5548c41ff8fcf9a3609243f1b6296abdf72872"
+SRC_URI[idh.md5sum] = "009c93cf0141ab7bd6acb7eea14306cc"
+SRC_URI[idh.sha256sum] = "ae702c203a82ea124e9b96590f821db6fbf8754e2c4547a9dba0e82f94739e95"
+SRC_URI[idv.md5sum] = "2f32a45d43d001c26eeac6b878855fbf"
+SRC_URI[idv.sha256sum] = "89a85daf7031e93c883e76b9168a226dfd585bf5506e9e1956772163f15cb082"
+
+do_compile() {
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D} prefix=${prefix} datadir=${datadir}
+    install -d ${D}${datadir}/poppler/cMap
+    install -m644 ${WORKDIR}/Identity-* ${D}${datadir}/poppler/cMap/
+}
+
+FILES_${PN} += "${datadir}"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch
new file mode 100644
index 0000000..18f5085
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch
@@ -0,0 +1,38 @@
+From b6fc6c36d359a50503138cd87d7147faf6dff893 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sat, 17 Mar 2018 20:52:10 +0100
+Subject: [PATCH] Do not overwrite all our build flags
+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@gmail.com>
+---
+ cmake/modules/PopplerMacros.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
+index ccb2790..0f392cb 100644
+--- a/cmake/modules/PopplerMacros.cmake
++++ b/cmake/modules/PopplerMacros.cmake
+@@ -125,14 +125,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
+   set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
+ 
+   set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
+-  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE")
++  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}")
+   set(_save_cflags "${CMAKE_C_FLAGS}")
+-  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE")
++  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE ${_save_cflags}")
+   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g ${_save_cflags}")
+   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG ${_save_cflags}")
+   set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}")
+-- 
+2.14.3
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-add-manadatory-options-to-find-qt4-qt5-moc.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-add-manadatory-options-to-find-qt4-qt5-moc.patch
deleted file mode 100644
index 4e80d24..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-add-manadatory-options-to-find-qt4-qt5-moc.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 91b6275f0e91c25beb040b4ef9484053ae305d86 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 26 May 2015 12:45:47 +0200
-Subject: [PATCH] add manadatory options to find qt4/qt5 moc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.ac | 55 ++++++++-----------------------------------------------
- 1 file changed, 8 insertions(+), 47 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c4cfc2c..8e961c7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -712,25 +712,10 @@ AC_SUBST(POPPLER_QT4_LIBS)
- AC_SUBST(POPPLER_QT4_TEST_LIBS)
- 
- if test x$enable_poppler_qt4 = xyes; then
--  AC_CHECK_TOOL(MOCQT4, moc)
--  AC_MSG_CHECKING([for Qt4 moc])
--  mocversion=`$MOCQT4 -v 2>&1`
--  mocversiongrep=`echo $mocversion | grep "Qt 4"`
--  if test x"$mocversiongrep" != x"$mocversion"; then
--    AC_MSG_RESULT([no])
--    # moc was not the qt4 one, try with moc-qt4
--    AC_CHECK_TOOL(MOCQT42, moc-qt4)
--    AC_MSG_CHECKING([for Qt4 moc-qt4])
--    mocversion=`$MOCQT42 -v 2>&1`
--    mocversiongrep=`echo $mocversion | grep "Qt 4"`
--    if test x"$mocversiongrep" != x"$mocversion"; then
--      # no valid moc found
--      enable_poppler_qt4=no;
--      MOCQT4="not found"
--    else
--      MOCQT4=$MOCQT42
--    fi
--  fi
-+  AC_ARG_WITH([moc-qt4],
-+              AS_HELP_STRING([--with-moc-qt4], [Set location of qt4 moc]),
-+              [MOCQT4=$withval]
-+  )
-   AC_SUBST(MOCQT4)
-   AC_MSG_RESULT([$MOCQT4])
- fi
-@@ -769,34 +754,10 @@ AC_SUBST(POPPLER_QT5_LIBS)
- AC_SUBST(POPPLER_QT5_TEST_LIBS)
- 
- if test x$enable_poppler_qt5 = xyes; then
--  AC_CHECK_TOOL(MOCQT5, moc)
--  AC_MSG_CHECKING([for Qt5 moc])
--  mocversion=`$MOCQT5 -v 2>&1`
--  mocversiongrep=`echo $mocversion | grep -E "Qt 5|moc 5"`
--  if test x"$mocversiongrep" != x"$mocversion"; then
--    AC_MSG_RESULT([no])
--    # moc was not the qt5 one, try with moc-qt5
--    AC_CHECK_TOOL(MOCQT52, moc-qt5)
--    AC_MSG_CHECKING([for Qt5 moc-qt5])
--    mocversion=`$MOCQT52 -v 2>&1`
--    mocversiongrep=`echo $mocversion | grep -E "Qt 5|moc-qt5 5|moc 5"`
--    if test x"$mocversiongrep" != x"$mocversion"; then
--      AC_CHECK_TOOL(QTCHOOSER, qtchooser)
--      AC_MSG_CHECKING([for qtchooser])
--      qt5tooldir=`QT_SELECT=qt5 qtchooser -print-env | grep QTTOOLDIR | cut -d '=' -f 2 | cut -d \" -f 2`
--      mocversion=`$qt5tooldir/moc -v 2>&1`
--      mocversiongrep=`echo $mocversion | grep -E "Qt 5|moc 5"`
--      if test x"$mocversiongrep" != x"$mocversion"; then
--        # no valid moc found
--        enable_poppler_qt5=no;
--        MOCQT5="not found"
--      else
--        MOCQT5=$qt5tooldir/moc
--      fi
--    else
--      MOCQT5=$MOCQT52
--    fi
--  fi
-+  AC_ARG_WITH([moc-qt5],
-+              AS_HELP_STRING([--with-moc-qt5], [Set location of qt5 moc]),
-+              [MOCQT5=$withval]
-+  )
-   AC_SUBST(MOCQT5)
-   AC_MSG_RESULT([$MOCQT5])
- fi
--- 
-2.5.5
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch
new file mode 100644
index 0000000..3c231fe
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch
@@ -0,0 +1,100 @@
+From 6287663e7db04df7e6dec58a1fc5bb5d510e8bde Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 9 Apr 2018 19:11:20 +0200
+Subject: [PATCH] CairoOutputDev.cc: fix build error when using fixedpoint
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc: In function 'int splashRound(SplashCoord)':
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:1604:28: error: call of overloaded 'floor(FixedPoint)' is ambiguous
+|    return (int)floor(x + 0.5);
+|                             ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/features.h:428:0,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/os_defines.h:39,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/c++config.h:533,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdint:38,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:44:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/bits/mathcalls.h:165:1: note: candidate: double floor(double)
+|  __MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
+|  ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/math.h:36:0,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:46:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:260:3: note: candidate: constexpr float std::floor(float)
+|    floor(float __x)
+|    ^~~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:264:3: note: candidate: constexpr long double std::floor(long double)
+|    floor(long double __x)
+|    ^~~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc: In function 'int splashCeil(SplashCoord)':
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:1608:21: error: call of overloaded 'ceil(SplashCoord&)' is ambiguous
+|    return (int)ceil(x);
+|                      ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/features.h:428:0,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/os_defines.h:39,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/c++config.h:533,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdint:38,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:44:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/bits/mathcalls.h:159:1: note: candidate: double ceil(double)
+|  __MATHCALLX (ceil,, (_Mdouble_ __x), (__const__));
+|  ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/math.h:36:0,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:46:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:165:3: note: candidate: constexpr float std::ceil(float)
+|    ceil(float __x)
+|    ^~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:169:3: note: candidate: constexpr long double std::ceil(long double)
+|    ceil(long double __x)
+|    ^~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc: In function 'int splashFloor(SplashCoord)':
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:1612:22: error: call of overloaded 'floor(SplashCoord&)' is ambiguous
+|    return (int)floor(x);
+|                       ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/features.h:428:0,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/os_defines.h:39,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/c++config.h:533,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdint:38,
+|                  from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:44:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/bits/mathcalls.h:165:1: note: candidate: double floor(double)
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ poppler/CairoOutputDev.cc | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
+index 18124b8f..4c85ad65 100644
+--- a/poppler/CairoOutputDev.cc
++++ b/poppler/CairoOutputDev.cc
+@@ -1602,15 +1602,27 @@ void CairoOutputDev::endActualText(GfxState *state)
+ }
+ 
+ static inline int splashRound(SplashCoord x) {
++#if defined(USE_FIXEDPOINT)
++  return FixedPoint::floor(x + 0.5);
++#else
+   return (int)floor(x + 0.5);
++#endif
+ }
+ 
+ static inline int splashCeil(SplashCoord x) {
++#if defined(USE_FIXEDPOINT)
++  return FixedPoint::ceil(x);
++#else
+   return (int)ceil(x);
++#endif
+ }
+ 
+ static inline int splashFloor(SplashCoord x) {
++#if defined(USE_FIXEDPOINT)
++  return FixedPoint::floor(x);
++#else
+   return (int)floor(x);
++#endif
+ }
+ 
+ static
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-fix-gcc-6-math-ambiguous-errors.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-fix-gcc-6-math-ambiguous-errors.patch
deleted file mode 100644
index 406009f..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-fix-gcc-6-math-ambiguous-errors.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- poppler-0.45.0/poppler/CairoOutputDev.cc.orig	2016-06-17 14:23:35.399083929 -0400
-+++ poppler-0.45.0/poppler/CairoOutputDev.cc	2016-06-17 14:36:53.351097825 -0400
-@@ -42,7 +42,7 @@
- #endif
- 
- #include <string.h>
--#include <math.h>
-+#include <cmath>
- #include <assert.h>
- #include <cairo.h>
- 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.57.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.57.0.bb
deleted file mode 100644
index 63b77aa..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.57.0.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = " \
-    http://poppler.freedesktop.org/${BP}.tar.xz \
-    file://0001-add-manadatory-options-to-find-qt4-qt5-moc.patch \
-    file://0002-fix-gcc-6-math-ambiguous-errors.patch \
-"
-SRC_URI[md5sum] = "bc5a191741604552c90d484103229374"
-SRC_URI[sha256sum] = "0ea37de71b7db78212ebc79df59f99b66409a29c2eac4d882dae9f2397fe44d8"
-
-DEPENDS = "fontconfig zlib cairo lcms"
-
-inherit autotools pkgconfig gtk-doc gobject-introspection
-
-PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
-PACKAGECONFIG[jpeg] = "--enable-dctdecoder=libjpeg,--enable-dctdecoder=none,jpeg"
-PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng"
-PACKAGECONFIG[tiff] = "--enable-libtiff,--disable-libtiff,tiff"
-PACKAGECONFIG[curl] = "--enable-libcurl,--disable-libcurl,curl"
-PACKAGECONFIG[openjpeg] = "--enable-libopenjpeg=openjpeg2,--disable-libopenjpeg,openjpeg"
-PACKAGECONFIG[qt5] = "--enable-poppler-qt5 --with-moc-qt5=${STAGING_BINDIR_NATIVE}/qt5/moc,--disable-poppler-qt5,qtbase qttools-native"
-PACKAGECONFIG[qt4e] = "--enable-poppler-qt4 --with-moc-qt4=${STAGING_BINDIR_NATIVE}/moc4,--disable-poppler-qt4,qt4-embedded"
-PACKAGECONFIG[nss] = "--enable-libnss,--disable-libnss,nss"
-
-SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
-
-EXTRA_OECONF = "\
-    --enable-xpdf-headers \
-    --disable-gtk-test \
-    --enable-zlib \
-"
-
-do_compile_prepend() {
-    export GIR_EXTRA_LIBS_PATH="${B}/poppler/.libs"
-}
-
-# Adjust library names when building for QT4e
-QT4E_PATCHES = "${@bb.utils.contains('PACKAGECONFIG', 'qt4e', 'file://fix-qt4e-library-dependencies.patch', '', d)}"
-SRC_URI_append = "${QT4E_PATCHES}"
-
-# check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
-def get_poppler_fpu_setting(bb, d):
-    if d.getVar('TARGET_FPU') in [ 'soft' ]:
-        return "--enable-fixedpoint"
-    return ""
-
-EXTRA_OECONF += "${@get_poppler_fpu_setting(bb, d)}"
-
-PACKAGES =+ "libpoppler libpoppler-glib"
-FILES_libpoppler = "${libdir}/libpoppler.so.*"
-FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*"
-
-RDEPENDS_libpoppler = "poppler-data"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.63.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.63.0.bb
new file mode 100644
index 0000000..8acb356
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.63.0.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = " \
+    http://poppler.freedesktop.org/${BP}.tar.xz \
+    file://0001-Do-not-overwrite-all-our-build-flags.patch \
+    file://0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch \
+"
+SRC_URI[md5sum] = "66a54da4896b1408611699feda5c1821"
+SRC_URI[sha256sum] = "27cc8addafc791e1a26ce6acc2b490926ea73a4f89196dd8a7742cff7cf8a111"
+
+DEPENDS = "fontconfig zlib cairo lcms"
+
+inherit cmake pkgconfig gobject-introspection
+
+PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
+PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg"
+PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng"
+PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff"
+PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl"
+PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg"
+PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native"
+PACKAGECONFIG[nss] = "-DWITH_NSS3=ON,-DWITH_NSS3=OFF,nss"
+
+# surprise - did not expect this to work :)
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)}
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+EXTRA_OECMAKE += " \
+    -DENABLE_XPDF_HEADERS=ON \
+    -DBUILD_GTK_TESTS=OFF \
+    -DENABLE_ZLIB=ON \
+"
+
+do_configure_append() {
+    # poppler macro uses pkg-config to check for g-ir runtimes. Something
+    # makes them point to /usr/bin. Align them to sysroot - that's where the
+    # git-wrappers are:
+    sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja
+}
+
+# check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
+def get_poppler_fpu_setting(bb, d):
+    if d.getVar('TARGET_FPU') in [ 'soft' ]:
+        return "-DUSE_FIXEDPOINT=ON"
+    return ""
+
+EXTRA_OECMAKE += "${@get_poppler_fpu_setting(bb, d)}"
+
+PACKAGES =+ "libpoppler libpoppler-glib"
+FILES_libpoppler = "${libdir}/libpoppler.so.*"
+FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*"
+
+RDEPENDS_libpoppler = "poppler-data"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
deleted file mode 100644
index d08ec6a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From d52e330be895bb8c5f0fb3e2884766acbd942a85 Mon Sep 17 00:00:00 2001
-From: Philip Balister <philip@balister.org>
-Date: Tue, 1 Jul 2014 09:40:44 -0400
-Subject: [PATCH] Use pkg-config for libxml2 detection.
-
-Upstream-Status: Inappropriate [configuration]
-
-xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS.
-
-Signed-off-by: Philip Balister <philip@balister.org>
----
- configure.in | 15 ++-------------
- 1 file changed, 2 insertions(+), 13 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index f8bf466..1f4fabf 100644
---- a/configure.in
-+++ b/configure.in
-@@ -734,19 +734,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
-               [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
- 
- if test "$with_libxml" = yes ; then
--  AC_CHECK_PROGS(XML2_CONFIG, xml2-config)
--  if test -n "$XML2_CONFIG"; then
--    for pgac_option in `$XML2_CONFIG --cflags`; do
--      case $pgac_option in
--        -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
--      esac
--    done
--    for pgac_option in `$XML2_CONFIG --libs`; do
--      case $pgac_option in
--        -L*) LDFLAGS="$LDFLAGS $pgac_option";;
--      esac
--    done
--  fi
-+  CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`"
-+  LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS"
- fi
- 
- AC_SUBST(with_libxml)
--- 
-1.8.3.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/not-check-libperl.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/not-check-libperl.patch
deleted file mode 100644
index e199f39..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/not-check-libperl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-[PATCH] not check libperl under cross compiling
-
-Upstream-Status: Inappropriate [configuration]
-
-libperl ldflags returned by PGAC_CHECK_PERL_EMBED_LDFLAGS are native,
-can not be used to check target library.
-
-postpresql has the dependency on perl, so not need to check libperl
-again, like in postgresql-9.2.4 
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index ae1a5a0..9a0970d 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1877,7 +1877,7 @@ if test "$with_tcl" = yes; then
- fi
- 
- # check for <perl.h>
--if test "$with_perl" = yes; then
-+if test "$with_perl" = yes && test "$cross_compiling" = no; then
-   ac_save_CPPFLAGS=$CPPFLAGS
-   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
-   AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/remove.autoconf.version.check.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/remove.autoconf.version.check.patch
deleted file mode 100644
index be23fd4..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/files/remove.autoconf.version.check.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: postgresql-9.2.4/configure.in
-===================================================================
---- postgresql-9.2.4.orig/configure.in
-+++ postgresql-9.2.4/configure.in
-@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch un
- 
- AC_INIT([PostgreSQL], [9.4.2], [pgsql-bugs@postgresql.org])
- 
--m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
--Untested combinations of 'autoconf' and PostgreSQL versions are not
--recommended.  You can remove the check from 'configure.in' but it is then
--your responsibility whether the result works or not.])])
- AC_COPYRIGHT([Copyright (c) 1996-2014, PostgreSQL Global Development Group])
- AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
- AC_CONFIG_AUX_DIR(config)
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/postgresql_9.4.15.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/postgresql_9.4.15.bb
deleted file mode 100644
index eec099a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/postgresql/postgresql_9.4.15.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require postgresql.inc
-
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=81b69ddb31a8be66baafd14a90146ee2"
-
-SRC_URI += "\
-    file://remove.autoconf.version.check.patch \
-    file://not-check-libperl.patch \
-"
-
-do_compile_prepend_libc-musl() {
-    sed -i -e 's/\-lnsl//g' ${B}/src/Makefile.global
-}
-
-SRC_URI[md5sum] = "0aada0833a9208ae5fab966c73c39379"
-SRC_URI[sha256sum] = "12bfb3c7e8e45515ef921ad365e122682a5c4935dcc0032644433af2de31acc4"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/soci/soci_3.2.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/soci/soci_3.2.2.bb
deleted file mode 100644
index 1f5a485..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/soci/soci_3.2.2.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-DESCRIPTION = "The C++ Database Access Library"
-HOMEPAGE = "http://soci.sourceforge.net"
-LICENSE = "BSL-1.0"
-LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-SECTION = "libs"
-DEPENDS = "boost"
-
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BP}/${BP}.tar.gz \
-           file://soci_libdir.patch \
-          "
-SRC_URI[md5sum] = "bc3c35f6cd3f80a1be19fe30b3c111bf"
-SRC_URI[sha256sum] = "30ea2f4d26639ef5b5cdc24fb300b3896746243dbb77b743582de2ff443ccb1c"
-
-TESTCONFIG = '-DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" \
-              -DSOCI_TEST_POSTGRESQL_CONNSTR:STRING="dbname=soci_test" \
-              -DSOCI_TEST_MYSQL_CONNSTR:STRING="db=soci_test user=oe password=oe"'
-
-OBASEDIR ?= "/opt/oracle"
-OINCDIR = "rdbms/public"
-OLIBDIR = "lib"
-
-PACKAGECONFIG[sqlite3] = "-DSOCI_SQLITE3=ON,-DSOCI_SQLITE3=OFF,sqlite3,"
-PACKAGECONFIG[mysql] = "-DSOCI_MYSQL=ON,-DSOCI_MYSQL=OFF,mariadb,"
-PACKAGECONFIG[postgresql] = "-DSOCI_POSTGRESQL=ON,-DSOCI_POSTGRESQL=OFF,postgresql,"
-PACKAGECONFIG[odbc] = "-DSOCI_ODBC=ON,-DSOCI_ODBC=OFF,,"
-PACKAGECONFIG[empty] = "-DSOCI_EMPTY=ON,-DSOCI_EMPTY=OFF,,"
-PACKAGECONFIG[oracle] = "-DWITH_ORACLE=ON --with-oracle-include=${OINCDIR} --with-oracle-lib=${OLIBDIR},-DWITH_ORACLE=OFF,,"
-PACKAGECONFIG[ptest] = "${TESTCONFIG},,,"
-
-# enable your backend by default we enable 'empty'
-PACKAGECONFIG ??= "empty"
-
-# Take the flags added by PACKAGECONFIG and pass them to cmake.
-EXTRA_OECMAKE = "${EXTRA_OECONF} -DSOCI_LIBDIR=${libdir}"
-DISABLE_STATIC = ""
-
-inherit cmake
-
-PACKAGES += "${PN}-sqlite3 ${PN}-mysql ${PN}-postgresql ${PN}-odbc ${PN}-oracle"
-
-FILES_${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*"
-FILES_${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*"
-FILES_${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*"
-FILES_${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*"
-FILES_${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/spitools/spitools_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/spitools/spitools_git.bb
index f808125..3f6cdc6 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/spitools/spitools_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/spitools/spitools_git.bb
@@ -4,11 +4,16 @@
 LICENSE="GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=8c16666ae6c159876a0ba63099614381"
 
+PR = "r0"
+
+BPV = "0.8.1"
+PV = "${BPV}"
+SRCREV = "318bcae5249722873bf58b27afdd20473c7047cc"
+
 S = "${WORKDIR}/git"
 
 SRC_URI = "git://github.com/cpb-/spi-tools.git;protocol=git"
 
-SRCREV = "03405ab45884e4264dfa0371c032b2baaeeaaa98"
 
 inherit autotools
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch
index 2ac9c0b..5d481f2 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch
@@ -4,9 +4,11 @@
 
 Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
 ---
---- a/lib/gprocess.c
-+++ b/lib/gprocess.c
-@@ -1421,6 +1421,18 @@
+Index: syslog-ng-3.8.1/lib/gprocess.c
+===================================================================
+--- syslog-ng-3.8.1.orig/lib/gprocess.c
++++ syslog-ng-3.8.1/lib/gprocess.c
+@@ -1432,6 +1432,18 @@ g_process_startup_ok(void)
  void
  g_process_finish(void)
  {
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch
index cc8d110..c172e4e 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch
@@ -10,13 +10,13 @@
  configure.ac | 17 +++++++++++------
  1 file changed, 11 insertions(+), 6 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index 474e094..cedca54 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -120,6 +120,9 @@ AC_ARG_ENABLE(memtrace,
- AC_ARG_ENABLE(ssl,
-               [  --enable-ssl        Enable SSL support.],,enable_ssl="auto")
+Index: syslog-ng-3.8.1/configure.ac
+===================================================================
+--- syslog-ng-3.8.1.orig/configure.ac
++++ syslog-ng-3.8.1/configure.ac
+@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof,
+ AC_ARG_ENABLE(memtrace,
+               [  --enable-memtrace   Enable alternative leak debugging code.])
  
 +AC_ARG_ENABLE(thread-tls,
 +              [  --enable-thread-tls        Enable Thread Transport Layer Security support.],,enable_thread_tls="no")
@@ -24,7 +24,7 @@
  AC_ARG_ENABLE(dynamic-linking,
                [  --enable-dynamic-linking        Link everything dynamically.],,enable_dynamic_linking="auto")
  
-@@ -381,12 +384,14 @@ dnl ***************************************************************************
+@@ -486,12 +489,14 @@ dnl ************************************
  dnl Is the __thread keyword available?
  dnl ***************************************************************************
  
@@ -45,6 +45,3 @@
  
  dnl ***************************************************************************
  dnl How to do static linking?
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch
index 755803c..553f4a5 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch
@@ -10,11 +10,11 @@
  configure.ac |   27 +++++++++++++++++----------
  1 files changed, 17 insertions(+), 10 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index b1e18b4..8e13025 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -73,6 +73,9 @@ AC_CONFIG_HEADERS(config.h)
+Index: syslog-ng-3.8.1/configure.ac
+===================================================================
+--- syslog-ng-3.8.1.orig/configure.ac
++++ syslog-ng-3.8.1/configure.ac
+@@ -104,6 +104,9 @@ AC_CONFIG_HEADERS(config.h)
  dnl ***************************************************************************
  dnl Arguments
  
@@ -24,7 +24,7 @@
  AC_ARG_WITH(libnet,
     [  --with-libnet=path      use path to libnet-config script],
     ,
-@@ -768,22 +771,26 @@ dnl ***************************************************************************
+@@ -893,22 +896,26 @@ dnl ************************************
  dnl libnet headers/libraries
  dnl ***************************************************************************
  AC_MSG_CHECKING(for LIBNET)
@@ -61,6 +61,3 @@
  if test "x$enable_spoof_source" = "xauto"; then
  	AC_MSG_CHECKING(whether to enable spoof source support)
          if test "x$LIBNET_LIBS" != "x"; then
--- 
-1.7.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch
index faf9672..54ecce5 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch
@@ -10,11 +10,11 @@
  scl/Makefile.am |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
-diff --git a/scl/Makefile.am b/scl/Makefile.am
-index 57fad5d..2a29ca5 100644
---- a/scl/Makefile.am
-+++ b/scl/Makefile.am
-@@ -14,7 +14,7 @@ scl-install-data-local:
+Index: syslog-ng-3.8.1/scl/Makefile.am
+===================================================================
+--- syslog-ng-3.8.1.orig/scl/Makefile.am
++++ syslog-ng-3.8.1/scl/Makefile.am
+@@ -27,7 +27,7 @@ scl-install-data-local:
  		fi; \
  	done
  	$(mkinstalldirs) $(DESTDIR)/$(scldir)
@@ -23,6 +23,3 @@
  	chmod -R u+rwX $(DESTDIR)/$(scldir)
  
  scl-uninstall-local:
--- 
-1.7.1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index f1bf9b0..771cdb1 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -41,7 +41,7 @@
 "
 
 CONFIG_TLS = "--enable-thread-tls"
-CONFIG_TLS_arm = "${@base_conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}"
+CONFIG_TLS_arm = "${@oe.utils.conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}"
 
 PACKAGECONFIG ??= " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \
@@ -101,7 +101,7 @@
 
 # syslog initscript is handled explicitly because order of
 # update-rc.d and update-alternatives is important
-RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
+RDEPENDS_${PN} += " ${@oe.utils.conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
 
 RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog"
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/tomoyo-tools/tomoyo-tools_2.5.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/tomoyo-tools/tomoyo-tools_2.5.0.bb
deleted file mode 100644
index 4a1b4ce..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/tomoyo-tools/tomoyo-tools_2.5.0.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "TOMOYO Linux tools"
-DESCRIPTION = "TOMOYO Linux is a Mandatory Access Control (MAC) implementation \
-for Linux that can be used to increase the security of a system, while also \
-being useful purely as a system analysis tool."
-HOMEPAGE = "http://tomoyo.sourceforge.jp/"
-SECTION = "System Environment/Kernel"
-
-SRC_URI = "http://jaist.dl.sourceforge.jp/tomoyo/53357/${BP}-20140601.tar.gz"
-SRC_URI[md5sum] = "888869b793127f00d6439a3246598b83"
-SRC_URI[sha256sum] = "118ef6ba1fbf7c0b83018c3a0d4d5485dfb9b5b7f647f37ce9f63841a3133c2a"
-
-S = "${WORKDIR}/${BPN}"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.tomoyo;md5=751419260aa954499f7abaabaa882bbe"
-
-FILES_${PN}     += "${libdir}/tomoyo"
-FILES_${PN}-dbg += "${libdir}/tomoyo/.debug"
-
-DEPENDS = "linux-libc-headers ncurses"
-
-EXTRA_OEMAKE = "-e USRLIBDIR=${libdir}"
-
-do_compile () {
-    oe_runmake 'CC=${CC}'
-}
-
-do_install() {
-    oe_runmake install INSTALLDIR=${D}
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/toscoterm/toscoterm_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/toscoterm/toscoterm_git.bb
index aa031fe..879b67b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/toscoterm/toscoterm_git.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/toscoterm/toscoterm_git.bb
@@ -11,7 +11,9 @@
 
 S = "${WORKDIR}/git"
 
-inherit gitpkgv pkgconfig
+inherit distro_features_check gitpkgv pkgconfig
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_compile() {
     oe_runmake \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-Make-udev-rules-directory-configurable.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-Make-udev-rules-directory-configurable.patch
index 3cc0400..2823c54 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-Make-udev-rules-directory-configurable.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-Make-udev-rules-directory-configurable.patch
@@ -1,4 +1,4 @@
-From 32278297170ffb49116b5789e4a0588b99d02bd0 Mon Sep 17 00:00:00 2001
+From a6eab413f274376cf703a608e2866118291a6185 Mon Sep 17 00:00:00 2001
 From: Amarnath Valluri <amarnath.valluri@intel.com>
 Date: Thu, 9 Feb 2017 11:02:53 +0200
 Subject: [PATCH] Make udev rules directory configurable.
@@ -9,6 +9,7 @@
 Upstream-Status: Inappropriate[Embedded specific]
 
 Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+
 ---
  configure.ac            | 14 +++-----------
  data/Makefile.am        |  1 -
@@ -49,11 +50,11 @@
  
          compiler:                   ${CC}
 diff --git a/data/Makefile.am b/data/Makefile.am
-index 411ea0f..4834960 100644
+index 08af5f4..9329186 100644
 --- a/data/Makefile.am
 +++ b/data/Makefile.am
 @@ -34,7 +34,6 @@ $(systemdservice_DATA): $(systemdservice_in_files) Makefile
- 	@sed -e "s|\@libexecdir\@|$(prefix)/lib/udisks|" $< > $@
+ 	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
  endif
  
 -udevrulesdir = $(slashlibdir)/udev/rules.d
@@ -86,6 +87,3 @@
  
  umount_udisks_SOURCES = umount-udisks.c
  umount_udisks_LDADD = $(DBUS_GLIB_LIBS) $(POLKIT_DBUS_LIBS)
--- 
-2.7.4
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-fix-build-with-newer-glibc-versions.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-fix-build-with-newer-glibc-versions.patch
index 520655a..8b4f441 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-fix-build-with-newer-glibc-versions.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/0001-fix-build-with-newer-glibc-versions.patch
@@ -1,4 +1,4 @@
-From 9829152b12a8924d2e091a00133ed1a3a7ba75c0 Mon Sep 17 00:00:00 2001
+From 054ad6a06cfac7c3d172d53cd901204079a53ec3 Mon Sep 17 00:00:00 2001
 From: Alexandre Rostovtsev <tetromino@gentoo.org>
 Date: Fri, 29 May 2015 21:09:39 -0400
 Subject: [PATCH] fix build with newer glibc versions
@@ -8,6 +8,7 @@
 Upstream-Status: Applied [1]
 
 [1] http://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=9829152b12a8924d2e091a00133ed1a3a7ba75c0
+
 ---
  src/helpers/job-drive-detach.c | 1 +
  1 file changed, 1 insertion(+)
@@ -24,6 +25,3 @@
  #include <stdio.h>
  #include <string.h>
  #include <errno.h>
--- 
-2.1.0
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/optional-depends.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/optional-depends.patch
index 6131701..a890954 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/optional-depends.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/optional-depends.patch
@@ -1,12 +1,29 @@
-From 1b70b7a798eeeec554ab5aa9fcfff96a22e91774 Mon Sep 17 00:00:00 2001
+From e8b3fbfa3d6a11eee25db2dc0f31f439aaf0b65a Mon Sep 17 00:00:00 2001
 From: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
 Date: Thu, 26 May 2011 17:30:04 -0300
 Subject: [PATCH] Allow disabling atasmart, lvm2 and devicemapper support.
 
 https://bugs.freedesktop.org/show_bug.cgi?id=37647
 
+---
+ configure.ac            | 53 +++++++++++++++++++++++++++++++++++++++----------
+ src/adapter-private.h   |  1 -
+ src/adapter.c           |  1 -
+ src/daemon.c            |  4 ++++
+ src/device-private.c    |  2 +-
+ src/device-private.h    |  5 ++---
+ src/device.c            | 23 +++++++++++++++++----
+ src/expander-private.h  |  1 -
+ src/expander.c          |  1 -
+ src/helpers/Makefile.am | 20 +++++++++++++------
+ src/helpers/partutil.c  |  3 ++-
+ src/port-private.h      |  1 -
+ src/probers/Makefile.am |  8 ++++++--
+ tools/udisks.c          | 10 ++++++++--
+ 14 files changed, 99 insertions(+), 34 deletions(-)
+
 diff --git a/configure.ac b/configure.ac
-index 62cc35d..b664135 100644
+index 9454423..8c4e4c2 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -155,13 +155,33 @@ PKG_CHECK_MODULES(POLKIT_GOBJECT_1, [polkit-gobject-1 >= 0.97])
@@ -49,8 +66,8 @@
 +AM_CONDITIONAL(HAVE_DEVMAPPER, [test "$have_devmapper" = "yes"])
  
  have_lvm2=no
- AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--disable-lvm2], [disable LVM2 support]))
-@@ -185,9 +205,19 @@ if test "x$enable_dmmp" != "xno"; then
+ AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--enable-lvm2], [enable LVM2 support]))
+@@ -185,9 +205,19 @@ if test "x$enable_dmmp" = "xyes"; then
  fi
  AM_CONDITIONAL(HAVE_DMMP, [test "$have_dmmp" = "yes"])
  
@@ -73,7 +90,7 @@
  
  PKG_CHECK_MODULES(LIBUDEV, [libudev >= 143])
  AC_SUBST(LIBUDEV_CFLAGS)
-@@ -267,9 +297,12 @@ echo "
+@@ -278,9 +308,12 @@ echo "
          cppflags:                   ${CPPFLAGS}
          xsltproc:                   ${XSLTPROC}
  
@@ -99,7 +116,7 @@
  #include "types.h"
  
 diff --git a/src/adapter.c b/src/adapter.c
-index b85a0ef..802420b 100644
+index 65e05b0..45db8c8 100644
 --- a/src/adapter.c
 +++ b/src/adapter.c
 @@ -30,7 +30,6 @@
@@ -111,10 +128,10 @@
  #include "daemon.h"
  #include "adapter.h"
 diff --git a/src/daemon.c b/src/daemon.c
-index 6072502..d043cb0 100644
+index fafcf9a..14e952f 100644
 --- a/src/daemon.c
 +++ b/src/daemon.c
-@@ -1745,6 +1745,7 @@ mdstat_changed_event (GIOChannel *channel,
+@@ -1748,6 +1748,7 @@ mdstat_changed_event (GIOChannel *channel,
    return TRUE;
  }
  
@@ -122,7 +139,7 @@
  static gboolean
  refresh_ata_smart_data (Daemon *daemon)
  {
-@@ -1773,6 +1774,7 @@ refresh_ata_smart_data (Daemon *daemon)
+@@ -1776,6 +1777,7 @@ refresh_ata_smart_data (Daemon *daemon)
  
    return FALSE;
  }
@@ -130,7 +147,7 @@
  
  static gboolean
  register_disks_daemon (Daemon *daemon)
-@@ -1984,12 +1986,14 @@ daemon_new (void)
+@@ -1987,12 +1989,14 @@ daemon_new (void)
    mount_file_clean_stale (l);
    g_list_free (l);
  
@@ -146,10 +163,10 @@
    PROFILE ("daemon_new(): end");
    return daemon;
 diff --git a/src/device-private.c b/src/device-private.c
-index 22a0d35..fb96525 100644
+index 45418ce..fb1d959 100644
 --- a/src/device-private.c
 +++ b/src/device-private.c
-@@ -1378,7 +1378,7 @@ device_set_drive_ata_smart_time_collected (Device *device,
+@@ -1390,7 +1390,7 @@ device_set_drive_ata_smart_time_collected (Device *device,
  
  void
  device_set_drive_ata_smart_status (Device *device,
@@ -159,7 +176,7 @@
    if (G_UNLIKELY (device->priv->drive_ata_smart_status != value))
      {
 diff --git a/src/device-private.h b/src/device-private.h
-index a6db7f2..71473a6 100644
+index 32a9bd0..8c57c13 100644
 --- a/src/device-private.h
 +++ b/src/device-private.h
 @@ -23,7 +23,6 @@
@@ -170,7 +187,7 @@
  
  #include "types.h"
  
-@@ -224,7 +223,7 @@ struct DevicePrivate
+@@ -228,7 +227,7 @@ struct DevicePrivate
  
    gboolean drive_ata_smart_is_available;
    guint64 drive_ata_smart_time_collected;
@@ -179,7 +196,7 @@
    void *drive_ata_smart_blob;
    gsize drive_ata_smart_blob_size;
  
-@@ -391,7 +390,7 @@ void device_set_holders_objpath (Device *device, GStrv value);
+@@ -396,7 +395,7 @@ void device_set_holders_objpath (Device *device, GStrv value);
  
  void device_set_drive_ata_smart_is_available (Device *device, gboolean value);
  void device_set_drive_ata_smart_time_collected (Device *device, guint64 value);
@@ -189,7 +206,7 @@
  
  G_END_DECLS
 diff --git a/src/device.c b/src/device.c
-index 6a34940..7a5a4a9 100644
+index 2ae7f38..d73f9d6 100644
 --- a/src/device.c
 +++ b/src/device.c
 @@ -50,7 +50,9 @@
@@ -202,7 +219,7 @@
  
  #include "daemon.h"
  #include "device.h"
-@@ -659,10 +661,14 @@ get_property (GObject *object,
+@@ -664,10 +666,14 @@ get_property (GObject *object,
      case PROP_DRIVE_ATA_SMART_STATUS:
        {
          const gchar *status;
@@ -218,7 +235,7 @@
          g_value_set_string (value, status);
        }
        break;
-@@ -5114,6 +5120,7 @@ device_new (Daemon *daemon,
+@@ -5144,6 +5150,7 @@ device_new (Daemon *daemon,
        goto out;
      }
  
@@ -226,7 +243,7 @@
    /* if just added, update the smart data if applicable */
    if (device->priv->drive_ata_smart_is_available)
      {
-@@ -5121,6 +5128,7 @@ device_new (Daemon *daemon,
+@@ -5151,6 +5158,7 @@ device_new (Daemon *daemon,
        gchar *ata_smart_refresh_data_options[] = { NULL };
        device_drive_ata_smart_refresh_data (device, ata_smart_refresh_data_options, NULL);
      }
@@ -234,7 +251,7 @@
  
    PROFILE ("device_new(native_path=%s): end", native_path);
   out:
-@@ -9794,16 +9802,18 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context,
+@@ -9840,16 +9848,18 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context,
                                             const char *stdout,
                                             gpointer user_data)
  {
@@ -256,7 +273,7 @@
    blob = NULL;
  
    if (job_was_cancelled || stdout == NULL)
-@@ -9907,6 +9917,11 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context,
+@@ -9953,6 +9963,11 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context,
    g_free (blob);
    if (d != NULL)
      sk_disk_free (d);
@@ -430,7 +447,7 @@
  udisks_probe_sas_expander_SOURCES = udisks-probe-sas-expander.c
  udisks_probe_sas_expander_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
 diff --git a/tools/udisks.c b/tools/udisks.c
-index 6fbd6a6..e0c4fbb 100644
+index 97e80d7..d30159b 100644
 --- a/tools/udisks.c
 +++ b/tools/udisks.c
 @@ -43,7 +43,9 @@
@@ -443,7 +460,7 @@
  
  #include "udisks-daemon-glue.h"
  #include "udisks-device-glue.h"
-@@ -979,6 +981,7 @@ end_highlight (void)
+@@ -983,6 +985,7 @@ end_highlight (void)
      g_print ("\x1B[0m");
  }
  
@@ -451,7 +468,7 @@
  static const gchar *
  ata_smart_status_to_desc (const gchar *status,
                            gboolean *out_highlight)
-@@ -1159,6 +1162,7 @@ print_ata_smart_attr (SkDisk *d,
+@@ -1163,6 +1166,7 @@ print_ata_smart_attr (SkDisk *d,
    g_free (threshold_str);
    g_free (pretty);
  }
@@ -459,7 +476,7 @@
  
  static void
  do_show_info (const char *object_path)
-@@ -1440,7 +1444,7 @@ do_show_info (const char *object_path)
+@@ -1445,7 +1449,7 @@ do_show_info (const char *object_path)
          g_print ("    if speed:                  %" G_GINT64_FORMAT " bits/s\n", props->drive_connection_speed);
  
        /* ------------------------------------------------------------------------------------------------- */
@@ -468,7 +485,7 @@
        if (!props->drive_ata_smart_is_available)
          {
            g_print ("    ATA SMART:                 not available\n");
-@@ -1493,7 +1497,9 @@ do_show_info (const char *object_path)
+@@ -1498,7 +1502,9 @@ do_show_info (const char *object_path)
              }
  
          }
@@ -479,6 +496,3 @@
        /* ------------------------------------------------------------------------------------------------- */
  
      }
--- 
-1.7.5.rc3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/udisks-1.0.5-fix-service-file.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/udisks-1.0.5-fix-service-file.patch
index d5e84d3..d4efa93 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/udisks-1.0.5-fix-service-file.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks/udisks-1.0.5-fix-service-file.patch
@@ -1,4 +1,4 @@
-From 7d61ad048856ee239870b917d6933e3ad63f0789 Mon Sep 17 00:00:00 2001
+From a4f6aa5be37ae6e2194c9ded2ea8c1da330f5694 Mon Sep 17 00:00:00 2001
 From: David King <amigadave@amigadave.com>
 Date: Thu, 2 Jul 2015 13:49:22 +0100
 Subject: [PATCH] Fix systemd service file
@@ -12,6 +12,7 @@
 [1] http://pkgs.fedoraproject.org/cgit/udisks.git/tree/udisks-1.0.5-fix-service-file.patch
 
 Upstream-Status: Pending
+
 ---
  data/Makefile.am | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -29,5 +30,3 @@
  endif
  
  udevrulesdir = $(slashlibdir)/udev/rules.d
--- 
-2.4.5
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2/0001-data-fix-out-of-tree-build.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2/0001-data-fix-out-of-tree-build.patch
new file mode 100644
index 0000000..1cbd877
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2/0001-data-fix-out-of-tree-build.patch
@@ -0,0 +1,35 @@
+From 7fdd4acdf6daf95c5cc74e968f4710513c8ddaea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Fri, 23 Mar 2018 18:33:52 +0100
+Subject: [PATCH] data: fix out of tree build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| sed: can't read udisks2.service.in: No such file or directory
+
+Upstream-Status: Submitted [1]
+
+[1] https://github.com/storaged-project/udisks/pull/510
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ data/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/Makefile.am b/data/Makefile.am
+index ddf9e3d6..b38928c8 100644
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -22,7 +22,7 @@ systemdservicedir       = $(systemdsystemunitdir)
+ systemdservice_DATA     = $(systemdservice_in_files:.service.in=.service)
+ 
+ $(systemdservice_DATA): udisks2.service.in Makefile
+-	@sed -e "s|\@udisksdprivdir\@|$(libexecdir)/udisks2|" udisks2.service.in > udisks2.service
++	@sed -e "s|\@udisksdprivdir\@|$(libexecdir)/udisks2|" $(srcdir)/udisks2.service.in > udisks2.service
+ endif
+ 
+ udevrulesdir = $(udevdir)/rules.d
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.1.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.1.8.bb
deleted file mode 100644
index a3efc51..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.1.8.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "udisks provides dbus interfaces for disks and storage devices"
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=dd79f6dbbffdbc8e86b086a8f0c0ef43"
-
-DEPENDS = "acl libatasmart polkit libgudev dbus-glib glib-2.0 intltool-native gnome-common-native libxslt-native"
-DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-
-RDEPENDS_${PN} = "acl"
-
-SRC_URI = "http://udisks.freedesktop.org/releases/udisks-${PV}.tar.bz2 \
-           file://non-gnu-libc.patch \
-"
-SRC_URI[md5sum] = "501d11c243bd8c6c00650474cd2afaab"
-SRC_URI[sha256sum] = "da416914812a77e5f4d82b81deb8c25799fd3228d27d52f7bf89a501b1857dda"
-
-CVE_PRODUCT = "udisks"
-
-inherit autotools systemd gtk-doc gobject-introspection
-
-S = "${WORKDIR}/udisks-${PV}"
-
-EXTRA_OECONF = "--disable-man --disable-gtk-doc"
-
-FILES_${PN} += "${libdir}/polkit-1/extensions/*.so \
-                ${datadir}/dbus-1/ \
-                ${datadir}/polkit-1 \
-                ${nonarch_base_libdir}/udev/* \
-                ${exec_prefix}${nonarch_base_libdir}/udisks2/* \
-"
-
-PACKAGES =+ "${PN}-libs"
-
-FILES_${PN} += "${datadir}/bash-completion"
-FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}"
-
-FILES_${PN}-dbg += "${exec_prefix}${nonarch_base_libdir}/udisks2/.debug"
-
-SYSTEMD_SERVICE_${PN} = "${BPN}.service"
-SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.7.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.7.6.bb
new file mode 100644
index 0000000..4d22afd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/udisks/udisks2_2.7.6.bb
@@ -0,0 +1,49 @@
+SUMMARY = "udisks provides dbus interfaces for disks and storage devices"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dd79f6dbbffdbc8e86b086a8f0c0ef43"
+
+DEPENDS = " \
+    acl \
+    libatasmart \
+    polkit \
+    libgudev \
+    dbus-glib \
+    glib-2.0 \
+    libblockdev \
+    intltool-native \
+    gnome-common-native \
+    libxslt-native \
+"
+DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+RDEPENDS_${PN} = "acl"
+
+SRC_URI = " \
+    git://github.com/storaged-project/udisks.git \
+    file://0001-data-fix-out-of-tree-build.patch \
+    file://non-gnu-libc.patch \
+"
+SRCREV = "b6471f2e99f6aa1133af0de658f1fa05c748932c"
+S = "${WORKDIR}/git"
+
+CVE_PRODUCT = "udisks"
+
+inherit autotools systemd gtk-doc gobject-introspection
+
+EXTRA_OECONF = "--disable-man --disable-gtk-doc"
+
+FILES_${PN} += " \
+    ${datadir}/dbus-1/ \
+    ${datadir}/polkit-1 \
+    ${datadir}/bash-completion \
+    ${libdir}/polkit-1/extensions/*.so \
+    ${nonarch_base_libdir}/udev/* \
+    ${exec_prefix}${nonarch_base_libdir}/udisks2/* \
+    ${systemd_system_unitdir} \
+"
+
+PACKAGES =+ "${PN}-libs"
+FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}"
+
+SYSTEMD_SERVICE_${PN} = "${BPN}.service"
+SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Add-support-for-aarch64.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Add-support-for-aarch64.patch
index 4b12494..391b0e6 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Add-support-for-aarch64.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-Add-support-for-aarch64.patch
@@ -1,9 +1,10 @@
-From 24fd52cc45f7b5ff45afe072f5fbe66485df8c8e Mon Sep 17 00:00:00 2001
+From 82f44f53b9a9766c2ec816f237506beb953eb332 Mon Sep 17 00:00:00 2001
 From: Andreas Schwab <schwab@suse.de>
 Date: Wed, 29 Oct 2014 14:18:28 +0100
 Subject: [PATCH] Add support for aarch64
 
 * include/private/gcconfig.h: Add support for aarch64.
+
 ---
  sigscheme/libgcroots/include/private/gcconfig.h | 37 +++++++++++++++++++++++++
  1 file changed, 37 insertions(+)
@@ -77,6 +78,3 @@
  # ifdef ARM32
  #   define CPP_WORDSZ 32
  #   define MACH_TYPE "ARM32"
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-fix-bug-for-cross-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-fix-bug-for-cross-compile.patch
index df82b07..0c8f02d 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-fix-bug-for-cross-compile.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/0001-fix-bug-for-cross-compile.patch
@@ -1,9 +1,10 @@
-From 2918196ba782dfa4401bdca917ad4de1910505e0 Mon Sep 17 00:00:00 2001
+From 08b5e51224ed95b1e76e99873b5f9f59840b0a74 Mon Sep 17 00:00:00 2001
 From: Lei Maohui <leimaohui@cn.fujitsu.com>
 Date: Fri, 21 Aug 2015 15:58:42 +0900
 Subject: [PATCH] fix bug for cross compile
 
 Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+
 ---
  configure.ac | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
@@ -23,6 +24,3 @@
      AC_CHECK_LIB(curses, tgetent, LIBEDIT_LIBS="-lcurses",
          [AC_CHECK_LIB(ncurses, tgetent, LIBEDIT_LIBS="-lncurses",
              AC_MSG_WARN("libedit needs libcurses or libncurses. disabled...")
--- 
-1.8.4.2
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/uim-module-manager.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/uim-module-manager.patch
index 8569bf3..3078af0 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/uim-module-manager.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim/uim-module-manager.patch
@@ -1,11 +1,21 @@
---- uim-1.1.0/scm/Makefile.am~	2006-06-09 10:46:12.000000000 +0900
-+++ uim-1.1.0/scm/Makefile.am	2006-06-19 23:00:15.620000000 +0900
-@@ -58,7 +58,7 @@
-   module_names += "scim"
+From d61495d3fb039842b82df44184c67eb3c1256136 Mon Sep 17 00:00:00 2001
+From: Bian Naimeng <biannm@cn.fujitsu.com>
+Date: Fri, 26 Jun 2015 12:57:48 +0900
+
+---
+ scm/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scm/Makefile.am b/scm/Makefile.am
+index 14d9393..e8a1083 100644
+--- a/scm/Makefile.am
++++ b/scm/Makefile.am
+@@ -119,7 +119,7 @@ if EXPAT
+   module_names += "yahoo-jp"
  endif
  
 -UIM_MODULE_MANAGER = $(top_builddir)/uim/uim-module-manager
 +UIM_MODULE_MANAGER = uim-module-manager
  UIM_MODULE_MANAGER_ENV = \
+         LIBUIM_SYSTEM_SCM_FILES=$(abs_top_srcdir)/sigscheme/lib \
          LIBUIM_SCM_FILES=$(abs_srcdir) \
-         LIBUIM_PLUGIN_LIB_DIR=$(abs_top_builddir)/uim/.libs
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.6.bb
index 271718e..af28895 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.6.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.6.bb
@@ -17,11 +17,15 @@
 DEPENDS_append_class-target = " intltool-native gtk+ gtk+3 uim-native takao-fonts"
 
 RDEPENDS_uim = "libuim0 libedit"
-RDEPENDS_uim-anthy = "takao-fonts anthy libanthy0 glibc-utils glibc-gconv-euc-jp"
+RDEPENDS_uim-anthy = "takao-fonts anthy libanthy0"
+RDEPENDS_uim-anthy_append_libc-glibc = " glibc-utils glibc-gconv-euc-jp"
 
 LEAD_SONAME = "libuim.so.1"
 
-inherit autotools pkgconfig gettext qemu gtk-immodules-cache
+inherit distro_features_check autotools pkgconfig gettext qemu gtk-immodules-cache
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
 GTKIMMODULES_PACKAGES = "uim-gtk2.0 uim-gtk3"
 
 EXTRA_OECONF += "--disable-emacs \
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/files/do-not-use-libltdl-source-directory.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/files/do-not-use-libltdl-source-directory.patch
index 69d26ad..2499cff 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/files/do-not-use-libltdl-source-directory.patch
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/files/do-not-use-libltdl-source-directory.patch
@@ -13,22 +13,22 @@
  2 files changed, 3 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index e881cca..1321802 100644
+index 4628401..e8989bf 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -5,7 +5,6 @@ SUBDIRS = \
+@@ -11,7 +11,6 @@ SUBDIRS = \
  	log \
  	lst \
  	ini \
--    libltdl \
+-	libltdl \
  	odbcinst \
  	DriverManager \
  	exe \
 diff --git a/configure.ac b/configure.ac
-index 218502f..d50b7af 100644
+index e4bcdaf..58aa5c5 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -136,9 +136,7 @@ dnl AC_CONFIG_MACRO_DIR([libltdl/m4])
+@@ -144,9 +144,7 @@ dnl AC_CONFIG_MACRO_DIR([libltdl/m4])
  dnl LT_CONFIG_LTDL_DIR([libltdl])
  dnl LTDL_INIT
  
@@ -39,5 +39,5 @@
  dnl Substitute INCLTDL and LIBLTDL in the Makefiles
  AC_SUBST(LTDLINCL)
 -- 
-2.8.1
+2.12.3
 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.4.bb
deleted file mode 100644
index 6f57f37..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.4.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "An Open Source ODBC sub-system"
-DESCRIPTION = "unixODBC is an Open Source ODBC sub-system and an ODBC SDK \
-for Linux, Mac OSX, and UNIX."
-
-HOMEPAGE = "http://www.unixodbc.org/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7b37bf80a3df5a65b355433ae36d206"
-
-DEPENDS = "libtool mysql5"
-
-SRC_URI = "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-${PV}.tar.gz \
-           file://do-not-use-libltdl-source-directory.patch \
-"
-SRC_URI[md5sum] = "bd25d261ca1808c947cb687e2034be81"
-SRC_URI[sha256sum] = "2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39"
-
-inherit autotools-brokensep
-
-S = "${WORKDIR}/unixODBC-${PV}"
-
-EXTRA_OEMAKE += "LIBS=-lltdl"
-
-do_configure_prepend() {
-    # old m4 files will cause libtool version don't match
-    rm -rf m4/*
-    rm -fr libltdl
-}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.6.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.6.bb
new file mode 100644
index 0000000..62d9db8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/unixodbc/unixodbc_2.3.6.bb
@@ -0,0 +1,27 @@
+SUMMARY = "An Open Source ODBC sub-system"
+DESCRIPTION = "unixODBC is an Open Source ODBC sub-system and an ODBC SDK \
+for Linux, Mac OSX, and UNIX."
+
+HOMEPAGE = "http://www.unixodbc.org/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7b37bf80a3df5a65b355433ae36d206"
+
+DEPENDS = "libtool mysql5"
+
+SRC_URI = "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-${PV}.tar.gz \
+           file://do-not-use-libltdl-source-directory.patch \
+"
+SRC_URI[md5sum] = "a8629fd2953b04b4639d0a9d8a5cf9d1"
+SRC_URI[sha256sum] = "88b637f647c052ecc3861a3baa275c3b503b193b6a49ff8c28b2568656d14d69"
+
+inherit autotools-brokensep
+
+S = "${WORKDIR}/unixODBC-${PV}"
+
+EXTRA_OEMAKE += "LIBS=-lltdl"
+
+do_configure_prepend() {
+    # old m4 files will cause libtool version don't match
+    rm -rf m4/*
+    rm -fr libltdl
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/upower/upower_0.99.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/upower/upower_0.99.5.bb
deleted file mode 100644
index 9314534..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/upower/upower_0.99.5.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-DESCRIPTION = "UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics. "
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0de8fbf1d97a140d1d93b9f14dcfbf08"
-
-DEPENDS = "intltool-native libusb1 libgudev glib-2.0 dbus-glib polkit"
-
-SRC_URI = "http://upower.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "ec57b4b7bf0af568f9a7a5603c921d97"
-SRC_URI[sha256sum] = "78605664d027c788f6ab63c50950be6e86c6ba5d030c4cf35a6664337d87f3b2"
-
-inherit autotools pkgconfig gettext gobject-introspection systemd
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-PACKAGECONFIG[idevice] = "--with-idevice,--without-idevice,libimobiledevice libplist"
-PACKAGECONFIG[systemd] = "--with-systemdutildir=${systemd_unitdir} --with-systemdsystemunitdir=${systemd_system_unitdir}, \
-                          --without-systemdutildir --without-systemdsystemunitdir,systemd"
-
-EXTRA_OECONF = " --with-backend=linux"
-
-SYSTEMD_SERVICE_${PN} = "upower.service"
-# don't start on boot by default - dbus does that on demand
-SYSTEMD_AUTO_ENABLE = "disable"
-
-do_configure_prepend() {
-    sed -i -e s:-nonet:\:g ${S}/doc/man/Makefile.am
-    sed -i -e 's: doc : :g' ${S}/Makefile.am
-}
-
-RDEPENDS_${PN} += "dbus"
-RRECOMMENDS_${PN} += "pm-utils"
-FILES_${PN} += "${datadir}/dbus-1/ \
-                ${datadir}/polkit-1/ \
-                ${base_libdir}/udev/* \
-"
-
-FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
-
-
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/upower/upower_0.99.7.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/upower/upower_0.99.7.bb
new file mode 100644
index 0000000..973fbe7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/upower/upower_0.99.7.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics. "
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0de8fbf1d97a140d1d93b9f14dcfbf08"
+
+DEPENDS = "intltool-native libusb1 libgudev glib-2.0 dbus-glib polkit"
+
+SRC_URI = "http://upower.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "236bb439d9ff1151450b3d8582399532"
+SRC_URI[sha256sum] = "24bcc2f6ab25a2533bac70b587bcb019e591293076920f5b5e04bdedc140a401"
+
+inherit autotools pkgconfig gettext gobject-introspection systemd
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[idevice] = "--with-idevice,--without-idevice,libimobiledevice libplist"
+PACKAGECONFIG[systemd] = "--with-systemdutildir=${systemd_unitdir} --with-systemdsystemunitdir=${systemd_system_unitdir}, \
+                          --without-systemdutildir --without-systemdsystemunitdir,systemd"
+
+EXTRA_OECONF = " --with-backend=linux"
+
+SYSTEMD_SERVICE_${PN} = "upower.service"
+# don't start on boot by default - dbus does that on demand
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_configure_prepend() {
+    sed -i -e s:-nonet:\:g ${S}/doc/man/Makefile.am
+    sed -i -e 's: doc : :g' ${S}/Makefile.am
+}
+
+RDEPENDS_${PN} += "dbus"
+RRECOMMENDS_${PN} += "pm-utils"
+FILES_${PN} += "${datadir}/dbus-1/ \
+                ${datadir}/polkit-1/ \
+                ${base_libdir}/udev/* \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uriparser/uriparser_0.8.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/uriparser/uriparser_0.8.4.bb
new file mode 100644
index 0000000..b4be853
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/uriparser/uriparser_0.8.4.bb
@@ -0,0 +1,14 @@
+SUMMARY = "RFC 3986 compliant URI parsing library"
+HOMEPAGE = "https://uriparser.github.io"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=72b0f9c74ae96eeab8cf1bf3efe08da2"
+
+SRC_URI := "${SOURCEFORGE_MIRROR}/project/uriparser/Sources/${PV}/uriparser-${PV}.tar.bz2"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-test --disable-doc"
+
+SRC_URI[md5sum] = "9aabdc3611546f553f4af372167de6d6"
+SRC_URI[sha256sum] = "ce7ccda4136974889231e8426a785e7578e66a6283009cfd13f1b24a5e657b23"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb
index ff439f3..ac0df8b 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb
@@ -8,7 +8,9 @@
 SRC_URI[md5sum] = "38ad5c9d70e06227a00361bdc2b1e568"
 SRC_URI[sha256sum] = "31c0be280d49a99ec3dc0be3325bef320d9c04b50714ef0ce1e36a614d687633"
 
-inherit pkgconfig
+inherit pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "usb_modeswitch@.service"
 
 EXTRA_OEMAKE = "TCL=${bindir}/tclsh"
 
@@ -18,4 +20,8 @@
 
 do_install() {
     oe_runmake DESTDIR=${D} install
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${S}/usb_modeswitch@.service ${D}/${systemd_unitdir}/system
+    fi
 }
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash/run-ptest b/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash/run-ptest
new file mode 100755
index 0000000..14071a6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd tests
+for i in test*[0-9] ; do
+    if ./${i} | cmp -s "${i}.ans" - ; then
+        echo "PASS: ${i}"
+    else
+        echo "FAIL: ${i}"
+    fi
+done
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash_1.9.7.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash_1.9.7.bb
deleted file mode 100644
index 82a9f2a..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash_1.9.7.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Hash table for C structures"
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=564f9c44927f6247dc810bf557e2b240"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "1f14bbee7ee73ed0ceb3549f8cf378b4"
-SRC_URI[sha256sum] = "956f5c99798349c413275fe4c9ff128d72e280655dadbe4365f8e9fbda91393f"
-
-do_install () {
-    install -dm755 ${D}${includedir}
-    install -m 0644 ${S}/src/*.h ${D}${includedir}
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash_2.0.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash_2.0.2.bb
new file mode 100644
index 0000000..ccdd13b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/uthash/uthash_2.0.2.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Hash table and linked list for C structures"
+DESCRIPTION = " uthash-dev provides a hash table implementation using C preprocessor macros.\n\
+ This package also includes:\n\
+  * utlist.h provides linked list macros for C structures\n\
+  * utarray.h implements dynamic arrays using macros\n\
+  * utstring.h implements a basic dynamic string\n\
+"
+HOMEPAGE = "https://troydhanson.github.io/uthash/"
+SECTION = "base"
+LICENSE = "BSD-1-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4"
+
+SRC_URI = "\
+    https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+    file://run-ptest \
+"
+UPSTREAM_CHECK_URI = "https://github.com/troydhanson/${BPN}/releases"
+
+SRC_URI[md5sum] = "d08632a58674274c9cd87e2930f5696a"
+SRC_URI[sha256sum] = "34a31d51dd7a839819cecd6f46049b4ffe031d7f3147d9a042f5504fdb1348d1"
+
+inherit ptest
+
+do_compile[noexec] = "1"
+
+do_compile_ptest() {
+    oe_runmake -C tests tests_only TEST_TARGET=
+}
+
+do_install () {
+    install -dm755 ${D}${includedir}
+    install -m0644 src/*.h ${D}${includedir}
+}
+
+do_install_ptest() {
+    install -dm755 ${D}${PTEST_PATH}/tests
+    install -m0755 tests/test*[0-9] ${D}${PTEST_PATH}/tests
+    install -m0644 tests/test*[0-9].ans ${D}${PTEST_PATH}/tests
+    install -m0644 tests/test*[0-9].dat ${D}${PTEST_PATH}/tests
+}
+
+# The main package is empty and non-existent, so -dev
+# should not depend on it...
+RDEPENDS_${PN}-dev = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.26.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.26.bb
deleted file mode 100644
index fdefe03..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.26.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-SUMMARY = "VirtualBox Linux Guest Drivers"
-SECTION = "core"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660"
-
-DEPENDS = "virtual/kernel"
-
-inherit module kernel-module-split
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64)"
-
-VBOX_NAME = "VirtualBox-${PV}"
-
-SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
-           file://Makefile.utils \
-"
-SRC_URI[md5sum] = "d3aec8190c649d7e0d92ba374779dfe3"
-SRC_URI[sha256sum] = "b5715035e681a11ef1475f83f9503d34a00f0276b89c572eebec363dda80c8a9"
-
-S = "${WORKDIR}/vbox_module"
-
-export BUILD_TARGET_ARCH="${ARCH}"
-export BUILD_TARGET_ARCH_x86-64="amd64"
-export KERN_DIR="${STAGING_KERNEL_DIR}"
-
-addtask export_sources before do_patch after do_unpack
-
-do_export_sources() {
-    mkdir -p "${S}"
-    ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules ${T}/vbox_modules.tar.gz
-    tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz
-
-    # add a mount utility to use shared folder from VBox Addition Source Code
-    mkdir -p "${S}/utils"
-    install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils
-    install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils
-    install ${S}/../Makefile.utils ${S}/utils/Makefile
-
-}
-
-# compile and install mount utility
-do_compile_append() {
-    oe_runmake 'LD=${CC}' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils
-    if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then
-        echo "ERROR: One of vbox*.ko modules wasn't built"
-        exit 1
-    fi
-}
-
-module_do_install() {
-    MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc
-    install -d $MODULE_DIR
-    install -m 644 vboxguest.ko $MODULE_DIR
-    install -m 644 vboxsf.ko $MODULE_DIR
-    install -m 644 vboxvideo.ko $MODULE_DIR
-}
-
-do_install_append() {
-    install -d ${D}${base_sbindir}
-    install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir}
-}
-
-PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
-RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
-
-FILES_${PN} = "${base_sbindir}"
-
-# autoload if installed
-KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb
new file mode 100644
index 0000000..e00db4d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb
@@ -0,0 +1,78 @@
+SUMMARY = "VirtualBox Linux Guest Drivers"
+SECTION = "core"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660"
+
+DEPENDS = "virtual/kernel"
+
+inherit module kernel-module-split
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64)"
+
+VBOX_NAME = "VirtualBox-${PV}"
+
+SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
+    file://Makefile.utils \
+"
+
+SRC_URI[md5sum] = "e731ea9c5c31096ec4c2a3bfba26665c"
+SRC_URI[sha256sum] = "ee2759d47b0b4ac81b8b671c9485c87fb2db12c097b3e7e69b94c1291a8084e8"
+
+S = "${WORKDIR}/vbox_module"
+
+export BUILD_TARGET_ARCH="${ARCH}"
+export BUILD_TARGET_ARCH_x86-64="amd64"
+
+EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build'"
+
+addtask export_sources before do_patch after do_unpack
+
+do_export_sources() {
+    mkdir -p "${S}"
+    ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules.sh ${T}/vbox_modules.tar.gz
+    tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz
+
+    # add a mount utility to use shared folder from VBox Addition Source Code
+    mkdir -p "${S}/utils"
+    install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils
+    install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils
+    install ${S}/../Makefile.utils ${S}/utils/Makefile
+
+}
+
+do_configure_prepend() {
+    # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:99: *** The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set.  Stop.
+    # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:108: *** The kernel build folder path must end in <version>/build, or the variable KERN_VER must be set.  Stop.
+    mkdir -p ${WORKDIR}/${KERNEL_VERSION}
+    ln -snf ${STAGING_KERNEL_DIR} ${WORKDIR}/${KERNEL_VERSION}/build
+}
+
+# compile and install mount utility
+do_compile_append() {
+    oe_runmake 'LD=${CC}' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils
+    if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then
+        echo "ERROR: One of vbox*.ko modules wasn't built"
+        exit 1
+    fi
+}
+
+module_do_install() {
+    MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc
+    install -d $MODULE_DIR
+    install -m 644 vboxguest.ko $MODULE_DIR
+    install -m 644 vboxsf.ko $MODULE_DIR
+    install -m 644 vboxvideo.ko $MODULE_DIR
+}
+
+do_install_append() {
+    install -d ${D}${base_sbindir}
+    install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir}
+}
+
+PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
+RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
+
+FILES_${PN} = "${base_sbindir}"
+
+# autoload if installed
+KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/vim/files/CVE-2017-17087.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/vim/files/CVE-2017-17087.patch
new file mode 100644
index 0000000..937b9ba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/vim/files/CVE-2017-17087.patch
@@ -0,0 +1,70 @@
+From 9c11f80339372b7aa2f43153d574f2b5abb79708 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Sun, 17 Dec 2017 23:09:35 -0800
+Subject: [PATCH] vim: patch 8.0.1263: others can read the swap file if a user
+ is careless
+
+Problem:    Others can read the swap file if a user is careless with his
+            primary group.
+Solution:   If the group permission allows for reading but the world
+            permissions doesn't, make sure the group is right.
+
+Upstream-Status: Backport
+CVE: CVE-2017-17087
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ src/fileio.c  | 24 +++++++++++++++++++++++-
+ src/version.c |  2 ++
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/src/fileio.c b/src/fileio.c
+index f54fb8465..2c7740af9 100644
+--- a/src/fileio.c
++++ b/src/fileio.c
+@@ -716,7 +716,29 @@ readfile(
+ 	/* Set swap file protection bits after creating it. */
+ 	if (swap_mode > 0 && curbuf->b_ml.ml_mfp != NULL
+ 			  && curbuf->b_ml.ml_mfp->mf_fname != NULL)
+-	    (void)mch_setperm(curbuf->b_ml.ml_mfp->mf_fname, (long)swap_mode);
++	{
++	    char_u *swap_fname = curbuf->b_ml.ml_mfp->mf_fname;
++
++	    /*
++	     * If the group-read bit is set but not the world-read bit, then
++	     * the group must be equal to the group of the original file.  If
++	     * we can't make that happen then reset the group-read bit.  This
++	     * avoids making the swap file readable to more users when the
++	     * primary group of the user is too permissive.
++	     */
++	    if ((swap_mode & 044) == 040)
++	    {
++		stat_T	swap_st;
++
++		if (mch_stat((char *)swap_fname, &swap_st) >= 0
++			&& st.st_gid != swap_st.st_gid
++			&& fchown(curbuf->b_ml.ml_mfp->mf_fd, -1, st.st_gid)
++									 == -1)
++		    swap_mode &= 0600;
++	    }
++
++	    (void)mch_setperm(swap_fname, (long)swap_mode);
++	}
+ #endif
+     }
+ 
+diff --git a/src/version.c b/src/version.c
+index a5cb078f0..5c0df475f 100644
+--- a/src/version.c
++++ b/src/version.c
+@@ -770,6 +770,8 @@ static char *(features[]) =
+ static int included_patches[] =
+ {   /* Add new patch number below this line */
+ /**/
++    1263,
++/**/
+     983,
+ /**/
+     982,
+-- 
+2.11.0
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/vim/vim_8.0.0983.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/vim/vim_8.0.0983.bb
index 407ce5e..44c868c 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/vim/vim_8.0.0983.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/vim/vim_8.0.0983.bb
@@ -9,6 +9,7 @@
 SRC_URI = "git://github.com/vim/vim.git \
            file://disable_acl_header_check.patch;patchdir=.. \
            file://vim-add-knob-whether-elf.h-are-checked.patch;patchdir=.. \
+           file://CVE-2017-17087.patch;patchdir=.. \
 "
 SRCREV = "3f9a1ff141412e9e85f7dff47d02946cb9be9228"
 
@@ -16,8 +17,9 @@
 
 VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}"
 
-inherit autotools update-alternatives
-inherit autotools-brokensep
+inherit autotools-brokensep update-alternatives
+
+CLEANBROKEN = "1"
 
 # vim configure.in contains functions which got 'dropped' by autotools.bbclass
 do_configure () {
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/0001-Fix-issue-599.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/0001-Fix-issue-599.patch
new file mode 100644
index 0000000..2a9ea74
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/0001-Fix-issue-599.patch
@@ -0,0 +1,31 @@
+From 1dd07113f2a7489444a8990a95be42e035f8e9df Mon Sep 17 00:00:00 2001
+From: Kurt Roeckx <kroeckx@debian.org>
+Date: Tue, 1 Nov 2016 12:57:35 +0100
+Subject: [PATCH] Fix issue #599
+Forwarded: https://github.com/zaphoyd/websocketpp/pull/600
+
+---
+ websocketpp/transport/asio/security/tls.hpp | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp
+index 7b32db8..a8aafec 100644
+--- a/websocketpp/transport/asio/security/tls.hpp
++++ b/websocketpp/transport/asio/security/tls.hpp
+@@ -355,13 +355,9 @@ protected:
+     template <typename ErrorCodeType>
+     lib::error_code translate_ec(ErrorCodeType ec) {
+         if (ec.category() == lib::asio::error::get_ssl_category()) {
+-            if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
+-                return make_error_code(transport::error::tls_short_read);
+-            } else {
+                 // We know it is a TLS related error, but otherwise don't know
+                 // more. Pass through as TLS generic.
+                 return make_error_code(transport::error::tls_error);
+-            }
+         } else {
+             // We don't know any more information about this error so pass
+             // through
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/4cab5e5c0c5f19fcee7d37b4a38b156d63a150d4.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/4cab5e5c0c5f19fcee7d37b4a38b156d63a150d4.patch
new file mode 100644
index 0000000..530c960
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/4cab5e5c0c5f19fcee7d37b4a38b156d63a150d4.patch
@@ -0,0 +1,155 @@
+From 4cab5e5c0c5f19fcee7d37b4a38b156d63a150d4 Mon Sep 17 00:00:00 2001
+From: Peter Thorson <git@zaphoyd.com>
+Date: Sun, 11 Jun 2017 16:13:25 -0500
+Subject: [PATCH] minor adjustments to recent extension negotiation related
+ fixes, refactor a bit more extension negotiation code to be simpler
+
+---
+ websocketpp/impl/connection_impl.hpp |  6 +--
+ websocketpp/processors/hybi13.hpp    | 92 ++++++++++++++++++------------------
+ 2 files changed, 49 insertions(+), 49 deletions(-)
+
+Index: websocketpp-0.7.0/websocketpp/impl/connection_impl.hpp
+===================================================================
+--- websocketpp-0.7.0.orig/websocketpp/impl/connection_impl.hpp
++++ websocketpp-0.7.0/websocketpp/impl/connection_impl.hpp
+@@ -1222,17 +1222,17 @@
+     std::pair<lib::error_code,std::string> neg_results;
+     neg_results = m_processor->negotiate_extensions(m_request);
+ 
+-    if (neg_results.first == error::make_error_code(error::extension_parse_error)) {
++    if (neg_results.first == processor::error::make_error_code(processor::error::extension_parse_error)) {
+         // There was a fatal error in extension parsing that should result in
+         // a failed connection attempt.
+-        m_alog.write(log::alevel::info, "Bad request: " + neg_results.first.message());
++        m_elog.write(log::elevel::info, "Bad request: " + neg_results.first.message());
+         m_response.set_status(http::status_code::bad_request);
+         return neg_results.first;
+     } else if (neg_results.first) {
+         // There was a fatal error in extension processing that is probably our
+         // fault. Consider extension negotiation to have failed and continue as
+         // if extensions were not supported
+-        m_alog.write(log::alevel::info, 
++        m_elog.write(log::elevel::info, 
+             "Extension negotiation failed: " + neg_results.first.message());
+     } else {
+         // extension negotiation succeeded, set response header accordingly
+Index: websocketpp-0.7.0/websocketpp/processors/hybi13.hpp
+===================================================================
+--- websocketpp-0.7.0.orig/websocketpp/processors/hybi13.hpp
++++ websocketpp-0.7.0/websocketpp/processors/hybi13.hpp
+@@ -97,11 +97,6 @@
+     /**
+      * This exists mostly because the code for requests and responses is
+      * identical and I can't have virtual template methods.
+-     *
+-     * NOTE: this method makes assumptions that the permessage-deflate
+-     * extension is the only one supported. If additional extensions are
+-     * ever supported it should be reviewed carefully. Most cases where
+-     * that assumption is made are explicitly noted.
+      */
+     template <typename header_type>
+     err_str_pair negotiate_extensions_helper(header_type const & header) {
+@@ -130,55 +125,60 @@
+ 
+         http::parameter_list::const_iterator it;
+ 
++        // look through the list of extension requests to find the first
++        // one that we can accept.
+         if (m_permessage_deflate.is_implemented()) {
+             err_str_pair neg_ret;
+             for (it = p.begin(); it != p.end(); ++it) {
+-                // look through each extension, if the key is permessage-deflate
+-                if (it->first == "permessage-deflate") {
+-                    // if we have already successfully negotiated this extension
+-                    // then skip any other requests to negotiate the same one
+-                    // with different parameters 
+-                    if (m_permessage_deflate.is_enabled()) {
+-                        continue;
+-                    }
+-                    
+-                    
+-                    neg_ret = m_permessage_deflate.negotiate(it->second);
+-
+-                    if (neg_ret.first) {
+-                        // Figure out if this is an error that should halt all
+-                        // extension negotiations or simply cause negotiation of
+-                        // this specific extension to fail.
+-                        //std::cout << "permessage-compress negotiation failed: "
+-                        //          << neg_ret.first.message() << std::endl;
+-                    } else {
+-                        // Note: this list will need commas if WebSocket++ ever
+-                        // supports more than one extension
+-                        
+-                        // Actually try to initialize the extension before we
+-                        // deem negotiation complete
+-                        ret.first = m_permessage_deflate.init(base::m_server);
+-                        if (!ret.first) {
+-
+-                            // TODO: support multiple extensions.
+-                            // right now, because there is only one extension 
+-                            // supported, it failing to negotiate means we are
+-                            // done with all negotiating. In the future if more
+-                            // extensions are supported a better solution will
+-                            // be needed here.
+-                            break;
+-                        } else {
+-                            ret.second += neg_ret.second;
+-
+-                            // continue looking for more extensions
+-                            continue;
+-                        }
+-                        
+-                    }
++                // not a permessage-deflate extension request, ignore
++                if (it->first != "permessage-deflate") {
++                    continue;
++                }
++
++                // if we have already successfully negotiated this extension
++                // then skip any other requests to negotiate the same one
++                // with different parameters 
++                if (m_permessage_deflate.is_enabled()) {
++                    continue;
++                }
++                
++                // attempt to negotiate this offer
++                neg_ret = m_permessage_deflate.negotiate(it->second);
++
++                if (neg_ret.first) {
++                    // negotiation offer failed. Do nothing. We will continue
++                    // searching for a permessage-deflate config that succeeds
++                    continue;
++                }
++
++                // Negotiation tentatively succeeded
++
++                // Actually try to initialize the extension before we
++                // deem negotiation complete
++                lib::error_code ec = m_permessage_deflate.init(base::m_server);
++
++                if (ec) {
++                    // Negotiation succeeded but initialization failed this is 
++                    // an error that should stop negotiation of permessage 
++                    // deflate. Return the reason for the init failure
++
++                    ret.first = ec;
++                    break;
++                } else {
++                    // Successfully initialized, push the negotiated response into
++                    // the reply and stop looking for additional permessage-deflate
++                    // extensions
++                    ret.second += neg_ret.second;
++                    break;
+                 }
+             }
+         }
+ 
++        // support for future extensions would go here. Should check the value of 
++        // ret.first before continuing. Might need to consider whether failure of
++        // negotiation of an earlier extension should stop negotiation of subsequent
++        // ones
++
+         return ret;
+     }
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/9ddb300d874a30db35e3ad58f188944bef0bf31b.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/9ddb300d874a30db35e3ad58f188944bef0bf31b.patch
new file mode 100644
index 0000000..94bfeb2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/9ddb300d874a30db35e3ad58f188944bef0bf31b.patch
@@ -0,0 +1,600 @@
+## Description: add some description
+## Origin/Author: add some origin or author
+## Bug: bug URL
+From 9ddb300d874a30db35e3ad58f188944bef0bf31b Mon Sep 17 00:00:00 2001
+From: Peter Thorson <git@zaphoyd.com>
+Date: Sun, 11 Jun 2017 15:24:43 -0500
+Subject: [PATCH] Update permessage-deflate support to reflect that zlib
+ doesn't support a 256 bit window. Improve extension negotiation error
+ checking and documentation. fixes #596 fixes #653
+
+---
+ changelog.md                                       |   8 ++
+ test/extension/permessage_deflate.cpp              | 153 +++++++++++++++++----
+ .../extensions/permessage_deflate/enabled.hpp      |  94 ++++++++++---
+ websocketpp/impl/connection_impl.hpp               |  10 +-
+ websocketpp/processors/hybi13.hpp                  |  28 +++-
+ 5 files changed, 247 insertions(+), 46 deletions(-)
+
+diff --git a/changelog.md b/changelog.md
+index bba753cb..de98edd2 100644
+#--- a/changelog.md
+#+++ b/changelog.md
+#@@ -17,6 +17,14 @@ HEAD
+# - Compatibility: Update `telemetry_client` to use a slightly more cross platform
+#   method of sleeping. Should work on windows now. Thank you Meir Yanovich for
+#   reporting.
+#+- Compatibility: Updated permessage-deflate support to reflect that the zlib
+#+  library does not actually support a sliding window size of 256 bits. 
+#+  WebSocket++ will no longer negotiate 256 bit deflate windows. If the user
+#+  of the library tries to request a 256 bit window a 512 bit window will be
+#+  specified instead (This was the previous behavior). #596 #653 Thank you 
+#+  Vinnie Falco and Gianfranco Costamagna for reporting.
+#+- Compatibility: Better error handling and logging in cases where extension
+#+  requests parse correctly but negotiation fails. 
+# - Bug: Store loggers in shared pointers to avoid crashes related to connections
+#   trying to write logs entries after their respective endpoint has been
+#   deallocated. Thank you Thalhammer for reporting and Jupp Müller for the 
+diff --git a/test/extension/permessage_deflate.cpp b/test/extension/permessage_deflate.cpp
+index 4cd3e7b6..805afcc3 100644
+--- a/test/extension/permessage_deflate.cpp
++++ b/test/extension/permessage_deflate.cpp
+@@ -186,15 +186,22 @@ BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_invalid ) {
+ 
+ BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_valid ) {
+     ext_vars v;
++    
++    // confirm that a request for a value of 8 is interpreted as 9
+     v.attr["server_max_window_bits"] = "8";
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
+ 
++    v.attr["server_max_window_bits"] = "9";
+     v.esp = v.exts.negotiate(v.attr);
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
+ 
+-    v.attr["server_max_window_bits"] = "15";
+ 
++    v.attr["server_max_window_bits"] = "15";
+     v.esp = v.exts.negotiate(v.attr);
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+@@ -213,7 +220,7 @@ BOOST_AUTO_TEST_CASE( invalid_set_server_max_window_bits ) {
+ 
+ BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_decline ) {
+     ext_vars v;
+-    v.attr["server_max_window_bits"] = "8";
++    v.attr["server_max_window_bits"] = "9";
+ 
+     v.ec = v.exts.set_server_max_window_bits(15,pmd_mode::decline);
+     v.esp = v.exts.negotiate(v.attr);
+@@ -223,7 +230,7 @@ BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_decline ) {
+     BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate");
+ }
+ 
+-BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_accept ) {
++BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_accept_8 ) {
+     ext_vars v;
+     v.attr["server_max_window_bits"] = "8";
+ 
+@@ -232,10 +239,22 @@ BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_accept ) {
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
+ }
+ 
+-BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_largest ) {
++BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_accept ) {
++    ext_vars v;
++    v.attr["server_max_window_bits"] = "9";
++
++    v.ec = v.exts.set_server_max_window_bits(15,pmd_mode::accept);
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
++}
++
++BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_largest_8 ) {
+     ext_vars v;
+     v.attr["server_max_window_bits"] = "8";
+ 
+@@ -244,10 +263,22 @@ BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_largest ) {
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
+ }
+ 
+-BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_smallest ) {
++BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_largest ) {
++    ext_vars v;
++    v.attr["server_max_window_bits"] = "9";
++
++    v.ec = v.exts.set_server_max_window_bits(15,pmd_mode::largest);
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
++}
++
++BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_smallest_8 ) {
+     ext_vars v;
+     v.attr["server_max_window_bits"] = "8";
+ 
+@@ -256,7 +287,19 @@ BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_smallest ) {
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
++}
++
++BOOST_AUTO_TEST_CASE( negotiate_server_max_window_bits_smallest ) {
++    ext_vars v;
++    v.attr["server_max_window_bits"] = "9";
++
++    v.ec = v.exts.set_server_max_window_bits(15,pmd_mode::smallest);
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; server_max_window_bits=9");
+ }
+ 
+ // Negotiate server_max_window_bits
+@@ -292,7 +335,13 @@ BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_valid ) {
+     v.esp = v.exts.negotiate(v.attr);
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
++
++    v.attr["client_max_window_bits"] = "9";
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
+ 
+     v.attr["client_max_window_bits"] = "15";
+     v.esp = v.exts.negotiate(v.attr);
+@@ -311,7 +360,7 @@ BOOST_AUTO_TEST_CASE( invalid_set_client_max_window_bits ) {
+     BOOST_CHECK_EQUAL(v.ec,pmde::make_error_code(pmde::invalid_max_window_bits));
+ }
+ 
+-BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_decline ) {
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_decline_8 ) {
+     ext_vars v;
+     v.attr["client_max_window_bits"] = "8";
+ 
+@@ -323,7 +372,19 @@ BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_decline ) {
+     BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate");
+ }
+ 
+-BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_accept ) {
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_decline ) {
++    ext_vars v;
++    v.attr["client_max_window_bits"] = "9";
++
++    v.ec = v.exts.set_client_max_window_bits(9,pmd_mode::decline);
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate");
++}
++
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_accept_8 ) {
+     ext_vars v;
+     v.attr["client_max_window_bits"] = "8";
+ 
+@@ -332,10 +393,22 @@ BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_accept ) {
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
+ }
+ 
+-BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_largest ) {
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_accept ) {
++    ext_vars v;
++    v.attr["client_max_window_bits"] = "9";
++
++    v.ec = v.exts.set_client_max_window_bits(15,pmd_mode::accept);
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
++}
++
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_largest_8 ) {
+     ext_vars v;
+     v.attr["client_max_window_bits"] = "8";
+ 
+@@ -344,10 +417,22 @@ BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_largest ) {
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
+ }
+ 
+-BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_smallest ) {
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_largest ) {
++    ext_vars v;
++    v.attr["client_max_window_bits"] = "9";
++
++    v.ec = v.exts.set_client_max_window_bits(15,pmd_mode::largest);
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
++}
++
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_smallest_8 ) {
+     ext_vars v;
+     v.attr["client_max_window_bits"] = "8";
+ 
+@@ -356,7 +441,19 @@ BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_smallest ) {
+     BOOST_CHECK( v.exts.is_enabled() );
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+     BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
+-    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=8");
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
++}
++
++BOOST_AUTO_TEST_CASE( negotiate_client_max_window_bits_smallest ) {
++    ext_vars v;
++    v.attr["client_max_window_bits"] = "9";
++
++    v.ec = v.exts.set_client_max_window_bits(15,pmd_mode::smallest);
++    v.esp = v.exts.negotiate(v.attr);
++    BOOST_CHECK( v.exts.is_enabled() );
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.first, websocketpp::lib::error_code() );
++    BOOST_CHECK_EQUAL( v.esp.second, "permessage-deflate; client_max_window_bits=9");
+ }
+ 
+ 
+@@ -507,7 +604,8 @@ BOOST_AUTO_TEST_CASE( compress_data ) {
+     std::string compress_out;
+     std::string decompress_out;
+ 
+-    v.exts.init(true);
++    v.ec = v.exts.init(true);
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+ 
+     v.ec = v.exts.compress(compress_in,compress_out);
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+@@ -520,7 +618,8 @@ BOOST_AUTO_TEST_CASE( compress_data ) {
+ BOOST_AUTO_TEST_CASE( compress_data_multiple ) {
+     ext_vars v;
+ 
+-    v.exts.init(true);
++    v.ec = v.exts.init(true);
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+ 
+     for (int i = 0; i < 2; i++) {
+         std::string compress_in = "Hello";
+@@ -545,11 +644,12 @@ BOOST_AUTO_TEST_CASE( compress_data_large ) {
+ 
+     websocketpp::http::attribute_list alist;
+ 
+-    alist["server_max_window_bits"] = "8";
+-    v.exts.set_server_max_window_bits(8,websocketpp::extensions::permessage_deflate::mode::smallest);
++    alist["server_max_window_bits"] = "9";
++    v.exts.set_server_max_window_bits(9,websocketpp::extensions::permessage_deflate::mode::smallest);
+ 
+     v.exts.negotiate(alist);
+-    v.exts.init(true);
++    v.ec = v.exts.init(true);
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+ 
+     v.ec = v.exts.compress(compress_in,compress_out);
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+@@ -573,7 +673,8 @@ BOOST_AUTO_TEST_CASE( compress_data_no_context_takeover ) {
+     v.exts.enable_server_no_context_takeover();
+ 
+     v.exts.negotiate(alist);
+-    v.exts.init(true);
++    v.ec = v.exts.init(true);
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+ 
+     v.ec = v.exts.compress(compress_in,compress_out1);
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+@@ -609,7 +710,8 @@ BOOST_AUTO_TEST_CASE( compress_empty ) {
+     std::string compress_out;
+     std::string decompress_out;
+ 
+-    v.exts.init(true);
++    v.ec = v.exts.init(true);
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+ 
+     v.ec = v.exts.compress(compress_in,compress_out);
+     BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+@@ -640,7 +742,8 @@ BOOST_AUTO_TEST_CASE( decompress_data ) {
+     std::string out;
+     std::string reference = "Hello";
+ 
+-    v.exts.init(true);
++    v.ec = v.exts.init(true);
++    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
+ 
+     v.ec = v.exts.decompress(in,11,out);
+ 
+diff --git a/websocketpp/extensions/permessage_deflate/enabled.hpp b/websocketpp/extensions/permessage_deflate/enabled.hpp
+index 1581f14c..f20a1b1d 100644
+--- a/websocketpp/extensions/permessage_deflate/enabled.hpp
++++ b/websocketpp/extensions/permessage_deflate/enabled.hpp
+@@ -46,7 +46,7 @@
+ namespace websocketpp {
+ namespace extensions {
+ 
+-/// Implementation of the draft permessage-deflate WebSocket extension
++/// Implementation of RFC 7692, the permessage-deflate WebSocket extension
+ /**
+  * ### permessage-deflate interface
+  *
+@@ -174,18 +174,30 @@ namespace websocketpp {
+ namespace extensions {
+ namespace permessage_deflate {
+ 
+-/// Default value for server_max_window_bits as defined by draft 17
++/// Default value for server_max_window_bits as defined by RFC 7692
+ static uint8_t const default_server_max_window_bits = 15;
+-/// Minimum value for server_max_window_bits as defined by draft 17
++/// Minimum value for server_max_window_bits as defined by RFC 7692
++/**
++ * NOTE: A value of 8 is not actually supported by zlib, the deflate
++ * library that WebSocket++ uses. To preserve backwards compatibility
++ * with RFC 7692 and previous versions of the library a value of 8
++ * is accepted by the library but will always be negotiated as 9.
++ */
+ static uint8_t const min_server_max_window_bits = 8;
+-/// Maximum value for server_max_window_bits as defined by draft 17
++/// Maximum value for server_max_window_bits as defined by RFC 7692
+ static uint8_t const max_server_max_window_bits = 15;
+ 
+-/// Default value for client_max_window_bits as defined by draft 17
++/// Default value for client_max_window_bits as defined by RFC 7692
+ static uint8_t const default_client_max_window_bits = 15;
+-/// Minimum value for client_max_window_bits as defined by draft 17
++/// Minimum value for client_max_window_bits as defined by RFC 7692
++/**
++ * NOTE: A value of 8 is not actually supported by zlib, the deflate
++ * library that WebSocket++ uses. To preserve backwards compatibility
++ * with RFC 7692 and previous versions of the library a value of 8
++ * is accepted by the library but will always be negotiated as 9.
++ */
+ static uint8_t const min_client_max_window_bits = 8;
+-/// Maximum value for client_max_window_bits as defined by draft 17
++/// Maximum value for client_max_window_bits as defined by RFC 7692
+ static uint8_t const max_client_max_window_bits = 15;
+ 
+ namespace mode {
+@@ -372,7 +384,7 @@ class enabled {
+     /**
+      * The bits setting is the base 2 logarithm of the maximum window size that
+      * the server must use to compress outgoing messages. The permitted range
+-     * is 8 to 15 inclusive. 8 represents a 256 byte window and 15 a 32KiB
++     * is 9 to 15 inclusive. 9 represents a 512 byte window and 15 a 32KiB
+      * window. The default setting is 15.
+      *
+      * Mode Options:
+@@ -386,6 +398,14 @@ class enabled {
+      * adjusted by the server. A server may unilaterally set this value without
+      * client support.
+      *
++     * NOTE: The permessage-deflate spec specifies that a value of 8 is allowed.
++     * Prior to version 0.8.0 a value of 8 was also allowed by this library.
++     * zlib, the deflate compression library that WebSocket++ uses has always
++     * silently adjusted a value of 8 to 9. In recent versions of zlib (1.2.9 
++     * and greater) a value of 8 is now explicitly rejected. WebSocket++ 0.8.0
++     * continues to perform the 8->9 conversion for backwards compatibility
++     * purposes but this should be considered deprecated functionality.
++     *
+      * @param bits The size to request for the outgoing window size
+      * @param mode The mode to use for negotiating this parameter
+      * @return A status code
+@@ -394,6 +414,12 @@ class enabled {
+         if (bits < min_server_max_window_bits || bits > max_server_max_window_bits) {
+             return error::make_error_code(error::invalid_max_window_bits);
+         }
++
++        // See note in doc comment above about what is happening here
++        if (bits == 8) {
++            bits = 9;
++        }
++
+         m_server_max_window_bits = bits;
+         m_server_max_window_bits_mode = mode;
+ 
+@@ -403,8 +429,8 @@ class enabled {
+     /// Limit client LZ77 sliding window size
+     /**
+      * The bits setting is the base 2 logarithm of the window size that the
+-     * client must use to compress outgoing messages. The permitted range is 8
+-     * to 15 inclusive. 8 represents a 256 byte window and 15 a 32KiB window.
++     * client must use to compress outgoing messages. The permitted range is 9
++     * to 15 inclusive. 9 represents a 512 byte window and 15 a 32KiB window.
+      * The default setting is 15.
+      *
+      * Mode Options:
+@@ -417,6 +443,14 @@ class enabled {
+      * outgoing window size unilaterally. A server may only limit the client's
+      * window size if the remote client supports that feature.
+      *
++     * NOTE: The permessage-deflate spec specifies that a value of 8 is allowed.
++     * Prior to version 0.8.0 a value of 8 was also allowed by this library.
++     * zlib, the deflate compression library that WebSocket++ uses has always
++     * silently adjusted a value of 8 to 9. In recent versions of zlib (1.2.9 
++     * and greater) a value of 8 is now explicitly rejected. WebSocket++ 0.8.0
++     * continues to perform the 8->9 conversion for backwards compatibility
++     * purposes but this should be considered deprecated functionality.
++     *
+      * @param bits The size to request for the outgoing window size
+      * @param mode The mode to use for negotiating this parameter
+      * @return A status code
+@@ -425,6 +459,12 @@ class enabled {
+         if (bits < min_client_max_window_bits || bits > max_client_max_window_bits) {
+             return error::make_error_code(error::invalid_max_window_bits);
+         }
++
++        // See note in doc comment above about what is happening here
++        if (bits == 8) {
++            bits = 9;
++        }
++
+         m_client_max_window_bits = bits;
+         m_client_max_window_bits_mode = mode;
+ 
+@@ -642,11 +682,17 @@ class enabled {
+      * client requested that we use.
+      *
+      * options:
+-     * - decline (refuse to use the attribute)
+-     * - accept (use whatever the client says)
+-     * - largest (use largest possible value)
++     * - decline (ignore value, offer our default instead)
++     * - accept (use the value requested by the client)
++     * - largest (use largest value acceptable to both)
+      * - smallest (use smallest possible value)
+      *
++     * NOTE: As a value of 8 is no longer explicitly supported by zlib but might
++     * be requested for negotiation by an older client/server, if the result of
++     * the negotiation would be to send a value of 8, a value of 9 is offered
++     * instead. This ensures that WebSocket++ will only ever negotiate connections
++     * with compression settings explicitly supported by zlib.
++     *
+      * @param [in] value The value of the attribute from the offer
+      * @param [out] ec A reference to the error code to return errors via
+      */
+@@ -678,6 +724,11 @@ class enabled {
+                 ec = make_error_code(error::invalid_mode);
+                 m_server_max_window_bits = default_server_max_window_bits;
+         }
++
++        // See note in doc comment
++        if (m_server_max_window_bits == 8) {
++            m_server_max_window_bits = 9;
++        }
+     }
+ 
+     /// Negotiate client_max_window_bits attribute
+@@ -687,11 +738,17 @@ class enabled {
+      * negotiation mode.
+      *
+      * options:
+-     * - decline (refuse to use the attribute)
+-     * - accept (use whatever the client says)
+-     * - largest (use largest possible value)
++     * - decline (ignore value, offer our default instead)
++     * - accept (use the value requested by the client)
++     * - largest (use largest value acceptable to both)
+      * - smallest (use smallest possible value)
+      *
++     * NOTE: As a value of 8 is no longer explicitly supported by zlib but might
++     * be requested for negotiation by an older client/server, if the result of
++     * the negotiation would be to send a value of 8, a value of 9 is offered
++     * instead. This ensures that WebSocket++ will only ever negotiate connections
++     * with compression settings explicitly supported by zlib.
++     *
+      * @param [in] value The value of the attribute from the offer
+      * @param [out] ec A reference to the error code to return errors via
+      */
+@@ -727,6 +784,11 @@ class enabled {
+                 ec = make_error_code(error::invalid_mode);
+                 m_client_max_window_bits = default_client_max_window_bits;
+         }
++
++        // See note in doc comment
++        if (m_client_max_window_bits == 8) {
++            m_client_max_window_bits = 9;
++        }
+     }
+ 
+     bool m_enabled;
+diff --git a/websocketpp/impl/connection_impl.hpp b/websocketpp/impl/connection_impl.hpp
+index 105911db..ae55c338 100644
+--- a/websocketpp/impl/connection_impl.hpp
++++ b/websocketpp/impl/connection_impl.hpp
+@@ -1222,12 +1222,18 @@ lib::error_code connection<config>::process_handshake_request() {
+     std::pair<lib::error_code,std::string> neg_results;
+     neg_results = m_processor->negotiate_extensions(m_request);
+ 
+-    if (neg_results.first) {
++    if (neg_results.first == error::make_error_code(error::extension_parse_error)) {
+         // There was a fatal error in extension parsing that should result in
+         // a failed connection attempt.
+-        m_alog.write(log::alevel::devel, "Bad request: " + neg_results.first.message());
++        m_alog.write(log::alevel::info, "Bad request: " + neg_results.first.message());
+         m_response.set_status(http::status_code::bad_request);
+         return neg_results.first;
++    } else if (neg_results.first) {
++        // There was a fatal error in extension processing that is probably our
++        // fault. Consider extension negotiation to have failed and continue as
++        // if extensions were not supported
++        m_alog.write(log::alevel::info, 
++            "Extension negotiation failed: " + neg_results.first.message());
+     } else {
+         // extension negotiation succeeded, set response header accordingly
+         // we don't send an empty extensions header because it breaks many
+diff --git a/websocketpp/processors/hybi13.hpp b/websocketpp/processors/hybi13.hpp
+index 79486654..a95bc649 100644
+--- a/websocketpp/processors/hybi13.hpp
++++ b/websocketpp/processors/hybi13.hpp
+@@ -97,6 +97,11 @@ class hybi13 : public processor<config> {
+     /**
+      * This exists mostly because the code for requests and responses is
+      * identical and I can't have virtual template methods.
++     *
++     * NOTE: this method makes assumptions that the permessage-deflate
++     * extension is the only one supported. If additional extensions are
++     * ever supported it should be reviewed carefully. Most cases where
++     * that assumption is made are explicitly noted.
+      */
+     template <typename header_type>
+     err_str_pair negotiate_extensions_helper(header_type const & header) {
+@@ -149,9 +154,26 @@ class hybi13 : public processor<config> {
+                     } else {
+                         // Note: this list will need commas if WebSocket++ ever
+                         // supports more than one extension
+-                        ret.second += neg_ret.second;
+-                        m_permessage_deflate.init(base::m_server);
+-                        continue;
++                        
++                        // Actually try to initialize the extension before we
++                        // deem negotiation complete
++                        ret.first = m_permessage_deflate.init(base::m_server);
++                        if (!ret.first) {
++
++                            // TODO: support multiple extensions.
++                            // right now, because there is only one extension 
++                            // supported, it failing to negotiate means we are
++                            // done with all negotiating. In the future if more
++                            // extensions are supported a better solution will
++                            // be needed here.
++                            break;
++                        } else {
++                            ret.second += neg_ret.second;
++
++                            // continue looking for more extensions
++                            continue;
++                        }
++                        
+                     }
+                 }
+             }
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/disable-tests.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/disable-tests.patch
new file mode 100644
index 0000000..342981d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp-0.7.0/disable-tests.patch
@@ -0,0 +1,51 @@
+Description: Disable failing test_transport_asio_timers.
+Because of "address already in use" error
+/«PKGBUILDDIR»/test/transport/asio/timers.cpp(129): error in "tls_handshake_timeout": check ec == make_error_code(tls_handshake_timeout) failed [websocketpp.transport.asio.socket:8 != websocketpp.transport.asio.socket:5]
+Author: Gianfranco Costamagna <locutusofborg@debian.org>
+
+--- websocketpp-0.7.0.orig/test/transport/CMakeLists.txt
++++ websocketpp-0.7.0/test/transport/CMakeLists.txt
+@@ -1,24 +1,24 @@
+ if (OPENSSL_FOUND)
+ 
+-# Test transport integration
+-file (GLOB SOURCE integration.cpp)
+-
+-init_target (test_transport)
+-build_test (${TARGET_NAME} ${SOURCE})
+-link_boost ()
+-link_openssl()
+-final_target ()
+-set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test")
+-
+-# Test transport asio timers
+-file (GLOB SOURCE asio/timers.cpp)
+-
+-init_target (test_transport_asio_timers)
+-build_test (${TARGET_NAME} ${SOURCE})
+-link_boost ()
+-link_openssl()
+-final_target ()
+-set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test")
++## Test transport integration
++#file (GLOB SOURCE integration.cpp)
++#
++#init_target (test_transport)
++#build_test (${TARGET_NAME} ${SOURCE})
++#link_boost ()
++#link_openssl()
++#final_target ()
++#set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test")
++#
++## Test transport asio timers
++#file (GLOB SOURCE asio/timers.cpp)
++#
++#init_target (test_transport_asio_timers)
++#build_test (${TARGET_NAME} ${SOURCE})
++#link_boost ()
++#link_openssl()
++#final_target ()
++#set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test")
+ 
+ # Test transport asio security
+ file (GLOB SOURCE asio/security.cpp)
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp_0.7.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp_0.7.0.bb
new file mode 100644
index 0000000..65fc974
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/websocketpp/websocketpp_0.7.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "C++/Boost Asio based websocket client/server library."
+SECTION = "libs/network"
+HOMEPAGE = "https://github.com/zaphoyd/websocketpp"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=4d168d763c111f4ffc62249870e4e0ea"
+DEPENDS = "openssl boost zlib"
+
+SRC_URI = "git://github.com/zaphoyd/websocketpp.git;protocol=https;branch=master"
+
+# tag 0.7.0
+SRCREV= "378437aecdcb1dfe62096ffd5d944bf1f640ccc3"
+
+SRC_URI += "file://0001-Fix-issue-599.patch \
+            file://9ddb300d874a30db35e3ad58f188944bef0bf31b.patch \
+            file://4cab5e5c0c5f19fcee7d37b4a38b156d63a150d4.patch \
+            file://disable-tests.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit cmake
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/files/0001-explicitly-disable-man-generation-disable-documentat.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/files/0001-explicitly-disable-man-generation-disable-documentat.patch
deleted file mode 100644
index b2b0e49..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/files/0001-explicitly-disable-man-generation-disable-documentat.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 41093d9634bfeddcaec866745d8d4022f4c6f8c1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Sun, 19 Feb 2017 21:01:39 +0100
-Subject: [PATCH] explicitly disable man generation --disable-documentation is
- not enough
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index c01c54f..dcdf7a2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,6 +1,6 @@
- NULL =
- 
--SUBDIRS=po man
-+SUBDIRS=po
- 
- INCLUDES =					\
- 	-I$(top_srcdir)				\
--- 
-2.9.3
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/files/xdg-user-dirs.desktop b/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/files/xdg-user-dirs.desktop
deleted file mode 100644
index a9a22d3..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/files/xdg-user-dirs.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=User folders update
-Exec=xdg-user-dirs-update
-StartupNotify=false
-NoDisplay=true
-X-GNOME-Autostart-Phase=Initialization
-X-KDE-autostart-phase=1
-
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/xdg-user-dirs_0.15.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/xdg-user-dirs_0.15.bb
deleted file mode 100644
index c056759..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/xdg-user-dirs_0.15.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION = "xdg-user-dirs is a tool to help manage user directories like the desktop folder and the music folder"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = " \
-    http://user-dirs.freedesktop.org/releases/${BPN}-${PV}.tar.gz \
-    file://0001-explicitly-disable-man-generation-disable-documentat.patch \
-    file://xdg-user-dirs.desktop \
-"
-SRC_URI[md5sum] = "f5aaf5686ad7d8809a664bfb4566a54d"
-SRC_URI[sha256sum] = "20b4a751f41d0554bce3e0ce5e8d934be98cc62d48f0b90a894c3e1916552786"
-
-inherit autotools gettext
-
-EXTRA_OECONF = "--disable-documentation"
-
-do_install_append () {
-    install -d ${D}${sysconfdir}/xdg/autostart
-    install -m 644 ${WORKDIR}/xdg-user-dirs.desktop ${D}${sysconfdir}/xdg/autostart
-}
-
-CONFFILES_${PN} += " \
-    ${sysconfdir}/xdg/user-dirs.conf \
-    ${sysconfdir}/xdg/user-dirs.defaults \
-"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/xdg-user-dirs_0.17.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/xdg-user-dirs_0.17.bb
new file mode 100644
index 0000000..e3ce926
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xdg-user-dirs/xdg-user-dirs_0.17.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "xdg-user-dirs is a tool to help manage user directories like the desktop folder and the music folder"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "http://user-dirs.freedesktop.org/releases/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "e0564ec6d838e6e41864d872a29b3575"
+SRC_URI[sha256sum] = "2a07052823788e8614925c5a19ef5b968d8db734fdee656699ea4f97d132418c"
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--disable-documentation"
+
+CONFFILES_${PN} += " \
+    ${sysconfdir}/xdg/user-dirs.conf \
+    ${sysconfdir}/xdg/user-dirs.defaults \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb
new file mode 100644
index 0000000..0bdafdf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Xorg drivers for xrdp."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a2523660329fdca3d954c0a87390e007"
+
+inherit autotools pkgconfig 
+
+DEPENDS = "virtual/libx11 xserver-xorg xrdp nasm-native"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "x11 pam"
+
+SRC_URI = "git://github.com/neutrinolabs/xorgxrdp.git"
+
+SRCREV = "c122544f184d4031bbae1ad80fbab554c34a9427"
+
+PV = "0.2.5"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN} += "${libdir}/xorg/modules/*"
+
+INSANE_SKIP_${PN} += "xorg-driver-abi"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch
new file mode 100644
index 0000000..5e7fca0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch
@@ -0,0 +1,33 @@
+From d705b1d666cb8713d86ea6fb2fc45c424128285a Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Fri, 1 Dec 2017 10:24:50 +0900
+Subject: [PATCH] Added  req_distinguished_name in /etc/xrdp/openssl.conf,
+ otherwise, cert.pem can't be created.
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ keygen/openssl.conf | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/keygen/openssl.conf b/keygen/openssl.conf
+index 09db6c2..f077d72 100644
+--- a/keygen/openssl.conf
++++ b/keygen/openssl.conf
+@@ -4,6 +4,14 @@ distinguished_name = req_distinguished_name
+ x509_extensions = v3_ca
+ 
+ [req_distinguished_name]
++# Certificate subject
++#countryName = US
++#stateOrProvinceName = CA
++#localityName = Sunnyvale
++#organizationName = xrdp
++#organizationalUnitName =
++commonName = XRDP
++#emailAddress =
+ 
+ [v3_ca]
+ # Extensions for a typical CA - PKIX recommendation.
+-- 
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-of-CVE-2017-16927.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-of-CVE-2017-16927.patch
new file mode 100644
index 0000000..4c93647
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-of-CVE-2017-16927.patch
@@ -0,0 +1,148 @@
+Subject: [PATCH] Fix CVE-2017-16927
+
+sesman: scpv0, accept variable length data fields
+
+Upstream-Status: Backport 
+
+---
+ sesman/libscp/libscp_v0.c | 32 +++++++++++++++++++++++++-------
+ 1 file changed, 25 insertions(+), 7 deletions(-)
+
+diff --git a/sesman/libscp/libscp_v0.c b/sesman/libscp/libscp_v0.c
+index 5a0c8bf..5693407 100644
+--- a/sesman/libscp/libscp_v0.c
++++ b/sesman/libscp/libscp_v0.c
+@@ -161,7 +161,7 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
+     struct SCP_SESSION *session = 0;
+     tui16 sz;
+     tui32 code = 0;
+-    char buf[257];
++    char *buf = 0;
+ 
+     if (!skipVchk)
+     {
+@@ -226,27 +226,31 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
+ 
+         /* reading username */
+         in_uint16_be(c->in_s, sz);
+-        buf[sz] = '\0';
++        buf = g_new0(char, sz);
+         in_uint8a(c->in_s, buf, sz);
+-
++        buf[sz] = '\0';
+         if (0 != scp_session_set_username(session, buf))
+         {
+             scp_session_destroy(session);
+             log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting username", __LINE__);
++            g_free(buf);
+             return SCP_SERVER_STATE_INTERNAL_ERR;
+         }
++        g_free(buf);
+ 
+         /* reading password */
+         in_uint16_be(c->in_s, sz);
+-        buf[sz] = '\0';
++        buf = g_new0(char, sz);
+         in_uint8a(c->in_s, buf, sz);
+-
++        buf[sz] = '\0';
+         if (0 != scp_session_set_password(session, buf))
+         {
+             scp_session_destroy(session);
+             log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting password", __LINE__);
++            g_free(buf);
+             return SCP_SERVER_STATE_INTERNAL_ERR;
+         }
++        g_free(buf);
+ 
+         /* width */
+         in_uint16_be(c->in_s, sz);
+@@ -272,9 +276,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
+ 
+             if (sz > 0)
+             {
++                buf = g_new0(char, sz);
+                 in_uint8a(c->in_s, buf, sz);
+                 buf[sz] = '\0';
+                 scp_session_set_domain(session, buf);
++                g_free(buf);
+             }
+         }
+ 
+@@ -285,9 +291,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
+ 
+             if (sz > 0)
+             {
++                buf = g_new0(char, sz);
+                 in_uint8a(c->in_s, buf, sz);
+                 buf[sz] = '\0';
+                 scp_session_set_program(session, buf);
++                g_free(buf);
+             }
+         }
+ 
+@@ -298,9 +306,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
+ 
+             if (sz > 0)
+             {
++                buf = g_new0(char, sz);
+                 in_uint8a(c->in_s, buf, sz);
+                 buf[sz] = '\0';
+                 scp_session_set_directory(session, buf);
++                g_free(buf);
+             }
+         }
+ 
+@@ -311,9 +321,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
+ 
+             if (sz > 0)
+             {
++                buf = g_new0(char, sz);
+                 in_uint8a(c->in_s, buf, sz);
+                 buf[sz] = '\0';
+                 scp_session_set_client_ip(session, buf);
++                g_free(buf);
+             }
+         }
+     }
+@@ -332,29 +344,35 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
+         scp_session_set_type(session, SCP_GW_AUTHENTICATION);
+         /* reading username */
+         in_uint16_be(c->in_s, sz);
+-        buf[sz] = '\0';
++        buf = g_new0(char, sz);
+         in_uint8a(c->in_s, buf, sz);
++        buf[sz] = '\0';
+ 
+         /* g_writeln("Received user name: %s",buf); */
+         if (0 != scp_session_set_username(session, buf))
+         {
+             scp_session_destroy(session);
+             /* until syslog merge log_message(s_log, LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting        username", __LINE__);*/
++            g_free(buf);
+             return SCP_SERVER_STATE_INTERNAL_ERR;
+         }
++        g_free(buf);
+ 
+         /* reading password */
+         in_uint16_be(c->in_s, sz);
+-        buf[sz] = '\0';
++        buf = g_new0(char, sz);
+         in_uint8a(c->in_s, buf, sz);
++        buf[sz] = '\0';
+ 
+         /* g_writeln("Received password: %s",buf); */
+         if (0 != scp_session_set_password(session, buf))
+         {
+             scp_session_destroy(session);
+             /* until syslog merge log_message(s_log, LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting password", __LINE__); */
++            g_free(buf);
+             return SCP_SERVER_STATE_INTERNAL_ERR;
+         }
++        g_free(buf);
+     }
+     else
+     {
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-sesman.ini-and-xrdp.ini.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-sesman.ini-and-xrdp.ini.patch
new file mode 100644
index 0000000..deaadde
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-sesman.ini-and-xrdp.ini.patch
@@ -0,0 +1,75 @@
+From a9c460f158d68c1b3de6a31ce853de5379977695 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Thu, 30 Nov 2017 11:10:04 +0900
+Subject: [PATCH] Fix sesman.ini and xrdp.ini
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ sesman/sesman.ini | 20 ++++++--------------
+ xrdp/xrdp.ini     | 10 ----------
+ 2 files changed, 6 insertions(+), 24 deletions(-)
+
+diff --git a/sesman/sesman.ini b/sesman/sesman.ini
+index 8225ee4..c09189e 100644
+--- a/sesman/sesman.ini
++++ b/sesman/sesman.ini
+@@ -54,12 +54,14 @@ LogLevel=DEBUG
+ EnableSyslog=1
+ SyslogLevel=DEBUG
+ 
+-[X11rdp]
+-param=X11rdp
+-param=-bs
++[Xorg]
++param=Xorg
++param=-config
++param=xrdp/xorg.conf
++param=-noreset
+ param=-nolisten
+ param=tcp
+-param=-uds
++
+ 
+ [Xvnc]
+ param=Xvnc
+@@ -70,16 +72,6 @@ param=-localhost
+ param=-dpi
+ param=96
+ 
+-[Xorg]
+-param=Xorg
+-param=-config
+-param=xrdp/xorg.conf
+-param=-noreset
+-param=-nolisten
+-param=tcp
+-param=-logfile
+-param=.xorgxrdp.%s.log
+-
+ [Chansrv]
+ ; drive redirection, defaults to xrdp_client if not set
+ FuseMountName=thinclient_drives
+diff --git a/xrdp/xrdp.ini b/xrdp/xrdp.ini
+index cb6d7c3..9f63a69 100644
+--- a/xrdp/xrdp.ini
++++ b/xrdp/xrdp.ini
+@@ -157,16 +157,6 @@ ip=127.0.0.1
+ port=-1
+ code=20
+ 
+-[X11rdp]
+-name=X11rdp
+-lib=libxup.so
+-username=ask
+-password=ask
+-ip=127.0.0.1
+-port=-1
+-xserverbpp=24
+-code=10
+-
+ [Xvnc]
+ name=Xvnc
+ lib=libvnc.so
+-- 
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-the-compile-error.patch b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-the-compile-error.patch
new file mode 100644
index 0000000..82b2790
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/0001-Fix-the-compile-error.patch
@@ -0,0 +1,35 @@
+Subject: [PATCH] Fix the make error
+
+Fix the compile error:
+ *** No rule to make target '../librfxcodec/src/.libs/librfxencode.a', needed by 'xrdp'.  Stop..
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ xrdp/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am
+index a259ef3..d5505b2 100644
+--- a/xrdp/Makefile.am
++++ b/xrdp/Makefile.am
+@@ -23,7 +23,7 @@ endif
+ if XRDP_RFXCODEC
+ AM_CPPFLAGS += -DXRDP_RFXCODEC
+ AM_CPPFLAGS += -I$(top_srcdir)/librfxcodec/include
+-XRDP_EXTRA_LIBS += $(top_builddir)/librfxcodec/src/.libs/librfxencode.a
++XRDP_EXTRA_LIBS += $(top_builddir)/librfxcodec/src/.libs/librfxencode.la
+ endif
+ 
+ if XRDP_PIXMAN
+@@ -35,7 +35,7 @@ endif
+ if XRDP_PAINTER
+ AM_CPPFLAGS += -DXRDP_PAINTER
+ AM_CPPFLAGS += -I$(top_srcdir)/libpainter/include
+-XRDP_EXTRA_LIBS += $(top_builddir)/libpainter/src/.libs/libpainter.a
++XRDP_EXTRA_LIBS += $(top_builddir)/libpainter/src/.libs/libpainter.la
+ endif
+ 
+ sbin_PROGRAMS = \
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/xrdp.sysconfig b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/xrdp.sysconfig
new file mode 100644
index 0000000..39f500a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp/xrdp.sysconfig
@@ -0,0 +1,4 @@
+# put some options here
+
+XRDP_OPTIONS=""
+SESMAN_OPTIONS=""
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.4.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.4.bb
new file mode 100644
index 0000000..3ef7c98
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.4.bb
@@ -0,0 +1,99 @@
+SUMMARY = "An open source remote desktop protocol(rdp) server."
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=72cfbe4e7bd33a0a1de9630c91195c21 \
+"
+
+inherit distro_features_check autotools pkgconfig useradd systemd
+
+DEPENDS = "openssl virtual/libx11 libxfixes libxrandr libpam nasm-native"
+
+REQUIRED_DISTRO_FEATURES = "x11 pam"
+
+SRC_URI = "git://github.com/neutrinolabs/xrdp.git \
+           file://xrdp.sysconfig \
+           file://0001-Fix-sesman.ini-and-xrdp.ini.patch \
+           file://0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch \
+           file://0001-Fix-the-compile-error.patch \
+           file://0001-Fix-of-CVE-2017-16927.patch \
+           "
+
+SRCREV = "c295dd61b882e8b56677cf12791f43634f9190b5"
+
+PV = "0.9.4+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fuse] = " --enable-fuse, --disable-fuse, fuse"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system xrdp"
+USERADD_PARAM_${PN}  = "--system --home /var/run/xrdp -g xrdp \
+                        --no-create-home --shell /bin/false xrdp"
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+                ${datadir}/dbus-1/accessibility-services/*.service "
+
+FILES_${PN}-dev += "${libdir}/xrdp/libcommon.so \
+                    ${libdir}/xrdp/libxrdp.so \
+                    ${libdir}/xrdp/libscp.so \
+                    ${libdir}/xrdp/libxrdpapi.so "
+
+EXTRA_OECONF = "--enable-pam-config=suse"
+
+do_configure_prepend() {
+    cd ${S}
+    ./bootstrap
+    cd -
+}
+
+do_compile_prepend() {
+    sed -i 's/(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am/(MAKE) $(AM_MAKEFLAGS) install-exec-am/g' ${S}/keygen/Makefile.in
+}
+
+
+do_install_append() {
+	install -d ${D}${sysconfdir} 
+	install -d ${D}${sysconfdir}/xrdp
+	install -d ${D}${sysconfdir}/xrdp/pam.d
+	install -d ${D}${sysconfdir}/sysconfig/xrdp
+   
+	# deal with systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${S}/instfiles/xrdp.service.in ${D}${systemd_unitdir}/system/xrdp.service
+	install -m 0644 ${S}/instfiles/xrdp-sesman.service.in ${D}${systemd_unitdir}/system/xrdp-sesman.service 
+	sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
+	sed -i -e 's,@sysconfdir@,${sysconfdir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
+	sed -i -e 's,@sbindir@,${sbindir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
+
+	install -m 0644 ${S}/instfiles/*.ini ${D}${sysconfdir}/xrdp/
+	install -m 0644 ${S}/sesman/sesman.ini ${D}${sysconfdir}/xrdp/
+	install -m 0644 ${S}/sesman/startwm.sh ${D}${sysconfdir}/xrdp/
+	install -m 0644 ${S}/xrdp/xrdp.ini ${D}${sysconfdir}/xrdp/
+	install -m 0644 ${S}/xrdp/xrdp_keyboard.ini ${D}${sysconfdir}/xrdp/
+	install -m 0644 ${S}/instfiles/xrdp.sh ${D}${sysconfdir}/xrdp/
+	install -m 0644 ${S}/keygen/openssl.conf ${D}${sysconfdir}/xrdp/
+	install -m 0644 ${WORKDIR}/xrdp.sysconfig ${D}${sysconfdir}/sysconfig/xrdp/
+	chown xrdp:xrdp ${D}${sysconfdir}/xrdp
+}
+
+SYSTEMD_SERVICE_${PN} = "xrdp.service xrdp-sesman.service"
+
+pkg_postinst_${PN}() {
+	if test -z "$D"
+	then
+		if test -x ${bindir}/xrdp-keygen
+		then
+			${bindir}/xrdp-keygen xrdp ${sysconfdir}/xrdp/rsakeys.ini >/dev/null
+                fi
+		if test ! -s ${sysconfdir}/xrdp/cert.pem
+		then
+			openssl req -x509 -newkey rsa:2048 -sha256 -nodes -days 3652 \
+			-keyout ${sysconfdir}/xrdp/key.pem \
+			-out ${sysconfdir}/xrdp/cert.pem \
+			-config ${sysconfdir}/xrdp/openssl.conf >/dev/null 2>&1
+			chmod 400 ${sysconfdir}/xrdp/key.pem
+		fi			
+        fi
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/zile/zile_2.4.11.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/zile/zile_2.4.11.bb
deleted file mode 100644
index d663f44b..0000000
--- a/import-layers/meta-openembedded/meta-oe/recipes-support/zile/zile_2.4.11.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Zile is lossy Emacs"
-HOMEPAGE = "http://zile.sourceforge.net/"
-DEPENDS = "ncurses bdwgc"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "http://ftp.gnu.org/gnu/zile/${BP}.tar.gz \
-           file://remove-help2man.patch \
-"
-
-SRC_URI[md5sum] = "7a460ccec64e3bec2835697b2eae533c"
-SRC_URI[sha256sum] = "1fd27bbddc61491b1fbb29a345d0d344734aa9e80cfa07b02892eedf831fa9cc"
-
-inherit autotools pkgconfig
-
-do_install_append() {
-    rm -rf ${D}${libdir}/charset.alias
-    rmdir --ignore-fail-on-non-empty ${D}${libdir} || true
-}
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}"
-
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/zile/zile_2.4.14.bb b/import-layers/meta-openembedded/meta-oe/recipes-support/zile/zile_2.4.14.bb
new file mode 100644
index 0000000..515cf41
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-support/zile/zile_2.4.14.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Zile is lossy Emacs"
+HOMEPAGE = "http://zile.sourceforge.net/"
+DEPENDS = "ncurses bdwgc"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
+
+SRC_URI = "http://ftp.gnu.org/gnu/zile/${BP}.tar.gz \
+           file://remove-help2man.patch \
+"
+
+SRC_URI[md5sum] = "c7d7eec93231c6878f255978d9747a73"
+SRC_URI[sha256sum] = "7a78742795ca32480f2bab697fd5e328618d9997d6f417cf1b14e9da9af26b74"
+
+inherit autotools pkgconfig
+
+do_install_append() {
+    rm -rf ${D}${libdir}/charset.alias
+    rmdir --ignore-fail-on-non-empty ${D}${libdir} || true
+}
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}"
+
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cppunit/cppunit_1.13.2.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/cppunit/cppunit_1.13.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/cppunit/cppunit_1.13.2.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-test/cppunit/cppunit_1.13.2.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cppunit/files/0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch b/import-layers/meta-openembedded/meta-oe/recipes-test/cppunit/files/0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/cppunit/files/0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-test/cppunit/files/0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cunit/cunit_2.1-3.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/cunit/cunit_2.1-3.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cunit/files/fixup-install-docdir.patch b/import-layers/meta-openembedded/meta-oe/recipes-test/cunit/files/fixup-install-docdir.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/cunit/files/fixup-install-docdir.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-test/cunit/files/fixup-install-docdir.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/cxxtest/cxxtest_4.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.3.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/cxxtest/cxxtest_4.3.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.3.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/evtest/evtest_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/evtest/evtest_git.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/evtest/evtest_git.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-test/evtest/evtest_git.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-support/fbtest/fb-test_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_git.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-support/fbtest/fb-test_git.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_git.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.8.0.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.8.0.bb
index 483dc1f..48cf4e0 100644
--- a/import-layers/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.8.0.bb
+++ b/import-layers/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.8.0.bb
@@ -7,16 +7,13 @@
 
 PROVIDES += "gmock"
 
+S = "${WORKDIR}/git"
+SRCREV = "ec44c6c1675c25b9827aacd08c02433cccde7780"
 SRC_URI = "\
-    https://github.com/google/googletest/archive/release-${PV}.tar.gz \
+    git://github.com/google/googletest.git;protocol=https; \
     file://Add-pkg-config-support.patch \
 "
 
-SRC_URI[md5sum] = "16877098823401d1bf2ed7891d7dce36"
-SRC_URI[sha256sum] = "58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8"
-
-S = "${WORKDIR}/googletest-release-${PV}"
-
 inherit cmake
 
 ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/pm-qa/pm-qa_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/pm-qa/pm-qa_git.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-devtools/pm-qa/pm-qa_git.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-test/pm-qa/pm-qa_git.bb
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch b/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch
new file mode 100644
index 0000000..d604f86
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch
@@ -0,0 +1,141 @@
+From 784dcd09d3f266e271d007f4fd257e85036872ca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org>
+Date: Tue, 17 Oct 2017 10:13:20 -0500
+Subject: [PATCH] Several changes to fix musl build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+stress-{context, stackmmap}.c: Set tests to non-implemented because uses
+swapcontext, musl provide the definition but not the implementation due
+  to that functions are pre-POSIX and set to be deprecated.
+  stress-{resources, pty}.c: Doesn't include termio.h and remove stress
+  operations that uses struct termio, musl doesn't provide that struct.
+stress-malloc.c: Check for definition of M_MMAP_THRESHOLD musl doesn't
+  ptovide that constant.
+stress-madvise.c: Add static poision_count integer, definition of
+  MADV_SOFT_OFFLINE doesn't grauntee MADV_HWPOISON to be defined.
+cache.c: Define GLOB_ONLYDIR not available on MUSL.
+
+Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+
+Upstream-status: Pending
+
+---
+ cache.c            |  4 ++++
+ stress-madvise.c   |  1 +
+ stress-malloc.c    |  2 +-
+ stress-pty.c       | 18 ------------------
+ stress-resources.c |  1 -
+ stress-stackmmap.c |  2 +-
+ 6 files changed, 7 insertions(+), 21 deletions(-)
+
+diff --git a/cache.c b/cache.c
+index fbf7674..936c1ff 100644
+--- a/cache.c
++++ b/cache.c
+@@ -28,6 +28,10 @@ typedef struct {
+ 
+ #include <glob.h>
+ 
++#ifndef GLOB_ONLYDIR
++#define GLOB_ONLYDIR    0x100
++#endif
++
+ #if defined(__linux__)
+ #define SYS_CPU_PREFIX               "/sys/devices/system/cpu"
+ #define GLOB_PATTERN SYS_CPU_PREFIX  "/cpu[0-9]*"
+diff --git a/stress-madvise.c b/stress-madvise.c
+index 9e71e11..ddf8d2d 100644
+--- a/stress-madvise.c
++++ b/stress-madvise.c
+@@ -147,6 +147,7 @@ static int stress_random_advise(const args_t *args)
+ #if defined(MADV_SOFT_OFFLINE)
+ 	if (advise == MADV_SOFT_OFFLINE) {
+ 		static int soft_offline_count;
++		static int poison_count;
+ 
+ 		/* ..and minimize number of soft offline pages */
+ 		if ((soft_offline_count >= NUM_SOFT_OFFLINE_MAX) ||
+diff --git a/stress-malloc.c b/stress-malloc.c
+index a46b8c6..427827a 100644
+--- a/stress-malloc.c
++++ b/stress-malloc.c
+@@ -99,7 +99,7 @@ int stress_malloc(const args_t *args)
+ 			malloc_max = MIN_MALLOC_MAX;
+ 	}
+ 
+-#if defined(__GNUC__) && defined(__linux__)
++#if defined(__GNUC__) && defined(__linux__) && defined(M_MMAP_THRESHOLD)
+ 	if (get_setting("malloc-threshold", &malloc_threshold))
+ 		(void)mallopt(M_MMAP_THRESHOLD, (int)malloc_threshold);
+ #endif
+diff --git a/stress-pty.c b/stress-pty.c
+index 1bd1fbd..b1fe573 100644
+--- a/stress-pty.c
++++ b/stress-pty.c
+@@ -26,7 +26,6 @@
+ 
+ #if defined(__linux__)
+ 
+-#include <termio.h>
+ #include <termios.h>
+ 
+ typedef struct {
+@@ -108,7 +107,6 @@ int stress_pty(const args_t *args)
+ 		 */
+ 		for (i = 0; i < n; i++) {
+ 			struct termios ios;
+-			struct termio io;
+ 			struct winsize ws;
+ 			int arg;
+ 
+@@ -130,22 +128,6 @@ int stress_pty(const args_t *args)
+ 			if (ioctl(ptys[i].slave, TCSETSF, &ios) < 0)
+ 				pr_fail_err("ioctl TCSETSF on slave pty");
+ #endif
+-#if defined(TCGETA)
+-			if (ioctl(ptys[i].slave, TCGETA, &io) < 0)
+-				pr_fail_err("ioctl TCGETA on slave pty");
+-#endif
+-#if defined(TCSETA)
+-			if (ioctl(ptys[i].slave, TCSETA, &io) < 0)
+-				pr_fail_err("ioctl TCSETA on slave pty");
+-#endif
+-#if defined(TCSETAW)
+-			if (ioctl(ptys[i].slave, TCSETAW, &io) < 0)
+-				pr_fail_err("ioctl TCSETAW on slave pty");
+-#endif
+-#if defined(TCSETAF)
+-			if (ioctl(ptys[i].slave, TCSETAF, &io) < 0)
+-				pr_fail_err("ioctl TCSETAF on slave pty");
+-#endif
+ #if defined(TIOCGLCKTRMIOS)
+ 			if (ioctl(ptys[i].slave, TIOCGLCKTRMIOS, &ios) < 0)
+ 				pr_fail_err("ioctl TIOCGLCKTRMIOS on slave pty");
+diff --git a/stress-resources.c b/stress-resources.c
+index 958c99a..af79abd 100644
+--- a/stress-resources.c
++++ b/stress-resources.c
+@@ -31,7 +31,6 @@
+ #include <sys/inotify.h>
+ #endif
+ #if defined(__linux__)
+-#include <termio.h>
+ #include <termios.h>
+ #endif
+ #if defined(HAVE_LIB_PTHREAD) && defined(__linux__)
+diff --git a/stress-stackmmap.c b/stress-stackmmap.c
+index 9c83a69..2984f09 100644
+--- a/stress-stackmmap.c
++++ b/stress-stackmmap.c
+@@ -24,7 +24,7 @@
+  */
+ #include "stress-ng.h"
+ 
+-#if defined(__linux__)
++#if defined(__linux__) && False
+ 
+ #include <ucontext.h>
+ 
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch b/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch
new file mode 100644
index 0000000..ed3287e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch
@@ -0,0 +1,25 @@
+From faadbc147394cea9278bc2494f33e3521d88e742 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Tue, 9 Jan 2018 18:38:45 -0800
+Subject: [PATCH] stress-fcntl: fix build for musl
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+
+Upstream-status: Pending
+
+---
+ stress-fcntl.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/stress-fcntl.c b/stress-fcntl.c
+index 2ea867b..e91b345 100644
+--- a/stress-fcntl.c
++++ b/stress-fcntl.c
+@@ -415,6 +415,7 @@ ofd_lock_abort:	{ /* Nowt */ }
+ #if (defined(F_GET_FILE_RW_HINT) && defined(F_SET_FILE_RW_HINT)) | \
+     (defined(F_GET_RW_HINT) && defined(F_SET_RW_HINT))
+ 	{
++		int ret;
+ 		size_t i;
+ 		unsigned long hint;
+ 		static const unsigned long hints[] = {
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng_0.09.14.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng_0.09.14.bb
new file mode 100644
index 0000000..7fab430
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng_0.09.14.bb
@@ -0,0 +1,25 @@
+SUMMARY = "A tool to load and stress a computer system"
+HOMEPAGE = "http://kernel.ubuntu.com/~cking/stress-ng/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "zlib libaio"
+
+SRC_URI = "http://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \
+           file://0002-stress-fcntl-fix-build-for-musl.patch \
+          "
+SRC_URI_append_libc-musl = " \
+    file://0001-Several-changes-to-fix-musl-build.patch \
+    "
+SRC_URI[md5sum] = "1f8b6c2c2830704d2a2814c16082d48e"
+SRC_URI[sha256sum] = "02cac34a5cb041197af60c1867844c6cbb089a6d10a38cdcf7b8f27bfaa6ef8f"
+
+UPSTREAM_CHECK_URI ?= "http://kernel.ubuntu.com/~cking/tarballs/${BPN}/"
+UPSTREAM_CHECK_REGEX ?= "(?P<pver>\d+(\.\d+)+)\.tar"
+
+CFLAGS += "-Wall -Wextra -DVERSION='"$(VERSION)"'"
+
+do_install_append() {
+    install -d ${D}${bindir}
+    install -m 755 ${S}/stress-ng ${D}${bindir}/stress-ng
+}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch b/import-layers/meta-openembedded/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch b/import-layers/meta-openembedded/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch
rename to import-layers/meta-openembedded/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-extended/testfloat/testfloat_3a.bb b/import-layers/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3a.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-extended/testfloat/testfloat_3a.bb
rename to import-layers/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3a.bb
diff --git a/import-layers/meta-openembedded/meta-perl/README b/import-layers/meta-openembedded/meta-perl/README
index cc965af..67f2910 100644
--- a/import-layers/meta-openembedded/meta-perl/README
+++ b/import-layers/meta-openembedded/meta-perl/README
@@ -52,7 +52,7 @@
 This layer depends on:
 
   URI: git://git.openembedded.org/openembedded-core
-  branch: rocko 
+  branch: master
   revision: HEAD
   prio: default
 
@@ -75,13 +75,14 @@
 -----------
 
 Send patches / pull requests to openembedded-devel@lists.openembedded.org with
-'[meta-perl][rocko]' in the subject.
+'[meta-perl]' in the subject.
 
 When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-perl][rocko][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-perl][PATCH'
 
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
+Layer maintainers:
+    Hongxu Jia <hongxu.jia@windriver.com>
+    Tim "moto-timo" Orling <ticotimo@gmail.com>
 
 License
 -------
diff --git a/import-layers/meta-openembedded/meta-perl/conf/layer.conf b/import-layers/meta-openembedded/meta-perl/conf/layer.conf
index a861c3e..ece6dd0 100644
--- a/import-layers/meta-openembedded/meta-perl/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-perl/conf/layer.conf
@@ -14,3 +14,5 @@
 LAYERVERSION_perl-layer = "1"
 
 LAYERDEPENDS_perl-layer = "core openembedded-layer"
+
+LAYERSERIES_COMPAT_perl-layer = "sumo"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.36.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.36.bb
deleted file mode 100644
index 8f26ab0..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.36.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-DESCRIPTION = "CGI.pm is a stable, complete and mature solution for processing and preparing \
-HTTP requests and responses. Major features including processing form \
-submissions, file uploads, reading and writing cookies, query string generation \
-and manipulation, and processing and preparing HTTP headers."
-HOMEPAGE = "http://search.cpan.org/~leejo/CGI-4.28/lib/CGI.pod"
-SECTION = "libs"
-LICENSE = "Artistic-2.0 | GPL-2.0"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2e9769f0a2613a98bc7fce15dee0c533"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/L/LE/LEEJO/CGI-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "48566d81f430a7f755bb4d8f426ce35d"
-SRC_URI[sha256sum] = "fefe84d4f2461e867f9be80f3f988e17bcbbcb4e306952cf2fd1dea7e4515490"
-
-S = "${WORKDIR}/CGI-${PV}"
-
-inherit cpan
-
-RPROVIDES_${PN} += "perl-module-cgi"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.38.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.38.bb
new file mode 100644
index 0000000..db16d83
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libcgi/libcgi-perl_4.38.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "CGI.pm is a stable, complete and mature solution for processing and preparing \
+HTTP requests and responses. Major features including processing form \
+submissions, file uploads, reading and writing cookies, query string generation \
+and manipulation, and processing and preparing HTTP headers."
+HOMEPAGE = "http://search.cpan.org/~leejo/CGI-4.28/lib/CGI.pod"
+SECTION = "libs"
+LICENSE = "Artistic-2.0 | GPL-2.0"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2e9769f0a2613a98bc7fce15dee0c533"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/L/LE/LEEJO/CGI-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "0aeb8563d533e7f83724ed068b5bfc37"
+SRC_URI[sha256sum] = "8c58f4a529bb92a914b22b7e64c5e31185c9854a4070a6dfad44fe5cc248e7d4"
+
+S = "${WORKDIR}/CGI-${PV}"
+
+inherit cpan
+
+RDEPENDS_${PN} += "\
+    perl-module-deprecate \
+    perl-module-if \
+"
+
+RPROVIDES_${PN} += "perl-module-cgi"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.54.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.54.bb
index 0b27b5c..c72e536 100644
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.54.bb
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libdb/libdbd-sqlite-perl_1.54.bb
@@ -25,6 +25,8 @@
 SRC_URI[md5sum] = "8f835ddacb9a4a92a52bbe2d24d18a8e"
 SRC_URI[sha256sum] = "3929a6dbd8d71630f0cb57f85dcef9588cd7ac4c9fa12db79df77b9d3a4d7269"
 
+UPSTREAM_CHECK_REGEX = "DBD\-SQLite\-(?P<pver>(\d+\.\d+))(?!_\d+).tar"
+
 S = "${WORKDIR}/DBD-SQLite-${PV}"
 
 inherit cpan
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_2.83.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_2.83.bb
deleted file mode 100644
index ee8c67d..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_2.83.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Encode - character encodings"
-DESCRIPTION = "The \"Encode\" module provides the interfaces between \
-Perl's strings and the rest of the system.  Perl strings are sequences \
-of characters."
-
-AUTHOR = "Dan Kogai <dankogai+cpan@gmail.com>"
-HOMEPAGE = "https://metacpan.org/release/Encode"
-SECTION = "lib"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://META.json;md5=fdbebc82e925d8acbce42cfad131c4d1"
-
-SRC_URI = "${CPAN_MIRROR}/authors/id/D/DA/DANKOGAI/Encode-${PV}.tar.gz"
-SRC_URI[md5sum] = "0d3f59e8ea704497647eded665919053"
-SRC_URI[sha256sum] = "5d3a90e30aabe78dfcf5e816ffb1da1e33475892dbd0075320315cdce5682988"
-
-S = "${WORKDIR}/Encode-${PV}"
-
-inherit cpan
-
-RDEPENDS_${PN} += " perl-module-bytes \
-                    perl-module-constant \
-                    perl-module-xsloader \
-"
-
-RPROVIDES_${PN} += "libencode-alias-perl \
-                    libencode-byte-perl \
-                    libencode-cjkconstants-perl \
-                    libencode-cn-perl \
-                    libencode-cn-hz-perl \
-                    libencode-config-perl \
-                    libencode-ebcdic-perl \
-                    libencode-encoder-perl \
-                    libencode-encoding-perl \
-                    libencode-gsm0338-perl \
-                    libencode-guess-perl \
-                    libencode-jp-perl \
-                    libencode-jp-h2z-perl \
-                    libencode-jp-jis7-perl \
-                    libencode-kr-perl \
-                    libencode-kr-2022_kr-perl \
-                    libencode-mime-header-perl \
-                    libencode-mime-name-perl \
-                    libencode-symbol-perl \
-                    libencode-tw-perl \
-                    libencode-unicode--perl \
-                    libencode-unicode-utf7-perl \
-                    libencoding-perl \
-                    libencode-internal-perl \
-                    libencode-mime-header-iso_2022_jp-perl \
-                    libencode-utf8-perl \
-                    libencode-utf_ebcdic-perl \
-                    "
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_2.94.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_2.94.bb
new file mode 100644
index 0000000..9861c56
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_2.94.bb
@@ -0,0 +1,68 @@
+# NOTE:
+#    You should use perl-module-encode rather than this package
+#    unless you specifically need a version newer than what is
+#    provided by perl.
+
+SUMMARY = "Encode - character encodings"
+DESCRIPTION = "The \"Encode\" module provides the interfaces between \
+Perl's strings and the rest of the system.  Perl strings are sequences \
+of characters."
+
+AUTHOR = "Dan Kogai <dankogai+cpan@gmail.com>"
+HOMEPAGE = "https://metacpan.org/release/Encode"
+SECTION = "lib"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://META.json;md5=d8e909447b983532b2b460c830e7a7e4"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/D/DA/DANKOGAI/Encode-${PV}.tar.gz"
+SRC_URI[md5sum] = "f995e0eb9e52d01ed57abe835bf3ccb6"
+SRC_URI[sha256sum] = "acb3a4af5e3ee38f94de8baa7454e0b836a0649e7ac4180f28dfca439ad60cff"
+
+UPSTREAM_CHECK_REGEX = "Encode\-(?P<pver>(\d+\.\d+))(?!_\d+).tar"
+
+S = "${WORKDIR}/Encode-${PV}"
+
+inherit cpan
+
+#  file /usr/bin/enc2xs from install of perl-misc-5.24.1-r0.i586 conflicts with file from package libencode-perl-2.94-r0.i586
+#  file /usr/bin/encguess from install of perl-misc-5.24.1-r0.i586 conflicts with file from package libencode-perl-2.94-r0.i586
+#  file /usr/bin/piconv from install of perl-misc-5.24.1-r0.i586 conflicts with file from package libencode-perl-2.94-r0.i586
+RCONFLICTS_${PN} = "perl-misc"
+
+RDEPENDS_${PN} += " perl-module-bytes \
+                    perl-module-constant \
+                    perl-module-parent \
+                    perl-module-storable \
+                    perl-module-xsloader \
+"
+
+RPROVIDES_${PN} += "libencode-alias-perl \
+                    libencode-byte-perl \
+                    libencode-cjkconstants-perl \
+                    libencode-cn-perl \
+                    libencode-cn-hz-perl \
+                    libencode-config-perl \
+                    libencode-ebcdic-perl \
+                    libencode-encoder-perl \
+                    libencode-encoding-perl \
+                    libencode-gsm0338-perl \
+                    libencode-guess-perl \
+                    libencode-jp-perl \
+                    libencode-jp-h2z-perl \
+                    libencode-jp-jis7-perl \
+                    libencode-kr-perl \
+                    libencode-kr-2022_kr-perl \
+                    libencode-mime-header-perl \
+                    libencode-mime-name-perl \
+                    libencode-symbol-perl \
+                    libencode-tw-perl \
+                    libencode-unicode-perl \
+                    libencode-unicode-utf7-perl \
+                    libencoding-perl \
+                    libencode-internal-perl \
+                    libencode-mime-header-iso_2022_jp-perl \
+                    libencode-utf8-perl \
+                    libencode-utf_ebcdic-perl \
+                    "
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-cppguess-perl_0.09.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-cppguess-perl_0.09.bb
deleted file mode 100644
index d13cb03..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-cppguess-perl_0.09.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "ExtUtils::CppGuess - guess C++ compiler and flags"
-DESCRIPTION = "ExtUtils::CppGuess attempts to guess the system's C++ \
-compiler that is compatible with the C compiler that your perl was built \
-with. \
-It can generate the necessary options to the Module::Build constructor or \
-to ExtUtils::MakeMaker's WriteMakefile function."
-SECTION = "libs"
-
-HOMEPAGE = "http://search.cpan.org/~smueller/ExtUtils-CppGuess/"
-
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://README;beginline=81;endline=84;md5=84c0390b90ea8c6702ce659b67bed699"
-
-SRC_URI = "${CPAN_MIRROR}/authors/id/E/ET/ETJ/ExtUtils-CppGuess-${PV}.tar.gz"
-SRC_URI[md5sum] = "f8ada38ee4ad86a4f1e20d8525ce0c99"
-SRC_URI[sha256sum] = "48625195a88c0f2ddc37bbd7a06346aa68ffb6948ba78da3aea47c0db2540f65"
-
-S = "${WORKDIR}/ExtUtils-CppGuess-${PV}"
-
-inherit cpan
-
-do_install () {
-        cpan_do_install
-}
-
-RDEPENDS_${PN} = " libcapture-tiny-perl \
-                   perl-module-scalar-util \
-                   perl-module-io-file \
-                   perl-module-extutils-makemaker \
-                   perl-module-file-spec \
-                   perl-module-exporter \
-                   perl-module-carp \
-                   perl-module-file-temp \
-                   perl-module-lib \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-cppguess-perl_0.12.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-cppguess-perl_0.12.bb
new file mode 100644
index 0000000..99df6f3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libextutils/libextutils-cppguess-perl_0.12.bb
@@ -0,0 +1,37 @@
+SUMMARY = "ExtUtils::CppGuess - guess C++ compiler and flags"
+DESCRIPTION = "ExtUtils::CppGuess attempts to guess the system's C++ \
+compiler that is compatible with the C compiler that your perl was built \
+with. \
+It can generate the necessary options to the Module::Build constructor or \
+to ExtUtils::MakeMaker's WriteMakefile function."
+SECTION = "libs"
+
+HOMEPAGE = "http://search.cpan.org/~smueller/ExtUtils-CppGuess/"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=81;endline=84;md5=84c0390b90ea8c6702ce659b67bed699"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/E/ET/ETJ/ExtUtils-CppGuess-${PV}.tar.gz"
+SRC_URI[md5sum] = "28be49072585b25df87e54180f741a4d"
+SRC_URI[sha256sum] = "31c47b5b15e3e9fd5ae7b35881a0fffd26a2983b241e7e3a1bc340d6d446186b"
+
+S = "${WORKDIR}/ExtUtils-CppGuess-${PV}"
+
+inherit cpan
+
+do_install () {
+        cpan_do_install
+}
+
+RDEPENDS_${PN} = " libcapture-tiny-perl \
+                   perl-module-scalar-util \
+                   perl-module-io-file \
+                   perl-module-extutils-makemaker \
+                   perl-module-file-spec \
+                   perl-module-exporter \
+                   perl-module-carp \
+                   perl-module-file-temp \
+                   perl-module-lib \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_1.997.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_1.997.bb
deleted file mode 100644
index ba5788a..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_1.997.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Perl library for transparent SSL"
-DESCRIPTION = "This module is a true drop-in replacement for IO::Socket::INET that \
-uses SSL to encrypt data before it is transferred to a remote server \
-or client. IO::Socket::SSL supports all the extra features that one \
-needs to write a full-featured SSL client or server application: \
-multiple SSL contexts, cipher selection, certificate verification, and \
-SSL version selection. As an extra bonus, it works perfectly with \
-mod_perl."
-HOMEPAGE = "http://search.cpan.org/dist/IO-Socket-SSL/"
-SECTION = "libs"
-
-LICENSE = "Artistic-1.0|GPLv1+"
-LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=11;md5=963ce28228347875ace682de56eef8e8"
-
-RDEPENDS_${PN} += "perl-module-scalar-util libnet-ssleay-perl"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/S/SU/SULLR/IO-Socket-SSL-${PV}.tar.gz \
-           file://run-ptest \
-          "
-SRC_URI[md5sum] = "2a6268bb42da81e69d1c1feb2fcb0eea"
-SRC_URI[sha256sum] = "acdb67b5b63aea5b7e70c3e4c70a16128810329592b63753a38c794aff76a1dd"
-
-S = "${WORKDIR}/IO-Socket-SSL-${PV}"
-
-inherit cpan ptest
-
-do_install_append () {
-    mkdir -p ${D}${docdir}/${PN}/
-    cp ${S}/BUGS ${D}${docdir}/${PN}/
-    cp ${S}/Changes ${D}${docdir}/${PN}/
-    cp ${S}/README ${D}${docdir}/${PN}/
-    cp -pRP ${S}/docs ${D}${docdir}/${PN}/
-    cp -pRP ${S}/certs ${D}${docdir}/${PN}/
-    cp -pRP ${S}/example ${D}${docdir}/${PN}/
-    cp -pRP ${S}/util ${D}${docdir}/${PN}/
-}
-
-do_install_ptest () {
-    cp -r ${B}/t ${D}${PTEST_PATH}
-    cp -r ${B}/certs ${D}${PTEST_PATH}
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.054.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.054.bb
new file mode 100644
index 0000000..ea78bc4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.054.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Perl library for transparent SSL"
+DESCRIPTION = "This module is a true drop-in replacement for IO::Socket::INET that \
+uses SSL to encrypt data before it is transferred to a remote server \
+or client. IO::Socket::SSL supports all the extra features that one \
+needs to write a full-featured SSL client or server application: \
+multiple SSL contexts, cipher selection, certificate verification, and \
+SSL version selection. As an extra bonus, it works perfectly with \
+mod_perl."
+HOMEPAGE = "http://search.cpan.org/dist/IO-Socket-SSL/"
+SECTION = "libs"
+
+LICENSE = "Artistic-1.0|GPLv1+"
+LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=11;md5=963ce28228347875ace682de56eef8e8"
+
+RDEPENDS_${PN} += "\
+    libnet-ssleay-perl \
+    perl-module-autoloader \
+    perl-module-scalar-util \
+    perl-module-io-socket \
+"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/S/SU/SULLR/IO-Socket-SSL-${PV}.tar.gz \
+           file://run-ptest \
+          "
+SRC_URI[md5sum] = "e1b412e28d107c716e7ca637e2b7f8bd"
+SRC_URI[sha256sum] = "02ea04e9a336a7d3ca9aa604c0c5b5aaf3efa513cefecfc73cc79ceeb5131e4b"
+
+S = "${WORKDIR}/IO-Socket-SSL-${PV}"
+
+inherit cpan ptest
+
+do_install_append () {
+    mkdir -p ${D}${docdir}/${PN}/
+    cp ${S}/BUGS ${D}${docdir}/${PN}/
+    cp ${S}/Changes ${D}${docdir}/${PN}/
+    cp ${S}/README ${D}${docdir}/${PN}/
+    cp -pRP ${S}/docs ${D}${docdir}/${PN}/
+    cp -pRP ${S}/certs ${D}${docdir}/${PN}/
+    cp -pRP ${S}/example ${D}${docdir}/${PN}/
+}
+
+do_install_ptest () {
+    cp -r ${B}/t ${D}${PTEST_PATH}
+    cp -r ${B}/certs ${D}${PTEST_PATH}
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmime/libmime-types-perl_2.13.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmime/libmime-types-perl_2.13.bb
deleted file mode 100644
index fd51c16..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmime/libmime-types-perl_2.13.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "MIME::Types - Definition of MIME types"
-DESCRIPTION = "MIME types are used in MIME compliant lines, for instance \
-as part of e-mail and HTTP traffic, to indicate the type of content which \
-is transmitted. Sometimes real knowledge about a mime-type is need.\
-\n\
-This module maintains a set of MIME::Type objects, which each describe \
-one known mime type."
-HOMEPAGE = "http://search.cpan.org/~markov/MIME-Types-${PV}"
-SECTION = "libraries"
-
-LICENSE = "Artistic-1.0|GPLv1+"
-LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=11;md5=963ce28228347875ace682de56eef8e8"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MIME-Types-${PV}.tar.gz \
-           file://run-ptest \
-          "
-SRC_URI[md5sum] = "f2892ae9e6ea660a58746699c3924817"
-SRC_URI[sha256sum] = "99c3376357bbe22cc8b6c78f560aa18d81621287695cd629008a6c4e66b77bf8"
-
-S = "${WORKDIR}/MIME-Types-${PV}"
-
-inherit cpan ptest
-
-do_install_ptest () {
-    cp -r ${B}/t ${D}${PTEST_PATH}
-}
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmime/libmime-types-perl_2.17.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmime/libmime-types-perl_2.17.bb
new file mode 100644
index 0000000..4147530
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmime/libmime-types-perl_2.17.bb
@@ -0,0 +1,42 @@
+SUMMARY = "MIME::Types - Definition of MIME types"
+DESCRIPTION = "MIME types are used in MIME compliant lines, for instance \
+as part of e-mail and HTTP traffic, to indicate the type of content which \
+is transmitted. Sometimes real knowledge about a mime-type is need.\
+\n\
+This module maintains a set of MIME::Type objects, which each describe \
+one known mime type."
+HOMEPAGE = "http://search.cpan.org/~markov/MIME-Types-${PV}"
+SECTION = "libraries"
+
+LICENSE = "Artistic-1.0|GPLv1+"
+LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=11;md5=963ce28228347875ace682de56eef8e8"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MIME-Types-${PV}.tar.gz \
+           file://run-ptest \
+          "
+SRC_URI[md5sum] = "6f1441addab947137bac92c379a47ba3"
+SRC_URI[sha256sum] = "e04ed7d42f1ff3150a303805f2689c28f80b92c511784d4641cb7f040d3e8ff6"
+
+S = "${WORKDIR}/MIME-Types-${PV}"
+
+inherit cpan ptest
+
+RDEPENDS_${PN} = "\
+    perl-module-base \
+    perl-module-file-basename \
+    perl-module-file-spec \
+    perl-module-overload \
+"
+
+RDEPENDS_${PN}-ptest = "perl-module-lib perl-module-test-more"
+#RSUGGESTS_${PN}-ptest = "libmojo-base-perl"
+
+do_install () {
+    cpan_do_install
+    install -d ${D}${bindir}
+    install -m 755 ${S}/bin/collect-types ${D}${bindir}/collect-types
+}
+
+do_install_ptest () {
+    cp -r ${B}/t ${D}${PTEST_PATH}
+}
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-pluggable-perl_5.2.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-pluggable-perl_5.2.bb
index c73a15a..aed65d3 100644
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-pluggable-perl_5.2.bb
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-pluggable-perl_5.2.bb
@@ -17,9 +17,14 @@
 LIC_FILES_CHKSUM = "file://README;beginline=322;endline=325;md5=086450ce010f6fda25db0b38fcc41086"
 
 SRCNAME = "Module-Pluggable"
-SRC_URI = "https://github.com/moto-timo/${SRCNAME}/archive/${PV}.tar.gz"
-SRC_URI[md5sum] = "e32475d6ff5843f738cedacd3b7a2cdb"
-SRC_URI[sha256sum] = "58c62292eea6d06959eba1b97598650813211265403242d57efb2f605c96059f"
+SRC_URI = "${CPAN_MIRROR}/authors/id/S/SI/SIMONW/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "87ce2971662efd0b69a81bb4dc9ea76c"
+SRC_URI[sha256sum] = "b3f2ad45e4fd10b3fb90d912d78d8b795ab295480db56dc64e86b9fa75c5a6df"
+
+PR = "r1"
+
+UPSTREAM_CHECK_REGEX = "Module\-Pluggable\-(?P<pver>(\d+\.\d+))"
+UPSTREAM_CHECK_URI = "https://metacpan.org/release/${SRCNAME}"
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-runtime-perl_0.015.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-runtime-perl_0.015.bb
deleted file mode 100644
index b92842c..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-runtime-perl_0.015.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Module::Runtime - runtime module handling"
-DESCRIPTION = "The functions exported by this module deal with runtime \
-handling of Perl modules, which are normally handled at compile time. This \
-module avoids using any other modules, so that it can be used in low-level \
-infrastructure. \
-The parts of this module that work with module names apply the same syntax \
-that is used for barewords in Perl source. In principle this syntax can vary \
-between versions of Perl, and this module applies the syntax of the Perl on \
-which it is running. In practice the usable syntax hasn't changed yet, but \
-there's a good chance of it changing in Perl 5.18. \
-The functions of this module whose purpose is to load modules include \
-workarounds for three old Perl core bugs regarding require. These workarounds \
-are applied on any Perl version where the bugs exist, except for a case where \
-one of the bugs cannot be adequately worked around in pure Perl."
-SECTION = "libs"
-
-HOMEPAGE = "http://search.cpan.org/~zefram/Module-Runtime/"
-
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://README;beginline=45;endline=46;md5=62e24a93342fede7221d66335c716f34"
-
-SRCNAME = "module-runtime"
-SRC_URI = "https://github.com/moto-timo/${SRCNAME}/archive/${PV}.tar.gz"
-SRC_URI[md5sum] = "ad6ca179c978aa02ac8aa29244ef9beb"
-SRC_URI[sha256sum] = "59effa82b3f6986d28de6154a8f2428157691004d951f936a81e851f4dbcb045"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit cpan
-
-RDEPENDS_${PN} = " perl-module-test-more \
-                   perl-module-strict \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-runtime-perl_0.016.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-runtime-perl_0.016.bb
new file mode 100644
index 0000000..89f0f70
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmodule/libmodule-runtime-perl_0.016.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Module::Runtime - runtime module handling"
+DESCRIPTION = "The functions exported by this module deal with runtime \
+handling of Perl modules, which are normally handled at compile time. This \
+module avoids using any other modules, so that it can be used in low-level \
+infrastructure. \
+The parts of this module that work with module names apply the same syntax \
+that is used for barewords in Perl source. In principle this syntax can vary \
+between versions of Perl, and this module applies the syntax of the Perl on \
+which it is running. In practice the usable syntax hasn't changed yet, but \
+there's a good chance of it changing in Perl 5.18. \
+The functions of this module whose purpose is to load modules include \
+workarounds for three old Perl core bugs regarding require. These workarounds \
+are applied on any Perl version where the bugs exist, except for a case where \
+one of the bugs cannot be adequately worked around in pure Perl."
+SECTION = "libs"
+
+HOMEPAGE = "http://search.cpan.org/~zefram/Module-Runtime/"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=36;endline=44;md5=9416434672a57853d6181f3da9094963"
+
+SRCNAME = "Module-Runtime"
+SRC_URI = "${CPAN_MIRROR}/authors/id/Z/ZE/ZEFRAM/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "d3d47222fa2e3dfcb4526f6cc8437b20"
+SRC_URI[sha256sum] = "68302ec646833547d410be28e09676db75006f4aa58a11f3bdb44ffe99f0f024"
+
+UPSTREAM_CHECK_REGEX = "Module\-Runtime\-(?P<pver>(\d+\.\d+)).tar"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit cpan
+
+RDEPENDS_${PN} = " perl-module-test-more \
+                   perl-module-strict \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmoo/libmoo-perl_2.003002.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmoo/libmoo-perl_2.003002.bb
deleted file mode 100644
index a0fe492..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmoo/libmoo-perl_2.003002.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Moo - Minimalist Object Orientation (with Moose compatibility)"
-DESCRIPTION = "This module us an extremely light-weight subset of \"Moose\" \
-optimised for rapid startup and \"pay only for what you use\"."
-
-SECTION = "libs"
-
-HOMEPAGE = "http://metapan.org/release/Moo/"
-
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://README;beginline=731;endline=776;md5=27efedd175eeaddbd18f4e3572bd72a8"
-
-SRC_URI = "${CPAN_MIRROR}/authors/id/H/HA/HAARG/Moo-${PV}.tar.gz"
-SRC_URI[md5sum] = "e9f1f3159555ecebcd062e998f297a94"
-SRC_URI[sha256sum] = "f3e9741e79baa63e89f5a08706cd80d18c0a5a37e3d898847e002310e06582f1"
-
-S = "${WORKDIR}/Moo-${PV}"
-
-inherit cpan
-
-RDEPENDS_${PN} = " libclass-method-modifiers-perl \
-                   libdevel-globaldestruction-perl \
-                   libmodule-runtime-perl \
-                   librole-tiny-perl \
-                   perl-module-constant \
-                   perl-module-exporter \
-                   perl-module-mro \
-                   perl-module-scalar-util \
-"
-
-RPROVIDES_${PN} = " libmethod-inliner-perl \
-                    libmethod-generate-accessor-perl \
-                    libmethod-generate-buildall-perl \
-                    libmethod-generate-constructor-perl \
-                    libmethod-generate-demolishall-perl \
-                    libmoo-perl \
-                    libmoo-handlemoose-perl \
-                    libmoo-handlemoose-fakemetaclass-perl \
-                    libmoo-object-perl \
-                    libmoo-role-perl \
-                    libsub-defer-perl \
-                    libsub-quote-perl \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libmoo/libmoo-perl_2.003004.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmoo/libmoo-perl_2.003004.bb
new file mode 100644
index 0000000..a260ab8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libmoo/libmoo-perl_2.003004.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Moo - Minimalist Object Orientation (with Moose compatibility)"
+DESCRIPTION = "This module us an extremely light-weight subset of \"Moose\" \
+optimised for rapid startup and \"pay only for what you use\"."
+
+SECTION = "libs"
+
+HOMEPAGE = "http://metapan.org/release/Moo/"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=731;endline=776;md5=27efedd175eeaddbd18f4e3572bd72a8"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/H/HA/HAARG/Moo-${PV}.tar.gz"
+SRC_URI[md5sum] = "d4fcd0f240033198571fcc81ce7c5f15"
+SRC_URI[sha256sum] = "f8bbb625f8e963eabe05cff9048fdd72bdd26777404ff2c40bc690f558be91e1"
+
+S = "${WORKDIR}/Moo-${PV}"
+
+inherit cpan
+
+RDEPENDS_${PN} = " libclass-method-modifiers-perl \
+                   libdevel-globaldestruction-perl \
+                   libmodule-runtime-perl \
+                   librole-tiny-perl \
+                   perl-module-constant \
+                   perl-module-exporter \
+                   perl-module-mro \
+                   perl-module-scalar-util \
+"
+
+RPROVIDES_${PN} = " libmethod-inliner-perl \
+                    libmethod-generate-accessor-perl \
+                    libmethod-generate-buildall-perl \
+                    libmethod-generate-constructor-perl \
+                    libmethod-generate-demolishall-perl \
+                    libmoo-perl \
+                    libmoo-handlemoose-perl \
+                    libmoo-handlemoose-fakemetaclass-perl \
+                    libmoo-object-perl \
+                    libmoo-role-perl \
+                    libsub-defer-perl \
+                    libsub-quote-perl \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.10.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.10.bb
deleted file mode 100644
index 0d89844..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.10.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION = "This package contains the DNS.pm module with friends."
-HOMEPAGE = "http://www.net-dns.org/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://README;md5=92d93d8c5bf22de77578531e283dd219"
-
-DEPENDS += "perl"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/N/NL/NLNETLABS/Net-DNS-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4fa45b0dfe79667453c1553e16e52c2a"
-SRC_URI[sha256sum] = "ebe53e7f433138fb9a7845b4edae6b8f4dc227da97eaf6b347584816ec63a525"
-
-S = "${WORKDIR}/Net-DNS-${PV}"
-
-EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-
-inherit cpan
-
-do_compile() {
-    export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
-    cpan_do_compile
-}
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.14.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.14.bb
new file mode 100644
index 0000000..efaa7f7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.14.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "This package contains the DNS.pm module with friends."
+HOMEPAGE = "http://www.net-dns.org/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://README;md5=92d93d8c5bf22de77578531e283dd219"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/N/NL/NLNETLABS/Net-DNS-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "0da1099c0a3548d36ea9e31d5bb9e122"
+SRC_URI[sha256sum] = "83c38a594eeb2c85d66e60047a0f5b403f34bd92a5d13606f02e828d450299fc"
+
+S = "${WORKDIR}/Net-DNS-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan
+
+RDEPENDS_${PN} = "perl-module-integer"
+
+do_compile() {
+    export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+    cpan_do_compile
+}
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.81.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.81.bb
deleted file mode 100644
index a861b69..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.81.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Net::SSLeay - Perl extension for using OpenSSL"
-DESCRIPTION = "This module offers some high level convenience functions for accessing \
-web pages on SSL servers (for symmetry, same API is offered for \
-accessing http servers, too), a sslcat() function for writing your own \
-clients, and finally access to the SSL api of SSLeay/OpenSSL package \
-so you can write servers or clients for more complicated applications."
-HOMEPAGE = "http://search.cpan.org/dist/Net-SSLeay/"
-SECTION = "libs"
-
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://README;beginline=274;endline=294;md5=67d67095d83e339da538a082fad5f38e"
-
-DEPENDS = "openssl zlib openssl-native"
-RDEPENDS_${PN} += "perl-module-carp \
-                   perl-module-errno \
-                   perl-module-extutils-makemaker \
-                   perl-module-mime-base64 \
-                   perl-module-socket \
-                  "
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MI/MIKEM/Net-SSLeay-${PV}.tar.gz \
-           file://run-ptest \
-          "
-SRC_URI[md5sum] = "71932ce34d4db44de8d00399c3405792"
-SRC_URI[sha256sum] = "00cbb6174e628b42178e1445c9fd5a3c5ae2cfd6a5a43e03610ba14786f21b7d"
-
-S = "${WORKDIR}/Net-SSLeay-${PV}"
-
-inherit cpan ptest
-
-EXTRA_CPANFLAGS = "LIBS='-L=${STAGING_LIBDIR} -L=${STAGING_BASELIBDIR}' \
-                   INC=-I=${STAGING_INCDIR} \
-                   '-lssl -lcrypto -lz' \
-                  "
-
-do_install_ptest() {
-    cp -r ${B}/t ${D}${PTEST_PATH}
-}
-
-BBCLASSEXTEND = "native"
-
-FILES_${PN}-dbg =+ "${libdir}/perl/vendor_perl/*/auto/Net/SSLeay/.debug/"
-
-RDEPENDS_${PN}-ptest = " perl"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.84.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.84.bb
new file mode 100644
index 0000000..cfecef9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.84.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Net::SSLeay - Perl extension for using OpenSSL"
+DESCRIPTION = "This module offers some high level convenience functions for accessing \
+web pages on SSL servers (for symmetry, same API is offered for \
+accessing http servers, too), a sslcat() function for writing your own \
+clients, and finally access to the SSL api of SSLeay/OpenSSL package \
+so you can write servers or clients for more complicated applications."
+HOMEPAGE = "http://search.cpan.org/dist/Net-SSLeay/"
+SECTION = "libs"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=274;endline=294;md5=67d67095d83e339da538a082fad5f38e"
+
+DEPENDS = "openssl zlib openssl-native"
+RDEPENDS_${PN} += "\
+    libssl \
+    libcrypto \
+    perl-module-carp \
+    perl-module-errno \
+    perl-module-extutils-makemaker \
+    perl-module-mime-base64 \
+    perl-module-socket \
+    zlib \
+"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MI/MIKEM/Net-SSLeay-${PV}.tar.gz \
+           file://run-ptest \
+          "
+SRC_URI[md5sum] = "cfbe968487149626978f427cc9fb8c77"
+SRC_URI[sha256sum] = "823ec3cbb428309d6a9e56f362a9300693ce3215b7fede109adb7be361fff177"
+
+S = "${WORKDIR}/Net-SSLeay-${PV}"
+
+inherit cpan ptest
+
+export OPENSSL_PREFIX="${STAGING_LIBDIR}"
+
+EXTRA_CPANFLAGS = "INC=-I${STAGING_INCDIR} LIBS='-L${STAGING_LIBDIR} -lcrypto -lssl -L${STAGING_BASELIBDIR} -lz'"
+
+do_install_ptest() {
+    cp -r ${B}/t ${D}${PTEST_PATH}
+}
+
+BBCLASSEXTEND = "native"
+
+FILES_${PN}-dbg =+ "${libdir}/perl/vendor_perl/*/auto/Net/SSLeay/.debug/"
+
+RDEPENDS_${PN}-ptest = " perl"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/librole/librole-tiny-perl_2.000005.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/librole/librole-tiny-perl_2.000005.bb
deleted file mode 100644
index f684f68..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/librole/librole-tiny-perl_2.000005.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Role::Tiny - Roles. Like a nouvelle cousine portion size of Moose."
-DESCRIPTION = "\"Role::Tiny\" is a minimalist role composition tool."
-
-SECTION = "libs"
-
-HOMEPAGE = "https://metacpan.org/pod/Role::Tiny"
-
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://README;beginline=177;endline=214;md5=26df7e7c20551fb1906e2286624f0b71"
-
-SRC_URI = "${CPAN_MIRROR}/authors/id/H/HA/HAARG/Role-Tiny-${PV}.tar.gz"
-SRC_URI[md5sum] = "c8c5cf1e02d2e0a1ed22530b55b67d66"
-SRC_URI[sha256sum] = "593a29b621e029bf0218d0154d5dfdf6ec502afc49adeeadae6afd0c70063115"
-
-S = "${WORKDIR}/Role-Tiny-${PV}"
-
-inherit cpan
-
-RDEPENDS_${PN} = " perl-module-exporter \
-                   perl-module-strict \
-                   perl-module-test-more \
-                   perl-module-warnings \
-"
-
-RPROVIDES_${PN} = " librole-tiny-perl \
-                    librole-tiny-with-perl \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/librole/librole-tiny-perl_2.000006.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/librole/librole-tiny-perl_2.000006.bb
new file mode 100644
index 0000000..c2755ea
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/librole/librole-tiny-perl_2.000006.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Role::Tiny - Roles. Like a nouvelle cousine portion size of Moose."
+DESCRIPTION = "\"Role::Tiny\" is a minimalist role composition tool."
+
+SECTION = "libs"
+
+HOMEPAGE = "https://metacpan.org/pod/Role::Tiny"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=177;endline=214;md5=26df7e7c20551fb1906e2286624f0b71"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/H/HA/HAARG/Role-Tiny-${PV}.tar.gz"
+SRC_URI[md5sum] = "7c277728a7e090f64b495857cadfed08"
+SRC_URI[sha256sum] = "cc73418c904a0286ecd8915eac11f5be2a8d1e17ea9cb54c9116b0340cd3e382"
+
+S = "${WORKDIR}/Role-Tiny-${PV}"
+
+inherit cpan
+
+RDEPENDS_${PN} = " perl-module-exporter \
+                   perl-module-strict \
+                   perl-module-test-more \
+                   perl-module-warnings \
+"
+
+RPROVIDES_${PN} = " librole-tiny-perl \
+                    librole-tiny-with-perl \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.36.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.36.bb
deleted file mode 100644
index 1aed5e0..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.36.bb
+++ /dev/null
@@ -1,80 +0,0 @@
-SUMMARY = "Test::Harness - Run Perl standard test scripts with statistics"
-DESCRIPTION = "Although, for historical reasons, the Test::Harness \
-distribution takes its name from this module it now exists only to provide \
-TAP::Harness with an interface that is somewhat backwards compatible \
-with Test::Harness 2.xx. If you're writing new code consider using \
-TAP::Harness directly instead. \
-\
-Emulation is provided for runtests and execute_tests but the \
-pluggable 'Straps' interface that previous versions of Test::Harness \
-supported is not reproduced here. Straps is now available as a stand \
-alone module: Test::Harness::Straps. \
-\
-See TAP::Parser, TAP::Harness for the main documentation for this \
-distribution."
-
-SECTION = "libs"
-
-HOMEPAGE = "http://testanything.org"
-
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://README;beginline=29;endline=30;md5=b08db4360eec119e875dddd7cb8a5ddd"
-
-SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Test-Harness-${PV}.tar.gz"
-SRC_URI[md5sum] = "4c8d9c77e8e06ca96c7383c05c8f3616"
-SRC_URI[sha256sum] = "e7566f13b041d028b56f184b77ec2545ec6f0bb5a0f8f5368f7e4a08b496b63e"
-
-S = "${WORKDIR}/Test-Harness-${PV}"
-
-inherit cpan
-
-RPROVIDES_${PN} += "libapp-prove-perl \
-                    libapp-prove-state-perl \
-                    libapp-prove-state-result-perl \
-                    libapp-prove-state-result-test-perl \
-                    libtap-base-perl \
-                    libtap-formatter-base-perl \
-                    libtap-formatter-color-perl \
-                    libtap-formatter-console-perl \
-                    libtap-formatter-console-parallelsession-perl \
-                    libtap-formatter-console-session-perl \
-                    libtap-formatter-file-perl \
-                    libtap-formatter-file-session-perl \
-                    libtap-formatter-session-perl \
-                    libtap-harness-perl \
-                    libtap-harness-env-perl \
-                    libtap-object-perl \
-                    libtap-parser-perl \
-                    libtap-parser-aggregator-perl \
-                    libtap-parser-grammar-perl \
-                    libtap-parser-iterator-perl \
-                    libtap-parser-iterator-array-perl \
-                    libtap-parser-iterator-process-perl \
-                    libtap-parser-iterator-stream-perl \
-                    libtap-parser-iteratorfactory-perl \
-                    libtap-parser-multiplexer-perl \
-                    libtap-parser-result-perl \
-                    libtap-parsser-result-bailout-perl \
-                    libtap-parser-result-comment-perl \
-                    libtap-parser-result-plan-perl \
-                    libtap-parser-result-pragma-perl \
-                    libtap-parser-result-test-perl \
-                    libtap-parser-result-unknown-perl \
-                    libtap-parser-result-version-perl \
-                    libtap-parser-result-yaml-perl \
-                    libtap-parser-resultfactory-perl \
-                    libtap-parser-scheduler-perl \
-                    libtap-parser-scheduler-job-perl \
-                    libtap-parser-scheduler-spinner-perl \
-                    libtap-parser-source-perl \
-                    libtap-parser-sourcehandler-perl \
-                    libtap-parser-sourcehandler-executable-perl \
-                    libtap-parser-sourcehandler-file-perl \
-                    libtap-parser-sourcehandler-handle-perl \
-                    libtap-parser-sourcehandler-perl-perl \
-                    libtap-parser-sourcehandler-rawtap-perl \
-                    libtap-parser-yamlish-reader-perl \
-                    libtap-parser-yamlish-writer-perl \
-                    "
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.42.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.42.bb
new file mode 100644
index 0000000..c9ba594
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libtest/libtest-harness-perl_3.42.bb
@@ -0,0 +1,120 @@
+# NOTE:
+#     You should use perl-module-test-harness instead of this package,
+#     unless you specifically need a newer version than what is provided
+#     by perl in oe-core.
+
+SUMMARY = "Test::Harness - Run Perl standard test scripts with statistics"
+DESCRIPTION = "Although, for historical reasons, the Test::Harness \
+distribution takes its name from this module it now exists only to provide \
+TAP::Harness with an interface that is somewhat backwards compatible \
+with Test::Harness 2.xx. If you're writing new code consider using \
+TAP::Harness directly instead. \
+\
+Emulation is provided for runtests and execute_tests but the \
+pluggable 'Straps' interface that previous versions of Test::Harness \
+supported is not reproduced here. Straps is now available as a stand \
+alone module: Test::Harness::Straps. \
+\
+See TAP::Parser, TAP::Harness for the main documentation for this \
+distribution."
+
+SECTION = "libs"
+
+HOMEPAGE = "http://testanything.org"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=29;endline=30;md5=b08db4360eec119e875dddd7cb8a5ddd"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Test-Harness-${PV}.tar.gz"
+SRC_URI[md5sum] = "c794906473f88d6b74194e2d56f16bd6"
+SRC_URI[sha256sum] = "0fd90d4efea82d6e262e6933759e85d27cbcfa4091b14bf4042ae20bab528e53"
+
+UPSTREAM_CHECK_REGEX = "Test\-Harness\-(?P<pver>(\d+\.\d+))(?!_\d+).tar"
+
+S = "${WORKDIR}/Test-Harness-${PV}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN} += "\
+    perl-module-benchmark \
+"
+
+RPROVIDES_${PN} += "libapp-prove-perl \
+                    libapp-prove-state-perl \
+                    libapp-prove-state-result-perl \
+                    libapp-prove-state-result-test-perl \
+                    libtap-base-perl \
+                    libtap-formatter-base-perl \
+                    libtap-formatter-color-perl \
+                    libtap-formatter-console-perl \
+                    libtap-formatter-console-parallelsession-perl \
+                    libtap-formatter-console-session-perl \
+                    libtap-formatter-file-perl \
+                    libtap-formatter-file-session-perl \
+                    libtap-formatter-session-perl \
+                    libtap-harness-perl \
+                    libtap-harness-env-perl \
+                    libtap-object-perl \
+                    libtap-parser-perl \
+                    libtap-parser-aggregator-perl \
+                    libtap-parser-grammar-perl \
+                    libtap-parser-iterator-perl \
+                    libtap-parser-iterator-array-perl \
+                    libtap-parser-iterator-process-perl \
+                    libtap-parser-iterator-stream-perl \
+                    libtap-parser-iteratorfactory-perl \
+                    libtap-parser-multiplexer-perl \
+                    libtap-parser-result-perl \
+                    libtap-parsser-result-bailout-perl \
+                    libtap-parser-result-comment-perl \
+                    libtap-parser-result-plan-perl \
+                    libtap-parser-result-pragma-perl \
+                    libtap-parser-result-test-perl \
+                    libtap-parser-result-unknown-perl \
+                    libtap-parser-result-version-perl \
+                    libtap-parser-result-yaml-perl \
+                    libtap-parser-resultfactory-perl \
+                    libtap-parser-scheduler-perl \
+                    libtap-parser-scheduler-job-perl \
+                    libtap-parser-scheduler-spinner-perl \
+                    libtap-parser-source-perl \
+                    libtap-parser-sourcehandler-perl \
+                    libtap-parser-sourcehandler-executable-perl \
+                    libtap-parser-sourcehandler-file-perl \
+                    libtap-parser-sourcehandler-handle-perl \
+                    libtap-parser-sourcehandler-perl-perl \
+                    libtap-parser-sourcehandler-rawtap-perl \
+                    libtap-parser-yamlish-reader-perl \
+                    libtap-parser-yamlish-writer-perl \
+                    "
+
+do_install_prepend() {
+	# these tests are inappropriate on target
+	rm -rf ${B}/t/000-load.t
+	rm -rf ${B}/t/state.t
+	# these tests require "-T" (taint) option on command line
+	rm -rf ${B}/t/aggregator.t
+	rm -rf ${B}/t/bailout.t
+	rm -rf ${B}/t/base.t
+	rm -rf ${B}/t/callbacks.t
+	rm -rf ${B}/t/errors.t
+	rm -rf ${B}/t/nested.t
+	rm -rf ${B}/t/object.t
+	rm -rf ${B}/t/premature-bailout.t
+	rm -rf ${B}/t/results.t
+	rm -rf ${B}/t/streams.t
+	rm -rf ${B}/t/yamlish-output.t
+	rm -rf ${B}/t/compat/version.t
+}
+
+do_install_append() {
+	install -d ${D}/usr/local/bin
+	# do not clobber perl-misc /usr/bin/prove
+	install -m 0755 ${B}/bin/prove ${D}/usr/local/bin/
+	rm -rf ${D}${bindir}/prove
+	rm -rf ${D}${bindir}
+}
+
+FILES_${PN} += "/usr/local/bin/prove"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0129.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0129.bb
deleted file mode 100644
index a8cc269..0000000
--- a/import-layers/meta-openembedded/meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0129.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Perl interface to the libxml2 library"
-DESCRIPTION = "This module is an interface to libxml2, providing XML and HTML parsers \
-with DOM, SAX and XMLReader interfaces, a large subset of DOM Layer 3 \
-interface and a XML::XPath-like interface to XPath API of libxml2. \
-The module is split into several packages which are not described in this \
-section; unless stated otherwise, you only need to use XML::LibXML; in \
-your programs."
-
-HOMEPAGE = "http://search.cpan.org/dist/XML-LibXML-1.99/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0|GPLv1+"
-DEPENDS += "libxml2 \
-        libxml-sax-perl-native \
-        zlib \
-"
-RDEPENDS_${PN} += "libxml2 \
-        libxml-sax-perl \
-        libxml-sax-base-perl \
-        zlib \
-"
-
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXML-${PV}.tar.gz;name=libxml \
-    file://disable-libxml2-check.patch \
-    file://fix-CATALOG-conditional-compile.patch \
-    file://using-DOCB-conditional.patch \
-"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=64eda1bc135f0ece1d1187f2a8ac82c1 \
-    file://LICENSE;md5=97871bde150daeb5e61ad95137ff2446 \
-"
-SRC_URI[libxml.md5sum] = "5806b69d54a2d7884b8d22b395888436"
-SRC_URI[libxml.sha256sum] = "5ca0269ba06800c84061a7f3333c85fab5584d69cd7b4e0641963da7fd36b366"
-
-S = "${WORKDIR}/XML-LibXML-${PV}"
-
-inherit cpan
-
-EXTRA_CPANFLAGS = "INC=-I${STAGING_INCDIR}/libxml2 LIBS=-L${STAGING_LIBDIR}"
-
-BBCLASSEXTEND = "native"
-
-CFLAGS += " -D_GNU_SOURCE "
-BUILD_CFLAGS += " -D_GNU_SOURCE "
-
-FILES_${PN}-dbg =+ "${libdir}/perl/vendor_perl/*/auto/XML/LibXML/.debug/"
diff --git a/import-layers/meta-openembedded/meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0132.bb b/import-layers/meta-openembedded/meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0132.bb
new file mode 100644
index 0000000..1f18401
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-perl/recipes-perl/libxml/libxml-libxml-perl_2.0132.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Perl interface to the libxml2 library"
+DESCRIPTION = "This module is an interface to libxml2, providing XML and HTML parsers \
+with DOM, SAX and XMLReader interfaces, a large subset of DOM Layer 3 \
+interface and a XML::XPath-like interface to XPath API of libxml2. \
+The module is split into several packages which are not described in this \
+section; unless stated otherwise, you only need to use XML::LibXML; in \
+your programs."
+
+HOMEPAGE = "http://search.cpan.org/dist/XML-LibXML-1.99/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0|GPLv1+"
+DEPENDS += "libxml2 \
+        libxml-sax-perl-native \
+        zlib \
+"
+RDEPENDS_${PN} += "\
+    libxml2 \
+    libxml-sax-perl \
+    libxml-sax-base-perl \
+    perl-module-encode \
+    perl-module-data-dumper \
+    zlib \
+"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXML-${PV}.tar.gz;name=libxml \
+    file://disable-libxml2-check.patch \
+    file://fix-CATALOG-conditional-compile.patch \
+    file://using-DOCB-conditional.patch \
+"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=64eda1bc135f0ece1d1187f2a8ac82c1 \
+    file://LICENSE;md5=97871bde150daeb5e61ad95137ff2446 \
+"
+SRC_URI[libxml.md5sum] = "43546fd9a3974f19323f9fb04861ece9"
+SRC_URI[libxml.sha256sum] = "721452e3103ca188f5968ab06d5ba29fe8e00e49f4767790882095050312d476"
+
+S = "${WORKDIR}/XML-LibXML-${PV}"
+
+inherit cpan
+
+EXTRA_CPANFLAGS = "INC=-I${STAGING_INCDIR}/libxml2 LIBS=-L${STAGING_LIBDIR}"
+
+BBCLASSEXTEND = "native"
+
+CFLAGS += " -D_GNU_SOURCE "
+BUILD_CFLAGS += " -D_GNU_SOURCE "
+
+FILES_${PN}-dbg =+ "${libdir}/perl/vendor_perl/*/auto/XML/LibXML/.debug/"
diff --git a/import-layers/meta-openembedded/meta-python/README b/import-layers/meta-openembedded/meta-python/README
index 43740f6..0566e49 100644
--- a/import-layers/meta-openembedded/meta-python/README
+++ b/import-layers/meta-openembedded/meta-python/README
@@ -17,12 +17,12 @@
 
 	URI: git://git.openembedded.org/openembedded-core
 	layers: meta
-	branch: rocko 
+	branch: master
 	revision: HEAD
 
 	URI: git://git.openembedded.org/meta-openembedded
 	layers: meta-oe
-	branch:  rocko
+	branch: master
 	revision: HEAD
 
 Please follow the recommended setup procedures of your OE distribution.
@@ -47,8 +47,7 @@
 Maintenance
 -------------------------
 
-Maintainers:
+Layer Maintainers:
         Tim "moto-timo" Orling <TicoTimo@gmail.com>
-        Paul "bluelightning" Eggleton <paul.eggleton@linux.intel.com>
         Derek Straka <derek@asterius.io>
 
diff --git a/import-layers/meta-openembedded/meta-python/classes/pypi.bbclass b/import-layers/meta-openembedded/meta-python/classes/pypi.bbclass
deleted file mode 100644
index e5d7ab3..0000000
--- a/import-layers/meta-openembedded/meta-python/classes/pypi.bbclass
+++ /dev/null
@@ -1,26 +0,0 @@
-def pypi_package(d):
-    bpn = d.getVar('BPN')
-    if bpn.startswith('python-'):
-        return bpn[7:]
-    elif bpn.startswith('python3-'):
-        return bpn[8:]
-    return bpn
-
-PYPI_PACKAGE ?= "${@pypi_package(d)}"
-PYPI_PACKAGE_EXT ?= "tar.gz"
-
-def pypi_src_uri(d):
-    package = d.getVar('PYPI_PACKAGE')
-    package_ext = d.getVar('PYPI_PACKAGE_EXT')
-    pv = d.getVar('PV')
-    return 'https://files.pythonhosted.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext)
-
-PYPI_SRC_URI ?= "${@pypi_src_uri(d)}"
-
-HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
-SECTION = "devel/python"
-SRC_URI += "${PYPI_SRC_URI}"
-S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
-
-UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
-UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
diff --git a/import-layers/meta-openembedded/meta-python/conf/layer.conf b/import-layers/meta-openembedded/meta-python/conf/layer.conf
index d53677f..7089071 100644
--- a/import-layers/meta-openembedded/meta-python/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-python/conf/layer.conf
@@ -14,4 +14,6 @@
 
 LAYERDEPENDS_meta-python = "core openembedded-layer"
 
+LAYERSERIES_COMPAT_meta-python = "sumo"
+
 LICENSE_PATH += "${LAYERDIR}/licenses"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone_git.bb b/import-layers/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone_git.bb
index 8b2a192..4577873 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone_git.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone_git.bb
@@ -69,7 +69,6 @@
                   python-pkgutil \
                   python-pyopenssl \
                   python-re \
-                  python-readline \
                   python-setuptools \
                   python-shell \
                   python-simplejson \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc.inc b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc.inc
index b9535fc..05fbae4 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc.inc
@@ -7,7 +7,7 @@
 DEPENDS += "${PYTHON_PN}-gevent"
 RDEPENDS_${PN} += "${PYTHON_PN}-gevent ${PYTHON_PN}-msgpack ${PYTHON_PN}-gsocketpool"
 
-SRC_URI[md5sum] = "66e6cf367ea71cfed8938a27e9c183c3"
-SRC_URI[sha256sum] = "5ccada6526d48ac4d95a7bbdc093586663841560337032a503f57ccfae69d7bf"
+SRC_URI[md5sum] = "acde1f346411997d76ab89790a356823"
+SRC_URI[sha256sum] = "e8ddd47e7a2fb2d3b203fcc522443ee5be56c8f7e2c6d915c047445951cef1fb"
 
 inherit pypi
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc_0.1.14.bb b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc_0.1.16.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc_0.1.14.bb
rename to import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python-mprpc_0.1.16.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python3-mprpc_0.1.14.bb b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python3-mprpc_0.1.16.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python3-mprpc_0.1.14.bb
rename to import-layers/meta-openembedded/meta-python/recipes-connectivity/python-mprpc/python3-mprpc_0.1.16.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-pyro4/python-pyro4_4.62.bb b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-pyro4/python-pyro4_4.62.bb
deleted file mode 100644
index 041c4ff..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-pyro4/python-pyro4_4.62.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Python Remote Objects"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=378acef375e17a3bff03bd0f78c53220"
-
-SRC_URI[md5sum] = "6e2fef3dc8b29773a87abbaa8e9abe15"
-SRC_URI[sha256sum] = "e301edfb2bc47768b7222a68cae8de8be796d1d9f61cdbd1af9039985ed5009c"
-
-PYPI_PACKAGE = "Pyro4"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-logging \
-    ${PYTHON_PN}-selectors34 \
-    ${PYTHON_PN}-serpent \
-    ${PYTHON_PN}-threading \
-    ${PYTHON_PN}-zlib \
-    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-pyro4/python-pyro4_4.63.bb b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-pyro4/python-pyro4_4.63.bb
new file mode 100644
index 0000000..6f683e3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-pyro4/python-pyro4_4.63.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Python Remote Objects"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=378acef375e17a3bff03bd0f78c53220"
+
+SRC_URI[md5sum] = "e1d772b67bf7c6f75fa3174bc95c8839"
+SRC_URI[sha256sum] = "67d2b34156619ba37e92100af95aade8129dd2b7327eb05821d43887451f7d7b"
+
+PYPI_PACKAGE = "Pyro4"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-selectors34 \
+    ${PYTHON_PN}-serpent \
+    ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-zlib \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python-thrift_0.10.0.bb b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python-thrift_0.10.0.bb
deleted file mode 100644
index e6f61bd..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python-thrift_0.10.0.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Python bindings for the Apache Thrift RPC system"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=26a2009ddcb7c4162f8bafd5ef73c670"
-
-SRC_URI[md5sum] = "76bb768a210257dd203923110042e560"
-SRC_URI[sha256sum] = "b7f6c09155321169af03f9fb20dc15a4a0c7481e7c334a5ba8f7f0d864633209"
-
-PYPI_PACKAGE_EXT = "zip"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-logging \
-    ${PYTHON_PN}-six \
-    ${PYTHON_PN}-stringold \
-    ${PYTHON_PN}-threading \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python-thrift_0.11.0.bb b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python-thrift_0.11.0.bb
new file mode 100644
index 0000000..8047ec7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python-thrift_0.11.0.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Python bindings for the Apache Thrift RPC system"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=e3641ae1a26cf5c12a3a71bd3030ab0e"
+
+SRC_URI[md5sum] = "36165d5c80e6b101dbe9fcf7ef524d51"
+SRC_URI[sha256sum] = "7d59ac4fdcb2c58037ebd4a9da5f9a49e3e034bf75b3f26d9fe48ba3d8806e6b"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-six \
+    ${PYTHON_PN}-stringold \
+    ${PYTHON_PN}-threading \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/pyrtm_0.4.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/pyrtm_0.4.2.bb
index 72f0921..9d851ab 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/pyrtm_0.4.2.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/pyrtm_0.4.2.bb
@@ -10,7 +10,27 @@
 
 inherit pypi setuptools
 
+PACKAGES =+ "${PN}-tests ${PN}-samples"
+
+FILES_${PN}-samples += " \
+    ${PYTHON_SITEPACKAGES_DIR}/rtm/samples \
+"
+
+FILES_${PN}-tests += " \
+    ${PYTHON_SITEPACKAGES_DIR}/rtm/tests \
+"
+
 RDEPENDS_${PN} += "\
     ${PYTHON_PN}-json \
+    ${PYTHON_PN}-logging \
     ${PYTHON_PN}-netclient \
-    "
+"
+
+RDEPENDS_${PN}-samples += " \
+    ${PN} \
+"
+
+RDEPENDS_${PN}-tests += " \
+    ${PN} \
+    ${PYTHON_PN}-unittest \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-alembic.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-alembic.inc
new file mode 100644
index 0000000..f1a6412
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-alembic.inc
@@ -0,0 +1,15 @@
+DESCRIPTION = "A database migration tool for SQLAlchemy"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c5f1361296835ff94bda73db7dd312a6"
+
+SRC_URI[md5sum] = "5cfef58641c9a94d4a5d547e951a7dda"
+SRC_URI[sha256sum] = "13b8611788acf0d7b617775db5c2ae26554a6d4263c590ef628d448fd05aef56"
+
+PYPI_PACKAGE = "alembic"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-dateutil \
+    ${PYTHON_PN}-editor \
+    ${PYTHON_PN}-mako \
+    ${PYTHON_PN}-sqlalchemy \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-alembic_0.9.8.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-alembic_0.9.8.bb
new file mode 100644
index 0000000..efcb2b1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-alembic_0.9.8.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-alembic.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto.inc
index 41b7342..5c37995 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto.inc
@@ -6,8 +6,18 @@
 
 PYPI_PACKAGE = "asn1crypto"
 
-SRC_URI[md5sum] = "97d54665c397b72b165768398dfdd876"
-SRC_URI[sha256sum] = "0874981329cfebb366d6584c3d16e913f2a0eb026c9463efcc4aaf42a9d94d70"
+SRC_URI[md5sum] = "de3520426e81a6581352d4366f310eb1"
+SRC_URI[sha256sum] = "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49"
 
 inherit pypi
+
+RDEPENDS_${PN}_class-target += " \
+    ${PYTHON_PN}-codecs \
+    ${PYTHON_PN}-crypt \
+    ${PYTHON_PN}-ctypes \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-netclient \
+"
+
 BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto_0.23.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto_0.23.0.bb
deleted file mode 100644
index 6af60c2..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto_0.23.0.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-asn1crypto.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto_0.24.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto_0.24.0.bb
new file mode 100644
index 0000000..46aace2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-asn1crypto_0.24.0.bb
@@ -0,0 +1,7 @@
+inherit setuptools
+require python-asn1crypto.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-textutils \ 
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid.inc
index 4cb1a3c..ead2b6e 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid.inc
@@ -4,17 +4,28 @@
 LICENSE = "LGPL-2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI[md5sum] = "6f65e4ea8290ec032320460905afb828"
-SRC_URI[sha256sum] = "492c2a2044adbf6a84a671b7522e9295ad2f6a7c781b899014308db25312dd35"
+SRC_URI[md5sum] = "7d7dc000b25f0cbfcca20cb9a8dc0310"
+SRC_URI[sha256sum] = "35cfae47aac19c7b407b7095410e895e836f2285ccf1220336afba744cc4c5f2"
 
 inherit pypi
 
+PACKAGES =+ "${PN}-tests"
+
+FILES_${PN}-tests += " \
+    ${PYTHON_SITEPACKAGES_DIR}/astroid/test* \
+    ${PYTHON_SITEPACKAGES_DIR}/astroid/__pycache__/test* \
+"
+
 RDEPENDS_${PN}_class-target += "\
     ${PYTHON_PN}-distutils \
     ${PYTHON_PN}-lazy-object-proxy \
+    ${PYTHON_PN}-logging \
     ${PYTHON_PN}-six \
-    ${PYTHON_PN}-subprocess \
     ${PYTHON_PN}-wrapt \
-    ${PYTHON_PN}-re \
     ${PYTHON_PN}-setuptools \
 "
+
+RDEPENDS_${PN}-tests_class-target += "\
+    ${PYTHON_PN}-unittest \
+    ${PYTHON_PN}-xml \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid_1.5.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid_1.5.3.bb
deleted file mode 100644
index f7a0a5e..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid_1.5.3.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-inherit setuptools
-require python-astroid.inc
-
-RDEPENDS_${PN}_class-target += "${PYTHON_PN}-enum34 \
-                                ${PYTHON_PN}-importlib \
-                                ${PYTHON_PN}-singledispatch \
-                               "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid_1.6.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid_1.6.3.bb
new file mode 100644
index 0000000..687394d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-astroid_1.6.3.bb
@@ -0,0 +1,10 @@
+inherit setuptools
+require python-astroid.inc
+
+RDEPENDS_${PN}_class-target += " \
+    ${PYTHON_PN}-enum34 \
+    ${PYTHON_PN}-backports-functools-lru-cache \
+    ${PYTHON_PN}-re \
+    ${PYTHON_PN}-singledispatch \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attr.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attr.inc
new file mode 100644
index 0000000..1d93dd7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attr.inc
@@ -0,0 +1,9 @@
+DESCRIPTION = "Simple decorator to set attributes of target function or class in a DRY way"
+HOMEPAGE = "https://github.com/denis-ryzhkov/attr"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=59805a0285f4d2b6abdedae73db4f5c1"
+
+SRC_URI[md5sum] = "68b9a503991241fb2df28488686b0e1e"
+SRC_URI[sha256sum] = "9091548058d17f132596e61fa7518e504f76b9a4c61ca7d86e1f96dbf7d4775d"
+
+inherit pypi
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attr_0.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attr_0.3.1.bb
new file mode 100644
index 0000000..979d6cb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attr_0.3.1.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-attr.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs.inc
index edde79e..c29f058 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs.inc
@@ -3,7 +3,12 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d4ab25949a73fe7d4fdee93bcbdbf8ff"
 
-SRC_URI[md5sum] = "4314f784ca3174d91956da9828248960"
-SRC_URI[sha256sum] = "c78f53e32d7cf36d8597c8a2c7e3c0ad210f97b9509e152e4c37fa80869f823c"
+SRC_URI[md5sum] = "d7a89063b2e0fd36bd82389c4d82821d"
+SRC_URI[sha256sum] = "1c7960ccfd6a005cd9f7ba884e6316b5e430a3f1a6c37c5f87d8b43f83b54ec9"
 
 inherit pypi
+
+RDEPENDS_${PN}_class-target += " \
+    ${PYTHON_PN}-cryptography \
+    ${PYTHON_PN}-ctypes \
+"    
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs_17.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs_17.3.0.bb
deleted file mode 100644
index a6fdf15..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs_17.3.0.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-attrs.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs_17.4.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs_17.4.0.bb
new file mode 100644
index 0000000..e3bec0f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-attrs_17.4.0.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-attrs.inc
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-automat/0001-setup.py-remove-the-dependency-on-m2r.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-automat/0001-setup.py-remove-the-dependency-on-m2r.patch
index 0ebb220..d6def98 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-automat/0001-setup.py-remove-the-dependency-on-m2r.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-automat/0001-setup.py-remove-the-dependency-on-m2r.patch
@@ -15,10 +15,10 @@
  setup.py | 10 ----------
  1 file changed, 10 deletions(-)
 
-diff --git a/setup.py b/setup.py
-index d360c64..7b4180a 100644
---- a/setup.py
-+++ b/setup.py
+Index: Automat-0.6.0/setup.py
+===================================================================
+--- Automat-0.6.0.orig/setup.py
++++ Automat-0.6.0/setup.py
 @@ -4,14 +4,6 @@ Setup file for automat
  
  from setuptools import setup, find_packages
@@ -46,7 +46,4 @@
 -        'm2r',
      ],
      install_requires=[
-         "attrs>=16.1.0",
--- 
-2.7.4
-
+         "attrs",
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python.inc
index eaeb020..a3299e4 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python.inc
@@ -1,18 +1,41 @@
 DESCRIPTION = "SDK for connecting to AWS IoT using Python."
 HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-python"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9ac49901b833e769c7d6f21e8dbd7b30"
+LICENSE = "Apache-2.0 & (EPL-1.0 | EDL-1.0)"
+LICENSE_${PN}-examples = "Apache-2.0"
+LIC_FILES_CHKSUM = "\
+    file://LICENSE.txt;md5=9ac49901b833e769c7d6f21e8dbd7b30 \
+    file://AWSIoTPythonSDK/core/protocol/paho/client.py;endline=14;md5=5a3c8a1a4bb71bd934f450ecff972ad9 \
+"
 
-SRC_URI[md5sum] = "e6781f6c42bbc547d508d6fa6720ac8f"
-SRC_URI[sha256sum] = "6b2865d4f518794b96a834fc81b568428daa0ef92037da2e9288b4af5d8dd736"
+SRC_URI[md5sum] = "97e8cf0d40ef3765d979c19b534a716d"
+SRC_URI[sha256sum] = "d68cbff396143e837b4c23b6621d3b7ae374281afc75eed8e51a28625d9125ba"
 
 inherit pypi
 
 PYPI_PACKAGE = "AWSIoTPythonSDK"
 
+do_install_append() {
+        install -d -m0755 ${D}${datadir}/${BPN}/examples
+        cp --preserve=mode,timestamps -R ${S}/samples/* ${D}${datadir}/${BPN}/examples
+        # this requires the full blown AWS Python SDK
+        rm -r ${D}${datadir}/${BPN}/examples/basicPubSub
+}
+
+PACKAGES =+ "${PN}-examples"
+
 RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-pyopenssl \
+    ${PYTHON_PN}-crypt \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-io \
     ${PYTHON_PN}-json \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-math \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-numbers \
+    ${PYTHON_PN}-threading \
 "
+RDEPENDS_${PN}-examples += "${PN}"
+
+FILES_${PN}-examples = "${datadir}/${BPN}/examples"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python_1.2.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python_1.2.0.bb
deleted file mode 100644
index 12ae978..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python_1.2.0.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-aws-iot-device-sdk-python.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python_1.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python_1.3.1.bb
new file mode 100644
index 0000000..490e973
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python_1.3.1.bb
@@ -0,0 +1,4 @@
+inherit setuptools
+require python-aws-iot-device-sdk-python.inc
+
+RDEPENDS_${PN}-examples += "${PYTHON_PN}-argparse"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel.inc
index 5e6ca3d..4dcb255 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel.inc
@@ -3,8 +3,8 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e6eeaabc92cfc2d03f53e789324d7292"
 
-SRC_URI[md5sum] = "60228b3ce93a203357158b909afe8ae1"
-SRC_URI[sha256sum] = "6007daf714d0cd5524bbe436e2d42b3c20e68da66289559341e48d2cd6d25811"
+SRC_URI[md5sum] = "152a6b17fe4110b95675aceb9af9fab2"
+SRC_URI[sha256sum] = "8ce4cb6fdd4393edd323227cba3a077bceb2a6ce5201c902c65e730046f41f14"
 
 PYPI_PACKAGE = "Babel"
 
@@ -13,8 +13,13 @@
 CLEANBROKEN = "1"
 
 RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-codecs \
+    ${PYTHON_PN}-difflib \
+    ${PYTHON_PN}-distutils \
+    ${PYTHON_PN}-netserver \
     ${PYTHON_PN}-numbers \
     ${PYTHON_PN}-pickle \
     ${PYTHON_PN}-pytz \
+    ${PYTHON_PN}-shell \
     ${PYTHON_PN}-threading \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel_2.5.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel_2.5.1.bb
deleted file mode 100644
index e0eadcd..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel_2.5.1.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-babel.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel_2.5.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel_2.5.3.bb
new file mode 100644
index 0000000..f7c166e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-babel_2.5.3.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-babel.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt.inc
index 667a3fb..4490969 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt.inc
@@ -4,12 +4,14 @@
 
 DEPENDS += "${PYTHON_PN}-cffi-native"
 
-SRC_URI[md5sum] = "20da8b40790caad99c4086dba533154b"
-SRC_URI[sha256sum] = "6645c8d0ad845308de3eb9be98b6fd22a46ec5412bfc664a423e411cdd8f5488"
+SRC_URI[md5sum] = "8408abc974446e64862a9742104e97b6"
+SRC_URI[sha256sum] = "67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d"
 
 inherit pypi
 
 RDEPENDS_${PN}_class-target += "\
     ${PYTHON_PN}-cffi \
+    ${PYTHON_PN}-ctypes \
+    ${PYTHON_PN}-shell \
     ${PYTHON_PN}-six \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt_3.1.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt_3.1.3.bb
deleted file mode 100644
index 2433354..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt_3.1.3.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-bcrypt.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt_3.1.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt_3.1.4.bb
new file mode 100644
index 0000000..b136aa4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bcrypt_3.1.4.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-bcrypt.inc
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-behave_1.2.5.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-behave_1.2.5.bb
deleted file mode 100644
index 541a79d..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-behave_1.2.5.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "A behavior-driven development framework, Python style"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d950439e8ea6ed233e4288f5e1a49c06"
-
-SRC_URI[md5sum] = "3af4bc2886d2be982e41bfaba61da3bc"
-SRC_URI[sha256sum] = "81b731ac5187e31e4aad2594944fa914943683a9818320846d037c5ebd6d5d0b"
-
-RDEPENDS_${PN} += "python-difflib python-setuptools python-pkgutil python-misc python-argparse python-xml python-importlib python-enum34 python-parse python-parse-type python-six"
-
-inherit pypi setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-behave_1.2.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-behave_1.2.6.bb
new file mode 100644
index 0000000..6797302
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-behave_1.2.6.bb
@@ -0,0 +1,10 @@
+SUMMARY = "A behavior-driven development framework, Python style"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d950439e8ea6ed233e4288f5e1a49c06"
+
+SRC_URI[md5sum] = "3f05c859a1c45f5ed33e925817ad887d"
+SRC_URI[sha256sum] = "b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"
+
+RDEPENDS_${PN} += "python-difflib python-setuptools python-pkgutil python-misc python-argparse python-xml python-enum34 python-parse python-parse-type python-six"
+
+inherit pypi setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bitarray.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bitarray.inc
index 7b6e0d1..38a22f6 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bitarray.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-bitarray.inc
@@ -8,4 +8,4 @@
 
 inherit pypi
 
-BBCLASSEXTEND = "nativesdk"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-blinker.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-blinker.inc
new file mode 100644
index 0000000..eaf3908
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-blinker.inc
@@ -0,0 +1,7 @@
+DESCRIPTION = "Fast, simple object-to-object and broadcast signaling."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=946d7e89af6f7733aeaebed5635d2682"
+
+SRC_URI[md5sum] = "8b3722381f83c2813c52de3016b68d33"
+SRC_URI[sha256sum] = "471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6"
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-blinker_1.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-blinker_1.4.bb
index 0ce141f..bc4164e 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-blinker_1.4.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-blinker_1.4.bb
@@ -1,8 +1,2 @@
-DESCRIPTION = "Fast, simple object-to-object and broadcast signaling."
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=946d7e89af6f7733aeaebed5635d2682"
-
-SRC_URI[md5sum] = "8b3722381f83c2813c52de3016b68d33"
-SRC_URI[sha256sum] = "471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6"
-
 inherit pypi setuptools
+require python-blinker.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can.inc
index 1dbc809..a71c47b 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can.inc
@@ -3,7 +3,15 @@
 LICENSE = "LGPLv3"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=38138baa100d7259934590850bc0406e"
 
-SRC_URI[md5sum] = "b2a164887c1c6a2a2490b5afb36e36db"
-SRC_URI[sha256sum] = "b961b6ce75a7f08b586f4d2cae8cdc409881731b851fc405fa21cb16bad00d87"
+SRC_URI[md5sum] = "3310f0aa2a8492d0ff614ecf636ec8a8"
+SRC_URI[sha256sum] = "4a5c01dd67feeda35f88e6c12ea14ac8cabd426b9be0cc5f9fd083fe90a9dbfc"
 
 PYPI_PACKAGE="python-can"
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-ctypes \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-misc \
+    ${PYTHON_PN}-netserver \
+    ${PYTHON_PN}-sqlite3 \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can_2.0.0b1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can_2.0.0b1.bb
deleted file mode 100644
index ec81a9e..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can_2.0.0b1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require python-can.inc
-inherit pypi setuptools
-
-RDEPENDS_${PN} += "python-sqlite3"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can_2.1.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can_2.1.0.bb
new file mode 100644
index 0000000..f0edb64
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-can_2.1.0.bb
@@ -0,0 +1,8 @@
+require python-can.inc
+inherit pypi setuptools
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-argparse \
+    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-zlib \
+"    
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cassandra-driver.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cassandra-driver.inc
index a522e67..1648d3e 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cassandra-driver.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cassandra-driver.inc
@@ -8,8 +8,8 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
 SRCNAME = "cassandra-driver"
 
-SRC_URI[md5sum] = "1659b074e10c613e5ba1cdf92974a57a"
-SRC_URI[sha256sum] = "643bed0fac08ee91630f0f35556bb62c3b4b007c20d4e6e8d349f769ea648150"
+SRC_URI[md5sum] = "5c8b4a3adfc48180e8ec38b8c4e996fd"
+SRC_URI[sha256sum] = "61b670fb2ba95d51d91fa7b589aae3666df494713f5d1ed78bb5c510778d77f0"
 
 DISTUTILS_BUILD_ARGS += " \
     --no-libev \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi.inc
index e550f7e..26df5c1 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi.inc
@@ -7,7 +7,7 @@
 LICENSE = "ISC"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=f77f61d14ee6feac4228d3ebd26cc1f1"
 
-SRC_URI[md5sum] = "48e8370da8b370a16e223ee9c7b6b063"
-SRC_URI[sha256sum] = "40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5"
+SRC_URI[md5sum] = "068fd5c3c690ae47504b3e0bf4e56c4c"
+SRC_URI[sha256sum] = "edbc3f203427eef571f79a7692bb160a2b0f7ccaa31953e99bd17e307cf63f7d"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi_2017.7.27.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi_2018.1.18.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi_2017.7.27.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-certifi_2018.1.18.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi.inc
index 8dcdb63..e6071ee 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi.inc
@@ -4,11 +4,13 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=5677e2fdbf7cdda61d6dd2b57df547bf"
 DEPENDS += "libffi ${PYTHON_PN}-pycparser"
 
-SRC_URI[md5sum] = "a731487324b501c8295221b629d3f5f3"
-SRC_URI[sha256sum] = "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6"
+SRC_URI[md5sum] = "ac8492f4ad952360737413e82d661908"
+SRC_URI[sha256sum] = "e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4"
 
 RDEPENDS_${PN}_class-target = " \
+    ${PYTHON_PN}-ctypes \
     ${PYTHON_PN}-io \
+    ${PYTHON_PN}-shell \
 "
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi_1.11.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi_1.11.2.bb
deleted file mode 100644
index 3cd62d1..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi_1.11.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require python-cffi.inc
-inherit pypi setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi_1.11.5.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi_1.11.5.bb
new file mode 100644
index 0000000..bc667b8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cffi_1.11.5.bb
@@ -0,0 +1,6 @@
+require python-cffi.inc
+inherit pypi setuptools
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet.inc
index 6035488..6305299 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet.inc
@@ -11,3 +11,13 @@
 SRC_URI[sha256sum] = "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
 
 BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "${PN}-cli"
+RDEPENDS_${PN}-cli = "${PN} "
+FILES_${PN}-cli += " \
+    ${PYTHON_SITEPACKAGES_DIR}/chardet/cli \
+"
+
+RDEPENDS_${PN}_class-target += " \
+    ${PYTHON_PN}-logging \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet_3.0.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet_3.0.4.bb
index b7a46e9..3b6feee 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet_3.0.4.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-chardet_3.0.4.bb
@@ -1,2 +1,4 @@
 inherit setuptools
 require python-chardet.inc
+
+RDEPENDS_${PN} += "${PYTHON_PN}-argparse"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cmd2_0.7.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cmd2_0.7.7.bb
deleted file mode 100644
index fa1ef5f..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cmd2_0.7.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Extra features for standard library's cmd module"
-HOMEPAGE = "http://packages.python.org/cmd2/"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=49;endline=49;md5=0f13c9cfc75288223cf7edd2f3b985a2"
-
-SRC_URI[md5sum] = "576b78add6d652b48dcf9362cece88ef"
-SRC_URI[sha256sum] = "b4e2fb9fc656adccc4d01dfd55ab5a9b05890e961950543f692e7885725c2d72"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-doctest \
-    ${PYTHON_PN}-pyparsing \
-    ${PYTHON_PN}-shell \
-    ${PYTHON_PN}-six \
-    ${PYTHON_PN}-stringold \
-    ${PYTHON_PN}-subprocess \
-    ${PYTHON_PN}-threading \
-    ${PYTHON_PN}-textutils \
-    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cmd2_0.8.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cmd2_0.8.1.bb
new file mode 100644
index 0000000..145ab98
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cmd2_0.8.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Extra features for standard library's cmd module"
+HOMEPAGE = "http://packages.python.org/cmd2/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=51;endline=51;md5=0f13c9cfc75288223cf7edd2f3b985a2"
+
+SRC_URI[md5sum] = "701b916ffac99137bea413205106f993"
+SRC_URI[sha256sum] = "d09976f9ad2327883c2d07b5acb42e66ad52b17e352873c22041ed124bfe8aba"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-doctest \
+    ${PYTHON_PN}-pyparsing \
+    ${PYTHON_PN}-pyperclip \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-six \
+    ${PYTHON_PN}-stringold \
+    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-textutils \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-configparser.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-configparser.inc
new file mode 100644
index 0000000..c1fb858
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-configparser.inc
@@ -0,0 +1,11 @@
+SUMMARY = "This module provides the ConfigParser class which implements a basic configuration language which provides a structure similar to what’s found in Microsoft Windows INI files."
+SECTION = "devel/python"
+HOMEPAGE = "https://docs.python.org/3/library/configparser.html"
+LICENSE = "MIT"
+
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
+
+SRC_URI[md5sum] = "cfdd915a5b7a6c09917a64a573140538"
+SRC_URI[sha256sum] = "5308b47021bc2340965c371f0f058cc6971a04502638d4244225c49d80db273a"
+
+inherit pypi
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-configparser_3.5.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-configparser_3.5.0.bb
new file mode 100644
index 0000000..69f045d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-configparser_3.5.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-configparser.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors.inc
index e9e4019..00bb87b 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors.inc
@@ -8,8 +8,8 @@
     ${PYTHON_PN}-cryptography \
 "
 
-SRC_URI[md5sum] = "1db4c09062a3a8e1e2d1f5e3e4d752d7"
-SRC_URI[sha256sum] = "beb831aa73663a224f4d7520483ed02da544533bb03b26ec07a5f9a0dd0941e1"
+SRC_URI[md5sum] = "ef115b870cc8d8b9f0f4189b512bc170"
+SRC_URI[sha256sum] = "78c4b4f3f84853ea5d038e2f53d355229dd8119fe9cf949c3e497c85c760a5ca"
 
 PYPI_PACKAGE = "cryptography_vectors"
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors_2.0.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors_2.1.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors_2.0.3.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography-vectors_2.1.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography.inc
index 4ba3e32..4be7907 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography.inc
@@ -10,8 +10,8 @@
     ${PYTHON_PN}-six \
 "
 
-SRC_URI[md5sum] = "24cbdab3fda22be31dd3aef2808f5d2f"
-SRC_URI[sha256sum] = "d04bb2425086c3fe86f7bc48915290b13e798497839fbb18ab7f6dffcf98cc3a"
+SRC_URI[md5sum] = "9f39d4d8f2b05f295fa0ff52475ec4f2"
+SRC_URI[sha256sum] = "e4d967371c5b6b2e67855066471d844c5d52d210c36c28d49a8507b96e2c5291"
 
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-cffi \
@@ -28,7 +28,6 @@
     ${PYTHON_PN}-numbers \
     ${PYTHON_PN}-asn1crypto \
     ${PYTHON_PN}-pycparser \
-    ${PYTHON_PN}-subprocess \
     ${PYTHON_PN}-setuptools \
     ${PYTHON_PN}-six \
     ${PYTHON_PN}-threading \
@@ -55,6 +54,4 @@
     ${libdir}/${PYTHON_PN}2.7/site-packages/${SRCNAME}/hazmat/bindings/.debug \
 "
 
-LDFLAGS_append = " -pthread"
-
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography_2.0.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography_2.0.3.bb
deleted file mode 100644
index f5b1e0b..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography_2.0.3.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-inherit pypi setuptools
-require python-cryptography.inc
-
-SRC_URI += " \
-    file://run-ptest \
-"
-
-DEPENDS += " \
-    ${PYTHON_PN}-enum34 \
-"
-
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-enum34 \
-    ${PYTHON_PN}-ipaddress \
-"
-
-RDEPENDS_${PN}_class-target += " \
-    ${PYTHON_PN}-enum34 \
-    ${PYTHON_PN}-ipaddress \
-    ${PYTHON_PN}-contextlib \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography_2.1.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography_2.1.4.bb
new file mode 100644
index 0000000..9c2f884
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cryptography_2.1.4.bb
@@ -0,0 +1,22 @@
+inherit pypi setuptools
+require python-cryptography.inc
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
+DEPENDS += " \
+    ${PYTHON_PN}-enum34 \
+"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-enum34 \
+    ${PYTHON_PN}-ipaddress \
+"
+
+RDEPENDS_${PN}_class-target += " \
+    ${PYTHON_PN}-enum34 \
+    ${PYTHON_PN}-ipaddress \
+    ${PYTHON_PN}-contextlib \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython.inc
index 572cb96..5d3b9d5 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython.inc
@@ -5,17 +5,31 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
 PYPI_PACKAGE = "Cython"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[md5sum] = "b93750b34382b025d678bea819b7491b"
-SRC_URI[sha256sum] = "e6840a2ba2704f4ffb40e454c36f73aeb440a4005453ee8d7ff6a00d812ba176"
+SRC_URI[md5sum] = "0e0568d6bed4b09ad01afe0a38805305"
+SRC_URI[sha256sum] = "634e2f10fc8d026c633cffacb45cd8f4582149fa68e1428124e762dbc566e68a"
 
 inherit pypi
 
 RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-misc \
     ${PYTHON_PN}-netserver \
-    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-pkgutil \
+    ${PYTHON_PN}-pyparsing \
+    ${PYTHON_PN}-setuptools \
     ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-xml \
+"
+
+RDEPENDS_${PN}_class-nativesdk += "\
+    nativesdk-${PYTHON_PN}-misc \
+    nativesdk-${PYTHON_PN}-netserver \
+    nativesdk-${PYTHON_PN}-pkgutil \
+    nativesdk-${PYTHON_PN}-pyparsing \
+    nativesdk-${PYTHON_PN}-setuptools \
+    nativesdk-${PYTHON_PN}-shell \
+    nativesdk-${PYTHON_PN}-xml \
 "
 
 do_install_append() {
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython_0.27.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython_0.27.1.bb
deleted file mode 100644
index bdf9490..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython_0.27.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-inherit setuptools
-require python-cython.inc
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Cython/"
-UPSTREAM_CHECK_REGEX = "/Cython/(?P<pver>(\d+[\.\-_]*)+)"
-
-RDEPENDS_${PN} += "\
-    python-distribute \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython_0.28.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython_0.28.2.bb
new file mode 100644
index 0000000..d803a6e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-cython_0.28.2.bb
@@ -0,0 +1,10 @@
+inherit setuptools
+require python-cython.inc
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Cython/"
+UPSTREAM_CHECK_REGEX = "/Cython/(?P<pver>(\d+[\.\-_]*)+)"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-distribute \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc
index ca51059..333b5e2 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc
@@ -1,11 +1,11 @@
 SUMMARY = "Extensions to the standard Python datetime module"
 DESCRIPTION = "The dateutil module provides powerful extensions to the datetime module available in the Python standard library."
 HOMEPAGE = "https://dateutil.readthedocs.org"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=31f72d4cad3675fb091537b9b2f32de0"
+LICENSE = "BSD-3-Clause & Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3155c7bdc71f66e02678411d2abf996"
 
-SRC_URI[md5sum] = "db38f6b4511cefd76014745bb0cc45a4"
-SRC_URI[sha256sum] = "891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca"
+SRC_URI[md5sum] = "03a08c8bcf0a2b29f1cd21b9de4d12fb"
+SRC_URI[sha256sum] = "9d8074be4c993fbe4947878ce593052f71dac82932a677d49194d8ce9778002e"
 
 PYPI_PACKAGE = "python-dateutil"
 inherit pypi
@@ -14,7 +14,8 @@
 FILES_${PN}-zoneinfo = "${libdir}/${PYTHON_DIR}/site-packages/dateutil/zoneinfo"
 
 RDEPENDS_${PN}_class-target = "\
-    ${PYTHON_PN}-core \
     ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-numbers \
     ${PYTHON_PN}-six \
-    "
+    ${PYTHON_PN}-stringold \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil_2.6.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil_2.7.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil_2.6.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil_2.7.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.4.bb
deleted file mode 100644
index 271b559..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.4.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Python bindings for the DBus inter-process communication system"
-SECTION = "devel/python"
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
-DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5"
-SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
-S = "${WORKDIR}/dbus-python-${PV}"
-
-inherit distutils-base autotools pkgconfig
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
-PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
-
-export STAGING_LIBDIR
-export STAGING_INCDIR
-
-RDEPENDS_${PN} = "python-io python-logging python-stringold python-threading python-xml"
-
-FILES_${PN}-dev += "${libdir}/pkgconfig"
-
-do_install_append() {
-    # Remove files that clash with python3-dbus; their content is same
-    rm ${D}${includedir}/dbus-1.0/dbus/dbus-python.h ${D}${libdir}/pkgconfig/dbus-python.pc
-}
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.6.bb
new file mode 100644
index 0000000..0f18ccc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.6.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Python bindings for the DBus inter-process communication system"
+SECTION = "devel/python"
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+LICENSE = "MIT & AFL-2.1 | GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4 \
+		    file://dbus-gmain/COPYING;md5=05c3eacd50f69bb1d58afec460baad57 "
+DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
+"
+
+SRC_URI[md5sum] = "1ce1ddf2582060f8f971652ea54cc17e"
+SRC_URI[sha256sum] = "32f29c17172cdb9cb61c68b1f1a71dfe7351506fc830869029c47449bd04faeb"
+S = "${WORKDIR}/dbus-python-${PV}"
+
+inherit distutils-base autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
+PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
+
+export STAGING_LIBDIR
+export STAGING_INCDIR
+
+RDEPENDS_${PN} = "python-io python-logging python-stringold python-threading python-xml"
+
+FILES_${PN}-dev += "${libdir}/pkgconfig"
+
+do_install_append() {
+    # Remove files that clash with python3-dbus; their content is same
+    rm ${D}${includedir}/dbus-1.0/dbus/dbus-python.h ${D}${libdir}/pkgconfig/dbus-python.pc
+}
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch
index fdd00b6..c4d8178 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch
@@ -1,7 +1,8 @@
-From eebe0f66435c4d821b0f5f93f69efe17b4a384c2 Mon Sep 17 00:00:00 2001
+From c4436fd42f2936e5fb0f95434d06e45aa9959ca0 Mon Sep 17 00:00:00 2001
 From: Simon Busch <simon.busch@lge.com>
 Date: Wed, 9 Apr 2014 13:18:33 +0200
-Subject: [PATCH 1/2] Add functionality to add own objects to internal object
+Subject: [PATCH] Add functionality to add own objects to internal object
+
  list
 
 In some case the tests might want to create dynamically dbus objects which extended
@@ -9,17 +10,18 @@
 register those objects with the internal object manager of dbusmock.
 
 Signed-off-by: Simon Busch <simon.busch@lge.com>
+
 ---
- dbusmock/__init__.py   |    4 ++--
- dbusmock/mockobject.py |    8 ++++++++
+ dbusmock/__init__.py   | 4 ++--
+ dbusmock/mockobject.py | 8 ++++++++
  2 files changed, 10 insertions(+), 2 deletions(-)
 
 diff --git a/dbusmock/__init__.py b/dbusmock/__init__.py
-index f799cc7..6718c06 100644
+index 8a482ab..3d5d71a 100644
 --- a/dbusmock/__init__.py
 +++ b/dbusmock/__init__.py
 @@ -14,8 +14,8 @@ __license__ = 'LGPL 3+'
- __version__ = '0.10.1'
+ __version__ = '0.16.7'
  
  from dbusmock.mockobject import (DBusMockObject, MOCK_IFACE,
 -                                 OBJECT_MANAGER_IFACE, get_object, get_objects)
@@ -30,10 +32,10 @@
 -           'DBusTestCase', 'get_object', 'get_objects']
 +           'DBusTestCase', 'get_object', 'get_objects', 'add_object']
 diff --git a/dbusmock/mockobject.py b/dbusmock/mockobject.py
-index 97b79ce..a98e03d 100644
+index 586dbad..e4f130f 100644
 --- a/dbusmock/mockobject.py
 +++ b/dbusmock/mockobject.py
-@@ -682,6 +682,14 @@ dbus.service._method_lookup = _dbusmock_method_lookup
+@@ -688,6 +688,14 @@ dbus.service._method_lookup = _dbusmock_method_lookup
  # Helper API for templates
  #
  
@@ -48,6 +50,3 @@
  
  def get_objects():
      '''Return all existing object paths'''
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch
index 981694f..06ab1f0 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch
@@ -1,22 +1,23 @@
-From ff1dffd5673bcd2cbd9554ad62476d108dbc18af Mon Sep 17 00:00:00 2001
+From 03bd5cb77c54033857810bb17562859eefa41221 Mon Sep 17 00:00:00 2001
 From: Simon Busch <simon.busch@lge.com>
 Date: Wed, 9 Apr 2014 13:20:33 +0200
-Subject: [PATCH 2/2] Add possibility to import templates from packages
+Subject: [PATCH] Add possibility to import templates from packages
 
 Does not have any unit tests yet.
 
 Signed-off-by: Simon Busch <simon.busch@lge.com>
+
 ---
- dbusmock/mockobject.py |    3 +++
+ dbusmock/mockobject.py | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/dbusmock/mockobject.py b/dbusmock/mockobject.py
-index a98e03d..9530c2a 100644
+index e4f130f..389df70 100644
 --- a/dbusmock/mockobject.py
 +++ b/dbusmock/mockobject.py
-@@ -49,6 +49,9 @@ def load_module(name):
- 
-         return module
+@@ -46,6 +46,9 @@ def load_module(name):
+             exec(f.read(), mod.__dict__, mod.__dict__)
+         return mod
  
 +    if '.' in name:
 +        return importlib.import_module(name)
@@ -24,6 +25,3 @@
      return importlib.import_module('dbusmock.templates.' + name)
  
  
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock_0.16.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock_0.16.7.bb
index fb8c0aa..ec8c54a 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock_0.16.7.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dbusmock_0.16.7.bb
@@ -20,7 +20,6 @@
 
 RDEPENDS_${PN} += "\
     ${PYTHON_PN}-dbus \
-    ${PYTHON_PN}-importlib \
     ${PYTHON_PN}-pygobject \
     ${PYTHON_PN}-xml \
     "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator.inc
index 859f972..44edb8a 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator.inc
@@ -9,8 +9,8 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=893f896413826096ce5270c700a498fd"
 
-SRC_URI[md5sum] = "a0f7f4fe00ae2dde93494d90c192cf8c"
-SRC_URI[sha256sum] = "7cb64d38cb8002971710c8899fbdfb859a23a364b7c99dab19d1f719c2ba16b5"
+SRC_URI[md5sum] = "249e7299b9b4bced0c382343f84eb1c0"
+SRC_URI[sha256sum] = "c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c"
 
 inherit pypi
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator_4.1.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator_4.3.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator_4.1.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-decorator_4.3.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django-south.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django-south.inc
index ce904b6..e4f03b9 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django-south.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django-south.inc
@@ -10,7 +10,7 @@
 PYPI_PACKAGE = "South"
 inherit pypi
 
-BBCLASSEXTEND = "nativesdk"
+BBCLASSEXTEND = "native nativesdk"
 
 RDEPENDS_${PN} += "\
     ${PYTHON_PN}-django \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc
index 58fd70a..4ef2d7f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc
@@ -3,22 +3,30 @@
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=f09eb47206614a4954c51db8a94840fa"
 
-SRC_URI[md5sum] = "8cef0d42aabacbc414ec4fbbb6056f3c"
-SRC_URI[sha256sum] = "1836878162dfdf865492bacfdff0321e4ee8f1e7d51d93192546000b54982b29"
+SRC_URI[md5sum] = "f306015e16a8d5024dbac923ac34fffb"
+SRC_URI[sha256sum] = "22383567385a9c406d8a5ce080a2694c82c6b733e157922197e8b393bb3aacd9"
 
 PYPI_PACKAGE = "Django"
 inherit pypi
 
 FILES_${PN} += "${datadir}/django"
 
-BBCLASSEXTEND = "nativesdk"
+BBCLASSEXTEND = "native nativesdk"
 
 RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-compression \
+    ${PYTHON_PN}-ctypes \
     ${PYTHON_PN}-datetime \
-    ${PYTHON_PN}-importlib \
+    ${PYTHON_PN}-email \
+    ${PYTHON_PN}-html \
+    ${PYTHON_PN}-json \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-multiprocessing \
+    ${PYTHON_PN}-netserver \
     ${PYTHON_PN}-numbers \
-    ${PYTHON_PN}-pip \
     ${PYTHON_PN}-pkgutil \
-    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-pytz \
     ${PYTHON_PN}-threading \
-    "
+    ${PYTHON_PN}-unixadmin \
+    ${PYTHON_PN}-xml \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django_1.11.10.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django_1.11.10.bb
new file mode 100644
index 0000000..d2347cc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django_1.11.10.bb
@@ -0,0 +1,8 @@
+require python-django.inc
+inherit setuptools
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-argparse \
+    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-zlib \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django_1.11.5.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django_1.11.5.bb
deleted file mode 100644
index ccd7714..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-django_1.11.5.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require python-django.inc
-inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dominate.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dominate.inc
new file mode 100644
index 0000000..ecf74a0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dominate.inc
@@ -0,0 +1,11 @@
+SUMMARY = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API."
+LICENSE = "LGPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b52f2d57d10c4f7ee67a7eb9615d5d24"
+
+SRC_URI[md5sum] = "45bd97e6f7888aac24ae86013c57638e"
+SRC_URI[sha256sum] = "4b8ce6f33633c9dd9175b228d21c00c801b6bd0327747cd5e17fc2da934c3a69"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-numbers \
+    ${PYTHON_PN}-threading \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dominate_2.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dominate_2.3.1.bb
index 13ebf92..c19445e 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dominate_2.3.1.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-dominate_2.3.1.bb
@@ -1,13 +1,2 @@
-SUMMARY = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API."
-LICENSE = "LGPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b52f2d57d10c4f7ee67a7eb9615d5d24"
-
-SRC_URI[md5sum] = "45bd97e6f7888aac24ae86013c57638e"
-SRC_URI[sha256sum] = "4b8ce6f33633c9dd9175b228d21c00c801b6bd0327747cd5e17fc2da934c3a69"
-
 inherit pypi setuptools
-
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-numbers \
-    ${PYTHON_PN}-threading \
-    "
+require python-dominate.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-editor.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-editor.inc
new file mode 100644
index 0000000..30650bd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-editor.inc
@@ -0,0 +1,9 @@
+DESCRIPTION = "Programmatically open and editor, capture the result"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+SRC_URI[md5sum] = "0aca5f2ef176ce68e98a5b7e31372835"
+SRC_URI[sha256sum] = "a3c066acee22a1c94f63938341d4fb374e3fdd69366ed6603d7b24bed1efc565"
+
+PYPI_PACKAGE = "python-editor"
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-editor_1.0.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-editor_1.0.3.bb
new file mode 100644
index 0000000..f7a9a8c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-editor_1.0.3.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-editor.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-evdev.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-evdev.inc
new file mode 100644
index 0000000..5a3884a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-evdev.inc
@@ -0,0 +1,21 @@
+SUMMARY = "Python evdev lib"
+HOMEPAGE = "https://github.com/gvalkov/python-evdev"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=18debddbb3f52c661a129724a883a8e2"
+
+SRC_URI[md5sum] = "c7e855ae9f97f869a59e75b29f05ce74"
+SRC_URI[sha256sum] = "57edafc469a414f58b51af1bfb9ee2babb9f626dd2df530d71c1176871850aa1"
+
+do_compile_prepend() {
+    rm -rf ${S}/evdev/ecodes.c
+}
+
+DISTUTILS_BUILD_ARGS = "build_ecodes --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-ctypes \
+    ${PYTHON_PN}-fcntl \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-stringold \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-evdev_0.7.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-evdev_0.7.0.bb
index 0875da4..6354136 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-evdev_0.7.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-evdev_0.7.0.bb
@@ -1,17 +1,2 @@
-SUMMARY = "Python evdev lib"
-HOMEPAGE = "https://github.com/gvalkov/python-evdev"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=18debddbb3f52c661a129724a883a8e2"
-
-SRC_URI[md5sum] = "c7e855ae9f97f869a59e75b29f05ce74"
-SRC_URI[sha256sum] = "57edafc469a414f58b51af1bfb9ee2babb9f626dd2df530d71c1176871850aa1"
-
 inherit pypi setuptools
-
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-ctypes \
-    ${PYTHON_PN}-fcntl \
-    ${PYTHON_PN}-io \
-    ${PYTHON_PN}-shell \
-    ${PYTHON_PN}-stringold \
-    "
+require python-evdev.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-babel.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-babel.inc
new file mode 100644
index 0000000..b60ee17
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-babel.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "i18n and l10n support for Flask based on babel and pytz"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=51917f3e8e858f5ae295a7d0e2eb3cc9"
+
+SRC_URI[md5sum] = "07803453743f139309021572a799c6b3"
+SRC_URI[sha256sum] = "c0d75710bd4b0fe866f9f2347de6e19208712f9cec006436b4c1c15d4cb0c939"
+
+PYPI_PACKAGE = "Flask-Babel"
+
+inherit pypi
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-speaklater \
+    ${PYTHON_PN}-babel \
+    ${PYTHON_PN}-flask \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-babel_0.11.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-babel_0.11.2.bb
new file mode 100644
index 0000000..38e78c7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-babel_0.11.2.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-babel.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-bootstrap.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-bootstrap.inc
new file mode 100644
index 0000000..0723b97
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-bootstrap.inc
@@ -0,0 +1,14 @@
+DESCRIPTION = "An extension that includes Bootstrap in your project, without any boilerplate code."
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=a03749709f06118a17349deb5a210619"
+
+SRC_URI[md5sum] = "e40d50f5c5b6438c1c6200a6f2871f81"
+SRC_URI[sha256sum] = "cb08ed940183f6343a64e465e83b3a3f13c53e1baabb8d72b5da4545ef123ac8"
+
+PYPI_PACKAGE = "Flask-Bootstrap"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-dominate \
+    ${PYTHON_PN}-flask \
+    ${PYTHON_PN}-visitor \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-bootstrap_3.3.7.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-bootstrap_3.3.7.1.bb
index 2b2a6f9..eeaade9 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-bootstrap_3.3.7.1.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-bootstrap_3.3.7.1.bb
@@ -1,16 +1,2 @@
-DESCRIPTION = "An extension that includes Bootstrap in your project, without any boilerplate code."
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=a03749709f06118a17349deb5a210619"
-
-SRC_URI[md5sum] = "e40d50f5c5b6438c1c6200a6f2871f81"
-SRC_URI[sha256sum] = "cb08ed940183f6343a64e465e83b3a3f13c53e1baabb8d72b5da4545ef123ac8"
-
-PYPI_PACKAGE = "Flask-Bootstrap"
-
 inherit pypi setuptools
-
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-dominate \
-    ${PYTHON_PN}-flask \
-    ${PYTHON_PN}-visitor \
-    "
+require python-flask-bootstrap.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login.inc
index 7dddba0..59eb64f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login.inc
@@ -6,8 +6,8 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=8aa87a1cd9fa41d969ad32cfdac2c596"
 
-SRC_URI[md5sum] = "e050efaa2c4dbc2d97f480a70f4d44aa"
-SRC_URI[sha256sum] = "d25e356b14a59f52da0ab30c31c2ad285fa23a840f0f6971df7ed247c77082a7"
+SRC_URI[md5sum] = "25b34c74bd509792f291c16e184225df"
+SRC_URI[sha256sum] = "c815c1ac7b3e35e2081685e389a665f2c74d7e077cb93cecabaea352da4752ec"
 
 PYPI_PACKAGE = "Flask-Login"
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login_0.4.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login_0.4.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login_0.4.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-login_0.4.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-mail.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-mail.inc
new file mode 100644
index 0000000..bb08703
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-mail.inc
@@ -0,0 +1,12 @@
+SUMMARY = "Flask extension for sending email"
+DESCRIPTION = "A Flask extension for sending email"
+HOMEPAGE = " https://github.com/rduplain/flask-email"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5b16dfa6d3f275ace5985bb92949f770"
+
+SRC_URI[md5sum] = "04b35a42a44ec7aa724ec8ce55e2e08e"
+SRC_URI[sha256sum] = "22e5eb9a940bf407bcf30410ecc3708f3c56cc44b29c34e1726fe85006935f41"
+
+PYPI_PACKAGE = "Flask-Mail"
+
+RDEPENDS_${PN} = "${PYTHON_PN}-flask"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-mail_0.9.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-mail_0.9.1.bb
new file mode 100644
index 0000000..8324da8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-mail_0.9.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-mail.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-migrate.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-migrate.inc
new file mode 100644
index 0000000..7af4fe1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-migrate.inc
@@ -0,0 +1,14 @@
+DESCRIPTION = "SQLAlchemy database migrations for Flask applications using Alembic"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b69377f79f3f48c661701236d5a6a85"
+
+SRC_URI[md5sum] = "def4106c80897b7fad2afb3bc05360e4"
+SRC_URI[sha256sum] = "b709ca8642559c3c5a81a33ab10839fa052177accd5ba821047a99db635255ed"
+
+PYPI_PACKAGE = "Flask-Migrate"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-flask-sqlalchemy \
+    ${PYTHON_PN}-alembic \
+    ${PYTHON_PN}-flask \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-migrate_2.1.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-migrate_2.1.1.bb
new file mode 100644
index 0000000..ece516f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-migrate_2.1.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-migrate.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-nav.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-nav.inc
new file mode 100644
index 0000000..932ccdf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-nav.inc
@@ -0,0 +1,13 @@
+DESCRIPTION = "Easily create navigation for Flask applications."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=2729ee82259d601d90d28b0574d12416"
+
+SRC_URI[md5sum] = "4d51cfd06d58f8d0fe85775a6696c0e5"
+SRC_URI[sha256sum] = "44e40b755380a1e68ab521a2f9174de259a2c94ddcdaabf36b3aca2e110a33f4"
+
+PYPI_PACKAGE = "flask-nav"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-blinker \
+    ${PYTHON_PN}-flask \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-nav_0.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-nav_0.6.bb
new file mode 100644
index 0000000..30b5b3b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-nav_0.6.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-nav.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-pymongo.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-pymongo.inc
index e11283e..fb2d6ed 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-pymongo.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-pymongo.inc
@@ -3,7 +3,7 @@
 HOMEPAGE = "https://github.com/mitsuhiko/flask/"
 SECTION = "devel/python"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://flask_pymongo/wrappers.py;startline=1;endline=24;md5=424c4e1047d28e01b4e4634a069c019d"
+LIC_FILES_CHKSUM = "file://flask_pymongo/wrappers.py;beginline=1;endline=24;md5=424c4e1047d28e01b4e4634a069c019d"
 
 SRC_URI[md5sum] = "d7a1b717f27154e1f3a355f8ec2467d6"
 SRC_URI[sha256sum] = "2baaa2ba5107d72b3a8bd4b5c0c8881316e35340ad1ae979cc13f1f3c8843b3d"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-restful.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-restful.inc
new file mode 100644
index 0000000..0485f85
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-restful.inc
@@ -0,0 +1,16 @@
+SUMMARY = "Simple framework for creating REST APIs"
+DESCRIPTION = "\
+Flask-RESTful is an extension for Flask that adds support for quickly building \
+REST APIs"
+HOMEPAGE = "https://github.com/flask-restful/flask-restful"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=685bb55ed99a366bb431995f5eef2783"
+
+SRC_URI[md5sum] = "8243ca101185b130d8fa529cbdbdbddd"
+SRC_URI[sha256sum] = "5795519501347e108c436b693ff9a4d7b373a3ac9069627d64e4001c05dd3407"
+
+inherit pypi
+
+PYPI_PACKAGE = "Flask-RESTful"
+
+RDEPENDS_${PN} = "${PYTHON_PN}-flask"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-restful_0.3.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-restful_0.3.6.bb
new file mode 100644
index 0000000..1968d1d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-restful_0.3.6.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-flask-restful.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-script.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-script.inc
new file mode 100644
index 0000000..fca777b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-script.inc
@@ -0,0 +1,12 @@
+DESCRIPTION = "Scripting support for flask"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e686048adb69341fc8a08caeda528b41"
+
+SRC_URI[md5sum] = "3fbd91fe13cebedfb2431331f6eabb68"
+SRC_URI[sha256sum] = "6425963d91054cfcc185807141c7314a9c5ad46325911bd24dcb489bd0161c65"
+
+PYPI_PACKAGE = "Flask-Script"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-flask \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-script_2.0.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-script_2.0.6.bb
new file mode 100644
index 0000000..b7d55af
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-script_2.0.6.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-script.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy.inc
new file mode 100644
index 0000000..e0efbc6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy.inc
@@ -0,0 +1,10 @@
+DESCRIPTION = "Adds SQLAlchemy support to your Flask application."
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5ed1b8cc741515a835a7f6bf2f62ef4a"
+
+SRC_URI[md5sum] = "373ce61dfd03b593ad2eaba68c9fee35"
+SRC_URI[sha256sum] = "5971b9852b5888655f11db634e87725a9031e170f37c0ce7851cf83497f56e53"
+
+PYPI_PACKAGE = "Flask-SQLAlchemy"
+
+RDEPENDS_${PN} = "${PYTHON_PN}-sqlalchemy ${PYTHON_PN}-flask"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy_2.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy_2.3.0.bb
deleted file mode 100644
index 8799767..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy_2.3.0.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-DESCRIPTION = "Adds SQLAlchemy support to your Flask application."
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5ed1b8cc741515a835a7f6bf2f62ef4a"
-
-SRC_URI[md5sum] = "c86449f44e90e996142872ac4b97f7ee"
-SRC_URI[sha256sum] = "da19ff62e31f82825b5467811c76e2a1c60bba927e175fe091a6f739063dd829"
-
-PYPI_PACKAGE = "Flask-SQLAlchemy"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} = "${PYTHON_PN}-sqlalchemy ${PYTHON_PN}-flask"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy_2.3.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy_2.3.2.bb
new file mode 100644
index 0000000..3dc355c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-sqlalchemy_2.3.2.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-sqlalchemy.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-uploads.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-uploads.inc
new file mode 100644
index 0000000..cd7ac1a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-uploads.inc
@@ -0,0 +1,12 @@
+DESCRIPTION = "Flexible and efficient upload handling for Flask"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=b712ac634b39469660c9bdfb8d03421c"
+
+SRC_URI[md5sum] = "e5eee34aa92b64a4d22847672b3858a1"
+SRC_URI[sha256sum] = "53ecbd6033667d50ae02b63adebbaa33c7fc56c09e5293025810cf9d841ecb02"
+
+PYPI_PACKAGE = "Flask-Uploads"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-flask \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-uploads_0.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-uploads_0.2.1.bb
new file mode 100644
index 0000000..d39b07f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-uploads_0.2.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-uploads.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-user.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-user.inc
new file mode 100644
index 0000000..c2b7182
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-user.inc
@@ -0,0 +1,17 @@
+SUMMARY = "Customizable user account management for Flask"
+DESCRIPTION = "Customizable User Account Management for Flask; Register \
+Confirm email, Login, Change username, Change password, Forgot Password \
+and more."
+HOMEPAGE = " https://github.com/lingthio/Flask-User"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=97de97cd9d6e23c88129d884588ce71a"
+
+SRC_URI[md5sum] = "f7965e66ca139c8436896da07e66c21f"
+SRC_URI[sha256sum] = "601abcc0343dfbae0c56273d98362d5cdc266ac84d20b3f65a212e4a2c83b302"
+
+PYPI_PACKAGE = "Flask-User"
+
+RDEPENDS_${PN} = "${PYTHON_PN}-flask \
+    ${PYTHON_PN}-flask-login \
+    ${PYTHON_PN}-flask-mail \
+    ${PYTHON_PN}-babel"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-user_0.6.19.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-user_0.6.19.bb
new file mode 100644
index 0000000..654d377
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-user_0.6.19.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-user.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf.inc
new file mode 100644
index 0000000..3c90656
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf.inc
@@ -0,0 +1,15 @@
+DESCRIPTION = "Simple integration of Flask and WTForms."
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3ca6bb31670492f791e6a9f2fb9f8a80"
+
+SRC_URI[md5sum] = "586f50f233926cade42e3d744aca3e8f"
+SRC_URI[sha256sum] = "5d14d55cfd35f613d99ee7cba0fc3fbbe63ba02f544d349158c14ca15561cc36"
+
+PYPI_PACKAGE = "Flask-WTF"
+
+RDEPENDS_${PN} = "\
+    ${PYTHON_PN}-flask \
+    ${PYTHON_PN}-itsdangerous \
+    ${PYTHON_PN}-json \
+    ${PYTHON_PN}-wtforms \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf/import-simplejson-as-json.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf/import-simplejson-as-json.patch
deleted file mode 100644
index 678f706..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf/import-simplejson-as-json.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Subject: [PATCH] import simplejson as json
-
-At runtime python-Flask-WTF tries to import json, but the module is not 
-available, import simplejson as json solve the issue.
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- flask_wtf/recaptcha/validators.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/flask_wtf/recaptcha/validators.py b/flask_wtf/recaptcha/validators.py
-index bcff23d..4a244bb 100644
---- a/flask_wtf/recaptcha/validators.py
-+++ b/flask_wtf/recaptcha/validators.py
-@@ -8,7 +8,7 @@ from flask import request, current_app
- from wtforms import ValidationError
- from werkzeug import url_encode
- from .._compat import to_bytes, to_unicode
--import json
-+import simplejson as json
- 
- RECAPTCHA_VERIFY_SERVER = 'https://www.google.com/recaptcha/api/siteverify'
- RECAPTCHA_ERROR_CODES = {
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf_0.12.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf_0.12.bb
deleted file mode 100644
index 79afaf6..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf_0.12.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "Simple integration of Flask and WTForms."
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=507e8635f25a06dc4f041a3a1b3359b3"
-
-SRC_URI[md5sum] = "c53a74e8ba481bf53405fd5efdf0339e"
-SRC_URI[sha256sum] = "bd99316c97ed1d1cb90b8f0c242c86420a891a6a2058f20717e424bf5b0bb80e"
-
-SRC_URI += " file://import-simplejson-as-json.patch"
-
-PYPI_PACKAGE = "Flask-WTF"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} = "\
-    python-wtforms \
-    python-simplejson \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf_0.14.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf_0.14.2.bb
new file mode 100644
index 0000000..dbf091b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-wtf_0.14.2.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-wtf.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic.inc
new file mode 100644
index 0000000..a1fe14e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "XStatic support for flask"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=659968f6ebd4b70b6c3190d20b4a924c"
+
+SRC_URI[md5sum] = "2f56023e1444c8bd1fec41afe93de743"
+SRC_URI[sha256sum] = "226ea8e97065a9488b59bfe5c94af4c6e2ea70a25052e301fb231a1381490133"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/python-flask-xstatic:"
+SRC_URI += "file://remove-pip-requires.patch"
+
+PYPI_PACKAGE = "Flask-XStatic"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-flask \
+    ${PYTHON_PN}-xstatic \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic/remove-pip-requires.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic/remove-pip-requires.patch
new file mode 100644
index 0000000..a2d620a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic/remove-pip-requires.patch
@@ -0,0 +1,7 @@
+--- Flask-XStatic-0.0.1/setup.py.orig	2015-01-30 08:01:56.000000000 -0800
++++ Flask-XStatic-0.0.1/setup.py	2017-04-17 21:40:32.570181626 -0700
+@@ -1,4 +1,3 @@
+-from pip.req import parse_requirements
+ import setuptools
+ 
+ with open('README.rst') as f:
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic_0.0.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic_0.0.1.bb
new file mode 100644
index 0000000..dff14a8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask-xstatic_0.0.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-flask-xstatic.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask.inc
index 76b5fba..ecf5619 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-flask.inc
@@ -13,4 +13,4 @@
 
 PYPI_PACKAGE = "Flask"
 
-RDEPENDS_${PN} = "${PYTHON_PN}-werkzeug ${PYTHON_PN}-jinja2 ${PYTHON_PN}-itsdangerous ${PYTHON_PN}-click"
+RDEPENDS_${PN} = "${PYTHON_PN}-werkzeug ${PYTHON_PN}-werkzeug-tests ${PYTHON_PN}-jinja2 ${PYTHON_PN}-itsdangerous ${PYTHON_PN}-click"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-future_0.16.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-future_0.16.0.bb
new file mode 100644
index 0000000..46f7fe5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-future_0.16.0.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Clean single-source support for Python 3 and 2"
+HOMEPAGE = "https://python-future.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3f457538b297bd0ef86564b8ac216ad7"
+
+SRC_URI[md5sum] = "3e8e88a2bda48d54b1da7634d04760d7"
+SRC_URI[sha256sum] = "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb"
+
+PYPI_PACKAGE_HASH = "99abde815842bc6e97d5a7806ad51236630da14ca2f3b1fce94c0bb94d3d"
+
+inherit pypi setuptools
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent.inc
index 8889cfb..13513f2 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent.inc
@@ -11,7 +11,6 @@
 RDEPENDS_${PN} = "${PYTHON_PN}-greenlet \
 		  ${PYTHON_PN}-mime \
 		  ${PYTHON_PN}-pprint \
-		  ${PYTHON_PN}-re \
 		 "
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/python-gevent:"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent_1.2.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent_1.2.2.bb
index f357c95..f13bfd7 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent_1.2.2.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-gevent_1.2.2.bb
@@ -1,3 +1,4 @@
 require python-gevent.inc
 inherit setuptools
 
+RDEPENDS_${PN} += "${PYTHON_PN}-re"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet.inc
index 35820db..7a42240 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet.inc
@@ -3,7 +3,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=03143d7a1a9f5d8a0fee825f24ca9c36 \
                     file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a"
 
-SRC_URI[md5sum] = "e8637647d58a26c4a1f51ca393e53c00"
-SRC_URI[sha256sum] = "e4c99c6010a5d153d481fdaf63b8a0782825c0721506d880403a3b9b82ae347e"
+SRC_URI[md5sum] = "6e0b9dd5385f81d478451ec8ed1d62b3"
+SRC_URI[sha256sum] = "0fef83d43bf87a5196c91e73cb9772f945a4caaff91242766c5916d1dd1381e4"
 
 inherit pypi
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet_0.4.12.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet_0.4.13.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet_0.4.12.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-greenlet_0.4.13.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio-tools_1.6.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio-tools_1.6.3.bb
deleted file mode 100644
index 0fb136b..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio-tools_1.6.3.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "Google gRPC tools"
-HOMEPAGE = "http://www.grpc.io/"
-SECTION = "devel/python"
-
-DEPENDS = "python-grpcio"
-RDEPENDS_${PN} = "python-grpcio"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
-
-inherit pypi setuptools
-
-SRC_URI[md5sum] = "835f19142e26cb7ad68cec3a083ecda2"
-SRC_URI[sha256sum] = "57b3110ced50a18f1b2bf7da58ed011f57278b48084ed8013c67a34d42a5ca37"
-
-# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools)
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio-tools_1.8.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio-tools_1.8.4.bb
new file mode 100644
index 0000000..45e0cc1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio-tools_1.8.4.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Google gRPC tools"
+HOMEPAGE = "http://www.grpc.io/"
+SECTION = "devel/python"
+
+DEPENDS = "python-grpcio"
+RDEPENDS_${PN} = "python-grpcio"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
+
+inherit pypi setuptools
+
+SRC_URI[md5sum] = "e04e65afe60410cf178ff2698f052a7c"
+SRC_URI[sha256sum] = "edc84c09039d3a01012ccd97450abd06ee6b980710f6d9f191b50deb6774a75c"
+
+# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools)
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
index 3abbc6d..0c1d964 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch
@@ -18,19 +18,16 @@
  setup.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/setup.py b/setup.py
-index cb85273..f79878d 100644
---- a/setup.py
-+++ b/setup.py
-@@ -116,7 +116,7 @@ if EXTRA_ENV_COMPILE_ARGS is None:
-   elif 'win32' in sys.platform:
-     EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC'
+Index: grpcio-1.8.4/setup.py
+===================================================================
+--- grpcio-1.8.4.orig/setup.py
++++ grpcio-1.8.4/setup.py
+@@ -115,7 +115,7 @@ if EXTRA_ENV_COMPILE_ARGS is None:
+     else:
+       EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64'
    elif "linux" in sys.platform:
 -    EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions'
 +    EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
    elif "darwin" in sys.platform:
-     EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv'
+     EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
  
--- 
-2.13.4
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio_1.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio_1.6.0.bb
deleted file mode 100644
index 7155f42..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio_1.6.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION = "Google gRPC"
-HOMEPAGE = "http://www.grpc.io/"
-SECTION = "devel/python"
-
-DEPENDS = "python-protobuf"
-
-SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \
-           "
-RDEPENDS_${PN} = "python-enum34 \
-                  python-futures \
-                  python-protobuf \
-                  python-setuptools \
-                  python-six \
-"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
-
-inherit pypi setuptools
-
-SRC_URI[md5sum] = "c91b8c105ff4163b41790f3b63db92e1"
-SRC_URI[sha256sum] = "6cd793d515ec53587a8968f2a53647f1449763ad06be0d287e3c1e47418e1e50"
-
-# For usage in other recipes when compiling protobuf files (e.g. by grpcio-tools)
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio_1.8.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio_1.8.4.bb
new file mode 100644
index 0000000..bec9d84
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-grpcio_1.8.4.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Google gRPC"
+HOMEPAGE = "http://www.grpc.io/"
+SECTION = "devel/python"
+
+DEPENDS = "python-protobuf"
+
+SRC_URI_append_class-target = " file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch "
+
+RDEPENDS_${PN} = "python-enum34 \
+                  python-futures \
+                  python-protobuf \
+                  python-setuptools \
+                  python-six \
+"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
+
+inherit pypi setuptools
+
+SRC_URI[md5sum] = "7860f7c61de3890323670b7b1ff63e56"
+SRC_URI[sha256sum] = "88d87aab9c7889b3ab29dd74aac1a5493ed78b9bf5afba1c069c9dd5531f951d"
+
+# For usage in other recipes when compiling protobuf files (e.g. by grpcio-tools)
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib.inc
index 9c59e0d..0eb8bf3 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib.inc
@@ -2,13 +2,14 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1ba5ada9e6fead1fdc32f43c9f10ba7c"
 
-SRC_URI[md5sum] = "8578e4e3a341436cb9743a9e4a299239"
-SRC_URI[sha256sum] = "ee747c0ffd3028d2722061936b5c65ee4fe13c8e4613519b4447123fc4546298"
+SRC_URI[md5sum] = "942a0688d6bdf20d087c9805c40182ad"
+SRC_URI[sha256sum] = "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736"
 
 inherit pypi
 
 RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-lxml \
     ${PYTHON_PN}-six \
     ${PYTHON_PN}-webencodings \
     ${PYTHON_PN}-xml \
-    "
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib_0.999999999.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib_1.0.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib_0.999999999.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib_1.0.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-humanize.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-humanize.inc
index d9fac09..17a3449 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-humanize.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-humanize.inc
@@ -7,4 +7,8 @@
 SRC_URI[md5sum] = "e8473d9dc1b220911cac2edd53b1d973"
 SRC_URI[sha256sum] = "a43f57115831ac7c70de098e6ac46ac13be00d69abbf60bdcac251344785bb19"
 
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-datetime \
+"
+
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-incremental.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-incremental.inc
index 3675458..b63fac9 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-incremental.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-incremental.inc
@@ -12,3 +12,9 @@
     ${PYTHON_PN}-twisted \
     ${PYTHON_PN}-click \
 "
+
+# -native is needed to build python[3]-twisted, however, we need to take steps to
+# prevent a circular dependency. The build apparently does not use the part of
+# python-incremental which uses python-twisted, so this hack is OK.
+RDEPENDS_${PYTHON_PN}-incremental-native_remove = "${PYTHON_PN}-twisted-native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ipaddress_1.0.18.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ipaddress_1.0.18.bb
deleted file mode 100644
index cc4f589..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ipaddress_1.0.18.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-SUMMARY = "Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2."
-HOMEPAGE = "https://github.com/phihag/ipaddress"
-LICENSE = "Python-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=7f538584cc3407bf76042def7168548a"
-
-DEPENDS += "python-pip"
-
-SRC_URI[md5sum] = "310c2dfd64eb6f0df44aa8c59f2334a7"
-SRC_URI[sha256sum] = "5d8534c8e185f2d8a1fda1ef73f2c8f4b23264e8e30063feeb9511d492a413e1"
-
-inherit pypi setuptools
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ipaddress_1.0.19.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ipaddress_1.0.19.bb
new file mode 100644
index 0000000..9c50b46
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ipaddress_1.0.19.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2."
+HOMEPAGE = "https://github.com/phihag/ipaddress"
+LICENSE = "Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7f538584cc3407bf76042def7168548a"
+
+DEPENDS += "python-pip"
+
+SRC_URI[md5sum] = "d0687efaf93a32476d81e90ba0609c57"
+SRC_URI[sha256sum] = "200d8686011d470b5e4de207d803445deee427455cd0cb7c982b68cf82524f81"
+
+inherit pypi setuptools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-iso8601.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-iso8601.inc
index 45da75f..61e9abb 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-iso8601.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-iso8601.inc
@@ -6,4 +6,8 @@
 SRC_URI[md5sum] = "4de940f691c5ea759fb254384c8ddcf6"
 SRC_URI[sha256sum] = "49c4b20e1f38aa5cf109ddcd39647ac419f928512c869dc01d5c7098eddede82"
 
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-datetime \
+"
+
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort.inc
index 9884c44..6d13e5f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort.inc
@@ -4,7 +4,12 @@
 SECTION = "devel/python"
 LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
 
-SRC_URI[md5sum] = "34915a2ce60e6fe3dbcbf5982deef9b4"
-SRC_URI[sha256sum] = "79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983"
+SRC_URI[md5sum] = "fb554e9c8f9aa76e333a03d470a5cf52"
+SRC_URI[sha256sum] = "b9c40e9750f3d77e6e4d441d8b0266cf555e7cdabdcff33c4fd06366ca761ef8"
 
 inherit pypi
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-shell \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort_4.2.15.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort_4.3.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort_4.2.15.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-isort_4.3.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous.inc
index 73951fa..84f9e77 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous.inc
@@ -7,3 +7,8 @@
 SRC_URI[sha256sum] = "cbb3fcf8d3e33df861709ecaf89d9e6629cff0a217bc2848f1b41cd30d360519"
 
 CLEANBROKEN = "1"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-simplejson \
+    ${PYTHON_PN}-netclient \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous_0.24.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous_0.24.bb
index 0e156be..8c99cb4 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous_0.24.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-itsdangerous_0.24.bb
@@ -1,2 +1,6 @@
 inherit pypi setuptools
 require python-itsdangerous.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-zlib \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-javaobj-py3.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-javaobj-py3.inc
new file mode 100644
index 0000000..a0e802c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-javaobj-py3.inc
@@ -0,0 +1,15 @@
+SUMMARY = "Module for serializing and de-serializing Java objects."
+DESCRIPTION = "python-javaobj is a python library that provides functions\
+ for reading and writing (writing is WIP currently) Java objects serialized\
+ or will be deserialized by ObjectOutputStream. This form of object\
+ representation is a standard data interchange format in Java world."
+HOMEPAGE = "https://github.com/tcalmant/python-javaobj"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://javaobj.py;beginline=21;endline=33;md5=8b504419ce78f8133b21b4d4a89ef7e9"
+
+SRC_URI[md5sum] = "f669bb8099380e3dd84db3d542aa5b68"
+SRC_URI[sha256sum] = "b8b0d310fd97e1c7914d7911ee9d3f4b3d84d2a674aa95a4b0da3d8f155fc1bb"
+
+inherit pypi
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-javaobj-py3_0.2.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-javaobj-py3_0.2.4.bb
new file mode 100644
index 0000000..ed34740
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-javaobj-py3_0.2.4.bb
@@ -0,0 +1,2 @@
+require python-javaobj-py3.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2.inc
index 35cbb0b..0c0bf0d 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2.inc
@@ -4,12 +4,12 @@
 
 PYPI_PACKAGE = "Jinja2"
 
-SRC_URI[md5sum] = "6411537324b4dba0956aaa8109f3c77b"
-SRC_URI[sha256sum] = "ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff"
+SRC_URI[md5sum] = "61ef1117f945486472850819b8d1eb3d"
+SRC_URI[sha256sum] = "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4"
 
 RDEPENDS_${PN} += "${PYTHON_PN}-io ${PYTHON_PN}-pickle ${PYTHON_PN}-crypt \
-    ${PYTHON_PN}-math ${PYTHON_PN}-netclient ${PYTHON_PN}-re ${PYTHON_PN}-textutils \
-    ${PYTHON_PN}-lang ${PYTHON_PN}-pprint ${PYTHON_PN}-shell ${PYTHON_PN}-markupsafe \
+    ${PYTHON_PN}-math ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-pprint ${PYTHON_PN}-shell ${PYTHON_PN}-markupsafe \
     ${PYTHON_PN}-json ${PYTHON_PN}-threading ${PYTHON_PN}-numbers"
 
 CLEANBROKEN = "1"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2_2.10.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2_2.10.bb
new file mode 100644
index 0000000..5233cf4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2_2.10.bb
@@ -0,0 +1,8 @@
+inherit pypi setuptools
+require python-jinja2.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-lang \
+    ${PYTHON_PN}-re \
+    ${PYTHON_PN}-textutils \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2_2.9.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2_2.9.6.bb
deleted file mode 100644
index ec8e7ed..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jinja2_2.9.6.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit pypi setuptools
-require python-jinja2.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch.inc
new file mode 100644
index 0000000..409c09a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch.inc
@@ -0,0 +1,12 @@
+SUMMARY  = "Appling JSON patches in Python 2.6+ and 3.x"
+HOMEPAGE = "https://github.com/stefankoegl/python-json-patch"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=32b15c843b7a329130f4e266a281ebb3"
+
+inherit pypi
+
+SRC_URI[md5sum] = "83c4c9faccb4a2ff8c1db80cbddc590d"
+SRC_URI[sha256sum] = "49f29cab70e9068db3b1dc6b656cbe2ee4edf7dfe9bf5a0055f17a4b6804a4b9"
+
+RDEPENDS_${PN} += "${PYTHON_PN}-json ${PYTHON_PN}-jsonpointer ${PYTHON_PN}-netclient ${PYTHON_PN}-stringold"
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch_1.16.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch_1.16.bb
deleted file mode 100644
index bbc61a4..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch_1.16.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-SUMMARY  = "Appling JSON patches in Python 2.6+ and 3.x"
-HOMEPAGE = "https://github.com/stefankoegl/python-json-patch"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=32b15c843b7a329130f4e266a281ebb3"
-
-inherit pypi setuptools
-
-SRC_URI[md5sum] = "8ef1ceb00dcf992c9e43611f698f9279"
-SRC_URI[sha256sum] = "f025c28a08ce747429ee746bb21796c3b6417ec82288f8fe6514db7398f2af8a"
-
-RDEPENDS_${PN} += "${PYTHON_PN}-json ${PYTHON_PN}-jsonpointer ${PYTHON_PN}-netclient ${PYTHON_PN}-re ${PYTHON_PN}-stringold"
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch_1.23.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch_1.23.bb
new file mode 100644
index 0000000..90cd318
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpatch_1.23.bb
@@ -0,0 +1,4 @@
+inherit setuptools
+require python-jsonpatch.inc
+
+RDEPENDS_${PN} += "${PYTHON_PN}-re"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer.inc
new file mode 100644
index 0000000..4ed01ed
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer.inc
@@ -0,0 +1,13 @@
+SUMMARY = "Resolve JSON Pointers in Python"
+HOMEPAGE = "https://github.com/stefankoegl/python-json-pointer"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=32b15c843b7a329130f4e266a281ebb3"
+
+inherit pypi
+
+SRC_URI[md5sum] = "741b98d0e693b08b5e44e0a9da5a7bb7"
+SRC_URI[sha256sum] = "c192ba86648e05fdae4f08a17ec25180a9aef5008d973407b581798a83975362"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-json \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer_1.12.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer_1.12.bb
deleted file mode 100644
index f5c1aa8..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer_1.12.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-SUMMARY = "Resolve JSON Pointers in Python"
-HOMEPAGE = "https://github.com/stefankoegl/python-json-pointer"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=32b15c843b7a329130f4e266a281ebb3"
-
-inherit pypi setuptools
-
-SRC_URI[md5sum] = "eaaad79e983d58ecbee5b4a326723777"
-SRC_URI[sha256sum] = "819b6dd4fd0a18ac219e02a0117f24b2d31296b0c475c33862cfa9a1616d62c3"
-
-RDEPENDS_${PN} += "python-re python-json"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer_2.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer_2.0.bb
new file mode 100644
index 0000000..e13a776
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonpointer_2.0.bb
@@ -0,0 +1,4 @@
+inherit setuptools
+require python-jsonpointer.inc
+
+RDEPENDS_${PN} += "${PYTHON_PN}-re"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema.inc
index db57c69..6fdc024 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema.inc
@@ -11,17 +11,13 @@
     ${PYTHON_PN}-core \
     ${PYTHON_PN}-io \
     ${PYTHON_PN}-json \
-    ${PYTHON_PN}-lang \
     ${PYTHON_PN}-netclient \
     ${PYTHON_PN}-numbers \
     ${PYTHON_PN}-pkgutil \
     ${PYTHON_PN}-pprint \
-    ${PYTHON_PN}-re \
     ${PYTHON_PN}-rfc3987 \
     ${PYTHON_PN}-shell \
     ${PYTHON_PN}-strict-rfc3339 \
-    ${PYTHON_PN}-subprocess \
-    ${PYTHON_PN}-textutils \
     ${PYTHON_PN}-unittest \
 "
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema_2.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema_2.6.0.bb
index 3bb5220..b677c64 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema_2.6.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-jsonschema_2.6.0.bb
@@ -5,4 +5,8 @@
     ${PYTHON_PN}-argparse \
     ${PYTHON_PN}-contextlib \
     ${PYTHON_PN}-functools32 \
+    ${PYTHON_PN}-lang \
+    ${PYTHON_PN}-re \
+    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-textutils \ 
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lockfile_0.12.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lockfile_0.12.2.bb
index cd15760..9ad865d 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lockfile_0.12.2.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lockfile_0.12.2.bb
@@ -11,3 +11,9 @@
 
 SRC_URI[md5sum] = "a6a1a82957a23afdf44cfdd039b65ff9"
 SRC_URI[sha256sum] = "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"
+
+# Satisfy setup.py 'setup_requires'
+DEPENDS += " \
+        python-pbr-native \
+        "
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml.inc
index 7c0a7d7..3f3a1e2 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml.inc
@@ -11,15 +11,15 @@
                     file://doc/licenses/elementtree.txt;md5=eb34d036a6e3d56314ee49a6852ac891 \
                     file://doc/licenses/BSD.txt;md5=700a1fc17f4797d4f2d34970c8ee694b \
                     file://doc/licenses/GPL.txt;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://src/lxml/isoschematron/resources/rng/iso-schematron.rng;startline=2;endline=7;md5=a2914d12acc7066b3f5b60e8f94a012e \
-                    file://src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl;startline=2;endline=24;md5=96976dcc66249c51e8026b159ca5e755 \
-                    file://src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl;startline=2;endline=7;md5=5cac4ad4b5e131a10e9af755b10fbbb7 \
+                    file://src/lxml/isoschematron/resources/rng/iso-schematron.rng;beginline=2;endline=7;md5=939e7430ce85e1242ff50c4ee9430752 \
+                    file://src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl;beginline=2;endline=24;md5=cc86b7b2bbc678e13f58ea403eb9929b \
+                    file://src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl;beginline=2;endline=7;md5=5b03236d293dc3784205542b409d2f53 \
                     "
 
 DEPENDS += "libxml2 libxslt"
 
-SRC_URI[md5sum] = "247580bd5d942872bd972ad0086e5cbf"
-SRC_URI[sha256sum] = "be3aaeb5f468a49f523f16736ccff7d82af2b4b303292ba3d052b5b28f3fbe47"
+SRC_URI[md5sum] = "c266d9062e23b08f66426979a2b36f51"
+SRC_URI[sha256sum] = "e2629cdbcad82b83922a3488937632a4983ecc0fed3e5cfbf430d069382eeb9b"
 
 DISTUTILS_BUILD_ARGS += " \
                      --with-xslt-config='pkg-config libxslt' \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml_4.1.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml_4.2.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml_4.1.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-lxml_4.2.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
index 819c8e5..c71b16f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
@@ -1,4 +1,4 @@
-From f11b9c71080513f9b867ba8f40613ba2ebc6e960 Mon Sep 17 00:00:00 2001
+From dfb83a41aaeae326e9b6f02b233af375bc7b8815 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Fri, 29 Mar 2013 15:17:17 +0100
 Subject: [PATCH] setup.py: link in sysroot, not in host directories
@@ -10,12 +10,12 @@
  setup.py | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-Index: M2Crypto-0.23.0/setup.py
-===================================================================
---- M2Crypto-0.23.0.orig/setup.py
-+++ M2Crypto-0.23.0/setup.py
-@@ -62,7 +62,7 @@ class _M2CryptoBuildExt(build_ext.build_
-             self.openssl = 'c:\\pkg'
+diff --git a/setup.py b/setup.py
+index 3407c82..15ed7cd 100644
+--- a/setup.py
++++ b/setup.py
+@@ -127,7 +127,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
+                 self.openssl = os.path.join(self.openssl, 'OpenSSL')
          else:
              self.libraries = ['ssl', 'crypto']
 -            self.openssl = '/usr'
@@ -23,7 +23,7 @@
  
      def finalize_options(self):
          '''Overloaded build_ext implementation to append custom openssl
-@@ -75,8 +75,8 @@ class _M2CryptoBuildExt(build_ext.build_
+@@ -143,8 +143,8 @@ class _M2CryptoBuildExt(build_ext.build_ext):
          if _openssl and os.path.isdir(_openssl):
              self.openssl = _openssl
  
@@ -34,3 +34,6 @@
  
          if platform.system() == "Linux":
              if _multiarch:  # on Fedora/RHEL it is an empty string
+-- 
+2.7.4
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-mako.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-mako.inc
new file mode 100644
index 0000000..a9fa556
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-mako.inc
@@ -0,0 +1,21 @@
+SUMMARY = "A super-fast templating language that borrows the best ideas from the existing templating languages"
+HOMEPAGE = "http://www.makotemplates.org/"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
+
+PYPI_PACKAGE = "Mako"
+
+inherit pypi
+
+SRC_URI[md5sum] = "5836cc997b1b773ef389bf6629c30e65"
+SRC_URI[sha256sum] = "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae"
+
+RDEPENDS_${PN} = " \
+    ${PYTHON_PN}-html \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-threading \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-mako_1.0.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-mako_1.0.7.bb
new file mode 100644
index 0000000..3372eeb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-mako_1.0.7.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-mako.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe.inc
index e50f8ce..927f844 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe.inc
@@ -9,4 +9,4 @@
 PYPI_PACKAGE = "MarkupSafe"
 inherit pypi
 
-RDEPENDS_${PN} += "${PYTHON_PN}-re ${PYTHON_PN}-stringold"
+RDEPENDS_${PN} += "${PYTHON_PN}-stringold"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb
index 5c9884b..05bbe8a 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb
@@ -1,4 +1,6 @@
 inherit setuptools
 require python-markupsafe.inc
 
+RDEPENDS_${PN} += "${PYTHON_PN}-re"
+
 BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-monotonic_1.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-monotonic_1.3.bb
deleted file mode 100644
index ee91d18..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-monotonic_1.3.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "An implementation of time.monotonic() for Python 2.0 through 3.2"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
-
-SRC_URI[md5sum] = "34351251d1a67667a25cd7673d2e44bf"
-SRC_URI[sha256sum] = "2b469e2d7dd403f7f7f79227fe5ad551ee1e76f8bb300ae935209884b93c7c1b"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += "${PYTHON_PN}-ctypes ${PYTHON_PN}-io ${PYTHON_PN}-re ${PYTHON_PN}-threading"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-monotonic_1.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-monotonic_1.4.bb
new file mode 100644
index 0000000..4c5d8ae
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-monotonic_1.4.bb
@@ -0,0 +1,10 @@
+SUMMARY = "An implementation of time.monotonic() for Python 2.0 through 3.2"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+SRC_URI[md5sum] = "29302cd6b1013b3ab0d1ed78e20d22f2"
+SRC_URI[sha256sum] = "a02611d5b518cd4051bf22d21bd0ae55b3a03f2d2993a19b6c90d9d168691f84"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += "${PYTHON_PN}-ctypes ${PYTHON_PN}-io ${PYTHON_PN}-re ${PYTHON_PN}-threading"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack.inc
index 228ce59..fdc8926 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack.inc
@@ -2,8 +2,12 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=cd9523181d9d4fbf7ffca52eaa2a5751"
 
-SRC_URI[md5sum] = "dcd854fb41ee7584ebbf35e049e6be98"
-SRC_URI[sha256sum] = "1a2b19df0f03519ec7f19f826afb935b202d8979b0856c6fb3dc28955799f886"
+SRC_URI[md5sum] = "6d644c06a87a5a111bbbf5b34b4be440"
+SRC_URI[sha256sum] = "378cc8a6d3545b532dfd149da715abae4fda2a3adb6d74e525d0d5e51f46909b"
 
 PYPI_PACKAGE = "msgpack-python"
 inherit pypi
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-io \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack_0.4.8.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack_0.5.6.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack_0.4.8.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-msgpack_0.5.6.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient.inc
index 133cab1..d743023 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient.inc
@@ -3,8 +3,8 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://MANIFEST.in;md5=ce22c0cd986d2de3f7073cd6b5523ae0"
 
-SRC_URI[md5sum] = "59a2f0a5b3b60e6c520a9cc7be9aff87"
-SRC_URI[sha256sum] = "7bfd8c5cfcbc241a93ca6a4e45f952650f5c7ecf7c49b1dbcf5f4d390240be0b"
+SRC_URI[md5sum] = "a0d349cf9530e331697a6e5ab1f40de6"
+SRC_URI[sha256sum] = "fba4d4798dcac2965874f24afb6631b4326baa4bd02505744d34f690c354856a"
 
 PYPI_PACKAGE = "ndg_httpsclient"
 
@@ -13,6 +13,13 @@
     ${PYTHON_PN}-pyasn1 \
 "
 
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-pyopenssl \
+    ${PYTHON_PN}-pyasn1 \
+"
+
 BBCLASSEXTEND = "native nativesdk"
 
 UPSTREAM_CHECK_REGEX = ""
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient_0.4.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient_0.4.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient_0.4.3.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ndg-httpsclient_0.4.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr.inc
index 26b0f1e..5b6d4df 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr.inc
@@ -6,3 +6,8 @@
 SRC_URI[sha256sum] = "38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd"
 
 inherit pypi
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-pprint \
+    ${PYTHON_PN}-xml \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr_0.7.19.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr_0.7.19.bb
index 5e089a9..ca5a79a 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr_0.7.19.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-netaddr_0.7.19.bb
@@ -1,2 +1,6 @@
 require python-netaddr.inc
 inherit setuptools
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-textutils \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-networkx_1.11.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-networkx_1.11.bb
deleted file mode 100644
index bda8ae3..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-networkx_1.11.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-DESCRIPTION = "Python package for creating and manipulating graphs and networks"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=925586ea588eb990de840dc71ea3752f"
-
-SRC_URI[md5sum] = "6ef584a879e9163013e9a762e1cf7cd1"
-SRC_URI[sha256sum] = "0d0e70e10dfb47601cbb3425a00e03e2a2e97477be6f80638fef91d54dd1e4b8"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += "python-2to3"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-networkx_2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-networkx_2.1.bb
new file mode 100644
index 0000000..bc0c686
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-networkx_2.1.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "Python package for creating and manipulating graphs and networks"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3376ff7c9c58048c62d91431f7f08cde"
+
+SRC_URI[md5sum] = "4a2c2a62dfc46ba7d594daca7c834995"
+SRC_URI[sha256sum] = "64272ca418972b70a196cb15d9c85a5a6041f09a2f32e0d30c0255f25d458bb1"
+
+PYPI_PACKAGE_EXT = "zip"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += "python-2to3"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-oauthlib.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-oauthlib.inc
new file mode 100644
index 0000000..c5de8a0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-oauthlib.inc
@@ -0,0 +1,25 @@
+SUMMARY = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic"
+HOMEPAGE = "https://github.com/idan/oauthlib"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5ba9ce41463615e082609806255bce1b"
+
+SRC_URI = "https://pypi.python.org/packages/a5/8a/212e9b47fb54be109f3ff0684165bb38c51117f34e175c379fce5c7df754/oauthlib-${PV}.tar.gz"
+SRC_URI[md5sum] = "277a9a966cc8c72e492b4eeb41332445"
+SRC_URI[sha256sum] = "ce57b501e906ff4f614e71c36a3ab9eacbb96d35c24d1970d2539bbc3ec70ce1"
+
+S = "${WORKDIR}/oauthlib-${PV}"
+
+# The following configs & dependencies are from setuptools extras_require.
+# These dependencies are optional, hence can be controlled via PACKAGECONFIG.
+# The upstream names may not correspond exactly to bitbake package names.
+#
+# Uncomment this line to enable all the optional features.
+#PACKAGECONFIG ?= "test signedtoken signals rsa"
+PACKAGECONFIG[test] = ",,,${PYTHON_PN}-blinker ${PYTHON_PN}-cryptography ${PYTHON_PN}-nose ${PYTHON_PN}-pyjwt"
+PACKAGECONFIG[signedtoken] = ",,,${PYTHON_PN}-cryptography ${PYTHON_PN}-pyjwt"
+PACKAGECONFIG[signals] = ",,,${PYTHON_PN}-blinker"
+PACKAGECONFIG[rsa] = ",,,${PYTHON_PN}-cryptography"
+
+RDEPENDS_${PN} += "${PYTHON_PN}-core ${PYTHON_PN}-crypt ${PYTHON_PN}-datetime ${PYTHON_PN}-json ${PYTHON_PN}-logging ${PYTHON_PN}-math ${PYTHON_PN}-netclient ${PYTHON_PN}-unittest"
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-oauthlib_2.0.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-oauthlib_2.0.6.bb
new file mode 100644
index 0000000..4329d21
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-oauthlib_2.0.6.bb
@@ -0,0 +1,4 @@
+inherit setuptools
+require python-oauthlib.inc
+
+RDEPENDS_${PN} += "${PYTHON_PN}-re ${PYTHON_PN}-lang"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt.inc
index ad1ce6a..f834e6f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt.inc
@@ -7,13 +7,15 @@
 SRCNAME = "paho-mqtt"
 
 inherit pypi
-SRC_URI[md5sum] = "b9338236e2836e8579ef140956189cc4"
-SRC_URI[sha256sum] = "2c9ef5494cfc1e41a9fff6544c5a2cd59ea5d401d9119a06ecf7fad6a2ffeb93"
+SRC_URI[md5sum] = "2cc27d8b369700b1fc99325add0dadd2"
+SRC_URI[sha256sum] = "31911f6031de306c27ed79dc77b690d7c55b0dcb0f0434ca34ec6361d0371122"
 
 DEPENDS += "${PYTHON_PN}-pytest-runner-native"
 
 RDEPENDS_${PN} = "\
-               ${PYTHON_PN}-math \
-               ${PYTHON_PN}-io \
-               ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-math \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-threading \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt_1.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt_1.3.0.bb
deleted file mode 100644
index f369b2e..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt_1.3.0.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-inherit setuptools
-require python-paho-mqtt.inc
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt_1.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt_1.3.1.bb
new file mode 100644
index 0000000..a103117
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-paho-mqtt_1.3.1.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-paho-mqtt.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pam_1.8.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pam_1.8.2.bb
index 05bddd5..60a3b43 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pam_1.8.2.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pam_1.8.2.bb
@@ -10,3 +10,6 @@
 inherit pypi setuptools
 
 RDEPENDS_${PN} = "libpam"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas.inc
index d1f3707..b9f84a6 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas.inc
@@ -3,13 +3,12 @@
 high-performance, easy-to-use data structures and data analysis tools for \
 the Python programming language."
 HOMEPAGE = "http://pandas.pydata.org/"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=66017d3134349017409386be85176145"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ee0470f2de336c370a71c2f8d5e81c11"
 
-SRC_URI[md5sum] = "4df858f28b4bf4fa07d9fbb7f2568173"
-SRC_URI[sha256sum] = "a777e07633d83d546c55706420179551c8e01075b53c497dcf8ae4036766bc66"
+SRC_URI[md5sum] = "c7a2757b607748255f3270221ac61d59"
+SRC_URI[sha256sum] = "44a94091dd71f05922eec661638ec1a35f26d573c119aa2fad964f10a2880e6c"
 
-PYPI_PACKAGE = "pandas"
 inherit pypi
 
 DEPENDS += " \
@@ -17,6 +16,7 @@
 "
 
 RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-json \
     ${PYTHON_PN}-numpy \
     ${PYTHON_PN}-dateutil \
     ${PYTHON_PN}-pytz \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas_0.20.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas_0.20.3.bb
deleted file mode 100644
index 20973c8..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas_0.20.3.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-inherit setuptools
-require python-pandas.inc
-
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-json \
-    ${PYTHON_PN}-importlib \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas_0.22.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas_0.22.0.bb
new file mode 100644
index 0000000..b3bfab9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pandas_0.22.0.bb
@@ -0,0 +1,7 @@
+inherit setuptools
+require python-pandas.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-future \
+    ${PYTHON_PN}-json \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-parse_1.8.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-parse_1.8.2.bb
index 037221a..8e16372 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-parse_1.8.2.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-parse_1.8.2.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Parse strings using a specification based on the Python format() syntax"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://parse.py;md5=a84b494563bba466a2f02b05f2e6ad4a;startline=1191;endline=1210"
+LIC_FILES_CHKSUM = "file://parse.py;beginline=1191;endline=1209;md5=5147afdd9b3615290ad8733f0137a1a1"
 
 SRC_URI[md5sum] = "42002338551bdfa0f01bbe4e679a17dd"
 SRC_URI[sha256sum] = "8048dde3f5ca07ad7ac7350460952d83b63eaacecdac1b37f45fd74870d849d2"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-passlib.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-passlib.inc
index f289c0e..9e477ec 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-passlib.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-passlib.inc
@@ -11,3 +11,9 @@
 
 SRC_URI[md5sum] = "254869dae3fd9f09f0746a3cb29a0b15"
 SRC_URI[sha256sum] = "3d948f64138c25633613f303bcc471126eae67c04d5e3f6b7b8ce6242f8653e0"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-crypt \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-netclient \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pep8_1.7.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pep8_1.7.0.bb
deleted file mode 100644
index 262b862..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pep8_1.7.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Python style guide checker"
-HOMEPAGE = "https://github.com/dreamhost/cliff"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://README.rst;md5=d8ebbbe831259ce010179d2f310b0f3e"
-
-SRC_URI[md5sum] = "2b03109b0618afe3b04b3e63b334ac9d"
-SRC_URI[sha256sum] = "a113d5f5ad7a7abacef9df5ec3f2af23a20a28005921577b15dd584d099d5900"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += " \
-    python-prettytable \
-    python-cmd2 \
-    python-pyparsing"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pep8_1.7.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pep8_1.7.1.bb
new file mode 100644
index 0000000..b12d72d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pep8_1.7.1.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Python style guide checker"
+HOMEPAGE = "https://github.com/dreamhost/cliff"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://README.rst;md5=d8ebbbe831259ce010179d2f310b0f3e"
+
+SRC_URI[md5sum] = "603821d06db945c71d811b5a8d78423c"
+SRC_URI[sha256sum] = "fe249b52e20498e59e0b5c5256aa52ee99fc295b26ec9eaa85776ffdb9fe6374"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += " \
+    python-prettytable \
+    python-cmd2 \
+    python-pyparsing"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect.inc
index 47d0979..fa8ad01 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect.inc
@@ -4,15 +4,11 @@
 LICENSE = "ISC"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1c7a725251880af8c6a148181665385b"
 
-SRCNAME = "pexpect"
-
-SRC_URI[md5sum] = "3694410001a99dff83f0b500a1ca1c95"
-SRC_URI[sha256sum] = "3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92"
+SRC_URI[md5sum] = "913fc0a68a915cdf6ad4250493c94cf7"
+SRC_URI[sha256sum] = "9f8eb3277716a01faafaba553d629d3d60a1a624c7cf45daa600d2148c30020c"
 
 UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect"
 
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
 RDEPENDS_${PN} = "\
     ${PYTHON_PN}-core \
     ${PYTHON_PN}-io \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect_4.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect_4.5.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect_4.2.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pexpect_4.5.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pip_9.0.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pip_9.0.1.bb
deleted file mode 100644
index 5ddd8d5..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pip_9.0.1.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "PIP is a tool for installing and managing Python packages"
-HOMEPAGE = "https://pip.pypa.io/"
-LICENSE = "MIT & LGPL-2.1"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
-
-SRC_URI[md5sum] = "35f01da33009719497f01a4ba69d63c9"
-SRC_URI[sha256sum] = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"
-
-inherit pypi setuptools
-
-# Since PIP is like CPAN for PERL we need to drag in all python modules to ensure everything works
-RDEPENDS_${PN}_class-target = "python-modules python-distribute"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pip_9.0.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pip_9.0.3.bb
new file mode 100644
index 0000000..e3fc6ba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pip_9.0.3.bb
@@ -0,0 +1,14 @@
+SUMMARY = "PIP is a tool for installing and managing Python packages"
+HOMEPAGE = "https://pip.pypa.io/"
+LICENSE = "MIT & LGPL-2.1"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
+
+SRC_URI[md5sum] = "b15b33f9aad61f88d0f8c866d16c55d8"
+SRC_URI[sha256sum] = "7bf48f9a693be1d58f49f7af7e0ae9fe29fd671cde8a55e6edca3581c4ef5796"
+
+inherit pypi setuptools
+
+# Since PIP is like CPAN for PERL we need to drag in all python modules to ensure everything works
+RDEPENDS_${PN}_class-target = "python-modules python-distribute python-misc"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pluggy.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pluggy.inc
new file mode 100644
index 0000000..320359a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pluggy.inc
@@ -0,0 +1,9 @@
+SUMMARY = "Plugin and hook calling mechanisms for python"
+HOMEPAGE = "https://github.com/pytest-dev/pluggy"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=338dad807ed9337bfaeb9979c3bfe20f"
+
+SRC_URI[md5sum] = "ffdde7c3a5ba9a440404570366ffb6d5"
+SRC_URI[sha256sum] = "7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff"
+
+inherit pypi
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pluggy_0.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pluggy_0.6.0.bb
new file mode 100644
index 0000000..edcd4f5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pluggy_0.6.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-pluggy.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply.inc
new file mode 100644
index 0000000..a744950
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Python Lex and Yacc"
+DESCRIPTION = "Python ply: PLY is yet another implementation of lex and yacc for Python"
+HOMEPAGE = "https://pypi.python.org/pypi/ply"
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://README.md;beginline=5;endline=32;md5=f5ee5c355c0e6719c787a71b8f0fa96c"
+
+SRC_URI[md5sum] = "6465f602e656455affcd7c5734c638f8"
+SRC_URI[sha256sum] = "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3"
+
+inherit pypi
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-shell \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply_3.10.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply_3.10.bb
deleted file mode 100644
index 8e61efa..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply_3.10.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Python Lex and Yacc"
-DESCRIPTION = "Python ply: PLY is yet another implementation of lex and yacc for Python"
-HOMEPAGE = "https://pypi.python.org/pypi/ply"
-SECTION = "devel/python"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://README.md;beginline=3;endline=30;md5=fcb04bc2f765e46ab7084d6ab6e452bb"
-
-SRCNAME = "ply"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "1d63c166ab250bab87d8dcc42dcca70e"
-SRC_URI[sha256sum] = "96e94af7dd7031d8d6dd6e2a8e0de593b511c211a86e28a9c9621c275ac8bacb"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply_3.11.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply_3.11.bb
new file mode 100644
index 0000000..2b6165c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ply_3.11.bb
@@ -0,0 +1,2 @@
+require python-ply.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend.inc
index 78b6717..b342aef 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend.inc
@@ -3,7 +3,7 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=411780c0b7fa756753e94affeee5bc99"
 
-SRC_URI[md5sum] = "7147050a95c9f494248557b42b58ad79"
-SRC_URI[sha256sum] = "930f2c1e18503e8f8c403abe2e02166c4a881941745147e712cdd4f49f3fb964"
+SRC_URI[md5sum] = "ad53883ede48aeac7ae584f0de0240e8"
+SRC_URI[sha256sum] = "c90eb810cde8ebb06dafcb8796f9a95228ce796531bc806e794c2f4649aa1b10"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend_1.0.8.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend_1.0.9.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend_1.0.8.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pretend_1.0.9.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit.inc
index f5ed349..cc409a4 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit.inc
@@ -10,7 +10,6 @@
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-core \
     ${PYTHON_PN}-six \
-    ${PYTHON_PN}-subprocess \
     ${PYTHON_PN}-terminal \
     ${PYTHON_PN}-threading \
     ${PYTHON_PN}-wcwidth \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit_1.0.15.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit_1.0.15.bb
index 76e8410..527c905 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit_1.0.15.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-prompt-toolkit_1.0.15.bb
@@ -1,2 +1,6 @@
 inherit pypi setuptools
 require python-prompt-toolkit.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf.inc
index 2f59ef9..b84983d 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf.inc
@@ -2,15 +2,24 @@
 HOMEPAGE = "https://developers.google.com/protocol-buffers/"
 SECTION = "devel/python"
 
-RDEPENDS_${PN} = "python-six"
-
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
 
 inherit pypi
 
-SRC_URI[md5sum] = "bfc0c61c156a995e909521697e755780"
-SRC_URI[sha256sum] = "ef02609ef445987976a3a26bff77119c518e0915c96661c3a3b17856d0ef6374"
+SRC_URI[md5sum] = "393a53483224cb338df5c643646c0300"
+SRC_URI[sha256sum] = "09879a295fd7234e523b62066223b128c5a8a88f682e3aff62fb115e4a0d8be0"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-json \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-numbers \
+    ${PYTHON_PN}-pkgutil \
+    ${PYTHON_PN}-six \
+    ${PYTHON_PN}-unittest \
+"
 
 # For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools)
 BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf_3.4.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf_3.5.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf_3.4.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-protobuf_3.5.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil.inc
index c9a7f6d..5d8e61f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil.inc
@@ -2,11 +2,19 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=0f02e99f7f3c9a7fe8ecfc5d44c2be62"
 
-SRC_URI[md5sum] = "529244aea5d32fb0c2ea46d80ce54abc"
-SRC_URI[sha256sum] = "12dd9c8abbad15f055e9579130035b38617020ce176f4a498b7870e6321ffa67"
+SRC_URI[md5sum] = "3b291833dbea631db9d271aa602a169a"
+SRC_URI[sha256sum] = "e2467e9312c2fa191687b89ff4bc2ad8843be4af6fb4dc95a7cc5f7d7a327b18"
+
+PACKAGES =+ "${PN}-tests"
+
+FILES_${PN}-tests += " \
+    ${PYTHON_SITEPACKAGES_DIR}/psutil/test* \
+    ${PYTHON_SITEPACKAGES_DIR}/psutil/__pycache__/test* \
+"
+
 
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-shell \
-    ${PYTHON_PN}-subprocess \
     ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-xml \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil_5.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil_5.3.1.bb
deleted file mode 100644
index bf402aa..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil_5.3.1.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit pypi setuptools
-require python-psutil.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil_5.4.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil_5.4.3.bb
new file mode 100644
index 0000000..9aabfb2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-psutil_5.4.3.bb
@@ -0,0 +1,6 @@
+inherit pypi setuptools
+require python-psutil.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py.inc
index 1aef0e7..c7d6727 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py.inc
@@ -1,9 +1,9 @@
 SUMMARY = "Library with cross-python path, ini-parsing, io, code, log facilities"
 HOMEPAGE = "http://py.readthedocs.io/"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b506f3df287708b2f99588b5cc351091"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a6bb0320b04a0a503f12f69fea479de9"
 
-SRC_URI[md5sum] = "d9c3d8f734b0819ff48e355d77bf1730"
-SRC_URI[sha256sum] = "0f2d585d22050e90c7d293b6451c83db097df77871974d90efd5a30dc12fcde3"
+SRC_URI[md5sum] = "279ca69c632069e1b71e11b14641ca28"
+SRC_URI[sha256sum] = "ca18943e28235417756316bfada6cd96b23ce60dd532642690dcfdaba988a76d"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py_1.4.34.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py_1.5.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py_1.4.34.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-py_1.5.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1-modules.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1-modules.inc
new file mode 100644
index 0000000..9fa54cf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1-modules.inc
@@ -0,0 +1,16 @@
+SUMMARY = "A collection of ASN.1-based protocols modules."
+DESCRIPTION = "A collection of ASN.1 modules expressed in form of pyasn1\
+ classes. Includes protocols PDUs definition (SNMP, LDAP etc.) and various\
+ data structures (X.509, PKCS etc.)."
+HOMEPAGE = "https://github.com/etingof/pyasn1-modules"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=280606d9c18f200e03e0c247ac61475a"
+
+SRC_URI[md5sum] = "ff938698590f314ff9b3d5c48737d899"
+SRC_URI[sha256sum] = "af00ea8f2022b6287dc375b2c70f31ab5af83989fc6fe9eacd4976ce26cd7ccc"
+
+inherit pypi
+
+RDEPENDS_${PN} = "${PYTHON_PN}-pyasn1"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1-modules_0.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1-modules_0.2.1.bb
new file mode 100644
index 0000000..eb78884
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1-modules_0.2.1.bb
@@ -0,0 +1,2 @@
+require python-pyasn1-modules.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1.inc
index dedb191..f3c32e0 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1.inc
@@ -3,12 +3,11 @@
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=280606d9c18f200e03e0c247ac61475a"
 
-SRC_URI[md5sum] = "a2d01c561d4996055641bbbb74eda58f"
-SRC_URI[sha256sum] = "f0380ea97db0ede095a0dd87ce3003d46c197191f924206e43f776fc77e51f09"
+SRC_URI[md5sum] = "cb5883ddc6a9f405600429f37cf0759c"
+SRC_URI[sha256sum] = "d258b0a71994f7770599835249cece1caef3c70def868c4915e6e5ca49b67d15"
 
 RDEPENDS_${PN}_class-target += " \
     ${PYTHON_PN}-codecs \
-    ${PYTHON_PN}-lang \
     ${PYTHON_PN}-logging \
     ${PYTHON_PN}-math \
     ${PYTHON_PN}-shell \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.3.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.3.6.bb
deleted file mode 100644
index 4461918..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.3.6.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit pypi setuptools
-require python-pyasn1.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.4.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.4.2.bb
new file mode 100644
index 0000000..a13c74d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.4.2.bb
@@ -0,0 +1,6 @@
+inherit pypi setuptools
+require python-pyasn1.inc
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-lang \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11.inc
index e273a8d..e441dc6 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11.inc
@@ -1,7 +1,7 @@
 SUMMARY = "Seamless operability between C++11 and Python"
 HOMEPAGE = "https://github.com/wjakob/pybind11"
 LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=9b27fac7e937323e3de9ca3a7db38e37"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=beb87117af69fd10fbf9fb14c22a2e62"
 
-SRC_URI[md5sum] = "f454d8991f47befe56d4126df861fc96"
-SRC_URI[sha256sum] = "a96a924fae6e2721efbf24f47561284fd1ea0b655619a8621c4423036183b824"
+SRC_URI[md5sum] = "2c651a75a20dabbaa18a8b023ffd54c0"
+SRC_URI[sha256sum] = "cbb036a8aad59a199ad672f98813f85c672642c6a67b4ff3868b1d6abc5fae3e"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11_2.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11_2.2.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11_2.2.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybind11_2.2.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybluez.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybluez.inc
new file mode 100644
index 0000000..399fe57
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybluez.inc
@@ -0,0 +1,21 @@
+DESCRIPTION = "Bluetooth Python extension module"
+HOMEPAGE = "http://karulis.github.io/pybluez/"
+SECTION = "devel/python"
+
+DEPENDS = "bluez5"
+
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8a71d0475d08eee76d8b6d0c6dbec543"
+
+inherit pypi
+
+SRC_URI = "https://pypi.python.org/packages/c1/98/3149481d508bee174335be6725880f00d297afebe75c15e917af8f6fe169/PyBluez-0.22.zip"
+SRC_URI[md5sum] = "49dab9d5a8f0b798c8125c7f649be3cd"
+SRC_URI[sha256sum] = "4ce006716a54d9d18e8186a3f1c8b12a8e6befecffe8fd5828a291fb694ce49d"
+
+S = "${WORKDIR}/PyBluez-${PV}"
+
+RDEPENDS_${PN} += "\
+    bluez5 \
+    ${PYTHON_PN}-fcntl \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybluez_0.22.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybluez_0.22.bb
index eab9c54..3158f4b 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybluez_0.22.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pybluez_0.22.bb
@@ -1,17 +1,2 @@
-DESCRIPTION = "Bluetooth Python extension module"
-HOMEPAGE = "http://karulis.github.io/pybluez/"
-SECTION = "devel/python"
-
-RDEPENDS_${PN} = "bluez5"
-DEPENDS = "bluez5"
-
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8a71d0475d08eee76d8b6d0c6dbec543"
-
-inherit pypi setuptools
-
-SRC_URI = "https://pypi.python.org/packages/c1/98/3149481d508bee174335be6725880f00d297afebe75c15e917af8f6fe169/PyBluez-0.22.zip"
-SRC_URI[md5sum] = "49dab9d5a8f0b798c8125c7f649be3cd"
-SRC_URI[sha256sum] = "4ce006716a54d9d18e8186a3f1c8b12a8e6befecffe8fd5828a291fb694ce49d"
-
-S = "${WORKDIR}/PyBluez-${PV}"
+require python-pybluez.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser.inc
index 6b05482..d112d9f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser.inc
@@ -9,7 +9,8 @@
 BBCLASSEXTEND = "native nativesdk"
 
 RDEPENDS_${PN}_class-target += "\
-    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-ply \
+    ${PYTHON_PN}-pprint \
     cpp \
     cpp-symlinks \
     "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser_2.18.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser_2.18.bb
index adbc1a8..9874273 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser_2.18.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser_2.18.bb
@@ -1,2 +1,6 @@
 inherit pypi setuptools
 require python-pycparser.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto.inc
index fb2c17d..232cdb7 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto.inc
@@ -3,12 +3,16 @@
 LICENSE = "PSFv2"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=35f354d199e8cb7667b059a23578e63d"
 
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:"
 
 DEPENDS += " gmp"
 
 inherit pypi autotools-brokensep
 
+SRC_URI += "file://cross-compiling.patch \
+            file://CVE-2013-7459.patch \
+           "
+
 SRC_URI[md5sum] = "55a61a054aa66812daf5161a0d5d7eda"
 SRC_URI[sha256sum] = "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c"
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto_2.6.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto_2.6.1.bb
index 919f91e..e13db01 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto_2.6.1.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto_2.6.1.bb
@@ -1,10 +1,6 @@
 inherit distutils
 require python-pycrypto.inc
 
-SRC_URI += "file://cross-compiling.patch \
-            file://CVE-2013-7459.patch \
-           "
-
 # We explicitly call distutils_do_install, since we want it to run, but
 # *don't* want the autotools install to run, since this package doesn't
 # provide a "make install" target.
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycryptodome.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycryptodome.inc
new file mode 100644
index 0000000..c4969f9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycryptodome.inc
@@ -0,0 +1,29 @@
+SUMMARY = "Cryptographic library for Python"
+DESCRIPTION = "PyCryptodome is a self-contained Python package of low-level\
+ cryptographic primitives."
+HOMEPAGE = "http://www.pycryptodome.org"
+LICENSE = "PD & BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=775fe77831c03bf82f35abc0e230d4c1"
+
+SRC_URI[md5sum] = "a2587b6381b0ef4eb960cea1e7507d04"
+SRC_URI[sha256sum] = "c5dd29e9f1b733e74311bf95d0e544e91bd1d14bc0366e8f443562d8d9920b7d"
+
+inherit pypi
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-math \
+"
+
+RDEPENDS_${PN}-tests += " \
+    ${PYTHON_PN}-unittest \
+"
+
+PACKAGES =+ "${PN}-tests"
+
+FILES_${PN}-tests += " \
+    ${PYTHON_SITEPACKAGES_DIR}/Crypto/SelfTest/ \
+    ${PYTHON_SITEPACKAGES_DIR}/Crypto/SelfTest/__pycache__/ \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycryptodome_3.4.11.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycryptodome_3.4.11.bb
new file mode 100644
index 0000000..c7701eb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycryptodome_3.4.11.bb
@@ -0,0 +1,2 @@
+require python-pycryptodome.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pydbus.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pydbus.inc
new file mode 100644
index 0000000..0773b7f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pydbus.inc
@@ -0,0 +1,11 @@
+DESCRIPTION = "Pythonic DBus library"
+HOMEPAGE = "https://pypi.python.org/pypi/pydbus/"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a916467b91076e631dd8edb7424769c7"
+
+SRC_URI[md5sum] = "c6abd44862322679bd4e907bebc3e0d0"
+SRC_URI[sha256sum] = "4207162eff54223822c185da06c1ba8a34137a9602f3da5a528eedf3f78d0f2c"
+
+S = "${WORKDIR}/pydbus-${PV}"
+
+RDEPENDS_${PN} = "${PYTHON_PN}-pygobject"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pydbus_0.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pydbus_0.6.0.bb
new file mode 100644
index 0000000..1722a80
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pydbus_0.6.0.bb
@@ -0,0 +1,2 @@
+require python-pydbus.inc
+inherit pypi setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyexpect.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyexpect.inc
new file mode 100644
index 0000000..d2d41d5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyexpect.inc
@@ -0,0 +1,11 @@
+SUMMARY = "Python expectaton library"
+DESCRIPTION = "Minimal but very flexible implementation of the expect pattern"
+SECTION = "devel/python"
+HOMEPAGE = " https://bitbucket.org/dwt/pyexpect"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://README.md;md5=500b884e9dcd5f677a53cbbee8ace939"
+
+inherit pypi
+
+SRC_URI[md5sum] = "c71307d6c7096fdbde0813018dfa0092"
+SRC_URI[sha256sum] = "d656ef7e07a8aa539ce0a4883a683341037b6fc1c329bf55b63bffbf2cce9582"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyexpect_1.0.17.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyexpect_1.0.17.bb
new file mode 100644
index 0000000..d26beb7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyexpect_1.0.17.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-pyexpect.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyflakes_1.2.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyflakes_1.2.3.bb
deleted file mode 100644
index 05e3413..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyflakes_1.2.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "passive checker of Python programs"
-HOMEPAGE = "https://github.com/dreamhost/cliff"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://README.rst;md5=eb48916870306ef34a061cec727ccae5"
-
-SRC_URI[md5sum] = "995747589e97c75055cf5b4e1e031e0b"
-SRC_URI[sha256sum] = "2e4a1b636d8809d8f0a69f341acf15b2e401a3221ede11be439911d23ce2139e"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += " \
-    python-prettytable \
-    python-cmd2 \
-    python-pyparsing"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyflakes_1.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyflakes_1.6.0.bb
new file mode 100644
index 0000000..2444859
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyflakes_1.6.0.bb
@@ -0,0 +1,14 @@
+SUMMARY = "passive checker of Python programs"
+HOMEPAGE = "https://github.com/dreamhost/cliff"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://README.rst;md5=029ce1beb023f2c4ca9f417e4984a865"
+
+SRC_URI[md5sum] = "b385b0e4cd40a522553e97cd2d83573e"
+SRC_URI[sha256sum] = "8d616a382f243dbf19b54743f280b80198be0bca3a5396f1d2e1fca6223e8805"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-prettytable \
+    ${PYTHON_PN}-cmd2 \
+    ${PYTHON_PN}-pyparsing"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0001-reflect-2.1-reporting-for-key-imports.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0001-reflect-2.1-reporting-for-key-imports.patch
index f587037..1f31cb8 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0001-reflect-2.1-reporting-for-key-imports.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0001-reflect-2.1-reporting-for-key-imports.patch
@@ -1,7 +1,7 @@
-From 1c1812def711803382cc28caea1f35fb7ef774b0 Mon Sep 17 00:00:00 2001
+From ed44474c11f577c1644910964a917a4cf701bb0f Mon Sep 17 00:00:00 2001
 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
 Date: Tue, 26 Jan 2016 14:24:26 -0500
-Subject: [PATCH 1/5] reflect 2.1 reporting for key imports
+Subject: [PATCH] reflect 2.1 reporting for key imports
 
 GnuPG 2.1 changes how it reports key imports.  These changes should
 make the pygpgme test suite compatible with GnuPG 2.1.
@@ -12,6 +12,7 @@
 Upstream-Status: Backport
 
 Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+
 ---
  tests/test_import.py | 22 +++++++++++-----------
  1 file changed, 11 insertions(+), 11 deletions(-)
@@ -86,3 +87,4 @@
 +                          None, gpgme.IMPORT_NEW | gpgme.IMPORT_SECRET))
          self.assertEqual(result.imports[3],
                           ('93C2240D6B8AA10AB28F701D2CF46B7FC97E6B0F',
+                           None, gpgme.IMPORT_NEW))
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0002-passphrase_cb-is-deprecated.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0002-passphrase_cb-is-deprecated.patch
index ccd941f..c18cf3f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0002-passphrase_cb-is-deprecated.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0002-passphrase_cb-is-deprecated.patch
@@ -1,7 +1,7 @@
-From dc75482af095d667a4a92655c4e7eb312e80c42d Mon Sep 17 00:00:00 2001
+From ba0dc8273e4f83bcd2d43baa5910aae34b93048c Mon Sep 17 00:00:00 2001
 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
 Date: Mon, 1 Feb 2016 19:25:12 -0500
-Subject: [PATCH 2/5] passphrase_cb is deprecated
+Subject: [PATCH] passphrase_cb is deprecated
 
 https://bugs.gnupg.org/gnupg/issue767 indicates that
 gpgme_set_passphrase_cb is a deprecated corner of the API and that
@@ -19,6 +19,7 @@
 Upstream-Status: Backport
 
 Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+
 ---
  tests/util.py | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)
@@ -48,3 +49,4 @@
 +
          # import requested keys into the keyring
          ctx = gpgme.Context()
+         for key in self.import_keys:
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0003-handle-generic-error-when-no-passphrase-callback-pre.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0003-handle-generic-error-when-no-passphrase-callback-pre.patch
index 462f442..6acb68b 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0003-handle-generic-error-when-no-passphrase-callback-pre.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0003-handle-generic-error-when-no-passphrase-callback-pre.patch
@@ -1,7 +1,7 @@
-From 024fe219582143017b2f02bc924c0ed107b63619 Mon Sep 17 00:00:00 2001
+From 579b5930e15de8855bf63b3c20b6c3aaf894c3eb Mon Sep 17 00:00:00 2001
 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
 Date: Mon, 1 Feb 2016 19:27:59 -0500
-Subject: [PATCH 3/5] handle generic error when no passphrase callback present
+Subject: [PATCH] handle generic error when no passphrase callback present
 
 apparently gpg 2.1 returns ERR_GENERAL right now if the pinentry was
 in loopback mode and no passphrase callback was supplied.  Earlier
@@ -10,6 +10,7 @@
 Upstream-Status: Backport
 
 Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+
 ---
  tests/test_passphrase.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -26,3 +27,4 @@
 +            self.assertEqual(exc.args[1], gpgme.ERR_GENERAL)
          else:
              self.fail('gpgme.GpgmeError not raised')
+ 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyiface.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyiface.inc
new file mode 100644
index 0000000..620b244
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyiface.inc
@@ -0,0 +1,11 @@
+SUMMARY = "Pyiface is a package that exposes the network interfaces of the operating system in a easy to use and transparent way"
+SECTION = "devel/python"
+HOMEPAGE = "https://pypi.python.org/pypi/pyiface/"
+LICENSE = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4fe869ee987a340198fb0d54c55c47f1"
+
+SRC_URI[md5sum] = "06c3c71fe51df740dae6a88a13afb5e0"
+SRC_URI[sha256sum] = "4bb79100cbcf7344a1ccaddc578cd6455da47d8eac6eb1bf903ec32e043af924"
+
+inherit pypi
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyiface_0.0.5.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyiface_0.0.5.bb
new file mode 100644
index 0000000..854cb30
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyiface_0.0.5.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-pyiface.inc
\ No newline at end of file
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify.inc
index 0168f1a..975f11c 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify.inc
@@ -2,7 +2,12 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=ab173cade7965b411528464589a08382"
 
-RDEPENDS_${PN} += "python-threading python-io python-subprocess python-misc python-shell"
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-misc \
+    ${PYTHON_PN}-shell \
+"
 
 SRC_URI[md5sum] = "8e580fa1ff3971f94a6f81672b76c406"
 SRC_URI[sha256sum] = "9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify_0.9.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify_0.9.6.bb
index d1f84c3..0c9a2c7 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify_0.9.6.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyinotify_0.9.6.bb
@@ -1,2 +1,6 @@
 inherit setuptools
 require python-pyinotify.inc
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjks.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjks.inc
new file mode 100644
index 0000000..d866c56
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjks.inc
@@ -0,0 +1,22 @@
+SUMMARY = "Pure-Python Java Keystore (JKS) library"
+DESCRIPTION = "PyJKS enables Python projects to load and manipulate\
+ Java KeyStore (JKS) data without a JVM dependency. PyJKS supports JKS,\
+ JCEKS, BKS and UBER (BouncyCastle) keystores."
+HOMEPAGE = "http://github.com/kurtbrose/pyjks"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9694d6cc724caf7f7386be88a4a81958"
+
+SRC_URI[md5sum] = "d53501e7c80d465969742bc6bee91d49"
+SRC_URI[sha256sum] = "709c44a303dd6b2464078ebeb677417e717818d4b3dc3844a462bef9d215dcc8"
+
+inherit pypi
+
+RDEPENDS_${PN} = "\
+    ${PYTHON_PN}-javaobj-py3 \
+    ${PYTHON_PN}-pyasn1 \
+    ${PYTHON_PN}-pyasn1-modules \
+    ${PYTHON_PN}-pycryptodome \
+    ${PYTHON_PN}-twofish\
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjks_17.1.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjks_17.1.1.bb
new file mode 100644
index 0000000..ce99f28
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjks_17.1.1.bb
@@ -0,0 +1,2 @@
+require python-pyjks.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjwt.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjwt.inc
new file mode 100644
index 0000000..9f9282e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjwt.inc
@@ -0,0 +1,17 @@
+SUMMARY = "JSON Web Token implementation in Python"
+SUMMARY = "JSON Web Token implementation in Python"
+DESCRIPTION = "A Python implementation of JSON Web Token draft 32.\
+ Original implementation was written by https://github.com/progrium"
+HOMEPAGE = "http://github.com/jpadilla/pyjwt"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=68626705a7b513ca8d5f44a3e200ed0c"
+
+SRC_URI[md5sum] = "f7dbe0d62f2087a7605946aeeca02541"
+SRC_URI[sha256sum] = "dacba5786fe3bf1a0ae8673874e29f9ac497860955c501289c63b15d3daae63a"
+
+PYPI_PACKAGE = "PyJWT"
+inherit pypi
+
+RDEPENDS_${PN} = "${PYTHON_PN}-cryptography"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjwt_1.6.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjwt_1.6.1.bb
new file mode 100644
index 0000000..f0a77b6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyjwt_1.6.1.bb
@@ -0,0 +1,2 @@
+require python-pyjwt.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint.inc
index c55bce6..ba85b98 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint.inc
@@ -3,23 +3,13 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
 
-SRC_URI[md5sum] = "98a1ee985a3ebc876a20eb7577dbab68"
-SRC_URI[sha256sum] = "1f65b3815c3bf7524b845711d54c4242e4057dd93826586620239ecdfe591fb1"
+SRC_URI[md5sum] = "2eb5f3cb8fe567eaf5420dd415012202"
+SRC_URI[sha256sum] = "c77311859e0c2d7932095f30d2b1bfdc4b6fe111f534450ba727a52eae330ef2"
 
 inherit pypi
 
 DEPENDS += "${PYTHON_PN}-pytest-runner-native"
 
-RDEPENDS_${PN} += "${PYTHON_PN}-astroid \
-                   ${PYTHON_PN}-isort \
-                   ${PYTHON_PN}-numbers \
-                   ${PYTHON_PN}-shell \
-                   ${PYTHON_PN}-json \
-                   ${PYTHON_PN}-pkgutil \
-                   ${PYTHON_PN}-difflib \
-                   ${PYTHON_PN}-netserver \
-                  "
-
 do_install_append(){
     rm ${D}${bindir}/pylint
     cat >> ${D}${bindir}/pylint <<EOF
@@ -30,3 +20,19 @@
     chmod 755 ${D}${bindir}/pylint
     sed -i -e 's:^#!/usr/bin/python:#!/usr/bin/env\ ${PYTHON_PN}:g' ${D}/${PYTHON_SITEPACKAGES_DIR}/pylint/test/data/ascript
 }
+
+PACKAGES =+ "${PN}-tests"
+FILES_${PN}-tests+= " \
+    ${PYTHON_SITEPACKAGES_DIR}/pylint/test/ \
+    ${PYTHON_SITEPACKAGES_DIR}/pylint/testutils.py \
+"
+
+RDEPENDS_${PN} += "${PYTHON_PN}-astroid \
+                   ${PYTHON_PN}-isort \
+                   ${PYTHON_PN}-numbers \
+                   ${PYTHON_PN}-shell \
+                   ${PYTHON_PN}-json \
+                   ${PYTHON_PN}-pkgutil \
+                   ${PYTHON_PN}-difflib \
+                   ${PYTHON_PN}-netserver \
+                  "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint_1.7.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint_1.8.3.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint_1.7.4.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pylint_1.8.3.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp.inc
index 21ba7bb..7765cc5 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp.inc
@@ -3,7 +3,13 @@
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=a3639cf5780f71b125d3e9d1dc127c20"
 
-SRC_URI[md5sum] = "2024babd97ab57ca0360394edc37f2b6"
-SRC_URI[sha256sum] = "7480acada8cba9472a85070c57baad89ae9deed826a7515a4c149ac48920c273"
+SRC_URI[md5sum] = "d4fee2abb2d7468010b7fe9ebc68b0cb"
+SRC_URI[sha256sum] = "304fbd8862dfde27d767c093de87fec42fc63c70d8393643d1a3b4f765aae78f"
 
-RDEPENDS_${PN} += " ${PYTHON_PN}-requests ${PYTHON_PN}-json ${PYTHON_PN}-jsonschema"
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-dateutil \
+    ${PYTHON_PN}-json \
+    ${PYTHON_PN}-jsonschema \
+    ${PYTHON_PN}-requests \
+    ${PYTHON_PN}-six \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp_2.4.80.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp_2.4.89.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp_2.4.80.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymisp_2.4.89.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo.inc
index 7f199b4..baf3dd5 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo.inc
@@ -6,10 +6,10 @@
 MongoDB. The gridfs package is a gridfs implementation on top of pymongo."
 HOMEPAGE = "http://github.com/mongodb/mongo-python-driver"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2a944942e1496af1886903d274dedb13"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
-SRC_URI[md5sum] = "35ae53073a25603591e085b18bc5a0ec"
-SRC_URI[sha256sum] = "e820d93414f3bec1fa456c84afbd4af1b43ff41366321619db74e6bc065d6924"
+SRC_URI[md5sum] = "0d72c87fb93cea0759529befafefce54"
+SRC_URI[sha256sum] = "f7ebcb846962ee40374db2d9014a89bea9c983ae63c1877957c3a0a756974796"
 
 PACKAGES =+ "${PYTHON_PN}-bson"
 
@@ -17,6 +17,7 @@
 
 RDEPENDS_${PYTHON_PN}-bson += " \
      ${PYTHON_PN}-datetime \
+     ${PYTHON_PN}-json \
      ${PYTHON_PN}-netclient \
      ${PYTHON_PN}-numbers \
      ${PYTHON_PN}-threading \
@@ -24,4 +25,5 @@
 
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-bson \
+    ${PYTHON_PN}-pprint \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo_3.5.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo_3.6.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo_3.5.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pymongo_3.6.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pynetlinux.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pynetlinux.inc
new file mode 100644
index 0000000..6a39896
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pynetlinux.inc
@@ -0,0 +1,11 @@
+SUMMARY = "Linux network configuration library for Python"
+DESCRIPTION = "This library contains Python bindings to ioctl calls"
+SECTION = "devel/python"
+HOMEPAGE = "http://github.com/rlisagor/pynetlinux"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=74e1861736ee959824fe7542323c12e9"
+
+inherit pypi
+
+SRC_URI[md5sum] = "3336e5d4a478acca4e35bf3125b4f883"
+SRC_URI[sha256sum] = "4ad08298c9f5ba15a11cddc639ba8778cabdfc402b51066d9e0a325e5a5b391c"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pynetlinux_1.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pynetlinux_1.1.bb
new file mode 100644
index 0000000..c45ad6a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pynetlinux_1.1.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-pynetlinux.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl.inc
index 1bf8324..7722e8e 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl.inc
@@ -5,8 +5,8 @@
 
 DEPENDS += "openssl ${PYTHON_PN}-cryptography"
 
-SRC_URI[md5sum] = "09dcd307b8d2068f9dd5aaa3a3a88992"
-SRC_URI[sha256sum] = "29630b9064a82e04d8242ea01d7c93d70ec320f5e3ed48e95fcabc6b1d0f6c76"
+SRC_URI[md5sum] = "d9c5134db8bf3183573b7840954cac94"
+SRC_URI[sha256sum] = "2c10cfba46a52c0b0950118981d61e72c1e5b1aac451ca1bc77de1a679456773"
 
 PYPI_PACKAGE = "pyOpenSSL"
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl_17.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl_17.5.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl_17.3.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyopenssl_17.5.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyparsing.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyparsing.inc
index 19f6d55..e30839f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyparsing.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyparsing.inc
@@ -18,4 +18,4 @@
     ${PYTHON_PN}-threading \
 "
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyperclip.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyperclip.inc
new file mode 100644
index 0000000..e05de67
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyperclip.inc
@@ -0,0 +1,12 @@
+DESCRIPTION = "A cross-platform clipboard module for Python. (only handles plain text for now)"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=1ed92115c8f96b19ec34ed09df586e51"
+
+SRC_URI[md5sum] = "d2f6a3129cd6f2518b52bb0b8deeeda7"
+SRC_URI[sha256sum] = "ce829433a9af640e08ee89b20f7c62132714bcc5d77df114044d0fccb8c3b3b8"
+
+inherit pypi
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-ctypes \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyperclip_1.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyperclip_1.6.0.bb
new file mode 100644
index 0000000..6c9fcbd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyperclip_1.6.0.bb
@@ -0,0 +1,7 @@
+inherit setuptools
+require python-pyperclip.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-contextlib \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2.inc
index da1d4cd..9ec9866 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2.inc
@@ -1,26 +1,25 @@
 SUMMARY = "A pure Python netlink and Linux network configuration library"
 LICENSE = "GPLv2 & Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL.v2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://LICENSE.Apache.v2;md5=3b83ef96387f14655fc854ddc3c6bd57"
+                    file://LICENSE.Apache.v2;md5=34281e312165f843a2b7d1f114fe65ce"
 
-SRC_URI[md5sum] = "733adb362b6603c7269c0b3df3045a55"
-SRC_URI[sha256sum] = "5cdf44656cf623369f0cbf183d9d14a1a50ebdffbd50d4e30ffda62c0a05d7b3"
-
-SRC_URI += "file://import-simplejson-as-json.patch"
+SRC_URI[md5sum] = "9c251543c4282a2f8b1a8d6aa8afc688"
+SRC_URI[sha256sum] = "7afad28ee0a0f3e7c34adaa9f953d00560ed9910203e93f107833b6e8d151171"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/python-pyroute2:"
 
 inherit pypi
 
-RDEPENDS_${PN} += "\
-  ${PYTHON_PN}-distutils \
-  ${PYTHON_PN}-simplejson \
-  ${PYTHON_PN}-multiprocessing \
-  ${PYTHON_PN}-io ${PYTHON_PN}-pprint \
-  ${PYTHON_PN}-pickle \
-  ${PYTHON_PN}-logging \
-  ${PYTHON_PN}-threading \
-  ${PYTHON_PN}-textutils \
-  ${PYTHON_PN}-subprocess \
-  ${PYTHON_PN}-netclient \
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-ctypes \
+    ${PYTHON_PN}-distutils \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-json \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-multiprocessing \
+    ${PYTHON_PN}-pickle \
+    ${PYTHON_PN}-pkgutil \
+    ${PYTHON_PN}-pprint \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-unixadmin \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2/import-simplejson-as-json.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2/import-simplejson-as-json.patch
deleted file mode 100644
index d73da07..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2/import-simplejson-as-json.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate [wrong dependency]
-
-Subject: [PATCH] import simplejson as json
-
-At runtime python-pyroute2 tries to import json, but the module is not 
-available, import simplejson as json solve the issue.
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- pyroute2/netlink/rtnl/ifinfmsg.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pyroute2/netlink/rtnl/ifinfmsg.py b/pyroute2/netlink/rtnl/ifinfmsg.py
-index 4f14f25..55643eb 100644
---- a/pyroute2/netlink/rtnl/ifinfmsg.py
-+++ b/pyroute2/netlink/rtnl/ifinfmsg.py
-@@ -1,5 +1,5 @@
- import os
--import json
-+import simplejson as json
- import errno
- import select
- import struct
--- 
-2.1.4
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2_0.3.22.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2_0.3.22.bb
deleted file mode 100644
index 7b9c8e0..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2_0.3.22.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require python-pyroute2.inc
-inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2_0.4.21.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2_0.4.21.bb
new file mode 100644
index 0000000..f25f1b4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyroute2_0.4.21.bb
@@ -0,0 +1,6 @@
+require python-pyroute2.inc
+inherit setuptools
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial.inc
index 99c6fc4..52a7e05 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial.inc
@@ -2,26 +2,41 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d476d94926db6e0008a5b3860d1f5c0d"
 
-# FIXME might stop packaging serialwin32 and serialjava files
+SRC_URI[md5sum] = "ed6183b15519a0ae96675e9c3330c69b"
+SRC_URI[sha256sum] = "6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627"
+
+inherit pypi
+
+PACKAGES =+ "${PN}-java ${PN}-osx ${PN}-win32 ${PN}-tools"
+
+FILES_${PN}-java = " \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/*java* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/__pycache__/*java* \
+"
+
+FILES_${PN}-osx = " \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/tools/*osx* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/tools/__pycache__/*osx* \
+"
+
+FILES_${PN}-win32 = " \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/*serialcli* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/__pycache__/*serialcli* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/*win32* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/__pycache__/*win32* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/tools/miniterm* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/tools/__pycache__/miniterm* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/tools/*windows* \
+    ${PYTHON_SITEPACKAGES_DIR}/serial/tools/__pycache__/*windows* \
+"
 
 RDEPENDS_${PN} = "\
     ${PYTHON_PN}-fcntl \
     ${PYTHON_PN}-io \
     ${PYTHON_PN}-logging \
     ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-numbers \
+    ${PYTHON_PN}-shell \
     ${PYTHON_PN}-stringold \
     ${PYTHON_PN}-threading \
 "
-
-SRC_URI[md5sum] = "ed6183b15519a0ae96675e9c3330c69b"
-SRC_URI[sha256sum] = "6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627"
-
-inherit pypi
-
-do_install_append() {
-	# We don't support jpython now.
-	if [ -e ${D}${PYTHON_SITEPACKAGES_DIR}/serial/serialjava.py ]; then
-		rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/serial/serialjava.py
-		rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/serial/serialjava.pyc
-	fi
-}
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial_3.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial_3.4.bb
index 91a0f26..fd852a2 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial_3.4.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyserial_3.4.bb
@@ -1,4 +1,4 @@
 inherit setuptools
 require python-pyserial.inc
 
-RDEPENDS_${PN} += "${PYTHON_PN}-importlib"
+RDEPENDS_${PN} += "${PYTHON_PN}-argparse"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysmi_0.1.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysmi_0.1.2.bb
deleted file mode 100644
index aa234dd..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysmi_0.1.2.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "SNMP SMI/MIB Parser"
-DESCRIPTION = "A pure-Python implementation of SNMP/SMI MIB \
-  parsing and conversion library. Can produce PySNMP MIB modules. \
-"
-HOMEPAGE = "https://pypi.python.org/pypi/pysmi"
-SECTION = "devel/python"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=d8b1bbadd635f187dee74d999a8c67b8"
-
-SRCNAME = "pysmi"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "f8754e9ed75698cc16b40f125df85b12"
-SRC_URI[sha256sum] = "e0912180fc6faa9c264df78f97e7c451f77f84f5bd840098d2ce7b1bf70082bc"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "python-ply"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysmi_0.2.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysmi_0.2.2.bb
new file mode 100644
index 0000000..24759b5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysmi_0.2.2.bb
@@ -0,0 +1,16 @@
+SUMMARY = "SNMP SMI/MIB Parser"
+DESCRIPTION = "A pure-Python implementation of SNMP/SMI MIB \
+  parsing and conversion library. Can produce PySNMP MIB modules. \
+"
+HOMEPAGE = "https://pypi.python.org/pypi/pysmi"
+SECTION = "devel/python"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=d8b1bbadd635f187dee74d999a8c67b8"
+
+SRC_URI[md5sum] = "3b0f71e4e9f730d211f09d8ef5371140"
+SRC_URI[sha256sum] = "2a315cc3e556b3428372b69da663a24d2f0df9e9ab075b022cb133855f25aef7"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "python-ply"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks.inc
index cf9509a..53ec1b7 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks.inc
@@ -3,13 +3,16 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1d457bcffb9661b45f799d4efee72f16"
 
-SRC_URI[md5sum] = "07007ec7ed46292dab06013f2e3af365"
-SRC_URI[sha256sum] = "d00329f27efa157db7efe3ca26fcd69033cd61f83822461ee3f8a353b48e33cf"
+SRC_URI[md5sum] = "441c4e3bf5b042f7e70613cd871df26c"
+SRC_URI[sha256sum] = "3fe52c55890a248676fd69dc9e3c4e811718b777834bcaab7a8125cf9deac672"
 
 PYPI_PACKAGE = "PySocks"
 
 RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-email \
     ${PYTHON_PN}-io \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-shell \
 "
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks_1.6.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks_1.6.8.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks_1.6.7.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pysocks_1.6.8.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pystache.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pystache.inc
new file mode 100644
index 0000000..6dbc99f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pystache.inc
@@ -0,0 +1,13 @@
+SUMMARY = "Python implementation of Mustache"
+HOMEPAGE = "https://github.com/defunkt/pystache"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb4417802c56384aac71b34505528a60"
+
+SRC_URI[md5sum] = "485885e67a0f6411d5252e69b20a35ca"
+SRC_URI[sha256sum] = "f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-netserver \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pystache_0.5.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pystache_0.5.4.bb
new file mode 100644
index 0000000..a455012
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pystache_0.5.4.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-pystache.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner.inc
index c173a18..7546743 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner.inc
@@ -1,16 +1,16 @@
 SUMMARY = "Invoke py.test as distutils command with dependency resolution"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e38b971c2b4c33b978d1b9c9ece9ae63"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a33f38bbf47d48c70fe0d40e5f77498e"
 
-SRC_URI[md5sum] = "a8dd57c80cde37a587dd8c37740c1ab1"
-SRC_URI[sha256sum] = "5c9093e7a18780409d9a389f20366f2fd39acfb1db61545fdb2e90cdbd0bcae4"
+SRC_URI[md5sum] = "8f8363a52bbabc4cedd5e239beb2ba11"
+SRC_URI[sha256sum] = "0f7c3a3cf5aead13f54baaa01ceb49e5ae92aba5d3ff1928e81e189c40bc6703"
 
 inherit pypi
 
 DEPENDS += " \
     ${PYTHON_PN}-setuptools-scm-native"
 
-RDEPENDS_${PN} = "${PYTHON_PN}-py ${PYTHON_PN}-setuptools ${PYTHON_PN}-argparse ${PYTHON_PN}-debugger ${PYTHON_PN}-json \
+RDEPENDS_${PN} = "${PYTHON_PN}-py ${PYTHON_PN}-setuptools ${PYTHON_PN}-debugger ${PYTHON_PN}-json \
                   ${PYTHON_PN}-io"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner_2.12.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner_2.12.1.bb
deleted file mode 100644
index 0a5055c..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner_2.12.1.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools
-require python-pytest-runner.inc
-
-# Dependency only exists for python2
-RDEPENDS_${PN} += "python-compiler"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner_3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner_3.0.bb
new file mode 100644
index 0000000..1765a73
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest-runner_3.0.bb
@@ -0,0 +1,5 @@
+inherit setuptools
+require python-pytest-runner.inc
+
+# Dependency only exists for python2
+RDEPENDS_${PN} += "python-argparse python-compiler"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc
index 6140250..4feb9a0 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc
@@ -3,18 +3,21 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=c39b24965f4aef64222cb35de9d47cc4"
 
-SRC_URI[md5sum] = "401c005bd57f71e63ba015ab086fe67d"
-SRC_URI[sha256sum] = "f46e49e0340a532764991c498244a60e3a37d7424a532b3ff1a6a7653f1a403a"
+SRC_URI[md5sum] = "1b83a25d45fad893f430fc5031653c56"
+SRC_URI[sha256sum] = "117bad36c1a787e1a8a659df35de53ba05f9f3398fb9e4ac17e80ad5903eb8c5"
 
 SRC_URI_append = " file://0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch \
                    file://pytest_version_fix.patch "
 
 RDEPENDS_${PN}_class-target += " \
-    ${PYTHON_PN}-argparse \
+    ${PYTHON_PN}-attrs \
     ${PYTHON_PN}-debugger \
+    ${PYTHON_PN}-doctest \
     ${PYTHON_PN}-json \
+    ${PYTHON_PN}-pluggy \
     ${PYTHON_PN}-py \
     ${PYTHON_PN}-setuptools \
+    ${PYTHON_PN}-six \
 "
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/python-pytest:"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch
index e283b17..06dfcdf 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch
@@ -1,29 +1,32 @@
-From e2d81009c790b4ebeced8408b6bae78060cabcaf Mon Sep 17 00:00:00 2001
+From 24a901fd17926e8e05be4ed2e01b0113a2e3a852 Mon Sep 17 00:00:00 2001
 From: Derek Straka <derek@asterius.io>
-Date: Wed, 5 Jul 2017 09:35:51 -0400
-Subject: [PATCH 1/1] setup.py: remove the setup_requires for setuptools-scm
+Date: Tue, 19 Dec 2017 11:36:39 -0500
+Subject: [PATCH] [PATCH 1/1] setup.py: remove the setup_requires for
+ setuptools-scm
 
 The setup_requires argument forces the download of the egg file for setuptools-scm
 during the do_compile phase.  This download is incompatible with the typical fetch
 and mirror structure.  The only usage of scm is the generation of the _version.py
 file and in the release tarball it is already correctly created
 
+Upstream-Status: Inappropriate [oe specific]
+
 Signed-off-by: Derek Straka <derek@asterius.io>
 ---
  setup.py | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/setup.py b/setup.py
-index 751868c..ef6ebf1 100644
+index 3eb38ef..1163202 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -71,7 +71,6 @@ def main():
+@@ -82,7 +82,6 @@ def main():
          keywords="test unittest",
          cmdclass={'test': PyTest},
          # the following should be enabled for release
 -        setup_requires=['setuptools-scm'],
+         python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
          install_requires=install_requires,
          extras_require=extras_require,
-         packages=['_pytest', '_pytest.assertion', '_pytest._code', '_pytest.vendored_packages'],
 -- 
 2.7.4
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch
index 908f862..b373d93 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch
@@ -36,7 +36,7 @@
 +        return version_match.group(1)
 +    raise RuntimeError("Unable to find version string.")
  
- def has_environment_marker_support():
+ def get_environment_marker_support_level():
      """
 @@ -59,9 +72,7 @@ def main():
          name='pytest',
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.2.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.2.2.bb
deleted file mode 100644
index d322f09..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.2.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit pypi setuptools
-require python-pytest.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.4.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.4.2.bb
new file mode 100644
index 0000000..201ab05
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.4.2.bb
@@ -0,0 +1,8 @@
+inherit pypi setuptools
+require python-pytest.inc
+
+RDEPENDS_${PN}_class-target += " \
+    ${PYTHON_PN}-argparse \
+    ${PYTHON_PN}-compiler \
+    ${PYTHON_PN}-funcsigs \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz.inc
index 1c6564b..519487f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz.inc
@@ -1,17 +1,19 @@
 SUMMARY = "World timezone definitions, modern and historical"
 HOMEPAGE = "http://pythonhosted.org/pytz"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=39ea92752a35cf67d8a885d8e3af3c69"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4878a915709225bceab739bdc2a18e8d"
 
 inherit pypi
-PYPI_PACKAGE_EXT = "zip"
 
-SRC_URI[md5sum] = "f89bde8a811c8a1a5bac17eaaa94383c"
-SRC_URI[sha256sum] = "f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589"
+SRC_URI[md5sum] = "f054437920c895dd14a4509fabafe029"
+SRC_URI[sha256sum] = "c06425302f2cf668f1bba7a0a03f3c1d34d4ebeef2c72003da308b3947c7f749"
 
 RDEPENDS_${PN}_class-target += "\
     ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-doctest \
     ${PYTHON_PN}-io \
+    ${PYTHON_PN}-pickle \
+    ${PYTHON_PN}-pprint \
     ${PYTHON_PN}-threading \
 "
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz_2017.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz_2018.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz_2017.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pytz_2018.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev.inc
index ab4c5fd..cb906c9 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev.inc
@@ -14,6 +14,5 @@
     ${PYTHON_PN}-ctypes \
     ${PYTHON_PN}-misc \
     ${PYTHON_PN}-six \
-    ${PYTHON_PN}-subprocess \
     ${PYTHON_PN}-threading \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb
index 32573b7..a3e1501 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb
@@ -2,6 +2,7 @@
 
 RDEPENDS_${PN} = "\
     ${PYTHON_PN}-contextlib \
+    ${PYTHON_PN}-subprocess \
 "
 
 inherit pypi setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb.inc
index af20109..30bbe85 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb.inc
@@ -1,10 +1,10 @@
 SUMMARY = "PyUSB provides USB access on the Python language"
 HOMEPAGE = "http://pyusb.sourceforge.net/"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=50d46bda6248a0b4a46a6d59a66ee08e"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=51691ed11cc2c7ae93e383f60ed49b0f"
 DEPENDS += "libusb1"
 
-SRC_URI[md5sum] = "bc12e83ff3ef1045d4306d13a9955fc1"
-SRC_URI[sha256sum] = "14ec66077bdcd6f1aa9e892a0a35a54bb3c1ec56aa740ead64349c18f0186d19"
+SRC_URI[md5sum] = "862b56452c64948c787ad8ef9498590b"
+SRC_URI[sha256sum] = "4e9b72cc4a4205ca64fbf1f3fff39a335512166c151ad103e55c8223ac147362"
 
 inherit pypi
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb_1.0.0b2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb_1.0.0b2.bb
deleted file mode 100644
index bb73d9f..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb_1.0.0b2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit distutils
-require python-pyusb.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb_1.0.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb_1.0.2.bb
new file mode 100644
index 0000000..99a795b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyusb_1.0.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-pyusb.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyyaml.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyyaml.inc
index a3cf677..3fef0ca 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyyaml.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyyaml.inc
@@ -11,4 +11,8 @@
 SRC_URI[md5sum] = "4c129761b661d181ebf7ff4eb2d79950"
 SRC_URI[sha256sum] = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"
 
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-datetime \
+"
+
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-redis.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-redis.inc
index 571bb08..1a65d73 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-redis.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-redis.inc
@@ -6,3 +6,7 @@
 
 SRC_URI[md5sum] = "048348d8cfe0b5d0bba2f4d835005c3b"
 SRC_URI[sha256sum] = "a22ca993cea2962dbb588f9f30d0015ac4afcc45bee27d3978c0dbe9e97c6c0f"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-datetime \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-robotframework.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-robotframework.inc
new file mode 100644
index 0000000..78bbbc6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-robotframework.inc
@@ -0,0 +1,26 @@
+SUMMARY = "A Python generic test automation framework"
+DESCRIPTION = "Generic open source test atomation framework for acceptance\
+testing and acceptance test-driven development (ATDD). It has easy-to-use\
+tabular test data syntax and it utilizes the keyword-driven testing approach.\
+Its testing capabilities can be extended by test libraries implemented either\
+with Python or Java, and users can create new higher-level keywords from\
+existing ones using the same syntax that is used for creating test cases."
+HOMEPAGE = "http://robotframework.org"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+inherit pypi
+
+SRC_URI[md5sum] = "ea49a54b9d7e38302712194e85c37eaa"
+SRC_URI[sha256sum] = "2018f233568227f9af8c366f93e243a157b742f3baf5b649ecc9750ac0ee1ff7"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-pprint \
+    ${PYTHON_PN}-xml \
+    ${PYTHON_PN}-difflib \
+    ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-html \
+    ${PYTHON_PN}-docutils \
+    ${PYTHON_PN}-ctypes \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-robotframework_3.0.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-robotframework_3.0.2.bb
new file mode 100644
index 0000000..ff7dedb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-robotframework_3.0.2.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-robotframework.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-zlib \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt.inc
new file mode 100644
index 0000000..783d05b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "Bindings for the scrypt key derivation function library"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=8bef8e6712b1be5aa76af1ebde9d6378"
+HOMEPAGE="https://bitbucket.org/mhallin/py-scrypt/overview"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/python-scrypt:"
+
+SRC_URI += "file://0001-py-scrypt-remove-the-hard-coded-include-paths.patch"
+
+SRC_URI[md5sum] = "ae8e3263aa31b040c1f9c7f1e1843a56"
+SRC_URI[sha256sum] = "f8239b2d47fa1d40bc27efd231dc7083695d10c1c2ac51a99380360741e0362d"
+
+inherit pypi
+
+RDEPENDS_${PN}_class-target += "\
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt/0001-py-scrypt-remove-the-hard-coded-include-paths.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt/0001-py-scrypt-remove-the-hard-coded-include-paths.patch
new file mode 100644
index 0000000..d535e43
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt/0001-py-scrypt-remove-the-hard-coded-include-paths.patch
@@ -0,0 +1,26 @@
+From d8db473ce9346cd6254c90e13ac45b3bbde494c4 Mon Sep 17 00:00:00 2001
+From: Derek Straka <derek@asterius.io>
+Date: Sun, 11 Mar 2018 19:55:38 -0400
+Subject: [PATCH] py-scrypt: remove the hard coded include paths
+
+Upstream-Status: Pending
+
+Signed-off-by: Derek Straka <derek@asterius.io>
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index e36adc4..2ebfbf1 100644
+--- a/setup.py
++++ b/setup.py
+@@ -24,7 +24,6 @@ if sys.platform.startswith('linux'):
+                      ('HAVE_SYS_SYSINFO_H', '1'),
+                      ('_FILE_OFFSET_BITS', '64')]
+     libraries = ['crypto', 'rt']
+-    includes = ['/usr/local/include', '/usr/include']
+     CFLAGS.append('-O2')
+ elif sys.platform.startswith('win32'):
+     define_macros = [('inline', '__inline')]
+-- 
+2.7.4
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt_0.8.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt_0.8.6.bb
new file mode 100644
index 0000000..9fbd00e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-scrypt_0.8.6.bb
@@ -0,0 +1,3 @@
+inherit setuptools python-dir
+require python-scrypt.inc
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent.inc
index 6454ee0..3f51bc2 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent.inc
@@ -1,9 +1,9 @@
 SUMMARY = "Serialization based on ast.literal_eval"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=9f611d4c9e2816d387bab64c40d93294"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=acdea68f0e5a89eb6cbfdf54e38c356e"
 
-SRC_URI[md5sum] = "d9d6afa51f2560cf5933dcdfd947011d"
-SRC_URI[sha256sum] = "8480ce3d8864b8974d9fe396998c6a7dae96edb68edf905bfd32ea9a11853ba5"
+SRC_URI[md5sum] = "d0c50f1943ff86d830eb3fe40f6dc1e3"
+SRC_URI[sha256sum] = "b6855483d95a03b6aee358363684cd38a3a670240da5bc6da4253079cb07b8df"
 
 inherit pypi
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent_1.23.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent_1.24.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent_1.23.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-serpent_1.24.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm.inc
index 81bbf33..eb66580 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm.inc
@@ -1,14 +1,14 @@
 SUMMARY = "the blessed package to manage your versions by scm tags"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=838c366f69b72c5df05c96dff79b35f2"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
 
-SRC_URI[md5sum] = "f17493d53f0d842bb0152f214775640b"
-SRC_URI[sha256sum] = "49ab4685589986a42da85706b3311a2f74f1af567d39fee6cb1e088d7a75fb5f"
+SRC_URI[md5sum] = "1b55f9cedde4a33ab5d286c5f30e86db"
+SRC_URI[sha256sum] = "e163e8a12d2121f77575773cfc2b5988275dc1f1d2541fdf780127c29dbbea9c"
 
 PYPI_PACKAGE = "setuptools_scm"
 inherit pypi
 
-RDEPENDS_${PN}_class-target = "${PYTHON_PN}-py ${PYTHON_PN}-setuptools ${PYTHON_PN}-argparse ${PYTHON_PN}-debugger ${PYTHON_PN}-json"
+RDEPENDS_${PN}_class-target = "${PYTHON_PN}-py ${PYTHON_PN}-setuptools ${PYTHON_PN}-debugger ${PYTHON_PN}-json"
 RDEPENDS_${PN}_class-native = "${PYTHON_PN}-setuptools-native"
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm_1.15.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm_1.15.6.bb
deleted file mode 100644
index 5f9bb0b..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm_1.15.6.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-setuptools-scm.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm_1.15.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm_1.15.7.bb
new file mode 100644
index 0000000..64b36e3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-setuptools-scm_1.15.7.bb
@@ -0,0 +1,4 @@
+inherit setuptools
+require python-setuptools-scm.inc
+
+RDEPENDS_${PN} += "${PYTHON_PN}-argparse"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson.inc
index 13c0456..e28d518 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson.inc
@@ -4,14 +4,20 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c6338d7abd321c0b50a2a547e441c52e"
 
-SRC_URI[md5sum] = "6e2f1bd5fb0a926facf5d89d217a7183"
-SRC_URI[sha256sum] = "01a22d49ddd9a168b136f26cac87d9a335660ce07aa5c630b8e3607d6f4325e7"
+SRC_URI[md5sum] = "870bf6257465ce2ee8cad14e2394f7eb"
+SRC_URI[sha256sum] = "4c4ecf20e054716cc1e5a81cadc44d3f4027108d8dd0861d8b1e3bd7a32d4f0a"
 
 inherit pypi
 
 RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-re \
     ${PYTHON_PN}-io \
     ${PYTHON_PN}-netserver \
     ${PYTHON_PN}-numbers \
 "
+
+PACKAGES =+ "${PN}-tests"
+RDEPENDS_${PN}-tests = "${PN} ${PYTHON_PN}-unittest"
+FILES_${PN}-tests+= " \
+    ${PYTHON_SITEPACKAGES_DIR}/simplejson/tests \
+    ${PYTHON_SITEPACKAGES_DIR}/simplejson/tool.py* \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson_3.11.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson_3.11.1.bb
deleted file mode 100644
index e33edfe..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson_3.11.1.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-simplejson.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson_3.13.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson_3.13.2.bb
new file mode 100644
index 0000000..24ad9a9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-simplejson_3.13.2.bb
@@ -0,0 +1,4 @@
+inherit setuptools
+require python-simplejson.inc
+
+RDEPENDS_${PN} += "${PYTHON_PN}-re"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus.inc
index ded30ce..f472a57 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus.inc
@@ -1,18 +1,12 @@
 SUMMARY = "Set of i2c tools for linux - Python module"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://smbusmodule.c;startline=1;endline=17;md5=fa24df321a520ff8e10f203425ab9fa8"
+LIC_FILES_CHKSUM = "file://smbusmodule.c;beginline=1;endline=17;md5=fa24df321a520ff8e10f203425ab9fa8"
+PR = "r1"
 
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/i2c-tools-${PV}.tar.bz2 \
-"
-SRC_URI[md5sum] = "7104a1043d11a5e2c7b131614eb1b962"
-SRC_URI[sha256sum] = "db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441"
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/i2c-tools-${PV}.tar.gz "
+SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa"
+SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403"
 
 DEPENDS += "i2c-tools"
 
 S = "${WORKDIR}/i2c-tools-${PV}/py-smbus/"
-
-do_configure_prepend() {
-    # Adjust for OE header rename
-    sed -i s:linux/i2c-dev.h:linux/i2c-dev-user.h: Module.mk
-    sed -i s:linux/i2c-dev.h:linux/i2c-dev-user.h: smbusmodule.c
-}
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus_3.1.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus_4.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus_3.1.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-smbus_4.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-snimpy_0.8.11.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-snimpy_0.8.11.bb
deleted file mode 100644
index cbdc6bd..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-snimpy_0.8.11.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Interactive SNMP tool"
-DESCRIPTION = "Snimpy is a Python-based tool providing a simple interface to build SNMP query"
-HOMEPAGE = "https://pypi.python.org/pypi/snimpy"
-SECTION = "devel/python"
-
-DEPENDS = "libsmi python-cffi-native python-vcversioner-native"
-
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://docs/license.rst;md5=7c53ab2d1240828625c3e093d049d4f4"
-
-SRCNAME = "snimpy"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "7f6270ce2e7206df165602e66d5ceb96"
-SRC_URI[sha256sum] = "10410614c7bff1053ca65bd760ce919f1a074f4988b857df4c57cf35847922b0"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "python-cffi \
-                  python-pycparser \
-                  python-pysnmp \
-                  python-setuptools \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-snimpy_0.8.12.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-snimpy_0.8.12.bb
new file mode 100644
index 0000000..c5af48d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-snimpy_0.8.12.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Interactive SNMP tool"
+DESCRIPTION = "Snimpy is a Python-based tool providing a simple interface to build SNMP query"
+HOMEPAGE = "https://pypi.python.org/pypi/snimpy"
+SECTION = "devel/python"
+
+DEPENDS += "libsmi python-cffi-native python-vcversioner-native"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://docs/license.rst;md5=7c53ab2d1240828625c3e093d049d4f4"
+
+SRC_URI[md5sum] = "6d016b6356db432e6a87ad708eb8fcb6"
+SRC_URI[sha256sum] = "04efcfba867ffb0e10cc8d7f93a553ceb6bdf2ee34e49762749028a2c76096c1"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "python-cffi \
+                  python-pycparser \
+                  python-pysnmp \
+                  python-setuptools \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-speaklater.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-speaklater.inc
new file mode 100644
index 0000000..94fa8a6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-speaklater.inc
@@ -0,0 +1,9 @@
+DESCRIPTION = "Media asset management for Python, with glue code for various frameworks"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b810770075a29bf44b96607440e7c801"
+
+SRC_URI[md5sum] = "e8d5dbe36e53d5a35cff227e795e8bbf"
+SRC_URI[sha256sum] = "59fea336d0eed38c1f0bf3181ee1222d0ef45f3a9dd34ebe65e6bfffdd6a65a9"
+
+PYPI_PACKAGE = "speaklater"
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-speaklater_1.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-speaklater_1.3.bb
new file mode 100644
index 0000000..56fd555
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-speaklater_1.3.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-speaklater.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy.inc
index cc8e82f..0c191ae 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy.inc
@@ -2,13 +2,13 @@
 application developers the full power and flexibility of SQL"
 HOMEPAGE = "http://www.sqlalchemy.org/"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=452f4b8adb0feba42e5be5f1fbfbf538"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1c412c9d8d1ce018f7a9374407c22bb"
 
 PYPI_PACKAGE = "SQLAlchemy"
 inherit pypi
 
-SRC_URI[md5sum] = "b32669d53e903b3512065026552f3bff"
-SRC_URI[sha256sum] = "f1191e29e35b6fe1aef7175a09b1707ebb7bd08d0b17cb0feada76c49e5a2d1e"
+SRC_URI[md5sum] = "03db1c8f8ae911977c0bf3950a4c9c21"
+SRC_URI[sha256sum] = "6b55ec379c11ad696f9371ce8e0de93c7f21134323f56a56a1b0d8fbef17013c"
 
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-json \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy_1.1.14.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy_1.1.17.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy_1.1.14.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-sqlalchemy_1.1.17.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd.inc
new file mode 100644
index 0000000..5be5de0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Python interface for libsystemd"
+HOMEPAGE = "https://github.com/systemd/python-systemd"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4fbd65380cdd255951079008b364516c"
+
+PYPI_PACKAGE = "systemd-python"
+DEPENDS += "systemd (<=234)"
+RDEPENDS_${PN} += "systemd ${PYTHON_PN}-syslog ${PYTHON_PN}-logging"
+REQUIRED_DISTRO_FEATURES = "systemd"
+inherit pypi distro_features_check
+
+SRC_URI[md5sum] = "5071ea5bcb976186e92a3f5e75df221d"
+SRC_URI[sha256sum] = "fd0e44bf70eadae45aadc292cb0a7eb5b0b6372cd1b391228047d33895db83e7"
+
+# allow for common patches for python- and python3-systemd
+FILESEXTRAPATHS_prepend := "${THISDIR}/python-systemd:"
+
+SRC_URI_append_libc-musl = " file://0001-Provide-implementation-of-strndupa-for-musl.patch"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd/0001-Provide-implementation-of-strndupa-for-musl.patch b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd/0001-Provide-implementation-of-strndupa-for-musl.patch
new file mode 100644
index 0000000..d7085a8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd/0001-Provide-implementation-of-strndupa-for-musl.patch
@@ -0,0 +1,42 @@
+From 8b639f9faf6199e47b9eae0698d01a22917b6abe Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Fri, 29 Dec 2017 09:17:17 -0800
+Subject: [PATCH] Provide implementation of strndupa for musl
+
+Reuse the approach from oe-core:
+/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
+
+Original patch author: Emil Renner Berthing <systemd@esmil.dk>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com
+---
+Upstream-Status: Pending
+
+ systemd/util.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/systemd/util.c b/systemd/util.c
+index e02c825..277e611 100644
+--- a/systemd/util.c
++++ b/systemd/util.c
+@@ -34,6 +34,17 @@
+ 
+ #include "util.h"
+ 
++#if !HAVE_DECL_STRNDUPA
++#define strndupa(s, n) \
++  ({ \
++    const char *__old = (s); \
++    size_t __len = strnlen(__old, (n)); \
++    char *__new = (char *)alloca(__len + 1); \
++    __new[__len] = '\0'; \
++    (char *)memcpy(__new, __old, __len); \
++  })
++#endif
++
+ int safe_atou(const char *s, unsigned *ret_u) {
+         char *x = NULL;
+         unsigned long l;
+-- 
+2.13.6
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd_234.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd_234.bb
index ef11831..80f2900 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd_234.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-systemd_234.bb
@@ -1,13 +1,2 @@
-SUMMARY = "Python interface for libsystemd"
-HOMEPAGE = "https://github.com/systemd/python-systemd"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4fbd65380cdd255951079008b364516c"
-
-PYPI_PACKAGE = "systemd-python"
-DEPENDS += "systemd (<=234)"
-RDEPENDS_${PN} += "systemd"
-REQUIRED_DISTRO_FEATURES = "systemd"
-inherit pypi setuptools distro_features_check
-
-SRC_URI[md5sum] = "5071ea5bcb976186e92a3f5e75df221d"
-SRC_URI[sha256sum] = "fd0e44bf70eadae45aadc292cb0a7eb5b0b6372cd1b391228047d33895db83e7"
+require python-systemd.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado.inc
index 2c58655..29d10da 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado.inc
@@ -4,13 +4,14 @@
 polling, WebSockets, and other applications that require a long-lived connection to each user."
 HOMEPAGE = "http://www.tornadoweb.org/en/stable/"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://setup.py;startline=2;endline=15;md5=5ab7571a79ad62d0ca7aea308bac7560"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=3;endline=15;md5=8d463fc66ff8f275354ffe88d1896e12"
 
-SRC_URI[md5sum] = "ab41f6765d58089f30ba51e8ec084a7b"
-SRC_URI[sha256sum] = "1fb8e494cd46c674d86fac5885a3ff87b0e283937a47d74eb3c02a48c9e89ad0"
+SRC_URI[md5sum] = "a5fc7fd4aea94867609a491ce65786f1"
+SRC_URI[sha256sum] = "6d14e47eab0e15799cf3cdcc86b0b98279da68522caace2bd7ce644287685f0a"
 
-RDEPENDS_${PN} += "${PYTHON_PN}-compression ${PYTHON_PN}-numbers ${PYTHON_PN}-email ${PYTHON_PN}-subprocess \
-                   ${PYTHON_PN}-pkgutil ${PYTHON_PN}-html ${PYTHON_PN}-json ${PYTHON_PN}-certifi ${PYTHON_PN}-threading"
+RDEPENDS_${PN} += "${PYTHON_PN}-compression ${PYTHON_PN}-numbers ${PYTHON_PN}-email \
+                   ${PYTHON_PN}-pkgutil ${PYTHON_PN}-html ${PYTHON_PN}-json ${PYTHON_PN}-certifi ${PYTHON_PN}-threading \
+                   ${PYTHON_PN}-ctypes"
 
 RDEPENDS_${PN}-test += "${PN} ${PYTHON_PN}-unittest"
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado_4.5.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado_4.5.2.bb
deleted file mode 100644
index 5d11475..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado_4.5.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-inherit pypi setuptools
-require python-tornado.inc
-RDEPENDS_${PN} += "${PYTHON_PN}-backports-ssl ${PYTHON_PN}-backports-abc ${PYTHON_PN}-singledispatch"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado_4.5.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado_4.5.3.bb
new file mode 100644
index 0000000..193a4db
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-tornado_4.5.3.bb
@@ -0,0 +1,8 @@
+inherit pypi setuptools
+require python-tornado.inc
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-backports-abc \
+    ${PYTHON_PN}-backports-ssl \
+    ${PYTHON_PN}-singledispatch \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted.inc
index 0dd584f..6480ad5 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted.inc
@@ -39,6 +39,10 @@
     ${PN}-bin \
 "
 
+DEPENDS += " \
+    ${PYTHON_PN}-incremental-native \
+"
+
 RDEPENDS_${PN} = "\
     ${PN}-bin \
     ${PN}-core \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted_17.9.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted_17.9.0.bb
index 7fc8c65..2be1709 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted_17.9.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twisted_17.9.0.bb
@@ -2,9 +2,3 @@
 require python-twisted.inc
 
 RDEPENDS_${PN}-core += "${PYTHON_PN}-contextlib"
-
-# Not yet ported to py3 yet available in py2
-# See src/twisted/python/_setup.py -- notPortedModules
-RDEPENDS_${PN} += "\
-    ${PN}-news \
-    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twofish.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twofish.inc
new file mode 100644
index 0000000..79ab285
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twofish.inc
@@ -0,0 +1,13 @@
+SUMMARY = "Bindings for the Twofish implementation by Niels Ferguson"
+DESCRIPTION = "Bindings for the Twofish implementation by Niels Ferguson\
+ libtwofish-dev."
+HOMEPAGE = "http://github.com/keybase/python-twofish"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=33a63abf6d7567b1689d8ce69f00e43b"
+
+SRC_URI[md5sum] = "d7d22f16dc4ffa0e3ae2200654033abe"
+SRC_URI[sha256sum] = "b09d8bb50d33b23ff34cafb1f9209f858f752935c6a5c901efb92a41acb830fa"
+
+inherit pypi
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twofish_0.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twofish_0.3.0.bb
new file mode 100644
index 0000000..85b0215
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-twofish_0.3.0.bb
@@ -0,0 +1,2 @@
+require python-twofish.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing.inc
index 46be47c..a0ee6b2 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing.inc
@@ -3,7 +3,7 @@
 LICENSE = "PSF"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=64fc2b30b67d0a8423c250e0386ed72f"
 
-SRC_URI[md5sum] = "143af0bf3afd1887622771f2f1ffe8e1"
-SRC_URI[sha256sum] = "d514bd84b284dd3e844f0305ac07511f097e325171f6cc4a20878d11ad771849"
+SRC_URI[md5sum] = "5b2ade08d83be488f17b5fe587c27c74"
+SRC_URI[sha256sum] = "d400a9344254803a2368533e4533a4200d21eb7b6b729c173bc38201a74db3f2"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing_3.6.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing_3.6.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing_3.6.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-typing_3.6.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ujson.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ujson.inc
index 9654d5a..c3d0bfe 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ujson.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-ujson.inc
@@ -2,7 +2,7 @@
 DESCRIPTION = "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3."
 
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;startline=8;endline=9;md5=4f369b3c3c290b4aede8796a4065e5ab"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
 
 SRC_URI[md5sum] = "42f77b0cce686dfa4da2e68480b1dd24"
 SRC_URI[sha256sum] = "f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff.inc
index 0402550..fc12062 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff.inc
@@ -3,7 +3,12 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=4c434b08ef42fea235bb019b5e5a97b3"
 
-SRC_URI[md5sum] = "c8099edf89d2e3bac16123766625a38b"
-SRC_URI[sha256sum] = "a7baf71846a68c5305a7d6005dfb5eca8798f13861176355a285cbda3206824d"
+SRC_URI[md5sum] = "47f669d7273541fec45e4cc0fba8d8e9"
+SRC_URI[sha256sum] = "9c9ab5fb96b6988b4cd5def6b275492442c04a570900d33aa6373105780025bc"
 
 inherit pypi
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-codecs \
+    ${PYTHON_PN}-io \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff_0.5.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff_0.5.5.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff_0.5.4.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-unidiff_0.5.5.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-visitor.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-visitor.inc
new file mode 100644
index 0000000..8c2288c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-visitor.inc
@@ -0,0 +1,6 @@
+SUMMARY = "A tiny pythonic visitor implementation."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
+
+SRC_URI[md5sum] = "94a024ed0ec1b02b4497c15267d319ca"
+SRC_URI[sha256sum] = "2c737903b2b6864ebc6167eef7cf3b997126f1aa94bdf590f90f1436d23e480a"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-visitor_0.1.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-visitor_0.1.3.bb
index 1236506..eee25a5 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-visitor_0.1.3.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-visitor_0.1.3.bb
@@ -1,8 +1,2 @@
-SUMMARY = "A tiny pythonic visitor implementation."
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
-
-SRC_URI[md5sum] = "94a024ed0ec1b02b4497c15267d319ca"
-SRC_URI[sha256sum] = "2c737903b2b6864ebc6167eef7cf3b997126f1aa94bdf590f90f1436d23e480a"
-
 inherit pypi setuptools
+require python-visitor.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors.inc
index fe1ab95..a02bbbb 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors.inc
@@ -1,9 +1,9 @@
 SUMMARY = "Simple Python module for working with HTML/CSS color definitions."
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=358df7e9eb65e1843dbb36abd476c5c0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=197add016087e6884a012b0f185d44ad"
 
-SRC_URI[md5sum] = "4733fa1077f680bbdd918cdef1e32c11"
-SRC_URI[sha256sum] = "e47e68644d41c0b1f1e4d939cfe4039bdf1ab31234df63c7a4f59d4766487206"
+SRC_URI[md5sum] = "40890db38b2a856e526a568864025fe6"
+SRC_URI[sha256sum] = "030562f624467a9901f0b455fef05486a88cfb5daa1e356bd4aacea043850b59"
 
 RDEPENDS_${PN}_class-target = "\
     ${PYTHON_PN}-stringold \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors_1.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors_1.8.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors_1.7.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webcolors_1.8.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webencodings.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webencodings.inc
index ed57c52..34ca706 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webencodings.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-webencodings.inc
@@ -1,10 +1,13 @@
 SUMMARY = "Character encoding aliases for legacy web content"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;startline=8;endline=9;md5=af5c81bfe98855a56d36b6ba5de2906f"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709"
 
 SRC_URI[md5sum] = "32f6e261d52e57bf7e1c4d41546d15b8"
 SRC_URI[sha256sum] = "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"
 
 inherit pypi
 
-RDEPENDS_${PN} += "${PYTHON_PN}-codecs"
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-codecs \
+    ${PYTHON_PN}-json \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug.inc
index b2949a3..c04a4e0 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug.inc
@@ -8,15 +8,23 @@
 of community contributed addon modules."
 HOMEPAGE = "http://werkzeug.pocoo.org/"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a68f5361a2b2ca9fdf26b38aaecb6faa"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ed9a0b7c0254616d72dadb98b293ef1b"
 
-SRC_URI[md5sum] = "e385b2c5a7193cff24c689b31e1124dc"
-SRC_URI[sha256sum] = "903a7b87b74635244548b30d30db4c8947fe64c5198f58899ddcd3a13c23bb26"
+SRC_URI[md5sum] = "6d20b5be2d245be4ac7706cc390d130c"
+SRC_URI[sha256sum] = "c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c"
 
 PYPI_PACKAGE = "Werkzeug"
 
 CLEANBROKEN = "1"
 
+PACKAGES =+ "${PN}-tests"
+FILES_${PN}-tests+= " \
+    ${PYTHON_SITEPACKAGES_DIR}/werkzeug/test* \
+    ${PYTHON_SITEPACKAGES_DIR}/werkzeug/__pycache__/test* \
+    ${PYTHON_SITEPACKAGES_DIR}/werkzeug/contrib/test* \
+    ${PYTHON_SITEPACKAGES_DIR}/werkzeug/contrib/__pycache__/test* \
+"
+
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-datetime \
     ${PYTHON_PN}-difflib \
@@ -24,11 +32,16 @@
     ${PYTHON_PN}-html \
     ${PYTHON_PN}-io \
     ${PYTHON_PN}-json \
+    ${PYTHON_PN}-netclient \
     ${PYTHON_PN}-netserver \
     ${PYTHON_PN}-numbers \
     ${PYTHON_PN}-pkgutil \
     ${PYTHON_PN}-pprint \
-    ${PYTHON_PN}-subprocess \
     ${PYTHON_PN}-threading \
     ${PYTHON_PN}-unixadmin \
 "
+
+RDEPENDS_${PN}-tests = " \
+    ${PN} \
+    ${PYTHON_PN}-unittest \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug_0.12.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug_0.12.2.bb
deleted file mode 100644
index 3892f13..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug_0.12.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit pypi setuptools
-require python-werkzeug.inc
-
-RDEPENDS_${PN} += "${PYTHON_PN}-zlib"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug_0.14.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug_0.14.1.bb
new file mode 100644
index 0000000..db41161
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-werkzeug_0.14.1.bb
@@ -0,0 +1,7 @@
+inherit pypi setuptools
+require python-werkzeug.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-zlib \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh.inc
index 0a2cf3b..a4ca5dc 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh.inc
@@ -12,3 +12,13 @@
 
 PYPI_PACKAGE = "Whoosh"
 PYPI_PACKAGE_EXT = "zip"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-email \
+    ${PYTHON_PN}-multiprocessing \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-numbers \
+    ${PYTHON_PN}-pickle \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-stringold \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh_2.7.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh_2.7.4.bb
index 48df360..3b4291f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh_2.7.4.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-whoosh_2.7.4.bb
@@ -1,2 +1,6 @@
 inherit pypi setuptools
 require python-whoosh.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-wtforms.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-wtforms.inc
new file mode 100644
index 0000000..916697f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-wtforms.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "A flexible forms validation and rendering library for python web development."
+HOMEPAGE = "https://pypi.python.org/pypi/WTForms"
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=c459accc90c6ed6a94878c8fe0535be2"
+
+SRC_URI[md5sum] = "6938a541fafd1a1ae2f6b9b88588eef2"
+SRC_URI[sha256sum] = "ffdf10bd1fa565b8233380cb77a304cd36fd55c73023e91d4b803c96bc11d46f"
+
+PYPI_PACKAGE = "WTForms"
+PYPI_PACKAGE_EXT = "zip"
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-netserver \
+    ${PYTHON_PN}-numbers \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-wtforms_2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-wtforms_2.1.bb
index 5ddcb48..fdb015e 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-wtforms_2.1.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-wtforms_2.1.bb
@@ -1,18 +1,2 @@
-DESCRIPTION = "A flexible forms validation and rendering library for python web development."
-HOMEPAGE = "https://pypi.python.org/pypi/WTForms"
-SECTION = "devel/python"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=c459accc90c6ed6a94878c8fe0535be2"
-
-SRC_URI[md5sum] = "6938a541fafd1a1ae2f6b9b88588eef2"
-SRC_URI[sha256sum] = "ffdf10bd1fa565b8233380cb77a304cd36fd55c73023e91d4b803c96bc11d46f"
-
-PYPI_PACKAGE = "WTForms"
-PYPI_PACKAGE_EXT = "zip"
-
 inherit pypi setuptools
-
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-netserver \
-    ${PYTHON_PN}-numbers \
-    "
+require python-wtforms.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic-font-awesome.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic-font-awesome.inc
new file mode 100644
index 0000000..d13cb83
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic-font-awesome.inc
@@ -0,0 +1,17 @@
+DESCRIPTION = "Font Awesome icons packaged for setuptools (easy_install) / pip."
+HOMEPAGE = "https://pypi.python.org/pypi/XStatic-Font-Awesome"
+SECTION = "devel/python"
+LICENSE = "Apache-2"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=313d021898694cd2b0ea6508bdfe51a2"
+
+PYPI_PACKAGE = "XStatic-Font-Awesome"
+
+inherit pypi
+
+SRC_URI[md5sum] = "141a0e9a7e21e82f922573a00ae0c166"
+SRC_URI[sha256sum] = "e01fb480caaa7c7963dcb3328a4700e631bef6070db0e8b685816d220e685f6c"
+
+DEPENDS += " \
+        ${PYTHON_PN}-xstatic \
+        ${PYTHON_PN}-pip \
+        "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic-font-awesome_4.7.0.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic-font-awesome_4.7.0.0.bb
new file mode 100644
index 0000000..41e85f4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic-font-awesome_4.7.0.0.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-xstatic-font-awesome.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic.inc
new file mode 100644
index 0000000..f7c7db9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic.inc
@@ -0,0 +1,14 @@
+DESCRIPTION = "XStatic base package with minimal support code"
+HOMEPAGE = "https://pypi.python.org/pypi/XStatic"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://README.txt;md5=36a1e7eaa71e1bd07b8d2247839f228e"
+
+PYPI_PACKAGE = "XStatic"
+
+SRC_URI[md5sum] = "7064b5ea7fd1ee990e0ae0538301d9bc"
+SRC_URI[sha256sum] = "0ec93d7c66ebb9e0d31b664753437dc8634cb66e13310cb47c9eb1e0bc66d726"
+
+DEPENDS += " \
+        ${PYTHON_PN}-pip \
+        "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic_1.0.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic_1.0.1.bb
new file mode 100644
index 0000000..8073037
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-xstatic_1.0.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools
+require python-xstatic.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-yappi.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-yappi.inc
new file mode 100644
index 0000000..651ce77
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-yappi.inc
@@ -0,0 +1,16 @@
+SUMMARY  = "Yet Another Python Profiler"
+HOMEPAGE = "http://yappi.googlecode.com/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=6b131c3041637f6a5175a43112dde05c"
+
+SRC_URI[md5sum] = "dc56240575c99938a924eaeb7c0d8beb"
+SRC_URI[sha256sum] = "5f657129e1b9b952379ffbc009357d0dcdb58c50f3bfe88ffbb992e4b27b263c"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += "\
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-pickle \
+    ${PYTHON_PN}-threading \
+    "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-yappi_0.98.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-yappi_0.98.bb
index 51308c8..a3bdde5 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-yappi_0.98.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-yappi_0.98.bb
@@ -1,15 +1,2 @@
-SUMMARY  = "Yet Another Python Profiler"
-HOMEPAGE = "http://yappi.googlecode.com/"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=6b131c3041637f6a5175a43112dde05c"
-
-SRC_URI[md5sum] = "dc56240575c99938a924eaeb7c0d8beb"
-SRC_URI[sha256sum] = "5f657129e1b9b952379ffbc009357d0dcdb58c50f3bfe88ffbb992e4b27b263c"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-pickle \
-    ${PYTHON_PN}-threading \
-    "
+require python-yappi.inc
+inherit setuptools
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-zopeinterface.inc b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-zopeinterface.inc
index 4b38aea..1fab2cc 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-zopeinterface.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python-zopeinterface.inc
@@ -11,6 +11,8 @@
 
 RPROVIDES_${PN} += "zope-interfaces"
 
+RDEPENDS_${PN}_class-target += "${PYTHON_PN}-datetime"
+
 FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/*.egg/*/*/.debug"
 FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/zope/interface/*.c"
 FILES_${PN}-doc += "${PYTHON_SITEPACKAGES_DIR}/zope/interface/*.txt"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_0.9.8.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_0.9.8.bb
new file mode 100644
index 0000000..e248fe7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_0.9.8.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-alembic.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-asn1crypto_0.24.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-asn1crypto_0.24.0.bb
new file mode 100644
index 0000000..cfbe575
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-asn1crypto_0.24.0.bb
@@ -0,0 +1,6 @@
+inherit setuptools3
+require python-asn1crypto.inc
+
+RDEPENDS_${PN}_class-target += " \
+    ${PYTHON_PN}-shell \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_1.5.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_1.6.3.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_1.5.3.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_1.6.3.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-attr_0.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-attr_0.3.1.bb
new file mode 100644
index 0000000..e80648c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-attr_0.3.1.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-attr.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-attrs_17.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-attrs_17.4.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-attrs_17.3.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-attrs_17.4.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_0.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_0.6.0.bb
index 0469e61..2c74764 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_0.6.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-automat_0.6.0.bb
@@ -1,4 +1,2 @@
 inherit setuptools3
 require python-automat.inc
-
-RDEPENDS_${PN} += "${PYTHON_PN}-enum "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-aws-iot-device-sdk-python_1.2.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-aws-iot-device-sdk-python_1.3.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-aws-iot-device-sdk-python_1.2.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-aws-iot-device-sdk-python_1.3.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-babel_2.5.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-babel_2.5.1.bb
deleted file mode 100644
index 05084ac..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-babel_2.5.1.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools3
-require python-babel.inc
-
-# Requires _pydecimal.py which is in misc
-RDEPENDS_${PN} += "${PYTHON_PN}-misc"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-babel_2.5.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-babel_2.5.3.bb
new file mode 100644
index 0000000..0715d59
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-babel_2.5.3.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-babel.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-bcrypt_3.1.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-bcrypt_3.1.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-bcrypt_3.1.3.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-bcrypt_3.1.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-blinker_1.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-blinker_1.4.bb
new file mode 100644
index 0000000..924b3cf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-blinker_1.4.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-blinker.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-can_2.0.0b1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-can_2.0.0b1.bb
deleted file mode 100644
index a1d45b8..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-can_2.0.0b1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require python-can.inc
-inherit pypi setuptools3
-
-RDEPENDS_${PN} += "python3-sqlite3"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-can_2.1.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-can_2.1.0.bb
new file mode 100644
index 0000000..aaa9e81
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-can_2.1.0.bb
@@ -0,0 +1,7 @@
+require python-can.inc
+inherit pypi setuptools3
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-codecs \
+    ${PYTHON_PN}-compression \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.11.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.13.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.11.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.13.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2017.7.27.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2018.1.18.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2017.7.27.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2018.1.18.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.11.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.11.5.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.11.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.11.5.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-click_6.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-click_6.7.bb
index ecd1514..1920644 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-click_6.7.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-click_6.7.bb
@@ -1,4 +1,2 @@
 inherit pypi setuptools3
 require python-click.inc
-
-RDEPENDS_${PN} += "${PYTHON_PN}-enum"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-configparser_3.5.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-configparser_3.5.0.bb
new file mode 100644
index 0000000..770cba5
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-configparser_3.5.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-configparser.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_4.4.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_4.4.1.bb
deleted file mode 100644
index 6aa5c59..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_4.4.1.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "Code coverage measurement for Python"
-HOMEPAGE = "https://coverage.readthedocs.io"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93"
-
-SRC_URI[md5sum] = "4c4d997cb32be4703f1fde54e6cd1b1c"
-SRC_URI[sha256sum] = "7a9c44400ee0f3b4546066e0710e1250fd75831adc02ab99dda176ad8726f424"
-
-inherit pypi setuptools3
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_4.4.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_4.4.2.bb
new file mode 100644
index 0000000..c983e0b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_4.4.2.bb
@@ -0,0 +1,10 @@
+SUMMARY = "Code coverage measurement for Python"
+HOMEPAGE = "https://coverage.readthedocs.io"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93"
+
+SRC_URI[md5sum] = "29a9fe85377e0f7327cf5db1e335483f"
+SRC_URI[sha256sum] = "309d91bd7a35063ec7a0e4d75645488bfab3f0b66373e7722f23da7f5b0f34cc"
+
+inherit pypi setuptools3
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_2.0.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_2.1.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_2.0.3.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_2.1.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography_2.0.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography_2.0.3.bb
deleted file mode 100644
index f807042..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography_2.0.3.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-inherit pypi setuptools3
-require python-cryptography.inc
-
-SRC_URI += " \
-    file://run-ptest \
-"
-
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-lang \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography_2.1.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography_2.1.4.bb
new file mode 100644
index 0000000..1959233
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography_2.1.4.bb
@@ -0,0 +1,8 @@
+inherit pypi setuptools3
+require python-cryptography.inc
+
+LDSHARED += "-pthread"
+
+SRC_URI += " \
+    file://run-ptest \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cython_0.27.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cython_0.28.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cython_0.27.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-cython_0.28.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.6.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.7.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.6.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil_2.7.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-decorator_4.1.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-decorator_4.1.2.bb
deleted file mode 100644
index 7840b20..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-decorator_4.1.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-inherit setuptools3
-require python-decorator.inc
-
-RDEPENDS_${PN}_class-target += "\
-    ${PYTHON_PN}-enum \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-decorator_4.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-decorator_4.3.0.bb
new file mode 100644
index 0000000..844cbdc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-decorator_4.3.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-decorator.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-django_1.11.5.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-django_1.11.10.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-django_1.11.5.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-django_1.11.10.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dnspython_1.15.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dnspython_1.15.0.bb
index 26024c6..ce4dfdc 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dnspython_1.15.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dnspython_1.15.0.bb
@@ -1,9 +1,2 @@
 inherit setuptools3
 require python-dnspython.inc
-
-# Requires _pydecimal.py which is in misc
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-enum \
-    ${PYTHON_PN}-misc \
-    ${PYTHON_PN}-selectors \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.3.1.bb
new file mode 100644
index 0000000..5304ccc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.3.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-dominate.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-editor_1.0.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-editor_1.0.3.bb
new file mode 100644
index 0000000..8ad2b86
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-editor_1.0.3.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-editor.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_0.7.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_0.7.0.bb
new file mode 100644
index 0000000..3a92b6e
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_0.7.0.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-evdev.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-babel_0.11.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-babel_0.11.2.bb
new file mode 100644
index 0000000..104e7c2
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-babel_0.11.2.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-babel.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-bootstrap_3.3.7.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-bootstrap_3.3.7.1.bb
new file mode 100644
index 0000000..877c754
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-bootstrap_3.3.7.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-bootstrap.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-login_0.4.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-login_0.4.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-login_0.4.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-login_0.4.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-mail_0.9.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-mail_0.9.1.bb
new file mode 100644
index 0000000..0b963be
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-mail_0.9.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-mail.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-migrate_2.1.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-migrate_2.1.1.bb
new file mode 100644
index 0000000..c98cbfd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-migrate_2.1.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-migrate.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-nav_0.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-nav_0.6.bb
new file mode 100644
index 0000000..d251152
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-nav_0.6.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-nav.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.6.bb
new file mode 100644
index 0000000..6bff59a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.6.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-flask-restful.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-script_2.0.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-script_2.0.6.bb
new file mode 100644
index 0000000..9f88519
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-script_2.0.6.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-script.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_2.3.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_2.3.2.bb
new file mode 100644
index 0000000..07f45bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_2.3.2.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-sqlalchemy.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-uploads_0.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-uploads_0.2.1.bb
new file mode 100644
index 0000000..758c2ac
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-uploads_0.2.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-uploads.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-user_0.6.19.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-user_0.6.19.bb
new file mode 100644
index 0000000..251017f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-user_0.6.19.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-user.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_0.14.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_0.14.2.bb
new file mode 100644
index 0000000..52362a8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_0.14.2.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-wtf.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-xstatic_0.0.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-xstatic_0.0.1.bb
new file mode 100644
index 0000000..5412bef
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-xstatic_0.0.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-flask-xstatic.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_0.4.12.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_0.4.13.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_0.4.12.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_0.4.13.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-html5lib_0.999999999.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-html5lib_1.0.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-html5lib_0.999999999.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-html5lib_1.0.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-hyperlink_17.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-hyperlink_17.3.1.bb
index 3d30af2..70813bf 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-hyperlink_17.3.1.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-hyperlink_17.3.1.bb
@@ -1,4 +1,2 @@
 inherit setuptools3
 require python-hyperlink.inc
-
-RDEPENDS_${PN} += "${PYTHON_PN}-selectors ${PYTHON_PN}-enum"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_4.2.15.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_4.3.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_4.2.15.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_4.3.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_0.24.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_0.24.bb
index cd30825..a71c20f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_0.24.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-itsdangerous_0.24.bb
@@ -1,2 +1,6 @@
 inherit pypi setuptools3
 require python-itsdangerous.inc
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-compression \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-javaobj-py3_0.2.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-javaobj-py3_0.2.4.bb
new file mode 100644
index 0000000..0ec23ba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-javaobj-py3_0.2.4.bb
@@ -0,0 +1,2 @@
+require python-javaobj-py3.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jinja2_2.10.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jinja2_2.10.bb
new file mode 100644
index 0000000..61156b6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jinja2_2.10.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-jinja2.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jinja2_2.9.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jinja2_2.9.6.bb
deleted file mode 100644
index 8375f8c..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jinja2_2.9.6.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-inherit pypi setuptools3
-require python-jinja2.inc
-
-# Requires _pydecimal which is in misc
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-misc \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonpatch_1.23.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonpatch_1.23.bb
new file mode 100644
index 0000000..73efcee
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonpatch_1.23.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-jsonpatch.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonpointer_2.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonpointer_2.0.bb
new file mode 100644
index 0000000..8d0a09b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonpointer_2.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-jsonpointer.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonschema_2.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonschema_2.6.0.bb
index 5aaee68..9269907 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonschema_2.6.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonschema_2.6.0.bb
@@ -1,6 +1,2 @@
 inherit pypi setuptools3
 require python-jsonschema.inc
-
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-misc \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.37.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.37.bb
deleted file mode 100644
index 362ca1a..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.37.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "langtable is used to guess reasonable defaults for locale,\
-keyboard, territory"
-HOMEPAGE = "https://github.com/mike-fabian/langtable/"
-LICENSE = "GPLv3+"
-SECTION = "devel/python"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-S = "${WORKDIR}/git"
-B = "${S}"
-
-SRCREV = "3f001eef027ba69ef2fdb35c670b7da26b79b5e2"
-PV = "0.0.37+git${SRCPV}"
-SRC_URI = "git://github.com/mike-fabian/langtable.git;branch=master \
-"
-
-inherit setuptools3 python3native
-
-DISTUTILS_INSTALL_ARGS = "--prefix=${D}/${prefix} \
-    --install-data=${D}/${datadir}/langtable"
-
-FILES_${PN} += "${datadir}/*"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb
new file mode 100644
index 0000000..0ca58c7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "langtable is used to guess reasonable defaults for locale,\
+keyboard, territory"
+HOMEPAGE = "https://github.com/mike-fabian/langtable/"
+LICENSE = "GPLv3+"
+SECTION = "devel/python"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+SRCREV = "35687ca957b746f153a6872139462b1443f8cad1"
+PV = "0.0.38+git${SRCPV}"
+SRC_URI = "git://github.com/mike-fabian/langtable.git;branch=master \
+"
+
+inherit setuptools3 python3native
+
+DISTUTILS_INSTALL_ARGS = "--prefix=${D}/${prefix} \
+    --install-data=${D}/${datadir}/langtable"
+
+FILES_${PN} += "${datadir}/*"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-compression \
+    ${PYTHON_PN}-doctest \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-xml \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-lxml_4.1.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-lxml_4.2.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-lxml_4.1.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-lxml_4.2.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_0.4.8.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_0.5.6.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_0.4.8.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-msgpack_0.5.6.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_3.2.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_3.2.0.bb
deleted file mode 100644
index c6556b3..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_3.2.0.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-SUMMARY = "Multidicts are useful for working with HTTP headers, URL query args etc."
-HOMEPAGE = "https://github.com/aio-libs/multidict/"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e74c98abe0de8f798ca609137f9cef4a"
-
-inherit pypi setuptools3
-
-SRC_URI[md5sum] = "a01da31ca1855557a1b2e053c933af2f"
-SRC_URI[sha256sum] = "e27a7a95317371c15ecda7206f6e8c144f10a337bb2c3e61b5176deafbb88cb2"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_3.3.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_3.3.2.bb
new file mode 100644
index 0000000..7f9cd55
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_3.3.2.bb
@@ -0,0 +1,9 @@
+SUMMARY = "Multidicts are useful for working with HTTP headers, URL query args etc."
+HOMEPAGE = "https://github.com/aio-libs/multidict/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e74c98abe0de8f798ca609137f9cef4a"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "06ca91d993de2d04c7ee6df0cbb44ea2"
+SRC_URI[sha256sum] = "f82e61c7408ed0dce1862100db55595481911f159d6ddec0b375d35b6449509b"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ndg-httpsclient_0.4.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ndg-httpsclient_0.4.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ndg-httpsclient_0.4.3.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ndg-httpsclient_0.4.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb
index 35440bc..93df83a 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb
@@ -10,3 +10,5 @@
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 inherit setuptools3 python3native pypi
+
+RDEPENDS_${PN} += "${PYTHON_PN}-datetime"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-oauthlib_2.0.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-oauthlib_2.0.6.bb
new file mode 100644
index 0000000..da13b55
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-oauthlib_2.0.6.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-oauthlib.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.3.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.3.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.3.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_0.20.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_0.22.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_0.20.3.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_0.22.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.5.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.2.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pexpect_4.5.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pid_2.1.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pid_2.1.1.bb
deleted file mode 100644
index c88d9a0..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pid_2.1.1.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Pidfile featuring stale detection and file-locking, can also \
-be used as context-manager or decorator"
-HOMEPAGE = "https://github.com/trbs/pid/"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=83d53cbd3105063f20305bc313464e29"
-
-SRC_URI[md5sum] = "9634b1e3d545544a9d496e25e4530d14"
-SRC_URI[sha256sum] = "b443169d3dc21397695b4a82016fadb4cfdb0ed8b2ddb4aaa428e1701bb34e1f"
-
-inherit pypi setuptools3
-
-SRC_URI += " \
-    file://0001-remove-requirement-of-nose.patch \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pid_2.2.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pid_2.2.0.bb
new file mode 100644
index 0000000..e438319
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pid_2.2.0.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Pidfile featuring stale detection and file-locking, can also \
+be used as context-manager or decorator"
+HOMEPAGE = "https://github.com/trbs/pid/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=83d53cbd3105063f20305bc313464e29"
+
+SRC_URI[md5sum] = "04d30308013d16aa882b3806feda8ab2"
+SRC_URI[sha256sum] = "d8bb2ceec21a4ae84be6e9d320db1f56934b30e676e31c6f098ca7218b3d67d4"
+
+inherit pypi setuptools3
+
+SRC_URI += " \
+    file://0001-remove-requirement-of-nose.patch \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pluggy_0.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pluggy_0.6.0.bb
new file mode 100644
index 0000000..941e8e3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pluggy_0.6.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-pluggy.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ply_3.11.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ply_3.11.bb
new file mode 100644
index 0000000..72410ba
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-ply_3.11.bb
@@ -0,0 +1,2 @@
+require python-ply.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pretend_1.0.8.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pretend_1.0.9.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pretend_1.0.8.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pretend_1.0.9.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_1.0.15.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_1.0.15.bb
index d8f6389..0e99917 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_1.0.15.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_1.0.15.bb
@@ -3,7 +3,5 @@
 
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-datetime \
-    ${PYTHON_PN}-enum \
     ${PYTHON_PN}-shell \
-    ${PYTHON_PN}-textutils \
 "
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.4.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.5.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.4.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.5.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-psutil_5.3.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-psutil_5.4.3.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-psutil_5.3.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-psutil_5.4.3.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-py_1.4.34.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-py_1.5.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-py_1.4.34.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-py_1.5.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.2.1.bb
new file mode 100644
index 0000000..3b1186f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1-modules_0.2.1.bb
@@ -0,0 +1,2 @@
+require python-pyasn1-modules.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1_0.3.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1_0.4.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1_0.3.6.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyasn1_0.4.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.2.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.2.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.2.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pybluez_0.22.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pybluez_0.22.bb
new file mode 100644
index 0000000..9712a76
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pybluez_0.22.bb
@@ -0,0 +1,2 @@
+require python-pybluez.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb
new file mode 100644
index 0000000..02d634c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb
@@ -0,0 +1,9 @@
+inherit distutils3
+require python-pycrypto.inc
+
+# We explicitly call distutils_do_install, since we want it to run, but
+# *don't* want the autotools install to run, since this package doesn't
+# provide a "make install" target.
+do_install() {
+       distutils3_do_install
+}
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pycryptodome_3.4.11.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pycryptodome_3.4.11.bb
new file mode 100644
index 0000000..0c062dd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pycryptodome_3.4.11.bb
@@ -0,0 +1,2 @@
+require python-pycryptodome.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb
new file mode 100644
index 0000000..7ed1c63
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb
@@ -0,0 +1,2 @@
+require python-pydbus.inc
+inherit pypi setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyexpect_1.0.17.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyexpect_1.0.17.bb
new file mode 100644
index 0000000..bfd5840
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyexpect_1.0.17.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-pyexpect.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyiface_0.0.5.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyiface_0.0.5.bb
new file mode 100644
index 0000000..721e7b1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyiface_0.0.5.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-pyiface.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjks_17.1.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjks_17.1.1.bb
new file mode 100644
index 0000000..8982fce
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjks_17.1.1.bb
@@ -0,0 +1,2 @@
+require python-pyjks.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_1.6.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_1.6.1.bb
new file mode 100644
index 0000000..dc16d22
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_1.6.1.bb
@@ -0,0 +1,2 @@
+require python-pyjwt.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_1.7.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_1.8.3.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_1.7.4.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_1.8.3.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.80.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.89.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.80.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.89.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_3.5.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_3.5.1.bb
deleted file mode 100644
index 9f02cab..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_3.5.1.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-inherit pypi setuptools3
-require python-pymongo.inc
-
-# Requires _pydecimal which is in misc
-RDEPENDS_${PYTHON_PN}-bson += " \
-    ${PYTHON_PN}-enum \
-    ${PYTHON_PN}-misc \
-    ${PYTHON_PN}-selectors \
-    ${PYTHON_PN}-subprocess \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_3.6.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_3.6.1.bb
new file mode 100644
index 0000000..5164b18
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_3.6.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-pymongo.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb
new file mode 100644
index 0000000..f6d9e3c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pynetlinux_1.1.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-pynetlinux.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_17.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_17.5.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_17.3.0.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_17.5.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.6.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.6.0.bb
new file mode 100644
index 0000000..ee6f88b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperclip_1.6.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-pyperclip.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.3.22.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.4.21.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.3.22.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.4.21.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb
index 44c1368..17ed3f8 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb
@@ -5,5 +5,3 @@
     rm -f ${D}${bindir}/miniterm.py
     rmdir ${D}${bindir}
 }
-
-RDEPENDS_${PN} += "${PYTHON_PN}-enum ${PYTHON_PN}-selectors"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pysocks_1.6.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pysocks_1.6.7.bb
deleted file mode 100644
index f8aa01b..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pysocks_1.6.7.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-inherit pypi setuptools3
-require python-pysocks.inc
-
-RDEPENDS_${PN}_class-target += "\
-    ${PYTHON_PN}-enum \
-    ${PYTHON_PN}-netclient \
-    ${PYTHON_PN}-selectors \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pysocks_1.6.8.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pysocks_1.6.8.bb
new file mode 100644
index 0000000..bbda05a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pysocks_1.6.8.bb
@@ -0,0 +1,6 @@
+inherit pypi setuptools3
+require python-pysocks.inc
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-netclient \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-runner_2.12.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-runner_3.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-runner_2.12.1.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-runner_3.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.2.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.4.2.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.2.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.4.2.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2017.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2018.4.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2017.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2018.4.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb
index 0292555..a62d944 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb
@@ -1,8 +1,2 @@
 require python-pyudev.inc
-
-RDEPENDS_${PN} = "\
-    ${PYTHON_PN}-lang \
-"
-
 inherit pypi setuptools3
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyusb_1.0.0b2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyusb_1.0.0b2.bb
deleted file mode 100644
index 813e6f0..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyusb_1.0.0b2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit distutils3
-require python-pyusb.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyusb_1.0.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyusb_1.0.2.bb
new file mode 100644
index 0000000..1ecede7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyusb_1.0.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-pyusb.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-requests_2.18.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-requests_2.18.4.bb
index d91d993..0a2410f 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-requests_2.18.4.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-requests_2.18.4.bb
@@ -1,5 +1,2 @@
 inherit setuptools3
 require python-requests.inc
-
-# Add the runtime depends for selectors.py
-RDEPENDS_${PN} += "${PYTHON_PN}-misc"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_3.0.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_3.0.2.bb
new file mode 100644
index 0000000..8f613c3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_3.0.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-robotframework.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-scapy_0.23.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-scapy_0.23.bb
new file mode 100644
index 0000000..3e7baf4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-scapy_0.23.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Packet crafting/sending/sniffing, PCAP processing tool,\
+based on scapy with python3 compatibility"
+SECTION = "devel/python"
+HOMEPAGE = "https://github.com/phaethon/scapy"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=95ea6ecfc360eb47fe6f470ad736d7cd"
+
+inherit pypi setuptools3
+
+PYPI_PACKAGE = "scapy-python3"
+
+SRC_URI[md5sum] = "8642d09ca727e7e2b455223ae94059b7"
+SRC_URI[sha256sum] = "8760991a67162f43af4d9e64828bcefc100ba88859b75177ae9f7ace56e58186"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-scrypt_0.8.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-scrypt_0.8.6.bb
new file mode 100644
index 0000000..f496653
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-scrypt_0.8.6.bb
@@ -0,0 +1,3 @@
+inherit setuptools3 python3-dir
+require python-scrypt.inc
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.23.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.23.bb
deleted file mode 100644
index 199dcfa..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.23.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-inherit setuptools3
-require python-serpent.inc
-
-# Requires _pydecimal which is in misc
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-enum \
-    ${PYTHON_PN}-misc \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.24.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.24.bb
new file mode 100644
index 0000000..1e04def
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-serpent_1.24.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-serpent.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm_1.15.6.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm_1.15.7.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm_1.15.6.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm_1.15.7.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.11.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.11.1.bb
deleted file mode 100644
index d44bc15..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.11.1.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-inherit setuptools3
-require python-simplejson.inc
-
-# Requires _pydecimal which is in misc
-RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-misc \
-"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.13.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.13.2.bb
new file mode 100644
index 0000000..38f406c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-simplejson_3.13.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-simplejson.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus_3.1.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus_4.0.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus_3.1.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-smbus_4.0.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-speaklater_1.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-speaklater_1.3.bb
new file mode 100644
index 0000000..aa4f699
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-speaklater_1.3.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-speaklater.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.1.14.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.1.14.bb
deleted file mode 100644
index 01f1e97..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.1.14.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools3
-require python-sqlalchemy.inc
-
-# Requires _pydecimal.py which is in misc
-RDEPENDS_${PN} += "${PYTHON_PN}-enum ${PYTHON_PN}-misc"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.1.17.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.1.17.bb
new file mode 100644
index 0000000..86cf9ed
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.1.17.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-sqlalchemy.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-systemd_234.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-systemd_234.bb
index 845b7d9..580d993 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-systemd_234.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-systemd_234.bb
@@ -1,13 +1,2 @@
-SUMMARY = "Python interface for libsystemd"
-HOMEPAGE = "https://github.com/systemd/python-systemd"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4fbd65380cdd255951079008b364516c"
-
-PYPI_PACKAGE = "systemd-python"
-DEPENDS += "systemd (<=234)"
-RDEPENDS_${PN} += "systemd"
-REQUIRED_DISTRO_FEATURES = "systemd"
-inherit pypi setuptools3 distro_features_check
-
-SRC_URI[md5sum] = "5071ea5bcb976186e92a3f5e75df221d"
-SRC_URI[sha256sum] = "fd0e44bf70eadae45aadc292cb0a7eb5b0b6372cd1b391228047d33895db83e7"
+require python-systemd.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_4.5.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_4.5.3.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_4.5.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_4.5.3.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_17.9.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_17.9.0.bb
index d7533d8..6bd8c52 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_17.9.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-twisted_17.9.0.bb
@@ -1,7 +1,7 @@
 inherit pypi setuptools3
 require python-twisted.inc
 
-RDEPENDS_${PN}-core += "python3-lang"
+PACKAGES_remove = "${PN}-src"
 
 FILES_${PN}-core_append += " \
   ${libdir}/${PYTHON_DIR}/site-packages/twisted/__pycache__ \
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-twofish_0.3.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-twofish_0.3.0.bb
new file mode 100644
index 0000000..e593f6f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-twofish_0.3.0.bb
@@ -0,0 +1,2 @@
+require python-twofish.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-unidiff_0.5.4.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-unidiff_0.5.5.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-unidiff_0.5.4.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-unidiff_0.5.5.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-vcversioner_2.16.0.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-vcversioner_2.16.0.0.bb
index 189a65a..f6372c8 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-vcversioner_2.16.0.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-vcversioner_2.16.0.0.bb
@@ -17,8 +17,4 @@
     install -m 0644 ${S}/vcversioner*.egg ${D}/${PYTHON_SITEPACKAGES_DIR}/
 }
 
-RDEPENDS_${PN} += "\
-    ${PYTHON_PN}-subprocess \
-    "
-
 BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-visitor_0.1.3.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-visitor_0.1.3.bb
new file mode 100644
index 0000000..b9bc51d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-visitor_0.1.3.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-visitor.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-webcolors_1.7.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-webcolors_1.8.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-webcolors_1.7.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-webcolors_1.8.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-websockets_4.0.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-websockets_4.0.1.bb
new file mode 100644
index 0000000..414129c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-websockets_4.0.1.bb
@@ -0,0 +1,16 @@
+SUMMARY = "An implementation of the WebSocket Protocol (RFC 6455)"
+HOMEPAGE = "https://github.com/aaugustin/websockets"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5070256738c06d2e59adbec1f4057dac"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "9e8c6b3c70def4146d75fbb0f52bdfc7"
+SRC_URI[sha256sum] = "da4d4fbe059b0453e726d6d993760065d69b823a27efc3040402a6fcfe6a1ed9"
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN} = "\
+    ${PYTHON_PN}-asyncio \
+"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_0.12.2.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_0.14.1.bb
similarity index 100%
rename from import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_0.12.2.bb
rename to import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_0.14.1.bb
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_2.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_2.1.bb
new file mode 100644
index 0000000..add59cf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_2.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-wtforms.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-xstatic-font-awesome_4.7.0.0.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-xstatic-font-awesome_4.7.0.0.bb
new file mode 100644
index 0000000..639f80d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-xstatic-font-awesome_4.7.0.0.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-xstatic-font-awesome.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-xstatic_1.0.1.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-xstatic_1.0.1.bb
new file mode 100644
index 0000000..76cb702
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-xstatic_1.0.1.bb
@@ -0,0 +1,2 @@
+inherit pypi setuptools3
+require python-xstatic.inc
diff --git a/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_0.98.bb b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_0.98.bb
new file mode 100644
index 0000000..07da5b6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_0.98.bb
@@ -0,0 +1,2 @@
+require python-yappi.inc
+inherit setuptools3
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch b/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
new file mode 100644
index 0000000..12a9e4f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0014-invoking-dd-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From 92fe7dfd01131c93a9b2013cabf77d5f46900fab Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 6 Mar 2018 17:28:56 +0800
+Subject: [PATCH] invoking dd with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/devices/partition.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
+index a7372fb..8947472 100644
+--- a/blivet/devices/partition.py
++++ b/blivet/devices/partition.py
+@@ -594,7 +594,7 @@ class PartitionDevice(StorageDevice):
+         cmd = ["dd", "if=/dev/zero", "of=%s" % device, "bs=%d" % bs,
+                "seek=%d" % start, "count=%d" % count]
+         try:
+-            util.run_program(cmd)
++            util.run_program(cmd, timeout=-1)
+         except OSError as e:
+             log.error(str(e))
+         finally:
+-- 
+1.8.3.1
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
index cacca67..46dc32d 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
@@ -23,6 +23,7 @@
            file://0011-invoking-fsck-with-infinite-timeout.patch \
            file://0012-invoking-mkfs-with-infinite-timeout.patch \
            file://0013-Revert-Adapt-to-logging-module-name-change.patch \
+           file://0014-invoking-dd-with-infinite-timeout.patch \
 "
 
 inherit distro_features_check
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
index ac507ca..28c2565 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
+++ b/import-layers/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
@@ -13,7 +13,7 @@
 "
 
 inherit distro_features_check
-REQUIRED_DISTRO_FEATURES = "systemd"
+REQUIRED_DISTRO_FEATURES = "x11 systemd"
 
 inherit setuptools3 python3native
 
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.45.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.45.bb
deleted file mode 100644
index 6ace497..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.45.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "A python library for handling exceptions"
-DESCRIPTION = "The python-meh package is a python library for handling, saving, and reporting \
-exceptions."
-HOMEPAGE = "http://git.fedorahosted.org/git/?p=python-meh.git"
-LICENSE = "GPLv2+"
-
-inherit setuptools3
-
-S = "${WORKDIR}/git"
-
-SRC_URI = "git://github.com/rhinstaller/python-meh.git;protocol=https;branch=master \
-"
-SRCREV = "2bfc751fd680515d44f7096945a1e282a1f7d6aa"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-FILES_${PN} += "${datadir}/*"
-
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.46.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.46.bb
new file mode 100644
index 0000000..40e2cbd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.46.bb
@@ -0,0 +1,17 @@
+SUMMARY = "A python library for handling exceptions"
+DESCRIPTION = "The python-meh package is a python library for handling, saving, and reporting \
+exceptions."
+HOMEPAGE = "http://git.fedorahosted.org/git/?p=python-meh.git"
+LICENSE = "GPLv2+"
+
+inherit setuptools3
+
+S = "${WORKDIR}/git"
+
+SRC_URI = "git://github.com/rhinstaller/python-meh.git;protocol=https;branch=master \
+"
+SRCREV = "bb1156728a4f76e5e3638ab20b9454a1568a99db"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+FILES_${PN} += "${datadir}/*"
+
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
index 65f8ca1..a0ec028 100644
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
+++ b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
@@ -6,16 +6,17 @@
 LICENSE = "GPL-2.0+"
 LIC_FILES_CHKSUM = "\
     file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
-    file://src/_pedmodule.c;startline=10;endline=22;md5=ebcb25dde1ac9c46e986dec79b404e7e \
+    file://src/_pedmodule.c;beginline=10;endline=22;md5=9e53304db812b80d0939e11bb69dcab2 \
 "
 DEPENDS += "parted"
 
 # upstream only publishes releases in github archives which are discouraged
-SRCREV = "69c4a478e43d3eff6ae3a0116fa38da06776d5f5"
-SRC_URI = "git://github.com/rhinstaller/pyparted.git;protocol=https \
-           file://0001-fix-version-float-check.patch \
-"
+SRCREV = "1fdb15120f35f5da1dc7ec116522f0c796a8376a"
+SRC_URI = "git://github.com/rhinstaller/pyparted.git;protocol=https"
+
 S = "${WORKDIR}/git"
 
-RDEPENDS_${PN} += "parted (>= 2.3)"
+RDEPENDS_${PN}_class-target += " \
+    parted (>= 2.3) \
+"
 RDEPENDS_${PN}_class-native = ""
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted/0001-fix-version-float-check.patch b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted/0001-fix-version-float-check.patch
deleted file mode 100644
index db3ab9f..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted/0001-fix-version-float-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-check_mod_version breaks if module version is of x.y.z form
-use a regex to help cast x.y.z version to a float
-
-Upstream-Status: Pending
-
-Index: git/setup.py
-===================================================================
---- git.orig/setup.py
-+++ git/setup.py
-@@ -25,6 +25,7 @@ import glob
- import os
- import platform
- import sys
-+import re
- from distutils.ccompiler import new_compiler
- from distutils.errors import CompileError
- from distutils.errors import LinkError
-@@ -51,6 +52,8 @@ def pkgconfig(*packages, **kwargs):
- 
- def check_mod_version(module, version):
-     modversion = subprocess.check_output(["pkg-config", "--modversion", module])
-+    match = re.search('([0-9]+\.[0-9]+)', modversion)
-+    modversion = match.group(0)
-     if not float(modversion) >= float(version):
-         sys.stderr.write("*** Minimum required %s version: %s, found: %s\n" % (module, version, modversion,))
-         sys.exit(1)
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.10.7.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.10.7.bb
deleted file mode 100644
index 8a15a89..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.10.7.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require python-pyparted.inc
-
-DEPENDS += "python-re"
-
-PV = "3.10.7+git${SRCPV}"
-
-inherit distutils
-
-RDEPENDS_${PN} += "python-stringold python-codecs python-math"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.11.1.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.11.1.bb
new file mode 100644
index 0000000..7d00fd7
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.11.1.bb
@@ -0,0 +1,10 @@
+require python-pyparted.inc
+
+PV = "3.10.7+git${SRCPV}"
+
+inherit distutils
+
+RDEPENDS_${PN} += "python-stringold python-codecs python-math python-subprocess"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted/0001-fix-version-float-check.patch b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted/0001-fix-version-float-check.patch
deleted file mode 100644
index 14fb0bb..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted/0001-fix-version-float-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-check_mod_version breaks if module version is of x.y.z form
-use a regex to help cast x.y.z version to a float
-
-Upstream-Status: Pending
-
-Index: git/setup.py
-===================================================================
---- git.orig/setup.py
-+++ git/setup.py
-@@ -25,6 +25,7 @@ import glob
- import os
- import platform
- import sys
-+import re
- from distutils.ccompiler import new_compiler
- from distutils.errors import CompileError
- from distutils.errors import LinkError
-@@ -51,6 +52,8 @@ def pkgconfig(*packages, **kwargs):
- 
- def check_mod_version(module, version):
-     modversion = subprocess.check_output(["pkg-config", "--modversion", module])
-+    match = re.search(b'([0-9]+\.[0-9]+)', modversion)
-+    modversion = match.group(0)
-     if not float(modversion) >= float(version):
-         sys.stderr.write("*** Minimum required %s version: %s, found: %s\n" % (module, version, modversion,))
-         sys.exit(1)
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.10.7.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.10.7.bb
deleted file mode 100644
index ff72c2a..0000000
--- a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.10.7.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require python-pyparted.inc
-
-DEPENDS += "python3-re"
-
-PV = "3.10.7+git${SRCPV}"
-
-inherit distutils3
-
-RDEPENDS_${PN} += "python3-stringold python3-codecs python3-math"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.1.bb b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.1.bb
new file mode 100644
index 0000000..4d6f97b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.1.bb
@@ -0,0 +1,10 @@
+require python-pyparted.inc
+
+PV = "3.10.7+git${SRCPV}"
+
+inherit distutils3
+
+RDEPENDS_${PN} += "python3-stringold python3-codecs python3-math"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-webserver/README b/import-layers/meta-openembedded/meta-webserver/README
index f2928ab..7b60630 100644
--- a/import-layers/meta-openembedded/meta-webserver/README
+++ b/import-layers/meta-openembedded/meta-webserver/README
@@ -13,14 +13,14 @@
 
 URI: git://github.com/openembedded/oe-core.git
 subdirectory: meta
-branch: rocko 
+branch: master
 revision: HEAD
 
 For some recipes, the meta-oe layer is required:
 
 URI: git://github.com/openembedded/meta-oe.git
 subdirectory: meta-oe
-branch: rocko 
+branch: master
 revision: HEAD
 
 
diff --git a/import-layers/meta-openembedded/meta-webserver/conf/layer.conf b/import-layers/meta-openembedded/meta-webserver/conf/layer.conf
index 84fdd81..f205ef2 100644
--- a/import-layers/meta-openembedded/meta-webserver/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-webserver/conf/layer.conf
@@ -17,6 +17,8 @@
 
 LAYERDEPENDS_webserver = "core openembedded-layer"
 
+LAYERSERIES_COMPAT_webserver = "sumo"
+
 LICENSE_PATH += "${LAYERDIR}/licenses"
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.27.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.27.bb
deleted file mode 100644
index 4e893db..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.27.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
-extensible web server."
-SUMMARY = "Apache HTTP Server"
-HOMEPAGE = "http://httpd.apache.org/"
-DEPENDS = "expat-native pcre-native apr-native apr-util-native"
-SECTION = "net"
-LICENSE = "Apache-2.0"
-
-inherit autotools pkgconfig native
-
-SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
-           file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
-          "
-
-S = "${WORKDIR}/httpd-${PV}"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
-SRC_URI[md5sum] = "97b6bbfa83c866dbe20ef317e3afd108"
-SRC_URI[sha256sum] = "71fcc128238a690515bd8174d5330a5309161ef314a326ae45c7c15ed139c13a"
-
-EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
-                --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
-                --prefix=${prefix} --datadir=${datadir}/apache2 \
-               "
-
-do_install () {
-    install -d ${D}${bindir} ${D}${libdir}
-    cp server/gen_test_char ${D}${bindir}
-    install -m 755 support/apxs ${D}${bindir}/
-    install -m 755 httpd ${D}${bindir}/
-    install -d ${D}${datadir}/apache2/build
-    cp ${S}/build/*.mk ${D}${datadir}/apache2/build
-    cp build/*.mk ${D}${datadir}/apache2/build
-    cp ${S}/build/instdso.sh ${D}${datadir}/apache2/build
-
-    install -d ${D}${includedir}/apache2
-    cp ${S}/include/* ${D}${includedir}/apache2
-    cp include/* ${D}${includedir}/apache2
-    cp ${S}/os/unix/os.h ${D}${includedir}/apache2
-    cp ${S}/os/unix/unixd.h ${D}${includedir}/apache2
-
-    cp support/envvars-std ${D}${bindir}/envvars
-    chmod 755 ${D}${bindir}/envvars
-}
-
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.29.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.29.bb
new file mode 100644
index 0000000..36f073c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.29.bb
@@ -0,0 +1,45 @@
+DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
+extensible web server."
+SUMMARY = "Apache HTTP Server"
+HOMEPAGE = "http://httpd.apache.org/"
+DEPENDS = "expat-native pcre-native apr-native apr-util-native"
+SECTION = "net"
+LICENSE = "Apache-2.0"
+
+inherit autotools pkgconfig native
+
+SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
+           file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
+          "
+
+S = "${WORKDIR}/httpd-${PV}"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a62b0c7623826ff99766ff13fb9007f8"
+SRC_URI[md5sum] = "0c599404ef6b69eee95bcd9fcd094407"
+SRC_URI[sha256sum] = "777753a5a25568a2a27428b2214980564bc1c38c1abf9ccc7630b639991f7f00"
+
+EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
+                --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
+                --prefix=${prefix} --datadir=${datadir}/apache2 \
+               "
+
+do_install () {
+    install -d ${D}${bindir} ${D}${libdir}
+    cp server/gen_test_char ${D}${bindir}
+    install -m 755 support/apxs ${D}${bindir}/
+    install -m 755 httpd ${D}${bindir}/
+    install -d ${D}${datadir}/apache2/build
+    cp ${S}/build/*.mk ${D}${datadir}/apache2/build
+    cp build/*.mk ${D}${datadir}/apache2/build
+    cp ${S}/build/instdso.sh ${D}${datadir}/apache2/build
+
+    install -d ${D}${includedir}/apache2
+    cp ${S}/include/* ${D}${includedir}/apache2
+    cp include/* ${D}${includedir}/apache2
+    cp ${S}/os/unix/os.h ${D}${includedir}/apache2
+    cp ${S}/os/unix/unixd.h ${D}${includedir}/apache2
+
+    cp support/envvars-std ${D}${bindir}/envvars
+    chmod 755 ${D}${bindir}/envvars
+}
+
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
index c90279d..92c53f3 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
@@ -4,11 +4,13 @@
 #
 # Upstream-Status: Inappropriate [configuration]
 
---- a/configure.in
-+++ b/configure.in
-@@ -638,10 +638,7 @@
- AC_DEFINE_UNQUOTED(APACHE_MPM_DIR, "$MPM_DIR",
- 	[Location of the source for the current MPM])
+Index: httpd-2.4.29/configure.in
+===================================================================
+--- httpd-2.4.29.orig/configure.in
++++ httpd-2.4.29/configure.in
+@@ -855,10 +855,7 @@ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "
+ AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types",
+ 	[Location of the MIME types config file, relative to the Apache root directory])
  
 -perlbin=`$ac_aux_dir/PrintPath perl`
 -if test "x$perlbin" = "x"; then
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch
index 413dc53..f13da91 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch
@@ -1,11 +1,11 @@
  build/ltmain.sh | 32 +++++++++++++++++++++++++++-----
  1 file changed, 27 insertions(+), 5 deletions(-)
 
-diff --git a/build/ltmain.sh b/build/ltmain.sh
-index 5eca4ae..805b461 100644
---- a/build/ltmain.sh
-+++ b/build/ltmain.sh
-@@ -6944,7 +6944,7 @@ func_mode_link ()
+Index: httpd-2.4.29/build/ltmain.sh
+===================================================================
+--- httpd-2.4.29.orig/build/ltmain.sh
++++ httpd-2.4.29/build/ltmain.sh
+@@ -6969,7 +6969,7 @@ func_mode_link ()
  	dir=$func_resolve_sysroot_result
  	# We need an absolute path.
  	case $dir in
@@ -14,7 +14,7 @@
  	*)
  	  absdir=`cd "$dir" && pwd`
  	  test -z "$absdir" && \
-@@ -8137,7 +8137,7 @@ func_mode_link ()
+@@ -8167,7 +8167,7 @@ func_mode_link ()
  	    $ECHO "*** $linklib is not portable!"
  	  fi
  	  if test lib = "$linkmode" &&
@@ -23,7 +23,7 @@
  	    # Hardcode the library path.
  	    # Skip directories that are in the system default run-time
  	    # search path.
-@@ -8404,7 +8404,7 @@ func_mode_link ()
+@@ -8434,7 +8434,7 @@ func_mode_link ()
  
  	if test lib = "$linkmode"; then
  	  if test -n "$dependency_libs" &&
@@ -32,7 +32,7 @@
  	       test yes = "$build_old_libs" ||
  	       test yes = "$link_static"; }; then
  	    # Extract -R from dependency_libs
-@@ -9025,7 +9025,8 @@ func_mode_link ()
+@@ -9086,7 +9086,8 @@ func_mode_link ()
  	  *) func_append finalize_rpath " $libdir" ;;
  	  esac
  	done
@@ -42,7 +42,7 @@
  	  dependency_libs="$temp_xrpath $dependency_libs"
  	fi
        fi
-@@ -9473,7 +9474,7 @@ EOF
+@@ -9534,7 +9535,7 @@ EOF
  	case $archive_cmds in
  	  *\$LD\ *) wl= ;;
          esac
@@ -51,7 +51,7 @@
  	  # Hardcode the library paths
  	  hardcode_libdirs=
  	  dep_rpath=
-@@ -10211,6 +10212,27 @@ EOF
+@@ -10272,6 +10273,27 @@ EOF
        # Now hardcode the library paths
        rpath=
        hardcode_libdirs=
@@ -79,6 +79,3 @@
        for libdir in $compile_rpath $finalize_rpath; do
  	if test -n "$hardcode_libdir_flag_spec"; then
  	  if test -n "$hardcode_libdir_separator"; then
--- 
-1.9.1
-
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch
index 584ddc8..e4e01b2 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch
@@ -10,11 +10,11 @@
  support/apachectl.in |   14 ++++++++++----
  1 files changed, 10 insertions(+), 4 deletions(-)
 
-diff --git a/support/apachectl.in b/support/apachectl.in
-index d4dff38..109ea13 100644
---- a/support/apachectl.in
-+++ b/support/apachectl.in
-@@ -51,11 +51,11 @@ fi
+Index: httpd-2.4.29/support/apachectl.in
+===================================================================
+--- httpd-2.4.29.orig/support/apachectl.in
++++ httpd-2.4.29/support/apachectl.in
+@@ -52,11 +52,11 @@ fi
  # a command that outputs a formatted text version of the HTML at the
  # url given on the command line.  Designed for lynx, however other
  # programs may work.  
@@ -28,7 +28,7 @@
  #
  # Set this variable to a command that increases the maximum
  # number of file descriptors allowed per child process. This is
-@@ -91,10 +91,16 @@ configtest)
+@@ -92,10 +92,16 @@ configtest)
      ERROR=$?
      ;;
  status)
@@ -46,7 +46,4 @@
 +    fi
      ;;
  *)
-     $HTTPD $ARGV
--- 
-1.6.4
-
+     $HTTPD "$@"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.27.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.27.bb
deleted file mode 100644
index 1880867..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.27.bb
+++ /dev/null
@@ -1,194 +0,0 @@
-DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
-extensible web server."
-SUMMARY = "Apache HTTP Server"
-HOMEPAGE = "http://httpd.apache.org/"
-DEPENDS = "libtool-native apache2-native openssl expat pcre apr apr-util"
-SECTION = "net"
-LICENSE = "Apache-2.0"
-
-SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
-           file://server-makefile.patch \
-           file://httpd-2.4.1-corelimit.patch \
-           file://httpd-2.4.4-export.patch \
-           file://httpd-2.4.1-selinux.patch \
-           file://apache-configure_perlbin.patch \
-           file://replace-lynx-to-curl-in-apachectl-script.patch \
-           file://apache-ssl-ltmain-rpath.patch \
-           file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
-           file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
-           file://configure-allow-to-disable-selinux-support.patch \
-           file://init \
-           file://apache2-volatile.conf \
-           file://apache2.service \
-           file://volatiles.04_apache2 \
-          "
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
-SRC_URI[md5sum] = "97b6bbfa83c866dbe20ef317e3afd108"
-SRC_URI[sha256sum] = "71fcc128238a690515bd8174d5330a5309161ef314a326ae45c7c15ed139c13a"
-
-S = "${WORKDIR}/httpd-${PV}"
-
-inherit autotools update-rc.d pkgconfig systemd
-
-SYSTEMD_SERVICE_${PN} = "apache2.service"
-SYSTEMD_AUTO_ENABLE_${PN} = "disable"
-
-SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
-
-CFLAGS_append = " -DPATH_MAX=4096"
-CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
-EXTRA_OECONF = "--enable-ssl \
-    --with-ssl=${STAGING_LIBDIR}/.. \
-    --with-expat=${STAGING_LIBDIR}/.. \
-    --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
-    --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
-    --enable-info \
-    --enable-rewrite \
-    --with-dbm=sdbm \
-    --with-berkeley-db=no \
-    --localstatedir=/var/${BPN} \
-    --with-gdbm=no \
-    --with-ndbm=no \
-    --includedir=${includedir}/${BPN} \
-    --datadir=${datadir}/${BPN} \
-    --sysconfdir=${sysconfdir}/${BPN} \
-    --libexecdir=${libdir}/${BPN}/modules \
-    ap_cv_void_ptr_lt_long=no \
-    --enable-mpms-shared \
-    ac_cv_have_threadsafe_pollset=no"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
-PACKAGECONFIG[selinux] = "--enable-selinux --enable-layout=Debian --prefix=${base_prefix}/,--disable-selinux,libselinux,libselinux"
-PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
-
-do_configure_prepend() {
-        sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libdir}/cgi-bin:g' ${S}/config.layout
-}
-
-do_install_append() {
-    install -d ${D}/${sysconfdir}/init.d
-    cat ${WORKDIR}/init | \
-        sed -e 's,/usr/sbin/,${sbindir}/,g' \
-            -e 's,/usr/bin/,${bindir}/,g' \
-            -e 's,/usr/lib,${libdir}/,g' \
-            -e 's,/etc/,${sysconfdir}/,g' \
-            -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
-    chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
-    # remove the goofy original files...
-    rm -rf ${D}/${sysconfdir}/${BPN}/original
-    # Expat should be found in the staging area via DEPENDS...
-    rm -f ${D}/${libdir}/libexpat.*
-
-    install -d ${D}${sysconfdir}/${BPN}/conf.d
-    install -d ${D}${sysconfdir}/${BPN}/modules.d
-
-    # Ensure configuration file pulls in conf.d and modules.d
-    printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
-    printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
-    printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
-    # match with that is in init script
-    printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
-    # Set 'ServerName' to fix error messages when restart apache service
-    sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -d ${D}${sysconfdir}/tmpfiles.d/
-        install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
-    elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
-        install -d ${D}${sysconfdir}/default/volatiles
-        install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
-    fi
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
-    sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
-    sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
-
-    chown -R root:root ${D}
-}
-
-do_install_append_class-target() {
-    sed -i -e 's,${STAGING_DIR_HOST},,g' \
-           -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
-           -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
-
-    sed -i -e 's,${STAGING_DIR_HOST},,g' \
-           -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
-    rm -rf ${D}${localstatedir}/run
-}
-
-SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
-
-apache_sysroot_preprocess () {
-    install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-    install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-    install -d ${SYSROOT_DESTDIR}${sbindir}/
-    install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}/
-    sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
-    sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
-
-    sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
-    sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
-    sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
-    sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
-    sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
-    sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
-    sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
-}
-
-#
-# implications - used by update-rc.d scripts
-#
-INITSCRIPT_NAME = "apache2"
-INITSCRIPT_PARAMS = "defaults 91 20"
-LEAD_SONAME = "libapr-1.so.0"
-
-PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
-
-CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
-                   ${sysconfdir}/${BPN}/magic \
-                   ${sysconfdir}/${BPN}/mime.types \
-                   ${sysconfdir}/init.d/${BPN} "
-
-# we override here rather than append so that .so links are
-# included in the runtime package rather than here (-dev)
-# and to get build, icons, error into the -dev package
-FILES_${PN}-dev = "${datadir}/${BPN}/build \
-                   ${datadir}/${BPN}/icons \
-                   ${datadir}/${BPN}/error \
-                   ${bindir}/apr-config ${bindir}/apu-config \
-                   ${libdir}/apr*.exp \
-                   ${includedir}/${BPN} \
-                   ${libdir}/*.la \
-                   ${libdir}/*.a \
-                   ${bindir}/apxs \
-                "
-
-
-# manual to manual
-FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
-
-FILES_${PN}-scripts += "${bindir}/dbmmanage"
-
-#
-# override this too - here is the default, less datadir
-#
-FILES_${PN} =  "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
-                ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
-                ${libdir}/${BPN}"
-
-# we want htdocs and cgi-bin to go with the binary
-FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
-
-#make sure the lone .so links also get wrapped in the base package
-FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
-
-FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
-
-RDEPENDS_${PN} += "openssl libgcc"
-RDEPENDS_${PN}-scripts += "perl ${PN}"
-RDEPENDS_${PN}-dev = "perl"
-
-FILES_${PN} += "${libdir}/cgi-bin"
-FILES_${PN} += "${datadir}/${BPN}/"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.29.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.29.bb
new file mode 100644
index 0000000..f0298b9
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.29.bb
@@ -0,0 +1,194 @@
+DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
+extensible web server."
+SUMMARY = "Apache HTTP Server"
+HOMEPAGE = "http://httpd.apache.org/"
+DEPENDS = "libtool-native apache2-native openssl expat pcre apr apr-util"
+SECTION = "net"
+LICENSE = "Apache-2.0"
+
+SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
+           file://server-makefile.patch \
+           file://httpd-2.4.1-corelimit.patch \
+           file://httpd-2.4.4-export.patch \
+           file://httpd-2.4.1-selinux.patch \
+           file://apache-configure_perlbin.patch \
+           file://replace-lynx-to-curl-in-apachectl-script.patch \
+           file://apache-ssl-ltmain-rpath.patch \
+           file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
+           file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
+           file://configure-allow-to-disable-selinux-support.patch \
+           file://init \
+           file://apache2-volatile.conf \
+           file://apache2.service \
+           file://volatiles.04_apache2 \
+          "
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a62b0c7623826ff99766ff13fb9007f8"
+SRC_URI[md5sum] = "0c599404ef6b69eee95bcd9fcd094407"
+SRC_URI[sha256sum] = "777753a5a25568a2a27428b2214980564bc1c38c1abf9ccc7630b639991f7f00"
+
+S = "${WORKDIR}/httpd-${PV}"
+
+inherit autotools update-rc.d pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "apache2.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
+SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
+
+CFLAGS_append = " -DPATH_MAX=4096"
+CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
+EXTRA_OECONF = "--enable-ssl \
+    --with-ssl=${STAGING_LIBDIR}/.. \
+    --with-expat=${STAGING_LIBDIR}/.. \
+    --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
+    --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
+    --enable-info \
+    --enable-rewrite \
+    --with-dbm=sdbm \
+    --with-berkeley-db=no \
+    --localstatedir=/var/${BPN} \
+    --with-gdbm=no \
+    --with-ndbm=no \
+    --includedir=${includedir}/${BPN} \
+    --datadir=${datadir}/${BPN} \
+    --sysconfdir=${sysconfdir}/${BPN} \
+    --libexecdir=${libdir}/${BPN}/modules \
+    ap_cv_void_ptr_lt_long=no \
+    --enable-mpms-shared \
+    ac_cv_have_threadsafe_pollset=no"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
+PACKAGECONFIG[selinux] = "--enable-selinux --enable-layout=Debian --prefix=${base_prefix}/,--disable-selinux,libselinux,libselinux"
+PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
+
+do_configure_prepend() {
+        sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libdir}/cgi-bin:g' ${S}/config.layout
+}
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}/init.d
+    cat ${WORKDIR}/init | \
+        sed -e 's,/usr/sbin/,${sbindir}/,g' \
+            -e 's,/usr/bin/,${bindir}/,g' \
+            -e 's,/usr/lib,${libdir}/,g' \
+            -e 's,/etc/,${sysconfdir}/,g' \
+            -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
+    chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
+    # remove the goofy original files...
+    rm -rf ${D}/${sysconfdir}/${BPN}/original
+    # Expat should be found in the staging area via DEPENDS...
+    rm -f ${D}/${libdir}/libexpat.*
+
+    install -d ${D}${sysconfdir}/${BPN}/conf.d
+    install -d ${D}${sysconfdir}/${BPN}/modules.d
+
+    # Ensure configuration file pulls in conf.d and modules.d
+    printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
+    printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
+    printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
+    # match with that is in init script
+    printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
+    # Set 'ServerName' to fix error messages when restart apache service
+    sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d/
+        install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+    elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/default/volatiles
+        install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
+    fi
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
+    sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
+    sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
+
+    chown -R root:root ${D}
+}
+
+do_install_append_class-target() {
+    sed -i -e 's,${STAGING_DIR_HOST},,g' \
+           -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
+           -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
+
+    sed -i -e 's,${STAGING_DIR_HOST},,g' \
+           -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
+    rm -rf ${D}${localstatedir}/run
+}
+
+SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
+
+apache_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+    install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+    install -d ${SYSROOT_DESTDIR}${sbindir}/
+    install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}/
+    sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
+    sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
+
+    sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
+    sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
+    sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
+    sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
+    sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
+    sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
+    sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
+}
+
+#
+# implications - used by update-rc.d scripts
+#
+INITSCRIPT_NAME = "apache2"
+INITSCRIPT_PARAMS = "defaults 91 20"
+LEAD_SONAME = "libapr-1.so.0"
+
+PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
+
+CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
+                   ${sysconfdir}/${BPN}/magic \
+                   ${sysconfdir}/${BPN}/mime.types \
+                   ${sysconfdir}/init.d/${BPN} "
+
+# we override here rather than append so that .so links are
+# included in the runtime package rather than here (-dev)
+# and to get build, icons, error into the -dev package
+FILES_${PN}-dev = "${datadir}/${BPN}/build \
+                   ${datadir}/${BPN}/icons \
+                   ${datadir}/${BPN}/error \
+                   ${bindir}/apr-config ${bindir}/apu-config \
+                   ${libdir}/apr*.exp \
+                   ${includedir}/${BPN} \
+                   ${libdir}/*.la \
+                   ${libdir}/*.a \
+                   ${bindir}/apxs \
+                "
+
+
+# manual to manual
+FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
+
+FILES_${PN}-scripts += "${bindir}/dbmmanage"
+
+#
+# override this too - here is the default, less datadir
+#
+FILES_${PN} =  "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
+                ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
+                ${libdir}/${BPN}"
+
+# we want htdocs and cgi-bin to go with the binary
+FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
+
+#make sure the lone .so links also get wrapped in the base package
+FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
+
+FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
+
+RDEPENDS_${PN} += "openssl libgcc"
+RDEPENDS_${PN}-scripts += "perl ${PN}"
+RDEPENDS_${PN}-dev = "perl"
+
+FILES_${PN} += "${libdir}/cgi-bin"
+FILES_${PN} += "${datadir}/${BPN}/"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.3.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.3.bb
deleted file mode 100644
index 7b6ab26..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.3.bb
+++ /dev/null
@@ -1,64 +0,0 @@
-SUMMARY = "Lightweight secure web server"
-HOMEPAGE = "http://www.hiawatha-webserver.org"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "libxml2 libxslt"
-
-SECTION = "net"
-
-SRC_URI = "http://hiawatha-webserver.org/files/${BP}.tar.gz \
-           file://hiawatha-init \
-           file://hiawatha.service "
-
-SRC_URI[md5sum] = "31567dfc18d435bd419be279f7970019"
-SRC_URI[sha256sum] = "99d185fb16bb1ab706724494d3cac86464f1485ed4b0fff09a192eca6da5ff8e"
-
-INITSCRIPT_NAME = "hiawatha"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "hiawatha.service"
-
-inherit cmake update-rc.d systemd
-
-EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \
-                  -DENABLE_CACHE=OFF \
-                  -DENABLE_DEBUG=OFF \
-                  -DENABLE_SSL=OFF \
-                  -DENABLE_TOOLKIT=OFF \
-                  -DENABLE_CHROOT=OFF \
-                  -DENABLE_XSLT=ON \
-                  -DENABLE_TOMAHAWK=OFF \
-                  -DCMAKE_INSTALL_MANDIR=${mandir} \
-                  -DCMAKE_INSTALL_BINDIR=${bindir} \
-                  -DCMAKE_INSTALL_SBINDIR=${sbindir} \
-                  -DCMAKE_INSTALL_SYSCONFDIR=${sysconfdir} \
-                  -DCMAKE_INSTALL_LIBDIR=${libdir} \
-                  -DCMAKE_INSTALL_FULL_LOCALSTATEDIR=${localstatedir}"
-
-do_install_append() {
-    # Copy over init script and sed in the correct sbin path
-    sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init
-    mkdir -p ${D}${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha
-
-    # configure php-fcgi to have a working configuration
-    # by default if php is installed
-    echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf
-
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system
-    fi
-
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" "${D}${localstatedir}/run"
-}
-
-CONFFILES_${PN} = " \
-    ${sysconfdir}/hiawatha/cgi-wrapper.conf \
-    ${sysconfdir}/hiawatha/hiawatha.conf \
-    ${sysconfdir}/hiawatha/index.xslt \
-    ${sysconfdir}/hiawatha/mimetype.conf \
-    ${sysconfdir}/hiawatha/php-fcgi.conf \
-"
-
-FILES_${PN}-dev = "${libdir}/hiawatha/*${SOLIBSDEV}"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.7.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.7.bb
new file mode 100644
index 0000000..4c3ca55
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.7.bb
@@ -0,0 +1,64 @@
+SUMMARY = "Lightweight secure web server"
+HOMEPAGE = "http://www.hiawatha-webserver.org"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS = "libxml2 libxslt"
+
+SECTION = "net"
+
+SRC_URI = "http://hiawatha-webserver.org/files/${BP}.tar.gz \
+           file://hiawatha-init \
+           file://hiawatha.service "
+
+SRC_URI[md5sum] = "581aa71c831172ba06910deda717302f"
+SRC_URI[sha256sum] = "363e99d84a85dafbb74bcc30b3e30286053ec2abbc7afe08cd87193611735f74"
+
+INITSCRIPT_NAME = "hiawatha"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE_${PN} = "hiawatha.service"
+
+inherit cmake update-rc.d systemd
+
+EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \
+                  -DENABLE_CACHE=OFF \
+                  -DENABLE_DEBUG=OFF \
+                  -DENABLE_SSL=OFF \
+                  -DENABLE_TOOLKIT=OFF \
+                  -DENABLE_CHROOT=OFF \
+                  -DENABLE_XSLT=ON \
+                  -DENABLE_TOMAHAWK=OFF \
+                  -DCMAKE_INSTALL_MANDIR=${mandir} \
+                  -DCMAKE_INSTALL_BINDIR=${bindir} \
+                  -DCMAKE_INSTALL_SBINDIR=${sbindir} \
+                  -DCMAKE_INSTALL_SYSCONFDIR=${sysconfdir} \
+                  -DCMAKE_INSTALL_LIBDIR=${libdir} \
+                  -DCMAKE_INSTALL_FULL_LOCALSTATEDIR=${localstatedir}"
+
+do_install_append() {
+    # Copy over init script and sed in the correct sbin path
+    sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init
+    mkdir -p ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha
+
+    # configure php-fcgi to have a working configuration
+    # by default if php is installed
+    echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system
+    fi
+
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" "${D}${localstatedir}/run"
+}
+
+CONFFILES_${PN} = " \
+    ${sysconfdir}/hiawatha/cgi-wrapper.conf \
+    ${sysconfdir}/hiawatha/hiawatha.conf \
+    ${sysconfdir}/hiawatha/index.xslt \
+    ${sysconfdir}/hiawatha/mimetype.conf \
+    ${sysconfdir}/hiawatha/php-fcgi.conf \
+"
+
+FILES_${PN}-dev = "${libdir}/hiawatha/*${SOLIBSDEV}"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb
index 97dc276..559d251 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb
@@ -17,6 +17,9 @@
 SRC_URI[md5sum] = "9699e4c9ea6ce6b989907c252ae80254"
 SRC_URI[sha256sum] = "7c3d845306aa74ee6effd7ab6169d16ac4e6450e564954d0d0baa2d1e9be1a22"
 
+UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz"
+
 EXTRA_OECONF = "--plugdir=${libdir}/monkey/ \
                 --logdir=${localstatedir}/log/monkey/ \
                 --pidfile=${localstatedir}/run/monkey.pid \
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch
new file mode 100644
index 0000000..ffd5ee3
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch
@@ -0,0 +1,80 @@
+From be9970aa16c5142ef814531d74a07990a8e9eb14 Mon Sep 17 00:00:00 2001
+From: Derek Straka <derek@asterius.io>
+Date: Fri, 1 Dec 2017 10:32:29 -0500
+Subject: [PATCH] Allow the overriding of the endianness via the configure flag
+ --with-endian
+
+The existing configure options contain the --with-endian; however, the command
+line flag does not actually function.  It does not set the endianness and it
+appears to do nothing.
+
+Upstream-Status: Pending
+
+Signed-off-by: Derek Straka <derek@asterius.io>
+
+diff --git a/auto/endianness b/auto/endianness
+index 1b552b6..be84487 100644
+--- a/auto/endianness
++++ b/auto/endianness
+@@ -13,7 +13,13 @@ checking for system byte ordering
+ END
+ 
+ 
+-cat << END > $NGX_AUTOTEST.c
++if [ ".$NGX_WITH_ENDIAN" = ".little" ]; then
++    echo " little endian"
++    have=NGX_HAVE_LITTLE_ENDIAN . auto/have
++elif [ ".$NGX_WITH_ENDIAN" = ".big" ]; then
++    echo " big endian"
++else
++    cat << END > $NGX_AUTOTEST.c
+ 
+ int main(void) {
+     int i = 0x11223344;
+@@ -26,25 +32,26 @@ int main(void) {
+ 
+ END
+ 
+-ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
+-          -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
++    ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
++              -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
+ 
+-eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
++    eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
+ 
+-if [ -x $NGX_AUTOTEST ]; then
+-    if $NGX_AUTOTEST >/dev/null 2>&1; then
+-        echo " little endian"
+-        have=NGX_HAVE_LITTLE_ENDIAN . auto/have
+-    else
+-        echo " big endian"
+-    fi
++    if [ -x $NGX_AUTOTEST ]; then
++        if $NGX_AUTOTEST >/dev/null 2>&1; then
++            echo " little endian"
++            have=NGX_HAVE_LITTLE_ENDIAN . auto/have
++        else
++            echo " big endian"
++        fi
+ 
+-    rm -rf $NGX_AUTOTEST*
++        rm -rf $NGX_AUTOTEST*
+ 
+-else
+-    rm -rf $NGX_AUTOTEST*
++    else
++        rm -rf $NGX_AUTOTEST*
+ 
+-    echo
+-    echo "$0: error: cannot detect system byte ordering"
+-    exit 1
++        echo
++        echo "$0: error: cannot detect system byte ordering"
++        exit 1
++    fi
+ fi
+-- 
+2.7.4
+
+
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch
index 5e96644..0a18bcd 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch
@@ -3,10 +3,11 @@
 Upstream-Status: Pending
 
 
-diff -uraN nginx-1.0.11.orig/auto/feature nginx-1.0.11/auto/feature
---- nginx-1.0.11.orig/auto/feature	2011-05-11 06:50:19.000000000 -0500
-+++ nginx-1.0.11/auto/feature	2011-12-27 13:56:42.323370040 -0600
-@@ -49,12 +49,20 @@
+Index: nginx-1.12.2/auto/feature
+===================================================================
+--- nginx-1.12.2.orig/auto/feature
++++ nginx-1.12.2/auto/feature
+@@ -49,12 +49,20 @@ eval "/bin/sh -c \"$ngx_test\" >> $NGX_A
  
  if [ -x $NGX_AUTOTEST ]; then
  
@@ -29,7 +30,7 @@
                  ngx_found=yes
  
                  if test -n "$ngx_feature_name"; then
-@@ -68,17 +75,27 @@
+@@ -68,17 +76,27 @@ if [ -x $NGX_AUTOTEST ]; then
  
          value)
              # /bin/sh is used to intercept "Killed" or "Abort trap" messages
@@ -61,7 +62,7 @@
              else
                  echo " found but is not working"
              fi
-@@ -86,7 +105,7 @@
+@@ -86,7 +104,7 @@ END
  
          bug)
              # /bin/sh is used to intercept "Killed" or "Abort trap" messages
@@ -70,10 +71,11 @@
                  echo " not found"
  
              else
-diff -uraN nginx-1.0.11.orig/auto/options nginx-1.0.11/auto/options
---- nginx-1.0.11.orig/auto/options	2011-12-14 07:34:16.000000000 -0600
-+++ nginx-1.0.11/auto/options	2011-12-27 13:56:42.323370040 -0600
-@@ -353,6 +353,18 @@
+Index: nginx-1.12.2/auto/options
+===================================================================
+--- nginx-1.12.2.orig/auto/options
++++ nginx-1.12.2/auto/options
+@@ -386,6 +386,18 @@ $0: warning: the \"--with-sha1-asm\" opt
          --test-build-epoll)              NGX_TEST_BUILD_EPOLL=YES   ;;
          --test-build-solaris-sendfilev)  NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
  
@@ -92,7 +94,7 @@
          *)
              echo "$0: error: invalid option \"$option\""
              exit 1
-@@ -533,6 +445,17 @@
+@@ -568,6 +580,17 @@ cat << END
  
    --with-debug                       enable debug logging
  
@@ -110,7 +112,7 @@
  END
  
      exit 1
-@@ -554,6 +577,8 @@
+@@ -576,6 +599,8 @@ fi
  
  if [ ".$NGX_PLATFORM" = ".win32" ]; then
      NGX_WINE=$WINE
@@ -119,10 +121,11 @@
  fi
  
  
-diff -uraN nginx-1.0.11.orig/auto/types/sizeof nginx-1.0.11/auto/types/sizeof
---- nginx-1.0.11.orig/auto/types/sizeof	2006-06-28 11:00:26.000000000 -0500
-+++ nginx-1.0.11/auto/types/sizeof	2011-12-27 13:56:42.323370040 -0600
-@@ -12,9 +12,12 @@
+Index: nginx-1.12.2/auto/types/sizeof
+===================================================================
+--- nginx-1.12.2.orig/auto/types/sizeof
++++ nginx-1.12.2/auto/types/sizeof
+@@ -12,9 +12,12 @@ checking for $ngx_type size
  
  END
  
@@ -137,7 +140,7 @@
  
  #include <sys/types.h>
  #include <sys/time.h>
-@@ -33,15 +36,16 @@
+@@ -33,15 +36,16 @@ int main(void) {
  END
  
  
@@ -160,10 +163,11 @@
  fi
  
  
-diff -uraN nginx-1.0.11.orig/auto/unix nginx-1.0.11/auto/unix
---- nginx-1.0.11.orig/auto/unix	2011-12-14 07:34:16.000000000 -0600
-+++ nginx-1.0.11/auto/unix	2011-12-27 13:56:42.327370060 -0600
-@@ -393,13 +393,13 @@
+Index: nginx-1.12.2/auto/unix
+===================================================================
+--- nginx-1.12.2.orig/auto/unix
++++ nginx-1.12.2/auto/unix
+@@ -587,13 +587,13 @@ ngx_feature_libs=
  
  # C types
  
@@ -181,8 +185,8 @@
  ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_size; . auto/types/value
  
  
-@@ -416,7 +416,7 @@
- 
+@@ -604,7 +604,7 @@ NGX_INCLUDE_AUTO_CONFIG_H="#include \"ng
+ ngx_type="uint32_t"; ngx_types="u_int32_t"; . auto/types/typedef
  ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
  
 -ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
@@ -190,9 +194,9 @@
  . auto/types/sizeof
  ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value
  
-@@ -432,15 +432,15 @@
+@@ -620,15 +620,15 @@ ngx_type="rlim_t"; ngx_types="int"; . au
  
- . auto/endianess
+ . auto/endianness
  
 -ngx_type="size_t"; . auto/types/sizeof
 +ngx_type="size_t"; ngx_param="SIZE_T"; . auto/types/sizeof
@@ -208,4 +212,4 @@
 +ngx_type="time_t"; ngx_param="TIME_T"; . auto/types/sizeof
  ngx_param=NGX_TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value
  ngx_param=NGX_TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
- 
+ ngx_param=NGX_MAX_TIME_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
index 4a97e26..e6ae52a 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -14,13 +14,14 @@
 SRC_URI = " \
     http://nginx.org/download/nginx-${PV}.tar.gz \
     file://nginx-cross.patch \
+    file://0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch \
     file://nginx.conf \
     file://nginx.init \
     file://nginx-volatile.conf \
     file://nginx.service \
 "
 
-inherit update-rc.d useradd systemd
+inherit siteinfo update-rc.d useradd systemd
 
 SYSTEMD_SERVICE_${PN} = "nginx.service"
 
@@ -50,7 +51,7 @@
 
     ./configure \
     --crossbuild=Linux:${TUNE_ARCH} \
-    --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
+    --with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
     --with-int=4 \
     --with-long=${PTRSIZE} \
     --with-long-long=8 \
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.12.1.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.12.1.bb
deleted file mode 100644
index 7f0e3ad..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.12.1.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require nginx.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=903753de5f86a1ee0341fd2f9491b282"
-
-SRC_URI[md5sum] = "a307e74aca95403e5ee00f153807ce58"
-SRC_URI[sha256sum] = "8793bf426485a30f91021b6b945a9fd8a84d87d17b566562c3797aba8fac76fb"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.12.2.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.12.2.bb
new file mode 100644
index 0000000..85ad29b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.12.2.bb
@@ -0,0 +1,6 @@
+require nginx.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=903753de5f86a1ee0341fd2f9491b282"
+
+SRC_URI[md5sum] = "4d2fc76211435f029271f1cf6d7eeae3"
+SRC_URI[sha256sum] = "305f379da1d5fb5aefa79e45c829852ca6983c7cd2a79328f8e084a324cf0416"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.13.5.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.13.5.bb
deleted file mode 100644
index 9f2c117..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.13.5.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require nginx.inc
-
-# 1.12.x branch is the current stable branch, the recommended default
-# 1.13.x is the current mainline branches containing all new features
-DEFAULT_PREFERENCE = "-1"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=903753de5f86a1ee0341fd2f9491b282"
-
-SRC_URI[md5sum] = "f193722159adfb1eb8117c0491fd17ec"
-SRC_URI[sha256sum] = "0e75b94429b3f745377aeba3aff97da77bf2b03fcb9ff15b3bad9b038db29f2e"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.13.9.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.13.9.bb
new file mode 100644
index 0000000..9234794
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.13.9.bb
@@ -0,0 +1,10 @@
+require nginx.inc
+
+# 1.12.x branch is the current stable branch, the recommended default
+# 1.13.x is the current mainline branches containing all new features
+DEFAULT_PREFERENCE = "-1"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3691402cc54ce09f800ca348634a2dfe"
+
+SRC_URI[md5sum] = "dcd482dd98d2022659212f183e8fe81b"
+SRC_URI[sha256sum] = "5faea18857516fe68d30be39c3032bd22ed9cf85e1a6fdf32e3721d96ff7fa42"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb
index c9fe55b..37bd753 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb
@@ -14,6 +14,9 @@
 SRC_URI[md5sum] = "3cda1b6c8c8542b1510eadb8e540d8b6"
 SRC_URI[sha256sum] = "a1ee2806432eaf5b5dd267a0523701f9f1fa00fefd499d5bec42165a41e05846"
 
+UPSTREAM_CHECK_URI = "https://github.com/blueness/sthttpd/releases/"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz"
+
 S = "${WORKDIR}/sthttpd-${PV}"
 
 inherit autotools update-rc.d systemd
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.7.6.bb b/import-layers/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.7.6.bb
deleted file mode 100644
index 672db58..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.7.6.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Web-based MySQL administration interface"
-HOMEPAGE = "http://www.phpmyadmin.net"
-# Main code is GPLv2, vendor/tecnickcom/tcpdf is under LGPLv3, js/jquery is under MIT
-LICENSE = "GPLv2 & LGPLv3 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://vendor/tecnickcom/tcpdf/LICENSE.TXT;md5=5c87b66a5358ebcc495b03e0afcd342c \
-                    file://js/jquery/MIT-LICENSE.txt;md5=e43aa437a6a1ba421653bd5034333bf9 \
-"
-
-SRC_URI = "https://files.phpmyadmin.net/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \
-           file://apache.conf \
-"
-
-SRC_URI[md5sum] = "a9aec05d44c68b4ac5e4987118d70cd7"
-SRC_URI[sha256sum] = "5fab6b92336386646bbb189d55817799487b5c27b06cab0cdfdcab3c88f5988f"
-
-S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages"
-
-inherit allarch
-
-do_install() {
-    install -d ${D}${datadir}/${BPN}
-    cp -R --no-dereference --preserve=mode,links -v * ${D}${datadir}/${BPN}
-    chown -R root:root ${D}${datadir}/${BPN}
-    # Don't install patches to target
-    rm -rf ${D}${datadir}/${BPN}/patches
-
-    install -d ${D}${sysconfdir}/apache2/conf.d
-    install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf
-
-    # Remove a few scripts that explicitly require bash (!)
-    rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh
-}
-
-FILES_${PN} = "${datadir}/${BPN} \
-               ${sysconfdir}/apache2/conf.d"
-
-RDEPENDS_${PN} += "bash"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.7.9.bb b/import-layers/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.7.9.bb
new file mode 100644
index 0000000..071572d
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.7.9.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Web-based MySQL administration interface"
+HOMEPAGE = "http://www.phpmyadmin.net"
+# Main code is GPLv2, vendor/tecnickcom/tcpdf is under LGPLv3, js/jquery is under MIT
+LICENSE = "GPLv2 & LGPLv3 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://vendor/tecnickcom/tcpdf/LICENSE.TXT;md5=5c87b66a5358ebcc495b03e0afcd342c \
+                    file://js/jquery/MIT-LICENSE.txt;md5=e43aa437a6a1ba421653bd5034333bf9 \
+"
+
+SRC_URI = "https://files.phpmyadmin.net/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \
+           file://apache.conf \
+"
+
+SRC_URI[md5sum] = "0a862e3fa52c8b9078e0441ee82be831"
+SRC_URI[sha256sum] = "f19b503f0afb0dd3389d4bb11dab3f438d36e85eef11a5c400c592fd5f539398"
+
+UPSTREAM_CHECK_URI = "https://www.phpmyadmin.net/downloads/"
+UPSTREAM_CHECK_REGEX = "phpMyAdmin-(?P<pver>\d+(\.\d+)+)-all-languages.tar.xz"
+
+S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages"
+
+inherit allarch
+
+do_install() {
+    install -d ${D}${datadir}/${BPN}
+    cp -R --no-dereference --preserve=mode,links -v * ${D}${datadir}/${BPN}
+    chown -R root:root ${D}${datadir}/${BPN}
+    # Don't install patches to target
+    rm -rf ${D}${datadir}/${BPN}/patches
+
+    install -d ${D}${sysconfdir}/apache2/conf.d
+    install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf
+
+    # Remove a few scripts that explicitly require bash (!)
+    rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh
+}
+
+FILES_${PN} = "${datadir}/${BPN} \
+               ${sysconfdir}/apache2/conf.d"
+
+RDEPENDS_${PN} += "bash"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.5.1.bb b/import-layers/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.5.1.bb
deleted file mode 100644
index 7741378..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.5.1.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Debugging and profiling extension for PHP"
-LICENSE = "Xdebug"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=34df3a274aa12b795417c65634c07f16"
-
-DEPENDS = "php"
-
-SRC_URI = "http://xdebug.org/files/xdebug-${PV}.tgz"
-
-SRC_URI[md5sum] = "6167b1e104f1108d77f08eb561a12b22"
-SRC_URI[sha256sum] = "7fda9020fd5a2c549ae5a692fcabbb00f74e39dda81d53d25e622bdab4880ec2"
-
-inherit autotools
-
-EXTRA_OECONF += "--enable-xdebug -with-php-config=${STAGING_BINDIR_CROSS}/php-config"
-
-do_configure() {
-    cd ${S}
-    ${STAGING_BINDIR_CROSS}/phpize
-    cd ${B}
-
-    # Running autoreconf as autotools_do_configure would do here
-    # breaks the libtool configuration resulting in a failure later
-    # in do_compile. It's possible this may be fixable, however the
-    # easiest course of action for the moment is to avoid doing that.
-    oe_runconf
-}
-
-do_install() {
-    oe_runmake install INSTALL_ROOT=${D}
-}
-
-FILES_${PN} += "${libdir}/php*/extensions/*/*.so"
-FILES_${PN}-dbg += "${libdir}/php*/extensions/*/.debug"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.6.0.bb b/import-layers/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.6.0.bb
new file mode 100644
index 0000000..6516988
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.6.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Debugging and profiling extension for PHP"
+LICENSE = "Xdebug"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=34df3a274aa12b795417c65634c07f16"
+
+DEPENDS = "php re2c-native"
+
+SRC_URI = "http://xdebug.org/files/xdebug-${PV}.tgz"
+
+SRC_URI[md5sum] = "ed3545852e6f4a00fb8730362d0431ee"
+SRC_URI[sha256sum] = "b5264cc03bf68fcbb04b97229f96dca505d7b87ec2fb3bd4249896783d29cbdc"
+
+inherit autotools
+
+EXTRA_OECONF += "--enable-xdebug -with-php-config=${STAGING_BINDIR_CROSS}/php-config"
+
+do_configure() {
+    cd ${S}
+    ${STAGING_BINDIR_CROSS}/phpize
+    cd ${B}
+
+    # Running autoreconf as autotools_do_configure would do here
+    # breaks the libtool configuration resulting in a failure later
+    # in do_compile. It's possible this may be fixable, however the
+    # easiest course of action for the moment is to avoid doing that.
+    oe_runconf
+}
+
+do_install() {
+    oe_runmake install INSTALL_ROOT=${D}
+}
+
+FILES_${PN} += "${libdir}/php*/extensions/*/*.so"
+FILES_${PN}-dbg += "${libdir}/php*/extensions/*/.debug"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-makefile-Do-not-build-contrib-dir.patch b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-makefile-Do-not-build-contrib-dir.patch
index 9a3a4a5..6a0d75e 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-makefile-Do-not-build-contrib-dir.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata/0001-makefile-Do-not-build-contrib-dir.patch
@@ -11,17 +11,17 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 3ccf82f8..a852e529 100644
+index 2ea9e40..acb1bd8 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -52,7 +52,6 @@ SUBDIRS = \
+@@ -56,7 +56,6 @@ SUBDIRS = \
  	src \
  	system \
  	web \
 -	contrib \
+ 	tests \
  	$(NULL)
  
- dist_noinst_DATA= \
 -- 
 2.13.2
 
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_git.bb b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
index 1003662..b0f1602 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
@@ -1,15 +1,15 @@
 HOMEPAGE = "https://github.com/firehol/netdata/"
 SUMMARY = "Real-time performance monitoring"
 LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a4a3b650ea3f74269cdfd45a3550e219 \
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=95b49e9ea979a337578f13c2a3ab9535 \
                     file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                    "
 
 SRC_URI = "git://github.com/firehol/netdata.git;protocol=https \
            file://0001-makefile-Do-not-build-contrib-dir.patch \
 "
-SRCREV = "f5fa346a188e906a8f2cce3c2cf32a88ce81c666"
-PV = "1.6.0+git${SRCPV}"
+SRCREV = "89ed309252981ddd50f697fde4fe93019cb3e652"
+PV = "1.8.0+git${SRCPV}"
 
 # patch to disable timeout because timeout are not available with actual version
 # of core-utils
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
index 1ca1480..9aad894 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
@@ -7,11 +7,11 @@
 
 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 
-diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl
-index 57a37f7..838b944 100755
---- a/webmin/webmin-lib.pl
-+++ b/webmin/webmin-lib.pl
-@@ -1086,28 +1086,28 @@
+Index: webmin-1.850/webmin/webmin-lib.pl
+===================================================================
+--- webmin-1.850.orig/webmin/webmin-lib.pl
++++ webmin-1.850/webmin/webmin-lib.pl
+@@ -1112,28 +1112,28 @@ my %miniserv;
  &load_theme_library();	# So that UI functions work
  
  # Need OS upgrade
@@ -62,4 +62,3 @@
  
  # Password close to expiry
  my $warn_days = $config{'warn_days'};
-
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch
index 177d8a3..d5dfed5 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch
@@ -14,11 +14,11 @@
  exports/exports-lib.pl |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/exports/exports-lib.pl b/exports/exports-lib.pl
-index 22891c0..1c67494 100755
---- a/exports/exports-lib.pl
-+++ b/exports/exports-lib.pl
-@@ -273,7 +273,7 @@ return !&has_command("rpc.nfsd") && !&has_command("nfsd") &&
+Index: webmin-1.850/exports/exports-lib.pl
+===================================================================
+--- webmin-1.850.orig/exports/exports-lib.pl
++++ webmin-1.850/exports/exports-lib.pl
+@@ -301,7 +301,7 @@ return !&has_command("rpc.nfsd") && !&ha
  sub restart_mountd
  {
  # Try exportfs -r first
@@ -27,6 +27,3 @@
  	my $out = &backquote_logged("$config{'apply_cmd'} 2>&1 </dev/null");
  	if (!$? && $out !~ /invalid|error|failed/i) {
  		# Looks like it worked!
--- 
-1.7.9.5
-
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
index 5563227..4212917 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
@@ -11,11 +11,11 @@
  init/init-lib.pl |  5 +++--
  2 files changed, 17 insertions(+), 15 deletions(-)
 
-diff --git a/init/index.cgi b/init/index.cgi
-index d48b793..30dafd4 100755
---- a/init/index.cgi
-+++ b/init/index.cgi
-@@ -45,19 +45,20 @@ elsif ($init_mode eq "init" && $access{'bootup'}) {
+Index: webmin-1.850/init/index.cgi
+===================================================================
+--- webmin-1.850.orig/init/index.cgi
++++ webmin-1.850/init/index.cgi
+@@ -45,19 +45,20 @@ elsif ($init_mode eq "init" && $access{'
  					     : "$config{'init_dir'}/$ac[0]");
  		}
  	@runlevels = &list_runlevels();
@@ -49,11 +49,11 @@
  
  	# For each action, look at /etc/rc*.d/* files to see if it is 
  	# started at boot
-diff --git a/init/init-lib.pl b/init/init-lib.pl
-index ead21ed..b41794b 100755
---- a/init/init-lib.pl
-+++ b/init/init-lib.pl
-@@ -119,8 +119,9 @@ List boot time action names from init.d, such as httpd and cron.
+Index: webmin-1.850/init/init-lib.pl
+===================================================================
+--- webmin-1.850.orig/init/init-lib.pl
++++ webmin-1.850/init/init-lib.pl
+@@ -124,8 +124,9 @@ List boot time action names from init.d,
  =cut
  sub list_actions
  {
@@ -64,7 +64,7 @@
  opendir(DIR, $dir);
  foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) {
  	if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" ||
-@@ -128,7 +129,7 @@ foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) {
+@@ -133,7 +134,7 @@ foreach $f (sort { lc($a) cmp lc($b) } r
  	    -d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" ||
  	    $f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ ||
  	    $f =~ /^\.depend\./ || $f eq '.legacy-bootordering' ||
@@ -73,6 +73,3 @@
  	if (@stbuf = stat("$dir/$f")) {
  		push(@rv, "$f $stbuf[1]");
  		}
---
-2.0.0
-
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch
index 7d20aff..5549392 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch
@@ -3,9 +3,11 @@
 # Upstream-status: Not appropriate [config]
 #
 # Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---- webmin-1.570.orig/net/module.info
-+++ webmin-1.570/net/module.info
-@@ -11,7 +11,7 @@ desc_ko_KR.UTF-8=ė„¤ķŠøģ›Œķ¬ źµ¬ģ„±
+Index: webmin-1.850/net/module.info
+===================================================================
+--- webmin-1.850.orig/net/module.info
++++ webmin-1.850/net/module.info
+@@ -14,7 +14,7 @@ desc_ko_KR.UTF-8=ė„¤ķŠøģ›Œķ¬ źµ¬ģ„±
  name=Networking
  desc_tr=Að Yapýlandýrmasý
  desc_de=Netzwerkkonfiguration
@@ -14,8 +16,10 @@
  desc_sk=Konfigurácia siete
  desc_zh_CN=ÍøÂçÅäÖÃ
  risk=low medium high
+Index: webmin-1.850/net/generic-linux-lib.pl
+===================================================================
 --- /dev/null
-+++ webmin-1.570/net/generic-linux-lib.pl
++++ webmin-1.850/net/generic-linux-lib.pl
 @@ -0,0 +1,2 @@
 +do 'linux-lib.pl';
 +
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch
index c17e3b2..426d637 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch
@@ -12,11 +12,11 @@
 
 Signed-off-by: Yu Ke <ke.yu@intel.com>
 
-diff --git a/exports/save_export.cgi b/exports/save_export.cgi
-index 3bc2f97..3e60298 100755
---- a/exports/save_export.cgi
-+++ b/exports/save_export.cgi
-@@ -40,7 +40,7 @@ else {
+Index: webmin-1.850/exports/save_export.cgi
+===================================================================
+--- webmin-1.850.orig/exports/save_export.cgi
++++ webmin-1.850/exports/save_export.cgi
+@@ -50,7 +50,7 @@ else {
  			&error(&text('save_enetmask', $in{'netmask'}));
  		$exp{'host'} = $in{'network'}."/".$in{'netmask'};
  		}
@@ -25,9 +25,9 @@
  	else {
  		$in{'host'} =~ /\*/ || &to_ipaddress($in{'host'}) ||
  			&error(&text('save_ehost', $in{'host'}));
-@@ -70,6 +70,11 @@ else {
- 
- 	delete($opts{'no_subtree_check'}); delete($opts{'subtree_check'});
+@@ -87,6 +87,11 @@ else {
+ 	delete($opts{'no_subtree_check'});
+ 	delete($opts{'subtree_check'});
  	$opts{'no_subtree_check'} = "" if ($in{'no_subtree_check'});
 +	if ($in{'no_subtree_check'}) {
 +		$opts{'no_subtree_check'} = "";
@@ -35,5 +35,5 @@
 +		$opts{'subtree_check'} = "";
 +	}
  
- 	delete($opts{'nohide'}); delete($opts{'hide'});
- 	$opts{'nohide'} = "" if ($in{'nohide'});
+ 	delete($opts{'nohide'});
+ 	delete($opts{'hide'});
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
index ae88eb6..ce9bc92 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
@@ -24,6 +24,9 @@
 SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b"
 SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1"
 
+UPSTREAM_CHECK_URI = "http://www.webmin.com/download.html"
+UPSTREAM_CHECK_REGEX = "webmin-(?P<pver>\d+(\.\d+)+).tar.gz"
+
 inherit perlnative update-rc.d systemd
 
 do_configure() {
diff --git a/import-layers/meta-openembedded/meta-xfce/README b/import-layers/meta-openembedded/meta-xfce/README
index 3367797..7431e8b 100644
--- a/import-layers/meta-openembedded/meta-xfce/README
+++ b/import-layers/meta-openembedded/meta-xfce/README
@@ -1,11 +1,11 @@
 This layer depends on:
 
 URI: git://github.com/openembedded/oe-core.git
-branch: rocko
+branch: master
 revision: HEAD
 
 URI: git://github.com/openembedded/meta-oe.git
-branch: rocko
+branch: master
 revision: HEAD
 meta-xfce depends on meta-oe, meta-gnome and meta-multimedia in this repository.
 
@@ -14,10 +14,9 @@
 
 BBMASK = "meta-xfce/recipes-multimedia"
 
-Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-xfce][rocko]' in the subject'
+Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-xfce]' in the subject'
 
 When sending single patches, please using something like:
-'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-xfce][rocko][PATCH'
+'git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-xfce][PATCH'
 
-rocko Branch Maintainer:
-Armin Kuster <akuster808@gmail.com>
+Layer maintainer: Andreas Müller <schnitzeltony@googlemail.com>
diff --git a/import-layers/meta-openembedded/meta-xfce/conf/layer.conf b/import-layers/meta-openembedded/meta-xfce/conf/layer.conf
index ad25dcb..bee8e70 100644
--- a/import-layers/meta-openembedded/meta-xfce/conf/layer.conf
+++ b/import-layers/meta-openembedded/meta-xfce/conf/layer.conf
@@ -18,6 +18,8 @@
 LAYERDEPENDS_xfce-layer += "multimedia-layer"
 LAYERDEPENDS_xfce-layer += "meta-python"
 
+LAYERSERIES_COMPAT_xfce-layer = "sumo"
+
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
   xfce4-session->machine-host \
 "
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0001-add_launcher-Exit-early-if-no-row-is-selected.patch b/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0001-add_launcher-Exit-early-if-no-row-is-selected.patch
deleted file mode 100644
index fb2dfc9..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0001-add_launcher-Exit-early-if-no-row-is-selected.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 1060e7ac8a63b93d56006718f0e9b1d9382b2226 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Mon, 31 Oct 2016 08:33:16 +0100
-Subject: [PATCH] add_launcher: Exit early if no row is selected
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Stolen from [1]
-
-[1] http://pkgs.fedoraproject.org/cgit/rpms/menulibre.git/tree/menulibre-add-launcher-none-check.patch
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- menulibre/MenulibreApplication.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/menulibre/MenulibreApplication.py b/menulibre/MenulibreApplication.py
-index e234800..ac73b03 100644
---- a/menulibre/MenulibreApplication.py
-+++ b/menulibre/MenulibreApplication.py
-@@ -1418,6 +1418,10 @@ class MenulibreWindow(Gtk.ApplicationWindow):
-         model, parent_data = self.treeview.get_parent_row_data()
-         model, row_data = self.treeview.get_selected_row_data()
- 
-+        # Exit early if no row is selected
-+        if not row_data:
-+            return
-+
-         # Currently selected item is a directory, take its categories.
-         if row_data[2] == MenuItemTypes.DIRECTORY:
-             self.treeview.add_child(new_row_data)
--- 
-2.5.5
-
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0002-setup.py-avoid-usr-share-share-paths.patch b/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0002-setup.py-avoid-usr-share-share-paths.patch
deleted file mode 100644
index b63d4dc..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0002-setup.py-avoid-usr-share-share-paths.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 99788b4557543c490493ce1b827538c49142c25d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Mon, 31 Oct 2016 09:08:51 +0100
-Subject: [PATCH] setup.py: avoid /usr/share/share paths
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- setup.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 5fc237d..c4fbf7c 100644
---- a/setup.py
-+++ b/setup.py
-@@ -143,7 +143,7 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto):
- 
-         if self.root:
-             target_data = os.path.relpath(self.install_data, self.root) + os.sep
--            target_pkgdata = os.path.join(target_data, 'share', 'menulibre', '')
-+            target_pkgdata = os.path.join(target_data, 'menulibre', '')
-             target_scripts = os.path.join(self.install_scripts, '')
- 
-             data_dir = os.path.join(self.prefix, 'share', 'menulibre', '')
-@@ -152,7 +152,7 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto):
-             # --user install
-             self.root = ''
-             target_data = os.path.relpath(self.install_data) + os.sep
--            target_pkgdata = os.path.join(target_data, 'share', 'menulibre', '')
-+            target_pkgdata = os.path.join(target_data, 'menulibre', '')
-             target_scripts = os.path.join(self.install_scripts, '')
- 
-             # Use absolute paths
--- 
-2.5.5
-
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0003-MenulibreXdg.py-fix-loading-of-desktop-files.patch b/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0003-MenulibreXdg.py-fix-loading-of-desktop-files.patch
deleted file mode 100644
index 1e92088..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/files/0003-MenulibreXdg.py-fix-loading-of-desktop-files.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 90098d835b62b38ac396d55b80a684770dbaacde Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Mon, 31 Oct 2016 15:50:52 +0100
-Subject: [PATCH] MenulibreXdg.py: fix loading of desktop files
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-fixes:
-| UnicodeDecodeError: 'ascii' codec can't decode byet 0xd9 in position 235: ordinal not in range(128)
-
-and information display not properly filled.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- menulibre/MenulibreXdg.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/menulibre/MenulibreXdg.py b/menulibre/MenulibreXdg.py
-index e04c5e6..14b2593 100644
---- a/menulibre/MenulibreXdg.py
-+++ b/menulibre/MenulibreXdg.py
-@@ -74,7 +74,7 @@ class MenulibreDesktopEntry:
- 
-     def load_properties(self, filename):
-         """Load the properties."""
--        input_file = open(filename)
-+        input_file = open(filename, 'rt', encoding='utf-8')
-         self.load_properties_from_text(input_file.read())
-         input_file.close()
- 
--- 
-2.5.5
-
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.1.3.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.1.3.bb
deleted file mode 100644
index 69e52fe..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.1.3.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-DESCRIPTION = "An advanced menu editor"
-HOMEPAGE = "https://launchpad.net/menulibre"
-SECTION = "x11/graphics"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "python3-distutils-extra-native intltool-native"
-
-inherit distutils3 gtk-icon-cache
-
-SRC_URI = " \
-    https://launchpad.net/menulibre/2.1/${PV}/+download/${PN}-${PV}.tar.gz \
-    file://0001-add_launcher-Exit-early-if-no-row-is-selected.patch \
-    file://0002-setup.py-avoid-usr-share-share-paths.patch \
-    file://0003-MenulibreXdg.py-fix-loading-of-desktop-files.patch \
-"
-SRC_URI[md5sum] = "19d9d3337322eb5513454bb8cdfb739b"
-SRC_URI[sha256sum] = "bdd69740119902f1b1f8c7831155f4428403792a0a6c4287bcbb395c4e71fb31"
-
-do_install_append() {
-    sed -i 's:${D}::g' ${D}${datadir}/applications/menulibre.desktop
-}
-
-FILES_${PN} += " \
-    ${datadir}/applications \
-    ${datadir}/menulibre \
-    ${datadir}/icons \
-"
-
-RDEPENDS_${PN} += " \
-    gtk+3 \
-    python3-pygobject \
-    gnome-menus3 \
-    python3-unixadmin \
-    python3-psutil \
-"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.1.5.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.1.5.bb
new file mode 100644
index 0000000..d1f3471
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.1.5.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "An advanced menu editor"
+HOMEPAGE = "https://launchpad.net/menulibre"
+SECTION = "x11/graphics"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = " \
+    python3-distutils-extra-native \
+    intltool-native \
+"
+
+inherit distutils3 gtk-icon-cache distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "https://launchpad.net/menulibre/2.1/${PV}/+download/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "efc7edb49bb0e5fea49e158b40573334"
+SRC_URI[sha256sum] = "ef05b2722bab2acb7070d6c8ed0e7bd58bd4a4540bf498af9e889944f9da08b5"
+
+do_compile() {
+}
+
+do_install_append() {
+    sed -i 's:${D}::g' ${D}${datadir}/applications/menulibre.desktop
+    sed -i 's:share/share:share:g' ${D}${PYTHON_SITEPACKAGES_DIR}/menulibre_lib/menulibreconfig.py
+}
+
+FILES_${PN} += " \
+    ${datadir}/applications \
+    ${datadir}/menulibre \
+    ${datadir}/icons \
+"
+
+RDEPENDS_${PN} += " \
+    gtk+3 \
+    gtksourceview3 \
+    python3-pygobject \
+    gnome-menus3 \
+    python3-unixadmin \
+    python3-psutil \
+"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb
index e275af0..a27c8f5 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb
@@ -12,7 +12,9 @@
 PV = "0.5.3"
 S = "${WORKDIR}/git"
 
-inherit xfce-git gettext pkgconfig autotools gtk-icon-cache
+inherit xfce-git gettext pkgconfig autotools gtk-icon-cache distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 # install tap files for thunar-archive-plugin in ${libdir}/thunar-archive-plugin
 EXTRA_OECONF += "--libexecdir=${libdir}"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce-polkit/files/0001-fix-Name-Comment-fields.patch b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce-polkit/files/0001-fix-Name-Comment-fields.patch
new file mode 100644
index 0000000..e872249
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce-polkit/files/0001-fix-Name-Comment-fields.patch
@@ -0,0 +1,34 @@
+From fb1f83c04dd5262897b09e60fa8b39090d0d4619 Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter@math.unl.edu>
+Date: Thu, 12 Nov 2015 13:53:03 -0600
+Subject: [PATCH] fix Name/Comment fields
+
+Validate as a valid .desktop file per
+http://standards.freedesktop.org/desktop-entry-spec/latest/
+
+See also issue #2
+
+Upstream-Status: Applied [1]
+
+[1] https://github.com/ncopa/xfce-polkit/commit/fb1f83c04dd5262897b09e60fa8b39090d0d4619
+---
+ xfce-polkit.desktop.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xfce-polkit.desktop.in b/xfce-polkit.desktop.in
+index 8575896..dd9f09c 100644
+--- a/xfce-polkit.desktop.in
++++ b/xfce-polkit.desktop.in
+@@ -1,7 +1,7 @@
+ [Desktop Entry]
+ Type=Application
+-_Name=XFCE PolKit
+-_Comment=Policykit Authentication Agent
++Name=XFCE PolKit
++Comment=Policykit Authentication Agent
+ Exec=@xfce_polkit_libexecdir@/xfce-polkit
+ Icon=gtk-dialog-authentication
+ NotShowIn=GNOME;KDE;
+-- 
+2.14.3
+
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.2.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.2.bb
index 1fb4a5b..54bf7c7 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.2.bb
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.2.bb
@@ -6,6 +6,9 @@
 
 inherit xfce-app
 
-SRC_URI = "git://github.com/ncopa/${BPN}.git"
+SRC_URI = " \
+    git://github.com/ncopa/${BPN}.git \
+    file://0001-fix-Name-Comment-fields.patch \
+"
 SRCREV = "6ad1ee833c9e22e4dd72a8f7d54562d046965283"
 S = "${WORKDIR}/git"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.3.6.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.3.6.bb
deleted file mode 100644
index ac2360a..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.3.6.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Easily themable notification daemon with transparency effects"
-HOMEPAGE = "http://goodies.xfce.org/projects/applications/xfce4-notifyd"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "libxfce4util libxfce4ui xfconf gtk+ dbus dbus-glib libnotify \
-    dbus-glib-native \
-"
-
-inherit xfce-app
-
-SRC_URI[md5sum] = "19e602fa5e33afaf7563f069261ae1db"
-SRC_URI[sha256sum] = "f4ca7c0dadd3d4cdf8cd3c8ae60ccea77b8cf409f8517161796364eb1d766cf9"
-
-do_compile_prepend() {
-    mkdir -p xfce4-notifyd
-}
-
-FILES_${PN} += " \
-    ${systemd_user_unitdir} \
-    ${libdir}/xfce4/notifyd \
-    ${datadir}/themes \
-    ${datadir}/dbus-1 \
-"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.2.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.2.bb
new file mode 100644
index 0000000..15ec51b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.4.2.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Easily themable notification daemon with transparency effects"
+HOMEPAGE = "http://goodies.xfce.org/projects/applications/xfce4-notifyd"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+DEPENDS = " \
+    dbus \
+    dbus-glib \
+    dbus-glib-native \
+    libnotify \
+    libxfce4util \
+    libxfce4ui \
+    xfconf \
+    xfce4-panel \
+"
+
+inherit xfce-app
+
+SRC_URI[md5sum] = "ecb930ef6ae6e1f310a5afe5f638eff8"
+SRC_URI[sha256sum] = "f6f28af47fdfb41db84bd003f0d76f5f4abf2137d1e27e9d378f063bb8f82356"
+
+# Avoid trouble with other desktops e.g KDE which also ships dbus service named
+# org.freedesktop.Notifications
+EXTRA_OECONF = "--disable-dbus-start-daemon"
+
+do_compile_prepend() {
+    mkdir -p xfce4-notifyd xfce4-notifyd-config
+}
+
+FILES_${PN} += " \
+    ${systemd_user_unitdir} \
+    ${datadir}/xfce4 \
+    ${datadir}/themes \
+    ${datadir}/dbus-1 \
+    ${libdir}/xfce4 \
+"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-terminal/xfce4-terminal_0.8.6.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-terminal/xfce4-terminal_0.8.6.bb
deleted file mode 100644
index f42edb6..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-terminal/xfce4-terminal_0.8.6.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-SUMMARY = "Terminal emulator for the Xfce desktop environment"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "glib-2.0 gtk+3 vte libxfce4ui"
-
-inherit xfce-app
-
-FILES_${PN} += "${datadir}/xfce4 \
-                ${datadir}/gnome-control-center"
-
-SRC_URI[md5sum] = "92f5a3366e30f5f8238d8250f730b6af"
-SRC_URI[sha256sum] = "bc2a560409a0f0b666d1c557e991748b986ec27572a45ae88b0ee5a480d881d7"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-terminal/xfce4-terminal_0.8.7.3.bb b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-terminal/xfce4-terminal_0.8.7.3.bb
new file mode 100644
index 0000000..7630abc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-apps/xfce4-terminal/xfce4-terminal_0.8.7.3.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Terminal emulator for the Xfce desktop environment"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "glib-2.0 gtk+3 vte libxfce4ui"
+
+inherit xfce-app
+
+FILES_${PN} += "${datadir}/xfce4 \
+                ${datadir}/gnome-control-center"
+
+SRC_URI[md5sum] = "f014d613438848b452f1f9eecbf7027d"
+SRC_URI[sha256sum] = "dafa155177934fc7dce2d4efb33402f74b1a593a17ff17d2187a6429f599dfd6"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-bindings/vala/xfce4-vala_4.10.3.bb b/import-layers/meta-openembedded/meta-xfce/recipes-bindings/vala/xfce4-vala_4.10.3.bb
index d0a0598..28f9cde 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-bindings/vala/xfce4-vala_4.10.3.bb
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-bindings/vala/xfce4-vala_4.10.3.bb
@@ -3,13 +3,15 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
 DEPENDS = "libxfce4util garcon xfconf libxfce4ui xfce4-panel exo vala xfce4-dev-tools-native"
 
-inherit xfce
+inherit xfce pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "http://archive.xfce.org/src/bindings/${BPN}/${@xfce_verdir("${PV}")}/${BPN}-${PV}.tar.bz2"
 SRC_URI[md5sum] = "0bbb1d6e473e0fe9b335b7b1b49d8a71"
 SRC_URI[sha256sum] = "07a8f2b7c09fcdd3d86e0c52adea3c58ca011d0142a93997a01b4af77260ae7b"
 
-EXTRA_OECONF = "-with-vala-api=0.36"
+EXTRA_OECONF = "-with-vala-api=0.38"
 
 FILES_${PN} += "${datadir}/vala-*/vapi"
 
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/0001-Rename-use-of-stdout-and-stderr.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/0001-Rename-use-of-stdout-and-stderr.patch
deleted file mode 100644
index d77ce4d..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/0001-Rename-use-of-stdout-and-stderr.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 7ee62ef0083844ab2fffcd106e3ee2e5f29b2a91 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 12 Jul 2017 18:53:56 -0700
-Subject: [PATCH] Rename use of stdout and stderr
-
-Since it shadow the standard definitions especially
-seen on musl where libc defines these as macros they
-cause all short of compilation errors on musl, using
-a leading underscore makes it unique
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- imsettings-daemon/imsettings-proc.c | 28 ++++++++++++++--------------
- 1 file changed, 14 insertions(+), 14 deletions(-)
-
-diff --git a/imsettings-daemon/imsettings-proc.c b/imsettings-daemon/imsettings-proc.c
-index 915e78b..b78fcff 100644
---- a/imsettings-daemon/imsettings-proc.c
-+++ b/imsettings-daemon/imsettings-proc.c
-@@ -39,8 +39,8 @@
- #define MAXRESTART 3
- 
- typedef struct _IMSettingsProcInfo {
--	GIOChannel     *stdout;
--	GIOChannel     *stderr;
-+	GIOChannel     *_stdout;
-+	GIOChannel     *_stderr;
- 	GPid            pid;
- 	GTimeVal        started_time;
- 	guint           id;
-@@ -368,12 +368,12 @@ _start_process(IMSettingsProc     *proc,
- 					     &ofd, &efd,
- 					     error)) {
- 			pinfo->pid = pid;
--			pinfo->stdout = g_io_channel_unix_new(ofd);
--			pinfo->stderr = g_io_channel_unix_new(efd);
--			g_io_channel_set_close_on_unref(pinfo->stdout, TRUE);
--			g_io_channel_set_close_on_unref(pinfo->stderr, TRUE);
--			pinfo->oid = g_io_add_watch(pinfo->stdout, G_IO_IN, _log_write_cb, proc);
--			pinfo->eid = g_io_add_watch(pinfo->stderr, G_IO_IN, _log_write_cb, proc);
-+			pinfo->_stdout = g_io_channel_unix_new(ofd);
-+			pinfo->_stderr = g_io_channel_unix_new(efd);
-+			g_io_channel_set_close_on_unref(pinfo->_stdout, TRUE);
-+			g_io_channel_set_close_on_unref(pinfo->_stderr, TRUE);
-+			pinfo->oid = g_io_add_watch(pinfo->_stdout, G_IO_IN, _log_write_cb, proc);
-+			pinfo->eid = g_io_add_watch(pinfo->_stderr, G_IO_IN, _log_write_cb, proc);
- 			g_get_current_time(&pinfo->started_time);
- 			pinfo->id = g_child_watch_add(pid, _watch_im_status_cb, proc);
- 
-@@ -521,13 +521,13 @@ imsettings_proc_get_property(GObject    *object,
- static void
- imsettings_proc_info_finalize(IMSettingsProcInfo *pinfo)
- {
--	if (pinfo->stdout) {
--		g_io_channel_unref(pinfo->stdout);
--		pinfo->stdout = NULL;
-+	if (pinfo->_stdout) {
-+		g_io_channel_unref(pinfo->_stdout);
-+		pinfo->_stdout = NULL;
- 	}
--	if (pinfo->stderr) {
--		g_io_channel_unref(pinfo->stderr);
--		pinfo->stderr = NULL;
-+	if (pinfo->_stderr) {
-+		g_io_channel_unref(pinfo->_stderr);
-+		pinfo->_stderr = NULL;
- 	}
- 	if (pinfo->oid > 0) {
- 		g_source_remove(pinfo->oid);
--- 
-2.13.2
-
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/gtk-is-required-by-notify.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/gtk-is-required-by-notify.patch
deleted file mode 100644
index d42358d..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/gtk-is-required-by-notify.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-gtk+ is required by linnotify. So make sure gtk be linked before libnotify
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
-diff -Nurp imsettings-1.6.7.orig/configure.ac imsettings-1.6.7/configure.ac
---- imsettings-1.6.7.orig/configure.ac	2013-11-26 16:09:09.000000000 +0800
-+++ imsettings-1.6.7/configure.ac	2014-12-30 11:27:44.370003209 +0800
-@@ -93,8 +93,8 @@ PKG_CHECK_MODULES(LIBNOTIFY, libnotify,
- 		has_old_libnotify=yes
- 		PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
- 		AC_DEFINE(HAS_OLD_LIBNOTIFY,, [Using older libnotify])
--		IMDAEMON_CFLAGS="$GTK_CFLAGS $LIBNOTIFY_OLD_CFLAGS"
--		IMDAEMON_LIBS="$GTK_LIBS $LIBNOTIFY_OLD_LIBS"],[
-+		IMDAEMON_CFLAGS="$LIBNOTIFY_OLD_CFLAGS $GTK_CFLAGS"
-+		IMDAEMON_LIBS="$LIBNOTIFY_OLD_LIBS $GTK_LIBS"],[
- 		has_old_libnotify=no
- 		IMDAEMON_CFLAGS="$LIBNOTIFY_CFLAGS"
- 		IMDAEMON_LIBS="$LIBNOTIFY_LIBS"])
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/multi-line-ACLOCAL_AMFLAGS-isnot-supported-by-autoreconf.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/multi-line-ACLOCAL_AMFLAGS-isnot-supported-by-autoreconf.patch
deleted file mode 100644
index d5ac87d..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings/multi-line-ACLOCAL_AMFLAGS-isnot-supported-by-autoreconf.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-multi-line ACLOCAL_AMFLAGS isn't supported by autoreconf.
-It will cause configure error as follow.
-
-  aclocal: error: non-option arguments are not accepted: '\'.
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
-diff -Nurp imsettings-1.7.1.orig/Makefile.am imsettings-1.7.1/Makefile.am
---- imsettings-1.7.1.orig/Makefile.am	2013-02-08 11:33:59.000000000 +0900
-+++ imsettings-1.7.1/Makefile.am	2015-06-24 14:15:32.070000007 +0900
-@@ -1,7 +1,7 @@
- NULL =
- SUBDIRS = data imsettings imsettings-daemon backends utils po tests docs
- 
--ACLOCAL_AMFLAGS = -Im4macros
-+ACLOCAL_AMFLAGS = -I m4macros $(NULL)
- 
- CONFIGURE_DEPENDENCIES =		\
- 	requires			\
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.7.2.bb b/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.7.2.bb
deleted file mode 100644
index 7a4ce05..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.7.2.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Delivery framework for general Input Method configuration"
-DESCRIPTION = "IMSettings is a framework that delivers Input Method \
-settings and applies the changes so they take effect \
-immediately without any need to restart applications \
-or the desktop. \
-This package contains the core DBus services and some utilities."
-HOMEPAGE = "http://code.google.com/p/imsettings/"
-SECTION = "Applications/System"
-
-inherit autotools gtk-doc gobject-introspection
-
-SRC_URI = "https://bitbucket.org/tagoh/imsettings/downloads/${BPN}-${PV}.tar.bz2 \
-           file://gtk-is-required-by-notify.patch \
-           file://multi-line-ACLOCAL_AMFLAGS-isnot-supported-by-autoreconf.patch \
-           file://0001-Rename-use-of-stdout-and-stderr.patch \
-           "
-
-SRC_URI[md5sum] = "8153b0583a9f47d8a62af1f92fb9d3bf"
-SRC_URI[sha256sum] = "41addf0458f760212b6b6100835066e16deb3a8a50eb005a0fc17fbac0a2ae66"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-EXTRA_OECONF = "--with-xinputsh=50-xinput.sh \
-                --disable-static \
-               "
-
-DEPENDS = "gtk+ gconf libnotify dbus-glib libgxim xfconf intltool-native"
-
-RDEPENDS_${PN} += "bash"
-
-FILES_${PN} += "${datadir}/dbus-1/* ${datadir}/gir-1.0/* ${libdir}/girepository-1.0/*"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.7.3.bb b/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.7.3.bb
new file mode 100644
index 0000000..8f622bf
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.7.3.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Delivery framework for general Input Method configuration"
+DESCRIPTION = "IMSettings is a framework that delivers Input Method \
+settings and applies the changes so they take effect \
+immediately without any need to restart applications \
+or the desktop. \
+This package contains the core DBus services and some utilities."
+HOMEPAGE = "http://code.google.com/p/imsettings/"
+SECTION = "Applications/System"
+
+inherit autotools gtk-doc gobject-introspection distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "https://bitbucket.org/tagoh/imsettings/downloads/${BPN}-${PV}.tar.bz2 \
+           "
+
+SRC_URI[md5sum] = "c6c65a2b2654fe9dfe9ab2e8b80c079a"
+SRC_URI[sha256sum] = "196d3a74cef254ff812c32682d1818d740e36a68b976fef9e99748d23a71a71a"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+EXTRA_OECONF = "--with-xinputsh=50-xinput.sh \
+                --disable-static \
+               "
+
+DEPENDS = "gtk+ gconf libnotify dbus-glib libgxim xfconf intltool-native"
+
+RDEPENDS_${PN} += "bash"
+
+FILES_${PN} += "${datadir}/dbus-1/* ${datadir}/gir-1.0/* ${libdir}/girepository-1.0/*"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/0001-Makefile.am-use-LIBTOOL-instead-of-hardcoded-libtool.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/0001-Makefile.am-use-LIBTOOL-instead-of-hardcoded-libtool.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/0001-Makefile.am-use-LIBTOOL-instead-of-hardcoded-libtool.patch
rename to import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/0001-Makefile.am-use-LIBTOOL-instead-of-hardcoded-libtool.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/0001-test-unique-Add-format-qualifier-s-for-string.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/0001-test-unique-Add-format-qualifier-s-for-string.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/0001-test-unique-Add-format-qualifier-s-for-string.patch
rename to import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/0001-test-unique-Add-format-qualifier-s-for-string.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/build.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/build.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/build.patch
rename to import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/build.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/fix_for_compile_with_gcc-4.6.0.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/fix_for_compile_with_gcc-4.6.0.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/fix_for_compile_with_gcc-4.6.0.patch
rename to import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/fix_for_compile_with_gcc-4.6.0.patch
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/noconst.patch b/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/noconst.patch
similarity index 100%
rename from import-layers/meta-openembedded/meta-oe/recipes-gnome/libunique/libunique/noconst.patch
rename to import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique/noconst.patch
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique_1.1.6.bb b/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique_1.1.6.bb
new file mode 100644
index 0000000..49ed07a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-extended/libunique/libunique_1.1.6.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for supporting single instance GTK+ applications"
+DESCRIPTION = "Unique is a library for writing single instance GTK+ applications. If you launch a single instance application twice, the second instance will either just quit or will send a message to the running instance."
+HOMEPAGE = "https://wiki.gnome.org/Attic/LibUnique"
+BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=libunique"
+
+SRC_URI = "${GNOME_MIRROR}/libunique/1.1/libunique-${PV}.tar.bz2 \
+           file://fix_for_compile_with_gcc-4.6.0.patch \
+           file://noconst.patch \
+           file://build.patch \
+           file://0001-Makefile.am-use-LIBTOOL-instead-of-hardcoded-libtool.patch \
+           file://0001-test-unique-Add-format-qualifier-s-for-string.patch \
+           "
+
+SRC_URI[md5sum] = "7955769ef31f1bc4f83446dbb3625e6d"
+SRC_URI[sha256sum] = "e5c8041cef8e33c55732f06a292381cb345db946cf792a4ae18aa5c66cdd4fbb"
+
+PR = "r7"
+
+DEPENDS = "dbus-glib-native glib-2.0 gtk+"
+
+PACKAGECONFIG ??= "dbus"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus dbus-glib"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+
+inherit autotools pkgconfig gobject-introspection distro_features_check gtk-doc
+
+REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-multimedia/parole/parole_0.8.1.bb b/import-layers/meta-openembedded/meta-xfce/recipes-multimedia/parole/parole_0.8.1.bb
deleted file mode 100644
index 824611a..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-multimedia/parole/parole_0.8.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-DESCRIPTION = "Parole is a modern simple media player based on the GStreamer framework"
-HOMEPAGE = "http://goodies.xfce.org/projects/applications/parole"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-inherit xfce-app gtk-doc mime
-
-DEPENDS += " \
-    glib-2.0 \
-    dbus-glib \
-    gtk+3 \
-    \
-    xfce4-dev-tools-native \
-    libxfce4util \
-    libxfce4ui \
-    xfconf \
-    \
-    gstreamer1.0-plugins-base \
-    taglib \
-"
-
-SRC_URI[md5sum] = "361e3059f1263c76a3711db2c7c1a97b"
-SRC_URI[sha256sum] = "4b216f5200490f8d2a9bf1b3fcd9a8b20834c95249bf13b9170c82e1fcbd80f4"
-
-RDEPENDS_${PN} += "gstreamer1.0-plugins-good"
-
-EXTRA_OECONF = "--disable-gtk-doc"
-
-PACKAGECONFIG ??= "notify"
-PACKAGECONFIG[clutter] = "--enable-clutter, --disable-clutter, clutter"
-PACKAGECONFIG[notify] = "--enable-notify-plugin, --disable-notify-plugin, libnotify"
-
-FILES_${PN} += " \
-    ${datadir}/appdata \
-    ${libdir}/parole-0/*.so \
-"
-FILES_${PN}-dbg += "${libdir}/parole-0/.debug"
-FILES_${PN}-dev += "${libdir}/parole-0/*.la"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-multimedia/parole/parole_1.0.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-multimedia/parole/parole_1.0.0.bb
new file mode 100644
index 0000000..479f1a4
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-multimedia/parole/parole_1.0.0.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "Parole is a modern simple media player based on the GStreamer framework"
+HOMEPAGE = "http://goodies.xfce.org/projects/applications/parole"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+inherit xfce-app gtk-doc mime
+
+DEPENDS += " \
+    glib-2.0 \
+    dbus-glib \
+    gtk+3 \
+    \
+    xfce4-dev-tools-native \
+    libxfce4util \
+    libxfce4ui \
+    xfconf \
+    \
+    gstreamer1.0-plugins-base \
+    taglib \
+"
+
+SRC_URI[md5sum] = "d00d3ca571900826bf5e1f6986e42992"
+SRC_URI[sha256sum] = "6666b335aeb690fb527f77b62c322baf34834b593659fdcd21d21ed3f1e14010"
+
+RDEPENDS_${PN} += "gstreamer1.0-plugins-good"
+
+EXTRA_OECONF = "--disable-gtk-doc"
+
+PACKAGECONFIG ??= "notify"
+PACKAGECONFIG[clutter] = "--enable-clutter, --disable-clutter, clutter"
+PACKAGECONFIG[notify] = "--enable-notify-plugin, --disable-notify-plugin, libnotify"
+
+FILES_${PN} += " \
+    ${datadir}/appdata \
+    ${libdir}/parole-0/*.so \
+"
+FILES_${PN}-dbg += "${libdir}/parole-0/.debug"
+FILES_${PN}-dev += "${libdir}/parole-0/*.la"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.2.4.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.2.4.bb
deleted file mode 100644
index 4c7ca70..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.2.4.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Pulseaudio mixer for the xfce panel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f5eac6bb0d6ec0dc655e417781d4015f"
-
-inherit xfce-panel-plugin distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "pulseaudio x11"
-
-DEPENDS += "pulseaudio"
-
-SRC_URI[md5sum] = "e0ffde419fa030f1f9bd0b56e3264a1c"
-SRC_URI[sha256sum] = "8d9330ddf1d44a864a36d566cce4b76d4f859c5984bba7653d7dc39aa24d5c3e"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libnotify] = "--enable-libnotify,--disable-libnotify,libnotify"
-
-RRECOMMENDS_${PN} = "pavucontrol"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.4.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.4.0.bb
new file mode 100644
index 0000000..f5417a1
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.4.0.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Pulseaudio mixer for the xfce panel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f5eac6bb0d6ec0dc655e417781d4015f"
+
+inherit xfce-panel-plugin distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "pulseaudio x11"
+
+DEPENDS += "pulseaudio"
+
+SRC_URI[md5sum] = "12f3dd97e02c604e2023b5baf30d4a6c"
+SRC_URI[sha256sum] = "aef9ad68a0b604a6aeca4c08146f3eb42bedb4fe1c8b65b82679cec0e2fc1cb3"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libnotify] = "--enable-libnotify,--disable-libnotify,libnotify"
+
+RRECOMMENDS_${PN} = "pavucontrol"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin/0001-Specify-string-format-explicitly.patch b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin/0001-Specify-string-format-explicitly.patch
deleted file mode 100644
index 3f0bb05..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin/0001-Specify-string-format-explicitly.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 6b786e1c161026ab5486ac218891a85db65bf3ba Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 22 Mar 2017 15:28:24 -0700
-Subject: [PATCH] Specify string format explicitly
-
-Avoids below errors when compiling with -Wformat-security
-
-error: format string is not a string literal (potentially insecure)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/xfcetimer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/xfcetimer.c b/src/xfcetimer.c
-index 601772f..4b89682 100644
---- a/src/xfcetimer.c
-+++ b/src/xfcetimer.c
-@@ -190,7 +190,7 @@ static gboolean update_function (gpointer data){
- 
-     dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
-                                     GTK_MESSAGE_WARNING,
--                                    GTK_BUTTONS_NONE, dialog_message);
-+                                    GTK_BUTTONS_NONE, "%s", dialog_message);
-                            
-     gtk_window_set_title ((GtkWindow *) dialog, dialog_title);                                    
-  
--- 
-2.12.0
-
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.6.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.6.0.bb
deleted file mode 100644
index 9615192..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.6.0.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-SUMMARY = "XFCE panel plugin to generate alarm messages"
-DESCRIPTION = "This is a simple plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period"
-HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-timer-plugin"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ae39271267fd63eb7619432ff24e7ff1"
-
-inherit xfce-panel-plugin
-
-SRC_URI += "file://0001-Specify-string-format-explicitly.patch"
-
-SRC_URI[md5sum] = "3be2a4ccfb2af20441b1d25c2cea5f28"
-SRC_URI[sha256sum] = "39d7d21f099bc4219f6a6156142f0bbb8374986ee1970a9c0c8dc138b87f867c"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.0.bb
new file mode 100644
index 0000000..2ddc6f6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.0.bb
@@ -0,0 +1,10 @@
+SUMMARY = "XFCE panel plugin to generate alarm messages"
+DESCRIPTION = "This is a simple plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period"
+HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-timer-plugin"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ae39271267fd63eb7619432ff24e7ff1"
+
+inherit xfce-panel-plugin
+
+SRC_URI[md5sum] = "32e6a14e80bf9a93db2f2b3bfd7de920"
+SRC_URI[sha256sum] = "2e4e5343e39926230cc981d5fe56cd58a2f3817d2e9b6089b5673a2e39bf7e9b"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.8.10.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.8.10.bb
new file mode 100644
index 0000000..649eaaa
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.8.10.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Panel plugin to display current temperature and weather condition"
+HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+inherit xfce-panel-plugin
+
+DEPENDS += "libsoup-2.4 dbus-glib upower"
+
+SRC_URI[md5sum] = "bba7f750b97c8fc3656715268edad792"
+SRC_URI[sha256sum] = "ee6d43c444904631c240470e15e96215c2ce451158bfdbf234bce892bf60eab8"
+
+FILES_${PN} += "${datadir}/xfce4/weather"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.8.9.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.8.9.bb
deleted file mode 100644
index d9ed2ce..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.8.9.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-SUMMARY = "Panel plugin to display current temperature and weather condition"
-HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-inherit xfce-panel-plugin
-
-DEPENDS += "libsoup-2.4 dbus-glib upower"
-
-SRC_URI[md5sum] = "0c56c057e1c354b30409b7871ab6f314"
-SRC_URI[sha256sum] = "0e15d14b3e18c3da46ad23ee3158a25220f1474a48b611de96edb56221aecee5"
-
-FILES_${PN} += "${datadir}/xfce4/weather"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.1.3.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.1.3.bb
deleted file mode 100644
index 3c67a2f..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.1.3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-SUMMARY = "An alternate menu for the Xfce desktop environment"
-HOMEPAGE = "http://gottcode.org/xfce4-whiskermenu-plugin/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-inherit xfce-panel-plugin cmake
-
-SRC_URI[md5sum] = "032a2bb0a0d4a2e3c8c136910c8b551d"
-SRC_URI[sha256sum] = "e8918c1255f7ab86b950ebd13555fe87046c01a1a4cb0b5d460024b6efc01769"
-
-RRECOMMENDS_${PN} += "menulibre"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.1.6.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.1.6.bb
new file mode 100644
index 0000000..762cff0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.1.6.bb
@@ -0,0 +1,11 @@
+SUMMARY = "An alternate menu for the Xfce desktop environment"
+HOMEPAGE = "http://gottcode.org/xfce4-whiskermenu-plugin/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+inherit xfce-panel-plugin cmake
+
+SRC_URI[md5sum] = "b2b2bacc8d5f3c3119a0f317b6074276"
+SRC_URI[sha256sum] = "8b2a8ee1445df39a2cda139e353f2e9ec3720a780296dc41b7d4aebde57371fc"
+
+RRECOMMENDS_${PN} += "menulibre"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.0.bb
deleted file mode 100644
index 5e62c03..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "XKB layout switching panel plug-in for the Xfce desktop environment"
-HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin"
-SECTION = "x11/application"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=496f09f084b0f7e6f02f769a84490c6b"
-
-inherit xfce-panel-plugin
-
-SRC_URI[md5sum] = "e4e897741ebe2827192971c2aaad835d"
-SRC_URI[sha256sum] = "3b0d3b9f4b7c3e3e7be668e2f7c845b89b16e0ed3db2bacb544a17272682ced0"
-
-DEPENDS += "libxklavier libwnck3 librsvg garcon"
-
-FILES_${PN} += "${datadir}/xfce4/xkb"
-
-RDEPENDS_${PN} = "xfce4-settings"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.1.bb b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.1.bb
new file mode 100644
index 0000000..8ee3740
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.1.bb
@@ -0,0 +1,16 @@
+SUMMARY = "XKB layout switching panel plug-in for the Xfce desktop environment"
+HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin"
+SECTION = "x11/application"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=496f09f084b0f7e6f02f769a84490c6b"
+
+inherit xfce-panel-plugin
+
+SRC_URI[md5sum] = "72530bf59d7cd902326469e5a7a9892b"
+SRC_URI[sha256sum] = "c19ecf126201deb6148741c521124771ad396adc874471512ab5ffe1946567a1"
+
+DEPENDS += "libxklavier libwnck3 librsvg garcon"
+
+FILES_${PN} += "${datadir}/xfce4/xkb"
+
+RDEPENDS_${PN} = "xfce4-settings"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-support/vim/vim_%.bbappend b/import-layers/meta-openembedded/meta-xfce/recipes-support/vim/vim_%.bbappend
index 25403e6..7b44963 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-support/vim/vim_%.bbappend
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-support/vim/vim_%.bbappend
@@ -1,6 +1 @@
-do_install_append() {
-	# The mouse being autoenabled is just annoying in xfce4-terminal (mouse
-	# drag make vim go into visual mode and there is no right click menu),
-	# delete the block.
-	sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc
-}
+require ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${BPN}_xfce.inc', '', d)}
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-support/vim/vim_xfce.inc b/import-layers/meta-openembedded/meta-xfce/recipes-support/vim/vim_xfce.inc
new file mode 100644
index 0000000..25403e6
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-support/vim/vim_xfce.inc
@@ -0,0 +1,6 @@
+do_install_append() {
+	# The mouse being autoenabled is just annoying in xfce4-terminal (mouse
+	# drag make vim go into visual mode and there is no right click menu),
+	# delete the block.
+	sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc
+}
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/configure.patch b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/configure.patch
index ef27e42..89cc1f3 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/configure.patch
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/configure.patch
@@ -1,6 +1,20 @@
---- a/configure.ac	2007-12-02 10:37:06.000000000 -0200
-+++ b/configure.ac	2008-06-05 17:21:42.000000000 -0300
-@@ -127,22 +127,24 @@
+From 13a74582ffd7f81dbd66a7296fc76007718e9d4d Mon Sep 17 00:00:00 2001
+From: Andreas Mueller <schnitzeltony@gmx.de>
+Date: Mon, 1 Aug 2011 17:16:29 +0200
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+
+---
+ configure.ac | 34 ++++++++++++++++++----------------
+ 1 file changed, 18 insertions(+), 16 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0de5ceb..3f92d1b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -143,22 +143,24 @@ AC_FUNC_MMAP()
  dnl ***************************************
  dnl *** Check for strftime() extensions ***
  dnl ***************************************
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/exo-no-tests-0.8.patch b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/exo-no-tests-0.8.patch
index ac8bca5..348e147 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/exo-no-tests-0.8.patch
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/exo-no-tests-0.8.patch
@@ -1,22 +1,24 @@
-From 5f1e19860d89647488bdd32a02fb332f69434405 Mon Sep 17 00:00:00 2001
+From 9231a2d5b9c5406f33aef3ab4de2dbec9b08ed13 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
 Date: Fri, 18 May 2012 21:13:00 +0200
 Subject: [PATCH] Do not run tests at build time
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
-Upstream-Status: Not-Applicable
+
+Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+
 ---
- Makefile.am |    3 +--
- 1 files changed, 1 insertions(+), 2 deletions(-)
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 0ab3853..3e72391 100644
+index 226e79d..62ad18d 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -8,8 +8,7 @@ SUBDIRS =								\
+@@ -9,8 +9,7 @@ SUBDIRS =								\
  	docs								\
  	icons								\
  	pixmaps								\
@@ -24,8 +26,5 @@
 -	tests
 +	po
  
- AUTOMAKE_OPTIONS =							\
- 	1.9								\
--- 
-1.7.4.4
-
+ distclean-local:
+ 	rm -rf *.cache *~
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/reduce-build-to-exo-csource-only.patch b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/reduce-build-to-exo-csource-only.patch
index 99318d5..0764775 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/reduce-build-to-exo-csource-only.patch
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo/reduce-build-to-exo-csource-only.patch
@@ -10,9 +10,10 @@
 building xfce-packages from git instead of tarball this exo-csource-native is
 required.
 
-Upstream-Status: Inappropriate [configuration]
+Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+
 ---
  Makefile.am  | 10 +---------
  configure.ac | 22 ----------------------
@@ -40,7 +41,7 @@
  distclean-local:
  	rm -rf *.cache *~
 diff --git a/configure.ac b/configure.ac
-index ba5395d..2605067 100644
+index 3f92d1b..0d4cc38 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -116,15 +116,6 @@ AC_PROG_CC()
@@ -65,9 +66,9 @@
  XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.42.0])
 -XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.42.0])
 -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.24.0])
--XDT_CHECK_PACKAGE([GTK3], [gtk+-3.0], [3.20.0])
+-XDT_CHECK_PACKAGE([GTK3], [gtk+-3.0], [3.22.0])
 -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.42.0])
--XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0])
+-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.12.0])
 -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.12.0])
 -XDT_CHECK_PACKAGE([LIBXFCE4UI2], [libxfce4ui-2], [4.12.0])
 -XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.42.0], [gio-unix], [GIO-Unix features])
@@ -80,5 +81,5 @@
  dnl *************************
  dnl *** Check for gtk-doc ***
 -- 
-2.9.4
+2.14.3
 
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo_0.11.5.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo_0.11.5.bb
deleted file mode 100644
index d5508c0..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo_0.11.5.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-DESCRIPTION="Application library for the Xfce desktop environment"
-SECTION = "x11"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "gtk+ libxfce4util libxfce4ui virtual/libx11 liburi-perl-native cairo"
-DEPENDS_class-native = "glib-2.0-native xfce4-dev-tools-native intltool-native"
-
-inherit xfce pythonnative perlnative gtk-doc distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-REQUIRED_DISTRO_FEATURES_class-native = ""
-
-# SRC_URI must follow inherited one
-SRC_URI += " \
-    file://exo-no-tests-0.8.patch \
-    file://configure.patch \
-"
-
-SRC_URI_append_class-native = " \
-    file://reduce-build-to-exo-csource-only.patch \
-"
-
-SRC_URI[md5sum] = "2e560edfa8ddf77e21c4787a6f600171"
-SRC_URI[sha256sum] = "8e8629f33783eba1ce6d092a42c28217458a0cc3d1ad7474097b9187054955c1"
-
-PACKAGES =+ "exo-csource"
-
-# Note: python bindings did not work in oe-dev and are about to be moved to
-# pyxfce see http://comments.gmane.org/gmane.comp.desktop.xfce.devel.version4/19560
-FILES_${PN} += "${datadir}/xfce4/ \
-                ${libdir}/xfce4/exo-1 \
-"
-
-FILES_${PN}-dbg += "${libdir}/gio/modules/.debug \
-"
-
-FILES_exo-csource += "${bindir}/exo-csource"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo_0.12.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo_0.12.0.bb
new file mode 100644
index 0000000..d256b57
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/exo/exo_0.12.0.bb
@@ -0,0 +1,39 @@
+DESCRIPTION="Application library for the Xfce desktop environment"
+SECTION = "x11"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "gtk+ libxfce4util libxfce4ui virtual/libx11 liburi-perl-native cairo"
+DEPENDS_class-native = "glib-2.0-native xfce4-dev-tools-native intltool-native"
+
+inherit xfce pythonnative perlnative gtk-doc distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+
+# SRC_URI must follow inherited one
+SRC_URI += " \
+    file://exo-no-tests-0.8.patch \
+    file://configure.patch \
+"
+
+SRC_URI_append_class-native = " \
+    file://reduce-build-to-exo-csource-only.patch \
+"
+
+SRC_URI[md5sum] = "724afcca224f5fb22b510926d2740e52"
+SRC_URI[sha256sum] = "64b88271a37d0ec7dca062c7bc61ca323116f7855092ac39698c421a2f30a18f"
+
+PACKAGES =+ "exo-csource"
+
+# Note: python bindings did not work in oe-dev and are about to be moved to
+# pyxfce see http://comments.gmane.org/gmane.comp.desktop.xfce.devel.version4/19560
+FILES_${PN} += "${datadir}/xfce4/ \
+                ${libdir}/xfce4/exo-1 \
+"
+
+FILES_${PN}-dbg += "${libdir}/gio/modules/.debug \
+"
+
+FILES_exo-csource += "${bindir}/exo-csource"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine/glib-2.54-ftbfs.patch b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine/glib-2.54-ftbfs.patch
new file mode 100644
index 0000000..fb89102
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine/glib-2.54-ftbfs.patch
@@ -0,0 +1,23 @@
+Description: Fix FTBFS with glib 2.54
+ glib-mkenums now expects input files to be UTF-8,
+ fix the encoding of libgnomeui/gnome-scores.h
+Author: Adrian Bunk <bunk@debian.org>
+
+ported from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870738
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: gtk-xfce-engine-3.2.0/gtk-3.0/xfce_style_types.h
+===================================================================
+--- gtk-xfce-engine-3.2.0.orig/gtk-3.0/xfce_style_types.h
++++ gtk-xfce-engine-3.2.0/gtk-3.0/xfce_style_types.h
+@@ -19,7 +19,7 @@
+  *
+  *  Portions based Thinice port by 
+  *                       Tim Gerla <timg@rrv.net>,
+- *                       Tomas Ögren <stric@ing.umu.se,
++ *                       Tomas Ögren <stric@ing.umu.se>,
+  *                       Richard Hult <rhult@codefactory.se>
+  *  Portions based on Smooth theme by
+  *                       Andrew Johnson <ajgenius@ajgenius.us>
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_3.2.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_3.2.0.bb
index ae7f99f..ef4f4bf 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_3.2.0.bb
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_3.2.0.bb
@@ -8,6 +8,8 @@
 
 REQUIRED_DISTRO_FEATURES = "x11"
 
+SRC_URI += "file://glib-2.54-ftbfs.patch"
+
 SRC_URI[md5sum] = "363d6c16a48a00e26d45c45c2e1fd739"
 SRC_URI[sha256sum] = "875c9c3bda96faf050a2224649cc42129ffb662c4de33add8c0fd1fb860b47ed"
 
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/libxfce4ui/files/0001-libxfce4kbd-private-xfce4-keyboard-shortcuts.xml-fix.patch b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/libxfce4ui/files/0001-libxfce4kbd-private-xfce4-keyboard-shortcuts.xml-fix.patch
index b8c9178..6d107b1 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/libxfce4ui/files/0001-libxfce4kbd-private-xfce4-keyboard-shortcuts.xml-fix.patch
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/libxfce4ui/files/0001-libxfce4kbd-private-xfce4-keyboard-shortcuts.xml-fix.patch
@@ -9,6 +9,7 @@
 
 Upstream-Status: Pending
 Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+
 ---
  libxfce4kbd-private/xfce4-keyboard-shortcuts.xml |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
@@ -17,8 +18,8 @@
 index 723a10d..e6502f3 100644
 --- a/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
 +++ b/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
-@@ -66,4 +66,8 @@
-       <property name="&lt;Control&gt;F12" type="string" value="workspace_12_key"/>
+@@ -75,4 +75,8 @@
+       <property name="&lt;Primary&gt;F12" type="string" value="workspace_12_key"/>
      </property>
    </property>
 +  <property name="providers" type="array">
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb
index cc231b4..b73c9ee 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb
@@ -5,7 +5,9 @@
 
 PR = "r10"
 
-inherit packagegroup
+inherit packagegroup distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 # mandatory
 RDEPENDS_${PN} = " \
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/thunar/thunar_1.6.12.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/thunar/thunar_1.6.12.bb
deleted file mode 100644
index 8f1b23e..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/thunar/thunar_1.6.12.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "File manager for the Xfce Desktop Environment"
-SECTION = "x11"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "exo glib-2.0 gtk+ gdk-pixbuf libxfce4util libxfce4ui xfconf libsm dbus-glib startup-notification libnotify xfce4-panel udev"
-
-inherit xfce distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI = "http://archive.xfce.org/src/xfce/${BPN}/${@'${PV}'[0:3]}/Thunar-${PV}.tar.bz2"
-SRC_URI[md5sum] = "1bdf3c4a57ff886c512341f24b5e0e88"
-SRC_URI[sha256sum] = "fb22091f07ec6de2c9d9d89c61289d2bc3436b36c8c53ccbc9c32ca8a99f2086"
-
-S = "${WORKDIR}/Thunar-${PV}/"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre"
-
-FILES_${PN} += " \
-    ${libdir}/thunarx-2/* \
-    ${libdir}/xfce4/panel/plugins/* \
-    ${libdir}/Thunar/[Tt]hunar* \
-    ${datadir}/appdata \
-    ${datadir}/dbus-1 \
-    ${datadir}/polkit-1 \
-    ${datadir}/Thunar \
-    ${datadir}/xfce4/panel/plugins/* \
-"
-
-FILES_${PN}-dbg += "${libdir}/thunarx-2/.debug/ \
-                    ${libdir}/xfce4/panel/plugins/.debug/ \
-                    ${libdir}/Thunar/.debug/"
-
-RRECOMMENDS_${PN} = "gvfs gvfsd-trash"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/thunar/thunar_1.6.15.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/thunar/thunar_1.6.15.bb
new file mode 100644
index 0000000..170e250
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/thunar/thunar_1.6.15.bb
@@ -0,0 +1,35 @@
+SUMMARY = "File manager for the Xfce Desktop Environment"
+SECTION = "x11"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+DEPENDS = "exo glib-2.0 gtk+ gdk-pixbuf libxfce4util libxfce4ui xfconf libsm dbus-glib startup-notification libnotify xfce4-panel udev"
+
+inherit xfce distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "http://archive.xfce.org/src/xfce/${BPN}/${@'${PV}'[0:3]}/Thunar-${PV}.tar.bz2"
+SRC_URI[md5sum] = "8fea2af69c3acbb273fd1a177d3d8e47"
+SRC_URI[sha256sum] = "e81291a8519f495e0a059ff1f2d29608bc6d37c0be83b1f38f3c9aa25f8d252d"
+
+S = "${WORKDIR}/Thunar-${PV}/"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre"
+
+FILES_${PN} += " \
+    ${libdir}/thunarx-2/* \
+    ${libdir}/xfce4/panel/plugins/* \
+    ${libdir}/Thunar/[Tt]hunar* \
+    ${datadir}/appdata \
+    ${datadir}/dbus-1 \
+    ${datadir}/polkit-1 \
+    ${datadir}/Thunar \
+    ${datadir}/xfce4/panel/plugins/* \
+"
+
+FILES_${PN}-dbg += "${libdir}/thunarx-2/.debug/ \
+                    ${libdir}/xfce4/panel/plugins/.debug/ \
+                    ${libdir}/Thunar/.debug/"
+
+RRECOMMENDS_${PN} = "gvfs gvfsd-trash"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/tumbler/tumbler_0.1.31.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/tumbler/tumbler_0.1.31.bb
deleted file mode 100644
index 1f5419a..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/tumbler/tumbler_0.1.31.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-DESCRIPTION="Thumbnail service implementing the thumbnail management D-Bus specification"
-SECTION = "x11/libs"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "dbus-glib dbus-glib-native freetype gdk-pixbuf poppler curl xfce4-dev-tools-native libxml2 libgsf"
-
-inherit xfce gtk-doc
-
-SRC_URI[md5sum] = "0067054e6f1f90a13f90faadfca1e89e"
-SRC_URI[sha256sum] = "d0fd329273ff6ac98885eade4c3d8c87a4dd0816f713646130808bfa90b87173"
-SRC_URI += "file://0001-configure-use-pkg-config-for-freetype2.patch"
-
-INSANE_SKIP_${PN} = "dev-so"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gstreamer-thumbnailer] = "--enable-gstreamer-thumbnailer,--disable-gstreamer-thumbnailer,gstreamer1.0 gstreamer1.0-plugins-base"
-
-FILES_${PN} += "${datadir}/dbus-1/services \
-                ${libdir}/tumbler-1/tumblerd \
-                ${libdir}/tumbler-1/plugins/*.so \
-                ${libdir}/tumbler-1/plugins/cache/*.so \
-"
-
-FILES_${PN}-dev += "${libdir}/tumbler-1/plugins/*.la \
-                    ${libdir}/tumbler-1/plugins/cache/*.la"
-FILES_${PN}-dbg += "${libdir}/tumbler-1/.debug \
-                    ${libdir}/tumbler-1/plugins/.debug \
-                    ${libdir}/tumbler-1/plugins/cache/.debug \
-"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/tumbler/tumbler_0.2.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/tumbler/tumbler_0.2.0.bb
new file mode 100644
index 0000000..7e0c555
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/tumbler/tumbler_0.2.0.bb
@@ -0,0 +1,35 @@
+DESCRIPTION="Thumbnail service implementing the thumbnail management D-Bus specification"
+SECTION = "x11/libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "dbus-glib dbus-glib-native freetype gdk-pixbuf poppler curl xfce4-dev-tools-native libxml2 libgsf"
+
+inherit xfce gtk-doc
+
+SRC_URI[md5sum] = "dd5f9bae6a2470eb5fff0dc9edd3ea09"
+SRC_URI[sha256sum] = "4e27a59694b0a5cc69ebccbdb00c724e670b5b7c30bc4dc0b461aac93f234fac"
+SRC_URI += "file://0001-configure-use-pkg-config-for-freetype2.patch"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gstreamer-thumbnailer] = "--enable-gstreamer-thumbnailer,--disable-gstreamer-thumbnailer,gstreamer1.0 gstreamer1.0-plugins-base"
+
+do_install_append() {
+    # Makefile seems to race on creation of symlink. So ensure creation here
+    # until fixed properly
+    ln -sf tumbler-xdg-cache.so ${D}${libdir}/tumbler-1/plugins/cache/tumbler-cache-plugin.so
+}
+
+FILES_${PN} += "${datadir}/dbus-1/services \
+                ${libdir}/tumbler-1/tumblerd \
+                ${libdir}/tumbler-1/plugins/*.so \
+                ${libdir}/tumbler-1/plugins/cache/*.so \
+"
+
+FILES_${PN}-dev += "${libdir}/tumbler-1/plugins/*.la \
+                    ${libdir}/tumbler-1/plugins/cache/*.la"
+FILES_${PN}-dbg += "${libdir}/tumbler-1/.debug \
+                    ${libdir}/tumbler-1/plugins/.debug \
+                    ${libdir}/tumbler-1/plugins/cache/.debug \
+"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-appfinder/xfce4-appfinder_4.12.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-appfinder/xfce4-appfinder_4.12.0.bb
deleted file mode 100644
index 175a827..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-appfinder/xfce4-appfinder_4.12.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-DESCRIPTION="Xfce4 Application Finder"
-SECTION = "x11"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS="glib-2.0 gtk+ libxfce4util libxfce4ui garcon dbus-glib xfconf"
-
-inherit xfce distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[md5sum] = "0b238b30686388c507c119b12664f1a1"
-SRC_URI[sha256sum] = "2ad4a58019a76a6b64a816050db25f96854917c2f2e89d6a9df6c18e6c84c567"
-
-FILES_${PN} += "${datadir}/appdata"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-appfinder/xfce4-appfinder_4.13.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-appfinder/xfce4-appfinder_4.13.0.bb
new file mode 100644
index 0000000..7e73911
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-appfinder/xfce4-appfinder_4.13.0.bb
@@ -0,0 +1,14 @@
+DESCRIPTION="Xfce4 Application Finder"
+SECTION = "x11"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+DEPENDS="glib-2.0 gtk+3 libxfce4util libxfce4ui garcon dbus-glib xfconf"
+
+inherit xfce distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[md5sum] = "6b6cf080c891f7945953f8084a901552"
+SRC_URI[sha256sum] = "c0eb3b29eba3cfa9175ed35174e83a21faa2a2423ddb79501fe8846cc430e3ae"
+
+FILES_${PN} += "${datadir}/appdata"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.12.1.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.12.1.bb
deleted file mode 100644
index 80332ce..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.12.1.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Xfce4 Panel"
-SECTION = "x11"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=26a8bd75d8f8498bdbbe64a27791d4ee"
-DEPENDS = "libxfce4util garcon libxfce4ui xfconf exo gtk+ gtk+3 dbus cairo virtual/libx11 libxml2 libwnck"
-
-inherit xfce gtk-doc distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[md5sum] = "0b943f2e72a3693dddb1af559826cb62"
-SRC_URI[sha256sum] = "93d58b80cca9c9eb58adb281bc75404df7cf6cae89f7f98bb9f38690009aa2e8"
-SRC_URI += " \
-    file://0001-clock-time-make-change-of-system-s-timezone-change-t.patch \
-    file://0002-windowmenu-do-not-display-desktop-icon-when-no-windo.patch \
-"
-
-EXTRA_OECONF += "--enable-gtk3"
-
-python populate_packages_prepend() {
-    plugin_dir = d.expand('${libdir}/xfce4/panel/plugins/')
-    plugin_name = d.expand('${PN}-plugin-%s')
-    do_split_packages(d, plugin_dir, '^lib(.*).so$', plugin_name,
-                      '${PN} plugin for %s', extra_depends='', prepend=True,
-                      aux_files_pattern=['${datadir}/xfce4/panel/plugins/%s.desktop',
-                                         '${sysconfdir}/xdg/xfce/panel/%s-*',
-                                         '${datadir}/icons/hicolor/48x48/apps/*-%s.png',
-                                         '${bindir}/*%s*'])
-}
-
-PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
-
-PACKAGES =+ "${PN}-gtk3"
-
-FILES_${PN} += "${libdir}/xfce4/panel/migrate \
-                ${libdir}/xfce4/panel/wrapper-1.0"
-
-FILES_${PN}-gtk3 = " \
-    ${libdir}/libxfce4panel-2.0${SOLIBS} \
-    ${libdir}/xfce4/panel/wrapper-2.0 \
-"
-FILES_${PN}-dbg += "${libdir}/xfce4/panel/plugins/.debug \
-"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.12.2.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.12.2.bb
new file mode 100644
index 0000000..9cc9a4b
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.12.2.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Xfce4 Panel"
+SECTION = "x11"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=26a8bd75d8f8498bdbbe64a27791d4ee"
+DEPENDS = "libxfce4util garcon libxfce4ui xfconf exo gtk+ gtk+3 dbus cairo virtual/libx11 libxml2 libwnck"
+
+inherit xfce gtk-doc distro_features_check gtk-icon-cache
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[md5sum] = "803c9aabc2925dc97f96de125c52ba2e"
+SRC_URI[sha256sum] = "42058abb81b8f87691d3999627447de71c3285bcf055f308aab5cefab2de0ce9"
+SRC_URI += " \
+    file://0001-clock-time-make-change-of-system-s-timezone-change-t.patch \
+    file://0002-windowmenu-do-not-display-desktop-icon-when-no-windo.patch \
+"
+
+EXTRA_OECONF += "--enable-gtk3"
+
+python populate_packages_prepend() {
+    plugin_dir = d.expand('${libdir}/xfce4/panel/plugins/')
+    plugin_name = d.expand('${PN}-plugin-%s')
+    do_split_packages(d, plugin_dir, '^lib(.*).so$', plugin_name,
+                      '${PN} plugin for %s', extra_depends='', prepend=True,
+                      aux_files_pattern=['${datadir}/xfce4/panel/plugins/%s.desktop',
+                                         '${sysconfdir}/xdg/xfce/panel/%s-*',
+                                         '${datadir}/icons/hicolor/48x48/apps/*-%s.png',
+                                         '${bindir}/*%s*'])
+}
+
+PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
+
+PACKAGES =+ "${PN}-gtk3"
+
+FILES_${PN} += "${libdir}/xfce4/panel/migrate \
+                ${libdir}/xfce4/panel/wrapper-1.0"
+
+FILES_${PN}-gtk3 = " \
+    ${libdir}/libxfce4panel-2.0${SOLIBS} \
+    ${libdir}/xfce4/panel/wrapper-2.0 \
+"
+FILES_${PN}-dbg += " \
+    ${libdir}/xfce4/panel/plugins/.debug \
+"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_1.6.0.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_1.6.0.bb
deleted file mode 100644
index 08d00df..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_1.6.0.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Power manager for the Xfce desktop environment"
-HOMEPAGE = "http://goodies.xfce.org/projects/applications/xfce4-power-manager"
-SECTION = "x11"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-inherit xfce distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS += "gtk+3 glib-2.0 dbus-glib xfconf libxfce4ui libxfce4util libnotify \
-           libxrandr virtual/libx11 libxext xfce4-panel upower libxscrnsaver"
-
-SRC_URI[md5sum] = "2e2e24a1a22912d6a561ba6155887503"
-SRC_URI[sha256sum] = "bde3157e06ab31ff23648d163d53ee5095f7819544a9f48d3a96d57829857f2b"
-
-EXTRA_OECONF = " \
-    --enable-network-manager \
-    --enable-panel-plugins \
-"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-PACKAGECONFIG[systemd] = "--enable-polkit, --disable-polkit, polkit"
-
-PACKAGES += "xfce4-powermanager-plugin"
-
-FILES_${PN} += " \
-    ${datadir}/polkit-1 \
-    ${datadir}/appdata \
-"
-
-FILES_xfce4-powermanager-plugin = " \
-    ${libdir}/xfce4 \
-    ${datadir}/xfce4 \
-"
-
-RDEPENDS_xfce4-powermanager-plugin = "${PN}"
-RDEPENDS_${PN} = "networkmanager ${@bb.utils.contains('DISTRO_FEATURES','systemd','','consolekit',d)}"
-
-# xfce4-brightness-plugin was replaced by xfce4-powermanager-plugin
-RPROVIDES_xfce4-powermanager-plugin += "xfce4-brightness-plugin"
-RREPLACES_xfce4-powermanager-plugin += "xfce4-brightness-plugin"
-RCONFLICTS_xfce4-powermanager-plugin += "xfce4-brightness-plugin"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_1.6.1.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_1.6.1.bb
new file mode 100644
index 0000000..ed117b0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-power-manager/xfce4-power-manager_1.6.1.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Power manager for the Xfce desktop environment"
+HOMEPAGE = "http://goodies.xfce.org/projects/applications/xfce4-power-manager"
+SECTION = "x11"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+inherit xfce distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS += "gtk+3 glib-2.0 dbus-glib xfconf libxfce4ui libxfce4util libnotify \
+           libxrandr virtual/libx11 libxext xfce4-panel upower libxscrnsaver"
+
+SRC_URI[md5sum] = "17f0e6464ad6b3bc6a657f595bf91430"
+SRC_URI[sha256sum] = "1ea825452343b895566068018b6d5078608f8f46ce8075ba6bbb4b848f48656b"
+
+EXTRA_OECONF = " \
+    --enable-network-manager \
+    --enable-panel-plugins \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "--enable-polkit, --disable-polkit, polkit"
+
+PACKAGES += "xfce4-powermanager-plugin"
+
+FILES_${PN} += " \
+    ${datadir}/polkit-1 \
+    ${datadir}/appdata \
+"
+
+FILES_xfce4-powermanager-plugin = " \
+    ${libdir}/xfce4 \
+    ${datadir}/xfce4 \
+"
+
+RDEPENDS_xfce4-powermanager-plugin = "${PN}"
+RDEPENDS_${PN} = "networkmanager ${@bb.utils.contains('DISTRO_FEATURES','systemd','','consolekit',d)}"
+
+# xfce4-brightness-plugin was replaced by xfce4-powermanager-plugin
+RPROVIDES_xfce4-powermanager-plugin += "xfce4-brightness-plugin"
+RREPLACES_xfce4-powermanager-plugin += "xfce4-brightness-plugin"
+RCONFLICTS_xfce4-powermanager-plugin += "xfce4-brightness-plugin"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_git.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_git.bb
index 771da2c..bf9bd31 100644
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_git.bb
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings_git.bb
@@ -13,12 +13,12 @@
 # + minor bugfixes - sent mainline but no response
 # + option to hide mousepointer for a specific (touch) input device - sent mainline but no response
 SRC_URI = " \
-    git://github.com/schnitzeltony/xfce4-settings.git;protocol=git;branch=for-oe-4.12.0-1 \
+    git://github.com/schnitzeltony/xfce4-settings.git;protocol=git;branch=for-oe-4.12.3 \
     file://0001-xsettings.xml-Set-default-themes.patch \
 "
-SRCREV = "c6683cb2cff489c16c2c7b5eab4017bb461f07f1"
+SRCREV = "b701ac8b66b83c17469dd5009da51eeb59eba442"
 S = "${WORKDIR}/git"
-PV = "4.12.0+git${SRCPV}"
+PV = "4.12.3+git${SRCPV}"
 
 EXTRA_OECONF += "--enable-maintainer-mode --disable-debug"
 
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.3.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.3.bb
deleted file mode 100644
index daecf82..0000000
--- a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.3.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Xfce4 Desktop Manager"
-SECTION = "x11/base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-DEPENDS = "glib-2.0 gtk+ libxfce4util libxfce4ui libwnck xfconf dbus-glib dbus-glib-native thunar garcon exo"
-
-inherit xfce distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[md5sum] = "cb34f4f333d7d122f1688d2f155202c8"
-SRC_URI[sha256sum] = "a8a8d93744d842ca6ac1f9bd2c8789ee178937bca7e170e5239cbdbef30520ac"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[notify] = "--enable-notifications,--disable-notifications,libnotify"
-
-FILES_${PN} += "${datadir}/backgrounds"
diff --git a/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.4.bb b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.4.bb
new file mode 100644
index 0000000..d9cbe71
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Xfce4 Desktop Manager"
+SECTION = "x11/base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+DEPENDS = "glib-2.0 gtk+ libxfce4util libxfce4ui libwnck xfconf dbus-glib dbus-glib-native thunar garcon exo"
+
+inherit xfce distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[md5sum] = "7571889368be72df185ce2d470f37198"
+SRC_URI[sha256sum] = "098a35510562907e1431d5adbfa8307484a235c1dec6a43e2d58d2ac4241f1cb"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[notify] = "--enable-notifications,--disable-notifications,libnotify"
+
+FILES_${PN} += "${datadir}/backgrounds"
diff --git a/import-layers/meta-raspberrypi/README.md b/import-layers/meta-raspberrypi/README.md
index fe1c2f3..b49405b 100644
--- a/import-layers/meta-raspberrypi/README.md
+++ b/import-layers/meta-raspberrypi/README.md
@@ -10,10 +10,11 @@
 ## Quick links
 
 * Git repository web frontend:
-  <http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/>
+  <https://github.com/agherzan/meta-raspberrypi>
 * Mailing list (yocto mailing list): <yocto@yoctoproject.org>
 * Issues management (Github Issues):
   <https://github.com/agherzan/meta-raspberrypi/issues>
+* Documentation: <http://meta-raspberrypi.readthedocs.io/en/latest/>
 
 ## Description
 
@@ -33,12 +34,12 @@
 This layer depends on:
 
 * URI: git://git.yoctoproject.org/poky
-  * branch: rocko
+  * branch: master
   * revision: HEAD
 
 * URI: git://git.openembedded.org/meta-openembedded
   * layers: meta-oe, meta-multimedia, meta-networking, meta-python
-  * branch: rocko
+  * branch: master
   * revision: HEAD
 
 ## Quick Start
@@ -46,7 +47,7 @@
 1. source poky/oe-init-build-env rpi-build
 2. Add this layer to bblayers.conf and the dependencies above
 3. Set MACHINE in local.conf to one of the supported boards
-4. bitbake rpi-hwup-image
+4. bitbake core-image-base
 5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
 6. Boot your RPI.
 
diff --git a/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass b/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass
index 2dd9326..f03595c 100644
--- a/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass
+++ b/import-layers/meta-raspberrypi/classes/sdcard_image-rpi.bbclass
@@ -1,7 +1,7 @@
 inherit image_types
 
 #
-# Create an image that can by written onto a SD card using dd.
+# Create an image that can be written onto a SD card using dd.
 #
 # The disk layout used is:
 #
@@ -58,6 +58,8 @@
 			${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
 			"
 
+do_image_rpi_sdimg[recrdeps] = "do_build"
+
 # SD card image name
 SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg"
 
diff --git a/import-layers/meta-raspberrypi/conf/layer.conf b/import-layers/meta-raspberrypi/conf/layer.conf
index bbdce14..cfc2234 100644
--- a/import-layers/meta-raspberrypi/conf/layer.conf
+++ b/import-layers/meta-raspberrypi/conf/layer.conf
@@ -9,6 +9,8 @@
 BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
 BBFILE_PRIORITY_raspberrypi = "9"
 
+LAYERSERIES_COMPAT_raspberrypi = "sumo"
+
 # Additional license directories.
 LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
 
diff --git a/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc
index 688227c..d76495a 100644
--- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc
+++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc
@@ -6,6 +6,7 @@
 include conf/machine/include/soc-family.inc
 
 IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
+WKS_FILE ?= "sdimage-raspberrypi.wks"
 
 XSERVER = " \
     xserver-xorg \
@@ -19,9 +20,11 @@
     bcm2708-rpi-b-plus.dtb \
     bcm2709-rpi-2-b.dtb \
     bcm2710-rpi-3-b.dtb \
+    bcm2710-rpi-3-b-plus.dtb \
     bcm2708-rpi-cm.dtb \
     bcm2710-rpi-cm3.dtb \
     \
+    overlays/dwc2.dtbo \
     overlays/hifiberry-amp.dtbo \
     overlays/hifiberry-dac.dtbo \
     overlays/hifiberry-dacplus.dtbo \
@@ -51,14 +54,16 @@
 #   within u-boot to load the kernel.
 KERNEL_BOOTCMD ??= "bootm"
 KERNEL_IMAGETYPE_UBOOT ??= "uImage"
-KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', '${KERNEL_IMAGETYPE_UBOOT}', 'Image', d)}"
+KERNEL_IMAGETYPE_DIRECT ??= "zImage"
+KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', \
+        '${KERNEL_IMAGETYPE_UBOOT}', '${KERNEL_IMAGETYPE_DIRECT}', d)}"
 
 MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
 
 # Raspberry Pi has no hardware clock
 MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
 
-MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
+MACHINE_EXTRA_RRECOMMENDS += " kernel-modules udev-rules-rpi"
 
 # Set Raspberrypi splash image
 SPLASH = "psplash-raspberrypi"
@@ -102,6 +107,8 @@
     ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
     "
 
+do_image_wic[recrdeps] = "do_build"
+
 # The kernel image is installed into the FAT32 boot partition and does not need
 # to also be installed into the rootfs.
-RDEPENDS_kernel-base = ""
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
diff --git a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
index faa6b41..a5fe6d7 100644
--- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
+++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
@@ -1,3 +1,3 @@
 # RaspberryPi BSP default versions
 
-PREFERRED_VERSION_linux-raspberrypi ??= "4.9.%"
+PREFERRED_VERSION_linux-raspberrypi ??= "4.14.%"
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf
index adb2238..accdf3c 100644
--- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf
@@ -6,10 +6,12 @@
 require conf/machine/include/tune-arm1176jzf-s.inc
 include conf/machine/include/rpi-base.inc
 
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
+MACHINE_EXTRA_RRECOMMENDS += "\
+    linux-firmware-bcm43430 \
+    linux-firmware-bcm43430a1-hcd \
+"
 
 SDIMG_KERNELIMAGE ?= "kernel.img"
-KERNEL_DEFCONFIG ?= "bcmrpi_defconfig"
-UBOOT_MACHINE ?= "rpi_config"
+UBOOT_MACHINE ?= "rpi_0_w_defconfig"
 SERIAL_CONSOLE ?= "115200 ttyS0"
 VC4_CMA_SIZE ?= "cma-128"
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf
index ebc9f38..5163320 100644
--- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3-64.conf
@@ -4,13 +4,19 @@
 
 MACHINEOVERRIDES = "raspberrypi3:${MACHINE}"
 
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
+MACHINE_EXTRA_RRECOMMENDS += "\
+    linux-firmware-bcm43430 \
+    linux-firmware-bcm43455 \
+    linux-firmware-bcm43430a1-hcd \
+    linux-firmware-bcm4345c0-hcd \
+"
 
 require conf/machine/include/arm/arch-armv8.inc
 include conf/machine/include/rpi-base.inc
 
 KERNEL_DEVICETREE = " \
     broadcom/bcm2710-rpi-3-b.dtb \
+    broadcom/bcm2710-rpi-3-b-plus.dtb \
     broadcom/bcm2837-rpi-3-b.dtb \
     \
     overlays/hifiberry-amp.dtbo \
@@ -43,4 +49,6 @@
 # When u-boot is enabled we need to use the "Image" format and the "booti"
 # command to load the kernel
 KERNEL_IMAGETYPE_UBOOT ?= "Image"
+# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet
+KERNEL_IMAGETYPE_DIRECT ?= "Image"
 KERNEL_BOOTCMD ?= "booti"
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf
index b511bec..8b5cce5 100644
--- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf
@@ -6,10 +6,14 @@
 require conf/machine/include/tune-cortexa7.inc
 include conf/machine/include/rpi-base.inc
 
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
+MACHINE_EXTRA_RRECOMMENDS += "\
+    linux-firmware-bcm43430 \
+    linux-firmware-bcm43455 \
+    linux-firmware-bcm43430a1-hcd \
+    linux-firmware-bcm4345c0-hcd \
+"
 
 SDIMG_KERNELIMAGE ?= "kernel7.img"
-KERNEL_DEFCONFIG ?= "bcm2709_defconfig"
 UBOOT_MACHINE = "rpi_3_32b_config"
 SERIAL_CONSOLE ?= "115200 ttyS0"
 VC4_CMA_SIZE ?= "cma-256"
diff --git a/import-layers/meta-raspberrypi/docs/conf.py b/import-layers/meta-raspberrypi/docs/conf.py
index eb98c49..fcebbf1 100644
--- a/import-layers/meta-raspberrypi/docs/conf.py
+++ b/import-layers/meta-raspberrypi/docs/conf.py
@@ -58,9 +58,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = 'rocko'
+version = 'master'
 # The full version, including alpha/beta/rc tags.
-release = 'rocko'
+release = 'master'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -120,7 +120,7 @@
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
 #
-html_theme = 'alabaster'
+# html_theme = 'alabaster'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
diff --git a/import-layers/meta-raspberrypi/docs/extra-build-config.md b/import-layers/meta-raspberrypi/docs/extra-build-config.md
index 380d969..806c238 100644
--- a/import-layers/meta-raspberrypi/docs/extra-build-config.md
+++ b/import-layers/meta-raspberrypi/docs/extra-build-config.md
@@ -32,6 +32,8 @@
 * `GPU_MEM_1024`: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by
   the 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set.
 
+See: <https://www.raspberrypi.org/documentation/configuration/config-txt/memory.md>
+
 ## Add purchased license codecs
 
 To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in
@@ -44,6 +46,7 @@
 
     KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
 
+See: <https://www.raspberrypi.org/documentation/configuration/config-txt/codeclicence.md>
 
 ## Disable overscan
 
@@ -53,18 +56,57 @@
 
     DISABLE_OVERSCAN = "1"
 
+## Disable splash screen
+
+By default a rainbow splash screen is shown after the GPU firmware is loaded.
+To disable this set this variable in local.conf:
+
+    DISABLE_SPLASH = "1"
+
+## Boot delay
+
+The Raspberry Pi waits a number of seconds after loading the GPU firmware and
+before loading the kernel. By default it is one second. This is useful if your
+SD card needs a while to get ready before Linux is able to boot from it.
+To remove (or adjust) this delay set these variables in local.conf:
+
+    BOOT_DELAY = "0"
+    BOOT_DELAY_MS = "0"
+
 ## Set overclocking options
 
-The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
+The Raspberry Pi can be overclocked. As of now overclocking up to the "Turbo
 Mode" is officially supported by the raspbery and does not void warranty. Check
-the config.txt for a detailed description of options and modes. Example turbo
-mode:
+the config.txt for a detailed description of options and modes. The following
+variables are supported in local.conf: `ARM_FREQ`, `GPU_FREQ`, `CORE_FREQ`,
+`SDRAM_FREQ` and `OVER_VOLTAGE`.
+
+Example official settings for Turbo Mode in Raspberry Pi 2:
 
     ARM_FREQ = "1000"
     CORE_FREQ = "500"
     SDRAM_FREQ = "500"
     OVER_VOLTAGE = "6"
 
+See: <https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md>
+
+## HDMI and composite video options
+
+The Raspberry Pi can output video over HDMI or SDTV composite (the RCA connector).
+By default the video mode for these is autodetected on boot: the HDMI mode is
+selected according to the connected monitor's EDID information and the composite
+mode is defaulted to NTSC using a 4:3 aspect ratio. Check the config.txt for a
+detailed description of options and modes. The following variables are supported in
+local.conf: `HDMI_FORCE_HOTPLUG`, `HDMI_DRIVE`, `HDMI_GROUP`, `HDMI_MODE`,
+`CONFIG_HDMI_BOOST`, `SDTV_MODE`, `SDTV_ASPECT` and `DISPLAY_ROTATE`.
+
+Example to force HDMI output to 720p in CEA mode:
+
+    HDMI_GROUP = "1"
+    HDMI_MODE = "4"
+
+See: <https://www.raspberrypi.org/documentation/configuration/config-txt/video.md>
+
 ## Video camera support with V4L2 drivers
 
 Set this variable to enable support for the video camera (Linux 3.12.4+
@@ -179,10 +221,34 @@
 operations - 60fps h264 decode, high quality deinterlace - which aren't
 performed on the ARM may be affected, and we wouldn't want to do that to users
 who don't want to use the serial port. Users who want serial console support on
-RaspberryPi3 will have to explicitely set in local.conf:
+RaspberryPi3 will have to explicitly set in local.conf:
 
     ENABLE_UART = "1"
 
 Ref.:
 * <https://github.com/raspberrypi/firmware/issues/553>
 * <https://github.com/RPi-Distro/repo/issues/22>
+
+## Enable USB Peripheral (Gadget) support
+
+The standard USB driver only supports host mode operations.  Users who
+want to use gadget modules like g_ether should set the following in
+local.conf:
+
+    ENABLE_DWC2_PERIPHERAL = "1"
+
+## Manual additions to config.txt
+
+The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to
+the `config.txt` file if there is not a specific option above for the
+configuration you need. To add multiple lines you must include `\n` separators.
+If double-quotes are needed in the lines you are adding you can use single
+quotes around the whole string.
+
+For example, to add a comment containing a double-quote and a configuration
+option:
+
+    RPI_EXTRA_CONFIG = ' \n \
+        # Raspberry Pi 7\" display/touch screen \n \
+        lcd_rotate=2 \n \
+        '
diff --git a/import-layers/meta-raspberrypi/docs/layer-contents.md b/import-layers/meta-raspberrypi/docs/layer-contents.md
index 29cfa35..f71d396 100644
--- a/import-layers/meta-raspberrypi/docs/layer-contents.md
+++ b/import-layers/meta-raspberrypi/docs/layer-contents.md
@@ -11,14 +11,24 @@
 * raspberrypi-cm (dummy alias for raspberrypi)
 * raspberrypi-cm3 (dummy alias for raspberrypi2)
 
+Note: The raspberrypi3 machines include support for Raspberry Pi 3B+.
+
 ## Images
 
-* rpi-hwup-image
-  * Hardware up image
-
-* rpi-basic-image
-  * Based on rpi-hwup-image with some added features (ex: splash)
-
 * rpi-test-image
-  * Image based on rpi-basic-image which includes most of the packages in this
+  * Image based on core-image-base which includes most of the packages in this
     layer and some media samples.
+
+For other uses it's recommended to base images on `core-image-minimal` or
+`core-image-base` as appropriate. The old image names (`rpi-hwup-image` and
+`rpi-basic-image`) are deprecated.
+
+## WiFi and Bluetooth Firmware
+
+Be aware that the WiFi and Bluetooth firmware for the supported boards
+is not available in the base version of `linux-firmware` from OE-Core
+(poky). The files are added from Raspbian repositories in this layer's
+bbappends to that recipe. All machines define
+`MACHINE_EXTRA_RRECOMMENDS` to include the required wireless firmware;
+raspberrypi3 supports 3, 3B, and 3B+ and so include multiple firmware
+packages.
diff --git a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb
index a115037..466f443 100644
--- a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb
+++ b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb
@@ -3,11 +3,13 @@
 
 LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1"
 
-inherit deploy
+inherit deploy nopackages
 
 include recipes-bsp/common/firmware.inc
 
-RDEPENDS_${PN} = "rpi-config"
+INHIBIT_DEFAULT_DEPS = "1"
+
+DEPENDS = "rpi-config"
 
 COMPATIBLE_MACHINE = "^rpi$"
 
@@ -32,7 +34,7 @@
     touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
 }
 
-addtask deploy before do_package after do_install
+addtask deploy before do_build after do_install
 do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
index ca4160b..e0b2b58 100644
--- a/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/import-layers/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -15,15 +15,18 @@
 
 PR = "r5"
 
+INHIBIT_DEFAULT_DEPS = "1"
+
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
 PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
 PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
 
 VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
-VC4DTBO_raspberrypi3-64 = "vc4-fkms-v3d"
+VC4DTBO_raspberrypi3-64 ?= "vc4-fkms-v3d"
 VC4DTBO ?= "vc4-kms-v3d"
-inherit deploy
+
+inherit deploy nopackages
 
 do_deploy() {
     install -d ${DEPLOYDIR}/bcm2835-bootfiles
@@ -31,25 +34,33 @@
     cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/
 
     if [ -n "${KEY_DECODE_MPG2}" ]; then
-        sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${KEY_DECODE_WVC1}" ]; then
-        sed -i '/#decode_WVC1/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${DISABLE_OVERSCAN}" ]; then
-        sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+    if [ -n "${DISABLE_SPLASH}" ]; then
+        sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+
+    # Set overclocking options
     if [ -n "${ARM_FREQ}" ]; then
-        sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${GPU_FREQ}" ]; then
+        sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${CORE_FREQ}" ]; then
-        sed -i '/#core_freq/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${SDRAM_FREQ}" ]; then
-        sed -i '/#sdram_freq/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${OVER_VOLTAGE}" ]; then
-        sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
 
     # GPU memory
@@ -57,13 +68,47 @@
         sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${GPU_MEM_256}" ]; then
-        sed -i '/#gpu_mem_256/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${GPU_MEM_512}" ]; then
-        sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
     if [ -n "${GPU_MEM_1024}" ]; then
-        sed -i '/#gpu_mem_1024/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+
+    # Set boot delay
+    if [ -n "${BOOT_DELAY}" ]; then
+        sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${BOOT_DELAY_MS}" ]; then
+        sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+
+    # Set HDMI and composite video options
+    if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then
+        sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${HDMI_DRIVE}" ]; then
+        sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${HDMI_GROUP}" ]; then
+        sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${HDMI_MODE}" ]; then
+        sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${CONFIG_HDMI_BOOST}" ]; then
+        sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${SDTV_MODE}" ]; then
+        sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${SDTV_ASPECT}" ]; then
+        sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    if [ -n "${DISPLAY_ROTATE}" ]; then
+        sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
 
     # Video camera support
@@ -84,6 +129,7 @@
         echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
 
+    # I2C support
     if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
         echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
@@ -95,12 +141,10 @@
         echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
-
     if [ "${PITFT28r}" = "1" ]; then
         echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
-
     if [ "${PITFT35r}" = "1" ]; then
         echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
@@ -127,6 +171,15 @@
         echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+
+    # DWC2 USB peripheral support
+    if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then
+        echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
+    
+    # Append extra config if the user has provided any
+    echo "${RPI_EXTRA_CONFIG}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
 }
 
 do_deploy_append_raspberrypi3-64() {
@@ -135,13 +188,9 @@
 
     echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
-
-    # Device Tree support
-    echo "# Load correct Device Tree for Aarch64" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
-    echo "device_tree=bcm2710-rpi-3-b.dtb" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
 }
 
-addtask deploy before do_package after do_install
+addtask deploy before do_build after do_install
 do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc b/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc
index 67078c1..d564a49 100644
--- a/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc
+++ b/import-layers/meta-raspberrypi/recipes-bsp/common/firmware.inc
@@ -1,9 +1,10 @@
-RPIFW_DATE ?= "20171029"
-RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/1.${RPIFW_DATE}.tar.gz"
-RPIFW_S ?= "${WORKDIR}/firmware-1.${RPIFW_DATE}"
+RPIFW_DATE ?= "20180417"
+SRCREV ?= "5db8e4e1c63178e200d6fbea23ed4a9bf4656658"
+RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz"
+RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}"
 
 SRC_URI = "${RPIFW_SRC_URI}"
-SRC_URI[md5sum] = "4d27c1888a7bab3097471906e7b4a319"
-SRC_URI[sha256sum] = "46ce28c8d87ef22bdcc57ac1836ca3f04d1ec6f46580ff5a30bf76b3c0822117"
-PV = "${RPIFW_DATE}"
+SRC_URI[md5sum] = "6bce52f22a7a005a9bcdb9912b132590"
+SRC_URI[sha256sum] = "84568c4e7f5b0deee4cd76e7c0b48315885f983d6131d8148ef8af8438328a36"
 
+PV = "${RPIFW_DATE}"
diff --git a/import-layers/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/import-layers/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
index 3457300..0106ac3 100644
--- a/import-layers/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
+++ b/import-layers/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
@@ -5,6 +5,8 @@
 
 DEPENDS = "u-boot-mkimage-native"
 
+INHIBIT_DEFAULT_DEPS = "1"
+
 SRC_URI = "file://boot.cmd.in"
 
 do_compile() {
@@ -14,7 +16,7 @@
     mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
 }
 
-inherit deploy
+inherit deploy nopackages
 
 do_deploy() {
     install -d ${DEPLOYDIR}
diff --git a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0002-rpi_0_w-Add-configs-consistent-with-RpI3.patch b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0002-rpi_0_w-Add-configs-consistent-with-RpI3.patch
new file mode 100644
index 0000000..e98fd85
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0002-rpi_0_w-Add-configs-consistent-with-RpI3.patch
@@ -0,0 +1,41 @@
+From 5d113dc0130ea2ea9faaa000fba9c737266b9747 Mon Sep 17 00:00:00 2001
+From: Drew Moseley <drew.moseley@northern.tech>
+Date: Fri, 9 Feb 2018 18:10:09 -0500
+Subject: [PATCH] rpi_0_w: Add configs consistent with RpI3
+
+Upstream-Status: Accepted [https://patchwork.ozlabs.org/patch/856572/]
+
+Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
+---
+ configs/rpi_0_w_defconfig | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
+index 9a6d24b..1248294 100644
+--- a/configs/rpi_0_w_defconfig
++++ b/configs/rpi_0_w_defconfig
+@@ -12,14 +12,21 @@ CONFIG_SYS_PROMPT="U-Boot> "
+ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_MMC=y
+ CONFIG_CMD_USB=y
++CONFIG_OF_EMBED=y
++CONFIG_ENV_FAT_INTERFACE="mmc"
++CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
++CONFIG_DM_KEYBOARD=y
+ CONFIG_DM_MMC=y
+ CONFIG_MMC_SDHCI=y
+ CONFIG_MMC_SDHCI_BCM2835=y
+ CONFIG_DM_ETH=y
+ CONFIG_USB=y
+ CONFIG_DM_USB=y
++CONFIG_USB_DWC2=y
+ CONFIG_USB_STORAGE=y
+ CONFIG_USB_KEYBOARD=y
++CONFIG_USB_HOST_ETHER=y
++CONFIG_USB_ETHER_SMSC95XX=y
+ CONFIG_DM_VIDEO=y
+ CONFIG_SYS_WHITE_ON_BLACK=y
+ CONFIG_CONSOLE_SCROLL_LINES=10
+-- 
+2.7.4
+
diff --git a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
index 3781666..7d4a49e 100644
--- a/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -1 +1,7 @@
-RDEPENDS_${PN}_append_rpi = " rpi-u-boot-scr"
+FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:"
+
+SRC_URI_append_rpi = " \
+    file://0002-rpi_0_w-Add-configs-consistent-with-RpI3.patch \
+"
+
+DEPENDS_append_rpi = " rpi-u-boot-scr"
diff --git a/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/BCM43430A1.hcd b/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/BCM43430A1.hcd
deleted file mode 100644
index 162275a..0000000
--- a/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/BCM43430A1.hcd
+++ /dev/null
Binary files differ
diff --git a/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/brcm43438.service b/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/brcm43438.service
index d57125c..a51f6bc 100644
--- a/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/brcm43438.service
+++ b/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5/brcm43438.service
@@ -2,11 +2,13 @@
 Description=Broadcom BCM43438 bluetooth HCI
 ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
 Before=bluetooth.service
-After=dev-ttyAMA0.device
+BindsTo=dev-serial1.device
+After=dev-serial1.device
 
 [Service]
-Type=simple
-ExecStart=/usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow -
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/btuart
 
 [Install]
 WantedBy=multi-user.target
diff --git a/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend b/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend
index 03efd5c..d1b84df 100644
--- a/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -1,7 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
 BCM_BT_SOURCES =  " \
-    file://BCM43430A1.hcd \
     file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
     file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
     file://0003-Increase-firmware-load-timeout-to-30s.patch \
@@ -9,21 +8,19 @@
     file://brcm43438.service \
     "
 
-enable_bcm_bluetooth() {
-    install -d ${D}/lib/firmware/brcm/
-    install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
+BCM_BT_SERVICE = "brcm43438.service"
 
+enable_bcm_bluetooth() {
     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
         install -d ${D}${systemd_unitdir}/system
-        install -m 0644 ${WORKDIR}/brcm43438.service ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/${BCM_BT_SERVICE} ${D}${systemd_unitdir}/system
     fi
 }
 
-BCM_BT_FIRMWARE =  " \
-    /lib/firmware/brcm/BCM43430A1.hcd \
-    "
-
-BCM_BT_SERVICE =  " brcm43438.service"
+BCM_BT_RDEPENDS = "\
+    udev-rules-rpi \
+    pi-bluetooth \
+"
 
 # for raspberrypi3
 SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
@@ -32,10 +29,10 @@
     enable_bcm_bluetooth
 }
 
-FILES_${PN}_append_raspberrypi3 = " ${BCM_BT_FIRMWARE}"
-
 SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
 
+RDEPENDS_${PN}_append_raspberrypi3 = " ${BCM_BT_RDEPENDS}"
+
 # for raspberrypi0-wifi
 SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}"
 
@@ -43,6 +40,6 @@
     enable_bcm_bluetooth
 }
 
-FILES_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_FIRMWARE}"
-
 SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_SERVICE}"
+
+RDEPENDS_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_RDEPENDS}"
diff --git a/import-layers/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth.bb b/import-layers/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth.bb
new file mode 100644
index 0000000..e185f25
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi"
+HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth"
+SECTION = "kernel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "\
+    file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \
+"
+
+SRC_URI = "git://github.com/RPi-Distro/pi-bluetooth"
+SRCREV = "2a7477966bb3c69838b224f3ea92cb49a88124d5"
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/usr/bin/btuart ${D}${bindir}
+}
+
+FILES_${PN} = "${bindir}"
diff --git a/import-layers/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb b/import-layers/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb
index 623a5a7..77a3d7b 100644
--- a/import-layers/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb
+++ b/import-layers/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb
@@ -1,6 +1,15 @@
-# Base this image on rpi-hwup-image
-include rpi-hwup-image.bb
+# Base this image on core-image-minimal
+include recipes-core/images/core-image-minimal.bb
+
+# Include modules in rootfs
+IMAGE_INSTALL += " \
+	kernel-modules \
+	"
 
 SPLASH = "psplash-raspberrypi"
 
 IMAGE_FEATURES += "ssh-server-dropbear splash"
+
+do_image_prepend() {
+    bb.warn("The image 'rpi-basic-image' is deprecated, please use 'core-image-base' instead")
+}
diff --git a/import-layers/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb b/import-layers/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb
index 486ea59..d2371ad 100644
--- a/import-layers/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb
+++ b/import-layers/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb
@@ -5,3 +5,7 @@
 IMAGE_INSTALL += " \
 	kernel-modules \
 	"
+
+do_image_prepend() {
+    bb.warn("The image 'rpi-hwup-image' is deprecated, please use 'core-image-minimal' instead")
+}
diff --git a/import-layers/meta-raspberrypi/recipes-core/images/rpi-test-image.bb b/import-layers/meta-raspberrypi/recipes-core/images/rpi-test-image.bb
index c8dc436..c2f5f73 100644
--- a/import-layers/meta-raspberrypi/recipes-core/images/rpi-test-image.bb
+++ b/import-layers/meta-raspberrypi/recipes-core/images/rpi-test-image.bb
@@ -1,5 +1,5 @@
-# Base this image on rpi-basic-image
-include rpi-basic-image.bb
+# Base this image on core-image-base
+include recipes-core/images/core-image-base.bb
 
 COMPATIBLE_MACHINE = "^rpi$"
 
diff --git a/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb b/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
index 20443d3..b249d97 100644
--- a/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
+++ b/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
@@ -6,6 +6,8 @@
 
 S = "${WORKDIR}"
 
+INHIBIT_DEFAULT_DEPS = "1"
+
 do_install () {
     install -d ${D}${sysconfdir}/udev/rules.d
     install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
diff --git a/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules b/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules
new file mode 100644
index 0000000..3eff66d
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules
@@ -0,0 +1,10 @@
+##############################################################################################################
+
+# Partitions which desktops should not display
+#
+
+# boot partition
+ENV{ID_FS_TYPE}=="vfat", ENV{ID_FS_LABEL}=="raspberrypi", \
+  ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1"
+
+##############################################################################################################
diff --git a/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb b/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb
new file mode 100644
index 0000000..ae35521
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-core/udev/udev-rules-udisks-rpi_1.0.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "add udisk/udev rule to hide boot partition from udev"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+SRC_URI = "file://80-udisks-rpi.rules"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_install () {
+	install -d ${D}${base_libdir}/udev/rules.d
+	install -m 644 ${WORKDIR}/80-udisks-rpi.rules ${D}${base_libdir}/udev/rules.d
+}
+
+FILES_${PN} = "${base_libdir}/udev/rules.d"
diff --git a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc
deleted file mode 100644
index 3cb79cc..0000000
--- a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspberry Pi."
-HOMEPAGE = "https://github.com/sarfata/pi-blaster/"
-SECTION = "devel/libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://README.md;beginline=225;endline=252;md5=a012868ef5f83b9f257af253d7cb07a3"
-
-SRC_URI = "git://github.com/sarfata/pi-blaster \
-           file://remove-initscript-lsb-dependency.patch \
-"
-
-S = "${WORKDIR}/git"
-
-inherit update-rc.d autotools
-
-INITSCRIPT_PACKAGES = "${PN}"
-INITSCRIPT_NAME_${PN} = "${PN}.boot.sh"
-INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
-
-COMPATIBLE_MACHINE = "^rpi$"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb
index 730f9d3..2748459 100644
--- a/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb
+++ b/import-layers/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb
@@ -1,3 +1,23 @@
-require pi-blaster.inc
+DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspberry Pi."
+HOMEPAGE = "https://github.com/sarfata/pi-blaster/"
+SECTION = "devel/libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://README.md;beginline=225;endline=252;md5=a012868ef5f83b9f257af253d7cb07a3"
+
+SRC_URI = "git://github.com/sarfata/pi-blaster \
+           file://remove-initscript-lsb-dependency.patch \
+"
+
+S = "${WORKDIR}/git"
 
 SRCREV = "1035ad7dffb270c40eec1bb3a654171a755fba98"
+
+inherit update-rc.d autotools
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "${PN}.boot.sh"
+INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
+
+COMPATIBLE_MACHINE = "^rpi$"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend b/import-layers/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend
index e789022..52fe757 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend
@@ -1,3 +1,7 @@
-PACKAGECONFIG_append_rpi = " gallium"
+# DRI3 note:
+# With oe-core commit 8509e2e1a87578882b71948ccef3b50ccf1228b3 dri3 is set
+# as default. To state out clearly that Raspi needs dri3 and to avoid surprises
+# in case oe-core changes this default, we set dri3 explicitly.
+PACKAGECONFIG_append_rpi = " gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}"
 GALLIUMDRIVERS_rpi = "vc4"
 DRIDRIVERS_rpi = ""
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch
index 5861c4e..933f279 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch
@@ -1,7 +1,7 @@
-From e45bc677368d0f8d42720aad242f33f6e2687fb1 Mon Sep 17 00:00:00 2001
+From 0a64dc61d3d7db69389157ae757203b4b3afdbfa Mon Sep 17 00:00:00 2001
 From: Dom Cobley <dc4@broadcom.com>
 Date: Tue, 9 Jul 2013 09:26:26 -0400
-Subject: [PATCH 01/15] Allow applications to set next resource handle
+Subject: [PATCH 01/16] Allow applications to set next resource handle
 
 This patch adds provisions in userland to
 let apps callers set the next rendereing dispmanx resource.
@@ -204,5 +204,5 @@
  
  FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data))
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch
index d6e6476..4613504 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch
@@ -1,7 +1,7 @@
-From 15fb270f438f4ef1413192b5ce1e0dc784b45d9e Mon Sep 17 00:00:00 2001
+From 5608ec8002be8370e78c9dbb1e07cee4cfb18b58 Mon Sep 17 00:00:00 2001
 From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
 Date: Tue, 1 Oct 2013 13:19:20 +0200
-Subject: [PATCH 02/15] wayland: Add support for the Wayland winsys
+Subject: [PATCH 02/16] wayland: Add support for the Wayland winsys
 
 * Adds EGL_WL_bind_wayland_display extension
 * Adds wayland-egl library
@@ -57,20 +57,20 @@
  create mode 100644 interface/wayland/dispmanx.xml
  create mode 100644 makefiles/cmake/Wayland.cmake
 
-diff --git a/.gitignore b/.gitignore
-index 63570f1..1459436 100644
---- a/.gitignore
-+++ b/.gitignore
+Index: git/.gitignore
+===================================================================
+--- git.orig/.gitignore
++++ git/.gitignore
 @@ -30,3 +30,4 @@ build/
  *.pts
  *.ppm
  *.mkv
 +*~
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index cfc8ae5..673a5ad 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -24,6 +24,17 @@ include(makefiles/cmake/global_settings.cmake)
+Index: git/CMakeLists.txt
+===================================================================
+--- git.orig/CMakeLists.txt
++++ git/CMakeLists.txt
+@@ -24,6 +24,17 @@ include(makefiles/cmake/global_settings.
  include(makefiles/cmake/arm-linux.cmake)
  include(makefiles/cmake/vmcs.cmake)
  
@@ -88,22 +88,22 @@
  enable_language(ASM)
  
  # Global include paths
-diff --git a/README.md b/README.md
-index 358d2b4..4da4448 100644
---- a/README.md
-+++ b/README.md
-@@ -4,3 +4,7 @@ EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG.
- 
- Use buildme to build. It requires cmake to be installed and an arm cross compiler. It is set up to use this one:
+Index: git/README.md
+===================================================================
+--- git.orig/README.md
++++ git/README.md
+@@ -6,3 +6,7 @@ Use buildme to build. It requires cmake
  https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian
+ 
+ Note that this repository does not contain the source for the edid_parser and vcdbg binaries due to licensing restrictions.
 +
 +To build support for the Wayland winsys in EGL, execute the buildme script like this:
 +
 +$ BUILD_WAYLAND=1 ./buildme.
-diff --git a/buildme b/buildme
-index b8fd440..a780bb6 100755
---- a/buildme
-+++ b/buildme
+Index: git/buildme
+===================================================================
+--- git.orig/buildme
++++ git/buildme
 @@ -8,6 +8,10 @@ fi
  
  BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
@@ -130,11 +130,11 @@
  	make -j `nproc`
  
  	if [ "$1" != "" ]; then
-diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt
-index e6aa6b8..69059cb 100644
---- a/host_applications/linux/apps/raspicam/CMakeLists.txt
-+++ b/host_applications/linux/apps/raspicam/CMakeLists.txt
-@@ -28,7 +28,7 @@ add_executable(raspividyuv  ${COMMON_SOURCES} RaspiVidYUV.c)
+Index: git/host_applications/linux/apps/raspicam/CMakeLists.txt
+===================================================================
+--- git.orig/host_applications/linux/apps/raspicam/CMakeLists.txt
++++ git/host_applications/linux/apps/raspicam/CMakeLists.txt
+@@ -28,7 +28,7 @@ add_executable(raspividyuv  ${COMMON_SOU
  
  set (MMAL_LIBS mmal_core mmal_util mmal_vc_client)
  
@@ -143,10 +143,10 @@
  target_link_libraries(raspiyuv   ${MMAL_LIBS} vcos bcm_host)
  target_link_libraries(raspivid   ${MMAL_LIBS} vcos bcm_host)
  target_link_libraries(raspividyuv   ${MMAL_LIBS} vcos bcm_host)
-diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt
-index 9ad615b..3d3571a 100644
---- a/interface/khronos/CMakeLists.txt
-+++ b/interface/khronos/CMakeLists.txt
+Index: git/interface/khronos/CMakeLists.txt
+===================================================================
+--- git.orig/interface/khronos/CMakeLists.txt
++++ git/interface/khronos/CMakeLists.txt
 @@ -6,6 +6,12 @@
  # have quite a few circular dependencies, and so the only way
  # to make it work seems to be to have everything static.
@@ -160,7 +160,7 @@
  set(EGL_SOURCE
     egl/egl_client_config.c
     egl/egl_client_context.c
-@@ -55,12 +61,56 @@ set(CLIENT_SOURCE
+@@ -55,12 +61,55 @@ set(CLIENT_SOURCE
     common/khrn_int_hash_asm.s
     common/khrn_client_cache.c)
  
@@ -168,8 +168,7 @@
 +   khrn_client
 +   vchiq_arm
 +   vcos
-+   bcm_host
-+   -lm)
++   bcm_host)
 +
 +if (BUILD_WAYLAND)
 +   set(EGL_SOURCE
@@ -217,21 +216,30 @@
  # TODO do we need EGL_static and GLESv2_static now that khrn_static exists?
  add_library(EGL_static STATIC ${EGL_SOURCE})
  add_library(GLESv2_static STATIC ${GLES_SOURCE})
-@@ -72,8 +122,7 @@ include_directories (../../host_applications/linux/libs/sm )
+@@ -72,8 +121,7 @@ include_directories (../../host_applicat
  set(VCSM_LIBS vcsm)
  add_definitions(-DKHRONOS_HAVE_VCSM)
  endif()
 -
 -target_link_libraries(EGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm)
-+target_link_libraries(EGL ${EGL_LIBS} ${VCSM_LIBS})
++target_link_libraries(EGL ${EGL_LIBS} ${VCSM_LIBS} -lm)
  target_link_libraries(GLESv2 EGL khrn_client vcos)
  target_link_libraries(WFC EGL)
  target_link_libraries(OpenVG EGL)
-diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c
-index ef4babd..d7e798e 100644
---- a/interface/khronos/common/khrn_client.c
-+++ b/interface/khronos/common/khrn_client.c
-@@ -54,6 +54,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+@@ -87,7 +135,7 @@ add_library(brcmGLESv2 ${SHARED} ${GLES_
+ add_library(brcmOpenVG ${SHARED} ${VG_SOURCE})
+ add_library(brcmWFC ${SHARED} ${WFC_SOURCE})
+ 
+-target_link_libraries(brcmEGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm)
++target_link_libraries(brcmEGL ${EGL_LIBS} ${VCSM_LIBS} -lm)
+ target_link_libraries(brcmGLESv2 brcmEGL khrn_client vcos)
+ target_link_libraries(brcmWFC brcmEGL)
+ target_link_libraries(brcmOpenVG brcmEGL)
+Index: git/interface/khronos/common/khrn_client.c
+===================================================================
+--- git.orig/interface/khronos/common/khrn_client.c
++++ git/interface/khronos/common/khrn_client.c
+@@ -54,6 +54,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  #include "applications/vmcs/khronos/khronos_server.h"
  #endif
  
@@ -242,7 +250,7 @@
  VCOS_LOG_CAT_T khrn_client_log = VCOS_LOG_INIT("khrn_client", VCOS_LOG_WARN);
  
  /*
-@@ -142,6 +146,10 @@ void client_try_unload_server(CLIENT_PROCESS_STATE_T *process)
+@@ -142,6 +146,10 @@ void client_try_unload_server(CLIENT_PRO
  bool client_process_state_init(CLIENT_PROCESS_STATE_T *process)
  {
     if (!process->inited) {
@@ -253,7 +261,7 @@
        if (!khrn_pointer_map_init(&process->contexts, 64))
           return false;
  
-@@ -194,6 +202,13 @@ bool client_process_state_init(CLIENT_PROCESS_STATE_T *process)
+@@ -194,6 +202,13 @@ bool client_process_state_init(CLIENT_PR
        }
  #endif
  
@@ -267,10 +275,10 @@
        process->inited = true;
     }
  
-diff --git a/interface/khronos/common/khrn_client.h b/interface/khronos/common/khrn_client.h
-index 804039b..615f7b4 100644
---- a/interface/khronos/common/khrn_client.h
-+++ b/interface/khronos/common/khrn_client.h
+Index: git/interface/khronos/common/khrn_client.h
+===================================================================
+--- git.orig/interface/khronos/common/khrn_client.h
++++ git/interface/khronos/common/khrn_client.h
 @@ -310,6 +310,16 @@ struct CLIENT_PROCESS_STATE {
  #ifdef RPC_LIBRARY
     KHRONOS_SERVER_CONNECTION_T khrn_connection;
@@ -288,11 +296,11 @@
  };
  
  extern bool client_process_state_init(CLIENT_PROCESS_STATE_T *process);
-diff --git a/interface/khronos/common/khrn_client_mangle.h b/interface/khronos/common/khrn_client_mangle.h
-index b3c04f4..b7b21c5 100644
---- a/interface/khronos/common/khrn_client_mangle.h
-+++ b/interface/khronos/common/khrn_client_mangle.h
-@@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Index: git/interface/khronos/common/khrn_client_mangle.h
+===================================================================
+--- git.orig/interface/khronos/common/khrn_client_mangle.h
++++ git/interface/khronos/common/khrn_client_mangle.h
+@@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  #define eglReleaseGlobalImageBRCM mangled_eglReleaseGlobalImageBRCM
  #define eglInitGlobalImageBRCM mangled_eglInitGlobalImageBRCM
  #define eglTermGlobalImageBRCM mangled_eglTermGlobalImageBRCM
@@ -302,11 +310,11 @@
  
  /* OpenGL ES 1.1 and 2.0 functions */
  
-diff --git a/interface/khronos/common/khrn_client_platform.h b/interface/khronos/common/khrn_client_platform.h
-index 1c9da3a..715c67e 100644
---- a/interface/khronos/common/khrn_client_platform.h
-+++ b/interface/khronos/common/khrn_client_platform.h
-@@ -48,6 +48,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Index: git/interface/khronos/common/khrn_client_platform.h
+===================================================================
+--- git.orig/interface/khronos/common/khrn_client_platform.h
++++ git/interface/khronos/common/khrn_client_platform.h
+@@ -48,6 +48,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  #include "interface/khronos/common/vcos/khrn_client_platform_filler_vcos.h"
  #endif
  
@@ -326,11 +334,11 @@
 +#endif
 +
  #endif // KHRN_CLIENT_PLATFORM_H
-diff --git a/interface/khronos/common/khrn_client_unmangle.h b/interface/khronos/common/khrn_client_unmangle.h
-index 4f3ce49..84f6ec0 100644
---- a/interface/khronos/common/khrn_client_unmangle.h
-+++ b/interface/khronos/common/khrn_client_unmangle.h
-@@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Index: git/interface/khronos/common/khrn_client_unmangle.h
+===================================================================
+--- git.orig/interface/khronos/common/khrn_client_unmangle.h
++++ git/interface/khronos/common/khrn_client_unmangle.h
+@@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  #undef eglReleaseGlobalImageBRCM
  #undef eglInitGlobalImageBRCM
  #undef eglTermGlobalImageBRCM
@@ -340,11 +348,11 @@
  
  /* OpenGL ES 1.1 and 2.0 functions */
  
-diff --git a/interface/khronos/common/linux/khrn_client_platform_linux.c b/interface/khronos/common/linux/khrn_client_platform_linux.c
-index 710d20f..50d60a6 100644
---- a/interface/khronos/common/linux/khrn_client_platform_linux.c
-+++ b/interface/khronos/common/linux/khrn_client_platform_linux.c
-@@ -37,6 +37,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Index: git/interface/khronos/common/linux/khrn_client_platform_linux.c
+===================================================================
+--- git.orig/interface/khronos/common/linux/khrn_client_platform_linux.c
++++ git/interface/khronos/common/linux/khrn_client_platform_linux.c
+@@ -37,6 +37,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  #include "X11/Xlib.h"
  #endif
  
@@ -356,7 +364,7 @@
  extern VCOS_LOG_CAT_T khrn_client_log;
  
  extern void vc_vchi_khronos_init();
-@@ -464,13 +469,36 @@ EGLDisplay khrn_platform_set_display_id(EGLNativeDisplayType display_id)
+@@ -464,14 +469,37 @@ EGLDisplay khrn_platform_set_display_id(
  	   return EGL_NO_DISPLAY;
  }
  #else
@@ -384,18 +392,19 @@
 +#endif
 +         return EGL_NO_DISPLAY;
 +   }
- }
++}
 +
 +#ifdef BUILD_WAYLAND
 +struct wl_display *khrn_platform_get_wl_display()
 +{
 +   return hacky_display;
-+}
-+#endif
+ }
  #endif
++#endif
  
  #ifdef WANT_X
-@@ -805,22 +833,81 @@ static EGL_DISPMANX_WINDOW_T *check_default(EGLNativeWindowType win)
+ static void dump_hierarchy(Window w, Window thisw, Window look, int level)
+@@ -805,22 +833,81 @@ static EGL_DISPMANX_WINDOW_T *check_defa
  void platform_get_dimensions(EGLDisplay dpy, EGLNativeWindowType win,
        uint32_t *width, uint32_t *height, uint32_t *swapchain_count)
  {
@@ -426,8 +435,8 @@
 +#ifdef BUILD_WAYLAND
 +   }
 +#endif
- }
- 
++}
++
 +#ifdef BUILD_WAYLAND
 +static DISPMANX_ELEMENT_HANDLE_T create_dummy_element()
 +{
@@ -458,9 +467,9 @@
 +   vc_dispmanx_display_close(display);
 +
 +   return element;
-+}
+ }
 +#endif
-+
+ 
  uint32_t platform_get_handle(EGLDisplay dpy, EGLNativeWindowType win)
  {
 -   EGL_DISPMANX_WINDOW_T *dwin = check_default(win);
@@ -489,11 +498,10 @@
  }
  
  #endif
-diff --git a/interface/khronos/common/linux/khrn_wayland.c b/interface/khronos/common/linux/khrn_wayland.c
-new file mode 100644
-index 0000000..0e1b9e7
+Index: git/interface/khronos/common/linux/khrn_wayland.c
+===================================================================
 --- /dev/null
-+++ b/interface/khronos/common/linux/khrn_wayland.c
++++ git/interface/khronos/common/linux/khrn_wayland.c
 @@ -0,0 +1,215 @@
 +/*
 +Copyright (c) 2013, Raspberry Pi Foundation
@@ -710,74 +718,72 @@
 +
 +   return wl_dispmanx_client_buffer;
 +}
-diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/khronos/common/linux/khrn_wayland.h
-similarity index 56%
-copy from interface/vmcs_host/vc_vchi_dispmanx.h
-copy to interface/khronos/common/linux/khrn_wayland.h
-index b723b76..b9bf08c 100644
---- a/interface/vmcs_host/vc_vchi_dispmanx.h
-+++ b/interface/khronos/common/linux/khrn_wayland.h
-@@ -1,5 +1,5 @@
- /*
--Copyright (c) 2012, Broadcom Europe Ltd
+Index: git/interface/vmcs_host/vc_vchi_dispmanx.h
+===================================================================
+--- git.orig/interface/vmcs_host/vc_vchi_dispmanx.h
++++ git/interface/vmcs_host/vc_vchi_dispmanx.h
+@@ -66,4 +66,19 @@ typedef struct {
+ #define ELEMENT_CHANGE_MASK_RESOURCE  (1<<4)
+ #define ELEMENT_CHANGE_TRANSFORM      (1<<5)
+ 
++#ifdef BUILD_WAYLAND
++/* XXX: This should be in a private header that can be included from EGL and vc_* */
++#include <wayland-server.h>
++#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h"
++struct wl_dispmanx_server_buffer {
++	struct wl_resource *resource;
++	struct wl_dispmanx *dispmanx;
++	enum wl_dispmanx_format format;
++	DISPMANX_RESOURCE_HANDLE_T handle;
++	int32_t width;
++	int32_t height;
++	int in_use;
++};
++#endif
++
+ #endif
+Index: git/interface/khronos/common/linux/khrn_wayland.h
+===================================================================
+--- /dev/null
++++ git/interface/khronos/common/linux/khrn_wayland.h
+@@ -0,0 +1,33 @@
++/*
 +Copyright (c) 2013, Raspberry Pi Foundation
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
-@@ -25,45 +25,9 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- 
--#ifndef VC_VCHI_DISPMANX_H
--#define VC_VCHI_DISPMANX_H
++All rights reserved.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are met:
++    * Redistributions of source code must retain the above copyright
++      notice, this list of conditions and the following disclaimer.
++    * Redistributions in binary form must reproduce the above copyright
++      notice, this list of conditions and the following disclaimer in the
++      documentation and/or other materials provided with the distribution.
++    * Neither the name of the copyright holder nor the
++      names of its contributors may be used to endorse or promote products
++      derived from this software without specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++*/
++
 +#include "interface/khronos/common/khrn_client.h"
- 
--#include "interface/peer/vc_vchi_dispmanx_common.h"
++
 +int init_process_wayland(CLIENT_PROCESS_STATE_T *process);
 +int do_wl_roundtrip();
- 
--#define VC_NUM_HOST_RESOURCES 64
--#define DISPMANX_MSGFIFO_SIZE 1024
--#define DISPMANX_CLIENT_NAME MAKE_FOURCC("DISP")
--#define DISPMANX_NOTIFY_NAME MAKE_FOURCC("UPDH")
--
--//Or with command to indicate we don't need a response
--#define DISPMANX_NO_REPLY_MASK (1<<31)
--
--typedef struct {
--   char     description[32];
--   uint32_t width;
--   uint32_t height;
--   uint32_t aspect_pixwidth;
--   uint32_t aspect_pixheight;
--   uint32_t fieldrate_num;
--   uint32_t fieldrate_denom;
--   uint32_t fields_per_frame;
--   uint32_t transform;        
--} GET_MODES_DATA_T;
--
--typedef struct {
--   int32_t  response;
--   uint32_t width;
--   uint32_t height;
--   uint32_t transform;
--   uint32_t input_format;
--} GET_INFO_DATA_T;
--
--//Attributes changes flag mask
--#define ELEMENT_CHANGE_LAYER          (1<<0)
--#define ELEMENT_CHANGE_OPACITY        (1<<1)
--#define ELEMENT_CHANGE_DEST_RECT      (1<<2)
--#define ELEMENT_CHANGE_SRC_RECT       (1<<3)
--#define ELEMENT_CHANGE_MASK_RESOURCE  (1<<4)
--#define ELEMENT_CHANGE_TRANSFORM      (1<<5)
--
--#endif
++
 +struct wl_dispmanx_client_buffer *allocate_wl_buffer(struct wl_egl_window *window, KHRN_IMAGE_FORMAT_T color);
-diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
-index b8bb374..03fe67b 100644
---- a/interface/khronos/egl/egl_client.c
-+++ b/interface/khronos/egl/egl_client.c
+Index: git/interface/khronos/egl/egl_client.c
+===================================================================
+--- git.orig/interface/khronos/egl/egl_client.c
++++ git/interface/khronos/egl/egl_client.c
 @@ -153,6 +153,10 @@ by an attribute value"
  #include <stdlib.h>
  #include <string.h>
@@ -789,7 +795,7 @@
  
  #include "interface/khronos/egl/egl_client_cr.c"
  
-@@ -162,17 +166,6 @@ static void egl_current_release(CLIENT_PROCESS_STATE_T *process, EGL_CURRENT_T *
+@@ -162,17 +166,6 @@ static void egl_current_release(CLIENT_P
  void egl_gl_flush_callback(bool wait);
  void egl_vg_flush_callback(bool wait);
  
@@ -807,17 +813,17 @@
  /*
  TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate)
  Also affects global image (and possibly others?)
-@@ -450,6 +443,9 @@ EGLAPI const char EGLAPIENTRY * eglQueryString(EGLDisplay dpy, EGLint name)
- #ifdef EGL_KHR_fence_sync
+@@ -451,6 +444,9 @@ EGLAPI const char EGLAPIENTRY * eglQuery
              "EGL_KHR_fence_sync "
  #endif
-+#endif
+ #endif
 +#if EGL_WL_bind_wayland_display
 +            "EGL_WL_bind_wayland_display "
- #endif
++#endif
              ;
           break;
-@@ -655,8 +651,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c
+       case EGL_VENDOR:
+@@ -655,8 +651,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateW
                                  false,
                                  EGL_NO_TEXTURE,
                                  EGL_NO_TEXTURE,
@@ -827,7 +833,7 @@
  
                 if (surface) {
                    if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
-@@ -901,7 +896,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig
+@@ -901,7 +896,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateP
                               mipmap_texture,
                               texture_format,
                               texture_target,
@@ -836,7 +842,7 @@
  
              if (surface) {
                 if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
-@@ -1043,7 +1038,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c
+@@ -1043,7 +1038,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateP
                                     false,
                                     EGL_NO_TEXTURE,
                                     EGL_NO_TEXTURE,
@@ -845,7 +851,7 @@
  
                       if (surface) {
                          if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
-@@ -2245,6 +2240,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
+@@ -2245,6 +2240,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuf
     CLIENT_THREAD_STATE_T *thread;
     CLIENT_PROCESS_STATE_T *process;
     EGLBoolean result;
@@ -855,7 +861,7 @@
  
     vcos_log_trace("eglSwapBuffers start. dpy=%d. surf=%d.", (int)dpy, (int)surf);
  
-@@ -2315,18 +2313,58 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
+@@ -2315,18 +2313,58 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuf
  
                 vcos_log_trace("eglSwapBuffers server call");
  
@@ -926,11 +932,11 @@
                 RPC_CALL6(eglIntSwapBuffers_impl,
                       thread,
                       EGLINTSWAPBUFFERS_ID,
-diff --git a/interface/khronos/egl/egl_client_get_proc.c b/interface/khronos/egl/egl_client_get_proc.c
-index 4cfa9ff..6a715af 100644
---- a/interface/khronos/egl/egl_client_get_proc.c
-+++ b/interface/khronos/egl/egl_client_get_proc.c
-@@ -254,6 +254,17 @@ EGLAPI void EGLAPIENTRY (* eglGetProcAddress(const char *procname))(void)
+Index: git/interface/khronos/egl/egl_client_get_proc.c
+===================================================================
+--- git.orig/interface/khronos/egl/egl_client_get_proc.c
++++ git/interface/khronos/egl/egl_client_get_proc.c
+@@ -254,6 +254,17 @@ EGLAPI void EGLAPIENTRY (* eglGetProcAdd
        return (void(*)(void))eglQueryGlobalImageBRCM;
  #endif
  
@@ -948,11 +954,11 @@
     return (void(*)(void)) NULL;
  }
  
-diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
-index 128325e..42350bf 100644
---- a/interface/khronos/egl/egl_client_surface.c
-+++ b/interface/khronos/egl/egl_client_surface.c
-@@ -46,6 +46,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Index: git/interface/khronos/egl/egl_client_surface.c
+===================================================================
+--- git.orig/interface/khronos/egl/egl_client_surface.c
++++ git/interface/khronos/egl/egl_client_surface.c
+@@ -46,6 +46,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  #include "interface/khronos/egl/egl_int_impl.h"
  #endif
  
@@ -1026,7 +1032,7 @@
           RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl,
                               thread,
                               EGLINTCREATESURFACE_ID,
-@@ -663,6 +685,18 @@ void egl_surface_free(EGL_SURFACE_T *surface)
+@@ -663,6 +685,18 @@ void egl_surface_free(EGL_SURFACE_T *sur
     if( surface->type == WINDOW ) {
        vcos_log_trace("egl_surface_free: calling platform_destroy_winhandle...");
        platform_destroy_winhandle( surface->win, surface->internal_handle );
@@ -1045,10 +1051,10 @@
     }
     /* return value ignored -- read performed to ensure blocking. we want this to
      * block so clients can safely destroy the surface's window as soon as the
-diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h
-index b5bf70a..e328b77 100644
---- a/interface/khronos/egl/egl_client_surface.h
-+++ b/interface/khronos/egl/egl_client_surface.h
+Index: git/interface/khronos/egl/egl_client_surface.h
+===================================================================
+--- git.orig/interface/khronos/egl/egl_client_surface.h
++++ git/interface/khronos/egl/egl_client_surface.h
 @@ -288,6 +288,41 @@ typedef struct {
        type == PIXMAP
     */
@@ -1091,7 +1097,7 @@
  } EGL_SURFACE_T;
  
  extern bool egl_surface_check_attribs(
-@@ -322,8 +357,7 @@ extern EGL_SURFACE_T *egl_surface_create(
+@@ -322,8 +357,7 @@ extern EGL_SURFACE_T *egl_surface_create
     EGLenum texture_format,
     EGLenum texture_target,
     EGLNativePixmapType pixmap,
@@ -1101,10 +1107,10 @@
  extern EGL_SURFACE_T *egl_surface_from_vg_image(
     VGImage vg_handle,
     EGLSurface name,
-diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h
-index 51b3580..6863a3b 100644
---- a/interface/khronos/egl/egl_int_impl.h
-+++ b/interface/khronos/egl/egl_int_impl.h
+Index: git/interface/khronos/egl/egl_int_impl.h
+===================================================================
+--- git.orig/interface/khronos/egl/egl_int_impl.h
++++ git/interface/khronos/egl/egl_int_impl.h
 @@ -57,7 +57,7 @@ FN(int, eglIntCreateSurface_impl, (
     uint32_t sem,
     uint32_t type,
@@ -1114,11 +1120,10 @@
  
  FN(int, eglIntCreatePbufferFromVGImage_impl, (
     VGImage vg_handle,
-diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c
-new file mode 100644
-index 0000000..5730743
+Index: git/interface/khronos/ext/egl_wayland.c
+===================================================================
 --- /dev/null
-+++ b/interface/khronos/ext/egl_wayland.c
++++ git/interface/khronos/ext/egl_wayland.c
 @@ -0,0 +1,246 @@
 +/*
 +Copyright (c) 2013, Raspberry Pi Foundation
@@ -1366,11 +1371,11 @@
 +
 +   return EGL_FALSE;
 +}
-diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
-index 89a3369..d7e5ba7 100755
---- a/interface/khronos/include/EGL/eglext.h
-+++ b/interface/khronos/include/EGL/eglext.h
-@@ -191,6 +191,29 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
+Index: git/interface/khronos/include/EGL/eglext.h
+===================================================================
+--- git.orig/interface/khronos/include/EGL/eglext.h
++++ git/interface/khronos/include/EGL/eglext.h
+@@ -191,6 +191,29 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLG
  #endif
  
  
@@ -1400,11 +1405,10 @@
  #ifdef __cplusplus
  }
  #endif
-diff --git a/interface/khronos/wayland-egl/wayland-egl-priv.h b/interface/khronos/wayland-egl/wayland-egl-priv.h
-new file mode 100644
-index 0000000..8e38d36
+Index: git/interface/khronos/wayland-egl/wayland-egl-priv.h
+===================================================================
 --- /dev/null
-+++ b/interface/khronos/wayland-egl/wayland-egl-priv.h
++++ git/interface/khronos/wayland-egl/wayland-egl-priv.h
 @@ -0,0 +1,53 @@
 +/* Copied from Mesa */
 +
@@ -1459,11 +1463,10 @@
 +#endif
 +
 +#endif
-diff --git a/interface/khronos/wayland-egl/wayland-egl.c b/interface/khronos/wayland-egl/wayland-egl.c
-new file mode 100644
-index 0000000..b8f050b
+Index: git/interface/khronos/wayland-egl/wayland-egl.c
+===================================================================
 --- /dev/null
-+++ b/interface/khronos/wayland-egl/wayland-egl.c
++++ git/interface/khronos/wayland-egl/wayland-egl.c
 @@ -0,0 +1,59 @@
 +/* Copied from Mesa */
 +
@@ -1524,11 +1527,10 @@
 +	if (height)
 +		*height = egl_window->attached_height;
 +}
-diff --git a/interface/khronos/wayland-egl/wayland-egl.pc.in b/interface/khronos/wayland-egl/wayland-egl.pc.in
-new file mode 100644
-index 0000000..8bafc15
+Index: git/interface/khronos/wayland-egl/wayland-egl.pc.in
+===================================================================
 --- /dev/null
-+++ b/interface/khronos/wayland-egl/wayland-egl.pc.in
++++ git/interface/khronos/wayland-egl/wayland-egl.pc.in
 @@ -0,0 +1,10 @@
 +prefix=@CMAKE_INSTALL_PREFIX@
 +exec_prefix=${prefix}
@@ -1540,10 +1542,10 @@
 +Version: @PROJECT_APIVER@
 +Libs: -L${libdir} -lwayland-egl
 +Cflags: -I${includedir}
-diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
-index fde18da..6718215 100755
---- a/interface/vmcs_host/CMakeLists.txt
-+++ b/interface/vmcs_host/CMakeLists.txt
+Index: git/interface/vmcs_host/CMakeLists.txt
+===================================================================
+--- git.orig/interface/vmcs_host/CMakeLists.txt
++++ git/interface/vmcs_host/CMakeLists.txt
 @@ -9,13 +9,24 @@ add_definitions(-fno-strict-aliasing)
  
  include_directories(${VMCS_TARGET}/vcfiled)
@@ -1574,11 +1576,11 @@
  #add_library(bufman            vc_vchi_bufman.c            )
  
  # OpenMAX/IL component service
-diff --git a/interface/vmcs_host/vc_dispmanx.h b/interface/vmcs_host/vc_dispmanx.h
-index 37fdae1..fe3619a 100755
---- a/interface/vmcs_host/vc_dispmanx.h
-+++ b/interface/vmcs_host/vc_dispmanx.h
-@@ -39,6 +39,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Index: git/interface/vmcs_host/vc_dispmanx.h
+===================================================================
+--- git.orig/interface/vmcs_host/vc_dispmanx.h
++++ git/interface/vmcs_host/vc_dispmanx.h
+@@ -39,6 +39,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
  #ifdef __cplusplus
  extern "C" {
  #endif
@@ -1590,7 +1592,7 @@
  // Same function as above, to aid migration of code.
  VCHPRE_ int VCHPOST_ vc_dispman_init( void );
  // Stop the service from being used
-@@ -135,6 +140,11 @@ VCHPRE_ int VCHPOST_ vc_dispmanx_resource_set_palette( DISPMANX_RESOURCE_HANDLE_
+@@ -135,6 +140,11 @@ VCHPRE_ int VCHPOST_ vc_dispmanx_resourc
  // Start triggering callbacks synced to vsync
  VCHPRE_ int VCHPOST_ vc_dispmanx_vsync_callback( DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_CALLBACK_FUNC_T cb_func, void *cb_arg );
  
@@ -1602,11 +1604,11 @@
  #ifdef __cplusplus
  }
  #endif
-diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
-index 7a6cdcd..eab146e 100755
---- a/interface/vmcs_host/vc_vchi_dispmanx.c
-+++ b/interface/vmcs_host/vc_vchi_dispmanx.c
-@@ -1319,3 +1319,45 @@ static void *dispmanx_notify_func( void *arg ) {
+Index: git/interface/vmcs_host/vc_vchi_dispmanx.c
+===================================================================
+--- git.orig/interface/vmcs_host/vc_vchi_dispmanx.c
++++ git/interface/vmcs_host/vc_vchi_dispmanx.c
+@@ -1319,3 +1319,45 @@ static void *dispmanx_notify_func( void
     }
     return 0;
  }
@@ -1652,35 +1654,10 @@
 +	buffer->in_use = in_use;
 +}
 +#endif
-diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/vmcs_host/vc_vchi_dispmanx.h
-index b723b76..f0bae30 100644
---- a/interface/vmcs_host/vc_vchi_dispmanx.h
-+++ b/interface/vmcs_host/vc_vchi_dispmanx.h
-@@ -66,4 +66,19 @@ typedef struct {
- #define ELEMENT_CHANGE_MASK_RESOURCE  (1<<4)
- #define ELEMENT_CHANGE_TRANSFORM      (1<<5)
- 
-+#ifdef BUILD_WAYLAND
-+/* XXX: This should be in a private header that can be included from EGL and vc_* */
-+#include <wayland-server.h>
-+#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h"
-+struct wl_dispmanx_server_buffer {
-+	struct wl_resource *resource;
-+	struct wl_dispmanx *dispmanx;
-+	enum wl_dispmanx_format format;
-+	DISPMANX_RESOURCE_HANDLE_T handle;
-+	int32_t width;
-+	int32_t height;
-+	int in_use;
-+};
-+#endif
-+
- #endif
-diff --git a/interface/wayland/dispmanx.xml b/interface/wayland/dispmanx.xml
-new file mode 100644
-index 0000000..c18626d
+Index: git/interface/wayland/dispmanx.xml
+===================================================================
 --- /dev/null
-+++ b/interface/wayland/dispmanx.xml
++++ git/interface/wayland/dispmanx.xml
 @@ -0,0 +1,123 @@
 +<?xml version="1.0" encoding="UTF-8"?>
 +<protocol name="dispmanx">
@@ -1805,11 +1782,10 @@
 +  </interface>
 +
 +</protocol>
-diff --git a/makefiles/cmake/Wayland.cmake b/makefiles/cmake/Wayland.cmake
-new file mode 100644
-index 0000000..ad90d30
+Index: git/makefiles/cmake/Wayland.cmake
+===================================================================
 --- /dev/null
-+++ b/makefiles/cmake/Wayland.cmake
++++ git/makefiles/cmake/Wayland.cmake
 @@ -0,0 +1,72 @@
 +#=============================================================================
 +# Copyright (C) 2012-2013 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
@@ -1883,6 +1859,3 @@
 +    list(APPEND ${_sources} "${_server_header}")
 +    set(${_sources} ${${_sources}} PARENT_SCOPE)
 +endfunction()
--- 
-2.15.0
-
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch
index 1d78755..e3a0cf2 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch
Binary files differ
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch
index d60c432..713fc3e 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch
@@ -1,7 +1,7 @@
-From cae4ff834eef23c8f23126ba4d630db395f13aee Mon Sep 17 00:00:00 2001
+From f17879b691984b5c4950e4b94ebf102c78797ede Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 10 Aug 2015 02:38:27 -0700
-Subject: [PATCH 04/15] wayland-egl: Add bcm_host to dependencies
+Subject: [PATCH 04/16] wayland-egl: Add bcm_host to dependencies
 
 It uses headers like vcos_platform_types.h but does not
 depend on module which should add the required include paths
@@ -24,5 +24,5 @@
  Libs: -L${libdir} -lwayland-egl
  Cflags: -I${includedir}
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch
index 676f34c..8d78333 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch
@@ -1,7 +1,7 @@
-From 8ee4f6eedb81e9bfe0e603a21606c52f9501e609 Mon Sep 17 00:00:00 2001
+From 0273b7b9d7a27d8fe7d3ad8680b799f997e75dca Mon Sep 17 00:00:00 2001
 From: "Yann E. MORIN" <yann.morin.1998@free.fr>
 Date: Sat, 24 Jan 2015 22:07:19 +0100
-Subject: [PATCH 05/15] interface: remove faulty assert() to make weston happy
+Subject: [PATCH 05/16] interface: remove faulty assert() to make weston happy
  at runtime
 
 This was removed after a discussion on IRC with the weston guys
@@ -25,5 +25,5 @@
              }
           } else {
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch
index a8f1f24..43eb7f0 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch
@@ -1,7 +1,7 @@
-From 789b0b0c04b741c21dd573b78eded970721d14c2 Mon Sep 17 00:00:00 2001
+From 0d678cd2042551cc4e26ec42fa3aba7c72d033b4 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 6 Feb 2016 11:10:47 -0800
-Subject: [PATCH 06/15] zero-out wl buffers in egl_surface_free
+Subject: [PATCH 06/16] zero-out wl buffers in egl_surface_free
 
 origins from buildroot
 
@@ -29,5 +29,5 @@
  #endif
     }
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch
index ad2636a..987740b 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch
@@ -1,7 +1,7 @@
-From 762dd3156775f167ff0dfd44322dbb19a85822a7 Mon Sep 17 00:00:00 2001
+From ec2e00989bf614b259bc9a47b5035f8586e8a214 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 6 Feb 2016 11:11:41 -0800
-Subject: [PATCH 07/15] initialize front back wayland buffers
+Subject: [PATCH 07/16] initialize front back wayland buffers
 
 origins from metrological wayland support
 
@@ -30,5 +30,5 @@
     }
  #endif
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch
index 1e66813..4bf05c1 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch
@@ -1,7 +1,7 @@
-From f8929adbf95ad3d44491cf6fc8a84a686b71193e Mon Sep 17 00:00:00 2001
+From 59ba66c2ea17f7a57124b9fd6c9bdff4325ff5c9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 6 Feb 2016 11:09:18 -0800
-Subject: [PATCH 08/15] Remove RPC_FLUSH
+Subject: [PATCH 08/16] Remove RPC_FLUSH
 
 Origins from buildroot
 
@@ -23,5 +23,5 @@
        }
  #endif
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch
index 214d5e2..a2c1df5 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch
@@ -1,7 +1,7 @@
-From f53e028f33f261f85883c9168977dd5486e9b47c Mon Sep 17 00:00:00 2001
+From 264d82387ea1e607b2e5c899ff6bd46807c7b185 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 6 Feb 2016 13:12:47 -0800
-Subject: [PATCH 09/15] fix cmake dependency race
+Subject: [PATCH 09/16] fix cmake dependency race
 
 Fixes errors like
 
@@ -74,5 +74,5 @@
  	struct wl_resource *resource;
  	struct wl_dispmanx *dispmanx;
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch
index 9f77920..a6c9a59 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch
@@ -1,7 +1,7 @@
-From 6559a57c66c5f55571a1aa29cf14d9130a9ef2c9 Mon Sep 17 00:00:00 2001
+From 7c51c2d37bfadaabbbf205237d932b685b09d34f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 29 Mar 2016 20:38:30 -0700
-Subject: [PATCH 10/15] Fix for framerate with nested composition
+Subject: [PATCH 10/16] Fix for framerate with nested composition
 
 frame rate appears irregular and lower than expected when using nested composition.
 
@@ -56,5 +56,5 @@
  #ifdef ANDROID
                 CLIENT_UNLOCK();
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch
index 5ee5cbd..55a5be8 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch
@@ -1,7 +1,7 @@
-From 3e396f0b514f3acf90c02f5d55b3816028367a55 Mon Sep 17 00:00:00 2001
+From fb3002f77a175633af31019c513754d2ef5f3ac0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 2 Apr 2016 10:37:24 -0700
-Subject: [PATCH 11/15] build shared library for vchostif
+Subject: [PATCH 11/16] build shared library for vchostif
 
 Fixes #149
 
@@ -24,5 +24,5 @@
  #add_library(bufman            vc_vchi_bufman.c            )
  
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch
index 48af588..28a5fc6 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch
@@ -1,7 +1,7 @@
-From f5b2263c8d65e307cb085414e08118cbbe00a94c Mon Sep 17 00:00:00 2001
+From df8b9633a45069bdd1bf256d974636ef11aa39cb Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 2 Apr 2016 10:54:59 -0700
-Subject: [PATCH 12/15] implement buffer wrapping interface for dispmanx
+Subject: [PATCH 12/16] implement buffer wrapping interface for dispmanx
 
 Courtesy: Zan Dobersek
 
@@ -88,5 +88,5 @@
  
  </protocol>
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch
index d3a9840..ebff314 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch
@@ -1,7 +1,7 @@
-From 10ba55489002c2ccdf96d221301ec059c4574811 Mon Sep 17 00:00:00 2001
+From 2e0e331da8556fecd841349cfae294baf0f14485 Mon Sep 17 00:00:00 2001
 From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
 Date: Thu, 19 Jan 2017 18:56:07 +0000
-Subject: [PATCH 13/15] Implement triple buffering for wayland
+Subject: [PATCH 13/16] Implement triple buffering for wayland
 
 Change from double to triple buffering for wayland.
 This enables higher frame rates without tearing artifacts
@@ -86,5 +86,5 @@
        back_wl_buffer
  
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch
index b596056..025b6bc 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch
@@ -1,7 +1,7 @@
-From d750c738b5c23bba24531cb713292e4ab3f2ec56 Mon Sep 17 00:00:00 2001
+From 8d9299d219a2a4f76f8278973584e1a9f7116c78 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 10 May 2017 06:39:34 +0000
-Subject: [PATCH 14/15] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
+Subject: [PATCH 14/16] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
 
 weston code uses these defines
 Upstream-Status: Pending
@@ -26,5 +26,5 @@
  #ifndef GL_EXT_texture_type_2_10_10_10_REV
  #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch
index f10740b..605d0c0 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch
@@ -1,7 +1,7 @@
-From 827907f2223df93918e680101a1ac6228ba0f07e Mon Sep 17 00:00:00 2001
+From a2182e5437a6664cdb0f3330f6cbee873b6f975a Mon Sep 17 00:00:00 2001
 From: Andrea Galbusera <gizero@gmail.com>
 Date: Fri, 14 Jul 2017 09:52:54 +0200
-Subject: [PATCH 15/15] EGL/glplatform.h: define EGL_CAST
+Subject: [PATCH 15/16] EGL/glplatform.h: define EGL_CAST
 
 C++ / C typecast macros for special EGL handle values: used by libepoxy code
 The definition comes from the updated version of this header in mesa.
@@ -28,5 +28,5 @@
 +
  #endif /* __eglplatform_h */
 -- 
-2.15.0
+2.16.1
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch
new file mode 100644
index 0000000..d20ec82
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch
@@ -0,0 +1,145 @@
+From 6b4c4d469d435bfcfb464356b6ccc9421c6b8fd5 Mon Sep 17 00:00:00 2001
+From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
+Date: Sat, 27 Jan 2018 12:28:31 -0500
+Subject: [PATCH 16/16] Allow multiple wayland compositor state data per
+ process
+
+When eglBindWaylandDisplayWL is called store the wl_global
+created in a list associated with the wayland display.
+This allows multiple wayland compositor instances to be
+created and used per process. This scenario is common for
+applications integrating externl process UI elements
+via embedded composition e.g. westeros
+
+Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ interface/khronos/common/khrn_client.c |  2 +-
+ interface/khronos/common/khrn_client.h | 11 +++++++-
+ interface/khronos/ext/egl_wayland.c    | 50 ++++++++++++++++++++++++++++++----
+ 3 files changed, 55 insertions(+), 8 deletions(-)
+
+diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c
+index d7e798e..60bdb63 100644
+--- a/interface/khronos/common/khrn_client.c
++++ b/interface/khronos/common/khrn_client.c
+@@ -147,7 +147,7 @@ bool client_process_state_init(CLIENT_PROCESS_STATE_T *process)
+ {
+    if (!process->inited) {
+ #ifdef BUILD_WAYLAND
+-      process->wl_global = NULL;
++      process->wlStateMap = NULL;
+ #endif
+ 
+       if (!khrn_pointer_map_init(&process->contexts, 64))
+diff --git a/interface/khronos/common/khrn_client.h b/interface/khronos/common/khrn_client.h
+index 615f7b4..4fa86f7 100644
+--- a/interface/khronos/common/khrn_client.h
++++ b/interface/khronos/common/khrn_client.h
+@@ -170,6 +170,15 @@ static INLINE CLIENT_THREAD_STATE_T *CLIENT_GET_CHECK_THREAD_STATE(void)
+    return (CLIENT_THREAD_STATE_T *)platform_tls_get_check(client_tls);
+ }
+ 
++#ifdef BUILD_WAYLAND
++typedef struct WAYLAND_STATE
++{
++   struct WAYLAND_STATE *next;
++   struct wl_display *display;
++   struct wl_global *wl_global;
++} WAYLAND_STATE_T;
++#endif
++
+ /*
+    per-process state
+ 
+@@ -318,7 +327,7 @@ struct CLIENT_PROCESS_STATE {
+    struct wl_event_queue *wl_queue;
+ 
+    /* Compositor-side Wayland state */
+-   struct wl_global *wl_global;
++   WAYLAND_STATE_T *wlStateMap;
+ #endif
+ };
+ 
+diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c
+index 9ef89cd..abd5ab3 100644
+--- a/interface/khronos/ext/egl_wayland.c
++++ b/interface/khronos/ext/egl_wayland.c
+@@ -208,17 +208,38 @@ eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
+ {
+    CLIENT_THREAD_STATE_T *thread;
+    CLIENT_PROCESS_STATE_T *process;
++   WAYLAND_STATE_T *stateIter;
++   WAYLAND_STATE_T *stateNew;
++   struct wl_global *wl_global;
+ 
+    if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process))
+       return EGL_FALSE;
+ 
+-   if (process->wl_global != NULL)
++   stateIter= process->wlStateMap;
++   while( stateIter )
++   {
++      if ( stateIter->display == display )
++         goto error;
++      stateIter= stateIter->next;
++   }
++
++   wl_global = wl_global_create(display, &wl_dispmanx_interface, 1,
++                                NULL, bind_dispmanx);
++   if (wl_global == NULL)
+       goto error;
+ 
+-   process->wl_global = wl_global_create(display, &wl_dispmanx_interface, 1,
+-                                         NULL, bind_dispmanx);
+-   if (process->wl_global == NULL)
++   stateNew= (WAYLAND_STATE_T*)calloc( 1, sizeof(WAYLAND_STATE_T));
++   if (stateNew == NULL )
++   {
++      wl_global_destroy(wl_global);
+       goto error;
++   }
++
++   stateNew->next= process->wlStateMap;
++   stateNew->display= display;
++   stateNew->wl_global= wl_global;
++   process->wlStateMap= stateNew;
++   CLIENT_UNLOCK();
+ 
+    return EGL_TRUE;
+ 
+@@ -232,12 +253,29 @@ eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
+ {
+    CLIENT_THREAD_STATE_T *thread;
+    CLIENT_PROCESS_STATE_T *process;
++   WAYLAND_STATE_T *stateIter;
++   WAYLAND_STATE_T *statePrev;
+ 
+    if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process))
+       return EGL_FALSE;
+ 
+-   wl_global_destroy(process->wl_global);
+-   process->wl_global = NULL;
++   statePrev= NULL;
++   stateIter= process->wlStateMap;
++   while( stateIter )
++   {
++      if ( stateIter->display == display )
++      {
++         wl_global_destroy(stateIter->wl_global);
++         if ( statePrev )
++            statePrev->next= stateIter->next;
++         else
++            process->wlStateMap= stateIter->next;
++         free( stateIter );
++         break;
++      }
++      statePrev= stateIter;
++      stateIter= stateIter->next;
++   }
+ 
+    CLIENT_UNLOCK();
+ 
+-- 
+2.16.1
+
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb
index d38b02d..7f2dca6 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb
+++ b/import-layers/meta-raspberrypi/recipes-graphics/userland/userland_git.bb
@@ -5,8 +5,6 @@
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196"
 
-PR = "r5"
-
 PROVIDES = "virtual/libgles2 \
             virtual/egl"
 
@@ -16,7 +14,11 @@
 
 SRCBRANCH = "master"
 SRCFORK = "raspberrypi"
-SRCREV = "bc3c52a51315399a9f31ed24049eb4bc81fd1c60"
+SRCREV = "11389772c79685442e0ab8aa9be8ad0e32703f68"
+
+# Use the date of the above commit as the package version. Update this when
+# SRCREV is changed.
+PV = "20180219"
 
 SRC_URI = "\
     git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
@@ -35,6 +37,7 @@
     file://0013-Implement-triple-buffering-for-wayland.patch \
     file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \
     file://0015-EGL-glplatform.h-define-EGL_CAST.patch \
+    file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \
 "
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc b/import-layers/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc
index 668c5ce..cd0d57b 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc
+++ b/import-layers/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc
@@ -6,6 +6,8 @@
 PROVIDES = "virtual/libgles2 virtual/egl"
 COMPATIBLE_MACHINE = "^rpi$"
 
+INHIBIT_DEFAULT_DEPS = "1"
+
 include recipes-bsp/common/firmware.inc
 
 SRC_URI += " \
diff --git a/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
index 7902f20..919e95e 100644
--- a/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
@@ -3,20 +3,19 @@
 SRC_URI_append_rpi = " \
     file://xorg.conf.d/98-pitft.conf \
     file://xorg.conf.d/99-calibration.conf \
-"
-SRC_URI_append_libc-musl_raspberrypi3-64 = " \
     file://xorg.conf.d/10-noglamor.conf \
 "
 do_install_append_rpi () {
     PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+    VC4="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
     if [ "${PITFT}" = "1" ]; then
         install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
         install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
         install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
     fi
+    if [ "${VC4}" = "1" ]; then
+        install -Dm 0644 ${WORKDIR}/xorg.conf.d/10-noglamor.conf ${D}/${sysconfdir}/X11/xorg.conf.d/10-noglamor.conf
+    fi
 }
-do_install_append_libc-musl_raspberrypi3-64 () {
-    install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
-    install -m 0644 ${WORKDIR}/xorg.conf.d/10-noglamor.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
-}
+
 FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin
deleted file mode 100644
index 6b955da..0000000
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin
+++ /dev/null
Binary files differ
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt
deleted file mode 100644
index 3d917a7..0000000
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-# NVRAM file for BCM943430WLSELG
-# 2.4 GHz, 20 MHz BW mode
-
-# The following parameter values are just placeholders, need to be updated.
-manfid=0x2d0
-prodid=0x0726
-vendid=0x14e4
-devid=0x43e2
-boardtype=0x0726
-boardrev=0x1202
-boardnum=22
-macaddr=00:90:4c:c5:12:38
-sromrev=11
-boardflags=0x00404201
-boardflags3=0x08000000
-xtalfreq=37400
-#xtalfreq=19200
-nocrc=1
-ag0=255
-aa2g=1
-ccode=ALL
-
-pa0itssit=0x20
-extpagain2g=0
-
-#PA parameters for 2.4GHz, measured at CHIP OUTPUT
-pa2ga0=-168,7161,-820
-AvVmid_c0=0x0,0xc8
-cckpwroffset0=5
-
-# PPR params
-maxp2ga0=84
-txpwrbckof=6
-cckbw202gpo=0
-legofdmbw202gpo=0x66111111
-mcsbw202gpo=0x77711111
-propbw202gpo=0xdd
-
-# OFDM IIR :
-ofdmdigfilttype=18
-ofdmdigfilttypebe=18
-# PAPD mode:
-papdmode=1
-papdvalidtest=1
-pacalidx2g=32
-papdepsoffset=-36
-papdendidx=61
-
-il0macaddr=00:90:4c:c5:12:38
-wl0id=0x431b
-
-deadman_to=0xffffffff
-# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG
-muxenab=0x1
-# CLDO PWM voltage settings - 0x4 - 1.1 volt
-#cldo_pwm=0x4
-
-#VCO freq 326.4MHz
-spurconfig=0x3 
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
index 565b735..34d2b67 100644
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
@@ -1,26 +1,77 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+# Augments upstream linux-firmware with additional and updated images
+# from Raspbian:
+# https://github.com/RPi-Distro/firmware-nonfree
+# https://github.com/RPi-Distro/bluez-firmware
 
-SRC_URI += " \
-	file://brcmfmac43430-sdio.bin \
-	file://brcmfmac43430-sdio.txt \
-	"
+LICENSE_append_rpi = "\
+    & Firmware-cypress \
+"
 
-do_install_append() {
-	# Overwrite v7.45.41.26 by the one we currently provide in this layer
-	# (v7.45.41.46)
-	local _firmware="brcmfmac43430-sdio.bin"
-	local _oldmd5=9258986488eca9fe5343b0d6fe040f8e
-	if [ "$(md5sum ${D}/lib/firmware/brcm/$_firmware | awk '{print $1}')" != "$_oldmd5" ]; then
-		_firmware=""
-		bbwarn "linux-firmware stopped providing brcmfmac43430 v7.45.41.26."
-	else
-		_firmware="${WORKDIR}/$_firmware"
-	fi
+LIC_FILES_CHKSUM_append_rpi = "\
+    file://LICENCE.cypress;md5=cbc5f665d04f741f1e006d2096236ba7 \
+"
+NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress"
 
-	mkdir -p ${D}/lib/firmware/brcm
-	install -m 0644 $_firmware ${WORKDIR}/brcmfmac43430-sdio.txt ${D}/lib/firmware/brcm
+SRC_URI_append_rpi = " \
+    git://github.com/RPi-Distro/firmware-nonfree;destsuffix=raspbian-nf;name=raspbian-nf \
+    git://github.com/RPi-Distro/bluez-firmware;destsuffix=raspbian-bluez;name=raspbian-bluez \
+"
+
+SRCREV_raspbian-nf = "86e88fbf0345da49555d0ec34c80b4fbae7d0cd3"
+SRCREV_raspbian-bluez = "e28cd7ee8615de33aa7ec2b41d556af61a4a2707"
+SRCREV_FORMAT_rpi = "default+raspbian-nf+raspbian-bluez"
+
+do_install_append_rpi() {
+    install -d ${D}${nonarch_base_libdir}/firmware/brcm/
+
+    # Replace outdated linux-firmware files with updated ones from
+    # raspbian firmware-nonfree. Raspbian adds blobs and nvram
+    # definitions that are also necessary so copy those too.
+    for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do
+        install -m 0644 ${WORKDIR}/raspbian-nf/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
+    done
+
+    # Add missing Cypress Bluetooth files from raspbian bluez-firmware
+    for fw in BCM43430A1.hcd BCM4345C0.hcd ; do
+        install -m 0644 ${WORKDIR}/raspbian-bluez/broadcom/${fw} ${D}${nonarch_base_libdir}/firmware/brcm/
+    done
 }
 
-FILES_${PN}-bcm43430 += " \
-	/lib/firmware/brcm/brcmfmac43430-sdio.txt \
+# NB: Must prepend, else these become empty and their content is left in
+# the roll-up package which precedes them.
+PACKAGES_prepend_rpi = "\
+    ${PN}-bcm43455 \
+    ${PN}-cypress-license \
+    ${PN}-bcm43430a1-hcd \
+    ${PN}-bcm4345c0-hcd \
 "
+
+# For additional Broadcom
+LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx"
+
+FILES_${PN}-bcm43430_append_rpi = " \
+  ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
+"
+FILES_${PN}-bcm43455 = " \
+  ${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.* \
+"
+
+RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
+
+# For additional Cypress
+FILES_${PN}-cypress-license = "\
+  ${nonarch_base_libdir}/firmware/LICENCE.cypress \
+"
+
+LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress"
+LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress"
+
+FILES_${PN}-bcm43430a1-hcd = " \
+  ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \
+"
+FILES_${PN}-bcm4345c0-hcd = " \
+  ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \
+"
+
+RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license"
+RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license"
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/files/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch b/import-layers/meta-raspberrypi/recipes-kernel/linux/files/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
new file mode 100644
index 0000000..a9e9213
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/files/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
@@ -0,0 +1,62 @@
+From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 25 Sep 2014 11:26:49 -0700
+Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses
+ location
+
+In some cross build environments such as the Yocto Project build
+environment it provides an ncurses library that is compiled
+differently than the host's version.  This causes display corruption
+problems when the host's curses includes are used instead of the
+includes from the provided compiler are overridden.  There is a second
+case where there is no curses libraries at all on the host system and
+menuconfig will just fail entirely.
+
+The solution is simply to allow an override variable in
+check-lxdialog.sh for environments such as the Yocto Project.  Adding
+a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
+compiling and linking against the right headers and libraries.
+
+Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103]
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+cc: Michal Marek <mmarek@suse.cz>
+cc: linux-kbuild@vger.kernel.org
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
+---
+ scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ mode change 100755 => 100644 scripts/kconfig/lxdialog/check-lxdialog.sh
+
+diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
+old mode 100755
+new mode 100644
+index 5075ebf2d3b9..ba9242101190
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
+@@ -4,6 +4,10 @@
+ # What library to link
+ ldflags()
+ {
++	if [ "$CROSS_CURSES_LIB" != "" ]; then
++		echo "$CROSS_CURSES_LIB"
++		exit
++	fi
+ 	pkg-config --libs ncursesw 2>/dev/null && exit
+ 	pkg-config --libs ncurses 2>/dev/null && exit
+ 	for ext in so a dll.a dylib ; do
+@@ -21,6 +25,10 @@ ldflags()
+ # Where is ncurses.h?
+ ccflags()
+ {
++	if [ x"$CROSS_CURSES_INC" != x ]; then
++		echo "$CROSS_CURSES_INC"
++		exit
++	fi
+ 	if pkg-config --cflags ncursesw 2>/dev/null; then
+ 		echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+ 	elif pkg-config --cflags ncurses 2>/dev/null; then
+-- 
+2.14.3
+
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb
index b947659..4a7db1a 100644
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb
+++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb
@@ -7,13 +7,14 @@
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
 
-LINUX_VERSION ?= "4.13"
-LINUX_RPI_DEV_BRANCH ?= "rpi-4.13.y"
+LINUX_VERSION ?= "4.16"
+LINUX_RPI_DEV_BRANCH ?= "rpi-4.16.y"
 
 SRCREV = "${AUTOREV}"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \
-           file://0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch \
-"
+SRC_URI = " \
+    git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \
+    file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
+    "
 require linux-raspberrypi.inc
 
 # Disable version check so that we don't have to edit this recipe every time
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev/0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev/0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch
deleted file mode 100644
index e8bc52e..0000000
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev/0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 922ce1fd0eb810b713f6ffa9a7ab97c11b6e38cf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 10 Feb 2017 17:57:08 -0800
-Subject: [PATCH] build/arm64: Add rules for .dtbo files for dts overlays
-
-We now create overlays as .dtbo files.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- arch/arm64/Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
-index 3635b8662724..822fefeb1cd0 100644
---- a/arch/arm64/Makefile
-+++ b/arch/arm64/Makefile
-@@ -113,6 +113,9 @@ zinstall install:
- %.dtb: scripts
- 	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
- 
-+%.dtbo: | scripts
-+	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
-+
- PHONY += dtbs dtbs_install
- 
- dtbs: prepare scripts
--- 
-2.11.1
-
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc
index da36ca7..65c2ab7 100644
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc
@@ -19,26 +19,21 @@
 KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig"
 
 # CMDLINE for raspberrypi
-CMDLINE ?= "dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
+SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}"
+CMDLINE ?= "dwc_otg.lpm_enable=0 ${SERIAL} root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
 
 # Add the kernel debugger over console kernel command line option if enabled
-CMDLINE_append = ' ${@base_conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'
+CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'
 
 # Disable rpi logo on boot
-CMDLINE_append += ' ${@base_conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo.nologo", "", d)}'
+CMDLINE_append += ' ${@oe.utils.conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo.nologo", "", d)}'
 
 # You can define CMDLINE_DEBUG as "debug" in your local.conf or distro.conf
 # to enable kernel debugging.
 CMDLINE_DEBUG ?= ""
 CMDLINE_append = " ${CMDLINE_DEBUG}"
 
-# Quirk for udev greater or equal 141
-UDEV_GE_141 ?= "1"
-
-# Enable OABI compat for people stuck with obsolete userspace
-ARM_KEEP_OABI ?= "1"
-
-KERNEL_INITRAMFS ?= '${@base_conditional("INITRAMFS_IMAGE_BUNDLE", "1", "1", "", d)}'
+KERNEL_INITRAMFS ?= '${@oe.utils.conditional("INITRAMFS_IMAGE_BUNDLE", "1", "1", "", d)}'
 
 KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}"
 
@@ -61,83 +56,54 @@
     fi
 }
 
+config_setup() {
+    # From kernel.bbclass. Unfortunately, this is needed to support builds that
+    # use devtool. The reason is as follows:
+    #
+    # - In devtool builds, externalsrc.bbclass gets inherited and sets a list of
+    # SRCTREECOVEREDTASKS, which don't get run because they affect the source
+    # tree and, when using devtool, we want the developer's changes to be the
+    # single source of truth. kernel-yocto.bbclass adds do_kernel_configme to
+    # SRCTREECOVEREDTASKS, so it doesn't run in a devtool build., In a normal
+    # non-devtool build, do_kernel_configme creates ${B}.config.
+    #
+    # - Normally (e.g. in linux-yocto), it would be OK that do_kernel_configme
+    # doesn't run, because the first few lines of do_configure in kernel.bbclass
+    # populate ${B}.config from either ${S}.config (if it exists) for custom
+    # developer changes, or otherwise from ${WORDIR}/defconfig.
+    #
+    # - In linux-raspberrypi, we add do_configure_prepend, which tweaks
+    # ${B}.config. Since this runs *before* the kernel.bbclass do_configure,
+    # ${B}.config doesn't yet exist and we hit an error. Thus we need to move
+    # the logic from do_configure up to before our do_configure_prepend. Because
+    # we are copying only a portion of do_configure and not the whole thing,
+    # there is no clean way to do it using OE functionality, so we just
+    # copy-and-paste.
+    if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
+        mv "${S}/.config" "${B}/.config"
+    fi
+
+    # Copy defconfig to .config if .config does not exist. This allows
+    # recipes to manage the .config themselves in do_configure_prepend().
+    if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
+        cp "${WORKDIR}/defconfig" "${B}/.config"
+    fi
+}
+
 do_configure_prepend() {
+    config_setup
+
     mv -f ${B}/.config ${B}/.config.patched
     CONF_SED_SCRIPT=""
 
-    # oabi / eabi support
-    kernel_configure_variable AEABI y
-    if [ "${ARM_KEEP_OABI}" = "1" ] ; then
-        kernel_configure_variable OABI_COMPAT y
-    else
-        kernel_configure_variable OABI_COMPAT n
-    fi
-
-    # Set cmdline
-    kernel_configure_variable CMDLINE "\"${CMDLINE}\""
-
     # Localversion
     kernel_configure_variable LOCALVERSION "\"\""
-    kernel_configure_variable LOCALVERSION_AUTO n
 
-    # Udev quirks
-    # Newer versions of udev mandate that sysfs doesn't have deprecated entries
-    if [ "${UDEV_GE_141}" = "1" ] ; then
-        kernel_configure_variable SYSFS_DEPRECATED n
-        kernel_configure_variable SYSFS_DEPRECATED_V2 n
-        kernel_configure_variable HOTPLUG y
-        kernel_configure_variable UEVENT_HELPER_PATH "\"\""
-        kernel_configure_variable UNIX y
-        kernel_configure_variable SYSFS y
-        kernel_configure_variable PROC_FS y
-        kernel_configure_variable TMPFS y
-        kernel_configure_variable INOTIFY_USER y
-        kernel_configure_variable SIGNALFD y
-        kernel_configure_variable TMPFS_POSIX_ACL y
-        kernel_configure_variable BLK_DEV_BSG y
-        kernel_configure_variable DEVTMPFS y
-        kernel_configure_variable DEVTMPFS_MOUNT y
-    fi
-
-    # Newer inits like systemd need cgroup support
-    if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
-        kernel_configure_variable CGROUP_SCHED y
-        kernel_configure_variable CGROUPS y
-        kernel_configure_variable CGROUP_NS y
-        kernel_configure_variable CGROUP_FREEZER y
-        kernel_configure_variable CGROUP_DEVICE y
-        kernel_configure_variable CPUSETS y
-        kernel_configure_variable PROC_PID_CPUSET y
-        kernel_configure_variable CGROUP_CPUACCT y
-        kernel_configure_variable RESOURCE_COUNTERS y
-    fi
-
-    # root-over-nfs-over-usb-eth support. Limited, but should cover some cases
-    # Enable this by setting a proper CMDLINE_NFSROOT_USB.
-    if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
-        oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
-        kernel_configure_variable INET y
-        kernel_configure_variable IP_PNP y
-        kernel_configure_variable USB_GADGET y
-        kernel_configure_variable USB_GADGET_SELECTED y
-        kernel_configure_variable USB_ETH y
-        kernel_configure_variable NFS_FS y
-        kernel_configure_variable ROOT_NFS y
-        kernel_configure_variable ROOT_NFS y
-        kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\""
-    fi
     if [ ! -z "${KERNEL_INITRAMFS}" ]; then
-        kernel_configure_variable BLK_DEV_INITRD y
-        kernel_configure_variable INITRAMFS_SOURCE ""
-        kernel_configure_variable RD_GZIP y
         kernel_configure_variable OVERLAY_FS y
         kernel_configure_variable SQUASHFS y
         kernel_configure_variable UBIFS_FS y
     fi
-    # Activate CONFIG_LEGACY_PTYS
-    kernel_configure_variable LEGACY_PTYS y
-    # this module is built externally via drbd-utils
-    kernel_configure_variable BLK_DEV_DRBD n
 
     # Activate the configuration options for VC4
     VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
@@ -152,8 +118,6 @@
     # Remove all modified configs and add the rest to .config
     sed -e "${CONF_SED_SCRIPT}" < '${B}/.config.patched' >> '${B}/.config'
     rm -f ${B}/.config.patched
-
-    yes '' | oe_runmake oldconfig
 }
 
 do_compile_append_raspberrypi3-64() {
@@ -161,10 +125,6 @@
     oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
 }
 
-do_install_prepend() {
-    install -d ${D}/lib/firmware
-}
-
 do_deploy_append() {
     # Deploy cmdline.txt
     install -d ${DEPLOYDIR}/bcm2835-bootfiles
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb
new file mode 100644
index 0000000..0478576
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb
@@ -0,0 +1,9 @@
+LINUX_VERSION ?= "4.14.39"
+
+SRCREV = "865ddc1393f558198e7e7ce70928ff2e49c4f7f6"
+SRC_URI = " \
+    git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y \
+    file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
+    "
+
+require linux-raspberrypi.inc
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb
index 061e893..21fcfef 100644
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb
+++ b/import-layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb
@@ -1,8 +1,11 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
 
-LINUX_VERSION ?= "4.9.59"
+LINUX_VERSION ?= "4.9.80"
 
-SRCREV = "e7976b2affa8c05bd299ead0ad9c36ddaf135b9d"
-SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y"
+SRCREV = "ffd7bf4085b09447e5db96edd74e524f118ca3fe"
+SRC_URI = " \
+    git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y \
+    file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
+    "
 
 require linux-raspberrypi.inc
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
index 815a7c2..85fea67 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
@@ -1,4 +1,4 @@
-From 2e111e52f96f0b942abda120c30a876629bd73fc Mon Sep 17 00:00:00 2001
+From cfb432fcd8868c7a4f32010c61e47e2bf0ff80c6 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
 Date: Mon, 25 May 2015 14:53:35 +0200
 Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
@@ -23,15 +23,16 @@
   gst_omx_video_dec_loop()
   gst_omx_port_acquire_buffer()
   gst_omx_component_wait_message()
+
 ---
  omx/gstomxvideodec.c | 5 +++++
  1 file changed, 5 insertions(+)
 
 diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
-index cd24944..57a61dd 100644
+index d12ee8f..fb0100a 100644
 --- a/omx/gstomxvideodec.c
 +++ b/omx/gstomxvideodec.c
-@@ -1247,6 +1247,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
+@@ -1250,6 +1250,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
    GstClockTimeDiff deadline;
    OMX_ERRORTYPE err;
  
@@ -43,6 +44,3 @@
  #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
    port = self->eglimage ? self->egl_out_port : self->dec_out_port;
  #else
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-config-files-path.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-config-files-path.patch
index a7da922..6903c17 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-config-files-path.patch
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-config-files-path.patch
@@ -1,3 +1,14 @@
+From 0dc88ed881eb8420dad4cf0934a900d85b6ef313 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 11 Feb 2016 12:53:20 -0800
+
+---
+ config/bellagio/gstomx.conf |  8 ++++----
+ config/rpi/gstomx.conf      | 22 +++++++++++-----------
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/config/bellagio/gstomx.conf b/config/bellagio/gstomx.conf
+index 5ca8ba6..8931255 100644
 --- a/config/bellagio/gstomx.conf
 +++ b/config/bellagio/gstomx.conf
 @@ -1,6 +1,6 @@
@@ -6,18 +17,18 @@
 -core-name=/usr/local/lib/libomxil-bellagio.so.0
 +core-name=/usr/lib/libomxil-bellagio.so.0
  component-name=OMX.st.video_decoder.mpeg4
- rank=256
+ rank=257
  in-port-index=0
-@@ -9,7 +9,7 @@
+@@ -9,7 +9,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang
  
  [omxh264dec]
  type-name=GstOMXH264Dec
 -core-name=/usr/local/lib/libomxil-bellagio.so.0
 +core-name=/usr/lib/libomxil-bellagio.so.0
  component-name=OMX.st.video_decoder.avc
- rank=256
+ rank=257
  in-port-index=0
-@@ -18,7 +18,7 @@
+@@ -18,7 +18,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang
  
  [omxmpeg4videoenc]
  type-name=GstOMXMPEG4VideoEnc
@@ -26,7 +37,7 @@
  component-name=OMX.st.video_encoder.mpeg4
  rank=0
  in-port-index=0
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;video-framerate-integer;s
  
  [omxaacenc]
  type-name=GstOMXAACEnc
@@ -35,6 +46,8 @@
  component-name=OMX.st.audio_encoder.aac
  rank=0
  in-port-index=0
+diff --git a/config/rpi/gstomx.conf b/config/rpi/gstomx.conf
+index d3ea56a..2508dae 100644
 --- a/config/rpi/gstomx.conf
 +++ b/config/rpi/gstomx.conf
 @@ -1,6 +1,6 @@
@@ -45,7 +58,7 @@
  component-name=OMX.broadcom.video_decode
  rank=257
  in-port-index=130
-@@ -9,7 +9,7 @@
+@@ -9,7 +9,7 @@ hacks=no-component-role
  
  [omxmpeg4videodec]
  type-name=GstOMXMPEG4VideoDec
@@ -54,7 +67,7 @@
  component-name=OMX.broadcom.video_decode
  rank=257
  in-port-index=130
-@@ -18,7 +18,7 @@
+@@ -18,7 +18,7 @@ hacks=no-component-role
  
  [omxh263dec]
  type-name=GstOMXH263Dec
@@ -63,7 +76,7 @@
  component-name=OMX.broadcom.video_decode
  rank=257
  in-port-index=130
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,7 @@ hacks=no-component-role
  
  [omxh264dec]
  type-name=GstOMXH264Dec
@@ -72,7 +85,7 @@
  component-name=OMX.broadcom.video_decode
  rank=257
  in-port-index=130
-@@ -36,7 +36,7 @@
+@@ -36,7 +36,7 @@ hacks=no-component-role;signals-premature-eos
  
  [omxtheoradec]
  type-name=GstOMXTheoraDec
@@ -81,7 +94,7 @@
  component-name=OMX.broadcom.video_decode
  rank=257
  in-port-index=130
-@@ -45,7 +45,7 @@
+@@ -45,7 +45,7 @@ hacks=no-component-role
  
  [omxvp8dec]
  type-name=GstOMXVP8Dec
@@ -90,7 +103,7 @@
  component-name=OMX.broadcom.video_decode
  rank=257
  in-port-index=130
-@@ -54,7 +54,7 @@
+@@ -54,7 +54,7 @@ hacks=no-component-role
  
  [omxmjpegdec]
  type-name=GstOMXMJPEGDec
@@ -99,16 +112,16 @@
  component-name=OMX.broadcom.video_decode
  rank=257
  in-port-index=130
-@@ -63,7 +63,7 @@
+@@ -63,7 +63,7 @@ hacks=no-component-role
  
  [omxvc1dec]
  type-name=GstOMXWMVDec
 -core-name=/opt/vc/lib/libopenmaxil.so
 +core-name=/usr/lib/libopenmaxil.so
  component-name=OMX.broadcom.video_decode
- rank=256
+ rank=257
  in-port-index=130
-@@ -73,7 +73,7 @@
+@@ -73,7 +73,7 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt
  
  [omxh264enc]
  type-name=GstOMXH264Enc
@@ -117,21 +130,21 @@
  component-name=OMX.broadcom.video_encode
  rank=257
  in-port-index=200
-@@ -82,7 +82,7 @@
+@@ -82,7 +82,7 @@ hacks=no-component-role;no-component-reconfigure
  
  [omxanalogaudiosink]
  type-name=GstOMXAnalogAudioSink
 -core-name=/opt/vc/lib/libopenmaxil.so
 +core-name=/usr/lib/libopenmaxil.so
  component-name=OMX.broadcom.audio_render
- rank=256
+ rank=257
  in-port-index=100
-@@ -92,7 +92,7 @@
+@@ -92,7 +92,7 @@ sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)inter
  
  [omxhdmiaudiosink]
  type-name=GstOMXHdmiAudioSink
 -core-name=/opt/vc/lib/libopenmaxil.so
 +core-name=/usr/lib/libopenmaxil.so
  component-name=OMX.broadcom.audio_render
- rank=257
+ rank=258
  in-port-index=100
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0002-fix-decoder-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0002-fix-decoder-flushing.patch
index d4c7c81..122ddb3 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0002-fix-decoder-flushing.patch
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0002-fix-decoder-flushing.patch
@@ -1,8 +1,16 @@
+From fc4773f36aa31b4ae0fc97d3aa3f94db0c88f194 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 11 Feb 2016 12:53:20 -0800
+
+---
+ omx/gstomx.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
 diff --git a/omx/gstomx.c b/omx/gstomx.c
-index 69696c4..c382019 100644
+index 0237f3c..45732c3 100644
 --- a/omx/gstomx.c
 +++ b/omx/gstomx.c
-@@ -1508,8 +1508,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
+@@ -1538,8 +1538,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
      last_error = OMX_ErrorNone;
      gst_omx_component_handle_messages (comp);
      while (signalled && last_error == OMX_ErrorNone && !port->flushed
@@ -13,4 +21,3 @@
        signalled = gst_omx_component_wait_message (comp, timeout);
        if (signalled)
          gst_omx_component_handle_messages (comp);
-
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0003-no-timeout-on-get-state.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0003-no-timeout-on-get-state.patch
index 0a0050d..4124bcc 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0003-no-timeout-on-get-state.patch
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0003-no-timeout-on-get-state.patch
@@ -1,8 +1,16 @@
+From 02e49cba402a783fa1b30e445b83a5c280949c1e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 13 Feb 2016 11:42:29 -0800
+
+---
+ omx/gstomxvideodec.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
 diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
-index 0d4e7a1..a0d9c74 100644
+index fb0100a..bad6335 100644
 --- a/omx/gstomxvideodec.c
 +++ b/omx/gstomxvideodec.c
-@@ -1697,9 +1697,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
+@@ -1713,9 +1713,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
    g_cond_broadcast (&self->drain_cond);
    g_mutex_unlock (&self->drain_lock);
  
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0004-Properly-handle-drain-requests-while-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0004-Properly-handle-drain-requests-while-flushing.patch
index 4d10f24..b02072a 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0004-Properly-handle-drain-requests-while-flushing.patch
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0004-Properly-handle-drain-requests-while-flushing.patch
@@ -1,20 +1,20 @@
-From 80dddfd13aaf2fe7272765f8cf291215fe375e28 Mon Sep 17 00:00:00 2001
+From f00912f0628aff15e882bdc1619f5de1ddf5c720 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
 Date: Tue, 17 Nov 2015 16:51:27 +0000
 Subject: [PATCH] Properly handle drain requests while flushing
 
 Without this commit the decoder streaming thread stops without ever attending
 the drain request, leaving the decoder input thread waiting forever.
----
- omx/gstomx.c         |  7 +++++++
- omx/gstomxvideodec.c | 13 +++++++++++++
- 2 files changed, 20 insertions(+)
 
-Index: gst-omx-1.10.2/omx/gstomx.c
-===================================================================
---- gst-omx-1.10.2.orig/omx/gstomx.c
-+++ gst-omx-1.10.2/omx/gstomx.c
-@@ -737,6 +737,13 @@ gst_omx_component_new (GstObject * paren
+---
+ omx/gstomx.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/omx/gstomx.c b/omx/gstomx.c
+index 45732c3..784a5d7 100644
+--- a/omx/gstomx.c
++++ b/omx/gstomx.c
+@@ -737,6 +737,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name,
  
    g_mutex_lock (&comp->lock);
    gst_omx_component_handle_messages (comp);
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
index b7a8753..fdfdd1b 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
@@ -1,4 +1,4 @@
-From 12103842d5f347cf245e71071d0c44297bcdb1f9 Mon Sep 17 00:00:00 2001
+From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
 Date: Fri, 4 Dec 2015 18:39:59 +0100
 Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
@@ -9,10 +9,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
-index 2368f34..da35e0d 100644
+index bad6335..c63b972 100644
 --- a/omx/gstomxvideodec.c
 +++ b/omx/gstomxvideodec.c
-@@ -1905,8 +1905,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
+@@ -1911,8 +1911,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
                5 * GST_SECOND) != OMX_ErrorNone)
          return FALSE;
        if (gst_omx_port_wait_buffers_released (out_port,
@@ -25,6 +25,3 @@
        if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone)
          return FALSE;
        if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone)
--- 
-2.1.4
-
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-config-files-path.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-config-files-path.patch
deleted file mode 100644
index a7da922..0000000
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-config-files-path.patch
+++ /dev/null
@@ -1,137 +0,0 @@
---- a/config/bellagio/gstomx.conf
-+++ b/config/bellagio/gstomx.conf
-@@ -1,6 +1,6 @@
- [omxmpeg4videodec]
- type-name=GstOMXMPEG4VideoDec
--core-name=/usr/local/lib/libomxil-bellagio.so.0
-+core-name=/usr/lib/libomxil-bellagio.so.0
- component-name=OMX.st.video_decoder.mpeg4
- rank=256
- in-port-index=0
-@@ -9,7 +9,7 @@
- 
- [omxh264dec]
- type-name=GstOMXH264Dec
--core-name=/usr/local/lib/libomxil-bellagio.so.0
-+core-name=/usr/lib/libomxil-bellagio.so.0
- component-name=OMX.st.video_decoder.avc
- rank=256
- in-port-index=0
-@@ -18,7 +18,7 @@
- 
- [omxmpeg4videoenc]
- type-name=GstOMXMPEG4VideoEnc
--core-name=/usr/local/lib/libomxil-bellagio.so.0
-+core-name=/usr/lib/libomxil-bellagio.so.0
- component-name=OMX.st.video_encoder.mpeg4
- rank=0
- in-port-index=0
-@@ -27,7 +27,7 @@
- 
- [omxaacenc]
- type-name=GstOMXAACEnc
--core-name=/usr/local/lib/libomxil-bellagio.so.0
-+core-name=/usr/lib/libomxil-bellagio.so.0
- component-name=OMX.st.audio_encoder.aac
- rank=0
- in-port-index=0
---- a/config/rpi/gstomx.conf
-+++ b/config/rpi/gstomx.conf
-@@ -1,6 +1,6 @@
- [omxmpeg2videodec]
- type-name=GstOMXMPEG2VideoDec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=257
- in-port-index=130
-@@ -9,7 +9,7 @@
- 
- [omxmpeg4videodec]
- type-name=GstOMXMPEG4VideoDec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=257
- in-port-index=130
-@@ -18,7 +18,7 @@
- 
- [omxh263dec]
- type-name=GstOMXH263Dec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=257
- in-port-index=130
-@@ -27,7 +27,7 @@
- 
- [omxh264dec]
- type-name=GstOMXH264Dec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=257
- in-port-index=130
-@@ -36,7 +36,7 @@
- 
- [omxtheoradec]
- type-name=GstOMXTheoraDec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=257
- in-port-index=130
-@@ -45,7 +45,7 @@
- 
- [omxvp8dec]
- type-name=GstOMXVP8Dec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=257
- in-port-index=130
-@@ -54,7 +54,7 @@
- 
- [omxmjpegdec]
- type-name=GstOMXMJPEGDec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=257
- in-port-index=130
-@@ -63,7 +63,7 @@
- 
- [omxvc1dec]
- type-name=GstOMXWMVDec
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_decode
- rank=256
- in-port-index=130
-@@ -73,7 +73,7 @@
- 
- [omxh264enc]
- type-name=GstOMXH264Enc
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.video_encode
- rank=257
- in-port-index=200
-@@ -82,7 +82,7 @@
- 
- [omxanalogaudiosink]
- type-name=GstOMXAnalogAudioSink
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.audio_render
- rank=256
- in-port-index=100
-@@ -92,7 +92,7 @@
- 
- [omxhdmiaudiosink]
- type-name=GstOMXHdmiAudioSink
--core-name=/opt/vc/lib/libopenmaxil.so
-+core-name=/usr/lib/libopenmaxil.so
- component-name=OMX.broadcom.audio_render
- rank=257
- in-port-index=100
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0002-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0002-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
deleted file mode 100644
index aef21a5..0000000
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0002-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 2e111e52f96f0b942abda120c30a876629bd73fc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
-Date: Mon, 25 May 2015 14:53:35 +0200
-Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
-
-This solves a race condition when setting the pipeline from PAUSE to
-NULL while the decoder loop is still running. Without this patch, the
-thread which interacts with the decode sink pad gets blocked here:
-
-  gst_element_change_state()
-  gst_element_change_state_func()
-  gst_element_pads_activate() --> Deactivating pads
-  activate_pads()
-  gst_pad_set_active()
-  gst_pad_activate_mode()
-  post_activate()
-  GST_PAD_STREAM_LOCK()
-
-while gst_omx_port_acquire_buffer() gets stalled forever in
-gst_omx_component_wait_message() waiting for a message that will never
-arrive:
-
-  gst_omx_video_dec_loop()
-  gst_omx_port_acquire_buffer()
-  gst_omx_component_wait_message()
----
- omx/gstomxvideodec.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
-index cd24944..57a61dd 100644
---- a/omx/gstomxvideodec.c
-+++ b/omx/gstomxvideodec.c
-@@ -1247,6 +1247,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
-   GstClockTimeDiff deadline;
-   OMX_ERRORTYPE err;
- 
-+  if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) {
-+    GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead");
-+      goto flushing;
-+  }
-+
- #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
-   port = self->eglimage ? self->egl_out_port : self->dec_out_port;
- #else
--- 
-1.8.3.2
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-fix-decoder-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-fix-decoder-flushing.patch
deleted file mode 100644
index a244b09..0000000
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-fix-decoder-flushing.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/omx/gstomx.c b/omx/gstomx.c
-index 69696c4..c382019 100644
---- a/omx/gstomx.c
-+++ b/omx/gstomx.c
-@@ -1508,8 +1508,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
-     last_error = OMX_ErrorNone;
-     gst_omx_component_handle_messages (comp);
-     while (signalled && last_error == OMX_ErrorNone && !port->flushed
--        && port->buffers
--        && port->buffers->len > g_queue_get_length (&port->pending_buffers)) {
-+     /* && port->buffers
-+        && port->buffers->len > g_queue_get_length (&port->pending_buffers) */) {
-       signalled = gst_omx_component_wait_message (comp, timeout);
-       if (signalled)
-         gst_omx_component_handle_messages (comp);
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch
deleted file mode 100644
index 0a0050d..0000000
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
-index 0d4e7a1..a0d9c74 100644
---- a/omx/gstomxvideodec.c
-+++ b/omx/gstomxvideodec.c
-@@ -1697,9 +1697,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
-   g_cond_broadcast (&self->drain_cond);
-   g_mutex_unlock (&self->drain_lock);
- 
--  gst_omx_component_get_state (self->dec, 5 * GST_SECOND);
-+  gst_omx_component_get_state (self->dec, 0);
- #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
--  gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND);
-+  gst_omx_component_get_state (self->egl_render, 0);
- #endif
- 
-   gst_buffer_replace (&self->codec_data, NULL);
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch
deleted file mode 100644
index 98689f3..0000000
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 80dddfd13aaf2fe7272765f8cf291215fe375e28 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
-Date: Tue, 17 Nov 2015 16:51:27 +0000
-Subject: [PATCH] Properly handle drain requests while flushing
-
-Without this commit the decoder streaming thread stops without ever attending
-the drain request, leaving the decoder input thread waiting forever.
----
- omx/gstomx.c         |  7 +++++++
- omx/gstomxvideodec.c | 13 +++++++++++++
- 2 files changed, 20 insertions(+)
-
-diff --git a/omx/gstomx.c b/omx/gstomx.c
-index 69696c4..f0cd890 100644
---- a/omx/gstomx.c
-+++ b/omx/gstomx.c
-@@ -830,6 +830,13 @@ gst_omx_component_set_state (GstOMXComponent * comp, OMX_STATETYPE state)
- done:
- 
-   gst_omx_component_handle_messages (comp);
-+
-+  if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) {
-+    GST_ERROR_OBJECT (comp->parent,
-+        "Last operation returned an error. Setting last_error manually.");
-+    comp->last_error = err;
-+  }
-+
-   g_mutex_unlock (&comp->lock);
- 
-   if (err != OMX_ErrorNone) {
-diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
-index d531f75..a26c4a6 100644
---- a/omx/gstomxvideodec.c
-+++ b/omx/gstomxvideodec.c
-@@ -1539,9 +1539,16 @@ component_error:
- flushing:
-   {
-     GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
-+
-+    g_mutex_lock (&self->drain_lock);
-+    if (self->draining) {
-+      self->draining = FALSE;
-+      g_cond_broadcast (&self->drain_cond);
-+    }
-     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
-     self->downstream_flow_ret = GST_FLOW_FLUSHING;
-     self->started = FALSE;
-+    g_mutex_unlock (&self->drain_lock);
-     return;
-   }
- 
-@@ -1599,8 +1606,14 @@ flow_error:
-       self->started = FALSE;
-     } else if (flow_ret == GST_FLOW_FLUSHING) {
-       GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
-+      g_mutex_lock (&self->drain_lock);
-+      if (self->draining) {
-+        self->draining = FALSE;
-+        g_cond_broadcast (&self->drain_cond);
-+      }
-       gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
-       self->started = FALSE;
-+      g_mutex_unlock (&self->drain_lock);
-     }
-     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
-     return;
--- 
-1.8.3.2
-
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
deleted file mode 100644
index b7a8753..0000000
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 12103842d5f347cf245e71071d0c44297bcdb1f9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
-Date: Fri, 4 Dec 2015 18:39:59 +0100
-Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
- timeout releasing the buffers taken by the egl_render out port
-
----
- omx/gstomxvideodec.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
-index 2368f34..da35e0d 100644
---- a/omx/gstomxvideodec.c
-+++ b/omx/gstomxvideodec.c
-@@ -1905,8 +1905,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
-               5 * GST_SECOND) != OMX_ErrorNone)
-         return FALSE;
-       if (gst_omx_port_wait_buffers_released (out_port,
--              1 * GST_SECOND) != OMX_ErrorNone)
-+              1 * GST_SECOND) != OMX_ErrorNone) {
-+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL))
-         return FALSE;
-+#endif
-+      }
-       if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone)
-         return FALSE;
-       if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone)
--- 
-2.1.4
-
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx%.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
similarity index 100%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx%.bbappend
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
index db01d74..1df41a5 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
@@ -7,7 +7,7 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl samba libssh libomxil coreutils-native curl-native"
+DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native"
 PR = "r4"
 
 SRCREV_default = "b8ff59dccd9307f10dad71bec2525a95bd6c603b"
@@ -40,6 +40,11 @@
 
 inherit autotools-brokensep pkgconfig
 
+# This isn't used directly by omxplayer, but applied to Makefile.ffmpeg which
+# runs the ffmpeg configuration
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[samba] = "--enable-libsmbclient,--disable-libsmbclient,samba"
+
 # Needed in ffmpeg configure
 export TEMPDIR = "${S}/tmp"
 
@@ -66,6 +71,8 @@
     # Needed for compiler test in ffmpeg's configure
     mkdir -p tmp
 
+    sed -i 's/--enable-libsmbclient/${@bb.utils.contains("PACKAGECONFIG", "samba", "--enable-libsmbclient", "--disable-libsmbclient", d)}/g' Makefile.ffmpeg
+
     oe_runmake -f Makefile.ffmpeg
     oe_runmake -f Makefile.ffmpeg install
     oe_runmake
diff --git a/import-layers/meta-raspberrypi/recipes-sato/webkitgtk/webkitgtk_%.bbappend b/import-layers/meta-raspberrypi/recipes-sato/webkitgtk/webkitgtk_%.bbappend
new file mode 100644
index 0000000..a4cc96e
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-sato/webkitgtk/webkitgtk_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECMAKE_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' -DUSE_GSTREAMER_GL=OFF ', '', d)}"
diff --git a/import-layers/meta-raspberrypi/wic/sdimage-raspberrypi.wks b/import-layers/meta-raspberrypi/wic/sdimage-raspberrypi.wks
index 353daac..01fbaea 100644
--- a/import-layers/meta-raspberrypi/wic/sdimage-raspberrypi.wks
+++ b/import-layers/meta-raspberrypi/wic/sdimage-raspberrypi.wks
@@ -2,5 +2,5 @@
 # long-description: Creates a partitioned SD card image for use with
 # Raspberry Pi. Boot files are located in the first vfat partition.
 
-part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 20
-part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 20
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096
diff --git a/import-layers/meta-virtualization/README b/import-layers/meta-virtualization/README
index 7d84232..f13de08 100644
--- a/import-layers/meta-virtualization/README
+++ b/import-layers/meta-virtualization/README
@@ -4,7 +4,7 @@
 This layer provides support for building Xen, KVM, Libvirt, and associated
 packages necessary for constructing OE-based virtualized solutions.
 
-The bbappend files for some recipe (e.g. linux-yocto) in this layer needs to
+The bbappend files for some recipes (e.g. linux-yocto) in this layer need to
 have 'virtualization' in DISTRO_FEATURES to have effect. To enable them, add
 in configuration file the following line.
 
@@ -23,8 +23,16 @@
 
   SKIP_META_VIRT_SANITY_CHECK = 1
 
-Also note that there are kvm and xen specific distro flags/features that depending
-on your use case.
+Depending on your use case, there are other distro features in meta-virtualization
+that may also be enabled:
+
+ - xen: enables xen functionality in various packages (kernel, libvirt, etc)
+ - kvm: enables KVM configurations in the kernel and autoloads modules
+ - aufs: enables aufs support in docker and linux-yocto
+ - x11: enable xen and libvirt functionality related to x11
+ - selinux: enables functionality in libvirt and lxc
+ - systemd: enable systemd services and unit files (for recipes for support)
+ - sysvinit: enable sysvinit scripts (for recipes with support)
 
 Dependencies
 ------------
@@ -39,14 +47,10 @@
 branch: master
 revision: HEAD
 layers: meta-oe
-	meta-networking
+        meta-networking
         meta-filesystems
         meta-python
 
-URI: git://github.com/errordeveloper/oe-meta-go.git
-branch: master
-revision: HEAD
-
 BBFILE_PRIORITY_openembedded-layer = "4"
 
 Required for Xen XSM policy:
@@ -64,7 +68,7 @@
              Bruce Ashfield <bruce.ashfield@gmail.com>
 
 When sending single patches, please using something like:
-$ git send-email -1 --to meta-virtualization@yoctoproject.org --subject-prefix='meta-virtualization][PATCH'
+$ git send-email -1 -M --to meta-virtualization@yoctoproject.org --subject-prefix='meta-virtualization][PATCH'
 
 License
 -------
diff --git a/import-layers/meta-virtualization/conf/distro/include/meta-virt-default-versions.inc b/import-layers/meta-virtualization/conf/distro/include/meta-virt-default-versions.inc
new file mode 100644
index 0000000..27e7b90
--- /dev/null
+++ b/import-layers/meta-virtualization/conf/distro/include/meta-virt-default-versions.inc
@@ -0,0 +1,9 @@
+# Meta-virtuailization PREFERED_VERSION
+
+PREFERRED_VERSION_python-blinker = "1.3"
+PREFERRED_VERSION_python-gevent = "1.0.1"
+PREFERRED_VERSION_python-m2crypto = "0.22.3"
+PREFERRED_VERSION_python-pyyaml = "3.11"
+PREFERRED_VERSION_python-redis = "2.10.3"
+PREFERRED_VERSION_python-sqlalchemy = "1.1.5"
+PREFERRED_VERSION_python-werkzeug = "0.10.4"
diff --git a/import-layers/meta-virtualization/conf/layer.conf b/import-layers/meta-virtualization/conf/layer.conf
index f71c117..fa2e015 100644
--- a/import-layers/meta-virtualization/conf/layer.conf
+++ b/import-layers/meta-virtualization/conf/layer.conf
@@ -14,15 +14,17 @@
 # This should only be incremented on significant changes that will
 # cause compatibility issues with other layers
 LAYERVERSION_virtualization-layer = "1"
-
+LAYERSERIES_COMPAT_virtualization-layer = "sumo"
 LAYERDEPENDS_virtualization-layer = "core networking-layer"
 
 # Override security flags
 require conf/distro/include/virt_security_flags.inc
 
 PREFERRED_PROVIDER_virtual/runc ?= "runc-docker"
-PREFERRED_PROVIDER_virtual/containerd ?= "containerd-docker"
+PREFERRED_PROVIDER_virtual/containerd ?= "containerd-opencontainers"
 
 # Sanity check for meta-virtualization layer.
 # Setting SKIP_META_VIRT_SANITY_CHECK to "1" would skip the bbappend files check.
 INHERIT += "sanity-meta-virt"
+
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-default-versions.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb
index 37f8547..c6b4f5e 100644
--- a/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb
@@ -1,9 +1,11 @@
+SRCREV = "cfd04396dc68220d1cecbe686a6cc3aa5ce3667c"
+SRC_URI = "git://github.com/containerd/containerd;nobranch=1 \
+           file://0001-build-use-oe-provided-GO-and-flags.patch \
+          "
+
 include containerd.inc
 
-SRCREV = "0ac3cd1be170d180b2baed755e8f0da547ceb267"
-SRC_URI = "git://github.com/docker/containerd.git;nobranch=1 \
-          "
-CONTAINERD_VERSION = "0.2.2"
+CONTAINERD_VERSION = "v1.0.2"
 
 PROVIDES += "virtual/containerd"
 RPROVIDES_${PN} = "virtual/containerd"
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc b/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
index e7a3719..eb47cc9 100644
--- a/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
@@ -6,7 +6,7 @@
 
 # Apache-2.0 for containerd
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
 
 SRC_URI += "file://containerd.service"
 
@@ -17,6 +17,8 @@
 inherit go
 inherit goarch
 
+GO_IMPORT = "import"
+
 RRECOMMENDS_${PN} = "lxc docker"
 CONTAINERD_PKG="github.com/containerd/containerd"
 
@@ -25,30 +27,37 @@
 do_configure[noexec] = "1"
 
 do_compile() {
-	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
-	# docker to download its dependencies but rather
-	# use dependencies packaged independently.
-	cd ${S}
-	rm -rf .gopath
-	mkdir -p .gopath/src/"$(dirname "${CONTAINERD_PKG}")"
-	ln -sf ../../../.. .gopath/src/"${CONTAINERD_PKG}"
+    export GOARCH="${TARGET_GOARCH}"
 
-        export GOPATH="${WORKDIR}/git/"
-        export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+    # link fixups for compilation
+    rm -f ${S}/src/import/vendor/src
+    ln -sf ./ ${S}/src/import/vendor/src
 
-	# Pass the needed cflags/ldflags so that cgo
-	# can find the needed headers files and libraries
-	export GOARCH="${TARGET_GOARCH}"
-	export CGO_ENABLED="1"
-	export CFLAGS=""
-	export LDFLAGS=""
-	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-        export GO_GCFLAGS=""
-	export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
-	export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+    mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/
+    # without this, the stress test parts of the build fail
+    cp ${S}/src/import/*.go ${S}/src/import/vendor/src/github.com/containerd/containerd
 
-        oe_runmake static
+    for c in content errdefs fs images mount snapshots linux api runtimes defaults progress \
+		     protobuf reference diff platforms runtime remotes version archive dialer gc metadata \
+		     metrics filters identifiers labels leases plugin server services \
+		     cmd cio containers namespaces oci events log reaper sys rootfs; do
+	ln -sfn ${S}/src/import/${c} ${S}/src/import/vendor/github.com/containerd/containerd/${c}
+    done
+
+    export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+    export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+    # Pass the needed cflags/ldflags so that cgo
+    # can find the needed headers files and libraries
+    export CGO_ENABLED="1"
+    export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+    export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+    export BUILDTAGS="no_btrfs static_build netgo"
+    export CFLAGS="${CFLAGS}"
+    export LDFLAGS="${LDFLAGS}"
+
+    cd ${S}/src/import
+    oe_runmake binaries
 }
 
 # Note: disabled for now, since docker is launching containerd
@@ -59,9 +68,9 @@
 do_install() {
 	mkdir -p ${D}/${bindir}
 
-	cp ${S}/bin/containerd ${D}/${bindir}/containerd
-	cp ${S}/bin/containerd-shim ${D}/${bindir}/containerd-shim
-        cp ${S}/bin/ctr ${D}/${bindir}/containerd-ctr
+	cp ${S}/src/import/bin/containerd ${D}/${bindir}/containerd
+	cp ${S}/src/import/bin/containerd-shim ${D}/${bindir}/containerd-shim
+	cp ${S}/src/import/bin/ctr ${D}/${bindir}/containerd-ctr
 	
 	ln -sf containerd ${D}/${bindir}/docker-containerd
 	ln -sf containerd-shim ${D}/${bindir}/docker-containerd-shim
@@ -78,3 +87,4 @@
 FILES_${PN} += "${systemd_system_unitdir}/*"
 
 INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} += "ldflags already-stripped"
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch b/import-layers/meta-virtualization/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
new file mode 100644
index 0000000..75a984b
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
@@ -0,0 +1,26 @@
+From e31acef290181434efaf47e70db7ad0d92dbe300 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Thu, 19 Apr 2018 17:09:51 -0400
+Subject: [PATCH] build: use oe provided GO and flags
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/import/Makefile b/src/import/Makefile
+index 9d8cf8a18fbc..492d033fe2a7 100644
+--- a/src/import/Makefile
++++ b/src/import/Makefile
+@@ -134,7 +134,7 @@ bin/%: cmd/% FORCE
+ 
+ bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
+ 	@echo "$(WHALE) bin/containerd-shim"
+-	@CGO_ENABLED=0 go build -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim
++	@$(GO) build -o bin/containerd-shim ${SHIM_GO_LDFLAGS} $(GOBUILDFLAGS) ${GO_TAGS} ./cmd/containerd-shim
+ 
+ binaries: $(BINARIES) ## build binaries
+ 	@echo "$(WHALE) $@"
+-- 
+2.4.0.53.g8440f74
+
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb b/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
index 3a02103..7d62f35 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
@@ -21,6 +21,7 @@
            file://0002-criu-Skip-documentation-install.patch \
            file://0001-criu-Change-libraries-install-directory.patch \
            file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
+           file://fix-building-on-newest-glibc-and-kernel.patch \
           "
 
 COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
@@ -57,6 +58,8 @@
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[selinux] = ",,libselinux"
 
+CLEANBROKEN = "1"
+
 do_compile_prepend() {
     rm -rf ${S}/images/google/protobuf/descriptor.proto
     ln -s  ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
index 4908e47..afb1332 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
@@ -1,4 +1,4 @@
-From 78390305829316633acee2ca5607331b0e37a104 Mon Sep 17 00:00:00 2001
+From f64fbca70e6049dad3c404d871f2383d97725d2d Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Fri, 8 Sep 2017 15:11:31 -0400
 Subject: [PATCH] criu: Change libraries install directory
@@ -7,12 +7,13 @@
 
 Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  Makefile.install | 13 -------------
  1 file changed, 13 deletions(-)
 
 diff --git a/Makefile.install b/Makefile.install
-index 3987bcc..73d98a4 100644
+index 1def3cf..d020eef 100644
 --- a/Makefile.install
 +++ b/Makefile.install
 @@ -9,19 +9,6 @@ LIBEXECDIR	?= $(PREFIX)/libexec
@@ -35,6 +36,3 @@
  # LIBDIR falls back to the standard path.
  LIBDIR ?= $(PREFIX)/lib
  
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
index dc5b897..d1f136c 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
@@ -1,4 +1,4 @@
-From af679853a45fe63f680c99e70416c8ac620d23b8 Mon Sep 17 00:00:00 2001
+From c005b7a4874f55df687ff22bc425551775581421 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Fri, 8 Sep 2017 15:02:14 -0400
 Subject: [PATCH] criu: Fix toolchain hardcode
@@ -9,6 +9,7 @@
 Signed-off-by: Yang Shi <yang.shi@windriver.com>
 Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  Makefile                       |  2 +-
  scripts/nmk/scripts/include.mk |  2 +-
@@ -96,6 +97,3 @@
  
  export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
  export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
index ba414d9..af45db7 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
@@ -1,21 +1,22 @@
-From 07d9b3d0c372e45127dd51781d9564e8bee90dbe Mon Sep 17 00:00:00 2001
+From 45d74ae8a314c481398ba91a3697ffbd074cd98b Mon Sep 17 00:00:00 2001
 From: Jianchuan Wang <jianchuan.wang@windriver.com>
 Date: Tue, 16 Aug 2016 09:42:24 +0800
-Subject: [PATCH 2/2] criu: Skip documentation install
+Subject: [PATCH] criu: Skip documentation install
 
 asciidoc is needed to generate CRIU documentation, so skip it in install.
 
 Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+
 ---
  Makefile.install | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile.install b/Makefile.install
-index a30dc96..33143fb 100644
+index 3987bcc..1def3cf 100644
 --- a/Makefile.install
 +++ b/Makefile.install
-@@ -22,7 +22,7 @@ install-tree:
- .PHONY: install-tree
+@@ -29,7 +29,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR
+ export LIBDIR INCLUDEDIR LIBEXECDIR
  
  install-man:
 -	$(Q) $(MAKE) -C Documentation install
@@ -23,6 +24,3 @@
  .PHONY: install-man
  
  install-lib: lib
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch
new file mode 100644
index 0000000..9361adc
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch
@@ -0,0 +1,45 @@
+From b59947007362b53e9f41f1e5a33071dedf1c59ac Mon Sep 17 00:00:00 2001
+From: Adrian Reber <areber@redhat.com>
+Date: Thu, 28 Sep 2017 09:13:33 +0000
+Subject: [PATCH] fix building on newest glibc and kernel
+
+On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64
+glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more:
+
+In file included from /usr/include/linux/aio_abi.h:31:0,
+                 from criu/cr-check.c:24:
+/usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant
+   MS_RDONLY = 1,  /* Mount read-only.  */
+   ^
+make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1
+make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2
+make: *** [Makefile:233: criu] Error 2
+
+This simple re-ordering of includes fixes it for me.
+
+Signed-off-by: Adrian Reber <areber@redhat.com>
+Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
+
+Upstream-Status: Backport
+[https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+---
+ criu/cr-check.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/criu/cr-check.c b/criu/cr-check.c
+index 1dd887a..93df2ab 100644
+--- a/criu/cr-check.c
++++ b/criu/cr-check.c
+@@ -21,8 +21,8 @@
+ #include <netinet/in.h>
+ #include <sys/prctl.h>
+ #include <sched.h>
+-#include <linux/aio_abi.h>
+ #include <sys/mount.h>
++#include <linux/aio_abi.h>
+ 
+ #include "../soccr/soccr.h"
+ 
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
index c2512a0..59e7bcb 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
@@ -1,4 +1,4 @@
-From 89f9b87904bd312b817ffaa7d83abfd5e84d723d Mon Sep 17 00:00:00 2001
+From 6caf90592d61c8c45b32cb7ff76709f9326030e2 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Fri, 8 Sep 2017 15:40:49 -0400
 Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch
@@ -8,6 +8,7 @@
 INSTALL_LIB.
 
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  lib/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -25,6 +26,3 @@
  .PHONY: install
  
  uninstall:
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-compose/python3-docker-compose_1.16.1.bb b/import-layers/meta-virtualization/recipes-containers/docker-compose/python3-docker-compose_1.16.1.bb
index 4e761d0..851c251 100644
--- a/import-layers/meta-virtualization/recipes-containers/docker-compose/python3-docker-compose_1.16.1.bb
+++ b/import-layers/meta-virtualization/recipes-containers/docker-compose/python3-docker-compose_1.16.1.bb
@@ -19,7 +19,6 @@
   ${PYTHON_PN}-docker-pycreds \
   ${PYTHON_PN}-dockerpty \
   ${PYTHON_PN}-docopt \
-  ${PYTHON_PN}-enum \
   ${PYTHON_PN}-idna \
   ${PYTHON_PN}-jsonschema \
   ${PYTHON_PN}-pyyaml \
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/docker-ce_git.bb b/import-layers/meta-virtualization/recipes-containers/docker/docker-ce_git.bb
new file mode 100644
index 0000000..0dfda5f
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker/docker-ce_git.bb
@@ -0,0 +1,172 @@
+HOMEPAGE = "http://www.docker.com"
+SUMMARY = "Linux container runtime"
+DESCRIPTION = "Linux container runtime \
+ Docker complements kernel namespacing with a high-level API which \
+ operates at the process level. It runs unix processes with strong \
+ guarantees of isolation and repeatability across servers. \
+ . \
+ Docker is a great building block for automating distributed systems: \
+ large-scale web deployments, database clusters, continuous deployment \
+ systems, private PaaS, service-oriented architectures, etc. \
+ . \
+ This package contains the daemon and client. Using docker.io is \
+ officially supported on x86_64 and arm (32-bit) hosts. \
+ Other architectures are considered experimental. \
+ . \
+ Also, note that kernel version 3.10 or above is required for proper \
+ operation of the daemon process, and that any lower versions may have \
+ subtle and/or glaring issues. \
+ "
+
+SRCREV_docker = "0520e243029d1361649afb0706a1c5d9a1c012b8"
+SRCREV_libnetwork = "4cb38c2987c236dce03c868d99b57b1e28a4b81c"
+SRCREV_cli = "0f1bb353423e45e02315e985bd9ddebe6da18457"
+SRC_URI = "\
+	git://github.com/docker/docker-ce.git;nobranch=1;name=docker \
+	git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \
+	git://github.com/docker/cli;branch=master;name=cli;destsuffix=cli \
+	file://docker.init \
+	file://hi.Dockerfile \
+	"
+
+# Apache-2.0 for docker
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/components/engine/LICENSE;md5=9740d093a080530b5c5c6573df9af45a"
+
+GO_IMPORT = "import"
+
+S = "${WORKDIR}/git"
+
+DOCKER_VERSION = "18.03.0-ce"
+PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
+
+DEPENDS = " \
+    go-cli \
+    go-pty \
+    go-context \
+    go-mux \
+    go-patricia \
+    go-logrus \
+    go-fsnotify \
+    go-dbus \
+    go-capability \
+    go-systemd \
+    btrfs-tools \
+    sqlite3 \
+    go-distribution \
+    compose-file \
+    go-connections \
+    notary \
+    grpc-go \
+    libtool-native \
+    libtool \
+    "
+
+PACKAGES =+ "${PN}-contrib"
+
+DEPENDS_append_class-target = " lvm2"
+RDEPENDS_${PN} = "util-linux iptables \
+                  ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \
+                  ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \
+                 "
+RDEPENDS_${PN} += "virtual/containerd virtual/runc"
+
+RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat"
+RSUGGESTS_${PN} = "lxc rt-tests"
+DOCKER_PKG="github.com/docker/docker"
+
+inherit systemd update-rc.d
+inherit go
+inherit goarch
+inherit pkgconfig
+
+do_configure[noexec] = "1"
+
+do_compile() {
+	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
+	# docker to download its dependencies but rather
+	# use dependencies packaged independently.
+	cd ${S}/src/import
+	rm -rf .gopath
+	mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
+	ln -sf ../../../../components/engine/ .gopath/src/"${DOCKER_PKG}"
+
+	mkdir -p .gopath/src/github.com/docker
+	ln -sf ${WORKDIR}/libnetwork .gopath/src/github.com/docker/libnetwork
+	ln -sf ${WORKDIR}/cli .gopath/src/github.com/docker/cli
+
+	export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+	# Pass the needed cflags/ldflags so that cgo
+	# can find the needed headers files and libraries
+	export GOARCH=${TARGET_GOARCH}
+	export CGO_ENABLED="1"
+	export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+	export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+	# in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056
+	export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper'
+
+	export DISABLE_WARN_OUTSIDE_CONTAINER=1
+
+	cd ${S}/src/import/components/engine
+
+	# this is the unsupported built structure
+	# that doesn't rely on an existing docker
+	# to build this:
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary
+
+	# build the proxy
+	go build -o ${S}/src/import/docker-proxy github.com/docker/libnetwork/cmd/proxy
+
+        # build the cli
+	##go build -o ${S}/src/import/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker
+	cd ${S}/src/import/.gopath/src/github.com/docker/cli
+	export CFLAGS=""
+	export LDFLAGS=""
+	export DOCKER_VERSION=${DOCKER_VERSION}
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" make dynbinary
+}
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service','',d)}"
+
+SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+
+INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}"
+INITSCRIPT_NAME_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}"
+INITSCRIPT_PARAMS_${PN} = "defaults"
+
+do_install() {
+	mkdir -p ${D}/${bindir}
+	cp ${WORKDIR}/cli/build/docker ${D}/${bindir}/docker
+	cp ${S}/src/import/components/engine/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
+	cp ${S}/src/import/docker-proxy ${D}/${bindir}/docker-proxy
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 644 ${S}/src/import/components/engine/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system
+		# replaces one copied from above with one that uses the local registry for a mirror
+		install -m 644 ${S}/src/import/components/engine/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system
+	else
+		install -d ${D}${sysconfdir}/init.d
+		install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
+	fi
+
+	mkdir -p ${D}${datadir}/docker/
+	cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/
+	install -m 0755 ${S}/src/import/components/engine/contrib/check-config.sh ${D}${datadir}/docker/
+}
+
+inherit useradd
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r docker"
+
+FILES_${PN} += "${systemd_unitdir}/system/*"
+
+FILES_${PN}-contrib += "${datadir}/docker/check-config.sh"
+RDEPENDS_${PN}-contrib += "bash"
+
+# DO NOT STRIP docker
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} += "ldflags"
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb b/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
index 4ba5e81..e055a4f 100644
--- a/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
@@ -18,16 +18,16 @@
  subtle and/or glaring issues. \
  "
 
-SRCREV_docker = "e639a70fbe999d96354a5bcf560231b7b8aa935c"
-SRCREV_libnetwork = "26addf43a5d925ff79d262dbbdb5344bc2b6e198"
-SRCREV_cli = "a765218f1988e85b68aa3977f34893ec7b059a60"
+SRCREV_docker = "708b068d3095c6a6be939eb2da78c921d2e945e2"
+SRCREV_libnetwork = "4cb38c2987c236dce03c868d99b57b1e28a4b81c"
+SRCREV_cli = "0f1bb353423e45e02315e985bd9ddebe6da18457"
 SRC_URI = "\
 	git://github.com/moby/moby.git;nobranch=1;name=docker \
-	git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \
-	git://github.com/docker/cli;branch=master;name=cli;destsuffix=cli \
+	git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork \
+	git://github.com/docker/cli;branch=master;name=cli;destsuffix=git/cli \
 	file://docker.init \
 	file://hi.Dockerfile \
-	file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \
+        file://0001-libnetwork-use-GO-instead-of-go.patch \
 	"
 
 # Apache-2.0 for docker
@@ -38,7 +38,7 @@
 
 S = "${WORKDIR}/git"
 
-DOCKER_VERSION = "17.06.0"
+DOCKER_VERSION = "18.03.0"
 PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
 
 DEPENDS = " \
@@ -59,13 +59,15 @@
     go-connections \
     notary \
     grpc-go \
+    libtool \
     "
 
 PACKAGES =+ "${PN}-contrib"
 
 DEPENDS_append_class-target = " lvm2"
-RDEPENDS_${PN} = "curl aufs-util git util-linux iptables \
-                  ${@bb.utils.contains('DISTRO_FEATURES','systemd','','cgroup-lite',d)} \
+RDEPENDS_${PN} = "util-linux iptables \
+                  ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \
+                  ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \
                  "
 RDEPENDS_${PN} += "virtual/containerd virtual/runc"
 
@@ -76,6 +78,7 @@
 inherit systemd update-rc.d
 inherit go
 inherit goarch
+inherit pkgconfig
 
 do_configure[noexec] = "1"
 
@@ -89,8 +92,8 @@
 	ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
 
 	mkdir -p .gopath/src/github.com/docker
-	ln -sf ${WORKDIR}/libnetwork .gopath/src/github.com/docker/libnetwork
-	ln -sf ${WORKDIR}/cli .gopath/src/github.com/docker/cli
+	ln -sf ${WORKDIR}/git/libnetwork .gopath/src/github.com/docker/libnetwork
+	ln -sf ${WORKDIR}/git/cli .gopath/src/github.com/docker/cli
 
 	export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
 	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
@@ -104,17 +107,25 @@
 	# in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056
 	export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper'
 
+	export DISABLE_WARN_OUTSIDE_CONTAINER=1
+
+	cd ${S}/src/import/
+
 	# this is the unsupported built structure
 	# that doesn't rely on an existing docker
 	# to build this:
-	DOCKER_GITCOMMIT="${SRCREV}" \
-	  ./hack/make.sh dynbinary
-
-	# build the proxy
-	go build -o ${S}/src/import/docker-proxy github.com/docker/libnetwork/cmd/proxy
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary
 
         # build the cli
-	go build -o ${S}/src/import/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker
+	cd ${S}/src/import/.gopath/src/github.com/docker/cli
+	export CFLAGS=""
+	export LDFLAGS=""
+	export DOCKER_VERSION=${DOCKER_VERSION}
+	VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" make dynbinary
+
+	# build the proxy
+	cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork
+	oe_runmake cross-local
 }
 
 SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
@@ -128,9 +139,9 @@
 
 do_install() {
 	mkdir -p ${D}/${bindir}
-	cp ${S}/src/import/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker
+	cp ${WORKDIR}/git/cli/build/docker ${D}/${bindir}/docker
 	cp ${S}/src/import/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
-	cp ${S}/src/import/docker-proxy ${D}/${bindir}/docker-proxy
+	cp ${WORKDIR}/git/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy
 
 	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
 		install -d ${D}${systemd_unitdir}/system
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch b/import-layers/meta-virtualization/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
new file mode 100644
index 0000000..61ddd26
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
@@ -0,0 +1,62 @@
+From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Fri, 6 Apr 2018 23:58:22 -0400
+Subject: [PATCH] libnetwork: use $(GO) instead of go
+
+Ensure that the libnetwork makefile uses the go cross flags and
+utilities.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/libnetwork/Makefile b/libnetwork/Makefile
+index 17060bc212c7..90cc7a72ef45 100644
+--- a/libnetwork/Makefile
++++ b/libnetwork/Makefile
+@@ -26,9 +26,9 @@ build: ${build_image}.created
+ build-local:
+ 	@echo "šŸ³ $@"
+ 	@mkdir -p "bin"
+-	go build -tags experimental -o "bin/dnet" ./cmd/dnet
+-	go build -o "bin/docker-proxy" ./cmd/proxy
+-	GOOS=linux go build -o "./cmd/diagnostic/diagnosticClient" ./cmd/diagnostic
++	$(GO) build -tags experimental -o "bin/dnet" ./cmd/dnet
++	$(GO) build -o "bin/proxy" ./cmd/proxy
++	GOOS=linux $(GO) build -o "./cmd/diagnostic/diagnosticClient" ./cmd/diagnostic
+ 
+ clean:
+ 	@echo "šŸ³ $@"
+@@ -51,8 +51,8 @@ cross: ${build_image}.created
+ 
+ cross-local:
+ 	@echo "šŸ³ $@"
+-	go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet
+-	go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy
++	@$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy
++	@$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet
+ 
+ check: ${build_image}.created
+ 	@${docker} ./wrapmake.sh check-local
+@@ -68,7 +68,7 @@ run-tests:
+ 	if ls $$dir/*.go &> /dev/null; then \
+ 		pushd . &> /dev/null ; \
+ 		cd $$dir ; \
+-		go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \
++		$(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \
+ 		ret=$$? ;\
+ 		if [ $$ret -ne 0 ]; then exit $$ret; fi ;\
+ 		popd &> /dev/null; \
+@@ -94,7 +94,7 @@ coveralls:
+ # Depends on binaries because vet will silently fail if it can not load compiled imports
+ vet: ## run go vet
+ 	@echo "šŸ³ $@"
+-	@test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)"
++	@test -z "$$($(GO) vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)"
+ 
+ misspell:
+ 	@echo "šŸ³ $@"
+-- 
+2.4.0.53.g8440f74
+
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch b/import-layers/meta-virtualization/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
deleted file mode 100644
index 7ed606f..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From de69555afaf05efcdeea7b7c20c6f7b12f3e1bac Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Fri, 20 Jan 2017 11:58:44 -0500
-Subject: [PATCH] context: use golang.org/x/net pkg until we move to go 1.7
-
-In go 1.6 the context.go is not yet integrated and as such we will get
-build errors like:
-
-walwrap.go:4:2: cannot find package "context" in any of:
-...
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
----
- client/README.md                                  |    2 +-
- client/client.go                                  |    2 +-
- daemon/info_unix.go                               |    2 +-
- integration-cli/docker_api_attach_test.go         |    2 +-
- integration-cli/docker_cli_save_load_unix_test.go |    2 +-
- 5 files changed, 5 insertions(+), 5 deletions(-)
-
---- a/src/import/client/README.md
-+++ b/src/import/client/README.md
-@@ -8,7 +8,7 @@ For example, to list running containers
- package main
- 
- import (
--	"context"
-+	"golang.org/x/net/context"
- 	"fmt"
- 
- 	"github.com/docker/docker/api/types"
---- a/src/import/client/client.go
-+++ b/src/import/client/client.go
-@@ -19,7 +19,7 @@ For example, to list running containers
- 	package main
- 
- 	import (
--		"context"
-+		"golang.org/x/net/context"
- 		"fmt"
- 
- 		"github.com/docker/docker/api/types"
---- a/src/import/daemon/info_unix.go
-+++ b/src/import/daemon/info_unix.go
-@@ -3,7 +3,7 @@
- package daemon
- 
- import (
--	"context"
-+	"golang.org/x/net/context"
- 	"os/exec"
- 	"strings"
- 
---- a/src/import/integration-cli/docker_api_attach_test.go
-+++ b/src/import/integration-cli/docker_api_attach_test.go
-@@ -3,7 +3,7 @@ package main
- import (
- 	"bufio"
- 	"bytes"
--	"context"
-+	"golang.org/x/net/context"
- 	"io"
- 	"net"
- 	"net/http"
---- a/src/import/integration-cli/docker_cli_save_load_unix_test.go
-+++ b/src/import/integration-cli/docker_cli_save_load_unix_test.go
-@@ -3,7 +3,7 @@
- package main
- 
- import (
--	"context"
-+	"golang.org/x/net/context"
- 	"fmt"
- 	"io/ioutil"
- 	"os"
diff --git a/import-layers/meta-virtualization/recipes-containers/kubernetes/kubernetes_git.bb b/import-layers/meta-virtualization/recipes-containers/kubernetes/kubernetes_git.bb
index 2c7161e..1677ff4 100644
--- a/import-layers/meta-virtualization/recipes-containers/kubernetes/kubernetes_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/kubernetes/kubernetes_git.bb
@@ -5,7 +5,7 @@
 maintenance, and scaling of applications. \
 "
 
-SRCREV_kubernetes = "4b839465f84e7faf876c51703aaf49b37fd10d9c"
+SRCREV_kubernetes = "fc32d2f3698e36b93322a3465f63a14e9f0eaead"
 SRC_URI = "git://github.com/kubernetes/kubernetes.git;nobranch=1;name=kubernetes \
           "
 
@@ -16,6 +16,7 @@
 PACKAGES =+ "kubeadm"
 PACKAGES =+ "kubectl"
 PACKAGES =+ "kubelet"
+PACKAGES =+ "kube-proxy"
 
 ALLOW_EMPTY_${PN} = "1"
 
@@ -27,14 +28,14 @@
                    cni"
 
 RDEPENDS_kubeadm = "kubelet kubectl"
-RDEPENDS_kubelet = "iptables socat util-linux ethtool iproute2 ebtables"
+RDEPENDS_kubelet = "iptables socat util-linux ethtool iproute2 ebtables iproute2-tc"
 
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
 GO_IMPORT = "import"
 
-PV = "1.9.0-alpha.1+git${SRCREV_kubernetes}"
+PV = "1.10.0+git${SRCREV_kubernetes}"
 
 inherit systemd
 inherit go
@@ -90,6 +91,7 @@
 
 FILES_kubeadm = "${bindir}/kubeadm ${systemd_unitdir}/system/kubelet.service.d/*"
 FILES_kubectl = "${bindir}/kubectl"
+FILES_kube-proxy = "${bindir}/kube-proxy"
 FILES_kubelet = "${bindir}/kubelet ${systemd_unitdir}/system/kubelet.service ${sysconfdir}/kubernetes/manifests/"
 
 INHIBIT_PACKAGE_STRIP = "1"
diff --git a/import-layers/meta-virtualization/recipes-containers/lxc/files/dnsmasq.conf b/import-layers/meta-virtualization/recipes-containers/lxc/files/dnsmasq.conf
new file mode 100644
index 0000000..124f7eb
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/lxc/files/dnsmasq.conf
@@ -0,0 +1,2 @@
+bind-interfaces
+except-interface=lxcbr0
diff --git a/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.8.bb b/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.8.bb
index 93d5a10..c87b875 100644
--- a/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.8.bb
+++ b/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.8.bb
@@ -6,6 +6,8 @@
 RDEPENDS_${PN} = " \
 		rsync \
 		gzip \
+		xz \
+		tar \
 		libcap-bin \
 		bridge-utils \
 		dnsmasq \
@@ -22,6 +24,9 @@
 		gnutls \
 		nettle \
 "
+
+RDEPENDS_${PN}_append_libc-glibc = " glibc-utils"
+
 RDEPENDS_${PN}-ptest += "file make gmp nettle gnutls bash"
 
 SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
@@ -33,6 +38,7 @@
 	file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
 	file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
 	file://cgroups-work-around-issue-in-gcc-7.patch \
+	file://dnsmasq.conf \
 	"
 
 SRC_URI[md5sum] = "7bfd95280522d7936c0979dfea92cdb5"
@@ -54,14 +60,16 @@
 CFLAGS_append = " -Wno-error=deprecated-declarations"
 
 PACKAGECONFIG ??= "templates \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
 "
 PACKAGECONFIG[doc] = "--enable-doc --enable-api-docs,--disable-doc --disable-api-docs,,"
 PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,,"
-PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
+PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
 PACKAGECONFIG[templates] = ",,, ${PN}-templates"
 PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
 PACKAGECONFIG[seccomp] ="--enable-seccomp,--disable-seccomp,libseccomp,libseccomp"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
 PACKAGECONFIG[python] = "--enable-python,--disable-python,python3,python3-core"
 PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua,lua"
 
@@ -131,6 +139,11 @@
 	    if [ -d ${D}${exec_prefix}/lib/python* ]; then mv ${D}${exec_prefix}/lib/python* ${D}${libdir}/; fi
 	    rmdir --ignore-fail-on-non-empty ${D}${exec_prefix}/lib
 	fi
+
+	# Force the main dnsmasq instance to bind only to specified interfaces and
+	# to not bind to virbr0. Libvirt will run its own instance on this interface.
+	install -d ${D}/${sysconfdir}/dnsmasq.d
+	install -m 644 ${WORKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/lxc
 }
 
 EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch b/import-layers/meta-virtualization/recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch
new file mode 100644
index 0000000..78d2b9d
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch
@@ -0,0 +1,30 @@
+From fbd62eff9ff2f447c2eb4634398110609fbf9d59 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Thu, 16 Nov 2017 23:40:17 -0500
+Subject: [PATCH] config: make Config.User mapping errors a warning
+
+Rather than throwing an error if we can't map a user to a uid,
+output a warning. We aren't actually running the code, but are
+just extracting it .. so the user not existing isn't an issue.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ image/config.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/import/image/config.go b/src/import/image/config.go
+index d28b1bc4fe5f..37dfd1f14ef7 100644
+--- a/src/import/image/config.go
++++ b/src/import/image/config.go
+@@ -106,7 +106,7 @@ func (c *config) runtimeSpec(rootfs string) (*specs.Spec, error) {
+ 		s.Process.User.UID = uint32(uid)
+ 		s.Process.User.GID = uint32(gid)
+ 	} else if c.Config.User != "" {
+-		return nil, errors.New("config.User: unsupported format")
++		fmt.Println("Warning: could not map UID for user:", c.Config.User)
+ 	}
+ 
+ 	s.Linux = &specs.Linux{}
+-- 
+2.4.0.53.g8440f74
+
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb
index 68d73c3..807ee26 100644
--- a/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -14,7 +14,8 @@
 
 SRC_URI = "git://github.com/opencontainers/image-tools.git \
            file://0001-image-manifest-Recursively-remove-pre-existing-entri.patch \
-           file://0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch"
+           file://0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch \
+           file://0001-config-make-Config.User-mapping-errors-a-warning.patch"
 
 SRCREV = "4abe1a166f9be97e8e71b1bb4d7599cc29323011"
 PV = "0.2.0-dev+git${SRCPV}"
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch
new file mode 100644
index 0000000..753a77d
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch
@@ -0,0 +1,76 @@
+From f59cddcedd6535e0b809ec9b4e95672d34b41a16 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Tue, 14 Nov 2017 07:41:41 -0800
+Subject: [PATCH] Add additional cgroup mounts from root NS automatically
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+---
+ src/systemdhook.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 45 insertions(+)
+
+diff --git a/src/systemdhook.c b/src/systemdhook.c
+index 78575ef..f735484 100644
+--- a/src/systemdhook.c
++++ b/src/systemdhook.c
+@@ -238,6 +238,11 @@ static char *get_process_cgroup_subsystem_path(int pid, const char *subsystem) {
+ static int mount_cgroup(const char *rootfs, const char *options, char *systemd_path)
+ {
+ 	_cleanup_free_ char *cgroup_path = NULL;
++	char *spath, *dpath;
++	DIR *dir;
++	struct dirent *d;
++	char link[80];
++	int got;
+ 
+ 	if (asprintf(&cgroup_path, "%s/%s", rootfs, CGROUP_ROOT) < 0) {
+ 		pr_perror("Failed to create path for %s", CGROUP_ROOT);
+@@ -256,6 +261,46 @@ static int mount_cgroup(const char *rootfs, const char *options, char *systemd_p
+ 		pr_perror("Failed to mkdir new dest: %s", systemd_path);
+ 		return -1;
+ 	}
++	/* Create all additional cgroup mounts which are in the root namespace */
++	dir = opendir(CGROUP_ROOT);
++	if (!dir) {
++		pr_perror("Failed to open %s", CGROUP_ROOT);
++		return -1;
++	}
++	/* Skip "." and ".." */
++	readdir(dir);
++	readdir(dir);
++	while ((d = readdir(dir))) {
++		/* Systemd is already handled above */
++		if (strcmp(d->d_name, "systemd") == 0) {
++			continue;
++		}
++		if (asprintf(&spath, "%s/%s", CGROUP_ROOT, d->d_name) < 0) {
++			pr_perror("Failed to create path for %s", d->d_name);
++			return -1;
++		}
++		if (asprintf(&dpath, "%s%s/%s", rootfs, CGROUP_ROOT, d->d_name) < 0) {
++			pr_perror("Failed to create path for %s", d->d_name);
++			return -1;
++		}
++		got = readlink(spath, link, sizeof(link) - 1);
++		if (got > 0) {
++			link[got] = '\0';
++			symlink(link, dpath);
++		} else {
++			if ((makepath(dpath, 0755) == -1) && (errno != EEXIST)) {
++				pr_perror("Failed to mkdir new dest: %s", dpath);
++				return -1;
++			}
++			if (bind_mount(spath, dpath, false)) {
++				pr_perror("Failed to bind mount %s on %s", spath, dpath);
++				return -1;
++			}
++		}
++		free(spath);
++		free(dpath);
++	}
++	closedir(dir);
+ 	if (mount(cgroup_path, cgroup_path, "bind", MS_REMOUNT|MS_BIND|MS_RDONLY, "") == -1) {
+ 		pr_perror("Failed to remount %s readonly", cgroup_path);
+ 		return -1;
+-- 
+2.11.0
+
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
index fc88905..e07b741 100644
--- a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
@@ -10,6 +10,7 @@
 SRC_URI = "git://github.com/projectatomic/oci-systemd-hook \
            file://0001-selinux-drop-selinux-support.patch \
            file://0001-configure-drop-selinux-support.patch \
+           file://0001-Add-additional-cgroup-mounts-from-root-NS-automatica.patch \
 "
 
 PV = "0.0.1+git${SRCPV}"
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch
deleted file mode 100644
index fa1f695..0000000
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From aa2fc7b0eacba61175f083cc8d8adc233bcd0575 Mon Sep 17 00:00:00 2001
-From: Paul Barker <pbarker@toganlabs.com>
-Date: Thu, 12 Oct 2017 11:34:24 +0000
-Subject: [PATCH] Disable building recvtty
-
-Signed-off-by: Paul Barker <pbarker@toganlabs.com>
-Upstream-status: Inappropriate
----
- Makefile | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 0fcf508..24f47dc 100644
---- a/src/import/Makefile
-+++ b/src/import/Makefile
-@@ -38,7 +38,6 @@ contrib/cmd/recvtty/recvtty: $(SOURCES)
- 
- static: $(SOURCES)
- 	CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc .
--	CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
- 
- release:
- 	@flag_list=(seccomp selinux apparmor static); \
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch
deleted file mode 100644
index bcc76fc..0000000
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From e8ef6025a4f48620baf91737cd37eb5e6a40f48c Mon Sep 17 00:00:00 2001
-From: Justin Cormack <justin.cormack@docker.com>
-Date: Fri, 23 Jun 2017 17:14:59 -0700
-Subject: [PATCH 1/3] Update to runtime spec
- 198f23f827eea397d4331d7eb048d9d4c7ff7bee
-
-Updates memory limits to be int64, and removes Platform from spec.
-
-Signed-off-by: Justin Cormack <justin.cormack@docker.com>
----
- vendor.conf                                        |  2 +-
- .../opencontainers/runtime-spec/specs-go/config.go | 23 ++++++----------------
- 2 files changed, 7 insertions(+), 18 deletions(-)
-
-diff --git a/vendor.conf b/vendor.conf
-index e23e7ea7..09a8a924 100644
---- a/src/import/vendor.conf
-+++ b/src/import/vendor.conf
-@@ -1,7 +1,7 @@
- # OCI runtime-spec. When updating this, make sure you use a version tag rather
- # than a commit ID so it's much more obvious what version of the spec we are
- # using.
--github.com/opencontainers/runtime-spec 239c4e44f2a612ed85f6db9c66247aa33f437e91
-+github.com/opencontainers/runtime-spec 198f23f827eea397d4331d7eb048d9d4c7ff7bee
- # Core libcontainer functionality.
- github.com/mrunalp/fileutils ed869b029674c0e9ce4c0dfa781405c2d9946d08
- github.com/opencontainers/selinux v1.0.0-rc1
-diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
-index 8bf8d924..68ab112e 100644
---- a/src/import/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
-+++ b/src/import/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
-@@ -6,8 +6,6 @@ import "os"
- type Spec struct {
- 	// Version of the Open Container Runtime Specification with which the bundle complies.
- 	Version string `json:"ociVersion"`
--	// Platform specifies the configuration's target platform.
--	Platform Platform `json:"platform"`
- 	// Process configures the container process.
- 	Process *Process `json:"process,omitempty"`
- 	// Root configures the container's root filesystem.
-@@ -101,15 +99,6 @@ type Root struct {
- 	Readonly bool `json:"readonly,omitempty"`
- }
- 
--// Platform specifies OS and arch information for the host system that the container
--// is created for.
--type Platform struct {
--	// OS is the operating system.
--	OS string `json:"os"`
--	// Arch is the architecture
--	Arch string `json:"arch"`
--}
--
- // Mount specifies a mount for a container.
- type Mount struct {
- 	// Destination is the absolute path where the mount will be placed in the container.
-@@ -284,15 +273,15 @@ type LinuxBlockIO struct {
- // LinuxMemory for Linux cgroup 'memory' resource management
- type LinuxMemory struct {
- 	// Memory limit (in bytes).
--	Limit *uint64 `json:"limit,omitempty"`
-+	Limit *int64 `json:"limit,omitempty"`
- 	// Memory reservation or soft_limit (in bytes).
--	Reservation *uint64 `json:"reservation,omitempty"`
-+	Reservation *int64 `json:"reservation,omitempty"`
- 	// Total memory limit (memory + swap).
--	Swap *uint64 `json:"swap,omitempty"`
-+	Swap *int64 `json:"swap,omitempty"`
- 	// Kernel memory limit (in bytes).
--	Kernel *uint64 `json:"kernel,omitempty"`
-+	Kernel *int64 `json:"kernel,omitempty"`
- 	// Kernel memory limit for tcp (in bytes)
--	KernelTCP *uint64 `json:"kernelTCP,omitempty"`
-+	KernelTCP *int64 `json:"kernelTCP,omitempty"`
- 	// How aggressive the kernel will swap memory pages.
- 	Swappiness *uint64 `json:"swappiness,omitempty"`
- }
-@@ -486,7 +475,7 @@ type WindowsNetwork struct {
- 	EndpointList []string `json:"endpointList,omitempty"`
- 	// Specifies if unqualified DNS name resolution is allowed.
- 	AllowUnqualifiedDNSQuery bool `json:"allowUnqualifiedDNSQuery,omitempty"`
--	// Comma seperated list of DNS suffixes to use for name resolution.
-+	// Comma separated list of DNS suffixes to use for name resolution.
- 	DNSSearchList []string `json:"DNSSearchList,omitempty"`
- 	// Name (ID) of the container that we will share with the network stack.
- 	NetworkSharedContainerName string `json:"networkSharedContainerName,omitempty"`
--- 
-2.11.0
-
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Use-correct-go-cross-compiler.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Use-correct-go-cross-compiler.patch
deleted file mode 100644
index 8f5171a..0000000
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-Use-correct-go-cross-compiler.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 037c20b3b3ef5e9ead0282aa64f9b88c0c18934d Mon Sep 17 00:00:00 2001
-From: Paul Barker <pbarker@toganlabs.com>
-Date: Thu, 5 Oct 2017 13:14:40 +0000
-Subject: [PATCH] Use correct go cross-compiler
-
-We need to use '${GO}' as set by OpenEmbedded instead of just 'go'. Just using
-'go' will invoke go-native.
-
-Signed-off-by: Paul Barker <pbarker@toganlabs.com>
-Upstream-status: Inappropriate
----
- Makefile | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 8117892..0fcf508 100644
---- a/src/import/Makefile
-+++ b/src/import/Makefile
-@@ -27,18 +27,18 @@ SHELL := $(shell command -v bash 2>/dev/null)
- .DEFAULT: runc
- 
- runc: $(SOURCES)
--	go build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc .
-+	$(GO) build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc .
- 
- all: runc recvtty
- 
- recvtty: contrib/cmd/recvtty/recvtty
- 
- contrib/cmd/recvtty/recvtty: $(SOURCES)
--	go build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
-+	$(GO) build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
- 
- static: $(SOURCES)
--	CGO_ENABLED=1 go build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc .
--	CGO_ENABLED=1 go build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
-+	CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc .
-+	CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
- 
- release:
- 	@flag_list=(seccomp selinux apparmor static); \
-@@ -62,15 +62,15 @@ release:
- 			CGO_ENABLED=1; \
- 		}; \
- 		echo "Building target: $$output"; \
--		go build -i $(EXTRA_FLAGS) -ldflags "$$ldflags $(EXTRA_LDFLAGS)" -tags "$$tags" -o "$$output" .; \
-+		$(GO) build -i $(EXTRA_FLAGS) -ldflags "$$ldflags $(EXTRA_LDFLAGS)" -tags "$$tags" -o "$$output" .; \
- 	done
- 
- dbuild: runcimage
- 	docker run --rm -v $(CURDIR):/go/src/$(PROJECT) --privileged $(RUNC_IMAGE) make clean all
- 
- lint:
--	go vet $(allpackages)
--	go fmt $(allpackages)
-+	$(GO) vet $(allpackages)
-+	$(GO) fmt $(allpackages)
- 
- man:
- 	man/md2man-all.sh
-@@ -88,7 +88,7 @@ unittest: runcimage
- 	docker run -e TESTFLAGS -t --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localunittest
- 
- localunittest: all
--	go test -timeout 3m -tags "$(BUILDTAGS)" ${TESTFLAGS} -v $(allpackages)
-+	$(GO) test -timeout 3m -tags "$(BUILDTAGS)" ${TESTFLAGS} -v $(allpackages)
- 
- integration: runcimage
- 	docker run -e TESTFLAGS -t --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localintegration
-@@ -134,10 +134,10 @@ clean:
- validate:
- 	script/validate-gofmt
- 	script/validate-shfmt
--	go vet $(allpackages)
-+	$(GO) vet $(allpackages)
- 
- ci: validate localtest
- 
- # memoize allpackages, so that it's executed only once and only if used
--_allpackages = $(shell go list ./... | grep -v vendor)
-+_allpackages = $(shell $(GO) list ./... | grep -v vendor)
- allpackages = $(if $(__allpackages),,$(eval __allpackages := $$(_allpackages)))$(__allpackages)
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch
new file mode 100644
index 0000000..f885aaf
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch
@@ -0,0 +1,27 @@
+From a9a2b9e72027d0b2357f6dfe8b154762aaa8dd02 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Thu, 19 Apr 2018 16:39:41 -0400
+Subject: [PATCH] build: drop recvtty and use GOBUILDFLAGS
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ Makefile | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/import/Makefile b/src/import/Makefile
+index c6de11d..0e9bddb 100644
+--- a/src/import/Makefile
++++ b/src/import/Makefile
+@@ -39,8 +39,7 @@ contrib/cmd/recvtty/recvtty: $(SOURCES)
+ 	$(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
+ 
+ static: $(SOURCES)
+-	CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc .
+-	CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
++	CGO_ENABLED=1 $(GO) build -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" $(GOBUILDFLAGS) -o runc .
+ 
+ release:
+ 	script/release.sh -r release/$(VERSION) -v $(VERSION)
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
new file mode 100644
index 0000000..9ccbccb
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
@@ -0,0 +1,129 @@
+From cd7d76a6d1ecb1856f6ed666fb5c30dc105aa94e Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Tue, 5 Dec 2017 18:28:28 -0800
+Subject: [PATCH] runc-docker: Allow "run start ..." to daemonize with $SIGUSR1_PARENT_PID
+
+The runc-docker has all the code in it to properly run a stop hook if
+you use it in the foreground.  It doesn't work in the back ground
+because there is no way for a golang application to fork a child exit
+out of the parent process because all the golang threads stay with the
+parent.
+
+This patch has three parts that happen ONLY when $SIGUSR1_PARENT_PID
+is set.
+
+1) The code was copied which performs the normal the signal handling
+   block which is used for the foreground operation of runc.
+
+2) At the point where runc start would normally exit, it closes
+   stdin/stdout/stderr so it would be possible to daemonize "runc start ...".
+
+3) The code to send a SIGUSR1 to the parent process was added.  The
+   idea being that a parent process would simply exit at that point
+   because it was blocking until runc performed everything it was
+   required to perform.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+---
+ signals.go     | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++----
+ utils_linux.go |  2 +-
+ 2 files changed, 51 insertions(+), 5 deletions(-)
+
+Index: git/src/import/signals.go
+===================================================================
+--- git.orig/src/import/signals.go
++++ git/src/import/signals.go
+@@ -6,6 +6,7 @@
+ 	"os"
+ 	"os/signal"
+ 	"syscall" // only for Signal
++	"strconv"
+ 
+ 	"github.com/opencontainers/runc/libcontainer"
+ 	"github.com/opencontainers/runc/libcontainer/system"
+@@ -56,9 +57,6 @@
+ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach bool) (int, error) {
+ 	// make sure we know the pid of our main process so that we can return
+ 	// after it dies.
+-	if detach && h.notifySocket == nil {
+-		return 0, nil
+-	}
+ 
+ 	pid1, err := process.Pid()
+ 	if err != nil {
+@@ -68,12 +66,61 @@
+ 	if h.notifySocket != nil {
+ 		if detach {
+ 			h.notifySocket.run(pid1)
+-			return 0, nil
+ 		} else {
+ 			go h.notifySocket.run(0)
+ 		}
+ 	}
+ 
++	if (detach) {
++		// This allows the parent process to daemonize this process
++		// so long as stdin/stderr/stdout are closed
++		if envVal := os.Getenv("SIGUSR1_PARENT_PID"); envVal != "" {
++			// Close stdin/stdout/stderr
++			os.Stdin.Close()
++			os.Stdout.Close()
++			os.Stderr.Close()
++			// Notify parent to detach
++			i, err := strconv.Atoi(envVal)
++			if (err != nil) {
++				return 0, nil
++			}
++			unix.Kill(i, unix.SIGUSR1)
++			// Loop waiting on the child to signal or exit,
++			// after which all stop hooks will be run
++			for s := range h.signals {
++				switch s {
++				case unix.SIGCHLD:
++					exits, err := h.reap()
++					if err != nil {
++						logrus.Error(err)
++					}
++					for _, e := range exits {
++						logrus.WithFields(logrus.Fields{
++							"pid":    e.pid,
++							"status": e.status,
++						}).Debug("process exited")
++						if e.pid == pid1 {
++							// call Wait() on the process even though we already have the exit
++							// status because we must ensure that any of the go specific process
++							// fun such as flushing pipes are complete before we return.
++							process.Wait()
++							if h.notifySocket != nil {
++								h.notifySocket.Close()
++							}
++							return e.status, nil
++						}
++					}
++				default:
++					logrus.Debugf("sending signal to process %s", s)
++					if err := unix.Kill(pid1, s.(syscall.Signal)); err != nil {
++						logrus.Error(err)
++					}
++				}
++			}
++		}
++		return 0, nil
++	}
++
+ 	// Perform the initial tty resize. Always ignore errors resizing because
+ 	// stdout might have disappeared (due to races with when SIGHUP is sent).
+ 	_ = tty.resize()
+Index: git/src/import/utils_linux.go
+===================================================================
+--- git.orig/src/import/utils_linux.go
++++ git/src/import/utils_linux.go
+@@ -338,7 +338,7 @@
+ 	if err != nil {
+ 		r.terminate(process)
+ 	}
+-	if detach {
++	if (detach && os.Getenv("SIGUSR1_PARENT_PID") == "") {
+ 		return 0, nil
+ 	}
+ 	r.destroy()
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
deleted file mode 100644
index 7970dec..0000000
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From e1146182a8cebb5a6133a9e298a5e4acf99652e9 Mon Sep 17 00:00:00 2001
-From: Justin Cormack <justin.cormack@docker.com>
-Date: Fri, 23 Jun 2017 17:16:08 -0700
-Subject: [PATCH 2/3] Remove Platform as no longer in OCI spec
-
-This was never used, just validated, so was removed from spec.
-
-Signed-off-by: Justin Cormack <justin.cormack@docker.com>
----
- libcontainer/specconv/example.go |  5 -----
- spec.go                          | 14 --------------
- 2 files changed, 19 deletions(-)
-
-diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go
-index 33134116..d6621194 100644
---- a/src/import/libcontainer/specconv/example.go
-+++ b/src/import/libcontainer/specconv/example.go
-@@ -2,7 +2,6 @@ package specconv
- 
- import (
- 	"os"
--	"runtime"
- 	"strings"
- 
- 	"github.com/opencontainers/runtime-spec/specs-go"
-@@ -15,10 +14,6 @@ func sPtr(s string) *string { return &s }
- func Example() *specs.Spec {
- 	return &specs.Spec{
- 		Version: specs.Version,
--		Platform: specs.Platform{
--			OS:   runtime.GOOS,
--			Arch: runtime.GOARCH,
--		},
- 		Root: specs.Root{
- 			Path:     "rootfs",
- 			Readonly: true,
-diff --git a/spec.go b/spec.go
-index 92d38f57..876937d2 100644
---- a/src/import/spec.go
-+++ b/src/import/spec.go
-@@ -7,7 +7,6 @@ import (
- 	"fmt"
- 	"io/ioutil"
- 	"os"
--	"runtime"
- 
- 	"github.com/opencontainers/runc/libcontainer/configs"
- 	"github.com/opencontainers/runc/libcontainer/specconv"
-@@ -131,9 +130,6 @@ func loadSpec(cPath string) (spec *specs.Spec, err error) {
- 	if err = json.NewDecoder(cf).Decode(&spec); err != nil {
- 		return nil, err
- 	}
--	if err = validatePlatform(&spec.Platform); err != nil {
--		return nil, err
--	}
- 	return spec, validateProcessSpec(spec.Process)
- }
- 
-@@ -148,13 +144,3 @@ func createLibContainerRlimit(rlimit specs.LinuxRlimit) (configs.Rlimit, error)
- 		Soft: rlimit.Soft,
- 	}, nil
- }
--
--func validatePlatform(platform *specs.Platform) error {
--	if platform.OS != runtime.GOOS {
--		return fmt.Errorf("target os %s mismatch with current os %s", platform.OS, runtime.GOOS)
--	}
--	if platform.Arch != runtime.GOARCH {
--		return fmt.Errorf("target arch %s mismatch with current arch %s", platform.Arch, runtime.GOARCH)
--	}
--	return nil
--}
--- 
-2.11.0
-
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch
deleted file mode 100644
index 50a9b7f..0000000
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From 3d9074ead33a5c27dc20bb49457c69c6d2ae6b57 Mon Sep 17 00:00:00 2001
-From: Justin Cormack <justin.cormack@docker.com>
-Date: Fri, 23 Jun 2017 17:17:00 -0700
-Subject: [PATCH 3/3] Update memory specs to use int64 not uint64
-
-replace #1492 #1494
-fix #1422
-
-Since https://github.com/opencontainers/runtime-spec/pull/876 the memory
-specifications are now `int64`, as that better matches the visible interface where
-`-1` is a valid value. Otherwise finding the correct value was difficult as it
-was kernel dependent.
-
-Signed-off-by: Justin Cormack <justin.cormack@docker.com>
----
- libcontainer/cgroups/fs/memory.go    | 36 +++++++++++++++++-------------------
- libcontainer/configs/cgroup_linux.go | 10 +++++-----
- update.go                            | 14 +++++++-------
- 3 files changed, 29 insertions(+), 31 deletions(-)
-
-diff --git a/libcontainer/cgroups/fs/memory.go b/libcontainer/cgroups/fs/memory.go
-index da2cc9f8..b739c631 100644
---- a/src/import/libcontainer/cgroups/fs/memory.go
-+++ b/src/import/libcontainer/cgroups/fs/memory.go
-@@ -73,14 +73,14 @@ func EnableKernelMemoryAccounting(path string) error {
- 	// until a limit is set on the cgroup and limit cannot be set once the
- 	// cgroup has children, or if there are already tasks in the cgroup.
- 	for _, i := range []int64{1, -1} {
--		if err := setKernelMemory(path, uint64(i)); err != nil {
-+		if err := setKernelMemory(path, i); err != nil {
- 			return err
- 		}
- 	}
- 	return nil
- }
- 
--func setKernelMemory(path string, kernelMemoryLimit uint64) error {
-+func setKernelMemory(path string, kernelMemoryLimit int64) error {
- 	if path == "" {
- 		return fmt.Errorf("no such directory for %s", cgroupKernelMemoryLimit)
- 	}
-@@ -88,7 +88,7 @@ func setKernelMemory(path string, kernelMemoryLimit uint64) error {
- 		// kernel memory is not enabled on the system so we should do nothing
- 		return nil
- 	}
--	if err := ioutil.WriteFile(filepath.Join(path, cgroupKernelMemoryLimit), []byte(strconv.FormatUint(kernelMemoryLimit, 10)), 0700); err != nil {
-+	if err := ioutil.WriteFile(filepath.Join(path, cgroupKernelMemoryLimit), []byte(strconv.FormatInt(kernelMemoryLimit, 10)), 0700); err != nil {
- 		// Check if the error number returned by the syscall is "EBUSY"
- 		// The EBUSY signal is returned on attempts to write to the
- 		// memory.kmem.limit_in_bytes file if the cgroup has children or
-@@ -106,14 +106,12 @@ func setKernelMemory(path string, kernelMemoryLimit uint64) error {
- }
- 
- func setMemoryAndSwap(path string, cgroup *configs.Cgroup) error {
--	ulimited := -1
--
--	// If the memory update is set to uint64(-1) we should also
--	// set swap to uint64(-1), it means unlimited memory.
--	if cgroup.Resources.Memory == uint64(ulimited) {
--		// Only set swap if it's enbled in kernel
-+	// If the memory update is set to -1 we should also
-+	// set swap to -1, it means unlimited memory.
-+	if cgroup.Resources.Memory == -1 {
-+		// Only set swap if it's enabled in kernel
- 		if cgroups.PathExists(filepath.Join(path, cgroupMemorySwapLimit)) {
--			cgroup.Resources.MemorySwap = uint64(ulimited)
-+			cgroup.Resources.MemorySwap = -1
- 		}
- 	}
- 
-@@ -128,29 +126,29 @@ func setMemoryAndSwap(path string, cgroup *configs.Cgroup) error {
- 		// When update memory limit, we should adapt the write sequence
- 		// for memory and swap memory, so it won't fail because the new
- 		// value and the old value don't fit kernel's validation.
--		if cgroup.Resources.MemorySwap == uint64(ulimited) || memoryUsage.Limit < cgroup.Resources.MemorySwap {
--			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatUint(cgroup.Resources.MemorySwap, 10)); err != nil {
-+		if cgroup.Resources.MemorySwap == -1 || memoryUsage.Limit < uint64(cgroup.Resources.MemorySwap) {
-+			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatInt(cgroup.Resources.MemorySwap, 10)); err != nil {
- 				return err
- 			}
--			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatUint(cgroup.Resources.Memory, 10)); err != nil {
-+			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatInt(cgroup.Resources.Memory, 10)); err != nil {
- 				return err
- 			}
- 		} else {
--			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatUint(cgroup.Resources.Memory, 10)); err != nil {
-+			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatInt(cgroup.Resources.Memory, 10)); err != nil {
- 				return err
- 			}
--			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatUint(cgroup.Resources.MemorySwap, 10)); err != nil {
-+			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatInt(cgroup.Resources.MemorySwap, 10)); err != nil {
- 				return err
- 			}
- 		}
- 	} else {
- 		if cgroup.Resources.Memory != 0 {
--			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatUint(cgroup.Resources.Memory, 10)); err != nil {
-+			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatInt(cgroup.Resources.Memory, 10)); err != nil {
- 				return err
- 			}
- 		}
- 		if cgroup.Resources.MemorySwap != 0 {
--			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatUint(cgroup.Resources.MemorySwap, 10)); err != nil {
-+			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatInt(cgroup.Resources.MemorySwap, 10)); err != nil {
- 				return err
- 			}
- 		}
-@@ -171,13 +169,13 @@ func (s *MemoryGroup) Set(path string, cgroup *configs.Cgroup) error {
- 	}
- 
- 	if cgroup.Resources.MemoryReservation != 0 {
--		if err := writeFile(path, "memory.soft_limit_in_bytes", strconv.FormatUint(cgroup.Resources.MemoryReservation, 10)); err != nil {
-+		if err := writeFile(path, "memory.soft_limit_in_bytes", strconv.FormatInt(cgroup.Resources.MemoryReservation, 10)); err != nil {
- 			return err
- 		}
- 	}
- 
- 	if cgroup.Resources.KernelMemoryTCP != 0 {
--		if err := writeFile(path, "memory.kmem.tcp.limit_in_bytes", strconv.FormatUint(cgroup.Resources.KernelMemoryTCP, 10)); err != nil {
-+		if err := writeFile(path, "memory.kmem.tcp.limit_in_bytes", strconv.FormatInt(cgroup.Resources.KernelMemoryTCP, 10)); err != nil {
- 			return err
- 		}
- 	}
-diff --git a/libcontainer/configs/cgroup_linux.go b/libcontainer/configs/cgroup_linux.go
-index 3e0509de..e15a662f 100644
---- a/src/import/libcontainer/configs/cgroup_linux.go
-+++ b/src/import/libcontainer/configs/cgroup_linux.go
-@@ -43,19 +43,19 @@ type Resources struct {
- 	Devices []*Device `json:"devices"`
- 
- 	// Memory limit (in bytes)
--	Memory uint64 `json:"memory"`
-+	Memory int64 `json:"memory"`
- 
- 	// Memory reservation or soft_limit (in bytes)
--	MemoryReservation uint64 `json:"memory_reservation"`
-+	MemoryReservation int64 `json:"memory_reservation"`
- 
- 	// Total memory usage (memory + swap); set `-1` to enable unlimited swap
--	MemorySwap uint64 `json:"memory_swap"`
-+	MemorySwap int64 `json:"memory_swap"`
- 
- 	// Kernel memory limit (in bytes)
--	KernelMemory uint64 `json:"kernel_memory"`
-+	KernelMemory int64 `json:"kernel_memory"`
- 
- 	// Kernel memory limit for TCP use (in bytes)
--	KernelMemoryTCP uint64 `json:"kernel_memory_tcp"`
-+	KernelMemoryTCP int64 `json:"kernel_memory_tcp"`
- 
- 	// CPU shares (relative weight vs. other containers)
- 	CpuShares uint64 `json:"cpu_shares"`
-diff --git a/update.go b/update.go
-index 0ea90d60..133be999 100644
---- a/src/import/update.go
-+++ b/src/import/update.go
-@@ -124,11 +124,11 @@ other options are ignored.
- 
- 		r := specs.LinuxResources{
- 			Memory: &specs.LinuxMemory{
--				Limit:       u64Ptr(0),
--				Reservation: u64Ptr(0),
--				Swap:        u64Ptr(0),
--				Kernel:      u64Ptr(0),
--				KernelTCP:   u64Ptr(0),
-+				Limit:       i64Ptr(0),
-+				Reservation: i64Ptr(0),
-+				Swap:        i64Ptr(0),
-+				Kernel:      i64Ptr(0),
-+				KernelTCP:   i64Ptr(0),
- 			},
- 			CPU: &specs.LinuxCPU{
- 				Shares:          u64Ptr(0),
-@@ -213,7 +213,7 @@ other options are ignored.
- 			}
- 			for _, pair := range []struct {
- 				opt  string
--				dest *uint64
-+				dest *int64
- 			}{
- 				{"memory", r.Memory.Limit},
- 				{"memory-swap", r.Memory.Swap},
-@@ -232,7 +232,7 @@ other options are ignored.
- 					} else {
- 						v = -1
- 					}
--					*pair.dest = uint64(v)
-+					*pair.dest = v
- 				}
- 			}
- 			r.Pids.Limit = int64(context.Int("pids-limit"))
--- 
-2.11.0
-
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker_git.bb b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker_git.bb
index 9db48ee..81e5a5d 100644
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-docker_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker_git.bb
@@ -2,14 +2,11 @@
 
 # Note: this rev is before the required protocol field, update when all components
 #       have been updated to match.
-SRCREV_runc-docker = "9d6821d1b53908e249487741eccd567249ca1d99"
-SRC_URI = "git://github.com/docker/runc.git;nobranch=1;name=runc-docker \
-           file://0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch \
-           file://0002-Remove-Platform-as-no-longer-in-OCI-spec.patch \
-           file://0003-Update-memory-specs-to-use-int64-not-uint64.patch \
+SRCREV_runc-docker = "4fc53a81fb7c994640722ac585fa9ca548971871"
+SRC_URI = "git://github.com/opencontainers/runc;nobranch=1;name=runc-docker \
            file://0001-runc-Add-console-socket-dev-null.patch \
-           file://0001-Use-correct-go-cross-compiler.patch \
-           file://0001-Disable-building-recvtty.patch \
+           file://0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch \
+           file://0001-runc-docker-SIGUSR1-daemonize.patch \
           "
 
-RUNC_VERSION = "1.0.0-rc3"
+RUNC_VERSION = "1.0.0-rc5"
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers/0001-Use-correct-go-cross-compiler.patch b/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers/0001-Use-correct-go-cross-compiler.patch
deleted file mode 100644
index 67d7014..0000000
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers/0001-Use-correct-go-cross-compiler.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 621e5e9a196daaaf5eb430a413fe51218cf42c89 Mon Sep 17 00:00:00 2001
-From: Paul Barker <pbarker@toganlabs.com>
-Date: Wed, 4 Oct 2017 15:45:27 +0000
-Subject: [PATCH] Use correct go cross-compiler
-
-We need to use '${GO}' as set by OpenEmbedded instead of just 'go'. Just using
-'go' will invoke go-native.
-
-Signed-off-by: Paul Barker <pbarker@toganlabs.com>
-Upstream-status: Inappropriate
----
- Makefile | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 6781ac7..74e551d 100644
---- a/src/import/Makefile
-+++ b/src/import/Makefile
-@@ -27,18 +27,18 @@ SHELL := $(shell command -v bash 2>/dev/null)
- .DEFAULT: runc
- 
- runc: $(SOURCES)
--	go build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc .
-+	$(GO) build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc .
- 
- all: runc recvtty
- 
- recvtty: contrib/cmd/recvtty/recvtty
- 
- contrib/cmd/recvtty/recvtty: $(SOURCES)
--	go build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
-+	$(GO) build -i $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
- 
- static: $(SOURCES)
--	CGO_ENABLED=1 go build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc .
--	CGO_ENABLED=1 go build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
-+	CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc .
-+	CGO_ENABLED=1 $(GO) build -i $(EXTRA_FLAGS) -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
- 
- release:
- 	@flag_list=(seccomp selinux apparmor static); \
-@@ -62,15 +62,15 @@ release:
- 			CGO_ENABLED=1; \
- 		}; \
- 		echo "Building target: $$output"; \
--		go build -i $(EXTRA_FLAGS) -ldflags "$$ldflags $(EXTRA_LDFLAGS)" -tags "$$tags" -o "$$output" .; \
-+		$(GO) build -i $(EXTRA_FLAGS) -ldflags "$$ldflags $(EXTRA_LDFLAGS)" -tags "$$tags" -o "$$output" .; \
- 	done
- 
- dbuild: runcimage
- 	docker run --rm -v $(CURDIR):/go/src/$(PROJECT) --privileged $(RUNC_IMAGE) make clean all
- 
- lint:
--	go vet $(allpackages)
--	go fmt $(allpackages)
-+	$(GO) vet $(allpackages)
-+	$(GO) fmt $(allpackages)
- 
- man:
- 	man/md2man-all.sh
-@@ -88,7 +88,7 @@ unittest: runcimage
- 	docker run -e TESTFLAGS -t --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localunittest
- 
- localunittest: all
--	go test -timeout 3m -tags "$(BUILDTAGS)" ${TESTFLAGS} -v $(allpackages)
-+	$(GO) test -timeout 3m -tags "$(BUILDTAGS)" ${TESTFLAGS} -v $(allpackages)
- 
- integration: runcimage
- 	docker run -e TESTFLAGS -t --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localintegration
-@@ -133,10 +133,10 @@ clean:
- 
- validate:
- 	script/validate-gofmt
--	go vet $(allpackages)
-+	$(GO) vet $(allpackages)
- 
- ci: validate localtest
- 
- # memoize allpackages, so that it's executed only once and only if used
--_allpackages = $(shell go list ./... | grep -v vendor)
-+_allpackages = $(shell $(GO) list ./... | grep -v vendor)
- allpackages = $(if $(__allpackages),,$(eval __allpackages := $$(_allpackages)))$(__allpackages)
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb b/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb
index a97676b..ed48abf 100644
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb
@@ -1,8 +1,7 @@
 include runc.inc
 
-SRCREV = "2e7cfe036e2c6dc51ccca6eb7fa3ee6b63976dcd"
+SRCREV = "58415b4b12650291f435db8770cea48207b78afe"
 SRC_URI = " \
     git://github.com/opencontainers/runc;branch=master \
-    file://0001-Use-correct-go-cross-compiler.patch \
     "
-RUNC_VERSION = "1.0.0-rc4"
+RUNC_VERSION = "1.0.0-rc5"
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc.inc b/import-layers/meta-virtualization/recipes-containers/runc/runc.inc
index 0179103..9199cef 100644
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc.inc
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc.inc
@@ -11,6 +11,8 @@
 PV = "${RUNC_VERSION}+git${SRCPV}"
 
 inherit go
+inherit goarch
+
 RRECOMMENDS_${PN} = "lxc docker"
 PROVIDES += "virtual/runc"
 RPROVIDES_${PN} = "virtual/runc"
@@ -20,7 +22,7 @@
 LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
 
 do_configure[noexec] = "1"
-EXTRA_OEMAKE="BUILDTAGS=''"
+EXTRA_OEMAKE="BUILDTAGS='' GO=${GO}"
 
 do_compile() {
 	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
@@ -44,10 +46,12 @@
 	export CGO_ENABLED="1"
 	export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 	export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+	export GO=${GO}
+
 	export CFLAGS=""
 	export LDFLAGS=""
 
-        oe_runmake static
+	oe_runmake static
 }
 
 do_install() {
diff --git a/import-layers/meta-virtualization/recipes-core/busybox/busybox_%.bbappend b/import-layers/meta-virtualization/recipes-core/busybox/busybox_%.bbappend
index 8369a03..617cacc 100644
--- a/import-layers/meta-virtualization/recipes-core/busybox/busybox_%.bbappend
+++ b/import-layers/meta-virtualization/recipes-core/busybox/busybox_%.bbappend
@@ -1,10 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += " \
-	    file://lspci.cfg \
-	    file://lsusb.cfg \
-	    file://mdev.cfg \
-	    file://mount-cifs.cfg \
-	    file://ps-extras.cfg \
-	    file://getopt.cfg \
-           "
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-core/busybox/busybox_virtualization.inc b/import-layers/meta-virtualization/recipes-core/busybox/busybox_virtualization.inc
new file mode 100644
index 0000000..d9c4e67
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-core/busybox/busybox_virtualization.inc
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/busybox:"
+
+SRC_URI += " \
+	    file://lspci.cfg \
+	    file://lsusb.cfg \
+	    file://mdev.cfg \
+	    file://mount-cifs.cfg \
+	    file://ps-extras.cfg \
+	    file://getopt.cfg \
+           "
diff --git a/import-layers/meta-virtualization/recipes-core/runv/runv_git.bb b/import-layers/meta-virtualization/recipes-core/runv/runv_git.bb
index 5125d90..0301dd2 100644
--- a/import-layers/meta-virtualization/recipes-core/runv/runv_git.bb
+++ b/import-layers/meta-virtualization/recipes-core/runv/runv_git.bb
@@ -22,7 +22,7 @@
 PACKAGECONFIG[xen] = "--with-xen,--without-xen,"
 AUTOTOOLS_SCRIPT_PATH = "${S}/src/import/"
 
-RDEPENDS_${PN} += " qemu"
+RDEPENDS_${PN} += " qemu hyperstart"
 
 do_compile() {
 	export GOARCH="${TARGET_GOARCH}"
diff --git a/import-layers/meta-virtualization/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend b/import-layers/meta-virtualization/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
index 1b89aec..8c08832 100644
--- a/import-layers/meta-virtualization/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
+++ b/import-layers/meta-virtualization/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
@@ -1,6 +1 @@
-do_install_append() {
-	if echo "${DISTRO_FEATURES}" | grep -q 'xen'; then
-		echo "" >> ${D}${sysconfdir}/inittab
-		echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >> ${D}${sysconfdir}/inittab
-	fi
-}
+require ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'sysvinit-inittab_xen.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-core/sysvinit/sysvinit-inittab_xen.inc b/import-layers/meta-virtualization/recipes-core/sysvinit/sysvinit-inittab_xen.inc
new file mode 100644
index 0000000..9d0589c
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-core/sysvinit/sysvinit-inittab_xen.inc
@@ -0,0 +1,4 @@
+do_install_append() {
+                echo "" >> ${D}${sysconfdir}/inittab
+                echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >> ${D}${sysconfdir}/inittab
+}
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-blinker_1.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-blinker_1.3.bb
index 24e19b5..8abb9c0 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-blinker_1.3.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-blinker_1.3.bb
@@ -18,5 +18,7 @@
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit setuptools
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-gevent_1.0.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent_1.0.1.bb
index 5a97c8c..8cd1388 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-gevent_1.0.1.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent_1.0.1.bb
@@ -26,3 +26,5 @@
 do_configure_append() {
 	sed -i -e 's/^cross_compiling=no/cross_compiling=yes/' ${S}/libev/configure
 }
+
+DEFAULT_PREFERENCE = "-1"
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto_0.22.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto_0.22.3.bb
index 2c2625d..e151dcc 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto_0.22.3.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto_0.22.3.bb
@@ -22,6 +22,8 @@
 SRC_URI[md5sum] = "573f21aaac7d5c9549798e72ffcefedd"
 SRC_URI[sha256sum] = "6071bfc817d94723e9b458a010d565365104f84aa73f7fe11919871f7562ff72"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit setuptools pypi
 
 DEPENDS += "openssl swig-native"
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-pyyaml_3.11.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-pyyaml_3.11.bb
index cb1db8c..ecb1719 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-pyyaml_3.11.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-pyyaml_3.11.bb
@@ -25,6 +25,8 @@
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit setuptools
 
 DEPENDS += "libyaml python-cython-native"
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-redis_2.10.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-redis_2.10.3.bb
index 9eda8a5..2ef2b6b 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-redis_2.10.3.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-redis_2.10.3.bb
@@ -15,6 +15,8 @@
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit setuptools
 
 RDEPENDS_${PN} = "redis"
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.1.5.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.1.5.bb
index 63caeb4..f22d272 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.1.5.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.1.5.bb
@@ -13,4 +13,6 @@
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit setuptools
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-twisted.inc b/import-layers/meta-virtualization/recipes-devtools/python/python-twisted.inc
deleted file mode 100644
index d734e03..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-twisted.inc
+++ /dev/null
@@ -1,244 +0,0 @@
-DESCRIPTION = "Twisted is an event-driven networking framework written in Python and licensed under the LGPL. \
-Twisted supports TCP, UDP, SSL/TLS, multicast, Unix sockets, a large number of protocols                   \
-(including HTTP, NNTP, IMAP, SSH, IRC, FTP, and others), and much more."
-HOMEPAGE = "http://www.twistedmatrix.com"
-
-#twisted/topfiles/NEWS:655: - Relicensed: Now under the MIT license, rather than LGPL.
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5602d7228daf59a16f0f1b2640c46bca"
-
-SRC_URI[md5sum] = "83fe6c0c911cc1602dbffb036be0ba79"
-SRC_URI[sha256sum] = "095175638c019ac7c0604f4c291724a16ff1acd062e181b01293bf4dcbc62cf3"
-
-PYPI_PACKAGE = "Twisted"
-PYPI_PACKAGE_EXT = "tar.bz2"
-
-do_install_append() {
-    # remove some useless files before packaging
-    find ${D} \( -name "*.bat" -o -name "*.c" -o -name "*.h" \) -exec rm -f {} \;
-}
-
-PACKAGES += "\
-    ${PN}-zsh \
-    ${PN}-test \
-    ${PN}-protocols \
-    ${PN}-conch \
-    ${PN}-lore \
-    ${PN}-mail \
-    ${PN}-names \
-    ${PN}-news \
-    ${PN}-runner \
-    ${PN}-web \
-    ${PN}-words \
-    ${PN}-flow \
-    ${PN}-pair \
-    ${PN}-core \
-"
-
-PACKAGES =+ "\
-    ${PN}-src \
-    ${PN}-bin \
-"
-
-RDEPENDS_${PN} = "\
-    ${PN}-bin \
-    ${PN}-conch \
-    ${PN}-lore \
-    ${PN}-mail \
-    ${PN}-names \
-    ${PN}-news \
-    ${PN}-runner \
-    ${PN}-web \
-    ${PN}-words \
-"
-
-RDEPENDS_${PN}-core = "python-core python-zopeinterface python-contextlib"
-RDEPENDS_${PN}-test = "${PN}"
-RDEPENDS_${PN}-conch = "${PN}-core ${PN}-protocols"
-RDEPENDS_${PN}-lore = "${PN}-core"
-RDEPENDS_${PN}-mail = "${PN}-core ${PN}-protocols"
-RDEPENDS_${PN}-names = "${PN}-core"
-RDEPENDS_${PN}-news = "${PN}-core ${PN}-protocols"
-RDEPENDS_${PN}-runner = "${PN}-core ${PN}-protocols"
-RDEPENDS_${PN}-web += "${PN}-core ${PN}-protocols"
-RDEPENDS_${PN}-words += "${PN}-core"
-RDEPENDS_${PN}-flow += "${PN}-core"
-RDEPENDS_${PN}-pair += "${PN}-core"
-RDEPENDS_${PN}-dbg = "${PN}"
-
-ALLOW_EMPTY_${PN} = "1"
-FILES_${PN} = ""
-
-FILES_${PN}-test = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/test \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/*/test \
-"
-
-FILES_${PN}-protocols = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/protocols/*.py* \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/protocols/gps/ \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/protocols/mice/ \
-"
-
-FILES_${PN}-zsh = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/python/zsh \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/python/zshcomp.* \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/python/twisted-completion.zsh \
-"
-
-FILES_${PN}-conch = " \
-    ${bindir}/ckeygen \
-    ${bindir}/tkconch \
-    ${bindir}/conch \
-    ${bindir}/conchftp \
-    ${bindir}/cftp \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_conch.py* \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/conch  \
-"
-
-FILES_${PN}-core = " \
-${bindir}/manhole \
-${bindir}/mktap \
-${bindir}/twistd \
-${bindir}/tap2deb \
-${bindir}/tap2rpm \
-${bindir}/tapconvert \
-${bindir}/tkmktap \
-${bindir}/trial \
-${bindir}/easy_install* \
-${bindir}/pyhtmlizer \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/*.so \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/*.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__init__.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/notestplugin.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/testplugin.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_ftp.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_inet.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_manhole.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_portforward.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_socks.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_telnet.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_trial.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/dropin.cache \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/application \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/cred \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/enterprise \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/internet \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/manhole \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/manhole \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/persisted \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/protocols\
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python\
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/timeoutqueue.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/filepath.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/dxprofile.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/plugin.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/htmlizer.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/__init__.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/dispatch.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/hook.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/threadpool.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/otp.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/usage.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/roots.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/versions.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/urlpath.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/util.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/components.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/logfile.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/runtime.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/reflect.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/context.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/threadable.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/rebuild.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/failure.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/lockfile.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/formmethod.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/finalize.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/win32.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/dist.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/shortcut.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/zipstream.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/release.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/syslog.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/log.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/compat.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/zshcomp.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/procutils.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/text.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/_twisted_zsh_stub \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/scripts/ \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/spread/ \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/tap/ \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/trial/ \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/__init__.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/_version.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/copyright.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/im.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/*.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/python/*.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/*.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/topfiles \
-${libdir}/${PYTHON_DIR}/site-packages/Twisted*egg-info \
-"
-
-FILES_${PN}-lore = " \
-${bindir}/bookify \
-${bindir}/lore \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_lore.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/lore \
-"
-
-FILES_${PN}-mail = " \
-${bindir}/mailmail \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_mail.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/mail \
-"
-
-FILES_${PN}-names = " \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_names.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/names \
-"
-
-FILES_${PN}-news = " \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_news.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/news \
-"
-
-FILES_${PN}-runner = " \
-${libdir}/site-packages/twisted/runner/portmap.so \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/runner\
-"
-
-FILES_${PN}-web = " \
-${bindir}/websetroot \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_web.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/web\
-"
-
-FILES_${PN}-words = " \
-${bindir}/im \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_words.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/words\
-"
-
-FILES_${PN}-flow = " \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_flow.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/flow \"
-
-FILES_${PN}-pair = " \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/twisted_pair.py* \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/pair \
-"
-
-FILES_${PN}-dbg += " \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/*/.debug \
-${libdir}/${PYTHON_DIR}/site-packages/twisted/*/*/.debug \
-"
-
-RDEPENDS_{PN}-src = "${PN}"
-FILES_${PN}-src = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/*.py \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/*/*.py \
-    ${libdir}/${PYTHON_DIR}/site-packages/twisted/*/*/*.py \
-"
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.6.0.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.6.0.bb
deleted file mode 100644
index 71c74ff..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.6.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-DESCRIPTION = "WSGI request and response object"
-HOMEPAGE = "http://webob.org/"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://docs/license.txt;md5=8ed3584bcc78c16da363747ccabc5af5"
-
-PR = "r0"
-SRCNAME = "WebOb"
-
-SRC_URI = "http://pypi.python.org/packages/source/W/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "089d7fc6745f175737800237c7287802"
-SRC_URI[sha256sum] = "63d262d8f61b516321f786879c9277fa2209f7f57eb47b537eeecfea383d55b7"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} += " \
-	python-sphinx \
-	python-nose \
-	"
-
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.7.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.7.3.bb
new file mode 100644
index 0000000..a2448be
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.7.3.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "WSGI request and response object"
+HOMEPAGE = "http://webob.org/"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://docs/license.txt;md5=8ed3584bcc78c16da363747ccabc5af5"
+
+PYPI_PACKAGE = "WebOb"
+
+SRC_URI[md5sum] = "350028baffc508e3d23c078118e35316"
+SRC_URI[sha256sum] = "e65ca14b9f5ae5b031988ffc93f8b7f305ddfcf17a4c774ae0db47bcb3b87283"
+
+inherit setuptools pypi
+
+RDEPENDS_${PN} += " \
+	python-sphinx \
+	python-nose \
+	"
+
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-websocket-client.inc b/import-layers/meta-virtualization/recipes-devtools/python/python-websocket-client.inc
new file mode 100644
index 0000000..31778c6
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-websocket-client.inc
@@ -0,0 +1,11 @@
+SUMMARY = "WebSocket client for python. hybi13 is supported."
+HOMEPAGE = "https://github.com/websocket-client/websocket-client.git"
+LICENSE = "LGPL-3.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=18b09a20dd186af4fd60f1a08311628c"
+
+inherit pypi
+
+PYPI_PACKAGE = "websocket_client"
+
+SRC_URI[md5sum] = "73d87aa16a2212da448b30aca9c5bf3b"
+SRC_URI[sha256sum] = "15f585566e2ea7459136a632b9785aa081093064391878a448c382415e948d72"
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-websocket-client_0.44.0.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-websocket-client_0.44.0.bb
new file mode 100644
index 0000000..11eeb04
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-websocket-client_0.44.0.bb
@@ -0,0 +1,2 @@
+require python-websocket-client.inc
+inherit setuptools
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-werkzeug_0.10.4.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-werkzeug_0.10.4.bb
index 763e5b9..5f3e01f 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-werkzeug_0.10.4.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-werkzeug_0.10.4.bb
@@ -14,6 +14,8 @@
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit setuptools
 
 RDEPENDS_${PN} += "python-io \
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python3-dockerpty_0.4.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python3-dockerpty_0.4.1.bb
index a40f2a3..31a864a 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python3-dockerpty_0.4.1.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python3-dockerpty_0.4.1.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Python library to use the pseudo-tty of a docker container"
 HOMEPAGE = "https://github.com/d11wtq/dockerpty"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=afaf767baa20ac524dc12f1071ca493a"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
 inherit pypi setuptools3
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python3-twisted_13.2.0.bb b/import-layers/meta-virtualization/recipes-devtools/python/python3-twisted_13.2.0.bb
deleted file mode 100644
index 98016cc..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/python/python3-twisted_13.2.0.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-inherit pypi setuptools3
-require python-twisted.inc
-
-RDEPENDS_${PN}-core = "python3-core python3-zopeinterface python3-lang"
-
-FILES_${PN}-core_append += " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/__pycache__ \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/python/__pycache__/*pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/__init__*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/notestplugin*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/testplugin*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_ftp*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_inet*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_manhole*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_portforward*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_socks*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_telnet*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_trial*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_core*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_qtstub*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_reactors*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/cred*.pyc \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/dropin*.cache \
-"
-
-FILES_${PN}-names_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_names*.pyc \
-"
-
-FILES_${PN}-news_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_news*.pyc \
-"
-
-FILES_${PN}-protocols_append += " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/protocols/__pycache__/*pyc \
-"
-
-FILES_${PN}-conch_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_conch*.pyc \
-"
-
-FILES_${PN}-lore_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_lore*.pyc \
-"
-FILES_${PN}-mail_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_mail*.pyc \
-"
-
-FILES_${PN}-web_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_web*.pyc \
-"
-
-FILES_${PN}-words_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_words*.pyc \
-"
-
-FILES_${PN}-flow_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_flow*.pyc \
-"
-
-FILES_${PN}-pair_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_pair*.pyc \
-"
-
-FILES_${PN}-runner_append = " \
-  ${libdir}/${PYTHON_DIR}/site-packages/twisted/plugins/__pycache__/twisted_runner*.pyc \
-"
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python3-websocket-client_0.44.0.bb b/import-layers/meta-virtualization/recipes-devtools/python/python3-websocket-client_0.44.0.bb
index 8dfc95f..473e31f 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python3-websocket-client_0.44.0.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python3-websocket-client_0.44.0.bb
@@ -1,11 +1,2 @@
-SUMMARY = "WebSocket client for python. hybi13 is supported."
-HOMEPAGE = "https://github.com/websocket-client/websocket-client.git"
-LICENSE = "LGPL-3.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=18b09a20dd186af4fd60f1a08311628c"
-
-inherit pypi setuptools3
-
-PYPI_PACKAGE = "websocket_client"
-
-SRC_URI[md5sum] = "73d87aa16a2212da448b30aca9c5bf3b"
-SRC_URI[sha256sum] = "15f585566e2ea7459136a632b9785aa081093064391878a448c382415e948d72"
+require python-websocket-client.inc
+inherit setuptools3
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-extended/hyperstart/hyperstart_git.bb b/import-layers/meta-virtualization/recipes-extended/hyperstart/hyperstart_git.bb
new file mode 100644
index 0000000..0297477
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/hyperstart/hyperstart_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "The tiny Init service for HyperContainer"
+DESCRIPTION = "The init Task for HyperContainer"
+
+LICENSE = "Apache-2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit autotools-brokensep 
+
+SRC_URI = "git://github.com/hyperhq/hyperstart.git"
+
+SRCREV = "ad48a3230836f59ada163659cde151a37522068b"
+PV = "v0.2+git${SRCREV}"
+
+S = "${WORKDIR}/git"
+
+CACHED_CONFIGUREVARS = "ac_cv_file__usr_include_linux_vm_sockets_h=true"
+
+do_install() {
+	install -d ${D}/var/lib/hyper/
+
+        install -m644 ${S}/build/hyper-initrd.img ${D}/var/lib/hyper/
+        install -m644 ${S}/build/arch/x86_64/kernel ${D}/var/lib/hyper/
+}
+
+FILES_${PN} += "/var/lib/hyper"
diff --git a/import-layers/meta-virtualization/recipes-extended/images/kvm-image-minimal.bb b/import-layers/meta-virtualization/recipes-extended/images/kvm-image-minimal.bb
index c96edca..b28cc30 100644
--- a/import-layers/meta-virtualization/recipes-extended/images/kvm-image-minimal.bb
+++ b/import-layers/meta-virtualization/recipes-extended/images/kvm-image-minimal.bb
@@ -2,7 +2,6 @@
 
 IMAGE_INSTALL = " \
     packagegroup-core-boot \
-    ${ROOTFS_PKGMANAGE_BOOTSTRAP} \
     qemu \
     libvirt \
     libvirt-libvirtd \
diff --git a/import-layers/meta-virtualization/recipes-extended/iptables/iptables-meta-virtualization.inc b/import-layers/meta-virtualization/recipes-extended/iptables/iptables-meta-virtualization.inc
new file mode 100644
index 0000000..8fd521c
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/iptables/iptables-meta-virtualization.inc
@@ -0,0 +1,19 @@
+RRECOMMENDS_${PN} += "kernel-module-ip6-tables \
+                      kernel-module-ip-tables \
+                      kernel-module-ip6table-filter \
+                      kernel-module-iptable-filter \
+                      kernel-module-ip6table-raw \
+                      kernel-module-iptable-raw \
+                      kernel-module-ip6table-nat \
+                      kernel-module-iptable-nat \
+                      kernel-module-ip6table-mangle \
+                      kernel-module-iptable-magle \
+                      kernel-module-ip6table-security \
+                      kernel-module-iptable-security \
+                      kernel-module-ipt-reject \
+                      kernel-module-iptable-mangle \
+                      kernel-module-xt-checksum \
+                      kernel-module-xt-conntrack \
+                      kernel-module-xt-state \
+                      kernel-module-xt-tcpudp \
+                      "
diff --git a/import-layers/meta-virtualization/recipes-extended/iptables/iptables_1.%.bbappend b/import-layers/meta-virtualization/recipes-extended/iptables/iptables_1.%.bbappend
index 52a4c4f..9a15e60 100644
--- a/import-layers/meta-virtualization/recipes-extended/iptables/iptables_1.%.bbappend
+++ b/import-layers/meta-virtualization/recipes-extended/iptables/iptables_1.%.bbappend
@@ -1,8 +1 @@
-RRECOMMENDS_${PN} += "kernel-module-ip6-tables \
-                      kernel-module-ip6table-filter \
-                      kernel-module-xt-tcpudp \
-                      kernel-module-ipt-reject \
-                      kernel-module-iptable-mangle \
-                      kernel-module-xt-checksum \
-                      kernel-module-xt-state \
-                      "
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}-meta-virtualization.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/add-initscript.patch b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/add-initscript.patch
index 46a75a8..b0e608e 100644
--- a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/add-initscript.patch
+++ b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/add-initscript.patch
@@ -1,14 +1,23 @@
-irqbalance: add basic init script
+From 80c45eecc193c6c13430ddeb40b9b0fd1841ceee Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Thu, 14 Mar 2013 23:31:38 -0700
+Subject: [PATCH] irqbalance: add basic init script
 
 The upstream irqbalance release package does not contain an
 init script so we create a basic one here.
 
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
-Index: irqbalance-0.56/irqbalance.init
-===================================================================
+ irqbalance.init | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+ create mode 100644 irqbalance.init
+
+diff --git a/irqbalance.init b/irqbalance.init
+new file mode 100644
+index 0000000..d12d62c
 --- /dev/null
-+++ irqbalance-0.56/irqbalance.init
++++ b/irqbalance.init
 @@ -0,0 +1,35 @@
 +#!/bin/sh
 +#
diff --git a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/fix-configure-libcap-ng.patch b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/fix-configure-libcap-ng.patch
index 5be5243..fb22d7a 100644
--- a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/fix-configure-libcap-ng.patch
+++ b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/fix-configure-libcap-ng.patch
@@ -1,17 +1,22 @@
+From 20a1b2ff2e6d80924824983c363c80f66e05c0d0 Mon Sep 17 00:00:00 2001
+From: Ming Liu <ming.liu@windriver.com>
+Date: Sun, 6 Sep 2015 14:43:24 +0800
 Subject: [PATCH] grasp withval for libcap-ng
 
 Upstream-Status: Pending
 
 Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
 ---
- configure.ac |    5 ++++-
+ configure.ac | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
 
-diff -urpN a/configure.ac b/configure.ac
+diff --git a/configure.ac b/configure.ac
+index 38a1bee..95f1488 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -61,7 +61,10 @@ AS_IF(
- AM_CONDITIONAL([LOCAL_GLIB], [test "x$local_glib2" = "xyes"])
+@@ -62,7 +62,10 @@ AS_IF(
+ ])
  
  AC_ARG_WITH([libcap-ng],
 -  AS_HELP_STRING([libcap-ng], [Add libcap-ng-support @<:@default=auto@:>@]))
diff --git a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch
index d853d0b..ec01448 100644
--- a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch
+++ b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch
@@ -1,4 +1,4 @@
-From dc7366896dd5a5bae82be4b11530bc9fdb7cbcdd Mon Sep 17 00:00:00 2001
+From 9a16da2628cc4fddf37fe0368b4f6424270f0b2d Mon Sep 17 00:00:00 2001
 From: Yang Shi <yang.shi@windriver.com>
 Date: Mon, 26 Aug 2013 10:58:02 -0700
 Subject: [PATCH] irqbalance: Add status and reload commands
@@ -6,9 +6,10 @@
 Add status and reload commands for irqbalanced init script
 
 Signed-off-by: Yang Shi <yang.shi@windriver.com>
+
 ---
- irqbalance.init |   12 +++++++++---
- 1 files changed, 9 insertions(+), 3 deletions(-)
+ irqbalance.init | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/irqbalance.init b/irqbalance.init
 index d12d62c..f58bf55 100644
@@ -50,6 +51,3 @@
  	exit 1
  	;;
  esac
--- 
-1.7.5.4
-
diff --git a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance_1.1.0.bb b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance_1.1.0.bb
deleted file mode 100644
index 16efa95..0000000
--- a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance_1.1.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2015 Wind River Systems, Inc.
-#
-
-require irqbalance.inc
-
-SRC_URI[md5sum] = "b15d975336080bcac4be0c1752d43cf3"
-SRC_URI[sha256sum] = "91506e638b03bf27cf5da7dc250d58a753ce8a0288a20265fc7ff0266040706b"
-
-SRC_URI = "https://github.com/Irqbalance/irqbalance/archive/v${PV}.tar.gz;downloadfilename=irqbalance-${PV}.tar.gz \
-           file://add-initscript.patch \
-           file://irqbalance-Add-status-and-reload-commands.patch \
-           file://fix-configure-libcap-ng.patch \
-           file://irqbalanced.service \
-          "
diff --git a/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance_1.3.0.bb b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance_1.3.0.bb
new file mode 100644
index 0000000..5581a8b
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance_1.3.0.bb
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2015 Wind River Systems, Inc.
+#
+
+require irqbalance.inc
+
+SRC_URI[md5sum] = "53ee393adcfbc8e5ab23cbbd920df687"
+SRC_URI[sha256sum] = "41c2c0842d8fb24240d8069b389cd8d1669625a40009a17ad886967845dc6e43"
+
+SRC_URI = "https://github.com/Irqbalance/irqbalance/archive/v${PV}.tar.gz;downloadfilename=irqbalance-${PV}.tar.gz \
+           file://add-initscript.patch \
+           file://irqbalance-Add-status-and-reload-commands.patch \
+           file://fix-configure-libcap-ng.patch \
+           file://irqbalanced.service \
+          "
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/Makefiles-Add-more-XDR_CFLAGS-as-needed.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/Makefiles-Add-more-XDR_CFLAGS-as-needed.patch
new file mode 100644
index 0000000..826cdd0
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/Makefiles-Add-more-XDR_CFLAGS-as-needed.patch
@@ -0,0 +1,62 @@
+From dcfc263db9e69e5381cb511c51836271dec577a3 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Thu, 10 May 2018 13:27:47 -0400
+Subject: [PATCH] Makefiles: Add more $XDR_CFLAGS as needed
+
+When building with libtirpc instead of libc-xdr the include search
+path needs to be used. In several places this was missing and it was
+only looking in /usr/include and failing.
+
+Upstream-Status: Inappropriate [old release]
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ src/Makefile.am   | 5 +++--
+ tests/Makefile.am | 1 +
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index e9ce941..38114b7 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1157,7 +1157,7 @@ libvirt_la_BUILT_LIBADD += libvirt_driver.la
+ libvirt_driver_la_SOURCES = $(DRIVER_SOURCES)
+ 
+ libvirt_driver_la_CFLAGS = \
+-		$(GNUTLS_CFLAGS) $(CURL_CFLAGS) \
++		$(GNUTLS_CFLAGS) $(CURL_CFLAGS) $(XDR_CFLAGS) \
+ 		-I$(srcdir)/conf $(AM_CFLAGS)
+ libvirt_driver_la_LIBADD = \
+ 		$(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)
+@@ -1348,6 +1348,7 @@ endif ! WITH_DRIVER_MODULES
+ 
+ libvirt_driver_qemu_impl_la_CFLAGS = \
+ 		$(GNUTLS_CFLAGS) \
++		$(XDR_CFLAGS) \
+ 		$(LIBNL_CFLAGS) \
+ 		-I$(srcdir)/access \
+ 		-I$(srcdir)/conf \
+@@ -2306,7 +2307,7 @@ libvirt_lxc_la_LDFLAGS = \
+ 		$(CYGWIN_EXTRA_LDFLAGS) \
+ 		$(MINGW_EXTRA_LDFLAGS) \
+ 		$(NULL)
+-libvirt_lxc_la_CFLAGS = $(AM_CFLAGS)
++libvirt_lxc_la_CFLAGS = $(AM_CFLAGS) $(XDR_CFLAGS)
+ libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
+ 
+ # Since virt-login-shell will be setuid, we must do everything
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 2f8b9eb..aec9a3e 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -48,6 +48,7 @@ AM_CFLAGS = \
+ 	$(APPARMOR_CFLAGS) \
+ 	$(YAJL_CFLAGS) \
+ 	$(COVERAGE_CFLAGS) \
++	$(XDR_CFLAGS) \
+ 	$(WARN_CFLAGS)
+ 
+ AM_LDFLAGS = \
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch
new file mode 100644
index 0000000..edbadb6
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch
@@ -0,0 +1,36 @@
+From f10477f0fe5e4b7487a4a41faa216d10cd2bc7c3 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Thu, 10 May 2018 12:05:04 -0400
+Subject: [PATCH] configure.ac: search for rpc/rpc.h in the sysroot
+
+We want to avoid host contamination and use the sysroot as the base
+directory for our search so add the '=' the the '-I' when searching
+for libtirpc's rpc.h header.
+
+Upstream-Status: Inappropriate [old release]
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5a6408c..6c19f6d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -705,10 +705,10 @@ if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then
+     dnl check for cygwin's variation in xdr function names
+     AC_CHECK_FUNCS([xdr_u_int64_t],[],[],[#include <rpc/xdr.h>])
+ 
+-    dnl Cygwin/recent glibc requires -I/usr/include/tirpc for <rpc/rpc.h>
++    dnl Cygwin/recent glibc requires -I=/usr/include/tirpc for <rpc/rpc.h>
+     old_CFLAGS=$CFLAGS
+     AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [
+-      for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do
++      for add_CFLAGS in '' '-I=/usr/include/tirpc' 'missing'; do
+         if test x"$add_CFLAGS" = xmissing; then
+           lv_cv_xdr_cflags=missing; break
+         fi
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/dnsmasq.conf b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/dnsmasq.conf
new file mode 100644
index 0000000..a7c3059
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/dnsmasq.conf
@@ -0,0 +1,2 @@
+bind-interfaces
+except-interface=virbr0
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt_1.3.5.bb b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt_1.3.5.bb
index 8ed2505..35fd577 100644
--- a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt_1.3.5.bb
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt_1.3.5.bb
@@ -7,7 +7,7 @@
 SECTION = "console/tools"
 
 DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
-	   iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper \
+	   iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper libtirpc \
 	   ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)}"
 
 # libvirt-guests.sh needs gettext.sh
@@ -27,6 +27,7 @@
            file://tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch \
            file://libvirtd.sh \
            file://libvirtd.conf \
+           file://dnsmasq.conf \
            file://runptest.patch \
            file://run-ptest \
            file://tests-allow-separated-src-and-build-dirs.patch \
@@ -39,6 +40,8 @@
            file://0001-ptest-add-missing-test_helper-files.patch \
            file://0001-ptest-Remove-Windows-1252-check-from-esxutilstest.patch \
 	   file://0001-Added-configure-variable-for-placing-systemd-untis-l.patch \
+	   file://configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch \
+	   file://Makefiles-Add-more-XDR_CFLAGS-as-needed.patch \
           "
 
 SRC_URI[libvirt.md5sum] = "f9dc1e63d559eca50ae0ee798a4c6c6d"
@@ -219,6 +222,7 @@
 do_install_append() {
 	install -d ${D}/etc/init.d
 	install -d ${D}/etc/libvirt
+	install -d ${D}/etc/dnsmasq.d
 
 	install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd
 	install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf
@@ -266,6 +270,10 @@
 	# Add hook support for libvirt
 	mkdir -p ${D}/etc/libvirt/hooks
 
+	# Force the main dnsmasq instance to bind only to specified interfaces and
+	# to not bind to virbr0. Libvirt will run its own instance on this interface.
+	install -m 644 ${WORKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon
+
 	# remove .la references to our working diretory
 	for i in `find ${D}${libdir} -type f -name *.la`; do
 	    sed -i -e 's#-L${B}/src/.libs##g' $i
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch
new file mode 100644
index 0000000..ad9524a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch
@@ -0,0 +1,176 @@
+From ad208b8b7e45fb2b7c572b86c61c26412609e82d Mon Sep 17 00:00:00 2001
+From: George Dunlap <george.dunlap@citrix.com>
+Date: Fri, 10 Nov 2017 16:53:54 +0000
+Subject: [PATCH 1/2] p2m: Always check to see if removing a p2m entry actually
+ worked
+
+The PoD zero-check functions speculatively remove memory from the p2m,
+then check to see if it's completely zeroed, before putting it in the
+cache.
+
+Unfortunately, the p2m_set_entry() calls may fail if the underlying
+pagetable structure needs to change and the domain has exhausted its
+p2m memory pool: for instance, if we're removing a 2MiB region out of
+a 1GiB entry (in the p2m_pod_zero_check_superpage() case), or a 4k
+region out of a 2MiB or larger entry (in the p2m_pod_zero_check()
+case); and the return value is not checked.
+
+The underlying mfn will then be added into the PoD cache, and at some
+point mapped into another location in the p2m.  If the guest
+afterwards ballons out this memory, it will be freed to the hypervisor
+and potentially reused by another domain, in spite of the fact that
+the original domain still has writable mappings to it.
+
+There are several places where p2m_set_entry() shouldn't be able to
+fail, as it is guaranteed to write an entry of the same order that
+succeeded before.  Add a backstop of crashing the domain just in case,
+and an ASSERT_UNREACHABLE() to flag up the broken assumption on debug
+builds.
+
+While we're here, use PAGE_ORDER_2M rather than a magic constant.
+
+This is part of XSA-247.
+
+Reported-by: George Dunlap <george.dunlap.com>
+Signed-off-by: George Dunlap <george.dunlap@citrix.com>
+Reviewed-by: Jan Beulich <jbeulich@suse.com>
+---
+v4:
+- Removed some training whitespace
+v3:
+- Reformat reset clause to be more compact
+- Make sure to set map[i] = NULL when unmapping in case we need to bail
+v2:
+- Crash a domain if a p2m_set_entry we think cannot fail fails anyway.
+---
+ xen/arch/x86/mm/p2m-pod.c | 77 +++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 61 insertions(+), 16 deletions(-)
+
+diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
+index 730a48f928..f2ed751892 100644
+--- a/xen/arch/x86/mm/p2m-pod.c
++++ b/xen/arch/x86/mm/p2m-pod.c
+@@ -752,8 +752,10 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn)
+     }
+ 
+     /* Try to remove the page, restoring old mapping if it fails. */
+-    p2m_set_entry(p2m, gfn, INVALID_MFN, PAGE_ORDER_2M,
+-                  p2m_populate_on_demand, p2m->default_access);
++    if ( p2m_set_entry(p2m, gfn, INVALID_MFN, PAGE_ORDER_2M,
++                       p2m_populate_on_demand, p2m->default_access) )
++        goto out;
++
+     p2m_tlb_flush_sync(p2m);
+ 
+     /* Make none of the MFNs are used elsewhere... for example, mapped
+@@ -810,9 +812,18 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn)
+     ret = SUPERPAGE_PAGES;
+ 
+ out_reset:
+-    if ( reset )
+-        p2m_set_entry(p2m, gfn, mfn0, 9, type0, p2m->default_access);
+-    
++    /*
++     * This p2m_set_entry() call shouldn't be able to fail, since the same order
++     * on the same gfn succeeded above.  If that turns out to be false, crashing
++     * the domain should be the safest way of making sure we don't leak memory.
++     */
++    if ( reset && p2m_set_entry(p2m, gfn, mfn0, PAGE_ORDER_2M,
++                                type0, p2m->default_access) )
++    {
++        ASSERT_UNREACHABLE();
++        domain_crash(d);
++    }
++
+ out:
+     gfn_unlock(p2m, gfn, SUPERPAGE_ORDER);
+     return ret;
+@@ -869,19 +880,30 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
+         }
+ 
+         /* Try to remove the page, restoring old mapping if it fails. */
+-        p2m_set_entry(p2m, gfns[i], INVALID_MFN, PAGE_ORDER_4K,
+-                      p2m_populate_on_demand, p2m->default_access);
++        if ( p2m_set_entry(p2m, gfns[i], INVALID_MFN, PAGE_ORDER_4K,
++                           p2m_populate_on_demand, p2m->default_access) )
++            goto skip;
+ 
+         /* See if the page was successfully unmapped.  (Allow one refcount
+          * for being allocated to a domain.) */
+         if ( (mfn_to_page(mfns[i])->count_info & PGC_count_mask) > 1 )
+         {
++            /*
++             * If the previous p2m_set_entry call succeeded, this one shouldn't
++             * be able to fail.  If it does, crashing the domain should be safe.
++             */
++            if ( p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
++                               types[i], p2m->default_access) )
++            {
++                ASSERT_UNREACHABLE();
++                domain_crash(d);
++                goto out_unmap;
++            }
++
++        skip:
+             unmap_domain_page(map[i]);
+             map[i] = NULL;
+ 
+-            p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
+-                types[i], p2m->default_access);
+-
+             continue;
+         }
+     }
+@@ -900,12 +922,25 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
+ 
+         unmap_domain_page(map[i]);
+ 
+-        /* See comment in p2m_pod_zero_check_superpage() re gnttab
+-         * check timing.  */
+-        if ( j < PAGE_SIZE/sizeof(*map[i]) )
++        map[i] = NULL;
++
++        /*
++         * See comment in p2m_pod_zero_check_superpage() re gnttab
++         * check timing.
++         */
++        if ( j < (PAGE_SIZE / sizeof(*map[i])) )
+         {
+-            p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
+-                types[i], p2m->default_access);
++            /*
++             * If the previous p2m_set_entry call succeeded, this one shouldn't
++             * be able to fail.  If it does, crashing the domain should be safe.
++             */
++            if ( p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
++                               types[i], p2m->default_access) )
++            {
++                ASSERT_UNREACHABLE();
++                domain_crash(d);
++                goto out_unmap;
++            }
+         }
+         else
+         {
+@@ -929,7 +964,17 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
+             p2m->pod.entry_count++;
+         }
+     }
+-    
++
++    return;
++
++out_unmap:
++    /*
++     * Something went wrong, probably crashing the domain.  Unmap
++     * everything and return.
++     */
++    for ( i = 0; i < count; i++ )
++        if ( map[i] )
++            unmap_domain_page(map[i]);
+ }
+ 
+ #define POD_SWEEP_LIMIT 1024
+-- 
+2.15.0
+
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch
new file mode 100644
index 0000000..8c850bd
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch
@@ -0,0 +1,109 @@
+From d4bc7833707351a5341a6bdf04c752a028d9560d Mon Sep 17 00:00:00 2001
+From: George Dunlap <george.dunlap@citrix.com>
+Date: Fri, 10 Nov 2017 16:53:55 +0000
+Subject: [PATCH 2/2] p2m: Check return value of p2m_set_entry() when
+ decreasing reservation
+
+If the entire range specified to p2m_pod_decrease_reservation() is marked
+populate-on-demand, then it will make a single p2m_set_entry() call,
+reducing its PoD entry count.
+
+Unfortunately, in the right circumstances, this p2m_set_entry() call
+may fail.  It that case, repeated calls to decrease_reservation() may
+cause p2m->pod.entry_count to fall below zero, potentially tripping
+over BUG_ON()s to the contrary.
+
+Instead, check to see if the entry succeeded, and return false if not.
+The caller will then call guest_remove_page() on the gfns, which will
+return -EINVAL upon finding no valid memory there to return.
+
+Unfortunately if the order > 0, the entry may have partially changed.
+A domain_crash() is probably the safest thing in that case.
+
+Other p2m_set_entry() calls in the same function should be fine,
+because they are writing the entry at its current order.  Nonetheless,
+check the return value and crash if our assumption turns otu to be
+wrong.
+
+This is part of XSA-247.
+
+Reported-by: George Dunlap <george.dunlap.com>
+Signed-off-by: George Dunlap <george.dunlap@citrix.com>
+Reviewed-by: Jan Beulich <jbeulich@suse.com>
+---
+v2: Crash the domain if we're not sure it's safe (or if we think it
+can't happen)
+---
+ xen/arch/x86/mm/p2m-pod.c | 42 +++++++++++++++++++++++++++++++++---------
+ 1 file changed, 33 insertions(+), 9 deletions(-)
+
+diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
+index f2ed751892..473d6a6dbf 100644
+--- a/xen/arch/x86/mm/p2m-pod.c
++++ b/xen/arch/x86/mm/p2m-pod.c
+@@ -555,11 +555,23 @@ p2m_pod_decrease_reservation(struct domain *d,
+ 
+     if ( !nonpod )
+     {
+-        /* All PoD: Mark the whole region invalid and tell caller
+-         * we're done. */
+-        p2m_set_entry(p2m, gpfn, INVALID_MFN, order, p2m_invalid,
+-                      p2m->default_access);
+-        p2m->pod.entry_count-=(1<<order);
++        /*
++         * All PoD: Mark the whole region invalid and tell caller
++         * we're done.
++         */
++        if ( p2m_set_entry(p2m, gpfn, INVALID_MFN, order, p2m_invalid,
++                           p2m->default_access) )
++        {
++            /*
++             * If this fails, we can't tell how much of the range was changed.
++             * Best to crash the domain unless we're sure a partial change is
++             * impossible.
++             */
++            if ( order != 0 )
++                domain_crash(d);
++            goto out_unlock;
++        }
++        p2m->pod.entry_count -= 1UL << order;
+         BUG_ON(p2m->pod.entry_count < 0);
+         ret = 1;
+         goto out_entry_check;
+@@ -600,8 +612,14 @@ p2m_pod_decrease_reservation(struct domain *d,
+         n = 1UL << cur_order;
+         if ( t == p2m_populate_on_demand )
+         {
+-            p2m_set_entry(p2m, gpfn + i, INVALID_MFN, cur_order,
+-                          p2m_invalid, p2m->default_access);
++            /* This shouldn't be able to fail */
++            if ( p2m_set_entry(p2m, gpfn + i, INVALID_MFN, cur_order,
++                               p2m_invalid, p2m->default_access) )
++            {
++                ASSERT_UNREACHABLE();
++                domain_crash(d);
++                goto out_unlock;
++            }
+             p2m->pod.entry_count -= n;
+             BUG_ON(p2m->pod.entry_count < 0);
+             pod -= n;
+@@ -622,8 +640,14 @@ p2m_pod_decrease_reservation(struct domain *d,
+ 
+             page = mfn_to_page(mfn);
+ 
+-            p2m_set_entry(p2m, gpfn + i, INVALID_MFN, cur_order,
+-                          p2m_invalid, p2m->default_access);
++            /* This shouldn't be able to fail */
++            if ( p2m_set_entry(p2m, gpfn + i, INVALID_MFN, cur_order,
++                               p2m_invalid, p2m->default_access) )
++            {
++                ASSERT_UNREACHABLE();
++                domain_crash(d);
++                goto out_unlock;
++            }
+             p2m_tlb_flush_sync(p2m);
+             for ( j = 0; j < n; ++j )
+                 set_gpfn_from_mfn(mfn_x(mfn), INVALID_M2P_ENTRY);
+-- 
+2.15.0
+
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/fix-libxc-xc_dom_arm-missing-initialization.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/fix-libxc-xc_dom_arm-missing-initialization.patch
deleted file mode 100644
index 05016a7..0000000
--- a/import-layers/meta-virtualization/recipes-extended/xen/files/fix-libxc-xc_dom_arm-missing-initialization.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-commit 88bfbf90e35f1213f9967a97dee0b2039f9998a4
-Author: Bernd Kuhls <bernd.kuhls@t-online.de>
-Date:   Sat Aug 19 16:21:42 2017 +0200
-
-    tools/libxc/xc_dom_arm: add missing variable initialization
-    
-    The variable domctl.u.address_size.size may remain uninitialized if
-    guest_type is not one of xen-3.0-aarch64 or xen-3.0-armv7l. And the
-    code precisely checks if this variable is still 0 to decide if the
-    guest type is supported or not.
-    
-    This fixes the following build failure with gcc 7.x:
-    
-    xc_dom_arm.c:229:31: error: 'domctl.u.address_size.size' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-         if ( domctl.u.address_size.size == 0 )
-    
-    Patch originally taken from
-    https://www.mail-archive.com/xen-devel@lists.xen.org/msg109313.html.
-    
-    Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-    Acked-by: Wei Liu <wei.liu2@citrix.com>
-
-diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
-index e7d4bd0..e669fb0 100644
---- a/tools/libxc/xc_dom_arm.c
-+++ b/tools/libxc/xc_dom_arm.c
-@@ -223,6 +223,8 @@ static int set_mode(xc_interface *xch, domid_t domid, char *guest_type)
- 
-     domctl.domain = domid;
-     domctl.cmd    = XEN_DOMCTL_set_address_size;
-+    domctl.u.address_size.size = 0;
-+
-     for ( i = 0; i < ARRAY_SIZE(types); i++ )
-         if ( !strcmp(types[i].guest, guest_type) )
-             domctl.u.address_size.size = types[i].size;
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/lwip.dhcp_create_request-hwaddr_len.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/lwip.dhcp_create_request-hwaddr_len.patch
new file mode 100644
index 0000000..4bbf21a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/lwip.dhcp_create_request-hwaddr_len.patch
@@ -0,0 +1,13 @@
+Index: src/core/dhcp.c
+===================================================================
+--- a/src/core/dhcp.c
++++ b/src/core/dhcp.c
+@@ -1356,7 +1358,7 @@ dhcp_create_request(struct netif *netif)
+   dhcp->msg_out->giaddr.addr = 0;
+   for (i = 0; i < DHCP_CHADDR_LEN; i++) {
+     /* copy netif hardware address, pad with zeroes */
+-    dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/;
++    dhcp->msg_out->chaddr[i] = (i < (netif->hwaddr_len > NETIF_MAX_HWADDR_LEN ? NETIF_MAX_HWADDR_LEN : netif->hwaddr_len)) ? netif->hwaddr[i] : 0/* pad byte*/;
+   }
+   for (i = 0; i < DHCP_SNAME_LEN; i++) {
+     dhcp->msg_out->sname[i] = 0;
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/lwip.patch-cvs b/import-layers/meta-virtualization/recipes-extended/xen/files/lwip.patch-cvs
new file mode 100644
index 0000000..b271877
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/lwip.patch-cvs
@@ -0,0 +1,2398 @@
+? .ChangeLog.swp
+? ChangeLog
+Index: CHANGELOG
+===================================================================
+RCS file: /sources/lwip/lwip/CHANGELOG,v
+retrieving revision 1.300
+retrieving revision 1.318
+diff -u -p -r1.300 -r1.318
+--- a/CHANGELOG	23 Mar 2008 13:49:39 -0000	1.300
++++ b/CHANGELOG	14 Jul 2008 20:12:36 -0000	1.318
+@@ -19,9 +19,77 @@ HISTORY
+
+   ++ New features:
+
++  2008-06-30 Simon Goldschmidt
++  * mem.c, opt.h, stats.h: fixed bug #21433: Calling mem_free/pbuf_free from
++    interrupt context isn't safe: LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT allows
++    mem_free to run between mem_malloc iterations. Added illegal counter for
++    mem stats.
++
++  2008-06-27 Simon Goldschmidt
++  * stats.h/.c, some other files: patch #6483: stats module improvement:
++    Added defines to display each module's statistic individually, added stats
++    defines for MEM, MEMP and SYS modules, removed (unused) rexmit counter.
++
++  2008-06-17 Simon Goldschmidt
++  * err.h: patch #6459: Made err_t overridable to use a more efficient type
++    (define LWIP_ERR_T in cc.h)
++
++  2008-06-17 Simon Goldschmidt
++  * slipif.c: patch #6480: Added a configuration option for slipif for symmetry
++    to loopif
++
++  2008-06-17 Simon Goldschmidt (patch by Luca Ceresoli)
++  * netif.c, loopif.c, ip.c, netif.h, loopif.h, opt.h: Checked in slightly
++    modified version of patch # 6370: Moved loopif code to netif.c so that
++    loopback traffic is supported on all netifs (all local IPs).
++    Added option to limit loopback packets for each netifs.
++
+
+   ++ Bugfixes:
+
++  2008-08-14 Simon Goldschmidt
++  * api_msg.c: fixed bug #23847: do_close_internal references freed memory (when
++    tcp_close returns != ERR_OK)
++
++  2008-07-08 Frédéric Bernon
++  * stats.h: Fix some build bugs introduced with patch #6483 (missing some parameters
++    in macros, mainly if MEM_STATS=0 and MEMP_STATS=0).
++
++  2008-06-24 Jonathan Larmour
++  * tcp_in.c: Fix for bug #23693 as suggested by Art R. Ensure cseg is unused
++    if tcp_seg_copy fails.
++
++  2008-06-17 Simon Goldschmidt
++  * inet_chksum.c: Checked in some ideas of patch #6460 (loop optimizations)
++    and created defines for swapping bytes and folding u32 to u16.
++
++  2008-05-30 Kieran Mansley
++  * tcp_in.c Remove redundant "if" statement, and use real rcv_wnd
++    rather than rcv_ann_wnd when deciding if packets are in-window.
++    Contributed by <arasmussen@consultant.datasys.swri.edu>
++
++  2008-05-30 Kieran Mansley
++  * mem.h: Fix BUG#23254.  Change macro definition of mem_* to allow
++    passing as function pointers when MEM_LIBC_MALLOC is defined.
++
++  2008-05-09 Jonathan Larmour
++  * err.h, err.c, sockets.c: Fix bug #23119: Reorder timeout error code to
++    stop it being treated as a fatal error.
++
++  2008-04-15 Simon Goldschmidt
++  * dhcp.c: fixed bug #22804: dhcp_stop doesn't clear NETIF_FLAG_DHCP
++    (flag now cleared)
++
++  2008-03-27 Simon Goldschmidt
++  * mem.c, tcpip.c, tcpip.h, opt.h: fixed bug #21433 (Calling mem_free/pbuf_free
++    from interrupt context isn't safe): set LWIP_USE_HEAP_FROM_INTERRUPT to 1
++    in lwipopts.h or use pbuf_free_callback(p)/mem_free_callback(m) to free pbufs
++    or heap memory from interrupt context
++
++  2008-03-26 Simon Goldschmidt
++  * tcp_in.c, tcp.c: fixed bug #22249: division by zero could occur if a remote
++    host sent a zero mss as TCP option.
++
+
+ (STABLE-1.3.0)
+
+Index: src/api/api_msg.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/api/api_msg.c,v
+retrieving revision 1.102
+retrieving revision 1.104
+diff -u -p -r1.102 -r1.104
+--- a/src/api/api_msg.c	21 Mar 2008 16:23:14 -0000	1.102
++++ b/src/api/api_msg.c	15 Jul 2008 11:18:58 -0000	1.104
+@@ -598,11 +598,16 @@ do_close_internal(struct netconn *conn)
+   LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL));
+
+   /* Set back some callback pointers */
++  tcp_arg(conn->pcb.tcp, NULL);
+   if (conn->pcb.tcp->state == LISTEN) {
+-    tcp_arg(conn->pcb.tcp, NULL);
+     tcp_accept(conn->pcb.tcp, NULL);
+   } else {
+     tcp_recv(conn->pcb.tcp, NULL);
++    tcp_accept(conn->pcb.tcp, NULL);
++    /* some callbacks have to be reset if tcp_close is not successful */
++    tcp_sent(conn->pcb.tcp, NULL);
++    tcp_poll(conn->pcb.tcp, NULL, 4);
++    tcp_err(conn->pcb.tcp, NULL);
+   }
+   /* Try to close the connection */
+   err = tcp_close(conn->pcb.tcp);
+@@ -610,11 +615,6 @@ do_close_internal(struct netconn *conn)
+     /* Closing succeeded */
+     conn->state = NETCONN_NONE;
+     /* Set back some callback pointers as conn is going away */
+-    tcp_err(conn->pcb.tcp, NULL);
+-    tcp_poll(conn->pcb.tcp, NULL, 4);
+-    tcp_sent(conn->pcb.tcp, NULL);
+-    tcp_recv(conn->pcb.tcp, NULL);
+-    tcp_arg(conn->pcb.tcp, NULL);
+     conn->pcb.tcp = NULL;
+     conn->err = ERR_OK;
+     /* Trigger select() in socket layer. This send should something else so the
+@@ -623,6 +623,14 @@ do_close_internal(struct netconn *conn)
+     API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
+     /* wake up the application task */
+     sys_sem_signal(conn->op_completed);
++  } else {
++    /* Closing failed, restore some of the callbacks */
++    /* Closing of listen pcb will never fail! */
++    LWIP_ASSERT("Closing a listen pcb may not fail!", (conn->pcb.tcp->state != LISTEN));
++    tcp_sent(conn->pcb.tcp, sent_tcp);
++    tcp_poll(conn->pcb.tcp, poll_tcp, 4);
++    tcp_err(conn->pcb.tcp, err_tcp);
++    tcp_arg(conn->pcb.tcp, conn);
+   }
+   /* If closing didn't succeed, we get called again either
+      from poll_tcp or from sent_tcp */
+Index: src/api/err.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/api/err.c,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- a/src/api/err.c	13 Dec 2007 23:06:50 -0000	1.11
++++ b/src/api/err.c	9 May 2008 12:14:23 -0000	1.12
+@@ -44,17 +44,17 @@ static const char *err_strerr[] = {
+            "Ok.",                    /* ERR_OK          0  */
+            "Out of memory error.",   /* ERR_MEM        -1  */
+            "Buffer error.",          /* ERR_BUF        -2  */
+-           "Routing problem.",       /* ERR_RTE        -3  */
+-           "Connection aborted.",    /* ERR_ABRT       -4  */
+-           "Connection reset.",      /* ERR_RST        -5  */
+-           "Connection closed.",     /* ERR_CLSD       -6  */
+-           "Not connected.",         /* ERR_CONN       -7  */
+-           "Illegal value.",         /* ERR_VAL        -8  */
+-           "Illegal argument.",      /* ERR_ARG        -9  */
+-           "Address in use.",        /* ERR_USE        -10 */
+-           "Low-level netif error.", /* ERR_IF         -11 */
+-           "Already connected.",     /* ERR_ISCONN     -12 */
+-           "Timeout.",               /* ERR_TIMEOUT    -13 */
++           "Timeout.",               /* ERR_TIMEOUT    -3 */
++           "Routing problem.",       /* ERR_RTE        -4  */
++           "Connection aborted.",    /* ERR_ABRT       -5  */
++           "Connection reset.",      /* ERR_RST        -6  */
++           "Connection closed.",     /* ERR_CLSD       -7  */
++           "Not connected.",         /* ERR_CONN       -8  */
++           "Illegal value.",         /* ERR_VAL        -9  */
++           "Illegal argument.",      /* ERR_ARG        -10 */
++           "Address in use.",        /* ERR_USE        -11 */
++           "Low-level netif error.", /* ERR_IF         -12 */
++           "Already connected.",     /* ERR_ISCONN     -13 */
+            "Operation in progress."  /* ERR_INPROGRESS -14 */
+ };
+
+Index: src/api/netdb.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/api/netdb.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -p -r1.4 -r1.5
+--- a/src/api/netdb.c	26 Jan 2008 16:11:39 -0000	1.4
++++ b/src/api/netdb.c	16 Jul 2008 20:36:12 -0000	1.5
+@@ -326,7 +326,8 @@ lwip_getaddrinfo(const char *nodename, c
+   if (nodename != NULL) {
+     /* copy nodename to canonname if specified */
+     size_t namelen = strlen(nodename);
+-    ai->ai_canonname = mem_malloc(namelen + 1);
++    LWIP_ASSERT("namelen is too long", (namelen + 1) <= (mem_size_t)-1);
++    ai->ai_canonname = mem_malloc((mem_size_t)(namelen + 1));
+     if (ai->ai_canonname == NULL) {
+       goto memerr;
+     }
+Index: src/api/sockets.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/api/sockets.c,v
+retrieving revision 1.116
+retrieving revision 1.117
+diff -u -p -r1.116 -r1.117
+--- a/src/api/sockets.c	13 Mar 2008 20:03:57 -0000	1.116
++++ b/src/api/sockets.c	9 May 2008 12:14:24 -0000	1.117
+@@ -128,17 +128,17 @@ static const int err_to_errno_table[] =
+   0,             /* ERR_OK          0      No error, everything OK. */
+   ENOMEM,        /* ERR_MEM        -1      Out of memory error.     */
+   ENOBUFS,       /* ERR_BUF        -2      Buffer error.            */
+-  EHOSTUNREACH,  /* ERR_RTE        -3      Routing problem.         */
+-  ECONNABORTED,  /* ERR_ABRT       -4      Connection aborted.      */
+-  ECONNRESET,    /* ERR_RST        -5      Connection reset.        */
+-  ESHUTDOWN,     /* ERR_CLSD       -6      Connection closed.       */
+-  ENOTCONN,      /* ERR_CONN       -7      Not connected.           */
+-  EINVAL,        /* ERR_VAL        -8      Illegal value.           */
+-  EIO,           /* ERR_ARG        -9      Illegal argument.        */
+-  EADDRINUSE,    /* ERR_USE        -10     Address in use.          */
+-  -1,            /* ERR_IF         -11     Low-level netif error    */
+-  -1,            /* ERR_ISCONN     -12     Already connected.       */
+-  ETIMEDOUT,     /* ERR_TIMEOUT    -13     Timeout                  */
++  ETIMEDOUT,     /* ERR_TIMEOUT    -3      Timeout                  */
++  EHOSTUNREACH,  /* ERR_RTE        -4      Routing problem.         */
++  ECONNABORTED,  /* ERR_ABRT       -5      Connection aborted.      */
++  ECONNRESET,    /* ERR_RST        -6      Connection reset.        */
++  ESHUTDOWN,     /* ERR_CLSD       -7      Connection closed.       */
++  ENOTCONN,      /* ERR_CONN       -8      Not connected.           */
++  EINVAL,        /* ERR_VAL        -9      Illegal value.           */
++  EIO,           /* ERR_ARG        -10     Illegal argument.        */
++  EADDRINUSE,    /* ERR_USE        -11     Address in use.          */
++  -1,            /* ERR_IF         -12     Low-level netif error    */
++  -1,            /* ERR_ISCONN     -13     Already connected.       */
+   EINPROGRESS    /* ERR_INPROGRESS -14     Operation in progress    */
+ };
+
+Index: src/api/tcpip.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/api/tcpip.c,v
+retrieving revision 1.70
+retrieving revision 1.73
+diff -u -p -r1.70 -r1.73
+--- a/src/api/tcpip.c	12 Jan 2008 11:52:22 -0000	1.70
++++ b/src/api/tcpip.c	27 Jun 2008 20:34:51 -0000	1.73
+@@ -518,4 +518,42 @@ tcpip_init(void (* initfunc)(void *), vo
+   sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
+ }
+
++/**
++ * Simple callback function used with tcpip_callback to free a pbuf
++ * (pbuf_free has a wrong signature for tcpip_callback)
++ *
++ * @param p The pbuf (chain) to be dereferenced.
++ */
++static void
++pbuf_free_int(void *p)
++{
++  struct pbuf *q = p;
++  pbuf_free(q);
++}
++
++/**
++ * A simple wrapper function that allows you to free a pbuf from interrupt context.
++ *
++ * @param p The pbuf (chain) to be dereferenced.
++ * @return ERR_OK if callback could be enqueued, an err_t if not
++ */
++err_t
++pbuf_free_callback(struct pbuf *p)
++{
++  return tcpip_callback_with_block(pbuf_free_int, p, 0);
++}
++
++/**
++ * A simple wrapper function that allows you to free heap memory from
++ * interrupt context.
++ *
++ * @param m the heap memory to free
++ * @return ERR_OK if callback could be enqueued, an err_t if not
++ */
++err_t
++mem_free_callback(void *m)
++{
++  return tcpip_callback_with_block(mem_free, m, 0);
++}
++
+ #endif /* !NO_SYS */
+Index: src/core/dhcp.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/dhcp.c,v
+retrieving revision 1.86
+retrieving revision 1.87
+diff -u -p -r1.86 -r1.87
+--- a/src/core/dhcp.c	4 Mar 2008 14:25:58 -0000	1.86
++++ b/src/core/dhcp.c	15 Apr 2008 17:24:55 -0000	1.87
+@@ -568,6 +568,8 @@ dhcp_start(struct netif *netif)
+   LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
+   dhcp = netif->dhcp;
+   LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
++  /* Remove the flag that says this netif is handled by DHCP,
++     it is set when we succeeded starting. */
+   netif->flags &= ~NETIF_FLAG_DHCP;
+
+   /* no DHCP client attached yet? */
+@@ -609,6 +611,7 @@ dhcp_start(struct netif *netif)
+     dhcp_stop(netif);
+     return ERR_MEM;
+   }
++  /* Set the flag that says this netif is handled by DHCP. */
+   netif->flags |= NETIF_FLAG_DHCP;
+   return result;
+ }
+@@ -1063,6 +1066,8 @@ dhcp_stop(struct netif *netif)
+ {
+   struct dhcp *dhcp = netif->dhcp;
+   LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;);
++  /* Remove the flag that says this netif is handled by DHCP. */
++  netif->flags &= ~NETIF_FLAG_DHCP;
+
+   LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | 3, ("dhcp_stop()\n"));
+   /* netif is DHCP configured? */
+Index: src/core/mem.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/mem.c,v
+retrieving revision 1.59
+retrieving revision 1.62
+diff -u -p -r1.59 -r1.62
+--- a/src/core/mem.c	4 Mar 2008 16:31:32 -0000	1.59
++++ b/src/core/mem.c	30 Jun 2008 18:16:51 -0000	1.62
+@@ -177,9 +177,36 @@ static u8_t *ram;
+ static struct mem *ram_end;
+ /** pointer to the lowest free block, this is used for faster search */
+ static struct mem *lfree;
++
+ /** concurrent access protection */
+ static sys_sem_t mem_sem;
+
++#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++
++static volatile u8_t mem_free_count;
++
++/* Allow mem_free from other (e.g. interrupt) context */
++#define LWIP_MEM_FREE_DECL_PROTECT()  SYS_ARCH_DECL_PROTECT(lev_free)
++#define LWIP_MEM_FREE_PROTECT()       SYS_ARCH_PROTECT(lev_free)
++#define LWIP_MEM_FREE_UNPROTECT()     SYS_ARCH_UNPROTECT(lev_free)
++#define LWIP_MEM_ALLOC_DECL_PROTECT() SYS_ARCH_DECL_PROTECT(lev_alloc)
++#define LWIP_MEM_ALLOC_PROTECT()      SYS_ARCH_PROTECT(lev_alloc)
++#define LWIP_MEM_ALLOC_UNPROTECT()    SYS_ARCH_UNPROTECT(lev_alloc)
++
++#else /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
++
++/* Protect the heap only by using a semaphore */
++#define LWIP_MEM_FREE_DECL_PROTECT()
++#define LWIP_MEM_FREE_PROTECT()    sys_arch_sem_wait(mem_sem, 0)
++#define LWIP_MEM_FREE_UNPROTECT()  sys_sem_signal(mem_sem)
++/* mem_malloc is protected using semaphore AND LWIP_MEM_ALLOC_PROTECT */
++#define LWIP_MEM_ALLOC_DECL_PROTECT()
++#define LWIP_MEM_ALLOC_PROTECT()
++#define LWIP_MEM_ALLOC_UNPROTECT()
++
++#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
++
++
+ /**
+  * "Plug holes" by combining adjacent empty struct mems.
+  * After this function is through, there should not exist
+@@ -255,9 +282,7 @@ mem_init(void)
+   /* initialize the lowest-free pointer to the start of the heap */
+   lfree = (struct mem *)ram;
+
+-#if MEM_STATS
+-  lwip_stats.mem.avail = MEM_SIZE_ALIGNED;
+-#endif /* MEM_STATS */
++  MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED);
+ }
+
+ /**
+@@ -270,6 +295,7 @@ void
+ mem_free(void *rmem)
+ {
+   struct mem *mem;
++  LWIP_MEM_FREE_DECL_PROTECT();
+
+   if (rmem == NULL) {
+     LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | 2, ("mem_free(p == NULL) was called.\n"));
+@@ -277,20 +303,20 @@ mem_free(void *rmem)
+   }
+   LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0);
+
+-  /* protect the heap from concurrent access */
+-  sys_arch_sem_wait(mem_sem, 0);
+-
+   LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
+     (u8_t *)rmem < (u8_t *)ram_end);
+
+   if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
++    SYS_ARCH_DECL_PROTECT(lev);
+     LWIP_DEBUGF(MEM_DEBUG | 3, ("mem_free: illegal memory\n"));
+-#if MEM_STATS
+-    ++lwip_stats.mem.err;
+-#endif /* MEM_STATS */
+-    sys_sem_signal(mem_sem);
++    /* protect mem stats from concurrent access */
++    SYS_ARCH_PROTECT(lev);
++    MEM_STATS_INC(illegal);
++    SYS_ARCH_UNPROTECT(lev);
+     return;
+   }
++  /* protect the heap from concurrent access */
++  LWIP_MEM_FREE_PROTECT();
+   /* Get the corresponding struct mem ... */
+   mem = (struct mem *)((u8_t *)rmem - SIZEOF_STRUCT_MEM);
+   /* ... which has to be in a used state ... */
+@@ -303,13 +329,14 @@ mem_free(void *rmem)
+     lfree = mem;
+   }
+
+-#if MEM_STATS
+-  lwip_stats.mem.used -= mem->next - ((u8_t *)mem - ram);
+-#endif /* MEM_STATS */
++  MEM_STATS_DEC_USED(used, mem->next - ((u8_t *)mem - ram));
+
+   /* finally, see if prev or next are free also */
+   plug_holes(mem);
+-  sys_sem_signal(mem_sem);
++#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++  mem_free_count = 1;
++#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
++  LWIP_MEM_FREE_UNPROTECT();
+ }
+
+ /**
+@@ -321,6 +348,8 @@ mem_free(void *rmem)
+  * @param newsize required size after shrinking (needs to be smaller than or
+  *                equal to the previous size)
+  * @return for compatibility reasons: is always == rmem, at the moment
++ *         or NULL if newsize is > old size, in which case rmem is NOT touched
++ *         or freed!
+  */
+ void *
+ mem_realloc(void *rmem, mem_size_t newsize)
+@@ -328,6 +357,8 @@ mem_realloc(void *rmem, mem_size_t newsi
+   mem_size_t size;
+   mem_size_t ptr, ptr2;
+   struct mem *mem, *mem2;
++  /* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */
++  LWIP_MEM_FREE_DECL_PROTECT();
+
+   /* Expand the size of the allocated memory region so that we can
+      adjust for alignment. */
+@@ -346,7 +377,12 @@ mem_realloc(void *rmem, mem_size_t newsi
+    (u8_t *)rmem < (u8_t *)ram_end);
+
+   if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
++    SYS_ARCH_DECL_PROTECT(lev);
+     LWIP_DEBUGF(MEM_DEBUG | 3, ("mem_realloc: illegal memory\n"));
++    /* protect mem stats from concurrent access */
++    SYS_ARCH_PROTECT(lev);
++    MEM_STATS_INC(illegal);
++    SYS_ARCH_UNPROTECT(lev);
+     return rmem;
+   }
+   /* Get the corresponding struct mem ... */
+@@ -366,11 +402,9 @@ mem_realloc(void *rmem, mem_size_t newsi
+   }
+
+   /* protect the heap from concurrent access */
+-  sys_arch_sem_wait(mem_sem, 0);
++  LWIP_MEM_FREE_PROTECT();
+
+-#if MEM_STATS
+-  lwip_stats.mem.used -= (size - newsize);
+-#endif /* MEM_STATS */
++  MEM_STATS_DEC_USED(used, (size - newsize));
+
+   mem2 = (struct mem *)&ram[mem->next];
+   if(mem2->used == 0) {
+@@ -426,7 +460,10 @@ mem_realloc(void *rmem, mem_size_t newsi
+     -> don't do anyhting.
+     -> the remaining space stays unused since it is too small
+   } */
+-  sys_sem_signal(mem_sem);
++#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++  mem_free_count = 1;
++#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
++  LWIP_MEM_FREE_UNPROTECT();
+   return rmem;
+ }
+
+@@ -444,6 +481,10 @@ mem_malloc(mem_size_t size)
+ {
+   mem_size_t ptr, ptr2;
+   struct mem *mem, *mem2;
++#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++  u8_t local_mem_free_count = 0;
++#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
++  LWIP_MEM_ALLOC_DECL_PROTECT();
+
+   if (size == 0) {
+     return NULL;
+@@ -464,88 +505,101 @@ mem_malloc(mem_size_t size)
+
+   /* protect the heap from concurrent access */
+   sys_arch_sem_wait(mem_sem, 0);
++  LWIP_MEM_ALLOC_PROTECT();
++#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++  /* run as long as a mem_free disturbed mem_malloc */
++  do {
++    local_mem_free_count = 0;
++#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
++
++    /* Scan through the heap searching for a free block that is big enough,
++     * beginning with the lowest free block.
++     */
++    for (ptr = (u8_t *)lfree - ram; ptr < MEM_SIZE_ALIGNED - size;
++         ptr = ((struct mem *)&ram[ptr])->next) {
++      mem = (struct mem *)&ram[ptr];
++#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++      mem_free_count = 0;
++      LWIP_MEM_ALLOC_UNPROTECT();
++      /* allow mem_free to run */
++      LWIP_MEM_ALLOC_PROTECT();
++      if (mem_free_count != 0) {
++        local_mem_free_count = mem_free_count;
++      }
++      mem_free_count = 0;
++#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
+
+-  /* Scan through the heap searching for a free block that is big enough,
+-   * beginning with the lowest free block.
+-   */
+-  for (ptr = (u8_t *)lfree - ram; ptr < MEM_SIZE_ALIGNED - size;
+-       ptr = ((struct mem *)&ram[ptr])->next) {
+-    mem = (struct mem *)&ram[ptr];
+-
+-    if ((!mem->used) &&
+-        (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
+-      /* mem is not used and at least perfect fit is possible:
+-       * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */
+-
+-      if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) {
+-        /* (in addition to the above, we test if another struct mem (SIZEOF_STRUCT_MEM) containing
+-         * at least MIN_SIZE_ALIGNED of data also fits in the 'user data space' of 'mem')
+-         * -> split large block, create empty remainder,
+-         * remainder must be large enough to contain MIN_SIZE_ALIGNED data: if
+-         * mem->next - (ptr + (2*SIZEOF_STRUCT_MEM)) == size,
+-         * struct mem would fit in but no data between mem2 and mem2->next
+-         * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty
+-         *       region that couldn't hold data, but when mem->next gets freed,
+-         *       the 2 regions would be combined, resulting in more free memory
+-         */
+-        ptr2 = ptr + SIZEOF_STRUCT_MEM + size;
+-        /* create mem2 struct */
+-        mem2 = (struct mem *)&ram[ptr2];
+-        mem2->used = 0;
+-        mem2->next = mem->next;
+-        mem2->prev = ptr;
+-        /* and insert it between mem and mem->next */
+-        mem->next = ptr2;
+-        mem->used = 1;
+-
+-        if (mem2->next != MEM_SIZE_ALIGNED) {
+-          ((struct mem *)&ram[mem2->next])->prev = ptr2;
+-        }
+-#if MEM_STATS
+-        lwip_stats.mem.used += (size + SIZEOF_STRUCT_MEM);
+-        if (lwip_stats.mem.max < lwip_stats.mem.used) {
+-          lwip_stats.mem.max = lwip_stats.mem.used;
++      if ((!mem->used) &&
++          (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
++        /* mem is not used and at least perfect fit is possible:
++         * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */
++
++        if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) {
++          /* (in addition to the above, we test if another struct mem (SIZEOF_STRUCT_MEM) containing
++           * at least MIN_SIZE_ALIGNED of data also fits in the 'user data space' of 'mem')
++           * -> split large block, create empty remainder,
++           * remainder must be large enough to contain MIN_SIZE_ALIGNED data: if
++           * mem->next - (ptr + (2*SIZEOF_STRUCT_MEM)) == size,
++           * struct mem would fit in but no data between mem2 and mem2->next
++           * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty
++           *       region that couldn't hold data, but when mem->next gets freed,
++           *       the 2 regions would be combined, resulting in more free memory
++           */
++          ptr2 = ptr + SIZEOF_STRUCT_MEM + size;
++          /* create mem2 struct */
++          mem2 = (struct mem *)&ram[ptr2];
++          mem2->used = 0;
++          mem2->next = mem->next;
++          mem2->prev = ptr;
++          /* and insert it between mem and mem->next */
++          mem->next = ptr2;
++          mem->used = 1;
++
++          if (mem2->next != MEM_SIZE_ALIGNED) {
++            ((struct mem *)&ram[mem2->next])->prev = ptr2;
++          }
++          MEM_STATS_INC_USED(used, (size + SIZEOF_STRUCT_MEM));
++        } else {
++          /* (a mem2 struct does no fit into the user data space of mem and mem->next will always
++           * be used at this point: if not we have 2 unused structs in a row, plug_holes should have
++           * take care of this).
++           * -> near fit or excact fit: do not split, no mem2 creation
++           * also can't move mem->next directly behind mem, since mem->next
++           * will always be used at this point!
++           */
++          mem->used = 1;
++          MEM_STATS_INC_USED(used, mem->next - ((u8_t *)mem - ram));
+         }
+-#endif /* MEM_STATS */
+-      } else {
+-        /* (a mem2 struct does no fit into the user data space of mem and mem->next will always
+-         * be used at this point: if not we have 2 unused structs in a row, plug_holes should have
+-         * take care of this).
+-         * -> near fit or excact fit: do not split, no mem2 creation
+-         * also can't move mem->next directly behind mem, since mem->next
+-         * will always be used at this point!
+-         */
+-        mem->used = 1;
+-#if MEM_STATS
+-        lwip_stats.mem.used += mem->next - ((u8_t *)mem - ram);
+-        if (lwip_stats.mem.max < lwip_stats.mem.used) {
+-          lwip_stats.mem.max = lwip_stats.mem.used;
+-        }
+-#endif /* MEM_STATS */
+-      }
+
+-      if (mem == lfree) {
+-        /* Find next free block after mem and update lowest free pointer */
+-        while (lfree->used && lfree != ram_end) {
+-          lfree = (struct mem *)&ram[lfree->next];
++        if (mem == lfree) {
++          /* Find next free block after mem and update lowest free pointer */
++          while (lfree->used && lfree != ram_end) {
++            LWIP_MEM_ALLOC_UNPROTECT();
++            /* prevent high interrupt latency... */
++            LWIP_MEM_ALLOC_PROTECT();
++            lfree = (struct mem *)&ram[lfree->next];
++          }
++          LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
+         }
+-        LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
+-      }
+-      sys_sem_signal(mem_sem);
+-      LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
+-       (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
+-      LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
+-       (unsigned long)((u8_t *)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
+-      LWIP_ASSERT("mem_malloc: sanity check alignment",
+-        (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0);
++        LWIP_MEM_ALLOC_UNPROTECT();
++        sys_sem_signal(mem_sem);
++        LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
++         (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
++        LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
++         (unsigned long)((u8_t *)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
++        LWIP_ASSERT("mem_malloc: sanity check alignment",
++          (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0);
+
+-      return (u8_t *)mem + SIZEOF_STRUCT_MEM;
++        return (u8_t *)mem + SIZEOF_STRUCT_MEM;
++      }
+     }
+-  }
++#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++    /* if we got interrupted by a mem_free, try again */
++  } while(local_mem_free_count != 0);
++#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
+   LWIP_DEBUGF(MEM_DEBUG | 2, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size));
+-#if MEM_STATS
+-  ++lwip_stats.mem.err;
+-#endif /* MEM_STATS */
++  MEM_STATS_INC(err);
++  LWIP_MEM_ALLOC_UNPROTECT();
+   sys_sem_signal(mem_sem);
+   return NULL;
+ }
+Index: src/core/memp.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/memp.c,v
+retrieving revision 1.55
+retrieving revision 1.56
+diff -u -p -r1.55 -r1.56
+--- a/src/core/memp.c	25 Nov 2007 10:43:28 -0000	1.55
++++ b/src/core/memp.c	27 Jun 2008 18:37:54 -0000	1.56
+@@ -252,13 +252,12 @@ memp_init(void)
+   struct memp *memp;
+   u16_t i, j;
+
+-#if MEMP_STATS
+   for (i = 0; i < MEMP_MAX; ++i) {
+-    lwip_stats.memp[i].used = lwip_stats.memp[i].max =
+-      lwip_stats.memp[i].err = 0;
+-    lwip_stats.memp[i].avail = memp_num[i];
++    MEMP_STATS_AVAIL(used, i, 0);
++    MEMP_STATS_AVAIL(max, i, 0);
++    MEMP_STATS_AVAIL(err, i, 0);
++    MEMP_STATS_AVAIL(avail, i, memp_num[i]);
+   }
+-#endif /* MEMP_STATS */
+
+   memp = LWIP_MEM_ALIGN(memp_memory);
+   /* for every pool: */
+@@ -315,20 +314,13 @@ memp_malloc_fn(memp_t type, const char*
+     memp->file = file;
+     memp->line = line;
+ #endif /* MEMP_OVERFLOW_CHECK */
+-#if MEMP_STATS
+-    ++lwip_stats.memp[type].used;
+-    if (lwip_stats.memp[type].used > lwip_stats.memp[type].max) {
+-      lwip_stats.memp[type].max = lwip_stats.memp[type].used;
+-    }
+-#endif /* MEMP_STATS */
++    MEMP_STATS_INC_USED(used, type);
+     LWIP_ASSERT("memp_malloc: memp properly aligned",
+                 ((mem_ptr_t)memp % MEM_ALIGNMENT) == 0);
+     memp = (struct memp*)((u8_t*)memp + MEMP_SIZE);
+   } else {
+     LWIP_DEBUGF(MEMP_DEBUG | 2, ("memp_malloc: out of memory in pool %s\n", memp_desc[type]));
+-#if MEMP_STATS
+-    ++lwip_stats.memp[type].err;
+-#endif /* MEMP_STATS */
++    MEMP_STATS_INC(err, type);
+   }
+
+   SYS_ARCH_UNPROTECT(old_level);
+@@ -365,9 +357,7 @@ memp_free(memp_t type, void *mem)
+ #endif /* MEMP_OVERFLOW_CHECK >= 2 */
+ #endif /* MEMP_OVERFLOW_CHECK */
+
+-#if MEMP_STATS
+-  lwip_stats.memp[type].used--;
+-#endif /* MEMP_STATS */
++  MEMP_STATS_DEC(used, type);
+
+   memp->next = memp_tab[type];
+   memp_tab[type] = memp;
+Index: src/core/netif.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/netif.c,v
+retrieving revision 1.65
+retrieving revision 1.68
+diff -u -p -r1.65 -r1.68
+--- a/src/core/netif.c	9 Oct 2007 20:00:55 -0000	1.65
++++ b/src/core/netif.c	19 Jun 2008 16:27:18 -0000	1.68
+@@ -45,6 +45,12 @@
+ #include "lwip/snmp.h"
+ #include "lwip/igmp.h"
+ #include "netif/etharp.h"
++#if ENABLE_LOOPBACK
++#include "lwip/sys.h"
++#if LWIP_NETIF_LOOPBACK_MULTITHREADING
++#include "lwip/tcpip.h"
++#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */
++#endif /* ENABLE_LOOPBACK */
+
+ #if LWIP_NETIF_STATUS_CALLBACK
+ #define NETIF_STATUS_CALLBACK(n) { if (n->status_callback) (n->status_callback)(n); }
+@@ -106,6 +112,10 @@ netif_add(struct netif *netif, struct ip
+ #if LWIP_IGMP
+   netif->igmp_mac_filter = NULL;
+ #endif /* LWIP_IGMP */
++#if ENABLE_LOOPBACK
++  netif->loop_first = NULL;
++  netif->loop_last = NULL;
++#endif /* ENABLE_LOOPBACK */
+
+   /* remember netif specific state information data */
+   netif->state = state;
+@@ -114,6 +124,9 @@ netif_add(struct netif *netif, struct ip
+ #if LWIP_NETIF_HWADDRHINT
+   netif->addr_hint = NULL;
+ #endif /* LWIP_NETIF_HWADDRHINT*/
++#if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS
++  netif->loop_cnt_current = 0;
++#endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */
+
+   netif_set_addr(netif, ipaddr, netmask, gw);
+
+@@ -493,7 +506,158 @@ u8_t netif_is_link_up(struct netif *neti
+  */
+ void netif_set_link_callback(struct netif *netif, void (* link_callback)(struct netif *netif ))
+ {
+-    if ( netif )
+-        netif->link_callback = link_callback;
++  if (netif) {
++    netif->link_callback = link_callback;
++  }
+ }
+ #endif /* LWIP_NETIF_LINK_CALLBACK */
++
++#if ENABLE_LOOPBACK
++/**
++ * Send an IP packet to be received on the same netif (loopif-like).
++ * The pbuf is simply copied and handed back to netif->input.
++ * In multithreaded mode, this is done directly since netif->input must put
++ * the packet on a queue.
++ * In callback mode, the packet is put on an internal queue and is fed to
++ * netif->input by netif_poll().
++ *
++ * @param netif the lwip network interface structure
++ * @param p the (IP) packet to 'send'
++ * @param ipaddr the ip address to send the packet to (not used)
++ * @return ERR_OK if the packet has been sent
++ *         ERR_MEM if the pbuf used to copy the packet couldn't be allocated
++ */
++err_t
++netif_loop_output(struct netif *netif, struct pbuf *p,
++       struct ip_addr *ipaddr)
++{
++  struct pbuf *r;
++  err_t err;
++  struct pbuf *last;
++#if LWIP_LOOPBACK_MAX_PBUFS
++  u8_t clen = 0;
++#endif /* LWIP_LOOPBACK_MAX_PBUFS */
++  SYS_ARCH_DECL_PROTECT(lev);
++  LWIP_UNUSED_ARG(ipaddr);
++
++  /* Allocate a new pbuf */
++  r = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM);
++  if (r == NULL) {
++    return ERR_MEM;
++  }
++#if LWIP_LOOPBACK_MAX_PBUFS
++  clen = pbuf_clen(r);
++  /* check for overflow or too many pbuf on queue */
++  if(((netif->loop_cnt_current + clen) < netif->loop_cnt_current) ||
++    ((netif->loop_cnt_current + clen) > LWIP_LOOPBACK_MAX_PBUFS)) {
++      pbuf_free(r);
++      r = NULL;
++      return ERR_MEM;
++  }
++  netif->loop_cnt_current += clen;
++#endif /* LWIP_LOOPBACK_MAX_PBUFS */
++
++  /* Copy the whole pbuf queue p into the single pbuf r */
++  if ((err = pbuf_copy(r, p)) != ERR_OK) {
++    pbuf_free(r);
++    r = NULL;
++    return err;
++  }
++
++  /* Put the packet on a linked list which gets emptied through calling
++     netif_poll(). */
++
++  /* let last point to the last pbuf in chain r */
++  for (last = r; last->next != NULL; last = last->next);
++
++  SYS_ARCH_PROTECT(lev);
++  if(netif->loop_first != NULL) {
++    LWIP_ASSERT("if first != NULL, last must also be != NULL", netif->loop_last != NULL);
++    netif->loop_last->next = r;
++    netif->loop_last = last;
++  } else {
++    netif->loop_first = r;
++    netif->loop_last = last;
++  }
++  SYS_ARCH_UNPROTECT(lev);
++
++#if LWIP_NETIF_LOOPBACK_MULTITHREADING
++  /* For multithreading environment, schedule a call to netif_poll */
++  tcpip_callback(netif_poll, netif);
++#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */
++
++  return ERR_OK;
++}
++
++/**
++ * Call netif_poll() in the main loop of your application. This is to prevent
++ * reentering non-reentrant functions like tcp_input(). Packets passed to
++ * netif_loop_output() are put on a list that is passed to netif->input() by
++ * netif_poll().
++ */
++void
++netif_poll(struct netif *netif)
++{
++  struct pbuf *in;
++  SYS_ARCH_DECL_PROTECT(lev);
++
++  do {
++    /* Get a packet from the list. With SYS_LIGHTWEIGHT_PROT=1, this is protected */
++    SYS_ARCH_PROTECT(lev);
++    in = netif->loop_first;
++    if(in != NULL) {
++      struct pbuf *in_end = in;
++#if LWIP_LOOPBACK_MAX_PBUFS
++      u8_t clen = pbuf_clen(in);
++      /* adjust the number of pbufs on queue */
++      LWIP_ASSERT("netif->loop_cnt_current underflow",
++        ((netif->loop_cnt_current - clen) < netif->loop_cnt_current));
++      netif->loop_cnt_current -= clen;
++#endif /* LWIP_LOOPBACK_MAX_PBUFS */
++      while(in_end->len != in_end->tot_len) {
++        LWIP_ASSERT("bogus pbuf: len != tot_len but next == NULL!", in_end->next != NULL);
++        in_end = in_end->next;
++      }
++      /* 'in_end' now points to the last pbuf from 'in' */
++      if(in_end == netif->loop_last) {
++        /* this was the last pbuf in the list */
++        netif->loop_first = netif->loop_last = NULL;
++      } else {
++        /* pop the pbuf off the list */
++        netif->loop_first = in_end->next;
++        LWIP_ASSERT("should not be null since first != last!", netif->loop_first != NULL);
++      }
++      /* De-queue the pbuf from its successors on the 'loop_' list. */
++      in_end->next = NULL;
++    }
++    SYS_ARCH_UNPROTECT(lev);
++
++    if(in != NULL) {
++      /* loopback packets are always IP packets! */
++      if(ip_input(in, netif) != ERR_OK) {
++        pbuf_free(in);
++      }
++      /* Don't reference the packet any more! */
++      in = NULL;
++    }
++  /* go on while there is a packet on the list */
++  } while(netif->loop_first != NULL);
++}
++
++#if !LWIP_NETIF_LOOPBACK_MULTITHREADING
++/**
++ * Calls netif_poll() for every netif on the netif_list.
++ */
++void
++netif_poll_all(void)
++{
++  struct netif *netif = netif_list;
++  /* loop through netifs */
++  while (netif != NULL) {
++    netif_poll(netif);
++    /* proceed to next network interface */
++    netif = netif->next;
++  }
++}
++#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */
++#endif /* ENABLE_LOOPBACK */
+Index: src/core/pbuf.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/pbuf.c,v
+retrieving revision 1.127
+retrieving revision 1.128
+diff -u -p -r1.127 -r1.128
+--- a/src/core/pbuf.c	4 Mar 2008 16:37:46 -0000	1.127
++++ b/src/core/pbuf.c	1 Apr 2008 19:05:40 -0000	1.128
+@@ -667,8 +667,8 @@ pbuf_dechain(struct pbuf *p)
+  *
+  * @note Only one packet is copied, no packet queue!
+  *
+- * @param p_to pbuf source of the copy
+- * @param p_from pbuf destination of the copy
++ * @param p_to pbuf destination of the copy
++ * @param p_from pbuf source of the copy
+  *
+  * @return ERR_OK if pbuf was copied
+  *         ERR_ARG if one of the pbufs is NULL or p_to is not big
+Index: src/core/stats.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/stats.c,v
+retrieving revision 1.27
+retrieving revision 1.28
+diff -u -p -r1.27 -r1.28
+--- a/src/core/stats.c	4 Mar 2008 16:31:32 -0000	1.27
++++ b/src/core/stats.c	27 Jun 2008 18:37:54 -0000	1.28
+@@ -54,7 +54,6 @@ stats_display_proto(struct stats_proto *
+ {
+   LWIP_PLATFORM_DIAG(("\n%s\n\t", name));
+   LWIP_PLATFORM_DIAG(("xmit: %"STAT_COUNTER_F"\n\t", proto->xmit));
+-  LWIP_PLATFORM_DIAG(("rexmit: %"STAT_COUNTER_F"\n\t", proto->rexmit));
+   LWIP_PLATFORM_DIAG(("recv: %"STAT_COUNTER_F"\n\t", proto->recv));
+   LWIP_PLATFORM_DIAG(("fw: %"STAT_COUNTER_F"\n\t", proto->fw));
+   LWIP_PLATFORM_DIAG(("drop: %"STAT_COUNTER_F"\n\t", proto->drop));
+@@ -68,6 +67,7 @@ stats_display_proto(struct stats_proto *
+   LWIP_PLATFORM_DIAG(("cachehit: %"STAT_COUNTER_F"\n", proto->cachehit));
+ }
+
++#if IGMP_STATS
+ void
+ stats_display_igmp(struct stats_igmp *igmp)
+ {
+@@ -82,7 +82,9 @@ stats_display_igmp(struct stats_igmp *ig
+   LWIP_PLATFORM_DIAG(("report_rxed: %"STAT_COUNTER_F"\n\t", igmp->report_rxed));
+   LWIP_PLATFORM_DIAG(("group_query_rxed: %"STAT_COUNTER_F"\n", igmp->group_query_rxed));
+ }
++#endif /* IGMP_STATS */
+
++#if MEM_STATS || MEMP_STATS
+ void
+ stats_display_mem(struct stats_mem *mem, char *name)
+ {
+@@ -93,48 +95,53 @@ stats_display_mem(struct stats_mem *mem,
+   LWIP_PLATFORM_DIAG(("err: %"U32_F"\n", (u32_t)mem->err));
+ }
+
++#if MEMP_STATS
+ void
+-stats_display(void)
++stats_display_memp(struct stats_mem *mem, int index)
+ {
+-#if MEMP_STATS
+-  s16_t i;
+   char * memp_names[] = {
+ #define LWIP_MEMPOOL(name,num,size,desc) desc,
+ #include "lwip/memp_std.h"
+   };
+-#endif
+-#if LINK_STATS
+-  stats_display_proto(&lwip_stats.link, "LINK");
+-#endif
+-#if ETHARP_STATS
+-  stats_display_proto(&lwip_stats.etharp, "ETHARP");
+-#endif
+-#if IPFRAG_STATS
+-  stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG");
+-#endif
+-#if IP_STATS
+-  stats_display_proto(&lwip_stats.ip, "IP");
+-#endif
+-#if ICMP_STATS
+-  stats_display_proto(&lwip_stats.icmp, "ICMP");
+-#endif
+-#if IGMP_STATS
+-  stats_display_igmp(&lwip_stats.igmp);
+-#endif
+-#if UDP_STATS
+-  stats_display_proto(&lwip_stats.udp, "UDP");
+-#endif
+-#if TCP_STATS
+-  stats_display_proto(&lwip_stats.tcp, "TCP");
+-#endif
+-#if MEM_STATS
+-  stats_display_mem(&lwip_stats.mem, "HEAP");
+-#endif
+-#if MEMP_STATS
++  if(index < MEMP_MAX) {
++    stats_display_mem(mem, memp_names[index]);
++  }
++}
++#endif /* MEMP_STATS */
++#endif /* MEM_STATS || MEMP_STATS */
++
++#if SYS_STATS
++void
++stats_display_sys(struct stats_sys *sys)
++{
++  LWIP_PLATFORM_DIAG(("\nSYS\n\t"));
++  LWIP_PLATFORM_DIAG(("sem.used: %"U32_F"\n\t", (u32_t)sys->sem.used));
++  LWIP_PLATFORM_DIAG(("sem.max:  %"U32_F"\n\t", (u32_t)sys->sem.max));
++  LWIP_PLATFORM_DIAG(("sem.err:  %"U32_F"\n\t", (u32_t)sys->sem.err));
++  LWIP_PLATFORM_DIAG(("mbox.used: %"U32_F"\n\t", (u32_t)sys->mbox.used));
++  LWIP_PLATFORM_DIAG(("mbox.max:  %"U32_F"\n\t", (u32_t)sys->mbox.max));
++  LWIP_PLATFORM_DIAG(("mbox.err:  %"U32_F"\n\t", (u32_t)sys->mbox.err));
++}
++#endif /* SYS_STATS */
++
++void
++stats_display(void)
++{
++  s16_t i;
++
++  LINK_STATS_DISPLAY();
++  ETHARP_STATS_DISPLAY();
++  IPFRAG_STATS_DISPLAY();
++  IP_STATS_DISPLAY();
++  IGMP_STATS_DISPLAY();
++  ICMP_STATS_DISPLAY();
++  UDP_STATS_DISPLAY();
++  TCP_STATS_DISPLAY();
++  MEM_STATS_DISPLAY();
+   for (i = 0; i < MEMP_MAX; i++) {
+-    stats_display_mem(&lwip_stats.memp[i], memp_names[i]);
++    MEMP_STATS_DISPLAY(i);
+   }
+-#endif
++  SYS_STATS_DISPLAY();
+ }
+ #endif /* LWIP_STATS_DISPLAY */
+
+Index: src/core/sys.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/sys.c,v
+retrieving revision 1.32
+retrieving revision 1.33
+diff -u -p -r1.32 -r1.33
+--- a/src/core/sys.c	25 Nov 2007 13:57:05 -0000	1.32
++++ b/src/core/sys.c	16 Jul 2008 20:36:12 -0000	1.33
+@@ -65,7 +65,7 @@ struct sswt_cb
+ void
+ sys_mbox_fetch(sys_mbox_t mbox, void **msg)
+ {
+-  u32_t time;
++  u32_t time_needed;
+   struct sys_timeouts *timeouts;
+   struct sys_timeo *tmptimeout;
+   sys_timeout_handler h;
+@@ -76,18 +76,18 @@ sys_mbox_fetch(sys_mbox_t mbox, void **m
+
+   if (!timeouts || !timeouts->next) {
+     UNLOCK_TCPIP_CORE();
+-    time = sys_arch_mbox_fetch(mbox, msg, 0);
++    time_needed = sys_arch_mbox_fetch(mbox, msg, 0);
+     LOCK_TCPIP_CORE();
+   } else {
+     if (timeouts->next->time > 0) {
+       UNLOCK_TCPIP_CORE();
+-      time = sys_arch_mbox_fetch(mbox, msg, timeouts->next->time);
++      time_needed = sys_arch_mbox_fetch(mbox, msg, timeouts->next->time);
+       LOCK_TCPIP_CORE();
+     } else {
+-      time = SYS_ARCH_TIMEOUT;
++      time_needed = SYS_ARCH_TIMEOUT;
+     }
+
+-    if (time == SYS_ARCH_TIMEOUT) {
++    if (time_needed == SYS_ARCH_TIMEOUT) {
+       /* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message
+          could be fetched. We should now call the timeout handler and
+          deallocate the memory allocated for the timeout. */
+@@ -107,8 +107,8 @@ sys_mbox_fetch(sys_mbox_t mbox, void **m
+       /* If time != SYS_ARCH_TIMEOUT, a message was received before the timeout
+          occured. The time variable is set to the number of
+          milliseconds we waited for the message. */
+-      if (time < timeouts->next->time) {
+-        timeouts->next->time -= time;
++      if (time_needed < timeouts->next->time) {
++        timeouts->next->time -= time_needed;
+       } else {
+         timeouts->next->time = 0;
+       }
+@@ -125,7 +125,7 @@ sys_mbox_fetch(sys_mbox_t mbox, void **m
+ void
+ sys_sem_wait(sys_sem_t sem)
+ {
+-  u32_t time;
++  u32_t time_needed;
+   struct sys_timeouts *timeouts;
+   struct sys_timeo *tmptimeout;
+   sys_timeout_handler h;
+@@ -139,12 +139,12 @@ sys_sem_wait(sys_sem_t sem)
+     sys_arch_sem_wait(sem, 0);
+   } else {
+     if (timeouts->next->time > 0) {
+-      time = sys_arch_sem_wait(sem, timeouts->next->time);
++      time_needed = sys_arch_sem_wait(sem, timeouts->next->time);
+     } else {
+-      time = SYS_ARCH_TIMEOUT;
++      time_needed = SYS_ARCH_TIMEOUT;
+     }
+
+-    if (time == SYS_ARCH_TIMEOUT) {
++    if (time_needed == SYS_ARCH_TIMEOUT) {
+       /* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message
+         could be fetched. We should now call the timeout handler and
+         deallocate the memory allocated for the timeout. */
+@@ -164,8 +164,8 @@ sys_sem_wait(sys_sem_t sem)
+       /* If time != SYS_ARCH_TIMEOUT, a message was received before the timeout
+          occured. The time variable is set to the number of
+          milliseconds we waited for the message. */
+-      if (time < timeouts->next->time) {
+-        timeouts->next->time -= time;
++      if (time_needed < timeouts->next->time) {
++        timeouts->next->time -= time_needed;
+       } else {
+         timeouts->next->time = 0;
+       }
+Index: src/core/tcp.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/tcp.c,v
+retrieving revision 1.85
+retrieving revision 1.86
+diff -u -p -r1.85 -r1.86
+--- a/src/core/tcp.c	22 Jan 2008 21:15:15 -0000	1.85
++++ b/src/core/tcp.c	26 Mar 2008 11:57:13 -0000	1.86
+@@ -509,7 +509,8 @@ tcp_connect(struct tcp_pcb *pcb, struct
+   pcb->rcv_wnd = TCP_WND;
+   pcb->rcv_ann_wnd = TCP_WND;
+   pcb->snd_wnd = TCP_WND;
+-  /* The send MSS is updated when an MSS option is received. */
++  /* As initial send MSS, we use TCP_MSS but limit it to 536.
++     The send MSS is updated when an MSS option is received. */
+   pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS;
+ #if TCP_CALCULATE_EFF_SEND_MSS
+   pcb->mss = tcp_eff_send_mss(pcb->mss, ipaddr);
+@@ -991,7 +992,8 @@ tcp_alloc(u8_t prio)
+     pcb->rcv_ann_wnd = TCP_WND;
+     pcb->tos = 0;
+     pcb->ttl = TCP_TTL;
+-    /* The send MSS is updated when an MSS option is received. */
++    /* As initial send MSS, we use TCP_MSS but limit it to 536.
++       The send MSS is updated when an MSS option is received. */
+     pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS;
+     pcb->rto = 3000 / TCP_SLOW_INTERVAL;
+     pcb->sa = 0;
+Index: src/core/tcp_in.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/tcp_in.c,v
+retrieving revision 1.97
+retrieving revision 1.100
+diff -u -p -r1.97 -r1.100
+--- a/src/core/tcp_in.c	22 Jan 2008 21:15:15 -0000	1.97
++++ b/src/core/tcp_in.c	24 Jun 2008 15:46:39 -0000	1.100
+@@ -511,7 +511,7 @@ tcp_process(struct tcp_pcb *pcb)
+       }
+     } else {
+       if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
+-                          pcb->rcv_nxt+pcb->rcv_ann_wnd)) {
++                          pcb->rcv_nxt+pcb->rcv_wnd)) {
+         acceptable = 1;
+       }
+     }
+@@ -1038,7 +1038,7 @@ tcp_receive(struct tcp_pcb *pcb)
+        and below rcv_nxt + rcv_wnd) in order to be further
+        processed. */
+     if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
+-                        pcb->rcv_nxt + pcb->rcv_ann_wnd - 1)){
++                        pcb->rcv_nxt + pcb->rcv_wnd - 1)){
+       if (pcb->rcv_nxt == seqno) {
+         accepted_inseq = 1;
+         /* The incoming segment is the next in sequence. We check if
+@@ -1195,14 +1195,14 @@ tcp_receive(struct tcp_pcb *pcb)
+                   } else {
+                     pcb->ooseq = cseg;
+                   }
+-                }
+-                tcp_seg_free(next);
+-                if (cseg->next != NULL) {
+-                  next = cseg->next;
+-                  if (TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
+-                    /* We need to trim the incoming segment. */
+-                    cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
+-                    pbuf_realloc(cseg->p, cseg->len);
++                  tcp_seg_free(next);
++                  if (cseg->next != NULL) {
++                    next = cseg->next;
++                    if (TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
++                      /* We need to trim the incoming segment. */
++                      cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
++                      pbuf_realloc(cseg->p, cseg->len);
++                    }
+                   }
+                 }
+                 break;
+@@ -1282,10 +1282,7 @@ tcp_receive(struct tcp_pcb *pcb)
+
+       }
+     } else {
+-      if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
+-                          pcb->rcv_nxt + pcb->rcv_ann_wnd-1)){
+-        tcp_ack_now(pcb);
+-      }
++      tcp_ack_now(pcb);
+     }
+   } else {
+     /* Segments with length 0 is taken care of here. Segments that
+@@ -1331,7 +1328,8 @@ tcp_parseopt(struct tcp_pcb *pcb)
+         opts[c + 1] == 0x04) {
+         /* An MSS option with the right option length. */
+         mss = (opts[c + 2] << 8) | opts[c + 3];
+-        pcb->mss = mss > TCP_MSS? TCP_MSS: mss;
++        /* Limit the mss to the configured TCP_MSS and prevent division by zero */
++        pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss;
+
+         /* And we are done processing options. */
+         break;
+Index: src/core/ipv4/autoip.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/ipv4/autoip.c,v
+retrieving revision 1.16
+retrieving revision 1.17
+diff -u -p -r1.16 -r1.17
+--- a/src/core/ipv4/autoip.c	26 Jan 2008 16:11:40 -0000	1.16
++++ b/src/core/ipv4/autoip.c	17 Jun 2008 20:16:23 -0000	1.17
+@@ -395,8 +395,8 @@ autoip_arp_reply(struct netif *netif, st
+     /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without
+      * structure packing (not using structure copy which breaks strict-aliasing rules).
+      */
+-    MEMCPY(&sipaddr, &hdr->sipaddr, sizeof(sipaddr));
+-    MEMCPY(&dipaddr, &hdr->dipaddr, sizeof(dipaddr));
++    SMEMCPY(&sipaddr, &hdr->sipaddr, sizeof(sipaddr));
++    SMEMCPY(&dipaddr, &hdr->dipaddr, sizeof(dipaddr));
+
+     if ((netif->autoip->state == AUTOIP_STATE_PROBING) ||
+         ((netif->autoip->state == AUTOIP_STATE_ANNOUNCING) &&
+Index: src/core/ipv4/inet_chksum.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/ipv4/inet_chksum.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -p -r1.4 -r1.5
+--- a/src/core/ipv4/inet_chksum.c	10 Mar 2008 16:12:31 -0000	1.4
++++ b/src/core/ipv4/inet_chksum.c	17 Jun 2008 20:06:25 -0000	1.5
+@@ -41,8 +41,6 @@
+ #include "lwip/inet_chksum.h"
+ #include "lwip/inet.h"
+
+-#include <string.h>
+-
+ /* These are some reference implementations of the checksum algorithm, with the
+  * aim of being simple, correct and fully portable. Checksumming is the
+  * first thing you would want to optimize for your platform. If you create
+@@ -65,6 +63,11 @@
+ # define LWIP_CHKSUM_ALGORITHM 0
+ #endif
+
++/** Like the name says... */
++#define SWAP_BYTES_IN_WORD(w) ((w & 0xff) << 8) | ((w & 0xff00) >> 8)
++/** Split an u32_t in two u16_ts and add them up */
++#define FOLD_U32T(u)          ((u >> 16) + (u & 0x0000ffffUL))
++
+ #if (LWIP_CHKSUM_ALGORITHM == 1) /* Version #1 */
+ /**
+  * lwip checksum
+@@ -86,8 +89,7 @@ lwip_standard_chksum(void *dataptr, u16_
+   acc = 0;
+   /* dataptr may be at odd or even addresses */
+   octetptr = (u8_t*)dataptr;
+-  while (len > 1)
+-  {
++  while (len > 1) {
+     /* declare first octet as most significant
+        thus assume network order, ignoring host order */
+     src = (*octetptr) << 8;
+@@ -98,8 +100,7 @@ lwip_standard_chksum(void *dataptr, u16_
+     acc += src;
+     len -= 2;
+   }
+-  if (len > 0)
+-  {
++  if (len > 0) {
+     /* accumulate remaining octet */
+     src = (*octetptr) << 8;
+     acc += src;
+@@ -154,19 +155,22 @@ lwip_standard_chksum(void *dataptr, int
+   }
+
+   /* Consume left-over byte, if any */
+-  if (len > 0)
++  if (len > 0) {
+     ((u8_t *)&t)[0] = *(u8_t *)ps;;
++  }
+
+   /* Add end bytes */
+   sum += t;
+
+-  /*  Fold 32-bit sum to 16 bits */
+-  while ((sum >> 16) != 0)
+-    sum = (sum & 0xffff) + (sum >> 16);
++  /* Fold 32-bit sum to 16 bits
++     calling this twice is propably faster than if statements... */
++  sum = FOLD_U32T(sum);
++  sum = FOLD_U32T(sum);
+
+   /* Swap if alignment was odd */
+-  if (odd)
+-    sum = ((sum & 0xff) << 8) | ((sum & 0xff00) >> 8);
++  if (odd) {
++    sum = SWAP_BYTES_IN_WORD(sum);
++  }
+
+   return sum;
+ }
+@@ -211,18 +215,20 @@ lwip_standard_chksum(void *dataptr, int
+
+   while (len > 7)  {
+     tmp = sum + *pl++;          /* ping */
+-    if (tmp < sum)
++    if (tmp < sum) {
+       tmp++;                    /* add back carry */
++    }
+
+     sum = tmp + *pl++;          /* pong */
+-    if (sum < tmp)
++    if (sum < tmp) {
+       sum++;                    /* add back carry */
++    }
+
+     len -= 8;
+   }
+
+   /* make room in upper bits */
+-  sum = (sum >> 16) + (sum & 0xffff);
++  sum = FOLD_U32T(sum);
+
+   ps = (u16_t *)pl;
+
+@@ -233,16 +239,20 @@ lwip_standard_chksum(void *dataptr, int
+   }
+
+   /* dangling tail byte remaining? */
+-  if (len > 0)                  /* include odd byte */
++  if (len > 0) {                /* include odd byte */
+     ((u8_t *)&t)[0] = *(u8_t *)ps;
++  }
+
+   sum += t;                     /* add end bytes */
+
+-  while ((sum >> 16) != 0)      /* combine halves */
+-    sum = (sum >> 16) + (sum & 0xffff);
++  /* Fold 32-bit sum to 16 bits
++     calling this twice is propably faster than if statements... */
++  sum = FOLD_U32T(sum);
++  sum = FOLD_U32T(sum);
+
+-  if (odd)
+-    sum = ((sum & 0xff) << 8) | ((sum & 0xff00) >> 8);
++  if (odd) {
++    sum = SWAP_BYTES_IN_WORD(sum);
++  }
+
+   return sum;
+ }
+@@ -277,18 +287,18 @@ inet_chksum_pseudo(struct pbuf *p,
+       (void *)q, (void *)q->next));
+     acc += LWIP_CHKSUM(q->payload, q->len);
+     /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/
+-    while ((acc >> 16) != 0) {
+-      acc = (acc & 0xffffUL) + (acc >> 16);
+-    }
++    /* just executing this next line is probably faster that the if statement needed
++       to check whether we really need to execute it, and does no harm */
++    acc = FOLD_U32T(acc);
+     if (q->len % 2 != 0) {
+       swapped = 1 - swapped;
+-      acc = ((acc & 0xff) << 8) | ((acc & 0xff00UL) >> 8);
++      acc = SWAP_BYTES_IN_WORD(acc);
+     }
+     /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/
+   }
+
+   if (swapped) {
+-    acc = ((acc & 0xff) << 8) | ((acc & 0xff00UL) >> 8);
++    acc = SWAP_BYTES_IN_WORD(acc);
+   }
+   acc += (src->addr & 0xffffUL);
+   acc += ((src->addr >> 16) & 0xffffUL);
+@@ -297,9 +307,10 @@ inet_chksum_pseudo(struct pbuf *p,
+   acc += (u32_t)htons((u16_t)proto);
+   acc += (u32_t)htons(proto_len);
+
+-  while ((acc >> 16) != 0) {
+-    acc = (acc & 0xffffUL) + (acc >> 16);
+-  }
++  /* Fold 32-bit sum to 16 bits
++     calling this twice is propably faster than if statements... */
++  acc = FOLD_U32T(acc);
++  acc = FOLD_U32T(acc);
+   LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): pbuf chain lwip_chksum()=%"X32_F"\n", acc));
+   return (u16_t)~(acc & 0xffffUL);
+ }
+@@ -340,18 +351,17 @@ inet_chksum_pseudo_partial(struct pbuf *
+     chksum_len -= chklen;
+     LWIP_ASSERT("delete me", chksum_len < 0x7fff);
+     /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/
+-    while ((acc >> 16) != 0) {
+-      acc = (acc & 0xffffUL) + (acc >> 16);
+-    }
++    /* fold the upper bit down */
++    acc = FOLD_U32T(acc);
+     if (q->len % 2 != 0) {
+       swapped = 1 - swapped;
+-      acc = ((acc & 0xff) << 8) | ((acc & 0xff00UL) >> 8);
++      acc = SWAP_BYTES_IN_WORD(acc);
+     }
+     /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/
+   }
+
+   if (swapped) {
+-    acc = ((acc & 0xff) << 8) | ((acc & 0xff00UL) >> 8);
++    acc = SWAP_BYTES_IN_WORD(acc);
+   }
+   acc += (src->addr & 0xffffUL);
+   acc += ((src->addr >> 16) & 0xffffUL);
+@@ -360,9 +370,10 @@ inet_chksum_pseudo_partial(struct pbuf *
+   acc += (u32_t)htons((u16_t)proto);
+   acc += (u32_t)htons(proto_len);
+
+-  while ((acc >> 16) != 0) {
+-    acc = (acc & 0xffffUL) + (acc >> 16);
+-  }
++  /* Fold 32-bit sum to 16 bits
++     calling this twice is propably faster than if statements... */
++  acc = FOLD_U32T(acc);
++  acc = FOLD_U32T(acc);
+   LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): pbuf chain lwip_chksum()=%"X32_F"\n", acc));
+   return (u16_t)~(acc & 0xffffUL);
+ }
+@@ -380,13 +391,7 @@ inet_chksum_pseudo_partial(struct pbuf *
+ u16_t
+ inet_chksum(void *dataptr, u16_t len)
+ {
+-  u32_t acc;
+-
+-  acc = LWIP_CHKSUM(dataptr, len);
+-  while ((acc >> 16) != 0) {
+-    acc = (acc & 0xffff) + (acc >> 16);
+-  }
+-  return (u16_t)~(acc & 0xffff);
++  return ~LWIP_CHKSUM(dataptr, len);
+ }
+
+ /**
+@@ -407,17 +412,15 @@ inet_chksum_pbuf(struct pbuf *p)
+   swapped = 0;
+   for(q = p; q != NULL; q = q->next) {
+     acc += LWIP_CHKSUM(q->payload, q->len);
+-    while ((acc >> 16) != 0) {
+-      acc = (acc & 0xffffUL) + (acc >> 16);
+-    }
++    acc = FOLD_U32T(acc);
+     if (q->len % 2 != 0) {
+       swapped = 1 - swapped;
+-      acc = (acc & 0x00ffUL << 8) | (acc & 0xff00UL >> 8);
++      acc = SWAP_BYTES_IN_WORD(acc);
+     }
+   }
+
+   if (swapped) {
+-    acc = ((acc & 0x00ffUL) << 8) | ((acc & 0xff00UL) >> 8);
++    acc = SWAP_BYTES_IN_WORD(acc);
+   }
+   return (u16_t)~(acc & 0xffffUL);
+ }
+Index: src/core/ipv4/ip.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/core/ipv4/ip.c,v
+retrieving revision 1.66
+retrieving revision 1.68
+diff -u -p -r1.66 -r1.68
+--- a/src/core/ipv4/ip.c	14 Jan 2008 20:53:23 -0000	1.66
++++ b/src/core/ipv4/ip.c	17 Jun 2008 19:39:22 -0000	1.68
+@@ -531,9 +531,19 @@ ip_output_if(struct pbuf *p, struct ip_a
+   LWIP_DEBUGF(IP_DEBUG, ("ip_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], netif->num));
+   ip_debug_print(p);
+
+-  LWIP_DEBUGF(IP_DEBUG, ("netif->output()"));
++#if (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
++  if (ip_addr_cmp(dest, &netif->ip_addr)) {
++    /* Packet to self, enqueue it for loopback */
++    LWIP_DEBUGF(IP_DEBUG, ("netif_loop_output()"));
++
++    return netif_loop_output(netif, p, dest);
++  } else
++#endif /* (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) */
++  {
++    LWIP_DEBUGF(IP_DEBUG, ("netif->output()"));
+
+-  return netif->output(netif, p, dest);
++    return netif->output(netif, p, dest);
++  }
+ }
+
+ /**
+Index: src/include/lwip/debug.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/debug.h,v
+retrieving revision 1.37
+retrieving revision 1.39
+diff -u -p -r1.37 -r1.39
+--- a/src/include/lwip/debug.h	22 Sep 2007 11:16:07 -0000	1.37
++++ b/src/include/lwip/debug.h	16 Jul 2008 20:36:22 -0000	1.39
+@@ -61,26 +61,28 @@
+ #define LWIP_DBG_HALT          0x08U
+
+ #ifndef LWIP_NOASSERT
+-#define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
++#define LWIP_ASSERT(message, assertion) do { if(!(assertion)) \
++  LWIP_PLATFORM_ASSERT(message); } while(0)
+ #else  /* LWIP_NOASSERT */
+-#define LWIP_ASSERT(x,y)
++#define LWIP_ASSERT(message, assertion)
+ #endif /* LWIP_NOASSERT */
+
+-/** print "m" message only if "e" is true, and execute "h" expression */
++/** if "expression" isn't true, then print "message" and execute "handler" expression */
+ #ifndef LWIP_ERROR
+-#define LWIP_ERROR(m,e,h) do { if (!(e)) { LWIP_PLATFORM_ASSERT(m); h;}} while(0)
++#define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \
++  LWIP_PLATFORM_ASSERT(message); handler;}} while(0)
+ #endif /* LWIP_ERROR */
+
+ #ifdef LWIP_DEBUG
+ /** print debug message only if debug message type is enabled...
+  *  AND is of correct type AND is at least LWIP_DBG_LEVEL
+  */
+-#define LWIP_DEBUGF(debug,x) do { \
++#define LWIP_DEBUGF(debug, message) do { \
+                                if ( \
+                                    ((debug) & LWIP_DBG_ON) && \
+                                    ((debug) & LWIP_DBG_TYPES_ON) && \
+                                    ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { \
+-                                 LWIP_PLATFORM_DIAG(x); \
++                                 LWIP_PLATFORM_DIAG(message); \
+                                  if ((debug) & LWIP_DBG_HALT) { \
+                                    while(1); \
+                                  } \
+@@ -88,7 +90,7 @@
+                              } while(0)
+
+ #else  /* LWIP_DEBUG */
+-#define LWIP_DEBUGF(debug,x)
++#define LWIP_DEBUGF(debug, message)
+ #endif /* LWIP_DEBUG */
+
+ #endif /* __LWIP_DEBUG_H__ */
+Index: src/include/lwip/err.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/err.h,v
+retrieving revision 1.13
+retrieving revision 1.15
+diff -u -p -r1.13 -r1.15
+--- a/src/include/lwip/err.h	13 Dec 2007 23:06:50 -0000	1.13
++++ b/src/include/lwip/err.h	17 Jun 2008 20:27:32 -0000	1.15
+@@ -33,37 +33,43 @@
+ #define __LWIP_ERR_H__
+
+ #include "lwip/opt.h"
++#include "lwip/arch.h"
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+-typedef s8_t err_t;
++/** Define LWIP_ERR_T in cc.h if you want to use
++ *  a different type for your platform (must be signed). */
++#ifdef LWIP_ERR_T
++typedef LWIP_ERR_T err_t;
++#else /* LWIP_ERR_T */
++ typedef s8_t err_t;
++#endif /* LWIP_ERR_T*/
+
+ /* Definitions for error constants. */
+
+ #define ERR_OK          0    /* No error, everything OK. */
+ #define ERR_MEM        -1    /* Out of memory error.     */
+ #define ERR_BUF        -2    /* Buffer error.            */
+-#define ERR_RTE        -3    /* Routing problem.         */
++#define ERR_TIMEOUT    -3    /* Timeout.                 */
++#define ERR_RTE        -4    /* Routing problem.         */
+
+ #define ERR_IS_FATAL(e) ((e) < ERR_RTE)
+
+-#define ERR_ABRT       -4    /* Connection aborted.      */
+-#define ERR_RST        -5    /* Connection reset.        */
+-#define ERR_CLSD       -6    /* Connection closed.       */
+-#define ERR_CONN       -7    /* Not connected.           */
++#define ERR_ABRT       -5    /* Connection aborted.      */
++#define ERR_RST        -6    /* Connection reset.        */
++#define ERR_CLSD       -7    /* Connection closed.       */
++#define ERR_CONN       -8    /* Not connected.           */
+
+-#define ERR_VAL        -8    /* Illegal value.           */
++#define ERR_VAL        -9    /* Illegal value.           */
+
+-#define ERR_ARG        -9    /* Illegal argument.        */
++#define ERR_ARG        -10   /* Illegal argument.        */
+
+-#define ERR_USE        -10   /* Address in use.          */
++#define ERR_USE        -11   /* Address in use.          */
+
+-#define ERR_IF         -11   /* Low-level netif error    */
+-#define ERR_ISCONN     -12   /* Already connected.       */
+-
+-#define ERR_TIMEOUT    -13   /* Timeout.                 */
++#define ERR_IF         -12   /* Low-level netif error    */
++#define ERR_ISCONN     -13   /* Already connected.       */
+
+ #define ERR_INPROGRESS -14   /* Operation in progress    */
+
+Index: src/include/lwip/mem.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/mem.h,v
+retrieving revision 1.21
+retrieving revision 1.22
+diff -u -p -r1.21 -r1.22
+--- a/src/include/lwip/mem.h	4 Mar 2008 16:31:32 -0000	1.21
++++ b/src/include/lwip/mem.h	30 May 2008 11:37:15 -0000	1.22
+@@ -50,16 +50,16 @@ typedef size_t mem_size_t;
+  * allow these defines to be overridden.
+  */
+ #ifndef mem_free
+-#define mem_free(x) free(x)
++#define mem_free free
+ #endif
+ #ifndef mem_malloc
+-#define mem_malloc(x) malloc(x)
++#define mem_malloc malloc
+ #endif
+ #ifndef mem_calloc
+-#define mem_calloc(x, y) calloc(x, y)
++#define mem_calloc calloc
+ #endif
+ #ifndef mem_realloc
+-#define mem_realloc(x, size) (x)
++#define mem_realloc realloc
+ #endif
+ #else /* MEM_LIBC_MALLOC */
+
+Index: src/include/lwip/netif.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/netif.h,v
+retrieving revision 1.43
+retrieving revision 1.46
+diff -u -p -r1.43 -r1.46
+--- a/src/include/lwip/netif.h	9 Oct 2007 19:59:59 -0000	1.43
++++ b/src/include/lwip/netif.h	19 Jun 2008 16:27:23 -0000	1.46
+@@ -34,6 +34,8 @@
+
+ #include "lwip/opt.h"
+
++#define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
++
+ #include "lwip/err.h"
+
+ #include "lwip/ip_addr.h"
+@@ -165,6 +167,14 @@ struct netif {
+ #if LWIP_NETIF_HWADDRHINT
+   u8_t *addr_hint;
+ #endif /* LWIP_NETIF_HWADDRHINT */
++#if ENABLE_LOOPBACK
++  /* List of packets to be queued for ourselves. */
++  struct pbuf *loop_first;
++  struct pbuf *loop_last;
++#if LWIP_LOOPBACK_MAX_PBUFS
++  u16_t loop_cnt_current;
++#endif /* LWIP_LOOPBACK_MAX_PBUFS */
++#endif /* ENABLE_LOOPBACK */
+ };
+
+ #if LWIP_SNMP
+@@ -242,4 +252,12 @@ void netif_set_link_callback(struct neti
+ }
+ #endif
+
++#if ENABLE_LOOPBACK
++err_t netif_loop_output(struct netif *netif, struct pbuf *p, struct ip_addr *dest_ip);
++void netif_poll(struct netif *netif);
++#if !LWIP_NETIF_LOOPBACK_MULTITHREADING
++void netif_poll_all(void);
++#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */
++#endif /* ENABLE_LOOPBACK */
++
+ #endif /* __LWIP_NETIF_H__ */
+Index: src/include/lwip/opt.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/opt.h,v
+retrieving revision 1.116
+retrieving revision 1.122
+diff -u -p -r1.116 -r1.122
+--- a/src/include/lwip/opt.h	31 Jan 2008 18:19:29 -0000	1.116
++++ b/src/include/lwip/opt.h	30 Jun 2008 18:16:52 -0000	1.122
+@@ -155,6 +155,27 @@
+ #define MEMP_USE_CUSTOM_POOLS           0
+ #endif
+
++/**
++ * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from
++ * interrupt context (or another context that doesn't allow waiting for a
++ * semaphore).
++ * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT,
++ * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs
++ * with each loop so that mem_free can run.
++ *
++ * ATTENTION: As you can see from the above description, this leads to dis-/
++ * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc
++ * can need longer.
++ *
++ * If you don't want that, at least for NO_SYS=0, you can still use the following
++ * functions to enqueue a deallocation call which then runs in the tcpip_thread
++ * context:
++ * - pbuf_free_callback(p);
++ * - mem_free_callback(m);
++ */
++#ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
++#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
++#endif
+
+ /*
+    ------------------------------------------------
+@@ -815,6 +836,39 @@
+ #define LWIP_NETIF_HWADDRHINT           0
+ #endif
+
++/**
++ * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
++ * address equal to the netif IP address, looping them back up the stack.
++ */
++#ifndef LWIP_NETIF_LOOPBACK
++#define LWIP_NETIF_LOOPBACK             0
++#endif
++
++/**
++ * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback
++ * sending for each netif (0 = disabled)
++ */
++#ifndef LWIP_LOOPBACK_MAX_PBUFS
++#define LWIP_LOOPBACK_MAX_PBUFS         0
++#endif
++
++/**
++ * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in
++ * the system, as netifs must change how they behave depending on this setting
++ * for the LWIP_NETIF_LOOPBACK option to work.
++ * Setting this is needed to avoid reentering non-reentrant functions like
++ * tcp_input().
++ *    LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a
++ *       multithreaded environment like tcpip.c. In this case, netif->input()
++ *       is called directly.
++ *    LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
++ *       The packets are put on a list and netif_poll() must be called in
++ *       the main application loop.
++ */
++#ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING
++#define LWIP_NETIF_LOOPBACK_MULTITHREADING    (!NO_SYS)
++#endif
++
+ /*
+    ------------------------------------
+    ---------- LOOPIF options ----------
+@@ -827,20 +881,16 @@
+ #define LWIP_HAVE_LOOPIF                0
+ #endif
+
++/*
++   ------------------------------------
++   ---------- SLIPIF options ----------
++   ------------------------------------
++*/
+ /**
+- * LWIP_LOOPIF_MULTITHREADING: Indicates whether threading is enabled in
+- * the system, as LOOPIF must change how it behaves depending on this setting.
+- * Setting this is needed to avoid reentering non-reentrant functions like
+- * tcp_input().
+- *    LWIP_LOOPIF_MULTITHREADING==1: Indicates that the user is using a
+- *       multithreaded environment like tcpip.c. In this case, netif->input()
+- *       is called directly.
+- *    LWIP_LOOPIF_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
+- *       The packets are put on a list and loopif_poll() must be called in
+- *       the main application loop.
++ * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c
+  */
+-#ifndef LWIP_LOOPIF_MULTITHREADING
+-#define LWIP_LOOPIF_MULTITHREADING      1
++#ifndef LWIP_HAVE_SLIPIF
++#define LWIP_HAVE_SLIPIF                0
+ #endif
+
+ /*
+Index: src/include/lwip/sio.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/sio.h,v
+retrieving revision 1.7
+retrieving revision 1.8
+diff -u -p -r1.7 -r1.8
+--- a/src/include/lwip/sio.h	6 Sep 2007 16:43:44 -0000	1.7
++++ b/src/include/lwip/sio.h	27 Mar 2008 18:06:02 -0000	1.8
+@@ -32,16 +32,24 @@
+  * It needs to be implemented by those platforms which need SLIP or PPP
+  */
+
++#ifndef __SIO_H__
++#define __SIO_H__
++
+ #include "lwip/arch.h"
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
++/* If you want to define sio_fd_t elsewhere or differently,
++   define this in your cc.h file. */
+ #ifndef __sio_fd_t_defined
+ typedef void * sio_fd_t;
+ #endif
+
++/* The following functions can be defined to something else in your cc.h file
++   or be implemented in your custom sio.c file. */
++
+ #ifndef sio_open
+ sio_fd_t sio_open(u8_t);
+ #endif
+@@ -69,3 +77,5 @@ void sio_read_abort(sio_fd_t);
+ #ifdef __cplusplus
+ }
+ #endif
++
++#endif /* __SIO_H__ */
+Index: src/include/lwip/sockets.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/sockets.h,v
+retrieving revision 1.38
+retrieving revision 1.39
+diff -u -p -r1.38 -r1.39
+--- a/src/include/lwip/sockets.h	2 Dec 2007 15:24:02 -0000	1.38
++++ b/src/include/lwip/sockets.h	26 Apr 2008 10:46:23 -0000	1.39
+@@ -177,7 +177,22 @@ typedef struct ip_mreq {
+ } ip_mreq;
+ #endif /* LWIP_IGMP */
+
+-/* Unimplemented for now... */
++/*
++ * The Type of Service provides an indication of the abstract
++ * parameters of the quality of service desired.  These parameters are
++ * to be used to guide the selection of the actual service parameters
++ * when transmitting a datagram through a particular network.  Several
++ * networks offer service precedence, which somehow treats high
++ * precedence traffic as more important than other traffic (generally
++ * by accepting only traffic above a certain precedence at time of high
++ * load).  The major choice is a three way tradeoff between low-delay,
++ * high-reliability, and high-throughput.
++ * The use of the Delay, Throughput, and Reliability indications may
++ * increase the cost (in some sense) of the service.  In many networks
++ * better performance for one of these parameters is coupled with worse
++ * performance on another.  Except for very unusual cases at most two
++ * of these three indications should be set.
++ */
+ #define IPTOS_TOS_MASK          0x1E
+ #define IPTOS_TOS(tos)          ((tos) & IPTOS_TOS_MASK)
+ #define IPTOS_LOWDELAY          0x10
+@@ -187,7 +202,13 @@ typedef struct ip_mreq {
+ #define IPTOS_MINCOST           IPTOS_LOWCOST
+
+ /*
+- * Definitions for IP precedence (also in ip_tos) (Unimplemented)
++ * The Network Control precedence designation is intended to be used
++ * within a network only.  The actual use and control of that
++ * designation is up to each network. The Internetwork Control
++ * designation is intended for use by gateway control originators only.
++ * If the actual use of these precedence designations is of concern to
++ * a particular network, it is the responsibility of that network to
++ * control the access to, and use of, those precedence designations.
+  */
+ #define IPTOS_PREC_MASK                 0xe0
+ #define IPTOS_PREC(tos)                ((tos) & IPTOS_PREC_MASK)
+Index: src/include/lwip/stats.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/stats.h,v
+retrieving revision 1.19
+retrieving revision 1.23
+diff -u -p -r1.19 -r1.23
+--- a/src/include/lwip/stats.h	28 Nov 2007 21:25:07 -0000	1.19
++++ b/src/include/lwip/stats.h	8 Jul 2008 09:15:57 -0000	1.23
+@@ -57,7 +57,6 @@ extern "C" {
+
+ struct stats_proto {
+   STAT_COUNTER xmit;             /* Transmitted packets. */
+-  STAT_COUNTER rexmit;           /* Retransmitted packets. */
+   STAT_COUNTER recv;             /* Received packets. */
+   STAT_COUNTER fw;               /* Forwarded packets. */
+   STAT_COUNTER drop;             /* Dropped packets. */
+@@ -87,7 +86,8 @@ struct stats_mem {
+   mem_size_t avail;
+   mem_size_t used;
+   mem_size_t max;
+-  mem_size_t err;
++  STAT_COUNTER err;
++  STAT_COUNTER illegal;
+ };
+
+ struct stats_syselem {
+@@ -142,64 +142,138 @@ extern struct stats_ lwip_stats;
+ #define stats_init() /* Compatibility define, not init needed. */
+
+ #define STATS_INC(x) ++lwip_stats.x
++#define STATS_DEC(x) --lwip_stats.x
+ #else
+ #define stats_init()
+ #define STATS_INC(x)
++#define STATS_DEC(x)
+ #endif /* LWIP_STATS */
+
+ #if TCP_STATS
+ #define TCP_STATS_INC(x) STATS_INC(x)
++#define TCP_STATS_DISPLAY() stats_display_proto(&lwip_stats.tcp, "TCP")
+ #else
+ #define TCP_STATS_INC(x)
++#define TCP_STATS_DISPLAY()
+ #endif
+
+ #if UDP_STATS
+ #define UDP_STATS_INC(x) STATS_INC(x)
++#define UDP_STATS_DISPLAY() stats_display_proto(&lwip_stats.udp, "UDP")
+ #else
+ #define UDP_STATS_INC(x)
++#define UDP_STATS_DISPLAY()
+ #endif
+
+ #if ICMP_STATS
+ #define ICMP_STATS_INC(x) STATS_INC(x)
++#define ICMP_STATS_DISPLAY() stats_display_proto(&lwip_stats.icmp, "ICMP")
+ #else
+ #define ICMP_STATS_INC(x)
++#define ICMP_STATS_DISPLAY()
+ #endif
+
+ #if IGMP_STATS
+ #define IGMP_STATS_INC(x) STATS_INC(x)
++#define IGMP_STATS_DISPLAY() stats_display_igmp(&lwip_stats.igmp)
+ #else
+ #define IGMP_STATS_INC(x)
++#define IGMP_STATS_DISPLAY()
+ #endif
+
+ #if IP_STATS
+ #define IP_STATS_INC(x) STATS_INC(x)
++#define IP_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip, "IP")
+ #else
+ #define IP_STATS_INC(x)
++#define IP_STATS_DISPLAY()
+ #endif
+
+ #if IPFRAG_STATS
+ #define IPFRAG_STATS_INC(x) STATS_INC(x)
++#define IPFRAG_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG")
+ #else
+ #define IPFRAG_STATS_INC(x)
++#define IPFRAG_STATS_DISPLAY()
+ #endif
+
+ #if ETHARP_STATS
+ #define ETHARP_STATS_INC(x) STATS_INC(x)
++#define ETHARP_STATS_DISPLAY() stats_display_proto(&lwip_stats.etharp, "ETHARP")
+ #else
+ #define ETHARP_STATS_INC(x)
++#define ETHARP_STATS_DISPLAY()
+ #endif
+
+ #if LINK_STATS
+ #define LINK_STATS_INC(x) STATS_INC(x)
++#define LINK_STATS_DISPLAY() stats_display_proto(&lwip_stats.link, "LINK")
+ #else
+ #define LINK_STATS_INC(x)
++#define LINK_STATS_DISPLAY()
++#endif
++
++#if MEM_STATS
++#define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y
++#define MEM_STATS_INC(x) STATS_INC(mem.x)
++#define MEM_STATS_INC_USED(x, y) do { lwip_stats.mem.used += y; \
++                                    if (lwip_stats.mem.max < lwip_stats.mem.used) { \
++                                        lwip_stats.mem.max = lwip_stats.mem.used; \
++                                    } \
++                                 } while(0)
++#define MEM_STATS_DEC_USED(x, y) lwip_stats.mem.x -= y
++#define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP")
++#else
++#define MEM_STATS_AVAIL(x, y)
++#define MEM_STATS_INC(x)
++#define MEM_STATS_INC_USED(x, y)
++#define MEM_STATS_DEC_USED(x, y)
++#define MEM_STATS_DISPLAY()
++#endif
++
++#if MEMP_STATS
++#define MEMP_STATS_AVAIL(x, i, y) lwip_stats.memp[i].x = y
++#define MEMP_STATS_INC(x, i) STATS_INC(memp[i].x)
++#define MEMP_STATS_DEC(x, i) STATS_DEC(memp[i].x)
++#define MEMP_STATS_INC_USED(x, i) do { ++lwip_stats.memp[i].used; \
++                                    if (lwip_stats.memp[i].max < lwip_stats.memp[i].used) { \
++                                        lwip_stats.memp[i].max = lwip_stats.memp[i].used; \
++                                    } \
++                                 } while(0)
++#define MEMP_STATS_DISPLAY(i) stats_display_memp(&lwip_stats.memp[i], i)
++#else
++#define MEMP_STATS_AVAIL(x, i, y)
++#define MEMP_STATS_INC(x, i)
++#define MEMP_STATS_DEC(x, i)
++#define MEMP_STATS_INC_USED(x, i)
++#define MEMP_STATS_DISPLAY(i)
++#endif
++
++#if SYS_STATS
++#define SYS_STATS_INC(x) STATS_INC(sys.x)
++#define SYS_STATS_DEC(x) STATS_DEC(sys.x)
++#define SYS_STATS_DISPLAY() stats_display_sys(&lwip_stats.sys)
++#else
++#define SYS_STATS_INC(x)
++#define SYS_STATS_DEC(x)
++#define SYS_STATS_DISPLAY()
+ #endif
+
+ /* Display of statistics */
+ #if LWIP_STATS_DISPLAY
+ void stats_display(void);
++void stats_display_proto(struct stats_proto *proto, char *name);
++void stats_display_igmp(struct stats_igmp *igmp);
++void stats_display_mem(struct stats_mem *mem, char *name);
++void stats_display_memp(struct stats_mem *mem, int index);
++void stats_display_sys(struct stats_sys *sys);
+ #else
+ #define stats_display()
++#define stats_display_proto(proto, name)
++#define stats_display_igmp(igmp)
++#define stats_display_mem(mem, name)
++#define stats_display_memp(mem, index)
++#define stats_display_sys(sys)
+ #endif /* LWIP_STATS_DISPLAY */
+
+ #ifdef __cplusplus
+Index: src/include/lwip/tcpip.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/lwip/tcpip.h,v
+retrieving revision 1.24
+retrieving revision 1.27
+diff -u -p -r1.24 -r1.27
+--- a/src/include/lwip/tcpip.h	12 Jan 2008 11:52:22 -0000	1.24
++++ b/src/include/lwip/tcpip.h	27 Jun 2008 20:34:55 -0000	1.27
+@@ -83,7 +83,11 @@ err_t tcpip_netifapi_lock(struct netifap
+ #endif /* LWIP_NETIF_API */
+
+ err_t tcpip_callback_with_block(void (*f)(void *ctx), void *ctx, u8_t block);
+-#define tcpip_callback(f,ctx) tcpip_callback_with_block(f,ctx,1)
++#define tcpip_callback(f, ctx)              tcpip_callback_with_block(f, ctx, 1)
++
++/* free pbufs or heap memory from another context without blocking */
++err_t pbuf_free_callback(struct pbuf *p);
++err_t mem_free_callback(void *m);
+
+ err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg);
+ #define tcpip_untimeout(h, arg) tcpip_timeout(0xffffffff, h, arg)
+Index: src/include/netif/loopif.h
+===================================================================
+RCS file: /sources/lwip/lwip/src/include/netif/loopif.h,v
+retrieving revision 1.7
+retrieving revision 1.9
+diff -u -p -r1.7 -r1.9
+--- a/src/include/netif/loopif.h	10 May 2007 10:59:20 -0000	1.7
++++ b/src/include/netif/loopif.h	17 Jun 2008 20:12:22 -0000	1.9
+@@ -32,6 +32,7 @@
+ #ifndef __NETIF_LOOPIF_H__
+ #define __NETIF_LOOPIF_H__
+
++#include "lwip/opt.h"
+ #include "lwip/netif.h"
+ #include "lwip/err.h"
+
+@@ -39,9 +40,9 @@
+ extern "C" {
+ #endif
+
+-#if !LWIP_LOOPIF_MULTITHREADING
+-void loopif_poll(struct netif *netif);
+-#endif
++#if !LWIP_NETIF_LOOPBACK_MULTITHREADING
++#define loopif_poll netif_poll
++#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */
+
+ err_t loopif_init(struct netif *netif);
+
+Index: src/netif/etharp.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/netif/etharp.c,v
+retrieving revision 1.145
+retrieving revision 1.148
+diff -u -p -r1.145 -r1.148
+--- a/src/netif/etharp.c	4 Mar 2008 13:41:24 -0000	1.145
++++ b/src/netif/etharp.c	19 Jun 2008 16:40:59 -0000	1.148
+@@ -353,7 +353,7 @@ find_entry(struct ip_addr *ipaddr, u8_t
+    * 1) empty entry
+    * 2) oldest stable entry
+    * 3) oldest pending entry without queued packets
+-   * 4) oldest pending entry without queued packets
++   * 4) oldest pending entry with queued packets
+    *
+    * { ETHARP_TRY_HARD is set at this point }
+    */
+@@ -1130,7 +1130,14 @@ ethernet_input(struct pbuf *p, struct ne
+
+   /* points to packet payload, which starts with an Ethernet header */
+   ethhdr = p->payload;
+-
++  LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE,
++    ("ethernet_input: dest:%02x:%02x:%02x:%02x:%02x:%02x, src:%02x:%02x:%02x:%02x:%02x:%02x, type:%2hx\n",
++     (unsigned)ethhdr->dest.addr[0], (unsigned)ethhdr->dest.addr[1], (unsigned)ethhdr->dest.addr[2],
++     (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5],
++     (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2],
++     (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5],
++     (unsigned)htons(ethhdr->type)));
++
+   switch (htons(ethhdr->type)) {
+     /* IP packet? */
+     case ETHTYPE_IP:
+@@ -1165,6 +1172,8 @@ ethernet_input(struct pbuf *p, struct ne
+ #endif /* PPPOE_SUPPORT */
+
+     default:
++      ETHARP_STATS_INC(etharp.proterr);
++      ETHARP_STATS_INC(etharp.drop);
+       pbuf_free(p);
+       p = NULL;
+       break;
+Index: src/netif/loopif.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/netif/loopif.c,v
+retrieving revision 1.26
+retrieving revision 1.27
+diff -u -p -r1.26 -r1.27
+--- a/src/netif/loopif.c	31 Aug 2007 10:14:09 -0000	1.26
++++ b/src/netif/loopif.c	12 Jun 2008 20:10:10 -0000	1.27
+@@ -40,149 +40,8 @@
+ #if LWIP_HAVE_LOOPIF
+
+ #include "netif/loopif.h"
+-#include "lwip/pbuf.h"
+ #include "lwip/snmp.h"
+
+-#include <string.h>
+-
+-#if !LWIP_LOOPIF_MULTITHREADING
+-
+-#include "lwip/sys.h"
+-#include "lwip/mem.h"
+-
+-/* helper struct for the linked list of pbufs */
+-struct loopif_private {
+-  struct pbuf *first;
+-  struct pbuf *last;
+-};
+-
+-/**
+- * Call loopif_poll() in the main loop of your application. This is to prevent
+- * reentering non-reentrant functions like tcp_input(). Packets passed to
+- * loopif_output() are put on a list that is passed to netif->input() by
+- * loopif_poll().
+- *
+- * @param netif the lwip network interface structure for this loopif
+- */
+-void
+-loopif_poll(struct netif *netif)
+-{
+-  SYS_ARCH_DECL_PROTECT(lev);
+-  struct pbuf *in, *in_end;
+-  struct loopif_private *priv = (struct loopif_private*)netif->state;
+-
+-  LWIP_ERROR("priv != NULL", (priv != NULL), return;);
+-
+-  do {
+-    /* Get a packet from the list. With SYS_LIGHTWEIGHT_PROT=1, this is protected */
+-    SYS_ARCH_PROTECT(lev);
+-    in = priv->first;
+-    if(in) {
+-      in_end = in;
+-      while(in_end->len != in_end->tot_len) {
+-        LWIP_ASSERT("bogus pbuf: len != tot_len but next == NULL!", in_end->next != NULL);
+-        in_end = in_end->next;
+-      }
+-      /* 'in_end' now points to the last pbuf from 'in' */
+-      if(in_end == priv->last) {
+-        /* this was the last pbuf in the list */
+-        priv->first = priv->last = NULL;
+-      } else {
+-        /* pop the pbuf off the list */
+-        priv->first = in_end->next;
+-        LWIP_ASSERT("should not be null since first != last!", priv->first != NULL);
+-      }
+-    }
+-    SYS_ARCH_UNPROTECT(lev);
+-
+-    if(in != NULL) {
+-      if(in_end->next != NULL) {
+-        /* De-queue the pbuf from its successors on the 'priv' list. */
+-        in_end->next = NULL;
+-      }
+-      if(netif->input(in, netif) != ERR_OK) {
+-        pbuf_free(in);
+-      }
+-      /* Don't reference the packet any more! */
+-      in = NULL;
+-      in_end = NULL;
+-    }
+-  /* go on while there is a packet on the list */
+-  } while(priv->first != NULL);
+-}
+-#endif /* LWIP_LOOPIF_MULTITHREADING */
+-
+-/**
+- * Send an IP packet over the loopback interface.
+- * The pbuf is simply copied and handed back to netif->input.
+- * In multithreaded mode, this is done directly since netif->input must put
+- * the packet on a queue.
+- * In callback mode, the packet is put on an internal queue and is fed to
+- * netif->input by loopif_poll().
+- *
+- * @param netif the lwip network interface structure for this loopif
+- * @param p the (IP) packet to 'send'
+- * @param ipaddr the ip address to send the packet to (not used for loopif)
+- * @return ERR_OK if the packet has been sent
+- *         ERR_MEM if the pbuf used to copy the packet couldn't be allocated
+- */
+-static err_t
+-loopif_output(struct netif *netif, struct pbuf *p,
+-       struct ip_addr *ipaddr)
+-{
+-#if !LWIP_LOOPIF_MULTITHREADING
+-  SYS_ARCH_DECL_PROTECT(lev);
+-  struct loopif_private *priv;
+-  struct pbuf *last;
+-#endif /* LWIP_LOOPIF_MULTITHREADING */
+-  struct pbuf *r;
+-  err_t err;
+-
+-  LWIP_UNUSED_ARG(ipaddr);
+-
+-  /* Allocate a new pbuf */
+-  r = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM);
+-  if (r == NULL) {
+-    return ERR_MEM;
+-  }
+-
+-  /* Copy the whole pbuf queue p into the single pbuf r */
+-  if ((err = pbuf_copy(r, p)) != ERR_OK) {
+-    pbuf_free(r);
+-    r = NULL;
+-    return err;
+-  }
+-
+-#if LWIP_LOOPIF_MULTITHREADING
+-  /* Multithreading environment, netif->input() is supposed to put the packet
+-     into a mailbox, so we can safely call it here without risking to re-enter
+-     functions that are not reentrant (TCP!!!) */
+-  if(netif->input(r, netif) != ERR_OK) {
+-    pbuf_free(r);
+-    r = NULL;
+-  }
+-#else /* LWIP_LOOPIF_MULTITHREADING */
+-  /* Raw API without threads: put the packet on a linked list which gets emptied
+-     through calling loopif_poll(). */
+-  priv = (struct loopif_private*)netif->state;
+-
+-  /* let last point to the last pbuf in chain r */
+-  for (last = r; last->next != NULL; last = last->next);
+-  SYS_ARCH_PROTECT(lev);
+-  if(priv->first != NULL) {
+-    LWIP_ASSERT("if first != NULL, last must also be != NULL", priv->last != NULL);
+-    priv->last->next = r;
+-    priv->last = last;
+-  } else {
+-    priv->first = r;
+-    priv->last = last;
+-  }
+-  SYS_ARCH_UNPROTECT(lev);
+-#endif /* LWIP_LOOPIF_MULTITHREADING */
+-
+-  return ERR_OK;
+-}
+-
+ /**
+  * Initialize a lwip network interface structure for a loopback interface
+  *
+@@ -193,16 +52,6 @@ loopif_output(struct netif *netif, struc
+ err_t
+ loopif_init(struct netif *netif)
+ {
+-#if !LWIP_LOOPIF_MULTITHREADING
+-  struct loopif_private *priv;
+-
+-  priv = (struct loopif_private*)mem_malloc(sizeof(struct loopif_private));
+-  if(priv == NULL)
+-    return ERR_MEM;
+-  priv->first = priv->last = NULL;
+-  netif->state = priv;
+-#endif /* LWIP_LOOPIF_MULTITHREADING */
+-
+   /* initialize the snmp variables and counters inside the struct netif
+    * ifSpeed: no assumption can be made!
+    */
+@@ -210,7 +59,7 @@ loopif_init(struct netif *netif)
+
+   netif->name[0] = 'l';
+   netif->name[1] = 'o';
+-  netif->output = loopif_output;
++  netif->output = netif_loop_output;
+   return ERR_OK;
+ }
+
+Index: src/netif/slipif.c
+===================================================================
+RCS file: /sources/lwip/lwip/src/netif/slipif.c,v
+retrieving revision 1.29
+retrieving revision 1.30
+diff -u -p -r1.29 -r1.30
+--- a/src/netif/slipif.c	30 Nov 2007 17:22:21 -0000	1.29
++++ b/src/netif/slipif.c	17 Jun 2008 20:14:05 -0000	1.30
+@@ -44,6 +44,9 @@
+
+ #include "netif/slipif.h"
+ #include "lwip/opt.h"
++
++#if LWIP_HAVE_SLIPIF
++
+ #include "lwip/def.h"
+ #include "lwip/pbuf.h"
+ #include "lwip/sys.h"
+@@ -273,3 +276,4 @@ slipif_init(struct netif *netif)
+   sys_thread_new(SLIPIF_THREAD_NAME, slipif_loop, netif, SLIPIF_THREAD_STACKSIZE, SLIPIF_THREAD_PRIO);
+   return ERR_OK;
+ }
++#endif /* LWIP_HAVE_SLIPIF */
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/mini-os_udivmoddi4-gcc7.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/mini-os_udivmoddi4-gcc7.patch
new file mode 100644
index 0000000..a3745bd
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/mini-os_udivmoddi4-gcc7.patch
@@ -0,0 +1,43 @@
+From d991bdbc062248221511ecb795617c36b37e1d2e Mon Sep 17 00:00:00 2001
+From: Wei Liu <wei.liu2@citrix.com>
+Date: Wed, 9 Aug 2017 13:15:48 +0100
+Subject: [PATCH] lib/math.c: implement __udivmoddi4
+
+Some code compiled by gcc 7 requires this.
+
+Signed-off-by: Wei Liu <wei.liu2@citrix.com>
+Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+---
+ lib/math.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/lib/math.c b/lib/math.c
+index 561393e..b98cc1d 100644
+--- a/lib/math.c
++++ b/lib/math.c
+@@ -6,6 +6,7 @@
+  *        File: math.c
+  *      Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
+  *     Changes: 
++ *        Implement __udivmoddi4 (Wei Liu <wei.liu2@citrix.com>)
+  *              
+  *        Date: Aug 2003
+  * 
+@@ -397,6 +398,15 @@ __umoddi3(u_quad_t a, u_quad_t b)
+ }
+ 
+ /*
++ * Returns the quotient and places remainder in r
++ */
++u_quad_t
++__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *r)
++{
++	return __qdivrem(a, b, r);
++}
++
++/*
+  * From
+  * moddi3.c
+  */
+--
+2.11.0
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/newlib-chk.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/newlib-chk.patch
new file mode 100644
index 0000000..a5d0149
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/newlib-chk.patch
@@ -0,0 +1,155 @@
+--- a/newlib/libc/stdio/fprintf_chk.c	1969-12-31 19:00:00.000000000 -0500
++++ b/newlib/libc/stdio/fprintf_chk.c	2009-02-26 19:02:53.000000000 -0500
+@@ -0,0 +1,21 @@
++#include <stdarg.h>
++#include <stdio.h>
++
++/*
++ * Stub implementation of __fprintf_chk adapted from glibc 2.7.  This 
++ * doesn't actually implement any buffer overflow protection.  It just makes
++ * the linker happy :)
++*/
++int
++__fprintf_chk (FILE *fp, int flag, const char *format, ...)
++{
++  va_list ap;
++  int done;
++
++  va_start (ap, format);
++  done = vfprintf (fp, format, ap);
++  va_end (ap);
++
++  return done;
++}
++
+--- a/newlib/libc/stdio/Makefile.am	2007-08-02 16:23:06.000000000 -0400
++++ b/newlib/libc/stdio/Makefile.am	2009-02-26 18:14:53.000000000 -0500
+@@ -20,6 +20,7 @@
+ 	flags.c			\
+ 	fopen.c			\
+ 	fprintf.c			\
++	fprintf_chk.c		\
+ 	fputc.c			\
+ 	fputs.c			\
+ 	fread.c			\
+@@ -65,6 +66,7 @@
+ 	sniprintf.c			\
+ 	snprintf.c			\
+ 	sprintf.c			\
++	sprintf_chk.c			\
+ 	sscanf.c			\
+ 	stdio.c			\
+ 	tmpfile.c			\
+--- a/newlib/libc/stdio/Makefile.in	2007-12-19 17:36:38.000000000 -0500
++++ b/newlib/libc/stdio/Makefile.in	2009-02-26 18:43:52.000000000 -0500
+@@ -63,7 +63,8 @@
+ 	lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \
+ 	lib_a-findfp.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \
+ 	lib_a-flags.$(OBJEXT) lib_a-fopen.$(OBJEXT) \
+-	lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \
++	lib_a-fprintf.$(OBJEXT) lib_a-fprintf_chk.$(OBJEXT) \
++	lib_a-fputc.$(OBJEXT) \
+ 	lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \
+ 	lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \
+ 	lib_a-fiscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \
+@@ -86,6 +87,7 @@
+ 	lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \
+ 	lib_a-siscanf.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \
+ 	lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \
++	lib_a-sprintf_chk.$(OBJEXT) \
+ 	lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \
+ 	lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \
+ 	lib_a-ungetc.$(OBJEXT) lib_a-vdiprintf.$(OBJEXT) \
+@@ -122,15 +124,15 @@
+ LTLIBRARIES = $(noinst_LTLIBRARIES)
+ am__objects_4 = clearerr.lo fclose.lo fdopen.lo feof.lo ferror.lo \
+ 	fflush.lo fgetc.lo fgetpos.lo fgets.lo fileno.lo findfp.lo \
+-	fiprintf.lo flags.lo fopen.lo fprintf.lo fputc.lo fputs.lo \
+-	fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
++	fiprintf.lo flags.lo fopen.lo fprintf.lo fprintf_chk.lo fputc.lo \
++	fputs.lo fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
+ 	ftell.lo fvwrite.lo fwalk.lo fwrite.lo getc.lo getchar.lo \
+ 	getc_u.lo getchar_u.lo getdelim.lo getline.lo gets.lo \
+ 	iprintf.lo iscanf.lo makebuf.lo perror.lo printf.lo putc.lo \
+ 	putchar.lo putc_u.lo putchar_u.lo puts.lo refill.lo remove.lo \
+ 	rename.lo rewind.lo rget.lo scanf.lo sccl.lo setbuf.lo \
+ 	setbuffer.lo setlinebuf.lo setvbuf.lo siprintf.lo siscanf.lo \
+-	sniprintf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \
++	sniprintf.lo snprintf.lo sprintf.lo sprintf_chk.lo sscanf.lo stdio.lo \
+ 	tmpfile.lo tmpnam.lo ungetc.lo vdiprintf.lo vdprintf.lo \
+ 	viprintf.lo viscanf.lo vprintf.lo vscanf.lo vsiprintf.lo \
+ 	vsiscanf.lo vsnprintf.lo vsniprintf.lo vsprintf.lo vsscanf.lo \
+@@ -344,6 +346,7 @@
+ 	flags.c			\
+ 	fopen.c			\
+ 	fprintf.c			\
++	fprintf_chk.c			\
+ 	fputc.c			\
+ 	fputs.c			\
+ 	fread.c			\
+@@ -389,6 +392,7 @@
+ 	sniprintf.c			\
+ 	snprintf.c			\
+ 	sprintf.c			\
++	sprintf_chk.c			\
+ 	sscanf.c			\
+ 	stdio.c			\
+ 	tmpfile.c			\
+@@ -508,6 +512,7 @@
+ 	siprintf.def		\
+ 	siscanf.def		\
+ 	sprintf.def		\
++	sprintf_chk.def		\
+ 	sscanf.def		\
+ 	tmpfile.def		\
+ 	tmpnam.def		\
+@@ -678,6 +683,12 @@
+ lib_a-fprintf.obj: fprintf.c
+ 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf.obj `if test -f 'fprintf.c'; then $(CYGPATH_W) 'fprintf.c'; else $(CYGPATH_W) '$(srcdir)/fprintf.c'; fi`
+ 
++lib_a-fprintf_chk.o: fprintf_chk.c
++	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf_chk.o `test -f 'fprintf_chk.c' || echo '$(srcdir)/'`fprintf_chk.c
++
++lib_a-fprintf_chk.obj: fprintf_chk.c
++	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf_chk.obj `if test -f 'fprintf_chk.c'; then $(CYGPATH_W) 'fprintf_chk.c'; else $(CYGPATH_W) '$(srcdir)/fprintf_chk.c'; fi`
++
+ lib_a-fputc.o: fputc.c
+ 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc.o `test -f 'fputc.c' || echo '$(srcdir)/'`fputc.c
+ 
+@@ -948,6 +959,12 @@
+ lib_a-sprintf.obj: sprintf.c
+ 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf.obj `if test -f 'sprintf.c'; then $(CYGPATH_W) 'sprintf.c'; else $(CYGPATH_W) '$(srcdir)/sprintf.c'; fi`
+ 
++lib_a-sprintf_chk.o: sprintf_chk.c
++	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf_chk.o `test -f 'sprintf_chk.c' || echo '$(srcdir)/'`sprintf_chk.c
++
++lib_a-sprintf_chk.obj: sprintf_chk.c
++	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf_chk.obj `if test -f 'sprintf_chk.c'; then $(CYGPATH_W) 'sprintf_chk.c'; else $(CYGPATH_W) '$(srcdir)/sprintf_chk.c'; fi`
++
+ lib_a-sscanf.o: sscanf.c
+ 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sscanf.o `test -f 'sscanf.c' || echo '$(srcdir)/'`sscanf.c
+ 
+--- a/newlib/libc/stdio/sprintf_chk.c	1969-12-31 19:00:00.000000000 -0500
++++ b/newlib/libc/stdio/sprintf_chk.c	2009-02-26 19:02:26.000000000 -0500
+@@ -0,0 +1,21 @@
++#include <stdarg.h>
++#include <stdio.h>
++
++/*
++ * Stub implementation of __sprintf_chk adapted from glibc 2.7.  This 
++ * doesn't actually implement any buffer overflow protection.  It just makes
++ * the linker happy :)
++*/
++int
++__sprintf_chk (char *s, int flags, size_t slen, const char *format, ...)
++{
++  va_list arg;
++  int done;
++
++  va_start (arg, format);
++  done = vsprintf (s, format, arg);
++  va_end (arg);
++
++  return done;
++}
++
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/newlib-stdint-size_max-fix-from-1.17.0.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/newlib-stdint-size_max-fix-from-1.17.0.patch
new file mode 100644
index 0000000..3610d64
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/newlib-stdint-size_max-fix-from-1.17.0.patch
@@ -0,0 +1,16 @@
+--- a/newlib/libc/include/stdint.h.orig	2006-08-17 00:39:43.000000000 +0300
++++ b/newlib/libc/include/stdint.h	2009-08-25 17:33:23.000000000 +0300
+@@ -348,8 +348,11 @@
+ #endif
+ 
+ /* This must match size_t in stddef.h, currently long unsigned int */
+-#define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
+-#define SIZE_MAX __STDINT_EXP(LONG_MAX)
++#ifdef __SIZE_MAX__
++#define SIZE_MAX __SIZE_MAX__
++#else
++#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
++#endif
+ 
+ /* This must match sig_atomic_t in <signal.h> (currently int) */
+ #define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/newlib.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/newlib.patch
new file mode 100644
index 0000000..dbf409a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/newlib.patch
@@ -0,0 +1,727 @@
+There is a mix between longs and long longs.
+
+Index: newlib/libc/include/inttypes.h
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/include/inttypes.h,v
+retrieving revision 1.3
+diff -u -p -r1.3 inttypes.h
+--- a/newlib/libc/include/inttypes.h	16 Dec 2005 19:03:12 -0000	1.3
++++ b/newlib/libc/include/inttypes.h	8 Nov 2007 16:32:44 -0000
+@@ -163,12 +163,12 @@
+ 
+ 
+ /* 64-bit types */
+-#if __have_longlong64
+-#define __PRI64(x) __STRINGIFY(ll##x)
+-#define __SCN64(x) __STRINGIFY(ll##x)
+-#elif __have_long64
++#if __have_long64
+ #define __PRI64(x) __STRINGIFY(l##x)
+ #define __SCN64(x) __STRINGIFY(l##x)
++#elif __have_longlong64
++#define __PRI64(x) __STRINGIFY(ll##x)
++#define __SCN64(x) __STRINGIFY(ll##x)
+ #else
+ #define __PRI64(x) __STRINGIFY(x)
+ #define __SCN64(x) __STRINGIFY(x)
+@@ -217,12 +217,12 @@
+ #endif
+ 
+ /* max-bit types */
+-#if __have_longlong64
+-#define __PRIMAX(x) __STRINGIFY(ll##x)
+-#define __SCNMAX(x) __STRINGIFY(ll##x)
+-#elif __have_long64
++#if __have_long64
+ #define __PRIMAX(x) __STRINGIFY(l##x)
+ #define __SCNMAX(x) __STRINGIFY(l##x)
++#elif __have_longlong64
++#define __PRIMAX(x) __STRINGIFY(ll##x)
++#define __SCNMAX(x) __STRINGIFY(ll##x)
+ #else
+ #define __PRIMAX(x) __STRINGIFY(x)
+ #define __SCNMAX(x) __STRINGIFY(x)
+@@ -242,12 +242,12 @@
+ #define SCNxMAX		__SCNMAX(x)
+ 
+ /* ptr types */
+-#if __have_longlong64
+-#define __PRIPTR(x) __STRINGIFY(ll##x)
+-#define __SCNPTR(x) __STRINGIFY(ll##x)
+-#elif __have_long64
++#if __have_long64
+ #define __PRIPTR(x) __STRINGIFY(l##x)
+ #define __SCNPTR(x) __STRINGIFY(l##x)
++#elif __have_longlong64
++#define __PRIPTR(x) __STRINGIFY(ll##x)
++#define __SCNPTR(x) __STRINGIFY(ll##x)
+ #else
+ #define __PRIPTR(x) __STRINGIFY(x)
+ #define __SCNPTR(x) __STRINGIFY(x)
+
+We don't want u?int32_t to be long as our code assume in a lot of places to be
+int.
+
+Index: newlib/libc/include/stdint.h
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/include/stdint.h,v
+retrieving revision 1.10
+diff -u -p -r1.10 stdint.h
+--- a/newlib/libc/include/stdint.h	16 Aug 2006 21:39:43 -0000	1.10
++++ b/newlib/libc/include/stdint.h	12 Feb 2008 13:07:52 -0000
+@@ -38,7 +38,7 @@ extern "C" {
+ #if __STDINT_EXP(LONG_MAX) > 0x7fffffff
+ #define __have_long64 1
+ #elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
+-#define __have_long32 1
++/* #define __have_long32 1 */
+ #endif
+ 
+ #if __STDINT_EXP(SCHAR_MAX) == 0x7f
+
+Define the basic ia64 jump buffer
+
+Index: newlib/libc/include/sys/config.h
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
+retrieving revision 1.47
+diff -u -p -r1.47 config.h
+--- a/newlib/libc/include/sys/config.h	15 Mar 2007 21:32:12 -0000	1.47
++++ b/newlib/libc/include/sys/config.h	8 Nov 2007 16:32:44 -0000
+@@ -71,6 +71,10 @@
+ #endif
+ #endif
+ 
++#ifndef __DYNAMIC_REENT__
++#define __DYNAMIC_REENT__
++#endif
++
+ #ifdef __mn10200__
+ #define __SMALL_BITFIELDS
+ #endif
+
+Dynamic pointer to our reentrancy zone
+
+Index: newlib/libc/reent/getreent.c
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/reent/getreent.c,v
+retrieving revision 1.2
+diff -u -p -r1.2 getreent.c
+--- a/newlib/libc/reent/getreent.c	7 Sep 2007 00:45:55 -0000	1.2
++++ b/newlib/libc/reent/getreent.c	8 Nov 2007 16:32:44 -0000
+@@ -3,12 +3,20 @@
+ #include <_ansi.h>
+ #include <reent.h>
+ 
++#define weak_alias(name, aliasname) \
++  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
++
+ #ifdef __getreent
+ #undef __getreent
+ #endif
++#ifdef __libc_getreent
++#undef __libc_getreent
++#endif
+ 
+ struct _reent *
+-_DEFUN_VOID(__getreent)
++__libc_getreent (void)
+ {
+   return _impure_ptr;
+ }
++weak_alias(__libc_getreent,__getreent)
++
+
+We can't provide a red zone in mini-os.
+
+Index: newlib/libc/machine/x86_64/memcpy.S
+===================================================================
+RCS file: /cvs/src/src/newlib/libc/machine/x86_64/memcpy.S,v
+retrieving revision 1.1
+diff -u -p -r1.1 memcpy.S
+--- a/newlib/libc/machine/x86_64/memcpy.S	28 Aug 2007 21:56:49 -0000	1.1
++++ b/newlib/libc/machine/x86_64/memcpy.S	8 Nov 2007 16:32:44 -0000
+@@ -30,10 +30,18 @@ quadword_aligned:
+   cmpq    $256, rdx
+   jb      quadword_copy
+ 
++#if 1
++  subq    $32, rsp
++  movq    rax, 24 (rsp)
++  movq    r12, 16 (rsp)
++  movq    r13, 8  (rsp)
++  movq    r14, 0  (rsp)
++#else
+   movq    rax, -8  (rsp)
+   movq    r12, -16 (rsp)
+   movq    r13, -24 (rsp)
+   movq    r14, -32 (rsp)
++#endif
+ 
+   movq    rdx, rcx                /* Copy 128 bytes at a time with minimum cache polution */
+   shrq    $7, rcx
+@@ -89,10 +97,18 @@ loop:
+   movq    rdx, rcx
+   andq    $127, rcx
+   rep     movsb
++#if 1
++  movq    24 (rsp), rax
++  movq    16 (rsp), r12
++  movq    8  (rsp), r13
++  movq    0  (rsp), r14
++  addq    $32, rsp
++#else
+   movq    -8  (rsp), rax
+   movq    -16 (rsp), r12
+   movq    -24 (rsp), r13
+   movq    -32 (rsp), r14
++#endif
+   ret
+ 
+ 
+--- a/newlib/libc/machine/x86_64/x86_64mach.h.orig	2008-07-11 14:57:23.062269000 +0100
++++ b/newlib/libc/machine/x86_64/x86_64mach.h	2008-07-11 14:58:01.262503000 +0100
+@@ -22,81 +22,81 @@
+ 
+ #define REG(x) CONCAT1(__REG_PREFIX__, x)
+ 
+-#define rax REG(rax)
+-#define rbx REG(rbx)
+-#define rcx REG(rcx)
+-#define rdx REG(rdx)
+-#define rsi REG(rsi)
+-#define rdi REG(rdi)
+-#define rbp REG(rbp)
+-#define rsp REG(rsp)
+-
+-#define r8  REG(r8)
+-#define r9  REG(r9)
+-#define r10 REG(r10)
+-#define r11 REG(r11)
+-#define r12 REG(r12)
+-#define r13 REG(r13)
+-#define r14 REG(r14)
+-#define r15 REG(r15)
+-
+-#define eax REG(eax)
+-#define ebx REG(ebx)
+-#define ecx REG(ecx)
+-#define edx REG(edx)
+-#define esi REG(esi)
+-#define edi REG(edi)
+-#define ebp REG(ebp)
+-#define esp REG(esp)
+-
+-#define st0 REG(st)
+-#define st1 REG(st(1))
+-#define st2 REG(st(2))
+-#define st3 REG(st(3))
+-#define st4 REG(st(4))
+-#define st5 REG(st(5))
+-#define st6 REG(st(6))
+-#define st7 REG(st(7))
+-
+-#define ax REG(ax)
+-#define bx REG(bx)
+-#define cx REG(cx)
+-#define dx REG(dx)
+-
+-#define ah REG(ah)
+-#define bh REG(bh)
+-#define ch REG(ch)
+-#define dh REG(dh)
+-
+-#define al REG(al)
+-#define bl REG(bl)
+-#define cl REG(cl)
+-#define dl REG(dl)
+-
+-#define sil REG(sil)
+-
+-#define mm1 REG(mm1)
+-#define mm2 REG(mm2)
+-#define mm3 REG(mm3)
+-#define mm4 REG(mm4)
+-#define mm5 REG(mm5)
+-#define mm6 REG(mm6)
+-#define mm7 REG(mm7)
+-
+-#define xmm0 REG(xmm0)
+-#define xmm1 REG(xmm1)
+-#define xmm2 REG(xmm2)
+-#define xmm3 REG(xmm3)
+-#define xmm4 REG(xmm4)
+-#define xmm5 REG(xmm5)
+-#define xmm6 REG(xmm6)
+-#define xmm7 REG(xmm7)
+-
+-#define cr0 REG(cr0)
+-#define cr1 REG(cr1)
+-#define cr2 REG(cr2)
+-#define cr3 REG(cr3)
+-#define cr4 REG(cr4)
++#define rax %rax
++#define rbx %rbx
++#define rcx %rcx
++#define rdx %rdx
++#define rsi %rsi
++#define rdi %rdi
++#define rbp %rbp
++#define rsp %rsp
++
++#define r8  %r8
++#define r9  %r9
++#define r10 %r10
++#define r11 %r11
++#define r12 %r12
++#define r13 %r13
++#define r14 %r14
++#define r15 %r15
++
++#define eax %eax
++#define ebx %ebx
++#define ecx %ecx
++#define edx %edx
++#define esi %esi
++#define edi %edi
++#define ebp %ebp
++#define esp %esp
++
++#define st0 %st
++#define st1 %st(1)
++#define st2 %st(2)
++#define st3 %st(3)
++#define st4 %st(4)
++#define st5 %st(5)
++#define st6 %st(6)
++#define st7 %st(7)
++
++#define ax %ax
++#define bx %bx
++#define cx %cx
++#define dx %dx
++
++#define ah %ah
++#define bh %bh
++#define ch %ch
++#define dh %dh
++
++#define al %al
++#define bl %bl
++#define cl %cl
++#define dl %dl
++
++#define sil %sil
++
++#define mm1 %mm1
++#define mm2 %mm2
++#define mm3 %mm3
++#define mm4 %mm4
++#define mm5 %mm5
++#define mm6 %mm6
++#define mm7 %mm7
++
++#define xmm0 %xmm0
++#define xmm1 %xmm1
++#define xmm2 %xmm2
++#define xmm3 %xmm3
++#define xmm4 %xmm4
++#define xmm5 %xmm5
++#define xmm6 %xmm6
++#define xmm7 %xmm7
++
++#define cr0 %cr0
++#define cr1 %cr1
++#define cr2 %cr2
++#define cr3 %cr3
++#define cr4 %cr4
+ 
+ #ifdef _I386MACH_NEED_SOTYPE_FUNCTION
+ #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
+--- a/newlib/libc/machine/x86_64/memcpy.S.orig	2008-07-11 15:12:27.494693000 +0100
++++ b/newlib/libc/machine/x86_64/memcpy.S	2008-07-11 15:12:29.448706000 +0100
+@@ -60,14 +60,14 @@
+   movq    48 (rsi), r13
+   movq    56 (rsi), r14
+ 
+-  movntiq rax,    (rdi)
+-  movntiq r8 ,  8 (rdi)
+-  movntiq r9 , 16 (rdi)
+-  movntiq r10, 24 (rdi)
+-  movntiq r11, 32 (rdi)
+-  movntiq r12, 40 (rdi)
+-  movntiq r13, 48 (rdi)
+-  movntiq r14, 56 (rdi)
++  movnti rax,    (rdi)
++  movnti r8 ,  8 (rdi)
++  movnti r9 , 16 (rdi)
++  movnti r10, 24 (rdi)
++  movnti r11, 32 (rdi)
++  movnti r12, 40 (rdi)
++  movnti r13, 48 (rdi)
++  movnti r14, 56 (rdi)
+ 
+   movq     64 (rsi), rax
+   movq     72 (rsi), r8
+@@ -78,14 +78,14 @@
+   movq    112 (rsi), r13
+   movq    120 (rsi), r14
+ 
+-  movntiq rax,  64 (rdi)
+-  movntiq r8 ,  72 (rdi)
+-  movntiq r9 ,  80 (rdi)
+-  movntiq r10,  88 (rdi)
+-  movntiq r11,  96 (rdi)
+-  movntiq r12, 104 (rdi)
+-  movntiq r13, 112 (rdi)
+-  movntiq r14, 120 (rdi)
++  movnti rax,  64 (rdi)
++  movnti r8 ,  72 (rdi)
++  movnti r9 ,  80 (rdi)
++  movnti r10,  88 (rdi)
++  movnti r11,  96 (rdi)
++  movnti r12, 104 (rdi)
++  movnti r13, 112 (rdi)
++  movnti r14, 120 (rdi)
+ 
+   leaq    128 (rsi), rsi
+   leaq    128 (rdi), rdi
+--- a/newlib/libc/machine/i386/i386mach.h	2000-08-28 18:50:06.000000000 +0100
++++ b/newlib/libc/machine/i386/i386mach.h	2008-07-11 15:17:13.874409000 +0100
+@@ -27,46 +27,46 @@
+  
+ #define REG(x) CONCAT1(__REG_PREFIX__, x)
+  
+-#define eax REG(eax)
+-#define ebx REG(ebx)
+-#define ecx REG(ecx)
+-#define edx REG(edx)
+-#define esi REG(esi)
+-#define edi REG(edi)
+-#define ebp REG(ebp)
+-#define esp REG(esp)
+-
+-#define st0 REG(st)
+-#define st1 REG(st(1))
+-#define st2 REG(st(2))
+-#define st3 REG(st(3))
+-#define st4 REG(st(4))
+-#define st5 REG(st(5))
+-#define st6 REG(st(6))
+-#define st7 REG(st(7))
+-
+-#define ax REG(ax)
+-#define bx REG(bx)
+-#define cx REG(cx)
+-#define dx REG(dx)
+-
+-#define ah REG(ah)
+-#define bh REG(bh)
+-#define ch REG(ch)
+-#define dh REG(dh)
+-
+-#define al REG(al)
+-#define bl REG(bl)
+-#define cl REG(cl)
+-#define dl REG(dl)
+-
+-#define mm1 REG(mm1)
+-#define mm2 REG(mm2)
+-#define mm3 REG(mm3)
+-#define mm4 REG(mm4)
+-#define mm5 REG(mm5)
+-#define mm6 REG(mm6)
+-#define mm7 REG(mm7)
++#define eax %eax
++#define ebx %ebx
++#define ecx %ecx
++#define edx %edx
++#define esi %esi
++#define edi %edi
++#define ebp %ebp
++#define esp %esp
++
++#define st0 %st
++#define st1 %st(1)
++#define st2 %st(2)
++#define st3 %st(3)
++#define st4 %st(4)
++#define st5 %st(5)
++#define st6 %st(6)
++#define st7 %st(7)
++
++#define ax %ax
++#define bx %bx
++#define cx %cx
++#define dx %dx
++
++#define ah %ah
++#define bh %bh
++#define ch %ch
++#define dh %dh
++
++#define al %al
++#define bl %bl
++#define cl %cl
++#define dl %dl
++
++#define mm1 %mm1
++#define mm2 %mm2
++#define mm3 %mm3
++#define mm4 %mm4
++#define mm5 %mm5
++#define mm6 %mm6
++#define mm7 %mm7
+ 
+ #ifdef _I386MACH_NEED_SOTYPE_FUNCTION
+ #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
+--- a/newlib/libc/machine/x86_64/memset.S	2007-08-28 22:56:49.000000000 +0100
++++ b/newlib/libc/machine/x86_64/memset.S	2008-07-11 15:16:59.098320000 +0100
+@@ -40,22 +40,22 @@
+ 
+   .p2align 4
+ loop:
+-  movntiq rax,     (rdi)
+-  movntiq rax,   8 (rdi)
+-  movntiq rax,  16 (rdi)
+-  movntiq rax,  24 (rdi)
+-  movntiq rax,  32 (rdi)
+-  movntiq rax,  40 (rdi)
+-  movntiq rax,  48 (rdi)
+-  movntiq rax,  56 (rdi)
+-  movntiq rax,  64 (rdi)
+-  movntiq rax,  72 (rdi)
+-  movntiq rax,  80 (rdi)
+-  movntiq rax,  88 (rdi)
+-  movntiq rax,  96 (rdi)
+-  movntiq rax, 104 (rdi)
+-  movntiq rax, 112 (rdi)
+-  movntiq rax, 120 (rdi)
++  movnti rax,     (rdi)
++  movnti rax,   8 (rdi)
++  movnti rax,  16 (rdi)
++  movnti rax,  24 (rdi)
++  movnti rax,  32 (rdi)
++  movnti rax,  40 (rdi)
++  movnti rax,  48 (rdi)
++  movnti rax,  56 (rdi)
++  movnti rax,  64 (rdi)
++  movnti rax,  72 (rdi)
++  movnti rax,  80 (rdi)
++  movnti rax,  88 (rdi)
++  movnti rax,  96 (rdi)
++  movnti rax, 104 (rdi)
++  movnti rax, 112 (rdi)
++  movnti rax, 120 (rdi)
+ 
+   leaq    128 (rdi), rdi
+ 
+--- a/newlib/libm/machine/i386/i386mach.h.orig	2008-07-11 15:30:37.367227000 +0100
++++ b/newlib/libm/machine/i386/i386mach.h	2008-07-11 15:30:55.232337000 +0100
+@@ -27,46 +27,46 @@
+  
+ #define REG(x) CONCAT1(__REG_PREFIX__, x)
+  
+-#define eax REG(eax)
+-#define ebx REG(ebx)
+-#define ecx REG(ecx)
+-#define edx REG(edx)
+-#define esi REG(esi)
+-#define edi REG(edi)
+-#define ebp REG(ebp)
+-#define esp REG(esp)
+-
+-#define st0 REG(st)
+-#define st1 REG(st(1))
+-#define st2 REG(st(2))
+-#define st3 REG(st(3))
+-#define st4 REG(st(4))
+-#define st5 REG(st(5))
+-#define st6 REG(st(6))
+-#define st7 REG(st(7))
+-
+-#define ax REG(ax)
+-#define bx REG(bx)
+-#define cx REG(cx)
+-#define dx REG(dx)
+-
+-#define ah REG(ah)
+-#define bh REG(bh)
+-#define ch REG(ch)
+-#define dh REG(dh)
+-
+-#define al REG(al)
+-#define bl REG(bl)
+-#define cl REG(cl)
+-#define dl REG(dl)
+-
+-#define mm1 REG(mm1)
+-#define mm2 REG(mm2)
+-#define mm3 REG(mm3)
+-#define mm4 REG(mm4)
+-#define mm5 REG(mm5)
+-#define mm6 REG(mm6)
+-#define mm7 REG(mm7)
++#define eax %eax
++#define ebx %ebx
++#define ecx %ecx
++#define edx %edx
++#define esi %esi
++#define edi %edi
++#define ebp %ebp
++#define esp %esp
++
++#define st0 %st
++#define st1 %st(1)
++#define st2 %st(2)
++#define st3 %st(3)
++#define st4 %st(4)
++#define st5 %st(5)
++#define st6 %st(6)
++#define st7 %st(7)
++
++#define ax %ax
++#define bx %bx
++#define cx %cx
++#define dx %dx
++
++#define ah %ah
++#define bh %bh
++#define ch %ch
++#define dh %dh
++
++#define al %al
++#define bl %bl
++#define cl %cl
++#define dl %dl
++
++#define mm1 %mm1
++#define mm2 %mm2
++#define mm3 %mm3
++#define mm4 %mm4
++#define mm5 %mm5
++#define mm6 %mm6
++#define mm7 %mm7
+ 
+ #ifdef _I386MACH_NEED_SOTYPE_FUNCTION
+ #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
+
+
+We want to have a 64bit offsets libc even on 32bit platforms.
+
+--- ./newlib/configure.host.orig	2008-08-07 16:01:17.801946000 +0100
++++ ./newlib/configure.host	2008-08-07 16:01:34.181064000 +0100
+@@ -317,6 +317,8 @@
+     oext=lo
+     lpfx=
+     aext=la ;;
++  i[34567]86-xen-elf)
++    stdio64_dir=stdio64 ;;
+   *) ;; #shared library not supported for ${host}
+ esac
+ 
+--- a/newlib/libc/include/sys/_types.h.orig	2008-08-07 15:22:44.925008000 +0100
++++ b/newlib/libc/include/sys/_types.h	2008-08-07 15:22:50.824044000 +0100
+@@ -13,8 +13,12 @@
+ #include <sys/lock.h>
+ 
+ #ifndef __off_t_defined
++#ifdef __MINIOS__
++typedef long long _off_t;
++#else
+ typedef long _off_t;
+ #endif
++#endif
+ 
+ #if defined(__rtems__)
+ /* device numbers are 32-bit major and and 32-bit minor */
+--- ./newlib/libc/include/sys/config.h.orig	2008-08-07 14:43:25.915866000 +0100
++++ ./newlib/libc/include/sys/config.h	2008-08-07 14:44:13.508154000 +0100
+@@ -69,6 +69,10 @@
+ /* we use some glibc header files so turn on glibc large file feature */
+ #define _LARGEFILE64_SOURCE 1
+ #endif
++#ifdef __MINIOS__
++#define __LARGE64_FILES 1
++#define _LARGEFILE64_SOURCE 1
++#endif
+ #endif
+ 
+ #ifndef __DYNAMIC_REENT__
+--- ./newlib/libc/include/sys/_default_fcntl.h.orig	2008-08-07 15:08:22.377836000 +0100
++++ ./newlib/libc/include/sys/_default_fcntl.h	2008-08-07 15:08:31.651890000 +0100
+@@ -170,7 +170,11 @@
+ /* Provide _<systemcall> prototypes for functions provided by some versions
+    of newlib.  */
+ #ifdef _COMPILING_NEWLIB
+-extern int _open _PARAMS ((const char *, int, ...));
++extern int _open _PARAMS ((const char *, int, ...))
++#ifdef __MINIOS__
++    asm("open64")
++#endif
++    ;
+ extern int _fcntl _PARAMS ((int, int, ...));
+ #ifdef __LARGE64_FILES
+ extern int _open64 _PARAMS ((const char *, int, ...));
+--- ./newlib/libc/include/sys/unistd.h.orig	2008-08-07 15:09:36.449280000 +0100
++++ ./newlib/libc/include/sys/unistd.h	2008-08-07 15:09:51.210370000 +0100
+@@ -101,7 +101,11 @@
+ int     _EXFUN(link, (const char *__path1, const char *__path2 ));
+ int	_EXFUN(nice, (int __nice_value ));
+ #if !defined(__INSIDE_CYGWIN__)
+-off_t   _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
++off_t   _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ))
++#ifdef __MINIOS__
++    asm("lseek64")
++#endif
++    ;
+ #endif
+ #if defined(__SPU__)
+ #define F_ULOCK	0
+--- ./newlib/libc/include/sys/stat.h.orig	2008-08-07 16:08:50.495116000 +0100
++++ ./newlib/libc/include/sys/stat.h	2008-08-07 16:10:21.799753000 +0100
+@@ -49,6 +49,9 @@
+   long	st_spare4[2];
+ #endif
+ };
++#ifdef __MINIOS__
++#define stat64 stat
++#endif
+ #endif
+ 
+ #define	_IFMT		0170000	/* type of file */
+@@ -132,7 +135,11 @@
+ /* Provide prototypes for most of the _<systemcall> names that are
+    provided in newlib for some compilers.  */
+ #ifdef _COMPILING_NEWLIB
+-int	_EXFUN(_fstat,( int __fd, struct stat *__sbuf ));
++int	_EXFUN(_fstat,( int __fd, struct stat *__sbuf ))
++#ifdef __MINIOS__
++    asm("fstat64")
++#endif
++    ;
+ int	_EXFUN(_stat,( const char *__path, struct stat *__sbuf ));
+ #ifdef __LARGE64_FILES
+ struct stat64;
+--- ./newlib/libc/include/_syslist.h.orig	2008-08-07 16:24:19.122605000 +0100
++++ ./newlib/libc/include/_syslist.h	2008-08-07 16:24:21.548628000 +0100
+@@ -14,6 +14,7 @@
+ #define _kill kill
+ #define _link link
+ #define _lseek lseek
++#define _lseek64 lseek64
+ #define _open open
+ #define _read read
+ #define _sbrk sbrk
+--- a/newlib/libc/include/reent.h.orig	2008-08-07 16:28:49.846502000 +0100
++++ b/newlib/libc/include/reent.h	2008-08-07 16:29:02.096586000 +0100
+@@ -87,6 +87,9 @@
+ #if defined(__CYGWIN__) && defined(_COMPILING_NEWLIB)
+ #define stat64 __stat64
+ #endif
++#if defined(__MINIOS__)
++#define stat64 stat
++#endif
+ 
+ struct stat64;
+ 
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/polarssl.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/polarssl.patch
new file mode 100644
index 0000000..9548730
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/polarssl.patch
@@ -0,0 +1,64 @@
+diff -Naur polarssl-1.1.4/include/polarssl/config.h polarssl-x86_64/include/polarssl/config.h
+--- a/include/polarssl/config.h	2011-12-22 05:06:27.000000000 -0500
++++ b/include/polarssl/config.h	2012-10-30 17:18:07.567001000 -0400
+@@ -164,8 +164,8 @@
+  * application.
+  *
+  * Uncomment this macro to prevent loading of default entropy functions.
+-#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
+  */
++#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
+
+ /**
+  * \def POLARSSL_NO_PLATFORM_ENTROPY
+@@ -175,8 +175,8 @@
+  * standards like the /dev/urandom or Windows CryptoAPI.
+  *
+  * Uncomment this macro to disable the built-in platform entropy functions.
+-#define POLARSSL_NO_PLATFORM_ENTROPY
+  */
++#define POLARSSL_NO_PLATFORM_ENTROPY
+
+ /**
+  * \def POLARSSL_PKCS1_V21
+@@ -426,8 +426,8 @@
+  * Requires: POLARSSL_TIMING_C
+  *
+  * This module enables the HAVEGE random number generator.
+- */
+ #define POLARSSL_HAVEGE_C
++ */
+
+ /**
+  * \def POLARSSL_MD_C
+@@ -490,7 +490,7 @@
+  *
+  * This module provides TCP/IP networking routines.
+  */
+-#define POLARSSL_NET_C
++//#define POLARSSL_NET_C
+
+ /**
+  * \def POLARSSL_PADLOCK_C
+@@ -644,8 +644,8 @@
+  * Caller:  library/havege.c
+  *
+  * This module is used by the HAVEGE random number generator.
+- */
+ #define POLARSSL_TIMING_C
++ */
+
+ /**
+  * \def POLARSSL_VERSION_C
+diff -Naur polarssl-1.1.4/library/bignum.c polarssl-x86_64/library/bignum.c
+--- a/library/bignum.c	2012-04-29 16:15:55.000000000 -0400
++++ b/library/bignum.c	2012-10-30 17:21:52.135000999 -0400
+@@ -1101,7 +1101,7 @@
+             Z.p[i - t - 1] = ~0;
+         else
+         {
+-#if defined(POLARSSL_HAVE_LONGLONG)
++#if 0 //defined(POLARSSL_HAVE_LONGLONG)
+             t_udbl r;
+
+             r  = (t_udbl) X.p[i] << biL;
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/tpmemu-0.7.4.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/tpmemu-0.7.4.patch
new file mode 100644
index 0000000..622b34f
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/tpmemu-0.7.4.patch
@@ -0,0 +1,12 @@
+diff -Naur tpm_emulator-x86_64-back/tpm/tpm_emulator_extern.c tpm_emulator-x86_64/tpm/tpm_emulator_extern.c
+--- a/tpm/tpm_emulator_extern.c	2012-04-27 10:55:46.581963398 -0400
++++ b/tpm/tpm_emulator_extern.c	2012-04-27 10:56:02.193034152 -0400
+@@ -249,7 +249,7 @@
+ #else /* TPM_NO_EXTERN */
+
+ int (*tpm_extern_init)(void)                                      = NULL;
+-int (*tpm_extern_release)(void)                                   = NULL;
++void (*tpm_extern_release)(void)                                   = NULL;
+ void* (*tpm_malloc)(size_t size)                                  = NULL;
+ void (*tpm_free)(/*const*/ void *ptr)                             = NULL;
+ void (*tpm_log)(int priority, const char *fmt, ...)               = NULL;
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-bufsize.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-bufsize.patch
new file mode 100644
index 0000000..9c9304c
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-bufsize.patch
@@ -0,0 +1,13 @@
+diff --git a/config.h.in b/config.h.in
+index d16a997..8088a2a 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -27,7 +27,7 @@
+ #define TPM_STORAGE_NAME "${TPM_STORAGE_NAME}"
+ #define TPM_DEVICE_NAME  "${TPM_DEVICE_NAME}"
+ #define TPM_LOG_FILE     "${TPM_LOG_FILE}"
+-#define TPM_CMD_BUF_SIZE 4096
++#define TPM_CMD_BUF_SIZE 4088
+ 
+ #endif /* _CONFIG_H_ */
+ 
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-cmake-Wextra.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-cmake-Wextra.patch
new file mode 100644
index 0000000..5fee4e9
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-cmake-Wextra.patch
@@ -0,0 +1,21 @@
+---
+ CMakeLists.txt |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: tpm_emulator-x86_64/CMakeLists.txt
+===================================================================
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,10 +40,11 @@ set(TPM_STORAGE_NAME "/var/lib/tpm/tpm_e
+ set(TPM_DEVICE_NAME "/dev/tpm")
+ endif()
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+-add_definitions(-Wall -Werror -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings)
++add_definitions(-Wall -Werror)
+ if("${CMAKE_SYSTEM}" MATCHES "Linux")
+     add_definitions(-Wextra)
+ endif()
++add_definitions(-Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings)
+ if(USE_OPENSSL)
+     add_definitions(-DUSE_OPENSSL)
+ endif()
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-deepquote-anyloc.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-deepquote-anyloc.patch
new file mode 100644
index 0000000..7b37d51
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-deepquote-anyloc.patch
@@ -0,0 +1,127 @@
+diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
+index 69511d1..7545d51 100644
+--- a/tpm/tpm_cmd_handler.c
++++ b/tpm/tpm_cmd_handler.c
+@@ -3347,12 +3347,13 @@ static TPM_RESULT execute_TPM_DeepQuote(TPM_REQUEST *req, TPM_RESPONSE *rsp)
+ {
+ 	TPM_NONCE nonce;
+ 	TPM_RESULT res;
+-	UINT32 sigSize;
+-	BYTE *sig;
++	UINT32 quote_blob_size;
++	BYTE *quote_blob;
+ 	BYTE *ptr;
+ 	UINT32 len;
+ 	TPM_PCR_SELECTION myPCR;
+ 	TPM_PCR_SELECTION ptPCR;
++	UINT32 extraInfoFlags = 0;
+ 
+ 	tpm_compute_in_param_digest(req);
+ 
+@@ -3361,17 +3362,19 @@ static TPM_RESULT execute_TPM_DeepQuote(TPM_REQUEST *req, TPM_RESPONSE *rsp)
+ 	if (tpm_unmarshal_TPM_NONCE(&ptr, &len, &nonce)
+ 		|| tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &myPCR)
+ 		|| tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &ptPCR)
++		|| tpm_unmarshal_TPM_DEEP_QUOTE_INFO(&ptr, &len, &extraInfoFlags)
+ 		|| len != 0) return TPM_BAD_PARAMETER;
+ 
+-	res = TPM_DeepQuote(&nonce, &myPCR, &ptPCR, &req->auth1, &sigSize, &sig);
++	res = TPM_DeepQuote(&nonce, &myPCR, &ptPCR, &req->auth1, extraInfoFlags,
++		&quote_blob_size, &quote_blob);
+ 	if (res != TPM_SUCCESS) return res;
+-	rsp->paramSize = len = sigSize;
++	rsp->paramSize = len = quote_blob_size;
+ 	rsp->param = ptr = tpm_malloc(len);
+-	if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, sig, sigSize)) {
++	if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, quote_blob, quote_blob_size)) {
+ 		tpm_free(rsp->param);
+ 		res = TPM_FAIL;
+ 	}
+-	tpm_free(sig);
++	tpm_free(quote_blob);
+ 
+ 	return res;
+ }
+diff --git a/tpm/tpm_commands.h b/tpm/tpm_commands.h
+index 328d1be..a56dd5f 100644
+--- a/tpm/tpm_commands.h
++++ b/tpm/tpm_commands.h
+@@ -3077,6 +3077,7 @@ TPM_RESULT TPM_ParentSignEK(
+  * @myPCR: [in] PCR selection for the virtual TPM
+  * @ptPCR: [in] PCR selection for the hardware TPM
+  * @auth1: [in, out] Authorization protocol parameters
++ * @extraInfoFlags [in] Flags for including, kernel hash, group info, etc
+  * @sigSize: [out] The length of the returned digital signature
+  * @sig: [out] The resulting digital signature and PCR values
+  * Returns: TPM_SUCCESS on success, a TPM error code otherwise.
+@@ -3086,6 +3087,7 @@ TPM_RESULT TPM_DeepQuote(
+   TPM_PCR_SELECTION *myPCR,
+   TPM_PCR_SELECTION *ptPCR,
+   TPM_AUTH *auth1,
++  UINT32 extraInfoFlags,
+   UINT32 *sigSize,
+   BYTE **sig
+ );
+diff --git a/tpm/tpm_credentials.c b/tpm/tpm_credentials.c
+index c0d62e7..6586c22 100644
+--- a/tpm/tpm_credentials.c
++++ b/tpm/tpm_credentials.c
+@@ -183,7 +183,8 @@ TPM_RESULT TPM_OwnerReadInternalPub(TPM_KEY_HANDLE keyHandle, TPM_AUTH *auth1,
+ 
+ int endorsementKeyFresh = 0;
+ 
+-TPM_RESULT VTPM_GetParentQuote(TPM_DIGEST* data, TPM_PCR_SELECTION *sel, UINT32 *sigSize, BYTE **sig);
++TPM_RESULT VTPM_GetParentQuote(TPM_NONCE *data, TPM_PCR_SELECTION *sel,
++                               UINT32 extraInfoFlags, UINT32 *sigSize, BYTE **sig);
+ 
+ TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
+                             TPM_AUTH *auth1, UINT32 *sigSize, BYTE **sig)
+@@ -191,7 +192,7 @@ TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
+ 	TPM_PUBKEY pubKey;
+ 	TPM_RESULT res;
+ 	TPM_DIGEST hres;
+-
++	UINT32 extraInfoFlags = 0;
+ 	info("TPM_ParentSignEK()");
+ 
+ 	res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER);
+@@ -206,7 +207,7 @@ TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
+ 		res = TPM_FAIL;
+ 
+ 	if (res == TPM_SUCCESS)
+-		res = VTPM_GetParentQuote(&hres, sel, sigSize, sig);
++		res = VTPM_GetParentQuote((TPM_NONCE*)&hres, sel, extraInfoFlags, sigSize, sig);
+ 
+ 	free_TPM_PUBKEY(pubKey);
+ 	return res;
+@@ -218,7 +219,7 @@ static const BYTE dquot_hdr[] = {
+ 
+ TPM_RESULT TPM_DeepQuote(TPM_NONCE *externalData, TPM_PCR_SELECTION *myPCR,
+                          TPM_PCR_SELECTION *ptPCR, TPM_AUTH *auth1,
+-                         UINT32 *sigSize, BYTE **sig)
++                         UINT32 extraInfoFlags, UINT32 *quote_blob_size, BYTE **quote_blob)
+ {
+   TPM_RESULT res;
+   TPM_DIGEST hres;
+@@ -253,7 +254,7 @@ TPM_RESULT TPM_DeepQuote(TPM_NONCE *externalData, TPM_PCR_SELECTION *myPCR,
+ 
+   tpm_free(buf);
+ 
+-	res = VTPM_GetParentQuote(&hres, ptPCR, sigSize, sig);
++  res = VTPM_GetParentQuote((TPM_NONCE*)&hres, ptPCR, extraInfoFlags, quote_blob_size, quote_blob);
+ 
+   return res;
+ }
+diff --git a/tpm/tpm_marshalling.h b/tpm/tpm_marshalling.h
+index d510ebe..2e0c008 100644
+--- a/tpm/tpm_marshalling.h
++++ b/tpm/tpm_marshalling.h
+@@ -268,6 +268,8 @@ static inline int tpm_unmarshal_BOOL(BYTE **ptr, UINT32 *length, BOOL *v)
+ #define tpm_unmarshal_TPM_REDIR_COMMAND        tpm_unmarshal_UINT32
+ #define tpm_marshal_DAAHANDLE                  tpm_marshal_UINT32
+ #define tpm_unmarshal_DAAHANDLE                tpm_unmarshal_UINT32
++#define tpm_marshal_TPM_DEEP_QUOTE_INFO        tpm_marshal_UINT32
++#define tpm_unmarshal_TPM_DEEP_QUOTE_INFO      tpm_unmarshal_UINT32
+ 
+ int tpm_marshal_UINT32_ARRAY(BYTE **ptr, UINT32 *length, UINT32 *v, UINT32 n);
+ int tpm_unmarshal_UINT32_ARRAY(BYTE **ptr, UINT32 *length, UINT32 *v, UINT32 n);
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-deepquote.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-deepquote.patch
new file mode 100644
index 0000000..6344f38
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-deepquote.patch
@@ -0,0 +1,187 @@
+diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
+index 0fabf98..69511d1 100644
+--- a/tpm/tpm_cmd_handler.c
++++ b/tpm/tpm_cmd_handler.c
+@@ -3343,6 +3343,39 @@ static TPM_RESULT execute_TPM_ParentSignEK(TPM_REQUEST *req, TPM_RESPONSE *rsp)
+ 	return res;
+ }
+ 
++static TPM_RESULT execute_TPM_DeepQuote(TPM_REQUEST *req, TPM_RESPONSE *rsp)
++{
++	TPM_NONCE nonce;
++	TPM_RESULT res;
++	UINT32 sigSize;
++	BYTE *sig;
++	BYTE *ptr;
++	UINT32 len;
++	TPM_PCR_SELECTION myPCR;
++	TPM_PCR_SELECTION ptPCR;
++
++	tpm_compute_in_param_digest(req);
++
++	ptr = req->param;
++	len = req->paramSize;
++	if (tpm_unmarshal_TPM_NONCE(&ptr, &len, &nonce)
++		|| tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &myPCR)
++		|| tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &ptPCR)
++		|| len != 0) return TPM_BAD_PARAMETER;
++
++	res = TPM_DeepQuote(&nonce, &myPCR, &ptPCR, &req->auth1, &sigSize, &sig);
++	if (res != TPM_SUCCESS) return res;
++	rsp->paramSize = len = sigSize;
++	rsp->param = ptr = tpm_malloc(len);
++	if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, sig, sigSize)) {
++		tpm_free(rsp->param);
++		res = TPM_FAIL;
++	}
++	tpm_free(sig);
++
++	return res;
++}
++
+ static void tpm_setup_rsp_auth(TPM_COMMAND_CODE ordinal, TPM_RESPONSE *rsp) 
+ {
+   tpm_hmac_ctx_t hmac;
+@@ -4098,6 +4131,11 @@ void tpm_execute_command(TPM_REQUEST *req, TPM_RESPONSE *rsp)
+       res = execute_TPM_ParentSignEK(req, rsp);
+     break;
+ 
++    case TPM_ORD_DeepQuote:
++      debug("[TPM_ORD_DeepQuote]");
++      res = execute_TPM_DeepQuote(req, rsp);
++    break;
++
+     default:
+ #ifdef MTM_EMULATOR
+       res = mtm_execute_command(req, rsp);
+diff --git a/tpm/tpm_commands.h b/tpm/tpm_commands.h
+index 7fef934..328d1be 100644
+--- a/tpm/tpm_commands.h
++++ b/tpm/tpm_commands.h
+@@ -3071,6 +3071,25 @@ TPM_RESULT TPM_ParentSignEK(
+   BYTE **sig
+ );
+ 
++/**
++ * TPM_DeepQuote - gets a hardware TPM quote of a vTPM's PCRs
++ * @externalData: [in] AntiReplay nonce to prevent replay of messages
++ * @myPCR: [in] PCR selection for the virtual TPM
++ * @ptPCR: [in] PCR selection for the hardware TPM
++ * @auth1: [in, out] Authorization protocol parameters
++ * @sigSize: [out] The length of the returned digital signature
++ * @sig: [out] The resulting digital signature and PCR values
++ * Returns: TPM_SUCCESS on success, a TPM error code otherwise.
++ */
++TPM_RESULT TPM_DeepQuote(
++  TPM_NONCE *externalData,
++  TPM_PCR_SELECTION *myPCR,
++  TPM_PCR_SELECTION *ptPCR,
++  TPM_AUTH *auth1,
++  UINT32 *sigSize,
++  BYTE **sig
++);
++
+ /*
+  * Error handling
+  * [tpm_error.c]
+diff --git a/tpm/tpm_credentials.c b/tpm/tpm_credentials.c
+index 01f29e6..c0d62e7 100644
+--- a/tpm/tpm_credentials.c
++++ b/tpm/tpm_credentials.c
+@@ -211,3 +211,49 @@ TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
+ 	free_TPM_PUBKEY(pubKey);
+ 	return res;
+ }
++
++static const BYTE dquot_hdr[] = {
++	0, 0, 0, 0, 'D', 'Q', 'U', 'T'
++};
++
++TPM_RESULT TPM_DeepQuote(TPM_NONCE *externalData, TPM_PCR_SELECTION *myPCR,
++                         TPM_PCR_SELECTION *ptPCR, TPM_AUTH *auth1,
++                         UINT32 *sigSize, BYTE **sig)
++{
++	TPM_RESULT res;
++	TPM_DIGEST hres;
++	TPM_PCR_INFO_SHORT pcrData;
++	tpm_sha1_ctx_t ctx;
++	BYTE *buf, *ptr;
++	UINT32 size, len;
++
++	info("TPM_DeepQuote()");
++
++	res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER);
++	if (res != TPM_SUCCESS) return res;
++
++	res = tpm_compute_pcr_digest(myPCR, &pcrData.digestAtRelease, NULL);
++	if (res != TPM_SUCCESS) return res;
++
++	pcrData.pcrSelection.sizeOfSelect = myPCR->sizeOfSelect;
++	memcpy(pcrData.pcrSelection.pcrSelect, myPCR->pcrSelect, myPCR->sizeOfSelect);
++	pcrData.localityAtRelease = 1 << tpmData.stany.flags.localityModifier;
++
++	size = len = sizeof_TPM_PCR_INFO_SHORT(pcrData);
++	buf = ptr = tpm_malloc(size);
++	if (buf == NULL) return TPM_NOSPACE;
++	if (tpm_marshal_TPM_PCR_INFO_SHORT(&ptr, &len, &pcrData))
++		return TPM_FAIL;
++
++	tpm_sha1_init(&ctx);
++	tpm_sha1_update(&ctx, dquot_hdr, 8);
++	tpm_sha1_update(&ctx, externalData->nonce, 20);
++	tpm_sha1_update(&ctx, buf, size);
++	tpm_sha1_final(&ctx, hres.digest);
++
++	tpm_free(buf);
++
++	res = VTPM_GetParentQuote(&hres, ptPCR, sigSize, sig);
++
++	return res;
++}
+diff --git a/tpm/tpm_structures.h b/tpm/tpm_structures.h
+index b0f4625..dfb1894 100644
+--- a/tpm/tpm_structures.h
++++ b/tpm/tpm_structures.h
+@@ -660,6 +660,42 @@ typedef struct tdTPM_CMK_MA_APPROVAL {
+ 
+ /* VTPM-only commands: */
+ /*
++ * Deep Quote - Create quote of PCRs
++ * Input:
++ *   TPM_TAG             tag           TPM_TAG_RQU_AUTH1_COMMAND
++ *   UINT32              paramSize     Total size of request
++ *   TPM_COMMAND_CODE    ordinal       TPM_ORD_DeepQuote
++ *   TPM_NONCE           externData    20 bytes of external data
++ *   TPM_PCR_SELECTION   vtSel         PCR selection for virtual TPM
++ *   TPM_PCR_SELECTION   ptSel         PCR selection for physical TPM
++ *   ---
++ *   UINT32              authHandle    Owner authorization session (OIAP)
++ *   TPM_NONCE           nonceOdd      Nonce for authHandle
++ *   BOOL                continueAuth  Continue flag for authHandle
++ *   TPM_AUTHDATA        privAuth      Authorization digest for command
++ *
++ * Output:
++ *   TPM_TAG             tag           TPM_TAG_RSP_AUTH1_COMMAND
++ *   UINT32              paramSize     Total size of response
++ *   TPM_RESULT          returnCode    Return code of the operation
++ *   BYTE[]              sig           Signature provided by physical TPM
++ *   TPM_PCRVALUE[]      pcrValue      Values of hardware PCRs used in the quote
++ *   ---
++ *   TPM_NONCE           nonceEven     Nonce for authHandle
++ *   BOOL                continueAuth  Continue flag for authHandle
++ *   TPM_AUTHDATA        resAuth       Authorization digest for response
++ *
++ * The values of the virutal TPM's PCRs are not included in the response.
++ * The signature is a standard TPM_Quote response from the physical TPM; its
++ * externalData is the SHA1 hash of the following structure:
++ *   TPM_STRUCT_VER      version       MUST be 0.0.0.0
++ *   BYTE[4]             fixed         MUST be the string "DQUT"
++ *   TPM_NONCE           externData    From input to the deep quote
++ *   TPM_PCR_INFO_SHORT  pcrData       Virtual TPM's PCRs
++ */
++#define TPM_ORD_DeepQuote                       (TPM_VENDOR_COMMAND | TPM_ORD_Quote)
++
++/*
+  * ParentSignEK - Proof of fresh provisioning and EK value
+  *
+  * Input:
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-implicit-fallthrough.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-implicit-fallthrough.patch
new file mode 100644
index 0000000..e95d41f
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-implicit-fallthrough.patch
@@ -0,0 +1,10 @@
+--- a/tpm/tpm_cmd_handler.c.orig	2017-04-27 13:37:14.408000000 +0200
++++ b/tpm/tpm_cmd_handler.c	2017-04-27 13:39:53.585000000 +0200
+@@ -3397,6 +3397,7 @@
+                   sizeof(rsp->auth2->nonceOdd.nonce));
+       tpm_hmac_update(&hmac, (BYTE*)&rsp->auth2->continueAuthSession, 1);
+       tpm_hmac_final(&hmac, rsp->auth2->auth);
++      /* fall-thru */
+     case TPM_TAG_RSP_AUTH1_COMMAND:
+       tpm_hmac_init(&hmac, rsp->auth1->secret, sizeof(rsp->auth1->secret));
+       tpm_hmac_update(&hmac, rsp->auth1->digest, sizeof(rsp->auth1->digest));
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-locality.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-locality.patch
new file mode 100644
index 0000000..8ab7dea
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-locality.patch
@@ -0,0 +1,50 @@
+diff --git a/tpm/tpm_capability.c b/tpm/tpm_capability.c
+index 60bbb90..f8f7f0f 100644
+--- a/tpm/tpm_capability.c
++++ b/tpm/tpm_capability.c
+@@ -949,6 +949,8 @@ static TPM_RESULT set_vendor(UINT32 subCap, BYTE *setValue,
+                              UINT32 setValueSize, BOOL ownerAuth,
+                              BOOL deactivated, BOOL disabled)
+ {
++  if (tpmData.stany.flags.localityModifier != 8)
++    return TPM_BAD_PARAMETER;
+   /* set the capability area with the specified data, on failure
+      deactivate the TPM */
+   switch (subCap) {
+diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
+index 288d1ce..9e1cfb4 100644
+--- a/tpm/tpm_cmd_handler.c
++++ b/tpm/tpm_cmd_handler.c
+@@ -4132,7 +4132,7 @@ void tpm_emulator_shutdown()
+   tpm_extern_release();
+ }
+ 
+-int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size)
++int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size, int locality)
+ {
+   TPM_REQUEST req;
+   TPM_RESPONSE rsp;
+@@ -4140,7 +4140,9 @@ int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint3
+   UINT32 len;
+   BOOL free_out;
+ 
+-  debug("tpm_handle_command()");
++  debug("tpm_handle_command(%d)", locality);
++  if (locality != -1)
++    tpmData.stany.flags.localityModifier = locality;
+ 
+   /* we need the whole packet at once, otherwise unmarshalling will fail */
+   if (tpm_unmarshal_TPM_REQUEST((uint8_t**)&in, &in_size, &req) != 0) {
+diff --git a/tpm/tpm_emulator.h b/tpm/tpm_emulator.h
+index eed749e..4c228bd 100644
+--- a/tpm/tpm_emulator.h
++++ b/tpm/tpm_emulator.h
+@@ -59,7 +59,7 @@ void tpm_emulator_shutdown(void);
+  * its usage. In case of an error, all internally allocated memory
+  * is released and the the state of out and out_size is unspecified.
+  */ 
+-int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size);
++int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size, int locality);
+ 
+ #endif /* _TPM_EMULATOR_H_ */
+ 
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-parent-sign-ek.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-parent-sign-ek.patch
new file mode 100644
index 0000000..14e66ee
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/vtpm-parent-sign-ek.patch
@@ -0,0 +1,196 @@
+diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
+index 9e1cfb4..0fabf98 100644
+--- a/tpm/tpm_cmd_handler.c
++++ b/tpm/tpm_cmd_handler.c
+@@ -3312,6 +3312,37 @@ static TPM_RESULT execute_TPM_OwnerReadPubek(TPM_REQUEST *req, TPM_RESPONSE *rsp
+   return res;
+ }
+ 
++static TPM_RESULT execute_TPM_ParentSignEK(TPM_REQUEST *req, TPM_RESPONSE *rsp)
++{
++	TPM_NONCE nonce;
++	TPM_RESULT res;
++	UINT32 sigSize;
++	BYTE *sig;
++	BYTE *ptr;
++	UINT32 len;
++	TPM_PCR_SELECTION targetPCR;
++
++	tpm_compute_in_param_digest(req);
++
++	ptr = req->param;
++	len = req->paramSize;
++	if (tpm_unmarshal_TPM_NONCE(&ptr, &len, &nonce)
++		|| tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &targetPCR)
++		|| len != 0) return TPM_BAD_PARAMETER;
++
++	res = TPM_ParentSignEK(&nonce, &targetPCR, &req->auth1, &sigSize, &sig);
++	if (res != TPM_SUCCESS) return res;
++	rsp->paramSize = len = sigSize;
++	rsp->param = ptr = tpm_malloc(len);
++	if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, sig, sigSize)) {
++		tpm_free(rsp->param);
++		res = TPM_FAIL;
++	}
++	tpm_free(sig);
++
++	return res;
++}
++
+ static void tpm_setup_rsp_auth(TPM_COMMAND_CODE ordinal, TPM_RESPONSE *rsp) 
+ {
+   tpm_hmac_ctx_t hmac;
+@@ -4062,6 +4093,11 @@ void tpm_execute_command(TPM_REQUEST *req, TPM_RESPONSE *rsp)
+       res = execute_TPM_OwnerReadPubek(req, rsp);
+     break;
+ 
++    case TPM_ORD_ParentSignEK:
++      debug("[TPM_ORD_ParentSignEK]");
++      res = execute_TPM_ParentSignEK(req, rsp);
++    break;
++
+     default:
+ #ifdef MTM_EMULATOR
+       res = mtm_execute_command(req, rsp);
+diff --git a/tpm/tpm_commands.h b/tpm/tpm_commands.h
+index a7666f6..7fef934 100644
+--- a/tpm/tpm_commands.h
++++ b/tpm/tpm_commands.h
+@@ -3054,6 +3054,23 @@ TPM_RESULT TPM_OwnerReadPubek(
+   TPM_PUBKEY *pubEndorsementKey 
+ );
+ 
++/**
++ * TPM_ParentSignEK - gets a hardware TPM quote of a vTPM's EK
++ * @externalData: [in] AntiReplay nonce to prevent replay of messages
++ * @sel: [in] PCR selection for the hardware TPM's quote
++ * @auth1: [in, out] Authorization protocol parameters
++ * @sigSize: [out] The length of the returned digital signature
++ * @sig: [out] The resulting digital signature and PCR values
++ * Returns: TPM_SUCCESS on success, a TPM error code otherwise.
++ */
++TPM_RESULT TPM_ParentSignEK(
++  TPM_NONCE *externalData,
++  TPM_PCR_SELECTION *sel,
++  TPM_AUTH *auth1,
++  UINT32 *sigSize,
++  BYTE **sig
++);
++
+ /*
+  * Error handling
+  * [tpm_error.c]
+diff --git a/tpm/tpm_credentials.c b/tpm/tpm_credentials.c
+index 9cd64af..01f29e6 100644
+--- a/tpm/tpm_credentials.c
++++ b/tpm/tpm_credentials.c
+@@ -180,3 +180,34 @@ TPM_RESULT TPM_OwnerReadInternalPub(TPM_KEY_HANDLE keyHandle, TPM_AUTH *auth1,
+     return TPM_BAD_PARAMETER;
+   }
+ }
++
++int endorsementKeyFresh = 0;
++
++TPM_RESULT VTPM_GetParentQuote(TPM_DIGEST* data, TPM_PCR_SELECTION *sel, UINT32 *sigSize, BYTE **sig);
++
++TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
++                            TPM_AUTH *auth1, UINT32 *sigSize, BYTE **sig)
++{
++	TPM_PUBKEY pubKey;
++	TPM_RESULT res;
++	TPM_DIGEST hres;
++
++	info("TPM_ParentSignEK()");
++
++	res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER);
++	if (res != TPM_SUCCESS) return res;
++
++	if (!endorsementKeyFresh) return TPM_DISABLED_CMD;
++
++	res = tpm_get_pubek(&pubKey);
++	if (res != TPM_SUCCESS) return res;
++
++	if (tpm_compute_pubkey_checksum(externalData, &pubKey, &hres))
++		res = TPM_FAIL;
++
++	if (res == TPM_SUCCESS)
++		res = VTPM_GetParentQuote(&hres, sel, sigSize, sig);
++
++	free_TPM_PUBKEY(pubKey);
++	return res;
++}
+diff --git a/tpm/tpm_data.c b/tpm/tpm_data.c
+index 50c9697..6a0c499 100644
+--- a/tpm/tpm_data.c
++++ b/tpm/tpm_data.c
+@@ -76,6 +76,8 @@ static void init_timeouts(void)
+   tpmData.permanent.data.cmd_durations[2] = 1000;
+ }
+ 
++extern int endorsementKeyFresh;
++
+ void tpm_init_data(void)
+ {
+   /* endorsement key */
+@@ -157,6 +159,7 @@ void tpm_init_data(void)
+   if (tpmConf & TPM_CONF_GENERATE_EK) {
+     /* generate a new endorsement key */
+     tpm_rsa_generate_key(&tpmData.permanent.data.endorsementKey, 2048);
++    endorsementKeyFresh = 1;
+   } else {
+     /* setup endorsement key */
+     tpm_rsa_import_key(&tpmData.permanent.data.endorsementKey, 
+diff --git a/tpm/tpm_structures.h b/tpm/tpm_structures.h
+index f746c05..b0f4625 100644
+--- a/tpm/tpm_structures.h
++++ b/tpm/tpm_structures.h
+@@ -658,6 +658,49 @@ typedef struct tdTPM_CMK_MA_APPROVAL {
+ #define TPM_ORD_TickStampBlob                   242
+ #define TPM_ORD_MAX                             256
+ 
++/* VTPM-only commands: */
++/*
++ * ParentSignEK - Proof of fresh provisioning and EK value
++ *
++ * Input:
++ *   TPM_TAG             tag           TPM_TAG_RQU_AUTH1_COMMAND
++ *   UINT32              paramSize     Total size of request
++ *   TPM_COMMAND_CODE    ordinal       TPM_ORD_ParentSignEK
++ *   TPM_NONCE           externData    20 bytes of external data
++ *   TPM_PCR_SELECTION   ptSel         PCR selection for physical TPM
++ *   ---
++ *   UINT32              authHandle    Owner authorization session (OIAP)
++ *   TPM_NONCE           nonceOdd      Nonce for authHandle
++ *   BOOL                continueAuth  Continue flag for authHandle
++ *   TPM_AUTHDATA        privAuth      Authorization digest for command
++ *
++ * Output:
++ *   TPM_TAG             tag           TPM_TAG_RSP_AUTH1_COMMAND
++ *   UINT32              paramSize     Total size of response
++ *   TPM_RESULT          returnCode    Return code of the operation
++ *   BYTE[]              sig           Signature provided by physical TPM
++ *   TPM_PCRVALUE[]      pcrValue      Values of hardware PCRs used in the quote
++ *   ---
++ *   TPM_NONCE           nonceEven     Nonce for authHandle
++ *   BOOL                continueAuth  Continue flag for authHandle
++ *   TPM_AUTHDATA        resAuth       Authorization digest for response
++ *
++ * This command is only valid on the first boot of a vTPM; on any subsequent
++ * boot, the command returns TPM_DISABLED_CMD. It is intended to be used to
++ * provide evidence of proper platform configuration to the verifier/CA which is
++ * responsible for the creation of the vTPM's endorsement credential, which will
++ * be used on subsequent boots to certify AIKs via the usual Privacy CA protocol.
++ *
++ * The values of the virtual TPM's PCRs are not included in the response.
++ * The signature is a standard TPM_Quote response from the physical TPM; its
++ * externalData is the SHA1 hash of the following structure:
++ *   TPM_PUBKEY          pubEK         The vTPM's public EK
++ *   TPM_NONCE           externData    From input to the deep quote
++ *
++ * This structure was chosen to match the return of TPM_ReadPubek
++ */
++#define TPM_ORD_ParentSignEK                    (TPM_VENDOR_COMMAND | TPM_ORD_ReadPubek)
++
+ /*
+  * TCS Ordinals ([TPM_Part2], Section 17.1)
+  *
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/xsa246-4.9.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa246-4.9.patch
new file mode 100644
index 0000000..6370a10
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa246-4.9.patch
@@ -0,0 +1,74 @@
+From: Julien Grall <julien.grall@linaro.org>
+Subject: x86/pod: prevent infinite loop when shattering large pages
+
+When populating pages, the PoD may need to split large ones using
+p2m_set_entry and request the caller to retry (see ept_get_entry for
+instance).
+
+p2m_set_entry may fail to shatter if it is not possible to allocate
+memory for the new page table. However, the error is not propagated
+resulting to the callers to retry infinitely the PoD.
+
+Prevent the infinite loop by return false when it is not possible to
+shatter the large mapping.
+
+This is XSA-246.
+
+Signed-off-by: Julien Grall <julien.grall@linaro.org>
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: George Dunlap <george.dunlap@citrix.com>
+
+--- a/xen/arch/x86/mm/p2m-pod.c
++++ b/xen/arch/x86/mm/p2m-pod.c
+@@ -1071,9 +1071,8 @@ p2m_pod_demand_populate(struct p2m_domai
+          * NOTE: In a fine-grained p2m locking scenario this operation
+          * may need to promote its locking from gfn->1g superpage
+          */
+-        p2m_set_entry(p2m, gfn_aligned, INVALID_MFN, PAGE_ORDER_2M,
+-                      p2m_populate_on_demand, p2m->default_access);
+-        return 0;
++        return p2m_set_entry(p2m, gfn_aligned, INVALID_MFN, PAGE_ORDER_2M,
++                             p2m_populate_on_demand, p2m->default_access);
+     }
+ 
+     /* Only reclaim if we're in actual need of more cache. */
+@@ -1104,8 +1103,12 @@ p2m_pod_demand_populate(struct p2m_domai
+ 
+     gfn_aligned = (gfn >> order) << order;
+ 
+-    p2m_set_entry(p2m, gfn_aligned, mfn, order, p2m_ram_rw,
+-                  p2m->default_access);
++    if ( p2m_set_entry(p2m, gfn_aligned, mfn, order, p2m_ram_rw,
++                       p2m->default_access) )
++    {
++        p2m_pod_cache_add(p2m, p, order);
++        goto out_fail;
++    }
+ 
+     for( i = 0; i < (1UL << order); i++ )
+     {
+@@ -1150,13 +1153,18 @@ remap_and_retry:
+     BUG_ON(order != PAGE_ORDER_2M);
+     pod_unlock(p2m);
+ 
+-    /* Remap this 2-meg region in singleton chunks */
+-    /* NOTE: In a p2m fine-grained lock scenario this might
+-     * need promoting the gfn lock from gfn->2M superpage */
++    /*
++     * Remap this 2-meg region in singleton chunks. See the comment on the
++     * 1G page splitting path above for why a single call suffices.
++     *
++     * NOTE: In a p2m fine-grained lock scenario this might
++     * need promoting the gfn lock from gfn->2M superpage.
++     */
+     gfn_aligned = (gfn>>order)<<order;
+-    for(i=0; i<(1<<order); i++)
+-        p2m_set_entry(p2m, gfn_aligned + i, INVALID_MFN, PAGE_ORDER_4K,
+-                      p2m_populate_on_demand, p2m->default_access);
++    if ( p2m_set_entry(p2m, gfn_aligned, INVALID_MFN, PAGE_ORDER_4K,
++                       p2m_populate_on_demand, p2m->default_access) )
++        return -1;
++
+     if ( tb_init_done )
+     {
+         struct {
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/xsa248.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa248.patch
new file mode 100644
index 0000000..966c16e
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa248.patch
@@ -0,0 +1,164 @@
+From: Jan Beulich <jbeulich@suse.com>
+Subject: x86/mm: don't wrongly set page ownership
+
+PV domains can obtain mappings of any pages owned by the correct domain,
+including ones that aren't actually assigned as "normal" RAM, but used
+by Xen internally.  At the moment such "internal" pages marked as owned
+by a guest include pages used to track logdirty bits, as well as p2m
+pages and the "unpaged pagetable" for HVM guests. Since the PV memory
+management and shadow code conflict in their use of struct page_info
+fields, and since shadow code is being used for log-dirty handling for
+PV domains, pages coming from the shadow pool must, for PV domains, not
+have the domain set as their owner.
+
+While the change could be done conditionally for just the PV case in
+shadow code, do it unconditionally (and for consistency also for HAP),
+just to be on the safe side.
+
+There's one special case though for shadow code: The page table used for
+running a HVM guest in unpaged mode is subject to get_page() (in
+set_shadow_status()) and hence must have its owner set.
+
+This is XSA-248.
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: Tim Deegan <tim@xen.org>
+Reviewed-by: George Dunlap <george.dunlap@citrix.com>
+---
+v2: Drop PGC_page_table related pieces.
+
+--- a/xen/arch/x86/mm/hap/hap.c
++++ b/xen/arch/x86/mm/hap/hap.c
+@@ -286,8 +286,7 @@ static struct page_info *hap_alloc_p2m_p
+     {
+         d->arch.paging.hap.total_pages--;
+         d->arch.paging.hap.p2m_pages++;
+-        page_set_owner(pg, d);
+-        pg->count_info |= 1;
++        ASSERT(!page_get_owner(pg) && !(pg->count_info & PGC_count_mask));
+     }
+     else if ( !d->arch.paging.p2m_alloc_failed )
+     {
+@@ -302,21 +301,23 @@ static struct page_info *hap_alloc_p2m_p
+ 
+ static void hap_free_p2m_page(struct domain *d, struct page_info *pg)
+ {
++    struct domain *owner = page_get_owner(pg);
++
+     /* This is called both from the p2m code (which never holds the 
+      * paging lock) and the log-dirty code (which always does). */
+     paging_lock_recursive(d);
+ 
+-    ASSERT(page_get_owner(pg) == d);
+-    /* Should have just the one ref we gave it in alloc_p2m_page() */
+-    if ( (pg->count_info & PGC_count_mask) != 1 ) {
+-        HAP_ERROR("Odd p2m page %p count c=%#lx t=%"PRtype_info"\n",
+-                     pg, pg->count_info, pg->u.inuse.type_info);
++    /* Should still have no owner and count zero. */
++    if ( owner || (pg->count_info & PGC_count_mask) )
++    {
++        HAP_ERROR("d%d: Odd p2m page %"PRI_mfn" d=%d c=%lx t=%"PRtype_info"\n",
++                  d->domain_id, mfn_x(page_to_mfn(pg)),
++                  owner ? owner->domain_id : DOMID_INVALID,
++                  pg->count_info, pg->u.inuse.type_info);
+         WARN();
++        pg->count_info &= ~PGC_count_mask;
++        page_set_owner(pg, NULL);
+     }
+-    pg->count_info &= ~PGC_count_mask;
+-    /* Free should not decrement domain's total allocation, since
+-     * these pages were allocated without an owner. */
+-    page_set_owner(pg, NULL);
+     d->arch.paging.hap.p2m_pages--;
+     d->arch.paging.hap.total_pages++;
+     hap_free(d, page_to_mfn(pg));
+--- a/xen/arch/x86/mm/shadow/common.c
++++ b/xen/arch/x86/mm/shadow/common.c
+@@ -1503,32 +1503,29 @@ shadow_alloc_p2m_page(struct domain *d)
+     pg = mfn_to_page(shadow_alloc(d, SH_type_p2m_table, 0));
+     d->arch.paging.shadow.p2m_pages++;
+     d->arch.paging.shadow.total_pages--;
++    ASSERT(!page_get_owner(pg) && !(pg->count_info & PGC_count_mask));
+ 
+     paging_unlock(d);
+ 
+-    /* Unlike shadow pages, mark p2m pages as owned by the domain.
+-     * Marking the domain as the owner would normally allow the guest to
+-     * create mappings of these pages, but these p2m pages will never be
+-     * in the domain's guest-physical address space, and so that is not
+-     * believed to be a concern. */
+-    page_set_owner(pg, d);
+-    pg->count_info |= 1;
+     return pg;
+ }
+ 
+ static void
+ shadow_free_p2m_page(struct domain *d, struct page_info *pg)
+ {
+-    ASSERT(page_get_owner(pg) == d);
+-    /* Should have just the one ref we gave it in alloc_p2m_page() */
+-    if ( (pg->count_info & PGC_count_mask) != 1 )
++    struct domain *owner = page_get_owner(pg);
++
++    /* Should still have no owner and count zero. */
++    if ( owner || (pg->count_info & PGC_count_mask) )
+     {
+-        SHADOW_ERROR("Odd p2m page count c=%#lx t=%"PRtype_info"\n",
++        SHADOW_ERROR("d%d: Odd p2m page %"PRI_mfn" d=%d c=%lx t=%"PRtype_info"\n",
++                     d->domain_id, mfn_x(page_to_mfn(pg)),
++                     owner ? owner->domain_id : DOMID_INVALID,
+                      pg->count_info, pg->u.inuse.type_info);
++        pg->count_info &= ~PGC_count_mask;
++        page_set_owner(pg, NULL);
+     }
+-    pg->count_info &= ~PGC_count_mask;
+     pg->u.sh.type = SH_type_p2m_table; /* p2m code reuses type-info */
+-    page_set_owner(pg, NULL);
+ 
+     /* This is called both from the p2m code (which never holds the
+      * paging lock) and the log-dirty code (which always does). */
+@@ -3132,7 +3129,9 @@ int shadow_enable(struct domain *d, u32
+         e = __map_domain_page(pg);
+         write_32bit_pse_identmap(e);
+         unmap_domain_page(e);
++        pg->count_info = 1;
+         pg->u.inuse.type_info = PGT_l2_page_table | 1 | PGT_validated;
++        page_set_owner(pg, d);
+     }
+ 
+     paging_lock(d);
+@@ -3170,7 +3169,11 @@ int shadow_enable(struct domain *d, u32
+     if ( rv != 0 && !pagetable_is_null(p2m_get_pagetable(p2m)) )
+         p2m_teardown(p2m);
+     if ( rv != 0 && pg != NULL )
++    {
++        pg->count_info &= ~PGC_count_mask;
++        page_set_owner(pg, NULL);
+         shadow_free_p2m_page(d, pg);
++    }
+     domain_unpause(d);
+     return rv;
+ }
+@@ -3279,7 +3282,22 @@ out:
+ 
+     /* Must be called outside the lock */
+     if ( unpaged_pagetable )
++    {
++        if ( page_get_owner(unpaged_pagetable) == d &&
++             (unpaged_pagetable->count_info & PGC_count_mask) == 1 )
++        {
++            unpaged_pagetable->count_info &= ~PGC_count_mask;
++            page_set_owner(unpaged_pagetable, NULL);
++        }
++        /* Complain here in cases where shadow_free_p2m_page() won't. */
++        else if ( !page_get_owner(unpaged_pagetable) &&
++                  !(unpaged_pagetable->count_info & PGC_count_mask) )
++            SHADOW_ERROR("d%d: Odd unpaged pt %"PRI_mfn" c=%lx t=%"PRtype_info"\n",
++                         d->domain_id, mfn_x(page_to_mfn(unpaged_pagetable)),
++                         unpaged_pagetable->count_info,
++                         unpaged_pagetable->u.inuse.type_info);
+         shadow_free_p2m_page(d, unpaged_pagetable);
++    }
+ }
+ 
+ void shadow_final_teardown(struct domain *d)
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/xsa249.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa249.patch
new file mode 100644
index 0000000..ecfa430
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa249.patch
@@ -0,0 +1,42 @@
+From: Jan Beulich <jbeulich@suse.com>
+Subject: x86/shadow: fix refcount overflow check
+
+Commit c385d27079 ("x86 shadow: for multi-page shadows, explicitly track
+the first page") reduced the refcount width to 25, without adjusting the
+overflow check. Eliminate the disconnect by using a manifest constant.
+
+Interestingly, up to commit 047782fa01 ("Out-of-sync L1 shadows: OOS
+snapshot") the refcount was 27 bits wide, yet the check was already
+using 26.
+
+This is XSA-249.
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: George Dunlap <george.dunlap@citrix.com>
+Reviewed-by: Tim Deegan <tim@xen.org>
+---
+v2: Simplify expression back to the style it was.
+
+--- a/xen/arch/x86/mm/shadow/private.h
++++ b/xen/arch/x86/mm/shadow/private.h
+@@ -529,7 +529,7 @@ static inline int sh_get_ref(struct doma
+     x = sp->u.sh.count;
+     nx = x + 1;
+ 
+-    if ( unlikely(nx >= 1U<<26) )
++    if ( unlikely(nx >= (1U << PAGE_SH_REFCOUNT_WIDTH)) )
+     {
+         SHADOW_PRINTK("shadow ref overflow, gmfn=%lx smfn=%lx\n",
+                        __backpointer(sp), mfn_x(smfn));
+--- a/xen/include/asm-x86/mm.h
++++ b/xen/include/asm-x86/mm.h
+@@ -82,7 +82,8 @@ struct page_info
+             unsigned long type:5;   /* What kind of shadow is this? */
+             unsigned long pinned:1; /* Is the shadow pinned? */
+             unsigned long head:1;   /* Is this the first page of the shadow? */
+-            unsigned long count:25; /* Reference count */
++#define PAGE_SH_REFCOUNT_WIDTH 25
++            unsigned long count:PAGE_SH_REFCOUNT_WIDTH; /* Reference count */
+         } sh;
+ 
+         /* Page is on a free list: ((count_info & PGC_count_mask) == 0). */
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/xsa250.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa250.patch
new file mode 100644
index 0000000..26aeb33
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa250.patch
@@ -0,0 +1,67 @@
+From: Jan Beulich <jbeulich@suse.com>
+Subject: x86/shadow: fix ref-counting error handling
+
+The old-Linux handling in shadow_set_l4e() mistakenly ORed together the
+results of sh_get_ref() and sh_pin(). As the latter failing is not a
+correctness problem, simply ignore its return value.
+
+In sh_set_toplevel_shadow() a failing sh_get_ref() must not be
+accompanied by installing the entry, despite the domain being crashed.
+
+This is XSA-250.
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: Tim Deegan <tim@xen.org>
+
+--- a/xen/arch/x86/mm/shadow/multi.c
++++ b/xen/arch/x86/mm/shadow/multi.c
+@@ -923,7 +923,7 @@ static int shadow_set_l4e(struct domain
+                           shadow_l4e_t new_sl4e,
+                           mfn_t sl4mfn)
+ {
+-    int flags = 0, ok;
++    int flags = 0;
+     shadow_l4e_t old_sl4e;
+     paddr_t paddr;
+     ASSERT(sl4e != NULL);
+@@ -938,15 +938,16 @@ static int shadow_set_l4e(struct domain
+     {
+         /* About to install a new reference */
+         mfn_t sl3mfn = shadow_l4e_get_mfn(new_sl4e);
+-        ok = sh_get_ref(d, sl3mfn, paddr);
+-        /* Are we pinning l3 shadows to handle wierd linux behaviour? */
+-        if ( sh_type_is_pinnable(d, SH_type_l3_64_shadow) )
+-            ok |= sh_pin(d, sl3mfn);
+-        if ( !ok )
++
++        if ( !sh_get_ref(d, sl3mfn, paddr) )
+         {
+             domain_crash(d);
+             return SHADOW_SET_ERROR;
+         }
++
++        /* Are we pinning l3 shadows to handle weird Linux behaviour? */
++        if ( sh_type_is_pinnable(d, SH_type_l3_64_shadow) )
++            sh_pin(d, sl3mfn);
+     }
+ 
+     /* Write the new entry */
+@@ -3965,14 +3966,15 @@ sh_set_toplevel_shadow(struct vcpu *v,
+ 
+     /* Take a ref to this page: it will be released in sh_detach_old_tables()
+      * or the next call to set_toplevel_shadow() */
+-    if ( !sh_get_ref(d, smfn, 0) )
++    if ( sh_get_ref(d, smfn, 0) )
++        new_entry = pagetable_from_mfn(smfn);
++    else
+     {
+         SHADOW_ERROR("can't install %#lx as toplevel shadow\n", mfn_x(smfn));
+         domain_crash(d);
++        new_entry = pagetable_null();
+     }
+ 
+-    new_entry = pagetable_from_mfn(smfn);
+-
+  install_new_entry:
+     /* Done.  Install it */
+     SHADOW_PRINTK("%u/%u [%u] gmfn %#"PRI_mfn" smfn %#"PRI_mfn"\n",
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/xsa251.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa251.patch
new file mode 100644
index 0000000..582ef62
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa251.patch
@@ -0,0 +1,21 @@
+From: Jan Beulich <jbeulich@suse.com>
+Subject: x86/paging: don't unconditionally BUG() on finding SHARED_M2P_ENTRY
+
+PV guests can fully control the values written into the P2M.
+
+This is XSA-251.
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
+
+--- a/xen/arch/x86/mm/paging.c
++++ b/xen/arch/x86/mm/paging.c
+@@ -274,7 +274,7 @@ void paging_mark_pfn_dirty(struct domain
+         return;
+ 
+     /* Shared MFNs should NEVER be marked dirty */
+-    BUG_ON(SHARED_M2P(pfn_x(pfn)));
++    BUG_ON(paging_mode_translate(d) && SHARED_M2P(pfn_x(pfn)));
+ 
+     /*
+      * Values with the MSB set denote MFNs that aren't really part of the
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/files/xsa253.patch b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa253.patch
new file mode 100644
index 0000000..19e4269
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/files/xsa253.patch
@@ -0,0 +1,26 @@
+From: Andrew Cooper <andrew.cooper3@citrix.com>
+Subject: x86/msr: Free msr_vcpu_policy during vcpu destruction
+
+c/s 4187f79dc7 "x86/msr: introduce struct msr_vcpu_policy" introduced a
+per-vcpu memory allocation, but failed to free it in the clean vcpu
+destruction case.
+
+This is XSA-253
+
+Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
+Reviewed-by: Jan Beulich <jbeulich@suse.com>
+
+diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
+index b17468c..0ae715d 100644
+--- a/xen/arch/x86/domain.c
++++ b/xen/arch/x86/domain.c
+@@ -382,6 +382,9 @@ void vcpu_destroy(struct vcpu *v)
+ 
+     vcpu_destroy_fpu(v);
+ 
++    xfree(v->arch.msr);
++    v->arch.msr = NULL;
++
+     if ( !is_idle_domain(v->domain) )
+         vpmu_destroy(v);
+ 
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/lwip.inc b/import-layers/meta-virtualization/recipes-extended/xen/lwip.inc
new file mode 100644
index 0000000..e083633
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/lwip.inc
@@ -0,0 +1,24 @@
+# Copyright (C) 2018 kebodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require stubdom.inc
+
+# clear this out to break dependency circle
+DEPENDS = ""
+
+# Nothing to configure or compile
+# For stubdoms, lwip is basically a source package with a couple of patches applied.
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+# needed because this directory isn't typically part of a sysroot
+SYSROOT_DIRS += "${prefix}/lwip"
+
+FILES_${PN} = "\
+    ${prefix} \
+"
+
+do_install() {
+    install -d ${D}${prefix}/lwip
+    cp -r -t ${D}${prefix}/lwip ${S}/src/*
+}
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/lwip_1.3.0.bb b/import-layers/meta-virtualization/recipes-extended/xen/lwip_1.3.0.bb
new file mode 100644
index 0000000..b7d8e95
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/lwip_1.3.0.bb
@@ -0,0 +1,19 @@
+# Copyright (C) 2018 kebodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "LWIP"
+HOMEPAGE = "https://savannah.nongnu.org/projects/lwip"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59a383b05013356e0c9899b06dc5da3f"
+
+SRCREV_lwip = "bcb4afa886408bf0a1dde9c2a4a00323c8b07eb1"
+SRC_URI = "\
+    git://git.savannah.gnu.org/lwip.git;protocol=git;nobranch=1;destsuffix=lwip;name=lwip \
+    file://lwip.patch-cvs \
+    file://lwip.dhcp_create_request-hwaddr_len.patch \
+"
+
+S="${WORKDIR}/${PN}"
+B="${S}"
+
+require lwip.inc
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/mini-os.inc b/import-layers/meta-virtualization/recipes-extended/xen/mini-os.inc
new file mode 100644
index 0000000..61c2704
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/mini-os.inc
@@ -0,0 +1,28 @@
+# Copyright (C) 2018 kebodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require stubdom.inc
+
+# clear this out to break dependency circle
+DEPENDS = ""
+
+do_configure() {
+    ${MAKE} -C ${WORKDIR}/mini-os links
+}
+
+# Nothing to configure or compile
+do_compile[noexec] = "1"
+
+# needed because this directory isn't typically part of a sysroot
+SYSROOT_DIRS += "${prefix}/mini-os"
+RDEPENDS_${PN}-dev = "perl"
+
+FILES_${PN}-dev = "\
+    ${prefix} \
+"
+
+do_install() {
+    install -d ${D}${prefix}/mini-os
+    cp -r -t ${D}${prefix}/mini-os ${S}/*
+    rm -rf ${D}${prefix}/mini-os/scripts
+}
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/mini-os_4.9.0.bb b/import-layers/meta-virtualization/recipes-extended/xen/mini-os_4.9.0.bb
new file mode 100644
index 0000000..298bc8d
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/mini-os_4.9.0.bb
@@ -0,0 +1,18 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Mini-OS is a tiny OS kernel distributed with the Xen Project"
+HOMEPAGE = "https://wiki.xenproject.org/wiki/Mini-OS"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8a437231894440a8f7629caa372243d0"
+
+# git commit hash for tags: xen-RELEASE-4.9.0, xen-RELEASE-4.9.1, xen-RELEASE-4.9.2
+SRCREV_minios = "ca013fa9baf92f47469ba1f2e1aaa31c41d8a0bb"
+SRC_URI = "\
+    git://xenbits.xen.org/mini-os.git;protocol=git;nobranch=1;destsuffix=mini-os;name=minios \
+    file://mini-os_udivmoddi4-gcc7.patch \
+"
+S="${WORKDIR}/mini-os"
+B="${S}"
+
+require mini-os.inc
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/newlib.inc b/import-layers/meta-virtualization/recipes-extended/xen/newlib.inc
new file mode 100644
index 0000000..1fdbd0a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/newlib.inc
@@ -0,0 +1,64 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require stubdom.inc
+
+CPPFLAGS_INCLUDE_DIR = "-isystem `${HOST_PREFIX}gcc -print-file-name=include`"
+STUBDOM_CFLAGS += "-D_I386MACH_ALLOW_HW_INTERRUPTS"
+
+export ac_cv_path_CC_FOR_TARGET="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT} ${STUBDOM_CPPFLAGS} ${STUBDOM_CFLAGS}"
+export CC_FOR_TARGET="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT} ${STUBDOM_CPPFLAGS} ${STUBDOM_CFLAGS}"
+
+export ac_cv_path_CXX_FOR_TARGET="${HOST_PREFIX}g++ --sysroot=${RECIPE_SYSROOT}"
+export CXX_FOR_TARGET="${HOST_PREFIX}g++ --sysroot=${RECIPE_SYSROOT}"
+
+export ac_cv_path_CPP_FOR_TARGET="${HOST_PREFIX}gcc -E --sysroot=${RECIPE_SYSROOT}"
+export CPP_FOR_TARGET="${HOST_PREFIX}gcc -E --sysroot=${RECIPE_SYSROOT}"
+
+export ac_cv_path_LD_FOR_TARGET="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
+export LD_FOR_TARGET="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
+
+export ac_cv_path_AS_FOR_TARGET="${HOST_PREFIX}as"
+export AS_FOR_TARGET="${HOST_PREFIX}as"
+
+export ac_cv_path_AR_FOR_TARGET="${HOST_PREFIX}ar"
+export AR_FOR_TARGET="${HOST_PREFIX}ar"
+
+export ac_cv_path_NM_FOR_TARGET="${HOST_PREFIX}nm"
+export NM_FOR_TARGET="${HOST_PREFIX}nm"
+
+export ac_cv_path_RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
+export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
+
+export ac_cv_path_OBJDUMP_FOR_TARGET="${HOST_PREFIX}objdump"
+export OBJDUMP_FOR_TARGET="${HOST_PREFIX}objdump"
+
+export ac_cv_path_OBJCOPY_FOR_TARGET="${HOST_PREFIX}objcopy"
+export OBJCOPY_FOR_TARGET="${HOST_PREFIX}objcopy"
+
+export ac_cv_path_STRIP_FOR_TARGET="${HOST_PREFIX}strip"
+export STRIP_FOR_TARGET="${HOST_PREFIX}strip"
+
+export ac_cv_path_STRINGS_FOR_TARGET="${HOST_PREFIX}strings"
+export STRINGS_FOR_TARGET="${HOST_PREFIX}strings"
+
+export ac_cv_path_READELF_FOR_TARGET="${HOST_PREFIX}readelf"
+export READELF_FOR_TARGET="${HOST_PREFIX}readelf"
+
+do_configure() {
+    ${S}/configure --verbose --prefix=${prefix} --target=${GNU_TARGET_ARCH}-xen-elf --enable-newlib-io-long-long --disable-multilib
+    find ${S} -type f | xargs perl -i.bak -pe 's/\b_(tzname|daylight|timezone)\b/$1/g'
+}
+
+do_compile() {
+    ${MAKE}
+}
+
+do_install() {
+    ${MAKE} DESTDIR=${D} install
+    rm -rf ${D}/cross-root-${GNU_TARGET_ARCH}/share
+    rm -rf ${D}/cross-root-${GNU_TARGET_ARCH}/info
+    install -m 644 `${HOST_PREFIX}gcc -print-file-name=include`/stdarg.h -t ${D}/${includedir}
+    install -m 644 `${HOST_PREFIX}gcc -print-file-name=include`/stddef.h -t ${D}/${includedir}
+    install -m 644 `${HOST_PREFIX}gcc -print-file-name=include`/stdbool.h -t ${D}/${includedir}
+}
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/newlib_1.16.0.bb b/import-layers/meta-virtualization/recipes-extended/xen/newlib_1.16.0.bb
new file mode 100644
index 0000000..60672be
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/newlib_1.16.0.bb
@@ -0,0 +1,21 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Newlib is a C library intended for use on embedded systems."
+HOMEPAGE = "http://sourceware.org/newlib"
+LICENSE = "GPLv2 & LGPLv3 & GPLv3 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.NEWLIB;md5=950f50b290e8fcf7a2d3fff61775de9b"
+
+# this is the hash of version tag 1_16_0
+SRCREV_newlib = "07b4b67a88f386ce4716a14e0ff2c2bce992b985"
+SRC_URI = "\
+    git://sourceware.org/git/newlib-cygwin.git;protocol=git;nobranch=1;destsuffix=newlib;name=newlib \
+    file://newlib.patch \
+    file://newlib-chk.patch \
+    file://newlib-stdint-size_max-fix-from-1.17.0.patch \
+"
+
+S="${WORKDIR}/newlib"
+B="${WORKDIR}/build"
+
+require newlib.inc
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/polarssl.inc b/import-layers/meta-virtualization/recipes-extended/xen/polarssl.inc
new file mode 100644
index 0000000..eae95f4
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/polarssl.inc
@@ -0,0 +1,27 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require stubdom.inc
+
+DEPENDS += "\
+    newlib \
+"
+STUBDOM_CFLAGS += "\
+    -Wno-memset-elt-size \
+    -Wno-implicit-fallthrough \
+"
+
+# nothing to configure
+do_configure[noexec] = "1"
+
+do_compile() {
+    ${MAKE} CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT} ${STUBDOM_CPPFLAGS} ${STUBDOM_CFLAGS}"
+}
+
+do_install() {
+    install -d ${D}${includedir}
+    cp -r -t ${D}${includedir} ${S}/include/polarssl
+
+    install -d ${D}/${libdir}
+    install -m 644 -t ${D}/${libdir} ${S}/library/libpolarssl.a
+}
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/polarssl_1.1.4.bb b/import-layers/meta-virtualization/recipes-extended/xen/polarssl_1.1.4.bb
new file mode 100644
index 0000000..80ea45a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/polarssl_1.1.4.bb
@@ -0,0 +1,19 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "PolarSSL (now 'mbed TLS') is an open source, portable, easy to use, readable and flexible SSL library."
+HOMEPAGE = "https://tls.mbed.org"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+# git hash for release tag polarssl-1.1.4
+SRCREV_polarssl = "d36da11125a9c85c572a4fdf63e0a25e76d7bb18"
+SRC_URI = "\
+    git://github.com/ARMmbed/mbedtls.git;protocol=https;nobranch=1;destsuffix=polarssl;name=polarssl \
+    file://polarssl.patch; \
+"
+
+S="${WORKDIR}/${PN}"
+B="${S}/library"
+
+require polarssl.inc
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/stubdom-gmp.inc b/import-layers/meta-virtualization/recipes-extended/xen/stubdom-gmp.inc
new file mode 100644
index 0000000..ef6473d
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/stubdom-gmp.inc
@@ -0,0 +1,37 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require stubdom.inc
+
+DEPENDS += "\
+    newlib \
+"
+
+do_configure() {
+    # need to modify prefix here during configure otherwise OE-level variables
+    # (prefix, libdir, includedir, etc...) defined in stubdom.inc get messed up
+    CPPFLAGS="-isystem ${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include ${STUBDOM_CPPFLAGS}" \
+    CFLAGS="${STUBDOM_CFLAGS}" \
+    CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}" \
+    ${S}/configure \
+        --disable-shared \
+        --enable-static \
+        --disable-fft \
+        --without-readline \
+        --with-gnu-ld \
+        --prefix=${prefix}/${GNU_TARGET_ARCH}-xen-elf \
+        --libdir=${libdir} \
+        --build=`${HOST_PREFIX}gcc -dumpmachine` \
+        --host=${GNU_TARGET_ARCH}-xen-elf
+
+    sed -i 's/#define HAVE_OBSTACK_VPRINTF 1/\/\/#define HAVE_OBSTACK_VPRINTF 1/' ${S}/config.h
+}
+
+do_compile() {
+    ${MAKE}
+}
+
+do_install() {
+    ${MAKE} DESTDIR=${D} install
+    rm -rf ${D}${prefix}/${GNU_TARGET_ARCH}-xen-elf/share
+}
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/stubdom-gmp_4.3.2.bb b/import-layers/meta-virtualization/recipes-extended/xen/stubdom-gmp_4.3.2.bb
new file mode 100644
index 0000000..d9a2adb
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/stubdom-gmp_4.3.2.bb
@@ -0,0 +1,20 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "GMP library for Xen vTPM's."
+HOMEPAGE = "http://gmp"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+"
+
+SRC_URI = "\
+    https://gmplib.org/download/gmp/archive/gmp-${PV}.tar.bz2 \
+"
+SRC_URI[md5sum] = "dd60683d7057917e34630b4a787932e8"
+SRC_URI[sha256sum] = "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775"
+
+S="${WORKDIR}/gmp-${PV}"
+B="${S}"
+
+require stubdom-gmp.inc
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/stubdom.inc b/import-layers/meta-virtualization/recipes-extended/xen/stubdom.inc
new file mode 100644
index 0000000..bfc6752
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/stubdom.inc
@@ -0,0 +1,152 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+COMPATIBLE_HOST = '(x86_64.*).*-linux'
+
+require xen-arch.inc
+
+# many of the xen stubdom related recipes build and package static instead of shared libraries
+EXCLUDE_FROM_SHLIBS = "1"
+
+# base set of dependencies to be used for xen stubdom recipes
+DEPENDS += "\
+    lwip \
+    mini-os \
+"
+
+# unset EVERYTHING from the OE environment.
+# Weird things happen when these are exported into the environment.
+unset CFLAGS
+unset BUILD_CFLAGS
+unset TARGET_CFLAGS
+unset CFLAGS_FOR_BUILD
+
+unset CPPFLAGS
+unset BUILD_CPPFLAGS
+unset TARGET_CPPFLAGS
+unset CPPFLAGS_FOR_BUILD
+
+unset LDFLAGS
+unset BUILD_LDFLAGS
+unset TARGET_LDFLAGS
+unset LDFLAGS_FOR_BUILD
+
+unset CXXFLAGS
+unset TARGET_CXXFLAGS
+unset BUILD_CXXFLAGS
+unset CXXFLAGS_FOR_BUILD
+
+unset BUILD_CC
+unset BUILD_CPP
+unset BUILD_CXX
+unset BUILD_LD
+unset BUILD_AR
+unset BUILD_AS
+unset BUILD_CCLD
+unset BUILD_FC
+unset BUILD_RANLIB
+unset BUILD_NM
+unset BUILD_STRIP
+unset BUILD_READELF
+unset BUILD_OBJCOPY
+unset BUILD_OBJDUMP
+unset CC
+unset CPP
+unset CXX
+unset LD
+unset AR
+unset AS
+unset NM
+unset RANLIB
+unset STRIP
+unset STRINGS
+unset READELF
+unset OBJCOPY
+unset OBJDUMP
+unset READELF
+unset CCLD
+unset FC
+
+# Provide support to build both 32-bit and 64-bit stubdoms
+python () {
+    gnu_dict = {
+            'x86_32': 'i686',
+            'x86_64': 'x86_64',
+        }
+
+    if d.expand('${XEN_TARGET_ARCH}') == 'x86_32':
+        d.setVar("GNU_TARGET_ARCH",gnu_dict[d.expand('${XEN_TARGET_ARCH}')])
+        d.setVar("PACKAGE_ARCH","core2-32")
+    elif d.expand('${XEN_TARGET_ARCH}') == 'x86_64':
+        d.setVar("GNU_TARGET_ARCH",gnu_dict[d.expand('${XEN_TARGET_ARCH}')])
+}
+
+export GNU_TARGET_ARCH
+export XEN_TARGET_ARCH="${@map_xen_arch(d.getVar('TARGET_ARCH'), d)}"
+export XEN_COMPILE_ARCH="${@map_xen_arch(d.getVar('BUILD_ARCH'), d)}"
+
+LWIP_SRCDIR = "${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/lwip"
+MINIOS_SRCDIR = "${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/mini-os"
+
+# Base set of CPPFLAGS, CFLAGS needed for each component used to build MiniOS-based stubdoms
+# LDFLAGS are only used when building stubdoms, so only used in stubdom recipes
+# Generic name given because each library uses DEF_, BUILD_, TARGET_, and xxxFLAGS differently
+CPPFLAGS_INCLUDE_DIR = "-isystem ${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include"
+
+STUBDOM_CPPFLAGS += "\
+    -isystem ${MINIOS_SRCDIR}/include \
+    -D__MINIOS__ \
+    -DHAVE_LIBC \
+    -isystem ${MINIOS_SRCDIR}/include/posix \
+    -isystem ${MINIOS_SRCDIR}/include/xen \
+    -isystem ${MINIOS_SRCDIR}/include/x86 \
+    -isystem ${MINIOS_SRCDIR}/include/x86/${XEN_TARGET_ARCH} \
+    -U __linux__ \
+    -U __FreeBSD__ \
+    -U __sun__ \
+    -nostdinc \
+    ${CPPFLAGS_INCLUDE_DIR} \
+    -isystem ${LWIP_SRCDIR}/include \
+    -isystem ${LWIP_SRCDIR}/include/ipv4 \
+"
+
+STUBDOM_CFLAGS += "\
+    -mno-red-zone \
+    -O1 \
+    -fno-omit-frame-pointer \
+    -m64 \
+    -fno-reorder-blocks \
+    -fno-asynchronous-unwind-tables \
+    -DBUILD_ID \
+    -fno-strict-aliasing \
+    -std=gnu99 \
+    -Wall \
+    -Wstrict-prototypes \
+    -Wdeclaration-after-statement \
+    -Wno-unused-but-set-variable \
+    -Wno-unused-local-typedefs \
+    -fno-stack-protector \
+    -fno-exceptions \
+"
+
+STUBDOM_LDFLAGS = "\
+    -nostdlib \
+    -L${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/lib \
+"
+
+# Need to redefine these for stubdom-related builds. It all starts because of
+# the prefix used in newlib and then continues because we don't want to
+# cross-contaminate stubdom-related recipes with headers and libraries found in
+# the OE-defined locations
+export prefix="/cross-root-${GNU_TARGET_ARCH}"
+export includedir="${prefix}/${GNU_TARGET_ARCH}-xen-elf/include"
+export libdir="${prefix}/${GNU_TARGET_ARCH}-xen-elf/lib"
+export libexecdir="${libdir}"
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+# Typically defined in Xen and Minios .mk files that aren't sourced/read,
+# defined to trigger some values and paths in Makefiles
+export debug="y"
+export stubdom="y"
+export XEN_OS="MiniOS"
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/tpm-emulator.inc b/import-layers/meta-virtualization/recipes-extended/xen/tpm-emulator.inc
new file mode 100644
index 0000000..f58a276
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/tpm-emulator.inc
@@ -0,0 +1,37 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require stubdom.inc
+
+DEPENDS += "\
+    cmake-native \
+    newlib \
+    stubdom-gmp \
+"
+
+# nothing to configure
+do_configure[noexec] = "1"
+
+export CMAKE_C_FLAGS = "\
+    -std=c99 \
+    -DTPM_NO_EXTERN \
+    ${STUBDOM_CPPFLAGS} \
+    ${STUBDOM_CFLAGS} \
+    -Wno-declaration-after-statement \
+    -Wno-implicit-fallthrough \
+"
+
+do_compile() {
+    CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}" cmake .. -DCMAKE_C_FLAGS:STRING="${CMAKE_C_FLAGS}"
+    ${MAKE} VERBOSE=1 tpm_crypto tpm
+}
+
+do_install() {
+    install -d ${D}/${libdir}
+    install -m 644 -t ${D}/${libdir} ${B}/crypto/libtpm_crypto.a
+    install -m 644 -t ${D}/${libdir} ${B}/tpm/libtpm.a
+
+    install -D -m 644 -t ${D}/${includedir}/tpm-emulator/build ${S}/build/config.h
+    install -D -m 644 -t ${D}/${includedir}/tpm-emulator/crypto ${S}/crypto/*.h
+    install -D -m 644 -t ${D}/${includedir}/tpm-emulator/tpm ${S}/tpm/*.h
+}
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/tpm-emulator_0.7.4.bb b/import-layers/meta-virtualization/recipes-extended/xen/tpm-emulator_0.7.4.bb
new file mode 100644
index 0000000..f626929
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/tpm-emulator_0.7.4.bb
@@ -0,0 +1,26 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "TPM Emulator"
+HOMEPAGE = "http://xenbits.xen.org/xen-extfiles"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://README;md5=eeabd77cf8fd8a8bc42983884cb09863"
+
+SRC_URI = "\
+    http://xenbits.xen.org/xen-extfiles/tpm_emulator-${PV}.tar.gz;name=tpm-emulator \
+    file://tpmemu-0.7.4.patch \
+    file://vtpm-bufsize.patch \
+    file://vtpm-locality.patch \
+    file://vtpm-parent-sign-ek.patch \
+    file://vtpm-deepquote.patch \
+    file://vtpm-deepquote-anyloc.patch \
+    file://vtpm-cmake-Wextra.patch \
+    file://vtpm-implicit-fallthrough.patch \
+"
+SRC_URI[tpm-emulator.md5sum] = "e26becb8a6a2b6695f6b3e8097593db8"
+SRC_URI[tpm-emulator.sha256sum] = "4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459"
+
+S="${WORKDIR}/tpm_emulator-${PV}"
+B="${S}/build"
+
+require tpm-emulator.inc
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen-vtpm.inc b/import-layers/meta-virtualization/recipes-extended/xen/xen-vtpm.inc
new file mode 100644
index 0000000..a94c750
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/xen-vtpm.inc
@@ -0,0 +1,111 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require stubdom.inc
+
+DEPENDS = "\
+    newlib \
+    lwip \
+    mini-os \
+    polarssl \
+    stubdom-gmp \
+    tpm-emulator \
+"
+# These were unset by stubdom.inc to allow us to scope them per recipe
+export CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}"
+export CCLD="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}"
+export CXX="${HOST_PREFIX}g++ --sysroot=${RECIPE_SYSROOT}"
+export CPP="${HOST_PREFIX}gcc -E --sysroot=${RECIPE_SYSROOT}"
+export LD="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
+export LD_LTO="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
+export AS="${HOST_PREFIX}as"
+export AR="${HOST_PREFIX}ar"
+export NM="${HOST_PREFIX}nm"
+export RANLIB="${HOST_PREFIX}ranlib"
+export OBJDUMP="${HOST_PREFIX}objdump"
+export OBJCOPY="${HOST_PREFIX}objcopy"
+export STRIP="${HOST_PREFIX}strip"
+export STRINGS="${HOST_PREFIX}strings"
+export READELF="${HOST_PREFIX}readelf"
+
+
+# Required for some of the config stuff
+export STUBDOM_TARGETS="vtpm vtpmmgr"
+
+VTPM_CPPFLAGS = "\
+    -I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator/build \
+    -I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator/crypto \
+    -I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator/tpm \
+    -I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator \
+"
+
+# The includes from this Xen directory are not in the MiniOS repo, although they probably should be.
+STUBDOM_CPPFLAGS += "-isystem ${B}/include/"
+
+do_configure() {
+
+    # GCC 7 fails linking header defined inlines if not declared 'static' or 'extern'
+    # This appears to be fixed in Xen 4.10.0+, so let's look at version of Xen source
+    # to determine if we need to modify inline declarations.
+    #
+    # 'echo -e' to enable interpretation of backslashes
+    # 'sort -V' to natural sort version numbers
+    # 'head -n1' to capture the first line of output from sort command
+
+    if [ "${PV}" = "$(echo "${PV};4.9.999" | sed 's/;/\n/' | sort -V | head -n1)" ]; then
+        sed -i "s/^inline/static inline/g" ${B}/vtpmmgr/*.h
+    fi
+
+    for i in AR AS NM RANLIB OBJDUMP OBJCOPY STRIP STRINGS READELF CXX LD LD_LTO CC CPP; do
+        sed -i "s/^\($i\s\s*\).*=/\1?=/" ${MINIOS_SRCDIR}/Config.mk
+    done
+
+    # replicate the TARGETS_MINIOS target in xen/stubdom/Makefile
+    for i in ${STUBDOM_TARGETS}; do
+        [ -d ${B}/mini-os-${XEN_TARGET_ARCH}-$i ] ||
+        for j in $(cd ${MINIOS_SRCDIR} ; find . -type d) ; do \
+                mkdir -p ${B}/mini-os-${XEN_TARGET_ARCH}-$i/$j; \
+        done
+    done
+}
+
+do_compile() {
+    ${MAKE} MINIOS_CONFIG="${B}/vtpm/minios.cfg" CONFIG_FILE="${B}/vtpm-minios-config.mk" DESTDIR= -C ${MINIOS_SRCDIR} config
+    CPPFLAGS="`cat ${B}/vtpm-minios-config.mk` ${STUBDOM_CPPFLAGS} ${VTPM_CPPFLAGS}" CFLAGS="${STUBDOM_CFLAGS}" ${MAKE} -C ${B}/vtpm
+    DEF_CPPFLAGS="${STUBDOM_CPPFLAGS}" \
+        DEF_CFLAGS="${STUBDOM_CFLAGS}" \
+        DEF_LDFLAGS="${STUBDOM_LDFLAGS}" \
+        MINIOS_CONFIG="${B}/vtpm/minios.cfg" \
+        ${MAKE} -C ${MINIOS_SRCDIR} \
+        OBJ_DIR=${B}/mini-os-${XEN_TARGET_ARCH}-vtpm \
+        APP_OBJS="${B}/vtpm/vtpm.a" \
+        APP_LDLIBS="-ltpm -ltpm_crypto -lgmp -lpolarssl"
+
+    ${MAKE} MINIOS_CONFIG="${B}/vtpmmgr/minios.cfg" CONFIG_FILE="${B}/vtpmmgr-minios-config.mk" DESTDIR= -C ${MINIOS_SRCDIR} config
+    CPPFLAGS="`cat ${B}/vtpmmgr-minios-config.mk` ${STUBDOM_CPPFLAGS}" CFLAGS="${STUBDOM_CFLAGS}" ${MAKE} -C ${B}/vtpmmgr
+    DEF_CPPFLAGS="${STUBDOM_CPPFLAGS}" \
+        DEF_CFLAGS="${STUBDOM_CFLAGS}" \
+        DEF_LDFLAGS="${STUBDOM_LDFLAGS}" \
+        MINIOS_CONFIG="${B}/vtpmmgr/minios.cfg" \
+        ${MAKE} -C ${MINIOS_SRCDIR} \
+        OBJ_DIR=${B}/mini-os-${XEN_TARGET_ARCH}-vtpmmgr \
+        APP_OBJS="${B}/vtpmmgr/vtpmmgr.a" \
+        APP_LDLIBS="-lm -lpolarssl"
+}
+
+PACKAGES = "\
+    ${PN}-vtpm-stubdom \
+    ${PN}-vtpmmgr-stubdom \
+"
+FILES_${PN}-vtpm-stubdom="\
+    ${libdir}/xen/boot/vtpm-stubdom.gz \
+"
+
+FILES_${PN}-vtpmmgr-stubdom="\
+    ${libdir}/xen/boot/vtpmmgr-stubdom.gz \
+"
+
+do_install() {
+    install -m 644 -D ${B}/mini-os-${XEN_TARGET_ARCH}-vtpm/mini-os.gz ${D}${libdir}/xen/boot/vtpm-stubdom.gz
+    install -m 644 -D ${B}/mini-os-${XEN_TARGET_ARCH}-vtpmmgr/mini-os.gz ${D}${libdir}/xen/boot/vtpmmgr-stubdom.gz
+}
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen-vtpm_4.9.0.bb b/import-layers/meta-virtualization/recipes-extended/xen/xen-vtpm_4.9.0.bb
new file mode 100644
index 0000000..c58a02d
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/xen-vtpm_4.9.0.bb
@@ -0,0 +1,21 @@
+# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "MiniOS-based vTPMs for Xen"
+HOMEPAGE = "https://www.xenproject.org"
+LICENSE = "GPLv2 & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b1ceb1b03a49b202ee6f41ffd1ed0155 \
+                    file://vtpm/COPYING;md5=75a98062ab0322ded060d9026a1bda61 \
+"
+
+# git commit hash for Xen's RELEASE-4.9.0 tag
+SRCREV_xen = "c30bf55594a53fae8aae08aabf16fc192faad7da"
+SRC_URI = "\
+    git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;subpath=stubdom \
+    git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;destsuffix=stubdom/include;subpath=tools/xenstore/include \
+"
+
+S="${WORKDIR}/stubdom"
+B="${S}"
+
+require xen-vtpm.inc
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen.inc b/import-layers/meta-virtualization/recipes-extended/xen/xen.inc
index cb314f8..8dfe589 100644
--- a/import-layers/meta-virtualization/recipes-extended/xen/xen.inc
+++ b/import-layers/meta-virtualization/recipes-extended/xen/xen.inc
@@ -62,15 +62,12 @@
 
 RDEPENDS_${PN}-base = "\
     bash perl xz \
-    ${PN}-blktap \
     ${PN}-console \
-    ${PN}-libblktapctl \
     ${PN}-libxenguest \
     ${PN}-libxenlight \
     ${PN}-libxenvchan \
     ${PN}-libxenctrl \
     ${PN}-libxlutil \
-    ${PN}-libvhd \
     ${PN}-libxenstat \
     ${PN}-libxenstore \
     ${PN}-libfsimage \
@@ -88,7 +85,10 @@
 RDEPENDS_${PN}-dev = ""
 
 RRECOMMENDS_${PN}-base = " \
+    ${PN}-blktap \
     ${PN}-libblktap \
+    ${PN}-libblktapctl \
+    ${PN}-libvhd \
     ${PN}-flask \
     ${PN}-hvmloader \
     ${PN}-xenpaging \
@@ -196,6 +196,8 @@
     ${PN}-libxenstat-dev \
     ${PN}-libxenstore \
     ${PN}-libxenstore-dev \
+    ${PN}-libxentoolcore \
+    ${PN}-libxentoolcore-dev \
     ${PN}-libxentoollog \
     ${PN}-libxentoollog-dev \
     ${PN}-libxenvchan \
@@ -344,6 +346,12 @@
     ${datadir}/pkgconfig/xenstore.pc \
     "
 
+FILES_${PN}-libxentoolcore = "${libdir}/libxentoolcore.so.*"
+FILES_${PN}-libxentoolcore-dev = " \
+    ${libdir}/libxentoolcore.so \
+    ${datadir}/pkgconfig/xentoolcore.pc \
+    "
+
 FILES_${PN}-libxentoollog = "${libdir}/libxentoollog.so.*"
 FILES_${PN}-libxentoollog-dev = " \
     ${libdir}/libxentoollog.so \
@@ -474,6 +482,7 @@
     ${sbindir}/xenperf \
     ${sbindir}/xenpm \
     ${sbindir}/xsview \
+    ${sbindir}/xen-diag \
     ${sbindir}/xen-tmem-list-parse \
     ${sbindir}/xen-python-path \
     ${sbindir}/xen-ringwatch \
@@ -739,8 +748,6 @@
     ${systemd_unitdir}/system/xenconsoled.service \
     ${systemd_unitdir}/system/xen-init-dom0.service \
     ${systemd_unitdir}/system/xenstored.service \
-    ${systemd_unitdir}/system/xenstored.socket \
-    ${systemd_unitdir}/system/xenstored_ro.socket \
     ${systemd_unitdir}/system/var-lib-xenstored.mount \
     "
 
@@ -780,8 +787,6 @@
     xenconsoled.service \
     xen-init-dom0.service \
     xenstored.service \
-    xenstored.socket \
-    xenstored_ro.socket \
     "
 SYSTEMD_SERVICE_${PN}-xendomains = "xendomains.service"
 
@@ -825,7 +830,7 @@
 # Yocto injects -mfpmath=sse for some machine types into the CFLAGS which
 # conflicts with -mno-sse so instead we strip -mfpmath=sse instead of
 # patching the build to be ok with this
-TUNE_CCARGS := "${@oe_filter_out('-mfpmath=sse', '${TUNE_CCARGS}', d)}"
+TUNE_CCARGS := "${@oe.utils.str_filter_out('-mfpmath=sse', '${TUNE_CCARGS}', d)}"
 
 EXTRA_OECONF += " \
     --exec-prefix=/usr \
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen_4.10.0.bb b/import-layers/meta-virtualization/recipes-extended/xen/xen_4.10.0.bb
new file mode 100644
index 0000000..d314b9b
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/xen_4.10.0.bb
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+require xen.inc
+
+SRC_URI = " \
+    https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \
+    file://xsa253.patch \
+    "
+
+SRC_URI[md5sum] = "ab9d320d02cb40f6b40506aed1a38d58"
+SRC_URI[sha256sum] = "0262a7023f8b12bcacfb0b25e69b2a63291f944f7683d54d8f33d4b2ca556844"
+
+S = "${WORKDIR}/xen-${PV}"
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen_4.9.0.bb b/import-layers/meta-virtualization/recipes-extended/xen/xen_4.9.0.bb
deleted file mode 100644
index 8e9c802..0000000
--- a/import-layers/meta-virtualization/recipes-extended/xen/xen_4.9.0.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-require xen.inc
-
-SRC_URI = " \
-    https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \
-    file://fix-libxc-xc_dom_arm-missing-initialization.patch \
-    "
-
-SRC_URI[md5sum] = "f0a753637630f982dfbdb64121fd71e1"
-SRC_URI[sha256sum] = "cade643fe3310d4d6f97d0c215c6fa323bc1130d7e64d7e2043ffaa73a96f33b"
-
-S = "${WORKDIR}/xen-${PV}"
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen_4.9.1.bb b/import-layers/meta-virtualization/recipes-extended/xen/xen_4.9.1.bb
new file mode 100644
index 0000000..5c18bb0
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/xen/xen_4.9.1.bb
@@ -0,0 +1,18 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+require xen.inc
+
+SRC_URI = " \
+    https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \
+    file://xsa246-4.9.patch \
+    file://0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch \
+    file://0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch \
+    file://xsa248.patch \
+    file://xsa249.patch \
+    file://xsa250.patch \
+    file://xsa251.patch \
+    "
+
+SRC_URI[md5sum] = "8b9d6104694b164d54334194135f7217"
+SRC_URI[sha256sum] = "ecf88b01f44cd8f4ef208af3f999dceb69bdd2a316d88dd9a9535ea7b49ed356"
+
+S = "${WORKDIR}/xen-${PV}"
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.cfg
index 0067504..b1fefc0 100644
--- a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.cfg
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.cfg
@@ -1,2 +1,3 @@
 CONFIG_OPENVSWITCH=m
 CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_ACT_POLICE=m
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.14.bbappend
similarity index 100%
rename from import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend
rename to import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.14.bbappend
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.15.bbappend
similarity index 100%
rename from import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend
rename to import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.15.bbappend
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend
deleted file mode 100644
index 617cacc..0000000
--- a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-networking/netns/files/0001-Allow-selection-of-go-compiler.patch b/import-layers/meta-virtualization/recipes-networking/netns/files/0001-Allow-selection-of-go-compiler.patch
new file mode 100644
index 0000000..84fb9a4
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-networking/netns/files/0001-Allow-selection-of-go-compiler.patch
@@ -0,0 +1,107 @@
+From 6576f228339b7931e05a8e861f085f483817806b Mon Sep 17 00:00:00 2001
+From: Paul Barker <pbarker@toganlabs.com>
+Date: Tue, 8 May 2018 11:01:14 +0000
+Subject: [PATCH] Allow selection of go compiler
+
+By running `make GO=/path/to/go` we can now select the appropriate go compiler
+to use. This also makes it possible to cross compile netns more easily.
+
+Signed-off-by: Paul Barker <pbarker@toganlabs.com>
+Upstream-status: Pending
+---
+ Makefile | 25 ++++++++++++++-----------
+ 1 file changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3a22f3e..476cb9b 100644
+--- a/src/import/Makefile
++++ b/src/import/Makefile
+@@ -23,6 +23,9 @@ CTIMEVAR=-X $(PKG)/version.GITCOMMIT=$(GITCOMMIT) -X $(PKG)/version.VERSION=$(VE
+ GO_LDFLAGS=-ldflags "-w $(CTIMEVAR)"
+ GO_LDFLAGS_STATIC=-ldflags "-w $(CTIMEVAR) -extldflags -static"
+ 
++# Set our default go compiler
++GO := go
++
+ # List the GOOS and GOARCH to build
+ GOOSARCHES = linux/arm linux/arm64 linux/amd64 linux/386
+ 
+@@ -33,12 +36,12 @@ build: $(NAME) ## Builds a dynamic executable or package
+ 
+ $(NAME): *.go VERSION.txt
+ 	@echo "+ $@"
+-	go build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) .
++	$(GO) build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) .
+ 
+ .PHONY: static
+ static: ## Builds a static executable
+ 	@echo "+ $@"
+-	CGO_ENABLED=0 go build \
++	CGO_ENABLED=0 $(GO) build \
+ 				-tags "$(BUILDTAGS) static_build" \
+ 				${GO_LDFLAGS_STATIC} -o $(NAME) .
+ 
+@@ -55,23 +58,23 @@ lint: ## Verifies `golint` passes
+ .PHONY: test
+ test: ## Runs the go tests
+ 	@echo "+ $@"
+-	@go test -v -tags "$(BUILDTAGS) cgo" $(shell go list ./... | grep -v vendor)
++	@$(GO) test -v -tags "$(BUILDTAGS) cgo" $(shell $(GO) list ./... | grep -v vendor)
+ 
+ .PHONY: vet
+ vet: ## Verifies `go vet` passes
+ 	@echo "+ $@"
+-	@go vet $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
++	@$(GO) vet $(shell $(GO) list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
+ 
+ .PHONY: staticcheck
+ staticcheck: ## Verifies `staticcheck` passes
+ 	@echo "+ $@"
+-	@staticcheck $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
++	@staticcheck $(shell $(GO) list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
+ 
+ .PHONY: cover
+ cover: ## Runs go test with coverage
+ 	@echo "" > coverage.txt
+-	@for d in $(shell go list ./... | grep -v vendor); do \
+-		go test -race -coverprofile=profile.out -covermode=atomic "$$d"; \
++	@for d in $(shell $(GO) list ./... | grep -v vendor); do \
++		$(GO) test -race -coverprofile=profile.out -covermode=atomic "$$d"; \
+ 		if [ -f profile.out ]; then \
+ 			cat profile.out >> coverage.txt; \
+ 			rm profile.out; \
+@@ -81,11 +84,11 @@ cover: ## Runs go test with coverage
+ .PHONY: install
+ install: ## Installs the executable or package
+ 	@echo "+ $@"
+-	go install -a -tags "$(BUILDTAGS)" ${GO_LDFLAGS} .
++	$(GO) install -a -tags "$(BUILDTAGS)" ${GO_LDFLAGS} .
+ 
+ define buildpretty
+ mkdir -p $(BUILDDIR)/$(1)/$(2);
+-GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \
++GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \
+ 	 -o $(BUILDDIR)/$(1)/$(2)/$(NAME) \
+ 	 -a -tags "$(BUILDTAGS) static_build netgo" \
+ 	 -installsuffix netgo ${GO_LDFLAGS_STATIC} .;
+@@ -99,7 +102,7 @@ cross: *.go VERSION.txt ## Builds the cross-compiled binaries, creating a clean
+ 	$(foreach GOOSARCH,$(GOOSARCHES), $(call buildpretty,$(subst /,,$(dir $(GOOSARCH))),$(notdir $(GOOSARCH))))
+ 
+ define buildrelease
+-GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \
++GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \
+ 	 -o $(BUILDDIR)/$(NAME)-$(1)-$(2) \
+ 	 -a -tags "$(BUILDTAGS) static_build netgo" \
+ 	 -installsuffix netgo ${GO_LDFLAGS_STATIC} .;
+@@ -115,7 +118,7 @@ release: *.go VERSION.txt ## Builds the cross-compiled binaries, naming them in
+ .PHONY: bump-version
+ BUMP := patch
+ bump-version: ## Bump the version in the version file. Set BUMP to [ patch | major | minor ]
+-	@go get -u github.com/jessfraz/junk/sembump # update sembump tool
++	@$(GO) get -u github.com/jessfraz/junk/sembump # update sembump tool
+ 	$(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION)))
+ 	@echo "Bumping VERSION.txt from $(VERSION) to $(NEW_VERSION)"
+ 	echo $(NEW_VERSION) > VERSION.txt
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-networking/netns/netns_git.bb b/import-layers/meta-virtualization/recipes-networking/netns/netns_git.bb
index d35836e..82a961b 100644
--- a/import-layers/meta-virtualization/recipes-networking/netns/netns_git.bb
+++ b/import-layers/meta-virtualization/recipes-networking/netns/netns_git.bb
@@ -1,13 +1,13 @@
 HOMEPAGE = "https://github.com/jfrazelle/netns"
 SUMMARY = "Runc hook for setting up default bridge networking."
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=48ef0979a2bcc3fae14ff30b8a7f5dbf"
 
-SRC_URI = "git://github.com/jessfraz/netns;branch=master \
-           file://0001-Use-correct-go-cross-compiler.patch \
+SRC_URI = "git://github.com/genuinetools/netns;branch=master \
+           file://0001-Allow-selection-of-go-compiler.patch \
           "
-SRCREV = "74e23a0e5c4e7ac011aafcc4623586c196f1b3ef"
-PV = "0.2.1"
+SRCREV = "0da6ab0997707024debe68c91e940c9168041bf8"
+PV = "0.4.0"
 GO_IMPORT = "import"
 
 S = "${WORKDIR}/git"
@@ -26,9 +26,9 @@
 	# We also need to link in the ipallocator and version directories as
 	# they are not under the src directory.
 	ln -sfn . "${S}/src/import/vendor/src"
-	mkdir -p "${S}/src/import/vendor/src/github.com/jessfraz/netns"
-	ln -sfn "${S}/src/import/ipallocator" "${S}/src/import/vendor/src/github.com/jessfraz/netns/ipallocator"
-	ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/jessfraz/netns/version"
+	mkdir -p "${S}/src/import/vendor/src/github.com/genuinetools/netns"
+	ln -sfn "${S}/src/import/ipallocator" "${S}/src/import/vendor/src/github.com/genuinetools/netns/ipallocator"
+	ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/genuinetools/netns/version"
 	export GOPATH="${S}/src/import/vendor"
 
 	# Pass the needed cflags/ldflags so that cgo
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch
index 4441c1e..deff10b 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch
@@ -1,4 +1,4 @@
-From 04ad1c3d9f47cfdf4ad9b5d685e953ec094326ff Mon Sep 17 00:00:00 2001
+From f21a0490555d5fe8f5a9ce982defa666a64151c0 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Fri, 13 Jan 2017 16:12:55 -0500
 Subject: [PATCH] python: make remaining scripts use /usr/bin/env
@@ -12,6 +12,7 @@
 make use of /usr/bin/env to increase the chances of finding python.
 
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  build-aux/check-structs                  | 2 +-
  build-aux/extract-ofp-actions            | 2 +-
@@ -28,7 +29,7 @@
  12 files changed, 12 insertions(+), 12 deletions(-)
 
 diff --git a/build-aux/check-structs b/build-aux/check-structs
-index f79f235..c7b8730 100755
+index f79f235..5129b72 100755
 --- a/build-aux/check-structs
 +++ b/build-aux/check-structs
 @@ -1,4 +1,4 @@
@@ -38,7 +39,7 @@
  import os.path
  import sys
 diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
-index 184447b..92ea18d 100755
+index 0062ab8..ee8c4ff 100755
 --- a/build-aux/extract-ofp-actions
 +++ b/build-aux/extract-ofp-actions
 @@ -1,4 +1,4 @@
@@ -48,7 +49,7 @@
  import sys
  import os.path
 diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
-index 9642593..11e6de7 100755
+index 2312b76..e36444e 100755
 --- a/build-aux/extract-ofp-errors
 +++ b/build-aux/extract-ofp-errors
 @@ -1,4 +1,4 @@
@@ -58,7 +59,7 @@
  import sys
  import os.path
 diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
-index 498b887..5d6bcec 100755
+index 498b887..c248e76 100755
 --- a/build-aux/extract-ofp-fields
 +++ b/build-aux/extract-ofp-fields
 @@ -1,4 +1,4 @@
@@ -68,7 +69,7 @@
  import getopt
  import sys
 diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs
-index 1813638..e9e3c25 100755
+index 1813638..c2a91f9 100755
 --- a/build-aux/extract-ofp-msgs
 +++ b/build-aux/extract-ofp-msgs
 @@ -1,4 +1,4 @@
@@ -78,7 +79,7 @@
  import sys
  import os.path
 diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff
-index bd4e879..9d81503 100755
+index bd4e879..db45c56 100755
 --- a/build-aux/xml2nroff
 +++ b/build-aux/xml2nroff
 @@ -1,4 +1,4 @@
@@ -88,7 +89,7 @@
  # Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
  #
 diff --git a/ovn/utilities/ovn-docker-overlay-driver b/ovn/utilities/ovn-docker-overlay-driver
-index 52de3db..c90f02b 100755
+index 52de3db..3b1fa45 100755
 --- a/ovn/utilities/ovn-docker-overlay-driver
 +++ b/ovn/utilities/ovn-docker-overlay-driver
 @@ -1,4 +1,4 @@
@@ -98,7 +99,7 @@
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
 diff --git a/ovn/utilities/ovn-docker-underlay-driver b/ovn/utilities/ovn-docker-underlay-driver
-index 2c9c4b6..89b804c 100755
+index 2c9c4b6..551e7a1 100755
 --- a/ovn/utilities/ovn-docker-underlay-driver
 +++ b/ovn/utilities/ovn-docker-underlay-driver
 @@ -1,4 +1,4 @@
@@ -108,7 +109,7 @@
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
 diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
-index 5cf26ee..f76f4bd 100755
+index 5cf26ee..bdf2dcc 100755
 --- a/ovsdb/ovsdb-doc
 +++ b/ovsdb/ovsdb-doc
 @@ -1,4 +1,4 @@
@@ -147,6 +148,3 @@
  
  # This library is free software; you can redistribute it and/or
  # modify it under the terms of version 2.1 of the GNU Lesser General Public
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch
index a02b2a4..6a1b832 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch
@@ -1,4 +1,4 @@
-From 176528ca3a8b76c9d0bb71b1e56eeebccc655c71 Mon Sep 17 00:00:00 2001
+From 39d1af836d844c89e625cfc908545e93977af8be Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Wed, 3 May 2017 10:39:12 -0400
 Subject: [PATCH] python: switch remaining scripts to use python3
@@ -6,6 +6,7 @@
 Work to remove the main openvswitch package's dependency on python 2.
 
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
 ---
  ofproto/ipfix-gen-entities                            | 2 +-
  tests/test-l7.py                                      | 2 +-
@@ -108,6 +109,3 @@
  # Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch
index d619758..7bdcc00 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch
@@ -1,7 +1,7 @@
-From c5c18f9c5f1b7217d43af43be9736c1762c7ebba Mon Sep 17 00:00:00 2001
+From 3658d861c3c83caab9040bec04b195be3f86d4ce Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH 1/8] Python3 compatibility: Convert print statements
+Subject: [PATCH] Python3 compatibility: Convert print statements
 
 Commit d34a1cc02536f9a812517a71accec3fbd3c6c98b from
 https://github.com/openvswitch/ovs.git
@@ -11,6 +11,7 @@
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  build-aux/check-structs       |   4 +-
  build-aux/extract-ofp-actions |  68 +++---
@@ -22,7 +23,7 @@
  7 files changed, 306 insertions(+), 305 deletions(-)
 
 diff --git a/build-aux/check-structs b/build-aux/check-structs
-index f79f235..bae511f 100755
+index 5129b72..cbb19b6 100755
 --- a/build-aux/check-structs
 +++ b/build-aux/check-structs
 @@ -211,7 +211,7 @@ def checkStructs():
@@ -44,7 +45,7 @@
  
      global fileName
 diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
-index 0062ab8..874e6b4 100755
+index ee8c4ff..67e3848 100755
 --- a/build-aux/extract-ofp-actions
 +++ b/build-aux/extract-ofp-actions
 @@ -67,7 +67,7 @@ def fatal(msg):
@@ -187,7 +188,7 @@
  if __name__ == '__main__':
      if '--help' in sys.argv:
 diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
-index 2312b76..336a240 100755
+index e36444e..97d62d2 100755
 --- a/build-aux/extract-ofp-errors
 +++ b/build-aux/extract-ofp-errors
 @@ -426,7 +426,7 @@ static const struct ofperr_domain %s = {
@@ -200,7 +201,7 @@
                  print ("        {       -1, -1,  -1 }, /* %s */" % enum)
          print ("""\
 diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
-index 498b887..425a85f 100755
+index c248e76..80c7d35 100755
 --- a/build-aux/extract-ofp-fields
 +++ b/build-aux/extract-ofp-fields
 @@ -728,7 +728,7 @@ def make_ovs_fields(meta_flow_h, meta_flow_xml):
@@ -213,7 +214,7 @@
      recursively_replace(doc, 'oxm_classes', make_oxm_classes_xml(document))
  
 diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs
-index 1813638..a67e870 100755
+index c2a91f9..92c4bda 100755
 --- a/build-aux/extract-ofp-msgs
 +++ b/build-aux/extract-ofp-msgs
 @@ -56,14 +56,14 @@ def fatal(msg):
@@ -241,7 +242,7 @@
 +            print(line)
          
 diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
-index 5cf26ee..b34fb11 100755
+index bdf2dcc..e82ad59 100755
 --- a/ovsdb/ovsdb-doc
 +++ b/ovsdb/ovsdb-doc
 @@ -258,7 +258,7 @@ represent strong references; thin lines represent weak references.
@@ -272,11 +273,11 @@
      except error.Error, e:
          sys.stderr.write("%s: %s\n" % (argv0, e.msg))
 diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
-index 721ab50..1064448 100755
+index bfbcf23..62442ee 100755
 --- a/ovsdb/ovsdb-idlc.in
 +++ b/ovsdb/ovsdb-idlc.in
 @@ -1,5 +1,6 @@
- #! @PYTHON@
+ #! /usr/bin/env @PYTHON@
  
 +from __future__ import print_function
  import getopt
@@ -1259,6 +1260,3 @@
              elif key in ['-C', '--directory']:
                  os.chdir(value)
              else:
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch
index 3571245..f1f9bef 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch
@@ -1,17 +1,18 @@
-From 1cec65e45f011c3f52eed5e27d3d816502e36610 Mon Sep 17 00:00:00 2001
+From 28b2d17de9414161d5edd67766bd4b452cd809ef Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 20 Mar 2017 12:12:51 -0700
-Subject: [PATCH 1/2] use the linux if_packet.h Interface directly
+Subject: [PATCH] use the linux if_packet.h Interface directly
 
 Helps compiling with musl
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  lib/netdev-linux.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index a5a9ec1ab..9dd40acdd 100644
+index fccf88f..b703156 100644
 --- a/lib/netdev-linux.c
 +++ b/lib/netdev-linux.c
 @@ -33,14 +33,13 @@
@@ -30,6 +31,3 @@
  #include <net/route.h>
  #include <netinet/in.h>
  #include <poll.h>
--- 
-2.12.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch
index e44ffda..f997bbf 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch
@@ -1,21 +1,22 @@
-From 803bde12d32d16eefeae03422a0ac682e0601c43 Mon Sep 17 00:00:00 2001
+From 801023e72b31e7c49cbccedd76ade33a17fcbe45 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 20 Mar 2017 12:13:30 -0700
-Subject: [PATCH 2/2] Define WAIT_ANY if not provided by system
+Subject: [PATCH] Define WAIT_ANY if not provided by system
 
 POSIX does not define it and uses -1 directly
 some libc do not have this definitions
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  tests/test-ovn.c | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/tests/test-ovn.c b/tests/test-ovn.c
-index 2e82a6f0d..76e7db9fb 100644
+index 84adf81..2bc6bdf 100644
 --- a/tests/test-ovn.c
 +++ b/tests/test-ovn.c
-@@ -37,6 +37,10 @@
+@@ -38,6 +38,10 @@
  #include "simap.h"
  #include "util.h"
  
@@ -26,6 +27,3 @@
  /* --relops: Bitmap of the relational operators to test, in exhaustive test. */
  static unsigned int test_relops;
  
--- 
-2.12.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch
index 59c0f3e..70abd26 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch
@@ -1,7 +1,7 @@
-From c98fee41d130cb946aa4e60fefaa6cbf203f6790 Mon Sep 17 00:00:00 2001
+From c0ba116eab401431b4f11b66bd7d1b42741b03c3 Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH 2/8] Python3 compatibility: exception cleanup
+Subject: [PATCH] Python3 compatibility: exception cleanup
 
 Commit 52e4a477f0b3c0a0ece7adeede6e06e07814f8b9 from
 https://github.com/openvswitch/ovs.git
@@ -11,6 +11,7 @@
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  build-aux/extract-ofp-fields | 2 +-
  ovsdb/ovsdb-doc              | 4 ++--
@@ -18,7 +19,7 @@
  3 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
-index 425a85f..61e752b 100755
+index 80c7d35..6286c9c 100755
 --- a/build-aux/extract-ofp-fields
 +++ b/build-aux/extract-ofp-fields
 @@ -784,7 +784,7 @@ if __name__ == "__main__":
@@ -31,7 +32,7 @@
          sys.exit(1)
  
 diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
-index b34fb11..918e88a 100755
+index e82ad59..9448713 100755
 --- a/ovsdb/ovsdb-doc
 +++ b/ovsdb/ovsdb-doc
 @@ -278,7 +278,7 @@ if __name__ == "__main__":
@@ -53,7 +54,7 @@
          sys.exit(1)
  
 diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
-index 1064448..8b85f0d 100755
+index 62442ee..e7e1c6b 100755
 --- a/ovsdb/ovsdb-idlc.in
 +++ b/ovsdb/ovsdb-idlc.in
 @@ -1098,7 +1098,7 @@ if __name__ == "__main__":
@@ -74,6 +75,3 @@
          sys.stderr.write("%s: %s\n" % (argv0, e))
          sys.exit(1)
  
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch
index a85980e..98d77c8 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch
@@ -1,7 +1,7 @@
-From 9cbae86be03756df76560c15720756f9ac088144 Mon Sep 17 00:00:00 2001
+From 8557d51e8c7325a17219911e9a65eeb3946e869f Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH 3/8] Python3 compatibility: execfile to exec
+Subject: [PATCH] Python3 compatibility: execfile to exec
 
 Commit a4d10a7ca937d73873f6f98619d88682e69f5dbe from
 https://github.com/openvswitch/ovs.git
@@ -11,12 +11,13 @@
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  ovsdb/ovsdb-idlc.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
-index 8b85f0d..3fa1a0f 100755
+index e7e1c6b..e1551f9 100755
 --- a/ovsdb/ovsdb-idlc.in
 +++ b/ovsdb/ovsdb-idlc.in
 @@ -17,7 +17,7 @@ def parseSchema(filename):
@@ -28,6 +29,3 @@
      ovs.json.to_stream(schemaJson, sys.stdout)
      sys.stdout.write('\n')
  
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
index ddc86db..092c42d 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
@@ -1,7 +1,7 @@
-From 0f318e472d9897d99395adcfb17cbeaff05677ba Mon Sep 17 00:00:00 2001
+From 7e4bd5c2af85b1293be0a92b18f7930bda2ab41a Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH 4/8] Python3 compatibility: iteritems to items
+Subject: [PATCH] Python3 compatibility: iteritems to items
 
 Commit 4ab665623cbb4c6506e48b82e0c9fe8585f42e13 from
 https://github.com/openvswitch/ovs.git
@@ -11,6 +11,7 @@
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  build-aux/extract-ofp-actions | 2 +-
  build-aux/extract-ofp-errors  | 2 +-
@@ -19,7 +20,7 @@
  4 files changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
-index 874e6b4..c11297c 100755
+index 67e3848..c7858bd 100755
 --- a/build-aux/extract-ofp-actions
 +++ b/build-aux/extract-ofp-actions
 @@ -13,7 +13,7 @@ version_map = {"1.0": 0x01,
@@ -32,7 +33,7 @@
  # Map from vendor name to the length of the action header.
  vendor_map = {"OF": (0x00000000,  4),
 diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
-index 336a240..71ae0bd 100755
+index 97d62d2..58ba006 100755
 --- a/build-aux/extract-ofp-errors
 +++ b/build-aux/extract-ofp-errors
 @@ -14,7 +14,7 @@ version_map = {"1.0": 0x01,
@@ -45,7 +46,7 @@
  token = None
  line = ""
 diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
-index 61e752b..ef997dd 100755
+index 6286c9c..f624728 100755
 --- a/build-aux/extract-ofp-fields
 +++ b/build-aux/extract-ofp-fields
 @@ -16,7 +16,7 @@ VERSION = {"1.0": 0x01,
@@ -58,7 +59,7 @@
  TYPES = {"u8":       (1,   False),
           "be16":     (2,   False),
 diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
-index 3fa1a0f..615548f 100755
+index e1551f9..b70a599 100755
 --- a/ovsdb/ovsdb-idlc.in
 +++ b/ovsdb/ovsdb-idlc.in
 @@ -138,7 +138,7 @@ def printCIDLHeader(schemaFile):
@@ -97,6 +98,3 @@
          structName = "%s%s" % (prefix, tableName.lower())
          if table.is_root:
              is_root = "true"
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch
index 717a97d..d6f9364 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch
@@ -1,7 +1,7 @@
-From bc29f98f0137fa1083a4cacf832d52f740d150a8 Mon Sep 17 00:00:00 2001
+From d22c7f1c6ade82a0cd646cfcd8df9adda6cd1ad6 Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH 5/8] Python3 compatibility: fix integer problems
+Subject: [PATCH] Python3 compatibility: fix integer problems
 
 Commit fa145f1a53943243f94a32ce98525db8494b0052 from
 https://github.com/openvswitch/ovs.git
@@ -15,13 +15,14 @@
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  ovsdb/ovsdb-idlc.in   | 2 +-
  python/build/nroff.py | 2 ++
  2 files changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
-index 615548f..7cbcbf5 100755
+index b70a599..3645275 100755
 --- a/ovsdb/ovsdb-idlc.in
 +++ b/ovsdb/ovsdb-idlc.in
 @@ -358,7 +358,7 @@ static void
@@ -46,6 +47,3 @@
      extend = x + len(s) - len(text[y])
      if extend > 0:
          text[y] += ' ' * extend
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
index 54905cd..c53502b 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
@@ -1,7 +1,7 @@
-From 3a9fcf1c8f60c160c282c9755ee1c7f9f7e113c3 Mon Sep 17 00:00:00 2001
+From 7f542122d62b20d11198bfdb0f2c6a460261b5e7 Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH 6/8] Python3 compatibility: math error compatibility
+Subject: [PATCH] Python3 compatibility: math error compatibility
 
 Commit 3fa5aa4294377e0f35267936d0c5caea3e61db48 from
 https://github.com/openvswitch/ovs.git
@@ -34,12 +34,13 @@
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  build-aux/extract-ofp-actions | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
-index c11297c..bd7131f 100755
+index c7858bd..4d05ef9 100755
 --- a/build-aux/extract-ofp-actions
 +++ b/build-aux/extract-ofp-actions
 @@ -35,7 +35,7 @@ line = ""
@@ -51,6 +52,3 @@
  
  def open_file(fn):
      global file_name
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch
index faa32b7..753490f 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch
@@ -1,7 +1,7 @@
-From 2fe58f87b00d0ec24d6997930d0bcdb130c84396 Mon Sep 17 00:00:00 2001
+From c78b39ae9ba6337210d6a9e4ccc4753cb1c3b48f Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Thu, 29 Jun 2017 20:33:23 -0700
-Subject: [PATCH 7/8] Python3 compatibility: unicode to str
+Subject: [PATCH] Python3 compatibility: unicode to str
 
 Commit 7430959d4ad17db89b8387c3aef58c8b230cad10 from
 https://github.com/openvswitch/ovs.git
@@ -19,12 +19,13 @@
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  ovsdb/ovsdb-doc | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
-index 918e88a..406c293 100755
+index 9448713..d55c6e6 100755
 --- a/ovsdb/ovsdb-doc
 +++ b/ovsdb/ovsdb-doc
 @@ -65,9 +65,15 @@ def columnGroupToNroff(table, groupXml, documented_columns):
@@ -46,6 +47,3 @@
                      type_ = ovs.db.types.BaseType.from_json(type_json)
                  else:
                      type_ = column.type.value
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch
index d2c2be7..f55a5ca 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch
@@ -1,12 +1,13 @@
-From a3289add8368e0c970ae1c1c84f5df1f817ed43c Mon Sep 17 00:00:00 2001
+From f8491645416952b31000f42777ff79486a7b0511 Mon Sep 17 00:00:00 2001
 From: Ben Pfaff <blp@ovn.org>
 Date: Thu, 6 Jul 2017 14:01:27 -0700
-Subject: [PATCH 8/8] AUTHORS: Add Jason Wessel.
+Subject: [PATCH] AUTHORS: Add Jason Wessel.
 
 Commit a91c4cfaf863718bc94fb9c88939bd0b0385a6fe from
 https://github.com/openvswitch/ovs.git
 
 Signed-off-by: Ben Pfaff <blp@ovn.org>
+
 ---
  AUTHORS.rst | 1 +
  1 file changed, 1 insertion(+)
@@ -23,6 +24,3 @@
  Jasper Capel                    jasper@capel.tv
  Jean Tourrilhes                 jt@hpl.hp.com
  Jeremy Stribling                strib@nicira.com
--- 
-2.5.0
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/CVE-2017-9263.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/CVE-2017-9263.patch
deleted file mode 100644
index 0fc3aa1..0000000
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/CVE-2017-9263.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-A buggy or malicious switch could send a role status message with a bad
-reason code, which if printed by OVS would cause it to abort.  This fixes
-the problem.
-
-CVE: CVE-2017-9263
-Upstream-Status: Submitted
-
-Reported-by: Bhargava Shastry <bshastry at sec.t-labs.tu-berlin.de>
-Signed-off-by: Ben Pfaff <blp at ovn.org>
----
- lib/ofp-print.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/ofp-print.c b/lib/ofp-print.c
-index 7ca953100539..1932baf4871f 100644
---- a/lib/ofp-print.c
-+++ b/lib/ofp-print.c
-@@ -2147,7 +2147,8 @@ ofp_print_role_status_message(struct ds *string, const struct ofp_header *oh)
-         break;
-     case OFPCRR_N_REASONS:
-     default:
--        OVS_NOT_REACHED();
-+        ds_put_cstr(string, "(unknown)");
-+        break;
-     }
- }
- 
--- 
-2.10.2
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
index 1ad5d6f..5c86aac 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
@@ -1,13 +1,19 @@
-Disable m4 file test where sources are built from git.
+From f675d7209f999ce80cb4249c4ebb216697387b71 Mon Sep 17 00:00:00 2001
+From: Amy Fong <amy.fong@windriver.com>
+Date: Thu, 29 Jan 2015 09:56:03 -0500
+Subject: [PATCH] Disable m4 file test where sources are built from git.
 
 Signed-off-by: Amy Fong <amy.fong@windriver.com>
+
 ---
- Makefile.am |    2 +-
+ Makefile.am | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/Makefile.am b/Makefile.am
+index ff7d70a..2fc1f13 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -185,7 +185,7 @@
+@@ -189,7 +189,7 @@ CLEAN_LOCAL += clean-pycov
  # Makefile in datapath/linux, needed to get the list of files to
  # distribute, requires GNU make extensions.
  if GNU_MAKE
@@ -15,4 +21,4 @@
 +# ALL_LOCAL += dist-hook-git
  dist-hook-git: distfiles
  	@if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
- 	  (cd datapath && $(MAKE) distfiles);				    \
+ 	  (cd datapath && $(MAKE) distfiles); \
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
index 033cfb8..c177202 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
@@ -1,13 +1,19 @@
-Specify install path for kernel module
+From adfd2380d71dff1a31efaf63cf7ac97470466ec9 Mon Sep 17 00:00:00 2001
+From: Amy Fong <amy.fong@windriver.com>
+Date: Thu, 29 Jan 2015 09:56:03 -0500
+Subject: [PATCH] Specify install path for kernel module
 
 Signed-off-by: Amy Fong <amy.fong@windriver.com>
----
- datapath/linux/Makefile.main.in |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
 
+---
+ datapath/linux/Makefile.main.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
+index 7d18253..63c520f 100644
 --- a/datapath/linux/Makefile.main.in
 +++ b/datapath/linux/Makefile.main.in
-@@ -71,8 +71,8 @@
+@@ -71,8 +71,8 @@ default:
  	$(MAKE) -C $(KSRC) M=$(builddir) modules
  
  modules_install:
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch
deleted file mode 100644
index 47c81dd..0000000
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From a2a656e6976a60e5df3ade0d17a40b4ebdc2b41a Mon Sep 17 00:00:00 2001
-From: He Zhe <zhe.he@windriver.com>
-Date: Wed, 30 Mar 2016 06:23:45 -0400
-Subject: [PATCH] openvswitch: Add test-install rule to support ptest execution
-
-Signed-off-by: Radu Patriu <radu.patriu@enea.com>
-
-Fix ptest for v2.5
- - Copy certain files from srcdir since it has been different from
-   build directory.
- - Copy more necessary files for new added test cases.
- - Modify config files for running on target.
-
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- Makefile.am |  1 +
- test.mk     | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 73 insertions(+)
- create mode 100644 test.mk
-
-diff --git a/Makefile.am b/Makefile.am
-index a4dd7b8..0bd32c7 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -429,3 +429,4 @@ include windows/automake.mk
- include ovn/automake.mk
- include selinux/automake.mk
- include build-aux/automake.mk
-+include test.mk
-diff --git a/test.mk b/test.mk
-new file mode 100644
-index 0000000..b10a581
---- /dev/null
-+++ b/test.mk
-@@ -0,0 +1,72 @@
-+TEST_DEST ?= ${prefix}/lib/openvswitch
-+TEST_ROOT ?= ${prefix}/lib/openvswitch
-+TEST_DEPEND =
-+
-+if HAVE_OPENSSL
-+TEST_DEPEND += $(TESTPKI_FILES)
-+endif
-+
-+test-install: $(TEST_DEPEND)
-+	@list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
-+	install -d $(TEST_DEST)/tests ;\
-+	install $(srcdir)/vtep/ovs-vtep $(TEST_DEST)/tests ;\
-+	install -d $(TEST_DEST)/python ;\
-+	install -d $(TEST_DEST)/python/ovs ;\
-+	install -d $(TEST_DEST)/python/ovs/db ;\
-+	install -d $(TEST_DEST)/python/ovs/unixctl ;\
-+	install -d $(TEST_DEST)/vswitchd ;\
-+	install $(srcdir)/vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
-+	install vswitchd/ovs-vswitchd $(TEST_DEST)/vswitchd ;\
-+	install -d $(TEST_DEST)/debian ;\
-+	install $(srcdir)/debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
-+	install -d $(TEST_DEST)/build-aux ;\
-+	install $(srcdir)/build-aux/check-structs $(TEST_DEST)/build-aux ;\
-+	install -d $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
-+	install -d $(TEST_DEST)/vtep ;\
-+	install $(srcdir)/vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
-+	install -d $(TEST_DEST)/ovn ;\
-+	install $(srcdir)/ovn/ovn-nb.ovsschema $(TEST_DEST)/ovn ;\
-+	install $(srcdir)/ovn/ovn-sb.ovsschema $(TEST_DEST)/ovn ;\
-+	install -d $(TEST_DEST)/utilities ;\
-+	install $(srcdir)/utilities/ovs-pcap.in $(TEST_DEST)/utilities ;\
-+	install $(srcdir)/utilities/ovs-pki.in $(TEST_DEST)/utilities ;\
-+	for p in $$list ; do \
-+	  echo $$p ;\
-+	  p=$${p#../git/} ;\
-+	  pre=$${p#tests\/} ;\
-+	  if test $$pre != $$p ; then \
-+	    echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
-+	    if test -f $$p ; then \
-+	      install $$p $(TEST_DEST)/tests/$$pre ;\
-+	    else \
-+	      install $(srcdir)/$$p $(TEST_DEST)/tests/$$pre ;\
-+	    fi ;\
-+	    continue ;\
-+	  fi ;\
-+	  pre=$${p#python\/ovs\/} ;\
-+	  if test $$pre != $$p ; then \
-+	    echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
-+	    if test -f $$p ; then \
-+	      install $$p $(TEST_DEST)/python/ovs/$$pre ;\
-+	    else \
-+	      install $(srcdir)/$$p $(TEST_DEST)/python/ovs/$$pre ;\
-+	    fi ;\
-+	    continue ;\
-+	  fi; \
-+	done ;\
-+	sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|at_srcdir=.*|at_srcdir='"'"'.'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|at_top_srcdir=.*|at_top_srcdir='"'"'..'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|at_top_build_prefix=.*|at_top_build_prefix='"'"'../'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|^\(.*config\.log.*\)|#\1|g' $(TEST_DEST)/tests/testsuite
-+	sed -i 's|$$srcdir|$$abs_srcdir|g' $(TEST_DEST)/tests/testsuite
-+	sed -i 's|ovs-appctl-bashcomp\.bash|/etc/bash_completion.d/ovs-appctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
-+	sed -i 's|ovs-vsctl-bashcomp\.bash|/etc/bash_completion.d/ovs-vsctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
--- 
-2.7.4
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b8dcfbebee9e7dbc74ec5eecc9b45d335d6150c1.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b8dcfbebee9e7dbc74ec5eecc9b45d335d6150c1.patch
new file mode 100644
index 0000000..4ae86c3
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b8dcfbebee9e7dbc74ec5eecc9b45d335d6150c1.patch
@@ -0,0 +1,108 @@
+From fb68120ef8aed625b04b2fbd2cb78fc59a7b7432 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 30 Mar 2016 06:23:45 -0400
+Subject: [PATCH] openvswitch: Add test-install rule to support ptest execution
+
+Signed-off-by: Radu Patriu <radu.patriu@enea.com>
+
+Fix ptest for v2.5
+ - Copy certain files from srcdir since it has been different from
+   build directory.
+ - Copy more necessary files for new added test cases.
+ - Modify config files for running on target.
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+
+---
+ Makefile.am |  1 +
+ test.mk     | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 73 insertions(+)
+ create mode 100644 test.mk
+
+diff --git a/Makefile.am b/Makefile.am
+index ea63acb..ff7d70a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -429,3 +429,4 @@ include windows/automake.mk
+ include ovn/automake.mk
+ include selinux/automake.mk
+ include build-aux/automake.mk
++include test.mk
+diff --git a/test.mk b/test.mk
+new file mode 100644
+index 0000000..b10a581
+--- /dev/null
++++ b/test.mk
+@@ -0,0 +1,72 @@
++TEST_DEST ?= ${prefix}/lib/openvswitch
++TEST_ROOT ?= ${prefix}/lib/openvswitch
++TEST_DEPEND =
++
++if HAVE_OPENSSL
++TEST_DEPEND += $(TESTPKI_FILES)
++endif
++
++test-install: $(TEST_DEPEND)
++	@list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
++	install -d $(TEST_DEST)/tests ;\
++	install $(srcdir)/vtep/ovs-vtep $(TEST_DEST)/tests ;\
++	install -d $(TEST_DEST)/python ;\
++	install -d $(TEST_DEST)/python/ovs ;\
++	install -d $(TEST_DEST)/python/ovs/db ;\
++	install -d $(TEST_DEST)/python/ovs/unixctl ;\
++	install -d $(TEST_DEST)/vswitchd ;\
++	install $(srcdir)/vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
++	install vswitchd/ovs-vswitchd $(TEST_DEST)/vswitchd ;\
++	install -d $(TEST_DEST)/debian ;\
++	install $(srcdir)/debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
++	install -d $(TEST_DEST)/build-aux ;\
++	install $(srcdir)/build-aux/check-structs $(TEST_DEST)/build-aux ;\
++	install -d $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
++	install -d $(TEST_DEST)/vtep ;\
++	install $(srcdir)/vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
++	install -d $(TEST_DEST)/ovn ;\
++	install $(srcdir)/ovn/ovn-nb.ovsschema $(TEST_DEST)/ovn ;\
++	install $(srcdir)/ovn/ovn-sb.ovsschema $(TEST_DEST)/ovn ;\
++	install -d $(TEST_DEST)/utilities ;\
++	install $(srcdir)/utilities/ovs-pcap.in $(TEST_DEST)/utilities ;\
++	install $(srcdir)/utilities/ovs-pki.in $(TEST_DEST)/utilities ;\
++	for p in $$list ; do \
++	  echo $$p ;\
++	  p=$${p#../git/} ;\
++	  pre=$${p#tests\/} ;\
++	  if test $$pre != $$p ; then \
++	    echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
++	    if test -f $$p ; then \
++	      install $$p $(TEST_DEST)/tests/$$pre ;\
++	    else \
++	      install $(srcdir)/$$p $(TEST_DEST)/tests/$$pre ;\
++	    fi ;\
++	    continue ;\
++	  fi ;\
++	  pre=$${p#python\/ovs\/} ;\
++	  if test $$pre != $$p ; then \
++	    echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
++	    if test -f $$p ; then \
++	      install $$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    else \
++	      install $(srcdir)/$$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    fi ;\
++	    continue ;\
++	  fi; \
++	done ;\
++	sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_srcdir=.*|at_srcdir='"'"'.'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_top_srcdir=.*|at_top_srcdir='"'"'..'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_top_build_prefix=.*|at_top_build_prefix='"'"'../'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|^\(.*config\.log.*\)|#\1|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|$$srcdir|$$abs_srcdir|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|ovs-appctl-bashcomp\.bash|/etc/bash_completion.d/ovs-appctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|ovs-vsctl-bashcomp\.bash|/etc/bash_completion.d/ovs-vsctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb
index b4aab35..c3a8301 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb
@@ -3,20 +3,20 @@
 DEPENDS += "virtual/kernel"
 
 RDEPENDS_${PN}-ptest += "\
-	python3-logging python3-syslog python3-argparse python3-io \
-	python3-fcntl python3-shell python3-lang python3-xml python3-math \
+	python3-logging python3-syslog python3-io \
+	python3-fcntl python3-shell python3-xml python3-math \
 	python3-datetime python3-netclient python3 sed \
 	ldd perl-module-socket perl-module-carp perl-module-exporter \
 	perl-module-xsloader python3-netserver python3-threading \
-	python3-resource python3-subprocess findutils which \
+	python3-resource findutils which \
 	"
 
 S = "${WORKDIR}/git"
-PV = "2.7.1+${SRCREV}"
+PV = "2.7.3+${SRCREV}"
 
 FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:"
 
-SRCREV = "b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc"
+SRCREV = "b8dcfbebee9e7dbc74ec5eecc9b45d335d6150c1"
 SRC_URI = "file://openvswitch-switch \
            file://openvswitch-switch-setup \
            file://openvswitch-testcontroller \
@@ -29,7 +29,6 @@
            file://python-make-remaining-scripts-use-usr-bin-env.patch \
            file://0001-use-the-linux-if_packet.h-Interface-directly.patch \
            file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \
-           file://CVE-2017-9263.patch \
            file://python-switch-remaining-scripts-to-use-python3.patch \
            "
 
diff --git a/import-layers/meta-virtualization/recipes-support/dnsmasq/dnsmasq_2.%.bbappend b/import-layers/meta-virtualization/recipes-support/dnsmasq/dnsmasq_2.%.bbappend
deleted file mode 100644
index 8d66ca6..0000000
--- a/import-layers/meta-virtualization/recipes-support/dnsmasq/dnsmasq_2.%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-# dnsmasq is greedy with interfaces by default using bind-dynamic will
-# make it less greedy but still function as it did by default.
-do_install_append() {
-    sed -i '/#bind-interfaces/a # Play nice with libvirt\nbind-dynamic' ${D}${sysconfdir}/dnsmasq.conf
-}
diff --git a/import-layers/yocto-poky/.gitignore b/import-layers/yocto-poky/.gitignore
index 94894d4..d3ef473 100644
--- a/import-layers/yocto-poky/.gitignore
+++ b/import-layers/yocto-poky/.gitignore
@@ -18,9 +18,13 @@
 !meta-yocto
 !meta-yocto-bsp
 !meta-yocto-imported
-documentation/user-manual/user-manual.html
-documentation/user-manual/user-manual.pdf
-documentation/user-manual/user-manual.tgz
+/documentation/*/eclipse/
+/documentation/*/*.html
+/documentation/*/*.pdf
+/documentation/*/*.tgz
+/bitbake/doc/bitbake-user-manual/bitbake-user-manual.html
+/bitbake/doc/bitbake-user-manual/bitbake-user-manual.pdf
+/bitbake/doc/bitbake-user-manual/bitbake-user-manual.tgz
 pull-*/
 bitbake/lib/toaster/contrib/tts/backlog.txt
 bitbake/lib/toaster/contrib/tts/log/*
diff --git a/import-layers/yocto-poky/README.LSB b/import-layers/yocto-poky/README.LSB
index c9dca3f..f68d07c 100644
--- a/import-layers/yocto-poky/README.LSB
+++ b/import-layers/yocto-poky/README.LSB
@@ -23,3 +23,4 @@
 * libpng 1.2 isn't provided; oe-core includes the latest release of libpng
   instead.
 
+* pax (POSIX standard archive) tool is not provided.
diff --git a/import-layers/yocto-poky/bitbake/bin/bitbake b/import-layers/yocto-poky/bitbake/bin/bitbake
index 3acc23a..342cef9 100755
--- a/import-layers/yocto-poky/bitbake/bin/bitbake
+++ b/import-layers/yocto-poky/bitbake/bin/bitbake
@@ -38,7 +38,7 @@
 if sys.getfilesystemencoding() != "utf-8":
     sys.exit("Please use a locale setting which supports UTF-8 (such as LANG=en_US.UTF-8).\nPython can't change the filesystem locale after loading so we need a UTF-8 when Python starts or things won't work.")
 
-__version__ = "1.36.0"
+__version__ = "1.38.0"
 
 if __name__ == "__main__":
     if __version__ != bb.__version__:
diff --git a/import-layers/yocto-poky/bitbake/bin/toaster b/import-layers/yocto-poky/bitbake/bin/toaster
index 4036f0a..ed365ee 100755
--- a/import-layers/yocto-poky/bitbake/bin/toaster
+++ b/import-layers/yocto-poky/bitbake/bin/toaster
@@ -68,7 +68,7 @@
         if [ -f ${pidfile} ]; then
             pid=`cat ${pidfile}`
             while kill -0 $pid 2>/dev/null; do
-                kill -SIGTERM -$pid 2>/dev/null
+                kill -SIGTERM $pid 2>/dev/null
                 sleep 1
             done
             rm  ${pidfile}
@@ -91,7 +91,7 @@
 
     echo "Starting webserver..."
 
-    $MANAGE runserver "$ADDR_PORT" \
+    $MANAGE runserver --noreload "$ADDR_PORT" \
            </dev/null >>${BUILDDIR}/toaster_web.log 2>&1 \
            & echo $! >${BUILDDIR}/.toastermain.pid
 
diff --git a/import-layers/yocto-poky/bitbake/contrib/dump_cache.py b/import-layers/yocto-poky/bitbake/contrib/dump_cache.py
index f4d4c1b..8963ca4 100755
--- a/import-layers/yocto-poky/bitbake/contrib/dump_cache.py
+++ b/import-layers/yocto-poky/bitbake/contrib/dump_cache.py
@@ -2,7 +2,7 @@
 # ex:ts=4:sw=4:sts=4:et
 # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
 #
-# Copyright (C) 2012 Wind River Systems, Inc.
+# Copyright (C) 2012, 2018 Wind River Systems, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -18,51 +18,68 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 #
-# This is used for dumping the bb_cache.dat, the output format is:
-# recipe_path PN PV PACKAGES
+# Used for dumping the bb_cache.dat
 #
 import os
 import sys
-import warnings
+import argparse
 
 # For importing bb.cache
 sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), '../lib'))
 from bb.cache import CoreRecipeInfo
 
-import pickle as pickle
+import pickle
 
-def main(argv=None):
-    """
-    Get the mapping for the target recipe.
-    """
-    if len(argv) != 1:
-        print("Error, need one argument!", file=sys.stderr)
-        return 2
+class DumpCache(object):
+    def __init__(self):
+        parser = argparse.ArgumentParser(
+            description="bb_cache.dat's dumper",
+            epilog="Use %(prog)s --help to get help")
+        parser.add_argument("-r", "--recipe",
+            help="specify the recipe, default: all recipes", action="store")
+        parser.add_argument("-m", "--members",
+            help = "specify the member, use comma as separator for multiple ones, default: all members", action="store", default="")
+        parser.add_argument("-s", "--skip",
+            help = "skip skipped recipes", action="store_true")
+        parser.add_argument("cachefile",
+            help = "specify bb_cache.dat", nargs = 1, action="store", default="")
 
-    cachefile = argv[0]
+        self.args = parser.parse_args()
 
-    with open(cachefile, "rb") as cachefile:
-        pickled = pickle.Unpickler(cachefile)
-        while cachefile:
-            try:
-                key = pickled.load()
-                val = pickled.load()
-            except Exception:
-                break
-            if isinstance(val, CoreRecipeInfo) and (not val.skipped):
-                pn = val.pn
-                # Filter out the native recipes.
-                if key.startswith('virtual:native:') or pn.endswith("-native"):
-                    continue
+    def main(self):
+        with open(self.args.cachefile[0], "rb") as cachefile:
+            pickled = pickle.Unpickler(cachefile)
+            while True:
+                try:
+                    key = pickled.load()
+                    val = pickled.load()
+                except Exception:
+                    break
+                if isinstance(val, CoreRecipeInfo):
+                    pn = val.pn
 
-                # 1.0 is the default version for a no PV recipe.
-                if "pv" in val.__dict__:
-                    pv = val.pv
-                else:
-                    pv = "1.0"
+                    if self.args.recipe and self.args.recipe != pn:
+                        continue
 
-                print("%s %s %s %s" % (key, pn, pv, ' '.join(val.packages)))
+                    if self.args.skip and val.skipped:
+                        continue
+
+                    if self.args.members:
+                        out = key
+                        for member in self.args.members.split(','):
+                            out += ": %s" % val.__dict__.get(member)
+                        print("%s" % out)
+                    else:
+                        print("%s: %s" % (key, val.__dict__))
+                elif not self.args.recipe:
+                    print("%s %s" % (key, val))
 
 if __name__ == "__main__":
-    sys.exit(main(sys.argv[1:]))
-
+    try:
+        dump = DumpCache()
+        ret = dump.main()
+    except Exception as esc:
+        ret = 1
+        import traceback
+        traceback.print_exc()
+    sys.exit(ret)
diff --git a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
index e4cc422..f1caaec 100644
--- a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
+++ b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
@@ -781,7 +781,7 @@
             The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
             of this and also illustrates how you can insert your own policy into the system
             if so desired.
-            This file defines the two basic signature generators OpenEmbedded Core
+            This file defines the two basic signature generators OpenEmbedded-Core
             uses:  "OEBasic" and "OEBasicHash".
             By default, there is a dummy "noop" signature handler enabled in BitBake.
             This means that behavior is unchanged from previous versions.
diff --git a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
index c721e86..29ae486 100644
--- a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
+++ b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
@@ -777,6 +777,43 @@
             </para>
         </section>
 
+        <section id='repo-fetcher'>
+            <title>Repo Fetcher (<filename>repo://</filename>)</title>
+
+            <para>
+                This fetcher submodule fetches code from
+                <filename>google-repo</filename> source control system.
+                The fetcher works by initiating and syncing sources of the
+                repository into
+                <link linkend='var-REPODIR'><filename>REPODIR</filename></link>,
+                which is usually
+                <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link><filename>/repo</filename>.
+            </para>
+
+            <para>
+                This fetcher supports the following parameters:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>"protocol":</emphasis>
+                        Protocol to fetch the repository manifest (default: git).
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>"branch":</emphasis>
+                        Branch or tag of repository to get (default: master).
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>"manifest":</emphasis>
+                        Name of the manifest file (default: <filename>default.xml</filename>).
+                        </para></listitem>
+                </itemizedlist>
+                Here are some example URLs:
+                <literallayout class='monospaced'>
+    SRC_URI = "repo://REPOROOT;protocol=git;branch=some_branch;manifest=my_manifest.xml"
+    SRC_URI = "repo://REPOROOT;protocol=file;branch=some_branch;manifest=my_manifest.xml"
+                </literallayout>
+            </para>
+        </section>
+
         <section id='other-fetchers'>
             <title>Other Fetchers</title>
 
@@ -796,9 +833,6 @@
                         Secure Shell (<filename>ssh://</filename>)
                         </para></listitem>
                     <listitem><para>
-                        Repo (<filename>repo://</filename>)
-                        </para></listitem>
-                    <listitem><para>
                         OSC (<filename>osc://</filename>)
                         </para></listitem>
                     <listitem><para>
diff --git a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
index 9253eaf..9076f0f 100644
--- a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
+++ b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
@@ -260,7 +260,7 @@
                 files.
                 For this example, you need to create the file in your project directory
                 and define some key BitBake variables.
-                For more information on the <filename>bitbake.conf</filename>,
+                For more information on the <filename>bitbake.conf</filename> file,
                 see
                 <ulink url='http://git.openembedded.org/bitbake/tree/conf/bitbake.conf'></ulink>.
                 </para>
@@ -273,14 +273,32 @@
                 some editor to create the <filename>bitbake.conf</filename>
                 so that it contains the following:
                 <literallayout class='monospaced'>
+     <link linkend='var-PN'>PN</link>  = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
+                </literallayout>
+                <literallayout class='monospaced'>
      TMPDIR  = "${<link linkend='var-TOPDIR'>TOPDIR</link>}/tmp"
      <link linkend='var-CACHE'>CACHE</link>   = "${TMPDIR}/cache"
-     <link linkend='var-STAMP'>STAMP</link>   = "${TMPDIR}/stamps"
-     <link linkend='var-T'>T</link>       = "${TMPDIR}/work"
-     <link linkend='var-B'>B</link>       = "${TMPDIR}"
+     <link linkend='var-STAMP'>STAMP</link>   = "${TMPDIR}/${PN}/stamps"
+     <link linkend='var-T'>T</link>       = "${TMPDIR}/${PN}/work"
+     <link linkend='var-B'>B</link>       = "${TMPDIR}/${PN}"
                 </literallayout>
+                <note>
+                    Without a value for <filename>PN</filename>, the
+                    variables <filename>STAMP</filename>,
+                    <filename>T</filename>, and <filename>B</filename>,
+                    prevent more than one recipe from working. You can fix
+                    this by either setting <filename>PN</filename> to have
+                    a value similar to what OpenEmbedded and BitBake use
+                    in the default <filename>bitbake.conf</filename> file
+                    (see previous example). Or, by manually updating each
+                    recipe to set <filename>PN</filename>. You will also
+                    need to include <filename>PN</filename> as part of the
+                    <filename>STAMP</filename>, <filename>T</filename>, and
+                    <filename>B</filename> variable definitions in the
+                    <filename>local.conf</filename> file.
+                </note>
                 The <filename>TMPDIR</filename> variable establishes a directory
-                that BitBake uses for build output and intermediate files (other
+                that BitBake uses for build output and intermediate files other
                 than the cached information used by the
                 <link linkend='setscene'>Setscene</link> process.
                 Here, the <filename>TMPDIR</filename> directory is set to
@@ -300,19 +318,19 @@
                 file exists, you can run the <filename>bitbake</filename>
                 command again:
                 <literallayout class='monospaced'>
-$ bitbake
-ERROR: Traceback (most recent call last):
-  File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 163, in wrapped
-    return func(fn, *args)
-  File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 177, in _inherit
-    bb.parse.BBHandler.inherit(bbclass, "configuration INHERITs", 0, data)
-  File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 92, in inherit
-    include(fn, file, lineno, d, "inherit")
-  File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 100, in include
-    raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
-ParseError: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass
+     $ bitbake
+     ERROR: Traceback (most recent call last):
+       File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 163, in wrapped
+         return func(fn, *args)
+       File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 177, in _inherit
+         bb.parse.BBHandler.inherit(bbclass, "configuration INHERITs", 0, data)
+       File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 92, in inherit
+         include(fn, file, lineno, d, "inherit")
+       File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 100, in include
+         raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
+     ParseError: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass
 
-ERROR: Unable to parse base: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass
+     ERROR: Unable to parse base: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass
                 </literallayout>
                 In the sample output, BitBake could not find the
                 <filename>classes/base.bbclass</filename> file.
@@ -365,10 +383,10 @@
                 code separate from the general metadata used by BitBake.
                 Thus, this example creates and uses a layer called "mylayer".
                 <note>
-                    You can find additional information on layers at
-                    <ulink url='http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#layers'></ulink>.
-                </note>
-                </para>
+                    You can find additional information on layers in the
+                    "<link linkend='layers'>Layers</link>" section.
+                </note></para>
+
                 <para>Minimally, you need a recipe file and a layer configuration
                 file in your layer.
                 The configuration file needs to be in the <filename>conf</filename>
diff --git a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
index 08d9afd..4cf0ed9 100644
--- a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
+++ b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
@@ -488,8 +488,6 @@
                              target that failed and anything depending on it cannot
                              be built, as much as possible will be built before
                              stopping.
-       -a, --tryaltconfigs   Continue with builds by trying to use alternative
-                             providers where possible.
        -f, --force           Force the specified targets/task to run (invalidating
                              any existing stamp file).
        -c CMD, --cmd=CMD     Specify the task to execute. The exact options
@@ -504,19 +502,20 @@
                              Read the specified file before bitbake.conf.
        -R POSTFILE, --postread=POSTFILE
                              Read the specified file after bitbake.conf.
-       -v, --verbose         Enable tracing of shell tasks (with 'set -x').
-                             Also print bb.note(...) messages to stdout (in
-                             addition to writing them to ${T}/log.do_&lt;task&gt;).
-       -D, --debug           Increase the debug level. You can specify this
-                             more than once. -D sets the debug level to 1,
-                             where only bb.debug(1, ...) messages are printed
-                             to stdout; -DD sets the debug level to 2, where
-                             both bb.debug(1, ...) and bb.debug(2, ...)
-                             messages are printed; etc. Without -D, no debug
-                             messages are printed. Note that -D only affects
-                             output to stdout. All debug messages are written
-                             to ${T}/log.do_taskname, regardless of the debug
-                             level.
+       -v, --verbose         Enable tracing of shell tasks (with 'set -x'). Also
+                             print bb.note(...) messages to stdout (in addition to
+                             writing them to ${T}/log.do_&lt;task&gt;).
+       -D, --debug           Increase the debug level. You can specify this more
+                             than once. -D sets the debug level to 1, where only
+                             bb.debug(1, ...) messages are printed to stdout; -DD
+                             sets the debug level to 2, where both bb.debug(1, ...)
+                             and bb.debug(2, ...) messages are printed; etc.
+                             Without -D, no debug messages are printed. Note that
+                             -D only affects output to stdout. All debug messages
+                             are written to ${T}/log.do_taskname, regardless of the
+                             debug level.
+       -q, --quiet           Output less log message data to the terminal. You can
+                             specify this more than once.
        -n, --dry-run         Don't execute, just go through the motions.
        -S SIGNATURE_HANDLER, --dump-signatures=SIGNATURE_HANDLER
                              Dump out the signature construction information, with
@@ -539,30 +538,38 @@
        -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
                              Show debug logging for the specified logging domains
        -P, --profile         Profile the command and save reports.
-       -u UI, --ui=UI        The user interface to use (taskexp, knotty or
-                             ncurses - default knotty).
-       -t SERVERTYPE, --servertype=SERVERTYPE
-                             Choose which server type to use (process or xmlrpc -
-                             default process).
+       -u UI, --ui=UI        The user interface to use (knotty, ncurses or taskexp
+                             - default knotty).
        --token=XMLRPCTOKEN   Specify the connection token to be used when
                              connecting to a remote server.
        --revisions-changed   Set the exit code depending on whether upstream
                              floating revisions have changed or not.
        --server-only         Run bitbake without a UI, only starting a server
                              (cooker) process.
-       -B BIND, --bind=BIND  The name/address for the bitbake server to bind to.
+       -B BIND, --bind=BIND  The name/address for the bitbake xmlrpc server to bind
+                             to.
+       -T SERVER_TIMEOUT, --idle-timeout=SERVER_TIMEOUT
+                             Set timeout to unload bitbake server due to
+                             inactivity, set to -1 means no unload, default:
+                             Environment variable BB_SERVER_TIMEOUT.
        --no-setscene         Do not run any setscene tasks. sstate will be ignored
                              and everything needed, built.
        --setscene-only       Only run setscene tasks, don't run any real tasks.
        --remote-server=REMOTE_SERVER
                              Connect to the specified server.
-       -m, --kill-server     Terminate the remote server.
+       -m, --kill-server     Terminate any running bitbake server.
        --observe-only        Connect to a server as an observing-only client.
        --status-only         Check the status of the remote bitbake server.
        -w WRITEEVENTLOG, --write-log=WRITEEVENTLOG
                              Writes the event log of the build to a bitbake event
                              json file. Use '' (empty string) to assign the name
                              automatically.
+       --runall=RUNALL       Run the specified task for any recipe in the taskgraph
+                             of the specified target (even if it wouldn't otherwise
+                             have run).
+       --runonly=RUNONLY     Run only the specified task within the taskgraph of
+                             the specified targets (and any task dependencies those
+                             tasks may have).
                 </literallayout>
             </para>
         </section>
diff --git a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index 0cfa53d..b4fc64e 100644
--- a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -2132,6 +2132,8 @@
                 <listitem><para>
                     <filename>bb.event.BuildStarted()</filename>:
                     Fired when a new build starts.
+                    BitBake fires multiple "BuildStarted" events (one per configuration)
+                    when multiple configuration (multiconfig) is enabled.
                     </para></listitem>
                 <listitem><para>
                     <filename>bb.build.TaskStarted()</filename>:
@@ -2650,47 +2652,70 @@
         </para>
 
         <para>
-            This list is a place holder of content existed from previous work
-            on the manual.
-            Some or all of it probably needs integrated into the subsections
-            that make up this section.
-            For now, I have just provided a short glossary-like description
-            for each variable.
-            Ultimately, this list goes away.
+            These checksums are stored in
+            <link linkend='var-STAMP'><filename>STAMP</filename></link>.
+            You can examine the checksums using the following BitBake command:
+            <literallayout class='monospaced'>
+     $ bitbake-dumpsigs
+            </literallayout>
+            This command returns the signature data in a readable format
+            that allows you to examine the inputs used when the
+            OpenEmbedded build system generates signatures.
+            For example, using <filename>bitbake-dumpsigs</filename>
+            allows you to examine the <filename>do_compile</filename>
+            task's “sigdata” for a C application (e.g.
+            <filename>bash</filename>).
+            Running the command also reveals that the “CC” variable is part of
+            the inputs that are hashed.
+            Any changes to this variable would invalidate the stamp and
+            cause the <filename>do_compile</filename> task to run.
+        </para>
+
+        <para>
+            The following list describes related variables:
             <itemizedlist>
-                <listitem><para><filename>STAMP</filename>:
-                    The base path to create stamp files.</para></listitem>
-                <listitem><para><filename>STAMPCLEAN</filename>
-                    Again, the base path to create stamp files but can use wildcards
-                    for matching a range of files for clean operations.
-                    </para></listitem>
-                <listitem><para><filename>BB_STAMP_WHITELIST</filename>
-                    Lists stamp files that are looked at when the stamp policy
-                    is "whitelist".
-                    </para></listitem>
-                <listitem><para><filename>BB_STAMP_POLICY</filename>
-                    Defines the mode for comparing timestamps of stamp files.
-                    </para></listitem>
-                <listitem><para><filename>BB_HASHCHECK_FUNCTION</filename>
+                <listitem><para>
+                    <link linkend='var-BB_HASHCHECK_FUNCTION'><filename>BB_HASHCHECK_FUNCTION</filename></link>:
                     Specifies the name of the function to call during
                     the "setscene" part of the task's execution in order
                     to validate the list of task hashes.
                     </para></listitem>
-                <listitem><para><filename>BB_SETSCENE_VERIFY_FUNCTION2</filename>
-                    Specifies a function to call that verifies the list of
-                    planned task execution before the main task execution
-                    happens.
-                    </para></listitem>
-                <listitem><para><filename>BB_SETSCENE_DEPVALID</filename>
+                <listitem><para>
+                    <link linkend='var-BB_SETSCENE_DEPVALID'><filename>BB_SETSCENE_DEPVALID</filename></link>:
                     Specifies a function BitBake calls that determines
                     whether BitBake requires a setscene dependency to
                     be met.
                     </para></listitem>
-                <listitem><para><filename>BB_TASKHASH</filename>
+                <listitem><para>
+                    <link linkend='var-BB_SETSCENE_VERIFY_FUNCTION2'><filename>BB_SETSCENE_VERIFY_FUNCTION2</filename></link>:
+                    Specifies a function to call that verifies the list of
+                    planned task execution before the main task execution
+                    happens.
+                    </para></listitem>
+                <listitem><para>
+                    <link linkend='var-BB_STAMP_POLICY'><filename>BB_STAMP_POLICY</filename></link>:
+                    Defines the mode for comparing timestamps of stamp files.
+                    </para></listitem>
+                <listitem><para>
+                    <link linkend='var-BB_STAMP_WHITELIST'><filename>BB_STAMP_WHITELIST</filename></link>:
+                    Lists stamp files that are looked at when the stamp policy
+                    is "whitelist".
+                    </para></listitem>
+                <listitem><para>
+                    <link linkend='var-BB_TASKHASH'><filename>BB_TASKHASH</filename></link>:
                     Within an executing task, this variable holds the hash
                     of the task as returned by the currently enabled
                     signature generator.
                     </para></listitem>
+                <listitem><para>
+                    <link linkend='var-STAMP'><filename>STAMP</filename></link>:
+                    The base path to create stamp files.
+                    </para></listitem>
+                <listitem><para>
+                    <link linkend='var-STAMPCLEAN'><filename>STAMPCLEAN</filename></link>:
+                    Again, the base path to create stamp files but can use wildcards
+                    for matching a range of files for clean operations.
+                    </para></listitem>
             </itemizedlist>
         </para>
     </section>
diff --git a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
index d89e123..0313359 100644
--- a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
+++ b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
@@ -78,7 +78,7 @@
                 </para>
 
                 <para>
-                    In OpenEmbedded Core, <filename>ASSUME_PROVIDED</filename>
+                    In OpenEmbedded-Core, <filename>ASSUME_PROVIDED</filename>
                     mostly specifies native tools that should not be built.
                     An example is <filename>git-native</filename>, which
                     when specified allows for the Git binary from the host to
@@ -964,7 +964,7 @@
                     Allows you to extend a recipe so that it builds variants
                     of the software.
                     Some examples of these variants for recipes from the
-                    OpenEmbedded Core metadata are "natives" such as
+                    OpenEmbedded-Core metadata are "natives" such as
                     <filename>quilt-native</filename>, which is a copy of
                     Quilt built to run on the build system; "crosses" such
                     as <filename>gcc-cross</filename>, which is a compiler
@@ -980,7 +980,7 @@
                     amount of code, it usually is as simple as adding the
                     variable to your recipe.
                     Here are two examples.
-                    The "native" variants are from the OpenEmbedded Core
+                    The "native" variants are from the OpenEmbedded-Core
                     metadata:
                     <literallayout class='monospaced'>
      BBCLASSEXTEND =+ "native nativesdk"
@@ -2089,6 +2089,16 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-REPODIR'><glossterm>REPODIR</glossterm>
+            <glossdef>
+                <para>
+                    The directory in which a local copy of a
+                    <filename>google-repo</filename> directory is stored
+                    when it is synced.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-RPROVIDES'><glossterm>RPROVIDES</glossterm>
             <glossdef>
                 <para>
diff --git a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
index 4aef4e7..d793265 100644
--- a/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
+++ b/import-layers/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
@@ -56,7 +56,7 @@
 -->
 
         <copyright>
-            <year>2004-2016</year>
+            <year>2004-2018</year>
             <holder>Richard Purdie</holder>
             <holder>Chris Larson</holder>
             <holder>and Phil Blundell</holder>
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/__init__.py b/import-layers/yocto-poky/bitbake/lib/bb/__init__.py
index 5268831..d24adb8 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/__init__.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/__init__.py
@@ -21,7 +21,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-__version__ = "1.36.0"
+__version__ = "1.38.0"
 
 import sys
 if sys.version_info < (3, 4, 0):
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/build.py b/import-layers/yocto-poky/bitbake/lib/bb/build.py
index 0d0100a..4631abd 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/build.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/build.py
@@ -872,6 +872,12 @@
     that this may lead to the task itself being listed.
     """
     preceed = set()
+
+    # Ignore tasks which don't exist
+    tasks = d.getVar('__BBTASKS', False)
+    if task not in tasks:
+        return preceed
+
     preceed.update(d.getVarFlag(task, 'deps') or [])
     if with_recrdeptasks:
         recrdeptask = d.getVarFlag(task, 'recrdeptask')
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/cache.py b/import-layers/yocto-poky/bitbake/lib/bb/cache.py
index 86ce0e7..168a77a 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/cache.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/cache.py
@@ -395,7 +395,7 @@
         self.has_cache = True
         self.cachefile = getCacheFile(self.cachedir, "bb_cache.dat", self.data_hash)
 
-        logger.debug(1, "Using cache in '%s'", self.cachedir)
+        logger.debug(1, "Cache dir: %s", self.cachedir)
         bb.utils.mkdirhier(self.cachedir)
 
         cache_ok = True
@@ -408,6 +408,8 @@
             self.load_cachefile()
         elif os.path.isfile(self.cachefile):
             logger.info("Out of date cache found, rebuilding...")
+        else:
+            logger.debug(1, "Cache file %s not found, building..." % self.cachefile)
 
     def load_cachefile(self):
         cachesize = 0
@@ -424,6 +426,7 @@
 
         for cache_class in self.caches_array:
             cachefile = getCacheFile(self.cachedir, cache_class.cachefile, self.data_hash)
+            logger.debug(1, 'Loading cache file: %s' % cachefile)
             with open(cachefile, "rb") as cachefile:
                 pickled = pickle.Unpickler(cachefile)
                 # Check cache version information
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/cooker.py b/import-layers/yocto-poky/bitbake/lib/bb/cooker.py
index c7fdd72..1fda40d 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/cooker.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/cooker.py
@@ -516,6 +516,8 @@
             fn = runlist[0][3]
         else:
             envdata = self.data
+            data.expandKeys(envdata)
+            parse.ast.runAnonFuncs(envdata)
 
         if fn:
             try:
@@ -536,7 +538,6 @@
             logger.plain(env.getvalue())
 
         # emit the metadata which isnt valid shell
-        data.expandKeys(envdata)
         for e in sorted(envdata.keys()):
             if envdata.getVarFlag(e, 'func', False) and envdata.getVarFlag(e, 'python', False):
                 logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, False))
@@ -856,12 +857,12 @@
 
         with open('task-depends.dot', 'w') as f:
             f.write("digraph depends {\n")
-            for task in depgraph["tdepends"]:
+            for task in sorted(depgraph["tdepends"]):
                 (pn, taskname) = task.rsplit(".", 1)
                 fn = depgraph["pn"][pn]["filename"]
                 version = depgraph["pn"][pn]["version"]
                 f.write('"%s.%s" [label="%s %s\\n%s\\n%s"]\n' % (pn, taskname, pn, taskname, version, fn))
-                for dep in depgraph["tdepends"][task]:
+                for dep in sorted(depgraph["tdepends"][task]):
                     f.write('"%s" -> "%s"\n' % (task, dep))
             f.write("}\n")
         logger.info("Task dependencies saved to 'task-depends.dot'")
@@ -869,23 +870,23 @@
         with open('recipe-depends.dot', 'w') as f:
             f.write("digraph depends {\n")
             pndeps = {}
-            for task in depgraph["tdepends"]:
+            for task in sorted(depgraph["tdepends"]):
                 (pn, taskname) = task.rsplit(".", 1)
                 if pn not in pndeps:
                     pndeps[pn] = set()
-                for dep in depgraph["tdepends"][task]:
+                for dep in sorted(depgraph["tdepends"][task]):
                     (deppn, deptaskname) = dep.rsplit(".", 1)
                     pndeps[pn].add(deppn)
-            for pn in pndeps:
+            for pn in sorted(pndeps):
                 fn = depgraph["pn"][pn]["filename"]
                 version = depgraph["pn"][pn]["version"]
                 f.write('"%s" [label="%s\\n%s\\n%s"]\n' % (pn, pn, version, fn))
-                for dep in pndeps[pn]:
+                for dep in sorted(pndeps[pn]):
                     if dep == pn:
                         continue
                     f.write('"%s" -> "%s"\n' % (pn, dep))
             f.write("}\n")
-        logger.info("Flatened recipe dependencies saved to 'recipe-depends.dot'")
+        logger.info("Flattened recipe dependencies saved to 'recipe-depends.dot'")
 
     def show_appends_with_no_recipes(self):
         # Determine which bbappends haven't been applied
@@ -1170,6 +1171,7 @@
                 elif regex == "":
                     parselog.debug(1, "BBFILE_PATTERN_%s is empty" % c)
                     errors = False
+                    continue
                 else:
                     try:
                         cre = re.compile(regex)
@@ -1603,8 +1605,6 @@
 
         if self.parser:
             self.parser.shutdown(clean=not force, force=force)
-        self.notifier.stop()
-        self.confignotifier.stop()
 
     def finishcommand(self):
         self.state = state.initial
@@ -1807,21 +1807,25 @@
             realfn, cls, mc = bb.cache.virtualfn2realfn(p)
             priorities[p] = self.calc_bbfile_priority(realfn, matched)
 
-        # Don't show the warning if the BBFILE_PATTERN did match .bbappend files
         unmatched = set()
         for _, _, regex, pri in self.bbfile_config_priorities:
             if not regex in matched:
                 unmatched.add(regex)
 
-        def findmatch(regex):
+        # Don't show the warning if the BBFILE_PATTERN did match .bbappend files
+        def find_bbappend_match(regex):
             for b in self.bbappends:
                 (bbfile, append) = b
                 if regex.match(append):
+                    # If the bbappend is matched by already "matched set", return False
+                    for matched_regex in matched:
+                        if matched_regex.match(append):
+                            return False
                     return True
             return False
 
         for unmatch in unmatched.copy():
-            if findmatch(unmatch):
+            if find_bbappend_match(unmatch):
                 unmatched.remove(unmatch)
 
         for collection, pattern, regex, _ in self.bbfile_config_priorities:
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/cookerdata.py b/import-layers/yocto-poky/bitbake/lib/bb/cookerdata.py
index fab47c7..5df66e6 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/cookerdata.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/cookerdata.py
@@ -143,7 +143,8 @@
         self.writeeventlog = False
         self.server_only = False
         self.limited_deps = False
-        self.runall = None
+        self.runall = []
+        self.runonly = []
 
         self.env = {}
 
@@ -395,6 +396,8 @@
                 if compat and not (compat & layerseries):
                     bb.fatal("Layer %s is not compatible with the core layer which only supports these series: %s (layer is compatible with %s)"
                               % (c, " ".join(layerseries), " ".join(compat)))
+                elif not compat and not data.getVar("BB_WORKERCONTEXT"):
+                    bb.warn("Layer %s should set LAYERSERIES_COMPAT_%s in its conf/layer.conf file to list the core layer names it is compatible with." % (c, c))
 
         if not data.getVar("BBPATH"):
             msg = "The BBPATH variable is not set"
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/event.py b/import-layers/yocto-poky/bitbake/lib/bb/event.py
index 52072b5..5d00496 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/event.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/event.py
@@ -449,12 +449,6 @@
     def setName(self, name):
         self._name = name
 
-    def getCfg(self):
-        return self.data
-
-    def setCfg(self, cfg):
-        self.data = cfg
-
     def getFailures(self):
         """
         Return the number of failed packages
@@ -463,9 +457,6 @@
 
     pkgs = property(getPkgs, setPkgs, None, "pkgs property")
     name = property(getName, setName, None, "name property")
-    cfg = property(getCfg, setCfg, None, "cfg property")
-
-
 
 class BuildInit(BuildBase):
     """buildFile or buildTargets was invoked"""
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/__init__.py b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/__init__.py
index f70f1b5..72d6092 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/__init__.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/__init__.py
@@ -643,26 +643,25 @@
     if not ud.needdonestamp or (origud and not origud.needdonestamp):
         return True
 
-    if not os.path.exists(ud.donestamp):
+    if not os.path.exists(ud.localpath):
+        # local path does not exist
+        if os.path.exists(ud.donestamp):
+            # done stamp exists, but the downloaded file does not; the done stamp
+            # must be incorrect, re-trigger the download
+            bb.utils.remove(ud.donestamp)
         return False
 
     if (not ud.method.supports_checksum(ud) or
         (origud and not origud.method.supports_checksum(origud))):
-        # done stamp exists, checksums not supported; assume the local file is
-        # current
-        return True
-
-    if not os.path.exists(ud.localpath):
-        # done stamp exists, but the downloaded file does not; the done stamp
-        # must be incorrect, re-trigger the download
-        bb.utils.remove(ud.donestamp)
-        return False
+        # if done stamp exists and checksums not supported; assume the local
+        # file is current
+        return os.path.exists(ud.donestamp)
 
     precomputed_checksums = {}
     # Only re-use the precomputed checksums if the donestamp is newer than the
     # file. Do not rely on the mtime of directories, though. If ud.localpath is
     # a directory, there will probably not be any checksums anyway.
-    if (os.path.isdir(ud.localpath) or
+    if os.path.exists(ud.donestamp) and (os.path.isdir(ud.localpath) or
             os.path.getmtime(ud.localpath) < os.path.getmtime(ud.donestamp)):
         try:
             with open(ud.donestamp, "rb") as cachefile:
@@ -853,6 +852,9 @@
         if val:
             cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
 
+    # Disable pseudo as it may affect ssh, potentially causing it to hang.
+    cmd = 'export PSEUDO_DISABLED=1; ' + cmd
+
     logger.debug(1, "Running %s", cmd)
 
     success = False
@@ -1424,7 +1426,7 @@
                 cmd = 'gzip -dc %s > %s' % (file, efile)
             elif file.endswith('.bz2'):
                 cmd = 'bzip2 -dc %s > %s' % (file, efile)
-            elif file.endswith('.tar.xz'):
+            elif file.endswith('.txz') or file.endswith('.tar.xz'):
                 cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
             elif file.endswith('.xz'):
                 cmd = 'xz -dc %s > %s' % (file, efile)
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/git.py b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/git.py
index 5ef8cd6..3de83be 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/git.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/git.py
@@ -125,6 +125,9 @@
 
 
 class Git(FetchMethod):
+    bitbake_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.join(os.path.abspath(__file__))), '..', '..', '..'))
+    make_shallow_path = os.path.join(bitbake_dir, 'bin', 'git-make-shallow')
+
     """Class to fetch a module or modules from git repositories"""
     def init(self, d):
         pass
@@ -363,6 +366,7 @@
             progresshandler = GitProgressHandler(d)
             runfetchcmd(fetch_cmd, d, log=progresshandler, workdir=ud.clonedir)
             runfetchcmd("%s prune-packed" % ud.basecmd, d, workdir=ud.clonedir)
+            runfetchcmd("%s pack-refs --all" % ud.basecmd, d, workdir=ud.clonedir)
             runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d, workdir=ud.clonedir)
             try:
                 os.unlink(ud.fullmirror)
@@ -445,7 +449,7 @@
                 shallow_branches.append(r)
 
         # Make the repository shallow
-        shallow_cmd = ['git', 'make-shallow', '-s']
+        shallow_cmd = [self.make_shallow_path, '-s']
         for b in shallow_branches:
             shallow_cmd.append('-r')
             shallow_cmd.append(b)
@@ -591,7 +595,8 @@
         tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX') or "(?P<pver>([0-9][\.|_]?)+)")
         try:
             output = self._lsremote(ud, d, "refs/tags/*")
-        except bb.fetch2.FetchError or bb.fetch2.NetworkAccess:
+        except (bb.fetch2.FetchError, bb.fetch2.NetworkAccess) as e:
+            bb.note("Could not list remote: %s" % str(e))
             return pupver
 
         verstring = ""
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/npm.py b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/npm.py
index b5f148c..730c346 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/npm.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/npm.py
@@ -195,9 +195,11 @@
         outputurl = pdata['dist']['tarball']
         data[pkg] = {}
         data[pkg]['tgz'] = os.path.basename(outputurl)
-        if not outputurl in fetchedlist:
-            self._runwget(ud, d, "%s --directory-prefix=%s %s" % (self.basecmd, ud.prefixdir, outputurl), False)
-            fetchedlist.append(outputurl)
+        if outputurl in fetchedlist:
+            return
+
+        self._runwget(ud, d, "%s --directory-prefix=%s %s" % (self.basecmd, ud.prefixdir, outputurl), False)
+        fetchedlist.append(outputurl)
 
         dependencies = pdata.get('dependencies', {})
         optionalDependencies = pdata.get('optionalDependencies', {})
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/wget.py b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/wget.py
index 7c49c2b..8f505b6 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/fetch2/wget.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/fetch2/wget.py
@@ -250,6 +250,7 @@
                         return ""
                     def close(self):
                         pass
+                    closed = False
 
                 resp = addinfourl(fp_dummy(), r.msg, req.get_full_url())
                 resp.code = r.status
@@ -332,7 +333,8 @@
             except (TypeError, ImportError, IOError, netrc.NetrcParseError):
                  pass
 
-            opener.open(r)
+            with opener.open(r) as response:
+                pass
         except urllib.error.URLError as e:
             if try_again:
                 logger.debug(2, "checkstatus: trying again")
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/main.py b/import-layers/yocto-poky/bitbake/lib/bb/main.py
index 7711b29..f4474e4 100755
--- a/import-layers/yocto-poky/bitbake/lib/bb/main.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/main.py
@@ -292,8 +292,12 @@
                           help="Writes the event log of the build to a bitbake event json file. "
                                "Use '' (empty string) to assign the name automatically.")
 
-        parser.add_option("", "--runall", action="store", dest="runall",
-                          help="Run the specified task for all build targets and their dependencies.")
+        parser.add_option("", "--runall", action="append", dest="runall",
+                          help="Run the specified task for any recipe in the taskgraph of the specified target (even if it wouldn't otherwise have run).")
+
+        parser.add_option("", "--runonly", action="append", dest="runonly",
+                          help="Run only the specified task within the taskgraph of the specified targets (and any task dependencies those tasks may have).")
+
 
         options, targets = parser.parse_args(argv)
 
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/parse/__init__.py b/import-layers/yocto-poky/bitbake/lib/bb/parse/__init__.py
index 2fc4002..5397d57 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/parse/__init__.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/parse/__init__.py
@@ -134,8 +134,9 @@
         if not newfn:
             raise IOError(errno.ENOENT, "file %s not found in %s" % (fn, bbpath))
         fn = newfn
+    else:
+        mark_dependency(d, fn)
 
-    mark_dependency(d, fn)
     if not os.path.isfile(fn):
         raise IOError(errno.ENOENT, "file %s not found" % fn)
 
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/parse/ast.py b/import-layers/yocto-poky/bitbake/lib/bb/parse/ast.py
index dba4540..6690dc5 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/parse/ast.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/parse/ast.py
@@ -335,6 +335,12 @@
     classes = m.group(1)
     statements.append(InheritNode(filename, lineno, classes))
 
+def runAnonFuncs(d):
+    code = []
+    for funcname in d.getVar("__BBANONFUNCS", False) or []:
+        code.append("%s(d)" % funcname)
+    bb.utils.better_exec("\n".join(code), {"d": d})
+
 def finalize(fn, d, variant = None):
     saved_handlers = bb.event.get_handlers().copy()
 
@@ -349,10 +355,7 @@
     bb.event.fire(bb.event.RecipePreFinalise(fn), d)
 
     bb.data.expandKeys(d)
-    code = []
-    for funcname in d.getVar("__BBANONFUNCS", False) or []:
-        code.append("%s(d)" % funcname)
-    bb.utils.better_exec("\n".join(code), {"d": d})
+    runAnonFuncs(d)
 
     tasklist = d.getVar('__BBTASKS', False) or []
     bb.event.fire(bb.event.RecipeTaskPreProcess(fn, list(tasklist)), d)
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py b/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
index f89ad24..e5039e3 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -131,9 +131,6 @@
 
     abs_fn = resolve_file(fn, d)
 
-    if include:
-        bb.parse.mark_dependency(d, abs_fn)
-
     # actual loading
     statements = get_statements(fn, abs_fn, base_name)
 
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index 97aa130..9d3ebe1 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -134,9 +134,6 @@
     abs_fn = resolve_file(fn, data)
     f = open(abs_fn, 'r')
 
-    if include:
-        bb.parse.mark_dependency(data, abs_fn)
-
     statements = ast.StatementGroup()
     lineno = 0
     while True:
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/runqueue.py b/import-layers/yocto-poky/bitbake/lib/bb/runqueue.py
index ae12c25..f2e52cf 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/runqueue.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/runqueue.py
@@ -181,7 +181,7 @@
         if self.rq.stats.active < self.rq.number_tasks:
             return self.next_buildable_task()
 
-    def newbuilable(self, task):
+    def newbuildable(self, task):
         self.buildable.append(task)
 
     def describe_task(self, taskid):
@@ -581,12 +581,6 @@
                     if t in taskData[mc].taskentries:
                         depends.add(t)
 
-        def add_resolved_dependencies(mc, fn, tasknames, depends):
-            for taskname in tasknames:
-                tid = build_tid(mc, fn, taskname)
-                if tid in self.runtaskentries:
-                    depends.add(tid)
-
         for mc in taskData:
             for tid in taskData[mc].taskentries:
 
@@ -673,57 +667,106 @@
                             recursiveitasks[tid].append(newdep)
 
                 self.runtaskentries[tid].depends = depends
+                # Remove all self references
+                self.runtaskentries[tid].depends.discard(tid)
 
         #self.dump_data()
 
+        self.init_progress_reporter.next_stage()
+
         # Resolve recursive 'recrdeptask' dependencies (Part B)
         #
         # e.g. do_sometask[recrdeptask] = "do_someothertask"
         # (makes sure sometask runs after someothertask of all DEPENDS, RDEPENDS and intertask dependencies, recursively)
         # We need to do this separately since we need all of runtaskentries[*].depends to be complete before this is processed
-        self.init_progress_reporter.next_stage(len(recursivetasks))
-        extradeps = {}
-        for taskcounter, tid in enumerate(recursivetasks):
-            extradeps[tid] = set(self.runtaskentries[tid].depends)
 
-            tasknames = recursivetasks[tid]
-            seendeps = set()
+        # Generating/interating recursive lists of dependencies is painful and potentially slow
+        # Precompute recursive task dependencies here by:
+        #     a) create a temp list of reverse dependencies (revdeps)
+        #     b) walk up the ends of the chains (when a given task no longer has dependencies i.e. len(deps) == 0)
+        #     c) combine the total list of dependencies in cumulativedeps
+        #     d) optimise by pre-truncating 'task' off the items in cumulativedeps (keeps items in sets lower)
 
-            def generate_recdeps(t):
-                newdeps = set()
-                (mc, fn, taskname, _) = split_tid_mcfn(t)
-                add_resolved_dependencies(mc, fn, tasknames, newdeps)
-                extradeps[tid].update(newdeps)
-                seendeps.add(t)
-                newdeps.add(t)
-                for i in newdeps:
-                    if i not in self.runtaskentries:
-                        # Not all recipes might have the recrdeptask task as a task
-                        continue
-                    task = self.runtaskentries[i].task
-                    for n in self.runtaskentries[i].depends:
-                        if n not in seendeps:
-                             generate_recdeps(n)
-            generate_recdeps(tid)
 
-            if tid in recursiveitasks:
-                for dep in recursiveitasks[tid]:
-                    generate_recdeps(dep)
-            self.init_progress_reporter.update(taskcounter)
-
-        # Remove circular references so that do_a[recrdeptask] = "do_a do_b" can work
-        for tid in recursivetasks:
-            extradeps[tid].difference_update(recursivetasksselfref)
-
+        revdeps = {}
+        deps = {}
+        cumulativedeps = {}
         for tid in self.runtaskentries:
-            task = self.runtaskentries[tid].task
-            # Add in extra dependencies
-            if tid in extradeps:
-                 self.runtaskentries[tid].depends = extradeps[tid]
-            # Remove all self references
-            if tid in self.runtaskentries[tid].depends:
-                logger.debug(2, "Task %s contains self reference!", tid)
-                self.runtaskentries[tid].depends.remove(tid)
+            deps[tid] = set(self.runtaskentries[tid].depends)
+            revdeps[tid] = set()
+            cumulativedeps[tid] = set()
+        # Generate a temp list of reverse dependencies
+        for tid in self.runtaskentries:
+            for dep in self.runtaskentries[tid].depends:
+                revdeps[dep].add(tid)
+        # Find the dependency chain endpoints
+        endpoints = set()
+        for tid in self.runtaskentries:
+            if len(deps[tid]) == 0:
+                endpoints.add(tid)
+        # Iterate the chains collating dependencies
+        while endpoints:
+            next = set()
+            for tid in endpoints:
+                for dep in revdeps[tid]:
+                    cumulativedeps[dep].add(fn_from_tid(tid))
+                    cumulativedeps[dep].update(cumulativedeps[tid])
+                    if tid in deps[dep]:
+                        deps[dep].remove(tid)
+                    if len(deps[dep]) == 0:
+                        next.add(dep)
+            endpoints = next
+        #for tid in deps:
+        #    if len(deps[tid]) != 0:
+        #        bb.warn("Sanity test failure, dependencies left for %s (%s)" % (tid, deps[tid]))
+
+        # Loop here since recrdeptasks can depend upon other recrdeptasks and we have to
+        # resolve these recursively until we aren't adding any further extra dependencies
+        extradeps = True
+        while extradeps:
+            extradeps = 0
+            for tid in recursivetasks:
+                tasknames = recursivetasks[tid]
+
+                totaldeps = set(self.runtaskentries[tid].depends)
+                if tid in recursiveitasks:
+                    totaldeps.update(recursiveitasks[tid])
+                    for dep in recursiveitasks[tid]:
+                        if dep not in self.runtaskentries:
+                            continue
+                        totaldeps.update(self.runtaskentries[dep].depends)
+
+                deps = set()
+                for dep in totaldeps:
+                    if dep in cumulativedeps:
+                        deps.update(cumulativedeps[dep])
+
+                for t in deps:
+                    for taskname in tasknames:
+                        newtid = t + ":" + taskname
+                        if newtid == tid:
+                            continue
+                        if newtid in self.runtaskentries and newtid not in self.runtaskentries[tid].depends:
+                            extradeps += 1
+                            self.runtaskentries[tid].depends.add(newtid)
+
+                # Handle recursive tasks which depend upon other recursive tasks
+                deps = set()
+                for dep in self.runtaskentries[tid].depends.intersection(recursivetasks):
+                    deps.update(self.runtaskentries[dep].depends.difference(self.runtaskentries[tid].depends))
+                for newtid in deps:
+                    for taskname in tasknames:
+                        if not newtid.endswith(":" + taskname):
+                            continue
+                        if newtid in self.runtaskentries:
+                            extradeps += 1
+                            self.runtaskentries[tid].depends.add(newtid)
+
+            bb.debug(1, "Added %s recursive dependencies in this loop" % extradeps)
+
+        # Remove recrdeptask circular references so that do_a[recrdeptask] = "do_a do_b" can work
+        for tid in recursivetasksselfref:
+            self.runtaskentries[tid].depends.difference_update(recursivetasksselfref)
 
         self.init_progress_reporter.next_stage()
 
@@ -798,30 +841,57 @@
         #
         # Once all active tasks are marked, prune the ones we don't need.
 
-        delcount = 0
+        delcount = {}
         for tid in list(self.runtaskentries.keys()):
             if tid not in runq_build:
+                delcount[tid] = self.runtaskentries[tid]
                 del self.runtaskentries[tid]
-                delcount += 1
 
-        self.init_progress_reporter.next_stage()
-
-        if self.cooker.configuration.runall is not None:
-            runall = "do_%s" % self.cooker.configuration.runall
-            runall_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == runall }
-
+        # Handle --runall
+        if self.cooker.configuration.runall:
             # re-run the mark_active and then drop unused tasks from new list
             runq_build = {}
-            for tid in list(runall_tids):
-                mark_active(tid,1)
+
+            for task in self.cooker.configuration.runall:
+                runall_tids = set()
+                for tid in list(self.runtaskentries):
+                    wanttid = fn_from_tid(tid) + ":do_%s" % task
+                    if wanttid in delcount:
+                        self.runtaskentries[wanttid] = delcount[wanttid]
+                    if wanttid in self.runtaskentries:
+                        runall_tids.add(wanttid)
+
+                for tid in list(runall_tids):
+                    mark_active(tid,1)
 
             for tid in list(self.runtaskentries.keys()):
                 if tid not in runq_build:
+                    delcount[tid] = self.runtaskentries[tid]
                     del self.runtaskentries[tid]
-                    delcount += 1
 
             if len(self.runtaskentries) == 0:
-                bb.msg.fatal("RunQueue", "No remaining tasks to run for build target %s with runall %s" % (target, runall))
+                bb.msg.fatal("RunQueue", "Could not find any tasks with the tasknames %s to run within the recipes of the taskgraphs of the targets %s" % (str(self.cooker.configuration.runall), str(self.targets)))
+
+        self.init_progress_reporter.next_stage()
+
+        # Handle runonly
+        if self.cooker.configuration.runonly:
+            # re-run the mark_active and then drop unused tasks from new list
+            runq_build = {}
+
+            for task in self.cooker.configuration.runonly:
+                runonly_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == "do_%s" % task }
+
+                for tid in list(runonly_tids):
+                    mark_active(tid,1)
+
+            for tid in list(self.runtaskentries.keys()):
+                if tid not in runq_build:
+                    delcount[tid] = self.runtaskentries[tid]
+                    del self.runtaskentries[tid]
+
+            if len(self.runtaskentries) == 0:
+                bb.msg.fatal("RunQueue", "Could not find any tasks with the tasknames %s to run within the taskgraphs of the targets %s" % (str(self.cooker.configuration.runonly), str(self.targets)))
 
         #
         # Step D - Sanity checks and computation
@@ -834,7 +904,7 @@
             else:
                 bb.msg.fatal("RunQueue", "No active tasks and not in --continue mode?! Please report this bug.")
 
-        logger.verbose("Pruned %s inactive tasks, %s left", delcount, len(self.runtaskentries))
+        logger.verbose("Pruned %s inactive tasks, %s left", len(delcount), len(self.runtaskentries))
 
         logger.verbose("Assign Weightings")
 
@@ -1781,7 +1851,7 @@
 
     def setbuildable(self, task):
         self.runq_buildable.add(task)
-        self.sched.newbuilable(task)
+        self.sched.newbuildable(task)
 
     def task_completeoutright(self, task):
         """
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/server/process.py b/import-layers/yocto-poky/bitbake/lib/bb/server/process.py
index 3d31355..828159e 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/server/process.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/server/process.py
@@ -223,6 +223,8 @@
 
         try: 
             self.cooker.shutdown(True)
+            self.cooker.notifier.stop()
+            self.cooker.confignotifier.stop()
         except:
             pass
 
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/shell.py b/import-layers/yocto-poky/bitbake/lib/bb/shell.py
deleted file mode 100644
index 1dd8d54..0000000
--- a/import-layers/yocto-poky/bitbake/lib/bb/shell.py
+++ /dev/null
@@ -1,820 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-##########################################################################
-#
-# Copyright (C) 2005-2006 Michael 'Mickey' Lauer <mickey@Vanille.de>
-# Copyright (C) 2005-2006 Vanille Media
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-##########################################################################
-#
-# Thanks to:
-# * Holger Freyther <zecke@handhelds.org>
-# * Justin Patrin <papercrane@reversefold.com>
-#
-##########################################################################
-
-"""
-BitBake Shell
-
-IDEAS:
-    * list defined tasks per package
-    * list classes
-    * toggle force
-    * command to reparse just one (or more) bbfile(s)
-    * automatic check if reparsing is necessary (inotify?)
-    * frontend for bb file manipulation
-    * more shell-like features:
-        - output control, i.e. pipe output into grep, sort, etc.
-        - job control, i.e. bring running commands into background and foreground
-    * start parsing in background right after startup
-    * ncurses interface
-
-PROBLEMS:
-    * force doesn't always work
-    * readline completion for commands with more than one parameters
-
-"""
-
-##########################################################################
-# Import and setup global variables
-##########################################################################
-
-from __future__ import print_function
-from functools import reduce
-try:
-    set
-except NameError:
-    from sets import Set as set
-import sys, os, readline, socket, httplib, urllib, commands, popen2, shlex, Queue, fnmatch
-from bb import data, parse, build, cache, taskdata, runqueue, providers as Providers
-
-__version__ = "0.5.3.1"
-__credits__ = """BitBake Shell Version %s (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
-Type 'help' for more information, press CTRL-D to exit.""" % __version__
-
-cmds = {}
-leave_mainloop = False
-last_exception = None
-cooker = None
-parsed = False
-debug = os.environ.get( "BBSHELL_DEBUG", "" )
-
-##########################################################################
-# Class BitBakeShellCommands
-##########################################################################
-
-class BitBakeShellCommands:
-    """This class contains the valid commands for the shell"""
-
-    def __init__( self, shell ):
-        """Register all the commands"""
-        self._shell = shell
-        for attr in BitBakeShellCommands.__dict__:
-            if not attr.startswith( "_" ):
-                if attr.endswith( "_" ):
-                    command = attr[:-1].lower()
-                else:
-                    command = attr[:].lower()
-                method = getattr( BitBakeShellCommands, attr )
-                debugOut( "registering command '%s'" % command )
-                # scan number of arguments
-                usage = getattr( method, "usage", "" )
-                if usage != "<...>":
-                    numArgs = len( usage.split() )
-                else:
-                    numArgs = -1
-                shell.registerCommand( command, method, numArgs, "%s %s" % ( command, usage ), method.__doc__ )
-
-    def _checkParsed( self ):
-        if not parsed:
-            print("SHELL: This command needs to parse bbfiles...")
-            self.parse( None )
-
-    def _findProvider( self, item ):
-        self._checkParsed()
-        # Need to use taskData for this information
-        preferred = data.getVar( "PREFERRED_PROVIDER_%s" % item, cooker.configuration.data, 1 )
-        if not preferred: preferred = item
-        try:
-            lv, lf, pv, pf = Providers.findBestProvider(preferred, cooker.configuration.data, cooker.status)
-        except KeyError:
-            if item in cooker.status.providers:
-                pf = cooker.status.providers[item][0]
-            else:
-                pf = None
-        return pf
-
-    def alias( self, params ):
-        """Register a new name for a command"""
-        new, old = params
-        if not old in cmds:
-            print("ERROR: Command '%s' not known" % old)
-        else:
-            cmds[new] = cmds[old]
-            print("OK")
-    alias.usage = "<alias> <command>"
-
-    def buffer( self, params ):
-        """Dump specified output buffer"""
-        index = params[0]
-        print(self._shell.myout.buffer( int( index ) ))
-    buffer.usage = "<index>"
-
-    def buffers( self, params ):
-        """Show the available output buffers"""
-        commands = self._shell.myout.bufferedCommands()
-        if not commands:
-            print("SHELL: No buffered commands available yet. Start doing something.")
-        else:
-            print("="*35, "Available Output Buffers", "="*27)
-            for index, cmd in enumerate( commands ):
-                print("| %s %s" % ( str( index ).ljust( 3 ), cmd ))
-            print("="*88)
-
-    def build( self, params, cmd = "build" ):
-        """Build a providee"""
-        global last_exception
-        globexpr = params[0]
-        self._checkParsed()
-        names = globfilter( cooker.status.pkg_pn, globexpr )
-        if len( names ) == 0: names = [ globexpr ]
-        print("SHELL: Building %s" % ' '.join( names ))
-
-        td = taskdata.TaskData(cooker.configuration.abort)
-        localdata = data.createCopy(cooker.configuration.data)
-        data.update_data(localdata)
-        data.expandKeys(localdata)
-
-        try:
-            tasks = []
-            for name in names:
-                td.add_provider(localdata, cooker.status, name)
-                providers = td.get_provider(name)
-
-                if len(providers) == 0:
-                    raise Providers.NoProvider
-
-                tasks.append([name, "do_%s" % cmd])
-
-            td.add_unresolved(localdata, cooker.status)
-
-            rq = runqueue.RunQueue(cooker, localdata, cooker.status, td, tasks)
-            rq.prepare_runqueue()
-            rq.execute_runqueue()
-
-        except Providers.NoProvider:
-            print("ERROR: No Provider")
-            last_exception = Providers.NoProvider
-
-        except runqueue.TaskFailure as fnids:
-            last_exception = runqueue.TaskFailure
-
-        except build.FuncFailed as e:
-            print("ERROR: Couldn't build '%s'" % names)
-            last_exception = e
-
-
-    build.usage = "<providee>"
-
-    def clean( self, params ):
-        """Clean a providee"""
-        self.build( params, "clean" )
-    clean.usage = "<providee>"
-
-    def compile( self, params ):
-        """Execute 'compile' on a providee"""
-        self.build( params, "compile" )
-    compile.usage = "<providee>"
-
-    def configure( self, params ):
-        """Execute 'configure' on a providee"""
-        self.build( params, "configure" )
-    configure.usage = "<providee>"
-
-    def install( self, params ):
-        """Execute 'install' on a providee"""
-        self.build( params, "install" )
-    install.usage = "<providee>"
-
-    def edit( self, params ):
-        """Call $EDITOR on a providee"""
-        name = params[0]
-        bbfile = self._findProvider( name )
-        if bbfile is not None:
-            os.system( "%s %s" % ( os.environ.get( "EDITOR", "vi" ), bbfile ) )
-        else:
-            print("ERROR: Nothing provides '%s'" % name)
-    edit.usage = "<providee>"
-
-    def environment( self, params ):
-        """Dump out the outer BitBake environment"""
-        cooker.showEnvironment()
-
-    def exit_( self, params ):
-        """Leave the BitBake Shell"""
-        debugOut( "setting leave_mainloop to true" )
-        global leave_mainloop
-        leave_mainloop = True
-
-    def fetch( self, params ):
-        """Fetch a providee"""
-        self.build( params, "fetch" )
-    fetch.usage = "<providee>"
-
-    def fileBuild( self, params, cmd = "build" ):
-        """Parse and build a .bb file"""
-        global last_exception
-        name = params[0]
-        bf = completeFilePath( name )
-        print("SHELL: Calling '%s' on '%s'" % ( cmd, bf ))
-
-        try:
-            cooker.buildFile(bf, cmd)
-        except parse.ParseError:
-            print("ERROR: Unable to open or parse '%s'" % bf)
-        except build.FuncFailed as e:
-            print("ERROR: Couldn't build '%s'" % name)
-            last_exception = e
-
-    fileBuild.usage = "<bbfile>"
-
-    def fileClean( self, params ):
-        """Clean a .bb file"""
-        self.fileBuild( params, "clean" )
-    fileClean.usage = "<bbfile>"
-
-    def fileEdit( self, params ):
-        """Call $EDITOR on a .bb file"""
-        name = params[0]
-        os.system( "%s %s" % ( os.environ.get( "EDITOR", "vi" ), completeFilePath( name ) ) )
-    fileEdit.usage = "<bbfile>"
-
-    def fileRebuild( self, params ):
-        """Rebuild (clean & build) a .bb file"""
-        self.fileBuild( params, "rebuild" )
-    fileRebuild.usage = "<bbfile>"
-
-    def fileReparse( self, params ):
-        """(re)Parse a bb file"""
-        bbfile = params[0]
-        print("SHELL: Parsing '%s'" % bbfile)
-        parse.update_mtime( bbfile )
-        cooker.parser.reparse(bbfile)
-        if False: #fromCache:
-            print("SHELL: File has not been updated, not reparsing")
-        else:
-            print("SHELL: Parsed")
-    fileReparse.usage = "<bbfile>"
-
-    def abort( self, params ):
-        """Toggle abort task execution flag (see bitbake -k)"""
-        cooker.configuration.abort = not cooker.configuration.abort
-        print("SHELL: Abort Flag is now '%s'" % repr( cooker.configuration.abort ))
-
-    def force( self, params ):
-        """Toggle force task execution flag (see bitbake -f)"""
-        cooker.configuration.force = not cooker.configuration.force
-        print("SHELL: Force Flag is now '%s'" % repr( cooker.configuration.force ))
-
-    def help( self, params ):
-        """Show a comprehensive list of commands and their purpose"""
-        print("="*30, "Available Commands", "="*30)
-        for cmd in sorted(cmds):
-            function, numparams, usage, helptext = cmds[cmd]
-            print("| %s | %s" % (usage.ljust(30), helptext))
-        print("="*78)
-
-    def lastError( self, params ):
-        """Show the reason or log that was produced by the last BitBake event exception"""
-        if last_exception is None:
-            print("SHELL: No Errors yet (Phew)...")
-        else:
-            reason, event = last_exception.args
-            print("SHELL: Reason for the last error: '%s'" % reason)
-            if ':' in reason:
-                msg, filename = reason.split( ':' )
-                filename = filename.strip()
-                print("SHELL: Dumping log file for last error:")
-                try:
-                    print(open( filename ).read())
-                except IOError:
-                    print("ERROR: Couldn't open '%s'" % filename)
-
-    def match( self, params ):
-        """Dump all files or providers matching a glob expression"""
-        what, globexpr = params
-        if what == "files":
-            self._checkParsed()
-            for key in globfilter( cooker.status.pkg_fn, globexpr ): print(key)
-        elif what == "providers":
-            self._checkParsed()
-            for key in globfilter( cooker.status.pkg_pn, globexpr ): print(key)
-        else:
-            print("Usage: match %s" % self.print_.usage)
-    match.usage = "<files|providers> <glob>"
-
-    def new( self, params ):
-        """Create a new .bb file and open the editor"""
-        dirname, filename = params
-        packages = '/'.join( data.getVar( "BBFILES", cooker.configuration.data, 1 ).split('/')[:-2] )
-        fulldirname = "%s/%s" % ( packages, dirname )
-
-        if not os.path.exists( fulldirname ):
-            print("SHELL: Creating '%s'" % fulldirname)
-            os.mkdir( fulldirname )
-        if os.path.exists( fulldirname ) and os.path.isdir( fulldirname ):
-            if os.path.exists( "%s/%s" % ( fulldirname, filename ) ):
-                print("SHELL: ERROR: %s/%s already exists" % ( fulldirname, filename ))
-                return False
-            print("SHELL: Creating '%s/%s'" % ( fulldirname, filename ))
-            newpackage = open( "%s/%s" % ( fulldirname, filename ), "w" )
-            print("""DESCRIPTION = ""
-SECTION = ""
-AUTHOR = ""
-HOMEPAGE = ""
-MAINTAINER = ""
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = ""
-
-#inherit base
-
-#do_configure() {
-#
-#}
-
-#do_compile() {
-#
-#}
-
-#do_stage() {
-#
-#}
-
-#do_install() {
-#
-#}
-""", file=newpackage)
-            newpackage.close()
-            os.system( "%s %s/%s" % ( os.environ.get( "EDITOR" ), fulldirname, filename ) )
-    new.usage = "<directory> <filename>"
-
-    def package( self, params ):
-        """Execute 'package' on a providee"""
-        self.build( params, "package" )
-    package.usage = "<providee>"
-
-    def pasteBin( self, params ):
-        """Send a command + output buffer to the pastebin at http://rafb.net/paste"""
-        index = params[0]
-        contents = self._shell.myout.buffer( int( index ) )
-        sendToPastebin( "output of " + params[0], contents )
-    pasteBin.usage = "<index>"
-
-    def pasteLog( self, params ):
-        """Send the last event exception error log (if there is one) to http://rafb.net/paste"""
-        if last_exception is None:
-            print("SHELL: No Errors yet (Phew)...")
-        else:
-            reason, event = last_exception.args
-            print("SHELL: Reason for the last error: '%s'" % reason)
-            if ':' in reason:
-                msg, filename = reason.split( ':' )
-                filename = filename.strip()
-                print("SHELL: Pasting log file to pastebin...")
-
-                file = open( filename ).read()
-                sendToPastebin( "contents of " + filename, file )
-
-    def patch( self, params ):
-        """Execute 'patch' command on a providee"""
-        self.build( params, "patch" )
-    patch.usage = "<providee>"
-
-    def parse( self, params ):
-        """(Re-)parse .bb files and calculate the dependency graph"""
-        cooker.status = cache.CacheData(cooker.caches_array)
-        ignore = data.getVar("ASSUME_PROVIDED", cooker.configuration.data, 1) or ""
-        cooker.status.ignored_dependencies = set( ignore.split() )
-        cooker.handleCollections( data.getVar("BBFILE_COLLECTIONS", cooker.configuration.data, 1) )
-
-        (filelist, masked) = cooker.collect_bbfiles()
-        cooker.parse_bbfiles(filelist, masked, cooker.myProgressCallback)
-        cooker.buildDepgraph()
-        global parsed
-        parsed = True
-        print()
-
-    def reparse( self, params ):
-        """(re)Parse a providee's bb file"""
-        bbfile = self._findProvider( params[0] )
-        if bbfile is not None:
-            print("SHELL: Found bbfile '%s' for '%s'" % ( bbfile, params[0] ))
-            self.fileReparse( [ bbfile ] )
-        else:
-            print("ERROR: Nothing provides '%s'" % params[0])
-    reparse.usage = "<providee>"
-
-    def getvar( self, params ):
-        """Dump the contents of an outer BitBake environment variable"""
-        var = params[0]
-        value = data.getVar( var, cooker.configuration.data, 1 )
-        print(value)
-    getvar.usage = "<variable>"
-
-    def peek( self, params ):
-        """Dump contents of variable defined in providee's metadata"""
-        name, var = params
-        bbfile = self._findProvider( name )
-        if bbfile is not None:
-            the_data = cache.Cache.loadDataFull(bbfile, cooker.configuration.data)
-            value = the_data.getVar( var, 1 )
-            print(value)
-        else:
-            print("ERROR: Nothing provides '%s'" % name)
-    peek.usage = "<providee> <variable>"
-
-    def poke( self, params ):
-        """Set contents of variable defined in providee's metadata"""
-        name, var, value = params
-        bbfile = self._findProvider( name )
-        if bbfile is not None:
-            print("ERROR: Sorry, this functionality is currently broken")
-            #d = cooker.pkgdata[bbfile]
-            #data.setVar( var, value, d )
-
-            # mark the change semi persistant
-            #cooker.pkgdata.setDirty(bbfile, d)
-            #print "OK"
-        else:
-            print("ERROR: Nothing provides '%s'" % name)
-    poke.usage = "<providee> <variable> <value>"
-
-    def print_( self, params ):
-        """Dump all files or providers"""
-        what = params[0]
-        if what == "files":
-            self._checkParsed()
-            for key in cooker.status.pkg_fn: print(key)
-        elif what == "providers":
-            self._checkParsed()
-            for key in cooker.status.providers: print(key)
-        else:
-            print("Usage: print %s" % self.print_.usage)
-    print_.usage = "<files|providers>"
-
-    def python( self, params ):
-        """Enter the expert mode - an interactive BitBake Python Interpreter"""
-        sys.ps1 = "EXPERT BB>>> "
-        sys.ps2 = "EXPERT BB... "
-        import code
-        interpreter = code.InteractiveConsole( dict( globals() ) )
-        interpreter.interact( "SHELL: Expert Mode - BitBake Python %s\nType 'help' for more information, press CTRL-D to switch back to BBSHELL." % sys.version )
-
-    def showdata( self, params ):
-        """Execute 'showdata' on a providee"""
-        cooker.showEnvironment(None, params)
-    showdata.usage = "<providee>"
-
-    def setVar( self, params ):
-        """Set an outer BitBake environment variable"""
-        var, value = params
-        data.setVar( var, value, cooker.configuration.data )
-        print("OK")
-    setVar.usage = "<variable> <value>"
-
-    def rebuild( self, params ):
-        """Clean and rebuild a .bb file or a providee"""
-        self.build( params, "clean" )
-        self.build( params, "build" )
-    rebuild.usage = "<providee>"
-
-    def shell( self, params ):
-        """Execute a shell command and dump the output"""
-        if params != "":
-            print(commands.getoutput( " ".join( params ) ))
-    shell.usage = "<...>"
-
-    def stage( self, params ):
-        """Execute 'stage' on a providee"""
-        self.build( params, "populate_staging" )
-    stage.usage = "<providee>"
-
-    def status( self, params ):
-        """<just for testing>"""
-        print("-" * 78)
-        print("building list = '%s'" % cooker.building_list)
-        print("build path = '%s'" % cooker.build_path)
-        print("consider_msgs_cache = '%s'" % cooker.consider_msgs_cache)
-        print("build stats = '%s'" % cooker.stats)
-        if last_exception is not None: print("last_exception = '%s'" % repr( last_exception.args ))
-        print("memory output contents = '%s'" % self._shell.myout._buffer)
-
-    def test( self, params ):
-        """<just for testing>"""
-        print("testCommand called with '%s'" % params)
-
-    def unpack( self, params ):
-        """Execute 'unpack' on a providee"""
-        self.build( params, "unpack" )
-    unpack.usage = "<providee>"
-
-    def which( self, params ):
-        """Computes the providers for a given providee"""
-        # Need to use taskData for this information
-        item = params[0]
-
-        self._checkParsed()
-
-        preferred = data.getVar( "PREFERRED_PROVIDER_%s" % item, cooker.configuration.data, 1 )
-        if not preferred: preferred = item
-
-        try:
-            lv, lf, pv, pf = Providers.findBestProvider(preferred, cooker.configuration.data, cooker.status)
-        except KeyError:
-            lv, lf, pv, pf = (None,)*4
-
-        try:
-            providers = cooker.status.providers[item]
-        except KeyError:
-            print("SHELL: ERROR: Nothing provides", preferred)
-        else:
-            for provider in providers:
-                if provider == pf: provider = " (***) %s" % provider
-                else:              provider = "       %s" % provider
-                print(provider)
-    which.usage = "<providee>"
-
-##########################################################################
-# Common helper functions
-##########################################################################
-
-def completeFilePath( bbfile ):
-    """Get the complete bbfile path"""
-    if not cooker.status: return bbfile
-    if not cooker.status.pkg_fn: return bbfile
-    for key in cooker.status.pkg_fn:
-        if key.endswith( bbfile ):
-            return key
-    return bbfile
-
-def sendToPastebin( desc, content ):
-    """Send content to http://oe.pastebin.com"""
-    mydata = {}
-    mydata["lang"] = "Plain Text"
-    mydata["desc"] = desc
-    mydata["cvt_tabs"] = "No"
-    mydata["nick"] = "%s@%s" % ( os.environ.get( "USER", "unknown" ), socket.gethostname() or "unknown" )
-    mydata["text"] = content
-    params = urllib.urlencode( mydata )
-    headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
-
-    host = "rafb.net"
-    conn = httplib.HTTPConnection( "%s:80" % host )
-    conn.request("POST", "/paste/paste.php", params, headers )
-
-    response = conn.getresponse()
-    conn.close()
-
-    if response.status == 302:
-        location = response.getheader( "location" ) or "unknown"
-        print("SHELL: Pasted to http://%s%s" % ( host, location ))
-    else:
-        print("ERROR: %s %s" % ( response.status, response.reason ))
-
-def completer( text, state ):
-    """Return a possible readline completion"""
-    debugOut( "completer called with text='%s', state='%d'" % ( text, state ) )
-
-    if state == 0:
-        line = readline.get_line_buffer()
-        if " " in line:
-            line = line.split()
-            # we are in second (or more) argument
-            if line[0] in cmds and hasattr( cmds[line[0]][0], "usage" ): # known command and usage
-                u = getattr( cmds[line[0]][0], "usage" ).split()[0]
-                if u == "<variable>":
-                    allmatches = cooker.configuration.data.keys()
-                elif u == "<bbfile>":
-                    if cooker.status.pkg_fn is None: allmatches = [ "(No Matches Available. Parsed yet?)" ]
-                    else: allmatches = [ x.split("/")[-1] for x in cooker.status.pkg_fn ]
-                elif u == "<providee>":
-                    if cooker.status.pkg_fn is None: allmatches = [ "(No Matches Available. Parsed yet?)" ]
-                    else: allmatches = cooker.status.providers.iterkeys()
-                else: allmatches = [ "(No tab completion available for this command)" ]
-            else: allmatches = [ "(No tab completion available for this command)" ]
-        else:
-            # we are in first argument
-            allmatches = cmds.iterkeys()
-
-        completer.matches = [ x for x in allmatches if x[:len(text)] == text ]
-        #print "completer.matches = '%s'" % completer.matches
-    if len( completer.matches ) > state:
-        return completer.matches[state]
-    else:
-        return None
-
-def debugOut( text ):
-    if debug:
-        sys.stderr.write( "( %s )\n" % text )
-
-def columnize( alist, width = 80 ):
-    """
-    A word-wrap function that preserves existing line breaks
-    and most spaces in the text. Expects that existing line
-    breaks are posix newlines (\n).
-    """
-    return reduce(lambda line, word, width=width: '%s%s%s' %
-                  (line,
-                   ' \n'[(len(line[line.rfind('\n')+1:])
-                         + len(word.split('\n', 1)[0]
-                              ) >= width)],
-                   word),
-                  alist
-                 )
-
-def globfilter( names, pattern ):
-    return fnmatch.filter( names, pattern )
-
-##########################################################################
-# Class MemoryOutput
-##########################################################################
-
-class MemoryOutput:
-    """File-like output class buffering the output of the last 10 commands"""
-    def __init__( self, delegate ):
-        self.delegate = delegate
-        self._buffer = []
-        self.text = []
-        self._command = None
-
-    def startCommand( self, command ):
-        self._command = command
-        self.text = []
-    def endCommand( self ):
-        if self._command is not None:
-            if len( self._buffer ) == 10: del self._buffer[0]
-            self._buffer.append( ( self._command, self.text ) )
-    def removeLast( self ):
-        if self._buffer:
-            del self._buffer[ len( self._buffer ) - 1 ]
-        self.text = []
-        self._command = None
-    def lastBuffer( self ):
-        if self._buffer:
-            return self._buffer[ len( self._buffer ) -1 ][1]
-    def bufferedCommands( self ):
-        return [ cmd for cmd, output in self._buffer ]
-    def buffer( self, i ):
-        if i < len( self._buffer ):
-            return "BB>> %s\n%s" % ( self._buffer[i][0], "".join( self._buffer[i][1] ) )
-        else: return "ERROR: Invalid buffer number. Buffer needs to be in (0, %d)" % ( len( self._buffer ) - 1 )
-    def write( self, text ):
-        if self._command is not None and text != "BB>> ": self.text.append( text )
-        if self.delegate is not None: self.delegate.write( text )
-    def flush( self ):
-        return self.delegate.flush()
-    def fileno( self ):
-        return self.delegate.fileno()
-    def isatty( self ):
-        return self.delegate.isatty()
-
-##########################################################################
-# Class BitBakeShell
-##########################################################################
-
-class BitBakeShell:
-
-    def __init__( self ):
-        """Register commands and set up readline"""
-        self.commandQ = Queue.Queue()
-        self.commands = BitBakeShellCommands( self )
-        self.myout = MemoryOutput( sys.stdout )
-        self.historyfilename = os.path.expanduser( "~/.bbsh_history" )
-        self.startupfilename = os.path.expanduser( "~/.bbsh_startup" )
-
-        readline.set_completer( completer )
-        readline.set_completer_delims( " " )
-        readline.parse_and_bind("tab: complete")
-
-        try:
-            readline.read_history_file( self.historyfilename )
-        except IOError:
-            pass  # It doesn't exist yet.
-
-        print(__credits__)
-
-    def cleanup( self ):
-        """Write readline history and clean up resources"""
-        debugOut( "writing command history" )
-        try:
-            readline.write_history_file( self.historyfilename )
-        except:
-            print("SHELL: Unable to save command history")
-
-    def registerCommand( self, command, function, numparams = 0, usage = "", helptext = "" ):
-        """Register a command"""
-        if usage == "": usage = command
-        if helptext == "": helptext = function.__doc__ or "<not yet documented>"
-        cmds[command] = ( function, numparams, usage, helptext )
-
-    def processCommand( self, command, params ):
-        """Process a command. Check number of params and print a usage string, if appropriate"""
-        debugOut( "processing command '%s'..." % command )
-        try:
-            function, numparams, usage, helptext = cmds[command]
-        except KeyError:
-            print("SHELL: ERROR: '%s' command is not a valid command." % command)
-            self.myout.removeLast()
-        else:
-            if (numparams != -1) and (not len( params ) == numparams):
-                print("Usage: '%s'" % usage)
-                return
-
-            result = function( self.commands, params )
-            debugOut( "result was '%s'" % result )
-
-    def processStartupFile( self ):
-        """Read and execute all commands found in $HOME/.bbsh_startup"""
-        if os.path.exists( self.startupfilename ):
-            startupfile = open( self.startupfilename, "r" )
-            for cmdline in startupfile:
-                debugOut( "processing startup line '%s'" % cmdline )
-                if not cmdline:
-                    continue
-                if "|" in cmdline:
-                    print("ERROR: '|' in startup file is not allowed. Ignoring line")
-                    continue
-                self.commandQ.put( cmdline.strip() )
-
-    def main( self ):
-        """The main command loop"""
-        while not leave_mainloop:
-            try:
-                if self.commandQ.empty():
-                    sys.stdout = self.myout.delegate
-                    cmdline = raw_input( "BB>> " )
-                    sys.stdout = self.myout
-                else:
-                    cmdline = self.commandQ.get()
-                if cmdline:
-                    allCommands = cmdline.split( ';' )
-                    for command in allCommands:
-                        pipecmd = None
-                        #
-                        # special case for expert mode
-                        if command == 'python':
-                            sys.stdout = self.myout.delegate
-                            self.processCommand( command, "" )
-                            sys.stdout = self.myout
-                        else:
-                            self.myout.startCommand( command )
-                            if '|' in command: # disable output
-                                command, pipecmd = command.split( '|' )
-                                delegate = self.myout.delegate
-                                self.myout.delegate = None
-                            tokens = shlex.split( command, True )
-                            self.processCommand( tokens[0], tokens[1:] or "" )
-                            self.myout.endCommand()
-                            if pipecmd is not None: # restore output
-                                self.myout.delegate = delegate
-
-                                pipe = popen2.Popen4( pipecmd )
-                                pipe.tochild.write( "\n".join( self.myout.lastBuffer() ) )
-                                pipe.tochild.close()
-                                sys.stdout.write( pipe.fromchild.read() )
-                        #
-            except EOFError:
-                print()
-                return
-            except KeyboardInterrupt:
-                print()
-
-##########################################################################
-# Start function - called from the BitBake command line utility
-##########################################################################
-
-def start( aCooker ):
-    global cooker
-    cooker = aCooker
-    bbshell = BitBakeShell()
-    bbshell.processStartupFile()
-    bbshell.main()
-    bbshell.cleanup()
-
-if __name__ == "__main__":
-    print("SHELL: Sorry, this program should only be called by BitBake.")
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/tests/event.py b/import-layers/yocto-poky/bitbake/lib/bb/tests/event.py
index c7eb1fe..d3a5f62 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/tests/event.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/tests/event.py
@@ -30,28 +30,45 @@
 import pickle
 from unittest.mock import Mock
 from unittest.mock import call
+from bb.msg import BBLogFormatter
 
 
-class EventQueueStub():
+class EventQueueStubBase(object):
+    """ Base class for EventQueueStub classes """
+    def __init__(self):
+        self.event_calls = []
+        return
+
+    def _store_event_data_string(self, event):
+        if isinstance(event, logging.LogRecord):
+            formatter = BBLogFormatter("%(levelname)s: %(message)s")
+            self.event_calls.append(formatter.format(event))
+        else:
+            self.event_calls.append(bb.event.getName(event))
+        return
+
+
+class EventQueueStub(EventQueueStubBase):
     """ Class used as specification for UI event handler queue stub objects """
     def __init__(self):
-        return
+        super(EventQueueStub, self).__init__()
 
     def send(self, event):
-        return
+        super(EventQueueStub, self)._store_event_data_string(event)
 
 
-class PickleEventQueueStub():
+class PickleEventQueueStub(EventQueueStubBase):
     """ Class used as specification for UI event handler queue stub objects
         with sendpickle method """
     def __init__(self):
-        return
+        super(PickleEventQueueStub, self).__init__()
 
     def sendpickle(self, pickled_event):
-        return
+        event = pickle.loads(pickled_event)
+        super(PickleEventQueueStub, self)._store_event_data_string(event)
 
 
-class UIClientStub():
+class UIClientStub(object):
     """ Class used as specification for UI event handler stub objects """
     def __init__(self):
         self.event = None
@@ -59,7 +76,7 @@
 
 class EventHandlingTest(unittest.TestCase):
     """ Event handling test class """
-    _threadlock_test_calls = []
+
 
     def setUp(self):
         self._test_process = Mock()
@@ -179,6 +196,33 @@
         self.assertEqual(self._test_process.event_handler2.call_args_list,
                          expected_event_handler2)
 
+    def test_class_handler_filters(self):
+        """ Test filters for class handlers """
+        mask = ["bb.event.OperationStarted"]
+        result = bb.event.register("event_handler1",
+                                   self._test_process.event_handler1,
+                                   mask)
+        self.assertEqual(result, bb.event.Registered)
+        result = bb.event.register("event_handler2",
+                                   self._test_process.event_handler2,
+                                   "*")
+        self.assertEqual(result, bb.event.Registered)
+        bb.event.set_eventfilter(
+            lambda name, handler, event, d :
+            name == 'event_handler2' and
+            bb.event.getName(event) == "OperationStarted")
+        event1 = bb.event.OperationStarted()
+        event2 = bb.event.OperationCompleted(total=123)
+        bb.event.fire_class_handlers(event1, None)
+        bb.event.fire_class_handlers(event2, None)
+        bb.event.fire_class_handlers(event2, None)
+        expected_event_handler1 = []
+        expected_event_handler2 = [call(event1)]
+        self.assertEqual(self._test_process.event_handler1.call_args_list,
+                         expected_event_handler1)
+        self.assertEqual(self._test_process.event_handler2.call_args_list,
+                         expected_event_handler2)
+
     def test_change_handler_event_mapping(self):
         """ Test changing the event mapping for class handlers """
         event1 = bb.event.OperationStarted()
@@ -196,8 +240,8 @@
                          expected)
 
         # unregister handler and register it only for OperationStarted
-        result = bb.event.remove("event_handler1",
-                                 self._test_process.event_handler1)
+        bb.event.remove("event_handler1",
+                        self._test_process.event_handler1)
         mask = ["bb.event.OperationStarted"]
         result = bb.event.register("event_handler1",
                                    self._test_process.event_handler1,
@@ -210,8 +254,8 @@
                          expected)
 
         # unregister handler and register it only for OperationCompleted
-        result = bb.event.remove("event_handler1",
-                                 self._test_process.event_handler1)
+        bb.event.remove("event_handler1",
+                        self._test_process.event_handler1)
         mask = ["bb.event.OperationCompleted"]
         result = bb.event.register("event_handler1",
                                    self._test_process.event_handler1,
@@ -259,6 +303,61 @@
         self.assertEqual(self._test_ui2.event.sendpickle.call_args_list,
                          expected)
 
+    def test_ui_handler_mask_filter(self):
+        """ Test filters for UI handlers """
+        mask = ["bb.event.OperationStarted"]
+        debug_domains = {}
+        self._test_ui1.event = Mock(spec_set=EventQueueStub)
+        result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
+        bb.event.set_UIHmask(result, logging.INFO, debug_domains, mask)
+        self._test_ui2.event = Mock(spec_set=PickleEventQueueStub)
+        result = bb.event.register_UIHhandler(self._test_ui2, mainui=True)
+        bb.event.set_UIHmask(result, logging.INFO, debug_domains, mask)
+
+        event1 = bb.event.OperationStarted()
+        event2 = bb.event.OperationCompleted(total=1)
+
+        bb.event.fire_ui_handlers(event1, None)
+        bb.event.fire_ui_handlers(event2, None)
+        expected = [call(event1)]
+        self.assertEqual(self._test_ui1.event.send.call_args_list,
+                         expected)
+        expected = [call(pickle.dumps(event1))]
+        self.assertEqual(self._test_ui2.event.sendpickle.call_args_list,
+                         expected)
+
+    def test_ui_handler_log_filter(self):
+        """ Test log filters for UI handlers """
+        mask = ["*"]
+        debug_domains = {'BitBake.Foo': logging.WARNING}
+
+        self._test_ui1.event = EventQueueStub()
+        result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
+        bb.event.set_UIHmask(result, logging.ERROR, debug_domains, mask)
+        self._test_ui2.event = PickleEventQueueStub()
+        result = bb.event.register_UIHhandler(self._test_ui2, mainui=True)
+        bb.event.set_UIHmask(result, logging.ERROR, debug_domains, mask)
+
+        event1 = bb.event.OperationStarted()
+        bb.event.fire_ui_handlers(event1, None)   # All events match
+
+        event_log_handler = bb.event.LogHandler()
+        logger = logging.getLogger("BitBake")
+        logger.addHandler(event_log_handler)
+        logger1 = logging.getLogger("BitBake.Foo")
+        logger1.warning("Test warning LogRecord1") # Matches debug_domains level
+        logger1.info("Test info LogRecord")        # Filtered out
+        logger2 = logging.getLogger("BitBake.Bar")
+        logger2.error("Test error LogRecord")      # Matches filter base level
+        logger2.warning("Test warning LogRecord2") # Filtered out
+        logger.removeHandler(event_log_handler)
+
+        expected = ['OperationStarted',
+                    'WARNING: Test warning LogRecord1',
+                    'ERROR: Test error LogRecord']
+        self.assertEqual(self._test_ui1.event.event_calls, expected)
+        self.assertEqual(self._test_ui2.event.event_calls, expected)
+
     def test_fire(self):
         """ Test fire method used to trigger class and ui event handlers """
         mask = ["bb.event.ConfigParsed"]
@@ -289,18 +388,28 @@
         self.assertEqual(self._test_ui1.event.send.call_args_list,
                          expected)
 
+    def test_worker_fire(self):
+        """ Test the triggering of bb.event.worker_fire callback """
+        bb.event.worker_fire = Mock()
+        event = bb.event.Event()
+        bb.event.fire(event, None)
+        expected = [call(event, None)]
+        self.assertEqual(bb.event.worker_fire.call_args_list, expected)
+
     def test_print_ui_queue(self):
         """ Test print_ui_queue method """
         event1 = bb.event.OperationStarted()
         event2 = bb.event.OperationCompleted(total=123)
         bb.event.fire(event1, None)
         bb.event.fire(event2, None)
+        event_log_handler = bb.event.LogHandler()
         logger = logging.getLogger("BitBake")
-        logger.addHandler(bb.event.LogHandler())
+        logger.addHandler(event_log_handler)
         logger.info("Test info LogRecord")
         logger.warning("Test warning LogRecord")
         with self.assertLogs("BitBake", level="INFO") as cm:
             bb.event.print_ui_queue()
+        logger.removeHandler(event_log_handler)
         self.assertEqual(cm.output,
                          ["INFO:BitBake:Test info LogRecord",
                           "WARNING:BitBake:Test warning LogRecord"])
@@ -364,6 +473,7 @@
         self.assertEqual(self._threadlock_test_calls,
                          ["w1_ui1", "w1_ui2", "w2_ui1", "w2_ui2"])
 
+
     def test_disable_threadlock(self):
         """ Test disable_threadlock method """
         self._set_threadlock_test_mockups()
@@ -375,3 +485,502 @@
         # processed before finishing handling the first worker event.
         self.assertEqual(self._threadlock_test_calls,
                          ["w1_ui1", "w2_ui1", "w1_ui2", "w2_ui2"])
+
+
+class EventClassesTest(unittest.TestCase):
+    """ Event classes test class """
+
+    _worker_pid = 54321
+
+    def setUp(self):
+        bb.event.worker_pid = EventClassesTest._worker_pid
+
+    def test_Event(self):
+        """ Test the Event base class """
+        event = bb.event.Event()
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_HeartbeatEvent(self):
+        """ Test the HeartbeatEvent class """
+        time = 10
+        event = bb.event.HeartbeatEvent(time)
+        self.assertEqual(event.time, time)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_OperationStarted(self):
+        """ Test OperationStarted event class """
+        msg = "Foo Bar"
+        event = bb.event.OperationStarted(msg)
+        self.assertEqual(event.msg, msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_OperationCompleted(self):
+        """ Test OperationCompleted event class """
+        msg = "Foo Bar"
+        total = 123
+        event = bb.event.OperationCompleted(total, msg)
+        self.assertEqual(event.msg, msg)
+        self.assertEqual(event.total, total)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_OperationProgress(self):
+        """ Test OperationProgress event class """
+        msg = "Foo Bar"
+        total = 123
+        current = 111
+        event = bb.event.OperationProgress(current, total, msg)
+        self.assertEqual(event.msg, msg + ": %s/%s" % (current, total))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ConfigParsed(self):
+        """ Test the ConfigParsed class """
+        event = bb.event.ConfigParsed()
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_MultiConfigParsed(self):
+        """ Test MultiConfigParsed event class """
+        mcdata = {"foobar": "Foo Bar"}
+        event = bb.event.MultiConfigParsed(mcdata)
+        self.assertEqual(event.mcdata, mcdata)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_RecipeEvent(self):
+        """ Test RecipeEvent event base class """
+        callback = lambda a: 2 * a
+        event = bb.event.RecipeEvent(callback)
+        self.assertEqual(event.fn(1), callback(1))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_RecipePreFinalise(self):
+        """ Test RecipePreFinalise event class """
+        callback = lambda a: 2 * a
+        event = bb.event.RecipePreFinalise(callback)
+        self.assertEqual(event.fn(1), callback(1))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_RecipeTaskPreProcess(self):
+        """ Test RecipeTaskPreProcess event class """
+        callback = lambda a: 2 * a
+        tasklist = [("foobar", callback)]
+        event = bb.event.RecipeTaskPreProcess(callback, tasklist)
+        self.assertEqual(event.fn(1), callback(1))
+        self.assertEqual(event.tasklist, tasklist)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_RecipeParsed(self):
+        """ Test RecipeParsed event base class """
+        callback = lambda a: 2 * a
+        event = bb.event.RecipeParsed(callback)
+        self.assertEqual(event.fn(1), callback(1))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_StampUpdate(self):
+        targets = ["foo", "bar"]
+        stampfns = [lambda:"foobar"]
+        event = bb.event.StampUpdate(targets, stampfns)
+        self.assertEqual(event.targets, targets)
+        self.assertEqual(event.stampPrefix, stampfns)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_BuildBase(self):
+        """ Test base class for bitbake build events """
+        name = "foo"
+        pkgs = ["bar"]
+        failures = 123
+        event = bb.event.BuildBase(name, pkgs, failures)
+        self.assertEqual(event.name, name)
+        self.assertEqual(event.pkgs, pkgs)
+        self.assertEqual(event.getFailures(), failures)
+        name = event.name = "bar"
+        pkgs = event.pkgs = ["foo"]
+        self.assertEqual(event.name, name)
+        self.assertEqual(event.pkgs, pkgs)
+        self.assertEqual(event.getFailures(), failures)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_BuildInit(self):
+        """ Test class for bitbake build invocation events """
+        event = bb.event.BuildInit()
+        self.assertEqual(event.name, None)
+        self.assertEqual(event.pkgs, [])
+        self.assertEqual(event.getFailures(), 0)
+        name = event.name = "bar"
+        pkgs = event.pkgs = ["foo"]
+        self.assertEqual(event.name, name)
+        self.assertEqual(event.pkgs, pkgs)
+        self.assertEqual(event.getFailures(), 0)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_BuildStarted(self):
+        """ Test class for build started events """
+        name = "foo"
+        pkgs = ["bar"]
+        failures = 123
+        event = bb.event.BuildStarted(name, pkgs, failures)
+        self.assertEqual(event.name, name)
+        self.assertEqual(event.pkgs, pkgs)
+        self.assertEqual(event.getFailures(), failures)
+        self.assertEqual(event.msg, "Building Started")
+        name = event.name = "bar"
+        pkgs = event.pkgs = ["foo"]
+        msg = event.msg = "foobar"
+        self.assertEqual(event.name, name)
+        self.assertEqual(event.pkgs, pkgs)
+        self.assertEqual(event.getFailures(), failures)
+        self.assertEqual(event.msg, msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_BuildCompleted(self):
+        """ Test class for build completed events """
+        total = 1000
+        name = "foo"
+        pkgs = ["bar"]
+        failures = 123
+        interrupted = 1
+        event = bb.event.BuildCompleted(total, name, pkgs, failures,
+                                        interrupted)
+        self.assertEqual(event.name, name)
+        self.assertEqual(event.pkgs, pkgs)
+        self.assertEqual(event.getFailures(), failures)
+        self.assertEqual(event.msg, "Building Failed")
+        event2 = bb.event.BuildCompleted(total, name, pkgs)
+        self.assertEqual(event2.name, name)
+        self.assertEqual(event2.pkgs, pkgs)
+        self.assertEqual(event2.getFailures(), 0)
+        self.assertEqual(event2.msg, "Building Succeeded")
+        self.assertEqual(event2.pid, EventClassesTest._worker_pid)
+
+    def test_DiskFull(self):
+        """ Test DiskFull event class """
+        dev = "/dev/foo"
+        type = "ext4"
+        freespace = "104M"
+        mountpoint = "/"
+        event = bb.event.DiskFull(dev, type, freespace, mountpoint)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_MonitorDiskEvent(self):
+        """ Test MonitorDiskEvent class """
+        available_bytes = 10000000
+        free_bytes = 90000000
+        total_bytes = 1000000000
+        du = bb.event.DiskUsageSample(available_bytes, free_bytes,
+                                      total_bytes)
+        event = bb.event.MonitorDiskEvent(du)
+        self.assertEqual(event.disk_usage.available_bytes, available_bytes)
+        self.assertEqual(event.disk_usage.free_bytes, free_bytes)
+        self.assertEqual(event.disk_usage.total_bytes, total_bytes)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_NoProvider(self):
+        """ Test NoProvider event class """
+        item = "foobar"
+        event1 = bb.event.NoProvider(item)
+        self.assertEqual(event1.getItem(), item)
+        self.assertEqual(event1.isRuntime(), False)
+        self.assertEqual(str(event1), "Nothing PROVIDES 'foobar'")
+        runtime = True
+        dependees = ["foo", "bar"]
+        reasons = None
+        close_matches = ["foibar", "footbar"]
+        event2 = bb.event.NoProvider(item, runtime, dependees, reasons,
+                                     close_matches)
+        self.assertEqual(event2.isRuntime(), True)
+        expected = ("Nothing RPROVIDES 'foobar' (but foo, bar RDEPENDS"
+                    " on or otherwise requires it). Close matches:\n"
+                    "  foibar\n"
+                    "  footbar")
+        self.assertEqual(str(event2), expected)
+        reasons = ["Item does not exist on database"]
+        close_matches = ["foibar", "footbar"]
+        event3 = bb.event.NoProvider(item, runtime, dependees, reasons,
+                                     close_matches)
+        expected = ("Nothing RPROVIDES 'foobar' (but foo, bar RDEPENDS"
+                    " on or otherwise requires it)\n"
+                    "Item does not exist on database")
+        self.assertEqual(str(event3), expected)
+        self.assertEqual(event3.pid, EventClassesTest._worker_pid)
+
+    def test_MultipleProviders(self):
+        """ Test MultipleProviders event class """
+        item = "foobar"
+        candidates = ["foobarv1", "foobars"]
+        event1 = bb.event.MultipleProviders(item, candidates)
+        self.assertEqual(event1.isRuntime(), False)
+        self.assertEqual(event1.getItem(), item)
+        self.assertEqual(event1.getCandidates(), candidates)
+        expected = ("Multiple providers are available for foobar (foobarv1,"
+                    " foobars)\n"
+                    "Consider defining a PREFERRED_PROVIDER entry to match "
+                    "foobar")
+        self.assertEqual(str(event1), expected)
+        runtime = True
+        event2 = bb.event.MultipleProviders(item, candidates, runtime)
+        self.assertEqual(event2.isRuntime(), runtime)
+        expected = ("Multiple providers are available for runtime foobar "
+                    "(foobarv1, foobars)\n"
+                    "Consider defining a PREFERRED_RPROVIDER entry to match "
+                    "foobar")
+        self.assertEqual(str(event2), expected)
+        self.assertEqual(event2.pid, EventClassesTest._worker_pid)
+
+    def test_ParseStarted(self):
+        """ Test ParseStarted event class """
+        total = 123
+        event = bb.event.ParseStarted(total)
+        self.assertEqual(event.msg, "Recipe parsing Started")
+        self.assertEqual(event.total, total)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ParseCompleted(self):
+        """ Test ParseCompleted event class """
+        cached = 10
+        parsed = 13
+        skipped = 7
+        virtuals = 2
+        masked = 1
+        errors = 0
+        total = 23
+        event = bb.event.ParseCompleted(cached, parsed, skipped, masked,
+                                        virtuals, errors, total)
+        self.assertEqual(event.msg, "Recipe parsing Completed")
+        expected = [cached, parsed, skipped, virtuals, masked, errors,
+                    cached + parsed, total]
+        actual = [event.cached, event.parsed, event.skipped, event.virtuals,
+                  event.masked, event.errors, event.sofar, event.total]
+        self.assertEqual(str(actual), str(expected))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ParseProgress(self):
+        """ Test ParseProgress event class """
+        current = 10
+        total = 100
+        event = bb.event.ParseProgress(current, total)
+        self.assertEqual(event.msg,
+                         "Recipe parsing" + ": %s/%s" % (current, total))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_CacheLoadStarted(self):
+        """ Test CacheLoadStarted event class """
+        total = 123
+        event = bb.event.CacheLoadStarted(total)
+        self.assertEqual(event.msg, "Loading cache Started")
+        self.assertEqual(event.total, total)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_CacheLoadProgress(self):
+        """ Test CacheLoadProgress event class """
+        current = 10
+        total = 100
+        event = bb.event.CacheLoadProgress(current, total)
+        self.assertEqual(event.msg,
+                         "Loading cache" + ": %s/%s" % (current, total))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_CacheLoadCompleted(self):
+        """ Test CacheLoadCompleted event class """
+        total = 23
+        num_entries = 12
+        event = bb.event.CacheLoadCompleted(total, num_entries)
+        self.assertEqual(event.msg, "Loading cache Completed")
+        expected = [total, num_entries]
+        actual = [event.total, event.num_entries]
+        self.assertEqual(str(actual), str(expected))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_TreeDataPreparationStarted(self):
+        """ Test TreeDataPreparationStarted event class """
+        event = bb.event.TreeDataPreparationStarted()
+        self.assertEqual(event.msg, "Preparing tree data Started")
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_TreeDataPreparationProgress(self):
+        """ Test TreeDataPreparationProgress event class """
+        current = 10
+        total = 100
+        event = bb.event.TreeDataPreparationProgress(current, total)
+        self.assertEqual(event.msg,
+                         "Preparing tree data" + ": %s/%s" % (current, total))
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_TreeDataPreparationCompleted(self):
+        """ Test TreeDataPreparationCompleted event class """
+        total = 23
+        event = bb.event.TreeDataPreparationCompleted(total)
+        self.assertEqual(event.msg, "Preparing tree data Completed")
+        self.assertEqual(event.total, total)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_DepTreeGenerated(self):
+        """ Test DepTreeGenerated event class """
+        depgraph = Mock()
+        event = bb.event.DepTreeGenerated(depgraph)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_TargetsTreeGenerated(self):
+        """ Test TargetsTreeGenerated event class """
+        model = Mock()
+        event = bb.event.TargetsTreeGenerated(model)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ReachableStamps(self):
+        """ Test ReachableStamps event class """
+        stamps = [Mock(), Mock()]
+        event = bb.event.ReachableStamps(stamps)
+        self.assertEqual(event.stamps, stamps)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_FilesMatchingFound(self):
+        """ Test FilesMatchingFound event class """
+        pattern = "foo.*bar"
+        matches = ["foobar"]
+        event = bb.event.FilesMatchingFound(pattern, matches)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ConfigFilesFound(self):
+        """ Test ConfigFilesFound event class """
+        variable = "FOO_BAR"
+        values = ["foo", "bar"]
+        event = bb.event.ConfigFilesFound(variable, values)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ConfigFilePathFound(self):
+        """ Test ConfigFilePathFound event class """
+        path = "/foo/bar"
+        event = bb.event.ConfigFilePathFound(path)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_message_classes(self):
+        """ Test message event classes """
+        msg = "foobar foo bar"
+        event = bb.event.MsgBase(msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+        event = bb.event.MsgDebug(msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+        event = bb.event.MsgNote(msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+        event = bb.event.MsgWarn(msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+        event = bb.event.MsgError(msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+        event = bb.event.MsgFatal(msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+        event = bb.event.MsgPlain(msg)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_LogExecTTY(self):
+        """ Test LogExecTTY event class """
+        msg = "foo bar"
+        prog = "foo.sh"
+        sleep_delay = 10
+        retries = 3
+        event = bb.event.LogExecTTY(msg, prog, sleep_delay, retries)
+        self.assertEqual(event.msg, msg)
+        self.assertEqual(event.prog, prog)
+        self.assertEqual(event.sleep_delay, sleep_delay)
+        self.assertEqual(event.retries, retries)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def _throw_zero_division_exception(self):
+        a = 1 / 0
+        return
+
+    def _worker_handler(self, event, d):
+        self._returned_event = event
+        return
+
+    def test_LogHandler(self):
+        """ Test LogHandler class """
+        logger = logging.getLogger("TestEventClasses")
+        logger.propagate = False
+        handler = bb.event.LogHandler(logging.INFO)
+        logger.addHandler(handler)
+        bb.event.worker_fire = self._worker_handler
+        try:
+            self._throw_zero_division_exception()
+        except ZeroDivisionError as ex:
+            logger.exception(ex)
+        event = self._returned_event
+        try:
+            pe = pickle.dumps(event)
+            newevent = pickle.loads(pe)
+        except:
+            self.fail('Logged event is not serializable')
+        self.assertEqual(event.taskpid, EventClassesTest._worker_pid)
+
+    def test_MetadataEvent(self):
+        """ Test MetadataEvent class """
+        eventtype = "footype"
+        eventdata = {"foo": "bar"}
+        event = bb.event.MetadataEvent(eventtype, eventdata)
+        self.assertEqual(event.type, eventtype)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ProcessStarted(self):
+        """ Test ProcessStarted class """
+        processname = "foo"
+        total = 9783128974
+        event = bb.event.ProcessStarted(processname, total)
+        self.assertEqual(event.processname, processname)
+        self.assertEqual(event.total, total)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ProcessProgress(self):
+        """ Test ProcessProgress class """
+        processname = "foo"
+        progress = 243224
+        event = bb.event.ProcessProgress(processname, progress)
+        self.assertEqual(event.processname, processname)
+        self.assertEqual(event.progress, progress)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_ProcessFinished(self):
+        """ Test ProcessFinished class """
+        processname = "foo"
+        total = 1242342344
+        event = bb.event.ProcessFinished(processname)
+        self.assertEqual(event.processname, processname)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_SanityCheck(self):
+        """ Test SanityCheck class """
+        event1 = bb.event.SanityCheck()
+        self.assertEqual(event1.generateevents, True)
+        self.assertEqual(event1.pid, EventClassesTest._worker_pid)
+        generateevents = False
+        event2 = bb.event.SanityCheck(generateevents)
+        self.assertEqual(event2.generateevents, generateevents)
+        self.assertEqual(event2.pid, EventClassesTest._worker_pid)
+
+    def test_SanityCheckPassed(self):
+        """ Test SanityCheckPassed class """
+        event = bb.event.SanityCheckPassed()
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
+
+    def test_SanityCheckFailed(self):
+        """ Test SanityCheckFailed class """
+        msg = "The sanity test failed."
+        event1 = bb.event.SanityCheckFailed(msg)
+        self.assertEqual(event1.pid, EventClassesTest._worker_pid)
+        network_error = True
+        event2 = bb.event.SanityCheckFailed(msg, network_error)
+        self.assertEqual(event2.pid, EventClassesTest._worker_pid)
+
+    def test_network_event_classes(self):
+        """ Test network event classes """
+        event1 = bb.event.NetworkTest()
+        generateevents = False
+        self.assertEqual(event1.pid, EventClassesTest._worker_pid)
+        event2 = bb.event.NetworkTest(generateevents)
+        self.assertEqual(event2.pid, EventClassesTest._worker_pid)
+        event3 = bb.event.NetworkTestPassed()
+        self.assertEqual(event3.pid, EventClassesTest._worker_pid)
+        event4 = bb.event.NetworkTestFailed()
+        self.assertEqual(event4.pid, EventClassesTest._worker_pid)
+
+    def test_FindSigInfoResult(self):
+        """ Test FindSigInfoResult event class """
+        result = [Mock()]
+        event = bb.event.FindSigInfoResult(result)
+        self.assertEqual(event.result, result)
+        self.assertEqual(event.pid, EventClassesTest._worker_pid)
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/tests/fetch.py b/import-layers/yocto-poky/bitbake/lib/bb/tests/fetch.py
index 7d7c5d7..74859f9 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/tests/fetch.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/tests/fetch.py
@@ -20,6 +20,7 @@
 #
 
 import unittest
+import hashlib
 import tempfile
 import subprocess
 import collections
@@ -522,6 +523,109 @@
         with self.assertRaises(bb.fetch2.UnpackError):
             self.fetchUnpack(['file://a;subdir=/bin/sh'])
 
+class FetcherNoNetworkTest(FetcherTest):
+    def setUp(self):
+        super().setUp()
+        # all test cases are based on not having network
+        self.d.setVar("BB_NO_NETWORK", "1")
+
+    def test_missing(self):
+        string = "this is a test file\n".encode("utf-8")
+        self.d.setVarFlag("SRC_URI", "md5sum", hashlib.md5(string).hexdigest())
+        self.d.setVarFlag("SRC_URI", "sha256sum", hashlib.sha256(string).hexdigest())
+
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+        fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d)
+        with self.assertRaises(bb.fetch2.NetworkAccess):
+            fetcher.download()
+
+    def test_valid_missing_donestamp(self):
+        # create the file in the download directory with correct hash
+        string = "this is a test file\n".encode("utf-8")
+        with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb") as f:
+            f.write(string)
+
+        self.d.setVarFlag("SRC_URI", "md5sum", hashlib.md5(string).hexdigest())
+        self.d.setVarFlag("SRC_URI", "sha256sum", hashlib.sha256(string).hexdigest())
+
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+        fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d)
+        fetcher.download()
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+
+    def test_invalid_missing_donestamp(self):
+        # create an invalid file in the download directory with incorrect hash
+        string = "this is a test file\n".encode("utf-8")
+        with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb"):
+            pass
+
+        self.d.setVarFlag("SRC_URI", "md5sum", hashlib.md5(string).hexdigest())
+        self.d.setVarFlag("SRC_URI", "sha256sum", hashlib.sha256(string).hexdigest())
+
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+        fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d)
+        with self.assertRaises(bb.fetch2.NetworkAccess):
+            fetcher.download()
+        # the existing file should not exist or should have be moved to "bad-checksum"
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+
+    def test_nochecksums_missing(self):
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+        # ssh fetch does not support checksums
+        fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d)
+        # attempts to download with missing donestamp
+        with self.assertRaises(bb.fetch2.NetworkAccess):
+            fetcher.download()
+
+    def test_nochecksums_missing_donestamp(self):
+        # create a file in the download directory
+        with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb"):
+            pass
+
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+        # ssh fetch does not support checksums
+        fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d)
+        # attempts to download with missing donestamp
+        with self.assertRaises(bb.fetch2.NetworkAccess):
+            fetcher.download()
+
+    def test_nochecksums_has_donestamp(self):
+        # create a file in the download directory with the donestamp
+        with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb"):
+            pass
+        with open(os.path.join(self.dldir, "test-file.tar.gz.done"), "wb"):
+            pass
+
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+        # ssh fetch does not support checksums
+        fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d)
+        # should not fetch
+        fetcher.download()
+        # both files should still exist
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+
+    def test_nochecksums_missing_has_donestamp(self):
+        # create a file in the download directory with the donestamp
+        with open(os.path.join(self.dldir, "test-file.tar.gz.done"), "wb"):
+            pass
+
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+        # ssh fetch does not support checksums
+        fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d)
+        with self.assertRaises(bb.fetch2.NetworkAccess):
+            fetcher.download()
+        # both files should still exist
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
+        self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
+
 class FetcherNetworkTest(FetcherTest):
     @skipIfNoNetwork()
     def test_fetch(self):
@@ -809,7 +913,7 @@
             ud = bb.fetch2.FetchData(k[1], self.d)
             pupver= ud.method.latest_versionstring(ud, self.d)
             verstring = pupver[0]
-            self.assertTrue(verstring, msg="Could not find upstream version")
+            self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0])
             r = bb.utils.vercmp_string(v, verstring)
             self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], v, verstring))
 
@@ -822,7 +926,7 @@
             ud = bb.fetch2.FetchData(k[1], self.d)
             pupver = ud.method.latest_versionstring(ud, self.d)
             verstring = pupver[0]
-            self.assertTrue(verstring, msg="Could not find upstream version")
+            self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0])
             r = bb.utils.vercmp_string(v, verstring)
             self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], v, verstring))
 
@@ -874,9 +978,6 @@
 
 
 class GitMakeShallowTest(FetcherTest):
-    bitbake_dir = os.path.join(os.path.dirname(os.path.join(__file__)), '..', '..', '..')
-    make_shallow_path = os.path.join(bitbake_dir, 'bin', 'git-make-shallow')
-
     def setUp(self):
         FetcherTest.setUp(self)
         self.gitdir = os.path.join(self.tempdir, 'gitshallow')
@@ -905,7 +1006,7 @@
     def make_shallow(self, args=None):
         if args is None:
             args = ['HEAD']
-        return bb.process.run([self.make_shallow_path] + args, cwd=self.gitdir)
+        return bb.process.run([bb.fetch2.git.Git.make_shallow_path] + args, cwd=self.gitdir)
 
     def add_empty_file(self, path, msg=None):
         if msg is None:
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/tinfoil.py b/import-layers/yocto-poky/bitbake/lib/bb/tinfoil.py
index fa95f63..368264f 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/tinfoil.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/tinfoil.py
@@ -604,13 +604,16 @@
         recipecache = self.cooker.recipecaches[mc]
         prov = self.find_best_provider(pn)
         fn = prov[3]
-        actual_pn = recipecache.pkg_fn[fn]
-        recipe = TinfoilRecipeInfo(recipecache,
-                                    self.config_data,
-                                    pn=actual_pn,
-                                    fn=fn,
-                                    fns=recipecache.pkg_pn[actual_pn])
-        return recipe
+        if fn:
+            actual_pn = recipecache.pkg_fn[fn]
+            recipe = TinfoilRecipeInfo(recipecache,
+                                        self.config_data,
+                                        pn=actual_pn,
+                                        fn=fn,
+                                        fns=recipecache.pkg_pn[actual_pn])
+            return recipe
+        else:
+            return None
 
     def parse_recipe(self, pn):
         """
diff --git a/import-layers/yocto-poky/bitbake/lib/bb/utils.py b/import-layers/yocto-poky/bitbake/lib/bb/utils.py
index c540b49..378e699 100644
--- a/import-layers/yocto-poky/bitbake/lib/bb/utils.py
+++ b/import-layers/yocto-poky/bitbake/lib/bb/utils.py
@@ -187,7 +187,7 @@
             #r[-1] += ' ' + ' '.join(j)
     return r
 
-def explode_dep_versions2(s):
+def explode_dep_versions2(s, *, sort=True):
     """
     Take an RDEPENDS style string of format:
     "DEPEND1 (optional version) DEPEND2 (optional version) ..."
@@ -250,7 +250,8 @@
         if not (i in r and r[i]):
             r[lastdep] = []
 
-    r = collections.OrderedDict(sorted(r.items(), key=lambda x: x[0]))
+    if sort:
+        r = collections.OrderedDict(sorted(r.items(), key=lambda x: x[0]))
     return r
 
 def explode_dep_versions(s):
@@ -806,8 +807,8 @@
                 return None # failure
         try:
             if didcopy:
-                os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID])
-                os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
+                os.lchown(destpath, sstat[stat.ST_UID], sstat[stat.ST_GID])
+                os.chmod(destpath, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
                 os.unlink(src)
         except Exception as e:
             print("movefile: Failed to chown/chmod/unlink", dest, e)
diff --git a/import-layers/yocto-poky/bitbake/lib/bblayers/action.py b/import-layers/yocto-poky/bitbake/lib/bblayers/action.py
index b1326e5..aa575d1 100644
--- a/import-layers/yocto-poky/bitbake/lib/bblayers/action.py
+++ b/import-layers/yocto-poky/bitbake/lib/bblayers/action.py
@@ -18,16 +18,18 @@
 
 class ActionPlugin(LayerPlugin):
     def do_add_layer(self, args):
-        """Add a layer to bblayers.conf."""
-        layerdir = os.path.abspath(args.layerdir)
-        if not os.path.exists(layerdir):
-            sys.stderr.write("Specified layer directory doesn't exist\n")
-            return 1
+        """Add one or more layers to bblayers.conf."""
+        layerdirs = [os.path.abspath(ldir) for ldir in args.layerdir]
 
-        layer_conf = os.path.join(layerdir, 'conf', 'layer.conf')
-        if not os.path.exists(layer_conf):
-            sys.stderr.write("Specified layer directory doesn't contain a conf/layer.conf file\n")
-            return 1
+        for layerdir in layerdirs:
+            if not os.path.exists(layerdir):
+                sys.stderr.write("Specified layer directory %s doesn't exist\n" % layerdir)
+                return 1
+
+            layer_conf = os.path.join(layerdir, 'conf', 'layer.conf')
+            if not os.path.exists(layer_conf):
+                sys.stderr.write("Specified layer directory %s doesn't contain a conf/layer.conf file\n" % layerdir)
+                return 1
 
         bblayers_conf = os.path.join('conf', 'bblayers.conf')
         if not os.path.exists(bblayers_conf):
@@ -40,7 +42,7 @@
         shutil.copy2(bblayers_conf, backup)
 
         try:
-            notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdir, None)
+            notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdirs, None)
             if not (args.force or notadded):
                 try:
                     self.tinfoil.parseRecipes()
@@ -56,19 +58,22 @@
             shutil.rmtree(tempdir)
 
     def do_remove_layer(self, args):
-        """Remove a layer from bblayers.conf."""
+        """Remove one or more layers from bblayers.conf."""
         bblayers_conf = os.path.join('conf', 'bblayers.conf')
         if not os.path.exists(bblayers_conf):
             sys.stderr.write("Unable to find bblayers.conf\n")
             return 1
 
-        if args.layerdir.startswith('*'):
-            layerdir = args.layerdir
-        elif not '/' in args.layerdir:
-            layerdir = '*/%s' % args.layerdir
-        else:
-            layerdir = os.path.abspath(args.layerdir)
-        (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdir)
+        layerdirs = []
+        for item in args.layerdir:
+            if item.startswith('*'):
+                layerdir = item
+            elif not '/' in item:
+                layerdir = '*/%s' % item
+            else:
+                layerdir = os.path.abspath(item)
+            layerdirs.append(layerdir)
+        (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdirs)
         if notremoved:
             for item in notremoved:
                 sys.stderr.write("No layers matching %s found in BBLAYERS\n" % item)
@@ -240,10 +245,10 @@
 
     def register_commands(self, sp):
         parser_add_layer = self.add_command(sp, 'add-layer', self.do_add_layer, parserecipes=False)
-        parser_add_layer.add_argument('layerdir', help='Layer directory to add')
+        parser_add_layer.add_argument('layerdir', nargs='+', help='Layer directory/directories to add')
 
         parser_remove_layer = self.add_command(sp, 'remove-layer', self.do_remove_layer, parserecipes=False)
-        parser_remove_layer.add_argument('layerdir', help='Layer directory to remove (wildcards allowed, enclose in quotes to avoid shell expansion)')
+        parser_remove_layer.add_argument('layerdir', nargs='+', help='Layer directory/directories to remove (wildcards allowed, enclose in quotes to avoid shell expansion)')
         parser_remove_layer.set_defaults(func=self.do_remove_layer)
 
         parser_flatten = self.add_command(sp, 'flatten', self.do_flatten)
diff --git a/import-layers/yocto-poky/bitbake/lib/bblayers/query.py b/import-layers/yocto-poky/bitbake/lib/bblayers/query.py
index bef3af3..9294dfa 100644
--- a/import-layers/yocto-poky/bitbake/lib/bblayers/query.py
+++ b/import-layers/yocto-poky/bitbake/lib/bblayers/query.py
@@ -161,7 +161,12 @@
         items_listed = False
         for p in sorted(pkg_pn):
             if pnspec:
-                if not fnmatch.fnmatch(p, pnspec):
+                found=False
+                for pnm in pnspec:
+                    if fnmatch.fnmatch(p, pnm):
+                        found=True
+                        break
+                if not found:
                     continue
 
             if len(allproviders[p]) > 1 or not show_multi_provider_only:
@@ -251,8 +256,14 @@
         pnlist.sort()
         appends = False
         for pn in pnlist:
-            if args.pnspec and pn != args.pnspec:
-                continue
+            if args.pnspec:
+                found=False
+                for pnm in args.pnspec:
+                    if fnmatch.fnmatch(pn, pnm):
+                        found=True
+                        break
+                if not found:
+                    continue
 
             if self.show_appends_for_pn(pn):
                 appends = True
@@ -479,11 +490,11 @@
         parser_show_recipes = self.add_command(sp, 'show-recipes', self.do_show_recipes)
         parser_show_recipes.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true')
         parser_show_recipes.add_argument('-m', '--multiple', help='only list where multiple recipes (in the same layer or different layers) exist for the same recipe name', action='store_true')
-        parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class', metavar='CLASS', default='')
-        parser_show_recipes.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
+        parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class(es) - separate multiple classes using , (without spaces)', metavar='CLASS', default='')
+        parser_show_recipes.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
 
         parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends)
-        parser_show_appends.add_argument('pnspec', nargs='?', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
+        parser_show_appends.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
 
         parser_show_cross_depends = self.add_command(sp, 'show-cross-depends', self.do_show_cross_depends)
         parser_show_cross_depends.add_argument('-f', '--filenames', help='show full file path', action='store_true')
diff --git a/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 4c17562..16c7c80 100644
--- a/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -192,7 +192,7 @@
             if commit != "HEAD":
                 logger.debug("localhostbecontroller: checking out commit %s to %s " % (commit, localdirname))
                 ref = commit if re.match('^[a-fA-F0-9]+$', commit) else 'origin/%s' % commit
-                self._shellcmd('git fetch --all && git reset --hard "%s"' % ref, localdirname,env=git_env)
+                self._shellcmd('git fetch && git reset --hard "%s"' % ref, localdirname,env=git_env)
 
             # take the localdirname as poky dir if we can find the oe-init-build-env
             if self.pokydirname is None and os.path.exists(os.path.join(localdirname, "oe-init-build-env")):
diff --git a/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
index 582114a..823c6f1 100644
--- a/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/import-layers/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -107,7 +107,10 @@
                                 action="ignore",
                                 message="^.*No fixture named.*$")
                             print("Importing custom settings if present")
-                            call_command("loaddata", "custom")
+                            try:
+                                call_command("loaddata", "custom")
+                            except:
+                                print("NOTE: optional fixture 'custom' not found")
 
                         # we run lsupdates after config update
                         print("\nFetching information from the layer index, "
diff --git a/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml b/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
index 00720c3..d7ea78d 100644
--- a/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
+++ b/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
@@ -8,9 +8,9 @@
 
   <!-- Bitbake versions which correspond to the metadata release -->
   <object model="orm.bitbakeversion" pk="1">
-    <field type="CharField" name="name">rocko</field>
+    <field type="CharField" name="name">sumo</field>
     <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
-    <field type="CharField" name="branch">1.36</field>
+    <field type="CharField" name="branch">1.38</field>
   </object>
   <object model="orm.bitbakeversion" pk="2">
     <field type="CharField" name="name">HEAD</field>
@@ -22,14 +22,19 @@
     <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
     <field type="CharField" name="branch">master</field>
   </object>
+  <object model="orm.bitbakeversion" pk="4">
+    <field type="CharField" name="name">rocko</field>
+    <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
+    <field type="CharField" name="branch">1.36</field>
+  </object>
 
   <!-- Releases available -->
   <object model="orm.release" pk="1">
     <field type="CharField" name="name">rocko</field>
-    <field type="CharField" name="description">Openembedded Rocko</field>
+    <field type="CharField" name="description">Openembedded Sumo</field>
     <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
-    <field type="CharField" name="branch_name">rocko</field>
-    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=rocko\"&gt;OpenEmbedded Rocko&lt;/a&gt; branch.</field>
+    <field type="CharField" name="branch_name">sumo</field>
+    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=sumo\"&gt;OpenEmbedded Sumo&lt;/a&gt; branch.</field>
   </object>
   <object model="orm.release" pk="2">
     <field type="CharField" name="name">local</field>
@@ -45,6 +50,13 @@
     <field type="CharField" name="branch_name">master</field>
     <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/\"&gt;OpenEmbedded master&lt;/a&gt; branch.</field>
   </object>
+  <object model="orm.release" pk="4">
+    <field type="CharField" name="name">rocko</field>
+    <field type="CharField" name="description">Openembedded Rocko</field>
+    <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
+    <field type="CharField" name="branch_name">rocko</field>
+    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=rocko\"&gt;OpenEmbedded Rocko&lt;/a&gt; branch.</field>
+  </object>
 
   <!-- Default layers for each release -->
   <object model="orm.releasedefaultlayer" pk="1">
@@ -59,6 +71,10 @@
     <field rel="ManyToOneRel" to="orm.release" name="release">3</field>
     <field type="CharField" name="layer_name">openembedded-core</field>
   </object>
+  <object model="orm.releasedefaultlayer" pk="4">
+    <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
+    <field type="CharField" name="layer_name">openembedded-core</field>
+  </object>
 
 
   <!-- Layer for the Local release -->
diff --git a/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/poky.xml b/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/poky.xml
index 2f39d77..6c966da 100644
--- a/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/poky.xml
+++ b/import-layers/yocto-poky/bitbake/lib/toaster/orm/fixtures/poky.xml
@@ -8,9 +8,9 @@
 
   <!-- Bitbake versions which correspond to the metadata release -->
   <object model="orm.bitbakeversion" pk="1">
-    <field type="CharField" name="name">rocko</field>
+    <field type="CharField" name="name">sumo</field>
     <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
-    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="branch">sumo</field>
     <field type="CharField" name="dirpath">bitbake</field>
   </object>
   <object model="orm.bitbakeversion" pk="2">
@@ -25,15 +25,21 @@
     <field type="CharField" name="branch">master</field>
     <field type="CharField" name="dirpath">bitbake</field>
   </object>
+  <object model="orm.bitbakeversion" pk="4">
+    <field type="CharField" name="name">rocko</field>
+    <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
+    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="dirpath">bitbake</field>
+  </object>
 
 
   <!-- Releases available -->
   <object model="orm.release" pk="1">
-    <field type="CharField" name="name">rocko</field>
-    <field type="CharField" name="description">Yocto Project 2.4 "Rocko"</field>
+    <field type="CharField" name="name">sumo</field>
+    <field type="CharField" name="description">Yocto Project 2.5 "Sumo"</field>
     <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
-    <field type="CharField" name="branch_name">rocko</field>
-    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=rocko"&gt;Yocto Project Rocko branch&lt;/a&gt;.</field>
+    <field type="CharField" name="branch_name">sumo</field>
+    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=sumo"&gt;Yocto Project Sumo branch&lt;/a&gt;.</field>
   </object>
   <object model="orm.release" pk="2">
     <field type="CharField" name="name">local</field>
@@ -49,6 +55,13 @@
     <field type="CharField" name="branch_name">master</field>
     <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/"&gt;Yocto Project Master branch&lt;/a&gt;.</field>
   </object>
+  <object model="orm.release" pk="4">
+    <field type="CharField" name="name">rocko</field>
+    <field type="CharField" name="description">Yocto Project 2.4 "Rocko"</field>
+    <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
+    <field type="CharField" name="branch_name">rocko</field>
+    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=rocko"&gt;Yocto Project Rocko branch&lt;/a&gt;.</field>
+  </object>
 
   <!-- Default project layers for each release -->
   <object model="orm.releasedefaultlayer" pk="1">
@@ -87,6 +100,18 @@
     <field rel="ManyToOneRel" to="orm.release" name="release">3</field>
     <field type="CharField" name="layer_name">meta-yocto-bsp</field>
   </object>
+  <object model="orm.releasedefaultlayer" pk="10">
+    <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
+    <field type="CharField" name="layer_name">openembedded-core</field>
+  </object>
+  <object model="orm.releasedefaultlayer" pk="11">
+    <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
+    <field type="CharField" name="layer_name">meta-poky</field>
+  </object>
+  <object model="orm.releasedefaultlayer" pk="12">
+    <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
+    <field type="CharField" name="layer_name">meta-yocto-bsp</field>
+  </object>
 
   <!-- Default layers provided by poky
        openembedded-core
@@ -105,7 +130,7 @@
     <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
-    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="branch">sumo</field>
     <field type="CharField" name="dirpath">meta</field>
   </object>
   <object model="orm.layer_version" pk="2">
@@ -123,6 +148,13 @@
     <field type="CharField" name="branch">master</field>
     <field type="CharField" name="dirpath">meta</field>
   </object>
+  <object model="orm.layer_version" pk="4">
+    <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
+    <field type="IntegerField" name="layer_source">0</field>
+    <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
+    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="dirpath">meta</field>
+  </object>
 
   <object model="orm.layer" pk="2">
     <field type="CharField" name="name">meta-poky</field>
@@ -132,14 +164,14 @@
     <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
     <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
   </object>
-  <object model="orm.layer_version" pk="4">
+  <object model="orm.layer_version" pk="5">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
-    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="branch">sumo</field>
     <field type="CharField" name="dirpath">meta-poky</field>
   </object>
-  <object model="orm.layer_version" pk="5">
+  <object model="orm.layer_version" pk="6">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">2</field>
@@ -147,13 +179,20 @@
     <field type="CharField" name="commit">HEAD</field>
     <field type="CharField" name="dirpath">meta-poky</field>
   </object>
-  <object model="orm.layer_version" pk="6">
+  <object model="orm.layer_version" pk="7">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">3</field>
     <field type="CharField" name="branch">master</field>
     <field type="CharField" name="dirpath">meta-poky</field>
   </object>
+  <object model="orm.layer_version" pk="8">
+    <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
+    <field type="IntegerField" name="layer_source">0</field>
+    <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
+    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="dirpath">meta-poky</field>
+  </object>
 
   <object model="orm.layer" pk="3">
     <field type="CharField" name="name">meta-yocto-bsp</field>
@@ -163,14 +202,14 @@
     <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
     <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
   </object>
-  <object model="orm.layer_version" pk="7">
+  <object model="orm.layer_version" pk="9">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
-    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="branch">sumo</field>
     <field type="CharField" name="dirpath">meta-yocto-bsp</field>
   </object>
-  <object model="orm.layer_version" pk="8">
+  <object model="orm.layer_version" pk="10">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">2</field>
@@ -178,11 +217,18 @@
     <field type="CharField" name="commit">HEAD</field>
     <field type="CharField" name="dirpath">meta-yocto-bsp</field>
   </object>
-  <object model="orm.layer_version" pk="9">
+  <object model="orm.layer_version" pk="11">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">3</field>
     <field type="CharField" name="branch">master</field>
     <field type="CharField" name="dirpath">meta-yocto-bsp</field>
   </object>
+  <object model="orm.layer_version" pk="12">
+    <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
+    <field type="IntegerField" name="layer_source">0</field>
+    <field rel="ManyToOneRel" to="orm.release" name="release">4</field>
+    <field type="CharField" name="branch">rocko</field>
+    <field type="CharField" name="dirpath">meta-yocto-bsp</field>
+  </object>
 </django-objects>
diff --git a/import-layers/yocto-poky/documentation/Makefile b/import-layers/yocto-poky/documentation/Makefile
index 9891095..e41d5a0 100644
--- a/import-layers/yocto-poky/documentation/Makefile
+++ b/import-layers/yocto-poky/documentation/Makefile
@@ -48,7 +48,7 @@
 # Examples:
 #
 #     make DOC=bsp-guide
-#     make html DOC=yocto-project-qs
+#     make html DOC=brief-yoctoprojectqs
 #     make pdf DOC=ref-manual
 #     make DOC=dev-manual BRANCH=edison
 #     make DOC=mega-manual BRANCH=denzil
@@ -56,7 +56,7 @@
 # The first example generates the HTML and Eclipse help versions of the BSP Guide.
 # The second example generates the HTML version only of the Quick Start.  Note
 # that the Quick Start only has an HTML version available.  So, the
-# 'make DOC=yocto-project-qs' command would be equivalent. The third example
+# 'make DOC=brief-yoctoprojectqs' command would be equivalent. The third example
 # generates just the PDF version of the Yocto Project Reference Manual.
 # The fourth example generates the HTML 'edison' version and (if available)
 # the Eclipse help version of the YP Development Tasks Manual.  The last example
@@ -84,6 +84,40 @@
 # for the 'denzil' branch.
 #
 
+ifeq ($(DOC),brief-yoctoprojectqs)
+XSLTOPTS = --stringparam html.stylesheet brief-yoctoprojectqs-style.css \
+           --stringparam  chapter.autolabel 0 \
+           --stringparam  section.autolabel 0 \
+           --stringparam  section.label.includes.component.label 0 \
+           --xinclude
+ALLPREQ = html eclipse tarball
+TARFILES = brief-yoctoprojectqs-style.css brief-yoctoprojectqs.html figures/bypqs-title.png \
+           figures/yocto-project-transp.png
+MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
+FIGURES = figures
+STYLESHEET = $(DOC)/*.css
+
+endif
+
+ifeq ($(DOC),overview-manual)
+XSLTOPTS = --xinclude
+ALLPREQ = html eclipse tarball
+TARFILES = overview-manual-style.css overview-manual.html figures/overview-manual-title.png \
+           figures/git-workflow.png figures/source-repos.png figures/index-downloads.png \
+           figures/yp-download.png figures/YP-flow-diagram.png figures/key-dev-elements.png \
+           figures/poky-reference-distribution.png figures/cross-development-toolchains.png \
+           figures/user-configuration.png figures/layer-input.png figures/source-input.png \
+           figures/package-feeds.png figures/patching.png figures/source-fetching.png \
+           figures/configuration-compile-autoreconf.png figures/analysis-for-package-splitting.png \
+           figures/image-generation.png figures/sdk-generation.png figures/images.png \
+           figures/sdk.png \
+           eclipse
+MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
+FIGURES = figures
+STYLESHEET = $(DOC)/*.css
+
+endif
+
 ifeq ($(DOC),bsp-guide)
 XSLTOPTS = --xinclude
 ALLPREQ = html eclipse tarball
@@ -128,8 +162,8 @@
            figures/source-repos.png figures/yp-download.png \
            figures/wip.png
         else
-TARFILES = dev-style.css dev-manual.html \
-           figures/dev-title.png \
+TARFILES = dev-style.css dev-manual.html figures/buildhistory-web.png \
+           figures/dev-title.png figures/buildhistory.png \
            figures/recipe-workflow.png figures/bitbake-build-flow.png \
            eclipse
 	endif
@@ -140,17 +174,6 @@
 
 endif
 
-ifeq ($(DOC),yocto-project-qs)
-XSLTOPTS = --xinclude
-ALLPREQ = html eclipse tarball
-TARFILES = yocto-project-qs.html qs-style.css \
-           figures/yocto-project-transp.png \
-           eclipse
-MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
-FIGURES = figures
-STYLESHEET = $(DOC)/*.css
-endif
-
 ifeq ($(DOC),mega-manual)
 XSLTOPTS = --stringparam html.stylesheet mega-style.css \
            --stringparam  chapter.autolabel 1 \
@@ -191,7 +214,7 @@
 	figures/wip.png
         else
 TARFILES = mega-manual.html mega-style.css \
-        figures/building-an-image.png figures/YP-flow-diagram.png \
+        figures/YP-flow-diagram.png \
 	figures/using-a-pre-built-image.png \
 	figures/poky-title.png figures/buildhistory.png \
         figures/buildhistory-web.png \
@@ -229,22 +252,23 @@
         figures/sched-wakeup-profile.png figures/sysprof-callers.png \
         figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \
         figures/cross-development-toolchains.png \
-	figures/yocto-environment-ref.png figures/user-configuration.png \
+	figures/user-configuration.png \
         figures/source-input.png figures/package-feeds.png \
         figures/layer-input.png figures/images.png figures/sdk.png \
 	figures/source-fetching.png figures/patching.png \
         figures/configuration-compile-autoreconf.png \
 	figures/analysis-for-package-splitting.png \
-        figures/image-generation.png \
+        figures/image-generation.png figures/key-dev-elements.png\
 	figures/sdk-generation.png figures/recipe-workflow.png \
 	figures/build-workspace-directory.png figures/mega-title.png \
 	figures/toaster-title.png figures/hosted-service.png \
-	figures/simple-configuration.png \
+	figures/simple-configuration.png figures/poky-reference-distribution.png \
 	figures/compatible-layers.png figures/import-layer.png figures/new-project.png \
 	figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
 	figures/sdk-devtool-add-flow.png figures/sdk-installed-extensible-sdk-directory.png \
 	figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \
-	figures/sdk-devtool-upgrade-flow.png figures/bitbake-build-flow.png
+	figures/sdk-devtool-upgrade-flow.png figures/bitbake-build-flow.png figures/bypqs-title.png \
+	figures/overview-manual-title.png figures/sdk-autotools-flow.png figures/sdk-makefile-flow.png
 	endif
 
 MANUALS = $(DOC)/$(DOC).html
@@ -256,17 +280,9 @@
 ifeq ($(DOC),ref-manual)
 XSLTOPTS = --xinclude
 ALLPREQ = html eclipse tarball
-TARFILES = ref-manual.html ref-style.css figures/poky-title.png figures/YP-flow-diagram.png \
-	figures/buildhistory.png figures/buildhistory-web.png eclipse \
-        figures/cross-development-toolchains.png figures/layer-input.png \
-	figures/package-feeds.png figures/source-input.png \
-	figures/user-configuration.png figures/yocto-environment-ref.png \
-	figures/images.png figures/sdk.png figures/source-fetching.png \
-	figures/patching.png figures/configuration-compile-autoreconf.png \
-	figures/analysis-for-package-splitting.png figures/image-generation.png \
-	figures/sdk-generation.png figures/building-an-image.png \
-	figures/build-workspace-directory.png figures/source-repos.png \
-	figures/index-downloads.png figures/yp-download.png figures/git-workflow.png
+TARFILES = ref-manual.html ref-style.css figures/poky-title.png \
+	figures/build-workspace-directory.png \
+	eclipse
 MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
 FIGURES = figures
 STYLESHEET = $(DOC)/*.css
@@ -279,7 +295,7 @@
            figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
 	   figures/sdk-installed-extensible-sdk-directory.png figures/sdk-devtool-add-flow.png \
 	   figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \
-	   figures/sdk-devtool-upgrade-flow.png \
+	   figures/sdk-devtool-upgrade-flow.png figures/sdk-autotools-flow.png figures/sdk-makefile-flow.png \
            eclipse
 MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
 FIGURES = figures
@@ -355,9 +371,9 @@
 all: $(ALLPREQ)
 
 pdf:
-ifeq ($(DOC),yocto-project-qs)
+ifeq ($(DOC),brief-yoctoprojectqs)
 	@echo " "
-	@echo "ERROR: You cannot generate a yocto-project-qs PDF file."
+	@echo "ERROR: You cannot generate a PDF file for brief-yoctoprojectqs."
 	@echo " "
 
 else ifeq ($(DOC),mega-manual)
@@ -401,17 +417,18 @@
 .PHONY : eclipse-generate eclipse-resolve-links
 
 eclipse-generate:
-ifeq ($(filter $(DOC), sdk-manual bsp-guide dev-manual kernel-dev profile-manual ref-manual yocto-project-qs),)
+ifeq ($(filter $(DOC), overview-manual sdk-manual bsp-guide dev-manual kernel-dev profile-manual ref-manual brief-yoctoprojectqs),)
 	@echo " "
 	@echo "ERROR: You can only create eclipse documentation"
 	@echo "       of the following documentation parts:"
+	@echo "       - overview-manual"
 	@echo "       - sdk-manual"
 	@echo "       - bsp-guide"
 	@echo "       - dev-manual"
 	@echo "       - kernel-dev"
 	@echo "       - profile-manual"
 	@echo "       - ref-manual"
-	@echo "       - yocto-project-qs"
+	@echo "       - brief-yoctoprojectqs"
 	@echo " "
 else
 	@echo " "
diff --git a/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-customization.xsl b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-customization.xsl
new file mode 100644
index 0000000..0d57424
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-customization.xsl
@@ -0,0 +1,24 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
+
+<!--
+
+  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
+
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
+
+-->
+
+  <xsl:import href="brief-yoctoprojectqs-titlepage.xsl"/>
+
+  <xsl:include href="../template/permalinks.xsl"/>
+  <xsl:include href="../template/section.title.xsl"/>
+  <xsl:include href="../template/component.title.xsl"/>
+  <xsl:include href="../template/division.title.xsl"/>
+  <xsl:include href="../template/formal.object.heading.xsl"/>
+
+  <xsl:param name="generate.toc" select="'article nop'"></xsl:param>
+  <xsl:param name="html.stylesheet" select="'brief-yoctoprojectqs-style.css'" />
+</xsl:stylesheet>
diff --git a/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-eclipse-customization.xsl b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-eclipse-customization.xsl
new file mode 100644
index 0000000..fbb3b57
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-eclipse-customization.xsl
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:fo="http://www.w3.org/1999/XSL/Format"
+	version="1.0">
+
+  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
+
+<!--
+
+  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
+
+  <xsl:import
+	  href="http://docbook.sourceforge.net/release/xsl/1.76.1/eclipse/eclipse3.xsl" />
+
+-->
+
+  <xsl:import href="brief-yoctoprojectqs-titlepage.xsl"/>
+
+  <xsl:param name="chunker.output.indent" select="'yes'"/>
+  <xsl:param name="chunk.quietly" select="1"/>
+  <xsl:param name="use.id.as.filename" select="1"/>
+  <xsl:param name="ulink.target" select="'_self'" />
+  <xsl:param name="base.dir" select="'html/brief-yoctoprojectqs/'"/>
+  <xsl:param name="chunk.section.depth" select="0"/>
+  <xsl:param name="html.stylesheet" select="'../book.css'"/>
+  <xsl:param name="eclipse.manifest" select="0"/>
+  <xsl:param name="create.plugin.xml" select="0"/>
+  <xsl:param name="suppress.navigation" select="1"/>
+  <xsl:param name="generate.index" select="0"/>
+  <xsl:param name="generate.toc" select="'article nop'"></xsl:param>
+  <xsl:param name="html.stylesheet" select="'style.css'" />
+</xsl:stylesheet>
+
diff --git a/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-style.css b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-style.css
new file mode 100644
index 0000000..386841d
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-style.css
@@ -0,0 +1,989 @@
+/*
+   Generic XHTML / DocBook XHTML CSS Stylesheet.
+
+   Browser wrangling and typographic design by
+      Oyvind Kolas / pippin@gimp.org
+
+   Customised for Poky by
+      Matthew Allum / mallum@o-hand.com
+
+   Thanks to:
+     Liam R. E. Quin
+     William Skaggs
+     Jakub Steiner
+
+   Structure
+   ---------
+
+   The stylesheet is divided into the following sections:
+
+       Positioning
+          Margins, paddings, width, font-size, clearing.
+       Decorations
+          Borders, style
+       Colors
+          Colors
+       Graphics
+          Graphical backgrounds
+       Nasty IE tweaks
+          Workarounds needed to make it work in internet explorer,
+          currently makes the stylesheet non validating, but up until
+          this point it is validating.
+       Mozilla extensions
+          Transparency for footer
+	  Rounded corners on boxes
+
+*/
+
+
+  /*************** /
+ /  Positioning   /
+/ ***************/
+
+body {
+  font-family: Verdana, Sans, sans-serif;
+
+  min-width: 640px;
+  width: 80%;
+  margin:  0em auto;
+  padding: 2em 5em 5em 5em;
+  color: #333;
+}
+
+h1,h2,h3,h4,h5,h6,h7 {
+  font-family: Arial, Sans;
+  color: #00557D;
+  clear: both;
+}
+
+h1 {
+  font-size: 2em;
+  text-align: left;
+  padding: 0em 0em 0em 0em;
+  margin: 2em 0em 0em 0em;
+}
+
+h2.subtitle {
+  margin: 0.10em 0em 3.0em 0em;
+  padding: 0em 0em 0em 0em;
+  font-size: 1.8em;
+  padding-left: 20%;
+  font-weight: normal;
+  font-style: italic;
+}
+
+h2 {
+  margin: 2em 0em 0.66em 0em;
+  padding: 0.5em 0em 0em 0em;
+  font-size: 1.5em;
+  font-weight: bold;
+}
+
+h3.subtitle {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+  font-size: 142.14%;
+  text-align: right;
+}
+
+h3 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 140%;
+  font-weight: bold;
+}
+
+h4 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 120%;
+  font-weight: bold;
+}
+
+h5 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 110%;
+  font-weight: bold;
+}
+
+h6 {
+  margin: 1em 0em 0em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 110%;
+  font-weight: bold;
+}
+
+.authorgroup {
+  background-color: transparent;
+  background-repeat: no-repeat;
+  padding-top: 256px;
+  background-image: url("figures/bypqs-title.png");
+  background-position: left top;
+  margin-top: -256px;
+  padding-right: 50px;
+  margin-left: 0px;
+  text-align: right;
+  width: 740px;
+}
+
+h3.author {
+  margin: 0em 0me 0em 0em;
+  padding: 0em 0em 0em 0em;
+  font-weight: normal;
+  font-size: 100%;
+  color: #333;
+  clear: both;
+}
+
+.author tt.email {
+  font-size: 66%;
+}
+
+.titlepage hr {
+  width: 0em;
+  clear: both;
+}
+
+.revhistory {
+  padding-top: 2em;
+  clear: both;
+}
+
+.toc,
+.list-of-tables,
+.list-of-examples,
+.list-of-figures {
+  padding: 1.33em 0em 2.5em 0em;
+  color: #00557D;
+}
+
+.toc p,
+.list-of-tables p,
+.list-of-figures p,
+.list-of-examples p {
+  padding: 0em 0em 0em 0em;
+  padding: 0em 0em 0.3em;
+  margin: 1.5em 0em 0em 0em;
+}
+
+.toc p b,
+.list-of-tables p b,
+.list-of-figures p b,
+.list-of-examples p b{
+  font-size: 100.0%;
+  font-weight: bold;
+}
+
+.toc dl,
+.list-of-tables dl,
+.list-of-figures dl,
+.list-of-examples dl {
+  margin: 0em 0em 0.5em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.toc dt {
+  margin: 0em 0em 0em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.toc dd {
+  margin: 0em 0em 0em 2.6em;
+  padding: 0em 0em 0em 0em;
+}
+
+div.glossary dl,
+div.variablelist dl {
+}
+
+.glossary dl dt,
+.variablelist dl dt,
+.variablelist dl dt span.term {
+  font-weight: normal;
+  width: 20em;
+  text-align: right;
+}
+
+.variablelist dl dt {
+  margin-top: 0.5em;
+}
+
+.glossary dl dd,
+.variablelist dl dd {
+  margin-top: -1em;
+  margin-left: 25.5em;
+}
+
+.glossary dd p,
+.variablelist dd p {
+  margin-top: 0em;
+  margin-bottom: 1em;
+}
+
+
+div.calloutlist table td {
+  padding: 0em 0em 0em 0em;
+  margin: 0em 0em 0em 0em;
+}
+
+div.calloutlist table td p {
+  margin-top: 0em;
+  margin-bottom: 1em;
+}
+
+div p.copyright {
+  text-align: left;
+}
+
+div.legalnotice p.legalnotice-title {
+  margin-bottom: 0em;
+}
+
+p {
+  line-height: 1.5em;
+  margin-top: 0em;
+
+}
+
+dl {
+  padding-top: 0em;
+}
+
+hr {
+  border: solid 1px;
+}
+
+
+.mediaobject,
+.mediaobjectco {
+  text-align: center;
+}
+
+img {
+  border: none;
+}
+
+ul {
+  padding: 0em 0em 0em 1.5em;
+}
+
+ul li {
+  padding: 0em 0em 0em 0em;
+}
+
+ul li p {
+  text-align: left;
+}
+
+table {
+  width :100%;
+}
+
+th {
+  padding: 0.25em;
+  text-align: left;
+  font-weight: normal;
+  vertical-align: top;
+}
+
+td {
+  padding: 0.25em;
+  vertical-align: top;
+}
+
+p a[id] {
+  margin: 0px;
+  padding: 0px;
+  display: inline;
+  background-image: none;
+}
+
+a {
+  text-decoration: underline;
+  color: #444;
+}
+
+pre {
+    overflow: auto;
+}
+
+a:hover {
+  text-decoration: underline;
+  /*font-weight: bold;*/
+}
+
+/* This style defines how the permalink character
+   appears by itself and when hovered over with
+   the mouse. */
+
+[alt='Permalink'] { color: #eee; }
+[alt='Permalink']:hover { color: black; }
+
+
+div.informalfigure,
+div.informalexample,
+div.informaltable,
+div.figure,
+div.table,
+div.example {
+  margin: 1em 0em;
+  padding: 1em;
+  page-break-inside: avoid;
+}
+
+
+div.informalfigure p.title b,
+div.informalexample p.title b,
+div.informaltable p.title b,
+div.figure p.title b,
+div.example p.title b,
+div.table p.title b{
+    padding-top: 0em;
+    margin-top: 0em;
+    font-size: 100%;
+    font-weight: normal;
+}
+
+.mediaobject .caption,
+.mediaobject .caption p  {
+  text-align: center;
+  font-size: 80%;
+  padding-top: 0.5em;
+  padding-bottom: 0.5em;
+}
+
+.epigraph {
+  padding-left: 55%;
+  margin-bottom: 1em;
+}
+
+.epigraph p {
+  text-align: left;
+}
+
+.epigraph .quote {
+  font-style: italic;
+}
+.epigraph .attribution {
+  font-style: normal;
+  text-align: right;
+}
+
+span.application {
+  font-style: italic;
+}
+
+.programlisting {
+  font-family: monospace;
+  font-size: 80%;
+  white-space: pre;
+  margin: 1.33em 0em;
+  padding: 1.33em;
+}
+
+.tip,
+.warning,
+.caution,
+.note {
+  margin-top: 1em;
+  margin-bottom: 1em;
+
+}
+
+/* force full width of table within div */
+.tip table,
+.warning table,
+.caution table,
+.note table {
+  border: none;
+  width: 100%;
+}
+
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  padding: 0.8em 0.0em 0.0em 0.0em;
+  margin : 0em 0em 0em 0em;
+}
+
+.tip p,
+.warning p,
+.caution p,
+.note p {
+  margin-top: 0.5em;
+  margin-bottom: 0.5em;
+  padding-right: 1em;
+  text-align: left;
+}
+
+.acronym {
+  text-transform: uppercase;
+}
+
+b.keycap,
+.keycap {
+  padding: 0.09em 0.3em;
+  margin: 0em;
+}
+
+.itemizedlist li {
+  clear: none;
+}
+
+.filename {
+  font-size: medium;
+  font-family: Courier, monospace;
+}
+
+
+div.navheader, div.heading{
+  position: absolute;
+  left: 0em;
+  top: 0em;
+  width: 100%;
+  background-color: #cdf;
+  width: 100%;
+}
+
+div.navfooter, div.footing{
+  position: fixed;
+  left: 0em;
+  bottom: 0em;
+  background-color: #eee;
+  width: 100%;
+}
+
+
+div.navheader td,
+div.navfooter td {
+  font-size: 66%;
+}
+
+div.navheader table th {
+  /*font-family: Georgia, Times, serif;*/
+  /*font-size: x-large;*/
+  font-size: 80%;
+}
+
+div.navheader table {
+  border-left: 0em;
+  border-right: 0em;
+  border-top: 0em;
+  width: 100%;
+}
+
+div.navfooter table {
+  border-left: 0em;
+  border-right: 0em;
+  border-bottom: 0em;
+  width: 100%;
+}
+
+div.navheader table td a,
+div.navfooter table td a {
+  color: #777;
+  text-decoration: none;
+}
+
+/* normal text in the footer */
+div.navfooter table td {
+  color: black;
+}
+
+div.navheader table td a:visited,
+div.navfooter table td a:visited {
+  color: #444;
+}
+
+
+/* links in header and footer */
+div.navheader table td a:hover,
+div.navfooter table td a:hover {
+  text-decoration: underline;
+  background-color: transparent;
+  color: #33a;
+}
+
+div.navheader hr,
+div.navfooter hr {
+  display: none;
+}
+
+
+.qandaset tr.question td p {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.qandaset tr.answer td p {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+}
+.answer td {
+  padding-bottom: 1.5em;
+}
+
+.emphasis {
+  font-weight: bold;
+}
+
+
+  /************* /
+ / decorations  /
+/ *************/
+
+.titlepage {
+}
+
+.part .title {
+}
+
+.subtitle {
+    border: none;
+}
+
+/*
+h1 {
+  border: none;
+}
+
+h2 {
+  border-top: solid 0.2em;
+  border-bottom: solid 0.06em;
+}
+
+h3 {
+  border-top: 0em;
+  border-bottom: solid 0.06em;
+}
+
+h4 {
+  border: 0em;
+  border-bottom: solid 0.06em;
+}
+
+h5 {
+  border: 0em;
+}
+*/
+
+.programlisting {
+  border: solid 1px;
+}
+
+div.figure,
+div.table,
+div.informalfigure,
+div.informaltable,
+div.informalexample,
+div.example {
+  border: 1px solid;
+}
+
+
+
+.tip,
+.warning,
+.caution,
+.note {
+  border: 1px solid;
+}
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  border-bottom: 1px solid;
+}
+
+.question td {
+  border-top: 1px solid black;
+}
+
+.answer {
+}
+
+
+b.keycap,
+.keycap {
+  border: 1px solid;
+}
+
+
+div.navheader, div.heading{
+  border-bottom: 1px solid;
+}
+
+
+div.navfooter, div.footing{
+  border-top: 1px solid;
+}
+
+  /********* /
+ /  colors  /
+/ *********/
+
+body {
+  color: #333;
+  background: white;
+}
+
+a {
+  background: transparent;
+}
+
+a:hover {
+  background-color: #dedede;
+}
+
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+h7,
+h8 {
+  background-color: transparent;
+}
+
+hr {
+  border-color: #aaa;
+}
+
+
+.tip, .warning, .caution, .note {
+  border-color: #fff;
+}
+
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  border-bottom-color: #fff;
+}
+
+
+.warning {
+  background-color: #f0f0f2;
+}
+
+.caution {
+  background-color: #f0f0f2;
+}
+
+.tip {
+  background-color: #f0f0f2;
+}
+
+.note {
+  background-color: #f0f0f2;
+}
+
+.glossary dl dt,
+.variablelist dl dt,
+.variablelist dl dt span.term {
+  color: #044;
+}
+
+div.figure,
+div.table,
+div.example,
+div.informalfigure,
+div.informaltable,
+div.informalexample {
+  border-color: #aaa;
+}
+
+pre.programlisting {
+  color: black;
+  background-color: #fff;
+  border-color: #aaa;
+  border-width: 2px;
+}
+
+.guimenu,
+.guilabel,
+.guimenuitem {
+  background-color: #eee;
+}
+
+
+b.keycap,
+.keycap {
+  background-color: #eee;
+  border-color: #999;
+}
+
+
+div.navheader {
+  border-color: black;
+}
+
+
+div.navfooter {
+  border-color: black;
+}
+
+
+.writernotes {
+  color: red;
+}
+
+
+  /*********** /
+ /  graphics  /
+/ ***********/
+
+/*
+body {
+  background-image: url("images/body_bg.jpg");
+  background-attachment: fixed;
+}
+
+.navheader,
+.note,
+.tip {
+  background-image: url("images/note_bg.jpg");
+  background-attachment: fixed;
+}
+
+.warning,
+.caution {
+  background-image: url("images/warning_bg.jpg");
+  background-attachment: fixed;
+}
+
+.figure,
+.informalfigure,
+.example,
+.informalexample,
+.table,
+.informaltable {
+  background-image: url("images/figure_bg.jpg");
+  background-attachment: fixed;
+}
+
+*/
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+h7{
+}
+
+/*
+Example of how to stick an image as part of the title.
+
+div.article .titlepage .title
+{
+  background-image: url("figures/white-on-black.png");
+  background-position: center;
+  background-repeat: repeat-x;
+}
+*/
+
+div.preface .titlepage .title,
+div.colophon .title,
+div.chapter .titlepage .title {
+  background-position: bottom;
+  background-repeat: repeat-x;
+}
+
+div.section div.section .titlepage .title,
+div.sect2 .titlepage .title {
+    background: none;
+}
+
+
+h1.title {
+  background-color: transparent;
+  background-repeat: no-repeat;
+  height: 256px;
+  text-indent: -9000px;
+  overflow:hidden;
+}
+
+h2.subtitle {
+  background-color: transparent;
+  text-indent: -9000px;
+  overflow:hidden;
+  width: 0px;
+  display: none;
+}
+
+  /*************************************** /
+ /  pippin.gimp.org specific alterations  /
+/ ***************************************/
+
+/*
+div.heading, div.navheader {
+  color: #777;
+  font-size: 80%;
+  padding: 0;
+  margin: 0;
+  text-align: left;
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 50px;
+  background: url('/gfx/heading_bg.png') transparent;
+  background-repeat: repeat-x;
+  background-attachment: fixed;
+  border: none;
+}
+
+div.heading a {
+  color: #444;
+}
+
+div.footing, div.navfooter {
+  border: none;
+  color: #ddd;
+  font-size: 80%;
+  text-align:right;
+
+  width: 100%;
+  padding-top: 10px;
+  position: absolute;
+  bottom: 0px;
+  left: 0px;
+
+  background: url('/gfx/footing_bg.png') transparent;
+}
+*/
+
+
+
+  /****************** /
+ /  nasty ie tweaks  /
+/ ******************/
+
+/*
+div.heading, div.navheader {
+  width:expression(document.body.clientWidth + "px");
+}
+
+div.footing, div.navfooter {
+  width:expression(document.body.clientWidth + "px");
+  margin-left:expression("-5em");
+}
+body {
+  padding:expression("4em 5em 0em 5em");
+}
+*/
+
+  /**************************************** /
+ / mozilla vendor specific css extensions  /
+/ ****************************************/
+/*
+div.navfooter, div.footing{
+  -moz-opacity: 0.8em;
+}
+
+div.figure,
+div.table,
+div.informalfigure,
+div.informaltable,
+div.informalexample,
+div.example,
+.tip,
+.warning,
+.caution,
+.note {
+  -moz-border-radius: 0.5em;
+}
+
+b.keycap,
+.keycap {
+  -moz-border-radius: 0.3em;
+}
+*/
+
+table tr td table tr td {
+  display: none;
+}
+
+
+hr {
+  display: none;
+}
+
+table {
+  border: 0em;
+}
+
+ .photo {
+  float: right;
+  margin-left:   1.5em;
+  margin-bottom: 1.5em;
+  margin-top: 0em;
+  max-width:      17em;
+  border:     1px solid gray;
+  padding:    3px;
+  background: white;
+}
+ .seperator {
+   padding-top: 2em;
+   clear: both;
+  }
+
+  #validators {
+      margin-top: 5em;
+      text-align: right;
+      color: #777;
+  }
+  @media print {
+      body {
+          font-size: 8pt;
+      }
+      .noprint {
+          display: none;
+      }
+  }
+
+
+.tip,
+.note {
+   background: #f0f0f2;
+   color: #333;
+   padding: 20px;
+   margin: 20px;
+}
+
+.tip h3,
+.note h3 {
+   padding: 0em;
+   margin: 0em;
+   font-size: 2em;
+   font-weight: bold;
+   color: #333;
+}
+
+.tip a,
+.note a {
+   color: #333;
+   text-decoration: underline;
+}
+
+.footnote {
+   font-size: small;
+   color: #333;
+}
+
+/* Changes the announcement text */
+.tip h3,
+.warning h3,
+.caution h3,
+.note h3 {
+   font-size:large;
+   color: #00557D;
+}
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-titlepage.xsl b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-titlepage.xsl
similarity index 100%
rename from import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-titlepage.xsl
rename to import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-titlepage.xsl
diff --git a/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml
new file mode 100644
index 0000000..62c4964
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml
@@ -0,0 +1,491 @@
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<article id='brief-yocto-project-qs-intro'>
+    <articleinfo>
+        <title>Yocto Project Quick Build</title>
+
+        <copyright>
+            <year>&COPYRIGHT_YEAR;</year>
+            <holder>Linux Foundation</holder>
+        </copyright>
+
+        <legalnotice>
+            <para>
+                Permission is granted to copy, distribute and/or modify this document under
+                the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
+            </para>
+        </legalnotice>
+
+
+        <abstract>
+            <imagedata fileref="figures/yocto-project-transp.png"
+                        width="6in" depth="1in"
+                        align="right" scale="25" />
+        </abstract>
+    </articleinfo>
+
+    <section id='brief-welcome'>
+        <title>Welcome!</title>
+
+        <para>
+            Welcome!
+            This short document steps you through the process for a typical
+            image build using the Yocto Project.
+            The document also introduces how to configure a build for specific
+            hardware.
+            You will use Yocto Project to build a reference embedded OS
+            called Poky.
+            <note>
+                The examples in this paper assume you are using a native Linux
+                system running a recent Ubuntu Linux distribution.
+                If the machine you want to use
+                Yocto Project on to build an image is not a native Linux
+                system, you can still perform these steps by using CROss
+                PlatformS (CROPS) and setting up a Poky container.
+                See the
+                <ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
+                section in the Yocto Project Development Tasks Manual for more
+                information.
+            </note>
+        </para>
+
+        <para>
+            If you want more conceptual or background information on the
+            Yocto Project, see the
+            <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>.
+        </para>
+    </section>
+
+    <section id='brief-compatible-distro'>
+        <title>Compatible Linux Distribution</title>
+
+        <para>
+            Make sure your
+            <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>
+            meets the following requirements:
+            <itemizedlist>
+                <listitem><para>
+                    50 Gbytes of free disk space
+                    </para></listitem>
+                <listitem><para>
+                    Runs a supported Linux distribution (i.e. recent releases of
+                    Fedora, openSUSE, CentOS, Debian, or Ubuntu). For a list of
+                    Linux distributions that support the Yocto Project, see the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
+                    section in the Yocto Project Reference Manual.
+                    </para></listitem>
+                <listitem><para>
+                    <itemizedlist>
+                        <listitem><para>
+                            Git 1.8.3.1 or greater
+                            </para></listitem>
+                        <listitem><para>
+                            tar 1.27 or greater
+                            </para></listitem>
+                        <listitem><para>
+                            Python 3.4.0 or greater.
+                            </para></listitem>
+                    </itemizedlist>
+                    If your build host does not meet any of these three listed
+                    version requirements, you can take steps to prepare the
+                    system so that you can still use the Yocto Project.
+                    See the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
+                    section in the Yocto Project Reference Manual for information.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='brief-build-system-packages'>
+        <title>Build Host Packages</title>
+
+        <para>
+            You must install essential host packages on your
+            build host.
+            The following command installs the host packages based on an
+            Ubuntu distribution:
+            <note>
+                For host package requirements on all supported Linux
+                distributions, see the
+                "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
+                section in the Yocto Project Reference Manual.
+            </note>
+            <literallayout class='monospaced'>
+     $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; libsdl1.2-dev xterm
+            </literallayout>
+        </para>
+    </section>
+
+    <section id='brief-use-git-to-clone-poky'>
+        <title>Use Git to Clone Poky</title>
+
+        <para>
+            Once you complete the setup instructions for your machine,
+            you need to get a copy of the Poky repository on your build
+            host.
+            Use the following commands to clone the Poky
+            repository and then checkout the &DISTRO_REL_TAG; release:
+            <literallayout class='monospaced'>
+     $ git clone git://git.yoctoproject.org/poky
+     Cloning into 'poky'...
+     remote: Counting objects: 361782, done.
+     remote: Compressing objects: 100% (87100/87100), done.
+     remote: Total 361782 (delta 268619), reused 361439 (delta 268277)
+     Receiving objects: 100% (361782/361782), 131.94 MiB | 6.88 MiB/s, done.
+     Resolving deltas: 100% (268619/268619), done.
+     Checking connectivity... done.
+     $ git checkout tags/yocto-2.5 -b my-yocto-2.5
+            </literallayout>
+            The previous Git checkout command creates a local branch
+            named my-&DISTRO_REL_TAG;. The files available to you in that
+            branch exactly match the repository's files in the
+            "&DISTRO_NAME_NO_CAP;" development branch at the time of the
+            Yocto Project &DISTRO; release.
+        </para>
+
+        <para>
+            For more options and information about accessing Yocto
+            Project related repositories, see the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
+            section in the Yocto Project Development Tasks Manual.
+        </para>
+    </section>
+
+    <section id='brief-building-your-image'>
+        <title>Building Your Image</title>
+
+        <para>
+            Use the following steps to build your image.
+            The build process creates an entire Linux distribution, including
+            the toolchain, from source.
+            <note>
+                <itemizedlist>
+                    <listitem><para>
+                        If you are working behind a firewall and your build
+                        host is not set up for proxies, you could encounter
+                        problems with the build process when fetching source
+                        code (e.g. fetcher failures or Git failures).
+                        </para></listitem>
+                    <listitem><para>
+                        If you do not know your proxy settings, consult your
+                        local network infrastructure resources and get that
+                        information.
+                        A good starting point could also be to check your
+                        web browser settings.
+                        Finally, you can find more information on the
+                        "<ulink url='https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
+                        page of the Yocto Project Wiki.
+                        </para></listitem>
+                </itemizedlist>
+            </note>
+        </para>
+
+        <para>
+            <orderedlist>
+                <listitem><para>
+                    <emphasis>Initialize the Build Environment:</emphasis>
+                    Run the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+                    environment setup script to define Yocto Project's
+                    build environment on your build host.
+                    <literallayout class='monospaced'>
+     $ source &OE_INIT_FILE;
+                    </literallayout>
+                    Among other things, the script creates the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+                    which is <filename>build</filename> in this case
+                    and is located in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+                    After the script runs, your current working directory
+                    is set to the Build Directory.
+                    Later, when the build completes, the Build Directory
+                    contains all the files created during the build.
+                    </para></listitem>
+                <listitem><para id='conf-file-step'>
+                    <emphasis>Examine Your Local Configuration File:</emphasis>
+                    When you set up the build environment, a local
+                    configuration file named
+                    <filename>local.conf</filename> becomes available in
+                    a <filename>conf</filename> subdirectory of the
+                    Build Directory.
+                    For this example, the defaults are set to build
+                    for a <filename>qemux86</filename> target, which is
+                    suitable for emulation.
+                    The package manager used is set to the RPM package
+                    manager.
+                    <tip>
+                        You can significantly speed up your build and guard
+                        against fetcher failures by using mirrors.
+                        To use mirrors, add these lines to your
+                        <filename>local.conf</filename> file in the Build
+                        directory:
+                        <literallayout class='monospaced'>
+     SSTATE_MIRRORS = "\
+     file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH \n \
+     file://.* http://sstate.yoctoproject.org/&YOCTO_DOC_VERSION_MINUS_ONE;/PATH;downloadfilename=PATH \n \
+     file://.* http://sstate.yoctoproject.org/&YOCTO_DOC_VERSION;/PATH;downloadfilename=PATH \n \
+     "
+                        </literallayout>
+                        The previous examples showed how to add sstate
+                        paths for Yocto Project &YOCTO_DOC_VERSION_MINUS_ONE;,
+                        &YOCTO_DOC_VERSION;, and a development area.
+                        For a complete index of sstate locations, see
+                        <ulink url='http://sstate.yoctoproject.org/'></ulink>.
+                    </tip>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Start the Build:</emphasis>
+                    Continue with the following command to build an OS image
+                    for the target, which is
+                    <filename>core-image-sato</filename> in this example:
+                    <literallayout class='monospaced'>
+     $ bitbake core-image-sato
+                    </literallayout>
+                    For information on using the
+                    <filename>bitbake</filename> command, see the
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#usingpoky-components-bitbake'>BitBake</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual,
+                    or see the
+                    "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-command'>BitBake Command</ulink>"
+                    section in the BitBake User Manual.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Simulate Your Image Using QEMU:</emphasis>
+                    Once this particular image is built, you can start
+                    QEMU, which is a Quick EMUlator that ships with
+                    the Yocto Project:
+                    <literallayout class='monospaced'>
+     $ runqemu qemux86
+                    </literallayout>
+                    If you want to learn more about running QEMU, see the
+                    "<ulink url="&YOCTO_DOCS_DEV_URL;#dev-manual-qemu">Using the Quick EMUlator (QEMU)</ulink>"
+                    chapter in the Yocto Project Development Tasks Manual.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Exit QEMU:</emphasis>
+                    Exit QEMU by either clicking on the shutdown icon or by
+                    typing <filename>Ctrl-C</filename> in the QEMU
+                    transcript window from which you evoked QEMU.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+
+    <section id='customizing-your-build-for-specific-hardware'>
+        <title>Customizing Your Build for Specific Hardware</title>
+
+        <para>
+            So far, all you have done is quickly built an image suitable
+            for emulation only.
+            This section shows you how to customize your build for specific
+            hardware by adding a hardware layer into the Yocto Project
+            development environment.
+        </para>
+
+        <para>
+            In general, layers are repositories that contain related sets of
+            instructions and configurations that tell the Yocto Project what
+            to do.
+            Isolating related metadata into functionally specific layers
+            facilitates modular development and makes it easier to reuse the
+            layer metadata.
+            <note>
+                By convention, layer names start with the string "meta-".
+            </note>
+        </para>
+
+        <para>
+            Follow these steps to add a hardware layer:
+            <orderedlist>
+                <listitem><para>
+                    <emphasis>Find a Layer:</emphasis>
+                    Lots of hardware layers exist.
+                    The Yocto Project
+                    <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
+                    has many hardware layers.
+                    This example adds the
+                    <ulink url='https://github.com/kraj/meta-altera'>meta-altera</ulink>
+                    hardware layer.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Clone the Layer</emphasis>
+                    Use Git to make a local copy of the layer on your machine.
+                    You can put the copy in the top level of the copy of the
+                    Poky repository created earlier:
+                    <literallayout class='monospaced'>
+     $ cd ~/poky
+     $ git clone https://github.com/kraj/meta-altera.git
+     Cloning into 'meta-altera'...
+     remote: Counting objects: 25170, done.
+     remote: Compressing objects: 100% (350/350), done.
+     remote: Total 25170 (delta 645), reused 719 (delta 538), pack-reused 24219
+     Receiving objects: 100% (25170/25170), 41.02 MiB | 1.64 MiB/s, done.
+     Resolving deltas: 100% (13385/13385), done.
+     Checking connectivity... done.
+                    </literallayout>
+                    The hardware layer now exists with other layers inside
+                    the Poky reference repository on your build host as
+                    <filename>meta-altera</filename> and contains all the
+                    metadata needed to support hardware from Altera, which
+                    is owned by Intel.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Change the Configuration to Build for a Specific Machine:</emphasis>
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+                    variable in the <filename>local.conf</filename> file
+                    specifies the machine for the build.
+                    For this example, set the <filename>MACHINE</filename>
+                    variable to "cyclone5".
+                    These configurations are used:
+                    <ulink url='https://github.com/kraj/meta-altera/blob/master/conf/machine/cyclone5.conf'></ulink>.
+                    <note>
+                        See the
+                        "<link linkend='conf-file-step'>Examine Your Local Configuration File</link>"
+                        step earlier for more information on configuring the
+                        build.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Add Your Layer to the Layer Configuration File:</emphasis>
+                    Before you can use a layer during a build, you must add it
+                    to your <filename>bblayers.conf</filename> file, which
+                    is found in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory's</ulink>
+                    <filename>conf</filename> directory.</para>
+
+                    <para>Use the <filename>bitbake-layers add-layer</filename>
+                    command to add the layer to the configuration file:
+                    <literallayout class='monospaced'>
+     $ cd ~/poky/build
+     $ bitbake-layers add-layer ../meta-altera
+     NOTE: Starting bitbake server...
+     Parsing recipes: 100% |##################################################################| Time: 0:00:32
+     Parsing of 918 .bb files complete (0 cached, 918 parsed). 1401 targets, 123 skipped, 0 masked, 0 errors.
+                    </literallayout>
+                    You can find more information on adding layers in the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#adding-a-layer-using-the-bitbake-layers-script'>Adding a Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
+                    section.
+                    </para></listitem>
+            </orderedlist>
+            Completing these steps has added the
+            <filename>meta-altera</filename> layer to your Yocto Project
+            development environment and configured it to build for the
+            "cyclone5" machine.
+            <note>
+                The previous steps are for demonstration purposes only.
+                If you were to attempt to build an image for the
+                "cyclone5" build, you should read the Altera
+                <filename>README</filename>.
+            </note>
+        </para>
+    </section>
+
+    <section id='creating-your-own-general-layer'>
+        <title>Creating Your Own General Layer</title>
+
+        <para>
+            Maybe you have an application or specific set of behaviors you
+            need to isolate.
+            You can create your own general layer using the
+            <filename>bitbake-layers create-layer</filename> command.
+            The tool automates layer creation by setting up a
+            subdirectory with a <filename>layer.conf</filename>
+            configuration file, a <filename>recipes-example</filename>
+            subdirectory that contains an <filename>example.bb</filename>
+            recipe, a licensing file, and a <filename>README</filename>.
+        </para>
+
+        <para>
+            The following commands run the tool to create a layer named
+            <filename>meta-mylayer</filename> in the
+            <filename>poky</filename> directory:
+            <literallayout class='monospaced'>
+     $ cd ~/poky
+     $ bitbake-layers create-layer meta-mylayer
+     NOTE: Starting bitbake server...
+     Add your new layer with 'bitbake-layers add-layer meta-mylayer'
+            </literallayout>
+            For more information on layers and how to create them, see the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
+            section in the Yocto Project Development Tasks Manual.
+        </para>
+    </section>
+
+    <section id='brief-where-to-go-next'>
+        <title>Where To Go Next</title>
+
+        <para>
+            Now that you have experienced using the Yocto Project, you might
+            be asking yourself "What now?"
+            The Yocto Project has many sources of information including
+            the website, wiki pages, and user manuals:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>Website:</emphasis>
+                    The
+                    <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
+                    provides background information, the latest builds,
+                    breaking news, full development documentation, and
+                    access to a rich Yocto Project Development Community
+                    into which you can tap.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Developer Screencast:</emphasis>
+                    The
+                    <ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New Developer Screencast Tutorial</ulink>
+                    provides a 30-minute video created for users unfamiliar
+                    with the Yocto Project but familiar with Linux build
+                    hosts.
+                    While this screencast is somewhat dated, the
+                    introductory and fundamental concepts are useful for
+                    the beginner.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Yocto Project Overview and Concepts Manual:</emphasis>
+                    The
+                    <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>
+                    is a great place to start to learn about the
+                    Yocto Project.
+                    This manual introduces you to the Yocto Project and its
+                    development environment.
+                    The manual also provides conceptual information for
+                    various aspects of the Yocto Project.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Yocto Project Wiki:</emphasis>
+                    The
+                    <ulink url='&YOCTO_WIKI_URL;'>Yocto Project Wiki</ulink>
+                    provides additional information on where to go next
+                    when ramping up with the Yocto Project, release
+                    information, project planning, and QA information.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Yocto Project Mailing Lists:</emphasis>
+                    Related mailing lists provide a forum for discussion,
+                    patch submission and announcements.
+                    Several mailing lists exist and are grouped according
+                    to areas of concern.
+                    See the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>"
+                    section in the Yocto Project Reference Manual for a
+                    complete list of Yocto Project mailing lists.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Comprehensive List of Links and Other Documentation:</emphasis>
+                    The
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
+                    section in the Yocto Project Reference Manual provides a
+                    comprehensive list of all related links and other
+                    user documentation.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</article>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/figures/bypqs-title.png b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/figures/bypqs-title.png
new file mode 100644
index 0000000..9e0a5ce
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/figures/bypqs-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/figures/yocto-project-transp.png b/import-layers/yocto-poky/documentation/brief-yoctoprojectqs/figures/yocto-project-transp.png
similarity index 100%
rename from import-layers/yocto-poky/documentation/yocto-project-qs/figures/yocto-project-transp.png
rename to import-layers/yocto-poky/documentation/brief-yoctoprojectqs/figures/yocto-project-transp.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml b/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml
index 576ed18..7ca4c5d 100644
--- a/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml
+++ b/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml
@@ -117,14 +117,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
         </revhistory>
 
@@ -142,28 +137,40 @@
                <itemizedlist>
                    <listitem><para>
                        This version of the
-                       <emphasis>Yocto Project Board Support Package Developer's Guide</emphasis>
+                       <emphasis>Yocto Project Board Support Package (BSP) Developer's Guide</emphasis>
                        is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
     </legalnotice>
diff --git a/import-layers/yocto-poky/documentation/bsp-guide/bsp-style.css b/import-layers/yocto-poky/documentation/bsp-guide/bsp-style.css
index e407ca4..0c8689b 100644
--- a/import-layers/yocto-poky/documentation/bsp-guide/bsp-style.css
+++ b/import-layers/yocto-poky/documentation/bsp-guide/bsp-style.css
@@ -730,6 +730,9 @@
   border-color: black;
 }
 
+.writernotes {
+  color: red;
+}
 
   /*********** /
  /  graphics  /
diff --git a/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml b/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml
index d7b6f15..00a28b0 100644
--- a/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml
+++ b/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml
@@ -4,371 +4,428 @@
 
 <chapter id='bsp'>
 
-        <title>Board Support Packages (BSP) - Developer's Guide</title>
+<title>Board Support Packages (BSP) - Developer's Guide</title>
 
-        <para>
-            A Board Support Package (BSP) is a collection of information that
-            defines how to support a particular hardware device, set of devices, or
-            hardware platform.
-            The BSP includes information about the hardware features
-            present on the device and kernel configuration information along with any
-            additional hardware drivers required.
-            The BSP also lists any additional software
-            components required in addition to a generic Linux software stack for both
-            essential and optional platform features.
-        </para>
+<para>
+    A Board Support Package (BSP) is a collection of information that
+    defines how to support a particular hardware device, set of devices, or
+    hardware platform.
+    The BSP includes information about the hardware features
+    present on the device and kernel configuration information along with any
+    additional hardware drivers required.
+    The BSP also lists any additional software
+    components required in addition to a generic Linux software stack for both
+    essential and optional platform features.
+</para>
 
-        <para>
-            This guide presents information about BSP Layers, defines a structure for components
-            so that BSPs follow a commonly understood layout, discusses how to customize
-            a recipe for a BSP, addresses BSP licensing, and provides information that
-            shows you how to create and manage a
-            <link linkend='bsp-layers'>BSP Layer</link> using two Yocto Project
-            <link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
-        </para>
+<para>
+    This guide presents information about BSP Layers, defines a structure for components
+    so that BSPs follow a commonly understood layout, discusses how to customize
+    a recipe for a BSP, addresses BSP licensing, and provides information that
+    shows you how to create a
+    <link linkend='bsp-layers'>BSP Layer</link> using the
+    <link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'><filename>bitbake-layers</filename></link>
+    tool.
+</para>
 
-        <section id='bsp-layers'>
-            <title>BSP Layers</title>
+<section id='bsp-layers'>
+    <title>BSP Layers</title>
 
-            <para>
-                A BSP consists of a file structure inside a base directory.
-                Collectively, you can think of the base directory, its file structure,
-                and the contents as a BSP Layer.
-                Although not a strict requirement, layers in the Yocto Project use the
-                following well-established naming convention:
-                <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>
-                </literallayout>
-                The string "meta-" is prepended to the machine or platform name, which is
-                <replaceable>bsp_name</replaceable> in the above form.
-                <note><title>Tip</title>
-                    Because the BSP layer naming convention is well-established,
-                    it is advisable to follow it when creating layers.
-                    Technically speaking, a BSP layer name does not need to
-                    start with <filename>meta-</filename>.
-                    However, you might run into situations where obscure
-                    scripts assume this convention.
-                </note>
-            </para>
+    <para>
+        A BSP consists of a file structure inside a base directory.
+        Collectively, you can think of the base directory, its file structure,
+        and the contents as a BSP Layer.
+        Although not a strict requirement, BSP layers in the Yocto Project
+        use the following well-established naming convention:
+        <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>
+        </literallayout>
+        The string "meta-" is prepended to the machine or platform name, which is
+        <replaceable>bsp_root_name</replaceable> in the above form.
+        <note><title>Tip</title>
+            Because the BSP layer naming convention is well-established,
+            it is advisable to follow it when creating layers.
+            Technically speaking, a BSP layer name does not need to
+            start with <filename>meta-</filename>.
+            However, various scripts and tools in the Yocto Project
+            development environment assume this convention.
+        </note>
+    </para>
 
-            <para>
-                To help understand the BSP layer concept, consider the BSPs that the
-                Yocto Project supports and provides with each release.
-                You can see the layers in the
-                <ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
-                through a web interface at
-                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
-                If you go to that interface, you will find near the bottom of the list
-                under "Yocto Metadata Layers" several BSP layers all of which are
-                supported by the Yocto Project (e.g. <filename>meta-raspberrypi</filename> and
-                <filename>meta-intel</filename>).
-                Each of these layers is a repository unto itself and clicking on a
-                layer reveals information that includes two links from which you can choose
-                to set up a clone of the layer's repository on your local host system.
-                Here is an example that clones the Raspberry Pi BSP layer:
-                <literallayout class='monospaced'>
+    <para>
+        To help understand the BSP layer concept, consider the BSPs that the
+        Yocto Project supports and provides with each release.
+        You can see the layers in the
+        <ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
+        through a web interface at
+        <ulink url='&YOCTO_GIT_URL;'></ulink>.
+        If you go to that interface, you will find a list of repositories
+        under "Yocto Metadata Layers".
+        <note>
+            Layers that are no longer actively supported as part of the
+            Yocto Project appear under the heading "Yocto Metadata Layer
+            Archive."
+        </note>
+        Each repository is a BSP layer supported by the Yocto Project
+        (e.g. <filename>meta-raspberrypi</filename> and
+        <filename>meta-intel</filename>).
+        Each of these layers is a repository unto itself and clicking on a
+        layer reveals information that includes two links from which you can choose
+        to set up a clone of the layer's repository on your local host system.
+        Here is an example that clones the Raspberry Pi BSP layer:
+        <literallayout class='monospaced'>
      $ git clone git://git.yoctoproject.org/meta-raspberrypi
-                </literallayout>
-            </para>
+        </literallayout>
+    </para>
 
-            <para>
-                In addition to BSP layers near the bottom of that referenced
-                Yocto Project Source Repository, the
-                <filename>meta-yocto-bsp</filename> layer is part of the
-                shipped <filename>poky</filename> repository.
-                The <filename>meta-yocto-bsp</filename> layer maintains several
-                BSPs such as the Beaglebone, EdgeRouter, and generic versions of
-                both 32 and 64-bit IA machines.
-            </para>
+    <para>
+        In addition to BSP layers, the
+        <filename>meta-yocto-bsp</filename> layer is part of the
+        shipped <filename>poky</filename> repository.
+        The <filename>meta-yocto-bsp</filename> layer maintains several
+        BSPs such as the Beaglebone, EdgeRouter, and generic versions of
+        both 32-bit and 64-bit IA machines.
+    </para>
 
-            <para>
-                For information on the BSP development workflow, see the
-                "<link linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</link>"
-                section.
-                For more information on how to set up a local copy of source files
-                from a Git repository, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
-                section also in the Yocto Project Development Tasks Manual.
-            </para>
+    <para>
+        For information on the BSP development workflow, see the
+        "<link linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</link>"
+        section.
+        For more information on how to set up a local copy of source files
+        from a Git repository, see the
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
+        section in the Yocto Project Development Tasks Manual.
+    </para>
 
-            <para>
-                The layer's base directory
-                (<filename>meta-<replaceable>bsp_name</replaceable></filename>)
-                is the root of the BSP Layer.
-                This root is what you add to the
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
-                variable in the <filename>conf/bblayers.conf</filename> file found in the
-                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
-                which is established after you run the OpenEmbedded build environment
-                setup script (i.e.
-                <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>).
-                Adding the root allows the OpenEmbedded build system to recognize the BSP
-                definition and from it build an image.
-                Here is an example:
-                <literallayout class='monospaced'>
+    <para>
+        The layer's base directory
+        (<filename>meta-<replaceable>bsp_root_name</replaceable></filename>)
+        is the root directory of the BSP Layer.
+        This directory is what you add to the
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
+        variable in the <filename>conf/bblayers.conf</filename> file found in the
+        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+        which is established after you run the OpenEmbedded build environment
+        setup script (i.e.
+        <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>).
+        Adding the root directory allows the
+        <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+        to recognize the BSP layer and from it build an image.
+        Here is an example:
+        <literallayout class='monospaced'>
      BBLAYERS ?= " \
        /usr/local/src/yocto/meta \
        /usr/local/src/yocto/meta-poky \
        /usr/local/src/yocto/meta-yocto-bsp \
        /usr/local/src/yocto/meta-mylayer \
        "
-                </literallayout>
-            </para>
+        </literallayout>
+        <note><title>Tip</title>
+            Ordering and
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
+            for the layers listed in <filename>BBLAYERS</filename>
+            matter.
+            For example, if multiple layers define a machine
+            configuration, the OpenEmbedded build system uses
+            the last layer searched given similar layer
+            priorities.
+            The build system works from the top-down through
+            the layers listed in <filename>BBLAYERS</filename>.
+        </note>
+    </para>
 
-            <para>
-                Some BSPs require additional layers on
-                top of the BSP's root layer in order to be functional.
-                For these cases, you also need to add those layers to the
-                <filename>BBLAYERS</filename> variable in order to build the BSP.
-                You must also specify in the "Dependencies" section of the BSP's
-                <filename>README</filename> file any requirements for additional
-                layers and, preferably, any
-                build instructions that might be contained elsewhere
-                in the <filename>README</filename> file.
-            </para>
+    <para>
+        Some BSPs require or depend on additional layers
+        beyond the BSP's root layer in order to be functional.
+        In this case, you need to specify these layers in the
+        <filename>README</filename> "Dependencies" section of the
+        BSP's root layer.
+        Additionally, if any build instructions exist for the
+        BSP, you must add them to the "Dependencies" section.
+    </para>
 
-            <para>
-                Some layers function as a layer to hold other BSP layers.
-                An example of this type of layer is the <filename>meta-intel</filename> layer,
-                which contains a number of individual BSP sub-layers, as well as a directory
-                named <filename>common/</filename> full of common content across those layers.
-                Another example is the <filename>meta-yocto-bsp</filename> layer mentioned
-                earlier.
-            </para>
+    <para>
+        Some layers function as a layer to hold other BSP layers.
+        These layers are knows as
+        "<ulink url='&YOCTO_DOCS_REF_URL;#term-container-layer'>container layers</ulink>".
+        An example of this type of layer is the
+        <filename>meta-intel</filename> layer.
+        This layer contains BSP layers for the Intel-core2-32
+        <trademark class='registered'>Intel</trademark> Common Core
+        (Intel-core2-32) and the Intel-corei7-64
+        <trademark class='registered'>Intel</trademark> Common Core
+        (Intel-corei7-64).
+        the <filename>meta-intel</filename> layer also contains
+        the <filename>common/</filename> directory, which contains
+        common content across those layers.
+    </para>
 
-            <para>
-                For more detailed information on layers, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
-                section of the Yocto Project Development Tasks Manual.
-            </para>
-        </section>
+    <para>
+        For more information on layers, see the
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+        section of the Yocto Project Development Tasks Manual.
+    </para>
+</section>
 
-        <section id='preparing-your-build-host-to-work-with-bsp-layers'>
-            <title>Preparing Your Build Host to Work With BSP Layers</title>
+<section id='preparing-your-build-host-to-work-with-bsp-layers'>
+    <title>Preparing Your Build Host to Work With BSP Layers</title>
 
-            <para>
-                This section describes how to get your build host ready
-                to work with BSP layers.
-                Once you have the host set up, you can create the layer
-                as described in the
-                "<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a new BSP Layer Using the yocto-bsp Script</link>"
-                section.
-                <note>
-                    For structural information on BSPs, see the
-                    <link linkend='bsp-filelayout'>Example Filesystem Layout</link>
-                    section.
-                </note>
+    <para>
+        This section describes how to get your build host ready
+        to work with BSP layers.
+        Once you have the host set up, you can create the layer
+        as described in the
+        "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a new BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
+        section.
+        <note>
+            For structural information on BSPs, see the
+            <link linkend='bsp-filelayout'>Example Filesystem Layout</link>
+            section.
+        </note>
+        <orderedlist>
+            <listitem><para>
+                <emphasis>Set Up the Build Environment:</emphasis>
+                Be sure you are set up to use BitBake in a shell.
+                See the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Preparing the Build Host</ulink>"
+                section in the Yocto Project Development Tasks Manual for information
+                on how to get a build host ready that is either a native
+                Linux machine or a machine that uses CROPS.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Clone the <filename>poky</filename> Repository:</emphasis>
+                You need to have a local copy of the Yocto Project
+                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                (i.e. a local <filename>poky</filename> repository).
+                See the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
+                and possibly the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
+                or
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
+                sections all in the Yocto Project Development Tasks Manual for
+                information on how to clone the <filename>poky</filename>
+                repository and check out the appropriate branch for your work.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Determine the BSP Layer You Want:</emphasis>
+                The Yocto Project supports many BSPs, which are maintained in
+                their own layers or in layers designed to contain several
+                BSPs.
+                To get an idea of machine support through BSP layers, you can
+                look at the
+                <ulink url='&YOCTO_RELEASE_DL_URL;/machines'>index of machines</ulink>
+                for the release.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Optionally Clone the
+                <filename>meta-intel</filename> BSP Layer:</emphasis>
+                If your hardware is based on current Intel CPUs and devices,
+                you can leverage this BSP layer.
+                For details on the <filename>meta-intel</filename> BSP layer,
+                see the layer's
+                <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/tree/README'><filename>README</filename></ulink>
+                file.
                 <orderedlist>
                     <listitem><para>
-                        <emphasis>Set Up the Build Environment:</emphasis>
-                        Be sure you are set up to use BitBake in a shell.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up the Development Host to Use the Yocto Project</ulink>"
-                        section in the Yocto Project Development Tasks Manual for information
-                        on how to get a build host ready that is either a native
-                        Linux machine or a machine that uses CROPS.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Clone the <filename>poky</filename> Repository:</emphasis>
-                        You need to have a local copy of the Yocto Project
+                        <emphasis>Navigate to Your Source Directory:</emphasis>
+                        Typically, you set up the
+                        <filename>meta-intel</filename> Git repository
+                        inside the
                         <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                        (i.e. a local <filename>poky</filename> repository).
-                        See the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
-                        and possibly the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
-                        and
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
-                        sections all in the Yocto Project Development Tasks Manual for
-                        information on how to clone the <filename>poky</filename>
-                        repository and check out the appropriate branch for your work.
+                        (e.g. <filename>poky</filename>).
+                        <literallayout class='monospaced'>
+     $ cd /home/<replaceable>you</replaceable>/poky
+                        </literallayout>
                         </para></listitem>
                     <listitem><para>
-                        <emphasis>Determine the BSP Layer You Want:</emphasis>
-                        The Yocto Project supports many BSPs, which are maintained in
-                        their own layers or in layers designed to contain several
-                        BSPs.
-                        To get an idea of machine support through BSP layers, you can
-                        look at the
-                        <ulink url='&YOCTO_RELEASE_DL_URL;/machines'>index of machines</ulink>
-                        for the release.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Optionally Clone the
-                        <filename>meta-intel</filename> BSP Layer:</emphasis>
-                        If your hardware is based on current Intel CPUs and devices,
-                        you can leverage this BSP layer.
-                        For details on the <filename>meta-intel</filename> BSP layer,
-                        see the layer's
-                        <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/tree/README'><filename>README</filename></ulink>
-                        file.
-                        <orderedlist>
-                            <listitem><para>
-                                <emphasis>Navigate to Your Source Directory:</emphasis>
-                                Typically, you set up the
-                                <filename>meta-intel</filename> Git repository
-                                inside the
-                                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                                (e.g. <filename>poky</filename>).
-                                </para></listitem>
-                            <listitem><para>
-                                <emphasis>Clone the Layer:</emphasis>
-                                <literallayout class='monospaced'>
+                        <emphasis>Clone the Layer:</emphasis>
+                        <literallayout class='monospaced'>
      $ git clone git://git.yoctoproject.org/meta-intel.git
      Cloning into 'meta-intel'...
-     remote: Counting objects: 14224, done.
-     remote: Compressing objects: 100% (4591/4591), done.
-     remote: Total 14224 (delta 8245), reused 13985 (delta 8006)
-     Receiving objects: 100% (14224/14224), 4.29 MiB | 2.90 MiB/s, done.
-     Resolving deltas: 100% (8245/8245), done.
-     Checking connectivity... done.
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>
-                                <emphasis>Check Out the Proper Branch:</emphasis>
-                                The branch you check out for
-                                <filename>meta-intel</filename> must match the same
-                                branch you are using for the Yocto Project release
-                                (e.g. &DISTRO_NAME_NO_CAP;):
-                                <literallayout class='monospaced'>
-     $ git checkout <replaceable>branch_name</replaceable>
-                                </literallayout>
-                                For an example on how to discover branch names and
-                                checkout on a branch, see the
-                                "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</ulink>"
-                                section in the Yocto Project Development Tasks Manual.
-                                </para></listitem>
-                        </orderedlist>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Optionally Set Up an Alternative BSP Layer:</emphasis>
-                        If your hardware can be more closely leveraged to an
-                        existing BSP not within the <filename>meta-intel</filename>
-                        BSP layer, you can clone that BSP layer.</para>
-
-                        <para>The process is identical to the process used for the
-                        <filename>meta-intel</filename> layer except for the layer's
-                        name.
-                        For example, if you determine that your hardware most
-                        closely matches the <filename>meta-minnow</filename>,
-                        clone that layer:
-                        <literallayout class='monospaced'>
-     $ git clone git://git.yoctoproject.org/meta-minnow
-     Cloning into 'meta-minnow'...
-     remote: Counting objects: 456, done.
-     remote: Compressing objects: 100% (283/283), done.
-     remote: Total 456 (delta 163), reused 384 (delta 91)
-     Receiving objects: 100% (456/456), 96.74 KiB | 0 bytes/s, done.
-     Resolving deltas: 100% (163/163), done.
+     remote: Counting objects: 15585, done.
+     remote: Compressing objects: 100% (5056/5056), done.
+     remote: Total 15585 (delta 9123), reused 15329 (delta 8867)
+     Receiving objects: 100% (15585/15585), 4.51 MiB | 3.19 MiB/s, done.
+     Resolving deltas: 100% (9123/9123), done.
      Checking connectivity... done.
                         </literallayout>
                         </para></listitem>
                     <listitem><para>
-                        <emphasis>Initialize the Build Environment:</emphasis>
-                        While in the root directory of the Source Directory (i.e.
-                        <filename>poky</filename>), run the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
-                        environment setup script to define the OpenEmbedded
-                        build environment on your build host.
+                        <emphasis>Check Out the Proper Branch:</emphasis>
+                        The branch you check out for
+                        <filename>meta-intel</filename> must match the same
+                        branch you are using for the Yocto Project release
+                        (e.g. &DISTRO_NAME_NO_CAP;):
                         <literallayout class='monospaced'>
-     $ source &OE_INIT_FILE;
+     $ cd meta-intel
+     $ git checkout -b &DISTRO_NAME_NO_CAP; remotes/origin/&DISTRO_NAME_NO_CAP;
+     Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
+     Switched to a new branch '&DISTRO_NAME_NO_CAP;'
                         </literallayout>
-                        Among other things, the script creates the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
-                        which is <filename>build</filename> in this case
-                        and is located in the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
-                        After the script runs, your current working directory
-                        is set to the <filename>build</filename> directory.
+                        <note>
+                            To see the available branch names in a cloned repository,
+                            use the <filename>git branch -al</filename> command.
+                            See the
+                            "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</ulink>"
+                            section in the Yocto Project Development Tasks
+                            Manual for more information.
+                        </note>
                         </para></listitem>
                 </orderedlist>
-            </para>
-        </section>
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Optionally Set Up an Alternative BSP Layer:</emphasis>
+                If your hardware can be more closely leveraged to an
+                existing BSP not within the <filename>meta-intel</filename>
+                BSP layer, you can clone that BSP layer.</para>
 
-        <section id="bsp-filelayout">
-            <title>Example Filesystem Layout</title>
-
-            <para>
-                Defining a common BSP directory structure allows end-users to understand and
-                become familiar with that structure.
-                A common format also encourages standardization of software support of hardware.
-            </para>
-
-            <para>
-                The proposed form does have elements that are specific to the
-                OpenEmbedded build system.
-                It is intended that this information can be
-                used by other build systems besides the OpenEmbedded build system
-                and that it will be simple
-                to extract information and convert it to other formats if required.
-                The OpenEmbedded build system, through its standard layers mechanism, can directly
-                accept the format described as a layer.
-                The BSP captures all
-                the hardware-specific details in one place in a standard format, which is
-                useful for any person wishing to use the hardware platform regardless of
-                the build system they are using.
-            </para>
-
-            <para>
-                The BSP specification does not include a build system or other tools -
-                it is concerned with the hardware-specific components only.
-                At the end-distribution point, you can ship the BSP combined with a build system
-                and other tools.
-                However, it is important to maintain the distinction that these
-                are separate components that happen to be combined in certain end products.
-            </para>
-
-            <para>
-                Before looking at the common form for the file structure inside a BSP Layer,
-                you should be aware that some requirements do exist in order for a BSP to
-                be considered compliant with the Yocto Project.
-                For that list of requirements, see the
-                "<link linkend='released-bsp-requirements'>Released BSP Requirements</link>"
-                section.
-            </para>
-
-            <para>
-                Below is the common form for the file structure inside a BSP Layer.
-                While you can use this basic form for the standard, realize that the actual structures
-                for specific BSPs could differ.
-
+                <para>The process is identical to the process used for the
+                <filename>meta-intel</filename> layer except for the layer's
+                name.
+                For example, if you determine that your hardware most
+                closely matches the <filename>meta-raspberrypi</filename>,
+                clone that layer:
                 <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/
-     meta-<replaceable>bsp_name</replaceable>/<replaceable>bsp_license_file</replaceable>
-     meta-<replaceable>bsp_name</replaceable>/README
-     meta-<replaceable>bsp_name</replaceable>/README.sources
-     meta-<replaceable>bsp_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
-     meta-<replaceable>bsp_name</replaceable>/conf/layer.conf
-     meta-<replaceable>bsp_name</replaceable>/conf/machine/*.conf
-     meta-<replaceable>bsp_name</replaceable>/recipes-bsp/*
-     meta-<replaceable>bsp_name</replaceable>/recipes-core/*
-     meta-<replaceable>bsp_name</replaceable>/recipes-graphics/*
-     meta-<replaceable>bsp_name</replaceable>/recipes-kernel/linux/linux-yocto_<replaceable>kernel_rev</replaceable>.bbappend
+     $ git clone git://git.yoctoproject.org/meta-raspberrypi
+     Cloning into 'meta-raspberrypi'...
+     remote: Counting objects: 4743, done.
+     remote: Compressing objects: 100% (2185/2185), done.
+     remote: Total 4743 (delta 2447), reused 4496 (delta 2258)
+     Receiving objects: 100% (4743/4743), 1.18 MiB | 0 bytes/s, done.
+     Resolving deltas: 100% (2447/2447), done.
+     Checking connectivity... done.
                 </literallayout>
-            </para>
-
-            <para>
-                Below is an example of the Raspberry Pi BSP:
-
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Initialize the Build Environment:</emphasis>
+                While in the root directory of the Source Directory (i.e.
+                <filename>poky</filename>), run the
+                <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+                environment setup script to define the OpenEmbedded
+                build environment on your build host.
                 <literallayout class='monospaced'>
+     $ source &OE_INIT_FILE;
+                </literallayout>
+                Among other things, the script creates the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+                which is <filename>build</filename> in this case
+                and is located in the
+                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+                After the script runs, your current working directory
+                is set to the <filename>build</filename> directory.
+                </para></listitem>
+        </orderedlist>
+    </para>
+</section>
+
+<section id="bsp-filelayout">
+    <title>Example Filesystem Layout</title>
+
+    <para>
+        Defining a common BSP directory structure allows
+        end-users to understand and become familiar with
+        that standard.
+        A common format also encourages standardization
+        of software support for hardware.
+    </para>
+
+    <para>
+        The proposed form described in this section does
+        have elements that are specific to the OpenEmbedded
+        build system.
+        It is intended that developers can use this structure
+        with other build systems besides the OpenEmbedded build
+        system.
+        It is also intended that it will be be simple to extract
+        information and convert it to other formats if required.
+        The OpenEmbedded build system, through its standard
+        <ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>layers mechanism</ulink>,
+        can directly accept the format described as a layer.
+        The BSP layer captures all the hardware-specific details
+        in one place using a standard format, which is useful
+        for any person wishing to use the hardware platform
+        regardless of the build system they are using.
+    </para>
+
+    <para>
+        The BSP specification does not include a build system
+        or other tools - the specification is concerned with
+        the hardware-specific components only.
+        At the end-distribution point, you can ship the BSP
+        layer combined with a build system and other tools.
+        Realize that it is important to maintain the distinction
+        that the BSP layer, a build system, and tools are
+        separate components that could to be combined in
+        certain end products.
+    </para>
+
+    <para>
+        Before looking at the common form for the file structure
+        inside a BSP Layer, you should be aware that some
+        requirements do exist in order for a BSP layer to
+        be considered compliant with the Yocto Project.
+        For that list of requirements, see the
+        "<link linkend='released-bsp-requirements'>Released BSP Requirements</link>"
+        section.
+    </para>
+
+    <para>
+        Below is the common form for the file structure
+        inside a BSP Layer.
+        While this basic form represents the standard,
+        realize that the actual file structures for specific
+        BSPs could differ.
+        <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/
+     meta-<replaceable>bsp_root_name</replaceable>/<replaceable>bsp_license_file</replaceable>
+     meta-<replaceable>bsp_root_name</replaceable>/README
+     meta-<replaceable>bsp_root_name</replaceable>/README.sources
+     meta-<replaceable>bsp_root_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
+     meta-<replaceable>bsp_root_name</replaceable>/conf/layer.conf
+     meta-<replaceable>bsp_root_name</replaceable>/conf/machine/*.conf
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-bsp/*
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-core/*
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-graphics/*
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux/linux-yocto_<replaceable>kernel_rev</replaceable>.bbappend
+        </literallayout>
+    </para>
+
+    <para>
+        Below is an example of the Raspberry Pi BSP
+        layer that is available from the
+        <ulink url='&YOCTO_GIT_URL;'>Source Respositories</ulink>:
+        <literallayout class='monospaced'>
      meta-raspberrypi/COPYING.MIT
-     meta-raspberrypi/README
+     meta-raspberrypi/README.md
      meta-raspberrypi/classes
-     meta-raspberrypi/classes/linux-raspberrypi-base.bbclass
      meta-raspberrypi/classes/sdcard_image-rpi.bbclass
      meta-raspberrypi/conf/
      meta-raspberrypi/conf/layer.conf
      meta-raspberrypi/conf/machine/
+     meta-raspberrypi/conf/machine/raspberrypi-cm.conf
+     meta-raspberrypi/conf/machine/raspberrypi-cm3.conf
      meta-raspberrypi/conf/machine/raspberrypi.conf
+     meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf
      meta-raspberrypi/conf/machine/raspberrypi0.conf
      meta-raspberrypi/conf/machine/raspberrypi2.conf
+     meta-raspberrypi/conf/machine/raspberrypi3-64.conf
      meta-raspberrypi/conf/machine/raspberrypi3.conf
      meta-raspberrypi/conf/machine/include
      meta-raspberrypi/conf/machine/include/rpi-base.inc
      meta-raspberrypi/conf/machine/include/rpi-default-providers.inc
      meta-raspberrypi/conf/machine/include/rpi-default-settings.inc
      meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
-     meta-raspberrypi/conf/machine/include/rpi-tune-arm1176jzf-s.inc
+     meta-raspberrypi/conf/machine/include/tune-arm1176jzf-s.inc
+     meta-raspberrypi/docs
+     meta-raspberrypi/docs/Makefile
+     meta-raspberrypi/docs/conf.py
+     meta-raspberrypi/docs/contributing.md
+     meta-raspberrypi/docs/extra-apps.md
+     meta-raspberrypi/docs/extra-build-config.md
+     meta-raspberrypi/docs/index.rst
+     meta-raspberrypi/docs/layer-contents.md
+     meta-raspberrypi/docs/readme.md
      meta-raspberrypi/files
      meta-raspberrypi/files/custom-licenses
      meta-raspberrypi/files/custom-licenses/Broadcom
@@ -378,12 +435,26 @@
      meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
      meta-raspberrypi/recipes-bsp/common
      meta-raspberrypi/recipes-bsp/common/firmware.inc
-     meta-raspberrypi/recipes-bsp/formfactor_00.bbappend
-     meta-raspberrypi/recipes-bsp/formfactor/raspberrypi/machconfig
-     meta-raspberrypi/recipes-bsp/rpi-mkimage_git.bb
-     meta-raspberrypi/recipes-bsp/rpi-mkimage/License
-     meta-raspberrypi/recipes-bsp/rpi-mkimage/open-files-relative-to-script.patch
-     meta-raspberrypi/recipes-bsp/u-boot/u-boot-rpi_git.bb
+     meta-raspberrypi/recipes-bsp/formfactor
+     meta-raspberrypi/recipes-bsp/formfactor/formfactor
+     meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi
+     meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig
+     meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend
+     meta-raspberrypi/recipes-bsp/rpi-u-boot-src
+     meta-raspberrypi/recipes-bsp/rpi-u-boot-src/files
+     meta-raspberrypi/recipes-bsp/rpi-u-boot-src/files/boot.cmd.in
+     meta-raspberrypi/recipes-bsp/rpi-u-boot-src/rpi-u-boot-scr.bb
+     meta-raspberrypi/recipes-bsp/u-boot
+     meta-raspberrypi/recipes-bsp/u-boot/u-boot
+     meta-raspberrypi/recipes-bsp/u-boot/u-boot/*.patch
+     meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
+     meta-raspberrypi/recipes-connectivity
+     meta-raspberrypi/recipes-connectivity/bluez5
+     meta-raspberrypi/recipes-connectivity/bluez5/bluez5
+     meta-raspberrypi/recipes-connectivity/bluez5/bluez5/*.patch
+     meta-raspberrypi/recipes-connectivity/bluez5/bluez5/BCM43430A1.hcd
+     meta-raspberrypi/recipes-connectivity/bluez5/bluez5brcm43438.service
+     meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend
      meta-raspberrypi/recipes-core
      meta-raspberrypi/recipes-core/images
      meta-raspberrypi/recipes-core/images/rpi-basic-image.bb
@@ -393,37 +464,41 @@
      meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb
      meta-raspberrypi/recipes-core/psplash
      meta-raspberrypi/recipes-core/psplash/files
-     meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend
      meta-raspberrypi/recipes-core/psplash/files/psplash-raspberrypi-img.h
+     meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend
+     meta-raspberrypi/recipes-core/udev
+     meta-raspberrypi/recipes-core/udev/udev-rules-rpi
+     meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules
+     meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
      meta-raspberrypi/recipes-devtools
      meta-raspberrypi/recipes-devtools/bcm2835
-     meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.46.bb
+     meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.52.bb
      meta-raspberrypi/recipes-devtools/pi-blaster
      meta-raspberrypi/recipes-devtools/pi-blaster/files
-     meta-raspberrypi/recipes-devtools/pi-blaster/*.patch
-     meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc
+     meta-raspberrypi/recipes-devtools/pi-blaster/files/*.patch
      meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb
      meta-raspberrypi/recipes-devtools/python
      meta-raspberrypi/recipes-devtools/python/python-rtimu
      meta-raspberrypi/recipes-devtools/python/python-rtimu/*.patch
      meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb
-     meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.1.0.bb
+     meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb
      meta-raspberrypi/recipes-devtools/python/rpi-gpio
      meta-raspberrypi/recipes-devtools/python/rpi-gpio/*.patch
-     meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.1.bb
+     meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.3.bb
      meta-raspberrypi/recipes-devtools/python/rpio
      meta-raspberrypi/recipes-devtools/python/rpio/*.patch
      meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb
      meta-raspberrypi/recipes-devtools/wiringPi
      meta-raspberrypi/recipes-devtools/wiringPi/files
      meta-raspberrypi/recipes-devtools/wiringPi/files/*.patch
-     meta-raspberrypi/recipes-devtools/wiringPi/wiringpi
-     meta-raspberrypi/recipes-devtools/wiringPi/wiringpi/*.patch
      meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb
      meta-raspberrypi/recipes-graphics
      meta-raspberrypi/recipes-graphics/eglinfo
      meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
      meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
+     meta-raspberrypi/recipes-graphics/mesa
+     meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend
+     meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend
      meta-raspberrypi/recipes-graphics/userland
      meta-raspberrypi/recipes-graphics/userland/userland
      meta-raspberrypi/recipes-graphics/userland/userland/*.patch
@@ -437,194 +512,204 @@
      meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc
      meta-raspberrypi/recipes-graphics/wayland
      meta-raspberrypi/recipes-graphics/wayland/weston_%.bbappend
-     meta-raspberrypi/recipes-graphics/weston
-     meta-raspberrypi/recipes-graphics/weston/weston_%.bbappend
      meta-raspberrypi/recipes-graphics/xorg-xserver
      meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config
      meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi
      meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf
      meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d
      meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/10-evdev.conf
-     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf
      meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
      meta-raspberrypi/recipes-kernel
      meta-raspberrypi/recipes-kernel/linux-firmware
-     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware
-     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware/LICENSE.broadcom_brcm80211
-     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.bin
-     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt
-     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
+     meta-raspberrypi/recipes-kernel/linux-firmware/files
+     meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin
+     meta-raspberrypi/recipes-kernel/linux-firmware/files/brcfmac43430-sdio.txt
+     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
      meta-raspberrypi/recipes-kernel/linux
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.14
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.14/*.patch
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.18
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.18/*.patch
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-4.1
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-4.1/*.patch
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb
      meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/defconfig
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_3.14.bb
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_3.18.bb
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.1.bb
-     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.4.bb
-     meta-raspberrypi/recipes-kernel/linux/linux.inc
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb
      meta-raspberrypi/recipes-multimedia
      meta-raspberrypi/recipes-multimedia/gstreamer
      meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx
      meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/*.patch
      meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
      meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
+     meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12
+     meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/*.patch
      meta-raspberrypi/recipes-multimedia/omxplayer
      meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer
      meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/*.patch
      meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
-     meta-raspberrypi/scripts
-     meta-raspberrypi/scripts/lib
-     meta-raspberrypi/scripts/lib/image
-     meta-raspberrypi/scripts/lib/image/canned-wks
-     meta-raspberrypi/scripts/lib/image/canned-wks/sdimage-raspberrypi.wks
-                </literallayout>
-            </para>
+     meta-raspberrypi/recipes-multimedia/x264
+     meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend
+     meta-raspberrypi/wic
+     meta-raspberrypi/wic/sdimage-raspberrypi.wks
+        </literallayout>
+    </para>
 
-            <para>
-                The following sections describe each part of the proposed BSP format.
-            </para>
+    <para>
+        The following sections describe each part of the proposed
+        BSP format.
+    </para>
 
-            <section id="bsp-filelayout-license">
-                <title>License Files</title>
+    <section id="bsp-filelayout-license">
+        <title>License Files</title>
 
-                <para>
-                    You can find these files in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/<replaceable>bsp_license_file</replaceable>
-                    </literallayout>
-                </para>
+        <para>
+            You can find these files in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/<replaceable>bsp_license_file</replaceable>
+            </literallayout>
+        </para>
 
-                <para>
-                    These optional files satisfy licensing requirements for the BSP.
-                    The type or types of files here can vary depending on the licensing requirements.
-                    For example, in the Raspberry Pi BSP all licensing requirements are handled with the
-                    <filename>COPYING.MIT</filename> file.
-                </para>
+        <para>
+            These optional files satisfy licensing requirements
+            for the BSP.
+            The type or types of files here can vary depending
+            on the licensing requirements.
+            For example, in the Raspberry Pi BSP all licensing
+            requirements are handled with the
+            <filename>COPYING.MIT</filename> file.
+        </para>
 
-                <para>
-                    Licensing files can be MIT, BSD, GPLv*, and so forth.
-                    These files are recommended for the BSP but are optional and totally up to the BSP developer.
-                </para>
-            </section>
+        <para>
+            Licensing files can be MIT, BSD, GPLv*, and so forth.
+            These files are recommended for the BSP but are
+            optional and totally up to the BSP developer.
+            For information on how to maintain license
+            compliance, see the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
+            section in the Yocto Project Development Tasks
+            Manual.
+        </para>
+    </section>
 
-            <section id="bsp-filelayout-readme">
-                <title>README File</title>
+    <section id="bsp-filelayout-readme">
+        <title>README File</title>
 
-                <para>
-                    You can find this file in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/README
-                    </literallayout>
-                </para>
+        <para>
+            You can find this file in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/README
+            </literallayout>
+        </para>
 
-                <para>
-                    This file provides information on how to boot the live images that are optionally
-                    included in the <filename>binary/</filename> directory.
-                    The <filename>README</filename> file also provides special information needed for
-                    building the image.
-                </para>
+        <para>
+            This file provides information on how to boot the live
+            images that are optionally included in the
+            <filename>binary/</filename> directory.
+            The <filename>README</filename> file also provides
+            information needed for building the image.
+        </para>
 
-                <para>
-                    At a minimum, the <filename>README</filename> file must
-                    contain a list of dependencies, such as the names of
-                    any other layers on which the BSP depends and the name of
-                    the BSP maintainer with his or her contact information.
-                </para>
-            </section>
+        <para>
+            At a minimum, the <filename>README</filename> file must
+            contain a list of dependencies, such as the names of
+            any other layers on which the BSP depends and the name of
+            the BSP maintainer with his or her contact information.
+        </para>
+    </section>
 
-            <section id="bsp-filelayout-readme-sources">
-                <title>README.sources File</title>
+    <section id="bsp-filelayout-readme-sources">
+        <title>README.sources File</title>
 
-                <para>
-                    You can find this file in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/README.sources
-                    </literallayout>
-                </para>
+        <para>
+            You can find this file in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/README.sources
+            </literallayout>
+        </para>
 
-                <para>
-                    This file provides information on where to locate the BSP
-                    source files used to build the images (if any) that reside in
-                    <filename>meta-<replaceable>bsp_name</replaceable>/binary</filename>.
-                    Images in the <filename>binary</filename> would be images
-                    released with the BSP.
-                    The information in the <filename>README.sources</filename>
-                    file also helps you find the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
-                    used to generate the images that ship with the BSP.
-                    <note>
-                        If the BSP's <filename>binary</filename> directory is
-                        missing or the directory has no images, an existing
-                        <filename>README.sources</filename> file is
-                        meaningless.
-                    </note>
-                </para>
-            </section>
+        <para>
+            This file provides information on where to locate the BSP
+            source files used to build the images (if any) that
+            reside in
+            <filename>meta-<replaceable>bsp_root_name</replaceable>/binary</filename>.
+            Images in the <filename>binary</filename> would be images
+            released with the BSP.
+            The information in the <filename>README.sources</filename>
+            file also helps you find the
+            <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
+            used to generate the images that ship with the BSP.
+            <note>
+                If the BSP's <filename>binary</filename> directory is
+                missing or the directory has no images, an existing
+                <filename>README.sources</filename> file is
+                meaningless and usually does not exist.
+            </note>
+        </para>
+    </section>
 
-            <section id="bsp-filelayout-binary">
-                <title>Pre-built User Binaries</title>
+    <section id="bsp-filelayout-binary">
+        <title>Pre-built User Binaries</title>
 
-                <para>
-                    You can find these files in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
-                    </literallayout>
-                </para>
+        <para>
+            You can find these files in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
+            </literallayout>
+        </para>
 
-                <para>
-                    This optional area contains useful pre-built kernels and
-                    user-space filesystem images released with the BSP that are
-                    appropriate to the target system.
-                    This directory typically contains graphical (e.g. Sato) and
-                    minimal live images when the BSP tarball has been created and
-                    made available in the
-                    <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
-                    You can use these kernels and images to get a system running
-                    and quickly get started on development tasks.
-                </para>
+        <para>
+            This optional area contains useful pre-built kernels
+            and user-space filesystem images released with the
+            BSP that are appropriate to the target system.
+            This directory typically contains graphical (e.g. Sato)
+            and minimal live images when the BSP tarball has been
+            created and made available in the
+            <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink>
+            website.
+            You can use these kernels and images to get a system
+            running and quickly get started on development tasks.
+        </para>
 
-                <para>
-                    The exact types of binaries present are highly
-                    hardware-dependent.
-                    The <filename>README</filename> file should be present in the
-                    BSP Layer and it will explain how to use the images with the
-                    target hardware.
-                    Additionally, the <filename>README.sources</filename> file
-                    should be present to locate the sources used to build the
-                    images and provide information on the Metadata.
-                </para>
-            </section>
+        <para>
+            The exact types of binaries present are highly
+            hardware-dependent.
+            The
+            <link linkend='bsp-filelayout-readme'><filename>README</filename></link>
+            file should be present in the BSP Layer and it
+            explains how to use the images with the target hardware.
+            Additionally, the
+            <link linkend='bsp-filelayout-readme-sources'><filename>README.sources</filename></link>
+            file should be present to locate the sources used to
+            build the images and provide information on the
+            Metadata.
+        </para>
+    </section>
 
-            <section id='bsp-filelayout-layer'>
-                <title>Layer Configuration File</title>
+    <section id='bsp-filelayout-layer'>
+        <title>Layer Configuration File</title>
 
-                <para>
-                    You can find this file in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/conf/layer.conf
-                    </literallayout>
-                </para>
+        <para>
+            You can find this file in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/conf/layer.conf
+            </literallayout>
+        </para>
 
-                <para>
-                    The <filename>conf/layer.conf</filename> file identifies the file structure as a
-                    layer, identifies the
-                    contents of the layer, and contains information about how the build
-                    system should use it.
-                    Generally, a standard boilerplate file such as the following works.
-                    In the following example, you would replace "<replaceable>bsp</replaceable>" and
-                    "<replaceable>_bsp</replaceable>" with the actual name
-                    of the BSP (i.e. <replaceable>bsp_name</replaceable> from the example template).
-                </para>
+        <para>
+            The <filename>conf/layer.conf</filename> file
+            identifies the file structure as a layer,
+            identifies the contents of the layer, and
+            contains information about how the build system should
+            use it.
+            Generally, a standard boilerplate file such as the
+            following works.
+            In the following example, you would replace
+            <replaceable>bsp</replaceable> with the actual
+            name of the BSP (i.e.
+            <replaceable>bsp_root_name</replaceable> from the example
+            template).
+        </para>
 
-                <para>
-                   <literallayout class='monospaced'>
+        <para>
+            <literallayout class='monospaced'>
      # We have a conf and classes directory, add to BBPATH
      BBPATH .= ":${LAYERDIR}"
 
@@ -637,13 +722,14 @@
      BBFILE_PRIORITY_<replaceable>bsp</replaceable> = "6"
 
      LAYERDEPENDS_<replaceable>bsp</replaceable> = "intel"
-                    </literallayout>
-                </para>
+            </literallayout>
+        </para>
 
-                <para>
-                    To illustrate the string substitutions, here are the corresponding statements
-                    from the Raspberry Pi <filename>conf/layer.conf</filename> file:
-                   <literallayout class='monospaced'>
+        <para>
+            To illustrate the string substitutions, here are
+            the corresponding statements from the Raspberry
+            Pi <filename>conf/layer.conf</filename> file:
+            <literallayout class='monospaced'>
      # We have a conf and classes directory, append to BBPATH
      BBPATH .= ":${LAYERDIR}"
 
@@ -657,1265 +743,1527 @@
 
      # Additional license directories.
      LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
-                    </literallayout>
-                </para>
+          .
+          .
+          .
+            </literallayout>
+        </para>
 
-                <para>
-                    This file simply makes
-                    <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
-                    aware of the recipes and configuration directories.
-                    The file must exist so that the OpenEmbedded build system can recognize the BSP.
-                </para>
-            </section>
+        <para>
+            This file simply makes
+            <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+            aware of the recipes and configuration directories.
+            The file must exist so that the OpenEmbedded build system
+            can recognize the BSP.
+        </para>
+    </section>
 
-            <section id="bsp-filelayout-machine">
-                <title>Hardware Configuration Options</title>
+    <section id="bsp-filelayout-machine">
+        <title>Hardware Configuration Options</title>
 
-                <para>
-                    You can find these files in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/conf/machine/*.conf
-                    </literallayout>
-                </para>
+        <para>
+            You can find these files in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/conf/machine/*.conf
+            </literallayout>
+        </para>
 
-                <para>
-                    The machine files bind together all the information contained elsewhere
-                    in the BSP into a format that the build system can understand.
-                    If the BSP supports multiple machines, multiple machine configuration files
-                    can be present.
-                    These filenames correspond to the values to which users have set the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable.
-                </para>
+        <para>
+            The machine files bind together all the information
+            contained elsewhere in the BSP into a format that
+            the build system can understand.
+            Each BSP Layer requires at least one machine file.
+            If the BSP supports multiple machines, multiple
+            machine configuration files can exist.
+            These filenames correspond to the values to which
+            users have set the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable.
+        </para>
 
-                <para>
-                    These files define things such as the kernel package to use
-                    (<ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
-                    of virtual/kernel), the hardware drivers to
-                    include in different types of images, any special software components
-                    that are needed, any bootloader information, and also any special image
-                    format requirements.
-                </para>
+        <para>
+            These files define things such as the kernel package
+            to use
+            (<ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
+            of
+            <ulink url='&YOCTO_DOCS_DEV_URL;#metadata-virtual-providers'>virtual/kernel</ulink>),
+            the hardware drivers to include in different types
+            of images, any special software components that are
+            needed, any bootloader information, and also any
+            special image format requirements.
+        </para>
 
-                <para>
-                    Each BSP Layer requires at least one machine file.
-                    However, you can supply more than one file.
-                </para>
+        <para>
+            This configuration file could also include a hardware
+            "tuning" file that is commonly used to define the
+            package architecture and specify optimization flags,
+            which are carefully chosen to give best performance
+            on a given processor.
+        </para>
 
-                <para>
-                    This configuration file could also include a hardware "tuning"
-                    file that is commonly used to define the package architecture
-                    and specify optimization flags, which are carefully chosen
-                    to give best performance on a given processor.
-                </para>
+        <para>
+            Tuning files are found in the
+            <filename>meta/conf/machine/include</filename>
+            directory within the
+            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+            For example, many <filename>tune-*</filename> files
+            (e.g. <filename>tune-arm1136jf-s.inc</filename>,
+            <filename>tun-1586-nlp.inc</filename>, and so forth)
+            reside in the
+            <filename>poky/meta/conf/machine/include</filename>
+            directory.
+        </para>
 
-                <para>
-                    Tuning files are found in the <filename>meta/conf/machine/include</filename>
-                    directory within the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
-                    For example, the <filename>ia32-base.inc</filename> file resides in the
-                    <filename>meta/conf/machine/include</filename> directory.
-                </para>
+        <para>
+            To use an include file, you simply include them in the
+            machine configuration file.
+            For example, the Raspberry Pi BSP
+            <filename>raspberrypi3.conf</filename> contains the
+            following statement:
+            <literallayout class='monospaced'>
+     include conf/machine/include/rpi-base.inc
+            </literallayout>
+        </para>
+    </section>
 
-                <para>
-                    To use an include file, you simply include them in the
-                    machine configuration file.
-                    For example, the Raspberry Pi BSP
-                    <filename>raspberrypi3.conf</filename> contains the
-                    following statement:
-                    <literallayout class='monospaced'>
-     include conf/machine/raspberrypi2.conf
-                    </literallayout>
-                </para>
-            </section>
+    <section id='bsp-filelayout-misc-recipes'>
+        <title>Miscellaneous BSP-Specific Recipe Files</title>
 
-            <section id='bsp-filelayout-misc-recipes'>
-                <title>Miscellaneous BSP-Specific Recipe Files</title>
+        <para>
+            You can find these files in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-bsp/*
+            </literallayout>
+        </para>
 
-                <para>
-                    You can find these files in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/recipes-bsp/*
-                    </literallayout>
-                </para>
-
-                <para>
-                    This optional directory contains miscellaneous recipe files for
-                    the BSP.
-                    Most notably would be the formfactor files.
-                    For example, in the Raspberry Pi BSP there is the
-                    <filename>formfactor_0.0.bbappend</filename> file, which is an
-                    append file used to augment the recipe that starts the build.
-                    Furthermore, there are machine-specific settings used during
-                    the build that are defined by the
-                    <filename>machconfig</filename> file further down in the
-                    directory.
-                    Here is the <filename>machconfig</filename>
-                    file for the Raspberry Pi BSP:
-                    <literallayout class='monospaced'>
+        <para>
+            This optional directory contains miscellaneous recipe
+            files for the BSP.
+            Most notably would be the formfactor files.
+            For example, in the Raspberry Pi BSP there is the
+            <filename>formfactor_0.0.bbappend</filename> file,
+            which is an append file used to augment the recipe
+            that starts the build.
+            Furthermore, there are machine-specific settings used
+            during the build that are defined by the
+            <filename>machconfig</filename> file further down in
+            the directory.
+            Here is the <filename>machconfig</filename> file for
+            the Raspberry Pi BSP:
+            <literallayout class='monospaced'>
      HAVE_TOUCHSCREEN=0
      HAVE_KEYBOARD=1
 
      DISPLAY_CAN_ROTATE=0
      DISPLAY_ORIENTATION=0
      DISPLAY_DPI=133
-                    </literallayout>
-                </para>
+            </literallayout>
+        </para>
 
-                <note><para>
-                    If a BSP does not have a formfactor entry, defaults are established according to
-                    the formfactor configuration file that is installed by the main
-                    formfactor recipe
-                    <filename>meta/recipes-bsp/formfactor/formfactor_0.0.bb</filename>,
-                    which is found in the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
-                </para></note>
-            </section>
+        <note><para>
+            If a BSP does not have a formfactor entry, defaults
+            are established according to the formfactor
+            configuration file that is installed by the main
+            formfactor recipe
+            <filename>meta/recipes-bsp/formfactor/formfactor_0.0.bb</filename>,
+            which is found in the
+            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+        </para></note>
+    </section>
 
-            <section id='bsp-filelayout-recipes-graphics'>
-                <title>Display Support Files</title>
+    <section id='bsp-filelayout-recipes-graphics'>
+        <title>Display Support Files</title>
 
-                <para>
-                    You can find these files in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/recipes-graphics/*
-                    </literallayout>
-                </para>
+        <para>
+            You can find these files in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-graphics/*
+            </literallayout>
+        </para>
 
-                <para>
-                    This optional directory contains recipes for the BSP if it has
-                    special requirements for graphics support.
-                    All files that are needed for the BSP to support a display are
-                    kept here.
-                </para>
-            </section>
+        <para>
+            This optional directory contains recipes for the
+            BSP if it has special requirements for graphics
+            support.
+            All files that are needed for the BSP to support
+            a display are kept here.
+        </para>
+    </section>
 
-            <section id='bsp-filelayout-kernel'>
-                <title>Linux Kernel Configuration</title>
+    <section id='bsp-filelayout-kernel'>
+        <title>Linux Kernel Configuration</title>
 
-                <para>
-                    You can find these files in the BSP Layer at:
-                    <literallayout class='monospaced'>
-     meta-<replaceable>bsp_name</replaceable>/recipes-kernel/linux/linux-yocto*.bbappend
-                    </literallayout>
-                </para>
+        <para>
+            You can find these files in the BSP Layer at:
+            <literallayout class='monospaced'>
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux/linux*.bbappend
+     meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux/*.bb
+            </literallayout>
+        </para>
 
-                <para>
-                    These files append machine-specific changes to the main
-                    kernel recipe you are using.
-                </para>
+        <para>
+            Append files (<filename>*.bbappend</filename>) modify
+            the main kernel recipe being used to build the image.
+            The <filename>*.bb</filename> files would be a
+            developer-supplied kernel recipe.
+            This area of the BSP hierarchy can contain both these
+            types of files, although in practice, it is likely that
+            you would have one or the other.
+        </para>
 
-                <para>
-                    For your BSP, you typically want to use an existing Yocto
-                    Project kernel recipe found in the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                    at <filename>meta/recipes-kernel/linux</filename>.
-                    You can append machine-specific changes to the kernel recipe
-                    by using a similarly named append file, which is located in
-                    the BSP Layer for your target device (e.g. the
-                    <filename>meta-<replaceable>bsp_name</replaceable>/recipes-kernel/linux</filename> directory).
-                </para>
+        <para>
+            For your BSP, you typically want to use an existing Yocto
+            Project kernel recipe found in the
+            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+            at <filename>meta/recipes-kernel/linux</filename>.
+            You can append machine-specific changes to the
+            kernel recipe by using a similarly named append
+            file, which is located in the BSP Layer for your
+            target device (e.g. the
+            <filename>meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux</filename> directory).
+        </para>
 
-                <para>
-                    Suppose you are using the <filename>linux-yocto_4.4.bb</filename>
-                    recipe to build the kernel.
-                    In other words, you have selected the kernel in your
-                    <replaceable>bsp_name</replaceable><filename>.conf</filename>
-                    file by adding
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
-                    and
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink>
-                    statements as follows:
-                    <literallayout class='monospaced'>
+        <para>
+            Suppose you are using the
+            <filename>linux-yocto_4.4.bb</filename> recipe to
+            build the kernel.
+            In other words, you have selected the kernel in your
+            <replaceable>bsp_root_name</replaceable><filename>.conf</filename>
+            file by adding
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
+            and
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink>
+            statements as follows:
+            <literallayout class='monospaced'>
      PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
      PREFERRED_VERSION_linux-yocto ?= "4.4%"
-                    </literallayout>
-                    <note>
-                        When the preferred provider is assumed by default, the
-                        <filename>PREFERRED_PROVIDER</filename>
-                        statement does not appear in the
-                        <replaceable>bsp_name</replaceable><filename>.conf</filename> file.
-                    </note>
-                    You would use the <filename>linux-yocto_4.4.bbappend</filename>
-                    file to append specific BSP settings to the kernel, thus
-                    configuring the kernel for your particular BSP.
-                </para>
+            </literallayout>
+            <note>
+                When the preferred provider is assumed by
+                default, the
+                <filename>PREFERRED_PROVIDER</filename>
+                statement does not appear in the
+                <replaceable>bsp_root_name</replaceable><filename>.conf</filename> file.
+            </note>
+            You would use the
+            <filename>linux-yocto_4.4.bbappend</filename>
+            file to append specific BSP settings to the kernel,
+            thus configuring the kernel for your particular BSP.
+        </para>
 
-                <para>
-                    You can find more information on what your append file
-                    should contain in the
-                    "<ulink url='&YOCTO_DOCS_KERNEL_URL;#creating-the-append-file'>Creating the Append File</ulink>"
-                    section in the Yocto Project Linux Kernel Development
-                    Manual.
-                </para>
-            </section>
-        </section>
+        <para>
+            You can find more information on what your append file
+            should contain in the
+            "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-the-append-file'>Creating the Append File</ulink>"
+            section in the Yocto Project Linux Kernel Development
+            Manual.
+        </para>
 
-        <section id='developing-a-board-support-package-bsp'>
-            <title>Developing a Board Support Package (BSP)</title>
+        <para>
+            An alternate scenario is when you create your own
+            kernel recipe for the BSP.
+            A good example of this is the Raspberry Pi BSP.
+            If you examine the
+            <filename>recipes-kernel/linux</filename> directory
+            you see the following:
+            <literallayout class='monospaced'>
+     linux-raspberrypi-dev.bb
+     linux-raspberrypi.inc
+     linux-raspberrypi_4.14.bb
+     linux-raspberrypi_4.9.bb
+            </literallayout>
+            The directory contains three kernel recipes and a
+            common include file.
+        </para>
+    </section>
+</section>
 
-            <para>
-                This section contains the high-level procedure you can follow
-                to create a BSP using the Yocto Project's
-                <link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
-                Although not required for BSP creation, the
-                <filename>meta-intel</filename> repository, which contains
-                many BSPs supported by the Yocto Project, is part of the
-                example.
-            </para>
+<section id='developing-a-board-support-package-bsp'>
+    <title>Developing a Board Support Package (BSP)</title>
 
-            <para>
-                For an example that shows how to create a new layer using
-                the tools, see the
-                "<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</link>"
-                 section.
-            </para>
+    <para>
+        This section contains the high-level procedure you can
+        follow to create a BSP.
+        Although not required for BSP creation, the
+        <filename>meta-intel</filename> repository, which
+        contains many BSPs supported by the Yocto Project,
+        is part of the example.
+    </para>
 
-            <para>
-                The following illustration and list summarize the BSP
-                creation general workflow.
-            </para>
+    <para>
+        For an example that shows how to create a new
+        layer using the tools, see the
+        "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
+        section.
+    </para>
 
-            <para>
-                <imagedata fileref="figures/bsp-dev-flow.png" width="7in" depth="5in" align="center" scalefit="1" />
-            </para>
+    <para>
+        The following illustration and list summarize the BSP
+        creation general workflow.
+    </para>
 
-            <para>
-                <orderedlist>
-                    <listitem><para>
-                        <emphasis>Set up Your Host Development System to Support
-                        Development Using the Yocto Project</emphasis>:
-                        See the
-                        "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
-                        section in the Yocto Project Quick Start for options on how
-                        to get a build host ready to use the Yocto Project.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Establish the <filename>meta-intel</filename>
-                        Repository on Your System:</emphasis>
-                        Having local copies of these supported BSP layers on
-                        your system gives you access to layers you might be able
-                        to build on or modify to create your BSP.
-                        For information on how to get these files, see the
-                        "<link linkend='preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work with BSP Layers</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Create Your Own BSP Layer Using the
-                        <link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></link>
-                        script:</emphasis>
-                        Layers are ideal for isolating and storing work for a
-                        given piece of hardware.
-                        A layer is really just a location or area in which you
-                        place the recipes and configurations for your BSP.
-                        In fact, a BSP is, in itself, a special type of layer.
-                        The simplest way to create a new BSP layer that is
-                        compliant with the Yocto Project is to use the
-                        <filename>yocto-bsp</filename> script.
-                        For information about that script, see the
-                        "<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</link>"
-                        section.</para>
+    <para>
+        <imagedata fileref="figures/bsp-dev-flow.png" width="7in" depth="5in" align="center" scalefit="1" />
+    </para>
 
-                        <para>Another example that illustrates a layer
-                        is an application.
-                        Suppose you are creating an application that has
-                        library or other dependencies in order for it to
-                        compile and run.
-                        The layer, in this case, would be where all the
-                        recipes that define those dependencies are kept.
-                        The key point for a layer is that it is an isolated
-                        area that contains all the relevant information for
-                        the project that the OpenEmbedded build system knows
-                        about.
-                        For more information on layers, see the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
-                        section in the Yocto Project Development Tasks Manual.
-                        For more information on BSP layers, see the
-                        "<link linkend='bsp-layers'>BSP Layers</link>"
-                        section.
-                        <note><title>Notes</title>
-                            <para>Five BSPs exist that are part of the Yocto
-                            Project release:
-                            <filename>beaglebone</filename> (ARM),
-                            <filename>mpc8315e</filename> (PowerPC),
-                            and <filename>edgerouter</filename> (MIPS).
-                            The recipes and configurations for these five BSPs
-                            are located and dispersed within the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
-                            </para>
+    <para>
+        <orderedlist>
+            <listitem><para>
+                <emphasis>Set up Your Host Development System
+                to Support Development Using the Yocto
+                Project</emphasis>:
+                See the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Preparing the Build Host</ulink>"
+                section in the Yocto Project Development Tasks
+                Manual for options on how to get a system ready
+                to use the Yocto Project.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Establish the
+                <filename>meta-intel</filename>
+                Repository on Your System:</emphasis>
+                Having local copies of these supported BSP layers
+                on your system gives you access to layers you
+                might be able to leverage when creating your BSP.
+                For information on how to get these files, see the
+                "<link linkend='preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work with BSP Layers</link>"
+                section.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Create Your Own BSP Layer Using the
+                <filename>bitbake-layers</filename>
+                Script:</emphasis>
+                Layers are ideal for isolating and storing work
+                for a given piece of hardware.
+                A layer is really just a location or area in which you
+                place the recipes and configurations for your BSP.
+                In fact, a BSP is, in itself, a special type of layer.
+                The simplest way to create a new BSP layer that is
+                compliant with the Yocto Project is to use the
+                <filename>bitbake-layers</filename> script.
+                For information about that script, see the
+                "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
+                section.</para>
 
-                            <para>Three core Intel BSPs exist as part of the Yocto
-                            Project release in the
+                <para>Another example that illustrates a layer
+                is an application.
+                Suppose you are creating an application that has
+                library or other dependencies in order for it to
+                compile and run.
+                The layer, in this case, would be where all the
+                recipes that define those dependencies are kept.
+                The key point for a layer is that it is an
+                isolated area that contains all the relevant
+                information for the project that the
+                OpenEmbedded build system knows about.
+                For more information on layers, see the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
+                section in the Yocto Project Overview and Concepts
+                Manual.
+                You can also reference the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+                section in the Yocto Project Development Tasks
+                Manual.
+                For more information on BSP layers, see the
+                "<link linkend='bsp-layers'>BSP Layers</link>"
+                section.
+                <note><title>Notes</title>
+                    <itemizedlist>
+                        <listitem><para>
+                            Five hardware reference BSPs exist
+                            that are part of the Yocto Project release
+                            and are located in the
+                            <filename>poky/meta-yocto-bsp</filename> BSP
+                            layer:
+                            <itemizedlist>
+                                <listitem><para>
+                                    Texas Instruments Beaglebone
+                                    (<filename>beaglebone-yocto</filename>)
+                                    </para></listitem>
+                                <listitem><para>
+                                    Freescale MPC8315E-RDB
+                                    (<filename>mpc8315e-rdb</filename>)
+                                    </para></listitem>
+                                <listitem><para>
+                                    Ubiquiti Networks EdgeRouter Lite
+                                   (<filename>edgerouter</filename>)
+                                   </para></listitem>
+                                <listitem><para>
+                                    Two general IA platforms
+                                    (<filename>genericx86</filename> and
+                                    <filename>genericx86-64</filename>)
+                                    </para></listitem>
+                            </itemizedlist>
+                            </para></listitem>
+                        <listitem><para>
+                            Three core Intel BSPs exist as part of
+                            the Yocto Project release in the
                             <filename>meta-intel</filename> layer:
                             <itemizedlist>
                                 <listitem><para>
                                     <filename>intel-core2-32</filename>,
-                                    which is a BSP optimized for the Core2 family of CPUs
-                                    as well as all CPUs prior to the Silvermont core.
+                                    which is a BSP optimized for the Core2
+                                    family of CPUs as well as all CPUs
+                                    prior to the Silvermont core.
                                     </para></listitem>
                                 <listitem><para>
                                     <filename>intel-corei7-64</filename>,
-                                    which is a BSP optimized for Nehalem and later
-                                    Core and Xeon CPUs as well as Silvermont and later
-                                    Atom CPUs, such as the Baytrail SoCs.
+                                    which is a BSP optimized for Nehalem
+                                    and later Core and Xeon CPUs as well
+                                    as Silvermont and later Atom CPUs,
+                                    such as the Baytrail SoCs.
                                     </para></listitem>
                                 <listitem><para>
                                     <filename>intel-quark</filename>,
-                                    which is a BSP optimized for the Intel Galileo
-                                    gen1 &amp; gen2 development boards.
+                                    which is a BSP optimized for the
+                                    Intel Galileo gen1 &amp; gen2
+                                    development boards.
                                     </para></listitem>
-                            </itemizedlist></para>
-                        </note></para>
-
-                        <para>When you set up a layer for a new BSP, you should
-                        follow a standard layout.
-                        This layout is described in the
-                        "<link linkend='bsp-filelayout'>Example Filesystem Layout</link>"
-                        section.
-                        In the standard layout, you will notice a suggested
-                        structure for recipes and configuration information.
-                        You can see the standard layout for a BSP by examining
-                        any supported BSP found in the
-                        <filename>meta-intel</filename> layer inside the Source
-                        Directory.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Make Configuration Changes to Your New BSP
-                        Layer:</emphasis>
-                        The standard BSP layer structure organizes the files
-                        you need to edit in <filename>conf</filename> and
-                        several <filename>recipes-*</filename>
-                        directories within the BSP layer.
-                        Configuration changes identify where your new layer
-                        is on the local system and identify which kernel you
-                        are going to use.
-                        When you run the <filename>yocto-bsp</filename> script,
-                        you are able to interactively configure many things for
-                        the BSP (e.g. keyboard, touchscreen, and so forth).
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Make Recipe Changes to Your New BSP
-                        Layer:</emphasis>
-                        Recipe changes include altering recipes
-                        (<filename>.bb</filename> files), removing recipes you
-                        do not use, and adding new recipes or append files
-                        (<filename>.bbappend</filename>) that you need to
-                        support your hardware.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Prepare for the Build:</emphasis>
-                        Once you have made all the changes to your BSP layer,
-                        there remains a few things you need to do for the
-                        OpenEmbedded build system in order for it to create
-                        your image.
-                        You need to get the build environment ready by
-                        sourcing an environment setup script
-                        (i.e. <filename>oe-init-build-env</filename>)
-                        and you need to be sure two key configuration
-                        files are configured appropriately: the
-                        <filename>conf/local.conf</filename> and the
-                        <filename>conf/bblayers.conf</filename> file.
-                        You must make the OpenEmbedded build system aware
-                        of your new layer.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
-                        section in the Yocto Project Development Tasks Manual
-                        for information on how to let the build system
-                        know about your new layer.</para>
-
-                        <para>The entire process for building an image is
-                        overviewed in the section
-                        "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>" section
-                        of the Yocto Project Quick Start.
-                        You might want to reference this information.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Build the Image:</emphasis>
-                        The OpenEmbedded build system uses the BitBake tool
-                        to build images based on the type of image you want to
-                        create.
-                        You can find more information about BitBake in the
-                        <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
-                        </para>
-
-                        <para>The build process supports several types of
-                        images to satisfy different needs.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
-                        chapter in the Yocto Project Reference Manual for
-                        information on supported images.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='requirements-and-recommendations-for-released-bsps'>
-            <title>Requirements and Recommendations for Released BSPs</title>
-
-            <para>
-                Certain requirements exist for a released BSP to be considered
-                compliant with the Yocto Project.
-                Additionally, recommendations also exist.
-                This section describes the requirements and recommendations for
-                released BSPs.
-            </para>
-
-            <section id='released-bsp-requirements'>
-                <title>Released BSP Requirements</title>
-
-                <para>
-                    Before looking at BSP requirements, you should consider the following:
-                    <itemizedlist>
-                        <listitem><para>The requirements here assume the BSP layer is a well-formed, "legal"
-                            layer that can be added to the Yocto Project.
-                            For guidelines on creating a layer that meets these base requirements, see the
-                            "<link linkend='bsp-layers'>BSP Layers</link>" and the
-                            "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding
-                            and Creating Layers"</ulink> in the Yocto Project Development Tasks Manual.
-                            </para></listitem>
-                        <listitem><para>The requirements in this section apply regardless of how you
-                            package a BSP.
-                            You should consult the packaging and distribution guidelines for your
-                            specific release process.
-                            For an example of packaging and distribution requirements, see the
-                            "<ulink url='https://wiki.yoctoproject.org/wiki/Third_Party_BSP_Release_Process'>Third Party BSP Release Process</ulink>"
-                            wiki page.
-                            </para></listitem>
-                        <listitem><para>The requirements for the BSP as it is made available to a developer
-                            are completely independent of the released form of the BSP.
-                            For example, the BSP Metadata can be contained within a Git repository
-                            and could have a directory structure completely different from what appears
-                            in the officially released BSP layer.
-                            </para></listitem>
-                        <listitem><para>It is not required that specific packages or package
-                            modifications exist in the BSP layer, beyond the requirements for general
-                            compliance with the Yocto Project.
-                            For example, no requirement exists dictating that a specific kernel or
-                            kernel version be used in a given BSP.
+                            </itemizedlist>
                             </para></listitem>
                     </itemizedlist>
+                </note></para>
+
+                <para>When you set up a layer for a new BSP,
+                you should follow a standard layout.
+                This layout is described in the
+                "<link linkend='bsp-filelayout'>Example Filesystem Layout</link>"
+                section.
+                In the standard layout, notice the suggested
+                structure for recipes and configuration
+                information.
+                You can see the standard layout for a BSP
+                by examining any supported BSP found in the
+                <filename>meta-intel</filename> layer inside
+                the Source Directory.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Make Configuration Changes to Your New
+                BSP Layer:</emphasis>
+                The standard BSP layer structure organizes the
+                files you need to edit in
+                <filename>conf</filename> and several
+                <filename>recipes-*</filename> directories
+                within the BSP layer.
+                Configuration changes identify where your new
+                layer is on the local system and identifies the
+                kernel you are going to use.
+                When you run the
+                <filename>bitbake-layers</filename> script,
+                you are able to interactively configure many
+                things for the BSP (e.g. keyboard, touchscreen,
+                and so forth).
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Make Recipe Changes to Your New BSP
+                Layer:</emphasis>
+                Recipe changes include altering recipes
+                (<filename>*.bb</filename> files), removing
+                recipes you do not use, and adding new recipes
+                or append files (<filename>.bbappend</filename>)
+                that support your hardware.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Prepare for the Build:</emphasis>
+                Once you have made all the changes to your BSP
+                layer, there remains a few things you need to
+                do for the OpenEmbedded build system in order
+                for it to create your image.
+                You need to get the build environment ready by
+                sourcing an environment setup script
+                (i.e. <filename>oe-init-build-env</filename>)
+                and you need to be sure two key configuration
+                files are configured appropriately: the
+                <filename>conf/local.conf</filename> and the
+                <filename>conf/bblayers.conf</filename> file.
+                You must make the OpenEmbedded build system aware
+                of your new layer.
+                See the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
+                section in the Yocto Project Development Tasks Manual
+                for information on how to let the build system
+                know about your new layer.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Build the Image:</emphasis>
+                The OpenEmbedded build system uses the BitBake tool
+                to build images based on the type of image you want to
+                create.
+                You can find more information about BitBake in the
+                <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
                 </para>
 
-                <para>
-                    Following are the requirements for a released BSP that conform to the
-                    Yocto Project:
+                <para>The build process supports several types of
+                images to satisfy different needs.
+                See the
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
+                chapter in the Yocto Project Reference Manual for
+                information on supported images.
+                </para></listitem>
+        </orderedlist>
+    </para>
+</section>
+
+<section id='requirements-and-recommendations-for-released-bsps'>
+    <title>Requirements and Recommendations for Released BSPs</title>
+
+    <para>
+        Certain requirements exist for a released BSP to be
+        considered compliant with the Yocto Project.
+        Additionally, recommendations also exist.
+        This section describes the requirements and
+        recommendations for released BSPs.
+    </para>
+
+    <section id='released-bsp-requirements'>
+        <title>Released BSP Requirements</title>
+
+        <para>
+            Before looking at BSP requirements, you should consider
+            the following:
+            <itemizedlist>
+                <listitem><para>
+                    The requirements here assume the BSP layer
+                    is a well-formed, "legal" layer that can be
+                    added to the Yocto Project.
+                    For guidelines on creating a layer that meets
+                    these base requirements, see the
+                    "<link linkend='bsp-layers'>BSP Layers</link>"
+                    section in this manual and the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers"</ulink>"
+                    section in the Yocto Project Development Tasks
+                    Manual.
+                    </para></listitem>
+                <listitem><para>
+                    The requirements in this section apply
+                    regardless of how you package a BSP.
+                    You should consult the packaging and distribution
+                    guidelines for your specific release process.
+                    For an example of packaging and distribution
+                    requirements, see the
+                    "<ulink url='https://wiki.yoctoproject.org/wiki/Third_Party_BSP_Release_Process'>Third Party BSP Release Process</ulink>"
+                    wiki page.
+                    </para></listitem>
+                <listitem><para>
+                    The requirements for the BSP as it is made
+                    available to a developer are completely
+                    independent of the released form of the BSP.
+                    For example, the BSP Metadata can be contained
+                    within a Git repository and could have a directory
+                    structure completely different from what appears
+                    in the officially released BSP layer.
+                    </para></listitem>
+                <listitem><para>
+                    It is not required that specific packages or
+                    package modifications exist in the BSP layer,
+                    beyond the requirements for general
+                    compliance with the Yocto Project.
+                    For example, no requirement exists dictating
+                    that a specific kernel or kernel version be
+                    used in a given BSP.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            Following are the requirements for a released BSP
+            that conform to the Yocto Project:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>Layer Name:</emphasis>
+                    The BSP must have a layer name that follows
+                    the Yocto Project standards.
+                    For information on BSP layer names, see the
+                    "<link linkend='bsp-layers'>BSP Layers</link>" section.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>File System Layout:</emphasis>
+                    When possible, use the same directory names
+                    in your BSP layer as listed in the
+                    <filename>recipes.txt</filename> file, which
+                    is found in <filename>poky/meta</filename>
+                    directory of the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                    or in the OpenEmbedded-Core Layer
+                    (<filename>openembedded-core</filename>) at
+                    <ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
+                    </para>
+
+                    <para>You should place recipes
+                    (<filename>*.bb</filename> files) and recipe
+                    modifications (<filename>*.bbappend</filename>
+                    files) into <filename>recipes-*</filename>
+                    subdirectories by functional area as outlined
+                    in <filename>recipes.txt</filename>.
+                    If you cannot find a category in
+                    <filename>recipes.txt</filename> to fit a
+                    particular recipe, you can make up your own
+                    <filename>recipes-*</filename> subdirectory.
+                    </para>
+
+                    <para>Within any particular
+                    <filename>recipes-*</filename> category, the
+                    layout should match what is found in the
+                    OpenEmbedded-Core Git repository
+                    (<filename>openembedded-core</filename>)
+                    or the Source Directory (<filename>poky</filename>).
+                    In other words, make sure you place related
+                    files in appropriately related
+                    <filename>recipes-*</filename> subdirectories
+                    specific to the recipe's function, or within
+                    a subdirectory containing a set of closely-related
+                    recipes.
+                    The recipes themselves should follow the general
+                    guidelines for recipes used in the Yocto Project
+                    found in the
+                    "<ulink url='http://openembedded.org/wiki/Styleguide'>OpenEmbedded Style Guide</ulink>".
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>License File:</emphasis>
+                    You must include a license file in the
+                    <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
+                    directory.
+                    This license covers the BSP Metadata as a whole.
+                    You must specify which license to use since no
+                    default license exists when one not specified.
+                    See the
+                    <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
+                    file for the Raspberry Pi BSP in the
+                    <filename>meta-raspberrypi</filename> BSP layer
+                    as an example.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>README File:</emphasis>
+                    You must include a <filename>README</filename>
+                    file in the
+                    <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
+                    directory.
+                    See the
+                    <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/README.md'><filename>README.md</filename></ulink>
+                    file for the Raspberry Pi BSP in the
+                    <filename>meta-raspberrypi</filename> BSP layer
+                    as an example.</para>
+
+                    <para>At a minimum, the <filename>README</filename>
+                    file should contain the following:
                     <itemizedlist>
-                        <listitem><para><emphasis>Layer Name:</emphasis>
-                            The BSP must have a layer name that follows the Yocto
-                            Project standards.
-                            For information on BSP layer names, see the
-                            "<link linkend='bsp-layers'>BSP Layers</link>" section.
+                        <listitem><para>
+                            A brief description about the hardware the BSP
+                            targets.
                             </para></listitem>
-                        <listitem><para><emphasis>File System Layout:</emphasis>
-                            When possible, use the same directory names in your
-                            BSP layer as listed in the <filename>recipes.txt</filename> file.
-                            In particular, you should place recipes
-                            (<filename>.bb</filename> files) and recipe
-                            modifications (<filename>.bbappend</filename> files) into
-                            <filename>recipes-*</filename> subdirectories by functional area
-                            as outlined in <filename>recipes.txt</filename>.
-                            If you cannot find a category in <filename>recipes.txt</filename>
-                            to fit a particular recipe, you can make up your own
-                            <filename>recipes-*</filename> subdirectory.
-                            You can find <filename>recipes.txt</filename> in the
-                            <filename>meta</filename> directory of the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
-                            or in the OpenEmbedded Core Layer
-                            (<filename>openembedded-core</filename>) found at
-                            <ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
-                            </para>
-                            <para>Within any particular <filename>recipes-*</filename> category, the layout
-                            should match what is found in the OpenEmbedded Core
-                            Git repository (<filename>openembedded-core</filename>)
-                            or the Source Directory (<filename>poky</filename>).
-                            In other words, make sure you place related files in appropriately
-                            related <filename>recipes-*</filename> subdirectories specific to the
-                            recipe's function, or within a subdirectory containing a set of closely-related
-                            recipes.
-                            The recipes themselves should follow the general guidelines
-                            for recipes used in the Yocto Project found in the
-                            "<ulink url='http://openembedded.org/wiki/Styleguide'>OpenEmbedded Style Guide</ulink>".
+                        <listitem><para>
+                            A list of all the dependencies
+                            on which a BSP layer depends.
+                            These dependencies are typically a list
+                            of required layers needed to build the
+                            BSP.
+                            However, the dependencies should also
+                            contain information regarding any other
+                            dependencies the BSP might have.
                             </para></listitem>
-                        <listitem><para><emphasis>License File:</emphasis>
-                            You must include a license file in the
-                            <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
-                            This license covers the BSP Metadata as a whole.
-                            You must specify which license to use since there is no
-                            default license if one is not specified.
-                            See the
-                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
-                            file for the Raspberry Pi BSP in the
-                            <filename>meta-raspberrypi</filename> BSP layer as an example.
+                        <listitem><para>
+                            Any required special licensing information.
+                            For example, this information includes
+                            information on special variables needed
+                            to satisfy a EULA, or instructions on
+                            information needed to build or distribute
+                            binaries built from the BSP Metadata.
                             </para></listitem>
-                        <listitem><para><emphasis>README File:</emphasis>
-                            You must include a <filename>README</filename> file in the
-                            <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
-                            See the
-                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/README'><filename>README</filename></ulink>
-                            file for the Raspberry Pi BSP in the <filename>meta-raspberrypi</filename> BSP layer
-                            as an example.</para>
-                            <para>At a minimum, the <filename>README</filename> file should
-                            contain the following:
-                            <itemizedlist>
-                                <listitem><para>A brief description about the hardware the BSP
-                                    targets.</para></listitem>
-                                <listitem><para>A list of all the dependencies
-                                    on which a BSP layer depends.
-                                    These dependencies are typically a list of required layers needed
-                                    to build the BSP.
-                                    However, the dependencies should also contain information regarding
-                                    any other dependencies the BSP might have.</para></listitem>
-                                <listitem><para>Any required special licensing information.
-                                    For example, this information includes information on
-                                    special variables needed to satisfy a EULA,
-                                    or instructions on information needed to build or distribute
-                                    binaries built from the BSP Metadata.</para></listitem>
-                                <listitem><para>The name and contact information for the
-                                    BSP layer maintainer.
-                                    This is the person to whom patches and questions should
-                                    be sent.
-                                    For information on how to find the right person, see the
-                                    "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
-                                    section in the Yocto Project Development Tasks Manual.
-                                    </para></listitem>
-                                <listitem><para>Instructions on how to build the BSP using the BSP
-                                    layer.</para></listitem>
-                                <listitem><para>Instructions on how to boot the BSP build from
-                                    the BSP layer.</para></listitem>
-                                <listitem><para>Instructions on how to boot the binary images
-                                    contained in the <filename>binary</filename> directory,
-                                    if present.</para></listitem>
-                                <listitem><para>Information on any known bugs or issues that users
-                                    should know about when either building or booting the BSP
-                                    binaries.</para></listitem>
-                            </itemizedlist></para></listitem>
-                        <listitem><para><emphasis>README.sources File:</emphasis>
-                            You must include a <filename>README.sources</filename> in the
-                            <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
-                            This file specifies exactly where you can find the sources used to
-                            generate the binary images contained in the
-                            <filename>binary</filename> directory, if present.
+                        <listitem><para>
+                            The name and contact information for the
+                            BSP layer maintainer.
+                            This is the person to whom patches and
+                            questions should be sent.
+                            For information on how to find the right
+                            person, see the
+                            "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+                            section in the Yocto Project Development
+                            Tasks Manual.
                             </para></listitem>
-                        <listitem><para><emphasis>Layer Configuration File:</emphasis>
-                            You must include a <filename>conf/layer.conf</filename> in the
-                            <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
-                            This file identifies the <filename>meta-<replaceable>bsp_name</replaceable></filename>
-                            BSP layer as a layer to the build system.</para></listitem>
-                        <listitem><para><emphasis>Machine Configuration File:</emphasis>
-                            You must include one or more
-                            <filename>conf/machine/<replaceable>bsp_name</replaceable>.conf</filename>
-                            files in the <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
-                            These configuration files define machine targets that can be built
-                            using the BSP layer.
-                            Multiple machine configuration files define variations of machine
-                            configurations that are supported by the BSP.
-                            If a BSP supports multiple machine variations, you need to
-                            adequately describe each variation in the BSP
-                            <filename>README</filename> file.
-                            Do not use multiple machine configuration files to describe disparate
-                            hardware.
-                            If you do have very different targets, you should create separate
-                            BSP layers for each target.
-                            <note>It is completely possible for a developer to structure the
-                            working repository as a conglomeration of unrelated BSP
-                            files, and to possibly generate BSPs targeted for release
-                            from that directory using scripts or some other mechanism
-                            (e.g. <filename>meta-yocto-bsp</filename> layer).
-                            Such considerations are outside the scope of this document.</note>
+                        <listitem><para>
+                            Instructions on how to build the BSP using
+                            the BSP layer.
+                            </para></listitem>
+                        <listitem><para>
+                            Instructions on how to boot the BSP build
+                            from the BSP layer.
+                            </para></listitem>
+                        <listitem><para>
+                            Instructions on how to boot the binary
+                            images contained in the
+                            <filename>binary</filename> directory,
+                            if present.
+                            </para></listitem>
+                        <listitem><para>
+                            Information on any known bugs or issues
+                            that users should know about when either
+                            building or booting the BSP binaries.
                             </para></listitem>
                     </itemizedlist>
-                </para>
-            </section>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>README.sources File:</emphasis>
+                    If you BSP contains binary images in the
+                    <filename>binary</filename> directory, you must
+                    include a <filename>README.sources</filename>
+                    file in the
+                    <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
+                    directory.
+                    This file specifies exactly where you can find
+                    the sources used to generate the binary images.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Layer Configuration File:</emphasis>
+                    You must include a
+                    <filename>conf/layer.conf</filename> file in
+                    the
+                    <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
+                    directory.
+                    This file identifies the
+                    <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
+                    BSP layer as a layer to the build system.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Machine Configuration File:</emphasis>
+                    You must include one or more
+                    <filename>conf/machine/</filename><replaceable>bsp_root_name</replaceable><filename>.conf</filename>
+                    files in the
+                    <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
+                    directory.
+                    These configuration files define machine targets
+                    that can be built using the BSP layer.
+                    Multiple machine configuration files define
+                    variations of machine configurations that the
+                    BSP supports.
+                    If a BSP supports multiple machine variations,
+                    you need to adequately describe each variation
+                    in the BSP <filename>README</filename> file.
+                    Do not use multiple machine configuration files
+                    to describe disparate hardware.
+                    If you do have very different targets, you should
+                    create separate BSP layers for each target.
+                    <note>
+                        It is completely possible for a developer to
+                        structure the working repository as a
+                        conglomeration of unrelated BSP files, and to
+                        possibly generate BSPs targeted for release
+                        from that directory using scripts or some
+                        other mechanism
+                        (e.g. <filename>meta-yocto-bsp</filename> layer).
+                        Such considerations are outside the scope of
+                        this document.
+                    </note>
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
 
-            <section id='released-bsp-recommendations'>
-                <title>Released BSP Recommendations</title>
+    <section id='released-bsp-recommendations'>
+        <title>Released BSP Recommendations</title>
 
-                <para>
-                    Following are recommendations for a released BSP that conforms to the
-                    Yocto Project:
-                    <itemizedlist>
-                        <listitem><para><emphasis>Bootable Images:</emphasis>
-                            BSP releases
-                            can contain one or more bootable images.
-                            Including bootable images allows users to easily try out the BSP
-                            on their own hardware.</para>
-                            <para>In some cases, it might not be convenient to include a
-                            bootable image.
-                            In this case, you might want to make two versions of the
-                            BSP available: one that contains binary images, and one
-                            that does not.
-                            The version that does not contain bootable images avoids
-                            unnecessary download times for users not interested in the images.
-                            </para>
-                            <para>If you need to distribute a BSP and include bootable images or build kernel and
-                            filesystems meant to allow users to boot the BSP for evaluation
-                            purposes, you should put the images and artifacts within a
-                            <filename>binary/</filename> subdirectory located in the
-                            <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
-                            <note>If you do include a bootable image as part of the BSP and the image
-                            was built by software covered by the GPL or other open source licenses,
-                            it is your responsibility to understand
-                            and meet all licensing requirements, which could include distribution
-                            of source files.</note></para></listitem>
-                        <listitem><para><emphasis>Use a Yocto Linux Kernel:</emphasis>
-                            Kernel recipes in the BSP should be based on a Yocto Linux kernel.
-                            Basing your recipes on these kernels reduces the costs for maintaining
-                            the BSP and increases its scalability.
-                            See the <filename>Yocto Linux Kernel</filename> category in the
-                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>Source Repositories</ulink>
-                            for these kernels.</para></listitem>
-                    </itemizedlist>
-                </para>
-            </section>
-        </section>
+        <para>
+            Following are recommendations for released BSPs that
+            conform to the Yocto Project:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>Bootable Images:</emphasis>
+                    Released BSPs can contain one or more bootable
+                    images.
+                    Including bootable images allows users to easily
+                    try out the BSP using their own hardware.</para>
 
-        <section id='customizing-a-recipe-for-a-bsp'>
-            <title>Customizing a Recipe for a BSP</title>
+                    <para>In some cases, it might not be convenient
+                    to include a bootable image.
+                    If so, you might want to make two versions of the
+                    BSP available: one that contains binary images, and
+                    one that does not.
+                    The version that does not contain bootable images
+                    avoids unnecessary download times for users not
+                    interested in the images.</para>
 
-            <para>
-               If you plan on customizing a recipe for a particular BSP, you need to do the
-               following:
-               <itemizedlist>
-                   <listitem><para>Create a <filename>.bbappend</filename>
-                       file for the modified recipe.
-                       For information on using append files, see the
-                       "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
-                       section in the Yocto Project Development Tasks Manual.
-                       </para></listitem>
-                   <listitem><para>
-                       Ensure your directory structure in the BSP layer
-                       that supports your machine is such that it can be found
-                       by the build system.
-                       See the example later in this section for more information.
-                       </para></listitem>
-                   <listitem><para>
-                       Put the append file in a directory whose name matches
-                       the machine's name and is located in an appropriate
-                       sub-directory inside the BSP layer (i.e.
-                       <filename>recipes-bsp</filename>, <filename>recipes-graphics</filename>,
-                       <filename>recipes-core</filename>, and so forth).
-                       </para></listitem>
-                   <listitem><para>Place the BSP-specific files in the proper directory
-                       inside the BSP layer.
-                       How expansive the layer is affects where you must place these files.
-                       For example, if your layer supports several different machine types,
-                       you need to be sure your layer's directory structure includes hierarchy
-                       that separates the files out according to machine.
-                       If your layer does not support multiple machines, the layer would not
-                       have that additional hierarchy and the files would obviously not be
-                       able to reside in a machine-specific directory.
-                       </para></listitem>
-               </itemizedlist>
-           </para>
+                    <para>If you need to distribute a BSP and include
+                    bootable images or build kernel and filesystems
+                    meant to allow users to boot the BSP for evaluation
+                    purposes, you should put the images and artifacts
+                    within a
+                    <filename>binary/</filename> subdirectory located
+                    in the
+                    <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
+                    directory.
+                    <note>
+                        If you do include a bootable image as part
+                        of the BSP and the image was built by software
+                        covered by the GPL or other open source licenses,
+                        it is your responsibility to understand
+                        and meet all licensing requirements, which could
+                        include distribution of source files.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Use a Yocto Linux Kernel:</emphasis>
+                    Kernel recipes in the BSP should be based on a
+                    Yocto Linux kernel.
+                    Basing your recipes on these kernels reduces
+                    the costs for maintaining the BSP and increases
+                    its scalability.
+                    See the <filename>Yocto Linux Kernel</filename>
+                    category in the
+                    <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
+                    for these kernels.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</section>
 
-           <para>
-               Following is a specific example to help you better understand the process.
-               Consider an example that customizes a recipe by adding
-               a BSP-specific configuration file named <filename>interfaces</filename> to the
-               <filename>init-ifupdown_1.0.bb</filename> recipe for machine "xyz" where the
-               BSP layer also supports several other machines.
-               Do the following:
-               <orderedlist>
-                   <listitem><para>Edit the <filename>init-ifupdown_1.0.bbappend</filename> file so that it
-                       contains the following:
-                       <literallayout class='monospaced'>
+<section id='customizing-a-recipe-for-a-bsp'>
+    <title>Customizing a Recipe for a BSP</title>
+
+    <para>
+        If you plan on customizing a recipe for a particular BSP,
+        you need to do the following:
+        <itemizedlist>
+            <listitem><para>
+                Create a <filename>*.bbappend</filename> file for
+                the modified recipe.
+                For information on using append files, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
+                section in the Yocto Project Development Tasks
+                Manual.
+                </para></listitem>
+            <listitem><para>
+                Ensure your directory structure in the BSP layer
+                that supports your machine is such that the
+                OpenEmbedded build system can find it.
+                See the example later in this section for more
+                information.
+                </para></listitem>
+            <listitem><para>
+                Put the append file in a directory whose name matches
+                the machine's name and is located in an appropriate
+                sub-directory inside the BSP layer (i.e.
+                <filename>recipes-bsp</filename>,
+                <filename>recipes-graphics</filename>,
+                <filename>recipes-core</filename>, and so forth).
+                </para></listitem>
+            <listitem><para>
+                Place the BSP-specific files in the proper
+                directory inside the BSP layer.
+                How expansive the layer is affects where you must
+                place these files.
+                For example, if your layer supports several
+                different machine types, you need to be sure your
+                layer's directory structure includes hierarchy
+                that separates the files according to machine.
+                If your layer does not support multiple machines,
+                the layer would not have that additional hierarchy
+                and the files would obviously not be able to reside
+                in a machine-specific directory.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+
+    <para>
+        Following is a specific example to help you better understand
+        the process.
+        This example customizes customizes a recipe by adding a
+        BSP-specific configuration file named
+        <filename>interfaces</filename> to the
+        <filename>init-ifupdown_1.0.bb</filename> recipe for machine
+        "xyz" where the BSP layer also supports several other
+        machines:
+        <orderedlist>
+            <listitem><para>
+                Edit the
+                <filename>init-ifupdown_1.0.bbappend</filename> file
+                so that it contains the following:
+                <literallayout class='monospaced'>
      FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-                       </literallayout>
-                       The append file needs to be in the
-                       <filename>meta-xyz/recipes-core/init-ifupdown</filename> directory.
-                       </para></listitem>
-                   <listitem><para>Create and place the new <filename>interfaces</filename>
-                       configuration file in the BSP's layer here:
-                       <literallayout class='monospaced'>
+                </literallayout>
+                The append file needs to be in the
+                <filename>meta-xyz/recipes-core/init-ifupdown</filename>
+                directory.
+                </para></listitem>
+            <listitem><para>
+                Create and place the new
+                <filename>interfaces</filename> configuration file in
+                the BSP's layer here:
+                <literallayout class='monospaced'>
      meta-xyz/recipes-core/init-ifupdown/files/xyz-machine-one/interfaces
-                       </literallayout>
-                       <note>
-                           If the <filename>meta-xyz</filename> layer did not support
-                           multiple machines, you would place the
-                           <filename>interfaces</filename> configuration file in the
-                           layer here:
-                           <literallayout class='monospaced'>
+                </literallayout>
+                <note>
+                    If the <filename>meta-xyz</filename> layer did
+                    not support multiple machines, you would place
+                    the <filename>interfaces</filename> configuration
+                    file in the layer here:
+                    <literallayout class='monospaced'>
      meta-xyz/recipes-core/init-ifupdown/files/interfaces
-                           </literallayout>
-                       </note>
-                       The
-                       <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
-                       variable in the append files extends the search path
-                       the build system uses to find files during the build.
-                       Consequently, for this example you need to have the
-                       <filename>files</filename> directory in the same location
-                       as your append file.</para></listitem>
-               </orderedlist>
-            </para>
-        </section>
-
-        <section id='bsp-licensing-considerations'>
-            <title>BSP Licensing Considerations</title>
-
-            <para>
-                In some cases, a BSP contains separately licensed Intellectual Property (IP)
-                for a component or components.
-                For these cases, you are required to accept the terms of a commercial or other
-                type of license that requires some kind of explicit End User License Agreement (EULA).
-                Once the license is accepted, the OpenEmbedded build system can then build and
-                include the corresponding component in the final BSP image.
-                If the BSP is available as a pre-built image, you can download the image after
-                agreeing to the license or EULA.
-            </para>
-
-            <para>
-                You could find that some separately licensed components that are essential
-                for normal operation of the system might not have an unencumbered (or free)
-                substitute.
-                Without these essential components, the system would be non-functional.
-                Then again, you might find that other licensed components that are simply
-                'good-to-have' or purely elective do have an unencumbered, free replacement
-                component that you can use rather than agreeing to the separately licensed component.
-                Even for components essential to the system, you might find an unencumbered component
-                that is not identical but will work as a less-capable version of the
-                licensed version in the BSP recipe.
-            </para>
-
-            <para>
-                For cases where you can substitute a free component and still
-                maintain the system's functionality, the "Downloads" page from the
-                <ulink url='&YOCTO_HOME_URL;'>Yocto Project website's</ulink>
-                makes available de-featured BSPs
-                that are completely free of any IP encumbrances.
-                For these cases, you can use the substitution directly and
-                without any further licensing requirements.
-                If present, these fully de-featured BSPs are named appropriately
-                different as compared to the names of the respective
-                encumbered BSPs.
-                If available, these substitutions are your
-                simplest and most preferred options.
-                Use of these substitutions of course assumes the resulting functionality meets
-                system requirements.
-            </para>
-
-            <para>
-                If however, a non-encumbered version is unavailable or
-                it provides unsuitable functionality or quality, you can use an encumbered
-                version.
-            </para>
-
-            <para>
-                A couple different methods exist within the OpenEmbedded build system to
-                satisfy the licensing requirements for an encumbered BSP.
-                The following list describes them in order of preference:
-	        <orderedlist>
-                    <listitem><para><emphasis>Use the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></ulink>
-                        variable to define the recipes that have commercial or other
-                        types of specially-licensed packages:</emphasis>
-                        For each of those recipes, you can
-                        specify a matching license string in a
-                        <filename>local.conf</filename> variable named
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></ulink>.
-                        Specifying the matching license string signifies that you agree to the license.
-                        Thus, the build system can build the corresponding recipe and include
-                        the component in the image.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#enabling-commercially-licensed-recipes'>Enabling
-                        Commercially Licensed Recipes</ulink>" section in the Yocto Project Reference
-                        Manual for details on how to use these variables.</para>
-                        <para>If you build as you normally would, without
-		        specifying any recipes in the
-		        <filename>LICENSE_FLAGS_WHITELIST</filename>, the build stops and
-		        provides you with the list of recipes that you have
-		        tried to include in the image that need entries in
-		        the <filename>LICENSE_FLAGS_WHITELIST</filename>.
-		        Once you enter the appropriate license flags into the whitelist,
-		        restart the build to continue where it left off.
-		        During the build, the prompt will not appear again
-		        since you have satisfied the requirement.</para>
-                        <para>Once the appropriate license flags are on the white list
-		        in the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, you
-		        can build the encumbered image with no change at all
-		        to the normal build process.</para></listitem>
-                    <listitem><para><emphasis>Get a pre-built version of the BSP:</emphasis>
-                        You can get this type of BSP by visiting the
-                        "Downloads" page of the
-                        <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
-                        You can download BSP tarballs that contain proprietary components
-                        after agreeing to the licensing
-                        requirements of each of the individually encumbered
-                        packages as part of the download process.
-                        Obtaining the BSP this way allows you to access an encumbered
-                        image immediately after agreeing to the
-                        click-through license agreements presented by the
-                        website.
-                        Note that if you want to build the image
-                        yourself using the recipes contained within the BSP
-                        tarball, you will still need to create an
-                        appropriate <filename>LICENSE_FLAGS_WHITELIST</filename> to match the
-                        encumbered recipes in the BSP.</para></listitem>
-	        </orderedlist>
-            </para>
-
-            <note>
-                Pre-compiled images are bundled with
-                a time-limited kernel that runs for a
-                predetermined amount of time (10 days) before it forces
-                the system to reboot.
-                This limitation is meant to discourage direct redistribution
-                of the image.
-                You must eventually rebuild the image if you want to remove this restriction.
-            </note>
-        </section>
-
-        <section id='using-the-yocto-projects-bsp-tools'>
-            <title>Using the Yocto Project's BSP Tools</title>
-
-            <para>
-                The Yocto Project includes a couple of tools that enable
-                you to create a <link linkend='bsp-layers'>BSP layer</link>
-                from scratch and do basic configuration and maintenance
-                of the kernel without ever looking at a Metadata file.
-                These tools are <filename>yocto-bsp</filename> and <filename>yocto-kernel</filename>,
-                respectively.
-	    </para>
-
-            <para>
-                The following sections describe the common location and help features as well
-                as provide details for the
-                <filename>yocto-bsp</filename> and <filename>yocto-kernel</filename> tools.
-            </para>
-
-            <section id='common-features'>
-                <title>Common Features</title>
-
-                <para>
-                    Designed to have a  command interface somewhat like
-                    <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>, each
-                    tool is structured as a set of sub-commands under a
-                    top-level command.
-                    The top-level command (<filename>yocto-bsp</filename>
-                    or <filename>yocto-kernel</filename>) itself does
-                    nothing but invoke or provide help on the sub-commands
-                    it supports.
-                </para>
-
-                <para>
-                    Both tools reside in the <filename>scripts/</filename> subdirectory
-                    of the <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
-                    Consequently, to use the scripts, you must <filename>source</filename> the
-                    environment just as you would when invoking a build:
-                    <literallayout class='monospaced'>
-     $ source oe-init-build-env <replaceable>build_dir</replaceable>
                     </literallayout>
+                </note>
+                The
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
+                variable in the append files extends the search path
+                the build system uses to find files during the build.
+                Consequently, for this example you need to have the
+                <filename>files</filename> directory in the same
+                location as your append file.
+                </para></listitem>
+       </orderedlist>
+    </para>
+</section>
+
+<section id='bsp-licensing-considerations'>
+    <title>BSP Licensing Considerations</title>
+
+    <para>
+        In some cases, a BSP contains separately licensed
+        Intellectual Property (IP) for a component or components.
+        For these cases, you are required to accept the terms
+        of a commercial or other type of license that requires
+        some kind of explicit End User License Agreement (EULA).
+        Once you accept the license, the OpenEmbedded build system
+        can then build and include the corresponding component
+        in the final BSP image.
+        If the BSP is available as a pre-built image, you can
+        download the image after agreeing to the license or EULA.
+    </para>
+
+    <para>
+        You could find that some separately licensed components
+        that are essential for normal operation of the system might
+        not have an unencumbered (or free) substitute.
+        Without these essential components, the system would be
+        non-functional.
+        Then again, you might find that other licensed components
+        that are simply 'good-to-have' or purely elective do have
+        an unencumbered, free replacement component that you can
+        use rather than agreeing to the separately licensed
+        component.
+        Even for components essential to the system, you might
+        find an unencumbered component that is not identical but
+        will work as a less-capable version of the licensed version
+        in the BSP recipe.
+    </para>
+
+    <para>
+        For cases where you can substitute a free component and
+        still maintain the system's functionality, the "DOWNLOADS"
+        selection from the "SOFTWARE" tab on the
+        <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>
+        makes available de-featured BSPs that are completely free
+        of any IP encumbrances.
+        For these cases, you can use the substitution directly and
+        without any further licensing requirements.
+        If present, these fully de-featured BSPs are named
+        appropriately different as compared to the names of their
+        respective encumbered BSPs.
+        If available, these substitutions are your simplest and
+        most preferred options.
+        Obviously, use of these substitutions assumes the resulting
+        functionality meets system requirements.
+        <note>
+            If however, a non-encumbered version is unavailable or
+            it provides unsuitable functionality or quality, you can
+            use an encumbered version.
+        </note>
+    </para>
+
+    <para>
+        A couple different methods exist within the OpenEmbedded
+        build system to satisfy the licensing requirements for an
+        encumbered BSP.
+        The following list describes them in order of preference:
+        <orderedlist>
+            <listitem><para>
+                <emphasis>Use the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></ulink>
+                Variable to Define the Recipes that Have Commercial
+                or Other Types of Specially-Licensed Packages:</emphasis>
+                For each of those recipes, you can specify a
+                matching license string in a
+                <filename>local.conf</filename> variable named
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></ulink>.
+                Specifying the matching license string signifies
+                that you agree to the license.
+                Thus, the build system can build the corresponding
+                recipe and include the component in the image.
+                See the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</ulink>"
+                section in the Yocto Project Development Tasks
+                Manual for details on how to use these variables.
                 </para>
 
-                <para>
-                    The most immediately useful function is to get help on both tools.
-                    The built-in help system makes it easy to drill down at
-                    any time and view the syntax required for any specific command.
-                    Simply enter the name of the command with the <filename>help</filename>
-                    switch:
-                    <literallayout class='monospaced'>
-     $ yocto-bsp help
-     Usage:
+                <para>If you build as you normally would, without
+	        specifying any recipes in the
+	        <filename>LICENSE_FLAGS_WHITELIST</filename>, the
+                build stops and provides you with the list of recipes
+                that you have tried to include in the image that
+                need entries in the
+                <filename>LICENSE_FLAGS_WHITELIST</filename>.
+                Once you enter the appropriate license flags into
+                the whitelist, restart the build to continue where
+                it left off.
+	        During the build, the prompt will not appear again
+	        since you have satisfied the requirement.</para>
 
-      Create a customized Yocto BSP layer.
+                <para>Once the appropriate license flags are on the
+                white list in the
+                <filename>LICENSE_FLAGS_WHITELIST</filename> variable,
+                you can build the encumbered image with no change
+                at all to the normal build process.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Get a Pre-Built Version of the BSP:</emphasis>
+                You can get this type of BSP by selecting the
+                "DOWNLOADS" item from the "SOFTWARE" tab on the
+                <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
+                You can download BSP tarballs that contain
+                proprietary components after agreeing to the
+                licensing requirements of each of the individually
+                encumbered packages as part of the download process.
+                Obtaining the BSP this way allows you to access an
+                encumbered image immediately after agreeing to the
+                click-through license agreements presented by the
+                website.
+                If you want to build the image yourself using
+                the recipes contained within the BSP tarball,
+                you will still need to create an appropriate
+                <filename>LICENSE_FLAGS_WHITELIST</filename>
+                to match the encumbered recipes in the BSP.
+                </para></listitem>
+        </orderedlist>
+        <note>
+            Pre-compiled images are bundled with a time-limited
+            kernel that runs for a predetermined amount of time
+            (10 days) before it forces the system to reboot.
+            This limitation is meant to discourage direct
+            redistribution of the image.
+            You must eventually rebuild the image if you want
+            to remove this restriction.
+        </note>
+    </para>
+</section>
 
-      usage: yocto-bsp [--version] [--help] COMMAND [ARGS]
+<section id='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>
+    <title>Creating a new BSP Layer Using the <filename>bitbake-layers</filename> Script</title>
 
-      Current 'yocto-bsp' commands are:
-         create            Create a new Yocto BSP
-         list              List available values for options and BSP properties
+    <para>
+        The <filename>bitbake-layers create-layer</filename> script
+        automates creating a BSP layer.
+        What makes a layer a "BSP layer", is the presence of a machine
+        configuration file.
+        Additionally, a BSP layer usually has a kernel recipe
+        or an append file that leverages off an existing kernel recipe.
+        The primary requirement, however, is the machine configuration.
+    </para>
 
-      See 'yocto-bsp help COMMAND' for more information on a specific command.
+    <para>
+        Use these steps to create a BSP layer:
+        <itemizedlist>
+            <listitem><para>
+                <emphasis>Create a General Layer:</emphasis>
+                Use the <filename>bitbake-layers</filename> script with the
+                <filename>create-layer</filename> subcommand to create a
+                new general layer.
+                For instructions on how to create a general layer using the
+                <filename>bitbake-layers</filename> script, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Create a Layer Configuration File:</emphasis>
+                Every layer needs a layer configuration file.
+                This configuration file establishes locations for the
+                layer's recipes, priorities for the layer, and so forth.
+                You can find examples of <filename>layer.conf</filename>
+                files in the Yocto Project
+                <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>.
+                To get examples of what you need in your configuration
+                file, locate a layer (e.g. "meta-ti") and examine the
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-ti/tree/conf/layer.conf'></ulink>
+                file.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Create a Machine Configuration File:</emphasis>
+                Create a <filename>conf/machine/</filename><replaceable>bsp_root_name</replaceable><filename>.conf</filename>
+                file.
+                See
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp/conf/machine'><filename>meta-yocto-bsp/conf/machine</filename></ulink>
+                for sample
+                <replaceable>bsp_root_name</replaceable><filename>.conf</filename>
+                files.
+                Other samples such as
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-ti/tree/conf/machine'><filename>meta-ti</filename></ulink>
+                and
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/tree/conf/machine'><filename>meta-freescale</filename></ulink>
+                exist from other vendors that have more specific machine
+                and tuning examples.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Create a Kernel Recipe:</emphasis>
+                Create a kernel recipe in <filename>recipes-kernel/linux</filename>
+                by either using a kernel append file or a new custom kernel
+                recipe file (e.g. <filename>yocto-linux_4.12.bb</filename>).
+                The BSP layers mentioned in the previous step also contain different
+                kernel examples.
+                See the
+                "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#modifying-an-existing-recipe'>Modifying an Existing Recipe</ulink>"
+                section in the Yocto Project Linux Kernel Development Manual
+                for information on how to create a custom kernel.
+                </para></listitem>
+        </itemizedlist>
+    </para>
 
+    <para>
+        The remainder of this section provides a description of
+        the Yocto Project reference BSP for Beaglebone, which
+        resides in the
+        <ulink url='&YOCTO_DOCS_REF_URL;#term-container-layer'>Container Layer</ulink>
+        (i.e.
+        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp'><filename>meta-yocto-bsp</filename></ulink>).
+    </para>
 
-     Options:
-       --version    show program's version number and exit
-       -h, --help   show this help message and exit
-       -D, --debug  output debug information
-                    </literallayout>
-                </para>
+    <section id='bsp-layer-configuration-example'>
+        <title>BSP Layer Configuration Example</title>
 
-                <para>
-                    Similarly, entering just the name of a sub-command shows the detailed usage
-                    for that sub-command:
-                    <literallayout class='monospaced'>
-     $ yocto-bsp create
-     ERROR:root:Wrong number of arguments, exiting
+        <para>
+            The layer's <filename>conf</filename> directory
+            contains the <filename>layer.conf</filename>
+            configuration file.
+            In this example, the
+            <filename>conf/layer.conf</filename> is the
+            following:
+            <literallayout class='monospaced'>
+     # We have a conf and classes directory, add to BBPATH
+     BBPATH .= ":${LAYERDIR}"
 
-     Usage:
+     # We have recipes-* directories, add to BBFILES
+     BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+                 ${LAYERDIR}/recipes-*/*/*.bbappend"
 
-      Create a new Yocto BSP
+     BBFILE_COLLECTIONS += "yoctobsp"
+     BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
+     BBFILE_PRIORITY_yoctobsp = "5"
+     LAYERVERSION_yoctobsp = "4"
+     LAYERSERIES_COMPAT_yoctobsp = "&DISTRO_NAME_NO_CAP;"
+            </literallayout>
+            The variables used in this file configure the
+            layer.
+            A good way to learn about layer configuration
+            files is to examine various files for BSP from
+            the
+            <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>.
+        </para>
 
-      usage: yocto-bsp create &lt;bsp-name&gt; &lt;karch&gt; [-o &lt;DIRNAME&gt; | --outdir &lt;DIRNAME&gt;]
-            [-i &lt;JSON PROPERTY FILE&gt; | --infile &lt;JSON PROPERTY_FILE&gt;]
+        <para>
+            For a detailed description of this particular
+            layer configuration file, see
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-layer-config-file-description'>step 3</ulink>
+            in the discussion that describes how to create
+            layers in the Yocto Project Development Tasks Manual.
+        </para>
+    </section>
 
-      This command creates a Yocto BSP based on the specified parameters.
-      The new BSP will be a new Yocto BSP layer contained by default within
-      the top-level directory specified as 'meta-bsp-name'.  The -o option
-      can be used to place the BSP layer in a directory with a different
-      name and location.
+    <section id='bsp-machine-configuration-example'>
+        <title>BSP Machine Configuration Example</title>
 
-      The value of the 'karch' parameter determines the set of files that
-      will be generated for the BSP, along with the specific set of
-      'properties' that will be used to fill out the BSP-specific portions
-      of the BSP.  The possible values for the 'karch' parameter can be
-      listed via 'yocto-bsp list karch'.
+        <para>
+            As mentioned earlier in this section, the existence
+            of a machine configuration file is what makes a
+            layer a BSP layer as compared to a general or
+            kernel layer.
+        </para>
 
-      ...
-                    </literallayout>
-                </para>
+        <para>
+            Machine configuration files exist in the
+            <replaceable>bsp_layer</replaceable><filename>/conf/machine/</filename>
+            directory of the layer:
+            <literallayout class='monospaced'>
+     <replaceable>bsp_layer</replaceable><filename>/conf/machine/</filename><replaceable>machine</replaceable><filename>.conf</filename>
+            </literallayout>
+            For example, the machine configuration file for the
+            <ulink url='http://beagleboard.org/bone'>BeagleBone and BeagleBone Black development boards</ulink>
+            is located in the container layer
+            <filename>poky/meta-yocto-bsp/conf/machine</filename>
+            and is named <filename>beaglebone-yocto.conf</filename>:
+            <literallayout class='monospaced'>
+     #@TYPE: Machine
+     #@NAME: Beaglebone-yocto machine
+     #@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards
 
-                <para>
-                    For any sub-command, you can use the word "help" option just before the
-                    sub-command to get more extensive documentation:
-                    <literallayout class='monospaced'>
-     $ yocto-bsp help create
+     PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
+     XSERVER ?= "xserver-xorg \
+                xf86-video-modesetting \
+                "
 
-     NAME
-         yocto-bsp create - Create a new Yocto BSP
+     MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree"
 
-     SYNOPSIS
-         yocto-bsp create &lt;bsp-name> &lt;karch&gt; [-o &lt;DIRNAME&gt; | --outdir &lt;DIRNAME&gt;]
-             [-i &lt;JSON PROPERTY FILE&gt; | --infile &lt;JSON PROPERTY_FILE&gt;]
+     EXTRA_IMAGEDEPENDS += "u-boot"
 
-     DESCRIPTION
-         This command creates a Yocto BSP based on the specified
-         parameters.  The new BSP will be a new Yocto BSP layer contained
-         by default within the top-level directory specified as
-         'meta-bsp-name'.  The -o option can be used to place the BSP layer
-         in a directory with a different name and location.
+     DEFAULTTUNE ?= "cortexa8hf-neon"
+     include conf/machine/include/tune-cortexa8.inc
 
-         ...
-                    </literallayout>
-                </para>
+     IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap"
+     EXTRA_IMAGECMD_jffs2 = "-lnp "
+     WKS_FILE ?= "beaglebone-yocto.wks"
+     IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage"
+     do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
 
-                <para>
-                    Now that you know where these two commands reside and how to access information
-                    on them, you should find it relatively straightforward to discover the commands
-                    necessary to create a BSP and perform basic kernel maintenance on that BSP using
-                    the tools.
-                    <note>
-                        You can also use the <filename>bitbake-layers</filename> script to create
-                        a "generic" layer.
-                        For information on using this script to create a layer, see the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
-                        section in the Yocto Project Development Tasks Manual.
+     SERIAL_CONSOLES = "115200;ttyO0"
+
+     PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
+     PREFERRED_VERSION_linux-yocto ?= "4.12%"
+
+     KERNEL_IMAGETYPE = "zImage"
+     KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
+     KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+
+     SPL_BINARY = "MLO"
+     UBOOT_SUFFIX = "img"
+     UBOOT_MACHINE = "am335x_boneblack_config"
+     UBOOT_ENTRYPOINT = "0x80008000"
+     UBOOT_LOADADDRESS = "0x80008000"
+
+     MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
+
+     IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO"
+            </literallayout>
+            The variables used to configure the machine define
+            machine-specific properties.
+            For example, machine-dependent packages, machine
+            tunings, the type of kernel to build, and
+            U-Boot configurations.
+        </para>
+
+        <para>
+            The following list provides some explanation
+            for the statements found in the example reference
+            machine configuration file for the BeagleBone
+            development boards.
+            Realize that much more can be defined as part of
+            a machines configuration file.
+            In general, you can learn about related variables
+            that this example does not have by locating the
+            variables in the
+            "<ulink url='&YOCTO_DOCS_REF_URL;#ref-variables-glos'>Yocto Project Variables Glossary</ulink>"
+            in the Yocto Project Reference Manual.
+            <itemizedlist>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER_virtual/xserver</filename></ulink>:
+                    The recipe that provides "virtual/xserver" when
+                    more than one provider is found.
+                    In this case, the recipe that provides
+                    "virtual/xserver" is "xserver-xorg", which
+                    exists in
+                    <filename>poky/meta/recipes-graphics/xserver-xorg</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-XSERVER'><filename>XSERVER</filename></ulink>:
+                    The packages that should be installed to provide
+                    an X server and drivers for the machine.
+                    In this example, the "xserver-xorg" and
+                    "xf86-video-modesetting" are installed.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS'><filename>MACHINE_EXTRA_RRECOMMENDS</filename></ulink>:
+                    A list of machine-dependent packages
+                    not essential for booting the image.
+                    Thus, the build does not fail if the packages
+                    do not exist.
+                    However, the packages are required for a
+                    fully-featured image.
+                    <note><title>Tip</title>
+                        Many <filename>MACHINE*</filename> variables
+                        exist that help you configure a particular
+                        piece of hardware.
                     </note>
-                </para>
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGEDEPENDS'><filename>EXTRA_IMAGEDEPENDS</filename></ulink>:
+                    Recipes to build that do not provide packages
+                    for installing into the root filesystem
+                    but building the image depends on the
+                    recipes.
+                    Sometimes a recipe is required to build
+                    the final image but is not needed in the
+                    root filesystem.
+                    In this case, the U-Boot recipe must be
+                    built for the image.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></ulink>:
+                    Machines use tunings to optimize machine,
+                    CPU, and application performance.
+                    These features, which are collectively known
+                    as "tuning features", exist in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core (OE-Core)</ulink>
+                    layer (e.g.
+                    <filename>poky/meta/conf/machine/include</filename>).
+                    In this example, the default tunning file is
+                    "cortexa8hf-neon".
+                    <note>
+                        The <filename>include</filename> statement
+                        that pulls in the
+                        <filename>conf/machine/include/tune-cortexa8.inc</filename>
+                        file provides many tuning possibilities.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>:
+                    The formats the OpenEmbedded build system
+                    uses during the build when creating the
+                    root filesystem.
+                    In this example, four types of images are
+                    supported.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGECMD'><filename>EXTRA_IMAGECMD</filename></ulink>:
+                    Specifies additional options for image
+                    creation commands.
+                    In this example, the "-lnp " option is used
+                    when creating the
+                    <ulink url='https://en.wikipedia.org/wiki/JFFS2'>JFFS2</ulink>
+                    image.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-WKS_FILE'><filename>WKS_FILE</filename></ulink>:
+                    The location of the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-kickstart'>Wic kickstart</ulink>
+                    file used by the OpenEmbedded build system to
+                    create a partitioned image (image.wic).
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>:
+                    Specifies packages to install into an image
+                    through the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image'><filename>image</filename></ulink>
+                    class.
+                    Recipes use the <filename>IMAGE_INSTALL</filename>
+                    variable.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>do_image_wic[depends]</filename>:
+                    A task that is constructed during the build.
+                    In this example, the task depends on specific tools
+                    in order to create the sysroot when buiding a Wic
+                    image.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></ulink>:
+                    Defines a serial console (TTY) to enable using
+                    getty.
+                    In this case, the baud rate is "115200" and the
+                    device name is "ttyO0".
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER_virtual/kernel</filename></ulink>:
+                    Specifies the recipe that provides
+                    "virtual/kernel" when more than one provider
+                    is found.
+                    In this case, the recipe that provides
+                    "virtual/kernel" is "linux-yocto", which
+                    exists in the layer's
+                    <filename>recipes-kernel/linux</filename> directory.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION_linux-yocto</filename></ulink>:
+                    Defines the version of the recipe used
+                    to build the kernel, which is "4.12" in this
+                    case.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></ulink>:
+                    The type of kernel to build for the device.
+                    In this case, the OpenEmbedded build system
+                    creates a "zImage" image type.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_DEVICETREE'><filename>KERNEL_DEVICETREE</filename></ulink>:
+                    The name of the generated Linux kernel device
+                    tree (i.e. the <filename>.dtb</filename>) file.
+                    All the device trees for the various BeagleBone
+                    devices are included.
+<!--
+                    You have to include some *.inc files according to the definition of KERNEL_DEVICETREE.
+                    I don't see where these are being provided.
+-->
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_EXTRA_ARGS'><filename>KERNEL_EXTRA_ARGS</filename></ulink>:
+                    Additional <filename>make</filename>
+                    command-line arguments the OpenEmbedded build
+                    system passes on when compiling the kernel.
+                    In this example, "LOADADDR=${UBOOT_ENTRYPOINT}"
+                    is passed as a command-line argument.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SPL_BINARY'><filename>SPL_BINARY</filename></ulink>:
+                    Defines the Secondary Program Loader (SPL) binary
+                    type.
+                    In this case, the SPL binary is set to
+                    "MLO", which stands for Multimedia card LOader.
+                    </para>
 
-                <para>
-                    The next sections provide a concrete starting point to expand on a few points that
-                    might not be immediately obvious or that could use further explanation.
-                </para>
-            </section>
-
-
-            <section id='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>
-                <title>Creating a new BSP Layer Using the yocto-bsp Script</title>
-
-                <para>
-                    The <filename>yocto-bsp</filename> script creates a new
-                    <link linkend='bsp-layers'>BSP layer</link> for any architecture supported
-                    by the Yocto Project, as well as QEMU versions of the same.
-                    The default mode of the script's operation is to prompt you for information needed
-                    to generate the BSP layer.
-                </para>
-
-                <para>
-                    For the current set of BSPs, the script prompts you for various important
-                    parameters such as:
+                    <para>The BeagleBone development board requires an
+                    SPL to boot and that SPL file type must be MLO.
+                    Consequently, the machine configuration needs to
+                    define <filename>SPL_BINARY</filename> as "MLO".
+                    <note>
+                        For more information on how the SPL variables
+                        are used, see the
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-bsp/u-boot/u-boot.inc'><filename>u-boot.inc</filename></ulink>
+                        include file.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_ENTRYPOINT'><filename>UBOOT_*</filename></ulink>:
+                    Defines various U-Boot configurations needed
+                    to build a U-Boot image.
+                    In this example, a U-Boot image is required
+                    to boot the BeagleBone device.
+                    See the following variables for more information:
                     <itemizedlist>
-                        <listitem><para>The kernel to use</para></listitem>
-                        <listitem><para>The branch of that kernel to use (or re-use)</para></listitem>
-                        <listitem><para>Whether or not to use X, and if so, which drivers to use</para></listitem>
-                        <listitem><para>Whether to turn on SMP</para></listitem>
-                        <listitem><para>Whether the BSP has a keyboard</para></listitem>
-                        <listitem><para>Whether the BSP has a touchscreen</para></listitem>
-                        <listitem><para>Remaining configurable items associated with the BSP</para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_SUFFIX'><filename>UBOOT_SUFFIX</filename></ulink>:
+                            Points to the generated U-Boot extension.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></ulink>:
+                            Specifies the value passed on the make command line when building a U-Boot image.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_ENTRYPOINT'><filename>UBOOT_ENTRYPOINT</filename></ulink>:
+                            Specifies the entry point for the U-Boot image.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_LOADADDRESS'><filename>UBOOT_LOADADDRESS</filename></ulink>:
+                            Specifies the load address for the U-Boot image.
+                            </para></listitem>
                     </itemizedlist>
-                </para>
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></ulink>:
+                    Specifies the list of hardware features the
+                    BeagleBone device is capable of supporting.
+                    In this case, the device supports
+                    "usbgadget usbhost vfat alsa".
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_BOOT_FILES'><filename>IMAGE_BOOT_FILES</filename></ulink>:
+                    Files installed into the device's boot partition
+                    when preparing the image using the Wic tool
+                    with the <filename>bootimg-partition</filename>
+                    source plugin.
+                    In this case, the "u-boot.${UBOOT_SUFFIX}" and
+                    "MLO" files are installed.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
 
-                <para>
-                    You use the <filename>yocto-bsp create</filename> sub-command to create
-                    a new BSP layer.
-                    This command requires you to specify a particular kernel architecture
-                    (<filename>karch</filename>) on which to base the BSP.
-                    Assuming you have sourced the environment, you can use the
-                    <filename>yocto-bsp list karch</filename> sub-command to list the
-                    architectures available for BSP creation as follows:
-                    <literallayout class='monospaced'>
-     $ yocto-bsp list karch
-     Architectures available:
-         powerpc
-         x86_64
-         i386
-         arm
-         qemu
-         mips
-         mips64
-                    </literallayout>
-                </para>
+    <section id='bsp-kernel-recipe-example'>
+        <title>BSP Kernel Recipe Example</title>
 
-                <para>
-                    The remainder of this section presents an example that uses
-                    <filename>myarm</filename> as the machine name and <filename>qemu</filename>
-                    as the machine architecture.
-                    Of the available architectures, <filename>qemu</filename> is the only architecture
-                    that causes the script to prompt you further for an actual architecture.
-                    In every other way, this architecture is representative of how creating a BSP for
-                    an actual machine would work.
-                    The reason the example uses this architecture is because it is an emulated architecture
-                    and can easily be followed without requiring actual hardware.
-                </para>
+        <para>
+            The kernel recipe used to build the kernel image
+            for the BeagleBone device was established in the
+            machine configuration:
+            <literallayout class='monospaced'>
+     PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
+     PREFERRED_VERSION_linux-yocto ?= "4.12%"
+            </literallayout>
+            The <filename>meta-yocto-bsp/recipes-kernel/linux</filename>
+            directory in the layer contains metadata used
+            to build the kernel.
+            In this case, a kernel append file is used to
+            override an established kernel recipe, which is
+            located in
+            <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/linux'></ulink>
+            and named
+            <filename>linux-yocto_4.12.bb</filename>.
+        </para>
 
-                <para>
-                    As the <filename>yocto-bsp create</filename> command runs, default values for
-                    the prompts appear in brackets.
-                    Pressing enter without supplying anything on the command line or pressing enter
-                    with an invalid response causes the script to accept the default value.
-                    Once the script completes, the new <filename>meta-myarm</filename> BSP layer
-                    is created in the current working directory.
-                    This example assumes you have sourced the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
-                    setup script.
-                </para>
+        <para>
+            Following is the contents of the append file:
+            <literallayout class='monospaced'>
+     KBRANCH_genericx86  = "standard/base"
+     KBRANCH_genericx86-64  = "standard/base"
 
-                <para>
-                    Following is the complete example:
-                    <literallayout class='monospaced'>
-     $ yocto-bsp create myarm qemu
-     Checking basic git connectivity...
-     Done.
+     KMACHINE_genericx86 ?= "common-pc"
+     KMACHINE_genericx86-64 ?= "common-pc-64"
+     KBRANCH_edgerouter = "standard/edgerouter"
+     KBRANCH_beaglebone-yocto = "standard/beaglebone"
+     KMACHINE_beaglebone-yocto = "beaglebone"
+     KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
 
-     Which qemu architecture would you like to use? [default: i386]
-	     1) i386    (32-bit)
-	     2) x86_64  (64-bit)
-	     3) ARM     (32-bit)
-	     4) PowerPC (32-bit)
-	     5) MIPS    (32-bit)
-	     6) MIPS64  (64-bit)
-     3
-     Would you like to use the default (4.8) kernel? (y/n) [default: y]
-     Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y]
-     Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-4.8.git...
-     Please choose a machine branch to base this BSP on: [default: standard/base]
-	     1) standard/arm-versatile-926ejs
-	     2) standard/base
-	     3) standard/beaglebone
-	     4) standard/edgerouter
-	     5) standard/fsl-mpc8315e-rdb
-	     6) standard/mti-malta32
-	     7) standard/mti-malta64
-	     8) standard/qemuarm64
-	     9) standard/qemuppc
-     1
-     Would you like SMP support? (y/n) [default: y]
-     Does your BSP have a touchscreen? (y/n) [default: n]
-     Does your BSP have a keyboard? (y/n) [default: y]
-
-     New qemu BSP created in meta-myarm
-                    </literallayout>
-                    Take a closer look at the example now:
-                    <orderedlist>
-                        <listitem><para>For the QEMU architecture,
-                            the script first prompts you for which emulated architecture to use.
-                            In the example, we use the ARM architecture.
-                            </para></listitem>
-                        <listitem><para>The script then prompts you for the kernel.
-                            The default 4.8 kernel is acceptable.
-                            So, the example accepts the default.
-                            If you enter 'n', the script prompts you to further enter the kernel
-                            you do want to use.</para></listitem>
-                        <listitem><para>Next, the script asks whether you would like to have a new
-                            branch created especially for your BSP in the local
-                            Linux Yocto Kernel Git repository .
-                            If not, then the script re-uses an existing branch.</para>
-                            <para>In this example, the default (or "yes") is accepted.
-                            Thus, a new branch is created for the BSP rather than using a common, shared
-                            branch.
-                            The new branch is the branch committed to for any patches you might later add.
-                            The reason a new branch is the default is that typically
-                            new BSPs do require BSP-specific patches.
-                            The tool thus assumes that most of time a new branch is required.
-                            </para></listitem>
-                        <listitem><para>Regardless of which choice you make in the previous step,
-                            you are now given the opportunity to select a particular machine branch on
-                            which to base your new BSP-specific machine branch
-                            (or to re-use if you had elected to not create a new branch).
-                            Because this example is generating an ARM-based BSP, the example
-                            uses <filename>#1</filename> at the prompt, which selects the ARM-versatile branch.
-                            </para></listitem>
-                        <listitem><para>The remainder of the prompts are routine.
-                            Defaults are accepted for each.</para></listitem>
-                        <listitem><para>By default, the script creates the new BSP Layer in the
-                            current working directory of the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
-                            (i.e. <filename>poky/build</filename>).
-                            </para></listitem>
-                    </orderedlist>
-                </para>
-
-                <para>
-                    Once the BSP Layer is created, you must add it to your
-                    <filename>bblayers.conf</filename> file.
-                    Here is an example:
-                    <literallayout class='monospaced'>
-     BBLAYERS = ? " \
-        /usr/local/src/yocto/meta \
-        /usr/local/src/yocto/meta-poky \
-        /usr/local/src/yocto/meta-yocto-bsp \
-        /usr/local/src/yocto/meta-myarm \
-        "
-                    </literallayout>
-                    Adding the layer to this file allows the build system to build the BSP and
-                    the <filename>yocto-kernel</filename> tool to be able to find the layer and
-                    other Metadata it needs on which to operate.
-                </para>
-            </section>
-
-            <section id='managing-kernel-patches-and-config-items-with-yocto-kernel'>
-                <title>Managing Kernel Patches and Config Items with yocto-kernel</title>
-
-                <para>
-                    Assuming you have created a <link linkend='bsp-layers'>BSP Layer</link> using
-                    <link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>
-                    <filename>yocto-bsp</filename></link> and you added it to your
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
-                    variable in the <filename>bblayers.conf</filename> file, you can now use
-                    the <filename>yocto-kernel</filename> script to add patches and configuration
-                    items to the BSP's kernel.
-                </para>
-
-                <para>
-                    The <filename>yocto-kernel</filename> script allows you to add, remove, and list patches
-                    and kernel config settings to a BSP's kernel
-                    <filename>.bbappend</filename> file.
-                    All you need to do is use the appropriate sub-command.
-                    Recall that the easiest way to see exactly what sub-commands are available
-                    is to use the <filename>yocto-kernel</filename> built-in help as follows:
-                    <literallayout class='monospaced'>
-     $ yocto-kernel --help
-     Usage:
-
-      Modify and list Yocto BSP kernel config items and patches.
-
-      usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
-
-      Current 'yocto-kernel' commands are:
-        config list       List the modifiable set of bare kernel config options for a BSP
-        config add        Add or modify bare kernel config options for a BSP
-        config rm         Remove bare kernel config options from a BSP
-        patch list        List the patches associated with a BSP
-        patch add         Patch the Yocto kernel for a BSP
-        patch rm          Remove patches from a BSP
-        feature list      List the features used by a BSP
-        feature add       Have a BSP use a feature
-        feature rm        Have a BSP stop using a feature
-        features list     List the features available to BSPs
-        feature describe  Describe a particular feature
-        feature create    Create a new BSP-local feature
-        feature destroy   Remove a BSP-local feature
-
-      See 'yocto-kernel help COMMAND' for more information on a specific command.
+     SRCREV_machine_genericx86    ?= "1c4ad569af3e23a77994235435040e322908687f"
+     SRCREV_machine_genericx86-64 ?= "1c4ad569af3e23a77994235435040e322908687f"
+     SRCREV_machine_edgerouter ?= "257f843ea367744620f1d92910afd2f454e31483"
+     SRCREV_machine_beaglebone-yocto ?= "257f843ea367744620f1d92910afd2f454e31483"
+     SRCREV_machine_mpc8315e-rdb ?= "014560874f9eb2a86138c9cc35046ff1720485e1"
 
 
+     COMPATIBLE_MACHINE_genericx86 = "genericx86"
+     COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
+     COMPATIBLE_MACHINE_edgerouter = "edgerouter"
+     COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
+     COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
 
-     Options:
-       --version    show program's version number and exit
-       -h, --help   show this help message and exit
-       -D, --debug  output debug information
-                    </literallayout>
-                </para>
+     LINUX_VERSION_genericx86 = "4.12.20"
+     LINUX_VERSION_genericx86-64 = "4.12.20"
+     LINUX_VERSION_edgerouter = "4.12.19"
+     LINUX_VERSION_beaglebone-yocto = "4.12.19"
+     LINUX_VERSION_mpc8315e-rdb = "4.12.19"
+            </literallayout>
+            This particular append file works for all the
+            machines that are part of the
+            <filename>meta-yocto-bsp</filename> container
+            layer.
+            The relevant statements are appended with
+            the "beaglebone-yocto" string.
+            The OpenEmbedded build system uses these
+            statements to override similar statements
+            in the kernel recipe:
+            <itemizedlist>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>:
+                    Identifies the kernel branch that is validated,
+                    patched, and configured during the build.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>:
+                    Identifies the machine name as known by the
+                    kernel, which is sometimes a different name
+                    than what is known by the OpenEmbedded build
+                    system.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>:
+                    Identifies the revision of the source code used
+                    to build the image.
+<!--
+                    You find out about that point in the kernel source tree by
+                    doing the following command:
 
-                <para>
-                    The <filename>yocto-kernel patch add</filename> sub-command allows you to add a
-                    patch to a BSP.
-                    The following example adds two patches to the <filename>myarm</filename> BSP:
-                    <literallayout class='monospaced'>
-     $ yocto-kernel patch add myarm ~/test.patch
-     Added patches:
-       test.patch
+                    git log &dash;&dash;decorate 257f843ea367744620f1d92910afd2f454e31483
 
-     $ yocto-kernel patch add myarm ~/yocto-testmod.patch
-     Added patches:
-       yocto-testmod.patch
-                    </literallayout>
-                    <note>Although the previous example adds patches one at a time, it is possible
-                    to add multiple patches at the same time.</note>
-                </para>
-
-                <para>
-                    You can verify patches have been added by using the
-                    <filename>yocto-kernel patch list</filename> sub-command.
-                    Here is an example:
-                    <literallayout class='monospaced'>
-     $ yocto-kernel patch list myarm
-     The current set of machine-specific patches for myarm is:
-       1) test.patch
-       2) yocto-testmod.patch
-                    </literallayout>
-                </para>
-
-                <para>
-                    You can also use the <filename>yocto-kernel</filename> script to
-                    remove a patch using the <filename>yocto-kernel patch rm</filename> sub-command.
-                    Here is an example:
-                    <literallayout class='monospaced'>
-     $ yocto-kernel patch rm myarm
-     Specify the patches to remove:
-       1) test.patch
-       2) yocto-testmod.patch
-     1
-     Removed patches:
-       test.patch
-                    </literallayout>
-                </para>
-
-                <para>
-                    Again, using the <filename>yocto-kernel patch list</filename> sub-command,
-                    you can verify that the patch was in fact removed:
-                    <literallayout class='monospaced'>
-     $ yocto-kernel patch list myarm
-     The current set of machine-specific patches for myarm is:
-       1) yocto-testmod.patch
-                    </literallayout>
-                </para>
-
-                <para>
-                    In a completely similar way, you can use the <filename>yocto-kernel config add</filename>
-                    sub-command to add one or more kernel config item settings to a BSP.
-                    The following commands add a couple of config items to the
-                    <filename>myarm</filename> BSP:
-                    <literallayout class='monospaced'>
-     $ yocto-kernel config add myarm CONFIG_MISC_DEVICES=y
-     Added item:
-       CONFIG_MISC_DEVICES=y
-
-     $ yocto-kernel config add myarm CONFIG_YOCTO_TESTMOD=y
-     Added item:
-       CONFIG_YOCTO_TESTMOD=y
-                    </literallayout>
-                    <note>
-                        Although the previous example adds config items one at a time, it is possible
-                        to add multiple config items at the same time.
-                    </note>
-                </para>
-
-                <para>
-                    You can list the config items now associated with the BSP.
-                    Doing so shows you the config items you added as well as others associated
-                    with the BSP:
-                    <literallayout class='monospaced'>
-     $ yocto-kernel config list myarm
-     The current set of machine-specific kernel config items for myarm is:
-             1) CONFIG_MISC_DEVICES=y
-             2) CONFIG_YOCTO_TESTMOD=y
-                    </literallayout>
-                </para>
-
-                <para>
-                    Finally, you can remove one or more config items using the
-                    <filename>yocto-kernel config rm</filename> sub-command in a manner
-                    completely analogous to <filename>yocto-kernel patch rm</filename>.
-                </para>
-            </section>
-        </section>
+                    Returns information about the commit, which is usually
+                    that it is a merge point for a stable kernel release.
+-->
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>:
+                    A regular expression that resolves to one or
+                    more target machines with which the recipe
+                    is compatible.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>:
+                    The Linux version from kernel.org used by
+                    the OpenEmbedded build system to build the
+                    kernel image.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</section>
 </chapter>
diff --git a/import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.png b/import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.png
index 0f82a1f..2ca1fec 100644
--- a/import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.png
+++ b/import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
index 0081738..fe1bfba 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -22,90 +22,24 @@
             multiple layers.
             Layers allow you to isolate different types of customizations from
             each other.
-            You might find it tempting to keep everything in one layer when
-            working on a single project.
-            However, the more modular your Metadata, the easier
-            it is to cope with future changes.
+            For introductory information on the Yocto Project Layer Model,
+            see the
+            "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
 
-        <para>
-            To illustrate how layers are used to keep things modular, consider
-            machine customizations.
-            These types of customizations typically reside in a special layer,
-            rather than a general layer, called a Board Support Package (BSP)
-            Layer.
-            Furthermore, the machine customizations should be isolated from
-            recipes and Metadata that support a new GUI environment,
-            for example.
-            This situation gives you a couple of layers: one for the machine
-            configurations, and one for the GUI environment.
-            It is important to understand, however, that the BSP layer can
-            still make machine-specific additions to recipes within the GUI
-            environment layer without polluting the GUI layer itself
-            with those machine-specific changes.
-            You can accomplish this through a recipe that is a BitBake append
-            (<filename>.bbappend</filename>) file, which is described later
-            in this section.
-            <note>
-                For general information on BSP layer structure, see the
-                <ulink url='&YOCTO_DOCS_BSP_URL;#bsp'>Board Support Packages (BSP) - Developer's Guide</ulink>.
-            </note>
-        </para>
-
-        <para>
-        </para>
-
-        <section id='yocto-project-layers'>
-            <title>Layers</title>
-
-            <para>
-                The <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                contains both general layers and BSP
-                layers right out of the box.
-                You can easily identify layers that ship with a
-                Yocto Project release in the Source Directory by their
-                folder names.
-                Folders that represent layers typically have names that begin with
-                the string <filename>meta-</filename>.
-                <note>
-                    It is not a requirement that a layer name begin with the
-                    prefix <filename>meta-</filename>, but it is a commonly
-                    accepted standard in the Yocto Project community.
-                </note>
-                For example, when you set up the Source Directory structure,
-                you will see several layers:
-                <filename>meta</filename>,
-                <filename>meta-skeleton</filename>,
-                <filename>meta-selftest</filename>,
-                <filename>meta-poky</filename>, and
-                <filename>meta-yocto-bsp</filename>.
-                Each of these folders represents a distinct layer.
-            </para>
-
-            <para>
-                As another example, if you set up a local copy of the
-                <filename>meta-intel</filename> Git repository
-                and then explore the folder of that general layer,
-                you will discover many Intel-specific BSP layers inside.
-                For more information on BSP layers, see the
-                "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
-                section in the Yocto Project Board Support Package (BSP)
-                Developer's Guide.
-            </para>
-        </section>
-
         <section id='creating-your-own-layer'>
             <title>Creating Your Own Layer</title>
 
             <para>
                 It is very easy to create your own layers to use with the
                 OpenEmbedded build system.
-                The Yocto Project ships with scripts that speed up creating
-                general layers and BSP layers.
+                The Yocto Project ships with tools that speed up creating
+                layers.
                 This section describes the steps you perform by hand to create
-                a layer so that you can better understand them.
-                For information about the layer-creation scripts, see the
-                "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
+                layers so that you can better understand them.
+                For information about the layer-creation tools, see the
+                "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
                 section in the Yocto Project Board Support Package (BSP)
                 Developer's Guide and the
                 "<link linkend='creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</link>"
@@ -113,40 +47,70 @@
             </para>
 
             <para>
-                Follow these general steps to create your layer without the aid of a script:
+                Follow these general steps to create your layer without using
+                tools:
                 <orderedlist>
-                    <listitem><para><emphasis>Check Existing Layers:</emphasis>
+                    <listitem><para>
+                        <emphasis>Check Existing Layers:</emphasis>
                         Before creating a new layer, you should be sure someone
                         has not already created a layer containing the Metadata
                         you need.
                         You can see the
-                        <ulink url='http://layers.openembedded.org/layerindex/layers/'><filename>OpenEmbedded Metadata Index</filename></ulink>
+                        <ulink url='http://layers.openembedded.org/layerindex/layers/'>OpenEmbedded Metadata Index</ulink>
                         for a list of layers from the OpenEmbedded community
                         that can be used in the Yocto Project.
+                        You could find a layer that is identical or close to
+                        what you need.
                         </para></listitem>
-                    <listitem><para><emphasis>Create a Directory:</emphasis>
+                    <listitem><para>
+                        <emphasis>Create a Directory:</emphasis>
                         Create the directory for your layer.
-                        While not strictly required, prepend the name of the
-                        folder with the string <filename>meta-</filename>.
+                        When you create the layer, be sure to create the
+                        directory in an area not associated with the
+                        Yocto Project
+                        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                        (e.g. the cloned <filename>poky</filename> repository).
+                        </para>
+
+                        <para>While not strictly required, prepend the name of
+                        the directory with the string "meta-".
                         For example:
                         <literallayout class='monospaced'>
      meta-mylayer
      meta-GUI_xyz
      meta-mymachine
                         </literallayout>
+                        With rare exceptions, a layer's name follows this
+                        form:
+                        <literallayout class='monospaced'>
+     meta-<replaceable>root_name</replaceable>
+                        </literallayout>
+                        Following this layer naming convention can
+                        save you trouble later when tools, components, or
+                        variables "assume" your layer name begins with "meta-".
+                        A notable example is in configuration files as
+                        shown in the following step where layer names without
+                        the "meta-" string are appended
+                        to several variables used in the configuration.
                         </para></listitem>
-                    <listitem><para><emphasis>Create a Layer Configuration
-                       File:</emphasis>
-                       Inside your new layer folder, you need to create a
-                       <filename>conf/layer.conf</filename> file.
-                       It is easiest to take an existing layer configuration
-                       file and copy that to your layer's
-                       <filename>conf</filename> directory and then modify the
-                       file as needed.</para>
-                       <para>The
-                       <filename>meta-yocto-bsp/conf/layer.conf</filename> file
-                       demonstrates the required syntax:
-                       <literallayout class='monospaced'>
+                    <listitem><para id='dev-layer-config-file-description'>
+                        <emphasis>Create a Layer Configuration File:</emphasis>
+                        Inside your new layer folder, you need to create a
+                        <filename>conf/layer.conf</filename> file.
+                        It is easiest to take an existing layer configuration
+                        file and copy that to your layer's
+                        <filename>conf</filename> directory and then modify the
+                        file as needed.</para>
+
+                        <para>The
+                        <filename>meta-yocto-bsp/conf/layer.conf</filename> file
+                        in the Yocto Project
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp/conf'>Source Repositories</ulink>
+                        demonstrates the required syntax.
+                        For your layer, you need to replace "yoctobsp" with
+                        a unique identifier for your layer (e.g. "machinexyz"
+                        for a layer named "meta-machinexyz"):
+                        <literallayout class='monospaced'>
      # We have a conf and classes directory, add to BBPATH
      BBPATH .= ":${LAYERDIR}"
 
@@ -157,75 +121,82 @@
      BBFILE_COLLECTIONS += "yoctobsp"
      BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
      BBFILE_PRIORITY_yoctobsp = "5"
-     LAYERVERSION_yoctobsp = "3"
-                        </literallayout></para>
-                        <para>Here is an explanation of the example:
+     LAYERVERSION_yoctobsp = "4"
+     LAYERSERIES_COMPAT_yoctobsp = "&DISTRO_NAME_NO_CAP;"
+                        </literallayout>
+                        Following is an explanation of the layer configuration
+                        file:
                         <itemizedlist>
-                            <listitem><para>The configuration and
-                                classes directory is appended to
-                                <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>.
-                                <note>
-                                    All non-distro layers, which include all BSP
-                                    layers, are expected to append the layer
-                                    directory to the
-                                    <filename>BBPATH</filename>.
-                                    On the other hand, distro layers, such as
-                                    <filename>meta-poky</filename>, can choose
-                                    to enforce their own precedence over
-                                    <filename>BBPATH</filename>.
-                                    For an example of that syntax, see the
-                                    <filename>layer.conf</filename> file for
-                                    the <filename>meta-poky</filename> layer.
-                                </note></para></listitem>
-                            <listitem><para>The recipes for the layers are
-                                appended to
-                                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'>BBFILES</ulink></filename>.
+                            <listitem><para>
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>:
+                                Adds the layer's root directory to BitBake's
+                                search path.
+                                Through the use of the
+                                <filename>BBPATH</filename> variable, BitBake
+                                locates class files
+                                (<filename>.bbclass</filename>),
+                                configuration files, and files that are
+                                included with <filename>include</filename> and
+                                <filename>require</filename> statements.
+                                For these cases, BitBake uses the first file
+                                that matches the name found in
+                                <filename>BBPATH</filename>.
+                                This is similar to the way the
+                                <filename>PATH</filename> variable is used for
+                                binaries.
+                                It is recommended, therefore, that you use
+                                unique class and configuration filenames in
+                                your custom layer.
                                 </para></listitem>
-                            <listitem><para>The
-                                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename>
-                                variable is then appended with the layer name.
-                                </para></listitem>
-                            <listitem><para>The
-                                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename>
-                                variable is set to a regular expression and is
-                                used to match files from
-                                <filename>BBFILES</filename> into a particular
+                            <listitem><para>
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'><filename>BBFILES</filename></ulink>:
+                                Defines the location for all recipes in the
                                 layer.
-                                In this case,
-                                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename>
-                                is used to make <filename>BBFILE_PATTERN</filename> match within the
-                                layer's path.</para></listitem>
-                            <listitem><para>The
-                                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename>
-                                variable then assigns a priority to the layer.
-                                Applying priorities is useful in situations
-                                where the same recipe might appear in multiple
-                                layers and allows you to choose the layer
-                                that takes precedence.</para></listitem>
-                            <listitem><para>The
-                                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERVERSION'>LAYERVERSION</ulink></filename>
-                                variable optionally specifies the version of a
-                                layer as a single number.</para></listitem>
-                        </itemizedlist></para>
-                        <para>Note the use of the
-                        <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename>
-                        variable, which expands to the directory of the current
-                        layer.</para>
-                        <para>Through the use of the <filename>BBPATH</filename>
-                        variable, BitBake locates class files
-                        (<filename>.bbclass</filename>),
-                        configuration files, and files that are included
-                        with <filename>include</filename> and
-                        <filename>require</filename> statements.
-                        For these cases, BitBake uses the first file that
-                        matches the name found in <filename>BBPATH</filename>.
-                        This is similar to the way the <filename>PATH</filename>
-                        variable is used for binaries.
-                        It is recommended, therefore, that you use unique
-                        class and configuration
-                        filenames in your custom layer.</para></listitem>
-                    <listitem><para><emphasis>Add Content:</emphasis> Depending
-                        on the type of layer, add the content.
+                                </para></listitem>
+                            <listitem><para>
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'><filename>BBFILE_COLLECTIONS</filename></ulink>:
+                                Establishes the current layer through a
+                                unique identifier that is used throughout the
+                                OpenEmbedded build system to refer to the layer.
+                                In this example, the identifier "yoctobsp" is
+                                the representation for the container layer
+                                named "meta-yocto-bsp".
+                                </para></listitem>
+                            <listitem><para>
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'><filename>BBFILE_PATTERN</filename></ulink>:
+                                Expands immediately during parsing to
+                                provide the directory of the layer.
+                                </para></listitem>
+                            <listitem><para>
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>:
+                                Establishes a priority to use for
+                                recipes in the layer when the OpenEmbedded build
+                                finds recipes of the same name in different
+                                layers.
+                                </para></listitem>
+                            <listitem><para>
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERVERSION'><filename>LAYERVERSION</filename></ulink>:
+                                Establishes a version number for the layer.
+                                You can use this version number to specify this
+                                exact version of the layer as a dependency when
+                                using the
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></ulink>
+                                variable.
+                                </para></listitem>
+                            <listitem><para>
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERSERIES_COMPAT'><filename>LAYERSERIES_COMPAT</filename></ulink>:
+                                Lists the
+                                <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Yocto Project</ulink>
+                                releases for which the current version is
+                                compatible.
+                                This variable is a good way to indicate how
+                                up-to-date your particular layer is.
+                                </para></listitem>
+                        </itemizedlist>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Add Content:</emphasis>
+                        Depending on the type of layer, add the content.
                         If the layer adds support for a machine, add the machine
                         configuration in a <filename>conf/machine/</filename>
                         file within the layer.
@@ -235,9 +206,13 @@
                         If the layer introduces new recipes, put the recipes
                         you need in <filename>recipes-*</filename>
                         subdirectories within the layer.
-                        <note>In order to be compliant with the Yocto Project,
-                            a layer must contain a
-                            <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-readme'>README file.</ulink>
+                        <note>
+                            For an explanation of layer hierarchy that
+                            is compliant with the Yocto Project, see
+                            the
+                            "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
+                            section in the Yocto Project Board
+                            Support Package (BSP) Developer's Guide.
                         </note>
                         </para></listitem>
                     <listitem><para>
@@ -492,7 +467,7 @@
                         acceptable explanation for any questions answered "No".
                         </para></listitem>
                     <listitem><para>
-                        You need to be a Yocto Project Member Organization.
+                        Be a Yocto Project Member Organization.
                         </para></listitem>
                 </itemizedlist>
             </para>
@@ -562,7 +537,7 @@
                 </para>
 
                 <para>
-                    The script divides tests into three areas: COMMON, BSD,
+                    The script divides tests into three areas: COMMON, BSP,
                     and DISTRO.
                     For example, given a distribution layer (DISTRO), the
                     layer must pass both the COMMON and DISTRO related tests.
@@ -646,23 +621,26 @@
                 The following example shows how to enable a layer named
                 <filename>meta-mylayer</filename>:
                 <literallayout class='monospaced'>
-     LCONF_VERSION = "6"
+     # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
+     # changes incompatibly
+     POKY_BBLAYERS_CONF_VERSION = "2"
 
      BBPATH = "${TOPDIR}"
      BBFILES ?= ""
 
      BBLAYERS ?= " \
-       $HOME/poky/meta \
-       $HOME/poky/meta-poky \
-       $HOME/poky/meta-yocto-bsp \
-       $HOME/poky/meta-mylayer \
+       /home/<replaceable>user</replaceable>/poky/meta \
+       /home/<replaceable>user</replaceable>/poky/meta-poky \
+       /home/<replaceable>user</replaceable>/poky/meta-yocto-bsp \
+       /home/<replaceable>user</replaceable>/poky/meta-mylayer \
        "
                 </literallayout>
             </para>
 
             <para>
                 BitBake parses each <filename>conf/layer.conf</filename> file
-                as specified in the <filename>BBLAYERS</filename> variable
+                from the top down as specified in the
+                <filename>BBLAYERS</filename> variable
                 within the <filename>conf/bblayers.conf</filename> file.
                 During the processing of each
                 <filename>conf/layer.conf</filename> file, BitBake adds the
@@ -840,8 +818,7 @@
             <para>
                 To specify the layer's priority manually, use the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
-                variable.
-                For example:
+                variable and append the layer's root name:
                 <literallayout class='monospaced'>
      BBFILE_PRIORITY_mylayer = "1"
                 </literallayout>
@@ -862,7 +839,8 @@
             <title>Managing Layers</title>
 
             <para>
-                You can use the BitBake layer management tool to provide a view
+                You can use the BitBake layer management tool
+                <filename>bitbake-layers</filename> to provide a view
                 into the structure of recipes across a multi-layer project.
                 Being able to generate output that reports on configured layers
                 with their paths and priorities and on
@@ -871,42 +849,88 @@
             </para>
 
             <para>
-                Use the following form when running the layer management tool.
+                For help on the BitBake layer management tool, use the
+                following command:
                 <literallayout class='monospaced'>
-     $ bitbake-layers <replaceable>command</replaceable> [<replaceable>arguments</replaceable>]
+     $ bitbake-layers --help
+     NOTE: Starting bitbake server...
+     usage: bitbake-layers [-d] [-q] [-F] [--color COLOR] [-h] &lt;subcommand&gt; ...
+
+     BitBake layers utility
+
+     optional arguments:
+       -d, --debug           Enable debug output
+       -q, --quiet           Print only errors
+       -F, --force           Force add without recipe parse verification
+       --color COLOR         Colorize output (where COLOR is auto, always, never)
+       -h, --help            show this help message and exit
+
+     subcommands:
+       &lt;subcommand&gt;
+         show-layers         show current configured layers.
+         show-overlayed      list overlayed recipes (where the same recipe exists
+                             in another layer)
+         show-recipes        list available recipes, showing the layer they are
+                             provided by
+         show-appends        list bbappend files and recipe files they apply to
+         show-cross-depends  Show dependencies between recipes that cross layer
+                             boundaries.
+         add-layer           Add one or more layers to bblayers.conf.
+         remove-layer        Remove one or more layers from bblayers.conf.
+         flatten             flatten layer configuration into a separate output
+                             directory.
+         layerindex-fetch    Fetches a layer from a layer index along with its
+                             dependent layers, and adds them to conf/bblayers.conf.
+         layerindex-show-depends
+                             Find layer dependencies from layer index.
+         create-layer        Create a basic layer
+
+     Use bitbake-layers &lt;subcommand&gt; --help to get help on a specific command
                 </literallayout>
+            </para>
+
+            <para>
                 The following list describes the available commands:
                 <itemizedlist>
-                    <listitem><para><filename><emphasis>help:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>help:</filename></emphasis>
                         Displays general help or help on a specified command.
                         </para></listitem>
-                    <listitem><para><filename><emphasis>show-layers:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>show-layers:</filename></emphasis>
                         Shows the current configured layers.
                         </para></listitem>
-                    <listitem><para><filename><emphasis>show-recipes:</emphasis></filename>
-                        Lists available recipes and the layers that provide them.
-                        </para></listitem>
-                    <listitem><para><filename><emphasis>show-overlayed:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>show-overlayed:</filename></emphasis>
                         Lists overlayed recipes.
                         A recipe is overlayed when a recipe with the same name
                         exists in another layer that has a higher layer
                         priority.
                         </para></listitem>
-                    <listitem><para><filename><emphasis>show-appends:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>show-recipes:</filename></emphasis>
+                        Lists available recipes and the layers that provide them.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis><filename>show-appends:</filename></emphasis>
                         Lists <filename>.bbappend</filename> files and the
                         recipe files to which they apply.
                         </para></listitem>
-                    <listitem><para><filename><emphasis>show-cross-depends:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>show-cross-depends:</filename></emphasis>
                         Lists dependency relationships between recipes that
                         cross layer boundaries.
                         </para></listitem>
-                    <listitem><para><filename><emphasis>add-layer:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>add-layer:</filename></emphasis>
                         Adds a layer to <filename>bblayers.conf</filename>.
                         </para></listitem>
-                    <listitem><para><filename><emphasis>remove-layer:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>remove-layer:</filename></emphasis>
                         Removes a layer from <filename>bblayers.conf</filename>
                         </para></listitem>
-                    <listitem><para><filename><emphasis>flatten:</emphasis></filename>
+                    <listitem><para>
+                        <emphasis><filename>flatten:</filename></emphasis>
                         Flattens the layer configuration into a separate output
                         directory.
                         Flattening your layer configuration builds a "flattened"
@@ -917,18 +941,21 @@
                         You might have to perform some manual cleanup of the
                         flattened layer as follows:
                         <itemizedlist>
-                            <listitem><para>Non-recipe files (such as patches)
+                            <listitem><para>
+                                Non-recipe files (such as patches)
                                 are overwritten.
                                 The flatten command shows a warning for these
                                 files.
                                 </para></listitem>
-                            <listitem><para>Anything beyond the normal layer
+                            <listitem><para>
+                                Anything beyond the normal layer
                                 setup has been added to the
                                 <filename>layer.conf</filename> file.
                                 Only the lowest priority layer's
                                 <filename>layer.conf</filename> is used.
                                 </para></listitem>
-                            <listitem><para>Overridden and appended items from
+                            <listitem><para>
+                                Overridden and appended items from
                                 <filename>.bbappend</filename> files need to be
                                 cleaned up.
                                 The contents of each
@@ -1000,13 +1027,13 @@
                             Developer's Guide.
                             </para></listitem>
                         <listitem><para>
-                            The <filename>bitbake-layers</filename> script
-                            replaces the <filename>yocto-layer</filename>
-                            script, which is deprecated in the Yocto Project
-                            2.4 release.
-                            The <filename>yocto-layer</filename> script
-                            continues to function as part of the 2.4 release
-                            but will be removed post 2.4.
+                            In order to use a layer with the OpenEmbedded
+                            build system, you need to add the layer to your
+                            <filename>bblayers.conf</filename> configuration
+                            file.
+                            See the
+                            "<link linkend='adding-a-layer-using-the-bitbake-layers-script'>Adding a Layer Using the <filename>bitbake-layers</filename> Script</link>"
+                            section for more information.
                             </para></listitem>
                     </itemizedlist>
                 </note>
@@ -1047,6 +1074,14 @@
                 <literallayout class='monospaced'>
      $ bitbake-layers create-layer <replaceable>your_layer_name</replaceable>
                 </literallayout>
+                As an example, the following command creates a layer named
+                <filename>meta-scottrif</filename> in your home directory:
+                <literallayout class='monospaced'>
+     $ cd /usr/home
+     $ bitbake-layers create-layer meta-scottrif
+     NOTE: Starting bitbake server...
+     Add your new layer with 'bitbake-layers add-layer meta-scottrif'
+                </literallayout>
             </para>
 
             <para>
@@ -1089,26 +1124,36 @@
                              Filename of the example recipe
                 </literallayout>
             </para>
+        </section>
+
+        <section id='adding-a-layer-using-the-bitbake-layers-script'>
+            <title>Adding a Layer Using the <filename>bitbake-layers</filename> Script</title>
 
             <para>
                 Once you create your general layer, you must add it to your
                 <filename>bblayers.conf</filename> file.
-                You can add your layer by using the
+                Adding the layer to this configuration file makes the
+                OpenEmbedded build system aware of your layer so that it can
+                search it for metadata.
+            </para>
+
+            <para>
+                Add your layer by using the
                 <filename>bitbake-layers add-layer</filename> command:
                 <literallayout class='monospaced'>
      $ bitbake-layers add-layer <replaceable>your_layer_name</replaceable>
                 </literallayout>
-                Here is an example where a layer named
-                <filename>meta-scottrif</filename> is added and then the
-                layers are shown using the
-                <filename>bitbake-layers show-layers</filename> command:
+                Here is an example that adds a layer named
+                <filename>meta-scottrif</filename> to the configuration file.
+                Following the command that adds the layer is another
+                <filename>bitbake-layers</filename> command that shows the
+                layers that are in your <filename>bblayers.conf</filename>
+                file:
                 <literallayout class='monospaced'>
      $ bitbake-layers add-layer meta-scottrif
      NOTE: Starting bitbake server...
-     Loading cache: 100% |############################################| Time: 0:00:00
-     Loaded 1275 entries from dependency cache.
-     Parsing recipes: 100% |##########################################| Time: 0:00:00
-     Parsing of 819 .bb files complete (817 cached, 2 parsed). 1276 targets, 44 skipped, 0 masked, 0 errors.
+     Parsing recipes: 100% |##########################################################| Time: 0:00:49
+     Parsing of 1441 .bb files complete (0 cached, 1441 parsed). 2055 targets, 56 skipped, 0 masked, 0 errors.
      $ bitbake-layers show-layers
      NOTE: Starting bitbake server...
      layer                 path                                      priority
@@ -1116,12 +1161,16 @@
      meta                  /home/scottrif/poky/meta                  5
      meta-poky             /home/scottrif/poky/meta-poky             5
      meta-yocto-bsp        /home/scottrif/poky/meta-yocto-bsp        5
-     meta-mylayer          /home/scottrif/meta-mylayer               6
      workspace             /home/scottrif/poky/build/workspace       99
      meta-scottrif         /home/scottrif/poky/build/meta-scottrif   6
                 </literallayout>
                 Adding the layer to this file enables the build system to
                 locate the layer during the build.
+                <note>
+                    During a build, the OpenEmbedded build system looks in
+                    the layers from the top of the list down to the bottom
+                    in that order.
+                </note>
                 </para>
         </section>
     </section>
@@ -1222,8 +1271,8 @@
                 To understand how these features work, the best reference is
                 <filename>meta/classes/core-image.bbclass</filename>.
                 This class lists out the available
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
-                of which most map to package groups while some, such as
+                <filename>IMAGE_FEATURES</filename> of which most map to
+                package groups while some, such as
                 <filename>debug-tweaks</filename> and
                 <filename>read-only-rootfs</filename>, resolve as general
                 configuration settings.
@@ -1520,8 +1569,8 @@
                 </itemizedlist>
                 <note>
                     For information on recipe syntax, see the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#recipe-syntax'>Recipe Syntax</ulink>"
-                    section in the Yocto Project Reference Manual.
+                    "<link linkend='recipe-syntax'>Recipe Syntax</link>"
+                    section.
                 </note>
             </para>
 
@@ -1572,47 +1621,43 @@
                     and have sourced the build environment setup script
                     (i.e.
                     <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>).
-                    Here is the basic <filename>recipetool</filename> syntax:
-                    <note>
-                        Running <filename>recipetool -h</filename> or
-                        <filename>recipetool create -h</filename> produces the
-                        Python-generated help, which presented differently
-                        than what follows here.
-                    </note>
+                    To get help on the tool, use the following command:
                     <literallayout class='monospaced'>
-     recipetool -h
-     recipetool create [-h]
-     recipetool [-d] [-q] [--color auto | always | never ] create -o <replaceable>OUTFILE</replaceable> [-m] [-x <replaceable>EXTERNALSRC</replaceable>] <replaceable>source</replaceable>
+     $ recipetool -h
+     NOTE: Starting bitbake server...
+     usage: recipetool [-d] [-q] [--color COLOR] [-h] &lt;subcommand&gt; ...
 
-          -d       Enables debug output.
-          -q       Outputs only errors (quiet mode).
-          --color  Colorizes the output automatically, always, or never.
-          -h       Displays Python generated syntax for recipetool.
-          create   Causes recipetool to create a base recipe.  The create
-                   command is further defined with these options:
+     OpenEmbedded recipe tool
 
-                   -o <replaceable>OUTFILE</replaceable>      Specifies the full path and filename for the generated
-                                   recipe.
-                   -m              Causes the recipe to be machine-specific rather than
-                                   architecture-specific (default).
-                   -x <replaceable>EXTERNALSRC</replaceable>  Fetches and extracts source files from <replaceable>source</replaceable>
-                                   and places them in <replaceable>EXTERNALSRC</replaceable>.
-                                   <replaceable>source</replaceable> must be a URL.
-                   -h              Displays Python-generated syntax for create.
-                   <replaceable>source</replaceable>          Specifies the source code on which to base the
-                                   recipe.
+     options:
+       -d, --debug     Enable debug output
+       -q, --quiet     Print only errors
+       --color COLOR   Colorize output (where COLOR is auto, always, never)
+       -h, --help      show this help message and exit
+
+     subcommands:
+       create          Create a new recipe
+       newappend       Create a bbappend for the specified target in the specified
+                       layer
+       setvar          Set a variable within a recipe
+       appendfile      Create/update a bbappend to replace a target file
+       appendsrcfiles  Create/update a bbappend to add or replace source files
+       appendsrcfile   Create/update a bbappend to add or replace a source file
+     Use recipetool &lt;subcommand&gt; --help to get help on a specific command
                     </literallayout>
                 </para>
 
                 <para>
-                    Running <filename>recipetool create -o</filename>&nbsp;<replaceable>OUTFILE</replaceable>
+                    Running
+                    <filename>recipetool create -o</filename>&nbsp;<replaceable>OUTFILE</replaceable>
                     creates the base recipe and locates it properly in the
                     layer that contains your source files.
                     Following are some syntax examples:
                 </para>
 
                 <para>
-                    Use this syntax to generate a recipe based on <replaceable>source</replaceable>.
+                    Use this syntax to generate a recipe based on
+                    <replaceable>source</replaceable>.
                     Once generated, the recipe resides in the existing source
                     code layer:
                     <literallayout class='monospaced'>
@@ -1625,7 +1670,8 @@
                     <literallayout class='monospaced'>
      recipetool create -o <replaceable>OUTFILE</replaceable> -x <replaceable>EXTERNALSRC</replaceable> <replaceable>source</replaceable>
                     </literallayout>
-                    Use this syntax to generate a recipe based on <replaceable>source</replaceable>.
+                    Use this syntax to generate a recipe based on
+                    <replaceable>source</replaceable>.
                     The options direct <filename>recipetool</filename> to
                     generate debugging information.
                     Once generated, the recipe resides in the existing source
@@ -1646,7 +1692,7 @@
                     The Yocto Project and OpenEmbedded communities maintain many
                     recipes that might be candidates for what you are doing.
                     You can find a good central index of these recipes in the
-                    <ulink url='http://layers.openembedded.org'>OpenEmbedded metadata index</ulink>.
+                    <ulink url='http://layers.openembedded.org'>OpenEmbedded Layer Index</ulink>.
                 </para>
 
                 <para>
@@ -1811,8 +1857,8 @@
 
             <para>
                 You can find more information about the build process in
-                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-development-environment'>The Yocto Project Development Environment</ulink>"
-                chapter of the Yocto Project Reference Manual.
+                "<ulink url='&YOCTO_DOCS_OM_URL;#overview-development-environment'>The Yocto Project Development Environment</ulink>"
+                chapter of the Yocto Project Overview and Concepts Manual.
             </para>
         </section>
 
@@ -1828,8 +1874,8 @@
                 Your recipe must have a <filename>SRC_URI</filename> variable
                 that points to where the source is located.
                 For a graphical representation of source locations, see the
-                "<ulink url='&YOCTO_DOCS_REF_URL;#sources-dev-environment'>Sources</ulink>"
-                section in the Yocto Project Reference Manual.
+                "<ulink url='&YOCTO_DOCS_OM_URL;#sources-dev-environment'>Sources</ulink>"
+                section in the Yocto Project Overview and Concepts Manual.
             </para>
 
             <para>
@@ -2141,8 +2187,9 @@
                         containing the current checksum.
                         For more explanation and examples of how to set the
                         <filename>LIC_FILES_CHKSUM</filename> variable, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</ulink>"
-                        section in the Yocto Project Reference Manual.</para>
+                        "<link link='usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</link>"
+                        section.</para>
+
                         <para>To determine the correct checksum string, you
                         can list the appropriate files in the
                         <filename>LIC_FILES_CHKSUM</filename> variable with
@@ -2288,8 +2335,9 @@
                 automatically add a runtime dependency to "mypackage" on
                 "example").
                 See the
-                "<ulink url='&YOCTO_DOCS_REF_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
-                in the Yocto Project Reference Manual for further details.
+                "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
+                section in the Yocto Project Overview and Concepts Manual for
+                further details.
             </para>
         </section>
 
@@ -2977,6 +3025,133 @@
             </para>
         </section>
 
+        <section id='metadata-virtual-providers'>
+            <title>Using Virtual Providers</title>
+
+            <para>
+                Prior to a build, if you know that several different recipes
+                provide the same functionality, you can use a virtual provider
+                (i.e. <filename>virtual/*</filename>) as a placeholder for the
+                actual provider.
+                The actual provider is determined at build-time.
+            </para>
+
+            <para>
+                A common scenario where a virtual provider is used would be
+                for the kernel recipe.
+                Suppose you have three kernel recipes whose
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>
+                values map to <filename>kernel-big</filename>,
+                <filename>kernel-mid</filename>, and
+                <filename>kernel-small</filename>.
+                Furthermore, each of these recipes in some way uses a
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PROVIDES'><filename>PROVIDES</filename></ulink>
+                statement that essentially identifies itself as being able
+                to provide <filename>virtual/kernel</filename>.
+                Here is one way through the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-kernel'><filename>kernel</filename></ulink>
+                class:
+                <literallayout class='monospaced'>
+     PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
+                </literallayout>
+                Any recipe that inherits the <filename>kernel</filename> class
+                is going to utilize a <filename>PROVIDES</filename> statement
+                that identifies that recipe as being able to provide the
+                <filename>virtual/kernel</filename> item.
+            </para>
+
+            <para>
+                Now comes the time to actually build an image and you need a
+                kernel recipe, but which one?
+                You can configure your build to call out the kernel recipe
+                you want by using the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
+                variable.
+                As an example, consider the
+                <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/conf/machine/include/x86-base.inc'><filename>x86-base.inc</filename></ulink>
+                include file, which is a machine
+                (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>)
+                configuration file.
+                This include file is the reason all x86-based machines use the
+                <filename>linux-yocto</filename> kernel.
+                Here are the relevant lines from the include file:
+                <literallayout class='monospaced'>
+     PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
+     PREFERRED_VERSION_linux-yocto ??= "4.15%"
+                </literallayout>
+            </para>
+
+            <para>
+                When you use a virtual provider, you do not have to
+                "hard code" a recipe name as a build dependency.
+                You can use the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
+                variable to state the build is dependent on
+                <filename>virtual/kernel</filename> for example:
+                <literallayout class='monospaced'>
+     DEPENDS = "virtual/kernel"
+                </literallayout>
+                During the build, the OpenEmbedded build system picks
+                the correct recipe needed for the
+                <filename>virtual/kernel</filename> dependency based on the
+                <filename>PREFERRED_PROVIDER</filename> variable.
+                If you want to use the small kernel mentioned at the beginning
+                of this section, configure your build as follows:
+                <literallayout class='monospaced'>
+     PREFERRED_PROVIDER_virtual/kernel ??= "kernel-small"
+                </literallayout>
+                <note>
+                    Any recipe that
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PROVIDES'><filename>PROVIDES</filename></ulink>
+                    a <filename>virtual/*</filename> item that is ultimately
+                    not selected through
+                    <filename>PREFERRED_PROVIDER</filename> does not get built.
+                    Preventing these recipes from building is usually the
+                    desired behavior since this mechanism's purpose is to
+                    select between mutually exclusive alternative providers.
+                </note>
+            </para>
+
+            <para>
+                The following lists specific examples of virtual providers:
+                <itemizedlist>
+                    <listitem><para>
+                        <filename>virtual/kernel</filename>:
+                        Provides the name of the kernel recipe to use when
+                        building a kernel image.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>virtual/bootloader</filename>:
+                        Provides the name of the bootloader to use when
+                        building an image.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>virtual/mesa</filename>:
+                        Provides <filename>gbm.pc</filename>.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>virtual/egl</filename>:
+                        Provides <filename>egl.pc</filename> and possibly
+                        <filename>wayland-egl.pc</filename>.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>virtual/libgl</filename>:
+                        Provides <filename>gl.pc</filename> (i.e. libGL).
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>virtual/libgles1</filename>:
+                        Provides <filename>glesv1_cm.pc</filename>
+                        (i.e. libGLESv1_CM).
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>virtual/libgles2</filename>:
+                        Provides <filename>glesv2.pc</filename>
+                        (i.e. libGLESv2).
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
         <section id='properly-versioning-pre-release-recipes'>
             <title>Properly Versioning Pre-Release Recipes</title>
 
@@ -3224,8 +3399,10 @@
                     The variable
                     <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename>
                     is used to track source license changes as described in the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</ulink>" section.
-                    You can quickly create Autotool-based recipes in a manner similar to the previous example.
+                    "<link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</link>"
+                    section in the Yocto Project Overview and Concepts Manual.
+                    You can quickly create Autotool-based recipes in a manner
+                    similar to the previous example.
                 </para>
             </section>
 
@@ -3430,9 +3607,9 @@
                                 allows runtime dependencies between packages
                                 to be added automatically.
                                 See the
-                                "<ulink url='&YOCTO_DOCS_REF_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
-                                section in the Yocto Project Reference Manual
-                                for more information.
+                                "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
+                                section in the Yocto Project Overview and
+                                Concepts Manual for more information.
                                 </para></listitem>
                         </itemizedlist>
                     </note>
@@ -3517,6 +3694,330 @@
                 style.
             </para>
         </section>
+
+        <section id='recipe-syntax'>
+            <title>Recipe Syntax</title>
+
+            <para>
+                Understanding recipe file syntax is important for writing
+                recipes.
+                The following list overviews the basic items that make up a
+                BitBake recipe file.
+                For more complete BitBake syntax descriptions, see the
+                "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>"
+                chapter of the BitBake User Manual.
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Variable Assignments and Manipulations:</emphasis>
+                        Variable assignments allow a value to be assigned to a
+                        variable.
+                        The assignment can be static text or might include
+                        the contents of other variables.
+                        In addition to the assignment, appending and prepending
+                        operations are also supported.</para>
+
+                        <para>The following example shows some of the ways
+                        you can use variables in recipes:
+                        <literallayout class='monospaced'>
+     S = "${WORKDIR}/postfix-${PV}"
+     CFLAGS += "-DNO_ASM"
+     SRC_URI_append = " file://fixup.patch"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Functions:</emphasis>
+                        Functions provide a series of actions to be performed.
+                        You usually use functions to override the default
+                        implementation of a task function or to complement
+                        a default function (i.e. append or prepend to an
+                        existing function).
+                        Standard functions use <filename>sh</filename> shell
+                        syntax, although access to OpenEmbedded variables and
+                        internal methods are also available.</para>
+
+                        <para>The following is an example function from the
+                        <filename>sed</filename> recipe:
+                        <literallayout class='monospaced'>
+     do_install () {
+         autotools_do_install
+         install -d ${D}${base_bindir}
+         mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+         rmdir ${D}${bindir}/
+     }
+                        </literallayout>
+                        It is also possible to implement new functions that
+                        are called between existing tasks as long as the
+                        new functions are not replacing or complementing the
+                        default functions.
+                        You can implement functions in Python
+                        instead of shell.
+                        Both of these options are not seen in the majority of
+                        recipes.
+                        </para></listitem>
+                    <listitem><para><emphasis>Keywords:</emphasis>
+                        BitBake recipes use only a few keywords.
+                        You use keywords to include common
+                        functions (<filename>inherit</filename>), load parts
+                        of a recipe from other files
+                        (<filename>include</filename> and
+                        <filename>require</filename>) and export variables
+                        to the environment (<filename>export</filename>).
+                        </para>
+
+                        <para>The following example shows the use of some of
+                        these keywords:
+                        <literallayout class='monospaced'>
+     export POSTCONF = "${STAGING_BINDIR}/postconf"
+     inherit autoconf
+     require otherfile.inc
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Comments (#):</emphasis>
+                        Any lines that begin with the hash character
+                        (<filename>#</filename>) are treated as comment lines
+                        and are ignored:
+                        <literallayout class='monospaced'>
+     # This is a comment
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                This next list summarizes the most important and most commonly
+                used parts of the recipe syntax.
+                For more information on these parts of the syntax, you can
+                reference the
+                <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>
+                chapter in the BitBake User Manual.
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Line Continuation (\):</emphasis>
+                        Use the backward slash (<filename>\</filename>)
+                        character to split a statement over multiple lines.
+                        Place the slash character at the end of the line that
+                        is to be continued on the next line:
+                        <literallayout class='monospaced'>
+     VAR = "A really long \
+            line"
+                        </literallayout>
+                        <note>
+                            You cannot have any characters including spaces
+                            or tabs after the slash character.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Using Variables (${<replaceable>VARNAME</replaceable>}):</emphasis>
+                        Use the <filename>${<replaceable>VARNAME</replaceable>}</filename>
+                        syntax to access the contents of a variable:
+                        <literallayout class='monospaced'>
+     SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz"
+                        </literallayout>
+                        <note>
+                            It is important to understand that the value of a
+                            variable expressed in this form does not get
+                            substituted automatically.
+                            The expansion of these expressions happens
+                            on-demand later (e.g. usually when a function that
+                            makes reference to the variable executes).
+                            This behavior ensures that the values are most
+                            appropriate for the context in which they are
+                            finally used.
+                            On the rare occasion that you do need the variable
+                            expression to be expanded immediately, you can use
+                            the <filename>:=</filename> operator instead of
+                            <filename>=</filename> when you make the
+                            assignment, but this is not generally needed.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Quote All Assignments ("<replaceable>value</replaceable>"):</emphasis>
+                        Use double quotes around values in all variable
+                        assignments (e.g.
+                        <filename>"<replaceable>value</replaceable>"</filename>).
+                        Following is an example:
+                        <literallayout class='monospaced'>
+     VAR1 = "${OTHERVAR}"
+     VAR2 = "The version is ${PV}"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Conditional Assignment (?=):</emphasis>
+                        Conditional assignment is used to assign a
+                        value to a variable, but only when the variable is
+                        currently unset.
+                        Use the question mark followed by the equal sign
+                        (<filename>?=</filename>) to make a "soft" assignment
+                        used for conditional assignment.
+                        Typically, "soft" assignments are used in the
+                        <filename>local.conf</filename> file for variables
+                        that are allowed to come through from the external
+                        environment.
+                        </para>
+
+                        <para>Here is an example where
+                        <filename>VAR1</filename> is set to "New value" if
+                        it is currently empty.
+                        However, if <filename>VAR1</filename> has already been
+                        set, it remains unchanged:
+                        <literallayout class='monospaced'>
+     VAR1 ?= "New value"
+                        </literallayout>
+                        In this next example, <filename>VAR1</filename>
+                        is left with the value "Original value":
+                        <literallayout class='monospaced'>
+     VAR1 = "Original value"
+     VAR1 ?= "New value"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Appending (+=):</emphasis>
+                        Use the plus character followed by the equals sign
+                        (<filename>+=</filename>) to append values to existing
+                        variables.
+                        <note>
+                            This operator adds a space between the existing
+                            content of the variable and the new content.
+                        </note></para>
+
+                        <para>Here is an example:
+                        <literallayout class='monospaced'>
+     SRC_URI += "file://fix-makefile.patch"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Prepending (=+):</emphasis>
+                        Use the equals sign followed by the plus character
+                        (<filename>=+</filename>) to prepend values to existing
+                        variables.
+                        <note>
+                            This operator adds a space between the new content
+                            and the existing content of the variable.
+                        </note></para>
+
+                        <para>Here is an example:
+                        <literallayout class='monospaced'>
+     VAR =+ "Starts"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Appending (_append):</emphasis>
+                        Use the <filename>_append</filename> operator to
+                        append values to existing variables.
+                        This operator does not add any additional space.
+                        Also, the operator is applied after all the
+                        <filename>+=</filename>, and
+                        <filename>=+</filename> operators have been applied and
+                        after all <filename>=</filename> assignments have
+                        occurred.
+                        </para>
+
+                        <para>The following example shows the space being
+                        explicitly added to the start to ensure the appended
+                        value is not merged with the existing value:
+                        <literallayout class='monospaced'>
+     SRC_URI_append = " file://fix-makefile.patch"
+                        </literallayout>
+                        You can also use the <filename>_append</filename>
+                        operator with overrides, which results in the actions
+                        only being performed for the specified target or
+                        machine:
+                        <literallayout class='monospaced'>
+     SRC_URI_append_sh4 = " file://fix-makefile.patch"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Prepending (_prepend):</emphasis>
+                        Use the <filename>_prepend</filename> operator to
+                        prepend values to existing variables.
+                        This operator does not add any additional space.
+                        Also, the operator is applied after all the
+                        <filename>+=</filename>, and
+                        <filename>=+</filename> operators have been applied and
+                        after all <filename>=</filename> assignments have
+                        occurred.
+                        </para>
+
+                        <para>The following example shows the space being
+                        explicitly added to the end to ensure the prepended
+                        value is not merged with the existing value:
+                        <literallayout class='monospaced'>
+     CFLAGS_prepend = "-I${S}/myincludes "
+                        </literallayout>
+                        You can also use the <filename>_prepend</filename>
+                        operator with overrides, which results in the actions
+                        only being performed for the specified target or
+                        machine:
+                        <literallayout class='monospaced'>
+     CFLAGS_prepend_sh4 = "-I${S}/myincludes "
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Overrides:</emphasis>
+                        You can use overrides to set a value conditionally,
+                        typically based on how the recipe is being built.
+                        For example, to set the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>
+                        variable's value to "standard/base" for any target
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
+                        except for qemuarm where it should be set to
+                        "standard/arm-versatile-926ejs", you would do the
+                        following:
+                        <literallayout class='monospaced'>
+     KBRANCH = "standard/base"
+     KBRANCH_qemuarm  = "standard/arm-versatile-926ejs"
+                        </literallayout>
+                        Overrides are also used to separate alternate values
+                        of a variable in other situations.
+                        For example, when setting variables such as
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
+                        and
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
+                        that are specific to individual packages produced by
+                        a recipe, you should always use an override that
+                        specifies the name of the package.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Indentation:</emphasis>
+                        Use spaces for indentation rather than than tabs.
+                        For shell functions, both currently work.
+                        However, it is a policy decision of the Yocto Project
+                        to use tabs in shell functions.
+                        Realize that some layers have a policy to use spaces
+                        for all indentation.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Using Python for Complex Operations:</emphasis>
+                        For more advanced processing, it is possible to use
+                        Python code during variable assignments (e.g.
+                        search and replacement on a variable).</para>
+
+                        <para>You indicate Python code using the
+                        <filename>${@<replaceable>python_code</replaceable>}</filename>
+                        syntax for the variable assignment:
+                        <literallayout class='monospaced'>
+     SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Shell Function Syntax:</emphasis>
+                        Write shell functions as if you were writing a shell
+                        script when you describe a list of actions to take.
+                        You should ensure that your script works with a generic
+                        <filename>sh</filename> and that it does not require
+                        any <filename>bash</filename> or other shell-specific
+                        functionality.
+                        The same considerations apply to various system
+                        utilities (e.g. <filename>sed</filename>,
+                        <filename>grep</filename>, <filename>awk</filename>,
+                        and so forth) that you might wish to use.
+                        If in doubt, you should check with multiple
+                        implementations - including those from BusyBox.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
     </section>
 
     <section id="platdev-newmachine">
@@ -3538,8 +4039,9 @@
         <para>
             For a complete example that shows how to add a new machine,
             see the
-            "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
-            section in the Yocto Project Board Support Package (BSP) Developer's Guide.
+            "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
+            section in the Yocto Project Board Support Package (BSP)
+            Developer's Guide.
         </para>
 
         <section id="platdev-newmachine-conffile">
@@ -3694,6 +4196,562 @@
         </section>
     </section>
 
+    <section id='gs-upgrading-recipes'>
+        <title>Upgrading Recipes</title>
+
+        <para>
+            Over time, upstream developers publish new versions for software
+            built by layer recipes.
+            It is recommended to keep recipes up-to-date with upstream
+            version releases.
+            You can use the Automated Upgrade Helper (AUH) to set up
+            automatic version upgrades.
+            Alternatively, you can use <filename>devtool upgrade</filename>
+            to set up semi-automatic version upgrades.
+            Finally, you can even manually upgrade a recipe by editing the
+            recipe itself.
+        </para>
+
+        <section id='gs-using-the-auto-upgrade-helper'>
+            <title>Using the Auto Upgrade Helper (AUH)</title>
+
+            <para>
+                The AUH utility works in conjunction with the
+                OpenEmbedded build system in order to automatically generate
+                upgrades for recipes based on new versions being
+                published upstream.
+                Use AUH when you want to create a service that performs the
+                upgrades automatically and optionally sends you an email with
+                the results.
+            </para>
+
+            <para>
+                AUH allows you to update several recipes with a single use.
+                You can also optionally perform build and integration tests
+                using images with the results saved to your hard drive and
+                emails of results optionally sent to recipe maintainers.
+                Finally, AUH creates Git commits with appropriate commit
+                messages in the layer's tree for the changes made to recipes.
+                <note>
+                    Conditions do exist when you should not use AUH to upgrade
+                    recipes and you should instead use either
+                    <filename>devtool upgrade</filename> or upgrade your
+                    recipes manually:
+                    <itemizedlist>
+                        <listitem><para>
+                            When AUH cannot complete the upgrade sequence.
+                            This situation usually results because custom
+                            patches carried by the recipe cannot be
+                            automatically rebased to the new version.
+                            In this case, <filename>devtool upgrade</filename>
+                            allows you to manually resolve conflicts.
+                            </para></listitem>
+                        <listitem><para>
+                            When for any reason you want fuller control over
+                            the upgrade process.
+                            For example, when you want special arrangements
+                            for testing.
+                            </para></listitem>
+                    </itemizedlist>
+                </note>
+            </para>
+
+            <para>
+                The following steps describe how to set up the AUH utility:
+                <orderedlist>
+                    <listitem><para>
+                        <emphasis>Be Sure the Development Host is Set Up:</emphasis>
+                        You need to be sure that your development host is
+                        set up to use the Yocto Project.
+                        For information on how to set up your host, see the
+                        "<link linkend='setting-up-the-development-host-to-use-the-yocto-project'>Preparing the Build Host</link>"
+                        section.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Make Sure Git is Configured:</emphasis>
+                        The AUH utility requires Git to be configured because
+                        AUH uses Git to save upgrades.
+                        Thus, you must have Git user and email configured.
+                        The following command shows your configurations:
+                        <literallayout class='monospaced'>
+     $ git config --list
+                        </literallayout>
+                        If you do not have the user and email configured, you
+                        can use the following commands to do so:
+                        <literallayout class='monospaced'>
+     $ git config --global user.name <replaceable>some_name</replaceable>
+     $ git config --global user.email <replaceable>username</replaceable>@<replaceable>domain</replaceable>.com
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Clone the AUH Repository:</emphasis>
+                        To use AUH, you must clone the repository onto your
+                        development host.
+                        The following command uses Git to create a local
+                        copy of the repository on your system:
+                        <literallayout class='monospaced'>
+     $ git clone git://git.yoctoproject.org/auto-upgrade-helper
+     Cloning into 'auto-upgrade-helper'...
+     remote: Counting objects: 768, done.
+     remote: Compressing objects: 100% (300/300), done.
+     remote: Total 768 (delta 499), reused 703 (delta 434)
+     Receiving objects: 100% (768/768), 191.47 KiB | 98.00 KiB/s, done.
+     Resolving deltas: 100% (499/499), done.
+     Checking connectivity... done.
+                        </literallayout>
+                        AUH is not part of the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core (OE-Core)</ulink>
+                        or
+                        <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
+                        repositories.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Create a Dedicated Build Directory:</emphasis>
+                        Run the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>
+                        script to create a fresh build directory that you
+                        use exclusively for running the AUH utility:
+                        <literallayout class='monospaced'>
+     $ cd ~/poky
+     $ source oe-init-build-env <replaceable>your_AUH_build_directory</replaceable>
+                        </literallayout>
+                        Re-using an existing build directory and its
+                        configurations is not recommended as existing settings
+                        could cause AUH to fail or behave undesirably.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Make Configurations in Your Local Configuration File:</emphasis>
+                        Several settings need to exist in the
+                        <filename>local.conf</filename> file in the build
+                        directory you just created for AUH.
+                        Make these following configurations:
+                        <itemizedlist>
+                            <listitem><para>
+                                Enable "distrodata" as follows:
+                                <literallayout class='monospaced'>
+     INHERIT =+ "distrodata"
+                                </literallayout>
+                                </para></listitem>
+                            <listitem><para>
+                                If you want to enable
+                                <ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Build History</ulink>,
+                                which is optional, you need the following
+                                lines in the
+                                <filename>conf/local.conf</filename> file:
+                                <literallayout class='monospaced'>
+     INHERIT =+ "buildhistory"
+     BUILDHISTORY_COMMIT = "1"
+                                </literallayout>
+                                With this configuration and a successful
+                                upgrade, a build history "diff" file appears in
+                                the
+                                <filename>upgrade-helper/work/recipe/buildhistory-diff.txt</filename>
+                                file found in your build directory.
+                                </para></listitem>
+                            <listitem><para>
+                                If you want to enable testing through the
+                                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage*'><filename>testimage</filename></ulink>
+                                class, which is optional, you need to have the
+                                following set in your
+                                <filename>conf/local.conf</filename> file:
+                                <literallayout class='monospaced'>
+     INHERIT += "testimage"
+                                </literallayout>
+                                <note>
+                                    If your distro does not enable by default
+                                    ptest, which Poky does, you need the
+                                    following in your
+                                    <filename>local.conf</filename> file:
+                                    <literallayout class='monospaced'>
+     DISTRO_FEATURES_append = " ptest"
+                                    </literallayout>
+                                </note>
+                                </para></listitem>
+                        </itemizedlist>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Optionally Start a vncserver:</emphasis>
+                        If you are running in a server without an X11 session,
+                        you need to start a vncserver:
+                        <literallayout class='monospaced'>
+     $ vncserver :1
+     $ export DISPLAY=:1
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Create and Edit an AUH Configuration File:</emphasis>
+                        You need to have the
+                        <filename>upgrade-helper/upgrade-helper.conf</filename>
+                        configuration file in your build directory.
+                        You can find a sample configuration file in the
+                        <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/auto-upgrade-helper/tree/'>AUH source repository</ulink>.
+                        </para>
+
+                        <para>Read through the sample file and make
+                        configurations as needed.
+                        For example, if you enabled build history in your
+                        <filename>local.conf</filename> as described earlier,
+                        you must enable it in
+                        <filename>upgrade-helper.conf</filename>.</para>
+
+                        <para>Also, if you are using the default
+                        <filename>maintainers.inc</filename> file supplied
+                        with Poky and located in
+                        <filename>meta-yocto</filename> and you do not set a
+                        "maintainers_whitelist" or "global_maintainer_override"
+                        in the <filename>upgrade-helper.conf</filename>
+                        configuration, and you specify "-e all" on the
+                        AUH command-line, the utility automatically sends out
+                        emails to all the default maintainers.
+                        Please avoid this.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+
+            <para>
+                This next set of examples describes how to use the AUH:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Upgrading a Specific Recipe:</emphasis>
+                        To upgrade a specific recipe, use the following
+                        form:
+                        <literallayout class='monospaced'>
+     $ upgrade-helper.py <replaceable>recipe_name</replaceable>
+                        </literallayout>
+                        For example, this command upgrades the
+                        <filename>xmodmap</filename> recipe:
+                        <literallayout class='monospaced'>
+     $ upgrade-helper.py xmodmap
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Upgrading a Specific Recipe to a Particular Version:</emphasis>
+                        To upgrade a specific recipe to a particular version,
+                        use the following form:
+                        <literallayout class='monospaced'>
+     $ upgrade-helper.py <replaceable>recipe_name</replaceable> -t <replaceable>version</replaceable>
+                        </literallayout>
+                        For example, this command upgrades the
+                        <filename>xmodmap</filename> recipe to version
+                        1.2.3:
+                        <literallayout class='monospaced'>
+     $ upgrade-helper.py xmodmap -t 1.2.3
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Upgrading all Recipes to the Latest Versions and Suppressing Email Notifications:</emphasis>
+                        To upgrade all recipes to their most recent versions
+                        and suppress the email notifications, use the following
+                        command:
+                        <literallayout class='monospaced'>
+     $ upgrade-helper.py all
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Upgrading all Recipes to the Latest Versions and Send Email Notifications:</emphasis>
+                        To upgrade all recipes to their most recent versions
+                        and send email messages to maintainers for each
+                        attempted recipe as well as a status email, use the
+                        following command:
+                        <literallayout class='monospaced'>
+     $ upgrade-helper.py -e all
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                Once you have run the AUH utility, you can find the results
+                in the AUH build directory:
+                <literallayout class='monospaced'>
+     ${BUILDDIR}/upgrade-helper/<replaceable>timestamp</replaceable>
+                </literallayout>
+                The AUH utility also creates recipe update commits from
+                successful upgrade attempts in the layer tree.
+            </para>
+
+            <para>
+                You can easily set up to run the AUH utility on a regular
+                basis by using a cron job.
+                See the
+                <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/auto-upgrade-helper/tree/weeklyjob.sh'><filename>weeklyjob.sh</filename></ulink>
+                file distributed with the utility for an example.
+            </para>
+        </section>
+
+        <section id='gs-using-devtool-upgrade'>
+            <title>Using <filename>devtool upgrade</filename></title>
+
+            <para>
+                As mentioned earlier, an alternative method for upgrading
+                recipes to newer versions is to use
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-devtool-reference'><filename>devtool upgrade</filename></ulink>.
+                You can read about <filename>devtool upgrade</filename> in
+                general in the
+                "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</ulink>"
+                section in the Yocto Project Application Development and the
+                Extensible Software Development Kit (eSDK) Manual.
+            </para>
+
+            <para>
+                To see all the command-line options available with
+                <filename>devtool upgrade</filename>, use the following help
+                command:
+                <literallayout class='monospaced'>
+     $ devtool upgrade -h
+                </literallayout>
+            </para>
+
+            <para>
+                If you want to find out what version a recipe is currently at
+                upstream without any attempt to upgrade your local version of
+                the recipe, you can use the following command:
+                <literallayout class='monospaced'>
+     $ devtool latest-version <replaceable>recipe_name</replaceable>
+                </literallayout>
+            </para>
+
+            <para>
+                As mentioned in the previous section describing AUH,
+                <filename>devtool upgrade</filename> works in a
+                less-automated manner than AUH.
+                Specifically, <filename>devtool upgrade</filename> only
+                works on a single recipe that you name on the command line,
+                cannot perform build and integration testing using images,
+                and does not automatically generate commits for changes in
+                the source tree.
+                Despite all these "limitations",
+                <filename>devtool upgrade</filename> updates the recipe file
+                to the new upstream version and attempts to rebase custom
+                patches contained by the recipe as needed.
+                <note>
+                    AUH uses much of <filename>devtool upgrade</filename>
+                    behind the scenes making AUH somewhat of a "wrapper"
+                    application for <filename>devtool upgrade</filename>.
+                </note>
+            </para>
+
+            <para>
+                A typical scenario involves having used Git to clone an
+                upstream repository that you use during build operations.
+                Because you are (or have) built the recipe in the past, the
+                layer is likely added to your configuration already.
+                If for some reason, the layer is not added, you could add
+                it easily using the
+                <ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'><filename>bitbake-layers</filename></ulink>
+                script.
+                For example, suppose you use the <filename>nano.bb</filename>
+                recipe from the <filename>meta-oe</filename> layer in the
+                <filename>meta-openembedded</filename> repository.
+                For this example, assume that the layer has been cloned into
+                following area:
+                <literallayout class='monospaced'>
+     /home/scottrif/meta-openembedded
+                </literallayout>
+                The following command from your
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                adds the layer to your build configuration (i.e.
+                <filename>${BUILDDIR}/conf/bblayers.conf</filename>):
+                <literallayout class='monospaced'>
+     $ bitbake-layers add-layer /home/scottrif/meta-openembedded/meta-oe
+     NOTE: Starting bitbake server...
+     Parsing recipes: 100% |##########################################| Time: 0:00:55
+     Parsing of 1431 .bb files complete (0 cached, 1431 parsed). 2040 targets, 56 skipped, 0 masked, 0 errors.
+     Removing 12 recipes from the x86_64 sysroot: 100% |##############| Time: 0:00:00
+     Removing 1 recipes from the x86_64_i586 sysroot: 100% |##########| Time: 0:00:00
+     Removing 5 recipes from the i586 sysroot: 100% |#################| Time: 0:00:00
+     Removing 5 recipes from the qemux86 sysroot: 100% |##############| Time: 0:00:00
+                </literallayout>
+                For this example, assume that the <filename>nano.bb</filename>
+                recipe that is upstream has a 2.9.3 version number.
+                However, the version in the local repository is 2.7.4.
+                The following command from your build directory automatically
+                upgrades the recipe for you:
+                <note>
+                    Using the <filename>-V</filename> option is not necessary.
+                    Omitting the version number causes
+                    <filename>devtool upgrade</filename> to upgrade the recipe
+                    to the most recent version.
+                </note>
+                <literallayout class='monospaced'>
+     $ devtool upgrade nano -V 2.9.3
+     NOTE: Starting bitbake server...
+     NOTE: Creating workspace layer in /home/scottrif/poky/build/workspace
+     Parsing recipes: 100% |##########################################| Time: 0:00:46
+     Parsing of 1431 .bb files complete (0 cached, 1431 parsed). 2040 targets, 56 skipped, 0 masked, 0 errors.
+     NOTE: Extracting current version source...
+     NOTE: Resolving any missing task queue dependencies
+            .
+            .
+            .
+     NOTE: Executing SetScene Tasks
+     NOTE: Executing RunQueue Tasks
+     NOTE: Tasks Summary: Attempted 74 tasks of which 72 didn't need to be rerun and all succeeded.
+     Adding changed files: 100% |#####################################| Time: 0:00:00
+     NOTE: Upgraded source extracted to /home/scottrif/poky/build/workspace/sources/nano
+     NOTE: New recipe is /home/scottrif/poky/build/workspace/recipes/nano/nano_2.9.3.bb
+                </literallayout>
+                Continuing with this example, you can use
+                <filename>devtool build</filename> to build the newly upgraded
+                recipe:
+                <literallayout class='monospaced'>
+     $ devtool build nano
+     NOTE: Starting bitbake server...
+     Loading cache: 100% |################################################################################################| Time: 0:00:01
+     Loaded 2040 entries from dependency cache.
+     Parsing recipes: 100% |##############################################################################################| Time: 0:00:00
+     Parsing of 1432 .bb files complete (1431 cached, 1 parsed). 2041 targets, 56 skipped, 0 masked, 0 errors.
+     NOTE: Resolving any missing task queue dependencies
+            .
+            .
+            .
+     NOTE: Executing SetScene Tasks
+     NOTE: Executing RunQueue Tasks
+     NOTE: nano: compiling from external source tree /home/scottrif/poky/build/workspace/sources/nano
+     NOTE: Tasks Summary: Attempted 520 tasks of which 304 didn't need to be rerun and all succeeded.
+                </literallayout>
+                Within the <filename>devtool upgrade</filename> workflow,
+                opportunity exists to deploy and test your rebuilt software.
+                For this example, however, running
+                <filename>devtool finish</filename> cleans up the workspace
+                once the source in your workspace is clean.
+                This usually means using Git to stage and submit commits
+                for the changes generated by the upgrade process.
+            </para>
+
+            <para>
+                Once the tree is clean, you can clean things up in this
+                example with the following command from the
+                <filename>${BUILDDIR}/workspace/sources/nano</filename>
+                directory:
+                <literallayout class='monospaced'>
+     $ devtool finish nano meta-oe
+     NOTE: Starting bitbake server...
+     Loading cache: 100% |################################################################################################| Time: 0:00:00
+     Loaded 2040 entries from dependency cache.
+     Parsing recipes: 100% |##############################################################################################| Time: 0:00:01
+     Parsing of 1432 .bb files complete (1431 cached, 1 parsed). 2041 targets, 56 skipped, 0 masked, 0 errors.
+     NOTE: Adding new patch 0001-nano.bb-Stuff-I-changed-when-upgrading-nano.bb.patch
+     NOTE: Updating recipe nano_2.9.3.bb
+     NOTE: Removing file /home/scottrif/meta-openembedded/meta-oe/recipes-support/nano/nano_2.7.4.bb
+     NOTE: Moving recipe file to /home/scottrif/meta-openembedded/meta-oe/recipes-support/nano
+     NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/nano as-is; if you no longer need it then please delete it manually
+                </literallayout>
+                Using the <filename>devtool finish</filename> command cleans
+                up the workspace and creates a patch file based on your
+                commits.
+                The tool puts all patch files back into the source directory
+                in a sub-directory named <filename>nano</filename> in this
+                case.
+            </para>
+        </section>
+
+        <section id='dev-manually-upgrading-a-recipe'>
+            <title>Manually Upgrading a Recipe</title>
+
+            <para>
+                If for some reason you choose not to upgrade recipes using the
+                <link linkend='gs-using-the-auto-upgrade-helper'>Auto Upgrade Helper (AUH)</link>
+                or by using
+                <link linkend='gs-using-devtool-upgrade'><filename>devtool upgrade</filename></link>,
+                you can manually edit the recipe files to upgrade the versions.
+                <note><title>Caution</title>
+                    Manually updating multiple recipes scales poorly and
+                    involves many steps.
+                    The recommendation to upgrade recipe versions is through
+                    AUH or <filename>devtool upgrade</filename>, both of which
+                    automate some steps and provide guidance for others needed
+                    for the manual process.
+                </note>
+            </para>
+
+            <para>
+                To manually upgrade recipe versions, follow these general steps:
+                <orderedlist>
+                    <listitem><para>
+                        <emphasis>Change the Version:</emphasis>
+                        Rename the recipe such that the version (i.e. the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
+                        part of the recipe name) changes appropriately.
+                        If the version is not part of the recipe name, change
+                        the value as it is set for <filename>PV</filename>
+                        within the recipe itself.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Update <filename>SRCREV</filename> if Needed:</emphasis>
+                        If the source code your recipe builds is fetched from
+                        Git or some other version control system, update
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
+                        to point to the commit hash that matches the new
+                        version.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Build the Software:</emphasis>
+                        Try to build the recipe using BitBake.
+                        Typical build failures include the following:
+                        <itemizedlist>
+                            <listitem><para>
+                                License statements were updated for the new
+                                version.
+                                For this case, you need to review any changes
+                                to the license and update the values of
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
+                                and
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
+                                as needed.
+                                <note>
+                                    License changes are often inconsequential.
+                                    For example, the license text's copyright
+                                    year might have changed.
+                                </note>
+                                </para></listitem>
+                            <listitem><para>
+                                Custom patches carried by the older version of
+                                the recipe might fail to apply to the new
+                                version.
+                                For these cases, you need to review the
+                                failures.
+                                Patches might not be necessary for the new
+                                version of the software if the upgraded version
+                                has fixed those issues.
+                                If a patch is necessary and failing, you need
+                                to rebase it into the new version.
+                                </para></listitem>
+                        </itemizedlist>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Optionally Attempt to Build for Several Architectures:</emphasis>
+                        Once you successfully build the new software for a
+                        given architecture, you could test the build for
+                        other architectures by changing the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+                        variable and rebuilding the software.
+                        This optional step is especially important if the
+                        recipe is to be released publicly.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Check the Upstream Change Log or Release Notes:</emphasis>
+                        Checking both these reveals if new features exist that
+                        could break backwards-compatibility.
+                        If so, you need to take steps to mitigate or eliminate
+                        that situation.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Optionally Create a Bootable Image and Test:</emphasis>
+                        If you want, you can test the new software by booting
+                        it onto actual hardware.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Create a Commit with the Change in the Layer Repository:</emphasis>
+                        After all builds work and any testing is successful,
+                        you can create commits for any changes in the layer
+                        holding your upgraded recipe.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+    </section>
+
     <section id='finding-the-temporary-source-code'>
         <title>Finding Temporary Source Code</title>
 
@@ -3888,8 +4946,8 @@
                         Modifications will also disappear if you use the
                         <filename>rm_work</filename> feature as described
                         in the
-                        "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
-                        section of the Yocto Project Quick Start.
+                        "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-saving-memory-during-a-build'>Conserving Disk Space During Builds</ulink>"
+                        section.
                     </note>
                     </para></listitem>
                 <listitem><para>
@@ -4105,102 +5163,1224 @@
         </para>
     </section>
 
-    <section id='platdev-building-targets-with-multiple-configurations'>
-        <title>Building Targets with Multiple Configurations</title>
+    <section id='dev-building'>
+        <title>Building</title>
 
         <para>
-            Bitbake also has functionality that allows you to build
-            multiple targets at the same time, where each target uses
-            a different configuration.
+            This section describes various build procedures.
+            For example, the steps needed for a simple build, a target that
+            uses multiple configurations, building an image for more than
+            one machine, and so forth.
         </para>
 
-        <para>
-            In order to accomplish this, you setup each of the configurations
-            you need to use in parallel by placing the configuration files in
-            your current build directory alongside the usual
-            <filename>local.conf</filename> file.
-        </para>
+        <section id='dev-building-a-simple-image'>
+            <title>Building a Simple Image</title>
+
+            <para>
+                In the development environment, you need to build an image
+                whenever you change hardware support, add or change system
+                libraries, or add or change services that have dependencies.
+                Several methods exist that allow you to build an image within
+                the Yocto Project.
+                This section presents the basic steps you need to build a
+                simple image using BitBake from a build host running Linux.
+                <note><title>Notes</title>
+                    <itemizedlist>
+                        <listitem><para>
+                            For information on how to build an image using
+                            <ulink url='&YOCTO_DOCS_REF_URL;#toaster-term'>Toaster</ulink>,
+                            see the
+                            <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
+                            </para></listitem>
+                        <listitem><para>
+                            For information on how to use
+                            <filename>devtool</filename> to build images, see
+                            the
+                            "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in Your SDK Workflow</ulink>"
+                            section in the Yocto Project Application
+                            Development and the Extensible Software Development
+                            Kit (eSDK) manual.
+                            </para></listitem>
+                        <listitem><para>
+                            For a quick example on how to build an image using
+                            the OpenEmbedded build system, see the
+                            <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
+                            document.
+                            </para></listitem>
+                    </itemizedlist>
+                </note>
+            </para>
+
+            <para>
+                The build process creates an entire Linux distribution from
+                source and places it in your
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                under <filename>tmp/deploy/images</filename>.
+                For detailed information on the build process using BitBake,
+                see the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
+                section in the Yocto Project Overview and Concepts Manual.
+            </para>
+
+            <para>
+                The following figure and list overviews the build process:
+                <imagedata fileref="figures/bitbake-build-flow.png" width="7in" depth="4in" align="center" scalefit="1" />
+                <orderedlist>
+                    <listitem><para>
+                        <emphasis>Set up Your Host Development System to Support
+                        Development Using the Yocto Project</emphasis>:
+                        See the
+                        "<link linkend='dev-manual-start'>Setting Up to Use the Yocto Project</link>"
+                        section for options on how to get a build host ready to
+                        use the Yocto Project.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Initialize the Build Environment:</emphasis>
+                        Initialize the build environment by sourcing the build
+                        environment script (i.e.
+                        <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>):
+                        <literallayout class='monospaced'>
+     $ source &OE_INIT_FILE; [<replaceable>build_dir</replaceable>]
+                        </literallayout></para>
+
+                        <para>When you use the initialization script, the
+                        OpenEmbedded build system uses
+                        <filename>build</filename> as the default Build
+                        Directory in your current work directory.
+                        You can use a <replaceable>build_dir</replaceable>
+                        argument with the script to specify a different build
+                        directory.
+                        <note><title>Tip</title>
+                            A common practice is to use a different Build
+                            Directory for different targets.
+                            For example, <filename>~/build/x86</filename> for a
+                            <filename>qemux86</filename> target, and
+                            <filename>~/build/arm</filename> for a
+                            <filename>qemuarm</filename> target.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Make Sure Your <filename>local.conf</filename>
+                        File is Correct:</emphasis>
+                        Ensure the <filename>conf/local.conf</filename>
+                        configuration file, which is found in the Build
+                        Directory, is set up how you want it.
+                        This file defines many aspects of the build environment
+                        including the target machine architecture through the
+                        <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'>MACHINE</ulink></filename> variable,
+                        the packaging format used during the build
+                        (<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>),
+                        and a centralized tarball download directory through the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink> variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Build the Image:</emphasis>
+                        Build the image using the <filename>bitbake</filename>
+                        command:
+                        <literallayout class='monospaced'>
+     $ bitbake <replaceable>target</replaceable>
+                        </literallayout>
+                        <note>
+                            For information on BitBake, see the
+                            <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+                        </note>
+                        The <replaceable>target</replaceable> is the name of the
+                        recipe you want to build.
+                        Common targets are the images in
+                        <filename>meta/recipes-core/images</filename>,
+                        <filename>meta/recipes-sato/images</filename>, and so
+                        forth all found in the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+                        Or, the target can be the name of a recipe for a
+                        specific piece of software such as BusyBox.
+                        For more details about the images the OpenEmbedded build
+                        system supports, see the
+                        "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
+                        chapter in the Yocto Project Reference Manual.</para>
+
+                        <para>As an example, the following command builds the
+                        <filename>core-image-minimal</filename> image:
+                        <literallayout class='monospaced'>
+     $ bitbake core-image-minimal
+                        </literallayout>
+                        Once an image has been built, it often needs to be
+                        installed.
+                        The images and kernels built by the OpenEmbedded
+                        build system are placed in the Build Directory in
+                        <filename class="directory">tmp/deploy/images</filename>.
+                        For information on how to run pre-built images such as
+                        <filename>qemux86</filename> and <filename>qemuarm</filename>,
+                        see the
+                        <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+                        manual.
+                        For information about how to install these images,
+                        see the documentation for your particular board or
+                        machine.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='platdev-building-targets-with-multiple-configurations'>
+            <title>Building Targets with Multiple Configurations</title>
+
+            <para>
+                Bitbake also has functionality that allows you to build
+                multiple targets at the same time, where each target uses
+                a different configuration.
+            </para>
+
+            <para>
+                In order to accomplish this, you setup each of the configurations
+                you need to use in parallel by placing the configuration files in
+                your current build directory alongside the usual
+                <filename>local.conf</filename> file.
+            </para>
+
+            <para>
+                Follow these guidelines to create an environment that supports
+                multiple configurations:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Create Configuration Files</emphasis>:
+                        You need to create a single configuration file for each
+                        configuration for which you want to add support.
+                        These files would contain lines such as the following:
+                        <literallayout class='monospaced'>
+     MACHINE = "A"
+                        </literallayout>
+                        The files would contain any other variables that can
+                        be set and built in the same directory.
+                        <note>
+                            You can change the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+                            to not conflict.
+                        </note></para>
+
+                        <para>
+                        Furthermore, the configuration file must be located in the
+                        current build directory in a directory named
+                        <filename>multiconfig</filename> under the build's
+                        <filename>conf</filename> directory where
+                        <filename>local.conf</filename> resides.
+                        The reason for this restriction is because the
+                        <filename>BBPATH</filename> variable is not constructed
+                        until the layers are parsed.
+                        Consequently, using the configuration file as a
+                        pre-configuration file is not possible unless it is
+                        located in the current working directory.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Add the BitBake Multi-Config Variable to you Local Configuration File</emphasis>:
+                        Use the
+                        <filename>BBMULTICONFIG</filename>
+                        variable in your <filename>conf/local.conf</filename>
+                        configuration file to specify each separate configuration.
+                        For example, the following line tells BitBake it should load
+                        <filename>conf/multiconfig/configA.conf</filename>,
+                        <filename>conf/multiconfig/configB.conf</filename>, and
+                        <filename>conf/multiconfig/configC.conf</filename>.
+                        <literallayout class='monospaced'>
+     BBMULTICONFIG = "configA configB configC"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Launch BitBake</emphasis>:
+                        Use the following BitBake command form to launch the
+                        build:
+                        <literallayout class='monospaced'>
+     $ bitbake [multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable> [[[multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable>] ... ]
+                        </literallayout>
+                        Following is an example that supports building a minimal
+                        image for configuration A alongside a standard
+                        <filename>core-image-sato</filename>, which takes its
+                        configuration from <filename>local.conf</filename>:
+                        <literallayout class='monospaced'>
+     $ bitbake multiconfig:configA:core-image-minimal core-image-sato
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                Support for multiple configurations in this current release of
+                the Yocto Project (&DISTRO_NAME; &DISTRO;) has some known issues:
+                <itemizedlist>
+                    <listitem><para>
+                        No inter-multi-configuration dependencies exist.
+                        </para></listitem>
+                    <listitem><para>
+                        Shared State (sstate) optimizations do not exist.
+                        Consequently, if the build uses the same object twice
+                        in, for example, two different
+                        <filename>TMPDIR</filename> directories, the build
+                        will either load from an existing sstate cache at the
+                        start or build the object twice.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='building-an-initramfs-image'>
+            <title>Building an Initial RAM Filesystem (initramfs) Image</title>
+
+            <para>
+                An initial RAM filesystem (initramfs) image provides a temporary
+                root filesystem used for early system initialization (e.g.
+                loading of modules needed to locate and mount the "real" root
+                filesystem).
+                <note>
+                    The initramfs image is the successor of initial RAM disk
+                    (initrd).
+                    It is a "copy in and out" (cpio) archive of the initial
+                    filesystem that gets loaded into memory during the Linux
+                    startup process.
+                    Because Linux uses the contents of the archive during
+                    initialization, the initramfs image needs to contain all of the
+                    device drivers and tools needed to mount the final root
+                    filesystem.
+                </note>
+            </para>
+
+            <para>
+                Follow these steps to create an initramfs image:
+                <orderedlist>
+                    <listitem><para>
+                        <emphasis>Create the initramfs Image Recipe:</emphasis>
+                        You can reference the
+                        <filename>core-image-minimal-initramfs.bb</filename>
+                        recipe found in the <filename>meta/recipes-core</filename>
+                        directory of the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                        as an example from which to work.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Decide if You Need to Bundle the initramfs Image
+                        Into the Kernel Image:</emphasis>
+                        If you want the initramfs image that is built to be
+                        bundled in with the kernel image, set the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
+                        variable to "1" in your <filename>local.conf</filename>
+                        configuration file and set the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></ulink>
+                        variable in the recipe that builds the kernel image.
+                        <note><title>Tip</title>
+                            It is recommended that you do bundle the initramfs
+                            image with the kernel image to avoid circular
+                            dependencies between the kernel recipe and the
+                            initramfs recipe should the initramfs image
+                            include kernel modules.
+                        </note>
+                        Setting the <filename>INITRAMFS_IMAGE_BUNDLE</filename>
+                        flag causes the initramfs image to be unpacked
+                        into the <filename>${B}/usr/</filename> directory.
+                        The unpacked initramfs image is then passed to the kernel's
+                        <filename>Makefile</filename> using the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></ulink>
+                        variable, allowing the initramfs image to be built into
+                        the kernel normally.
+                        <note>
+                            If you choose to not bundle the initramfs image with
+                            the kernel image, you are essentially using an
+                            <ulink url='https://en.wikipedia.org/wiki/Initrd'>Initial RAM Disk (initrd)</ulink>.
+                            Creating an initrd is handled primarily through the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRD_IMAGE'><filename>INITRD_IMAGE</filename></ulink>,
+                            <filename>INITRD_LIVE</filename>, and
+                            <filename>INITRD_IMAGE_LIVE</filename> variables.
+                            For more information, see the
+                            <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/image-live.bbclass'><filename>image-live.bbclass</filename></ulink>
+                            file.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Optionally Add Items to the initramfs Image
+                        Through the initramfs Image Recipe:</emphasis>
+                        If you add items to the initramfs image by way of its
+                        recipe, you should use
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></ulink>
+                        rather than
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>.
+                        <filename>PACKAGE_INSTALL</filename> gives more direct
+                        control of what is added to the image as compared to
+                        the defaults you might not necessarily want that are
+                        set by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image'><filename>image</filename></ulink>
+                        or
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-core-image'><filename>core-image</filename></ulink>
+                        classes.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Build the Kernel Image and the initramfs
+                        Image:</emphasis>
+                        Build your kernel image using BitBake.
+                        Because the initramfs image recipe is a dependency of the
+                        kernel image, the initramfs image is built as well and
+                        bundled with the kernel image if you used the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
+                        variable described earlier.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='building-a-tiny-system'>
+            <title>Building a Tiny System</title>
+
+            <para>
+                Very small distributions have some significant advantages such
+                as requiring less on-die or in-package memory (cheaper), better
+                performance through efficient cache usage, lower power requirements
+                due to less memory, faster boot times, and reduced development
+                overhead.
+                Some real-world examples where a very small distribution gives
+                you distinct advantages are digital cameras, medical devices,
+                and small headless systems.
+            </para>
+
+            <para>
+                This section presents information that shows you how you can
+                trim your distribution to even smaller sizes than the
+                <filename>poky-tiny</filename> distribution, which is around
+                5 Mbytes, that can be built out-of-the-box using the Yocto Project.
+            </para>
+
+            <section id='tiny-system-overview'>
+                <title>Overview</title>
+
+                <para>
+                    The following list presents the overall steps you need to
+                    consider and perform to create distributions with smaller
+                    root filesystems, achieve faster boot times, maintain your critical
+                    functionality, and avoid initial RAM disks:
+                    <itemizedlist>
+                        <listitem><para>
+                            <link linkend='goals-and-guiding-principles'>Determine your goals and guiding principles.</link>
+                            </para></listitem>
+                        <listitem><para>
+                            <link linkend='understand-what-gives-your-image-size'>Understand what contributes to your image size.</link>
+                            </para></listitem>
+                        <listitem><para>
+                            <link linkend='trim-the-root-filesystem'>Reduce the size of the root filesystem.</link>
+                            </para></listitem>
+                        <listitem><para>
+                            <link linkend='trim-the-kernel'>Reduce the size of the kernel.</link>
+                            </para></listitem>
+                        <listitem><para>
+                            <link linkend='remove-package-management-requirements'>Eliminate packaging requirements.</link>
+                            </para></listitem>
+                        <listitem><para>
+                            <link linkend='look-for-other-ways-to-minimize-size'>Look for other ways to minimize size.</link>
+                            </para></listitem>
+                        <listitem><para>
+                            <link linkend='iterate-on-the-process'>Iterate on the process.</link>
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id='goals-and-guiding-principles'>
+                <title>Goals and Guiding Principles</title>
+
+                <para>
+                    Before you can reach your destination, you need to know
+                    where you are going.
+                    Here is an example list that you can use as a guide when
+                    creating very small distributions:
+                    <itemizedlist>
+                        <listitem><para>Determine how much space you need
+                            (e.g. a kernel that is 1 Mbyte or less and
+                            a root filesystem that is 3 Mbytes or less).
+                            </para></listitem>
+                        <listitem><para>Find the areas that are currently
+                            taking 90% of the space and concentrate on reducing
+                            those areas.
+                            </para></listitem>
+                        <listitem><para>Do not create any difficult "hacks"
+                            to achieve your goals.</para></listitem>
+                        <listitem><para>Leverage the device-specific
+                            options.</para></listitem>
+                        <listitem><para>Work in a separate layer so that you
+                            keep changes isolated.
+                            For information on how to create layers, see
+                            the "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>" section.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id='understand-what-gives-your-image-size'>
+                <title>Understand What Contributes to Your Image Size</title>
+
+                <para>
+                    It is easiest to have something to start with when creating
+                    your own distribution.
+                    You can use the Yocto Project out-of-the-box to create the
+                    <filename>poky-tiny</filename> distribution.
+                    Ultimately, you will want to make changes in your own
+                    distribution that are likely modeled after
+                    <filename>poky-tiny</filename>.
+                    <note>
+                        To use <filename>poky-tiny</filename> in your build,
+                        set the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
+                        variable in your
+                        <filename>local.conf</filename> file to "poky-tiny"
+                        as described in the
+                        "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
+                        section.
+                    </note>
+                </para>
+
+                <para>
+                    Understanding some memory concepts will help you reduce the
+                    system size.
+                    Memory consists of static, dynamic, and temporary memory.
+                    Static memory is the TEXT (code), DATA (initialized data
+                    in the code), and BSS (uninitialized data) sections.
+                    Dynamic memory represents memory that is allocated at runtime:
+                    stacks, hash tables, and so forth.
+                    Temporary memory is recovered after the boot process.
+                    This memory consists of memory used for decompressing
+                    the kernel and for the <filename>__init__</filename>
+                    functions.
+                </para>
+
+                <para>
+                    To help you see where you currently are with kernel and root
+                    filesystem sizes, you can use two tools found in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> in
+                    the <filename>scripts/tiny/</filename> directory:
+                    <itemizedlist>
+                        <listitem><para><filename>ksize.py</filename>: Reports
+                            component sizes for the kernel build objects.
+                            </para></listitem>
+                        <listitem><para><filename>dirsize.py</filename>: Reports
+                            component sizes for the root filesystem.</para></listitem>
+                    </itemizedlist>
+                    This next tool and command help you organize configuration
+                    fragments and view file dependencies in a human-readable form:
+                    <itemizedlist>
+                        <listitem><para><filename>merge_config.sh</filename>:
+                            Helps you manage configuration files and fragments
+                            within the kernel.
+                            With this tool, you can merge individual configuration
+                            fragments together.
+                            The tool allows you to make overrides and warns you
+                            of any missing configuration options.
+                            The tool is ideal for allowing you to iterate on
+                            configurations, create minimal configurations, and
+                            create configuration files for different machines
+                            without having to duplicate your process.</para>
+                            <para>The <filename>merge_config.sh</filename> script is
+                            part of the Linux Yocto kernel Git repositories
+                            (i.e. <filename>linux-yocto-3.14</filename>,
+                            <filename>linux-yocto-3.10</filename>,
+                            <filename>linux-yocto-3.8</filename>, and so forth)
+                            in the
+                            <filename>scripts/kconfig</filename> directory.</para>
+                            <para>For more information on configuration fragments,
+                            see the
+                            "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
+                            section in the Yocto Project Linux Kernel Development
+                            Manual.
+                            </para></listitem>
+                        <listitem><para><filename>bitbake -u taskexp -g <replaceable>bitbake_target</replaceable></filename>:
+                            Using the BitBake command with these options brings up
+                            a Dependency Explorer from which you can view file
+                            dependencies.
+                            Understanding these dependencies allows you to make
+                            informed decisions when cutting out various pieces of the
+                            kernel and root filesystem.</para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id='trim-the-root-filesystem'>
+                <title>Trim the Root Filesystem</title>
+
+                <para>
+                    The root filesystem is made up of packages for booting,
+                    libraries, and applications.
+                    To change things, you can configure how the packaging happens,
+                    which changes the way you build them.
+                    You can also modify the filesystem itself or select a different
+                    filesystem.
+                </para>
+
+                <para>
+                    First, find out what is hogging your root filesystem by running the
+                    <filename>dirsize.py</filename> script from your root directory:
+                    <literallayout class='monospaced'>
+     $ cd <replaceable>root-directory-of-image</replaceable>
+     $ dirsize.py 100000 > dirsize-100k.log
+     $ cat dirsize-100k.log
+                    </literallayout>
+                    You can apply a filter to the script to ignore files under
+                    a certain size.
+                    The previous example filters out any files below 100 Kbytes.
+                    The sizes reported by the tool are uncompressed, and thus
+                    will be smaller by a relatively constant factor in a
+                    compressed root filesystem.
+                    When you examine your log file, you can focus on areas of the
+                    root filesystem that take up large amounts of memory.
+                </para>
+
+                <para>
+                    You need to be sure that what you eliminate does not cripple
+                    the functionality you need.
+                    One way to see how packages relate to each other is by using
+                    the Dependency Explorer UI with the BitBake command:
+                    <literallayout class='monospaced'>
+     $ cd <replaceable>image-directory</replaceable>
+     $ bitbake -u taskexp -g <replaceable>image</replaceable>
+                    </literallayout>
+                    Use the interface to select potential packages you wish to
+                    eliminate and see their dependency relationships.
+                </para>
+
+                <para>
+                    When deciding how to reduce the size, get rid of packages that
+                    result in minimal impact on the feature set.
+                    For example, you might not need a VGA display.
+                    Or, you might be able to get by with <filename>devtmpfs</filename>
+                    and <filename>mdev</filename> instead of
+                    <filename>udev</filename>.
+                </para>
+
+                <para>
+                    Use your <filename>local.conf</filename> file to make changes.
+                    For example, to eliminate <filename>udev</filename> and
+                    <filename>glib</filename>, set the following in the
+                    local configuration file:
+                    <literallayout class='monospaced'>
+     VIRTUAL-RUNTIME_dev_manager = ""
+                    </literallayout>
+                </para>
+
+                <para>
+                    Finally, you should consider exactly the type of root
+                    filesystem you need to meet your needs while also reducing
+                    its size.
+                    For example, consider <filename>cramfs</filename>,
+                    <filename>squashfs</filename>, <filename>ubifs</filename>,
+                    <filename>ext2</filename>, or an <filename>initramfs</filename>
+                    using <filename>initramfs</filename>.
+                    Be aware that <filename>ext3</filename> requires a 1 Mbyte
+                    journal.
+                    If you are okay with running read-only, you do not need this
+                    journal.
+                </para>
+
+                <note>
+                    After each round of elimination, you need to rebuild your
+                    system and then use the tools to see the effects of your
+                    reductions.
+                </note>
+            </section>
+
+            <section id='trim-the-kernel'>
+                <title>Trim the Kernel</title>
+
+                <para>
+                    The kernel is built by including policies for hardware-independent
+                    aspects.
+                    What subsystems do you enable?
+                    For what architecture are you building?
+                    Which drivers do you build by default?
+                    <note>You can modify the kernel source if you want to help
+                        with boot time.
+                    </note>
+                </para>
+
+                <para>
+                    Run the <filename>ksize.py</filename> script from the top-level
+                    Linux build directory to get an idea of what is making up
+                    the kernel:
+                    <literallayout class='monospaced'>
+     $ cd <replaceable>top-level-linux-build-directory</replaceable>
+     $ ksize.py > ksize.log
+     $ cat ksize.log
+                    </literallayout>
+                    When you examine the log, you will see how much space is
+                    taken up with the built-in <filename>.o</filename> files for
+                    drivers, networking, core kernel files, filesystem, sound,
+                    and so forth.
+                    The sizes reported by the tool are uncompressed, and thus
+                    will be smaller by a relatively constant factor in a compressed
+                    kernel image.
+                    Look to reduce the areas that are large and taking up around
+                    the "90% rule."
+                </para>
+
+                <para>
+                    To examine, or drill down, into any particular area, use the
+                    <filename>-d</filename> option with the script:
+                    <literallayout class='monospaced'>
+     $ ksize.py -d > ksize.log
+                    </literallayout>
+                    Using this option breaks out the individual file information
+                    for each area of the kernel (e.g. drivers, networking, and
+                    so forth).
+                </para>
+
+                <para>
+                    Use your log file to see what you can eliminate from the kernel
+                    based on features you can let go.
+                    For example, if you are not going to need sound, you do not
+                    need any drivers that support sound.
+                </para>
+
+                <para>
+                    After figuring out what to eliminate, you need to reconfigure
+                    the kernel to reflect those changes during the next build.
+                    You could run <filename>menuconfig</filename> and make all your
+                    changes at once.
+                    However, that makes it difficult to see the effects of your
+                    individual eliminations and also makes it difficult to replicate
+                    the changes for perhaps another target device.
+                    A better method is to start with no configurations using
+                    <filename>allnoconfig</filename>, create configuration
+                    fragments for individual changes, and then manage the
+                    fragments into a single configuration file using
+                    <filename>merge_config.sh</filename>.
+                    The tool makes it easy for you to iterate using the
+                    configuration change and build cycle.
+                </para>
+
+                <para>
+                    Each time you make configuration changes, you need to rebuild
+                    the kernel and check to see what impact your changes had on
+                    the overall size.
+                </para>
+            </section>
+
+            <section id='remove-package-management-requirements'>
+                <title>Remove Package Management Requirements</title>
+
+                <para>
+                    Packaging requirements add size to the image.
+                    One way to reduce the size of the image is to remove all the
+                    packaging requirements from the image.
+                    This reduction includes both removing the package manager
+                    and its unique dependencies as well as removing the package
+                    management data itself.
+                </para>
+
+                <para>
+                    To eliminate all the packaging requirements for an image,
+                    be sure that "package-management" is not part of your
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
+                    statement for the image.
+                    When you remove this feature, you are removing the package
+                    manager as well as its dependencies from the root filesystem.
+                </para>
+            </section>
+
+            <section id='look-for-other-ways-to-minimize-size'>
+                <title>Look for Other Ways to Minimize Size</title>
+
+                <para>
+                    Depending on your particular circumstances, other areas that you
+                    can trim likely exist.
+                    The key to finding these areas is through tools and methods
+                    described here combined with experimentation and iteration.
+                    Here are a couple of areas to experiment with:
+                    <itemizedlist>
+                        <listitem><para><filename>glibc</filename>:
+                            In general, follow this process:
+                            <orderedlist>
+                                <listitem><para>Remove <filename>glibc</filename>
+                                    features from
+                                    <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
+                                    that you think you do not need.</para></listitem>
+                                <listitem><para>Build your distribution.
+                                    </para></listitem>
+                                <listitem><para>If the build fails due to missing
+                                    symbols in a package, determine if you can
+                                    reconfigure the package to not need those
+                                    features.
+                                    For example, change the configuration to not
+                                    support wide character support as is done for
+                                    <filename>ncurses</filename>.
+                                    Or, if support for those characters is needed,
+                                    determine what <filename>glibc</filename>
+                                    features provide the support and restore the
+                                    configuration.
+                                    </para></listitem>
+                                <listitem><para>Rebuild and repeat the process.
+                                    </para></listitem>
+                            </orderedlist></para></listitem>
+                        <listitem><para><filename>busybox</filename>:
+                            For BusyBox, use a process similar as described for
+                            <filename>glibc</filename>.
+                            A difference is you will need to boot the resulting
+                            system to see if you are able to do everything you
+                            expect from the running system.
+                            You need to be sure to integrate configuration fragments
+                            into Busybox because BusyBox handles its own core
+                            features and then allows you to add configuration
+                            fragments on top.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id='iterate-on-the-process'>
+                <title>Iterate on the Process</title>
+
+                <para>
+                    If you have not reached your goals on system size, you need
+                    to iterate on the process.
+                    The process is the same.
+                    Use the tools and see just what is taking up 90% of the root
+                    filesystem and the kernel.
+                    Decide what you can eliminate without limiting your device
+                    beyond what you need.
+                </para>
+
+                <para>
+                    Depending on your system, a good place to look might be
+                    Busybox, which provides a stripped down
+                    version of Unix tools in a single, executable file.
+                    You might be able to drop virtual terminal services or perhaps
+                    ipv6.
+                </para>
+            </section>
+        </section>
+
+        <section id='building-images-for-more-than-one-machine'>
+            <title>Building Images for More than One Machine</title>
+
+            <para>
+                A common scenario developers face is creating images for several
+                different machines that use the same software environment.
+                In this situation, it is tempting to set the
+                tunings and optimization flags for each build specifically for
+                the targeted hardware (i.e. "maxing out" the tunings).
+                Doing so can considerably add to build times and package feed
+                maintenance collectively for the machines.
+                For example, selecting tunes that are extremely specific to a
+                CPU core used in a system might enable some micro optimizations
+                in GCC for that particular system but would otherwise not gain
+                you much of a performance difference across the other systems
+                as compared to using a more general tuning across all the builds
+                (e.g. setting
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></ulink>
+                specifically for each machine's build).
+                Rather than "max out" each build's tunings, you can take steps that
+                cause the OpenEmbedded build system to reuse software across the
+                various machines where it makes sense.
+            </para>
+
+            <para>
+                If build speed and package feed maintenance are considerations,
+                you should consider the points in this section that can help you
+                optimize your tunings to best consider build times and package
+                feed maintenance.
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Share the Build Directory:</emphasis>
+                        If at all possible, share the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+                        across builds.
+                        The Yocto Project supports switching between different
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+                        values in the same <filename>TMPDIR</filename>.
+                        This practice is well supported and regularly used by
+                        developers when building for multiple machines.
+                        When you use the same <filename>TMPDIR</filename> for
+                        multiple machine builds, the OpenEmbedded build system can
+                        reuse the existing native and often cross-recipes for
+                        multiple machines.
+                        Thus, build time decreases.
+                        <note>
+                            If
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
+                            settings change or fundamental configuration settings
+                            such as the filesystem layout, you need to work with
+                            a clean <filename>TMPDIR</filename>.
+                            Sharing <filename>TMPDIR</filename> under these
+                            circumstances might work but since it is not
+                            guaranteed, you should use a clean
+                            <filename>TMPDIR</filename>.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Enable the Appropriate Package Architecture:</emphasis>
+                        By default, the OpenEmbedded build system enables three
+                        levels of package architectures: "all", "tune" or "package",
+                        and "machine".
+                        Any given recipe usually selects one of these package
+                        architectures (types) for its output.
+                        Depending for what a given recipe creates packages, making
+                        sure you enable the appropriate package architecture can
+                        directly impact the build time.</para>
+
+                        <para>A recipe that just generates scripts can enable
+                        "all" architecture because there are no binaries to build.
+                        To specifically enable "all" architecture, be sure your
+                        recipe inherits the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-allarch'><filename>allarch</filename></ulink>
+                        class.
+                        This class is useful for "all" architectures because it
+                        configures many variables so packages can be used across
+                        multiple architectures.</para>
+
+                        <para>If your recipe needs to generate packages that are
+                        machine-specific or when one of the build or runtime
+                        dependencies is already machine-architecture dependent,
+                        which makes your recipe also machine-architecture dependent,
+                        make sure your recipe enables the "machine" package
+                        architecture through the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></ulink>
+                        variable:
+                        <literallayout class='monospaced'>
+     PACKAGE_ARCH = "${MACHINE_ARCH}"
+                        </literallayout>
+                        When you do not specifically enable a package
+                        architecture through the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>,
+                        The OpenEmbedded build system defaults to the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></ulink>
+                        setting:
+                        <literallayout class='monospaced'>
+     PACKAGE_ARCH = "${TUNE_PKGARCH}"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Choose a Generic Tuning File if Possible:</emphasis>
+                        Some tunes are more generic and can run on multiple targets
+                        (e.g. an <filename>armv5</filename> set of packages could
+                        run on <filename>armv6</filename> and
+                        <filename>armv7</filename> processors in most cases).
+                        Similarly, <filename>i486</filename> binaries could work
+                        on <filename>i586</filename> and higher processors.
+                        You should realize, however, that advances on newer
+                        processor versions would not be used.</para>
+
+                        <para>If you select the same tune for several different
+                        machines, the OpenEmbedded build system reuses software
+                        previously built, thus speeding up the overall build time.
+                        Realize that even though a new sysroot for each machine is
+                        generated, the software is not recompiled and only one
+                        package feed exists.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Manage Granular Level Packaging:</emphasis>
+                        Sometimes cases exist where injecting another level of
+                        package architecture beyond the three higher levels noted
+                        earlier can be useful.
+                        For example, consider how NXP (formerly Freescale) allows
+                        for the easy reuse of binary packages in their layer
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/'><filename>meta-freescale</filename></ulink>.
+                        In this example, the
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/tree/classes/fsl-dynamic-packagearch.bbclass'><filename>fsl-dynamic-packagearch</filename></ulink>
+                        class shares GPU packages for i.MX53 boards because
+                        all boards share the AMD GPU.
+                        The i.MX6-based boards can do the same because all boards
+                        share the Vivante GPU.
+                        This class inspects the BitBake datastore to identify if
+                        the package provides or depends on one of the
+                        sub-architecture values.
+                        If so, the class sets the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>
+                        value based on the <filename>MACHINE_SUBARCH</filename>
+                        value.
+                        If the package does not provide or depend on one of the
+                        sub-architecture values but it matches a value in the
+                        machine-specific filter, it sets
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></ulink>.
+                        This behavior reduces the number of packages built and
+                        saves build time by reusing binaries.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Use Tools to Debug Issues:</emphasis>
+                        Sometimes you can run into situations where software is
+                        being rebuilt when you think it should not be.
+                        For example, the OpenEmbedded build system might not be
+                        using shared state between machines when you think it
+                        should be.
+                        These types of situations are usually due to references
+                        to machine-specific variables such as
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-XSERVER'><filename>XSERVER</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></ulink>,
+                        and so forth in code that is supposed to only be
+                        tune-specific or when the recipe depends
+                        (<ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-RSUGGESTS'><filename>RSUGGESTS</filename></ulink>,
+                        and so forth) on some other recipe that already has
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>
+                        defined as "${MACHINE_ARCH}".
+                        <note>
+                            Patches to fix any issues identified are most welcome
+                            as these issues occasionally do occur.
+                        </note></para>
+
+                        <para>For such cases, you can use some tools to help you
+                        sort out the situation:
+                        <itemizedlist>
+                            <listitem><para>
+                                <emphasis><filename>sstate-diff-machines.sh</filename>:</emphasis>
+                                You can find this tool in the
+                                <filename>scripts</filename> directory of the
+                                Source Repositories.
+                                See the comments in the script for information on
+                                how to use the tool.
+                                </para></listitem>
+                            <listitem><para>
+                                <emphasis>BitBake's "-S printdiff" Option:</emphasis>
+                                Using this option causes BitBake to try to
+                                establish the closest signature match it can
+                                (e.g. in the shared state cache) and then run
+                                <filename>bitbake-diffsigs</filename> over the
+                                matches to determine the stamps and delta where
+                                these two stamp trees diverge.
+                                </para></listitem>
+                        </itemizedlist>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id="building-software-from-an-external-source">
+            <title>Building Software from an External Source</title>
+
+            <para>
+                By default, the OpenEmbedded build system uses the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                when building source code.
+                The build process involves fetching the source files, unpacking
+                them, and then patching them if necessary before the build takes
+                place.
+            </para>
+
+            <para>
+                Situations exist where you might want to build software from source
+                files that are external to and thus outside of the
+                OpenEmbedded build system.
+                For example, suppose you have a project that includes a new BSP with
+                a heavily customized kernel.
+                And, you want to minimize exposing the build system to the
+                development team so that they can focus on their project and
+                maintain everyone's workflow as much as possible.
+                In this case, you want a kernel source directory on the development
+                machine where the development occurs.
+                You want the recipe's
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                variable to point to the external directory and use it as is, not
+                copy it.
+            </para>
+
+            <para>
+                To build from software that comes from an external source, all you
+                need to do is inherit the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
+                class and then set the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>
+                variable to point to your external source code.
+                Here are the statements to put in your
+                <filename>local.conf</filename> file:
+                <literallayout class='monospaced'>
+     INHERIT += "externalsrc"
+     EXTERNALSRC_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
+                </literallayout>
+            </para>
+
+            <para>
+                This next example shows how to accomplish the same thing by setting
+                <filename>EXTERNALSRC</filename> in the recipe itself or in the
+                recipe's append file:
+                <literallayout class='monospaced'>
+     EXTERNALSRC = "<replaceable>path</replaceable>"
+     EXTERNALSRC_BUILD = "<replaceable>path</replaceable>"
+                </literallayout>
+                <note>
+                    In order for these settings to take effect, you must globally
+                    or locally inherit the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
+                    class.
+                </note>
+            </para>
+
+            <para>
+                By default, <filename>externalsrc.bbclass</filename> builds
+                the source code in a directory separate from the external source
+                directory as specified by
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>.
+                If you need to have the source built in the same directory in
+                which it resides, or some other nominated directory, you can set
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></ulink>
+                to point to that directory:
+                <literallayout class='monospaced'>
+     EXTERNALSRC_BUILD_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
+                </literallayout>
+            </para>
+        </section>
+    </section>
+
+
+
+    <section id='speeding-up-a-build'>
+        <title>Speeding Up a Build</title>
 
         <para>
-            Follow these guidelines to create an environment that supports
-            multiple configurations:
+            Build time can be an issue.
+            By default, the build system uses simple controls to try and maximize
+            build efficiency.
+            In general, the default settings for all the following variables
+            result in the most efficient build times when dealing with single
+            socket systems (i.e. a single CPU).
+            If you have multiple CPUs, you might try increasing the default
+            values to gain more speed.
+            See the descriptions in the glossary for each variable for more
+            information:
             <itemizedlist>
                 <listitem><para>
-                    <emphasis>Create Configuration Files</emphasis>:
-                    You need to create a single configuration file for each
-                    configuration for which you want to add support.
-                    These files would contain lines such as the following:
-                    <literallayout class='monospaced'>
-     MACHINE = "A"
-                    </literallayout>
-                    The files would contain any other variables that can
-                    be set and built in the same directory.
-                    <note>
-                        You can change the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
-                        to not conflict.
-                    </note></para>
-
-                    <para>
-                    Furthermore, the configuration file must be located in the
-                    current build directory in a directory named
-                    <filename>multiconfig</filename> under the build's
-                    <filename>conf</filename> directory where
-                    <filename>local.conf</filename> resides.
-                    The reason for this restriction is because the
-                    <filename>BBPATH</filename> variable is not constructed
-                    until the layers are parsed.
-                    Consequently, using the configuration file as a
-                    pre-configuration file is not possible unless it is
-                    located in the current working directory.
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename>:</ulink>
+                    The maximum number of threads BitBake simultaneously executes.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Add the BitBake Multi-Config Variable to you Local Configuration File</emphasis>:
-                    Use the
-                    <filename>BBMULTICONFIG</filename>
-                    variable in your <filename>conf/local.conf</filename>
-                    configuration file to specify each separate configuration.
-                    For example, the following line tells BitBake it should load
-                    <filename>conf/multiconfig/configA.conf</filename>,
-                    <filename>conf/multiconfig/configB.conf</filename>, and
-                    <filename>conf/multiconfig/configC.conf</filename>.
-                    <literallayout class='monospaced'>
-     BBMULTICONFIG = "configA configB configC"
-                    </literallayout>
+                    <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename>:</ulink>
+                    The number of threads BitBake uses during parsing.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Launch BitBake</emphasis>:
-                    Use the following BitBake command form to launch the
-                    build:
-                    <literallayout class='monospaced'>
-     $ bitbake [multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable> [[[multiconfig:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable>] ... ]
-                    </literallayout>
-                    Following is an example that supports building a minimal
-                    image for configuration A alongside a standard
-                    <filename>core-image-sato</filename>, which takes its
-                    configuration from <filename>local.conf</filename>:
-                    <literallayout class='monospaced'>
-     $ bitbake multiconfig:configA:core-image-minimal core-image-sato
-                    </literallayout>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename>:</ulink>
+                    Extra options passed to the <filename>make</filename> command
+                    during the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
+                    task in order to specify parallel compilation on the
+                    local build host.
+                    </para></listitem>
+                <listitem><para>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename>:</ulink>
+                    Extra options passed to the <filename>make</filename> command
+                    during the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+                    task in order to specify parallel installation on the
+                    local build host.
                     </para></listitem>
             </itemizedlist>
+            As mentioned, these variables all scale to the number of processor
+            cores available on the build system.
+            For single socket systems, this auto-scaling ensures that the build
+            system fundamentally takes advantage of potential parallel operations
+            during the build based on the build machine's capabilities.
         </para>
 
         <para>
-            Support for multiple configurations in this current release of
-            the Yocto Project (&DISTRO_NAME; &DISTRO;) has some known issues:
+            Following are additional factors that can affect build speed:
             <itemizedlist>
                 <listitem><para>
-                    No inter-multi-configuration dependencies exist.
+                    File system type:
+                    The file system type that the build is being performed on can
+                    also influence performance.
+                    Using <filename>ext4</filename> is recommended as compared
+                    to <filename>ext2</filename> and <filename>ext3</filename>
+                    due to <filename>ext4</filename> improved features
+                    such as extents.
                     </para></listitem>
                 <listitem><para>
-                    Shared State (sstate) optimizations do not exist.
-                    Consequently, if the build uses the same object twice
-                    in, for example, two different
-                    <filename>TMPDIR</filename> directories, the build
-                    will either load from an existing sstate cache at the
-                    start or build the object twice.
+                    Disabling the updating of access time using
+                    <filename>noatime</filename>:
+                    The <filename>noatime</filename> mount option prevents the
+                    build system from updating file and directory access times.
                     </para></listitem>
+                <listitem><para>
+                    Setting a longer commit:
+                    Using the "commit=" mount option increases the interval
+                    in seconds between disk cache writes.
+                    Changing this interval from the five second default to
+                    something longer increases the risk of data loss but decreases
+                    the need to write to the disk, thus increasing the build
+                    performance.
+                    </para></listitem>
+                <listitem><para>
+                    Choosing the packaging backend:
+                    Of the available packaging backends, IPK is the fastest.
+                    Additionally, selecting a singular packaging backend also
+                    helps.
+                    </para></listitem>
+                <listitem><para>
+                    Using <filename>tmpfs</filename> for
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+                    as a temporary file system:
+                    While this can help speed up the build, the benefits are
+                    limited due to the compiler using
+                    <filename>-pipe</filename>.
+                    The build system goes to some lengths to avoid
+                    <filename>sync()</filename> calls into the
+                    file system on the principle that if there was a significant
+                    failure, the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                    contents could easily be rebuilt.
+                    </para></listitem>
+                <listitem><para>
+                    Inheriting the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-rm-work'><filename>rm_work</filename></ulink>
+                    class:
+                    Inheriting this class has shown to speed up builds due to
+                    significantly lower amounts of data stored in the data
+                    cache as well as on disk.
+                    Inheriting this class also makes cleanup of
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+                    faster, at the expense of being easily able to dive into the
+                    source code.
+                    File system maintainers have recommended that the fastest way
+                    to clean up large numbers of files is to reformat partitions
+                    rather than delete files due to the linear nature of
+                    partitions.
+                    This, of course, assumes you structure the disk partitions and
+                    file systems in a way that this is practical.
+                    </para></listitem>
+            </itemizedlist>
+            Aside from the previous list, you should keep some trade offs in
+            mind that can help you speed up the build:
+            <itemizedlist>
+                <listitem><para>
+                    Remove items from
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
+                    that you might not need.
+                    </para></listitem>
+                <listitem><para>
+                    Exclude debug symbols and other debug information:
+                    If you do not need these symbols and other debug information,
+                    disabling the <filename>*-dbg</filename> package generation
+                    can speed up the build.
+                    You can disable this generation by setting the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-INHIBIT_PACKAGE_DEBUG_SPLIT'><filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename></ulink>
+                    variable to "1".
+                    </para></listitem>
+                <listitem><para>
+                    Disable static library generation for recipes derived from
+                    <filename>autoconf</filename> or <filename>libtool</filename>:
+                    Following is an example showing how to disable static
+                    libraries and still provide an override to handle exceptions:
+                    <literallayout class='monospaced'>
+     STATICLIBCONF = "--disable-static"
+     STATICLIBCONF_sqlite3-native = ""
+     EXTRA_OECONF += "${STATICLIBCONF}"
+                    </literallayout>
+                    <note><title>Notes</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                Some recipes need static libraries in order to work
+                                correctly (e.g. <filename>pseudo-native</filename>
+                                needs <filename>sqlite3-native</filename>).
+                                Overrides, as in the previous example, account for
+                                these kinds of exceptions.
+                                </para></listitem>
+                            <listitem><para>
+                                Some packages have packaging code that assumes the
+                                presence of the static libraries.
+                                If so, you might need to exclude them as well.
+                                </para></listitem>
+                        </itemizedlist>
+                    </note>
+                </para></listitem>
             </itemizedlist>
         </para>
     </section>
@@ -4543,6 +6723,84 @@
         </section>
     </section>
 
+    <section id='using-x32-psabi'>
+        <title>Using x32 psABI</title>
+
+        <para>
+            x32 processor-specific Application Binary Interface
+            (<ulink url='https://software.intel.com/en-us/node/628948'>x32 psABI</ulink>)
+            is a native 32-bit processor-specific ABI for
+            <trademark class='registered'>Intel</trademark> 64 (x86-64)
+            architectures.
+            An ABI defines the calling conventions between functions in a
+            processing environment.
+            The interface determines what registers are used and what the
+            sizes are for various C data types.
+        </para>
+
+        <para>
+            Some processing environments prefer using 32-bit applications even
+            when running on Intel 64-bit platforms.
+            Consider the i386 psABI, which is a very old 32-bit ABI for Intel
+            64-bit platforms.
+            The i386 psABI does not provide efficient use and access of the
+            Intel 64-bit processor resources, leaving the system underutilized.
+            Now consider the x86_64 psABI.
+            This ABI is newer and uses 64-bits for data sizes and program
+            pointers.
+            The extra bits increase the footprint size of the programs,
+            libraries, and also increases the memory and file system size
+            requirements.
+            Executing under the x32 psABI enables user programs to utilize CPU
+            and system resources more efficiently while keeping the memory
+            footprint of the applications low.
+            Extra bits are used for registers but not for addressing mechanisms.
+        </para>
+
+        <para>
+            The Yocto Project supports the final specifications of x32 psABI
+            as follows:
+            <itemizedlist>
+                <listitem><para>
+                    You can create packages and images in x32 psABI format on
+                    x86_64 architecture targets.
+                    </para></listitem>
+                <listitem><para>
+                    You can successfully build recipes with the x32 toolchain.
+                    </para></listitem>
+                <listitem><para>
+                    You can create and boot
+                    <filename>core-image-minimal</filename> and
+                    <filename>core-image-sato</filename> images.
+                    </para></listitem>
+                <listitem><para>
+                    RPM Package Manager (RPM) support exists for x32 binaries.
+                    </para></listitem>
+                <listitem><para>
+                    Support for large images exists.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            To use the x32 psABI, you need to edit your
+            <filename>conf/local.conf</filename> configuration file as
+            follows:
+            <literallayout class='monospaced'>
+     MACHINE = "qemux86-64"
+     DEFAULTTUNE = "x86-64-x32"
+     baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) \
+        or 'INVALID'), True) or 'lib'}"
+            </literallayout>
+            Once you have set up your configuration file, use BitBake to
+            build an image that supports the x32 psABI.
+            Here is an example:
+            <literallayout class='monospaced'>
+     $ bitbake core-image-sato
+            </literallayout>
+        </para>
+    </section>
+
     <section id='enabling-gobject-introspection-support'>
         <title>Enabling GObject Introspection Support</title>
 
@@ -4795,8 +7053,7 @@
                     variable.
                     </para></listitem>
                 <listitem><para>
-                    Set the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNAL_TOOLCHAIN'><filename>EXTERNAL_TOOLCHAIN</filename></ulink>
+                    Set the <filename>EXTERNAL_TOOLCHAIN</filename>
                     variable in your <filename>local.conf</filename> file
                     to the location in which you installed the toolchain.
                     </para></listitem>
@@ -4846,7 +7103,7 @@
             system.
             <note>
                 For a kickstart file reference, see the
-                "<ulink url='&YOCTO_DOCS_REF_URL;#openembedded-kickstart-wks-reference'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</ulink>"
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-kickstart'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</ulink>"
                 Chapter in the Yocto Project Reference Manual.
             </note>
         </para>
@@ -4858,16 +7115,17 @@
             customized images, and as such, was designed to be
             completely extensible through a plug-in interface.
             See the
-            "<ulink url='&YOCTO_DOCS_REF_URL;#wic-plug-ins-interface'>Wic Plug-Ins Interface</ulink>"
-            section in the Yocto Project Reference Manual for information
-            on these plug-ins.
+            "<link linkend='wic-using-the-wic-plug-ins-interface'>Using the Wic Plug-Ins Interface</link>"
+            section for information on these plug-ins.
         </para>
 
         <para>
             This section provides some background information on Wic,
             describes what you need to have in
             place to run the tool, provides instruction on how to use
-            the Wic utility, and provides several examples.
+            the Wic utility, provides information on using the Wic plug-ins
+            interface, and provides several examples that show how to use
+            Wic.
         </para>
 
         <section id='wic-background'>
@@ -4899,7 +7157,7 @@
                         Wic is a completely independent
                         standalone utility that initially provides
                         easier-to-use and more flexible replacements for an
-                        existing functionality in OE Core's
+                        existing functionality in OE-Core's
                         <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image-live'><filename>image-live</filename></ulink>
                         class and <filename>mkefidisk.sh</filename> script.
                         The difference between
@@ -4988,6 +7246,7 @@
                 <literallayout class='monospaced'>
      $ wic -h
      $ wic --help
+     $ wic help
                 </literallayout>
             </para>
 
@@ -4997,51 +7256,66 @@
                 <filename>help</filename>, <filename>list</filename>,
                 <filename>ls</filename>, <filename>rm</filename>, and
                 <filename>write</filename>.
-                You can get help for these commands as follows with
-                <replaceable>command</replaceable> being one of the
-                supported commands:
+                You can get help for all these commands except "help" by
+                using the following form:
                 <literallayout class='monospaced'>
      $ wic help <replaceable>command</replaceable>
                 </literallayout>
-            </para>
-
-            <para>
-                You can also get detailed help on a number of topics
-                from the help system.
-                The output of <filename>wic --help</filename>
-                displays a list of available help
-                topics under a "Help topics" heading.
-                You can have the help system display the help text for
-                a given topic by prefacing the topic with
-                <filename>wic help</filename>:
+                For example, the following command returns help for the
+                <filename>write</filename> command:
                 <literallayout class='monospaced'>
-     $ wic help <replaceable>help_topic</replaceable>
+     $ wic help write
                 </literallayout>
             </para>
 
             <para>
-                You can find out more about the images Wic creates using
-                the existing kickstart files with the following form of
-                the command:
+                Wic supports help for three topics:
+                <filename>overview</filename>,
+                <filename>plugins</filename>, and
+                <filename>kickstart</filename>.
+                You can get help for any topic using the following form:
                 <literallayout class='monospaced'>
-     $ wic list <replaceable>image</replaceable> help
+     $ wic help <replaceable>topic</replaceable>
                 </literallayout>
-                For <replaceable>image</replaceable>, you can provide
-                any of the following:
+                For example, the following returns overview help for Wic:
                 <literallayout class='monospaced'>
-       beaglebone
-       mpc8315e-rdb
-       genericx86
-       edgerouter
-       qemux86-directdisk
-       directdisk-gpt
-       mkefidisk
-       directdisk
-       systemd-bootdisk
-       mkhybridiso
-       sdimage-bootpart
-       directdisk-multi-rootfs
-       directdisk-bootloader-config
+     $ wic help overview
+                </literallayout>
+            </para>
+
+            <para>
+                One additional level of help exists for Wic.
+                You can get help on individual images through the
+                <filename>list</filename> command.
+                You can use the <filename>list</filename> command to return the
+                available Wic images as follows:
+                <literallayout class='monospaced'>
+     $ wic list images
+       mpc8315e-rdb                  		Create SD card image for MPC8315E-RDB
+       genericx86                    		Create an EFI disk image for genericx86*
+       beaglebone-yocto              		Create SD card image for Beaglebone
+       edgerouter                    		Create SD card image for Edgerouter
+       qemux86-directdisk            		Create a qemu machine 'pcbios' direct disk image
+       directdisk-gpt                		Create a 'pcbios' direct disk image
+       mkefidisk                     		Create an EFI disk image
+       directdisk                    		Create a 'pcbios' direct disk image
+       systemd-bootdisk              		Create an EFI disk image with systemd-boot
+       mkhybridiso                   		Create a hybrid ISO image
+       sdimage-bootpart              		Create SD card image with a boot partition
+       directdisk-multi-rootfs       		Create multi rootfs image using rootfs plugin
+       directdisk-bootloader-config  		Create a 'pcbios' direct disk image with custom bootloader config
+                </literallayout>
+                Once you know the list of available Wic images, you can use
+                <filename>help</filename> with the command to get help on a
+                particular image.
+                For example, the following command returns help on the
+                "beaglebone-yocto" image:
+                <literallayout class='monospaced'>
+     $ wic list beaglebone-yocto help
+
+
+     Creates a partitioned SD card image for Beaglebone.
+     Boot files are located in the first vfat partition.
                 </literallayout>
             </para>
         </section>
@@ -5058,7 +7332,7 @@
                     <listitem><para>
                         <emphasis>Raw Mode:</emphasis>
                         You explicitly specify build artifacts through
-                        <filename>wic</filename> command-line arguments.
+                        Wic command-line arguments.
                         </para></listitem>
                     <listitem><para>
                         <emphasis>Cooked Mode:</emphasis>
@@ -5153,7 +7427,7 @@
 
                 <para>
                     Running Wic in cooked mode leverages off artifacts in
-                    Build Directory.
+                    the Build Directory.
                     In other words, you do not have to specify kernel or
                     root filesystem locations as part of the command.
                     All you need to provide is a kickstart file and the
@@ -5195,7 +7469,7 @@
                 can use an existing file provided by the Wic installation.
                 As shipped, kickstart files can be found in the
                 Yocto Project
-                <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+                <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
                 in the following two locations:
                 <literallayout class='monospaced'>
      poky/meta-yocto-bsp/wic
@@ -5205,9 +7479,9 @@
                 files:
                 <literallayout class='monospaced'>
      $ wic list images
-       beaglebone                    		Create SD card image for Beaglebone
        mpc8315e-rdb                  		Create SD card image for MPC8315E-RDB
        genericx86                    		Create an EFI disk image for genericx86*
+       beaglebone-yocto              		Create SD card image for Beaglebone
        edgerouter                    		Create SD card image for Edgerouter
        qemux86-directdisk            		Create a qemu machine 'pcbios' direct disk image
        directdisk-gpt                		Create a 'pcbios' direct disk image
@@ -5245,6 +7519,209 @@
             </para>
         </section>
 
+        <section id='wic-using-the-wic-plug-ins-interface'>
+            <title>Using the Wic Plug-Ins Interface</title>
+
+            <para>
+                You can extend and specialize Wic functionality by using
+                Wic plug-ins.
+                This section explains the Wic plug-in interface.
+                <note>
+                    Wic plug-ins consist of "source" and "imager" plug-ins.
+                    Imager plug-ins are beyond the scope of this section.
+                </note>
+            </para>
+
+            <para>
+                Source plug-ins provide a mechanism to customize partition
+                content during the Wic image generation process.
+                You can use source plug-ins to map values that you specify
+                using <filename>--source</filename> commands in kickstart
+                files (i.e. <filename>*.wks</filename>) to a plug-in
+                implementation used to populate a given partition.
+                <note>
+                    If you use plug-ins that have build-time dependencies
+                    (e.g. native tools, bootloaders, and so forth)
+                    when building a Wic image, you need to specify those
+                    dependencies using the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-WKS_FILE_DEPENDS'><filename>WKS_FILE_DEPENDS</filename></ulink>
+                    variable.
+                </note>
+            </para>
+
+            <para>
+                Source plug-ins are subclasses defined in plug-in files.
+                As shipped, the Yocto Project provides several plug-in
+                files.
+                You can see the source plug-in files that ship with the
+                Yocto Project
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/scripts/lib/wic/plugins/source'>here</ulink>.
+                Each of these plug-in files contains source plug-ins that
+                are designed to populate a specific Wic image partition.
+            </para>
+
+            <para>
+                Source plug-ins are subclasses of the
+                <filename>SourcePlugin</filename> class, which is
+                defined in the
+                <filename>poky/scripts/lib/wic/pluginbase.py</filename>
+                file.
+                For example, the <filename>BootimgEFIPlugin</filename>
+                source plug-in found in the
+                <filename>bootimg-efi.py</filename> file is a subclass of
+                the <filename>SourcePlugin</filename> class, which is found
+                in the <filename>pluginbase.py</filename> file.
+            </para>
+
+            <para>
+                You can also implement source plug-ins in a layer outside
+                of the Source Repositories (external layer).
+                To do so, be sure that your plug-in files are located in
+                a directory whose path is
+                <filename>scripts/lib/wic/plugins/source/</filename>
+                within your external layer.
+                When the plug-in files are located there, the source
+                plug-ins they contain are made available to Wic.
+            </para>
+
+            <para>
+                When the Wic implementation needs to invoke a
+                partition-specific implementation, it looks for the plug-in
+                with the same name as the <filename>--source</filename>
+                parameter used in the kickstart file given to that
+                partition.
+                For example, if the partition is set up using the following
+                command in a kickstart file:
+                <literallayout class='monospaced'>
+     part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
+                </literallayout>
+                The methods defined as class members of the matching
+                source plug-in (i.e. <filename>bootimg-pcbios</filename>)
+                in the <filename>bootimg-pcbios.py</filename> plug-in file
+                are used.
+            </para>
+
+            <para>
+                To be more concrete, here is the corresponding plug-in
+                definition from the <filename>bootimg-pcbios.py</filename>
+                file for the previous command along with an example
+                method called by the Wic implementation when it needs to
+                prepare a partition using an implementation-specific
+                function:
+                <literallayout class='monospaced'>
+                  .
+                  .
+                  .
+     class BootimgPcbiosPlugin(SourcePlugin):
+         """
+         Create MBR boot partition and install syslinux on it.
+         """
+
+         name = 'bootimg-pcbios'
+                  .
+                  .
+                  .
+         @classmethod
+         def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
+                                  oe_builddir, bootimg_dir, kernel_dir,
+                                  rootfs_dir, native_sysroot):
+             """
+             Called to do the actual content population for a partition i.e. it
+             'prepares' the partition to be incorporated into the image.
+             In this case, prepare content for legacy bios boot partition.
+             """
+                  .
+                  .
+                  .
+                </literallayout>
+                If a subclass (plug-in) itself does not implement a
+                particular function, Wic locates and uses the default
+                version in the superclass.
+                It is for this reason that all source plug-ins are derived
+                from the <filename>SourcePlugin</filename> class.
+            </para>
+
+            <para>
+                The <filename>SourcePlugin</filename> class defined in
+                the <filename>pluginbase.py</filename> file defines
+                a set of methods that source plug-ins can implement or
+                override.
+                Any plug-ins (subclass of
+                <filename>SourcePlugin</filename>) that do not implement
+                a particular method inherit the implementation of the
+                method from the <filename>SourcePlugin</filename> class.
+                For more information, see the
+                <filename>SourcePlugin</filename> class in the
+                <filename>pluginbase.py</filename> file for details:
+            </para>
+
+            <para>
+                The following list describes the methods implemented in the
+                <filename>SourcePlugin</filename> class:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis><filename>do_prepare_partition()</filename>:</emphasis>
+                        Called to populate a partition with actual content.
+                        In other words, the method prepares the final
+                        partition image that is incorporated into the
+                        disk image.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis><filename>do_configure_partition()</filename>:</emphasis>
+                        Called before
+                        <filename>do_prepare_partition()</filename> to
+                        create custom configuration files for a partition
+                        (e.g. syslinux or grub configuration files).
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis><filename>do_install_disk()</filename>:</emphasis>
+                        Called after all partitions have been prepared and
+                        assembled into a disk image.
+                        This method provides a hook to allow finalization
+                        of a disk image (e.g. writing an MBR).
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis><filename>do_stage_partition()</filename>:</emphasis>
+                        Special content-staging hook called before
+                        <filename>do_prepare_partition()</filename>.
+                        This method is normally empty.</para>
+
+                        <para>Typically, a partition just uses the passed-in
+                        parameters (e.g. the unmodified value of
+                        <filename>bootimg_dir</filename>).
+                        However, in some cases, things might need to be
+                        more tailored.
+                        As an example, certain files might additionally
+                        need to be taken from
+                        <filename>bootimg_dir + /boot</filename>.
+                        This hook allows those files to be staged in a
+                        customized fashion.
+                        <note>
+                            <filename>get_bitbake_var()</filename>
+                            allows you to access non-standard variables
+                            that you might want to use for this
+                            behavior.
+                        </note>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                You can extend the source plug-in mechanism.
+                To add more hooks, create more source plug-in methods
+                within <filename>SourcePlugin</filename> and the
+                corresponding derived subclasses.
+                The code that calls the plug-in methods uses the
+                <filename>plugin.get_source_plugin_methods()</filename>
+                function to find the method or methods needed by the call.
+                Retrieval of those methods is accomplished by filling up
+                a dict with keys that contain the method names of interest.
+                On success, these will be filled in with the actual
+                methods.
+                See the Wic implementation for examples and details.
+            </para>
+        </section>
+
         <section id='wic-usage-examples'>
             <title>Examples</title>
 
@@ -5271,16 +7748,16 @@
                .
                .
      INFO: The new image(s) can be found here:
-       ./mkefidisk-201710061409-sda.direct
+       ./mkefidisk-201804191017-sda.direct
 
      The following build artifacts were used to create the image(s):
-       ROOTFS_DIR:                   /home/scottrif/poky/build/tmp.wic.r4hkds0b/rootfs_copy
-       BOOTIMG_DIR:                  /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
-       KERNEL_DIR:                   /home/scottrif/poky/build/tmp/deploy/images/qemux86
-       NATIVE_SYSROOT:               /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
+       ROOTFS_DIR:                   /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs
+       BOOTIMG_DIR:                  /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
+       KERNEL_DIR:                   /home/stephano/build/master/build/tmp-glibc/deploy/images/qemux86
+       NATIVE_SYSROOT:               /home/stephano/build/master/build/tmp-glibc/work/i586-oe-linux/wic-tools/1.0-r0/recipe-sysroot-native
 
      INFO: The image(s) were created using OE kickstart file:
-       /home/scottrif/poky/scripts/lib/wic/canned-wks/mkefidisk.wks
+       /home/stephano/build/master/openembedded-core/scripts/lib/wic/canned-wks/mkefidisk.wks
                     </literallayout>
                     The previous example shows the easiest way to create
                     an image by running in cooked mode and supplying
@@ -5305,17 +7782,18 @@
 
                 <para>
                     Continuing with the example, you can now write the
-                    image to a USB stick, or whatever media for which you
-                    built your image, and boot from the media.
+                    image from the Build Directory onto a USB stick, or
+                    whatever media for which you built your image, and boot
+                    from the media.
                     You can write the image by using
                     <filename>bmaptool</filename> or
                     <filename>dd</filename>:
                     <literallayout class='monospaced'>
-     $ oe-run-native bmaptool copy build/mkefidisk-201710061409-sda.direct /dev/sd<replaceable>X</replaceable>
+     $ oe-run-native bmaptool copy mkefidisk-201804191017-sda.direct /dev/sd<replaceable>X</replaceable>
                     </literallayout>
                     or
                     <literallayout class='monospaced'>
-     $ sudo dd if=build/mkefidisk-201710061409-sda.direct of=/dev/sd<replaceable>X</replaceable>
+     $ sudo dd if=mkefidisk-201804191017-sda.direct of=/dev/sd<replaceable>X</replaceable>
                     </literallayout>
                     <note>
                         For more information on how to use the
@@ -5375,8 +7853,8 @@
                     directory and then by changing the lines that specify
                     the target disk from which to boot.
                     <literallayout class='monospaced'>
-     $ cp /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisk-gpt.wks \
-          /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
+     $ cp /home/stephano/poky/scripts/lib/wic/canned-wks/directdisk-gpt.wks \
+          /home/stephano/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
                     </literallayout>
                     Next, the example modifies the
                     <filename>directdisksdb-gpt.wks</filename> file and
@@ -5412,13 +7890,13 @@
        ./directdisksdb-gpt-201710090938-sdb.direct
 
      The following build artifacts were used to create the image(s):
-       ROOTFS_DIR:                   /home/scottrif/poky/build/tmp.wic.hk3wl6zn/rootfs_copy
-       BOOTIMG_DIR:                  /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
-       KERNEL_DIR:                   /home/scottrif/poky/build/tmp/deploy/images/qemux86
-       NATIVE_SYSROOT:               /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
+       ROOTFS_DIR:                   /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs
+       BOOTIMG_DIR:                  /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
+       KERNEL_DIR:                   /home/stephano/build/master/build/tmp-glibc/deploy/images/qemux86
+       NATIVE_SYSROOT:               /home/stephano/build/master/build/tmp-glibc/work/i586-oe-linux/wic-tools/1.0-r0/recipe-sysroot-native
 
      INFO: The image(s) were created using OE kickstart file:
-       /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
+       /home/stephano/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
                     </literallayout>
                     Continuing with the example, you can now directly
                     <filename>dd</filename> the image to a USB stick, or
@@ -5445,25 +7923,25 @@
                     somewhere other than the default output directory,
                     which is the current directory:
                     <literallayout class='monospaced'>
-     $ wic create /home/scottrif/my_yocto/test.wks -o /home/scottrif/testwic \
-          --rootfs-dir /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \
-          --bootimg-dir /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share \
-          --kernel-dir /home/scottrif/poky/build/tmp/deploy/images/qemux86 \
-          --native-sysroot /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
+     $ wic create /home/stephano/my_yocto/test.wks -o /home/stephano/testwic \
+          --rootfs-dir /home/stephano/build/master/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \
+          --bootimg-dir /home/stephano/build/master/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share \
+          --kernel-dir /home/stephano/build/master/build/tmp/deploy/images/qemux86 \
+          --native-sysroot /home/stephano/build/master/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
 
      INFO: Creating image(s)...
 
      INFO: The new image(s) can be found here:
-       /home/scottrif/testwic/test-201710091445-sdb.direct
+       /home/stephano/testwic/test-201710091445-sdb.direct
 
      The following build artifacts were used to create the image(s):
-       ROOTFS_DIR:                   /home/scottrif/testwic/tmp.wic.x4wipbmb/rootfs_copy
-       BOOTIMG_DIR:                  /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
-       KERNEL_DIR:                   /home/scottrif/poky/build/tmp/deploy/images/qemux86
-       NATIVE_SYSROOT:               /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
+       ROOTFS_DIR:                   /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs
+       BOOTIMG_DIR:                  /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
+       KERNEL_DIR:                   /home/stephano/build/master/build/tmp-glibc/deploy/images/qemux86
+       NATIVE_SYSROOT:               /home/stephano/build/master/build/tmp-glibc/work/i586-oe-linux/wic-tools/1.0-r0/recipe-sysroot-native
 
      INFO: The image(s) were created using OE kickstart file:
-       /home/scottrif/my_yocto/test.wks
+       /home/stephano/my_yocto/test.wks
                     </literallayout>
                     For this example,
                     <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
@@ -5608,222 +8086,91 @@
         </section>
     </section>
 
-    <section id='building-an-initramfs-image'>
-        <title>Building an Initial RAM Filesystem (initramfs) Image</title>
-
-        <para>
-            An initial RAM filesystem (initramfs) image provides a temporary
-            root filesystem used for early system initialization (e.g.
-            loading of modules needed to locate and mount the "real" root
-            filesystem).
-            <note>
-                The initramfs image is the successor of initial RAM disk
-                (initrd).
-                It is a "copy in and out" (cpio) archive of the initial
-                filesystem that gets loaded into memory during the Linux
-                startup process.
-                Because Linux uses the contents of the archive during
-                initialization, the initramfs image needs to contain all of the
-                device drivers and tools needed to mount the final root
-                filesystem.
-            </note>
-        </para>
-
-        <para>
-            Follow these steps to create an initramfs image:
-            <orderedlist>
-                <listitem><para>
-                    <emphasis>Create the initramfs Image Recipe:</emphasis>
-                    You can reference the
-                    <filename>core-image-minimal-initramfs.bb</filename>
-                    recipe found in the <filename>meta/recipes-core</filename>
-                    directory of the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                    as an example from which to work.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Decide if You Need to Bundle the initramfs Image
-                    Into the Kernel Image:</emphasis>
-                    If you want the initramfs image that is built to be
-                    bundled in with the kernel image, set the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
-                    variable to "1" in your <filename>local.conf</filename>
-                    configuration file and set the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></ulink>
-                    variable in the recipe that builds the kernel image.
-                    <note><title>Tip</title>
-                        It is recommended that you do bundle the initramfs
-                        image with the kernel image to avoid circular
-                        dependencies between the kernel recipe and the
-                        initramfs recipe should the initramfs image
-                        include kernel modules.
-                    </note>
-                    Setting the <filename>INITRAMFS_IMAGE_BUNDLE</filename>
-                    flag causes the initramfs image to be unpacked
-                    into the <filename>${B}/usr/</filename> directory.
-                    The unpacked initramfs image is then passed to the kernel's
-                    <filename>Makefile</filename> using the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></ulink>
-                    variable, allowing the initramfs image to be built into
-                    the kernel normally.
-                    <note>
-                        If you choose to not bundle the initramfs image with
-                        the kernel image, you are essentially using an
-                        <ulink url='https://en.wikipedia.org/wiki/Initrd'>Initial RAM Disk (initrd)</ulink>.
-                        Creating an initrd is handled primarily through the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRD_IMAGE'><filename>INITRD_IMAGE</filename></ulink>,
-                        <filename>INITRD_LIVE</filename>, and
-                        <filename>INITRD_IMAGE_LIVE</filename> variables.
-                        For more information, see the
-                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/image-live.bbclass'><filename>image-live.bbclass</filename></ulink>
-                        file.
-                    </note>
-                    </para></listitem>
-<!--
-Some notes from Cal:
-
-    A non-bundled initramfs is essentially an initrd, which I am discovering
-    to be rather confusingly supported in OE at the moment.
-
-    Its primarily handled through INITRD_IMAGE(_LIVE/_VM) and INITRD(_LIVE/_VM)
-    variables. INITRD_IMAGE* is the primary image target, which gets added to
-    INITRD*, which is a list of cpio filesystems. You can add more cpio
-    filesystems to the INITRD variable to add more to the initrd. For
-    instance, meta-intel adds intel-microcode via the following:
-
-        INITRD_LIVE_prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}"
-
-    If 'intel-ucode' is in MACHINE_FEATURES, this resolves to:
-
-        INITRD_LIVE_prepend = "${DEPLOY_DIR_IMAGE}/microcode.cpio "
-
-    Unfortunately you need the full path, and its up to you to sort out
-    dependencies as well. For instance, we have the following:
-
-        MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', ' intel-microcode', '', d)}"
-
-    which resolves to:
-
-        MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "intel-microcode"
-
-    However, the above is only true with the "live" IMAGE_FSTYPE. Wic is
-    another beast entirely, with current wic kickstart files not supporting
-    initrds, and only partial support in the source plugins. That being said,
-    I know the generic bootfs work Ed is working on will help immensely in this
-    aspect. He or Saul can provide more details here.
-
-    Anyhow, its rather fractured and confusing and could probably use a
-    rework honestly. I don't know how feasible it is to document all the
-    details and corner cases of this area.
--->
-                <listitem><para>
-                    <emphasis>Optionally Add Items to the initramfs Image
-                    Through the initramfs Image Recipe:</emphasis>
-                    If you add items to the initramfs image by way of its
-                    recipe, you should use
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></ulink>
-                    rather than
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>.
-                    <filename>PACKAGE_INSTALL</filename> gives more direct
-                    control of what is added to the image as compared to
-                    the defaults you might not necessarily want that are
-                    set by the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image'><filename>image</filename></ulink>
-                    or
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-core-image'><filename>core-image</filename></ulink>
-                    classes.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Build the Kernel Image and the initramfs
-                    Image:</emphasis>
-                    Build your kernel image using BitBake.
-                    Because the initramfs image recipe is a dependency of the
-                    kernel image, the initramfs image is built as well and
-                    bundled with the kernel image if you used the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
-                    variable described earlier.
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-
     <section id='flashing-images-using-bmaptool'>
         <title>Flashing Images Using <filename>bmaptool</filename></title>
 
         <para>
-            An easy way to flash an image to a bootable device is to use
-            <filename>bmaptool</filename>, which is integrated into the
-            OpenEmbedded build system.
+            A fast and easy way to flash an image to a bootable device
+            is to use Bmaptool, which is integrated into the OpenEmbedded
+            build system.
+            Bmaptool is a generic tool that creates a file's block map (bmap)
+            and then uses that map to copy the file.
+            As compared to traditional tools such as dd or cp, Bmaptool
+            can copy (or flash) large files like raw system image files
+            much faster.
+            <note><title>Notes</title>
+                <itemizedlist>
+                    <listitem><para>
+                        If you are using Ubuntu or Debian distributions, you
+                        can install the <filename>bmap-tools</filename> package
+                        using the following command and then use the tool
+                        without specifying <filename>PATH</filename> even from
+                        the root account:
+                        <literallayout class='monospaced'>
+     $ sudo apt-get install bmap-tools
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        If you are unable to install the
+                        <filename>bmap-tools</filename> package, you will
+                        need to build Bmaptool before using it.
+                        Use the following command:
+                        <literallayout class='monospaced'>
+     $ bitbake bmap-tools-native
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </note>
         </para>
 
         <para>
             Following, is an example that shows how to flash a Wic image.
-            <note>
-                You can use <filename>bmaptool</filename> to flash any
-                type of image.
-            </note>
-            Use these steps to flash an image using
-            <filename>bmaptool</filename>:
-            <note>
-                Unless you are able to install the
-                <filename>bmap-tools</filename> package as mentioned in the note
-                in the second bullet of step 3 further down, you will need to build
-                <filename>bmaptool</filename> before using it.
-                Build the tool using the following command:
-                <literallayout class='monospaced'>
-     $ bitbake bmap-tools-native
-                </literallayout>
-            </note>
+            Realize that while this example uses a Wic image, you can use
+            Bmaptool to flash any type of image.
+            Use these steps to flash an image using Bmaptool:
             <orderedlist>
                 <listitem><para>
-                    <emphasis>Update the <filename>local.conf</filename> File:</emphasis>
-                    Add the following to your <filename>local.conf</filename>
-                    file:
+                    <emphasis>Update your <filename>local.conf</filename> File:</emphasis>
+                    You need to have the following set in your
+                    <filename>local.conf</filename> file before building
+                    your image:
                     <literallayout class='monospaced'>
      IMAGE_FSTYPES += "wic wic.bmap"
                     </literallayout>
                     </para></listitem>
                 <listitem><para>
                     <emphasis>Get Your Image:</emphasis>
-                    Either have your image ready (pre-built) or take the step
-                    build the image:
+                    Either have your image ready (pre-built with the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
+                    setting previously mentioned) or take the step to build
+                    the image:
                     <literallayout class='monospaced'>
      $ bitbake <replaceable>image</replaceable>
                     </literallayout>
                     </para></listitem>
                 <listitem><para>
                     <emphasis>Flash the Device:</emphasis>
-                    Flash the device with the image by using
-                    <filename>bmaptool</filename> depending on your particular
-                    setup:
+                    Flash the device with the image by using Bmaptool
+                    depending on your particular setup.
+                    The following commands assume the image resides in the
+                    Build Directory's <filename>deploy/images/</filename>
+                    area:
                     <itemizedlist>
                         <listitem><para>
-                            If you have write access to the media,
-                            use this command form:
+                            If you have write access to the media, use this
+                            command form:
                             <literallayout class='monospaced'>
-     $ oe-run-native bmap-tools-native bmaptool copy ./tmp/deploy/images/qemux86-64-core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
+     $ oe-run-native bmap-tools-native bmaptool copy <replaceable>build-directory</replaceable>/tmp/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.wic /dev/sd<replaceable>X</replaceable>
                             </literallayout>
                             </para></listitem>
                         <listitem><para>
-                            If you do not have write access to
-                            the media, use the following
-                            commands:
+                            If you do not have write access to the media, set
+                            your permissions first and then use the same
+                            command form:
                             <literallayout class='monospaced'>
      $ sudo chmod 666 /dev/sd<replaceable>X</replaceable>
-     $ oe-run-native bmap-tools-native bmaptool copy ./tmp/deploy/images/qemux86-64-core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
+     $ oe-run-native bmap-tools-native bmaptool copy <replaceable>build-directory</replaceable>/tmp/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.wic /dev/sd<replaceable>X</replaceable>
                             </literallayout>
-                            <note>
-                                If you are using Ubuntu or Debian distributions,
-                                you can install the
-                                <filename>bmap-tools</filename> package using
-                                the following command and then use the tool
-                                without specifying
-                                <filename>PATH</filename> even from the
-                                root account:
-                                <literallayout class='monospaced'>
-     $ sudo apt-get install bmap-tools
-                                </literallayout>
-                            </note>
                             </para></listitem>
                     </itemizedlist>
                     </para></listitem>
@@ -5852,7 +8199,7 @@
                     by Bruce Schneier
                     </para></listitem>
                 <listitem><para><emphasis>
-                    "<ulink url='http://internetcensus2012.bitbucket.org/paper.html'>Internet Census 2012</ulink>"</emphasis>
+                    "<ulink url='http://census2012.sourceforge.net/paper.html'>Internet Census 2012</ulink>"</emphasis>
                     by Carna Botnet</para></listitem>
                 <listitem><para><emphasis>
                     "<ulink url='http://elinux.org/images/6/6f/Security-issues.pdf'>Security Issues for Embedded Devices</ulink>"</emphasis>
@@ -6060,7 +8407,7 @@
                 more secure.
                 You can find these tools in the
                 <filename>meta-security</filename> layer of the
-                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Yocto Project Source Repositories</ulink>.
+                <ulink url='&YOCTO_GIT_URL;'>Yocto Project Source Repositories</ulink>.
             </para>
         </section>
     </section>
@@ -6308,616 +8655,22 @@
         </para>
     </section>
 
-    <section id='building-a-tiny-system'>
-        <title>Building a Tiny System</title>
+    <section id='dev-saving-memory-during-a-build'>
+        <title>Conserving Disk Space During Builds</title>
 
         <para>
-            Very small distributions have some significant advantages such
-            as requiring less on-die or in-package memory (cheaper), better
-            performance through efficient cache usage, lower power requirements
-            due to less memory, faster boot times, and reduced development
-            overhead.
-            Some real-world examples where a very small distribution gives
-            you distinct advantages are digital cameras, medical devices,
-            and small headless systems.
-        </para>
-
-        <para>
-            This section presents information that shows you how you can
-            trim your distribution to even smaller sizes than the
-            <filename>poky-tiny</filename> distribution, which is around
-            5 Mbytes, that can be built out-of-the-box using the Yocto Project.
-        </para>
-
-        <section id='tiny-system-overview'>
-            <title>Overview</title>
-
-            <para>
-                The following list presents the overall steps you need to
-                consider and perform to create distributions with smaller
-                root filesystems, achieve faster boot times, maintain your critical
-                functionality, and avoid initial RAM disks:
-                <itemizedlist>
-                    <listitem><para>
-                        <link linkend='goals-and-guiding-principles'>Determine your goals and guiding principles.</link>
-                        </para></listitem>
-                    <listitem><para>
-                        <link linkend='understand-what-gives-your-image-size'>Understand what contributes to your image size.</link>
-                        </para></listitem>
-                    <listitem><para>
-                        <link linkend='trim-the-root-filesystem'>Reduce the size of the root filesystem.</link>
-                        </para></listitem>
-                    <listitem><para>
-                        <link linkend='trim-the-kernel'>Reduce the size of the kernel.</link>
-                        </para></listitem>
-                    <listitem><para>
-                        <link linkend='remove-package-management-requirements'>Eliminate packaging requirements.</link>
-                        </para></listitem>
-                    <listitem><para>
-                        <link linkend='look-for-other-ways-to-minimize-size'>Look for other ways to minimize size.</link>
-                        </para></listitem>
-                    <listitem><para>
-                        <link linkend='iterate-on-the-process'>Iterate on the process.</link>
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='goals-and-guiding-principles'>
-            <title>Goals and Guiding Principles</title>
-
-            <para>
-                Before you can reach your destination, you need to know
-                where you are going.
-                Here is an example list that you can use as a guide when
-                creating very small distributions:
-                <itemizedlist>
-                    <listitem><para>Determine how much space you need
-                        (e.g. a kernel that is 1 Mbyte or less and
-                        a root filesystem that is 3 Mbytes or less).
-                        </para></listitem>
-                    <listitem><para>Find the areas that are currently
-                        taking 90% of the space and concentrate on reducing
-                        those areas.
-                        </para></listitem>
-                    <listitem><para>Do not create any difficult "hacks"
-                        to achieve your goals.</para></listitem>
-                    <listitem><para>Leverage the device-specific
-                        options.</para></listitem>
-                    <listitem><para>Work in a separate layer so that you
-                        keep changes isolated.
-                        For information on how to create layers, see
-                        the "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>" section.
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='understand-what-gives-your-image-size'>
-            <title>Understand What Contributes to Your Image Size</title>
-
-            <para>
-                It is easiest to have something to start with when creating
-                your own distribution.
-                You can use the Yocto Project out-of-the-box to create the
-                <filename>poky-tiny</filename> distribution.
-                Ultimately, you will want to make changes in your own
-                distribution that are likely modeled after
-                <filename>poky-tiny</filename>.
-                <note>
-                    To use <filename>poky-tiny</filename> in your build,
-                    set the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
-                    variable in your
-                    <filename>local.conf</filename> file to "poky-tiny"
-                    as described in the
-                    "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
-                    section.
-                </note>
-            </para>
-
-            <para>
-                Understanding some memory concepts will help you reduce the
-                system size.
-                Memory consists of static, dynamic, and temporary memory.
-                Static memory is the TEXT (code), DATA (initialized data
-                in the code), and BSS (uninitialized data) sections.
-                Dynamic memory represents memory that is allocated at runtime:
-                stacks, hash tables, and so forth.
-                Temporary memory is recovered after the boot process.
-                This memory consists of memory used for decompressing
-                the kernel and for the <filename>__init__</filename>
-                functions.
-            </para>
-
-            <para>
-                To help you see where you currently are with kernel and root
-                filesystem sizes, you can use two tools found in the
-                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> in
-                the <filename>scripts/tiny/</filename> directory:
-                <itemizedlist>
-                    <listitem><para><filename>ksize.py</filename>: Reports
-                        component sizes for the kernel build objects.
-                        </para></listitem>
-                    <listitem><para><filename>dirsize.py</filename>: Reports
-                        component sizes for the root filesystem.</para></listitem>
-                </itemizedlist>
-                This next tool and command help you organize configuration
-                fragments and view file dependencies in a human-readable form:
-                <itemizedlist>
-                    <listitem><para><filename>merge_config.sh</filename>:
-                        Helps you manage configuration files and fragments
-                        within the kernel.
-                        With this tool, you can merge individual configuration
-                        fragments together.
-                        The tool allows you to make overrides and warns you
-                        of any missing configuration options.
-                        The tool is ideal for allowing you to iterate on
-                        configurations, create minimal configurations, and
-                        create configuration files for different machines
-                        without having to duplicate your process.</para>
-                        <para>The <filename>merge_config.sh</filename> script is
-                        part of the Linux Yocto kernel Git repositories
-                        (i.e. <filename>linux-yocto-3.14</filename>,
-                        <filename>linux-yocto-3.10</filename>,
-                        <filename>linux-yocto-3.8</filename>, and so forth)
-                        in the
-                        <filename>scripts/kconfig</filename> directory.</para>
-                        <para>For more information on configuration fragments,
-                        see the
-                        "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
-                        section in the Yocto Project Linux Kernel Development
-                        Manual.
-                        </para></listitem>
-                    <listitem><para><filename>bitbake -u taskexp -g <replaceable>bitbake_target</replaceable></filename>:
-                        Using the BitBake command with these options brings up
-                        a Dependency Explorer from which you can view file
-                        dependencies.
-                        Understanding these dependencies allows you to make
-                        informed decisions when cutting out various pieces of the
-                        kernel and root filesystem.</para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='trim-the-root-filesystem'>
-            <title>Trim the Root Filesystem</title>
-
-            <para>
-                The root filesystem is made up of packages for booting,
-                libraries, and applications.
-                To change things, you can configure how the packaging happens,
-                which changes the way you build them.
-                You can also modify the filesystem itself or select a different
-                filesystem.
-            </para>
-
-            <para>
-                First, find out what is hogging your root filesystem by running the
-                <filename>dirsize.py</filename> script from your root directory:
-                <literallayout class='monospaced'>
-     $ cd <replaceable>root-directory-of-image</replaceable>
-     $ dirsize.py 100000 > dirsize-100k.log
-     $ cat dirsize-100k.log
-                </literallayout>
-                You can apply a filter to the script to ignore files under
-                a certain size.
-                The previous example filters out any files below 100 Kbytes.
-                The sizes reported by the tool are uncompressed, and thus
-                will be smaller by a relatively constant factor in a
-                compressed root filesystem.
-                When you examine your log file, you can focus on areas of the
-                root filesystem that take up large amounts of memory.
-            </para>
-
-            <para>
-                You need to be sure that what you eliminate does not cripple
-                the functionality you need.
-                One way to see how packages relate to each other is by using
-                the Dependency Explorer UI with the BitBake command:
-                <literallayout class='monospaced'>
-     $ cd <replaceable>image-directory</replaceable>
-     $ bitbake -u taskexp -g <replaceable>image</replaceable>
-                </literallayout>
-                Use the interface to select potential packages you wish to
-                eliminate and see their dependency relationships.
-            </para>
-
-            <para>
-                When deciding how to reduce the size, get rid of packages that
-                result in minimal impact on the feature set.
-                For example, you might not need a VGA display.
-                Or, you might be able to get by with <filename>devtmpfs</filename>
-                and <filename>mdev</filename> instead of
-                <filename>udev</filename>.
-            </para>
-
-            <para>
-                Use your <filename>local.conf</filename> file to make changes.
-                For example, to eliminate <filename>udev</filename> and
-                <filename>glib</filename>, set the following in the
-                local configuration file:
-                <literallayout class='monospaced'>
-     VIRTUAL-RUNTIME_dev_manager = ""
-                </literallayout>
-            </para>
-
-            <para>
-                Finally, you should consider exactly the type of root
-                filesystem you need to meet your needs while also reducing
-                its size.
-                For example, consider <filename>cramfs</filename>,
-                <filename>squashfs</filename>, <filename>ubifs</filename>,
-                <filename>ext2</filename>, or an <filename>initramfs</filename>
-                using <filename>initramfs</filename>.
-                Be aware that <filename>ext3</filename> requires a 1 Mbyte
-                journal.
-                If you are okay with running read-only, you do not need this
-                journal.
-            </para>
-
-            <note>
-                After each round of elimination, you need to rebuild your
-                system and then use the tools to see the effects of your
-                reductions.
-            </note>
-
-
-        </section>
-
-        <section id='trim-the-kernel'>
-            <title>Trim the Kernel</title>
-
-            <para>
-                The kernel is built by including policies for hardware-independent
-                aspects.
-                What subsystems do you enable?
-                For what architecture are you building?
-                Which drivers do you build by default?
-                <note>You can modify the kernel source if you want to help
-                    with boot time.
-                </note>
-            </para>
-
-            <para>
-                Run the <filename>ksize.py</filename> script from the top-level
-                Linux build directory to get an idea of what is making up
-                the kernel:
-                <literallayout class='monospaced'>
-     $ cd <replaceable>top-level-linux-build-directory</replaceable>
-     $ ksize.py > ksize.log
-     $ cat ksize.log
-                </literallayout>
-                When you examine the log, you will see how much space is
-                taken up with the built-in <filename>.o</filename> files for
-                drivers, networking, core kernel files, filesystem, sound,
-                and so forth.
-                The sizes reported by the tool are uncompressed, and thus
-                will be smaller by a relatively constant factor in a compressed
-                kernel image.
-                Look to reduce the areas that are large and taking up around
-                the "90% rule."
-            </para>
-
-            <para>
-                To examine, or drill down, into any particular area, use the
-                <filename>-d</filename> option with the script:
-                <literallayout class='monospaced'>
-     $ ksize.py -d > ksize.log
-                </literallayout>
-                Using this option breaks out the individual file information
-                for each area of the kernel (e.g. drivers, networking, and
-                so forth).
-            </para>
-
-            <para>
-                Use your log file to see what you can eliminate from the kernel
-                based on features you can let go.
-                For example, if you are not going to need sound, you do not
-                need any drivers that support sound.
-            </para>
-
-            <para>
-                After figuring out what to eliminate, you need to reconfigure
-                the kernel to reflect those changes during the next build.
-                You could run <filename>menuconfig</filename> and make all your
-                changes at once.
-                However, that makes it difficult to see the effects of your
-                individual eliminations and also makes it difficult to replicate
-                the changes for perhaps another target device.
-                A better method is to start with no configurations using
-                <filename>allnoconfig</filename>, create configuration
-                fragments for individual changes, and then manage the
-                fragments into a single configuration file using
-                <filename>merge_config.sh</filename>.
-                The tool makes it easy for you to iterate using the
-                configuration change and build cycle.
-            </para>
-
-            <para>
-                Each time you make configuration changes, you need to rebuild
-                the kernel and check to see what impact your changes had on
-                the overall size.
-            </para>
-        </section>
-
-        <section id='remove-package-management-requirements'>
-            <title>Remove Package Management Requirements</title>
-
-            <para>
-                Packaging requirements add size to the image.
-                One way to reduce the size of the image is to remove all the
-                packaging requirements from the image.
-                This reduction includes both removing the package manager
-                and its unique dependencies as well as removing the package
-                management data itself.
-            </para>
-
-            <para>
-                To eliminate all the packaging requirements for an image,
-                be sure that "package-management" is not part of your
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
-                statement for the image.
-                When you remove this feature, you are removing the package
-                manager as well as its dependencies from the root filesystem.
-            </para>
-        </section>
-
-        <section id='look-for-other-ways-to-minimize-size'>
-            <title>Look for Other Ways to Minimize Size</title>
-
-            <para>
-                Depending on your particular circumstances, other areas that you
-                can trim likely exist.
-                The key to finding these areas is through tools and methods
-                described here combined with experimentation and iteration.
-                Here are a couple of areas to experiment with:
-                <itemizedlist>
-                    <listitem><para><filename>glibc</filename>:
-                        In general, follow this process:
-                        <orderedlist>
-                            <listitem><para>Remove <filename>glibc</filename>
-                                features from
-                                <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
-                                that you think you do not need.</para></listitem>
-                            <listitem><para>Build your distribution.
-                                </para></listitem>
-                            <listitem><para>If the build fails due to missing
-                                symbols in a package, determine if you can
-                                reconfigure the package to not need those
-                                features.
-                                For example, change the configuration to not
-                                support wide character support as is done for
-                                <filename>ncurses</filename>.
-                                Or, if support for those characters is needed,
-                                determine what <filename>glibc</filename>
-                                features provide the support and restore the
-                                configuration.
-                                </para></listitem>
-                            <listitem><para>Rebuild and repeat the process.
-                                </para></listitem>
-                        </orderedlist></para></listitem>
-                    <listitem><para><filename>busybox</filename>:
-                        For BusyBox, use a process similar as described for
-                        <filename>glibc</filename>.
-                        A difference is you will need to boot the resulting
-                        system to see if you are able to do everything you
-                        expect from the running system.
-                        You need to be sure to integrate configuration fragments
-                        into Busybox because BusyBox handles its own core
-                        features and then allows you to add configuration
-                        fragments on top.
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='iterate-on-the-process'>
-            <title>Iterate on the Process</title>
-
-            <para>
-                If you have not reached your goals on system size, you need
-                to iterate on the process.
-                The process is the same.
-                Use the tools and see just what is taking up 90% of the root
-                filesystem and the kernel.
-                Decide what you can eliminate without limiting your device
-                beyond what you need.
-            </para>
-
-            <para>
-                Depending on your system, a good place to look might be
-                Busybox, which provides a stripped down
-                version of Unix tools in a single, executable file.
-                You might be able to drop virtual terminal services or perhaps
-                ipv6.
-            </para>
-        </section>
-    </section>
-
-    <section id='building-images-for-more-than-one-machine'>
-        <title>Building Images for More than One Machine</title>
-
-        <para>
-            A common scenario developers face is creating images for several
-            different machines that use the same software environment.
-            In this situation, it is tempting to set the
-            tunings and optimization flags for each build specifically for
-            the targeted hardware (i.e. "maxing out" the tunings).
-            Doing so can considerably add to build times and package feed
-            maintenance collectively for the machines.
-            For example, selecting tunes that are extremely specific to a
-            CPU core used in a system might enable some micro optimizations
-            in GCC for that particular system but would otherwise not gain
-            you much of a performance difference across the other systems
-            as compared to using a more general tuning across all the builds
-            (e.g. setting
-            <ulink url='&YOCTO_DOCS_REF_URL;#var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></ulink>
-            specifically for each machine's build).
-            Rather than "max out" each build's tunings, you can take steps that
-            cause the OpenEmbedded build system to reuse software across the
-            various machines where it makes sense.
-        </para>
-        <para>
-            If build speed and package feed maintenance are considerations,
-            you should consider the points in this section that can help you
-            optimize your tunings to best consider build times and package
-            feed maintenance.
-            <itemizedlist>
-                <listitem><para><emphasis>Share the Build Directory:</emphasis>
-                    If at all possible, share the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
-                    across builds.
-                    The Yocto Project supports switching between different
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
-                    values in the same <filename>TMPDIR</filename>.
-                    This practice is well supported and regularly used by
-                    developers when building for multiple machines.
-                    When you use the same <filename>TMPDIR</filename> for
-                    multiple machine builds, the OpenEmbedded build system can
-                    reuse the existing native and often cross-recipes for
-                    multiple machines.
-                    Thus, build time decreases.
-                    <note>
-                        If
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
-                        settings change or fundamental configuration settings
-                        such as the filesystem layout, you need to work with
-                        a clean <filename>TMPDIR</filename>.
-                        Sharing <filename>TMPDIR</filename> under these
-                        circumstances might work but since it is not
-                        guaranteed, you should use a clean
-                        <filename>TMPDIR</filename>.
-                    </note>
-                    </para></listitem>
-                <listitem><para><emphasis>Enable the Appropriate Package Architecture:</emphasis>
-                    By default, the OpenEmbedded build system enables three
-                    levels of package architectures: "all", "tune" or "package",
-                    and "machine".
-                    Any given recipe usually selects one of these package
-                    architectures (types) for its output.
-                    Depending for what a given recipe creates packages, making
-                    sure you enable the appropriate package architecture can
-                    directly impact the build time.</para>
-                    <para>A recipe that just generates scripts can enable
-                    "all" architecture because there are no binaries to build.
-                    To specifically enable "all" architecture, be sure your
-                    recipe inherits the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-allarch'><filename>allarch</filename></ulink>
-                    class.
-                    This class is useful for "all" architectures because it
-                    configures many variables so packages can be used across
-                    multiple architectures.</para>
-                    <para>If your recipe needs to generate packages that are
-                    machine-specific or when one of the build or runtime
-                    dependencies is already machine-architecture dependent,
-                    which makes your recipe also machine-architecture dependent,
-                    make sure your recipe enables the "machine" package
-                    architecture through the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></ulink>
-                    variable:
-                    <literallayout class='monospaced'>
-     PACKAGE_ARCH = "${MACHINE_ARCH}"
-                    </literallayout>
-                    When you do not specifically enable a package
-                    architecture through the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>,
-                    The OpenEmbedded build system defaults to the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></ulink>
-                    setting:
-                    <literallayout class='monospaced'>
-     PACKAGE_ARCH = "${TUNE_PKGARCH}"
-                    </literallayout>
-                    </para></listitem>
-                <listitem><para><emphasis>Choose a Generic Tuning File if Possible:</emphasis>
-                    Some tunes are more generic and can run on multiple targets
-                    (e.g. an <filename>armv5</filename> set of packages could
-                    run on <filename>armv6</filename> and
-                    <filename>armv7</filename> processors in most cases).
-                    Similarly, <filename>i486</filename> binaries could work
-                    on <filename>i586</filename> and higher processors.
-                    You should realize, however, that advances on newer
-                    processor versions would not be used.</para>
-                    <para>If you select the same tune for several different
-                    machines, the OpenEmbedded build system reuses software
-                    previously built, thus speeding up the overall build time.
-                    Realize that even though a new sysroot for each machine is
-                    generated, the software is not recompiled and only one
-                    package feed exists.
-                    </para></listitem>
-                <listitem><para><emphasis>Manage Granular Level Packaging:</emphasis>
-                    Sometimes cases exist where injecting another level
-                    of package architecture beyond the three higher levels
-                    noted earlier can be useful.
-                    For example, consider the <filename>emgd</filename>
-                    graphics stack in the
-                    <filename>meta-intel</filename> layer.
-                    In this layer, a subset of software exists that is
-                    compiled against something different from the rest of the
-                    generic packages.
-                    You can examine the key code in the
-                    <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>
-                    "daisy" branch in
-                    <filename>classes/emgd-gl.bbclass</filename>.
-                    For a specific set of packages, the code redefines
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>.
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXTRA_ARCHS'><filename>PACKAGE_EXTRA_ARCHS</filename></ulink>
-                    is then appended with this extra tune name in
-                    <filename>meta-intel-emgd.inc</filename>.
-                    The result is that when searching for packages, the
-                    build system uses a four-level search and the packages
-                    in this new level are preferred as compared to the standard
-                    tune.
-                    The overall result is that the build system reuses most
-                    software from the common tune except for specific cases
-                    as needed.
-                    </para></listitem>
-                <listitem><para><emphasis>Use Tools to Debug Issues:</emphasis>
-                    Sometimes you can run into situations where software is
-                    being rebuilt when you think it should not be.
-                    For example, the OpenEmbedded build system might not be
-                    using shared state between machines when you think it
-                    should be.
-                    These types of situations are usually due to references
-                    to machine-specific variables such as
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLE'><filename>SERIAL_CONSOLE</filename></ulink>,
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-XSERVER'><filename>XSERVER</filename></ulink>,
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></ulink>,
-                    and so forth in code that is supposed to only be
-                    tune-specific or when the recipe depends
-                    (<ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-RSUGGESTS'><filename>RSUGGESTS</filename></ulink>,
-                    and so forth) on some other recipe that already has
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>
-                    defined as "${MACHINE_ARCH}".
-                    <note>
-                        Patches to fix any issues identified are most welcome
-                        as these issues occasionally do occur.
-                    </note></para>
-                    <para>For such cases, you can use some tools to help you
-                    sort out the situation:
-                    <itemizedlist>
-                        <listitem><para><emphasis><filename>sstate-diff-machines.sh</filename>:</emphasis>
-                            You can find this tool in the
-                            <filename>scripts</filename> directory of the
-                            Source Repositories.
-                            See the comments in the script for information on
-                            how to use the tool.
-                            </para></listitem>
-                        <listitem><para><emphasis>BitBake's "-S printdiff" Option:</emphasis>
-                            Using this option causes BitBake to try to
-                            establish the closest signature match it can
-                            (e.g. in the shared state cache) and then run
-                            <filename>bitbake-diffsigs</filename> over the
-                            matches to determine the stamps and delta where
-                            these two stamp trees diverge.
-                            </para></listitem>
-                    </itemizedlist>
-                    </para></listitem>
-            </itemizedlist>
+            To help conserve disk space during builds, you can add the
+            following statement to your project's
+            <filename>local.conf</filename> configuration file found in the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
+            <literallayout class='monospaced'>
+     INHERIT += "rm_work"
+            </literallayout>
+            Adding this statement deletes the work directory used for building
+            a recipe once the recipe is built.
+            For more information on "rm_work", see the
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-rm-work'><filename>rm_work</filename></ulink>
+            class in the Yocto Project Reference Manual.
         </para>
     </section>
 
@@ -7121,7 +8874,7 @@
 
                 <para>
                     Because the OpenEmbedded build system uses
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#checksums'>signatures</ulink>",
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#overview-checksums'>signatures</ulink>",
                     which are unique to a given build, the build system
                     knows when to rebuild packages.
                     All the inputs into a given task are represented by a
@@ -7206,8 +8959,8 @@
      BUILDHISTORY_COMMIT = "1"
                     </literallayout>
                     For information on build history, see the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
-                    section in the Yocto Project Reference Manual.
+                    "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
+                    section.
                 </para>
 
                 <note>
@@ -7225,8 +8978,9 @@
 
                     <para>
                         For more information on shared state, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#shared-state-cache'>Shared State Cache</ulink>"
-                        section in the Yocto Project Reference Manual.
+                        "<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>Shared State Cache</ulink>"
+                        section in the Yocto Project Overview and Concepts
+                        Manual.
                     </para>
                 </note>
             </section>
@@ -7470,7 +9224,7 @@
                     <filename>connman.inc</filename> file in the
                     <filename>meta/recipes-connectivity/connman/</filename>
                     directory of the <filename>poky</filename>
-                    <ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>source repository</ulink>.
+                    <ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>source repository</ulink>.
                     You can also find examples in
                     <filename>meta/classes/kernel.bbclass</filename>.
                  </para>
@@ -7599,11 +9353,13 @@
                 During a build, BitBake always transforms a recipe into one or
                 more packages.
                 For example, BitBake takes the <filename>bash</filename> recipe
-                and currently produces the <filename>bash-dbg</filename>,
-                <filename>bash-staticdev</filename>,
-                <filename>bash-dev</filename>, <filename>bash-doc</filename>,
-                <filename>bash-locale</filename>, and
-                <filename>bash</filename> packages.
+                and produces a number of packages (e.g.
+                <filename>bash</filename>, <filename>bash-bashbug</filename>,
+                <filename>bash-completion</filename>,
+                <filename>bash-completion-dbg</filename>,
+                <filename>bash-completion-dev</filename>,
+                <filename>bash-completion-extra</filename>,
+                <filename>bash-dbg</filename>, and so forth).
                 Not all generated packages are included in an image.
             </para>
 
@@ -7647,7 +9403,7 @@
 
             <para>
                 In order to use runtime package management, you
-                need a host/server machine that serves up the pre-compiled
+                need a host or server machine that serves up the pre-compiled
                 packages plus the required metadata.
                 You also need package manipulation tools on the target.
                 The build machine is a likely candidate to act as the server.
@@ -7655,6 +9411,10 @@
                 package server.
                 The build machine could push its artifacts to another machine
                 that acts as the server (e.g. Internet-facing).
+                In fact, doing so is advantageous for a production
+                environment as getting the packages away from the
+                development system's build directory prevents accidental
+                overwrites.
             </para>
 
             <para>
@@ -7664,11 +9424,11 @@
                 out into a couple of different package groupings based on
                 criteria such as the target's CPU architecture, the target
                 board, or the C library used on the target.
-                For example, a build targeting the <filename>qemuarm</filename>
+                For example, a build targeting the <filename>qemux86</filename>
                 device produces the following three package databases:
-                <filename>all</filename>, <filename>armv5te</filename>, and
-                <filename>qemuarm</filename>.
-                If you wanted your <filename>qemuarm</filename> device to be
+                <filename>noarch</filename>, <filename>i586</filename>, and
+                <filename>qemux86</filename>.
+                If you wanted your <filename>qemux86</filename> device to be
                 aware of all the packages that were available to it,
                 you would need to point it to each of these databases
                 individually.
@@ -7714,10 +9474,10 @@
      PACKAGE_CLASSES ?= “package_<replaceable>packageformat</replaceable>”
                             </literallayout>
                             where <replaceable>packageformat</replaceable>
-                            can be "ipk", "rpm", and "deb", which are the
+                            can be "ipk", "rpm", "deb", or "tar" which are the
                             supported package formats.
                             <note>
-                                Because the Yocto Project supports three
+                                Because the Yocto Project supports four
                                 different package formats, you can set the
                                 variable with more than one argument.
                                 However, the OpenEmbedded build system only
@@ -7736,12 +9496,12 @@
                     "package-management" in the
                     <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
                     variable.
-                    Including "package-management" in this
-                    configuration variable ensures that when the image
-                    is assembled for your target, the image includes
-                    the currently-known package databases as well as
-                    the target-specific tools required for runtime
-                    package management to be performed on the target.
+                    Including "package-management" in this configuration
+                    variable ensures that when the image is assembled for your
+                    target, the image includes the currently-known package
+                    databases as well as the target-specific tools required
+                    for runtime package management to be performed on the
+                    target.
                     However, this is not strictly necessary.
                     You could start your image off without any databases
                     but only include the required on-target package
@@ -7755,21 +9515,26 @@
 
                 <para>
                     Whenever you perform any sort of build step that can
-                    potentially generate a package or modify an existing
+                    potentially generate a package or modify   existing
                     package, it is always a good idea to re-generate the
-                    package index with:
+                    package index after the build by using the following
+                    command:
                     <literallayout class='monospaced'>
     $ bitbake package-index
                     </literallayout>
-                    Realize that it is not sufficient to simply do the
-                    following:
+                    It might be tempting to build the package and the
+                    package index at the same time with a command such as
+                    the following:
                     <literallayout class='monospaced'>
     $ bitbake <replaceable>some-package</replaceable> package-index
                     </literallayout>
-                    The reason for this restriction is because BitBake does not
-                    properly schedule the <filename>package-index</filename>
-                    target fully after any other target has completed.
-                    Thus, be sure to run the package update step separately.
+                    Do not do this as BitBake does not schedule the package
+                    index for after the completion of the package you are
+                    building.
+                    Consequently, you cannot be sure of the package index
+                    including information for the package you just built.
+                    Thus, be sure to run the package update step separately
+                    after building any packages.
                 </para>
 
                 <para>
@@ -7794,8 +9559,8 @@
                     For example, if
                     <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink><filename>}</filename>
                     is <filename>tmp</filename> and your selected package type
-                    is IPK, then your IPK packages are available in
-                    <filename>tmp/deploy/ipk</filename>.
+                    is RPM, then your RPM packages are available in
+                    <filename>tmp/deploy/rpm</filename>.
                 </para>
             </section>
 
@@ -7850,17 +9615,39 @@
                     <title>Using RPM</title>
 
                     <para>
-                        The <filename>dnf</filename> application performs
-                        runtime package management of RPM packages.
-                        You must perform an initial setup for
-                        <filename>dnf</filename> on the target machine
-                        if the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>,
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>,
-                        and
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink>
-                        variables have not been set or the target image was
-                        built before the variables were set.
+                        The
+                        <ulink url='https://en.wikipedia.org/wiki/DNF_(software)'>Dandified Packaging Tool</ulink>
+                        (DNF) performs runtime package management of RPM
+                        packages.
+                        In order to use DNF for runtime package management,
+                        you must perform an initial setup on the target
+                        machine for cases where the
+                        <filename>PACKAGE_FEED_*</filename> variables were not
+                        set as part of the image that is running on the
+                        target.
+                        This means if you built your image and did not not use
+                        these variables as part of the build and your image is
+                        now running on the target, you need to perform the
+                        steps in this section if you want to use runtime
+                        package management.
+                        <note>
+                            For information on the
+                            <filename>PACKAGE_FEED_*</filename> variables, see
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>,
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>,
+                            and
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink>
+                            in the Yocto Project Reference Manual variables
+                            glossary.
+                        </note>
+                    </para>
+
+                    <para>
+                        On the target, you must inform DNF that package
+                        databases are available.
+                        You do this by creating a file named
+                        <filename>/etc/yum.repos.d/oe-packages.repo</filename>
+                        and defining the <filename>oe-packages</filename>.
                     </para>
 
                     <para>
@@ -7869,21 +9656,65 @@
                         <filename>all</filename>, <filename>i586</filename>,
                         and <filename>qemux86</filename> from a server named
                         <filename>my.server</filename>.
-                        You must inform <filename>dnf</filename> of the
-                        availability of these databases by creating a
-                        <filename>/etc/yum.repos.d/oe-packages.repo</filename>
-                        file with the following content:
-                        <literallayout class='monospaced'>
+                        The specifics for setting up the web server are up to
+                        you.
+                        The critical requirement is that the URIs in the
+                        target repository configuration point to the
+                        correct remote location for the feeds.
+                        <note><title>Tip</title>
+                            For development purposes, you can point the web
+                            server to the build system's
+                            <filename>deploy</filename> directory.
+                            However, for production use, it is better to copy
+                            the package directories to a location outside of
+                            the build area and use that location.
+                            Doing so avoids situations where the build system
+                            overwrites or changes the
+                            <filename>deploy</filename> directory.
+                        </note>
+                    </para>
+
+                    <para>
+                        When telling DNF where to look for the package
+                        databases, you must declare individual locations
+                        per architecture or a single location used for all
+                        architectures.
+                        You cannot do both:
+                        <itemizedlist>
+                            <listitem><para>
+                                <emphasis>Create an Explicit List of Architectures:</emphasis>
+                                Define individual base URLs to identify where
+                                each package database is located:
+                                <literallayout class='monospaced'>
      [oe-packages]
      baseurl=http://my.server/rpm/i586 http://my.server/rpm/qemux86 http://my.server/rpm/all
-                        </literallayout>
-                        From the target machine, fetch the repository:
+                                </literallayout>
+                                This example informs DNF about individual
+                                package databases for all three architectures.
+                                </para></listitem>
+                            <listitem><para>
+                                <emphasis>Create a Single (Full) Package Index:</emphasis>
+                                Define a single base URL that identifies where
+                                a full package database is located:
+                                <literallayout class='monospaced'>
+     [oe-packages]
+     baseurl=http://my.server/rpm
+                                </literallayout>
+                                This example informs DNF about a single package
+                                database that contains all the package index
+                                information for all supported architectures.
+                                </para></listitem>
+                        </itemizedlist>
+                    </para>
+
+                    <para>
+                        Once you have informed DNF where to find the package
+                        databases, you need to fetch them:
                         <literallayout class='monospaced'>
      # dnf makecache
                         </literallayout>
-                        After everything is set up, <filename>dnf</filename>
-                        is able to find, install, and upgrade packages from
-                        the specified repository.
+                        DNF is now able to find, install, and upgrade packages
+                        from the specified repository or repositories.
                         <note>
                             See the
                             <ulink url='http://dnf.readthedocs.io/en/latest/'>DNF documentation</ulink>
@@ -8294,8 +10125,8 @@
         </section>
     </section>
 
-    <section id='working-with-source-files'>
-        <title>Working with Source Files</title>
+    <section id='efficiently-fetching-source-files-during-a-build'>
+        <title>Efficiently Fetching Source Files During a Build</title>
 
         <para>
             The OpenEmbedded build system works with source files located
@@ -8309,16 +10140,16 @@
         </para>
 
         <para>
-            This section presents information for working with source
-            files that can lead to more efficient use of resources and
-            time.
+            This section shows you how you can use mirrors to speed up
+            fetching source files and how you can pre-fetch files all of which
+            leads to more efficient use of resources and time.
         </para>
 
         <section id='setting-up-effective-mirrors'>
             <title>Setting up Effective Mirrors</title>
 
             <para>
-                As mentioned, a good deal that goes into a Yocto Project
+                A good deal that goes into a Yocto Project
                 build is simply downloading all of the source tarballs.
                 Maybe you have been working with another build system
                 (OpenEmbedded or Angstrom) for which you have built up a
@@ -8381,7 +10212,7 @@
                 Use the following BitBake command form to fetch all the
                 necessary sources without starting the build:
                 <literallayout class='monospaced'>
-     $ bitbake -c fetchall <replaceable>target</replaceable>
+     $ bitbake -c <replaceable>target</replaceable> runall="fetch"
                 </literallayout>
                 This variation of the BitBake command guarantees that you
                 have all the sources for that BitBake target should you
@@ -8391,81 +10222,6 @@
         </section>
     </section>
 
-    <section id="building-software-from-an-external-source">
-        <title>Building Software from an External Source</title>
-
-        <para>
-            By default, the OpenEmbedded build system uses the
-            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
-            when building source code.
-            The build process involves fetching the source files, unpacking
-            them, and then patching them if necessary before the build takes
-            place.
-        </para>
-
-        <para>
-            Situations exist where you might want to build software from source
-            files that are external to and thus outside of the
-            OpenEmbedded build system.
-            For example, suppose you have a project that includes a new BSP with
-            a heavily customized kernel.
-            And, you want to minimize exposing the build system to the
-            development team so that they can focus on their project and
-            maintain everyone's workflow as much as possible.
-            In this case, you want a kernel source directory on the development
-            machine where the development occurs.
-            You want the recipe's
-            <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
-            variable to point to the external directory and use it as is, not
-            copy it.
-        </para>
-
-        <para>
-            To build from software that comes from an external source, all you
-            need to do is inherit the
-            <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
-            class and then set the
-            <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>
-            variable to point to your external source code.
-            Here are the statements to put in your
-            <filename>local.conf</filename> file:
-            <literallayout class='monospaced'>
-     INHERIT += "externalsrc"
-     EXTERNALSRC_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
-            </literallayout>
-        </para>
-
-        <para>
-            This next example shows how to accomplish the same thing by setting
-            <filename>EXTERNALSRC</filename> in the recipe itself or in the
-            recipe's append file:
-            <literallayout class='monospaced'>
-     EXTERNALSRC = "<replaceable>path</replaceable>"
-     EXTERNALSRC_BUILD = "<replaceable>path</replaceable>"
-            </literallayout>
-            <note>
-                In order for these settings to take effect, you must globally
-                or locally inherit the
-                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
-                class.
-            </note>
-        </para>
-
-        <para>
-            By default, <filename>externalsrc.bbclass</filename> builds
-            the source code in a directory separate from the external source
-            directory as specified by
-            <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>.
-            If you need to have the source built in the same directory in
-            which it resides, or some other nominated directory, you can set
-            <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></ulink>
-            to point to that directory:
-            <literallayout class='monospaced'>
-     EXTERNALSRC_BUILD_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
-            </literallayout>
-        </para>
-    </section>
-
     <section id="selecting-an-initialization-manager">
         <title>Selecting an Initialization Manager</title>
 
@@ -8863,6 +10619,566 @@
         </section>
     </section>
 
+
+
+
+    <section id='maintaining-build-output-quality'>
+        <title>Maintaining Build Output Quality</title>
+
+        <para>
+            Many factors can influence the quality of a build.
+            For example, if you upgrade a recipe to use a new version of an
+            upstream software package or you experiment with some new
+            configuration options, subtle changes can occur that you might
+            not detect until later.
+            Consider the case where your recipe is using a newer version of
+            an upstream package.
+            In this case, a new version of a piece of software might
+            introduce an optional dependency on another library, which is
+            auto-detected.
+            If that library has already been built when the software is
+            building, the software will link to the built library and that
+            library will be pulled into your image along with the new
+            software even if you did not want the library.
+        </para>
+
+        <para>
+            The
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-buildhistory'><filename>buildhistory</filename></ulink>
+            class exists to help you maintain the quality of your build
+            output.
+            You can use the class to highlight unexpected and possibly
+            unwanted changes in the build output.
+            When you enable build history, it records information about the
+            contents of each package and image and then commits that
+            information to a local Git repository where you can examine
+            the information.
+        </para>
+
+        <para>
+            The remainder of this section describes the following:
+            <itemizedlist>
+               <listitem><para>
+                   How you can enable and disable build history
+                   </para></listitem>
+               <listitem><para>
+                   How to understand what the build history contains
+                   </para></listitem>
+               <listitem><para>
+                   How to limit the information used for build history
+                   </para></listitem>
+               <listitem><para>
+                   How to examine the build history from both a
+                   command-line and web interface
+                   </para></listitem>
+           </itemizedlist>
+        </para>
+
+        <section id='enabling-and-disabling-build-history'>
+            <title>Enabling and Disabling Build History</title>
+
+            <para>
+                Build history is disabled by default.
+                To enable it, add the following <filename>INHERIT</filename>
+                statement and set the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></ulink>
+                variable to "1" at the end of your
+                <filename>conf/local.conf</filename> file found in the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
+                <literallayout class='monospaced'>
+     INHERIT += "buildhistory"
+     BUILDHISTORY_COMMIT = "1"
+                </literallayout>
+                Enabling build history as previously described causes the
+                OpenEmbedded build system to collect build output information
+                and commit it as a single commit to a local
+                <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>
+                repository.
+                <note>
+                    Enabling build history increases your build times slightly,
+                    particularly for images, and increases the amount of disk
+                    space used during the build.
+                </note>
+            </para>
+
+            <para>
+                You can disable build history by removing the previous
+                statements from your <filename>conf/local.conf</filename>
+                file.
+            </para>
+        </section>
+
+        <section id='understanding-what-the-build-history-contains'>
+            <title>Understanding What the Build History Contains</title>
+
+            <para>
+                Build history information is kept in
+                <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink><filename>}/buildhistory</filename>
+                in the Build Directory as defined by the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_DIR'><filename>BUILDHISTORY_DIR</filename></ulink>
+                variable.
+                The following is an example abbreviated listing:
+                <imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
+            </para>
+
+            <para>
+                At the top level, a <filename>metadata-revs</filename>
+                file exists that lists the revisions of the repositories for
+                the enabled layers when the build was produced.
+                The rest of the data splits into separate
+                <filename>packages</filename>, <filename>images</filename>
+                and <filename>sdk</filename> directories, the contents of
+                which are described as follows.
+            </para>
+
+            <section id='build-history-package-information'>
+                <title>Build History Package Information</title>
+
+                <para>
+                    The history for each package contains a text file that has
+                    name-value pairs with information about the package.
+                    For example,
+                    <filename>buildhistory/packages/i586-poky-linux/busybox/busybox/latest</filename>
+                    contains the following:
+                    <literallayout class='monospaced'>
+     PV = 1.22.1
+     PR = r32
+     RPROVIDES =
+     RDEPENDS = glibc (>= 2.20) update-alternatives-opkg
+     RRECOMMENDS = busybox-syslog busybox-udhcpc update-rc.d
+     PKGSIZE = 540168
+     FILES = /usr/bin/* /usr/sbin/* /usr/lib/busybox/* /usr/lib/lib*.so.* \
+        /etc /com /var /bin/* /sbin/* /lib/*.so.* /lib/udev/rules.d \
+        /usr/lib/udev/rules.d /usr/share/busybox /usr/lib/busybox/* \
+        /usr/share/pixmaps /usr/share/applications /usr/share/idl \
+        /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
+     FILELIST = /bin/busybox /bin/busybox.nosuid /bin/busybox.suid /bin/sh \
+        /etc/busybox.links.nosuid /etc/busybox.links.suid
+                    </literallayout>
+                    Most of these name-value pairs correspond to variables
+                    used to produce the package.
+                    The exceptions are <filename>FILELIST</filename>, which
+                    is the actual list of files in the package, and
+                    <filename>PKGSIZE</filename>, which is the total size of
+                    files in the package in bytes.
+                </para>
+
+                <para>
+                    A file also exists that corresponds to the recipe from
+                    which the package came (e.g.
+                    <filename>buildhistory/packages/i586-poky-linux/busybox/latest</filename>):
+                    <literallayout class='monospaced'>
+     PV = 1.22.1
+     PR = r32
+     DEPENDS = initscripts kern-tools-native update-rc.d-native \
+        virtual/i586-poky-linux-compilerlibs virtual/i586-poky-linux-gcc \
+        virtual/libc virtual/update-alternatives
+     PACKAGES = busybox-ptest busybox-httpd busybox-udhcpd busybox-udhcpc \
+        busybox-syslog busybox-mdev busybox-hwclock busybox-dbg \
+        busybox-staticdev busybox-dev busybox-doc busybox-locale busybox
+                    </literallayout>
+                </para>
+
+                <para>
+                    Finally, for those recipes fetched from a version control
+                    system (e.g., Git), a file exists that lists source
+                    revisions that are specified in the recipe and lists
+                    the actual revisions used during the build.
+                    Listed and actual revisions might differ when
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
+                    is set to
+                    ${<ulink url='&YOCTO_DOCS_REF_URL;#var-AUTOREV'><filename>AUTOREV</filename></ulink>}.
+                    Here is an example assuming
+                    <filename>buildhistory/packages/qemux86-poky-linux/linux-yocto/latest_srcrev</filename>):
+                    <literallayout class='monospaced'>
+     # SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
+     SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
+     # SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
+     SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
+                    </literallayout>
+                    You can use the
+                    <filename>buildhistory-collect-srcrevs</filename>
+                    command with the <filename>-a</filename> option to
+                    collect the stored <filename>SRCREV</filename> values
+                    from build history and report them in a format suitable for
+                    use in global configuration (e.g.,
+                    <filename>local.conf</filename> or a distro include file)
+                    to override floating <filename>AUTOREV</filename> values
+                    to a fixed set of revisions.
+                    Here is some example output from this command:
+                    <literallayout class='monospaced'>
+     $ buildhistory-collect-srcrevs -a
+     # i586-poky-linux
+     SRCREV_pn-glibc = "b8079dd0d360648e4e8de48656c5c38972621072"
+     SRCREV_pn-glibc-initial = "b8079dd0d360648e4e8de48656c5c38972621072"
+     SRCREV_pn-opkg-utils = "53274f087565fd45d8452c5367997ba6a682a37a"
+     SRCREV_pn-kmod = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
+     # x86_64-linux
+     SRCREV_pn-gtk-doc-stub-native = "1dea266593edb766d6d898c79451ef193eb17cfa"
+     SRCREV_pn-dtc-native = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf"
+     SRCREV_pn-update-rc.d-native = "eca680ddf28d024954895f59a241a622dd575c11"
+     SRCREV_glibc_pn-cross-localedef-native = "b8079dd0d360648e4e8de48656c5c38972621072"
+     SRCREV_localedef_pn-cross-localedef-native = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
+     SRCREV_pn-prelink-native = "faa069deec99bf61418d0bab831c83d7c1b797ca"
+     SRCREV_pn-opkg-utils-native = "53274f087565fd45d8452c5367997ba6a682a37a"
+     SRCREV_pn-kern-tools-native = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff"
+     SRCREV_pn-kmod-native = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
+     # qemux86-poky-linux
+     SRCREV_machine_pn-linux-yocto = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
+     SRCREV_meta_pn-linux-yocto = "a227f20eff056e511d504b2e490f3774ab260d6f"
+     # all-poky-linux
+     SRCREV_pn-update-rc.d = "eca680ddf28d024954895f59a241a622dd575c11"
+                    </literallayout>
+                    <note>
+                        Here are some notes on using the
+                        <filename>buildhistory-collect-srcrevs</filename>
+                        command:
+                        <itemizedlist>
+                            <listitem><para>
+                                By default, only values where the
+                                <filename>SRCREV</filename> was not hardcoded
+                                (usually when <filename>AUTOREV</filename>
+                                is used) are reported.
+                                Use the <filename>-a</filename> option to
+                                see all <filename>SRCREV</filename> values.
+                                </para></listitem>
+                            <listitem><para>
+                                The output statements might not have any effect
+                                if overrides are applied elsewhere in the
+                                build system configuration.
+                                Use the <filename>-f</filename> option to add
+                                the <filename>forcevariable</filename> override
+                                to each output line if you need to work around
+                                this restriction.
+                                </para></listitem>
+                            <listitem><para>
+                                The script does apply special handling when
+                                building for multiple machines.
+                                However, the script does place a comment before
+                                each set of values that specifies which
+                                triplet to which they belong as previously
+                                shown (e.g.,
+                                <filename>i586-poky-linux</filename>).
+                                </para></listitem>
+                        </itemizedlist>
+                    </note>
+                </para>
+            </section>
+
+            <section id='build-history-image-information'>
+                <title>Build History Image Information</title>
+
+                <para>
+                    The files produced for each image are as follows:
+                    <itemizedlist>
+                        <listitem><para>
+                            <filename>image-files:</filename>
+                            A directory containing selected files from the root
+                            filesystem.
+                            The files are defined by
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_IMAGE_FILES'><filename>BUILDHISTORY_IMAGE_FILES</filename></ulink>.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>build-id.txt:</filename>
+                            Human-readable information about the build
+                            configuration and metadata source revisions.
+                            This file contains the full build header as printed
+                            by BitBake.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>*.dot:</filename>
+                            Dependency graphs for the image that are
+                            compatible with <filename>graphviz</filename>.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>files-in-image.txt:</filename>
+ 	                        A list of files in the image with permissions,
+                            owner, group, size, and symlink information.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>image-info.txt:</filename>
+                            A text file containing name-value pairs with
+                            information about the image.
+                            See the following listing example for more
+                            information.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>installed-package-names.txt:</filename>
+                            A list of installed packages by name only.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>installed-package-sizes.txt:</filename>
+                            A list of installed packages ordered by size.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>installed-packages.txt:</filename>
+                            A list of installed packages with full package
+                            filenames.
+                            </para></listitem>
+                    </itemizedlist>
+                    <note>
+                        Installed package information is able to be gathered
+                        and produced even if package management is disabled
+                        for the final image.
+                    </note>
+                </para>
+
+                <para>
+                    Here is an example of <filename>image-info.txt</filename>:
+                    <literallayout class='monospaced'>
+     DISTRO = poky
+     DISTRO_VERSION = 1.7
+     USER_CLASSES = buildstats image-mklibs image-prelink
+     IMAGE_CLASSES = image_types
+     IMAGE_FEATURES = debug-tweaks
+     IMAGE_LINGUAS =
+     IMAGE_INSTALL = packagegroup-core-boot run-postinsts
+     BAD_RECOMMENDATIONS =
+     NO_RECOMMENDATIONS =
+     PACKAGE_EXCLUDE =
+     ROOTFS_POSTPROCESS_COMMAND = write_package_manifest; license_create_manifest; \
+        write_image_manifest ; buildhistory_list_installed_image ; \
+        buildhistory_get_image_installed ; ssh_allow_empty_password;  \
+        postinst_enable_logging; rootfs_update_timestamp ; ssh_disable_dns_lookup ;
+     IMAGE_POSTPROCESS_COMMAND =   buildhistory_get_imageinfo ;
+     IMAGESIZE = 6900
+                    </literallayout>
+                    Other than <filename>IMAGESIZE</filename>, which is the
+                    total size of the files in the image in Kbytes, the
+                    name-value pairs are variables that may have influenced the
+                    content of the image.
+                    This information is often useful when you are trying to
+                    determine why a change in the package or file
+                    listings has occurred.
+                </para>
+            </section>
+
+            <section id='using-build-history-to-gather-image-information-only'>
+                <title>Using Build History to Gather Image Information Only</title>
+
+                <para>
+                    As you can see, build history produces image information,
+                    including dependency graphs, so you can see why something
+                    was pulled into the image.
+                    If you are just interested in this information and not
+                    interested in collecting specific package or SDK
+                    information, you can enable writing only image information
+                    without any history by adding the following to your
+                    <filename>conf/local.conf</filename> file found in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
+                    <literallayout class='monospaced'>
+     INHERIT += "buildhistory"
+     BUILDHISTORY_COMMIT = "0"
+     BUILDHISTORY_FEATURES = "image"
+                    </literallayout>
+                    Here, you set the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_FEATURES'><filename>BUILDHISTORY_FEATURES</filename></ulink>
+                    variable to use the image feature only.
+                </para>
+            </section>
+
+            <section id='build-history-sdk-information'>
+                <title>Build History SDK Information</title>
+
+                <para>
+                    Build history collects similar information on the contents
+                    of SDKs
+                    (e.g. <filename>bitbake -c populate_sdk imagename</filename>)
+                    as compared to information it collects for images.
+                    Furthermore, this information differs depending on whether
+                    an extensible or standard SDK is being produced.
+                </para>
+
+                <para>
+                    The following list shows the files produced for SDKs:
+                    <itemizedlist>
+                        <listitem><para>
+                            <filename>files-in-sdk.txt:</filename>
+                            A list of files in the SDK with permissions,
+                            owner, group, size, and symlink information.
+                            This list includes both the host and target parts
+                            of the SDK.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>sdk-info.txt:</filename>
+                            A text file containing name-value pairs with
+                            information about the SDK.
+                            See the following listing example for more
+                            information.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>sstate-task-sizes.txt:</filename>
+                            A text file containing name-value pairs with
+                            information about task group sizes
+                            (e.g. <filename>do_populate_sysroot</filename>
+                            tasks have a total size).
+                            The <filename>sstate-task-sizes.txt</filename> file
+                            exists only when an extensible SDK is created.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>sstate-package-sizes.txt:</filename>
+                            A text file containing name-value pairs with
+                            information for the shared-state packages and
+                            sizes in the SDK.
+                            The <filename>sstate-package-sizes.txt</filename>
+                            file exists only when an extensible SDK is created.
+                            </para></listitem>
+                        <listitem><para>
+                            <filename>sdk-files:</filename>
+                            A folder that contains copies of the files
+                            mentioned in
+                            <filename>BUILDHISTORY_SDK_FILES</filename> if the
+                            files are present in the output.
+                            Additionally, the default value of
+                            <filename>BUILDHISTORY_SDK_FILES</filename> is
+                            specific to the extensible SDK although you can
+                            set it differently if you would like to pull in
+                            specific files from the standard SDK.</para>
+
+                            <para>The default files are
+                            <filename>conf/local.conf</filename>,
+                            <filename>conf/bblayers.conf</filename>,
+                            <filename>conf/auto.conf</filename>,
+                            <filename>conf/locked-sigs.inc</filename>, and
+                            <filename>conf/devtool.conf</filename>.
+                            Thus, for an extensible SDK, these files get
+                            copied into the <filename>sdk-files</filename>
+                            directory.
+                            </para></listitem>
+                        <listitem><para>
+                            The following information appears under
+                            each of the <filename>host</filename>
+                            and <filename>target</filename> directories
+                            for the portions of the SDK that run on the host
+                            and on the target, respectively:
+                            <note>
+                                The following files for the most part are empty
+                                when producing an extensible SDK because this
+                                type of SDK is not constructed from packages
+                                as is the standard SDK.
+                            </note>
+                            <itemizedlist>
+                                <listitem><para>
+                                    <filename>depends.dot:</filename>
+                                    Dependency graph for the SDK that is
+                                    compatible with
+                                    <filename>graphviz</filename>.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <filename>installed-package-names.txt:</filename>
+                                    A list of installed packages by name only.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <filename>installed-package-sizes.txt:</filename>
+                                    A list of installed packages ordered by size.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <filename>installed-packages.txt:</filename>
+                                    A list of installed packages with full
+                                    package filenames.
+                                    </para></listitem>
+                                </itemizedlist>
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+
+                <para>
+                    Here is an example of <filename>sdk-info.txt</filename>:
+                    <literallayout class='monospaced'>
+     DISTRO = poky
+     DISTRO_VERSION = 1.3+snapshot-20130327
+     SDK_NAME = poky-glibc-i686-arm
+     SDK_VERSION = 1.3+snapshot
+     SDKMACHINE =
+     SDKIMAGE_FEATURES = dev-pkgs dbg-pkgs
+     BAD_RECOMMENDATIONS =
+     SDKSIZE = 352712
+                    </literallayout>
+                    Other than <filename>SDKSIZE</filename>, which is the
+                    total size of the files in the SDK in Kbytes, the
+                    name-value pairs are variables that might have influenced
+                    the content of the SDK.
+                    This information is often useful when you are trying to
+                    determine why a change in the package or file listings
+                    has occurred.
+                </para>
+            </section>
+
+            <section id='examining-build-history-information'>
+                <title>Examining Build History Information</title>
+
+                <para>
+                    You can examine build history output from the command
+                    line or from a web interface.
+                </para>
+
+                <para>
+                    To see any changes that have occurred (assuming you have
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></ulink><filename>&nbsp;= "1"</filename>),
+                    you can simply use any Git command that allows you to
+                    view the history of a repository.
+                    Here is one method:
+                    <literallayout class='monospaced'>
+      $ git log -p
+                    </literallayout>
+                    You need to realize, however, that this method does show
+                    changes that are not significant (e.g. a package's size
+                    changing by a few bytes).
+                </para>
+
+                <para>
+                    A command-line tool called
+                    <filename>buildhistory-diff</filename> does exist, though,
+                    that queries the Git repository and prints just the
+                    differences that might be significant in human-readable
+                    form.
+                    Here is an example:
+                    <literallayout class='monospaced'>
+     $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
+     Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt):
+        /etc/anotherpkg.conf was added
+        /sbin/anotherpkg was added
+        * (installed-package-names.txt):
+        *   anotherpkg was added
+     Changes to images/qemux86_64/glibc/core-image-minimal (installed-package-names.txt):
+        anotherpkg was added
+     packages/qemux86_64-poky-linux/v86d: PACKAGES: added "v86d-extras"
+        * PR changed from "r0" to "r1"
+        * PV changed from "0.1.10" to "0.1.12"
+     packages/qemux86_64-poky-linux/v86d/v86d: PKGSIZE changed from 110579 to 144381 (+30%)
+        * PR changed from "r0" to "r1"
+        * PV changed from "0.1.10" to "0.1.12"
+                    </literallayout>
+                    <note>
+                        The <filename>buildhistory-diff</filename> tool
+                        requires the <filename>GitPython</filename> package.
+                        Be sure to install it using Pip3 as follows:
+                        <literallayout class='monospaced'>
+   $ pip3 install GitPython --user
+                        </literallayout>
+                        Alternatively, you can install
+                        <filename>python3-git</filename> using the appropriate
+                        distribution package manager (e.g.
+                        <filename>apt-get</filename>, <filename>dnf</filename>,
+                        or <filename>zipper</filename>).
+                    </note>
+                </para>
+
+                <para>
+                    To see changes to the build history using a web interface,
+                    follow the instruction in the <filename>README</filename>
+                    file here.
+                    <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
+                </para>
+
+                <para>
+                    Here is a sample screenshot of the interface:
+                    <imagedata fileref="figures/buildhistory-web.png" align="center" scalefit="1" width="130%" contentdepth="130%" />
+                </para>
+            </section>
+        </section>
+    </section>
+
     <section id="performing-automated-runtime-testing">
         <title>Performing Automated Runtime Testing</title>
 
@@ -8926,6 +11242,25 @@
                                     which should generate a list of tap devices.
                                     This is the option typically chosen for
                                     Autobuilder-type environments.
+                                    <note><title>Notes</title>
+                                        <itemizedlist>
+                                            <listitem><para>
+                                                Be sure to use an absolute path
+                                                when calling this script
+                                                with sudo.
+                                                </para></listitem>
+                                            <listitem><para>
+                                                The package recipe
+                                                <filename>qemu-helper-native</filename>
+                                                is required to run this script.
+                                                Build the package using the
+                                                following command:
+                                                <literallayout class='monospaced'>
+     $ bitbake qemu-helper-native
+                                                </literallayout>
+                                                </para></listitem>
+                                        </itemizedlist>
+                                    </note>
                                     </para></listitem>
                             </itemizedlist></para></listitem>
                         <listitem><para><emphasis>Set the
@@ -9768,368 +12103,1009 @@
         </section>
     </section>
 
-    <section id="platdev-gdb-remotedebug">
-        <title>Debugging With the GNU Project Debugger (GDB) Remotely</title>
+    <section id='usingpoky-debugging-tools-and-techniques'>
+        <title>Debugging Tools and Techniques</title>
 
         <para>
-            GDB allows you to examine running programs, which in turn helps you to understand and fix problems.
-            It also allows you to perform post-mortem style analysis of program crashes.
-            GDB is available as a package within the Yocto Project and is
-            installed in SDK images by default.
-            See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter
-            in the Yocto Project Reference Manual for a description of these images.
-            You can find information on GDB at <ulink url="http://sourceware.org/gdb/"/>.
-        </para>
-
-        <tip>
-            For best results, install debug (<filename>-dbg</filename>) packages
-            for the applications you are going to debug.
-            Doing so makes extra debug symbols available that give you more
-            meaningful output.
-        </tip>
-
-        <para>
-            Sometimes, due to memory or disk space constraints, it is not possible
-            to use GDB directly on the remote target to debug applications.
-            These constraints arise because GDB needs to load the debugging information and the
-            binaries of the process being debugged.
-            Additionally, GDB needs to perform many computations to locate information such as function
-            names, variable names and values, stack traces and so forth - even before starting the
-            debugging process.
-            These extra computations place more load on the target system and can alter the
-            characteristics of the program being debugged.
+            The exact method for debugging build failures depends on the nature
+            of the problem and on the system's area from which the bug
+            originates.
+            Standard debugging practices such as comparison against the last
+            known working version with examination of the changes and the
+            re-application of steps to identify the one causing the problem are
+            valid for the Yocto Project just as they are for any other system.
+            Even though it is impossible to detail every possible potential
+            failure, this section provides some general tips to aid in
+            debugging given a variety of situations.
+            <note><title>Tip</title>
+                A useful feature for debugging is the error reporting tool.
+                Configuring the Yocto Project to use this tool causes the
+                OpenEmbedded build system to produce error reporting commands as
+                part of the console output.
+                You can enter the commands after the build completes to log
+                error information into a common database, that can help you
+                figure out what might be going wrong.
+                For information on how to enable and use this feature, see the
+                "<link linkend='using-the-error-reporting-tool'>Using the Error Reporting Tool</link>"
+                section.
+            </note>
         </para>
 
         <para>
-            To help get past the previously mentioned constraints, you can use
-            gdbserver, which runs on the remote target and does not load any
-            debugging information from the debugged process.
-            Instead, a GDB instance processes the debugging information that is run on a
-            remote computer - the host GDB.
-            The host GDB then sends control commands to gdbserver to make it stop or start the debugged
-            program, as well as read or write memory regions of that debugged program.
-            All the debugging information loaded and processed as well
-            as all the heavy debugging is done by the host GDB.
-            Offloading these processes gives the gdbserver running on the target a chance to remain
-            small and fast.
-        </para>
-
-        <para>
-            Because the host GDB is responsible for loading the debugging information and
-            for doing the necessary processing to make actual debugging happen,
-            you have to make sure the host can access the unstripped binaries complete
-            with their debugging information and also be sure the target is compiled with no optimizations.
-            The host GDB must also have local access to all the libraries used by the
-            debugged program.
-            Because gdbserver does not need any local debugging information, the binaries on
-            the remote target can remain stripped.
-            However, the binaries must also be compiled without optimization
-            so they match the host's binaries.
-        </para>
-
-        <para>
-            To remain consistent with GDB documentation and terminology, the binary being debugged
-            on the remote target machine is referred to as the "inferior" binary.
-            For documentation on GDB see the
-            <ulink url="http://sourceware.org/gdb/documentation/">GDB site</ulink>.
-        </para>
-
-        <para>
-            The following steps show you how to debug using the GNU project
-            debugger.
-            <orderedlist>
-                <listitem><para>
-                    <emphasis>Configure your build system to construct the
-                    companion debug filesystem:</emphasis></para>
-
-                    <para>In your <filename>local.conf</filename> file, set
-                    the following:
-                    <literallayout class='monospaced'>
-     IMAGE_GEN_DEBUGFS = "1"
-     IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
-                    </literallayout>
-                    These options cause the OpenEmbedded build system
-                    to generate a special companion filesystem fragment,
-                    which contains the matching source and debug symbols to
-                    your deployable filesystem.
-                    The build system does this by looking at what is in the
-                    deployed filesystem, and pulling the corresponding
-                    <filename>-dbg</filename> packages.</para>
-
-                    <para>The companion debug filesystem is not a complete
-                    filesystem, but only contains the debug fragments.
-                    This filesystem must be combined with the full filesystem
-                    for debugging.
-                    Subsequent steps in this procedure show how to combine
-                    the partial filesystem with the full filesystem.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Configure the system to include gdbserver in
-                    the target filesystem:</emphasis></para>
-
-                    <para>Make the following addition in either your
-                    <filename>local.conf</filename> file or in an image
-                    recipe:
-                    <literallayout class='monospaced'>
-     IMAGE_INSTALL_append = “ gdbserver"
-                    </literallayout>
-                    The change makes sure the <filename>gdbserver</filename>
-                    package is included.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Build the environment:</emphasis></para>
-
-                    <para>Use the following command to construct the image and
-                    the companion Debug Filesystem:
-                    <literallayout class='monospaced'>
-     $ bitbake <replaceable>image</replaceable>
-                    </literallayout>
-                    Build the cross GDB component and make it available
-                    for debugging.
-                    Build the SDK that matches the image.
-                    Building the SDK is best for a production build
-                    that can be used later for debugging, especially
-                    during long term maintenance:
-                    <literallayout class='monospaced'>
-     $ bitbake -c populate_sdk <replaceable>image</replaceable>
-                    </literallayout></para>
-
-                    <para>Alternatively, you can build the minimal
-                    toolchain components that match the target.
-                    Doing so creates a smaller than typical SDK and only
-                    contains a minimal set of components with which to
-                    build simple test applications, as well as run the
-                    debugger:
-                    <literallayout class='monospaced'>
-     $ bitbake meta-toolchain
-                    </literallayout></para>
-
-                    <para>A final method is to build Gdb itself within
-                    the build system:
-                    <literallayout class='monospaced'>
-     $ bitbake gdb-cross-<replaceable>architecture</replaceable>
-                    </literallayout>
-                    Doing so produces a temporary copy of
-                    <filename>cross-gdb</filename> you can use for
-                    debugging during development.
-                    While this is the quickest approach, the two previous
-                    methods in this step are better when considering
-                    long-term maintenance strategies.
-                    <note>
-                        If you run
-                        <filename>bitbake gdb-cross</filename>, the
-                        OpenEmbedded build system suggests the actual
-                        image (e.g. <filename>gdb-cross-i586</filename>).
-                        The suggestion is usually the actual name you want
-                        to use.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Set up the</emphasis>&nbsp;<filename>debugfs</filename></para>
-
-                    <para>Run the following commands to set up the
-                    <filename>debugfs</filename>:
-                    <literallayout class='monospaced'>
-     $ mkdir debugfs
-     $ cd debugfs
-     $ tar xvfj <replaceable>build-dir</replaceable>/tmp-glibc/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.rootfs.tar.bz2
-     $ tar xvfj <replaceable>build-dir</replaceable>/tmp-glibc/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>-dbg.rootfs.tar.bz2
-                    </literallayout>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Set up GDB</emphasis></para>
-
-                    <para>Install the SDK (if you built one) and then
-                    source the correct environment file.
-                    Sourcing the environment file puts the SDK in your
-                    <filename>PATH</filename> environment variable.</para>
-
-                    <para>If you are using the build system, Gdb is
-                    located in
-                    <replaceable>build-dir</replaceable>/tmp/sysroots/<replaceable>host</replaceable>/usr/bin/<replaceable>architecture</replaceable>/<replaceable>architecture</replaceable>-gdb
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Boot the target:</emphasis></para>
-
-                    <para>For information on how to run QEMU, see the
-                    <ulink url='http://wiki.qemu.org/Documentation/GettingStartedDevelopers'>QEMU Documentation</ulink>.
-                    <note>
-                        Be sure to verify that your host can access the
-                        target via TCP.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Debug a program:</emphasis></para>
-
-                    <para>Debugging a program involves running gdbserver
-                    on the target and then running Gdb on the host.
-                    The example in this step debugs
-                    <filename>gzip</filename>:
-                    <literallayout class='monospaced'>
-     root@qemux86:~# gdbserver localhost:1234 /bin/gzip —help
-                    </literallayout>
-                    For additional gdbserver options, see the
-                    <ulink url='https://www.gnu.org/software/gdb/documentation/'>GDB Server Documentation</ulink>.
-                    </para>
-
-                    <para>After running gdbserver on the target, you need
-                    to run Gdb on the host and configure it and connect to
-                    the target.
-                    Use these commands:
-                    <literallayout class='monospaced'>
-     $ cd <replaceable>directory-holding-the-debugfs-directory</replaceable>
-     $ <replaceable>arch</replaceable>-gdb
-
-     (gdb) set sysroot debugfs
-     (gdb) set substitute-path /usr/src/debug debugfs/usr/src/debug
-     (gdb) target remote <replaceable>IP-of-target</replaceable>:1234
-                    </literallayout>
-                    At this point, everything should automatically load
-                    (i.e. matching binaries, symbols and headers).
-                    <note>
-                        The Gdb <filename>set</filename> commands in the
-                        previous example can be placed into the users
-                        <filename>~/.gdbinit</filename> file.
-                        Upon starting, Gdb automatically runs whatever
-                        commands are in that file.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Deploying without a full image
-                    rebuild:</emphasis></para>
-
-                    <para>In many cases, during development you want a
-                    quick method to deploy a new binary to the target and
-                    debug it, without waiting for a full image build.
-                    </para>
-
-                    <para>One approach to solving this situation is to
-                    just build the component you want to debug.
-                    Once you have built the component, copy the
-                    executable directly to both the target and the
-                    host <filename>debugfs</filename>.</para>
-
-                    <para>If the binary is processed through the debug
-                    splitting in OpenEmbedded, you should also
-                    copy the debug items (i.e. <filename>.debug</filename>
-                    contents and corresponding
-                    <filename>/usr/src/debug</filename> files)
-                    from the work directory.
-                    Here is an example:
-                    <literallayout class='monospaced'>
-     $ bitbake bash
-     $ bitbake -c devshell bash
-     $ cd ..
-     $ scp packages-split/bash/bin/bash <replaceable>target</replaceable>:/bin/bash
-     $ cp -a packages-split/bash-dbg/* <replaceable>path</replaceable>/debugfs
-                    </literallayout>
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-
-    <section id='debugging-with-the-gnu-project-debugger-gdb-on-the-target'>
-        <title>Debugging with the GNU Project Debugger (GDB) on the Target</title>
-
-        <para>
-            The previous section addressed using GDB remotely for debugging
-            purposes, which is the most usual case due to the inherent
-            hardware limitations on many embedded devices.
-            However, debugging in the target hardware itself is also possible
-            with more powerful devices.
-            This section describes what you need to do in order to support
-            using GDB to debug on the target hardware.
-        </para>
-
-        <para>
-            To support this kind of debugging, you need do the following:
+            The following list shows the debugging topics in the remainder of
+            this section:
             <itemizedlist>
                 <listitem><para>
-                    Ensure that GDB is on the target.
-                    You can do this by adding "gdb" to
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>:
-                    <literallayout class='monospaced'>
-     IMAGE_INSTALL_append = " gdb"
-                    </literallayout>
-                    Alternatively, you can add "tools-debug" to
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>:
-                    <literallayout class='monospaced'>
-     IMAGE_FEATURES_append = " tools-debug"
-                    </literallayout>
+                    "<link linkend='dev-debugging-viewing-logs-from-failed-tasks'>Viewing Logs from Failed Tasks</link>"
+                    describes how to find and view logs from tasks that
+                    failed during the build process.
                     </para></listitem>
                 <listitem><para>
-                    Ensure that debug symbols are present.
-                    You can make sure these symbols are present by installing
-                    <filename>-dbg</filename>:
-                    <literallayout class='monospaced'>
-     IMAGE_INSTALL_append = " <replaceable>packagename</replaceable>-dbg"
-                    </literallayout>
-                    Alternatively, you can do the following to include all the
-                    debug symbols:
-                    <literallayout class='monospaced'>
-     IMAGE_FEATURES_append = " dbg-pkgs"
-                    </literallayout>
+                    "<link linkend='dev-debugging-viewing-variable-values'>Viewing Variable Values</link>"
+                    describes how to use the BitBake <filename>-e</filename>
+                    option to examine variable values after a recipe has been
+                    parsed.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='viewing-package-information-with-oe-pkgdata-util'>Viewing Package Information with <filename>oe-pkgdata-util</filename></link>"
+                    describes how to use the
+                    <filename>oe-pkgdata-util</filename> utility to query
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>
+                    and display package-related information for built
+                    packages.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='dev-viewing-dependencies-between-recipes-and-tasks'>Viewing Dependencies Between Recipes and Tasks</link>"
+                    describes how to use the BitBake <filename>-g</filename>
+                    option to display recipe dependency information used
+                    during the build.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='dev-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</link>"
+                    describes how to use the
+                    <filename>bitbake-dumpsig</filename> command in
+                    conjunction with key subdirectories in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                    to determine variable dependencies.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='dev-debugging-taskrunning'>Running Specific Tasks</link>"
+                    describes how to use several BitBake options (e.g.
+                    <filename>-c</filename>, <filename>-C</filename>, and
+                    <filename>-f</filename>) to run specific tasks in the
+                    build chain.
+                    It can be useful to run tasks "out-of-order" when trying
+                    isolate build issues.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='dev-debugging-bitbake'>General BitBake Problems</link>"
+                    describes how to use BitBake's <filename>-D</filename>
+                    debug output option to reveal more about what BitBake is
+                    doing during the build.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='dev-debugging-buildfile'>Building with No Dependencies</link>"
+                    describes how to use the BitBake <filename>-b</filename>
+                    option to build a recipe while ignoring dependencies.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='recipe-logging-mechanisms'>Recipe Logging Mechanisms</link>"
+                    describes how to use the many recipe logging functions
+                    to produce debugging output and report errors and warnings.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='debugging-parallel-make-races'>Debugging Parallel Make Races</link>"
+                    describes how to debug situations where the build consists
+                    of several parts that are run simultaneously and when the
+                    output or result of one part is not ready for use with a
+                    different part of the build that depends on that output.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</link>"
+                    describes how to use GDB to allow you to examine running
+                    programs, which can help you fix problems.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='debugging-with-the-gnu-project-debugger-gdb-on-the-target'>Debugging with the GNU Project Debugger (GDB) on the Target</link>"
+                    describes how to use GDB directly on target hardware for
+                    debugging.
+                    </para></listitem>
+                <listitem><para>
+                    "<link linkend='dev-other-debugging-others'>Other Debugging Tips</link>"
+                    describes miscellaneous debugging tips that can be useful.
                     </para></listitem>
             </itemizedlist>
-            <note>
-                To improve the debug information accuracy, you can reduce the
-                level of optimization used by the compiler.
-                For example, when adding the following line to your
-                <filename>local.conf</filename> file, you will reduce
-                optimization from
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-FULL_OPTIMIZATION'><filename>FULL_OPTIMIZATION</filename></ulink>
-                of "-O2" to
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-DEBUG_OPTIMIZATION'><filename>DEBUG_OPTIMIZATION</filename></ulink>
-                of "-O -fno-omit-frame-pointer":
-                <literallayout class='monospaced'>
-     DEBUG_BUILD = "1"
-                </literallayout>
-                Consider that this will reduce the application's performance
-                and is recommended only for debugging purposes.
-            </note>
         </para>
-    </section>
-
-    <section id='debugging-parallel-make-races'>
-        <title>Debugging Parallel Make Races</title>
 
         <para>
-            A parallel <filename>make</filename> race occurs when the build
-            consists of several parts that are run simultaneously and
-            a situation occurs when the output or result of one
-            part is not ready for use with a different part of the build that
-            depends on that output.
-            Parallel make races are annoying and can sometimes be difficult
-            to reproduce and fix.
-            However, some simple tips and tricks exist that can help
-            you debug and fix them.
-            This section presents a real-world example of an error encountered
-            on the Yocto Project autobuilder and the process used to fix it.
-            <note>
-                If you cannot properly fix a <filename>make</filename> race
-                condition, you can work around it by clearing either the
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
-                or
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink>
-                variables.
-            </note>
+            For debugging information within the popular
+            <trademark class='trade'>Eclipse</trademark> IDE, see the
+            "<ulink url='&YOCTO_DOCS_SDK_URL;#adt-eclipse'>Working within Eclipse</ulink>"
+            section in the Yocto Project Application Development and the
+            Extensible Software Development Kit (eSDK) manual.
         </para>
 
-        <section id='the-failure'>
-            <title>The Failure</title>
+        <section id='dev-debugging-viewing-logs-from-failed-tasks'>
+            <title>Viewing Logs from Failed Tasks</title>
 
             <para>
-                For this example, assume that you are building an image that
-                depends on the "neard" package.
-                And, during the build, BitBake runs into problems and
-                creates the following output.
-                <note>
-                    This example log file has longer lines artificially
-                    broken to make the listing easier to read.
-                </note>
-                If you examine the output or the log file, you see the
-                failure during <filename>make</filename>:
+                You can find the log for a task in the file
+                <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/temp/log.do_</filename><replaceable>taskname</replaceable>.
+                For example, the log for the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
+                task of the QEMU minimal image for the x86 machine
+                (<filename>qemux86</filename>) might be in
+                <filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile</filename>.
+                To see the commands
+                <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+                ran to generate a log, look at the corresponding
+                <filename>run.do_</filename><replaceable>taskname</replaceable>
+                file in the same directory.
+            </para>
+
+            <para>
+                <filename>log.do_</filename><replaceable>taskname</replaceable>
+                and
+                <filename>run.do_</filename><replaceable>taskname</replaceable>
+                are actually symbolic links to
+                <filename>log.do_</filename><replaceable>taskname</replaceable><filename>.</filename><replaceable>pid</replaceable>
+                and
+                <filename>log.run_</filename><replaceable>taskname</replaceable><filename>.</filename><replaceable>pid</replaceable>,
+                where <replaceable>pid</replaceable> is the PID the task had
+                when it ran.
+                The symlinks always point to the files corresponding to the most
+                recent run.
+            </para>
+        </section>
+
+        <section id='dev-debugging-viewing-variable-values'>
+            <title>Viewing Variable Values</title>
+
+            <para>
+                BitBake's <filename>-e</filename> option is used to display
+                variable values after parsing.
+                The following command displays the variable values after the
+                configuration files (i.e. <filename>local.conf</filename>,
+                <filename>bblayers.conf</filename>,
+                <filename>bitbake.conf</filename> and so forth) have been
+                parsed:
                 <literallayout class='monospaced'>
+     $ bitbake -e
+                </literallayout>
+                The following command displays variable values after a specific
+                recipe has been parsed.
+                The variables include those from the configuration as well:
+                <literallayout class='monospaced'>
+     $ bitbake -e recipename
+                </literallayout>
+                <note><para>
+                    Each recipe has its own private set of variables
+                    (datastore).
+                    Internally, after parsing the configuration, a copy of the
+                    resulting datastore is made prior to parsing each recipe.
+                    This copying implies that variables set in one recipe will
+                    not be visible to other recipes.</para>
+
+                    <para>Likewise, each task within a recipe gets a private
+                    datastore based on the recipe datastore, which means that
+                    variables set within one task will not be visible to
+                    other tasks.</para>
+                </note>
+            </para>
+
+            <para>
+                In the output of <filename>bitbake -e</filename>, each
+                variable is preceded by a description of how the variable
+                got its value, including temporary values that were later
+                overriden.
+                This description also includes variable flags (varflags) set on
+                the variable.
+                The output can be very helpful during debugging.
+            </para>
+
+            <para>
+                Variables that are exported to the environment are preceded by
+                <filename>export</filename> in the output of
+                <filename>bitbake -e</filename>.
+                See the following example:
+                <literallayout class='monospaced'>
+     export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86"
+                </literallayout>
+            </para>
+
+            <para>
+                In addition to variable values, the output of the
+                <filename>bitbake -e</filename> and
+                <filename>bitbake -e</filename>&nbsp;<replaceable>recipe</replaceable>
+                commands includes the following information:
+                <itemizedlist>
+                    <listitem><para>
+                        The output starts with a tree listing all configuration
+                        files and classes included globally, recursively listing
+                        the files they include or inherit in turn.
+                        Much of the behavior of the OpenEmbedded build system
+                        (including the behavior of the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#normal-recipe-build-tasks'>normal recipe build tasks</ulink>)
+                        is implemented in the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-base'><filename>base</filename></ulink>
+                        class and the classes it inherits, rather than being
+                        built into BitBake itself.
+                        </para></listitem>
+                    <listitem><para>
+                        After the variable values, all functions appear in the
+                        output.
+                        For shell functions, variables referenced within the
+                        function body are expanded.
+                        If a function has been modified using overrides or
+                        using override-style operators like
+                        <filename>_append</filename> and
+                        <filename>_prepend</filename>, then the final assembled
+                        function body appears in the output.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='viewing-package-information-with-oe-pkgdata-util'>
+            <title>Viewing Package Information with <filename>oe-pkgdata-util</filename></title>
+
+            <para>
+                You can use the <filename>oe-pkgdata-util</filename>
+                command-line utility to query
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>
+                and display various package-related information.
+                When you use the utility, you must use it to view information
+                on packages that have already been built.
+            </para>
+
+            <para>
+                Following are a few of the available
+                <filename>oe-pkgdata-util</filename> subcommands.
+                <note>
+                    You can use the standard * and ? globbing wildcards as part
+                    of package names and paths.
+                </note>
+                <itemizedlist>
+                    <listitem><para>
+                        <filename>oe-pkgdata-util list-pkgs [</filename><replaceable>pattern</replaceable><filename>]</filename>:
+                        Lists all packages that have been built, optionally
+                        limiting the match to packages that match
+                        <replaceable>pattern</replaceable>.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>oe-pkgdata-util list-pkg-files&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
+                        Lists the files and directories contained in the given
+                        packages.
+                        <note>
+                            <para>
+                            A different way to view the contents of a package is
+                            to look at the
+                            <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/packages-split</filename>
+                            directory of the recipe that generates the
+                            package.
+                            This directory is created by the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
+                            task and has one subdirectory for each package the
+                            recipe generates, which contains the files stored in
+                            that package.</para>
+                            <para>
+                            If you want to inspect the
+                            <filename>${WORKDIR}/packages-split</filename>
+                            directory, make sure that
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-rm-work'><filename>rm_work</filename></ulink>
+                            is not enabled when you build the recipe.
+                            </para>
+                            </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>oe-pkgdata-util find-path&nbsp;</filename><replaceable>path</replaceable><filename>&nbsp;...</filename>:
+                        Lists the names of the packages that contain the given
+                        paths.
+                        For example, the following tells us that
+                        <filename>/usr/share/man/man1/make.1</filename>
+                        is contained in the <filename>make-doc</filename>
+                        package:
+                        <literallayout class='monospaced'>
+     $ oe-pkgdata-util find-path /usr/share/man/man1/make.1
+     make-doc: /usr/share/man/man1/make.1
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>oe-pkgdata-util lookup-recipe&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
+                        Lists the name of the recipes that
+                        produce the given packages.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                For more information on the <filename>oe-pkgdata-util</filename>
+                command, use the help facility:
+                <literallayout class='monospaced'>
+     $ oe-pkgdata-util &dash;&dash;help
+     $ oe-pkgdata-util <replaceable>subcommand</replaceable> --help
+                </literallayout>
+            </para>
+        </section>
+
+        <section id='dev-viewing-dependencies-between-recipes-and-tasks'>
+            <title>Viewing Dependencies Between Recipes and Tasks</title>
+
+            <para>
+                Sometimes it can be hard to see why BitBake wants to build other
+                recipes before the one you have specified.
+                Dependency information can help you understand why a recipe is
+                built.
+            </para>
+
+            <para>
+                To generate dependency information for a recipe, run the
+                following command:
+                <literallayout class='monospaced'>
+     $ bitbake -g <replaceable>recipename</replaceable>
+                </literallayout>
+                This command writes the following files in the current
+                directory:
+                <itemizedlist>
+                    <listitem><para>
+                        <filename>pn-buildlist</filename>: A list of
+                        recipes/targets involved in building
+                        <replaceable>recipename</replaceable>.
+                        "Involved" here means that at least one task from the
+                         recipe needs to run when building
+                        <replaceable>recipename</replaceable> from scratch.
+                        Targets that are in
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></ulink>
+                        are not listed.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>task-depends.dot</filename>: A graph showing
+                        dependencies between tasks.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                The graphs are in
+                <ulink url='https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29'>DOT</ulink>
+                format and can be converted to images (e.g. using the
+                <filename>dot</filename> tool from
+                <ulink url='http://www.graphviz.org/'>Graphviz</ulink>).
+                <note><title>Notes</title>
+                    <itemizedlist>
+                        <listitem><para>
+                            DOT files use a plain text format.
+                            The graphs generated using the
+                            <filename>bitbake -g</filename> command are often so
+                            large as to be difficult to read without special
+                            pruning (e.g. with Bitbake's
+                            <filename>-I</filename> option) and processing.
+                            Despite the form and size of the graphs, the
+                            corresponding <filename>.dot</filename> files can
+                            still be possible to read and provide useful
+                            information.
+                            </para>
+
+                            <para>As an example, the
+                            <filename>task-depends.dot</filename> file contains
+                            lines such as the following:
+                            <literallayout class='monospaced'>
+     "libxslt.do_configure" -> "libxml2.do_populate_sysroot"
+                            </literallayout>
+                            The above example line reveals that the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
+                            task in <filename>libxslt</filename> depends on the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
+                            task in <filename>libxml2</filename>, which is a
+                            normal
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
+                            dependency between the two recipes.
+                            </para></listitem>
+                        <listitem><para>
+                            For an example of how <filename>.dot</filename>
+                            files can be processed, see the
+                            <filename>scripts/contrib/graph-tool</filename>
+                            Python script, which finds and displays paths
+                            between graph nodes.
+                            </para></listitem>
+                    </itemizedlist>
+                </note>
+            </para>
+
+            <para>
+                You can use a different method to view dependency information
+                by using the following command:
+                <literallayout class='monospaced'>
+     $ bitbake -g -u taskexp <replaceable>recipename</replaceable>
+                </literallayout>
+                This command displays a GUI window from which you can view
+                build-time and runtime dependencies for the recipes involved in
+                building <replaceable>recipename</replaceable>.
+            </para>
+        </section>
+
+        <section id='dev-viewing-task-variable-dependencies'>
+            <title>Viewing Task Variable Dependencies</title>
+
+            <para>
+                As mentioned in the
+                "<ulink url='&YOCTO_DOCS_BB_URL;#checksums'>Checksums (Signatures)</ulink>"
+                section of the BitBake User Manual, BitBake tries to
+                automatically determine what variables a task depends on so
+                that it can rerun the task if any values of the variables
+                change.
+                This determination is usually reliable.
+                However, if you do things like construct variable names at
+                runtime, then you might have to manually declare dependencies
+                on those variables using <filename>vardeps</filename> as
+                described in the
+                "<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'>Variable Flags</ulink>"
+                section of the BitBake User Manual.
+            </para>
+
+            <para>
+                If you are unsure whether a variable dependency is being
+                picked up automatically for a given task, you can list the
+                variable dependencies BitBake has determined by doing the
+                following:
+                <orderedlist>
+                    <listitem><para>
+                        Build the recipe containing the task:
+                        <literallayout class='monospaced'>
+     $ bitbake <replaceable>recipename</replaceable>
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        Inside the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-STAMPS_DIR'><filename>STAMPS_DIR</filename></ulink>
+                        directory, find the signature data
+                        (<filename>sigdata</filename>) file that corresponds
+                        to the task.
+                        The <filename>sigdata</filename> files contain a pickled
+                        Python database of all the metadata that went into
+                        creating the input checksum for the task.
+                        As an example, for the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
+                        task of the <filename>db</filename> recipe, the
+                        <filename>sigdata</filename> file might be found in the
+                        following location:
+                        <literallayout class='monospaced'>
+     ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
+                        </literallayout>
+                        For tasks that are accelerated through the shared state
+                        (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
+                        cache, an additional <filename>siginfo</filename> file
+                        is written into
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
+                        along with the cached task output.
+                        The <filename>siginfo</filename> files contain exactly
+                        the same information as <filename>sigdata</filename>
+                        files.
+                        </para></listitem>
+                    <listitem><para>
+                        Run <filename>bitbake-dumpsig</filename> on the
+                        <filename>sigdata</filename> or
+                        <filename>siginfo</filename> file.
+                        Here is an example:
+                        <literallayout class='monospaced'>
+     $ bitbake-dumpsig ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
+                        </literallayout>
+                        In the output of the above command, you will find a
+                        line like the following, which lists all the (inferred)
+                        variable dependencies for the task.
+                        This list also includes indirect dependencies from
+                        variables depending on other variables, recursively.
+                        <literallayout class='monospaced'>
+     Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
+                        </literallayout>
+                        <note>
+                            Functions (e.g. <filename>base_do_fetch</filename>)
+                            also count as variable dependencies.
+                            These functions in turn depend on the variables they
+                            reference.
+                        </note>
+                        The output of <filename>bitbake-dumpsig</filename> also
+                        includes the value each variable had, a list of
+                        dependencies for each variable, and
+                        <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHBASE_WHITELIST'><filename>BB_HASHBASE_WHITELIST</filename></ulink>
+                        information.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+
+            <para>
+                There is also a <filename>bitbake-diffsigs</filename> command
+                for comparing two <filename>siginfo</filename> or
+                <filename>sigdata</filename> files.
+                This command can be helpful when trying to figure out what
+                changed between two versions of a task.
+                If you call <filename>bitbake-diffsigs</filename> with just one
+                file, the command behaves like
+                <filename>bitbake-dumpsig</filename>.
+            </para>
+
+            <para>
+                You can also use BitBake to dump out the signature construction
+                information without executing tasks by using either of the
+                following BitBake command-line options:
+                <literallayout class='monospaced'>
+     &dash;&dash;dump-signatures=<replaceable>SIGNATURE_HANDLER</replaceable>
+     -S <replaceable>SIGNATURE_HANDLER</replaceable>
+                </literallayout>
+                <note>
+                    Two common values for
+                    <replaceable>SIGNATURE_HANDLER</replaceable> are "none" and
+                    "printdiff", which dump only the signature or compare the
+                    dumped signature with the cached one, respectively.
+                </note>
+                Using BitBake with either of these options causes BitBake to
+                dump out <filename>sigdata</filename> files in the
+                <filename>stamps</filename> directory for every task it would
+                have executed instead of building the specified target package.
+            </para>
+        </section>
+
+        <section id='dev-viewing-metadata-used-to-create-the-input-signature-of-a-shared-state-task'>
+            <title>Viewing Metadata Used to Create the Input Signature of a Shared State Task</title>
+
+            <para>
+                Seeing what metadata went into creating the input signature
+                of a shared state (sstate) task can be a useful debugging
+                aid.
+                This information is available in signature information
+                (<filename>siginfo</filename>) files in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>.
+                For information on how to view and interpret information in
+                <filename>siginfo</filename> files, see the
+                "<link linkend='dev-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</link>"
+                section.
+            </para>
+
+            <para>
+                For conceptual information on shared state, see the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#shared-state'>Shared State</ulink>"
+                section in the Yocto Project Overview and Concepts Manual.
+            </para>
+        </section>
+
+        <section id='dev-invalidating-shared-state-to-force-a-task-to-run'>
+            <title>Invalidating Shared State to Force a Task to Run</title>
+
+            <para>
+                The OpenEmbedded build system uses
+                <ulink url='&YOCTO_DOCS_OM_URL;#overview-checksums'>checksums</ulink>
+                and
+                <ulink url='&YOCTO_DOCS_OM_URL;#shared-state'>shared state</ulink>
+                cache to avoid unnecessarily rebuilding tasks.
+                Collectively, this scheme is known as "shared state code."
+            </para>
+
+            <para>
+                As with all schemes, this one has some drawbacks.
+                It is possible that you could make implicit changes to your
+                code that the checksum calculations do not take into
+                account.
+                These implicit changes affect a task's output but do not
+                trigger the shared state code into rebuilding a recipe.
+                Consider an example during which a tool changes its output.
+                Assume that the output of <filename>rpmdeps</filename>
+                changes.
+                The result of the change should be that all the
+                <filename>package</filename> and
+                <filename>package_write_rpm</filename> shared state cache
+                items become invalid.
+                However, because the change to the output is
+                external to the code and therefore implicit,
+                the associated shared state cache items do not become
+                invalidated.
+                In this case, the build process uses the cached items
+                rather than running the task again.
+                Obviously, these types of implicit changes can cause
+                problems.
+            </para>
+
+            <para>
+                To avoid these problems during the build, you need to
+                understand the effects of any changes you make.
+                Realize that changes you make directly to a function
+                are automatically factored into the checksum calculation.
+                Thus, these explicit changes invalidate the associated
+                area of shared state cache.
+                However, you need to be aware of any implicit changes that
+                are not obvious changes to the code and could affect
+                the output of a given task.
+            </para>
+
+            <para>
+                When you identify an implicit change, you can easily
+                take steps to invalidate the cache and force the tasks
+                to run.
+                The steps you can take are as simple as changing a
+                function's comments in the source code.
+                For example, to invalidate package shared state files,
+                change the comment statements of
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
+                or the comments of one of the functions it calls.
+                Even though the change is purely cosmetic, it causes the
+                checksum to be recalculated and forces the build system to
+                run the task again.
+                <note>
+                    For an example of a commit that makes a cosmetic
+                    change to invalidate shared state, see this
+                    <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
+                </note>
+            </para>
+        </section>
+
+        <section id='dev-debugging-taskrunning'>
+            <title>Running Specific Tasks</title>
+
+            <para>
+                Any given recipe consists of a set of tasks.
+                The standard BitBake behavior in most cases is:
+                <filename>do_fetch</filename>,
+                <filename>do_unpack</filename>,
+                <filename>do_patch</filename>,
+                <filename>do_configure</filename>,
+                <filename>do_compile</filename>,
+                <filename>do_install</filename>,
+                <filename>do_package</filename>,
+                <filename>do_package_write_*</filename>, and
+                <filename>do_build</filename>.
+                The default task is <filename>do_build</filename> and any tasks
+                on which it depends build first.
+                Some tasks, such as <filename>do_devshell</filename>, are not
+                part of the default build chain.
+                If you wish to run a task that is not part of the default build
+                chain, you can use the <filename>-c</filename> option in
+                BitBake.
+                Here is an example:
+                <literallayout class='monospaced'>
+     $ bitbake matchbox-desktop -c devshell
+                </literallayout>
+            </para>
+
+            <para>
+                The <filename>-c</filename> option respects task dependencies,
+                which means that all other tasks (including tasks from other
+                recipes) that the specified task depends on will be run before
+                the task.
+                Even when you manually specify a task to run with
+                <filename>-c</filename>, BitBake will only run the task if it
+                considers it "out of date".
+                See the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</ulink>"
+                section in the Yocto Project Overview and Concepts Manual for
+                how BitBake determines whether a task is "out of date".
+            </para>
+
+            <para>
+                If you want to force an up-to-date task to be rerun (e.g.
+                because you made manual modifications to the recipe's
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
+                that you want to try out), then you can use the
+                <filename>-f</filename> option.
+                <note>
+                    The reason <filename>-f</filename> is never required when
+                    running the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-devshell'><filename>do_devshell</filename></ulink>
+                    task is because the
+                    <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>nostamp</filename></ulink><filename>]</filename>
+                    variable flag is already set for the task.
+                </note>
+                The following example shows one way you can use the
+                <filename>-f</filename> option:
+                <literallayout class='monospaced'>
+     $ bitbake matchbox-desktop
+               .
+               .
+     make some changes to the source code in the work directory
+               .
+               .
+     $ bitbake matchbox-desktop -c compile -f
+     $ bitbake matchbox-desktop
+                </literallayout>
+            </para>
+
+            <para>
+                This sequence first builds and then recompiles
+                <filename>matchbox-desktop</filename>.
+                The last command reruns all tasks (basically the packaging
+                tasks) after the compile.
+                BitBake recognizes that the <filename>do_compile</filename>
+                task was rerun and therefore understands that the other tasks
+                also need to be run again.
+            </para>
+
+            <para>
+                Another, shorter way to rerun a task and all
+                <ulink url='&YOCTO_DOCS_REF_URL;#normal-recipe-build-tasks'>normal recipe build tasks</ulink>
+                that depend on it is to use the <filename>-C</filename>
+                option.
+                <note>
+                    This option is upper-cased and is separate from the
+                    <filename>-c</filename> option, which is lower-cased.
+                </note>
+                Using this option invalidates the given task and then runs the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-build'><filename>do_build</filename></ulink>
+                task, which is the default task if no task is given, and the
+                tasks on which it depends.
+                You could replace the final two commands in the previous example
+                with the following single command:
+                <literallayout class='monospaced'>
+     $ bitbake matchbox-desktop -C compile
+                </literallayout>
+                Internally, the <filename>-f</filename> and
+                <filename>-C</filename> options work by tainting (modifying) the
+                input checksum of the specified task.
+                This tainting indirectly causes the task and its
+                dependent tasks to be rerun through the normal task dependency
+                mechanisms.
+                <note>
+                    BitBake explicitly keeps track of which tasks have been
+                    tainted in this fashion, and will print warnings such as the
+                    following for builds involving such tasks:
+                    <literallayout class='monospaced'>
+     WARNING: /home/ulf/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb.do_compile is tainted from a forced run
+                    </literallayout>
+                    The purpose of the warning is to let you know that the work
+                    directory and build output might not be in the clean state
+                    they would be in for a "normal" build, depending on what
+                    actions you took.
+                    To get rid of such warnings, you can remove the work
+                    directory and rebuild the recipe, as follows:
+                    <literallayout class='monospaced'>
+     $ bitbake matchbox-desktop -c clean
+     $ bitbake matchbox-desktop
+                    </literallayout>
+                </note>
+            </para>
+
+            <para>
+                You can view a list of tasks in a given package by running the
+                <filename>do_listtasks</filename> task as follows:
+                <literallayout class='monospaced'>
+     $ bitbake matchbox-desktop -c listtasks
+                </literallayout>
+                The results appear as output to the console and are also in the
+                file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
+            </para>
+        </section>
+
+        <section id='dev-debugging-bitbake'>
+            <title>General BitBake Problems</title>
+
+            <para>
+                You can see debug output from BitBake by using the
+                <filename>-D</filename> option.
+                The debug output gives more information about what BitBake
+                is doing and the reason behind it.
+                Each <filename>-D</filename> option you use increases the
+                logging level.
+                The most common usage is <filename>-DDD</filename>.
+            </para>
+
+            <para>
+                The output from
+                <filename>bitbake -DDD -v</filename> <replaceable>targetname</replaceable>
+                can reveal why BitBake chose a certain version of a package or
+                why BitBake picked a certain provider.
+                This command could also help you in a situation where you think
+                BitBake did something unexpected.
+            </para>
+        </section>
+
+        <section id='dev-debugging-buildfile'>
+            <title>Building with No Dependencies</title>
+
+            <para>
+                To build a specific recipe (<filename>.bb</filename> file),
+                you can use the following command form:
+                <literallayout class='monospaced'>
+     $ bitbake -b <replaceable>somepath</replaceable>/<replaceable>somerecipe</replaceable>.bb
+                </literallayout>
+                This command form does not check for dependencies.
+                Consequently, you should use it only when you know existing
+                dependencies have been met.
+                <note>
+                    You can also specify fragments of the filename.
+                    In this case, BitBake checks for a unique match.
+                </note>
+            </para>
+        </section>
+
+        <section id='recipe-logging-mechanisms'>
+            <title>Recipe Logging Mechanisms</title>
+
+            <para>
+                The Yocto Project provides several logging functions for
+                producing debugging output and reporting errors and warnings.
+                For Python functions, the following logging functions exist.
+                All of these functions log to
+                <filename>${T}/log.do_</filename><replaceable>task</replaceable>,
+                and can also log to standard output (stdout) with the right
+                settings:
+                <itemizedlist>
+                    <listitem><para>
+                        <filename>bb.plain(</filename><replaceable>msg</replaceable><filename>)</filename>:
+                        Writes <replaceable>msg</replaceable> as is to the
+                        log while also logging to stdout.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>bb.note(</filename><replaceable>msg</replaceable><filename>)</filename>:
+                        Writes "NOTE: <replaceable>msg</replaceable>" to the
+                        log.
+                        Also logs to stdout if BitBake is called with "-v".
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>bb.debug(</filename><replaceable>level</replaceable><filename>,&nbsp;</filename><replaceable>msg</replaceable><filename>)</filename>:
+                        Writes "DEBUG: <replaceable>msg</replaceable>" to the
+                        log.
+                        Also logs to stdout if the log level is greater than or
+                        equal to <replaceable>level</replaceable>.
+                        See the
+                        "<ulink url='&YOCTO_DOCS_BB_URL;#usage-and-syntax'>-D</ulink>"
+                        option in the BitBake User Manual for more information.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>bb.warn(</filename><replaceable>msg</replaceable><filename>)</filename>:
+                        Writes "WARNING: <replaceable>msg</replaceable>" to the
+                        log while also logging to stdout.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>bb.error(</filename><replaceable>msg</replaceable><filename>)</filename>:
+                        Writes "ERROR: <replaceable>msg</replaceable>" to the
+                        log while also logging to standard out (stdout).
+                        <note>
+                            Calling this function does not cause the task to fail.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>bb.fatal(</filename><replaceable>msg</replaceable><filename>)</filename>:
+                        This logging function is similar to
+                        <filename>bb.error(</filename><replaceable>msg</replaceable><filename>)</filename>
+                        but also causes the calling task to fail.
+                        <note>
+                            <filename>bb.fatal()</filename> raises an exception,
+                            which means you do not need to put a "return"
+                            statement after the function.
+                        </note>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                The same logging functions are also available in shell
+                functions, under the names
+                <filename>bbplain</filename>, <filename>bbnote</filename>,
+                <filename>bbdebug</filename>, <filename>bbwarn</filename>,
+                <filename>bberror</filename>, and <filename>bbfatal</filename>.
+                The
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-logging'><filename>logging</filename></ulink>
+                class implements these functions.
+                See that class in the
+                <filename>meta/classes</filename> folder of the
+                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                for information.
+            </para>
+
+            <section id='logging-with-python'>
+                <title>Logging With Python</title>
+
+                <para>
+                    When creating recipes using Python and inserting code that
+                    handles build logs, keep in mind the goal is to have
+                    informative logs while keeping the console as "silent" as
+                    possible.
+                    Also, if you want status messages in the log, use the
+                    "debug" loglevel.
+                </para>
+
+                <para>
+                    Following is an example written in Python.
+                    The code handles logging for a function that determines the
+                    number of tasks needed to be run.
+                    See the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-listtasks'><filename>do_listtasks</filename></ulink>"
+                    section for additional information:
+                    <literallayout class='monospaced'>
+     python do_listtasks() {
+         bb.debug(2, "Starting to figure out the task list")
+         if noteworthy_condition:
+             bb.note("There are 47 tasks to run")
+         bb.debug(2, "Got to point xyz")
+         if warning_trigger:
+             bb.warn("Detected warning_trigger, this might be a problem later.")
+         if recoverable_error:
+             bb.error("Hit recoverable_error, you really need to fix this!")
+         if fatal_error:
+             bb.fatal("fatal_error detected, unable to print the task list")
+         bb.plain("The tasks present are abc")
+         bb.debug(2, "Finished figuring out the tasklist")
+     }
+                    </literallayout>
+                </para>
+            </section>
+
+            <section id='logging-with-bash'>
+                <title>Logging With Bash</title>
+
+                <para>
+                    When creating recipes using Bash and inserting code that
+                    handles build logs, you have the same goals - informative
+                    with minimal console output.
+                    The syntax you use for recipes written in Bash is similar
+                    to that of recipes written in Python described in the
+                    previous section.
+                </para>
+
+                <para>
+                    Following is an example written in Bash.
+                    The code logs the progress of the <filename>do_my_function</filename> function.
+                    <literallayout class='monospaced'>
+     do_my_function() {
+         bbdebug 2 "Running do_my_function"
+         if [ exceptional_condition ]; then
+             bbnote "Hit exceptional_condition"
+         fi
+         bbdebug 2  "Got to point xyz"
+         if [ warning_trigger ]; then
+             bbwarn "Detected warning_trigger, this might cause a problem later."
+         fi
+         if [ recoverable_error ]; then
+             bberror "Hit recoverable_error, correcting"
+         fi
+         if [ fatal_error ]; then
+             bbfatal "fatal_error detected"
+         fi
+         bbdebug 2 "Completed do_my_function"
+     }
+                    </literallayout>
+                </para>
+            </section>
+        </section>
+
+        <section id='debugging-parallel-make-races'>
+            <title>Debugging Parallel Make Races</title>
+
+            <para>
+                A parallel <filename>make</filename> race occurs when the build
+                consists of several parts that are run simultaneously and
+                a situation occurs when the output or result of one
+                part is not ready for use with a different part of the build
+                that depends on that output.
+                Parallel make races are annoying and can sometimes be difficult
+                to reproduce and fix.
+                However, some simple tips and tricks exist that can help
+                you debug and fix them.
+                This section presents a real-world example of an error
+                encountered on the Yocto Project autobuilder and the process
+                used to fix it.
+                <note>
+                    If you cannot properly fix a <filename>make</filename> race
+                    condition, you can work around it by clearing either the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
+                    or
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink>
+                    variables.
+                </note>
+            </para>
+
+            <section id='the-failure'>
+                <title>The Failure</title>
+
+                <para>
+                    For this example, assume that you are building an image that
+                    depends on the "neard" package.
+                    And, during the build, BitBake runs into problems and
+                    creates the following output.
+                    <note>
+                        This example log file has longer lines artificially
+                        broken to make the listing easier to read.
+                    </note>
+                    If you examine the output or the log file, you see the
+                    failure during <filename>make</filename>:
+                    <literallayout class='monospaced'>
      | DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i586-linux', 'common']
      | DEBUG: Executing shell function do_compile
      | NOTE: make -j 16
@@ -10194,61 +13170,62 @@
      | make[1]: *** Waiting for unfinished jobs....
      | make: *** [all] Error 2
      | ERROR: oe_runmake failed
-                </literallayout>
-            </para>
-        </section>
+                    </literallayout>
+                </para>
+            </section>
 
-        <section id='reproducing-the-error'>
-            <title>Reproducing the Error</title>
+            <section id='reproducing-the-error'>
+                <title>Reproducing the Error</title>
 
-            <para>
-                Because race conditions are intermittent, they do not
-                manifest themselves every time you do the build.
-                In fact, most times the build will complete without problems
-                even though the potential race condition exists.
-                Thus, once the error surfaces, you need a way to reproduce it.
-            </para>
+                <para>
+                    Because race conditions are intermittent, they do not
+                    manifest themselves every time you do the build.
+                    In fact, most times the build will complete without problems
+                    even though the potential race condition exists.
+                    Thus, once the error surfaces, you need a way to reproduce
+                    it.
+                </para>
 
-            <para>
-                In this example, compiling the "neard" package is causing the
-                problem.
-                So the first thing to do is build "neard" locally.
-                Before you start the build, set the
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
-                variable in your <filename>local.conf</filename> file to
-                a high number (e.g. "-j 20").
-                Using a high value for <filename>PARALLEL_MAKE</filename>
-                increases the chances of the race condition showing up:
-                <literallayout class='monospaced'>
+                <para>
+                    In this example, compiling the "neard" package is causing
+                    the problem.
+                    So the first thing to do is build "neard" locally.
+                    Before you start the build, set the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
+                    variable in your <filename>local.conf</filename> file to
+                    a high number (e.g. "-j 20").
+                    Using a high value for <filename>PARALLEL_MAKE</filename>
+                    increases the chances of the race condition showing up:
+                    <literallayout class='monospaced'>
      $ bitbake neard
-                </literallayout>
-            </para>
+                    </literallayout>
+                </para>
 
-            <para>
-                Once the local build for "neard" completes, start a
-                <filename>devshell</filename> build:
-                <literallayout class='monospaced'>
+                <para>
+                    Once the local build for "neard" completes, start a
+                    <filename>devshell</filename> build:
+                    <literallayout class='monospaced'>
      $ bitbake neard -c devshell
-                </literallayout>
-                For information on how to use a
-                <filename>devshell</filename>, see the
-                "<link linkend='platdev-appdev-devshell'>Using a Development Shell</link>"
-                section.
-            </para>
+                    </literallayout>
+                    For information on how to use a
+                    <filename>devshell</filename>, see the
+                    "<link linkend='platdev-appdev-devshell'>Using a Development Shell</link>"
+                    section.
+                </para>
 
-            <para>
-                In the <filename>devshell</filename>, do the following:
-                <literallayout class='monospaced'>
+                <para>
+                    In the <filename>devshell</filename>, do the following:
+                    <literallayout class='monospaced'>
      $ make clean
      $ make tools/snep-send.o
-                </literallayout>
-                The <filename>devshell</filename> commands cause the failure
-                to clearly be visible.
-                In this case, a missing dependency exists for the "neard"
-                Makefile target.
-                Here is some abbreviated, sample output with the
-                missing dependency clearly visible at the end:
-                <literallayout class='monospaced'>
+                    </literallayout>
+                    The <filename>devshell</filename> commands cause the failure
+                    to clearly be visible.
+                    In this case, a missing dependency exists for the "neard"
+                    Makefile target.
+                    Here is some abbreviated, sample output with the
+                    missing dependency clearly visible at the end:
+                    <literallayout class='monospaced'>
      i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/home/scott-lenovo/......
         .
         .
@@ -10261,238 +13238,1687 @@
      compilation terminated.
      make: *** [tools/snep-send.o] Error 1
      $
-                </literallayout>
-            </para>
-        </section>
+                    </literallayout>
+                </para>
+            </section>
 
-        <section id='creating-a-patch-for-the-fix'>
-            <title>Creating a Patch for the Fix</title>
+            <section id='creating-a-patch-for-the-fix'>
+                <title>Creating a Patch for the Fix</title>
 
-            <para>
-                Because there is a missing dependency for the Makefile
-                target, you need to patch the
-                <filename>Makefile.am</filename> file, which is generated
-                from <filename>Makefile.in</filename>.
-                You can use Quilt to create the patch:
-                <literallayout class='monospaced'>
+                <para>
+                    Because there is a missing dependency for the Makefile
+                    target, you need to patch the
+                    <filename>Makefile.am</filename> file, which is generated
+                    from <filename>Makefile.in</filename>.
+                    You can use Quilt to create the patch:
+                    <literallayout class='monospaced'>
      $ quilt new parallelmake.patch
      Patch patches/parallelmake.patch is now on top
      $ quilt add Makefile.am
      File Makefile.am added to patch patches/parallelmake.patch
-                </literallayout>
-                For more information on using Quilt, see the
-                "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
-                section.
-            </para>
+                    </literallayout>
+                    For more information on using Quilt, see the
+                    "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
+                    section.
+                </para>
 
-            <para>
-                At this point you need to make the edits to
-                <filename>Makefile.am</filename> to add the missing
-                dependency.
-                For our example, you have to add the following line
-                to the file:
-                <literallayout class='monospaced'>
+                <para>
+                    At this point you need to make the edits to
+                    <filename>Makefile.am</filename> to add the missing
+                    dependency.
+                    For our example, you have to add the following line
+                    to the file:
+                    <literallayout class='monospaced'>
      tools/snep-send.$(OBJEXT): include/near/dbus.h
-                </literallayout>
-            </para>
+                    </literallayout>
+                </para>
 
-            <para>
-                Once you have edited the file, use the
-                <filename>refresh</filename> command to create the patch:
-                <literallayout class='monospaced'>
+                <para>
+                    Once you have edited the file, use the
+                    <filename>refresh</filename> command to create the patch:
+                    <literallayout class='monospaced'>
      $ quilt refresh
      Refreshed patch patches/parallelmake.patch
-                </literallayout>
-                Once the patch file exists, you need to add it back to the
-                originating recipe folder.
-                Here is an example assuming a top-level
-                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                named <filename>poky</filename>:
-                <literallayout class='monospaced'>
+                    </literallayout>
+                    Once the patch file exists, you need to add it back to the
+                    originating recipe folder.
+                    Here is an example assuming a top-level
+                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                    named <filename>poky</filename>:
+                    <literallayout class='monospaced'>
      $ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard
-                </literallayout>
-                The final thing you need to do to implement the fix in the
-                build is to update the "neard" recipe (i.e.
-                <filename>neard-0.14.bb</filename>) so that the
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
-                statement includes the patch file.
-                The recipe file is in the folder above the patch.
-                Here is what the edited <filename>SRC_URI</filename>
-                statement would look like:
-                <literallayout class='monospaced'>
+                    </literallayout>
+                    The final thing you need to do to implement the fix in the
+                    build is to update the "neard" recipe (i.e.
+                    <filename>neard-0.14.bb</filename>) so that the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                    statement includes the patch file.
+                    The recipe file is in the folder above the patch.
+                    Here is what the edited <filename>SRC_URI</filename>
+                    statement would look like:
+                    <literallayout class='monospaced'>
      SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \
                 file://neard.in \
                 file://neard.service.in \
                 file://parallelmake.patch \
                "
-                </literallayout>
-            </para>
+                    </literallayout>
+                </para>
 
-            <para>
-                With the patch complete and moved to the correct folder and
-                the <filename>SRC_URI</filename> statement updated, you can
-                exit the <filename>devshell</filename>:
-                <literallayout class='monospaced'>
+                <para>
+                    With the patch complete and moved to the correct folder and
+                    the <filename>SRC_URI</filename> statement updated, you can
+                    exit the <filename>devshell</filename>:
+                    <literallayout class='monospaced'>
      $ exit
-                </literallayout>
-            </para>
-        </section>
+                    </literallayout>
+                </para>
+            </section>
 
-        <section id='testing-the-build'>
-            <title>Testing the Build</title>
+            <section id='testing-the-build'>
+                <title>Testing the Build</title>
 
-            <para>
-                With everything in place, you can get back to trying the
-                build again locally:
-                <literallayout class='monospaced'>
+                <para>
+                    With everything in place, you can get back to trying the
+                    build again locally:
+                    <literallayout class='monospaced'>
      $ bitbake neard
-                </literallayout>
-                This build should succeed.
-            </para>
+                    </literallayout>
+                    This build should succeed.
+                </para>
 
-            <para>
-                Now you can open up a <filename>devshell</filename> again
-                and repeat the clean and make operations as follows:
-                <literallayout class='monospaced'>
+                <para>
+                    Now you can open up a <filename>devshell</filename> again
+                    and repeat the clean and make operations as follows:
+                    <literallayout class='monospaced'>
      $ bitbake neard -c devshell
      $ make clean
      $ make tools/snep-send.o
-                </literallayout>
-                The build should work without issue.
+                    </literallayout>
+                    The build should work without issue.
+                </para>
+
+                <para>
+                    As with all solved problems, if they originated upstream,
+                    you need to submit the fix for the recipe in OE-Core and
+                    upstream so that the problem is taken care of at its
+                    source.
+                    See the
+                    "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
+                    section for more information.
+                </para>
+            </section>
+        </section>
+
+        <section id="platdev-gdb-remotedebug">
+            <title>Debugging With the GNU Project Debugger (GDB) Remotely</title>
+
+            <para>
+                GDB allows you to examine running programs, which in turn helps
+                you to understand and fix problems.
+                It also allows you to perform post-mortem style analysis of
+                program crashes.
+                GDB is available as a package within the Yocto Project and is
+                installed in SDK images by default.
+                See the
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
+                chapter in the Yocto Project Reference Manual for a description of
+                these images.
+                You can find information on GDB at
+                <ulink url="http://sourceware.org/gdb/"/>.
+                <note><title>Tip</title>
+                    For best results, install debug (<filename>-dbg</filename>)
+                    packages for the applications you are going to debug.
+                    Doing so makes extra debug symbols available that give you
+                    more meaningful output.
+                </note>
             </para>
 
             <para>
-                As with all solved problems, if they originated upstream, you
-                need to submit the fix for the recipe in OE-Core and upstream
-                so that the problem is taken care of at its source.
-                See the
-                "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
-                section for more information.
+                Sometimes, due to memory or disk space constraints, it is not
+                possible to use GDB directly on the remote target to debug
+                applications.
+                These constraints arise because GDB needs to load the debugging
+                information and the binaries of the process being debugged.
+                Additionally, GDB needs to perform many computations to locate
+                information such as function names, variable names and values,
+                stack traces and so forth - even before starting the debugging
+                process.
+                These extra computations place more load on the target system
+                and can alter the characteristics of the program being debugged.
+            </para>
+
+            <para>
+                To help get past the previously mentioned constraints, you can
+                use gdbserver, which runs on the remote target and does not
+                load any debugging information from the debugged process.
+                Instead, a GDB instance processes the debugging information that
+                is run on a remote computer - the host GDB.
+                The host GDB then sends control commands to gdbserver to make
+                it stop or start the debugged program, as well as read or write
+                memory regions of that debugged program.
+                All the debugging information loaded and processed as well
+               as all the heavy debugging is done by the host GDB.
+                Offloading these processes gives the gdbserver running on the
+                target a chance to remain small and fast.
+            </para>
+
+            <para>
+                Because the host GDB is responsible for loading the debugging
+                information and for doing the necessary processing to make
+                actual debugging happen, you have to make sure the host can
+                access the unstripped binaries complete with their debugging
+                information and also be sure the target is compiled with no
+                optimizations.
+                The host GDB must also have local access to all the libraries
+                used by the debugged program.
+                Because gdbserver does not need any local debugging information,
+                the binaries on the remote target can remain stripped.
+                However, the binaries must also be compiled without optimization
+                so they match the host's binaries.
+            </para>
+
+            <para>
+                To remain consistent with GDB documentation and terminology,
+                the binary being debugged on the remote target machine is
+                referred to as the "inferior" binary.
+                For documentation on GDB see the
+                <ulink url="http://sourceware.org/gdb/documentation/">GDB site</ulink>.
+            </para>
+
+            <para>
+                The following steps show you how to debug using the GNU project
+                debugger.
+                <orderedlist>
+                    <listitem><para>
+                        <emphasis>Configure your build system to construct the
+                        companion debug filesystem:</emphasis></para>
+
+                        <para>In your <filename>local.conf</filename> file, set
+                        the following:
+                        <literallayout class='monospaced'>
+     IMAGE_GEN_DEBUGFS = "1"
+     IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
+                        </literallayout>
+                        These options cause the OpenEmbedded build system
+                        to generate a special companion filesystem fragment,
+                        which contains the matching source and debug symbols to
+                        your deployable filesystem.
+                        The build system does this by looking at what is in the
+                        deployed filesystem, and pulling the corresponding
+                        <filename>-dbg</filename> packages.</para>
+
+                        <para>The companion debug filesystem is not a complete
+                        filesystem, but only contains the debug fragments.
+                        This filesystem must be combined with the full filesystem
+                        for debugging.
+                        Subsequent steps in this procedure show how to combine
+                        the partial filesystem with the full filesystem.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Configure the system to include gdbserver in
+                        the target filesystem:</emphasis></para>
+
+                        <para>Make the following addition in either your
+                        <filename>local.conf</filename> file or in an image
+                        recipe:
+                        <literallayout class='monospaced'>
+     IMAGE_INSTALL_append = “ gdbserver"
+                        </literallayout>
+                        The change makes sure the <filename>gdbserver</filename>
+                        package is included.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Build the environment:</emphasis></para>
+
+                        <para>Use the following command to construct the image
+                        and the companion Debug Filesystem:
+                        <literallayout class='monospaced'>
+     $ bitbake <replaceable>image</replaceable>
+                        </literallayout>
+                        Build the cross GDB component and make it available
+                        for debugging.
+                        Build the SDK that matches the image.
+                        Building the SDK is best for a production build
+                        that can be used later for debugging, especially
+                        during long term maintenance:
+                        <literallayout class='monospaced'>
+     $ bitbake -c populate_sdk <replaceable>image</replaceable>
+                        </literallayout></para>
+
+                        <para>Alternatively, you can build the minimal
+                        toolchain components that match the target.
+                        Doing so creates a smaller than typical SDK and only
+                        contains a minimal set of components with which to
+                        build simple test applications, as well as run the
+                        debugger:
+                        <literallayout class='monospaced'>
+     $ bitbake meta-toolchain
+                        </literallayout></para>
+
+                        <para>A final method is to build Gdb itself within
+                        the build system:
+                        <literallayout class='monospaced'>
+     $ bitbake gdb-cross-<replaceable>architecture</replaceable>
+                        </literallayout>
+                        Doing so produces a temporary copy of
+                        <filename>cross-gdb</filename> you can use for
+                        debugging during development.
+                        While this is the quickest approach, the two previous
+                        methods in this step are better when considering
+                        long-term maintenance strategies.
+                        <note>
+                            If you run
+                            <filename>bitbake gdb-cross</filename>, the
+                            OpenEmbedded build system suggests the actual
+                            image (e.g. <filename>gdb-cross-i586</filename>).
+                            The suggestion is usually the actual name you want
+                            to use.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Set up the</emphasis>&nbsp;<filename>debugfs</filename></para>
+
+                        <para>Run the following commands to set up the
+                        <filename>debugfs</filename>:
+                        <literallayout class='monospaced'>
+     $ mkdir debugfs
+     $ cd debugfs
+     $ tar xvfj <replaceable>build-dir</replaceable>/tmp-glibc/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.rootfs.tar.bz2
+     $ tar xvfj <replaceable>build-dir</replaceable>/tmp-glibc/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>-dbg.rootfs.tar.bz2
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Set up GDB</emphasis></para>
+
+                        <para>Install the SDK (if you built one) and then
+                        source the correct environment file.
+                        Sourcing the environment file puts the SDK in your
+                        <filename>PATH</filename> environment variable.</para>
+
+                        <para>If you are using the build system, Gdb is
+                        located in
+                        <replaceable>build-dir</replaceable>/tmp/sysroots/<replaceable>host</replaceable>/usr/bin/<replaceable>architecture</replaceable>/<replaceable>architecture</replaceable>-gdb
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Boot the target:</emphasis></para>
+
+                        <para>For information on how to run QEMU, see the
+                        <ulink url='http://wiki.qemu.org/Documentation/GettingStartedDevelopers'>QEMU Documentation</ulink>.
+                        <note>
+                            Be sure to verify that your host can access the
+                            target via TCP.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Debug a program:</emphasis></para>
+
+                        <para>Debugging a program involves running gdbserver
+                        on the target and then running Gdb on the host.
+                        The example in this step debugs
+                        <filename>gzip</filename>:
+                        <literallayout class='monospaced'>
+     root@qemux86:~# gdbserver localhost:1234 /bin/gzip —help
+                        </literallayout>
+                        For additional gdbserver options, see the
+                        <ulink url='https://www.gnu.org/software/gdb/documentation/'>GDB Server Documentation</ulink>.
+                        </para>
+
+                        <para>After running gdbserver on the target, you need
+                        to run Gdb on the host and configure it and connect to
+                        the target.
+                        Use these commands:
+                        <literallayout class='monospaced'>
+     $ cd <replaceable>directory-holding-the-debugfs-directory</replaceable>
+     $ <replaceable>arch</replaceable>-gdb
+
+     (gdb) set sysroot debugfs
+     (gdb) set substitute-path /usr/src/debug debugfs/usr/src/debug
+     (gdb) target remote <replaceable>IP-of-target</replaceable>:1234
+                        </literallayout>
+                        At this point, everything should automatically load
+                        (i.e. matching binaries, symbols and headers).
+                        <note>
+                            The Gdb <filename>set</filename> commands in the
+                            previous example can be placed into the users
+                           <filename>~/.gdbinit</filename> file.
+                            Upon starting, Gdb automatically runs whatever
+                            commands are in that file.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Deploying without a full image
+                        rebuild:</emphasis></para>
+
+                        <para>In many cases, during development you want a
+                        quick method to deploy a new binary to the target and
+                        debug it, without waiting for a full image build.
+                        </para>
+
+                        <para>One approach to solving this situation is to
+                        just build the component you want to debug.
+                        Once you have built the component, copy the
+                        executable directly to both the target and the
+                        host <filename>debugfs</filename>.</para>
+
+                        <para>If the binary is processed through the debug
+                        splitting in OpenEmbedded, you should also
+                        copy the debug items (i.e. <filename>.debug</filename>
+                        contents and corresponding
+                        <filename>/usr/src/debug</filename> files)
+                        from the work directory.
+                        Here is an example:
+                        <literallayout class='monospaced'>
+     $ bitbake bash
+     $ bitbake -c devshell bash
+     $ cd ..
+     $ scp packages-split/bash/bin/bash <replaceable>target</replaceable>:/bin/bash
+     $ cp -a packages-split/bash-dbg/* <replaceable>path</replaceable>/debugfs
+                        </literallayout>
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='debugging-with-the-gnu-project-debugger-gdb-on-the-target'>
+            <title>Debugging with the GNU Project Debugger (GDB) on the Target</title>
+
+            <para>
+                The previous section addressed using GDB remotely for debugging
+                purposes, which is the most usual case due to the inherent
+                hardware limitations on many embedded devices.
+                However, debugging in the target hardware itself is also
+                possible with more powerful devices.
+                This section describes what you need to do in order to support
+                using GDB to debug on the target hardware.
+            </para>
+
+            <para>
+                To support this kind of debugging, you need do the following:
+                <itemizedlist>
+                    <listitem><para>
+                        Ensure that GDB is on the target.
+                        You can do this by adding "gdb" to
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>:
+                        <literallayout class='monospaced'>
+     IMAGE_INSTALL_append = " gdb"
+                        </literallayout>
+                        Alternatively, you can add "tools-debug" to
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>:
+                        <literallayout class='monospaced'>
+     IMAGE_FEATURES_append = " tools-debug"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        Ensure that debug symbols are present.
+                        You can make sure these symbols are present by
+                        installing <filename>-dbg</filename>:
+                        <literallayout class='monospaced'>
+     IMAGE_INSTALL_append = " <replaceable>packagename</replaceable>-dbg"
+                        </literallayout>
+                        Alternatively, you can do the following to include all
+                        the debug symbols:
+                        <literallayout class='monospaced'>
+     IMAGE_FEATURES_append = " dbg-pkgs"
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+                <note>
+                    To improve the debug information accuracy, you can reduce
+                    the level of optimization used by the compiler.
+                    For example, when adding the following line to your
+                    <filename>local.conf</filename> file, you will reduce
+                    optimization from
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-FULL_OPTIMIZATION'><filename>FULL_OPTIMIZATION</filename></ulink>
+                    of "-O2" to
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-DEBUG_OPTIMIZATION'><filename>DEBUG_OPTIMIZATION</filename></ulink>
+                    of "-O -fno-omit-frame-pointer":
+                    <literallayout class='monospaced'>
+     DEBUG_BUILD = "1"
+                    </literallayout>
+                    Consider that this will reduce the application's performance
+                    and is recommended only for debugging purposes.
+                </note>
+            </para>
+        </section>
+
+        <section id='dev-other-debugging-others'>
+            <title>Other Debugging Tips</title>
+
+            <para>
+                Here are some other tips that you might find useful:
+                <itemizedlist>
+                    <listitem><para>
+                        When adding new packages, it is worth watching for
+                        undesirable items making their way into compiler command
+                        lines.
+                        For example, you do not want references to local system
+                        files like
+                        <filename>/usr/lib/</filename> or
+                        <filename>/usr/include/</filename>.
+                        </para></listitem>
+                    <listitem><para>
+                        If you want to remove the <filename>psplash</filename>
+                        boot splashscreen,
+                        add <filename>psplash=false</filename> to  the kernel
+                        command line.
+                        Doing so prevents <filename>psplash</filename> from
+                        loading and thus allows you to see the console.
+                        It is also possible to switch out of the splashscreen by
+                        switching the virtual console (e.g. Fn+Left or Fn+Right
+                        on a Zaurus).
+                        </para></listitem>
+                    <listitem><para>
+                        Removing
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+                        (usually <filename>tmp/</filename>, within the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>)
+                        can often fix temporary build issues.
+                        Removing <filename>TMPDIR</filename> is usually a
+                        relatively cheap operation, because task output will be
+                        cached in
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
+                        (usually <filename>sstate-cache/</filename>, which is
+                        also in the Build Directory).
+                        <note>
+                            Removing <filename>TMPDIR</filename> might be a
+                            workaround rather than a fix.
+                            Consequently, trying to determine the underlying
+                            cause of an issue before removing the directory is
+                            a good idea.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        Understanding how a feature is used in practice within
+                        existing recipes can be very helpful.
+                        It is recommended that you configure some method that
+                        allows you to quickly search through files.</para>
+
+                        <para>Using GNU Grep, you can use the following shell
+                        function to recursively search through common
+                        recipe-related files, skipping binary files,
+                        <filename>.git</filename> directories, and the
+                        Build Directory (assuming its name starts with
+                        "build"):
+                        <literallayout class='monospaced'>
+     g() {
+         grep -Ir \
+              --exclude-dir=.git \
+              --exclude-dir='build*' \
+              --include='*.bb*' \
+              --include='*.inc*' \
+              --include='*.conf*' \
+              --include='*.py*' \
+              "$@"
+     }
+                        </literallayout>
+                        Following are some usage examples:
+                        <literallayout class='monospaced'>
+     $ g FOO    # Search recursively for "FOO"
+     $ g -i foo # Search recursively for "foo", ignoring case
+     $ g -w FOO # Search recursively for "FOO" as a word, ignoring e.g. "FOOBAR"
+                        </literallayout>
+                        If figuring out how some feature works requires a lot of
+                        searching, it might indicate that the documentation
+                        should be extended or improved.
+                        In such cases, consider filing a documentation bug using
+                        the Yocto Project implementation of
+                        <ulink url='https://bugzilla.yoctoproject.org/'>Bugzilla</ulink>.
+                        For information on how to submit a bug against
+                        the Yocto Project, see the Yocto Project Bugzilla
+                        <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>wiki page</ulink>
+                        and the
+                        "<link linkend='submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</link>"
+                        section.
+                        <note>
+                            The manuals might not be the right place to document
+                            variables that are purely internal and have a
+                            limited scope (e.g. internal variables used to
+                            implement a single <filename>.bbclass</filename>
+                            file).
+                        </note>
+                        </para></listitem>
+                </itemizedlist>
             </para>
         </section>
     </section>
 
-    <section id='maintaining-open-source-license-compliance-during-your-products-lifecycle'>
-        <title>Maintaining Open Source License Compliance During Your Product's Lifecycle</title>
+    <section id='making-changes-to-the-yocto-project'>
+        <title>Making Changes to the Yocto Project</title>
 
         <para>
-            One of the concerns for a development organization using open source
-            software is how to maintain compliance with various open source
-            licensing during the lifecycle of the product.
-            While this section does not provide legal advice or
-            comprehensively cover all scenarios, it does
-            present methods that you can use to
-            assist you in meeting the compliance requirements during a software
-            release.
+            Because the Yocto Project is an open-source, community-based
+            project, you can effect changes to the project.
+            This section presents procedures that show you how to submit
+            a defect against the project and how to submit a change.
         </para>
 
-        <para>
-            With hundreds of different open source licenses that the Yocto
-            Project tracks, it is difficult to know the requirements of each
-            and every license.
-            However, the requirements of the major FLOSS licenses can begin
-            to be covered by
-            assuming that three main areas of concern exist:
-            <itemizedlist>
-                <listitem><para>Source code must be provided.</para></listitem>
-                <listitem><para>License text for the software must be
-                    provided.</para></listitem>
-                <listitem><para>Compilation scripts and modifications to the
-                    source code must be provided.
-                    </para></listitem>
-            </itemizedlist>
-            There are other requirements beyond the scope of these
-            three and the methods described in this section
-            (e.g. the mechanism through which source code is distributed).
-        </para>
-
-        <para>
-            As different organizations have different methods of complying with
-            open source licensing, this section is not meant to imply that
-            there is only one single way to meet your compliance obligations,
-            but rather to describe one method of achieving compliance.
-            The remainder of this section describes methods supported to meet the
-            previously mentioned three requirements.
-            Once you take steps to meet these requirements,
-            and prior to releasing images, sources, and the build system,
-            you should audit all artifacts to ensure completeness.
-            <note>
-                The Yocto Project generates a license manifest during
-                image creation that is located
-                in <filename>${DEPLOY_DIR}/licenses/<replaceable>image_name-datestamp</replaceable></filename>
-                to assist with any audits.
-            </note>
-        </para>
-
-        <section id='providing-the-source-code'>
-            <title>Providing the Source Code</title>
+        <section id='submitting-a-defect-against-the-yocto-project'>
+            <title>Submitting a Defect Against the Yocto Project</title>
 
             <para>
-                Compliance activities should begin before you generate the
-                final image.
-                The first thing you should look at is the requirement that
-                tops the list for most compliance groups - providing
-                the source.
-                The Yocto Project has a few ways of meeting this
-                requirement.
+                Use the Yocto Project implementation of
+                <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink>
+                to submit a defect (bug) against the Yocto Project.
+                For additional information on this implementation of Bugzilla see the
+                "<ulink url='&YOCTO_DOCS_REF_URL;#resources-bugtracker'>Yocto Project Bugzilla</ulink>"
+                section in the Yocto Project Reference Manual.
+                For more detail on any of the following steps, see the Yocto Project
+                <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>.
             </para>
 
             <para>
-                One of the easiest ways to meet this requirement is
-                to provide the entire
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
-                used by the build.
-                This method, however, has a few issues.
-                The most obvious is the size of the directory since it includes
-                all sources used in the build and not just the source used in
-                the released image.
-                It will include toolchain source, and other artifacts, which
-                you would not generally release.
-                However, the more serious issue for most companies is accidental
-                release of proprietary software.
-                The Yocto Project provides an
-                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-archiver'><filename>archiver</filename></ulink>
-                class to help avoid some of these concerns.
+                Use the following general steps to submit a bug"
+
+                <orderedlist>
+                    <listitem><para>
+                        Open the Yocto Project implementation of
+                        <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>.
+                        </para></listitem>
+                    <listitem><para>
+                        Click "File a Bug" to enter a new bug.
+                        </para></listitem>
+                    <listitem><para>
+                        Choose the appropriate "Classification", "Product", and
+                        "Component" for which the bug was found.
+                        Bugs for the Yocto Project fall into one of several
+                        classifications, which in turn break down into several
+                        products and components.
+                        For example, for a bug against the
+                        <filename>meta-intel</filename> layer, you would choose
+                        "Build System, Metadata &amp; Runtime", "BSPs", and
+                        "bsps-meta-intel", respectively.
+                        </para></listitem>
+                    <listitem><para>
+                        Choose the "Version" of the Yocto Project for which you found
+                        the bug (e.g. &DISTRO;).
+                        </para></listitem>
+                    <listitem><para>
+                        Determine and select the "Severity" of the bug.
+                        The severity indicates how the bug impacted your work.
+                        </para></listitem>
+                    <listitem><para>
+                        Choose the "Hardware" that the bug impacts.
+                        </para></listitem>
+                    <listitem><para>
+                        Choose the "Architecture" that the bug impacts.
+                        </para></listitem>
+                    <listitem><para>
+                        Choose a "Documentation change" item for the bug.
+                        Fixing a bug might or might not affect the Yocto Project
+                        documentation.
+                        If you are unsure of the impact to the documentation, select
+                        "Don't Know".
+                        </para></listitem>
+                    <listitem><para>
+                        Provide a brief "Summary" of the bug.
+                        Try to limit your summary to just a line or two and be sure
+                        to capture the essence of the bug.
+                        </para></listitem>
+                    <listitem><para>
+                        Provide a detailed "Description" of the bug.
+                        You should provide as much detail as you can about the context,
+                        behavior, output, and so forth that surrounds the bug.
+                        You can even attach supporting files for output from logs by
+                        using the "Add an attachment" button.
+                        </para></listitem>
+                    <listitem><para>
+                        Click the "Submit Bug" button submit the bug.
+                        A new Bugzilla number is assigned to the bug and the defect
+                        is logged in the bug tracking system.
+                        </para></listitem>
+                </orderedlist>
+                Once you file a bug, the bug is processed by the Yocto Project Bug
+                Triage Team and further details concerning the bug are assigned
+                (e.g. priority and owner).
+                You are the "Submitter" of the bug and any further categorization,
+                progress, or comments on the bug result in Bugzilla sending you an
+                automated email concerning the particular change or progress to the
+                bug.
+            </para>
+        </section>
+
+        <section id='how-to-submit-a-change'>
+            <title>Submitting a Change to the Yocto Project</title>
+
+            <para>
+                Contributions to the Yocto Project and OpenEmbedded are very welcome.
+                Because the system is extremely configurable and flexible, we recognize
+                that developers will want to extend, configure or optimize it for
+                their specific uses.
             </para>
 
             <para>
-                Before you employ <filename>DL_DIR</filename> or the
-                <filename>archiver</filename> class, you need to decide how
-                you choose to provide source.
-                The source <filename>archiver</filename> class can generate
-                tarballs and SRPMs and can create them with various levels of
-                compliance in mind.
+                The Yocto Project uses a mailing list and a patch-based workflow
+                that is similar to the Linux kernel but contains important
+                differences.
+                In general, a mailing list exists through which you can submit
+                patches.
+                You should send patches to the appropriate mailing list so that they
+                can be reviewed and merged by the appropriate maintainer.
+                The specific mailing list you need to use depends on the
+                location of the code you are changing.
+                Each component (e.g. layer) should have a
+                <filename>README</filename> file that indicates where to send
+                the changes and which process to follow.
             </para>
 
             <para>
-                One way of doing this (but certainly not the only way) is to
-                release just the source as a tarball.
-                You can do this by adding the following to the
-                <filename>local.conf</filename> file found in the
-                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
+                You can send the patch to the mailing list using whichever approach
+                you feel comfortable with to generate the patch.
+                Once sent, the patch is usually reviewed by the community at large.
+                If somebody has concerns with the patch, they will usually voice
+                their concern over the mailing list.
+                If a patch does not receive any negative reviews, the maintainer of
+                the affected layer typically takes the patch, tests it, and then
+                based on successful testing, merges the patch.
+            </para>
+
+            <para id='figuring-out-the-mailing-list-to-use'>
+                The "poky" repository, which is the Yocto Project's reference build
+                environment, is a hybrid repository that contains several
+                individual pieces (e.g. BitBake, Metadata, documentation,
+                and so forth) built using the combo-layer tool.
+                The upstream location used for submitting changes varies by
+                component:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Core Metadata:</emphasis>
+                        Send your patch to the
+                        <ulink url='http://lists.openembedded.org/mailman/listinfo/openembedded-core'>openembedded-core</ulink>
+                        mailing list.  For example, a change to anything under
+                        the <filename>meta</filename> or
+                        <filename>scripts</filename> directories should be sent
+                        to this mailing list.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>BitBake:</emphasis>
+                        For changes to BitBake (i.e. anything under the
+                        <filename>bitbake</filename> directory), send your patch
+                        to the
+                        <ulink url='http://lists.openembedded.org/mailman/listinfo/bitbake-devel'>bitbake-devel</ulink>
+                        mailing list.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>"meta-*" trees:</emphasis>
+                        These trees contain Metadata.
+                        Use the
+                        <ulink url='https://lists.yoctoproject.org/listinfo/poky'>poky</ulink>
+                        mailing list.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                For changes to other layers hosted in the Yocto Project source
+                repositories (i.e. <filename>yoctoproject.org</filename>), tools,
+                and the Yocto Project documentation, use the
+                <ulink url='https://lists.yoctoproject.org/listinfo/yocto'>Yocto Project</ulink>
+                general mailing list.
+                <note>
+                    Sometimes a layer's documentation specifies to use a
+                    particular mailing list.
+                    If so, use that list.
+                </note>
+                For additional recipes that do not fit into the core Metadata, you
+                should determine which layer the recipe should go into and submit
+                the change in the manner recommended by the documentation (e.g.
+                the <filename>README</filename> file) supplied with the layer.
+                If in doubt, please ask on the Yocto general mailing list or on
+                the openembedded-devel mailing list.
+            </para>
+
+            <para>
+                You can also push a change upstream and request a maintainer to
+                pull the change into the component's upstream repository.
+                You do this by pushing to a contribution repository that is upstream.
+                See the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#gs-git-workflows-and-the-yocto-project'>Git Workflows and the Yocto Project</ulink>"
+                section in the Yocto Project Overview and Concepts Manual for additional
+                concepts on working in the Yocto Project development environment.
+            </para>
+
+            <para>
+                Two commonly used testing repositories exist for
+                OpenEmbedded-Core:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>"ross/mut" branch:</emphasis>
+                        The "mut" (master-under-test) tree
+                        exists in the <filename>poky-contrib</filename> repository
+                        in the
+                        <ulink url='&YOCTO_GIT_URL;'>Yocto Project source repositories</ulink>.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>"master-next" branch:</emphasis>
+                        This branch is part of the main
+                        "poky" repository in the Yocto Project source repositories.
+                        </para></listitem>
+                </itemizedlist>
+                Maintainers use these branches to test submissions prior to merging
+                patches.
+                Thus, you can get an idea of the status of a patch based on
+                whether the patch has been merged into one of these branches.
+                <note>
+                    This system is imperfect and changes can sometimes get lost in the
+                    flow.
+                    Asking about the status of a patch or change is reasonable if the
+                    change has been idle for a while with no feedback.
+                    The Yocto Project does have plans to use
+                    <ulink url='https://en.wikipedia.org/wiki/Patchwork_(software)'>Patchwork</ulink>
+                    to track the status of patches and also to automatically preview
+                    patches.
+                </note>
+            </para>
+
+            <para>
+                The following sections provide procedures for submitting a change.
+            </para>
+
+            <section id='pushing-a-change-upstream'>
+                <title>Using Scripts to Push a Change Upstream and Request a Pull</title>
+
+                <para>
+                    Follow this procedure to push a change to an upstream "contrib"
+                    Git repository:
+                    <note>
+                        You can find general Git information on how to push a change
+                        upstream in the
+                        <ulink url='http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows'>Git Community Book</ulink>.
+                    </note>
+                    <orderedlist>
+                        <listitem><para>
+                            <emphasis>Make Your Changes Locally:</emphasis>
+                            Make your changes in your local Git repository.
+                            You should make small, controlled, isolated changes.
+                            Keeping changes small and isolated aids review,
+                            makes merging/rebasing easier and keeps the change
+                            history clean should anyone need to refer to it in
+                            future.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Stage Your Changes:</emphasis>
+                            Stage your changes by using the <filename>git add</filename>
+                            command on each file you changed.
+                            </para></listitem>
+                        <listitem><para id='making-sure-you-have-correct-commit-information'>
+                            <emphasis>Commit Your Changes:</emphasis>
+                            Commit the change by using the
+                            <filename>git commit</filename> command.
+                            Make sure your commit information follows standards by
+                            following these accepted conventions:
+                            <itemizedlist>
+                                <listitem><para>
+                                    Be sure to include a "Signed-off-by:" line in the
+                                    same style as required by the Linux kernel.
+                                    Adding this line signifies that you, the submitter,
+                                    have agreed to the Developer's Certificate of
+                                    Origin 1.1 as follows:
+                                    <literallayout class='monospaced'>
+     Developer's Certificate of Origin 1.1
+
+     By making a contribution to this project, I certify that:
+
+     (a) The contribution was created in whole or in part by me and I
+         have the right to submit it under the open source license
+         indicated in the file; or
+
+     (b) The contribution is based upon previous work that, to the best
+         of my knowledge, is covered under an appropriate open source
+         license and I have the right under that license to submit that
+         work with modifications, whether created in whole or in part
+         by me, under the same open source license (unless I am
+         permitted to submit under a different license), as indicated
+         in the file; or
+
+     (c) The contribution was provided directly to me by some other
+         person who certified (a), (b) or (c) and I have not modified
+         it.
+
+     (d) I understand and agree that this project and the contribution
+         are public and that a record of the contribution (including all
+         personal information I submit with it, including my sign-off) is
+         maintained indefinitely and may be redistributed consistent with
+         this project or the open source license(s) involved.
+                                    </literallayout>
+                                    </para></listitem>
+                                <listitem><para>
+                                    Provide a single-line summary of the change.
+                                    and,
+                                    if more explanation is needed, provide more
+                                    detail in the body of the commit.
+                                    This summary is typically viewable in the
+                                    "shortlist" of changes.
+                                    Thus, providing something short and descriptive
+                                    that gives the reader a summary of the change is
+                                    useful when viewing a list of many commits.
+                                    You should prefix this short description with the
+                                    recipe name (if changing a recipe), or else with
+                                    the short form path to the file being changed.
+                                    </para></listitem>
+                                <listitem><para>
+                                    For the body of the commit message, provide
+                                    detailed information that describes what you
+                                    changed, why you made the change, and the approach
+                                    you used.
+                                    It might also be helpful if you mention how you
+                                    tested the change.
+                                    Provide as much detail as you can in the body of
+                                    the commit message.
+                                    <note>
+                                        You do not need to provide a more detailed
+                                        explanation of a change if the change is
+                                        minor to the point of the single line
+                                        summary providing all the information.
+                                    </note>
+                                    </para></listitem>
+                                <listitem><para>
+                                    If the change addresses a specific bug or issue
+                                    that is associated with a bug-tracking ID,
+                                    include a reference to that ID in your detailed
+                                    description.
+                                    For example, the Yocto Project uses a specific
+                                    convention for bug references - any commit that
+                                    addresses a specific bug should use the following
+                                    form for the detailed description.
+                                    Be sure to use the actual bug-tracking ID from
+                                    Bugzilla for
+                                    <replaceable>bug-id</replaceable>:
+                                    <literallayout class='monospaced'>
+     Fixes [YOCTO #<replaceable>bug-id</replaceable>]
+
+     <replaceable>detailed description of change</replaceable>
+                                    </literallayout>
+                                    </para></listitem>
+                            </itemizedlist>
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Push Your Commits to a "Contrib" Upstream:</emphasis>
+                            If you have arranged for permissions to push to an
+                            upstream contrib repository, push the change to that
+                            repository:
+                            <literallayout class='monospaced'>
+     $ git push <replaceable>upstream_remote_repo</replaceable> <replaceable>local_branch_name</replaceable>
+                            </literallayout>
+                            For example, suppose you have permissions to push into the
+                            upstream <filename>meta-intel-contrib</filename>
+                            repository and you are working in a local branch named
+                            <replaceable>your_name</replaceable><filename>/README</filename>.
+                            The following command pushes your local commits to the
+                            <filename>meta-intel-contrib</filename> upstream
+                            repository and puts the commit in a branch named
+                            <replaceable>your_name</replaceable><filename>/README</filename>:
+                            <literallayout class='monospaced'>
+     $ git push meta-intel-contrib <replaceable>your_name</replaceable>/README
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para id='push-determine-who-to-notify'>
+                            <emphasis>Determine Who to Notify:</emphasis>
+                            Determine the maintainer or the mailing list
+                            that you need to notify for the change.</para>
+
+                            <para>Before submitting any change, you need to be sure
+                            who the maintainer is or what mailing list that you need
+                            to notify.
+                            Use either these methods to find out:
+                            <itemizedlist>
+                                <listitem><para>
+                                    <emphasis>Maintenance File:</emphasis>
+                                    Examine the <filename>maintainers.inc</filename>
+                                    file, which is located in the
+                                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                                    at
+                                    <filename>meta/conf/distro/include</filename>,
+                                    to see who is responsible for code.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <emphasis>Search by File:</emphasis>
+                                    Using <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>,
+                                    you can enter the following command to bring up a
+                                    short list of all commits against a specific file:
+                                    <literallayout class='monospaced'>
+     git shortlog -- <replaceable>filename</replaceable>
+                                    </literallayout>
+                                    Just provide the name of the file for which you
+                                    are interested.
+                                    The information returned is not ordered by history
+                                    but does include a list of everyone who has
+                                    committed grouped by name.
+                                    From the list, you can see who is responsible for
+                                    the bulk of the changes against the file.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <emphasis>Examine the List of Mailing Lists:</emphasis>
+                                    For a list of the Yocto Project and related mailing
+                                    lists, see the
+                                    "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>"
+                                    section in the Yocto Project Reference Manual.
+                                    </para></listitem>
+                            </itemizedlist>
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Make a Pull Request:</emphasis>
+                            Notify the maintainer or the mailing list that you have
+                            pushed a change by making a pull request.</para>
+
+                            <para>The Yocto Project provides two scripts that
+                            conveniently let you generate and send pull requests to the
+                            Yocto Project.
+                            These scripts are <filename>create-pull-request</filename>
+                            and <filename>send-pull-request</filename>.
+                            You can find these scripts in the
+                            <filename>scripts</filename> directory within the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                            (e.g. <filename>~/poky/scripts</filename>).
+                            </para>
+
+                            <para>Using these scripts correctly formats the requests
+                            without introducing any whitespace or HTML formatting.
+                            The maintainer that receives your patches either directly
+                            or through the mailing list needs to be able to save and
+                            apply them directly from your emails.
+                            Using these scripts is the preferred method for sending
+                            patches.</para>
+
+                            <para>First, create the pull request.
+                            For example, the following command runs the script,
+                            specifies the upstream repository in the contrib directory
+                            into which you pushed the change, and provides a subject
+                            line in the created patch files:
+                            <literallayout class='monospaced'>
+     $ ~/poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README"
+                            </literallayout>
+                            Running this script forms
+                            <filename>*.patch</filename> files in a folder named
+                            <filename>pull-</filename><replaceable>PID</replaceable>
+                            in the current directory.
+                            One of the patch files is a cover letter.</para>
+
+                            <para>Before running the
+                            <filename>send-pull-request</filename> script, you must
+                            edit the cover letter patch to insert information about
+                            your change.
+                            After editing the cover letter, send the pull request.
+                            For example, the following command runs the script and
+                            specifies the patch directory and email address.
+                            In this example, the email address is a mailing list:
+                            <literallayout class='monospaced'>
+     $ ~/poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@yoctoproject.org
+                            </literallayout>
+                            You need to follow the prompts as the script is
+                            interactive.
+                            <note>
+                                For help on using these scripts, simply provide the
+                                <filename>-h</filename> argument as follows:
+                                <literallayout class='monospaced'>
+     $ poky/scripts/create-pull-request -h
+     $ poky/scripts/send-pull-request -h
+                                </literallayout>
+                            </note>
+                            </para></listitem>
+                    </orderedlist>
+                </para>
+            </section>
+
+            <section id='submitting-a-patch'>
+                <title>Using Email to Submit a Patch</title>
+
+                <para>
+                    You can submit patches without using the
+                    <filename>create-pull-request</filename> and
+                    <filename>send-pull-request</filename> scripts described in the
+                    previous section.
+                    However, keep in mind, the preferred method is to use the scripts.
+                </para>
+
+                <para>
+                    Depending on the components changed, you need to submit the email
+                    to a specific mailing list.
+                    For some guidance on which mailing list to use, see the
+                    <link linkend='figuring-out-the-mailing-list-to-use'>list</link>
+                    at the beginning of this section.
+                    For a description of all the available mailing lists, see the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
+                    section in the Yocto Project Reference Manual.
+                </para>
+
+                <para>
+                    Here is the general procedure on how to submit a patch through
+                    email without using the scripts:
+                    <orderedlist>
+                        <listitem><para>
+                            <emphasis>Make Your Changes Locally:</emphasis>
+                            Make your changes in your local Git repository.
+                            You should make small, controlled, isolated changes.
+                            Keeping changes small and isolated aids review,
+                            makes merging/rebasing easier and keeps the change
+                            history clean should anyone need to refer to it in
+                            future.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Stage Your Changes:</emphasis>
+                            Stage your changes by using the <filename>git add</filename>
+                            command on each file you changed.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Commit Your Changes:</emphasis>
+                            Commit the change by using the
+                            <filename>git commit --signoff</filename> command.
+                            Using the <filename>--signoff</filename> option identifies
+                            you as the person making the change and also satisfies
+                            the Developer's Certificate of Origin (DCO) shown earlier.
+                            </para>
+
+                            <para>When you form a commit, you must follow certain
+                            standards established by the Yocto Project development
+                            team.
+                            See
+                            <link linkend='making-sure-you-have-correct-commit-information'>Step 3</link>
+                            in the previous section for information on how to
+                            provide commit information that meets Yocto Project
+                            commit message standards.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Format the Commit:</emphasis>
+                            Format the commit into an email message.
+                            To format commits, use the
+                            <filename>git format-patch</filename> command.
+                            When you provide the command, you must include a revision
+                            list or a number of patches as part of the command.
+                            For example, either of these two commands takes your most
+                            recent single commit and formats it as an email message in
+                            the current directory:
+                            <literallayout class='monospaced'>
+     $ git format-patch -1
+                            </literallayout>
+                            or
+                            <literallayout class='monospaced'>
+     $ git format-patch HEAD~
+                            </literallayout></para>
+
+                            <para>After the command is run, the current directory
+                            contains a numbered <filename>.patch</filename> file for
+                            the commit.</para>
+
+                            <para>If you provide several commits as part of the
+                            command, the <filename>git format-patch</filename> command
+                            produces a series of numbered files in the current
+                            directory – one for each commit.
+                            If you have more than one patch, you should also use the
+                            <filename>--cover</filename> option with the command,
+                            which generates a cover letter as the first "patch" in
+                            the series.
+                            You can then edit the cover letter to provide a
+                            description for the series of patches.
+                            For information on the
+                            <filename>git format-patch</filename> command,
+                            see <filename>GIT_FORMAT_PATCH(1)</filename> displayed
+                            using the <filename>man git-format-patch</filename>
+                            command.
+                            <note>
+                                If you are or will be a frequent contributor to the
+                                Yocto Project or to OpenEmbedded, you might consider
+                                requesting a contrib area and the necessary associated
+                                rights.
+                            </note>
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Import the Files Into Your Mail Client:</emphasis>
+                            Import the files into your mail client by using the
+                            <filename>git send-email</filename> command.
+                            <note>
+                                In order to use <filename>git send-email</filename>,
+                                you must have the proper Git packages installed on
+                                your host.
+                                For Ubuntu, Debian, and Fedora the package is
+                                <filename>git-email</filename>.
+                            </note></para>
+
+                            <para>The <filename>git send-email</filename> command
+                            sends email by using a local or remote Mail Transport Agent
+                            (MTA) such as <filename>msmtp</filename>,
+                            <filename>sendmail</filename>, or through a direct
+                            <filename>smtp</filename> configuration in your Git
+                            <filename>~/.gitconfig</filename> file.
+                            If you are submitting patches through email only, it is
+                            very important that you submit them without any whitespace
+                            or HTML formatting that either you or your mailer
+                            introduces.
+                            The maintainer that receives your patches needs to be able
+                            to save and apply them directly from your emails.
+                            A good way to verify that what you are sending will be
+                            applicable by the maintainer is to do a dry run and send
+                            them to yourself and then save and apply them as the
+                            maintainer would.</para>
+
+                            <para>The <filename>git send-email</filename> command is
+                            the preferred method for sending your patches using
+                            email since there is no risk of compromising whitespace
+                            in the body of the message, which can occur when you use
+                            your own mail client.
+                            The command also has several options that let you
+                            specify recipients and perform further editing of the
+                            email message.
+                            For information on how to use the
+                            <filename>git send-email</filename> command,
+                            see <filename>GIT-SEND-EMAIL(1)</filename> displayed using
+                            the <filename>man git-send-email</filename> command.
+                            </para></listitem>
+                    </orderedlist>
+                </para>
+            </section>
+        </section>
+    </section>
+
+    <section id='working-with-licenses'>
+        <title>Working With Licenses</title>
+
+        <para>
+            As mentioned in the
+            "<ulink url='&YOCTO_DOCS_OM_URL;#licensing'>Licensing</ulink>"
+            section in the Yocto Project Overview and Concepts Manual,
+            open source projects are open to the public and they
+            consequently have different licensing structures in place.
+            This section describes the mechanism by which the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+            tracks changes to licensing text and covers how to maintain open
+            source license compliance during your project's lifecycle.
+            The section also describes how to enable commercially licensed
+            recipes, which by default are disabled.
+        </para>
+
+        <section id="usingpoky-configuring-LIC_FILES_CHKSUM">
+            <title>Tracking License Changes</title>
+
+            <para>
+                The license of an upstream project might change in the future.
+                In order to prevent these changes going unnoticed, the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
+                variable tracks changes to the license text. The checksums are
+                validated at the end of the configure step, and if the
+                checksums do not match, the build will fail.
+            </para>
+
+            <section id="usingpoky-specifying-LIC_FILES_CHKSUM">
+                <title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
+
+                <para>
+                    The <filename>LIC_FILES_CHKSUM</filename>
+                    variable contains checksums of the license text in the
+                    source code for the recipe.
+                    Following is an example of how to specify
+                    <filename>LIC_FILES_CHKSUM</filename>:
+                    <literallayout class='monospaced'>
+     LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
+                         file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
+                         file://licfile2.txt;endline=50;md5=zzzz \
+                         ..."
+                    </literallayout>
+                    <note><title>Notes</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                When using "beginline" and "endline", realize
+                                that line numbering begins with one and not
+                                zero.
+                                Also, the included lines are inclusive (i.e.
+                                lines five through and including 29 in the
+                                previous example for
+                                <filename>licfile1.txt</filename>).
+                                </para></listitem>
+                            <listitem><para>
+                                When a license check fails, the selected license
+                                text is included as part of the QA message.
+                                Using this output, you can determine the exact
+                                start and finish for the needed license text.
+                                </para></listitem>
+                        </itemizedlist>
+                    </note>
+                </para>
+
+                <para>
+                    The build system uses the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
+                    variable as the default directory when searching files
+                    listed in <filename>LIC_FILES_CHKSUM</filename>.
+                    The previous example employs the default directory.
+                </para>
+
+                <para>
+                    Consider this next example:
+                    <literallayout class='monospaced'>
+     LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
+                                         md5=bb14ed3c4cda583abc85401304b5cd4e"
+     LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
+                    </literallayout>
+                </para>
+
+                <para>
+                    The first line locates a file in
+                    <filename>${S}/src/ls.c</filename> and isolates lines five
+                    through 16 as license text.
+                    The second line refers to a file in
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.
+                </para>
+
+                <para>
+                    Note that <filename>LIC_FILES_CHKSUM</filename> variable is
+                    mandatory for all recipes, unless the
+                    <filename>LICENSE</filename> variable is set to "CLOSED".
+                </para>
+            </section>
+
+            <section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
+                <title>Explanation of Syntax</title>
+
+                <para>
+                    As mentioned in the previous section, the
+                    <filename>LIC_FILES_CHKSUM</filename> variable lists all
+                    the important files that contain the license text for the
+                    source code.
+                    It is possible to specify a checksum for an entire file,
+                    or a specific section of a file (specified by beginning and
+                    ending line numbers with the "beginline" and "endline"
+                    parameters, respectively).
+                    The latter is useful for source files with a license
+                    notice header, README documents, and so forth.
+                    If you do not use the "beginline" parameter, then it is
+                    assumed that the text begins on the first line of the file.
+                    Similarly, if you do not use the "endline" parameter,
+                    it is assumed that the license text ends with the last
+                    line of the file.
+                </para>
+
+                <para>
+                    The "md5" parameter stores the md5 checksum of the license
+                    text.
+                    If the license text changes in any way as compared to
+                    this parameter then a mismatch occurs.
+                    This mismatch triggers a build failure and notifies
+                    the developer.
+                    Notification allows the developer to review and address
+                    the license text changes.
+                    Also note that if a mismatch occurs during the build,
+                    the correct md5 checksum is placed in the build log and
+                    can be easily copied to the recipe.
+                </para>
+
+                <para>
+                    There is no limit to how many files you can specify using
+                    the <filename>LIC_FILES_CHKSUM</filename> variable.
+                    Generally, however, every project requires a few
+                    specifications for license tracking.
+                    Many projects have a "COPYING" file that stores the
+                    license information for all the source code files.
+                    This practice allows you to just track the "COPYING"
+                    file as long as it is kept up to date.
+                    <note><title>Tips</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                If you specify an empty or invalid "md5"
+                                parameter,
+                                <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+                                returns an md5 mis-match
+                                error and displays the correct "md5" parameter
+                                value during the build.
+                                The correct parameter is also captured in
+                                the build log.
+                                </para></listitem>
+                            <listitem><para>
+                                If the whole file contains only license text,
+                                you do not need to use the "beginline" and
+                               "endline" parameters.
+                               </para></listitem>
+                        </itemizedlist>
+                    </note>
+                </para>
+            </section>
+        </section>
+
+        <section id="enabling-commercially-licensed-recipes">
+            <title>Enabling Commercially Licensed Recipes</title>
+
+            <para>
+                By default, the OpenEmbedded build system disables
+                components that have commercial or other special licensing
+                requirements.
+                Such requirements are defined on a
+                recipe-by-recipe basis through the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></ulink>
+                variable definition in the affected recipe.
+                For instance, the
+                <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
+                recipe contains the following statement:
                 <literallayout class='monospaced'>
+     LICENSE_FLAGS = "commercial"
+                </literallayout>
+                Here is a slightly more complicated example that contains both
+                an explicit recipe name and version (after variable expansion):
+                <literallayout class='monospaced'>
+     LICENSE_FLAGS = "license_${PN}_${PV}"
+                </literallayout>
+	            In order for a component restricted by a
+                <filename>LICENSE_FLAGS</filename> definition to be enabled and
+                included in an image, it needs to have a matching entry in the
+                global
+	            <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></ulink>
+                variable, which is a variable typically defined in your
+                <filename>local.conf</filename> file.
+                For example, to enable the
+                <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
+	            package, you could add either the string
+	            "commercial_gst-plugins-ugly" or the more general string
+	            "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
+                See the
+                "<link linkend='license-flag-matching'>License Flag Matching</link>"
+                section for a full
+                explanation of how <filename>LICENSE_FLAGS</filename> matching
+                works.
+                Here is the example:
+                <literallayout class='monospaced'>
+     LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
+                </literallayout>
+	            Likewise, to additionally enable the package built from the
+                recipe containing
+	            <filename>LICENSE_FLAGS = "license_${PN}_${PV}"</filename>,
+                and assuming that the actual recipe name was
+                <filename>emgd_1.10.bb</filename>, the following string would
+                enable that package as well as the original
+                <filename>gst-plugins-ugly</filename> package:
+                <literallayout class='monospaced'>
+     LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10"
+                </literallayout>
+	            As a convenience, you do not need to specify the complete
+                license string in the whitelist for every package.
+                You can use an abbreviated form, which consists
+                of just the first portion or portions of the license
+                string before the initial underscore character or characters.
+                A partial string will match any license that contains the
+                given string as the first portion of its license.
+                For example, the following whitelist string will also match
+                both of the packages previously mentioned as well as any other
+                packages that have licenses starting with "commercial" or
+                "license".
+                <literallayout class='monospaced'>
+     LICENSE_FLAGS_WHITELIST = "commercial license"
+                </literallayout>
+            </para>
+
+            <section id="license-flag-matching">
+                <title>License Flag Matching</title>
+
+                <para>
+		            License flag matching allows you to control what recipes
+                    the OpenEmbedded build system includes in the build.
+                    Fundamentally, the build system attempts to match
+                    <filename>LICENSE_FLAGS</filename> strings found in recipes
+                    against <filename>LICENSE_FLAGS_WHITELIST</filename>
+                    strings found in the whitelist.
+                    A match causes the build system to include a recipe in the
+                    build, while failure to find a match causes the build
+                    system to exclude a recipe.
+                </para>
+
+                <para>
+                    In general, license flag matching is simple.
+                    However, understanding some concepts will help you
+                    correctly and effectively use matching.
+                </para>
+
+                <para>
+                    Before a flag
+                    defined by a particular recipe is tested against the
+                    contents of the whitelist, the expanded string
+                    <filename>_${PN}</filename> is appended to the flag.
+                    This expansion makes each
+                    <filename>LICENSE_FLAGS</filename> value recipe-specific.
+                    After expansion, the string is then matched against the
+                    whitelist.
+                    Thus, specifying
+                    <filename>LICENSE_FLAGS = "commercial"</filename>
+                    in recipe "foo", for example, results in the string
+                    <filename>"commercial_foo"</filename>.
+                    And, to create a match, that string must appear in the
+                    whitelist.
+                </para>
+
+                <para>
+                    Judicious use of the <filename>LICENSE_FLAGS</filename>
+                    strings and the contents of the
+                    <filename>LICENSE_FLAGS_WHITELIST</filename> variable
+                    allows you a lot of flexibility for including or excluding
+                    recipes based on licensing.
+                    For example, you can broaden the matching capabilities by
+                    using license flags string subsets in the whitelist.
+                    <note>
+                        When using a string subset, be sure to use the part of
+                        the expanded string that precedes the appended
+                        underscore character (e.g.
+                        <filename>usethispart_1.3</filename>,
+                        <filename>usethispart_1.4</filename>, and so forth).
+                    </note>
+                    For example, simply specifying the string "commercial" in
+                    the whitelist matches any expanded
+                    <filename>LICENSE_FLAGS</filename> definition that starts
+                    with the string "commercial" such as "commercial_foo" and
+                    "commercial_bar", which are the strings the build system
+                    automatically generates for hypothetical recipes named
+                    "foo" and "bar" assuming those recipes simply specify the
+                    following:
+                    <literallayout class='monospaced'>
+     LICENSE_FLAGS = "commercial"
+                    </literallayout>
+                    Thus, you can choose to exhaustively
+                    enumerate each license flag in the whitelist and
+                    allow only specific recipes into the image, or
+                    you can use a string subset that causes a broader range of
+                    matches to allow a range of recipes into the image.
+                </para>
+
+                <para>
+                    This scheme works even if the
+                    <filename>LICENSE_FLAGS</filename> string already
+                    has <filename>_${PN}</filename> appended.
+                    For example, the build system turns the license flag
+                    "commercial_1.2_foo" into "commercial_1.2_foo_foo" and
+                    would match both the general "commercial" and the specific
+                    "commercial_1.2_foo" strings found in the whitelist, as
+                    expected.
+                </para>
+
+                <para>
+                    Here are some other scenarios:
+                    <itemizedlist>
+                        <listitem><para>
+                            You can specify a versioned string in the recipe
+                            such as "commercial_foo_1.2" in a "foo" recipe.
+                            The build system expands this string to
+                            "commercial_foo_1.2_foo".
+                            Combine this license flag with a whitelist that has
+                            the string "commercial" and you match the flag
+                            along with any other flag that starts with the
+                            string "commercial".
+                            </para></listitem>
+                        <listitem><para>
+                            Under the same circumstances, you can use
+                            "commercial_foo" in the whitelist and the build
+                            system not only matches "commercial_foo_1.2" but
+                            also matches any license flag with the string
+                            "commercial_foo", regardless of the version.
+                            </para></listitem>
+                        <listitem><para>
+                            You can be very specific and use both the
+                            package and version parts in the whitelist (e.g.
+                            "commercial_foo_1.2") to specifically match a
+                            versioned recipe.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id="other-variables-related-to-commercial-licenses">
+                <title>Other Variables Related to Commercial Licenses</title>
+
+                <para>
+                    Other helpful variables related to commercial
+                    license handling exist and are defined in the
+                    <filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
+                    <literallayout class='monospaced'>
+     COMMERCIAL_AUDIO_PLUGINS ?= ""
+     COMMERCIAL_VIDEO_PLUGINS ?= ""
+                    </literallayout>
+                    If you want to enable these components, you can do so by
+                    making sure you have statements similar to the following
+                    in your <filename>local.conf</filename> configuration file:
+                    <literallayout class='monospaced'>
+     COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \
+        gst-plugins-ugly-mpegaudioparse"
+     COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
+        gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
+     LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
+                    </literallayout>
+                    Of course, you could also create a matching whitelist
+                    for those components using the more general "commercial"
+                    in the whitelist, but that would also enable all the
+                    other packages with <filename>LICENSE_FLAGS</filename>
+                    containing "commercial", which you may or may not want:
+                    <literallayout class='monospaced'>
+     LICENSE_FLAGS_WHITELIST = "commercial"
+                    </literallayout>
+                </para>
+
+                <para>
+                    Specifying audio and video plug-ins as part of the
+                    <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
+                    <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
+                    (along with the enabling
+                    <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
+                    plug-ins or components into built images, thus adding
+                    support for media formats or components.
+                </para>
+            </section>
+        </section>
+
+        <section id='maintaining-open-source-license-compliance-during-your-products-lifecycle'>
+            <title>Maintaining Open Source License Compliance During Your Product's Lifecycle</title>
+
+            <para>
+                One of the concerns for a development organization using open source
+                software is how to maintain compliance with various open source
+                licensing during the lifecycle of the product.
+                While this section does not provide legal advice or
+                comprehensively cover all scenarios, it does
+                present methods that you can use to
+                assist you in meeting the compliance requirements during a software
+                release.
+            </para>
+
+            <para>
+                With hundreds of different open source licenses that the Yocto
+                Project tracks, it is difficult to know the requirements of each
+                and every license.
+                However, the requirements of the major FLOSS licenses can begin
+                to be covered by
+                assuming that three main areas of concern exist:
+                <itemizedlist>
+                    <listitem><para>Source code must be provided.</para></listitem>
+                    <listitem><para>License text for the software must be
+                        provided.</para></listitem>
+                    <listitem><para>Compilation scripts and modifications to the
+                        source code must be provided.
+                        </para></listitem>
+                </itemizedlist>
+                There are other requirements beyond the scope of these
+                three and the methods described in this section
+                (e.g. the mechanism through which source code is distributed).
+            </para>
+
+            <para>
+                As different organizations have different methods of complying with
+                open source licensing, this section is not meant to imply that
+                there is only one single way to meet your compliance obligations,
+                but rather to describe one method of achieving compliance.
+                The remainder of this section describes methods supported to meet the
+                previously mentioned three requirements.
+                Once you take steps to meet these requirements,
+                and prior to releasing images, sources, and the build system,
+                you should audit all artifacts to ensure completeness.
+                <note>
+                    The Yocto Project generates a license manifest during
+                    image creation that is located
+                    in <filename>${DEPLOY_DIR}/licenses/<replaceable>image_name-datestamp</replaceable></filename>
+                    to assist with any audits.
+                </note>
+            </para>
+
+            <section id='providing-the-source-code'>
+                <title>Providing the Source Code</title>
+
+                <para>
+                    Compliance activities should begin before you generate the
+                    final image.
+                    The first thing you should look at is the requirement that
+                    tops the list for most compliance groups - providing
+                    the source.
+                    The Yocto Project has a few ways of meeting this
+                    requirement.
+                </para>
+
+                <para>
+                    One of the easiest ways to meet this requirement is
+                    to provide the entire
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
+                    used by the build.
+                    This method, however, has a few issues.
+                    The most obvious is the size of the directory since it includes
+                    all sources used in the build and not just the source used in
+                    the released image.
+                    It will include toolchain source, and other artifacts, which
+                    you would not generally release.
+                    However, the more serious issue for most companies is accidental
+                    release of proprietary software.
+                    The Yocto Project provides an
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-archiver'><filename>archiver</filename></ulink>
+                    class to help avoid some of these concerns.
+                </para>
+
+                <para>
+                    Before you employ <filename>DL_DIR</filename> or the
+                    <filename>archiver</filename> class, you need to decide how
+                    you choose to provide source.
+                    The source <filename>archiver</filename> class can generate
+                    tarballs and SRPMs and can create them with various levels of
+                    compliance in mind.
+                </para>
+
+                <para>
+                    One way of doing this (but certainly not the only way) is to
+                    release just the source as a tarball.
+                    You can do this by adding the following to the
+                    <filename>local.conf</filename> file found in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
+                    <literallayout class='monospaced'>
      INHERIT += "archiver"
      ARCHIVER_MODE[src] = "original"
-                </literallayout>
-                During the creation of your image, the source from all
-                recipes that deploy packages to the image is placed within
-                subdirectories of
-                <filename>DEPLOY_DIR/sources</filename> based on the
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
-                for each recipe.
-                Releasing the entire directory enables you to comply with
-                requirements concerning providing the unmodified source.
-                It is important to note that the size of the directory can
-                get large.
-            </para>
+                    </literallayout>
+                    During the creation of your image, the source from all
+                    recipes that deploy packages to the image is placed within
+                    subdirectories of
+                    <filename>DEPLOY_DIR/sources</filename> based on the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
+                    for each recipe.
+                    Releasing the entire directory enables you to comply with
+                    requirements concerning providing the unmodified source.
+                    It is important to note that the size of the directory can
+                    get large.
+                </para>
 
-            <para>
-                A way to help mitigate the size issue is to only release
-                tarballs for licenses that require the release of
-                source.
-                Let us assume you are only concerned with GPL code as
-                identified by running the following script:
-                <literallayout class='monospaced'>
+                <para>
+                    A way to help mitigate the size issue is to only release
+                    tarballs for licenses that require the release of
+                    source.
+                    Let us assume you are only concerned with GPL code as
+                    identified by running the following script:
+                    <literallayout class='monospaced'>
      # Script to archive a subset of packages matching specific license(s)
      # Source and license files are copied into sub folders of package folder
      # Must be run from build folder
@@ -10515,96 +14941,97 @@
               cp tmp/deploy/licenses/$p/* $src_release_dir/$p/license 2> /dev/null
            fi
         done
-     done                </literallayout>
-                At this point, you could create a tarball from the
-                <filename>gpl_source_release</filename> directory and
-                provide that to the end user.
-                This method would be a step toward achieving compliance
-                with section 3a of GPLv2 and with section 6 of GPLv3.
-            </para>
-        </section>
+     done
+                    </literallayout>
+                    At this point, you could create a tarball from the
+                    <filename>gpl_source_release</filename> directory and
+                    provide that to the end user.
+                    This method would be a step toward achieving compliance
+                    with section 3a of GPLv2 and with section 6 of GPLv3.
+                </para>
+            </section>
 
-        <section id='providing-license-text'>
-            <title>Providing License Text</title>
+            <section id='providing-license-text'>
+                <title>Providing License Text</title>
 
-            <para>
-                One requirement that is often overlooked is inclusion
-                of license text.
-                This requirement also needs to be dealt with prior to
-                generating the final image.
-                Some licenses require the license text to accompany
-                the binary.
-                You can achieve this by adding the following to your
-                <filename>local.conf</filename> file:
-                <literallayout class='monospaced'>
+                <para>
+                    One requirement that is often overlooked is inclusion
+                    of license text.
+                    This requirement also needs to be dealt with prior to
+                    generating the final image.
+                    Some licenses require the license text to accompany
+                    the binary.
+                    You can achieve this by adding the following to your
+                    <filename>local.conf</filename> file:
+                    <literallayout class='monospaced'>
      COPY_LIC_MANIFEST = "1"
      COPY_LIC_DIRS = "1"
      LICENSE_CREATE_PACKAGE = "1"
-                </literallayout>
-                Adding these statements to the configuration file ensures
-                that the licenses collected during package generation
-                are included on your image.
-                <note>
-                    <para>Setting all three variables to "1" results in the
-                    image having two copies of the same license file.
-                    One copy resides in
-                    <filename>/usr/share/common-licenses</filename> and
-                    the other resides in
-                    <filename>/usr/share/license</filename>.</para>
+                    </literallayout>
+                    Adding these statements to the configuration file ensures
+                    that the licenses collected during package generation
+                    are included on your image.
+                    <note>
+                        <para>Setting all three variables to "1" results in the
+                        image having two copies of the same license file.
+                        One copy resides in
+                        <filename>/usr/share/common-licenses</filename> and
+                        the other resides in
+                        <filename>/usr/share/license</filename>.</para>
 
-                    <para>The reason for this behavior is because
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></ulink>
-                    and
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></ulink>
-                    add a copy of the license when the image is built but do
-                    not offer a path for adding licenses for newly installed
-                    packages to an image.
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></ulink>
-                    adds a separate package and an upgrade path for adding
-                    licenses to an image.</para>
-                </note>
-            </para>
+                        <para>The reason for this behavior is because
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></ulink>
+                        and
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></ulink>
+                        add a copy of the license when the image is built but do
+                        not offer a path for adding licenses for newly installed
+                        packages to an image.
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></ulink>
+                        adds a separate package and an upgrade path for adding
+                        licenses to an image.</para>
+                    </note>
+                </para>
 
-            <para>
-                As the source <filename>archiver</filename> class has already
-                archived the original
-                unmodified source that contains the license files,
-                you would have already met the requirements for inclusion
-                of the license information with source as defined by the GPL
-                and other open source licenses.
-            </para>
-        </section>
+                <para>
+                    As the source <filename>archiver</filename> class has already
+                    archived the original
+                    unmodified source that contains the license files,
+                    you would have already met the requirements for inclusion
+                    of the license information with source as defined by the GPL
+                    and other open source licenses.
+                </para>
+            </section>
 
-        <section id='providing-compilation-scripts-and-source-code-modifications'>
-            <title>Providing Compilation Scripts and Source Code Modifications</title>
+            <section id='providing-compilation-scripts-and-source-code-modifications'>
+                <title>Providing Compilation Scripts and Source Code Modifications</title>
 
-            <para>
-                At this point, we have addressed all we need to
-                prior to generating the image.
-                The next two requirements are addressed during the final
-                packaging of the release.
-            </para>
+                <para>
+                    At this point, we have addressed all we need to
+                    prior to generating the image.
+                    The next two requirements are addressed during the final
+                    packaging of the release.
+                </para>
 
-            <para>
-                By releasing the version of the OpenEmbedded build system
-                and the layers used during the build, you will be providing both
-                compilation scripts and the source code modifications in one
-                step.
-            </para>
+                <para>
+                    By releasing the version of the OpenEmbedded build system
+                    and the layers used during the build, you will be providing both
+                    compilation scripts and the source code modifications in one
+                    step.
+                </para>
 
-            <para>
-                If the deployment team has a
-                <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP layer</ulink>
-                and a distro layer, and those those layers are used to patch,
-                compile, package, or modify (in any way) any open source
-                software included in your released images, you
-                might be required to release those layers under section 3 of
-                GPLv2 or section 1 of GPLv3.
-                One way of doing that is with a clean
-                checkout of the version of the Yocto Project and layers used
-                during your build.
-                Here is an example:
-                <literallayout class='monospaced'>
+                <para>
+                    If the deployment team has a
+                    <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP layer</ulink>
+                    and a distro layer, and those those layers are used to patch,
+                    compile, package, or modify (in any way) any open source
+                    software included in your released images, you
+                    might be required to release those layers under section 3 of
+                    GPLv2 or section 1 of GPLv3.
+                    One way of doing that is with a clean
+                    checkout of the version of the Yocto Project and layers used
+                    during your build.
+                    Here is an example:
+                    <literallayout class='monospaced'>
      # We built using the &DISTRO_NAME_NO_CAP; branch of the poky repo
      $ git clone -b &DISTRO_NAME_NO_CAP; git://git.yoctoproject.org/poky
      $ cd poky
@@ -10613,18 +15040,18 @@
      $ git clone -b release_branch git://git.mycompany.com/meta-my-software-layer
      # clean up the .git repos
      $ find . -name ".git" -type d -exec rm -rf {} \;
-                </literallayout>
-                One thing a development organization might want to consider
-                for end-user convenience is to modify
-                <filename>meta-poky/conf/bblayers.conf.sample</filename> to
-                ensure that when the end user utilizes the released build
-                system to build an image, the development organization's
-                layers are included in the <filename>bblayers.conf</filename>
-                file automatically:
-                <literallayout class='monospaced'>
-     # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+                    </literallayout>
+                    One thing a development organization might want to consider
+                    for end-user convenience is to modify
+                    <filename>meta-poky/conf/bblayers.conf.sample</filename> to
+                    ensure that when the end user utilizes the released build
+                    system to build an image, the development organization's
+                    layers are included in the <filename>bblayers.conf</filename>
+                    file automatically:
+                    <literallayout class='monospaced'>
+     # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
      # changes incompatibly
-     LCONF_VERSION = "6"
+     POKY_BBLAYERS_CONF_VERSION = "2"
 
      BBPATH = "${TOPDIR}"
      BBFILES ?= ""
@@ -10635,14 +15062,15 @@
        ##OEROOT##/meta-yocto-bsp \
        ##OEROOT##/meta-mylayer \
        "
-                </literallayout>
-                Creating and providing an archive of the
-                <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
-                layers (recipes, configuration files, and so forth)
-                enables you to meet your
-                requirements to include the scripts to control compilation
-                as well as any modifications to the original source.
-            </para>
+                    </literallayout>
+                    Creating and providing an archive of the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
+                    layers (recipes, configuration files, and so forth)
+                    enables you to meet your
+                    requirements to include the scripts to control compilation
+                    as well as any modifications to the original source.
+                </para>
+            </section>
         </section>
     </section>
 
@@ -10761,6 +15189,136 @@
             </para>
         </section>
      </section>
+
+    <section id="dev-using-wayland-and-weston">
+        <title>Using Wayland and Weston</title>
+
+        <para>
+            <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)'>Wayland</ulink>
+            is a computer display server protocol that
+            provides a method for compositing window managers to communicate
+            directly with applications and video hardware and expects them to
+            communicate with input hardware using other libraries.
+            Using Wayland with supporting targets can result in better control
+            over graphics frame rendering than an application might otherwise
+            achieve.
+        </para>
+
+        <para>
+            The Yocto Project provides the Wayland protocol libraries and the
+            reference
+            <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Weston</ulink>
+            compositor as part of its release.
+            You can find the integrated packages in the
+            <filename>meta</filename> layer of the
+            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+            Specifically, you can find the recipes that build both Wayland
+            and Weston at <filename>meta/recipes-graphics/wayland</filename>.
+        </para>
+
+        <para>
+            You can build both the Wayland and Weston packages for use only
+            with targets that accept the
+            <ulink url='https://en.wikipedia.org/wiki/Mesa_(computer_graphics)'>Mesa 3D and Direct Rendering Infrastructure</ulink>,
+            which is also known as Mesa DRI.
+            This implies that you cannot build and use the packages if your
+            target uses, for example, the
+            <trademark class='registered'>Intel</trademark> Embedded Media
+            and Graphics Driver
+            (<trademark class='registered'>Intel</trademark> EMGD) that
+            overrides Mesa DRI.
+            <note>
+                Due to lack of EGL support, Weston 1.0.3 will not run
+                directly on the emulated QEMU hardware.
+                However, this version of Weston will run under X emulation
+                without issues.
+            </note>
+        </para>
+
+        <para>
+            This section describes what you need to do to implement Wayland and
+            use the Weston compositor when building an image for a supporting
+            target.
+        </para>
+
+        <section id="enabling-wayland-in-an-image">
+            <title>Enabling Wayland in an Image</title>
+
+            <para>
+                To enable Wayland, you need to enable it to be built and enable
+                it to be included (installed) in the image.
+            </para>
+
+            <section id="enable-building">
+                <title>Building</title>
+
+                <para>
+                    To cause Mesa to build the <filename>wayland-egl</filename>
+                    platform and Weston to build Wayland with Kernel Mode
+                    Setting
+                    (<ulink url='https://wiki.archlinux.org/index.php/Kernel_Mode_Setting'>KMS</ulink>)
+                    support, include the "wayland" flag in the
+                    <ulink url="&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES"><filename>DISTRO_FEATURES</filename></ulink>
+                    statement in your <filename>local.conf</filename> file:
+                    <literallayout class='monospaced'>
+     DISTRO_FEATURES_append = " wayland"
+                    </literallayout>
+                    <note>
+                        If X11 has been enabled elsewhere, Weston will build
+                        Wayland with X11 support
+                    </note>
+                </para>
+            </section>
+
+            <section id="enable-installation-in-an-image">
+                <title>Installing</title>
+
+                <para>
+                    To install the Wayland feature into an image, you must
+                    include the following
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-CORE_IMAGE_EXTRA_INSTALL'><filename>CORE_IMAGE_EXTRA_INSTALL</filename></ulink>
+                    statement in your <filename>local.conf</filename> file:
+                    <literallayout class='monospaced'>
+     CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
+                    </literallayout>
+                </para>
+            </section>
+        </section>
+
+        <section id="running-weston">
+            <title>Running Weston</title>
+
+            <para>
+                To run Weston inside X11, enabling it as described earlier and
+                building a Sato image is sufficient.
+                If you are running your image under Sato, a Weston Launcher
+                appears in the "Utility" category.
+            </para>
+
+            <para>
+                Alternatively, you can run Weston through the command-line
+                interpretor (CLI), which is better suited for development work.
+                To run Weston under the CLI, you need to do the following after
+                your image is built:
+                <orderedlist>
+                    <listitem><para>
+                        Run these commands to export
+                        <filename>XDG_RUNTIME_DIR</filename>:
+                        <literallayout class='monospaced'>
+     mkdir -p /tmp/$USER-weston
+     chmod 0700 /tmp/$USER-weston
+     export XDG_RUNTIME_DIR=/tmp/$USER-weston
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        Launch Weston in the shell:
+                        <literallayout class='monospaced'>
+     weston
+                        </literallayout></para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+    </section>
 </chapter>
 
 <!--
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
index 47c8006..f457c80 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
@@ -16,33 +16,29 @@
             The manual groups related procedures into higher-level sections.
             Procedures can consist of high-level steps or low-level steps
             depending on the topic.
-            You can find conceptual information related to a procedure by
-            following appropriate links to the Yocto Project Reference
-            Manual.
         </para>
 
         <para>
             The following list describes what you can get from this manual:
             <itemizedlist>
                 <listitem><para>
-                    <emphasis>Setup Procedures:</emphasis>
-                    Procedures that show you how to set
-                    up a Yocto Project Development environment and how
-                    to accomplish the change workflow through logging
-                    defects and submitting changes.
+                    Procedures that help you get going with the Yocto Project.
+                    For example, procedures that show you how to set up
+                    a build host and work with the Yocto Project
+                    source repositories.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Emulation Procedures:</emphasis>
-                    Procedures that show you how to use the
-                    Yocto Project integrated QuickEMUlator (QEMU), which lets
-                    you simulate running on hardware an image you have built
-                    using the OpenEmbedded build system.
+                    Procedures that show you how to submit changes to the
+                    Yocto Project.
+                    Changes can be improvements, new features, or bug
+                    fixes.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Common Procedures:</emphasis>
                     Procedures related to "everyday" tasks you perform while
                     developing images and applications using the Yocto
                     Project.
+                    For example, procedures to create a layer, customize an
+                    image, write a new recipe, and so forth.
                     </para></listitem>
             </itemizedlist>
         </para>
@@ -51,7 +47,7 @@
             This manual will not give you the following:
             <itemizedlist>
                 <listitem><para>
-                    <emphasis>Redundant Step-by-step Instructions:</emphasis>
+                    Redundant Step-by-step Instructions:
                     For example, the
                     <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
                     manual contains detailed instructions on how to install an
@@ -59,14 +55,15 @@
                     hardware.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Reference or Conceptual Material:</emphasis>
-                    This type of material resides in an appropriate reference manual.
+                    Reference or Conceptual Material:
+                    This type of material resides in an appropriate reference
+                    manual.
                     For example, system variables are documented in the
                     <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Detailed Public Information Not Specific to the
-                    Yocto Project:</emphasis>
+                    Detailed Public Information Not Specific to the
+                    Yocto Project:
                     For example, exhaustive information on how to use the
                     Source Control Manager Git is better covered with Internet
                     searches and official Git Documentation than through the
@@ -85,9 +82,10 @@
             comprehension.
             For introductory information on the Yocto Project, see the
             <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
-            You can find an introductory to using the Yocto Project by working
-            through the
-            <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
+            If you want to build an image with no knowledge of Yocto Project
+            as a way of quickly testing it out, see the
+            <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
+            document.
         </para>
 
         <para>
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
deleted file mode 100644
index a0fbb4b..0000000
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
+++ /dev/null
@@ -1,989 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='dev-manual-newbie'>
-
-<title>The Yocto Project Open Source Development Environment</title>
-
-<section id="usingpoky-changes-collaborate">
-    <title>Setting Up a Team Yocto Project Development Environment</title>
-
-    <para>
-        It might not be immediately clear how you can use the Yocto
-        Project in a team development environment, or scale it for a large
-        team of developers.
-        One of the strengths of the Yocto Project is that it is extremely
-        flexible.
-        Thus, you can adapt it to many different use cases and scenarios.
-        However, these characteristics can cause a struggle if you are trying
-        to create a working setup that scales across a large team.
-    </para>
-
-    <para>
-        To help you understand how to set up this type of environment,
-        this section presents a procedure that gives you the information
-        to learn how to get the results you want.
-        The procedure is high-level and presents some of the project's most
-        successful experiences, practices, solutions, and available
-        technologies that work well.
-        Keep in mind, the procedure here is a starting point.
-        You can build off it and customize it to fit any
-        particular working environment and set of practices.
-        <orderedlist>
-            <listitem><para>
-                <emphasis>Determine Who is Going to be Developing:</emphasis>
-                You need to understand who is going to be doing anything
-                related to the Yocto Project and what their roles would be.
-                Making this determination is essential to completing the
-                steps two and three, which are to get your equipment together
-                and set up your development environment's hardware topology.
-                </para>
-
-                <para>The following roles exist:
-                <itemizedlist>
-                    <listitem><para>
-                        <emphasis>Application Development:</emphasis>
-                        These types of developers do application level work
-                        on top of an existing software stack.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Core System Development:</emphasis>
-                        These types of developers work on the contents of the
-                        operating system image itself.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Build Engineer:</emphasis>
-                        This type of developer manages Autobuilders and
-                        releases.
-                        Not all environments need a Build Engineer.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Test Engineer:</emphasis>
-                        This type of developer creates and manages automated
-                        tests needed to ensure all application and core
-                        system development meets desired quality standards.
-                        </para></listitem>
-                </itemizedlist>
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Gather the Hardware:</emphasis>
-                Based on the size and make-up of the team, get the hardware
-                together.
-                Any development, build, or test engineer should be using
-                a system that is running a supported Linux distribution.
-                Systems, in general, should be high performance (e.g. dual,
-                six-core Xeons with 24 Gbytes of RAM and plenty of disk space).
-                You can help ensure efficiency by having any machines used
-                for testing or that run Autobuilders be as high performance
-                as possible.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Understand the Hardware Topology of the Environment:</emphasis>
-                Now that you know how many developers and support engineers
-                are required, you can understand the topology of the
-                hardware environment.
-                The following figure shows a moderately sized Yocto Project
-                development environment.
-
-                <para role="writernotes">
-                Need figure.</para>
-
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Use Git as Your Source Control Manager (SCM):</emphasis>
-                Keeping your
-                <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
-                and any software you are developing under the
-                control of an SCM system that is compatible
-                with the OpenEmbedded build system is advisable.
-                Of the SCMs BitBake supports, the
-                Yocto Project team strongly recommends using
-                <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>.
-                Git is a distributed system that is easy to backup,
-                allows you to work remotely, and then connects back to the
-                infrastructure.
-                <note>
-                    For information about BitBake, see the
-                    <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
-                </note></para>
-
-                <para>It is relatively easy to set up Git services and create
-                infrastructure like
-                <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>,
-                which is based on server software called
-                <filename>gitolite</filename> with <filename>cgit</filename>
-                being used to generate the web interface that lets you view the
-                repositories.
-                The <filename>gitolite</filename> software identifies users
-                using SSH keys and allows branch-based
-                access controls to repositories that you can control as little
-                or as much as necessary.
-
-                <note>
-                   The setup of these services is beyond the scope of this
-                   manual.
-                   However, sites such as these exist that describe how to
-                   perform setup:
-                   <itemizedlist>
-                       <listitem><para>
-                           <ulink url='http://git-scm.com/book/ch4-8.html'>Git documentation</ulink>:
-                           Describes how to install <filename>gitolite</filename>
-                           on the server.
-                           </para></listitem>
-                       <listitem><para>
-                           <ulink url='http://sitaramc.github.com/gitolite/master-toc.html'>The <filename>gitolite</filename> master index</ulink>:
-                            All topics for <filename>gitolite</filename>.
-                            </para></listitem>
-                        <listitem><para>
-                            <ulink url='https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools'>Interfaces, frontends, and tools</ulink>:
-                            Documentation on how to create interfaces and frontends
-                            for Git.
-                            </para></listitem>
-                    </itemizedlist>
-                </note>
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Set up the Application Development Machines:</emphasis>
-                As mentioned earlier, application developers are creating
-                applications on top of existing software stacks.
-                Following are some best practices for setting up machines
-                that do application development:
-                <itemizedlist>
-                    <listitem><para>
-                        Use a pre-built toolchain that
-                        contains the software stack itself.
-                        Then, develop the application code on top of the
-                        stack.
-                        This method works well for small numbers of relatively
-                        isolated applications.
-                        </para></listitem>
-                    <listitem><para>
-                        When possible, use the Yocto Project
-                        plug-in for the
-                        <trademark class='trade'>Eclipse</trademark> IDE
-                        and SDK development practices.
-                        For more information, see the
-                        "<ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>"
-                        manual.
-                        </para></listitem>
-                    <listitem><para>
-                        Keep your cross-development toolchains updated.
-                        You can do this through provisioning either as new
-                        toolchain downloads or as updates through a package
-                        update mechanism using <filename>opkg</filename>
-                        to provide updates to an existing toolchain.
-                        The exact mechanics of how and when to do this are a
-                        question for local policy.
-                        </para></listitem>
-                    <listitem><para>
-                        Use multiple toolchains installed locally
-                        into different locations to allow development across
-                        versions.
-                        </para></listitem>
-                </itemizedlist>
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Set up the Core Development Machines:</emphasis>
-                As mentioned earlier, these types of developers work on the
-                contents of the operating system itself.
-                Following are some best practices for setting up machines
-                used for developing images:
-                <itemizedlist>
-                    <listitem><para>
-                        Have the Yocto Project build system itself available on
-                        the developer workstations so developers can run their own
-                        builds and directly rebuild the software stack.
-                        </para></listitem>
-                    <listitem><para>
-                        Keep the core system unchanged as much as
-                        possible and do your work in layers on top of the
-                        core system.
-                        Doing so gives you a greater level of portability when
-                        upgrading to new versions of the core system or Board
-                        Support Packages (BSPs).
-                        </para></listitem>
-                    <listitem><para>
-                        Share layers amongst the developers of a
-                        particular project and contain the policy configuration
-                        that defines the project.
-                        </para></listitem>
-                </itemizedlist>
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Set up an Autobuilder:</emphasis>
-                Autobuilders are often the core of the development
-                environment.
-                It is here that changes from individual developers are brought
-                together and centrally tested and subsequent decisions about
-                releases can be made.
-                Autobuilders also allow for "continuous integration" style
-                testing of software components and regression identification
-                and tracking.</para>
-
-                <para>See "<ulink url='http://autobuilder.yoctoproject.org'>Yocto Project Autobuilder</ulink>"
-                for more information and links to buildbot.
-                The Yocto Project team has found this implementation
-                works well in this role.
-                A public example of this is the Yocto Project
-                Autobuilders, which we use to test the overall health of the
-                project.</para>
-
-                <para>The features of this system are:
-                <itemizedlist>
-                    <listitem><para>
-                         Highlights when commits break the build.
-                         </para></listitem>
-                    <listitem><para>
-                        Populates an sstate cache from which
-                        developers can pull rather than requiring local
-                        builds.
-                        </para></listitem>
-                    <listitem><para>
-                        Allows commit hook triggers,
-                        which trigger builds when commits are made.
-                        </para></listitem>
-                    <listitem><para>
-                        Allows triggering of automated image booting
-                        and testing under the QuickEMUlator (QEMU).
-                        </para></listitem>
-                    <listitem><para>
-                        Supports incremental build testing and
-                        from-scratch builds.
-                        </para></listitem>
-                    <listitem><para>
-                        Shares output that allows developer
-                        testing and historical regression investigation.
-                        </para></listitem>
-                    <listitem><para>
-                        Creates output that can be used for releases.
-                        </para></listitem>
-                    <listitem><para>
-                        Allows scheduling of builds so that resources
-                        can be used efficiently.
-                        </para></listitem>
-               </itemizedlist>
-               </para></listitem>
-           <listitem><para>
-               <emphasis>Set up Test Machines:</emphasis>
-               Use a small number of shared, high performance systems
-               for testing purposes.
-               Developers can use these systems for wider, more
-               extensive testing while they continue to develop
-               locally using their primary development system.
-               </para></listitem>
-           <listitem><para>
-               <emphasis>Document Policies and Change Flow:</emphasis>
-               The Yocto Project itself uses a hierarchical structure and a
-                pull model.
-                Scripts exist to create and send pull requests
-                (i.e. <filename>create-pull-request</filename> and
-                <filename>send-pull-request</filename>).
-                This model is in line with other open source projects where
-                maintainers are responsible for specific areas of the project
-                and a single maintainer handles the final "top-of-tree" merges.
-                <note>
-                    You can also use a more collective push model.
-                    The <filename>gitolite</filename> software supports both the
-                    push and pull models quite easily.
-                </note></para>
-
-                <para>As with any development environment, it is important
-                to document the policy used as well as any main project
-                guidelines so they are understood by everyone.
-                It is also a good idea to have well structured
-                commit messages, which are usually a part of a project's
-                guidelines.
-                Good commit messages are essential when looking back in time and
-                trying to understand why changes were made.</para>
-
-                <para>If you discover that changes are needed to the core
-                layer of the project, it is worth sharing those with the
-                community as soon as possible.
-                Chances are if you have discovered the need for changes,
-                someone else in the community needs them also.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Development Environment Summary:</emphasis>
-                Aside from the previous steps, some best practices exist
-                within the Yocto Project development environment.
-                Consider the following:
-                <itemizedlist>
-                    <listitem><para>
-                        Use <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>
-                        as the source control system.
-                        </para></listitem>
-                    <listitem><para>
-                        Maintain your Metadata in layers that make sense
-                        for your situation.
-                        See the "<link linkend='understanding-and-creating-layers'>Understanding
-                        and Creating Layers</link>" section for more information on
-                        layers.
-                        </para></listitem>
-                    <listitem><para>
-                        Separate the project's Metadata and code by using
-                        separate Git repositories.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
-                        section for information on these repositories.
-                        See the
-                        "<link linkend='working-with-yocto-project-source-files'>Working With Yocto Project Source Files</link>"
-                        section for information on how to set up local Git
-                        repositories for related upstream Yocto Project
-                        Git repositories.
-                        </para></listitem>
-                    <listitem><para>
-                        Set up the directory for the shared state cache
-                        (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>)
-                        where it makes sense.
-                        For example, set up the sstate cache on a system used
-                        by developers in the same organization and share the
-                        same source directories on their machines.
-                        </para></listitem>
-                    <listitem><para>
-                        Set up an Autobuilder and have it populate the
-                        sstate cache and source directories.
-                        </para></listitem>
-                    <listitem><para>
-                        The Yocto Project community encourages you
-                        to send patches to the project to fix bugs or add features.
-                        If you do submit patches, follow the project commit
-                        guidelines for writing good commit messages.
-                        See the "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para>
-                        Send changes to the core sooner than later
-                        as others are likely to run into the same issues.
-                        For some guidance on mailing lists to use, see the list in the
-                        "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
-                        section.
-                        For a description of the available mailing lists, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
-                        section in the Yocto Project Reference Manual.
-                        </para></listitem>
-                </itemizedlist>
-                </para></listitem>
-        </orderedlist>
-    </para>
-</section>
-
-<section id='submitting-a-defect-against-the-yocto-project'>
-    <title>Submitting a Defect Against the Yocto Project</title>
-
-    <para>
-        Use the Yocto Project implementation of
-        <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink>
-        to submit a defect (bug) against the Yocto Project.
-        For additional information on this implementation of Bugzilla see the
-        "<ulink url='&YOCTO_DOCS_REF_URL;#resources-bugtracker'>Yocto Project Bugzilla</ulink>"
-        section in the Yocto Project Reference Manual.
-        For more detail on any of the following steps, see the Yocto Project
-        <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>.
-    </para>
-
-    <para>
-        Use the following general steps to submit a bug"
-
-        <orderedlist>
-            <listitem><para>
-                Open the Yocto Project implementation of
-                <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>.
-                </para></listitem>
-            <listitem><para>
-                Click "File a Bug" to enter a new bug.
-                </para></listitem>
-            <listitem><para>
-                Choose the appropriate "Classification", "Product", and
-                "Component" for which the bug was found.
-                Bugs for the Yocto Project fall into one of several
-                classifications, which in turn break down into several
-                products and components.
-                For example, for a bug against the
-                <filename>meta-intel</filename> layer, you would choose
-                "Build System, Metadata &amp; Runtime", "BSPs", and
-                "bsps-meta-intel", respectively.
-                </para></listitem>
-            <listitem><para>
-                Choose the "Version" of the Yocto Project for which you found
-                the bug (e.g. &DISTRO;).
-                </para></listitem>
-            <listitem><para>
-                Determine and select the "Severity" of the bug.
-                The severity indicates how the bug impacted your work.
-                </para></listitem>
-            <listitem><para>
-                Choose the "Hardware" that the bug impacts.
-                </para></listitem>
-            <listitem><para>
-                Choose the "Architecture" that the bug impacts.
-                </para></listitem>
-            <listitem><para>
-                Choose a "Documentation change" item for the bug.
-                Fixing a bug might or might not affect the Yocto Project
-                documentation.
-                If you are unsure of the impact to the documentation, select
-                "Don't Know".
-                </para></listitem>
-            <listitem><para>
-                Provide a brief "Summary" of the bug.
-                Try to limit your summary to just a line or two and be sure
-                to capture the essence of the bug.
-                </para></listitem>
-            <listitem><para>
-                Provide a detailed "Description" of the bug.
-                You should provide as much detail as you can about the context,
-                behavior, output, and so forth that surrounds the bug.
-                You can even attach supporting files for output from logs by
-                using the "Add an attachment" button.
-                </para></listitem>
-            <listitem><para>
-                Click the "Submit Bug" button submit the bug.
-                A new Bugzilla number is assigned to the bug and the defect
-                is logged in the bug tracking system.
-                </para></listitem>
-        </orderedlist>
-        Once you file a bug, the bug is processed by the Yocto Project Bug
-        Triage Team and further details concerning the bug are assigned
-        (e.g. priority and owner).
-        You are the "Submitter" of the bug and any further categorization,
-        progress, or comments on the bug result in Bugzilla sending you an
-        automated email concerning the particular change or progress to the
-        bug.
-    </para>
-</section>
-
-<section id='how-to-submit-a-change'>
-    <title>Submitting a Change to the Yocto Project</title>
-
-    <para>
-        Contributions to the Yocto Project and OpenEmbedded are very welcome.
-        Because the system is extremely configurable and flexible, we recognize
-        that developers will want to extend, configure or optimize it for
-        their specific uses.
-    </para>
-
-    <para>
-        The Yocto Project uses a mailing list and a patch-based workflow
-        that is similar to the Linux kernel but contains important
-        differences.
-        In general, a mailing list exists through which you can submit
-        patches.
-        You should send patches to the appropriate mailing list so that they
-        can be reviewed and merged by the appropriate maintainer.
-        The specific mailing list you need to use depends on the
-        location of the code you are changing.
-        Each component (e.g. layer) should have a
-        <filename>README</filename> file that indicates where to send
-        the changes and which process to follow.
-    </para>
-
-    <para>
-        You can send the patch to the mailing list using whichever approach
-        you feel comfortable with to generate the patch.
-        Once sent, the patch is usually reviewed by the community at large.
-        If somebody has concerns with the patch, they will usually voice
-        their concern over the mailing list.
-        If a patch does not receive any negative reviews, the maintainer of
-        the affected layer typically takes the patch, tests it, and then
-        based on successful testing, merges the patch.
-    </para>
-
-    <para id='figuring-out-the-mailing-list-to-use'>
-        The "poky" repository, which is the Yocto Project's reference build
-        environment, is a hybrid repository that contains several
-        individual pieces (e.g. BitBake, Metadata, documentation,
-        and so forth) built using the combo-layer tool.
-        The upstream location used for submitting changes varies by
-        component:
-        <itemizedlist>
-            <listitem><para>
-                <emphasis>Core Metadata:</emphasis>
-                Send your patch to the
-                <ulink url='http://lists.openembedded.org/mailman/listinfo/openembedded-core'>openembedded-core</ulink>
-                mailing list.  For example, a change to anything under
-                the <filename>meta</filename> or
-                <filename>scripts</filename> directories should be sent
-                to this mailing list.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>BitBake:</emphasis>
-                For changes to BitBake (i.e. anything under the
-                <filename>bitbake</filename> directory), send your patch
-                to the
-                <ulink url='http://lists.openembedded.org/mailman/listinfo/bitbake-devel'>bitbake-devel</ulink>
-                mailing list.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>"meta-*" trees:</emphasis>
-                These trees contain Metadata.
-                Use the
-                <ulink url='https://lists.yoctoproject.org/listinfo/poky'>poky</ulink>
-                mailing list.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        For changes to other layers hosted in the Yocto Project source
-        repositories (i.e. <filename>yoctoproject.org</filename>), tools,
-        and the Yocto Project documentation, use the
-        <ulink url='https://lists.yoctoproject.org/listinfo/yocto'>Yocto Project</ulink>
-        general mailing list.
-        <note>
-            Sometimes a layer's documentation specifies to use a
-            particular mailing list.
-            If so, use that list.
-        </note>
-        For additional recipes that do not fit into the core Metadata, you
-        should determine which layer the recipe should go into and submit
-        the change in the manner recommended by the documentation (e.g.
-        the <filename>README</filename> file) supplied with the layer.
-        If in doubt, please ask on the Yocto general mailing list or on
-        the openembedded-devel mailing list.
-    </para>
-
-    <para>
-        You can also push a change upstream and request a maintainer to
-        pull the change into the component's upstream repository.
-        You do this by pushing to a contribution repository that is upstream.
-        See the
-        "<ulink url='&YOCTO_DOCS_REF_URL;#workflows'>Workflows</ulink>"
-        section in the Yocto Project Reference Manual for additional
-        concepts on working in the Yocto Project development environment.
-    </para>
-
-    <para>
-        Two commonly used testing repositories exist for
-        OpenEmbedded-Core:
-        <itemizedlist>
-            <listitem><para>
-                <emphasis>"ross/mut" branch:</emphasis>
-                The "mut" (master-under-test) tree
-                exists in the <filename>poky-contrib</filename> repository
-                in the
-                <ulink url='&YOCTO_GIT_URL;'>Yocto Project source repositories</ulink>.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>"master-next" branch:</emphasis>
-                This branch is part of the main
-                "poky" repository in the Yocto Project source repositories.
-                </para></listitem>
-        </itemizedlist>
-        Maintainers use these branches to test submissions prior to merging
-        patches.
-        Thus, you can get an idea of the status of a patch based on
-        whether the patch has been merged into one of these branches.
-        <note>
-            This system is imperfect and changes can sometimes get lost in the
-            flow.
-            Asking about the status of a patch or change is reasonable if the
-            change has been idle for a while with no feedback.
-            The Yocto Project does have plans to use
-            <ulink url='https://en.wikipedia.org/wiki/Patchwork_(software)'>Patchwork</ulink>
-            to track the status of patches and also to automatically preview
-            patches.
-        </note>
-    </para>
-
-    <para>
-        The following sections provide procedures for submitting a change.
-    </para>
-
-    <section id='pushing-a-change-upstream'>
-        <title>Using Scripts to Push a Change Upstream and Request a Pull</title>
-
-        <para>
-            Follow this procedure to push a change to an upstream "contrib"
-            Git repository:
-            <note>
-                You can find general Git information on how to push a change
-                upstream in the
-                <ulink url='http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows'>Git Community Book</ulink>.
-            </note>
-            <orderedlist>
-                <listitem><para>
-                    <emphasis>Make Your Changes Locally:</emphasis>
-                    Make your changes in your local Git repository.
-                    You should make small, controlled, isolated changes.
-                    Keeping changes small and isolated aids review,
-                    makes merging/rebasing easier and keeps the change
-                    history clean should anyone need to refer to it in
-                    future.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Stage Your Changes:</emphasis>
-                    Stage your changes by using the <filename>git add</filename>
-                    command on each file you changed.
-                    </para></listitem>
-                <listitem><para id='making-sure-you-have-correct-commit-information'>
-                    <emphasis>Commit Your Changes:</emphasis>
-                    Commit the change by using the
-                    <filename>git commit</filename> command.
-                    Make sure your commit information follows standards by
-                    following these accepted conventions:
-                    <itemizedlist>
-                        <listitem><para>
-                            Be sure to include a "Signed-off-by:" line in the
-                            same style as required by the Linux kernel.
-                            Adding this line signifies that you, the submitter,
-                            have agreed to the Developer's Certificate of
-                            Origin 1.1 as follows:
-                            <literallayout class='monospaced'>
-     Developer's Certificate of Origin 1.1
-
-     By making a contribution to this project, I certify that:
-
-     (a) The contribution was created in whole or in part by me and I
-         have the right to submit it under the open source license
-         indicated in the file; or
-
-     (b) The contribution is based upon previous work that, to the best
-         of my knowledge, is covered under an appropriate open source
-         license and I have the right under that license to submit that
-         work with modifications, whether created in whole or in part
-         by me, under the same open source license (unless I am
-         permitted to submit under a different license), as indicated
-         in the file; or
-
-     (c) The contribution was provided directly to me by some other
-         person who certified (a), (b) or (c) and I have not modified
-         it.
-
-     (d) I understand and agree that this project and the contribution
-         are public and that a record of the contribution (including all
-         personal information I submit with it, including my sign-off) is
-         maintained indefinitely and may be redistributed consistent with
-         this project or the open source license(s) involved.
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para>
-                            Provide a single-line summary of the change.
-                            and,
-                            if more explanation is needed, provide more
-                            detail in the body of the commit.
-                            This summary is typically viewable in the
-                            "shortlist" of changes.
-                            Thus, providing something short and descriptive
-                            that gives the reader a summary of the change is
-                            useful when viewing a list of many commits.
-                            You should prefix this short description with the
-                            recipe name (if changing a recipe), or else with
-                            the short form path to the file being changed.
-                            </para></listitem>
-                        <listitem><para>
-                            For the body of the commit message, provide
-                            detailed information that describes what you
-                            changed, why you made the change, and the approach
-                            you used.
-                            It might also be helpful if you mention how you
-                            tested the change.
-                            Provide as much detail as you can in the body of
-                            the commit message.
-                            <note>
-                                You do not need to provide a more detailed
-                                explanation of a change if the change is
-                                minor to the point of the single line
-                                summary providing all the information.
-                            </note>
-                            </para></listitem>
-                        <listitem><para>
-                            If the change addresses a specific bug or issue
-                            that is associated with a bug-tracking ID,
-                            include a reference to that ID in your detailed
-                            description.
-                            For example, the Yocto Project uses a specific
-                            convention for bug references - any commit that
-                            addresses a specific bug should use the following
-                            form for the detailed description.
-                            Be sure to use the actual bug-tracking ID from
-                            Bugzilla for
-                            <replaceable>bug-id</replaceable>:
-                            <literallayout class='monospaced'>
-     Fixes [YOCTO #<replaceable>bug-id</replaceable>]
-
-     <replaceable>detailed description of change</replaceable>
-                            </literallayout>
-                            </para></listitem>
-                    </itemizedlist>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Push Your Commits to a "Contrib" Upstream:</emphasis>
-                    If you have arranged for permissions to push to an
-                    upstream contrib repository, push the change to that
-                    repository:
-                    <literallayout class='monospaced'>
-     $ git push <replaceable>upstream_remote_repo</replaceable> <replaceable>local_branch_name</replaceable>
-                    </literallayout>
-                    For example, suppose you have permissions to push into the
-                    upstream <filename>meta-intel-contrib</filename>
-                    repository and you are working in a local branch named
-                    <replaceable>your_name</replaceable><filename>/README</filename>.
-                    The following command pushes your local commits to the
-                    <filename>meta-intel-contrib</filename> upstream
-                    repository and puts the commit in a branch named
-                    <replaceable>your_name</replaceable><filename>/README</filename>:
-                    <literallayout class='monospaced'>
-     $ git push meta-intel-contrib <replaceable>your_name</replaceable>/README
-                    </literallayout>
-                    </para></listitem>
-                <listitem><para id='push-determine-who-to-notify'>
-                    <emphasis>Determine Who to Notify:</emphasis>
-                    Determine the maintainer or the mailing list
-                    that you need to notify for the change.</para>
-
-                    <para>Before submitting any change, you need to be sure
-                    who the maintainer is or what mailing list that you need
-                    to notify.
-                    Use either these methods to find out:
-                    <itemizedlist>
-                        <listitem><para>
-                            <emphasis>Maintenance File:</emphasis>
-                            Examine the <filename>maintainers.inc</filename>
-                            file, which is located in the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                            at
-                            <filename>meta/conf/distro/include</filename>,
-                            to see who is responsible for code.
-                            </para></listitem>
-                        <listitem><para>
-                            <emphasis>Search by File:</emphasis>
-                            Using <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>,
-                            you can enter the following command to bring up a
-                            short list of all commits against a specific file:
-                            <literallayout class='monospaced'>
-     git shortlog -- <replaceable>filename</replaceable>
-                            </literallayout>
-                            Just provide the name of the file for which you
-                            are interested.
-                            The information returned is not ordered by history
-                            but does include a list of everyone who has
-                            committed grouped by name.
-                            From the list, you can see who is responsible for
-                            the bulk of the changes against the file.
-                            </para></listitem>
-                        <listitem><para>
-                            <emphasis>Examine the List of Mailing Lists:</emphasis>
-                            For a list of the Yocto Project and related mailing
-                            lists, see the
-                            "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>"
-                            section in the Yocto Project Reference Manual.
-                            </para></listitem>
-                    </itemizedlist>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Make a Pull Request:</emphasis>
-                    Notify the maintainer or the mailing list that you have
-                    pushed a change by making a pull request.</para>
-
-                    <para>The Yocto Project provides two scripts that
-                    conveniently let you generate and send pull requests to the
-                    Yocto Project.
-                    These scripts are <filename>create-pull-request</filename>
-                    and <filename>send-pull-request</filename>.
-                    You can find these scripts in the
-                    <filename>scripts</filename> directory within the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                    (e.g. <filename>~/poky/scripts</filename>).
-                    </para>
-
-                    <para>Using these scripts correctly formats the requests
-                    without introducing any whitespace or HTML formatting.
-                    The maintainer that receives your patches either directly
-                    or through the mailing list needs to be able to save and
-                    apply them directly from your emails.
-                    Using these scripts is the preferred method for sending
-                    patches.</para>
-
-                    <para>First, create the pull request.
-                    For example, the following command runs the script,
-                    specifies the upstream repository in the contrib directory
-                    into which you pushed the change, and provides a subject
-                    line in the created patch files:
-                    <literallayout class='monospaced'>
-     $ ~/poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README"
-                    </literallayout>
-                    Running this script forms
-                    <filename>*.patch</filename> files in a folder named
-                    <filename>pull-</filename><replaceable>PID</replaceable>
-                    in the current directory.
-                    One of the patch files is a cover letter.</para>
-
-                    <para>Before running the
-                    <filename>send-pull-request</filename> script, you must
-                    edit the cover letter patch to insert information about
-                    your change.
-                    After editing the cover letter, send the pull request.
-                    For example, the following command runs the script and
-                    specifies the patch directory and email address.
-                    In this example, the email address is a mailing list:
-                    <literallayout class='monospaced'>
-     $ ~/poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@yoctoproject.org
-                    </literallayout>
-                    You need to follow the prompts as the script is
-                    interactive.
-                    <note>
-                        For help on using these scripts, simply provide the
-                        <filename>-h</filename> argument as follows:
-                        <literallayout class='monospaced'>
-     $ poky/scripts/create-pull-request -h
-     $ poky/scripts/send-pull-request -h
-                        </literallayout>
-                    </note>
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-
-    <section id='submitting-a-patch'>
-        <title>Using Email to Submit a Patch</title>
-
-        <para>
-            You can submit patches without using the
-            <filename>create-pull-request</filename> and
-            <filename>send-pull-request</filename> scripts described in the
-            previous section.
-            However, keep in mind, the preferred method is to use the scripts.
-        </para>
-
-        <para>
-            Depending on the components changed, you need to submit the email
-            to a specific mailing list.
-            For some guidance on which mailing list to use, see the
-            <link linkend='figuring-out-the-mailing-list-to-use'>beginning</link>
-            of this section.
-            For a description of all the available mailing lists, see the
-            "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
-            section in the Yocto Project Reference Manual.
-        </para>
-
-        <para>
-            Here is the general procedure on how to submit a patch through
-            email without using the scripts:
-            <orderedlist>
-                <listitem><para>
-                    <emphasis>Make Your Changes Locally:</emphasis>
-                    Make your changes in your local Git repository.
-                    You should make small, controlled, isolated changes.
-                    Keeping changes small and isolated aids review,
-                    makes merging/rebasing easier and keeps the change
-                    history clean should anyone need to refer to it in
-                    future.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Stage Your Changes:</emphasis>
-                    Stage your changes by using the <filename>git add</filename>
-                    command on each file you changed.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Commit Your Changes:</emphasis>
-                    Commit the change by using the
-                    <filename>git commit --signoff</filename> command.
-                    Using the <filename>--signoff</filename> option identifies
-                    you as the person making the change and also satisfies
-                    the Developer's Certificate of Origin (DCO) shown earlier.
-                    </para>
-
-                    <para>When you form a commit, you must follow certain
-                    standards established by the Yocto Project development
-                    team.
-                    See
-                    <link linkend='making-sure-you-have-correct-commit-information'>Step 3</link>
-                    in the previous section for information on how to
-                    provide commit information that meets Yocto Project
-                    commit message standards.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Format the Commit:</emphasis>
-                    Format the commit into an email message.
-                    To format commits, use the
-                    <filename>git format-patch</filename> command.
-                    When you provide the command, you must include a revision
-                    list or a number of patches as part of the command.
-                    For example, either of these two commands takes your most
-                    recent single commit and formats it as an email message in
-                    the current directory:
-                    <literallayout class='monospaced'>
-     $ git format-patch -1
-                    </literallayout>
-                    or
-                    <literallayout class='monospaced'>
-     $ git format-patch HEAD~
-                    </literallayout></para>
-
-                    <para>After the command is run, the current directory
-                    contains a numbered <filename>.patch</filename> file for
-                    the commit.</para>
-
-                    <para>If you provide several commits as part of the
-                    command, the <filename>git format-patch</filename> command
-                    produces a series of numbered files in the current
-                    directory – one for each commit.
-                    If you have more than one patch, you should also use the
-                    <filename>--cover</filename> option with the command,
-                    which generates a cover letter as the first "patch" in
-                    the series.
-                    You can then edit the cover letter to provide a
-                    description for the series of patches.
-                    For information on the
-                    <filename>git format-patch</filename> command,
-                    see <filename>GIT_FORMAT_PATCH(1)</filename> displayed
-                    using the <filename>man git-format-patch</filename>
-                    command.
-                    <note>
-                        If you are or will be a frequent contributor to the
-                        Yocto Project or to OpenEmbedded, you might consider
-                        requesting a contrib area and the necessary associated
-                        rights.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Import the Files Into Your Mail Client:</emphasis>
-                    Import the files into your mail client by using the
-                    <filename>git send-email</filename> command.
-                    <note>
-                        In order to use <filename>git send-email</filename>,
-                        you must have the proper Git packages installed on
-                        your host.
-                        For Ubuntu, Debian, and Fedora the package is
-                        <filename>git-email</filename>.
-                    </note></para>
-
-                    <para>The <filename>git send-email</filename> command
-                    sends email by using a local or remote Mail Transport Agent
-                    (MTA) such as <filename>msmtp</filename>,
-                    <filename>sendmail</filename>, or through a direct
-                    <filename>smtp</filename> configuration in your Git
-                    <filename>~/.gitconfig</filename> file.
-                    If you are submitting patches through email only, it is
-                    very important that you submit them without any whitespace
-                    or HTML formatting that either you or your mailer
-                    introduces.
-                    The maintainer that receives your patches needs to be able
-                    to save and apply them directly from your emails.
-                    A good way to verify that what you are sending will be
-                    applicable by the maintainer is to do a dry run and send
-                    them to yourself and then save and apply them as the
-                    maintainer would.</para>
-
-                    <para>The <filename>git send-email</filename> command is
-                    the preferred method for sending your patches using
-                    email since there is no risk of compromising whitespace
-                    in the body of the message, which can occur when you use
-                    your own mail client.
-                    The command also has several options that let you
-                    specify recipients and perform further editing of the
-                    email message.
-                    For information on how to use the
-                    <filename>git send-email</filename> command,
-                    see <filename>GIT-SEND-EMAIL(1)</filename> displayed using
-                    the <filename>man git-send-email</filename> command.
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-</section>
-</chapter>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
index 85e7315..4e7b5de 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
@@ -7,15 +7,51 @@
 <title>Using the Quick EMUlator (QEMU)</title>
 
     <para>
-        This chapter provides procedures that show you how to use the
-        Quick EMUlator (QEMU), which is an Open Source project the Yocto
-        Project uses as part of its development "tool set".
-        For reference information on the Yocto Project implementation of QEMU,
-        see the
-        "<ulink url='&YOCTO_DOCS_REF_URL;#ref-quick-emulator-qemu'>Quick EMUlator (QEMU)</ulink>"
-        section in the Yocto Project Reference Manual.
+        The Yocto Project uses an implementation of the Quick EMUlator (QEMU)
+        Open Source project as part of the Yocto Project development "tool
+        set".
+        This chapter provides both procedures that show you how to use the
+        Quick EMUlator (QEMU) and other QEMU information helpful for
+        development purposes.
     </para>
 
+    <section id='qemu-dev-overview'>
+        <title>Overview</title>
+
+        <para>
+            Within the context of the Yocto Project, QEMU is an
+            emulator and virtualization machine that allows you to run a
+            complete image you have built using the Yocto Project as just
+            another task on your build system.
+            QEMU is useful for running and testing images and applications on
+            supported Yocto Project architectures without having actual
+            hardware.
+            Among other things, the Yocto Project uses QEMU to run automated
+            Quality Assurance (QA) tests on final images shipped with each
+            release.
+            <note>
+                This implementation is not the same as QEMU in general.
+            </note>
+            This section provides a brief reference for the Yocto Project
+            implementation of QEMU.
+        </para>
+
+        <para>
+            For official information and documentation on QEMU in general, see
+            the following references:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
+                    The official website for the QEMU Open Source project.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
+                    The QEMU user manual.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
     <section id='qemu-running-qemu'>
         <title>Running QEMU</title>
 
@@ -27,6 +63,9 @@
             <orderedlist>
                 <listitem><para>
                     <emphasis>Install QEMU:</emphasis>
+                    QEMU is made available with the Yocto Project a number of
+                    ways.
+                    One method is to install a Software Development Kit (SDK).
                     See
                     "<ulink url='&YOCTO_DOCS_SDK_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
                     section in the Yocto Project Application Development and
@@ -303,6 +342,345 @@
             </note>
         </para>
     </section>
+
+    <section id='qemu-kvm-cpu-compatibility'>
+        <title>QEMU CPU Compatibility Under KVM</title>
+
+        <para>
+            By default, the QEMU build compiles for and targets 64-bit and x86
+            <trademark class='registered'>Intel</trademark> <trademark class='trademark'>Core</trademark>2
+            Duo processors and 32-bit x86
+            <trademark class='registered'>Intel</trademark> <trademark class='registered'>Pentium</trademark>
+            II processors.
+            QEMU builds for and targets these CPU types because they display
+            a broad range of CPU feature compatibility with many commonly
+            used CPUs.
+        </para>
+
+        <para>
+            Despite this broad range of compatibility, the CPUs could support
+            a feature that your host CPU does not support.
+            Although this situation is not a problem when QEMU uses software
+            emulation of the feature, it can be a problem when QEMU is
+            running with KVM enabled.
+            Specifically, software compiled with a certain CPU feature crashes
+            when run on a CPU under KVM that does not support that feature.
+            To work around this problem, you can override QEMU's runtime CPU
+            setting by changing the <filename>QB_CPU_KVM</filename>
+            variable in <filename>qemuboot.conf</filename> in the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory's</ulink>
+            <filename>deploy/image</filename> directory.
+            This setting specifies a <filename>-cpu</filename> option
+            passed into QEMU in the <filename>runqemu</filename> script.
+            Running <filename>qemu -cpu help</filename> returns a list of
+            available supported CPU types.
+        </para>
+    </section>
+
+    <section id='qemu-dev-performance'>
+        <title>QEMU Performance</title>
+
+        <para>
+            Using QEMU to emulate your hardware can result in speed issues
+            depending on the target and host architecture mix.
+            For example, using the <filename>qemux86</filename> image in the
+            emulator on an Intel-based 32-bit (x86) host machine is fast
+            because the target and host architectures match.
+            On the other hand, using the <filename>qemuarm</filename> image
+            on the same Intel-based host can be slower.
+            But, you still achieve faithful emulation of ARM-specific issues.
+        </para>
+
+        <para>
+            To speed things up, the QEMU images support using
+            <filename>distcc</filename> to call a cross-compiler outside the
+            emulated system.
+            If you used <filename>runqemu</filename> to start QEMU, and the
+            <filename>distccd</filename> application is present on the host
+            system, any BitBake cross-compiling toolchain available from the
+            build system is automatically used from within QEMU simply by
+            calling <filename>distcc</filename>.
+            You can accomplish this by defining the cross-compiler variable
+            (e.g. <filename>export CC="distcc"</filename>).
+            Alternatively, if you are using a suitable SDK image or the
+            appropriate stand-alone toolchain is present, the toolchain is
+            also automatically used.
+            <note>
+                Several mechanisms exist that let you connect to the system
+                running on the QEMU emulator:
+                <itemizedlist>
+                    <listitem><para>
+                        QEMU provides a framebuffer interface that makes
+                        standard consoles available.
+                        </para></listitem>
+                    <listitem><para>
+                        Generally, headless embedded devices have a serial port.
+                        If so, you can configure the operating system of the
+                        running image to use that port to run a console.
+                        The connection uses standard IP networking.
+                        </para></listitem>
+                    <listitem><para>
+                        SSH servers exist in some QEMU images.
+                        The <filename>core-image-sato</filename> QEMU image
+                        has a Dropbear secure shell (SSH) server that runs
+                        with the root password disabled.
+                        The <filename>core-image-full-cmdline</filename> and
+                        <filename>core-image-lsb</filename> QEMU images
+                        have OpenSSH instead of Dropbear.
+                        Including these SSH servers allow you to use standard
+                        <filename>ssh</filename> and <filename>scp</filename>
+                        commands.
+                        The <filename>core-image-minimal</filename> QEMU image,
+                        however, contains no SSH server.
+                        </para></listitem>
+                    <listitem><para>
+                        You can use a provided, user-space NFS server to boot
+                        the QEMU session using a local copy of the root
+                        filesystem on the host.
+                        In order to make this connection, you must extract a
+                        root filesystem tarball by using the
+                        <filename>runqemu-extract-sdk</filename> command.
+                        After running the command, you must then point the
+                        <filename>runqemu</filename>
+                        script to the extracted directory instead of a root
+                        filesystem image file.
+                        See the
+                        "<link linkend='qemu-running-under-a-network-file-system-nfs-server'>Running Under a Network File System (NFS) Server</link>"
+                        section for more information.
+                        </para></listitem>
+                </itemizedlist>
+            </note>
+        </para>
+    </section>
+
+    <section id='qemu-dev-command-line-syntax'>
+        <title>QEMU Command-Line Syntax</title>
+
+        <para>
+            The basic <filename>runqemu</filename> command syntax is as
+            follows:
+            <literallayout class='monospaced'>
+     $ runqemu [<replaceable>option</replaceable> ]  [...]
+            </literallayout>
+            Based on what you provide on the command line,
+            <filename>runqemu</filename> does a good job of figuring out what
+            you are trying to do.
+            For example, by default, QEMU looks for the most recently built
+            image according to the timestamp when it needs to look for an
+            image.
+            Minimally, through the use of options, you must provide either
+            a machine name, a virtual machine image
+            (<filename>*wic.vmdk</filename>), or a kernel image
+            (<filename>*.bin</filename>).
+        </para>
+
+        <para>
+            Following is the command-line help output for the
+            <filename>runqemu</filename> command:
+            <literallayout class='monospaced'>
+     $ runqemu --help
+
+     Usage: you can run this script with any valid combination
+     of the following environment variables (in any order):
+       KERNEL - the kernel image file to use
+       ROOTFS - the rootfs image file or nfsroot directory to use
+       MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
+       Simplified QEMU command-line options can be passed with:
+         nographic - disable video console
+         serial - enable a serial console on /dev/ttyS0
+         slirp - enable user networking, no root privileges is required
+         kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
+         kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
+         publicvnc - enable a VNC server open to all hosts
+         audio - enable audio
+         [*/]ovmf* - OVMF firmware file or base name for booting with UEFI
+       tcpserial=&lt;port&gt; - specify tcp serial port number
+       biosdir=&lt;dir&gt; - specify custom bios dir
+       biosfilename=&lt;filename&gt; - specify bios filename
+       qemuparams=&lt;xyz&gt; - specify custom parameters to QEMU
+       bootparams=&lt;xyz&gt; - specify custom kernel parameters during boot
+       help, -h, --help: print this text
+
+     Examples:
+       runqemu
+       runqemu qemuarm
+       runqemu tmp/deploy/images/qemuarm
+       runqemu tmp/deploy/images/qemux86/&lt;qemuboot.conf&gt;
+       runqemu qemux86-64 core-image-sato ext4
+       runqemu qemux86-64 wic-image-minimal wic
+       runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
+       runqemu qemux86 iso/hddimg/wic.vmdk/wic.qcow2/wic.vdi/ramfs/cpio.gz...
+       runqemu qemux86 qemuparams="-m 256"
+       runqemu qemux86 bootparams="psplash=false"
+       runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic
+       runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic.vmdk
+            </literallayout>
+        </para>
+    </section>
+
+    <section id='qemu-dev-runqemu-command-line-options'>
+        <title><filename>runqemu</filename> Command-Line Options</title>
+
+        <para>
+            Following is a description of <filename>runqemu</filename>
+            options you can provide on the command line:
+            <note><title>Tip</title>
+                If you do provide some "illegal" option combination or perhaps
+                you do not provide enough in the way of options,
+                <filename>runqemu</filename> provides appropriate error
+                messaging to help you correct the problem.
+            </note>
+            <itemizedlist>
+                <listitem><para>
+                    <replaceable>QEMUARCH</replaceable>:
+                    The QEMU machine architecture, which must be "qemuarm",
+                    "qemuarm64", "qemumips", "qemumips64", "qemuppc",
+                    "qemux86", or "qemux86-64".
+                    </para></listitem>
+                <listitem><para>
+                    <filename><replaceable>VM</replaceable></filename>:
+                    The virtual machine image, which must be a
+                    <filename>.wic.vmdk</filename> file.
+                    Use this option when you want to boot a
+                    <filename>.wic.vmdk</filename> image.
+                    The image filename you provide must contain one of the
+                    following strings: "qemux86-64", "qemux86", "qemuarm",
+                    "qemumips64", "qemumips", "qemuppc", or "qemush4".
+                    </para></listitem>
+                <listitem><para>
+                    <replaceable>ROOTFS</replaceable>:
+                    A root filesystem that has one of the following
+                    filetype extensions: "ext2", "ext3", "ext4", "jffs2",
+                    "nfs", or "btrfs".
+                    If the filename you provide for this option uses “nfs”, it
+                    must provide an explicit root filesystem path.
+                    </para></listitem>
+                <listitem><para>
+                    <replaceable>KERNEL</replaceable>:
+                    A kernel image, which is a <filename>.bin</filename> file.
+                    When you provide a <filename>.bin</filename> file,
+                    <filename>runqemu</filename> detects it and assumes the
+                    file is a kernel image.
+                    </para></listitem>
+                <listitem><para>
+                    <replaceable>MACHINE</replaceable>:
+                    The architecture of the QEMU machine, which must be one
+                    of the following: "qemux86", "qemux86-64", "qemuarm",
+                    "qemuarm64", "qemumips", “qemumips64", or "qemuppc".
+                    The <replaceable>MACHINE</replaceable> and
+                    <replaceable>QEMUARCH</replaceable> options are basically
+                    identical.
+                    If you do not provide a <replaceable>MACHINE</replaceable>
+                    option, <filename>runqemu</filename> tries to determine
+                    it based on other options.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>ramfs</filename>:
+                    Indicates you are booting an initial RAM disk (initramfs)
+                    image, which means the <filename>FSTYPE</filename> is
+                    <filename>cpio.gz</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>iso</filename>:
+                    Indicates you are booting an ISO image, which means the
+                    <filename>FSTYPE</filename> is
+                    <filename>.iso</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>nographic</filename>:
+                    Disables the video console, which sets the console to
+                    "ttys0".
+                    </para></listitem>
+                <listitem><para>
+                    <filename>serial</filename>:
+                    Enables a serial console on
+                    <filename>/dev/ttyS0</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>biosdir</filename>:
+                    Establishes a custom directory for BIOS, VGA BIOS and
+                    keymaps.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>biosfilename</filename>:
+                    Establishes a custom BIOS name.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
+                    Specifies custom QEMU parameters.
+                    Use this option to pass options other than the simple
+                    "kvm" and "serial" options.
+                    </para></listitem>
+                <listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
+                    Specifies custom boot parameters for the kernel.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>audio</filename>:
+                    Enables audio in QEMU.
+                    The <replaceable>MACHINE</replaceable> option must be
+                    either "qemux86" or "qemux86-64" in order for audio to be
+                    enabled.
+                    Additionally, the <filename>snd_intel8x0</filename>
+                    or <filename>snd_ens1370</filename> driver must be
+                    installed in linux guest.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>slirp</filename>:
+                    Enables "slirp" networking, which is a different way
+                    of networking that does not need root access
+                    but also is not as easy to use or comprehensive
+                    as the default.
+                    </para></listitem>
+                <listitem><para id='kvm-cond'>
+                    <filename>kvm</filename>:
+                    Enables KVM when running "qemux86" or "qemux86-64"
+                    QEMU architectures.
+                    For KVM to work, all the following conditions must be met:
+                    <itemizedlist>
+                        <listitem><para>
+                            Your <replaceable>MACHINE</replaceable> must be either
+qemux86" or "qemux86-64".
+                            </para></listitem>
+                        <listitem><para>
+                            Your build host has to have the KVM modules
+                            installed, which are
+                            <filename>/dev/kvm</filename>.
+                            </para></listitem>
+                        <listitem><para>
+                            The  build host <filename>/dev/kvm</filename>
+                            directory has to be both writable and readable.
+                            </para></listitem>
+                    </itemizedlist>
+                    </para></listitem>
+                <listitem><para>
+                    <filename>kvm-vhost</filename>:
+                    Enables KVM with VHOST support when running "qemux86"
+                    or "qemux86-64" QEMU architectures.
+                    For KVM with VHOST to work, the following conditions must
+                    be met:
+                    <itemizedlist>
+                        <listitem><para>
+                            <link linkend='kvm-cond'>kvm</link> option
+                            conditions must be met.
+                            </para></listitem>
+                        <listitem><para>
+                            Your build host has to have virtio net device, which
+                            are <filename>/dev/vhost-net</filename>.
+                            </para></listitem>
+                        <listitem><para>
+                            The build host <filename>/dev/vhost-net</filename>
+                            directory has to be either readable or writable
+                            and “slirp-enabled”.
+                            </para></listitem>
+                    </itemizedlist>
+                    </para></listitem>
+                <listitem><para>
+                    <filename>publicvnc</filename>:
+                    Enables a VNC server open to all hosts.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
 </chapter>
 <!--
 vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml
index 195b22d..d8726b4 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml
@@ -4,18 +4,386 @@
 
 <chapter id='dev-manual-start'>
 
-<title>Getting Started with the Yocto Project</title>
+<title>Setting Up to Use the Yocto Project</title>
 
 <para>
     This chapter provides procedures related to getting set up to use the
     Yocto Project.
-    For a more front-to-end process that takes you from minimally preparing
-    a build host through building an image, see the
-    <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
+    You can learn about creating a team environment that develops using the
+    Yocto Project, how to set up a build host, how to locate Yocto Project
+    source repositories, and how to create local Git repositories.
 </para>
 
+<section id="usingpoky-changes-collaborate">
+    <title>Creating a Team Development Environment</title>
+
+    <para>
+        It might not be immediately clear how you can use the Yocto
+        Project in a team development environment, or scale it for a large
+        team of developers.
+        One of the strengths of the Yocto Project is that it is extremely
+        flexible.
+        Thus, you can adapt it to many different use cases and scenarios.
+        However, these characteristics can cause a struggle if you are trying
+        to create a working setup that scales across a large team.
+    </para>
+
+    <para>
+        To help you understand how to set up this type of environment,
+        this section presents a procedure that gives you the information
+        to learn how to get the results you want.
+        The procedure is high-level and presents some of the project's most
+        successful experiences, practices, solutions, and available
+        technologies that work well.
+        Keep in mind, the procedure here is a starting point.
+        You can build off it and customize it to fit any
+        particular working environment and set of practices.
+        <orderedlist>
+            <listitem><para>
+                <emphasis>Determine Who is Going to be Developing:</emphasis>
+                You need to understand who is going to be doing anything
+                related to the Yocto Project and what their roles would be.
+                Making this determination is essential to completing the
+                steps two and three, which are to get your equipment together
+                and set up your development environment's hardware topology.
+                </para>
+
+                <para>The following roles exist:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Application Development:</emphasis>
+                        These types of developers do application level work
+                        on top of an existing software stack.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Core System Development:</emphasis>
+                        These types of developers work on the contents of the
+                        operating system image itself.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Build Engineer:</emphasis>
+                        This type of developer manages Autobuilders and
+                        releases.
+                        Not all environments need a Build Engineer.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Test Engineer:</emphasis>
+                        This type of developer creates and manages automated
+                        tests needed to ensure all application and core
+                        system development meets desired quality standards.
+                        </para></listitem>
+                </itemizedlist>
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Gather the Hardware:</emphasis>
+                Based on the size and make-up of the team, get the hardware
+                together.
+                Any development, build, or test engineer should be using
+                a system that is running a supported Linux distribution.
+                Systems, in general, should be high performance (e.g. dual,
+                six-core Xeons with 24 Gbytes of RAM and plenty of disk space).
+                You can help ensure efficiency by having any machines used
+                for testing or that run Autobuilders be as high performance
+                as possible.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Understand the Hardware Topology of the Environment:</emphasis>
+                Once you understand the hardware involved and the make-up
+                of the team, you can understand the hardware topology of the
+                development environment.
+                You can get a visual idea of the machines and their roles
+                across the development environment.
+
+<!--
+                The following figure shows a moderately sized Yocto Project
+                development environment.
+
+                <para role="writernotes">
+                Need figure.</para>
+-->
+
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Use Git as Your Source Control Manager (SCM):</emphasis>
+                Keeping your
+                <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
+                and any software you are developing under the
+                control of an SCM system that is compatible
+                with the OpenEmbedded build system is advisable.
+                Of the SCMs BitBake supports, the
+                Yocto Project team strongly recommends using
+                <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>.
+                Git is a distributed system that is easy to backup,
+                allows you to work remotely, and then connects back to the
+                infrastructure.
+                <note>
+                    For information about BitBake, see the
+                    <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+                </note></para>
+
+                <para>It is relatively easy to set up Git services and create
+                infrastructure like
+                <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>,
+                which is based on server software called
+                <filename>gitolite</filename> with <filename>cgit</filename>
+                being used to generate the web interface that lets you view the
+                repositories.
+                The <filename>gitolite</filename> software identifies users
+                using SSH keys and allows branch-based
+                access controls to repositories that you can control as little
+                or as much as necessary.
+
+                <note>
+                   The setup of these services is beyond the scope of this
+                   manual.
+                   However, sites such as these exist that describe how to
+                   perform setup:
+                   <itemizedlist>
+                       <listitem><para>
+                           <ulink url='http://git-scm.com/book/ch4-8.html'>Git documentation</ulink>:
+                           Describes how to install <filename>gitolite</filename>
+                           on the server.
+                           </para></listitem>
+                       <listitem><para>
+                           <ulink url='http://gitolite.com'>Gitolite</ulink>:
+                            Information for <filename>gitolite</filename>.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools'>Interfaces, frontends, and tools</ulink>:
+                            Documentation on how to create interfaces and frontends
+                            for Git.
+                            </para></listitem>
+                    </itemizedlist>
+                </note>
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Set up the Application Development Machines:</emphasis>
+                As mentioned earlier, application developers are creating
+                applications on top of existing software stacks.
+                Following are some best practices for setting up machines
+                that do application development:
+                <itemizedlist>
+                    <listitem><para>
+                        Use a pre-built toolchain that
+                        contains the software stack itself.
+                        Then, develop the application code on top of the
+                        stack.
+                        This method works well for small numbers of relatively
+                        isolated applications.
+                        </para></listitem>
+                    <listitem><para>
+                        When possible, use the Yocto Project
+                        plug-in for the
+                        <trademark class='trade'>Eclipse</trademark> IDE
+                        and SDK development practices.
+                        For more information, see the
+                        "<ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>"
+                        manual.
+                        </para></listitem>
+                    <listitem><para>
+                        Keep your cross-development toolchains updated.
+                        You can do this through provisioning either as new
+                        toolchain downloads or as updates through a package
+                        update mechanism using <filename>opkg</filename>
+                        to provide updates to an existing toolchain.
+                        The exact mechanics of how and when to do this are a
+                        question for local policy.
+                        </para></listitem>
+                    <listitem><para>
+                        Use multiple toolchains installed locally
+                        into different locations to allow development across
+                        versions.
+                        </para></listitem>
+                </itemizedlist>
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Set up the Core Development Machines:</emphasis>
+                As mentioned earlier, these types of developers work on the
+                contents of the operating system itself.
+                Following are some best practices for setting up machines
+                used for developing images:
+                <itemizedlist>
+                    <listitem><para>
+                        Have the Yocto Project build system itself available on
+                        the developer workstations so developers can run their own
+                        builds and directly rebuild the software stack.
+                        </para></listitem>
+                    <listitem><para>
+                        Keep the core system unchanged as much as
+                        possible and do your work in layers on top of the
+                        core system.
+                        Doing so gives you a greater level of portability when
+                        upgrading to new versions of the core system or Board
+                        Support Packages (BSPs).
+                        </para></listitem>
+                    <listitem><para>
+                        Share layers amongst the developers of a
+                        particular project and contain the policy configuration
+                        that defines the project.
+                        </para></listitem>
+                </itemizedlist>
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Set up an Autobuilder:</emphasis>
+                Autobuilders are often the core of the development
+                environment.
+                It is here that changes from individual developers are brought
+                together and centrally tested and subsequent decisions about
+                releases can be made.
+                Autobuilders also allow for "continuous integration" style
+                testing of software components and regression identification
+                and tracking.</para>
+
+                <para>See "<ulink url='http://autobuilder.yoctoproject.org'>Yocto Project Autobuilder</ulink>"
+                for more information and links to buildbot.
+                The Yocto Project team has found this implementation
+                works well in this role.
+                A public example of this is the Yocto Project
+                Autobuilders, which we use to test the overall health of the
+                project.</para>
+
+                <para>The features of this system are:
+                <itemizedlist>
+                    <listitem><para>
+                         Highlights when commits break the build.
+                         </para></listitem>
+                    <listitem><para>
+                        Populates an sstate cache from which
+                        developers can pull rather than requiring local
+                        builds.
+                        </para></listitem>
+                    <listitem><para>
+                        Allows commit hook triggers,
+                        which trigger builds when commits are made.
+                        </para></listitem>
+                    <listitem><para>
+                        Allows triggering of automated image booting
+                        and testing under the QuickEMUlator (QEMU).
+                        </para></listitem>
+                    <listitem><para>
+                        Supports incremental build testing and
+                        from-scratch builds.
+                        </para></listitem>
+                    <listitem><para>
+                        Shares output that allows developer
+                        testing and historical regression investigation.
+                        </para></listitem>
+                    <listitem><para>
+                        Creates output that can be used for releases.
+                        </para></listitem>
+                    <listitem><para>
+                        Allows scheduling of builds so that resources
+                        can be used efficiently.
+                        </para></listitem>
+               </itemizedlist>
+               </para></listitem>
+           <listitem><para>
+               <emphasis>Set up Test Machines:</emphasis>
+               Use a small number of shared, high performance systems
+               for testing purposes.
+               Developers can use these systems for wider, more
+               extensive testing while they continue to develop
+               locally using their primary development system.
+               </para></listitem>
+           <listitem><para>
+               <emphasis>Document Policies and Change Flow:</emphasis>
+               The Yocto Project itself uses a hierarchical structure and a
+                pull model.
+                Scripts exist to create and send pull requests
+                (i.e. <filename>create-pull-request</filename> and
+                <filename>send-pull-request</filename>).
+                This model is in line with other open source projects where
+                maintainers are responsible for specific areas of the project
+                and a single maintainer handles the final "top-of-tree" merges.
+                <note>
+                    You can also use a more collective push model.
+                    The <filename>gitolite</filename> software supports both the
+                    push and pull models quite easily.
+                </note></para>
+
+                <para>As with any development environment, it is important
+                to document the policy used as well as any main project
+                guidelines so they are understood by everyone.
+                It is also a good idea to have well structured
+                commit messages, which are usually a part of a project's
+                guidelines.
+                Good commit messages are essential when looking back in time and
+                trying to understand why changes were made.</para>
+
+                <para>If you discover that changes are needed to the core
+                layer of the project, it is worth sharing those with the
+                community as soon as possible.
+                Chances are if you have discovered the need for changes,
+                someone else in the community needs them also.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Development Environment Summary:</emphasis>
+                Aside from the previous steps, some best practices exist
+                within the Yocto Project development environment.
+                Consider the following:
+                <itemizedlist>
+                    <listitem><para>
+                        Use
+                        <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>
+                        as the source control system.
+                        </para></listitem>
+                    <listitem><para>
+                        Maintain your Metadata in layers that make sense
+                        for your situation.
+                        See the "<link linkend='understanding-and-creating-layers'>Understanding
+                        and Creating Layers</link>" section for more information on
+                        layers.
+                        </para></listitem>
+                    <listitem><para>
+                        Separate the project's Metadata and code by using
+                        separate Git repositories.
+                        See the
+                        "<ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
+                        section for information on these repositories.
+                        See the
+                        "<link linkend='locating-yocto-project-source-files'>Locating Yocto Project Source Files</link>"
+                        section for information on how to set up local Git
+                        repositories for related upstream Yocto Project
+                        Git repositories.
+                        </para></listitem>
+                    <listitem><para>
+                        Set up the directory for the shared state cache
+                        (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>)
+                        where it makes sense.
+                        For example, set up the sstate cache on a system used
+                        by developers in the same organization and share the
+                        same source directories on their machines.
+                        </para></listitem>
+                    <listitem><para>
+                        Set up an Autobuilder and have it populate the
+                        sstate cache and source directories.
+                        </para></listitem>
+                    <listitem><para>
+                        The Yocto Project community encourages you
+                        to send patches to the project to fix bugs or add features.
+                        If you do submit patches, follow the project commit
+                        guidelines for writing good commit messages.
+                        See the "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
+                        section.
+                        </para></listitem>
+                    <listitem><para>
+                        Send changes to the core sooner than later
+                        as others are likely to run into the same issues.
+                        For some guidance on mailing lists to use, see the list in the
+                        "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
+                        section.
+                        For a description of the available mailing lists, see the
+                        "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
+                        section in the Yocto Project Reference Manual.
+                        </para></listitem>
+                </itemizedlist>
+                </para></listitem>
+        </orderedlist>
+    </para>
+</section>
+
 <section id='setting-up-the-development-host-to-use-the-yocto-project'>
-    <title>Setting Up the Development Host to Use the Yocto Project</title>
+    <title>Preparing the Build Host</title>
 
     <para>
         This section provides procedures to set up your development host to
@@ -177,7 +545,7 @@
                     site.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Go the Install Site for Your Platform:</emphasis>
+                    <emphasis>Go to the Install Site for Your Platform:</emphasis>
                     Click the link for the Docker edition associated with
                     your development host machine's native software.
                     For example, if your machine is running Microsoft
@@ -213,8 +581,8 @@
                     the type of the software you need to install.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Optionally Orient Yourself With Dockers:</emphasis>
-                    If you are unfamiliar with Dockers and the container
+                    <emphasis>Optionally Orient Yourself With Docker:</emphasis>
+                    If you are unfamiliar with Docker and the container
                     concept, you can learn more here -
                     <ulink url='https://docs.docker.com/get-started/'></ulink>.
                     You should be able to launch Docker or the Docker Toolbox
@@ -250,25 +618,25 @@
     </section>
 </section>
 
-<section id='working-with-yocto-project-source-files'>
-    <title>Working With Yocto Project Source Files</title>
+<section id='locating-yocto-project-source-files'>
+    <title>Locating Yocto Project Source Files</title>
 
     <para>
-        This section contains procedures related to locating and securing
-        Yocto Project files.
+        This section contains procedures related to locating Yocto Project
+        files.
         You establish and use these local files to work on projects.
         <note><title>Notes</title>
             <itemizedlist>
                 <listitem><para>
                     For concepts and introductory information about Git as it
                     is used in the Yocto Project, see the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>"
-                    section in the Yocto Project Reference Manual.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                     </para></listitem>
                 <listitem><para>
                     For concepts on Yocto Project source repositories, see the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
-                    section in the Yocto Project Reference Manual."
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual."
                     </para></listitem>
             </itemizedlist>
         </note>
@@ -278,9 +646,20 @@
         <title>Accessing Source Repositories</title>
 
         <para>
-            Yocto Project maintains upstream Git
-            <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
-            that you can examine and access using a browser-based UI:
+            Working from a copy of the upstream Yocto Project
+            <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
+            is the preferred method for obtaining and using a Yocto Project
+            release.
+            You can view the Yocto Project Source Repositories at
+            <ulink url='&YOCTO_GIT_URL;'></ulink>.
+            In particular, you can find the
+            <filename>poky</filename> repository at
+            <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/'></ulink>.
+        </para>
+
+        <para>
+            Use the following procedure to locate the latest upstream copy of
+            the <filename>poky</filename> Git repository:
             <orderedlist>
                 <listitem><para>
                     <emphasis>Access Repositories:</emphasis>
@@ -290,24 +669,21 @@
                     repositories.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Select a Repository:</emphasis>
-                    Click on any repository in which you are interested (e.g.
+                    <emphasis>Select the Repository:</emphasis>
+                    Click on the repository in which you are interested (i.e.
                     <filename>poky</filename>).
                     </para></listitem>
                 <listitem><para>
                     <emphasis>Find the URL Used to Clone the Repository:</emphasis>
                     At the bottom of the page, note the URL used to
-                    <ulink url='&YOCTO_DOCS_REF_URL;#git-commands-clone'>clone</ulink>
+                    <ulink url='&YOCTO_DOCS_OM_URL;#git-commands-clone'>clone</ulink>
                     that repository (e.g.
                     <filename>&YOCTO_GIT_URL;/poky</filename>).
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Examine Change History of the Repository:</emphasis>
-                    At the top of the page, click on any branch in which you
-                    might be interested (e.g.
-                    <filename>&DISTRO_NAME_NO_CAP;</filename>).
-                    You can then view the commit log or tree view for that
-                    development branch.
+                    <note>
+                        For information on cloning a repository, see the
+                        "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
+                        section.
+                    </note>
                     </para></listitem>
             </orderedlist>
         </para>
@@ -319,12 +695,12 @@
         <para>
             Yocto Project maintains an Index of Releases area that contains
             related files that contribute to the Yocto Project.
-            Rather than Git repositories, these files represent snapshot
-            tarballs.
+            Rather than Git repositories, these files are tarballs that
+            represent snapshots in time of a given component.
             <note><title>Tip</title>
                 The recommended method for accessing Yocto Project
-                components is to use Git to clone a repository and work from
-                within that local repository.
+                components is to use Git to clone the upstream repository and
+                work from within that locally cloned repository.
                 The procedure in this section exists should you desire a
                 tarball snapshot of any given component.
             </note>
@@ -342,8 +718,8 @@
                         full array of released Poky tarballs.
                         The <filename>poky</filename> directory in the
                         Index of Releases was historically used for very
-                        early releases and exists for retroactive
-                        completeness only.
+                        early releases and exists now only for retroactive
+                        completeness.
                     </note>
                     </para></listitem>
                 <listitem><para>
@@ -361,7 +737,7 @@
                     </para></listitem>
                 <listitem><para>
                     <emphasis>Download the Tarball:</emphasis>
-                    Click a tarball to download and save a snapshot of a
+                    Click the tarball to download and save a snapshot of the
                     given component.
                     </para></listitem>
             </orderedlist>
@@ -374,7 +750,7 @@
         <para>
             The
             <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
-            uses a "Downloads" area from which you can locate and download
+            uses a "DOWNLOADS" page from which you can locate and download
             tarballs of any Yocto Project release.
             Rather than Git repositories, these files represent snapshot
             tarballs.
@@ -394,52 +770,100 @@
                     </para></listitem>
                 <listitem><para>
                     <emphasis>Get to the Downloads Area:</emphasis>
-                    Click the "Downloads" tab.
+                    Select the "DOWNLOADS" item from the pull-down
+                    "SOFTWARE" tab menu.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Select the Type of Files:</emphasis>
-                    Click the type of files you want (i.e "Build System",
-                    "Tools", or "Board Support Packages (BSPs)".
+                    <emphasis>Select a Yocto Project Release:</emphasis>
+                    Use the menu next to "RELEASE" to display and choose
+                    a Yocto Project release (e.g. sumo, rocko, pyro, and
+                    so forth.
+                    For a "map" of Yocto Project releases to version numbers,
+                    see the
+                    <ulink url='https://wiki.yoctoproject.org/wiki/Releases'>Releases</ulink>
+                    wiki page.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Locate and Download the Tarball:</emphasis>
-                    From the list of releases, locate the appropriate
-                    download link and download the files.
+                    <emphasis>Download Tools or Board Support Packages (BSPs):</emphasis>
+                    From the "DOWNLOADS" page, you can download tools or
+                    BSPs as well.
+                    Just scroll down the page and look for what you need.
                     </para></listitem>
             </orderedlist>
         </para>
     </section>
 
+    <section id='accessing-nightly-builds'>
+        <title>Accessing Nightly Builds</title>
+
+        <para>
+            Yocto Project maintains an area for nightly builds that contains
+            tarball releases at <ulink url='&YOCTO_AB_NIGHTLY_URL;'/>.
+            These builds include Yocto Project releases, SDK installation
+            scripts, and experimental builds.
+        </para>
+
+        <para>
+            Should you ever want to access a nightly build of a particular
+            Yocto Project component, use the following procedure:
+            <orderedlist>
+                <listitem><para>
+                    <emphasis>Access the Nightly Builds:</emphasis>
+                    Open a browser and go to
+                    <ulink url='&YOCTO_AB_NIGHTLY_URL;'/> to access the
+                    Nightly Builds.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Select a Build:</emphasis>
+                    Click on any build by date in which you are interested.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Find the Tarball:</emphasis>
+                    Drill down to find the associated tarball.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Download the Tarball:</emphasis>
+                    Click the tarball to download and save a snapshot of the
+                    given component.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+</section>
+
+<section id='cloning-and-checking-out-branchs'>
+    <title>Cloning and Checking Out Branches</title>
+
+    <para>
+        To use the Yocto Project, you need a release of the Yocto Project
+        locally installed on your development system.
+        The locally installed set of files is referred to as the
+        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+        in the Yocto Project documentation.
+    </para>
+
+    <para>
+        You create your Source Directory by using
+        <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> to clone a local
+        copy of the upstream <filename>poky</filename> repository.
+        <note><title>Tip</title>
+            The preferred method of getting the Yocto Project Source
+            Directory set up is to clone the repository.
+        </note>
+        Working from a copy of the upstream repository allows you
+        to contribute back into the Yocto Project or simply work with
+        the latest software on a development branch.
+        Because Git maintains and creates an upstream repository with
+        a complete history of changes and you are working with a local
+        clone of that repository, you have access to all the Yocto
+        Project development branches and tag names used in the upstream
+        repository.
+    </para>
+
     <section id='cloning-the-poky-repository'>
         <title>Cloning the <filename>poky</filename> Repository</title>
 
         <para>
-            To use the Yocto Project, you need a release of the Yocto Project
-            locally installed on your development system.
-            The locally installed set of files is referred to as the
-            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-            in the Yocto Project documentation.
-        </para>
-
-        <para>
-            You create your Source Directory by using
-            <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink> to clone a local
-            copy of the upstream <filename>poky</filename> repository.
-            <note><title>Tip</title>
-                The preferred method of getting the Yocto Project Source
-                Directory set up is to clone the repository.
-            </note>
-            Working from a copy of the upstream repository allows you
-            to contribute back into the Yocto Project or simply work with
-            the latest software on a development branch.
-            Because Git maintains and creates an upstream repository with
-            a complete history of changes and you are working with a local
-            clone of that repository, you have access to all the Yocto
-            Project development branches and tag names used in the upstream
-            repository.
-        </para>
-
-        <para>
             Follow these steps to create a local version of the
             upstream
             <ulink url='&YOCTO_DOCS_REF_URL;#poky'><filename>poky</filename></ulink>
@@ -473,8 +897,8 @@
                     branch based on a tag name, see the
                     "<link linkend='checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</link>"
                     and
-                    <link linkend='checkout-out-by-tag-in-poky'>Checking Out By Tag in Poky</link>",
-                    respectively.</para>
+                    <link linkend='checkout-out-by-tag-in-poky'>Checking Out By Tag in Poky</link>"
+                    sections, respectively.</para>
 
                     <para>Once the repository is created, you can change to
                     that directory and check its status.
@@ -635,7 +1059,7 @@
                 <listitem><para>
                     <emphasis>Checkout the Branch:</emphasis>
                     <literallayout class='monospaced'>
-     $ git checkout tags/&DISTRO; -b my_yocto_&DISTRO;
+     $ git checkout tags/&DISTRO_REL_TAG; -b my_yocto_&DISTRO;
      Switched to a new branch 'my_yocto_&DISTRO;'
      $ git branch
        master
@@ -656,95 +1080,6 @@
     </section>
 </section>
 
-<section id='performing-a-simple-build'>
-    <title>Performing a Simple Build</title>
-
-    <para>
-        Several methods exist that allow you to build an image within the
-        Yocto Project.
-        This procedure shows how to build an image using BitBake from a
-        Linux host.
-        <note><title>Notes</title>
-            <itemizedlist>
-                <listitem><para>
-                    For information on how to build an image using
-                    <ulink url='&YOCTO_DOCS_REF_URL;#toaster-term'>Toaster</ulink>,
-                    see the
-                    <ulink url='&YOCTO_DOCS_TOAST_URL;'>Yocto Project Toaster Manual</ulink>.
-                    </para></listitem>
-                <listitem><para>
-                    For information on how to use
-                    <filename>devtool</filename> to build images, see the
-                    "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in Your SDK Workflow</ulink>"
-                    section in the Yocto Project Application Development and
-                    the Extensible Software Development Kit (eSDK) manual.
-                    </para></listitem>
-            </itemizedlist>
-        </note>
-    </para>
-
-    <para>
-        The build process creates an entire Linux distribution from source
-        and places it in your
-        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
-        under <filename>tmp/deploy/images</filename>.
-        For detailed information on the build process using BitBake, see the
-        "<ulink url='&YOCTO_DOCS_REF_URL;#images-dev-environment'>Images</ulink>"
-        section in the Yocto Project Reference Manual.
-        You can also reference the
-        "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
-        section in the Yocto Project Quick Start.
-    </para>
-
-    <para>
-        The following figure and list overviews the build process:
-        <imagedata fileref="figures/bitbake-build-flow.png" width="7in" depth="4in" align="center" scalefit="1" />
-        <orderedlist>
-            <listitem><para>
-                <emphasis>Set up Your Host Development System to Support
-                Development Using the Yocto Project</emphasis>:
-                See the
-                "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
-                section in the Yocto Project Quick Start for options on how
-                to get a build host ready to use the Yocto Project.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Initialize the Build Environment:</emphasis>
-                Initialize the build environment by sourcing the build
-                environment script (i.e.
-                <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>).
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Make Sure Your <filename>local.conf</filename>
-                File is Correct:</emphasis>
-                Ensure the <filename>conf/local.conf</filename> configuration
-                file, which is found in the
-                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
-                is set up how you want it.
-                This file defines many aspects of the build environment
-                including the target machine architecture through the
-                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'>MACHINE</ulink></filename> variable,
-                the packaging format used during the build
-                (<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>),
-                and a centralized tarball download directory through the
-                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'>DL_DIR</ulink></filename> variable.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Build the Image:</emphasis>
-                Build the image using the <filename>bitbake</filename> command.
-                For example, the following command builds the
-                <filename>core-image-minimal</filename> image:
-                <literallayout class='monospaced'>
-     $ bitbake core-image-minimal
-                </literallayout>
-                For information on BitBake, see the
-                <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
-                </para></listitem>
-        </orderedlist>
-    </para>
-</section>
-
--->
 </chapter>
 <!--
 vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml
index ed8011d..93a615c 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml
@@ -102,14 +102,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
         </revhistory>
 
@@ -133,24 +128,36 @@
                        is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
     </legalnotice>
@@ -161,8 +168,6 @@
 
     <xi:include href="dev-manual-start.xml"/>
 
-    <xi:include href="dev-manual-newbie.xml"/>
-
     <xi:include href="dev-manual-common-tasks.xml"/>
 
     <xi:include href="dev-manual-qemu.xml"/>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/buildhistory-web.png b/import-layers/yocto-poky/documentation/dev-manual/figures/buildhistory-web.png
similarity index 100%
rename from import-layers/yocto-poky/documentation/ref-manual/figures/buildhistory-web.png
rename to import-layers/yocto-poky/documentation/dev-manual/figures/buildhistory-web.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/buildhistory.png b/import-layers/yocto-poky/documentation/dev-manual/figures/buildhistory.png
similarity index 100%
rename from import-layers/yocto-poky/documentation/ref-manual/figures/buildhistory.png
rename to import-layers/yocto-poky/documentation/dev-manual/figures/buildhistory.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
index c3013b8..5c76ed2 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
@@ -21,7 +21,7 @@
     <para>
         Kernel Metadata exists in many places.
         One area in the Yocto Project
-        <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+        <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
         is the <filename>yocto-kernel-cache</filename> Git repository.
         You can find this repository grouped under the "Yocto Linux Kernel"
         heading in the
@@ -64,8 +64,7 @@
         <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>
         variable.
         This variable is typically set to the same value as the
-        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
-        variable, which is used by
+        <filename>MACHINE</filename> variable, which is used by
         <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>.
         However, in some cases, the variable might instead refer to the
         underlying platform of the <filename>MACHINE</filename>.
@@ -77,8 +76,7 @@
         Multiple Corei7-based BSPs could share the same "intel-corei7-64"
         value for <filename>KMACHINE</filename>.
         It is important to realize that <filename>KMACHINE</filename> is
-        just for kernel mapping, while
-        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+        just for kernel mapping, while <filename>MACHINE</filename>
         is the machine type within a BSP Layer.
         Even with this distinction, however, these two variables can hold
         the same value.
@@ -116,8 +114,7 @@
         used in assembling the configuration.
         If you do not specify a <filename>LINUX_KERNEL_TYPE</filename>,
         it defaults to "standard".
-        Together with
-        <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
+        Together with <filename>KMACHINE</filename>,
         <filename>LINUX_KERNEL_TYPE</filename> defines the search
         arguments used by the kernel tools to find the
         appropriate description within the kernel Metadata with which to
@@ -631,8 +628,10 @@
             <note>
                 For BSPs supported by the Yocto Project, the BSP description
                 files are located in the <filename>bsp</filename> directory
-                of the <filename>yocto-kernel-cache</filename> repository
-                organized under the "Yocto Linux Kernel" heading in the
+                of the
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/bsp'><filename>yocto-kernel-cache</filename></ulink>
+                repository organized under the "Yocto Linux Kernel" heading
+                in the
                 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Yocto Project Source Repositories</ulink>.
             </note>
         </para>
@@ -641,27 +640,30 @@
             This section overviews the BSP description structure, the
             aggregation concepts, and presents a detailed example using
             a BSP supported by the Yocto Project (i.e. BeagleBone Board).
+            For complete information on BSP layer file hierarchy, see the
+            <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
         </para>
 
         <section id='bsp-description-file-overview'>
             <title>Overview</title>
 
             <para>
-                For simplicity, consider the following top-level BSP
+                For simplicity, consider the following root BSP layer
                 description files for the BeagleBone board.
-                Top-level BSP descriptions files employ both a structure
-                and naming convention for consistency.
+                These files employ both a structure and naming convention
+                for consistency.
                 The naming convention for the file is as follows:
                 <literallayout class='monospaced'>
-     <replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
+     <replaceable>bsp_root_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
                 </literallayout>
-                Here are some example top-level BSP filenames for the
+                Here are some example root layer BSP filenames for the
                 BeagleBone Board BSP, which is supported by the Yocto Project:
                 <literallayout class='monospaced'>
      beaglebone-standard.scc
      beaglebone-preempt-rt.scc
                 </literallayout>
-                Each file uses the BSP name followed by the kernel type.
+                Each file uses the root name (i.e "beaglebone") BSP name
+                followed by the kernel type.
             </para>
 
             <para>
@@ -850,7 +852,7 @@
 
             <para>
                 Now consider the "minnow" description for the "tiny" kernel
-                type (i.e. <filename>minnow-tiny.scc</filename>:
+                type (i.e. <filename>minnow-tiny.scc</filename>):
                 <literallayout class='monospaced'>
         define KMACHINE minnow
         define KTYPE tiny
@@ -1012,8 +1014,7 @@
 
         <para>
             If you modify the Metadata, you must not forget to update the
-            <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
-            statements in the kernel's recipe.
+            <filename>SRCREV</filename> statements in the kernel's recipe.
             In particular, you need to update the
             <filename>SRCREV_meta</filename> variable to match the commit in
             the <filename>KMETA</filename> branch you wish to use.
@@ -1221,9 +1222,13 @@
                 </para></listitem>
             <listitem><para>
                 <filename>define</filename>:
-                Defines variables, such as <filename>KMACHINE</filename>,
-                <filename>KTYPE</filename>, <filename>KARCH</filename>,
-                and <filename>KFEATURE_DESCRIPTION</filename>.</para></listitem>
+                Defines variables, such as
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>,
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-KARCH'><filename>KARCH</filename></ulink>,
+                and
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION'><filename>KFEATURE_DESCRIPTION</filename></ulink>.
+                </para></listitem>
             <listitem><para>
                 <filename>include SCC_FILE</filename>:
                 Includes an SCC file in the current file.
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
index b8fd870..299bac4 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
@@ -25,7 +25,7 @@
             Before you can do any kernel development, you need to be
             sure your build host is set up to use the Yocto Project.
             For information on how to get set up, see the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up to Use the Yocto Project</ulink>"
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Preparing the Build Host</ulink>"
             section in the Yocto Project Development Tasks Manual.
             Part of preparing the system is creating a local Git
             repository of the
@@ -79,7 +79,7 @@
                         </literallayout>
                         <note>
                             The previous commands assume the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+                            <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
                             (i.e. <filename>poky</filename>) have been cloned
                             using Git and the local repository is named
                             "poky".
@@ -136,7 +136,7 @@
                             Developer's Guide, respectively.
                             For information on how to use the
                             <filename>bitbake-layers create-layer</filename>
-                            command, see the
+                            command to quickly set up a layer, see the
                             "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
                             section in the Yocto Project Development Tasks
                             Manual.
@@ -303,7 +303,7 @@
                         </literallayout>
                         <note>
                             The previous commands assume the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+                            <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
                             (i.e. <filename>poky</filename>) have been cloned
                             using Git and the local repository is named
                             "poky".
@@ -360,7 +360,7 @@
                             Developer's Guide, respectively.
                             For information on how to use the
                             <filename>bitbake-layers create-layer</filename>
-                            command, see the
+                            command to quickly set up a layer, see the
                             "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
                             section in the Yocto Project Development Tasks
                             Manual.
@@ -387,7 +387,7 @@
                         You can find Git repositories of supported Yocto Project
                         kernels organized under "Yocto Linux Kernel" in the
                         Yocto Project Source Repositories at
-                        <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
+                        <ulink url='&YOCTO_GIT_URL;'></ulink>.
                         </para>
 
                         <para>
@@ -489,7 +489,8 @@
                 See the
                 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
                 section in the Yocto Project Development Tasks Manual for
-                information on how to use this script.
+                information on how to use this script to quick set up a
+                new layer.
             </note>
         </para>
 
@@ -1224,18 +1225,6 @@
             the
             "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
             Section.
-        </para>
-
-        <para>
-            Although this example uses Git and shell commands to generate the
-            patch, you could use the <filename>yocto-kernel</filename> script
-            found in the <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-            under <filename>scripts</filename> to add and manage kernel
-            patches and configuration.
-            See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>"
-            section in the Yocto Project Board Support Packages (BSP)
-            Developer's Guide for more information on the
-            <filename>yocto-kernel</filename> script.
             <orderedlist>
                 <listitem><para>
                     <emphasis>Edit the Source Files</emphasis>
@@ -1413,9 +1402,9 @@
      SRC_URI_append = " file://0001-calibrate.c-Added-some-printk-statements.patch"
                     </literallayout>
                     The
-                    <ulink url='&YOCTO_DOCS_REF_URL;var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
                     and
-                    <ulink url='&YOCTO_DOCS_REF_URL;var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
                     statements enable the OpenEmbedded build system to find
                     the patch file.</para>
 
@@ -1667,7 +1656,7 @@
                     after applying the existing defconfig file configurations.
                 </note>
                 For more information on configuring the kernel, see the
-                "<link link='changing-the-configuration'>Changing the Configuration</link>"
+                "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
                 section.
             </para>
         </section>
@@ -2429,7 +2418,7 @@
                 modules.
                 If your module <filename>Makefile</filename> uses a different
                 variable, you might want to override the
-                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile()</filename></ulink>
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
                 step, or create a patch to
                 the <filename>Makefile</filename> to work with the more typical
                 <filename>KERNEL_SRC</filename> or
@@ -2505,7 +2494,7 @@
                     the Git commands.
                     You can see the branch names through the web interface
                     to the Yocto Project source repositories at
-                    <ulink url='http://git.yoctoproject.org/cgit.cgi'></ulink>.
+                    <ulink url='&YOCTO_GIT_URL;'></ulink>.
                 </note>
                 To see a full range of the changes, use the
                 <filename>git whatchanged</filename> command and specify a
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml
index fbecc13..6d675a6 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml
@@ -49,7 +49,7 @@
 
         <para>
             You can find a web interface to the Yocto Linux kernels in the
-            <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+            <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
             at
             <ulink url='&YOCTO_GIT_URL;'></ulink>.
             If you look at the interface, you will see to the left a
@@ -239,8 +239,9 @@
                         <ulink url='http://git-scm.com/documentation'></ulink>.
                         You can also get an introduction to Git as it
                         applies to the Yocto Project in the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>"
-                        section in the Yocto Project Reference Manual.
+                        "<ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>"
+                        section in the Yocto Project Overview and Concepts
+                        Manual.
                         The latter reference provides an overview of
                         Git and presents a minimal set of Git commands
                         that allows you to be functional using Git.
@@ -381,7 +382,7 @@
                 generic kernel just for conceptual purposes.
                 Also keep in mind that this structure represents the Yocto
                 Project
-                <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+                <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
                 that are either pulled from during the build or established
                 on the host development system prior to the build by either
                 cloning a particular kernel's Git repository or by
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml
index dba4549..4e4fd28 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml
@@ -108,7 +108,11 @@
         review and understand the following documentation:
         <itemizedlist>
             <listitem><para>
-                <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
+                <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
+                document.
+                </para></listitem>
+            <listitem><para>
+                <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>.
                 </para></listitem>
             <listitem><para>
                 <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink>
@@ -127,18 +131,6 @@
                 </para></listitem>
         </itemizedlist>
     </para>
-
-    <para>
-        Finally, while this document focuses on the manual creation of
-        recipes, patches, and configuration files, the Yocto Project
-        Board Support Package (BSP) tools are available to automate
-        this process with existing content and work well to create the
-        initial framework and boilerplate code.
-        For details on these tools, see the
-        "<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>"
-        section in the Yocto Project Board Support Package (BSP) Developer's
-        Guide.
-    </para>
 </section>
 
 <section id='kernel-modification-workflow'>
@@ -165,12 +157,15 @@
     <para>
         <orderedlist>
             <listitem><para>
-                <emphasis>Set Up Your Host Development System to Support
-                Development Using the Yocto Project:</emphasis>
+
+
+                <emphasis>Set up Your Host Development System to Support
+                Development Using the Yocto Project</emphasis>:
                 See the
-                "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
-                section in the Yocto Project Quick Start for options on how
-                to get a build host ready to use the Yocto Project.
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-start'>Setting Up the Development Host to Use the Yocto Project</ulink>"
+                section in the Yocto Project Development Tasks Manual for
+                options on how to get a build host ready to use the Yocto
+                Project.
                 </para></listitem>
             <listitem><para>
                 <emphasis>Set Up Your Host Development System for Kernel Development:</emphasis>
@@ -243,11 +238,7 @@
 
                 <para>Additionally, if you are working in a BSP layer
                 and need to modify the BSP's kernel's configuration,
-                you can use the
-                <ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'><filename>yocto-kernel</filename></ulink>
-                script as well as <filename>menuconfig</filename>.
-                The <filename>yocto-kernel</filename> script lets
-                you interactively set up kernel configurations.
+                you can use <filename>menuconfig</filename>.
                 </para></listitem>
             <listitem><para>
                 <emphasis>Rebuild the Kernel Image With Your Changes:</emphasis>
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml
index f5fd183..b825ae7 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml
@@ -14,7 +14,7 @@
             create Yocto Linux kernel repositories.
             These kernel repositories are found under the heading "Yocto Linux
             Kernel" at
-            <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>&YOCTO_GIT_URL;/cgit.cgi</ulink>
+            <ulink url='&YOCTO_GIT_URL;'>&YOCTO_GIT_URL;</ulink>
             and are shipped as part of a Yocto Project release.
             The team creates these repositories by compiling and executing the
             set of feature descriptions for every BSP and feature in the
@@ -118,13 +118,13 @@
             The following steps describe what happens when the Yocto Project
             Team constructs the Yocto Project kernel source Git repository
             (or tree) found at
-            <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> given the
+            <ulink url='&YOCTO_GIT_URL;'></ulink> given the
             introduction of a new top-level kernel feature or BSP.
-            These are the actions that effectively provide the Metadata
-            and create the tree that includes the new feature, patch or BSP:
+            The following actions effectively provide the Metadata
+            and create the tree that includes the new feature, patch, or BSP:
             <orderedlist>
                 <listitem><para>
-                    <emphasis>Pass Feature to Build Subsystem:</emphasis>
+                    <emphasis>Pass Feature to the OpenEmbedded Build System:</emphasis>
                     A top-level kernel feature is passed to the kernel build
                     subsystem.
                     Normally, this feature is a BSP for a particular kernel
@@ -138,8 +138,10 @@
                         <listitem><para>
                             The in-tree kernel-cache directories, which are
                             located in the
-                            <filename>yocto-kernel-cache</filename>
-                            repository
+                            <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/bsp'><filename>yocto-kernel-cache</filename></ulink>
+                            repository organized under the "Yocto Linux Kernel"
+                            heading in the
+                            <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Yocto Project Source Repositories</ulink>.
                             </para></listitem>
                         <listitem><para>
                             Areas pointed to by <filename>SRC_URI</filename>
@@ -148,9 +150,11 @@
                     </itemizedlist>
                     For a typical build, the target of the search is a
                     feature description in an <filename>.scc</filename> file
-                    whose name follows this format:
+                    whose name follows this format (e.g.
+                    <filename>beaglebone-standard.scc</filename> and
+                    <filename>beaglebone-preempt-rt.scc</filename>):
                     <literallayout class='monospaced'>
-     <replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
+     <replaceable>bsp_root_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
                     </literallayout>
                 </para></listitem>
                 <listitem><para>
@@ -213,7 +217,7 @@
                         end of an existing branch.
                         The full repository generation that is found in the
                         official Yocto Project kernel repositories at
-                        <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>http://git.yoctoproject.org/cgit.cgi</ulink>
+                        <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>
                         is the combination of all supported boards and
                         configurations.
                         </para></listitem>
@@ -227,7 +231,7 @@
                         </para></listitem>
                     <listitem><para>
                         The full kernel tree that you see on
-                        <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> is
+                        <ulink url='&YOCTO_GIT_URL;'></ulink> is
                         generated through repeating the above steps for all
                         valid BSPs.
                         The end result is a branched, clean history tree that
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml
index ec36d24..986c440 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml
@@ -87,14 +87,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
         </revhistory>
 
@@ -116,24 +111,36 @@
                        is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
     </legalnotice>
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/analysis-for-package-splitting.png b/import-layers/yocto-poky/documentation/mega-manual/figures/analysis-for-package-splitting.png
index 04f2794..0cb0386 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/analysis-for-package-splitting.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/analysis-for-package-splitting.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png
index 0f82a1f..2ca1fec 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/bypqs-title.png b/import-layers/yocto-poky/documentation/mega-manual/figures/bypqs-title.png
new file mode 100644
index 0000000..9e0a5ce
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/bypqs-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/concepts-manual-title.png b/import-layers/yocto-poky/documentation/mega-manual/figures/concepts-manual-title.png
new file mode 100644
index 0000000..bac7a69
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/concepts-manual-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/configuration-compile-autoreconf.png b/import-layers/yocto-poky/documentation/mega-manual/figures/configuration-compile-autoreconf.png
index a07464f..043d195 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/configuration-compile-autoreconf.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/configuration-compile-autoreconf.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/cross-development-toolchains.png b/import-layers/yocto-poky/documentation/mega-manual/figures/cross-development-toolchains.png
index d36670a..cbe8371 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/cross-development-toolchains.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/cross-development-toolchains.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/image-generation.png b/import-layers/yocto-poky/documentation/mega-manual/figures/image-generation.png
index 71a48dc..aff9fc2 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/image-generation.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/image-generation.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/images.png b/import-layers/yocto-poky/documentation/mega-manual/figures/images.png
index d99eac1..20c0130 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/images.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/images.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/key-dev-elements.png b/import-layers/yocto-poky/documentation/mega-manual/figures/key-dev-elements.png
new file mode 100644
index 0000000..76c4405
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/key-dev-elements.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/layer-input.png b/import-layers/yocto-poky/documentation/mega-manual/figures/layer-input.png
index 0a4f2e7..29b56f9 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/layer-input.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/layer-input.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/overview-manual-title.png b/import-layers/yocto-poky/documentation/mega-manual/figures/overview-manual-title.png
new file mode 100644
index 0000000..41e9012
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/overview-manual-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/package-feeds.png b/import-layers/yocto-poky/documentation/mega-manual/figures/package-feeds.png
index 37c9c32..7592839 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/package-feeds.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/package-feeds.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/patching.png b/import-layers/yocto-poky/documentation/mega-manual/figures/patching.png
index 8ecd018..80fba7e 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/patching.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/patching.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/poky-reference-distribution.png b/import-layers/yocto-poky/documentation/mega-manual/figures/poky-reference-distribution.png
new file mode 100644
index 0000000..1be89ae
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/poky-reference-distribution.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-autotools-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-autotools-flow.png
new file mode 100644
index 0000000..ec6685f
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-autotools-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-add-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-add-flow.png
index c09e60e..e7d6173 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-add-flow.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-add-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-modify-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-modify-flow.png
index cd06c01..18ba8b7 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-modify-flow.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-modify-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-upgrade-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-upgrade-flow.png
index 65474da..7d4f395 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-upgrade-flow.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-devtool-upgrade-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-generation.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-generation.png
old mode 100755
new mode 100644
index adbe1f4..939f839
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-generation.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-generation.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-makefile-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-makefile-flow.png
new file mode 100644
index 0000000..0ccb418
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-makefile-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk.png
index 5c36b75..a376872 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/source-fetching.png b/import-layers/yocto-poky/documentation/mega-manual/figures/source-fetching.png
index 26aefb5..bf5e187 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/source-fetching.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/source-fetching.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/source-input.png b/import-layers/yocto-poky/documentation/mega-manual/figures/source-input.png
index f751505..6b6ba4b 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/source-input.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/source-input.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/user-configuration.png b/import-layers/yocto-poky/documentation/mega-manual/figures/user-configuration.png
old mode 100755
new mode 100644
index c298401..1424547
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/user-configuration.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/user-configuration.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/yocto-environment-ref.png b/import-layers/yocto-poky/documentation/mega-manual/figures/yocto-environment-ref.png
deleted file mode 100644
index 650c6c8..0000000
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/yocto-environment-ref.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/yp-download.png b/import-layers/yocto-poky/documentation/mega-manual/figures/yp-download.png
index 5770be6..bfd12b6 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/yp-download.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/yp-download.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml b/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml
index a941d79..2c0943e 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml
+++ b/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml
@@ -71,14 +71,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
        </revhistory>
 
@@ -100,24 +95,36 @@
                        is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
 
@@ -125,10 +132,32 @@
 
     </bookinfo>
 
-<!-- Includes yocto-project-qs -->
+<!-- Includes brief-yoctoprojectqs -->
+
+    <para>
+        <imagedata fileref="figures/bypqs-title.png" width="100%" align="left" scalefit="1" />
+    </para>
 
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../yocto-project-qs/yocto-project-qs.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../brief-yoctoprojectqs/brief-yoctoprojectqs.xml"/>
+
+<!-- Includes overview-manual title image and then overview-manual chapters -->
+
+    <para>
+        <imagedata fileref="figures/overview-manual-title.png" width="100%" align="left" scalefit="1" />
+    </para>
+
+    <xi:include
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-intro.xml"/>
+
+    <xi:include
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-yp-intro.xml"/>
+
+    <xi:include
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-development-environment.xml"/>
+
+    <xi:include
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-concepts.xml"/>
 
 <!-- Includes dev-manual title image and then dev-manual chapters -->
 
@@ -141,8 +170,6 @@
     <xi:include
         xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-start.xml"/>
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-newbie.xml"/>
-    <xi:include
         xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-common-tasks.xml"/>
     <xi:include
         xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-qemu.xml"/>
@@ -170,7 +197,7 @@
     <xi:include
         xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-customizing-standard.xml"/>
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-mars.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-neon.xml"/>
 
 <!-- Includes bsp-guide title image and then bsp-guide chapters -->
 
@@ -220,16 +247,10 @@
     </para>
 
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/introduction.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-system-requirements.xml"/>
 
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/usingpoky.xml"/>
-
-    <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-development-environment.xml"/>
-
-    <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/technical-details.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-terms.xml"/>
 
     <xi:include
         xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-release-process.xml"/>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/YP-flow-diagram.png b/import-layers/yocto-poky/documentation/overview-manual/figures/YP-flow-diagram.png
similarity index 100%
rename from import-layers/yocto-poky/documentation/ref-manual/figures/YP-flow-diagram.png
rename to import-layers/yocto-poky/documentation/overview-manual/figures/YP-flow-diagram.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/analysis-for-package-splitting.png b/import-layers/yocto-poky/documentation/overview-manual/figures/analysis-for-package-splitting.png
new file mode 100644
index 0000000..0cb0386
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/analysis-for-package-splitting.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/configuration-compile-autoreconf.png b/import-layers/yocto-poky/documentation/overview-manual/figures/configuration-compile-autoreconf.png
new file mode 100644
index 0000000..043d195
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/configuration-compile-autoreconf.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/cross-development-toolchains.png b/import-layers/yocto-poky/documentation/overview-manual/figures/cross-development-toolchains.png
new file mode 100644
index 0000000..cbe8371
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/cross-development-toolchains.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/git-workflow.png b/import-layers/yocto-poky/documentation/overview-manual/figures/git-workflow.png
similarity index 100%
rename from import-layers/yocto-poky/documentation/ref-manual/figures/git-workflow.png
rename to import-layers/yocto-poky/documentation/overview-manual/figures/git-workflow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/image-generation.png b/import-layers/yocto-poky/documentation/overview-manual/figures/image-generation.png
new file mode 100644
index 0000000..aff9fc2
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/image-generation.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/images.png b/import-layers/yocto-poky/documentation/overview-manual/figures/images.png
new file mode 100644
index 0000000..20c0130
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/images.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/index-downloads.png b/import-layers/yocto-poky/documentation/overview-manual/figures/index-downloads.png
similarity index 100%
rename from import-layers/yocto-poky/documentation/ref-manual/figures/index-downloads.png
rename to import-layers/yocto-poky/documentation/overview-manual/figures/index-downloads.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/key-dev-elements.png b/import-layers/yocto-poky/documentation/overview-manual/figures/key-dev-elements.png
new file mode 100644
index 0000000..76c4405
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/key-dev-elements.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/layer-input.png b/import-layers/yocto-poky/documentation/overview-manual/figures/layer-input.png
new file mode 100644
index 0000000..29b56f9
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/layer-input.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/overview-manual-title.png b/import-layers/yocto-poky/documentation/overview-manual/figures/overview-manual-title.png
new file mode 100644
index 0000000..41e9012
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/overview-manual-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/package-feeds.png b/import-layers/yocto-poky/documentation/overview-manual/figures/package-feeds.png
new file mode 100644
index 0000000..7592839
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/package-feeds.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/patching.png b/import-layers/yocto-poky/documentation/overview-manual/figures/patching.png
new file mode 100644
index 0000000..80fba7e
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/patching.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/poky-reference-distribution.png b/import-layers/yocto-poky/documentation/overview-manual/figures/poky-reference-distribution.png
new file mode 100644
index 0000000..1be89ae
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/poky-reference-distribution.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/sdk-generation.png b/import-layers/yocto-poky/documentation/overview-manual/figures/sdk-generation.png
new file mode 100644
index 0000000..939f839
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/sdk-generation.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/sdk.png b/import-layers/yocto-poky/documentation/overview-manual/figures/sdk.png
new file mode 100644
index 0000000..a376872
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/sdk.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/source-fetching.png b/import-layers/yocto-poky/documentation/overview-manual/figures/source-fetching.png
new file mode 100644
index 0000000..bf5e187
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/source-fetching.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/source-input.png b/import-layers/yocto-poky/documentation/overview-manual/figures/source-input.png
new file mode 100644
index 0000000..6b6ba4b
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/source-input.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/source-repos.png b/import-layers/yocto-poky/documentation/overview-manual/figures/source-repos.png
new file mode 100644
index 0000000..603300b
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/source-repos.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/user-configuration.png b/import-layers/yocto-poky/documentation/overview-manual/figures/user-configuration.png
new file mode 100644
index 0000000..1424547
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/user-configuration.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/figures/yp-download.png b/import-layers/yocto-poky/documentation/overview-manual/figures/yp-download.png
new file mode 100644
index 0000000..bfd12b6
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/figures/yp-download.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual-concepts.xml b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-concepts.xml
new file mode 100644
index 0000000..338a190
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-concepts.xml
@@ -0,0 +1,3232 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id=' overview-manual-concepts'>
+<title>Yocto Project Concepts</title>
+
+    <para>
+        This chapter provides explanations for Yocto Project concepts that
+        go beyond the surface of "how-to" information and reference (or
+        look-up) material.
+        Concepts such as components, the
+        <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+        workflow, cross-development toolchains, shared state cache, and so
+        forth are explained.
+    </para>
+
+    <section id='yocto-project-components'>
+        <title>Yocto Project Components</title>
+
+        <para>
+            The
+            <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+            task executor together with various types of configuration files
+            form the
+            <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core</ulink>.
+            This section overviews these components by describing their use and
+            how they interact.
+        </para>
+
+        <para>
+            BitBake handles the parsing and execution of the data files.
+            The data itself is of various types:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>Recipes:</emphasis>
+                    Provides details about particular pieces of software.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Class Data:</emphasis>
+                    Abstracts common build information (e.g. how to build a
+                    Linux kernel).
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Configuration Data:</emphasis>
+                    Defines machine-specific settings, policy decisions, and
+                    so forth.
+                    Configuration data acts as the glue to bind everything
+                    together.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            BitBake knows how to combine multiple data sources together and
+            refers to each data source as a layer.
+            For information on layers, see the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+            section of the Yocto Project Development Tasks Manual.
+        </para>
+
+        <para>
+            Following are some brief details on these core components.
+            For additional information on how these components interact during
+            a build, see the
+            "<link linkend='openembedded-build-system-build-concepts'>OpenEmbedded Build System Concepts</link>"
+            section.
+        </para>
+
+        <section id='usingpoky-components-bitbake'>
+            <title>BitBake</title>
+
+            <para>
+                BitBake is the tool at the heart of the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+                and is responsible for parsing the
+                <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
+                generating a list of tasks from it, and then executing those
+                tasks.
+            </para>
+
+            <para>
+                This section briefly introduces BitBake.
+                If you want more information on BitBake, see the
+                <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
+            </para>
+
+            <para>
+                To see a list of the options BitBake supports, use either of
+                the following commands:
+                <literallayout class='monospaced'>
+     $ bitbake -h
+     $ bitbake --help
+                </literallayout>
+            </para>
+
+            <para>
+                The most common usage for BitBake is
+                <filename>bitbake <replaceable>packagename</replaceable></filename>,
+                where <filename>packagename</filename> is the name of the
+                package you want to build (referred to as the "target").
+                The target often equates to the first part of a recipe's
+                filename (e.g. "foo" for a recipe named
+                <filename>foo_1.3.0-r0.bb</filename>).
+                So, to process the
+                <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you
+                might type the following:
+                <literallayout class='monospaced'>
+     $ bitbake matchbox-desktop
+                </literallayout>
+                Several different versions of
+                <filename>matchbox-desktop</filename> might exist.
+                BitBake chooses the one selected by the distribution
+                configuration.
+                You can get more details about how BitBake chooses between
+                different target versions and providers in the
+                "<ulink url='&YOCTO_DOCS_BB_URL;#bb-bitbake-preferences'>Preferences</ulink>"
+                section of the BitBake User Manual.
+            </para>
+
+            <para>
+                BitBake also tries to execute any dependent tasks first.
+                So for example, before building
+                <filename>matchbox-desktop</filename>, BitBake would build a
+                cross compiler and <filename>glibc</filename> if they had not
+                already been built.
+            </para>
+
+            <para>
+                A useful BitBake option to consider is the
+                <filename>-k</filename> or <filename>--continue</filename>
+                option.
+                This option instructs BitBake to try and continue processing
+                the job as long as possible even after encountering an error.
+                When an error occurs, the target that failed and those that
+                depend on it cannot be remade.
+                However, when you use this option other dependencies can
+                still be processed.
+            </para>
+        </section>
+
+        <section id='overview-components-recipes'>
+            <title>Recipes</title>
+
+            <para>
+                Files that have the <filename>.bb</filename> suffix are
+                "recipes" files.
+                In general, a recipe contains information about a single piece
+                of software.
+                This information includes the location from which to download
+                the unaltered source, any source patches to be applied to that
+                source (if needed), which special configuration options to
+                apply, how to compile the source files, and how to package the
+                compiled output.
+            </para>
+
+            <para>
+                The term "package" is sometimes used to refer to recipes.
+                However, since the word "package" is used for the packaged
+                output from the OpenEmbedded build system (i.e.
+                <filename>.ipk</filename> or <filename>.deb</filename> files),
+                this document avoids using the term "package" when referring
+                to recipes.
+            </para>
+        </section>
+
+        <section id='overview-components-classes'>
+            <title>Classes</title>
+
+            <para>
+                Class files (<filename>.bbclass</filename>) contain information
+                that is useful to share between recipes files.
+                An example is the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
+                class, which contains common settings for any application that
+                Autotools uses.
+                The
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>Classes</ulink>"
+                chapter in the Yocto Project Reference Manual provides
+                details about classes and how to use them.
+            </para>
+        </section>
+
+        <section id='overview-components-configurations'>
+            <title>Configurations</title>
+
+            <para>
+                The configuration files (<filename>.conf</filename>) define
+                various configuration variables that govern the OpenEmbedded
+                build process.
+                These files fall into several areas that define machine
+                configuration options, distribution configuration options,
+                compiler tuning options, general common configuration options,
+                and user configuration options in
+                <filename>conf/local.conf</filename>, which is found in the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+            </para>
+        </section>
+    </section>
+
+    <section id='overview-layers'>
+        <title>Layers</title>
+
+        <para>
+            Layers are repositories that contain related metadata (i.e.
+            sets of instructions) that tell the OpenEmbedded build system how
+            to build a target.
+            Yocto Project's
+            <link linkend='the-yocto-project-layer-model'>layer model</link>
+            facilitates collaboration, sharing, customization, and reuse
+            within the Yocto Project development environment.
+            Layers logically separate information for your project.
+            For example, you can use a layer to hold all the configurations
+            for a particular piece of hardware.
+            Isolating hardware-specific configurations allows you to share
+            other metadata by using a different layer where that metadata
+            might be common across several pieces of hardware.
+        </para>
+
+        <para>
+            Many layers exist that work in the Yocto Project development
+            environment.
+            The
+            <ulink url='https://caffelli-staging.yoctoproject.org/software-overview/layers/'>Yocto Project Curated Layer Index</ulink>
+            and
+            <ulink url='http://layers.openembedded.org/layerindex/branch/master/layers/'>OpenEmbedded Layer Index</ulink>
+            both contain layers from which you can use or leverage.
+        </para>
+
+        <para>
+            By convention, layers in the Yocto Project follow a specific form.
+            Conforming to a known structure allows BitBake to make assumptions
+            during builds on where to find types of metadata.
+            You can find procedures and learn about tools (i.e.
+            <filename>bitbake-layers</filename>) for creating layers suitable
+            for the Yocto Project in the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+            section of the Yocto Project Development Tasks Manual.
+        </para>
+    </section>
+
+    <section id="openembedded-build-system-build-concepts">
+        <title>OpenEmbedded Build System Concepts</title>
+
+        <para>
+            This section takes a more detailed look inside the build
+            process used by the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>,
+            which is the build system specific to the Yocto Project.
+            At the heart of the build system is BitBake, the task executor.
+        </para>
+
+        <para>
+            The following diagram represents the high-level workflow of a
+            build.
+            The remainder of this section expands on the fundamental input,
+            output, process, and metadata logical blocks that make up the
+            workflow.
+        </para>
+
+        <para id='general-workflow-figure'>
+            <imagedata fileref="figures/YP-flow-diagram.png" format="PNG" align='center' width="8in"/>
+        </para>
+
+        <para>
+            In general, the build's workflow consists of several functional
+            areas:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>User Configuration:</emphasis>
+                    metadata you can use to control the build process.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Metadata Layers:</emphasis>
+                    Various layers that provide software, machine, and
+                    distro metadata.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Source Files:</emphasis>
+                    Upstream releases, local projects, and SCMs.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Build System:</emphasis>
+                    Processes under the control of
+                    <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>.
+                    This block expands on how BitBake fetches source, applies
+                    patches, completes compilation, analyzes output for package
+                    generation, creates and tests packages, generates images,
+                    and generates cross-development tools.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Package Feeds:</emphasis>
+                    Directories containing output packages (RPM, DEB or IPK),
+                    which are subsequently used in the construction of an
+                    image or Software Development Kit (SDK), produced by the
+                    build system.
+                    These feeds can also be copied and shared using a web
+                    server or other means to facilitate extending or updating
+                    existing images on devices at runtime if runtime package
+                    management is enabled.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Images:</emphasis>
+                    Images produced by the workflow.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Application Development SDK:</emphasis>
+                    Cross-development tools that are produced along with
+                    an image or separately with BitBake.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <section id="user-configuration">
+            <title>User Configuration</title>
+
+            <para>
+                User configuration helps define the build.
+                Through user configuration, you can tell BitBake the
+                target architecture for which you are building the image,
+                where to store downloaded source, and other build properties.
+            </para>
+
+            <para>
+                The following figure shows an expanded representation of the
+                "User Configuration" box of the
+                <link linkend='general-workflow-figure'>general workflow figure</link>:
+            </para>
+
+            <para>
+                <imagedata fileref="figures/user-configuration.png" align="center" width="8in" depth="4.5in" />
+            </para>
+
+            <para>
+                BitBake needs some basic configuration files in order to
+                complete a build.
+                These files are <filename>*.conf</filename> files.
+                The minimally necessary ones reside as example files in the
+                <filename>build/conf</filename> directory of the
+                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+                For simplicity, this section refers to the Source Directory as
+                the "Poky Directory."
+            </para>
+
+            <para>
+                When you clone the
+                <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
+                Git repository or you download and unpack a Yocto Project
+                release, you can set up the Source Directory to be named
+                anything you want.
+                For this discussion, the cloned repository uses the default
+                name <filename>poky</filename>.
+                <note>
+                    The Poky repository is primarily an aggregation of existing
+                    repositories.
+                    It is not a canonical upstream source.
+                </note>
+            </para>
+
+            <para>
+                The <filename>meta-poky</filename> layer inside Poky contains
+                a <filename>conf</filename> directory that has example
+                configuration files.
+                These example files are used as a basis for creating actual
+                configuration files when you source
+                <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>,
+                which is the build environment script.
+            </para>
+
+            <para>
+                Sourcing the build environment script creates a
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                if one does not already exist.
+                BitBake uses the Build Directory for all its work during
+                builds.
+                The Build Directory has a <filename>conf</filename> directory
+                that contains default versions of your
+                <filename>local.conf</filename> and
+                <filename>bblayers.conf</filename> configuration files.
+                These default configuration files are created only if versions
+                do not already exist in the Build Directory at the time you
+                source the build environment setup script.
+            </para>
+
+            <para>
+                Because the Poky repository is fundamentally an aggregation of
+                existing repositories, some users might be familiar with
+                running the <filename>&OE_INIT_FILE;</filename> script
+                in the context of separate
+                <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core</ulink>
+                and BitBake repositories rather than a single Poky repository.
+                This discussion assumes the script is executed from
+                within a cloned or unpacked version of Poky.
+            </para>
+
+            <para>
+                Depending on where the script is sourced, different
+                sub-scripts are called to set up the Build Directory
+                (Yocto or OpenEmbedded).
+                Specifically, the script
+                <filename>scripts/oe-setup-builddir</filename> inside the
+                poky directory sets up the Build Directory and seeds the
+                directory (if necessary) with configuration files appropriate
+                for the Yocto Project development environment.
+                <note>
+                    The <filename>scripts/oe-setup-builddir</filename> script
+                    uses the <filename>$TEMPLATECONF</filename> variable to
+                    determine which sample configuration files to locate.
+                </note>
+            </para>
+
+            <para>
+                The <filename>local.conf</filename> file provides many
+                basic variables that define a build environment.
+                Here is a list of a few.
+                To see the default configurations in a
+                <filename>local.conf</filename> file created by the build
+                environment script, see the
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample'><filename>local.conf.sample</filename></ulink>
+                in the <filename>meta-poky</filename> layer:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Target Machine Selection:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+                        variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Download Directory:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
+                        variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Shared State Directory:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
+                        variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Build Output:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+                        variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Distribution Policy:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
+                        variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Packaging Format:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
+                        variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>SDK Target Architecture:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
+                        variable.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Extra Image Packages:</emphasis>
+                        Controlled by the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
+                        variable.
+                        </para></listitem>
+                </itemizedlist>
+                <note>
+                    Configurations set in the
+                    <filename>conf/local.conf</filename> file can also be set
+                    in the <filename>conf/site.conf</filename> and
+                    <filename>conf/auto.conf</filename> configuration files.
+                </note>
+            </para>
+
+            <para>
+                The <filename>bblayers.conf</filename> file tells BitBake what
+                layers you want considered during the build.
+                By default, the layers listed in this file include layers
+                minimally needed by the build system.
+                However, you must manually add any custom layers you have
+                created.
+                You can find more information on working with the
+                <filename>bblayers.conf</filename> file in the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+            </para>
+
+            <para>
+                The files <filename>site.conf</filename> and
+                <filename>auto.conf</filename> are not created by the
+                environment initialization script.
+                If you want the <filename>site.conf</filename> file, you
+                need to create that yourself.
+                The <filename>auto.conf</filename> file is typically created by
+                an autobuilder:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis><filename>site.conf</filename>:</emphasis>
+                        You can use the <filename>conf/site.conf</filename>
+                        configuration file to configure multiple
+                        build directories.
+                        For example, suppose you had several build environments
+                        and they shared some common features.
+                        You can set these default build properties here.
+                        A good example is perhaps the packaging format to use
+                        through the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
+                        variable.</para>
+
+                        <para>One useful scenario for using the
+                        <filename>conf/site.conf</filename> file is to extend
+                        your
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
+                        variable to include the path to a
+                        <filename>conf/site.conf</filename>.
+                        Then, when BitBake looks for Metadata using
+                        <filename>BBPATH</filename>, it finds the
+                        <filename>conf/site.conf</filename> file and applies
+                        your common configurations found in the file.
+                        To override configurations in a particular build
+                        directory, alter the similar configurations within
+                        that build directory's
+                        <filename>conf/local.conf</filename> file.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis><filename>auto.conf</filename>:</emphasis>
+                        The file is usually created and written to by
+                        an autobuilder.
+                        The settings put into the file are typically the
+                        same as you would find in the
+                        <filename>conf/local.conf</filename> or the
+                        <filename>conf/site.conf</filename> files.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                You can edit all configuration files to further define
+                any particular build environment.
+                This process is represented by the "User Configuration Edits"
+                box in the figure.
+            </para>
+
+            <para>
+                When you launch your build with the
+                <filename>bitbake <replaceable>target</replaceable></filename>
+                command, BitBake sorts out the configurations to ultimately
+                define your build environment.
+                It is important to understand that the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+                reads the configuration files in a specific order:
+                <filename>site.conf</filename>, <filename>auto.conf</filename>,
+                and <filename>local.conf</filename>.
+                And, the build system applies the normal assignment statement
+                rules as described in the
+                "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>"
+                chapter of the BitBake User Manual.
+                Because the files are parsed in a specific order, variable
+                assignments for the same variable could be affected.
+                For example, if the <filename>auto.conf</filename> file and
+                the <filename>local.conf</filename> set
+                <replaceable>variable1</replaceable> to different values,
+                because the build system parses <filename>local.conf</filename>
+                after <filename>auto.conf</filename>,
+                <replaceable>variable1</replaceable> is assigned the value from
+                the <filename>local.conf</filename> file.
+            </para>
+        </section>
+
+        <section id="metadata-machine-configuration-and-policy-configuration">
+            <title>Metadata, Machine Configuration, and Policy Configuration</title>
+
+            <para>
+                The previous section described the user configurations that
+                define BitBake's global behavior.
+                This section takes a closer look at the layers the build system
+                uses to further control the build.
+                These layers provide Metadata for the software, machine, and
+                policies.
+            </para>
+
+            <para>
+                In general, three types of layer input exists.
+                You can see them below the "User Configuration" box in the
+                <link linkend='general-workflow-figure'>general workflow figure</link>:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Metadata (<filename>.bb</filename> + Patches):</emphasis>
+                        Software layers containing user-supplied recipe files,
+                        patches, and append files.
+                        A good example of a software layer might be the
+                        <ulink url='https://github.com/meta-qt5/meta-qt5'><filename>meta-qt5</filename></ulink>
+                        layer from the
+                        <ulink url='http://layers.openembedded.org/layerindex/branch/master/layers/'>OpenEmbedded Layer Index</ulink>.
+                        This layer is for version 5.0 of the popular
+                        <ulink url='https://wiki.qt.io/About_Qt'>Qt</ulink>
+                        cross-platform application development framework for
+                        desktop, embedded and mobile.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Machine BSP Configuration:</emphasis>
+                        Board Support Package (BSP) layers (i.e. "BSP Layer"
+                        in the following figure) providing machine-specific
+                        configurations.
+                        This type of information is specific to a particular
+                        target architecture.
+                        A good example of a BSP layer from the
+                        <link linkend='gs-reference-distribution-poky'>Poky Reference Distribution</link>
+                        is the
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp'><filename>meta-yocto-bsp</filename></ulink>
+                        layer.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Policy Configuration:</emphasis>
+                        Distribution Layers (i.e. "Distro Layer" in the
+                        following figure) providing top-level or general
+                        policies for the images or SDKs being built for a
+                        particular distribution.
+                        For example, in the Poky Reference Distribution the
+                        distro layer is the
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky'><filename>meta-poky</filename></ulink>
+                        layer.
+                        Within the distro layer is a
+                        <filename>conf/distro</filename> directory that
+                        contains distro configuration files (e.g.
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/distro/poky.conf'><filename>poky.conf</filename></ulink>
+                        that contain many policy configurations for the
+                        Poky distribution.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                The following figure shows an expanded representation of
+                these three layers from the
+                <link linkend='general-workflow-figure'>general workflow figure</link>:
+            </para>
+
+            <para>
+                <imagedata fileref="figures/layer-input.png" align="center" width="8in" depth="8in" />
+            </para>
+
+            <para>
+                In general, all layers have a similar structure.
+                They all contain a licensing file
+                (e.g. <filename>COPYING.MIT</filename>) if the layer is to be
+                distributed, a <filename>README</filename> file as good
+                practice and especially if the layer is to be distributed, a
+                configuration directory, and recipe directories.
+                You can learn about the general structure for layers used with
+                the Yocto Project in the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-your-own-layer'>Creating Your Own Layer</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                For a general discussion on layers and the many layers from
+                which you can draw, see the
+                "<link linkend='overview-layers'>Layers</link>" and
+                "<link linkend='the-yocto-project-layer-model'>The Yocto Project Layer Model</link>"
+                sections both earlier in this manual.
+            </para>
+
+            <para>
+                If you explored the previous links, you discovered some
+                areas where many layers that work with the Yocto Project
+                exist.
+                The
+                <ulink url="http://git.yoctoproject.org/">Source Repositories</ulink>
+                also shows layers categorized under "Yocto Metadata Layers."
+                <note>
+                    Layers exist in the Yocto Project Source Repositories that
+                    cannot be found in the OpenEmbedded Layer Index.
+                    These layers are either deprecated or experimental
+                    in nature.
+                </note>
+            </para>
+
+            <para>
+                BitBake uses the <filename>conf/bblayers.conf</filename> file,
+                which is part of the user configuration, to find what layers it
+                should be using as part of the build.
+            </para>
+
+            <section id="distro-layer">
+                <title>Distro Layer</title>
+
+                <para>
+                    The distribution layer provides policy configurations for
+                    your distribution.
+                    Best practices dictate that you isolate these types of
+                    configurations into their own layer.
+                    Settings you provide in
+                    <filename>conf/distro/<replaceable>distro</replaceable>.conf</filename> override
+                    similar settings that BitBake finds in your
+                    <filename>conf/local.conf</filename> file in the Build
+                    Directory.
+                </para>
+
+                <para>
+                    The following list provides some explanation and references
+                    for what you typically find in the distribution layer:
+                    <itemizedlist>
+                        <listitem><para>
+                            <emphasis>classes:</emphasis>
+                            Class files (<filename>.bbclass</filename>) hold
+                            common functionality that can be shared among
+                            recipes in the distribution.
+                            When your recipes inherit a class, they take on the
+                            settings and functions for that class.
+                            You can read more about class files in the
+                            "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>Classes</ulink>"
+                            chapter of the Yocto Reference Manual.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>conf:</emphasis>
+                            This area holds configuration files for the
+                            layer (<filename>conf/layer.conf</filename>),
+                            the distribution
+                            (<filename>conf/distro/<replaceable>distro</replaceable>.conf</filename>),
+                            and any distribution-wide include files.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>recipes-*:</emphasis>
+                            Recipes and append files that affect common
+                            functionality across the distribution.
+                            This area could include recipes and append files
+                            to add distribution-specific configuration,
+                            initialization scripts, custom image recipes,
+                            and so forth.
+                            Examples of <filename>recipes-*</filename>
+                            directories are <filename>recipes-core</filename>
+                            and <filename>recipes-extra</filename>.
+                            Hierarchy and contents within a
+                            <filename>recipes-*</filename> directory can vary.
+                            Generally, these directories contain recipe files
+                            (<filename>*.bb</filename>), recipe append files
+                            (<filename>*.bbappend</filename>), directories
+                            that are distro-specific for configuration files,
+                            and so forth.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id="bsp-layer">
+                <title>BSP Layer</title>
+
+                <para>
+                    The BSP Layer provides machine configurations that
+                    target specific hardware.
+                    Everything in this layer is specific to the machine for
+                    which you are building the image or the SDK.
+                    A common structure or form is defined for BSP layers.
+                    You can learn more about this structure in the
+                    <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
+                    <note>
+                        In order for a BSP layer to be considered compliant
+                        with the Yocto Project, it must meet some structural
+                        requirements.
+                    </note>
+                </para>
+
+                <para>
+                    The BSP Layer's configuration directory contains
+                    configuration files for the machine
+                    (<filename>conf/machine/<replaceable>machine</replaceable>.conf</filename>)
+                    and, of course, the layer
+                    (<filename>conf/layer.conf</filename>).
+                </para>
+
+                <para>
+                    The remainder of the layer is dedicated to specific recipes
+                    by function: <filename>recipes-bsp</filename>,
+                    <filename>recipes-core</filename>,
+                    <filename>recipes-graphics</filename>,
+                    <filename>recipes-kernel</filename>, and so forth.
+                    Metadata can exist for multiple formfactors, graphics
+                    support systems, and so forth.
+                    <note>
+                        While the figure shows several
+                        <filename>recipes-*</filename> directories, not all
+                        these directories appear in all BSP layers.
+                    </note>
+                </para>
+            </section>
+
+            <section id="software-layer">
+                <title>Software Layer</title>
+
+                <para>
+                    The software layer provides the Metadata for additional
+                    software packages used during the build.
+                    This layer does not include Metadata that is specific to
+                    the distribution or the machine, which are found in their
+                    respective layers.
+                </para>
+
+                <para>
+                    This layer contains any recipes, append files, and
+                    patches, that your project needs.
+                </para>
+            </section>
+        </section>
+
+        <section id="sources-dev-environment">
+            <title>Sources</title>
+
+            <para>
+                In order for the OpenEmbedded build system to create an
+                image or any target, it must be able to access source files.
+                The
+                <link linkend='general-workflow-figure'>general workflow figure</link>
+                represents source files using the "Upstream Project Releases",
+                "Local Projects", and "SCMs (optional)" boxes.
+                The figure represents mirrors, which also play a role in
+                locating source files, with the "Source Materials" box.
+            </para>
+
+            <para>
+                The method by which source files are ultimately organized is
+                a function of the project.
+                For example, for released software, projects tend to use
+                tarballs or other archived files that can capture the
+                state of a release guaranteeing that it is statically
+                represented.
+                On the other hand, for a project that is more dynamic or
+                experimental in nature, a project might keep source files in a
+                repository controlled by a Source Control Manager (SCM) such as
+                Git.
+                Pulling source from a repository allows you to control
+                the point in the repository (the revision) from which you
+                want to build software.
+                Finally, a combination of the two might exist, which would
+                give the consumer a choice when deciding where to get
+                source files.
+            </para>
+
+            <para>
+                BitBake uses the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                variable to point to source files regardless of their location.
+                Each recipe must have a <filename>SRC_URI</filename> variable
+                that points to the source.
+            </para>
+
+            <para>
+                Another area that plays a significant role in where source
+                files come from is pointed to by the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
+                variable.
+                This area is a cache that can hold previously downloaded
+                source.
+                You can also instruct the OpenEmbedded build system to create
+                tarballs from Git repositories, which is not the default
+                behavior, and store them in the <filename>DL_DIR</filename>
+                by using the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink>
+                variable.
+            </para>
+
+            <para>
+                Judicious use of a <filename>DL_DIR</filename> directory can
+                save the build system a trip across the Internet when looking
+                for files.
+                A good method for using a download directory is to have
+                <filename>DL_DIR</filename> point to an area outside of your
+                Build Directory.
+                Doing so allows you to safely delete the Build Directory
+                if needed without fear of removing any downloaded source file.
+            </para>
+
+            <para>
+                The remainder of this section provides a deeper look into the
+                source files and the mirrors.
+                Here is a more detailed look at the source file area of the
+                <link linkend='general-workflow-figure'>general workflow figure</link>:
+            </para>
+
+            <para>
+                <imagedata fileref="figures/source-input.png" width="6in" depth="6in" align="center" />
+            </para>
+
+            <section id='upstream-project-releases'>
+                <title>Upstream Project Releases</title>
+
+                <para>
+                    Upstream project releases exist anywhere in the form of an
+                    archived file (e.g. tarball or zip file).
+                    These files correspond to individual recipes.
+                    For example, the figure uses specific releases each for
+                    BusyBox, Qt, and Dbus.
+                    An archive file can be for any released product that can be
+                    built using a recipe.
+                </para>
+            </section>
+
+            <section id='local-projects'>
+                <title>Local Projects</title>
+
+                <para>
+                    Local projects are custom bits of software the user
+                    provides.
+                    These bits reside somewhere local to a project - perhaps
+                    a directory into which the user checks in items (e.g.
+                    a local directory containing a development source tree
+                    used by the group).
+                </para>
+
+                <para>
+                    The canonical method through which to include a local
+                    project is to use the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
+                    class to include that local project.
+                    You use either the <filename>local.conf</filename> or a
+                    recipe's append file to override or set the
+                    recipe to point to the local directory on your disk to pull
+                    in the whole source tree.
+                </para>
+            </section>
+
+            <section id='scms'>
+                <title>Source Control Managers (Optional)</title>
+
+                <para>
+                    Another place the build system can get source files from is
+                    through an SCM such as Git or Subversion.
+                    In this case, a repository is cloned or checked out.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
+                    task inside BitBake uses
+                    the <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                    variable and the argument's prefix to determine the correct
+                    fetcher module.
+                    <note>
+                        For information on how to have the OpenEmbedded build
+                        system generate tarballs for Git repositories and place
+                        them in the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
+                        directory, see the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink>
+                        variable.
+                    </note>
+                </para>
+
+                <para>
+                    When fetching a repository, BitBake uses the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
+                    variable to determine the specific revision from which to
+                    build.
+                </para>
+            </section>
+
+            <section id='source-mirrors'>
+                <title>Source Mirror(s)</title>
+
+                <para>
+                    Two kinds of mirrors exist: pre-mirrors and regular
+                    mirrors.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PREMIRRORS'><filename>PREMIRRORS</filename></ulink>
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-MIRRORS'><filename>MIRRORS</filename></ulink>
+                    variables point to these, respectively.
+                    BitBake checks pre-mirrors before looking upstream for any
+                    source files.
+                    Pre-mirrors are appropriate when you have a shared
+                    directory that is not a directory defined by the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
+                    variable.
+                    A Pre-mirror typically points to a shared directory that is
+                    local to your organization.
+                </para>
+
+                <para>
+                    Regular mirrors can be any site across the Internet
+                    that is used as an alternative location for source
+                    code should the primary site not be functioning for
+                    some reason or another.
+                </para>
+            </section>
+        </section>
+
+        <section id="package-feeds-dev-environment">
+            <title>Package Feeds</title>
+
+            <para>
+                When the OpenEmbedded build system generates an image or an
+                SDK, it gets the packages from a package feed area located
+                in the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+                The
+                <link linkend='general-workflow-figure'>general workflow figure</link>
+                shows this package feeds area in the upper-right corner.
+            </para>
+
+            <para>
+                This section looks a little closer into the package feeds
+                area used by the build system.
+                Here is a more detailed look at the area:
+                <imagedata fileref="figures/package-feeds.png" align="center" width="7in" depth="6in" />
+            </para>
+
+            <para>
+                Package feeds are an intermediary step in the build process.
+                The OpenEmbedded build system provides classes to generate
+                different package types, and you specify which classes to
+                enable through the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
+                variable.
+                Before placing the packages into package feeds,
+                the build process validates them with generated output quality
+                assurance checks through the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-insane'><filename>insane</filename></ulink>
+                class.
+            </para>
+
+            <para>
+                The package feed area resides in the Build Directory.
+                The directory the build system uses to temporarily store
+                packages is determined by a combination of variables and the
+                particular package manager in use.
+                See the "Package Feeds" box in the illustration and note the
+                information to the right of that area.
+                In particular, the following defines where package files are
+                kept:
+                <itemizedlist>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>:
+                        Defined as <filename>tmp/deploy</filename> in the Build
+                        Directory.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>DEPLOY_DIR_*</filename>:
+                        Depending on the package manager used, the package type
+                        sub-folder.
+                        Given RPM, IPK, or DEB packaging and tarball creation,
+                        the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></ulink>,
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></ulink>,
+                        or
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></ulink>,
+                        variables are used, respectively.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>:
+                        Defines architecture-specific sub-folders.
+                        For example, packages could exist for the i586 or
+                        qemux86 architectures.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                BitBake uses the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_*</filename></ulink>
+                tasks to generate packages and place them into the package
+                holding area (e.g. <filename>do_package_write_ipk</filename>
+                for IPK packages).
+                See the
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_deb</filename></ulink>",
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></ulink>",
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_rpm'><filename>do_package_write_rpm</filename></ulink>",
+                and
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_tar'><filename>do_package_write_tar</filename></ulink>"
+                sections in the Yocto Project Reference Manual
+                for additional information.
+                As an example, consider a scenario where an IPK packaging
+                manager is being used and package architecture support for
+                both i586 and qemux86 exist.
+                Packages for the i586 architecture are placed in
+                <filename>build/tmp/deploy/ipk/i586</filename>, while packages
+                for the qemux86 architecture are placed in
+                <filename>build/tmp/deploy/ipk/qemux86</filename>.
+            </para>
+        </section>
+
+        <section id='bitbake-dev-environment'>
+            <title>BitBake</title>
+
+            <para>
+                The OpenEmbedded build system uses
+                <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+                to produce images and Software Development Kits (SDKs).
+                You can see from the
+                <link linkend='general-workflow-figure'>general workflow figure</link>,
+                the BitBake area consists of several functional areas.
+                This section takes a closer look at each of those areas.
+                <note>
+                    Separate documentation exists for the BitBake tool.
+                    See the
+                    <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>
+                    for reference material on BitBake.
+                </note>
+            </para>
+
+            <section id='source-fetching-dev-environment'>
+                <title>Source Fetching</title>
+
+                <para>
+                    The first stages of building a recipe are to fetch and
+                    unpack the source code:
+                    <imagedata fileref="figures/source-fetching.png" align="center" width="6.5in" depth="5in" />
+                </para>
+
+                <para>
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>
+                    tasks fetch the source files and unpack them into the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+                    <note>
+                        For every local file (e.g. <filename>file://</filename>)
+                        that is part of a recipe's
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                        statement, the OpenEmbedded build system takes a
+                        checksum of the file for the recipe and inserts the
+                        checksum into the signature for the
+                        <filename>do_fetch</filename> task.
+                        If any local file has been modified, the
+                        <filename>do_fetch</filename> task and all tasks that
+                        depend on it are re-executed.
+                    </note>
+                    By default, everything is accomplished in the Build
+                    Directory, which has a defined structure.
+                    For additional general information on the Build Directory,
+                    see the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-build'><filename>build/</filename></ulink>"
+                    section in the Yocto Project Reference Manual.
+                </para>
+
+                <para>
+                    Each recipe has an area in the Build Directory where the
+                    unpacked source code resides.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
+                    variable points to this area for a recipe's unpacked source
+                    code.
+                    The name of that directory for any given recipe is defined
+                    from several different variables.
+                    The preceding figure and the following list describe
+                    the Build Directory's hierarchy:
+                    <itemizedlist>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
+                            The base directory where the OpenEmbedded build
+                            system performs all its work during the build.
+                            The default base directory is the
+                            <filename>tmp</filename> directory.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>:
+                            The architecture of the built package or packages.
+                            Depending on the eventual destination of the
+                            package or packages (i.e. machine architecture,
+                            <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>,
+                            SDK, or specific machine),
+                            <filename>PACKAGE_ARCH</filename> varies.
+                            See the variable's description for details.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>:
+                            The operating system of the target device.
+                            A typical value would be "linux" (e.g.
+                            "qemux86-poky-linux").
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
+                            The name of the recipe used to build the package.
+                            This variable can have multiple meanings.
+                            However, when used in the context of input files,
+                            <filename>PN</filename> represents the the name
+                            of the recipe.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>:
+                            The location where the OpenEmbedded build system
+                            builds a recipe (i.e. does the work to create the
+                            package).
+                            <itemizedlist>
+                                <listitem><para>
+                                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
+                                    The version of the recipe used to build the
+                                    package.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
+                                    The revision of the recipe used to build the
+                                    package.
+                                    </para></listitem>
+                            </itemizedlist>
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>:
+                            Contains the unpacked source files for a given
+                            recipe.
+                            <itemizedlist>
+                                <listitem><para>
+                                    <ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink>:
+                                    The name of the recipe used to build the
+                                    package.
+                                    The <filename>BPN</filename> variable is
+                                    a version of the <filename>PN</filename>
+                                    variable but with common prefixes and
+                                    suffixes removed.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
+                                    The version of the recipe used to build the
+                                    package.
+                                    </para></listitem>
+                            </itemizedlist>
+                            </para></listitem>
+                    </itemizedlist>
+                    <note>
+                        In the previous figure, notice that two sample
+                        hierarchies exist: one based on package architecture (i.e.
+                        <filename>PACKAGE_ARCH</filename>) and one based on a
+                        machine (i.e. <filename>MACHINE</filename>).
+                        The underlying structures are identical.
+                        The differentiator being what the OpenEmbedded build
+                        system is using as a build target (e.g. general
+                        architecture, a build host, an SDK, or a specific
+                        machine).
+                    </note>
+                </para>
+            </section>
+
+            <section id='patching-dev-environment'>
+                <title>Patching</title>
+
+                <para>
+                    Once source code is fetched and unpacked, BitBake locates
+                    patch files and applies them to the source files:
+                    <imagedata fileref="figures/patching.png" align="center" width="7in" depth="6in" />
+                </para>
+
+                <para>
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
+                    task uses a recipe's
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                    statements and the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
+                    variable to locate applicable patch files.
+                </para>
+
+                <para>
+                    Default processing for patch files assumes the files have
+                    either <filename>*.patch</filename> or
+                    <filename>*.diff</filename> file types.
+                    You can use <filename>SRC_URI</filename> parameters to
+                    change the way the build system recognizes patch files.
+                    See the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
+                    task for more information.
+                </para>
+
+                <para>
+                    BitBake finds and applies multiple patches for a single
+                    recipe in the order in which it locates the patches.
+                    The <filename>FILESPATH</filename> variable defines the
+                    default set of directories that the build system uses to
+                    search for patch files.
+                    Once found, patches are applied to the recipe's source
+                    files, which are located in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
+                    directory.
+                </para>
+
+                <para>
+                    For more information on how the source directories are
+                    created, see the
+                    "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
+                    section.
+                    For more information on how to create patches and how the
+                    build system processes patches, see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code'>Patching Code</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    You can also see the
+                    "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component'>Use <filename>devtool modify</filename> to Modify the Source of an Existing Component</ulink>"
+                    section in the Yocto Project Application Development and
+                    the Extensible Software Development Kit (SDK) manual and
+                    the
+                    "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</ulink>"
+                    section in the Yocto Project Linux Kernel Development
+                    Manual.
+                </para>
+            </section>
+
+            <section id='configuration-compilation-and-staging-dev-environment'>
+                <title>Configuration, Compilation, and Staging</title>
+
+                <para>
+                    After source code is patched, BitBake executes tasks that
+                    configure and compile the source code.
+                    Once compilation occurs, the files are copied to a holding
+                    area (staged) in preparation for packaging:
+                    <imagedata fileref="figures/configuration-compile-autoreconf.png" align="center" width="7in" depth="5in" />
+                </para>
+
+                <para>
+                    This step in the build process consists of the following
+                    tasks:
+                    <itemizedlist>
+                        <listitem><para>
+                            <emphasis><ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></ulink></emphasis>:
+                            This task sets up the two sysroots in
+                            <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename>
+                            (i.e. <filename>recipe-sysroot</filename> and
+                            <filename>recipe-sysroot-native</filename>) so that
+                            during the packaging phase the sysroots can contain
+                            the contents of the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
+                            tasks of the recipes on which the recipe
+                            containing the tasks depends.
+                            A sysroot exists for both the target and for the
+                            native binaries, which run on the host system.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis><filename>do_configure</filename></emphasis>:
+                            This task configures the source by enabling and
+                            disabling any build-time and configuration options
+                            for the software being built.
+                            Configurations can come from the recipe itself as
+                            well as from an inherited class.
+                            Additionally, the software itself might configure
+                            itself depending on the target for which it is
+                            being built.</para>
+
+                            <para>The configurations handled by the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
+                            task are specific to configurations for the source
+                            code being built by the recipe.</para>
+
+                            <para>If you are using the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
+                            class, you can add additional configuration options
+                            by using the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></ulink>
+                            or
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
+                            variables.
+                            For information on how this variable works within
+                            that class, see the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
+                            class
+                            <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/autotools.bbclass'>here</ulink>.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis><filename>do_compile</filename></emphasis>:
+                            Once a configuration task has been satisfied,
+                            BitBake compiles the source using the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
+                            task.
+                            Compilation occurs in the directory pointed to by
+                            the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-B'><filename>B</filename></ulink>
+                            variable.
+                            Realize that the <filename>B</filename> directory
+                            is, by default, the same as the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
+                            directory.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis><filename>do_install</filename></emphasis>:
+                            After compilation completes, BitBake executes the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+                            task.
+                            This task copies files from the
+                            <filename>B</filename> directory and places them
+                            in a holding area pointed to by the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
+                            variable.
+                            Packaging occurs later using files from this
+                            holding directory.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id='package-splitting-dev-environment'>
+                <title>Package Splitting</title>
+
+                <para>
+                    After source code is configured, compiled, and staged, the
+                    build system analyzes the results and splits the output
+                    into packages:
+                    <imagedata fileref="figures/analysis-for-package-splitting.png" align="center" width="7in" depth="7in" />
+                </para>
+
+                <para>
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink>
+                    tasks combine to analyze the files found in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
+                    directory and split them into subsets based on available
+                    packages and files.
+                    Analysis involves the following as well as other items:
+                    splitting out debugging symbols, looking at shared library
+                    dependencies between packages, and looking at package
+                    relationships.
+                </para>
+
+                <para>
+                    The <filename>do_packagedata</filename> task creates
+                    package metadata based on the analysis such that the
+                    build system can generate the final packages.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
+                    task stages (copies) a subset of the files installed by
+                    the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+                    task into the appropriate sysroot.
+                    Working, staged, and intermediate results of the analysis
+                    and package splitting process use several areas:
+                    <itemizedlist>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGD'><filename>PKGD</filename></ulink>:
+                            The destination directory
+                            (i.e. <filename>package</filename>) for packages
+                            before they are split into individual packages.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDESTWORK'><filename>PKGDESTWORK</filename></ulink>:
+                            A temporary work area (i.e.
+                            <filename>pkgdata</filename>) used by the
+                            <filename>do_package</filename> task to save
+                            package metadata.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDEST'><filename>PKGDEST</filename></ulink>:
+                            The parent directory (i.e.
+                            <filename>packages-split</filename>) for packages
+                            after they have been split.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>:
+                            A shared, global-state directory that holds
+                            packaging metadata generated during the packaging
+                            process.
+                            The packaging process copies metadata from
+                            <filename>PKGDESTWORK</filename> to the
+                            <filename>PKGDATA_DIR</filename> area where it
+                            becomes globally available.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></ulink>:
+                            The path for the sysroot for the system on which
+                            a component is built to run (i.e.
+                            <filename>recipe-sysroot</filename>).
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_NATIVE'><filename>STAGING_DIR_NATIVE</filename></ulink>:
+                            The path for the sysroot used when building
+                            components for the build host (i.e.
+                            <filename>recipe-sysroot-native</filename>).
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_TARGET'><filename>STAGING_DIR_TARGET</filename></ulink>:
+                            The path for the sysroot used when a component that
+                            is built to execute on a system and it generates
+                            code for yet another machine (e.g. cross-canadian
+                            recipes).
+                            </para></listitem>
+                    </itemizedlist>
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
+                    variable defines the files that go into each package in
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>.
+                    If you want details on how this is accomplished, you can
+                    look at
+                    <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/package.bbclass'><filename>package.bbclass</filename></ulink>.
+                </para>
+
+                <para>
+                    Depending on the type of packages being created (RPM, DEB,
+                    or IPK), the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_*</filename></ulink>
+                    task creates the actual packages and places them in the
+                    Package Feed area, which is
+                    <filename>${TMPDIR}/deploy</filename>.
+                    You can see the
+                    "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
+                    section for more detail on that part of the build process.
+                    <note>
+                        Support for creating feeds directly from the
+                        <filename>deploy/*</filename> directories does not
+                        exist.
+                        Creating such feeds usually requires some kind of feed
+                        maintenance mechanism that would upload the new
+                        packages into an official package feed (e.g. the
+                        Ångström distribution).
+                        This functionality is highly distribution-specific
+                        and thus is not provided out of the box.
+                    </note>
+                </para>
+            </section>
+
+            <section id='image-generation-dev-environment'>
+                <title>Image Generation</title>
+
+                <para>
+                    Once packages are split and stored in the Package Feeds
+                    area, the build system uses BitBake to generate the root
+                    filesystem image:
+                    <imagedata fileref="figures/image-generation.png" align="center" width="7.5in" depth="7.5in" />
+                </para>
+
+                <para>
+                    The image generation process consists of several stages and
+                    depends on several tasks and variables.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>
+                    task creates the root filesystem (file and directory
+                    structure) for an image.
+                    This task uses several key variables to help create the
+                    list of packages to actually install:
+                    <itemizedlist>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>:
+                            Lists out the base set of packages from which to
+                            install from the Package Feeds area.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></ulink>:
+                            Specifies packages that should not be installed
+                            into the image.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>:
+                            Specifies features to include in the image.
+                            Most of these features map to additional packages
+                            for installation.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>:
+                            Specifies the package backend (e.g. RPM, DEB, or
+                            IPK) to use and consequently helps determine where
+                            to locate packages within the Package Feeds area.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></ulink>:
+                            Determines the language(s) for which additional
+                            language support packages are installed.
+                            </para></listitem>
+                        <listitem><para>
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></ulink>:
+                            The final list of packages passed to the package
+                            manager for installation into the image.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+
+                <para>
+                    With
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></ulink>
+                    pointing to the location of the filesystem under
+                    construction and the <filename>PACKAGE_INSTALL</filename>
+                    variable providing the final list of packages to install,
+                    the root file system is created.
+                </para>
+
+                <para>
+                    Package installation is under control of the package
+                    manager (e.g. dnf/rpm, opkg, or apt/dpkg) regardless of
+                    whether or not package management is enabled for the
+                    target.
+                    At the end of the process, if package management is not
+                    enabled for the target, the package manager's data files
+                    are deleted from the root filesystem.
+                    As part of the final stage of package installation,
+                    post installation scripts that are part of the packages
+                    are run.
+                    Any scripts that fail to run on the build host are run on
+                    the target when the target system is first booted.
+                    If you are using a
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
+                    all the post installation scripts must succeed on the
+                    build host during the package installation phase since the
+                    root filesystem on the target is read-only.
+                </para>
+
+                <para>
+                    The final stages of the <filename>do_rootfs</filename> task
+                    handle post processing.
+                    Post processing includes creation of a manifest file and
+                    optimizations.
+                </para>
+
+                <para>
+                    The manifest file (<filename>.manifest</filename>) resides
+                    in the same directory as the root filesystem image.
+                    This file lists out, line-by-line, the installed packages.
+                    The manifest file is useful for the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage*'><filename>testimage</filename></ulink>
+                    class, for example, to determine whether or not to run
+                    specific tests.
+                    See the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_MANIFEST'><filename>IMAGE_MANIFEST</filename></ulink>
+                    variable for additional information.
+                </para>
+
+                <para>
+                    Optimizing processes that are run across the image include
+                    <filename>mklibs</filename>, <filename>prelink</filename>,
+                    and any other post-processing commands as defined by the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></ulink>
+                    variable.
+                    The <filename>mklibs</filename> process optimizes the size
+                    of the libraries, while the <filename>prelink</filename>
+                    process optimizes the dynamic linking of shared libraries
+                    to reduce start up time of executables.
+                </para>
+
+                <para>
+                    After the root filesystem is built, processing begins on
+                    the image through the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image'><filename>do_image</filename></ulink>
+                    task.
+                    The build system runs any pre-processing commands as
+                    defined by the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></ulink>
+                    variable.
+                    This variable specifies a list of functions to call before
+                    the build system creates the final image output files.
+                </para>
+
+                <para>
+                    The build system dynamically creates
+                    <filename>do_image_*</filename> tasks as needed, based
+                    on the image types specified in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
+                    variable.
+                    The process turns everything into an image file or a set of
+                    image files and can compress the root filesystem image to
+                    reduce the overall size of the image.
+                    The formats used for the root filesystem depend on the
+                    <filename>IMAGE_FSTYPES</filename> variable.
+                    Compression depends on whether the formats support
+                    compression.
+                </para>
+
+                <para>
+                    As an example, a dynamically created task when creating a
+                    particular image <replaceable>type</replaceable> would
+                    take the following form:
+                    <literallayout class='monospaced'>
+     do_image_<replaceable>type</replaceable>
+                    </literallayout>
+                    So, if the <replaceable>type</replaceable> as specified by
+                    the <filename>IMAGE_FSTYPES</filename> were
+                    <filename>ext4</filename>, the dynamically generated task
+                    would be as follows:
+                    <literallayout class='monospaced'>
+     do_image_ext4
+                    </literallayout>
+                </para>
+
+                <para>
+                    The final task involved in image creation is the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image-complete'><filename>do_image_complete</filename></ulink>
+                    task.
+                    This task completes the image by applying any image
+                    post processing as defined through the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></ulink>
+                    variable.
+                    The variable specifies a list of functions to call once the
+                    build system has created the final image output files.
+                    <note>
+                        The entire image generation process is run under
+                        <link linkend='fakeroot-and-pseudo'>Pseudo</link>.
+                        Running under Pseudo ensures that the files in the
+                        root filesystem have correct ownership.
+                    </note>
+                </para>
+            </section>
+
+            <section id='sdk-generation-dev-environment'>
+                <title>SDK Generation</title>
+
+                <para>
+                    The OpenEmbedded build system uses BitBake to generate the
+                    Software Development Kit (SDK) installer scripts for both
+                    the standard SDK and the extensible SDK (eSDK):
+                </para>
+
+                <para>
+                    <imagedata fileref="figures/sdk-generation.png" width="9in" align="center" />
+                    <note>
+                        For more information on the cross-development toolchain
+                        generation, see the
+                        "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
+                        section.
+                        For information on advantages gained when building a
+                        cross-development toolchain using the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></ulink>
+                        task, see the
+                        "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
+                        section in the Yocto Project Application Development
+                        and the Extensible Software Development Kit (eSDK)
+                        manual.
+                    </note>
+                </para>
+
+                <para>
+                    Like image generation, the SDK script process consists of
+                    several stages and depends on many variables.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></ulink>
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk_ext'><filename>do_populate_sdk_ext</filename></ulink>
+                    tasks use these key variables to help create the list of
+                    packages to actually install.
+                    For information on the variables listed in the figure,
+                    see the
+                    "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
+                    section.
+                </para>
+
+                <para>
+                    The <filename>do_populate_sdk</filename> task helps create
+                    the standard SDK and handles two parts: a target part and a
+                    host part.
+                    The target part is the part built for the target hardware
+                    and includes libraries and headers.
+                    The host part is the part of the SDK that runs on the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>.
+                </para>
+
+                <para>
+                    The <filename>do_populate_sdk_ext</filename> task helps
+                    create the extensible SDK and handles host and target parts
+                    differently than its counter part does for the standard SDK.
+                    For the extensible SDK, the task encapsulates the build
+                    system, which includes everything needed (host and target)
+                    for the SDK.
+                </para>
+
+                <para>
+                    Regardless of the type of SDK being constructed, the
+                    tasks perform some cleanup after which a cross-development
+                    environment setup script and any needed configuration files
+                    are created.
+                    The final output is the Cross-development
+                    toolchain installation script (<filename>.sh</filename>
+                    file), which includes the environment setup script.
+                </para>
+            </section>
+
+            <section id='stamp-files-and-the-rerunning-of-tasks'>
+                <title>Stamp Files and the Rerunning of Tasks</title>
+
+                <para>
+                    For each task that completes successfully, BitBake writes a
+                    stamp file into the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-STAMPS_DIR'><filename>STAMPS_DIR</filename></ulink>
+                    directory.
+                    The beginning of the stamp file's filename is determined
+                    by the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-STAMP'><filename>STAMP</filename></ulink>
+                    variable, and the end of the name consists of the task's
+                    name and current
+                    <link linkend='overview-checksums'>input checksum</link>.
+                    <note>
+                        This naming scheme assumes that
+                        <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_SIGNATURE_HANDLER'><filename>BB_SIGNATURE_HANDLER</filename></ulink>
+                        is "OEBasicHash", which is almost always the case in
+                        current OpenEmbedded.
+                    </note>
+                    To determine if a task needs to be rerun, BitBake checks
+                    if a stamp file with a matching input checksum exists
+                    for the task.
+                    If such a stamp file exists, the task's output is
+                    assumed to exist and still be valid.
+                    If the file does not exist, the task is rerun.
+                    <note>
+                        <para>The stamp mechanism is more general than the
+                        shared state (sstate) cache mechanism described in the
+                        "<link linkend='setscene-tasks-and-shared-state'>Setscene Tasks and Shared State</link>"
+                        section.
+                        BitBake avoids rerunning any task that has a valid
+                        stamp file, not just tasks that can be accelerated
+                        through the sstate cache.</para>
+
+                        <para>However, you should realize that stamp files only
+                        serve as a marker that some work has been done and that
+                        these files do not record task output.
+                        The actual task output would usually be somewhere in
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
+                        (e.g. in some recipe's
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.)
+                        What the sstate cache mechanism adds is a way to cache
+                        task output that can then be shared between build
+                        machines.</para>
+                    </note>
+                    Since <filename>STAMPS_DIR</filename> is usually a
+                    subdirectory of <filename>TMPDIR</filename>, removing
+                    <filename>TMPDIR</filename> will also remove
+                    <filename>STAMPS_DIR</filename>, which means tasks will
+                    properly be rerun to repopulate
+                    <filename>TMPDIR</filename>.
+                </para>
+
+                <para>
+                    If you want some task to always be considered "out of
+                    date", you can mark it with the
+                    <ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>nostamp</filename></ulink>
+                    varflag.
+                    If some other task depends on such a task, then that
+                    task will also always be considered out of date, which
+                    might not be what you want.
+                </para>
+
+                <para>
+                    For details on how to view information about a task's
+                    signature, see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                </para>
+            </section>
+
+            <section id='setscene-tasks-and-shared-state'>
+                <title>Setscene Tasks and Shared State</title>
+
+                <para>
+                    The description of tasks so far assumes that BitBake needs
+                    to build everything and no available prebuilt objects
+                    exist.
+                    BitBake does support skipping tasks if prebuilt objects are
+                    available.
+                    These objects are usually made available in the form of a
+                    shared state (sstate) cache.
+                    <note>
+                        For information on variables affecting sstate, see the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
+                        and
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>
+                        variables.
+                    </note>
+                </para>
+
+                <para>
+                    The idea of a setscene task (i.e
+                    <filename>do_</filename><replaceable>taskname</replaceable><filename>_setscene</filename>)
+                    is a version of the task where
+                    instead of building something, BitBake can skip to the end
+                    result and simply place a set of files into specific
+                    locations as needed.
+                    In some cases, it makes sense to have a setscene task
+                    variant (e.g. generating package files in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_*</filename></ulink>
+                    task).
+                    In other cases, it does not make sense (e.g. a
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
+                    task or a
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>
+                    task) since the work involved would be equal to or greater
+                    than the underlying task.
+                </para>
+
+                <para>
+                    In the build system, the common tasks that have setscene
+                    variants are
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>,
+                    <filename>do_package_write_*</filename>,
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-deploy'><filename>do_deploy</filename></ulink>,
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink>,
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>.
+                    Notice that these tasks represent most of the tasks whose
+                    output is an end result.
+                </para>
+
+                <para>
+                    The build system has knowledge of the relationship between
+                    these tasks and other preceding tasks.
+                    For example, if BitBake runs
+                    <filename>do_populate_sysroot_setscene</filename> for
+                    something, it does not make sense to run any of the
+                    <filename>do_fetch</filename>,
+                    <filename>do_unpack</filename>,
+                    <filename>do_patch</filename>,
+                    <filename>do_configure</filename>,
+                    <filename>do_compile</filename>, and
+                    <filename>do_install</filename> tasks.
+                    However, if <filename>do_package</filename> needs to be
+                    run, BitBake needs to run those other tasks.
+                </para>
+
+                <para>
+                    It becomes more complicated if everything can come
+                    from an sstate cache because some objects are simply
+                    not required at all.
+                    For example, you do not need a compiler or native tools,
+                    such as quilt, if nothing exists to compile or patch.
+                    If the <filename>do_package_write_*</filename> packages
+                    are available from sstate, BitBake does not need the
+                    <filename>do_package</filename> task data.
+                </para>
+
+                <para>
+                    To handle all these complexities, BitBake runs in two
+                    phases.
+                    The first is the "setscene" stage.
+                    During this stage, BitBake first checks the sstate cache
+                    for any targets it is planning to build.
+                    BitBake does a fast check to see if the object exists
+                    rather than a complete download.
+                    If nothing exists, the second phase, which is the setscene
+                    stage, completes and the main build proceeds.
+                </para>
+
+                <para>
+                    If objects are found in the sstate cache, the build system
+                    works backwards from the end targets specified by the user.
+                    For example, if an image is being built, the build system
+                    first looks for the packages needed for that image and the
+                    tools needed to construct an image.
+                    If those are available, the compiler is not needed.
+                    Thus, the compiler is not even downloaded.
+                    If something was found to be unavailable, or the
+                    download or setscene task fails, the build system then
+                    tries to install dependencies, such as the compiler, from
+                    the cache.
+                </para>
+
+                <para>
+                    The availability of objects in the sstate cache is
+                    handled by the function specified by the
+                    <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHCHECK_FUNCTION'><filename>BB_HASHCHECK_FUNCTION</filename></ulink>
+                    variable and returns a list of available objects.
+                    The function specified by the
+                    <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_SETSCENE_DEPVALID'><filename>BB_SETSCENE_DEPVALID</filename></ulink>
+                    variable is the function that determines whether a given
+                    dependency needs to be followed, and whether for any given
+                    relationship the function needs to be passed.
+                    The function returns a True or False value.
+                </para>
+            </section>
+        </section>
+
+        <section id='images-dev-environment'>
+            <title>Images</title>
+
+            <para>
+                The images produced by the build system are compressed forms
+                of the root filesystem and are ready to boot on a target
+                device.
+                You can see from the
+                <link linkend='general-workflow-figure'>general workflow figure</link>
+                that BitBake output, in part, consists of images.
+                This section takes a closer look at this output:
+                <imagedata fileref="figures/images.png" align="center" width="5.5in" depth="5.5in" />
+            </para>
+
+            <note>
+                For a list of example images that the Yocto Project provides,
+                see the
+                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
+                chapter in the Yocto Project Reference Manual.
+            </note>
+
+            <para>
+                The build process writes images out to the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                inside the
+                <filename>tmp/deploy/images/<replaceable>machine</replaceable>/</filename>
+                folder as shown in the figure.
+                This folder contains any files expected to be loaded on the
+                target device.
+                The
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>
+                variable points to the <filename>deploy</filename> directory,
+                while the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></ulink>
+                variable points to the appropriate directory containing images
+                for the current configuration.
+                <itemizedlist>
+                    <listitem><para>
+                        <replaceable>kernel-image</replaceable>:
+                        A kernel binary file.
+                        The
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></ulink>
+                        variable determines the naming scheme for the
+                        kernel image file.
+                        Depending on this variable, the file could begin with
+                        a variety of naming strings.
+                        The
+                        <filename>deploy/images/</filename><replaceable>machine</replaceable>
+                        directory can contain multiple image files for the
+                        machine.
+                        </para></listitem>
+                    <listitem><para>
+                        <replaceable>root-filesystem-image</replaceable>:
+                        Root filesystems for the target device (e.g.
+                        <filename>*.ext3</filename> or
+                        <filename>*.bz2</filename> files).
+                        The
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
+                        variable determines the root filesystem image type.
+                        The
+                        <filename>deploy/images/</filename><replaceable>machine</replaceable>
+                        directory can contain multiple root filesystems for the
+                        machine.
+                        </para></listitem>
+                    <listitem><para>
+                        <replaceable>kernel-modules</replaceable>:
+                        Tarballs that contain all the modules built for the
+                        kernel.
+                        Kernel module tarballs exist for legacy purposes and
+                        can be suppressed by setting the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></ulink>
+                        variable to "0".
+                        The
+                        <filename>deploy/images/</filename><replaceable>machine</replaceable>
+                        directory can contain multiple kernel module tarballs
+                        for the machine.
+                        </para></listitem>
+                    <listitem><para>
+                        <replaceable>bootloaders</replaceable>:
+                        If applicable to the target machine, bootloaders
+                        supporting the image.
+                        The <filename>deploy/images/</filename><replaceable>machine</replaceable>
+                        directory can contain multiple bootloaders for the
+                        machine.
+                        </para></listitem>
+                    <listitem><para>
+                        <replaceable>symlinks</replaceable>:
+                        The
+                        <filename>deploy/images/</filename><replaceable>machine</replaceable>
+                        folder contains a symbolic link that points to the
+                        most recently built file for each machine.
+                        These links might be useful for external scripts that
+                        need to obtain the latest version of each file.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='sdk-dev-environment'>
+            <title>Application Development SDK</title>
+
+            <para>
+                In the
+                <link linkend='general-workflow-figure'>general workflow figure</link>,
+                the output labeled "Application Development SDK" represents an
+                SDK.
+                The SDK generation process differs depending on whether you
+                build an extensible SDK (e.g.
+                <filename>bitbake -c populate_sdk_ext</filename> <replaceable>imagename</replaceable>)
+                or a standard SDK (e.g.
+                <filename>bitbake -c populate_sdk</filename> <replaceable>imagename</replaceable>).
+                This section takes a closer look at this output:
+                <imagedata fileref="figures/sdk.png" align="center" width="9in" depth="7.25in" />
+            </para>
+
+            <para>
+                The specific form of this output is a set of files that
+                includes a self-extracting SDK installer
+                (<filename>*.sh</filename>), host and target manifest files,
+                and files used for SDK testing.
+                When the SDK installer file is run, it installs the SDK.
+                The SDK consists of a cross-development toolchain, a set of
+                libraries and headers, and an SDK environment setup script.
+                Running this installer essentially sets up your
+                cross-development environment.
+                You can think of the cross-toolchain as the "host"
+                part because it runs on the SDK machine.
+                You can think of the libraries and headers as the "target"
+                part because they are built for the target hardware.
+                The environment setup script is added so that you can
+                initialize the environment before using the tools.
+            </para>
+
+            <note><title>Notes</title>
+                <itemizedlist>
+                    <listitem><para>
+                        The Yocto Project supports several methods by which
+                        you can set up this cross-development environment.
+                        These methods include downloading pre-built SDK
+                        installers or building and installing your own SDK
+                        installer.
+                        </para></listitem>
+                    <listitem><para>
+                        For background information on cross-development
+                        toolchains in the Yocto Project development
+                        environment, see the
+                        "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
+                        section.
+                        </para></listitem>
+                    <listitem><para>
+                        For information on setting up a cross-development
+                        environment, see the
+                        <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+                        manual.
+                        </para></listitem>
+                </itemizedlist>
+            </note>
+
+            <para>
+                All the output files for an SDK are written to the
+                <filename>deploy/sdk</filename> folder inside the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                as shown in the previous figure.
+                Depending on the type of SDK, several variables exist that help
+                configure these files.
+                The following list shows the variables associated with an
+                extensible SDK:
+                <itemizedlist>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>:
+                        Points to the <filename>deploy</filename> directory.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink>:
+                        Controls whether or not shared state artifacts are
+                        copied into the extensible SDK.
+                        By default, all required shared state artifacts are
+                        copied into the SDK.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_PKGDATA'><filename>SDK_INCLUDE_PKGDATA</filename></ulink>:
+                        Specifies whether or not packagedata is included in the
+                        extensible SDK for all recipes in the "world" target.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink>:
+                        Specifies whether or not the toolchain is included
+                        when building the extensible SDK.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></ulink>:
+                        A list of variables allowed through from the build
+                        system configuration into the extensible SDK
+                        configuration.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></ulink>:
+                        A list of variables not allowed through from the build
+                        system configuration into the extensible SDK
+                        configuration.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink>:
+                        A list of classes to remove from the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink>
+                        value globally within the extensible SDK configuration.
+                        </para></listitem>
+                </itemizedlist>
+                This next list, shows the variables associated with a standard
+                SDK:
+                <itemizedlist>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>:
+                        Points to the <filename>deploy</filename> directory.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>:
+                        Specifies the architecture of the machine on which the
+                        cross-development tools are run to create packages for
+                        the target hardware.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></ulink>:
+                        Lists the features to include in the "target" part
+                        of the SDK.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></ulink>:
+                        Lists packages that make up the host part of the SDK
+                        (i.e. the part that runs on the
+                        <filename>SDKMACHINE</filename>).
+                        When you use
+                        <filename>bitbake -c populate_sdk <replaceable>imagename</replaceable></filename>
+                        to create the SDK, a set of default packages apply.
+                        This variable allows you to add more packages.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></ulink>:
+                        Lists packages that make up the target part of the SDK
+                        (i.e. the part built for the target hardware).
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKPATH'><filename>SDKPATH</filename></ulink>:
+                        Defines the default SDK installation path offered by
+                        the installation script.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_HOST_MANIFEST'><filename>SDK_HOST_MANIFEST</filename></ulink>:
+                        Lists all the installed packages that make up the host
+                        part of the SDK.
+                        This variable also plays a minor role for extensible
+                        SDK development as well.
+                        However, it is mainly used for the standard SDK.
+                        </para></listitem>
+                    <listitem><para>
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_TARGET_MANIFEST'><filename>SDK_TARGET_MANIFEST</filename></ulink>:
+                        Lists all the installed packages that make up the
+                        target part of the SDK.
+                        This variable also plays a minor role for extensible
+                        SDK development as well.
+                        However, it is mainly used for the standard SDK.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+    </section>
+
+    <section id="cross-development-toolchain-generation">
+        <title>Cross-Development Toolchain Generation</title>
+
+        <para>
+            The Yocto Project does most of the work for you when it comes to
+            creating
+            <ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
+            This section provides some technical background on how
+            cross-development toolchains are created and used.
+            For more information on toolchains, you can also see the
+            <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+            manual.
+        </para>
+
+        <para>
+            In the Yocto Project development environment, cross-development
+            toolchains are used to build images and applications that run
+            on the target hardware.
+            With just a few commands, the OpenEmbedded build system creates
+            these necessary toolchains for you.
+        </para>
+
+        <para>
+            The following figure shows a high-level build environment regarding
+            toolchain construction and use.
+        </para>
+
+        <para>
+            <imagedata fileref="figures/cross-development-toolchains.png" width="8in" depth="6in" align="center" />
+        </para>
+
+        <para>
+            Most of the work occurs on the Build Host.
+            This is the machine used to build images and generally work within
+            the the Yocto Project environment.
+            When you run
+            <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+            to create an image, the OpenEmbedded build system
+            uses the host <filename>gcc</filename> compiler to bootstrap a
+            cross-compiler named <filename>gcc-cross</filename>.
+            The <filename>gcc-cross</filename> compiler is what BitBake uses to
+            compile source files when creating the target image.
+            You can think of <filename>gcc-cross</filename> simply as an
+            automatically generated cross-compiler that is used internally
+            within BitBake only.
+            <note>
+                The extensible SDK does not use
+                <filename>gcc-cross-canadian</filename> since this SDK
+                ships a copy of the OpenEmbedded build system and the sysroot
+                within it contains <filename>gcc-cross</filename>.
+            </note>
+        </para>
+
+        <para>
+            The chain of events that occurs when <filename>gcc-cross</filename> is
+            bootstrapped is as follows:
+            <literallayout class='monospaced'>
+     gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> glibc-initial -> glibc -> gcc-cross -> gcc-runtime
+            </literallayout>
+            <itemizedlist>
+                <listitem><para>
+                    <filename>gcc</filename>:
+                    The build host's GNU Compiler Collection (GCC).
+                    </para></listitem>
+                <listitem><para>
+                    <filename>binutils-cross</filename>:
+                    The bare minimum binary utilities needed in order to run
+                    the <filename>gcc-cross-initial</filename> phase of the
+                    bootstrap operation.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>gcc-cross-initial</filename>:
+                    An early stage of the bootstrap process for creating
+                    the cross-compiler.
+                    This stage builds enough of the <filename>gcc-cross</filename>,
+                    the C library, and other pieces needed to finish building the
+                    final cross-compiler in later stages.
+                    This tool is a "native" package (i.e. it is designed to run on
+                    the build host).
+                    </para></listitem>
+                <listitem><para>
+                    <filename>linux-libc-headers</filename>:
+                    Headers needed for the cross-compiler.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>glibc-initial</filename>:
+                    An initial version of the Embedded GNU C Library
+                    (GLIBC) needed to bootstrap <filename>glibc</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>glibc</filename>:
+                    The GNU C Library.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>gcc-cross</filename>:
+                    The final stage of the bootstrap process for the
+                    cross-compiler.
+                    This stage results in the actual cross-compiler that
+                    BitBake uses when it builds an image for a targeted
+                    device.
+                    <note>
+                        If you are replacing this cross compiler toolchain
+                        with a custom version, you must replace
+                        <filename>gcc-cross</filename>.
+                    </note>
+                    This tool is also a "native" package (i.e. it is
+                    designed to run on the build host).
+                    </para></listitem>
+                <listitem><para>
+                    <filename>gcc-runtime</filename>:
+                    Runtime libraries resulting from the toolchain bootstrapping
+                    process.
+                    This tool produces a binary that consists of the
+                    runtime libraries need for the targeted device.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            You can use the OpenEmbedded build system to build an installer for
+            the relocatable SDK used to develop applications.
+            When you run the installer, it installs the toolchain, which
+            contains the development tools (e.g.,
+            <filename>gcc-cross-canadian</filename>,
+            <filename>binutils-cross-canadian</filename>, and other
+            <filename>nativesdk-*</filename> tools),
+            which are tools native to the SDK (i.e. native to
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_ARCH'><filename>SDK_ARCH</filename></ulink>),
+            you need to cross-compile and test your software.
+            The figure shows the commands you use to easily build out this
+            toolchain.
+            This cross-development toolchain is built to execute on the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>,
+            which might or might not be the same
+            machine as the Build Host.
+            <note>
+                If your target architecture is supported by the Yocto Project,
+                you can take advantage of pre-built images that ship with the
+                Yocto Project and already contain cross-development toolchain
+                installers.
+            </note>
+        </para>
+
+        <para>
+            Here is the bootstrap process for the relocatable toolchain:
+            <literallayout class='monospaced'>
+     gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers ->
+        glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian
+            </literallayout>
+            <itemizedlist>
+                <listitem><para>
+                    <filename>gcc</filename>:
+                    The build host's GNU Compiler Collection (GCC).
+                    </para></listitem>
+                <listitem><para>
+                    <filename>binutils-crosssdk</filename>:
+                    The bare minimum binary utilities needed in order to run
+                    the <filename>gcc-crosssdk-initial</filename> phase of the
+                    bootstrap operation.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>gcc-crosssdk-initial</filename>:
+                    An early stage of the bootstrap process for creating
+                    the cross-compiler.
+                    This stage builds enough of the
+                    <filename>gcc-crosssdk</filename> and supporting pieces so that
+                    the final stage of the bootstrap process can produce the
+                    finished cross-compiler.
+                    This tool is a "native" binary that runs on the build host.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>linux-libc-headers</filename>:
+                    Headers needed for the cross-compiler.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>glibc-initial</filename>:
+                    An initial version of the Embedded GLIBC needed to bootstrap
+                    <filename>nativesdk-glibc</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>nativesdk-glibc</filename>:
+                    The Embedded GLIBC needed to bootstrap the
+                    <filename>gcc-crosssdk</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>gcc-crosssdk</filename>:
+                    The final stage of the bootstrap process for the
+                    relocatable cross-compiler.
+                    The <filename>gcc-crosssdk</filename> is a transitory
+                    compiler and never leaves the build host.
+                    Its purpose is to help in the bootstrap process to create
+                    the eventual <filename>gcc-cross-canadian</filename>
+                    compiler, which is relocatable.
+                    This tool is also a "native" package (i.e. it is
+                    designed to run on the build host).
+                    </para></listitem>
+                <listitem><para>
+                    <filename>gcc-cross-canadian</filename>:
+                    The final relocatable cross-compiler.
+                    When run on the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>,
+                    this tool
+                    produces executable code that runs on the target device.
+                    Only one cross-canadian compiler is produced per architecture
+                    since they can be targeted at different processor optimizations
+                    using configurations passed to the compiler through the
+                    compile commands.
+                    This circumvents the need for multiple compilers and thus
+                    reduces the size of the toolchains.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <note>
+            For information on advantages gained when building a
+            cross-development toolchain installer, see the
+            "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
+            appendix in the Yocto Project Application Development and the
+            Extensible Software Development Kit (eSDK) manual.
+        </note>
+    </section>
+
+    <section id="shared-state-cache">
+        <title>Shared State Cache</title>
+
+        <para>
+            By design, the OpenEmbedded build system builds everything from
+            scratch unless
+            <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+            can determine that parts do not need to be rebuilt.
+            Fundamentally, building from scratch is attractive as it means all
+            parts are built fresh and no possibility of stale data exists that
+            can cause problems.
+            When developers hit problems, they typically default back to
+            building from scratch so they have a know state from the
+            start.
+        </para>
+
+        <para>
+            Building an image from scratch is both an advantage and a
+            disadvantage to the process.
+            As mentioned in the previous paragraph, building from scratch
+            ensures that everything is current and starts from a known state.
+            However, building from scratch also takes much longer as it
+            generally means rebuilding things that do not necessarily need
+            to be rebuilt.
+        </para>
+
+        <para>
+            The Yocto Project implements shared state code that supports
+            incremental builds.
+            The implementation of the shared state code answers the following
+            questions that were fundamental roadblocks within the OpenEmbedded
+            incremental build support system:
+            <itemizedlist>
+                <listitem><para>
+                    What pieces of the system have changed and what pieces have
+                    not changed?
+                    </para></listitem>
+                <listitem><para>
+                    How are changed pieces of software removed and replaced?
+                    </para></listitem>
+                <listitem><para>
+                    How are pre-built components that do not need to be rebuilt
+                    from scratch used when they are available?
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            For the first question, the build system detects changes in the
+            "inputs" to a given task by creating a checksum (or signature) of
+            the task's inputs.
+            If the checksum changes, the system assumes the inputs have changed
+            and the task needs to be rerun.
+            For the second question, the shared state (sstate) code tracks
+            which tasks add which output to the build process.
+            This means the output from a given task can be removed, upgraded
+            or otherwise manipulated.
+            The third question is partly addressed by the solution for the
+            second question assuming the build system can fetch the sstate
+            objects from remote locations and install them if they are deemed
+            to be valid.
+            <note><title>Notes</title>
+                <itemizedlist>
+                    <listitem><para>
+                        The build system does not maintain
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
+                        information as part of the shared state packages.
+                        Consequently, considerations exist that affect
+                        maintaining shared state feeds.
+                        For information on how the build system works with
+                        packages and can track incrementing
+                        <filename>PR</filename> information, see the
+                       "<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
+                        section in the Yocto Project Development Tasks Manual.
+                        </para></listitem>
+                    <listitem><para>
+                        The code in the build system that supports incremental
+                        builds is not simple code.
+                        For techniques that help you work around issues related
+                        to shared state code, see the
+                        "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-viewing-metadata-used-to-create-the-input-signature-of-a-shared-state-task'>Viewing Metadata Used to Create the Input Signature of a Shared State Task</ulink>"
+                        and
+                        "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-invalidating-shared-state-to-force-a-task-to-run'>Invalidating Shared State to Force a Task to Run</ulink>"
+                        sections both in the Yocto Project Development Tasks
+                        Manual.
+                        </para></listitem>
+                </itemizedlist>
+            </note>
+        </para>
+
+        <para>
+            The rest of this section goes into detail about the overall
+            incremental build architecture, the checksums (signatures), and
+            shared state.
+        </para>
+
+        <section id='concepts-overall-architecture'>
+            <title>Overall Architecture</title>
+
+            <para>
+                When determining what parts of the system need to be built,
+                BitBake works on a per-task basis rather than a per-recipe
+                basis.
+                You might wonder why using a per-task basis is preferred over
+                a per-recipe basis.
+                To help explain, consider having the IPK packaging backend
+                enabled and then switching to DEB.
+                In this case, the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+                and
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
+                task outputs are still valid.
+                However, with a per-recipe approach, the build would not
+                include the <filename>.deb</filename> files.
+                Consequently, you would have to invalidate the whole build and
+                rerun it.
+                Rerunning everything is not the best solution.
+                Also, in this case, the core must be "taught" much about
+                specific tasks.
+                This methodology does not scale well and does not allow users
+                to easily add new tasks in layers or as external recipes
+                without touching the packaged-staging core.
+            </para>
+        </section>
+
+        <section id='overview-checksums'>
+            <title>Checksums (Signatures)</title>
+
+            <para>
+                The shared state code uses a checksum, which is a unique
+                signature of a task's inputs, to determine if a task needs to
+                be run again.
+                Because it is a change in a task's inputs that triggers a
+                rerun, the process needs to detect all the inputs to a given
+                task.
+                For shell tasks, this turns out to be fairly easy because
+                the build process generates a "run" shell script for each task
+                and it is possible to create a checksum that gives you a good
+                idea of when the task's data changes.
+            </para>
+
+            <para>
+                To complicate the problem, there are things that should not be
+                included in the checksum.
+                First, there is the actual specific build path of a given
+                task - the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.
+                It does not matter if the work directory changes because it
+                should not affect the output for target packages.
+                Also, the build process has the objective of making native
+                or cross packages relocatable.
+                <note>
+                    Both native and cross packages run on the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>.
+                    However, cross packages generate output for the target
+                    architecture.
+                </note>
+                The checksum therefore needs to exclude
+                <filename>WORKDIR</filename>.
+                The simplistic approach for excluding the work directory is to
+                set <filename>WORKDIR</filename> to some fixed value and
+                create the checksum for the "run" script.
+            </para>
+
+            <para>
+                Another problem results from the "run" scripts containing
+                functions that might or might not get called.
+                The incremental build solution contains code that figures out
+                dependencies between shell functions.
+                This code is used to prune the "run" scripts down to the
+                minimum set, thereby alleviating this problem and making the
+                "run" scripts much more readable as a bonus.
+            </para>
+
+            <para>
+                So far, solutions for shell scripts exist.
+                What about Python tasks?
+                The same approach applies even though these tasks are more
+                difficult.
+                The process needs to figure out what variables a Python
+                function accesses and what functions it calls.
+                Again, the incremental build solution contains code that first
+                figures out the variable and function dependencies, and then
+                creates a checksum for the data used as the input to the task.
+            </para>
+
+            <para>
+                Like the <filename>WORKDIR</filename> case, situations exist
+                where dependencies should be ignored.
+                For these situations, you can instruct the build process to
+                ignore a dependency by using a line like the following:
+                <literallayout class='monospaced'>
+     PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
+                </literallayout>
+                This example ensures that the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCHS'><filename>PACKAGE_ARCHS</filename></ulink>
+                variable does not depend on the value of
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
+                even if it does reference it.
+            </para>
+
+            <para>
+                Equally, there are cases where you need to add dependencies
+                BitBake is not able to find.
+                You can accomplish this by using a line like the following:
+                <literallayout class='monospaced'>
+      PACKAGE_ARCHS[vardeps] = "MACHINE"
+                </literallayout>
+                This example explicitly adds the <filename>MACHINE</filename>
+                variable as a dependency for
+                <filename>PACKAGE_ARCHS</filename>.
+            </para>
+
+            <para>
+                As an example, consider a case with in-line Python where
+                BitBake is not able to figure out dependencies.
+                When running in debug mode (i.e. using
+                <filename>-DDD</filename>), BitBake produces output when it
+                discovers something for which it cannot figure out dependencies.
+                The Yocto Project team has currently not managed to cover
+                those dependencies in detail and is aware of the need to fix
+                this situation.
+            </para>
+
+            <para>
+                Thus far, this section has limited discussion to the direct
+                inputs into a task.
+                Information based on direct inputs is referred to as the
+                "basehash" in the code.
+                However, the question of a task's indirect inputs still
+                exits - items already built and present in the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+                The checksum (or signature) for a particular task needs to add
+                the hashes of all the tasks on which the particular task
+                depends.
+                Choosing which dependencies to add is a policy decision.
+                However, the effect is to generate a master checksum that
+                combines the basehash and the hashes of the task's
+                dependencies.
+            </para>
+
+            <para>
+                At the code level, a variety of ways exist by which both the
+                basehash and the dependent task hashes can be influenced.
+                Within the BitBake configuration file, you can give BitBake
+                some extra information to help it construct the basehash.
+                The following statement effectively results in a list of
+                global variable dependency excludes (i.e. variables never
+                included in any checksum):
+                <literallayout class='monospaced'>
+     BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
+         SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
+         USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
+         PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
+         CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
+                </literallayout>
+                The previous example excludes
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
+                since that variable is actually constructed as a path within
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>,
+                which is on the whitelist.
+            </para>
+
+            <para>
+                The rules for deciding which hashes of dependent tasks to
+                include through dependency chains are more complex and are
+                generally accomplished with a Python function.
+                The code in <filename>meta/lib/oe/sstatesig.py</filename> shows
+                two examples of this and also illustrates how you can insert
+                your own policy into the system if so desired.
+                This file defines the two basic signature generators
+                <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OE-Core</ulink>
+                uses:  "OEBasic" and "OEBasicHash".
+                By default, a dummy "noop" signature handler is enabled
+                in BitBake.
+                This means that behavior is unchanged from previous versions.
+                OE-Core uses the "OEBasicHash" signature handler by default
+                through this setting in the <filename>bitbake.conf</filename>
+                file:
+                <literallayout class='monospaced'>
+     BB_SIGNATURE_HANDLER ?= "OEBasicHash"
+                </literallayout>
+                The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename>
+                is the same as the "OEBasic" version but adds the task hash to
+                the
+                <link linkend='stamp-files-and-the-rerunning-of-tasks'>stamp files</link>.
+                This results in any metadata change that changes the task hash,
+                automatically causing the task to be run again.
+                This removes the need to bump
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
+                values, and changes to metadata automatically ripple across
+                the build.
+            </para>
+
+            <para>
+                It is also worth noting that the end result of these
+                signature generators is to make some dependency and hash
+                information available to the build.
+                This information includes:
+                <itemizedlist>
+                    <listitem><para>
+                        <filename>BB_BASEHASH_task-</filename><replaceable>taskname</replaceable>:
+                        The base hashes for each task in the recipe.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>BB_BASEHASH_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
+                        The base hashes for each dependent task.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>BBHASHDEPS_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
+                        The task dependencies for each task.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>BB_TASKHASH</filename>:
+                        The hash of the currently running task.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='shared-state'>
+            <title>Shared State</title>
+
+            <para>
+                Checksums and dependencies, as discussed in the previous
+                section, solve half the problem of supporting a shared state.
+                The other half of the problem is being able to use checksum
+                information during the build and being able to reuse or rebuild
+                specific components.
+            </para>
+
+            <para>
+                The
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-sstate'><filename>sstate</filename></ulink>
+                class is a relatively generic implementation of how to
+                "capture" a snapshot of a given task.
+                The idea is that the build process does not care about the
+                source of a task's output.
+                Output could be freshly built or it could be downloaded and
+                unpacked from somewhere.
+                In other words, the build process does not need to worry about
+                its origin.
+            </para>
+
+            <para>
+                Two types of output exist.
+                One type is just about creating a directory in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.
+                A good example is the output of either
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+                or
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>.
+                The other type of output occurs when a set of data is merged
+                into a shared directory tree such as the sysroot.
+            </para>
+
+            <para>
+                The Yocto Project team has tried to keep the details of the
+                implementation hidden in <filename>sstate</filename> class.
+                From a user's perspective, adding shared state wrapping to a
+                task is as simple as this
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-deploy'><filename>do_deploy</filename></ulink>
+                example taken from the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-deploy'><filename>deploy</filename></ulink>
+                class:
+                <literallayout class='monospaced'>
+     DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
+     SSTATETASKS += "do_deploy"
+     do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
+     do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
+
+     python do_deploy_setscene () {
+         sstate_setscene(d)
+     }
+     addtask do_deploy_setscene
+     do_deploy[dirs] = "${DEPLOYDIR} ${B}"
+     do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
+                </literallayout>
+                The following list explains the previous example:
+                <itemizedlist>
+                    <listitem><para>
+                        Adding "do_deploy" to <filename>SSTATETASKS</filename>
+                        adds some required sstate-related processing, which is
+                        implemented in the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-sstate'><filename>sstate</filename></ulink>
+                        class, to before and after the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-deploy'><filename>do_deploy</filename></ulink>
+                        task.
+                        </para></listitem>
+                    <listitem><para>
+                        The
+                        <filename>do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"</filename>
+                        declares that <filename>do_deploy</filename> places its
+                        output in <filename>${DEPLOYDIR}</filename> when run
+                        normally (i.e. when not using the sstate cache).
+                        This output becomes the input to the shared state cache.
+                        </para></listitem>
+                    <listitem><para>
+                        The
+                        <filename>do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"</filename>
+                        line causes the contents of the shared state cache to be
+                        copied to <filename>${DEPLOY_DIR_IMAGE}</filename>.
+                        <note>
+                            If <filename>do_deploy</filename> is not already in
+                            the shared state cache or if its input checksum
+                            (signature) has changed from when the output was
+                            cached, the task runs to populate the shared
+                            state cache, after which the contents of the shared
+                            state cache is copied to
+                            <filename>${DEPLOY_DIR_IMAGE}</filename>.
+                            If <filename>do_deploy</filename> is in the shared
+                            state cache and its signature indicates that the
+                            cached output is still valid (i.e. if no
+                            relevant task inputs have changed), then the
+                            contents of the shared state cache copies
+                            directly to
+                            <filename>${DEPLOY_DIR_IMAGE}</filename> by the
+                            <filename>do_deploy_setscene</filename> task
+                            instead, skipping the
+                            <filename>do_deploy</filename> task.
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        The following task definition is glue logic needed to
+                        make the previous settings effective:
+                        <literallayout class='monospaced'>
+     python do_deploy_setscene () {
+         sstate_setscene(d)
+     }
+     addtask do_deploy_setscene
+                        </literallayout>
+                        <filename>sstate_setscene()</filename> takes the flags
+                        above as input and accelerates the
+                        <filename>do_deploy</filename> task through the
+                        shared state cache if possible.
+                        If the task was accelerated,
+                        <filename>sstate_setscene()</filename> returns True.
+                        Otherwise, it returns False, and the normal
+                        <filename>do_deploy</filename> task runs.
+                        For more information, see the
+                        "<ulink url='&YOCTO_DOCS_BB_URL;#setscene'>setscene</ulink>"
+                        section in the BitBake User Manual.
+                        </para></listitem>
+                    <listitem><para>
+                        The <filename>do_deploy[dirs] = "${DEPLOYDIR} ${B}"</filename>
+                        line creates <filename>${DEPLOYDIR}</filename> and
+                        <filename>${B}</filename> before the
+                        <filename>do_deploy</filename> task runs, and also sets
+                        the current working directory of
+                        <filename>do_deploy</filename> to
+                        <filename>${B}</filename>.
+                        For more information, see the
+                        "<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'>Variable Flags</ulink>"
+                        section in the BitBake User Manual.
+                        <note>
+                            In cases where
+                            <filename>sstate-inputdirs</filename> and
+                            <filename>sstate-outputdirs</filename> would be the
+                            same, you can use
+                            <filename>sstate-plaindirs</filename>.
+                            For example, to preserve the
+                            <filename>${PKGD}</filename> and
+                            <filename>${PKGDEST}</filename> output from the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
+                            task, use the following:
+                            <literallayout class='monospaced'>
+     do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
+                            </literallayout>
+                        </note>
+                        </para></listitem>
+                    <listitem><para>
+                        The <filename>do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"</filename>
+                        line appends extra metadata to the
+                        <link linkend='stamp-files-and-the-rerunning-of-tasks'>stamp file</link>.
+                        In this case, the metadata makes the task specific
+                        to a machine's architecture.
+                        See
+                        "<ulink url='&YOCTO_DOCS_BB_URL;#ref-bitbake-tasklist'>The Task List</ulink>"
+                        section in the BitBake User Manual for more
+                        information on the <filename>stamp-extra-info</filename>
+                        flag.
+                        </para></listitem>
+                    <listitem><para>
+                        <filename>sstate-inputdirs</filename> and
+                        <filename>sstate-outputdirs</filename> can also be used
+                        with multiple directories.
+                        For example, the following declares
+                        <filename>PKGDESTWORK</filename> and
+                        <filename>SHLIBWORK</filename> as shared state
+                        input directories, which populates the shared state
+                        cache, and <filename>PKGDATA_DIR</filename> and
+                        <filename>SHLIBSDIR</filename> as the corresponding
+                        shared state output directories:
+                        <literallayout class='monospaced'>
+     do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
+     do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        These methods also include the ability to take a
+                        lockfile when manipulating shared state directory
+                        structures, for cases where file additions or removals
+                        are sensitive:
+                        <literallayout class='monospaced'>
+     do_package[sstate-lockfile] = "${PACKAGELOCK}"
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+
+            <para>
+                Behind the scenes, the shared state code works by looking in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
+                and
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>
+                for shared state files.
+                Here is an example:
+                <literallayout class='monospaced'>
+     SSTATE_MIRRORS ?= "\
+     file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
+     file://.* file:///some/local/dir/sstate/PATH"
+                </literallayout>
+                <note>
+                    The shared state directory
+                    (<filename>SSTATE_DIR</filename>) is organized into
+                    two-character subdirectories, where the subdirectory
+                    names are based on the first two characters of the hash.
+                    If the shared state directory structure for a mirror has the
+                    same structure as <filename>SSTATE_DIR</filename>, you must
+                    specify "PATH" as part of the URI to enable the build system
+                    to map to the appropriate subdirectory.
+                </note>
+            </para>
+
+            <para>
+                The shared state package validity can be detected just by
+                looking at the filename since the filename contains the task
+                checksum (or signature) as described earlier in this section.
+                If a valid shared state package is found, the build process
+                downloads it and uses it to accelerate the task.
+            </para>
+
+            <para>
+                The build processes use the <filename>*_setscene</filename>
+                tasks for the task acceleration phase.
+                BitBake goes through this phase before the main execution
+                code and tries to accelerate any tasks for which it can find
+                shared state packages.
+                If a shared state package for a task is available, the
+                shared state package is used.
+                This means the task and any tasks on which it is dependent
+                are not executed.
+            </para>
+
+            <para>
+                As a real world example, the aim is when building an IPK-based
+                image, only the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></ulink>
+                tasks would have their shared state packages fetched and
+                extracted.
+                Since the sysroot is not used, it would never get extracted.
+                This is another reason why a task-based approach is preferred
+                over a recipe-based approach, which would have to install the
+                output from every task.
+            </para>
+        </section>
+    </section>
+
+    <section id='automatically-added-runtime-dependencies'>
+        <title>Automatically Added Runtime Dependencies</title>
+
+        <para>
+            The OpenEmbedded build system automatically adds common types of
+            runtime dependencies between packages, which means that you do not
+            need to explicitly declare the packages using
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>.
+            Three automatic mechanisms exist (<filename>shlibdeps</filename>,
+            <filename>pcdeps</filename>, and <filename>depchains</filename>)
+            that handle shared libraries, package configuration (pkg-config)
+            modules, and <filename>-dev</filename> and
+            <filename>-dbg</filename> packages, respectively.
+            For other types of runtime dependencies, you must manually declare
+            the dependencies.
+            <itemizedlist>
+                <listitem><para>
+                    <filename>shlibdeps</filename>:
+                    During the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
+                    task of each recipe, all shared libraries installed by the
+                    recipe are located.
+                    For each shared library, the package that contains the
+                    shared library is registered as providing the shared
+                    library.
+                    More specifically, the package is registered as providing
+                    the
+                    <ulink url='https://en.wikipedia.org/wiki/Soname'>soname</ulink>
+                    of the library.
+                    The resulting shared-library-to-package mapping
+                    is saved globally in
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>
+                    by the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink>
+                    task.</para>
+
+                    <para>Simultaneously, all executables and shared libraries
+                    installed by the recipe are inspected to see what shared
+                    libraries they link against.
+                    For each shared library dependency that is found,
+                    <filename>PKGDATA_DIR</filename> is queried to
+                    see if some package (likely from a different recipe)
+                    contains the shared library.
+                    If such a package is found, a runtime dependency is added
+                    from the package that depends on the shared library to the
+                    package that contains the library.</para>
+
+                    <para>The automatically added runtime dependency also
+                    includes a version restriction.
+                    This version restriction specifies that at least the
+                    current version of the package that provides the shared
+                    library must be used, as if
+                    "<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)"
+                    had been added to <filename>RDEPENDS</filename>.
+                    This forces an upgrade of the package containing the shared
+                    library when installing the package that depends on the
+                    library, if needed.</para>
+
+                    <para>If you want to avoid a package being registered as
+                    providing a particular shared library (e.g. because the library
+                    is for internal use only), then add the library to
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></ulink>
+                    inside the package's recipe.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>pcdeps</filename>:
+                    During the <filename>do_package</filename> task of each
+                    recipe, all pkg-config modules
+                    (<filename>*.pc</filename> files) installed by the recipe
+                    are located.
+                    For each module, the package that contains the module is
+                    registered as providing the module.
+                    The resulting module-to-package mapping is saved globally in
+                    <filename>PKGDATA_DIR</filename> by the
+                    <filename>do_packagedata</filename> task.</para>
+
+                    <para>Simultaneously, all pkg-config modules installed by
+                    the recipe are inspected to see what other pkg-config
+                    modules they depend on.
+                    A module is seen as depending on another module if it
+                    contains a "Requires:" line that specifies the other module.
+                    For each module dependency,
+                    <filename>PKGDATA_DIR</filename> is queried to see if some
+                    package contains the module.
+                    If such a package is found, a runtime dependency is added
+                    from the package that depends on the module to the package
+                    that contains the module.
+                    <note>
+                        The <filename>pcdeps</filename> mechanism most often
+                        infers dependencies between <filename>-dev</filename>
+                        packages.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <filename>depchains</filename>:
+                    If a package <filename>foo</filename> depends on a package
+                    <filename>bar</filename>, then <filename>foo-dev</filename>
+                    and <filename>foo-dbg</filename> are also made to depend on
+                    <filename>bar-dev</filename> and
+                    <filename>bar-dbg</filename>, respectively.
+                    Taking the <filename>-dev</filename> packages as an
+                    example, the <filename>bar-dev</filename> package might
+                    provide headers and shared library symlinks needed by
+                    <filename>foo-dev</filename>, which shows the need
+                    for a dependency between the packages.</para>
+
+                    <para>The dependencies added by
+                    <filename>depchains</filename> are in the form of
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>.
+                    <note>
+                        By default, <filename>foo-dev</filename> also has an
+                        <filename>RDEPENDS</filename>-style dependency on
+                        <filename>foo</filename>, because the default value of
+                        <filename>RDEPENDS_${PN}-dev</filename> (set in
+                        <filename>bitbake.conf</filename>) includes
+                        "${PN}".
+                    </note></para>
+
+                    <para>To ensure that the dependency chain is never broken,
+                    <filename>-dev</filename> and <filename>-dbg</filename>
+                    packages are always generated by default, even if the
+                    packages turn out to be empty.
+                    See the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></ulink>
+                    variable for more information.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            The <filename>do_package</filename> task depends on the
+            <filename>do_packagedata</filename> task of each recipe in
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
+            through use of a
+            <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename>
+            declaration, which guarantees that the required
+            shared-library/module-to-package mapping information will be available
+            when needed as long as <filename>DEPENDS</filename> has been
+            correctly set.
+        </para>
+    </section>
+
+    <section id='fakeroot-and-pseudo'>
+        <title>Fakeroot and Pseudo</title>
+
+        <para>
+            Some tasks are easier to implement when allowed to perform certain
+            operations that are normally reserved for the root user (e.g.
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>,
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write*</filename></ulink>,
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>,
+            and
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image'><filename>do_image*</filename></ulink>).
+            For example, the <filename>do_install</filename> task benefits
+            from being able to set the UID and GID of installed files to
+            arbitrary values.
+        </para>
+
+        <para>
+            One approach to allowing tasks to perform root-only operations
+            would be to require
+            <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+            to run as root.
+            However, this method is cumbersome and has security issues.
+            The approach that is actually used is to run tasks that benefit
+            from root privileges in a "fake" root environment.
+            Within this environment, the task and its child processes believe
+            that they are running as the root user, and see an internally
+            consistent view of the filesystem.
+            As long as generating the final output (e.g. a package or an image)
+            does not require root privileges, the fact that some earlier
+            steps ran in a fake root environment does not cause problems.
+        </para>
+
+        <para>
+            The capability to run tasks in a fake root environment is known as
+            "<ulink url='http://man.he.net/man1/fakeroot'>fakeroot</ulink>",
+            which is derived from the BitBake keyword/variable
+            flag that requests a fake root environment for a task.
+        </para>
+
+        <para>
+            In the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>,
+            the program that implements fakeroot is known as Pseudo.
+            Pseudo overrides system calls by using the environment variable
+            <filename>LD_PRELOAD</filename>, which results in the illusion
+            of running as root.
+            To keep track of "fake" file ownership and permissions resulting
+            from operations that require root permissions, Pseudo uses
+            an SQLite 3 database.
+            This database is stored in
+            <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/pseudo/files.db</filename>
+            for individual recipes.
+            Storing the database in a file as opposed to in memory
+            gives persistence between tasks and builds, which is not
+            accomplished using fakeroot.
+            <note><title>Caution</title>
+                If you add your own task that manipulates the same files or
+                directories as a fakeroot task, then that task also needs to
+                run under fakeroot.
+                Otherwise, the task cannot run root-only operations, and
+                cannot see the fake file ownership and permissions set by the
+                other task.
+                You need to also add a dependency on
+                <filename>virtual/fakeroot-native:do_populate_sysroot</filename>,
+                giving the following:
+                <literallayout class='monospaced'>
+       fakeroot do_mytask () {
+           ...
+       }
+       do_mytask[depends] += "virtual/fakeroot-native:do_populate_sysroot"
+                </literallayout>
+            </note>
+            For more information, see the
+            <ulink url='&YOCTO_DOCS_BB_URL;#var-FAKEROOT'><filename>FAKEROOT*</filename></ulink>
+            variables in the BitBake User Manual.
+            You can also reference the
+            "<ulink url='http://www.ibm.com/developerworks/opensource/library/os-aapseudo1/index.html'>Pseudo</ulink>"
+            and
+            "<ulink url='https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot'>Why Not Fakeroot?</ulink>"
+            articles for background information on Pseudo.
+        </para>
+    </section>
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual-customization.xsl b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-customization.xsl
new file mode 100644
index 0000000..22360e7
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-customization.xsl
@@ -0,0 +1,27 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
+
+<!--
+
+  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
+
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
+
+-->
+
+  <xsl:include href="../template/permalinks.xsl"/>
+  <xsl:include href="../template/section.title.xsl"/>
+  <xsl:include href="../template/component.title.xsl"/>
+  <xsl:include href="../template/division.title.xsl"/>
+  <xsl:include href="../template/formal.object.heading.xsl"/>
+
+  <xsl:param name="html.stylesheet" select="'overview-manual-style.css'" />
+  <xsl:param name="chapter.autolabel" select="1" />
+  <xsl:param name="appendix.autolabel" select="A" />
+  <xsl:param name="section.autolabel" select="1" />
+  <xsl:param name="section.label.includes.component.label" select="1" />
+  <xsl:param name="generate.id.attributes" select="1" />
+
+</xsl:stylesheet>
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual-development-environment.xml b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-development-environment.xml
new file mode 100644
index 0000000..bba93cc
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-development-environment.xml
@@ -0,0 +1,970 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='overview-development-environment'>
+<title>The Yocto Project Development Environment</title>
+
+<para>
+    This chapter takes a look at the Yocto Project development
+    environment.
+    The chapter provides Yocto Project Development environment concepts that
+    help you understand how work is accomplished in an open source environment,
+    which is very different as compared to work accomplished in a closed,
+    proprietary environment.
+</para>
+
+<para>
+    Specifically, this chapter addresses open source philosophy, source
+    repositories, workflows, Git, and licensing.
+</para>
+
+<section id='open-source-philosophy'>
+    <title>Open Source Philosophy</title>
+
+    <para>
+        Open source philosophy is characterized by software development
+        directed by peer production and collaboration through an active
+        community of developers.
+        Contrast this to the more standard centralized development models
+        used by commercial software companies where a finite set of developers
+        produces a product for sale using a defined set of procedures that
+        ultimately result in an end product whose architecture and source
+        material are closed to the public.
+    </para>
+
+    <para>
+        Open source projects conceptually have differing concurrent agendas,
+        approaches, and production.
+        These facets of the development process can come from anyone in the
+        public (community) who has a stake in the software project.
+        The open source environment contains new copyright, licensing, domain,
+        and consumer issues that differ from the more traditional development
+        environment.
+        In an open source environment, the end product, source material,
+        and documentation are all available to the public at no cost.
+    </para>
+
+    <para>
+        A benchmark example of an open source project is the Linux kernel,
+        which was initially conceived and created by Finnish computer science
+        student Linus Torvalds in 1991.
+        Conversely, a good example of a non-open source project is the
+        <trademark class='registered'>Windows</trademark> family of operating
+        systems developed by
+        <trademark class='registered'>Microsoft</trademark> Corporation.
+    </para>
+
+    <para>
+        Wikipedia has a good historical description of the Open Source
+        Philosophy
+        <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
+        You can also find helpful information on how to participate in the
+        Linux Community
+        <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
+    </para>
+</section>
+
+<section id='gs-the-development-host'>
+    <title>The Development Host</title>
+
+    <para>
+        A development host or
+        <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>
+        is key to using the Yocto Project.
+        Because the goal of the Yocto Project is to develop images or
+        applications that run on embedded hardware, development of those
+        images and applications generally takes place on a system not
+        intended to run the software - the development host.
+    </para>
+
+    <para>
+        You need to set up a development host in order to use it with the
+        Yocto Project.
+        Most find that it is best to have a native Linux machine function as
+        the development host.
+        However, it is possible to use a system that does not run Linux
+        as its operating system as your development host.
+        When you have a Mac or Windows-based system, you can set it up
+        as the development host by using
+        <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
+        which leverages
+        <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
+        Once you take the steps to set up a CROPS machine, you effectively
+        have access to a shell environment that is similar to what you see
+        when using a Linux-based development host.
+        For the steps needed to set up a system using CROPS, see the
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
+        section in the Yocto Project Development Tasks Manual.
+    </para>
+
+    <para>
+        If your development host is going to be a system that runs a Linux
+        distribution, steps still exist that you must take to prepare the
+        system for use with the Yocto Project.
+        You need to be sure that the Linux distribution on the system is
+        one that supports the Yocto Project.
+        You also need to be sure that the correct set of host packages are
+        installed that allow development using the Yocto Project.
+        For the steps needed to set up a development host that runs Linux,
+        see the
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-a-native-linux-host'>Setting Up a Native Linux Host</ulink>"
+        section in the Yocto Project Development Tasks Manual.
+    </para>
+
+    <para>
+        Once your development host is set up to use the Yocto Project,
+        several methods exist for you to do work in the Yocto Project
+        environment:
+        <itemizedlist>
+            <listitem><para>
+                <emphasis>Command Lines, BitBake, and Shells:</emphasis>
+                Traditional development in the Yocto Project involves using the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>,
+                which uses BitBake, in a command-line environment from a shell
+                on your development host.
+                You can accomplish this from a host that is a native Linux
+                machine or from a host that has been set up with CROPS.
+                Either way, you create, modify, and build images and
+                applications all within a shell-based environment using
+                components and tools available through your Linux distribution
+                and the Yocto Project.</para>
+
+                <para>For a general flow of the build procedures, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-building-a-simple-image'>Building a Simple Image</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Board Support Package (BSP) Development:</emphasis>
+                Development of BSPs involves using the Yocto Project to
+                create and test layers that allow easy development of
+                images and applications targeted for specific hardware.
+                To development BSPs, you need to take some additional steps
+                beyond what was described in setting up a development host.
+                </para>
+
+                <para>The
+                <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>
+                provides BSP-related development information.
+                For specifics on development host preparation, see the
+                "<ulink url='&YOCTO_DOCS_BSP_URL;#preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work With BSP Layers</ulink>"
+                section in the Yocto Project Board Support Package (BSP)
+                Developer's Guide.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Kernel Development:</emphasis>
+                If you are going to be developing kernels using the Yocto
+                Project you likely will be using <filename>devtool</filename>.
+                A workflow using <filename>devtool</filename> makes kernel
+                development quicker by reducing iteration cycle times.</para>
+
+                <para>The
+                <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>
+                provides kernel-related development information.
+                For specifics on development host preparation, see the
+                "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</ulink>"
+                section in the Yocto Project Linux Kernel Development Manual.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Using the <trademark class='trade'>Eclipse</trademark> IDE:</emphasis>
+                One of two Yocto Project development methods that involves an
+                interface that effectively puts the Yocto Project into the
+                background is the popular Eclipse IDE.
+                This method of development is advantageous if you are already
+                familiar with working within Eclipse.
+                Development is supported through a plugin that you install
+                onto your development host.</para>
+
+                <para>For steps that show you how to set up your development
+                host to use the Eclipse Yocto Project plugin, see the
+                "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></ulink>"
+                Chapter in the Yocto Project Application Development and the
+                Extensible Software Development Kit (eSDK) manual.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Using Toaster:</emphasis>
+                The other Yocto Project development method that involves an
+                interface that effectively puts the Yocto Project into the
+                background is Toaster.
+                Toaster provides an interface to the OpenEmbedded build system.
+                The interface enables you to configure and run your builds.
+                Information about builds is collected and stored in a database.
+                You can use Toaster to configure and start builds on multiple
+                remote build servers.</para>
+
+                <para>For steps that show you how to set up your development
+                host to use Toaster and on how to use Toaster in general,
+                see the
+                <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+</section>
+
+<section id='yocto-project-repositories'>
+    <title>Yocto Project Source Repositories</title>
+
+    <para>
+        The Yocto Project team maintains complete source repositories for all
+        Yocto Project files at
+        <ulink url='&YOCTO_GIT_URL;'></ulink>.
+        This web-based source code browser is organized into categories by
+        function such as IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and
+        so forth.
+        From the interface, you can click on any particular item in the "Name"
+        column and see the URL at the bottom of the page that you need to clone
+        a Git repository for that particular item.
+        Having a local Git repository of the
+        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
+        which is usually named "poky", allows
+        you to make changes, contribute to the history, and ultimately enhance
+        the Yocto Project's tools, Board Support Packages, and so forth.
+    </para>
+
+    <para>
+        For any supported release of Yocto Project, you can also go to the
+        <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and
+        select the "DOWNLOADS" item from the "SOFTWARE" menu and get a
+        released tarball of the <filename>poky</filename> repository, any
+        supported BSP tarball, or Yocto Project tools.
+        Unpacking these tarballs gives you a snapshot of the released
+        files.
+        <note><title>Notes</title>
+            <itemizedlist>
+                <listitem><para>
+                    The recommended method for setting up the Yocto Project
+                    <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+                    and the files for supported BSPs
+                    (e.g., <filename>meta-intel</filename>) is to use
+                    <link linkend='git'>Git</link> to create a local copy of
+                    the upstream repositories.
+                    </para></listitem>
+                <listitem><para>
+                    Be sure to always work in matching branches for both
+                    the selected BSP repository and the Source Directory
+                    (i.e. <filename>poky</filename>) repository.
+                    For example, if you have checked out the "master" branch
+                    of <filename>poky</filename> and you are going to use
+                    <filename>meta-intel</filename>, be sure to checkout the
+                    "master" branch of <filename>meta-intel</filename>.
+                    </para></listitem>
+            </itemizedlist>
+        </note>
+    </para>
+
+    <para>
+        In summary, here is where you can get the project files needed for
+        development:
+        <itemizedlist>
+            <listitem><para id='source-repositories'>
+                <emphasis>
+                <ulink url='&YOCTO_GIT_URL;'>Source Repositories:</ulink>
+                </emphasis>
+                This area contains IDE Plugins, Matchbox, Poky, Poky Support,
+                Tools, Yocto Linux Kernel, and Yocto Metadata Layers.
+                You can create local copies of Git repositories for each of
+                these areas.</para>
+
+                <para>
+                <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
+                For steps on how to view and access these upstream Git
+                repositories, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-source-repositories'>Accessing Source Repositories</ulink>"
+                Section in the Yocto Project Development Tasks Manual.
+                </para></listitem>
+            <listitem><para><anchor id='index-downloads' />
+                <emphasis>
+                <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink>
+                </emphasis>
+                This is an index of releases such as
+                the <trademark class='trade'>Eclipse</trademark>
+                Yocto Plug-in, miscellaneous support, Poky, Pseudo, installers
+                for cross-development toolchains, and all released versions of
+                Yocto Project in the form of images or tarballs.
+                Downloading and extracting these files does not produce a local
+                copy of the Git repository but rather a snapshot of a
+                particular release or image.</para>
+
+                <para>
+                <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="3.5in" />
+                For steps on how to view and access these files, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-index-of-releases'>Accessing Index of Releases</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                </para></listitem>
+            <listitem><para id='downloads-page'>
+                <emphasis>"DOWNLOADS" page for the
+                <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
+                </emphasis></para>
+
+                <para>The Yocto Project website includes a "DOWNLOADS" page
+                accessible through the "SOFTWARE" menu that allows you to
+                download any Yocto Project release, tool, and Board Support
+                Package (BSP) in tarball form.
+                The tarballs are similar to those found in the
+                <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink>
+                area.</para>
+
+                <para>
+                <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
+                For steps on how to use the "DOWNLOADS" page, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-downloads-page'>Using the Downloads Page</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+</section>
+
+<section id='gs-git-workflows-and-the-yocto-project'>
+    <title>Git Workflows and the Yocto Project</title>
+
+    <para>
+        Developing using the Yocto Project likely requires the use of
+        <link linkend='git'>Git</link>.
+        Git is a free, open source distributed version control system
+        used as part of many collaborative design environments.
+        This section provides workflow concepts using the Yocto Project and
+        Git.
+        In particular, the information covers basic practices that describe
+        roles and actions in a collaborative development environment.
+        <note>
+            If you are familiar with this type of development environment, you
+            might not want to read this section.
+        </note>
+    </para>
+
+    <para>
+        The Yocto Project files are maintained using Git in "branches"
+        whose Git histories track every change and whose structures
+        provide branches for all diverging functionality.
+        Although there is no need to use Git, many open source projects do so.
+    <para>
+
+    </para>
+        For the Yocto Project, a key individual called the "maintainer" is
+        responsible for the integrity of the "master" branch of a given Git
+        repository.
+        The "master" branch is the “upstream” repository from which final or
+        most recent builds of a project occur.
+        The maintainer is responsible for accepting changes from other
+        developers and for organizing the underlying branch structure to
+        reflect release strategies and so forth.
+        <note>
+            For information on finding out who is responsible for (maintains)
+            a particular area of code in the Yocto Project, see the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+            section of the Yocto Project Development Tasks Manual.
+        </note>
+    </para>
+
+    <para>
+        The Yocto Project <filename>poky</filename> Git repository also has an
+        upstream contribution Git repository named
+        <filename>poky-contrib</filename>.
+        You can see all the branches in this repository using the web interface
+        of the
+        <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> organized
+        within the "Poky Support" area.
+        These branches hold changes (commits) to the project that have been
+        submitted or committed by the Yocto Project development team and by
+        community members who contribute to the project.
+        The maintainer determines if the changes are qualified to be moved
+        from the "contrib" branches into the "master" branch of the Git
+        repository.
+    </para>
+
+    <para>
+        Developers (including contributing community members) create and
+        maintain cloned repositories of upstream branches.
+        The cloned repositories are local to their development platforms and
+        are used to develop changes.
+        When a developer is satisfied with a particular feature or change,
+        they "push" the change to the appropriate "contrib" repository.
+    </para>
+
+    <para>
+        Developers are responsible for keeping their local repository
+        up-to-date with whatever upstream branch they are working against.
+        They are also responsible for straightening out any conflicts that
+        might arise within files that are being worked on simultaneously by
+        more than one person.
+        All this work is done locally on the development host before
+        anything is pushed to a "contrib" area and examined at the maintainer’s
+        level.
+    </para>
+
+    <para>
+        A somewhat formal method exists by which developers commit changes
+        and push them into the "contrib" area and subsequently request that
+        the maintainer include them into an upstream branch.
+        This process is called “submitting a patch” or "submitting a change."
+        For information on submitting patches and changes, see the
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+        section in the Yocto Project Development Tasks Manual.
+    </para>
+
+    <para>
+        In summary, a single point of entry
+        exists for changes into a "master" or development branch of the
+        Git repository, which is controlled by the project’s maintainer.
+        And, a set of developers exist who independently develop, test, and
+        submit changes to "contrib" areas for the maintainer to examine.
+        The maintainer then chooses which changes are going to become a
+        permanent part of the project.
+    </para>
+
+    <para>
+        <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
+    </para>
+
+    <para>
+        While each development environment is unique, there are some best
+        practices or methods that help development run smoothly.
+        The following list describes some of these practices.
+        For more information about Git workflows, see the workflow topics in
+        the
+        <ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
+        <itemizedlist>
+            <listitem><para>
+                <emphasis>Make Small Changes:</emphasis>
+                It is best to keep the changes you commit small as compared to
+                bundling many disparate changes into a single commit.
+                This practice not only keeps things manageable but also allows
+                the maintainer to more easily include or refuse changes.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Make Complete Changes:</emphasis>
+                It is also good practice to leave the repository in a
+                state that allows you to still successfully build your project.
+                In other words, do not commit half of a feature,
+                then add the other half as a separate, later commit.
+                Each commit should take you from one buildable project state
+                to another buildable state.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Use Branches Liberally:</emphasis>
+                It is very easy to create, use, and delete local branches in
+                your working Git repository on the development host.
+                You can name these branches anything you like.
+                It is helpful to give them names associated with the particular
+                feature or change on which you are working.
+                Once you are done with a feature or change and have merged it
+                into your local master branch, simply discard the temporary
+                branch.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Merge Changes:</emphasis>
+                The <filename>git merge</filename> command allows you to take
+                the changes from one branch and fold them into another branch.
+                This process is especially helpful when more than a single
+                developer might be working on different parts of the same
+                feature.
+                Merging changes also automatically identifies any collisions
+                or "conflicts" that might happen as a result of the same lines
+                of code being altered by two different developers.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Manage Branches:</emphasis>
+                Because branches are easy to use, you should use a system
+                where branches indicate varying levels of code readiness.
+                For example, you can have a "work" branch to develop in, a
+                "test" branch where the code or change is tested, a "stage"
+                branch where changes are ready to be committed, and so forth.
+                As your project develops, you can merge code across the
+                branches to reflect ever-increasing stable states of the
+                development.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Use Push and Pull:</emphasis>
+                The push-pull workflow is based on the concept of developers
+                "pushing" local commits to a remote repository, which is
+                usually a contribution repository.
+                This workflow is also based on developers "pulling" known
+                states of the project down into their local development
+                repositories.
+                The workflow easily allows you to pull changes submitted by
+                other developers from the upstream repository into your
+                work area ensuring that you have the most recent software
+                on which to develop.
+                The Yocto Project has two scripts named
+                <filename>create-pull-request</filename> and
+                <filename>send-pull-request</filename> that ship with the
+                release to facilitate this workflow.
+                You can find these scripts in the <filename>scripts</filename>
+                folder of the
+                <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+                For information on how to use these scripts, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#pushing-a-change-upstream'>Using Scripts to Push a Change Upstream and Request a Pull</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Patch Workflow:</emphasis>
+                This workflow allows you to notify the maintainer through an
+                email that you have a change (or patch) you would like
+                considered for the "master" branch of the Git repository.
+                To send this type of change, you format the patch and then
+                send the email using the Git commands
+                <filename>git format-patch</filename> and
+                <filename>git send-email</filename>.
+                For information on how to use these scripts, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+</section>
+
+<section id='git'>
+    <title>Git</title>
+
+    <para>
+        The Yocto Project makes extensive use of Git, which is a
+        free, open source distributed version control system.
+        Git supports distributed development, non-linear development,
+        and can handle large projects.
+        It is best that you have some fundamental understanding
+        of how Git tracks projects and how to work with Git if
+        you are going to use the Yocto Project for development.
+        This section provides a quick overview of how Git works and
+        provides you with a summary of some essential Git commands.
+        <note><title>Notes</title>
+            <itemizedlist>
+                <listitem><para>
+                    For more information on Git, see
+                    <ulink url='http://git-scm.com/documentation'></ulink>.
+                    </para></listitem>
+                <listitem><para>
+                    If you need to download Git, it is recommended that you add
+                    Git to your system through your distribution's "software
+                    store" (e.g. for Ubuntu, use the Ubuntu Software feature).
+                    For the Git download page, see
+                    <ulink url='http://git-scm.com/download'></ulink>.
+                    </para></listitem>
+                <listitem><para>
+                    For information beyond the introductory nature in this
+                    section, see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    </para></listitem>
+            </itemizedlist>
+        </note>
+    </para>
+
+    <section id='repositories-tags-and-branches'>
+        <title>Repositories, Tags, and Branches</title>
+
+        <para>
+            As mentioned briefly in the previous section and also in the
+            "<link linkend='gs-git-workflows-and-the-yocto-project'>Git Workflows and the Yocto Project</link>"
+            section, the Yocto Project maintains source repositories at
+            <ulink url='&YOCTO_GIT_URL;'></ulink>.
+            If you look at this web-interface of the repositories, each item
+            is a separate Git repository.
+        </para>
+
+        <para>
+            Git repositories use branching techniques that track content
+            change (not files) within a project (e.g. a new feature or updated
+            documentation).
+            Creating a tree-like structure based on project divergence allows
+            for excellent historical information over the life of a project.
+            This methodology also allows for an environment from which you can
+            do lots of local experimentation on projects as you develop
+            changes or new features.
+        </para>
+
+        <para>
+            A Git repository represents all development efforts for a given
+            project.
+            For example, the Git repository <filename>poky</filename> contains
+            all changes and developments for that repository over the course
+            of its entire life.
+            That means that all changes that make up all releases are captured.
+            The repository maintains a complete history of changes.
+        </para>
+
+        <para>
+            You can create a local copy of any repository by "cloning" it
+            with the <filename>git clone</filename> command.
+            When you clone a Git repository, you end up with an identical
+            copy of the repository on your development system.
+            Once you have a local copy of a repository, you can take steps to
+            develop locally.
+            For examples on how to clone Git repositories, see the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
+            section in the Yocto Project Development Tasks Manual.
+        </para>
+
+        <para>
+            It is important to understand that Git tracks content change and
+            not files.
+            Git uses "branches" to organize different development efforts.
+            For example, the <filename>poky</filename> repository has
+            several branches that include the current "&DISTRO_NAME_NO_CAP;"
+            branch, the "master" branch, and many branches for past
+            Yocto Project releases.
+            You can see all the branches by going to
+            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
+            clicking on the
+            <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename>
+            link beneath the "Branch" heading.
+        </para>
+
+        <para>
+            Each of these branches represents a specific area of development.
+            The "master" branch represents the current or most recent
+            development.
+            All other branches represent offshoots of the "master" branch.
+        </para>
+
+        <para>
+            When you create a local copy of a Git repository, the copy has
+            the same set of branches as the original.
+            This means you can use Git to create a local working area
+            (also called a branch) that tracks a specific development branch
+            from the upstream source Git repository.
+            in other words, you can define your local Git environment to
+            work on any development branch in the repository.
+            To help illustrate, consider the following example Git commands:
+            <literallayout class='monospaced'>
+     $ cd ~
+     $ git clone git://git.yoctoproject.org/poky
+     $ cd poky
+     $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
+            </literallayout>
+            In the previous example after moving to the home directory, the
+            <filename>git clone</filename> command creates a
+            local copy of the upstream <filename>poky</filename> Git repository.
+            By default, Git checks out the "master" branch for your work.
+            After changing the working directory to the new local repository
+            (i.e. <filename>poky</filename>), the
+            <filename>git checkout</filename> command creates
+            and checks out a local branch named "&DISTRO_NAME_NO_CAP;", which
+            tracks the upstream "origin/&DISTRO_NAME_NO_CAP;" branch.
+            Changes you make while in this branch would ultimately affect
+            the upstream "&DISTRO_NAME_NO_CAP;" branch of the
+            <filename>poky</filename> repository.
+        </para>
+
+        <para>
+            It is important to understand that when you create and checkout a
+            local working branch based on a branch name,
+            your local environment matches the "tip" of that particular
+            development branch at the time you created your local branch,
+            which could be different from the files in the "master" branch
+            of the upstream repository.
+            In other words, creating and checking out a local branch based on
+            the "&DISTRO_NAME_NO_CAP;" branch name is not the same as
+            checking out the "master" branch in the repository.
+            Keep reading to see how you create a local snapshot of a Yocto
+            Project Release.
+        </para>
+
+        <para>
+            Git uses "tags" to mark specific changes in a repository branch
+            structure.
+            Typically, a tag is used to mark a special point such as the final
+            change (or commit) before a project is released.
+            You can see the tags used with the <filename>poky</filename> Git
+            repository by going to
+            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
+            clicking on the
+            <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename>
+            link beneath the "Tag" heading.
+        </para>
+
+        <para>
+            Some key tags for the <filename>poky</filename> repository are
+            <filename>jethro-14.0.3</filename>,
+            <filename>morty-16.0.1</filename>,
+            <filename>pyro-17.0.0</filename>, and
+            <filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
+            These tags represent Yocto Project releases.
+        </para>
+
+        <para>
+            When you create a local copy of the Git repository, you also
+            have access to all the tags in the upstream repository.
+            Similar to branches, you can create and checkout a local working
+            Git branch based on a tag name.
+            When you do this, you get a snapshot of the Git repository that
+            reflects the state of the files when the change was made associated
+            with that tag.
+            The most common use is to checkout a working branch that matches
+            a specific Yocto Project release.
+            Here is an example:
+            <literallayout class='monospaced'>
+     $ cd ~
+     $ git clone git://git.yoctoproject.org/poky
+     $ cd poky
+     $ git fetch --tags
+     $ git checkout tags/rocko-18.0.0 -b my_rocko-18.0.0
+            </literallayout>
+            In this example, the name of the top-level directory of your
+            local Yocto Project repository is <filename>poky</filename>.
+            After moving to the <filename>poky</filename> directory, the
+            <filename>git fetch</filename> command makes all the upstream
+            tags available locally in your repository.
+            Finally, the <filename>git checkout</filename> command
+            creates and checks out a branch named "my-rocko-18.0.0" that is
+            based on the upstream branch whose "HEAD" matches the
+            commit in the repository associated with the "rocko-18.0.0" tag.
+            The files in your repository now exactly match that particular
+            Yocto Project release as it is tagged in the upstream Git
+            repository.
+            It is important to understand that when you create and
+            checkout a local working branch based on a tag, your environment
+            matches a specific point in time and not the entire development
+            branch (i.e. from the "tip" of the branch backwards).
+        </para>
+    </section>
+
+    <section id='basic-commands'>
+        <title>Basic Commands</title>
+
+        <para>
+            Git has an extensive set of commands that lets you manage changes
+            and perform collaboration over the life of a project.
+            Conveniently though, you can manage with a small set of basic
+            operations and workflows once you understand the basic
+            philosophy behind Git.
+            You do not have to be an expert in Git to be functional.
+            A good place to look for instruction on a minimal set of Git
+            commands is
+            <ulink url='http://git-scm.com/documentation'>here</ulink>.
+        </para>
+
+        <para>
+            The following list of Git commands briefly describes some basic
+            Git operations as a way to get started.
+            As with any set of commands, this list (in most cases) simply shows
+            the base command and omits the many arguments it supports.
+            See the Git documentation for complete descriptions and strategies
+            on how to use these commands:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis><filename>git init</filename>:</emphasis>
+                    Initializes an empty Git repository.
+                    You cannot use Git commands unless you have a
+                    <filename>.git</filename> repository.
+                    </para></listitem>
+                <listitem><para id='git-commands-clone'>
+                    <emphasis><filename>git clone</filename>:</emphasis>
+                    Creates a local clone of a Git repository that is on
+                    equal footing with a fellow developer’s Git repository
+                    or an upstream repository.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git add</filename>:</emphasis>
+                    Locally stages updated file contents to the index that
+                    Git uses to track changes.
+                    You must stage all files that have changed before you
+                    can commit them.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git commit</filename>:</emphasis>
+                    Creates a local "commit" that documents the changes you
+                    made.
+                    Only changes that have been staged can be committed.
+                    Commits are used for historical purposes, for determining
+                    if a maintainer of a project will allow the change,
+                    and for ultimately pushing the change from your local
+                    Git repository into the project’s upstream repository.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git status</filename>:</emphasis>
+                    Reports any modified files that possibly need to be
+                    staged and gives you a status of where you stand regarding
+                    local commits as compared to the upstream repository.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis>
+                    Changes your local working branch and in this form
+                    assumes the local branch already exists.
+                    This command is analogous to "cd".
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable> <replaceable>upstream-branch</replaceable>:</emphasis>
+                    Creates and checks out a working branch on your local
+                    machine.
+                    The local branch tracks the upstream branch.
+                    You can use your local branch to isolate your work.
+                    It is a good idea to use local branches when adding
+                    specific features or changes.
+                    Using isolated branches facilitates easy removal of
+                    changes if they do not work out.
+                    </para></listitem>
+                <listitem><para><emphasis><filename>git branch</filename>:</emphasis>
+                    Displays the existing local branches associated with your
+                    local repository.
+                    The branch that you have currently checked out is noted
+                    with an asterisk character.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git branch -D</filename> <replaceable>branch-name</replaceable>:</emphasis>
+                    Deletes an existing local branch.
+                    You need to be in a local branch other than the one you
+                    are deleting in order to delete
+                    <replaceable>branch-name</replaceable>.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git pull --rebase</filename>:</emphasis>
+                    Retrieves information from an upstream Git repository
+                    and places it in your local Git repository.
+                    You use this command to make sure you are synchronized with
+                    the repository from which you are basing changes
+                    (.e.g. the "master" branch).
+                    The "--rebase" option ensures that any local commits you
+                    have in your branch are preserved at the top of your
+                    local branch.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git push</filename> <replaceable>repo-name</replaceable> <replaceable>local-branch</replaceable><filename>:</filename><replaceable>upstream-branch</replaceable>:</emphasis>
+                    Sends all your committed local changes to the upstream Git
+                    repository that your local repository is tracking
+                    (e.g. a contribution repository).
+                    The maintainer of the project draws from these repositories
+                    to merge changes (commits) into the appropriate branch
+                    of project's upstream repository.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git merge</filename>:</emphasis>
+                    Combines or adds changes from one
+                    local branch of your repository with another branch.
+                    When you create a local Git repository, the default branch
+                    is named "master".
+                    A typical workflow is to create a temporary branch that is
+                    based off "master" that you would use for isolated work.
+                    You would make your changes in that isolated branch,
+                    stage and commit them locally, switch to the "master"
+                    branch, and then use the <filename>git merge</filename>
+                    command to apply the changes from your isolated branch
+                    into the currently checked out branch (e.g. "master").
+                    After the merge is complete and if you are done with
+                    working in that isolated branch, you can safely delete
+                    the isolated branch.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git cherry-pick</filename> <replaceable>commits</replaceable>:</emphasis>
+                    Choose and apply specific commits from one branch
+                    into another branch.
+                    There are times when you might not be able to merge
+                    all the changes in one branch with
+                    another but need to pick out certain ones.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>gitk</filename>:</emphasis>
+                    Provides a GUI view of the branches and changes in your
+                    local Git repository.
+                    This command is a good way to graphically see where things
+                    have diverged in your local repository.
+                    <note>
+                        You need to install the <filename>gitk</filename>
+                        package on your development system to use this
+                        command.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git log</filename>:</emphasis>
+                    Reports a history of your commits to the repository.
+                    This report lists all commits regardless of whether you
+                    have pushed them upstream or not.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>git diff</filename>:</emphasis>
+                    Displays line-by-line differences between a local
+                    working file and the same file as understood by Git.
+                    This command is useful to see what you have changed
+                    in any given file.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</section>
+
+<section id='licensing'>
+    <title>Licensing</title>
+
+    <para>
+        Because open source projects are open to the public, they have
+        different licensing structures in place.
+        License evolution for both Open Source and Free Software has an
+        interesting history.
+        If you are interested in this history, you can find basic information
+        here:
+        <itemizedlist>
+            <listitem><para>
+                <ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
+                </para></listitem>
+            <listitem><para>
+                <ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license history</ulink>
+                </para></listitem>
+        </itemizedlist>
+    </para>
+
+    <para>
+        In general, the Yocto Project is broadly licensed under the
+        Massachusetts Institute of Technology (MIT) License.
+        MIT licensing permits the reuse of software within proprietary
+        software as long as the license is distributed with that software.
+        MIT is also compatible with the GNU General Public License (GPL).
+        Patches to the Yocto Project follow the upstream licensing scheme.
+        You can find information on the MIT license
+        <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
+        You can find information on the GNU GPL
+        <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>here</ulink>.
+    </para>
+
+    <para>
+        When you build an image using the Yocto Project, the build process
+        uses a known list of licenses to ensure compliance.
+        You can find this list in the
+        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+        at <filename>meta/files/common-licenses</filename>.
+        Once the build completes, the list of all licenses found and used
+        during that build are kept in the
+        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+        at <filename>tmp/deploy/licenses</filename>.
+    </para>
+
+    <para>
+        If a module requires a license that is not in the base list, the
+        build process generates a warning during the build.
+        These tools make it easier for a developer to be certain of the
+        licenses with which their shipped products must comply.
+        However, even with these tools it is still up to the developer to
+        resolve potential licensing issues.
+    </para>
+
+    <para>
+        The base list of licenses used by the build process is a combination
+        of the Software Package Data Exchange (SPDX) list and the Open
+        Source Initiative (OSI) projects.
+        <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of
+        the Linux Foundation that maintains a specification for a standard
+        format for communicating the components, licenses, and copyrights
+        associated with a software package.
+        <ulink url='http://opensource.org'>OSI</ulink> is a corporation
+        dedicated to the Open Source Definition and the effort for reviewing
+        and approving licenses that conform to the Open Source Definition
+        (OSD).
+    </para>
+
+    <para>
+        You can find a list of the combined SPDX and OSI licenses that the
+        Yocto Project uses in the
+        <filename>meta/files/common-licenses</filename> directory in your
+        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+    </para>
+
+    <para>
+        For information that can help you maintain compliance with various
+        open source licensing during the lifecycle of a product created using
+        the Yocto Project, see the
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
+        section in the Yocto Project Development Tasks Manual.
+    </para>
+</section>
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual-eclipse-customization.xsl b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-eclipse-customization.xsl
new file mode 100644
index 0000000..aaf99ea
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-eclipse-customization.xsl
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:fo="http://www.w3.org/1999/XSL/Format"
+	version="1.0">
+
+  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
+
+<!--
+
+  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
+
+  <xsl:import
+	  href="http://docbook.sourceforge.net/release/xsl/1.76.1/eclipse/eclipse3.xsl" />
+
+-->
+
+  <xsl:param name="chunker.output.indent" select="'yes'"/>
+  <xsl:param name="chunk.quietly" select="1"/>
+  <xsl:param name="chunk.first.sections" select="1"/>
+  <xsl:param name="chunk.section.depth" select="10"/>
+  <xsl:param name="use.id.as.filename" select="1"/>
+  <xsl:param name="ulink.target" select="'_self'" />
+  <xsl:param name="base.dir" select="'html/overview-manual/'"/>
+  <xsl:param name="html.stylesheet" select="'../book.css'"/>
+  <xsl:param name="eclipse.manifest" select="0"/>
+  <xsl:param name="create.plugin.xml" select="0"/>
+  <xsl:param name="suppress.navigation" select="1"/>
+  <xsl:param name="generate.index" select="0"/>
+  <xsl:param name="chapter.autolabel" select="1" />
+  <xsl:param name="appendix.autolabel" select="1" />
+  <xsl:param name="section.autolabel" select="1" />
+  <xsl:param name="section.label.includes.component.label" select="1" />
+</xsl:stylesheet>
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual-intro.xml b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-intro.xml
new file mode 100644
index 0000000..39433aa
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-intro.xml
@@ -0,0 +1,112 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='overview-manual-intro'>
+
+<title>The Yocto Project Overview and Concepts Manual</title>
+    <section id='overview-manual-welcome'>
+        <title>Welcome</title>
+
+        <para>
+            Welcome to the Yocto Project Overview and Concepts Manual!
+            This manual introduces the Yocto Project by providing concepts,
+            software overviews, best-known-methods (BKMs), and any other
+            high-level introductory information suitable for a new Yocto
+            Project user.
+        </para>
+
+        <para>
+            The following list describes what you can get from this manual:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis><link linkend='overview-yp'>Introducing the Yocto Project</link>:</emphasis>
+                    This chapter provides an introduction to the Yocto
+                    Project.
+                    You will learn about features and challenges of the
+                    Yocto Project, the layer model, components and tools,
+                    development methods, the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
+                    reference distribution, the OpenEmbedded build system
+                    workflow, and some basic Yocto terms.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><link linkend='overview-development-environment'>The Yocto Project Development Environment</link>:</emphasis>
+                    This chapter helps you get started understanding the
+                    Yocto Project development environment.
+                    You will learn about open source, development hosts,
+                    Yocto Project source repositories, workflows using Git
+                    and the Yocto Project, a Git primer, and information
+                    about licensing.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><link linkend='overview-manual-concepts'>Yocto Project Concepts</link>:</emphasis>
+                    This chapter presents various concepts regarding the
+                    Yocto Project.
+                    You can find conceptual information about components,
+                    development, cross-toolchains, and so forth.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            This manual does not give you the following:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>Step-by-step Instructions for Development Tasks:</emphasis>
+                    Instructional procedures reside in other manuals within
+                    the Yocto Project documentation set.
+                    For example, the
+                    <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>
+                    provides examples on how to perform various development
+                    tasks.
+                    As another example, the
+                    <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+                    manual contains detailed instructions on how to install an
+                    SDK, which is used to develop applications for target
+                    hardware.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Reference Material:</emphasis>
+                    This type of material resides in an appropriate reference
+                    manual.
+                    For example, system variables are documented in the
+                    <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.
+                    As another example, the
+                    <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>
+                    contains reference information on BSPs.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Detailed Public Information Not Specific to the
+                    Yocto Project:</emphasis>
+                    For example, exhaustive information on how to use the
+                    Source Control Manager Git is better covered with Internet
+                    searches and official Git Documentation than through the
+                    Yocto Project documentation.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='overview-manual-other-information'>
+        <title>Other Information</title>
+
+        <para>
+            Because this manual presents information for many different
+            topics, supplemental information is recommended for full
+            comprehension.
+            For additional introductory information on the Yocto Project, see
+            the <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
+            If you want to build an image with no knowledge of Yocto Project
+            as a way of quickly testing it out, see the
+            <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
+            document.
+            For a comprehensive list of links and other documentation, see the
+            "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
+            section in the Yocto Project Reference Manual.
+        </para>
+    </section>
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual-style.css b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-style.css
new file mode 100644
index 0000000..97a364b
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-style.css
@@ -0,0 +1,988 @@
+/*
+   Generic XHTML / DocBook XHTML CSS Stylesheet.
+
+   Browser wrangling and typographic design by
+      Oyvind Kolas / pippin@gimp.org
+
+   Customised for Poky by
+      Matthew Allum / mallum@o-hand.com
+
+   Thanks to:
+     Liam R. E. Quin
+     William Skaggs
+     Jakub Steiner
+
+   Structure
+   ---------
+
+   The stylesheet is divided into the following sections:
+
+       Positioning
+          Margins, paddings, width, font-size, clearing.
+       Decorations
+          Borders, style
+       Colors
+          Colors
+       Graphics
+          Graphical backgrounds
+       Nasty IE tweaks
+          Workarounds needed to make it work in internet explorer,
+          currently makes the stylesheet non validating, but up until
+          this point it is validating.
+       Mozilla extensions
+          Transparency for footer
+	  Rounded corners on boxes
+
+*/
+
+
+  /*************** /
+ /  Positioning   /
+/ ***************/
+
+body {
+  font-family: Verdana, Sans, sans-serif;
+
+  min-width: 640px;
+  width: 80%;
+  margin:  0em auto;
+  padding: 2em 5em 5em 5em;
+  color: #333;
+}
+
+h1,h2,h3,h4,h5,h6,h7 {
+  font-family: Arial, Sans;
+  color: #00557D;
+  clear: both;
+}
+
+h1 {
+  font-size: 2em;
+  text-align: left;
+  padding: 0em 0em 0em 0em;
+  margin: 2em 0em 0em 0em;
+}
+
+h2.subtitle {
+  margin: 0.10em 0em 3.0em 0em;
+  padding: 0em 0em 0em 0em;
+  font-size: 1.8em;
+  padding-left: 20%;
+  font-weight: normal;
+  font-style: italic;
+}
+
+h2 {
+  margin: 2em 0em 0.66em 0em;
+  padding: 0.5em 0em 0em 0em;
+  font-size: 1.5em;
+  font-weight: bold;
+}
+
+h3.subtitle {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+  font-size: 142.14%;
+  text-align: right;
+}
+
+h3 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 140%;
+  font-weight: bold;
+}
+
+h4 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 120%;
+  font-weight: bold;
+}
+
+h5 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 110%;
+  font-weight: bold;
+}
+
+h6 {
+  margin: 1em 0em 0em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 110%;
+  font-weight: bold;
+}
+
+.authorgroup {
+  background-color: transparent;
+  background-repeat: no-repeat;
+  padding-top: 256px;
+  background-image: url("figures/overview-manual-title.png");
+  background-position: left top;
+  margin-top: -256px;
+  padding-right: 50px;
+  margin-left: 0px;
+  text-align: right;
+  width: 740px;
+}
+
+h3.author {
+  margin: 0em 0me 0em 0em;
+  padding: 0em 0em 0em 0em;
+  font-weight: normal;
+  font-size: 100%;
+  color: #333;
+  clear: both;
+}
+
+.author tt.email {
+  font-size: 66%;
+}
+
+.titlepage hr {
+  width: 0em;
+  clear: both;
+}
+
+.revhistory {
+  padding-top: 2em;
+  clear: both;
+}
+
+.toc,
+.list-of-tables,
+.list-of-examples,
+.list-of-figures {
+  padding: 1.33em 0em 2.5em 0em;
+  color: #00557D;
+}
+
+.toc p,
+.list-of-tables p,
+.list-of-figures p,
+.list-of-examples p {
+  padding: 0em 0em 0em 0em;
+  padding: 0em 0em 0.3em;
+  margin: 1.5em 0em 0em 0em;
+}
+
+.toc p b,
+.list-of-tables p b,
+.list-of-figures p b,
+.list-of-examples p b{
+  font-size: 100.0%;
+  font-weight: bold;
+}
+
+.toc dl,
+.list-of-tables dl,
+.list-of-figures dl,
+.list-of-examples dl {
+  margin: 0em 0em 0.5em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.toc dt {
+  margin: 0em 0em 0em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.toc dd {
+  margin: 0em 0em 0em 2.6em;
+  padding: 0em 0em 0em 0em;
+}
+
+div.glossary dl,
+div.variablelist dl {
+}
+
+.glossary dl dt,
+.variablelist dl dt,
+.variablelist dl dt span.term {
+  font-weight: normal;
+  width: 20em;
+  text-align: right;
+}
+
+.variablelist dl dt {
+  margin-top: 0.5em;
+}
+
+.glossary dl dd,
+.variablelist dl dd {
+  margin-top: -1em;
+  margin-left: 25.5em;
+}
+
+.glossary dd p,
+.variablelist dd p {
+  margin-top: 0em;
+  margin-bottom: 1em;
+}
+
+
+div.calloutlist table td {
+  padding: 0em 0em 0em 0em;
+  margin: 0em 0em 0em 0em;
+}
+
+div.calloutlist table td p {
+  margin-top: 0em;
+  margin-bottom: 1em;
+}
+
+div p.copyright {
+  text-align: left;
+}
+
+div.legalnotice p.legalnotice-title {
+  margin-bottom: 0em;
+}
+
+p {
+  line-height: 1.5em;
+  margin-top: 0em;
+
+}
+
+dl {
+  padding-top: 0em;
+}
+
+hr {
+  border: solid 1px;
+}
+
+
+.mediaobject,
+.mediaobjectco {
+  text-align: center;
+}
+
+img {
+  border: none;
+}
+
+ul {
+  padding: 0em 0em 0em 1.5em;
+}
+
+ul li {
+  padding: 0em 0em 0em 0em;
+}
+
+ul li p {
+  text-align: left;
+}
+
+table {
+  width :100%;
+}
+
+th {
+  padding: 0.25em;
+  text-align: left;
+  font-weight: normal;
+  vertical-align: top;
+}
+
+td {
+  padding: 0.25em;
+  vertical-align: top;
+}
+
+p a[id] {
+  margin: 0px;
+  padding: 0px;
+  display: inline;
+  background-image: none;
+}
+
+a {
+  text-decoration: underline;
+  color: #444;
+}
+
+pre {
+    overflow: auto;
+}
+
+a:hover {
+  text-decoration: underline;
+  /*font-weight: bold;*/
+}
+
+/* This style defines how the permalink character
+   appears by itself and when hovered over with
+   the mouse. */
+
+[alt='Permalink'] { color: #eee; }
+[alt='Permalink']:hover { color: black; }
+
+
+div.informalfigure,
+div.informalexample,
+div.informaltable,
+div.figure,
+div.table,
+div.example {
+  margin: 1em 0em;
+  padding: 1em;
+  page-break-inside: avoid;
+}
+
+
+div.informalfigure p.title b,
+div.informalexample p.title b,
+div.informaltable p.title b,
+div.figure p.title b,
+div.example p.title b,
+div.table p.title b{
+    padding-top: 0em;
+    margin-top: 0em;
+    font-size: 100%;
+    font-weight: normal;
+}
+
+.mediaobject .caption,
+.mediaobject .caption p  {
+  text-align: center;
+  font-size: 80%;
+  padding-top: 0.5em;
+  padding-bottom: 0.5em;
+}
+
+.epigraph {
+  padding-left: 55%;
+  margin-bottom: 1em;
+}
+
+.epigraph p {
+  text-align: left;
+}
+
+.epigraph .quote {
+  font-style: italic;
+}
+.epigraph .attribution {
+  font-style: normal;
+  text-align: right;
+}
+
+span.application {
+  font-style: italic;
+}
+
+.programlisting {
+  font-family: monospace;
+  font-size: 80%;
+  white-space: pre;
+  margin: 1.33em 0em;
+  padding: 1.33em;
+}
+
+.tip,
+.warning,
+.caution,
+.note {
+  margin-top: 1em;
+  margin-bottom: 1em;
+
+}
+
+/* force full width of table within div */
+.tip table,
+.warning table,
+.caution table,
+.note table {
+  border: none;
+  width: 100%;
+}
+
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  padding: 0.8em 0.0em 0.0em 0.0em;
+  margin : 0em 0em 0em 0em;
+}
+
+.tip p,
+.warning p,
+.caution p,
+.note p {
+  margin-top: 0.5em;
+  margin-bottom: 0.5em;
+  padding-right: 1em;
+  text-align: left;
+}
+
+.acronym {
+  text-transform: uppercase;
+}
+
+b.keycap,
+.keycap {
+  padding: 0.09em 0.3em;
+  margin: 0em;
+}
+
+.itemizedlist li {
+  clear: none;
+}
+
+.filename {
+  font-size: medium;
+  font-family: Courier, monospace;
+}
+
+
+div.navheader, div.heading{
+  position: absolute;
+  left: 0em;
+  top: 0em;
+  width: 100%;
+  background-color: #cdf;
+  width: 100%;
+}
+
+div.navfooter, div.footing{
+  position: fixed;
+  left: 0em;
+  bottom: 0em;
+  background-color: #eee;
+  width: 100%;
+}
+
+
+div.navheader td,
+div.navfooter td {
+  font-size: 66%;
+}
+
+div.navheader table th {
+  /*font-family: Georgia, Times, serif;*/
+  /*font-size: x-large;*/
+  font-size: 80%;
+}
+
+div.navheader table {
+  border-left: 0em;
+  border-right: 0em;
+  border-top: 0em;
+  width: 100%;
+}
+
+div.navfooter table {
+  border-left: 0em;
+  border-right: 0em;
+  border-bottom: 0em;
+  width: 100%;
+}
+
+div.navheader table td a,
+div.navfooter table td a {
+  color: #777;
+  text-decoration: none;
+}
+
+/* normal text in the footer */
+div.navfooter table td {
+  color: black;
+}
+
+div.navheader table td a:visited,
+div.navfooter table td a:visited {
+  color: #444;
+}
+
+
+/* links in header and footer */
+div.navheader table td a:hover,
+div.navfooter table td a:hover {
+  text-decoration: underline;
+  background-color: transparent;
+  color: #33a;
+}
+
+div.navheader hr,
+div.navfooter hr {
+  display: none;
+}
+
+
+.qandaset tr.question td p {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.qandaset tr.answer td p {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+}
+.answer td {
+  padding-bottom: 1.5em;
+}
+
+.emphasis {
+  font-weight: bold;
+}
+
+
+  /************* /
+ / decorations  /
+/ *************/
+
+.titlepage {
+}
+
+.part .title {
+}
+
+.subtitle {
+    border: none;
+}
+
+/*
+h1 {
+  border: none;
+}
+
+h2 {
+  border-top: solid 0.2em;
+  border-bottom: solid 0.06em;
+}
+
+h3 {
+  border-top: 0em;
+  border-bottom: solid 0.06em;
+}
+
+h4 {
+  border: 0em;
+  border-bottom: solid 0.06em;
+}
+
+h5 {
+  border: 0em;
+}
+*/
+
+.programlisting {
+  border: solid 1px;
+}
+
+div.figure,
+div.table,
+div.informalfigure,
+div.informaltable,
+div.informalexample,
+div.example {
+  border: 1px solid;
+}
+
+
+
+.tip,
+.warning,
+.caution,
+.note {
+  border: 1px solid;
+}
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  border-bottom: 1px solid;
+}
+
+.question td {
+  border-top: 1px solid black;
+}
+
+.answer {
+}
+
+
+b.keycap,
+.keycap {
+  border: 1px solid;
+}
+
+
+div.navheader, div.heading{
+  border-bottom: 1px solid;
+}
+
+
+div.navfooter, div.footing{
+  border-top: 1px solid;
+}
+
+  /********* /
+ /  colors  /
+/ *********/
+
+body {
+  color: #333;
+  background: white;
+}
+
+a {
+  background: transparent;
+}
+
+a:hover {
+  background-color: #dedede;
+}
+
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+h7,
+h8 {
+  background-color: transparent;
+}
+
+hr {
+  border-color: #aaa;
+}
+
+
+.tip, .warning, .caution, .note {
+  border-color: #fff;
+}
+
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  border-bottom-color: #fff;
+}
+
+
+.warning {
+  background-color: #f0f0f2;
+}
+
+.caution {
+  background-color: #f0f0f2;
+}
+
+.tip {
+  background-color: #f0f0f2;
+}
+
+.note {
+  background-color: #f0f0f2;
+}
+
+.glossary dl dt,
+.variablelist dl dt,
+.variablelist dl dt span.term {
+  color: #044;
+}
+
+div.figure,
+div.table,
+div.example,
+div.informalfigure,
+div.informaltable,
+div.informalexample {
+  border-color: #aaa;
+}
+
+pre.programlisting {
+  color: black;
+  background-color: #fff;
+  border-color: #aaa;
+  border-width: 2px;
+}
+
+.guimenu,
+.guilabel,
+.guimenuitem {
+  background-color: #eee;
+}
+
+
+b.keycap,
+.keycap {
+  background-color: #eee;
+  border-color: #999;
+}
+
+
+div.navheader {
+  border-color: black;
+}
+
+
+div.navfooter {
+  border-color: black;
+}
+
+.writernotes {
+  color: red;
+}
+
+
+  /*********** /
+ /  graphics  /
+/ ***********/
+
+/*
+body {
+  background-image: url("images/body_bg.jpg");
+  background-attachment: fixed;
+}
+
+.navheader,
+.note,
+.tip {
+  background-image: url("images/note_bg.jpg");
+  background-attachment: fixed;
+}
+
+.warning,
+.caution {
+  background-image: url("images/warning_bg.jpg");
+  background-attachment: fixed;
+}
+
+.figure,
+.informalfigure,
+.example,
+.informalexample,
+.table,
+.informaltable {
+  background-image: url("images/figure_bg.jpg");
+  background-attachment: fixed;
+}
+
+*/
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+h7{
+}
+
+/*
+Example of how to stick an image as part of the title.
+
+div.article .titlepage .title
+{
+  background-image: url("figures/white-on-black.png");
+  background-position: center;
+  background-repeat: repeat-x;
+}
+*/
+
+div.preface .titlepage .title,
+div.colophon .title,
+div.chapter .titlepage .title,
+div.article .titlepage .title
+{
+}
+
+div.section div.section .titlepage .title,
+div.sect2 .titlepage .title {
+    background: none;
+}
+
+
+h1.title {
+  background-color: transparent;
+  background-repeat: no-repeat;
+  height: 256px;
+  text-indent: -9000px;
+  overflow:hidden;
+}
+
+h2.subtitle {
+  background-color: transparent;
+  text-indent: -9000px;
+  overflow:hidden;
+  width: 0px;
+  display: none;
+}
+
+  /*************************************** /
+ /  pippin.gimp.org specific alterations  /
+/ ***************************************/
+
+/*
+div.heading, div.navheader {
+  color: #777;
+  font-size: 80%;
+  padding: 0;
+  margin: 0;
+  text-align: left;
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 50px;
+  background: url('/gfx/heading_bg.png') transparent;
+  background-repeat: repeat-x;
+  background-attachment: fixed;
+  border: none;
+}
+
+div.heading a {
+  color: #444;
+}
+
+div.footing, div.navfooter {
+  border: none;
+  color: #ddd;
+  font-size: 80%;
+  text-align:right;
+
+  width: 100%;
+  padding-top: 10px;
+  position: absolute;
+  bottom: 0px;
+  left: 0px;
+
+  background: url('/gfx/footing_bg.png') transparent;
+}
+*/
+
+
+
+  /****************** /
+ /  nasty ie tweaks  /
+/ ******************/
+
+/*
+div.heading, div.navheader {
+  width:expression(document.body.clientWidth + "px");
+}
+
+div.footing, div.navfooter {
+  width:expression(document.body.clientWidth + "px");
+  margin-left:expression("-5em");
+}
+body {
+  padding:expression("4em 5em 0em 5em");
+}
+*/
+
+  /**************************************** /
+ / mozilla vendor specific css extensions  /
+/ ****************************************/
+/*
+div.navfooter, div.footing{
+  -moz-opacity: 0.8em;
+}
+
+div.figure,
+div.table,
+div.informalfigure,
+div.informaltable,
+div.informalexample,
+div.example,
+.tip,
+.warning,
+.caution,
+.note {
+  -moz-border-radius: 0.5em;
+}
+
+b.keycap,
+.keycap {
+  -moz-border-radius: 0.3em;
+}
+*/
+
+table tr td table tr td {
+  display: none;
+}
+
+
+hr {
+  display: none;
+}
+
+table {
+  border: 0em;
+}
+
+ .photo {
+  float: right;
+  margin-left:   1.5em;
+  margin-bottom: 1.5em;
+  margin-top: 0em;
+  max-width:      17em;
+  border:     1px solid gray;
+  padding:    3px;
+  background: white;
+}
+ .seperator {
+   padding-top: 2em;
+   clear: both;
+  }
+
+  #validators {
+      margin-top: 5em;
+      text-align: right;
+      color: #777;
+  }
+  @media print {
+      body {
+          font-size: 8pt;
+      }
+      .noprint {
+          display: none;
+      }
+  }
+
+
+.tip,
+.note {
+   background: #f0f0f2;
+   color: #333;
+   padding: 20px;
+   margin: 20px;
+}
+
+.tip h3,
+.note h3 {
+   padding: 0em;
+   margin: 0em;
+   font-size: 2em;
+   font-weight: bold;
+   color: #333;
+}
+
+.tip a,
+.note a {
+   color: #333;
+   text-decoration: underline;
+}
+
+.footnote {
+   font-size: small;
+   color: #333;
+}
+
+/* Changes the announcement text */
+.tip h3,
+.warning h3,
+.caution h3,
+.note h3 {
+   font-size:large;
+   color: #00557D;
+}
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual-yp-intro.xml b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-yp-intro.xml
new file mode 100644
index 0000000..ccf5e27
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual-yp-intro.xml
@@ -0,0 +1,1357 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='overview-yp'>
+    <title>Introducing the Yocto Project</title>
+
+    <section id='what-is-the-yocto-project'>
+        <title>What is the Yocto Project?</title>
+
+        <para>
+            The Yocto Project is an open source collaboration project
+            that helps developers create custom Linux-based systems that are
+            designed for embedded products regardless of the product's hardware
+            architecture.
+            Yocto Project provides a flexible toolset and a development
+            environment that allows embedded device developers across the
+            world to collaborate through shared technologies, software stacks,
+            configurations, and best practices used to create these tailored
+            Linux images.
+        </para>
+
+        <para>
+            Thousands of developers worldwide have discovered that Yocto
+            Project provides advantages in both systems and applications
+            development, archival and management benefits, and customizations
+            used for speed, footprint, and memory utilization.
+            The project is a standard when it comes to delivering embedded
+            software stacks.
+            The project allows software customizations and build interchange
+            for multiple hardware platforms as well as software stacks that
+            can be maintained and scaled.
+        </para>
+
+        <para id='yp-key-dev-elements'>
+                <imagedata fileref="figures/key-dev-elements.png" format="PNG" align='center' width="8in"/>
+        </para>
+
+        <para>
+            For further introductory information on the Yocto Project, you
+            might be interested in this
+            <ulink url='https://www.embedded.com/electronics-blogs/say-what-/4458600/Why-the-Yocto-Project-for-my-IoT-Project-'>article</ulink>
+            by Drew Moseley and in this short introductory
+            <ulink url='https://www.youtube.com/watch?v=utZpKM7i5Z4'>video</ulink>.
+        </para>
+
+        <para>
+            The remainder of this section overviews advantages and challenges
+            tied to the Yocto Project.
+        </para>
+
+        <section id='gs-features'>
+            <title>Features</title>
+
+            <para>
+                The following list describes features and advantages of the
+                Yocto Project:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Widely Adopted Across the Industry:</emphasis>
+                        Semiconductor, operating system, software, and
+                        service vendors exist whose products and services
+                        adopt and support the Yocto Project.
+                        For a look at the Yocto Project community and
+                        the companies involved with the Yocto
+                        Project, see the "COMMUNITY" and "ECOSYSTEM" tabs
+                        on the
+                        <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink>
+                        home page.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Architecture Agnostic:</emphasis>
+                        Yocto Project supports Intel, ARM, MIPS, AMD, PPC
+                        and other architectures.
+                        Most ODMs, OSVs, and chip vendors create and supply
+                        BSPs that support their hardware.
+                        If you have custom silicon, you can create a BSP
+                        that supports that architecture.</para>
+
+                        <para>Aside from lots of architecture support, the
+                        Yocto Project fully supports a wide range of device
+                        emulation through the Quick EMUlator (QEMU).
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Images and Code Transfer Easily:</emphasis>
+                        Yocto Project output can easily move between
+                        architectures without moving to new development
+                        environments.
+                        Additionally, if you have used the Yocto Project to
+                        create an image or application and you find yourself
+                        not able to support it, commercial Linux vendors such
+                        as Wind River, Mentor Graphics, Timesys, and ENEA could
+                        take it and provide ongoing support.
+                        These vendors have offerings that are built using
+                        the Yocto Project.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Flexibility:</emphasis>
+                        Corporations use the Yocto Project many different ways.
+                        One example is to create an internal Linux distribution
+                        as a code base the corporation can use across multiple
+                        product groups.
+                        Through customization and layering, a project group
+                        can leverage the base Linux distribution to create
+                        a distribution that works for their product needs.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Ideal for Constrained Embedded and IoT devices:</emphasis>
+                        Unlike a full Linux distribution, you can use the
+                        Yocto Project to create exactly what you need for
+                        embedded devices.
+                        You only add the feature support or packages that you
+                        absolutely need for the device.
+                        For devices that have display hardware, you can use
+                        available system components such as X11, GTK+, Qt,
+                        Clutter, and SDL (among others) to create a rich user
+                        experience.
+                        For devices that do not have a display or where you
+                        want to use alternative UI frameworks, you can choose
+                        to not install these components.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Comprehensive Toolchain Capabilities:</emphasis>
+                        Toolchains for supported architectures satisfy most
+                        use cases.
+                        However, if your hardware supports features that are
+                        not part of a standard toolchain, you can easily
+                        customize that toolchain through specification of
+                        platform-specific tuning parameters.
+                        And, should you need to use a third-party toolchain,
+                        mechanisms built into the Yocto Project allow for that.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Mechanism Rules Over Policy:</emphasis>
+                        Focusing on mechanism rather than policy ensures that
+                        you are free to set policies based on the needs of your
+                        design instead of adopting decisions enforced by some
+                        system software provider.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Uses a Layer Model:</emphasis>
+                        The Yocto Project
+                        <link linkend='the-yocto-project-layer-model'>layer infrastructure</link>
+                        groups related functionality into separate bundles.
+                        You can incrementally add these grouped functionalities
+                        to your project as needed.
+                        Using layers to isolate and group functionality
+                        reduces project complexity and redundancy, allows you
+                        to easily extend the system, make customizations,
+                        and keep functionality organized.
+                        </para></listitem>
+                     <listitem><para>
+                        <emphasis>Supports Partial Builds:</emphasis>
+                        You can build and rebuild individual packages as
+                        needed.
+                        Yocto Project accomplishes this through its
+                        <link linkend='shared-state-cache'>shared-state cache</link>
+                        (sstate) scheme.
+                        Being able to build and debug components individually
+                        eases project development.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Releases According to a Strict Schedule:</emphasis>
+                        Major releases occur on a
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-release-process'>six-month cycle</ulink>
+                        predictably in October and April.
+                        The most recent two releases support point releases
+                        to address common vulnerabilities and exposures.
+                        This predictability is crucial for projects based on
+                        the Yocto Project and allows development teams to
+                        plan activities.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Rich Ecosystem of Individuals and Organizations:</emphasis>
+                        For open source projects, the value of community is
+                        very important.
+                        Support forums, expertise, and active developers who
+                        continue to push the Yocto Project forward are readily
+                        available.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Binary Reproducibility:</emphasis>
+                        The Yocto Project allows you to be very specific about
+                        dependencies and achieves very high percentages of
+                        binary reproducibility (e.g. 99.8% for
+                        <filename>core-image-minimal</filename>).
+                        When distributions are not specific about which
+                        packages are pulled in and in what order to support
+                        dependencies, other build systems can arbitrarily
+                        include packages.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>License Manifest:</emphasis>
+                        The Yocto Project provides a
+                        <ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>license manifest</ulink>
+                        for review by people who need to track the use of open
+                        source licenses (e.g.legal teams).
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='gs-challenges'>
+            <title>Challenges</title>
+
+            <para>
+                The following list presents challenges you might encounter
+                when developing using the Yocto Project:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Steep Learning Curve:</emphasis>
+                        The Yocto Project has a steep learning curve and has
+                        many different ways to accomplish similar tasks.
+                        It can be difficult to choose how to proceed when
+                        varying methods exist by which to accomplish a given
+                        task.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Understanding What Changes You Need to Make
+                        For Your Design Requires Some Research:</emphasis>
+                        Beyond the simple tutorial stage, understanding what
+                        changes need to be made for your particular design
+                        can require a significant amount of research and
+                        investigation.
+                        For information that helps you transition from
+                        trying out the Yocto Project to using it for your
+                        project, see the
+                        "<ulink url='&YOCTO_HOME_URL;/docs/what-i-wish-id-known/'>What I wish I'd Known</ulink>"
+                        and
+                        "<ulink url='&YOCTO_HOME_URL;/docs/transitioning-to-a-custom-environment/'>Transitioning to a Custom Environment for Systems Development</ulink>"
+                        documents on the Yocto Project website.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Project Workflow Could Be Confusing:</emphasis>
+                        The
+                        <link linkend='overview-development-environment'>Yocto Project workflow</link>
+                        could be confusing if you are used to traditional
+                        desktop and server software development.
+                        In a desktop development environment, mechanisms exist
+                        to easily pull and install new packages, which are
+                        typically pre-compiled binaries from servers accessible
+                        over the Internet.
+                        Using the Yocto Project, you must modify your
+                        configuration and rebuild to add additional packages.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Working in a Cross-Build Environment Can
+                        Feel Unfamiliar:</emphasis>
+                        When developing code to run on a target, compilation,
+                        execution, and testing done on the actual target
+                        can be faster than running a BitBake build on a
+                        development host and then deploying binaries to the
+                        target for test.
+                        While the Yocto Project does support development tools
+                        on the target, the additional step of integrating your
+                        changes back into the Yocto Project build environment
+                        would be required.
+                        Yocto Project supports an intermediate approach that
+                        involves making changes on the development system
+                        within the BitBake environment and then deploying only
+                        the updated packages to the target.</para>
+
+                        <para>The Yocto Project
+                        <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+                        produces packages in standard formats (i.e. RPM,
+                        DEB, IPK, and TAR).
+                        You can deploy these packages into the running system
+                        on the target by using utilities on the target such
+                        as <filename>rpm</filename> or
+                        <filename>ipk</filename>.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Initial Build Times Can be Significant:</emphasis>
+                        Long initial build times are unfortunately unavoidable
+                        due to the large number of packages initially built
+                        from scratch for a fully functioning Linux system.
+                        Once that initial build is completed, however, the
+                        shared-state (sstate) cache mechanism Yocto Project
+                        uses keeps the system from rebuilding packages that
+                        have not been "touched" since the last build.
+                        The sstate mechanism significantly reduces times
+                        for successive builds.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+    </section>
+
+    <section id='the-yocto-project-layer-model'>
+        <title>The Yocto Project Layer Model</title>
+
+        <para>
+            The Yocto Project's "Layer Model" is a development model for
+            embedded and IoT Linux creation that distinguishes the
+            Yocto Project from other simple build systems.
+            The Layer Model simultaneously supports collaboration and
+            customization.
+            Layers are repositories that contain related sets of instructions
+            that tell the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+            what to do.
+            You can collaborate, share, and reuse layers.
+        </para>
+
+        <para>
+            Layers can contain changes to previous instructions or settings
+            at any time.
+            This powerful override capability is what allows you to customize
+            previously supplied collaborative or community layers to suit your
+            product requirements.
+        </para>
+
+        <para>
+            You use different layers to logically separate information in your
+            build.
+            As an example, you could have BSP, GUI, distro configuration,
+            middleware, or application layers.
+            Putting your entire build into one layer limits and complicates
+            future customization and reuse.
+            Isolating information into layers, on the other hand, helps
+            simplify future customizations and reuse.
+            You might find it tempting to keep everything in one layer when
+            working on a single project.
+            However, the more modular your Metadata, the easier
+            it is to cope with future changes.
+            <note><title>Notes</title>
+                <itemizedlist>
+                    <listitem><para>
+                        Use Board Support Package (BSP) layers from silicon
+                        vendors when possible.
+                        </para></listitem>
+                    <listitem><para>
+                        Familiarize yourself with the
+                        <ulink url='https://caffelli-staging.yoctoproject.org/software-overview/layers/'>Yocto Project curated layer index</ulink>
+                        or the
+                        <ulink url='http://layers.openembedded.org/layerindex/branch/master/layers/'>OpenEmbedded layer index</ulink>.
+                        The latter contains more layers but they are less
+                        universally validated.
+                        </para></listitem>
+                    <listitem><para>
+                        Layers support the inclusion of technologies, hardware
+                        components, and software components.
+                        The
+                        <ulink url='&YOCTO_DOCS_DEV_URL;#making-sure-your-layer-is-compatible-with-yocto-project'>Yocto Project Compatible</ulink>
+                        designation provides a minimum level of standardization
+                        that contributes to a strong ecosystem.
+                        "YP Compatible" is applied to appropriate products and
+                        software components such as BSPs, other OE-compatible
+                        layers, and related open-source projects, allowing the
+                        producer to use Yocto Project badges and branding
+                        assets.
+                        </para></listitem>
+                </itemizedlist>
+            </note>
+        </para>
+
+        <para>
+            To illustrate how layers are used to keep things modular, consider
+            machine customizations.
+            These types of customizations typically reside in a special layer,
+            rather than a general layer, called a BSP Layer.
+            Furthermore, the machine customizations should be isolated from
+            recipes and Metadata that support a new GUI environment,
+            for example.
+            This situation gives you a couple of layers: one for the machine
+            configurations, and one for the GUI environment.
+            It is important to understand, however, that the BSP layer can
+            still make machine-specific additions to recipes within the GUI
+            environment layer without polluting the GUI layer itself
+            with those machine-specific changes.
+            You can accomplish this through a recipe that is a BitBake append
+            (<filename>.bbappend</filename>) file, which is described later
+            in this section.
+            <note>
+                For general information on BSP layer structure, see the
+                <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Packages (BSP) Developer's Guide</ulink>.
+            </note>
+        </para>
+
+        <para>
+            The
+            <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+            contains both general layers and BSP layers right out of the box.
+            You can easily identify layers that ship with a Yocto Project
+            release in the Source Directory by their names.
+            Layers typically have names that begin with the string
+            <filename>meta-</filename>.
+            <note>
+                It is not a requirement that a layer name begin with the
+                prefix <filename>meta-</filename>, but it is a commonly
+                accepted standard in the Yocto Project community.
+            </note>
+            For example, if you were to examine the
+            <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/'>tree view</ulink>
+            of the <filename>poky</filename> repository, you will see several
+            layers: <filename>meta</filename>,
+            <filename>meta-skeleton</filename>,
+            <filename>meta-selftest</filename>,
+            <filename>meta-poky</filename>, and
+            <filename>meta-yocto-bsp</filename>.
+            Each of these repositories represents a distinct layer.
+        </para>
+
+        <para>
+            For procedures on how to create layers, see the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+            section in the Yocto Project Development Tasks Manual.
+        </para>
+    </section>
+
+    <section id='components-and-tools'>
+        <title>Components and Tools</title>
+
+        <para>
+            The Yocto Project employs a collection of components and
+            tools used by the project itself, by project developers,
+            and by those using the Yocto Project.
+            These components and tools are open source projects and
+            metadata that are separate from the reference distribution
+            (<ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>)
+            and the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
+            Most of the components and tools are downloaded separately.
+        </para>
+
+        <para>
+            This section provides brief overviews of the components and
+            tools associated with the Yocto Project.
+        </para>
+
+        <section id='gs-development-tools'>
+            <title>Development Tools</title>
+
+            <para>
+                The following list consists of tools that help you develop
+                images and applications using the Yocto Project:
+                <itemizedlist>
+                    <listitem><para id='gs-crops-overview'>
+                        <emphasis>CROPS:</emphasis>
+                        <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>
+                        is an open source, cross-platform development framework
+                        that leverages
+                        <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
+                        CROPS provides an easily managed, extensible environment
+                        that allows you to build binaries for a variety of
+                        architectures on Windows, Linux and Mac OS X hosts.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis><filename>devtool</filename>:</emphasis>
+                        This command-line tool is available as part of the
+                        extensible SDK (eSDK) and is its cornerstone.
+                        You can use <filename>devtool</filename> to help build,
+                        test, and package software within the eSDK.
+                        You can use the tool to optionally integrate what you
+                        build into an image built by the OpenEmbedded build
+                        system.</para>
+
+                        <para>The <filename>devtool</filename> command employs
+                        a number of sub-commands that allow you to add, modify,
+                        and upgrade recipes.
+                        As with the OpenEmbedded build system, “recipes”
+                        represent software packages within
+                        <filename>devtool</filename>.
+                        When you use <filename>devtool add</filename>, a recipe
+                        is automatically created.
+                        When you use <filename>devtool modify</filename>, the
+                        specified existing recipe is used in order to determine
+                        where to get the source code and how to patch it.
+                        In both cases, an environment is set up so that when
+                        you build the recipe a source tree that is under your
+                        control is used in order to allow you to make changes
+                        to the source as desired.
+                        By default, both new recipes and the source go into
+                        a “workspace” directory under the eSDK.
+                        The <filename>devtool upgrade</filename> command
+                        updates an existing recipe so that you can build it
+                        for an updated set of source files.</para>
+
+                        <para>You can read about the
+                        <filename>devtool</filename> workflow in the Yocto
+                        Project Application Development and Extensible
+                        Software Development Kit (eSDK) Manual in the
+                        "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in Your SDK Workflow'</ulink>"
+                        section.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
+                        The eSDK provides a cross-development toolchain and
+                        libraries tailored to the contents of a specific image.
+                        The eSDK makes it easy to add new applications and
+                        libraries to an image, modify the source for an
+                        existing component, test changes on the target
+                        hardware, and integrate into the rest of the
+                        OpenEmbedded build system.
+                        The eSDK gives you a toolchain experience supplemented
+                        with the powerful set of <filename>devtool</filename>
+                        commands tailored for the Yocto Project environment.
+                        </para>
+
+                        <para>For information on the eSDK, see the
+                        <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+                        Manual.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis><trademark class='trade'>Eclipse</trademark> IDE Plug-in:</emphasis>
+                        This plug-in enables you to use the popular Eclipse
+                        Integrated Development Environment (IDE), which allows
+                        for development using the Yocto Project all within the
+                        Eclipse IDE.
+                        You can work within Eclipse to cross-compile, deploy,
+                        and execute your output into a QEMU emulation session
+                        as well as onto actual target hardware.</para>
+
+                        <para>The environment also supports performance
+                        enhancing tools that allow you to perform remote
+                        profiling, tracing, collection of power data,
+                        collection of latency data, and collection of
+                        performance data.</para>
+
+                        <para>Once you enable the plug-in, standard Eclipse
+                        functions automatically use the cross-toolchain
+                        and target system libraries.
+                        You can build applications using any of these
+                        libraries.</para>
+
+                        <para>For more information on the Eclipse plug-in,
+                        see the
+                        "<ulink url='&YOCTO_DOCS_SDK_URL;#adt-eclipse'>Working Within Eclipse</ulink>"
+                        section in the Yocto Project Application Development
+                        and the Extensible Software Development Kit (eSDK)
+                        manual.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Toaster:</emphasis>
+                        Toaster is a web interface to the Yocto Project
+                        OpenEmbedded build system.
+                        Toaster allows you to configure, run, and view
+                        information about builds.
+                        For information on Toaster, see the
+                        <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='gs-production-tools'>
+            <title>Production Tools</title>
+
+            <para>
+                The following list consists of tools that help production
+                related activities using the Yocto Project:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Auto Upgrade Helper:</emphasis>
+                        This utility when used in conjunction with the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+                        (BitBake and OE-Core) automatically generates upgrades
+                        for recipes that are based on new versions of the
+                        recipes published upstream.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Recipe Reporting System:</emphasis>
+                        The Recipe Reporting System tracks recipe versions
+                        available for Yocto Project.
+                        The main purpose of the system is to help you
+                        manage the recipes you maintain and to offer a dynamic
+                        overview of the project.
+                        The Recipe Reporting System is built on top of the
+                        <ulink url="http://layers.openembedded.org/layerindex/layers/">OpenEmbedded Layer Index</ulink>,
+                        which is a website that indexes OpenEmbedded-Core
+                        layers.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Patchwork:</emphasis>
+                        <ulink url='http://jk.ozlabs.org/projects/patchwork/'>Patchwork</ulink>
+                        is a fork of a project originally started by
+                        <ulink url='http://ozlabs.org/'>OzLabs</ulink>.
+                        The project is a web-based tracking system designed
+                        to streamline the process of bringing contributions
+                        into a project.
+                        The Yocto Project uses Patchwork as an organizational
+                        tool to handle patches, which number in the thousands
+                        for every release.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>AutoBuilder:</emphasis>
+                        AutoBuilder is a project that automates build tests
+                        and quality assurance (QA).
+                        By using the public AutoBuilder, anyone can determine
+                        the status of the current "master" branch of Poky.
+                        <note>
+                            AutoBuilder is based on
+                            <ulink url='https://buildbot.net/'>buildbot</ulink>.
+                        </note></para>
+
+                        <para>A goal of the Yocto Project is to lead the
+                        open source industry with a project that automates
+                        testing and QA procedures.
+                        In doing so, the project encourages a development
+                        community that publishes QA and test plans, publicly
+                        demonstrates QA and test plans, and encourages
+                        development of tools that automate and test and QA
+                        procedures for the benefit of the development
+                        community.</para>
+
+                        <para>You can learn more about the AutoBuilder used
+                        by the Yocto Project
+                        <ulink url='&YOCTO_AB_URL;'>here</ulink>.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Cross-Prelink:</emphasis>
+                        Prelinking is the process of pre-computing the load
+                        addresses and link tables generated by the dynamic
+                        linker as compared to doing this at runtime.
+                        Doing this ahead of time results in performance
+                        improvements when the application is launched and
+                        reduced memory usage for libraries shared by many
+                        applications.</para>
+
+                        <para>Historically, cross-prelink is a variant of
+                        prelink, which was conceived by
+                        <ulink url='http://people.redhat.com/jakub/prelink.pdf'>Jakub Jel&iacute;nek</ulink>
+                        a number of years ago.
+                        Both prelink and cross-prelink are maintained in the
+                        same repository albeit on separate branches.
+                        By providing an emulated runtime dynamic linker
+                        (i.e. <filename>glibc</filename>-derived
+                        <filename>ld.so</filename> emulation), the
+                        cross-prelink project extends the prelink software’s
+                        ability to prelink a sysroot environment.
+                        Additionally, the cross-prelink software enables the
+                        ability to work in sysroot style environments.</para>
+
+                        <para>The dynamic linker determines standard load
+                        address calculations based on a variety of factors
+                        such as mapping addresses, library usage, and library
+                        function conflicts.
+                        The prelink tool uses this information, from the
+                        dynamic linker, to determine unique load addresses
+                        for executable and linkable format (ELF) binaries
+                        that are shared libraries and dynamically linked.
+                        The prelink tool modifies these ELF binaries with the
+                        pre-computed information.
+                        The result is faster loading and often lower memory
+                        consumption because more of the library code can
+                        be re-used from shared Copy-On-Write (COW) pages.
+                        </para>
+
+                        <para>The original upstream prelink project only
+                        supports running prelink on the end target device
+                        due to the reliance on the target device’s dynamic
+                        linker.
+                        This restriction causes issues when developing a
+                        cross-compiled system.
+                        The cross-prelink adds a synthesized dynamic loader
+                        that runs on the host, thus permitting cross-prelinking
+                        without ever having to run on a read-write target
+                        filesystem.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Pseudo:</emphasis>
+                        Pseudo is the Yocto Project implementation of
+                        <ulink url='http://man.he.net/man1/fakeroot'>fakeroot</ulink>,
+                        which is used to run commands in an environment
+                        that seemingly has root privileges.</para>
+
+                        <para>During a build, it can be necessary to perform
+                        operations that require system administrator
+                        privileges.
+                        For example, file ownership or permissions might need
+                        definition.
+                        Pseudo is a tool that you can either use directly or
+                        through the environment variable
+                        <filename>LD_PRELOAD</filename>.
+                        Either method allows these operations to succeed as
+                        if system administrator privileges exist even
+                        when they do not.</para>
+
+                        <para>You can read more about Pseudo in the
+                        "<link linkend='fakeroot-and-pseudo'>Fakeroot and Pseudo</link>"
+                        section.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='gs-openembedded-build-system'>
+            <title>Open-Embedded Build System Components</title>
+
+            <para>
+                The following list consists of components associated with the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>BitBake:</emphasis>
+                        BitBake is a core component of the Yocto Project and is
+                        used by the OpenEmbedded build system to build images.
+                        While BitBake is key to the build system, BitBake
+                        is maintained separately from the Yocto Project.</para>
+
+                        <para>BitBake is a generic task execution engine that
+                        allows shell and Python tasks to be run efficiently
+                        and in parallel while working within complex inter-task
+                        dependency constraints.
+                        In short, BitBake is a build engine that works
+                        through recipes written in a specific format in order
+                        to perform sets of tasks.</para>
+
+                        <para>You can learn more about BitBake in the
+                        <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>OpenEmbedded-Core:</emphasis>
+                        OpenEmbedded-Core (OE-Core) is a common layer of
+                        metadata (i.e. recipes, classes, and associated files)
+                        used by OpenEmbedded-derived systems, which includes
+                        the Yocto Project.
+                        The Yocto Project and the OpenEmbedded Project both
+                        maintain the OpenEmbedded-Core.
+                        You can find the OE-Core metadata in the Yocto Project
+                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta'>Source Repositories</ulink>.
+                        </para>
+
+                        <para>Historically, the Yocto Project integrated the
+                        OE-Core metadata throughout the Yocto Project
+                        source repository reference system (Poky).
+                        After Yocto Project Version 1.0, the Yocto Project
+                        and OpenEmbedded agreed to work together and share a
+                        common core set of metadata (OE-Core), which contained
+                        much of the functionality previously found in Poky.
+                        This collaboration achieved a long-standing
+                        OpenEmbedded objective for having a more tightly
+                        controlled and quality-assured core.
+                        The results also fit well with the Yocto Project
+                        objective of achieving a smaller number of fully
+                        featured tools as compared to many different ones.
+                        </para>
+
+                        <para>Sharing a core set of metadata results in Poky
+                        as an integration layer on top of OE-Core.
+                        You can see that in this
+                        <link linkend='yp-key-dev-elements'>figure</link>.
+                        The Yocto Project combines various components such as
+                        BitBake, OE-Core, script “glue”, and documentation
+                        for its build system.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='gs-reference-distribution-poky'>
+            <title>Reference Distribution (Poky)</title>
+
+            <para>
+                Poky is the Yocto Project reference distribution.
+                It contains the
+                <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>Open-Embedded build system</ulink>
+                (BitBake and OE-Core) as well as a set of metadata to get you
+                started building your own distribution.
+                See the
+                <link linkend='what-is-the-yocto-project'>figure</link> in
+                "What is the Yocto Project?" section for an illustration
+                that shows Poky and its relationship with other parts of the
+                Yocto Project.</para>
+
+                <para>To use the Yocto Project tools and components, you
+                can download (<filename>clone</filename>) Poky and use it
+                to bootstrap your own distribution.
+                <note>
+                    Poky does not contain binary files.
+                    It is a working example of how to build your own custom
+                    Linux distribution from source.
+                </note>
+                You can read more about Poky in the
+                "<link linkend='reference-embedded-distribution'>Reference Embedded Distribution (Poky)</link>"
+                section.
+            </para>
+        </section>
+
+        <section id='gs-packages-for-finished-targets'>
+            <title>Packages for Finished Targets</title>
+
+            <para>
+                The following lists components associated with packages
+                for finished targets:
+                <itemizedlist>
+                    <listitem><para>
+                        <emphasis>Matchbox:</emphasis>
+                        Matchbox is an Open Source, base environment for the
+                        X Window System running on non-desktop, embedded
+                        platforms such as handhelds, set-top boxes, kiosks,
+                        and anything else for which screen space, input
+                        mechanisms, or system resources are limited.</para>
+
+                        <para>Matchbox consists of a number of interchangeable
+                        and optional applications that you can tailor to a
+                        specific, non-desktop platform to enhance usability
+                        in constrained environments.</para>
+
+                        <para>You can find the Matchbox source in the Yocto
+                        Project
+                        <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Opkg</emphasis>
+                        Open PacKaGe management (opkg) is a lightweight
+                        package management system based on the itsy package
+                        (ipkg) management system.
+                        Opkg is written in C and resembles Advanced Package
+                        Tool (APT) and Debian Package (dpkg) in operation.
+                        </para>
+
+                        <para>Opkg is intended for use on embedded Linux
+                        devices and is used in this capacity in the
+                        <ulink url='http://www.openembedded.org/wiki/Main_Page'>OpenEmbedded</ulink>
+                        and
+                        <ulink url='https://openwrt.org/'>OpenWrt</ulink>
+                        projects, as well as the Yocto Project.
+                        <note>
+                            As best it can, opkg maintains backwards
+                            compatibility with ipkg and conforms to a subset
+                            of Debian’s policy manual regarding control files.
+                        </note>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='gs-archived-components'>
+            <title>Archived Components</title>
+
+            <para>
+                The Build Appliance is a virtual machine image that enables
+                you to build and boot a custom embedded Linux image with
+                the Yocto Project using a non-Linux development system.
+            </para>
+
+            <para>
+                Historically, the Build Appliance was the second of three
+                methods by which you could use the Yocto Project on a system
+                that was not native to Linux.
+                <orderedlist>
+                    <listitem><para>
+                        <emphasis>Hob:</emphasis>
+                        Hob, which is now deprecated and is no longer available
+                        since the 2.1 release of the Yocto Project provided
+                        a rudimentary, GUI-based interface to the Yocto
+                        Project.
+                        Toaster has fully replaced Hob.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>Build Appliance:</emphasis>
+                        Post Hob, the Build Appliance became available.
+                        It was never recommended that you use the Build
+                        Appliance as a day-to-day production development
+                        environment with the Yocto Project.
+                        Build Appliance was useful as a way to try out
+                        development in the Yocto Project environment.
+                        </para></listitem>
+                    <listitem><para>
+                        <emphasis>CROPS:</emphasis>
+                        The final and best solution available now for
+                        developing using the Yocto Project on a system
+                        not native to Linux is with
+                        <link linkend='gs-crops-overview'>CROPS</link>.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+    </section>
+
+    <section id='gs-development-methods'>
+        <title>Development Methods</title>
+
+        <para>
+            The Yocto Project development environment usually involves a
+            <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>Build Host</ulink>
+            and target hardware.
+            You use the Build Host to build images and develop applications,
+            while you use the target hardware to test deployed software.
+        </para>
+
+        <para>
+            This section provides an introduction to the choices or
+            development methods you have when setting up your Build Host.
+            Depending on the your particular workflow preference and the
+            type of operating system your Build Host runs, several choices
+            exist that allow you to use the Yocto Project.
+            <note>
+                For additional detail about the Yocto Project development
+                environment, see the
+                "<link linkend='overview-development-environment'>The Yocto Project Development Environment</link>"
+                chapter.
+            </note>
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>Native Linux Host:</emphasis>
+                    By far the best option for a Build Host.
+                    A system running Linux as its native operating system
+                    allows you to develop software by directly using the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+                    tool.
+                    You can accomplish all aspects of development from a
+                    familiar shell of a supported Linux distribution.</para>
+
+                    <para>For information on how to set up a Build Host on
+                    a system running Linux as its native operating system,
+                    see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-a-native-linux-host'>Setting Up a Native Linux Host</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>CROss PlatformS (CROPS):</emphasis>
+                    Typically, you use
+                    <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
+                    which leverages
+                    <ulink url='https://www.docker.com/'>Docker Containers</ulink>,
+                    to set up a Build Host that is not running Linux (e.g.
+                    <trademark class='registered'>Microsoft</trademark>
+                    <trademark class='trademark'>Windows</trademark>
+                    or
+                    <trademark class='registered'>macOS</trademark>).
+                    <note>
+                        You can, however, use CROPS on a Linux-based system.
+                    </note>
+                    CROPS is an open source, cross-platform development
+                    framework that provides an easily managed, extensible
+                    environment for building binaries targeted for a variety
+                    of architectures on Windows, macOS, or Linux hosts.
+                    Once the Build Host is set up using CROPS, you can prepare
+                    a shell environment to mimic that of a shell being used
+                    on a system natively running Linux.</para>
+
+                    <para>For information on how to set up a Build Host with
+                    CROPS, see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Toaster:</emphasis>
+                    Regardless of what your Build Host is running, you can
+                    use Toaster to develop software using the Yocto Project.
+                    Toaster is a web interface to the Yocto Project's
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>Open-Embedded build system</ulink>.
+                    The interface enables you to configure and run your
+                    builds.
+                    Information about builds is collected and stored in a
+                    database.
+                    You can use Toaster to configure and start builds on
+                    multiple remote build servers.</para>
+
+                    <para>For information about and how to use Toaster,
+                    see the
+                    <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><trademark class='trade'>Eclipse</trademark> IDE:</emphasis>
+                    If your Build Host supports and runs the popular
+                    Eclipse IDE, you can install the Yocto Project Eclipse
+                    plug-in and use the Yocto Project to develop software.
+                    The plug-in integrates the Yocto Project functionality
+                    into Eclipse development practices.</para>
+
+                    <para>For information about how to install and use the
+                    Yocto Project Eclipse plug-in, see the
+                    "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-eclipse-project'>Developing Applications Using Eclipse</ulink>"
+                    chapter in the Yocto Project Application Development and
+                    the Extensible Software Development Kit (eSDK) Manual.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='reference-embedded-distribution'>
+        <title>Reference Embedded Distribution (Poky)</title>
+
+        <para>
+            "Poky", which is pronounced <emphasis>Pock</emphasis>-ee, is the
+            name of the Yocto Project's reference distribution or Reference OS
+            Kit.
+            Poky contains the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded Build System</ulink>
+            (<ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink> and
+            <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core</ulink>)
+            as well as a set of
+            <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>metadata</ulink> to get
+            you started building your own distro.
+            In other words, Poky is a base specification of the functionality
+            needed for a typical embedded system as well as the components
+            from the Yocto Project that allow you to build a distribution into
+            a usable binary image.
+        </para>
+
+        <para>
+            Poky is a combined repository of BitBake, OpenEmbedded-Core
+            (which is found in <filename>meta</filename>),
+            <filename>meta-poky</filename>,
+            <filename>meta-yocto-bsp</filename>, and documentation provided
+            all together and known to work well together.
+            You can view these items that make up the Poky repository in the
+            <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/'>Source Repositories</ulink>.
+            <note>
+                If you are interested in all the contents of the
+                <filename>poky</filename> Git repository, see the
+                "<ulink url='&YOCTO_DOCS_REF_URL;#structure-core'>Top-Level Core Components</ulink>"
+                section in the Yocto Project Reference Manual.
+            </note>
+        </para>
+
+        <para id='gs-poky-reference-distribution'>
+            The following figure illustrates what generally comprises Poky:
+            <imagedata fileref="figures/poky-reference-distribution.png" format="PNG" align='center' width="8in"/>
+            <itemizedlist>
+                <listitem><para>
+                    BitBake is a task executor and scheduler that is the heart of
+                    the OpenEmbedded build system.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>meta-poky</filename>, which is Poky-specific
+                    metadata.
+                    </para></listitem>
+                <listitem><para>
+                    <filename>meta-yocto-bsp</filename>, which are Yocto
+                    Project-specific Board Support Packages (BSPs).
+                    </para></listitem>
+                <listitem><para>
+                    OpenEmbedded-Core (OE-Core) metadata, which includes
+                    shared configurations, global variable definitions,
+                    shared classes, packaging, and recipes.
+                    Classes define the encapsulation and inheritance of build
+                    logic.
+                    Recipes are the logical units of software and images
+                    to be built.
+                    </para></listitem>
+                <listitem><para>
+                    Documentation, which contains the Yocto Project source
+                    files used to make the set of user manuals.
+                    </para></listitem>
+            </itemizedlist>
+            <note>
+                While Poky is a "complete" distribution specification and is
+                tested and put through QA, you cannot use it as a product
+                "out of the box" in its current form.
+            </note>
+        </para>
+
+        <para>
+            To use the Yocto Project tools, you can use Git to clone (download)
+            the Poky repository then use your local copy of the reference
+            distribution to bootstrap your own distribution.
+            <note>
+                Poky does not contain binary files.
+                It is a working example of how to build your own custom Linux distribution
+                from source.
+            </note>
+        </para>
+
+        <para>
+            Poky has a regular, well established, six-month release cycle
+            under its own version.
+            Major releases occur at the same time major releases (point
+            releases) occur for the Yocto Project, which are typically in the
+            Spring and Fall.
+            For more information on the Yocto Project release schedule and
+            cadence, see the
+            "<ulink url='&YOCTO_DOCS_REF_URL;#ref-release-process'>Yocto Project Releases and the Stable Release Process</ulink>"
+            chapter in the Yocto Project Reference Manual.
+        </para>
+
+        <para>
+            Much has been said about Poky being a "default configuration."
+            A default configuration provides a starting image footprint.
+            You can use Poky out of the box to create an image ranging from a
+            shell-accessible minimal image all the way up to a Linux
+            Standard Base-compliant image that uses a GNOME Mobile and
+            Embedded (GMAE) based reference user interface called Sato.
+        </para>
+
+        <para>
+            One of the most powerful properties of Poky is that every aspect
+            of a build is controlled by the metadata.
+            You can use metadata to augment these base image types by
+            adding metadata
+            <link linkend='the-yocto-project-layer-model'>layers</link>
+            that extend functionality.
+            These layers can provide, for example, an additional software
+            stack for an image type, add a board support package (BSP) for
+            additional hardware, or even create a new image type.
+        </para>
+
+        <para>
+            Metadata is loosely grouped into configuration files or package
+            recipes.
+            A recipe is a collection of non-executable metadata used by
+            BitBake to set variables or define additional build-time tasks.
+            A recipe contains fields such as the recipe description, the recipe
+            version, the license of the package and the upstream source
+            repository.
+            A recipe might also indicate that the build process uses autotools,
+            make, distutils or any other build process, in which case the basic
+            functionality can be defined by the classes it inherits from
+            the OE-Core layer's class definitions in
+            <filename>./meta/classes</filename>.
+            Within a recipe you can also define additional tasks as well as
+            task prerequisites.
+            Recipe syntax through BitBake also supports both
+            <filename>_prepend</filename> and <filename>_append</filename>
+            operators as a method of extending task functionality.
+            These operators inject code into the beginning or end of a task.
+            For information on these BitBake operators, see the
+            "<ulink url='&YOCTO_DOCS_BB_URL;#appending-and-prepending-override-style-syntax'>Appending and Prepending (Override Style Syntax)</ulink>"
+            section in the BitBake User's Manual.
+        </para>
+    </section>
+
+    <section id='openembedded-build-system-workflow'>
+        <title>The OpenEmbedded Build System Workflow</title>
+
+        <para>
+            The
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
+            uses a "workflow" to accomplish image and SDK generation.
+            The following figure overviews that workflow:
+            <imagedata fileref="figures/YP-flow-diagram.png"
+                format="PNG" align='center' width="8in"/>
+            Following is a brief summary of the "workflow":
+            <orderedlist>
+                <listitem><para>
+                    Developers specify architecture, policies, patches and
+                    configuration details.
+                    </para></listitem>
+                <listitem><para>
+                    The build system fetches and downloads the source code
+                    from the specified location.
+                    The build system supports standard methods such as tarballs
+                    or source code repositories systems such as Git.
+                    </para></listitem>
+                <listitem><para>
+                    Once source code is downloaded, the build system extracts
+                    the sources into a local work area where patches are
+                    applied and common steps for configuring and compiling
+                    the software are run.
+                    </para></listitem>
+                <listitem><para>
+                    The build system then installs the software into a
+                    temporary staging area where the binary package format you
+                    select (DEB, RPM, or IPK) is used to roll up the software.
+                    </para></listitem>
+                <listitem><para>
+                    Different QA and sanity checks run throughout entire
+                    build process.
+                    </para></listitem>
+                <listitem><para>
+                    After the binaries are created, the build system
+                    generates a binary package feed that is used to create
+                    the final root file image.
+                    </para></listitem>
+                <listitem><para>
+                    The build system generates the file system image and a
+                    customized Extensible SDK (eSDSK) for application
+                    development in parallel.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+
+        <para>
+            For a very detailed look at this workflow, see the
+            "<link linkend='openembedded-build-system-build-concepts'>OpenEmbedded Build System Concepts</link>"
+            section.
+        </para>
+    </section>
+
+
+    <section id='some-basic-terms'>
+        <title>Some Basic Terms</title>
+
+        <para>
+            It helps to understand some basic fundamental terms when
+            learning the Yocto Project.
+            Although a list of terms exists in the
+            "<ulink url='&YOCTO_DOCS_REF_URL;#ref-terms'>Yocto Project Terms</ulink>"
+            section of the Yocto Project Reference Manual, this section
+            provides the definitions of some terms helpful for getting started:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis>Configuration Files:</emphasis>
+                    Files that hold global definitions of variables,
+                    user-defined variables, and hardware configuration
+                    information.
+                    These files tell the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>Open-Embedded build system</ulink>
+                    what to build and what to put into the image to support a
+                    particular platform.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
+                    A custom SDK for application developers.
+                    This eSDK allows developers to incorporate their library
+                    and programming changes back into the image to make
+                    their code available to other application developers.
+                    For information on the eSDK, see the
+                    <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+                    manual.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Layer:</emphasis>
+                    A collection of related recipes.
+                    Layers allow you to consolidate related metadata to
+                    customize your build.
+                    Layers also isolate information used when building
+                    for multiple architectures.
+                    Layers are hierarchical in their ability to override
+                    previous specifications.
+                    You can include any number of available layers from the
+                    Yocto Project and customize the build by adding your
+                    layers after them.
+                    You can search the Layer Index for layers used within
+                    Yocto Project.</para>
+
+                    <para>For more detailed information on layers, see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    For a discussion specifically on BSP Layers, see the
+                    "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
+                    section in the Yocto Project Board Support Packages (BSP)
+                    Developer's Guide.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Metadata:</emphasis>
+                    A key element of the Yocto Project is the Metadata that
+                    is used to construct a Linux distribution and is contained
+                    in the files that the OpenEmbedded build system parses
+                    when building an image.
+                    In general, Metadata includes recipes, configuration
+                    files, and other information that refers to the build
+                    instructions themselves, as well as the data used to
+                    control what things get built and the effects of the
+                    build.
+                    Metadata also includes commands and data used to
+                    indicate what versions of software are used, from
+                    where they are obtained, and changes or additions to the
+                    software itself (patches or auxiliary files) that
+                    are used to fix bugs or customize the software for use
+                    in a particular situation.
+                    OpenEmbedded-Core is an important set of validated
+                    metadata.
+                    </para></listitem>
+                <listitem><para id='gs-term-openembedded-build-system'>
+                    <emphasis>OpenEmbedded Build System:</emphasis>
+                    The terms "BitBake" and "build system" are sometimes
+                    used for the OpenEmbedded Build System.</para>
+
+                    <para>BitBake is a task scheduler and execution engine
+                    that parses instructions (i.e. recipes) and configuration
+                    data.
+                    After a parsing phase, BitBake creates a dependency tree
+                    to order the compilation, schedules the compilation of
+                    the included code, and finally executes the building
+                    of the specified custom Linux image (distribution).
+                    BitBake is similar to the <filename>make</filename>
+                    tool.</para>
+
+                    <para>During a build process, the build system tracks
+                    dependencies and performs a native or cross-compilation
+                    of the package.
+                    As a first step in a cross-build setup, the framework
+                    attempts to create a cross-compiler toolchain
+                    (i.e. Extensible SDK) suited for the target platform.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>OpenEmbedded-Core (OE-Core):</emphasis>
+                    OE-Core is metadata comprised of foundation recipes,
+                    classes, and associated files that are meant to be
+                    common among many different OpenEmbedded-derived systems,
+                    including the Yocto Project.
+                    OE-Core is a curated subset of an original repository
+                    developed by the OpenEmbedded community that has been
+                    pared down into a smaller, core set of continuously
+                    validated recipes.
+                    The result is a tightly controlled and quality-assured
+                    core set of recipes.</para>
+
+                    <para>You can see the Metadata in the
+                    <filename>meta</filename> directory of the Yocto Project
+                    <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Packages:</emphasis>
+                    In the context of the Yocto Project, this term refers to a
+                    recipe's packaged output produced by BitBake (i.e. a
+                    "baked recipe").
+                    A package is generally the compiled binaries produced from the
+                    recipe's sources.
+                    You "bake" something by running it through BitBake.</para>
+
+                    <para>It is worth noting that the term "package" can,
+                    in general, have subtle meanings.
+                    For example, the packages referred to in the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
+                    section in the Yocto Project Reference Manual are compiled
+                    binaries that, when installed, add functionality to your
+                    Linux distribution.</para>
+
+                    <para>Another point worth noting is that historically within
+                    the Yocto Project, recipes were referred to as packages - thus,
+                    the existence of several BitBake variables that are seemingly
+                    mis-named,
+                    (e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>,
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>,
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>).
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Poky:</emphasis>
+                    Poky is a reference embedded distribution and a reference
+                    test configuration.
+                    Poky provides the following:
+                    <itemizedlist>
+                        <listitem><para>
+                            A base-level functional distro used to illustrate
+                            how to customize a distribution.
+                            </para></listitem>
+                        <listitem><para>
+                            A means by which to test the Yocto Project
+                            components (i.e. Poky is used to validate
+                            the Yocto Project).
+                            </para></listitem>
+                        <listitem><para>
+                            A vehicle through which you can download
+                            the Yocto Project.
+                            </para></listitem>
+                    </itemizedlist>
+                    Poky is not a product level distro.
+                    Rather, it is a good starting point for customization.
+                    <note>
+                        Poky is an integration layer on top of OE-Core.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Recipe:</emphasis>
+                    The most common form of metadata.
+                    A recipe contains a list of settings and tasks
+                    (i.e. instructions) for building packages that are then
+                    used to build the binary image.
+                    A recipe describes where you get source code and which
+                    patches to apply.
+                    Recipes describe dependencies for libraries or for other
+                    recipes as well as configuration and compilation options.
+                    Related recipes are consolidated into a layer.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/overview-manual/overview-manual.xml b/import-layers/yocto-poky/documentation/overview-manual/overview-manual.xml
new file mode 100644
index 0000000..c283f9a
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/overview-manual/overview-manual.xml
@@ -0,0 +1,108 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<book id='overview-manual' lang='en'
+      xmlns:xi="http://www.w3.org/2003/XInclude"
+      xmlns="http://docbook.org/ns/docbook"
+      >
+    <bookinfo>
+
+        <mediaobject>
+            <imageobject>
+                <imagedata fileref='figures/overview-manual-title.png'
+                    format='SVG'
+                    align='left' scalefit='1' width='100%'/>
+            </imageobject>
+        </mediaobject>
+
+        <title>
+            Yocto Project Overview and Concepts Manual
+        </title>
+
+        <authorgroup>
+            <author>
+                <firstname>Scott</firstname> <surname>Rifenbark</surname>
+                <affiliation>
+                    <orgname>Scotty's Documentation Services, INC</orgname>
+                </affiliation>
+                <email>srifenbark@gmail.com</email>
+            </author>
+        </authorgroup>
+
+        <revhistory>
+            <revision>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>The initial document released with the Yocto Project 2.5 Release.</revremark>
+            </revision>
+        </revhistory>
+
+    <copyright>
+     <year>&COPYRIGHT_YEAR;</year>
+      <holder>Linux Foundation</holder>
+    </copyright>
+
+    <legalnotice>
+      <para>
+          Permission is granted to copy, distribute and/or modify this document under
+          the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
+          Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
+          Creative Commons.
+      </para>
+           <note><title>Manual Notes</title>
+               <itemizedlist>
+                   <listitem><para>
+                       This version of the
+                       <emphasis>Yocto Project Overview and Concepts Manual</emphasis>
+                       is for the &YOCTO_DOC_VERSION; release of the
+                       Yocto Project.
+                       To be sure you have the latest version of the manual
+                       for this release, go to the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
+                       </para></listitem>
+                   <listitem><para>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
+               </itemizedlist>
+           </note>
+    </legalnotice>
+
+    </bookinfo>
+
+    <xi:include href="overview-manual-intro.xml"/>
+
+    <xi:include href="overview-manual-yp-intro.xml"/>
+
+    <xi:include href="overview-manual-development-environment.xml"/>
+
+    <xi:include href="overview-manual-concepts.xml" />
+
+</book>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/poky.ent b/import-layers/yocto-poky/documentation/poky.ent
index db3eef0..49b1900 100644
--- a/import-layers/yocto-poky/documentation/poky.ent
+++ b/import-layers/yocto-poky/documentation/poky.ent
@@ -1,13 +1,17 @@
-<!ENTITY DISTRO "2.4.2">
-<!ENTITY DISTRO_COMPRESSED "242">
-<!ENTITY DISTRO_NAME_NO_CAP "rocko">
-<!ENTITY DISTRO_NAME "Rocko">
-<!ENTITY YOCTO_DOC_VERSION "2.4.2">
-<!ENTITY DISTRO_REL_TAG "yocto-2.4.2">
-<!ENTITY METAINTELVERSION "8.0">
+<!ENTITY DISTRO "2.5">
+<!ENTITY DISTRO_COMPRESSED "25">
+<!ENTITY DISTRO_NAME_NO_CAP "sumo">
+<!ENTITY DISTRO_NAME "Sumo">
+<!ENTITY DISTRO_NAME_NO_CAP_MINUS_ONE "rocko">
+<!ENTITY DISTRO_NAME_MINUS_ONE "Rocko">
+<!ENTITY YOCTO_DOC_VERSION "2.5">
+<!ENTITY YOCTO_DOC_VERSION_MINUS_ONE "2.4">
+<!ENTITY DISTRO_REL_TAG "yocto-2.5">
+<!ENTITY METAINTELVERSION "9.0">
+<!ENTITY REL_MONTH_YEAR "May 2018">
 <!ENTITY META_INTEL_REL_TAG "&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;">
-<!ENTITY POKYVERSION "19.0.2">
-<!ENTITY POKYVERSION_COMPRESSED "1902">
+<!ENTITY POKYVERSION "20.0.0">
+<!ENTITY POKYVERSION_COMPRESSED "2000">
 <!ENTITY YOCTO_POKY "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;">
 <!ENTITY COPYRIGHT_YEAR "2010-2018">
 <!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
@@ -18,7 +22,6 @@
 <!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org">
 <!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org">
 <!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
-<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/downloads/core/&DISTRO_NAME_NO_CAP;&DISTRO_COMPRESSED;">
 <!ENTITY OE_HOME_URL "http://www.openembedded.org">
 <!ENTITY OE_LISTS_URL "http://lists.openembedded.org/mailman">
 <!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
@@ -35,8 +38,8 @@
 <!ENTITY ECLIPSE_INDIGO_CDT_URL "&ECLIPSE_DL_URL;/tools/cdt/releases/indigo">
 <!ENTITY YOCTO_DOCS_URL "&YOCTO_HOME_URL;/docs">
 <!ENTITY YOCTO_SOURCES_URL "&YOCTO_HOME_URL;/sources/">
-<!ENTITY YOCTO_AB_PORT_URL "&YOCTO_AB_URL;:8010">
-<!ENTITY YOCTO_AB_NIGHTLY_URL "&YOCTO_AB_URL;/pub/nightly/">
+<!ENTITY YOCTO_AB_PORT_URL "https://autobuilder.yocto.io/">
+<!ENTITY YOCTO_AB_NIGHTLY_URL "&YOCTO_AB_PORT_URL;/pub/nightly/">
 <!ENTITY YOCTO_POKY_URL "&YOCTO_DL_URL;/releases/poky/">
 <!ENTITY YOCTO_RELEASE_DL_URL "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;">
 <!ENTITY YOCTO_TOOLCHAIN_DL_URL "&YOCTO_RELEASE_DL_URL;/toolchain/">
@@ -52,13 +55,14 @@
 <!ENTITY YOCTO_DOCS_REF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/ref-manual/ref-manual.html">
 <!ENTITY YOCTO_DOCS_BSP_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/bsp-guide/bsp-guide.html">
 <!ENTITY YOCTO_DOCS_DEV_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/dev-manual/dev-manual.html">
-<!ENTITY YOCTO_DOCS_KERNEL_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/kernel-manual/kernel-manual.html">
 <!ENTITY YOCTO_DOCS_KERNEL_DEV_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/kernel-dev/kernel-dev.html">
 <!ENTITY YOCTO_DOCS_PROF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/profile-manual/profile-manual.html">
 <!ENTITY YOCTO_DOCS_MM_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/mega-manual/mega-manual.html">
 <!ENTITY YOCTO_DOCS_BB_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/bitbake-user-manual/bitbake-user-manual.html">
 <!ENTITY YOCTO_DOCS_TOAST_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/toaster-manual/toaster-manual.html">
 <!ENTITY YOCTO_DOCS_SDK_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/sdk-manual/sdk-manual.html">
+<!ENTITY YOCTO_DOCS_OM_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/overview-manual/overview-manual.html">
+<!ENTITY YOCTO_DOCS_BRIEF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/brief-yoctoprojectqs/brief-yoctoprojectqs.html">
 <!ENTITY YOCTO_ADTPATH_DIR "/opt/poky/&DISTRO;">
 <!ENTITY YOCTO_POKY_TARBALL "&YOCTO_POKY;.tar.bz2">
 <!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env">
diff --git a/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml b/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml
index f742e88..b64875b 100644
--- a/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml
+++ b/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml
@@ -87,14 +87,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
         </revhistory>
 
@@ -118,24 +113,36 @@
                        is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
     </legalnotice>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/faq.xml b/import-layers/yocto-poky/documentation/ref-manual/faq.xml
index 11dfc5b..49ff862 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/faq.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/faq.xml
@@ -143,7 +143,7 @@
                 To add a package, you need to create a BitBake recipe.
                 For information on how to create a BitBake recipe, see the
                 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-writing-a-new-recipe'>Writing a New Recipe</ulink>"
-                in the Yocto Project Development Tasks Manual.
+                section in the Yocto Project Development Tasks Manual.
             </para>
         </answer>
     </qandaentry>
@@ -417,10 +417,11 @@
 
             <para>
                 You can find more information on licensing in the
-                "<link linkend='licensing'>Licensing</link>" section and in the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#licensing'>Licensing</ulink>"
+                section in the Yocto Project Overview and Concepts Manual
+                and also in the
                 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
-                section, which is in the Yocto Project Development Tasks
-                Manual.
+                section in the Yocto Project Development Tasks Manual.
             </para>
         </answer>
     </qandaentry>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/analysis-for-package-splitting.png b/import-layers/yocto-poky/documentation/ref-manual/figures/analysis-for-package-splitting.png
deleted file mode 100644
index 04f2794..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/analysis-for-package-splitting.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/building-an-image.png b/import-layers/yocto-poky/documentation/ref-manual/figures/building-an-image.png
deleted file mode 100755
index 1fbea5a..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/building-an-image.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/configuration-compile-autoreconf.png b/import-layers/yocto-poky/documentation/ref-manual/figures/configuration-compile-autoreconf.png
deleted file mode 100644
index a07464f..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/configuration-compile-autoreconf.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/cross-development-toolchains.png b/import-layers/yocto-poky/documentation/ref-manual/figures/cross-development-toolchains.png
deleted file mode 100644
index d36670a..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/cross-development-toolchains.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/image-generation.png b/import-layers/yocto-poky/documentation/ref-manual/figures/image-generation.png
deleted file mode 100644
index 71a48dc..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/image-generation.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/images.png b/import-layers/yocto-poky/documentation/ref-manual/figures/images.png
deleted file mode 100644
index d99eac1..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/images.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/layer-input.png b/import-layers/yocto-poky/documentation/ref-manual/figures/layer-input.png
deleted file mode 100644
index 0a4f2e7..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/layer-input.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/package-feeds.png b/import-layers/yocto-poky/documentation/ref-manual/figures/package-feeds.png
deleted file mode 100644
index 37c9c32..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/package-feeds.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/patching.png b/import-layers/yocto-poky/documentation/ref-manual/figures/patching.png
deleted file mode 100644
index 8ecd018..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/patching.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/sdk-generation.png b/import-layers/yocto-poky/documentation/ref-manual/figures/sdk-generation.png
deleted file mode 100755
index adbe1f4..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/sdk-generation.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/sdk.png b/import-layers/yocto-poky/documentation/ref-manual/figures/sdk.png
deleted file mode 100644
index 5c36b75..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/sdk.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/source-fetching.png b/import-layers/yocto-poky/documentation/ref-manual/figures/source-fetching.png
deleted file mode 100644
index 26aefb5..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/source-fetching.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/source-input.png b/import-layers/yocto-poky/documentation/ref-manual/figures/source-input.png
deleted file mode 100644
index f751505..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/source-input.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/source-repos.png b/import-layers/yocto-poky/documentation/ref-manual/figures/source-repos.png
deleted file mode 100644
index e9cff16..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/source-repos.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/user-configuration.png b/import-layers/yocto-poky/documentation/ref-manual/figures/user-configuration.png
deleted file mode 100755
index c298401..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/user-configuration.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/yocto-environment-ref.png b/import-layers/yocto-poky/documentation/ref-manual/figures/yocto-environment-ref.png
deleted file mode 100644
index 650c6c8..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/yocto-environment-ref.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/yp-download.png b/import-layers/yocto-poky/documentation/ref-manual/figures/yp-download.png
deleted file mode 100644
index 5770be6..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/figures/yp-download.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/introduction.xml b/import-layers/yocto-poky/documentation/ref-manual/introduction.xml
deleted file mode 100644
index 29ef2d5..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/introduction.xml
+++ /dev/null
@@ -1,1084 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='ref-manual-intro'>
-<title>Introduction</title>
-
-<section id='ref-welcome'>
-    <title>Welcome</title>
-
-    <para>
-        Welcome to the Yocto Project Reference Manual.
-        This manual provides reference information for the current release
-        of the Yocto Project.
-        This manual is best used after you have an understanding
-        of the basics of the Yocto Project.
-        The manual is neither meant to be read as a starting point to the
-        Yocto Project nor read from start to finish.
-        Use this manual to find concepts, variable definitions, class
-        descriptions, and so forth as needed during the course of using
-        the Yocto Project.
-    </para>
-
-    <para>
-        For introductory information on the Yocto Project, see the
-        <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and the
-        "<link linkend='yp-intro'>Introducing the Yocto Project Development Environment</link>"
-        section.
-    </para>
-
-    <para>
-        If you want to use the Yocto Project to test run building an image
-        without having to understand concepts, work through the
-        <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
-        You can find "how-to" information in the
-        <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>.
-        <note><title>Tip</title>
-            For more information about the Yocto Project Documentation set,
-            see the
-            "<link linkend='resources-links-and-related-documentation'>Links and Related Documentation</link>"
-            section.
-        </note>
-    </para>
-</section>
-
-<section id='yp-intro'>
-    <title>Introducing the Yocto Project Development Environment</title>
-
-    <para>
-        The Yocto Project is an open-source collaboration project whose
-        focus is for developers of embedded Linux systems.
-        Among other things, the Yocto Project uses an
-        <link linkend='build-system-term'>OpenEmbedded build system</link>.
-        The build system, which is based on the OpenEmbedded (OE) project and
-        uses the
-        <link linkend='bitbake-term'>BitBake</link> tool, constructs complete
-        Linux images for architectures based on ARM, MIPS, PowerPC, x86 and
-        x86-64.
-        <note>
-            Historically, the OpenEmbedded build system, which is the
-            combination of BitBake and OE components, formed a reference
-            build host that was known as
-            "<link linkend='poky'>Poky</link>" (<emphasis>Pah</emphasis>-kee).
-            The term "Poky", as used throughout the Yocto Project Documentation
-            set, can have different meanings.
-        </note>
-        The Yocto Project provides various ancillary tools for the embedded
-        developer and also features the Sato reference User Interface, which
-        is optimized for stylus-driven, low-resolution screens.
-    </para>
-
-    <mediaobject>
-        <imageobject>
-            <imagedata fileref="figures/YP-flow-diagram.png"
-                format="PNG" align='center' width="8in"/>
-        </imageobject>
-    </mediaobject>
-
-    <para>
-        Here are some highlights for the Yocto Project:
-    </para>
-
-    <itemizedlist>
-        <listitem><para>
-            Provides a recent Linux kernel along with a set of system
-            commands and libraries suitable for the embedded
-            environment.
-            </para></listitem>
-        <listitem><para>
-            Makes available system components such as X11, GTK+, Qt,
-            Clutter, and SDL (among others) so you can create a rich user
-            experience on devices that have display hardware.
-            For devices that do not have a display or where you wish to
-            use alternative UI frameworks, these components need not be
-            installed.
-            </para></listitem>
-        <listitem><para>
-            Creates a focused and stable core compatible with the
-            OpenEmbedded project with which you can easily and reliably
-            build and develop.
-            </para></listitem>
-        <listitem><para>
-            Fully supports a wide range of hardware and device emulation
-            through the Quick EMUlator (QEMU).
-            </para></listitem>
-        <listitem><para>
-            Provides a layer mechanism that allows you to easily extend
-            the system, make customizations, and keep them organized.
-            </para></listitem>
-    </itemizedlist>
-
-    <para>
-        You can use the Yocto Project to generate images for many kinds
-        of devices.
-        As mentioned earlier, the Yocto Project supports creation of
-        reference images that you can boot within and emulate using QEMU.
-        The standard example machines target QEMU full-system
-        emulation for 32-bit and 64-bit variants of x86, ARM, MIPS, and
-        PowerPC architectures.
-        Beyond emulation, you can use the layer mechanism to extend
-        support to just about any platform that Linux can run on and that
-        a toolchain can target.
-    </para>
-
-    <para>
-        Another Yocto Project feature is the Sato reference User
-        Interface.
-        This optional UI that is based on GTK+ is intended for devices with
-        restricted screen sizes and is included as part of the
-        OpenEmbedded Core layer so that developers can test parts of the
-        software stack.
-    </para>
-
-    <para>
-        While the Yocto Project does not provide a strict testing framework,
-        it does provide or generate for you artifacts that let you perform
-        target-level and emulated testing and debugging.
-        Additionally, if you are an
-        <trademark class='trade'>Eclipse</trademark> IDE user, you can
-        install an Eclipse Yocto Plug-in to allow you to develop within that
-        familiar environment.
-    </para>
-
-    <para>
-        By default, using the Yocto Project to build an image creates a Poky
-        distribution.
-        However, you can create your own distribution by providing key
-        <link link='metadata'>Metadata</link>.
-        A good example is Angstrom, which has had a distribution
-        based on the Yocto Project since its inception.
-        Other examples include commercial distributions like
-        <ulink url='https://www.yoctoproject.org/organization/wind-river-systems'>Wind River Linux</ulink>,
-        <ulink url='https://www.yoctoproject.org/organization/mentor-graphics'>Mentor Embedded Linux</ulink>,
-        <ulink url='https://www.yoctoproject.org/organization/enea-ab'>ENEA Linux</ulink>
-        and <ulink url='https://www.yoctoproject.org/ecosystem/member-organizations'>others</ulink>.
-        See the "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-your-own-distribution'>Creating Your Own Distribution</ulink>"
-        section in the Yocto Project Development Tasks Manual for more
-        information.
-    </para>
-</section>
-
-<section id='intro-requirements'>
-<title>System Requirements</title>
-    <para>
-        For general Yocto Project system requirements, see the
-        "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>" section
-        in the Yocto Project Quick Start.
-        The remainder of this section provides details on system requirements
-        not covered in the Yocto Project Quick Start.
-    </para>
-
-    <section id='detailed-supported-distros'>
-        <title>Supported Linux Distributions</title>
-
-        <para>
-            Currently, the Yocto Project is supported on the following
-            distributions:
-            <note>
-                <para>
-                    Yocto Project releases are tested against the stable Linux
-                    distributions in the following list.
-                    The Yocto Project should work on other distributions but
-                    validation is not performed against them.
-                </para>
-
-                <para>
-                    In particular, the Yocto Project does not support
-                    and currently has no plans to support
-                    rolling-releases or development distributions due to their
-                    constantly changing nature.
-                    We welcome patches and bug reports, but keep in mind that
-                    our priority is on the supported platforms listed below.
-                </para>
-
-                <para>
-                    If you encounter problems, please go to
-                    <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
-                    and submit a bug.
-                    We are interested in hearing about your experience.
-                </para>
-            </note>
-            <itemizedlist>
-<!--
-                <listitem><para>Ubuntu 10.04</para></listitem>
-                <listitem><para>Ubuntu 11.10</para></listitem>
-                <listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
-                <listitem><para>Ubuntu 13.10</para></listitem>
-                <listitem><para>Ubuntu 14.04 (LTS)</para></listitem> -->
-                <listitem><para>Ubuntu 14.10</para></listitem>
-                <listitem><para>Ubuntu 15.04</para></listitem>
-                <listitem><para>Ubuntu 15.10</para></listitem>
-                <listitem><para>Ubuntu 16.04 (LTS)</para></listitem>
-<!--                <listitem><para>Fedora 16 (Verne)</para></listitem>
-                <listitem><para>Fedora 17 (Spherical)</para></listitem>
-                <listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
-                <listitem><para>Fedora release 20 (Heisenbug)</para></listitem> -->
-                <listitem><para>Fedora release 22</para></listitem>
-                <listitem><para>Fedora release 23</para></listitem>
-                <listitem><para>Fedora release 24</para></listitem>
-<!--                <listitem><para>CentOS release 5.6 (Final)</para></listitem>
-                <listitem><para>CentOS release 5.7 (Final)</para></listitem>
-                <listitem><para>CentOS release 5.8 (Final)</para></listitem>
-                <listitem><para>CentOS release 6.3 (Final)</para></listitem>
-                <listitem><para>CentOS release 6.x</para></listitem> -->
-                <listitem><para>CentOS release 7.x</para></listitem>
-<!--                <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem>
-                <listitem><para>Debian GNU/Linux 7.x (Wheezy)</para></listitem> -->
-                <listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem>
-                <listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem>
-<!--                <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
-                <listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
-                <listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
-                <listitem><para>Debian GNU/Linux 7.4 (Wheezy)</para></listitem>
-                <listitem><para>Debian GNU/Linux 7.5 (Wheezy)</para></listitem>
-                <listitem><para>Debian GNU/Linux 7.6 (Wheezy)</para></listitem> -->
-<!--                <listitem><para>openSUSE 11.4</para></listitem>
-                <listitem><para>openSUSE 12.1</para></listitem>
-                <listitem><para>openSUSE 12.2</para></listitem>
-                <listitem><para>openSUSE 12.3</para></listitem>
-                <listitem><para>openSUSE 13.1</para></listitem> -->
-                <listitem><para>openSUSE 13.2</para></listitem>
-                <listitem><para>openSUSE 42.1</para></listitem>
-            </itemizedlist>
-        </para>
-
-        <note>
-            While the Yocto Project Team attempts to ensure all Yocto Project
-            releases are one hundred percent compatible with each officially
-            supported Linux distribution, instances might exist where you
-            encounter a problem while using the Yocto Project on a specific
-            distribution.
-        </note>
-    </section>
-
-    <section id='required-packages-for-the-host-development-system'>
-    <title>Required Packages for the Host Development System</title>
-
-        <para>
-            The list of packages you need on the host development system can
-            be large when covering all build scenarios using the Yocto Project.
-            This section provides required packages according to
-            Linux distribution and function.
-        </para>
-
-        <section id='ubuntu-packages'>
-            <title>Ubuntu and Debian</title>
-
-            <para>
-                The following list shows the required packages by function
-                given a supported Ubuntu or Debian Linux distribution:
-                <note>
-                    If your build system has the
-                    <filename>oss4-dev</filename> package installed, you
-                    might experience QEMU build failures due to the package
-                    installing its own custom
-                    <filename>/usr/include/linux/soundcard.h</filename> on
-                    the Debian system.
-                    If you run into this situation, either of the following
-                    solutions exist:
-                    <literallayout class='monospaced'>
-     $ sudo apt-get build-dep qemu
-     $ sudo apt-get remove oss4-dev
-                    </literallayout>
-                 </note>
-                <itemizedlist>
-                    <listitem><para><emphasis>Essentials:</emphasis>
-                        Packages needed to build an image on a headless
-                        system:
-                        <literallayout class='monospaced'>
-     $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
-                        Packages recommended if the host system has graphics
-                        support or if you are going to use the Eclipse
-                        IDE:
-                        <literallayout class='monospaced'>
-     $ sudo apt-get install libsdl1.2-dev xterm
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>Documentation:</emphasis>
-                        Packages needed if you are going to build out the
-                        Yocto Project documentation manuals:
-                        <literallayout class='monospaced'>
-     $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
-                        Packages needed if you are going to run
-                        <filename>oe-selftest</filename>:
-                        <literallayout class='monospaced'>
-     $ sudo apt-get install python-git
-                        </literallayout>
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='fedora-packages'>
-            <title>Fedora Packages</title>
-
-            <para>
-                The following list shows the required packages by function
-                given a supported Fedora Linux distribution:
-                <itemizedlist>
-                    <listitem><para><emphasis>Essentials:</emphasis>
-                        Packages needed to build an image for a headless
-                        system:
-                        <literallayout class='monospaced'>
-     $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
-                        Packages recommended if the host system has graphics
-                        support or if you are going to use the Eclipse
-                        IDE:
-                        <literallayout class='monospaced'>
-     $ sudo dnf install SDL-devel xterm
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>Documentation:</emphasis>
-                        Packages needed if you are going to build out the
-                        Yocto Project documentation manuals:
-                        <literallayout class='monospaced'>
-     $ sudo dnf install make docbook-style-dsssl docbook-style-xsl \
-     docbook-dtds docbook-utils fop libxslt dblatex xmlto
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
-                        Packages needed if you are going to run
-                        <filename>oe-selftest</filename>:
-                        <literallayout class='monospaced'>
-     $ sudo dnf install python3-GitPython
-                        </literallayout>
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='opensuse-packages'>
-            <title>openSUSE Packages</title>
-
-            <para>
-                The following list shows the required packages by function
-                given a supported openSUSE Linux distribution:
-                <itemizedlist>
-                    <listitem><para><emphasis>Essentials:</emphasis>
-                        Packages needed to build an image for a headless
-                        system:
-                        <literallayout class='monospaced'>
-     $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
-                        Packages recommended if the host system has graphics
-                        support or if you are going to use the Eclipse
-                        IDE:
-                        <literallayout class='monospaced'>
-     $ sudo zypper install libSDL-devel xterm
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>Documentation:</emphasis>
-                        Packages needed if you are going to build out the
-                        Yocto Project documentation manuals:
-                        <literallayout class='monospaced'>
-     $ sudo zypper install make dblatex xmlto
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
-                        Packages needed if you are going to run
-                        <filename>oe-selftest</filename>:
-                        <literallayout class='monospaced'>
-     $ sudo zypper install python-GitPython
-                        </literallayout></para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='centos-packages'>
-            <title>CentOS Packages</title>
-
-            <para>
-                The following list shows the required packages by function
-                given a supported CentOS Linux distribution:
-                <itemizedlist>
-                    <listitem><para><emphasis>Essentials:</emphasis>
-                        Packages needed to build an image for a headless
-                        system:
-                        <literallayout class='monospaced'>
-     $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
-                        </literallayout>
-                        <note><title>Notes</title>
-                            <itemizedlist>
-                                <listitem><para>
-                                    Extra Packages for Enterprise Linux
-                                    (i.e. <filename>epel-release</filename>)
-                                    is a collection of packages from Fedora
-                                    built on RHEL/CentOS for easy installation
-                                    of packages not included in enterprise
-                                    Linux by default.
-                                    You need to install these packages
-                                    separately.
-                                    </para></listitem>
-                                <listitem><para>
-                                    The <filename>makecache</filename> command
-                                    consumes additional Metadata from
-                                    <filename>epel-release</filename>.
-                                    </para></listitem>
-                            </itemizedlist>
-                        </note>
-                        </para></listitem>
-                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
-                        Packages recommended if the host system has graphics
-                        support or if you are going to use the Eclipse
-                        IDE:
-                        <literallayout class='monospaced'>
-     $ sudo yum install SDL-devel xterm
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>Documentation:</emphasis>
-                        Packages needed if you are going to build out the
-                        Yocto Project documentation manuals:
-                        <literallayout class='monospaced'>
-     $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
-     docbook-dtds docbook-utils fop libxslt dblatex xmlto
-                        </literallayout></para></listitem>
-                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
-                        Packages needed if you are going to run
-                        <filename>oe-selftest</filename>:
-                        <literallayout class='monospaced'>
-     $ sudo yum install GitPython
-                        </literallayout>
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-    </section>
-
-    <section id='required-git-tar-and-python-versions'>
-        <title>Required Git, tar, and Python Versions</title>
-
-        <para>
-            In order to use the build system, your host development system
-            must meet the following version requirements for Git, tar, and
-            Python:
-            <itemizedlist>
-                <listitem><para>Git 1.8.3.1 or greater</para></listitem>
-                <listitem><para>tar 1.27 or greater</para></listitem>
-                <listitem><para>Python 3.4.0 or greater</para></listitem>
-            </itemizedlist>
-        </para>
-
-        <para>
-            If your host development system does not meet all these requirements,
-            you can resolve this by installing a <filename>buildtools</filename>
-            tarball that contains these tools.
-            You can get the tarball one of two ways: download a pre-built
-            tarball or use BitBake to build the tarball.
-        </para>
-
-        <section id='downloading-a-pre-built-buildtools-tarball'>
-            <title>Downloading a Pre-Built <filename>buildtools</filename> Tarball</title>
-
-            <para>
-                Downloading and running a pre-built buildtools installer is
-                the easiest of the two methods by which you can get these tools:
-                <orderedlist>
-                    <listitem><para>
-                        Locate and download the <filename>*.sh</filename> at
-                        <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/buildtools/'></ulink>.
-                        </para></listitem>
-                    <listitem><para>
-                        Execute the installation script.
-                        Here is an example:
-                        <literallayout class='monospaced'>
-     $ sh poky-glibc-x86_64-buildtools-tarball-x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
-                        </literallayout>
-                        During execution, a prompt appears that allows you to
-                        choose the installation directory.
-                        For example, you could choose the following:
-                        <literallayout class='monospaced'>
-     /home/<replaceable>your-username</replaceable>/buildtools
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Source the tools environment setup script by using a
-                        command like the following:
-                        <literallayout class='monospaced'>
-     $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-i586-poky-linux
-                        </literallayout>
-                        Of course, you need to supply your installation directory and be
-                        sure to use the right file (i.e. i585 or x86-64).
-                        </para>
-                        <para>
-                        After you have sourced the setup script,
-                        the tools are added to <filename>PATH</filename>
-                        and any other environment variables required to run the
-                        tools are initialized.
-                        The results are working versions versions of Git, tar,
-                        Python and <filename>chrpath</filename>.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='building-your-own-buildtools-tarball'>
-            <title>Building Your Own <filename>buildtools</filename> Tarball</title>
-
-            <para>
-                Building and running your own buildtools installer applies
-                only when you have a build host that can already run BitBake.
-                In this case, you use that machine to build the
-                <filename>.sh</filename> file and then
-                take steps to transfer and run it on a
-                machine that does not meet the minimal Git, tar, and Python
-                requirements.
-            </para>
-
-            <para>
-                Here are the steps to take to build and run your own
-                buildtools installer:
-                <orderedlist>
-                    <listitem><para>
-                        On the machine that is able to run BitBake,
-                        be sure you have set up your build environment with
-                        the setup script
-                        (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
-                        </para></listitem>
-                    <listitem><para>
-                        Run the BitBake command to build the tarball:
-                        <literallayout class='monospaced'>
-     $ bitbake buildtools-tarball
-                        </literallayout>
-                        <note>
-                        The
-                        <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
-                        variable in your <filename>local.conf</filename> file
-                        determines whether you build tools for a 32-bit
-                        or 64-bit system.
-                       </note>
-                       Once the build completes, you can find the
-                       <filename>.sh</filename> file that installs
-                       the tools in the <filename>tmp/deploy/sdk</filename>
-                       subdirectory of the
-                       <link linkend='build-directory'>Build Directory</link>.
-                       The installer file has the string "buildtools"
-                       in the name.
-                       </para></listitem>
-                   <listitem><para>
-                       Transfer the <filename>.sh</filename> file from the
-                       build host to the machine that does not meet the
-                       Git, tar, or Python requirements.
-                       </para></listitem>
-                   <listitem><para>
-                       On the machine that does not meet the requirements,
-                       run the <filename>.sh</filename> file
-                       to install the tools.
-                       Here is an example:
-                       <literallayout class='monospaced'>
-     $ sh poky-glibc-x86_64-buildtools-tarball-x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
-                       </literallayout>
-                       During execution, a prompt appears that allows you to
-                       choose the installation directory.
-                       For example, you could choose the following:
-                       <literallayout class='monospaced'>
-     /home/<replaceable>your_username</replaceable>/buildtools
-                       </literallayout>
-                       </para></listitem>
-                    <listitem><para>
-                        Source the tools environment setup script by using a
-                        command like the following:
-                        <literallayout class='monospaced'>
-     $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-i586-poky-linux
-                        </literallayout>
-                        Of course, you need to supply your installation directory and be
-                        sure to use the right file (i.e. i585 or x86-64).
-                        </para>
-                        <para>
-                        After you have sourced the setup script,
-                        the tools are added to <filename>PATH</filename>
-                        and any other environment variables required to run the
-                        tools are initialized.
-                        The results are working versions versions of Git, tar,
-                        Python and <filename>chrpath</filename>.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-    </section>
-</section>
-
-<section id='intro-getit'>
-    <title>Obtaining the Yocto Project</title>
-    <para>
-        The Yocto Project development team makes the Yocto Project available through a number
-        of methods:
-        <itemizedlist>
-            <listitem><para><emphasis>Source Repositories:</emphasis>
-                Working from a copy of the upstream
-                <filename>poky</filename> repository is the
-                preferred method for obtaining and using a Yocto Project
-                release.
-                You can view the Yocto Project Source Repositories at
-                <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
-                In particular, you can find the
-                <filename>poky</filename> repository at
-                <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/'></ulink>.
-                </para></listitem>
-            <listitem><para><emphasis>Releases:</emphasis> Stable, tested
-                releases are available as tarballs through
-                <ulink url='&YOCTO_DL_URL;/releases/yocto/'/>.</para></listitem>
-            <listitem><para><emphasis>Nightly Builds:</emphasis> These
-                tarball releases are available at
-                <ulink url='&YOCTO_AB_NIGHTLY_URL;'/>.
-                These builds include Yocto Project releases, SDK installation
-                scripts, and experimental builds.
-                </para></listitem>
-            <listitem><para><emphasis>Yocto Project Website:</emphasis> You can
-                find tarball releases of the Yocto Project and supported BSPs
-                at the
-                <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
-                Along with these downloads, you can find lots of other
-                information at this site.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-</section>
-
-<section id='intro-getit-dev'>
-    <title>Development Checkouts</title>
-    <para>
-        Development using the Yocto Project requires a local
-        <link linkend='source-directory'>Source Directory</link>.
-        You can set up the Source Directory by cloning a copy of the upstream
-        <link linkend='poky'>poky</link> Git repository.
-        For information on how to do this, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
-        section in the Yocto Project Development Tasks Manual.
-    </para>
-</section>
-
-<section id='yocto-project-terms'>
-    <title>Yocto Project Terms</title>
-
-    <para>
-        Following is a list of terms and definitions users new to the Yocto
-        Project development environment might find helpful.
-        While some of these terms are universal, the list includes them
-        just in case:
-        <itemizedlist>
-            <listitem><para>
-                <emphasis>Append Files:</emphasis>
-                Files that append build information to a recipe file.
-                Append files are known as BitBake append files and
-                <filename>.bbappend</filename> files.
-                The OpenEmbedded build system expects every append file to have
-                a corresponding recipe (<filename>.bb</filename>) file.
-                Furthermore, the append file and corresponding recipe file
-                must use the same root filename.
-                The filenames can differ only in the file type suffix used
-                (e.g.
-                <filename>formfactor_0.0.bb</filename> and
-                <filename>formfactor_0.0.bbappend</filename>).</para>
-
-                <para>Information in append files extends or overrides the
-                information in the similarly-named recipe file.
-                For an example of an append file in use, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
-                section in the Yocto Project Development Tasks Manual.
-                <note>
-                    Append files can also use wildcard patterns in their
-                    version numbers so they can be applied to more than one
-                    version of the underlying recipe file.
-                </note>
-                </para></listitem>
-            <listitem><para id='bitbake-term'>
-                <emphasis>BitBake:</emphasis>
-                The task executor and scheduler used by the OpenEmbedded build
-                system to build images.
-                For more information on BitBake, see the
-                <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
-                </para></listitem>
-            <listitem><para id='board-support-package-bsp-term'>
-                <emphasis>Board Support Package (BSP):</emphasis>
-                A group of drivers, definitions, and other components that
-                provide support for a specific hardware configuration.
-                For more information on BSPs, see the
-                <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
-                </para></listitem>
-            <listitem>
-                <para id='build-directory'>
-                <emphasis>Build Directory:</emphasis>
-                This term refers to the area used by the OpenEmbedded build
-                system for builds.
-                The area is created when you <filename>source</filename> the
-                setup environment script that is found in the Source Directory
-                (i.e. <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
-                The
-                <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link>
-                variable points to the Build Directory.</para>
-
-                <para>You have a lot of flexibility when creating the Build
-                Directory.
-                Following are some examples that show how to create the
-                directory.
-                The examples assume your
-                <link linkend='source-directory'>Source Directory</link> is
-                named <filename>poky</filename>:
-                <itemizedlist>
-                    <listitem><para>Create the Build Directory inside your
-                        Source Directory and let the name of the Build
-                        Directory default to <filename>build</filename>:
-                        <literallayout class='monospaced'>
-     $ cd $HOME/poky
-     $ source &OE_INIT_FILE;
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>Create the Build Directory inside your
-                        home directory and specifically name it
-                        <filename>test-builds</filename>:
-                        <literallayout class='monospaced'>
-     $ cd $HOME
-     $ source poky/&OE_INIT_FILE; test-builds
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Provide a directory path and specifically name the
-                        Build Directory.
-                        Any intermediate folders in the pathname must exist.
-                        This next example creates a Build Directory named
-                        <filename>YP-&POKYVERSION;</filename>
-                        in your home directory within the existing
-                        directory <filename>mybuilds</filename>:
-                        <literallayout class='monospaced'>
-     $cd $HOME
-     $ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
-                        </literallayout>
-                        </para></listitem>
-                </itemizedlist>
-                <note>
-                    By default, the Build Directory contains
-                    <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
-                    which is a temporary directory the build system uses for
-                    its work.
-                    <filename>TMPDIR</filename> cannot be under NFS.
-                    Thus, by default, the Build Directory cannot be under NFS.
-                    However, if you need the Build Directory to be under NFS,
-                    you can set this up by setting <filename>TMPDIR</filename>
-                    in your <filename>local.conf</filename> file
-                    to use a local drive.
-                    Doing so effectively separates <filename>TMPDIR</filename>
-                    from <filename>TOPDIR</filename>, which is the Build
-                    Directory.
-                </note>
-                </para></listitem>
-            <listitem><para id='hardware-build-system-term'>
-                <emphasis>Build System:</emphasis>
-                The system used to build images in a Yocto Project
-                Development environment.
-                The build system is sometimes referred to as the
-                development host.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Classes:</emphasis>
-                Files that provide for logic encapsulation and inheritance so
-                that commonly used patterns can be defined once and then
-                easily used in multiple recipes.
-                For reference information on the Yocto Project classes, see the
-                "<link linkend='ref-classes'>Classes</link>" chapter.
-                Class files end with the <filename>.bbclass</filename>
-                filename extension.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Configuration File:</emphasis>
-                Configuration information in various <filename>.conf</filename>
-                files provides global definitions of variables.
-                The <filename>conf/local.conf</filename> configuration file in
-                the
-                <link linkend='build-directory'>Build Directory</link>
-                contains user-defined variables that affect every build.
-                The <filename>meta-poky/conf/distro/poky.conf</filename>
-                configuration file defines Yocto "distro" configuration
-                variables used only when building with this policy.
-                Machine configuration files, which
-                are located throughout the
-                <link linkend='source-directory'>Source Directory</link>, define
-                variables for specific hardware and are only used when building
-                for that target (e.g. the
-                <filename>machine/beaglebone.conf</filename> configuration
-                file defines variables for the Texas Instruments ARM Cortex-A8
-                development board).
-                Configuration files end with a <filename>.conf</filename>
-                filename extension.
-                </para></listitem>
-            <listitem><para id='cross-development-toolchain'>
-                <emphasis>Cross-Development Toolchain:</emphasis>
-                In general, a cross-development toolchain is a collection of
-                software development tools and utilities that run on one
-                architecture and allow you to develop software for a
-                different, or targeted, architecture.
-                These toolchains contain cross-compilers, linkers, and
-                debuggers that are specific to the target architecture.</para>
-
-                <para>The Yocto Project supports two different cross-development
-                toolchains:
-                <itemizedlist>
-                    <listitem><para>
-                        A toolchain only used by and within
-                        BitBake when building an image for a target
-                        architecture.
-                        </para></listitem>
-                    <listitem><para>A relocatable toolchain used outside of
-                        BitBake by developers when developing applications
-                        that will run on a targeted device.
-                        </para></listitem>
-                </itemizedlist></para>
-
-                <para>Creation of these toolchains is simple and automated.
-                For information on toolchain concepts as they apply to the
-                Yocto Project, see the
-                "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-                section.
-                You can also find more information on using the
-                relocatable toolchain in the
-                <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
-                manual.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Image:</emphasis>
-                An image is an artifact of the BitBake build process given
-                a collection of recipes and related Metadata.
-                Images are the binary output that run on specific hardware or
-                QEMU and are used for specific use-cases.
-                For a list of the supported image types that the Yocto Project
-                provides, see the
-                "<link linkend='ref-images'>Images</link>"
-                chapter.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Layer:</emphasis>
-                A collection of recipes representing the core,
-                a BSP, or an application stack.
-                For a discussion specifically on BSP Layers, see the
-                "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
-                section in the Yocto Project Board Support Packages (BSP)
-                Developer's Guide.
-                </para></listitem>
-            <listitem><para id='metadata'>
-                <emphasis>Metadata:</emphasis>
-                The files that BitBake parses when building an image.
-                In general, Metadata includes recipes, classes, and
-                configuration files.
-                In the context of the kernel ("kernel Metadata"), the
-                term refers to the kernel config fragments and features
-                contained in the
-                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache'><filename>yocto-kernel-cache</filename></ulink>
-                Git repository.
-                </para></listitem>
-            <listitem><para id='oe-core'>
-                <emphasis>OE-Core:</emphasis>
-                A core set of Metadata originating with OpenEmbedded (OE)
-                that is shared between OE and the Yocto Project.
-                This Metadata is found in the <filename>meta</filename>
-                directory of the
-                <link linkend='source-directory'>Source Directory</link>.
-                </para></listitem>
-            <listitem><para id='build-system-term'>
-                <emphasis>OpenEmbedded Build System:</emphasis>
-                The build system specific to the Yocto Project.
-                The OpenEmbedded build system is based on another project known
-                as "Poky", which uses
-                <link linkend='bitbake-term'>BitBake</link> as the task
-                executor.
-                Throughout the Yocto Project documentation set, the
-                OpenEmbedded build system is sometimes referred to simply
-                as "the build system".
-                If other build systems, such as a host or target build system
-                are referenced, the documentation clearly states the
-                difference.
-                <note>
-                    For some historical information about Poky, see the
-                    <link linkend='poky'>Poky</link> term.
-                </note>
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Package:</emphasis>
-                In the context of the Yocto Project, this term refers to a
-                recipe's packaged output produced by BitBake (i.e. a
-                "baked recipe").
-                A package is generally the compiled binaries produced from the
-                recipe's sources.
-                You "bake" something by running it through BitBake.</para>
-
-                <para>It is worth noting that the term "package" can,
-                in general, have subtle meanings.
-                For example, the packages referred to in the
-                "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>"
-                section in the Yocto Project Quick Start are compiled binaries
-                that, when installed, add functionality to your Linux
-                distribution.</para>
-
-                <para>Another point worth noting is that historically within
-                the Yocto Project, recipes were referred to as packages - thus,
-                the existence of several BitBake variables that are seemingly
-                mis-named,
-                (e.g. <link linkend='var-PR'><filename>PR</filename></link>,
-                <link linkend='var-PV'><filename>PV</filename></link>, and
-                <link linkend='var-PE'><filename>PE</filename></link>).
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Package Groups:</emphasis>
-                Arbitrary groups of software Recipes.
-                You use package groups to hold recipes that, when built,
-                usually accomplish a single task.
-                For example, a package group could contain the recipes for a
-                company’s proprietary or value-add software.
-                Or, the package group could contain the recipes that enable
-                graphics.
-                A package group is really just another recipe.
-                Because package group files are recipes, they end with the
-                <filename>.bb</filename> filename extension.
-                </para></listitem>
-            <listitem><para id='poky'>
-                <emphasis>Poky:</emphasis>
-                The term "poky", which is pronounced
-                <emphasis>Pah</emphasis>-kee, can mean several things:
-                <itemizedlist>
-                    <listitem><para>
-                        In its most general sense, poky is an open-source
-                        project that was initially developed by OpenedHand.
-                        OpenedHand developed poky off of the existing
-                        OpenEmbedded build system to create a commercially
-                        supportable build system for embedded Linux.
-                        After Intel Corporation acquired OpenedHand, the
-                        poky project became the basis for the Yocto Project's
-                        build system.
-                        </para></listitem>
-                    <listitem><para>
-                        Within the Yocto Project
-                        <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>,
-                        "poky" exists as a separate Git
-                        repository from which you can clone to yield a local
-                        Git repository that is a copy on your host system.
-                        Thus, "poky" can refer to the upstream or
-                        local copy of the files used for development within
-                        the Yocto Project.
-                        </para></listitem>
-                    <listitem><para>
-                        Finally, "poky" can refer to the default
-                        <link linkend='var-DISTRO'><filename>DISTRO</filename></link>
-                        (i.e. distribution) created when you use the Yocto
-                        Project in conjunction with the
-                        <filename>poky</filename> repository to build an image.
-                        </para></listitem>
-                </itemizedlist>
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Recipe:</emphasis>
-                A set of instructions for building packages.
-                A recipe describes where you get source code, which patches
-                to apply, how to configure the source, how to compile it and so on.
-                Recipes also describe dependencies for libraries or for other
-                recipes.
-                Recipes represent the logical unit of execution, the software
-                to build, the images to build, and use the
-                <filename>.bb</filename> file extension.
-                </para></listitem>
-            <listitem><para id='reference-kit-term'>
-                <emphasis>Reference Kit:</emphasis>
-                A working example of a system, which includes a
-                <link linkend='board-support-package-bsp-term'>BSP</link>
-                as well as a
-                <link linkend='hardware-build-system-term'>build system</link>
-                and other components, that can work on specific hardware.
-                </para></listitem>
-            <listitem>
-                <para id='source-directory'>
-                <emphasis>Source Directory:</emphasis>
-                This term refers to the directory structure created as a result
-                of creating a local copy of the <filename>poky</filename> Git
-                repository <filename>git://git.yoctoproject.org/poky</filename>
-                or expanding a released <filename>poky</filename> tarball.
-                <note>
-                    Creating a local copy of the <filename>poky</filename>
-                    Git repository is the recommended method for setting up
-                    your Source Directory.
-                </note>
-                Sometimes you might hear the term "poky directory" used to refer
-                to this directory structure.
-                <note>
-                    The OpenEmbedded build system does not support file or
-                    directory names that contain spaces.
-                    Be sure that the Source Directory you use does not contain
-                    these types of names.
-                </note></para>
-
-                <para>The Source Directory contains BitBake, Documentation,
-                Metadata and other files that all support the Yocto Project.
-                Consequently, you must have the Source Directory in place on
-                your development system in order to do any development using
-                the Yocto Project.</para>
-
-                <para>When you create a local copy of the Git repository, you
-                can name the repository anything you like.
-                Throughout much of the documentation, "poky"
-                is used as the name of the top-level folder of the local copy of
-                the poky Git repository.
-                So, for example, cloning the <filename>poky</filename> Git
-                repository results in a local Git repository whose top-level
-                folder is also named "poky".</para>
-
-                <para>While it is not recommended that you use tarball expansion
-                to set up the Source Directory, if you do, the top-level
-                directory name of the Source Directory is derived from the
-                Yocto Project release tarball.
-                For example, downloading and unpacking
-                <filename>&YOCTO_POKY_TARBALL;</filename> results in a
-                Source Directory whose root folder is named
-                <filename>&YOCTO_POKY;</filename>.</para>
-
-                <para>It is important to understand the differences between the
-                Source Directory created by unpacking a released tarball as
-                compared to cloning
-                <filename>git://git.yoctoproject.org/poky</filename>.
-                When you unpack a tarball, you have an exact copy of the files
-                based on the time of release - a fixed release point.
-                Any changes you make to your local files in the Source Directory
-                are on top of the release and will remain local only.
-                On the other hand, when you clone the <filename>poky</filename>
-                Git repository, you have an active development repository with
-                access to the upstream repository's branches and tags.
-                In this case, any local changes you make to the local
-                Source Directory can be later applied to active development
-                branches of the upstream <filename>poky</filename> Git
-                repository.</para>
-
-                <para>For more information on concepts related to Git
-                repositories, branches, and tags, see the
-                "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>"
-                section.
-                </para></listitem>
-            <listitem><para><emphasis>Task:</emphasis>
-                A unit of execution for BitBake (e.g.
-                <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
-                <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>,
-                <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>,
-                and so forth).
-                </para></listitem>
-            <listitem><para id='toaster-term'><emphasis>Toaster:</emphasis>
-                A web interface to the Yocto Project's
-                <link linkend='build-system-term'>OpenEmbedded Build System</link>.
-                The interface enables you to configure and run your builds.
-                Information about builds is collected and stored in a database.
-                For information on Toaster, see the
-                <ulink url='&YOCTO_DOCS_TOAST_URL;'>Yocto Project Toaster Manual</ulink>.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Upstream:</emphasis>
-                A reference to source code or repositories
-                that are not local to the development system but located in a
-                master area that is controlled by the maintainer of the source
-                code.
-                For example, in order for a developer to work on a particular
-                piece of code, they need to first get a copy of it from an
-                "upstream" source.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-</section>
-
-</chapter>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/documentation/ref-manual/migration.xml b/import-layers/yocto-poky/documentation/ref-manual/migration.xml
index 811577b..b060968 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/migration.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/migration.xml
@@ -293,7 +293,7 @@
                 For the remainder, you can now find them in the
                 <filename>meta-extras</filename> repository, which is in the
                 Yocto Project
-                <link linkend='source-repositories'>Source Repositories</link>.
+                <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>.
             </para>
         </section>
     </section>
@@ -442,7 +442,7 @@
             at <filename>meta/recipes-core/init-ifupdown</filename>.
             For information on how to use append files, see the
             "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
-            in the Yocto Project Development Tasks Manual.
+            section in the Yocto Project Development Tasks Manual.
         </para>
     </section>
 
@@ -866,10 +866,8 @@
             <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
             <itemizedlist>
                 <listitem><para>
-                    The value of
-                    <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
-                    is now validated to ensure invalid feature items are not
-                    added.
+                    The value of <filename>IMAGE_FEATURES</filename> is now
+                    validated to ensure invalid feature items are not added.
                     Some users mistakenly add package names to this variable
                     instead of using
                     <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
@@ -1022,8 +1020,8 @@
                     </para></listitem>
             </itemizedlist>
             For more information on Build History, see the
-            "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
+            section in the Yocto Project Development Tasks Manual.
         </para>
     </section>
 
@@ -1116,8 +1114,8 @@
                     supports pre-renamed package names.</para></listitem>
                 <listitem><para>
                     <filename>classes/rootfs_rpm</filename>: Implement
-                    <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
-                    for RPM.</para></listitem>
+                    <filename>BAD_RECOMMENDATIONS</filename> for RPM.
+                    </para></listitem>
                 <listitem><para>
                     <filename>systemd</filename>: Remove
                     <filename>systemd_unitdir</filename> if
@@ -1452,7 +1450,7 @@
         <para>
             Package Tests (ptest) are built but not installed by default.
             For information on using Package Tests, see the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Setting up and running package test (ptest)</ulink>"
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages with ptest</ulink>"
             section in the Yocto Project Development Tasks Manual.
             For information on the <filename>ptest</filename> class, see the
             "<link linkend='ref-classes-ptest'><filename>ptest.bbclass</filename></link>"
@@ -1748,8 +1746,8 @@
 
         <para>
             The minimum
-            <link linkend='git'>Git</link> version required
-            on the build host is now 1.7.8 because the
+            <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> version
+            required on the build host is now 1.7.8 because the
             <filename>--list</filename> option is now required by
             BitBake's Git fetcher.
             As always, if your host distribution does not provide a version of
@@ -1909,14 +1907,6 @@
             for which <filename>module_conf_*</filename> is specified to
             <filename>KERNEL_MODULE_PROBECONF</filename>.
         </para>
-
-        <para>
-            For more information, see the
-            <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
-            and
-            <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
-            variables.
-        </para>
     </section>
 
     <section id='migration-1.7-qa-check-changes'>
@@ -2026,8 +2016,8 @@
                     You should manually remove old "build-id" files from your
                     existing build history repositories to avoid confusion.
                     For information on the build history feature, see the
-                    "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                     </para></listitem>
             </itemizedlist>
         </para>
@@ -3037,7 +3027,7 @@
                     actively maintained.
                     See the
                     "<ulink url='&YOCTO_DOCS_TOAST_URL;#using-the-toaster-web-interface'>Using the Toaster Web Interface</ulink>"
-                    section in the Yocto Project Toaster User Manual for more
+                    section in the Toaster User Manual for more
                     information on this interface.
                     </para></listitem>
                 <listitem><para><emphasis>"puccho" BitBake UI</emphasis>:
@@ -3057,7 +3047,8 @@
             and the
             <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>extensible SDK</ulink>.
             For information on these SDKs and how to build and use them, see the
-            <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+            <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+            manual.
             <note>
                 The Yocto Project Eclipse IDE Plug-in is still supported and
                 is not affected by this change.
@@ -4038,7 +4029,7 @@
                     <para>For an example, see the
                     <filename>pixbufcache</filename> class in
                     <filename>meta/classes/</filename> in the Yocto Project
-                    <link linkend='source-repositories'>Source Repositories</link>.
+                    <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>.
                     <note>
                         The <filename>SSTATEPOSTINSTFUNCS</filename> variable
                         itself is now deprecated in favor of the
@@ -4251,8 +4242,8 @@
 
                     <para>See the
                     "<ulink url='&YOCTO_DOCS_BB_URL;#svn-fetcher'>Subversion (SVN) Fetcher (svn://)</ulink>"
-                    section in the Yocto Project BitBake User Manual for
-                    additional information.
+                    section in the BitBake User Manual for additional
+                    information.
                     </para></listitem>
                 <listitem><para>
                     <emphasis><filename>BB_SETSCENE_VERIFY_FUNCTION</filename>
@@ -4625,8 +4616,7 @@
                 <listitem><para>
                     The <filename>USE_LDCONFIG</filename> variable has been
                     replaced with the "ldconfig"
-                    <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
-                    feature.
+                    <filename>DISTRO_FEATURES</filename> feature.
                     Distributions that previously set:
                     <literallayout class='monospaced'>
      USE_LDCONFIG = "0"
@@ -4685,9 +4675,9 @@
                     </para></listitem>
                 <listitem><para>
                     All native and nativesdk recipes now use a separate
-                    <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
-                    value instead of sharing the value used by recipes for the
-                    target, in order to avoid unnecessary rebuilds.</para>
+                    <filename>DISTRO_FEATURES</filename> value instead of
+                    sharing the value used by recipes for the target, in order
+                    to avoid unnecessary rebuilds.</para>
 
                     <para>The <filename>DISTRO_FEATURES</filename> for
                     <filename>native</filename> recipes is
@@ -4738,9 +4728,9 @@
             replacing its previous "memory resident mode" (i.e.
             <filename>oe-init-build-env-memres</filename>).
             Now you only need to set
-            <filename>BB_SERVER_TIMEOUT</filename> to a timeout
-            (in seconds) and BitBake's server stays resident for that
-            amount of time between invocations.
+            <link linkend='var-BB_SERVER_TIMEOUT'><filename>BB_SERVER_TIMEOUT</filename></link>
+            to a timeout (in seconds) and BitBake's server stays resident for
+            that amount of time between invocations.
             The <filename>oe-init-build-env-memres</filename> script has been
             removed since a separate environment setup script is no longer
             needed.
@@ -4805,7 +4795,7 @@
                             <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
                             on the <filename>util-linux-su</filename> package
                             when "pam" is in
-                            <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
+                            <filename>DISTRO_FEATURES</filename>.
                             </para></listitem>
                         <listitem><para>
                             The <filename>switch_root</filename> program is now
@@ -4824,7 +4814,7 @@
                             packaged in a separate "util-linux-ionice" package.
                             The main <filename>util-linux</filename> package has
                             a recommended runtime dependency (i.e.
-                            <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
+                            <filename>RRECOMMENDS</filename>)
                             on the <filename>util-linux-ionice</filename> package.
                             </para></listitem>
                     </itemizedlist>
@@ -4839,18 +4829,15 @@
                     The change also eliminates needing to pull in the entire
                     <filename>initscripts</filename> package.
                     The main <filename>initscripts</filename> package has a
-                    runtime dependency (i.e.
-                    <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
+                    runtime dependency (i.e. <filename>RDEPENDS</filename>)
                     on the <filename>sushell</filename> package when
-                    "selinux" is in
-                    <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
+                    "selinux" is in <filename>DISTRO_FEATURES</filename>.
                     </para></listitem>
                 <listitem><para>
                     <emphasis><filename>glib-2.0</filename>:</emphasis>
                     The <filename>glib-2.0</filename> package now has a
                     recommended runtime dependency (i.e.
-                    <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
-                    on the
+                    <filename>RRECOMMENDS</filename>) on the
                     <filename>shared-mime-info</filename> package, since large
                     portions of GIO are not useful without the MIME database.
                     You can remove the dependency by using the
@@ -5045,7 +5032,8 @@
             Kernel Device Tree support is now easier to enable in a kernel
             recipe.
             The Device Tree code has moved to a
-            <filename>kernel-devicetree</filename> class.
+            <link linkend='ref-classes-kernel-devicetree'><filename>kernel-devicetree</filename></link>
+            class.
             Functionality is automatically enabled for any recipe that inherits
             the
             <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
@@ -5177,13 +5165,14 @@
                     multiconfig is enabled (one per configuration).
                     For more information, see the
                     "<ulink url='&YOCTO_DOCS_BB_URL;#events'>Events</ulink>"
-                    in the BitBake User Manual.
+                    section in the BitBake User Manual.
                     </para></listitem>
                 <listitem><para>
                     By default, the <filename>security_flags.inc</filename> file
-                    sets a <filename>GCCPIE</filename> variable with an option
-                    to enable Position Independent Executables (PIE) within
-                    <filename>gcc</filename>.
+                    sets a
+                    <link linkend='var-GCCPIE'><filename>GCCPIE</filename></link>
+                    variable with an option to enable Position Independent
+                    Executables (PIE) within <filename>gcc</filename>.
                     Enabling PIE in the GNU C Compiler (GCC), makes Return
                     Oriented Programming (ROP) attacks much more difficult to
                     execute.
@@ -5238,6 +5227,457 @@
         </para>
     </section>
 </section>
+
+<section id='moving-to-the-yocto-project-2.5-release'>
+    <title>Moving to the Yocto Project 2.5 Release</title>
+
+    <para>
+        This section provides migration information for moving to the
+        Yocto Project 2.5 Release from the prior release.
+    </para>
+
+    <section id='migration-2.5-packaging-changes'>
+        <title>Packaging Changes</title>
+
+        <para>
+            This section provides information about packaging changes that have
+            occurred:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis><filename>bind-libs</filename>:</emphasis>
+                    The libraries packaged by the bind recipe are in a
+                    separate <filename>bind-libs</filename> package.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>libfm-gtk</filename>:</emphasis>
+                    The <filename>libfm</filename> GTK+ bindings are split into
+                    a separate <filename>libfm-gtk</filename> package.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>flex-libfl</filename>:</emphasis>
+                    The flex recipe splits out libfl into a separate
+                    <filename>flex-libfl</filename> package to avoid too many
+                    dependencies being pulled in where only the library is
+                    needed.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>grub-efi</filename>:</emphasis>
+                    The <filename>grub-efi</filename> configuration is split
+                    into a separate <filename>grub-bootconf</filename>
+                    recipe.
+                    However, the dependency relationship from
+                    <filename>grub-efi</filename> is through a
+                    virtual/grub-bootconf provider making it possible to have
+                    your own recipe provide the dependency.
+                    Alternatively, you can use a BitBake append file to bring
+                    the configuration back into the
+                    <filename>grub-efi</filename> recipe.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>armv7a Legacy Package Feed Support:</emphasis>
+                    Legacy support is removed for transitioning from
+                    <filename>armv7a</filename> to
+                    <filename>armv7a-vfp-neon</filename> in package feeds,
+                    which was previously enabled by setting
+                    <filename>PKGARCHCOMPAT_ARMV7A</filename>.
+                    This transition occurred in 2011 and active package feeds
+                    should by now be updated to the new naming.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.5-removed-recipes'>
+        <title>Removed Recipes</title>
+
+        <para>
+            The following recipes have been removed:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis><filename>gcc</filename>:</emphasis>
+                    The version 6.4 recipes are replaced by 7.x.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>gst-player</filename>:</emphasis>
+                    Renamed to <filename>gst-examples</filename> as per
+                    upstream.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>hostap-utils</filename>:</emphasis>
+                    This software package is obsolete.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>latencytop</filename>:</emphasis>
+                    This recipe is no longer maintained upstream.
+                    The last release was in 2009.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>libpfm4</filename>:</emphasis>
+                    The only file that requires this recipe is
+                    <filename>oprofile</filename>, which has been removed.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>linux-yocto</filename>:</emphasis>
+                    The version 4.4, 4.9, and 4.10 recipes have been removed.
+                    Versions 4.12, 4.14, and 4.15 remain.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>man</filename>:</emphasis>
+                    This recipe has been replaced by modern
+                    <filename>man-db</filename>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>mkelfimage</filename>:</emphasis>
+                    This tool has been removed in the upstream coreboot project,
+                    and is no longer needed with the removal of the ELF image
+                    type.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>nativesdk-postinst-intercept</filename>:</emphasis>
+                    This recipe is not maintained.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>neon</filename>:</emphasis>
+                    This software package is no longer maintained upstream and
+                    is no longer needed by anything in OpenEmbedded-Core.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>oprofile</filename>:</emphasis>
+                    The functionality of this recipe is replaced by
+                    <filename>perf</filename> and keeping compatibility on
+                    an ongoing basis with <filename>musl</filename> is
+                    difficult.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>pax</filename>:</emphasis>
+                    This software package is obsolete.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>stat</filename>:</emphasis>
+                    This software package is not maintained upstream.
+                    <filename>coreutils</filename> provides a modern stat binary.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>zisofs-tools-native</filename>:</emphasis>
+                    This recipe is no longer needed because the compressed
+                    ISO image feature has been removed.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.5-scripts-and-tools-changes'>
+        <title>Scripts and Tools Changes</title>
+
+        <para>
+            The following are changes to scripts and tools:
+            <itemizedlist>
+                <listitem><para>
+                    <emphasis><filename>yocto-bsp</filename>,
+                    <filename>yocto-kernel</filename>, and
+                    <filename>yocto-layer</filename></emphasis>:
+                    The <filename>yocto-bsp</filename>,
+                    <filename>yocto-kernel</filename>, and
+                    <filename>yocto-layer</filename> scripts previously shipped
+                    with poky but not in OpenEmbedded-Core have been removed.
+                    These scripts are not maintained and are outdated.
+                    In many cases, they are also limited in scope.
+                    The <filename>bitbake-layers create-layer</filename> command
+                    is a direct replacement for <filename>yocto-layer</filename>.
+                    See the documentation to create a BSP or kernel recipe in
+                    the
+                    "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-kernel-recipe-example'>BSP Kernel Recipe Example</ulink>"
+                     section.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>devtool finish</filename>:</emphasis>
+                    <filename>devtool finish</filename> now exits with an error
+                    if there are uncommitted changes or a rebase/am in progress
+                    in the recipe's source repository.
+                    If this error occurs, there might be uncommitted changes
+                    that will not be included in updates to the patches applied
+                    by the recipe.
+                    A -f/--force option is provided for situations that the
+                    uncommitted changes are inconsequential and you want to
+                    proceed regardless.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>scripts/oe-setup-rpmrepo</filename> script:</emphasis>
+                    The functionality of
+                    <filename>scripts/oe-setup-rpmrepo</filename> is replaced by
+                    <filename>bitbake package-index</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>scripts/test-dependencies.sh</filename> script:</emphasis>
+                    The script is largely made obsolete by the
+                    recipe-specific sysroots functionality introduced in the
+                    previous release.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.5-bitbake-changes'>
+        <title>BitBake Changes</title>
+
+        <para>
+            The following are BitBake changes:
+            <itemizedlist>
+                <listitem><para>
+                    The <filename>--runall</filename> option has changed.
+                    There are two different behaviors people might want:
+                    <itemizedlist>
+                        <listitem><para>
+                            <emphasis>Behavior A:</emphasis>
+                            For a given target (or set of targets) look through
+                            the task graph and run task X only if it is present
+                            and will be built.
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis>Behavior B:</emphasis>
+                            For a given target (or set of targets) look through
+                            the task graph and run task X if any recipe in the
+                            taskgraph has such a target, even if it is not in
+                            the original task graph.
+                            </para></listitem>
+                    </itemizedlist>
+                    The <filename>--runall</filename> option now performs
+                    "Behavior B".
+                    Previously <filename>--runall</filename> behaved like
+                    "Behavior A".
+                    A <filename>--runonly</filename> option has been added to
+                    retain the ability to perform "Behavior A".
+                    </para></listitem>
+                <listitem><para>
+                    Several explicit "run this task for all recipes in the
+                    dependency tree" tasks have been removed (e.g.
+                    <filename>fetchall</filename>,
+                    <filename>checkuriall</filename>, and the
+                    <filename>*all</filename> tasks provided by the
+                    <filename>distrodata</filename> and
+                    <filename>archiver</filename> classes).
+                    There is a BitBake option to complete this for any arbitrary
+                    task. For example:
+                    <literallayout class='monospaced'>
+     bitbake &lt;target&gt; -c fetchall
+                    </literallayout>
+                    should now be replaced with:
+                    <literallayout class='monospaced'>
+     bitbake &lt;target&gt; --runall=fetch
+                    </literallayout>
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.5-python-and-python3-changes'>
+        <title>Python and Python 3 Changes</title>
+
+        <para>
+            The following are auto-packaging changes to Python and Python 3:
+        </para>
+        <para>
+            The script-managed <filename>python-*-manifest.inc</filename> files
+            that were previously used to generate Python and Python 3
+            packages have been replaced with a JSON-based file that is
+            easier to read and maintain.
+            A new task is available for maintainers of the Python recipes to
+            update the JSON file when upgrading to new Python versions.
+            You can now edit the file directly instead of having to edit a
+            script and run it to update the file.
+        </para>
+        <para>
+            One particular change to note is that the Python recipes no longer
+            have build-time provides for their packages.
+            This assumes <filename>python-foo</filename> is one of the packages
+            provided by the Python recipe.
+            You can no longer run <filename>bitbake python-foo</filename> or
+            have a <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink> on
+            <filename>python-foo</filename>, but doing either of the following
+            causes the package to work as expected:
+            <literallayout class='monospaced'>
+     IMAGE_INSTALL_append = " python-foo"
+            </literallayout>
+            or
+            <literallayout class='monospaced'>
+     RDEPENDS_${PN} = "python-foo"
+            </literallayout>
+            The earlier build-time provides behavior was a quirk of the way the
+            Python manifest file was created.
+            For more information on this change please see
+            <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce'>this commit</ulink>.
+        </para>
+    </section>
+
+    <section id='migration-2.5-miscellaneous-changes'>
+        <title>Miscellaneous Changes</title>
+
+        <para>
+            The following are additional changes:
+            <itemizedlist>
+                <listitem><para>
+                    The <filename>kernel</filename> class supports building
+                    packages for multiple kernels.
+                    If your kernel recipe or <filename>.bbappend</filename> file
+                    mentions packaging at all, you should replace references to
+                    the kernel in package names with
+                    <filename>${KERNEL_PACKAGE_NAME}</filename>.
+                    For example, if you disable automatic installation of the
+                    kernel image using
+                    <filename>RDEPENDS_kernel-base = ""</filename> you can avoid
+                    warnings using
+                    <filename>RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""</filename>
+                    instead.
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>buildhistory</filename> class commits changes
+                    to the repository by default so you no longer need to set
+                    <filename>BUILDHISTORY_COMMIT = "1"</filename>.
+                    If you want to disable commits you need to set
+                    <filename>BUILDHISTORY_COMMIT = "0"</filename> in your
+                    configuration.
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>beaglebone</filename> reference machine has
+                    been renamed to <filename>beaglebone-yocto</filename>.
+                    The <filename>beaglebone-yocto</filename> BSP is a reference
+                    implementation using only mainline components available in
+                    OpenEmbedded-Core and <filename>meta-yocto-bsp</filename>,
+                    whereas Texas Instruments maintains a full-featured BSP in
+                    the <filename>meta-ti</filename> layer.
+                    This rename avoids the previous name clash that existed
+                    between the two BSPs.
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>update-alternatives</filename> class no longer
+                    works with SysV <filename>init</filename> scripts because
+                    this usage has been problematic.
+                    Also, the <filename>sysklogd</filename> recipe no longer
+                    uses <filename>update-alternatives</filename> because it is
+                    incompatible with other implementations.
+                    </para></listitem>
+                <listitem><para>
+                    By default, the <filename>cmake</filename> class uses
+                    <filename>ninja</filename> instead of
+                    <filename>make</filename> for building.
+                    This improves build performance.
+                    If a recipe is broken with <filename>ninja</filename>, then
+                    the recipe can set
+                    <filename>OECMAKE_GENERATOR = "Unix Makefiles"</filename>
+                    to change back to <filename>make</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    The previously deprecated <filename>base_*</filename>
+                    functions have been removed in favor of their replacements
+                    in <filename>meta/lib/oe</filename> and
+                    <filename>bitbake/lib/bb</filename>.
+                    These are typically used from recipes and classes.
+                    Any references to the old functions must be updated.
+                    The following table shows the removed functions and their
+                    replacements:
+
+                    <literallayout class='monospaced'>
+     <emphasis>Removed</emphasis>                                 <emphasis>Replacement</emphasis>
+     ============================            ============================
+     base_path_join()                        oe.path.join()
+     base_path_relative()                    oe.path.relative()
+     base_path_out()                         oe.path.format_display()
+     base_read_file()                        oe.utils.read_file()
+     base_ifelse()                           oe.utils.ifelse()
+     base_conditional()                      oe.utils.conditional()
+     base_less_or_equal()                    oe.utils.less_or_equal()
+     base_version_less_or_equal()            oe.utils.version_less_or_equal()
+     base_contains()                         bb.utils.contains()
+     base_both_contain()                     oe.utils.both_contain()
+     base_prune_suffix()                     oe.utils.prune_suffix()
+     oe_filter()                             oe.utils.str_filter()
+     oe_filter_out()                         oe.utils.str_filter_out() (or use the _remove operator).
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para>
+                    Using <filename>exit 1</filename> to explicitly defer a
+                    postinstall script until first boot is now deprecated since
+                    it is not an obvious mechanism and can mask actual errors.
+                    If you want to explicitly defer a postinstall to first boot
+                    on the target rather than at <filename>rootfs</filename>
+                    creation time, use
+                    <filename>pkg_postinst_ontarget()</filename>
+                    or call
+                    <filename>postinst-intercepts defer_to_first_boot</filename>
+                    from <filename>pkg_postinst()</filename>.
+                    Any failure of a <filename>pkg_postinst()</filename>
+                    script (including <filename>exit 1</filename>)
+                    will trigger a warning during
+                    <filename>do_rootfs</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>elf</filename> image type has been removed.
+                    This image type was removed because the
+                    <filename>mkelfimage</filename> tool
+                    that was required to create it is no longer provided by
+                    coreboot upstream and required updating every time
+                    <filename>binutils</filename> updated.
+                    </para></listitem>
+                <listitem><para>
+                    Support for .iso image compression (previously enabled
+                    through <filename>COMPRESSISO = "1"</filename>) has been
+                    removed.
+                    The userspace tools (<filename>zisofs-tools</filename>) are
+                    unmaintained and <filename>squashfs</filename> provides
+                    better performance and compression.
+                    In order to build a live image with squashfs+lz4 compression
+                    enabled you should now set
+                    <filename>LIVE_ROOTFS_TYPE = "squashfs-lz4"</filename>
+                    and ensure that <filename>live</filename>
+                    is in <filename>IMAGE_FSTYPES</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    Recipes with an unconditional dependency on
+                    <filename>libpam</filename> are only buildable with
+                    <filename>pam</filename> in
+                    <filename>DISTRO_FEATURES</filename>.
+                    If the dependency is truly optional then it is recommended
+                    that the dependency be conditional upon
+                    <filename>pam</filename> being in
+                    <filename>DISTRO_FEATURES</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    For EFI-based machines, the bootloader
+                    (<filename>grub-efi</filename> by default) is installed into
+                    the image at /boot.
+                    Wic can be used to split the bootloader into separate boot
+                    and rootfs partitions if necessary.
+                    </para></listitem>
+                <listitem><para>
+                    Patches whose context does not match exactly (i.e. where
+                    patch reports "fuzz" when applying) will generate a
+                    warning.
+                    For an example of this see
+                    <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57'>this commit</ulink>.
+                    </para></listitem>
+                <listitem><para>
+                    Layers are expected to set
+                    <filename>LAYERSERIES_COMPAT_layername</filename>
+                    to match the version(s) of OpenEmbedded-Core they are
+                    compatible with.
+                    This is specified as codenames using spaces to separate
+                    multiple values (e.g. "rocko sumo").
+                    If a layer does not set
+                    <filename>LAYERSERIES_COMPAT_layername</filename>, a warning
+                    will is shown.
+                    If a layer sets a value that does not include the current
+                    version ("sumo" for the 2.5 release), then an error will be
+                    produced.
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>TZ</filename> environment variable is set to
+                    "UTC" within the build environment in order to fix
+                    reproducibility problems in some recipes.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</section>
 </chapter>
 <!--
 vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml
deleted file mode 100644
index 17f4c54..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml
+++ /dev/null
@@ -1,477 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='ref-bitbake'>
-
-    <title>BitBake</title>
-
-    <para>
-        BitBake is a program written in Python that interprets the
-        <link linkend='metadata'>Metadata</link> used by
-        the OpenEmbedded build system.
-        At some point, developers wonder what actually happens when you enter:
-        <literallayout class='monospaced'>
-     $ bitbake core-image-sato
-        </literallayout>
-    </para>
-
-    <para>
-        This chapter provides an overview of what happens behind the scenes from BitBake's perspective.
-    </para>
-
-    <note>
-        BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
-        As such, it has no real knowledge of what the tasks being executed actually do.
-        BitBake just considers a list of tasks with dependencies and handles
-        <link linkend='metadata'>Metadata</link>
-        consisting of variables in a certain format that get passed to the tasks.
-    </note>
-
-    <section id='ref-bitbake-parsing'>
-        <title>Parsing</title>
-
-        <para>
-            BitBake parses configuration files, classes, and <filename>.bb</filename> files.
-        </para>
-
-        <para>
-            The first thing BitBake does is look for the
-            <filename>bitbake.conf</filename> file.
-            This file resides in the
-            <link linkend='source-directory'>Source Directory</link>
-            within the <filename>meta/conf/</filename> directory.
-            BitBake finds it by examining its
-            <link linkend='var-BBPATH'><filename>BBPATH</filename></link> environment
-            variable and looking for the <filename>meta/conf/</filename>
-            directory.
-        </para>
-
-        <para>
-            The <filename>bitbake.conf</filename> file lists other configuration
-            files to include from a <filename>conf/</filename>
-            directory below the directories listed in <filename>BBPATH</filename>.
-            In general, the most important configuration file from a user's perspective
-            is <filename>local.conf</filename>, which contains a user's customized
-            settings for the OpenEmbedded build environment.
-            Other notable configuration files are the distribution
-            configuration file (set by the
-            <filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
-            and the machine configuration file
-            (set by the
-            <filename><link linkend='var-MACHINE'>MACHINE</link></filename> variable).
-            The <filename>DISTRO</filename> and <filename>MACHINE</filename> BitBake environment
-            variables are both usually set in
-            the <filename>local.conf</filename> file.
-            Valid distribution
-            configuration files are available in the <filename>meta/conf/distro/</filename> directory
-            and valid machine configuration
-            files in the <filename>meta/conf/machine/</filename> directory.
-            Within the <filename>meta/conf/machine/include/</filename>
-            directory are various <filename>tune-*.inc</filename> configuration files that provide common
-            "tuning" settings specific to and shared between particular architectures and machines.
-        </para>
-
-        <para>
-            After the parsing of the configuration files, some standard classes are included.
-            The <filename>base.bbclass</filename> file is always included.
-            Other classes that are specified in the configuration using the
-            <filename><link linkend='var-INHERIT'>INHERIT</link></filename>
-            variable are also included.
-            Class files are searched for in a <filename>classes</filename> subdirectory
-            under the paths in <filename>BBPATH</filename> in the same way as
-            configuration files.
-        </para>
-
-        <para>
-            After classes are included, the variable
-            <filename><link linkend='var-BBFILES'>BBFILES</link></filename>
-            is set, usually in
-            <filename>local.conf</filename>, and defines the list of places to search for
-            <filename>.bb</filename> files.
-            By default, the <filename>BBFILES</filename> variable specifies the
-            <filename>meta/recipes-*/</filename> directory within Poky.
-            Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
-            BitBake layers as described in the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
-            section of the Yocto Project Development Tasks Manual.
-        </para>
-
-        <para>
-            BitBake parses each <filename>.bb</filename> file in <filename>BBFILES</filename> and
-            stores the values of various variables.
-            In summary, for each <filename>.bb</filename>
-            file the configuration plus the base class of variables are set, followed
-            by the data in the <filename>.bb</filename> file
-            itself, followed by any inherit commands that
-            <filename>.bb</filename> file might contain.
-        </para>
-
-        <para>
-            Because parsing <filename>.bb</filename> files is a time
-            consuming process, a cache is kept to speed up subsequent parsing.
-            This cache is invalid if the timestamp of the <filename>.bb</filename>
-            file itself changes, or if the timestamps of any of the include,
-            configuration files or class files on which the
-            <filename>.bb</filename> file depends change.
-        </para>
-
-        <note>
-            <para>
-                You need to be aware of how BitBake parses curly braces.
-                If a recipe uses a closing curly brace within the function and
-                the character has no leading spaces, BitBake produces a parsing
-                error.
-                If you use a pair of curly brace in a shell function, the
-                closing curly brace must not be located at the start of the line
-                without leading spaces.
-            </para>
-
-            <para>
-                Here is an example that causes BitBake to produce a parsing
-                error:
-                <literallayout class='monospaced'>
-     fakeroot create_shar() {
-         cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
-     usage()
-     {
-       echo "test"
-       ###### The following "}" at the start of the line causes a parsing error ######
-     }
-     EOF
-     }
-                </literallayout>
-                Writing the recipe this way avoids the error:
-                <literallayout class='monospaced'>
-     fakeroot create_shar() {
-         cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
-     usage()
-     {
-       echo "test"
-       ######The following "}" with a leading space at the start of the line avoids the error ######
-      }
-     EOF
-     }
-                </literallayout>
-            </para>
-        </note>
-    </section>
-
-    <section id='ref-bitbake-providers'>
-        <title>Preferences and Providers</title>
-
-        <para>
-            Once all the <filename>.bb</filename> files have been
-            parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
-            in the previous section's example) and looks for providers of that target.
-            Once a provider is selected, BitBake resolves all the dependencies for
-            the target.
-            In the case of <filename>core-image-sato</filename>, it would lead to
-            <filename>packagegroup-core-x11-sato</filename>,
-            which in turn leads to recipes like <filename>matchbox-terminal</filename>,
-            <filename>pcmanfm</filename> and <filename>gthumb</filename>.
-            These recipes in turn depend on <filename>glibc</filename> and the toolchain.
-        </para>
-
-        <para>
-            Sometimes a target might have multiple providers.
-            A common example is "virtual/kernel", which is provided by each kernel package.
-            Each machine often selects the best kernel provider by using a line similar to the
-            following in the machine configuration file:
-        </para>
-
-        <literallayout class='monospaced'>
-     PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
-        </literallayout>
-
-        <para>
-            The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
-            is the provider with the same name as the target.
-        </para>
-
-        <para>
-            Understanding how providers are chosen is made complicated by the fact
-            that multiple versions might exist.
-            BitBake defaults to the highest version of a provider.
-            Version comparisons are made using the same method as Debian.
-            You can use the
-            <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
-            variable to specify a particular version (usually in the distro configuration).
-            You can influence the order by using the
-            <filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
-            variable.
-            By default, files have a preference of "0".
-            Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
-            package unlikely to be used unless it is explicitly referenced.
-            Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
-            <filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
-            <filename>DEFAULT_PREFERENCE</filename> is often used to mark newer and more experimental package
-            versions until they have undergone sufficient testing to be considered stable.
-        </para>
-
-        <para>
-            In summary, BitBake has created a list of providers, which is prioritized, for each target.
-        </para>
-    </section>
-
-    <section id='ref-bitbake-dependencies'>
-        <title>Dependencies</title>
-
-        <para>
-            Each target BitBake builds consists of multiple tasks such as
-            <filename>fetch</filename>, <filename>unpack</filename>,
-            <filename>patch</filename>, <filename>configure</filename>,
-            and <filename>compile</filename>.
-            For best performance on multi-core systems, BitBake considers each task as an independent
-            entity with its own set of dependencies.
-        </para>
-
-        <para>
-            Dependencies are defined through several variables.
-            You can find information about variables BitBake uses in the
-            BitBake documentation, which is found in the
-            <filename>bitbake/doc/manual</filename> directory within the
-            <link linkend='source-directory'>Source Directory</link>.
-            At a basic level, it is sufficient to know that BitBake uses the
-            <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
-            <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
-            variables when calculating dependencies.
-        </para>
-    </section>
-
-    <section id='ref-bitbake-tasklist'>
-        <title>The Task List</title>
-
-        <para>
-            Based on the generated list of providers and the dependency information,
-            BitBake can now calculate exactly what tasks it needs to run and in what
-            order it needs to run them.
-            The build now starts with BitBake forking off threads up to the limit set in the
-            <filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></filename> variable.
-            BitBake continues to fork threads as long as there are tasks ready to run,
-            those tasks have all their dependencies met, and the thread threshold has not been
-            exceeded.
-        </para>
-
-        <para>
-            It is worth noting that you can greatly speed up the build time by properly setting
-            the <filename>BB_NUMBER_THREADS</filename> variable.
-            See the
-            "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
-            section in the Yocto Project Quick Start for more information.
-        </para>
-
-        <para>
-            As each task completes, a timestamp is written to the directory specified by the
-            <filename><link linkend='var-STAMP'>STAMP</link></filename> variable.
-            On subsequent runs, BitBake looks within the <filename>build/tmp/stamps</filename>
-            directory and does not rerun
-            tasks that are already completed unless a timestamp is found to be invalid.
-            Currently, invalid timestamps are only considered on a per
-            <filename>.bb</filename> file basis.
-            So, for example, if the configure stamp has a timestamp greater than the
-            compile timestamp for a given target, then the compile task would rerun.
-            Running the compile task again, however, has no effect on other providers
-            that depend on that target.
-            This behavior could change or become configurable in future versions of BitBake.
-        </para>
-
-        <note>
-            Some tasks are marked as "nostamp" tasks.
-            No timestamp file is created when these tasks are run.
-            Consequently, "nostamp" tasks are always rerun.
-        </note>
-    </section>
-
-    <section id='ref-bitbake-runtask'>
-        <title>Running a Task</title>
-
-        <para>
-            Tasks can either be a shell task or a Python task.
-            For shell tasks, BitBake writes a shell script to
-            <filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
-            The generated shell script contains all the exported variables, and the shell functions
-            with all variables expanded.
-            Output from the shell script goes to the file <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
-            Looking at the expanded shell functions in the run file and the output in the log files
-            is a useful debugging technique.
-        </para>
-
-        <para>
-            For Python tasks, BitBake executes the task internally and logs information to the
-            controlling terminal.
-            Future versions of BitBake will write the functions to files similar to the way
-            shell tasks are handled.
-            Logging will be handled in a way similar to shell tasks as well.
-        </para>
-
-        <para>
-            Once all the tasks have been completed BitBake exits.
-        </para>
-
-        <para>
-            When running a task, BitBake tightly controls the execution environment
-            of the build tasks to make sure unwanted contamination from the build machine
-            cannot influence the build.
-            Consequently, if you do want something to get passed into the build
-            task's environment, you must take a few steps:
-            <orderedlist>
-                <listitem><para>Tell BitBake to load what you want from the environment
-                    into the data store.
-                    You can do so through the <filename>BB_ENV_EXTRAWHITE</filename>
-                    variable.
-                    For example, assume you want to prevent the build system from
-                    accessing your <filename>$HOME/.ccache</filename> directory.
-                    The following command tells BitBake to load
-                    <filename>CCACHE_DIR</filename> from the environment into the data
-                    store:
-                    <literallayout class='monospaced'>
-     export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
-                    </literallayout></para></listitem>
-                <listitem><para>Tell BitBake to export what you have loaded into the
-                    environment store to the task environment of every running task.
-                    Loading something from the environment into the data store
-                    (previous step) only makes it available in the datastore.
-                    To export it to the task environment of every running task,
-                    use a command similar to the following in your
-                    <filename>local.conf</filename> or distro configuration file:
-                    <literallayout class='monospaced'>
-     export CCACHE_DIR
-                    </literallayout></para></listitem>
-            </orderedlist>
-        </para>
-
-        <note>
-            A side effect of the previous steps is that BitBake records the variable
-            as a dependency of the build process in things like the shared state
-            checksums.
-            If doing so results in unnecessary rebuilds of tasks, you can whitelist the
-            variable so that the shared state code ignores the dependency when it creates
-            checksums.
-            For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
-            example in the "<link linkend='checksums'>Checksums (Signatures)</link>" section.
-        </note>
-    </section>
-
-    <section id='ref-bitbake-commandline'>
-        <title>BitBake Command Line</title>
-
-        <para>
-            Following is the BitBake help output:
-        </para>
-
-        <screen>
-$ bitbake --help
-Usage: bitbake [options] [recipename/target ...]
-
-    Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
-    It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
-    will provide the layer, BBFILES and other configuration information.
-
-Options:
-  --version             show program's version number and exit
-  -h, --help            show this help message and exit
-  -b BUILDFILE, --buildfile=BUILDFILE
-                        Execute tasks from a specific .bb recipe directly.
-                        WARNING: Does not handle any dependencies from other
-                        recipes.
-  -k, --continue        Continue as much as possible after an error. While the
-                        target that failed and anything depending on it cannot
-                        be built, as much as possible will be built before
-                        stopping.
-  -a, --tryaltconfigs   Continue with builds by trying to use alternative
-                        providers where possible.
-  -f, --force           Force the specified targets/task to run (invalidating
-                        any existing stamp file).
-  -c CMD, --cmd=CMD     Specify the task to execute. The exact options
-                        available depend on the metadata. Some examples might
-                        be 'compile' or 'populate_sysroot' or 'listtasks' may
-                        give a list of the tasks available.
-  -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP
-                        Invalidate the stamp for the specified task such as
-                        'compile' and then run the default task for the
-                        specified target(s).
-  -r PREFILE, --read=PREFILE
-                        Read the specified file before bitbake.conf.
-  -R POSTFILE, --postread=POSTFILE
-                        Read the specified file after bitbake.conf.
-  -v, --verbose         Output more log message data to the terminal.
-  -D, --debug           Increase the debug level. You can specify this more
-                        than once.
-  -n, --dry-run         Don't execute, just go through the motions.
-  -S, --dump-signatures
-                        Don't execute, just dump out the signature
-                        construction information.
-  -p, --parse-only      Quit after parsing the BB recipes.
-  -s, --show-versions   Show current and preferred versions of all recipes.
-  -e, --environment     Show the global or per-package environment complete
-                        with information about where variables were
-                        set/changed.
-  -g, --graphviz        Save dependency tree information for the specified
-                        targets in the dot syntax.
-  -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
-                        Assume these dependencies don't exist and are already
-                        provided (equivalent to ASSUME_PROVIDED). Useful to
-                        make dependency graphs more appealing
-  -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
-                        Show debug logging for the specified logging domains
-  -P, --profile         Profile the command and save reports.
-  -u UI, --ui=UI        The user interface to use (e.g. knotty and taskexp).
-  -t SERVERTYPE, --servertype=SERVERTYPE
-                        Choose which server to use, process or xmlrpc.
-  --revisions-changed   Set the exit code depending on whether upstream
-                        floating revisions have changed or not.
-  --server-only         Run bitbake without a UI, only starting a server
-                        (cooker) process.
-  -B BIND, --bind=BIND  The name/address for the bitbake server to bind to.
-  --no-setscene         Do not run any setscene tasks. sstate will be ignored
-                        and everything needed, built.
-  --remote-server=REMOTE_SERVER
-                        Connect to the specified server.
-  -m, --kill-server     Terminate the remote server.
-  --observe-only        Connect to a server as an observing-only client.
-        </screen>
-    </section>
-
-    <section id='ref-bitbake-fetchers'>
-        <title>Fetchers</title>
-
-        <para>
-            BitBake also contains a set of "fetcher" modules that allow
-            retrieval of source code from various types of sources.
-            For example, BitBake can get source code from a disk with the metadata, from websites,
-            from remote shell accounts, or from Source Code Management (SCM) systems
-            like <filename>cvs/subversion/git</filename>.
-        </para>
-
-        <para>
-            Fetchers are usually triggered by entries in
-            <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
-            You can find information about the options and formats of entries for specific
-            fetchers in the BitBake manual located in the
-            <filename>bitbake/doc/manual</filename> directory of the
-            <link linkend='source-directory'>Source Directory</link>.
-        </para>
-
-        <para>
-            One useful feature for certain Source Code Manager (SCM) fetchers
-            is the ability to "auto-update" when the upstream SCM changes
-            version.
-            Since this ability requires certain functionality from the SCM,
-            not all systems support it.
-            Currently Subversion, Bazaar and to a limited extent, Git support
-            the ability to "auto-update".
-            This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
-            variable.
-            See the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>"
-            section in the Yocto Project Development Tasks Manual for more
-            information.
-        </para>
-
-    </section>
-
-</chapter>
-<!--
-vim: expandtab tw=80 ts=4 spell spelllang=en_gb
--->
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml
index 5961d3e..77f21ed 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml
@@ -35,8 +35,7 @@
 <para>
     This chapter discusses only the most useful and important classes.
     Other classes do exist within the <filename>meta/classes</filename>
-    directory in the
-    <link linkend='source-directory'>Source Directory</link>.
+    directory in the Source Directory.
     You can reference the <filename>.bbclass</filename> files directly
     for more information.
 </para>
@@ -128,9 +127,8 @@
     <para>
         By default, the <filename>autotools*</filename> classes
         use out-of-tree builds (i.e.
-        <filename>autotools.bbclass</filename>).
-        (<link linkend='var-B'><filename>B</filename></link> <filename>!=</filename>
-        <link linkend='var-S'><filename>S</filename></link>).
+        <filename>autotools.bbclass</filename> building with
+        <filename>B != S</filename>).
     </para>
 
     <para>
@@ -357,8 +355,8 @@
         history of build output metadata, which can be used to detect possible
         regressions as well as used for analysis of the build output.
         For more information on using Build History, see the
-        "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
-        section.
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
+        section in the Yocto Project Development Tasks Manual.
     </para>
 </section>
 
@@ -407,8 +405,7 @@
     <title><filename>ccache.bbclass</filename></title>
 
     <para>
-        The <filename>ccache</filename> class enables the
-        <ulink url='http://ccache.samba.org/'>C/C++ Compiler Cache</ulink>
+        The <filename>ccache</filename> class enables the C/C++ Compiler Cache
         for the build.
         This class is used to give a minor performance boost during the build.
         However, using the class can lead to unexpected side-effects.
@@ -568,8 +565,9 @@
         provides support for the recipes that build the Canadian
         Cross-compilation tools for SDKs.
         See the
-        "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-        section for more discussion on these cross-compilation tools.
+        "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
+        section in the Yocto Project Overview and Concepts Manual for more
+        discussion on these cross-compilation tools.
     </para>
 </section>
 
@@ -581,8 +579,9 @@
         provides support for the recipes that build the cross-compilation
         tools used for building SDKs.
         See the
-        "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-        section for more discussion on these cross-compilation tools.
+        "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
+        section in the Yocto Project Overview and Concepts Manual for more
+        discussion on these cross-compilation tools.
     </para>
 </section>
 
@@ -1249,8 +1248,8 @@
         "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage'>Customizing Images</ulink>"
         section in the Yocto Project Development Tasks Manual.
         For information on how images are created, see the
-        "<link linkend='images-dev-environment'>Images</link>" section elsewhere
-        in this manual.
+        "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
+        section in the Yocto Project Overview and Concpets Manual.
     </para>
 </section>
 
@@ -1291,7 +1290,7 @@
         This class also handles conversion and compression of images.
         <note>
             To build a VMware VMDK image, you need to add "wic.vmdk" to
-            <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
+            <filename>IMAGE_FSTYPES</filename>.
             This would also be similar for Virtual Box Virtual Disk Image
             ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.
         </note>
@@ -1552,7 +1551,8 @@
                 <link linkend='var-FILES'><filename>FILES</filename></link>
                 variable values that contain "//", which is invalid.
                 </para></listitem>
-            <listitem><para><emphasis><filename>host-user-contaminated:</filename></emphasis>
+            <listitem><para id='insane-host-user-contaminated'>
+                <emphasis><filename>host-user-contaminated:</filename></emphasis>
                 Checks that no package produced by the recipe contains any
                 files outside of <filename>/home</filename> with a user or
                 group ID that matches the user running BitBake.
@@ -1883,6 +1883,17 @@
     </para>
 </section>
 
+<section id='ref-classes-kernel-devicetree'>
+    <title><filename>kernel-devicetree.bbclass</filename></title>
+
+    <para>
+        The <filename>kernel-devicetree</filename> class, which is inherited by
+        the
+        <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
+        class, supports device tree generation.
+    </para>
+</section>
+
 <section id='ref-classes-kernel-fitimage'>
     <title><filename>kernel-fitimage.bbclass</filename></title>
 
@@ -2122,7 +2133,7 @@
 
     <para>
         For general information on out-of-tree Linux kernel modules, see the
-        "<ulink url='&YOCTO_DOCS_KERNEL_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
+        "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
         section in the Yocto Project Linux Kernel Development Manual.
     </para>
 </section>
@@ -2709,8 +2720,8 @@
     <para>
         For more information on the cross-development toolchain
         generation, see the
-        "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-        section.
+        "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
+        section in the Yocto Project Overview and Concepts Manual.
         For information on advantages gained when building a
         cross-development toolchain using the
         <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
@@ -3007,8 +3018,8 @@
 
     <para>
         For information on how root filesystem images are created, see the
-        "<link linkend='image-generation-dev-environment'>Image Generation</link>"
-        section.
+        "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
+        section in the Yocto Project Overview and Concepts Manual.
     </para>
 </section>
 
@@ -3169,8 +3180,8 @@
 
     <para>
         For more information on sstate, see the
-        "<link linkend='shared-state-cache'>Shared State Cache</link>"
-        section.
+        "<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>Shared State Cache</ulink>"
+        section in the Yocto Project Overview and Concepts Manual.
     </para>
 </section>
 
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-development-environment.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-development-environment.xml
deleted file mode 100644
index 52197d1..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-development-environment.xml
+++ /dev/null
@@ -1,2761 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='ref-development-environment'>
-<title>The Yocto Project Development Environment</title>
-
-<para>
-    This chapter takes a look at the Yocto Project development
-    environment and also provides a detailed look at what goes on during
-    development in that environment.
-    The chapter provides Yocto Project Development environment concepts that
-    help you understand how work is accomplished in an open source environment,
-    which is very different as compared to work accomplished in a closed,
-    proprietary environment.
-</para>
-
-<para>
-    Specifically, this chapter addresses open source philosophy, workflows,
-    Git, source repositories, licensing, recipe syntax, and development
-    syntax.
-</para>
-
-<section id='open-source-philosophy'>
-    <title>Open Source Philosophy</title>
-
-    <para>
-        Open source philosophy is characterized by software development
-        directed by peer production and collaboration through an active
-        community of developers.
-        Contrast this to the more standard centralized development models
-        used by commercial software companies where a finite set of developers
-        produces a product for sale using a defined set of procedures that
-        ultimately result in an end product whose architecture and source
-        material are closed to the public.
-    </para>
-
-    <para>
-        Open source projects conceptually have differing concurrent agendas,
-        approaches, and production.
-        These facets of the development process can come from anyone in the
-        public (community) that has a stake in the software project.
-        The open source environment contains new copyright, licensing, domain,
-        and consumer issues that differ from the more traditional development
-        environment.
-        In an open source environment, the end product, source material,
-        and documentation are all available to the public at no cost.
-    </para>
-
-    <para>
-        A benchmark example of an open source project is the Linux kernel,
-        which was initially conceived and created by Finnish computer science
-        student Linus Torvalds in 1991.
-        Conversely, a good example of a non-open source project is the
-        <trademark class='registered'>Windows</trademark> family of operating
-        systems developed by
-        <trademark class='registered'>Microsoft</trademark> Corporation.
-    </para>
-
-    <para>
-        Wikipedia has a good historical description of the Open Source
-        Philosophy
-        <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
-        You can also find helpful information on how to participate in the
-        Linux Community
-        <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
-    </para>
-</section>
-
-<section id='workflows'>
-    <title>Workflows</title>
-
-    <para>
-        This section provides workflow concepts using the Yocto Project and
-        Git.
-        In particular, the information covers basic practices that describe
-        roles and actions in a collaborative development environment.
-        <note>
-            If you are familiar with this type of development environment, you
-            might not want to read this section.
-        </note>
-    </para>
-
-    <para>
-        The Yocto Project files are maintained using Git in "master"
-        branches whose Git histories track every change and whose structures
-        provides branches for all diverging functionality.
-        Although there is no need to use Git, many open source projects do so.
-    <para>
-
-    </para>
-        For the Yocto Project, a key individual called the "maintainer" is
-        responsible for the "master" branch of a given Git repository.
-        The "master" branch is the “upstream” repository from which final or
-        most recent builds of the project occur.
-        The maintainer is responsible for accepting changes from other
-        developers and for organizing the underlying branch structure to
-        reflect release strategies and so forth.
-        <note>For information on finding out who is responsible for (maintains)
-            a particular area of code, see the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
-            section of the Yocto Project Development Tasks Manual.
-        </note>
-    </para>
-
-    <para>
-        The Yocto Project <filename>poky</filename> Git repository also has an
-        upstream contribution Git repository named
-        <filename>poky-contrib</filename>.
-        You can see all the branches in this repository using the web interface
-        of the
-        <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> organized
-        within the "Poky Support" area.
-        These branches temporarily hold changes to the project that have been
-        submitted or committed by the Yocto Project development team and by
-        community members who contribute to the project.
-        The maintainer determines if the changes are qualified to be moved
-        from the "contrib" branches into the "master" branch of the Git
-        repository.
-    </para>
-
-    <para>
-        Developers (including contributing community members) create and
-        maintain cloned repositories of the upstream "master" branch.
-        The cloned repositories are local to their development platforms and
-        are used to develop changes.
-        When a developer is satisfied with a particular feature or change,
-        they "push" the changes to the appropriate "contrib" repository.
-    </para>
-
-    <para>
-        Developers are responsible for keeping their local repository
-        up-to-date with "master".
-        They are also responsible for straightening out any conflicts that
-        might arise within files that are being worked on simultaneously by
-        more than one person.
-        All this work is done locally on the developer’s machine before
-        anything is pushed to a "contrib" area and examined at the maintainer’s
-        level.
-    </para>
-
-    <para>
-        A somewhat formal method exists by which developers commit changes
-        and push them into the "contrib" area and subsequently request that
-        the maintainer include them into "master".
-        This process is called “submitting a patch” or "submitting a change."
-        For information on submitting patches and changes, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
-        section in the Yocto Project Development Tasks Manual.
-    </para>
-
-    <para>
-        To summarize the development workflow:  a single point of entry
-        exists for changes into the project’s "master" branch of the
-        Git repository, which is controlled by the project’s maintainer.
-        And, a set of developers exist who independently develop, test, and
-        submit changes to "contrib" areas for the maintainer to examine.
-        The maintainer then chooses which changes are going to become a
-        permanent part of the project.
-    </para>
-
-    <para>
-        <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
-    </para>
-
-    <para>
-        While each development environment is unique, there are some best
-        practices or methods that help development run smoothly.
-        The following list describes some of these practices.
-        For more information about Git workflows, see the workflow topics in
-        the
-        <ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
-        <itemizedlist>
-            <listitem><para>
-                <emphasis>Make Small Changes:</emphasis>
-                It is best to keep the changes you commit small as compared to
-                bundling many disparate changes into a single commit.
-                This practice not only keeps things manageable but also allows
-                the maintainer to more easily include or refuse changes.</para>
-
-                <para>It is also good practice to leave the repository in a
-                state that allows you to still successfully build your project.
-                In other words, do not commit half of a feature,
-                then add the other half as a separate, later commit.
-                Each commit should take you from one buildable project state
-                to another buildable state.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Use Branches Liberally:</emphasis>
-                It is very easy to create, use, and delete local branches in
-                your working Git repository.
-                You can name these branches anything you like.
-                It is helpful to give them names associated with the particular
-                feature or change on which you are working.
-                Once you are done with a feature or change and have merged it
-                into your local master branch, simply discard the temporary
-                branch.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Merge Changes:</emphasis>
-                The <filename>git merge</filename> command allows you to take
-                the changes from one branch and fold them into another branch.
-                This process is especially helpful when more than a single
-                developer might be working on different parts of the same
-                feature.
-                Merging changes also automatically identifies any collisions
-                or "conflicts" that might happen as a result of the same lines
-                of code being altered by two different developers.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Manage Branches:</emphasis>
-                Because branches are easy to use, you should use a system
-                where branches indicate varying levels of code readiness.
-                For example, you can have a "work" branch to develop in, a
-                "test" branch where the code or change is tested, a "stage"
-                branch where changes are ready to be committed, and so forth.
-                As your project develops, you can merge code across the
-                branches to reflect ever-increasing stable states of the
-                development.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Use Push and Pull:</emphasis>
-                The push-pull workflow is based on the concept of developers
-                "pushing" local commits to a remote repository, which is
-                usually a contribution repository.
-                This workflow is also based on developers "pulling" known
-                states of the project down into their local development
-                repositories.
-                The workflow easily allows you to pull changes submitted by
-                other developers from the upstream repository into your
-                work area ensuring that you have the most recent software
-                on which to develop.
-                The Yocto Project has two scripts named
-                <filename>create-pull-request</filename> and
-                <filename>send-pull-request</filename> that ship with the
-                release to facilitate this workflow.
-                You can find these scripts in the <filename>scripts</filename>
-                folder of the
-                <link linkend='source-directory'>Source Directory</link>.
-                For information on how to use these scripts, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#pushing-a-change-upstream'>Using Scripts to Push a Change Upstream and Request a Pull</ulink>"
-                section in the Yocto Project Development Tasks Manual.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Patch Workflow:</emphasis>
-                This workflow allows you to notify the maintainer through an
-                email that you have a change (or patch) you would like
-                considered for the "master" branch of the Git repository.
-                To send this type of change, you format the patch and then
-                send the email using the Git commands
-                <filename>git format-patch</filename> and
-                <filename>git send-email</filename>.
-                For information on how to use these scripts, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
-                section in the Yocto Project Development Tasks Manual.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-</section>
-
-<section id='git'>
-    <title>Git</title>
-
-    <para>
-        The Yocto Project makes extensive use of Git, which is a
-        free, open source distributed version control system.
-        Git supports distributed development, non-linear development,
-        and can handle large projects.
-        It is best that you have some fundamental understanding
-        of how Git tracks projects and how to work with Git if
-        you are going to use the Yocto Project for development.
-        This section provides a quick overview of how Git works and
-        provides you with a summary of some essential Git commands.
-        <note><title>Notes</title>
-            <itemizedlist>
-                <listitem><para>
-                    For more information on Git, see
-                    <ulink url='http://git-scm.com/documentation'></ulink>.
-                    </para></listitem>
-                <listitem><para>
-                    If you need to download Git, it is recommended that you add
-                    Git to your system through your distribution's "software
-                    store" (e.g. for Ubuntu, use the Ubuntu Software feature).
-                    For the Git download page, see
-                    <ulink url='http://git-scm.com/download'></ulink>.
-                    </para></listitem>
-                <listitem><para>
-                    For examples beyond the limited few in this section on how
-                    to use Git with the Yocto Project, see the
-                    "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
-                    section in the Yocto Project Development Tasks Manual.
-                    </para></listitem>
-            </itemizedlist>
-        </note>
-    </para>
-
-    <section id='repositories-tags-and-branches'>
-        <title>Repositories, Tags, and Branches</title>
-
-        <para>
-            As mentioned briefly in the previous section and also in the
-            "<link linkend='workflows'>Workflows</link>" section,
-            the Yocto Project maintains source repositories at
-            <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
-            If you look at this web-interface of the repositories, each item
-            is a separate Git repository.
-        </para>
-
-        <para>
-            Git repositories use branching techniques that track content
-            change (not files) within a project (e.g. a new feature or updated
-            documentation).
-            Creating a tree-like structure based on project divergence allows
-            for excellent historical information over the life of a project.
-            This methodology also allows for an environment from which you can
-            do lots of local experimentation on projects as you develop
-            changes or new features.
-        </para>
-
-        <para>
-            A Git repository represents all development efforts for a given
-            project.
-            For example, the Git repository <filename>poky</filename> contains
-            all changes and developments for Poky over the course of its
-            entire life.
-            That means that all changes that make up all releases are captured.
-            The repository maintains a complete history of changes.
-        </para>
-
-        <para>
-            You can create a local copy of any repository by "cloning" it
-            with the <filename>git clone</filename> command.
-            When you clone a Git repository, you end up with an identical
-            copy of the repository on your development system.
-            Once you have a local copy of a repository, you can take steps to
-            develop locally.
-            For examples on how to clone Git repositories, see the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
-            section in the Yocto Project Development Tasks Manual.
-        </para>
-
-        <para>
-            It is important to understand that Git tracks content change and
-            not files.
-            Git uses "branches" to organize different development efforts.
-            For example, the <filename>poky</filename> repository has
-            several branches that include the current "&DISTRO_NAME_NO_CAP;"
-            branch, the "master" branch, and many branches for past
-            Yocto Project releases.
-            You can see all the branches by going to
-            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
-            clicking on the
-            <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename>
-            link beneath the "Branch" heading.
-        </para>
-
-        <para>
-            Each of these branches represents a specific area of development.
-            The "master" branch represents the current or most recent
-            development.
-            All other branches represent offshoots of the "master" branch.
-        </para>
-
-        <para>
-            When you create a local copy of a Git repository, the copy has
-            the same set of branches as the original.
-            This means you can use Git to create a local working area
-            (also called a branch) that tracks a specific development branch
-            from the upstream source Git repository.
-            in other words, you can define your local Git environment to
-            work on any development branch in the repository.
-            To help illustrate, consider the following example Git commands:
-            <literallayout class='monospaced'>
-     $ cd ~
-     $ git clone git://git.yoctoproject.org/poky
-     $ cd poky
-     $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
-            </literallayout>
-            In the previous example after moving to the home directory, the
-            <filename>git clone</filename> command creates a
-            local copy of the upstream <filename>poky</filename> Git repository.
-            By default, Git checks out the "master" branch for your work.
-            After changing the working directory to the new local repository
-            (i.e. <filename>poky</filename>), the
-            <filename>git checkout</filename> command creates
-            and checks out a local branch named "&DISTRO_NAME_NO_CAP;", which
-            tracks the upstream "origin/&DISTRO_NAME_NO_CAP;" branch.
-            Changes you make while in this branch would ultimately affect
-            the upstream "&DISTRO_NAME_NO_CAP;" branch of the
-            <filename>poky</filename> repository.
-        </para>
-
-        <para>
-            It is important to understand that when you create and checkout a
-            local working branch based on a branch name,
-            your local environment matches the "tip" of that particular
-            development branch at the time you created your local branch,
-            which could be different from the files in the "master" branch
-            of the upstream repository.
-            In other words, creating and checking out a local branch based on
-            the "&DISTRO_NAME_NO_CAP;" branch name is not the same as
-            cloning and checking out the "master" branch if the repository.
-            Keep reading to see how you create a local snapshot of a Yocto
-            Project Release.
-        </para>
-
-        <para>
-            Git uses "tags" to mark specific changes in a repository.
-            Typically, a tag is used to mark a special point such as the final
-            change before a project is released.
-            You can see the tags used with the <filename>poky</filename> Git
-            repository by going to
-            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
-            clicking on the
-            <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename>
-            link beneath the "Tag" heading.
-        </para>
-
-        <para>
-            Some key tags for the <filename>poky</filename> are
-            <filename>jethro-14.0.3</filename>,
-            <filename>morty-16.0.1</filename>,
-            <filename>pyro-17.0.0</filename>, and
-            <filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
-            These tags represent Yocto Project releases.
-        </para>
-
-        <para>
-            When you create a local copy of the Git repository, you also
-            have access to all the tags in the upstream repository.
-            Similar to branches, you can create and checkout a local working
-            Git branch based on a tag name.
-            When you do this, you get a snapshot of the Git repository that
-            reflects the state of the files when the change was made associated
-            with that tag.
-            The most common use is to checkout a working branch that matches
-            a specific Yocto Project release.
-            Here is an example:
-            <literallayout class='monospaced'>
-     $ cd ~
-     $ git clone git://git.yoctoproject.org/poky
-     $ cd poky
-     $ git fetch --all --tags --prune
-     $ git checkout tags/pyro-17.0.0 -b my-pyro-17.0.0
-            </literallayout>
-            In this example, the name of the top-level directory of your
-            local Yocto Project repository is <filename>poky</filename>.
-            After moving to the <filename>poky</filename> directory, the
-            <filename>git fetch</filename> command makes all the upstream
-            tags available locally in your repository.
-            Finally, the <filename>git checkout</filename> command
-            creates and checks out a branch named "my-pyro-17.0.0" that is
-            based on the specific change upstream in the repository
-            associated with the "pyro-17.0.0" tag.
-            The files in your repository now exactly match that particular
-            Yocto Project release as it is tagged in the upstream Git
-            repository.
-            It is important to understand that when you create and
-            checkout a local working branch based on a tag, your environment
-            matches a specific point in time and not the entire development
-            branch (i.e. the "tip" of the branch).
-        </para>
-    </section>
-
-    <section id='basic-commands'>
-        <title>Basic Commands</title>
-
-        <para>
-            Git has an extensive set of commands that lets you manage changes
-            and perform collaboration over the life of a project.
-            Conveniently though, you can manage with a small set of basic
-            operations and workflows once you understand the basic
-            philosophy behind Git.
-            You do not have to be an expert in Git to be functional.
-            A good place to look for instruction on a minimal set of Git
-            commands is
-            <ulink url='http://git-scm.com/documentation'>here</ulink>.
-        </para>
-
-        <para>
-            If you do not know much about Git, you should educate
-            yourself by visiting the links previously mentioned.
-        </para>
-
-        <para>
-            The following list of Git commands briefly describes some basic
-            Git operations as a way to get started.
-            As with any set of commands, this list (in most cases) simply shows
-            the base command and omits the many arguments they support.
-            See the Git documentation for complete descriptions and strategies
-            on how to use these commands:
-            <itemizedlist>
-                <listitem><para>
-                    <emphasis><filename>git init</filename>:</emphasis>
-                    Initializes an empty Git repository.
-                    You cannot use Git commands unless you have a
-                    <filename>.git</filename> repository.
-                    </para></listitem>
-                <listitem><para id='git-commands-clone'>
-                    <emphasis><filename>git clone</filename>:</emphasis>
-                    Creates a local clone of a Git repository that is on
-                    equal footing with a fellow developer’s Git repository
-                    or an upstream repository.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git add</filename>:</emphasis>
-                    Locally stages updated file contents to the index that
-                    Git uses to track changes.
-                    You must stage all files that have changed before you
-                    can commit them.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git commit</filename>:</emphasis>
-                    Creates a local "commit" that documents the changes you
-                    made.
-                    Only changes that have been staged can be committed.
-                    Commits are used for historical purposes, for determining
-                    if a maintainer of a project will allow the change,
-                    and for ultimately pushing the change from your local
-                    Git repository into the project’s upstream repository.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git status</filename>:</emphasis>
-                    Reports any modified files that possibly need to be
-                    staged and gives you a status of where you stand regarding
-                    local commits as compared to the upstream repository.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis>
-                    Changes your working branch.
-                    This command is analogous to "cd".
-                    </para></listitem>
-                <listitem><para><emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable>:</emphasis>
-                    Creates and checks out a working branch on your local
-                    machine that you can use to isolate your work.
-                    It is a good idea to use local branches when adding
-                    specific features or changes.
-                    Using isolated branches facilitates easy removal of
-                    changes if they do not work out.
-                    </para></listitem>
-                <listitem><para><emphasis><filename>git branch</filename>:</emphasis>
-                    Displays the existing local branches associated with your
-                    local repository.
-                    The branch that you have currently checked out is noted
-                    with an asterisk character.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git branch -D</filename> <replaceable>branch-name</replaceable>:</emphasis>
-                    Deletes an existing local branch.
-                    You need to be in a local branch other than the one you
-                    are deleting in order to delete
-                    <replaceable>branch-name</replaceable>.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git pull</filename>:</emphasis>
-                    Retrieves information from an upstream Git repository
-                    and places it in your local Git repository.
-                    You use this command to make sure you are synchronized with
-                    the repository from which you are basing changes
-                    (.e.g. the "master" branch).
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git push</filename>:</emphasis>
-                    Sends all your committed local changes to the upstream Git
-                    repository that your local repository is tracking
-                    (e.g. a contribution repository).
-                    The maintainer of the project draws from these repositories
-                    to merge changes (commits) into the appropriate branch
-                    of project's upstream repository.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git merge</filename>:</emphasis>
-                    Combines or adds changes from one
-                    local branch of your repository with another branch.
-                    When you create a local Git repository, the default branch
-                    is named "master".
-                    A typical workflow is to create a temporary branch that is
-                    based off "master" that you would use for isolated work.
-                    You would make your changes in that isolated branch,
-                    stage and commit them locally, switch to the "master"
-                    branch, and then use the <filename>git merge</filename>
-                    command to apply the changes from your isolated branch
-                    into the currently checked out branch (e.g. "master").
-                    After the merge is complete and if you are done with
-                    working in that isolated branch, you can safely delete
-                    the isolated branch.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git cherry-pick</filename>:</emphasis>
-                    Choose and apply specific commits from one branch
-                    into another branch.
-                    There are times when you might not be able to merge
-                    all the changes in one branch with
-                    another but need to pick out certain ones.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>gitk</filename>:</emphasis>
-                    Provides a GUI view of the branches and changes in your
-                    local Git repository.
-                    This command is a good way to graphically see where things
-                    have diverged in your local repository.
-                    <note>
-                        You need to install the <filename>gitk</filename>
-                        package on your development system to use this
-                        command.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git log</filename>:</emphasis>
-                    Reports a history of your commits to the repository.
-                    This report lists all commits regardless of whether you
-                    have pushed them upstream or not.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis><filename>git diff</filename>:</emphasis>
-                    Displays line-by-line differences between a local
-                    working file and the same file as understood by Git.
-                    This command is useful to see what you have changed
-                    in any given file.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-</section>
-
-<section id='yocto-project-repositories'>
-    <title>Yocto Project Source Repositories</title>
-
-    <para>
-        The Yocto Project team maintains complete source repositories for all
-        Yocto Project files at
-        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
-        This web-based source code browser is organized into categories by
-        function such as IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and
-        so forth.
-        From the interface, you can click on any particular item in the "Name"
-        column and see the URL at the bottom of the page that you need to clone
-        a Git repository for that particular item.
-        Having a local Git repository of the
-        <link linkend='source-directory'>Source Directory</link>, which is
-        usually named "poky", allows
-        you to make changes, contribute to the history, and ultimately enhance
-        the Yocto Project's tools, Board Support Packages, and so forth.
-    </para>
-
-    <para>
-        For any supported release of Yocto Project, you can also go to the
-        <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and
-        select the "Downloads" tab and get a released tarball of the
-        <filename>poky</filename> repository or any supported BSP tarballs.
-        Unpacking these tarballs gives you a snapshot of the released
-        files.
-        <note><title>Notes</title>
-            <itemizedlist>
-                <listitem><para>
-                    The recommended method for setting up the Yocto Project
-                    <link linkend='source-directory'>Source Directory</link>
-                    and the files for supported BSPs
-                    (e.g., <filename>meta-intel</filename>) is to use
-                    <link linkend='git'>Git</link> to create a local copy of
-                    the upstream repositories.
-                    </para></listitem>
-                <listitem><para>
-                    Be sure to always work in matching branches for both
-                    the selected BSP repository and the
-                    <link linkend='source-directory'>Source Directory</link>
-                    (i.e. <filename>poky</filename>) repository.
-                    For example, if you have checked out the "master" branch
-                    of <filename>poky</filename> and you are going to use
-                    <filename>meta-intel</filename>, be sure to checkout the
-                    "master" branch of <filename>meta-intel</filename>.
-                    </para></listitem>
-            </itemizedlist>
-        </note>
-    </para>
-
-    <para>
-        In summary, here is where you can get the project files needed for
-        development:
-        <itemizedlist>
-            <listitem><para id='source-repositories'>
-                <emphasis>
-                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Source Repositories:</ulink>
-                </emphasis>
-                This area contains IDE Plugins, Matchbox, Poky, Poky Support,
-                Tools, Yocto Linux Kernel, and Yocto Metadata Layers.
-                You can create local copies of Git repositories for each of
-                these areas.</para>
-
-                <para>
-                <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
-                For steps on how to view and access these upstream Git
-                repositories, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-source-repositories'>Accessing Source Repositories</ulink>"
-                Section in the Yocto Project Development Tasks Manual.
-                </para></listitem>
-            <listitem><para><anchor id='index-downloads' />
-                <emphasis>
-                <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink>
-                </emphasis>
-                This is an index of releases such as
-                the <trademark class='trade'>Eclipse</trademark>
-                Yocto Plug-in, miscellaneous support, Poky, Pseudo, installers
-                for cross-development toolchains, and all released versions of
-                Yocto Project in the form of images or tarballs.
-                Downloading and extracting these files does not produce a local
-                copy of the Git repository but rather a snapshot of a
-                particular release or image.</para>
-
-                <para>
-                <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="3.5in" />
-                For steps on how to view and access these files, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-index-of-releases'>Accessing Index of Releases</ulink>"
-                section in the Yocto Project Development Tasks Manual.
-                </para></listitem>
-            <listitem><para id='downloads-page'>
-                <emphasis>"Downloads" page for the
-                <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
-                </emphasis></para>
-
-                <para role="writernotes">This section will change due to
-                reworking of the YP Website.</para>
-
-                <para>The Yocto Project website includes a "Downloads" tab
-                that allows you to download any Yocto Project
-                release and Board Support Package (BSP) in tarball form.
-                The tarballs are similar to those found in the
-                <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink> area.</para>
-
-                <para>
-                <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
-                For steps on how to use the "Downloads" page, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-downloads-page'>Using the Downloads Page</ulink>"
-                section in the Yocto Project Development Tasks Manual.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-</section>
-
-<section id='licensing'>
-    <title>Licensing</title>
-
-    <para>
-        Because open source projects are open to the public, they have
-        different licensing structures in place.
-        License evolution for both Open Source and Free Software has an
-        interesting history.
-        If you are interested in this history, you can find basic information
-        here:
-        <itemizedlist>
-            <listitem><para>
-                <ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
-                </para></listitem>
-            <listitem><para>
-                <ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license history</ulink>
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        In general, the Yocto Project is broadly licensed under the
-        Massachusetts Institute of Technology (MIT) License.
-        MIT licensing permits the reuse of software within proprietary
-        software as long as the license is distributed with that software.
-        MIT is also compatible with the GNU General Public License (GPL).
-        Patches to the Yocto Project follow the upstream licensing scheme.
-        You can find information on the MIT license
-        <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
-        You can find information on the GNU GPL
-        <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>here</ulink>.
-    </para>
-
-    <para>
-        When you build an image using the Yocto Project, the build process
-        uses a known list of licenses to ensure compliance.
-        You can find this list in the
-        <link linkend='source-directory'>Source Directory</link> at
-        <filename>meta/files/common-licenses</filename>.
-        Once the build completes, the list of all licenses found and used
-        during that build are kept in the
-        <link linkend='build-directory'>Build Directory</link>
-        at <filename>tmp/deploy/licenses</filename>.
-    </para>
-
-    <para>
-        If a module requires a license that is not in the base list, the
-        build process generates a warning during the build.
-        These tools make it easier for a developer to be certain of the
-        licenses with which their shipped products must comply.
-        However, even with these tools it is still up to the developer to
-        resolve potential licensing issues.
-    </para>
-
-    <para>
-        The base list of licenses used by the build process is a combination
-        of the Software Package Data Exchange (SPDX) list and the Open
-        Source Initiative (OSI) projects.
-        <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of
-        the Linux Foundation that maintains a specification for a standard
-        format for communicating the components, licenses, and copyrights
-        associated with a software package.
-        <ulink url='http://opensource.org'>OSI</ulink> is a corporation
-        dedicated to the Open Source Definition and the effort for reviewing
-        and approving licenses that conform to the Open Source Definition
-        (OSD).
-    </para>
-
-    <para>
-        You can find a list of the combined SPDX and OSI licenses that the
-        Yocto Project uses in the
-        <filename>meta/files/common-licenses</filename> directory in your
-        <link linkend='source-directory'>Source Directory</link>.
-    </para>
-
-    <para>
-        For information that can help you maintain compliance with various
-        open source licensing during the lifecycle of a product created using
-        the Yocto Project, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
-        section in the Yocto Project Development Tasks Manual.
-    </para>
-</section>
-
-<section id='recipe-syntax'>
-    <title>Recipe Syntax</title>
-
-    <para>
-        Understanding recipe file syntax is important for
-        writing recipes.
-        The following list overviews the basic items that make up a
-        BitBake recipe file.
-        For more complete BitBake syntax descriptions, see the
-        "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>"
-        chapter of the BitBake User Manual.
-        <itemizedlist>
-            <listitem><para><emphasis>Variable Assignments and Manipulations:</emphasis>
-                Variable assignments allow a value to be assigned to a
-                variable.
-                The assignment can be static text or might include
-                the contents of other variables.
-                In addition to the assignment, appending and prepending
-                operations are also supported.</para>
-                <para>The following example shows some of the ways
-                you can use variables in recipes:
-                <literallayout class='monospaced'>
-     S = "${WORKDIR}/postfix-${PV}"
-     CFLAGS += "-DNO_ASM"
-     SRC_URI_append = " file://fixup.patch"
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Functions:</emphasis>
-                Functions provide a series of actions to be performed.
-                You usually use functions to override the default
-                implementation of a task function or to complement
-                a default function (i.e. append or prepend to an
-                existing function).
-                Standard functions use <filename>sh</filename> shell
-                syntax, although access to OpenEmbedded variables and
-                internal methods are also available.</para>
-                <para>The following is an example function from the
-                <filename>sed</filename> recipe:
-                <literallayout class='monospaced'>
-     do_install () {
-         autotools_do_install
-         install -d ${D}${base_bindir}
-         mv ${D}${bindir}/sed ${D}${base_bindir}/sed
-         rmdir ${D}${bindir}/
-     }
-                </literallayout>
-                It is also possible to implement new functions that
-                are called between existing tasks as long as the
-                new functions are not replacing or complementing the
-                default functions.
-                You can implement functions in Python
-                instead of shell.
-                Both of these options are not seen in the majority of
-                recipes.</para></listitem>
-            <listitem><para><emphasis>Keywords:</emphasis>
-                BitBake recipes use only a few keywords.
-                You use keywords to include common
-                functions (<filename>inherit</filename>), load parts
-                of a recipe from other files
-                (<filename>include</filename> and
-                <filename>require</filename>) and export variables
-                to the environment (<filename>export</filename>).</para>
-                <para>The following example shows the use of some of
-                these keywords:
-                <literallayout class='monospaced'>
-     export POSTCONF = "${STAGING_BINDIR}/postconf"
-     inherit autoconf
-     require otherfile.inc
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Comments:</emphasis>
-                Any lines that begin with the hash character
-                (<filename>#</filename>) are treated as comment lines
-                and are ignored:
-                <literallayout class='monospaced'>
-     # This is a comment
-                </literallayout>
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        This next list summarizes the most important and most commonly
-        used parts of the recipe syntax.
-        For more information on these parts of the syntax, you can
-        reference the
-        <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>
-        chapter in the BitBake User Manual.
-        <itemizedlist>
-            <listitem><para><emphasis>Line Continuation: <filename>\</filename></emphasis> -
-                Use the backward slash (<filename>\</filename>)
-                character to split a statement over multiple lines.
-                Place the slash character at the end of the line that
-                is to be continued on the next line:
-                <literallayout class='monospaced'>
-     VAR = "A really long \
-            line"
-                </literallayout>
-                <note>
-                    You cannot have any characters including spaces
-                    or tabs after the slash character.
-                </note>
-                </para></listitem>
-            <listitem><para>
-                <emphasis>Using Variables: <filename>${...}</filename></emphasis> -
-                Use the <filename>${<replaceable>VARNAME</replaceable>}</filename> syntax to
-                access the contents of a variable:
-                <literallayout class='monospaced'>
-     SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz"
-                </literallayout>
-                <note>
-                    It is important to understand that the value of a
-                    variable expressed in this form does not get
-                    substituted automatically.
-                    The expansion of these expressions happens
-                    on-demand later (e.g. usually when a function that
-                    makes reference to the variable executes).
-                    This behavior ensures that the values are most
-                    appropriate for the context in which they are
-                    finally used.
-                    On the rare occasion that you do need the variable
-                    expression to be expanded immediately, you can use
-                    the <filename>:=</filename> operator instead of
-                    <filename>=</filename> when you make the
-                    assignment, but this is not generally needed.
-                </note>
-                </para></listitem>
-            <listitem><para><emphasis>Quote All Assignments: <filename>"<replaceable>value</replaceable>"</filename></emphasis> -
-                Use double quotes around the value in all variable
-                assignments.
-                <literallayout class='monospaced'>
-     VAR1 = "${OTHERVAR}"
-     VAR2 = "The version is ${PV}"
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Conditional Assignment: <filename>?=</filename></emphasis> -
-                Conditional assignment is used to assign a value to
-                a variable, but only when the variable is currently
-                unset.
-                Use the question mark followed by the equal sign
-                (<filename>?=</filename>) to make a "soft" assignment
-                used for conditional assignment.
-                Typically, "soft" assignments are used in the
-                <filename>local.conf</filename> file for variables
-                that are allowed to come through from the external
-                environment.
-                </para>
-                <para>Here is an example where
-                <filename>VAR1</filename> is set to "New value" if
-                it is currently empty.
-                However, if <filename>VAR1</filename> has already been
-                set, it remains unchanged:
-                <literallayout class='monospaced'>
-     VAR1 ?= "New value"
-                </literallayout>
-                In this next example, <filename>VAR1</filename>
-                is left with the value "Original value":
-                <literallayout class='monospaced'>
-     VAR1 = "Original value"
-     VAR1 ?= "New value"
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Appending: <filename>+=</filename></emphasis> -
-                Use the plus character followed by the equals sign
-                (<filename>+=</filename>) to append values to existing
-                variables.
-                <note>
-                    This operator adds a space between the existing
-                    content of the variable and the new content.
-                </note></para>
-                <para>Here is an example:
-                <literallayout class='monospaced'>
-     SRC_URI += "file://fix-makefile.patch"
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Prepending: <filename>=+</filename></emphasis> -
-                Use the equals sign followed by the plus character
-                (<filename>=+</filename>) to prepend values to existing
-                variables.
-                <note>
-                    This operator adds a space between the new content
-                    and the existing content of the variable.
-                </note></para>
-                <para>Here is an example:
-                <literallayout class='monospaced'>
-     VAR =+ "Starts"
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Appending: <filename>_append</filename></emphasis> -
-                Use the <filename>_append</filename> operator to
-                append values to existing variables.
-                This operator does not add any additional space.
-                Also, the operator is applied after all the
-                <filename>+=</filename>, and
-                <filename>=+</filename> operators have been applied and
-                after all <filename>=</filename> assignments have
-                occurred.
-                </para>
-                <para>The following example shows the space being
-                explicitly added to the start to ensure the appended
-                value is not merged with the existing value:
-                <literallayout class='monospaced'>
-     SRC_URI_append = " file://fix-makefile.patch"
-                </literallayout>
-                You can also use the <filename>_append</filename>
-                operator with overrides, which results in the actions
-                only being performed for the specified target or
-                machine:
-                <literallayout class='monospaced'>
-     SRC_URI_append_sh4 = " file://fix-makefile.patch"
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Prepending: <filename>_prepend</filename></emphasis> -
-                Use the <filename>_prepend</filename> operator to
-                prepend values to existing variables.
-                This operator does not add any additional space.
-                Also, the operator is applied after all the
-                <filename>+=</filename>, and
-                <filename>=+</filename> operators have been applied and
-                after all <filename>=</filename> assignments have
-                occurred.
-                </para>
-                <para>The following example shows the space being
-                explicitly added to the end to ensure the prepended
-                value is not merged with the existing value:
-                <literallayout class='monospaced'>
-     CFLAGS_prepend = "-I${S}/myincludes "
-                </literallayout>
-                You can also use the <filename>_prepend</filename>
-                operator with overrides, which results in the actions
-                only being performed for the specified target or
-                machine:
-                <literallayout class='monospaced'>
-     CFLAGS_prepend_sh4 = "-I${S}/myincludes "
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Overrides:</emphasis> -
-                You can use overrides to set a value conditionally,
-                typically based on how the recipe is being built.
-                For example, to set the
-                <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>
-                variable's value to "standard/base" for any target
-                <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
-                except for qemuarm where it should be set to
-                "standard/arm-versatile-926ejs", you would do the
-                following:
-                <literallayout class='monospaced'>
-     KBRANCH = "standard/base"
-     KBRANCH_qemuarm  = "standard/arm-versatile-926ejs"
-                </literallayout>
-                Overrides are also used to separate alternate values
-                of a variable in other situations.
-                For example, when setting variables such as
-                <link linkend='var-FILES'><filename>FILES</filename></link>
-                and
-                <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
-                that are specific to individual packages produced by
-                a recipe, you should always use an override that
-                specifies the name of the package.
-                </para></listitem>
-            <listitem><para><emphasis>Indentation:</emphasis>
-                Use spaces for indentation rather than than tabs.
-                For shell functions, both currently work.
-                However, it is a policy decision of the Yocto Project
-                to use tabs in shell functions.
-                Realize that some layers have a policy to use spaces
-                for all indentation.
-                </para></listitem>
-            <listitem><para><emphasis>Using Python for Complex Operations: <filename>${@<replaceable>python_code</replaceable>}</filename></emphasis> -
-                For more advanced processing, it is possible to use
-                Python code during variable assignments (e.g.
-                search and replacement on a variable).</para>
-                <para>You indicate Python code using the
-                <filename>${@<replaceable>python_code</replaceable>}</filename>
-                syntax for the variable assignment:
-                <literallayout class='monospaced'>
-     SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz
-                </literallayout>
-                </para></listitem>
-            <listitem><para><emphasis>Shell Function Syntax:</emphasis>
-                Write shell functions as if you were writing a shell
-                script when you describe a list of actions to take.
-                You should ensure that your script works with a generic
-                <filename>sh</filename> and that it does not require
-                any <filename>bash</filename> or other shell-specific
-                functionality.
-                The same considerations apply to various system
-                utilities (e.g. <filename>sed</filename>,
-                <filename>grep</filename>, <filename>awk</filename>,
-                and so forth) that you might wish to use.
-                If in doubt, you should check with multiple
-                implementations - including those from BusyBox.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-</section>
-
-<section id="development-concepts">
-    <title>Development Concepts</title>
-
-    <para>
-        This section takes a more detailed look inside the development
-        process.
-        The following diagram represents development at a high level.
-        The remainder of this chapter expands on the fundamental input, output,
-        process, and
-        <link linkend='metadata'>Metadata</link>) blocks
-        that make up development in the Yocto Project environment.
-    </para>
-
-    <para id='general-yocto-environment-figure'>
-        <imagedata fileref="figures/yocto-environment-ref.png" align="center" width="8in" depth="4.25in" />
-    </para>
-
-    <para>
-        In general, development consists of several functional areas:
-        <itemizedlist>
-            <listitem><para><emphasis>User Configuration:</emphasis>
-                Metadata you can use to control the build process.
-                </para></listitem>
-            <listitem><para><emphasis>Metadata Layers:</emphasis>
-                Various layers that provide software, machine, and
-                distro Metadata.</para></listitem>
-            <listitem><para><emphasis>Source Files:</emphasis>
-                Upstream releases, local projects, and SCMs.</para></listitem>
-            <listitem><para><emphasis>Build System:</emphasis>
-                Processes under the control of
-                <link linkend='bitbake-term'>BitBake</link>.
-                This block expands on how BitBake fetches source, applies
-                patches, completes compilation, analyzes output for package
-                generation, creates and tests packages, generates images, and
-                generates cross-development tools.</para></listitem>
-            <listitem><para><emphasis>Package Feeds:</emphasis>
-                Directories containing output packages (RPM, DEB or IPK),
-                which are subsequently used in the construction of an image or
-                SDK, produced by the build system.
-                These feeds can also be copied and shared using a web server or
-                other means to facilitate extending or updating existing
-                images on devices at runtime if runtime package management is
-                enabled.</para></listitem>
-            <listitem><para><emphasis>Images:</emphasis>
-                Images produced by the development process.
-                </para></listitem>
-            <listitem><para><emphasis>Application Development SDK:</emphasis>
-                Cross-development tools that are produced along with an image
-                or separately with BitBake.</para></listitem>
-        </itemizedlist>
-    </para>
-
-    <section id="user-configuration">
-        <title>User Configuration</title>
-
-        <para>
-            User configuration helps define the build.
-            Through user configuration, you can tell BitBake the
-            target architecture for which you are building the image,
-            where to store downloaded source, and other build properties.
-        </para>
-
-        <para>
-            The following figure shows an expanded representation of the
-            "User Configuration" box of the
-            <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
-        </para>
-
-        <para>
-            <imagedata fileref="figures/user-configuration.png" align="center" />
-        </para>
-
-        <para>
-            BitBake needs some basic configuration files in order to complete
-            a build.
-            These files are <filename>*.conf</filename> files.
-            The minimally necessary ones reside as example files in the
-            <link linkend='source-directory'>Source Directory</link>.
-            For simplicity, this section refers to the Source Directory as
-            the "Poky Directory."
-        </para>
-
-        <para>
-            When you clone the <filename>poky</filename> Git repository or you
-            download and unpack a Yocto Project release, you can set up the
-            Source Directory to be named anything you want.
-            For this discussion, the cloned repository uses the default
-            name <filename>poky</filename>.
-            <note>
-                The Poky repository is primarily an aggregation of existing
-                repositories.
-                It is not a canonical upstream source.
-            </note>
-        </para>
-
-        <para>
-            The <filename>meta-poky</filename> layer inside Poky contains
-            a <filename>conf</filename> directory that has example
-            configuration files.
-            These example files are used as a basis for creating actual
-            configuration files when you source the build environment
-            script
-            (i.e.
-            <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
-        </para>
-
-        <para>
-            Sourcing the build environment script creates a
-            <link linkend='build-directory'>Build Directory</link>
-            if one does not already exist.
-            BitBake uses the Build Directory for all its work during builds.
-            The Build Directory has a <filename>conf</filename> directory that
-            contains default versions of your <filename>local.conf</filename>
-            and <filename>bblayers.conf</filename> configuration files.
-            These default configuration files are created only if versions
-            do not already exist in the Build Directory at the time you
-            source the build environment setup script.
-        </para>
-
-        <para>
-            Because the Poky repository is fundamentally an aggregation of
-            existing repositories, some users might be familiar with running
-            the <filename>&OE_INIT_FILE;</filename> script in the context
-            of separate OpenEmbedded-Core and BitBake repositories rather than a
-            single Poky repository.
-            This discussion assumes the script is executed from within a cloned
-            or unpacked version of Poky.
-        </para>
-
-        <para>
-            Depending on where the script is sourced, different sub-scripts
-            are called to set up the Build Directory (Yocto or OpenEmbedded).
-            Specifically, the script
-            <filename>scripts/oe-setup-builddir</filename> inside the
-            poky directory sets up the Build Directory and seeds the directory
-            (if necessary) with configuration files appropriate for the
-            Yocto Project development environment.
-            <note>
-                The <filename>scripts/oe-setup-builddir</filename> script
-                uses the <filename>$TEMPLATECONF</filename> variable to
-                determine which sample configuration files to locate.
-            </note>
-        </para>
-
-        <para>
-            The <filename>local.conf</filename> file provides many
-            basic variables that define a build environment.
-            Here is a list of a few.
-            To see the default configurations in a <filename>local.conf</filename>
-            file created by the build environment script, see the
-            <filename>local.conf.sample</filename> in the
-            <filename>meta-poky</filename> layer:
-            <itemizedlist>
-                <listitem><para><emphasis>Parallelism Options:</emphasis>
-                    Controlled by the
-                    <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>,
-                    <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>,
-                    and
-                    <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename></ulink>
-                    variables.</para></listitem>
-                <listitem><para><emphasis>Target Machine Selection:</emphasis>
-                    Controlled by the
-                    <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
-                    variable.</para></listitem>
-                <listitem><para><emphasis>Download Directory:</emphasis>
-                    Controlled by the
-                    <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
-                    variable.</para></listitem>
-                <listitem><para><emphasis>Shared State Directory:</emphasis>
-                    Controlled by the
-                    <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
-                    variable.</para></listitem>
-                <listitem><para><emphasis>Build Output:</emphasis>
-                    Controlled by the
-                    <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
-                    variable.</para></listitem>
-            </itemizedlist>
-            <note>
-                Configurations set in the <filename>conf/local.conf</filename>
-                file can also be set in the
-                <filename>conf/site.conf</filename> and
-                <filename>conf/auto.conf</filename> configuration files.
-            </note>
-        </para>
-
-        <para>
-            The <filename>bblayers.conf</filename> file tells BitBake what
-            layers you want considered during the build.
-            By default, the layers listed in this file include layers
-            minimally needed by the build system.
-            However, you must manually add any custom layers you have created.
-            You can find more information on working with the
-            <filename>bblayers.conf</filename> file in the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
-            section in the Yocto Project Development Tasks Manual.
-        </para>
-
-        <para>
-            The files <filename>site.conf</filename> and
-            <filename>auto.conf</filename> are not created by the environment
-            initialization script.
-            If you want the <filename>site.conf</filename> file, you need to
-            create that yourself.
-            The <filename>auto.conf</filename> file is typically created by
-            an autobuilder:
-            <itemizedlist>
-                <listitem><para><emphasis><filename>site.conf</filename>:</emphasis>
-                    You can use the <filename>conf/site.conf</filename>
-                    configuration file to configure multiple build directories.
-                    For example, suppose you had several build environments and
-                    they shared some common features.
-                    You can set these default build properties here.
-                    A good example is perhaps the packaging format to use
-                    through the
-                    <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
-                    variable.</para>
-                    <para>One useful scenario for using the
-                    <filename>conf/site.conf</filename> file is to extend your
-                    <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
-                    variable to include the path to a
-                    <filename>conf/site.conf</filename>.
-                    Then, when BitBake looks for Metadata using
-                    <filename>BBPATH</filename>, it finds the
-                    <filename>conf/site.conf</filename> file and applies your
-                    common configurations found in the file.
-                    To override configurations in a particular build directory,
-                    alter the similar configurations within that build
-                    directory's <filename>conf/local.conf</filename> file.
-                    </para></listitem>
-                <listitem><para><emphasis><filename>auto.conf</filename>:</emphasis>
-                    The file is usually created and written to by
-                    an autobuilder.
-                    The settings put into the file are typically the same as
-                    you would find in the <filename>conf/local.conf</filename>
-                    or the <filename>conf/site.conf</filename> files.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-
-        <para>
-            You can edit all configuration files to further define
-            any particular build environment.
-            This process is represented by the "User Configuration Edits"
-            box in the figure.
-        </para>
-
-        <para>
-            When you launch your build with the
-            <filename>bitbake <replaceable>target</replaceable></filename>
-            command, BitBake sorts out the configurations to ultimately
-            define your build environment.
-            It is important to understand that the OpenEmbedded build system
-            reads the configuration files in a specific order:
-            <filename>site.conf</filename>, <filename>auto.conf</filename>,
-            and <filename>local.conf</filename>.
-            And, the build system applies the normal assignment statement
-            rules.
-            Because the files are parsed in a specific order, variable
-            assignments for the same variable could be affected.
-            For example, if the <filename>auto.conf</filename> file and
-            the <filename>local.conf</filename> set
-            <replaceable>variable1</replaceable> to different values, because
-            the build system parses <filename>local.conf</filename> after
-            <filename>auto.conf</filename>,
-            <replaceable>variable1</replaceable> is assigned the value from
-            the <filename>local.conf</filename> file.
-        </para>
-    </section>
-
-    <section id="metadata-machine-configuration-and-policy-configuration">
-        <title>Metadata, Machine Configuration, and Policy Configuration</title>
-
-        <para>
-            The previous section described the user configurations that
-            define BitBake's global behavior.
-            This section takes a closer look at the layers the build system
-            uses to further control the build.
-            These layers provide Metadata for the software, machine, and
-            policy.
-        </para>
-
-        <para>
-            In general, three types of layer input exist:
-            <itemizedlist>
-                <listitem><para><emphasis>Policy Configuration:</emphasis>
-                    Distribution Layers provide top-level or general
-                    policies for the image or SDK being built.
-                    For example, this layer would dictate whether BitBake
-                    produces RPM or IPK packages.</para></listitem>
-                <listitem><para><emphasis>Machine Configuration:</emphasis>
-                    Board Support Package (BSP) layers provide machine
-                    configurations.
-                    This type of information is specific to a particular
-                    target architecture.</para></listitem>
-                <listitem><para><emphasis>Metadata:</emphasis>
-                    Software layers contain user-supplied recipe files,
-                    patches, and append files.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-
-        <para>
-            The following figure shows an expanded representation of the
-            Metadata, Machine Configuration, and Policy Configuration input
-            (layers) boxes of the
-            <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
-        </para>
-
-        <para>
-            <imagedata fileref="figures/layer-input.png" align="center" width="8in" depth="7.5in" />
-        </para>
-
-        <para>
-            In general, all layers have a similar structure.
-            They all contain a licensing file
-            (e.g. <filename>COPYING</filename>) if the layer is to be
-            distributed, a <filename>README</filename> file as good practice
-            and especially if the layer is to be distributed, a
-            configuration directory, and recipe directories.
-        </para>
-
-        <para>
-            The Yocto Project has many layers that can be used.
-            You can see a web-interface listing of them on the
-            <ulink url="http://git.yoctoproject.org/">Source Repositories</ulink>
-            page.
-            The layers are shown at the bottom categorized under
-            "Yocto Metadata Layers."
-            These layers are fundamentally a subset of the
-            <ulink url="http://layers.openembedded.org/layerindex/layers/">OpenEmbedded Metadata Index</ulink>,
-            which lists all layers provided by the OpenEmbedded community.
-            <note>
-                Layers exist in the Yocto Project Source Repositories that
-                cannot be found in the OpenEmbedded Metadata Index.
-                These layers are either deprecated or experimental in nature.
-            </note>
-        </para>
-
-        <para>
-            BitBake uses the <filename>conf/bblayers.conf</filename> file,
-            which is part of the user configuration, to find what layers it
-            should be using as part of the build.
-        </para>
-
-        <para>
-            For more information on layers, see the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
-            section in the Yocto Project Development Tasks Manual.
-        </para>
-
-        <section id="distro-layer">
-            <title>Distro Layer</title>
-
-            <para>
-                The distribution layer provides policy configurations for your
-                distribution.
-                Best practices dictate that you isolate these types of
-                configurations into their own layer.
-                Settings you provide in
-                <filename>conf/distro/<replaceable>distro</replaceable>.conf</filename> override
-                similar
-                settings that BitBake finds in your
-                <filename>conf/local.conf</filename> file in the Build
-                Directory.
-            </para>
-
-            <para>
-                The following list provides some explanation and references
-                for what you typically find in the distribution layer:
-                <itemizedlist>
-                    <listitem><para><emphasis>classes:</emphasis>
-                        Class files (<filename>.bbclass</filename>) hold
-                        common functionality that can be shared among
-                        recipes in the distribution.
-                        When your recipes inherit a class, they take on the
-                        settings and functions for that class.
-                        You can read more about class files in the
-                        "<link linkend='ref-classes'>Classes</link>" section.
-                        </para></listitem>
-                    <listitem><para><emphasis>conf:</emphasis>
-                        This area holds configuration files for the
-                        layer (<filename>conf/layer.conf</filename>),
-                        the distribution
-                        (<filename>conf/distro/<replaceable>distro</replaceable>.conf</filename>),
-                        and any distribution-wide include files.
-                        </para></listitem>
-                    <listitem><para><emphasis>recipes-*:</emphasis>
-                        Recipes and append files that affect common
-                        functionality across the distribution.
-                        This area could include recipes and append files
-                        to add distribution-specific configuration,
-                        initialization scripts, custom image recipes,
-                        and so forth.</para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id="bsp-layer">
-            <title>BSP Layer</title>
-
-            <para>
-                The BSP Layer provides machine configurations.
-                Everything in this layer is specific to the machine for which
-                you are building the image or the SDK.
-                A common structure or form is defined for BSP layers.
-                You can learn more about this structure in the
-                <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
-                <note>
-                    In order for a BSP layer to be considered compliant with the
-                    Yocto Project, it must meet some structural requirements.
-                </note>
-            </para>
-
-            <para>
-                The BSP Layer's configuration directory contains
-                configuration files for the machine
-                (<filename>conf/machine/<replaceable>machine</replaceable>.conf</filename>) and,
-                of course, the layer (<filename>conf/layer.conf</filename>).
-            </para>
-
-            <para>
-                The remainder of the layer is dedicated to specific recipes
-                by function: <filename>recipes-bsp</filename>,
-                <filename>recipes-core</filename>,
-                <filename>recipes-graphics</filename>, and
-                <filename>recipes-kernel</filename>.
-                Metadata can exist for multiple formfactors, graphics
-                support systems, and so forth.
-                <note>
-                    While the figure shows several <filename>recipes-*</filename>
-                    directories, not all these directories appear in all
-                    BSP layers.
-                </note>
-            </para>
-        </section>
-
-        <section id="software-layer">
-            <title>Software Layer</title>
-
-            <para>
-                The software layer provides the Metadata for additional
-                software packages used during the build.
-                This layer does not include Metadata that is specific to the
-                distribution or the machine, which are found in their
-                respective layers.
-            </para>
-
-            <para>
-                This layer contains any new recipes that your project needs
-                in the form of recipe files.
-            </para>
-        </section>
-    </section>
-
-    <section id="sources-dev-environment">
-        <title>Sources</title>
-
-        <para>
-            In order for the OpenEmbedded build system to create an image or
-            any target, it must be able to access source files.
-            The
-            <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
-            represents source files using the "Upstream Project Releases",
-            "Local Projects", and "SCMs (optional)" boxes.
-            The figure represents mirrors, which also play a role in locating
-            source files, with the "Source Mirror(s)" box.
-        </para>
-
-        <para>
-            The method by which source files are ultimately organized is
-            a function of the project.
-            For example, for released software, projects tend to use tarballs
-            or other archived files that can capture the state of a release
-            guaranteeing that it is statically represented.
-            On the other hand, for a project that is more dynamic or
-            experimental in nature, a project might keep source files in a
-            repository controlled by a Source Control Manager (SCM) such as
-            Git.
-            Pulling source from a repository allows you to control
-            the point in the repository (the revision) from which you want to
-            build software.
-            Finally, a combination of the two might exist, which would give the
-            consumer a choice when deciding where to get source files.
-        </para>
-
-        <para>
-            BitBake uses the
-            <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
-            variable to point to source files regardless of their location.
-            Each recipe must have a <filename>SRC_URI</filename> variable
-            that points to the source.
-        </para>
-
-        <para>
-            Another area that plays a significant role in where source files
-            come from is pointed to by the
-            <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
-            variable.
-            This area is a cache that can hold previously downloaded source.
-            You can also instruct the OpenEmbedded build system to create
-            tarballs from Git repositories, which is not the default behavior,
-            and store them in the <filename>DL_DIR</filename> by using the
-            <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
-            variable.
-        </para>
-
-        <para>
-            Judicious use of a <filename>DL_DIR</filename> directory can
-            save the build system a trip across the Internet when looking
-            for files.
-            A good method for using a download directory is to have
-            <filename>DL_DIR</filename> point to an area outside of your
-            Build Directory.
-            Doing so allows you to safely delete the Build Directory
-            if needed without fear of removing any downloaded source file.
-        </para>
-
-        <para>
-            The remainder of this section provides a deeper look into the
-            source files and the mirrors.
-            Here is a more detailed look at the source file area of the
-            base figure:
-            <imagedata fileref="figures/source-input.png" align="center" width="7in" depth="7.5in" />
-        </para>
-
-        <section id='upstream-project-releases'>
-            <title>Upstream Project Releases</title>
-
-            <para>
-                Upstream project releases exist anywhere in the form of an
-                archived file (e.g. tarball or zip file).
-                These files correspond to individual recipes.
-                For example, the figure uses specific releases each for
-                BusyBox, Qt, and Dbus.
-                An archive file can be for any released product that can be
-                built using a recipe.
-            </para>
-        </section>
-
-        <section id='local-projects'>
-            <title>Local Projects</title>
-
-            <para>
-                Local projects are custom bits of software the user provides.
-                These bits reside somewhere local to a project - perhaps
-                a directory into which the user checks in items (e.g.
-                a local directory containing a development source tree
-                used by the group).
-            </para>
-
-            <para>
-                The canonical method through which to include a local project
-                is to use the
-                <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
-                class to include that local project.
-                You use either the <filename>local.conf</filename> or a
-                recipe's append file to override or set the
-                recipe to point to the local directory on your disk to pull
-                in the whole source tree.
-            </para>
-
-            <para>
-                For information on how to use the
-                <filename>externalsrc</filename> class, see the
-                "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
-                section.
-            </para>
-        </section>
-
-        <section id='scms'>
-            <title>Source Control Managers (Optional)</title>
-
-            <para>
-                Another place the build system can get source files from is
-                through an SCM such as Git or Subversion.
-                In this case, a repository is cloned or checked out.
-                The
-                <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
-                task inside BitBake uses
-                the <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
-                variable and the argument's prefix to determine the correct
-                fetcher module.
-            </para>
-
-            <note>
-                For information on how to have the OpenEmbedded build system
-                generate tarballs for Git repositories and place them in the
-                <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
-                directory, see the
-                <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
-                variable.
-            </note>
-
-            <para>
-                When fetching a repository, BitBake uses the
-                <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
-                variable to determine the specific revision from which to
-                build.
-            </para>
-        </section>
-
-        <section id='source-mirrors'>
-            <title>Source Mirror(s)</title>
-
-            <para>
-                Two kinds of mirrors exist: pre-mirrors and regular mirrors.
-                The <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
-                and
-                <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
-                variables point to these, respectively.
-                BitBake checks pre-mirrors before looking upstream for any
-                source files.
-                Pre-mirrors are appropriate when you have a shared directory
-                that is not a directory defined by the
-                <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
-                variable.
-                A Pre-mirror typically points to a shared directory that is
-                local to your organization.
-            </para>
-
-            <para>
-                Regular mirrors can be any site across the Internet that is
-                used as an alternative location for source code should the
-                primary site not be functioning for some reason or another.
-            </para>
-        </section>
-    </section>
-
-    <section id="package-feeds-dev-environment">
-        <title>Package Feeds</title>
-
-        <para>
-            When the OpenEmbedded build system generates an image or an SDK,
-            it gets the packages from a package feed area located in the
-            <link linkend='build-directory'>Build Directory</link>.
-            The
-            <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
-            shows this package feeds area in the upper-right corner.
-        </para>
-
-        <para>
-            This section looks a little closer into the package feeds area used
-            by the build system.
-            Here is a more detailed look at the area:
-            <imagedata fileref="figures/package-feeds.png" align="center" width="7in" depth="6in" />
-        </para>
-
-        <para>
-            Package feeds are an intermediary step in the build process.
-            The OpenEmbedded build system provides classes to generate
-            different package types, and you specify which classes to enable
-            through the
-            <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
-            variable.
-            Before placing the packages into package feeds,
-            the build process validates them with generated output quality
-            assurance checks through the
-            <link linkend='ref-classes-insane'><filename>insane</filename></link>
-            class.
-        </para>
-
-        <para>
-            The package feed area resides in the Build Directory.
-            The directory the build system uses to temporarily store packages
-            is determined by a combination of variables and the particular
-            package manager in use.
-            See the "Package Feeds" box in the illustration and note the
-            information to the right of that area.
-            In particular, the following defines where package files are
-            kept:
-            <itemizedlist>
-                <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
-                    Defined as <filename>tmp/deploy</filename> in the Build
-                    Directory.
-                    </para></listitem>
-                <listitem><para><filename>DEPLOY_DIR_*</filename>:
-                    Depending on the package manager used, the package type
-                    sub-folder.
-                    Given RPM, IPK, or DEB packaging and tarball creation, the
-                    <link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link>,
-                    <link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link>,
-                    <link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link>,
-                    or
-                    <link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link>,
-                    variables are used, respectively.
-                    </para></listitem>
-                <listitem><para><link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>:
-                    Defines architecture-specific sub-folders.
-                    For example, packages could exist for the i586 or qemux86
-                    architectures.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-
-        <para>
-            BitBake uses the <filename>do_package_write_*</filename> tasks to
-            generate packages and place them into the package holding area (e.g.
-            <filename>do_package_write_ipk</filename> for IPK packages).
-            See the
-            "<link linkend='ref-tasks-package_write_deb'><filename>do_package_write_deb</filename></link>",
-            "<link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>",
-            "<link linkend='ref-tasks-package_write_rpm'><filename>do_package_write_rpm</filename></link>",
-            and
-            "<link linkend='ref-tasks-package_write_tar'><filename>do_package_write_tar</filename></link>"
-            sections for additional information.
-            As an example, consider a scenario where an IPK packaging manager
-            is being used and package architecture support for both i586
-            and qemux86 exist.
-            Packages for the i586 architecture are placed in
-            <filename>build/tmp/deploy/ipk/i586</filename>, while packages for
-            the qemux86 architecture are placed in
-            <filename>build/tmp/deploy/ipk/qemux86</filename>.
-        </para>
-    </section>
-
-    <section id='bitbake-dev-environment'>
-        <title>BitBake</title>
-
-        <para>
-            The OpenEmbedded build system uses
-            <link linkend='bitbake-term'>BitBake</link>
-            to produce images.
-            You can see from the
-            <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
-            the BitBake area consists of several functional areas.
-            This section takes a closer look at each of those areas.
-        </para>
-
-        <para>
-            Separate documentation exists for the BitBake tool.
-            See the
-            <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>
-            for reference material on BitBake.
-        </para>
-
-        <section id='source-fetching-dev-environment'>
-            <title>Source Fetching</title>
-
-            <para>
-                The first stages of building a recipe are to fetch and unpack
-                the source code:
-                <imagedata fileref="figures/source-fetching.png" align="center" width="6.5in" depth="5in" />
-            </para>
-
-            <para>
-                The
-                <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
-                and
-                <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
-                tasks fetch the source files and unpack them into the work
-                directory.
-                <note>
-                    For every local file (e.g. <filename>file://</filename>)
-                    that is part of a recipe's
-                    <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
-                    statement, the OpenEmbedded build system takes a checksum
-                    of the file for the recipe and inserts the checksum into
-                    the signature for the <filename>do_fetch</filename>.
-                    If any local file has been modified, the
-                    <filename>do_fetch</filename> task and all tasks that
-                    depend on it are re-executed.
-                </note>
-                By default, everything is accomplished in the
-                <link linkend='build-directory'>Build Directory</link>,
-                which has a defined structure.
-                For additional general information on the Build Directory,
-                see the
-                "<link linkend='structure-core-build'><filename>build/</filename></link>"
-                section.
-            </para>
-
-            <para>
-                Unpacked source files are pointed to by the
-                <link linkend='var-S'><filename>S</filename></link> variable.
-                Each recipe has an area in the Build Directory where the
-                unpacked source code resides.
-                The name of that directory for any given recipe is defined from
-                several different variables.
-                You can see the variables that define these directories
-                by looking at the figure:
-                <itemizedlist>
-                    <listitem><para><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> -
-                        The base directory where the OpenEmbedded build system
-                        performs all its work during the build.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link> -
-                        The architecture of the built package or packages.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link> -
-                        The operating system of the target device.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PN'><filename>PN</filename></link> -
-                        The name of the built package.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PV'><filename>PV</filename></link> -
-                        The version of the recipe used to build the package.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PR'><filename>PR</filename></link> -
-                        The revision of the recipe used to build the package.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link> -
-                        The location within <filename>TMPDIR</filename> where
-                        a specific package is built.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-S'><filename>S</filename></link> -
-                        Contains the unpacked source files for a given recipe.
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='patching-dev-environment'>
-            <title>Patching</title>
-
-            <para>
-                Once source code is fetched and unpacked, BitBake locates
-                patch files and applies them to the source files:
-                <imagedata fileref="figures/patching.png" align="center" width="6in" depth="5in" />
-            </para>
-
-            <para>
-                The
-                <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
-                task processes recipes by
-                using the
-                <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
-                variable to locate applicable patch files, which by default
-                are <filename>*.patch</filename> or
-                <filename>*.diff</filename> files, or any file if
-                "apply=yes" is specified for the file in
-                <filename>SRC_URI</filename>.
-            </para>
-
-            <para>
-                BitBake finds and applies multiple patches for a single recipe
-                in the order in which it finds the patches.
-                Patches are applied to the recipe's source files located in the
-                <link linkend='var-S'><filename>S</filename></link> directory.
-            </para>
-
-            <para>
-                For more information on how the source directories are
-                created, see the
-                "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
-                section.
-            </para>
-        </section>
-
-        <section id='configuration-and-compilation-dev-environment'>
-            <title>Configuration and Compilation</title>
-
-            <para>
-                After source code is patched, BitBake executes tasks that
-                configure and compile the source code:
-                <imagedata fileref="figures/configuration-compile-autoreconf.png" align="center" width="7in" depth="5in" />
-            </para>
-
-            <para>
-                This step in the build process consists of three tasks:
-                <itemizedlist>
-                    <listitem><para>
-                        <emphasis><link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link>:</emphasis>
-                        This task sets up the two sysroots in
-                        <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>
-                        (i.e. <filename>recipe-sysroot</filename> and
-                        <filename>recipe-sysroot-native</filename>) so that
-                        the sysroots contain the contents of the
-                        <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
-                        tasks of the recipes on which the recipe
-                        containing the tasks depends.
-                        A sysroot exists for both the target and for the native
-                        binaries, which run on the host system.
-                        </para></listitem>
-                    <listitem><para><emphasis><filename>do_configure</filename>:</emphasis>
-                        This task configures the source by enabling and
-                        disabling any build-time and configuration options for
-                        the software being built.
-                        Configurations can come from the recipe itself as well
-                        as from an inherited class.
-                        Additionally, the software itself might configure itself
-                        depending on the target for which it is being built.
-                        </para>
-
-                        <para>The configurations handled by the
-                        <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
-                        task are specific
-                        to source code configuration for the source code
-                        being built by the recipe.</para>
-
-                        <para>If you are using the
-                        <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
-                        class,
-                        you can add additional configuration options by using
-                        the <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
-                        or
-                        <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
-                        variables.
-                        For information on how this variable works within
-                        that class, see the
-                        <filename>meta/classes/autotools.bbclass</filename> file.
-                        </para></listitem>
-                    <listitem><para><emphasis><filename>do_compile</filename>:</emphasis>
-                        Once a configuration task has been satisfied, BitBake
-                        compiles the source using the
-                        <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
-                        task.
-                        Compilation occurs in the directory pointed to by the
-                        <link linkend='var-B'><filename>B</filename></link>
-                        variable.
-                        Realize that the <filename>B</filename> directory is, by
-                        default, the same as the
-                        <link linkend='var-S'><filename>S</filename></link>
-                        directory.</para></listitem>
-                    <listitem><para><emphasis><filename>do_install</filename>:</emphasis>
-                        Once compilation is done, BitBake executes the
-                        <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-                        task.
-                        This task copies files from the <filename>B</filename>
-                        directory and places them in a holding area pointed to
-                        by the
-                        <link linkend='var-D'><filename>D</filename></link>
-                        variable.</para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id='package-splitting-dev-environment'>
-            <title>Package Splitting</title>
-
-            <para>
-                After source code is configured and compiled, the
-                OpenEmbedded build system analyzes
-                the results and splits the output into packages:
-                <imagedata fileref="figures/analysis-for-package-splitting.png" align="center" width="7in" depth="7in" />
-            </para>
-
-            <para>
-                The
-                <link linkend='ref-tasks-package'><filename>do_package</filename></link>
-                and
-                <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
-                tasks combine to analyze
-                the files found in the
-                <link linkend='var-D'><filename>D</filename></link> directory
-                and split them into subsets based on available packages and
-                files.
-                The analyzing process involves the following as well as other
-                items: splitting out debugging symbols,
-                looking at shared library dependencies between packages,
-                and looking at package relationships.
-                The <filename>do_packagedata</filename> task creates package
-                metadata based on the analysis such that the
-                OpenEmbedded build system can generate the final packages.
-                Working, staged, and intermediate results of the analysis
-                and package splitting process use these areas:
-                <itemizedlist>
-                    <listitem><para><link linkend='var-PKGD'><filename>PKGD</filename></link> -
-                        The destination directory for packages before they are
-                        split.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link> -
-                        A shared, global-state directory that holds data
-                        generated during the packaging process.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link> -
-                        A temporary work area used by the
-                        <filename>do_package</filename> task.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PKGDEST'><filename>PKGDEST</filename></link> -
-                        The parent directory for packages after they have
-                        been split.
-                        </para></listitem>
-                </itemizedlist>
-                The <link linkend='var-FILES'><filename>FILES</filename></link>
-                variable defines the files that go into each package in
-                <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
-                If you want details on how this is accomplished, you can
-                look at the
-                <link linkend='ref-classes-package'><filename>package</filename></link>
-                class.
-            </para>
-
-            <para>
-                Depending on the type of packages being created (RPM, DEB, or
-                IPK), the <filename>do_package_write_*</filename> task
-                creates the actual packages and places them in the
-                Package Feed area, which is
-                <filename>${TMPDIR}/deploy</filename>.
-                You can see the
-                "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-                section for more detail on that part of the build process.
-                <note>
-                    Support for creating feeds directly from the
-                    <filename>deploy/*</filename> directories does not exist.
-                    Creating such feeds usually requires some kind of feed
-                    maintenance mechanism that would upload the new packages
-                    into an official package feed (e.g. the
-                    Ångström distribution).
-                    This functionality is highly distribution-specific
-                    and thus is not provided out of the box.
-                </note>
-            </para>
-        </section>
-
-        <section id='image-generation-dev-environment'>
-            <title>Image Generation</title>
-
-            <para>
-                Once packages are split and stored in the Package Feeds area,
-                the OpenEmbedded build system uses BitBake to generate the
-                root filesystem image:
-                <imagedata fileref="figures/image-generation.png" align="center" width="6in" depth="7in" />
-            </para>
-
-            <para>
-                The image generation process consists of several stages and
-                depends on several tasks and variables.
-                The
-                <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
-                task creates the root filesystem (file and directory structure)
-                for an image.
-                This task uses several key variables to help create the list
-                of packages to actually install:
-                <itemizedlist>
-                    <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>:
-                        Lists out the base set of packages to install from
-                        the Package Feeds area.</para></listitem>
-                    <listitem><para><link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>:
-                        Specifies packages that should not be installed.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
-                        Specifies features to include in the image.
-                        Most of these features map to additional packages for
-                        installation.</para></listitem>
-                    <listitem><para><link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>:
-                        Specifies the package backend to use and consequently
-                        helps determine where to locate packages within the
-                        Package Feeds area.</para></listitem>
-                    <listitem><para><link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>:
-                        Determines the language(s) for which additional
-                        language support packages are installed.
-                        </para></listitem>
-                    <listitem><para><link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>:
-                        The final list of packages passed to the package manager
-                        for installation into the image.
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-
-            <para>
-                With
-                <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
-                pointing to the location of the filesystem under construction and
-                the <filename>PACKAGE_INSTALL</filename> variable providing the
-                final list of packages to install, the root file system is
-                created.
-            </para>
-
-            <para>
-                Package installation is under control of the package manager
-                (e.g. dnf/rpm, opkg, or apt/dpkg) regardless of whether or
-                not package management is enabled for the target.
-                At the end of the process, if package management is not
-                enabled for the target, the package manager's data files
-                are deleted from the root filesystem.
-                As part of the final stage of package installation, postinstall
-                scripts that are part of the packages are run.
-                Any scripts that fail to run
-                on the build host are run on the target when the target system
-                is first booted.
-                If you are using a
-                <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
-                all the post installation scripts must succeed during the
-                package installation phase since the root filesystem is
-                read-only.
-            </para>
-
-            <para>
-                The final stages of the <filename>do_rootfs</filename> task
-                handle post processing.
-                Post processing includes creation of a manifest file and
-                optimizations.
-            </para>
-
-            <para>
-                The manifest file (<filename>.manifest</filename>) resides
-                in the same directory as the root filesystem image.
-                This file lists out, line-by-line, the installed packages.
-                The manifest file is useful for the
-                <link linkend='ref-classes-testimage*'><filename>testimage</filename></link>
-                class, for example, to determine whether or not to run
-                specific tests.
-                See the
-                <link linkend='var-IMAGE_MANIFEST'><filename>IMAGE_MANIFEST</filename></link>
-                variable for additional information.
-            </para>
-
-            <para>
-                Optimizing processes run across the image include
-                <filename>mklibs</filename>, <filename>prelink</filename>,
-                and any other post-processing commands as defined by the
-                <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>
-                variable.
-                The <filename>mklibs</filename> process optimizes the size
-                of the libraries, while the
-                <filename>prelink</filename> process optimizes the dynamic
-                linking of shared libraries to reduce start up time of
-                executables.
-            </para>
-
-            <para>
-                After the root filesystem is built, processing begins on
-                the image through the
-                <link linkend='ref-tasks-image'><filename>do_image</filename></link>
-                task.
-                The build system runs any pre-processing commands as defined
-                by the
-                <link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link>
-                variable.
-                This variable specifies a list of functions to call before
-                the OpenEmbedded build system creates the final image output
-                files.
-            </para>
-
-            <para>
-                The OpenEmbedded build system dynamically creates
-                <filename>do_image_*</filename> tasks as needed, based
-                on the image types specified in the
-                <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
-                variable.
-                The process turns everything into an image file or a set of
-                image files and compresses the root filesystem image to reduce
-                the overall size of the image.
-                The formats used for the root filesystem depend on the
-                <filename>IMAGE_FSTYPES</filename> variable.
-            </para>
-
-            <para>
-                As an example, a dynamically created task when creating a
-                particular image <replaceable>type</replaceable> would take the
-                following form:
-                <literallayout class='monospaced'>
-     do_image_<replaceable>type</replaceable>[depends]
-                </literallayout>
-                So, if the <replaceable>type</replaceable> as specified by the
-                <filename>IMAGE_FSTYPES</filename> were
-                <filename>ext4</filename>, the dynamically generated task
-                would be as follows:
-                <literallayout class='monospaced'>
-     do_image_ext4[depends]
-                </literallayout>
-            </para>
-
-            <para>
-                The final task involved in image creation is the
-                <link linkend='ref-tasks-image-complete'><filename>do_image_complete</filename></link>
-                task.
-                This task completes the image by applying any image
-                post processing as defined through the
-                <link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>
-                variable.
-                The variable specifies a list of functions to call once the
-                OpenEmbedded build system has created the final image output
-                files.
-            </para>
-
-            <note>
-                The entire image generation process is run under Pseudo.
-                Running under Pseudo ensures that the files in the root
-                filesystem have correct ownership.
-            </note>
-        </section>
-
-        <section id='sdk-generation-dev-environment'>
-            <title>SDK Generation</title>
-
-            <para>
-                The OpenEmbedded build system uses BitBake to generate the
-                Software Development Kit (SDK) installer script for both the
-                standard and extensible SDKs:
-                <imagedata fileref="figures/sdk-generation.png" align="center" />
-            </para>
-
-            <note>
-                For more information on the cross-development toolchain
-                generation, see the
-                "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-                section.
-                For information on advantages gained when building a
-                cross-development toolchain using the
-                <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
-                task, see the
-                "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
-                section in the Yocto Project Application Development and the
-                Extensible Software Development Kit (SDK) manual.
-            </note>
-
-            <para>
-                Like image generation, the SDK script process consists of
-                several stages and depends on many variables.
-                The <filename>do_populate_sdk</filename> and
-                <filename>do_populate_sdk_ext</filename> tasks use these
-                key variables to help create the list of packages to actually
-                install.
-                For information on the variables listed in the figure, see the
-                "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
-                section.
-            </para>
-
-            <para>
-                The <filename>do_populate_sdk</filename> task helps create
-                the standard SDK and handles two parts: a target part and a
-                host part.
-                The target part is the part built for the target hardware and
-                includes libraries and headers.
-                The host part is the part of the SDK that runs on the
-                <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
-            </para>
-
-            <para>
-                The <filename>do_populate_sdk_ext</filename> task helps create
-                the extensible SDK and handles host and target parts
-                differently than its counter part does for the standard SDK.
-                For the extensible SDK, the task encapsulates the build system,
-                which includes everything needed (host and target) for the SDK.
-            </para>
-
-            <para>
-                Regardless of the type of SDK being constructed, the
-                tasks perform some cleanup after which a cross-development
-                environment setup script and any needed configuration files
-                are created.
-                The final output is the Cross-development
-                toolchain installation script (<filename>.sh</filename> file),
-                which includes the environment setup script.
-            </para>
-        </section>
-
-        <section id='stamp-files-and-the-rerunning-of-tasks'>
-            <title>Stamp Files and the Rerunning of Tasks</title>
-
-            <para>
-                For each task that completes successfully, BitBake writes a
-                stamp file into the
-                <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>
-                directory.
-                The beginning of the stamp file's filename is determined by the
-                <link linkend='var-STAMP'><filename>STAMP</filename></link>
-                variable, and the end of the name consists of the task's name
-                and current
-                <ulink url='&YOCTO_DOCS_BB_URL;#checksums'>input checksum</ulink>.
-                <note>
-                    This naming scheme assumes that
-                    <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_SIGNATURE_HANDLER'><filename>BB_SIGNATURE_HANDLER</filename></ulink>
-                    is "OEBasicHash", which is almost always the case in
-                    current OpenEmbedded.
-                </note>
-                To determine if a task needs to be rerun, BitBake checks if a
-                stamp file with a matching input checksum exists for the task.
-                If such a stamp file exists, the task's output is assumed to
-                exist and still be valid.
-                If the file does not exist, the task is rerun.
-                <note>
-                    <para>The stamp mechanism is more general than the shared
-                    state (sstate) cache mechanism described in the
-                    "<link linkend='setscene-tasks-and-shared-state'>Setscene Tasks and Shared State</link>"
-                    section.
-                    BitBake avoids rerunning any task that has a valid
-                    stamp file, not just tasks that can be accelerated through
-                    the sstate cache.</para>
-                    <para>However, you should realize that stamp files only
-                    serve as a marker that some work has been done and that
-                    these files do not record task output.
-                    The actual task output would usually be somewhere in
-                    <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
-                    (e.g. in some recipe's
-                    <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.)
-                    What the sstate cache mechanism adds is a way to cache task
-                    output that can then be shared between build machines.
-                    </para>
-                </note>
-                Since <filename>STAMPS_DIR</filename> is usually a subdirectory
-                of <filename>TMPDIR</filename>, removing
-                <filename>TMPDIR</filename> will also remove
-                <filename>STAMPS_DIR</filename>, which means tasks will
-                properly be rerun to repopulate <filename>TMPDIR</filename>.
-            </para>
-
-            <para>
-                If you want some task to always be considered "out of date",
-                you can mark it with the
-                <ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>nostamp</filename></ulink>
-                varflag.
-                If some other task depends on such a task, then that task will
-                also always be considered out of date, which might not be what
-                you want.
-            </para>
-
-            <para>
-                For details on how to view information about a task's
-                signature, see the
-                "<link linkend='usingpoky-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</link>"
-                section.
-            </para>
-        </section>
-
-        <section id='setscene-tasks-and-shared-state'>
-            <title>Setscene Tasks and Shared State</title>
-
-            <para>
-                The description of tasks so far assumes that BitBake needs to
-                build everything and there are no prebuilt objects available.
-                BitBake does support skipping tasks if prebuilt objects are
-                available.
-                These objects are usually made available in the form of a
-                shared state (sstate) cache.
-                <note>
-                    For information on variables affecting sstate, see the
-                    <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
-                    and
-                    <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
-                    variables.
-                </note>
-            </para>
-
-            <para>
-                The idea of a setscene task (i.e
-                <filename>do_</filename><replaceable>taskname</replaceable><filename>_setscene</filename>)
-                is a version of the task where
-                instead of building something, BitBake can skip to the end
-                result and simply place a set of files into specific locations
-                as needed.
-                In some cases, it makes sense to have a setscene task variant
-                (e.g. generating package files in the
-                <filename>do_package_write_*</filename> task).
-                In other cases, it does not make sense, (e.g. a
-                <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
-                task or
-                <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
-                task) since the work involved would be equal to or greater than
-                the underlying task.
-            </para>
-
-            <para>
-                In the OpenEmbedded build system, the common tasks that have
-                setscene variants are <link linkend='ref-tasks-package'><filename>do_package</filename></link>,
-                <filename>do_package_write_*</filename>,
-                <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link>,
-                <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>,
-                and
-                <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>.
-                Notice that these are most of the tasks whose output is an
-                end result.
-            </para>
-
-            <para>
-                The OpenEmbedded build system has knowledge of the relationship
-                between these tasks and other tasks that precede them.
-                For example, if BitBake runs
-                <filename>do_populate_sysroot_setscene</filename> for
-                something, there is little point in running any of the
-                <filename>do_fetch</filename>, <filename>do_unpack</filename>,
-                <filename>do_patch</filename>,
-                <filename>do_configure</filename>,
-                <filename>do_compile</filename>, and
-                <filename>do_install</filename> tasks.
-                However, if <filename>do_package</filename> needs to be run,
-                BitBake would need to run those other tasks.
-            </para>
-
-            <para>
-                It becomes more complicated if everything can come from an
-                sstate cache because some objects are simply not required at
-                all.
-                For example, you do not need a compiler or native tools, such
-                as quilt, if there is nothing to compile or patch.
-                If the <filename>do_package_write_*</filename> packages are
-                available from sstate, BitBake does not need the
-                <filename>do_package</filename> task data.
-            </para>
-
-            <para>
-                To handle all these complexities, BitBake runs in two phases.
-                The first is the "setscene" stage.
-                During this stage, BitBake first checks the sstate cache for
-                any targets it is planning to build.
-                BitBake does a fast check to see if the object exists rather
-                than a complete download.
-                If nothing exists, the second phase, which is the setscene
-                stage, completes and the main build proceeds.
-            </para>
-
-            <para>
-                If objects are found in the sstate cache, the OpenEmbedded
-                build system works backwards from the end targets specified
-                by the user.
-                For example, if an image is being built, the OpenEmbedded build
-                system first looks for the packages needed for that image and
-                the tools needed to construct an image.
-                If those are available, the compiler is not needed.
-                Thus, the compiler is not even downloaded.
-                If something was found to be unavailable, or the download or
-                setscene task fails, the OpenEmbedded build system then tries
-                to install dependencies, such as the compiler, from the cache.
-            </para>
-
-            <para>
-                The availability of objects in the sstate cache is handled by
-                the function specified by the
-                <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHCHECK_FUNCTION'><filename>BB_HASHCHECK_FUNCTION</filename></ulink>
-                variable and returns a list of the objects that are available.
-                The function specified by the
-                <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_SETSCENE_DEPVALID'><filename>BB_SETSCENE_DEPVALID</filename></ulink>
-                variable is the function that determines whether a given
-                dependency needs to be followed, and whether for any given
-                relationship the function needs to be passed.
-                The function returns a True or False value.
-            </para>
-        </section>
-    </section>
-
-    <section id='images-dev-environment'>
-        <title>Images</title>
-
-        <para>
-            The images produced by the OpenEmbedded build system
-            are compressed forms of the
-            root filesystem that are ready to boot on a target device.
-            You can see from the
-            <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
-            that BitBake output, in part, consists of images.
-            This section is going to look more closely at this output:
-            <imagedata fileref="figures/images.png" align="center" width="5.5in" depth="5.5in" />
-        </para>
-
-        <para>
-            For a list of example images that the Yocto Project provides,
-            see the
-            "<link linkend='ref-images'>Images</link>" chapter.
-        </para>
-
-        <para>
-            Images are written out to the
-            <link linkend='build-directory'>Build Directory</link>
-            inside the <filename>tmp/deploy/images/<replaceable>machine</replaceable>/</filename>
-            folder as shown in the figure.
-            This folder contains any files expected to be loaded on the
-            target device.
-            The
-            <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
-            variable points to the <filename>deploy</filename> directory,
-            while the
-            <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
-            variable points to the appropriate directory containing images for
-            the current configuration.
-            <itemizedlist>
-                <listitem><para><filename><replaceable>kernel-image</replaceable></filename>:
-                    A kernel binary file.
-                    The <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
-                    variable setting determines the naming scheme for the
-                    kernel image file.
-                    Depending on that variable, the file could begin with
-                    a variety of naming strings.
-                    The <filename>deploy/images/<replaceable>machine</replaceable></filename>
-                    directory can contain multiple image files for the
-                    machine.</para></listitem>
-                <listitem><para><filename><replaceable>root-filesystem-image</replaceable></filename>:
-                    Root filesystems for the target device (e.g.
-                    <filename>*.ext3</filename> or <filename>*.bz2</filename>
-                    files).
-                    The <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
-                    variable setting determines the root filesystem image
-                    type.
-                    The <filename>deploy/images/<replaceable>machine</replaceable></filename>
-                    directory can contain multiple root filesystems for the
-                    machine.</para></listitem>
-                <listitem><para><filename><replaceable>kernel-modules</replaceable></filename>:
-                    Tarballs that contain all the modules built for the kernel.
-                    Kernel module tarballs exist for legacy purposes and
-                    can be suppressed by setting the
-                    <link linkend='var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></link>
-                    variable to "0".
-                    The <filename>deploy/images/<replaceable>machine</replaceable></filename>
-                    directory can contain multiple kernel module tarballs
-                    for the machine.</para></listitem>
-                <listitem><para><filename><replaceable>bootloaders</replaceable></filename>:
-                    Bootloaders supporting the image, if applicable to the
-                    target machine.
-                    The <filename>deploy/images/<replaceable>machine</replaceable></filename>
-                    directory can contain multiple bootloaders for the
-                    machine.</para></listitem>
-                <listitem><para><filename><replaceable>symlinks</replaceable></filename>:
-                    The <filename>deploy/images/<replaceable>machine</replaceable></filename>
-                    folder contains
-                    a symbolic link that points to the most recently built file
-                    for each machine.
-                    These links might be useful for external scripts that
-                    need to obtain the latest version of each file.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='sdk-dev-environment'>
-        <title>Application Development SDK</title>
-
-        <para>
-            In the
-            <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
-            the output labeled "Application Development SDK" represents an
-            SDK.
-            The SDK generation process differs depending on whether you build
-            a standard SDK
-            (e.g. <filename>bitbake -c populate_sdk</filename> <replaceable>imagename</replaceable>)
-            or an extensible SDK
-            (e.g. <filename>bitbake -c populate_sdk_ext</filename> <replaceable>imagename</replaceable>).
-            This section is going to take a closer look at this output:
-            <imagedata fileref="figures/sdk.png" align="center" width="9in" depth="7.25in" />
-        </para>
-
-        <para>
-            The specific form of this output is a self-extracting
-            SDK installer (<filename>*.sh</filename>) that, when run,
-            installs the SDK, which consists of a cross-development
-            toolchain, a set of libraries and headers, and an SDK
-            environment setup script.
-            Running this installer essentially sets up your
-            cross-development environment.
-            You can think of the cross-toolchain as the "host"
-            part because it runs on the SDK machine.
-            You can think of the libraries and headers as the "target"
-            part because they are built for the target hardware.
-            The environment setup script is added so that you can initialize
-            the environment before using the tools.
-        </para>
-
-        <note><title>Notes</title>
-            <itemizedlist>
-                <listitem><para>
-                    The Yocto Project supports several methods by which you can
-                    set up this cross-development environment.
-                    These methods include downloading pre-built SDK installers
-                    or building and installing your own SDK installer.
-                    </para></listitem>
-                <listitem><para>
-                    For background information on cross-development toolchains
-                    in the Yocto Project development environment, see the
-                    "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-                    section.
-                    </para></listitem>
-                <listitem><para>
-                    For information on setting up a cross-development
-                    environment, see the
-                    <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
-                    </para></listitem>
-            </itemizedlist>
-        </note>
-        <para>
-            Once built, the SDK installers are written out to the
-            <filename>deploy/sdk</filename> folder inside the
-            <link linkend='build-directory'>Build Directory</link>
-            as shown in the figure at the beginning of this section.
-            Depending on the type of SDK, several variables exist that help
-            configure these files.
-            The following list shows the variables associated with a standard
-            SDK:
-            <itemizedlist>
-                <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
-                    Points to the <filename>deploy</filename>
-                    directory.</para></listitem>
-                <listitem><para><link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>:
-                    Specifies the architecture of the machine
-                    on which the cross-development tools are run to
-                    create packages for the target hardware.
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></link>:
-                    Lists the features to include in the "target" part
-                    of the SDK.
-                    </para></listitem>
-                <listitem><para><link linkend='var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></link>:
-                    Lists packages that make up the host
-                    part of the SDK (i.e. the part that runs on
-                    the <filename>SDKMACHINE</filename>).
-                    When you use
-                    <filename>bitbake -c populate_sdk <replaceable>imagename</replaceable></filename>
-                    to create the SDK, a set of default packages
-                    apply.
-                    This variable allows you to add more packages.
-                    </para></listitem>
-                <listitem><para><link linkend='var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></link>:
-                    Lists packages that make up the target part
-                    of the SDK (i.e. the part built for the
-                    target hardware).
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDKPATH'><filename>SDKPATH</filename></link>:
-                    Defines the default SDK installation path offered by the
-                    installation script.
-                    </para></listitem>
-            </itemizedlist>
-            This next list, shows the variables associated with an extensible
-            SDK:
-            <itemizedlist>
-                <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
-                    Points to the <filename>deploy</filename> directory.
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></link>:
-                    Controls whether or not shared state artifacts are copied
-                    into the extensible SDK.
-                    By default, all required shared state artifacts are copied
-                    into the SDK.
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDK_INCLUDE_PKGDATA'><filename>SDK_INCLUDE_PKGDATA</filename></link>:
-                    Specifies whether or not packagedata will be included in
-                    the extensible SDK for all recipes in the "world" target.
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></link>:
-                    Specifies whether or not the toolchain will be included
-                    when building the extensible SDK.
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></link>:
-                    A list of variables allowed through from the build system
-                    configuration into the extensible SDK configuration.
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></link>:
-                    A list of variables not allowed through from the build
-                    system configuration into the extensible SDK configuration.
-                    </para></listitem>
-                <listitem><para><link linkend='var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></link>:
-                    A list of classes to remove from the
-                    <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
-                    value globally within the extensible SDK configuration.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-</section>
-
-</chapter>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml
index e29bf89..b974d0f 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml
@@ -20,7 +20,7 @@
         For more information on how to apply the command when using the
         extensible SDK, see the
         "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
-        section in the Yocto Project Application Development and the
+        chapter in the Yocto Project Application Development and the
         Extensible Software Development Kit (eSDK) manual.
     </para>
 
@@ -35,59 +35,51 @@
             the commands:
             <literallayout class='monospaced'>
      $ devtool --help
-     usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
-                        [--fetch-dev] [--version VERSION] [--no-git]
-                        [--srcrev SRCREV | --autorev] [--srcbranch SRCBRANCH]
-                        [--binary] [--also-native] [--src-subdir SUBDIR]
-                        [--mirrors] [--provides PROVIDES]
-                        [recipename] [srctree] [fetchuri]
+     NOTE: Starting bitbake server...
+     usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q]
+                    [--color COLOR] [-h]
+                    &lt;subcommand&gt; ...
 
-     Adds a new recipe to the workspace to build a specified source tree. Can
-     optionally fetch a remote URI and unpack it to create the source tree.
-
-     arguments:
-       recipename            Name for new recipe to add (just name - no version,
-                             path or extension). If not specified, will attempt
-                             to auto-detect it.
-       srctree               Path to external source tree. If not specified, a
-                             subdirectory of
-                             /home/<replaceable>user</replaceable>/poky/build/workspace/sources will be
-                             used.
-       fetchuri              Fetch the specified URI and extract it to create
-                             the source tree
+     OpenEmbedded development tool
 
      options:
-       -h, --help            show this help message and exit
-       --same-dir, -s        Build in same directory as source
-       --no-same-dir         Force build in a separate build directory
-       --fetch URI, -f URI   Fetch the specified URI and extract it to create
-                             the source tree (deprecated - pass as positional
-                             argument instead)
-       --fetch-dev           For npm, also fetch devDependencies
-       --version VERSION, -V VERSION
-                             Version to use within recipe (PV)
-       --no-git, -g          If fetching source, do not set up source tree as a
-                             git repository
-       --srcrev SRCREV, -S SRCREV
-                             Source revision to fetch if fetching from an SCM
-                             such as git (default latest)
-       --autorev, -a         When fetching from a git repository, set SRCREV in
-                             the recipe to a floating revision instead of fixed
-       --srcbranch SRCBRANCH, -B SRCBRANCH
-                             Branch in source repository if fetching from an SCM
-                             such as git (default master)
-       --binary, -b          Treat the source tree as something that should be
-                             installed verbatim (no compilation, same directory
-                             structure). Useful with binary packages e.g. RPMs.
-       --also-native         Also add native variant (i.e. support building
-                             recipe for the build host as well as the target
-                             machine)
-       --src-subdir SUBDIR   Specify subdirectory within source tree to use
-       --mirrors             Enable PREMIRRORS and MIRRORS for source tree
-                             fetching (disable by default).
-       --provides PROVIDES, -p PROVIDES
-                             Specify an alias for the item provided by the
-                             recipe. E.g. virtual/libgl
+       --basepath BASEPATH  Base directory of SDK / build directory
+       --bbpath BBPATH      Explicitly specify the BBPATH, rather than getting it
+                            from the metadata
+       -d, --debug          Enable debug output
+       -q, --quiet          Print only errors
+       --color COLOR        Colorize output (where COLOR is auto, always, never)
+       -h, --help           show this help message and exit
+
+     subcommands:
+       Beginning work on a recipe:
+         add                  Add a new recipe
+         modify               Modify the source for an existing recipe
+         upgrade              Upgrade an existing recipe
+       Getting information:
+         status               Show workspace status
+         search               Search available recipes
+         latest-version       Report the latest version of an existing recipe
+       Working on a recipe in the workspace:
+         build                Build a recipe
+         rename               Rename a recipe file in the workspace
+         edit-recipe          Edit a recipe file
+         find-recipe          Find a recipe file
+         configure-help       Get help on configure script options
+         update-recipe        Apply changes from external source tree to recipe
+         reset                Remove a recipe from your workspace
+         finish               Finish working on a recipe in your workspace
+       Testing changes on target:
+         deploy-target        Deploy recipe output files to live target machine
+         undeploy-target      Undeploy recipe output files in live target machine
+         build-image          Build image including workspace recipe packages
+       Advanced:
+         create-workspace     Set up workspace in an alternative location
+         export               Export workspace into a tar archive
+         import               Import exported tar archive into workspace
+         extract              Extract the source for an existing recipe
+         sync                 Synchronize the source tree for an existing recipe
+     Use devtool &lt;subcommand&gt; --help to get help on a specific command
             </literallayout>
         </para>
 
@@ -97,9 +89,12 @@
                 name and using <filename>--help</filename>:
             <literallayout class='monospaced'>
      $ devtool add --help
+     NOTE: Starting bitbake server...
      usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
-                        [--version VERSION] [--no-git] [--autorev] [--binary]
-                        [--also-native] [--src-subdir SUBDIR]
+                        [--fetch-dev] [--version VERSION] [--no-git]
+                        [--srcrev SRCREV | --autorev] [--srcbranch SRCBRANCH]
+                        [--binary] [--also-native] [--src-subdir SUBDIR]
+                        [--mirrors] [--provides PROVIDES]
                         [recipename] [srctree] [fetchuri]
 
      Adds a new recipe to the workspace to build a specified source tree. Can
@@ -123,18 +118,30 @@
        --fetch URI, -f URI   Fetch the specified URI and extract it to create the
                              source tree (deprecated - pass as positional argument
                              instead)
+       --fetch-dev           For npm, also fetch devDependencies
        --version VERSION, -V VERSION
                              Version to use within recipe (PV)
        --no-git, -g          If fetching source, do not set up source tree as a git
                              repository
+       --srcrev SRCREV, -S SRCREV
+                             Source revision to fetch if fetching from an SCM such
+                             as git (default latest)
        --autorev, -a         When fetching from a git repository, set SRCREV in the
                              recipe to a floating revision instead of fixed
+       --srcbranch SRCBRANCH, -B SRCBRANCH
+                             Branch in source repository if fetching from an SCM
+                             such as git (default master)
        --binary, -b          Treat the source tree as something that should be
                              installed verbatim (no compilation, same directory
                              structure). Useful with binary packages e.g. RPMs.
        --also-native         Also add native variant (i.e. support building recipe
                              for the build host as well as the target machine)
        --src-subdir SUBDIR   Specify subdirectory within source tree to use
+       --mirrors             Enable PREMIRRORS and MIRRORS for source tree fetching
+                             (disable by default).
+       --provides PROVIDES, -p PROVIDES
+                             Specify an alias for the item provided by the recipe.
+                             E.g. virtual/libgl
             </literallayout>
         </para>
     </section>
@@ -161,7 +168,7 @@
 
         <para>
             <literallayout class='monospaced'>
-     attic - A directory created if devtool believes it preserve
+     attic - A directory created if devtool believes it must preserve
              anything when you run "devtool reset".  For example, if you
              run "devtool add", make changes to the recipe, and then
              run "devtool reset", devtool takes notice that the file has
@@ -426,12 +433,27 @@
         <title>Upgrading a Recipe</title>
 
         <para>
-            Use the <filename>devtool upgrade</filename> command
-            to upgrade an existing recipe to a new upstream version.
-            The command puts the upgraded recipe file into the
-            workspace along with any associated files, and extracts
-            the source tree to a specified location should patches
-            need rebased or added to as a result of the upgrade.
+            As software matures, upstream recipes are upgraded to newer
+            versions.
+            As a developer, you need to keep your local recipes up-to-date
+            with the upstream version releases.
+            Several methods exist by which you can upgrade recipes.
+            You can read about them in the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-upgrading-recipes'>Upgrading Recipes</ulink>"
+            section of the Yocto Project Development Tasks Manual.
+            This section overviews the <filename>devtool upgrade</filename>
+            command.
+        </para>
+
+        <para>
+            The <filename>devtool upgrade</filename> command
+            upgrades an existing recipe to a more recent version of the
+            recipe upstream.
+            The command puts the upgraded recipe file along with any associated
+            files into a "workspace" and, if necessary, extracts the source
+            tree to a specified location.
+            During the upgrade, patches associated with the recipe are
+            rebased or added as needed.
         </para>
 
         <para>
@@ -443,9 +465,21 @@
             the version number to which you want to upgrade (i.e. the
             <link linkend='var-PV'><filename>PV</filename></link>),
             the source revision to which you want to upgrade (i.e. the
-            <link linkend='var-SRCREV'><filename>SRCREV</filename></link>,
+            <link linkend='var-SRCREV'><filename>SRCREV</filename></link>),
             whether or not to apply patches, and so forth.
         </para>
+
+        <para>
+            You can read more on the <filename>devtool upgrade</filename>
+            workflow in the
+            "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</ulink>"
+            section in the Yocto Project Application Development and the
+            Extensible Software Development Kit (eSDK) manual.
+            You can also see an example of how to use
+            <filename>devtool upgrade</filename> in the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-using-devtool-upgrade'>Using <filename>devtool upgrade</filename></ulink>"
+            section in the Yocto Project Development Tasks Manual.
+        </para>
     </section>
 
     <section id='devtool-resetting-a-recipe'>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml
index 02857dc..cb74df6 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml
@@ -161,9 +161,9 @@
                     protocols support.
                     <note>
                         The default value for the
-                        <link linkend='var-DISTRO_FEATURES'><filename>DISTRO FEATURES</filename></link>
-                        variable includes "bluetooth", which causes bluez5
-                        to be backfilled in for bluetooth support.
+                        <filename>DISTRO FEATURES</filename> variable includes
+                        "bluetooth", which causes bluez5 to be backfilled in
+                        for bluetooth support.
                         If you do not want bluez5 backfilled and would rather
                         use bluez4, you need to use the
                         <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml
index c752f94..1f96186 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml
@@ -40,15 +40,19 @@
     <para>
         Following is a list of supported recipes:
         <itemizedlist>
-            <listitem><para><filename>build-appliance-image</filename>:
-                An example virtual machine that contains all the pieces required to
-                run builds using the build system as well as the build system itself.
+            <listitem><para>
+                <filename>build-appliance-image</filename>:
+                An example virtual machine that contains all the pieces
+                required to run builds using the build system as well as the
+                build system itself.
                 You can boot and run the image using either the
                 <ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
-                or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
+                or
+                <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
                 For more information on this image, see the
-                <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
-                the Yocto Project website.</para></listitem>
+                <ulink url='&YOCTO_HOME_URL;/software-item/build-appliance/'>Build Appliance</ulink>
+                page on the Yocto Project website.
+                </para></listitem>
             <listitem><para><filename>core-image-base</filename>:
                 A console-only image that fully supports the target device hardware.</para></listitem>
             <listitem><para><filename>core-image-clutter</filename>:
@@ -151,7 +155,8 @@
                 This image provides the Wayland protocol libraries and the
                 reference Weston compositor.
                 For more information, see the
-                "<link linkend='wayland'>Wayland</link>" section.
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-using-wayland-and-weston'>Using Wayland and Weston</ulink>"
+                section in the Yocto Project Development Tasks Manual.
                 </para></listitem>
             <listitem><para><filename>core-image-x11</filename>:
                 A very basic X11 image with a terminal.
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml
index 1dd36b2..a58f9d7 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml
@@ -27,15 +27,10 @@
             Kickstart commands are based on the Fedora kickstart versions but
             with modifications to reflect Wic capabilities.
             You can see the original documentation for those commands at the
-            following links:
-            <itemizedlist>
-                <listitem><para>
-                    <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition'>http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition</ulink>
-                    </para></listitem>
-                <listitem><para>
-                    <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader'>http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader</ulink>
-                    </para></listitem>
-            </itemizedlist>
+            following link:
+            <literallayout class='monospaced'>
+     <ulink url='http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html'>http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html</ulink>
+            </literallayout>
         </para>
     </section>
 
@@ -43,7 +38,7 @@
         <title>Command: part or partition</title>
 
         <para>
-            Either of these commands create a partition on the system and use
+            Either of these commands creates a partition on the system and uses
             the following syntax:
             <literallayout class='monospaced'>
      part [<replaceable>mntpoint</replaceable>]
@@ -55,7 +50,7 @@
 
         <para>
             The <filename><replaceable>mntpoint</replaceable></filename> is
-            where the partition will be mounted and must be of one of the
+            where the partition is mounted and must be in one of the
             following forms:
             <itemizedlist>
                 <listitem><para>
@@ -64,7 +59,7 @@
                     </para></listitem>
                 <listitem><para>
                     <filename>swap</filename>:
-                    The created partition is used as swap space.
+                    The created partition is used as swap space
                     </para></listitem>
             </itemizedlist>
         </para>
@@ -74,13 +69,22 @@
             partition to automatically be mounted.
             Wic achieves this by adding entries to the filesystem table (fstab)
             during image generation.
-            In order for wic to generate a valid fstab, you must also provide
+            In order for Wic to generate a valid fstab, you must also provide
             one of the <filename>--ondrive</filename>,
             <filename>--ondisk</filename>, or
             <filename>--use-uuid</filename> partition options as part of the
             command.
-            Here is an example using "/" as the mountpoint.
-            The command uses "--ondisk" to force the partition onto the
+            <note>
+                The mount program must understand the PARTUUID syntax you use
+                with <filename>--use-uuid</filename> and non-root
+                <replaceable>mountpoint</replaceable>, including swap.
+                The busybox versions of these application are currently
+                excluded.
+            </note>
+            Here is an example that uses "/" as the
+            <replaceable>mountpoint</replaceable>.
+            The command uses <filename>--ondisk</filename> to force the
+            partition onto the
             <filename>sdb</filename> disk:
             <literallayout class='monospaced'>
      part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
@@ -101,17 +105,26 @@
                     <filename>--source</filename>.
                     </para></listitem>
                 <listitem><para>
+                    <emphasis><filename>--fixed-size</filename>:</emphasis>
+                    The exact partition size in MBytes.
+                    You cannot specify with <filename>--size</filename>.
+                    An error occurs when assembling the disk image if the
+                    partition data is larger than
+                    <filename>--fixed-size</filename>.
+                    </para></listitem>
+                <listitem><para>
                     <emphasis><filename>--source</filename>:</emphasis>
                     This option is a Wic-specific option that names the source
                     of the data that populates the partition.
                     The most common value for this option is "rootfs", but you
                     can use any value that maps to a valid source plug-in.
                     For information on the source plug-ins, see the
-                    "<link linkend='wic-plug-ins-interface'>Wic Plug-Ins Interface</link>"
-                    section.</para>
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#wic-using-the-wic-plug-ins-interface'>Using the Wic Plug-Ins Interface</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    </para>
 
                     <para>If you use <filename>--source rootfs</filename>, Wic
-                    creates a partition as large as needed and to fill it with
+                    creates a partition as large as needed and fills it with
                     the contents of the root filesystem pointed to by the
                     <filename>-r</filename> command-line option or the
                     equivalent rootfs derived from the <filename>-e</filename>
@@ -130,8 +143,8 @@
                     <filename>-r</filename> command-line option or the
                     equivalent rootfs derived from the <filename>-e</filename>
                     command-line option.
-                    Exactly what those contents and filesystem type end up
-                    being are dependent on the given plug-in implementation.
+                    Exactly what those contents are and filesystem type used are
+                    dependent on the given plug-in implementation.
                     </para>
 
                     <para>If you do not use the <filename>--source</filename>
@@ -173,7 +186,7 @@
                     <emphasis><filename>--fsoptions</filename>:</emphasis>
                     Specifies a free-form string of options to be used when
                     mounting the filesystem.
-                    This string will be copied into the
+                    This string is copied into the
                     <filename>/etc/fstab</filename> file of the installed
                     system and should be enclosed in quotes.
                     If not specified, the default string is "defaults".
@@ -191,9 +204,9 @@
                     </para></listitem>
                 <listitem><para>
                     <emphasis><filename>--align (in KBytes)</filename>:</emphasis>
-                    This option is a Wic-specific option that says to start a
-                    partition on an <replaceable>x</replaceable> KBytes
-                    boundary.
+                    This option is a Wic-specific option that says to start
+                    partitions on boundaries given
+                    <replaceable>x</replaceable> KBytes.
                     </para></listitem>
                 <listitem><para>
                     <emphasis><filename>--no-table</filename>:</emphasis>
@@ -203,10 +216,17 @@
                     However, the partition is not added to the partition table.
                     </para></listitem>
                 <listitem><para>
+                    <emphasis><filename>--exclude-path</filename>:</emphasis>
+                    This option is a Wic-specific option that excludes the given
+                    relative path from the resulting image.
+                    This option is only effective with the rootfs source
+                    plug-in.
+                    </para></listitem>
+                <listitem><para>
                     <emphasis><filename>--extra-space</filename>:</emphasis>
                     This option is a Wic-specific option that adds extra space
                     after the space filled by the content of the partition.
-                    The final size can go beyond the size specified by the
+                    The final size can exceed the size specified by the
                     <filename>--size</filename> option.
                     The default value is 10 Mbytes.
                     </para></listitem>
@@ -218,6 +238,11 @@
                     The default value is "1.3".
                     </para></listitem>
                 <listitem><para>
+                    <emphasis><filename>--part-name</filename>:</emphasis>
+                    This option is a Wic-specific option that specifies a name
+                    for GPT partitions.
+                    </para></listitem>
+                <listitem><para>
                     <emphasis><filename>--part-type</filename>:</emphasis>
                     This option is a Wic-specific option that specifies the
                     partition type globally unique identifier (GUID) for GPT
@@ -237,6 +262,31 @@
                     This option is a Wic-specific option that specifies the
                     partition UUID.
                     </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>--fsuuid</filename>:</emphasis>
+                    This option is a Wic-specific option that specifies the
+                    filesystem UUID.
+                    You can generate or modify
+                    <link linkend='var-WKS_FILE'><filename>WKS_FILE</filename></link>
+                    with this option if a preconfigured filesystem UUID is
+                    added to the kernel command line in the bootloader
+                    configuration before you run Wic.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>--system-id</filename>:</emphasis>
+                    This option is a Wic-specific option that specifies the
+                    partition system ID, which is a one byte long, hexadecimal
+                    parameter with or without the 0x prefix.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis><filename>--mkfs-extraopts</filename>:</emphasis>
+                    This option specifies additional options to pass to the
+                    <filename>mkfs</filename> utility.
+                    Some default options for certain filesystems do not take
+                    effect.
+                    See Wic's help on kickstart
+                    (i.e. <filename>wic help kickstart</filename>).
+                    </para></listitem>
             </itemizedlist>
         </para>
     </section>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml
index d4b7bee..169a31e 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml
@@ -118,14 +118,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
         </revhistory>
 
@@ -147,37 +142,45 @@
                        is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
     </legalnotice>
 
     </bookinfo>
 
-    <xi:include href="introduction.xml"/>
+    <xi:include href="ref-system-requirements.xml"/>
 
-    <xi:include href="usingpoky.xml"/>
-
-    <xi:include href="ref-development-environment.xml"/>
-
-    <xi:include href="technical-details.xml"/>
+    <xi:include href="ref-terms.xml"/>
 
     <xi:include href="ref-release-process.xml"/>
 
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml
index e2902eb..c665cd9 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml
@@ -61,7 +61,7 @@
     <para>
         Each major release receives a codename that identifies the release in
         the
-        <link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>.
+        <ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>.
         The concept is that branches of
         <link linkend='metadata'>Metadata</link>
         with the same codename are likely to be compatible and thus
@@ -217,7 +217,7 @@
         in the <filename>poky</filename> repository.
         <note>
             You can find all these branches in the Yocto Project
-            <link linkend='source-repositories'>Source Repositories</link>.
+            <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>.
         </note>
         Testing within these public branches ensures in a publicly visible way
         that all of the main supposed architectures and recipes in OE-Core
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml
index 4bddc59..8e0c9f5 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml
@@ -18,7 +18,7 @@
 <para>
     For information on how to establish a local Source Directory on your
     development system, see the
-    "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
+    "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
     section in the Yocto Project Development Tasks Manual.
 </para>
 
@@ -114,7 +114,7 @@
         <title><filename>meta/</filename></title>
 
         <para>
-            This directory contains the OpenEmbedded Core metadata.
+            This directory contains the OpenEmbedded-Core metadata.
             The directory holds recipes, common classes, and machine
             configuration for emulated targets (<filename>qemux86</filename>,
             <filename>qemuarm</filename>, and so forth.)
@@ -137,8 +137,7 @@
             This directory contains the Yocto Project reference
             hardware Board Support Packages (BSPs).
             For more information on BSPs, see the
-            <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support
-            Package (BSP) Developer's Guide</ulink>.
+            <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
         </para>
     </section>
 
@@ -234,8 +233,7 @@
         </para>
 
         <para>
-            By default, running this script without a
-            <link linkend='build-directory'>Build Directory</link>
+            By default, running this script without a Build Directory
             argument creates the <filename>build</filename> directory
             in your current working directory.
             If you provide a Build Directory argument when you
@@ -306,8 +304,8 @@
             The directory tracks build information into image, packages, and
             SDK subdirectories.
             For information on the build history feature, see the
-            "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
+            section in the Yocto Project Development Tasks Manual.
         </para>
     </section>
 
@@ -350,7 +348,7 @@
             which defaults to <filename>meta-poky/conf</filename>
             when you are building from the Yocto Project development
             environment and defaults to <filename>meta/conf</filename> when
-            you are building from the OpenEmbedded Core environment.
+            you are building from the OpenEmbedded-Core environment.
             Because the script variable points to the source of the
             <filename>local.conf.sample</filename> file, this implies that
             you can configure your build environment from any layer by setting
@@ -402,7 +400,7 @@
             which defaults to <filename>meta-poky/conf</filename>
             when you are building from the Yocto Project development
             environment and defaults to <filename>meta/conf</filename> when
-            you are building from the OpenEmbedded Core environment.
+            you are building from the OpenEmbedded-Core environment.
             Because the script variable points to the source of the
             <filename>bblayers.conf.sample</filename> file, this implies that
             you can base your build from any layer by setting the variable in
@@ -520,9 +518,10 @@
             variable points to this directory.
             For more detail on the contents of the <filename>deploy</filename>
             directory, see the
-            "<link linkend='images-dev-environment'>Images</link>" and
-            "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
-            sections.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
+            and
+            "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-dev-environment'>Application Development SDK</ulink>"
+            sections in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -695,8 +694,8 @@
         <para>
             For information on how BitBake uses stamp files to determine if
             a task should be rerun, see the
-            "<link linkend='stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -735,8 +734,7 @@
             built within the Yocto Project.
             For this package, a work directory of
             <filename>tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+&lt;.....&gt;</filename>,
-            referred to as the
-            <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
+            referred to as the <filename>WORKDIR</filename>, is created.
             Within this directory, the source is unpacked to
             <filename>linux-qemux86-standard-build</filename> and then patched by Quilt.
             (See the
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-system-requirements.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-system-requirements.xml
new file mode 100644
index 0000000..aea1fdf
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-system-requirements.xml
@@ -0,0 +1,490 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='ref-manual-system-requirements'>
+<title>System Requirements</title>
+
+    <para>
+        Welcome to the Yocto Project Reference Manual!
+        This manual provides reference information for the current release
+        of the Yocto Project.
+        The manual is best used after you have an understanding
+        of the basics of the Yocto Project.
+        The manual is neither meant to be read as a starting point to the
+        Yocto Project nor read from start to finish.
+        Use this manual to find variable definitions, class
+        descriptions, and so forth as needed during the course of using
+        the Yocto Project.
+    </para>
+
+    <para>
+        For introductory information on the Yocto Project, see the
+        <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and the
+        "<ulink url='&YOCTO_DOCS_OM_URL;#overview-development-environment'>Yocto Project Development Environment</ulink>"
+        chapter in the Yocto Project Overview and Concepts Manual.
+    </para>
+
+    <para>
+        If you want to use the Yocto Project to quickly build an image
+        without having to understand concepts, work through the
+        <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
+        document.
+        You can find "how-to" information in the
+        <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>.
+        You can find Yocto Project overview and conceptual information in the
+        <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>.
+        <note><title>Tip</title>
+            For more information about the Yocto Project Documentation set,
+            see the
+            "<link linkend='resources-links-and-related-documentation'>Links and Related Documentation</link>"
+            section.
+        </note>
+    </para>
+
+    <section id='detailed-supported-distros'>
+        <title>Supported Linux Distributions</title>
+
+        <para>
+            Currently, the Yocto Project is supported on the following
+            distributions:
+            <note><title>Notes</title>
+                <itemizedlist>
+                    <listitem><para>
+                        Yocto Project releases are tested against the stable
+                        Linux distributions in the following list.
+                        The Yocto Project should work on other distributions but
+                        validation is not performed against them.
+                        </para></listitem>
+                    <listitem><para>
+                        In particular, the Yocto Project does not support
+                        and currently has no plans to support
+                        rolling-releases or development distributions due to
+                        their constantly changing nature.
+                        We welcome patches and bug reports, but keep in mind
+                        that our priority is on the supported platforms listed
+                        below.
+                        </para></listitem>
+                    <listitem><para>
+                        If you encounter problems, please go to
+                        <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
+                        and submit a bug.
+                        We are interested in hearing about your experience.
+                        For information on how to submit a bug, see the
+                        Yocto Project
+                        <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>
+                        and the
+                        "<ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</ulink>"
+                        section in the Yocto Project Development Tasks Manual.
+                        </para></listitem>
+                </itemizedlist>
+            </note>
+            <itemizedlist>
+<!--
+                <listitem><para>Ubuntu 10.04</para></listitem>
+                <listitem><para>Ubuntu 11.10</para></listitem>
+                <listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
+                <listitem><para>Ubuntu 13.10</para></listitem>
+                <listitem><para>Ubuntu 14.04 (LTS)</para></listitem> -->
+                <listitem><para>Ubuntu 14.10</para></listitem>
+                <listitem><para>Ubuntu 15.04</para></listitem>
+                <listitem><para>Ubuntu 15.10</para></listitem>
+                <listitem><para>Ubuntu 16.04 (LTS)</para></listitem>
+<!--                <listitem><para>Fedora 16 (Verne)</para></listitem>
+                <listitem><para>Fedora 17 (Spherical)</para></listitem>
+                <listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
+                <listitem><para>Fedora release 20 (Heisenbug)</para></listitem> -->
+                <listitem><para>Fedora release 22</para></listitem>
+                <listitem><para>Fedora release 23</para></listitem>
+<!--                <listitem><para>Fedora release 24</para></listitem>
+                <listitem><para>CentOS release 5.6 (Final)</para></listitem>
+                <listitem><para>CentOS release 5.7 (Final)</para></listitem>
+                <listitem><para>CentOS release 5.8 (Final)</para></listitem>
+                <listitem><para>CentOS release 6.3 (Final)</para></listitem>
+                <listitem><para>CentOS release 6.x</para></listitem> -->
+                <listitem><para>CentOS release 7.x</para></listitem>
+<!--                <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem>
+                <listitem><para>Debian GNU/Linux 7.x (Wheezy)</para></listitem> -->
+                <listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem>
+                <listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem>
+<!--                <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
+                <listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
+                <listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
+                <listitem><para>Debian GNU/Linux 7.4 (Wheezy)</para></listitem>
+                <listitem><para>Debian GNU/Linux 7.5 (Wheezy)</para></listitem>
+                <listitem><para>Debian GNU/Linux 7.6 (Wheezy)</para></listitem> -->
+<!--                <listitem><para>openSUSE 11.4</para></listitem>
+                <listitem><para>openSUSE 12.1</para></listitem>
+                <listitem><para>openSUSE 12.2</para></listitem>
+                <listitem><para>openSUSE 12.3</para></listitem>
+                <listitem><para>openSUSE 13.1</para></listitem> -->
+                <listitem><para>openSUSE 13.2</para></listitem>
+                <listitem><para>openSUSE 42.1</para></listitem>
+            </itemizedlist>
+        </para>
+
+        <note>
+            While the Yocto Project Team attempts to ensure all Yocto Project
+            releases are one hundred percent compatible with each officially
+            supported Linux distribution, instances might exist where you
+            encounter a problem while using the Yocto Project on a specific
+            distribution.
+        </note>
+    </section>
+
+    <section id='required-packages-for-the-host-development-system'>
+    <title>Required Packages for the Host Development System</title>
+
+        <para>
+            The list of packages you need on the host development system can
+            be large when covering all build scenarios using the Yocto Project.
+            This section provides required packages according to
+            Linux distribution and function.
+        </para>
+
+        <section id='ubuntu-packages'>
+            <title>Ubuntu and Debian</title>
+
+            <para>
+                The following list shows the required packages by function
+                given a supported Ubuntu or Debian Linux distribution:
+                <note>
+                    If your build system has the
+                    <filename>oss4-dev</filename> package installed, you
+                    might experience QEMU build failures due to the package
+                    installing its own custom
+                    <filename>/usr/include/linux/soundcard.h</filename> on
+                    the Debian system.
+                    If you run into this situation, either of the following
+                    solutions exist:
+                    <literallayout class='monospaced'>
+     $ sudo apt-get build-dep qemu
+     $ sudo apt-get remove oss4-dev
+                    </literallayout>
+                 </note>
+                <itemizedlist>
+                    <listitem><para><emphasis>Essentials:</emphasis>
+                        Packages needed to build an image on a headless
+                        system:
+                        <literallayout class='monospaced'>
+     $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
+                        Packages recommended if the host system has graphics
+                        support or if you are going to use the Eclipse
+                        IDE:
+                        <literallayout class='monospaced'>
+     $ sudo apt-get install libsdl1.2-dev xterm
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>Documentation:</emphasis>
+                        Packages needed if you are going to build out the
+                        Yocto Project documentation manuals:
+                        <literallayout class='monospaced'>
+     $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
+                        Packages needed if you are going to run
+                        <filename>oe-selftest</filename>:
+                        <literallayout class='monospaced'>
+     $ sudo apt-get install python-git
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='fedora-packages'>
+            <title>Fedora Packages</title>
+
+            <para>
+                The following list shows the required packages by function
+                given a supported Fedora Linux distribution:
+                <itemizedlist>
+                    <listitem><para><emphasis>Essentials:</emphasis>
+                        Packages needed to build an image for a headless
+                        system:
+                        <literallayout class='monospaced'>
+     $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
+                        Packages recommended if the host system has graphics
+                        support or if you are going to use the Eclipse
+                        IDE:
+                        <literallayout class='monospaced'>
+     $ sudo dnf install SDL-devel xterm
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>Documentation:</emphasis>
+                        Packages needed if you are going to build out the
+                        Yocto Project documentation manuals:
+                        <literallayout class='monospaced'>
+     $ sudo dnf install make docbook-style-dsssl docbook-style-xsl \
+     docbook-dtds docbook-utils fop libxslt dblatex xmlto
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
+                        Packages needed if you are going to run
+                        <filename>oe-selftest</filename>:
+                        <literallayout class='monospaced'>
+     $ sudo dnf install python3-GitPython
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+
+        <section id='opensuse-packages'>
+            <title>openSUSE Packages</title>
+
+            <para>
+                The following list shows the required packages by function
+                given a supported openSUSE Linux distribution:
+                <itemizedlist>
+                    <listitem><para><emphasis>Essentials:</emphasis>
+                        Packages needed to build an image for a headless
+                        system:
+                        <literallayout class='monospaced'>
+     $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
+                        Packages recommended if the host system has graphics
+                        support or if you are going to use the Eclipse
+                        IDE:
+                        <literallayout class='monospaced'>
+     $ sudo zypper install libSDL-devel xterm
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>Documentation:</emphasis>
+                        Packages needed if you are going to build out the
+                        Yocto Project documentation manuals:
+                        <literallayout class='monospaced'>
+     $ sudo zypper install make dblatex xmlto
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
+                        Packages needed if you are going to run
+                        <filename>oe-selftest</filename>:
+                        <literallayout class='monospaced'>
+     $ sudo zypper install python-GitPython
+                        </literallayout></para></listitem>
+                </itemizedlist>
+                <note>
+                    Sanity testing, through the
+                    <link linkend='ref-classes-testimage*'>testimage</link>
+                    classes, does not work on systems using the
+                    <ulink url='https://en.opensuse.org/Portal:Wicked'>Wicked</ulink>
+                    network manager.
+                </note>
+            </para>
+        </section>
+
+        <section id='centos-packages'>
+            <title>CentOS Packages</title>
+
+            <para>
+                The following list shows the required packages by function
+                given a supported CentOS Linux distribution:
+                <itemizedlist>
+                    <listitem><para><emphasis>Essentials:</emphasis>
+                        Packages needed to build an image for a headless
+                        system:
+                        <literallayout class='monospaced'>
+     $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
+                        </literallayout>
+                        <note><title>Notes</title>
+                            <itemizedlist>
+                                <listitem><para>
+                                    Extra Packages for Enterprise Linux
+                                    (i.e. <filename>epel-release</filename>)
+                                    is a collection of packages from Fedora
+                                    built on RHEL/CentOS for easy installation
+                                    of packages not included in enterprise
+                                    Linux by default.
+                                    You need to install these packages
+                                    separately.
+                                    </para></listitem>
+                                <listitem><para>
+                                    The <filename>makecache</filename> command
+                                    consumes additional Metadata from
+                                    <filename>epel-release</filename>.
+                                    </para></listitem>
+                            </itemizedlist>
+                        </note>
+                        </para></listitem>
+                    <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
+                        Packages recommended if the host system has graphics
+                        support or if you are going to use the Eclipse
+                        IDE:
+                        <literallayout class='monospaced'>
+     $ sudo yum install SDL-devel xterm
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>Documentation:</emphasis>
+                        Packages needed if you are going to build out the
+                        Yocto Project documentation manuals:
+                        <literallayout class='monospaced'>
+     $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
+     docbook-dtds docbook-utils fop libxslt dblatex xmlto
+                        </literallayout></para></listitem>
+                    <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
+                        Packages needed if you are going to run
+                        <filename>oe-selftest</filename>:
+                        <literallayout class='monospaced'>
+     $ sudo yum install GitPython
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+    </section>
+
+    <section id='required-git-tar-and-python-versions'>
+        <title>Required Git, tar, and Python Versions</title>
+
+        <para>
+            In order to use the build system, your host development system
+            must meet the following version requirements for Git, tar, and
+            Python:
+            <itemizedlist>
+                <listitem><para>Git 1.8.3.1 or greater</para></listitem>
+                <listitem><para>tar 1.27 or greater</para></listitem>
+                <listitem><para>Python 3.4.0 or greater</para></listitem>
+            </itemizedlist>
+        </para>
+
+        <para>
+            If your host development system does not meet all these requirements,
+            you can resolve this by installing a <filename>buildtools</filename>
+            tarball that contains these tools.
+            You can get the tarball one of two ways: download a pre-built
+            tarball or use BitBake to build the tarball.
+        </para>
+
+        <section id='downloading-a-pre-built-buildtools-tarball'>
+            <title>Downloading a Pre-Built <filename>buildtools</filename> Tarball</title>
+
+            <para>
+                Downloading and running a pre-built buildtools installer is
+                the easiest of the two methods by which you can get these tools:
+                <orderedlist>
+                    <listitem><para>
+                        Locate and download the <filename>*.sh</filename> at
+                        <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/buildtools/'></ulink>.
+                        </para></listitem>
+                    <listitem><para>
+                        Execute the installation script.
+                        Here is an example:
+                        <literallayout class='monospaced'>
+     $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
+                        </literallayout>
+                        During execution, a prompt appears that allows you to
+                        choose the installation directory.
+                        For example, you could choose the following:
+                        <literallayout class='monospaced'>
+     /home/<replaceable>your-username</replaceable>/buildtools
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        Source the tools environment setup script by using a
+                        command like the following:
+                        <literallayout class='monospaced'>
+     $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-i586-poky-linux
+                        </literallayout>
+                        Of course, you need to supply your installation directory and be
+                        sure to use the right file (i.e. i585 or x86-64).
+                        </para>
+                        <para>
+                        After you have sourced the setup script,
+                        the tools are added to <filename>PATH</filename>
+                        and any other environment variables required to run the
+                        tools are initialized.
+                        The results are working versions versions of Git, tar,
+                        Python and <filename>chrpath</filename>.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='building-your-own-buildtools-tarball'>
+            <title>Building Your Own <filename>buildtools</filename> Tarball</title>
+
+            <para>
+                Building and running your own buildtools installer applies
+                only when you have a build host that can already run BitBake.
+                In this case, you use that machine to build the
+                <filename>.sh</filename> file and then
+                take steps to transfer and run it on a
+                machine that does not meet the minimal Git, tar, and Python
+                requirements.
+            </para>
+
+            <para>
+                Here are the steps to take to build and run your own
+                buildtools installer:
+                <orderedlist>
+                    <listitem><para>
+                        On the machine that is able to run BitBake,
+                        be sure you have set up your build environment with
+                        the setup script
+                        (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
+                        </para></listitem>
+                    <listitem><para>
+                        Run the BitBake command to build the tarball:
+                        <literallayout class='monospaced'>
+     $ bitbake buildtools-tarball
+                        </literallayout>
+                        <note>
+                        The
+                        <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
+                        variable in your <filename>local.conf</filename> file
+                        determines whether you build tools for a 32-bit
+                        or 64-bit system.
+                       </note>
+                       Once the build completes, you can find the
+                       <filename>.sh</filename> file that installs
+                       the tools in the <filename>tmp/deploy/sdk</filename>
+                       subdirectory of the
+                       <link linkend='build-directory'>Build Directory</link>.
+                       The installer file has the string "buildtools"
+                       in the name.
+                       </para></listitem>
+                   <listitem><para>
+                       Transfer the <filename>.sh</filename> file from the
+                       build host to the machine that does not meet the
+                       Git, tar, or Python requirements.
+                       </para></listitem>
+                   <listitem><para>
+                       On the machine that does not meet the requirements,
+                       run the <filename>.sh</filename> file
+                       to install the tools.
+                       Here is an example:
+                       <literallayout class='monospaced'>
+     $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
+                       </literallayout>
+                       During execution, a prompt appears that allows you to
+                       choose the installation directory.
+                       For example, you could choose the following:
+                       <literallayout class='monospaced'>
+     /home/<replaceable>your_username</replaceable>/buildtools
+                       </literallayout>
+                       </para></listitem>
+                    <listitem><para>
+                        Source the tools environment setup script by using a
+                        command like the following:
+                        <literallayout class='monospaced'>
+     $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-i586-poky-linux
+                        </literallayout>
+                        Of course, you need to supply your installation directory and be
+                        sure to use the right file (i.e. i585 or x86-64).
+                        </para>
+                        <para>
+                        After you have sourced the setup script,
+                        the tools are added to <filename>PATH</filename>
+                        and any other environment variables required to run the
+                        tools are initialized.
+                        The results are working versions versions of Git, tar,
+                        Python and <filename>chrpath</filename>.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+    </section>
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml
index c726cb9..e6cf686 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml
@@ -111,8 +111,7 @@
             <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
             class and should write the output to
             <filename>${</filename><link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link><filename>}</filename>,
-            which is not to be confused with
-            <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}</filename>.
+            which is not to be confused with <filename>${DEPLOY_DIR}</filename>.
             The <filename>deploy</filename> class sets up
             <filename>do_deploy</filename> as a shared state (sstate) task that
             can be accelerated through sstate use.
@@ -220,8 +219,8 @@
 
         <para>
             For more information on image creation, see the
-            "<link linkend='image-generation-dev-environment'>Image Generation</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -232,7 +231,7 @@
             Completes the image generation process.
             The <filename>do_image_complete</filename> task runs after the
             OpenEmbedded build system has run the
-            <link linkend='ref-tasks-rootfs'><filename>do_image</filename></link>
+            <link linkend='ref-tasks-image'><filename>do_image</filename></link>
             task during which image pre-processing occurs and through
             dynamically generated <filename>do_image_*</filename> tasks the
             image is constructed.
@@ -246,8 +245,8 @@
 
         <para>
             For more information on image creation, see the
-            "<link linkend='image-generation-dev-environment'>Image Generation</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -268,7 +267,7 @@
             and
             <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>),
             run under
-            <link linkend='fakeroot-and-pseudo'>fakeroot</link>.
+            <ulink url='&YOCTO_DOCS_OM_URL;#fakeroot-and-pseudo'>fakeroot</ulink>.
             <note>
                 <title>Caution</title>
 
@@ -280,7 +279,7 @@
                     UID and/or GID of the original file, which is usually not
                     what you want.
                     The
-                    <link linkend='ref-classes-insane'><filename>host-user-contaminated</filename></link>
+                    <link linkend='insane-host-user-contaminated'><filename>host-user-contaminated</filename></link>
                     QA check checks for files that probably have the wrong
                     ownership.
                 </para>
@@ -342,8 +341,8 @@
             For additional information, see the
             <link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link>
             variable and the
-            "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -367,8 +366,8 @@
             <filename>${</filename><link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link><filename>}</filename>
             directory in the package feeds area.
             For more information, see the
-            "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -381,8 +380,8 @@
             <filename>${</filename><link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link><filename>}</filename>
             directory in the package feeds area.
             For more information, see the
-            "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -395,8 +394,8 @@
             <filename>${</filename><link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link><filename>}</filename>
             directory in the package feeds area.
             For more information, see the
-            "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -408,8 +407,8 @@
             <filename>${</filename><link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link><filename>}</filename>
             directory in the package feeds area.
             For more information, see the
-            "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-            section.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+            section in the Yocto Project Overview and Concepts Manual.
         </para>
     </section>
 
@@ -430,9 +429,87 @@
 
         <para>
             Locates patch files and applies them to the source code.
-            See the
-            "<link linkend='patching-dev-environment'>Patching</link>"
-            section for more information.
+        </para>
+
+        <para>
+            After fetching and unpacking source files, the build system
+            uses the recipe's
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+            statements to locate and apply patch files to the source code.
+            <note>
+                The build system uses the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
+                variable to determine the default set of directories when
+                searching for patches.
+            </note>
+            Patch files, by default, are <filename>*.patch</filename> and
+            <filename>*.diff</filename> files created and kept in a
+            subdirectory of the directory holding the recipe file.
+            For example, consider the
+            <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/bluez5'><filename>bluez5</filename></ulink>
+            recipe from the OE-Core layer (i.e.
+            <filename>poky/meta</filename>):
+            <literallayout class='monospaced'>
+     poky/meta/recipes-connectivity/bluez5
+            </literallayout>
+            This recipe has two patch files located here:
+            <literallayout class='monospaced'>
+     poky/meta/recipes-connectivity/bluez5/bluez5
+            </literallayout>
+        </para>
+
+        <para>
+            In the <filename>bluez5</filename> recipe, the
+            <filename>SRC_URI</filename> statements point to the source and
+            patch files needed to build the package.
+            <note>
+                In the case for the <filename>bluez5_5.48.bb</filename>
+                recipe, the <filename>SRC_URI</filename> statements are from an
+                include file <filename>bluez5.inc</filename>.
+            </note>
+        </para>
+
+        <para>
+            As mentioned earlier, the build system treats files whose file
+            types are <filename>.patch</filename> and
+            <filename>.diff</filename> as patch files.
+            However, you can use the "apply=yes" parameter with the
+            <filename>SRC_URI</filename> statement to indicate any file as a
+            patch file:
+            <literallayout class='monospaced'>
+     SRC_URI = " \
+          git://<replaceable>path_to_repo</replaceable>/<replaceable>some_package</replaceable> \
+          file://<replaceable>file</replaceable>;apply=yes \
+     "
+            </literallayout>
+        </para>
+
+        <para>
+            Conversely, if you have a directory full of patch files and you
+            want to exclude some so that the <filename>do_patch</filename>
+            task does not apply them during the patch phase, you can use
+            the "apply=no" parameter with the <filename>SRC_URI</filename>
+            statement:
+            <literallayout class='monospaced'>
+     SRC_URI = " \
+          git://<replaceable>path_to_repo</replaceable>/<replaceable>some_package</replaceable> \
+          file://<replaceable>path_to_lots_of_patch_files</replaceable> \
+          file://<replaceable>path_to_lots_of_patch_files</replaceable>/<replaceable>patch_file5</replaceable>;apply=no \
+     "
+            </literallayout>
+            In the previous example, assuming all the files in the directory
+            holding the patch files end with either <filename>.patch</filename>
+            or <filename>.diff</filename>, every file would be applied as a
+            patch by default except for the
+            <replaceable>patch_file5</replaceable> patch.
+        </para>
+
+        <para>
+            You can find out more about the patching process in the
+            "<ulink url='&YOCTO_DOCS_OM_URL;#patching-dev-environment'>Patching</ulink>"
+            section in the Yocto Project Overview and Concepts Manual and the
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code'>Patching Code</ulink>"
+            section in the Yocto Project Development Tasks Manual.
         </para>
     </section>
 
@@ -451,8 +528,9 @@
         <para>
             Creates the file and directory structure for an installable SDK.
             See the
-            "<link linkend='sdk-generation-dev-environment'>SDK Generation</link>"
-            section for more information.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-generation-dev-environment'>SDK Generation</ulink>"
+            section in the Yocto Project Overview and Concepts Manual for more
+            information.
         </para>
     </section>
 
@@ -538,8 +616,9 @@
             <link linkend='var-S'><filename>S</filename></link> variable also
             plays a role in where unpacked source files ultimately reside.
             For more information on how source files are unpacked, see the
-            "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
-            section and the <filename>WORKDIR</filename> and
+            "<ulink url='&YOCTO_DOCS_OM_URL;#source-fetching-dev-environment'>Source Fetching</ulink>"
+            section in the Yocto Project Overview and Concepts Manual and also
+            see the <filename>WORKDIR</filename> and
             <filename>S</filename> variable descriptions.
         </para>
     </section>
@@ -593,24 +672,13 @@
         </para>
     </section>
 
-    <section id='ref-tasks-checkuriall'>
-        <title><filename>do_checkuriall</filename></title>
-
-        <para>
-            Validates the
-            <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
-            value for all recipes required to build a target.
-        </para>
-    </section>
-
     <section id='ref-tasks-clean'>
         <title><filename>do_clean</filename></title>
 
         <para>
             Removes all output files for a target from the
             <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
-            task forward (i.e.
-            <link linkend='ref-tasks-patch'><filename>do_unpack</filename></link>,
+            task forward (i.e. <filename>do_unpack</filename>,
             <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>,
             <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
             <link linkend='ref-tasks-install'><filename>do_install</filename></link>,
@@ -627,8 +695,8 @@
 
         <para>
             Running this task does not remove the
-            <link linkend='shared-state-cache'>sstate</link>) cache
-            files.
+            <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>
+            cache files.
             Consequently, if no changes have been made and the recipe is
             rebuilt after cleaning, output files are simply restored from the
             sstate cache.
@@ -644,8 +712,9 @@
 
         <para>
             Removes all output files, shared state
-            (<link linkend='shared-state-cache'>sstate</link>) cache, and
-            downloaded source files for a target (i.e. the contents of
+            (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
+            cache, and downloaded source files for a target (i.e. the contents
+            of
             <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>).
             Essentially, the <filename>do_cleanall</filename> task is
             identical to the
@@ -674,13 +743,14 @@
 
         <para>
             Removes all output files and shared state
-            (<link linkend='shared-state-cache'>sstate</link>)
+            (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
             cache for a target.
             Essentially, the <filename>do_cleansstate</filename> task is
             identical to the
             <link linkend='ref-tasks-clean'><filename>do_clean</filename></link>
             task with the added removal of shared state
-            (<link linkend='shared-state-cache'>sstate</link>) cache.
+            (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
+            cache.
         </para>
 
         <para>
@@ -736,14 +806,6 @@
         </para>
     </section>
 
-    <section id='ref-tasks-fetchall'>
-        <title><filename>do_fetchall</filename></title>
-
-        <para>
-            Fetches all remote sources required to build a target.
-        </para>
-    </section>
-
     <section id='ref-tasks-listtasks'>
         <title><filename>do_listtasks</filename></title>
 
@@ -757,7 +819,7 @@
 
         <para>
             Creates or updates the index in the
-            <link linkend='package-feeds-dev-environment'>Package Feeds</link>
+            <ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>
             area.
             <note>
                 This task is not triggered with the
@@ -809,8 +871,9 @@
             Creates the root filesystem (file and directory structure) for an
             image.
             See the
-            "<link linkend='image-generation-dev-environment'>Image Generation</link>"
-            section for more information on how the root filesystem is created.
+            "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
+            section in the Yocto Project Overview and Concepts Manual for more
+            information on how the root filesystem is created.
         </para>
     </section>
 
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-terms.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-terms.xml
new file mode 100644
index 0000000..cc09d3f
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-terms.xml
@@ -0,0 +1,507 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='ref-terms'>
+<title>Yocto Project Terms</title>
+
+    <para>
+        Following is a list of terms and definitions users new to the Yocto
+        Project development environment might find helpful.
+        While some of these terms are universal, the list includes them
+        just in case:
+        <itemizedlist>
+            <listitem><para>
+                <emphasis>Append Files:</emphasis>
+                Files that append build information to a recipe file.
+                Append files are known as BitBake append files and
+                <filename>.bbappend</filename> files.
+                The OpenEmbedded build system expects every append file to have
+                a corresponding recipe (<filename>.bb</filename>) file.
+                Furthermore, the append file and corresponding recipe file
+                must use the same root filename.
+                The filenames can differ only in the file type suffix used
+                (e.g.
+                <filename>formfactor_0.0.bb</filename> and
+                <filename>formfactor_0.0.bbappend</filename>).</para>
+
+                <para>Information in append files extends or overrides the
+                information in the similarly-named recipe file.
+                For an example of an append file in use, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                <note>
+                    Append files can also use wildcard patterns in their
+                    version numbers so they can be applied to more than one
+                    version of the underlying recipe file.
+                </note>
+                </para></listitem>
+            <listitem><para id='bitbake-term'>
+                <emphasis>BitBake:</emphasis>
+                The task executor and scheduler used by the OpenEmbedded build
+                system to build images.
+                For more information on BitBake, see the
+                <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+                </para></listitem>
+            <listitem><para id='board-support-package-bsp-term'>
+                <emphasis>Board Support Package (BSP):</emphasis>
+                A group of drivers, definitions, and other components that
+                provide support for a specific hardware configuration.
+                For more information on BSPs, see the
+                <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
+                </para></listitem>
+            <listitem>
+                <para id='build-directory'>
+                <emphasis>Build Directory:</emphasis>
+                This term refers to the area used by the OpenEmbedded build
+                system for builds.
+                The area is created when you <filename>source</filename> the
+                setup environment script that is found in the Source Directory
+                (i.e. <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
+                The
+                <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link>
+                variable points to the Build Directory.</para>
+
+                <para>You have a lot of flexibility when creating the Build
+                Directory.
+                Following are some examples that show how to create the
+                directory.
+                The examples assume your
+                <link linkend='source-directory'>Source Directory</link> is
+                named <filename>poky</filename>:
+                <itemizedlist>
+                    <listitem><para>Create the Build Directory inside your
+                        Source Directory and let the name of the Build
+                        Directory default to <filename>build</filename>:
+                        <literallayout class='monospaced'>
+     $ cd $HOME/poky
+     $ source &OE_INIT_FILE;
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>Create the Build Directory inside your
+                        home directory and specifically name it
+                        <filename>test-builds</filename>:
+                        <literallayout class='monospaced'>
+     $ cd $HOME
+     $ source poky/&OE_INIT_FILE; test-builds
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        Provide a directory path and specifically name the
+                        Build Directory.
+                        Any intermediate folders in the pathname must exist.
+                        This next example creates a Build Directory named
+                        <filename>YP-&POKYVERSION;</filename>
+                        in your home directory within the existing
+                        directory <filename>mybuilds</filename>:
+                        <literallayout class='monospaced'>
+     $cd $HOME
+     $ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
+                        </literallayout>
+                        </para></listitem>
+                </itemizedlist>
+                <note>
+                    By default, the Build Directory contains
+                    <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
+                    which is a temporary directory the build system uses for
+                    its work.
+                    <filename>TMPDIR</filename> cannot be under NFS.
+                    Thus, by default, the Build Directory cannot be under NFS.
+                    However, if you need the Build Directory to be under NFS,
+                    you can set this up by setting <filename>TMPDIR</filename>
+                    in your <filename>local.conf</filename> file
+                    to use a local drive.
+                    Doing so effectively separates <filename>TMPDIR</filename>
+                    from <filename>TOPDIR</filename>, which is the Build
+                    Directory.
+                </note>
+                </para></listitem>
+            <listitem><para id='hardware-build-system-term'>
+                <emphasis>Build Host:</emphasis>
+                The system used to build images in a Yocto Project
+                Development environment.
+                The build system is sometimes referred to as the
+                development host.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Classes:</emphasis>
+                Files that provide for logic encapsulation and inheritance so
+                that commonly used patterns can be defined once and then
+                easily used in multiple recipes.
+                For reference information on the Yocto Project classes, see the
+                "<link linkend='ref-classes'>Classes</link>" chapter.
+                Class files end with the <filename>.bbclass</filename>
+                filename extension.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Configuration File:</emphasis>
+                Files that hold global definitions of variables,
+                user-defined variables, and hardware configuration
+                information.
+                These files tell the OpenEmbedded build system what to
+                build and what to put into the image to support a
+                particular platform.</para>
+
+                <para>Configuration files end with a <filename>.conf</filename>
+                filename extension.
+                The <filename>conf/local.conf</filename> configuration file in
+                the
+                <link linkend='build-directory'>Build Directory</link>
+                contains user-defined variables that affect every build.
+                The <filename>meta-poky/conf/distro/poky.conf</filename>
+                configuration file defines Yocto "distro" configuration
+                variables used only when building with this policy.
+                Machine configuration files, which
+                are located throughout the
+                <link linkend='source-directory'>Source Directory</link>, define
+                variables for specific hardware and are only used when building
+                for that target (e.g. the
+                <filename>machine/beaglebone.conf</filename> configuration
+                file defines variables for the Texas Instruments ARM Cortex-A8
+                development board).
+                </para></listitem>
+            <listitem><para id='term-container-layer'>
+                <emphasis>Container Layer:</emphasis>
+                Layers that hold other layers.
+                An example of a container layer is the
+                <filename>meta-intel</filename> layer.
+                This layer contains BSP layers for the Intel-core2-32
+                <trademark class='registered'>Intel</trademark> Common Core
+                (Intel-core2-32) and the Intel-corei7-64
+                <trademark class='registered'>Intel</trademark> Common Core
+                (Intel-corei7-64).
+                the <filename>meta-intel</filename> layer also contains
+                the <filename>common/</filename> directory, which contains
+                common content across those layers.
+                </para></listitem>
+            <listitem><para id='cross-development-toolchain'>
+                <emphasis>Cross-Development Toolchain:</emphasis>
+                In general, a cross-development toolchain is a collection of
+                software development tools and utilities that run on one
+                architecture and allow you to develop software for a
+                different, or targeted, architecture.
+                These toolchains contain cross-compilers, linkers, and
+                debuggers that are specific to the target architecture.</para>
+
+                <para>The Yocto Project supports two different cross-development
+                toolchains:
+                <itemizedlist>
+                    <listitem><para>
+                        A toolchain only used by and within
+                        BitBake when building an image for a target
+                        architecture.
+                        </para></listitem>
+                    <listitem><para>A relocatable toolchain used outside of
+                        BitBake by developers when developing applications
+                        that will run on a targeted device.
+                        </para></listitem>
+                </itemizedlist></para>
+
+                <para>Creation of these toolchains is simple and automated.
+                For information on toolchain concepts as they apply to the
+                Yocto Project, see the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
+                section in the Yocto Project Overview and Concepts Manual.
+                You can also find more information on using the
+                relocatable toolchain in the
+                <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+                manual.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
+                A custom SDK for application developers.
+                This eSDK allows developers to incorporate their library
+                and programming changes back into the image to make
+                their code available to other application developers.</para>
+
+                <para>For information on the eSDK, see the
+                <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+                manual.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Image:</emphasis>
+                An image is an artifact of the BitBake build process given
+                a collection of recipes and related Metadata.
+                Images are the binary output that run on specific hardware or
+                QEMU and are used for specific use-cases.
+                For a list of the supported image types that the Yocto Project
+                provides, see the
+                "<link linkend='ref-images'>Images</link>"
+                chapter.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Layer:</emphasis>
+                A collection of related recipes.
+                Layers allow you to consolidate related metadata to
+                customize your build.
+                Layers also isolate information used when building
+                for multiple architectures.
+                Layers are hierarchical in their ability to override
+                previous specifications.
+                You can include any number of available layers from the
+                Yocto Project and customize the build by adding your
+                layers after them.
+                You can search the Layer Index for layers used within
+                Yocto Project.</para>
+
+                <para>For introductory information on layers, see the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
+                section in the Yocto Project Overview and Concepts Manual.
+                For more detailed information on layers, see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+                section in the Yocto Project Development Tasks Manual.
+                For a discussion specifically on BSP Layers, see the
+                "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
+                section in the Yocto Project Board Support Packages (BSP)
+                Developer's Guide.
+                </para></listitem>
+            <listitem><para id='metadata'>
+                <emphasis>Metadata:</emphasis>
+                A key element of the Yocto Project is the Metadata that
+                is used to construct a Linux distribution and is contained
+                in the files that the
+                <link linkend='build-system-term'>OpenEmbedded build system</link>
+                parses when building an image.
+                In general, Metadata includes recipes, configuration
+                files, and other information that refers to the build
+                instructions themselves, as well as the data used to
+                control what things get built and the effects of the
+                build.
+                Metadata also includes commands and data used to
+                indicate what versions of software are used, from
+                where they are obtained, and changes or additions to the
+                software itself (patches or auxiliary files) that
+                are used to fix bugs or customize the software for use
+                in a particular situation.
+                OpenEmbedded-Core is an important set of validated
+                metadata.</para>
+
+                <para>In the context of the kernel ("kernel Metadata"), the
+                term refers to the kernel config fragments and features
+                contained in the
+                <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache'><filename>yocto-kernel-cache</filename></ulink>
+                Git repository.
+                </para></listitem>
+            <listitem><para id='oe-core'>
+                <emphasis>OpenEmbedded-Core (OE-Core):</emphasis>
+                OE-Core is metadata comprised of foundational recipes,
+                classes, and associated files that are meant to be
+                common among many different OpenEmbedded-derived systems,
+                including the Yocto Project.
+                OE-Core is a curated subset of an original repository
+                developed by the OpenEmbedded community that has been
+                pared down into a smaller, core set of continuously
+                validated recipes.
+                The result is a tightly controlled and an quality-assured
+                core set of recipes.</para>
+
+                <para>You can see the Metadata in the
+                <filename>meta</filename> directory of the Yocto Project
+                <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>.
+                </para></listitem>
+            <listitem><para id='build-system-term'>
+                <emphasis>OpenEmbedded Build System:</emphasis>
+                The build system specific to the Yocto Project.
+                The OpenEmbedded build system is based on another project known
+                as "Poky", which uses
+                <link linkend='bitbake-term'>BitBake</link> as the task
+                executor.
+                Throughout the Yocto Project documentation set, the
+                OpenEmbedded build system is sometimes referred to simply
+                as "the build system".
+                If other build systems, such as a host or target build system
+                are referenced, the documentation clearly states the
+                difference.
+                <note>
+                    For some historical information about Poky, see the
+                    <link linkend='poky'>Poky</link> term.
+                </note>
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Package:</emphasis>
+                In the context of the Yocto Project, this term refers to a
+                recipe's packaged output produced by BitBake (i.e. a
+                "baked recipe").
+                A package is generally the compiled binaries produced from the
+                recipe's sources.
+                You "bake" something by running it through BitBake.</para>
+
+                <para>It is worth noting that the term "package" can,
+                in general, have subtle meanings.
+                For example, the packages referred to in the
+                "<link linkend='required-packages-for-the-host-development-system'>Required Packages for the Host Development System</link>"
+                section are compiled binaries that, when installed, add
+                functionality to your Linux distribution.</para>
+
+                <para>Another point worth noting is that historically within
+                the Yocto Project, recipes were referred to as packages - thus,
+                the existence of several BitBake variables that are seemingly
+                mis-named,
+                (e.g. <link linkend='var-PR'><filename>PR</filename></link>,
+                <link linkend='var-PV'><filename>PV</filename></link>, and
+                <link linkend='var-PE'><filename>PE</filename></link>).
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Package Groups:</emphasis>
+                Arbitrary groups of software Recipes.
+                You use package groups to hold recipes that, when built,
+                usually accomplish a single task.
+                For example, a package group could contain the recipes for a
+                company’s proprietary or value-add software.
+                Or, the package group could contain the recipes that enable
+                graphics.
+                A package group is really just another recipe.
+                Because package group files are recipes, they end with the
+                <filename>.bb</filename> filename extension.
+                </para></listitem>
+            <listitem><para id='poky'>
+                <emphasis>Poky:</emphasis>
+                Poky, which is pronounced <emphasis>Pock</emphasis>-ee,
+                is a reference embedded distribution and a reference
+                test configuration.
+                Poky provides the following:
+                <itemizedlist>
+                    <listitem><para>
+                        A base-level functional distro used to illustrate
+                        how to customize a distribution.
+                        </para></listitem>
+                    <listitem><para>
+                        A means by which to test the Yocto Project
+                        components (i.e. Poky is used to validate
+                        the Yocto Project).
+                        </para></listitem>
+                    <listitem><para>
+                        A vehicle through which you can download
+                        the Yocto Project.
+                        </para></listitem>
+                </itemizedlist>
+                Poky is not a product level distro.
+                Rather, it is a good starting point for customization.
+                <note>
+                    Poky began an open-source
+                    project initially developed by OpenedHand.
+                    OpenedHand developed Poky from the existing
+                    OpenEmbedded build system to create a commercially
+                    supportable build system for embedded Linux.
+                    After Intel Corporation acquired OpenedHand, the
+                    poky project became the basis for the Yocto Project's
+                    build system.
+                </note>
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Recipe:</emphasis>
+                A set of instructions for building packages.
+                A recipe describes where you get source code, which patches
+                to apply, how to configure the source, how to compile it and so on.
+                Recipes also describe dependencies for libraries or for other
+                recipes.
+                Recipes represent the logical unit of execution, the software
+                to build, the images to build, and use the
+                <filename>.bb</filename> file extension.
+                </para></listitem>
+            <listitem><para id='reference-kit-term'>
+                <emphasis>Reference Kit:</emphasis>
+                A working example of a system, which includes a
+                <link linkend='board-support-package-bsp-term'>BSP</link>
+                as well as a
+                <link linkend='hardware-build-system-term'>build host</link>
+                and other components, that can work on specific hardware.
+                </para></listitem>
+            <listitem>
+                <para id='source-directory'>
+                <emphasis>Source Directory:</emphasis>
+                This term refers to the directory structure created as a result
+                of creating a local copy of the <filename>poky</filename> Git
+                repository <filename>git://git.yoctoproject.org/poky</filename>
+                or expanding a released <filename>poky</filename> tarball.
+                <note>
+                    Creating a local copy of the <filename>poky</filename>
+                    Git repository is the recommended method for setting up
+                    your Source Directory.
+                </note>
+                Sometimes you might hear the term "poky directory" used to refer
+                to this directory structure.
+                <note>
+                    The OpenEmbedded build system does not support file or
+                    directory names that contain spaces.
+                    Be sure that the Source Directory you use does not contain
+                    these types of names.
+                </note></para>
+
+                <para>The Source Directory contains BitBake, Documentation,
+                Metadata and other files that all support the Yocto Project.
+                Consequently, you must have the Source Directory in place on
+                your development system in order to do any development using
+                the Yocto Project.</para>
+
+                <para>When you create a local copy of the Git repository, you
+                can name the repository anything you like.
+                Throughout much of the documentation, "poky"
+                is used as the name of the top-level folder of the local copy of
+                the poky Git repository.
+                So, for example, cloning the <filename>poky</filename> Git
+                repository results in a local Git repository whose top-level
+                folder is also named "poky".</para>
+
+                <para>While it is not recommended that you use tarball expansion
+                to set up the Source Directory, if you do, the top-level
+                directory name of the Source Directory is derived from the
+                Yocto Project release tarball.
+                For example, downloading and unpacking
+                <filename>&YOCTO_POKY_TARBALL;</filename> results in a
+                Source Directory whose root folder is named
+                <filename>&YOCTO_POKY;</filename>.</para>
+
+                <para>It is important to understand the differences between the
+                Source Directory created by unpacking a released tarball as
+                compared to cloning
+                <filename>git://git.yoctoproject.org/poky</filename>.
+                When you unpack a tarball, you have an exact copy of the files
+                based on the time of release - a fixed release point.
+                Any changes you make to your local files in the Source Directory
+                are on top of the release and will remain local only.
+                On the other hand, when you clone the <filename>poky</filename>
+                Git repository, you have an active development repository with
+                access to the upstream repository's branches and tags.
+                In this case, any local changes you make to the local
+                Source Directory can be later applied to active development
+                branches of the upstream <filename>poky</filename> Git
+                repository.</para>
+
+                <para>For more information on concepts related to Git
+                repositories, branches, and tags, see the
+                "<ulink url='&YOCTO_DOCS_OM_URL;#repositories-tags-and-branches'>Repositories, Tags, and Branches</ulink>"
+                section in the Yocto Project Overview and Concepts Manual.
+                </para></listitem>
+            <listitem><para><emphasis>Task:</emphasis>
+                A unit of execution for BitBake (e.g.
+                <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
+                <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>,
+                <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>,
+                and so forth).
+                </para></listitem>
+            <listitem><para id='toaster-term'><emphasis>Toaster:</emphasis>
+                A web interface to the Yocto Project's
+                <link linkend='build-system-term'>OpenEmbedded Build System</link>.
+                The interface enables you to configure and run your builds.
+                Information about builds is collected and stored in a database.
+                For information on Toaster, see the
+                <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Upstream:</emphasis>
+                A reference to source code or repositories
+                that are not local to the development system but located in a
+                master area that is controlled by the maintainer of the source
+                code.
+                For example, in order for a developer to work on a particular
+                piece of code, they need to first get a copy of it from an
+                "upstream" source.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml
index 2b01723..1c55a92 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml
@@ -22,7 +22,7 @@
        <link linkend='var-D'>D</link>
        <link linkend='var-EFI_PROVIDER'>E</link>
        <link linkend='var-FEATURE_PACKAGES'>F</link>
-       <link linkend='var-GDB'>G</link>
+       <link linkend='var-GCCPIE'>G</link>
        <link linkend='var-HOMEPAGE'>H</link>
        <link linkend='var-ICECC_DISABLED'>I</link>
 <!--               <link linkend='var-glossary-j'>J</link> -->
@@ -72,12 +72,13 @@
 
         <glossentry id='var-ALLOW_EMPTY'><glossterm>ALLOW_EMPTY</glossterm>
             <info>
-                ALLOW_EMPTY[doc] = "Specifies if an output package should still be produced if it is empty."
+                ALLOW_EMPTY[doc] = "Specifies whether to produce an output package even if it is empty."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                   Specifies if an output package should still be produced if it is empty.
+                   Specifies whether to produce an output package even if it is
+                   empty.
                    By default, BitBake does not produce empty packages.
                    This default behavior can cause issues when there is an
                    <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> or
@@ -253,13 +254,14 @@
 
         <glossentry id='var-APPEND'><glossterm>APPEND</glossterm>
             <info>
-                APPEND[doc] = "An override list of append strings for each LABEL."
+                APPEND[doc] = "An override list of append strings for target specified using LABELS."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    An override list of append strings for each
-                    <link linkend='var-LABELS'><filename>LABEL</filename></link>.
+                    An override list of append strings for each target
+                    specified with
+                    <link linkend='var-LABELS'><filename>LABELS</filename></link>.
                 </para>
 
                 <para>
@@ -354,7 +356,7 @@
                 </para>
 
                 <para>
-                    In OpenEmbedded Core, <filename>ASSUME_PROVIDED</filename>
+                    In OpenEmbedded-Core, <filename>ASSUME_PROVIDED</filename>
                     mostly specifies native tools that should not be built.
                     An example is <filename>git-native</filename>, which when
                     specified, allows for the Git binary from the host to be
@@ -775,10 +777,9 @@
            WARN:      Issue a warning but continue the
                       build when a threshold is broken.
                       Subsequent warnings are issued as
-                      defined by the
-                      <link linkend='var-BB_DISKMON_WARNINTERVAL'>BB_DISKMON_WARNINTERVAL</link> variable,
-                      which must be defined in the
-                      conf/local.conf file.
+                      defined by the BB_DISKMON_WARNINTERVAL
+                      variable, which must be defined in
+                      the conf/local.conf file.
 
         <replaceable>dir</replaceable> is:
            Any directory you choose. You can specify one or
@@ -971,15 +972,41 @@
 
                 <para>
                     For more information on speeding up builds, see the
-                    "<link linkend='speeding-up-the-build'>Speeding Up the Build</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#speeding-up-a-build'>Speeding Up a Build</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-BB_SERVER_TIMEOUT'><glossterm>BB_SERVER_TIMEOUT</glossterm>
+            <info>
+                BB_SERVER_TIMEOUT [doc] = "Specifies the time (in seconds) after which to unload the BitBake server due to inactivity."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Specifies the time (in seconds) after which to unload the
+                    BitBake server due to inactivity.
+                    Set <filename>BB_SERVER_TIMEOUT</filename> to determine how
+                    long the BitBake server stays resident between invocations.
+                </para>
+
+                <para>
+                    For example, the following statement in your
+                    <filename>local.conf</filename> file instructs the server
+                    to be unloaded after 20 seconds of inactivity:
+                    <literallayout class='monospaced'>
+     BB_SERVER_TIMEOUT = "20"
+                    </literallayout>
+                    If you want the server to never be unloaded, set
+                    <filename>BB_SERVER_TIMEOUT</filename> to "-1".
                 </para>
             </glossdef>
         </glossentry>
 
         <glossentry id='var-BBCLASSEXTEND'><glossterm>BBCLASSEXTEND</glossterm>
             <info>
-                BBCLASSEXTEND[doc] = "Allows you to extend a recipe so that it builds variants of the software. Common variants for recipes are 'native', 'cross', 'nativesdk' and multilibs."
+                BBCLASSEXTEND[doc] = "Allows you to extend a recipe so that it builds variants of the software. Common variants for recipes are 'native', 'cross', 'nativesdk', and multilibs."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -1116,6 +1143,53 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-BBFILES_DYNAMIC'><glossterm>BBFILES_DYNAMIC</glossterm>
+            <info>
+                BBFILES_DYNAMIC[doc] = "Activates content when identified layers are present."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Activates content when identified layers are present.
+                    You identify the layers by the collections that the layers
+                    define.
+                </para>
+
+                <para>
+                    Use the <filename>BBFILES_DYNAMIC</filename> variable to
+                    avoid <filename>.bbappend</filename> files whose
+                    corresponding <filename>.bb</filename> file is in a layer
+                    that attempts to modify other layers through
+                    <filename>.bbappend</filename> but does not want to
+                    introduce a hard dependency on those other layers.
+                </para>
+
+                <para>
+                    Use the following form for
+                    <filename>BBFILES_DYNAMIC</filename>:
+                    <literallayout class='monospaced'>
+     <replaceable>collection_name</replaceable>:<replaceable>filename_pattern</replaceable>
+                    </literallayout>
+                    The following example identifies two collection names and
+                    two filename patterns:
+                    <literallayout class='monospaced'>
+     BBFILES_DYNAMIC += " \
+         clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
+         core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
+     "
+                    </literallayout>
+                    This next example shows an error message that occurs
+                    because invalid entries are found, which cause parsing to
+                    abort:
+                    <literallayout class='monospaced'>
+     ERROR: BBFILES_DYNAMIC entries must be of the form &lt;collection name&gt;:&lt;filename pattern&gt;, not:
+         /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
+         /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
+                    </literallayout>
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-BBINCLUDELOGS'><glossterm>BBINCLUDELOGS</glossterm>
             <info>
                 BBINCLUDELOGS[doc] = "Variable that controls how BitBake displays logs on build failure."
@@ -1200,8 +1274,8 @@
                     The expressions are compared against the full paths to
                     the files.
                     For complete syntax information, see Python's
-                    documentation at
-                    <ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
+                    documentation for the appropriate release at
+                    <ulink url='http://docs.python.org/release/'></ulink>.
                 </para>
 
                 <para>
@@ -1520,12 +1594,12 @@
 
         <glossentry id='var-BUILD_CPPFLAGS'><glossterm>BUILD_CPPFLAGS</glossterm>
             <info>
-                BUILD_CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers) when building for the build host."
+                BUILD_CPPFLAGS[doc] = "Specifies the flags to pass to the C preprocessor (i.e. to both the C and the C++ compilers) when building for the build host."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Specifies the flags to pass to the C pre-processor
+                    Specifies the flags to pass to the C preprocessor
                     (i.e. to both the C and the C++ compilers) when building
                     for the build host.
                     When building in the <filename>-native</filename> context,
@@ -1797,7 +1871,7 @@
                 <para>
                     Git requires that the value you provide for the
                     <filename>BUILDHISTORY_COMMIT_AUTHOR</filename> variable
-                    takes the form of "name &lt;email@host&gt;".
+                    takes the form of "name <replaceable>email@host</replaceable>".
                     Providing an email address or host that is not valid does
                     not produce an error.
                 </para>
@@ -1849,12 +1923,12 @@
                     class, this variable specifies the build history features
                     to be enabled.
                     For more information on how build history works, see the
-                    "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                 </para>
 
                 <para>
-                    You can specify three features in the form of a
+                    You can specify these features in the form of a
                     space-separated list:
                     <itemizedlist>
                         <listitem><para><emphasis>image:</emphasis>
@@ -1869,12 +1943,20 @@
                             Analysis of the contents of the software
                             development kit (SDK).
                             </para></listitem>
+                        <listitem><para><emphasis>task:</emphasis>
+                            Save output file signatures for
+                            <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>shared state</ulink>
+                            (sstate) tasks.
+                            This saves one file per task and lists the SHA-256
+                            checksums for each file staged (i.e. the output of
+                            the task).
+                            </para></listitem>
                     </itemizedlist>
                 </para>
 
                 <para>
                     By default, the <filename>buildhistory</filename> class
-                    enables all three features:
+                    enables the following features:
                     <literallayout class='monospaced'>
      BUILDHISTORY_FEATURES ?= "image package sdk"
                     </literallayout>
@@ -2212,13 +2294,6 @@
                     level, in case the hardware supports Bluetooth but you
                     do not ever intend to use it.
                 </para>
-
-                <para>
-                    For more information, see the
-                    <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
-                    and <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
-                    variables.
-                </para>
             </glossdef>
         </glossentry>
 
@@ -2732,13 +2807,13 @@
 
         <glossentry id='var-COREBASE'><glossterm>COREBASE</glossterm>
             <info>
-                COREBASE[doc] = "Specifies the parent directory of the OpenEmbedded Core Metadata layer (i.e. meta)."
+                COREBASE[doc] = "Specifies the parent directory of the OpenEmbedded-Core Metadata layer (i.e. meta)."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Specifies the parent directory of the OpenEmbedded
-                    Core Metadata layer (i.e. <filename>meta</filename>).
+                    Specifies the parent directory of the OpenEmbedded-Core
+                    Metadata layer (i.e. <filename>meta</filename>).
                 </para>
 
                 <para>
@@ -2938,12 +3013,12 @@
                     task.
                     This location defaults to:
                     <literallayout class='monospaced'>
-     ${<link linkend='var-WORKDIR'>WORKDIR</link>}/image
+     ${WORKDIR}/image
                     </literallayout>
                     <note><title>Caution</title>
                         Tasks that read from or write to this directory should
                         run under
-                        <link linkend='fakeroot-and-pseudo'>fakeroot</link>.
+                        <ulink url='&YOCTO_DOCS_OM_URL;#fakeroot-and-pseudo'>fakeroot</ulink>.
                     </note>
                 </para>
             </glossdef>
@@ -3190,9 +3265,10 @@
                                 add any runtime dependencies between the
                                 packages produced by the two recipes.
                                 However, as explained in the
-                                "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
-                                section, runtime dependencies will often be
-                                added automatically, meaning
+                                "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
+                                section in the Yocto Project Overview and
+                                Concepts Manual, runtime dependencies will
+                                often be added automatically, meaning
                                 <filename>DEPENDS</filename> alone is
                                 sufficient for most recipes.
                                 </para></listitem>
@@ -3234,13 +3310,13 @@
 
         <glossentry id='var-DEPLOY_DIR'><glossterm>DEPLOY_DIR</glossterm>
             <info>
-                DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
+                DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Points to the general area that the OpenEmbedded build
-                    system uses to place images, packages, SDKs and other output
+                    system uses to place images, packages, SDKs, and other output
                     files that are ready to be used outside of the build system.
                     By default, this directory resides within the
                     <link linkend='build-directory'>Build Directory</link>
@@ -3254,18 +3330,19 @@
                     section.
                     For more detail on the contents of the
                     <filename>deploy</filename> directory, see the
-                    "<link linkend='images-dev-environment'>Images</link>",
-                    "<link linkend='package-feeds-dev-environment'>Package Feeds</link>",
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>",
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>",
                     and
-                    "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
-                    sections.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-dev-environment'>Application Development SDK</ulink>"
+                    sections all in the Yocto Project Overview and Concepts
+                    Manual.
                 </para>
             </glossdef>
         </glossentry>
 
         <glossentry id='var-DEPLOY_DIR_DEB'><glossterm>DEPLOY_DIR_DEB</glossterm>
             <info>
-                DEPLOY_DIR_DEB[doc] = "Points to a Debian-specific area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
+                DEPLOY_DIR_DEB[doc] = "Points to a Debian-specific area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -3297,8 +3374,8 @@
                     <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_deb</filename></link>
                     task writes Debian packages into the appropriate folder.
                     For more information on how packaging works, see the
-                    "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -3327,16 +3404,18 @@
                     section.
                     For more detail on the contents of the
                     <filename>deploy</filename> directory, see the
-                    "<link linkend='images-dev-environment'>Images</link>" and
-                    "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
-                    sections.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
+                    and
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-dev-environment'>Application Development SDK</ulink>"
+                    sections both in the Yocto Project Overview and Concepts
+                    Manual.
                 </para>
             </glossdef>
         </glossentry>
 
         <glossentry id='var-DEPLOY_DIR_IPK'><glossterm>DEPLOY_DIR_IPK</glossterm>
             <info>
-                DEPLOY_DIR_IPK[doc] = "Points to a IPK-specific area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
+                DEPLOY_DIR_IPK[doc] = "Points to a IPK-specific area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -3367,15 +3446,15 @@
                     <link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>
                     task writes IPK packages into the appropriate folder.
                     For more information on how packaging works, see the
-                    "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
             </glossdef>
         </glossentry>
 
         <glossentry id='var-DEPLOY_DIR_RPM'><glossterm>DEPLOY_DIR_RPM</glossterm>
             <info>
-                DEPLOY_DIR_RPM[doc] = "Points to a RPM-specific area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
+                DEPLOY_DIR_RPM[doc] = "Points to a RPM-specific area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -3406,15 +3485,15 @@
                     <link linkend='ref-tasks-package_write_rpm'><filename>do_package_write_rpm</filename></link>
                     task writes RPM packages into the appropriate folder.
                     For more information on how packaging works, see the
-                    "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
             </glossdef>
         </glossentry>
 
         <glossentry id='var-DEPLOY_DIR_TAR'><glossterm>DEPLOY_DIR_TAR</glossterm>
             <info>
-                DEPLOY_DIR_TAR[doc] = "Points to a tarball area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
+                DEPLOY_DIR_TAR[doc] = "Points to a tarball area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -3445,8 +3524,8 @@
                     <link linkend='ref-tasks-package_write_tar'><filename>do_package_write_tar</filename></link>
                     task writes TAR packages into the appropriate folder.
                     For more information on how packaging works, see the
-                    "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -3698,7 +3777,7 @@
                     It is not intended to be user-configurable.
                     It is best to just reference the variable to see which distro features are
                     being backfilled for all distro configurations.
-                    See the <link linkend='ref-features-backfill'>Feature backfilling</link> section for
+                    See the <link linkend='ref-features-backfill'>Feature Backfilling</link> section for
                     more information.
                 </para>
             </glossdef>
@@ -4386,7 +4465,7 @@
 
         <glossentry id='var-EXTRA_IMAGECMD'><glossterm>EXTRA_IMAGECMD</glossterm>
             <info>
-                EXTRA_IMAGECMD[doc] = "Specifies additional options for the image creation command that has been specified in IMAGE_CMD. When setting this variable, you should use an override for the associated type."
+                EXTRA_IMAGECMD[doc] = "Specifies additional options for the image creation command that has been specified in IMAGE_CMD. When setting this variable, you should use an override for the associated image type."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -4394,8 +4473,8 @@
                     Specifies additional options for the image
                     creation command that has been specified in
                     <link linkend='var-IMAGE_CMD'><filename>IMAGE_CMD</filename></link>.
-                    When setting this variable, you should
-                    use an override for the associated type.
+                    When setting this variable, use an override for the
+                    associated image type.
                     Here is an example:
                     <literallayout class='monospaced'>
      EXTRA_IMAGECMD_ext3 ?= "-i 4096"
@@ -4787,7 +4866,7 @@
                     The previous statement appears in the
                     <filename>linux-yocto-dev.bbappend</filename> file, which
                     is found in the Yocto Project
-                    <link linkend='source-repositories'>Source Repositories</link>
+                    <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
                     in
                     <filename>meta-intel/common/recipes-kernel/linux</filename>.
                     Here, the machine override is a special
@@ -4821,7 +4900,7 @@
                     <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
                     You can find more information on how overrides are handled
                     in the
-                    <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake Manual</ulink>.
+                    <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
                 </para>
 
                 <para>
@@ -4853,7 +4932,9 @@
                     During the build process, BitBake searches each directory in
                     <filename>FILESPATH</filename> in the specified order when
                     looking for files and patches specified by each
-                    <filename>file://</filename> URI in a recipe.
+                    <filename>file://</filename> URI in a recipe's
+                    <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
+                    statements.
                 </para>
 
                 <para>
@@ -4881,9 +4962,19 @@
                     If you want the build system to find patches or files
                     that reside with your append files, you need to extend
                     the <filename>FILESPATH</filename> variable by using
-                    the
-                    <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
-                    variable.
+                    the <filename>FILESEXTRAPATHS</filename> variable.
+                </para>
+
+                <para>
+                    You can find out more about the patching process in the
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#patching-dev-environment'>Patching</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual
+                    and the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code'>Patching Code</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    See the
+                    <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
+                    task as well.
                 </para>
             </glossdef>
         </glossentry>
@@ -5004,6 +5095,30 @@
 
     <glossdiv id='var-glossary-g'><title>G</title>
 
+        <glossentry id='var-GCCPIE'><glossterm>GCCPIE</glossterm>
+            <info>
+                GCCPIE[doc] = "Enables Position Independent Executables (PIE) within the GNU C Compiler (GCC)."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Enables Position Independent Executables (PIE) within the
+                    GNU C Compiler (GCC).
+                    Enabling PIE in the GCC makes Return Oriented Programming
+                    (ROP) attacks much more difficult to
+                    execute.
+                </para>
+
+                <para>
+                    By default the <filename>security_flags.inc</filename>
+                    file enables PIE by setting the variable as follows:
+                    <literallayout class='monospaced'>
+     GCCPIE ?= "--enable-default-pie"
+                    </literallayout>
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-GDB'><glossterm>GDB</glossterm>
             <info>
                 GDB[doc] = "The minimal command and arguments to run the GNU Debugger."
@@ -5031,13 +5146,13 @@
 
         <glossentry id='var-GLIBC_GENERATE_LOCALES'><glossterm>GLIBC_GENERATE_LOCALES</glossterm>
             <info>
-                GLIBC_GENERATE_LOCALES[doc]= "Specifies the list of GLIBC locales to generate should you not wish generate all LIBC locals, which can be time consuming."
+                GLIBC_GENERATE_LOCALES[doc]= "Specifies the list of GLIBC locales to generate should you not wish to generate all LIBC locals, which can be time consuming."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the list of GLIBC locales to generate should you
-                    not wish generate all LIBC locals, which can be time
+                    not wish to generate all LIBC locals, which can be time
                     consuming.
                     <note>
                         If you specifically remove the locale
@@ -5307,7 +5422,7 @@
 
         <glossentry id='var-HOST_SYS'><glossterm>HOST_SYS</glossterm>
             <info>
-                HOST_SYS[doc] = "Specifies the system, including the architecture and the operating system, for with the build is occurring in the context of the current recipe."
+                HOST_SYS[doc] = "Specifies the system, including the architecture and the operating system, for which the build is occurring in the context of the current recipe."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -5383,7 +5498,7 @@
                     contamination.
                     Unlike
                     <link linkend='var-HOSTTOOLS'><filename>HOSTTOOLS</filename></link>,
-                    the OpenEmbedded build system does not produce and error
+                    the OpenEmbedded build system does not produce an error
                     if a tool specified in the value of
                     <filename>HOSTTOOLS_NONFATAL</filename> is not found on the
                     build host.
@@ -5402,7 +5517,7 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the name of the vendor.
                     <filename>HOST_VENDOR</filename> is normally the same as
-                    <link linkend='var-TARGET_PREFIX'><filename>TARGET_VENDOR</filename></link>.
+                    <link linkend='var-TARGET_VENDOR'><filename>TARGET_VENDOR</filename></link>.
                 </para>
             </glossdef>
         </glossentry>
@@ -5620,18 +5735,17 @@
 
         <glossentry id='var-IMAGE_BOOT_FILES'><glossterm>IMAGE_BOOT_FILES</glossterm>
             <info>
-                IMAGE_BOOT_FILES[doc] = "Whitespace separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition. Entries will be installed under a same name as the source file. To change the destination file name, pass a desired name after a semicolon (eg. u-boot.img;uboot)."
+                IMAGE_BOOT_FILES[doc] = "A space-separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     A space-separated list of files installed into the
-                    boot partition when preparing an image using the
-                    <filename>wic</filename> tool with the
-                    <filename>bootimg-partition</filename> source
+                    boot partition when preparing an image using the Wic tool
+                    with the <filename>bootimg-partition</filename> source
                     plugin.
-                    By default, the files are installed under
-                    the same name as the source files.
+                    By default, the files are installed under the same name as
+                    the source files.
                     To change the installed name, separate it from the
                     original name with a semi-colon (;).
                     Source files need to be located in
@@ -5647,9 +5761,8 @@
                 <para>
                     Alternatively, source files can be picked up using
                     a glob pattern.
-                    In this case, the destination file
-                    will have the same name as the base name of the source file
-                    path.
+                    In this case, the destination file must have the same name
+                    as the base name of the source file path.
                     To install files into a directory within the
                     target location, pass its name after a semi-colon
                     (;).
@@ -5665,6 +5778,15 @@
                     <filename>boot</filename> directory within the
                     target partition.
                 </para>
+
+                <para>
+                    You can find information on how to use the Wic tool in the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
+                    section of the Yocto Project Development Tasks Manual.
+                    Reference material for Wic is located in the
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#ref-kickstart'>OpenEmbedded Kickstart (.wks) Reference</ulink>"
+                    chapter.
+                </para>
             </glossdef>
         </glossentry>
 
@@ -5840,70 +5962,86 @@
 
         <glossentry id='var-IMAGE_INSTALL'><glossterm>IMAGE_INSTALL</glossterm>
             <info>
-                IMAGE_INSTALL[doc] = "Specifies the packages to install into an image. Image recipes set IMAGE_INSTALL to specify the packages to install into an image through image.bbclass."
+                IMAGE_INSTALL[doc] = "Used by recipes to specify the packages to install into an image through image.bbclass."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Specifies the packages to install into an image.
-                    The <filename>IMAGE_INSTALL</filename> variable is a
-                    mechanism for an image recipe and you should use it
-                    with care to avoid ordering issues.
-                    <note>
-                        When working with an
-                        <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
-                        image, do not use the <filename>IMAGE_INSTALL</filename>
-                        variable to specify packages for installation.
-                        Instead, use the
-                        <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
-                        variable, which allows the initial RAM filesystem
-                        (initramfs) recipe to use a fixed set of packages and
-                        not be affected by <filename>IMAGE_INSTALL</filename>.
-                        For information on creating an initramfs, see the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
-                        section in the Yocto Project Development Tasks Manual.
-                    </note>
+                    Used by recipes to specify the packages to install into an
+                    image through the
+                    <link linkend='ref-classes-image'><filename>image</filename></link>
+                    class.
+                    Use the <filename>IMAGE_INSTALL</filename> variable with
+                    care to avoid ordering issues.
                 </para>
 
                 <para>
                     Image recipes set <filename>IMAGE_INSTALL</filename>
                     to specify the packages to install into an image through
                     <filename>image.bbclass</filename>.
-                    Additionally, "helper" classes exist, such as
-                    <filename>core-image.bbclass</filename>, that can take
+                    Additionally, "helper" classes such as the
+                    <link linkend='ref-classes-core-image'><filename>core-image</filename></link>
+                    class exist that can take lists used with
                     <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
-                    lists and turn these into auto-generated entries in
+                    and turn them into auto-generated entries in
                     <filename>IMAGE_INSTALL</filename> in addition to its
                     default contents.
                 </para>
 
                 <para>
-                    Using <filename>IMAGE_INSTALL</filename> with the
-                    <filename>+=</filename> operator from the
-                    <filename>/conf/local.conf</filename> file or from within
-                    an image recipe is not recommended as it can cause ordering
-                    issues.
-                    Since <filename>core-image.bbclass</filename> sets
-                    <filename>IMAGE_INSTALL</filename> to a default value using
-                    the <filename>?=</filename> operator, using a
-                    <filename>+=</filename> operation against
-                    <filename>IMAGE_INSTALL</filename> will result in
-                    unexpected behavior when used in
-                    <filename>conf/local.conf</filename>.
-                    Furthermore, the same operation from within an image
-                    recipe may or may not succeed depending on the specific
-                    situation.
-                    In both these cases, the behavior is contrary to how most
-                    users expect the <filename>+=</filename> operator to work.
-                </para>
-
-                <para>
                     When you use this variable, it is best to use it as follows:
                     <literallayout class='monospaced'>
      IMAGE_INSTALL_append = " <replaceable>package-name</replaceable>"
                     </literallayout>
                     Be sure to include the space between the quotation character
                     and the start of the package name or names.
+                    <note><title>Caution</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                When working with a
+                                <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
+                                image, do not use the
+                                <filename>IMAGE_INSTALL</filename> variable to
+                                specify packages for installation.
+                                Instead, use the
+                                <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
+                                variable, which allows the initial RAM
+                                filesystem (initramfs) recipe to use a fixed
+                                set of packages and not be affected by
+                                <filename>IMAGE_INSTALL</filename>.
+                                For information on creating an initramfs, see
+                                the
+                                "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
+                                section in the Yocto Project Development Tasks
+                                Manual.
+                                </para></listitem>
+                            <listitem><para>
+                                Using <filename>IMAGE_INSTALL</filename> with
+                                the
+                                <ulink url='&YOCTO_DOCS_BB_URL;#appending-and-prepending'><filename>+=</filename></ulink>
+                                BitBake operator within the
+                                <filename>/conf/local.conf</filename> file or
+                                from within an image recipe is not recommended.
+                                Use of this operator in these ways can cause
+                                ordering issues.
+                                Since <filename>core-image.bbclass</filename>
+                                sets <filename>IMAGE_INSTALL</filename> to a
+                                default value using the
+                                <ulink url='&YOCTO_DOCS_BB_URL;#setting-a-default-value'><filename>?=</filename></ulink>
+                                operator, using a <filename>+=</filename>
+                                operation against
+                                <filename>IMAGE_INSTALL</filename> results in
+                                unexpected behavior when used within
+                                <filename>conf/local.conf</filename>.
+                                Furthermore, the same operation from within
+                                an image recipe may or may not succeed
+                                depending on the specific situation.
+                                In both these cases, the behavior is contrary
+                                to how most users expect the
+                                <filename>+=</filename> operator to work.
+                                </para></listitem>
+                        </itemizedlist>
+                    </note>
                 </para>
             </glossdef>
         </glossentry>
@@ -5981,8 +6119,8 @@
                     variables.
                     You can find information on how the image
                     is created in the
-                    "<link linkend='image-generation-dev-environment'>Image Generation</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -6056,12 +6194,12 @@
 
         <glossentry id='var-IMAGE_PKGTYPE'><glossterm>IMAGE_PKGTYPE</glossterm>
             <info>
-                IMAGE_PKGTYPE[doc] = "Defines the package type (DEB, RPM, IPK, or TAR) used by the OpenEmbedded build system."
+                IMAGE_PKGTYPE[doc] = "Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the OpenEmbedded build system."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Defines the package type (DEB, RPM, IPK, or TAR) used
+                    Defines the package type (i.e. DEB, RPM, IPK, or TAR) used
                     by the OpenEmbedded build system.
                     The variable is defined appropriately by the
                     <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
@@ -6108,13 +6246,13 @@
 
         <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm>
             <info>
-                IMAGE_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the final image output files."
+                IMAGE_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system creates the final image output files."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies a list of functions to call once the
-                    OpenEmbedded build system has created the final image
+                    OpenEmbedded build system creates the final image
                     output files.
                     You can specify functions separated by semicolons:
                     <literallayout class='monospaced'>
@@ -6136,13 +6274,13 @@
 
         <glossentry id='var-IMAGE_PREPROCESS_COMMAND'><glossterm>IMAGE_PREPROCESS_COMMAND</glossterm>
             <info>
-                IMAGE_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system has created the final image output files."
+                IMAGE_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system creates the final image output files."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies a list of functions to call before the
-                    OpenEmbedded build system has created the final image
+                    OpenEmbedded build system creates the final image
                     output files.
                     You can specify functions separated by semicolons:
                     <literallayout class='monospaced'>
@@ -6488,7 +6626,7 @@
                     For more information on <filename>INHERIT</filename>, see
                     the
                     "<ulink url="&YOCTO_DOCS_BB_URL;#inherit-configuration-directive"><filename>INHERIT</filename> Configuration Directive</ulink>"
-                    section in the Yocto Project Bitbake User Manual.
+                    section in the Bitbake User Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -6662,8 +6800,7 @@
                 <para>
                     You can also find more information by referencing the
                     <filename>meta-poky/conf/local.conf.sample.extended</filename>
-                    configuration file in the
-                    <link linkend='source-directory'>Source Directory</link>,
+                    configuration file in the Source Directory,
                     the
                     <link linkend='ref-classes-image'><filename>image</filename></link>
                     class, and the
@@ -6729,8 +6866,7 @@
                 <para>
                     Setting the variable to "1" in a configuration file causes the
                     OpenEmbedded build system to generate a kernel image with the
-                    initramfs specified in
-                    <link linkend='var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></link>
+                    initramfs specified in <filename>INITRAMFS_IMAGE</filename>
                     bundled within:
                     <literallayout class='monospaced'>
      INITRAMFS_IMAGE_BUNDLE = "1"
@@ -7008,7 +7144,7 @@
 
         <glossentry id='var-KBRANCH'><glossterm>KBRANCH</glossterm>
             <info>
-                KBRANCH[doc] = "A regular expression used by the build process to explicitly identify the kernel branch that is validated, patched and configured during a build."
+                KBRANCH[doc] = "A regular expression used by the build process to explicitly identify the kernel branch that is validated, patched, and configured during a build."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -7112,7 +7248,8 @@
                     For more information on how to use the
                     <filename>KBUILD_DEFCONFIG</filename> variable, see the
                     "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-an-in-tree-defconfig-file'>Using an "In-Tree" <filename>defconfig</filename> File</ulink>"
-                    section.
+                    section in the Yocto Project Linux Kernel Development
+                    Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -7155,7 +7292,7 @@
 
         <glossentry id='var-KERNEL_DEVICETREE'><glossterm>KERNEL_DEVICETREE</glossterm>
             <info>
-                KERNEL_DEVICETREE[doc] = "Specifies the name of the generated Linux kernel device tree (i.e. the <filename>.dtb</filename>) file."
+                KERNEL_DEVICETREE[doc] = "Specifies the name of the generated Linux kernel device tree (i.e. the .dtb) file."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -7415,7 +7552,8 @@
                     class.
                     For information on how this variable is used, see the
                     "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
-                    section.
+                    section in the Yocto Project Linux Kernel Development
+                    Manual.
                 </para>
 
                 <para>
@@ -7446,7 +7584,8 @@
                     class.
                     For information on how this variable is used, see the
                     "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
-                    section.
+                    section in the Yocto Project Linux Kernel Development
+                    Manual.
                 </para>
 
                 <para>
@@ -7696,6 +7835,53 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-LAYERSERIES_COMPAT'><glossterm>LAYERSERIES_COMPAT</glossterm>
+            <info>
+                LAYERSERIES_COMPAT[doc] = "Lists the OpenEmbedded-Core versions for which a layer is compatible."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Lists the versions of the
+                    <link linkend='oe-core'>OpenEmbedded-Core</link> for which
+                    a layer is compatible.
+                    Using the <filename>LAYERSERIES_COMPAT</filename> variable
+                    allows the layer maintainer to indicate which combinations
+                    of the layer and OE-Core can be expected to work.
+                    The variable gives the system a way to detect when a layer
+                    has not been tested with new releases of OE-Core (e.g.
+                    the layer is not maintained).
+                </para>
+
+                <para>
+                    To specify the OE-Core versions for which a layer is
+                    compatible, use this variable in your layer's
+                    <filename>conf/layer.conf</filename> configuration file.
+                    For the list, use the Yocto Project
+                    <ulink url='https://wiki.yoctoproject.org/wiki/Releases'>Release Name</ulink>
+                    (e.g. &DISTRO_NAME_NO_CAP;).
+                    To specify multiple OE-Core versions for the layer,
+                    use a space-separated list:
+                    <literallayout class='monospaced'>
+     LAYERSERIES_COMPAT_<replaceable>layer_root_name</replaceable> = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
+                    </literallayout>
+                    <note>
+                        Setting <filename>LAYERSERIES_COMPAT</filename> is
+                        required by the Yocto Project Compatible version 2
+                        standard.
+                        The OpenEmbedded build system produces a warning if
+                        the variable is not set for any given layer.
+                    </note>
+                </para>
+
+                <para>
+                    See the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-your-own-layer'>Creating Your Own Layer</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-LAYERVERSION'><glossterm>LAYERVERSION</glossterm>
             <info>
                 LAYERVERSION[doc] = "Optionally specifies the version of a layer as a single number. This variable is used in the conf/layer.conf file and must be suffixed with the name of the specific layer."
@@ -7766,13 +7952,13 @@
 
         <glossentry id='var-LEAD_SONAME'><glossterm>LEAD_SONAME</glossterm>
             <info>
-                LEAD_SONAME[doc] = "Specifies the lead (or primary) compiled library file (.so) that the debian class applies its naming policy to given a recipe that packages multiple libraries."
+                LEAD_SONAME[doc] = "Specifies the lead (or primary) compiled library file (i.e. .so) that the debian class applies its naming policy to given a recipe that packages multiple libraries."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the lead (or primary) compiled library file
-                    (<filename>.so</filename>) that the
+                    (i.e. <filename>.so</filename>) that the
                     <link linkend='ref-classes-debian'><filename>debian</filename></link>
                     class applies its naming policy to given a recipe that
                     packages multiple libraries.
@@ -7808,8 +7994,8 @@
                     <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
                     is set to "CLOSED").</para>
                 <para>For more information, see the
-                    "<link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>
-                    Tracking License Changes</link>" section.
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -7944,8 +8130,8 @@
                     require additional licenses in order to be used in a
                     commercial product.
                     For more information, see the
-                    "<link linkend='enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -7964,8 +8150,8 @@
                     This practice is otherwise known as "whitelisting"
                     license flags.
                     For more information, see the
-                    <link linkend='enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -8186,7 +8372,7 @@
 
          <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
             <info>
-                MACHINE_ESSENTIAL_EXTRA_RDEPENDS[doc] = "A list of required machine-specific packages to install as part of the image being built. Because this is a 'machine essential' variable, the list of packages are essential for the machine to boot."
+                MACHINE_ESSENTIAL_EXTRA_RDEPENDS[doc] = "A list of required machine-specific packages to install as part of the image being built. Because this is a 'machine-essential' variable, the list of packages are essential for the machine to boot."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -8194,7 +8380,7 @@
                     A list of required machine-specific packages to install as part of
                     the image being built.
                     The build process depends on these packages being present.
-                    Furthermore, because this is a "machine essential" variable, the list of
+                    Furthermore, because this is a "machine-essential" variable, the list of
                     packages are essential for the machine to boot.
                     The impact of this variable affects images based on
                     <filename>packagegroup-core-boot</filename>,
@@ -8223,7 +8409,7 @@
 
          <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
             <info>
-                MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS[doc] = "A list of recommended machine-specific packages to install as part of the image being built. Because this is a 'machine essential' variable, the list of packages are essential for the machine to boot."
+                MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS[doc] = "A list of recommended machine-specific packages to install as part of the image being built. Because this is a 'machine-essential' variable, the list of packages are essential for the machine to boot."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -8231,7 +8417,7 @@
                     A list of recommended machine-specific packages to install as part of
                     the image being built.
                     The build process does not depend on these packages being present.
-                    However, because this is a "machine essential" variable, the list of
+                    However, because this is a "machine-essential" variable, the list of
                     packages are essential for the machine to boot.
                     The impact of this variable affects images based on
                     <filename>packagegroup-core-boot</filename>,
@@ -8421,7 +8607,7 @@
                     It is not intended to be user-configurable.
                     It is best to just reference the variable to see which machine features are
                     being backfilled for all machine configurations.
-                    See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
+                    See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
                     more information.
                 </para>
             </glossdef>
@@ -8439,7 +8625,7 @@
                     that should not be backfilled (i.e. added to
                     <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>)
                     during the build.
-                    See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
+                    See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
                     more information.
                 </para>
             </glossdef>
@@ -8529,14 +8715,14 @@
 
         <glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
             <info>
-                MLPREFIX[doc] = "Specifies a prefix has been added to PN to create a special version of a recipe or package, such as a Multilib version."
+                MLPREFIX[doc] = "Specifies a prefix has been added to PN to create a special version of a recipe or package (i.e. a Multilib version)."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies a prefix has been added to
                     <link linkend='var-PN'><filename>PN</filename></link> to create a special version
-                    of a recipe or package, such as a Multilib version.
+                    of a recipe or package (i.e. a Multilib version).
                     The variable is used in places where the prefix needs to be
                     added to or removed from a the name (e.g. the
                     <link linkend='var-BPN'><filename>BPN</filename></link> variable).
@@ -8827,7 +9013,7 @@
 
         <glossentry id='var-NO_RECOMMENDATIONS'><glossterm>NO_RECOMMENDATIONS</glossterm>
             <info>
-                NO_RECOMMENDATIONS[doc] = "When set to '1', no recommended packages will be installed. Realize that some recommended packages might be required for certain system functionality, such as kernel-modules. It is up to the user to add packages to IMAGE_INSTALL as needed."
+                NO_RECOMMENDATIONS[doc] = "When set to '1', no recommended packages will be installed. Some recommended packages might be required for certain system functionality, such as kernel-modules. It is up to the user to add packages to IMAGE_INSTALL as needed."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -9003,8 +9189,8 @@
                     for details on how this class applies these additional
                     sed command arguments.
                     For general information on the
-                    <filename>binconfig.bbclass</filename> class, see the
-                    "<link linkend='ref-classes-binconfig'>Binary Configuration Scripts - <filename>binconfig.bbclass</filename></link>"
+                    <filename>binconfig</filename> class, see the
+                    "<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
                     section.
                 </para>
             </glossdef>
@@ -9183,8 +9369,9 @@
                         <filename>OVERRIDES</filename> in the output of the
                         <filename>bitbake -e</filename> command.
                         See the
-                        "<link linkend='usingpoky-debugging-viewing-variable-values'>Viewing Variable Values</link>"
-                        section for more information.
+                        "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-debugging-viewing-variable-values'>Viewing Variable Values</ulink>"
+                        section in the Yocto Project Development Tasks
+                        Manual for more information.
                     </note>
                 </para>
             </glossdef>
@@ -9223,11 +9410,17 @@
                     By default, the value of this variable is set to
                     <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
                     when building for the target,
-                    <filename>BUILD_ARCH</filename> when building for the
-                    build host and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building
+                    <link linkend='var-BUILD_ARCH'><filename>BUILD_ARCH</filename></link>
+                    when building for the
+                    build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building
                     for the SDK.
+                    <note>
+                        See
+                        <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>
+                        for more information.
+                    </note>
                     However, if your recipe's output packages are built
-                    specific to the target machine rather than general for
+                    specific to the target machine rather than generally for
                     the architecture of the machine, you should set
                     <filename>PACKAGE_ARCH</filename> to the value of
                     <link linkend='var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></link>
@@ -9298,9 +9491,10 @@
                     </literallayout>
                     <note><title>Warning</title>
                         While it is a legal option, the
-                        <filename>package_tar</filename> class is broken
-                        and is not supported.
-                        It is recommended that you do not use it.
+                        <filename>package_tar</filename> class has limited
+                        functionality due to no support for package
+                        dependencies by that backend.
+                        Therefore, it is recommended that you do not use it.
                     </note>
                     The build system uses only the first argument in the list
                     as the package manager when creating your image or SDK.
@@ -9477,20 +9671,29 @@
 
         <glossentry id='var-PACKAGE_FEED_ARCHS'><glossterm>PACKAGE_FEED_ARCHS</glossterm>
             <info>
-                PACKAGE_FEED_ARCHS[doc] = "Specifies user-defined package architectures when constructing package feed URIs."
+                PACKAGE_FEED_ARCHS[doc] = "Optionally specifies user-defined package architectures when constructing package feed URIs."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Specifies the package architectures used as part of the
-                    package feed URIs during the build.
-                    The <filename>PACKAGE_FEED_ARCHS</filename> variable is
-                    appended to the final package feed URI, which is constructed
-                    using the
+                    Optionally specifies the package architectures used as
+                    part of the package feed URIs during the build.
+                    When used, the <filename>PACKAGE_FEED_ARCHS</filename>
+                    variable is appended to the final package feed URI, which
+                    is constructed using the
                     <link linkend='var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></link>
                     and
                     <link linkend='var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></link>
                     variables.
+                    <note><title>Tip</title>
+                        You can use the <filename>PACKAGE_FEEDS_ARCHS</filename>
+                        variable to whitelist specific package architectures.
+                        If you do not need to whitelist specific architectures,
+                        which is a common case, you can omit this variable.
+                        Omitting the variable results in all available
+                        architectures for the current machine being included
+                        into remote package feeds.
+                    </note>
                 </para>
 
                 <para>
@@ -9798,7 +10001,7 @@
                     In this case, <filename>--with-croco</filename> is
                     added to the configure script argument list and
                     <filename>libcroco</filename> is added to
-                    <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
+                    <filename>DEPENDS</filename>.
                     On the other hand, if the feature is disabled say through
                     a <filename>.bbappend</filename> file in another layer, then
                     the second argument <filename>--without-croco</filename> is
@@ -9870,8 +10073,8 @@
                     and
                     <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
                     use <filename>PACKAGECONFIG_CONFARGS</filename> to pass
-                    <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
-                    options to <filename>configure</filename> and
+                    <filename>PACKAGECONFIG</filename> options to
+                    <filename>configure</filename> and
                     <filename>cmake</filename>, respectively.
                     If you are using
                     <filename>PACKAGECONFIG</filename> but not a class that
@@ -9879,12 +10082,6 @@
                     you need to use
                     <filename>PACKAGECONFIG_CONFARGS</filename> appropriately.
                 </para>
-
-                <para>
-                    For additional information, see the
-                    <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
-                    variable.
-                </para>
             </glossdef>
         </glossentry>
 
@@ -9911,12 +10108,12 @@
 
         <glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
             <info>
-                PACKAGES[doc] = "The list of packages to be created from the recipe."
+                PACKAGES[doc] = "The list of packages the recipe creates."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    The list of packages to be created from the recipe.
+                    The list of packages the recipe creates.
                     The default value is the following:
                     <literallayout class='monospaced'>
      ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
@@ -10066,8 +10263,8 @@
 
                 <para>
                     For more information on speeding up builds, see the
-                    "<link linkend='speeding-up-the-build'>Speeding Up the Build</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#speeding-up-a-build'>Speeding Up a Build</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -10308,10 +10505,14 @@
      ${STAGING_DIR_HOST}/pkgdata
                     </literallayout>
                     For examples of how this data is used, see the
-                    "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
-                    section and the
-                    "<link linkend='viewing-package-information-with-oe-pkgdata-util'>Viewing Package Information with <filename>oe-pkgdata-util</filename></link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual
+                    and the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#viewing-package-information-with-oe-pkgdata-util'>Viewing Package Information with <filename>oe-pkgdata-util</filename></ulink>"
+                    section in the Yocto Project Development Tasks Manual.
+                    For more information on the shared, global-state directory,
+                    see
+                    <link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>.
                 </para>
             </glossdef>
         </glossentry>
@@ -10414,7 +10615,7 @@
 
         <glossentry id='var-PN'><glossterm>PN</glossterm>
             <info>
-                PN[doc] = "PN refers to a recipe name in the context of a file used by the OpenEmbedded build system as input to create a package. It refers to a package name in the context of a file created or produced by the OpenEmbedded build system."
+                PN[doc] = "PN refers to a recipe name in the context of a file used by the OpenEmbedded build system as input to create a package.
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -10555,11 +10756,11 @@
                         <filename>PR</filename> to know when to rebuild a
                         recipe.
                         The build system uses the task
-                        <ulink url='&YOCTO_DOCS_BB_URL;#checksums'>input checksums</ulink>
+                        <ulink url='&YOCTO_DOCS_OM_URL;#overview-checksums'>input checksums</ulink>
                         along with the
                         <link linkend='structure-build-tmp-stamps'>stamp</link>
                         and
-                        <link linkend='shared-state-cache'>shared state cache</link>
+                        <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>shared state cache</ulink>
                         mechanisms.
                     </note>
                     The <filename>PR</filename> variable primarily becomes
@@ -10598,26 +10799,40 @@
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    If multiple recipes provide an item, this variable
-                    determines which recipe should be given preference.
-                    You should always suffix the variable with the name of the
-                    provided item, and you should set it to the
-                    <link linkend='var-PN'><filename>PN</filename></link>
-                    of the recipe to which you want to give precedence.
-                    Some examples:
+                    If multiple recipes provide the same item, this variable
+                    determines which recipe is preferred and thus provides
+                    the item (i.e. the preferred provider).
+                    You should always suffix this variable with the name of the
+                    provided item.
+                    And, you should define the variable using the preferred
+                    recipe's name
+                    (<link linkend='var-PN'><filename>PN</filename></link>).
+                    Here is a common example:
                     <literallayout class='monospaced'>
      PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
+                    </literallayout>
+                    In the previous example, multiple recipes are providing
+                    "virtual/kernel".
+                    The <filename>PREFERRED_PROVIDER</filename> variable is
+                    set with the name (<filename>PN</filename>) of the recipe
+                    you prefer to provide "virtual/kernel".
+                </para>
+
+                <para>
+                    Following are more examples:
+                    <literallayout class='monospaced'>
      PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
      PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
                     </literallayout>
-                    For more information see:
-                    <link linkend='metadata-virtual-providers'>Metadata (Virtual Providers)</link>
+                    For more information, see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#metadata-virtual-providers'>Using Virtual Providers</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                     <note>
-                        If you set <filename>PREFERRED_PROVIDER</filename>
-                        for a <filename>virtual/*</filename> item, then any
+                        If you use a <filename>virtual/*</filename> item
+                        with <filename>PREFERRED_PROVIDER</filename>, then any
                         recipe that
                         <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
-                        that item that is not selected by
+                        that item but is not selected (defined) by
                         <filename>PREFERRED_PROVIDER</filename> is prevented
                         from building, which is usually desirable since this
                         mechanism is designed to select between mutually
@@ -10696,8 +10911,8 @@
                         The <filename>_forcevariable</filename> override is
                         not handled specially.
                         This override only works because the default value of
-                        <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
-                        includes "forcevariable".
+                        <filename>OVERRIDES</filename> includes
+                        "forcevariable".
                     </note>
                 </para>
             </glossdef>
@@ -10754,7 +10969,7 @@
 
         <glossentry id='var-PRIORITY'><glossterm>PRIORITY</glossterm>
             <info>
-                PRIORITY[doc] = "Indicates the importance of a package.  The default value is 'optional'.  Other standard values are 'required', 'standard' and 'extra'."
+                PRIORITY[doc] = "Indicates the importance of a package.  The default value is 'optional'.  Other standard values are 'required', 'standard', and 'extra'."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -10814,8 +11029,8 @@
 
                 <para>
                     For more information, see the
-                    "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
             </glossdef>
         </glossentry>
@@ -10860,8 +11075,7 @@
                     Recipes that provide the functionality in question list the
                     virtual target in <filename>PROVIDES</filename>.
                     Recipes that depend on the functionality in question can
-                    include the virtual target in
-                    <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
+                    include the virtual target in <filename>DEPENDS</filename>
                     to leave the choice of provider open.
                 </para>
 
@@ -11001,8 +11215,7 @@
                 </para>
 
                 <para>
-                    Recipes that inherit the
-                    <link linkend='ref-classes-distutils'><filename>distutils</filename></link>
+                    Recipes that inherit the <filename>distutils</filename>
                     class during cross-builds also use this variable to
                     locate the headers and libraries of the appropriate Python
                     that the extension is targeting.
@@ -11131,8 +11344,8 @@
                     Therefore, most recipes do not need to set
                     <filename>RDEPENDS</filename>.
                     For more information, see the
-                    "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
 
                 <para>
@@ -11571,9 +11784,9 @@
                     In the example, the package name
                     (<filename>${<link linkend='var-PN'>PN</link>}-dev</filename>)
                     must appear as it would in the
-                    <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
-                    namespace before any renaming of the output package by
-                    classes such as <filename>debian.bbclass</filename>.
+                    <filename>PACKAGES</filename> namespace before any renaming
+                    of the output package by classes such as
+                    <filename>debian.bbclass</filename>.
                 </para>
 
                 <para>
@@ -11807,11 +12020,11 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     The directory set up and used by the
                     <link linkend='ref-classes-populate-sdk'><filename>populate_sdk_base</filename></link>
-                    to which the SDK is deployed.
+                    class to which the SDK is deployed.
                     The <filename>populate_sdk_base</filename> class defines
                     <filename>SDK_DEPLOY</filename> as follows:
                     <literallayout class='monospaced'>
-     SDK_DEPLOY = "${<link linkend='var-TMPDIR'>TMPDIR</link>}/deploy/sdk"
+     SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
                     </literallayout>
                 </para>
             </glossdef>
@@ -11830,7 +12043,7 @@
                     <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
                     class defines the variable as follows:
                     <literallayout class='monospaced'>
-     SDK_DIR = "${<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>}/sdk"
+     SDK_DIR = "${WORKDIR}/sdk"
                     </literallayout>
                     <note>
                         The <filename>SDK_DIR</filename> directory is a
@@ -11876,7 +12089,7 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     The manifest file for the host part of the SDK.
                     This file lists all the installed packages that make up
-                    the host part of SDK.
+                    the host part of the SDK.
                     The file contains package information on a line-per-package
                     basis as follows:
                     <literallayout class='monospaced'>
@@ -12060,13 +12273,16 @@
                     <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
                     class defines the variable as follows:
                     <literallayout class='monospaced'>
-     SDK_OUTPUT = "${<link linkend='var-SDK_DIR'>SDK_DIR</link>}/image"
+     SDK_DIR = "${WORKDIR}/sdk"
+     SDK_OUTPUT = "${SDK_DIR}/image"
+     SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
                     </literallayout>
                     <note>
                         The <filename>SDK_OUTPUT</filename> directory is a
                         temporary directory as it is part of
-                        <filename>WORKDIR</filename> by way of
-                        <filename>SDK_DIR</filename>.
+                        <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
+                        by way of
+                        <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link>.
                         The final output directory is
                         <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>.
                     </note>
@@ -12096,13 +12312,13 @@
 
         <glossentry id='var-SDK_POSTPROCESS_COMMAND'><glossterm>SDK_POSTPROCESS_COMMAND</glossterm>
             <info>
-                SDK_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the SDK."
+                SDK_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system creates the SDK."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies a list of functions to call once the
-                    OpenEmbedded build system has created the SDK.
+                    OpenEmbedded build system creates the SDK.
                     You can specify functions separated by semicolons:
                     <literallayout class='monospaced'>
      SDK_POSTPROCESS_COMMAND += "<replaceable>function</replaceable>; ... "
@@ -12443,12 +12659,13 @@
 
         <glossentry id='var-SERIAL_CONSOLE'><glossterm>SERIAL_CONSOLE</glossterm>
             <info>
-                SERIAL_CONSOLE[doc] = "The speed and device for the serial port used to attach the serial console. This variable is given to the kernel as the 'console' parameter. After booting occurs, getty is started on that port so remote login is possible."
+                SERIAL_CONSOLE[doc] = "Defines the serial consoles (TTYs) to enable using getty."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Defines a serial console (TTY) to enable using getty.
+                    Defines a serial console (TTY) to enable using
+                    <ulink url='https://en.wikipedia.org/wiki/Getty_(Unix)'>getty</ulink>.
                     Provide a value that specifies the baud rate followed by
                     the TTY device name separated by a space.
                     You cannot specify more than one TTY device:
@@ -12473,7 +12690,8 @@
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Defines the serial consoles (TTYs) to enable using getty.
+                    Defines a serial console (TTY) to enable using
+                    <ulink url='https://en.wikipedia.org/wiki/Getty_(Unix)'>getty</ulink>.
                     Provide a value that specifies the baud rate followed by
                     the TTY device name separated by a semicolon.
                     Use spaces to separate multiple devices:
@@ -12527,8 +12745,25 @@
                 </para>
 
                 <para>
-                    In this example, <filename>intone</filename> depends on
-                    <filename>mplayer2</filename>.
+                    In the previous example, <filename>intone</filename>
+                    depends on <filename>mplayer2</filename>.
+                </para>
+
+                <para>
+                    You can use the special token <filename>"*"</filename> on
+                    the left-hand side of the dependency to match all
+                    recipes except the one on the right-hand side.
+                    Here is an example:
+                    <literallayout class='monospaced'>
+    SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
+                    </literallayout>
+                </para>
+
+                <para>
+                    In the previous example, all recipes except
+                    <filename>quilt-native</filename> ignore task
+                    signatures from the <filename>quilt-native</filename>
+                    recipe when determining their task signatures.
                 </para>
 
                 <para>
@@ -12789,6 +13024,48 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-SPL_BINARY'><glossterm>SPL_BINARY</glossterm>
+            <info>
+                SPL_BINARY[doc] = "The file type of the Secondary Program Loader (SPL)."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    The file type for the Secondary Program Loader (SPL).
+                    Some devices use an SPL from which to boot (e.g. the
+                    BeagleBone development board).
+                    For such cases, you can declare the file type of the
+                    SPL binary in the <filename>u-boot.inc</filename> include
+                    file, which is used in the U-Boot recipe.
+                </para>
+
+                <para>
+                    The SPL file type is set to "null" by default in the
+                    <filename>u-boot.inc</filename> file as follows:
+                    <literallayout class='monospaced'>
+     # Some versions of u-boot build an SPL (Second Program Loader) image that
+     # should be packaged along with the u-boot binary as well as placed in the
+     # deploy directory.  For those versions they can set the following variables
+     # to allow packaging the SPL.
+     SPL_BINARY ?= ""
+     SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
+     SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
+     SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
+                    </literallayout>
+                    The <filename>SPL_BINARY</filename> variable helps form
+                    various <filename>SPL_*</filename> variables used by
+                    the OpenEmbedded build system.
+                </para>
+
+                <para>
+                    See the BeagleBone machine configuration example in the
+                    "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a new BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
+                    section in the Yocto Project Board Support Package
+                    Developer's Guide for additional information.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-SRC_URI'><glossterm>SRC_URI</glossterm>
             <info>
                 SRC_URI[doc] = "The list of source files - local or remote. This variable tells the OpenEmbedded build system what bits to pull in for the build and how to pull them in."
@@ -12823,7 +13100,9 @@
                             Fetches files, which are usually files shipped with
                             the
                             <link linkend='metadata'>Metadata</link>,
-                            from the local machine.
+                            from the local machine (e.g.
+                            <ulink url='&YOCTO_DOCS_OM_URL;#patching-dev-environment'>patch</ulink>
+                            files).
                             The path is relative to the
                             <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
                             variable.
@@ -12952,14 +13231,14 @@
                             </para></listitem>
                         <listitem><para><emphasis><filename>subdir</filename> -</emphasis> Places the file
                             (or extracts its contents) into the specified
-                            subdirectory of <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
+                            subdirectory of <filename>WORKDIR</filename>
                             when the local (<filename>file://</filename>)
                             fetcher is used.
                             </para></listitem>
                         <listitem><para><emphasis><filename>localdir</filename> -</emphasis> Places the file
                             (or extracts its contents) into the specified
-                            subdirectory of <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
-                            when the CVS fetcher is used.
+                            subdirectory of <filename>WORKDIR</filename> when
+                            the CVS fetcher is used.
                             </para></listitem>
                         <listitem><para><emphasis><filename>subpath</filename> -</emphasis>
                             Limits the checkout to a specific subpath of the
@@ -13046,13 +13325,13 @@
 
         <glossentry id='var-SRCREV'><glossterm>SRCREV</glossterm>
             <info>
-                SRCREV[doc] = "The revision of the source code used to build the package. This variable applies to Subversion, Git, Mercurial and Bazaar only."
+                SRCREV[doc] = "The revision of the source code used to build the package. This variable applies to Subversion, Git, Mercurial, and Bazaar only."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     The revision of the source code used to build the package.
-                    This variable applies to Subversion, Git, Mercurial and
+                    This variable applies to Subversion, Git, Mercurial, and
                     Bazaar only.
                     Note that if you want to build a fixed revision and you
                     want to avoid performing a query on the remote repository
@@ -13088,7 +13367,7 @@
 
         <glossentry id='var-SSTATE_MIRROR_ALLOW_NETWORK'><glossterm>SSTATE_MIRROR_ALLOW_NETWORK</glossterm>
             <info>
-                SSTATE_MIRROR_ALLOW_NETWORK[doc] = "If set to "1", allows fetches from mirrors that are specified in SSTATE_MIRRORS to work even when fetching from the network has been disabled by setting BB_NO_NETWORK to "1"."
+                SSTATE_MIRROR_ALLOW_NETWORK[doc] = "If set to "1", allows fetches from mirrors that are specified in SSTATE_MIRRORS to work even when fetching from the network is disabled by setting BB_NO_NETWORK to "1"."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -13096,7 +13375,7 @@
                     If set to "1", allows fetches from
                     mirrors that are specified in
                     <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
-                    to work even when fetching from the network has been
+                    to work even when fetching from the network is
                     disabled by setting <filename>BB_NO_NETWORK</filename>
                     to "1".
                     Using the
@@ -13301,27 +13580,27 @@
 
         <glossentry id='var-STAGING_DIR'><glossterm>STAGING_DIR</glossterm>
             <info>
-                STAGING_DIR[doc] = "Specifies the path to the top-level sysroots directory (i.e. ${TMPDIR}/sysroots)."
+                STAGING_DIR[doc] = "Helps construct the recipe-sysroots directory, which is used during packaging."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Specifies the path to the top-level sysroots directory
-                    (i.e.
-                    <filename>${</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>}/sysroots</filename>).
+                    Helps construct the <filename>recipe-sysroots</filename>
+                    directory, which is used during packaging.
                 </para>
 
                 <para>
-                    <filename>STAGING_DIR</filename> contains the directories
-                    that are staged into the sysroot by the
+                    For information on how staging for recipe-specific
+                    sysroots occurs, see the
                     <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
-                    task.
-                    See the
-                    <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>
-                    variable and the
+                    task, the
                     "<ulink url='&YOCTO_DOCS_DEV_URL;#new-sharing-files-between-recipes'>Sharing Files Between Recipes</ulink>"
-                    section in the Yocto Project Development Tasks Manual
-                    for more information.
+                    section in the Yocto Project Development Tasks Manual, the
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#configuration-compilation-and-staging-dev-environment'>Configuration, Compilation, and Staging</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual,
+                    and the
+                    <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>
+                    variable.
                     <note>
                         Recipes should never write files directly under
                         the <filename>STAGING_DIR</filename> directory because
@@ -13346,11 +13625,12 @@
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the path to the sysroot directory for the system
-                    that the component is built to run on (the system that hosts
-                    the component).
-                    For most recipes, this sysroot is the one that the recipe's
+                    on which the component is built to run (the system that
+                    hosts the component).
+                    For most recipes, this sysroot is the one in which that
+                    recipe's
                     <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
-                    task copies files into.
+                    task copies files.
                     Exceptions include <filename>-native</filename> recipes,
                     where the <filename>do_populate_sysroot</filename> task
                     instead uses
@@ -13359,17 +13639,19 @@
                     <filename>STAGING_DIR_HOST</filename> can have the
                     following values:
                     <itemizedlist>
-                        <listitem><para>For recipes building for the target
-                            machine, the value is
+                        <listitem><para>
+                            For recipes building for the target machine, the
+                            value is
                             "${<link linkend='var-STAGING_DIR'>STAGING_DIR</link>}/${<link linkend='var-MACHINE'>MACHINE</link>}".
                             </para></listitem>
-                        <listitem><para>For native recipes building
-                            for the build host, the value is empty given the
-                            assumption that when building for the build host,
-                            the build host's own directories should be used.
-                            <note><para>
-                                <filename>-native</filename> recipes are not
-                                installed into host paths like such as
+                        <listitem><para>
+                            For native recipes building for the build host, the
+                            value is empty given the assumption that when
+                            building for the build host, the build host's own
+                            directories should be used.
+                            <note>
+                                <para><filename>-native</filename> recipes are
+                                not installed into host paths like such as
                                 <filename>/usr</filename>.
                                 Rather, these recipes are installed into
                                 <filename>STAGING_DIR_NATIVE</filename>.
@@ -13385,7 +13667,7 @@
                                 example, GCC's <filename>-isystem</filename>
                                 option.</para>
 
-                                <para>This emphasizes that the
+                                <para>Thus, the emphasis is that the
                                 <filename>STAGING_DIR*</filename> variables
                                 should be viewed as input variables by tasks
                                 such as
@@ -13399,7 +13681,7 @@
                                 <filename>-native</filename> recipes, as
                                 they make use of host headers and libraries.
                                 </para>
-                                </note>
+                            </note>
                             </para></listitem>
                     </itemizedlist>
                 </para>
@@ -13590,8 +13872,8 @@
                 <para>
                     For information on how BitBake uses stamp files to determine
                     if a task should be rerun, see the
-                    "<link linkend='stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                 </para>
 
                 <para>
@@ -13637,13 +13919,13 @@
 
         <glossentry id='var-SUMMARY'><glossterm>SUMMARY</glossterm>
             <info>
-                SUMMARY[doc] = "The short (80 characters or less) summary of the binary package for packaging systems such as opkg, rpm or dpkg. By default, SUMMARY is used to define the DESCRIPTION variable if DESCRIPTION is not set in the recipe."
+                SUMMARY[doc] = "The short (80 characters or less) summary of the binary package for packaging systems such as opkg, rpm, or dpkg. By default, SUMMARY is used to define the DESCRIPTION variable if DESCRIPTION is not set in the recipe."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     The short (72 characters or less) summary of the binary package for packaging
-                    systems such as <filename>opkg</filename>, <filename>rpm</filename> or
+                    systems such as <filename>opkg</filename>, <filename>rpm</filename>, or
                     <filename>dpkg</filename>.
                     By default, <filename>SUMMARY</filename> is used to define
                     the <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>
@@ -13655,7 +13937,7 @@
 
         <glossentry id='var-SVNDIR'><glossterm>SVNDIR</glossterm>
             <info>
-                SVNDIR[doc] = "The directory where Subversion checkouts will be stored."
+                SVNDIR[doc] = "The directory where Subversion checkouts are stored."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -13724,7 +14006,7 @@
                     in your recipe.
                     The variable's default value is set in the
                     <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
-                    as follows:
+                    class as follows:
                     <literallayout class='monospaced'>
      SYSLINUX_SERIAL ?= "0 115200"
                     </literallayout>
@@ -13738,13 +14020,13 @@
 
         <glossentry id='var-SYSLINUX_SPLASH'><glossterm>SYSLINUX_SPLASH</glossterm>
             <info>
-                SYSLINUX_SPLASH[doc] = "An .LSS file used as the background for the VGA boot menu when you are using the boot menu."
+                SYSLINUX_SPLASH[doc] = "An .LSS file used as the background for the VGA boot menu when you use the boot menu."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     An <filename>.LSS</filename> file used as the background
-                    for the VGA boot menu when you are using the boot menu.
+                    for the VGA boot menu when you use the boot menu.
                     You need to set this variable in your recipe.
                 </para>
 
@@ -13767,7 +14049,7 @@
                     Specifies the alternate console=tty... kernel boot argument.
                     The variable's default value is set in the
                     <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
-                    as follows:
+                    class as follows:
                     <literallayout class='monospaced'>
      SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
                     </literallayout>
@@ -13781,7 +14063,7 @@
 
         <glossentry id='var-SYSROOT_DESTDIR'><glossterm>SYSROOT_DESTDIR</glossterm>
             <info>
-                SYSROOT_DESTDIR[doc] = "Points to the temporary work directory (default ${WORKDIR}/sysroot-destdir) where the files that will be populated into the sysroot are assembled during the do_populate_sysroot task."
+                SYSROOT_DESTDIR[doc] = "Points to the temporary work directory (default ${WORKDIR}/sysroot-destdir) where the files populated into the sysroot are assembled during the do_populate_sysroot task."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -13789,8 +14071,7 @@
                     Points to the temporary directory under the work directory
                     (default
                     "<filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/sysroot-destdir</filename>")
-                    where the files
-                    that will be populated into the sysroot are assembled
+                    where the files populated into the sysroot are assembled
                     during the
                     <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
                     task.
@@ -13905,17 +14186,17 @@
 
         <glossentry id='var-SYSTEMD_AUTO_ENABLE'><glossterm>SYSTEMD_AUTO_ENABLE</glossterm>
             <info>
-                SYSTEMD_AUTO_ENABLE[doc] = "For recipes that inherit the systemd class, this variable specifies whether the service you have specified in SYSTEMD_SERVICE should be started automatically or not."
+                SYSTEMD_AUTO_ENABLE[doc] = "For recipes that inherit the systemd class, this variable specifies whether the specified service in SYSTEMD_SERVICE should start automatically or not."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     When inheriting the
                     <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
-                    class, this variable specifies whether the service you have
-                    specified in
+                    class, this variable specifies whether the specified service
+                    in
                     <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
-                    should be started automatically or not.
+                    should start automatically or not.
                     By default, the service is enabled to automatically start
                     at boot time.
                     The default setting is in the
@@ -13963,7 +14244,7 @@
 
         <glossentry id='var-SYSTEMD_BOOT_ENTRIES'><glossterm>SYSTEMD_BOOT_ENTRIES</glossterm>
             <info>
-                SYSTEMD_BOOT_ENTRIES[doc] = "When EFI_PROVIDER is set to "systemd-boot", the SYSTEMD_BOOT_ENTRIES variable specifies a list of entry files (*.conf) to be installed containing one boot entry per file."
+                SYSTEMD_BOOT_ENTRIES[doc] = "When EFI_PROVIDER is set to "systemd-boot", the SYSTEMD_BOOT_ENTRIES variable specifies a list of entry files (*.conf) to install that contain one boot entry per file."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -13973,8 +14254,8 @@
                     is set to "systemd-boot", the
                     <filename>SYSTEMD_BOOT_ENTRIES</filename> variable specifies
                     a list of entry files
-                    (<filename>*.conf</filename>) to be installed
-                    containing one boot entry per file.
+                    (<filename>*.conf</filename>) to install that contain
+                    one boot entry per file.
                     By default, the
                     <link linkend='ref-classes-systemd-boot'><filename>systemd-boot</filename></link>
                     class sets the <filename>SYSTEMD_BOOT_ENTRIES</filename> as
@@ -14076,7 +14357,7 @@
 
         <glossentry id='var-SYSVINIT_ENABLED_GETTYS'><glossterm>SYSVINIT_ENABLED_GETTYS</glossterm>
             <info>
-                SYSVINIT_ENABLED_GETTYS[doc] = "Specifies which virtual terminals should be running a getty, the default is '1'."
+                SYSVINIT_ENABLED_GETTYS[doc] = "Specifies which virtual terminals should run a getty, the default is '1'."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -14084,7 +14365,7 @@
                     When using
                     <ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-enabling-system-services'>SysVinit</ulink>,
                     specifies a space-separated list of the virtual terminals
-                    that should be running a
+                    that should run a
                     <ulink url='http://en.wikipedia.org/wiki/Getty_%28Unix%29'>getty</ulink>
                     (allowing login), assuming
                     <link linkend='var-USE_VT'><filename>USE_VT</filename></link>
@@ -14250,10 +14531,8 @@
 
                 <para>
                     Additionally, the SDK's environment setup script sets
-                    the
-                    <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
-                    variable in the environment to the
-                    <filename>TARGET_CFLAGS</filename> value so that
+                    the <filename>CFLAGS</filename> variable in the environment
+                    to the <filename>TARGET_CFLAGS</filename> value so that
                     executables built using the SDK also have the flags
                     applied.
                 </para>
@@ -14277,12 +14556,10 @@
 
                 <para>
                     Additionally, the SDK's environment setup script sets
-                    the
-                    <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
-                    variable in the environment to the
-                    <filename>TARGET_CPPFLAGS</filename> value so that
-                    executables built using the SDK also have the flags
-                    applied.
+                    the <filename>CPPFLAGS</filename> variable in the
+                    environment to the <filename>TARGET_CPPFLAGS</filename>
+                    value so that executables built using the SDK also have
+                    the flags applied.
                 </para>
             </glossdef>
         </glossentry>
@@ -14303,12 +14580,10 @@
 
                 <para>
                     Additionally, the SDK's environment setup script sets
-                    the
-                    <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
-                    variable in the environment to the
-                    <filename>TARGET_CXXFLAGS</filename> value so that
-                    executables built using the SDK also have the flags
-                    applied.
+                    the <filename>CXXFLAGS</filename> variable in the
+                    environment to the <filename>TARGET_CXXFLAGS</filename>
+                    value so that executables built using the SDK also have
+                    the flags applied.
                 </para>
             </glossdef>
         </glossentry>
@@ -14382,10 +14657,10 @@
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the target's operating system.
-                    The variable can be set to "linux" for <filename>glibc</filename>-based systems and
-                    to "linux-musl" for <filename>musl</filename>.
-                    For ARM/EABI targets, there are also "linux-gnueabi" and
-                    "linux-musleabi" values possible.
+                    The variable can be set to "linux" for glibc-based systems
+                    (GNU C Library) and to "linux-musl" for musl libc.
+                    For ARM/EABI targets, "linux-gnueabi" and "linux-musleabi"
+                    possible values exist.
                 </para>
             </glossdef>
         </glossentry>
@@ -14553,10 +14828,14 @@
                         default toolchain.
                         Using older or newer versions of these components
                         might cause build problems.
-                        See the
-                        <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
+                        See the Release Notes for the Yocto Project release
                         for the specific components with which the toolchain
                         must be compatible.
+                        To access the Release Notes, go to the
+                        <ulink url='&YOCTO_HOME_URL;/software-overview/downloads/'>Downloads</ulink>
+                        page on the Yocto Project website and click on the
+                        "RELEASE INFORMATION" link for the appropriate
+                        release.
                     </note>
                 </para>
 
@@ -14671,7 +14950,7 @@
 
         <glossentry id='var-TEST_LOG_DIR'><glossterm>TEST_LOG_DIR</glossterm>
             <info>
-                TEST_LOG_DIR[doc] = "Holds the SSH log and the boot log for QEMU machines. The <filename>TEST_LOG_DIR</filename> variable defaults to "${WORKDIR}/testimage"."
+                TEST_LOG_DIR[doc] = "Holds the SSH log and the boot log for QEMU machines. The TEST_LOG_DIR variable defaults to "${WORKDIR}/testimage"."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -15083,8 +15362,8 @@
                 <para>
                     For background information on cross-development toolchains
                     in the Yocto Project development environment, see the
-                    "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                     For information on setting up a cross-development
                     environment, see the
                     <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
@@ -15142,8 +15421,8 @@
                 <para>
                     For background information on cross-development toolchains
                     in the Yocto Project development environment, see the
-                    "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
-                    section.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
                     For information on setting up a cross-development
                     environment, see the
                     <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
@@ -15181,7 +15460,7 @@
                     a value where underscores are not allowed, for example
                     within package filenames.
                     In this case, dash characters replace any underscore
-                    characters used in TARGET_ARCH.
+                    characters used in <filename>TARGET_ARCH</filename>.
                 </para>
 
                 <para>
@@ -15749,7 +16028,7 @@
 
         <glossentry id='var-UPDATERCPN'><glossterm>UPDATERCPN</glossterm>
             <info>
-               UPDATERCPN[doc] = "Specifies the package that contains the initscript that is to be enabled."
+               UPDATERCPN[doc] = "Specifies the package that contains the initscript that is enabled."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -15757,7 +16036,7 @@
                     For recipes inheriting the
                     <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
                     class, <filename>UPDATERCPN</filename> specifies
-                    the package that contains the initscript that is to be
+                    the package that contains the initscript that is
                     enabled.
                 </para>
 
@@ -16045,7 +16324,7 @@
 
         <glossentry id='var-USERADD_PARAM'><glossterm>USERADD_PARAM</glossterm>
             <info>
-               USERADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the useradd command if you wish to add a user to the system when the package is installed."
+               USERADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should pass to the useradd command if you add a user to the system when the package is installed."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
@@ -16053,9 +16332,9 @@
                     When inheriting the
                     <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
                     class, this variable
-                    specifies for a package what parameters should be passed
+                    specifies for a package what parameters should pass
                     to the <filename>useradd</filename> command
-                    if you wish to add a user to the system when the package
+                    if you add a user to the system when the package
                     is installed.
                 </para>
 
@@ -16266,7 +16545,7 @@
                     "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
                     section in the Yocto Project Development Tasks Manual.
                     For details on the kickstart file format, see the
-                    "<link linkend='openembedded-kickstart-wks-reference'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</link>
+                    "<link linkend='ref-kickstart'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</link>
                     Chapter.
                 </para>
             </glossdef>
@@ -16295,7 +16574,7 @@
                     </literallayout>
                     The actual directory depends on several things:
                     <itemizedlist>
-                        <listitem><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>:
+                        <listitem><filename>TMPDIR</filename>:
                             The top-level build output directory</listitem>
                         <listitem><link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>:
                             The target system identifier</listitem>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/resources.xml b/import-layers/yocto-poky/documentation/ref-manual/resources.xml
index d59bea2..be04696 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/resources.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/resources.xml
@@ -37,8 +37,8 @@
 
     <para>
         The Yocto Project uses its own implementation of
-        <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track
-        defects (bugs).
+        <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink> to
+        track defects (bugs).
         Implementations of Bugzilla work well for group development because
         they track bugs and code changes, can be used to communicate changes
         and problems with developers, can be used to submit and review patches,
@@ -68,6 +68,8 @@
                 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>
                 </para></listitem>
         </itemizedlist>
+        For information on Bugzilla in general, see
+        <ulink url='http://www.bugzilla.org/about/'></ulink>.
     </para>
 </section>
 
@@ -160,10 +162,18 @@
                 </para></listitem>
             <listitem><para>
                 <emphasis>
-                <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>:
+                <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>:
                 </emphasis>
-                This short document lets you get started
-                with the Yocto Project and quickly begin building an image.
+                This short document lets you experience building an image using
+                the Yocto Project without having to understand any concepts or
+                details.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>
+                <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>:
+                </emphasis>
+                This manual provides overview and conceptual information
+                about the Yocto Project.
                 </para></listitem>
             <listitem><para>
                 <emphasis>
@@ -201,6 +211,23 @@
                 </para></listitem>
             <listitem><para>
                 <emphasis>
+                <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>:
+                </emphasis>
+                This manual provides reference material such as variable,
+                task, and class descriptions.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>
+                <ulink url='&YOCTO_DOCS_MM_URL;'>Yocto Project Mega-Manual</ulink>:
+                </emphasis>
+                This manual is simply a single HTML file comprised of the
+                bulk of the Yocto Project manuals.
+                The Mega-Manual primarily exists as a vehicle by which you can
+                easily search for phrases and terms used in the Yocto Project
+                documentation set.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>
                 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>:
                 </emphasis>
                 This manual presents a set of common and generally useful
@@ -209,7 +236,18 @@
                 </para></listitem>
             <listitem><para>
                 <emphasis>
-                <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-appendix-latest-yp-eclipse-plug-in'>Eclipse IDE Yocto Plug-in</ulink>:
+                <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>:
+                </emphasis>
+                This manual introduces and describes how to set up and use
+                Toaster.
+                Toaster is an Application Programming Interface (API) and
+                web-based interface to the
+                <link linkend='build-system-term'>OpenEmbedded Build System</link>,
+                which uses BitBake, that reports build information.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>
+                <ulink url='&YOCTO_DOCS_SDK_URL;#adt-eclipse'>Eclipse IDE Yocto Plug-in</ulink>:
                 </emphasis>
                 Instructions that demonstrate how an application developer
                 uses the Eclipse Yocto Project Plug-in feature within
@@ -222,22 +260,13 @@
                 A list of commonly asked questions and their answers.
                 </para></listitem>
             <listitem><para>
-                <emphasis>
-                <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>:
-                </emphasis>
+                <emphasis>Release Notes:</emphasis>
                 Features, updates and known issues for the current
                 release of the Yocto Project.
-                </para></listitem>
-            <listitem><para>
-                <emphasis>
-                <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>:
-                </emphasis>
-                This manual introduces and describes how to set up and use
-                Toaster.
-                Toaster is an Application Programming Interface (API) and
-                web-based interface to the
-                <link linkend='build-system-term'>OpenEmbedded Build System</link>,
-                which uses BitBake, that reports build information.
+                To access the Release Notes, go to the
+                <ulink url='&YOCTO_HOME_URL;/software-overview/downloads/'>Downloads</ulink>
+                page on the Yocto Project website and click on the
+                "RELEASE INFORMATION" link for the appropriate release.
                 </para></listitem>
             <listitem><para>
                 <emphasis>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/technical-details.xml b/import-layers/yocto-poky/documentation/ref-manual/technical-details.xml
deleted file mode 100644
index e9e76e4..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/technical-details.xml
+++ /dev/null
@@ -1,2042 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='technical-details'>
-<title>Technical Details</title>
-
-    <para>
-        This chapter provides technical details for various parts of the
-        Yocto Project.
-        Currently, topics include Yocto Project components,
-        cross-toolchain generation, shared state (sstate) cache,
-        x32, Wayland support, and Licenses.
-    </para>
-
-<section id='usingpoky-components'>
-    <title>Yocto Project Components</title>
-
-    <para>
-        The
-        <link linkend='bitbake-term'>BitBake</link>
-        task executor together with various types of configuration files form
-        the OpenEmbedded Core.
-        This section overviews these components by describing their use and
-        how they interact.
-    </para>
-
-    <para>
-        BitBake handles the parsing and execution of the data files.
-        The data itself is of various types:
-        <itemizedlist>
-            <listitem><para><emphasis>Recipes:</emphasis> Provides details
-                about particular pieces of software.
-                </para></listitem>
-            <listitem><para><emphasis>Class Data:</emphasis> Abstracts
-                common build information (e.g. how to build a Linux kernel).
-                </para></listitem>
-            <listitem><para><emphasis>Configuration Data:</emphasis> Defines
-                machine-specific settings, policy decisions, and so forth.
-                Configuration data acts as the glue to bind everything
-                together.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        BitBake knows how to combine multiple data sources together and refers
-        to each data source as a layer.
-        For information on layers, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
-        Creating Layers</ulink>" section of the Yocto Project Development
-        Tasks Manual.
-    </para>
-
-    <para>
-        Following are some brief details on these core components.
-        For additional information on how these components interact during
-        a build, see the
-        "<link linkend='development-concepts'>Development Concepts</link>"
-        section.
-    </para>
-
-    <section id='usingpoky-components-bitbake'>
-        <title>BitBake</title>
-
-        <para>
-            BitBake is the tool at the heart of the OpenEmbedded build system
-            and is responsible for parsing the
-            <link linkend='metadata'>Metadata</link>,
-            generating a list of tasks from it, and then executing those tasks.
-        </para>
-
-        <para>
-            This section briefly introduces BitBake.
-            If you want more information on BitBake, see the
-            <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
-        </para>
-
-        <para>
-            To see a list of the options BitBake supports, use either of
-            the following commands:
-            <literallayout class='monospaced'>
-     $ bitbake -h
-     $ bitbake --help
-            </literallayout>
-        </para>
-
-        <para>
-            The most common usage for BitBake is <filename>bitbake <replaceable>packagename</replaceable></filename>, where
-            <filename>packagename</filename> is the name of the package you want to build
-            (referred to as the "target" in this manual).
-            The target often equates to the first part of a recipe's filename
-            (e.g. "foo" for a recipe named
-            <filename>foo_1.3.0-r0.bb</filename>).
-            So, to process the <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you
-            might type the following:
-            <literallayout class='monospaced'>
-     $ bitbake matchbox-desktop
-            </literallayout>
-            Several different versions of <filename>matchbox-desktop</filename> might exist.
-            BitBake chooses the one selected by the distribution configuration.
-            You can get more details about how BitBake chooses between different
-            target versions and providers in the
-            "<ulink url='&YOCTO_DOCS_BB_URL;#bb-bitbake-preferences'>Preferences</ulink>"
-            section of the BitBake User Manual.
-        </para>
-
-        <para>
-            BitBake also tries to execute any dependent tasks first.
-            So for example, before building <filename>matchbox-desktop</filename>, BitBake
-            would build a cross compiler and <filename>glibc</filename> if they had not already
-            been built.
-        </para>
-
-        <para>
-            A useful BitBake option to consider is the <filename>-k</filename> or
-            <filename>--continue</filename> option.
-            This option instructs BitBake to try and continue processing the job
-            as long as possible even after encountering an error.
-            When an error occurs, the target that
-            failed and those that depend on it cannot be remade.
-            However, when you use this option other dependencies can still be
-            processed.
-        </para>
-    </section>
-
-    <section id='usingpoky-components-metadata'>
-        <title>Metadata (Recipes)</title>
-
-        <para>
-            Files that have the <filename>.bb</filename> suffix are "recipes"
-            files.
-            In general, a recipe contains information about a single piece of
-            software.
-            This information includes the location from which to download the
-            unaltered source, any source patches to be applied to that source
-            (if needed), which special configuration options to apply,
-            how to compile the source files, and how to package the compiled
-            output.
-        </para>
-
-        <para>
-            The term "package" is sometimes used to refer to recipes. However,
-            since the word "package" is used for the packaged output from the OpenEmbedded
-            build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
-            this document avoids using the term "package" when referring to recipes.
-        </para>
-    </section>
-
-    <section id='metadata-virtual-providers'>
-        <title>Metadata (Virtual Providers)</title>
-
-        <para>
-            Prior to the build, if you know that several different recipes
-            provide the same functionality, you can use a virtual provider
-            (i.e. <filename>virtual/*</filename>) as a placeholder for the
-            actual provider.
-            The actual provider would be determined at build
-            time.
-            In this case, you should add <filename>virtual/*</filename>
-            to <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
-            rather than listing the specified provider.
-            You would select the actual provider by setting the
-            <link linkend='var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></link>
-            variable (i.e. <filename>PREFERRED_PROVIDER_virtual/*</filename>)
-            in the build's configuration file (e.g.
-            <filename>poky/build/conf/local.conf</filename>).
-            <note>
-                Any recipe that PROVIDES a <filename>virtual/*</filename> item
-                that is ultimately not selected through
-                <filename>PREFERRED_PROVIDER</filename> does not get built.
-                Preventing these recipes from building is usually the desired
-                behavior since this mechanism's purpose is to select between
-                mutually exclusive alternative providers.
-            </note>
-        </para>
-
-        <para>
-            The following lists specific examples of virtual providers:
-            <itemizedlist>
-                <listitem><para>
-                    <filename>virtual/mesa</filename>:
-                    Provides <filename>gbm.pc</filename>.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>virtual/egl</filename>:
-                    Provides <filename>egl.pc</filename> and possibly
-                    <filename>wayland-egl.pc</filename>.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>virtual/libgl</filename>:
-                    Provides <filename>gl.pc</filename> (i.e. libGL).
-                    </para></listitem>
-                <listitem><para>
-                    <filename>virtual/libgles1</filename>:
-                    Provides <filename>glesv1_cm.pc</filename>
-                    (i.e. libGLESv1_CM).
-                    </para></listitem>
-                <listitem><para>
-                    <filename>virtual/libgles2</filename>:
-                    Provides <filename>glesv2.pc</filename> (i.e. libGLESv2).
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='usingpoky-components-classes'>
-        <title>Classes</title>
-
-        <para>
-            Class files (<filename>.bbclass</filename>) contain information that
-            is useful to share between
-            <link linkend='metadata'>Metadata</link> files.
-            An example is the
-            <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
-            class, which contains common settings for any application that
-            Autotools uses.
-            The "<link linkend='ref-classes'>Classes</link>" chapter provides
-            details about classes and how to use them.
-        </para>
-    </section>
-
-    <section id='usingpoky-components-configuration'>
-        <title>Configuration</title>
-
-        <para>
-            The configuration files (<filename>.conf</filename>) define various configuration variables
-            that govern the OpenEmbedded build process.
-            These files fall into several areas that define machine configuration options,
-            distribution configuration options, compiler tuning options, general common configuration
-            options, and user configuration options in <filename>local.conf</filename>, which is found
-            in the
-            <link linkend='build-directory'>Build Directory</link>.
-        </para>
-    </section>
-</section>
-
-<section id="cross-development-toolchain-generation">
-    <title>Cross-Development Toolchain Generation</title>
-
-    <para>
-        The Yocto Project does most of the work for you when it comes to
-        creating
-        <link linkend='cross-development-toolchain'>cross-development toolchains</link>.
-        This section provides some technical background on how
-        cross-development toolchains are created and used.
-        For more information on toolchains, you can also see the
-        <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
-        manual.
-    </para>
-
-    <para>
-        In the Yocto Project development environment, cross-development
-        toolchains are used to build the image and applications that run on the
-        target hardware.
-        With just a few commands, the OpenEmbedded build system creates
-        these necessary toolchains for you.
-    </para>
-
-    <para>
-        The following figure shows a high-level build environment regarding
-        toolchain construction and use.
-    </para>
-
-    <para>
-        <imagedata fileref="figures/cross-development-toolchains.png" width="8in" depth="6in" align="center" />
-    </para>
-
-    <para>
-        Most of the work occurs on the Build Host.
-        This is the machine used to build images and generally work within the
-        the Yocto Project environment.
-        When you run BitBake to create an image, the OpenEmbedded build system
-        uses the host <filename>gcc</filename> compiler to bootstrap a
-        cross-compiler named <filename>gcc-cross</filename>.
-        The <filename>gcc-cross</filename> compiler is what BitBake uses to
-        compile source files when creating the target image.
-        You can think of <filename>gcc-cross</filename> simply as an
-        automatically generated cross-compiler that is used internally within
-        BitBake only.
-        <note>
-            The extensible SDK does not use
-            <filename>gcc-cross-canadian</filename> since this SDK
-            ships a copy of the OpenEmbedded build system and the sysroot
-            within it contains <filename>gcc-cross</filename>.
-        </note>
-    </para>
-
-    <para>
-        The chain of events that occurs when <filename>gcc-cross</filename> is
-        bootstrapped is as follows:
-        <literallayout class='monospaced'>
-     gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> glibc-initial -> glibc -> gcc-cross -> gcc-runtime
-        </literallayout>
-        <itemizedlist>
-            <listitem><para><filename>gcc</filename>:
-                The build host's GNU Compiler Collection (GCC).
-                </para></listitem>
-            <listitem><para><filename>binutils-cross</filename>:
-                The bare minimum binary utilities needed in order to run
-                the <filename>gcc-cross-initial</filename> phase of the
-                bootstrap operation.
-                </para></listitem>
-            <listitem><para><filename>gcc-cross-initial</filename>:
-                An early stage of the bootstrap process for creating
-                the cross-compiler.
-                This stage builds enough of the <filename>gcc-cross</filename>,
-                the C library, and other pieces needed to finish building the
-                final cross-compiler in later stages.
-                This tool is a "native" package (i.e. it is designed to run on
-                the build host).
-                </para></listitem>
-            <listitem><para><filename>linux-libc-headers</filename>:
-                Headers needed for the cross-compiler.
-                </para></listitem>
-            <listitem><para><filename>glibc-initial</filename>:
-                An initial version of the Embedded GLIBC needed to bootstrap
-                <filename>glibc</filename>.
-                </para></listitem>
-            <listitem><para><filename>gcc-cross</filename>:
-                The final stage of the bootstrap process for the
-                cross-compiler.
-                This stage results in the actual cross-compiler that
-                BitBake uses when it builds an image for a targeted
-                device.
-                <note>
-                    If you are replacing this cross compiler toolchain
-                    with a custom version, you must replace
-                    <filename>gcc-cross</filename>.
-                </note>
-                This tool is also a "native" package (i.e. it is
-                designed to run on the build host).
-                </para></listitem>
-            <listitem><para><filename>gcc-runtime</filename>:
-                Runtime libraries resulting from the toolchain bootstrapping
-                process.
-                This tool produces a binary that consists of the
-                runtime libraries need for the targeted device.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        You can use the OpenEmbedded build system to build an installer for
-        the relocatable SDK used to develop applications.
-        When you run the installer, it installs the toolchain, which contains
-        the development tools (e.g., the
-        <filename>gcc-cross-canadian</filename>),
-        <filename>binutils-cross-canadian</filename>, and other
-        <filename>nativesdk-*</filename> tools,
-        which are tools native to the SDK (i.e. native to
-        <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>),
-        you need to cross-compile and test your software.
-        The figure shows the commands you use to easily build out this
-        toolchain.
-        This cross-development toolchain is built to execute on the
-        <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
-        which might or might not be the same
-        machine as the Build Host.
-        <note>
-            If your target architecture is supported by the Yocto Project,
-            you can take advantage of pre-built images that ship with the
-            Yocto Project and already contain cross-development toolchain
-            installers.
-        </note>
-    </para>
-
-    <para>
-        Here is the bootstrap process for the relocatable toolchain:
-        <literallayout class='monospaced'>
-     gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers ->
-        glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian
-        </literallayout>
-        <itemizedlist>
-            <listitem><para><filename>gcc</filename>:
-                The build host's GNU Compiler Collection (GCC).
-                </para></listitem>
-            <listitem><para><filename>binutils-crosssdk</filename>:
-                The bare minimum binary utilities needed in order to run
-                the <filename>gcc-crosssdk-initial</filename> phase of the
-                bootstrap operation.
-                </para></listitem>
-            <listitem><para><filename>gcc-crosssdk-initial</filename>:
-                An early stage of the bootstrap process for creating
-                the cross-compiler.
-                This stage builds enough of the
-                <filename>gcc-crosssdk</filename> and supporting pieces so that
-                the final stage of the bootstrap process can produce the
-                finished cross-compiler.
-                This tool is a "native" binary that runs on the build host.
-                </para></listitem>
-            <listitem><para><filename>linux-libc-headers</filename>:
-                Headers needed for the cross-compiler.
-                </para></listitem>
-            <listitem><para><filename>glibc-initial</filename>:
-                An initial version of the Embedded GLIBC needed to bootstrap
-                <filename>nativesdk-glibc</filename>.
-                </para></listitem>
-            <listitem><para><filename>nativesdk-glibc</filename>:
-                The Embedded GLIBC needed to bootstrap the
-                <filename>gcc-crosssdk</filename>.
-                </para></listitem>
-            <listitem><para><filename>gcc-crosssdk</filename>:
-                The final stage of the bootstrap process for the
-                relocatable cross-compiler.
-                The <filename>gcc-crosssdk</filename> is a transitory compiler
-                and never leaves the build host.
-                Its purpose is to help in the bootstrap process to create the
-                eventual relocatable <filename>gcc-cross-canadian</filename>
-                compiler, which is relocatable.
-                This tool is also a "native" package (i.e. it is
-                designed to run on the build host).
-                </para></listitem>
-            <listitem><para><filename>gcc-cross-canadian</filename>:
-                The final relocatable cross-compiler.
-                When run on the
-                <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
-                this tool
-                produces executable code that runs on the target device.
-                Only one cross-canadian compiler is produced per architecture
-                since they can be targeted at different processor optimizations
-                using configurations passed to the compiler through the
-                compile commands.
-                This circumvents the need for multiple compilers and thus
-                reduces the size of the toolchains.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <note>
-        For information on advantages gained when building a
-        cross-development toolchain installer, see the
-        "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
-        section in the Yocto Project Application Development and the
-        Extensible Software Development Kit (eSDK) manual.
-    </note>
-</section>
-
-<section id="shared-state-cache">
-    <title>Shared State Cache</title>
-
-    <para>
-        By design, the OpenEmbedded build system builds everything from scratch unless
-        BitBake can determine that parts do not need to be rebuilt.
-        Fundamentally, building from scratch is attractive as it means all parts are
-        built fresh and there is no possibility of stale data causing problems.
-        When developers hit problems, they typically default back to building from scratch
-        so they know the state of things from the start.
-    </para>
-
-    <para>
-        Building an image from scratch is both an advantage and a disadvantage to the process.
-        As mentioned in the previous paragraph, building from scratch ensures that
-        everything is current and starts from a known state.
-        However, building from scratch also takes much longer as it generally means
-        rebuilding things that do not necessarily need to be rebuilt.
-    </para>
-
-    <para>
-        The Yocto Project implements shared state code that supports incremental builds.
-        The implementation of the shared state code answers the following questions that
-        were fundamental roadblocks within the OpenEmbedded incremental build support system:
-        <itemizedlist>
-            <listitem><para>What pieces of the system have changed and what pieces have
-                not changed?</para></listitem>
-            <listitem><para>How are changed pieces of software removed and replaced?</para></listitem>
-            <listitem><para>How are pre-built components that do not need to be rebuilt from scratch
-                used when they are available?</para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        For the first question, the build system detects changes in the "inputs" to a given task by
-        creating a checksum (or signature) of the task's inputs.
-        If the checksum changes, the system assumes the inputs have changed and the task needs to be
-        rerun.
-        For the second question, the shared state (sstate) code tracks which tasks add which output
-        to the build process.
-        This means the output from a given task can be removed, upgraded or otherwise manipulated.
-        The third question is partly addressed by the solution for the second question
-        assuming the build system can fetch the sstate objects from remote locations and
-        install them if they are deemed to be valid.
-    </para>
-
-    <note>
-        The OpenEmbedded build system does not maintain
-        <link linkend='var-PR'><filename>PR</filename></link> information
-        as part of the shared state packages.
-        Consequently, considerations exist that affect maintaining shared
-        state feeds.
-        For information on how the OpenEmbedded build system
-        works with packages and can
-        track incrementing <filename>PR</filename> information, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
-        section in the Yocto Project Development Tasks Manual.
-    </note>
-
-    <para>
-        The rest of this section goes into detail about the overall incremental build
-        architecture, the checksums (signatures), shared state, and some tips and tricks.
-    </para>
-
-    <section id='overall-architecture'>
-        <title>Overall Architecture</title>
-
-        <para>
-            When determining what parts of the system need to be built, BitBake
-            works on a per-task basis rather than a per-recipe basis.
-            You might wonder why using a per-task basis is preferred over a per-recipe basis.
-            To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
-            In this case, the
-            <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-            and
-            <link linkend='ref-tasks-package'><filename>do_package</filename></link>
-            task outputs are still valid.
-            However, with a per-recipe approach, the build would not include the
-            <filename>.deb</filename> files.
-            Consequently, you would have to invalidate the whole build and rerun it.
-            Rerunning everything is not the best solution.
-            Also, in this case, the core must be "taught" much about specific tasks.
-            This methodology does not scale well and does not allow users to easily add new tasks
-            in layers or as external recipes without touching the packaged-staging core.
-        </para>
-    </section>
-
-    <section id='checksums'>
-        <title>Checksums (Signatures)</title>
-
-        <para>
-            The shared state code uses a checksum, which is a unique signature of a task's
-            inputs, to determine if a task needs to be run again.
-            Because it is a change in a task's inputs that triggers a rerun, the process
-            needs to detect all the inputs to a given task.
-            For shell tasks, this turns out to be fairly easy because
-            the build process generates a "run" shell script for each task and
-            it is possible to create a checksum that gives you a good idea of when
-            the task's data changes.
-        </para>
-
-        <para>
-            To complicate the problem, there are things that should not be
-            included in the checksum.
-            First, there is the actual specific build path of a given task -
-            the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
-            It does not matter if the work directory changes because it should
-            not affect the output for target packages.
-            Also, the build process has the objective of making native
-            or cross packages relocatable.
-            <note>
-                Both native and cross packages run on the build host.
-                However, cross packages generate output for the target
-                architecture.
-            </note>
-            The checksum therefore needs to exclude
-            <filename>WORKDIR</filename>.
-            The simplistic approach for excluding the work directory is to set
-            <filename>WORKDIR</filename> to some fixed value and create the
-            checksum for the "run" script.
-        </para>
-
-        <para>
-            Another problem results from the "run" scripts containing functions that
-            might or might not get called.
-            The incremental build solution contains code that figures out dependencies
-            between shell functions.
-            This code is used to prune the "run" scripts down to the minimum set,
-            thereby alleviating this problem and making the "run" scripts much more
-            readable as a bonus.
-        </para>
-
-        <para>
-            So far we have solutions for shell scripts.
-            What about Python tasks?
-            The same approach applies even though these tasks are more difficult.
-            The process needs to figure out what variables a Python function accesses
-            and what functions it calls.
-            Again, the incremental build solution contains code that first figures out
-            the variable and function dependencies, and then creates a checksum for the data
-            used as the input to the task.
-        </para>
-
-        <para>
-            Like the <filename>WORKDIR</filename> case, situations exist where dependencies
-            should be ignored.
-            For these cases, you can instruct the build process to ignore a dependency
-            by using a line like the following:
-            <literallayout class='monospaced'>
-     PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
-            </literallayout>
-            This example ensures that the
-            <link linkend='var-PACKAGE_ARCHS'><filename>PACKAGE_ARCHS</filename></link>
-            variable does not
-            depend on the value of
-            <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
-            even if it does reference it.
-        </para>
-
-        <para>
-            Equally, there are cases where we need to add dependencies BitBake is not able to find.
-            You can accomplish this by using a line like the following:
-            <literallayout class='monospaced'>
-      PACKAGE_ARCHS[vardeps] = "MACHINE"
-            </literallayout>
-            This example explicitly adds the <filename>MACHINE</filename> variable as a
-            dependency for <filename>PACKAGE_ARCHS</filename>.
-        </para>
-
-        <para>
-            Consider a case with in-line Python, for example, where BitBake is not
-            able to figure out dependencies.
-            When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
-            produces output when it discovers something for which it cannot figure out
-            dependencies.
-            The Yocto Project team has currently not managed to cover those dependencies
-            in detail and is aware of the need to fix this situation.
-        </para>
-
-        <para>
-            Thus far, this section has limited discussion to the direct inputs into a task.
-            Information based on direct inputs is referred to as the "basehash" in the
-            code.
-            However, there is still the question of a task's indirect inputs - the
-            things that were already built and present in the
-            <link linkend='build-directory'>Build Directory</link>.
-            The checksum (or signature) for a particular task needs to add the hashes
-            of all the tasks on which the particular task depends.
-            Choosing which dependencies to add is a policy decision.
-            However, the effect is to generate a master checksum that combines the basehash
-            and the hashes of the task's dependencies.
-        </para>
-
-        <para>
-            At the code level, there are a variety of ways both the basehash and the
-            dependent task hashes can be influenced.
-            Within the BitBake configuration file, we can give BitBake some extra information
-            to help it construct the basehash.
-            The following statement effectively results in a list of global variable
-            dependency excludes - variables never included in any checksum:
-            <literallayout class='monospaced'>
-     BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
-         SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
-         USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
-         PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
-         CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
-            </literallayout>
-            The previous example excludes
-            <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
-            since that variable is actually constructed as a path within
-            <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
-            the whitelist.
-        </para>
-
-        <para>
-            The rules for deciding which hashes of dependent tasks to include through
-            dependency chains are more complex and are generally accomplished with a
-            Python function.
-            The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
-            of this and also illustrates how you can insert your own policy into the system
-            if so desired.
-            This file defines the two basic signature generators
-            <link linkend='oe-core'>OE-Core</link> uses:  "OEBasic" and
-            "OEBasicHash".
-            By default, there is a dummy "noop" signature handler enabled in BitBake.
-            This means that behavior is unchanged from previous versions.
-            OE-Core uses the "OEBasicHash" signature handler by default
-            through this setting in the <filename>bitbake.conf</filename> file:
-            <literallayout class='monospaced'>
-     BB_SIGNATURE_HANDLER ?= "OEBasicHash"
-            </literallayout>
-            The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
-            "OEBasic" version but adds the task hash to the stamp files.
-            This results in any
-            <link linkend='metadata'>Metadata</link>
-            change that changes the task hash, automatically
-            causing the task to be run again.
-            This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
-            values, and changes to Metadata automatically ripple across the build.
-        </para>
-
-        <para>
-            It is also worth noting that the end result of these signature generators is to
-            make some dependency and hash information available to the build.
-            This information includes:
-            <itemizedlist>
-                <listitem><para><filename>BB_BASEHASH_task-</filename><replaceable>taskname</replaceable>:
-                    The base hashes for each task in the recipe.
-                    </para></listitem>
-                <listitem><para><filename>BB_BASEHASH_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
-                    The base hashes for each dependent task.
-                    </para></listitem>
-                <listitem><para><filename>BBHASHDEPS_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
-                    The task dependencies for each task.
-                    </para></listitem>
-                <listitem><para><filename>BB_TASKHASH</filename>:
-                    The hash of the currently running task.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='shared-state'>
-        <title>Shared State</title>
-
-        <para>
-            Checksums and dependencies, as discussed in the previous section, solve half the
-            problem of supporting a shared state.
-            The other part of the problem is being able to use checksum information during the build
-            and being able to reuse or rebuild specific components.
-        </para>
-
-        <para>
-            The
-            <link linkend='ref-classes-sstate'><filename>sstate</filename></link>
-            class is a relatively generic implementation of how to "capture"
-            a snapshot of a given task.
-            The idea is that the build process does not care about the source of a task's output.
-            Output could be freshly built or it could be downloaded and unpacked from
-            somewhere - the build process does not need to worry about its origin.
-        </para>
-
-        <para>
-            There are two types of output, one is just about creating a directory
-            in <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
-            A good example is the output of either
-            <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-            or
-            <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
-            The other type of output occurs when a set of data is merged into a shared directory
-            tree such as the sysroot.
-        </para>
-
-        <para>
-            The Yocto Project team has tried to keep the details of the
-            implementation hidden in <filename>sstate</filename> class.
-            From a user's perspective, adding shared state wrapping to a task
-            is as simple as this
-            <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link>
-            example taken from the
-            <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
-            class:
-            <literallayout class='monospaced'>
-     DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
-     SSTATETASKS += "do_deploy"
-     do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
-     do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
-
-     python do_deploy_setscene () {
-         sstate_setscene(d)
-     }
-     addtask do_deploy_setscene
-     do_deploy[dirs] = "${DEPLOYDIR} ${B}"
-            </literallayout>
-            The following list explains the previous example:
-            <itemizedlist>
-                <listitem><para>
-                    Adding "do_deploy" to <filename>SSTATETASKS</filename>
-                    adds some required sstate-related processing, which is
-                    implemented in the
-                    <link linkend='ref-classes-sstate'><filename>sstate</filename></link>
-                    class, to before and after the
-                    <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link>
-                    task.
-                    </para></listitem>
-                <listitem><para>
-                    The
-                    <filename>do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"</filename>
-                    declares that <filename>do_deploy</filename> places its
-                    output in <filename>${DEPLOYDIR}</filename> when run
-                    normally (i.e. when not using the sstate cache).
-                    This output becomes the input to the shared state cache.
-                    </para></listitem>
-                <listitem><para>
-                    The
-                    <filename>do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"</filename>
-                    line causes the contents of the shared state cache to be
-                    copied to <filename>${DEPLOY_DIR_IMAGE}</filename>.
-                    <note>
-                        If <filename>do_deploy</filename> is not already in
-                        the shared state cache or if its input checksum
-                        (signature) has changed from when the output was
-                        cached, the task will be run to populate the shared
-                        state cache, after which the contents of the shared
-                        state cache is copied to
-                        <filename>${DEPLOY_DIR_IMAGE}</filename>.
-                        If <filename>do_deploy</filename> is in the shared
-                        state cache and its signature indicates that the
-                        cached output is still valid (i.e. if no
-                        relevant task inputs have changed), then the contents
-                        of the shared state cache will be copied directly to
-                        <filename>${DEPLOY_DIR_IMAGE}</filename> by the
-                        <filename>do_deploy_setscene</filename> task instead,
-                        skipping the <filename>do_deploy</filename> task.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    The following task definition is glue logic needed to make
-                    the previous settings effective:
-                    <literallayout class='monospaced'>
-     python do_deploy_setscene () {
-         sstate_setscene(d)
-     }
-     addtask do_deploy_setscene
-                    </literallayout>
-                    <filename>sstate_setscene()</filename> takes the flags
-                    above as input and accelerates the
-                    <filename>do_deploy</filename> task through the
-                    shared state cache if possible.
-                    If the task was accelerated,
-                    <filename>sstate_setscene()</filename> returns True.
-                    Otherwise, it returns False, and the normal
-                    <filename>do_deploy</filename> task runs.
-                    For more information, see the
-                    "<ulink url='&YOCTO_DOCS_BB_URL;#setscene'>setscene</ulink>"
-                    section in the BitBake User Manual.
-                    </para></listitem>
-                <listitem><para>
-                    The <filename>do_deploy[dirs] = "${DEPLOYDIR} ${B}"</filename>
-                    line creates <filename>${DEPLOYDIR}</filename> and
-                    <filename>${B}</filename> before the
-                    <filename>do_deploy</filename> task runs, and also sets
-                    the current working directory of
-                    <filename>do_deploy</filename> to
-                    <filename>${B}</filename>.
-                    For more information, see the
-                    "<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'>Variable Flags</ulink>"
-                    section in the BitBake User Manual.
-                    <note>
-                        In cases where
-                        <filename>sstate-inputdirs</filename> and
-                        <filename>sstate-outputdirs</filename> would be the
-                        same, you can use
-                        <filename>sstate-plaindirs</filename>.
-                        For example, to preserve the
-                        <filename>${PKGD}</filename> and
-                        <filename>${PKGDEST}</filename> output from the
-                        <link linkend='ref-tasks-package'><filename>do_package</filename></link>
-                        task, use the following:
-                        <literallayout class='monospaced'>
-     do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
-                        </literallayout>
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                     <filename>sstate-inputdirs</filename> and
-                     <filename>sstate-outputdirs</filename> can also be used
-                     with multiple directories.
-                     For example, the following declares
-                     <filename>PKGDESTWORK</filename> and
-                     <filename>SHLIBWORK</filename> as shared state
-                     input directories, which populates the shared state
-                     cache, and <filename>PKGDATA_DIR</filename> and
-                     <filename>SHLIBSDIR</filename> as the corresponding
-                     shared state output directories:
-                     <literallayout class='monospaced'>
-     do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
-     do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
-                     </literallayout>
-                     </para></listitem>
-                 <listitem><para>
-                     These methods also include the ability to take a lockfile
-                     when manipulating shared state directory structures,
-                     for cases where file additions or removals are sensitive:
-                     <literallayout class='monospaced'>
-     do_package[sstate-lockfile] = "${PACKAGELOCK}"
-                     </literallayout>
-                     </para></listitem>
-            </itemizedlist>
-        </para>
-
-<!--
-        <para>
-            In this example, we add some extra flags to the task, a name field ("deploy"), an
-            input directory where the task sends data, and the output
-            directory where the data from the task should eventually be copied.
-            We also add a <filename>_setscene</filename> variant of the task and add the task
-            name to the <filename>SSTATETASKS</filename> list.
-        </para>
-
-        <para>
-            If you have a directory whose contents you need to preserve, you can do this with
-            a line like the following:
-            <literallayout class='monospaced'>
-     do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
-            </literallayout>
-            This method, as well as the following example, also works for multiple directories.
-            <literallayout class='monospaced'>
-     do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
-     do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
-     do_package[sstate-lockfile] = "${PACKAGELOCK}"
-            </literallayout>
-            These methods also include the ability to take a lockfile when manipulating
-            shared state directory structures since some cases are sensitive to file
-            additions or removals.
-        </para>
--->
-
-        <para>
-            Behind the scenes, the shared state code works by looking in
-            <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> and
-            <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
-            for shared state files.
-            Here is an example:
-            <literallayout class='monospaced'>
-     SSTATE_MIRRORS ?= "\
-     file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
-     file://.* file:///some/local/dir/sstate/PATH"
-            </literallayout>
-            <note>
-                The shared state directory (<filename>SSTATE_DIR</filename>) is
-                organized into two-character subdirectories, where the subdirectory
-                names are based on the first two characters of the hash.
-                If the shared state directory structure for a mirror has the
-                same structure as <filename>SSTATE_DIR</filename>, you must
-                specify "PATH" as part of the URI to enable the build system
-                to map to the appropriate subdirectory.
-            </note>
-        </para>
-
-        <para>
-            The shared state package validity can be detected just by looking at the
-            filename since the filename contains the task checksum (or signature) as
-            described earlier in this section.
-            If a valid shared state package is found, the build process downloads it
-            and uses it to accelerate the task.
-        </para>
-
-        <para>
-            The build processes use the <filename>*_setscene</filename> tasks
-            for the task acceleration phase.
-            BitBake goes through this phase before the main execution code and tries
-            to accelerate any tasks for which it can find shared state packages.
-            If a shared state package for a task is available, the shared state
-            package is used.
-            This means the task and any tasks on which it is dependent are not
-            executed.
-        </para>
-
-        <para>
-            As a real world example, the aim is when building an IPK-based image,
-            only the
-            <link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>
-            tasks would have their
-            shared state packages fetched and extracted.
-            Since the sysroot is not used, it would never get extracted.
-            This is another reason why a task-based approach is preferred over a
-            recipe-based approach, which would have to install the output from every task.
-        </para>
-    </section>
-
-    <section id='tips-and-tricks'>
-        <title>Tips and Tricks</title>
-
-        <para>
-            The code in the build system that supports incremental builds is not
-            simple code.
-            This section presents some tips and tricks that help you work around
-            issues related to shared state code.
-        </para>
-
-        <section id='debugging'>
-            <title>Debugging</title>
-
-            <para>
-                Seeing what metadata went into creating the input signature
-                of a shared state (sstate) task can be a useful debugging aid.
-                This information is available in signature information
-                (<filename>siginfo</filename>) files in
-                <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>.
-                For information on how to view and interpret information in
-                <filename>siginfo</filename> files, see the
-                "<link linkend='usingpoky-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</link>"
-                section.
-            </para>
-        </section>
-
-        <section id='invalidating-shared-state'>
-            <title>Invalidating Shared State</title>
-
-            <para>
-                The OpenEmbedded build system uses checksums and shared state
-                cache to avoid unnecessarily rebuilding tasks.
-                Collectively, this scheme is known as "shared state code."
-            </para>
-
-            <para>
-                As with all schemes, this one has some drawbacks.
-                It is possible that you could make implicit changes to your
-                code that the checksum calculations do not take into
-                account.
-                These implicit changes affect a task's output but do not trigger
-                the shared state code into rebuilding a recipe.
-                Consider an example during which a tool changes its output.
-                Assume that the output of <filename>rpmdeps</filename> changes.
-                The result of the change should be that all the
-                <filename>package</filename> and
-                <filename>package_write_rpm</filename> shared state cache
-                items become invalid.
-                However, because the change to the output is
-                external to the code and therefore implicit,
-                the associated shared state cache items do not become
-                invalidated.
-                In this case, the build process uses the cached items rather
-                than running the task again.
-                Obviously, these types of implicit changes can cause problems.
-            </para>
-
-            <para>
-                To avoid these problems during the build, you need to
-                understand the effects of any changes you make.
-                Realize that changes you make directly to a function
-                are automatically factored into the checksum calculation.
-                Thus, these explicit changes invalidate the associated area of
-                shared state cache.
-                However, you need to be aware of any implicit changes that
-                are not obvious changes to the code and could affect the output
-                of a given task.
-            </para>
-
-            <para>
-                When you identify an implicit change, you can easily take steps
-                to invalidate the cache and force the tasks to run.
-                The steps you can take are as simple as changing a function's
-                comments in the source code.
-                For example, to invalidate package shared state files, change
-                the comment statements of
-                <link linkend='ref-tasks-package'><filename>do_package</filename></link>
-                or the comments of one of the functions it calls.
-                Even though the change is purely cosmetic, it causes the
-                checksum to be recalculated and forces the OpenEmbedded build
-                system to run the task again.
-            </para>
-
-            <note>
-                For an example of a commit that makes a cosmetic change to
-                invalidate shared state, see this
-                <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
-            </note>
-        </section>
-    </section>
-</section>
-
-<section id='automatically-added-runtime-dependencies'>
-    <title>Automatically Added Runtime Dependencies</title>
-
-    <para>
-        The OpenEmbedded build system automatically adds common types of
-        runtime dependencies between packages, which means that you do not
-        need to explicitly declare the packages using
-        <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
-        Three automatic mechanisms exist (<filename>shlibdeps</filename>,
-        <filename>pcdeps</filename>, and <filename>depchains</filename>) that
-        handle shared libraries, package configuration (pkg-config) modules,
-        and <filename>-dev</filename> and <filename>-dbg</filename> packages,
-        respectively.
-        For other types of runtime dependencies, you must manually declare
-        the dependencies.
-        <itemizedlist>
-            <listitem><para>
-                <filename>shlibdeps</filename>:
-                During the
-                <link linkend='ref-tasks-package'><filename>do_package</filename></link>
-                task of each recipe, all shared libraries installed by the
-                recipe are located.
-                For each shared library, the package that contains the shared
-                library is registered as providing the shared library.
-                More specifically, the package is registered as providing the
-                <ulink url='https://en.wikipedia.org/wiki/Soname'>soname</ulink>
-                of the library.
-                The resulting shared-library-to-package mapping
-                is saved globally in
-                <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
-                by the
-                <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
-                task.</para>
-
-                <para>Simultaneously, all executables and shared libraries
-                installed by the recipe are inspected to see what shared
-                libraries they link against.
-                For each shared library dependency that is found,
-                <filename>PKGDATA_DIR</filename> is queried to
-                see if some package (likely from a different recipe) contains
-                the shared library.
-                If such a package is found, a runtime dependency is added from
-                the package that depends on the shared library to the package
-                that contains the library.</para>
-
-                <para>The automatically added runtime dependency also includes
-                a version restriction.
-                This version restriction specifies that at least the current
-                version of the package that provides the shared library must be
-                used, as if
-                "<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)"
-                had been added to
-                <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
-                This forces an upgrade of the package containing the shared
-                library when installing the package that depends on the
-                library, if needed.</para>
-
-                <para>If you want to avoid a package being registered as
-                providing a particular shared library (e.g. because the library
-                is for internal use only), then add the library to
-                <link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link>
-                inside the package's recipe.
-                </para></listitem>
-            <listitem><para>
-                <filename>pcdeps</filename>:
-                During the
-                <link linkend='ref-tasks-package'><filename>do_package</filename></link>
-                task of each recipe, all pkg-config modules
-                (<filename>*.pc</filename> files) installed by the recipe are
-                located.
-                For each module, the package that contains the module is
-                registered as providing the module.
-                The resulting module-to-package mapping is saved globally in
-                <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
-                by the
-                <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
-                task.</para>
-
-                <para>Simultaneously, all pkg-config modules installed by the
-                recipe are inspected to see what other pkg-config modules they
-                depend on.
-                A module is seen as depending on another module if it contains
-                a "Requires:" line that specifies the other module.
-                For each module dependency,
-                <filename>PKGDATA_DIR</filename> is queried to see if some
-                package contains the module.
-                If such a package is found, a runtime dependency is added from
-                the package that depends on the module to the package that
-                contains the module.
-                <note>
-                    The <filename>pcdeps</filename> mechanism most often infers
-                    dependencies between <filename>-dev</filename> packages.
-                </note>
-                </para></listitem>
-            <listitem><para>
-                <filename>depchains</filename>:
-                If a package <filename>foo</filename> depends on a package
-                <filename>bar</filename>, then <filename>foo-dev</filename>
-                and <filename>foo-dbg</filename> are also made to depend on
-                <filename>bar-dev</filename> and <filename>bar-dbg</filename>,
-                respectively.
-                Taking the <filename>-dev</filename> packages as an example,
-                the <filename>bar-dev</filename> package might provide
-                headers and shared library symlinks needed by
-                <filename>foo-dev</filename>, which shows the need
-                for a dependency between the packages.</para>
-
-                <para>The dependencies added by <filename>depchains</filename>
-                are in the form of
-                <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>.
-                <note>
-                    By default, <filename>foo-dev</filename> also has an
-                    <filename>RDEPENDS</filename>-style dependency on
-                    <filename>foo</filename>, because the default value of
-                    <filename>RDEPENDS_${PN}-dev</filename> (set in
-                    <filename>bitbake.conf</filename>) includes
-                    "${PN}".
-                </note></para>
-
-                <para>To ensure that the dependency chain is never broken,
-                <filename>-dev</filename> and <filename>-dbg</filename>
-                packages are always generated by default, even if the packages
-                turn out to be empty.
-                See the
-                <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>
-                variable for more information.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        The <filename>do_package</filename> task depends on the
-        <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
-        task of each recipe in
-        <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
-        through use of a
-        <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename>
-        declaration, which guarantees that the required
-        shared-library/module-to-package mapping information will be available
-        when needed as long as <filename>DEPENDS</filename> has been
-        correctly set.
-    </para>
-</section>
-
-<section id='fakeroot-and-pseudo'>
-    <title>Fakeroot and Pseudo</title>
-
-    <para>
-        Some tasks are easier to implement when allowed to perform certain
-        operations that are normally reserved for the root user.
-        For example, the
-        <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-        task benefits from being able to set the UID and GID of installed files
-        to arbitrary values.
-    </para>
-
-    <para>
-        One approach to allowing tasks to perform root-only operations
-        would be to require BitBake to run as root.
-        However, this method is cumbersome and has security issues.
-        The approach that is actually used is to run tasks that benefit from
-        root privileges in a "fake" root environment.
-        Within this environment, the task and its child processes believe that
-        they are running as the root user, and see an internally consistent
-        view of the filesystem.
-        As long as generating the final output (e.g. a package or an image)
-        does not require root privileges, the fact that some earlier steps ran
-        in a fake root environment does not cause problems.
-    </para>
-
-    <para>
-        The capability to run tasks in a fake root environment is known as
-        "fakeroot", which is derived from the BitBake keyword/variable
-        flag that requests a fake root environment for a task.
-        In current versions of the OpenEmbedded build system,
-        the program that implements fakeroot is known as Pseudo.
-    </para>
-
-    <para>
-        Pseudo overrides system calls through the
-        <filename>LD_PRELOAD</filename> mechanism to give the
-        illusion of running as root.
-        To keep track of "fake" file ownership and permissions resulting from
-        operations that require root permissions, an sqlite3
-        database is used.
-        This database is stored in
-        <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/pseudo/files.db</filename>
-        for individual recipes.
-        Storing the database in a file as opposed to in memory
-        gives persistence between tasks, and even between builds.
-        <note><title>Caution</title>
-            If you add your own task that manipulates the same files or
-            directories as a fakeroot task, then that task should also run
-            under fakeroot.
-            Otherwise, the task will not be able to run root-only operations,
-            and will not see the fake file ownership and permissions set by the
-            other task.
-            You should also add a dependency on
-            <filename>virtual/fakeroot-native:do_populate_sysroot</filename>,
-            giving the following:
-            <literallayout class='monospaced'>
-       fakeroot do_mytask () {
-           ...
-       }
-       do_mytask[depends] += "virtual/fakeroot-native:do_populate_sysroot"
-            </literallayout>
-        </note>
-        For more information, see the
-        <ulink url='&YOCTO_DOCS_BB_URL;#var-FAKEROOT'><filename>FAKEROOT*</filename></ulink>
-        variables in the BitBake User Manual.
-        You can also reference this
-        <ulink url='http://www.ibm.com/developerworks/opensource/library/os-aapseudo1/index.html'>Pseudo</ulink>
-        article.
-    </para>
-</section>
-
-<section id='wic-plug-ins-interface'>
-    <title>Wic Plug-Ins Interface</title>
-
-    <para>
-        You can extend and specialize Wic functionality by using
-        Wic plug-ins.
-        This section explains the Wic plug-in interface.
-        For information on using Wic in general, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
-        section in the Yocto Project Development Tasks Manual.
-        <note>
-            Wic plug-ins consist of "source" and "imager" plug-ins.
-            Imager plug-ins are beyond the scope of this section.
-        </note>
-    </para>
-
-    <para>
-        Source plug-ins provide a mechanism to customize partition
-        content during the Wic image generation process.
-        You can use source plug-ins to map values that you specify
-        using <filename>--source</filename> commands in kickstart
-        files (i.e. <filename>*.wks</filename>) to a plug-in
-        implementation used to populate a given partition.
-        <note>
-            If you use plug-ins that have build-time dependencies
-            (e.g. native tools, bootloaders, and so forth)
-            when building a Wic image, you need to specify those
-            dependencies using the
-            <link linkend='var-WKS_FILE_DEPENDS'><filename>WKS_FILE_DEPENDS</filename></link>
-            variable.
-        </note>
-    </para>
-
-    <para>
-        Source plug-ins are subclasses defined in plug-in files.
-        As shipped, the Yocto Project provides several plug-in
-        files.
-        You can see the source plug-in files that ship with the
-        Yocto Project
-        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/scripts/lib/wic/plugins/source'>here</ulink>.
-        Each of these plug-in files contain source plug-ins that
-        are designed to populate a specific Wic image partition.
-    </para>
-
-    <para>
-        Source plug-ins are subclasses of the
-        <filename>SourcePlugin</filename> class, which is
-        defined in the
-        <filename>poky/scripts/lib/wic/pluginbase.py</filename>
-        file.
-        For example, the <filename>BootimgEFIPlugin</filename>
-        source plug-in found in the
-        <filename>bootimg-efi.py</filename> file is a subclass of
-        the <filename>SourcePlugin</filename> class, which is found
-        in the <filename>pluginbase.py</filename> file.
-    </para>
-
-    <para>
-        You can also implement source plug-ins in a layer outside
-        of the Source Repositories (external layer).
-        To do so, be sure that your plug-in files are located in
-        a directory whose path is
-        <filename>scripts/lib/wic/plugins/source/</filename>
-        within your external layer.
-        When the plug-in files are located there, the source
-        plug-ins they contain are made available to Wic.
-    </para>
-
-    <para>
-        When the Wic implementation needs to invoke a
-        partition-specific implementation, it looks for the plug-in
-        with the same name as the <filename>--source</filename>
-        parameter used in the kickstart file given to that
-        partition.
-        For example, if the partition is set up using the following
-        command in a kickstart file:
-        <literallayout class='monospaced'>
-     part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
-        </literallayout>
-        The methods defined as class members of the matching
-        source plug-in (i.e. <filename>bootimg-pcbios</filename>)
-        in the <filename>bootimg-pcbios.py</filename> plug-in file
-        are used.
-    </para>
-
-    <para>
-        To be more concrete, here is the corresponding plug-in
-        definition from the <filename>bootimg-pcbios.py</filename>
-        file for the previous command along with an example
-        method called by the Wic implementation when it needs to
-        prepare a partition using an implementation-specific
-        function:
-        <literallayout class='monospaced'>
-     bootimg-pcbios.py
-                  .
-                  .
-                  .
-        class BootimgPcbiosPlugin(SourcePlugin):
-        """
-        Create MBR boot partition and install syslinux on it.
-        """
-
-        name = 'bootimg-pcbios'
-                  .
-                  .
-                  .
-        @classmethod
-        def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
-                                 oe_builddir, bootimg_dir, kernel_dir,
-                                 rootfs_dir, native_sysroot):
-            """
-            Called to do the actual content population for a partition i.e. it
-            'prepares' the partition to be incorporated into the image.
-            In this case, prepare content for legacy bios boot partition.
-            """
-                  .
-                  .
-                  .
-        </literallayout>
-        If a subclass (plug-in) itself does not implement a
-        particular function, Wic locates and uses the default
-        version in the superclass.
-        It is for this reason that all source plug-ins are derived
-        from the <filename>SourcePlugin</filename> class.
-    </para>
-
-    <para>
-        The <filename>SourcePlugin</filename> class defined in
-        the <filename>pluginbase.py</filename> file defines
-        a set of methods that source plug-ins can implement or
-        override.
-        Any plug-ins (subclass of
-        <filename>SourcePlugin</filename>) that do not implement
-        a particular method inherit the implementation of the
-        method from the <filename>SourcePlugin</filename> class.
-        For more information, see the
-        <filename>SourcePlugin</filename> class in the
-        <filename>pluginbase.py</filename> file for details:
-    </para>
-
-    <para>
-        The following list describes the methods implemented in the
-        <filename>SourcePlugin</filename> class:
-        <itemizedlist>
-            <listitem><para>
-                <emphasis><filename>do_prepare_partition()</filename>:</emphasis>
-                Called to populate a partition with actual content.
-                In other words, the method prepares the final
-                partition image that is incorporated into the
-                disk image.
-                </para></listitem>
-            <listitem><para>
-                <emphasis><filename>do_configure_partition()</filename>:</emphasis>
-                Called before
-                <filename>do_prepare_partition()</filename> to
-                create custom configuration files for a partition
-                (e.g. syslinux or grub configuration files).
-                </para></listitem>
-            <listitem><para>
-                <emphasis><filename>do_install_disk()</filename>:</emphasis>
-                Called after all partitions have been prepared and
-                assembled into a disk image.
-                This method provides a hook to allow finalization
-                of a disk image (e.g. writing an MBR).
-                </para></listitem>
-            <listitem><para>
-                <emphasis><filename>do_stage_partition()</filename>:</emphasis>
-                Special content-staging hook called before
-                <filename>do_prepare_partition()</filename>.
-                This method is normally empty.</para>
-
-                <para>Typically, a partition just uses the passed-in
-                parameters (e.g. the unmodified value of
-                <filename>bootimg_dir</filename>).
-                However, in some cases, things might need to be
-                more tailored.
-                As an example, certain files might additionally
-                need to be taken from
-                <filename>bootimg_dir + /boot</filename>.
-                This hook allows those files to be staged in a
-                customized fashion.
-                <note>
-                    <filename>get_bitbake_var()</filename>
-                    allows you to access non-standard variables
-                    that you might want to use for this
-                    behavior.
-                </note>
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        You can extend the source plug-in mechanism.
-        To add more hooks, create more source plug-in methods
-        within <filename>SourcePlugin</filename> and the
-        corresponding derived subclasses.
-        The code that calls the plug-in methods uses the
-        <filename>plugin.get_source_plugin_methods()</filename>
-        function to find the method or methods needed by the call.
-        Retrieval of those methods is accomplished by filling up
-        a dict with keys that contain the method names of interest.
-        On success, these will be filled in with the actual
-        methods.
-        See the Wic implementation for examples and details.
-    </para>
-</section>
-
-<section id='x32'>
-    <title>x32</title>
-
-    <para>
-        x32 is a processor-specific Application Binary Interface (psABI) for x86_64.
-        An ABI defines the calling conventions between functions in a processing environment.
-        The interface determines what registers are used and what the sizes are for various C data types.
-    </para>
-
-    <para>
-        Some processing environments prefer using 32-bit applications even when running
-        on Intel 64-bit platforms.
-        Consider the i386 psABI, which is a very old 32-bit ABI for Intel 64-bit platforms.
-        The i386 psABI does not provide efficient use and access of the Intel 64-bit processor resources,
-        leaving the system underutilized.
-        Now consider the x86_64 psABI.
-        This ABI is newer and uses 64-bits for data sizes and program pointers.
-        The extra bits increase the footprint size of the programs, libraries,
-        and also increases the memory and file system size requirements.
-        Executing under the x32 psABI enables user programs to utilize CPU and system resources
-        more efficiently while keeping the memory footprint of the applications low.
-        Extra bits are used for registers but not for addressing mechanisms.
-    </para>
-
-    <section id='support'>
-        <title>Support</title>
-
-        <para>
-            This Yocto Project release supports the final specifications of x32
-            psABI.
-            Support for x32 psABI exists as follows:
-            <itemizedlist>
-                <listitem><para>You can create packages and images in x32 psABI format on x86_64 architecture targets.
-                    </para></listitem>
-                <listitem><para>You can successfully build many recipes with the x32 toolchain.</para></listitem>
-                <listitem><para>You can create and boot <filename>core-image-minimal</filename> and
-                    <filename>core-image-sato</filename> images.</para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='completing-x32'>
-        <title>Completing x32</title>
-
-        <para>
-            Future Plans for the x32 psABI in the Yocto Project include the following:
-            <itemizedlist>
-                <listitem><para>Enhance and fix the few remaining recipes so they
-                    work with and support x32 toolchains.</para></listitem>
-                <listitem><para>Enhance RPM Package Manager (RPM) support for x32 binaries.</para></listitem>
-                <listitem><para>Support larger images.</para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='using-x32-right-now'>
-        <title>Using x32 Right Now</title>
-
-        <para>
-            Follow these steps to use the x32 spABI:
-            <itemizedlist>
-                <listitem><para>Enable the x32 psABI tuning file for <filename>x86_64</filename>
-                    machines by editing the <filename>conf/local.conf</filename> like this:
-                    <literallayout class='monospaced'>
-      MACHINE = "qemux86-64"
-      DEFAULTTUNE = "x86-64-x32"
-      baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) \
-         or 'INVALID'), True) or 'lib'}"
-      #MACHINE = "genericx86"
-      #DEFAULTTUNE = "core2-64-x32"
-                    </literallayout></para></listitem>
-                <listitem><para>As usual, use BitBake to build an image that supports the x32 psABI.
-                    Here is an example:
-                    <literallayout class='monospaced'>
-     $ bitbake core-image-sato
-                    </literallayout></para></listitem>
-                <listitem><para>As usual, run your image using QEMU:
-                    <literallayout class='monospaced'>
-     $ runqemu qemux86-64 core-image-sato
-                    </literallayout></para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-</section>
-
-<section id="wayland">
-    <title>Wayland</title>
-
-    <para>
-        <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)'>Wayland</ulink>
-        is a computer display server protocol that
-        provides a method for compositing window managers to communicate
-        directly with applications and video hardware and expects them to
-        communicate with input hardware using other libraries.
-        Using Wayland with supporting targets can result in better control
-        over graphics frame rendering than an application might otherwise
-        achieve.
-    </para>
-
-    <para>
-        The Yocto Project provides the Wayland protocol libraries and the
-        reference
-        <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Weston</ulink>
-        compositor as part of its release.
-        This section describes what you need to do to implement Wayland and
-        use the compositor when building an image for a supporting target.
-    </para>
-
-    <section id="wayland-support">
-        <title>Support</title>
-
-        <para>
-            The Wayland protocol libraries and the reference Weston compositor
-            ship as integrated packages in the <filename>meta</filename> layer
-            of the
-            <link linkend='source-directory'>Source Directory</link>.
-            Specifically, you can find the recipes that build both Wayland
-            and Weston at <filename>meta/recipes-graphics/wayland</filename>.
-        </para>
-
-        <para>
-            You can build both the Wayland and Weston packages for use only
-            with targets that accept the
-            <ulink url='http://dri.freedesktop.org/wiki/'>Mesa 3D and Direct Rendering Infrastructure</ulink>,
-            which is also known as Mesa DRI.
-            This implies that you cannot build and use the packages if your
-            target uses, for example, the
-            <trademark class='registered'>Intel</trademark> Embedded Media and
-            Graphics Driver (<trademark class='registered'>Intel</trademark>
-            EMGD) that overrides Mesa DRI.
-        </para>
-
-        <note>
-            Due to lack of EGL support, Weston 1.0.3 will not run directly on
-            the emulated QEMU hardware.
-            However, this version of Weston will run under X emulation without
-            issues.
-        </note>
-    </section>
-
-    <section id="enabling-wayland-in-an-image">
-        <title>Enabling Wayland in an Image</title>
-
-        <para>
-            To enable Wayland, you need to enable it to be built and enable
-            it to be included in the image.
-        </para>
-
-        <section id="enable-building">
-            <title>Building</title>
-
-            <para>
-                To cause Mesa to build the <filename>wayland-egl</filename>
-                platform and Weston to build Wayland with Kernel Mode
-                Setting
-                (<ulink url='https://wiki.archlinux.org/index.php/Kernel_Mode_Setting'>KMS</ulink>)
-                support, include the "wayland" flag in the
-                <link linkend="var-DISTRO_FEATURES"><filename>DISTRO_FEATURES</filename></link>
-                statement in your <filename>local.conf</filename> file:
-                <literallayout class='monospaced'>
-     DISTRO_FEATURES_append = " wayland"
-                </literallayout>
-            </para>
-
-            <note>
-                If X11 has been enabled elsewhere, Weston will build Wayland
-                with X11 support
-            </note>
-        </section>
-
-        <section id="enable-installation-in-an-image">
-            <title>Installing</title>
-
-            <para>
-                To install the Wayland feature into an image, you must
-                include the following
-                <link linkend='var-CORE_IMAGE_EXTRA_INSTALL'><filename>CORE_IMAGE_EXTRA_INSTALL</filename></link>
-                statement in your <filename>local.conf</filename> file:
-                <literallayout class='monospaced'>
-     CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
-                </literallayout>
-            </para>
-        </section>
-    </section>
-
-    <section id="running-weston">
-        <title>Running Weston</title>
-
-        <para>
-            To run Weston inside X11, enabling it as described earlier and
-            building a Sato image is sufficient.
-            If you are running your image under Sato, a Weston Launcher appears
-            in the "Utility" category.
-        </para>
-
-        <para>
-            Alternatively, you can run Weston through the command-line
-            interpretor (CLI), which is better suited for development work.
-            To run Weston under the CLI, you need to do the following after
-            your image is built:
-            <orderedlist>
-                <listitem><para>Run these commands to export
-                    <filename>XDG_RUNTIME_DIR</filename>:
-                    <literallayout class='monospaced'>
-     mkdir -p /tmp/$USER-weston
-     chmod 0700 /tmp/$USER-weston
-     export XDG_RUNTIME_DIR=/tmp/$USER-weston
-                    </literallayout></para></listitem>
-                <listitem><para>Launch Weston in the shell:
-                    <literallayout class='monospaced'>
-     weston
-                    </literallayout></para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-</section>
-
-<section id="licenses">
-    <title>Licenses</title>
-
-    <para>
-        This section describes the mechanism by which the OpenEmbedded build system
-        tracks changes to licensing text.
-        The section also describes how to enable commercially licensed recipes,
-        which by default are disabled.
-    </para>
-
-    <para>
-        For information that can help you maintain compliance with various open
-        source licensing during the lifecycle of the product, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Project's Lifecycle</ulink>"
-        section in the Yocto Project Development Tasks Manual.
-    </para>
-
-    <section id="usingpoky-configuring-LIC_FILES_CHKSUM">
-        <title>Tracking License Changes</title>
-
-        <para>
-            The license of an upstream project might change in the future.
-            In order to prevent these changes going unnoticed, the
-            <filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
-            variable tracks changes to the license text. The checksums are validated at the end of the
-            configure step, and if the checksums do not match, the build will fail.
-        </para>
-
-        <section id="usingpoky-specifying-LIC_FILES_CHKSUM">
-            <title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
-
-            <para>
-                The <filename>LIC_FILES_CHKSUM</filename>
-                variable contains checksums of the license text in the source
-                code for the recipe.
-                Following is an example of how to specify
-                <filename>LIC_FILES_CHKSUM</filename>:
-                <literallayout class='monospaced'>
-     LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
-                         file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
-                         file://licfile2.txt;endline=50;md5=zzzz \
-                         ..."
-                </literallayout>
-                <note><title>Notes</title>
-                    <itemizedlist>
-                        <listitem><para>
-                            When using "beginline" and "endline", realize that
-                            line numbering begins with one and not zero.
-                            Also, the included lines are inclusive (i.e. lines
-                            five through and including 29 in the previous
-                            example for <filename>licfile1.txt</filename>).
-                            </para></listitem>
-                        <listitem><para>
-                            When a license check fails, the selected license
-                            text is included as part of the QA message.
-                            Using this output, you can determine the exact
-                            start and finish for the needed license text.
-                            </para></listitem>
-                    </itemizedlist>
-                </note>
-            </para>
-
-            <para>
-                The build system uses the
-                <filename><link linkend='var-S'>S</link></filename> variable as
-                the default directory when searching files listed in
-                <filename>LIC_FILES_CHKSUM</filename>.
-                The previous example employs the default directory.
-            </para>
-
-            <para>
-                Consider this next example:
-                <literallayout class='monospaced'>
-     LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
-                                         md5=bb14ed3c4cda583abc85401304b5cd4e"
-     LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
-                </literallayout>
-            </para>
-
-            <para>
-                The first line locates a file in
-                <filename>${S}/src/ls.c</filename> and isolates lines five
-                through 16 as license text.
-                The second line refers to a file in
-                <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
-            </para>
-            <para>
-                Note that <filename>LIC_FILES_CHKSUM</filename> variable is
-                mandatory for all recipes, unless the
-                <filename>LICENSE</filename> variable is set to "CLOSED".
-            </para>
-        </section>
-
-        <section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
-            <title>Explanation of Syntax</title>
-            <para>
-                As mentioned in the previous section, the
-                <filename>LIC_FILES_CHKSUM</filename> variable lists all the
-                important files that contain the license text for the source code.
-                It is possible to specify a checksum for an entire file, or a specific section of a
-                file (specified by beginning and ending line numbers with the "beginline" and "endline"
-                parameters, respectively).
-                The latter is useful for source files with a license notice header,
-                README documents, and so forth.
-                If you do not use the "beginline" parameter, then it is assumed that the text begins on the
-                first line of the file.
-                Similarly, if you do not use the "endline" parameter, it is assumed that the license text
-                ends with the last line of the file.
-            </para>
-
-            <para>
-                The "md5" parameter stores the md5 checksum of the license text.
-                If the license text changes in any way as compared to this parameter
-                then a mismatch occurs.
-                This mismatch triggers a build failure and notifies the developer.
-                Notification allows the developer to review and address the license text changes.
-                Also note that if a mismatch occurs during the build, the correct md5
-                checksum is placed in the build log and can be easily copied to the recipe.
-            </para>
-
-            <para>
-                There is no limit to how many files you can specify using the
-                <filename>LIC_FILES_CHKSUM</filename> variable.
-                Generally, however, every project requires a few specifications for license tracking.
-                Many projects have a "COPYING" file that stores the license information for all the source
-                code files.
-                This practice allows you to just track the "COPYING" file as long as it is kept up to date.
-            </para>
-
-            <tip>
-                If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
-                error and displays the correct "md5" parameter value during the build.
-                The correct parameter is also captured in the build log.
-            </tip>
-
-            <tip>
-                If the whole file contains only license text, you do not need to use the "beginline" and
-                "endline" parameters.
-            </tip>
-        </section>
-    </section>
-
-    <section id="enabling-commercially-licensed-recipes">
-        <title>Enabling Commercially Licensed Recipes</title>
-
-        <para>
-            By default, the OpenEmbedded build system disables
-            components that have commercial or other special licensing
-            requirements.
-            Such requirements are defined on a
-            recipe-by-recipe basis through the
-            <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
-            variable definition in the affected recipe.
-            For instance, the
-            <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
-            recipe contains the following statement:
-            <literallayout class='monospaced'>
-     LICENSE_FLAGS = "commercial"
-            </literallayout>
-            Here is a slightly more complicated example that contains both an
-            explicit recipe name and version (after variable expansion):
-            <literallayout class='monospaced'>
-     LICENSE_FLAGS = "license_${PN}_${PV}"
-            </literallayout>
-	        In order for a component restricted by a <filename>LICENSE_FLAGS</filename>
-	        definition to be enabled and included in an image, it
-	        needs to have a matching entry in the global
-	        <link linkend='var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></link>
-            variable, which is a variable
-	        typically defined in your <filename>local.conf</filename> file.
-            For example, to enable
-	        the <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
-	        package, you could add either the string
-	        "commercial_gst-plugins-ugly" or the more general string
-	        "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
-            See the
-            "<link linkend='license-flag-matching'>License Flag Matching</link>" section
-            for a full explanation of how <filename>LICENSE_FLAGS</filename> matching works.
-            Here is the example:
-            <literallayout class='monospaced'>
-     LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
-            </literallayout>
-	        Likewise, to additionally enable the package built from the recipe containing
-	        <filename>LICENSE_FLAGS = "license_${PN}_${PV}"</filename>, and assuming
-	        that the actual recipe name was <filename>emgd_1.10.bb</filename>,
-	        the following string would enable that package as well as
-	        the original <filename>gst-plugins-ugly</filename> package:
-            <literallayout class='monospaced'>
-     LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10"
-            </literallayout>
-	        As a convenience, you do not need to specify the complete license string
-	        in the whitelist for every package.
-            You can use an abbreviated form, which consists
-	        of just the first portion or portions of the license string before
-	        the initial underscore character or characters.
-            A partial string will match
-	        any license that contains the given string as the first
-	        portion of its license.
-            For example, the following
-	        whitelist string will also match both of the packages
-	        previously mentioned as well as any other packages that have
-	        licenses starting with "commercial" or "license".
-            <literallayout class='monospaced'>
-     LICENSE_FLAGS_WHITELIST = "commercial license"
-            </literallayout>
-        </para>
-
-        <section id="license-flag-matching">
-            <title>License Flag Matching</title>
-
-            <para>
-		        License flag matching allows you to control what recipes the
-                OpenEmbedded build system includes in the build.
-                Fundamentally, the build system attempts to match
-                <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
-                strings found in recipes against
-                <link linkend='var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></link>
-                strings found in the whitelist.
-                A match causes the build system to include a recipe in the
-                build, while failure to find a match causes the build system to
-                exclude a recipe.
-            </para>
-
-            <para>
-                In general, license flag matching is simple.
-                However, understanding some concepts will help you
-                correctly and effectively use matching.
-            </para>
-
-            <para>
-                Before a flag
-                defined by a particular recipe is tested against the
-                contents of the whitelist, the expanded string
-                <filename>_${PN}</filename> is appended to the flag.
-                This expansion makes each <filename>LICENSE_FLAGS</filename>
-                value recipe-specific.
-                After expansion, the string is then matched against the
-                whitelist.
-                Thus, specifying
-                <filename>LICENSE_FLAGS = "commercial"</filename>
-                in recipe "foo", for example, results in the string
-                <filename>"commercial_foo"</filename>.
-                And, to create a match, that string must appear in the
-                whitelist.
-            </para>
-
-            <para>
-                Judicious use of the <filename>LICENSE_FLAGS</filename>
-                strings and the contents of the
-                <filename>LICENSE_FLAGS_WHITELIST</filename> variable
-                allows you a lot of flexibility for including or excluding
-                recipes based on licensing.
-                For example, you can broaden the matching capabilities by
-                using license flags string subsets in the whitelist.
-                <note>When using a string subset, be sure to use the part of
-                    the expanded string that precedes the appended underscore
-                    character (e.g. <filename>usethispart_1.3</filename>,
-                    <filename>usethispart_1.4</filename>, and so forth).
-                </note>
-                For example, simply specifying the string "commercial" in
-                the whitelist matches any expanded
-                <filename>LICENSE_FLAGS</filename> definition that starts with
-                the string "commercial" such as "commercial_foo" and
-                "commercial_bar", which are the strings the build system
-                automatically generates for hypothetical recipes named
-                "foo" and "bar" assuming those recipes simply specify the
-                following:
-                <literallayout class='monospaced'>
-     LICENSE_FLAGS = "commercial"
-                </literallayout>
-                Thus, you can choose to exhaustively
-                enumerate each license flag in the whitelist and
-                allow only specific recipes into the image, or
-                you can use a string subset that causes a broader range of
-                matches to allow a range of recipes into the image.
-            </para>
-
-            <para>
-                This scheme works even if the
-                <filename>LICENSE_FLAGS</filename> string already
-                has <filename>_${PN}</filename> appended.
-                For example, the build system turns the license flag
-                "commercial_1.2_foo" into "commercial_1.2_foo_foo" and would
-                match both the general "commercial" and the specific
-                "commercial_1.2_foo" strings found in the whitelist, as
-                expected.
-            </para>
-
-            <para>
-                Here are some other scenarios:
-                <itemizedlist>
-                    <listitem><para>You can specify a versioned string in the
-                        recipe such as "commercial_foo_1.2" in a "foo" recipe.
-                        The build system expands this string to
-                        "commercial_foo_1.2_foo".
-                        Combine this license flag with a whitelist that has
-                        the string "commercial" and you match the flag along
-                        with any other flag that starts with the string
-                        "commercial".</para></listitem>
-                    <listitem><para>Under the same circumstances, you can
-                        use "commercial_foo" in the whitelist and the
-                        build system not only matches "commercial_foo_1.2" but
-                        also matches any license flag with the string
-                        "commercial_foo", regardless of the version.
-                        </para></listitem>
-                    <listitem><para>You can be very specific and use both the
-                        package and version parts in the whitelist (e.g.
-                        "commercial_foo_1.2") to specifically match a
-                        versioned recipe.</para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-
-        <section id="other-variables-related-to-commercial-licenses">
-            <title>Other Variables Related to Commercial Licenses</title>
-
-            <para>
-                Other helpful variables related to commercial
-                license handling exist and are defined in the
-                <filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
-                <literallayout class='monospaced'>
-     COMMERCIAL_AUDIO_PLUGINS ?= ""
-     COMMERCIAL_VIDEO_PLUGINS ?= ""
-                </literallayout>
-                If you want to enable these components, you can do so by making sure you have
-                statements similar to the following
-                in your <filename>local.conf</filename> configuration file:
-                <literallayout class='monospaced'>
-     COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \
-        gst-plugins-ugly-mpegaudioparse"
-     COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
-        gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
-     LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
-                </literallayout>
-                Of course, you could also create a matching whitelist
-                for those components using the more general "commercial"
-                in the whitelist, but that would also enable all the
-                other packages with
-                <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
-                containing "commercial", which you may or may not want:
-                <literallayout class='monospaced'>
-     LICENSE_FLAGS_WHITELIST = "commercial"
-                </literallayout>
-            </para>
-
-            <para>
-                Specifying audio and video plug-ins as part of the
-                <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
-                <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
-                (along with the enabling
-                <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
-                plug-ins or components into built images, thus adding
-                support for media formats or components.
-            </para>
-        </section>
-    </section>
-</section>
-</chapter>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml b/import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml
deleted file mode 100644
index 13d9ad6..0000000
--- a/import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml
+++ /dev/null
@@ -1,2091 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='usingpoky'>
-<title>Using the Yocto Project</title>
-
-    <para>
-        This chapter describes common usage for the Yocto Project.
-        The information is introductory in nature as other manuals in the Yocto Project
-        documentation set provide more details on how to use the Yocto Project.
-    </para>
-
-<section id='usingpoky-build'>
-    <title>Running a Build</title>
-
-    <para>
-        This section provides a summary of the build process and provides information
-        for less obvious aspects of the build process.
-        For general information on how to build an image using the OpenEmbedded build
-        system, see the
-        "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
-        section of the Yocto Project Quick Start.
-    </para>
-
-    <section id='build-overview'>
-        <title>Build Overview</title>
-
-        <para>
-            In the development environment you will need to build an image whenever you change hardware
-            support, add or change system libraries, or add or change services that have dependencies.
-        </para>
-
-        <mediaobject>
-            <imageobject>
-                <imagedata fileref="figures/building-an-image.png" format="PNG" align='center' scalefit='1'/>
-            </imageobject>
-            <caption>
-                <para>Building an Image</para>
-            </caption>
-        </mediaobject>
-
-        <para>
-            The first thing you need to do is set up the OpenEmbedded build
-            environment by sourcing the environment setup script
-            (i.e.
-            <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
-            Here is an example:
-            <literallayout class='monospaced'>
-     $ source &OE_INIT_FILE; [<replaceable>build_dir</replaceable>]
-            </literallayout>
-        </para>
-
-        <para>
-            The <replaceable>build_dir</replaceable> argument is optional and specifies the directory the
-            OpenEmbedded build system uses for the build -
-            the
-            <link linkend='build-directory'>Build Directory</link>.
-            If you do not specify a Build Directory, it defaults to a directory
-            named <filename>build</filename> in your current working directory.
-            A common practice is to use a different Build Directory for different targets.
-            For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
-            target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
-        </para>
-
-        <para>
-            Once the build environment is set up, you can build a target using:
-            <literallayout class='monospaced'>
-     $ bitbake <replaceable>target</replaceable>
-            </literallayout>
-            <note>
-                <para>
-                    If you experience a build error due to resources
-                    temporarily being unavailable and it appears you
-                    should not be having this issue, it might be due
-                    to the combination of a 4.3+ Linux kernel and
-                    <filename>systemd</filename> version 228+
-                    (i.e. see this
-                    <ulink url='http://unix.stackexchange.com/questions/253903/creating-threads-fails-with-resource-temporarily-unavailable-with-4-3-kernel'>link</ulink>
-                    for information).
-                </para>
-
-                <para>
-                    To work around this issue, you can try either
-                    of the following:
-                    <itemizedlist>
-                        <listitem><para>
-                            Try the build again.
-                            </para></listitem>
-                        <listitem><para>
-                            Modify the "DefaultTasksMax"
-                            <filename>systemd</filename> parameter
-                            by uncommenting it and setting it to
-                            "infinity".
-                            You can find this parameter in the
-                            <filename>system.conf</filename> file
-                            located in
-                            <filename>/etc/systemd</filename>
-                            on most systems.
-                            </para></listitem>
-                    </itemizedlist>
-                </para>
-            </note>
-        </para>
-
-        <para>
-            The <replaceable>target</replaceable> is the name of the recipe you want to build.
-            Common targets are the images in <filename>meta/recipes-core/images</filename>,
-            <filename>meta/recipes-sato/images</filename>, etc. all found in the
-            <link linkend='source-directory'>Source Directory</link>.
-            Or, the target can be the name of a recipe for a specific piece of software such as
-            BusyBox.
-            For more details about the images the OpenEmbedded build system supports, see the
-            "<link linkend="ref-images">Images</link>" chapter.
-        </para>
-
-        <note>
-            Building an image without GNU General Public License Version
-            3 (GPLv3), or similarly licensed, components is supported for
-            only minimal and base images.
-            See the "<link linkend='ref-images'>Images</link>" chapter for more information.
-        </note>
-    </section>
-
-    <section id='building-an-image-using-gpl-components'>
-        <title>Building an Image Using GPL Components</title>
-
-        <para>
-            When building an image using GPL components, you need to maintain your original
-            settings and not switch back and forth applying different versions of the GNU
-            General Public License.
-            If you rebuild using different versions of GPL, dependency errors might occur
-            due to some components not being rebuilt.
-        </para>
-    </section>
-</section>
-
-<section id='usingpoky-install'>
-    <title>Installing and Using the Result</title>
-
-    <para>
-        Once an image has been built, it often needs to be installed.
-        The images and kernels built by the OpenEmbedded build system are placed in the
-        <link linkend='build-directory'>Build Directory</link> in
-        <filename class="directory">tmp/deploy/images</filename>.
-        For information on how to run pre-built images such as <filename>qemux86</filename>
-        and <filename>qemuarm</filename>, see the
-        <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
-        manual.
-        For information about how to install these images, see the documentation for your
-        particular board or machine.
-    </para>
-</section>
-
-<section id='usingpoky-debugging-tools-and-techniques'>
-    <title>Debugging Tools and Techniques</title>
-
-    <para>
-        The exact method for debugging build failures depends on the nature of
-        the problem and on the system's area from which the bug originates.
-        Standard debugging practices such as comparison against the last
-        known working version with examination of the changes and the
-        re-application of steps to identify the one causing the problem are
-        valid for the Yocto Project just as they are for any other system.
-        Even though it is impossible to detail every possible potential failure,
-        this section provides some general tips to aid in debugging.
-    </para>
-
-    <para>
-        A useful feature for debugging is the error reporting tool.
-        Configuring the Yocto Project to use this tool causes the
-        OpenEmbedded build system to produce error reporting commands as
-        part of the console output.
-        You can enter the commands after the build completes
-        to log error information
-        into a common database, that can help you figure out what might be
-        going wrong.
-        For information on how to enable and use this feature, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>Using the Error Reporting Tool</ulink>"
-        section in the Yocto Project Development Tasks Manual.
-    </para>
-
-    <para>
-        For discussions on debugging, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>" section
-        in the Yocto Project Development Tasks Manual
-        and the
-        "<ulink url='&YOCTO_DOCS_SDK_URL;#adt-eclipse'>Working within Eclipse</ulink>"
-        section in the Yocto Project Application Development and the
-        Extensible Software Development Kit (eSDK) manual.
-    </para>
-
-    <note>
-        The remainder of this section presents many examples of the
-        <filename>bitbake</filename> command.
-        You can learn about BitBake by reading the
-        <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
-    </note>
-
-    <section id='usingpoky-debugging-viewing-logs-from-failed-tasks'>
-        <title>Viewing Logs from Failed Tasks</title>
-
-        <para>
-            You can find the log for a task in the file
-            <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/temp/log.do_</filename><replaceable>taskname</replaceable>.
-            For example, the log for the
-            <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
-            task of the QEMU minimal image for the x86 machine
-            (<filename>qemux86</filename>) might be in
-            <filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile</filename>.
-            To see the commands
-            <link linkend='bitbake-term'>BitBake</link> ran
-            to generate a log, look at the corresponding
-            <filename>run.do_</filename><replaceable>taskname</replaceable>
-            file in the same directory.
-        </para>
-
-        <para>
-            <filename>log.do_</filename><replaceable>taskname</replaceable> and
-            <filename>run.do_</filename><replaceable>taskname</replaceable>
-            are actually symbolic links to
-            <filename>log.do_</filename><replaceable>taskname</replaceable><filename>.</filename><replaceable>pid</replaceable>
-            and
-            <filename>log.run_</filename><replaceable>taskname</replaceable><filename>.</filename><replaceable>pid</replaceable>,
-            where <replaceable>pid</replaceable> is the PID the task had when
-            it ran.
-            The symlinks always point to the files corresponding to the most
-            recent run.
-        </para>
-    </section>
-
-    <section id='usingpoky-debugging-viewing-variable-values'>
-        <title>Viewing Variable Values</title>
-        <para>
-            BitBake's <filename>-e</filename> option is used to display
-            variable values after parsing.
-            The following command displays the variable values after the
-            configuration files (i.e. <filename>local.conf</filename>,
-            <filename>bblayers.conf</filename>,
-            <filename>bitbake.conf</filename> and so forth) have been
-            parsed:
-            <literallayout class='monospaced'>
-     $ bitbake -e
-            </literallayout>
-            The following command displays variable values after a specific
-            recipe has been parsed.
-            The variables include those from the configuration as well:
-            <literallayout class='monospaced'>
-     $ bitbake -e recipename
-            </literallayout>
-            <note><para>
-                Each recipe has its own private set of variables (datastore).
-                Internally, after parsing the configuration, a copy of the
-                resulting datastore is made prior to parsing each recipe.
-                This copying implies that variables set in one recipe will
-                not be visible to other recipes.</para>
-
-                <para>Likewise, each task within a recipe gets a private
-                datastore based on the recipe datastore, which means that
-                variables set within one task will not be visible to
-                other tasks.</para>
-            </note>
-        </para>
-
-        <para>
-            In the output of <filename>bitbake -e</filename>, each variable is
-            preceded by a description of how the variable got its value,
-            including temporary values that were later overriden.
-            This description also includes variable flags (varflags) set on
-            the variable.
-            The output can be very helpful during debugging.
-        </para>
-
-        <para>
-            Variables that are exported to the environment are preceded by
-            <filename>export</filename> in the output of
-            <filename>bitbake -e</filename>.
-            See the following example:
-            <literallayout class='monospaced'>
-     export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86"
-            </literallayout>
-        </para>
-
-        <para>
-            In addition to variable values, the output of the
-            <filename>bitbake -e</filename> and
-            <filename>bitbake -e</filename>&nbsp;<replaceable>recipe</replaceable>
-            commands includes the following information:
-            <itemizedlist>
-                <listitem><para>
-                    The output starts with a tree listing all configuration
-                    files and classes included globally, recursively listing
-                    the files they include or inherit in turn.
-                    Much of the behavior of the OpenEmbedded build system
-                    (including the behavior of the
-                    <link linkend='normal-recipe-build-tasks'>normal recipe build tasks</link>)
-                    is implemented in the
-                    <link linkend='ref-classes-base'><filename>base</filename></link>
-                    class and the classes it inherits, rather than being built
-                    into BitBake itself.
-                    </para></listitem>
-                <listitem><para>
-                    After the variable values, all functions appear in the
-                    output.
-                    For shell functions, variables referenced within the
-                    function body are expanded.
-                    If a function has been modified using overrides or
-                    using override-style operators like
-                    <filename>_append</filename> and
-                    <filename>_prepend</filename>, then the final assembled
-                    function body appears in the output.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='viewing-package-information-with-oe-pkgdata-util'>
-        <title>Viewing Package Information with <filename>oe-pkgdata-util</filename></title>
-
-        <para>
-            You can use the <filename>oe-pkgdata-util</filename> command-line
-            utility to query
-            <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
-            and display various package-related information.
-            When you use the utility, you must use it to view information
-            on packages that have already been built.
-        </para>
-
-        <para>
-            Following are a few of the available
-            <filename>oe-pkgdata-util</filename> subcommands.
-            <note>
-                You can use the standard * and ? globbing wildcards as part of
-                package names and paths.
-            </note>
-            <itemizedlist>
-                <listitem><para>
-                    <filename>oe-pkgdata-util list-pkgs [</filename><replaceable>pattern</replaceable><filename>]</filename>:
-                    Lists all packages that have been built, optionally
-                    limiting the match to packages that match
-                    <replaceable>pattern</replaceable>.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>oe-pkgdata-util list-pkg-files&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
-                    Lists the files and directories contained in the given
-                    packages.
-                    <note>
-                        <para>
-                        A different way to view the contents of a package is
-                        to look at the
-                        <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/packages-split</filename>
-                        directory of the recipe that generates the
-                        package.
-                        This directory is created by the
-                        <link linkend='ref-tasks-package'><filename>do_package</filename></link>
-                        task and has one subdirectory for each package the
-                        recipe generates, which contains the files stored in
-                        that package.</para>
-                        <para>
-                        If you want to inspect the
-                        <filename>${WORKDIR}/packages-split</filename>
-                        directory, make sure that
-                        <link linkend='ref-classes-rm-work'><filename>rm_work</filename></link>
-                        is not enabled when you build the recipe.
-                        </para>
-                        </note>
-                    </para></listitem>
-                <listitem><para>
-                    <filename>oe-pkgdata-util find-path&nbsp;</filename><replaceable>path</replaceable><filename>&nbsp;...</filename>:
-                    Lists the names of the packages that contain the given
-                    paths.
-                    For example, the following tells us that
-                    <filename>/usr/share/man/man1/make.1</filename>
-                    is contained in the <filename>make-doc</filename>
-                    package:
-                    <literallayout class='monospaced'>
-     $ oe-pkgdata-util find-path /usr/share/man/man1/make.1
-     make-doc: /usr/share/man/man1/make.1
-                    </literallayout>
-                    </para></listitem>
-                <listitem><para>
-                    <filename>oe-pkgdata-util lookup-recipe&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
-                    Lists the name of the recipes that
-                    produce the given packages.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-
-        <para>
-            For more information on the <filename>oe-pkgdata-util</filename>
-            command, use the help facility:
-            <literallayout class='monospaced'>
-     $ oe-pkgdata-util &dash;&dash;help
-     $ oe-pkgdata-util <replaceable>subcommand</replaceable> --help
-            </literallayout>
-        </para>
-    </section>
-
-    <section id='usingpoky-viewing-dependencies-between-recipes-and-tasks'>
-        <title>Viewing Dependencies Between Recipes and Tasks</title>
-
-        <para>
-            Sometimes it can be hard to see why BitBake wants to build other
-            recipes before the one you have specified.
-            Dependency information can help you understand why a recipe is
-            built.
-        </para>
-
-        <para>
-            To generate dependency information for a recipe, run the following
-            command:
-            <literallayout class='monospaced'>
-     $ bitbake -g <replaceable>recipename</replaceable>
-            </literallayout>
-            This command writes the following files in the current directory:
-            <itemizedlist>
-                <listitem><para>
-                    <filename>pn-buildlist</filename>: A list of
-                    recipes/targets involved in building
-                    <replaceable>recipename</replaceable>.
-                    "Involved" here means that at least one task from the
-                     recipe needs to run when building
-                    <replaceable>recipename</replaceable> from scratch.
-                    Targets that are in
-                    <link linkend='var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></link>
-                    are not listed.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>task-depends.dot</filename>: A graph showing
-                    dependencies between tasks.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-
-        <para>
-            The graphs are in
-            <ulink url='https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29'>DOT</ulink>
-            format and can be converted to images (e.g. using the
-            <filename>dot</filename> tool from
-            <ulink url='http://www.graphviz.org/'>Graphviz</ulink>).
-            <note><title>Notes</title>
-                <itemizedlist>
-                    <listitem><para>
-                        DOT files use a plain text format.
-                        The graphs generated using the
-                        <filename>bitbake -g</filename> command are often so
-                        large as to be difficult to read without special
-                        pruning (e.g. with Bitbake's
-                        <filename>-I</filename> option) and processing.
-                        Despite the form and size of the graphs, the
-                        corresponding <filename>.dot</filename> files can still
-                        be possible to read and provide useful information.
-                        </para>
-
-                        <para>As an example, the
-                        <filename>task-depends.dot</filename> file contains
-                        lines such as the following:
-                        <literallayout class='monospaced'>
-     "libxslt.do_configure" -> "libxml2.do_populate_sysroot"
-                        </literallayout>
-                        The above example line reveals that the
-                        <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
-                        task in <filename>libxslt</filename> depends on the
-                        <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
-                        task in <filename>libxml2</filename>, which is a normal
-                        <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
-                        dependency between the two recipes.
-                        </para></listitem>
-                    <listitem><para>
-                        For an example of how <filename>.dot</filename> files
-                        can be processed, see the
-                        <filename>scripts/contrib/graph-tool</filename> Python
-                        script, which finds and displays paths between graph
-                        nodes.
-                        </para></listitem>
-                </itemizedlist>
-            </note>
-        </para>
-
-        <para>
-            You can use a different method to view dependency information
-            by using the following command:
-            <literallayout class='monospaced'>
-     $ bitbake -g -u taskexp <replaceable>recipename</replaceable>
-            </literallayout>
-            This command displays a GUI window from which you can view
-            build-time and runtime dependencies for the recipes involved in
-            building <replaceable>recipename</replaceable>.
-        </para>
-    </section>
-
-    <section id='usingpoky-viewing-task-variable-dependencies'>
-        <title>Viewing Task Variable Dependencies</title>
-
-        <para>
-            As mentioned in the
-            "<ulink url='&YOCTO_DOCS_BB_URL;#checksums'>Checksums (Signatures)</ulink>"
-            section of the BitBake User Manual, BitBake tries to automatically
-            determine what variables a task depends on so that it can rerun
-            the task if any values of the variables change.
-            This determination is usually reliable.
-            However, if you do things like construct variable names at runtime,
-            then you might have to manually declare dependencies on those
-            variables using <filename>vardeps</filename> as described in the
-            "<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'>Variable Flags</ulink>"
-            section of the BitBake User Manual.
-        </para>
-
-        <para>
-            If you are unsure whether a variable dependency is being picked up
-            automatically for a given task, you can list the variable
-            dependencies BitBake has determined by doing the following:
-            <orderedlist>
-                <listitem><para>
-                    Build the recipe containing the task:
-                    <literallayout class='monospaced'>
-     $ bitbake <replaceable>recipename</replaceable>
-                    </literallayout>
-                    </para></listitem>
-                <listitem><para>
-                    Inside the
-                    <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>
-                    directory, find the signature data
-                    (<filename>sigdata</filename>) file that corresponds to the
-                    task.
-                    The <filename>sigdata</filename> files contain a pickled
-                    Python database of all the metadata that went into creating
-                    the input checksum for the task.
-                    As an example, for the
-                    <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
-                    task of the <filename>db</filename> recipe, the
-                    <filename>sigdata</filename> file might be found in the
-                    following location:
-                    <literallayout class='monospaced'>
-     ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
-                    </literallayout>
-                    For tasks that are accelerated through the shared state
-                    (<link linkend='shared-state-cache'>sstate</link>)
-                    cache, an additional <filename>siginfo</filename> file is
-                    written into
-                    <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
-                    along with the cached task output.
-                    The <filename>siginfo</filename> files contain exactly the
-                    same information as <filename>sigdata</filename> files.
-                    </para></listitem>
-                <listitem><para>
-                    Run <filename>bitbake-dumpsig</filename> on the
-                    <filename>sigdata</filename> or
-                    <filename>siginfo</filename> file.
-                    Here is an example:
-                    <literallayout class='monospaced'>
-     $ bitbake-dumpsig ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
-                    </literallayout>
-                    In the output of the above command, you will find a line
-                    like the following, which lists all the (inferred) variable
-                    dependencies for the task.
-                    This list also includes indirect dependencies from
-                    variables depending on other variables, recursively.
-                    <literallayout class='monospaced'>
-     Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
-                    </literallayout>
-                    <note>
-                        Functions (e.g. <filename>base_do_fetch</filename>)
-                        also count as variable dependencies.
-                        These functions in turn depend on the variables they
-                        reference.
-                    </note>
-                    The output of <filename>bitbake-dumpsig</filename> also includes
-                    the value each variable had, a list of dependencies for each
-                    variable, and
-                    <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHBASE_WHITELIST'><filename>BB_HASHBASE_WHITELIST</filename></ulink>
-                    information.
-                    </para></listitem>
-            </orderedlist>
-        </para>
-
-        <para>
-            There is also a <filename>bitbake-diffsigs</filename> command for
-            comparing two <filename>siginfo</filename> or
-            <filename>sigdata</filename> files.
-            This command can be helpful when trying to figure out what changed
-            between two versions of a task.
-            If you call <filename>bitbake-diffsigs</filename> with just one
-            file, the command behaves like
-            <filename>bitbake-dumpsig</filename>.
-        </para>
-
-        <para>
-            You can also use BitBake to dump out the signature construction
-            information without executing tasks by using either of the
-            following BitBake command-line options:
-            <literallayout class='monospaced'>
-     &dash;&dash;dump-signatures=<replaceable>SIGNATURE_HANDLER</replaceable>
-     -S <replaceable>SIGNATURE_HANDLER</replaceable>
-            </literallayout>
-            <note>
-                Two common values for
-                <replaceable>SIGNATURE_HANDLER</replaceable> are "none" and
-                "printdiff", which dump only the signature or compare the
-                dumped signature with the cached one, respectively.
-            </note>
-            Using BitBake with either of these options causes BitBake to dump
-            out <filename>sigdata</filename> files in the
-            <filename>stamps</filename> directory for every task it would have
-            executed instead of building the specified target package.
-        </para>
-    </section>
-
-    <section id='usingpoky-debugging-taskrunning'>
-        <title>Running Specific Tasks</title>
-
-        <para>
-            Any given recipe consists of a set of tasks.
-            The standard BitBake behavior in most cases is:
-            <filename>do_fetch</filename>,
-            <filename>do_unpack</filename>,
-            <filename>do_patch</filename>, <filename>do_configure</filename>,
-            <filename>do_compile</filename>, <filename>do_install</filename>,
-            <filename>do_package</filename>,
-            <filename>do_package_write_*</filename>, and
-            <filename>do_build</filename>.
-            The default task is <filename>do_build</filename> and any tasks
-            on which it depends build first.
-            Some tasks, such as <filename>do_devshell</filename>, are not part
-            of the default build chain.
-            If you wish to run a task that is not part of the default build
-            chain, you can use the <filename>-c</filename> option in BitBake.
-            Here is an example:
-            <literallayout class='monospaced'>
-     $ bitbake matchbox-desktop -c devshell
-            </literallayout>
-        </para>
-
-        <para>
-            The <filename>-c</filename> option respects task dependencies,
-            which means that all other tasks (including tasks from other
-            recipes) that the specified task depends on will be run before the
-            task.
-            Even when you manually specify a task to run with
-            <filename>-c</filename>, BitBake will only run the task if it
-            considers it "out of date".
-            See the
-            "<link linkend='stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</link>"
-            section for how BitBake determines whether a task is "out of date".
-        </para>
-
-        <para>
-            If you want to force an up-to-date task to be rerun (e.g.
-            because you made manual modifications to the recipe's
-            <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
-            that you want to try out), then you can use the
-            <filename>-f</filename> option.
-            <note>
-                The reason <filename>-f</filename> is never required when
-                running the
-                <link linkend='ref-tasks-devshell'><filename>do_devshell</filename></link>
-                task is because the
-                <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>nostamp</filename></ulink><filename>]</filename>
-                variable flag is already set for the task.
-            </note>
-            The following example shows one way you can use the
-            <filename>-f</filename> option:
-            <literallayout class='monospaced'>
-     $ bitbake matchbox-desktop
-               .
-               .
-     make some changes to the source code in the work directory
-               .
-               .
-     $ bitbake matchbox-desktop -c compile -f
-     $ bitbake matchbox-desktop
-            </literallayout>
-        </para>
-
-        <para>
-            This sequence first builds and then recompiles
-            <filename>matchbox-desktop</filename>.
-            The last command reruns all tasks (basically the packaging tasks)
-            after the compile.
-            BitBake recognizes that the <filename>do_compile</filename>
-            task was rerun and therefore understands that the other tasks
-            also need to be run again.
-        </para>
-
-        <para>
-            Another, shorter way to rerun a task and all
-            <link linkend='normal-recipe-build-tasks'>normal recipe build tasks</link>
-            that depend on it is to use the <filename>-C</filename>
-            option.
-            <note>
-                This option is upper-cased and is separate from the
-                <filename>-c</filename> option, which is lower-cased.
-            </note>
-            Using this option invalidates the given task and then runs the
-            <link linkend='ref-tasks-build'><filename>do_build</filename></link>
-            task, which is the default task if no task is given, and the
-            tasks on which it depends.
-            You could replace the final two commands in the previous example
-            with the following single command:
-            <literallayout class='monospaced'>
-     $ bitbake matchbox-desktop -C compile
-            </literallayout>
-            Internally, the <filename>-f</filename> and
-            <filename>-C</filename> options work by tainting (modifying) the
-            input checksum of the specified task.
-            This tainting indirectly causes the task and its
-            dependent tasks to be rerun through the normal task dependency
-            mechanisms.
-            <note>
-                BitBake explicitly keeps track of which tasks have been
-                tainted in this fashion, and will print warnings such as the
-                following for builds involving such tasks:
-                <literallayout class='monospaced'>
-     WARNING: /home/ulf/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb.do_compile is tainted from a forced run
-                </literallayout>
-                The purpose of the warning is to let you know that the work
-                directory and build output might not be in the clean state they
-                would be in for a "normal" build, depending on what actions
-                you took.
-                To get rid of such warnings, you can remove the work directory
-                and rebuild the recipe, as follows:
-                <literallayout class='monospaced'>
-     $ bitbake matchbox-desktop -c clean
-     $ bitbake matchbox-desktop
-                </literallayout>
-            </note>
-        </para>
-
-        <para>
-            You can view a list of tasks in a given package by running the
-            <filename>do_listtasks</filename> task as follows:
-            <literallayout class='monospaced'>
-     $ bitbake matchbox-desktop -c listtasks
-            </literallayout>
-            The results appear as output to the console and are also in the
-            file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
-        </para>
-    </section>
-
-    <section id='usingpoky-debugging-bitbake'>
-        <title>General BitBake Problems</title>
-
-        <para>
-            You can see debug output from BitBake by using the <filename>-D</filename> option.
-            The debug output gives more information about what BitBake
-            is doing and the reason behind it.
-            Each <filename>-D</filename> option you use increases the logging level.
-            The most common usage is <filename>-DDD</filename>.
-        </para>
-
-        <para>
-            The output from <filename>bitbake -DDD -v</filename> <replaceable>targetname</replaceable> can reveal why
-            BitBake chose a certain version of a package or why BitBake
-            picked a certain provider.
-            This command could also help you in a situation where you think BitBake did something
-            unexpected.
-        </para>
-    </section>
-
-    <section id='development-host-system-issues'>
-        <title>Development Host System Issues</title>
-
-        <para>
-            Sometimes issues on the host development system can cause your
-            build to fail.
-            Following are known, host-specific problems.
-            Be sure to always consult the
-            <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
-            for a look at all release-related issues.
-            <itemizedlist>
-                <listitem><para><emphasis><filename>glibc-initial</filename> fails to build</emphasis>:
-                    If your development host system has the unpatched
-                    <filename>GNU Make 3.82</filename>,
-                    the
-                    <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-                    task fails for <filename>glibc-initial</filename> during
-                    the build.</para>
-                    <para>Typically, every distribution that ships
-                    <filename>GNU Make 3.82</filename> as
-                    the default already has the patched version.
-                    However, some distributions, such as Debian, have
-                    <filename>GNU Make 3.82</filename> as an option, which
-                    is unpatched.
-                    You will see this error on these types of distributions.
-                    Switch to <filename>GNU Make 3.81</filename> or patch
-                    your <filename>make</filename> to solve the problem.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='usingpoky-debugging-buildfile'>
-        <title>Building with No Dependencies</title>
-        <para>
-            To build a specific recipe (<filename>.bb</filename> file),
-            you can use the following command form:
-            <literallayout class='monospaced'>
-     $ bitbake -b <replaceable>somepath</replaceable>/<replaceable>somerecipe</replaceable>.bb
-            </literallayout>
-            This command form does not check for dependencies.
-            Consequently, you should use it
-            only when you know existing dependencies have been met.
-            <note>
-                You can also specify fragments of the filename.
-                In this case, BitBake checks for a unique match.
-            </note>
-        </para>
-    </section>
-
-    <section id='recipe-logging-mechanisms'>
-        <title>Recipe Logging Mechanisms</title>
-        <para>
-            The Yocto Project provides several logging functions for producing
-            debugging output and reporting errors and warnings.
-            For Python functions, the following logging functions exist.
-            All of these functions log to
-            <filename>${T}/log.do_</filename><replaceable>task</replaceable>,
-            and can also log to standard output (stdout) with the right
-            settings:
-            <itemizedlist>
-                <listitem><para>
-                    <filename>bb.plain(</filename><replaceable>msg</replaceable><filename>)</filename>:
-                    Writes <replaceable>msg</replaceable> as is to the log while
-                    also logging to stdout.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>bb.note(</filename><replaceable>msg</replaceable><filename>)</filename>:
-                    Writes "NOTE: <replaceable>msg</replaceable>" to the log.
-                    Also logs to stdout if BitBake is called with "-v".
-                    </para></listitem>
-                <listitem><para>
-                    <filename>bb.debug(</filename><replaceable>level</replaceable><filename>,&nbsp;</filename><replaceable>msg</replaceable><filename>)</filename>:
-                    Writes "DEBUG: <replaceable>msg</replaceable>" to the log.
-                    Also logs to stdout if the log level is greater than or
-                    equal to <replaceable>level</replaceable>.
-                    See the
-                    "<ulink url='&YOCTO_DOCS_BB_URL;#usage-and-syntax'>-D</ulink>"
-                    option in the BitBake User Manual for more information.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>bb.warn(</filename><replaceable>msg</replaceable><filename>)</filename>:
-                    Writes "WARNING: <replaceable>msg</replaceable>" to the log
-                    while also logging to stdout.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>bb.error(</filename><replaceable>msg</replaceable><filename>)</filename>:
-                    Writes "ERROR: <replaceable>msg</replaceable>" to the log
-                    while also logging to stdout.
-                    <note>
-                        Calling this function does not cause the task to fail.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    <filename>bb.fatal(</filename><replaceable>msg</replaceable><filename>)</filename>:
-                    This logging function is similar to
-                    <filename>bb.error(</filename><replaceable>msg</replaceable><filename>)</filename>
-                    but also causes the calling task to fail.
-                    <note>
-                        <filename>bb.fatal()</filename> raises an exception,
-                        which means you do not need to put a "return"
-                        statement after the function.
-                    </note>
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-
-        <para>
-            The same logging functions are also available in shell functions,
-            under the names
-            <filename>bbplain</filename>, <filename>bbnote</filename>,
-            <filename>bbdebug</filename>, <filename>bbwarn</filename>,
-            <filename>bberror</filename>, and <filename>bbfatal</filename>.
-            The
-            <link linkend='ref-classes-logging'><filename>logging</filename></link>
-            class implements these functions.
-            See that class in the
-            <filename>meta/classes</filename> folder of the
-            <link linkend='source-directory'>Source Directory</link>
-            for information.
-        </para>
-
-        <section id='logging-with-python'>
-            <title>Logging With Python</title>
-            <para>
-                When creating recipes using Python and inserting code that handles build logs,
-                keep in mind the goal is to have informative logs while keeping the console as
-                "silent" as possible.
-                Also, if you want status messages in the log, use the "debug" loglevel.
-            </para>
-
-            <para>
-                Following is an example written in Python.
-                The code handles logging for a function that determines the
-                number of tasks needed to be run.
-                See the
-                "<link linkend='ref-tasks-listtasks'><filename>do_listtasks</filename></link>"
-                section for additional information:
-                <literallayout class='monospaced'>
-     python do_listtasks() {
-         bb.debug(2, "Starting to figure out the task list")
-         if noteworthy_condition:
-             bb.note("There are 47 tasks to run")
-         bb.debug(2, "Got to point xyz")
-         if warning_trigger:
-             bb.warn("Detected warning_trigger, this might be a problem later.")
-         if recoverable_error:
-             bb.error("Hit recoverable_error, you really need to fix this!")
-         if fatal_error:
-             bb.fatal("fatal_error detected, unable to print the task list")
-         bb.plain("The tasks present are abc")
-         bb.debug(2, "Finished figuring out the tasklist")
-     }
-                </literallayout>
-            </para>
-        </section>
-
-        <section id='logging-with-bash'>
-            <title>Logging With Bash</title>
-            <para>
-                When creating recipes using Bash and inserting code that handles build
-                logs, you have the same goals - informative with minimal console output.
-                The syntax you use for recipes written in Bash is similar to that of
-                recipes written in Python described in the previous section.
-            </para>
-
-            <para>
-                Following is an example written in Bash.
-                The code logs the progress of the <filename>do_my_function</filename> function.
-                <literallayout class='monospaced'>
-     do_my_function() {
-         bbdebug 2 "Running do_my_function"
-         if [ exceptional_condition ]; then
-             bbnote "Hit exceptional_condition"
-         fi
-         bbdebug 2  "Got to point xyz"
-         if [ warning_trigger ]; then
-             bbwarn "Detected warning_trigger, this might cause a problem later."
-         fi
-         if [ recoverable_error ]; then
-             bberror "Hit recoverable_error, correcting"
-         fi
-         if [ fatal_error ]; then
-             bbfatal "fatal_error detected"
-         fi
-         bbdebug 2 "Completed do_my_function"
-     }
-                </literallayout>
-            </para>
-        </section>
-    </section>
-
-    <section id='usingpoky-debugging-others'>
-        <title>Other Tips</title>
-
-        <para>
-            Here are some other tips that you might find useful:
-            <itemizedlist>
-                <listitem><para>
-                    When adding new packages, it is worth watching for
-                    undesirable items making their way into compiler command
-                    lines.
-                    For example, you do not want references to local system
-                    files like
-                    <filename>/usr/lib/</filename> or
-                    <filename>/usr/include/</filename>.
-                    </para></listitem>
-                <listitem><para>
-                    If you want to remove the <filename>psplash</filename>
-                    boot splashscreen,
-                    add <filename>psplash=false</filename> to  the kernel
-                    command line.
-                    Doing so prevents <filename>psplash</filename> from loading
-                    and thus allows you to see the console.
-                    It is also possible to switch out of the splashscreen by
-                    switching the virtual console (e.g. Fn+Left or Fn+Right
-                    on a Zaurus).
-                    </para></listitem>
-                <listitem><para>
-                    Removing
-                    <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
-                    (usually <filename>tmp/</filename>, within the
-                    <link linkend='build-directory'>Build Directory</link>)
-                    can often fix temporary build issues.
-                    Removing <filename>TMPDIR</filename> is usually a
-                    relatively cheap operation, because task output will be
-                    cached in
-                    <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
-                    (usually <filename>sstate-cache/</filename>, which is
-                    also in the Build Directory).
-                    <note>
-                        Removing <filename>TMPDIR</filename> might be a
-                        workaround rather than a fix.
-                        Consequently, trying to determine the underlying cause
-                        of an issue before removing the directory is a good
-                        idea.
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    Understanding how a feature is used in practice within
-                    existing recipes can be very helpful.
-                    It is recommended that you configure some method that
-                    allows you to quickly search through files.</para>
-
-                    <para>Using GNU Grep, you can use the following shell
-                    function to recursively search through common
-                    recipe-related files, skipping binary files,
-                    <filename>.git</filename> directories, and the
-                    Build Directory (assuming its name starts with
-                    "build"):
-                    <literallayout class='monospaced'>
-     g() {
-         grep -Ir \
-              --exclude-dir=.git \
-              --exclude-dir='build*' \
-              --include='*.bb*' \
-              --include='*.inc*' \
-              --include='*.conf*' \
-              --include='*.py*' \
-              "$@"
-     }
-                    </literallayout>
-                    Following are some usage examples:
-                    <literallayout class='monospaced'>
-     $ g FOO    # Search recursively for "FOO"
-     $ g -i foo # Search recursively for "foo", ignoring case
-     $ g -w FOO # Search recursively for "FOO" as a word, ignoring e.g. "FOOBAR"
-                    </literallayout>
-                    If figuring out how some feature works requires a lot of
-                    searching, it might indicate that the documentation should
-                    be extended or improved.
-                    In such cases, consider filing a documentation bug using
-                    the Yocto Project implementation of
-                    <ulink url='https://bugzilla.yoctoproject.org/'>Bugzilla</ulink>.
-                    For general information on how to submit a bug against
-                    the Yocto Project, see the Yocto Project Bugzilla
-                    <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>wiki page</ulink>"
-                    or the
-                    <ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</ulink>"
-                    section, which is in the Yocto Project Development Tasks
-                    Manual.
-                    <note>
-                        The manuals might not be the right place to document
-                        variables that are purely internal and have a limited
-                        scope (e.g. internal variables used to implement a
-                        single <filename>.bbclass</filename> file).
-                    </note>
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-</section>
-
-<section id='ref-quick-emulator-qemu'>
-    <title>Quick EMUlator (QEMU)</title>
-
-    <para>
-        The Yocto Project uses an implementation of the Quick EMUlator (QEMU)
-        Open Source project as part of the Yocto Project development "tool
-        set".
-    </para>
-
-    <para>
-        Within the context of the Yocto Project, QEMU is an
-        emulator and virtualization machine that allows you to run a complete
-        image you have built using the Yocto Project as just another task
-        on your build system.
-        QEMU is useful for running and testing images and applications on
-        supported Yocto Project architectures without having actual hardware.
-        Among other things, the Yocto Project uses QEMU to run automated
-        Quality Assurance (QA) tests on final images shipped with each
-        release.
-        <note>
-            This implementation is not the same as QEMU in general.
-        </note>
-        This section provides a brief reference for the Yocto Project
-        implementation of QEMU.
-    </para>
-
-    <para>
-        For official information and documentation on QEMU in general, see the
-        following references:
-        <itemizedlist>
-            <listitem><para>
-                <emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
-                The official website for the QEMU Open Source project.
-                </para></listitem>
-            <listitem><para>
-                <emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
-                The QEMU user manual.
-                </para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        For information on how to use the Yocto Project implementation of
-        QEMU, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
-        chapter in the Yocto Project Development Tasks Manual.
-    </para>
-
-    <section id='qemu-availability'>
-        <title>QEMU Availability</title>
-
-        <para>
-            QEMU is made available with the Yocto Project a number of ways.
-            One method is to install a Software Development Kit (SDK).
-            For more information on how to make sure you have
-            QEMU available, see
-            "<ulink url='&YOCTO_DOCS_SDK_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
-            section in the Yocto Project Application Development and the
-            Extensible Software Development Kit (eSDK) manual.
-        </para>
-    </section>
-
-    <section id='qemu-performance'>
-        <title>QEMU Performance</title>
-
-        <para>
-            Using QEMU to emulate your hardware can result in speed issues
-            depending on the target and host architecture mix.
-            For example, using the <filename>qemux86</filename> image in the
-            emulator on an Intel-based 32-bit (x86) host machine is fast
-            because the target and host architectures match.
-            On the other hand, using the <filename>qemuarm</filename> image
-            on the same Intel-based host can be slower.
-            But, you still achieve faithful emulation of ARM-specific issues.
-        </para>
-
-        <para>
-            To speed things up, the QEMU images support using
-            <filename>distcc</filename> to call a cross-compiler outside the
-            emulated system.
-            If you used <filename>runqemu</filename> to start QEMU, and the
-            <filename>distccd</filename> application is present on the host
-            system, any BitBake cross-compiling toolchain available from the
-            build system is automatically used from within QEMU simply by
-            calling <filename>distcc</filename>.
-            You can accomplish this by defining the cross-compiler variable
-            (e.g. <filename>export CC="distcc"</filename>).
-            Alternatively, if you are using a suitable SDK image or the
-            appropriate stand-alone toolchain is present, the toolchain is
-            also automatically used.
-        </para>
-
-        <note>
-            Several mechanisms exist that let you connect to the system
-            running on the QEMU emulator:
-            <itemizedlist>
-                <listitem><para>
-                    QEMU provides a framebuffer interface that makes standard
-                    consoles available.
-                    </para></listitem>
-                <listitem><para>
-                    Generally, headless embedded devices have a serial port.
-                    If so, you can configure the operating system of the
-                    running image to use that port to run a console.
-                    The connection uses standard IP networking.
-                    </para></listitem>
-                <listitem><para>
-                    SSH servers exist in some QEMU images.
-                    The <filename>core-image-sato</filename> QEMU image has a
-                    Dropbear secure shell (SSH) server that runs with the root
-                    password disabled.
-                    The <filename>core-image-full-cmdline</filename> and
-                    <filename>core-image-lsb</filename> QEMU images
-                    have OpenSSH instead of Dropbear.
-                    Including these SSH servers allow you to use standard
-                    <filename>ssh</filename> and <filename>scp</filename>
-                    commands.
-                    The <filename>core-image-minimal</filename> QEMU image,
-                    however, contains no SSH server.
-                    </para></listitem>
-                <listitem><para>
-                    You can use a provided, user-space NFS server to boot
-                    the QEMU session using a local copy of the root
-                    filesystem on the host.
-                    In order to make this connection, you must extract a
-                    root filesystem tarball by using the
-                    <filename>runqemu-extract-sdk</filename> command.
-                    After running the command, you must then point the
-                    <filename>runqemu</filename>
-                    script to the extracted directory instead of a root
-                    filesystem image file.
-                    See the
-                    "<ulink url='&YOCTO_DOCS_DEV_URL;#qemu-running-under-a-network-file-system-nfs-server'>Running Under a Network File System (NFS) Server</ulink>"
-                    section in the Yocto Project Development Tasks Manual for
-                    more information.
-                    </para></listitem>
-            </itemizedlist>
-        </note>
-    </section>
-
-    <section id='qemu-command-line-syntax'>
-        <title>QEMU Command-Line Syntax</title>
-
-        <para>
-            The basic <filename>runqemu</filename> command syntax is as
-            follows:
-            <literallayout class='monospaced'>
-     $ runqemu [<replaceable>option</replaceable> ]  [...]
-            </literallayout>
-            Based on what you provide on the command line,
-            <filename>runqemu</filename> does a good job of figuring out what
-            you are trying to do.
-            For example, by default, QEMU looks for the most recently built
-            image according to the timestamp when it needs to look for an
-            image.
-            Minimally, through the use of options, you must provide either
-            a machine name, a virtual machine image
-            (<filename>*wic.vmdk</filename>), or a kernel image
-            (<filename>*.bin</filename>).
-        </para>
-
-        <para>
-            Following is the command-line help output for the
-            <filename>runqemu</filename> command:
-            <literallayout class='monospaced'>
-     $ runqemu --help
-
-     Usage: you can run this script with any valid combination
-     of the following environment variables (in any order):
-       KERNEL - the kernel image file to use
-       ROOTFS - the rootfs image file or nfsroot directory to use
-       MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
-       Simplified QEMU command-line options can be passed with:
-         nographic - disable video console
-         serial - enable a serial console on /dev/ttyS0
-         slirp - enable user networking, no root privileges is required
-         kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
-         kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
-         publicvnc - enable a VNC server open to all hosts
-         audio - enable audio
-         [*/]ovmf* - OVMF firmware file or base name for booting with UEFI
-       tcpserial=&lt;port&gt; - specify tcp serial port number
-       biosdir=&lt;dir&gt; - specify custom bios dir
-       biosfilename=&lt;filename&gt; - specify bios filename
-       qemuparams=&lt;xyz&gt; - specify custom parameters to QEMU
-       bootparams=&lt;xyz&gt; - specify custom kernel parameters during boot
-       help, -h, --help: print this text
-
-     Examples:
-       runqemu
-       runqemu qemuarm
-       runqemu tmp/deploy/images/qemuarm
-       runqemu tmp/deploy/images/qemux86/&lt;qemuboot.conf&gt;
-       runqemu qemux86-64 core-image-sato ext4
-       runqemu qemux86-64 wic-image-minimal wic
-       runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
-       runqemu qemux86 iso/hddimg/wic.vmdk/wic.qcow2/wic.vdi/ramfs/cpio.gz...
-       runqemu qemux86 qemuparams="-m 256"
-       runqemu qemux86 bootparams="psplash=false"
-       runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic
-       runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic.vmdk
-            </literallayout>
-        </para>
-    </section>
-
-    <section id='runqemu-command-line-options'>
-        <title><filename>runqemu</filename> Command-Line Options</title>
-
-        <para>
-            Following is a description of <filename>runqemu</filename>
-            options you can provide on the command line:
-            <note><title>Tip</title>
-                If you do provide some "illegal" option combination or perhaps
-                you do not provide enough in the way of options,
-                <filename>runqemu</filename> provides appropriate error
-                messaging to help you correct the problem.
-            </note>
-            <itemizedlist>
-                <listitem><para>
-                    <replaceable>QEMUARCH</replaceable>:
-                    The QEMU machine architecture, which must be "qemuarm",
-                    "qemuarm64", "qemumips", "qemumips64", "qemuppc",
-                    "qemux86", or "qemux86-64".
-                    </para></listitem>
-                <listitem><para>
-                    <filename><replaceable>VM</replaceable></filename>:
-                    The virtual machine image, which must be a
-                    <filename>.wic.vmdk</filename> file.
-                    Use this option when you want to boot a
-                    <filename>.wic.vmdk</filename> image.
-                    The image filename you provide must contain one of the
-                    following strings: "qemux86-64", "qemux86", "qemuarm",
-                    "qemumips64", "qemumips", "qemuppc", or "qemush4".
-                    </para></listitem>
-                <listitem><para>
-                    <replaceable>ROOTFS</replaceable>:
-                    A root filesystem that has one of the following
-                    filetype extensions: "ext2", "ext3", "ext4", "jffs2",
-                    "nfs", or "btrfs".
-                    If the filename you provide for this option uses “nfs”, it
-                    must provide an explicit root filesystem path.
-                    </para></listitem>
-                <listitem><para>
-                    <replaceable>KERNEL</replaceable>:
-                    A kernel image, which is a <filename>.bin</filename> file.
-                    When you provide a <filename>.bin</filename> file,
-                    <filename>runqemu</filename> detects it and assumes the
-                    file is a kernel image.
-                    </para></listitem>
-                <listitem><para>
-                    <replaceable>MACHINE</replaceable>:
-                    The architecture of the QEMU machine, which must be one
-                    of the following: "qemux86", "qemux86-64", "qemuarm",
-                    "qemuarm64", "qemumips", “qemumips64", or "qemuppc".
-                    The <replaceable>MACHINE</replaceable> and
-                    <replaceable>QEMUARCH</replaceable> options are basically
-                    identical.
-                    If you do not provide a <replaceable>MACHINE</replaceable>
-                    option, <filename>runqemu</filename> tries to determine
-                    it based on other options.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>ramfs</filename>:
-                    Indicates you are booting an initial RAM disk (initramfs)
-                    image, which means the <filename>FSTYPE</filename> is
-                    <filename>cpio.gz</filename>.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>iso</filename>:
-                    Indicates you are booting an ISO image, which means the
-                    <filename>FSTYPE</filename> is
-                    <filename>.iso</filename>.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>nographic</filename>:
-                    Disables the video console, which sets the console to
-                    "ttys0".
-                    </para></listitem>
-                <listitem><para>
-                    <filename>serial</filename>:
-                    Enables a serial console on
-                    <filename>/dev/ttyS0</filename>.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>biosdir</filename>:
-                    Establishes a custom directory for BIOS, VGA BIOS and
-                    keymaps.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>biosfilename</filename>:
-                    Establishes a custom BIOS name.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
-                    Specifies custom QEMU parameters.
-                    Use this option to pass options other than the simple
-                    "kvm" and "serial" options.
-                    </para></listitem>
-                <listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
-                    Specifies custom boot parameters for the kernel.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>audio</filename>:
-                    Enables audio in QEMU.
-                    The <replaceable>MACHINE</replaceable> option must be
-                    either "qemux86" or "qemux86-64" in order for audio to be
-                    enabled.
-                    Additionally, the <filename>snd_intel8x0</filename>
-                    or <filename>snd_ens1370</filename> driver must be
-                    installed in linux guest.
-                    </para></listitem>
-                <listitem><para>
-                    <filename>slirp</filename>:
-                    Enables "slirp" networking, which is a different way
-                    of networking that does not need root access
-                    but also is not as easy to use or comprehensive
-                    as the default.
-                    </para></listitem>
-                <listitem><para id='kvm-cond'>
-                    <filename>kvm</filename>:
-                    Enables KVM when running "qemux86" or "qemux86-64"
-                    QEMU architectures.
-                    For KVM to work, all the following conditions must be met:
-                    <itemizedlist>
-                        <listitem><para>
-                            Your <replaceable>MACHINE</replaceable> must be either
-qemux86" or "qemux86-64".
-                            </para></listitem>
-                        <listitem><para>
-                            Your build host has to have the KVM modules
-                            installed, which are
-                            <filename>/dev/kvm</filename>.
-                            </para></listitem>
-                        <listitem><para>
-                            The  build host <filename>/dev/kvm</filename>
-                            directory has to be both writable and readable.
-                            </para></listitem>
-                    </itemizedlist>
-                    </para></listitem>
-                <listitem><para>
-                    <filename>kvm-vhost</filename>:
-                    Enables KVM with VHOST support when running "qemux86"
-                    or "qemux86-64" QEMU architectures.
-                    For KVM with VHOST to work, the following conditions must
-                    be met:
-                    <itemizedlist>
-                        <listitem><para>
-                            <link linkend='kvm-cond'>kvm</link> option
-                            conditions must be met.
-                            </para></listitem>
-                        <listitem><para>
-                            Your build host has to have virtio net device, which
-                            are <filename>/dev/vhost-net</filename>.
-                            </para></listitem>
-                        <listitem><para>
-                            The build host <filename>/dev/vhost-net</filename>
-                            directory has to be either readable or writable
-                            and “slirp-enabled”.
-                            </para></listitem>
-                    </itemizedlist>
-                    </para></listitem>
-                <listitem><para>
-                    <filename>publicvnc</filename>:
-                    Enables a VNC server open to all hosts.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-</section>
-
-<section id='maintaining-build-output-quality'>
-    <title>Maintaining Build Output Quality</title>
-
-    <para>
-        Many factors can influence the quality of a build.
-        For example, if you upgrade a recipe to use a new version of an upstream software
-        package or you experiment with some new configuration options, subtle changes
-        can occur that you might not detect until later.
-        Consider the case where your recipe is using a newer version of an upstream package.
-        In this case, a new version of a piece of software might introduce an optional
-        dependency on another library, which is auto-detected.
-        If that library has already been built when the software is building,
-        the software will link to the built library and that library will be pulled
-        into your image along with the new software even if you did not want the
-        library.
-    </para>
-
-    <para>
-        The
-        <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
-        class exists to help you maintain
-        the quality of your build output.
-        You can use the class to highlight unexpected and possibly unwanted
-        changes in the build output.
-        When you enable build history, it records information about the contents of
-        each package and image and then commits that information to a local Git
-        repository where you can examine the information.
-    </para>
-
-    <para>
-        The remainder of this section describes the following:
-        <itemizedlist>
-           <listitem><para>How you can enable and disable
-               build history</para></listitem>
-           <listitem><para>How to understand what the build history contains
-               </para></listitem>
-           <listitem><para>How to limit the information used for build history
-               </para></listitem>
-           <listitem><para>How to examine the build history from both a
-               command-line and web interface</para></listitem>
-       </itemizedlist>
-    </para>
-
-    <section id='enabling-and-disabling-build-history'>
-        <title>Enabling and Disabling Build History</title>
-
-        <para>
-            Build history is disabled by default.
-            To enable it, add the following <filename>INHERIT</filename>
-            statement and set the
-            <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
-            variable to "1" at the end of your
-            <filename>conf/local.conf</filename> file found in the
-            <link linkend='build-directory'>Build Directory</link>:
-            <literallayout class='monospaced'>
-     INHERIT += "buildhistory"
-     BUILDHISTORY_COMMIT = "1"
-            </literallayout>
-            Enabling build history as previously described causes the
-            OpenEmbedded build system to collect build output information and
-            commit it as a single commit to a local
-            <link linkend='git'>Git</link> repository.
-            <note>
-                Enabling build history increases your build times slightly,
-                particularly for images, and increases the amount of disk
-                space used during the build.
-            </note>
-        </para>
-
-        <para>
-            You can disable build history by removing the previous statements
-            from your <filename>conf/local.conf</filename> file.
-        </para>
-    </section>
-
-    <section id='understanding-what-the-build-history-contains'>
-        <title>Understanding What the Build History Contains</title>
-
-        <para>
-            Build history information is kept in
-            <filename>${</filename><link linkend='var-TOPDIR'><filename>TOPDIR</filename></link><filename>}/buildhistory</filename>
-            in the Build Directory as defined by the
-            <link linkend='var-BUILDHISTORY_DIR'><filename>BUILDHISTORY_DIR</filename></link>
-            variable.
-            The following is an example abbreviated listing:
-            <imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
-        </para>
-
-        <para>
-            At the top level, there is a <filename>metadata-revs</filename> file
-            that lists the revisions of the repositories for the layers enabled
-            when the build was produced.
-            The rest of the data splits into separate
-            <filename>packages</filename>, <filename>images</filename> and
-            <filename>sdk</filename> directories, the contents of which are
-            described below.
-        </para>
-
-        <section id='build-history-package-information'>
-            <title>Build History Package Information</title>
-
-            <para>
-                The history for each package contains a text file that has
-                name-value pairs with information about the package.
-                For example, <filename>buildhistory/packages/i586-poky-linux/busybox/busybox/latest</filename>
-                contains the following:
-                <literallayout class='monospaced'>
-     PV = 1.22.1
-     PR = r32
-     RPROVIDES =
-     RDEPENDS = glibc (>= 2.20) update-alternatives-opkg
-     RRECOMMENDS = busybox-syslog busybox-udhcpc update-rc.d
-     PKGSIZE = 540168
-     FILES = /usr/bin/* /usr/sbin/* /usr/lib/busybox/* /usr/lib/lib*.so.* \
-        /etc /com /var /bin/* /sbin/* /lib/*.so.* /lib/udev/rules.d \
-        /usr/lib/udev/rules.d /usr/share/busybox /usr/lib/busybox/* \
-        /usr/share/pixmaps /usr/share/applications /usr/share/idl \
-        /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
-     FILELIST = /bin/busybox /bin/busybox.nosuid /bin/busybox.suid /bin/sh \
-        /etc/busybox.links.nosuid /etc/busybox.links.suid
-                </literallayout>
-                Most of these name-value pairs correspond to variables used
-                to produce the package.
-                The exceptions are <filename>FILELIST</filename>, which is the
-                actual list of files in the package, and
-                <filename>PKGSIZE</filename>, which is the total size of files
-                in the package in bytes.
-            </para>
-
-            <para>
-                There is also a file corresponding to the recipe from which the
-                package came (e.g.
-                <filename>buildhistory/packages/i586-poky-linux/busybox/latest</filename>):
-                <literallayout class='monospaced'>
-     PV = 1.22.1
-     PR = r32
-     DEPENDS = initscripts kern-tools-native update-rc.d-native \
-        virtual/i586-poky-linux-compilerlibs virtual/i586-poky-linux-gcc \
-        virtual/libc virtual/update-alternatives
-     PACKAGES = busybox-ptest busybox-httpd busybox-udhcpd busybox-udhcpc \
-        busybox-syslog busybox-mdev busybox-hwclock busybox-dbg \
-        busybox-staticdev busybox-dev busybox-doc busybox-locale busybox
-                </literallayout>
-            </para>
-
-            <para>
-                Finally, for those recipes fetched from a version control
-                system (e.g., Git), a file exists that lists source revisions
-                that are specified in the recipe and lists the actual revisions
-                used during the build.
-                Listed and actual revisions might differ when
-                <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
-                is set to
-                <filename>${<link linkend='var-AUTOREV'>AUTOREV</link>}</filename>.
-                Here is an example assuming
-                <filename>buildhistory/packages/qemux86-poky-linux/linux-yocto/latest_srcrev</filename>):
-                <literallayout class='monospaced'>
-     # SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
-     SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
-     # SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
-     SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
-                </literallayout>
-                You can use the <filename>buildhistory-collect-srcrevs</filename>
-                command with the <filename>-a</filename> option to
-                collect the stored <filename>SRCREV</filename> values
-                from build history and report them in a format suitable for
-                use in global configuration (e.g.,
-                <filename>local.conf</filename> or a distro include file) to
-                override floating <filename>AUTOREV</filename> values to a
-                fixed set of revisions.
-                Here is some example output from this command:
-                <literallayout class='monospaced'>
-     $ buildhistory-collect-srcrevs -a
-     # i586-poky-linux
-     SRCREV_pn-glibc = "b8079dd0d360648e4e8de48656c5c38972621072"
-     SRCREV_pn-glibc-initial = "b8079dd0d360648e4e8de48656c5c38972621072"
-     SRCREV_pn-opkg-utils = "53274f087565fd45d8452c5367997ba6a682a37a"
-     SRCREV_pn-kmod = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
-     # x86_64-linux
-     SRCREV_pn-gtk-doc-stub-native = "1dea266593edb766d6d898c79451ef193eb17cfa"
-     SRCREV_pn-dtc-native = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf"
-     SRCREV_pn-update-rc.d-native = "eca680ddf28d024954895f59a241a622dd575c11"
-     SRCREV_glibc_pn-cross-localedef-native = "b8079dd0d360648e4e8de48656c5c38972621072"
-     SRCREV_localedef_pn-cross-localedef-native = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
-     SRCREV_pn-prelink-native = "faa069deec99bf61418d0bab831c83d7c1b797ca"
-     SRCREV_pn-opkg-utils-native = "53274f087565fd45d8452c5367997ba6a682a37a"
-     SRCREV_pn-kern-tools-native = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff"
-     SRCREV_pn-kmod-native = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
-     # qemux86-poky-linux
-     SRCREV_machine_pn-linux-yocto = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
-     SRCREV_meta_pn-linux-yocto = "a227f20eff056e511d504b2e490f3774ab260d6f"
-     # all-poky-linux
-     SRCREV_pn-update-rc.d = "eca680ddf28d024954895f59a241a622dd575c11"
-                </literallayout>
-                <note>
-                    Here are some notes on using the
-                    <filename>buildhistory-collect-srcrevs</filename> command:
-                    <itemizedlist>
-                        <listitem><para>By default, only values where the
-                            <filename>SRCREV</filename> was
-                            not hardcoded (usually when <filename>AUTOREV</filename>
-                            was used) are reported.
-                            Use the <filename>-a</filename> option to see all
-                            <filename>SRCREV</filename> values.
-                            </para></listitem>
-                        <listitem><para>The output statements might not have any effect
-                            if overrides are applied elsewhere in the build system
-                            configuration.
-                            Use the <filename>-f</filename> option to add the
-                            <filename>forcevariable</filename> override to each output line
-                            if you need to work around this restriction.
-                            </para></listitem>
-                        <listitem><para>The script does apply special handling when
-                            building for multiple machines.
-                            However, the script does place a
-                            comment before each set of values that specifies
-                            which triplet to which they belong as shown above
-                            (e.g., <filename>i586-poky-linux</filename>).
-                            </para></listitem>
-                    </itemizedlist>
-                </note>
-            </para>
-        </section>
-
-        <section id='build-history-image-information'>
-            <title>Build History Image Information</title>
-
-            <para>
-                The files produced for each image are as follows:
-                <itemizedlist>
-                    <listitem><para><filename>image-files:</filename>
-                        A directory containing selected files from the root
-                        filesystem.
-                        The files are defined by
-                        <link linkend='var-BUILDHISTORY_IMAGE_FILES'><filename>BUILDHISTORY_IMAGE_FILES</filename></link>.
-                        </para></listitem>
-                    <listitem><para><filename>build-id.txt:</filename>
-                        Human-readable information about the build configuration
-                        and metadata source revisions.
-                        This file contains the full build header as printed
-                        by BitBake.</para></listitem>
-                    <listitem><para><filename>*.dot:</filename>
-                        Dependency graphs for the image that are
-                        compatible with <filename>graphviz</filename>.
-                        </para></listitem>
-                    <listitem><para><filename>files-in-image.txt:</filename>
- 	                    A list of files in the image with permissions,
-                        owner, group, size, and symlink information.
-                        </para></listitem>
-                    <listitem><para><filename>image-info.txt:</filename>
-                        A text file containing name-value pairs with information
-                        about the image.
-                        See the following listing example for more information.
-                        </para></listitem>
-                    <listitem><para><filename>installed-package-names.txt:</filename>
-                        A list of installed packages by name only.</para></listitem>
-                    <listitem><para><filename>installed-package-sizes.txt:</filename>
-                        A list of installed packages ordered by size.
-                        </para></listitem>
-                    <listitem><para><filename>installed-packages.txt:</filename>
-                        A list of installed packages with full package
-                        filenames.</para></listitem>
-                </itemizedlist>
-                <note>
-                    Installed package information is able to be gathered and
-                    produced even if package management is disabled for the final
-                    image.
-                </note>
-            </para>
-
-            <para>
-                Here is an example of <filename>image-info.txt</filename>:
-                <literallayout class='monospaced'>
-     DISTRO = poky
-     DISTRO_VERSION = 1.7
-     USER_CLASSES = buildstats image-mklibs image-prelink
-     IMAGE_CLASSES = image_types
-     IMAGE_FEATURES = debug-tweaks
-     IMAGE_LINGUAS =
-     IMAGE_INSTALL = packagegroup-core-boot run-postinsts
-     BAD_RECOMMENDATIONS =
-     NO_RECOMMENDATIONS =
-     PACKAGE_EXCLUDE =
-     ROOTFS_POSTPROCESS_COMMAND = write_package_manifest; license_create_manifest; \
-        write_image_manifest ; buildhistory_list_installed_image ; \
-        buildhistory_get_image_installed ; ssh_allow_empty_password;  \
-        postinst_enable_logging; rootfs_update_timestamp ; ssh_disable_dns_lookup ;
-     IMAGE_POSTPROCESS_COMMAND =   buildhistory_get_imageinfo ;
-     IMAGESIZE = 6900
-                </literallayout>
-                Other than <filename>IMAGESIZE</filename>, which is the
-                total size of the files in the image in Kbytes, the
-                name-value pairs are variables that may have influenced the
-                content of the image.
-                This information is often useful when you are trying to determine
-                why a change in the package or file listings has occurred.
-            </para>
-        </section>
-
-        <section id='using-build-history-to-gather-image-information-only'>
-            <title>Using Build History to Gather Image Information Only</title>
-
-            <para>
-                As you can see, build history produces image information,
-                including dependency graphs, so you can see why something
-                was pulled into the image.
-                If you are just interested in this information and not
-                interested in collecting specific package or SDK information,
-                you can enable writing only image information without
-                any history by adding the following to your
-                <filename>conf/local.conf</filename> file found in the
-                <link linkend='build-directory'>Build Directory</link>:
-                <literallayout class='monospaced'>
-     INHERIT += "buildhistory"
-     BUILDHISTORY_COMMIT = "0"
-     BUILDHISTORY_FEATURES = "image"
-                </literallayout>
-                Here, you set the
-                <link linkend='var-BUILDHISTORY_FEATURES'><filename>BUILDHISTORY_FEATURES</filename></link>
-                variable to use the image feature only.
-            </para>
-        </section>
-
-        <section id='build-history-sdk-information'>
-            <title>Build History SDK Information</title>
-
-            <para>
-                Build history collects similar information on the contents
-                of SDKs
-                (e.g. <filename>bitbake -c populate_sdk imagename</filename>)
-                as compared to information it collects for images.
-                Furthermore, this information differs depending on whether an
-                extensible or standard SDK is being produced.
-            </para>
-
-            <para>
-                The following list shows the files produced for SDKs:
-                <itemizedlist>
-                    <listitem><para><filename>files-in-sdk.txt:</filename>
-                        A list of files in the SDK with permissions,
-                        owner, group, size, and symlink information.
-                        This list includes both the host and target parts
-                        of the SDK.
-                        </para></listitem>
-                    <listitem><para><filename>sdk-info.txt:</filename>
-                        A text file containing name-value pairs with information
-                        about the SDK.
-                        See the following listing example for more information.
-                        </para></listitem>
-                    <listitem><para><filename>sstate-task-sizes.txt:</filename>
-                        A text file containing name-value pairs with information
-                        about task group sizes
-                        (e.g. <filename>do_populate_sysroot</filename> tasks
-                        have a total size).
-                        The <filename>sstate-task-sizes.txt</filename> file
-                        exists only when an extensible SDK is created.
-                        </para></listitem>
-                    <listitem><para><filename>sstate-package-sizes.txt:</filename>
-                        A text file containing name-value pairs with information
-                        for the shared-state packages and sizes in the SDK.
-                        The <filename>sstate-package-sizes.txt</filename> file
-                        exists only when an extensible SDK is created.
-                        </para></listitem>
-                    <listitem><para><filename>sdk-files:</filename>
-                        A folder that contains copies of the files mentioned in
-                        <filename>BUILDHISTORY_SDK_FILES</filename> if the
-                        files are present in the output.
-                        Additionally, the default value of
-                        <filename>BUILDHISTORY_SDK_FILES</filename> is specific
-                        to the extensible SDK although you can set it
-                        differently if you would like to pull in specific files
-                        from the standard SDK.</para>
-                        <para>The default files are
-                        <filename>conf/local.conf</filename>,
-                        <filename>conf/bblayers.conf</filename>,
-                        <filename>conf/auto.conf</filename>,
-                        <filename>conf/locked-sigs.inc</filename>, and
-                        <filename>conf/devtool.conf</filename>.
-                        Thus, for an extensible SDK, these files get copied
-                        into the <filename>sdk-files</filename> directory.
-                        </para></listitem>
-                    <listitem><para>The following information appears under
-                        each of the <filename>host</filename>
-                        and <filename>target</filename> directories
-                        for the portions of the SDK that run on the host and
-                        on the target, respectively:
-                        <note>
-                            The following files for the most part are empty
-                            when producing an extensible SDK because this
-                            type of SDK is not constructed from packages as is
-                            the standard SDK.
-                        </note>
-                        <itemizedlist>
-                            <listitem><para><filename>depends.dot:</filename>
-                                Dependency graph for the SDK that is
-                                compatible with <filename>graphviz</filename>.
-                                </para></listitem>
-                            <listitem><para><filename>installed-package-names.txt:</filename>
-                                A list of installed packages by name only.
-                                </para></listitem>
-                            <listitem><para><filename>installed-package-sizes.txt:</filename>
-                                A list of installed packages ordered by size.
-                                </para></listitem>
-                            <listitem><para><filename>installed-packages.txt:</filename>
-                                A list of installed packages with full package
-                                filenames.</para></listitem>
-                            </itemizedlist>
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-
-            <para>
-                Here is an example of <filename>sdk-info.txt</filename>:
-                <literallayout class='monospaced'>
-     DISTRO = poky
-     DISTRO_VERSION = 1.3+snapshot-20130327
-     SDK_NAME = poky-glibc-i686-arm
-     SDK_VERSION = 1.3+snapshot
-     SDKMACHINE =
-     SDKIMAGE_FEATURES = dev-pkgs dbg-pkgs
-     BAD_RECOMMENDATIONS =
-     SDKSIZE = 352712
-                </literallayout>
-                Other than <filename>SDKSIZE</filename>, which is the
-                total size of the files in the SDK in Kbytes, the
-                name-value pairs are variables that might have influenced the
-                content of the SDK.
-                This information is often useful when you are trying to
-                determine why a change in the package or file listings
-                has occurred.
-            </para>
-        </section>
-
-        <section id='examining-build-history-information'>
-            <title>Examining Build History Information</title>
-
-            <para>
-                You can examine build history output from the command line or
-                from a web interface.
-            </para>
-
-            <para>
-                To see any changes that have occurred (assuming you have
-                <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT = "1"</filename></link>),
-                you can simply
-                use any Git command that allows you to view the history of
-                a repository.
-                Here is one method:
-                <literallayout class='monospaced'>
-      $ git log -p
-                </literallayout>
-                You need to realize, however, that this method does show
-                changes that are not significant (e.g. a package's size
-                changing by a few bytes).
-            </para>
-
-            <para>
-                A command-line tool called <filename>buildhistory-diff</filename>
-                does exist, though, that queries the Git repository and prints just
-                the differences that might be significant in human-readable form.
-                Here is an example:
-                <literallayout class='monospaced'>
-     $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
-     Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt):
-        /etc/anotherpkg.conf was added
-        /sbin/anotherpkg was added
-        * (installed-package-names.txt):
-        *   anotherpkg was added
-     Changes to images/qemux86_64/glibc/core-image-minimal (installed-package-names.txt):
-        anotherpkg was added
-     packages/qemux86_64-poky-linux/v86d: PACKAGES: added "v86d-extras"
-        * PR changed from "r0" to "r1"
-        * PV changed from "0.1.10" to "0.1.12"
-     packages/qemux86_64-poky-linux/v86d/v86d: PKGSIZE changed from 110579 to 144381 (+30%)
-        * PR changed from "r0" to "r1"
-        * PV changed from "0.1.10" to "0.1.12"
-                </literallayout>
-                <note>
-                    The <filename>buildhistory-diff</filename> tool requires
-                    the <filename>GitPython</filename> package.
-                    Be sure to install it using Pip3 as follows:
-                    <literallayout class='monospaced'>
-   $ pip3 install GitPython --user
-                    </literallayout>
-                    Alternatively, you can install
-                    <filename>python3-git</filename> using the appropriate
-                    distribution package manager (e.g.
-                    <filename>apt-get</filename>, <filename>dnf</filename>, or
-                    <filename>zipper</filename>).
-                </note>
-            </para>
-
-            <para>
-                To see changes to the build history using a web interface, follow
-                the instruction in the <filename>README</filename> file here.
-                <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
-            </para>
-
-            <para>
-                Here is a sample screenshot of the interface:
-                <imagedata fileref="figures/buildhistory-web.png" align="center" scalefit="1" width="130%" contentdepth="130%" />
-            </para>
-        </section>
-    </section>
-</section>
-
-<section id='speeding-up-the-build'>
-    <title>Speeding Up the Build</title>
-
-    <para>
-        Build time can be an issue.
-        By default, the build system uses simple controls to try and maximize
-        build efficiency.
-        In general, the default settings for all the following variables
-        result in the most efficient build times when dealing with single
-        socket systems (i.e. a single CPU).
-        If you have multiple CPUs, you might try increasing the default
-        values to gain more speed.
-        See the descriptions in the glossary for each variable for more
-        information:
-        <itemizedlist>
-            <listitem><para>
-                <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename>:</link>
-                The maximum number of threads BitBake simultaneously executes.
-                </para></listitem>
-            <listitem><para>
-                <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename>:</ulink>
-                The number of threads BitBake uses during parsing.
-                </para></listitem>
-            <listitem><para>
-                <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename>:</link>
-                Extra options passed to the <filename>make</filename> command
-                during the
-                <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
-                task in order to specify parallel compilation on the
-                local build host.
-                </para></listitem>
-            <listitem><para>
-                <link linkend='var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename>:</link>
-                Extra options passed to the <filename>make</filename> command
-                during the
-                <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-                task in order to specify parallel installation on the
-                local build host.
-                </para></listitem>
-        </itemizedlist>
-        As mentioned, these variables all scale to the number of processor
-        cores available on the build system.
-        For single socket systems, this auto-scaling ensures that the build
-        system fundamentally takes advantage of potential parallel operations
-        during the build based on the build machine's capabilities.
-    </para>
-
-    <para>
-        Following are additional factors that can affect build speed:
-        <itemizedlist>
-            <listitem><para>
-                File system type:
-                The file system type that the build is being performed on can
-                also influence performance.
-                Using <filename>ext4</filename> is recommended as compared
-                to <filename>ext2</filename> and <filename>ext3</filename>
-                due to <filename>ext4</filename> improved features
-                such as extents.
-                </para></listitem>
-            <listitem><para>
-                Disabling the updating of access time using
-                <filename>noatime</filename>:
-                The <filename>noatime</filename> mount option prevents the
-                build system from updating file and directory access times.
-                </para></listitem>
-            <listitem><para>
-                Setting a longer commit:
-                Using the "commit=" mount option increases the interval
-                in seconds between disk cache writes.
-                Changing this interval from the five second default to
-                something longer increases the risk of data loss but decreases
-                the need to write to the disk, thus increasing the build
-                performance.
-                </para></listitem>
-            <listitem><para>
-                Choosing the packaging backend:
-                Of the available packaging backends, IPK is the fastest.
-                Additionally, selecting a singular packaging backend also
-                helps.
-                </para></listitem>
-            <listitem><para>
-                Using <filename>tmpfs</filename> for
-                <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
-                as a temporary file system:
-                While this can help speed up the build, the benefits are
-                limited due to the compiler using
-                <filename>-pipe</filename>.
-                The build system goes to some lengths to avoid
-                <filename>sync()</filename> calls into the
-                file system on the principle that if there was a significant
-                failure, the
-                <link linkend='build-directory'>Build Directory</link>
-                contents could easily be rebuilt.
-                </para></listitem>
-            <listitem><para>
-                Inheriting the
-                <link linkend='ref-classes-rm-work'><filename>rm_work</filename></link>
-                class:
-                Inheriting this class has shown to speed up builds due to
-                significantly lower amounts of data stored in the data
-                cache as well as on disk.
-                Inheriting this class also makes cleanup of
-                <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
-                faster, at the expense of being easily able to dive into the
-                source code.
-                File system maintainers have recommended that the fastest way
-                to clean up large numbers of files is to reformat partitions
-                rather than delete files due to the linear nature of partitions.
-                This, of course, assumes you structure the disk partitions and
-                file systems in a way that this is practical.
-                </para></listitem>
-        </itemizedlist>
-        Aside from the previous list, you should keep some trade offs in
-        mind that can help you speed up the build:
-        <itemizedlist>
-            <listitem><para>
-                Remove items from
-                <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
-                that you might not need.
-                </para></listitem>
-            <listitem><para>
-                Exclude debug symbols and other debug information:
-                If you do not need these symbols and other debug information,
-                disabling the <filename>*-dbg</filename> package generation
-                can speed up the build.
-                You can disable this generation by setting the
-                <link linkend='var-INHIBIT_PACKAGE_DEBUG_SPLIT'><filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename></link>
-                variable to "1".
-                </para></listitem>
-            <listitem><para>
-                Disable static library generation for recipes derived from
-                <filename>autoconf</filename> or <filename>libtool</filename>:
-                Following is an example showing how to disable static
-                libraries and still provide an override to handle exceptions:
-                <literallayout class='monospaced'>
-     STATICLIBCONF = "--disable-static"
-     STATICLIBCONF_sqlite3-native = ""
-     EXTRA_OECONF += "${STATICLIBCONF}"
-                </literallayout>
-                <note><title>Notes</title>
-                    <itemizedlist>
-                        <listitem><para>
-                            Some recipes need static libraries in order to work
-                            correctly (e.g. <filename>pseudo-native</filename>
-                            needs <filename>sqlite3-native</filename>).
-                            Overrides, as in the previous example, account for
-                            these kinds of exceptions.
-                            </para></listitem>
-                        <listitem><para>
-                            Some packages have packaging code that assumes the
-                            presence of the static libraries.
-                            If so, you might need to exclude them as well.
-                            </para></listitem>
-                    </itemizedlist>
-                </note>
-            </para></listitem>
-        </itemizedlist>
-    </para>
-</section>
-</chapter>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-autotools-flow.png b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-autotools-flow.png
new file mode 100644
index 0000000..ec6685f
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-autotools-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-add-flow.png b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-add-flow.png
index 985ac33..e7d6173 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-add-flow.png
+++ b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-add-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-modify-flow.png b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-modify-flow.png
index fd684ff..18ba8b7 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-modify-flow.png
+++ b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-modify-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-upgrade-flow.png b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-upgrade-flow.png
index 65474da..7d4f395 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-upgrade-flow.png
+++ b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-upgrade-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-makefile-flow.png b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-makefile-flow.png
new file mode 100644
index 0000000..0ccb418
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-makefile-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
index 587526f..5b56e73 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
@@ -387,8 +387,9 @@
         have set <filename>SDK_EXT_TYPE</filename> to
         "minimal", which by default, excludes the toolchain.
         Also, it is helpful if you are building a small SDK for use with
-        an IDE, such as Eclipse, or some other tool where you do not want
-        to take extra steps to install a toolchain.
+        an IDE, such as <trademark class='trade'>Eclipse</trademark>, or some
+        other tool where you do not want to take extra steps to install a
+        toolchain.
     </para>
 </section>
 </appendix>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml
deleted file mode 100644
index 2d80f64..0000000
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml
+++ /dev/null
@@ -1,916 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<appendix id='sdk-appendix-latest-yp-eclipse-plug-in'>
-    <title>Using Eclipse Mars</title>
-
-    <para>
-        This release of the Yocto Project supports both the Neon and Mars
-        versions of the Eclipse IDE.
-        This appendix presents information that describes how to obtain and
-        configure the Mars version of Eclipse.
-        It also provides a basic project example that you can work through
-        from start to finish.
-        For general information on using the Eclipse IDE and the Yocto
-        Project Eclipse Plug-In, see the
-        "<link linkend='sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
-        Chapter.
-    </para>
-
-    <section id='mars-setting-up-the-eclipse-ide'>
-        <title>Setting Up the Mars Version of the Eclipse IDE</title>
-
-        <para>
-            To develop within the Eclipse IDE, you need to do the following:
-            <orderedlist>
-                <listitem><para>Install the Mars version of the Eclipse
-                    IDE.</para></listitem>
-                <listitem><para>Configure the Eclipse IDE.
-                    </para></listitem>
-                <listitem><para>Install the Eclipse Yocto Plug-in.
-                    </para></listitem>
-                <listitem><para>Configure the Eclipse Yocto Plug-in.
-                    </para></listitem>
-            </orderedlist>
-            <note>
-                Do not install Eclipse from your distribution's package
-                repository.
-                Be sure to install Eclipse from the official Eclipse
-                download site as directed in the next section.
-            </note>
-        </para>
-
-        <section id='mars-installing-eclipse-ide'>
-            <title>Installing the Mars Eclipse IDE</title>
-
-            <para>
-                Follow these steps to locate, install, and configure
-                Mars Eclipse:
-                <orderedlist>
-                    <listitem><para><emphasis>Locate the Mars Download:</emphasis>
-                        Open a browser and go to
-                        <ulink url='http://www.eclipse.org/mars/'>http://www.eclipse.org/mars/</ulink>.
-                        </para></listitem>
-                    <listitem><para><emphasis>Download the Tarball:</emphasis>
-                        Click the "Download" button and then use the "Linux
-                        for Eclipse IDE for C++ Developers"
-                        appropriate for your development system
-                        (e.g.
-                        <ulink url='http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/2/eclipse-cpp-mars-2-linux-gtk-x86_64.tar.gz'>64-bit under Linux for Eclipse IDE for C++ Developers</ulink>
-                        if your development system is a Linux 64-bit machine.
-                        </para></listitem>
-                    <listitem><para><emphasis>Unpack the Tarball:</emphasis>
-                        Move to a clean directory and unpack the tarball.
-                        Here is an example:
-                        <literallayout class='monospaced'>
-     $ cd ~
-     $ tar -xzvf ~/Downloads/eclipse-cpp-mars-2-linux-gtk-x86_64.tar.gz
-                        </literallayout>
-                        Everything unpacks into a folder named "Eclipse".
-                        </para></listitem>
-                    <listitem><para><emphasis>Launch Eclipse:</emphasis>
-                        Double click the "Eclipse" file in the folder to
-                        launch Eclipse.
-                        <note>
-                            If you experience a NullPointer Exception after
-                            launch Eclipse or the debugger from within Eclipse,
-                            try adding the following
-                            to your <filename>eclipse.ini</filename> file,
-                            which is located in the directory in which you
-                            unpacked the Eclipse tar file:
-                            <literallayout class='monospaced'>
-     --launcher.GTK_version
-     2
-                            </literallayout>
-                            Alternatively, you can export the
-                            <filename>SWT_GTK</filename> variable in your
-                            shell as follows:
-                            <literallayout class='monospaced'>
-     $ export SWT_GTK3=0
-                            </literallayout>
-                            </note>
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='mars-configuring-the-mars-eclipse-ide'>
-            <title>Configuring the Mars Eclipse IDE</title>
-
-            <para>
-                Follow these steps to configure the Mars Eclipse IDE.
-                <note>
-                    Depending on how you installed Eclipse and what you have
-                    already done, some of the options will not appear.
-                    If you cannot find an option as directed by the manual,
-                    it has already been installed.
-                </note>
-                <orderedlist>
-                    <listitem><para>Be sure Eclipse is running and
-                        you are in your workbench.
-                        </para></listitem>
-                    <listitem><para>Select "Install New Software" from
-                        the "Help" pull-down menu.
-                        </para></listitem>
-                    <listitem><para>Select
-                        "Mars - http://download.eclipse.org/releases/mars"
-                        from the "Work with:" pull-down menu.
-                        </para></listitem>
-                    <listitem><para>Expand the box next to
-                        "Linux Tools" and select "C/C++ Remote
-                        (Over TCF/TE) Run/Debug Launcher" and
-                        "TM Terminal".
-                        </para></listitem>
-                    <listitem><para>Expand the box next to "Mobile and
-                        Device Development" and select the following
-                        boxes:
-                        <literallayout class='monospaced'>
-     C/C++ Remote (Over TCF/TE) Run/Debug Launcher
-     Remote System Explorer User Actions
-     TM Terminal
-     TCF Remote System Explorer add-in
-     TCF Target Explorer
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>Expand the box next to
-                        "Programming Languages" and select the
-                        following boxes:
-                        <literallayout class='monospaced'>
-     C/C++ Autotools Support
-     C/C++ Development Tools SDK
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Complete the installation by clicking through
-                        appropriate "Next" and "Finish" buttons.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='mars-installing-the-eclipse-yocto-plug-in'>
-            <title>Installing or Accessing the Mars Eclipse Yocto Plug-in</title>
-
-            <para>
-                You can install the Eclipse Yocto Plug-in into the Eclipse
-                IDE one of two ways:  use the Yocto Project's Eclipse
-                Update site to install the pre-built plug-in or build and
-                install the plug-in from the latest source code.
-            </para>
-
-            <section id='mars-new-software'>
-                <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
-
-                <para>
-                    To install the Mars Eclipse Yocto Plug-in from the update
-                    site, follow these steps:
-                    <orderedlist>
-                        <listitem><para>Start up the Eclipse IDE.
-                            </para></listitem>
-                        <listitem><para>In Eclipse, select "Install New
-                            Software" from the "Help" menu.
-                            </para></listitem>
-                        <listitem><para>Click "Add..." in the "Work with:"
-                            area.
-                            </para></listitem>
-                       <listitem><para>Enter
-                            <filename>&ECLIPSE_DL_PLUGIN_URL;/mars</filename>
-                            in the URL field and provide a meaningful name
-                            in the "Name" field.
-                            </para></listitem>
-                        <listitem><para>Click "OK" to have the entry added
-                            to the "Work with:" drop-down list.
-                            </para></listitem>
-                        <listitem><para>Select the entry for the plug-in
-                            from the "Work with:" drop-down list.
-                            </para></listitem>
-                        <listitem><para>Check the boxes next to the following:
-                            <literallayout class='monospaced'>
-     Yocto Project SDK Plug-in
-     Yocto Project Documentation plug-in
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para>Complete the remaining software
-                            installation steps and then restart the Eclipse
-                            IDE to finish the installation of the plug-in.
-                            <note>
-                                You can click "OK" when prompted about
-                                installing software that contains unsigned
-                                content.
-                            </note>
-                            </para></listitem>
-                    </orderedlist>
-                </para>
-            </section>
-
-            <section id='mars-zip-file-method'>
-                <title>Installing the Plug-in Using the Latest Source Code</title>
-
-                <para>
-                    To install the Mars Eclipse Yocto Plug-in from the latest
-                    source code, follow these steps:
-                    <orderedlist>
-                        <listitem><para>Be sure your development system
-                            has JDK 1.7+
-                            </para></listitem>
-                        <listitem><para>install X11-related packages:
-                            <literallayout class='monospaced'>
-     $ sudo apt-get install xauth
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para>In a new terminal shell, create a Git
-                            repository with:
-                            <literallayout class='monospaced'>
-     $ cd ~
-     $ git clone git://git.yoctoproject.org/eclipse-poky
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para>Use Git to checkout the correct
-                            tag:
-                            <literallayout class='monospaced'>
-     $ cd ~/eclipse-poky
-     $ git checkout mars/yocto-&DISTRO;
-                            </literallayout>
-                            This puts you in a detached HEAD state, which
-                            is fine since you are only going to be building
-                            and not developing.
-                            </para></listitem>
-                        <listitem><para>Change to the
-                            <filename>scripts</filename>
-                            directory within the Git repository:
-                            <literallayout class='monospaced'>
-     $ cd scripts
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para>Set up the local build environment
-                            by running the setup script:
-                            <literallayout class='monospaced'>
-     $ ./setup.sh
-                            </literallayout>
-                            When the script finishes execution,
-                            it prompts you with instructions on how to run
-                            the <filename>build.sh</filename> script, which
-                            is also in the <filename>scripts</filename>
-                            directory of the Git repository created
-                            earlier.
-                            </para></listitem>
-                        <listitem><para>Run the <filename>build.sh</filename>
-                            script as directed.
-                            Be sure to provide the tag name, documentation
-                            branch, and a release name.</para>
-                            <para>
-                            Following is an example:
-                            <literallayout class='monospaced'>
-     $ ECLIPSE_HOME=/home/scottrif/eclipse-poky/scripts/eclipse ./build.sh -l mars/yocto-&DISTRO; master yocto-&DISTRO; 2>&amp;1 | tee build.log
-                            </literallayout>
-                            The previous example command adds the tag you
-                            need for <filename>mars/yocto-&DISTRO;</filename>
-                            to <filename>HEAD</filename>, then tells the
-                            build script to use the local (-l) Git checkout
-                            for the build.
-                            After running the script, the file
-                            <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
-                            is in the current directory.
-                            </para></listitem>
-                        <listitem><para>If necessary, start the Eclipse IDE
-                            and be sure you are in the Workbench.
-                            </para></listitem>
-                        <listitem><para>Select "Install New Software" from
-                            the "Help" pull-down menu.
-                            </para></listitem>
-                        <listitem><para>Click "Add".
-                            </para></listitem>
-                        <listitem><para>Provide anything you want in the
-                            "Name" field.
-                            </para></listitem>
-                        <listitem><para>Click "Archive" and browse to the
-                            ZIP file you built earlier.
-                            This ZIP file should not be "unzipped", and must
-                            be the <filename>*archive.zip</filename> file
-                            created by running the
-                            <filename>build.sh</filename> script.
-                            </para></listitem>
-                        <listitem><para>Click the "OK" button.
-                            </para></listitem>
-                        <listitem><para>Check the boxes that appear in
-                            the installation window to install the
-                            following:
-                            <literallayout class='monospaced'>
-     Yocto Project SDK Plug-in
-     Yocto Project Documentation plug-in
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para>Finish the installation by clicking
-                            through the appropriate buttons.
-                            You can click "OK" when prompted about
-                            installing software that contains unsigned
-                            content.
-                            </para></listitem>
-                        <listitem><para>Restart the Eclipse IDE if
-                            necessary.
-                            </para></listitem>
-                    </orderedlist>
-                </para>
-
-                <para>
-                    At this point you should be able to configure the
-                    Eclipse Yocto Plug-in as described in the
-                    "<link linkend='mars-configuring-the-eclipse-yocto-plug-in'>Configuring the Mars Eclipse Yocto Plug-in</link>"
-                    section.</para>
-            </section>
-        </section>
-
-        <section id='mars-configuring-the-eclipse-yocto-plug-in'>
-            <title>Configuring the Mars Eclipse Yocto Plug-in</title>
-
-            <para>
-                Configuring the Mars Eclipse Yocto Plug-in involves setting the
-                Cross Compiler options and the Target options.
-                The configurations you choose become the default settings
-                for all projects.
-                You do have opportunities to change them later when
-                you configure the project (see the following section).
-            </para>
-
-            <para>
-                To start, you need to do the following from within the
-                Eclipse IDE:
-                <itemizedlist>
-                    <listitem><para>Choose "Preferences" from the
-                        "Window" menu to display the Preferences Dialog.
-                        </para></listitem>
-                    <listitem><para>Click "Yocto Project SDK" to display
-                        the configuration screen.
-                        </para></listitem>
-                </itemizedlist>
-                The following sub-sections describe how to configure the
-                the plug-in.
-                <note>
-                    Throughout the descriptions, a start-to-finish example for
-                    preparing a QEMU image for use with Eclipse is referenced
-                    as the "wiki" and is linked to the example on the
-                    <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
-                    wiki page.
-                </note>
-            </para>
-
-            <section id='mars-configuring-the-cross-compiler-options'>
-                <title>Configuring the Cross-Compiler Options</title>
-
-                <para>
-                    Cross Compiler options enable Eclipse to use your specific
-                    cross compiler toolchain.
-                    To configure these options, you must select
-                    the type of toolchain, point to the toolchain, specify
-                    the sysroot location, and select the target
-                    architecture.
-                    <itemizedlist>
-                        <listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
-                            Choose between
-                            <filename>Standalone pre-built toolchain</filename>
-                            and
-                            <filename>Build system derived toolchain</filename>
-                            for Cross Compiler Options.
-                                <itemizedlist>
-                                    <listitem><para><emphasis>
-                                        <filename>Standalone Pre-built Toolchain:</filename></emphasis>
-                                        Select this type when you are using
-                                        a stand-alone cross-toolchain.
-                                        For example, suppose you are an
-                                        application developer and do not
-                                        need to build a target image.
-                                        Instead, you just want to use an
-                                        architecture-specific toolchain on
-                                        an existing kernel and target root
-                                        filesystem.
-                                        In other words, you have downloaded
-                                        and installed a pre-built toolchain
-                                        for an existing image.
-                                        </para></listitem>
-                                   <listitem><para><emphasis>
-                                        <filename>Build System Derived Toolchain:</filename></emphasis>
-                                        Select this type if you built the
-                                        toolchain as part of the
-                                        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
-                                        When you select
-                                        <filename>Build system derived toolchain</filename>,
-                                        you are using the toolchain built and
-                                        bundled inside the Build Directory.
-                                        For example, suppose you created a
-                                        suitable image using the steps in the
-                                        <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
-                                        In this situation, you would select the
-                                        <filename>Build system derived toolchain</filename>.
-                                        </para></listitem>
-                                </itemizedlist>
-                            </para></listitem>
-                        <listitem><para><emphasis>Specify the Toolchain Root Location:</emphasis>
-                            If you are using a stand-alone pre-built
-                            toolchain, you should be pointing to where it is
-                            installed (e.g.
-                            <filename>/opt/poky/&DISTRO;</filename>).
-                            See the
-                            "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
-                            section for information about how the SDK is
-                            installed.</para>
-                            <para>If you are using a build system derived
-                            toolchain, the path you provide for the
-                            <filename>Toolchain Root Location</filename>
-                            field is the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
-                            from which you run the
-                            <filename>bitbake</filename> command (e.g
-                            <filename>/home/scottrif/poky/build</filename>).</para>
-                            <para>For more information, see the
-                            "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
-                            section.
-                            </para></listitem>
-                        <listitem><para><emphasis>Specify Sysroot Location:</emphasis>
-                            This location is where the root filesystem for
-                            the target hardware resides.
-                            </para>
-                            <para>This location depends on where you
-                            separately extracted and installed the
-                            target filesystem when you either built
-                            it or downloaded it.
-                            <note>
-                                If you downloaded the root filesystem
-                                for the target hardware rather than
-                                built it, you must download the
-                                <filename>sato-sdk</filename> image
-                                in order to build any c/c++ projects.
-                            </note>
-                            As an example, suppose you prepared an image
-                            using the steps in the
-                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
-                            If so, the <filename>MY_QEMU_ROOTFS</filename>
-                            directory is found in the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
-                            and you would browse to and select that directory
-                            (e.g. <filename>/home/scottrif/build/MY_QEMU_ROOTFS</filename>).
-                            </para>
-                            <para>For more information on how to install the
-                            toolchain and on how to extract and install the
-                            sysroot filesystem, see the
-                            "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
-                            section.
-                            </para></listitem>
-                        <listitem><para><emphasis>Select the Target Architecture:</emphasis>
-                            The target architecture is the type of hardware
-                            you are going to use or emulate.
-                            Use the pull-down
-                            <filename>Target Architecture</filename> menu
-                            to make your selection.
-                            The pull-down menu should have the supported
-                            architectures.
-                            If the architecture you need is not listed in
-                            the menu, you will need to build the image.
-                            See the
-                            "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
-                            section of the Yocto Project Quick Start for
-                            more information.
-                            You can also see the
-                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
-                            </para></listitem>
-                    </itemizedlist>
-                </para>
-            </section>
-
-            <section id='mars-configuring-the-target-options'>
-                <title>Configuring the Target Options</title>
-
-                <para>
-                    You can choose to emulate hardware using the QEMU
-                    emulator, or you can choose to run your image on actual
-                    hardware.
-                    <itemizedlist>
-                        <listitem><para><emphasis>QEMU:</emphasis>
-                            Select this option if you will be using the
-                            QEMU emulator.
-                            If you are using the emulator, you also need to
-                            locate the kernel and specify any custom
-                            options.</para>
-                            <para>If you selected the
-                            <filename>Build system derived toolchain</filename>,
-                            the target kernel you built will be located in
-                            the
-                            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
-                            in
-                            <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
-                            directory.
-                            As an example, suppose you performed the steps in
-                            the
-                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
-                            In this case, you specify your Build Directory path
-                            followed by the image (e.g.
-                            <filename>/home/scottrif/poky/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
-                            </para>
-                            <para>If you selected the standalone pre-built
-                            toolchain, the pre-built image you downloaded is
-                            located in the directory you specified when you
-                            downloaded the image.</para>
-                            <para>Most custom options are for advanced QEMU
-                            users to further customize their QEMU instance.
-                            These options are specified between paired
-                            angled brackets.
-                            Some options must be specified outside the
-                            brackets.
-                            In particular, the options
-                            <filename>serial</filename>,
-                            <filename>nographic</filename>, and
-                            <filename>kvm</filename> must all be outside the
-                            brackets.
-                            Use the <filename>man qemu</filename> command
-                            to get help on all the options and their use.
-                            The following is an example:
-                           <literallayout class='monospaced'>
-    serial ‘&lt;-m 256 -full-screen&gt;’
-                            </literallayout></para>
-                            <para>
-                            Regardless of the mode, Sysroot is already
-                            defined as part of the Cross-Compiler Options
-                            configuration in the
-                            <filename>Sysroot Location:</filename> field.
-                            </para></listitem>
-                        <listitem><para><emphasis>External HW:</emphasis>
-                            Select this option if you will be using actual
-                            hardware.</para></listitem>
-                    </itemizedlist>
-                </para>
-
-                <para>
-                    Click the "Apply" and "OK" to save your plug-in
-                    configurations.
-                </para>
-            </section>
-        </section>
-    </section>
-
-    <section id='mars-creating-the-project'>
-        <title>Creating the Project</title>
-
-        <para>
-            You can create two types of projects:  Autotools-based, or
-            Makefile-based.
-            This section describes how to create Autotools-based projects
-            from within the Eclipse IDE.
-            For information on creating Makefile-based projects in a
-            terminal window, see the
-            "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
-            section.
-            <note>
-                Do not use special characters in project names
-                (e.g. spaces, underscores, etc.).  Doing so can
-                cause configuration to fail.
-            </note>
-        </para>
-
-        <para>
-            To create a project based on a Yocto template and then display
-            the source code, follow these steps:
-            <orderedlist>
-                <listitem><para>Select "C Project" from the "File -> New" menu.
-                    </para></listitem>
-                <listitem><para>Expand <filename>Yocto Project SDK Autotools Project</filename>.
-                    </para></listitem>
-                <listitem><para>Select <filename>Hello World ANSI C Autotools Projects</filename>.
-                    This is an Autotools-based project based on a Yocto
-                    template.
-                    </para></listitem>
-                <listitem><para>Put a name in the <filename>Project name:</filename>
-                    field.
-                    Do not use hyphens as part of the name
-                    (e.g. <filename>hello</filename>).
-                    </para></listitem>
-                <listitem><para>Click "Next".
-                    </para></listitem>
-                <listitem><para>Add appropriate information in the various
-                    fields.
-                    </para></listitem>
-                <listitem><para>Click "Finish".
-                    </para></listitem>
-                <listitem><para>If the "open perspective" prompt appears,
-                    click "Yes" so that you in the C/C++ perspective.
-                    </para></listitem>
-                <listitem><para>The left-hand navigation pane shows your
-                    project.
-                    You can display your source by double clicking the
-                    project's source file.
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-
-    <section id='mars-configuring-the-cross-toolchains'>
-        <title>Configuring the Cross-Toolchains</title>
-
-        <para>
-            The earlier section,
-            "<link linkend='mars-configuring-the-eclipse-yocto-plug-in'>Configuring the Mars Eclipse Yocto Plug-in</link>",
-            sets up the default project configurations.
-            You can override these settings for a given project by following
-            these steps:
-            <orderedlist>
-                <listitem><para>Select "Yocto Project Settings" from
-                    the "Project -> Properties" menu.
-                    This selection brings up the Yocto Project Settings
-                    Dialog and allows you to make changes specific to an
-                    individual project.</para>
-                    <para>By default, the Cross Compiler Options and Target
-                    Options for a project are inherited from settings you
-                    provided using the Preferences Dialog as described
-                    earlier in the
-                    "<link linkend='mars-configuring-the-eclipse-yocto-plug-in'>Configuring the Mars Eclipse Yocto Plug-in</link>" section.
-                    The Yocto Project Settings Dialog allows you to override
-                    those default settings for a given project.
-                    </para></listitem>
-                <listitem><para>Make or verify your configurations for the
-                    project and click "OK".
-                    </para></listitem>
-                <listitem><para>Right-click in the navigation pane and
-                    select "Reconfigure Project" from the pop-up menu.
-                    This selection reconfigures the project by running
-                    <filename>autogen.sh</filename> in the workspace for
-                    your project.
-                    The script also runs <filename>libtoolize</filename>,
-                    <filename>aclocal</filename>,
-                    <filename>autoconf</filename>,
-                    <filename>autoheader</filename>,
-                    <filename>automake --a</filename>, and
-                    <filename>./configure</filename>.
-                    Click on the "Console" tab beneath your source code to
-                    see the results of reconfiguring your project.
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-
-    <section id='mars-building-the-project'>
-        <title>Building the Project</title>
-
-        <para>
-            To build the project select "Build All" from the
-            "Project" menu.
-            The console should update and you can note the cross-compiler
-            you are using.
-            <note>
-                When building "Yocto Project SDK Autotools" projects, the
-                Eclipse IDE might display error messages for
-                Functions/Symbols/Types that cannot be "resolved", even when
-                the related include file is listed at the project navigator and
-                when the project is able to build.
-                For these cases only, it is recommended to add a new linked
-                folder to the appropriate sysroot.
-                Use these steps to add the linked folder:
-                <orderedlist>
-                    <listitem><para>
-                        Select the project.
-                        </para></listitem>
-                    <listitem><para>
-                        Select "Folder" from the
-                        <filename>File > New</filename> menu.
-                        </para></listitem>
-                    <listitem><para>
-                        In the "New Folder" Dialog, select "Link to alternate
-                        location (linked folder)".
-                        </para></listitem>
-                    <listitem><para>
-                        Click "Browse" to navigate to the include folder inside
-                        the same sysroot location selected in the Yocto Project
-                        configuration preferences.
-                        </para></listitem>
-                    <listitem><para>
-                        Click "OK".
-                        </para></listitem>
-                    <listitem><para>
-                        Click "Finish" to save the linked folder.
-                        </para></listitem>
-                </orderedlist>
-            </note>
-        </para>
-    </section>
-
-    <section id='mars-starting-qemu-in-user-space-nfs-mode'>
-        <title>Starting QEMU in User-Space NFS Mode</title>
-
-        <para>
-            To start the QEMU emulator from within Eclipse, follow these
-            steps:
-            <note>
-                See the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
-                chapter in the Yocto Project Development Tasks Manual
-                for more information on using QEMU.
-            </note>
-            <orderedlist>
-                <listitem><para>Expose and select "External Tools
-                    Configurations ..." from the "Run -> External Tools" menu.
-                    </para></listitem>
-                <listitem><para>
-                    Locate and select your image in the navigation panel to
-                    the left (e.g. <filename>qemu_i586-poky-linux</filename>).
-                    </para></listitem>
-                <listitem><para>
-                    Click "Run" to launch QEMU.
-                    <note>
-                        The host on which you are running QEMU must have
-                        the <filename>rpcbind</filename> utility running to be
-                        able to make RPC calls on a server on that machine.
-                        If QEMU does not invoke and you receive error messages
-                        involving <filename>rpcbind</filename>, follow the
-                        suggestions to get the service running.
-                        As an example, on a new Ubuntu 16.04 LTS installation,
-                        you must do the following in order to get QEMU to
-                        launch:
-                        <literallayout class='monospaced'>
-     $ sudo apt-get install rpcbind
-                        </literallayout>
-                        After installing <filename>rpcbind</filename>, you
-                        need to edit the
-                        <filename>/etc/init.d/rpcbind</filename> file to
-                        include the following line:
-                        <literallayout class='monospaced'>
-     OPTIONS="-i -w"
-                        </literallayout>
-                        After modifying the file, you need to start the
-                        service:
-                        <literallayout class='monospaced'>
-     $ sudo service portmap restart
-                        </literallayout>
-                    </note>
-                    </para></listitem>
-                <listitem><para>If needed, enter your host root password in
-                    the shell window at the prompt.
-                    This sets up a <filename>Tap 0</filename> connection
-                    needed for running in user-space NFS mode.
-                    </para></listitem>
-                <listitem><para>Wait for QEMU to launch.
-                    </para></listitem>
-                <listitem><para>Once QEMU launches, you can begin operating
-                    within that environment.
-                    One useful task at this point would be to determine the
-                    IP Address for the user-space NFS by using the
-                    <filename>ifconfig</filename> command.
-                    The IP address of the QEMU machine appears in the
-                    xterm window.
-                    You can use this address to help you see which particular
-                    IP address the instance of QEMU is using.
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-
-    <section id='mars-deploying-and-debugging-the-application'>
-        <title>Deploying and Debugging the Application</title>
-
-        <para>
-            Once the QEMU emulator is running the image, you can deploy
-            your application using the Eclipse IDE and then use
-            the emulator to perform debugging.
-            Follow these steps to deploy the application.
-            <note>
-                Currently, Eclipse does not support SSH port forwarding.
-                Consequently, if you need to run or debug a remote
-                application using the host display, you must create a
-                tunneling connection from outside Eclipse and keep
-                that connection alive during your work.
-                For example, in a new terminal, run the following:
-                <literallayout class='monospaced'>
-     $ ssh -XY <replaceable>user_name</replaceable>@<replaceable>remote_host_ip</replaceable>
-                </literallayout>
-                Using the above form, here is an example:
-                <literallayout class='monospaced'>
-     $ ssh -XY root@192.168.7.2
-                </literallayout>
-                After running the command, add the command to be executed
-                in Eclipse's run configuration before the application
-                as follows:
-                <literallayout class='monospaced'>
-     export DISPLAY=:10.0
-                </literallayout>
-                Be sure to not destroy the connection during your QEMU
-                session (i.e. do not
-                exit out of or close that shell).
-            </note>
-            <orderedlist>
-                <listitem><para>Select "Debug Configurations..." from the
-                    "Run" menu.</para></listitem>
-                <listitem><para>In the left area, expand
-                    <filename>C/C++Remote Application</filename>.
-                    </para></listitem>
-                <listitem><para>Locate your project and select it to bring
-                    up a new tabbed view in the Debug Configurations Dialog.
-                    </para></listitem>
-                <listitem><para>Click on the "Debugger" tab to see the
-                    cross-tool debugger you are using.
-                    Be sure to change to the debugger perspective in Eclipse.
-                    </para></listitem>
-                <listitem><para>Click on the "Main" tab.
-                    </para></listitem>
-                <listitem><para>Create a new connection to the QEMU instance
-                    by clicking on "new".</para></listitem>
-                <listitem><para>Select <filename>SSH</filename>, which means
-                    Secure Socket Shell.
-                    Optionally, you can select a TCF connection instead.
-                    </para></listitem>
-                <listitem><para>Click "Next".
-                    </para></listitem>
-                <listitem><para>Clear out the "Connection name" field and
-                    enter any name you want for the connection.
-                    </para></listitem>
-                <listitem><para>Put the IP address for the connection in
-                    the "Host" field.
-                    For QEMU, the default is <filename>192.168.7.2</filename>.
-                    However, if a previous QEMU session did not exit
-                    cleanly, the IP address increments (e.g.
-                    <filename>192.168.7.3</filename>).
-                    <note>
-                        You can find the IP address for the current QEMU
-                        session by looking in the xterm that opens when
-                        you launch QEMU.
-                    </note>
-                    </para></listitem>
-                <listitem><para>Enter <filename>root</filename>, which
-                    is the default for QEMU, for the "User" field.
-                    Be sure to leave the password field empty.
-                    </para></listitem>
-                <listitem><para>Click "Finish" to close the
-                    New Connections Dialog.
-                    </para></listitem>
-                <listitem><para>If necessary, use the drop-down menu now in the
-                    "Connection" field and pick the IP Address you entered.
-                     </para></listitem>
-                <listitem><para>Assuming you are connecting as the root user,
-                    which is the default for QEMU x86-64 SDK images provided by
-                    the Yocto Project, in the "Remote Absolute File Path for
-                    C/C++ Application" field, browse to
-                    <filename>/home/root</filename>.
-                    You could also browse to any other path you have write
-                    access to on the target such as
-                    <filename>/usr/bin</filename>.
-                    This location is where your application will be located on
-                    the QEMU system.
-                    If you fail to browse to and specify an appropriate
-                    location, QEMU will not understand what to remotely
-                    launch.
-                    Eclipse is helpful in that it auto fills your application
-                    name for you assuming you browsed to a directory.
-                    <note><title>Tips</title>
-                        <itemizedlist>
-                            <listitem><para>
-                                If you are prompted to provide a username
-                                and to optionally set a password, be sure
-                                you provide "root" as the username and you
-                                leave the password field blank.
-                                </para></listitem>
-                            <listitem><para>
-                                If browsing to a directory fails or times
-                                out, but you can
-                                <filename>ssh</filename> into your QEMU
-                                or target from the command line and you
-                                have proxies set up, it is likely that
-                                Eclipse is sending the SSH traffic to a
-                                proxy.
-                                In this case, either use TCF , or click on
-                                "Configure proxy settings" in the
-                                connection dialog and add the target IP
-                                address to the "bypass proxy" section.
-                                You might also need to change
-                                "Active Provider" from Native to Manual.
-                                </para></listitem>
-                        </itemizedlist>
-                    </note>
-                    </para></listitem>
-                <listitem><para>
-                    Be sure you change to the "Debug" perspective in Eclipse.
-                    </para></listitem>
-                <listitem><para>Click "Debug"
-                    </para></listitem>
-                <listitem><para>Accept the debug perspective.
-                    </para></listitem>
-            </orderedlist>
-        </para>
-    </section>
-
-    <section id='mars-using-Linuxtools'>
-        <title>Using Linuxtools</title>
-
-        <para>
-            As mentioned earlier in the manual, performance tools exist
-            (Linuxtools) that enhance your development experience.
-            These tools are aids in developing and debugging applications and
-            images.
-            You can run these tools from within the Eclipse IDE through the
-            "Linuxtools" menu.
-        </para>
-
-        <para>
-            For information on how to configure and use these tools, see
-            <ulink url='http://www.eclipse.org/linuxtools/'>http://www.eclipse.org/linuxtools/</ulink>.
-        </para>
-    </section>
-</appendix>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-neon.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-neon.xml
new file mode 100644
index 0000000..f648047
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-neon.xml
@@ -0,0 +1,905 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<appendix id='sdk-appendix-neon-yp-eclipse-plug-in'>
+    <title>Using <trademark class='trade'>Eclipse</trademark> Neon</title>
+
+    <para>
+        This release of the Yocto Project supports both the Oxygen and Neon
+        versions of the Eclipse IDE.
+        This appendix presents information that describes how to obtain and
+        configure the Neon version of Eclipse.
+        It also provides a basic project example that you can work through
+        from start to finish.
+        For general information on using the Eclipse IDE and the Yocto
+        Project Eclipse Plug-In, see the
+        "<link linkend='sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
+        Chapter.
+    </para>
+
+    <section id='neon-setting-up-the-eclipse-ide'>
+        <title>Setting Up the Neon Version of the Eclipse IDE</title>
+
+        <para>
+            To develop within the Eclipse IDE, you need to do the following:
+            <orderedlist>
+                <listitem><para>Install the Neon version of the Eclipse
+                    IDE.</para></listitem>
+                <listitem><para>Configure the Eclipse IDE.
+                    </para></listitem>
+                <listitem><para>Install the Eclipse Yocto Plug-in.
+                    </para></listitem>
+                <listitem><para>Configure the Eclipse Yocto Plug-in.
+                    </para></listitem>
+            </orderedlist>
+            <note>
+                Do not install Eclipse from your distribution's package
+                repository.
+                Be sure to install Eclipse from the official Eclipse
+                download site as directed in the next section.
+            </note>
+        </para>
+
+        <section id='neon-installing-eclipse-ide'>
+            <title>Installing the Neon Eclipse IDE</title>
+
+            <para>
+                Follow these steps to locate, install, and configure
+                Neon Eclipse:
+                <orderedlist>
+                    <listitem><para><emphasis>Locate the Neon Download:</emphasis>
+                        Open a browser and go to
+                        <ulink url='http://www.eclipse.org/neon/'>http://www.eclipse.org/neon/</ulink>.
+                        </para></listitem>
+                    <listitem><para><emphasis>Download the Tarball:</emphasis>
+                        Click the "Download" button and then use the "Eclipse
+                        IDE for C/C++ Developers"
+                        appropriate for your development system.
+                        </para></listitem>
+                    <listitem><para><emphasis>Unpack the Tarball:</emphasis>
+                        Move to a clean directory and unpack the tarball.
+                        Here is an example:
+                        <literallayout class='monospaced'>
+     $ cd ~
+     $ tar -xzvf ~/Downloads/eclipse-cpp-neon-3-linux-gtk-x86_64.tar.gz
+                        </literallayout>
+                        Everything unpacks into a folder named "Eclipse".
+                        </para></listitem>
+                    <listitem><para><emphasis>Launch Eclipse:</emphasis>
+                        The following commands launch Eclipse assuming you
+                        unpacked it in your home directory:
+                        <literallayout class='monospaced'>
+     $ cd ~/eclipse
+     $ ./eclipse
+                        </literallayout>
+                        Accept the default "workspace" once Eclipse launches.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='neon-configuring-the-neon-eclipse-ide'>
+            <title>Configuring the Neon Eclipse IDE</title>
+
+            <para>
+                Follow these steps to configure the Neon Eclipse IDE.
+                <note>
+                    Depending on how you installed Eclipse and what you have
+                    already done, some of the options will not appear.
+                    If you cannot find an option as directed by the manual,
+                    it has already been installed.
+                </note>
+                <orderedlist>
+                    <listitem><para>Be sure Eclipse is running and
+                        you are in your workbench.
+                        </para></listitem>
+                    <listitem><para>Select "Install New Software" from
+                        the "Help" pull-down menu.
+                        </para></listitem>
+                    <listitem><para>Select
+                        "Neon - http://download.eclipse.org/releases/neon"
+                        from the "Work with:" pull-down menu.
+                        </para></listitem>
+                    <listitem><para>Expand the box next to
+                        "Linux Tools" and select the following
+                         <literallayout class='monospaced'>
+     C/C++ Remote (Over TCF/TE) Run/Debug Launcher
+     TM Terminal
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>Expand the box next to "Mobile and
+                        Device Development" and select the following
+                        boxes:
+                        <literallayout class='monospaced'>
+     C/C++ Remote (Over TCF/TE) Run/Debug Launcher
+     Remote System Explorer User Actions
+     TM Terminal
+     TCF Remote System Explorer add-in
+     TCF Target Explorer
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>Expand the box next to
+                        "Programming Languages" and select the
+                        following box:
+                        <literallayout class='monospaced'>
+     C/C++ Development Tools SDK
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        Complete the installation by clicking through
+                        appropriate "Next" and "Finish" buttons.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='neon-installing-the-eclipse-yocto-plug-in'>
+            <title>Installing or Accessing the Neon Eclipse Yocto Plug-in</title>
+
+            <para>
+                You can install the Eclipse Yocto Plug-in into the Eclipse
+                IDE one of two ways:  use the Yocto Project's Eclipse
+                Update site to install the pre-built plug-in or build and
+                install the plug-in from the latest source code.
+            </para>
+
+            <section id='neon-new-software'>
+                <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
+
+                <para>
+                    To install the Neon Eclipse Yocto Plug-in from the update
+                    site, follow these steps:
+                    <orderedlist>
+                        <listitem><para>Start up the Eclipse IDE.
+                            </para></listitem>
+                        <listitem><para>In Eclipse, select "Install New
+                            Software" from the "Help" menu.
+                            </para></listitem>
+                        <listitem><para>Click "Add..." in the "Work with:"
+                            area.
+                            </para></listitem>
+                       <listitem><para>Enter
+                            <filename>&ECLIPSE_DL_PLUGIN_URL;/neon</filename>
+                            in the URL field and provide a meaningful name
+                            in the "Name" field.
+                            </para></listitem>
+                        <listitem><para>Click "OK" to have the entry added
+                            to the "Work with:" drop-down list.
+                            </para></listitem>
+                        <listitem><para>Select the entry for the plug-in
+                            from the "Work with:" drop-down list.
+                            </para></listitem>
+                        <listitem><para>Check the boxes next to the following:
+                            <literallayout class='monospaced'>
+     Yocto Project SDK Plug-in
+     Yocto Project Documentation plug-in
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>Complete the remaining software
+                            installation steps and then restart the Eclipse
+                            IDE to finish the installation of the plug-in.
+                            <note>
+                                You can click "OK" when prompted about
+                                installing software that contains unsigned
+                                content.
+                            </note>
+                            </para></listitem>
+                    </orderedlist>
+                </para>
+            </section>
+
+            <section id='neon-zip-file-method'>
+                <title>Installing the Plug-in Using the Latest Source Code</title>
+
+                <para>
+                    To install the Neon Eclipse Yocto Plug-in from the latest
+                    source code, follow these steps:
+                    <orderedlist>
+                        <listitem><para>Be sure your development system
+                            has JDK 1.8+
+                            </para></listitem>
+                        <listitem><para>install X11-related packages:
+                            <literallayout class='monospaced'>
+     $ sudo apt-get install xauth
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>In a new terminal shell, create a Git
+                            repository with:
+                            <literallayout class='monospaced'>
+     $ cd ~
+     $ git clone git://git.yoctoproject.org/eclipse-yocto
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>Use Git to checkout the correct
+                            tag:
+                            <literallayout class='monospaced'>
+     $ cd ~/eclipse-yocto
+     $ git checkout neon/yocto-&DISTRO;
+                            </literallayout>
+                            This creates a local tag named
+                            <filename>neon/yocto-&DISTRO;</filename> based on
+                            the branch <filename>origin/neon-master</filename>.
+                            This puts you in a detached HEAD state, which
+                            is fine since you are only going to be building
+                            and not developing.
+                            </para></listitem>
+                        <listitem><para>Change to the
+                            <filename>scripts</filename>
+                            directory within the Git repository:
+                            <literallayout class='monospaced'>
+     $ cd scripts
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>Set up the local build environment
+                            by running the setup script:
+                            <literallayout class='monospaced'>
+     $ ./setup.sh
+                            </literallayout>
+                            When the script finishes execution,
+                            it prompts you with instructions on how to run
+                            the <filename>build.sh</filename> script, which
+                            is also in the <filename>scripts</filename>
+                            directory of the Git repository created
+                            earlier.
+                            </para></listitem>
+                        <listitem><para>Run the <filename>build.sh</filename>
+                            script as directed.
+                            Be sure to provide the tag name, documentation
+                            branch, and a release name.</para>
+                            <para>
+                            Following is an example:
+                            <literallayout class='monospaced'>
+     $ ECLIPSE_HOME=/home/scottrif/eclipse-yocto/scripts/eclipse ./build.sh -l neon/yocto-&DISTRO; master yocto-&DISTRO; 2>&amp;1 | tee build.log
+                            </literallayout>
+                            The previous example command adds the tag you
+                            need for <filename>neon/yocto-&DISTRO;</filename>
+                            to <filename>HEAD</filename>, then tells the
+                            build script to use the local (-l) Git checkout
+                            for the build.
+                            After running the script, the file
+                            <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
+                            is in the current directory.
+                            </para></listitem>
+                        <listitem><para>If necessary, start the Eclipse IDE
+                            and be sure you are in the Workbench.
+                            </para></listitem>
+                        <listitem><para>Select "Install New Software" from
+                            the "Help" pull-down menu.
+                            </para></listitem>
+                        <listitem><para>Click "Add".
+                            </para></listitem>
+                        <listitem><para>Provide anything you want in the
+                            "Name" field.
+                            </para></listitem>
+                        <listitem><para>Click "Archive" and browse to the
+                            ZIP file you built earlier.
+                            This ZIP file should not be "unzipped", and must
+                            be the <filename>*archive.zip</filename> file
+                            created by running the
+                            <filename>build.sh</filename> script.
+                            </para></listitem>
+                        <listitem><para>Click the "OK" button.
+                            </para></listitem>
+                        <listitem><para>Check the boxes that appear in
+                            the installation window to install the
+                            following:
+                            <literallayout class='monospaced'>
+     Yocto Project SDK Plug-in
+     Yocto Project Documentation plug-in
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>Finish the installation by clicking
+                            through the appropriate buttons.
+                            You can click "OK" when prompted about
+                            installing software that contains unsigned
+                            content.
+                            </para></listitem>
+                        <listitem><para>Restart the Eclipse IDE if
+                            necessary.
+                            </para></listitem>
+                    </orderedlist>
+                </para>
+
+                <para>
+                    At this point you should be able to configure the
+                    Eclipse Yocto Plug-in as described in the
+                    "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
+                    section.</para>
+            </section>
+        </section>
+
+        <section id='neon-configuring-the-eclipse-yocto-plug-in'>
+            <title>Configuring the Neon Eclipse Yocto Plug-in</title>
+
+            <para>
+                Configuring the Neon Eclipse Yocto Plug-in involves setting the
+                Cross Compiler options and the Target options.
+                The configurations you choose become the default settings
+                for all projects.
+                You do have opportunities to change them later when
+                you configure the project (see the following section).
+            </para>
+
+            <para>
+                To start, you need to do the following from within the
+                Eclipse IDE:
+                <itemizedlist>
+                    <listitem><para>Choose "Preferences" from the
+                        "Window" menu to display the Preferences Dialog.
+                        </para></listitem>
+                    <listitem><para>Click "Yocto Project SDK" to display
+                        the configuration screen.
+                        </para></listitem>
+                </itemizedlist>
+                The following sub-sections describe how to configure the
+                the plug-in.
+                <note>
+                    Throughout the descriptions, a start-to-finish example for
+                    preparing a QEMU image for use with Eclipse is referenced
+                    as the "wiki" and is linked to the example on the
+                    <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
+                    wiki page.
+                </note>
+            </para>
+
+            <section id='neon-configuring-the-cross-compiler-options'>
+                <title>Configuring the Cross-Compiler Options</title>
+
+                <para>
+                    Cross Compiler options enable Eclipse to use your specific
+                    cross compiler toolchain.
+                    To configure these options, you must select
+                    the type of toolchain, point to the toolchain, specify
+                    the sysroot location, and select the target
+                    architecture.
+                    <itemizedlist>
+                        <listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
+                            Choose between
+                            <filename>Standalone pre-built toolchain</filename>
+                            and
+                            <filename>Build system derived toolchain</filename>
+                            for Cross Compiler Options.
+                                <itemizedlist>
+                                    <listitem><para><emphasis>
+                                        <filename>Standalone Pre-built Toolchain:</filename></emphasis>
+                                        Select this type when you are using
+                                        a stand-alone cross-toolchain.
+                                        For example, suppose you are an
+                                        application developer and do not
+                                        need to build a target image.
+                                        Instead, you just want to use an
+                                        architecture-specific toolchain on
+                                        an existing kernel and target root
+                                        filesystem.
+                                        In other words, you have downloaded
+                                        and installed a pre-built toolchain
+                                        for an existing image.
+                                        </para></listitem>
+                                   <listitem><para><emphasis>
+                                        <filename>Build System Derived Toolchain:</filename></emphasis>
+                                        Select this type if you built the
+                                        toolchain as part of the
+                                        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+                                        When you select
+                                        <filename>Build system derived toolchain</filename>,
+                                        you are using the toolchain built and
+                                        bundled inside the Build Directory.
+                                        For example, suppose you created a
+                                        suitable image using the steps in the
+                                        <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+                                        In this situation, you would select the
+                                        <filename>Build system derived toolchain</filename>.
+                                        </para></listitem>
+                                </itemizedlist>
+                            </para></listitem>
+                        <listitem><para><emphasis>Specify the Toolchain Root Location:</emphasis>
+                            If you are using a stand-alone pre-built
+                            toolchain, you should be pointing to where it is
+                            installed (e.g.
+                            <filename>/opt/poky/&DISTRO;</filename>).
+                            See the
+                            "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+                            section for information about how the SDK is
+                            installed.</para>
+                            <para>If you are using a build system derived
+                            toolchain, the path you provide for the
+                            <filename>Toolchain Root Location</filename>
+                            field is the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                            from which you run the
+                            <filename>bitbake</filename> command (e.g
+                            <filename>/home/scottrif/poky/build</filename>).</para>
+                            <para>For more information, see the
+                            "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
+                            section.
+                            </para></listitem>
+                        <listitem><para><emphasis>Specify Sysroot Location:</emphasis>
+                            This location is where the root filesystem for
+                            the target hardware resides.
+                            </para>
+                            <para>This location depends on where you
+                            separately extracted and installed the
+                            target filesystem when you either built
+                            it or downloaded it.
+                            <note>
+                                If you downloaded the root filesystem
+                                for the target hardware rather than
+                                built it, you must download the
+                                <filename>sato-sdk</filename> image
+                                in order to build any c/c++ projects.
+                            </note>
+                            As an example, suppose you prepared an image
+                            using the steps in the
+                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+                            If so, the <filename>MY_QEMU_ROOTFS</filename>
+                            directory is found in the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                            and you would browse to and select that directory
+                            (e.g. <filename>/home/scottrif/build/MY_QEMU_ROOTFS</filename>).
+                            </para>
+                            <para>For more information on how to install the
+                            toolchain and on how to extract and install the
+                            sysroot filesystem, see the
+                            "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
+                            section.
+                            </para></listitem>
+                        <listitem><para><emphasis>Select the Target Architecture:</emphasis>
+                            The target architecture is the type of hardware
+                            you are going to use or emulate.
+                            Use the pull-down
+                            <filename>Target Architecture</filename> menu
+                            to make your selection.
+                            The pull-down menu should have the supported
+                            architectures.
+                            If the architecture you need is not listed in
+                            the menu, you will need to build the image.
+                            See the
+                            "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-building-a-simple-image'>Building a Simple Image</ulink>"
+                            section of the Yocto Project Development Tasks
+                            Manual for more information.
+                            You can also see the
+                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+            </section>
+
+            <section id='neon-configuring-the-target-options'>
+                <title>Configuring the Target Options</title>
+
+                <para>
+                    You can choose to emulate hardware using the QEMU
+                    emulator, or you can choose to run your image on actual
+                    hardware.
+                    <itemizedlist>
+                        <listitem><para><emphasis>QEMU:</emphasis>
+                            Select this option if you will be using the
+                            QEMU emulator.
+                            If you are using the emulator, you also need to
+                            locate the kernel and specify any custom
+                            options.</para>
+                            <para>If you selected the
+                            <filename>Build system derived toolchain</filename>,
+                            the target kernel you built will be located in
+                            the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                            in
+                            <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
+                            directory.
+                            As an example, suppose you performed the steps in
+                            the
+                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+                            In this case, you specify your Build Directory path
+                            followed by the image (e.g.
+                            <filename>/home/scottrif/poky/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
+                            </para>
+                            <para>If you selected the standalone pre-built
+                            toolchain, the pre-built image you downloaded is
+                            located in the directory you specified when you
+                            downloaded the image.</para>
+                            <para>Most custom options are for advanced QEMU
+                            users to further customize their QEMU instance.
+                            These options are specified between paired
+                            angled brackets.
+                            Some options must be specified outside the
+                            brackets.
+                            In particular, the options
+                            <filename>serial</filename>,
+                            <filename>nographic</filename>, and
+                            <filename>kvm</filename> must all be outside the
+                            brackets.
+                            Use the <filename>man qemu</filename> command
+                            to get help on all the options and their use.
+                            The following is an example:
+                           <literallayout class='monospaced'>
+    serial ‘&lt;-m 256 -full-screen&gt;’
+                            </literallayout></para>
+                            <para>
+                            Regardless of the mode, Sysroot is already
+                            defined as part of the Cross-Compiler Options
+                            configuration in the
+                            <filename>Sysroot Location:</filename> field.
+                            </para></listitem>
+                        <listitem><para><emphasis>External HW:</emphasis>
+                            Select this option if you will be using actual
+                            hardware.</para></listitem>
+                    </itemizedlist>
+                </para>
+
+                <para>
+                    Click the "Apply" and "OK" to save your plug-in
+                    configurations.
+                </para>
+            </section>
+        </section>
+    </section>
+
+    <section id='neon-creating-the-project'>
+        <title>Creating the Project</title>
+
+        <para>
+            You can create two types of projects:  Autotools-based, or
+            Makefile-based.
+            This section describes how to create Autotools-based projects
+            from within the Eclipse IDE.
+            For information on creating Makefile-based projects in a
+            terminal window, see the
+            "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
+            section.
+            <note>
+                Do not use special characters in project names
+                (e.g. spaces, underscores, etc.).  Doing so can
+                cause the configuration to fail.
+            </note>
+        </para>
+
+        <para>
+            To create a project based on a Yocto template and then display
+            the source code, follow these steps:
+            <orderedlist>
+                <listitem><para>Select "C Project" from the "File -> New" menu.
+                    </para></listitem>
+                <listitem><para>Expand <filename>Yocto Project SDK Autotools Project</filename>.
+                    </para></listitem>
+                <listitem><para>Select <filename>Hello World ANSI C Autotools Projects</filename>.
+                    This is an Autotools-based project based on a Yocto
+                    template.
+                    </para></listitem>
+                <listitem><para>Put a name in the <filename>Project name:</filename>
+                    field.
+                    Do not use hyphens as part of the name
+                    (e.g. <filename>hello</filename>).
+                    </para></listitem>
+                <listitem><para>Click "Next".
+                    </para></listitem>
+                <listitem><para>Add appropriate information in the various
+                    fields.
+                    </para></listitem>
+                <listitem><para>Click "Finish".
+                    </para></listitem>
+                <listitem><para>If the "open perspective" prompt appears,
+                    click "Yes" so that you are in the C/C++ perspective.
+                    </para></listitem>
+                <listitem><para>The left-hand navigation pane shows your
+                    project.
+                    You can display your source by double clicking the
+                    project's source file.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+
+    <section id='neon-configuring-the-cross-toolchains'>
+        <title>Configuring the Cross-Toolchains</title>
+
+        <para>
+            The earlier section,
+            "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>",
+            sets up the default project configurations.
+            You can override these settings for a given project by following
+            these steps:
+            <orderedlist>
+                <listitem><para>Select "Yocto Project Settings" from
+                    the "Project -> Properties" menu.
+                    This selection brings up the Yocto Project Settings
+                    Dialog and allows you to make changes specific to an
+                    individual project.</para>
+                    <para>By default, the Cross Compiler Options and Target
+                    Options for a project are inherited from settings you
+                    provided using the Preferences Dialog as described
+                    earlier in the
+                    "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>" section.
+                    The Yocto Project Settings Dialog allows you to override
+                    those default settings for a given project.
+                    </para></listitem>
+                <listitem><para>Make or verify your configurations for the
+                    project and click "OK".
+                    </para></listitem>
+                <listitem><para>Right-click in the navigation pane and
+                    select "Reconfigure Project" from the pop-up menu.
+                    This selection reconfigures the project by running
+                    <filename>autogen.sh</filename> in the workspace for
+                    your project.
+                    The script also runs <filename>libtoolize</filename>,
+                    <filename>aclocal</filename>,
+                    <filename>autoconf</filename>,
+                    <filename>autoheader</filename>,
+                    <filename>automake --a</filename>, and
+                    <filename>./configure</filename>.
+                    Click on the "Console" tab beneath your source code to
+                    see the results of reconfiguring your project.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+
+    <section id='neon-building-the-project'>
+        <title>Building the Project</title>
+
+        <para>
+            To build the project select "Build All" from the
+            "Project" menu.
+            The console should update and you can note the cross-compiler
+            you are using.
+            <note>
+                When building "Yocto Project SDK Autotools" projects, the
+                Eclipse IDE might display error messages for
+                Functions/Symbols/Types that cannot be "resolved", even when
+                the related include file is listed at the project navigator and
+                when the project is able to build.
+                For these cases only, it is recommended to add a new linked
+                folder to the appropriate sysroot.
+                Use these steps to add the linked folder:
+                <orderedlist>
+                    <listitem><para>
+                        Select the project.
+                        </para></listitem>
+                    <listitem><para>
+                        Select "Folder" from the
+                        <filename>File > New</filename> menu.
+                        </para></listitem>
+                    <listitem><para>
+                        In the "New Folder" Dialog, select "Link to alternate
+                        location (linked folder)".
+                        </para></listitem>
+                    <listitem><para>
+                        Click "Browse" to navigate to the include folder inside
+                        the same sysroot location selected in the Yocto Project
+                        configuration preferences.
+                        </para></listitem>
+                    <listitem><para>
+                        Click "OK".
+                        </para></listitem>
+                    <listitem><para>
+                        Click "Finish" to save the linked folder.
+                        </para></listitem>
+                </orderedlist>
+            </note>
+        </para>
+    </section>
+
+    <section id='neon-starting-qemu-in-user-space-nfs-mode'>
+        <title>Starting QEMU in User-Space NFS Mode</title>
+
+        <para>
+            To start the QEMU emulator from within Eclipse, follow these
+            steps:
+            <note>
+                See the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
+                chapter in the Yocto Project Development Tasks Manual
+                for more information on using QEMU.
+            </note>
+            <orderedlist>
+                <listitem><para>Expose and select "External Tools
+                    Configurations ..." from the "Run -> External Tools" menu.
+                    </para></listitem>
+                <listitem><para>
+                    Locate and select your image in the navigation panel to
+                    the left (e.g. <filename>qemu_i586-poky-linux</filename>).
+                    </para></listitem>
+                <listitem><para>
+                    Click "Run" to launch QEMU.
+                    <note>
+                        The host on which you are running QEMU must have
+                        the <filename>rpcbind</filename> utility running to be
+                        able to make RPC calls on a server on that machine.
+                        If QEMU does not invoke and you receive error messages
+                        involving <filename>rpcbind</filename>, follow the
+                        suggestions to get the service running.
+                        As an example, on a new Ubuntu 16.04 LTS installation,
+                        you must do the following in order to get QEMU to
+                        launch:
+                        <literallayout class='monospaced'>
+     $ sudo apt-get install rpcbind
+                        </literallayout>
+                        After installing <filename>rpcbind</filename>, you
+                        need to edit the
+                        <filename>/etc/init.d/rpcbind</filename> file to
+                        include the following line:
+                        <literallayout class='monospaced'>
+     OPTIONS="-i -w"
+                        </literallayout>
+                        After modifying the file, you need to start the
+                        service:
+                        <literallayout class='monospaced'>
+     $ sudo service portmap restart
+                        </literallayout>
+                    </note>
+                    </para></listitem>
+                <listitem><para>If needed, enter your host root password in
+                    the shell window at the prompt.
+                    This sets up a <filename>Tap 0</filename> connection
+                    needed for running in user-space NFS mode.
+                    </para></listitem>
+                <listitem><para>Wait for QEMU to launch.
+                    </para></listitem>
+                <listitem><para>Once QEMU launches, you can begin operating
+                    within that environment.
+                    One useful task at this point would be to determine the
+                    IP Address for the user-space NFS by using the
+                    <filename>ifconfig</filename> command.
+                    The IP address of the QEMU machine appears in the
+                    xterm window.
+                    You can use this address to help you see which particular
+                    IP address the instance of QEMU is using.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+
+    <section id='neon-deploying-and-debugging-the-application'>
+        <title>Deploying and Debugging the Application</title>
+
+        <para>
+            Once the QEMU emulator is running the image, you can deploy
+            your application using the Eclipse IDE and then use
+            the emulator to perform debugging.
+            Follow these steps to deploy the application.
+            <note>
+                Currently, Eclipse does not support SSH port forwarding.
+                Consequently, if you need to run or debug a remote
+                application using the host display, you must create a
+                tunneling connection from outside Eclipse and keep
+                that connection alive during your work.
+                For example, in a new terminal, run the following:
+                <literallayout class='monospaced'>
+     $ ssh -XY <replaceable>user_name</replaceable>@<replaceable>remote_host_ip</replaceable>
+                </literallayout>
+                Using the above form, here is an example:
+                <literallayout class='monospaced'>
+     $ ssh -XY root@192.168.7.2
+                </literallayout>
+                After running the command, add the command to be executed
+                in Eclipse's run configuration before the application
+                as follows:
+                <literallayout class='monospaced'>
+     export DISPLAY=:10.0
+                </literallayout>
+                Be sure to not destroy the connection during your QEMU
+                session (i.e. do not
+                exit out of or close that shell).
+            </note>
+            <orderedlist>
+                <listitem><para>Select "Debug Configurations..." from the
+                    "Run" menu.</para></listitem>
+                <listitem><para>In the left area, expand
+                    <filename>C/C++Remote Application</filename>.
+                    </para></listitem>
+                <listitem><para>Locate your project and select it to bring
+                    up a new tabbed view in the Debug Configurations Dialog.
+                    </para></listitem>
+                <listitem><para>Click on the "Debugger" tab to see the
+                    cross-tool debugger you are using.
+                    Be sure to change to the debugger perspective in Eclipse.
+                    </para></listitem>
+                <listitem><para>Click on the "Main" tab.
+                    </para></listitem>
+                <listitem><para>Create a new connection to the QEMU instance
+                    by clicking on "new".</para></listitem>
+                <listitem><para>Select <filename>SSH</filename>, which means
+                    Secure Socket Shell.
+                    Optionally, you can select a TCF connection instead.
+                    </para></listitem>
+                <listitem><para>Click "Next".
+                    </para></listitem>
+                <listitem><para>Clear out the "Connection name" field and
+                    enter any name you want for the connection.
+                    </para></listitem>
+                <listitem><para>Put the IP address for the connection in
+                    the "Host" field.
+                    For QEMU, the default is <filename>192.168.7.2</filename>.
+                    However, if a previous QEMU session did not exit
+                    cleanly, the IP address increments (e.g.
+                    <filename>192.168.7.3</filename>).
+                    <note>
+                        You can find the IP address for the current QEMU
+                        session by looking in the xterm that opens when
+                        you launch QEMU.
+                    </note>
+                    </para></listitem>
+                <listitem><para>Enter <filename>root</filename>, which
+                    is the default for QEMU, for the "User" field.
+                    Be sure to leave the password field empty.
+                    </para></listitem>
+                <listitem><para>Click "Finish" to close the
+                    New Connections Dialog.
+                    </para></listitem>
+                <listitem><para>If necessary, use the drop-down menu now in the
+                    "Connection" field and pick the IP Address you entered.
+                     </para></listitem>
+                <listitem><para>Assuming you are connecting as the root user,
+                    which is the default for QEMU x86-64 SDK images provided by
+                    the Yocto Project, in the "Remote Absolute File Path for
+                    C/C++ Application" field, browse to
+                    <filename>/home/root/</filename><replaceable>ProjectName</replaceable>
+                    (e.g. <filename>/home/root/hello</filename>).
+                    You could also browse to any other path you have write
+                    access to on the target such as
+                    <filename>/usr/bin</filename>.
+                    This location is where your application will be located on
+                    the QEMU system.
+                    If you fail to browse to and specify an appropriate
+                    location, QEMU will not understand what to remotely
+                    launch.
+                    Eclipse is helpful in that it auto fills your application
+                    name for you assuming you browsed to a directory.
+                    <note><title>Tips</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                If you are prompted to provide a username
+                                and to optionally set a password, be sure
+                                you provide "root" as the username and you
+                                leave the password field blank.
+                                </para></listitem>
+                            <listitem><para>
+                                If browsing to a directory fails or times
+                                out, but you can
+                                <filename>ssh</filename> into your QEMU
+                                or target from the command line and you
+                                have proxies set up, it is likely that
+                                Eclipse is sending the SSH traffic to a
+                                proxy.
+                                In this case, either use TCF , or click on
+                                "Configure proxy settings" in the
+                                connection dialog and add the target IP
+                                address to the "bypass proxy" section.
+                                You might also need to change
+                                "Active Provider" from Native to Manual.
+                                </para></listitem>
+                        </itemizedlist>
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    Be sure you change to the "Debug" perspective in Eclipse.
+                    </para></listitem>
+                <listitem><para>Click "Debug"
+                    </para></listitem>
+                <listitem><para>Accept the debug perspective.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+
+    <section id='neon-using-Linuxtools'>
+        <title>Using Linuxtools</title>
+
+        <para>
+            As mentioned earlier in the manual, performance tools exist
+            (Linuxtools) that enhance your development experience.
+            These tools are aids in developing and debugging applications and
+            images.
+            You can run these tools from within the Eclipse IDE through the
+            "Linuxtools" menu.
+        </para>
+
+        <para>
+            For information on how to configure and use these tools, see
+            <ulink url='http://www.eclipse.org/linuxtools/'>http://www.eclipse.org/linuxtools/</ulink>.
+        </para>
+    </section>
+</appendix>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
index ab9055e..aa06358 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
@@ -105,7 +105,7 @@
                 <emphasis>Set Up the Build Environment:</emphasis>
                 Be sure you are set up to use BitBake in a shell.
                 See the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up the Development Host to Use the Yocto Project</ulink>"
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Preparing the Build Host</ulink>"
                 section in the Yocto Project Development Tasks Manual for
                 information on how to get a build host ready that is either a
                 native Linux machine or a machine that uses CROPS.
@@ -203,7 +203,7 @@
                         <listitem><para>
                             For additional information on building the
                             installer, see the
-                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
+                            <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an <trademark class='trade'>Eclipse</trademark> Debug Capable Image</ulink>
                             wiki page.
                             </para></listitem>
                     </itemizedlist>
@@ -327,7 +327,7 @@
                 <para>Following is an example command that extracts the root
                 filesystem from a previously built root filesystem image that
                 was downloaded from the
-                <ulink url='&YOCTO_DOCS_REF_URL;#index-downloads'>Index of Releases</ulink>.
+                <ulink url='&YOCTO_DOCS_OM_URL;#index-downloads'>Index of Releases</ulink>.
                 This command extracts the root filesystem into the
                 <filename>core2-64-sato</filename> directory:
                 <literallayout class='monospaced'>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml
index bdb8344..3eb85e8 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml
@@ -19,8 +19,8 @@
 
         <para>
             The following figure and supporting list summarize the
-            application development general workflow that employs both the
-            SDK Eclipse.
+            general workflow for application development that uses the
+            SDK within the Eclipse IDE.
         </para>
 
         <para>
@@ -31,9 +31,8 @@
         <para>
             <orderedlist>
                 <listitem><para>
-                    <emphasis>Prepare the host system for the Yocto
-                    Project</emphasis>:
-                    See
+                    <emphasis>Prepare the Host System for the Yocto Project</emphasis>:
+                    See the
                     "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
                     and
                     "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
@@ -43,8 +42,8 @@
                     <filename>xterm</filename> package installed.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Secure the Yocto Project kernel target
-                    image</emphasis>:
+                    <emphasis>Secure the Yocto Project Kernel Target
+                    Image</emphasis>:
                     You must have a target kernel image that has been built
                     using the OpenEmbedded build system.</para>
                     <para>Depending on whether the Yocto Project has a
@@ -66,7 +65,8 @@
                             <filename>machines/qemu</filename></ulink> if
                             your target architecture is supported and you
                             are going to develop and test your application
-                            using the QEMU emulator.
+                            using the
+                            <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>QEMU Emulator</ulink>.
                             </para></listitem>
                         <listitem><para>
                             Build your image if you cannot find a pre-built
@@ -91,8 +91,8 @@
                     section.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Secure the target root filesystem
-                    and the Cross-development toolchain</emphasis>:
+                    <emphasis>Secure the Target Root Filesystem
+                    and the Cross-Development Toolchain</emphasis>:
                     You need to find and download the appropriate root
                     filesystem and the cross-development toolchain.</para>
                     <para>You can find the tarballs for the root filesystem
@@ -118,22 +118,19 @@
                         section.
                         Another helpful resource for building an installer
                         is the
-                        <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
+                        "<ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>"
                         wiki page.
                     </note>
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Create and build your application</emphasis>:
+                    <emphasis>Create and Build Your Application</emphasis>:
                     At this point, you need to have source files for your
                     application.
                     Once you have the files, you can use the Eclipse IDE
                     to import them and build the project.
-                    If you are not using Eclipse, you need to use the
-                    cross-development tools you have installed to create
-                    the image.</para></listitem>
+                    </para></listitem>
                 <listitem><para>
-                    <emphasis>Deploy the image with the
-                    application</emphasis>:
+                    <emphasis>Deploy the Image With the Application</emphasis>:
                     Using the Eclipse IDE, you can deploy your image to the
                     hardware or to QEMU through the project's preferences.
                     You can also use Eclipse to load and test your image
@@ -144,7 +141,7 @@
                     for information on using QEMU.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Test and debug the application</emphasis>:
+                    <emphasis>Test and Debug the Application</emphasis>:
                     Once your application is deployed, you need to test it.
                     Within the Eclipse IDE, you can use the debugging
                     environment along with supported performance enhancing
@@ -179,25 +176,25 @@
             collection of power data, collection of latency data, and
             collection of performance data.
             <note>
-                This release of the Yocto Project supports both the Neon
-                and Mars versions of the Eclipse IDE.
-                This section provides information on how to use the Neon
+                This release of the Yocto Project supports both the Oxygen
+                and Neon versions of the Eclipse IDE.
+                This section provides information on how to use the Oxygen
                 release with the Yocto Project.
-                For information on how to use the Mars version of Eclipse
+                For information on how to use the Neon version of Eclipse
                 with the Yocto Project, see
-                "<link linkend='sdk-appendix-latest-yp-eclipse-plug-in'>Appendix C</link>.
+                "<link linkend='sdk-appendix-neon-yp-eclipse-plug-in'>Appendix D</link>".
              </note>
         </para>
 
-        <section id='neon-setting-up-the-eclipse-ide'>
-            <title>Setting Up the Neon Version of the Eclipse IDE</title>
+        <section id='oxygen-setting-up-the-eclipse-ide'>
+            <title>Setting Up the Oxygen Version of the Eclipse IDE</title>
 
             <para>
                 To develop within the Eclipse IDE, you need to do the
                 following:
                 <orderedlist>
                     <listitem><para>
-                        Install the Neon version of the Eclipse IDE.
+                        Install the Oxygen version of the Eclipse IDE.
                         </para></listitem>
                     <listitem><para>
                         Configure the Eclipse IDE.
@@ -217,17 +214,17 @@
                 </note>
             </para>
 
-            <section id='neon-installing-eclipse-ide'>
-                <title>Installing the Neon Eclipse IDE</title>
+            <section id='oxygen-installing-eclipse-ide'>
+                <title>Installing the Oxygen Eclipse IDE</title>
 
                 <para>
                     Follow these steps to locate, install, and configure
-                    Neon Eclipse:
+                    Oxygen Eclipse:
                     <orderedlist>
                         <listitem><para>
-                            <emphasis>Locate the Neon Download:</emphasis>
+                            <emphasis>Locate the Oxygen Download:</emphasis>
                             Open a browser and go to
-                            <ulink url='http://www.eclipse.org/neon/'>http://www.eclipse.org/neon/</ulink>.
+                            <ulink url='http://www.eclipse.org/oxygen/'>http://www.eclipse.org/oxygen/</ulink>.
                             </para></listitem>
                         <listitem><para>
                             <emphasis>Download the Tarball:</emphasis>
@@ -262,36 +259,50 @@
                             </para></listitem>
                         <listitem><para>
                             <emphasis>Install the Software:</emphasis>
-                            Accept the default "cpp-neon" directory and
-                            click "Install".
-                            Accept any license agreements and approve any
-                            certificates.
+                            Click "Install" to begin the installation.
+                            Accept all the certificates and any license
+                            agreements.
+                            Click "Install" again to finish the installation.
                             </para></listitem>
                         <listitem><para>
-                            <emphasis>Launch Neon:</emphasis>
-                            Click the "Launch" button and accept the
-                            default "workspace".
+                            <emphasis>Launch Oxygen:</emphasis>
+                            Accept the default "workspace" and click the
+                            "Launch" button.
+                            You should see the Eclipse welcome page from which
+                            can click "workbench" to enter your workspace.
                             </para></listitem>
                     </orderedlist>
                 </para>
             </section>
 
-            <section id='neon-configuring-the-mars-eclipse-ide'>
-                <title>Configuring the Neon Eclipse IDE</title>
+            <section id='oxygen-configuring-the-eclipse-ide'>
+                <title>Configuring the Oxygen Eclipse IDE</title>
 
                 <para>
-                    Follow these steps to configure the Neon Eclipse IDE.
-                    <note>
-                        Depending on how you installed Eclipse and what
-                        you have already done, some of the options will
-                        not appear.
-                        If you cannot find an option as directed by the
-                        manual, it has already been installed.
+                    Follow these steps to configure the Oxygen Eclipse IDE.
+                    <note><title>Notes</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                Depending on how you installed Eclipse and what
+                                you have already done, some of the options will
+                                not appear.
+                                If you cannot find an option as directed by the
+                                manual, it has already been installed.
+                                </para></listitem>
+                            <listitem><para>
+                                If you want to see all items regardless of
+                                whether they are installed or not, deselect the
+                                "Hide items that are already installed"
+                                check box.
+                                </para></listitem>
+                        </itemizedlist>
                     </note>
                     <orderedlist>
                         <listitem><para>
                             Be sure Eclipse is running and you are in your
                             workbench.
+                            Just click "workbench" if you are not in your
+                            default workspace.
                             </para></listitem>
                         <listitem><para>
                             Select "Install New Software" from the "Help"
@@ -299,7 +310,7 @@
                             </para></listitem>
                         <listitem><para>
                             Select
-                            "Neon - http://download.eclipse.org/releases/neon"
+                            "Oxygen - http://download.eclipse.org/releases/oxygen"
                             from the "Work with:" pull-down menu.
                             </para></listitem>
                         <listitem><para>
@@ -331,28 +342,29 @@
                             </para></listitem>
                         <listitem><para>
                             Complete the installation by clicking through
-                            appropriate "Next" and "Finish" buttons.
+                            appropriate "Next" and "Finish" buttons and then
+                            restart the Eclipse IDE.
                             </para></listitem>
                     </orderedlist>
                 </para>
             </section>
 
-            <section id='neon-installing-the-eclipse-yocto-plug-in'>
-                <title>Installing or Accessing the Neon Eclipse Yocto Plug-in</title>
+            <section id='oxygen-installing-the-eclipse-yocto-plug-in'>
+                <title>Installing or Accessing the Oxygen Eclipse Yocto Plug-in</title>
 
                 <para>
                     You can install the Eclipse Yocto Plug-in into the
                     Eclipse IDE one of two ways:  use the Yocto Project's
-                    Eclipse Update site to install the pre-built plug-in
+                    Eclipse Update site to install the pre-built plug-in,
                     or build and install the plug-in from the latest
                     source code.
                 </para>
 
-                <section id='neon-new-software'>
+                <section id='oxygen-new-software'>
                     <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
 
                     <para>
-                        To install the Neon Eclipse Yocto Plug-in from the
+                        To install the Oxygen Eclipse Yocto Plug-in from the
                         update site, follow these steps:
                         <orderedlist>
                             <listitem><para>
@@ -367,17 +379,15 @@
                                 </para></listitem>
                             <listitem><para>
                                 Enter
-                                <filename>&ECLIPSE_DL_PLUGIN_URL;/neon</filename>
+                                <filename>&ECLIPSE_DL_PLUGIN_URL;/oxygen</filename>
                                 in the URL field and provide a meaningful
                                 name in the "Name" field.
                                 </para></listitem>
                             <listitem><para>
-                                Click "OK" to have the entry added
-                                to the "Work with:" drop-down list.
-                                </para></listitem>
-                            <listitem><para>
-                                Select the entry for the plug-in
-                                from the "Work with:" drop-down list.
+                                Click "OK" to have the entry automatically
+                                populate the "Work with:" field and to have
+                                the items for installation appear in the window
+                                below.
                                 </para></listitem>
                             <listitem><para>
                                 Check the boxes next to the following:
@@ -401,16 +411,21 @@
                     </para>
                 </section>
 
-                <section id='neon-zip-file-method'>
+                <section id='oxygen-zip-file-method'>
                     <title>Installing the Plug-in Using the Latest Source Code</title>
 
                     <para>
-                        To install the Neon Eclipse Yocto Plug-in from the
+                        To install the Oxygen Eclipse Yocto Plug-in from the
                         latest source code, follow these steps:
                         <orderedlist>
                             <listitem><para>
-                                Be sure your development system
-                                has JDK 1.8+
+                                Be sure your build host has JDK version 1.8
+                                or greater.
+                                On a Linux build host you can determine the
+                                version using the following command:
+                                <literallayout class='monospaced'>
+     $ java -version
+                                </literallayout>
                                 </para></listitem>
                             <listitem><para>
                                 Install X11-related packages:
@@ -423,19 +438,19 @@
                                 Git repository with:
                                 <literallayout class='monospaced'>
      $ cd ~
-     $ git clone git://git.yoctoproject.org/eclipse-poky
+     $ git clone git://git.yoctoproject.org/eclipse-yocto
                                 </literallayout>
                                 </para></listitem>
                             <listitem><para>
                                 Use Git to create the correct tag:
                                 <literallayout class='monospaced'>
-     $ cd ~/eclipse-poky
-     $ git checkout neon/yocto-&DISTRO;
+     $ cd ~/eclipse-yocto
+     $ git checkout -b oxygen/&DISTRO_NAME_NO_CAP; remotes/origin/oxygen/&DISTRO_NAME_NO_CAP;
                                 </literallayout>
                                 This creates a local tag named
-                                <filename>neon/yocto-&DISTRO;</filename>
+                                <filename>oxygen/&DISTRO_NAME_NO_CAP;</filename>
                                 based on the branch
-                                <filename>origin/neon-master</filename>.
+                                <filename>origin/oxygen/&DISTRO_NAME_NO_CAP;</filename>.
                                 You are put into a detached HEAD state,
                                 which is fine since you are only going to
                                 be building and not developing.
@@ -469,11 +484,11 @@
                                 <para>
                                 Following is an example:
                                 <literallayout class='monospaced'>
-     $ ECLIPSE_HOME=/home/scottrif/eclipse-poky/scripts/eclipse ./build.sh -l neon/yocto-&DISTRO; master yocto-&DISTRO; 2>&amp;1 | tee build.log
+     $ ECLIPSE_HOME=/home/scottrif/eclipse-yocto/scripts/eclipse ./build.sh -l oxygen/&DISTRO_NAME_NO_CAP; master yocto-&DISTRO; 2>&amp;1 | tee build.log
                                 </literallayout>
                                 The previous example command adds the tag
                                 you need for
-                                <filename>mars/yocto-&DISTRO;</filename>
+                                <filename>oxygen/&DISTRO_NAME_NO_CAP;</filename>
                                 to <filename>HEAD</filename>, then tells
                                 the build script to use the local (-l) Git
                                 checkout for the build.
@@ -533,17 +548,17 @@
                     <para>
                         At this point you should be able to configure the
                         Eclipse Yocto Plug-in as described in the
-                        "<link linkend='mars-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
+                        "<link linkend='oxygen-configuring-the-eclipse-yocto-plug-in'>Configuring the Oxygen Eclipse Yocto Plug-in</link>"
                         section.
                     </para>
                 </section>
             </section>
 
-            <section id='neon-configuring-the-eclipse-yocto-plug-in'>
-                <title>Configuring the Neon Eclipse Yocto Plug-in</title>
+            <section id='oxygen-configuring-the-eclipse-yocto-plug-in'>
+                <title>Configuring the Oxygen Eclipse Yocto Plug-in</title>
 
                 <para>
-                    Configuring the Neon Eclipse Yocto Plug-in involves
+                    Configuring the Oxygen Eclipse Yocto Plug-in involves
                     setting the Cross Compiler options and the Target
                     options.
                     The configurations you choose become the default
@@ -555,7 +570,7 @@
                 <para>
                     To start, you need to do the following from within the
                     Eclipse IDE:
-                    <itemizedlist>
+                    <orderedlist>
                         <listitem><para>
                             Choose "Preferences" from the "Window" menu to
                             display the Preferences Dialog.
@@ -564,7 +579,7 @@
                             Click "Yocto Project SDK" to display
                             the configuration screen.
                             </para></listitem>
-                    </itemizedlist>
+                    </orderedlist>
                     The following sub-sections describe how to configure
                     the plug-in.
                     <note>
@@ -572,12 +587,12 @@
                         example for preparing a QEMU image for use with
                         Eclipse is referenced as the "wiki" and is linked
                         to the example on the
-                        <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
+                        "<ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>"
                         wiki page.
                     </note>
                 </para>
 
-                <section id='neon-configuring-the-cross-compiler-options'>
+                <section id='oxygen-configuring-the-cross-compiler-options'>
                     <title>Configuring the Cross-Compiler Options</title>
 
                     <para>
@@ -682,8 +697,7 @@
                                 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
                                 If so, the
                                 <filename>MY_QEMU_ROOTFS</filename>
-                                directory is found in the
-                                <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+                                directory is found in the Build Directory
                                 and you would browse to and select that
                                 directory (e.g.
                                 <filename>/home/scottrif/poky/build/MY_QEMU_ROOTFS</filename>).
@@ -708,9 +722,9 @@
                                 in the menu, you will need to build the
                                 image.
                                 See the
-                                "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
-                                section of the Yocto Project Quick Start
-                                for more information.
+                                "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-building-a-simple-image'>Building a Simple Image</ulink>"
+                                section of the Yocto Project Development Tasks
+                                Manual for more information.
                                 You can also see the
                                 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
                                 </para></listitem>
@@ -718,7 +732,7 @@
                     </para>
                 </section>
 
-                <section id='neon-configuring-the-target-options'>
+                <section id='oxygen-configuring-the-target-options'>
                     <title>Configuring the Target Options</title>
 
                     <para>
@@ -787,14 +801,14 @@
                     </para>
 
                     <para>
-                        Click the "Apply" and "OK" to save your plug-in
+                        Click "Apply and Close" to save your plug-in
                         configurations.
                     </para>
                 </section>
             </section>
         </section>
 
-        <section id='neon-creating-the-project'>
+        <section id='oxygen-creating-the-project'>
             <title>Creating the Project</title>
 
             <para>
@@ -818,20 +832,22 @@
                 display the source code, follow these steps:
                 <orderedlist>
                     <listitem><para>
-                        Select "C Project" from the "File -> New" menu.
+                        Select "C/C++ Project" from the "File -> New" menu.
                         </para></listitem>
                     <listitem><para>
-                        Expand
-                        <filename>Yocto Project SDK Autotools Project</filename>.
+                        Select "C Managed Build" from the available options and
+                        click "Next".
                         </para></listitem>
                     <listitem><para>
-                        Select <filename>Hello World ANSI C Autotools Projects</filename>.
+                        Expand "Yocto Project SDK Autotools Project".
+                        </para></listitem>
+                    <listitem><para>
+                        Select "Hello World ANSI C Autotools Projects".
                         This is an Autotools-based project based on a Yocto
                         template.
                         </para></listitem>
                     <listitem><para>
-                        Put a name in the
-                        <filename>Project name:</filename> field.
+                        Put a name in the "Project name:" field.
                         Do not use hyphens as part of the name
                         (e.g. <filename>hello</filename>).
                         </para></listitem>
@@ -857,12 +873,12 @@
             </para>
         </section>
 
-        <section id='neon-configuring-the-cross-toolchains'>
+        <section id='oxygen-configuring-the-cross-toolchains'>
             <title>Configuring the Cross-Toolchains</title>
 
             <para>
                 The earlier section,
-                "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>",
+                "<link linkend='oxygen-configuring-the-eclipse-yocto-plug-in'>Configuring the Oxygen Eclipse Yocto Plug-in</link>",
                 sets up the default project configurations.
                 You can override these settings for a given project by
                 following these steps:
@@ -877,7 +893,7 @@
                         Target Options for a project are inherited from
                         settings you provided using the Preferences Dialog
                         as described earlier in the
-                        "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
+                        "<link linkend='oxygen-configuring-the-eclipse-yocto-plug-in'>Configuring the Oxygen Eclipse Yocto Plug-in</link>"
                         section.
                         The Yocto Project Settings Dialog allows you to
                         override those default settings for a given
@@ -885,21 +901,15 @@
                         </para></listitem>
                     <listitem><para>
                         Make or verify your configurations for the
-                        project and click "OK".
+                        project and click "Apply and Close".
                         </para></listitem>
                     <listitem><para>
-                        Right-click in the navigation pane and
-                        select "Reconfigure Project" from the pop-up menu.
+                        Right-click in the navigation pane and select
+                        "Reconfigure Project" from the pop-up menu.
                         This selection reconfigures the project by running
-                        <filename>autogen.sh</filename> in the workspace
-                        for your project.
-                        The script also runs
-                        <filename>libtoolize</filename>,
-                        <filename>aclocal</filename>,
-                        <filename>autoconf</filename>,
-                        <filename>autoheader</filename>,
-                        <filename>automake --a</filename>, and
-                        <filename>./configure</filename>.
+                        <ulink url='https://en.wikipedia.org/wiki/GNU_Build_System'>Autotools GNU utility programs</ulink>
+                        such as Autoconf, Automake, and so forth in the
+                        workspace for your project.
                         Click on the "Console" tab beneath your source code
                         to see the results of reconfiguring your project.
                         </para></listitem>
@@ -907,13 +917,14 @@
             </para>
          </section>
 
-         <section id='neon-building-the-project'>
+         <section id='oxygen-building-the-project'>
             <title>Building the Project</title>
              <para>
                 To build the project select "Build All" from the
                 "Project" menu.
                 The console should update and you can note the
-                cross-compiler you are using.
+                cross-compiler you are using (i.e.
+                <filename>i586-poky-linux-gcc</filename> in this example).
                 <note>
                     When building "Yocto Project SDK Autotools" projects,
                     the Eclipse IDE might display error messages for
@@ -929,12 +940,12 @@
                             Select the project.
                             </para></listitem>
                         <listitem><para>
-                            Select "Folder" from the
-                            <filename>File > New</filename> menu.
+                            Select "Folder" from the "File -> New" menu.
                             </para></listitem>
                         <listitem><para>
-                            In the "New Folder" Dialog, select "Link to
-                            alternate location (linked folder)".
+                            In the "New Folder" Dialog, click the "Advanced"
+                            button and then activate "Link to
+                            alternate location (linked folder)" button.
                             </para></listitem>
                         <listitem><para>
                             Click "Browse" to navigate to the include
@@ -943,9 +954,6 @@
                             configuration preferences.
                             </para></listitem>
                         <listitem><para>
-                            Click "OK".
-                            </para></listitem>
-                        <listitem><para>
                             Click "Finish" to save the linked folder.
                             </para></listitem>
                     </orderedlist>
@@ -953,7 +961,7 @@
             </para>
         </section>
 
-        <section id='neon-starting-qemu-in-user-space-nfs-mode'>
+        <section id='oxygen-starting-qemu-in-user-space-nfs-mode'>
             <title>Starting QEMU in User-Space NFS Mode</title>
 
             <para>
@@ -987,8 +995,8 @@
                             <filename>rpcbind</filename>, follow the
                             suggestions to get the service running.
                             As an example, on a new Ubuntu 16.04 LTS
-                            installation, you must do the following in
-                            order to get QEMU to launch:
+                            installation, you must do the following in a new
+                            shell in order to get QEMU to launch:
                             <literallayout class='monospaced'>
      $ sudo apt-get install rpcbind
                             </literallayout>
@@ -1032,7 +1040,7 @@
             </para>
         </section>
 
-        <section id='neon-deploying-and-debugging-the-application'>
+        <section id='oxygen-deploying-and-debugging-the-application'>
             <title>Deploying and Debugging the Application</title>
 
             <para>
@@ -1186,7 +1194,7 @@
             </para>
         </section>
 
-        <section id='neon-using-Linuxtools'>
+        <section id='oxygen-using-Linuxtools'>
             <title>Using Linuxtools</title>
 
             <para>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
index 444d816..5215a9d 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
@@ -28,7 +28,7 @@
         In addition to the functionality available through
         <filename>devtool</filename>, you can alternatively make use of the
         toolchain directly, for example from Makefile, Autotools, and
-        Eclipse-based projects.
+        <trademark class='trade'>Eclipse</trademark>-based projects.
         See the
         "<link linkend='sdk-working-projects'>Using the SDK Toolchain Directly</link>"
         chapter for more information.
@@ -54,29 +54,29 @@
         </para>
     </section>
 
-    <section id='sdk-setting-up-to-use-the-extensible-sdk'>
-        <title>Setting Up to Use the Extensible SDK</title>
+    <section id='sdk-installing-the-extensible-sdk'>
+        <title>Installing the Extensible SDK</title>
 
         <para>
-            The first thing you need to do is install the SDK on your host
-            development machine by running the <filename>*.sh</filename>
-            installation script.
+            The first thing you need to do is install the SDK on your
+            <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>Build Host</ulink>
+            by running the <filename>*.sh</filename> installation script.
         </para>
 
         <para>
             You can download a tarball installer, which includes the
             pre-built toolchain, the <filename>runqemu</filename>
             script, the internal build system, <filename>devtool</filename>,
-            and support files from the appropriate directory under
-            <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
-            Toolchains are available for 32-bit and 64-bit x86 development
-            systems from the <filename>i686</filename> and
-            <filename>x86_64</filename> directories, respectively.
+            and support files from the appropriate
+            <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'>toolchain</ulink>
+            directory within the Index of Releases.
+            Toolchains are available for several 32-bit and 64-bit
+            architectures with the <filename>x86_64</filename> directories,
+            respectively.
             The toolchains the Yocto Project provides are based off the
-            <filename>core-image-sato</filename> image and contain
+            <filename>core-image-sato</filename> and
+            <filename>core-image-minimal</filename> images and contain
             libraries appropriate for developing against that image.
-            Each type of development system supports five or more target
-            architectures.
         </para>
 
         <para>
@@ -85,6 +85,7 @@
             filename and then is immediately followed by a string
             representing the target architecture.
             An extensible SDK has the string "-ext" as part of the name.
+            Following is the general form:
             <literallayout class='monospaced'>
      poky-glibc-<replaceable>host_system</replaceable>-<replaceable>image_type</replaceable>-<replaceable>arch</replaceable>-toolchain-ext-<replaceable>release_version</replaceable>.sh
 
@@ -93,14 +94,15 @@
 
                     i686 or x86_64.
 
-         <replaceable>image_type</replaceable> is the image for which the SDK was built.
+         <replaceable>image_type</replaceable> is the image for which the SDK was built:
+
+                    core-image-sato or core-image-minimal
 
          <replaceable>arch</replaceable> is a string representing the tuned target architecture:
 
-                    i586, x86_64, powerpc, mips, armv7a or armv5te
+                    aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon
 
-         <replaceable>release_version</replaceable> is a string representing the release number of the
-                Yocto Project:
+         <replaceable>release_version</replaceable> is a string representing the release number of the Yocto Project:
 
                     &DISTRO;, &DISTRO;+snapshot
             </literallayout>
@@ -131,9 +133,10 @@
             home directory.
             You can choose to install the extensible SDK in any location when
             you run the installer.
-            However, the location you choose needs to be writable for whichever
-            users need to use the SDK, since files will need to be written
-            under that directory during the normal course of operation.
+            However, because files need to be written under that directory
+            during the normal course of operation, the location you choose
+            for installation must be writable for whichever
+            users need to use the SDK.
         </para>
 
         <para>
@@ -141,28 +144,34 @@
             toolchain tarball for a 64-bit x86 development host system and
             a 64-bit x86 target architecture.
             The example assumes the SDK installer is located in
-            <filename>~/Downloads/</filename>.
+            <filename>~/Downloads/</filename> and has execution rights.
             <note>
                 If you do not have write permissions for the directory
                 into which you are installing the SDK, the installer
                 notifies you and exits.
-                Be sure you have write permissions in the directory and
-                run the installer again.
+                For that case, set up the proper permissions in the directory
+                and run the installer again.
             </note>
             <literallayout class='monospaced'>
-     $ ./poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-&DISTRO;.sh
-     Poky (Yocto Project Reference Distro) Extensible SDK installer version &DISTRO;
-     ===================================================================================
+     $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh
+     Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5
+     ==========================================================================
      Enter target directory for SDK (default: ~/poky_sdk):
      You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed[Y/n]? Y
-     Extracting SDK......................................................................done
+     Extracting SDK..............done
      Setting it up...
      Extracting buildtools...
      Preparing build system...
+     Parsing recipes: 100% |##################################################################| Time: 0:00:52
+     Initialising tasks: 100% |###############################################################| Time: 0:00:00
+     Checking sstate mirror object availability: 100% |#######################################| Time: 0:00:00
+     Loading cache: 100% |####################################################################| Time: 0:00:00
+     Initialising tasks: 100% |###############################################################| Time: 0:00:00
      done
      SDK has been successfully set up and is ready to be used.
      Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
       $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux
+
             </literallayout>
         </para>
     </section>
@@ -172,7 +181,7 @@
 
         <para>
             Once you have the SDK installed, you must run the SDK environment
-            setup script before you can actually use it.
+            setup script before you can actually use the SDK.
             This setup script resides in the directory you chose when you
             installed the SDK, which is either the default
             <filename>poky_sdk</filename> directory or the directory you
@@ -196,32 +205,13 @@
      SDK environment now set up; additionally you may now run devtool to perform development tasks.
      Run devtool --help for further details.
             </literallayout>
-            When you run the setup script, many environment variables are
-            defined:
-            <literallayout class='monospaced'>
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKTARGETSYSROOT'><filename>SDKTARGETSYSROOT</filename></ulink> - The path to the sysroot used for cross-compilation
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-PKG_CONFIG_PATH'><filename>PKG_CONFIG_PATH</filename></ulink> - The path to the target pkg-config files
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_SITE'><filename>CONFIG_SITE</filename></ulink> - A GNU autoconf site file preconfigured for the target
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink> - The minimal command and arguments to run the C compiler
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CXX'><filename>CXX</filename></ulink> - The minimal command and arguments to run the C++ compiler
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CPP'><filename>CPP</filename></ulink> - The minimal command and arguments to run the C preprocessor
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-AS'><filename>AS</filename></ulink> - The minimal command and arguments to run the assembler
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink> - The minimal command and arguments to run the linker
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-GDB'><filename>GDB</filename></ulink> - The minimal command and arguments to run the GNU Debugger
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-STRIP'><filename>STRIP</filename></ulink> - The minimal command and arguments to run 'strip', which strips symbols
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-RANLIB'><filename>RANLIB</filename></ulink> - The minimal command and arguments to run 'ranlib'
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-OBJCOPY'><filename>OBJCOPY</filename></ulink> - The minimal command and arguments to run 'objcopy'
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-OBJDUMP'><filename>OBJDUMP</filename></ulink> - The minimal command and arguments to run 'objdump'
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-AR'><filename>AR</filename></ulink> - The minimal command and arguments to run 'ar'
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-NM'><filename>NM</filename></ulink> - The minimal command and arguments to run 'nm'
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></ulink> - The toolchain binary prefix for the target tools
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CROSS_COMPILE'><filename>CROSS_COMPILE</filename></ulink> - The toolchain binary prefix for the target tools
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink> - The minimal arguments for GNU configure
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'><filename>CFLAGS</filename></ulink> - Suggested C flags
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'><filename>CXXFLAGS</filename></ulink> - Suggested C++ flags
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-LDFLAGS'><filename>LDFLAGS</filename></ulink> - Suggested linker flags when you use CC to link
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CPPFLAGS'><filename>CPPFLAGS</filename></ulink> - Suggested preprocessor flags
-            </literallayout>
+            Running the setup script defines many environment variables needed
+            in order to use the SDK (e.g. <filename>PATH</filename>,
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>,
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink>,
+            and so forth).
+            If you want to see all the environment variables the script
+            exports, examine the installation file itself.
         </para>
     </section>
 
@@ -240,15 +230,15 @@
                 the extensible SDK.
                 You can use <filename>devtool</filename> to help you easily
                 develop any project whose build output must be part of an
-                image built using the OpenEmbedded build system.
+                image built using the build system.
             </note>
         </para>
 
         <para>
             The <filename>devtool</filename> command line is organized
             similarly to
-            <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink> in that it has a
-            number of sub-commands for each function.
+            <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> in that it
+            has a number of sub-commands for each function.
             You can run <filename>devtool --help</filename> to see all the
             commands.
             <note>
@@ -260,8 +250,8 @@
         </para>
 
         <para>
-            Three <filename>devtool</filename> subcommands that provide
-            entry-points into development are:
+            Three <filename>devtool</filename> subcommands exist that provide
+            entry-points into development:
             <itemizedlist>
                 <listitem><para>
                     <emphasis><filename>devtool add</filename></emphasis>:
@@ -278,17 +268,17 @@
                     an updated set of source files.
                     </para></listitem>
             </itemizedlist>
-            As with the OpenEmbedded build system, "recipes" represent software
-            packages within <filename>devtool</filename>.
+            As with the build system, "recipes" represent software packages
+            within <filename>devtool</filename>.
             When you use <filename>devtool add</filename>, a recipe is
             automatically created.
             When you use <filename>devtool modify</filename>, the specified
-            existing recipe is used in order to determine where to get the source
-            code and how to patch it.
+            existing recipe is used in order to determine where to get the
+            source code and how to patch it.
             In both cases, an environment is set up so that when you build the
             recipe a source tree that is under your control is used in order to
             allow you to make changes to the source as desired.
-            By default, both new recipes and the source go into a "workspace"
+            By default, new recipes and the source go into a "workspace"
             directory under the SDK.
         </para>
 
@@ -335,10 +325,10 @@
                         generate a recipe based on existing source code.</para>
 
                         <para>In a shared development environment, it is
-                        typical where other developers are responsible for
+                        typical for other developers to be responsible for
                         various areas of source code.
                         As a developer, you are probably interested in using
-                        that source code as part of your development using
+                        that source code as part of your development within
                         the Yocto Project.
                         All you need is access to the code, a recipe, and a
                         controlled area in which to do your work.</para>
@@ -346,138 +336,164 @@
                         <para>Within the diagram, three possible scenarios
                         feed into the <filename>devtool add</filename> workflow:
                         <itemizedlist>
-                            <listitem><para><emphasis>Left</emphasis>:
-                                The left scenario represents a common situation
-                                where the source code does not exist locally
-                                and needs to be extracted.
-                                In this situation, you just let it get
-                                extracted to the default workspace - you do not
-                                want it in some specific location outside of the
-                                workspace.
-                                Thus, everything you need will be located in the
-                                workspace:
+                            <listitem><para>
+                                <emphasis>Left</emphasis>:
+                                The left scenario in the figure represents a
+                                common situation where the source code does not
+                                exist locally and needs to be extracted.
+                                In this situation, the source code is extracted
+                                to the default workspace - you do not
+                                want the files in some specific location
+                                outside of the workspace.
+                                Thus, everything you need will be located in
+                                the workspace:
                                 <literallayout class='monospaced'>
      $ devtool add <replaceable>recipe fetchuri</replaceable>
                                 </literallayout>
                                 With this command, <filename>devtool</filename>
-                                creates a recipe and an append file in the
-                                workspace as well as extracts the upstream
-                                source files into a local Git repository also
-                                within the <filename>sources</filename> folder.
+                                extracts the upstream source files into a local
+                                Git repository within the
+                                <filename>sources</filename> folder.
+                                The command then creates a recipe named
+                                <replaceable>recipe</replaceable> and a
+                                corresponding append file in the workspace.
+                                If you do not provide
+                                <replaceable>recipe</replaceable>, the command
+                                makes an attempt to determine the recipe name.
                                 </para></listitem>
-                            <listitem><para><emphasis>Middle</emphasis>:
-                                The middle scenario also represents a situation where
-                                the source code does not exist locally.
+                            <listitem><para>
+                                <emphasis>Middle</emphasis>:
+                                The middle scenario in the figure also
+                                represents a situation where the source code
+                                does not exist locally.
                                 In this case, the code is again upstream
                                 and needs to be extracted to some
                                 local area - this time outside of the default
                                 workspace.
-                                If required, <filename>devtool</filename>
-                                always creates
-                                a Git repository locally during the extraction.
+                                <note>
+                                    If required, <filename>devtool</filename>
+                                    always creates
+                                    a Git repository locally during the
+                                    extraction.
+                                </note>
                                 Furthermore, the first positional argument
-                                <replaceable>srctree</replaceable> in this case
-                                identifies where the
+                                <replaceable>srctree</replaceable> in this
+                                case identifies where the
                                 <filename>devtool add</filename> command
                                 will locate the extracted code outside of the
-                                workspace:
+                                workspace.
+                                You need to specify an empty directory:
                                 <literallayout class='monospaced'>
      $ devtool add <replaceable>recipe srctree fetchuri</replaceable>
                                 </literallayout>
                                 In summary, the source code is pulled from
-                                <replaceable>fetchuri</replaceable> and extracted
-                                into the location defined by
+                                <replaceable>fetchuri</replaceable> and
+                                extracted into the location defined by
                                 <replaceable>srctree</replaceable> as a local
                                 Git repository.</para>
 
-                                <para>Within workspace, <filename>devtool</filename>
-                                creates both the recipe and an append file
-                                for the recipe.
+                                <para>Within workspace,
+                                <filename>devtool</filename> creates a
+                                recipe named <replaceable>recipe</replaceable>
+                                along with an associated append file.
                                 </para></listitem>
-                            <listitem><para><emphasis>Right</emphasis>:
-                                The right scenario represents a situation
-                                where the source tree (srctree) has been
+                            <listitem><para>
+                                <emphasis>Right</emphasis>:
+                                The right scenario in the figure represents a
+                                situation where the
+                                <replaceable>srctree</replaceable> has been
                                 previously prepared outside of the
-                                <filename>devtool</filename> workspace.
-                                </para>
+                                <filename>devtool</filename> workspace.</para>
 
-                                <para>The following command names the recipe
-                                and identifies where the existing source tree
-                                is located:
+                                <para>The following command provides a new
+                                recipe name and identifies the existing source
+                                tree location:
                                 <literallayout class='monospaced'>
      $ devtool add <replaceable>recipe srctree</replaceable>
                                 </literallayout>
-                                The command examines the source code and creates
-                                a recipe for it placing the recipe into the
-                                workspace.</para>
+                                The command examines the source code and
+                                creates a recipe named
+                                <replaceable>recipe</replaceable> for the code
+                                and places the recipe into the workspace.
+                                </para>
 
-                                <para>Because the extracted source code already exists,
-                                <filename>devtool</filename> does not try to
-                                relocate it into the workspace - just the new
-                                the recipe is placed in the workspace.</para>
+                                <para>Because the extracted source code already
+                                exists, <filename>devtool</filename> does not
+                                try to relocate the source code into the
+                                workspace - only the new recipe is placed
+                                in the workspace.</para>
 
                                 <para>Aside from a recipe folder, the command
-                                also creates an append folder and places an initial
-                                <filename>*.bbappend</filename> within.
+                                also creates an associated append folder and
+                                places an initial
+                                <filename>*.bbappend</filename> file within.
                                 </para></listitem>
                         </itemizedlist>
                         </para></listitem>
-                    <listitem><para><emphasis>Edit the Recipe</emphasis>:
-                        At this point, you can use <filename>devtool edit-recipe</filename>
+                    <listitem><para>
+                        <emphasis>Edit the Recipe</emphasis>:
+                        You can use <filename>devtool edit-recipe</filename>
                         to open up the editor as defined by the
                         <filename>$EDITOR</filename> environment variable
                         and modify the file:
                         <literallayout class='monospaced'>
      $ devtool edit-recipe <replaceable>recipe</replaceable>
                         </literallayout>
-                        From within the editor, you can make modifications to the
-                        recipe that take affect when you build it later.
+                        From within the editor, you can make modifications to
+                        the recipe that take affect when you build it later.
                         </para></listitem>
-                    <listitem><para><emphasis>Build the Recipe or Rebuild the Image</emphasis>:
-                        At this point in the flow, the next step you
-                        take depends on what you are going to do with
-                        the new code.</para>
-                        <para>If you need to take the build output and eventually
-                        move it to the target hardware, you would use
-                        <filename>devtool build</filename>:
+                    <listitem><para>
+                        <emphasis>Build the Recipe or Rebuild the Image</emphasis>:
+                        The next step you take depends on what you are going
+                        to do with the new code.</para>
+
+                        <para>If you need to eventually move the build output
+                        to the target hardware, use the following
+                        <filename>devtool</filename> command:
                         <literallayout class='monospaced'>
      $ devtool build <replaceable>recipe</replaceable>
                         </literallayout></para>
+
                         <para>On the other hand, if you want an image to
-                        contain the recipe's packages for immediate deployment
-                        onto a device (e.g. for testing purposes), you can use
+                        contain the recipe's packages from the workspace
+                        for immediate deployment onto a device (e.g. for
+                        testing purposes), you can use
                         the <filename>devtool build-image</filename> command:
                         <literallayout class='monospaced'>
      $ devtool build-image <replaceable>image</replaceable>
                         </literallayout>
                         </para></listitem>
-                    <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                    <listitem><para>
+                        <emphasis>Deploy the Build Output</emphasis>:
                         When you use the <filename>devtool build</filename>
                         command to build out your recipe, you probably want to
-                        see if the resulting build output works as expected on target
-                        hardware.
+                        see if the resulting build output works as expected
+                        on the target hardware.
                         <note>
                             This step assumes you have a previously built
                             image that is already either running in QEMU or
-                            running on actual hardware.
-                            Also, it is assumed that for deployment of the image
-                            to the target, SSH is installed in the image and if
-                            the image is running on real hardware that you have
-                            network access to and from your development machine.
+                            is running on actual hardware.
+                            Also, it is assumed that for deployment of the
+                            image to the target, SSH is installed in the image
+                            and, if the image is running on real hardware,
+                            you have network access to and from your
+                            development machine.
                         </note>
-                        You can deploy your build output to that target hardware by
-                        using the <filename>devtool deploy-target</filename> command:
+                        You can deploy your build output to that target
+                        hardware by using the
+                        <filename>devtool deploy-target</filename> command:
                         <literallayout class='monospaced'>
      $ devtool deploy-target <replaceable>recipe target</replaceable>
                         </literallayout>
-                        The <replaceable>target</replaceable> is a live target machine
-                        running as an SSH server.</para>
+                        The <replaceable>target</replaceable> is a live target
+                        machine running as an SSH server.</para>
 
-                        <para>You can, of course, also deploy the image you build
-                        using the <filename>devtool build-image</filename> command
-                        to actual hardware.
-                        However, <filename>devtool</filename> does not provide a
-                        specific command that allows you to do this.
+                        <para>You can, of course, also deploy the image you
+                        build to actual hardware by using the
+                        <filename>devtool build-image</filename> command.
+                        However, <filename>devtool</filename> does not provide
+                        a specific command that allows you to deploy the
+                        image to actual hardware.
                         </para></listitem>
                     <listitem><para>
                         <emphasis>Finish Your Work With the Recipe</emphasis>:
@@ -494,8 +510,9 @@
                             committed to the Git repository in the source tree.
                         </note></para>
 
-                        <para>As mentioned, the <filename>devtool finish</filename>
-                        command moves the final recipe to its permanent layer.
+                        <para>As mentioned, the
+                        <filename>devtool finish</filename> command moves the
+                        final recipe to its permanent layer.
                         </para>
 
                         <para>As a final process of the
@@ -520,21 +537,20 @@
 
             <para>
                 The <filename>devtool modify</filename> command prepares the
-                way to work on existing code that already has a recipe in
-                place.
-                The command is flexible enough to allow you to extract code,
-                specify the existing recipe, and keep track of and gather any
-                patch files from other developers that are
-                associated with the code.
+                way to work on existing code that already has a local recipe in
+                place that is used to build the software.
+                The command is flexible enough to allow you to extract code
+                from an upstream source, specify the existing recipe, and
+                keep track of and gather any patch files from other developers
+                that are associated with the code.
             </para>
 
             <para>
                 Depending on your particular scenario, the arguments and options
                 you use with <filename>devtool modify</filename> form different
                 combinations.
-                The following diagram shows common development flows
-                you would use with the <filename>devtool modify</filename>
-                command:
+                The following diagram shows common development flows for the
+                <filename>devtool modify</filename> command:
             </para>
 
             <para>
@@ -543,140 +559,181 @@
 
             <para>
                 <orderedlist>
-                    <listitem><para><emphasis>Preparing to Modify the Code</emphasis>:
+                    <listitem><para>
+                        <emphasis>Preparing to Modify the Code</emphasis>:
                         The top part of the flow shows three scenarios by which
                         you could use <filename>devtool modify</filename> to
                         prepare to work on source files.
                         Each scenario assumes the following:
                         <itemizedlist>
-                            <listitem><para>The recipe exists in some layer external
+                            <listitem><para>
+                                The recipe exists locally in a layer external
                                 to the <filename>devtool</filename> workspace.
                                 </para></listitem>
-                            <listitem><para>The source files exist upstream in an
+                            <listitem><para>
+                                The source files exist either upstream in an
                                 un-extracted state or locally in a previously
                                 extracted state.
                                 </para></listitem>
                         </itemizedlist>
                         The typical situation is where another developer has
-                        created some layer for use with the Yocto Project and
+                        created a layer for use with the Yocto Project and
                         their recipe already resides in that layer.
                         Furthermore, their source code is readily available
                         either upstream or locally.
                         <itemizedlist>
-                            <listitem><para><emphasis>Left</emphasis>:
-                                The left scenario represents a common situation
-                                where the source code does not exist locally
-                                and needs to be extracted.
+                            <listitem><para>
+                                <emphasis>Left</emphasis>:
+                                The left scenario in the figure represents a
+                                common situation where the source code does
+                                not exist locally and it needs to be extracted
+                                from an upstream source.
                                 In this situation, the source is extracted
-                                into the default workspace location.
+                                into the default <filename>devtool</filename>
+                                workspace location.
                                 The recipe, in this scenario, is in its own
                                 layer outside the workspace
                                 (i.e.
                                 <filename>meta-</filename><replaceable>layername</replaceable>).
                                 </para>
 
-                                <para>The following command identifies the recipe
-                                and by default extracts the source files:
+                                <para>The following command identifies the
+                                recipe and, by default, extracts the source
+                                files:
                                 <literallayout class='monospaced'>
      $ devtool modify <replaceable>recipe</replaceable>
                                 </literallayout>
-                                Once <filename>devtool</filename>locates the recipe,
-                                it uses the
+                                Once <filename>devtool</filename>locates the
+                                recipe, <filename>devtool</filename> uses the
+                                recipe's
                                 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
-                                variable to locate the source code and
-                                any local patch files from other developers are
-                                located.
-                                <note>
-                                    You cannot provide an URL for
-                                    <replaceable>srctree</replaceable> when using the
-                                    <filename>devtool modify</filename> command.
-                                </note>
-                                With this scenario, however, since no
-                                <replaceable>srctree</replaceable> argument exists, the
-                                <filename>devtool modify</filename> command by default
-                                extracts the source files to a Git structure.
-                                Furthermore, the location for the extracted source is the
-                                default area within the workspace.
-                                The result is that the command sets up both the source
-                                code and an append file within the workspace with the
-                                recipe remaining in its original location.
+                                statements to locate the source code and any
+                                local patch files from other developers.</para>
+
+                                <para>With this scenario, no
+                                <replaceable>srctree</replaceable> argument
+                                exists.
+                                Consequently, the default behavior of the
+                                <filename>devtool modify</filename> command is
+                                to extract the source files pointed to by the
+                                <filename>SRC_URI</filename> statements into a
+                                local Git structure.
+                                Furthermore, the location for the extracted
+                                source is the default area within the
+                                <filename>devtool</filename> workspace.
+                                The result is that the command sets up both
+                                the source code and an append file within the
+                                workspace while the recipe remains in its
+                                original location.
                                 </para></listitem>
-                            <listitem><para><emphasis>Middle</emphasis>:
-                                The middle scenario represents a situation where
-                                the source code also does not exist locally.
+                            <listitem><para>
+                                <emphasis>Middle</emphasis>:
+                                The middle scenario in the figure represents a
+                                situation where the source code also does not
+                                exist locally.
                                 In this case, the code is again upstream
                                 and needs to be extracted to some
                                 local area as a Git repository.
-                                The recipe, in this scenario, is again in its own
-                                layer outside the workspace.</para>
+                                The recipe, in this scenario, is again local
+                                and in its own layer outside the workspace.
+                                </para>
 
                                 <para>The following command tells
                                 <filename>devtool</filename> what recipe with
-                                which to work and, in this case, identifies a local
-                                area for the extracted source files that is outside
-                                of the default workspace:
+                                which to work and, in this case, identifies a
+                                local area for the extracted source files that
+                                is outside of the default
+                                <filename>devtool</filename> workspace:
                                 <literallayout class='monospaced'>
      $ devtool modify <replaceable>recipe srctree</replaceable>
                                 </literallayout>
+                                <note>
+                                    You cannot provide a URL for
+                                    <replaceable>srctree</replaceable> using
+                                    the <filename>devtool</filename> command.
+                                </note>
                                 As with all extractions, the command uses
-                                the recipe's <filename>SRC_URI</filename> to locate the
-                                source files.
-                                Once the files are located, the command by default
-                                extracts them.
-                                Providing the <replaceable>srctree</replaceable>
-                                argument instructs <filename>devtool</filename> where
-                                to place the extracted source.</para>
+                                the recipe's <filename>SRC_URI</filename>
+                                statements to locate the source files and any
+                                associated patch files.
+                                Once the files are located, the command by
+                                default extracts them into
+                                <replaceable>srctree</replaceable>.</para>
 
-                                <para>Within workspace, <filename>devtool</filename>
-                                creates an append file for the recipe.
+                                <para>Within workspace,
+                                <filename>devtool</filename> creates an append
+                                file for the recipe.
                                 The recipe remains in its original location but
-                                the source files are extracted to the location you
-                                provided with <replaceable>srctree</replaceable>.
+                                the source files are extracted to the location
+                                you provide with
+                                <replaceable>srctree</replaceable>.
                                 </para></listitem>
-                            <listitem><para><emphasis>Right</emphasis>:
-                                The right scenario represents a situation
-                                where the source tree
-                                (<replaceable>srctree</replaceable>) exists as a
-                                previously extracted Git structure outside of
-                                the <filename>devtool</filename> workspace.
+                            <listitem><para>
+                                <emphasis>Right</emphasis>:
+                                The right scenario in the figure represents a
+                                situation where the source tree
+                                (<replaceable>srctree</replaceable>) already
+                                exists locally as a previously extracted Git
+                                structure outside of the
+                                <filename>devtool</filename> workspace.
                                 In this example, the recipe also exists
-                                elsewhere in its own layer.
+                                elsewhere locally in its own layer.
                                 </para>
 
                                 <para>The following command tells
                                 <filename>devtool</filename> the recipe
-                                with which to work, uses the "-n" option to indicate
-                                source does not need to be extracted, and uses
-                                <replaceable>srctree</replaceable> to point to the
-                                previously extracted source files:
+                                with which to work, uses the "-n" option to
+                                indicate source does not need to be extracted,
+                                and uses <replaceable>srctree</replaceable> to
+                                point to the previously extracted source files:
                                 <literallayout class='monospaced'>
      $ devtool modify -n <replaceable>recipe srctree</replaceable>
                                 </literallayout>
                                 </para>
 
                                 <para>Once the command finishes, it creates only
-                                an append file for the recipe in the workspace.
+                                an append file for the recipe in the
+                                <filename>devtool</filename> workspace.
                                 The recipe and the source code remain in their
                                 original locations.
                                 </para></listitem>
                             </itemizedlist>
                         </para></listitem>
-                    <listitem><para><emphasis>Edit the Source</emphasis>:
-                        Once you have used the <filename>devtool modify</filename>
-                        command, you are free to make changes to the source
-                        files.
+                    <listitem><para>
+                        <emphasis>Edit the Source</emphasis>:
+                        Once you have used the
+                        <filename>devtool modify</filename> command, you are
+                        free to make changes to the source files.
                         You can use any editor you like to make and save
                         your source code modifications.
                         </para></listitem>
-                    <listitem><para><emphasis>Build the Recipe</emphasis>:
-                        Once you have updated the source files, you can build
-                        the recipe.
+                    <listitem><para>
+                        <emphasis>Build the Recipe or Rebuild the Image</emphasis>:
+                        The next step you take depends on what you are going
+                        to do with the new code.</para>
+
+                        <para>If you need to eventually move the build output
+                        to the target hardware, use the following
+                        <filename>devtool</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool build <replaceable>recipe</replaceable>
+                        </literallayout></para>
+
+                        <para>On the other hand, if you want an image to
+                        contain the recipe's packages from the workspace
+                        for immediate deployment onto a device (e.g. for
+                        testing purposes), you can use
+                        the <filename>devtool build-image</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool build-image <replaceable>image</replaceable>
+                        </literallayout>
                         </para></listitem>
-                    <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                    <listitem><para>
+                        <emphasis>Deploy the Build Output</emphasis>:
                         When you use the <filename>devtool build</filename>
-                        command to build out your recipe, you probably want to see
-                        if the resulting build output works as expected on target
-                        hardware.
+                        command to build out your recipe, you probably want to
+                        see if the resulting build output works as expected
+                        on target hardware.
                         <note>
                             This step assumes you have a previously built
                             image that is already either running in QEMU or
@@ -686,19 +743,22 @@
                             the image is running on real hardware that you have
                             network access to and from your development machine.
                         </note>
-                        You can deploy your build output to that target hardware by
-                        using the <filename>devtool deploy-target</filename> command:
+                        You can deploy your build output to that target
+                        hardware by using the
+                        <filename>devtool deploy-target</filename> command:
                         <literallayout class='monospaced'>
      $ devtool deploy-target <replaceable>recipe target</replaceable>
                         </literallayout>
-                        The <replaceable>target</replaceable> is a live target machine
-                        running as an SSH server.</para>
+                        The <replaceable>target</replaceable> is a live target
+                        machine running as an SSH server.</para>
 
-                        <para>You can, of course, also deploy the image you build
-                        using the <filename>devtool build-image</filename> command
-                        to actual hardware.
-                        However, <filename>devtool</filename> does not provide a
-                        specific command that allows you to do this.
+                        <para>You can, of course, use other methods to deploy
+                        the image you built using the
+                        <filename>devtool build-image</filename> command to
+                        actual hardware.
+                        <filename>devtool</filename> does not provide
+                        a specific command to deploy the image to actual
+                        hardware.
                         </para></listitem>
                     <listitem><para>
                         <emphasis>Finish Your Work With the Recipe</emphasis>:
@@ -707,28 +767,30 @@
                         Git repository, updates the recipe to point to them
                         (or creates a <filename>.bbappend</filename> file to do
                         so, depending on the specified destination layer), and
-                        then resets the recipe so that the recipe is built normally
-                        rather than from the workspace.
+                        then resets the recipe so that the recipe is built
+                        normally rather than from the workspace.
                         <literallayout class='monospaced'>
      $ devtool finish <replaceable>recipe layer</replaceable>
                         </literallayout>
                         <note>
                             Any changes you want to turn into patches must be
-                            committed to the Git repository in the source tree.
+                            staged and committed within the local Git
+                            repository before you use the
+                            <filename>devtool finish</filename> command.
                         </note></para>
 
                         <para>Because there is no need to move the recipe,
                         <filename>devtool finish</filename> either updates the
                         original recipe in the original layer or the command
-                        creates a <filename>.bbappend</filename> in a different
-                        layer as provided by <replaceable>layer</replaceable>.
-                        </para>
+                        creates a <filename>.bbappend</filename> file in a
+                        different layer as provided by
+                        <replaceable>layer</replaceable>.</para>
 
                         <para>As a final process of the
                         <filename>devtool finish</filename> command, the state
                         of the standard layers and the upstream source is
                         restored so that you can build the recipe from those
-                        areas rather than the workspace.
+                        areas rather than from the workspace.
                         <note>
                             You can use the <filename>devtool reset</filename>
                             command to put things back should you decide you
@@ -745,22 +807,36 @@
             <title>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</title>
 
             <para>
-                The <filename>devtool upgrade</filename> command updates
-                an existing recipe so that you can build it for an updated
-                set of source files.
-                The command is flexible enough to allow you to specify
-                source code revision and versioning schemes, extract code into
-                or out of the <filename>devtool</filename> workspace, and
-                work with any source file forms that the fetchers support.
+                The <filename>devtool upgrade</filename> command upgrades
+                an existing recipe to that of a more up-to-date version
+                found upstream.
+                Throughout the life of software, recipes continually undergo
+                version upgrades by their upstream publishers.
+                You can use the <filename>devtool upgrade</filename>
+                workflow to make sure your recipes you are using for builds
+                are up-to-date with their upstream counterparts.
+                <note>
+                    Several methods exist by which you can upgrade recipes -
+                    <filename>devtool upgrade</filename> happens to be one.
+                    You can read about all the methods by which you can
+                    upgrade recipes in the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-upgrading-recipes'>Upgrading Recipes</ulink>"
+                    section of the Yocto Project Development Tasks Manual.
+                </note>
             </para>
 
             <para>
-                Depending on your particular scenario, the arguments and options
-                you use with <filename>devtool upgrade</filename> form different
-                combinations.
-                The following diagram shows a common development flow
-                you would use with the <filename>devtool modify</filename>
-                command:
+                The <filename>devtool upgrade</filename> command is flexible
+                enough to allow you to specify source code revision and
+                versioning schemes, extract code into or out of the
+                <filename>devtool</filename>
+                <ulink url='&YOCTO_DOCS_REF_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>,
+                and work with any source file forms that the fetchers support.
+            </para>
+
+            <para>
+                The following diagram shows the common development flow
+                used with the <filename>devtool upgrade</filename> command:
             </para>
 
             <para>
@@ -769,110 +845,142 @@
 
             <para>
                 <orderedlist>
-                    <listitem><para><emphasis>Initiate the Upgrade</emphasis>:
-                        The top part of the flow shows a typical scenario by which
-                        you could use <filename>devtool upgrade</filename>.
+                    <listitem><para>
+                        <emphasis>Initiate the Upgrade</emphasis>:
+                        The top part of the flow shows the typical scenario by
+                        which you use the <filename>devtool upgrade</filename>
+                        command.
                         The following conditions exist:
                         <itemizedlist>
-                            <listitem><para>The recipe exists in some layer external
+                            <listitem><para>
+                                The recipe exists in a local layer external
                                 to the <filename>devtool</filename> workspace.
                                 </para></listitem>
-                            <listitem><para>The source files for the new release
-                                exist adjacent to the same location pointed to by
+                            <listitem><para>
+                                The source files for the new release
+                                exist in the same location pointed to by
                                 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
-                                in the recipe (e.g. a tarball with the new version
-                                number in the name, or as a different revision in
-                                the upstream Git repository).
+                                in the recipe (e.g. a tarball with the new
+                                version number in the name, or as a different
+                                revision in the upstream Git repository).
                                 </para></listitem>
                         </itemizedlist>
                         A common situation is where third-party software has
                         undergone a revision so that it has been upgraded.
-                        The recipe you have access to is likely in your own layer.
+                        The recipe you have access to is likely in your own
+                        layer.
                         Thus, you need to upgrade the recipe to use the
                         newer version of the software:
                         <literallayout class='monospaced'>
      $ devtool upgrade -V <replaceable>version recipe</replaceable>
                         </literallayout>
-                        By default, the <filename>devtool upgrade</filename> command
-                        extracts source code into the <filename>sources</filename>
-                        directory in the workspace.
-                        If you want the code extracted to any other location, you
-                        need to provide the <replaceable>srctree</replaceable>
-                        positional argument with the command as follows:
+                        By default, the <filename>devtool upgrade</filename>
+                        command extracts source code into the
+                        <filename>sources</filename> directory in the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>.
+                        If you want the code extracted to any other location,
+                        you need to provide the
+                        <replaceable>srctree</replaceable> positional argument
+                        with the command as follows:
                         <literallayout class='monospaced'>
      $ devtool upgrade -V <replaceable>version recipe srctree</replaceable>
                         </literallayout>
-                        Also, in this example, the "-V" option is used to specify
-                        the new version.
+                        <note>
+                            In this example, the "-V" option specifies the new
+                            version.
+                            If you don't use "-V", the command upgrades the
+                            recipe to the latest version.
+                        </note>
                         If the source files pointed to by the
-                        <filename>SRC_URI</filename> statement in the recipe are
-                        in a Git repository, you must provide the "-S" option and
-                        specify a revision for the software.</para>
+                        <filename>SRC_URI</filename> statement in the recipe
+                        are in a Git repository, you must provide the "-S"
+                        option and specify a revision for the software.</para>
 
-                        <para>Once <filename>devtool</filename> locates the recipe,
-                        it uses the <filename>SRC_URI</filename> variable to locate
-                        the source code and any local patch files from other
-                        developers are located.
+                        <para>Once <filename>devtool</filename> locates the
+                        recipe, it uses the <filename>SRC_URI</filename>
+                        variable to locate the source code and any local patch
+                        files from other developers.
                         The result is that the command sets up the source
                         code, the new version of the recipe, and an append file
                         all within the workspace.
                         </para></listitem>
-                    <listitem><para><emphasis>Resolve any Conflicts created by the Upgrade</emphasis>:
-                        At this point, there could be some conflicts due to the
-                        software being upgraded to a new version.
-                        This would occur if your recipe specifies some patch files in
-                        <filename>SRC_URI</filename> that conflict with changes
-                        made in the new version of the software.
-                        If this is the case, you need to resolve the conflicts
+                    <listitem><para>
+                        <emphasis>Resolve any Conflicts created by the Upgrade</emphasis>:
+                        Conflicts could exist due to the software being
+                        upgraded to a new version.
+                        Conflicts occur if your recipe specifies some patch
+                        files in <filename>SRC_URI</filename> that conflict
+                        with changes made in the new version of the software.
+                        For such cases, you need to resolve the conflicts
                         by editing the source and following the normal
                         <filename>git rebase</filename> conflict resolution
                         process.</para>
-                        <para>Before moving onto the next step, be sure to resolve any
-                        such conflicts created through use of a newer or different
-                        version of the software.
+
+                        <para>Before moving onto the next step, be sure to
+                        resolve any such conflicts created through use of a
+                        newer or different version of the software.
                         </para></listitem>
-                    <listitem><para><emphasis>Build the Recipe</emphasis>:
-                        Once you have your recipe in order, you can build it.
-                        You can either use <filename>devtool build</filename> or
-                        <filename>bitbake</filename>.
-                        Either method produces build output that is stored
-                        in
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>.
+                    <listitem><para>
+                        <emphasis>Build the Recipe or Rebuild the Image</emphasis>:
+                        The next step you take depends on what you are going
+                        to do with the new code.</para>
+
+                        <para>If you need to eventually move the build output
+                        to the target hardware, use the following
+                        <filename>devtool</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool build <replaceable>recipe</replaceable>
+                        </literallayout></para>
+
+                        <para>On the other hand, if you want an image to
+                        contain the recipe's packages from the workspace
+                        for immediate deployment onto a device (e.g. for
+                        testing purposes), you can use
+                        the <filename>devtool build-image</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool build-image <replaceable>image</replaceable>
+                        </literallayout>
                         </para></listitem>
-                    <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                    <listitem><para>
+                        <emphasis>Deploy the Build Output</emphasis>:
                         When you use the <filename>devtool build</filename>
-                        command or <filename>bitbake</filename> to build out your
-                        recipe, you probably want to see if the resulting build
-                        output works as expected on target hardware.
+                        command or <filename>bitbake</filename> to build
+                        your recipe, you probably want to see if the resulting
+                        build output works as expected on target hardware.
                         <note>
                             This step assumes you have a previously built
                             image that is already either running in QEMU or
                             running on actual hardware.
-                            Also, it is assumed that for deployment of the image
-                            to the target, SSH is installed in the image and if
-                            the image is running on real hardware that you have
-                            network access to and from your development machine.
+                            Also, it is assumed that for deployment of the
+                            image to the target, SSH is installed in the image
+                            and if the image is running on real hardware that
+                            you have network access to and from your
+                            development machine.
                         </note>
-                        You can deploy your build output to that target hardware by
-                        using the <filename>devtool deploy-target</filename> command:
+                        You can deploy your build output to that target
+                        hardware by using the
+                        <filename>devtool deploy-target</filename> command:
                         <literallayout class='monospaced'>
      $ devtool deploy-target <replaceable>recipe target</replaceable>
                         </literallayout>
-                        The <replaceable>target</replaceable> is a live target machine
-                        running as an SSH server.</para>
-                        <para>You can, of course, also deploy the image you build
-                        using the <filename>devtool build-image</filename> command
+                        The <replaceable>target</replaceable> is a live target
+                        machine running as an SSH server.</para>
+
+                        <para>You can, of course, also deploy the image you
+                        build using the
+                        <filename>devtool build-image</filename> command
                         to actual hardware.
-                        However, <filename>devtool</filename> does not provide a
-                        specific command that allows you to do this.
+                        However, <filename>devtool</filename> does not provide
+                        a specific command that allows you to do this.
                         </para></listitem>
                     <listitem><para>
                         <emphasis>Finish Your Work With the Recipe</emphasis>:
                         The <filename>devtool finish</filename> command creates
                         any patches corresponding to commits in the local
-                        Git repository, moves the new recipe to a more permanent
-                        layer, and then resets the recipe so that the recipe is
-                        built normally rather than from the workspace.
+                        Git repository, moves the new recipe to a more
+                        permanent layer, and then resets the recipe so that
+                        the recipe is built normally rather than from the
+                        workspace.
                         If you specify a destination layer that is the same as
                         the original source, then the old version of the
                         recipe and associated files will be removed prior to
@@ -884,6 +992,7 @@
                             Any changes you want to turn into patches must be
                             committed to the Git repository in the source tree.
                         </note></para>
+
                         <para>As a final process of the
                         <filename>devtool finish</filename> command, the state
                         of the standard layers and the upstream source is
@@ -906,8 +1015,8 @@
         <title>A Closer Look at <filename>devtool add</filename></title>
 
         <para>
-            The <filename>devtool add</filename> command automatically creates a
-            recipe based on the source tree with which you provide it.
+            The <filename>devtool add</filename> command automatically creates
+            a recipe based on the source tree you provide with the command.
             Currently, the command has support for the following:
             <itemizedlist>
                 <listitem><para>
@@ -953,8 +1062,8 @@
                 In most cases, you need to edit the automatically generated
                 recipe in order to make it build properly.
                 Typically, you would go through several edit and build cycles
-                until you can build the recipe.
-                Once the recipe can be built, you could use possible further
+                until the recipe successfully builds.
+                Once the recipe builds, you could use possible further
                 iterations to test the recipe on the target device.
             </note>
         </para>
@@ -969,15 +1078,19 @@
 
             <para>
                 If you do not specify a name and version on the command
-                line, <filename>devtool add</filename> attempts to determine
-                the name and version of the software being built from
-                various metadata within the source tree.
-                Furthermore, the command sets the name of the created recipe
-                file accordingly.
-                If the name or version cannot be determined, the
-                <filename>devtool add</filename> command prints an error and
-                you must re-run the command with both the name and version
-                or just the name or version specified.
+                line, <filename>devtool add</filename> uses various metadata
+                within the source tree in an attempt to determine
+                the name and version of the software being built.
+                Based on what the tool determines, <filename>devtool</filename>
+                sets the name of the created recipe file accordingly.
+            </para>
+
+            <para>
+                If <filename>devtool</filename> cannot determine the name and
+                version, the command prints an error.
+                For such cases, you must re-run the command and provide
+                the name and version, just the name, or just the version as
+                part of the command line.
             </para>
 
             <para>
@@ -1001,26 +1114,27 @@
                 detect build-time dependencies and map them to other recipes
                 in the system.
                 During this mapping, the command fills in the names of those
-                recipes in the
+                recipes as part of the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
-                value within the recipe.
-                If a dependency cannot be mapped, then a comment is placed in
-                the recipe indicating such.
-                The inability to map a dependency might be caused because the
-                naming is not recognized or because the dependency simply is
-                not available.
+                variable within the recipe.
+                If a dependency cannot be mapped, <filename>devtool</filename>
+                places a comment in the recipe indicating such.
+                The inability to map a dependency can result from naming not
+                being recognized or because the dependency simply is not
+                available.
                 For cases where the dependency is not available, you must use
                 the <filename>devtool add</filename> command to add an
-                additional recipe to satisfy the dependency and then come
-                back to the first recipe and add its name to
-                <filename>DEPENDS</filename>.
+                additional recipe that satisfies the dependency.
+                Once you add that recipe, you need to update the
+                <filename>DEPENDS</filename> variable in the original recipe
+                to include the new recipe.
             </para>
 
             <para>
                 If you need to add runtime dependencies, you can do so by
                 adding the following to your recipe:
                 <literallayout class='monospaced'>
-     RDEPENDS_${PN} += "dependency1 dependency2 ..."
+     RDEPENDS_${PN} += "<replaceable>dependency1 dependency2 ...</replaceable>"
                 </literallayout>
                 <note>
                     The <filename>devtool add</filename> command often cannot
@@ -1031,7 +1145,7 @@
                     script for the software the recipe is building for further
                     details.
                     In some cases, you might find you can substitute the
-                    dependency for an option to disable the associated
+                    dependency with an option that disables the associated
                     functionality passed to the configure script.
                 </note>
             </para>
@@ -1043,20 +1157,24 @@
             <para>
                 The <filename>devtool add</filename> command attempts to
                 determine if the software you are adding is able to be
-                distributed under a common open-source license and sets the
+                distributed under a common, open-source license.
+                If so, the command sets the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
                 value accordingly.
-                You should double-check this value against the documentation
-                or source files for the software you are building and update
-                that <filename>LICENSE</filename> value if necessary.
+                You should double-check the value added by the command against
+                the documentation or source files for the software you are
+                building and, if necessary, update that
+                <filename>LICENSE</filename> value.
             </para>
 
             <para>
                 The <filename>devtool add</filename> command also sets the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
                 value to point to all files that appear to be license-related.
-                However, license statements often appear in comments at the top
-                of source files or within documentation.
+                Realize that license statements often appear in comments at
+                the top of source files or within the documentation.
+                In such cases, the command does not recognize those license
+                statements.
                 Consequently, you might need to amend the
                 <filename>LIC_FILES_CHKSUM</filename> variable to point to one
                 or more of those comments if present.
@@ -1070,14 +1188,13 @@
 
             <para>
                 If the <filename>devtool add</filename> command cannot
-                determine licensing information, the
-                <filename>LICENSE</filename> value is set to "CLOSED" and the
-                <filename>LIC_FILES_CHKSUM</filename> value remains unset.
-                This behavior allows you to continue with development but is
-                unlikely to be correct in all cases.
-                Consequently, you should check the documentation or source
-                files for the software you are building to determine the actual
-                license.
+                determine licensing information, <filename>devtool</filename>
+                sets the <filename>LICENSE</filename> value to "CLOSED" and
+                leaves the <filename>LIC_FILES_CHKSUM</filename> value unset.
+                This behavior allows you to continue with development even
+                though the settings are unlikely to be correct in all cases.
+                You should check the documentation or source files for the
+                software you are building to determine the actual license.
             </para>
         </section>
 
@@ -1085,8 +1202,8 @@
             <title>Adding Makefile-Only Software</title>
 
             <para>
-                The use of <filename>make</filename> by itself is very common
-                in both proprietary and open source software.
+                The use of Make by itself is very common in both proprietary
+                and open-source software.
                 Unfortunately, Makefiles are often not written with
                 cross-compilation in mind.
                 Thus, <filename>devtool add</filename> often cannot do very
@@ -1099,7 +1216,7 @@
                 <filename>gcc</filename> is the compiler for the build host
                 and the cross-compiler is named something similar to
                 <filename>arm-poky-linux-gnueabi-gcc</filename> and might
-                require some arguments (e.g. to point to the associated sysroot
+                require arguments (e.g. to point to the associated sysroot
                 for the target machine).
             </para>
 
@@ -1114,18 +1231,17 @@
                         <filename>g++</filename>.
                         </para></listitem>
                     <listitem><para>
-                        The environment in which <filename>make</filename> runs
-                        is set up with various standard variables for
-                        compilation (e.g. <filename>CC</filename>,
-                        <filename>CXX</filename>, and so forth) in a similar
-                        manner to the environment set up by the SDK's
-                        environment setup script.
+                        The environment in which Make runs is set up with
+                        various standard variables for compilation (e.g.
+                        <filename>CC</filename>, <filename>CXX</filename>, and
+                        so forth) in a similar manner to the environment set
+                        up by the SDK's environment setup script.
                         One easy way to see these variables is to run the
                         <filename>devtool build</filename> command on the
                         recipe and then look in
                         <filename>oe-logs/run.do_compile</filename>.
-                        Towards the top of this file you will see a list of
-                        environment variables that are being set.
+                        Towards the top of this file, a list of environment
+                        variables exists that are being set.
                         You can take advantage of these variables within the
                         Makefile.
                         </para></listitem>
@@ -1133,7 +1249,7 @@
                         If the Makefile sets a default for a variable using "=",
                         that default overrides the value set in the environment,
                         which is usually not desirable.
-                        In this situation, you can either patch the Makefile
+                        For this case, you can either patch the Makefile
                         so it sets the default using the "?=" operator, or
                         you can alternatively force the value on the
                         <filename>make</filename> command line.
@@ -1158,16 +1274,17 @@
                         This is particularly true because those hardcoded paths
                         often point to locations on the build host and thus
                         will either be read-only or will introduce
-                        contamination into the cross-compilation by virtue of
-                        being specific to the build host rather than the target.
+                        contamination into the cross-compilation because they
+                        are specific to the build host rather than the target.
                         Patching the Makefile to use prefix variables or other
-                        path variables is usually the way to handle this.
+                        path variables is usually the way to handle this
+                        situation.
                         </para></listitem>
                     <listitem><para>
                         Sometimes a Makefile runs target-specific commands such
                         as <filename>ldconfig</filename>.
-                        For such cases, you might be able to simply apply
-                        patches that remove these commands from the Makefile.
+                        For such cases, you might be able to apply patches that
+                        remove these commands from the Makefile.
                         </para></listitem>
                 </itemizedlist>
             </para>
@@ -1178,9 +1295,11 @@
 
             <para>
                 Often, you need to build additional tools that run on the
-                build host system as opposed to the target.
-                You should indicate this using one of the following methods
-                when you run <filename>devtool add</filename>:
+                <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>
+                as opposed to the target.
+                You should indicate this requirement by using one of the
+                following methods when you run
+                <filename>devtool add</filename>:
                 <itemizedlist>
                     <listitem><para>
                         Specify the name of the recipe such that it ends
@@ -1202,8 +1321,8 @@
                     typically accomplish this by building the native and target
                     parts separately rather than within the same compilation
                     process.
-                    Realize though that with the "&dash;&dash;also-native" option, you
-                    can add the tool using just one recipe file.
+                    Realize though that with the "&dash;&dash;also-native"
+                    option, you can add the tool using just one recipe file.
                 </note>
             </para>
         </section>
@@ -1244,11 +1363,9 @@
                             found" errors.
                             </para></listitem>
                         <listitem><para>
-                            In order to support adding
-                            Node.js modules, a
-                            <filename>nodejs</filename> recipe must be part of your
-                            SDK in order to provide Node.js
-                            itself.
+                            In order to support adding Node.js modules, a
+                            <filename>nodejs</filename> recipe must be part
+                            of your SDK.
                             </para></listitem>
                     </itemizedlist>
                 </note>
@@ -1257,14 +1374,15 @@
             <para>
                 As mentioned earlier, you can also add Node.js modules
                 directly from a repository or local source tree.
-                To add modules this way, use <filename>devtool add</filename> in
-                the following form:
+                To add modules this way, use <filename>devtool add</filename>
+                in the following form:
                 <literallayout class='monospaced'>
      $ devtool add https://github.com/diversario/node-ssdp
                 </literallayout>
-                In this example, <filename>devtool</filename> fetches the specified
-                Git repository, detects that the code is Node.js code, fetches
-                dependencies using <filename>npm</filename>, and sets
+                In this example, <filename>devtool</filename> fetches the
+                specified Git repository, detects the code as Node.js
+                code, fetches dependencies using <filename>npm</filename>, and
+                sets
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
                 accordingly.
             </para>
@@ -1275,8 +1393,9 @@
         <title>Working With Recipes</title>
 
         <para>
-            When building a recipe with <filename>devtool build</filename>, the
-            typical build progression is as follows:
+            When building a recipe using the
+            <filename>devtool build</filename> command, the typical build
+            progresses as follows:
             <orderedlist>
                 <listitem><para>
                     Fetch the source
@@ -1288,7 +1407,7 @@
                     Configure the source
                     </para></listitem>
                 <listitem><para>
-                    Compiling the source
+                    Compile the source
                     </para></listitem>
                 <listitem><para>
                     Install the build output
@@ -1299,10 +1418,13 @@
             </orderedlist>
             For recipes in the workspace, fetching and unpacking is disabled
             as the source tree has already been prepared and is persistent.
-            Each of these build steps is defined as a function, usually with a
-            "do_" prefix.
-            These functions are typically shell scripts but can instead be written
-            in Python.
+            Each of these build steps is defined as a function (task), usually
+            with a "do_" prefix (e.g.
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>,
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>,
+            and so forth).
+            These functions are typically shell scripts but can instead be
+            written in Python.
         </para>
 
         <para>
@@ -1310,12 +1432,13 @@
             recipe does not include complete instructions for building the
             software.
             Instead, common functionality is encapsulated in classes inherited
-            with the <filename>inherit</filename> directive, leaving the recipe
-            to describe just the things that are specific to the software to be
-            built.
-            A <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-base'><filename>base</filename></ulink>
-            class exists that is implicitly inherited by all recipes and provides
-            the functionality that most typical recipes need.
+            with the <filename>inherit</filename> directive.
+            This technique leaves the recipe to describe just the things that
+            are specific to the software being built.
+            A
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-base'><filename>base</filename></ulink>
+            class exists that is implicitly inherited by all recipes and
+            provides the functionality that most recipes typically need.
         </para>
 
         <para>
@@ -1327,46 +1450,57 @@
             <title>Finding Logs and Work Files</title>
 
             <para>
-                When you are debugging a recipe that you previously created using
-                <filename>devtool add</filename> or whose source you are modifying
-                by using the <filename>devtool modify</filename> command, after
-                the first run of <filename>devtool build</filename>, you will
-                find some symbolic links created within the source tree:
-                <filename>oe-logs</filename>, which points to the directory in
-                which log files and run scripts for each build step are created
-                and <filename>oe-workdir</filename>, which points to the temporary
-                work area for the recipe.
-                You can use these links to get more information on what is
-                happening at each build step.
-            </para>
-
-            <para>
-                These locations under <filename>oe-workdir</filename> are
-                particularly useful:
+                After the first run of the <filename>devtool build</filename>
+                command, recipes that were previously created using the
+                <filename>devtool add</filename> command or whose sources were
+                modified using the <filename>devtool modify</filename>
+                command contain symbolic links created within the source tree:
                 <itemizedlist>
-                    <listitem><para><filename>image/</filename>:
-                        Contains all of the files installed at the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
-                        stage.
-                        Within a recipe, this directory is referred to by the
-                        expression
-                        <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>.
+                    <listitem><para>
+                        <filename>oe-logs</filename>:
+                        This link points to the directory in which log files
+                        and run scripts for each build step are created.
                         </para></listitem>
-                    <listitem><para><filename>sysroot-destdir/</filename>:
-                        Contains a subset of files installed within
-                        <filename>do_install</filename> that have been put into the
-                        shared sysroot.
-                        For more information, see the
-                        "<link linkend='sdk-sharing-files-between-recipes'>Sharing Files Between Recipes</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><filename>packages-split/</filename>:
-                        Contains subdirectories for each package produced by the
+                    <listitem><para>
+                        <filename>oe-workdir</filename>:
+                        This link points to the temporary work area for the
                         recipe.
-                        For more information, see the
-                        "<link linkend='sdk-packaging'>Packaging</link>" section.
+                        The following locations under
+                        <filename>oe-workdir</filename> are particularly
+                        useful:
+                            <itemizedlist>
+                                <listitem><para>
+                                    <filename>image/</filename>:
+                                    Contains all of the files installed during
+                                    the
+                                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+                                    stage.
+                                    Within a recipe, this directory is referred
+                                    to by the expression
+                                    <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <filename>sysroot-destdir/</filename>:
+                                    Contains a subset of files installed within
+                                    <filename>do_install</filename> that have
+                                    been put into the shared sysroot.
+                                    For more information, see the
+                                    "<link linkend='sdk-sharing-files-between-recipes'>Sharing Files Between Recipes</link>"
+                                    section.
+                                    </para></listitem>
+                                <listitem><para>
+                                    <filename>packages-split/</filename>:
+                                    Contains subdirectories for each package
+                                    produced by the recipe.
+                                    For more information, see the
+                                    "<link linkend='sdk-packaging'>Packaging</link>"
+                                    section.
+                                    </para></listitem>
+                            </itemizedlist>
                         </para></listitem>
                 </itemizedlist>
+                You can use these links to get more information on what is
+                happening at each build step.
             </para>
         </section>
 
@@ -1413,12 +1547,14 @@
 
             <para>
                 Recipes often need to use files provided by other recipes on
-                the build host.
+                the
+                <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>.
                 For example, an application linking to a common library needs
                 access to the library itself and its associated headers.
                 The way this access is accomplished within the extensible SDK is
                 through the sysroot.
-                One sysroot exists per "machine" for which the SDK is being built.
+                One sysroot exists per "machine" for which the SDK is being
+                built.
                 In practical terms, this means a sysroot exists for the target
                 machine, and a sysroot exists for the build host.
             </para>
@@ -1431,7 +1567,7 @@
                 task within the
                 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>
                 directory.
-                A subset of these files automatically go into the sysroot.
+                A subset of these files automatically goes into the sysroot.
                 The reason for this limitation is that almost all files that go
                 into the sysroot are cataloged in manifests in order to ensure
                 they can be removed later when a recipe is modified or removed.
@@ -1456,20 +1592,20 @@
                 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
                 task, files installed during the
                 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
-                task are split into one main package, which is almost always named
-                the same as the recipe, and several other packages.
-                This separation is done because not all of those installed files
-                are always useful in every image.
+                task are split into one main package, which is almost always
+                named the same as the recipe, and into several other packages.
+                This separation exists because not all of those installed files
+                are useful in every image.
                 For example, you probably do not need any of the documentation
                 installed in a production image.
-                Consequently, for each recipe the documentation files are separated
-                into a <filename>-doc</filename> package.
-                Recipes that package software that has optional modules or
-                plugins might do additional package splitting as well.
+                Consequently, for each recipe the documentation files are
+                separated into a <filename>-doc</filename> package.
+                Recipes that package software containing optional modules or
+                plugins might undergo additional package splitting as well.
             </para>
 
             <para>
-                After building a recipe you can see where files have gone by
+                After building a recipe, you can see where files have gone by
                 looking in the <filename>oe-workdir/packages-split</filename>
                 directory, which contains a subdirectory for each package.
                 Apart from some advanced cases, the
@@ -1479,17 +1615,18 @@
                 variables controls splitting.
                 The <filename>PACKAGES</filename> variable lists all of the
                 packages to be produced, while the <filename>FILES</filename>
-                variable specifies which files to include in each package,
+                variable specifies which files to include in each package by
                 using an override to specify the package.
-                For example, <filename>FILES_${PN}</filename> specifies the files
-                to go into the main package (i.e. the main package is named the
-                same as the recipe and
+                For example, <filename>FILES_${PN}</filename> specifies the
+                files to go into the main package (i.e. the main package has
+                the same name as the recipe and
                 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
                 evaluates to the recipe name).
-                The order of the <filename>PACKAGES</filename> value is significant.
+                The order of the <filename>PACKAGES</filename> value is
+                significant.
                 For each installed file, the first package whose
-                <filename>FILES</filename> value matches the file is the package
-                into which the file goes.
+                <filename>FILES</filename> value matches the file is the
+                package into which the file goes.
                 Defaults exist for both the <filename>PACKAGES</filename> and
                 <filename>FILES</filename> variables.
                 Consequently, you might find you do not even need to set these
@@ -1511,29 +1648,29 @@
             <filename>devtool deploy-target</filename> command.
             Because the <filename>devtool deploy-target</filename> command
             backs up any files it overwrites, you can use the
-            <filename>devtool undeploy-target</filename> to restore those files
-            and remove any other files the recipe deployed.
+            <filename>devtool undeploy-target</filename> command to restore
+            those files and remove any other files the recipe deployed.
             Consider the following example:
             <literallayout class='monospaced'>
      $ devtool undeploy-target lighttpd root@192.168.7.2
             </literallayout>
             If you have deployed multiple applications, you can remove them
-            all at once thus restoring the target device back to its
+            all using the "-a" option thus restoring the target device to its
             original state:
             <literallayout class='monospaced'>
      $ devtool undeploy-target -a root@192.168.7.2
             </literallayout>
             Information about files deployed to the target as well as any
             backed up files are stored on the target itself.
-            This storage of course requires some additional space
+            This storage, of course, requires some additional space
             on the target machine.
             <note>
                 The <filename>devtool deploy-target</filename> and
-                <filename>devtool undeploy-target</filename> command do not
+                <filename>devtool undeploy-target</filename> commands do not
                 currently interact with any package management system on the
                 target device (e.g. RPM or OPKG).
-                Consequently, you should not intermingle operations
-                <filename>devtool deploy-target</filename> and the package
+                Consequently, you should not intermingle
+                <filename>devtool deploy-target</filename> and package
                 manager operations on the target device.
                 Doing so could result in a conflicting set of files.
             </note>
@@ -1544,16 +1681,14 @@
         <title>Installing Additional Items Into the Extensible SDK</title>
 
         <para>
-            The extensible SDK typically only comes with a small number of tools
-            and libraries out of the box.
-            If you have a minimal SDK, then it starts mostly empty and is
-            populated on-demand.
-            However, sometimes you will need to explicitly install extra items
-            into the SDK.
+            Out of the box the extensible SDK typically only comes with a small
+            number of tools and libraries.
+            A minimal SDK starts mostly empty and is populated on-demand.
+            Sometimes you must explicitly install extra items into the SDK.
             If you need these extra items, you can first search for the items
             using the <filename>devtool search</filename> command.
             For example, suppose you need to link to libGL but you are not sure
-            which recipe provides it.
+            which recipe provides libGL.
             You can use the following command to find out:
             <literallayout class='monospaced'>
      $ devtool search libGL
@@ -1564,17 +1699,19 @@
             <literallayout class='monospaced'>
      $ devtool sdk-install mesa
             </literallayout>
-            By default, the <filename>devtool sdk-install</filename> assumes the
-            item is available in pre-built form from your SDK provider.
+            By default, the <filename>devtool sdk-install</filename> command
+            assumes the item is available in pre-built form from your SDK
+            provider.
             If the item is not available and it is acceptable to build the item
             from source, you can add the "-s" option as follows:
             <literallayout class='monospaced'>
      $ devtool sdk-install -s mesa
             </literallayout>
-            It is important to remember that building the item from source takes
-            significantly longer than installing the pre-built artifact.
-            Also, if no recipe exists for the item you want to add to the SDK, you
-            must instead add it using the <filename>devtool add</filename> command.
+            It is important to remember that building the item from source
+            takes significantly longer than installing the pre-built artifact.
+            Also, if no recipe exists for the item you want to add to the SDK,
+            you must instead add the item using the
+            <filename>devtool add</filename> command.
         </para>
     </section>
 
@@ -1612,31 +1749,34 @@
 
         <para>
             You might need to produce an SDK that contains your own custom
-            libraries for sending to a third party (e.g., if you are a vendor with
-            customers needing to build their own software for the target platform).
-            If that is the case, then you can produce a derivative SDK based on
-            the currently installed SDK fairly easily.
-            Use these steps:
+            libraries.
+            A good example would be if you were a vendor with customers that
+            use your SDK to build their own platform-specific software and
+            those customers need an SDK that has custom libraries.
+            In such a case, you can produce a derivative SDK based on the
+            currently installed SDK fairly easily by following these steps:
             <orderedlist>
-                <listitem><para>If necessary, install an extensible SDK that
+                <listitem><para>
+                    If necessary, install an extensible SDK that
                     you want to use as a base for your derivative SDK.
                     </para></listitem>
-                <listitem><para>Source the environment script for the SDK.
+                <listitem><para>
+                    Source the environment script for the SDK.
                     </para></listitem>
-                <listitem><para>Add the extra libraries or other components
-                    you want by using the <filename>devtool add</filename>
-                    command.
+                <listitem><para>
+                    Add the extra libraries or other components you want by
+                    using the <filename>devtool add</filename> command.
                     </para></listitem>
-                <listitem><para>Run the <filename>devtool build-sdk</filename>
-                    command.
+                <listitem><para>
+                    Run the <filename>devtool build-sdk</filename> command.
                     </para></listitem>
             </orderedlist>
-            The above procedure takes the recipes added to the workspace and
-            constructs a new SDK installer containing those recipes and the
+            The previous steps take the recipes added to the workspace and
+            construct a new SDK installer that contains those recipes and the
             resulting binary artifacts.
             The recipes go into their own separate layer in the constructed
-            derivative SDK, leaving the workspace clean and ready for users
-            to add their own recipes.
+            derivative SDK, which leaves the workspace clean and ready for
+            users to add their own recipes.
         </para>
     </section>
 </chapter>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml
index b6925fa..8642be6 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml
@@ -31,15 +31,18 @@
     <para>
         All SDKs consist of the following:
         <itemizedlist>
-            <listitem><para><emphasis>Cross-Development Toolchain</emphasis>:
+            <listitem><para>
+                <emphasis>Cross-Development Toolchain</emphasis>:
                 This toolchain contains a compiler, debugger, and various
                 miscellaneous tools.
                 </para></listitem>
-            <listitem><para><emphasis>Libraries, Headers, and Symbols</emphasis>:
+            <listitem><para>
+                <emphasis>Libraries, Headers, and Symbols</emphasis>:
                 The libraries, headers, and symbols are specific to the image
                 (i.e. they match the image).
                 </para></listitem>
-            <listitem><para><emphasis>Environment Setup Script</emphasis>:
+            <listitem><para>
+                <emphasis>Environment Setup Script</emphasis>:
                 This <filename>*.sh</filename> file, once run, sets up the
                 cross-development environment by defining variables and
                 preparing for SDK use.
@@ -48,7 +51,7 @@
     </para>
 
     <para>
-        Additionally an extensible SDK has tools that allow you to easily add
+        Additionally, an extensible SDK has tools that allow you to easily add
         new applications and libraries to an image, modify the source of an
         existing component, test changes on the target hardware, and easily
         integrate an application into the
@@ -81,14 +84,15 @@
         and
         <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink>.
         This reduces the space needed for the tools.
-        Understand, however, that a sysroot is still needed for every target
-        since those binaries are target-specific.
+        Understand, however, that every target still needs a sysroot because
+        those binaries are target-specific.
     </para>
 
     <para>
         The SDK development environment consists of the following:
         <itemizedlist>
-            <listitem><para>The self-contained SDK, which is an
+            <listitem><para>
+                The self-contained SDK, which is an
                 architecture-specific cross-toolchain and
                 matching sysroots (target and native) all built by the
                 OpenEmbedded build system (e.g. the SDK).
@@ -100,21 +104,24 @@
                 Additionally, the extensible SDK contains the
                 <filename>devtool</filename> functionality.
                 </para></listitem>
-            <listitem><para>The Quick EMUlator (QEMU), which lets you simulate
+            <listitem><para>
+                The Quick EMUlator (QEMU), which lets you simulate
                 target hardware.
                 QEMU is not literally part of the SDK.
                 You must build and include this emulator separately.
                 However, QEMU plays an important role in the development
                 process that revolves around use of the SDK.
                 </para></listitem>
-            <listitem><para>The Eclipse IDE Yocto Plug-in.
+            <listitem><para>
+                The Eclipse IDE Yocto Plug-in.
                 This plug-in is available for you if you are an Eclipse
                 user.
                 In the same manner as QEMU, the plug-in is not literally part
                 of the SDK but is rather available for use as part of the
                 development process.
                 </para></listitem>
-            <listitem><para>Various performance-related
+            <listitem><para>
+                Various performance-related
                 <ulink url='http://www.eclipse.org/linuxtools/index.php'>tools</ulink>
                 that can enhance your development experience.
                 These tools are also separate from the actual SDK but can be
@@ -192,11 +199,11 @@
             </tgroup>
         </informaltable>
         <literallayout class='monospaced'>
-     * Extensible SDK will contain the toolchain and debugger if <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink> is "full" or <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink> is "1", which is the default.
+     * Extensible SDK contains the toolchain and debugger if <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink> is "full" or <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink> is "1", which is the default.
 
-     ** Sysroot is managed through use of <filename>devtool</filename>.  Thus, it is less likely that you will corrupt your SDK sysroot when you try to add additional libraries.
+     ** Sysroot is managed through the use of <filename>devtool</filename>.  Thus, it is less likely that you will corrupt your SDK sysroot when you try to add additional libraries.
 
-     *** Runtime package management can be added to the standard SDK but it is not supported by default.
+     *** You can add runtime package management to the standard SDK but it is not supported by default.
 
      **** You must build and make the shared state available to extensible SDK users for "packages" you want to enable users to install.
         </literallayout>
@@ -216,7 +223,7 @@
             This toolchain is created by running a SDK installer script
             or through a
             <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
-            that is based on your Metadata configuration or extension for
+            that is based on your metadata configuration or extension for
             your targeted device.
             The cross-toolchain works with a matching target sysroot.
         </para>
@@ -230,7 +237,7 @@
             for generating binaries that run on the target architecture.
             The target sysroot is based on the target root filesystem image
             that is built by the OpenEmbedded build system and uses the same
-            Metadata configuration used to build the cross-toolchain.
+            metadata configuration used to build the cross-toolchain.
         </para>
     </section>
 
@@ -240,7 +247,8 @@
         <para>
             The QEMU emulator allows you to simulate your hardware while
             running your application or image.
-            QEMU is not part of the SDK but is made available a number of ways:
+            QEMU is not part of the SDK but is made available a number of
+            different ways:
             <itemizedlist>
                 <listitem><para>
                     If you have cloned the <filename>poky</filename> Git
@@ -265,7 +273,7 @@
     </section>
 
     <section id='eclipse-overview'>
-        <title>Eclipse Yocto Plug-in</title>
+        <title><trademark class='trade'>Eclipse</trademark> Yocto Plug-in</title>
 
         <para>
             The Eclipse IDE is a popular development environment and it fully
@@ -285,8 +293,8 @@
                 Previous releases of the Eclipse Yocto Plug-in supported
                 "user-space tools" (i.e. LatencyTOP, PowerTOP, Perf, SystemTap,
                 and Lttng-ust) that also added to the development experience.
-                These tools have been deprecated beginning with this release
-                of the plug-in.
+                These tools have been deprecated with the release of the
+                Eclipse Yocto Plug-in.
             </note>
         </para>
 
@@ -335,14 +343,18 @@
     <para>
         You just need to follow these general steps:
         <orderedlist>
-            <listitem><para><emphasis>Install the SDK for your target hardware:</emphasis>
+            <listitem><para>
+                <emphasis>Install the SDK for your target hardware:</emphasis>
                 For information on how to install the SDK, see the
                 "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
-                section.</para></listitem>
-            <listitem><para><emphasis>Download or Build the Target Image:</emphasis>
+                section.
+                </para></listitem>
+            <listitem><para>
+                <emphasis>Download or Build the Target Image:</emphasis>
                 The Yocto Project supports several target architectures
                 and has many pre-built kernel images and root filesystem
                 images.</para>
+
                 <para>If you are going to develop your application on
                 hardware, go to the
                 <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
@@ -356,6 +368,7 @@
                 so forth.
                 Be sure to get the files you need for your particular
                 development process.</para>
+
                 <para>If you are going to develop your application and
                 then run and test it using the QEMU emulator, go to the
                 <ulink url='&YOCTO_QEMU_DL_URL;'><filename>machines/qemu</filename></ulink>
@@ -364,35 +377,35 @@
                 target architecture (e.g. <filename>qemux86_64</filename>
                 for an <trademark class='registered'>Intel</trademark>-based
                 64-bit architecture).
-                Download kernel, root filesystem, and any other files you
+                Download the kernel, root filesystem, and any other files you
                 need for your process.
                 <note>
-                    To use the root filesystem in QEMU, you
-                    need to extract it.
+                    To use the root filesystem in QEMU, you need to extract it.
                     See the
                     "<link linkend='sdk-extracting-the-root-filesystem'>Extracting the Root Filesystem</link>"
                     section for information on how to extract the root
                     filesystem.
                 </note>
                 </para></listitem>
-            <listitem><para><emphasis>Develop and Test your
-                Application:</emphasis>  At this point, you have the tools
-                to develop your application.
-                If you need to separately install and use the QEMU
-                emulator, you can go to
+            <listitem><para>
+                <emphasis>Develop and Test your Application:</emphasis>
+                At this point, you have the tools to develop your application.
+                If you need to separately install and use the QEMU emulator,
+                you can go to
                 <ulink url='http://wiki.qemu.org/Main_Page'>QEMU Home Page</ulink>
                 to download and learn about the emulator.
                 See the
                 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
                 chapter in the Yocto Project Development Tasks Manual
                 for information on using QEMU within the Yocto
-                Project.</para></listitem>
+                Project.
+                </para></listitem>
         </orderedlist>
     </para>
 
     <para>
-        The remainder of this manual describes how to use both the standard
-        SDK and the extensible SDK.
+        The remainder of this manual describes how to use the extensible
+        and standard SDKs.
         Information also exists in appendix form that describes how you can
         build, install, and modify an SDK.
     </para>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml
index 7fc0472..e858b9b 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml
@@ -52,14 +52,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
        </revhistory>
 
@@ -81,27 +76,38 @@
                        manual is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
-
     </legalnotice>
 
     </bookinfo>
@@ -122,7 +128,7 @@
 
     <xi:include href="sdk-appendix-customizing-standard.xml"/>
 
-    <xi:include href="sdk-appendix-mars.xml"/>
+    <xi:include href="sdk-appendix-neon.xml"/>
 
 <!--    <index id='index'>
       <title>Index</title>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-using.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-using.xml
index 7281e83..dd220c3 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-using.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-using.xml
@@ -19,9 +19,9 @@
 
     <para>
         You can use a standard SDK to work on Makefile, Autotools, and
-        Eclipse-based projects.
+        <trademark class='trade'>Eclipse</trademark>-based projects.
         See the
-        "<link linkend='sdk-working-projects'>Working with Different Types of Projects</link>"
+        "<link linkend='sdk-working-projects'>Using the SDK Toolchain Directly</link>"
         chapter for more information.
     </para>
 
@@ -53,24 +53,24 @@
         <title>Installing the SDK</title>
 
         <para>
-            The first thing you need to do is install the SDK on your host
-            development machine by running the <filename>*.sh</filename>
-            installation script.
+            The first thing you need to do is install the SDK on your
+            <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>Build Host</ulink>
+            by running the <filename>*.sh</filename> installation script.
         </para>
 
         <para>
             You can download a tarball installer, which includes the
             pre-built toolchain, the <filename>runqemu</filename>
-            script, and support files from the appropriate directory under
-            <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
-            Toolchains are available for 32-bit and 64-bit x86 development
-            systems from the <filename>i686</filename> and
-            <filename>x86_64</filename> directories, respectively.
+            script, and support files from the appropriate
+            <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'>toolchain</ulink>
+            directory within the Index of Releases.
+            Toolchains are available for several 32-bit and 64-bit
+            architectures with the <filename>x86_64</filename> directories,
+            respectively.
             The toolchains the Yocto Project provides are based off the
-            <filename>core-image-sato</filename> image and contain
+            <filename>core-image-sato</filename> and
+            <filename>core-image-minimal</filename> images and contain
             libraries appropriate for developing against that image.
-            Each type of development system supports five or more target
-            architectures.
         </para>
 
         <para>
@@ -86,14 +86,15 @@
 
                     i686 or x86_64.
 
-         <replaceable>image_type</replaceable> is the image for which the SDK was built.
+         <replaceable>image_type</replaceable> is the image for which the SDK was built:
+
+                    core-image-minimal or core-image-sato.
 
          <replaceable>arch</replaceable> is a string representing the tuned target architecture:
 
-                    i586, x86_64, powerpc, mips, armv7a or armv5te
+                    aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon.
 
-         <replaceable>release_version</replaceable> is a string representing the release number of the
-                Yocto Project:
+         <replaceable>release_version</replaceable> is a string representing the release number of the Yocto Project:
 
                     &DISTRO;, &DISTRO;+snapshot
             </literallayout>
@@ -120,38 +121,36 @@
 
         <para>
             The SDK and toolchains are self-contained and by default are
-            installed into <filename>/opt/poky</filename>.
-            However, when you run the SDK installer, you can choose an
-            installation directory.
-            <note>
-                You must change the permissions on the SDK
-                installer script so that it is executable:
-                <literallayout class='monospaced'>
-     $ chmod +x poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
-                </literallayout>
-            </note>
+            installed into the <filename>poky_sdk</filename> folder in your
+            home directory.
+            You can choose to install the extensible SDK in any location when
+            you run the installer.
+            However, because files need to be written under that directory
+            during the normal course of operation, the location you choose
+            for installation must be writable for whichever
+            users need to use the SDK.
         </para>
 
         <para>
             The following command shows how to run the installer given a
             toolchain tarball for a 64-bit x86 development host system and
-            a 32-bit x86 target architecture.
+            a 64-bit x86 target architecture.
             The example assumes the SDK installer is located in
-            <filename>~/Downloads/</filename>.
+            <filename>~/Downloads/</filename> and has execution rights.
             <note>
                 If you do not have write permissions for the directory
                 into which you are installing the SDK, the installer
                 notifies you and exits.
-                Be sure you have write permissions in the directory and
-                run the installer again.
+                For that case, set up the proper permissions in the directory
+                and run the installer again.
             </note>
             <literallayout class='monospaced'>
-     $ ./poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
+     $ ./Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
      Poky (Yocto Project Reference Distro) SDK installer version &DISTRO;
      ===============================================================
      Enter target directory for SDK (default: /opt/poky/&DISTRO;):
      You are about to install the SDK to "/opt/poky/&DISTRO;". Proceed[Y/n]? Y
-     Extracting SDK.......................................................................done
+     Extracting SDK........................................ ..............................done
      Setting it up...done
      SDK has been successfully set up and is ready to be used.
      Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
@@ -172,12 +171,11 @@
 
         <para>
             Once you have the SDK installed, you must run the SDK environment
-            setup script before you can actually use it.
+            setup script before you can actually use the SDK.
             This setup script resides in the directory you chose when you
-            installed the SDK.
-            For information on where this setup script can reside, see the
-            "<link linkend='sdk-appendix-obtain'>Obtaining the SDK</link>"
-            Appendix.
+            installed the SDK, which is either the default
+            <filename>/opt/poky/&DISTRO;</filename> directory or the directory
+            you chose during installation.
         </para>
 
         <para>
@@ -186,9 +184,11 @@
             Environment setup scripts begin with the string
             "<filename>environment-setup</filename>" and include as part of
             their name the tuned target architecture.
-            For example, the command to source a setup script for an IA-based
-            target machine using i586 tuning and located in the default SDK
-            installation directory is as follows:
+            As an example, the following commands set the working directory
+            to where the SDK was installed and then source the environment
+            setup script.
+            In this example, the setup script is for an IA-based
+            target machine using i586 tuning:
             <literallayout class='monospaced'>
      $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
             </literallayout>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml
index 6965e3f..d8cc422 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml
@@ -8,7 +8,7 @@
 
     <para>
         You can use the SDK toolchain directly with Makefile,
-        Autotools, and <trademark class='trade'>Eclipse</trademark> based
+        Autotools, and <trademark class='trade'>Eclipse</trademark>-based
         projects.
         This chapter covers the first two, while the
         "<link linkend='sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
@@ -19,263 +19,494 @@
         <title>Autotools-Based Projects</title>
 
         <para>
-            Once you have a suitable cross-toolchain installed, it is very easy
-            to develop a project outside of the OpenEmbedded build system.
-            This section presents a simple "Helloworld" example that shows how
-            to set up, compile, and run the project.
+            Once you have a suitable
+            <ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain'>cross-development toolchain</ulink>
+            installed, it is very easy to develop a project using the
+            <ulink url='https://en.wikipedia.org/wiki/GNU_Build_System'>GNU Autotools-based</ulink>
+            workflow, which is outside of the
+            <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
         </para>
 
-        <section id='creating-and-running-a-project-based-on-gnu-autotools'>
-            <title>Creating and Running a Project Based on GNU Autotools</title>
+        <para>
+            The following figure presents a simple Autotools workflow.
+            <imagedata fileref="figures/sdk-autotools-flow.png" width="7in" height="8in" align="center" />
+        </para>
 
-            <para>
-                Follow these steps to create a simple Autotools-based project:
-                <orderedlist>
-                    <listitem><para>
-                        <emphasis>Create your directory:</emphasis>
-                        Create a clean directory for your project and then make
-                        that directory your working location:
-                        <literallayout class='monospaced'>
+        <para>
+            Follow these steps to create a simple Autotools-based
+            "Hello World" project:
+            <note>
+                For more information on the GNU Autotools workflow,
+                see the same example on the
+                <ulink url='https://developer.gnome.org/anjuta-build-tutorial/stable/create-autotools.html.en'>GNOME Developer</ulink>
+                site.
+            </note>
+            <orderedlist>
+                <listitem><para>
+                    <emphasis>Create a Working Directory and Populate It:</emphasis>
+                    Create a clean directory for your project and then make
+                    that directory your working location.
+                    <literallayout class='monospaced'>
      $ mkdir $HOME/helloworld
      $ cd $HOME/helloworld
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Populate the directory:</emphasis>
-                        Create <filename>hello.c</filename>,
-                        <filename>Makefile.am</filename>,
-                        and <filename>configure.ac</filename> files as follows:
-                        <itemizedlist>
-                            <listitem><para>
-                                For <filename>hello.c</filename>, include
-                                these lines:
-                                <literallayout class='monospaced'>
+                    </literallayout>
+                    After setting up the directory, populate it with files
+                    needed for the flow.
+                    You need a project source file, a file to help with
+                    configuration, and a file to help create the Makefile,
+                    and a README file:
+                    <filename>hello.c</filename>,
+                    <filename>configure.ac</filename>,
+                    <filename>Makefile.am</filename>, and
+                    <filename>README</filename>, respectively.</para>
+
+                    <para> Use the following command to create an empty README
+                    file, which is required by GNU Coding Standards:
+                    <literallayout class='monospaced'>
+     $ touch README
+                    </literallayout>
+                    Create the remaining three files as follows:
+                    <itemizedlist>
+                        <listitem><para>
+                            <emphasis><filename>hello.c</filename>:</emphasis>
+                            <literallayout class='monospaced'>
      #include &lt;stdio.h&gt;
 
      main()
         {
            printf("Hello World!\n");
         }
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>
-                                For <filename>Makefile.am</filename>,
-                                include these lines:
-                                <literallayout class='monospaced'>
-     bin_PROGRAMS = hello
-     hello_SOURCES = hello.c
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>
-                                For <filename>configure.in</filename>,
-                                include these lines:
-                                <literallayout class='monospaced'>
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis><filename>configure.ac</filename>:</emphasis>
+                            <literallayout class='monospaced'>
      AC_INIT(hello,0.1)
      AM_INIT_AUTOMAKE([foreign])
      AC_PROG_CC
-     AC_PROG_INSTALL
-     AC_OUTPUT(Makefile)
-                                </literallayout>
-                                </para></listitem>
-                        </itemizedlist>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Source the cross-toolchain
-                        environment setup file:</emphasis>
-                        As described earlier in the manual, installing the
-                        cross-toolchain creates a cross-toolchain
-                        environment setup script in the directory that the SDK
-                        was installed.
-                        Before you can use the tools to develop your project,
-                        you must source this setup script.
-                        The script begins with the string "environment-setup"
-                        and contains the machine architecture, which is
-                        followed by the string "poky-linux".
-                        Here is an example that sources a script from the
-                        default SDK installation directory that uses the
-                        32-bit Intel x86 Architecture and the
-                        &DISTRO_NAME; Yocto Project release:
-                        <literallayout class='monospaced'>
+     AC_CONFIG_FILES(Makefile)
+     AC_OUTPUT
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>
+                            <emphasis><filename>Makefile.am</filename>:</emphasis>
+                            <literallayout class='monospaced'>
+     bin_PROGRAMS = hello
+     hello_SOURCES = hello.c
+                            </literallayout>
+                            </para></listitem>
+                    </itemizedlist>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Source the Cross-Toolchain
+                    Environment Setup File:</emphasis>
+                    As described earlier in the manual, installing the
+                    cross-toolchain creates a cross-toolchain
+                    environment setup script in the directory that the SDK
+                    was installed.
+                    Before you can use the tools to develop your project,
+                    you must source this setup script.
+                    The script begins with the string "environment-setup"
+                    and contains the machine architecture, which is
+                    followed by the string "poky-linux".
+                    For this example, the command sources a script from the
+                    default SDK installation directory that uses the
+                    32-bit Intel x86 Architecture and the
+                    &DISTRO_NAME; Yocto Project release:
+                    <literallayout class='monospaced'>
      $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Generate the local aclocal.m4
-                        files and create the configure script:</emphasis>
-                        The following GNU Autotools generate the local
-                        <filename>aclocal.m4</filename> files and create the
-                        configure script:
-                        <literallayout class='monospaced'>
-     $ aclocal
-     $ autoconf
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Generate files needed by GNU coding
-                        standards:</emphasis>
-                        GNU coding standards require certain files in order
-                        for the project to be compliant.
-                        This command creates those files:
-                        <literallayout class='monospaced'>
-     $ touch NEWS README AUTHORS ChangeLog
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Generate the configure file:</emphasis>
-                        This command generates the
-                        <filename>configure</filename>:
-                        <literallayout class='monospaced'>
-     $ automake -a
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Cross-compile the project:</emphasis>
-                        This command compiles the project using the
-                        cross-compiler.
-                        The
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink>
-                        environment variable provides the minimal arguments for
-                        GNU configure:
-                        <literallayout class='monospaced'>
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Create the <filename>configure</filename> Script:</emphasis>
+                    Use the <filename>autoreconf</filename> command to
+                    generate the <filename>configure</filename> script.
+                    <literallayout class='monospaced'>
+     $ autoreconf
+                    </literallayout>
+                    The <filename>autoreconf</filename> tool takes care
+                    of running the other Autotools such as
+                    <filename>aclocal</filename>,
+                    <filename>autoconf</filename>, and
+                    <filename>automake</filename>.
+                    <note>
+                        If you get errors from
+                        <filename>configure.ac</filename>, which
+                        <filename>autoreconf</filename> runs, that indicate
+                        missing files, you can use the "-i" option, which
+                        ensures missing auxiliary files are copied to the build
+                        host.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Cross-Compile the Project:</emphasis>
+                    This command compiles the project using the
+                    cross-compiler.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink>
+                    environment variable provides the minimal arguments for
+                    GNU configure:
+                    <literallayout class='monospaced'>
      $ ./configure ${CONFIGURE_FLAGS}
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Make and install the project:</emphasis>
-                        These two commands generate and install the project
-                        into the destination directory:
-                        <literallayout class='monospaced'>
+                    </literallayout>
+                    For an Autotools-based project, you can use the
+                    cross-toolchain by just passing the appropriate host
+                    option to <filename>configure.sh</filename>.
+                    The host option you use is derived from the name of the
+                    environment setup script found in the directory in which
+                    you installed the cross-toolchain.
+                    For example, the host option for an ARM-based target that
+                    uses the GNU EABI is
+                    <filename>armv5te-poky-linux-gnueabi</filename>.
+                    You will notice that the name of the script is
+                    <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
+                    Thus, the following command works to update your project
+                    and rebuild it using the appropriate cross-toolchain tools:
+                    <literallayout class='monospaced'>
+     $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=<replaceable>sysroot_dir</replaceable>
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Make and Install the Project:</emphasis>
+                    These two commands generate and install the project
+                    into the destination directory:
+                    <literallayout class='monospaced'>
      $ make
      $ make install DESTDIR=./tmp
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Verify the installation:</emphasis>
-                        This command is a simple way to verify the installation
-                        of your project.
-                        Running the command prints the architecture on which
-                        the binary file can run.
-                        This architecture should be the same architecture that
-                        the installed cross-toolchain supports.
-                        <literallayout class='monospaced'>
-     $ file ./tmp/usr/local/bin/hello
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Execute your project:</emphasis>
-                        To execute the project in the shell, simply enter
-                        the name.
-                        You could also copy the binary to the actual target
-                        hardware and run the project there as well:
-                        <literallayout class='monospaced'>
-     $ ./hello
-                        </literallayout>
-                        As expected, the project displays the "Hello World!"
-                        message.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='passing-host-options'>
-            <title>Passing Host Options</title>
-
-            <para>
-                For an Autotools-based project, you can use the cross-toolchain
-                by just passing the appropriate host option to
-                <filename>configure.sh</filename>.
-                The host option you use is derived from the name of the
-                environment setup script found in the directory in which you
-                installed the cross-toolchain.
-                For example, the host option for an ARM-based target that uses
-                the GNU EABI is <filename>armv5te-poky-linux-gnueabi</filename>.
-                You will notice that the name of the script is
-                <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
-                Thus, the following command works to update your project and
-                rebuild it using the appropriate cross-toolchain tools:
-                <literallayout class='monospaced'>
-     $ ./configure --host=armv5te-poky-linux-gnueabi \
-        --with-libtool-sysroot=<replaceable>sysroot_dir</replaceable>
-                </literallayout>
-                <note>
-                    If the <filename>configure</filename> script results in
-                    problems recognizing the
-                    <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable>
-                    option, regenerate the script to enable the support by
-                    doing the following and then run the script again:
-                    <literallayout class='monospaced'>
-     $ libtoolize --automake
-     $ aclocal -I ${OECORE_TARGET_SYSROOT}/usr/share/aclocal [-I <replaceable>dir_containing_your_project-specific_m4_macros</replaceable>]
-     $ autoconf
-     $ autoheader
-     $ automake -a
                     </literallayout>
-                </note>
-            </para>
-        </section>
+                    <note>
+                        To learn about environment variables established
+                        when you run the cross-toolchain environment setup
+                        script and how they are used or overridden when
+                        the Makefile, see the
+                        "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
+                        section.
+                    </note>
+                    This next command is a simple way to verify the
+                    installation of your project.
+                    Running the command prints the architecture on which
+                    the binary file can run.
+                    This architecture should be the same architecture that
+                    the installed cross-toolchain supports.
+                    <literallayout class='monospaced'>
+     $ file ./tmp/usr/local/bin/hello
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Execute Your Project:</emphasis>
+                    To execute the project, you would need to run it on your
+                    target hardware.
+                    If your target hardware happens to be your build host,
+                    you could run the project as follows:
+                    <literallayout class='monospaced'>
+     $ ./tmp/usr/local/bin/hello
+                    </literallayout>
+                    As expected, the project displays the "Hello World!"
+                    message.
+                    </para></listitem>
+            </orderedlist>
+        </para>
     </section>
 
     <section id='makefile-based-projects'>
         <title>Makefile-Based Projects</title>
 
         <para>
-            For Makefile-based projects, the cross-toolchain environment
-            variables established by running the cross-toolchain environment
-            setup script are subject to general <filename>make</filename>
-            rules.
+            Simple Makefile-based projects use and interact with the
+            cross-toolchain environment variables established when you run
+            the cross-toolchain environment setup script.
+            The environment variables are subject to general
+            <filename>make</filename> rules.
         </para>
 
         <para>
-            To illustrate this, consider the following four cross-toolchain
-            environment variables:
-            <literallayout class='monospaced'>
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'>CC</ulink>=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/&DISTRO;/sysroots/i586-poky-linux
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'>LD</ulink>=i586-poky-linux-ld --sysroot=/opt/poky/&DISTRO;/sysroots/i586-poky-linux
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'>CFLAGS</ulink>=-O2 -pipe -g -feliminate-unused-debug-types
-     <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'>CXXFLAGS</ulink>=-O2 -pipe -g -feliminate-unused-debug-types
-            </literallayout>
-            Now, consider the following three cases:
+            This section presents a simple Makefile development flow and
+            provides an example that lets you see how you can use
+            cross-toolchain environment variables and Makefile variables
+            during development.
+            <imagedata fileref="figures/sdk-makefile-flow.png" width="6in" height="7in" align="center" />
+        </para>
+
+        <para>
+            The main point of this section is to explain the following three
+            cases regarding variable behavior:
             <itemizedlist>
                 <listitem><para>
                     <emphasis>Case 1 - No Variables Set in the
-                    <filename>Makefile</filename>:</emphasis>
-                    Because these variables are not specifically set in the
+                    <filename>Makefile</filename> Map to Equivalent
+                    Environment Variables Set in the SDK Setup Script:</emphasis>
+                    Because matching variables are not specifically set in the
                     <filename>Makefile</filename>, the variables retain their
-                    values based on the environment.
+                    values based on the environment setup script.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Case 2 - Variables Set in the
-                    <filename>Makefile</filename>:</emphasis>
-                    Specifically setting variables in the
+                    <emphasis>Case 2 - Variables Are Set in the Makefile that
+                    Map to Equivalent Environment Variables from the SDK
+                    Setup Script:</emphasis>
+                    Specifically setting matching variables in the
                     <filename>Makefile</filename> during the build results in
                     the environment settings of the variables being
                     overwritten.
+                    In this case, the variables you set in the
+                    <filename>Makefile</filename> are used.
                     </para></listitem>
                 <listitem><para>
-                    <emphasis>Case 3 - Variables Set when the
-                    <filename>Makefile</filename> is Executed from the
-                    Command Line:</emphasis>
+                    <emphasis>Case 3 - Variables Are Set Using the Command Line
+                    that Map to Equivalent Environment Variables from the
+                    SDK Setup Script:</emphasis>
                     Executing the <filename>Makefile</filename> from the
-                    command-line results in the variables being overwritten
-                    with command-line content regardless of what is being set
-                    in the <filename>Makefile</filename>.
-                    In this case, environment variables are not considered
-                    unless you use the "-e" flag during the build:
-                    <literallayout class='monospaced'>
-     $ make -e <replaceable>file</replaceable>
-                    </literallayout>
-                    If you use this flag, then the environment values of the
-                    variables override any variables specifically set in the
-                    <filename>Makefile</filename>.
+                    command line results in the environment variables being
+                    overwritten.
+                    In this case, the command-line content is used.
                     </para></listitem>
             </itemizedlist>
             <note>
-                For the list of variables set up by the cross-toolchain
-                environment setup script, see the
-                "<link linkend='sdk-running-the-sdk-environment-setup-script'>Running the SDK Environment Setup Script</link>"
-                section.
+                Regardless of how you set your variables, if you use
+                the "-e" option with <filename>make</filename>, the
+                variables from the SDK setup script take precedence:
+                <literallayout class='monospaced'>
+     $ make -e <replaceable>target</replaceable>
+                </literallayout>
             </note>
         </para>
+
+        <para>
+            The remainder of this section presents a simple Makefile example
+            that demonstrates these variable behaviors.
+        </para>
+
+        <para>
+            In a new shell environment variables are not established for the
+            SDK until you run the setup script.
+            For example, the following commands show a null value for the
+            compiler variable (i.e.
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>).
+            <literallayout class='monospaced'>
+     $ echo ${CC}
+
+     $
+            </literallayout>
+            Running the SDK setup script for a 64-bit build host and an
+            i586-tuned target architecture for a
+            <filename>core-image-sato</filename> image using the current
+            &DISTRO; Yocto Project release and then echoing that variable
+            shows the value established through the script:
+            <literallayout class='monospaced'>
+     $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
+     $ echo ${CC}
+     i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux
+            </literallayout>
+        </para>
+
+        <para>
+            To illustrate variable use, work through this simple "Hello World!"
+            example:
+            <orderedlist>
+                <listitem><para>
+                    <emphasis>Create a Working Directory and Populate It:</emphasis>
+                    Create a clean directory for your project and then make
+                    that directory your working location.
+                    <literallayout class='monospaced'>
+     $ mkdir $HOME/helloworld
+     $ cd $HOME/helloworld
+                    </literallayout>
+                    After setting up the directory, populate it with files
+                    needed for the flow.
+                    You need a <filename>main.c</filename> file from which you
+                    call your function, a <filename>module.h</filename> file
+                    to contain headers, and a <filename>module.c</filename>
+                    that defines your function.
+                    </para>
+
+                    <para>Create the three files as follows:
+                        <itemizedlist>
+                            <listitem><para>
+                                <emphasis><filename>main.c</filename>:</emphasis>
+                                <literallayout class='monospaced'>
+     #include "module.h"
+     void sample_func();
+     int main()
+     {
+     	sample_func();
+     	return 0;
+     }
+                                </literallayout>
+                                </para></listitem>
+                            <listitem><para>
+                                <emphasis><filename>module.h</filename>:</emphasis>
+                                <literallayout class='monospaced'>
+     #include &lt;stdio.h&gt;
+     void sample_func();
+                                </literallayout>
+                                </para></listitem>
+                            <listitem><para>
+                                <emphasis><filename>module.c</filename>:</emphasis>
+                                <literallayout class='monospaced'>
+     #include "module.h"
+     void sample_func()
+     {
+	     printf("Hello World!");
+	     printf("\n");
+     }
+                                </literallayout>
+                                </para></listitem>
+                        </itemizedlist>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Source the Cross-Toolchain Environment Setup File:</emphasis>
+                    As described earlier in the manual, installing the
+                    cross-toolchain creates a cross-toolchain environment setup
+                    script in the directory that the SDK was installed.
+                    Before you can use the tools to develop your project,
+                    you must source this setup script.
+                    The script begins with the string "environment-setup"
+                    and contains the machine architecture, which is
+                    followed by the string "poky-linux".
+                    For this example, the command sources a script from the
+                    default SDK installation directory that uses the
+                    32-bit Intel x86 Architecture and the
+                    &DISTRO_NAME; Yocto Project release:
+                    <literallayout class='monospaced'>
+     $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Create the <filename>Makefile</filename>:</emphasis>
+                    For this example, the Makefile contains two lines that
+                    can be used to set the <filename>CC</filename> variable.
+                    One line is identical to the value that is set when you
+                    run the SDK environment setup script, and the other line
+                    sets <filename>CC</filename> to "gcc", the default GNU
+                    compiler on the build host:
+                    <literallayout class='monospaced'>
+     # CC=i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux
+     # CC="gcc"
+     all: main.o module.o
+     	 ${CC} main.o module.o -o target_bin
+     main.o: main.c module.h
+	     ${CC} -I . -c main.c
+     module.o: module.c module.h
+	     ${CC} -I . -c module.c
+     clean:
+	     rm -rf *.o
+	     rm target_bin
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Make the Project:</emphasis>
+                    Use the <filename>make</filename> command to create the
+                    binary output file.
+                    Because variables are commented out in the Makefile,
+                    the value used for <filename>CC</filename> is the value
+                    set when the SDK environment setup file was run:
+                    <literallayout class='monospaced'>
+     $ make
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin
+                    </literallayout>
+                    From the results of the previous command, you can see that
+                    the compiler used was the compiler established through
+                    the <filename>CC</filename> variable defined in the
+                    setup script.</para>
+
+                    <para>You can override the <filename>CC</filename>
+                    environment variable with the same variable as set from
+                    the Makefile by uncommenting the line in the Makefile
+                    and running <filename>make</filename> again.
+                    <literallayout class='monospaced'>
+     $ make clean
+     rm -rf *.o
+     rm target_bin
+     #
+     # Edit the Makefile by uncommenting the line that sets CC to "gcc"
+     #
+     $ make
+     gcc -I . -c main.c
+     gcc -I . -c module.c
+     gcc main.o module.o -o target_bin
+                    </literallayout>
+                    As shown in the previous example, the cross-toolchain
+                    compiler is not used.
+                    Rather, the default compiler is used.</para>
+
+                    <para>This next case shows how to override a variable
+                    by providing the variable as part of the command line.
+                    Go into the Makefile and re-insert the comment character
+                    so that running <filename>make</filename> uses
+                    the established SDK compiler.
+                    However, when you run <filename>make</filename>, use a
+                    command-line argument to set <filename>CC</filename>
+                    to "gcc":
+                    <literallayout class='monospaced'>
+     $ make clean
+     rm -rf *.o
+     rm target_bin
+     #
+     # Edit the Makefile to comment out the line setting CC to "gcc"
+     #
+     $ make
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin
+     $ make clean
+     rm -rf *.o
+     rm target_bin
+     $ make CC="gcc"
+     gcc -I . -c main.c
+     gcc -I . -c module.c
+     gcc main.o module.o -o target_bin
+                    </literallayout>
+                    In the previous case, the command-line argument overrides
+                    the SDK environment variable.</para>
+
+                    <para>In this last case, edit Makefile again to use the
+                    "gcc" compiler but then use the "-e" option on the
+                    <filename>make</filename> command line:
+                    <literallayout class='monospaced'>
+     $ make clean
+     rm -rf *.o
+     rm target_bin
+     #
+     # Edit the Makefile to use "gcc"
+     #
+     $ make
+     gcc -I . -c main.c
+     gcc -I . -c module.c
+     gcc main.o module.o -o target_bin
+     $ make clean
+     rm -rf *.o
+     rm target_bin
+     $ make -e
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c
+     i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin
+                    </literallayout>
+                    In the previous case, the "-e" option forces
+                    <filename>make</filename> to use the SDK environment
+                    variables regardless of the values in the Makefile.
+                    </para></listitem>
+                <listitem><para>
+                    <emphasis>Execute Your Project:</emphasis>
+                    To execute the project (i.e.
+                    <filename>target_bin</filename>), use the following
+                    command:
+                    <literallayout class='monospaced'>
+     $ ./target_bin
+     Hello World!
+                    </literallayout>
+                    <note>
+                        If you used the cross-toolchain compiler to build
+                        <filename>target_bin</filename> and your build host
+                        differs in architecture from that of the target
+                        machine, you need to run your project on the target
+                        device.
+                    </note>
+                    As expected, the project displays the "Hello World!"
+                    message.
+                    </para></listitem>
+            </orderedlist>
+        </para>
     </section>
 </chapter>
 <!--
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
index 4e59e00..e84964c 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
@@ -38,7 +38,7 @@
                             Browse layers listed in the various
                             <link linkend='layer-source'>layer sources</link>
                             that are available in your project (e.g. the
-                            OpenEmbedded Metadata Index at
+                            OpenEmbedded Layer Index at
                             <ulink url='http://layers.openembedded.org/layerindex/'></ulink>).
                             </para></listitem>
                         <listitem><para>
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
index e984391..7440580 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
@@ -34,7 +34,7 @@
             A layer index is a web application that contains information
             about a set of custom layers.
             A good example of an existing layer index is the
-            OpenEmbedded Metadata Index.
+            OpenEmbedded Layer Index.
             A public instance of this layer index exists at
             <ulink url='http://layers.openembedded.org'></ulink>.
             You can find the code for this layer index's web application at
@@ -92,11 +92,11 @@
 
                 <para>
                     For general information on layers, see the
-                    "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
-                    and
-                    "<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>"
-                    sections in the Yocto Project Board Support Package (BSP)
-                    Developer's Guide.
+                    "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
+                    section in the Yocto Project Overview and Concepts Manual.
+                    For information on how to create layers, see the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+                    section in the Yocto Project Development Tasks Manual.
                 </para>
             </section>
 
@@ -681,26 +681,27 @@
             (e.g. <filename>poky</filename>) at
             <filename>bitbake/lib/manage.py</filename>.
             This section documents those commands.
-            <note>
-                <para>
-                    When using <filename>manage.py</filename> commands given
-                    a default configuration, you must be sure that your
-                    working directory is set to the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
-                    Using <filename>manage.py</filename> commands from the
-                    Build Directory allows Toaster to find the
-                    <filename>toaster.sqlite</filename> file, which is located
-                    in the Build Directory.
-                </para>
-
-                <para>
-                    For non-default database configurations, it is possible
-                    that you can use <filename>manage.py</filename> commands
-                    from a directory other than the Build directory.
-                    To do so, the
-                    <filename>toastermain/settings.py</filename> file must be
-                    configured to point to the correct database backend.
-                </para>
+            <note><title>Notes</title>
+                <itemizedlist>
+                    <listitem><para>
+                        When using <filename>manage.py</filename> commands given
+                        a default configuration, you must be sure that your
+                        working directory is set to the
+                        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+                        Using <filename>manage.py</filename> commands from the
+                        Build Directory allows Toaster to find the
+                        <filename>toaster.sqlite</filename> file, which is located
+                        in the Build Directory.
+                        </para></listitem>
+                    <listitem><para>
+                        For non-default database configurations, it is possible
+                        that you can use <filename>manage.py</filename> commands
+                        from a directory other than the Build Directory.
+                        To do so, the
+                        <filename>toastermain/settings.py</filename> file must be
+                        configured to point to the correct database backend.
+                        </para></listitem>
+                </itemizedlist>
             </note>
         </para>
 
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
index c26a32a..b4caebb 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
@@ -11,9 +11,9 @@
 
         <para>
             Once you have set up the Yocto Project and installed the
-            Toaster system dependencies as described in
-            "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>",
-            you are ready to start Toaster.
+            Toaster system dependencies as described in the
+            "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>"
+            chapter, you are ready to start Toaster.
         </para>
 
         <para>
@@ -61,6 +61,71 @@
         </para>
     </section>
 
+    <section id='setting-up-toaster-without-a-web-server'>
+        <title>Setting Up Toaster Without a Web Server</title>
+
+        <para>
+            You can start a Toaster environment without starting its
+            web server. This is useful for the following:
+            <itemizedlist>
+                <listitem><para>
+                    Capturing a command-line build’s statistics into
+                    the Toaster database for examination later.
+                    </para></listitem>
+                <listitem><para>
+                    Capturing a command-line build’s statistics when
+                    the Toaster server is already running.
+                    </para></listitem>
+                <listitem><para>
+                    Having one instance of the Toaster web server
+                    track and capture multiple command-line builds,
+                    where each build is started in its own “noweb”
+                    Toaster environment.
+                    </para></listitem>
+            </itemizedlist>
+            The following commands show how to start a Toaster environment
+            without starting its web server, perform BitBake operations,
+            and then shut down the Toaster environment.
+            Once the build is complete, you can close the Toaster environment.
+            Before closing the environment, however, you should allow a few
+            minutes to ensure the complete transfer of its BitBake build
+            statistics to the Toaster database.
+            If you have a separate Toaster web server instance running, you
+            can watch this command-line build’s progress and examine the
+            results as soon as they are posted:
+            <literallayout class='monospaced'>
+     $ source toaster start noweb
+     $ bitbake <replaceable>target</replaceable>
+     $ source toaster stop
+            </literallayout>
+        </para>
+    </section>
+
+    <section id='setting-up-toaster-without-a-build-server'>
+        <title>Setting Up Toaster Without a Build Server</title>
+
+        <para>
+            You can start a Toaster environment with the
+            “New Projects” feature disabled.
+            Doing so is useful for the following:
+            <itemizedlist>
+                <listitem><para>
+                    Sharing your build results over the web server while
+                    blocking others from starting builds on your host.
+                    </para></listitem>
+                <listitem><para>
+                    Allowing only local command-line builds to be captured
+                    into the Toaster database.
+                    </para></listitem>
+            </itemizedlist>
+            Use the following command to set up Toaster without a
+            build server:
+            <literallayout class='monospaced'>
+     $ source toaster start nobuild webport=<replaceable>port</replaceable>
+            </literallayout>
+        </para>
+    </section>
+
     <section id='setting-up-external-access'>
         <title>Setting up External Access</title>
 
@@ -227,8 +292,8 @@
               </note>
               <itemizedlist>
                   <listitem><para>
-                      Have all the build requirements as described in
-                      "<link linkend='toaster-setting-up-the-basic-system-requirements'>Setting Up the Basic System Requirements</link>"
+                      Have all the build requirements as described in the
+                      "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>"
                       chapter.
                       </para></listitem>
                   <listitem><para>
@@ -312,7 +377,7 @@
                       <itemizedlist>
                           <listitem><para>
                               Edit the
-                              <ulink url='http://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SECRET_KEY'>DATABASE</ulink>
+                              <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#databases'>DATABASES</ulink>
                               settings:
                               <literallayout class='monospaced'>
    DATABASES = {
@@ -329,14 +394,14 @@
                               </para></listitem>
                           <listitem><para>
                               Edit the
-                              <ulink url='http://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SECRET_KEY'>SECRET_KEY</ulink>:
+                              <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-SECRET_KEY'>SECRET_KEY</ulink>:
                               <literallayout class='monospaced'>
    SECRET_KEY = '<replaceable>your_secret_key</replaceable>'
                               </literallayout>
                               </para></listitem>
                           <listitem><para>
                               Edit the
-                              <ulink url='http://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SECRET_KEY'>STATIC_ROOT</ulink>:
+                              <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-STATIC_ROOT'>STATIC_ROOT</ulink>:
                               <literallayout class='monospaced'>
    STATIC_ROOT = '/var/www/toaster/static_files/'
                               </literallayout>
@@ -360,58 +425,68 @@
                       <literallayout class='monospaced'>
    $ cd  /var/www/toaster/poky/
    $ ./bitbake/lib/toaster/manage.py migrate
-   $ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-poky/conf/toasterconf.json \
+   $ TOASTER_DIR=`pwd` TEMPLATECONF='poky' \
      ./bitbake/lib/toaster/manage.py checksettings
    $ ./bitbake/lib/toaster/manage.py collectstatic
                       </literallayout>
-                      </para>
+                      In the previous example, from the <filename>poky</filename>
+                      directory, the <filename>migrate</filename> command
+                      ensures the database schema changes have propagated
+                      correctly (i.e. migrations).
+                      The next line sets the Toaster root directory
+                      <filename>TOASTER_DIR</filename> and the location
+                      of the Toaster configuration file
+                      <filename>TOASTER_CONF</filename>, which is relative to
+                      <filename>TOASTER_DIR</filename>.
+                      The <filename>TEMPLATECONF</filename> value reflects the
+                      contents of <filename>poky/.templateconf</filename>, and
+                      by default, should include the string "poky".
+                      For more information on the Toaster configuration
+                      file, see the
+                      "<link linkend='configuring-toaster'>Configuring Toaster</link>"
+                      section.</para>
 
-                      <para>
-                          For the above set of commands, after moving to the
-                          <filename>poky</filename> directory,
-                          the <filename>migrate</filename>
-                          command ensures the database
-                          schema has had changes propagated correctly (i.e.
-                          migrations).
-                      </para>
-
-                      <para>
-                          The next line sets the Toaster root directory
-                          <filename>TOASTER_DIR</filename> and the location of
-                          the Toaster configuration file
-                          <filename>TOASTER_CONF</filename>, which is
-                          relative to the Toaster root directory
-                          <filename>TOASTER_DIR</filename>.
-                          For more information on the Toaster configuration file,
-                          see the
-                          <link linkend='configuring-toaster'>Configuring Toaster</link>
-                          chapter.
-                      </para>
-
-                      <para>
-                          This line also runs the <filename>checksettings</filename>
-                          command, which configures the location of the Toaster
-                          <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build directory</ulink>.
-                          The Toaster root directory <filename>TOASTER_DIR</filename>
-                          determines where the Toaster build directory
-                          is created on the file system.
-                          In the example above,
-                          <filename>TOASTER_DIR</filename> is set as follows:
-                          <literallayout class="monospaced">
+                      <para>This line also runs the <filename>checksettings</filename>
+                      command, which configures the location of the Toaster
+                      <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+                      The Toaster root directory <filename>TOASTER_DIR</filename>
+                      determines where the Toaster build directory
+                      is created on the file system.
+                      In the example above,
+                      <filename>TOASTER_DIR</filename> is set as follows:
+                      <literallayout class="monospaced">
    /var/www/toaster/poky
-                          </literallayout>
-                          This setting causes the Toaster build directory to be:
-                          <literallayout class="monospaced">
+                      </literallayout>
+                      This setting causes the Toaster build directory to be:
+                      <literallayout class="monospaced">
    /var/www/toaster/poky/build
-                          </literallayout>
-                      </para>
+                      </literallayout></para>
 
-                      <para>
-                          Finally, the <filename>collectstatic</filename> command
-                          is a Django framework command that collects all the
-                          statically served files into a designated directory to
-                          be served up by the Apache web server as defined by
-                          <filename>STATIC_ROOT</filename>.
+                      <para>Finally, the <filename>collectstatic</filename> command
+                      is a Django framework command that collects all the
+                      statically served files into a designated directory to
+                      be served up by the Apache web server as defined by
+                      <filename>STATIC_ROOT</filename>.
+                      </para></listitem>
+                  <listitem><para>
+                      Test and/or use the Mysql integration with Toaster’s
+                      Django web server.
+                      At this point, you can start up the normal Toaster
+                      Django web server with the Toaster database in Mysql.
+                      You can use this web server to confirm that the database
+                      migration and data population from the Layer Index is
+                      complete.</para>
+
+                      <para>To start the default Toaster Django web server with
+                      the Toaster database now in Mysql, use the standard
+                      start commands:
+                      <literallayout class='monospaced'>
+   $ source oe-init-build-env
+   $ source toaster start
+                      </literallayout>
+                      Additionally, if Django is sufficient for your requirements,
+                      you can use it for your release system and migrate later
+                      to Apache as your requirements change.
                       </para></listitem>
                   <listitem><para>
                       Add an Apache configuration file for Toaster to your Apache web
@@ -535,7 +610,7 @@
           <itemizedlist>
               <listitem><para>
                   Browse published layers in the
-                  <ulink url='http://layers.openembedded.org'>OpenEmbedded Metadata Index</ulink>
+                  <ulink url='http://layers.openembedded.org'>OpenEmbedded Layer Index</ulink>
                   that are available for your selected version of the build
                   system.
                   </para></listitem>
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml
index 65e057a..45f6046 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml
@@ -18,10 +18,9 @@
             Before you can use Toaster, you need to first set up your
             build system to run the Yocto Project.
             To do this, follow the instructions in the
-            "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>"
-            and
-            "<ulink url='&YOCTO_DOCS_QS_URL;#releases'>Yocto Project Release</ulink>"
-            sections in the Yocto Project Quick Start.
+            "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Preparing the Build Host</ulink>"
+            section of the Yocto Project Development Tasks
+            Manual.
  	    For Ubuntu/Debian, you might also need to do an additional install
             of pip3.
                 <literallayout class='monospaced'>
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml
index 5a1b60e..1888744 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml
@@ -62,14 +62,9 @@
                 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
             </revision>
             <revision>
-                <revnumber>2.4.1</revnumber>
-                <date>January 2018</date>
-                <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
-            </revision>
-            <revision>
-                <revnumber>2.4.2</revnumber>
-                <date>March 2018</date>
-                <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
+                <revnumber>2.5</revnumber>
+                <date>May 2018</date>
+                <revremark>Released with the Yocto Project 2.5 Release.</revremark>
             </revision>
        </revhistory>
 
@@ -91,24 +86,36 @@
                        is for the &YOCTO_DOC_VERSION; release of the
                        Yocto Project.
                        To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
+                       for this release, go to the
                        <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
+                       and select the manual from that site.
+                       Manuals from the site are more up-to-date than manuals
+                       derived from the Yocto Project released TAR files.
                        </para></listitem>
                    <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
+                       If you located this manual through a web search, the
+                       version of the manual might not be the one you want
+                       (e.g. the search might have returned a manual much
+                       older than the Yocto Project version with which you
+                       are working).
+                       You can see all Yocto Project major releases by
+                       visiting the
+                       <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
+                       page.
+                       If you need a version of this manual for a different
+                       Yocto Project release, visit the
+                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+                       and select the manual set by using the
+                       "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
+                       pull-down menus.
+                       </para></listitem>
+                   <listitem><para>
+                       To report any inaccuracies or problems with this
+                       manual, send an email to the Yocto Project
+                       discussion group at
+                       <filename>yocto@yoctoproject.com</filename> or log into
+                       the freenode <filename>#yocto</filename> channel.
+                       </para></listitem>
                </itemizedlist>
            </note>
 
diff --git a/import-layers/yocto-poky/documentation/tools/eclipse-help.sed b/import-layers/yocto-poky/documentation/tools/eclipse-help.sed
index 38690bc..ab5c9af 100644
--- a/import-layers/yocto-poky/documentation/tools/eclipse-help.sed
+++ b/import-layers/yocto-poky/documentation/tools/eclipse-help.sed
@@ -1,18 +1,18 @@
-# Processes poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
+# Process poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
 # For example:
 #   "ulink" href="http://www.yoctoproject.org/docs/1.3/poky-ref-manual/poky-ref-manual.html#faq"
 #   -> "link" href="../poky-ref-manual/faq.html"
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
+s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*-[a-z]*)/[a-z]*-[a-z]*-[a-z]*.html#([^"]*)"/@"link" href="../1/2.html"@g
 
 # Processes all other manuals (<word>-<word> style)
 # For example:
 #   "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html#faq"
 #   -> "link" href="../kernel-manual/faq.html"
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
+s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*)/[a-z]*-[a-z]*.html#([^"]*)"@"link" href="../1/2.html"@g
 
 # Process cases where just an external manual is referenced without an id anchor
 # For example:
 #   "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html
 #   -> "link" href="../kernel-manual/index.html"
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g
+s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*-[a-z]*)/[a-z]*-[a-z]*-[a-z]*.html"@"link" href="../1/index.html"@g
+s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*)/[a-z]*-[a-z]*.html"@"link" href="../1/index.html"@g
diff --git a/import-layers/yocto-poky/documentation/tools/mega-manual.sed b/import-layers/yocto-poky/documentation/tools/mega-manual.sed
index ae2800c..64fa4d2 100644
--- a/import-layers/yocto-poky/documentation/tools/mega-manual.sed
+++ b/import-layers/yocto-poky/documentation/tools/mega-manual.sed
@@ -2,32 +2,39 @@
 # This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
 # This is the old way that did it.  Can't do that now that we have "bitbake-user-manual" strings
 # in the mega-manual.
-# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
+# s@"ulink" href="http://www.yoctoproject.org/docs/2.5/[a-z]*-[a-z]*-[a-z]*/[a-z]*-[a-z]*-[a-z]*.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/yocto-project-qs/yocto-project-qs.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/poky-ref-manual/poky-ref-manual.html#@"link" href="#@g
 
 # Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
 # it is not included in the mega-manual.
 # This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
 # This was the one-liner that worked before we introduced the BitBake User Manual, which is
 # not in the mega-manual.
-# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+# s@"ulink" href="http://www.yoctoproject.org/docs/2.5/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g
 
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/sdk-manual\/sdk-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/toaster-manual\/toaster-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/sdk-manual/sdk-manual.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/bsp-guide/bsp-guide.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/dev-manual/dev-manual.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/overview-manual/overview-manual.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/kernel-dev/kernel-dev.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/profile-manual/profile-manual.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/ref-manual/ref-manual.html#@"link" href="#@g
+s@"ulink" href="http://www.yoctoproject.org/docs/2.5/toaster-manual/toaster-manual.html#@"link" href="#@g
 
 # Process cases where just an external manual is referenced without an id anchor
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Tasks Manual<\/a>/Yocto Project Development Tasks Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/sdk-manual\/sdk-manual.html\" target=\"_top\">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)<\/a>/Yocto Project Application Development and the Extensible Software Development Kit (eSDK)/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/toaster-manual\/toaster-manual.html\" target=\"_top\">Toaster User Manual<\/a>/Toaster User Manual/g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/yocto-project-qs/yocto-project-qs.html" target="_top">Yocto Project Quick Start</a>@Yocto Project Quick Start@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/bsp-guide/bsp-guide.html" target="_top">Yocto Project Board Support Package (BSP) Developer's Guide</a>@Yocto Project Board Support Package (BSP) Developer's Guide@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/profile-manual/profile-manual.html" target="_top">Yocto Project Profiling and Tracing Manual</a>@Yocto Project Profiling and Tracing Manual@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/kernel-dev/kernel-dev.html" target="_top">Yocto Project Linux Kernel Development Manual</a>@Yocto Project Linux Kernel Development Manual@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/ref-manual/ref-manual.html" target="_top">Yocto Project Reference Manual</a>@Yocto Project Reference Manual@g
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/toaster-manual/toaster-manual.html" target="_top">Toaster User Manual</a>@Toaster User Manual@g
+
+# Process a single, rouge occurrence of a linked reference to the Mega-Manual.
+s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.5/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g
+
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css b/import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css
deleted file mode 100644
index 948f1be..0000000
--- a/import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css
+++ /dev/null
@@ -1,988 +0,0 @@
-/*
-   Generic XHTML / DocBook XHTML CSS Stylesheet.
-
-   Browser wrangling and typographic design by
-      Oyvind Kolas / pippin@gimp.org
-
-   Customised for Poky by
-      Matthew Allum / mallum@o-hand.com
-
-   Thanks to:
-     Liam R. E. Quin
-     William Skaggs
-     Jakub Steiner
-
-   Structure
-   ---------
-
-   The stylesheet is divided into the following sections:
-
-       Positioning
-          Margins, paddings, width, font-size, clearing.
-       Decorations
-          Borders, style
-       Colors
-          Colors
-       Graphics
-          Graphical backgrounds
-       Nasty IE tweaks
-          Workarounds needed to make it work in internet explorer,
-          currently makes the stylesheet non validating, but up until
-          this point it is validating.
-       Mozilla extensions
-          Transparency for footer
-	  Rounded corners on boxes
-
-*/
-
-
-  /*************** /
- /  Positioning   /
-/ ***************/
-
-body {
-  font-family: Verdana, Sans, sans-serif;
-
-  min-width: 640px;
-  width: 80%;
-  margin:  0em auto;
-  padding: 2em 5em 5em 5em;
-  color: #333;
-}
-
-h1,h2,h3,h4,h5,h6,h7 {
-  font-family: Arial, Sans;
-  color: #00557D;
-  clear: both;
-}
-
-h1 {
-  font-size: 2em;
-  text-align: left;
-  padding: 0em 0em 0em 0em;
-  margin: 2em 0em 0em 0em;
-}
-
-h2.subtitle {
-  margin: 0.10em 0em 3.0em 0em;
-  padding: 0em 0em 0em 0em;
-  font-size: 1.8em;
-  padding-left: 20%;
-  font-weight: normal;
-  font-style: italic;
-}
-
-h2 {
-  margin: 2em 0em 0.66em 0em;
-  padding: 0.5em 0em 0em 0em;
-  font-size: 1.5em;
-  font-weight: bold;
-}
-
-h3.subtitle {
-  margin: 0em 0em 1em 0em;
-  padding: 0em 0em 0em 0em;
-  font-size: 142.14%;
-  text-align: right;
-}
-
-h3 {
-  margin: 1em 0em 0.5em 0em;
-  padding: 1em 0em 0em 0em;
-  font-size: 140%;
-  font-weight: bold;
-}
-
-h4 {
-  margin: 1em 0em 0.5em 0em;
-  padding: 1em 0em 0em 0em;
-  font-size: 120%;
-  font-weight: bold;
-}
-
-h5 {
-  margin: 1em 0em 0.5em 0em;
-  padding: 1em 0em 0em 0em;
-  font-size: 110%;
-  font-weight: bold;
-}
-
-h6 {
-  margin: 1em 0em 0em 0em;
-  padding: 1em 0em 0em 0em;
-  font-size: 110%;
-  font-weight: bold;
-}
-
-.authorgroup {
-  background-color: transparent;
-  background-repeat: no-repeat;
-  padding-top: 256px;
-  background-position: top;
-  margin-top: -256px;
-  padding-right: 50px;
-  margin-left: 50px;
-  text-align: center;
-  width: 600px;
-}
-
-h3.author {
-  margin: 0em 0me 0em 0em;
-  padding: 0em 0em 0em 0em;
-  font-weight: normal;
-  font-size: 100%;
-  color: #333;
-  clear: both;
-}
-
-.author tt.email {
-  font-size: 66%;
-}
-
-.titlepage hr {
-  width: 0em;
-  clear: both;
-}
-
-.revhistory {
-  padding-top: 2em;
-  clear: both;
-}
-
-.toc,
-.list-of-tables,
-.list-of-examples,
-.list-of-figures {
-  padding: 1.33em 0em 2.5em 0em;
-  color: #00557D;
-}
-
-.toc p,
-.list-of-tables p,
-.list-of-figures p,
-.list-of-examples p {
-  padding: 0em 0em 0em 0em;
-  padding: 0em 0em 0.3em;
-  margin: 1.5em 0em 0em 0em;
-}
-
-.toc p b,
-.list-of-tables p b,
-.list-of-figures p b,
-.list-of-examples p b{
-  font-size: 100.0%;
-  font-weight: bold;
-}
-
-.toc dl,
-.list-of-tables dl,
-.list-of-figures dl,
-.list-of-examples dl {
-  margin: 0em 0em 0.5em 0em;
-  padding: 0em 0em 0em 0em;
-}
-
-.toc dt {
-  margin: 0em 0em 0em 0em;
-  padding: 0em 0em 0em 0em;
-}
-
-.toc dd {
-  margin: 0em 0em 0em 2.6em;
-  padding: 0em 0em 0em 0em;
-}
-
-div.glossary dl,
-div.variablelist dl {
-}
-
-.glossary dl dt,
-.variablelist dl dt,
-.variablelist dl dt span.term {
-  font-weight: normal;
-  width: 20em;
-  text-align: right;
-}
-
-.variablelist dl dt {
-  margin-top: 0.5em;
-}
-
-.glossary dl dd,
-.variablelist dl dd {
-  margin-top: -1em;
-  margin-left: 25.5em;
-}
-
-.glossary dd p,
-.variablelist dd p {
-  margin-top: 0em;
-  margin-bottom: 1em;
-}
-
-
-div.calloutlist table td {
-  padding: 0em 0em 0em 0em;
-  margin: 0em 0em 0em 0em;
-}
-
-div.calloutlist table td p {
-  margin-top: 0em;
-  margin-bottom: 1em;
-}
-
-div p.copyright {
-  text-align: left;
-}
-
-div.legalnotice p.legalnotice-title {
-  margin-bottom: 0em;
-}
-
-p {
-  line-height: 1.5em;
-  margin-top: 0em;
-
-}
-
-dl {
-  padding-top: 0em;
-}
-
-hr {
-  border: solid 1px;
-}
-
-
-.mediaobject,
-.mediaobjectco {
-  text-align: center;
-}
-
-img {
-  border: none;
-}
-
-ul {
-  padding: 0em 0em 0em 1.5em;
-}
-
-ul li {
-  padding: 0em 0em 0em 0em;
-}
-
-ul li p {
-  text-align: left;
-}
-
-table {
-  width :100%;
-}
-
-th {
-  padding: 0.25em;
-  text-align: left;
-  font-weight: normal;
-  vertical-align: top;
-}
-
-td {
-  padding: 0.25em;
-  vertical-align: top;
-}
-
-p a[id] {
-  margin: 0px;
-  padding: 0px;
-  display: inline;
-  background-image: none;
-}
-
-a {
-  text-decoration: underline;
-  color: #444;
-}
-
-pre {
-    overflow: auto;
-}
-
-a:hover {
-  text-decoration: underline;
-  /*font-weight: bold;*/
-}
-
-/* This style defines how the permalink character
-   appears by itself and when hovered over with
-   the mouse. */
-
-[alt='Permalink'] { color: #eee; }
-[alt='Permalink']:hover { color: black; }
-
-
-div.informalfigure,
-div.informalexample,
-div.informaltable,
-div.figure,
-div.table,
-div.example {
-  margin: 1em 0em;
-  padding: 1em;
-  page-break-inside: avoid;
-}
-
-
-div.informalfigure p.title b,
-div.informalexample p.title b,
-div.informaltable p.title b,
-div.figure p.title b,
-div.example p.title b,
-div.table p.title b{
-    padding-top: 0em;
-    margin-top: 0em;
-    font-size: 100%;
-    font-weight: normal;
-}
-
-.mediaobject .caption,
-.mediaobject .caption p  {
-  text-align: center;
-  font-size: 80%;
-  padding-top: 0.5em;
-  padding-bottom: 0.5em;
-}
-
-.epigraph {
-  padding-left: 55%;
-  margin-bottom: 1em;
-}
-
-.epigraph p {
-  text-align: left;
-}
-
-.epigraph .quote {
-  font-style: italic;
-}
-.epigraph .attribution {
-  font-style: normal;
-  text-align: right;
-}
-
-span.application {
-  font-style: italic;
-}
-
-.programlisting {
-  font-family: monospace;
-  font-size: 80%;
-  white-space: pre;
-  margin: 1.33em 0em;
-  padding: 1.33em;
-}
-
-.tip,
-.warning,
-.caution,
-.note {
-  margin-top: 1em;
-  margin-bottom: 1em;
-
-}
-
-/* force full width of table within div */
-.tip table,
-.warning table,
-.caution table,
-.note table {
-  border: none;
-  width: 100%;
-}
-
-
-.tip table th,
-.warning table th,
-.caution table th,
-.note table th {
-  padding: 0.8em 0.0em 0.0em 0.0em;
-  margin : 0em 0em 0em 0em;
-}
-
-.tip p,
-.warning p,
-.caution p,
-.note p {
-  margin-top: 0.5em;
-  margin-bottom: 0.5em;
-  padding-right: 1em;
-  text-align: left;
-}
-
-.acronym {
-  text-transform: uppercase;
-}
-
-b.keycap,
-.keycap {
-  padding: 0.09em 0.3em;
-  margin: 0em;
-}
-
-.itemizedlist li {
-  clear: none;
-}
-
-.filename {
-  font-size: medium;
-  font-family: Courier, monospace;
-}
-
-
-div.navheader, div.heading{
-  position: absolute;
-  left: 0em;
-  top: 0em;
-  width: 100%;
-  background-color: #cdf;
-  width: 100%;
-}
-
-div.navfooter, div.footing{
-  position: fixed;
-  left: 0em;
-  bottom: 0em;
-  background-color: #eee;
-  width: 100%;
-}
-
-
-div.navheader td,
-div.navfooter td {
-  font-size: 66%;
-}
-
-div.navheader table th {
-  /*font-family: Georgia, Times, serif;*/
-  /*font-size: x-large;*/
-  font-size: 80%;
-}
-
-div.navheader table {
-  border-left: 0em;
-  border-right: 0em;
-  border-top: 0em;
-  width: 100%;
-}
-
-div.navfooter table {
-  border-left: 0em;
-  border-right: 0em;
-  border-bottom: 0em;
-  width: 100%;
-}
-
-div.navheader table td a,
-div.navfooter table td a {
-  color: #777;
-  text-decoration: none;
-}
-
-/* normal text in the footer */
-div.navfooter table td {
-  color: black;
-}
-
-div.navheader table td a:visited,
-div.navfooter table td a:visited {
-  color: #444;
-}
-
-
-/* links in header and footer */
-div.navheader table td a:hover,
-div.navfooter table td a:hover {
-  text-decoration: underline;
-  background-color: transparent;
-  color: #33a;
-}
-
-div.navheader hr,
-div.navfooter hr {
-  display: none;
-}
-
-
-.qandaset tr.question td p {
-  margin: 0em 0em 1em 0em;
-  padding: 0em 0em 0em 0em;
-}
-
-.qandaset tr.answer td p {
-  margin: 0em 0em 1em 0em;
-  padding: 0em 0em 0em 0em;
-}
-.answer td {
-  padding-bottom: 1.5em;
-}
-
-.emphasis {
-  font-weight: bold;
-}
-
-
-  /************* /
- / decorations  /
-/ *************/
-
-.titlepage {
-}
-
-.part .title {
-}
-
-.subtitle {
-    border: none;
-}
-
-/*
-h1 {
-  border: none;
-}
-
-h2 {
-  border-top: solid 0.2em;
-  border-bottom: solid 0.06em;
-}
-
-h3 {
-  border-top: 0em;
-  border-bottom: solid 0.06em;
-}
-
-h4 {
-  border: 0em;
-  border-bottom: solid 0.06em;
-}
-
-h5 {
-  border: 0em;
-}
-*/
-
-.programlisting {
-  border: solid 1px;
-}
-
-div.figure,
-div.table,
-div.informalfigure,
-div.informaltable,
-div.informalexample,
-div.example {
-  border: 1px solid;
-}
-
-
-
-.tip,
-.warning,
-.caution,
-.note {
-  border: 1px solid;
-}
-
-.tip table th,
-.warning table th,
-.caution table th,
-.note table th {
-  border-bottom: 1px solid;
-}
-
-.question td {
-  border-top: 1px solid black;
-}
-
-.answer {
-}
-
-
-b.keycap,
-.keycap {
-  border: 1px solid;
-}
-
-
-div.navheader, div.heading{
-  border-bottom: 1px solid;
-}
-
-
-div.navfooter, div.footing{
-  border-top: 1px solid;
-}
-
-  /********* /
- /  colors  /
-/ *********/
-
-body {
-  color: #333;
-  background: white;
-}
-
-a {
-  background: transparent;
-}
-
-a:hover {
-  background-color: #dedede;
-}
-
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-h7,
-h8 {
-  background-color: transparent;
-}
-
-hr {
-  border-color: #aaa;
-}
-
-
-.tip, .warning, .caution, .note {
-  border-color: #fff;
-}
-
-
-.tip table th,
-.warning table th,
-.caution table th,
-.note table th {
-  border-bottom-color: #fff;
-}
-
-
-.warning {
-  background-color: #f0f0f2;
-}
-
-.caution {
-  background-color: #f0f0f2;
-}
-
-.tip {
-  background-color: #f0f0f2;
-}
-
-.note {
-  background-color: #f0f0f2;
-}
-
-.glossary dl dt,
-.variablelist dl dt,
-.variablelist dl dt span.term {
-  color: #044;
-}
-
-div.figure,
-div.table,
-div.example,
-div.informalfigure,
-div.informaltable,
-div.informalexample {
-  border-color: #aaa;
-}
-
-pre.programlisting {
-  color: black;
-  background-color: #fff;
-  border-color: #aaa;
-  border-width: 2px;
-}
-
-.guimenu,
-.guilabel,
-.guimenuitem {
-  background-color: #eee;
-}
-
-
-b.keycap,
-.keycap {
-  background-color: #eee;
-  border-color: #999;
-}
-
-
-div.navheader {
-  border-color: black;
-}
-
-
-div.navfooter {
-  border-color: black;
-}
-
-
-.writernotes {
-  color: red;
-}
-
-
-  /*********** /
- /  graphics  /
-/ ***********/
-
-/*
-body {
-  background-image: url("images/body_bg.jpg");
-  background-attachment: fixed;
-}
-
-.navheader,
-.note,
-.tip {
-  background-image: url("images/note_bg.jpg");
-  background-attachment: fixed;
-}
-
-.warning,
-.caution {
-  background-image: url("images/warning_bg.jpg");
-  background-attachment: fixed;
-}
-
-.figure,
-.informalfigure,
-.example,
-.informalexample,
-.table,
-.informaltable {
-  background-image: url("images/figure_bg.jpg");
-  background-attachment: fixed;
-}
-
-*/
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-h7{
-}
-
-/*
-Example of how to stick an image as part of the title.
-
-div.article .titlepage .title
-{
-  background-image: url("figures/white-on-black.png");
-  background-position: center;
-  background-repeat: repeat-x;
-}
-*/
-
-div.preface .titlepage .title,
-div.colophon .title,
-div.chapter .titlepage .title,
-div.article .titlepage .title
-{
-}
-
-div.section div.section .titlepage .title,
-div.sect2 .titlepage .title {
-    background: none;
-}
-
-
-h1.title {
-  background-color: transparent;
-  background-repeat: no-repeat;
-  height: 256px;
-  text-indent: -9000px;
-  overflow:hidden;
-}
-
-h2.subtitle {
-  background-color: transparent;
-  text-indent: -9000px;
-  overflow:hidden;
-  width: 0px;
-  display: none;
-}
-
-  /*************************************** /
- /  pippin.gimp.org specific alterations  /
-/ ***************************************/
-
-/*
-div.heading, div.navheader {
-  color: #777;
-  font-size: 80%;
-  padding: 0;
-  margin: 0;
-  text-align: left;
-  position: absolute;
-  top: 0px;
-  left: 0px;
-  width: 100%;
-  height: 50px;
-  background: url('/gfx/heading_bg.png') transparent;
-  background-repeat: repeat-x;
-  background-attachment: fixed;
-  border: none;
-}
-
-div.heading a {
-  color: #444;
-}
-
-div.footing, div.navfooter {
-  border: none;
-  color: #ddd;
-  font-size: 80%;
-  text-align:right;
-
-  width: 100%;
-  padding-top: 10px;
-  position: absolute;
-  bottom: 0px;
-  left: 0px;
-
-  background: url('/gfx/footing_bg.png') transparent;
-}
-*/
-
-
-
-  /****************** /
- /  nasty ie tweaks  /
-/ ******************/
-
-/*
-div.heading, div.navheader {
-  width:expression(document.body.clientWidth + "px");
-}
-
-div.footing, div.navfooter {
-  width:expression(document.body.clientWidth + "px");
-  margin-left:expression("-5em");
-}
-body {
-  padding:expression("4em 5em 0em 5em");
-}
-*/
-
-  /**************************************** /
- / mozilla vendor specific css extensions  /
-/ ****************************************/
-/*
-div.navfooter, div.footing{
-  -moz-opacity: 0.8em;
-}
-
-div.figure,
-div.table,
-div.informalfigure,
-div.informaltable,
-div.informalexample,
-div.example,
-.tip,
-.warning,
-.caution,
-.note {
-  -moz-border-radius: 0.5em;
-}
-
-b.keycap,
-.keycap {
-  -moz-border-radius: 0.3em;
-}
-*/
-
-table tr td table tr td {
-  display: none;
-}
-
-
-hr {
-  display: none;
-}
-
-table {
-  border: 0em;
-}
-
- .photo {
-  float: right;
-  margin-left:   1.5em;
-  margin-bottom: 1.5em;
-  margin-top: 0em;
-  max-width:      17em;
-  border:     1px solid gray;
-  padding:    3px;
-  background: white;
-}
- .seperator {
-   padding-top: 2em;
-   clear: both;
-  }
-
-  #validators {
-      margin-top: 5em;
-      text-align: right;
-      color: #777;
-  }
-  @media print {
-      body {
-          font-size: 8pt;
-      }
-      .noprint {
-          display: none;
-      }
-  }
-
-
-.tip,
-.note {
-   background: #f0f0f2;
-   color: #333;
-   padding: 20px;
-   margin: 20px;
-}
-
-.tip h3,
-.note h3 {
-   padding: 0em;
-   margin: 0em;
-   font-size: 2em;
-   font-weight: bold;
-   color: #333;
-}
-
-.tip a,
-.note a {
-   color: #333;
-   text-decoration: underline;
-}
-
-.footnote {
-   font-size: small;
-   color: #333;
-}
-
-/* Changes the announcement text */
-.tip h3,
-.warning h3,
-.caution h3,
-.note h3 {
-   font-size:large;
-   color: #00557D;
-}
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-customization.xsl b/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-customization.xsl
deleted file mode 100644
index dcc02dd..0000000
--- a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-customization.xsl
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
-
-  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
-
-<!--
-
-  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
-
-  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
-
--->
-
-  <xsl:import href="yocto-project-qs-titlepage.xsl"/>
-
-  <xsl:include href="../template/permalinks.xsl"/>
-  <xsl:include href="../template/section.title.xsl"/>
-  <xsl:include href="../template/component.title.xsl"/>
-  <xsl:include href="../template/division.title.xsl"/>
-  <xsl:include href="../template/formal.object.heading.xsl"/>
-
-  <xsl:param name="generate.toc" select="'article nop'"></xsl:param>
-  <xsl:param name="html.stylesheet" select="'qs-style.css'" />
-</xsl:stylesheet>
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-eclipse-customization.xsl b/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-eclipse-customization.xsl
deleted file mode 100644
index 50e6830..0000000
--- a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs-eclipse-customization.xsl
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-	xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:fo="http://www.w3.org/1999/XSL/Format"
-	version="1.0">
-
-  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
-
-<!--
-
-  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
-
-  <xsl:import
-	  href="http://docbook.sourceforge.net/release/xsl/1.76.1/eclipse/eclipse3.xsl" />
-
--->
-
-  <xsl:import href="yocto-project-qs-titlepage.xsl"/>
-
-  <xsl:param name="chunker.output.indent" select="'yes'"/>
-  <xsl:param name="chunk.quietly" select="1"/>
-  <xsl:param name="use.id.as.filename" select="1"/>
-  <xsl:param name="ulink.target" select="'_self'" />
-  <xsl:param name="base.dir" select="'html/yocto-project-qs/'"/>
-  <xsl:param name="chunk.section.depth" select="0"/>
-  <xsl:param name="html.stylesheet" select="'../book.css'"/>
-  <xsl:param name="eclipse.manifest" select="0"/>
-  <xsl:param name="create.plugin.xml" select="0"/>
-  <xsl:param name="suppress.navigation" select="1"/>
-  <xsl:param name="generate.index" select="0"/>
-  <xsl:param name="generate.toc" select="'article nop'"></xsl:param>
-  <xsl:param name="html.stylesheet" select="'style.css'" />
-</xsl:stylesheet>
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml b/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
deleted file mode 100644
index e6dae7f..0000000
--- a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
+++ /dev/null
@@ -1,1056 +0,0 @@
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<article id='yocto-project-qs-intro'>
-    <articleinfo>
-        <title>Yocto Project Quick Start</title>
-
-        <copyright>
-            <year>&COPYRIGHT_YEAR;</year>
-            <holder>Linux Foundation</holder>
-        </copyright>
-
-        <legalnotice>
-            <para>
-                Permission is granted to copy, distribute and/or modify this document under
-                the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
-            </para>
-           <note><title>Manual Notes</title>
-               <itemizedlist>
-                   <listitem><para>
-                       This version of the
-                       <emphasis>Yocto Project Quick Start</emphasis>
-                       is for the &YOCTO_DOC_VERSION; release of the
-                       Yocto Project.
-                       To be sure you have the latest version of the manual
-                       for this release, use the manual from the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
-                       </para></listitem>
-                   <listitem><para>
-                       For manuals associated with other releases of the Yocto
-                       Project, go to the
-                       <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
-                       and use the drop-down "Active Releases" button
-                       and choose the manual associated with the desired
-                       Yocto Project.
-                       </para></listitem>
-                   <listitem><para>
-                        To report any inaccuracies or problems with this
-                        manual, send an email to the Yocto Project
-                        discussion group at
-                        <filename>yocto@yoctoproject.com</filename> or log into
-                        the freenode <filename>#yocto</filename> channel.
-                        </para></listitem>
-               </itemizedlist>
-           </note>
-        </legalnotice>
-
-        <abstract>
-            <imagedata fileref="figures/yocto-project-transp.png"
-                        width="6in" depth="1in"
-                        align="right" scale="25" />
-        </abstract>
-    </articleinfo>
-
-    <section id='welcome'>
-        <title>Welcome!</title>
-        <para>
-            Welcome to the Yocto Project!
-            The Yocto Project is an open-source collaboration project whose
-            focus is developers of embedded Linux systems.
-            Among other things, the Yocto Project uses a build host based
-            on the OpenEmbedded (OE) project, which uses the
-            <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
-            tool, to construct complete Linux images.
-            The BitBake and OE components combine together to form
-            a reference build host, historically known as
-            <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
-            (<emphasis>Pah</emphasis>-kee).
-        </para>
-
-        <para>
-            This quick start is written so that you can quickly get a
-            build host set up to use the Yocto Project and then build some
-            Linux images.
-            Rather than go into great detail about the Yocto Project and its
-            many capabilities, this quick start provides the minimal
-            information you need to try out the Yocto Project using either a
-            supported Linux build host or a build host set up to use
-            <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
-            which leverages
-            <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
-        </para>
-
-        <para>
-            Reading and using the quick start should result in you having a
-            basic understanding of what the Yocto Project is and how to use
-            some of its core components.
-            You will also have worked through steps to produce two images:
-            one that runs on the emulator (QEMU) and one that boots on actual
-            hardware (i.e. MinnowBoard Turbot).
-            The examples highlight the ease with which you can use the
-            Yocto Project to create images for multiple types of hardware.
-        </para>
-
-        <para>
-            The following list directs you to key sections of this
-            quick start:
-            <itemizedlist>
-                <listitem><para>
-                    <ulink url='http://www.yoctoproject.org/docs/2.4/yocto-project-qs/yocto-project-qs.html#yp-resources'>Setting Up to Use the Yocto Project</ulink>
-                    </para></listitem>
-                <listitem><para>
-                    <ulink url='http://www.yoctoproject.org/docs/2.4/yocto-project-qs/yocto-project-qs.html#building-an-image-for-emulation'>Building an Image for Emulation</ulink>
-                    </para></listitem>
-                <listitem><para>
-                    <ulink url='http://www.yoctoproject.org/docs/2.4/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware'>Building an Image for Hardware</ulink>
-                    </para></listitem>
-            </itemizedlist>
-<!--
-            <note>
-                If you do not have a system that runs Linux and you want to give
-                the Yocto Project a test run, you might consider using the Yocto
-                Project Build Appliance.
-                The Build Appliance allows you to build and boot a custom
-                embedded Linux image with the Yocto Project using a non-Linux
-                development system.
-                See the
-                <ulink url='https://www.yoctoproject.org/tools-resources/projects/build-appliance'>Yocto Project Build Appliance</ulink>
-                for more information.
-            </note>
--->
-        </para>
-
-        <para>
-            For more detailed information on the Yocto Project, you can
-            reference these resources:
-            <itemizedlist>
-                <listitem><para>
-                    <emphasis>Website:</emphasis>
-                    The
-                    <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
-                    provides background information, the latest builds, breaking
-                    news, full development documentation, and access to a rich
-                    Yocto Project Development Community into which you can tap.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Yocto Project Development Environment Overview:</emphasis>
-                    The
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#yp-intro'>Introducing the Yocto Project Development Environment</ulink>"
-                    section presents an overview of the Yocto Project
-                    development environment.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>FAQs:</emphasis>
-                    Lists commonly asked Yocto Project questions and answers.
-                    You can find two FAQs:
-                    <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>Yocto Project FAQ</ulink>
-                    on a wiki, and the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink>"
-                    chapter in the Yocto Project Reference Manual.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Developer Screencast:</emphasis>
-                    The
-                    <ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New Developer Screencast Tutorial</ulink>
-                    provides a 30-minute video created for users unfamiliar
-                    with the Yocto Project but familiar with Linux build
-                    hosts.
-                    While this screencast is somewhat dated, the introductory
-                    and fundamental concepts are useful for the beginner.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Comprehensive List of Links and Other Documentation:</emphasis>
-                    The
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
-                    section in the Yocto Project Reference Manual provides a
-                    comprehensive list of related links and documentation.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-
-    <section id='yp-resources'>
-        <title>Setting Up to Use the Yocto Project</title>
-
-        <para>
-            Setting up to use the Yocto Project involves getting your build
-            host ready.
-            If you have a native Linux machine that runs a Yocto Project
-            supported distribution as described by the
-            "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
-            section in the Yocto Project Reference Manual, you can prepare
-            that machine as your build host.
-            See the
-            "<link linkend='qs-native-linux-build-host'>Using a Native Linux Machine</link>"
-            section for more information.
-        </para>
-
-        <para>
-            If you do not want to use the Yocto Project on a native Linux
-            machine, you can prepare your build host to use
-            <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
-            which leverages
-            <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
-            You can set up a build host for Windows, Mac, and Linux
-            machines.
-            See the
-            "<link linkend='qs-crops-build-host'>Using CROPS and Containers</link>"
-            section for more information.
-        </para>
-
-        <section id='qs-crops-build-host'>
-            <title>Using CROPS and Containers</title>
-
-            <para>
-                Follow these steps to get your build host set up with a
-                Poky container that you can use to complete the build
-                examples further down in the Quick Start:
-                <orderedlist>
-                    <listitem><para>
-                        <emphasis>Set Up to use CROss PlatformS (CROPS):</emphasis>
-                        Work through the first six steps of the procedure
-                        in the
-                        "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
-                        section of the Yocto Project Development Tasks Manual.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Set Up the Poky Container to Use the Yocto Project:</emphasis>
-                        Go to
-                        <ulink url='https://github.com/crops/poky-container/blob/master/README.md'></ulink>
-                        and follow the directions to set up the Poky container
-                        on your build host.</para>
-
-                        <para>Once you complete the setup instructions for your
-                        machine, you need to get a copy of the
-                        <filename>poky</filename> repository on your build
-                        host.
-                        See the
-                        "<link linkend='releases'>Yocto Project Release</link>"
-                        section to continue.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='qs-native-linux-build-host'>
-            <title>Using a Native Linux Machine</title>
-
-            <para>
-                The following list shows what you need in order to use a
-                Linux-based build host to use the Yocto Project to build images:
-            </para>
-
-            <itemizedlist>
-                <listitem><para><emphasis>Build Host</emphasis>
-                    A build host with a minimum of 50 Gbytes of free disk
-                    space that is running a supported Linux distribution (i.e.
-                    recent releases of Fedora, openSUSE, CentOS, Debian, or
-                    Ubuntu).
-                    </para></listitem>
-                <listitem><para><emphasis>Build Host Packages</emphasis>
-                    Appropriate packages installed on the build host.
-                    </para></listitem>
-            </itemizedlist>
-
-            <section id='the-linux-distro'>
-                <title>The Linux Distribution</title>
-
-                <para>
-                    The Yocto Project team verifies each release against recent
-                    versions of the most popular Linux distributions that
-                    provide stable releases.
-                    In general, if you have the current release minus one of the
-                    following distributions, you should have no problems.
-                    <itemizedlist>
-                        <listitem><para>
-                            Ubuntu
-                            </para></listitem>
-                        <listitem><para>
-                            Fedora
-                            </para></listitem>
-                        <listitem><para>
-                            openSUSE
-                            </para></listitem>
-                        <listitem><para>
-                            CentOS
-                            </para></listitem>
-                        <listitem><para>
-                            Debian
-                            </para></listitem>
-                    </itemizedlist>
-                    For a more detailed list of distributions that support the
-                    Yocto Project, see the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
-                    section in the Yocto Project Reference Manual.
-                </para>
-
-                <para>
-                    The OpenEmbedded build system should be able to run on any
-                    modern distribution that has the following versions for
-                    Git, tar, and Python.
-                    <itemizedlist>
-                        <listitem><para>
-                            Git 1.8.3.1 or greater
-                            </para></listitem>
-                        <listitem><para>
-                            tar 1.27 or greater
-                            </para></listitem>
-                        <listitem><para>
-                            Python 3.4.0 or greater.
-                            </para></listitem>
-                    </itemizedlist>
-                    If your build host does not meet any of these three listed
-                    version requirements, you can take steps to prepare the
-                    system so that you can still use the Yocto Project.
-                    See the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
-                    section in the Yocto Project Reference Manual for information.
-                </para>
-            </section>
-
-            <section id='packages'>
-                <title>The Build Host Packages</title>
-
-                <para>
-                    Required build host packages vary depending on your
-                    build machine and what you want to do with the Yocto Project.
-                    For example, if you want to build an image that can run
-                    on QEMU in graphical mode (a minimal, basic build
-                    requirement), then the build host package requirements
-                    are different than if you want to build an image on a headless
-                    system or build out the Yocto Project documentation set.
-                </para>
-
-                <para>
-                    Collectively, the number of required packages is large
-                    if you want to be able to cover all cases.
-                    <note>
-                        In general, you need to have root access and then install
-                        the required packages.
-                        Thus, the commands in the following section may or may
-                        not work depending on whether or not your Linux
-                        distribution has <filename>sudo</filename> installed.
-                    </note>
-                </para>
-
-                <para>
-                    The following list shows the required packages needed to build
-                    an image that runs on QEMU in graphical mode (e.g. essential
-                    plus graphics support).
-                    For lists of required packages for other scenarios, see the
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
-                    section in the Yocto Project Reference Manual.
-                    <itemizedlist>
-                        <listitem><para><emphasis>Ubuntu and Debian</emphasis>
-                            <literallayout class='monospaced'>
-     $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; libsdl1.2-dev xterm
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para><emphasis>Fedora</emphasis>
-                            <literallayout class='monospaced'>
-     $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para><emphasis>OpenSUSE</emphasis>
-                            <literallayout class='monospaced'>
-     $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; libSDL-devel xterm
-                            </literallayout>
-                            </para></listitem>
-                        <listitem><para><emphasis>CentOS</emphasis>
-                            <literallayout class='monospaced'>
-     $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
-                            </literallayout>
-                            <note><title>Notes</title>
-                                <itemizedlist>
-                                    <listitem><para>
-                                        Extra Packages for Enterprise Linux
-                                        (i.e. <filename>epel-release</filename>)
-                                        is a collection of packages from Fedora
-                                        built on RHEL/CentOS for easy installation
-                                        of packages not included in enterprise
-                                        Linux by default.
-                                        You need to install these packages
-                                        separately.
-                                        </para></listitem>
-                                    <listitem><para>
-                                        The <filename>makecache</filename> command
-                                        consumes additional Metadata from
-                                        <filename>epel-release</filename>.
-                                        </para></listitem>
-                                </itemizedlist>
-                            </note>
-                            </para></listitem>
-                    </itemizedlist>
-                </para>
-            </section>
-
-            <para>
-                Once you complete the setup instructions for your
-                machine, you need to get a copy of the
-                <filename>poky</filename> repository on your build
-                host.
-                Continue with the
-                "<link linkend='releases'>Yocto Project Release</link>"
-                section.
-            </para>
-        </section>
-
-        <section id='releases'>
-            <title>Yocto Project Release</title>
-
-            <para>
-                Now that your build host has the right packages (native
-                Linux machine) or you have the Poky container set up
-                (CROPS), you need to get a copy of the Yocto Project.
-                It is recommended that you get the latest Yocto Project release
-                by setting up (cloning in
-                <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink> terms) a
-                local copy of the <filename>poky</filename> Git repository on
-                your build host and then checking out the latest release.
-                Doing so allows you to easily update to newer Yocto Project
-                releases as well as contribute back to the Yocto Project.
-            </para>
-
-            <para>
-                Here is an example from a native Linux machine that is
-                running Ubuntu.
-                <note>
-                    If your build host is using a Poky container, you can
-                    use the same Git commands.
-                </note>
-                The following example clones the <filename>poky</filename>
-                repository and then checks out the latest Yocto Project Release
-                by tag (i.e. <filename>&DISTRO_REL_TAG;</filename>):
-                <literallayout class='monospaced'>
-     $ git clone git://git.yoctoproject.org/poky
-     Cloning into 'poky'...
-     remote: Counting objects: 361782, done.
-     remote: Compressing objects: 100% (87100/87100), done.
-     remote: Total 361782 (delta 268619), reused 361439 (delta 268277)
-     Receiving objects: 100% (361782/361782), 131.94 MiB | 6.88 MiB/s, done.
-     Resolving deltas: 100% (268619/268619), done.
-     Checking connectivity... done.
-     $ git checkout tags/&DISTRO_REL_TAG; -b poky_&DISTRO;
-                </literallayout>
-            </para>
-
-            <para>
-                The previous Git <filename>checkout</filename> command
-                creates a local branch named
-                <filename>poky_&DISTRO;</filename>.
-                The files available to you in that branch exactly match the
-                repository's files in the
-                <filename>&DISTRO_NAME_NO_CAP;</filename>
-                development branch at the time of the Yocto Project &DISTRO;
-                release.
-                <note>
-                    Rather than checking out the entire development branch
-                    of a release (i.e. the tip), which could be continuously
-                    changing while you are doing your development, you would
-                    check out a branch based on a release tag as shown in
-                    the previous example.
-                    Doing so provides you with an unchanging, stable set of
-                    files.
-                </note>
-            </para>
-
-            <para>
-                For more options and information about accessing Yocto
-                Project related repositories, see the
-                "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
-                section in the Yocto Project Development Tasks Manual.
-            </para>
-        </section>
-    </section>
-
-    <section id='qs-building-images'>
-        <title>Building Images</title>
-
-        <para>
-            You are now ready to give the Yocto Project a try.
-            For this example, you will be using the command line to build
-            your images.
-            <note>
-                A graphical user interface to the Yocto Project is available
-                through
-                <ulink url='&YOCTO_DOCS_REF_URL;#toaster-term'>Toaster</ulink>.
-                See the
-                <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>
-                for more information.
-            </note>
-        </para>
-
-        <para>
-            The remainder of this quick start steps you through the
-            following:
-            <itemizedlist>
-                <listitem><para>
-                    Build a <filename>qemux86</filename> reference image
-                    and run it in the QEMU emulator.
-                    </para></listitem>
-                <listitem><para>
-                    Easily change configurations so that you can quickly
-                    create a second image that you can load onto bootable
-                    media and actually boot target hardware.
-                    This example uses the MinnowBoard
-                    Turbot-compatible boards.
-                    </para></listitem>
-            </itemizedlist>
-            <note>
-                The steps in the following two sections do not provide detail,
-                but rather provide minimal, working commands and examples
-                designed to just get you started.
-                For more details, see the appropriate manuals in the
-                <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project manual set</ulink>.
-            </note>
-        </para>
-
-        <section id='building-an-image-for-emulation'>
-            <title>Building an Image for Emulation</title>
-
-            <para>
-                Use the following commands to build your image.
-                The OpenEmbedded build system creates an entire Linux
-                distribution, including the toolchain, from source.
-                <note><title>Notes about Network Proxies</title>
-                    <itemizedlist>
-                        <listitem><para>
-                            By default, the build process searches for source
-                            code using a pre-determined order through a set of
-                            locations.
-                            If you are working behind a firewall and your build
-                            host is not set up for proxies, you could encounter
-                            problems with the build process when fetching source
-                            code (e.g. fetcher failures or Git failures).
-                            </para></listitem>
-                        <listitem><para>
-                            If you do not know your proxy settings, consult your
-                            local network infrastructure resources and get that
-                            information.
-                            A good starting point could also be to check your
-                            web browser settings.
-                            Finally, you can find more information on using the
-                            Yocto Project behind a firewall in the Yocto Project
-                            Reference Manual
-                            <ulink url='&YOCTO_DOCS_REF_URL;#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</ulink>
-                            and on the
-                            "<ulink url='https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
-                            wiki page.
-                            </para></listitem>
-                    </itemizedlist>
-                </note>
-            </para>
-
-            <para>
-                <orderedlist>
-                    <listitem><para>
-                        <emphasis>Be Sure Your Build Host is Set Up:</emphasis>
-                        The steps to build an image in this section depend on
-                        your build host being properly set up.
-                        Be sure you have worked through the requirements
-                        described in the
-                        "<link linkend='yp-resources'>Setting Up to Use the Yocto Project</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Check Out Your Branch:</emphasis>
-                        Be sure you are in the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
-                        (e.g. <filename>poky</filename>) and then check out
-                        the branch associated with the latest Yocto Project
-                        Release:
-                        <literallayout class='monospaced'>
-     $ cd ~/poky
-     $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
-                        </literallayout>
-                        Git's <filename>checkout</filename> command checks out
-                        the current Yocto Project release into a local branch
-                        whose name matches the release (i.e.
-                        <filename>&DISTRO_NAME_NO_CAP;</filename>).
-                        The local branch tracks the upstream branch of the
-                        same name.
-                        Creating your own branch based on the released
-                        branch ensures you are using the latest files for
-                        that release.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Initialize the Build Environment:</emphasis>
-                        Run the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
-                        environment setup script to define the OpenEmbedded
-                        build environment on your build host.
-                        <literallayout class='monospaced'>
-     $ source &OE_INIT_FILE;
-                        </literallayout>
-                        Among other things, the script creates the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
-                        which is <filename>build</filename> in this case
-                        and is located in the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
-                        After the script runs, your current working directory
-                        is set to the Build Directory.
-                        Later, when the build completes, the Build Directory
-                        contains all the files created during the build.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Examine Your Local Configuration File:</emphasis>
-                        When you set up the build environment, a local
-                        configuration file named
-                        <filename>local.conf</filename> becomes available in
-                        a <filename>conf</filename> subdirectory of the
-                        Build Directory.
-                        Before using BitBake to start the build, you can
-                        look at this file and be sure your general
-                        configurations are how you want them:
-                        <itemizedlist>
-                            <listitem><para>
-                                To help conserve disk space during builds,
-                                you can add the following statement to your
-                                project's configuration file, which for this
-                                example is
-                                <filename>poky/build/conf/local.conf</filename>.
-                                Adding this statement deletes the work
-                                directory used for building a recipe once the
-                                recipe is built.
-                                <literallayout class='monospaced'>
-     INHERIT += "rm_work"
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>
-                                By default, the target machine for the build is
-                                <filename>qemux86</filename>,
-                                which produces an image that can be used in
-                                the QEMU emulator and is targeted at an
-                                <trademark class='registered'>Intel</trademark>
-                                32-bit based architecture.
-                                Further on in this example, this default is
-                                easily changed through the
-                                <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
-                                variable so that you can quickly
-                                build an image for a different machine.
-                                </para></listitem>
-                            <listitem><para>
-                                Another consideration before you build is the
-                                package manager used when creating the image.
-                                The default <filename>local.conf</filename>
-                                file selects the RPM package manager.
-                                You can control this configuration by using the
-                                <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename>
-                                variable.</para>
-                                <para>Selection of the package manager is separate
-                                from whether package management is used at runtime
-                                in the target image.</para>
-                                <para>For additional package manager selection
-                                information, see the
-                                "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'><filename>package.bbclass</filename></ulink>"
-                                section in the Yocto Project Reference Manual.
-                                </para></listitem>
-                        </itemizedlist>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Start the Build:</emphasis>
-                        Continue with the following command to build an OS image
-                        for the target, which is
-                        <filename>core-image-sato</filename> in this example:
-                        <note>
-                            Depending on the number of processors and cores, the
-                            amount of RAM, the speed of your Internet connection
-                            and other factors, the build process could take
-                            several hours the first time you run it.
-                            Subsequent builds run much faster since parts of the
-                            build are cached.
-                        </note>
-                        <literallayout class='monospaced'>
-     $ bitbake core-image-sato
-                        </literallayout>
-                        <note>
-                            <para>
-                                If you experience a build error due to resources
-                                temporarily being unavailable and it appears you
-                                should not be having this issue, it might be due
-                                to the combination of a 4.3+ Linux kernel and
-                                <filename>systemd</filename> version 228+
-                                (i.e. see this
-                                <ulink url='http://unix.stackexchange.com/questions/253903/creating-threads-fails-with-resource-temporarily-unavailable-with-4-3-kernel'>link</ulink>
-                                for information).
-                            </para>
-
-                            <para>
-                                To work around this issue, you can try either
-                                of the following:
-                                <itemizedlist>
-                                    <listitem><para>
-                                        Try the build again.
-                                        </para></listitem>
-                                    <listitem><para>
-                                        Modify the "DefaultTasksMax"
-                                        <filename>systemd</filename> parameter
-                                        by uncommenting it and setting it to
-                                        "infinity".
-                                        You can find this parameter in the
-                                        <filename>system.conf</filename> file
-                                        located in
-                                        <filename>/etc/systemd</filename>
-                                        on most systems.
-                                        </para></listitem>
-                                </itemizedlist>
-                            </para>
-                        </note>
-                        For information on using the
-                        <filename>bitbake</filename> command, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>"
-                        section in the Yocto Project Reference Manual, or see the
-                        "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-command'>BitBake Command</ulink>"
-                        section in the BitBake User Manual.
-                        For information on other targets, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
-                        chapter in the Yocto Project Reference Manual.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Simulate Your Image Using QEMU:</emphasis>
-                        Once this particular image is built, you can start QEMU
-                        and run the image:
-                        <literallayout class='monospaced'>
-     $ runqemu qemux86
-                        </literallayout>
-                        If you want to learn more about running QEMU, see the
-                        "<ulink url="&YOCTO_DOCS_DEV_URL;#dev-manual-qemu">Using the Quick EMUlator (QEMU)</ulink>"
-                        chapter in the Yocto Project Development Tasks Manual.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Exit QEMU:</emphasis>
-                        Exit QEMU by either clicking on the shutdown icon or by
-                        typing <filename>Ctrl-C</filename> in the QEMU
-                        transcript window from which you evoked QEMU.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='building-an-image-for-hardware'>
-            <title>Building an Image for Hardware</title>
-
-            <para id='qs-minnowboard-example'>
-                The following steps show how easy it is to set up to build an
-                image for a new machine.
-                These steps build an image for the MinnowBoard Turbot, which is
-                supported by the Yocto Project and the
-                <filename>meta-intel</filename> <filename>intel-corei7-64</filename>
-                and <filename>intel-core2-32</filename> Board Support Packages
-                (BSPs).
-                <note>
-                    The MinnowBoard Turbot ships with 64-bit firmware.
-                    If you want to use the board in 32-bit mode, you must
-                    download the
-                    <ulink url='http://firmware.intel.com/projects/minnowboard-max'>32-bit firmware</ulink>.
-                </note>
-            </para>
-
-            <para>
-                <orderedlist>
-                    <listitem><para>
-                        <emphasis>Create a Local Copy of the
-                        <filename>meta-intel</filename> Repository:</emphasis>
-                        Building an image for the MinnowBoard Turbot requires
-                        the
-                        <filename>meta-intel</filename> layer.
-                        Use the <filename>git clone</filename> command to create
-                        a local copy of the repository inside your
-                        <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
-                        which is <filename>poky</filename> in this example:
-                        <literallayout class='monospaced'>
-     $ cd $HOME/poky
-     $ git clone git://git.yoctoproject.org/meta-intel
-     Cloning into 'meta-intel'...
-     remote: Counting objects: 14039, done.
-     remote: Compressing objects: 100% (4471/4471), done.
-     remote: Total 14039 (delta 8130), reused 13837 (delta 7947)
-     Receiving objects: 100% (14039/14039), 4.27 MiB | 3.98 MiB/s, done.
-     Resolving deltas: 100% (8130/8130), done.
-     Checking connectivity... done.
-                        </literallayout>
-                        By default when you clone a Git repository, the
-                        "master" branch is checked out.
-                        Before you build your image that uses the
-                        <filename>meta-intel</filename> layer, you must be
-                        sure that both repositories
-                        (<filename>meta-intel</filename> and
-                        <filename>poky</filename>) are using the same releases.
-                        Because you used the <filename>&DISTRO_REL_TAG;</filename>
-                        tag when you checked out the <filename>poky</filename>
-                        repository by tag, you should use a
-                        <filename>meta-intel</filename>
-                        tag that corresponds with the release you used for
-                        <filename>poky</filename>.
-                        Consequently, you need to checkout out the
-                        "<filename>&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;</filename>"
-                        branch after cloning <filename>meta-intel</filename>:
-                        <literallayout class='monospaced'>
-     $ cd $HOME/poky/meta-intel
-     $ git checkout tags/&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION; -b meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;
-     Switched to a new branch 'meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;'
-                        </literallayout>
-                        The previous Git <filename>checkout</filename> command
-                        creates a local branch named
-                        <filename>meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;</filename>.
-                        You have the option to name your local branch whatever
-                        you want by providing any name you like for
-                        "meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;"
-                        in the above example.
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Configure the Build:</emphasis>
-                        To configure the build, you edit the
-                        <filename>bblayers.conf</filename> and
-                        <filename>local.conf</filename> files, both of which are
-                        located in the <filename>build/conf</filename> directory.
-                        </para>
-
-                        <para>Here is a quick way to make the edits.
-                        The first command uses the
-                        <filename>bitbake-layers add-layer</filename> command
-                        to add the <filename>meta-intel</filename>
-                        layer, which contains the <filename>intel-core*</filename>
-                        BSPs to the build.
-                        The second command selects the BSP by setting the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
-                        variable.
-                        <literallayout class='monospaced'>
-     $ cd $HOME/poky/build
-     $ bitbake-layers add-layer "$HOME/poky/meta-intel"
-     $ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
-                        </literallayout>
-                        <note><title>Notes</title>
-                        <para>
-                            If you want a 64-bit build, use the following:
-                            <literallayout class='monospaced'>
-     $ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
-                            </literallayout>
-                        </para>
-
-                        <para>
-                            If you want 32-bit images, use the following:
-                            <literallayout class='monospaced'>
-     $ echo 'MACHINE = "intel-core2-32"' >> conf/local.conf
-                            </literallayout>
-                        </para>
-                        </note>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Build an Image for MinnowBoard
-                        Turbot:</emphasis>
-                        The type of image you build depends on your goals.
-                        For example, the previous build created a
-                        <filename>core-image-sato</filename> image, which is an
-                        image with Sato support.
-                        It is possible to build many image types for the
-                        MinnowBoard Turbot.
-                        Some possibilities are <filename>core-image-base</filename>,
-                        which is a console-only image.
-                        Another choice could be a
-                        <filename>core-image-full-cmdline</filename>, which is
-                        another console-only image but has more full-features
-                        Linux system functionality installed.
-                        For types of images you can build using the Yocto
-                        Project, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
-                        chapter in the Yocto Project Reference Manual.</para>
-                        <para>Because configuration changes are minimal to set up
-                        for this second build, the OpenEmbedded build system can
-                        re-use files from previous builds as much as possible.
-                        Re-using files means this second build will be much faster
-                        than an initial build.
-                        For this example, the <filename>core-image-base</filename>
-                        image is built:
-                        <literallayout class='monospaced'>
-     $ bitbake core-image-base
-                        </literallayout>
-                        <note>
-                            <para>
-                                If you experience a build error due to resources
-                                temporarily being unavailable and it appears you
-                                should not be having this issue, it might be due
-                                to the combination of a 4.3+ Linux kernel and
-                                <filename>systemd</filename> version 228+
-                                (i.e. see this
-                                <ulink url='http://unix.stackexchange.com/questions/253903/creating-threads-fails-with-resource-temporarily-unavailable-with-4-3-kernel'>link</ulink>
-                                for information).
-                            </para>
-
-                            <para>
-                                To work around this issue, you can try either
-                                of the following:
-                                <itemizedlist>
-                                    <listitem><para>
-                                        Try the build again.
-                                        </para></listitem>
-                                    <listitem><para>
-                                        Modify the "DefaultTasksMax"
-                                        <filename>systemd</filename> parameter
-                                        by uncommenting it and setting it to
-                                        "infinity".
-                                        You can find this parameter in the
-                                        <filename>system.conf</filename> file
-                                        located in
-                                        <filename>/etc/systemd</filename>
-                                        on most systems.
-                                        </para></listitem>
-                                </itemizedlist>
-                            </para>
-                        </note>
-                        Once the build completes, the resulting console-only image
-                        is located in the Build Directory here:
-                        <literallayout class='monospaced'>
-     tmp/deploy/images/intel-corei7-64/core-image-base-intel-corei7-64.wic
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Write the Image:</emphasis>
-                        You can write the image just built to a bootable media
-                        (e.g. a USB key, SATA drive, SD card, etc.) using the
-                        <filename>dd</filename> utility:
-                        <literallayout class='monospaced'>
-     $ sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-base-intel-corei7-64.wic of=TARGET_DEVICE
-                        </literallayout>
-                        In the previous command, the
-                        <filename>TARGET_DEVICE</filename> is the device node in
-                        the host machine (e.g. <filename>/dev/sdc</filename>, which
-                        is most likely a USB stick, or
-                        <filename>/dev/mmcblk0</filename>, which is most likely an
-                        SD card).
-                        </para></listitem>
-                    <listitem><para>
-                        <emphasis>Boot the Hardware:</emphasis>
-                        With the boot device provisioned, you can insert the
-                        media into the MinnowBoard Turbot and boot the hardware.
-                        The board should automatically detect the media and boot to
-                        the bootloader and subsequently the operating system.
-                        </para>
-
-                        <para>If the board does not boot automatically, you can
-                        boot it manually from the EFI shell as follows:
-                        <literallayout class='monospaced'>
-     Shell> connect -r
-     Shell> map -r
-     Shell> fs0:
-     Shell> bootx64
-                        </literallayout>
-                        <note>
-                            For a 32-bit image use the following:
-                            <literallayout class='monospaced'>
-     Shell> bootia32
-                            </literallayout>
-                        </note>
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-    </section>
-
-    <section id='qs-next-steps'>
-        <title>Next Steps</title>
-
-        <para>
-            If you completed all the steps in the previous section then
-            congratulations!
-            What now?
-        </para>
-
-        <para>
-            Depending on what you primary interests are with the Yocto Project,
-            you could consider any of the following:
-            <itemizedlist>
-                <listitem><para>
-                    <emphasis>Visit the Yocto Project Web Site:</emphasis>
-                    The official
-                    <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink>
-                    web site contains information on the entire project.
-                    Visiting this site is a good way to familiarize yourself
-                    with the overall project.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Look Through the
-                    <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-intro'>Yocto Project Development Tasks Manual</ulink>:</emphasis>
-                    This manual contains procedural information grouped to
-                    help you get set up, work with layers, customize images,
-                    write new recipes, work with libraries, and use QEMU.
-                    The information is task-based and spans the breadth of the
-                    Yocto Project.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Look Through the
-                    <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
-                    manual:</emphasis>
-                    This manual describes how to use both the
-                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk'>standard SDK</ulink>
-                    and the
-                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>extensible SDK</ulink>,
-                    which are used primarily for application development.
-                    This manual also provides example workflows
-                    that use the popular <trademark class='trade'>Eclipse</trademark>
-                    development environment and that use <filename>devtool</filename>.
-                    See the
-                    "<ulink url='&YOCTO_DOCS_SDK_URL;#workflow-using-eclipse'>Workflow using Eclipse™</ulink>"
-                    and
-                    "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in your SDK Workflow</ulink>"
-                    sections for more information.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Learn About Kernel Development:</emphasis>
-                    If you want to see how to work with the kernel and
-                    understand Yocto Linux kernels, see the
-                    <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-dev-intro'>Yocto Project Linux Kernel Development Manual</ulink>.
-                    This manual provides information on how to patch the
-                    kernel, modify kernel recipes, and configure the kernel.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Learn About Board Support Packages (BSPs):</emphasis>
-                    If you want to learn about BSPs, see the
-                    <ulink url='&YOCTO_DOCS_BSP_URL;#bsp'>Yocto Project Board Support Packages (BSP) Developer's Guide</ulink>.
-                    This manual also provides an example BSP creation workflow.
-                    See the
-                    <ulink url='&YOCTO_DOCS_BSP_URL;#developing-a-board-support-package-bsp'>"Developing a Board Support Package (BSP)</ulink>"
-                    section.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Learn About Toaster:</emphasis>
-                    Toaster is a web interface to the Yocto Project's
-                    OpenEmbedded build system.
-                    If you are interested in using this type of interface to
-                    create images, see the
-                    <ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-intro'>Toaster User Manual</ulink>.
-                    </para></listitem>
-                <listitem><para>
-                    <emphasis>Have Available the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-manual-intro'>Yocto Project Reference Manual:</ulink></emphasis>
-                    Unlike the rest of the Yocto Project manual set, this manual
-                    is comprised of material suited for reference rather than
-                    procedures.
-                    You can get
-                    <ulink url='&YOCTO_DOCS_REF_URL;#usingpoky'>build details</ulink>,
-                    a
-                    <ulink url='&YOCTO_DOCS_REF_URL;#development-concepts'>closer look</ulink>
-                    at how the pieces of the Yocto Project development
-                    environment work together, information on various
-                    <ulink url='&YOCTO_DOCS_REF_URL;#technical-details'>technical details</ulink>,
-                    guidance on
-                    <ulink url='&YOCTO_DOCS_REF_URL;#migration'>migrating to a newer Yocto Project release</ulink>,
-                    reference material on the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-structure'>directory structure</ulink>,
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>classes</ulink>,
-                    and
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks'>tasks</ulink>.
-                    The Yocto Project Reference Manual also contains a fairly
-                    comprehensive
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-variables-glossary'>glossary of variables</ulink>
-                    used within the Yocto Project.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-    </section>
-</article>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/meta-poky/conf/distro/poky-lsb.conf b/import-layers/yocto-poky/meta-poky/conf/distro/poky-lsb.conf
index 24cfb08..ecfe5d2 100644
--- a/import-layers/yocto-poky/meta-poky/conf/distro/poky-lsb.conf
+++ b/import-layers/yocto-poky/meta-poky/conf/distro/poky-lsb.conf
@@ -12,4 +12,4 @@
 KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
 
 # Use the LTSI Kernel for LSB Testing
-PREFERRED_VERSION_linux-yocto_linuxstdbase ?= "4.9%"
+PREFERRED_VERSION_linux-yocto_linuxstdbase ?= "4.14%"
diff --git a/import-layers/yocto-poky/meta-poky/conf/distro/poky-tiny.conf b/import-layers/yocto-poky/meta-poky/conf/distro/poky-tiny.conf
index 2032bfd..7b22a13 100644
--- a/import-layers/yocto-poky/meta-poky/conf/distro/poky-tiny.conf
+++ b/import-layers/yocto-poky/meta-poky/conf/distro/poky-tiny.conf
@@ -38,7 +38,7 @@
 # Distro config is evaluated after the machine config, so we have to explicitly
 # set the kernel provider to override a machine config.
 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
-PREFERRED_VERSION_linux-yocto-tiny ?= "4.12%"
+PREFERRED_VERSION_linux-yocto-tiny ?= "4.14%"
 
 # We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny
 #POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot"
diff --git a/import-layers/yocto-poky/meta-poky/conf/distro/poky.conf b/import-layers/yocto-poky/meta-poky/conf/distro/poky.conf
index 57d00bc..7b1f24e 100644
--- a/import-layers/yocto-poky/meta-poky/conf/distro/poky.conf
+++ b/import-layers/yocto-poky/meta-poky/conf/distro/poky.conf
@@ -1,7 +1,7 @@
 DISTRO = "poky"
 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
-DISTRO_VERSION = "2.4.2"
-DISTRO_CODENAME = "rocko"
+DISTRO_VERSION = "2.5"
+DISTRO_CODENAME = "sumo"
 SDK_VENDOR = "-pokysdk"
 SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
 
@@ -21,7 +21,7 @@
 
 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
 
-PREFERRED_VERSION_linux-yocto ?= "4.12%"
+PREFERRED_VERSION_linux-yocto ?= "4.14%"
 
 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
 SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
@@ -64,15 +64,12 @@
 CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
 
 SANITY_TESTED_DISTROS ?= " \
-            poky-2.2 \n \
-            poky-2.3 \n \
             poky-2.4 \n \
+            poky-2.5 \n \
             ubuntu-15.04 \n \
             ubuntu-16.04 \n \
             ubuntu-16.10 \n \
             ubuntu-17.04 \n \
-            fedora-24 \n \
-            fedora-25 \n \
             fedora-26 \n \
             centos-7 \n \
             debian-8 \n \
diff --git a/import-layers/yocto-poky/meta-poky/conf/layer.conf b/import-layers/yocto-poky/meta-poky/conf/layer.conf
index 26d7c3b..3761f87 100644
--- a/import-layers/yocto-poky/meta-poky/conf/layer.conf
+++ b/import-layers/yocto-poky/meta-poky/conf/layer.conf
@@ -9,7 +9,7 @@
 BBFILE_PATTERN_yocto = "^${LAYERDIR}/"
 BBFILE_PRIORITY_yocto = "5"
 
-LAYERSERIES_COMPAT_yocto = "rocko"
+LAYERSERIES_COMPAT_yocto = "sumo"
 
 # This should only be incremented on significant changes that will
 # cause compatibility issues with other layers
diff --git a/import-layers/yocto-poky/meta-poky/conf/local.conf.sample b/import-layers/yocto-poky/meta-poky/conf/local.conf.sample
index 9a560df..aa8df40 100644
--- a/import-layers/yocto-poky/meta-poky/conf/local.conf.sample
+++ b/import-layers/yocto-poky/meta-poky/conf/local.conf.sample
@@ -28,7 +28,7 @@
 # There are also the following hardware board target machines included for 
 # demonstration purposes:
 #
-#MACHINE ?= "beaglebone"
+#MACHINE ?= "beaglebone-yocto"
 #MACHINE ?= "genericx86"
 #MACHINE ?= "genericx86-64"
 #MACHINE ?= "mpc8315e-rdb"
@@ -218,6 +218,17 @@
 #file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
 #file://.* file:///some/local/dir/sstate/PATH"
 
+#
+# Yocto Project SState Mirror
+#
+# The Yocto Project has prebuilt artefacts available for its releases, you can enable
+# use of these by uncommenting the following line. This will mean the build uses
+# the network to check for artefacts at the start of builds, which does slow it down
+# equally, it will also speed up the builds by not having to build things if they are
+# present in the cache. It assumes you can download something faster than you can build it
+# which will depend on your network.
+#
+#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH"
 
 #
 # Qemu configuration
diff --git a/import-layers/yocto-poky/meta-selftest/conf/layer.conf b/import-layers/yocto-poky/meta-selftest/conf/layer.conf
index 2a71895..f574a50 100644
--- a/import-layers/yocto-poky/meta-selftest/conf/layer.conf
+++ b/import-layers/yocto-poky/meta-selftest/conf/layer.conf
@@ -9,4 +9,4 @@
 BBFILE_PATTERN_selftest = "^${LAYERDIR}/"
 BBFILE_PRIORITY_selftest = "5"
 
-LAYERSERIES_COMPAT_selftest = "rocko"
+LAYERSERIES_COMPAT_selftest = "sumo"
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local/file1 b/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local/file1
new file mode 100644
index 0000000..f4bdcfc
--- /dev/null
+++ b/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local/file1
@@ -0,0 +1 @@
+The first file
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local/file2 b/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local/file2
new file mode 100644
index 0000000..a7e2414
--- /dev/null
+++ b/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local/file2
@@ -0,0 +1 @@
+The second file
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb b/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
new file mode 100644
index 0000000..b377cb7
--- /dev/null
+++ b/import-layers/yocto-poky/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
@@ -0,0 +1,16 @@
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/syslinux-${PV}.tar.xz \
+           file://file1 \
+           file://file2"
+
+SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
+SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e"
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+S = "${WORKDIR}/syslinux-${PV}"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks b/import-layers/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks
index 9410b68..ae69cb6 100644
--- a/import-layers/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks
+++ b/import-layers/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks
@@ -4,6 +4,7 @@
 
 part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
+part /media --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label uuid-test --align 1024 --use-uuid --fsuuid 2c71ef06-a81d-4735-9d3a-379b69c6bdba
 part /mnt --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024
 
 bootloader --ptable gpt --timeout=0  --append="rootwait console=tty0"
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch b/import-layers/yocto-poky/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch
new file mode 100644
index 0000000..b1d5eab
--- /dev/null
+++ b/import-layers/yocto-poky/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch
@@ -0,0 +1,22 @@
+From efc8831f33106e6b48de8e612c2d816fe7d1ae68 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 9 Feb 2018 17:37:48 +0200
+Subject: [PATCH] Test patch here!
+
+This is an invalid patch used by oe-selftest
+---
+ README | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/README b/README
+index 48fff57..26d1234 100644
+--- a/README
++++ b/README
+@@ -1,3 +1,4 @@
++This is a test patch for purposes of oe-selftest
+ THIS LINE MAKES THIS PATCH INVALID README for the man-db manual pager suite
+ ========================================
+ 
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/man/man_1.6g.bbappend b/import-layers/yocto-poky/meta-selftest/recipes-test/man-db/man-db_%.bbappend
similarity index 100%
rename from import-layers/yocto-poky/meta-selftest/recipes-test/man/man_1.6g.bbappend
rename to import-layers/yocto-poky/meta-selftest/recipes-test/man-db/man-db_%.bbappend
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/man/man/man-1.5h1-make.patch b/import-layers/yocto-poky/meta-selftest/recipes-test/man/man/man-1.5h1-make.patch
deleted file mode 100644
index a0d59b7..0000000
--- a/import-layers/yocto-poky/meta-selftest/recipes-test/man/man/man-1.5h1-make.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Test patch here!
-This is invalid patch used by tests in scripts/lib/selftests.
-
---- man-1.5g/man/Makefile.in.mike	Fri Apr  9 13:35:54 1999
-+++ man-1.5g/man/Makefile.in	Fri Apr  9 13:36:45 1999
-@@ -1,8 +1,8 @@
- #MAKE THIS PATCH INVALID
- MAN1 = man whatis apropos
--MAN5 = man.conf
-+MAN5 = man.config
- MAN8 = makewhatis
--ALL = man.1 whatis.1 apropos.1 man.conf.5
-+ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
- 
- .SUFFIXES: .man .1 .5 .8
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/import-layers/yocto-poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb
index 6d49734..913bfab 100644
--- a/import-layers/yocto-poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb
+++ b/import-layers/yocto-poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb
@@ -1,126 +1,72 @@
+SUMMARY = "Packages to exercise postinstall functions"
 LICENSE = "MIT"
-ALLOW_EMPTY_${PN}-at-rootfs = "1"
+
+inherit allarch
+
+PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing"
+
+ALLOW_EMPTY_${PN}-rootfs = "1"
 ALLOW_EMPTY_${PN}-delayed-a = "1"
 ALLOW_EMPTY_${PN}-delayed-b = "1"
-ALLOW_EMPTY_${PN}-delayed-d = "1"
-ALLOW_EMPTY_${PN}-delayed-p = "1"
-ALLOW_EMPTY_${PN}-delayed-t = "1"
+ALLOW_EMPTY_${PN}-rootfs-failing = "1"
 
-PACKAGES += "${PN}-at-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-delayed-d ${PN}-delayed-p ${PN}-delayed-t"
-PROVIDES += "${PN}-at-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-delayed-d ${PN}-delayed-p ${PN}-delayed-t"
-FILES_${PN}-delayed-a = ""
-FILES_${PN}-delayed-b = ""
-FILES_${PN}-delayed-d = ""
-FILES_${PN}-delayed-p = ""
-FILES_${PN}-delayed-t = ""
-
-# Runtime dependencies
-RDEPENDS_${PN}-delayed-a = "${PN}-at-rootfs"
+RDEPENDS_${PN}-delayed-a = "${PN}-rootfs"
 RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a"
-RDEPENDS_${PN}-delayed-d = "${PN}-delayed-b"
-RDEPENDS_${PN}-delayed-p = "${PN}-delayed-d"
-RDEPENDS_${PN}-delayed-t = "${PN}-delayed-p"
 
-# Main recipe post-install
-pkg_postinst_${PN}-at-rootfs () {
-    tfile="/etc/postinsta-test"
-    touch "$D"/this-was-created-at-rootfstime
-    if test "x$D" != "x" then
-        # Need to run on first boot
+TESTDIR = "${sysconfdir}/postinst-test"
+
+# At rootfs time touch $TESTDIR/rootfs.  Errors if the file already exists, or
+# if the function runs on first boot.
+pkg_postinst_${PN}-rootfs () {
+    set -e
+
+    if [ -z "$D" ]; then
+        echo "${PN}-rootfs should have finished at rootfs time"
         exit 1
-    else
-        echo "lets write postinst" > $tfile
     fi
-}
 
-# Dependency recipes post-installs
-pkg_postinst_${PN}-delayed-a () {
-    efile="/etc/postinst-test"
-    tfile="/etc/postinsta-test"
-    rdeps="postinst"
-
-    if test "x$D" != "x"; then
-      # Need to run on first boot
-      exit 1
-    else
-      touch /etc/this-was-created-at-first-boot
-      if test -e $efile ; then
-        echo 'success' > $tfile
-      else
-        echo 'fail to install $rdeps first!' >&2
+    if [ -e $D${TESTDIR}/rootfs ]; then
+        echo "$D${TESTDIR}/rootfs exists, but should not"
         exit 1
-      fi
-   fi
+    fi
+
+    mkdir -p $D${TESTDIR}
+    touch $D${TESTDIR}/rootfs
 }
 
-pkg_postinst_${PN}-delayed-b () {
-    efile="/etc/postinsta-test"
-    tfile="/etc/postinstb-test"
-    rdeps="postinsta"
+# Depends on rootfs, delays until first boot, verifies that the rootfs file was
+# written.
+pkg_postinst_ontarget_${PN}-delayed-a () {
+    set -e
 
-    if test "x$D" != "x"; then
-      # Need to run on first boot
-      exit 1
-    else
-      if test -e $efile ; then
-        echo 'success' > $tfile
-      else
-        echo 'fail to install $rdeps first!' >&2
+    if [ ! -e ${TESTDIR}/rootfs ]; then
+        echo "${PN}-delayed-a: ${TESTDIR}/rootfs not found"
         exit 1
-      fi
-   fi
+    fi
+
+    touch ${TESTDIR}/delayed-a
 }
 
-pkg_postinst_${PN}-delayed-d () {
-    efile="/etc/postinstb-test"
-    tfile="/etc/postinstd-test"
-    rdeps="postinstb"
+# Depends on delayed-a, delays until first boot, verifies that the delayed-a file was
+# written. This verifies the ordering between delayed postinsts.
+pkg_postinst_ontarget_${PN}-delayed-b () {
+    set -e
 
-    if test "x$D" != "x"; then
-      # Need to run on first boot
-      exit 1
-    else
-      if test -e $efile ; then
-        echo 'success' > $tfile
-      else
-        echo 'fail to install $rdeps first!' >&2
+    if [ ! -e ${TESTDIR}/delayed-a ]; then
+        echo "${PN}-delayed-b: ${TESTDIR}/delayed-a not found"
         exit 1
-      fi
-   fi
+    fi
+
+    touch ${TESTDIR}/delayed-b
 }
 
-pkg_postinst_${PN}-delayed-p () {
-    efile="/etc/postinstd-test"
-    tfile="/etc/postinstp-test"
-    rdeps="postinstd"
-
-    if test "x$D" != "x"; then
-      # Need to run on first boot
-      exit 1
-    else
-      if test -e $efile ; then
-        echo 'success' > $tfile
-      else
-        echo 'fail to install $rdeps first!' >&2
-        exit 1
-      fi
-   fi
-}
-
-pkg_postinst_${PN}-delayed-t () {
-    efile="/etc/postinstp-test"
-    tfile="/etc/postinstt-test"
-    rdeps="postinstp"
-
-    if test "x$D" != "x"; then
-      # Need to run on first boot
-      exit 1
-    else
-      if test -e $efile ; then
-          echo 'success' > $tfile
-      else
-          echo 'fail to install $rdeps first!' >&2
-          exit 1
-      fi
-   fi
+# This scriptlet intentionally includes a bogus command in the middle to test 
+# that we catch and report such errors properly.
+pkg_postinst_${PN}-rootfs-failing () {
+    mkdir -p $D${TESTDIR}
+    touch $D${TESTDIR}/rootfs-before-failure
+    run_a_really_broken_command
+    # Scriptlet execution should stop here; the following commands are NOT supposed to run.
+    # (oe-selftest checks for it).
+    touch $D${TESTDIR}/rootfs-after-failure
 }
diff --git a/import-layers/yocto-poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb b/import-layers/yocto-poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
index 62931c4..8a2b565 100644
--- a/import-layers/yocto-poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
+++ b/import-layers/yocto-poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
@@ -12,6 +12,7 @@
 bindir = "${base_bindir}"
 
 SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.lz"
+RECIPE_NO_UPDATE_REASON = "This recipe is used in selftest and shouldn't be updated otherwise"
 
 SRC_URI[md5sum] = "7f4a54fa7f366479f03654b8af645fd0"
 SRC_URI[sha256sum] = "ffb97eb8f2a2b5a71a9b97e3872adce953aa1b8958e04c5b7bf11d556f32552a"
diff --git a/import-layers/yocto-poky/meta-skeleton/conf/layer.conf b/import-layers/yocto-poky/meta-skeleton/conf/layer.conf
index a15516a..4e8692e 100644
--- a/import-layers/yocto-poky/meta-skeleton/conf/layer.conf
+++ b/import-layers/yocto-poky/meta-skeleton/conf/layer.conf
@@ -14,4 +14,4 @@
 
 LAYERDEPENDS_skeleton = "core"
 
-LAYERSERIES_COMPAT_skeleton = "rocko"
+LAYERSERIES_COMPAT_skeleton = "sumo"
diff --git a/import-layers/yocto-poky/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb b/import-layers/yocto-poky/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
index b140b0a..3d33446 100644
--- a/import-layers/yocto-poky/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
+++ b/import-layers/yocto-poky/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
@@ -13,3 +13,5 @@
 
 # The inherit of module.bbclass will automatically name module packages with
 # "kernel-module-" prefix as required by the oe-core build environment.
+
+RPROVIDES_${PN} += "kernel-module-hello"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/README.hardware b/import-layers/yocto-poky/meta-yocto-bsp/README.hardware
index 84c5afa..d8d2a0c 100644
--- a/import-layers/yocto-poky/meta-yocto-bsp/README.hardware
+++ b/import-layers/yocto-poky/meta-yocto-bsp/README.hardware
@@ -27,7 +27,7 @@
 
 The following boards are supported by the meta-yocto-bsp layer:
 
-  * Texas Instruments Beaglebone (beaglebone)
+  * Texas Instruments Beaglebone (beaglebone-yocto)
   * Freescale MPC8315E-RDB (mpc8315e-rdb)
   * Ubiquiti Networks EdgeRouter Lite (edgerouter)
   * General IA platforms (genericx86 and genericx86-64)
@@ -120,7 +120,7 @@
        dd command to write the image to a USB stick.
 
 
-Texas Instruments Beaglebone (beaglebone)
+Texas Instruments Beaglebone (beaglebone-yocto)
 =========================================
 
 The Beaglebone is an ARM Cortex-A8 development board with USB, Ethernet, 2D/3D
@@ -151,7 +151,7 @@
 
   2. Use the "dd" utility to write the image to the SD card. For example:
 
-     # dd core-image-minimal-beaglebone.wic of=/dev/sdb
+     # dd core-image-minimal-beaglebone-yocto.wic of=/dev/sdb
 
   3. Insert the SD card into the Beaglebone and boot the board.
 
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/conf/layer.conf b/import-layers/yocto-poky/meta-yocto-bsp/conf/layer.conf
index 7b565f2..6472238 100644
--- a/import-layers/yocto-poky/meta-yocto-bsp/conf/layer.conf
+++ b/import-layers/yocto-poky/meta-yocto-bsp/conf/layer.conf
@@ -8,5 +8,5 @@
 BBFILE_COLLECTIONS += "yoctobsp"
 BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
 BBFILE_PRIORITY_yoctobsp = "5"
-LAYERVERSION_yoctobsp = "3"
-LAYERSERIES_COMPAT_yoctobsp = "rocko"
+LAYERVERSION_yoctobsp = "4"
+LAYERSERIES_COMPAT_yoctobsp = "sumo"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf b/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
new file mode 100644
index 0000000..ae682a4
--- /dev/null
+++ b/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
@@ -0,0 +1,40 @@
+#@TYPE: Machine
+#@NAME: Beaglebone-yocto machine
+#@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards
+
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
+XSERVER ?= "xserver-xorg \
+           xf86-video-modesetting \
+           "
+
+MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree"
+
+EXTRA_IMAGEDEPENDS += "u-boot"
+
+DEFAULTTUNE ?= "cortexa8hf-neon"
+include conf/machine/include/tune-cortexa8.inc
+
+IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap"
+EXTRA_IMAGECMD_jffs2 = "-lnp "
+WKS_FILE ?= "beaglebone-yocto.wks"
+IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage"
+do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
+
+SERIAL_CONSOLE = "115200 ttyO0"
+
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
+PREFERRED_VERSION_linux-yocto ?= "4.15%"
+
+KERNEL_IMAGETYPE = "zImage"
+KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+
+SPL_BINARY = "MLO"
+UBOOT_SUFFIX = "img"
+UBOOT_MACHINE = "am335x_boneblack_config"
+UBOOT_ENTRYPOINT = "0x80008000"
+UBOOT_LOADADDRESS = "0x80008000"
+
+MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
+
+IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone.conf b/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone.conf
deleted file mode 100644
index 1bdd4df..0000000
--- a/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone.conf
+++ /dev/null
@@ -1,40 +0,0 @@
-#@TYPE: Machine
-#@NAME: Beaglebone machine
-#@DESCRIPTION: Machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards
-
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-           xf86-video-modesetting \
-           "
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
-
-EXTRA_IMAGEDEPENDS += "u-boot"
-
-DEFAULTTUNE ?= "cortexa8hf-neon"
-include conf/machine/include/tune-cortexa8.inc
-
-IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap"
-EXTRA_IMAGECMD_jffs2 = "-lnp "
-WKS_FILE ?= "beaglebone.wks"
-IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage"
-do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
-
-SERIAL_CONSOLE = "115200 ttyO0"
-
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ?= "4.12%"
-
-KERNEL_IMAGETYPE = "zImage"
-KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
-KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
-
-SPL_BINARY = "MLO"
-UBOOT_SUFFIX = "img"
-UBOOT_MACHINE = "am335x_boneblack_config"
-UBOOT_ENTRYPOINT = "0x80008000"
-UBOOT_LOADADDRESS = "0x80008000"
-
-MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
-
-IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf b/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf
index ab5a6fc..61f2145 100644
--- a/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf
+++ b/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf
@@ -11,12 +11,12 @@
 KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ?= "4.12%"
+PREFERRED_VERSION_linux-yocto ?= "4.15%"
 
 SERIAL_CONSOLE = "115200 ttyS0"
 USE_VT ?= "0"
 
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
 IMAGE_FSTYPES ?= "jffs2 tar.bz2 wic wic.bmap"
 JFFS2_ERASEBLOCK = "0x10000"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf b/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
index 371a3db..34f1230 100644
--- a/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
+++ b/import-layers/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
@@ -14,7 +14,7 @@
 
 MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
 
-PREFERRED_VERSION_linux-yocto ?= "4.12%"
+PREFERRED_VERSION_linux-yocto ?= "4.15%"
 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
 
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
@@ -25,7 +25,7 @@
 
 KERNEL_DEVICETREE = "mpc8315erdb.dtb"
 
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
 IMAGE_FSTYPES ?= "jffs2 tar.bz2"
 JFFS2_ERASEBLOCK = "0x4000"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/lib/oeqa/yoctobsp.py b/import-layers/yocto-poky/meta-yocto-bsp/lib/oeqa/yoctobsp.py
deleted file mode 100644
index 4c539a1..0000000
--- a/import-layers/yocto-poky/meta-yocto-bsp/lib/oeqa/yoctobsp.py
+++ /dev/null
@@ -1,39 +0,0 @@
-import unittest
-import os
-import logging
-import tempfile
-import shutil
-
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd
-from oeqa.utils.decorators import skipUnlessPassed
-
-class YoctoBSP(oeSelfTest):
-
-    @classmethod
-    def setUpClass(self):
-        result = runCmd("yocto-bsp list karch")
-        self.karchs = [karch.lstrip() for karch in result.output.splitlines()][1:]
-
-    def test_yoctobsp_listproperties(self):
-        for karch in self.karchs:
-            result = runCmd("yocto-bsp list %s properties" % karch)
-            self.assertEqual(0, result.status, msg="Properties from %s architecture could not be listed" % karch)
-
-    def test_yoctobsp_create(self):
-        # Generate a temporal file and folders for each karch
-        json = "{\"use_default_kernel\":\"yes\"}\n"
-        fd = tempfile.NamedTemporaryFile(delete=False)
-        fd.write(json)
-        fd.close()
-        tmpfolders = dict([(karch, tempfile.mkdtemp()) for karch in self.karchs])
-        # Create BSP
-        for karch in self.karchs:
-            result = runCmd("yocto-bsp create test %s -o %s -i %s" % (karch, "%s/unitest" % tmpfolders[karch], fd.name))
-            self.assertEqual(0, result.status, msg="Could not create a BSP with architecture %s using %s " % (karch, fd.name))
-        # Remove tmp file/folders
-        os.unlink(fd.name)
-        self.assertFalse(os.path.exists(fd.name), msg = "Temporal file %s could not be removed" % fd.name)
-        for tree in tmpfolders.values():
-            shutil.rmtree(tree)
-            self.assertFalse(os.path.exists(tree), msg = "Temporal folder %s could not be removed" % tree)
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone/machconfig b/import-layers/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone-yocto/machconfig
similarity index 100%
rename from import-layers/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone/machconfig
rename to import-layers/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone-yocto/machconfig
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone/xorg.conf b/import-layers/yocto-poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone-yocto/xorg.conf
similarity index 100%
rename from import-layers/yocto-poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone/xorg.conf
rename to import-layers/yocto-poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone-yocto/xorg.conf
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index e1f359c..0000000
--- a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,26 +0,0 @@
-KBRANCH_genericx86  = "standard/base"
-KBRANCH_genericx86-64  = "standard/base"
-
-KMACHINE_genericx86 ?= "common-pc"
-KMACHINE_genericx86-64 ?= "common-pc-64"
-KBRANCH_edgerouter = "standard/edgerouter"
-KBRANCH_beaglebone = "standard/beaglebone"
-KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
-
-SRCREV_machine_genericx86    ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_genericx86-64 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_edgerouter ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_beaglebone ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_mpc8315e-rdb ?= "c388fdfc9a1e06b22ca3533a023f4d67a6fc1e9b"
-
-COMPATIBLE_MACHINE_genericx86 = "genericx86"
-COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
-COMPATIBLE_MACHINE_edgerouter = "edgerouter"
-COMPATIBLE_MACHINE_beaglebone = "beaglebone"
-COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
-
-LINUX_VERSION_genericx86 = "4.10.17"
-LINUX_VERSION_genericx86-64 = "4.10.17"
-LINUX_VERSION_edgerouter = "4.10.17"
-LINUX_VERSION_beaglebone = "4.10.17"
-LINUX_VERSION_mpc8315e-rdb = "4.10.17"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend
index fad8ebc..e28360b 100644
--- a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend
@@ -4,24 +4,25 @@
 KMACHINE_genericx86 ?= "common-pc"
 KMACHINE_genericx86-64 ?= "common-pc-64"
 KBRANCH_edgerouter = "standard/edgerouter"
-KBRANCH_beaglebone = "standard/beaglebone"
+KBRANCH_beaglebone-yocto = "standard/beaglebone"
+KMACHINE_beaglebone-yocto = "beaglebone"
 KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
 
-SRCREV_machine_genericx86    ?= "1c4ad569af3e23a77994235435040e322908687f"
-SRCREV_machine_genericx86-64 ?= "1c4ad569af3e23a77994235435040e322908687f"
-SRCREV_machine_edgerouter ?= "257f843ea367744620f1d92910afd2f454e31483"
-SRCREV_machine_beaglebone-yocto ?= "257f843ea367744620f1d92910afd2f454e31483"
-SRCREV_machine_mpc8315e-rdb ?= "014560874f9eb2a86138c9cc35046ff1720485e1"
+SRCREV_machine_genericx86    ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81"
+SRCREV_machine_genericx86-64 ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81"
+SRCREV_machine_edgerouter ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81"
+SRCREV_machine_beaglebone-yocto ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81"
+SRCREV_machine_mpc8315e-rdb ?= "55fcfbee2560f57a490c5724ac5b5cb49bacb01c"
 
 
 COMPATIBLE_MACHINE_genericx86 = "genericx86"
 COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
 COMPATIBLE_MACHINE_edgerouter = "edgerouter"
-COMPATIBLE_MACHINE_beaglebone = "beaglebone"
+COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
 COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
 
-LINUX_VERSION_genericx86 = "4.12.20"
-LINUX_VERSION_genericx86-64 = "4.12.20"
-LINUX_VERSION_edgerouter = "4.12.19"
-LINUX_VERSION_beaglebone-yocto = "4.12.19"
-LINUX_VERSION_mpc8315e-rdb = "4.12.19"
+LINUX_VERSION_genericx86 = "4.12.21"
+LINUX_VERSION_genericx86-64 = "4.12.21"
+LINUX_VERSION_edgerouter = "4.12.21"
+LINUX_VERSION_beaglebone-yocto = "4.12.21"
+LINUX_VERSION_mpc8315e-rdb = "4.12.21"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.14.bbappend b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.14.bbappend
new file mode 100644
index 0000000..5130707
--- /dev/null
+++ b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.14.bbappend
@@ -0,0 +1,27 @@
+KBRANCH_genericx86  = "v4.14/standard/base"
+KBRANCH_genericx86-64  = "v4.14/standard/base"
+KBRANCH_edgerouter = "v4.14/standard/edgerouter"
+KBRANCH_beaglebone-yocto = "v4.14/standard/beaglebone"
+KBRANCH_mpc8315e-rdb = "v4.14/standard/fsl-mpc8315e-rdb"
+
+KMACHINE_genericx86 ?= "common-pc"
+KMACHINE_genericx86-64 ?= "common-pc-64"
+KMACHINE_beaglebone-yocto ?= "beaglebone"
+
+SRCREV_machine_genericx86    ?= "1d50ce210b0536eb9a66d1e56ae215f92176444a"
+SRCREV_machine_genericx86-64 ?= "1d50ce210b0536eb9a66d1e56ae215f92176444a"
+SRCREV_machine_edgerouter ?= "f2dc94f77d19ab65a832bad6f42662c509d2ef9e"
+SRCREV_machine_beaglebone-yocto ?= "6c1a02d4a9c227eca356911715a52cf92457ec16"
+SRCREV_machine_mpc8315e-rdb ?= "7e9a0b017be7b685e094638f4bdaa33a7df8f7c0"
+
+COMPATIBLE_MACHINE_genericx86 = "genericx86"
+COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
+COMPATIBLE_MACHINE_edgerouter = "edgerouter"
+COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
+COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
+
+LINUX_VERSION_genericx86 = "4.14.30"
+LINUX_VERSION_genericx86-64 = "4.14.30"
+LINUX_VERSION_edgerouter = "4.14.30"
+LINUX_VERSION_beaglebone-yocto = "4.14.30"
+LINUX_VERSION_mpc8315e-rdb = "4.14.30"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend
new file mode 100644
index 0000000..c0c6ad9
--- /dev/null
+++ b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend
@@ -0,0 +1,27 @@
+KBRANCH_genericx86  = "v4.15/standard/base"
+KBRANCH_genericx86-64  = "v4.15/standard/base"
+KBRANCH_edgerouter = "v4.15/standard/edgerouter"
+KBRANCH_beaglebone-yocto = "v4.15/standard/beaglebone"
+KBRANCH_mpc8315e-rdb = "v4.15/standard/fsl-mpc8315e-rdb"
+
+KMACHINE_genericx86 ?= "common-pc"
+KMACHINE_genericx86-64 ?= "common-pc-64"
+KMACHINE_beaglebone-yocto ?= "beaglebone"
+
+SRCREV_machine_genericx86    ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9"
+SRCREV_machine_genericx86-64 ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9"
+SRCREV_machine_edgerouter ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9"
+SRCREV_machine_beaglebone-yocto ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9"
+SRCREV_machine_mpc8315e-rdb ?= "cc2711c4f3b83b5cd78358e7c949fdbb6076e25b"
+
+COMPATIBLE_MACHINE_genericx86 = "genericx86"
+COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
+COMPATIBLE_MACHINE_edgerouter = "edgerouter"
+COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
+COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
+
+LINUX_VERSION_genericx86 = "4.15.13"
+LINUX_VERSION_genericx86-64 = "4.15.13"
+LINUX_VERSION_edgerouter = "4.15.13"
+LINUX_VERSION_beaglebone-yocto = "4.15.13"
+LINUX_VERSION_mpc8315e-rdb = "4.15.13"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index 35cce1b..0000000
--- a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,26 +0,0 @@
-KBRANCH_genericx86  = "standard/base"
-KBRANCH_genericx86-64  = "standard/base"
-
-KMACHINE_genericx86 ?= "common-pc"
-KMACHINE_genericx86-64 ?= "common-pc-64"
-KBRANCH_edgerouter = "standard/edgerouter"
-KBRANCH_beaglebone = "standard/beaglebone"
-KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
-
-SRCREV_machine_genericx86    ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_genericx86-64 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_edgerouter ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_beaglebone-yocto ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_mpc8315e-rdb ?= "70120c0a6b0f88122799705114a99a15bf0113ce"
-
-COMPATIBLE_MACHINE_genericx86 = "genericx86"
-COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
-COMPATIBLE_MACHINE_edgerouter = "edgerouter"
-COMPATIBLE_MACHINE_beaglebone = "beaglebone"
-COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
-
-LINUX_VERSION_genericx86 = "4.4.113"
-LINUX_VERSION_genericx86-64 = "4.4.113"
-LINUX_VERSION_edgerouter = "4.4.113"
-LINUX_VERSION_beaglebone-yocto = "4.4.113"
-LINUX_VERSION_mpc8315e-rdb = "4.4.113"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.9.bbappend b/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.9.bbappend
deleted file mode 100644
index c0b2eea..0000000
--- a/import-layers/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.9.bbappend
+++ /dev/null
@@ -1,26 +0,0 @@
-KBRANCH_genericx86  = "standard/base"
-KBRANCH_genericx86-64  = "standard/base"
-
-KMACHINE_genericx86 ?= "common-pc"
-KMACHINE_genericx86-64 ?= "common-pc-64"
-KBRANCH_edgerouter = "standard/edgerouter"
-KBRANCH_beaglebone = "standard/beaglebone"
-KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
-
-SRCREV_machine_genericx86    ?= "f7a6d45fff853173bfbf61706aeffcd1d1e99467"
-SRCREV_machine_genericx86-64 ?= "f7a6d45fff853173bfbf61706aeffcd1d1e99467"
-SRCREV_machine_edgerouter ?= "f7a6d45fff853173bfbf61706aeffcd1d1e99467"
-SRCREV_machine_beaglebone-yocto ?= "f7a6d45fff853173bfbf61706aeffcd1d1e99467"
-SRCREV_machine_mpc8315e-rdb ?= "195a857a0e42150b940dfcbdf857be66e05dd003"
-
-COMPATIBLE_MACHINE_genericx86 = "genericx86"
-COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
-COMPATIBLE_MACHINE_edgerouter = "edgerouter"
-COMPATIBLE_MACHINE_beaglebone = "beaglebone"
-COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
-
-LINUX_VERSION_genericx86 = "4.9.78"
-LINUX_VERSION_genericx86-64 = "4.9.78"
-LINUX_VERSION_edgerouter = "4.9.78"
-LINUX_VERSION_beaglebone-yocto = "4.9.78"
-LINUX_VERSION_mpc8315e-rdb = "4.9.78"
diff --git a/import-layers/yocto-poky/meta-yocto-bsp/wic/beaglebone.wks b/import-layers/yocto-poky/meta-yocto-bsp/wic/beaglebone-yocto.wks
similarity index 100%
rename from import-layers/yocto-poky/meta-yocto-bsp/wic/beaglebone.wks
rename to import-layers/yocto-poky/meta-yocto-bsp/wic/beaglebone-yocto.wks
diff --git a/import-layers/yocto-poky/meta/classes/archiver.bbclass b/import-layers/yocto-poky/meta/classes/archiver.bbclass
index ec80ad4..31c9b7e 100644
--- a/import-layers/yocto-poky/meta/classes/archiver.bbclass
+++ b/import-layers/yocto-poky/meta/classes/archiver.bbclass
@@ -46,7 +46,6 @@
 do_ar_recipe[dirs] = "${ARCHIVER_OUTDIR}"
 do_ar_original[dirs] = "${ARCHIVER_OUTDIR} ${ARCHIVER_WORKDIR}"
 do_deploy_archives[dirs] = "${WORKDIR}"
-do_deploy_all_archives[dirs] = "${WORKDIR}"
 
 # This is a convenience for the shell script to use it
 
@@ -114,10 +113,9 @@
     if ar_recipe == "1":
         d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_recipe' % pn)
 
-    # Output the srpm package
-    ar_srpm = d.getVarFlag('ARCHIVER_MODE', 'srpm')
-    if ar_srpm == "1":
-        if d.getVar('PACKAGES') != '' and d.getVar('IMAGE_PKGTYPE') == 'rpm':
+    # Output the SRPM package
+    if d.getVarFlag('ARCHIVER_MODE', 'srpm') == "1" and d.getVar('PACKAGES'):
+        if "package_rpm" in d.getVar('PACKAGE_CLASSES'):
             d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_package_write_rpm' % pn)
             if ar_dumpdata == "1":
                 d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_dumpdata' % pn)
@@ -129,6 +127,8 @@
                 d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_patched' % pn)
             elif ar_src == "configured":
                 d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_configured' % pn)
+        else:
+            bb.fatal("ARCHIVER_MODE[srpm] needs package_rpm in PACKAGE_CLASSES")
 }
 
 # Take all the sources for a recipe and puts them in WORKDIR/archiver-work/.
@@ -277,6 +277,11 @@
     if (d.getVar('SRC_URI') == ""):
         return
 
+    # For the kernel archive, srcdir may just be a link to the
+    # work-shared location. Use os.path.realpath to make sure
+    # that we archive the actual directory and not just the link.
+    srcdir = os.path.realpath(srcdir)
+
     bb.utils.mkdirhier(ar_outdir)
     if suffix:
         filename = '%s-%s.tar.gz' % (d.getVar('PF'), suffix)
@@ -319,6 +324,10 @@
     finally:
         os.chdir(cwd)
 
+def is_work_shared(d):
+    pn = d.getVar('PN')
+    return bb.data.inherits_class('kernel', d) or pn.startswith('gcc-source')
+
 # Run do_unpack and do_patch
 python do_unpack_and_patch() {
     if d.getVarFlag('ARCHIVER_MODE', 'src') not in \
@@ -331,7 +340,7 @@
     pn = d.getVar('PN')
 
     # The kernel class functions require it to be on work-shared, so we dont change WORKDIR
-    if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')):
+    if not is_work_shared(d):
         # Change the WORKDIR to make do_unpack do_patch run in another dir.
         d.setVar('WORKDIR', ar_workdir)
         # Restore the original path to recipe's native sysroot (it's relative to WORKDIR).
@@ -351,7 +360,7 @@
         oe.path.copytree(src, src_orig)
 
     # Make sure gcc and kernel sources are patched only once
-    if not (d.getVar('SRC_URI') == "" or (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source'))):
+    if not (d.getVar('SRC_URI') == "" or is_work_shared(d)):
         bb.build.exec_func('do_patch', d)
 
     # Create the patches
@@ -455,13 +464,6 @@
 addtask do_ar_recipe
 addtask do_deploy_archives before do_build
 
-addtask do_deploy_all_archives after do_deploy_archives
-do_deploy_all_archives[recrdeptask] = "do_deploy_archives"
-do_deploy_all_archives[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_deploy_all_archives() {
-        :
-}
-
 python () {
     # Add tasks in the correct order, specifically for linux-yocto to avoid race condition.
     # sstatesig.py:sstate_rundepfilter has special support that excludes this dependency
diff --git a/import-layers/yocto-poky/meta/classes/autotools.bbclass b/import-layers/yocto-poky/meta/classes/autotools.bbclass
index efa4098..cc857ac 100644
--- a/import-layers/yocto-poky/meta/classes/autotools.bbclass
+++ b/import-layers/yocto-poky/meta/classes/autotools.bbclass
@@ -200,7 +200,7 @@
 				bbnote Executing glib-gettextize --force --copy
 				echo "no" | glib-gettextize --force --copy
 			fi
-		elif grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
+		elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
 			# We'd call gettextize here if it wasn't so broken...
 			cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
 			if [ -d ${S}/po/ ]; then
diff --git a/import-layers/yocto-poky/meta/classes/base.bbclass b/import-layers/yocto-poky/meta/classes/base.bbclass
index bd0d6e3..bb1f4b7 100644
--- a/import-layers/yocto-poky/meta/classes/base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/base.bbclass
@@ -152,12 +152,8 @@
 addtask unpack after do_fetch
 do_unpack[dirs] = "${WORKDIR}"
 
-python () {
-    if d.getVar('S') != d.getVar('WORKDIR'):
-        d.setVarFlag('do_unpack', 'cleandirs', '${S}')
-    else:
-        d.setVarFlag('do_unpack', 'cleandirs', os.path.join('${S}', 'patches'))
-}
+do_unpack[cleandirs] = "${@d.getVar('S') if d.getVar('S') != d.getVar('WORKDIR') else os.path.join('${S}', 'patches')}"
+
 python base_do_unpack() {
     src_uri = (d.getVar('SRC_URI') or "").split()
     if len(src_uri) == 0:
@@ -170,12 +166,6 @@
         bb.fatal(str(e))
 }
 
-def pkgarch_mapping(d):
-    # Compatibility mappings of TUNE_PKGARCH (opt in)
-    if d.getVar("PKGARCHCOMPAT_ARMV7A"):
-        if d.getVar("TUNE_PKGARCH") == "armv7a-vfp-neon":
-            d.setVar("TUNE_PKGARCH", "armv7a")
-
 def get_layers_branch_rev(d):
     layers = (d.getVar("BBLAYERS") or "").split()
     layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \
@@ -225,12 +215,9 @@
     import bb.runqueue
 
     if isinstance(e, bb.event.ConfigParsed):
-        if not e.data.getVar("NATIVELSBSTRING", False):
-            e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
-        e.data.setVar('BB_VERSION', bb.__version__)
-        pkgarch_mapping(e.data)
-        oe.utils.features_backfill("DISTRO_FEATURES", e.data)
-        oe.utils.features_backfill("MACHINE_FEATURES", e.data)
+        if not d.getVar("NATIVELSBSTRING", False):
+            d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
+        d.setVar('BB_VERSION', bb.__version__)
         # Works with the line in layer.conf which changes PATH to point here
         setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
         setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS_NONFATAL', d, fatal=False)
@@ -246,7 +233,7 @@
         e.mcdata[''].setVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", deps)
 
     if isinstance(e, bb.event.BuildStarted):
-        localdata = bb.data.createCopy(e.data)
+        localdata = bb.data.createCopy(d)
         statuslines = []
         for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
             g = globals()
@@ -257,7 +244,7 @@
                 if flines:
                     statuslines.extend(flines)
 
-        statusheader = e.data.getVar('BUILDCFG_HEADER')
+        statusheader = d.getVar('BUILDCFG_HEADER')
         if statusheader:
             bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
 
@@ -265,23 +252,23 @@
     # target ones and we'd see dulpicate key names overwriting each other
     # for various PREFERRED_PROVIDERS
     if isinstance(e, bb.event.RecipePreFinalise):
-        if e.data.getVar("TARGET_PREFIX") == e.data.getVar("SDK_PREFIX"):
-            e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
-            e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
-            e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
-            e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
-            e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
+        if d.getVar("TARGET_PREFIX") == d.getVar("SDK_PREFIX"):
+            d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
+            d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
+            d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
+            d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
+            d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
 
     if isinstance(e, bb.runqueue.sceneQueueComplete):
-        completions = e.data.expand("${STAGING_DIR}/sstatecompletions")
+        completions = d.expand("${STAGING_DIR}/sstatecompletions")
         if os.path.exists(completions):
             cmds = set()
             with open(completions, "r") as f:
                 cmds = set(f)
-            e.data.setVar("completion_function", "\n".join(cmds))
-            e.data.setVarFlag("completion_function", "func", "1")
+            d.setVar("completion_function", "\n".join(cmds))
+            d.setVarFlag("completion_function", "func", "1")
             bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
-            bb.build.exec_func("completion_function", e.data)
+            bb.build.exec_func("completion_function", d)
             os.remove(completions)
 
     if isinstance(e, bb.event.RecipeParsed):
@@ -300,7 +287,7 @@
                 if p.startswith("virtual/") and p not in multiwhitelist:
                     profprov = d.getVar("PREFERRED_PROVIDER_" + p)
                     if profprov and pn != profprov:
-                        raise bb.parse.SkipPackage("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
+                        raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
 }
 
 CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
@@ -389,6 +376,10 @@
 python () {
     import string, re
 
+    # Handle backfilling
+    oe.utils.features_backfill("DISTRO_FEATURES", d)
+    oe.utils.features_backfill("MACHINE_FEATURES", d)
+
     # Handle PACKAGECONFIG
     #
     # These take the form:
@@ -463,7 +454,7 @@
 
     pn = d.getVar('PN')
     license = d.getVar('LICENSE')
-    if license == "INVALID":
+    if license == "INVALID" and pn != "defaultpkgname":
         bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
 
     if bb.data.inherits_class('license', d):
@@ -472,7 +463,7 @@
         if unmatched_license_flag:
             bb.debug(1, "Skipping %s because it has a restricted license not"
                  " whitelisted in LICENSE_FLAGS_WHITELIST" % pn)
-            raise bb.parse.SkipPackage("because it has a restricted license not"
+            raise bb.parse.SkipRecipe("because it has a restricted license not"
                  " whitelisted in LICENSE_FLAGS_WHITELIST")
 
     # If we're building a target package we need to use fakeroot (pseudo)
@@ -500,7 +491,7 @@
             if re.match(need_machine, m):
                 break
         else:
-            raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
+            raise bb.parse.SkipRecipe("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
 
     source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
     if not source_mirror_fetch:
@@ -509,7 +500,7 @@
             import re
             this_host = d.getVar('HOST_SYS')
             if not re.match(need_host, this_host):
-                raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
+                raise bb.parse.SkipRecipe("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
 
         bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE') or "").split()
 
@@ -562,7 +553,7 @@
                         bb.debug(1, "INCLUDING the package " + pkg)
                 elif all_skipped or incompatible_license(d, bad_licenses):
                     bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license))
-                    raise bb.parse.SkipPackage("it has an incompatible license: %s" % license)
+                    raise bb.parse.SkipRecipe("it has an incompatible license: %s" % license)
             elif pn in whitelist:
                 if pn in incompatwl:
                     bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
@@ -635,6 +626,10 @@
         elif path.endswith('.rpm'):
             d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
 
+        # *.deb should DEPEND on xz-native for unpacking
+        elif path.endswith('.deb'):
+            d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
+
     if needsrcrev:
         d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
 
diff --git a/import-layers/yocto-poky/meta/classes/bin_package.bbclass b/import-layers/yocto-poky/meta/classes/bin_package.bbclass
index a52b75b..cbc9b1f 100644
--- a/import-layers/yocto-poky/meta/classes/bin_package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/bin_package.bbclass
@@ -26,7 +26,10 @@
 bin_package_do_install () {
     # Do it carefully
     [ -d "${S}" ] || exit 1
-    cd ${S} || exit 1
+    if [ -z "$(ls -A ${S})" ]; then
+        bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S.
+    fi
+    cd ${S}
     tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
         | tar --no-same-owner -xpf - -C ${D}
 }
diff --git a/import-layers/yocto-poky/meta/classes/blacklist.bbclass b/import-layers/yocto-poky/meta/classes/blacklist.bbclass
index e58564c..dc79422 100644
--- a/import-layers/yocto-poky/meta/classes/blacklist.bbclass
+++ b/import-layers/yocto-poky/meta/classes/blacklist.bbclass
@@ -16,5 +16,5 @@
     blacklist = d.getVarFlag('PNBLACKLIST', d.getVar('PN'))
 
     if blacklist:
-        raise bb.parse.SkipPackage("Recipe is blacklisted: %s" % (blacklist))
+        raise bb.parse.SkipRecipe("Recipe is blacklisted: %s" % (blacklist))
 }
diff --git a/import-layers/yocto-poky/meta/classes/buildhistory.bbclass b/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
index 7a5534e..63980f7 100644
--- a/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
+++ b/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
@@ -37,7 +37,7 @@
 BUILDHISTORY_DIR_SDK = "${BUILDHISTORY_DIR}/sdk/${SDK_NAME}${SDK_EXT}/${IMAGE_BASENAME}"
 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
 BUILDHISTORY_SDK_FILES ?= "conf/local.conf conf/bblayers.conf conf/auto.conf conf/locked-sigs.inc conf/devtool.conf"
-BUILDHISTORY_COMMIT ?= "0"
+BUILDHISTORY_COMMIT ?= "1"
 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
 BUILDHISTORY_PUSH_REPO ?= ""
 
diff --git a/import-layers/yocto-poky/meta/classes/cmake.bbclass b/import-layers/yocto-poky/meta/classes/cmake.bbclass
index ac2c151..fcfd5dd 100644
--- a/import-layers/yocto-poky/meta/classes/cmake.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cmake.bbclass
@@ -7,6 +7,23 @@
 # We need to unset CCACHE otherwise cmake gets too confused
 CCACHE = ""
 
+# What CMake generator to use.
+# The supported options are "Unix Makefiles" or "Ninja".
+OECMAKE_GENERATOR ?= "Ninja"
+
+python() {
+    generator = d.getVar("OECMAKE_GENERATOR")
+    if generator == "Unix Makefiles":
+        args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
+        d.setVar("OECMAKE_GENERATOR_ARGS", args)
+        d.setVarFlag("do_compile", "progress", "percent")
+    elif generator == "Ninja":
+        d.appendVar("DEPENDS", " ninja-native")
+        d.setVar("OECMAKE_GENERATOR_ARGS", "-G Ninja -DCMAKE_MAKE_PROGRAM=ninja")
+        d.setVarFlag("do_compile", "progress", "outof:^\[(\d+)/(\d+)\]\s+")
+    else:
+        bb.fatal("Unknown CMake Generator %s" % generator)
+}
 # C/C++ Compiler (without cpu arch/tune arguments)
 OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
 OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
@@ -34,6 +51,11 @@
 EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} "
 EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} "
 
+OECMAKE_TARGET_COMPILE ?= "all"
+OECMAKE_TARGET_INSTALL ?= "install"
+
+FILES_${PN}-dev += "${libdir}/cmake ${datadir}/cmake"
+
 # CMake expects target architectures in the format of uname(2),
 # which do not always match TARGET_ARCH, so all the necessary
 # conversions should happen here.
@@ -116,6 +138,7 @@
 	fi
 
 	cmake \
+	  ${OECMAKE_GENERATOR_ARGS} \
 	  $oecmake_sitefile \
 	  ${OECMAKE_SOURCEPATH} \
 	  -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
@@ -136,15 +159,17 @@
 	  -Wno-dev
 }
 
-do_compile[progress] = "percent"
+cmake_runcmake_build() {
+	bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
+	eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
+}
+
 cmake_do_compile()  {
-	bbnote VERBOSE=1 cmake --build '${B}' -- ${EXTRA_OECMAKE_BUILD}
-	VERBOSE=1 cmake --build '${B}' -- ${EXTRA_OECMAKE_BUILD}
+	cmake_runcmake_build --target ${OECMAKE_TARGET_COMPILE}
 }
 
 cmake_do_install() {
-	bbnote DESTDIR='${D}' cmake --build '${B}' --target install -- ${EXTRA_OECMAKE_BUILD}
-	DESTDIR='${D}' cmake --build '${B}' --target install -- ${EXTRA_OECMAKE_BUILD}
+	DESTDIR='${D}' cmake_runcmake_build --target ${OECMAKE_TARGET_INSTALL}
 }
 
 EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file
diff --git a/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass b/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
index 1928455..ee8aa61 100644
--- a/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
@@ -38,7 +38,7 @@
     extralibcs = [""]
     if "musl" in d.getVar("BASECANADIANEXTRAOS"):
         extralibcs.append("musl")
-    for variant in ["", "spe", "x32", "eabi", "n32", "ilp32"]:
+    for variant in ["", "spe", "x32", "eabi", "n32", "_ilp32"]:
         for libc in extralibcs:
             entry = "linux"
             if variant and libc:
@@ -123,8 +123,6 @@
            -Wl,-rpath-link,${STAGING_LIBDIR}/.. \
            -Wl,-rpath,${libdir}/.. "
 
-DEPENDS_GETTEXT = "gettext-native nativesdk-gettext"
-
 #
 # We need chrpath >= 0.14 to ensure we can deal with 32 and 64 bit
 # binaries
diff --git a/import-layers/yocto-poky/meta/classes/cross.bbclass b/import-layers/yocto-poky/meta/classes/cross.bbclass
index d217717..4e85cab 100644
--- a/import-layers/yocto-poky/meta/classes/cross.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cross.bbclass
@@ -41,8 +41,6 @@
 
 TOOLCHAIN_OPTIONS = ""
 
-DEPENDS_GETTEXT = "gettext-native"
-
 # This class encodes staging paths into its scripts data so can only be
 # reused if we manipulate the paths.
 SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
@@ -92,3 +90,8 @@
 export NM = "${BUILD_NM}"
 
 inherit nopackages
+
+python do_addto_recipe_sysroot () {
+    bb.build.exec_func("extend_recipe_sysroot", d)
+}
+addtask addto_recipe_sysroot after do_populate_sysroot
diff --git a/import-layers/yocto-poky/meta/classes/cve-check.bbclass b/import-layers/yocto-poky/meta/classes/cve-check.bbclass
index bc2f03f..537659d 100644
--- a/import-layers/yocto-poky/meta/classes/cve-check.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cve-check.bbclass
@@ -23,12 +23,12 @@
 # The product name that the CVE database uses.  Defaults to BPN, but may need to
 # be overriden per recipe (for example tiff.bb sets CVE_PRODUCT=libtiff).
 CVE_PRODUCT ??= "${BPN}"
+CVE_VERSION ??= "${PV}"
 
 CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
 CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd.db"
 
-CVE_CHECK_LOCAL_DIR ?= "${WORKDIR}/cve"
-CVE_CHECK_LOCAL_FILE ?= "${CVE_CHECK_LOCAL_DIR}/cve.log"
+CVE_CHECK_LOG ?= "${T}/cve.log"
 CVE_CHECK_TMP_FILE ?= "${TMPDIR}/cve_check"
 
 CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve"
@@ -169,7 +169,10 @@
     cves_patched = []
     cves_unpatched = []
     bpn = d.getVar("CVE_PRODUCT")
-    pv = d.getVar("PV").split("+git")[0]
+    # If this has been unset then we're not scanning for CVEs here (for example, image recipes)
+    if not bpn:
+        return ([], [])
+    pv = d.getVar("CVE_VERSION").split("+git")[0]
     cves = " ".join(patched_cves)
     cve_db_dir = d.getVar("CVE_CHECK_DB_DIR")
     cve_whitelist = ast.literal_eval(d.getVar("CVE_CHECK_CVE_WHITELIST"))
@@ -181,9 +184,6 @@
         bb.note("Recipe has been whitelisted, skipping check")
         return ([], [])
 
-    # It is needed to export the proxies to download the database using HTTP
-    bb.utils.export_proxies(d)
-
     try:
         # Write the faux CSV file to be used with cve-check-tool
         fd, faux = tempfile.mkstemp(prefix="cve-faux-")
@@ -251,11 +251,11 @@
     CVE manifest if enabled.
     """
 
-    cve_file = d.getVar("CVE_CHECK_LOCAL_FILE")
+    cve_file = d.getVar("CVE_CHECK_LOG")
     nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId="
     write_string = ""
     unpatched_cves = []
-    bb.utils.mkdirhier(d.getVar("CVE_CHECK_LOCAL_DIR"))
+    bb.utils.mkdirhier(os.path.dirname(cve_file))
 
     for cve in sorted(cve_data):
         write_string += "PACKAGE NAME: %s\n" % d.getVar("PN")
diff --git a/import-layers/yocto-poky/meta/classes/debian.bbclass b/import-layers/yocto-poky/meta/classes/debian.bbclass
index 8124558..989ea8f 100644
--- a/import-layers/yocto-poky/meta/classes/debian.bbclass
+++ b/import-layers/yocto-poky/meta/classes/debian.bbclass
@@ -25,12 +25,10 @@
 }
 
 python debian_package_name_hook () {
-    import glob, copy, stat, errno, re
+    import glob, copy, stat, errno, re, pathlib, subprocess
 
-    pkgdest = d.getVar('PKGDEST')
+    pkgdest = d.getVar("PKGDEST")
     packages = d.getVar('PACKAGES')
-    bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir")) + "$")
-    lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir")) + "$")
     so_re = re.compile("lib.*\.so")
 
     def socrunch(s):
@@ -60,25 +58,32 @@
                 d.appendVar('RPROVIDES_' + pkg, " " + pkg + " (=" + d.getVar("PKGV") + ")")
 
     def auto_libname(packages, orig_pkg):
+        p = lambda var: pathlib.PurePath(d.getVar(var))
+        libdirs = (p("base_libdir"), p("libdir"))
+        bindirs = (p("base_bindir"), p("base_sbindir"), p("bindir"), p("sbindir"))
+
         sonames = []
         has_bins = 0
         has_libs = 0
-        for file in pkgfiles[orig_pkg]:
-            root = os.path.dirname(file)
-            if bin_re.match(root):
+        for f in pkgfiles[orig_pkg]:
+            # This is .../packages-split/orig_pkg/
+            pkgpath = pathlib.PurePath(pkgdest, orig_pkg)
+            # Strip pkgpath off the full path to a file in the package, re-root
+            # so it is absolute, and then get the parent directory of the file.
+            path = pathlib.PurePath("/") / (pathlib.PurePath(f).relative_to(pkgpath).parent)
+            if path in bindirs:
                 has_bins = 1
-            if lib_re.match(root):
+            if path in libdirs:
                 has_libs = 1
-                if so_re.match(os.path.basename(file)):
-                    cmd = (d.getVar('TARGET_PREFIX') or "") + "objdump -p " + file + " 2>/dev/null"
-                    fd = os.popen(cmd)
-                    lines = fd.readlines()
-                    fd.close()
-                    for l in lines:
-                        m = re.match("\s+SONAME\s+([^\s]*)", l)
-                        if m and not m.group(1) in sonames:
-                            sonames.append(m.group(1))
-
+                if so_re.match(os.path.basename(f)):
+                    try:
+                        cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f]
+                        output = subprocess.check_output(cmd).decode("utf-8")
+                        for m in re.finditer("\s+SONAME\s+([^\s]+)", output):
+                            if m.group(1) not in sonames:
+                                sonames.append(m.group(1))
+                    except subprocess.CalledProcessError:
+                        pass
         bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
         soname = None
         if len(sonames) == 1:
@@ -120,6 +125,7 @@
                         if not newpkg.find(mlpre) == 0:
                             newpkg = mlpre + newpkg
                     if newpkg != pkg:
+                        bb.note("debian: renaming %s to %s" % (pkg, newpkg))
                         d.setVar('PKG_' + pkg, newpkg)
                         add_rprovides(pkg, d)
         else:
@@ -138,4 +144,3 @@
 EXPORT_FUNCTIONS package_name_hook
 
 DEBIAN_NAMES = "1"
-
diff --git a/import-layers/yocto-poky/meta/classes/deploy.bbclass b/import-layers/yocto-poky/meta/classes/deploy.bbclass
index 8ad07da..6d52908 100644
--- a/import-layers/yocto-poky/meta/classes/deploy.bbclass
+++ b/import-layers/yocto-poky/meta/classes/deploy.bbclass
@@ -8,4 +8,4 @@
 }
 addtask do_deploy_setscene
 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
-do_deploy[stamp-extra-info] = "${MACHINE}"
+do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/classes/devtool-source.bbclass b/import-layers/yocto-poky/meta/classes/devtool-source.bbclass
index 8f5bc86..56882a4 100644
--- a/import-layers/yocto-poky/meta/classes/devtool-source.bbclass
+++ b/import-layers/yocto-poky/meta/classes/devtool-source.bbclass
@@ -152,9 +152,65 @@
 }
 
 python devtool_post_patch() {
+    import shutil
     tempdir = d.getVar('DEVTOOL_TEMPDIR')
     with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
         srcsubdir = f.read()
+    with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
+        initial_rev = f.read()
+
+    def rm_patches():
+        patches_dir = os.path.join(srcsubdir, 'patches')
+        if os.path.exists(patches_dir):
+            shutil.rmtree(patches_dir)
+        # Restore any "patches" directory that was actually part of the source tree
+        try:
+            bb.process.run('git checkout -- patches', cwd=srcsubdir)
+        except bb.process.ExecutionError:
+            pass
+
+    extra_overrides = d.getVar('DEVTOOL_EXTRA_OVERRIDES')
+    if extra_overrides:
+        extra_override_list = extra_overrides.split(':')
+        devbranch = d.getVar('DEVTOOL_DEVBRANCH')
+        default_overrides = d.getVar('OVERRIDES').split(':')
+        no_overrides = []
+        # First, we may have some overrides that are referred to in the recipe set in
+        # our configuration, so we need to make a branch that excludes those
+        for override in default_overrides:
+            if override not in extra_override_list:
+                no_overrides.append(override)
+        if default_overrides != no_overrides:
+            # Some overrides are active in the current configuration, so
+            # we need to create a branch where none of the overrides are active
+            bb.process.run('git checkout %s -b devtool-no-overrides' % initial_rev, cwd=srcsubdir)
+            # Run do_patch function with the override applied
+            localdata = bb.data.createCopy(d)
+            localdata.setVar('OVERRIDES', ':'.join(no_overrides))
+            bb.build.exec_func('do_patch', localdata)
+            rm_patches()
+            # Now we need to reconcile the dev branch with the no-overrides one
+            # (otherwise we'd likely be left with identical commits that have different hashes)
+            bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
+            bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
+        else:
+            bb.process.run('git checkout %s -b devtool-no-overrides' % devbranch, cwd=srcsubdir)
+
+        for override in extra_override_list:
+            localdata = bb.data.createCopy(d)
+            if override in default_overrides:
+                bb.process.run('git branch devtool-override-%s %s' % (override, devbranch), cwd=srcsubdir)
+            else:
+                # Reset back to the initial commit on a new branch
+                bb.process.run('git checkout %s -b devtool-override-%s' % (initial_rev, override), cwd=srcsubdir)
+                # Run do_patch function with the override applied
+                localdata.appendVar('OVERRIDES', ':%s' % override)
+                bb.build.exec_func('do_patch', localdata)
+                rm_patches()
+                # Now we need to reconcile the new branch with the no-overrides one
+                # (otherwise we'd likely be left with identical commits that have different hashes)
+                bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
+        bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
     bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
 }
 
diff --git a/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass b/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass
index e74d3c0..9b78b03 100644
--- a/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distro_features_check.bbclass
@@ -17,7 +17,7 @@
     if any_of_distro_features:
         any_of_distro_features = any_of_distro_features.split()
         if set.isdisjoint(set(any_of_distro_features),set(distro_features)):
-            raise bb.parse.SkipPackage("one of '%s' needs to be in DISTRO_FEATURES" % any_of_distro_features)
+            raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % any_of_distro_features)
 
     required_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES')
     if required_distro_features:
@@ -26,12 +26,12 @@
             if f in distro_features:
                 continue
             else:
-                raise bb.parse.SkipPackage("missing required distro feature '%s' (not in DISTRO_FEATURES)" % f)
+                raise bb.parse.SkipRecipe("missing required distro feature '%s' (not in DISTRO_FEATURES)" % f)
 
     conflict_distro_features = d.getVar('CONFLICT_DISTRO_FEATURES')
     if conflict_distro_features:
         conflict_distro_features = conflict_distro_features.split()
         for f in conflict_distro_features:
             if f in distro_features:
-                raise bb.parse.SkipPackage("conflicting distro feature '%s' (in DISTRO_FEATURES)" % f)
+                raise bb.parse.SkipRecipe("conflicting distro feature '%s' (in DISTRO_FEATURES)" % f)
 }
diff --git a/import-layers/yocto-poky/meta/classes/distrodata.bbclass b/import-layers/yocto-poky/meta/classes/distrodata.bbclass
index c85f7b3..59ee8ce 100644
--- a/import-layers/yocto-poky/meta/classes/distrodata.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distrodata.bbclass
@@ -188,14 +188,6 @@
 }
 do_distrodata[vardepsexclude] = "DATETIME"
 
-addtask distrodataall after do_distrodata
-do_distrodataall[recrdeptask] = "do_distrodataall do_distrodata"
-do_distrodataall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_distrodataall[nostamp] = "1"
-do_distrodataall() {
-        :
-}
-
 addhandler checkpkg_eventhandler
 checkpkg_eventhandler[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted"
 python checkpkg_eventhandler() {
@@ -272,24 +264,15 @@
             if upstream_check_unreliable == "1":
                 return "N/A", "CHECK_IS_UNRELIABLE"
 
-            try:
-                uv = oe.recipeutils.get_recipe_upstream_version(localdata)
-                pupver = uv['version'] if uv['version'] else "N/A"
-            except Exception as e:
-                pupver = "N/A"
+            uv = oe.recipeutils.get_recipe_upstream_version(localdata)
+            pupver = uv['version'] if uv['version'] else "N/A"
+            pversion = uv['current_version']
+            revision = uv['revision'] if uv['revision'] else "N/A"
 
             if pupver == "N/A":
                 pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
             else:
-                src_uri = (localdata.getVar('SRC_URI') or '').split()
-                if src_uri:
-                    uri_type, _, _, _, _, _ = decodeurl(src_uri[0])
-                else:
-                    uri_type = "none"
-                pv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pversion, uri_type)
-                upv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pupver, uri_type)
-
-                cmp = vercmp_string(pv, upv)
+                cmp = vercmp_string(pversion, pupver)
                 if cmp == -1:
                     pstatus = "UPDATE" if not upstream_version_unknown else "KNOWN_BROKEN"
                 elif cmp == 0:
@@ -297,7 +280,7 @@
                 else:
                     pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
 
-            return pupver, pstatus
+            return pversion, pupver, pstatus, revision
 
 
         """initialize log files."""
@@ -334,7 +317,6 @@
 
         pdesc = localdata.getVar('DESCRIPTION')
         pgrp = localdata.getVar('SECTION')
-        pversion = localdata.getVar('PV')
         plicense = localdata.getVar('LICENSE')
         psection = localdata.getVar('SECTION')
         phome = localdata.getVar('HOMEPAGE')
@@ -345,7 +327,7 @@
         psrcuri = localdata.getVar('SRC_URI')
         maintainer = localdata.getVar('RECIPE_MAINTAINER')
 
-        pupver, pstatus = get_upstream_version_and_status()
+        pversion, pupver, pstatus, prevision = get_upstream_version_and_status()
 
         if psrcuri:
             psrcuri = psrcuri.split()[0]
@@ -358,20 +340,12 @@
         with open(logfile, "a") as f:
             writer = csv.writer(f, delimiter='\t')
             writer.writerow([pname, pversion, pupver, plicense, psection, phome, 
-                prelease, pdepends, pbugtracker, ppe, pdesc, pstatus, pupver,
+                prelease, pdepends, pbugtracker, ppe, pdesc, pstatus, prevision,
                 psrcuri, maintainer, no_upgr_reason])
             f.close()
         bb.utils.unlockfile(lf)
 }
 
-addtask checkpkgall after do_checkpkg
-do_checkpkgall[recrdeptask] = "do_checkpkgall do_checkpkg"
-do_checkpkgall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checkpkgall[nostamp] = "1"
-do_checkpkgall() {
-        :
-}
-
 addhandler distro_check_eventhandler
 distro_check_eventhandler[eventmask] = "bb.event.BuildStarted"
 python distro_check_eventhandler() {
@@ -407,13 +381,6 @@
     dc.save_distro_check_result(result, datetime, result_file, d)
 }
 
-addtask distro_checkall after do_distro_check
-do_distro_checkall[recrdeptask] = "do_distro_checkall do_distro_check"
-do_distro_checkall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_distro_checkall[nostamp] = "1"
-do_distro_checkall() {
-        :
-}
 #
 #Check Missing License Text.
 #Use this task to generate the missing license text data for pkg-report system,
@@ -458,11 +425,3 @@
             bb.utils.unlockfile(lf)
     return
 }
-
-addtask checklicenseall after do_checklicense
-do_checklicenseall[recrdeptask] = "do_checklicenseall do_checklicense"
-do_checklicenseall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checklicenseall[nostamp] = "1"
-do_checklicenseall() {
-        :
-}
diff --git a/import-layers/yocto-poky/meta/classes/externalsrc.bbclass b/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
index 65dd13d..c9f5cf7 100644
--- a/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
@@ -53,6 +53,9 @@
             d.setVar('BB_DONT_CACHE', '1')
 
     if externalsrc:
+        import oe.recipeutils
+        import oe.path
+
         d.setVar('S', externalsrc)
         if externalsrcbuild:
             d.setVar('B', externalsrcbuild)
@@ -85,10 +88,10 @@
                 d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")
 
             # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
-            cleandirs = (d.getVarFlag(task, 'cleandirs', False) or '').split()
+            cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '')
             setvalue = False
             for cleandir in cleandirs[:]:
-                if d.expand(cleandir) == externalsrc:
+                if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
                     cleandirs.remove(cleandir)
                     setvalue = True
             if setvalue:
@@ -173,7 +176,9 @@
 externalsrc_do_buildclean() {
 	if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
 		rm -f ${@' '.join([x.split(':')[0] for x in (d.getVar('EXTERNALSRC_SYMLINKS') or '').split()])}
-		oe_runmake clean || die "make failed"
+		if [ "${CLEANBROKEN}" != "1" ]; then
+			oe_runmake clean || die "make failed"
+		fi
 	else
 		bbnote "nothing to do - no makefile found"
 	fi
@@ -189,7 +194,7 @@
 
     try:
         git_dir = os.path.join(s_dir,
-            subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir']).decode("utf-8").rstrip())
+            subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
     except subprocess.CalledProcessError:
         pass
 
diff --git a/import-layers/yocto-poky/meta/classes/gettext.bbclass b/import-layers/yocto-poky/meta/classes/gettext.bbclass
index da68e63..be2ef3b 100644
--- a/import-layers/yocto-poky/meta/classes/gettext.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gettext.bbclass
@@ -3,7 +3,7 @@
         return ""
     if d.getVar('USE_NLS') == 'no':
         return "gettext-minimal-native"
-    return d.getVar('DEPENDS_GETTEXT', False)
+    return "gettext-native"
 
 def gettext_oeconf(d):
     if d.getVar('USE_NLS') == 'no':
@@ -13,8 +13,6 @@
         return '--disable-nls'
     return "--enable-nls"
 
-DEPENDS_GETTEXT ??= "gettext-native"
-
 BASEDEPENDS_append = " ${@gettext_dependencies(d)}"
 EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
 
diff --git a/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass b/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass
index a8190b7..e429bd3 100644
--- a/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gio-module-cache.bbclass
@@ -9,6 +9,7 @@
             mlprefix=${MLPREFIX} \
             binprefix=${MLPREFIX} \
             libdir=${libdir} \
+            libexecdir=${libexecdir} \
             base_libdir=${base_libdir} \
             bindir=${bindir}
 else
diff --git a/import-layers/yocto-poky/meta/classes/glide.bbclass b/import-layers/yocto-poky/meta/classes/glide.bbclass
new file mode 100644
index 0000000..db42174
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/glide.bbclass
@@ -0,0 +1,9 @@
+# Handle Glide Vendor Package Management use
+#
+# Copyright 2018 (C) O.S. Systems Software LTDA.
+
+DEPENDS_append = " glide-native"
+
+do_compile_prepend() {
+    ( cd ${B}/src/${GO_IMPORT} && glide install )
+}
diff --git a/import-layers/yocto-poky/meta/classes/gnomebase.bbclass b/import-layers/yocto-poky/meta/classes/gnomebase.bbclass
index 4ccc8e0..efcb6ca 100644
--- a/import-layers/yocto-poky/meta/classes/gnomebase.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gnomebase.bbclass
@@ -20,7 +20,8 @@
 
 FILES_${PN}-doc += "${datadir}/devhelp"
 
-inherit autotools pkgconfig
+GNOMEBASEBUILDCLASS ??= "autotools"
+inherit ${GNOMEBASEBUILDCLASS} pkgconfig
 
 do_install_append() {
 	rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
diff --git a/import-layers/yocto-poky/meta/classes/go.bbclass b/import-layers/yocto-poky/meta/classes/go.bbclass
index 09b01a8..d33d83e 100644
--- a/import-layers/yocto-poky/meta/classes/go.bbclass
+++ b/import-layers/yocto-poky/meta/classes/go.bbclass
@@ -1,23 +1,6 @@
 inherit goarch ptest
 
-def get_go_parallel_make(d):
-    pm = (d.getVar('PARALLEL_MAKE') or '').split()
-    # look for '-j' and throw other options (e.g. '-l') away
-    # because they might have a different meaning in golang
-    while pm:
-        opt = pm.pop(0)
-        if opt == '-j':
-            v = pm.pop(0)
-        elif opt.startswith('-j'):
-            v = opt[2:].strip()
-        else:
-            continue
-
-        return '-p %d' % int(v)
-
-    return ""
-
-GO_PARALLEL_BUILD ?= "${@get_go_parallel_make(d)}"
+GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
 
 GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go"
 GOROOT_class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go"
@@ -41,8 +24,9 @@
 GO_LINKMODE_class-nativesdk = "--linkmode=external"
 GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
 export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
+export GOPATH_OMIT_IN_ACTIONID ?= "1"
 export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
-export GOPTESTFLAGS ?= "-test.v"
+export GOPTESTFLAGS ?= ""
 GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
 
 export GO = "${HOST_PREFIX}go"
@@ -50,9 +34,6 @@
 GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
 export GOTOOLDIR
 
-SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
-SECURITY_LDFLAGS = ""
-
 export CGO_ENABLED ?= "1"
 export CGO_CFLAGS ?= "${CFLAGS}"
 export CGO_CPPFLAGS ?= "${CPPFLAGS}"
@@ -64,8 +45,9 @@
 
 B = "${WORKDIR}/build"
 export GOPATH = "${B}"
-GO_TMPDIR ?= "${WORKDIR}/go-tmp"
-GO_TMPDIR[vardepvalue] = ""
+export GOCACHE = "off"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
 
 python go_do_unpack() {
     src_uri = (d.getVar('SRC_URI') or "").split()
@@ -91,7 +73,7 @@
 }
 
 go_list_package_tests() {
-    ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
+	${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
 		grep -v '\[\]$' | \
 		egrep -v '${GO_INSTALL_FILTEROUT}' | \
 		awk '{ print $1 }'
@@ -100,32 +82,37 @@
 go_do_configure() {
 	ln -snf ${S}/src ${B}/
 }
+do_configure[dirs] =+ "${GOTMPDIR}"
 
 go_do_compile() {
-	export TMPDIR="${GO_TMPDIR}"
-	${GO} env
+	export TMPDIR="${GOTMPDIR}"
 	if [ -n "${GO_INSTALL}" ]; then
+		if [ -n "${GO_LINKSHARED}" ]; then
+			${GO} install ${GOBUILDFLAGS} `go_list_packages`
+			rm -rf ${B}/bin
+		fi
 		${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages`
 	fi
 }
-do_compile[dirs] =+ "${GO_TMPDIR}"
+do_compile[dirs] =+ "${GOTMPDIR}"
 do_compile[cleandirs] = "${B}/bin ${B}/pkg"
 
-do_compile_ptest() {
-    export TMPDIR="${GO_TMPDIR}"
-    rm -f ${B}/.go_compiled_tests.list
+do_compile_ptest_base() {
+	export TMPDIR="${GOTMPDIR}"
+	rm -f ${B}/.go_compiled_tests.list
 	go_list_package_tests | while read pkg; do
 		cd ${B}/src/$pkg
 		${GO} test ${GOPTESTBUILDFLAGS} $pkg
 		find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
 			sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
 	done
+	do_compile_ptest
 }
-do_compile_ptest_base[dirs] =+ "${GO_TMPDIR}"
+do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
 
 go_do_install() {
 	install -d ${D}${libdir}/go/src/${GO_IMPORT}
-	tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' . | \
+	tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \
 		tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
 	tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
 
@@ -135,42 +122,54 @@
 	fi
 }
 
-do_install_ptest_base() {
-set -x
-    test -f "${B}/.go_compiled_tests.list" || exit 0
-    tests=""
-    while read test; do
-        tests="$tests${tests:+ }${test%.test}"
-        testdir=`dirname $test`
-        install -d ${D}${PTEST_PATH}/$testdir
-        install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
-        if [ -d "${B}/src/$testdir/testdata" ]; then
-            cp --preserve=mode,timestamps -R "${B}/src/$testdir/testdata" ${D}${PTEST_PATH}/$testdir
-        fi
-    done < ${B}/.go_compiled_tests.list
-    if [ -n "$tests" ]; then
-        install -d ${D}${PTEST_PATH}
-        cat >${D}${PTEST_PATH}/run-ptest <<EOF
+go_make_ptest_wrapper() {
+	cat >${D}${PTEST_PATH}/run-ptest <<EOF
 #!/bin/sh
-ANYFAILED=0
-for t in $tests; do
-    testdir=\`dirname \$t.test\`
-    if ( cd "${PTEST_PATH}/\$testdir"; "${PTEST_PATH}/\$t.test" ${GOPTESTFLAGS} | tee /dev/fd/9 | grep -q "^FAIL" ) 9>&1; then
-        ANYFAILED=1
-    fi
-done
-if [ \$ANYFAILED -ne 0 ]; then
-    echo "FAIL: ${PN}"
-    exit 1
-fi
-echo "PASS: ${PN}"
-exit 0
+RC=0
+run_test() (
+    cd "\$1"
+    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
+    exit \$?)
 EOF
-        chmod +x ${D}${PTEST_PATH}/run-ptest
-    else
-        rm -rf ${D}${PTEST_PATH}
-    fi
-set +x
+
+}
+
+go_stage_testdata() {
+	oldwd="$PWD"
+	cd ${S}/src
+	find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
+		if echo "$d" | grep -q '/vendor/'; then
+			continue
+		fi
+		parent=`dirname $d`
+		install -d ${D}${PTEST_PATH}/$parent
+		cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
+	done
+	cd "$oldwd"
+}
+
+do_install_ptest_base() {
+	test -f "${B}/.go_compiled_tests.list" || exit 0
+	install -d ${D}${PTEST_PATH}
+	go_stage_testdata
+	go_make_ptest_wrapper
+	havetests=""
+	while read test; do
+		testdir=`dirname $test`
+		testprog=`basename $test`
+		install -d ${D}${PTEST_PATH}/$testdir
+		install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
+	echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
+		havetests="yes"
+	done < ${B}/.go_compiled_tests.list
+	if [ -n "$havetests" ]; then
+		echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
+		chmod +x ${D}${PTEST_PATH}/run-ptest
+	else
+		rm -rf ${D}${PTEST_PATH}
+	fi
+	do_install_ptest
+	chown -R root:root ${D}${PTEST_PATH}
 }
 
 EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
diff --git a/import-layers/yocto-poky/meta/classes/goarch.bbclass b/import-layers/yocto-poky/meta/classes/goarch.bbclass
index 663c9ff..f54c516 100644
--- a/import-layers/yocto-poky/meta/classes/goarch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/goarch.bbclass
@@ -5,11 +5,13 @@
 HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}"
 HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
 TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}"
 TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}"
 TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
 GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}"
 
@@ -22,6 +24,7 @@
 GO_DYNLINK_x86-64 = "1"
 GO_DYNLINK_powerpc64 = "1"
 GO_DYNLINK_class-native = ""
+GO_DYNLINK_class-nativesdk = ""
 
 # define here because everybody inherits this class
 #
@@ -32,6 +35,8 @@
 COMPATIBLE_HOST_mipsarchn32 = "null"
 ARM_INSTRUCTION_SET = "arm"
 TUNE_CCARGS_remove = "-march=mips32r2"
+SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_NOPIE_CFLAGS ??= ""
 
 def go_map_arch(a, d):
     import re
@@ -56,7 +61,7 @@
     elif re.match('p(pc|owerpc)(64el)', a):
         return 'ppc64le'
     else:
-        raise bb.parse.SkipPackage("Unsupported CPU architecture: %s" % a)
+        raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
 
 def go_map_arm(a, f, d):
     import re
@@ -78,6 +83,15 @@
             return '387'
     return ''
 
+def go_map_mips(a, f, d):
+    import re
+    if a == 'mips' or a == 'mipsel':
+        if 'fpu-hard' in f:
+            return 'hardfloat'
+        else:
+            return 'softfloat'
+    return ''
+
 def go_map_os(o, d):
     if o.startswith('linux'):
         return 'linux'
diff --git a/import-layers/yocto-poky/meta/classes/godep.bbclass b/import-layers/yocto-poky/meta/classes/godep.bbclass
new file mode 100644
index 0000000..c82401c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/godep.bbclass
@@ -0,0 +1,8 @@
+DEPENDS_append = " go-dep-native"
+
+do_compile_prepend() {
+    rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.toml
+    rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.lock
+    ( cd ${WORKDIR}/build/src/${GO_IMPORT} && dep init && dep ensure )
+}
+
diff --git a/import-layers/yocto-poky/meta/classes/grub-efi-cfg.bbclass b/import-layers/yocto-poky/meta/classes/grub-efi-cfg.bbclass
new file mode 100644
index 0000000..5eeee6c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/grub-efi-cfg.bbclass
@@ -0,0 +1,114 @@
+# grub-efi.bbclass
+# Copyright (c) 2011, Intel Corporation.
+# All rights reserved.
+#
+# Released under the MIT license (see packages/COPYING)
+
+# Provide grub-efi specific functions for building bootable images.
+
+# External variables
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
+# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
+# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
+# ${LABELS} - a list of targets for the automatic config
+# ${APPEND} - an override list of append strings for each label
+# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
+# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
+# ${GRUB_ROOT} - grub's root device.
+
+GRUB_SERIAL ?= "console=ttyS0,115200"
+GRUB_CFG_VM = "${S}/grub_vm.cfg"
+GRUB_CFG_LIVE = "${S}/grub_live.cfg"
+GRUB_TIMEOUT ?= "10"
+#FIXME: build this from the machine config
+GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
+
+EFIDIR = "/EFI/BOOT"
+GRUB_ROOT ?= "${ROOT}"
+APPEND ?= ""
+
+# Need UUID utility code.
+inherit fs-uuid
+
+python build_efi_cfg() {
+    import sys
+
+    workdir = d.getVar('WORKDIR')
+    if not workdir:
+        bb.error("WORKDIR not defined, unable to package")
+        return
+
+    gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
+
+    labels = d.getVar('LABELS')
+    if not labels:
+        bb.debug(1, "LABELS not defined, nothing to do")
+        return
+
+    if labels == []:
+        bb.debug(1, "No labels, nothing to do")
+        return
+
+    cfile = d.getVar('GRUB_CFG')
+    if not cfile:
+        bb.fatal('Unable to read GRUB_CFG')
+
+    try:
+         cfgfile = open(cfile, 'w')
+    except OSError:
+        bb.fatal('Unable to open %s' % cfile)
+
+    cfgfile.write('# Automatically created by OE\n')
+
+    opts = d.getVar('GRUB_OPTS')
+    if opts:
+        for opt in opts.split(';'):
+            cfgfile.write('%s\n' % opt)
+
+    cfgfile.write('default=%s\n' % (labels.split()[0]))
+
+    timeout = d.getVar('GRUB_TIMEOUT')
+    if timeout:
+        cfgfile.write('timeout=%s\n' % timeout)
+    else:
+        cfgfile.write('timeout=50\n')
+
+    root = d.getVar('GRUB_ROOT')
+    if not root:
+        bb.fatal('GRUB_ROOT not defined')
+
+    if gfxserial == "1":
+        btypes = [ [ " graphics console", "" ],
+            [ " serial console", d.getVar('GRUB_SERIAL') or "" ] ]
+    else:
+        btypes = [ [ "", "" ] ]
+
+    for label in labels.split():
+        localdata = d.createCopy()
+
+        for btype in btypes:
+            cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
+            lb = label
+            if label == "install":
+                lb = "install-efi"
+            kernel = localdata.getVar('KERNEL_IMAGETYPE')
+            cfgfile.write('linux /%s LABEL=%s' % (kernel, lb))
+
+            cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
+
+            append = localdata.getVar('APPEND')
+            initrd = localdata.getVar('INITRD')
+
+            if append:
+                append = replace_rootfs_uuid(d, append)
+                cfgfile.write(' %s' % (append))
+
+            cfgfile.write(' %s' % btype[1])
+            cfgfile.write('\n')
+
+            if initrd:
+                cfgfile.write('initrd /initrd')
+            cfgfile.write('\n}\n')
+
+    cfgfile.close()
+}
diff --git a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
index 610479b..90badc0 100644
--- a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
+++ b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
@@ -1,36 +1,4 @@
-# grub-efi.bbclass
-# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
-#
-# Released under the MIT license (see packages/COPYING)
-
-# Provide grub-efi specific functions for building bootable images.
-
-# External variables
-# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
-# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
-# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
-# ${LABELS} - a list of targets for the automatic config
-# ${APPEND} - an override list of append strings for each label
-# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
-# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
-# ${GRUB_ROOT} - grub's root device.
-
-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-
-GRUB_SERIAL ?= "console=ttyS0,115200"
-GRUB_CFG_VM = "${S}/grub_vm.cfg"
-GRUB_CFG_LIVE = "${S}/grub_live.cfg"
-GRUB_TIMEOUT ?= "10"
-#FIXME: build this from the machine config
-GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
-
-EFIDIR = "/EFI/BOOT"
-GRUB_ROOT ?= "${ROOT}"
-APPEND ?= ""
-
-# Need UUID utility code.
-inherit fs-uuid
+inherit grub-efi-cfg
 
 efi_populate() {
 	# DEST must be the root of the image so that EFIDIR is not
@@ -58,7 +26,7 @@
 	# Build a EFI directory to create efi.img
 	mkdir -p ${EFIIMGDIR}/${EFIDIR}
 	cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
-	cp $iso_dir/vmlinuz ${EFIIMGDIR}
+	cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
 	EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
 	printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
 	if [ -f "$iso_dir/initrd" ] ; then
@@ -69,91 +37,3 @@
 efi_hddimg_populate() {
 	efi_populate $1
 }
-
-python build_efi_cfg() {
-    import sys
-
-    workdir = d.getVar('WORKDIR')
-    if not workdir:
-        bb.error("WORKDIR not defined, unable to package")
-        return
-
-    gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
-
-    labels = d.getVar('LABELS')
-    if not labels:
-        bb.debug(1, "LABELS not defined, nothing to do")
-        return
-
-    if labels == []:
-        bb.debug(1, "No labels, nothing to do")
-        return
-
-    cfile = d.getVar('GRUB_CFG')
-    if not cfile:
-        bb.fatal('Unable to read GRUB_CFG')
-
-    try:
-         cfgfile = open(cfile, 'w')
-    except OSError:
-        bb.fatal('Unable to open %s' % cfile)
-
-    cfgfile.write('# Automatically created by OE\n')
-
-    opts = d.getVar('GRUB_OPTS')
-    if opts:
-        for opt in opts.split(';'):
-            cfgfile.write('%s\n' % opt)
-
-    cfgfile.write('default=%s\n' % (labels.split()[0]))
-
-    timeout = d.getVar('GRUB_TIMEOUT')
-    if timeout:
-        cfgfile.write('timeout=%s\n' % timeout)
-    else:
-        cfgfile.write('timeout=50\n')
-
-    root = d.getVar('GRUB_ROOT')
-    if not root:
-        bb.fatal('GRUB_ROOT not defined')
-
-    if gfxserial == "1":
-        btypes = [ [ " graphics console", "" ],
-            [ " serial console", d.getVar('GRUB_SERIAL') or "" ] ]
-    else:
-        btypes = [ [ "", "" ] ]
-
-    for label in labels.split():
-        localdata = d.createCopy()
-
-        overrides = localdata.getVar('OVERRIDES')
-        if not overrides:
-            bb.fatal('OVERRIDES not defined')
-
-        for btype in btypes:
-            localdata.setVar('OVERRIDES', label + ':' + overrides)
-
-            cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
-            lb = label
-            if label == "install":
-                lb = "install-efi"
-            cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
-
-            cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
-
-            append = localdata.getVar('APPEND')
-            initrd = localdata.getVar('INITRD')
-
-            if append:
-                append = replace_rootfs_uuid(d, append)
-                cfgfile.write(' %s' % (append))
-
-            cfgfile.write(' %s' % btype[1])
-            cfgfile.write('\n')
-
-            if initrd:
-                cfgfile.write('initrd /initrd')
-            cfgfile.write('\n}\n')
-
-    cfgfile.close()
-}
diff --git a/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass b/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
index 5201c71..b4f6754 100644
--- a/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
@@ -18,27 +18,27 @@
 EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc "
 EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc "
 
-DEPENDS_append_class-target = " gtk-doc-native qemu-native"
-
 # Even though gtkdoc is disabled on -native, gtk-doc package is still
 # needed for m4 macros.
-DEPENDS_append_class-native = " gtk-doc-native"
-DEPENDS_append_class-nativesdk = " gtk-doc-native"
+DEPENDS_append = " gtk-doc-native"
 
 # The documentation directory, where the infrastructure will be copied.
 # gtkdocize has a default of "." so to handle out-of-tree builds set this to $S.
 GTKDOC_DOCDIR ?= "${S}"
 
-do_configure_prepend () {
-	( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
-}
-
-inherit qemu
-
 export STAGING_DIR_HOST
 
-do_compile_prepend_class-target () {
+inherit python3native pkgconfig qemu
+DEPENDS_append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
 
+do_configure_prepend () {
+	# Need to use ||true as this is only needed if configure.ac both exists
+	# and uses GTK_DOC_CHECK.
+	gtkdocize --srcdir ${S} --docdir ${GTKDOC_DOCDIR} || true
+}
+
+do_compile_prepend_class-target () {
+    if [ ${GTKDOC_ENABLED} = True ]; then
         # Write out a qemu wrapper that will be given to gtkdoc-scangobj so that it
         # can run target helper binaries through that.
         qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
@@ -64,7 +64,5 @@
 fi
 EOF
         chmod +x ${B}/gtkdoc-qemuwrapper
+    fi
 }
-
-
-inherit pkgconfig
diff --git a/import-layers/yocto-poky/meta/classes/icecc.bbclass b/import-layers/yocto-poky/meta/classes/icecc.bbclass
index 1cc1c4d..0ca8de8 100644
--- a/import-layers/yocto-poky/meta/classes/icecc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/icecc.bbclass
@@ -28,15 +28,44 @@
 #Error checking is kept to minimum so double check any parameters you pass to the class
 ###########################################################################################
 
-BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC"
+BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL \
+    ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC \
+    ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \
+    ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \
+    ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \
+    ICECC_ENV_DEBUG \
+    "
 
 ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
 
+# This version can be incremented when changes are made to the environment that
+# invalidate the version on the compile nodes. Changing it will cause a new
+# environment to be created.
+#
+# A useful thing to do for testing Icecream changes locally is to add a
+# subversion in local.conf:
+#  ICECC_ENV_VERSION_append = "-my-ver-1"
+ICECC_ENV_VERSION = "2"
+
+# Default to disabling the caret workaround, If set to "1" in local.conf, icecc
+# will locally recompile any files that have warnings, which can adversely
+# affect performance.
+#
+# See: https://github.com/icecc/icecream/issues/190
+export ICECC_CARET_WORKAROUND ??= "0"
+
+ICECC_CFLAGS = ""
+CFLAGS += "${ICECC_CFLAGS}"
+CXXFLAGS += "${ICECC_CFLAGS}"
+
+# Debug flags when generating environments
+ICECC_ENV_DEBUG ??= ""
+
 def icecc_dep_prepend(d):
     # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command.  Whether or  not
     # we need that built is the responsibility of the patch function / class, not
     # the application.
-    if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
+    if not d.getVar('INHIBIT_DEFAULT_DEPS'):
         return "icecc-create-env-native"
     return ""
 
@@ -44,21 +73,20 @@
 
 get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
 def get_cross_kernel_cc(bb,d):
-    kernel_cc = d.getVar('KERNEL_CC', False)
+    kernel_cc = d.getVar('KERNEL_CC')
 
     # evaluate the expression by the shell if necessary
     if '`' in kernel_cc or '$(' in kernel_cc:
         import subprocess
         kernel_cc = subprocess.check_output("echo %s" % kernel_cc, shell=True).decode("utf-8")[:-1]
 
-    kernel_cc = d.expand(kernel_cc)
     kernel_cc = kernel_cc.replace('ccache', '').strip()
     kernel_cc = kernel_cc.split(' ')[0]
     kernel_cc = kernel_cc.strip()
     return kernel_cc
 
 def get_icecc(d):
-    return d.getVar('ICECC_PATH', False) or bb.utils.which(os.getenv("PATH"), "icecc")
+    return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
 
 def create_path(compilers, bb, d):
     """
@@ -93,7 +121,7 @@
     return staging
 
 def use_icecc(bb,d):
-    if d.getVar('ICECC_DISABLED', False) == "1":
+    if d.getVar('ICECC_DISABLED') == "1":
         # don't even try it, when explicitly disabled
         return "no"
 
@@ -101,10 +129,13 @@
     if icecc_is_allarch(bb, d):
         return "no"
 
+    if icecc_is_cross_canadian(bb, d):
+        return "no"
+
     pn = d.getVar('PN')
 
     system_class_blacklist = []
-    user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL', False) or "none").split()
+    user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
     package_class_blacklist = system_class_blacklist + user_class_blacklist
 
     for black in package_class_blacklist:
@@ -121,8 +152,8 @@
     # e.g. when there is new version
     # building libgcc-initial with icecc fails with CPP sanity check error if host sysroot contains cross gcc built for another target tune/variant
     system_package_blacklist = ["libgcc-initial"]
-    user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL', False) or "").split()
-    user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL', False) or "").split()
+    user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
+    user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
     package_blacklist = system_package_blacklist + user_package_blacklist
 
     if pn in package_blacklist:
@@ -133,7 +164,7 @@
         bb.debug(1, "%s: found in whitelist, enable icecc" % pn)
         return "yes"
 
-    if d.getVar('PARALLEL_MAKE', False) == "":
+    if d.getVar('PARALLEL_MAKE') == "":
         bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn)
         return "no"
 
@@ -151,16 +182,27 @@
         bb.data.inherits_class("cross", d) or \
         bb.data.inherits_class("native", d);
 
+def icecc_is_cross_canadian(bb, d):
+    return bb.data.inherits_class("cross-canadian", d)
+
+def icecc_dir(bb, d):
+    return d.expand('${TMPDIR}/work-shared/ice')
+
 # Don't pollute allarch signatures with TARGET_FPU
 icecc_version[vardepsexclude] += "TARGET_FPU"
 def icecc_version(bb, d):
     if use_icecc(bb, d) == "no":
         return ""
 
-    parallel = d.getVar('ICECC_PARALLEL_MAKE', False) or ""
-    if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
+    parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
+    if not d.getVar('PARALLEL_MAKE') == "" and parallel:
         d.setVar("PARALLEL_MAKE", parallel)
 
+    # Disable showing the caret in the GCC compiler output if the workaround is
+    # disabled
+    if d.getVar('ICECC_CARET_WORKAROUND') == '0':
+        d.setVar('ICECC_CFLAGS', '-fno-diagnostics-show-caret')
+
     if icecc_is_native(bb, d):
         archive_name = "local-host-env"
     elif d.expand('${HOST_PREFIX}') == "":
@@ -169,14 +211,18 @@
         prefix = d.expand('${HOST_PREFIX}' )
         distro = d.expand('${DISTRO}')
         target_sys = d.expand('${TARGET_SYS}')
-        float = d.getVar('TARGET_FPU', False) or "hard"
+        float = d.getVar('TARGET_FPU') or "hard"
         archive_name = prefix + distro + "-"        + target_sys + "-" + float
         if icecc_is_kernel(bb, d):
             archive_name += "-kernel"
 
     import socket
-    ice_dir = d.expand('${STAGING_DIR_NATIVE}${prefix_native}')
-    tar_file = os.path.join(ice_dir, 'ice', archive_name + "-@VERSION@-" + socket.gethostname() + '.tar.gz')
+    ice_dir = icecc_dir(bb, d)
+    tar_file = os.path.join(ice_dir, "{archive}-{version}-@VERSION@-{hostname}.tar.gz".format(
+        archive=archive_name,
+        version=d.getVar('ICECC_ENV_VERSION'),
+        hostname=socket.gethostname()
+        ))
 
     return tar_file
 
@@ -197,25 +243,42 @@
     target_prefix = d.expand('${TARGET_PREFIX}')
     return os.path.join(external_toolchain_bindir, '%s%s' % (target_prefix, tool))
 
+def icecc_get_tool_link(tool, d):
+    import subprocess
+    return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1]
+
+def icecc_get_path_tool(tool, d):
+    # This is a little ugly, but we want to make sure we add an actual
+    # compiler to the toolchain, not ccache. Some distros (e.g. Fedora)
+    # have ccache enabled by default using symlinks PATH, meaning ccache
+    # would be found first when looking for the compiler.
+    paths = os.getenv("PATH").split(':')
+    while True:
+        p, hist = bb.utils.which(':'.join(paths), tool, history=True)
+        if not p or os.path.basename(icecc_get_tool_link(p, d)) != 'ccache':
+            return p
+        paths = paths[len(hist):]
+
+    return ""
+
 # Don't pollute native signatures with target TUNE_PKGARCH through STAGING_BINDIR_TOOLCHAIN
 icecc_get_tool[vardepsexclude] += "STAGING_BINDIR_TOOLCHAIN"
 def icecc_get_tool(bb, d, tool):
     if icecc_is_native(bb, d):
-        return bb.utils.which(os.getenv("PATH"), tool)
+        return icecc_get_path_tool(tool, d)
     elif icecc_is_kernel(bb, d):
-        return bb.utils.which(os.getenv("PATH"), get_cross_kernel_cc(bb, d))
+        return icecc_get_path_tool(get_cross_kernel_cc(bb, d), d)
     else:
         ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}')
         target_sys = d.expand('${TARGET_SYS}')
-        tool_bin = os.path.join(ice_dir, "%s-%s" % (target_sys, tool))
-        if os.path.isfile(tool_bin):
-            return tool_bin
-        else:
-            external_tool_bin = icecc_get_external_tool(bb, d, tool)
-            if os.path.isfile(external_tool_bin):
-                return external_tool_bin
-            else:
-                return ""
+        for p in ice_dir.split(':'):
+            tool_bin = os.path.join(p, "%s-%s" % (target_sys, tool))
+            if os.path.isfile(tool_bin):
+                return tool_bin
+        external_tool_bin = icecc_get_external_tool(bb, d, tool)
+        if os.path.isfile(external_tool_bin):
+            return external_tool_bin
+        return ""
 
 def icecc_get_and_check_tool(bb, d, tool):
     # Check that g++ or gcc is not a symbolic link to icecc binary in
@@ -223,8 +286,7 @@
     # compiler environment package.
     t = icecc_get_tool(bb, d, tool)
     if t:
-        import subprocess
-        link_path = subprocess.check_output("readlink -f %s" % t, shell=True).decode("utf-8")[:-1]
+        link_path = icecc_get_tool_link(tool, d)
         if link_path == get_icecc(d):
             bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, get_icecc(d)))
             return ""
@@ -305,7 +367,7 @@
         # the ICECC_VERSION generation step must be locked by a mutex
         # in order to prevent race conditions
         if flock -n "${ICECC_VERSION}.lock" \
-            ${ICECC_ENV_EXEC} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
+            ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
         then
             touch "${ICECC_VERSION}.done"
         elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
@@ -316,9 +378,13 @@
         fi
     fi
 
+    # Don't let ccache find the icecream compiler links that have been created, otherwise
+    # it can end up invoking icecream recursively.
+    export CCACHE_PATH="$PATH"
+    export CCACHE_DISBALE="1"
+
     export ICECC_VERSION ICECC_CC ICECC_CXX
     export PATH="$ICE_PATH:$PATH"
-    export CCACHE_PATH="$PATH"
 
     bbnote "Using icecc"
 }
@@ -338,3 +404,13 @@
 do_install_prepend() {
     set_icecc_env
 }
+
+# IceCream is not (currently) supported in the extensible SDK
+ICECC_SDK_HOST_TASK = "nativesdk-icecc-toolchain"
+ICECC_SDK_HOST_TASK_task-populate-sdk-ext = ""
+
+# Don't include IceCream in uninative tarball
+ICECC_SDK_HOST_TASK_pn-uninative-tarball = ""
+
+# Add the toolchain scripts to the SDK
+TOOLCHAIN_HOST_TASK_append = " ${ICECC_SDK_HOST_TASK}"
diff --git a/import-layers/yocto-poky/meta/classes/image-combined-dbg.bbclass b/import-layers/yocto-poky/meta/classes/image-combined-dbg.bbclass
new file mode 100644
index 0000000..f4772f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/image-combined-dbg.bbclass
@@ -0,0 +1,9 @@
+IMAGE_PREPROCESS_COMMAND_append = " combine_dbg_image; "
+
+combine_dbg_image () {
+        if [ "${IMAGE_GEN_DEBUGFS}" = "1" -a -e ${IMAGE_ROOTFS}-dbg ]; then
+                # copy target files into -dbg rootfs, so it can be used for
+                # debug purposes directly
+                tar -C ${IMAGE_ROOTFS} -cf - . | tar -C ${IMAGE_ROOTFS}-dbg -xf -
+        fi
+}
diff --git a/import-layers/yocto-poky/meta/classes/image-live.bbclass b/import-layers/yocto-poky/meta/classes/image-live.bbclass
index 1623c15..966277c 100644
--- a/import-layers/yocto-poky/meta/classes/image-live.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image-live.bbclass
@@ -19,7 +19,6 @@
 
 # External variables (also used by syslinux.bbclass)
 # ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
-# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
 # ${NOISO}  - skip building the ISO image if set to 1
 # ${NOHDD}  - skip building the HDD image if set to 1
 # ${HDDIMG_ID} - FAT image volume-id
@@ -33,7 +32,6 @@
                         virtual/kernel:do_deploy \
                         ${MLPREFIX}syslinux:do_populate_sysroot \
                         syslinux-native:do_populate_sysroot \
-                        ${@oe.utils.ifelse(d.getVar('COMPRESSISO', False),'zisofs-tools-native:do_populate_sysroot','')} \
                         ${PN}:do_image_${@d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')} \
                         "
 
@@ -65,7 +63,6 @@
 ISODIR = "${S}/iso"
 EFIIMGDIR = "${S}/efi_img"
 COMPACT_ISODIR = "${S}/iso.z"
-COMPRESSISO ?= "0"
 
 ISOLINUXDIR ?= "/isolinux"
 ISO_BOOTIMG = "isolinux/isolinux.bin"
@@ -115,18 +112,8 @@
 		install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
 	fi
 
-	if [ "${COMPRESSISO}" = "1" ] ; then
-		# create compact directory, compress iso
-		mkdir -p ${COMPACT_ISODIR}
-		mkzftree -z 9 -p 4 -F ${ISODIR}/rootfs.img ${COMPACT_ISODIR}/rootfs.img
-
-		# move compact iso to iso, then remove compact directory
-		mv ${COMPACT_ISODIR}/rootfs.img ${ISODIR}/rootfs.img
-		rm -Rf ${COMPACT_ISODIR}
-		mkisofs_compress_opts="-R -z -D -l"
-	else
-		mkisofs_compress_opts="-r"
-	fi
+	# We used to have support for zisofs; this is a relic of that
+	mkisofs_compress_opts="-r"
 
 	# Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3
 	# when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need
diff --git a/import-layers/yocto-poky/meta/classes/image-prelink.bbclass b/import-layers/yocto-poky/meta/classes/image-prelink.bbclass
index f3bb68b..6a8afa8 100644
--- a/import-layers/yocto-poky/meta/classes/image-prelink.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image-prelink.bbclass
@@ -36,7 +36,7 @@
 	dynamic_loader=$(linuxloader)
 
 	# prelink!
-	if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+	if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
 		bbnote " prelink: BUILD_REPRODUCIBLE_BINARIES..."
 		if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
 			export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct `
diff --git a/import-layers/yocto-poky/meta/classes/image.bbclass b/import-layers/yocto-poky/meta/classes/image.bbclass
index d88ce5c..2247b30 100644
--- a/import-layers/yocto-poky/meta/classes/image.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image.bbclass
@@ -17,7 +17,7 @@
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
+TESTIMAGECLASS = "${@oe.utils.conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
 inherit ${TESTIMAGECLASS}
 
 # IMAGE_FEATURES may contain any available package group
@@ -289,7 +289,7 @@
 SSTATE_SKIP_CREATION_task-image-complete = '1'
 do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
 do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
-do_image_complete[stamp-extra-info] = "${MACHINE}"
+do_image_complete[stamp-extra-info] = "${MACHINE_ARCH}"
 addtask do_image_complete after do_image before do_build
 python do_image_complete_setscene () {
     sstate_setscene(d)
@@ -536,21 +536,29 @@
     output = subprocess.check_output(['du', '-ks',
                                       d.getVar('IMAGE_ROOTFS')])
     size_kb = int(output.split()[0])
-    base_size = size_kb * overhead_factor
-    base_size = max(base_size, rootfs_req_size) + rootfs_extra_space
 
+    base_size = size_kb * overhead_factor
+    bb.debug(1, '%f = %d * %f' % (base_size, size_kb, overhead_factor))
+    base_size2 = max(base_size, rootfs_req_size) + rootfs_extra_space
+    bb.debug(1, '%f = max(%f, %d)[%f] + %d' % (base_size2, base_size, rootfs_req_size, max(base_size, rootfs_req_size), overhead_factor))
+
+    base_size = base_size2
     if base_size != int(base_size):
         base_size = int(base_size + 1)
     else:
         base_size = int(base_size)
+    bb.debug(1, '%f = int(%f)' % (base_size, base_size2))
 
+    base_size_saved = base_size
     base_size += rootfs_alignment - 1
     base_size -= base_size % rootfs_alignment
+    bb.debug(1, '%d = aligned(%d)' % (base_size, base_size_saved))
 
     # Do not check image size of the debugfs image. This is not supposed
     # to be deployed, etc. so it doesn't make sense to limit the size
     # of the debug.
     if (d.getVar('IMAGE_BUILDING_DEBUGFS') or "") == "true":
+        bb.debug(1, 'returning debugfs size %d' % (base_size))
         return base_size
 
     # Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
@@ -568,6 +576,8 @@
                 (base_size, initramfs_maxsize_int))
             bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should")
             bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n")
+
+    bb.debug(1, 'returning %d' % (base_size))
     return base_size
 
 python set_image_size () {
@@ -617,9 +627,9 @@
 do_package[noexec] = "1"
 deltask do_package_qa
 do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_package_write_rpm
 
 # Prepare the root links to point to the /usr counterparts.
 create_merged_usr_symlinks() {
@@ -654,7 +664,7 @@
 POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
 
 reproducible_final_image_task () {
-    if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+    if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
         if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
             REPRODUCIBLE_TIMESTAMP_ROOTFS=`git log -1 --pretty=%ct`
         fi
@@ -664,3 +674,5 @@
     fi
 }
 IMAGE_PREPROCESS_COMMAND_append = " reproducible_final_image_task; "
+
+CVE_PRODUCT = ""
diff --git a/import-layers/yocto-poky/meta/classes/image_types.bbclass b/import-layers/yocto-poky/meta/classes/image_types.bbclass
index e881d0c..00a00d3 100644
--- a/import-layers/yocto-poky/meta/classes/image_types.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image_types.bbclass
@@ -86,7 +86,7 @@
 	bbdebug 1 Executing "dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024"
 	dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
 	bbdebug 1 "Actual Rootfs size:  `du -s ${IMAGE_ROOTFS}`"
-	bbdebug 1 "Actual Partion size: `ls -s ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
+	bbdebug 1 "Actual Partion size: `stat -c '%s' ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
 	bbdebug 1 Executing "mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}"
 	mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
 	# Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected)
@@ -125,7 +125,7 @@
 # required when extracting, but it seems prudent to use it in both cases.
 IMAGE_CMD_TAR ?= "tar"
 # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
-IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
 
 do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
 IMAGE_CMD_cpio () {
@@ -147,16 +147,6 @@
 	fi
 }
 
-ELF_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
-ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
-
-IMAGE_CMD_elf () {
-	test -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
-	mkelfImage --kernel=${ELF_KERNEL} --initrd=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.cpio.gz --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
-}
-
-IMAGE_TYPEDEP_elf = "cpio.gz"
-
 UBI_VOLNAME ?= "${MACHINE}-rootfs"
 
 multiubi_mkfs() {
@@ -218,10 +208,27 @@
 
 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}"
 
+MIN_F2FS_SIZE ?= "524288"
+IMAGE_CMD_f2fs () {
+        # We need to add additional smarts here form devices smaller than 1.5G
+        # Need to scale appropriately between 40M -> 1.5G as the "overprovision
+        # ratio" goes down as the device gets bigger (70% -> 4.5%), below about
+        # 500M the standard IMAGE_OVERHEAD_FACTOR does not work, so add additional
+        # space here when under 500M
+	size=${ROOTFS_SIZE}
+	if [ ${size} -lt ${MIN_F2FS_SIZE} ] ; then
+		size=${MIN_F2FS_SIZE}
+		bbwarn "Rootfs size is too small for F2FS. Filesystem will be extended to ${size}K"
+	fi
+	dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs seek=${size} count=0 bs=1024
+	mkfs.f2fs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs
+	sload.f2fs -f ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.f2fs
+}
+
 EXTRA_IMAGECMD = ""
 
 inherit siteinfo kernel-arch
-JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
+JFFS2_ENDIANNESS ?= "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
 JFFS2_ERASEBLOCK ?= "0x40000"
 EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLOCK} --no-cleanmarkers"
 
@@ -230,7 +237,7 @@
 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
 EXTRA_IMAGECMD_ext4 ?= "-i 4096"
 EXTRA_IMAGECMD_btrfs ?= "-n 4096"
-EXTRA_IMAGECMD_elf ?= ""
+EXTRA_IMAGECMD_f2fs ?= ""
 
 do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot"
 do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot"
@@ -242,10 +249,10 @@
 do_image_squashfs_xz[depends] += "squashfs-tools-native:do_populate_sysroot"
 do_image_squashfs_lzo[depends] += "squashfs-tools-native:do_populate_sysroot"
 do_image_squashfs_lz4[depends] += "squashfs-tools-native:do_populate_sysroot"
-do_image_elf[depends] += "virtual/kernel:do_populate_sysroot mkelfimage-native:do_populate_sysroot"
 do_image_ubi[depends] += "mtd-utils-native:do_populate_sysroot"
 do_image_ubifs[depends] += "mtd-utils-native:do_populate_sysroot"
 do_image_multiubi[depends] += "mtd-utils-native:do_populate_sysroot"
+do_image_f2fs[depends] += "f2fs-tools-native:do_populate_sysroot"
 
 # This variable is available to request which values are suitable for IMAGE_FSTYPES
 IMAGE_TYPES = " \
@@ -261,9 +268,9 @@
     ubi ubifs multiubi \
     tar tar.gz tar.bz2 tar.xz tar.lz4 \
     cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
-    elf \
     wic wic.gz wic.bz2 wic.lzma \
     container \
+    f2fs \
 "
 
 # Compression is a special case of conversion. The old variable
@@ -274,11 +281,10 @@
 
 CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 ${COMPRESSIONTYPES}"
 CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-CONVERSION_CMD_gz = "gzip -f -9 -n -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+CONVERSION_CMD_gz = "pigz -f -9 -n -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
 CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
 CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
-CONVERSION_CMD_lz4 = "lz4 -9 -z ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
-CONVERSION_CMD_lz4_legacy = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
+CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
 CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
 CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
 CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
diff --git a/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass b/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass
index dcf620c..5b40a9e 100644
--- a/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image_types_wic.bbclass
@@ -102,6 +102,7 @@
                 # a variable and let the metadata deal with the deps.
                 d.setVar('_WKS_TEMPLATE', body)
                 bb.build.addtask('do_write_wks_template', 'do_image_wic', None, d)
+        bb.build.addtask('do_image_wic', 'do_image_complete', None, d)
 }
 
 #
diff --git a/import-layers/yocto-poky/meta/classes/insane.bbclass b/import-layers/yocto-poky/meta/classes/insane.bbclass
index 0a3b528..fa15460 100644
--- a/import-layers/yocto-poky/meta/classes/insane.bbclass
+++ b/import-layers/yocto-poky/meta/classes/insane.bbclass
@@ -68,6 +68,11 @@
                         "epiphany":   (4643,   0,    0,          True,          32),
                         "mips":       ( 8,     0,    0,          False,         32),
                         "mipsel":     ( 8,     0,    0,          True,          32),
+                        "microblaze":  (189,   0,    0,          False,         32),
+                        "microblazeeb":(189,   0,    0,          False,         32),
+                        "microblazeel":(189,   0,    0,          True,          32),
+                        "riscv32":    (243,    0,    0,          True,          32),
+                        "riscv64":    (243,    0,    0,          True,          64),
                       },
             "linux" : { 
                         "aarch64" :   (183,    0,    0,          True,          64),
@@ -94,6 +99,8 @@
                         "mipsisa64r6":   ( 8,  0,    0,          False,         64),
                         "mipsisa64r6el": ( 8,  0,    0,          True,          64),
                         "nios2":      (113,    0,    0,          True,          32),
+                        "riscv32":    (243,    0,    0,          True,          32),
+                        "riscv64":    (243,    0,    0,          True,          64),
                         "s390":       (22,     0,    0,          False,         32),
                         "sh4":        (42,     0,    0,          True,          32),
                         "sparc":      ( 2,     0,    0,          False,         32),
@@ -119,6 +126,8 @@
                         "microblaze":  (189,     0,    0,          False,         32),
                         "microblazeeb":(189,     0,    0,          False,         32),
                         "microblazeel":(189,     0,    0,          True,          32),
+                        "riscv32":    (243,      0,    0,          True,          32),
+                        "riscv64":    (243,      0,    0,          True,          64),
                         "sh4":        (  42,     0,    0,          True,          32),
                       },
             "uclinux-uclibc" : {
@@ -142,6 +151,9 @@
                         "powerpc":    (20,     0,    0,          False,         32),
                         "sh4":        (42,     0,    0,          True,          32),
                       },
+            "linux-gnu_ilp32" :     {
+                        "aarch64" :   (183,    0,    0,          True,          32),
+                      },
             "linux-gnux32" :       {
                         "x86_64":     (62,     0,    0,          True,          32),
                       },
@@ -422,7 +434,7 @@
 
     # Check the architecture and endiannes of the binary
     is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
-            (target_os == "linux-gnux32" or target_os == "linux-muslx32"  or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
+            (target_os == "linux-gnux32" or target_os == "linux-muslx32" or target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
     if not ((machine == elf.machine()) or is_32):
         package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
                  (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
diff --git a/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass b/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
index c7b33d9..09793fc 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
@@ -14,7 +14,7 @@
                parisc s390  v850 \
                avr32 blackfin \
                microblaze \
-               nios2 arc xtensa"
+               nios2 arc riscv xtensa"
 
 def map_kernel_arch(a, d):
     import re
@@ -28,6 +28,7 @@
     elif re.match('aarch64_ilp32$', a):         return 'arm64'
     elif re.match('aarch64_be_ilp32$', a):      return 'arm64'
     elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a):      return 'mips'
+    elif re.match('riscv(32|64|)(eb|)$', a):    return 'riscv'
     elif re.match('p(pc|owerpc)(|64)', a):      return 'powerpc'
     elif re.match('sh(3|4)$', a):               return 'sh'
     elif re.match('bfin', a):                   return 'blackfin'
@@ -58,7 +59,7 @@
 TARGET_AR_KERNEL_ARCH ?= ""
 HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
 
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd"
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}"
 KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
 KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
 TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass b/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass
index 6e08be4..4f80cc6 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-devicetree.bbclass
@@ -1,10 +1,10 @@
 # Support for device tree generation
 PACKAGES_append = " \
-    kernel-devicetree \
-    ${@['kernel-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \
+    ${KERNEL_PACKAGE_NAME}-devicetree \
+    ${@[d.getVar('KERNEL_PACKAGE_NAME') + '-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \
 "
-FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
-FILES_kernel-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
+FILES_${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
+FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
 KERNEL_DEVICETREE_BUNDLE ?= "0"
diff --git a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
index 9baf399..50a91e1 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
@@ -14,6 +14,8 @@
             replacementtype = "vmlinuz.bin"
         elif uarch == "x86":
             replacementtype = "bzImage"
+        elif uarch == "microblaze":
+            replacementtype = "linux.bin"
         else:
             replacementtype = "zImage"
 
@@ -100,7 +102,7 @@
 
 	kernel_csum="sha1"
 
-	ENTRYPOINT=${UBOOT_ENTRYPOINT}
+	ENTRYPOINT="${UBOOT_ENTRYPOINT}"
 	if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
 		ENTRYPOINT=`${HOST_PREFIX}nm vmlinux | \
 			awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
diff --git a/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass b/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
index 1035525..67ab416 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
@@ -30,7 +30,7 @@
 
 PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
 
-KERNEL_MODULES_META_PACKAGE ?= "kernel-modules"
+KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules"
 
 KERNEL_MODULE_PACKAGE_PREFIX ?= ""
 KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}"
@@ -129,16 +129,19 @@
            postfix = format.split('%s')[1]
            d.setVar('RPROVIDES_' + pkg, pkg.replace(postfix, ''))
 
+    kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
+    kernel_version = d.getVar("KERNEL_VERSION")
+
     module_regex = '^(.*)\.k?o$'
 
     module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
     module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
-    module_pattern = module_pattern_prefix + 'kernel-module-%s' + module_pattern_suffix
+    module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
 
     postinst = d.getVar('pkg_postinst_modules')
     postrm = d.getVar('pkg_postrm_modules')
 
-    modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION")))
+    modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
     if modules:
         metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
         d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
diff --git a/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass b/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
index 663c655..4ac3a39 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
@@ -247,6 +247,7 @@
 		fi
 		rm -f .gitignore
 		git init
+		check_git_config
 		git add .
 		git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
 		git clean -d -f
diff --git a/import-layers/yocto-poky/meta/classes/kernel.bbclass b/import-layers/yocto-poky/meta/classes/kernel.bbclass
index 14f41e9..78d6c30 100644
--- a/import-layers/yocto-poky/meta/classes/kernel.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel.bbclass
@@ -1,7 +1,10 @@
 inherit linux-kernel-base kernel-module-split
 
-PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native"
+KERNEL_PACKAGE_NAME ??= "kernel"
+KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
+
+PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
 PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
 
 do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"
@@ -34,11 +37,32 @@
 KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}"
 
 python __anonymous () {
+    pn = d.getVar("PN")
+    kpn = d.getVar("KERNEL_PACKAGE_NAME")
+
+    # XXX Remove this after bug 11905 is resolved
+    #  FILES_${KERNEL_PACKAGE_NAME}-dev doesn't expand correctly
+    if kpn == pn:
+        bb.warn("Some packages (E.g. *-dev) might be missing due to "
+                "bug 11905 (variable KERNEL_PACKAGE_NAME == PN)")
+
+    # The default kernel recipe builds in a shared location defined by
+    # bitbake/distro confs: STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR.
+    # Set these variables to directories under ${WORKDIR} in alternate
+    # kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they
+    # may build in parallel with the default kernel without clobbering.
+    if kpn != "kernel":
+        workdir = d.getVar("WORKDIR")
+        sourceDir = os.path.join(workdir, 'kernel-source')
+        artifactsDir = os.path.join(workdir, 'kernel-build-artifacts')
+        d.setVar("STAGING_KERNEL_DIR", sourceDir)
+        d.setVar("STAGING_KERNEL_BUILDDIR", artifactsDir)
 
     # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES
     type = d.getVar('KERNEL_IMAGETYPE') or ""
     alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or ""
     types = d.getVar('KERNEL_IMAGETYPES') or ""
+    kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
     if type not in types.split():
         types = (type + ' ' + types).strip()
     if alttype not in types.split():
@@ -55,15 +79,15 @@
         typelower = type.lower()
         imagedest = d.getVar('KERNEL_IMAGEDEST')
 
-        d.appendVar('PACKAGES', ' ' + 'kernel-image-' + typelower)
+        d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
 
-        d.setVar('FILES_kernel-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
+        d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
 
-        d.appendVar('RDEPENDS_kernel-image', ' ' + 'kernel-image-' + typelower)
+        d.appendVar('RDEPENDS_%s-image' % kname, ' %s-image-%s' % (kname, typelower))
 
-        d.setVar('PKG_kernel-image-' + typelower, 'kernel-image-' + typelower + '-${KERNEL_VERSION_PKG_NAME}')
+        d.setVar('PKG_%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
 
-        d.setVar('ALLOW_EMPTY_kernel-image-' + typelower, '1')
+        d.setVar('ALLOW_EMPTY_%s-image-%s' % (kname, typelower), '1')
 
     image = d.getVar('INITRAMFS_IMAGE')
     if image:
@@ -121,12 +145,13 @@
 
 inherit kernel-arch deploy
 
-PACKAGES_DYNAMIC += "^kernel-module-.*"
-PACKAGES_DYNAMIC += "^kernel-image-.*"
-PACKAGES_DYNAMIC += "^kernel-firmware-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-module-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-image-.*"
+PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*"
 
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
+export KBUILD_BUILD_VERSION = "1"
 export KBUILD_BUILD_USER = "oe-user"
 export KBUILD_BUILD_HOST = "oe-host"
 
@@ -207,7 +232,7 @@
 		copy_initramfs
 		# Backing up kernel image relies on its type(regular file or symbolic link)
 		tmp_path=""
-		for type in ${KERNEL_IMAGETYPES} ; do
+		for type in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
 			if [ -h ${KERNEL_OUTPUT_DIR}/$type ] ; then
 				linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$type`
 				realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$type`
@@ -255,7 +280,7 @@
 
 kernel_do_compile() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
-	if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+	if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
 		# kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not
 		# be set....
 		if [ "$SOURCE_DATE_EPOCH" = "0" ]; then
@@ -339,7 +364,9 @@
 	install -d ${D}/boot
 	for type in ${KERNEL_IMAGETYPES} ; do
 		install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${D}/${KERNEL_IMAGEDEST}/${type}-${KERNEL_VERSION}
-		ln -sf ${type}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${type}
+		if [ "${KERNEL_PACKAGE_NAME}" = "kernel" ]; then
+			ln -sf ${type}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${type}
+		fi
 	done
 	install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
 	install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
@@ -393,13 +420,14 @@
 
 emit_depmod_pkgdata() {
 	# Stash data for depmod
-	install -d ${PKGDESTWORK}/kernel-depmod/
-	echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion
-	cp ${B}/System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION}
+	install -d ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/
+	echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/${KERNEL_PACKAGE_NAME}-abiversion
+	cp ${B}/System.map ${PKGDESTWORK}/${KERNEL_PACKAGE_NAME}-depmod/System.map-${KERNEL_VERSION}
 }
 
 PACKAGEFUNCS += "emit_depmod_pkgdata"
 
+do_shared_workdir[cleandirs] += " ${STAGING_KERNEL_BUILDDIR}"
 do_shared_workdir () {
 	cd ${B}
 
@@ -410,7 +438,7 @@
 	# Store the kernel version in sysroots for module-base.bbclass
 	#
 
-	echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
+	echo "${KERNEL_VERSION}" > $kerneldir/${KERNEL_PACKAGE_NAME}-abiversion
 
 	# Copy files required for module builds
 	cp System.map $kerneldir/System.map-${KERNEL_VERSION}
@@ -439,8 +467,10 @@
 	# arch/powerpc/lib/crtsavres.o which is present in
 	# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
 	if [ ${ARCH} = "powerpc" ]; then
-		mkdir -p $kerneldir/arch/powerpc/lib/
-		cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+		if [ -e arch/powerpc/lib/crtsavres.o ]; then
+			mkdir -p $kerneldir/arch/powerpc/lib/
+			cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+		fi
 	fi
 
 	if [ -d include/generated ]; then
@@ -459,7 +489,7 @@
 	:
 }
 
-KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
+KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig"
 
 python check_oldest_kernel() {
     oldest_kernel = d.getVar('OLDEST_KERNEL')
@@ -504,32 +534,34 @@
 
 inherit cml1
 
+KCONFIG_CONFIG_COMMAND_append = " HOSTLDFLAGS='${BUILD_LDFLAGS}'"
+
 EXPORT_FUNCTIONS do_compile do_install do_configure
 
 # kernel-base becomes kernel-${KERNEL_VERSION}
 # kernel-image becomes kernel-image-${KERNEL_VERSION}
-PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-modules"
+PACKAGES = "${KERNEL_PACKAGE_NAME} ${KERNEL_PACKAGE_NAME}-base ${KERNEL_PACKAGE_NAME}-vmlinux ${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-dev ${KERNEL_PACKAGE_NAME}-modules"
 FILES_${PN} = ""
-FILES_kernel-base = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin"
-FILES_kernel-image = ""
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
-FILES_kernel-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
-FILES_kernel-modules = ""
-RDEPENDS_kernel = "kernel-base"
+FILES_${KERNEL_PACKAGE_NAME}-base = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin"
+FILES_${KERNEL_PACKAGE_NAME}-image = ""
+FILES_${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
+FILES_${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
+FILES_${KERNEL_PACKAGE_NAME}-modules = ""
+RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base"
 # Allow machines to override this dependency if kernel image files are
 # not wanted in images as standard
-RDEPENDS_kernel-base ?= "kernel-image"
-PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
-RDEPENDS_kernel-image += "${@base_conditional('KERNEL_IMAGETYPE', 'vmlinux', 'kernel-vmlinux', '', d)}"
-PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
-RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
-ALLOW_EMPTY_kernel = "1"
-ALLOW_EMPTY_kernel-base = "1"
-ALLOW_EMPTY_kernel-image = "1"
-ALLOW_EMPTY_kernel-modules = "1"
-DESCRIPTION_kernel-modules = "Kernel modules meta package"
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image"
+PKG_${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}"
+PKG_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RPROVIDES_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME} = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-base = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-image = "1"
+ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-modules = "1"
+DESCRIPTION_${KERNEL_PACKAGE_NAME}-modules = "Kernel modules meta package"
 
-pkg_postinst_kernel-base () {
+pkg_postinst_${KERNEL_PACKAGE_NAME}-base () {
 	if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
 		mkdir -p $D/lib/modules/${KERNEL_VERSION}
 	fi
@@ -543,7 +575,7 @@
 PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
 
 python split_kernel_packages () {
-    do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
+    do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
@@ -634,21 +666,27 @@
 MODULE_TARBALL_DEPLOY ?= "1"
 
 kernel_do_deploy() {
+	deployDir="${DEPLOYDIR}"
+	if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then
+		deployDir="${DEPLOYDIR}/${KERNEL_DEPLOYSUBDIR}"
+		mkdir "$deployDir"
+	fi
+
 	for type in ${KERNEL_IMAGETYPES} ; do
 		base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
-		install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${DEPLOYDIR}/${base_name}.bin
+		install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} $deployDir/${base_name}.bin
 	done
 	if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
 		mkdir -p ${D}/lib
-		tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
-		ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
+		tar -cvzf $deployDir/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
+		ln -sf ${MODULE_TARBALL_BASE_NAME} $deployDir/${MODULE_TARBALL_SYMLINK_NAME}
 	fi
 
 	for type in ${KERNEL_IMAGETYPES} ; do
 		base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
 		symlink_name=${type}-${KERNEL_IMAGE_SYMLINK_NAME}
-		ln -sf ${base_name}.bin ${DEPLOYDIR}/${symlink_name}.bin
-		ln -sf ${base_name}.bin ${DEPLOYDIR}/${type}
+		ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin
+		ln -sf ${base_name}.bin $deployDir/${type}
 	done
 
 	cd ${B}
@@ -658,8 +696,8 @@
 			echo "Copying deploy ${type} kernel-initramfs image and setting up links..."
 			initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
 			initramfs_symlink_name=${type}-initramfs-${MACHINE}
-			install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
-			ln -sf ${initramfs_base_name}.bin ${DEPLOYDIR}/${initramfs_symlink_name}.bin
+			install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin
+			ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin
 		fi
 	done
 }
diff --git a/import-layers/yocto-poky/meta/classes/libc-package.bbclass b/import-layers/yocto-poky/meta/classes/libc-package.bbclass
index 739adce..2e7cd25 100644
--- a/import-layers/yocto-poky/meta/classes/libc-package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/libc-package.bbclass
@@ -113,9 +113,9 @@
         bb.error("datadir not defined")
         return
 
-    gconv_libdir = base_path_join(libdir, "gconv")
-    charmap_dir = base_path_join(datadir, "i18n", "charmaps")
-    locales_dir = base_path_join(datadir, "i18n", "locales")
+    gconv_libdir = oe.path.join(libdir, "gconv")
+    charmap_dir = oe.path.join(datadir, "i18n", "charmaps")
+    locales_dir = oe.path.join(datadir, "i18n", "locales")
     binary_locales_dir = d.getVar('localedir')
 
     def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group):
@@ -189,7 +189,7 @@
 
     # Read in supported locales and associated encodings
     supported = {}
-    with open(base_path_join(d.getVar('WORKDIR'), "SUPPORTED")) as f:
+    with open(oe.path.join(d.getVar('WORKDIR'), "SUPPORTED")) as f:
         for line in f.readlines():
             try:
                 locale, charset = line.rstrip().split()
@@ -231,12 +231,12 @@
     commands = {}
 
     def output_locale_binary(name, pkgname, locale, encoding):
-        treedir = base_path_join(d.getVar("WORKDIR"), "locale-tree")
-        ldlibdir = base_path_join(treedir, d.getVar("base_libdir"))
+        treedir = oe.path.join(d.getVar("WORKDIR"), "locale-tree")
+        ldlibdir = oe.path.join(treedir, d.getVar("base_libdir"))
         path = d.getVar("PATH")
-        i18npath = base_path_join(treedir, datadir, "i18n")
-        gconvpath = base_path_join(treedir, "iconvdata")
-        outputpath = base_path_join(treedir, binary_locales_dir)
+        i18npath = oe.path.join(treedir, datadir, "i18n")
+        gconvpath = oe.path.join(treedir, "iconvdata")
+        outputpath = oe.path.join(treedir, binary_locales_dir)
 
         use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF") or "0"
         if use_cross_localedef == "1":
@@ -344,7 +344,7 @@
         d.appendVar('RDEPENDS_%s' % metapkg, ' ' + pkg)
 
     if use_bin == "compile":
-        makefile = base_path_join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
+        makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
         m = open(makefile, "w")
         m.write("all: %s\n\n" % " ".join(commands.keys()))
         for cmd in commands:
diff --git a/import-layers/yocto-poky/meta/classes/license.bbclass b/import-layers/yocto-poky/meta/classes/license.bbclass
index d353110..06dd4a8 100644
--- a/import-layers/yocto-poky/meta/classes/license.bbclass
+++ b/import-layers/yocto-poky/meta/classes/license.bbclass
@@ -226,9 +226,7 @@
     # The manifest file name contains the arch. Because we are not running
     # in the recipe context it is necessary to check every arch used.
     sstate_manifest_dir = d.getVar("SSTATE_MANIFESTS")
-    sstate_archs = d.getVar("SSTATE_ARCHS")
-    extra_archs = d.getVar("PACKAGE_EXTRA_ARCHS")
-    archs = list(set(("%s %s" % (sstate_archs, extra_archs)).split()))
+    archs = list(set(d.getVar("SSTATE_ARCHS").split()))
     for dep in depends:
         # Some recipes have an arch on their own, so we try that first.
         special_arch = d.getVar("PACKAGE_ARCH_pn-%s" % dep)
@@ -336,7 +334,7 @@
     files = d.getVar('LICENSE_FILES_DIRECTORY')
     pn = d.getVar('PN')
     pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX', False))
-    if pn_lic in packages:
+    if pn_lic in packages.split():
         bb.warn("%s package already existed in %s." % (pn_lic, pn))
     else:
         # first in PACKAGES to be sure that nothing else gets LICENSE_FILES_DIRECTORY
diff --git a/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass b/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
index e1d8b18..68105d9 100644
--- a/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
+++ b/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
@@ -32,19 +32,16 @@
 inherit ${EFI_CLASS}
 inherit ${PCBIOS_CLASS}
 
-KERNEL_IMAGETYPE ??= "bzImage"
-VM_DEFAULT_KERNEL ??= "${KERNEL_IMAGETYPE}"
-
 populate_kernel() {
 	dest=$1
 	install -d $dest
 
 	# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
-	bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} as $dest/vmlinuz"
-	if [ -e ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} ]; then
-		install -m 0644 ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} $dest/vmlinuz
+	bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} as $dest/${KERNEL_IMAGETYPE}"
+	if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then
+		install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/${KERNEL_IMAGETYPE}
 	else
-		bbwarn "${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} doesn't exist"
+		bbwarn "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} doesn't exist"
 	fi
 
 	# initrd is made of concatenation of multiple filesystem images
diff --git a/import-layers/yocto-poky/meta/classes/logging.bbclass b/import-layers/yocto-poky/meta/classes/logging.bbclass
index 06c7c31..a0c94e9 100644
--- a/import-layers/yocto-poky/meta/classes/logging.bbclass
+++ b/import-layers/yocto-poky/meta/classes/logging.bbclass
@@ -86,7 +86,7 @@
 	
 	# Strip off the debug level and ensure it is an integer
 	DBGLVL=$1; shift
-	NONDIGITS=$(echo "$DBGLVL" | tr -d [:digit:])
+	NONDIGITS=$(echo "$DBGLVL" | tr -d "[:digit:]")
 	if [ "$NONDIGITS" ]; then
 		bbfatal "$USAGE"
 	fi
diff --git a/import-layers/yocto-poky/meta/classes/meson.bbclass b/import-layers/yocto-poky/meta/classes/meson.bbclass
new file mode 100644
index 0000000..2d7ee4f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/meson.bbclass
@@ -0,0 +1,130 @@
+inherit python3native
+
+DEPENDS_append = " meson-native ninja-native"
+
+# As Meson enforces out-of-tree builds we can just use cleandirs
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+# Where the meson.build build configuration is
+MESON_SOURCEPATH = "${S}"
+
+def noprefix(var, d):
+    return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
+
+MESONOPTS = " --prefix ${prefix} \
+              --buildtype plain \
+              --bindir ${@noprefix('bindir', d)} \
+              --sbindir ${@noprefix('sbindir', d)} \
+              --datadir ${@noprefix('datadir', d)} \
+              --libdir ${@noprefix('libdir', d)} \
+              --libexecdir ${@noprefix('libexecdir', d)} \
+              --includedir ${@noprefix('includedir', d)} \
+              --mandir ${@noprefix('mandir', d)} \
+              --infodir ${@noprefix('infodir', d)} \
+              --sysconfdir ${sysconfdir} \
+              --localstatedir ${localstatedir} \
+              --sharedstatedir ${sharedstatedir}"
+
+MESON_TOOLCHAIN_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}"
+MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}"
+MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}"
+
+# both are required but not used by meson
+MESON_HOST_ENDIAN = "bogus-endian"
+MESON_TARGET_ENDIAN = "bogus-endian"
+
+EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
+
+MESON_CROSS_FILE = ""
+MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
+
+def meson_array(var, d):
+    return "', '".join(d.getVar(var).split()).join(("'", "'"))
+
+addtask write_config before do_configure
+do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF"
+do_write_config() {
+    # This needs to be Py to split the args into single-element lists
+    cat >${WORKDIR}/meson.cross <<EOF
+[binaries]
+c = [${@meson_array('CC', d)}]
+cpp = [${@meson_array('CXX', d)}]
+ar = [${@meson_array('AR', d)}]
+nm = [${@meson_array('NM', d)}]
+ld = [${@meson_array('LD', d)}]
+strip = [${@meson_array('STRIP', d)}]
+readelf = [${@meson_array('READELF', d)}]
+pkgconfig = 'pkg-config'
+
+[properties]
+needs_exe_wrapper = true
+c_args = [${@meson_array('MESON_C_ARGS', d)}]
+c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
+cpp_args = [${@meson_array('MESON_CPP_ARGS', d)}]
+cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
+gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
+
+[host_machine]
+system = '${HOST_OS}'
+cpu_family = '${HOST_ARCH}'
+cpu = '${HOST_ARCH}'
+endian = '${MESON_HOST_ENDIAN}'
+
+[target_machine]
+system = '${TARGET_OS}'
+cpu_family = '${TARGET_ARCH}'
+cpu = '${TARGET_ARCH}'
+endian = '${MESON_TARGET_ENDIAN}'
+EOF
+}
+
+CONFIGURE_FILES = "meson.build"
+
+meson_do_configure() {
+    if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
+        cat ${B}/meson-logs/meson-log.txt
+        bbfatal_log meson failed
+    fi
+}
+
+meson_do_configure_prepend_class-target() {
+    # Set these so that meson uses the native tools for its build sanity tests,
+    # which require executables to be runnable. The cross file will still
+    # override these for the target build. Note that we do *not* set CFLAGS,
+    # LDFLAGS, etc. as they will be slurped in by meson and applied to the
+    # target build, causing errors.
+    export CC="${BUILD_CC}"
+    export CXX="${BUILD_CXX}"
+    export LD="${BUILD_LD}"
+    export AR="${BUILD_AR}"
+}
+
+meson_do_configure_prepend_class-nativesdk() {
+    # Set these so that meson uses the native tools for its build sanity tests,
+    # which require executables to be runnable. The cross file will still
+    # override these for the nativesdk build. Note that we do *not* set CFLAGS,
+    # LDFLAGS, etc. as they will be slurped in by meson and applied to the
+    # nativesdk build, causing errors.
+    export CC="${BUILD_CC}"
+    export CXX="${BUILD_CXX}"
+    export LD="${BUILD_LD}"
+    export AR="${BUILD_AR}"
+}
+
+meson_do_configure_prepend_class-native() {
+    export PKG_CONFIG="pkg-config-native"
+}
+
+do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
+meson_do_compile() {
+    ninja ${PARALLEL_MAKE}
+}
+
+meson_do_install() {
+    DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
+}
+
+EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/import-layers/yocto-poky/meta/classes/mirrors.bbclass b/import-layers/yocto-poky/meta/classes/mirrors.bbclass
index 766f1cb..b331afc 100644
--- a/import-layers/yocto-poky/meta/classes/mirrors.bbclass
+++ b/import-layers/yocto-poky/meta/classes/mirrors.bbclass
@@ -67,7 +67,7 @@
 # where git native protocol fetches may fail due to local firewall rules, etc.
 
 MIRRORS += "\
-git://anonscm.debian.org/.*   git://anonscm.debian.org/git/PATH;protocol=https \n \
+git://salsa.debian.org/.*     git://salsa.debian.org/PATH;protocol=https \n \
 git://git.gnome.org/.*        git://git.gnome.org/browse/PATH;protocol=https \n \
 git://git.savannah.gnu.org/.* git://git.savannah.gnu.org/git/PATH;protocol=https \n \
 git://git.yoctoproject.org/.* git://git.yoctoproject.org/git/PATH;protocol=https \n \
diff --git a/import-layers/yocto-poky/meta/classes/module-base.bbclass b/import-layers/yocto-poky/meta/classes/module-base.bbclass
index 6fe77c0..27bd69f 100644
--- a/import-layers/yocto-poky/meta/classes/module-base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/module-base.bbclass
@@ -1,7 +1,8 @@
 inherit kernel-arch
 
-# This is instead of DEPENDS = "virtual/kernel"
-do_configure[depends] += "virtual/kernel:do_compile_kernelmodules"
+# We do the dependency this way because the output is not preserved
+# in sstate, so we must force do_compile to run (once).
+do_configure[depends] += "make-mod-scripts:do_compile"
 
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
@@ -12,16 +13,9 @@
 # we didn't pick the name.
 export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}"
 
-export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
+export KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
 KERNEL_OBJECT_SUFFIX = ".ko"
 
 # kernel modules are generally machine specific
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-# Function to ensure the kernel scripts are created. Expected to
-# be called before do_compile. See module.bbclass for an example.
-do_make_scripts() {
-	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 
-	make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
-	           -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts
-}
diff --git a/import-layers/yocto-poky/meta/classes/module.bbclass b/import-layers/yocto-poky/meta/classes/module.bbclass
index 78d1b21..e344960 100644
--- a/import-layers/yocto-poky/meta/classes/module.bbclass
+++ b/import-layers/yocto-poky/meta/classes/module.bbclass
@@ -1,9 +1,5 @@
 inherit module-base kernel-module-split pkgconfig
 
-addtask make_scripts after do_prepare_recipe_sysroot before do_configure
-do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
-do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"
-
 EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
 
 MODULES_INSTALL_TARGET ?= "modules_install"
diff --git a/import-layers/yocto-poky/meta/classes/multilib.bbclass b/import-layers/yocto-poky/meta/classes/multilib.bbclass
index 816f54e..519c1a5 100644
--- a/import-layers/yocto-poky/meta/classes/multilib.bbclass
+++ b/import-layers/yocto-poky/meta/classes/multilib.bbclass
@@ -11,8 +11,8 @@
     # There should only be one kernel in multilib configs
     # We also skip multilib setup for module packages.
     provides = (e.data.getVar("PROVIDES") or "").split()
-    if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data):
-        raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
+    if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data) or "make-mod-scripts" in e.data.getVar("PN"):
+        raise bb.parse.SkipRecipe("We shouldn't have multilib variants for the kernel")
 
     save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME") or ""
     for name in save_var_name.split():
@@ -41,13 +41,13 @@
         return
 
     if bb.data.inherits_class('native', e.data):
-        raise bb.parse.SkipPackage("We can't extend native recipes")
+        raise bb.parse.SkipRecipe("We can't extend native recipes")
 
     if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
-        raise bb.parse.SkipPackage("We can't extend nativesdk recipes")
+        raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
     if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
-        raise bb.parse.SkipPackage("Don't extend allarch recipes which are not packagegroups")
+        raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
 
     # Expand this since this won't work correctly once we set a multilib into place
@@ -76,7 +76,6 @@
     newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
     if newtune:
         e.data.setVar("DEFAULTTUNE", newtune)
-        e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
 }
 
 addhandler multilib_virtclass_handler
@@ -100,8 +99,8 @@
         d.setVar("LINGUAS_INSTALL", "")
         # FIXME, we need to map this to something, not delete it!
         d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "")
-
-    if bb.data.inherits_class('image', d):
+        bb.build.deltask('do_populate_sdk', d)
+        bb.build.deltask('do_populate_sdk_ext', d)
         return
 
     clsextend.map_depends_variable("DEPENDS")
@@ -115,7 +114,6 @@
 
     clsextend.map_packagevars()
     clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
-    clsextend.map_variable("PACKAGE_INSTALL")
     clsextend.map_variable("INITSCRIPT_PACKAGES")
     clsextend.map_variable("USERADD_PACKAGES")
     clsextend.map_variable("SYSTEMD_PACKAGES")
diff --git a/import-layers/yocto-poky/meta/classes/multilib_global.bbclass b/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
index fd0bfe1..d2ec1ad 100644
--- a/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
+++ b/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
@@ -13,11 +13,14 @@
 
     versions = []
     providers = []
+    rproviders = []
     for v in d.keys():
         if v.startswith("PREFERRED_VERSION_"):
             versions.append(v)
         if v.startswith("PREFERRED_PROVIDER_"):
             providers.append(v)
+        if v.startswith("PREFERRED_RPROVIDER_"):
+            rproviders.append(v)
 
     for v in versions:
         val = d.getVar(v, False)
@@ -91,6 +94,29 @@
         if prov != provexp and d.getVar(prov, False):
             d.renameVar(prov, provexp)
 
+    for prov in rproviders:
+        val = d.getVar(prov, False)
+        pkg = prov.replace("PREFERRED_RPROVIDER_", "")
+        for p in prefixes:
+            newval = p + "-" + val
+
+            # implement variable keys
+            localdata = bb.data.createCopy(d)
+            override = ":virtclass-multilib-" + p
+            localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+            newname = localdata.expand(prov)
+            if newname != prov and not d.getVar(newname, False):
+                d.setVar(newname, localdata.expand(newval))
+
+            # implement alternative multilib name
+            newname = localdata.expand("PREFERRED_RPROVIDER_" + p + "-" + pkg)
+            if not d.getVar(newname, False) and newval != None:
+                d.setVar(newname, localdata.expand(newval))
+        # Avoid future variable key expansion
+        provexp = d.expand(prov)
+        if prov != provexp and d.getVar(prov, False):
+            d.renameVar(prov, provexp)
+
     def translate_provide(prefix, prov):
         if not prov.startswith("virtual/"):
             return prefix + "-" + prov
@@ -162,7 +188,7 @@
             if rprovs.strip():
                 e.data.setVar("RPROVIDES", rprovs)
 
-	    # Process RPROVIDES_${PN}...
+            # Process RPROVIDES_${PN}...
             for pkg in (e.data.getVar("PACKAGES") or "").split():
                 origrprovs = rprovs = e.data.getVar("RPROVIDES_%s" % pkg) or ""
                 for clsextend in clsextends:
diff --git a/import-layers/yocto-poky/meta/classes/native.bbclass b/import-layers/yocto-poky/meta/classes/native.bbclass
index 9c434dc..a911f2a 100644
--- a/import-layers/yocto-poky/meta/classes/native.bbclass
+++ b/import-layers/yocto-poky/meta/classes/native.bbclass
@@ -52,8 +52,6 @@
 # native pkg doesn't need the TOOLCHAIN_OPTIONS.
 TOOLCHAIN_OPTIONS = ""
 
-DEPENDS_GETTEXT = "gettext-native"
-
 # Don't build ptest natively
 PTEST_ENABLED = "0"
 
diff --git a/import-layers/yocto-poky/meta/classes/npm.bbclass b/import-layers/yocto-poky/meta/classes/npm.bbclass
index a69bedb..c351ff0 100644
--- a/import-layers/yocto-poky/meta/classes/npm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/npm.bbclass
@@ -2,7 +2,15 @@
 RDEPENDS_${PN}_prepend = "nodejs "
 S = "${WORKDIR}/npmpkg"
 
-NPM_INSTALLDIR = "${D}${libdir}/node_modules/${PN}"
+def node_pkgname(d):
+    bpn = d.getVar('BPN')
+    if bpn.startswith("node-"):
+        return bpn[5:]
+    return bpn
+
+NPMPN ?= "${@node_pkgname(d)}"
+
+NPM_INSTALLDIR = "${D}${libdir}/node_modules/${NPMPN}"
 
 # function maps arch names to npm arch names
 def npm_oe_arch_map(target_arch, d):
@@ -31,7 +39,7 @@
 	fi
 	npm set cache ${WORKDIR}/npm_cache
 	# clear cache before every build
-	npm cache clear
+	npm cache clear --force
 	# Install pkg into ${S} without going to the registry
 	if [  "${NPM_INSTALL_DEV}" = "1" ]; then
 		npm --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --no-registry install
@@ -45,7 +53,8 @@
 	# be created in this directory
 	export HOME=${WORKDIR}
 	mkdir -p ${NPM_INSTALLDIR}/
-	npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry
+	npm pack .
+	npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPMPN}-${PV}.tgz
 	if [ -d ${D}${prefix}/etc ] ; then
 		# This will be empty
 		rmdir ${D}${prefix}/etc
@@ -53,13 +62,13 @@
 }
 
 python populate_packages_prepend () {
-    instdir = d.expand('${D}${libdir}/node_modules/${PN}')
+    instdir = d.expand('${D}${libdir}/node_modules/${NPMPN}')
     extrapackages = oe.package.npm_split_package_dirs(instdir)
     pkgnames = extrapackages.keys()
     d.prependVar('PACKAGES', '%s ' % ' '.join(pkgnames))
     for pkgname in pkgnames:
         pkgrelpath, pdata = extrapackages[pkgname]
-        pkgpath = '${libdir}/node_modules/${PN}/' + pkgrelpath
+        pkgpath = '${libdir}/node_modules/${NPMPN}/' + pkgrelpath
         # package names can't have underscores but npm packages sometimes use them
         oe_pkg_name = pkgname.replace('_', '-')
         expanded_pkgname = d.expand(oe_pkg_name)
@@ -75,7 +84,7 @@
 }
 
 FILES_${PN} += " \
-    ${libdir}/node_modules/${PN} \
+    ${libdir}/node_modules/${NPMPN} \
 "
 
 EXPORT_FUNCTIONS do_compile do_install
diff --git a/import-layers/yocto-poky/meta/classes/package.bbclass b/import-layers/yocto-poky/meta/classes/package.bbclass
index 2053d46..edeffa9 100644
--- a/import-layers/yocto-poky/meta/classes/package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package.bbclass
@@ -26,7 +26,7 @@
 #    a list of affected files in FILER{PROVIDES,DEPENDS}FLIST_pkg
 #
 # h) package_do_shlibs - Look at the shared libraries generated and autotmatically add any
-#    depenedencies found. Also stores the package name so anyone else using this library
+#    dependencies found. Also stores the package name so anyone else using this library
 #    knows which package to depend on.
 #
 # i) package_do_pkgconfig - Keep track of which packages need and provide which .pc files
@@ -52,7 +52,8 @@
 ALL_MULTILIB_PACKAGE_ARCHS = "${@all_multilib_tune_values(d, 'PACKAGE_ARCHS')}"
 
 # rpm is used for the per-file dependency identification
-PACKAGE_DEPENDS += "rpm-native"
+# dwarfsrcfiles is used to determine the list of debug source files
+PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
 
 
 # If your postinstall can execute at rootfs creation time rather than on
@@ -334,6 +335,33 @@
 
     return False
 
+def parse_debugsources_from_dwarfsrcfiles_output(dwarfsrcfiles_output):
+    debugfiles = {}
+
+    for line in dwarfsrcfiles_output.splitlines():
+        if line.startswith("\t"):
+            debugfiles[os.path.normpath(line.split()[0])] = ""
+
+    return debugfiles.keys()
+
+def append_source_info(file, sourcefile, d, fatal=True):
+    cmd = "'dwarfsrcfiles' '%s'" % (file)
+    (retval, output) = oe.utils.getstatusoutput(cmd)
+    # 255 means a specific file wasn't fully parsed to get the debug file list, which is not a fatal failure
+    if retval != 0 and retval != 255:
+        msg = "dwarfsrcfiles failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")
+        if fatal:
+            bb.fatal(msg)
+        bb.note(msg)
+
+    debugsources = parse_debugsources_from_dwarfsrcfiles_output(output)
+    # filenames are null-separated - this is an artefact of the previous use
+    # of rpm's debugedit, which was writing them out that way, and the code elsewhere
+    # is still assuming that.
+    debuglistoutput = '\0'.join(debugsources) + '\0'
+    open(sourcefile, 'a').write(debuglistoutput)
+
+
 def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
     # Function to split a single file into two components, one is the stripped
     # target system binary, the other contains any debugging information. The
@@ -345,7 +373,6 @@
 
     dvar = d.getVar('PKGD')
     objcopy = d.getVar("OBJCOPY")
-    debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/debugedit")
 
     # We ignore kernel modules, we don't generate debug info files.
     if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -359,10 +386,7 @@
 
     # We need to extract the debug src information here...
     if debugsrcdir:
-        cmd = "'%s' -i -l '%s' '%s'" % (debugedit, sourcefile, file)
-        (retval, output) = oe.utils.getstatusoutput(cmd)
-        if retval:
-            bb.fatal("debugedit failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+        append_source_info(file, sourcefile, d)
 
     bb.utils.mkdirhier(os.path.dirname(debugfile))
 
@@ -383,7 +407,7 @@
     return 0
 
 def copydebugsources(debugsrcdir, d):
-    # The debug src information written out to sourcefile is further procecessed
+    # The debug src information written out to sourcefile is further processed
     # and copied to the destination here.
 
     import stat
@@ -393,7 +417,6 @@
         dvar = d.getVar('PKGD')
         strip = d.getVar("STRIP")
         objcopy = d.getVar("OBJCOPY")
-        debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
         workdir = d.getVar("WORKDIR")
         workparentdir = os.path.dirname(os.path.dirname(workdir))
         workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir)
@@ -633,7 +656,7 @@
     # __str__ can be used to print out an entry in the input format
     #
     # if fs_perms_entry.path is None:
-    #    an error occured
+    #    an error occurred
     # if fs_perms_entry.link, you can retrieve:
     #    fs_perms_entry.path = path
     #    fs_perms_entry.link = target of link
@@ -860,6 +883,7 @@
 
     dvar = d.getVar('PKGD')
     pn = d.getVar('PN')
+    targetos = d.getVar('TARGET_OS')
 
     oldcwd = os.getcwd()
     os.chdir(dvar)
@@ -901,7 +925,7 @@
     # 16 - kernel module
     def isELF(path):
         type = 0
-        ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
+        ret, result = oe.utils.getstatusoutput("file -b '%s'" % path)
 
         if ret:
             msg = "split_and_strip_files: 'file %s' failed" % path
@@ -919,6 +943,15 @@
                 type |= 8
         return type
 
+    def isStaticLib(path):
+        if path.endswith('.a') and not os.path.islink(path):
+            with open(path, 'rb') as fh:
+                # The magic must include the first slash to avoid
+                # matching golang static libraries
+                magic = b'!<arch>\x0a/'
+                start = fh.read(len(magic))
+                return start == magic
+        return False
 
     #
     # First lets figure out all of the files we may have to process ... do this only once!
@@ -926,9 +959,11 @@
     elffiles = {}
     symlinks = {}
     kernmods = []
+    staticlibs = []
     inodes = {}
     libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir"))
     baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir"))
+    skipfiles = (d.getVar("INHIBIT_PACKAGE_STRIP_FILES") or "").split()
     if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1' or \
             d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
         for root, dirs, files in cpath.walk(dvar):
@@ -937,6 +972,9 @@
                 if file.endswith(".ko") and file.find("/lib/modules/") != -1:
                     kernmods.append(file)
                     continue
+                if isStaticLib(file):
+                    staticlibs.append(file)
+                    continue
 
                 # Skip debug files
                 if debugappend and file.endswith(debugappend):
@@ -944,6 +982,9 @@
                 if debugdir and debugdir in os.path.dirname(file[len(dvar):]):
                     continue
 
+                if file in skipfiles:
+                    continue
+
                 try:
                     ltarget = cpath.realpath(file, dvar, False)
                     s = cpath.lstat(ltarget)
@@ -955,7 +996,7 @@
                     continue
                 if not s:
                     continue
-                # Check its an excutable
+                # Check its an executable
                 if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
                         or ((file.startswith(libdir) or file.startswith(baselibdir)) and (".so" in f or ".node" in f)):
                     # If it's a symlink, and points to an ELF file, we capture the readlink target
@@ -983,7 +1024,7 @@
                         #  b) Only strip any hardlinked file once (no races)
                         #  c) Track any hardlinks between files so that we can reconstruct matching debug file hardlinks
 
-                        # Use a reference of device ID and inode number to indentify files
+                        # Use a reference of device ID and inode number to identify files
                         file_reference = "%d_%d" % (s.st_dev, s.st_ino)
                         if file_reference in inodes:
                             os.unlink(file)
@@ -1012,6 +1053,10 @@
             # Only store off the hard link reference if we successfully split!
             splitdebuginfo(file, fpath, debugsrcdir, sourcefile, d)
 
+        if debugsrcdir and not targetos.startswith("mingw"):
+            for file in staticlibs:
+                append_source_info(file, sourcefile, d, fatal=False)
+
         # Hardlink our debug symbols to the other hardlink copies
         for ref in inodes:
             if len(inodes[ref]) == 1:
@@ -1105,7 +1150,7 @@
         d.setVar('FILES_%s' % src_package_name, '/usr/src/debug')
 
     # Sanity check PACKAGES for duplicates
-    # Sanity should be moved to sanity.bbclass once we have the infrastucture
+    # Sanity should be moved to sanity.bbclass once we have the infrastructure
     package_list = []
 
     for pkg in packages.split():
@@ -1303,6 +1348,36 @@
     from glob import glob
     import json
 
+    def process_postinst_on_target(pkg, mlprefix):
+        defer_fragment = """
+if [ -n "$D" ]; then
+    $INTERCEPT_DIR/postinst_intercept delay_to_first_boot %s mlprefix=%s
+    exit 0
+fi
+""" % (pkg, mlprefix)
+
+        postinst = d.getVar('pkg_postinst_%s' % pkg)
+        postinst_ontarget = d.getVar('pkg_postinst_ontarget_%s' % pkg)
+
+        if postinst_ontarget:
+            bb.debug(1, 'adding deferred pkg_postinst_ontarget() to pkg_postinst() for %s' % pkg)
+            if not postinst:
+                postinst = '#!/bin/sh\n'
+            postinst += defer_fragment
+            postinst += postinst_ontarget
+            d.setVar('pkg_postinst_%s' % pkg, postinst)
+
+    def add_set_e_to_scriptlets(pkg):
+        for scriptlet_name in ('pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm'):
+            scriptlet = d.getVar('%s_%s' % (scriptlet_name, pkg))
+            if scriptlet:
+                scriptlet_split = scriptlet.split('\n')
+                if scriptlet_split[0].startswith("#!"):
+                    scriptlet = scriptlet_split[0] + "\nset -e\n" + "\n".join(scriptlet_split[1:])
+                else:
+                    scriptlet = "set -e\n" + "\n".join(scriptlet_split[0:])
+            d.setVar('%s_%s' % (scriptlet_name, pkg), scriptlet)
+
     def write_if_exists(f, pkg, var):
         def encode(str):
             import codecs
@@ -1398,6 +1473,8 @@
         write_if_exists(sf, pkg, 'ALLOW_EMPTY')
         write_if_exists(sf, pkg, 'FILES')
         write_if_exists(sf, pkg, 'CONFFILES')
+        process_postinst_on_target(pkg, d.getVar("MLPREFIX"))
+        add_set_e_to_scriptlets(pkg)
         write_if_exists(sf, pkg, 'pkg_postinst')
         write_if_exists(sf, pkg, 'pkg_postrm')
         write_if_exists(sf, pkg, 'pkg_preinst')
@@ -1541,7 +1618,7 @@
     shlibswork_dir = d.getVar('SHLIBSWORKDIR')
 
     # Take shared lock since we're only reading, not writing
-    lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
+    lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
 
     def linux_so(file, needed, sonames, renames, pkgver):
         needs_ldconfig = False
@@ -1732,6 +1809,9 @@
     for pkg in packages.split():
         bb.debug(2, "calculating shlib requirements for %s" % pkg)
 
+        private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
+        private_libs = private_libs.split()
+
         deps = list()
         for n in needed[pkg]:
             # if n is in private libraries, don't try to search provider for it
@@ -1823,7 +1903,7 @@
                                 pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
 
     # Take shared lock since we're only reading, not writing
-    lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
+    lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
 
     for pkg in packages.split():
         pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
@@ -2156,11 +2236,9 @@
 do_package[vardeps] += "${PACKAGEBUILDPKGD} ${PACKAGESPLITFUNCS} ${PACKAGEFUNCS} ${@gen_packagevar(d)}"
 addtask package after do_install
 
-PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
 SSTATETASKS += "do_package"
 do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}"
 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
-do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
 do_package_setscene[dirs] = "${STAGING_DIR}"
 
 python do_package_setscene () {
@@ -2175,10 +2253,13 @@
 addtask packagedata before do_build after do_package
 
 SSTATETASKS += "do_packagedata"
+# PACKAGELOCK protects readers of PKGDATA_DIR against writes
+# whilst code is reading in do_package
+PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
 do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
 do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
-do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}"
-do_packagedata[stamp-extra-info] = "${MACHINE}"
+do_packagedata[sstate-lockfile] = "${PACKAGELOCK}"
+do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}"
 
 python do_packagedata_setscene () {
     sstate_setscene(d)
diff --git a/import-layers/yocto-poky/meta/classes/package_deb.bbclass b/import-layers/yocto-poky/meta/classes/package_deb.bbclass
index 5d29793..2e8d17d 100644
--- a/import-layers/yocto-poky/meta/classes/package_deb.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_deb.bbclass
@@ -230,9 +230,11 @@
             #   '>' = greater or equal
             # adjust these to the '<<' and '>>' equivalents
             #
-            for dep in var:
-                if '(' in dep:
-                    newdep = re.sub(r'[(:)]', '__', dep)
+            for dep in list(var.keys()):
+                if '(' in dep or '/' in dep:
+                    newdep = re.sub(r'[(:)/]', '__', dep)
+                    if newdep.startswith("__"):
+                        newdep = "A" + newdep
                     if newdep != dep:
                         var[newdep] = var[dep]
                         del var[dep]
diff --git a/import-layers/yocto-poky/meta/classes/package_ipk.bbclass b/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
index 6c1fdaa..a0b34fa 100644
--- a/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
@@ -8,7 +8,7 @@
 PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
 
 # Program to be used to build opkg packages
-OPKGBUILDCMD ??= "opkg-build"
+OPKGBUILDCMD ??= "opkg-build -Z xz"
 
 OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
 OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
@@ -307,7 +307,7 @@
 
 python () {
     if d.getVar('PACKAGES') != '':
-        deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
+        deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot xz-native:do_populate_sysroot'
         d.appendVarFlag('do_package_write_ipk', 'depends', deps)
         d.setVarFlag('do_package_write_ipk', 'fakeroot', "1")
 }
diff --git a/import-layers/yocto-poky/meta/classes/package_rpm.bbclass b/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
index a428d30..21ada34 100644
--- a/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
@@ -382,6 +382,12 @@
 
         # Gather special src/first package data
         if srcname == splitname:
+            archiving = d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and \
+                        bb.data.inherits_class('archiver', d)
+            if archiving and srclicense != splitlicense:
+                bb.warn("The SRPM produced may not have the correct overall source license in the License tag. This is due to the LICENSE for the primary package and SRPM conflicting.")
+
+            srclicense     = splitlicense
             srcrdepends    = splitrdepends
             srcrrecommends = splitrrecommends
             srcrsuggests   = splitrsuggests
@@ -421,8 +427,7 @@
             spec_preamble_bottom.append('Release: %s' % splitrelease)
         if srcepoch != splitepoch:
             spec_preamble_bottom.append('Epoch: %s' % splitepoch)
-        if srclicense != splitlicense:
-            spec_preamble_bottom.append('License: %s' % splitlicense)
+        spec_preamble_bottom.append('License: %s' % splitlicense)
         spec_preamble_bottom.append('Group: %s' % splitsection)
 
         if srccustomtagschunk != splitcustomtagschunk:
@@ -665,13 +670,15 @@
     cmd = rpmbuild
     cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
     cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
-    cmd = cmd + " --define '_builddir " + d.getVar('S') + "'"
+    cmd = cmd + " --define '_builddir " + d.getVar('B') + "'"
     cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
     cmd = cmd + " --define '_use_internal_dependency_generator 0'"
     cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
     cmd = cmd + " --define '_build_id_links none'"
     cmd = cmd + " --define '_binary_payload w6T.xzdio'"
     cmd = cmd + " --define '_source_payload w6T.xzdio'"
+    cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
+    cmd = cmd + " --define '_buildhost reproducible'"
     if perfiledeps:
         cmd = cmd + " --define '__find_requires " + outdepends + "'"
         cmd = cmd + " --define '__find_provides " + outprovides + "'"
diff --git a/import-layers/yocto-poky/meta/classes/packagegroup.bbclass b/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
index eea2e5b..d540d42 100644
--- a/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
+++ b/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
@@ -56,3 +56,4 @@
         bb.fatal("Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (%s) matches the entries enabled in DISTRO_FEATURES" % initman)
 }
 
+CVE_PRODUCT = ""
diff --git a/import-layers/yocto-poky/meta/classes/patch.bbclass b/import-layers/yocto-poky/meta/classes/patch.bbclass
index 8f35cb4..2fc6925 100644
--- a/import-layers/yocto-poky/meta/classes/patch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/patch.bbclass
@@ -26,9 +26,23 @@
 
 python patch_task_patch_prefunc() {
     # Prefunc for do_patch
-    func = d.getVar('BB_RUNTASK')
     srcsubdir = d.getVar('S')
 
+    workdir = os.path.abspath(d.getVar('WORKDIR'))
+    testsrcdir = os.path.abspath(srcsubdir)
+    if (testsrcdir + os.sep).startswith(workdir + os.sep):
+        # Double-check that either workdir or S or some directory in-between is a git repository
+        found = False
+        while testsrcdir != '/':
+            if os.path.exists(os.path.join(testsrcdir, '.git')):
+                found = True
+                break
+            if testsrcdir == workdir:
+                break
+            testsrcdir = os.path.dirname(testsrcdir)
+        if not found:
+            bb.fatal('PATCHTOOL = "git" set for source tree that is not a git repository. Refusing to continue as that may result in commits being made in your metadata repository.')
+
     patchdir = os.path.join(srcsubdir, 'patches')
     if os.path.exists(patchdir):
         if os.listdir(patchdir):
diff --git a/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass b/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
index 30fcefc..3da3507 100644
--- a/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
@@ -20,6 +20,9 @@
 SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'doc-pkgs', '', d)}"
 SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}'
 
+PACKAGE_ARCHS_append_task-populate-sdk = " sdk-provides-dummy-target"
+SDK_PACKAGE_ARCHS += "sdk-provides-dummy-${SDKPKGSUFFIX}"
+
 # List of locales to install, or "all" for all of them, or unset for none.
 SDKIMAGE_LINGUAS ?= "all"
 
@@ -37,12 +40,13 @@
 
 TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host packagegroup-cross-canadian-${MACHINE}"
 TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
-TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')}"
+TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} \
+                          ${@multilib_pkg_extend(d, 'target-sdk-provides-dummy')}"
 TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
 
 SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-SDK_DEPENDS = "virtual/fakeroot-native pixz-native cross-localedef-native"
+SDK_DEPENDS = "virtual/fakeroot-native xz-native cross-localedef-native ${MLPREFIX}qemuwrapper-cross"
 SDK_DEPENDS_append_libc-glibc = " nativesdk-glibc-locale"
 
 # We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
@@ -152,7 +156,7 @@
 do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
 do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}"
 do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}"
-do_populate_sdk[stamp-extra-info] = "${MACHINE}${SDKMACHINE}"
+do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}"
 
 fakeroot create_sdk_files() {
 	cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
@@ -221,7 +225,7 @@
 	# Package it up
 	mkdir -p ${SDKDEPLOYDIR}
 	cd ${SDK_OUTPUT}/${SDKPATH}
-	tar ${SDKTAROPTS} -cf - . | pixz > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
+	tar ${SDKTAROPTS} -cf - . | xz -T 0 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
 }
 
 fakeroot create_shar() {
diff --git a/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass b/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
index 2dd2123..e1bba49 100644
--- a/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
+++ b/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
@@ -162,18 +162,16 @@
         except FileNotFoundError:
             pass
         os.rename(sdkbasepath, temp_sdkbasepath)
+        cmdprefix = '. %s .; ' % conf_initpath
+        logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt'
         try:
-            cmdprefix = '. %s .; ' % conf_initpath
-            logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt'
-            try:
-                oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
-            except bb.process.ExecutionError as e:
-                msg = 'Failed to generate filtered task list for extensible SDK:\n%s' %  e.stdout.rstrip()
-                if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
-                    msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
-                bb.fatal(msg)
-        finally:
-            os.rename(temp_sdkbasepath, sdkbasepath)
+            oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
+        except bb.process.ExecutionError as e:
+            msg = 'Failed to generate filtered task list for extensible SDK:\n%s' %  e.stdout.rstrip()
+            if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
+                msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
+            bb.fatal(msg)
+        os.rename(temp_sdkbasepath, sdkbasepath)
         # Clean out residue of running bitbake, which check_sstate_task_list()
         # will effectively do
         clean_esdk_builddir(d, sdkbasepath)
@@ -535,7 +533,7 @@
 
 install_tools() {
 	install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}
-	scripts="devtool recipetool oe-find-native-sysroot runqemu*"
+	scripts="devtool recipetool oe-find-native-sysroot runqemu* wic"
 	for script in $scripts; do
 		for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} -maxdepth 1 -executable -name "$script"`; do
 			lnr ${scriptfn} ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/`basename $scriptfn`
@@ -724,6 +722,6 @@
 do_populate_sdk_ext[cleandirs] = "${SDKEXTDEPLOYDIR}"
 do_populate_sdk_ext[sstate-inputdirs] = "${SDKEXTDEPLOYDIR}"
 do_populate_sdk_ext[sstate-outputdirs] = "${SDK_DEPLOY}"
-do_populate_sdk_ext[stamp-extra-info] = "${MACHINE}"
+do_populate_sdk_ext[stamp-extra-info] = "${MACHINE_ARCH}"
 
 addtask populate_sdk_ext after do_sdk_depends
diff --git a/import-layers/yocto-poky/meta/classes/ptest-perl.bbclass b/import-layers/yocto-poky/meta/classes/ptest-perl.bbclass
new file mode 100644
index 0000000..a4bc40b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/ptest-perl.bbclass
@@ -0,0 +1,30 @@
+inherit ptest
+
+FILESEXTRAPATHS_prepend := "${COREBASE}/meta/files:"
+
+SRC_URI += "file://ptest-perl/run-ptest"
+
+do_install_ptest_perl() {
+	install -d ${D}${PTEST_PATH}
+	if [ ! -f ${D}${PTEST_PATH}/run-ptest ]; then
+		install -m 0755 ${WORKDIR}/ptest-perl/run-ptest ${D}${PTEST_PATH}
+	fi
+	cp -r ${B}/t ${D}${PTEST_PATH}
+	chown -R root:root ${D}${PTEST_PATH}
+}
+
+FILES_${PN}-ptest_prepend = "${PTEST_PATH}/t/* ${PTEST_PATH}/run-ptest "
+
+RDEPENDS_${PN}-ptest_prepend = "perl "
+
+addtask install_ptest_perl after do_install_ptest_base before do_package
+
+python () {
+    if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
+        d.setVarFlag('do_install_ptest_perl', 'fakeroot', '1')
+
+    # Remove all '*ptest_perl' tasks when ptest is not enabled
+    if not(d.getVar('PTEST_ENABLED') == "1"):
+        for i in ['do_install_ptest_perl']:
+            bb.build.deltask(i, d)
+}
diff --git a/import-layers/yocto-poky/meta/classes/reproducible_build.bbclass b/import-layers/yocto-poky/meta/classes/reproducible_build.bbclass
new file mode 100644
index 0000000..2df8053
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/reproducible_build.bbclass
@@ -0,0 +1,150 @@
+#
+# reproducible_build.bbclass
+#
+# This bbclass is mainly responsible to determine SOURCE_DATE_EPOCH on a per recipe base.
+# We need to set a recipe specific SOURCE_DATE_EPOCH in each recipe environment for various tasks.
+# One way would be to modify all recipes one-by-one to specify SOURCE_DATE_EPOCH explicitly, 
+# but that is not realistic as there are hundreds (probably thousands) of recipes in various meta-layers.
+# Therefore we do it this class. 
+# After sources are unpacked but before they are patched, we try to determine the value for SOURCE_DATE_EPOCH.
+#
+# There are 4 ways to determine SOURCE_DATE_EPOCH:
+#
+# 1. Use value from __source_date_epoch.txt file if this file exists. 
+#    This file was most likely created in the previous build by one of the following methods 2,3,4. 
+#    In principle, it could actually provided by a recipe via SRC_URI
+#
+# If the file does not exist, first try to determine the value for SOURCE_DATE_EPOCH:
+#
+# 2. If we detected a folder .git, use .git last commit date timestamp, as git does not allow checking out
+#    files and preserving their timestamps.
+#
+# 3. Use the mtime of "known" files such as NEWS, CHANGLELOG, ...
+#    This will work fine for any well kept repository distributed via tarballs.
+#
+# 4. If the above steps fail, we need to check all package source files and use the youngest file of the source tree.
+#
+# Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe ${WORKDIR}/source_date_epoch folder
+# in a text file "__source_date_epoch.txt'. If this file is found by other recipe task, the value is exported in
+# the SOURCE_DATE_EPOCH variable in the task environment. This is done in an anonymous python function, 
+# so SOURCE_DATE_EPOCH is guaranteed to exist for all tasks the may use it (do_configure, do_compile, do_package, ...)
+
+BUILD_REPRODUCIBLE_BINARIES ??= '1'
+inherit ${@oe.utils.ifelse(d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1', 'reproducible_build_simple', '')}
+
+SDE_DIR ="${WORKDIR}/source-date-epoch"
+SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt"
+
+SSTATETASKS += "do_deploy_source_date_epoch"
+
+do_deploy_source_date_epoch () {
+    echo "Deploying SDE to ${SDE_DIR}."
+}
+
+python do_deploy_source_date_epoch_setscene () {
+    sstate_setscene(d)
+}
+
+do_deploy_source_date_epoch[dirs] = "${SDE_DIR}"
+do_deploy_source_date_epoch[sstate-plaindirs] = "${SDE_DIR}"
+addtask do_deploy_source_date_epoch_setscene
+addtask do_deploy_source_date_epoch before do_configure after do_patch
+
+def get_source_date_epoch_known_files(d, path):
+    source_date_epoch = 0
+    known_files = set(["NEWS", "ChangeLog", "Changelog", "CHANGES"])
+    for file in known_files:
+        filepath = os.path.join(path,file)
+        if os.path.isfile(filepath):
+            mtime = int(os.path.getmtime(filepath))
+            # There may be more than one "known_file" present, if so, use the youngest one
+            if mtime > source_date_epoch:
+                source_date_epoch = mtime
+    return source_date_epoch
+
+def find_git_folder(path):
+    exclude = set(["temp", "license-destdir", "patches", "recipe-sysroot-native", "recipe-sysroot", "pseudo", "build", "image", "sysroot-destdir"])
+    for root, dirs, files in os.walk(path, topdown=True):
+        dirs[:] = [d for d in dirs if d not in exclude]
+        if '.git' in dirs:
+            #bb.warn("found root:%s" % (str(root)))
+            return root
+     
+def get_source_date_epoch_git(d, path):
+    source_date_epoch = 0
+    if "git://" in d.getVar('SRC_URI'):
+        gitpath = find_git_folder(d.getVar('WORKDIR'))
+        if gitpath != None:
+            import subprocess
+            if os.path.isdir(os.path.join(gitpath,".git")):
+                try:
+                    source_date_epoch = int(subprocess.check_output(['git','log','-1','--pretty=%ct'], cwd=path))
+                    #bb.warn("JB *** gitpath:%s sde: %d" % (gitpath,source_date_epoch))
+                    bb.debug(1, "git repo path:%s sde: %d" % (gitpath,source_date_epoch))
+                except subprocess.CalledProcessError as grepexc:
+                    #bb.warn( "Expected git repository not found, (path: %s) error:%d" % (gitpath, grepexc.returncode))
+                    bb.debug(1, "Expected git repository not found, (path: %s) error:%d" % (gitpath, grepexc.returncode))
+        else:
+            bb.warn("Failed to find a git repository for path:%s" % (path))
+    return source_date_epoch
+            
+python do_create_source_date_epoch_stamp() {
+    path = d.getVar('S')
+    if not os.path.isdir(path):
+        bb.warn("Unable to determine source_date_epoch! path:%s" % path)
+        return
+
+    epochfile = d.getVar('SDE_FILE')
+    if os.path.isfile(epochfile):
+        bb.debug(1, " path: %s reusing __source_date_epoch.txt" % epochfile)
+        return
+ 
+    # Try to detect/find a git repository
+    source_date_epoch = get_source_date_epoch_git(d, path)
+    if source_date_epoch == 0:
+        source_date_epoch = get_source_date_epoch_known_files(d, path)
+    if source_date_epoch == 0:
+        # Do it the hard way: check all files and find the youngest one...
+        filename_dbg = None
+        exclude = set(["temp", "license-destdir", "patches", "recipe-sysroot-native", "recipe-sysroot", "pseudo", "build", "image", "sysroot-destdir"])
+        for root, dirs, files in os.walk(path, topdown=True):
+            files = [f for f in files if not f[0] == '.']
+            dirs[:] = [d for d in dirs if d not in exclude]
+
+            for fname in files:
+                filename = os.path.join(root, fname)
+                try:
+                    mtime = int(os.path.getmtime(filename))
+                except ValueError:
+                    mtime = 0
+                if mtime > source_date_epoch:
+                    source_date_epoch = mtime
+                    filename_dbg = filename
+
+        if filename_dbg != None:
+            bb.debug(1," SOURCE_DATE_EPOCH %d derived from: %s" % (source_date_epoch, filename_dbg))
+
+        if source_date_epoch == 0:
+            # empty folder, not a single file ...
+            # kernel source do_unpack is special cased
+            if not bb.data.inherits_class('kernel', d):
+                bb.debug(1, "Unable to determine source_date_epoch! path:%s" % path)
+
+    bb.utils.mkdirhier(d.getVar('SDE_DIR'))
+    with open(epochfile, 'w') as f:
+        f.write(str(source_date_epoch))
+}
+
+BB_HASHBASE_WHITELIST += "SOURCE_DATE_EPOCH"
+
+python () {
+    if d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1':
+        d.appendVarFlag("do_unpack", "postfuncs", " do_create_source_date_epoch_stamp")
+        epochfile = d.getVar('SDE_FILE')
+        source_date_epoch = "0"
+        if os.path.isfile(epochfile):
+            with open(epochfile, 'r') as f:
+                source_date_epoch = f.read()
+            bb.debug(1, "source_date_epoch stamp found ---> stamp %s" % source_date_epoch)
+        d.setVar('SOURCE_DATE_EPOCH', source_date_epoch)
+}
diff --git a/import-layers/yocto-poky/meta/classes/reproducible_build_simple.bbclass b/import-layers/yocto-poky/meta/classes/reproducible_build_simple.bbclass
new file mode 100644
index 0000000..8a60dee
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/reproducible_build_simple.bbclass
@@ -0,0 +1,10 @@
+# Setup default environment for reproducible builds.
+
+BUILD_REPRODUCIBLE_BINARIES = "1"
+
+export PYTHONHASHSEED = "0"
+export PERL_HASH_SEED = "0"
+export SOURCE_DATE_EPOCH ??= "1520598896"
+
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+
diff --git a/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass b/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
index a4e627f..5522209 100644
--- a/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
+++ b/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
@@ -56,6 +56,7 @@
 SORT_PASSWD_POSTPROCESS_COMMAND ??= " sort_passwd; "
 python () {
     d.appendVar('ROOTFS_POSTPROCESS_COMMAND', '${SORT_PASSWD_POSTPROCESS_COMMAND}')
+    d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;')
 }
 
 systemd_create_users () {
@@ -256,10 +257,17 @@
         os.symlink(os.path.basename(manifest_name), manifest_link)
 }
 
-# Can be use to create /etc/timestamp during image construction to give a reasonably
+# Can be used to create /etc/timestamp during image construction to give a reasonably
 # sane default time setting
 rootfs_update_timestamp () {
-	date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+	if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+		# Convert UTC into %4Y%2m%2d%2H%2M%2S
+		sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
+	else
+		sformatted=`date -u +%4Y%2m%2d%2H%2M%2S`
+	fi
+	echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp
+	bbnote "rootfs_update_timestamp: set /etc/timestamp to $sformatted"
 }
 
 # Prevent X from being started
@@ -328,3 +336,16 @@
             if 'unsatisfied recommendation for' in line:
                 bb.warn('[log_check] %s: %s' % (d.getVar('PN'), line))
 }
+
+# Perform any additional adjustments needed to make rootf binary reproducible
+rootfs_reproducible () {
+	if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+		# Convert UTC into %4Y%2m%2d%2H%2M%2S
+		sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
+		echo $sformatted > ${IMAGE_ROOTFS}/etc/version
+		bbnote "rootfs_reproducible: set /etc/version to $sformatted"
+
+		find ${IMAGE_ROOTFS}/etc/gconf -name '%gconf.xml' -print0 | xargs -0r \
+		sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g'
+	fi
+}
diff --git a/import-layers/yocto-poky/meta/classes/sanity.bbclass b/import-layers/yocto-poky/meta/classes/sanity.bbclass
index 1feb794..e0e57ce 100644
--- a/import-layers/yocto-poky/meta/classes/sanity.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sanity.bbclass
@@ -336,7 +336,7 @@
     return ""
 
 def get_filesystem_id(path):
-    status, result = oe.utils.getstatusoutput("stat -f -c '%s' %s" % ("%t", path))
+    status, result = oe.utils.getstatusoutput("stat -f -c '%s' '%s'" % ("%t", path))
     if status == 0:
         return result
     else:
@@ -456,13 +456,29 @@
 
     return messages
 
+# Patch before 2.7 can't handle all the features in git-style diffs.  Some
+# patches may incorrectly apply, and others won't apply at all.
+def check_patch_version(sanity_data):
+    from distutils.version import LooseVersion
+    import re, subprocess
+
+    try:
+        result = subprocess.check_output(["patch", "--version"], stderr=subprocess.STDOUT, universal_newlines=True)
+        version = re.search(r"[0-9.]+", result.splitlines()[0]).group()
+        if LooseVersion(version) < LooseVersion("2.7"):
+            return "Your version of patch is older than 2.7 and has bugs which will break builds. Please install a newer version of patch.\n"
+        else:
+            return None
+    except subprocess.CalledProcessError as e:
+        return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output)
+
 # Unpatched versions of make 3.82 are known to be broken.  See GNU Savannah Bug 30612.
 # Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
 def check_make_version(sanity_data):
     from distutils.version import LooseVersion
     status, result = oe.utils.getstatusoutput("make --version")
     if status != 0:
-        return "Unable to execute make --version, exit code %s\n" % status
+        return "Unable to execute make --version, exit code %d\n" % status
     version = result.split()[2]
     if LooseVersion(version) == LooseVersion("3.82"):
         # Construct a test file
@@ -498,7 +514,7 @@
     from distutils.version import LooseVersion
     status, result = oe.utils.getstatusoutput("tar --version")
     if status != 0:
-        return "Unable to execute tar --version, exit code %s\n" % status
+        return "Unable to execute tar --version, exit code %d\n" % status
     version = result.split()[3]
     if LooseVersion(version) < LooseVersion("1.24"):
         return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n"
@@ -511,7 +527,7 @@
     from distutils.version import LooseVersion
     status, result = oe.utils.getstatusoutput("git --version 2> /dev/null")
     if status != 0:
-        return "Unable to execute git --version, exit code %s\n" % status
+        return "Unable to execute git --version, exit code %d\n" % status
     version = result.split()[2]
     if LooseVersion(version) < LooseVersion("1.8.3.1"):
         return "Your version of git is older than 1.8.3.1 and has bugs which will break builds. Please install a newer version of git.\n"
@@ -596,6 +612,7 @@
     import stat
 
     status.addresult(check_make_version(d))
+    status.addresult(check_patch_version(d))
     status.addresult(check_tar_version(d))
     status.addresult(check_git_version(d))
     status.addresult(check_perl_modules(d))
@@ -692,7 +709,7 @@
     try:
         locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
     except locale.Error:
-        raise_sanity_error("You system needs to support the en_US.UTF-8 locale.", d)
+        raise_sanity_error("Your system needs to support the en_US.UTF-8 locale.", d)
 
 def check_sanity_everybuild(status, d):
     import os, stat
diff --git a/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass b/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass
index f03c480..7ff3a35 100644
--- a/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sign_package_feed.bbclass
@@ -43,4 +43,4 @@
 }
 
 do_package_index[depends] += "signing-keys:do_deploy"
-do_rootfs[depends] += "signing-keys:do_populate_sysroot"
+do_rootfs[depends] += "signing-keys:do_populate_sysroot gnupg-native:do_populate_sysroot"
diff --git a/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass b/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass
index 4961b03..64ae7ce 100644
--- a/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sign_rpm.bbclass
@@ -68,8 +68,4 @@
 do_package_index[depends] += "signing-keys:do_deploy"
 do_rootfs[depends] += "signing-keys:do_populate_sysroot"
 
-# Newer versions of gpg (at least 2.1.5 and 2.2.1) have issues when signing occurs in parallel
-# so unfortunately the signing must be done serially. Once the upstream problem is fixed,
-# the following line must be removed otherwise we loose all the intrinsic parallelism from
-# bitbake.  For more information, check https://bugzilla.yoctoproject.org/show_bug.cgi?id=12022.
-do_package_write_rpm[lockfiles] += "${TMPDIR}/gpg.lock"
+PACKAGE_WRITE_DEPS += "gnupg-native"
diff --git a/import-layers/yocto-poky/meta/classes/siteinfo.bbclass b/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
index 1aada40..86bb853 100644
--- a/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
+++ b/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
@@ -47,6 +47,8 @@
         "ppc": "endian-big bit-32 powerpc-common",
         "ppc64": "endian-big bit-64 powerpc-common",
         "ppc64le" : "endian-little bit-64 powerpc-common",
+        "riscv32": "endian-little bit-32 riscv-common",
+        "riscv64": "endian-little bit-64 riscv-common",
         "sh3": "endian-little bit-32 sh-common",
         "sh4": "endian-little bit-32 sh-common",
         "sparc": "endian-big bit-32",
@@ -58,6 +60,7 @@
         "darwin9": "common-darwin",
         "linux": "common-linux common-glibc",
         "linux-gnu": "common-linux common-glibc",
+        "linux-gnu_ilp32": "common-linux common-glibc",
         "linux-gnux32": "common-linux common-glibc",
         "linux-gnun32": "common-linux common-glibc",
         "linux-gnueabi": "common-linux common-glibc",
@@ -73,12 +76,18 @@
     targetinfo = {
         "aarch64-linux-gnu": "aarch64-linux",
         "aarch64_be-linux-gnu": "aarch64_be-linux",
+        "aarch64-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
+        "aarch64_be-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
         "aarch64-linux-musl": "aarch64-linux",
         "aarch64_be-linux-musl": "aarch64_be-linux",
         "arm-linux-gnueabi": "arm-linux",
         "arm-linux-musleabi": "arm-linux",
         "armeb-linux-gnueabi": "armeb-linux",
         "armeb-linux-musleabi": "armeb-linux",
+        "microblazeeb-linux" : "microblaze-linux",
+        "microblazeeb-linux-musl" : "microblaze-linux",
+        "microblazeel-linux" : "microblaze-linux",
+        "microblazeel-linux-musl" : "microblaze-linux",
         "mips-linux-musl": "mips-linux",
         "mipsel-linux-musl": "mipsel-linux",
         "mips64-linux-musl": "mips64-linux",
@@ -95,6 +104,10 @@
         "powerpc64-linux-muslspe": "powerpc-linux powerpc64-linux",
         "powerpc64-linux": "powerpc-linux",
         "powerpc64-linux-musl": "powerpc-linux",
+        "riscv32-linux": "riscv32-linux",
+        "riscv32-linux-musl": "riscv32-linux",
+        "riscv64-linux": "riscv64-linux",
+        "riscv64-linux-musl": "riscv64-linux",
         "x86_64-cygwin": "bit-64",
         "x86_64-darwin": "bit-64",
         "x86_64-darwin9": "bit-64",
diff --git a/import-layers/yocto-poky/meta/classes/sstate.bbclass b/import-layers/yocto-poky/meta/classes/sstate.bbclass
index e30fbe1..0b28850 100644
--- a/import-layers/yocto-poky/meta/classes/sstate.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sstate.bbclass
@@ -28,6 +28,9 @@
 SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"
 # Avoid docbook/sgml catalog warnings for now
 SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
+# sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/sdk_provides_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-nativesdk/"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/buildtools_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/buildtools-dummy-nativesdk/"
 # Archive the sources for many architectures in one deploy folder
 SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
 
@@ -45,7 +48,8 @@
     ${SDK_ARCH}_${PACKAGE_ARCH} \
     allarch \
     ${PACKAGE_ARCH} \
-    ${MACHINE}"
+    ${PACKAGE_EXTRA_ARCHS} \
+    ${MACHINE_ARCH}"
 
 SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
 
@@ -538,15 +542,15 @@
     staging_host = d.getVar('RECIPE_SYSROOT_NATIVE')
     sstate_builddir = d.getVar('SSTATE_BUILDDIR')
 
+    sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % staging_host
     if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d):
         sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
-        sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
     elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
         sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
-        sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIRHOST:g'" % (staging_target, staging_host)
+        sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target
     else:
-        sstate_grep_cmd = "grep -l -e '%s'" % (staging_target)
-        sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % (staging_target)
+        sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
+        sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target
 
     extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES') or ''
     for fixmevar in extra_staging_fixmes.split():
@@ -845,7 +849,7 @@
                 missed.append(task)
                 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
                 pass
-            bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d)
+            bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
 
         tasklist = []
         for task in range(len(sq_fn)):
@@ -856,7 +860,8 @@
             tasklist.append((task, sstatefile))
 
         if tasklist:
-            bb.event.fire(bb.event.ProcessStarted("Checking sstate mirror object availability", len(tasklist)), d)
+            msg = "Checking sstate mirror object availability"
+            bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
 
             import multiprocessing
             nproc = min(multiprocessing.cpu_count(), len(tasklist))
@@ -870,7 +875,7 @@
             pool.wait_completion()
             bb.event.disable_threadlock()
 
-            bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d)
+            bb.event.fire(bb.event.ProcessFinished(msg), d)
 
     inheritlist = d.getVar("INHERIT")
     if "toaster" in inheritlist:
@@ -1022,7 +1027,7 @@
         with open(preservestampfile, 'r') as f:
             preservestamps = f.readlines()
     seen = []
-    for a in d.getVar("SSTATE_ARCHS").split():
+    for a in sorted(list(set(d.getVar("SSTATE_ARCHS").split()))):
         toremove = []
         i = d.expand("${SSTATE_MANIFESTS}/index-" + a)
         if not os.path.exists(i):
@@ -1038,18 +1043,25 @@
                         seen.append(stamp)
 
         if toremove:
-            bb.note("There are %d recipes to be removed from sysroot %s, removing..." % (len(toremove), a))
+            msg = "Removing %d recipes from the %s sysroot" % (len(toremove), a)
+            bb.event.fire(bb.event.ProcessStarted(msg, len(toremove)), d)
 
-        for r in toremove:
-            (stamp, manifest, workdir) = r.split()
-            for m in glob.glob(manifest + ".*"):
-                if m.endswith(".postrm"):
-                    continue
-                sstate_clean_manifest(m, d)
-            bb.utils.remove(stamp + "*")
-            if removeworkdir:
-                bb.utils.remove(workdir, recurse = True)
-            lines.remove(r)
+            removed = 0
+            for r in toremove:
+                (stamp, manifest, workdir) = r.split()
+                for m in glob.glob(manifest + ".*"):
+                    if m.endswith(".postrm"):
+                        continue
+                    sstate_clean_manifest(m, d)
+                bb.utils.remove(stamp + "*")
+                if removeworkdir:
+                    bb.utils.remove(workdir, recurse = True)
+                lines.remove(r)
+                removed = removed + 1
+                bb.event.fire(bb.event.ProcessProgress(msg, removed), d)
+
+            bb.event.fire(bb.event.ProcessFinished(msg), d)
+
         with open(i, "w") as f:
             for l in lines:
                 f.write(l)
diff --git a/import-layers/yocto-poky/meta/classes/staging.bbclass b/import-layers/yocto-poky/meta/classes/staging.bbclass
index c479bd9..3fcbc9f 100644
--- a/import-layers/yocto-poky/meta/classes/staging.bbclass
+++ b/import-layers/yocto-poky/meta/classes/staging.bbclass
@@ -171,7 +171,7 @@
         fixme_path = d.getVar(fixmevar)
         cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
     bb.debug(2, cmd)
-    subprocess.check_output(cmd, shell=True)
+    subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
 
 def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
@@ -228,7 +228,7 @@
 
     staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d)
     for p in postinsts:
-        subprocess.check_output(p, shell=True)
+        subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
 
 #
 # Manifests here are complicated. The main sysroot area has the unpacked sstate
@@ -470,40 +470,14 @@
 
         os.symlink(c + "." + taskhash, depdir + "/" + c)
 
-        d2 = d
-        destsysroot = recipesysroot
-        variant = ''
-        if setscenedeps[dep][2].startswith("virtual:multilib"):
-            variant = setscenedeps[dep][2].split(":")[2]
-            if variant != current_variant:
-                if variant not in multilibs:
-                    multilibs[variant] = get_multilib_datastore(variant, d)
-                d2 = multilibs[variant]
-                destsysroot = d2.getVar("RECIPE_SYSROOT")
+        manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "populate_sysroot", d, multilibs)
+        destsysroot = d2.getVar("RECIPE_SYSROOT")
 
         native = False
-        if c.endswith("-native"):
-            manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)
+        if c.endswith("-native") or "-cross-" in c or "-crosssdk" in c:
             native = True
-        elif c.startswith("nativesdk-"):
-            manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c)
-        elif "-cross-" in c:
-            manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${TARGET_ARCH}-%s.populate_sysroot" % c)
-            native = True
-        elif "-crosssdk" in c:
-            manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c)
-            native = True
-        else:
-            pkgarchs = ['${MACHINE_ARCH}']
-            pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
-            pkgarchs.append('allarch')
-            for pkgarch in pkgarchs:
-                manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.populate_sysroot" % (pkgarch, c))
-                if os.path.exists(manifest):
-                    break
-        if not os.path.exists(manifest):
-            bb.warn("Manifest %s not found?" % manifest)
-        else:
+
+        if manifest:
             newmanifest = collections.OrderedDict()
             if native:
                 fm = fixme['native']
@@ -576,7 +550,7 @@
             staging_processfixme(fixme[f], multilibs[f].getVar("RECIPE_SYSROOT"), recipesysroot, recipesysrootnative, d)
 
     for p in postinsts:
-        subprocess.check_output(p, shell=True)
+        subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
 
     for dep in manifests:
         c = setscenedeps[dep][0]
diff --git a/import-layers/yocto-poky/meta/classes/syslinux.bbclass b/import-layers/yocto-poky/meta/classes/syslinux.bbclass
index d6f8824..031dacb 100644
--- a/import-layers/yocto-poky/meta/classes/syslinux.bbclass
+++ b/import-layers/yocto-poky/meta/classes/syslinux.bbclass
@@ -173,8 +173,9 @@
         if not root:
             bb.fatal('SYSLINUX_ROOT not defined')
 
+        kernel = localdata.getVar('KERNEL_IMAGETYPE')
         for btype in btypes:
-            cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
+            cfgfile.write('LABEL %s%s\nKERNEL /%s\n' % (btype[0], label, kernel))
 
             exargs = d.getVar('SYSLINUX_KERNEL_ARGS')
             if exargs:
diff --git a/import-layers/yocto-poky/meta/classes/systemd-boot-cfg.bbclass b/import-layers/yocto-poky/meta/classes/systemd-boot-cfg.bbclass
new file mode 100644
index 0000000..021c9f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/systemd-boot-cfg.bbclass
@@ -0,0 +1,68 @@
+SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
+SYSTEMD_BOOT_ENTRIES ?= ""
+SYSTEMD_BOOT_TIMEOUT ?= "10"
+
+# Need UUID utility code.
+inherit fs-uuid
+
+python build_efi_cfg() {
+    s = d.getVar("S")
+    labels = d.getVar('LABELS')
+    if not labels:
+        bb.debug(1, "LABELS not defined, nothing to do")
+        return
+
+    if labels == []:
+        bb.debug(1, "No labels, nothing to do")
+        return
+
+    cfile = d.getVar('SYSTEMD_BOOT_CFG')
+    cdir = os.path.dirname(cfile)
+    if not os.path.exists(cdir):
+        os.makedirs(cdir)
+    try:
+         cfgfile = open(cfile, 'w')
+    except OSError:
+        bb.fatal('Unable to open %s' % cfile)
+
+    cfgfile.write('# Automatically created by OE\n')
+    cfgfile.write('default %s\n' % (labels.split()[0]))
+    timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
+    if timeout:
+        cfgfile.write('timeout %s\n' % timeout)
+    else:
+        cfgfile.write('timeout 10\n')
+    cfgfile.close()
+
+    for label in labels.split():
+        localdata = d.createCopy()
+
+        entryfile = "%s/%s.conf" % (s, label)
+        if not os.path.exists(s):
+            os.makedirs(s)
+        d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
+        try:
+            entrycfg = open(entryfile, "w")
+        except OSError:
+            bb.fatal('Unable to open %s' % entryfile)
+
+        entrycfg.write('title %s\n' % label)
+
+        kernel = localdata.getVar("KERNEL_IMAGETYPE")
+        entrycfg.write('linux /%s\n' % kernel)
+
+        append = localdata.getVar('APPEND')
+        initrd = localdata.getVar('INITRD')
+
+        if initrd:
+            entrycfg.write('initrd /initrd\n')
+        lb = label
+        if label == "install":
+            lb = "install-efi"
+        entrycfg.write('options LABEL=%s ' % lb)
+        if append:
+            append = replace_rootfs_uuid(d, append)
+            entrycfg.write('%s' % append)
+        entrycfg.write('\n')
+        entrycfg.close()
+}
diff --git a/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass b/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
index 9373070..3cd6811 100644
--- a/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
+++ b/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
@@ -12,11 +12,6 @@
 do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
 
 EFIDIR = "/EFI/BOOT"
-
-SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
-SYSTEMD_BOOT_ENTRIES ?= ""
-SYSTEMD_BOOT_TIMEOUT ?= "10"
-
 # Need UUID utility code.
 inherit fs-uuid
 
@@ -50,7 +45,7 @@
         mkdir -p ${EFIIMGDIR}/${EFIDIR}
         cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
         cp -r $iso_dir/loader ${EFIIMGDIR}
-        cp $iso_dir/vmlinuz ${EFIIMGDIR}
+        cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
         EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
         echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
         if [ -f "$iso_dir/initrd" ] ; then
@@ -62,67 +57,4 @@
         efi_populate $1
 }
 
-python build_efi_cfg() {
-    s = d.getVar("S")
-    labels = d.getVar('LABELS')
-    if not labels:
-        bb.debug(1, "LABELS not defined, nothing to do")
-        return
-
-    if labels == []:
-        bb.debug(1, "No labels, nothing to do")
-        return
-
-    cfile = d.getVar('SYSTEMD_BOOT_CFG')
-    cdir = os.path.dirname(cfile)
-    if not os.path.exists(cdir):
-        os.makedirs(cdir)
-    try:
-         cfgfile = open(cfile, 'w')
-    except OSError:
-        bb.fatal('Unable to open %s' % cfile)
-
-    cfgfile.write('# Automatically created by OE\n')
-    cfgfile.write('default %s\n' % (labels.split()[0]))
-    timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
-    if timeout:
-        cfgfile.write('timeout %s\n' % timeout)
-    else:
-        cfgfile.write('timeout 10\n')
-    cfgfile.close()
-
-    for label in labels.split():
-        localdata = d.createCopy()
-
-        overrides = localdata.getVar('OVERRIDES')
-        if not overrides:
-            bb.fatal('OVERRIDES not defined')
-
-        entryfile = "%s/%s.conf" % (s, label)
-        if not os.path.exists(s):
-            os.makedirs(s)
-        d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
-        try:
-            entrycfg = open(entryfile, "w")
-        except OSError:
-            bb.fatal('Unable to open %s' % entryfile)
-        localdata.setVar('OVERRIDES', label + ':' + overrides)
-
-        entrycfg.write('title %s\n' % label)
-        entrycfg.write('linux /vmlinuz\n')
-
-        append = localdata.getVar('APPEND')
-        initrd = localdata.getVar('INITRD')
-
-        if initrd:
-            entrycfg.write('initrd /initrd\n')
-        lb = label
-        if label == "install":
-            lb = "install-efi"
-        entrycfg.write('options LABEL=%s ' % lb)
-        if append:
-            append = replace_rootfs_uuid(d, append)
-            entrycfg.write('%s' % append)
-        entrycfg.write('\n')
-        entrycfg.close()
-}
+inherit systemd-boot-cfg
diff --git a/import-layers/yocto-poky/meta/classes/testimage.bbclass b/import-layers/yocto-poky/meta/classes/testimage.bbclass
index 45bb2bd..77291c2 100644
--- a/import-layers/yocto-poky/meta/classes/testimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/testimage.bbclass
@@ -44,20 +44,22 @@
 DEFAULT_TEST_SUITES = "${MINTESTSUITE} auto"
 DEFAULT_TEST_SUITES_pn-core-image-minimal = "${MINTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-core-image-minimal-dev = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-full-cmdline = "${NETTESTSUITE} perl python logrotate"
+DEFAULT_TEST_SUITES_pn-core-image-full-cmdline = "${NETTESTSUITE} perl python logrotate ptest"
 DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${RPMTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${RPMTESTSUITE} ptest"
 DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg parselogs ${RPMTESTSUITE} \
-    ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)}"
+    ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)} ptest gi"
 DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} buildcpio buildlzip buildgalculator \
-    connman ${DEVTESTSUITE} logrotate perl parselogs python ${RPMTESTSUITE} xorg"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
+    connman ${DEVTESTSUITE} logrotate perl parselogs python ${RPMTESTSUITE} xorg ptest gi stap"
+DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE} ptest gi"
 DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcpio buildlzip buildgalculator \
-    connman ${DEVTESTSUITE} logrotate pam parselogs perl python ${RPMTESTSUITE}"
+    connman ${DEVTESTSUITE} logrotate pam parselogs perl python ${RPMTESTSUITE} ptest gi stap"
 DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
 
 # aarch64 has no graphics
 DEFAULT_TEST_SUITES_remove_aarch64 = "xorg"
+# musl doesn't support systemtap
+DEFAULT_TEST_SUITES_remove_libc-musl = "stap"
 
 # qemumips is quite slow and has reached the timeout limit several times on the YP build cluster,
 # mitigate this by removing build tests for qemumips machines.
@@ -215,7 +217,7 @@
     # Get use_kvm
     qemu_use_kvm = d.getVar("QEMU_USE_KVM")
     if qemu_use_kvm and \
-       (qemu_use_kvm == 'True' and 'x86' in machine or \
+       (oe.types.boolean(qemu_use_kvm) and 'x86' in machine or \
         d.getVar('MACHINE') in qemu_use_kvm.split()):
         kvm = True
     else:
diff --git a/import-layers/yocto-poky/meta/classes/testsdk.bbclass b/import-layers/yocto-poky/meta/classes/testsdk.bbclass
index 6b51a33..2e43343 100644
--- a/import-layers/yocto-poky/meta/classes/testsdk.bbclass
+++ b/import-layers/yocto-poky/meta/classes/testsdk.bbclass
@@ -156,10 +156,11 @@
         with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f:
             f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
             f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
-            f.write('INHERIT += "own-mirrors"')
+            f.write('INHERIT += "own-mirrors"\n')
 
         # We need to do this in case we have a minimal SDK
-        subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % sdk_env, cwd=sdk_dir, shell=True)
+        subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
+                sdk_env, cwd=sdk_dir, shell=True, stderr=subprocess.STDOUT)
 
         tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
             sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
diff --git a/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass b/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
index 9bcfe70..71da5e5 100644
--- a/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
+++ b/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
@@ -62,7 +62,8 @@
 	script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
 	rm -f $script
 	touch $script
-	echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${PATH}' >> $script
+	echo 'orig=`pwd`; cd ${COREBASE}; . ./oe-init-build-env ${TOPDIR}; cd $orig' >> $script
+	echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script
 	echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
 	echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
 	echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
@@ -116,6 +117,21 @@
 EOF
 }
 
+toolchain_create_post_relocate_script() {
+	script=$1
+	rm -f $script
+	touch $script
+
+    cat >> $script <<EOF
+if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
+    for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*.sh; do
+        \$s "\$1"
+    done
+    rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
+fi
+EOF
+}
+
 #we get the cached site config in the runtime
 TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d)}"
 TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
diff --git a/import-layers/yocto-poky/meta/classes/uboot-config.bbclass b/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
index 533e175..89ff970 100644
--- a/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
+++ b/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
@@ -27,13 +27,13 @@
         FILE = os.path.basename(d.getVar("FILE"))
         bb.debug(1, "To build %s, see %s for instructions on \
                  setting up your machine config" % (PN, FILE))
-        raise bb.parse.SkipPackage("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE"))
+        raise bb.parse.SkipRecipe("Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration." % d.getVar("MACHINE"))
 
     if ubootmachine and ubootconfig:
-        raise bb.parse.SkipPackage("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
+        raise bb.parse.SkipRecipe("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
 
     if ubootconfigflags and ubootbinaries:
-        raise bb.parse.SkipPackage("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
+        raise bb.parse.SkipRecipe("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
 
     if len(ubootconfig) > 0:
         for config in ubootconfig:
@@ -41,7 +41,7 @@
                 if config == f: 
                     items = v.split(',')
                     if items[0] and len(items) > 3:
-                        raise bb.parse.SkipPackage('Only config,images,binary can be specified!')
+                        raise bb.parse.SkipRecipe('Only config,images,binary can be specified!')
                     d.appendVar('UBOOT_MACHINE', ' ' + items[0])
                     # IMAGE_FSTYPES appending
                     if len(items) > 1 and items[1]:
diff --git a/import-layers/yocto-poky/meta/classes/uninative.bbclass b/import-layers/yocto-poky/meta/classes/uninative.bbclass
index 1723364..de2221a 100644
--- a/import-layers/yocto-poky/meta/classes/uninative.bbclass
+++ b/import-layers/yocto-poky/meta/classes/uninative.bbclass
@@ -8,6 +8,9 @@
 #UNINATIVE_CHECKSUM[x86_64] = "dead"
 UNINATIVE_DLDIR ?= "${DL_DIR}/uninative/"
 
+# Enabling uninative will change the following variables so they need to go the parsing white list to prevent multiple recipe parsing
+BB_HASHCONFIG_WHITELIST += "NATIVELSBSTRING SSTATEPOSTUNPACKFUNCS BUILD_LDFLAGS"
+
 addhandler uninative_event_fetchloader
 uninative_event_fetchloader[eventmask] = "bb.event.BuildStarted"
 
@@ -126,6 +129,9 @@
         d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
         d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
         d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp")
+        d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
+        d.appendVarFlag("BUILD_LDFLAGS", "vardepvalueexclude", "| -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
+        d.appendVarFlag("BUILD_LDFLAGS", "vardepsexclude", "UNINATIVE_LOADER")
         d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
 
 python uninative_changeinterp () {
diff --git a/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass b/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
index 589a99f..64bf6dc 100644
--- a/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
+++ b/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
@@ -307,5 +307,5 @@
             update_useradd_static_config(d)
         except NotImplementedError as f:
             bb.debug(1, "Skipping recipe %s: %s" % (d.getVar('PN'), f))
-            raise bb.parse.SkipPackage(f)
+            raise bb.parse.SkipRecipe(f)
 }
diff --git a/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
index 587bfd4..b1f27d3 100644
--- a/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
+++ b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
@@ -50,17 +50,4 @@
         bb.fatal(str(e))
 }
 
-addtask checkuriall after do_checkuri
-do_checkuriall[recrdeptask] = "do_checkuriall do_checkuri"
-do_checkuriall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_checkuriall[nostamp] = "1"
-do_checkuriall() {
-	:
-}
 
-addtask fetchall after do_fetch
-do_fetchall[recrdeptask] = "do_fetchall do_fetch"
-do_fetchall[recideptask] = "do_${BB_DEFAULT_TASK}"
-do_fetchall() {
-	:
-}
diff --git a/import-layers/yocto-poky/meta/classes/utils.bbclass b/import-layers/yocto-poky/meta/classes/utils.bbclass
index 8e07eac..4f016e3 100644
--- a/import-layers/yocto-poky/meta/classes/utils.bbclass
+++ b/import-layers/yocto-poky/meta/classes/utils.bbclass
@@ -1,44 +1,3 @@
-# For compatibility
-def base_path_join(a, *p):
-    return oe.path.join(a, *p)
-
-def base_path_relative(src, dest):
-    return oe.path.relative(src, dest)
-
-def base_path_out(path, d):
-    return oe.path.format_display(path, d)
-
-def base_read_file(filename):
-    return oe.utils.read_file(filename)
-
-def base_ifelse(condition, iftrue = True, iffalse = False):
-    return oe.utils.ifelse(condition, iftrue, iffalse)
-
-def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
-    return oe.utils.conditional(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
-    return oe.utils.less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
-    return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_contains(variable, checkvalues, truevalue, falsevalue, d):
-    bb.note('base_contains is deprecated, please use bb.utils.contains instead.')
-    return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
-
-def base_both_contain(variable1, variable2, checkvalue, d):
-    return oe.utils.both_contain(variable1, variable2, checkvalue, d)
-
-def base_prune_suffix(var, suffixes, d):
-    return oe.utils.prune_suffix(var, suffixes, d)
-
-def oe_filter(f, str, d):
-    return oe.utils.str_filter(f, str, d)
-
-def oe_filter_out(f, str, d):
-    return oe.utils.str_filter_out(f, str, d)
-
 def machine_paths(d):
     """List any existing machine specific filespath directories"""
     machine = d.getVar("MACHINE")
@@ -364,12 +323,7 @@
     return pkgs
 
 def get_multilib_datastore(variant, d):
-    localdata = bb.data.createCopy(d)
-    overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
-    localdata.setVar("OVERRIDES", overrides)
-    localdata.setVar("MLPREFIX", variant + "-")
-    return localdata
-get_multilib_datastore[vardepsexclude] = "OVERRIDES"
+    return oe.utils.get_multilib_datastore(variant, d)
 
 def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
     """Return a string of all ${var} in all multilib tune configuration"""
diff --git a/import-layers/yocto-poky/meta/classes/waf.bbclass b/import-layers/yocto-poky/meta/classes/waf.bbclass
index acbda27..19e9376 100644
--- a/import-layers/yocto-poky/meta/classes/waf.bbclass
+++ b/import-layers/yocto-poky/meta/classes/waf.bbclass
@@ -3,39 +3,20 @@
 
 EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
 
-def get_waf_parallel_make(d):
-    pm = d.getVar('PARALLEL_MAKE')
-    if pm:
-        # look for '-j' and throw other options (e.g. '-l') away
-        # because they might have different meaning in bjam
-        pm = pm.split()
-        while pm:
-            v = None
-            opt = pm.pop(0)
-            if opt == '-j':
-                v = pm.pop(0)
-            elif opt.startswith('-j'):
-                v = opt[2:].strip()
-            else:
-                v = None
-
-            if v:
-                v = min(64, int(v))
-                return '-j' + str(v)
-
-    return ""
-
 python waf_preconfigure() {
+    import subprocess
     from distutils.version import StrictVersion
-    srcsubdir = d.getVar('S')
-    wafbin = os.path.join(srcsubdir, 'waf')
-    status, result = oe.utils.getstatusoutput(wafbin + " --version")
-    if status != 0:
-        bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % status)
-        return
-    version = result.split()[1]
-    if StrictVersion(version) >= StrictVersion("1.8.7"):
-        d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
+    subsrcdir = d.getVar('S')
+    wafbin = os.path.join(subsrcdir, 'waf')
+    try:
+        result = subprocess.check_output([wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)
+        version = result.decode('utf-8').split()[1]
+        if StrictVersion(version) >= StrictVersion("1.8.7"):
+            d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
+    except subprocess.CalledProcessError as e:
+        bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode)
+    except FileNotFoundError:
+        bb.fatal("waf does not exist in %s" % subsrcdir)
 }
 
 do_configure[prefuncs] += "waf_preconfigure"
@@ -44,8 +25,9 @@
 	${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
 }
 
+do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
 waf_do_compile()  {
-	${S}/waf build ${@get_waf_parallel_make(d)}
+	${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
 }
 
 waf_do_install() {
diff --git a/import-layers/yocto-poky/meta/conf/bitbake.conf b/import-layers/yocto-poky/meta/conf/bitbake.conf
index 1cdbf43..a21b728 100644
--- a/import-layers/yocto-poky/meta/conf/bitbake.conf
+++ b/import-layers/yocto-poky/meta/conf/bitbake.conf
@@ -187,6 +187,7 @@
     tar-native \
     virtual/libintl-native \
     virtual/libiconv-native \
+    virtual/crypt-native \
     texinfo-native \
     bash-native \
     sed-native \
@@ -220,7 +221,7 @@
 # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
 # otherwise it is the same as PN and P
 SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -crosssdk -cross-canadian"
-BPN = "${@base_prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}"
+BPN = "${@oe.utils.prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}"
 BP = "${BPN}-${PV}"
 
 # Package info.
@@ -423,6 +424,8 @@
 OLDEST_KERNEL = "3.2.0"
 OLDEST_KERNEL_aarch64 = "3.14"
 OLDEST_KERNEL_nios2 = "3.19"
+OLDEST_KERNEL_riscv32 = "4.15"
+OLDEST_KERNEL_riscv64 = "4.15"
 
 # SDK_OLDEST_KERNEL can't be set using overrides since there are
 # none for the SDK architecture. Best to set it from a machine-sdk
@@ -495,6 +498,9 @@
 # Used by bzr fetcher
 HOSTTOOLS_NONFATAL += "bzr"
 
+# Used by ssh fetcher
+HOSTTOOLS_NONFATAL += "scp"
+
 CCACHE ??= ""
 # ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and
 # autogen sets HOME=/dev/null so in certain situations builds can fail.
@@ -536,6 +542,7 @@
 EXTRA_OEMAKE = ""
 EXTRA_OECONF = ""
 export LC_ALL = "en_US.UTF-8"
+export TZ = 'UTC'
 
 ##################################################################
 # Patch handling.
@@ -593,9 +600,10 @@
 ##################################################################
 # Optimization flags.
 ##################################################################
+# Beware: applied last to first
 DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
-                     -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
                      -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+                     -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
 "
 DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
 
@@ -663,6 +671,7 @@
 SRCDATE = "${DATE}"
 SRCREV ??= "INVALID"
 AUTOREV = "${@bb.fetch2.get_autorev(d)}"
+AUTOREV[vardepvalue] = "${SRCPV}"
 # Set Dynamically in base.bbclass
 # SRCPV = "${@bb.fetch2.get_srcrev(d)}"
 SRCPV[vardepvalue] = "${SRCPV}"
@@ -757,7 +766,7 @@
 DL_DIR ?= "${TOPDIR}/downloads"
 SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
 IMAGE_FSTYPES ?= "tar.gz"
-IMAGE_FSTYPES_DEBUGFS ?= "${IMAGE_FSTYPES}"
+IMAGE_FSTYPES_DEBUGFS ?= "tar.gz"
 
 INITRAMFS_FSTYPES ?= "cpio.gz"
 # The maximum size in Kbytes for the generated initramfs image size.
@@ -807,7 +816,7 @@
 
 # Native distro features (will always be used for -native, even if they
 # are not enabled for target)
-DISTRO_FEATURES_NATIVE ?= "x11 ipv6"
+DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr"
 DISTRO_FEATURES_NATIVESDK ?= "x11 libc-charsets libc-locales libc-locale-code"
 
 # Normally target distro features will not be applied to native builds:
@@ -856,7 +865,7 @@
 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
     SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
     USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
-    PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
+    STAMPS_DIR PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
     CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_NOHASHDIR LICENSE_PATH SDKPKGSUFFIX \
     WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
     BB_WORKERCONTEXT BB_LIMITEDDEPS extend_recipe_sysroot DEPLOY_DIR"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc b/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
index 76d09af..9620ad4 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
@@ -47,3 +47,9 @@
 
 GTK2DISTROFEATURES = "directfb x11"
 GTK3DISTROFEATURES = "x11 wayland"
+
+ARCH_DEFAULT_KERNELIMAGETYPE = "zImage"
+ARCH_DEFAULT_KERNELIMAGETYPE_x86 = "bzImage"
+ARCH_DEFAULT_KERNELIMAGETYPE_x86-64 = "bzImage"
+KERNEL_IMAGETYPE ??= "${ARCH_DEFAULT_KERNELIMAGETYPE}"
+KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc b/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc
index 2b76c3c..e65c1ed 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/default-providers.inc
@@ -1,8 +1,6 @@
 #
 # Default virtual providers
 #
-PREFERRED_PROVIDER_virtual/db ?= "db"
-PREFERRED_PROVIDER_virtual/db-native ?= "db-native"
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
 PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
 PREFERRED_PROVIDER_virtual/egl ?= "mesa"
@@ -44,7 +42,6 @@
 PREFERRED_PROVIDER_opkg-native ?= "opkg-native"
 PREFERRED_PROVIDER_nativesdk-opkg ?= "nativesdk-opkg"
 PREFERRED_PROVIDER_console-tools ?= "kbd"
-PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
 PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','eudev',d)}"
 PREFERRED_RPROVIDER_bluez-hcidump ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez-hcidump',d)}"
 # Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc b/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
index f7c8b4a..13c7e65 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
@@ -138,7 +138,6 @@
 DISTRO_PN_ALIAS_pn-gtk-icon-utils-native = "OSPDT"
 DISTRO_PN_ALIAS_pn-systemd-boot = "Ubuntu=systemd-boot Fedora=systemd-boot"
 DISTRO_PN_ALIAS_pn-hello-mod = "OE-Core"
-DISTRO_PN_ALIAS_pn-hostap-conf = "OE-Core"
 DISTRO_PN_ALIAS_pn-hwlatdetect = "OSPDT"
 DISTRO_PN_ALIAS_pn-icecc-create-env = "OE-Core"
 DISTRO_PN_ALIAS_pn-init-ifupdown = "Debian=ifupdown Ubuntu=ifupdown"
@@ -160,7 +159,6 @@
 DISTRO_PN_ALIAS_pn-keymaps = "OE-Core"
 DISTRO_PN_ALIAS_pn-kf = "OSPDT"
 DISTRO_PN_ALIAS_pn-lame = "Debian=lame Ubuntu=lame"
-DISTRO_PN_ALIAS_pn-latencytop = "Meego=latencytop Fedora=latencytop Debian=latencytop OpenSuSE=latencytop"
 DISTRO_PN_ALIAS_pn-ldconfig-native = "Ubuntu=libc-bin Fedora=glibc"
 DISTRO_PN_ALIAS_pn-liba52 = "Mandriva=a52dec Debian=a52dec"
 DISTRO_PN_ALIAS_pn-libacpi = "Ubuntu=libacpi Mandriva=libacpi"
@@ -278,7 +276,6 @@
 DISTRO_PN_ALIAS_pn-opkg-keyrings = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
 DISTRO_PN_ALIAS_pn-opkg-nogpg = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
 DISTRO_PN_ALIAS_pn-opkg-utils = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
-DISTRO_PN_ALIAS_pn-oprofile = "Debian=oprofile Fedora=oprofile"
 DISTRO_PN_ALIAS_pn-os-release = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
@@ -316,7 +313,6 @@
 DISTRO_PN_ALIAS_pn-pointercal-xinput = "OE-Core"
 DISTRO_PN_ALIAS_pn-pong-clock = "OpenedHand"
 DISTRO_PN_ALIAS_pn-portmap = "Debian=rpcbind Fedora=rpcbind"
-DISTRO_PN_ALIAS_pn-postinst-intercept = "OE-Core"
 DISTRO_PN_ALIAS_pn-powertop = "Meego=powertop Fedora=powertop Debian=powertop OpenSuSE=powertop Mandriva=powertop"
 DISTRO_PN_ALIAS_pn-ppp-dialin = "OE-Core"
 DISTRO_PN_ALIAS_pn-presentproto = "Debian=x11proto-present-dev Fedora=xorg-x11-proto-devel"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc b/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc
index d0e6450..48aff95 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/maintainers.inc
@@ -31,7 +31,7 @@
 RECIPE_MAINTAINER_pn-acpica = "Fathi Boudra <fathi.boudra@linaro.org>"
 RECIPE_MAINTAINER_pn-acpid = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-acpitests = "Fathi Boudra <fathi.boudra@linaro.org>"
-RECIPE_MAINTAINER_pn-adwaita-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-adwaita-icon-theme = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-alsa-lib = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-alsa-plugins = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-alsa-state = "Tanu Kaskinen <tanuk@iki.fi>"
@@ -46,11 +46,11 @@
 RECIPE_MAINTAINER_pn-argp-standalone = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-asciidoc = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-aspell = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-assimp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-assimp = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-at = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-at-spi2-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-at-spi2-core = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-at-spi2-atk = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-at-spi2-core = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-atk = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-attr = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-autoconf = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-autoconf-archive = "Robert Yang <liezhi.yang@windriver.com>"
@@ -59,8 +59,8 @@
 RECIPE_MAINTAINER_pn-avahi = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-avahi-ui = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-babeltrace = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-base-files = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-base-passwd = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-base-files = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-base-passwd = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-bash = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-bash-completion = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-bc = "Jose Lamego <jose.a.lamego@linux.intel.com>"
@@ -77,7 +77,7 @@
 RECIPE_MAINTAINER_pn-blktool = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-blktrace = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-bluez5 = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-bmap-tools = "Ed Bartosh <ed.bartosh@linux.intel.com>"
+RECIPE_MAINTAINER_pn-bmap-tools = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-boost = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-bootchart2 = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-bsd-headers = "Khem Raj <raj.khem@gmail.com>"
@@ -89,10 +89,9 @@
 RECIPE_MAINTAINER_pn-buildtools-tarball = "Cristian Iorga <cristian.iorga@intel.com>"
 RECIPE_MAINTAINER_pn-busybox = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-busybox-inittab = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-byacc = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-bzip2 = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-ca-certificates = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-cairo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-cairo = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-calibrateproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-cantarell-fonts = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-ccache = "Robert Yang <liezhi.yang@windriver.com>"
@@ -100,12 +99,12 @@
 RECIPE_MAINTAINER_pn-chkconfig = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-chkconfig-alternatives-native = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-chrpath = "Yi Zhao <yi.zhao@windriver.com>"
-RECIPE_MAINTAINER_pn-clutter-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-clutter-gst-3.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-clutter-gtk-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-1.0 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gst-3.0 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gtk-1.0 = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-cmake = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
 RECIPE_MAINTAINER_pn-cmake-native = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-cogl-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-cogl-1.0 = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-compositeproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-connman = "Changhyeok Bae <changhyeok.bae@lge.com>"
 RECIPE_MAINTAINER_pn-connman-conf = "Maxin B. John <maxin.john@intel.com>"
@@ -116,22 +115,22 @@
 RECIPE_MAINTAINER_pn-cpio = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-cracklib = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-createrepo-c = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-cronie = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-cronie = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-cross-localedef-native = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-cryptodev-linux = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-cryptodev-module = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-cryptodev-tests = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-cups = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-curl = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-cve-check-tool = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-cve-check-tool = "Ross Burton <ross.burton@intel.com>"
 RECIPE_MAINTAINER_pn-cwautomacros = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-damageproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-damageproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-db = "Mark Hatle <mark.hatle@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus-glib = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus-test = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus-wait = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-debianutils = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-debianutils = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-depmodwrapper-cross = "Mark Hatle <mark.hatle@windriver.com>"
 RECIPE_MAINTAINER_pn-desktop-file-utils-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-dhcp = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -152,6 +151,7 @@
 RECIPE_MAINTAINER_pn-dri3proto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-dropbear = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-dtc = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-dwarfsrcfiles = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-e2fsprogs = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-ed = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-eee-acpi-scripts = "Alexander Kanavin <alexander.kanavin@intel.com>"
@@ -164,22 +164,22 @@
 RECIPE_MAINTAINER_pn-encodings = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-epiphany = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-ethtool = "Changhyeok Bae <changhyeok.bae@lge.com>"
-RECIPE_MAINTAINER_pn-eudev = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-eudev = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-expat = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-expect = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-ffmpeg = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-file = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-file = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-findutils = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-fixesproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-flac = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-flex = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-font-alias = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-font-util = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-fontconfig = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-fontconfig = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-fontsproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-foomatic-filters = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-formfactor = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-freetype = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-freetype = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-fstests = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-fts = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gawk = "Chen Qi <Qi.Chen@windriver.com>"
@@ -193,34 +193,35 @@
 RECIPE_MAINTAINER_pn-gcc-sanitizers = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gcc-source = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gccmakedep = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-gconf = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gconf = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-gcr = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-gdb = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gdb-cross = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gdb-cross-canadian = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gdbm = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gdk-pixbuf = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gdk-pixbuf = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-gettext = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-gettext-minimal-native = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-ghostscript = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-git = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-glew = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-glib-2.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-glib-networking = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-glew = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-glib-2.0 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-glib-networking = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-glibc = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-glibc-initial = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-glibc-locale = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-glibc-mtrace = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-glibc-scripts = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-glide = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
 RECIPE_MAINTAINER_pn-glproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-gmp = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-gnome-common = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-desktop-testing = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-common = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-desktop-testing = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-gnome-desktop3 = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-doc-utils = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-themes-standard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-doc-utils = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-themes-standard = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-gnu-config = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gnu-efi = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gnu-efi = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-gnupg = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-gnutls = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-go = "Khem Raj <raj.khem@gmail.com>"
@@ -235,51 +236,51 @@
 RECIPE_MAINTAINER_pn-grep = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-groff = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-grub = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-grub-bootconf = "California Sullivan <california.l.sullivan@intel.com>"
 RECIPE_MAINTAINER_pn-grub-efi = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gst-player = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0 = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-libav = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-omx = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-meta-base = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-bad = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-base = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-good = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-ugly = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-python = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-rtsp-server = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-vaapi = "Wei Tee Ng <wei.tee.ng@intel.com>"
-RECIPE_MAINTAINER_pn-gtk+ = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk+3 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gst-examples = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gst-validate = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-libav = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-omx = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-meta-base = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-bad = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-base = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-good = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-ugly = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-python = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-rtsp-server = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-vaapi = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+ = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+3 = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-gtk-doc = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-engines = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-icon-utils-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-sato-engine = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-guile = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gtk-engines = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-icon-utils-native = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-sato-engine = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-guilt-native = "Bruce Ashfield <bruce.ashfield@windriver.com>"
 RECIPE_MAINTAINER_pn-gummiboot = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-gzip = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-harfbuzz = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-hdparm = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-help2man-native = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-hostap-conf = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-hostap-utils = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-hwlatdetect = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-i2c-tools = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-icecc-create-env-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-icecc-create-env = "Joshua Watt <JPEWhacker@gmail.com>"
 RECIPE_MAINTAINER_pn-icon-naming-utils = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-icu = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-ifupdown = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-init-ifupdown = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-initramfs-boot = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
 RECIPE_MAINTAINER_pn-initramfs-framework = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-initramfs-live-boot = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install-efi = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install-efi-testfs = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install-testfs = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initscripts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-boot = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-boot-tiny = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-efi = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-efi-testfs = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-testfs = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-initscripts = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-inputproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-intltool = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-iproute2 = "Changhyeok Bae <changhyeok.bae@lge.com>"
@@ -302,43 +303,37 @@
 RECIPE_MAINTAINER_pn-kmod = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-kmod-native = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-kmscube = "Carlos Rafael Giani <dv@pseudoterminal.org>"
-RECIPE_MAINTAINER_pn-l3afpad = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-l3afpad = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-lame = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-latencytop = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-ldconfig-native = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-less = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-less = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-liba52 = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-libacpi = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libaio = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libarchive = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-libart-lgpl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libart-lgpl = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libassuan = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libatomic-ops = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libav = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libbsd = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libcap = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libcap-ng = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libbsd = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap-ng = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-libcgroup = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libcheck = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libclass-isa-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libcheck = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-libcomps = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libcroco = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Tim Orling <timothy.t.orling@intel.com>"
+RECIPE_MAINTAINER_pn-libcroco = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libdaemon = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libdmx = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libdnf = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libdrm = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
-RECIPE_MAINTAINER_pn-libdumpvalue-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libenv-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libepoxy = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libepoxy = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-liberation-fonts = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-liberror-perl = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libevdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libevent = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-liberror-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libevdev = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libevent = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libexif = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libfakekey = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libffi = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libfile-checktree-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
 RECIPE_MAINTAINER_pn-libfm = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libfm-extra = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libfontenc = "Armin Kuster <akuster@mvista.com>"
@@ -346,56 +341,55 @@
 RECIPE_MAINTAINER_pn-libgcc-initial = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-libgfortran = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-libglade = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libglu = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libglu = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libgpg-error = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libgudev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libi18n-collate-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libgudev = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libical = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libice = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libiconv = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libid3tag = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-libidn = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libinput = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libinput = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libjson = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libksba = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libmatchbox = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libmatchbox = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libmnl = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-libmpc = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-libnewt = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-libnewt-python = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-libnfsidmap = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libnl = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libnotify = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libnotify = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libnsl2 = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-libnss-mdns = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libogg = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libomxil = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libowl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libowl = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libpam = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libpcap = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libpciaccess = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libpcre = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libpcre = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-libpcre2 = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libpfm4 = "Matthew McClintock <msm@freescale.com>"
+RECIPE_MAINTAINER_pn-libpipeline = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libpng = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libpng12 = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libpod-plainer-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
 RECIPE_MAINTAINER_pn-libproxy = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libpthread-stubs = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-librepo = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-librsvg = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-librsvg = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libsamplerate0 = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-libsdl = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libsdl2 = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libsdl = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-libsdl2 = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-libsecret = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libsm = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libsndfile1 = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-libsolv = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-libsoup-2.4 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libsoup-2.4 = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libtasn1 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libtest-needs-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
 RECIPE_MAINTAINER_pn-libtheora = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libtimedate-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libtimedate-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
 RECIPE_MAINTAINER_pn-libtirpc = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>"
@@ -403,12 +397,12 @@
 RECIPE_MAINTAINER_pn-libunistring = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libunwind = "Bruce Ashfield <bruce.ashfield@windriver.com>"
 RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-liburi-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libusb-compat = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libusb1 = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-liburi-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libusb-compat = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libusb1 = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libuser = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libva = "Wei Tee Ng <wei.tee.ng@intel.com>"
-RECIPE_MAINTAINER_pn-libva-utils = "Wei Tee Ng <wei.tee.ng@intel.com>"
+RECIPE_MAINTAINER_pn-libva = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libva-utils = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-libvorbis = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-libwebp = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libx11 = "Armin Kuster <akuster@mvista.com>"
@@ -429,12 +423,12 @@
 RECIPE_MAINTAINER_pn-libxinerama = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libxkbcommon = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libxkbfile = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-libxml-namespacesupport-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-parser-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-sax-base-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-sax-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libxml-simple-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-namespacesupport-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-parser-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-sax-base-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-sax-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-simple-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
 RECIPE_MAINTAINER_pn-libxml2 = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-libxmu = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libxpm = "Armin Kuster <akuster@mvista.com>"
@@ -442,7 +436,7 @@
 RECIPE_MAINTAINER_pn-libxrender = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libxres = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libxscrnsaver = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-libxsettings-client = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxsettings-client = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-libxshmfence = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-libxslt = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-libxt = "Armin Kuster <akuster@mvista.com>"
@@ -462,10 +456,10 @@
 RECIPE_MAINTAINER_pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@windriver.com>"
 RECIPE_MAINTAINER_pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@windriver.com>"
 RECIPE_MAINTAINER_pn-llvm = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-logrotate = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-lrzsz = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-lsb = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-lsbinitscripts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-lsbinitscripts = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-lsbtest = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-lsof = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-ltp = "Yi Zhao <yi.zhao@windriver.com>"
@@ -478,35 +472,36 @@
 RECIPE_MAINTAINER_pn-lzop = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-m4 = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-m4-native = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-mailx = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-make = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-makedepend = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-makedevs = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-man = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-make-mod-scripts = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-man-db = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-man-pages = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-desktop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-desktop-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-keyboard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-panel-2 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-session = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-session-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-terminal = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-wm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-desktop = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-desktop-sato = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-keyboard = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-panel-2 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session-sato = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-terminal = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-wm = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-mc = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-mdadm = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-menu-cache = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-menu-cache = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-mesa = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
 RECIPE_MAINTAINER_pn-mesa-demos = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
 RECIPE_MAINTAINER_pn-mesa-gl = "Otavio Salvador <otavio.salvador@ossystems.com.br>"
+RECIPE_MAINTAINER_pn-meson = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-meta-environment = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-meta-environment-extsdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-meta-extsdk-toolchain = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-meta-ide-support = "Cristian Iorga <cristian.iorga@intel.com>"
 RECIPE_MAINTAINER_pn-meta-toolchain = "Cristian Iorga <cristian.iorga@intel.com>"
 RECIPE_MAINTAINER_pn-meta-world-pkgdata = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-mingetty = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-mingetty = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-mini-x-session = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-minicom = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-mkelfimage = "Alexander Kanavin <alexander.kanavin@intel.com>"
@@ -516,22 +511,22 @@
 RECIPE_MAINTAINER_pn-mktemp = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-mmc-utils = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-modutils-initscripts = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-modutils-initscripts = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-mpeg2dec = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-mpfr = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-mpg123 = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-msmtp = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-mtd-utils = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-mtdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mtdev = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-mtools = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-musl = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-mx-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-musl-utils = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-mx-1.0 = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-nativesdk-buildtools-perl-dummy = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-nativesdk-buildtools-perl-dummy = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-nativesdk-libtool = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-nativesdk-packagegroup-sdk-host = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-nativesdk-postinst-intercept = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Juro Bystricky <juro.bystricky@intel.com>"
 RECIPE_MAINTAINER_pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-neard = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-neon = "Maxin B. John <maxin.john@intel.com>"
@@ -539,14 +534,14 @@
 RECIPE_MAINTAINER_pn-netbase = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-nettle = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-nfs-export-root = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-nfs-utils = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-nfs-utils = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-ninja = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-nspr = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-nss = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-nss-myhostname = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-ofono = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-oh-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-oh-puzzles = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-openssh = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-openssl = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-opkg = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
@@ -561,31 +556,29 @@
 RECIPE_MAINTAINER_pn-ovmf-shell-image = "Ricardo Neri <ricardo.neri-calderon@linux.intel.com>"
 RECIPE_MAINTAINER_pn-p11-kit = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-package-index = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pango = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pango = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-parted = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-patch = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-patchelf = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-pax = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-pax-utils = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-pbzip2 = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-pciutils = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-pcmanfm = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-pcmciautils = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-perf = "Bruce Ashfield <bruce.ashfield@windriver.com>"
-RECIPE_MAINTAINER_pn-perl = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-perl-native = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-piglit = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-perl = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-perl-native = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-piglit = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-pigz = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-pinentry = "Armin Kuster <akuster808@gmail.com>"
-RECIPE_MAINTAINER_pn-pixman = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pixman = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-pixz = "Denys Dmytriyenko <denys@ti.com>"
+RECIPE_MAINTAINER_pn-pkgconf = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-pkgconfig = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-pm-utils = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-pointercal = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-pointercal-xinput = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-pong-clock = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pong-clock = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-popt = "Yi Zhao <yi.zhao@windriver.com>"
-RECIPE_MAINTAINER_pn-portmap = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-powertop = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-ppp = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-ppp-dialin = "Hongxu Jia <hongxu.jia@windriver.com>"
@@ -595,54 +588,37 @@
 RECIPE_MAINTAINER_pn-pseudo = "Mark Hatle <mark.hatle@windriver.com>"
 RECIPE_MAINTAINER_pn-psmisc = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-psplash = "Yi Zhao <yi.zhao@windriver.com>"
-RECIPE_MAINTAINER_pn-ptest-runner = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ptest-runner = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-pulseaudio = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-pulseaudio-client-conf-sato = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-python = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-async = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-distribute = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-git = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-gitdb = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-imaging = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-mako = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-nose = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-numpy = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pexpect = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-ptyprocess = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pycairo = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pycurl = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pygtk = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-pyrex = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-scons = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-scons-native = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-setuptools = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-six = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-smartpm = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-smmap = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-async = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-dbus = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-distribute = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-docutils = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-git = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-gitdb = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-iniparse = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-mako = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-nose = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-numpy = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-pip = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-pycairo = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-pygobject = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-setuptools = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-six = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-smmap = "Jose Lamego <jose.a.lamego@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qemu = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qemu-helper-native = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qemuwrapper-cross = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-puzzles = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-python = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-native = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-nose = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-numpy = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-scons = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-scons-native = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python-setuptools = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3 = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-async = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-dbus = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-docutils = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-git = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-gitdb = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-iniparse = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-mako = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-native = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-nose = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-numpy = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-pip = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-pycairo = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-pygobject = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-setuptools = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-six = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-python3-smmap = "Derek Straka <derek@asterius.io>"
+RECIPE_MAINTAINER_pn-qemu = "Juro Bystricky <juro.bystricky@intel.com>"
+RECIPE_MAINTAINER_pn-qemu-helper-native = "Juro Bystricky <juro.bystricky@intel.com>"
+RECIPE_MAINTAINER_pn-qemuwrapper-cross = "Juro Bystricky <juro.bystricky@intel.com>"
 RECIPE_MAINTAINER_pn-quilt = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-quilt-native = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-quota = "Maxin B. John <maxin.john@intel.com>"
@@ -659,27 +635,26 @@
 RECIPE_MAINTAINER_pn-rng-tools = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-rpm = "Mark Hatle <mark.hatle@windriver.com>"
 RECIPE_MAINTAINER_pn-rpmresolve = "Mark Hatle <mark.hatle@windriver.com>"
-RECIPE_MAINTAINER_pn-rsync = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-rsync = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-rt-tests = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-ruby = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ruby = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-run-postinsts = "Cristian Iorga <cristian.iorga@intel.com>"
 RECIPE_MAINTAINER_pn-rxvt-unicode = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-sato-icon-theme = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-sato-screenshot = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-sato-screenshot = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-sbc = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-screen = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-scrnsaverproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-sed = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-serf = "Maxin B. John <maxin.john@intel.com>"
-RECIPE_MAINTAINER_pn-setserial = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-settings-daemon = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-setserial = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-settings-daemon = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-shadow = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-shadow-securetty = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-shadow-sysroot = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-shared-mime-info = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-shared-mime-info = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-shutdown-desktop = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-signing-keys = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-slang = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-source-highlight = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-speex = "Tanu Kaskinen <tanuk@iki.fi>"
@@ -687,13 +662,12 @@
 RECIPE_MAINTAINER_pn-sqlite3 = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-squashfs-tools = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-startup-notification = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-stat = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-strace = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-stress = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-subversion = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-sudo = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-swabber-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-swig = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-swig = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-sysfsutils = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-sysklogd = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-syslinux = "Alexander Kanavin <alexander.kanavin@intel.com>"
@@ -702,29 +676,28 @@
 RECIPE_MAINTAINER_pn-systemd = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-systemd-boot = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-systemd-bootchart = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-bootconf = "California Sullivan <california.l.sullivan@intel.com>"
 RECIPE_MAINTAINER_pn-systemd-compat-units = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-systemtap = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-systemtap-uprobes = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-sysvinit = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-sysvinit-inittab = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-sysvinit = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
+RECIPE_MAINTAINER_pn-sysvinit-inittab = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-taglib = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-tar = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-tcf-agent = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-tcl = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-tcl = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-tcp-wrappers = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-testexport-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-texi2html = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-texinfo = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-texinfo-dummy-native = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-texinfo = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-texinfo-dummy-native = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-tiff = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-time = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER_pn-tiny-init = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-trace-cmd = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-tremor = "Tanu Kaskinen <tanuk@iki.fi>"
-RECIPE_MAINTAINER_pn-tslib = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-tzcode-native = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-tzdata = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-u-boot = "Marek Vasut <marek.vasut@gmail.com>"
@@ -736,7 +709,7 @@
 RECIPE_MAINTAINER_pn-unifdef = "Ross Burton <ross.burton@intel.com>"
 RECIPE_MAINTAINER_pn-uninative-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-unzip = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-update-rc.d = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
@@ -746,10 +719,10 @@
 RECIPE_MAINTAINER_pn-valgrind = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-videoproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-volatile-binds = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-vte = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-vulkan = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-vulkan-demos = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-waffle = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-vte = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-demos = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-waffle = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-watchdog = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-watchdog-config = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-wayland = "Denys Dmytriyenko <denys@ti.com>"
@@ -757,14 +730,14 @@
 RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-weston = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-weston-init = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-wget = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-which = "Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-wic-tools = "Ed Bartosh <ed.bartosh@linux.intel.com>"
+RECIPE_MAINTAINER_pn-wget = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-which = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-wic-tools = "Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>"
 RECIPE_MAINTAINER_pn-wireless-tools = "Changhyeok Bae <changhyeok.bae@lge.com>"
 RECIPE_MAINTAINER_pn-wpa-supplicant = "Changhyeok Bae <changhyeok.bae@lge.com>"
 RECIPE_MAINTAINER_pn-x11-common = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-x11perf = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-x264 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-x264 = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-xauth = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xcb-proto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xcb-util = "Armin Kuster <akuster@mvista.com>"
@@ -774,7 +747,7 @@
 RECIPE_MAINTAINER_pn-xcb-util-wm = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xcmiscproto = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xcursor-transparent-theme = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-xdg-utils = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xdg-utils = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-xdpyinfo = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xev = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xextproto = "Armin Kuster <akuster@mvista.com>"
@@ -816,7 +789,6 @@
 RECIPE_MAINTAINER_pn-xserver-xorg = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xset = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xtrans = "Armin Kuster <akuster@mvista.com>"
-RECIPE_MAINTAINER_pn-xtscal = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xuser-account = "Armin Kuster <akuster@mvista.com>"
 RECIPE_MAINTAINER_pn-xvideo-tests = "Maxin B. John <maxin.john@intel.com>"
 RECIPE_MAINTAINER_pn-xvinfo = "Armin Kuster <akuster@mvista.com>"
@@ -824,5 +796,4 @@
 RECIPE_MAINTAINER_pn-xz = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-yasm = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-zip = "Denys Dmytriyenko <denys@ti.com>"
-RECIPE_MAINTAINER_pn-zisofs-tools-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
 RECIPE_MAINTAINER_pn-zlib = "Denys Dmytriyenko <denys@ti.com>"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc b/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
index ab2062b..d66dd57 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
@@ -6,10 +6,11 @@
 # in the DISTRO="poky-lsb" configuration.
 
 GCCPIE ?= "--enable-default-pie"
+GLIBCPIE ?= "--enable-static-pie"
 
 # _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use
 # -O0 which then results in a compiler warning.
-lcl_maybe_fortify = "${@base_conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
+lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
 
 # Error on use of format strings that represent possible security problems
 SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security"
@@ -30,6 +31,7 @@
 SECURITY_CFLAGS_powerpc = "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_NOPIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libgcc_powerpc = ""
 GCCPIE_powerpc = ""
+GLIBCPIE_powerpc = ""
 
 # arm specific security flag issues
 SECURITY_CFLAGS_pn-glibc = ""
@@ -59,12 +61,8 @@
 SECURITY_LDFLAGS_remove_pn-gcc-runtime = "-fstack-protector-strong"
 SECURITY_LDFLAGS_remove_pn-glibc = "-fstack-protector-strong"
 SECURITY_LDFLAGS_remove_pn-glibc-initial = "-fstack-protector-strong"
-SECURITY_LDFLAGS_pn-xf86-video-fbdev = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-intel = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-omapfb = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-omap = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-vesa = "${SECURITY_X_LDFLAGS}"
-SECURITY_LDFLAGS_pn-xf86-video-vmware = "${SECURITY_X_LDFLAGS}"
+# All xorg module drivers need to be linked this way as well and are
+# handled in recipes-graphics/xorg-driver/xorg-driver-common.inc
 SECURITY_LDFLAGS_pn-xserver-xorg = "${SECURITY_X_LDFLAGS}"
 
 TARGET_CC_ARCH_append_pn-binutils = " ${SELECTED_OPTIMIZATION}"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc b/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
index 9ae2a93..54e1acf 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
@@ -26,4 +26,7 @@
     musl \
     musl-dbg \
     musl-dev \
+    musl-utils \
+    musl-utils-iconv \
+    bsd-headers-dev \
     "
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc b/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
index 1787a82..00399ae 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
@@ -24,10 +24,11 @@
 
 GCCVERSION ?= "7.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
-BINUVERSION ?= "2.29%"
+BINUVERSION ?= "2.30%"
 GDBVERSION ?= "8.0%"
-GLIBCVERSION ?= "2.26%"
-LINUXLIBCVERSION ?= "4.12%"
+GLIBCVERSION ?= "2.27%"
+LINUXLIBCVERSION ?= "4.15%"
+QEMUVERSION ?= "2.11%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
@@ -63,10 +64,21 @@
 PREFERRED_VERSION_glibc-initial            ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_nativesdk-glibc-initial  ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_cross-localedef-native   ?= "${GLIBCVERSION}"
-# don't use version earlier than 1.4 for gzip-native, as it's necessary for
-# some packages using an archive format incompatible with earlier gzip
-PREFERRED_VERSION_gzip-native ?= "1.8"
 
+
+PREFERRED_VERSION_qemu ?= "${QEMUVERSION}"
+PREFERRED_VERSION_qemu-native ?= "${QEMUVERSION}"
+PREFERRED_VERSION_nativesdk-qemu ?= "${QEMUVERSION}"
 # Setup suitable toolchain flags
 require conf/distro/include/as-needed.inc
 
+GOVERSION ?= "1.9%"
+PREFERRED_VERSION_virtual/${TARGET_PREFIX}go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-${TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-crosssdk-${SDK_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-native ?= "${GOVERSION}"
+PREFERRED_VERSION_go-runtime ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go-runtime ?= "${GOVERSION}"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc b/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
index cd5fc0b..a8e82cb 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
@@ -8,6 +8,6 @@
 
 UNINATIVE_MAXGLIBCVERSION = "2.27"
 
-UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/1.8/"
-UNINATIVE_CHECKSUM[i686] ?= "427ce522ec97f65c75fd89587d90ef789e8cbca4a617abc4b5822abb01c2d0ae"
-UNINATIVE_CHECKSUM[x86_64] ?= "de4947e98e09e1432d069311cc2093974ecb9138a714fd5466f73524de66a693"
+UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/1.9/"
+UNINATIVE_CHECKSUM[i686] ?= "83a4f927da81d9889ef0cbe5c12cb782e21c6cc11e6155600b94ff0c99576dce"
+UNINATIVE_CHECKSUM[x86_64] ?= "c26622a1f27dbf5b25de986b11584b5c5b2f322d9eb367f705a744f58a5561ec"
diff --git a/import-layers/yocto-poky/meta/conf/documentation.conf b/import-layers/yocto-poky/meta/conf/documentation.conf
index 081e726..254f8f1 100644
--- a/import-layers/yocto-poky/meta/conf/documentation.conf
+++ b/import-layers/yocto-poky/meta/conf/documentation.conf
@@ -8,7 +8,6 @@
 do_build[doc] = "Default task for a recipe - depends on all other normal tasks required to 'build' a recipe"
 do_bundle_initramfs[doc] = "Combines an initial ramdisk image and kernel together to form a single image"
 do_checkuri[doc] = "Validates the SRC_URI value"
-do_checkuriall[doc] = "Validates the SRC_URI value for all recipes required to build a target"
 do_clean[doc] = "Removes all output files for a target"
 do_cleanall[doc] = "Removes all output files, shared state cache, and downloaded source files for a target"
 do_cleansstate[doc] = "Removes all output files and shared state cache for a target"
@@ -22,7 +21,6 @@
 do_devshell[doc] = "Starts a shell with the environment set up for development/debugging"
 do_diffconfig[doc] = "Compares the old and new config files after running do_menuconfig for the kernel"
 do_fetch[doc] = "Fetches the source code"
-do_fetchall[doc] = "Fetches all remote sources required to build a target"
 do_install[doc] = "Copies files from the compilation directory to a holding area"
 do_install_ptest_base[doc] = "Copies the runtime test suite files from the compilation directory to a holding area"
 do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto style kernel"
@@ -247,6 +245,7 @@
 KERNEL_IMAGETYPES[doc] = "The list of types of kernel to build for a device, usually set by the machine configuration files and defaults to KERNEL_IMAGETYPE."
 KERNEL_MODULE_AUTOLOAD[doc] = "Lists kernel modules that need to be auto-loaded during boot"
 KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system expects to find module_conf_* values that specify configuration for each of the modules"
+KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 'kernel'."
 KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
@@ -333,7 +332,6 @@
 PREFERRED_PROVIDER[doc] = "If multiple recipes provide an item, this variable determines which recipe should be given preference."
 PREFERRED_VERSION[doc] = "If there are multiple versions of recipes available, this variable determines which recipe should be given preference."
 PREMIRRORS[doc] = "Specifies additional paths from which the OpenEmbedded build system gets source code."
-PRINC[doc] = "Causes the PR variable of .bbappend files to dynamically increment. This increment minimizes the impact of layer ordering. This variable defaults to '0'."
 PRIORITY[doc] = "Indicates the importance of a package.  The default value is 'optional'.  Other standard values are 'required', 'standard' and 'extra'."
 PROVIDES[doc] = "A list of aliases that a recipe also provides. These aliases are useful for satisfying dependencies of other recipes during the build as specified by DEPENDS."
 PRSERV_HOST[doc] = "The network based PR service host and port."
diff --git a/import-layers/yocto-poky/meta/conf/layer.conf b/import-layers/yocto-poky/meta/conf/layer.conf
index 0c3dae5..315fb93 100644
--- a/import-layers/yocto-poky/meta/conf/layer.conf
+++ b/import-layers/yocto-poky/meta/conf/layer.conf
@@ -7,11 +7,12 @@
 BBFILE_PATTERN_core = "^${LAYERDIR}/"
 BBFILE_PRIORITY_core = "5"
 
+LAYERSERIES_CORENAMES = "sumo"
+
 # This should only be incremented on significant changes that will
 # cause compatibility issues with other layers
 LAYERVERSION_core = "11"
-
-LAYERSERIES_CORENAMES = "rocko"
+LAYERSERIES_COMPAT_core = "sumo"
 
 BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
 
@@ -45,6 +46,11 @@
 "
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
+  *->quilt-native \
+  *->subversion-native \
+  *->git-native \
+  *->ccache-native \
+  *->icecc-create-env-native \
   gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc \
   gcc-cross-${TARGET_ARCH}->linux-libc-headers \
   ppp-dialin->ppp \
@@ -62,13 +68,14 @@
   initramfs-module-install->grub \
   initramfs-module-install->parted \
   initramfs-module-install->util-linux \
+  grub-efi->grub-bootconf \
   liberation-fonts->fontconfig \
   cantarell-fonts->fontconfig \
   gnome-icon-theme->librsvg \
   font-alias->font-util \
+  systemd-boot->systemd-bootconf \
   weston-init->weston \
   weston-init->kbd \
-  oprofile->virtual/kernel \
 "
 
 # We need to keep bitbake tools in PATH
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc
new file mode 100644
index 0000000..eab7171
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc
@@ -0,0 +1,53 @@
+# MicroBlaze architecture tune feature configuration
+
+# Architecture feature and override
+TUNEVALID[microblaze] = "MicroBlaze"
+MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}"
+
+# Endian
+TUNEVALID[bigendian] = "Use Microblaze Big Endian"
+TUNECONFLICTS[bigendian] += "v10.0"
+
+MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian", d)}"
+
+# General features
+TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter"
+TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions"
+TUNEVALID[reorder] = "Enable Reorder Instructions"
+TUNECONFLICTS[reorder] += "v8.00 v8.10 v8.20"
+
+# Core configuration tune optimizations
+TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)"
+TUNECONFLICTS[frequency-optimized] += "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6"
+
+# Feature compiler args
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-mxl-frequency", "", d)}"
+
+# Disable reorder for v8.30 if pattern-compare is not enabled
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
+        bb.utils.contains("TUNE_FEATURES", "v8.30", \
+            bb.utils.contains("TUNE_FEATURES", "pattern-compare", \
+                "-mxl-reorder", "-mno-xl-reorder", d), \
+            "-mxl-reorder", d), "-mno-xl-reorder", d)}"
+
+# Feature package architecture formatting
+MBPKGARCH_TUNE = ""
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}"
+MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}"
+
+# Additional features
+require conf/machine/include/microblaze/feature-microblaze-versions.inc
+require conf/machine/include/microblaze/feature-microblaze-math.inc
+
+# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess
+TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
+
+# Package Architecture formatting
+TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
new file mode 100644
index 0000000..a315166
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc
@@ -0,0 +1,33 @@
+# This include describes the math features (integer and floating point) that
+# are available for the MicroBlaze ISA
+
+TUNEVALID[multiply-low] = "Hardware multipler with 32 bit result"
+TUNEVALID[multiply-high] = "Hardware multipler with 64 bit result"
+TUNEVALID[divide-hard] = "Hardware divider"
+TUNEVALID[fpu-soft] = "Software FPU"
+TUNEVALID[fpu-hard] = "Hardware FPU in basic mode"
+TUNEVALID[fpu-hard-extended] = "Hardware FPU in extended mode (conversion and square root instructions)"
+
+TUNECONFLICTS[fpu-soft] = "fpu-hard fpu-hard-extended"
+TUNECONFLICTS[fpu-hard] = "fpu-soft"
+TUNECONFLICTS[fpu-hard-extended] = "fpu-soft"
+
+# Compiler args
+TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['multiply-low', 'multiply-high'], '-mno-xl-soft-mul', '-mxl-soft-mul', d)}"
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mxl-multiply-high', '', d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-mno-xl-soft-div', '-mxl-soft-div', d)}"
+
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', '', '', d)}"
+TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['fpu-hard', 'fpu-hard-extended'], '-mhard-float', '', d)}"
+TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-mxl-float-convert -mxl-float-sqrt', '', d)}"
+
+# Set target fpu (bitbake known target) to soft or hard (basic or extended)
+TARGET_FPU = "${@bb.utils.contains_any('TUNE_FEATURES', 'fpu-hard fpu-hard-extended', 'fpu-hard', 'fpu-soft', d)}"
+
+# Package Architecture formatting
+MBPKGARCH_MATH = ""
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mh', bb.utils.contains('TUNE_FEATURES', 'multiply-low', '-ml', '', d), d)}"
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-div', '', d)}"
+MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-fe', bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '-fb', '', d), d)}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
new file mode 100644
index 0000000..955674f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
@@ -0,0 +1,67 @@
+# MicroBlaze versions are defined as features, the features are setup to
+# conflict with other versions as well as unavailable features for particular
+# versions.
+#
+# Versions before v9.0 of MicroBlaze use a versioning scheme of "vX.YY.Z"
+# (where Z = [abc]). For v8.* versions of MicroBlaze the revision (Z) changes
+# did not affect ABI and are ignored by this tune configuration. Though this
+# format is expected by GCC including the revision, but this is defaulted to
+# ".a".
+#
+# Since v9.0 of MicroBlaze the revision (Z) part of versions was entirely
+# dropped and the version scheme was changed to "vX.Y".
+
+def microblaze_current_version(d, gcc = False):
+    import re
+    # find the current version, and convert it to major/minor integers
+    version = None
+    for t in (d.getVar("TUNE_FEATURES") or "").split():
+        m = re.search("^v(\d+)\.(\d+)", t)
+        if m:
+            version = int(m.group(1)), int(m.group(2))
+            break
+
+    # format the version string in generic or GCC specific formats
+    if version:
+        if version[0] <= 8:
+            return ("v%d.%02d" % version[0:2]) + (".a" if gcc else "")
+        else:
+            return "v%d.%d" % version[0:2]
+    return ""
+
+# MicroBlaze versions
+TUNEVALID[v8.00] = "MicroBlaze version 8.00"
+TUNEVALID[v8.10] = "MicroBlaze version 8.10"
+TUNEVALID[v8.20] = "MicroBlaze version 8.20"
+TUNEVALID[v8.30] = "MicroBlaze version 8.30"
+TUNEVALID[v8.40] = "MicroBlaze version 8.40"
+TUNEVALID[v8.50] = "MicroBlaze version 8.50"
+TUNEVALID[v9.0]  = "MicroBlaze version 9.0"
+TUNEVALID[v9.1]  = "MicroBlaze version 9.1"
+TUNEVALID[v9.2]  = "MicroBlaze version 9.2"
+TUNEVALID[v9.3]  = "MicroBlaze version 9.3"
+TUNEVALID[v9.4]  = "MicroBlaze version 9.4"
+TUNEVALID[v9.5]  = "MicroBlaze version 9.5"
+TUNEVALID[v9.6]  = "MicroBlaze version 9.6"
+TUNEVALID[v10.0] = "MicroBlaze version 10.0"
+
+# Version conflict matrix
+TUNECONFLICTS[v8.00] = ""
+TUNECONFLICTS[v8.10] = "v8.00"
+TUNECONFLICTS[v8.20] = "v8.00 v8.10"
+TUNECONFLICTS[v8.30] = "v8.00 v8.10 v8.20"
+TUNECONFLICTS[v8.40] = "v8.00 v8.10 v8.20 v8.30"
+TUNECONFLICTS[v8.50] = "v8.00 v8.10 v8.20 v8.30 v8.40"
+TUNECONFLICTS[v9.0]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50"
+TUNECONFLICTS[v9.1]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0"
+TUNECONFLICTS[v9.2]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1"
+TUNECONFLICTS[v9.3]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2"
+TUNECONFLICTS[v9.4]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3"
+TUNECONFLICTS[v9.5]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4"
+TUNECONFLICTS[v9.6]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5"
+TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6"
+
+# Version flags
+TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}"
+MBPKGARCH_VERSION = "-${@microblaze_current_version(d)}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
index e64b0c8..aa332fe 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
@@ -16,7 +16,7 @@
 IMAGE_FSTYPES += "tar.bz2 ext4"
 
 # Don't include kernels in standard images
-RDEPENDS_kernel-base = ""
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
 
 # Use a common kernel recipe for all QEMU machines
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
@@ -27,6 +27,4 @@
 KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
 KERNEL_FEATURES_append_pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc"
 
-MACHINE_EXTRA_RRECOMMENDS += "rng-tools"
-
 IMAGE_CLASSES += "qemuboot"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc
index f4ba43f..c686bb4 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc
@@ -8,11 +8,8 @@
 #
 DEFAULTTUNE ?= "core2-32"
 
-# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
-X86ARCH32 ?= "i686"
-
 # Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
-require conf/machine/include/tune-i586.inc
+require conf/machine/include/tune-i686.inc
 
 # Extra tune features
 TUNEVALID[core2] = "Enable core2 specific processor optimizations"
@@ -23,16 +20,19 @@
 TUNE_FEATURES_tune-core2-32 = "${TUNE_FEATURES_tune-x86} core2"
 BASE_LIB_tune-core2-32 = "lib"
 TUNE_PKGARCH_tune-core2-32 = "core2-32"
-PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i586} core2-32"
+PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i686} core2-32"
+QEMU_EXTRAOPTIONS_core2-32 = " -cpu core2duo"
 
 AVAILTUNES += "core2-64"
 TUNE_FEATURES_tune-core2-64 = "${TUNE_FEATURES_tune-x86-64} core2"
 BASE_LIB_tune-core2-64 = "lib64"
 TUNE_PKGARCH_tune-core2-64 = "core2-64"
 PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64} core2-64"
+QEMU_EXTRAOPTIONS_core2-64 = " -cpu core2duo"
 
 AVAILTUNES += "core2-64-x32"
 TUNE_FEATURES_tune-core2-64-x32 = "${TUNE_FEATURES_tune-x86-64-x32} core2"
 BASE_LIB_tune-core2-64-x32 = "libx32"
 TUNE_PKGARCH_tune-core2-64-x32 = "core2-64-x32"
 PACKAGE_EXTRA_ARCHS_tune-core2-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-x32"
+QEMU_EXTRAOPTIONS_core2-64-x32 = " -cpu core2duo"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc
new file mode 100644
index 0000000..bdb4799
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc
@@ -0,0 +1,27 @@
+#
+# The i686 CPU family was introduced with the Intel Pentium Pro in 1995.
+# It has as required feature flags: fpu tsc cx8 cmov.
+#
+# It is the minimum CPU required by the Debian i386 port.
+# https://lists.debian.org/debian-devel-announce/2016/05/msg00001.html
+#
+#
+
+DEFAULTTUNE ?= "i686"
+
+# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
+X86ARCH32 ?= "i686"
+
+# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
+require conf/machine/include/tune-i586.inc
+
+# Extra tune features
+TUNEVALID[i686] = "Enable i686 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i686', ' -march=i686', '', d)}"
+
+# Extra tune selections
+AVAILTUNES += "i686"
+TUNE_FEATURES_tune-i686 = "${TUNE_FEATURES_tune-x86} i686"
+BASE_LIB_tune-i686 = "lib"
+TUNE_PKGARCH_tune-i686 = "i686"
+PACKAGE_EXTRA_ARCHS_tune-i686 = "${PACKAGE_EXTRA_ARCHS_tune-i586} i686"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc
new file mode 100644
index 0000000..41f0afe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc
@@ -0,0 +1,8 @@
+DEFAULTTUNE ?= "microblaze"
+
+require conf/machine/include/microblaze/arch-microblaze.inc
+
+AVAILTUNES += "microblaze"
+TUNE_FEATURES_tune-microblaze = "microblaze"
+PACKAGE_EXTRA_ARCHS_tune-microblaze = "${TUNE_PKGARCH}"
+
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
index 023eb5e..f8aacea 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
@@ -21,7 +21,7 @@
 # kernel-related variables
 #
 PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ??= "4.12%"
+PREFERRED_VERSION_linux-yocto ??= "4.15%"
 
 #
 # XSERVER subcomponents, used to build the XSERVER variable
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf b/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
index c8932dd..9403b1e 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
@@ -16,5 +16,5 @@
 QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet -device virtio-rng-pci"
-PREFERRED_VERSION_linux-yocto ??= "4.12%"
-QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
+PREFERRED_VERSION_linux-yocto ??= "4.15%"
+QB_DTB = "${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
diff --git a/import-layers/yocto-poky/meta/files/common-licenses/BSD-1-Clause b/import-layers/yocto-poky/meta/files/common-licenses/BSD-1-Clause
new file mode 100644
index 0000000..ded8897
--- /dev/null
+++ b/import-layers/yocto-poky/meta/files/common-licenses/BSD-1-Clause
@@ -0,0 +1,9 @@
+
+Copyright (c) <YEAR>, <OWNER>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/import-layers/yocto-poky/meta/files/ptest-perl/run-ptest b/import-layers/yocto-poky/meta/files/ptest-perl/run-ptest
new file mode 100644
index 0000000..c9f9ca9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/files/ptest-perl/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+    perl $case >$case.output 2>&1
+    ret=$?
+    cat $case.output
+    if [ $ret -ne 0 ]; then
+        echo "FAIL: ${case%.t}"
+    elif grep -i 'SKIP' $case.output; then
+        echo "SKIP: ${case%.t}"
+    else
+        echo "PASS: ${case%.t}"
+    fi
+
+    rm -f $case.output
+done
diff --git a/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh b/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
index 91804ec..f7ab430 100644
--- a/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
+++ b/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
@@ -259,6 +259,14 @@
 	$SUDO_EXEC rm -f ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
 fi
 
+# Execute post-relocation script
+post_relocate="$target_sdk_dir/post-relocate-setup.sh"
+if [ -e "$post_relocate" ]; then
+	$SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate
+	$SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
+	$SUDO_EXEC rm -f $post_relocate
+fi
+
 echo "SDK has been successfully set up and is ready to be used."
 echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g."
 for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
diff --git a/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py b/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
index 3e86a46..b0365ab 100644
--- a/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
+++ b/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
@@ -36,10 +36,29 @@
 related_fields['RDEPENDS'] = ['DEPENDS']
 related_fields['RRECOMMENDS'] = ['DEPENDS']
 related_fields['FILELIST'] = ['FILES']
-related_fields['PKGSIZE'] = ['FILELIST']
 related_fields['files-in-image.txt'] = ['installed-package-names.txt', 'USER_CLASSES', 'IMAGE_CLASSES', 'ROOTFS_POSTPROCESS_COMMAND', 'IMAGE_POSTPROCESS_COMMAND']
 related_fields['installed-package-names.txt'] = ['IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS', 'NO_RECOMMENDATIONS', 'PACKAGE_EXCLUDE']
 
+colours = {
+    'colour_default': '',
+    'colour_add':     '',
+    'colour_remove':  '',
+}
+
+def init_colours(use_colours):
+    global colours
+    if use_colours:
+        colours = {
+            'colour_default': '\033[0m',
+            'colour_add':     '\033[1;32m',
+            'colour_remove':  '\033[1;31m',
+        }
+    else:
+        colours = {
+            'colour_default': '',
+            'colour_add':     '',
+            'colour_remove':  '',
+        }
 
 class ChangeRecord:
     def __init__(self, path, fieldname, oldvalue, newvalue, monitored):
@@ -79,7 +98,17 @@
                                 for name in adirs - bdirs]
             files_ba = [(name, sorted(os.path.basename(item) for item in bitems if os.path.dirname(item) == name)) \
                                 for name in bdirs - adirs]
-            renamed_dirs = [(dir1, dir2) for dir1, files1 in files_ab for dir2, files2 in files_ba if files1 == files2]
+            renamed_dirs = []
+            for dir1, files1 in files_ab:
+                rename = False
+                for dir2, files2 in files_ba:
+                    if files1 == files2 and not rename:
+                        renamed_dirs.append((dir1,dir2))
+                        # Make sure that we don't use this (dir, files) pair again.
+                        files_ba.remove((dir2,files2))
+                        # If a dir has already been found to have a rename, stop and go no further.
+                        rename = True
+
             # remove files that belong to renamed dirs from aitems and bitems
             for dir1, dir2 in renamed_dirs:
                 aitems = [item for item in aitems if os.path.dirname(item) not in (dir1, dir2)]
@@ -88,6 +117,7 @@
 
         if self.fieldname in list_fields or self.fieldname in list_order_fields:
             renamed_dirs = []
+            changed_order = False
             if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
                 (depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue)
                 aitems = pkglist_combine(depvera)
@@ -101,22 +131,33 @@
             removed = list(set(aitems) - set(bitems))
             added = list(set(bitems) - set(aitems))
 
+            if not removed and not added:
+                depvera = bb.utils.explode_dep_versions2(self.oldvalue, sort=False)
+                depverb = bb.utils.explode_dep_versions2(self.newvalue, sort=False)
+                for i, j in zip(depvera.items(), depverb.items()):
+                    if i[0] != j[0]:
+                        changed_order = True
+                        break
+
             lines = []
             if renamed_dirs:
                 for dfrom, dto in renamed_dirs:
-                    lines.append('directory renamed %s -> %s' % (dfrom, dto))
+                    lines.append('directory renamed {colour_remove}{}{colour_default} -> {colour_add}{}{colour_default}'.format(dfrom, dto, **colours))
             if removed or added:
                 if removed and not bitems:
-                    lines.append('removed all items "%s"' % ' '.join(removed))
+                    lines.append('removed all items "{colour_remove}{}{colour_default}"'.format(' '.join(removed), **colours))
                 else:
                     if removed:
-                        lines.append('removed "%s"' % ' '.join(removed))
+                        lines.append('removed "{colour_remove}{value}{colour_default}"'.format(value=' '.join(removed), **colours))
                     if added:
-                        lines.append('added "%s"' % ' '.join(added))
+                        lines.append('added "{colour_add}{value}{colour_default}"'.format(value=' '.join(added), **colours))
             else:
                 lines.append('changed order')
 
-            out = '%s: %s' % (self.fieldname, ', '.join(lines))
+            if not (removed or added or changed_order):
+                out = ''
+            else:
+                out = '%s: %s' % (self.fieldname, ', '.join(lines))
 
         elif self.fieldname in numeric_fields:
             aval = int(self.oldvalue or 0)
@@ -125,9 +166,9 @@
                 percentchg = ((bval - aval) / float(aval)) * 100
             else:
                 percentchg = 100
-            out = '%s changed from %s to %s (%s%d%%)' % (self.fieldname, self.oldvalue or "''", self.newvalue or "''", '+' if percentchg > 0 else '', percentchg)
+            out = '{} changed from {colour_remove}{}{colour_default} to {colour_add}{}{colour_default} ({}{:.0f}%)'.format(self.fieldname, self.oldvalue or "''", self.newvalue or "''", '+' if percentchg > 0 else '', percentchg, **colours)
         elif self.fieldname in defaultval_map:
-            out = '%s changed from %s to %s' % (self.fieldname, self.oldvalue, self.newvalue)
+            out = '{} changed from {colour_remove}{}{colour_default} to {colour_add}{}{colour_default}'.format(self.fieldname, self.oldvalue, self.newvalue, **colours)
             if self.fieldname == 'PKG' and '[default]' in self.newvalue:
                 out += ' - may indicate debian renaming failure'
         elif self.fieldname in ['pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm']:
@@ -163,7 +204,7 @@
             else:
                 out = ''
         else:
-            out = '%s changed from "%s" to "%s"' % (self.fieldname, self.oldvalue, self.newvalue)
+            out = '{} changed from "{colour_remove}{}{colour_default}" to "{colour_add}{}{colour_default}"'.format(self.fieldname, self.oldvalue, self.newvalue, **colours)
 
         if self.related:
             for chg in self.related:
diff --git a/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py b/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
index ac2fae1..4b94806 100644
--- a/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
+++ b/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
@@ -95,7 +95,7 @@
                     destname = os.path.join(layerdestpath, f_basename)
                     _smart_copy(f, destname)
             else:
-                if os.path.exists(layerdestpath):
+                if os.path.exists(os.path.join(layerdestpath, 'conf/layer.conf')):
                     bb.note("Skipping layer %s, already handled" % layer)
                 else:
                     _smart_copy(layer, layerdestpath)
diff --git a/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py b/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
index 9cc88f0..b172729 100644
--- a/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
+++ b/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
@@ -12,6 +12,7 @@
         self.gpg_path = d.getVar('GPG_PATH')
         self.gpg_version = self.get_gpg_version()
         self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
+        self.gpg_agent_bin = bb.utils.which(os.getenv('PATH'), "gpg-agent")
 
     def export_pubkey(self, output_file, keyid, armor=True):
         """Export GPG public key to a file"""
@@ -31,7 +32,7 @@
         """Sign RPM files"""
 
         cmd = self.rpm_bin + " --addsign --define '_gpg_name %s'  " % keyid
-        gpg_args = '--no-permission-warning --batch --passphrase=%s' % passphrase
+        gpg_args = '--no-permission-warning --batch --passphrase=%s --agent-program=%s|--auto-expand-secmem' % (passphrase, self.gpg_agent_bin)
         if self.gpg_version > (2,1,):
             gpg_args += ' --pinentry-mode=loopback'
         cmd += "--define '_gpg_sign_cmd_extra_args %s' " % gpg_args
@@ -71,6 +72,9 @@
         if self.gpg_version > (2,1,):
             cmd += ['--pinentry-mode', 'loopback']
 
+        if self.gpg_agent_bin:
+            cmd += ["--agent-program=%s|--auto-expand-secmem" % (self.gpg_agent_bin)]
+
         cmd += [input_file]
 
         try:
@@ -99,7 +103,7 @@
         import subprocess
         try:
             ver_str = subprocess.check_output((self.gpg_bin, "--version", "--no-permission-warning")).split()[2].decode("utf-8")
-            return tuple([int(i) for i in ver_str.split('.')])
+            return tuple([int(i) for i in ver_str.split("-")[0].split('.')])
         except subprocess.CalledProcessError as e:
             raise bb.build.FuncFailed("Could not get gpg version: %s" % e)
 
diff --git a/import-layers/yocto-poky/meta/lib/oe/manifest.py b/import-layers/yocto-poky/meta/lib/oe/manifest.py
index 60c49be..674303c 100644
--- a/import-layers/yocto-poky/meta/lib/oe/manifest.py
+++ b/import-layers/yocto-poky/meta/lib/oe/manifest.py
@@ -274,8 +274,8 @@
                     if pkg_list is not None:
                         pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
 
-            for pkg_type in pkgs:
-                for pkg in pkgs[pkg_type].split():
+            for pkg_type in sorted(pkgs):
+                for pkg in sorted(pkgs[pkg_type].split()):
                     manifest.write("%s,%s\n" % (pkg_type, pkg))
 
     def create_final(self):
diff --git a/import-layers/yocto-poky/meta/lib/oe/package.py b/import-layers/yocto-poky/meta/lib/oe/package.py
index 1e5c3aa..4f3e21a 100644
--- a/import-layers/yocto-poky/meta/lib/oe/package.py
+++ b/import-layers/yocto-poky/meta/lib/oe/package.py
@@ -72,8 +72,7 @@
     # 16 - kernel module
     def is_elf(path):
         exec_type = 0
-        ret, result = oe.utils.getstatusoutput(
-            "file \"%s\"" % path.replace("\"", "\\\""))
+        ret, result = oe.utils.getstatusoutput("file -b '%s'" % path)
 
         if ret:
             bb.error("split_and_strip_files: 'file %s' failed" % path)
diff --git a/import-layers/yocto-poky/meta/lib/oe/package_manager.py b/import-layers/yocto-poky/meta/lib/oe/package_manager.py
index ed8fec8..2d8aeba 100644
--- a/import-layers/yocto-poky/meta/lib/oe/package_manager.py
+++ b/import-layers/yocto-poky/meta/lib/oe/package_manager.py
@@ -12,6 +12,7 @@
 import oe.path
 import string
 from oe.gpg_sign import get_signer
+import hashlib
 
 # this can be used by all PM backends to create the index files in parallel
 def create_index(arg):
@@ -22,12 +23,12 @@
     if result:
         bb.note(result)
 
-"""
-This method parse the output from the package managerand return
-a dictionary with the information of the packages. This is used
-when the packages are in deb or ipk format.
-"""
 def opkg_query(cmd_output):
+    """
+    This method parse the output from the package managerand return
+    a dictionary with the information of the packages. This is used
+    when the packages are in deb or ipk format.
+    """
     verregex = re.compile(' \([=<>]* [^ )]*\)')
     output = dict()
     pkg = ""
@@ -83,6 +84,11 @@
 
     return output
 
+# Note: this should be bb.fatal in the future.
+def failed_postinsts_warn(pkgs, log_path):
+    bb.warn("""Intentionally failing postinstall scriptlets of %s to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().
+If deferring to first boot wasn't the intent, then scriptlet failure may mean an issue in the recipe, or a regression elsewhere.
+Details of the failure are in %s.""" %(pkgs, log_path))
 
 class Indexer(object, metaclass=ABCMeta):
     def __init__(self, d, deploy_dir):
@@ -96,13 +102,16 @@
 
 class RpmIndexer(Indexer):
     def write_index(self):
+        self.do_write_index(self.deploy_dir)
+
+    def do_write_index(self, deploy_dir):
         if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
             signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
         else:
             signer = None
 
         createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c")
-        result = create_index("%s --update -q %s" % (createrepo_c, self.deploy_dir))
+        result = create_index("%s --update -q %s" % (createrepo_c, deploy_dir))
         if result:
             bb.fatal(result)
 
@@ -110,17 +119,28 @@
         if signer:
             sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
             is_ascii_sig = (sig_type.upper() != "BIN")
-            signer.detach_sign(os.path.join(self.deploy_dir, 'repodata', 'repomd.xml'),
+            signer.detach_sign(os.path.join(deploy_dir, 'repodata', 'repomd.xml'),
                                self.d.getVar('PACKAGE_FEED_GPG_NAME'),
                                self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
                                armor=is_ascii_sig)
 
+class RpmSubdirIndexer(RpmIndexer):
+    def write_index(self):
+        bb.note("Generating package index for %s" %(self.deploy_dir))
+        self.do_write_index(self.deploy_dir)
+        for entry in os.walk(self.deploy_dir):
+            if os.path.samefile(self.deploy_dir, entry[0]):
+                for dir in entry[1]:
+                    if dir != 'repodata':
+                        dir_path = oe.path.join(self.deploy_dir, dir)
+                        bb.note("Generating package index for %s" %(dir_path))
+                        self.do_write_index(dir_path)
 
 class OpkgIndexer(Indexer):
     def write_index(self):
         arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS",
                      "SDK_PACKAGE_ARCHS",
-                     "MULTILIB_ARCHS"]
+                     ]
 
         opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index")
         if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
@@ -307,39 +327,103 @@
     This is an abstract class. Do not instantiate this directly.
     """
 
-    def __init__(self, d):
+    def __init__(self, d, target_rootfs):
         self.d = d
+        self.target_rootfs = target_rootfs
         self.deploy_dir = None
         self.deploy_lock = None
+        self._initialize_intercepts()
 
-    """
-    Update the package manager package database.
-    """
+    def _initialize_intercepts(self):
+        bb.note("Initializing intercept dir for %s" % self.target_rootfs)
+        postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR")
+        if not postinst_intercepts_dir:
+            postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
+        # As there might be more than one instance of PackageManager operating at the same time
+        # we need to isolate the intercept_scripts directories from each other,
+        # hence the ugly hash digest in dir name.
+        self.intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
+                                      "intercept_scripts-%s" %(hashlib.sha256(self.target_rootfs.encode()).hexdigest()) )
+
+        bb.utils.remove(self.intercepts_dir, True)
+        shutil.copytree(postinst_intercepts_dir, self.intercepts_dir)
+
+    @abstractmethod
+    def _handle_intercept_failure(self, failed_script):
+        pass
+
+    def _postpone_to_first_boot(self, postinst_intercept_hook):
+        with open(postinst_intercept_hook) as intercept:
+            registered_pkgs = None
+            for line in intercept.read().split("\n"):
+                m = re.match("^##PKGS:(.*)", line)
+                if m is not None:
+                    registered_pkgs = m.group(1).strip()
+                    break
+
+            if registered_pkgs is not None:
+                bb.note("If an image is being built, the postinstalls for the following packages "
+                        "will be postponed for first boot: %s" %
+                        registered_pkgs)
+
+                # call the backend dependent handler
+                self._handle_intercept_failure(registered_pkgs)
+
+
+    def run_intercepts(self):
+        intercepts_dir = self.intercepts_dir
+
+        bb.note("Running intercept scripts:")
+        os.environ['D'] = self.target_rootfs
+        os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
+        for script in os.listdir(intercepts_dir):
+            script_full = os.path.join(intercepts_dir, script)
+
+            if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
+                continue
+
+            if script == "delay_to_first_boot":
+                self._postpone_to_first_boot(script_full)
+                continue
+
+            bb.note("> Executing %s intercept ..." % script)
+
+            try:
+                output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
+                if output: bb.note(output.decode("utf-8"))
+            except subprocess.CalledProcessError as e:
+                bb.warn("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+                bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
+                self._postpone_to_first_boot(script_full)
+
     @abstractmethod
     def update(self):
+        """
+        Update the package manager package database.
+        """
         pass
 
-    """
-    Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
-    True, installation failures are ignored.
-    """
     @abstractmethod
     def install(self, pkgs, attempt_only=False):
+        """
+        Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
+        True, installation failures are ignored.
+        """
         pass
 
-    """
-    Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
-    is False, the any dependencies are left in place.
-    """
     @abstractmethod
     def remove(self, pkgs, with_dependencies=True):
+        """
+        Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
+        is False, then any dependencies are left in place.
+        """
         pass
 
-    """
-    This function creates the index files
-    """
     @abstractmethod
     def write_index(self):
+        """
+        This function creates the index files
+        """
         pass
 
     @abstractmethod
@@ -350,30 +434,28 @@
     def list_installed(self):
         pass
 
-    """
-    Returns the path to a tmpdir where resides the contents of a package.
-
-    Deleting the tmpdir is responsability of the caller.
-
-    """
     @abstractmethod
     def extract(self, pkg):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+        Deleting the tmpdir is responsability of the caller.
+        """
         pass
 
-    """
-    Add remote package feeds into repository manager configuration. The parameters
-    for the feeds are set by feed_uris, feed_base_paths and feed_archs.
-    See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
-    for their description.
-    """
     @abstractmethod
     def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        """
+        Add remote package feeds into repository manager configuration. The parameters
+        for the feeds are set by feed_uris, feed_base_paths and feed_archs.
+        See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
+        for their description.
+        """
         pass
 
-    """
-    Install all packages that match a glob.
-    """
     def install_glob(self, globs, sdk=False):
+        """
+        Install all packages that match a glob.
+        """
         # TODO don't have sdk here but have a property on the superclass
         # (and respect in install_complementary)
         if sdk:
@@ -393,14 +475,14 @@
                          "'%s' returned %d:\n%s" %
                          (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
 
-    """
-    Install complementary packages based upon the list of currently installed
-    packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
-    these packages, if they don't exist then no error will occur.  Note: every
-    backend needs to call this function explicitly after the normal package
-    installation
-    """
     def install_complementary(self, globs=None):
+        """
+        Install complementary packages based upon the list of currently installed
+        packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
+        these packages, if they don't exist then no error will occur.  Note: every
+        backend needs to call this function explicitly after the normal package
+        installation
+        """
         if globs is None:
             globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY')
             split_linguas = set()
@@ -457,13 +539,13 @@
 
         self.deploy_lock = None
 
-    """
-    Construct URIs based on the following pattern: uri/base_path where 'uri'
-    and 'base_path' correspond to each element of the corresponding array
-    argument leading to len(uris) x len(base_paths) elements on the returned
-    array
-    """
     def construct_uris(self, uris, base_paths):
+        """
+        Construct URIs based on the following pattern: uri/base_path where 'uri'
+        and 'base_path' correspond to each element of the corresponding array
+        argument leading to len(uris) x len(base_paths) elements on the returned
+        array
+        """
         def _append(arr1, arr2, sep='/'):
             res = []
             narr1 = [a.rstrip(sep) for a in arr1]
@@ -477,18 +559,98 @@
             return res
         return _append(uris, base_paths)
 
+def create_packages_dir(d, rpm_repo_dir, deploydir, taskname, filterbydependencies):
+    """
+    Go through our do_package_write_X dependencies and hardlink the packages we depend
+    upon into the repo directory. This prevents us seeing other packages that may
+    have been built that we don't depend upon and also packages for architectures we don't
+    support.
+    """
+    import errno
+
+    taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+    mytaskname = d.getVar("BB_RUNTASK")
+    pn = d.getVar("PN")
+    seendirs = set()
+    multilibs = {}
+   
+    rpm_subrepo_dir = oe.path.join(rpm_repo_dir, "rpm")
+
+    bb.utils.remove(rpm_subrepo_dir, recurse=True)
+    bb.utils.mkdirhier(rpm_subrepo_dir)
+
+    # Detect bitbake -b usage
+    nodeps = d.getVar("BB_LIMITEDDEPS") or False
+    if nodeps or not filterbydependencies:
+        oe.path.symlink(deploydir, rpm_subrepo_dir, True)
+        return
+
+    start = None
+    for dep in taskdepdata:
+        data = taskdepdata[dep]
+        if data[1] == mytaskname and data[0] == pn:
+            start = dep
+            break
+    if start is None:
+        bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+    rpmdeps = set()
+    start = [start]
+    seen = set(start)
+    # Support direct dependencies (do_rootfs -> rpms)
+    # or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> rpms)
+    while start:
+        next = []
+        for dep2 in start:
+            for dep in taskdepdata[dep2][3]:
+                if taskdepdata[dep][0] != pn:
+                    if "do_" + taskname in dep:
+                        rpmdeps.add(dep)
+                elif dep not in seen:
+                    next.append(dep)
+                    seen.add(dep)
+        start = next
+
+    for dep in rpmdeps:
+        c = taskdepdata[dep][0]
+        manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs)
+        if not manifest:
+            bb.fatal("No manifest generated from: %s in %s" % (c, taskdepdata[dep][2]))
+        if not os.path.exists(manifest):
+            continue
+        with open(manifest, "r") as f:
+            for l in f:
+                l = l.strip()
+                dest = l.replace(deploydir, "")
+                dest = rpm_subrepo_dir + dest
+                if l.endswith("/"):
+                    if dest not in seendirs:
+                        bb.utils.mkdirhier(dest)
+                        seendirs.add(dest)
+                    continue
+                # Try to hardlink the file, copy if that fails
+                destdir = os.path.dirname(dest)
+                if destdir not in seendirs:
+                    bb.utils.mkdirhier(destdir)
+                    seendirs.add(destdir)
+                try:
+                    os.link(l, dest)
+                except OSError as err:
+                    if err.errno == errno.EXDEV:
+                        bb.utils.copyfile(l, dest)
+                    else:
+                        raise
+
 class RpmPM(PackageManager):
     def __init__(self,
                  d,
                  target_rootfs,
                  target_vendor,
                  task_name='target',
-                 providename=None,
                  arch_var=None,
                  os_var=None,
-                 rpm_repo_workdir="oe-rootfs-repo"):
-        super(RpmPM, self).__init__(d)
-        self.target_rootfs = target_rootfs
+                 rpm_repo_workdir="oe-rootfs-repo",
+                 filterbydependencies=True):
+        super(RpmPM, self).__init__(d, target_rootfs)
         self.target_vendor = target_vendor
         self.task_name = task_name
         if arch_var == None:
@@ -501,8 +663,7 @@
             self.primary_arch = self.d.getVar('MACHINE_ARCH')
 
         self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), rpm_repo_workdir)
-        bb.utils.mkdirhier(self.rpm_repo_dir)
-        oe.path.symlink(self.d.getVar('DEPLOY_DIR_RPM'), oe.path.join(self.rpm_repo_dir, "rpm"), True)
+        create_packages_dir(self.d, self.rpm_repo_dir, d.getVar("DEPLOY_DIR_RPM"), "package_write_rpm", filterbydependencies)
 
         self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name)
         if not os.path.exists(self.d.expand('${T}/saved_packaging_data')):
@@ -577,7 +738,7 @@
             gpg_opts += 'repo_gpgcheck=1\n'
             gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME'))
 
-        if self.d.getVar('RPM_SIGN_PACKAGES') == '0':
+        if self.d.getVar('RPM_SIGN_PACKAGES') != '1':
             gpg_opts += 'gpgcheck=0\n'
 
         bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
@@ -602,8 +763,7 @@
         os.environ['OFFLINE_ROOT'] = self.target_rootfs
         os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
         os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = oe.path.join(self.d.getVar('WORKDIR'),
-                                                   "intercept_scripts")
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
 
@@ -628,6 +788,8 @@
             if line.startswith("Non-fatal POSTIN scriptlet failure in rpm package"):
                 failed_scriptlets_pkgnames[line.split()[-1]] = True
 
+        if len(failed_scriptlets_pkgnames) > 0:
+            failed_postinsts_warn(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
         for pkg in failed_scriptlets_pkgnames.keys():
             self.save_rpmpostinst(pkg)
 
@@ -730,6 +892,7 @@
                              "--setopt=logdir=%s" % (self.d.getVar('T'))
                             ]
         cmd = [dnf_cmd] + standard_dnf_args + dnf_args
+        bb.note('Running %s' % ' '.join(cmd))
         try:
             output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
             if print_output:
@@ -782,6 +945,14 @@
         open(saved_script_name, 'w').write(output)
         os.chmod(saved_script_name, 0o755)
 
+    def _handle_intercept_failure(self, registered_pkgs):
+        rpm_postinsts_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
+        bb.utils.mkdirhier(rpm_postinsts_dir)
+
+        # Save the package postinstalls in /etc/rpm-postinsts
+        for pkg in registered_pkgs.split():
+            self.save_rpmpostinst(pkg)
+
     def extract(self, pkg):
         output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
         pkg_name = output.splitlines()[-1]
@@ -819,18 +990,18 @@
 
 
 class OpkgDpkgPM(PackageManager):
-    """
-    This is an abstract class. Do not instantiate this directly.
-    """
-    def __init__(self, d):
-        super(OpkgDpkgPM, self).__init__(d)
+    def __init__(self, d, target_rootfs):
+        """
+        This is an abstract class. Do not instantiate this directly.
+        """
+        super(OpkgDpkgPM, self).__init__(d, target_rootfs)
 
-    """
-    Returns a dictionary with the package info.
-
-    This method extracts the common parts for Opkg and Dpkg
-    """
     def package_info(self, pkg, cmd):
+        """
+        Returns a dictionary with the package info.
+
+        This method extracts the common parts for Opkg and Dpkg
+        """
 
         try:
             output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
@@ -839,14 +1010,14 @@
                      "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
         return opkg_query(output)
 
-    """
-    Returns the path to a tmpdir where resides the contents of a package.
-
-    Deleting the tmpdir is responsability of the caller.
-
-    This method extracts the common parts for Opkg and Dpkg
-    """
     def extract(self, pkg, pkg_info):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+
+        Deleting the tmpdir is responsability of the caller.
+
+        This method extracts the common parts for Opkg and Dpkg
+        """
 
         ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
         tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
@@ -885,12 +1056,13 @@
 
         return tmp_dir
 
+    def _handle_intercept_failure(self, registered_pkgs):
+        self.mark_packages("unpacked", registered_pkgs.split())
 
 class OpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
-        super(OpkgPM, self).__init__(d)
+        super(OpkgPM, self).__init__(d, target_rootfs)
 
-        self.target_rootfs = target_rootfs
         self.config_file = config_file
         self.pkg_archs = archs
         self.task_name = task_name
@@ -921,12 +1093,12 @@
 
         self.indexer = OpkgIndexer(self.d, self.deploy_dir)
 
-    """
-    This function will change a package's status in /var/lib/opkg/status file.
-    If 'packages' is None then the new_status will be applied to all
-    packages
-    """
     def mark_packages(self, status_tag, packages=None):
+        """
+        This function will change a package's status in /var/lib/opkg/status file.
+        If 'packages' is None then the new_status will be applied to all
+        packages
+        """
         status_file = os.path.join(self.opkg_dir, "status")
 
         with open(status_file, "r") as sf:
@@ -1079,8 +1251,7 @@
         os.environ['OFFLINE_ROOT'] = self.target_rootfs
         os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
         os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR'),
-                                                   "intercept_scripts")
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
         try:
@@ -1088,6 +1259,13 @@
             bb.note(cmd)
             output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
             bb.note(output)
+            failed_pkgs = []
+            for line in output.split('\n'):
+                if line.endswith("configuration required on target."):
+                    bb.warn(line)
+                    failed_pkgs.append(line.split(".")[0])
+            if failed_pkgs:
+                failed_postinsts_warn(failed_pkgs, self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
         except subprocess.CalledProcessError as e:
             (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
                                               "Command '%s' returned %d:\n%s" %
@@ -1170,10 +1348,10 @@
                 # is separated from the following entry
                 status.write("\n")
 
-    '''
-    The following function dummy installs pkgs and returns the log of output.
-    '''
     def dummy_install(self, pkgs):
+        """
+        The following function dummy installs pkgs and returns the log of output.
+        """
         if len(pkgs) == 0:
             return
 
@@ -1228,10 +1406,10 @@
                             self.opkg_dir,
                             symlinks=True)
 
-    """
-    Returns a dictionary with the package info.
-    """
     def package_info(self, pkg):
+        """
+        Returns a dictionary with the package info.
+        """
         cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg)
         pkg_info = super(OpkgPM, self).package_info(pkg, cmd)
 
@@ -1242,12 +1420,12 @@
 
         return pkg_info
 
-    """
-    Returns the path to a tmpdir where resides the contents of a package.
-
-    Deleting the tmpdir is responsability of the caller.
-    """
     def extract(self, pkg):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+
+        Deleting the tmpdir is responsability of the caller.
+        """
         pkg_info = self.package_info(pkg)
         if not pkg_info:
             bb.fatal("Unable to get information for package '%s' while "
@@ -1260,8 +1438,7 @@
 
 class DpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
-        super(DpkgPM, self).__init__(d)
-        self.target_rootfs = target_rootfs
+        super(DpkgPM, self).__init__(d, target_rootfs)
         self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB')
         if apt_conf_dir is None:
             self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
@@ -1281,12 +1458,12 @@
 
         self.indexer = DpkgIndexer(self.d, self.deploy_dir)
 
-    """
-    This function will change a package's status in /var/lib/dpkg/status file.
-    If 'packages' is None then the new_status will be applied to all
-    packages
-    """
     def mark_packages(self, status_tag, packages=None):
+        """
+        This function will change a package's status in /var/lib/dpkg/status file.
+        If 'packages' is None then the new_status will be applied to all
+        packages
+        """
         status_file = self.target_rootfs + "/var/lib/dpkg/status"
 
         with open(status_file, "r") as sf:
@@ -1309,11 +1486,11 @@
 
         os.rename(status_file + ".tmp", status_file)
 
-    """
-    Run the pre/post installs for package "package_name". If package_name is
-    None, then run all pre/post install scriptlets.
-    """
     def run_pre_post_installs(self, package_name=None):
+        """
+        Run the pre/post installs for package "package_name". If package_name is
+        None, then run all pre/post install scriptlets.
+        """
         info_dir = self.target_rootfs + "/var/lib/dpkg/info"
         ControlScript = collections.namedtuple("ControlScript", ["suffix", "name", "argument"])
         control_scripts = [
@@ -1335,8 +1512,7 @@
         os.environ['OFFLINE_ROOT'] = self.target_rootfs
         os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
         os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR'),
-                                                   "intercept_scripts")
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
         failed_pkgs = []
@@ -1351,9 +1527,10 @@
                                 stderr=subprocess.STDOUT).decode("utf-8")
                         bb.note(output)
                     except subprocess.CalledProcessError as e:
-                        bb.note("%s for package %s failed with %d:\n%s" %
+                        bb.warn("%s for package %s failed with %d:\n%s" %
                                 (control_script.name, pkg_name, e.returncode,
                                     e.output.decode("utf-8")))
+                        failed_postinsts_warn([pkg_name], self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
                         failed_pkgs.append(pkg_name)
                         break
 
@@ -1558,10 +1735,10 @@
     def list_installed(self):
         return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
 
-    """
-    Returns a dictionary with the package info.
-    """
     def package_info(self, pkg):
+        """
+        Returns a dictionary with the package info.
+        """
         cmd = "%s show %s" % (self.apt_cache_cmd, pkg)
         pkg_info = super(DpkgPM, self).package_info(pkg, cmd)
 
@@ -1572,12 +1749,12 @@
 
         return pkg_info
 
-    """
-    Returns the path to a tmpdir where resides the contents of a package.
-
-    Deleting the tmpdir is responsability of the caller.
-    """
     def extract(self, pkg):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+
+        Deleting the tmpdir is responsability of the caller.
+        """
         pkg_info = self.package_info(pkg)
         if not pkg_info:
             bb.fatal("Unable to get information for package '%s' while "
@@ -1592,7 +1769,7 @@
     classes = d.getVar('PACKAGE_CLASSES').replace("package_", "").split()
 
     indexer_map = {
-        "rpm": (RpmIndexer, d.getVar('DEPLOY_DIR_RPM')),
+        "rpm": (RpmSubdirIndexer, d.getVar('DEPLOY_DIR_RPM')),
         "ipk": (OpkgIndexer, d.getVar('DEPLOY_DIR_IPK')),
         "deb": (DpkgIndexer, d.getVar('DEPLOY_DIR_DEB'))
     }
@@ -1608,12 +1785,3 @@
 
             if result is not None:
                 bb.fatal(result)
-
-if __name__ == "__main__":
-    """
-    We should be able to run this as a standalone script, from outside bitbake
-    environment.
-    """
-    """
-    TBD
-    """
diff --git a/import-layers/yocto-poky/meta/lib/oe/patch.py b/import-layers/yocto-poky/meta/lib/oe/patch.py
index 584bf6c..af7aa52 100644
--- a/import-layers/yocto-poky/meta/lib/oe/patch.py
+++ b/import-layers/yocto-poky/meta/lib/oe/patch.py
@@ -36,6 +36,22 @@
         (exitstatus, output) = oe.utils.getstatusoutput(cmd)
         if exitstatus != 0:
             raise CmdError(cmd, exitstatus >> 8, output)
+        if " fuzz " in output:
+            bb.warn("""
+Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
+The context lines in the patches can be updated with devtool:
+
+    devtool modify <recipe>
+    devtool finish --force-patch-refresh <recipe> <layer_path>
+
+Then the updated patches and the source tree (in devtool's workspace)
+should be reviewed to make sure the patches apply in the correct place
+and don't introduce duplicate lines (which can, and does happen
+when some of the context is ignored). Further information:
+http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148675.html
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
+Details:
+{}""".format(output))
         return output
 
     finally:
@@ -212,7 +228,7 @@
         self.patches.insert(i, patch)
 
     def _applypatch(self, patch, force = False, reverse = False, run = True):
-        shellcmd = ["cat", patch['file'], "|", "patch", "-p", patch['strippath']]
+        shellcmd = ["cat", patch['file'], "|", "patch", "--no-backup-if-mismatch", "-p", patch['strippath']]
         if reverse:
             shellcmd.append('-R')
 
@@ -432,7 +448,7 @@
         import re
         tempdir = tempfile.mkdtemp(prefix='oepatch')
         try:
-            shellcmd = ["git", "format-patch", startcommit, "-o", tempdir]
+            shellcmd = ["git", "format-patch", "--no-signature", "--no-numbered", startcommit, "-o", tempdir]
             if paths:
                 shellcmd.append('--')
                 shellcmd.extend(paths)
diff --git a/import-layers/yocto-poky/meta/lib/oe/path.py b/import-layers/yocto-poky/meta/lib/oe/path.py
index 1ea03d5..76c58fa 100644
--- a/import-layers/yocto-poky/meta/lib/oe/path.py
+++ b/import-layers/yocto-poky/meta/lib/oe/path.py
@@ -237,3 +237,25 @@
         raise
 
     return file
+
+def is_path_parent(possible_parent, *paths):
+    """
+    Return True if a path is the parent of another, False otherwise.
+    Multiple paths to test can be specified in which case all
+    specified test paths must be under the parent in order to
+    return True.
+    """
+    def abs_path_trailing(pth):
+        pth_abs = os.path.abspath(pth)
+        if not pth_abs.endswith(os.sep):
+            pth_abs += os.sep
+        return pth_abs
+
+    possible_parent_abs = abs_path_trailing(possible_parent)
+    if not paths:
+        return False
+    for path in paths:
+        path_abs = abs_path_trailing(path)
+        if not path_abs.startswith(possible_parent_abs):
+            return False
+    return True
diff --git a/import-layers/yocto-poky/meta/lib/oe/recipeutils.py b/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
index cab8e40..aa64553 100644
--- a/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
+++ b/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
@@ -22,7 +22,7 @@
 # Help us to find places to insert values
 recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LICENSE_FLAGS', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRCPV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'EXTRA_OECMAKE', 'EXTRA_OESCONS', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'populate_packages()', 'do_package()', 'do_deploy()']
 # Variables that sometimes are a bit long but shouldn't be wrapped
-nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]']
+nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI\[(.+\.)?md5sum\]', 'SRC_URI\[(.+\.)?sha256sum\]']
 list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM']
 meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
 
@@ -142,6 +142,10 @@
     else:
         newline = ''
 
+    nowrap_vars_res = []
+    for item in nowrap_vars:
+        nowrap_vars_res.append(re.compile('^%s$' % item))
+
     recipe_progression_res = []
     recipe_progression_restrs = []
     for item in recipe_progression:
@@ -174,7 +178,12 @@
             return
         rawtext = '%s = "%s"%s' % (name, values[name], newline)
         addlines = []
-        if name in nowrap_vars:
+        nowrap = False
+        for nowrap_re in nowrap_vars_res:
+            if nowrap_re.match(name):
+                nowrap = True
+                break
+        if nowrap:
             addlines.append(rawtext)
         elif name in list_vars:
             splitvalue = split_var_value(values[name], assignment=False)
@@ -242,7 +251,7 @@
     return changed, tolines
 
 
-def patch_recipe_file(fn, values, patch=False, relpath=''):
+def patch_recipe_file(fn, values, patch=False, relpath='', redirect_output=None):
     """Update or insert variable values into a recipe file (assuming you
        have already identified the exact file you want to update.)
        Note that some manual inspection/intervention may be required
@@ -254,7 +263,11 @@
 
     _, tolines = patch_recipe_lines(fromlines, values)
 
-    if patch:
+    if redirect_output:
+        with open(os.path.join(redirect_output, os.path.basename(fn)), 'w') as f:
+            f.writelines(tolines)
+        return None
+    elif patch:
         relfn = os.path.relpath(fn, relpath)
         diff = difflib.unified_diff(fromlines, tolines, 'a/%s' % relfn, 'b/%s' % relfn)
         return diff
@@ -304,7 +317,7 @@
 
     return filevars
 
-def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
+def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None):
     """Modify a list of variable values in the specified recipe. Handles inc files if
     used by the recipe.
     """
@@ -314,7 +327,7 @@
     patches = []
     for f,v in locs.items():
         vals = {k: varvalues[k] for k in v}
-        patchdata = patch_recipe_file(f, vals, patch, relpath)
+        patchdata = patch_recipe_file(f, vals, patch, relpath, redirect_output)
         if patch:
             patches.append(patchdata)
 
@@ -395,7 +408,7 @@
     # fetcher) though note that this only encompasses actual container formats
     # i.e. that can contain multiple files as opposed to those that only
     # contain a compressed stream (i.e. .tar.gz as opposed to just .gz)
-    archive_exts = ['.tar', '.tgz', '.tar.gz', '.tar.Z', '.tbz', '.tbz2', '.tar.bz2', '.tar.xz', '.tar.lz', '.zip', '.jar', '.rpm', '.srpm', '.deb', '.ipk', '.tar.7z', '.7z']
+    archive_exts = ['.tar', '.tgz', '.tar.gz', '.tar.Z', '.tbz', '.tbz2', '.tar.bz2', '.txz', '.tar.xz', '.tar.lz', '.zip', '.jar', '.rpm', '.srpm', '.deb', '.ipk', '.tar.7z', '.7z']
     ret = {}
     for uri in uris:
         if fetch.ud[uri].type == 'file':
@@ -575,7 +588,7 @@
     return (appendpath, pathok)
 
 
-def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None):
+def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None, redirect_output=None):
     """
     Writes a bbappend file for a recipe
     Parameters:
@@ -602,6 +615,9 @@
             value pairs, or simply a list of the lines.
         removevalues:
             Variable values to remove - a dict of names/values.
+        redirect_output:
+            If specified, redirects writing the output file to the
+            specified directory (for dry-run purposes)
     """
 
     if not removevalues:
@@ -616,7 +632,8 @@
         bb.warn('Unable to determine correct subdirectory path for bbappend file - check that what %s adds to BBFILES also matches .bbappend files. Using %s for now, but until you fix this the bbappend will not be applied.' % (os.path.join(destlayerdir, 'conf', 'layer.conf'), os.path.dirname(appendpath)))
 
     appenddir = os.path.dirname(appendpath)
-    bb.utils.mkdirhier(appenddir)
+    if not redirect_output:
+        bb.utils.mkdirhier(appenddir)
 
     # FIXME check if the bbappend doesn't get overridden by a higher priority layer?
 
@@ -693,9 +710,18 @@
         if instfunclines:
             bbappendlines.append(('do_install_append%s()' % appendoverride, '', instfunclines))
 
-    bb.note('Writing append file %s' % appendpath)
+    if redirect_output:
+        bb.note('Writing append file %s (dry-run)' % appendpath)
+        outfile = os.path.join(redirect_output, os.path.basename(appendpath))
+        # Only take a copy if the file isn't already there (this function may be called
+        # multiple times per operation when we're handling overrides)
+        if os.path.exists(appendpath) and not os.path.exists(outfile):
+            shutil.copy2(appendpath, outfile)
+    else:
+        bb.note('Writing append file %s' % appendpath)
+        outfile = appendpath
 
-    if os.path.exists(appendpath):
+    if os.path.exists(outfile):
         # Work around lack of nonlocal in python 2
         extvars = {'destsubdir': destsubdir}
 
@@ -767,7 +793,7 @@
         if removevalues:
             varnames.extend(list(removevalues.keys()))
 
-        with open(appendpath, 'r') as f:
+        with open(outfile, 'r') as f:
             (updated, newlines) = bb.utils.edit_metadata(f, varnames, appendfile_varfunc)
 
         destsubdir = extvars['destsubdir']
@@ -784,20 +810,27 @@
         updated = True
 
     if updated:
-        with open(appendpath, 'w') as f:
+        with open(outfile, 'w') as f:
             f.writelines(newlines)
 
     if copyfiles:
         if machine:
             destsubdir = os.path.join(destsubdir, machine)
+        if redirect_output:
+            outdir = redirect_output
+        else:
+            outdir = appenddir
         for newfile, srcfile in copyfiles.items():
-            filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile))
+            filedest = os.path.join(outdir, destsubdir, os.path.basename(srcfile))
             if os.path.abspath(newfile) != os.path.abspath(filedest):
                 if newfile.startswith(tempfile.gettempdir()):
                     newfiledisp = os.path.basename(newfile)
                 else:
                     newfiledisp = newfile
-                bb.note('Copying %s to %s' % (newfiledisp, filedest))
+                if redirect_output:
+                    bb.note('Copying %s to %s (dry-run)' % (newfiledisp, os.path.join(appenddir, destsubdir, os.path.basename(srcfile))))
+                else:
+                    bb.note('Copying %s to %s' % (newfiledisp, filedest))
                 bb.utils.mkdirhier(os.path.dirname(filedest))
                 shutil.copyfile(newfile, filedest)
 
@@ -867,25 +900,25 @@
             FetchError when don't have network access or upstream site don't response.
             NoMethodError when uri latest_versionstring method isn't implemented.
 
-        Returns a dictonary with version, type and datetime.
+        Returns a dictonary with version, repository revision, current_version, type and datetime.
         Type can be A for Automatic, M for Manual and U for Unknown.
     """
     from bb.fetch2 import decodeurl
     from datetime import datetime
 
     ru = {}
+    ru['current_version'] = rd.getVar('PV')
     ru['version'] = ''
     ru['type'] = 'U'
     ru['datetime'] = ''
-
-    pv = rd.getVar('PV')
+    ru['revision'] = ''
 
     # XXX: If don't have SRC_URI means that don't have upstream sources so
     # returns the current recipe version, so that upstream version check
     # declares a match.
     src_uris = rd.getVar('SRC_URI')
     if not src_uris:
-        ru['version'] = pv
+        ru['version'] = ru['current_version']
         ru['type'] = 'M'
         ru['datetime'] = datetime.now()
         return ru
@@ -894,6 +927,9 @@
     src_uri = src_uris.split()[0]
     uri_type, _, _, _, _, _ =  decodeurl(src_uri)
 
+    (pv, pfx, sfx) = get_recipe_pv_without_srcpv(rd.getVar('PV'), uri_type)
+    ru['current_version'] = pv
+
     manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION")
     if manual_upstream_version:
         # manual tracking of upstream version.
@@ -914,33 +950,22 @@
         ru['datetime'] = datetime.now()
     else:
         ud = bb.fetch2.FetchData(src_uri, rd)
-        pupver = ud.method.latest_versionstring(ud, rd)
-        (upversion, revision) = pupver
-
-        # format git version version+gitAUTOINC+HASH
-        if uri_type == 'git':
-            (pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type)
-
-            # if contains revision but not upversion use current pv
-            if upversion == '' and revision:
-                upversion = pv
-
-            if upversion:
-                tmp = upversion
-                upversion = ''
-
-                if pfx:
-                    upversion = pfx + tmp
-                else:
-                    upversion = tmp
-
-                if sfx:
-                    upversion = upversion + sfx + revision[:10]
+        if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1":
+            revision = ud.method.latest_revision(ud, rd, 'default')
+            upversion = pv
+            if revision != rd.getVar("SRCREV"):
+                upversion = upversion + "-new-commits-available" 
+        else:
+            pupver = ud.method.latest_versionstring(ud, rd)
+            (upversion, revision) = pupver
 
         if upversion:
             ru['version'] = upversion
             ru['type'] = 'A'
 
+        if revision:
+            ru['revision'] = revision
+
         ru['datetime'] = datetime.now()
 
     return ru
diff --git a/import-layers/yocto-poky/meta/lib/oe/rootfs.py b/import-layers/yocto-poky/meta/lib/oe/rootfs.py
index 754ef56..f8f717c 100644
--- a/import-layers/yocto-poky/meta/lib/oe/rootfs.py
+++ b/import-layers/yocto-poky/meta/lib/oe/rootfs.py
@@ -92,10 +92,6 @@
                 self.d.getVar('PACKAGE_FEED_ARCHS'))
 
 
-    @abstractmethod
-    def _handle_intercept_failure(self, failed_script):
-        pass
-
     """
     The _cleanup() method should be used to clean-up stuff that we don't really
     want to end up on target. For example, in the case of RPM, the DB locks.
@@ -178,20 +174,10 @@
         post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND")
         rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND')
 
-        postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR")
-        if not postinst_intercepts_dir:
-            postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
-        intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
-                                      "intercept_scripts")
-
-        bb.utils.remove(intercepts_dir, True)
-
         bb.utils.mkdirhier(self.image_rootfs)
 
         bb.utils.mkdirhier(self.deploydir)
 
-        shutil.copytree(postinst_intercepts_dir, intercepts_dir)
-
         execute_pre_post_process(self.d, pre_process_cmds)
 
         if self.progress_reporter:
@@ -207,7 +193,7 @@
 
         execute_pre_post_process(self.d, rootfs_post_install_cmds)
 
-        self._run_intercepts()
+        self.pm.run_intercepts()
 
         execute_pre_post_process(self.d, post_process_cmds)
 
@@ -293,44 +279,6 @@
             # Remove the package manager data files
             self.pm.remove_packaging_data()
 
-    def _run_intercepts(self):
-        intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
-                                      "intercept_scripts")
-
-        bb.note("Running intercept scripts:")
-        os.environ['D'] = self.image_rootfs
-        os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
-        for script in os.listdir(intercepts_dir):
-            script_full = os.path.join(intercepts_dir, script)
-
-            if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
-                continue
-
-            bb.note("> Executing %s intercept ..." % script)
-
-            try:
-                output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
-                if output: bb.note(output.decode("utf-8"))
-            except subprocess.CalledProcessError as e:
-                bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script)
-                bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
-
-                with open(script_full) as intercept:
-                    registered_pkgs = None
-                    for line in intercept.read().split("\n"):
-                        m = re.match("^##PKGS:(.*)", line)
-                        if m is not None:
-                            registered_pkgs = m.group(1).strip()
-                            break
-
-                    if registered_pkgs is not None:
-                        bb.warn("The postinstalls for the following packages "
-                                "will be postponed for first boot: %s" %
-                                registered_pkgs)
-
-                        # call the backend dependent handler
-                        self._handle_intercept_failure(registered_pkgs)
-
     def _run_ldconfig(self):
         if self.d.getVar('LDCONFIGDEPEND'):
             bb.note("Executing: ldconfig -r" + self.image_rootfs + "-c new -v")
@@ -523,14 +471,6 @@
         self._log_check_warn()
         self._log_check_error()
 
-    def _handle_intercept_failure(self, registered_pkgs):
-        rpm_postinsts_dir = self.image_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
-        bb.utils.mkdirhier(rpm_postinsts_dir)
-
-        # Save the package postinstalls in /etc/rpm-postinsts
-        for pkg in registered_pkgs.split():
-            self.pm.save_rpmpostinst(pkg)
-
     def _cleanup(self):
         self.pm._invoke_dnf(["clean", "all"])
 
@@ -711,9 +651,6 @@
         src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/info")
         return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
 
-    def _handle_intercept_failure(self, registered_pkgs):
-        self.pm.mark_packages("unpacked", registered_pkgs.split())
-
     def _log_check(self):
         self._log_check_warn()
         self._log_check_error()
@@ -982,9 +919,6 @@
         src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info")
         return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
 
-    def _handle_intercept_failure(self, registered_pkgs):
-        self.pm.mark_packages("unpacked", registered_pkgs.split())
-
     def _log_check(self):
         self._log_check_warn()
         self._log_check_error()
diff --git a/import-layers/yocto-poky/meta/lib/oe/sdk.py b/import-layers/yocto-poky/meta/lib/oe/sdk.py
index 7f71cfb..d6a5033 100644
--- a/import-layers/yocto-poky/meta/lib/oe/sdk.py
+++ b/import-layers/yocto-poky/meta/lib/oe/sdk.py
@@ -162,40 +162,21 @@
         self.host_manifest = RpmManifest(d, self.manifest_dir,
                                          Manifest.MANIFEST_TYPE_SDK_HOST)
 
-        target_providename = ['/bin/sh',
-                              '/bin/bash',
-                              '/usr/bin/env',
-                              '/usr/bin/perl',
-                              'pkgconfig'
-                              ]
-
         rpm_repo_workdir = "oe-sdk-repo"
         if "sdk_ext" in d.getVar("BB_RUNTASK"):
             rpm_repo_workdir = "oe-sdk-ext-repo"
 
-
         self.target_pm = RpmPM(d,
                                self.sdk_target_sysroot,
                                self.d.getVar('TARGET_VENDOR'),
                                'target',
-                               target_providename,
                                rpm_repo_workdir=rpm_repo_workdir
                                )
 
-        sdk_providename = ['/bin/sh',
-                           '/bin/bash',
-                           '/usr/bin/env',
-                           '/usr/bin/perl',
-                           'pkgconfig',
-                           'libGL.so()(64bit)',
-                           'libGL.so'
-                           ]
-
         self.host_pm = RpmPM(d,
                              self.sdk_host_sysroot,
                              self.d.getVar('SDK_VENDOR'),
                              'host',
-                             sdk_providename,
                              "SDK_PACKAGE_ARCHS",
                              "SDK_OS",
                              rpm_repo_workdir=rpm_repo_workdir
@@ -228,6 +209,8 @@
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        self.target_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -237,6 +220,8 @@
         self._populate_sysroot(self.host_pm, self.host_manifest)
         self.install_locales(self.host_pm)
 
+        self.host_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -312,6 +297,8 @@
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        self.target_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -321,6 +308,8 @@
         self._populate_sysroot(self.host_pm, self.host_manifest)
         self.install_locales(self.host_pm)
 
+        self.host_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -397,6 +386,8 @@
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        self.target_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
         self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
@@ -408,6 +399,8 @@
         self._populate_sysroot(self.host_pm, self.host_manifest)
         self.install_locales(self.host_pm)
 
+        self.host_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
 
         self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
diff --git a/import-layers/yocto-poky/meta/lib/oe/sstatesig.py b/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
index 3a8778e..b82e0f4 100644
--- a/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
+++ b/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
@@ -1,4 +1,5 @@
 import bb.siggen
+import oe
 
 def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
     # Return True if we should keep the dependency, False to drop it
@@ -28,15 +29,14 @@
             return False
         return True
 
-    # Quilt (patch application) changing isn't likely to affect anything
-    excludelist = ['quilt-native', 'subversion-native', 'git-native', 'ccache-native']
-    if depname in excludelist and recipename != depname:
-        return False
-
     # Exclude well defined recipe->dependency
     if "%s->%s" % (recipename, depname) in siggen.saferecipedeps:
         return False
 
+    # Check for special wildcard
+    if "*->%s" % depname in siggen.saferecipedeps and recipename != depname:
+        return False
+
     # Don't change native/cross/nativesdk recipe dependencies any further
     if isNative(recipename) or isCross(recipename) or isNativeSDK(recipename):
         return True
@@ -368,3 +368,37 @@
     if extrainf:
         d2.setVar("SSTATE_MANMACH", extrainf)
     return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)
+
+def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
+    d2 = d
+    variant = ''
+    if taskdata2.startswith("virtual:multilib"):
+        variant = taskdata2.split(":")[2]
+        if variant not in multilibcache:
+            multilibcache[variant] = oe.utils.get_multilib_datastore(variant, d)
+        d2 = multilibcache[variant]
+
+    if taskdata.endswith("-native"):
+        pkgarchs = ["${BUILD_ARCH}"]
+    elif taskdata.startswith("nativesdk-"):
+        pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
+    elif "-cross-canadian" in taskdata:
+        pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"]
+    elif "-cross-" in taskdata:
+        pkgarchs = ["${BUILD_ARCH}_${TARGET_ARCH}"]
+    elif "-crosssdk" in taskdata:
+        pkgarchs = ["${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"]
+    else:
+        pkgarchs = ['${MACHINE_ARCH}']
+        pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
+        pkgarchs.append('allarch')
+        pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}')
+
+    for pkgarch in pkgarchs:
+        manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.%s" % (pkgarch, taskdata, taskname))
+        if os.path.exists(manifest):
+            return manifest, d2
+    bb.warn("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant))
+    return None, d2
+
+
diff --git a/import-layers/yocto-poky/meta/lib/oe/utils.py b/import-layers/yocto-poky/meta/lib/oe/utils.py
index 643ab78..80f0442 100644
--- a/import-layers/yocto-poky/meta/lib/oe/utils.py
+++ b/import-layers/yocto-poky/meta/lib/oe/utils.py
@@ -86,17 +86,6 @@
     from re import match
     return " ".join([x for x in str.split() if not match(f, x, 0)])
 
-def param_bool(cfg, field, dflt = None):
-    """Lookup <field> in <cfg> map and convert it to a boolean; take
-    <dflt> when this <field> does not exist"""
-    value = cfg.get(field, dflt)
-    strvalue = str(value).lower()
-    if strvalue in ('yes', 'y', 'true', 't', '1'):
-        return True
-    elif strvalue in ('no', 'n', 'false', 'f', '0'):
-        return False
-    raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value))
-
 def build_depends_string(depends, task):
     """Append a taskname to a string of dependencies as used by the [depends] flag"""
     return " ".join(dep + ":" + task for dep in depends.split())
@@ -167,6 +156,49 @@
     """
     return bb.utils.contains_any("DISTRO_FEATURES", features, truevalue, falsevalue, d)
 
+def parallel_make(d):
+    """
+    Return the integer value for the number of parallel threads to use when
+    building, scraped out of PARALLEL_MAKE. If no parallelization option is
+    found, returns None
+
+    e.g. if PARALLEL_MAKE = "-j 10", this will return 10 as an integer.
+    """
+    pm = (d.getVar('PARALLEL_MAKE') or '').split()
+    # look for '-j' and throw other options (e.g. '-l') away
+    while pm:
+        opt = pm.pop(0)
+        if opt == '-j':
+            v = pm.pop(0)
+        elif opt.startswith('-j'):
+            v = opt[2:].strip()
+        else:
+            continue
+
+        return int(v)
+
+    return None
+
+def parallel_make_argument(d, fmt, limit=None):
+    """
+    Helper utility to construct a parallel make argument from the number of
+    parallel threads specified in PARALLEL_MAKE.
+
+    Returns the input format string `fmt` where a single '%d' will be expanded
+    with the number of parallel threads to use. If `limit` is specified, the
+    number of parallel threads will be no larger than it. If no parallelization
+    option is found in PARALLEL_MAKE, returns an empty string
+
+    e.g. if PARALLEL_MAKE = "-j 10", parallel_make_argument(d, "-n %d") will return
+    "-n 10"
+    """
+    v = parallel_make(d)
+    if v:
+        if limit:
+            v = min(limit, v)
+        return fmt % v
+    return ''
+
 def packages_filter_out_system(d):
     """
     Return a list of packages from PACKAGES with the "system" packages such as
@@ -292,6 +324,14 @@
     version = match.group(1)
     return "-%s" % version if version in ("4.8", "4.9") else ""
 
+
+def get_multilib_datastore(variant, d):
+    localdata = bb.data.createCopy(d)
+    overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
+    localdata.setVar("OVERRIDES", overrides)
+    localdata.setVar("MLPREFIX", variant + "-")
+    return localdata
+
 #
 # Python 2.7 doesn't have threaded pools (just multiprocessing)
 # so implement a version here
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
index 7b2b4aa..ac6ee15 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
@@ -282,7 +282,7 @@
         if not os.path.isdir(self.tmp_dir):
             os.mkdir(self.tmp_dir)
         if self.build_target:
-            self.run_cmd(['bitbake', self.build_target, '-c', 'fetchall'])
+            self.run_cmd(['bitbake', self.build_target, '--runall=fetch'])
 
     def tearDown(self):
         """Tear-down fixture for each test"""
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
index a19089a..6d6b01b 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
@@ -15,8 +15,7 @@
 
 import oe.path
 from oeqa.buildperf import BuildPerfTestCase
-from oeqa.utils.commands import get_bb_vars
-
+from oeqa.utils.commands import get_bb_var, get_bb_vars
 
 class Test1P1(BuildPerfTestCase):
     build_target = 'core-image-sato'
@@ -30,6 +29,7 @@
         self.measure_cmd_resources(['bitbake', self.build_target], 'build',
                                    'bitbake ' + self.build_target, save_bs=True)
         self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
+        self.measure_disk_usage(get_bb_var("IMAGE_ROOTFS", self.build_target), 'rootfs', 'rootfs', True)
 
 
 class Test1P2(BuildPerfTestCase):
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py b/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py
index 975a081..a4744de 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/core/loader.py
@@ -43,7 +43,7 @@
     for module in modules:
         # Assumption: package and module names do not contain upper case
         # characters, whereas class names do
-        m = re.match(r'^([^A-Z]+)(?:\.([A-Z][^.]*)(?:\.([^.]+))?)?$', module)
+        m = re.match(r'^(\w+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII)
 
         module_name, class_name, test_name = m.groups()
 
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py b/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py
index d359bf9..bf3b633 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/core/target/qemu.py
@@ -9,7 +9,7 @@
 from .ssh import OESSHTarget
 from oeqa.utils.qemurunner import QemuRunner
 
-supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic', 'elf']
+supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
 
 class OEQemuTarget(OESSHTarget):
     def __init__(self, logger, ip, server_ip, timeout=300, user='root',
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/apt.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/apt.py
new file mode 100644
index 0000000..8d4dd35
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/apt.py
@@ -0,0 +1,47 @@
+import os
+from oeqa.utils.httpserver import HTTPService
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class AptTest(OERuntimeTestCase):
+
+    def pkg(self, command, expected = 0):
+        command = 'apt-get %s' % command
+        status, output = self.target.run(command, 1500)
+        message = os.linesep.join([command, output])
+        self.assertEqual(status, expected, message)
+        return output
+
+class AptRepoTest(AptTest):
+
+    @classmethod
+    def setUpClass(cls):
+        service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_DEB'], 'all')
+        cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip)
+        cls.repo_server.start()
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.repo_server.stop()
+
+    def setup_source_config_for_package_install(self):
+        apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
+        apt_get_sourceslist_dir = '/etc/apt/'
+        self.target.run('cd %s; echo deb %s ./ > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server))
+
+    def cleanup_source_config_for_package_install(self):
+        apt_get_sourceslist_dir = '/etc/apt/'
+        self.target.run('cd %s; rm sources.list' % (apt_get_sourceslist_dir))
+
+    @skipIfNotFeature('package-management',
+                      'Test requires package-management to be in IMAGE_FEATURES')
+    @skipIfNotDataVar('IMAGE_PKGTYPE', 'deb',
+                      'DEB is not the primary package manager')
+    @OEHasPackage(['apt'])
+    def test_apt_install_from_repo(self):
+        self.setup_source_config_for_package_install()
+        self.pkg('update')
+        self.pkg('remove --yes run-postinsts-dev')
+        self.pkg('install --yes --allow-unauthenticated run-postinsts-dev')
+        self.cleanup_source_config_for_package_install()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/gi.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/gi.py
new file mode 100644
index 0000000..19073e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/gi.py
@@ -0,0 +1,15 @@
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class GObjectIntrospectionTest(OERuntimeTestCase):
+
+    @OETestDepends(["ssh.SSHTest.test_ssh"])
+    @OEHasPackage(["python3-pygobject"])
+    def test_python(self):
+        script = """from gi.repository import GObject; print(GObject.markup_escape_text("<testing&testing>"))"""
+        status, output = self.target.run("python3 -c '%s'" % script)
+        self.assertEqual(status, 0, msg="Python failed (%s)" % (output))
+        self.assertEqual(output, "&lt;testing&amp;testing&gt;", msg="Unexpected output (%s)" % output)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
index 11ad7b7..de1a5aa 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
@@ -28,7 +28,7 @@
     @OETestDepends(['gcc.GccCompileTest.test_gcc_compile'])
     def test_kernel_module(self):
         cmds = [
-            'cd /usr/src/kernel && make scripts',
+            'cd /usr/src/kernel && make scripts prepare',
             'cd /tmp && make',
             'cd /tmp && insmod hellomod.ko',
             'lsmod | grep hellomod',
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/opkg.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/opkg.py
new file mode 100644
index 0000000..671ee06
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/opkg.py
@@ -0,0 +1,47 @@
+import os
+from oeqa.utils.httpserver import HTTPService
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class OpkgTest(OERuntimeTestCase):
+
+    def pkg(self, command, expected = 0):
+        command = 'opkg %s' % command
+        status, output = self.target.run(command, 1500)
+        message = os.linesep.join([command, output])
+        self.assertEqual(status, expected, message)
+        return output
+
+class OpkgRepoTest(OpkgTest):
+
+    @classmethod
+    def setUpClass(cls):
+        service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_IPK'], 'all')
+        cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip)
+        cls.repo_server.start()
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.repo_server.stop()
+
+    def setup_source_config_for_package_install(self):
+        apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
+        apt_get_sourceslist_dir = '/etc/opkg/'
+        self.target.run('cd %s; echo src/gz all %s >> opkg.conf' % (apt_get_sourceslist_dir, apt_get_source_server))
+        
+    def cleanup_source_config_for_package_install(self):
+        apt_get_sourceslist_dir = '/etc/opkg/'
+        self.target.run('cd %s; sed -i "/^src/d" opkg.conf' % (apt_get_sourceslist_dir))
+        
+    @skipIfNotFeature('package-management',
+                      'Test requires package-management to be in IMAGE_FEATURES')
+    @skipIfNotDataVar('IMAGE_PKGTYPE', 'ipk',
+                      'IPK is not the primary package manager')
+    @OEHasPackage(['opkg'])
+    def test_opkg_install_from_repo(self):
+        self.setup_source_config_for_package_install()
+        self.pkg('update')
+        self.pkg('remove run-postinsts-dev')
+        self.pkg('install run-postinsts-dev')
+        self.cleanup_source_config_for_package_install()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py
index ec8c038..f60a433 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/ptest.py
@@ -48,9 +48,12 @@
 
     @OETestID(1600)
     @skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
-    @skipIfNotFeature('ptest-pkgs', 'Test requires ptest-pkgs to be in IMAGE_FEATURES')
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     def test_ptestrunner(self):
+        status, output = self.target.run('which ptest-runner', 0)
+        if status != 0:
+            self.skipTest("No -ptest packages are installed in the image")
+
         import datetime
 
         test_log_dir = self.td.get('TEST_LOG_DIR', '')
@@ -80,3 +83,11 @@
             # Remove the old link to create a new one
             os.remove(ptest_log_dir_link)
         os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link)
+
+        failed_tests = {}
+        for section in parse_result.result_dict:
+            failed_testcases = [ test for test, result in parse_result.result_dict[section] if result == 'fail' ]
+            if failed_testcases:
+                failed_tests[section] = failed_testcases
+
+        self.assertFalse(failed_tests, msg = "Failed ptests: %s" %(str(failed_tests)))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/stap.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/stap.py
new file mode 100644
index 0000000..fc728bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/cases/stap.py
@@ -0,0 +1,33 @@
+import os
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oeid import OETestID
+from oeqa.core.decorator.data import skipIfNotFeature
+
+class StapTest(OERuntimeTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp')
+        dst = '/tmp/hello.stp'
+        cls.tc.target.copyTo(src, dst)
+
+    @classmethod
+    def tearDownClass(cls):
+        files = '/tmp/hello.stp'
+        cls.tc.target.run('rm %s' % files)
+
+    @OETestID(1652)
+    @skipIfNotFeature('tools-profile',
+                      'Test requires tools-profile to be in IMAGE_FEATURES')
+    @OETestDepends(['kernelmodule.KernelModuleTest.test_kernel_module'])
+    def test_stap(self):
+        cmds = [
+            'cd /usr/src/kernel && make scripts prepare',
+            'cd /lib/modules/`uname -r` && (if [ ! -L build ]; then ln -s /usr/src/kernel build; fi)',
+            'stap --disable-cache -DSTP_NO_VERREL_CHECK /tmp/hello.stp'
+            ]
+        for cmd in cmds:
+            status, output = self.target.run(cmd, 900)
+            self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/hello.stp b/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/hello.stp
new file mode 100644
index 0000000..3677147
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/hello.stp
@@ -0,0 +1 @@
+probe oneshot { println("hello world") }
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py
index f61a522..0a6d4e3 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/archiver.py
@@ -116,3 +116,16 @@
 
         excluded_present = len(glob.glob(src_path_target + '/%s-*' % target_recipes[1]))
         self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % target_recipes[1])
+
+
+
+    def test_archiver_srpm_mode(self):
+        """
+        Test that in srpm mode, the added recipe dependencies at least exist/work [YOCTO #11121]
+        """
+
+        features = 'INHERIT += "archiver"\n'
+        features += 'ARCHIVER_MODE[srpm] = "1"\n'
+        self.write_config(features)
+
+        bitbake('-n core-image-sato')
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py
index 4c82049..3506149 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -64,15 +64,14 @@
 
     @OETestID(108)
     def test_invalid_patch(self):
-        # This patch already exists in SRC_URI so adding it again will cause the
-        # patch to fail.
-        self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
+        # This patch should fail to apply.
+        self.write_recipeinc('man-db', 'FILESEXTRAPATHS_prepend := "${THISDIR}/files:"\nSRC_URI += "file://0001-Test-patch-here.patch"')
         self.write_config("INHERIT_remove = \"report-error\"")
-        result = bitbake('man -c patch', ignore_status=True)
-        self.delete_recipeinc('man')
-        bitbake('-cclean man')
+        result = bitbake('man-db -c patch', ignore_status=True)
+        self.delete_recipeinc('man-db')
+        bitbake('-cclean man-db')
         line = self.getline(result, "Function failed: patch_do_patch")
-        self.assertTrue(line and line.startswith("ERROR:"), msg = "Repeated patch application didn't fail. bitbake output: %s" % result.output)
+        self.assertTrue(line and line.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output)
 
     @OETestID(1354)
     def test_force_task_1(self):
@@ -132,17 +131,17 @@
     @OETestID(168)
     def test_invalid_recipe_src_uri(self):
         data = 'SRC_URI = "file://invalid"'
-        self.write_recipeinc('man', data)
+        self.write_recipeinc('man-db', data)
         self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
 SSTATE_DIR = \"${TOPDIR}/download-selftest\"
 INHERIT_remove = \"report-error\"
 """)
         self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
 
-        bitbake('-ccleanall man')
-        result = bitbake('-c fetch man', ignore_status=True)
-        bitbake('-ccleanall man')
-        self.delete_recipeinc('man')
+        bitbake('-ccleanall man-db')
+        result = bitbake('-c fetch man-db', ignore_status=True)
+        bitbake('-ccleanall man-db')
+        self.delete_recipeinc('man-db')
         self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
         self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \
 doesn't exist, yet no error message encountered. bitbake output: %s" % result.output)
@@ -222,9 +221,9 @@
 INHERIT_remove = \"report-error\"
 """)
         self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
-        self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
-        runCmd('bitbake -c cleanall man xcursor-transparent-theme')
-        result = runCmd('bitbake -c unpack -k man xcursor-transparent-theme', ignore_status=True)
+        self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
+        runCmd('bitbake -c cleanall man-db xcursor-transparent-theme')
+        result = runCmd('bitbake -c unpack -k man-db xcursor-transparent-theme', ignore_status=True)
         errorpos = result.output.find('ERROR: Function failed: do_fail_task')
         manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
         continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py
index cf221c3..e60e32d 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -164,3 +164,17 @@
         src_file_glob = str(pkgs_path[0]) + "/xcursor*.src.rpm"
         tar_file_glob = str(pkgs_path[0]) + "/xcursor*.tar.gz"
         self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src)
+
+class ToolchainOptions(OESelftestTestCase):
+
+    def test_toolchain_fortran(self):
+        """
+        Test whether we can enable and build fortran and its supporting libraries
+        """
+
+        features = 'FORTRAN_forcevariable = ",fortran"\n'
+        features += 'RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"\n'
+        self.write_config(features)
+
+        bitbake('gcc-runtime libgfortran')
+
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py
index 43280cd..d5b6a46 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/devtool.py
@@ -174,7 +174,7 @@
     def test_create_workspace(self):
         # Check preconditions
         result = runCmd('bitbake-layers show-layers')
-        self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
+        self.assertTrue('\nworkspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
         # Try creating a workspace layer with a specific path
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         self.track_for_cleanup(tempdir)
@@ -611,7 +611,7 @@
     @OETestID(1165)
     def test_devtool_modify_git(self):
         # Check preconditions
-        testrecipe = 'mkelfimage'
+        testrecipe = 'psplash'
         src_uri = get_bb_var('SRC_URI', testrecipe)
         self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
         # Clean up anything in the workdir/sysroot/sstate cache
@@ -623,9 +623,9 @@
         self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
         result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
-        self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found')
+        self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found')
         self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. devtool output: %s' % result.output)
-        matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'mkelfimage_*.bbappend'))
+        matches = glob.glob(os.path.join(self.workspacedir, 'appends', 'psplash_*.bbappend'))
         self.assertTrue(matches, 'bbappend not created')
         # Test devtool status
         result = runCmd('devtool status')
@@ -899,6 +899,7 @@
             f.write('BBFILE_PATTERN_oeselftesttemplayer = "^${LAYERDIR}/"\n')
             f.write('BBFILE_PRIORITY_oeselftesttemplayer = "999"\n')
             f.write('BBFILE_PATTERN_IGNORE_EMPTY_oeselftesttemplayer = "1"\n')
+            f.write('LAYERSERIES_COMPAT_oeselftesttemplayer = "${LAYERSERIES_COMPAT_core}"\n')
         self.add_command_to_tearDown('bitbake-layers remove-layer %s || true' % templayerdir)
         result = runCmd('bitbake-layers add-layer %s' % templayerdir, cwd=self.builddir)
         # Create the bbappend
@@ -987,8 +988,12 @@
     @OETestID(1371)
     def test_devtool_update_recipe_local_files_2(self):
         """Check local source files support when oe-local-files is in Git"""
-        testrecipe = 'lzo'
+        testrecipe = 'devtool-test-local'
         recipefile = get_bb_var('FILE', testrecipe)
+        recipedir = os.path.dirname(recipefile)
+        result = runCmd('git status --porcelain .', cwd=recipedir)
+        if result.output.strip():
+            self.fail('Recipe directory for %s contains uncommitted changes' % testrecipe)
         # Setup srctree for modifying the recipe
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         self.track_for_cleanup(tempdir)
@@ -1002,9 +1007,9 @@
         runCmd('git add oe-local-files', cwd=tempdir)
         runCmd('git commit -m "Add local sources"', cwd=tempdir)
         # Edit / commit local sources
-        runCmd('echo "# Foobar" >> oe-local-files/acinclude.m4', cwd=tempdir)
+        runCmd('echo "# Foobar" >> oe-local-files/file1', cwd=tempdir)
         runCmd('git commit -am "Edit existing file"', cwd=tempdir)
-        runCmd('git rm oe-local-files/run-ptest', cwd=tempdir)
+        runCmd('git rm oe-local-files/file2', cwd=tempdir)
         runCmd('git commit -m"Remove file"', cwd=tempdir)
         runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
         runCmd('git add oe-local-files/new-local', cwd=tempdir)
@@ -1016,11 +1021,11 @@
                                      os.path.dirname(recipefile))
         # Checkout unmodified file to working copy -> devtool should still pick
         # the modified version from HEAD
-        runCmd('git checkout HEAD^ -- oe-local-files/acinclude.m4', cwd=tempdir)
+        runCmd('git checkout HEAD^ -- oe-local-files/file1', cwd=tempdir)
         runCmd('devtool update-recipe %s' % testrecipe)
         expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
-                           (' M', '.*/acinclude.m4$'),
-                           (' D', '.*/run-ptest$'),
+                           (' M', '.*/file1$'),
+                           (' D', '.*/file2$'),
                            ('??', '.*/new-local$'),
                            ('??', '.*/0001-Add-new-file.patch$')]
         self._check_repo_status(os.path.dirname(recipefile), expected_status)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py
index 12540ad..7b28004 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -9,6 +9,11 @@
     @classmethod
     def setUpClass(cls):
         super(Distrodata, cls).setUpClass()
+        feature = 'INHERIT += "distrodata"\n'
+        feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
+
+        cls.write_config(cls, feature)
+        bitbake('-c checkpkg world')
 
     @OETestID(1902)
     def test_checkpkg(self):
@@ -18,11 +23,6 @@
         Product:     oe-core
         Author:      Alexander Kanavin <alexander.kanavin@intel.com>
         """
-        feature = 'INHERIT += "distrodata"\n'
-        feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
-
-        self.write_config(feature)
-        bitbake('-c checkpkg world')
         checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
         regressed_failures = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 'UNKNOWN_BROKEN']
         regressed_successes = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 'KNOWN_BROKEN']
@@ -40,3 +40,60 @@
 but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please remove that line from the recipes.
 """ + "\n".join(regressed_successes)
         self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg)
+
+    def test_maintainers(self):
+        """
+        Summary:     Test that oe-core recipes have a maintainer
+        Expected:    All oe-core recipes (except a few special static/testing ones) should have a maintainer listed in maintainers.inc file.
+        Product:     oe-core
+        Author:      Alexander Kanavin <alexander.kanavin@intel.com>
+        """
+        def is_exception(pkg):
+            exceptions = ["packagegroup-", "initramfs-", "systemd-machine-units", "target-sdk-provides-dummy"]
+            for i in exceptions:
+                 if i in pkg:
+                     return True
+            return False
+
+        def is_in_oe_core(recipe, recipes):
+            self.assertTrue(recipe in recipes.keys(), "Recipe %s was not in 'bitbake-layers show-recipes' output" %(recipe))
+            self.assertTrue(len(recipes[recipe]) > 0, "'bitbake-layers show-recipes' could not determine what layer(s) a recipe %s is in" %(recipe))
+            try:
+                recipes[recipe].index('meta')
+                return True
+            except ValueError:
+                return False
+
+        def get_recipe_layers():
+            import re
+
+            recipes = {}
+            recipe_regex = re.compile('^(?P<name>.*):$')
+            layer_regex = re.compile('^  (?P<name>\S*) +')
+            output = runCmd('bitbake-layers show-recipes').output
+            for line in output.split('\n'):
+                recipe_name_obj = recipe_regex.search(line)
+                if recipe_name_obj:
+                    recipe_name = recipe_name_obj.group('name')
+                    recipes[recipe_name] = []
+                recipe_layer_obj = layer_regex.search(line)
+                if recipe_layer_obj:
+                    layer_name = recipe_layer_obj.group('name')
+                    recipes[recipe_name].append(layer_name)
+            return recipes
+
+        checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), "checkpkg.csv")).readlines()[1:]
+        recipes_layers = get_recipe_layers()
+        no_maintainer_list = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] \
+            if pkg_data[14] == '' and is_in_oe_core(pkg_data[0], recipes_layers) and not is_exception(pkg_data[0])]
+        msg = """
+The following packages do not have a maintainer assigned to them. Please add an entry to meta/conf/distro/include/maintainers.inc file.
+""" + "\n".join(no_maintainer_list)
+        self.assertTrue(len(no_maintainer_list) == 0, msg)
+
+        with_maintainer_list = [pkg_data[0] for pkg_data in [pkg_line.split('\t') for pkg_line in checkpkg_result] \
+            if pkg_data[14] != '' and is_in_oe_core(pkg_data[0], recipes_layers) and not is_exception(pkg_data[0])]
+        msg = """
+The list of oe-core packages with maintainers is empty. This may indicate that the test has regressed and needs fixing.
+"""
+        self.assertTrue(len(with_maintainer_list) > 0, msg)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/efibootpartition.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/efibootpartition.py
new file mode 100644
index 0000000..0c83256
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -0,0 +1,45 @@
+# Based on runqemu.py test file
+#
+# Copyright (c) 2017 Wind River Systems, Inc.
+#
+
+import re
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+
+class GenericEFITest(OESelftestTestCase):
+    """EFI booting test class"""
+
+    buffer = True
+    cmd_common = "runqemu nographic serial wic ovmf"
+    efi_provider = "systemd-boot"
+    image = "core-image-minimal"
+    machine = "qemux86-64"
+    recipes_built = False
+
+    @classmethod
+    def setUpLocal(self):
+        super(GenericEFITest, self).setUpLocal(self)
+
+        self.write_config(self,
+"""
+EFI_PROVIDER = "%s"
+IMAGE_FSTYPES_pn-%s_append = " wic"
+MACHINE = "%s"
+MACHINE_FEATURES_append = " efi"
+WKS_FILE = "efi-bootdisk.wks.in"
+IMAGE_INSTALL_append = " grub-efi systemd-boot kernel-image-bzimage"
+"""
+% (self.efi_provider, self.image, self.machine))
+        if not self.recipes_built:
+            bitbake("ovmf")
+            bitbake(self.image)
+            self.recipes_built = True
+
+    @classmethod
+    def test_boot_efi(self):
+        """Test generic boot partition with qemu"""
+        cmd = "%s %s" % (self.cmd_common, self.machine)
+        with runqemu(self.image, ssh=False, launch_cmd=cmd) as qemu:
+            self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/gotoolchain.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/gotoolchain.py
new file mode 100644
index 0000000..1e23257
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/gotoolchain.py
@@ -0,0 +1,67 @@
+import glob
+import os
+import shutil
+import tempfile
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import runCmd, bitbake, get_bb_vars
+
+
+class oeGoToolchainSelfTest(OESelftestTestCase):
+    """
+    Test cases for OE's Go toolchain
+    """
+
+    @staticmethod
+    def get_sdk_environment(tmpdir_SDKQA):
+        pattern = os.path.join(tmpdir_SDKQA, "environment-setup-*")
+        # FIXME: this is a very naive implementation
+        return glob.glob(pattern)[0]
+
+    @staticmethod
+    def get_sdk_toolchain():
+        bb_vars = get_bb_vars(['SDK_DEPLOY', 'TOOLCHAIN_OUTPUTNAME'],
+                              "meta-go-toolchain")
+        sdk_deploy = bb_vars['SDK_DEPLOY']
+        toolchain_name = bb_vars['TOOLCHAIN_OUTPUTNAME']
+        return os.path.join(sdk_deploy, toolchain_name + ".sh")
+
+    @classmethod
+    def setUpClass(cls):
+        super(oeGoToolchainSelfTest, cls).setUpClass()
+        cls.tmpdir_SDKQA = tempfile.mkdtemp(prefix='SDKQA')
+        cls.go_path = os.path.join(cls.tmpdir_SDKQA, "go")
+        # Build the SDK and locate it in DEPLOYDIR
+        bitbake("meta-go-toolchain")
+        cls.sdk_path = oeGoToolchainSelfTest.get_sdk_toolchain()
+        # Install the SDK into the tmpdir
+        runCmd("sh %s -y -d \"%s\"" % (cls.sdk_path, cls.tmpdir_SDKQA))
+        cls.env_SDK = oeGoToolchainSelfTest.get_sdk_environment(cls.tmpdir_SDKQA)
+
+    @classmethod
+    def tearDownClass(cls):
+        shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
+        super(oeGoToolchainSelfTest, cls).tearDownClass()
+
+    def run_sdk_go_command(self, gocmd):
+        cmd = "cd %s; " % self.tmpdir_SDKQA
+        cmd = cmd + ". %s; " % self.env_SDK
+        cmd = cmd + "export GOPATH=%s; " % self.go_path
+        cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd
+        return runCmd(cmd).status
+
+    def test_go_dep_build(self):
+        proj = "github.com/golang"
+        name = "dep"
+        ver = "v0.3.1"
+        archive = ".tar.gz"
+        url = "https://%s/%s/archive/%s%s" % (proj, name, ver, archive)
+
+        runCmd("cd %s; wget %s" % (self.tmpdir_SDKQA, url))
+        runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver+archive))
+        runCmd("mkdir -p %s/src/%s" % (self.go_path, proj))
+        runCmd("mv %s/dep-0.3.1 %s/src/%s/%s"
+               % (self.tmpdir_SDKQA, self.go_path, proj, name))
+        retv = self.run_sdk_go_command('build  %s/%s/cmd/dep'
+                                       % (proj, name))
+        self.assertEqual(retv, 0,
+                         msg="Running go build failed for %s" % name)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 0ffb686..09e0b20 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -211,7 +211,7 @@
         image_name = 'core-image-minimal'
 
         img_types = [itype for itype in get_bb_var("IMAGE_TYPES", image_name).split() \
-                         if itype not in ('container', 'elf', 'multiubi')]
+                         if itype not in ('container', 'elf', 'f2fs', 'multiubi')]
 
         config = 'IMAGE_FSTYPES += "%s"\n'\
                  'MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047"\n'\
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/meta_ide.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/meta_ide.py
new file mode 100644
index 0000000..5df9d3e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -0,0 +1,49 @@
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
+from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
+from oeqa.core.decorator.oeid import OETestID
+import tempfile
+import shutil
+
+class MetaIDE(OESelftestTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        super(MetaIDE, cls).setUpClass()
+        bitbake('meta-ide-support')
+        bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'TMPDIR', 'COREBASE'])
+        cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS']
+        cls.tmpdir = bb_vars['TMPDIR']
+        cls.environment_script_path = '%s/%s' % (cls.tmpdir, cls.environment_script)
+        cls.corebasedir = bb_vars['COREBASE']
+        cls.tmpdir_metaideQA = tempfile.mkdtemp(prefix='metaide')
+        
+    @classmethod
+    def tearDownClass(cls):
+        shutil.rmtree(cls.tmpdir_metaideQA, ignore_errors=True)
+        super(MetaIDE, cls).tearDownClass()
+
+    @OETestID(1982)
+    def test_meta_ide_had_installed_meta_ide_support(self):
+        self.assertExists(self.environment_script_path)
+
+    @OETestID(1983)
+    def test_meta_ide_can_compile_c_program(self):
+        runCmd('cp %s/test.c %s' % (self.tc.files_dir, self.tmpdir_metaideQA))
+        runCmd("cd %s; . %s; $CC test.c -lm" % (self.tmpdir_metaideQA, self.environment_script_path))
+        compiled_file = '%s/a.out' % self.tmpdir_metaideQA
+        self.assertExists(compiled_file)
+
+    @OETestID(1984)
+    def test_meta_ide_can_build_cpio_project(self):
+        dl_dir = self.td.get('DL_DIR', None)
+        self.project = SDKBuildProject(self.tmpdir_metaideQA + "/cpio/", self.environment_script_path,
+                        "https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.gz",
+                        self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
+        self.project.download_archive()
+        self.assertEqual(self.project.run_configure(), 0,
+                        msg="Running configure failed")
+        self.assertEqual(self.project.run_make(), 0,
+                        msg="Running make failed")
+        self.assertEqual(self.project.run_install(), 0,
+                        msg="Running make install failed")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py
index 47d41f5..5ebdd57 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -3,9 +3,10 @@
 #
 
 import re
-
+import tempfile
+import time
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
 from oeqa.core.decorator.oeid import OETestID
 
 class RunqemuTests(OESelftestTestCase):
@@ -136,3 +137,70 @@
         cmd = "%s %s" % (self.cmd_common, rootfs)
         with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
             self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
+
+# This test was designed as a separate class to test that shutdown
+# command will shutdown qemu as expected on each qemu architecture
+# based on the MACHINE configuration inside the config file
+# (eg. local.conf).
+#
+# This was different compared to RunqemuTests, where RunqemuTests was
+# dedicated for MACHINE=qemux86-64 where it test that qemux86-64 will
+# bootup various filesystem types, including live image(iso and hddimg)
+# where live image was not supported on all qemu architecture.
+class QemuTest(OESelftestTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        super(QemuTest, cls).setUpClass()
+        cls.recipe = 'core-image-minimal'
+        cls.machine =  get_bb_var('MACHINE')
+        cls.deploy_dir_image =  get_bb_var('DEPLOY_DIR_IMAGE')
+        cls.cmd_common = "runqemu nographic"
+        cls.qemuboot_conf = "%s-%s.qemuboot.conf" % (cls.recipe, cls.machine)
+        cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, cls.qemuboot_conf)
+        bitbake(cls.recipe)
+
+    def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, timeout):
+        qemu.run_serial("shutdown -h now")
+        # Stop thread will stop the LoggingThread instance used for logging
+        # qemu through serial console, stop thread will prevent this code
+        # from facing exception (Console connection closed unexpectedly)
+        # when qemu was shutdown by the above shutdown command
+        qemu.runner.stop_thread()
+        time_track = 0
+        while True:
+            is_alive = qemu.check()
+            if not is_alive:
+                return True
+            if time_track > timeout:
+                return False
+            time.sleep(1)
+            time_track += 1
+
+    def test_qemu_can_shutdown(self):
+        self.assertExists(self.qemuboot_conf)
+        cmd = "%s %s" % (self.cmd_common, self.qemuboot_conf)
+        shutdown_timeout = 120
+        with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+            qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+            self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+
+    # Need to have portmap/rpcbind running to allow this test to work and
+    # current autobuilder setup does not have this.
+    def disabled_test_qemu_can_boot_nfs_and_shutdown(self):
+        self.assertExists(self.qemuboot_conf)
+        bitbake('meta-ide-support')
+        rootfs_tar = "%s-%s.tar.bz2" % (self.recipe, self.machine)
+        rootfs_tar = os.path.join(self.deploy_dir_image, rootfs_tar)
+        self.assertExists(rootfs_tar)
+        tmpdir = tempfile.mkdtemp(prefix='qemu_nfs')
+        tmpdir_nfs = os.path.join(tmpdir, 'nfs')
+        cmd_extract_nfs = 'runqemu-extract-sdk %s %s' % (rootfs_tar, tmpdir_nfs)
+        result = runCmd(cmd_extract_nfs)
+        self.assertEqual(0, result.status, "runqemu-extract-sdk didn't run as expected. %s" % result.output)
+        cmd = "%s nfs %s %s" % (self.cmd_common, self.qemuboot_conf, tmpdir_nfs)
+        shutdown_timeout = 120
+        with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+            qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+            self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+        runCmd('rm -rf %s' % tmpdir)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py
index 25270b7..9c9b4b3 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -167,55 +167,6 @@
 
 class Postinst(OESelftestTestCase):
     @OETestID(1540)
-    def test_verify_postinst(self):
-        """
-        Summary: The purpose of this test is to verify the execution order of postinst Bugzilla ID: [5319]
-        Expected :
-        1. Compile a minimal image.
-        2. The compiled image will add the created layer with the recipes postinst[ abdpt]
-        3. Run qemux86
-        4. Validate the task execution order
-        Author: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
-        """
-        features = 'INHERIT += "testimage"\n'
-        features += 'CORE_IMAGE_EXTRA_INSTALL += "postinst-at-rootfs \
-postinst-delayed-a \
-postinst-delayed-b \
-postinst-delayed-d \
-postinst-delayed-p \
-postinst-delayed-t \
-"\n'
-        self.write_config(features)
-
-        bitbake('core-image-minimal -f ')
-
-        postinst_list = ['100-postinst-at-rootfs',
-                         '101-postinst-delayed-a',
-                         '102-postinst-delayed-b',
-                         '103-postinst-delayed-d',
-                         '104-postinst-delayed-p',
-                         '105-postinst-delayed-t']
-        path_workdir = get_bb_var('WORKDIR','core-image-minimal')
-        workspacedir = 'testimage/qemu_boot_log'
-        workspacedir = os.path.join(path_workdir, workspacedir)
-        rexp = re.compile("^Running postinst .*/(?P<postinst>.*)\.\.\.$")
-        with runqemu('core-image-minimal') as qemu:
-            with open(workspacedir) as f:
-                found = False
-                idx = 0
-                for line in f.readlines():
-                    line = line.strip().replace("^M","")
-                    if not line: # To avoid empty lines
-                        continue
-                    m = rexp.search(line)
-                    if m:
-                        self.assertEqual(postinst_list[idx], m.group('postinst'), "Fail")
-                        idx = idx+1
-                        found = True
-                    elif found:
-                        self.assertEqual(idx, len(postinst_list), "Not found all postinsts")
-                        break
-
     @OETestID(1545)
     def test_postinst_rootfs_and_boot(self):
         """
@@ -234,16 +185,22 @@
                         for initialization managers: sysvinit and systemd.
 
         """
-        file_rootfs_name = "this-was-created-at-rootfstime"
-        fileboot_name = "this-was-created-at-first-boot"
-        rootfs_pkg = 'postinst-at-rootfs'
-        boot_pkg = 'postinst-delayed-a'
+
+        import oe.path
+
+        vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
+        rootfs = vars["IMAGE_ROOTFS"]
+        self.assertIsNotNone(rootfs)
+        sysconfdir = vars["sysconfdir"]
+        self.assertIsNotNone(sysconfdir)
+        # Need to use oe.path here as sysconfdir starts with /
+        hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
+        targettestdir = os.path.join(sysconfdir, "postinst-test")
 
         for init_manager in ("sysvinit", "systemd"):
             for classes in ("package_rpm", "package_deb", "package_ipk"):
                 with self.subTest(init_manager=init_manager, package_class=classes):
-                    features = 'MACHINE = "qemux86"\n'
-                    features += 'CORE_IMAGE_EXTRA_INSTALL += "%s %s "\n'% (rootfs_pkg, boot_pkg)
+                    features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-delayed-b"\n'
                     features += 'IMAGE_FEATURES += "package-management empty-root-password"\n'
                     features += 'PACKAGE_CLASSES = "%s"\n' % classes
                     if init_manager == "systemd":
@@ -255,13 +212,49 @@
 
                     bitbake('core-image-minimal')
 
-                    file_rootfs_created = os.path.join(get_bb_var('IMAGE_ROOTFS', "core-image-minimal"),
-                                                       file_rootfs_name)
-                    found = os.path.isfile(file_rootfs_created)
-                    self.assertTrue(found, "File %s was not created at rootfs time by %s" % \
-                                    (file_rootfs_name, rootfs_pkg))
+                    self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs")),
+                                    "rootfs state file was not created")
 
-                    testcommand = 'ls /etc/' + fileboot_name
                     with runqemu('core-image-minimal') as qemu:
-                        status, output = qemu.run_serial("-f /etc/" + fileboot_name)
-                        self.assertEqual(status, 0, 'File %s was not created at first boot (%s)' % (fileboot_name, output))
+                        # Make the test echo a string and search for that as
+                        # run_serial()'s status code is useless.'
+                        for filename in ("rootfs", "delayed-a", "delayed-b"):
+                            status, output = qemu.run_serial("test -f %s && echo found" % os.path.join(targettestdir, filename))
+                            self.assertEqual(output, "found", "%s was not present on boot" % filename)
+
+
+
+    def test_failing_postinst(self):
+        """
+        Summary:        The purpose of this test case is to verify that post-installation
+                        scripts that contain errors are properly reported.
+        Expected:       The scriptlet failure is properly reported.
+                        The file that is created after the error in the scriptlet is not present.
+        Product: oe-core
+        Author: Alexander Kanavin <alexander.kanavin@intel.com>
+        """
+
+        import oe.path
+
+        vars = get_bb_vars(("IMAGE_ROOTFS", "sysconfdir"), "core-image-minimal")
+        rootfs = vars["IMAGE_ROOTFS"]
+        self.assertIsNotNone(rootfs)
+        sysconfdir = vars["sysconfdir"]
+        self.assertIsNotNone(sysconfdir)
+        # Need to use oe.path here as sysconfdir starts with /
+        hosttestdir = oe.path.join(rootfs, sysconfdir, "postinst-test")
+
+        for classes in ("package_rpm", "package_deb", "package_ipk"):
+            with self.subTest(package_class=classes):
+                features = 'CORE_IMAGE_EXTRA_INSTALL = "postinst-rootfs-failing"\n'
+                features += 'PACKAGE_CLASSES = "%s"\n' % classes
+                self.write_config(features)
+                bb_result = bitbake('core-image-minimal')
+                self.assertGreaterEqual(bb_result.output.find("Intentionally failing postinstall scriptlets of ['postinst-rootfs-failing'] to defer them to first boot is deprecated."), 0,
+                    "Warning about a failed scriptlet not found in bitbake output: %s" %(bb_result.output))
+
+                self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs-before-failure")),
+                                    "rootfs-before-failure file was not created")
+                self.assertFalse(os.path.isfile(os.path.join(hosttestdir, "rootfs-after-failure")),
+                                    "rootfs-after-failure file was created")
+
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py
index b3d1a82..a750cfc 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/signing.py
@@ -87,7 +87,7 @@
         ret = runCmd('%s/rpmkeys --define "_dbpath %s" --checksig %s' %
                      (staging_bindir_native, rpmdb, pkg_deploy))
         # tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
-        self.assertIn('rsa sha1 (md5) pgp md5 OK', ret.output, 'Package signed incorrectly.')
+        self.assertIn('digests signatures OK', ret.output, 'Package signed incorrectly.')
         shutil.rmtree(rpmdb)
 
         #Check that an image can be built from signed packages
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py
index 4790088..7b008e4 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -2,15 +2,51 @@
 import shutil
 import glob
 import subprocess
+import tempfile
 
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer, create_temp_layer
 from oeqa.selftest.cases.sstate import SStateBase
 from oeqa.core.decorator.oeid import OETestID
 
 import bb.siggen
 
 class SStateTests(SStateBase):
+    def test_autorev_sstate_works(self):
+        # Test that a git repository which changes is correctly handled by SRCREV = ${AUTOREV}
+        # when PV does not contain SRCPV
+
+        tempdir = tempfile.mkdtemp(prefix='oeqa')
+        self.track_for_cleanup(tempdir)
+        create_temp_layer(tempdir, 'selftestrecipetool')
+        self.add_command_to_tearDown('bitbake-layers remove-layer %s' % tempdir)
+        runCmd('bitbake-layers add-layer %s' % tempdir)
+
+        # Use dbus-wait as a local git repo we can add a commit between two builds in
+        pn = 'dbus-wait'
+        srcrev = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
+        url = 'git://git.yoctoproject.org/dbus-wait'
+        result = runCmd('git clone %s noname' % url, cwd=tempdir)
+        srcdir = os.path.join(tempdir, 'noname')
+        result = runCmd('git reset --hard %s' % srcrev, cwd=srcdir)
+        self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure script in source directory')
+
+        recipefile = os.path.join(tempdir, "recipes-test", "dbus-wait-test", 'dbus-wait-test_git.bb')
+        os.makedirs(os.path.dirname(recipefile))
+        srcuri = 'git://' + srcdir + ';protocol=file'
+        result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri])
+        self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
+
+        with open(recipefile, 'a') as f:
+            f.write('SRCREV = "${AUTOREV}"\n')
+            f.write('PV = "1.0"\n')
+
+        bitbake("dbus-wait-test -c fetch")
+        with open(os.path.join(srcdir, "bar.txt"), "w") as f:
+            f.write("foo")
+        result = runCmd('git add bar.txt; git commit -asm "add bar"', cwd=srcdir)
+        bitbake("dbus-wait-test -c unpack")
+
 
     # Test sstate files creation and their location
     def run_test_sstate_creation(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True, should_pass=True):
@@ -490,7 +526,7 @@
         # this is an expensive computation, thus just compare the first 'max_sigfiles_to_compare' k files
         max_sigfiles_to_compare = 20
         first, rest = files[:max_sigfiles_to_compare], files[max_sigfiles_to_compare:]
-        compare_sigfiles(first, files1.keys(), files2.keys(), compare=True)
-        compare_sigfiles(rest, files1.keys(), files2.keys(), compare=False)
+        compare_sigfiles(first, files1, files2, compare=True)
+        compare_sigfiles(rest, files1, files2, compare=False)
 
         self.fail("sstate hashes not identical.")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py
index 651d575..b84466d 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/cases/wic.py
@@ -623,7 +623,7 @@
             self.assertTrue(os.path.islink(path))
             self.assertTrue(os.path.isfile(os.path.realpath(path)))
 
-    @OETestID(1422)
+    @OETestID(1424)
     @only_for_arch(['i586', 'i686', 'x86_64'])
     def test_qemu(self):
         """Test wic-image-minimal under qemu"""
@@ -634,10 +634,13 @@
         self.remove_config(config)
 
         with runqemu('wic-image-minimal', ssh=False) as qemu:
-            cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' '"
+            cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
+            status, output = qemu.run_serial(cmd)
+            self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
+            cmd = "grep UUID= /etc/fstab"
             status, output = qemu.run_serial(cmd)
             self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
-            self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /mnt')
+            self.assertEqual(output, 'UUID=2c71ef06-a81d-4735-9d3a-379b69c6bdba\t/media\text4\tdefaults\t0\t0')
 
     @only_for_arch(['i586', 'i686', 'x86_64'])
     @OETestID(1852)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py b/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
index f63936c..59a9c35 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
@@ -91,6 +91,8 @@
 
     def __init__(self, d, logger, image_fstype=None):
 
+        import oe.types
+
         super(QemuTarget, self).__init__(d, logger)
 
         self.rootfs = ''
@@ -107,7 +109,7 @@
         dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
         qemu_use_kvm = d.getVar("QEMU_USE_KVM")
         if qemu_use_kvm and \
-           (qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
+           (oe.types.boolean(qemu_use_kvm) and "x86" in d.getVar("MACHINE") or \
             d.getVar("MACHINE") in qemu_use_kvm.split()):
             use_kvm = True
         else:
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
index 0bb9002..0d9cf23 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
@@ -227,7 +227,7 @@
     bbenv = get_bb_env(target, postconfig=postconfig)
 
     if variables is not None:
-        variables = variables.copy()
+        variables = list(variables)
     var_re = re.compile(r'^(export )?(?P<var>\w+(_.*)?)="(?P<value>.*)"$')
     unset_re = re.compile(r'^unset (?P<var>\w+)$')
     lastline = None
@@ -285,7 +285,7 @@
         f.write('BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' % templayername)
         f.write('BBFILE_PRIORITY_%s = "%d"\n' % (templayername, priority))
         f.write('BBFILE_PATTERN_IGNORE_EMPTY_%s = "1"\n' % templayername)
-
+        f.write('LAYERSERIES_COMPAT_%s = "${LAYERSERIES_COMPAT_core}"\n' % templayername)
 
 @contextlib.contextmanager
 def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True):
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
index 724afb2..afd5b8e 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
@@ -14,7 +14,8 @@
     if pkg_class == "rpm":
         pm = RpmPM(d,
                    root_path,
-                   d.getVar('TARGET_VENDOR'))
+                   d.getVar('TARGET_VENDOR'),
+                   filterbydependencies=False)
         pm.create_configs()
 
     elif pkg_class == "ipk":
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
index 0631d43..c962602 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
@@ -194,7 +194,8 @@
             sys.exit(0)
 
         self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid)
-        self.logger.debug("waiting at most %s seconds for qemu pid" % self.runqemutime)
+        self.logger.debug("waiting at most %s seconds for qemu pid (%s)" %
+                          (self.runqemutime, time.strftime("%D %H:%M:%S")))
         endtime = time.time() + self.runqemutime
         while not self.is_alive() and time.time() < endtime:
             if self.runqemu.poll():
@@ -208,7 +209,8 @@
             time.sleep(0.5)
 
         if not self.is_alive():
-            self.logger.error("Qemu pid didn't appear in %s seconds" % self.runqemutime)
+            self.logger.error("Qemu pid didn't appear in %s seconds (%s)" %
+                              (self.runqemutime, time.strftime("%D %H:%M:%S")))
             # Dump all processes to help us to figure out what is going on...
             ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command '], stdout=subprocess.PIPE).communicate()[0]
             processes = ps.decode("utf-8")
@@ -225,7 +227,9 @@
         # We are alive: qemu is running
         out = self.getOutput(output)
         netconf = False # network configuration is not required by default
-        self.logger.debug("qemu started in %s seconds - qemu procces pid is %s" % (time.time() - (endtime - self.runqemutime), self.qemupid))
+        self.logger.debug("qemu started in %s seconds - qemu procces pid is %s (%s)" %
+                          (time.time() - (endtime - self.runqemutime),
+                           self.qemupid, time.strftime("%D %H:%M:%S")))
         if get_ip:
             cmdline = ''
             with open('/proc/%s/cmdline' % self.qemupid) as p:
@@ -269,7 +273,8 @@
             return False
 
         self.logger.debug("Output from runqemu:\n%s", out)
-        self.logger.debug("Waiting at most %d seconds for login banner" % self.boottime)
+        self.logger.debug("Waiting at most %d seconds for login banner (%s)" %
+                          (self.boottime, time.strftime("%D %H:%M:%S")))
         endtime = time.time() + self.boottime
         socklist = [self.server_socket]
         reachedlogin = False
@@ -298,15 +303,22 @@
                             self.server_socket = qemusock
                             stopread = True
                             reachedlogin = True
-                            self.logger.debug("Reached login banner")
+                            self.logger.debug("Reached login banner in %s seconds (%s)" %
+                                              (time.time() - (endtime - self.boottime),
+                                              time.strftime("%D %H:%M:%S")))
                     else:
+                        # no need to check if reachedlogin unless we support multiple connections
+                        self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" %
+                                          time.strftime("%D %H:%M:%S"))
                         socklist.remove(sock)
                         sock.close()
                         stopread = True
 
 
         if not reachedlogin:
-            self.logger.debug("Target didn't reached login boot in %d seconds" % self.boottime)
+            if time.time() >= endtime:
+                self.logger.debug("Target didn't reach login banner in %d seconds (%s)" %
+                                  (self.boottime, time.strftime("%D %H:%M:%S")))
             tail = lambda l: "\n".join(l.splitlines()[-25:])
             # in case bootlog is empty, use tail qemu log store at self.msg
             lines = tail(bootlog if bootlog else self.msg)
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/gcc8.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/gcc8.patch
new file mode 100644
index 0000000..fa7331f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/gcc8.patch
@@ -0,0 +1,74 @@
+From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001
+From: Michael Chang <mchang@suse.com>
+Date: Mon, 26 Mar 2018 16:52:34 +0800
+Subject: Fix packed-not-aligned error on GCC 8
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When building with GCC 8, there are several errors regarding packed-not-aligned.
+
+./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned]
+
+This patch fixes the build error by cleaning up the ambiguity of placing
+aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
+grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
+has to be packed, to ensure the structure is bit-to-bit mapped to the format
+laid on disk. I think we could blame to copy and paste error here for the
+mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
+the name suggests. :)
+
+Signed-off-by: Michael Chang <mchang@suse.com>
+Tested-by: Michael Chang <mchang@suse.com>
+Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+
+Upstream-Status: Backport http://git.savannah.gnu.org/cgit/grub.git/commit/?id=563b1da6e6ae7af46cc8354cadb5dab416989f0a
+---
+ grub-core/fs/btrfs.c          | 2 +-
+ include/grub/efiemu/runtime.h | 2 +-
+ include/grub/gpt_partition.h  | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
+index 4849c1c..be19544 100644
+--- a/grub-core/fs/btrfs.c
++++ b/grub-core/fs/btrfs.c
+@@ -175,7 +175,7 @@ struct grub_btrfs_time
+ {
+   grub_int64_t sec;
+   grub_uint32_t nanosec;
+-} __attribute__ ((aligned (4)));
++} GRUB_PACKED;
+ 
+ struct grub_btrfs_inode
+ {
+diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
+index 9b6b729..36d2ded 100644
+--- a/include/grub/efiemu/runtime.h
++++ b/include/grub/efiemu/runtime.h
+@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
+ 
+ struct efi_variable
+ {
+-  grub_efi_guid_t guid;
++  grub_efi_packed_guid_t guid;
+   grub_uint32_t namelen;
+   grub_uint32_t size;
+   grub_efi_uint32_t attributes;
+diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
+index 1b32f67..9668a68 100644
+--- a/include/grub/gpt_partition.h
++++ b/include/grub/gpt_partition.h
+@@ -28,7 +28,7 @@ struct grub_gpt_part_type
+   grub_uint16_t data2;
+   grub_uint16_t data3;
+   grub_uint8_t data4[8];
+-} __attribute__ ((aligned(8)));
++} GRUB_PACKED;
+ typedef struct grub_gpt_part_type grub_gpt_part_type_t;
+ 
+ #define GRUB_GPT_PARTITION_TYPE_EMPTY \
+-- 
+cgit v1.0-41-gc330
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
index 935c472..ffc2d40 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
@@ -43,19 +43,16 @@
  grub-core/genmod.sh.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
-index 76df0bb..39a9cfc 100644
---- a/grub-core/genmod.sh.in
-+++ b/grub-core/genmod.sh.in
-@@ -59,7 +59,7 @@ if test x@TARGET_APPLE_CC@ != x1; then
+Index: grub-2.02/grub-core/genmod.sh.in
+===================================================================
+--- grub-2.02.orig/grub-core/genmod.sh.in
++++ grub-2.02/grub-core/genmod.sh.in
+@@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; th
  	if test x@platform@ != xemu; then
- 	    @STRIP@ --strip-unneeded \
+ 	    @TARGET_STRIP@ --strip-unneeded \
  		-K grub_mod_init -K grub_mod_fini \
 -		-K _grub_mod_init -K _grub_mod_fini \
 +		-K _grub_mod_init -K _grub_mod_fini -K .module_license \
  		-R .note.gnu.gold-version -R .note.GNU-stack \
- 		-R .note -R .comment $tmpfile || exit 1
+ 		-R .note -R .comment -R .ARM.exidx $tmpfile || exit 1
  	fi
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
new file mode 100644
index 0000000..750f8c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
@@ -0,0 +1,29 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic grub.cfg for use in EFI systems"
+
+RPROVIDES_${PN} += "virtual/grub-bootconf"
+
+inherit grub-efi-cfg
+
+S = "${WORKDIR}"
+
+GRUB_CFG = "${S}/grub-bootconf"
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+
+python do_configure() {
+    bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND ROOT"
+
+do_install() {
+	install -d ${D}/boot
+	install -d ${D}/boot/EFI
+	install -d ${D}/boot/EFI/BOOT
+	install grub-bootconf ${D}/boot/EFI/BOOT/grub.cfg
+}
+
+FILES_${PN} = "/boot/EFI/BOOT/grub.cfg"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb
index 128da16..7bfc8ee 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -3,7 +3,7 @@
 GRUBPLATFORM = "efi"
 
 DEPENDS_append_class-target = " grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common virtual/grub-bootconf"
 
 SRC_URI += " \
            file://cfg \
@@ -15,16 +15,22 @@
 python __anonymous () {
     import re
     target = d.getVar('TARGET_ARCH')
+    prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
     if target == "x86_64":
         grubtarget = 'x86_64'
-        grubimage = "grub-efi-bootx64.efi"
+        grubimage = prefix + "bootx64.efi"
     elif re.match('i.86', target):
         grubtarget = 'i386'
-        grubimage = "grub-efi-bootia32.efi"
+        grubimage = prefix + "bootia32.efi"
+    elif re.match('aarch64', target):
+        grubtarget = 'arm64'
+        grubimage = prefix + "bootaa64.efi"
     else:
-        raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target)
+        raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
     d.setVar("GRUB_TARGET", grubtarget)
     d.setVar("GRUB_IMAGE", grubimage)
+    prefix = "grub-efi-" if prefix == "" else ""
+    d.setVar("GRUB_IMAGE_PREFIX", prefix)
 }
 
 inherit deploy
@@ -36,12 +42,36 @@
 # and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo)
 CFLAGS_append_class-native = " -Wno-error=trampolines"
 
+do_mkimage() {
+	cd ${B}
+	# Search for the grub.cfg on the local boot media by using the
+	# built in cfg file provided via this recipe
+	grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
+	               ${GRUB_BUILDIN}
+}
+
+addtask mkimage before do_install after do_compile
+
+do_mkimage_class-native() {
+	:
+}
+
+do_install_append_class-target() {
+	install -d ${D}/boot
+	install -d ${D}/boot/EFI
+	install -d ${D}/boot/EFI/BOOT
+	install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE}
+}
+
 do_install_class-native() {
 	install -d ${D}${bindir}
 	install -m 755 grub-mkimage ${D}${bindir}
 }
 
-do_install_append_class-target() {
+do_install_class-target() {
+    oe_runmake 'DESTDIR=${D}' -C grub-core install
+
     # Remove build host references...
     find "${D}" -name modinfo.sh -type f -exec \
         sed -i \
@@ -52,15 +82,10 @@
 }
 
 GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
-                 efi_gop iso9660 search loadenv test"
+                 efi_gop iso9660 configfile search loadenv test"
 
 do_deploy() {
-	# Search for the grub.cfg on the local boot media by using the
-	# built in cfg file provided via this recipe
-	grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
-	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
-	               ${GRUB_BUILDIN}
-	install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
+	install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
 }
 
 do_deploy_class-native() {
@@ -69,9 +94,11 @@
 
 addtask deploy after do_install before do_build
 
-FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
-                ${datadir}/grub \
-                "
+FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
+               ${datadir}/grub \
+               /boot/EFI/BOOT/${GRUB_IMAGE} \
+               "
+
 
 # 64-bit binaries are expected for the bootloader with an x32 userland
 INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
index 28f96bb..a8f335e 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
@@ -18,6 +18,7 @@
            file://grub-module-explicitly-keeps-symbole-.module_license.patch \
            file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
 	   file://fix.build.with.gcc-7.patch \
+           file://gcc8.patch \
 "
 SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
 SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
@@ -47,7 +48,7 @@
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
-PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
+PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
 
 # grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
 # OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
@@ -67,12 +68,4 @@
 	${S}/autogen.sh )
 }
 
-# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
-# conflicted, remove it since no one uses it.
-SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
-
-PACKAGES =+ "${PN}-editenv"
-
-FILES_${PN}-editenv = "${bindir}/grub-editenv"
-RDEPENDS_${PN} += "${PN}-editenv"
 RDEPENDS_${PN}_class-native = ""
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb
index 3e61f6a..e097375 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.02.bb
@@ -1,6 +1,18 @@
 require grub2.inc
 
-RDEPENDS_${PN} += "diffutils freetype"
+RDEPENDS_${PN}-common += "${PN}-editenv"
+RDEPENDS_${PN} += "diffutils freetype ${PN}-common"
+
+RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
+
+PACKAGES =+ "${PN}-editenv ${PN}-common"
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+    ${bindir} \
+    ${sysconfdir} \
+    ${sbindir} \
+    ${datadir}/grub \
+"
 
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/COPYING.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/COPYING.patch
deleted file mode 100644
index 05c70c9..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/COPYING.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-Upstream-Status: Inappropriate [other]
-
-diff -ruN hostap-conf-1.0-orig/COPYING hostap-conf-1.0/COPYING
---- hostap-conf-1.0-orig/COPYING	1970-01-01 08:00:00.000000000 +0800
-+++ hostap-conf-1.0/COPYING	2010-12-09 16:36:48.000000000 +0800
-@@ -0,0 +1,340 @@
-+		    GNU GENERAL PUBLIC LICENSE
-+		       Version 2, June 1991
-+
-+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  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 Library 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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 Library General
-+Public License instead of this License.
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap-fw-load.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
deleted file mode 100644
index 050bdc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
-Upstream-Status: Inappropriate [configuration]
-
---- hostap-utils-0.2.4/hostap_fw_load~hostap-fw-load
-+++ hostap-utils-0.2.4/hostap_fw_load
-@@ -6,9 +6,9 @@
- # Firmware images for the card
- # TODO: could try to select correct firmware type automatically
- 
--PRI=/etc/pcmcia/PM010102.HEX
--STA=/etc/pcmcia/RF010802.HEX
--PRISM2_SREC=/usr/local/bin/prism2_srec
-+PRI=/etc/pcmcia/pm010102.hex
-+STA=/etc/pcmcia/rf010804.hex
-+PRISM2_SREC=/usr/sbin/prism2_srec
- 
- set -e
- 
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf
deleted file mode 100644
index 8dda82a..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf
+++ /dev/null
@@ -1,193 +0,0 @@
-module "hostap_cs" opts "channel=3 iw_mode=2 essid=any ignore_cis_vcc=1"
-
-card "Actiontec 802CI2"
-  manfid 0x1668, 0x0101
-  bind "hostap_cs"
-
-card "AirWay 802.11 Adapter (PCMCIA)"
-  #version "AirWay", "802.11 Adapter (PCMCIA)"
-  manfid 0x0261, 0x0002
-  bind "hostap_cs"
-
-card "Asus SpaceLink WL110"
-   manfid 0x02aa,0x0002
-   bind "hostap_cs"
-
-## handhelds.org bug 964
-card "Belkin F5D6060 Ethernet"
-   #version "PCMCIA", "11M WLAN Card v2.5", "ISL37300P", "RevA"
-   manfid 0x0274, 0x1612
-   bind "hostap_cs"
-
-card "Compaq 11Mbps Wireless PC Card"
-  manfid 0x028a, 0x0002
-  bind "hostap_cs"
-
-card "Compaq WL100 11 Mbps Wireless Adapter"
-  manfid 0x0138, 0x0002
-  bind "hostap_cs"
-
-card "Compaq HNW-100 11 Mbps Wireless Adapter"
-  manfid 0x028a, 0x0002
-  bind "hostap_cs"
-
-card "D-Link DWL-650"
-  version "D", "Link DWL-650 11Mbps WLAN Card"
-  bind "hostap_cs"
-
-card "D-Link DRC-650"
-  version "D", "Link DRC-650 11Mbps WLAN Card"
-  bind "hostap_cs"
-
-card "D-Link DCF660"
-  manfid 0xd601, 0x0005
-  bind "hostap_cs"
-
-card "Farallon SkyLINE"
-  version "INTERSIL", "HFA384x/IEEE"
-  bind "hostap_cs"
-
-card "HyperLink Wireless PC Card 11Mbps"
-  version "HyperLink", "Wireless PC Card 11Mbps"
-  bind "hostap_cs"
-
-# card "Intersil PRISM2 11 Mbps Wireless Adapter"
-#   manfid 0x0156, 0x0002
-#  bind "hostap_cs"
-
-card "LA4111 Spectrum24 Wireless LAN PC Card"
-  version "Symbol Technologies"
-  bind "hostap_cs"
-
-card "Linksys WPC11 11Mbps 802.11b WLAN Card"
-  version "Instant Wireless ", " Network PC CARD", "Version 01.02"
-  bind "hostap_cs"
-
-card "Linksys WCF11 11Mbps 802.11b WLAN Card"
-   manfid 0x0274, 0x3301                                   
-   bind "hostap_cs" 
-
-## handhelds.org bug #790
-card "Linksys Wireless CompactFlash Card WCF12"
-  manfid 0x028a, 0x0673
-  bind "hostap_cs"
-
-card "Linksys WLAN CF Card"
-  manfid 0x0274, 0x3301
-  bind "hostap_cs"
-
-card "NETGEAR MA701 Wireless CF Card"
-  manfid 0xd601, 0x0002
-  bind "hostap_cs"
-
-card "Nortel Networks eMobility 802.11 Wireless Adapter"
-  manfid 0x01eb, 0x080a
-  bind "hostap_cs"
-
-card "PLANEX GeoWave GW-CF110"
-  version "PLANEX", "GeoWave/GW-CF110"
-  bind "hostap_cs"
-
-card "PROXIM LAN PC CARD HARMONY 80211B"
-  version "PROXIM", "LAN PC CARD HARMONY 80211B"
-  bind "hostap_cs"
-
-card "Proxim RangeLAN/DS"
-  version "PROXIM","RangeLAN-DS/LAN PC CARD"
-  manfid 0x0126, 0x8000
-  bind "hostap_cs"
-
-card "Safeway 802.11b Wireless Adapter"
-  manfid 0xd601, 0x0002
-  bind "hostap_cs"
-
-card "SAMSUNG 11Mbps WLAN Card"
-  version "SAMSUNG", "11Mbps WLAN Card"
-  bind "hostap_cs"
-
-# needs firmware upload via hostap_fw_load
-card "SanDisk ConnectPlus OEM (0MB)"
-   manfid 0xd601, 0x0010
-   bind "hostap_cs"
-
-# needs special activation (>=hostap 0.3.2 only) plus firmware upload
-card "SanDisk ConnectPlus w/ Memory"
-   version "SanDisk", "ConnectPlus"
-   manfid 0xd601, 0x0101
-   bind "hostap_cs" to 0
-#   bind "ide-cs" to 1
-
-card "Senao/Origo 80211b WLAN Card"
-   manfid 0x000b,0x7100
-   bind "hostap_cs"
-
-card "Sitecom WL-007 WLAN CF Card"
-  manfid 0xd601, 0x0004
-  bind "hostap_cs"
-
-card "SMC2632 802.11 (prism2) Card"
-  version "SMC", "SMC2632W", "Version 01.02", ""
-  bind "hostap_cs"
-
-card "SpeedStream SS1021 Wireless Adapter"
-  #version "Siemens", "SpeedStream Wireless PCMCIA"
-  manfid 0x02ac, 0x0002
-  bind "hostap_cs"
-
-card "ZCOMAX AirRunner/XI-300"
-  #version "ZCOMAX", "AirRunner/XI-300"
-  manfid 0xd601, 0x0002
-  bind "hostap_cs"
-
-card "Zonet ZCF1100"
-  manfid 0x000b, 0x7100
-  bind "hostap_cs"
-  
-card "Wireless LAN Adapter Version 01.02"
-   version "Wireless", "LAN Adapter", "Version 01.02"
-#   manfid 0x0156, 0x0002
-   bind "hostap_cs"
-
-card "Ambicom WL1100C 11Mbs Card 802.11b"
-  version "AmbiCom", "WL1100C 802.11b CF-Card", "2.2"
-  manfid 0xd601,0x0002
-  bind "hostap_cs"
-
-card "Ambicom WL1100C 11Mbs Card 802.11b"
-  manfid 0xd601,0x0002
-  bind "hostap_cs"
-
-card "Sandisk Connect SDWCFB-000"
-  manfid 0xd601,0x0005
-  bind "hostap_cs"
-
-# Cards with Intersil firmware (Prism chipset)
-
-card "Linksys WPC11 11Mbps 802.11b WLAN Card"
-  version "The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", "RevA"
-  bind "hostap_cs"
-
-card "Linksys CompactFlash Wireless Card"
-  version "Linksys", "Wireless CompactFlash Card"
-  bind "hostap_cs"
-
-card "ACTIONTEC PRISM Wireless LAN PC Card"
-  version "ACTIONTEC", "PRISM Wireless LAN PC Card"
-  bind "hostap_cs"
-
-card "Linksys WPC11 Version 3"
-  manfid 0x0274,0x1613
-  bind "hostap_cs"
-
-card "BENQ AWL100"
-  version "BENQ", "AWL100 PCMCIA ADAPTER"
-  bind "hostap_cs"
-
-card "Pretec WLAN"
-  version "Pretec", "CompactWLAN Card 802.11b", "2.5"
-  manfid 0x0156, 0x0002
-  bind "hostap_cs"
-
-card "TrendNet TEW PC16"
-  manfid 0x0274, 0x1601
-  bind "hostap_cs"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
deleted file mode 100644
index 5b7385a..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
+++ /dev/null
@@ -1,191 +0,0 @@
-device "hostap_cs"
-   class "network" module "hostap", "hostap_cs"
-
-card "Intersil PRISM2 Reference Design 11Mb/s WLAN Card"
-   version "INTERSIL", "HFA384x/IEEE"
-   bind "hostap_cs"
-
-card "Compaq WL100 11Mb/s WLAN Card"
-   manfid 0x0138, 0x0002
-   bind "hostap_cs"
-
-card "Compaq WL200"
-   version "Compaq", "WL200_11Mbps_Wireless_PCI_Card"
-   bind "hostap_cs"
-
-card "EMTAC A2424i 11Mbps WLAN Card"
-   manfid 0xc250, 0x0002
-#   cis "cis/Emtac.dat"
-   bind "hostap_cs"
-
-card "Linksys WPC11 11Mbps WLAN Card"
-   version "Instant Wireless ", " Network PC CARD", "Version 01.02"
-   bind "hostap_cs"
-
-card "Linksys WPC11 Ver 2.5 11Mbps WLAN Card"
-   manfid 0x0274, 0x1612
-   bind "hostap_cs"
-
-card "Linksys WPC11 Ver 3 11Mbps WLAN Card"
-   manfid 0x0274, 0x1613
-   bind "hostap_cs"
-
-card "Linksys WCF12 Wireless CompactFlash Card"
-   version "Linksys", "Wireless CompactFlash Card"
-   bind "hostap_cs"
-
-card "D-Link DWL-650 11Mbps WLAN Card"
-   version "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02"
-   bind "hostap_cs"
-
-card "D-Link DRC-650 11Mbps WLAN Card"
-#  version "D", "Link DRC-650 11Mbps WLAN Card", "Version 01.02"
-   manfid 0x028a, 0x0002
-   bind "hostap_cs"
-
-card "ZoomAir 4100 11Mb/s WLAN Card"
-   version "ZoomAir 11Mbps High", "Rate wireless Networking"
-   bind "hostap_cs"
-
-card "Addtron AWP-100 11Mbps WLAN Card"
-   version "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02"
-   bind "hostap_cs"
-
-card "Samsung SWL2000-N 11Mb/s WLAN Card"
-   manfid 0x0250, 0x0002
-   bind "hostap_cs"
-
-card "SMC 2632W 11Mbps WLAN Card"
-   version "SMC", "SMC2632W", "Version 01.02"
-   bind "hostap_cs"
-
-card "BroMax Freeport 11Mbps WLAN Card"
-   version "Intersil", "PRISM 2_5 PCMCIA ADAPTER", "ISL37300P", "Eval-RevA"
-   bind "hostap_cs"
-
-card "Z-Com XI300 11Mb/s WLAN Card"
-   manfid 0xd601, 0x0002
-   bind "hostap_cs"
-
-card "Zcomax XI-325H 200mW"
-#   version " ", "IEEE 802.11 Wireless LAN/PC Card"
-   manfid 0xd601, 0x0005
-   bind "hostap_cs"
-
-card "3Com AirConnect PCI 777A"
-   manfid 0x0101, 0x0777
-   bind "hostap_cs"
-
-card "U.S. Robotics IEEE 802.11b PC-CARD"
-   version "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02"
-#   manfid 0x0156, 0x0002
-   bind "hostap_cs"
-
-card "Longshine LCR-8531 11Mbps WLAN PCMCIA CARD"
-   version "OEM", "PRISM2 IEEE 802.11 PC-Card", "Version 01.02"
-#   manfid 0x0156, 0x0002
-   bind "hostap_cs"
-
-card "Philips 802.11b WLAN PCMCIA"
-   manfid 0x000b, 0x7300
-   bind "hostap_cs"
-
-card "Proxim RangeLAN"
-#   version "PROXIM", "RangeLAN-DS/LAN PC CARD"
-   manfid 0x0126, 0x8000
-   bind "hostap_cs"
-
-card "Buffalo WLI-CF-S11G"
-   version "BUFFALO", "WLI-CF-S11G"
-#  manfid 0x026f, 0x030b
-   bind "hostap_cs"
-
-card "Level-One WPC-0100"
-   version "Digital Data Communications", "WPC-0100", "Version 00.00"
-   manfid 0x0156, 0x0002
-   bind "hostap_cs"
-
-card "Belkin 802.11b WLAN PCMCIA"
-   version "Belkin", "11Mbps Wireless Notebook Network Adapter", "Version 01.02"
-   manfid 0x0156, 0x0002
-   bind "hostap_cs"
-
-card "Senao SL-2011CD/SL-2011CDPLUS"
-   version "INTERSIL", "HFA384x/IEEE", "Version 01.02"
-   manfid 0x0156, 0x0002
-   bind "hostap_cs"
-
-card "Fulbond Airbond XI-300B"
-   version " ", "IEEE 802.11 Wireless LAN/PC Card"
-   manfid 0xd601, 0x0002
-   bind "hostap_cs"
-
-card "Netgear MA401"
-   version "NETGEAR MA401 Wireless PC", "Card", "Version 01.00"
-#   manfid 0x0156, 0x0002
-   bind "hostap_cs"
-
-card "D-Link DWL-650 Rev. P1"
-   version "D-Link", "DWL-650 Wireless PC Card RevP", "ISL37101P-10", "A3"
-#   manfid 0x000b, 0x7110
-   bind "hostap_cs"
-
-card "SonicWALL Long Range Wireless Card"
-   version "SonicWALL", "Long Range Wireless Card", "ISL37100P", "1.0"
-   manfid 0x000b, 0x7100
-   bind "hostap_cs"
-
-card "Senao NL-2011CD PLUS Ext2 Mercury"
-   version "WLAN", "11Mbps_PC-Card_3.0", "ISL37100P", "Eval-RevA"
-   manfid 0x000b, 0x7100
-   bind "hostap_cs"
-
-card "Airvast WL100"
-   version "AIRVAST", "IEEE 802.11b Wireless PCMCIA Card", "HFA3863"
-   manfid 0x50c2, 0x0001
-   bind "hostap_cs"
-
-card "Microsoft Wireless Notebook Adapter MN-520 1.0.3"
-   version "Microsoft", "Wireless Notebook Adapter MN-520", "", "1.0.3"
-   manfid 0x02d2, 0x0001
-   bind "hostap_cs"
-
-card "NETGEAR MA401RA"
-   version "NETGEAR MA401RA Wireless PC", "Card", "ISL37300P", "Eval-RevA"
-   manfid 0x000b, 0x7300
-   bind "hostap_cs"
-
-card "Allied Telesyn AT-WCL452"
-   version "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio", "Ver. 1.00"
-   manfid 0xc00f, 0x0000
-   bind "hostap_cs"
-
-card "corega WL PCCL-11"
-   version "corega", "WL PCCL-11", "ISL37300P", "RevA"
-   manfid 0xc00f, 0x0000
-   bind "hostap_cs"
-
-card "SanDisk ConnectPlus"
-   version "SanDisk", "ConnectPlus"
-   manfid 0xd601, 0x0101
-   bind "hostap_cs" to 0
-   bind "ide-cs" to 1
-
-card "ASUS WL-100 8011b WLAN PC Card"
-   version "ASUS", "802_11b_PC_CARD_25", "Version 01.00"
-   manfid 0x02aa, 0x0002
-   bind "hostap_cs"
-
-card "ZyXel Zyair B-101 802.11b WLAN card"
-   version " ", "IEEE 802.11 Wireless LAN/PC Card"
-   manfid 0xd601, 0x0010
-   bind "hostap_cs"
-
-card "WLAN PRISM PCMCIA CARD 37300P RevB6"
-   version "WLAN", "PRISM PCMCIA CARD", "37300P", "Revision B6"
-   manfid 0x50c2, 0x7300
-   bind "hostap_cs"
-
-
-# Optional configuration parameters for hostap_cs.o
-# module "hostap_cs" opts "channel=3 iw_mode=3 essid=test ignore_cis_vcc=0"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.modalias b/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.modalias
deleted file mode 100644
index 2848351..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/files/hostap_cs.modalias
+++ /dev/null
@@ -1,28 +0,0 @@
-# product info: "Pretec", "CompactWLAN Card 802.11b", "2.5"
-alias pcmcia:m0156c0002f06fn00pfn00pa1CADD3E5pbE697636Cpc7A5BFCF1pd00000000 hostap_cs
-
-# manufacturer ID which exist in orinoco_cs AND in hostap_cs
-alias pcmcia:m000Bc7100f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m000Bc7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0126c8000f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0138c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0250c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0274c1612f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m0274c1613f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m028Ac0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m02AAc0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:m50C2c7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:mD601c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-alias pcmcia:mD601c0005f06fn00pfn00pa*pb*pc*pd* hostap_cs
-
-# product info: "Linksys", "Wireless CompactFlash Card", "", ""
-alias pcmcia:m028Ac0673f06fn00pfn00pa0733CC81pb0C52F395pc00000000pd00000000 hostap_cs
-
-# product info:"PLANEX COMMUNICATION INC","PLANEX GW-CF11X Wireless CF Card", "", ""
-alias pcmcia:mD601c0010f06fn00pfn00pa4703CF68pbFAD7318Dpc00000000pd00000000 hostap_cs
-
-# 0x0156, 0x0002 and "Version 01.02" only appear for Prism based cards.
-alias pcmcia:m0156c0002f06fn00pfn00pa*pb*pc4B74BAA0pd00000000 hostap_cs
-
-# "BUFFALO", "WLI-CF-S11G", "", ""
-alias pcmcia:m026Fc030Bf06fn00pfn00pa2DECECE3pb82067C18pc00000000pd00000000 hostap_cs
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
deleted file mode 100644
index e1d4c54..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Configuration files for HostAP (wifi) driver"
-DESCRIPTION = "PCMCIA-cs configuration files for wireless LAN cards based on Intersil's Prism2/2.5/3 chipset."
-SECTION = "kernel/modules"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-PR = "r15"
-
-SRC_URI = "file://hostap_cs.modalias \
-           file://COPYING.patch"
-
-inherit allarch
-
-S = "${WORKDIR}"
-
-do_compile() {
-}
-
-do_install() {
-	install -d ${D}${sysconfdir}/modprobe.d
-
-	install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modprobe.d/hostap_cs.conf
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
deleted file mode 100644
index b44dca3..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 742fb110d9841a04b3ced256b0bf80ff304dcaff Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 31 Aug 2015 05:45:08 +0000
-Subject: [PATCH] Define _u32/__s32/__u16/__s16/__u8 in terms of c99 types
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- wireless_copy.h | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/wireless_copy.h b/wireless_copy.h
-index 8208258..1171a35 100644
---- a/wireless_copy.h
-+++ b/wireless_copy.h
-@@ -86,11 +86,11 @@
- #else
- #include <sys/types.h>
- #include <net/if.h>
--typedef __uint32_t __u32;
--typedef __int32_t __s32;
--typedef __uint16_t __u16;
--typedef __int16_t __s16;
--typedef __uint8_t __u8;
-+typedef u_int32_t __u32;
-+typedef int32_t __s32;
-+typedef u_int16_t __u16;
-+typedef int16_t __s16;
-+typedef u_int8_t __u8;
- #ifndef __user
- #define __user
- #endif /* __user */
--- 
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
deleted file mode 100644
index 3e99d0d..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Obey LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- hostap-utils-0.4.7.orig/Makefile
-+++ hostap-utils-0.4.7/Makefile
-@@ -14,17 +14,17 @@ prism2_srec.o: prism2_srec.c util.h
- hostap_crypt_conf: hostap_crypt_conf.c
-
- hostap_diag: hostap_diag.o util.o
--	$(CC) -o hostap_diag $(CFLAGS) hostap_diag.o util.o
-+	$(CC) -o hostap_diag $(CFLAGS) $(LDFLAGS) hostap_diag.o util.o
-
- hostap_diag.o: hostap_diag.c util.h
-
- util.o: util.c util.h
-
- hostap_io_debug: hostap_io_debug.c
--	$(CC) -o hostap_io_debug $(CFLAGS) hostap_io_debug.c
-+	$(CC) -o hostap_io_debug $(CFLAGS) $(LDFLAGS) hostap_io_debug.c
-
- hostap_rid: hostap_rid.o util.o
--	$(CC) -o hostap_rid $(CFLAGS) hostap_rid.o util.o
-+	$(CC) -o hostap_rid $(CFLAGS) $(LDFLAGS) hostap_rid.o util.o
-
- hostap_rid.o: hostap_rid.c util.h
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils.inc b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils.inc
deleted file mode 100644
index 6d98e3a..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "User mode helpers for the hostap driver"
-DESCRIPTION = "The hostap driver supports Host AP mode, it allows for IEEE 802.11 \
-management functions on the host computer and allows the system to act as an access point."
-HOMEPAGE = "https://w1.fi"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
-			file://util.c;beginline=1;endline=9;md5=d3b9280851302e5ba34e5fb717489b6d"
-SECTION = "kernel/userland"
-PR = "r4"
-
-SRC_URI = "https://w1.fi/releases/hostap-utils-${PV}.tar.gz \
-           file://hostap-fw-load.patch \
-           file://0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch \
-"
-S = "${WORKDIR}/hostap-utils-${PV}"
-
-BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
-	    hostap_rid prism2_param prism2_srec split_combined_hex"
-
-do_install() {
-	install -d ${D}${sbindir}/
-	for f in ${BINARIES}
-	do
-		install -m 0755 $f ${D}${sbindir}/
-	done
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb b/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
deleted file mode 100644
index be5481f..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require hostap-utils.inc
-
-SRC_URI += "file://ldflags.patch"
-SRC_URI[md5sum] = "afe041581b8f01666e353bec20917c85"
-SRC_URI[sha256sum] = "c6f598d8e356c1620fa009eca0a700bf1105e16817eefd77d891994261009355"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
index 86a16c2..06f20e5 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
@@ -3,9 +3,10 @@
 Fix libacpi for x32
     
     libacpi doesn't use base_libdir for install.  This patch adds
-    base_libdir support so that x32 libraries are installed properly.
+    libdir support so that x32 libraries are installed properly.
 
 Patch Received from:  H.J. Lu <hjl.tools@gmail.com>
+Updated by: Ricardo Salveti <ricardo@opensourcefoundries.com> 2018/02/03
 
 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
 
@@ -13,18 +14,7 @@
 ===================================================================
 --- libacpi-0.2.orig/Makefile
 +++ libacpi-0.2/Makefile
-@@ -8,6 +8,10 @@ SRC_test = test-libacpi.c libacpi.c list
- OBJ = ${SRC:.c=.o}
- OBJ_test = ${SRC_test:.c=.o}
- 
-+ifndef base_libdir
-+base_libdir=/lib
-+endif
-+
- all: options libacpi.a libacpi.so test-libacpi
- 
- options:
-@@ -42,13 +46,13 @@ install: all
+@@ -42,13 +42,13 @@ install: all
  	@mkdir -p ${DESTDIR}${PREFIX}/include
  	@cp -f libacpi.h ${DESTDIR}${PREFIX}/include
  	@chmod 644 ${DESTDIR}${PREFIX}/include/libacpi.h
@@ -35,13 +25,13 @@
 -	@cp -f ${SONAME} ${DESTDIR}${PREFIX}/lib/
 -	@chmod 644 ${DESTDIR}${PREFIX}/lib/${SONAME}
 -	@ln -s ${SONAME} ${DESTDIR}${PREFIX}/lib/libacpi.so
-+	@echo installing library to ${DESTDIR}${PREFIX}${base_libdir}
-+	@mkdir -p ${DESTDIR}${PREFIX}${base_libdir}
-+	@cp -f libacpi.a ${DESTDIR}${PREFIX}${base_libdir}
-+	@chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/libacpi.a
-+	@cp -f ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/
-+	@chmod 644 ${DESTDIR}${PREFIX}${base_libdir}/${SONAME}
-+	@ln -s ${SONAME} ${DESTDIR}${PREFIX}${base_libdir}/libacpi.so
++	@echo installing library to ${DESTDIR}${LIBDIR}
++	@mkdir -p ${DESTDIR}${LIBDIR}
++	@cp -f libacpi.a ${DESTDIR}${LIBDIR}
++	@chmod 644 ${DESTDIR}${LIBDIR}/libacpi.a
++	@cp -f ${SONAME} ${DESTDIR}${LIBDIR}/
++	@chmod 644 ${DESTDIR}${LIBDIR}/${SONAME}
++	@ln -s ${SONAME} ${DESTDIR}${LIBDIR}/libacpi.so
  	@echo installing test-libacpi to ${DESTDIR}${PREFIX}/bin
  	@mkdir -p ${DESTDIR}${PREFIX}/bin
  	@cp -f test-libacpi ${DESTDIR}${PREFIX}/bin
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
index 6dc66ea..5e7f7fa 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
@@ -28,5 +28,5 @@
 TARGET_CC_ARCH += "${LDFLAGS}"
 
 do_install() {
-	oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix}
+	oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix} LIBDIR=${libdir}
 }
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch
index 55edfea..a7e4457 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils/configure.patch
@@ -13,11 +13,11 @@
 
 Upstream-Status: Inappropriate [embedded specific]
 
-Index: pciutils-3.5.4/Makefile
+Index: pciutils-3.5.6/Makefile
 ===================================================================
---- pciutils-3.5.4.orig/Makefile
-+++ pciutils-3.5.4/Makefile
-@@ -96,7 +95,7 @@ example: example.o lib/$(PCILIB)
+--- pciutils-3.5.6.orig/Makefile
++++ pciutils-3.5.6/Makefile
+@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB)
  example.o: example.c $(PCIINC)
  
  %: %.o
@@ -26,12 +26,12 @@
  
  %.8 %.7: %.man
  	M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
-Index: pciutils-3.5.4/lib/configure
+Index: pciutils-3.5.6/lib/configure
 ===================================================================
---- pciutils-3.5.4.orig/lib/configure
-+++ pciutils-3.5.4/lib/configure
-@@ -14,6 +14,10 @@ echo_n() {
- 	fi
+--- pciutils-3.5.6.orig/lib/configure
++++ pciutils-3.5.6/lib/configure
+@@ -9,6 +9,10 @@ echo_n() {
+ 	printf '%s' "$*"
  }
  
 +VERSION=$1
@@ -41,7 +41,7 @@
  if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then
  	echo >&2 "Please run the configure script from the top-level Makefile"
  	exit 1
-@@ -21,8 +25,8 @@ fi
+@@ -16,8 +20,8 @@ fi
  
  echo_n "Configuring libpci for your system..."
  if [ -z "$HOST" ] ; then
@@ -52,7 +52,7 @@
  	realsys="$sys"
  	if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
  	then
-@@ -30,7 +34,7 @@ if [ -z "$HOST" ] ; then
+@@ -25,7 +29,7 @@ if [ -z "$HOST" ] ; then
  		proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
  		cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
  	else
@@ -61,7 +61,7 @@
  	fi
  	if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ]
  	then
-@@ -40,7 +44,7 @@ if [ -z "$HOST" ] ; then
+@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then
  	then
  		sys=cygwin
  	fi
@@ -70,7 +70,7 @@
  fi
  [ -n "$RELEASE" ] && rel="${RELEASE}"
  # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
-@@ -49,6 +53,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^
+@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^
  sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  echo " $host $rel $cpu $sys"
  
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.5.bb b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.5.bb
deleted file mode 100644
index 0051fd8..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.5.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "PCI utilities"
-DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
-to PCI bus configuration space and several utilities based on this library.'
-HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "zlib kmod"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
-           file://configure.patch"
-
-SRC_URI[md5sum] = "238d9969cc0de8b9105d972007d9d546"
-SRC_URI[sha256sum] = "1d62f8fa192f90e61c35a6fc15ff3cb9a7a792f782407acc42ef67817c5939f5"
-
-inherit multilib_header pkgconfig
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
-PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
-
-PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
-
-# see configure.patch
-do_configure () {
-	(
-	  cd lib && \
-	  # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
-	  # so we put it before ./configure
-	  ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
-	)
-}
-
-export PREFIX = "${prefix}"
-export SBINDIR = "${sbindir}"
-export SHAREDIR = "${datadir}"
-export MANDIR = "${mandir}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
-
-# The configure script breaks if the HOST variable is set
-HOST[unexport] = "1"
-
-do_install () {
-	oe_runmake DESTDIR=${D} install install-lib
-
-	install -d ${D}${bindir}
-	ln -s ../sbin/lspci ${D}${bindir}/lspci
-
-	oe_multilib_header pci/config.h
-}
-
-PACKAGES =+ "${PN}-ids libpci"
-FILES_${PN}-ids = "${datadir}/pci.ids*"
-FILES_libpci = "${libdir}/libpci.so.*"
-SUMMARY_${PN}-ids = "PCI utilities - device ID database"
-DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
-RDEPENDS_${PN} += "${PN}-ids"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb
new file mode 100644
index 0000000..b18b7da
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.6.bb
@@ -0,0 +1,58 @@
+SUMMARY = "PCI utilities"
+DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
+to PCI bus configuration space and several utilities based on this library.'
+HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS = "zlib kmod"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
+           file://configure.patch"
+
+SRC_URI[md5sum] = "8e52278399b7b35fcfc031bc05da80a8"
+SRC_URI[sha256sum] = "f346eeb90cce0910c05b877fe49eadc760fa084c0455fd313e39d4b2c2d4bb21"
+
+inherit multilib_header pkgconfig
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
+PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
+
+PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
+
+# see configure.patch
+do_configure () {
+	(
+	  cd lib && \
+	  # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
+	  # so we put it before ./configure
+	  ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
+	)
+}
+
+export PREFIX = "${prefix}"
+export SBINDIR = "${sbindir}"
+export SHAREDIR = "${datadir}"
+export MANDIR = "${mandir}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
+
+# The configure script breaks if the HOST variable is set
+HOST[unexport] = "1"
+
+do_install () {
+	oe_runmake DESTDIR=${D} install install-lib
+
+	install -d ${D}${bindir}
+	ln -s ../sbin/lspci ${D}${bindir}/lspci
+
+	oe_multilib_header pci/config.h
+}
+
+PACKAGES =+ "${PN}-ids libpci"
+FILES_${PN}-ids = "${datadir}/pci.ids*"
+FILES_libpci = "${libdir}/libpci.so.*"
+SUMMARY_${PN}-ids = "PCI utilities - device ID database"
+DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
+RDEPENDS_${PN} += "${PN}-ids"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch b/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
index f5a518f..4c5eba7 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
@@ -16,20 +16,6 @@
 ===================================================================
 --- pcmciautils-018.orig/Makefile
 +++ pcmciautils-018/Makefile
-@@ -249,6 +249,9 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
- yacc_config.o lex_config.o: %.o: %.c src/yacc_config.h
- 	$(CC) -c -MD -O -pipe $(CPPFLAGS) $<
- 
-+src/lex_config.o : src/lex_config.c src/yacc_config.h
-+	$(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-+
- debugtools: ccdv $(CBDUMP) $(CISDUMP)
- 
- $(CBDUMP): $(LIBC) debug/cbdump.o
-Index: pcmciautils-018/Makefile
-===================================================================
---- pcmciautils-018.orig/Makefile
-+++ pcmciautils-018/Makefile
 @@ -246,8 +246,8 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
  	$(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
  	$(QUIET) $(STRIPCMD) $@
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/10m50-update-device-tree.patch b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/10m50-update-device-tree.patch
deleted file mode 100644
index 841953c..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/10m50-update-device-tree.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Nios II for MAX10 10m50 board requires update to 
-its device tree to enable CPU driver during
-u-boot pre-relocation. This patch tag the CPU 
-with dm-pre-reloc flag.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Gan, Yau Wai <yau.wai.gan@intel.com>
-
----
- arch/nios2/dts/10m50_devboard.dts | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/nios2/dts/10m50_devboard.dts b/arch/nios2/dts/10m50_devboard.dts
-index 05eac30..461ae68 100644
---- a/arch/nios2/dts/10m50_devboard.dts
-+++ b/arch/nios2/dts/10m50_devboard.dts
-@@ -19,6 +19,7 @@
- 		#size-cells = <0>;
- 
- 		cpu: cpu@0 {
-+			u-boot,dm-pre-reloc;
- 			device_type = "cpu";
- 			compatible = "altr,nios2-1.1";
- 			reg = <0x00000000>;
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
index cea52b7..ecaa179 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
@@ -5,15 +5,15 @@
 
 Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
 
-diff --git a/configs/MPC8315ERDB_defconfig b/configs/MPC8315ERDB_defconfig
-index 4e2b705..b02ab1f 100644
---- a/configs/MPC8315ERDB_defconfig
-+++ b/configs/MPC8315ERDB_defconfig
-@@ -9,6 +9,7 @@ CONFIG_HUSH_PARSER=y
- CONFIG_CMD_I2C=y
+Index: git/configs/MPC8315ERDB_defconfig
+===================================================================
+--- git.orig/configs/MPC8315ERDB_defconfig
++++ git/configs/MPC8315ERDB_defconfig
+@@ -12,6 +12,7 @@ CONFIG_CMD_PCI=y
+ CONFIG_CMD_SATA=y
  CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
 +CONFIG_CMD_DHCP=y
  CONFIG_CMD_MII=y
  CONFIG_CMD_PING=y
- CONFIG_CMD_EXT2=y
+ CONFIG_CMD_DATE=y
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2017.09.inc b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2017.09.inc
deleted file mode 100644
index 02e5124..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2017.09.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
-PE = "1"
-
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "c98ac3487e413c71e5d36322ef3324b21c6f60f9"
-
-SRC_URI = "git://git.denx.de/u-boot.git \
-    file://MPC8315ERDB-enable-DHCP.patch \
-    file://10m50-update-device-tree.patch \
-"
-
-S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
new file mode 100644
index 0000000..d2073ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
@@ -0,0 +1,16 @@
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+PE = "1"
+
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "f3dd87e0b98999a78e500e8c6d2b063ebadf535a"
+
+SRC_URI = "git://git.denx.de/u-boot.git \
+    file://MPC8315ERDB-enable-DHCP.patch \
+"
+
+S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb
rename to import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.09.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.09.bb
deleted file mode 100644
index f1fc564..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.09.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-require u-boot-common_${PV}.inc
-
-SUMMARY = "U-Boot bootloader image creation tool"
-DEPENDS = "openssl"
-
-EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-
-do_compile () {
-	oe_runmake sandbox_defconfig
-
-	# Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
-	# generating it requires bin2header tool, which for target build
-	# is built with target tools and thus cannot be executed on host.
-	sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config
-
-	oe_runmake cross_tools NO_SDL=1
-}
-
-do_install () {
-	install -d ${D}${bindir}
-	install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
-	ln -sf uboot-mkimage ${D}${bindir}/mkimage
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb
new file mode 100644
index 0000000..1c008be
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.01.bb
@@ -0,0 +1,29 @@
+require u-boot-common_${PV}.inc
+
+SUMMARY = "U-Boot bootloader image creation tool"
+DEPENDS = "openssl"
+
+EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+
+do_compile () {
+	oe_runmake sandbox_defconfig
+
+	# Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
+	# generating it requires bin2header tool, which for target build
+	# is built with target tools and thus cannot be executed on host.
+	sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config
+
+	oe_runmake cross_tools NO_SDL=1
+}
+
+do_install () {
+	install -d ${D}${bindir}
+	install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
+	ln -sf uboot-mkimage ${D}${bindir}/mkimage
+}
+
+RDEPENDS_${PN} += "dtc"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2017.09.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2017.09.bb
rename to import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2018.01.bb
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
deleted file mode 100644
index 0efdc59..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Fix NULL pointer crash.
-
-Before use usbbuslist, we should check if it is valid.
-
-Upstream-Status: Pending
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- lsusb-t.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/lsusb-t.c b/lsusb-t.c
-index f604155..583a46a 100644
---- a/lsusb-t.c
-+++ b/lsusb-t.c
-@@ -643,6 +643,10 @@ static void sort_busses(void)
- 	/* need to reverse sort bus numbers */
- 	struct usbbusnode *t, *p, **pp;
- 	int swapped;
-+
-+	if (!usbbuslist)
-+		return;
-+
- 	do {
- 		p = usbbuslist;
- 		pp = &usbbuslist;
--- 
-1.7.4.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
deleted file mode 100644
index 6455567..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-This patch adds support for detecting iconv support using autotools
-uclibc does not have iconv implementation inside libc like glibc, therefore
-the existing checks were not sufficient, it worked for glibc but not for
-uclibc. The new patch portably detects the iconv support and adds the
-libiconv to linker cmdline
-
-This patch should be submitted upstream too
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: usbutils-008/configure.ac
-===================================================================
---- usbutils-008.orig/configure.ac
-+++ usbutils-008/configure.ac
-@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
- AC_SYS_LARGEFILE
- 
- AC_CHECK_HEADERS([byteswap.h])
--AC_CHECK_FUNCS([nl_langinfo iconv])
-+
-+AM_GNU_GETTEXT
-+AM_ICONV
- 
- PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
- 
-Index: usbutils-008/Makefile.am
-===================================================================
---- usbutils-008.orig/Makefile.am
-+++ usbutils-008/Makefile.am
-@@ -29,7 +29,8 @@ lsusb_CPPFLAGS = \
- 
- lsusb_LDADD = \
- 	$(LIBUSB_LIBS) \
--	$(UDEV_LIBS)
-+	$(UDEV_LIBS) \
-+	$(LIBICONV)
- 
- man_MANS = \
- 	lsusb.8	\
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
deleted file mode 100644
index d3c5bd5..0000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Host side USB console utilities"
-DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
-HOMEPAGE = "http://www.linux-usb.org"
-SECTION = "base"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-DEPENDS = "libusb zlib virtual/libiconv udev"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
-           file://usb-devices-avoid-dependency-on-bash.patch \
-           file://Fix-NULL-pointer-crash.patch \
-           file://iconv.patch \
-          "
-
-SRC_URI[md5sum] = "cb20148c2e784577e924a7b4c560c8fb"
-SRC_URI[sha256sum] = "6d5f16c2961df37e22e492c736a3e162a8fde24480f23a40d85f79af80d3fe95"
-
-inherit autotools gettext pkgconfig distro_features_check
-
-FILES_${PN}-dev += "${datadir}/pkgconfig"
-
-RRECOMMENDS_${PN} = "udev-hwdb"
-RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_009.bb b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_009.bb
new file mode 100644
index 0000000..3ffc0dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/usbutils/usbutils_009.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Host side USB console utilities"
+DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
+HOMEPAGE = "http://www.linux-usb.org"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "libusb zlib virtual/libiconv udev"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
+           file://usb-devices-avoid-dependency-on-bash.patch \
+          "
+
+SRC_URI[md5sum] = "b5dbc498b2eb5058f7a57fc6532d0aad"
+SRC_URI[sha256sum] = "e73543293a17c7803994eac97a49e58b377e08e6299ba11aad09794b91340e8b"
+
+inherit autotools pkgconfig distro_features_check update-alternatives
+
+ALTERNATIVE_${PN} = "lsusb"
+ALTERNATIVE_PRIORITY = "100"
+
+FILES_${PN}-dev += "${datadir}/pkgconfig"
+
+RRECOMMENDS_${PN} = "udev-hwdb"
+RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
+
+PACKAGE_BEFORE_PN =+ "${PN}-python"
+FILES_${PN}-python += "${bindir}/lsusb.py"
+RDEPENDS_${PN}-python = "python3-core"
+
+do_install_append() {
+    sed -i -E '1s,#!.+python,#!${bindir}/python3,' ${D}${bindir}/lsusb.py
+}
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
index e5f6fff..f97b80d 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -9,7 +9,7 @@
 RRECOMMENDS_${PN} = "kernel-module-uvesafb"
 PR = "r2"
 
-SRC_URI = "${DEBIAN_MIRROR}/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \
            file://Update-x86emu-from-X.org.patch \
            file://ar-from-env.patch \
            file://aarch64-host.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
deleted file mode 100644
index ac36461..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
+++ /dev/null
@@ -1,64 +0,0 @@
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
-                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
-                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
-                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-require avahi.inc
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-SRC_URI += "file://0001-configure.ac-install-GtkBuilder-interface-files-for-.patch"
-SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
-SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
-
-DEPENDS += "avahi"
-
-AVAHI_GTK = "gtk3"
-
-S = "${WORKDIR}/avahi-${PV}"
-
-PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc avahi-discover"
-
-FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
-FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
-FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
-
-FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
-
-FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
-                        ${datadir}/avahi/interfaces/avahi-discover.ui \
-                        ${bindir}/avahi-discover-standalone \
-                        "
-
-do_install_append () {
-	rm ${D}${sysconfdir} -rf
-	rm ${D}${base_libdir} -rf
-	rm ${D}${systemd_unitdir} -rf
-	# The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
-	# but not ${base_libdir} here. And the /lib may not exist
-	# whithout systemd.
-	[ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
-	rm ${D}${bindir}/avahi-b*
-	rm ${D}${bindir}/avahi-p*
-	rm ${D}${bindir}/avahi-r*
-	rm ${D}${bindir}/avahi-s*
-	rm ${D}${includedir}/avahi-c* -rf
-	rm ${D}${includedir}/avahi-g* -rf
-	rm ${D}${libdir}/libavahi-c*
-	rm ${D}${libdir}/libavahi-g*
-	rm ${D}${libdir}/pkgconfig/avahi-c*
-	rm ${D}${libdir}/pkgconfig/avahi-g*
-	rm ${D}${sbindir} -rf
-	rm ${D}${datadir}/avahi/a*
-	rm ${D}${datadir}/avahi/s*
-	rm ${D}${datadir}/locale/ -rf
-	rm ${D}${datadir}/dbus* -rf
-	rm ${D}${mandir}/man1/a*
-	rm ${D}${mandir}/man5 -rf
-	rm ${D}${mandir}/man8 -rf
-        rm ${D}${libdir}/girepository-1.0/ -rf
-        rm ${D}${datadir}/gir-1.0/ -rf
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
new file mode 100644
index 0000000..5648e38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
@@ -0,0 +1,62 @@
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
+                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
+                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
+                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
+
+require avahi.inc
+
+inherit distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6"
+SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804"
+
+DEPENDS += "avahi"
+
+AVAHI_GTK = "gtk3"
+
+S = "${WORKDIR}/avahi-${PV}"
+
+PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc avahi-discover"
+
+FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
+FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
+FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
+
+FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
+
+FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
+                        ${datadir}/avahi/interfaces/avahi-discover.ui \
+                        ${bindir}/avahi-discover-standalone \
+                        "
+
+do_install_append () {
+	rm ${D}${sysconfdir} -rf
+	rm ${D}${base_libdir} -rf
+	rm ${D}${systemd_unitdir} -rf
+	# The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
+	# but not ${base_libdir} here. And the /lib may not exist
+	# whithout systemd.
+	[ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
+	rm ${D}${bindir}/avahi-b*
+	rm ${D}${bindir}/avahi-p*
+	rm ${D}${bindir}/avahi-r*
+	rm ${D}${bindir}/avahi-s*
+	rm ${D}${includedir}/avahi-c* -rf
+	rm ${D}${includedir}/avahi-g* -rf
+	rm ${D}${libdir}/libavahi-c*
+	rm ${D}${libdir}/libavahi-g*
+	rm ${D}${libdir}/pkgconfig/avahi-c*
+	rm ${D}${libdir}/pkgconfig/avahi-g*
+	rm ${D}${sbindir} -rf
+	rm ${D}${datadir}/avahi/a*
+	rm ${D}${datadir}/locale/ -rf
+	rm ${D}${datadir}/dbus* -rf
+	rm ${D}${mandir}/man1/a*
+	rm ${D}${mandir}/man5 -rf
+	rm ${D}${mandir}/man8 -rf
+        rm ${D}${libdir}/girepository-1.0/ -rf
+        rm ${D}${datadir}/gir-1.0/ -rf
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
index 7814464..ec368de 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
@@ -23,21 +23,20 @@
           "
 UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
 
-# For gtk related PACKAGECONFIGs: gtk, gtk3 and pygtk
+# For gtk related PACKAGECONFIGs: gtk, gtk3
 AVAHI_GTK ?= ""
 
 PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
 PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
 PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
 PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
-PACKAGECONFIG[pygtk] = "--enable-pygtk,--disable-pygtk,"
 
 USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
-USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
+USERADD_PARAM_avahi-daemon = "--system --home /run/avahi-daemon \
                               --no-create-home --shell /bin/false \
                               --user-group avahi"
 
-USERADD_PARAM_avahi-autoipd = "--system --home /var/run/avahi-autoipd \
+USERADD_PARAM_avahi-autoipd = "--system --home /run/avahi-autoipd \
                               --no-create-home --shell /bin/false \
                               --user-group \
                               -c \"Avahi autoip daemon\" \
@@ -110,11 +109,6 @@
 RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
 RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
 
-RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev"
-RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev"
-
-RRECOMMENDS_avahi-dev[nodeprrecs] = "1"
-
 CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
 
 INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
@@ -125,12 +119,7 @@
 
 do_install() {
 	autotools_do_install
-
-	# don't install /var/run when populating rootfs. Do it through volatile
-	# /var/run of current version is empty, so just remove it.
-	# if /var/run become non-empty in the future, need to install it via volatile
-	rm -rf ${D}${localstatedir}/run
-	rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
+	rm -rf ${D}/run
 	rm -rf ${D}${datadir}/dbus-1/interfaces
 	test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
 	rm -rf ${D}${libdir}/avahi
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
deleted file mode 100644
index bfa6304..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require avahi.inc
-
-inherit systemd
-
-SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
-SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
-SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
-                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
-                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
-                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-SRC_URI += "file://avahi-fix-resource-unavaiable.patch"
-
-SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
-SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
-
-DEPENDS += "intltool-native"
-
-PACKAGES =+ "libavahi-gobject"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.7.bb
new file mode 100644
index 0000000..7c91f10
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.7.bb
@@ -0,0 +1,20 @@
+require avahi.inc
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
+SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
+SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
+                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
+                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
+                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
+
+SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6"
+SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804"
+
+DEPENDS += "intltool-native"
+
+PACKAGES =+ "libavahi-gobject"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
deleted file mode 100644
index 942607a..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 6ff255eff4fea6350b5e0462fee176fadc26fc1c Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sun, 12 Jun 2016 18:32:49 +0300
-Subject: [PATCH] configure.ac: install GtkBuilder interface files for GTK+3
- too
-
-Upstream-Status: Submitted [https://github.com/lathiat/avahi/pull/130]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 87a9a17..9860dcc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -965,7 +965,7 @@ AC_SUBST(avahi_socket)
- #
- # Avahi interfaces dir
- #
--if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
-+if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes"; then
- 	interfacesdir="${datadir}/${PACKAGE}/interfaces/"
- 	AC_SUBST(interfacesdir)
- fi
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
deleted file mode 100644
index 5a2fd75..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-
-Backport from:
-https://github.com/experimental-platform/platform-hostname-avahi/pull/9
-
-It sometimes fails to run avahi with error: "Could not receive return value
-from daemon process". It has same root cause with
-https://github.com/lxc/lxc/issues/25.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From 5150983102ad5ad43f0dae203cb332c168eb5a71 Mon Sep 17 00:00:00 2001
-From: Hinnerk Haardt <haardt@information-control.de>
-Date: Thu, 17 Dec 2015 11:52:19 +0100
-Subject: [PATCH] Fix `chroot.c: fork() failed: Resource temporarily
- unavailable` as per https://github.com/lxc/lxc/issues/25.
-
----
- avahi-daemon/avahi-daemon.conf | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/avahi-daemon/avahi-daemon.conf b/avahi-daemon/avahi-daemon.conf
-index 95166f8..3d5b7a6 100644
---- a/avahi-daemon/avahi-daemon.conf
-+++ b/avahi-daemon/avahi-daemon.conf
-@@ -65,4 +65,3 @@ rlimit-data=4194304
- rlimit-fsize=0
- rlimit-nofile=768
- rlimit-stack=4194304
--rlimit-nproc=3
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch
index 193889e..c856c3d 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/initscript.patch
@@ -1,10 +1,10 @@
 Upstream-Status: Pending
 
-diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
-index 30a2c2f..b5848a8 100755
---- a/initscript/debian/avahi-daemon.in
-+++ b/initscript/debian/avahi-daemon.in
-@@ -1,2 +1,14 @@
+Index: avahi-0.7/initscript/debian/avahi-daemon.in
+===================================================================
+--- avahi-0.7.orig/initscript/debian/avahi-daemon.in
++++ avahi-0.7/initscript/debian/avahi-daemon.in
+@@ -1,5 +1,17 @@
  #!/bin/sh
 -
 +### BEGIN INIT INFO
@@ -20,11 +20,14 @@
 +#                    automatically
 +### END INIT INFO
 +#
-diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in
-index ac34804..f95c340 100755
---- a/initscript/debian/avahi-dnsconfd.in
-+++ b/initscript/debian/avahi-dnsconfd.in
-@@ -1,1 +1,14 @@
+ # This file is part of avahi.
+ #
+ # avahi is free software; you can redistribute it and/or modify it
+Index: avahi-0.7/initscript/debian/avahi-dnsconfd.in
+===================================================================
+--- avahi-0.7.orig/initscript/debian/avahi-dnsconfd.in
++++ avahi-0.7/initscript/debian/avahi-dnsconfd.in
+@@ -1,4 +1,17 @@
  #!/bin/sh
 +### BEGIN INIT INFO
 +# Provides:          avahi-dnsconfd
@@ -39,3 +42,6 @@
 +#                    automatically
 +### END INIT INFO
 +#
+ 
+ # This file is part of avahi.
+ #
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
deleted file mode 100644
index 13724a8..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
+++ /dev/null
@@ -1,119 +0,0 @@
-SUMMARY = "ISC Internet Domain Name Server"
-HOMEPAGE = "http://www.isc.org/sw/bind/"
-SECTION = "console/network"
-
-LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=dba46507446198119bcde32a4feaab43"
-
-DEPENDS = "openssl libcap"
-
-SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
-           file://conf.patch \
-           file://make-etc-initd-bind-stop-work.patch \
-           file://dont-test-on-host.patch \
-           file://generate-rndc-key.sh \
-           file://named.service \
-           file://bind9 \
-           file://init.d-add-support-for-read-only-rootfs.patch \
-           file://bind-confgen-build-unix.o-once.patch \
-           file://0001-build-use-pkg-config-to-find-libxml2.patch \
-           file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
-           file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
-           file://0001-lib-dns-gen.c-fix-too-long-error.patch \
-           file://use-python3-and-fix-install-lib-path.patch \
-           "
-
-UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>9(\.\d+)+(-P\d+)*)/"
-
-SRC_URI[md5sum] = "d79cafbd9ac76239ee532dd89d05cc83"
-SRC_URI[sha256sum] = "8d7e96b5b0bbac7b900d4c4bbb82e0956b4e509433c5fa392bb72a929b96606a"
-
-ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
-EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
-                 --disable-devpoll --enable-epoll --with-gost=no \
-                 --with-gssapi=no --with-ecdsa=yes \
-                 --sysconfdir=${sysconfdir}/bind \
-                 --with-openssl=${STAGING_LIBDIR}/.. \
-               "
-
-inherit autotools update-rc.d systemd useradd pkgconfig python3-dir
-
-export PYTHON_SITEPACKAGES_DIR
-
-# PACKAGECONFIGs readline and libedit should NOT be set at same time
-PACKAGECONFIG ?= "readline"
-PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
-PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
-PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
-PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
-                       --user-group bind"
-
-INITSCRIPT_NAME = "bind"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "named.service"
-
-PARALLEL_MAKE = ""
-
-RDEPENDS_${PN} = "python3-core"
-RDEPENDS_${PN}-dev = ""
-
-PACKAGE_BEFORE_PN += "${PN}-utils"
-FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
-FILES_${PN}-dev += "${bindir}/isc-config.h"
-FILES_${PN} += "${sbindir}/generate-rndc-key.sh ${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_prepend() {
-	# clean host path in isc-config.sh before the hardlink created
-	# by "make install":
-	#   bind9-config -> isc-config.sh
-	sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
-}
-
-do_install_append() {
-	rm "${D}${bindir}/nslookup"
-	rm "${D}${mandir}/man1/nslookup.1"
-	rmdir "${D}${localstatedir}/run"
-	rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
-	install -d -o bind "${D}${localstatedir}/cache/bind"
-	install -d "${D}${sysconfdir}/bind"
-	install -d "${D}${sysconfdir}/init.d"
-	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
-	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
-	sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
-
-	# Install systemd related files
-	install -d ${D}${sbindir}
-	install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-	       -e 's,@SBINDIR@,${sbindir},g' \
-	       ${D}${systemd_unitdir}/system/named.service
-
-	install -d ${D}${sysconfdir}/default
-	install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
-
-	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-		install -d ${D}${sysconfdir}/tmpfiles.d
-		echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
-	fi
-
-    rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/isc/*.pyc
-}
-
-CONFFILES_${PN} = " \
-	${sysconfdir}/bind/named.conf \
-	${sysconfdir}/bind/named.conf.local \
-	${sysconfdir}/bind/named.conf.options \
-	${sysconfdir}/bind/db.0 \
-	${sysconfdir}/bind/db.127 \
-	${sysconfdir}/bind/db.empty \
-	${sysconfdir}/bind/db.local \
-	${sysconfdir}/bind/db.root \
-	"
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.6.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.6.bb
new file mode 100644
index 0000000..8b8835b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.6.bb
@@ -0,0 +1,123 @@
+SUMMARY = "ISC Internet Domain Name Server"
+HOMEPAGE = "http://www.isc.org/sw/bind/"
+SECTION = "console/network"
+
+LICENSE = "ISC & BSD"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=dba46507446198119bcde32a4feaab43"
+
+DEPENDS = "openssl libcap"
+
+SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
+           file://conf.patch \
+           file://make-etc-initd-bind-stop-work.patch \
+           file://dont-test-on-host.patch \
+           file://generate-rndc-key.sh \
+           file://named.service \
+           file://bind9 \
+           file://init.d-add-support-for-read-only-rootfs.patch \
+           file://bind-confgen-build-unix.o-once.patch \
+           file://0001-build-use-pkg-config-to-find-libxml2.patch \
+           file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
+           file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
+           file://0001-lib-dns-gen.c-fix-too-long-error.patch \
+           file://use-python3-and-fix-install-lib-path.patch \
+           "
+
+SRC_URI[md5sum] = "84e663284b17aee0df1ce6f248b137d7"
+SRC_URI[sha256sum] = "17bbcd2bd7b1d32f5ba4b30d5dbe8a39bce200079048073d1e0d050fdf47e69d"
+
+UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>9(\.\d+)+(-P\d+)*)/"
+
+
+ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
+EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
+                 --disable-devpoll --enable-epoll --with-gost=no \
+                 --with-gssapi=no --with-ecdsa=yes \
+                 --sysconfdir=${sysconfdir}/bind \
+                 --with-openssl=${STAGING_LIBDIR}/.. \
+               "
+
+inherit autotools update-rc.d systemd useradd pkgconfig python3-dir
+
+export PYTHON_SITEPACKAGES_DIR
+
+# PACKAGECONFIGs readline and libedit should NOT be set at same time
+PACKAGECONFIG ?= "readline"
+PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
+PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
+PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
+PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
+                       --user-group bind"
+
+INITSCRIPT_NAME = "bind"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "named.service"
+
+PARALLEL_MAKE = ""
+
+RDEPENDS_${PN} = "python3-core"
+RDEPENDS_${PN}-dev = ""
+
+PACKAGE_BEFORE_PN += "${PN}-utils"
+FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
+FILES_${PN}-dev += "${bindir}/isc-config.h"
+FILES_${PN} += "${sbindir}/generate-rndc-key.sh ${PYTHON_SITEPACKAGES_DIR}"
+
+PACKAGE_BEFORE_PN += "${PN}-libs"
+FILES_${PN}-libs = "${libdir}/*.so*"
+
+do_install_prepend() {
+	# clean host path in isc-config.sh before the hardlink created
+	# by "make install":
+	#   bind9-config -> isc-config.sh
+	sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
+}
+
+do_install_append() {
+	rm "${D}${bindir}/nslookup"
+	rm "${D}${mandir}/man1/nslookup.1"
+	rmdir "${D}${localstatedir}/run"
+	rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+	install -d -o bind "${D}${localstatedir}/cache/bind"
+	install -d "${D}${sysconfdir}/bind"
+	install -d "${D}${sysconfdir}/init.d"
+	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
+	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
+	sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
+
+	# Install systemd related files
+	install -d ${D}${sbindir}
+	install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+	       -e 's,@SBINDIR@,${sbindir},g' \
+	       ${D}${systemd_unitdir}/system/named.service
+
+	install -d ${D}${sysconfdir}/default
+	install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/tmpfiles.d
+		echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
+	fi
+
+    rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/isc/*.pyc
+}
+
+CONFFILES_${PN} = " \
+	${sysconfdir}/bind/named.conf \
+	${sysconfdir}/bind/named.conf.local \
+	${sysconfdir}/bind/named.conf.options \
+	${sysconfdir}/bind/db.0 \
+	${sysconfdir}/bind/db.127 \
+	${sysconfdir}/bind/db.empty \
+	${sysconfdir}/bind/db.local \
+	${sysconfdir}/bind/db.root \
+	"
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
index 1807aa7..ae2a833 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -6,7 +6,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
                     file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
-DEPENDS = "udev dbus-glib glib-2.0 libcheck"
+DEPENDS = "udev dbus-glib glib-2.0"
 PROVIDES += "bluez-hcidump"
 RPROVIDES_${PN} += "bluez-hcidump"
 
@@ -41,6 +41,7 @@
 PACKAGECONFIG[tools] = "--enable-tools,--disable-tools"
 PACKAGECONFIG[threads] = "--enable-threads,--disable-threads"
 PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated"
+PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c"
 
 SRC_URI = "\
     ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
@@ -49,14 +50,12 @@
     file://run-ptest \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
     file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
-    file://0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch \
-    file://cve-2017-1000250.patch \
 "
 S = "${WORKDIR}/bluez-${PV}"
 
 CVE_PRODUCT = "bluez"
 
-inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest
+inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest gobject-introspection-data
 
 EXTRA_OECONF = "\
   --enable-test \
@@ -130,14 +129,13 @@
 
 FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS'))}"
 
-RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject"
+RDEPENDS_${PN}-testtools += "python3 python3-dbus"
+RDEPENDS_${PN}-testtools += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
 
 SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'bluetooth.service', '', d)}"
 INITSCRIPT_PACKAGES = "${PN}"
 INITSCRIPT_NAME_${PN} = "bluetooth"
 
-EXCLUDE_FROM_WORLD = "1"
-
 do_compile_ptest() {
 	oe_runmake buildtests
 }
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
deleted file mode 100644
index 4679438..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 3b341fb421ef61db7782bf1314ec693828467de9 Mon Sep 17 00:00:00 2001
-From: Andy Duan <fugang.duan@nxp.com>
-Date: Wed, 23 Nov 2016 17:12:12 +0800
-Subject: [PATCH] hciattach: bcm43xx: fix the delay timer for firmware download
-
-From the log in .bcm43xx_load_firmware():
-        /* Wait 50ms to let the firmware placed in download mode */
-        nanosleep(&tm_mode, NULL);
-
-But timespec tm_mode is real is 50us. Correct the delayed timer count.
-
-Upstream-Status: Accepted [https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=76255f732d68aef2b90d36d9c7be51a9e1739ce7]
-
-Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
----
- tools/hciattach_bcm43xx.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
-index 81f38cb..ac1b3c1 100644
---- a/tools/hciattach_bcm43xx.c
-+++ b/tools/hciattach_bcm43xx.c
-@@ -228,8 +228,8 @@ static int bcm43xx_set_speed(int fd, struct termios *ti, uint32_t speed)
- static int bcm43xx_load_firmware(int fd, const char *fw)
- {
- 	unsigned char cmd[] = { HCI_COMMAND_PKT, 0x2e, 0xfc, 0x00 };
--	struct timespec tm_mode = { 0, 50000 };
--	struct timespec tm_ready = { 0, 2000000 };
-+	struct timespec tm_mode = { 0, 50000000 };
-+	struct timespec tm_ready = { 0, 200000000 };
- 	unsigned char resp[CC_MIN_SIZE];
- 	unsigned char tx_buf[1024];
- 	int len, fd_fw, n;
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/cve-2017-1000250.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/cve-2017-1000250.patch
deleted file mode 100644
index 9fac961..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/cve-2017-1000250.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-All versions of the SDP server in BlueZ 5.46 and earlier are vulnerable to an
-information disclosure vulnerability which allows remote attackers to obtain
-sensitive information from the bluetoothd process memory. This vulnerability
-lies in the processing of SDP search attribute requests.
-
-CVE: CVE-2017-1000250
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001
-From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-Date: Wed, 13 Sep 2017 10:01:40 +0300
-Subject: sdp: Fix Out-of-bounds heap read in service_search_attr_req function
-
-Check if there is enough data to continue otherwise return an error.
----
- src/sdpd-request.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/sdpd-request.c b/src/sdpd-request.c
-index 1eefdce..318d044 100644
---- a/src/sdpd-request.c
-+++ b/src/sdpd-request.c
-@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
- 	} else {
- 		/* continuation State exists -> get from cache */
- 		sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
--		if (pCache) {
-+		if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) {
- 			uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent);
- 			pResponse = pCache->data;
- 			memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent);
--- 
-cgit v1.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.46.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.46.bb
deleted file mode 100644
index e1f8587..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.46.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-require bluez5.inc
-
-REQUIRED_DISTRO_FEATURES = "bluez5"
-
-SRC_URI[md5sum] = "913f35d6fa4ca5772c53adb936bf1947"
-SRC_URI[sha256sum] = "ddab3d3837c1afb8ae228a94ba17709a4650bd4db24211b6771ab735c8908e28"
-
-# noinst programs in Makefile.tools that are conditional on READLINE
-# support
-NOINST_TOOLS_READLINE ?= " \
-    ${@bb.utils.contains('PACKAGECONFIG', 'deprecated', 'attrib/gatttool', '', d)} \
-    tools/obex-client-tool \
-    tools/obex-server-tool \
-    tools/bluetooth-player \
-    tools/obexctl \
-    tools/btmgmt \
-"
-
-# noinst programs in Makefile.tools that are conditional on TESTING
-# support
-NOINST_TOOLS_TESTING ?= " \
-    emulator/btvirt \
-    emulator/b1ee \
-    emulator/hfp \
-    peripheral/btsensor \
-    tools/3dsp \
-    tools/mgmt-tester \
-    tools/gap-tester \
-    tools/l2cap-tester \
-    tools/sco-tester \
-    tools/smp-tester \
-    tools/hci-tester \
-    tools/rfcomm-tester \
-    tools/bnep-tester \
-    tools/userchan-tester \
-"
-
-# noinst programs in Makefile.tools that are conditional on TOOLS
-# support
-NOINST_TOOLS_BT ?= " \
-    tools/bdaddr \
-    tools/avinfo \
-    tools/avtest \
-    tools/scotest \
-    tools/amptest \
-    tools/hwdb \
-    tools/hcieventmask \
-    tools/hcisecfilter \
-    tools/btinfo \
-    tools/btsnoop \
-    tools/btproxy \
-    tools/btiotest \
-    tools/bneptest \
-    tools/mcaptest \
-    tools/cltest \
-    tools/oobtest \
-    tools/advtest \
-    tools/seq2bseq \
-    tools/nokfw \
-    tools/create-image \
-    tools/eddystone \
-    tools/ibeacon \
-    tools/btgatt-client \
-    tools/btgatt-server \
-    tools/test-runner \
-    tools/check-selftest \
-    tools/gatt-service \
-    profiles/iap/iapd \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.48.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.48.bb
new file mode 100644
index 0000000..84a6cd2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.48.bb
@@ -0,0 +1,69 @@
+require bluez5.inc
+
+REQUIRED_DISTRO_FEATURES = "bluez5"
+
+SRC_URI[md5sum] = "c9c853f3c90564cabec75ab35106c355"
+SRC_URI[sha256sum] = "b9a8723072ef66bae7ec301c774902ebcb444c9c5b149b5a199e60a1ba970e90"
+
+# noinst programs in Makefile.tools that are conditional on READLINE
+# support
+NOINST_TOOLS_READLINE ?= " \
+    ${@bb.utils.contains('PACKAGECONFIG', 'deprecated', 'attrib/gatttool', '', d)} \
+    tools/obex-client-tool \
+    tools/obex-server-tool \
+    tools/bluetooth-player \
+    tools/obexctl \
+    tools/btmgmt \
+"
+
+# noinst programs in Makefile.tools that are conditional on TESTING
+# support
+NOINST_TOOLS_TESTING ?= " \
+    emulator/btvirt \
+    emulator/b1ee \
+    emulator/hfp \
+    peripheral/btsensor \
+    tools/3dsp \
+    tools/mgmt-tester \
+    tools/gap-tester \
+    tools/l2cap-tester \
+    tools/sco-tester \
+    tools/smp-tester \
+    tools/hci-tester \
+    tools/rfcomm-tester \
+    tools/bnep-tester \
+    tools/userchan-tester \
+"
+
+# noinst programs in Makefile.tools that are conditional on TOOLS
+# support
+NOINST_TOOLS_BT ?= " \
+    tools/bdaddr \
+    tools/avinfo \
+    tools/avtest \
+    tools/scotest \
+    tools/amptest \
+    tools/hwdb \
+    tools/hcieventmask \
+    tools/hcisecfilter \
+    tools/btinfo \
+    tools/btsnoop \
+    tools/btproxy \
+    tools/btiotest \
+    tools/bneptest \
+    tools/mcaptest \
+    tools/cltest \
+    tools/oobtest \
+    tools/advtest \
+    tools/seq2bseq \
+    tools/nokfw \
+    tools/create-image \
+    tools/eddystone \
+    tools/ibeacon \
+    tools/btgatt-client \
+    tools/btgatt-server \
+    tools/test-runner \
+    tools/check-selftest \
+    tools/gatt-service \
+    profiles/iap/iapd \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch
deleted file mode 100644
index cfafbd1..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 4058ce3186a99fd5f03350fc11a7fc8d38b6a381 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Mon, 8 May 2017 10:53:18 +0300
-Subject: [PATCH] firewall-nftables: fix build with libnftnl-1.0.7
-
-We need these updates to accommodate the changes caused by the following
-commit in libnftnl-1.0.7
-
-commit 907a9f8e5a93f5bcd449643eb3916a656d634758
-Author: Pablo Neira Ayuso <pablo@netfilter.org>
-Date:   Tue Dec 20 13:47:11 2016 +0100
-
-src: get rid of aliases and compat
-
-This machinery was introduced to avoid sudden compilation breakage of
-old nftables releases. With the upcoming release of 0.7 (and 0.6 which
-is now 6 months old) this is not required anymore.
-
-Moreover, users gain nothing from older releases since they are
-half-boiled and buggy.
-
-So let's get rid of aliases now. Bump LIBVERSION and update map file.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- src/firewall-nftables.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/src/firewall-nftables.c b/src/firewall-nftables.c
-index 583d1c4..83b137b 100644
---- a/src/firewall-nftables.c
-+++ b/src/firewall-nftables.c
-@@ -387,9 +387,9 @@ static int add_cmp(struct nftnl_rule *rule, uint32_t sreg, uint32_t op,
-         if (!expr)
-                 return -ENOMEM;
- 
--        nftnl_expr_set_u32(expr, NFT_EXPR_CMP_SREG, sreg);
--        nftnl_expr_set_u32(expr, NFT_EXPR_CMP_OP, op);
--        nftnl_expr_set(expr, NFT_EXPR_CMP_DATA, data, data_len);
-+        nftnl_expr_set_u32(expr, NFTNL_EXPR_CMP_SREG, sreg);
-+        nftnl_expr_set_u32(expr, NFTNL_EXPR_CMP_OP, op);
-+        nftnl_expr_set(expr, NFTNL_EXPR_CMP_DATA, data, data_len);
- 
-         nftnl_rule_add_expr(rule, expr);
- 
-@@ -575,8 +575,8 @@ static int build_rule_nat(const char *address, unsigned char prefixlen,
- 	expr = nftnl_expr_alloc("meta");
- 	if (!expr)
- 		goto err;
--	nftnl_expr_set_u32(expr, NFT_EXPR_META_KEY, NFT_META_OIFNAME);
--	nftnl_expr_set_u32(expr, NFT_EXPR_META_DREG, NFT_REG_1);
-+	nftnl_expr_set_u32(expr, NFTNL_EXPR_META_KEY, NFT_META_OIFNAME);
-+	nftnl_expr_set_u32(expr, NFTNL_EXPR_META_DREG, NFT_REG_1);
- 	nftnl_rule_add_expr(rule, expr);
- 	err = add_cmp(rule, NFT_REG_1, NFT_CMP_EQ, interface,
- 			strlen(interface) + 1);
-@@ -677,8 +677,8 @@ static int build_rule_snat(int index, const char *address,
- 	expr = nftnl_expr_alloc("meta");
- 	if (!expr)
- 		goto err;
--	nftnl_expr_set_u32(expr, NFT_EXPR_META_KEY, NFT_META_OIF);
--	nftnl_expr_set_u32(expr, NFT_EXPR_META_DREG, NFT_REG_1);
-+	nftnl_expr_set_u32(expr, NFTNL_EXPR_META_KEY, NFT_META_OIF);
-+	nftnl_expr_set_u32(expr, NFTNL_EXPR_META_DREG, NFT_REG_1);
- 	nftnl_rule_add_expr(rule, expr);
- 	err = add_cmp(rule, NFT_REG_1, NFT_CMP_EQ, &index, sizeof(index));
- 	if (err < 0)
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
new file mode 100644
index 0000000..f9080d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
@@ -0,0 +1,41 @@
+From 929fc9b7068100444e0ffcccd25841f78791e619 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Fri, 15 Sep 2017 06:40:08 -0400
+Subject: [PATCH] gweb: Fix a crash using wispr over TLS
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+When gnutls_channel is instantiated, the gnutls_channel->established
+has to be initiated as FALSE. Otherwise, check_handshake function
+won't work. A random initial value 1 of gnutls_channel->established
+will make check_handshake return G_IO_STATUS_NORMAL, when the channel
+is actually not ready to be used. The observed behaviours are,
+
+- wispr is getting random errors in wispr_portal_web_result
+- ConnMan crashes on exit after those random errors
+- when wispr is luckly working, ConnMan doesn't crash on exit
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=73e53f3bd9e7debae86341f1eee7b97862a56a5e]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ gweb/giognutls.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gweb/giognutls.c b/gweb/giognutls.c
+index 09dc9e7..c029a8b 100644
+--- a/gweb/giognutls.c
++++ b/gweb/giognutls.c
+@@ -421,7 +421,7 @@ GIOChannel *g_io_channel_gnutls_new(int fd)
+ 
+ 	DBG("");
+ 
+-	gnutls_channel = g_new(GIOGnuTLSChannel, 1);
++	gnutls_channel = g_new0(GIOGnuTLSChannel, 1);
+ 
+ 	channel = (GIOChannel *) gnutls_channel;
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-inet-Add-prefixlen-to-iproute_default_function.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-inet-Add-prefixlen-to-iproute_default_function.patch
new file mode 100644
index 0000000..dd7b356
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-inet-Add-prefixlen-to-iproute_default_function.patch
@@ -0,0 +1,63 @@
+From 508dc60a1f0758ebc586b6b086478a176d493086 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Thu, 5 Oct 2017 09:34:41 +0100
+Subject: [PATCH 1/4] inet: Add prefixlen to iproute_default_function
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+Add prefixlen parameter to this function in preparation for using
+it also in creating subnet route later, e.g.
+
+default via 192.168.100.1 dev eth0
+192.168.100.0/24 dev eth0
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=edda5b695de2ee79f02314abc9b46fdd46b388e1]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/inet.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/inet.c b/src/inet.c
+index b887aa0..ab8aec8 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -2796,7 +2796,7 @@ int __connman_inet_del_fwmark_rule(uint32_t table_id, int family, uint32_t fwmar
+ }
+ 
+ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+-			const char *gateway)
++			const char *gateway, unsigned char prefixlen)
+ {
+ 	struct __connman_inet_rtnl_handle rth;
+ 	unsigned char buf[sizeof(struct in6_addr)];
+@@ -2829,6 +2829,7 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ 	rth.req.u.r.rt.rtm_protocol = RTPROT_BOOT;
+ 	rth.req.u.r.rt.rtm_scope = RT_SCOPE_UNIVERSE;
+ 	rth.req.u.r.rt.rtm_type = RTN_UNICAST;
++	rth.req.u.r.rt.rtm_dst_len = prefixlen;
+ 
+ 	__connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), RTA_GATEWAY,
+ 								buf, len);
+@@ -2860,7 +2861,7 @@ int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex,
+ {
+ 	/* ip route add default via 1.2.3.4 dev wlan0 table 1234 */
+ 
+-	return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway);
++	return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway, 0);
+ }
+ 
+ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+@@ -2868,7 +2869,7 @@ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+ {
+ 	/* ip route del default via 1.2.3.4 dev wlan0 table 1234 */
+ 
+-	return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway);
++	return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway, 0);
+ }
+ 
+ int __connman_inet_get_interface_ll_address(int index, int family,
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-session-Keep-track-of-addr-in-fw_snat-session.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-session-Keep-track-of-addr-in-fw_snat-session.patch
new file mode 100644
index 0000000..f1b4d0a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-session-Keep-track-of-addr-in-fw_snat-session.patch
@@ -0,0 +1,112 @@
+From b5fd5945886fa1845db5c969424b63d894fe0376 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Fri, 25 Aug 2017 10:02:16 -0400
+Subject: [PATCH 1/2] session: Keep track of addr in fw_snat & session
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+When there is more than one session in fw_snat's list of sessions,
+fw_snat failed to be re-created when update-session-state is triggered
+with new IP address. This is because index alone is not sufficient to
+decide if fw_snat needs to be re-created. The solution here is to keep
+a track of IP addr and use it to avoid false lookup of fw_snat.
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=f9e27d4abfcab5c80a38e0850b5ddb26277f97c1]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/session.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/session.c b/src/session.c
+index 9e3c559..965ac06 100644
+--- a/src/session.c
++++ b/src/session.c
+@@ -65,6 +65,7 @@ struct connman_session {
+ 	struct firewall_context *fw;
+ 	uint32_t mark;
+ 	int index;
++	char *addr;
+ 	char *gateway;
+ 	bool policy_routing;
+ 	bool snat_enabled;
+@@ -79,6 +80,7 @@ struct fw_snat {
+ 	GSList *sessions;
+ 	int id;
+ 	int index;
++	char *addr;
+ 	struct firewall_context *fw;
+ };
+ 
+@@ -200,7 +202,7 @@ static char *service2bearer(enum connman_service_type type)
+ 	return "";
+ }
+ 
+-static struct fw_snat *fw_snat_lookup(int index)
++static struct fw_snat *fw_snat_lookup(int index, const char *addr)
+ {
+ 	struct fw_snat *fw_snat;
+ 	GSList *list;
+@@ -208,8 +210,11 @@ static struct fw_snat *fw_snat_lookup(int index)
+ 	for (list = fw_snat_list; list; list = list->next) {
+ 		fw_snat = list->data;
+ 
+-		if (fw_snat->index == index)
++		if (fw_snat->index == index) {
++			if (g_strcmp0(addr, fw_snat->addr) != 0)
++				continue;
+ 			return fw_snat;
++		}
+ 	}
+ 	return NULL;
+ }
+@@ -224,6 +229,7 @@ static int fw_snat_create(struct connman_session *session,
+ 
+ 	fw_snat->fw = __connman_firewall_create();
+ 	fw_snat->index = index;
++	fw_snat->addr = g_strdup(addr);
+ 
+ 	fw_snat->id = __connman_firewall_enable_snat(fw_snat->fw,
+ 						index, ifname, addr);
+@@ -238,6 +244,7 @@ static int fw_snat_create(struct connman_session *session,
+ 	return 0;
+ err:
+ 	__connman_firewall_destroy(fw_snat->fw);
++	g_free(fw_snat->addr);
+ 	g_free(fw_snat);
+ 	return err;
+ }
+@@ -393,7 +400,7 @@ static void del_nat_rules(struct connman_session *session)
+ 		return;
+ 
+ 	session->snat_enabled = false;
+-	fw_snat = fw_snat_lookup(session->index);
++	fw_snat = fw_snat_lookup(session->index, session->addr);
+ 
+ 	if (!fw_snat)
+ 		return;
+@@ -420,8 +427,11 @@ static void add_nat_rules(struct connman_session *session)
+ 	if (!addr)
+ 		return;
+ 
++	g_free(session->addr);
++	session->addr = g_strdup(addr);
++
+ 	session->snat_enabled = true;
+-	fw_snat = fw_snat_lookup(index);
++	fw_snat = fw_snat_lookup(index, session->addr);
+ 	if (fw_snat) {
+ 		fw_snat_ref(session, fw_snat);
+ 		return;
+@@ -502,6 +512,7 @@ static void free_session(struct connman_session *session)
+ 	g_free(session->info);
+ 	g_free(session->info_last);
+ 	g_free(session->gateway);
++	g_free(session->addr);
+ 
+ 	g_free(session);
+ }
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch
new file mode 100644
index 0000000..9c953e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch
@@ -0,0 +1,69 @@
+From 08cda4004491d3971a8b9df937426c43800d15b1 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Thu, 5 Oct 2017 09:37:06 +0100
+Subject: [PATCH 2/4] inet: Implement subnet route creation/deletion in
+ iproute_default_modify
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+- Calculate subnet address base on gateway address and prefixlen
+- Differentiate creation of routes to gateway and subnet
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=ff7dcf91f12a2a237feebc6e606d0a8e92975528]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/inet.c | 22 +++++++++++++++++++---
+ 1 file changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/src/inet.c b/src/inet.c
+index ab8aec8..0ddb030 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -2802,6 +2802,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ 	unsigned char buf[sizeof(struct in6_addr)];
+ 	int ret, len;
+ 	int family = connman_inet_check_ipaddress(gateway);
++	char *dst = NULL;
++
++	DBG("gateway %s/%u table %u", gateway, prefixlen, table_id);
+ 
+ 	switch (family) {
+ 	case AF_INET:
+@@ -2814,7 +2817,19 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ 		return -EINVAL;
+ 	}
+ 
+-	ret = inet_pton(family, gateway, buf);
++	if (prefixlen) {
++		struct in_addr ipv4_subnet_addr, ipv4_mask;
++
++		memset(&ipv4_subnet_addr, 0, sizeof(ipv4_subnet_addr));
++		ipv4_mask.s_addr = htonl((0xffffffff << (32 - prefixlen)) & 0xffffffff);
++		ipv4_subnet_addr.s_addr = inet_addr(gateway);
++		ipv4_subnet_addr.s_addr &= ipv4_mask.s_addr;
++
++		dst = g_strdup(inet_ntoa(ipv4_subnet_addr));
++	}
++
++	ret = inet_pton(family, dst ? dst : gateway, buf);
++	g_free(dst);
+ 	if (ret <= 0)
+ 		return -EINVAL;
+ 
+@@ -2831,8 +2846,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex,
+ 	rth.req.u.r.rt.rtm_type = RTN_UNICAST;
+ 	rth.req.u.r.rt.rtm_dst_len = prefixlen;
+ 
+-	__connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), RTA_GATEWAY,
+-								buf, len);
++	__connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req),
++		prefixlen > 0 ? RTA_DST : RTA_GATEWAY, buf, len);
++
+ 	if (table_id < 256) {
+ 		rth.req.u.r.rt.rtm_table = table_id;
+ 	} else {
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch
new file mode 100644
index 0000000..56ba5c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch
@@ -0,0 +1,68 @@
+From a9243f13d6e1aadd69bfcc27f75f69c38be51677 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Wed, 4 Oct 2017 17:30:17 +0100
+Subject: [PATCH 3/4] inet: Implement APIs for creating and deleting subnet
+ route
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=3a15b0b7fccd053aff91da2cc68585509d0c509b]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/connman.h |  4 ++++
+ src/inet.c    | 14 ++++++++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/src/connman.h b/src/connman.h
+index 21b7080..da4446a 100644
+--- a/src/connman.h
++++ b/src/connman.h
+@@ -240,7 +240,11 @@ int __connman_inet_rtnl_addattr32(struct nlmsghdr *n, size_t maxlen,
+ int __connman_inet_add_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
+ int __connman_inet_del_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
+ int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex, const char *gateway);
++int __connman_inet_add_subnet_to_table(uint32_t table_id, int ifindex,
++			const char *gateway, unsigned char prefixlen);
+ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex, const char *gateway);
++int __connman_inet_del_subnet_from_table(uint32_t table_id, int ifindex,
++			const char *gateway, unsigned char prefixlen);
+ int __connman_inet_get_address_netmask(int ifindex,
+ 		struct sockaddr_in *address, struct sockaddr_in *netmask);
+ 
+diff --git a/src/inet.c b/src/inet.c
+index 0ddb030..dcd1ab2 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -2880,6 +2880,13 @@ int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex,
+ 	return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway, 0);
+ }
+ 
++int __connman_inet_add_subnet_to_table(uint32_t table_id, int ifindex,
++						const char *gateway, unsigned char prefixlen)
++{
++	/* ip route add 1.2.3.4/24 dev eth0 table 1234 */
++	return iproute_default_modify(RTM_NEWROUTE, table_id, ifindex, gateway, prefixlen);
++}
++
+ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+ 						const char *gateway)
+ {
+@@ -2888,6 +2895,13 @@ int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex,
+ 	return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway, 0);
+ }
+ 
++int __connman_inet_del_subnet_from_table(uint32_t table_id, int ifindex,
++						const char *gateway, unsigned char prefixlen)
++{
++	/* ip route del 1.2.3.4/24 dev eth0 table 1234 */
++	return iproute_default_modify(RTM_DELROUTE, table_id, ifindex, gateway, prefixlen);
++}
++
+ int __connman_inet_get_interface_ll_address(int index, int family,
+ 								void *address)
+ {
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0004-session-Use-subnet-route-creation-and-deletion-APIs.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0004-session-Use-subnet-route-creation-and-deletion-APIs.patch
new file mode 100644
index 0000000..ca213eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0004-session-Use-subnet-route-creation-and-deletion-APIs.patch
@@ -0,0 +1,77 @@
+From deb9372db8396da4f7cd20555ce7c9a8b3ad96bd Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang@tycoint.com>
+Date: Fri, 6 Oct 2017 11:40:16 +0100
+Subject: [PATCH 4/4] session: Use subnet route creation and deletion APIs
+To: connman@lists.01.org
+Cc: wagi@monom.org
+
+As subnet route is address and session specific in this case, so add
+prefixlen into struct connman_session, and update it along with ipconfig.
+Then use it in subnet route related APIs.
+
+Signed-off-by: Jian Liang <jianliang@tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=285f25ef6cc9e4a43dab83523f3e2eab4365ac26]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+ src/session.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/src/session.c b/src/session.c
+index 965ac06..7b7a14b 100644
+--- a/src/session.c
++++ b/src/session.c
+@@ -67,6 +67,7 @@ struct connman_session {
+ 	int index;
+ 	char *addr;
+ 	char *gateway;
++	unsigned char prefixlen;
+ 	bool policy_routing;
+ 	bool snat_enabled;
+ };
+@@ -357,13 +358,17 @@ static void del_default_route(struct connman_session *session)
+ 	if (!session->gateway)
+ 		return;
+ 
+-	DBG("index %d routing table %d default gateway %s",
+-		session->index, session->mark, session->gateway);
++	DBG("index %d routing table %d default gateway %s/%u",
++		session->index, session->mark, session->gateway, session->prefixlen);
++
++		__connman_inet_del_subnet_from_table(session->mark,
++			session->index, session->gateway, session->prefixlen);
+ 
+ 	__connman_inet_del_default_from_table(session->mark,
+ 					session->index, session->gateway);
+ 	g_free(session->gateway);
+ 	session->gateway = NULL;
++	session->prefixlen = 0;
+ 	session->index = -1;
+ }
+ 
+@@ -383,13 +388,20 @@ static void add_default_route(struct connman_session *session)
+ 	if (!session->gateway)
+ 		session->gateway = g_strdup(inet_ntoa(addr));
+ 
+-	DBG("index %d routing table %d default gateway %s",
+-		session->index, session->mark, session->gateway);
++	session->prefixlen = __connman_ipconfig_get_prefixlen(ipconfig);
++
++	DBG("index %d routing table %d default gateway %s/%u",
++		session->index, session->mark, session->gateway, session->prefixlen);
+ 
+ 	err = __connman_inet_add_default_to_table(session->mark,
+ 					session->index, session->gateway);
+ 	if (err < 0)
+ 		DBG("session %p %s", session, strerror(-err));
++
++	err = __connman_inet_add_subnet_to_table(session->mark,
++					session->index, session->gateway, session->prefixlen);
++	if (err < 0)
++		DBG("session add subnet route %p %s", session, strerror(-err));
+ }
+ 
+ static void del_nat_rules(struct connman_session *session)
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/CVE-2017-12865.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/CVE-2017-12865.patch
deleted file mode 100644
index 45f78f1..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/CVE-2017-12865.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 5c281d182ecdd0a424b64f7698f32467f8f67b71 Mon Sep 17 00:00:00 2001
-From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
-Date: Wed, 9 Aug 2017 10:16:46 +0300
-Subject: dnsproxy: Fix crash on malformed DNS response
-
-If the response query string is malformed, we might access memory
-pass the end of "name" variable in parse_response().
-
-CVE: CVE-2017-12865
-Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/patch/?id=5c281d182ecdd0a424b64f7698f32467f8f67b71]
-
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- src/dnsproxy.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/src/dnsproxy.c b/src/dnsproxy.c
-index 38ac5bf..40b4f15 100644
---- a/src/dnsproxy.c
-+++ b/src/dnsproxy.c
-@@ -838,7 +838,7 @@ static struct cache_entry *cache_check(gpointer request, int *qtype, int proto)
- static int get_name(int counter,
- 		unsigned char *pkt, unsigned char *start, unsigned char *max,
- 		unsigned char *output, int output_max, int *output_len,
--		unsigned char **end, char *name, int *name_len)
-+		unsigned char **end, char *name, size_t max_name, int *name_len)
- {
- 	unsigned char *p;
- 
-@@ -859,7 +859,7 @@ static int get_name(int counter,
- 
- 			return get_name(counter + 1, pkt, pkt + offset, max,
- 					output, output_max, output_len, end,
--					name, name_len);
-+					name, max_name, name_len);
- 		} else {
- 			unsigned label_len = *p;
- 
-@@ -869,6 +869,9 @@ static int get_name(int counter,
- 			if (*output_len > output_max)
- 				return -ENOBUFS;
- 
-+			if ((*name_len + 1 + label_len + 1) > max_name)
-+				return -ENOBUFS;
-+
- 			/*
- 			 * We need the original name in order to check
- 			 * if this answer is the correct one.
-@@ -900,14 +903,14 @@ static int parse_rr(unsigned char *buf, unsigned char *start,
- 			unsigned char *response, unsigned int *response_size,
- 			uint16_t *type, uint16_t *class, int *ttl, int *rdlen,
- 			unsigned char **end,
--			char *name)
-+			char *name, size_t max_name)
- {
- 	struct domain_rr *rr;
- 	int err, offset;
- 	int name_len = 0, output_len = 0, max_rsp = *response_size;
- 
- 	err = get_name(0, buf, start, max, response, max_rsp,
--		&output_len, end, name, &name_len);
-+			&output_len, end, name, max_name, &name_len);
- 	if (err < 0)
- 		return err;
- 
-@@ -1033,7 +1036,8 @@ static int parse_response(unsigned char *buf, int buflen,
- 		memset(rsp, 0, sizeof(rsp));
- 
- 		ret = parse_rr(buf, ptr, buf + buflen, rsp, &rsp_len,
--			type, class, ttl, &rdlen, &next, name);
-+			type, class, ttl, &rdlen, &next, name,
-+			sizeof(name) - 1);
- 		if (ret != 0) {
- 			err = ret;
- 			goto out;
-@@ -1099,7 +1103,7 @@ static int parse_response(unsigned char *buf, int buflen,
- 			 */
- 			ret = get_name(0, buf, next - rdlen, buf + buflen,
- 					rsp, rsp_len, &output_len, &end,
--					name, &name_len);
-+					name, sizeof(name) - 1, &name_len);
- 			if (ret != 0) {
- 				/* just ignore the error at this point */
- 				ptr = next;
--- 
-cgit v1.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.34.bb b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.34.bb
deleted file mode 100644
index dc2c688..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.34.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require connman.inc
-
-SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
-            file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
-            file://0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch \
-            file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
-            file://connman \
-            file://no-version-scripts.patch \
-            file://includes.patch \
-            file://CVE-2017-12865.patch \
-            "
-SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
-                             "
-
-SRC_URI[md5sum] = "e200028702c831d5f535d20d61e608ef"
-SRC_URI[sha256sum] = "a9a0808c729c1f348fc36d8cecb52d19b72bc34cb411c502608cb0e0190fc71e"
-
-RRECOMMENDS_${PN} = "connman-conf"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.35.bb b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.35.bb
new file mode 100644
index 0000000..ff21181
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.35.bb
@@ -0,0 +1,22 @@
+require connman.inc
+
+SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+            file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
+            file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
+            file://connman \
+            file://no-version-scripts.patch \
+            file://includes.patch \
+            file://0001-session-Keep-track-of-addr-in-fw_snat-session.patch \
+            file://0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch \
+            file://0001-inet-Add-prefixlen-to-iproute_default_function.patch \
+            file://0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch \
+            file://0003-inet-Implement-APIs-for-creating-and-deleting-subnet.patch \
+            file://0004-session-Use-subnet-route-creation-and-deletion-APIs.patch \
+            "
+SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
+                             "
+
+SRC_URI[md5sum] = "bae37b45ee9b3db5ec8115188f8a7652"
+SRC_URI[sha256sum] = "66d7deb98371545c6e417239a9b3b3e3201c1529d08eedf40afbc859842cf2aa"
+
+RRECOMMENDS_${PN} = "connman-conf"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
index 6459dc0..101c33f 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0002-dhclient-dbus.patch
@@ -3,7 +3,7 @@
 Date: Tue, 15 Aug 2017 14:56:56 +0800
 Subject: [PATCH 02/11] dhclient dbus
 
-upstream-Status: Inappropriate [distribution]
+Upstream-Status: Inappropriate [distribution]
 
 Rebase to 4.3.6
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
new file mode 100644
index 0000000..2b2688c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
@@ -0,0 +1,74 @@
+From 8cfdedee369c26d2869b6ec4a64460b5f5a30934 Mon Sep 17 00:00:00 2001
+From: Thomas Markwalder <tmark@isc.org>
+Date: Thu, 7 Dec 2017 11:39:30 -0500
+Subject: [PATCH] [v4_3] Plugs a socket descriptor leak in OMAPI
+
+        Merges in rt46767.
+
+Upstream-Status: Backport
+[https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=commitdiff;h=5097bc0559f592683faac1f67bf350e1bddf6ed4]
+
+CVE: CVE-2017-3144
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ RELNOTES         | 7 +++++++
+ omapip/buffer.c  | 9 +++++++++
+ omapip/message.c | 2 +-
+ 3 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/RELNOTES b/RELNOTES
+index dd40aaf..3741b80 100644
+--- a/RELNOTES
++++ b/RELNOTES
+@@ -66,6 +66,13 @@ We welcome comments from DHCP users, about this or anything else we do.
+ Email Vicky Risk, Product Manager at vicky@isc.org or discuss on 
+ dhcp-users@lists.isc.org.
+ 
++- Plugged a socket descriptor leak in OMAPI, that can occur when there is
++  data pending to be written to an OMAPI connection, when the connection
++  is closed by the reader.  Thanks to Pavel Zhukov at RedHat for bringing
++  this issue to our attention and whose patch helped guide us in the right
++  direction.
++  [ISc-Bugs #46767]
++
+ 			Changes since 4.3.6b1
+ 
+ - None
+diff --git a/omapip/buffer.c b/omapip/buffer.c
+index f7fdc32..809034d 100644
+--- a/omapip/buffer.c
++++ b/omapip/buffer.c
+@@ -566,6 +566,15 @@ isc_result_t omapi_connection_writer (omapi_object_t *h)
+ 			omapi_buffer_dereference (&buffer, MDL);
+ 		}
+ 	}
++
++	/* If we had data left to write when we're told to disconnect,
++	* we need recall disconnect, now that we're done writing.
++	* See rt46767. */
++	if (c->out_bytes == 0 && c->state == omapi_connection_disconnecting) {
++		omapi_disconnect (h, 1);
++		return ISC_R_SHUTTINGDOWN;
++	}
++
+ 	return ISC_R_SUCCESS;
+ }
+ 
+diff --git a/omapip/message.c b/omapip/message.c
+index 59ccdc2..21bcfc3 100644
+--- a/omapip/message.c
++++ b/omapip/message.c
+@@ -339,7 +339,7 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
+ }
+ 
+ #ifdef DEBUG_PROTOCOL
+-static const char *omapi_message_op_name(int op) {
++const char *omapi_message_op_name(int op) {
+ 	switch (op) {
+ 	case OMAPI_OP_OPEN:    return "OMAPI_OP_OPEN";
+ 	case OMAPI_OP_REFRESH: return "OMAPI_OP_REFRESH";
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
index 6615ae2..cc13549 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
@@ -12,6 +12,7 @@
             file://0010-build-shared-libs.patch \
             file://0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch \
             file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
+            file://CVE-2017-3144.patch \
            "
 
 SRC_URI[md5sum] = "afa6e9b3eb7539ea048421a82c668adc"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
index a578eb3..4fbfec6 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -13,6 +13,8 @@
 
 inherit update-alternatives bash-completion pkgconfig
 
+CLEANBROKEN = "1"
+
 PACKAGECONFIG ??= "tipc"
 PACKAGECONFIG[tipc] = ",,libmnl,"
 
@@ -21,7 +23,7 @@
 do_configure_append () {
     sh configure ${STAGING_INCDIR}
     # Explicitly disable ATM support
-    sed -i -e '/TC_CONFIG_ATM/d' Config
+    sed -i -e '/TC_CONFIG_ATM/d' config.mk
 }
 
 do_install () {
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-include-stdint.h-explicitly-for-UINT16_MAX.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-include-stdint.h-explicitly-for-UINT16_MAX.patch
deleted file mode 100644
index eb0c0ab..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-include-stdint.h-explicitly-for-UINT16_MAX.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 3c885d87befc706bb923933b9819de6fe2de897e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 20 May 2017 14:03:19 -0700
-Subject: [PATCH] include stdint.h explicitly for UINT16_MAX)
-
-Fixes
-| tc_core.c:190:29: error: 'UINT16_MAX' undeclared (first use in this function); did you mean '__INT16_MAX__'?
-|    if ((sz >> s->size_log) > UINT16_MAX) {
-|                              ^~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- tc/tc_core.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tc/tc_core.c b/tc/tc_core.c
-index 7bbe0d7..821b741 100644
---- a/tc/tc_core.c
-+++ b/tc/tc_core.c
-@@ -12,6 +12,7 @@
- 
- #include <stdio.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <unistd.h>
- #include <syslog.h>
- #include <fcntl.h>
--- 
-2.13.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch
index a9f8db6..a9027c5 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-ip-Remove-unneed-header.patch
@@ -1,6 +1,6 @@
-From f58fc99c88a54135e55a6e0956ce8ae71078d1cc Mon Sep 17 00:00:00 2001
+From 02ed10fc5215c4a32e6740b0a0c2439659be6801 Mon Sep 17 00:00:00 2001
 From: Changhyeok Bae <changhyeok.bae@gmail.com>
-Date: Mon, 12 Jun 2017 04:29:07 +0000
+Date: Mon, 13 Nov 2017 15:59:35 +0000
 Subject: [PATCH] ip: Remove unneed header
 
 Fix redefinition of struct ethhdr with a suitably patched musl libc
@@ -8,23 +8,23 @@
 
 Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
 
-Upstream-Status: Submitted [netdev@vger.kernel.org]
+Upstream-Status: Pending [netdev@vger.kernel.org]
 ---
  ip/iplink_bridge.c | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
-index 818b43c..f065b22 100644
+index cccdec1..f065b22 100644
 --- a/ip/iplink_bridge.c
 +++ b/ip/iplink_bridge.c
-@@ -15,7 +15,6 @@
+@@ -13,7 +13,6 @@
+ #include <stdlib.h>
+ #include <string.h>
  #include <netinet/in.h>
+-#include <netinet/ether.h>
  #include <linux/if_link.h>
  #include <linux/if_bridge.h>
--#include <netinet/ether.h>
  #include <net/if.h>
- 
- #include "rt_names.h"
 -- 
 2.7.4
 
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
index 39c7d40..c3d3fea 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
@@ -5,14 +5,13 @@
 Upstream-Status: Pending
 
 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
 ---
- ip/ifcfg |   15 ++++++++-------
- ip/rtpr  |    2 +-
+ ip/ifcfg | 15 ++++++++-------
+ ip/rtpr  |  2 +-
  2 files changed, 9 insertions(+), 8 deletions(-)
 
 diff --git a/ip/ifcfg b/ip/ifcfg
-index 083d9df..60bcf1f 100644
+index 30a2dc4..8677b2e 100644
 --- a/ip/ifcfg
 +++ b/ip/ifcfg
 @@ -1,12 +1,13 @@
@@ -43,7 +42,7 @@
 -ip route add unreachable 255.255.255.255 >& /dev/null
 +ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1
 +ip route add unreachable 255.255.255.255 > /dev/null 2>&1
- if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
+ if [ "`ip link ls $dev | grep -c MULTICAST`" -ge 1 ]; then
 -  ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
 +  ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1
  fi
@@ -60,5 +59,5 @@
  exec tr "[\\\\]" "[
  ]"
 -- 
-1.7.9.5
+2.7.4
 
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
index 3d324c9..50c4bfb 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
@@ -15,13 +15,13 @@
 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 Signed-off-by: Maxin B. John <maxin.john@intel.com>
 ---
- include/linux/libc-compat.h | 4 +++-
+ include/uapi/linux/libc-compat.h | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/include/linux/libc-compat.h b/include/linux/libc-compat.h
+diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
 index f38571d..30f0b67 100644
---- a/include/linux/libc-compat.h
-+++ b/include/linux/libc-compat.h
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
 @@ -49,10 +49,12 @@
  #define _LIBC_COMPAT_H
  
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
index 866609c..8b75a2a 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch
@@ -9,19 +9,19 @@
 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
 Signed-off-by: Shane Wang <shane.wang@intel.com>
 
-Index: iproute2-3.7.0/configure
+Index: iproute2-4.14.1/configure
 ===================================================================
---- iproute2-3.7.0.orig/configure
-+++ iproute2-3.7.0/configure
+--- iproute2-4.14.1.orig/configure
++++ iproute2-4.14.1/configure
 @@ -2,6 +2,7 @@
- # This is not an autconf generated configure
+ # This is not an autoconf generated configure
  #
  INCLUDE=${1:-"$PWD/include"}
 +SYSROOT=$1
  
- # Make a temp directory in build tree.
- TMPDIR=$(mktemp -d config.XXXXXX)
-@@ -158,7 +159,7 @@ check_ipt_lib_dir()
+ # Output file which is input to Makefile
+ CONFIG=config.mk
+@@ -195,7 +196,7 @@ check_ipt_lib_dir()
  		return
  	fi
  
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.11.0.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.11.0.bb
deleted file mode 100644
index dbd0545..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.11.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require iproute2.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
-           file://configure-cross.patch \
-           file://0001-iproute2-de-bash-scripts.patch \
-           file://0001-libc-compat.h-add-musl-workaround.patch \
-           file://0001-include-stdint.h-explicitly-for-UINT16_MAX.patch \
-           file://0001-ip-Remove-unneed-header.patch \
-          "
-
-SRC_URI[md5sum] = "7a9498de88bcca95c305df6108ae197e"
-SRC_URI[sha256sum] = "72671028bda696d0cb8f48ec8e702581c3a501caeed33eec3a81d7041cbc8026"
-
-# CFLAGS are computed in Makefile and reference CCOPTS
-#
-EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.14.1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.14.1.bb
new file mode 100644
index 0000000..81e2e4a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.14.1.bb
@@ -0,0 +1,15 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+           file://configure-cross.patch \
+           file://0001-iproute2-de-bash-scripts.patch \
+           file://0001-libc-compat.h-add-musl-workaround.patch \
+           file://0001-ip-Remove-unneed-header.patch \
+          "
+
+SRC_URI[md5sum] = "1075423d7029e02a8f23ed4f42b7e372"
+SRC_URI[sha256sum] = "d43ac068afcc350a448f4581b6e292331ef7e4e7aa746e34981582d5fdb10067"
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch b/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
index e95fe35..b246de8 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
@@ -3,72 +3,84 @@
 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
 Upstream-Status: Pending
 
+Index: irda-utils-0.9.18/findchip/Makefile
+===================================================================
 --- irda-utils-0.9.18.orig/findchip/Makefile
 +++ irda-utils-0.9.18/findchip/Makefile
 @@ -65,5 +65,5 @@ install: findchip
-
- gfindchip: gfindchip.c
-	$(prn_cc)
+ 
+ gfindchip: gfindchip.c 
+ 	$(prn_cc)
 -	$(ECMD))$(CC) $(CFLAGS) `gtk-config --cflags`  $< -o $@ `gtk-config --libs`
 +	$(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `gtk-config --cflags`  $< -o $@ `gtk-config --libs`
-
+ 
+Index: irda-utils-0.9.18/irattach/Makefile
+===================================================================
 --- irda-utils-0.9.18.orig/irattach/Makefile
 +++ irda-utils-0.9.18/irattach/Makefile
 @@ -49,13 +49,13 @@ all: $(TARGETS)
-
+ 
  irattach: irattach.o util.o
-	$(prn_cc_o)
+ 	$(prn_cc_o)
 -	$(ECMD)$(CC) $(CFLAGS) irattach.o util.o -o $@
 +	$(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) irattach.o util.o -o $@
-
-
-
+ 
+ 
+ 
  dongle_attach: dongle_attach.o
-	$(prn_cc_o)
+ 	$(prn_cc_o)
 -	$(ECMD)$(CC) $(CFLAGS) dongle_attach.o -o $@
 +	$(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) dongle_attach.o -o $@
-
-
+ 
+ 
  install: $(TARGETS)
+Index: irda-utils-0.9.18/irdadump/Makefile
+===================================================================
 --- irda-utils-0.9.18.orig/irdadump/Makefile
 +++ irda-utils-0.9.18/irdadump/Makefile
 @@ -40,7 +40,7 @@ lib_irdadump.a: $(LIBIRDADUMP_OBJS)
-
+ 
  irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
-	$(prn_cc_o)
+ 	$(prn_cc_o)
 -	$(ECMD)$(CC) $(CFLAGS) `pkg-config --libs glib-2.0` -o  $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
 +	$(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs glib-2.0` -o  $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
-
-
+ 
+ 
  .c.o:
+Index: irda-utils-0.9.18/irdaping/Makefile
+===================================================================
 --- irda-utils-0.9.18.orig/irdaping/Makefile
 +++ irda-utils-0.9.18/irdaping/Makefile
 @@ -56,7 +56,7 @@ all: $(TARGETS)
-
+ 
  irdaping: $(OBJS)
-	$(prn_cc_o)
+ 	$(prn_cc_o)
 -	$(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
 +	$(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
-
-
+ 
+ 
  .c.o:
+Index: irda-utils-0.9.18/irnetd/Makefile
+===================================================================
 --- irda-utils-0.9.18.orig/irnetd/Makefile
 +++ irda-utils-0.9.18/irnetd/Makefile
 @@ -50,7 +50,7 @@ all: $(TARGETS)
-
+ 
  irnetd: $(OBJS)
-	$(prn_cc_o)
+ 	$(prn_cc_o)
 -	$(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
 +	$(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
-
-
+ 
+ 
  install: irnetd
+Index: irda-utils-0.9.18/psion/Makefile
+===================================================================
 --- irda-utils-0.9.18.orig/psion/Makefile
 +++ irda-utils-0.9.18/psion/Makefile
 @@ -25,4 +25,4 @@ install: $(PSION_TARGETS)
  CFLAGS += -g -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS)
- irpsion5:
-	$(prn_cc_o)
+ irpsion5: 
+ 	$(prn_cc_o)
 -	$(ECMD)$(CC) $(CFLAGS) $(PSION_SRC) -o $@
 \ No newline at end of file
 +	$(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(PSION_SRC) -o $@
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.14.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.14.bb
new file mode 100644
index 0000000..e1b17de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.14.bb
@@ -0,0 +1,33 @@
+SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
+DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
+wireless devices. It supports almost all new drivers that have been added \
+to the kernel recently. "
+HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
+SECTION = "base"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
+
+DEPENDS = "libnl"
+
+SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
+           file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
+           file://separate-objdir.patch \
+"
+
+SRC_URI[md5sum] = "2067516ca9940fdb8c091ee3250da374"
+SRC_URI[sha256sum] = "a0c3aad6ff52234d03a2522ba2eba570e36abb3e60dc29bf0b1ce88dd725d6d4"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "\
+    -f '${S}/Makefile' \
+    \
+    'PREFIX=${prefix}' \
+    'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' \
+"
+B = "${WORKDIR}/build"
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.9.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.9.bb
deleted file mode 100644
index 6daeb07..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.9.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
-DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
-wireless devices. It supports almost all new drivers that have been added \
-to the kernel recently. "
-HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
-SECTION = "base"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
-
-DEPENDS = "libnl"
-
-SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
-           file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
-           file://separate-objdir.patch \
-"
-
-SRC_URI[md5sum] = "06e96ab7a5c652f8eaed6f71533a9e0f"
-SRC_URI[sha256sum] = "12f921f3dbe0f33c309f5f2891cccf5325c94bd48dceeb102de183f5f048a9e2"
-
-inherit pkgconfig
-
-EXTRA_OEMAKE = "\
-    -f '${S}/Makefile' \
-    \
-    'PREFIX=${prefix}' \
-    'SBINDIR=${sbindir}' \
-    'MANDIR=${mandir}' \
-"
-B = "${WORKDIR}/build"
-
-do_install() {
-    oe_runmake 'DESTDIR=${D}' install
-}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch b/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
index 4660676..6e86407 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
@@ -16,18 +16,15 @@
  Makefile.am |    1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/Makefile.am b/Makefile.am
-index 3241311..a43eaa2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -164,6 +164,7 @@ MAINTAINERCLEANFILES = Makefile.in \
+Index: neard-0.16/Makefile.am
+===================================================================
+--- neard-0.16.orig/Makefile.am
++++ neard-0.16/Makefile.am
+@@ -244,6 +244,7 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(di
  src/plugin.$(OBJEXT): src/builtin.h
  
  src/builtin.h: src/genbuiltin $(builtin_sources)
 +	$(AM_V_at)$(MKDIR_P) src
  	$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
  
- $(src_neard_OBJECTS) \
--- 
-1.7.9.5
-
+ se/plugin.$(OBJEXT): se/builtin.h
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
index 14bd403..822939f 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
@@ -16,11 +16,11 @@
  utils/statd/start-statd | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/utils/statd/start-statd b/utils/statd/start-statd
-index 8211a90..3c2aa6f 100755
---- a/utils/statd/start-statd
-+++ b/utils/statd/start-statd
-@@ -16,7 +16,7 @@ fi
+Index: nfs-utils-2.1.1/utils/statd/start-statd
+===================================================================
+--- nfs-utils-2.1.1.orig/utils/statd/start-statd
++++ nfs-utils-2.1.1/utils/statd/start-statd
+@@ -28,7 +28,7 @@ fi
  # First try systemd if it's installed.
  if [ -d /run/systemd/system ]; then
      # Quit only if the call worked.
@@ -28,7 +28,4 @@
 +    systemctl start nfs-statd.service && exit
  fi
  
- # Fall back to launching it ourselves.
--- 
-2.1.4
-
+ cd /
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
index 7025fb5..26b558c 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure-Allow-to-explicitly-disable-nfsidmap.patch
@@ -12,11 +12,11 @@
  configure.ac | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)
 
-diff --git a/configure.ac b/configure.ac
-index bf433d6..28a8f62 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,6 +69,12 @@ AC_ARG_ENABLE(nfsv4,
+Index: nfs-utils-2.1.1/configure.ac
+===================================================================
+--- nfs-utils-2.1.1.orig/configure.ac
++++ nfs-utils-2.1.1/configure.ac
+@@ -92,6 +92,12 @@ AC_ARG_ENABLE(nfsv4,
  	AC_SUBST(enable_nfsv4)
  	AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])
  
@@ -27,9 +27,9 @@
 +        enable_nfsidmap=yes)
 +
  AC_ARG_ENABLE(nfsv41,
- 	[AC_HELP_STRING([--enable-nfsv41],
-                         [enable support for NFSv41 @<:@default=yes@:>@])],
-@@ -296,7 +302,7 @@ fi
+ 	[AC_HELP_STRING([--disable-nfsv41],
+                         [disable support for NFSv41 @<:@default=no@:>@])],
+@@ -339,7 +345,7 @@ fi
  
  dnl enable nfsidmap when its support by libnfsidmap
  AM_CONDITIONAL(CONFIG_NFSDCLTRACK, [test "$enable_nfsdcltrack" = "yes" ])
@@ -38,6 +38,3 @@
  
  
  if test "$knfsd_cv_glibc2" = no; then
--- 
-1.8.4.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
index d8f8181..89a8a57 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
@@ -13,9 +13,10 @@
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
 
-diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c
---- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig	2010-09-28 08:24:16.000000000 -0400
-+++ nfs-utils-1.2.3/utils/statd/sm-notify.c	2010-10-15 16:44:43.487119601 -0400
+Index: nfs-utils-2.1.1/utils/statd/sm-notify.c
+===================================================================
+--- nfs-utils-2.1.1.orig/utils/statd/sm-notify.c
++++ nfs-utils-2.1.1/utils/statd/sm-notify.c
 @@ -28,6 +28,9 @@
  #include <netdb.h>
  #include <errno.h>
@@ -24,9 +25,9 @@
 +#include <arpa/nameser.h>
 +#include <resolv.h>
  
+ #include "conffile.h"
  #include "sockaddr.h"
- #include "xlog.h"
-@@ -84,6 +87,7 @@ smn_lookup(const char *name)
+@@ -89,6 +92,7 @@ smn_lookup(const char *name)
  	};
  	int error;
  
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
index d917c4d..79453ad 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
@@ -56,7 +56,6 @@
 EXTRA_OECONF = "--with-statduser=rpcuser \
                 --enable-mountconfig \
                 --enable-libmount-mount \
-                --disable-nfsv41 \
                 --enable-uuid \
                 --disable-gss \
                 --disable-nfsdcltrack \
@@ -70,6 +69,8 @@
 PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
 PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+# libdevmapper is available in meta-oe
+PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper"
 
 PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats"
 
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
index 676a0c0..0472414 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
@@ -5,7 +5,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
                     file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee"
 
-inherit autotools pkgconfig update-rc.d systemd bluetooth
+inherit autotools pkgconfig update-rc.d systemd bluetooth gobject-introspection-data
 
 DEPENDS  = "dbus glib-2.0 udev mobile-broadband-provider-info"
 
@@ -26,10 +26,6 @@
 do_install_append() {
   install -d ${D}${sysconfdir}/init.d/
   install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
-
-  # Ofono still has one test tool that refers to Python 2 in the shebang
-  sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/ofono/test/set-ddr
-
 }
 
 PACKAGES =+ "${PN}-tests"
@@ -39,4 +35,5 @@
 
 FILES_${PN} += "${systemd_unitdir}"
 FILES_${PN}-tests = "${libdir}/${BPN}/test"
-RDEPENDS_${PN}-tests = "python3 python3-pygobject python3-dbus"
+RDEPENDS_${PN}-tests = "python3 python3-dbus"
+RDEPENDS_${PN}-tests += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch
new file mode 100644
index 0000000..7b84075
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch
@@ -0,0 +1,27 @@
+set-ddr should use Python3 like all the other tests.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 17b69cd1da4c5c5f732acb38ca1602446c567ee7 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 29 Jan 2018 11:31:25 +0000
+Subject: [PATCH] test/setddr: use Python 3
+
+All the other tests use Python 3, so this should to.
+---
+ test/set-ddr | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/set-ddr b/test/set-ddr
+index 5d061b95..33631f31 100755
+--- a/test/set-ddr
++++ b/test/set-ddr
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ 
+ import sys
+ import dbus
+-- 
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.20.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.20.bb
deleted file mode 100644
index 18f983e..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.20.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ofono.inc
-
-SRC_URI  = "\
-  ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
-  file://ofono \
-"
-SRC_URI[md5sum] = "fad0630fce6a9aecdb7db37bc1f1db7d"
-SRC_URI[sha256sum] = "5d7ba8f481a7715d013a79f8d6477eb89d8aaae399395d5d008a1317c34a31d5"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.22.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.22.bb
new file mode 100644
index 0000000..e57eaa7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.22.bb
@@ -0,0 +1,9 @@
+require ofono.inc
+
+SRC_URI  = "\
+  ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+  file://ofono \
+  file://use-python3.patch \
+"
+SRC_URI[md5sum] = "2a683ab8e98448ad8bc5dc9868d2893e"
+SRC_URI[sha256sum] = "8e34a6696c300c9841b55e8dff640bd3096e49f5dbe55bbebaa69a71676f687e"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch
deleted file mode 100644
index ce9e200..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From a7e359d4ba345aa2a13c07f1057184e9b4e598a2 Mon Sep 17 00:00:00 2001
-From: sweeaun <swee.aun.khor@intel.com>
-Date: Tue, 22 Aug 2017 11:19:48 -0700
-Subject: [PATCH] openssh: Fix syntax error on x32
-
-Upstream-Status: Backport
-This bug has been fixed in v_7.5 branch https://github.com/openssh/
-openssh-portable/tree/V_7_5 and master branch https://github.com/
-openssh/openssh-portable/tree/master.
-
-Fix compilation error during openssh x32 build due to syntax error.
-
-Signed-off-by: sweeaun <swee.aun.khor@intel.com>
----
- sandbox-seccomp-filter.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
-index 3a1aedc..a8d472a 100644
---- a/sandbox-seccomp-filter.c
-+++ b/sandbox-seccomp-filter.c
-@@ -235,7 +235,7 @@ static const struct sock_filter preauth_insns[] = {
- 	 * x86-64 syscall under some circumstances, e.g.
- 	 * https://bugs.debian.org/849923
- 	 */
--	SC_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT);
-+	SC_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT),
- #endif
- 
- 	/* Default deny */
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
index adc25c6..b8402a4 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
@@ -6,64 +6,42 @@
 Signed-off-by: Maxin B. John <maxin.john@enea.com>
 Upstream-Status: Pending
 
-Index: openssh-6.8p1/regress/cipher-speed.sh
+Index: openssh-7.6p1/regress/cipher-speed.sh
 ===================================================================
---- openssh-6.8p1.orig/regress/cipher-speed.sh
-+++ openssh-6.8p1/regress/cipher-speed.sh
+--- openssh-7.6p1.orig/regress/cipher-speed.sh
++++ openssh-7.6p1/regress/cipher-speed.sh
 @@ -17,7 +17,7 @@ for c in `${SSH} -Q cipher`; do n=0; for
  		printf "%-60s" "$c/$m:"
  		( ${SSH} -o 'compression no' \
- 			-F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
+ 			-F $OBJ/ssh_proxy -m $m -c $c somehost \
 -			exec sh -c \'"dd of=/dev/null obs=32k"\' \
 +			exec sh -c \'"dd of=/dev/null bs=32k"\' \
  		< ${DATA} ) 2>&1 | getbytes
  
  		if [ $? -ne 0 ]; then
-@@ -42,7 +42,7 @@ for c in $ciphers; do
- 		printf "%-60s" "$c:"
- 		( ${SSH} -o 'compression no' \
- 			-F $OBJ/ssh_proxy -1 -c $c somehost \
--			exec sh -c \'"dd of=/dev/null obs=32k"\' \
-+			exec sh -c \'"dd of=/dev/null bs=32k"\' \
- 		< ${DATA} ) 2>&1 | getbytes
- 		if [ $? -ne 0 ]; then
- 			fail "ssh -1 failed with cipher $c"
-Index: openssh-6.8p1/regress/transfer.sh
+Index: openssh-7.6p1/regress/transfer.sh
 ===================================================================
---- openssh-6.8p1.orig/regress/transfer.sh
-+++ openssh-6.8p1/regress/transfer.sh
-@@ -15,7 +15,7 @@ for p in ${SSH_PROTOCOLS}; do
- 	for s in 10 100 1k 32k 64k 128k 256k; do
- 		trace "proto $p dd-size ${s}"
- 		rm -f ${COPY}
--		dd if=$DATA obs=${s} 2> /dev/null | \
-+		dd if=$DATA bs=${s} 2> /dev/null | \
- 			${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
- 		if [ $? -ne 0 ]; then
- 			fail "ssh cat $DATA failed"
-Index: openssh-6.8p1/regress/yes-head.sh
-===================================================================
---- openssh-6.8p1.orig/regress/yes-head.sh
-+++ openssh-6.8p1/regress/yes-head.sh
-@@ -4,7 +4,7 @@
- tid="yes pipe head"
- 
- for p in ${SSH_PROTOCOLS}; do
--	lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
-+	lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)`
+--- openssh-7.6p1.orig/regress/transfer.sh
++++ openssh-7.6p1/regress/transfer.sh
+@@ -13,7 +13,7 @@ cmp ${DATA} ${COPY}		|| fail "corrupted
+ for s in 10 100 1k 32k 64k 128k 256k; do
+ 	trace "dd-size ${s}"
+ 	rm -f ${COPY}
+-	dd if=$DATA obs=${s} 2> /dev/null | \
++	dd if=$DATA bs=${s} 2> /dev/null | \
+ 		${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
  	if [ $? -ne 0 ]; then
- 		fail "yes|head test failed"
- 		lines = 0;
-Index: openssh-6.8p1/regress/key-options.sh
+ 		fail "ssh cat $DATA failed"
+Index: openssh-7.6p1/regress/key-options.sh
 ===================================================================
---- openssh-6.8p1.orig/regress/key-options.sh
-+++ openssh-6.8p1/regress/key-options.sh
-@@ -54,7 +54,7 @@ for p in ${SSH_PROTOCOLS}; do
+--- openssh-7.6p1.orig/regress/key-options.sh
++++ openssh-7.6p1/regress/key-options.sh
+@@ -47,7 +47,7 @@ for f in 127.0.0.1 '127.0.0.0\/8'; do
  	fi
  
  	sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
 -	from=`head -1 $authkeys | cut -f1 -d ' '`
 +	from=`head -n 1 $authkeys | cut -f1 -d ' '`
- 	verbose "key option proto $p $from"
- 	r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo true'`
+ 	verbose "key option $from"
+ 	r=`${SSH} -q -F $OBJ/ssh_proxy somehost 'echo true'`
  	if [ "$r" = "true" ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch
new file mode 100644
index 0000000..8a2d1a0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch
@@ -0,0 +1,39 @@
+From 265eaab8b39d8d8721224a48eefed5bf1696d353 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 18 Apr 2018 21:58:32 +0800
+Subject: [PATCH] disable ciphers not supported by OpenSSL DES
+
+While compiling openssl with option `no-des', it caused the openssh
+build failure
+...
+cipher.c:85:41: error: 'EVP_des_ede3_cbc' undeclared here (not in a function);
+...
+
+OpenSSL configured that way defines OPENSSL_NO_DES to disable des
+
+Suggested by dtucker@
+
+Upstream-Status: Submitted [openssh-unix-dev@mindrot.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cipher.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cipher.c b/cipher.c
+index c3cd5dc..86558e1 100644
+--- a/cipher.c
++++ b/cipher.c
+@@ -82,7 +82,9 @@ struct sshcipher {
+ 
+ static const struct sshcipher ciphers[] = {
+ #ifdef WITH_OPENSSL
++#ifndef OPENSSL_NO_DES
+ 	{ "3des-cbc",		8, 24, 0, 0, CFLAG_CBC, EVP_des_ede3_cbc },
++#endif
+ 	{ "aes128-cbc",		16, 16, 0, 0, CFLAG_CBC, EVP_aes_128_cbc },
+ 	{ "aes192-cbc",		16, 24, 0, 0, CFLAG_CBC, EVP_aes_192_cbc },
+ 	{ "aes256-cbc",		16, 32, 0, 0, CFLAG_CBC, EVP_aes_256_cbc },
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
deleted file mode 100644
index 1098b97..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 27740c918fe5d78441bcf69e7d2eefb23ddeca4c Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 19 Jan 2017 03:00:08 -0500
-Subject: [PATCH 1/3] Remove des in cipher.
-
-Upstream-Status: Pending
-
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- cipher.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/cipher.c b/cipher.c
-index 2def333..59f6792 100644
---- a/cipher.c
-+++ b/cipher.c
-@@ -53,8 +53,10 @@
- 
- #ifdef WITH_SSH1
- extern const EVP_CIPHER *evp_ssh1_bf(void);
-+#ifndef OPENSSL_NO_DES
- extern const EVP_CIPHER *evp_ssh1_3des(void);
- extern int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
-+#endif /* OPENSSL_NO_DES */
- #endif
- 
- struct sshcipher_ctx {
-@@ -88,15 +90,19 @@ struct sshcipher {
- 
- static const struct sshcipher ciphers[] = {
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- 	{ "des",	SSH_CIPHER_DES, 8, 8, 0, 0, 0, 1, EVP_des_cbc },
- 	{ "3des",	SSH_CIPHER_3DES, 8, 16, 0, 0, 0, 1, evp_ssh1_3des },
-+#endif /* OPENSSL_NO_DES */
- # ifndef OPENSSL_NO_BF
- 	{ "blowfish",	SSH_CIPHER_BLOWFISH, 8, 32, 0, 0, 0, 1, evp_ssh1_bf },
- # endif /* OPENSSL_NO_BF */
- #endif /* WITH_SSH1 */
- #ifdef WITH_OPENSSL
-+#ifndef OPENSSL_NO_DES
- 	{ "none",	SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
- 	{ "3des-cbc",	SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
-+#endif /* OPENSSL_NO_DES */
- # ifndef OPENSSL_NO_BF
- 	{ "blowfish-cbc",
- 			SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
-@@ -180,8 +186,10 @@ cipher_keylen(const struct sshcipher *c)
- u_int
- cipher_seclen(const struct sshcipher *c)
- {
-+#ifndef OPENSSL_NO_DES
- 	if (strcmp("3des-cbc", c->name) == 0)
- 		return 14;
-+#endif /* OPENSSL_NO_DES */
- 	return cipher_keylen(c);
- }
- 
-@@ -230,11 +238,13 @@ u_int
- cipher_mask_ssh1(int client)
- {
- 	u_int mask = 0;
-+#ifndef OPENSSL_NO_DES
- 	mask |= 1 << SSH_CIPHER_3DES;		/* Mandatory */
- 	mask |= 1 << SSH_CIPHER_BLOWFISH;
- 	if (client) {
- 		mask |= 1 << SSH_CIPHER_DES;
- 	}
-+#endif /*OPENSSL_NO_DES*/
- 	return mask;
- }
- 
-@@ -606,7 +616,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
- 	switch (c->number) {
- #ifdef WITH_OPENSSL
- 	case SSH_CIPHER_SSH2:
-+#ifndef OPENSSL_NO_DES
- 	case SSH_CIPHER_DES:
-+#endif /* OPENSSL_NO_DES */
- 	case SSH_CIPHER_BLOWFISH:
- 		evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
- 		if (evplen == 0)
-@@ -629,8 +641,10 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
- 		break;
- #endif
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- 	case SSH_CIPHER_3DES:
- 		return ssh1_3des_iv(cc->evp, 0, iv, 24);
-+#endif /* OPENSSL_NO_DES */
- #endif
- 	default:
- 		return SSH_ERR_INVALID_ARGUMENT;
-@@ -654,7 +668,9 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
- 	switch (c->number) {
- #ifdef WITH_OPENSSL
- 	case SSH_CIPHER_SSH2:
-+#ifndef OPENSSL_NO_DES
- 	case SSH_CIPHER_DES:
-+#endif /* OPENSSL_NO_DES */
- 	case SSH_CIPHER_BLOWFISH:
- 		evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
- 		if (evplen <= 0)
-@@ -675,8 +691,10 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
- 		break;
- #endif
- #ifdef WITH_SSH1
-+#ifndef OPENSSL_NO_DES
- 	case SSH_CIPHER_3DES:
- 		return ssh1_3des_iv(cc->evp, 1, (u_char *)iv, 24);
-+#endif /* OPENSSL_NO_DES */
- #endif
- 	default:
- 		return SSH_ERR_INVALID_ARGUMENT;
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
deleted file mode 100644
index 47dc73b..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From e816fc06e4f8070b09e677ead4d21768784e4c99 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 19 Jan 2017 03:21:40 -0500
-Subject: [PATCH 2/3] remove des in pkcs11.
-
-Upstream-Status: Pending
-
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- pkcs11.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/pkcs11.h b/pkcs11.h
-index b01d58f..98b36e6 100644
---- a/pkcs11.h
-+++ b/pkcs11.h
-@@ -342,9 +342,11 @@ typedef unsigned long ck_key_type_t;
- #define CKK_GENERIC_SECRET	(0x10)
- #define CKK_RC2			(0x11)
- #define CKK_RC4			(0x12)
-+#ifndef OPENSSL_NO_DES
- #define CKK_DES			(0x13)
- #define CKK_DES2		(0x14)
- #define CKK_DES3		(0x15)
-+#endif /* OPENSSL_NO_DES */
- #define CKK_CAST		(0x16)
- #define CKK_CAST3		(0x17)
- #define CKK_CAST128		(0x18)
-@@ -512,6 +514,7 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_RC2_CBC_PAD			(0x105)
- #define CKM_RC4_KEY_GEN			(0x110)
- #define CKM_RC4				(0x111)
-+#ifndef OPENSSL_NO_DES
- #define CKM_DES_KEY_GEN			(0x120)
- #define CKM_DES_ECB			(0x121)
- #define CKM_DES_CBC			(0x122)
-@@ -525,6 +528,7 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_DES3_MAC			(0x134)
- #define CKM_DES3_MAC_GENERAL		(0x135)
- #define CKM_DES3_CBC_PAD		(0x136)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_CDMF_KEY_GEN		(0x140)
- #define CKM_CDMF_ECB			(0x141)
- #define CKM_CDMF_CBC			(0x142)
-@@ -610,8 +614,10 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_MD5_KEY_DERIVATION		(0x390)
- #define CKM_MD2_KEY_DERIVATION		(0x391)
- #define CKM_SHA1_KEY_DERIVATION		(0x392)
-+#ifndef OPENSSL_NO_DES
- #define CKM_PBE_MD2_DES_CBC		(0x3a0)
- #define CKM_PBE_MD5_DES_CBC		(0x3a1)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_PBE_MD5_CAST_CBC		(0x3a2)
- #define CKM_PBE_MD5_CAST3_CBC		(0x3a3)
- #define CKM_PBE_MD5_CAST5_CBC		(0x3a4)
-@@ -620,8 +626,10 @@ typedef unsigned long ck_mechanism_type_t;
- #define CKM_PBE_SHA1_CAST128_CBC	(0x3a5)
- #define CKM_PBE_SHA1_RC4_128		(0x3a6)
- #define CKM_PBE_SHA1_RC4_40		(0x3a7)
-+#ifndef OPENSSL_NO_DES
- #define CKM_PBE_SHA1_DES3_EDE_CBC	(0x3a8)
- #define CKM_PBE_SHA1_DES2_EDE_CBC	(0x3a9)
-+#endif /* OPENSSL_NO_DES */
- #define CKM_PBE_SHA1_RC2_128_CBC	(0x3aa)
- #define CKM_PBE_SHA1_RC2_40_CBC		(0x3ab)
- #define CKM_PKCS5_PBKD2			(0x3b0)
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.5p1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.5p1.bb
deleted file mode 100644
index 86ca6ff..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.5p1.bb
+++ /dev/null
@@ -1,168 +0,0 @@
-SUMMARY = "A suite of security-related network utilities based on \
-the SSH protocol including the ssh client and sshd server"
-DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
-Ssh (Secure Shell) is a program for logging into a remote machine \
-and for executing commands on a remote machine."
-HOMEPAGE = "http://www.openssh.com/"
-SECTION = "console/network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507"
-
-# openssl 1.1 patches are proposed at https://github.com/openssh/openssh-portable/pull/48
-DEPENDS = "zlib openssl10"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
-           file://sshd_config \
-           file://ssh_config \
-           file://init \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
-           file://sshd.socket \
-           file://sshd@.service \
-           file://sshdgenkeys.service \
-           file://volatiles.99_sshd \
-           file://add-test-support-for-busybox.patch \
-           file://run-ptest \
-           file://openssh-7.1p1-conditional-compile-des-in-cipher.patch \
-           file://openssh-7.1p1-conditional-compile-des-in-pkcs11.patch \
-           file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
-           file://0001-openssh-Fix-syntax-error-on-x32.patch \
-           file://sshd_check_keys \
-           "
-
-PAM_SRC_URI = "file://sshd"
-
-SRC_URI[md5sum] = "652fdc7d8392f112bef11cacf7e69e23"
-SRC_URI[sha256sum] = "9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0"
-
-inherit useradd update-rc.d update-alternatives systemd
-
-USERADD_PACKAGES = "${PN}-sshd"
-USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
-INITSCRIPT_PACKAGES = "${PN}-sshd"
-INITSCRIPT_NAME_${PN}-sshd = "sshd"
-INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
-
-SYSTEMD_PACKAGES = "${PN}-sshd"
-SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
-
-inherit autotools-brokensep ptest
-
-# LFS support:
-CFLAGS += "-D__FILE_OFFSET_BITS=64"
-
-# login path is hardcoded in sshd
-EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
-                --without-zlib-version-check \
-                --with-privsep-path=/var/run/sshd \
-                --sysconfdir=${sysconfdir}/ssh \
-                --with-xauth=/usr/bin/xauth \
-                --disable-strip \
-                "
-
-# Since we do not depend on libbsd, we do not want configure to use it
-# just because it finds libutil.h.  But, specifying --disable-libutil
-# causes compile errors, so...
-CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
-
-# passwd path is hardcoded in sshd
-CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
-
-# We don't want to depend on libblockfile
-CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
-
-do_configure_prepend () {
-	export LD="${CC}"
-	install -m 0644 ${WORKDIR}/sshd_config ${B}/
-	install -m 0644 ${WORKDIR}/ssh_config ${B}/
-	if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
-		cp aclocal.m4 acinclude.m4
-	fi
-}
-
-do_compile_ptest() {
-        # skip regress/unittests/ binaries: this will silently skip
-        # unittests in run-ptests which is good because they are so slow.
-        oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
-}
-
-do_install_append () {
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
-		install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
-		sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
-	fi
-
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
-		sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
-	fi
-
-	install -d ${D}${sysconfdir}/init.d
-	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
-	rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
-	rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
-	install -d ${D}/${sysconfdir}/default/volatiles
-	install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
-	install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
-
-	# Create config files for read-only rootfs
-	install -d ${D}${sysconfdir}/ssh
-	install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
-	sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
-	echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
-	echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
-	echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
-	echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
-
-	install -d ${D}${systemd_unitdir}/system
-	install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
-	install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
-	install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-		-e 's,@SBINDIR@,${sbindir},g' \
-		-e 's,@BINDIR@,${bindir},g' \
-		-e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
-		${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
-
-	sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
-		${D}${sysconfdir}/init.d/sshd
-
-	install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys
-}
-
-do_install_ptest () {
-	sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
-	cp -r regress ${D}${PTEST_PATH}
-}
-
-ALLOW_EMPTY_${PN} = "1"
-
-PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
-FILES_${PN}-scp = "${bindir}/scp.${BPN}"
-FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
-FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
-FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
-FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys"
-FILES_${PN}-sftp = "${bindir}/sftp"
-FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
-FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
-FILES_${PN}-keygen = "${bindir}/ssh-keygen"
-
-RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
-RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
-RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
-
-RPROVIDES_${PN}-ssh = "ssh"
-RPROVIDES_${PN}-sshd = "sshd"
-
-RCONFLICTS_${PN} = "dropbear"
-RCONFLICTS_${PN}-sshd = "dropbear"
-RCONFLICTS_${PN}-keygen = "ssh-keygen"
-
-CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
-CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
-
-ALTERNATIVE_PRIORITY = "90"
-ALTERNATIVE_${PN}-scp = "scp"
-ALTERNATIVE_${PN}-ssh = "ssh"
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.6p1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.6p1.bb
new file mode 100644
index 0000000..e11e8d7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.6p1.bb
@@ -0,0 +1,167 @@
+SUMMARY = "A suite of security-related network utilities based on \
+the SSH protocol including the ssh client and sshd server"
+DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
+Ssh (Secure Shell) is a program for logging into a remote machine \
+and for executing commands on a remote machine."
+HOMEPAGE = "http://www.openssh.com/"
+SECTION = "console/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=429658c6612f3a9b1293782366ab29d8"
+
+# openssl 1.1 patches are proposed at https://github.com/openssh/openssh-portable/pull/48
+DEPENDS = "zlib openssl10"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
+           file://sshd_config \
+           file://ssh_config \
+           file://init \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+           file://sshd.socket \
+           file://sshd@.service \
+           file://sshdgenkeys.service \
+           file://volatiles.99_sshd \
+           file://run-ptest \
+           file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
+           file://sshd_check_keys \
+           file://add-test-support-for-busybox.patch \
+           file://disable-ciphers-not-supported-by-OpenSSL-DES.patch \
+           "
+
+PAM_SRC_URI = "file://sshd"
+
+SRC_URI[md5sum] = "06a88699018e5fef13d4655abfed1f63"
+SRC_URI[sha256sum] = "a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723"
+
+inherit useradd update-rc.d update-alternatives systemd
+
+USERADD_PACKAGES = "${PN}-sshd"
+USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
+INITSCRIPT_PACKAGES = "${PN}-sshd"
+INITSCRIPT_NAME_${PN}-sshd = "sshd"
+INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
+
+SYSTEMD_PACKAGES = "${PN}-sshd"
+SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
+
+inherit autotools-brokensep ptest
+
+# LFS support:
+CFLAGS += "-D__FILE_OFFSET_BITS=64"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+# login path is hardcoded in sshd
+EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
+                ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+                --without-zlib-version-check \
+                --with-privsep-path=/var/run/sshd \
+                --sysconfdir=${sysconfdir}/ssh \
+                --with-xauth=/usr/bin/xauth \
+                --disable-strip \
+                "
+
+# musl doesn't implement wtmp/utmp
+EXTRA_OECONF_append_libc-musl = " --disable-wtmp"
+
+# Since we do not depend on libbsd, we do not want configure to use it
+# just because it finds libutil.h.  But, specifying --disable-libutil
+# causes compile errors, so...
+CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
+
+# passwd path is hardcoded in sshd
+CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
+
+# We don't want to depend on libblockfile
+CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
+
+do_configure_prepend () {
+	export LD="${CC}"
+	install -m 0644 ${WORKDIR}/sshd_config ${B}/
+	install -m 0644 ${WORKDIR}/ssh_config ${B}/
+}
+
+do_compile_ptest() {
+        # skip regress/unittests/ binaries: this will silently skip
+        # unittests in run-ptests which is good because they are so slow.
+        oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
+}
+
+do_install_append () {
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+		install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
+		sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
+	fi
+
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
+		sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
+	fi
+
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
+	rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
+	rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
+	install -d ${D}/${sysconfdir}/default/volatiles
+	install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
+	install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
+
+	# Create config files for read-only rootfs
+	install -d ${D}${sysconfdir}/ssh
+	install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
+	sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
+	echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+	echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+	echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+	echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+
+	install -d ${D}${systemd_unitdir}/system
+	install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
+	install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
+	install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+		-e 's,@SBINDIR@,${sbindir},g' \
+		-e 's,@BINDIR@,${bindir},g' \
+		-e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
+		${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
+
+	sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \
+		${D}${sysconfdir}/init.d/sshd
+
+	install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys
+}
+
+do_install_ptest () {
+	sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
+	cp -r regress ${D}${PTEST_PATH}
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
+FILES_${PN}-scp = "${bindir}/scp.${BPN}"
+FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
+FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
+FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
+FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys"
+FILES_${PN}-sftp = "${bindir}/sftp"
+FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
+FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
+FILES_${PN}-keygen = "${bindir}/ssh-keygen"
+
+RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
+RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
+
+RPROVIDES_${PN}-ssh = "ssh"
+RPROVIDES_${PN}-sshd = "sshd"
+
+RCONFLICTS_${PN} = "dropbear"
+RCONFLICTS_${PN}-sshd = "dropbear"
+RCONFLICTS_${PN}-keygen = "ssh-keygen"
+
+CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
+CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_${PN}-scp = "scp"
+ALTERNATIVE_${PN}-ssh = "ssh"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/c_rehash-compat.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/c_rehash-compat.patch
deleted file mode 100644
index 68e54d5..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/c_rehash-compat.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001
-From: Ludwig Nussel <ludwig.nussel@suse.de>
-Date: Wed, 21 Apr 2010 15:52:10 +0200
-Subject: [PATCH] also create old hash for compatibility
-
-Upstream-Status: Backport [debian]
-
-diff --git a/tools/c_rehash.in b/tools/c_rehash.in
-index b086ff9..b777d79 100644
---- a/tools/c_rehash.in
-+++ b/tools/c_rehash.in
-@@ -8,8 +8,6 @@ my $prefix;
- 
- my $openssl = $ENV{OPENSSL} || "openssl";
- my $pwd;
--my $x509hash = "-subject_hash";
--my $crlhash = "-hash";
- my $verbose = 0;
- my $symlink_exists=eval {symlink("",""); 1};
- my $removelinks = 1;
-@@ -18,10 +16,7 @@ my $removelinks = 1;
- while ( $ARGV[0] =~ /^-/ ) {
-     my $flag = shift @ARGV;
-     last if ( $flag eq '--');
--    if ( $flag eq '-old') {
--	    $x509hash = "-subject_hash_old";
--	    $crlhash = "-hash_old";
--    } elsif ( $flag eq '-h') {
-+    if ( $flag eq '-h') {
- 	    help();
-     } elsif ( $flag eq '-n' ) {
- 	    $removelinks = 0;
-@@ -113,7 +108,9 @@ sub hash_dir {
- 			next;
- 		}
- 		link_hash_cert($fname) if($cert);
-+		link_hash_cert_old($fname) if($cert);
- 		link_hash_crl($fname) if($crl);
-+		link_hash_crl_old($fname) if($crl);
- 	}
- }
- 
-@@ -146,6 +143,7 @@ sub check_file {
- 
- sub link_hash_cert {
- 		my $fname = $_[0];
-+		my $x509hash = $_[1] || '-subject_hash';
- 		$fname =~ s/'/'\\''/g;
- 		my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`;
- 		chomp $hash;
-@@ -176,11 +174,21 @@ sub link_hash_cert {
- 		$hashlist{$hash} = $fprint;
- }
- 
-+sub link_hash_cert_old {
-+		link_hash_cert($_[0], '-subject_hash_old');
-+}
-+
-+sub link_hash_crl_old {
-+		link_hash_crl($_[0], '-hash_old');
-+}
-+
-+
- # Same as above except for a CRL. CRL links are of the form <hash>.r<n>
- 
- sub link_hash_crl {
- 		my $fname = $_[0];
-+		my $crlhash = $_[1] || "-hash";
- 		$fname =~ s/'/'\\''/g;
- 		my ($hash, $fprint) = `"$openssl" crl $crlhash -fingerprint -noout -in '$fname'`;
- 		chomp $hash;
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/debian-targets.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/debian-targets.patch
deleted file mode 100644
index 39d4328..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/debian-targets.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Upstream-Status: Backport [debian]
-
-Index: openssl-1.0.2/Configure
-===================================================================
---- openssl-1.0.2.orig/Configure
-+++ openssl-1.0.2/Configure
-@@ -107,6 +107,10 @@ my $gcc_devteam_warn = "-Wall -pedantic
- 
- my $clang_disabled_warnings = "-Wno-language-extension-token -Wno-extended-offsetof -Wno-padded -Wno-shorten-64-to-32 -Wno-format-nonliteral -Wno-missing-noreturn -Wno-unused-parameter -Wno-sign-conversion -Wno-unreachable-code -Wno-conversion -Wno-documentation -Wno-missing-variable-declarations -Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-variable-declarations -Wno-missing-field-initializers -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-conditional-uninitialized -Wno-switch-enum";
- 
-+# There are no separate CFLAGS/CPPFLAGS/LDFLAGS, set everything in CFLAGS
-+my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall";
-+$debian_cflags =~ s/\n/ /g;
-+
- my $strict_warnings = 0;
- 
- my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
-@@ -343,6 +347,55 @@ my %table=(
- "osf1-alpha-cc",  "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
- "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
- 
-+# Debian GNU/* (various architectures)
-+"debian-alpha","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-alpha-ev4","gcc:-DTERMIO ${debian_cflags} -mcpu=ev4::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-alpha-ev5","gcc:-DTERMIO ${debian_cflags} -mcpu=ev5::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-arm64","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-armel","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-armhf","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::",
-+"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ia64","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i586::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i686::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsel",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsn32",   "mips64-linux-gnuabin32-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mipsn32el",   "mips64el-linux-gnuabin32-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips64",   "mips64-linux-gnuabi64-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-mips64el",   "mips64el-linux-gnuabi64-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-i386",	"gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-m68k",	"gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-netbsd-sparc",	"gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-alpha","gcc:-DTERMIOS ${debian_cflags}::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-i386",  "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-openbsd-mips","gcc:-DL_ENDIAN ${debian_cflags}::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-or1k", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-powerpcspe","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-ppc64el","gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-s390","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 
-+"debian-s390x","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh3",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh4",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh3eb",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sh4eb",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v8 -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v9 -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags} -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-x32","gcc:-mx32 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",
-+
- ####
- #### Variety of LINUX:-)
- ####
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-1.0.2a-x32-asm.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-1.0.2a-x32-asm.patch
deleted file mode 100644
index 1e5bfa1..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-1.0.2a-x32-asm.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://rt.openssl.org/Ticket/Display.html?id=3759&user=guest&pass=guest
-
-From 6257d59b3a68d2feb9d64317a1c556dc3813ee61 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 21 Mar 2015 06:01:25 -0400
-Subject: [PATCH] crypto: use bigint in x86-64 perl
-
-Upstream-Status: Pending
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
-
-When building on x32 systems where the default type is 32bit, make sure
-we can transparently represent 64bit integers.  Otherwise we end up with
-build errors like:
-/usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s
-Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890.
-...
-ghash-x86_64.s: Assembler messages:
-ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression
-
-We don't enable this globally as there are some cases where we'd get
-32bit values interpreted as unsigned when we need them as signed.
-
-Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh>
-URL: https://bugs.gentoo.org/542618
----
- crypto/perlasm/x86_64-xlate.pl | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
-index aae8288..0bf9774 100755
---- a/crypto/perlasm/x86_64-xlate.pl
-+++ b/crypto/perlasm/x86_64-xlate.pl
-@@ -195,6 +195,10 @@ my %globals;
-     sub out {
-     	my $self = shift;
- 
-+	# When building on x32 ABIs, the expanded hex value might be too
-+	# big to fit into 32bits.  Enable transparent 64bit support here
-+	# so we can safely print it out.
-+	use bigint;
- 	if ($gas) {
- 	    # Solaris /usr/ccs/bin/as can't handle multiplications
- 	    # in $self->{value}
--- 
-2.3.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-Fix-build-with-clang-using-external-assembler.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-Fix-build-with-clang-using-external-assembler.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-Fix-build-with-clang-using-external-assembler.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-Fix-build-with-clang-using-external-assembler.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-openssl-force-soft-link-to-avoid-rare-race.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-openssl-force-soft-link-to-avoid-rare-race.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/0001-openssl-force-soft-link-to-avoid-rare-race.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/0001-openssl-force-soft-link-to-avoid-rare-race.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Makefiles-ptest.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Makefiles-ptest.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Makefiles-ptest.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Makefiles-ptest.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Use-SHA256-not-MD5-as-default-digest.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Use-SHA256-not-MD5-as-default-digest.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/Use-SHA256-not-MD5-as-default-digest.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/Use-SHA256-not-MD5-as-default-digest.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-musl-target.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-musl-target.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-musl-target.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-musl-target.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-targets.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-targets.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/configure-targets.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/configure-targets.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
new file mode 100644
index 0000000..3820e3e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
@@ -0,0 +1,71 @@
+From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001
+From: Ludwig Nussel <ludwig.nussel@suse.de>
+Date: Wed, 21 Apr 2010 15:52:10 +0200
+Subject: [PATCH] also create old hash for compatibility
+
+Upstream-Status: Backport [debian]
+
+Index: openssl-1.0.2n/tools/c_rehash.in
+===================================================================
+--- openssl-1.0.2n.orig/tools/c_rehash.in
++++ openssl-1.0.2n/tools/c_rehash.in
+@@ -8,8 +8,6 @@ my $prefix;
+ 
+ my $openssl = $ENV{OPENSSL} || "openssl";
+ my $pwd;
+-my $x509hash = "-subject_hash";
+-my $crlhash = "-hash";
+ my $verbose = 0;
+ my $symlink_exists=eval {symlink("",""); 1};
+ my $removelinks = 1;
+@@ -18,10 +16,7 @@ my $removelinks = 1;
+ while ( $ARGV[0] =~ /^-/ ) {
+     my $flag = shift @ARGV;
+     last if ( $flag eq '--');
+-    if ( $flag eq '-old') {
+-	    $x509hash = "-subject_hash_old";
+-	    $crlhash = "-hash_old";
+-    } elsif ( $flag eq '-h') {
++    if ( $flag eq '-h') {
+ 	    help();
+     } elsif ( $flag eq '-n' ) {
+ 	    $removelinks = 0;
+@@ -113,7 +108,9 @@ sub hash_dir {
+ 			next;
+ 		}
+ 		link_hash_cert($fname) if($cert);
++		link_hash_cert_old($fname) if($cert);
+ 		link_hash_crl($fname) if($crl);
++		link_hash_crl_old($fname) if($crl);
+ 	}
+ }
+ 
+@@ -146,6 +143,7 @@ sub check_file {
+ 
+ sub link_hash_cert {
+ 		my $fname = $_[0];
++		my $x509hash = $_[1] || '-subject_hash';
+ 		$fname =~ s/'/'\\''/g;
+ 		my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`;
+ 		chomp $hash;
+@@ -177,10 +175,20 @@ sub link_hash_cert {
+ 		$hashlist{$hash} = $fprint;
+ }
+ 
++sub link_hash_cert_old {
++		link_hash_cert($_[0], '-subject_hash_old');
++}
++
++sub link_hash_crl_old {
++		link_hash_crl($_[0], '-hash_old');
++}
++
++
+ # Same as above except for a CRL. CRL links are of the form <hash>.r<n>
+ 
+ sub link_hash_crl {
+ 		my $fname = $_[0];
++		my $crlhash = $_[1] || "-hash";
+ 		$fname =~ s/'/'\\''/g;
+ 		my ($hash, $fprint) = `"$openssl" crl $crlhash -fingerprint -noout -in '$fname'`;
+ 		chomp $hash;
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/ca.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/ca.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/ca.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/ca.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/debian-targets.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/debian-targets.patch
new file mode 100644
index 0000000..35d92be
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/debian-targets.patch
@@ -0,0 +1,73 @@
+Upstream-Status: Backport [debian]
+
+Index: openssl-1.0.2n/Configure
+===================================================================
+--- openssl-1.0.2n.orig/Configure
++++ openssl-1.0.2n/Configure
+@@ -133,6 +133,10 @@ my $clang_devteam_warn = "-Wno-unused-pa
+ # Warn that "make depend" should be run?
+ my $warn_make_depend = 0;
+ 
++# There are no separate CFLAGS/CPPFLAGS/LDFLAGS, set everything in CFLAGS
++my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall";
++$debian_cflags =~ s/\n/ /g;
++
+ my $strict_warnings = 0;
+ 
+ my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
+@@ -369,6 +373,55 @@ my %table=(
+ "osf1-alpha-cc",  "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
+ "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
+ 
++# Debian GNU/* (various architectures)
++"debian-alpha","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-alpha-ev4","gcc:-DTERMIO ${debian_cflags} -mcpu=ev4::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-alpha-ev5","gcc:-DTERMIO ${debian_cflags} -mcpu=ev5::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-arm64","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-armel","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-armhf","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::",
++"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-hppa","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ia64","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i586::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i686::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsel",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsn32",   "mips64-linux-gnuabin32-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsn32el",   "mips64el-linux-gnuabin32-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips64",   "mips64-linux-gnuabi64-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips64el",   "mips64el-linux-gnuabi64-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-i386",	"gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-m68k",	"gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-sparc",	"gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-alpha","gcc:-DTERMIOS ${debian_cflags}::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-i386",  "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-mips","gcc:-DL_ENDIAN ${debian_cflags}::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-or1k", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-powerpcspe","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ppc64el","gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-s390","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 
++"debian-s390x","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh3",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh4",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh3eb",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh4eb",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-m32r","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v8 -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v9 -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags} -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-x32","gcc:-mx32 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",
++
+ ####
+ #### Variety of LINUX:-)
+ ####
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-dir.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-dir.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-dir.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-dir.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-section.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-section.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/man-section.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/man-section.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-rpath.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-rpath.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-rpath.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-rpath.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-symbolic.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-symbolic.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/no-symbolic.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/no-symbolic.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/pic.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/pic.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian/pic.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian/pic.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_digicert_malaysia.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_digicert_malaysia.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_digicert_malaysia.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_digicert_malaysia.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_diginotar.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_diginotar.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/block_diginotar.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/block_diginotar.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/soname.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/soname.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/soname.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/soname.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/version-script.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/version-script.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/debian1.0.2/version-script.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/debian1.0.2/version-script.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/engines-install-in-libdir-ssl.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/engines-install-in-libdir-ssl.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/engines-install-in-libdir-ssl.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/engines-install-in-libdir-ssl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/find.pl b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/find.pl
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/find.pl
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/find.pl
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/oe-ldflags.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/oe-ldflags.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/oe-ldflags.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/oe-ldflags.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-c_rehash.sh b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-c_rehash.sh
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-c_rehash.sh
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-c_rehash.sh
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-fix-des.pod-error.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-fix-des.pod-error.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-fix-des.pod-error.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-fix-des.pod-error.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-util-perlpath.pl-cwd.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-util-perlpath.pl-cwd.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl-util-perlpath.pl-cwd.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl-util-perlpath.pl-cwd.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl_fix_for_x32.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/openssl_fix_for_x32.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/openssl_fix_for_x32.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/parallel.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/parallel.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/parallel.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/parallel.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest-deps.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest-deps.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest-deps.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest-deps.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest_makefile_deps.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest_makefile_deps.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/ptest_makefile_deps.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/ptest_makefile_deps.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-cflags.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-cflags.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-mkbuildinf.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/reproducible-mkbuildinf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/run-ptest b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/run-ptest
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/run-ptest
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/run-ptest
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/shared-libs.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/shared-libs.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2n/shared-libs.patch
rename to import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl-1.0.2o/shared-libs.patch
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch
deleted file mode 100644
index 736bb39..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Remove-test-that-requires-running-as-non-root.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3fdb1e2a16ea405c6731447a8994f222808ef7e6 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 7 Apr 2017 18:01:52 +0300
-Subject: [PATCH] Remove test that requires running as non-root
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- test/recipes/40-test_rehash.t | 17 +----------------
- 1 file changed, 1 insertion(+), 16 deletions(-)
-
-diff --git a/test/recipes/40-test_rehash.t b/test/recipes/40-test_rehash.t
-index f902c23..c7567c1 100644
---- a/test/recipes/40-test_rehash.t
-+++ b/test/recipes/40-test_rehash.t
-@@ -23,7 +23,7 @@ setup("test_rehash");
- plan skip_all => "test_rehash is not available on this platform"
-     unless run(app(["openssl", "rehash", "-help"]));
- 
--plan tests => 5;
-+plan tests => 3;
- 
- indir "rehash.$$" => sub {
-     prepare();
-@@ -42,21 +42,6 @@ indir "rehash.$$" => sub {
-        'Testing rehash operations on empty directory');
- }, create => 1, cleanup => 1;
- 
--indir "rehash.$$" => sub {
--    prepare();
--    chmod 0500, curdir();
--  SKIP: {
--      if (!ok(!open(FOO, ">unwritable.txt"),
--              "Testing that we aren't running as a privileged user, such as root")) {
--          close FOO;
--          skip "It's pointless to run the next test as root", 1;
--      }
--      isnt(run(app(["openssl", "rehash", curdir()])), 1,
--           'Testing rehash operations on readonly directory');
--    }
--    chmod 0700, curdir();       # make it writable again, so cleanup works
--}, create => 1, cleanup => 1;
--
- sub prepare {
-     my @pemsourcefiles = sort glob(srctop_file('test', "*.pem"));
-     my @destfiles = ();
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch
deleted file mode 100644
index bb0a168..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From bcc096a50811bf0f0c4fd34b2993fed7a7015972 Mon Sep 17 00:00:00 2001
-From: Andy Polyakov <appro@openssl.org>
-Date: Fri, 3 Nov 2017 23:30:01 +0100
-Subject: [PATCH] aes/asm/{aes-armv4|bsaes-armv7}.pl: make it work with
- binutils-2.29.
-
-It's not clear if it's a feature or bug, but binutils-2.29[.1]
-interprets 'adr' instruction with Thumb2 code reference differently,
-in a way that affects calculation of addresses of constants' tables.
-
-Upstream-Status: Backport
-
-Reviewed-by: Tim Hudson <tjh@openssl.org>
-Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
-Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
-(Merged from https://github.com/openssl/openssl/pull/4669)
-
-(cherry picked from commit b82acc3c1a7f304c9df31841753a0fa76b5b3cda)
----
- crypto/aes/asm/aes-armv4.pl   | 6 +++---
- crypto/aes/asm/bsaes-armv7.pl | 6 +++---
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl
-index 16d79aae53..c6474b8aad 100644
---- a/crypto/aes/asm/aes-armv4.pl
-+++ b/crypto/aes/asm/aes-armv4.pl
-@@ -200,7 +200,7 @@ AES_encrypt:
- #ifndef	__thumb2__
- 	sub	r3,pc,#8		@ AES_encrypt
- #else
--	adr	r3,AES_encrypt
-+	adr	r3,.
- #endif
- 	stmdb   sp!,{r1,r4-r12,lr}
- #ifdef	__APPLE__
-@@ -450,7 +450,7 @@ _armv4_AES_set_encrypt_key:
- #ifndef	__thumb2__
- 	sub	r3,pc,#8		@ AES_set_encrypt_key
- #else
--	adr	r3,AES_set_encrypt_key
-+	adr	r3,.
- #endif
- 	teq	r0,#0
- #ifdef	__thumb2__
-@@ -976,7 +976,7 @@ AES_decrypt:
- #ifndef	__thumb2__
- 	sub	r3,pc,#8		@ AES_decrypt
- #else
--	adr	r3,AES_decrypt
-+	adr	r3,.
- #endif
- 	stmdb   sp!,{r1,r4-r12,lr}
- #ifdef	__APPLE__
-diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl
-index 9f288660ef..a27bb4a179 100644
---- a/crypto/aes/asm/bsaes-armv7.pl
-+++ b/crypto/aes/asm/bsaes-armv7.pl
-@@ -744,7 +744,7 @@ $code.=<<___;
- .type	_bsaes_decrypt8,%function
- .align	4
- _bsaes_decrypt8:
--	adr	$const,_bsaes_decrypt8
-+	adr	$const,.
- 	vldmia	$key!, {@XMM[9]}		@ round 0 key
- #ifdef	__APPLE__
- 	adr	$const,.LM0ISR
-@@ -843,7 +843,7 @@ _bsaes_const:
- .type	_bsaes_encrypt8,%function
- .align	4
- _bsaes_encrypt8:
--	adr	$const,_bsaes_encrypt8
-+	adr	$const,.
- 	vldmia	$key!, {@XMM[9]}		@ round 0 key
- #ifdef	__APPLE__
- 	adr	$const,.LM0SR
-@@ -951,7 +951,7 @@ $code.=<<___;
- .type	_bsaes_key_convert,%function
- .align	4
- _bsaes_key_convert:
--	adr	$const,_bsaes_key_convert
-+	adr	$const,.
- 	vld1.8	{@XMM[7]},  [$inp]!		@ load round 0 key
- #ifdef	__APPLE__
- 	adr	$const,.LM0
--- 
-2.15.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc
index 9335b0b..645d64e 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl10.inc
@@ -25,7 +25,7 @@
 TERMIO ?= "-DTERMIO"
 # Avoid binaries being marked as requiring an executable stack since it 
 # doesn't(which causes and this causes issues with SELinux
-CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
+CFLAG = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
 	 ${TERMIO} ${CFLAGS} -Wall -Wa,--noexecstack"
 
 export DIRS = "crypto ssl apps"
@@ -135,6 +135,12 @@
 	linux-powerpc64)
 		target=linux-ppc64
 		;;
+	linux-riscv64)
+		target=linux-generic64
+		;;
+	linux-riscv32)
+		target=linux-generic32
+		;;
 	linux-supersparc)
 		target=linux-sparcv8
 		;;
@@ -151,7 +157,8 @@
         if [ "x$useprefix" = "x" ]; then
                 useprefix=/
         fi        
-	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target
+	libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
+	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=${libdirleaf} $target
 }
 
 do_compile_prepend_class-target () {
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb
deleted file mode 100644
index f07289d..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-require openssl10.inc
-
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-
-CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
-CFLAG_append_class-native = " -fPIC"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=057d9218c6180e1d9ee407572b2dd225"
-
-export DIRS = "crypto ssl apps engines"
-export OE_LDFLAGS="${LDFLAGS}"
-
-SRC_URI += "file://find.pl;subdir=openssl-${PV}/util/ \
-           file://run-ptest \
-           file://openssl-c_rehash.sh \
-           file://configure-targets.patch \
-           file://shared-libs.patch \
-           file://oe-ldflags.patch \
-           file://engines-install-in-libdir-ssl.patch \
-           file://debian1.0.2/block_diginotar.patch \
-           file://debian1.0.2/block_digicert_malaysia.patch \
-           file://debian/ca.patch \
-           file://debian/c_rehash-compat.patch \
-           file://debian/debian-targets.patch \
-           file://debian/man-dir.patch \
-           file://debian/man-section.patch \
-           file://debian/no-rpath.patch \
-           file://debian/no-symbolic.patch \
-           file://debian/pic.patch \
-           file://debian1.0.2/version-script.patch \
-           file://debian1.0.2/soname.patch \
-           file://openssl_fix_for_x32.patch \
-           file://openssl-fix-des.pod-error.patch \
-           file://Makefiles-ptest.patch \
-           file://ptest-deps.patch \
-           file://openssl-1.0.2a-x32-asm.patch \
-           file://ptest_makefile_deps.patch \
-           file://configure-musl-target.patch \
-           file://parallel.patch \
-           file://openssl-util-perlpath.pl-cwd.patch \
-           file://Use-SHA256-not-MD5-as-default-digest.patch \
-           file://0001-Fix-build-with-clang-using-external-assembler.patch \
-           file://0001-openssl-force-soft-link-to-avoid-rare-race.patch \
-           "
-
-SRC_URI_append_class-target = "\
-           file://reproducible-cflags.patch \
-           file://reproducible-mkbuildinf.patch \
-           "
-SRC_URI[md5sum] = "13bdc1b1d1ff39b6fd42a255e74676a4"
-SRC_URI[sha256sum] = "370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe"
-
-PACKAGES =+ "${PN}-engines"
-FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
-
-# The crypto_use_bigint patch means that perl's bignum module needs to be
-# installed, but some distributions (for example Fedora 23) don't ship it by
-# default.  As the resulting error is very misleading check for bignum before
-# building.
-do_configure_prepend() {
-	if ! perl -Mbigint -e true; then
-		bbfatal "The perl module 'bignum' was not found but this is required to build openssl.  Please install this module (often packaged as perl-bignum) and re-run bitbake."
-	fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
new file mode 100644
index 0000000..413ebf3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
@@ -0,0 +1,64 @@
+require openssl10.inc
+
+# For target side versions of openssl enable support for OCF Linux driver
+# if they are available.
+
+CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
+CFLAG_append_class-native = " -fPIC"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f475368924827d06d4b416111c8bdb77"
+
+export DIRS = "crypto ssl apps engines"
+export OE_LDFLAGS="${LDFLAGS}"
+
+SRC_URI += "file://find.pl;subdir=openssl-${PV}/util/ \
+           file://run-ptest \
+           file://openssl-c_rehash.sh \
+           file://configure-targets.patch \
+           file://shared-libs.patch \
+           file://oe-ldflags.patch \
+           file://engines-install-in-libdir-ssl.patch \
+           file://debian1.0.2/block_diginotar.patch \
+           file://debian1.0.2/block_digicert_malaysia.patch \
+           file://debian/ca.patch \
+           file://debian/c_rehash-compat.patch \
+           file://debian/debian-targets.patch \
+           file://debian/man-dir.patch \
+           file://debian/man-section.patch \
+           file://debian/no-rpath.patch \
+           file://debian/no-symbolic.patch \
+           file://debian/pic.patch \
+           file://debian1.0.2/version-script.patch \
+           file://debian1.0.2/soname.patch \
+           file://openssl_fix_for_x32.patch \
+           file://openssl-fix-des.pod-error.patch \
+           file://Makefiles-ptest.patch \
+           file://ptest-deps.patch \
+           file://ptest_makefile_deps.patch \
+           file://configure-musl-target.patch \
+           file://parallel.patch \
+           file://openssl-util-perlpath.pl-cwd.patch \
+           file://Use-SHA256-not-MD5-as-default-digest.patch \
+           file://0001-Fix-build-with-clang-using-external-assembler.patch \
+           file://0001-openssl-force-soft-link-to-avoid-rare-race.patch \
+           "
+
+SRC_URI_append_class-target = "\
+           file://reproducible-cflags.patch \
+           file://reproducible-mkbuildinf.patch \
+           "
+SRC_URI[md5sum] = "44279b8557c3247cbe324e2322ecd114"
+SRC_URI[sha256sum] = "ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d"
+
+PACKAGES =+ "${PN}-engines"
+FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
+
+# The crypto_use_bigint patch means that perl's bignum module needs to be
+# installed, but some distributions (for example Fedora 23) don't ship it by
+# default.  As the resulting error is very misleading check for bignum before
+# building.
+do_configure_prepend() {
+	if ! perl -Mbigint -e true; then
+		bbfatal "The perl module 'bignum' was not found but this is required to build openssl.  Please install this module (often packaged as perl-bignum) and re-run bitbake."
+	fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb
deleted file mode 100644
index 1649bff..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb
+++ /dev/null
@@ -1,156 +0,0 @@
-SUMMARY = "Secure Socket Layer"
-DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
-HOMEPAGE = "http://www.openssl.org/"
-BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
-SECTION = "libs/network"
-
-# "openssl | SSLeay" dual license
-LICENSE = "openssl"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cae6da10f4ffd9703214776d2aabce32"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "ba5f1b8b835b88cadbce9b35ed9531a6"
-SRC_URI[sha256sum] = "de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af"
-
-SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
-           file://run-ptest \
-           file://openssl-c_rehash.sh \
-           file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
-           file://0001-Remove-test-that-requires-running-as-non-root.patch \
-           file://0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch \
-          "
-
-S = "${WORKDIR}/openssl-${PV}"
-
-inherit lib_package multilib_header ptest
-
-do_configure () {
-	os=${HOST_OS}
-	case $os in
-	linux-uclibc |\
-	linux-uclibceabi |\
-	linux-gnueabi |\
-	linux-uclibcspe |\
-	linux-gnuspe |\
-	linux-musl*)
-		os=linux
-		;;
-		*)
-		;;
-	esac
-	target="$os-${HOST_ARCH}"
-	case $target in
-	linux-arm)
-		target=linux-armv4
-		;;
-	linux-armeb)
-		target=linux-armv4
-		;;
-	linux-aarch64*)
-		target=linux-aarch64
-		;;
-	linux-sh3)
-		target=linux-generic32
-		;;
-	linux-sh4)
-		target=linux-generic32
-		;;
-	linux-i486)
-		target=linux-elf
-		;;
-	linux-i586 | linux-viac3)
-		target=linux-elf
-		;;
-	linux-i686)
-		target=linux-elf
-		;;
-	linux-gnux32-x86_64)
-		target=linux-x32
-		;;
-	linux-gnu64-x86_64)
-		target=linux-x86_64
-		;;
-	linux-mips)
-                # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
-		target="linux-mips32 ${TARGET_CC_ARCH}"
-		;;
-	linux-mipsel)
-		target="linux-mips32 ${TARGET_CC_ARCH}"
-		;;
-        linux-gnun32-mips*)
-               target=linux-mips64
-                ;;
-        linux-*-mips64 | linux-mips64)
-               target=linux64-mips64
-                ;;
-        linux-*-mips64el | linux-mips64el)
-               target=linux64-mips64
-                ;;
-	linux-microblaze*|linux-nios2*)
-		target=linux-generic32
-		;;
-	linux-powerpc)
-		target=linux-ppc
-		;;
-	linux-powerpc64)
-		target=linux-ppc64
-		;;
-	linux-supersparc)
-		target=linux-sparcv9
-		;;
-	linux-sparc)
-		target=linux-sparcv9
-		;;
-	darwin-i386)
-		target=darwin-i386-cc
-		;;
-	esac
-        useprefix=${prefix}
-        if [ "x$useprefix" = "x" ]; then
-                useprefix=/
-        fi
-	perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=`basename ${libdir}` $target
-}
-
-#| engines/afalg/e_afalg.c: In function 'eventfd':
-#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function)
-#|      return syscall(__NR_eventfd, n);
-#|                     ^~~~~~~~~~~~
-EXTRA_OECONF_aarch64 += "no-afalgeng"
-
-#| ./libcrypto.so: undefined reference to `getcontext'
-#| ./libcrypto.so: undefined reference to `setcontext'
-#| ./libcrypto.so: undefined reference to `makecontext'
-EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
-
-do_install () {
-        oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
-        oe_multilib_header openssl/opensslconf.h
-}
-
-do_install_append_class-native () {
-        # Install a custom version of c_rehash that can handle sysroots properly.
-        # This version is used for example when installing ca-certificates during
-        # image creation.
-        install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
-        sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
-}
-
-do_install_ptest() {
-        cp -r * ${D}${PTEST_PATH}
-
-        # Putting .so files in ptest package will mess up the dependencies of the main openssl package
-        # so we rename them to .so.ptest and patch the test accordingly
-        mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest
-        mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest
-        sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t
-}
-
-RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
-
-FILES_${PN} =+ " ${libdir}/ssl-1.1/*"
-
-PACKAGES =+ "${PN}-engines"
-FILES_${PN}-engines = "${libdir}/engines-1.1"
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
new file mode 100644
index 0000000..94b75eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
@@ -0,0 +1,161 @@
+SUMMARY = "Secure Socket Layer"
+DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
+HOMEPAGE = "http://www.openssl.org/"
+BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
+SECTION = "libs/network"
+
+# "openssl | SSLeay" dual license
+LICENSE = "openssl"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "5271477e4d93f4ea032b665ef095ff24"
+SRC_URI[sha256sum] = "5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517"
+
+SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
+           file://run-ptest \
+           file://openssl-c_rehash.sh \
+           file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
+           "
+
+S = "${WORKDIR}/openssl-${PV}"
+
+inherit lib_package multilib_header ptest
+
+do_configure () {
+	os=${HOST_OS}
+	case $os in
+	linux-uclibc |\
+	linux-uclibceabi |\
+	linux-gnueabi |\
+	linux-uclibcspe |\
+	linux-gnuspe |\
+	linux-musl*)
+		os=linux
+		;;
+		*)
+		;;
+	esac
+	target="$os-${HOST_ARCH}"
+	case $target in
+	linux-arm)
+		target=linux-armv4
+		;;
+	linux-armeb)
+		target=linux-armv4
+		;;
+	linux-aarch64*)
+		target=linux-aarch64
+		;;
+	linux-sh3)
+		target=linux-generic32
+		;;
+	linux-sh4)
+		target=linux-generic32
+		;;
+	linux-i486)
+		target=linux-elf
+		;;
+	linux-i586 | linux-viac3)
+		target=linux-elf
+		;;
+	linux-i686)
+		target=linux-elf
+		;;
+	linux-gnux32-x86_64)
+		target=linux-x32
+		;;
+	linux-gnu64-x86_64)
+		target=linux-x86_64
+		;;
+	linux-mips)
+                # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
+		target="linux-mips32 ${TARGET_CC_ARCH}"
+		;;
+	linux-mipsel)
+		target="linux-mips32 ${TARGET_CC_ARCH}"
+		;;
+        linux-gnun32-mips*)
+               target=linux-mips64
+                ;;
+        linux-*-mips64 | linux-mips64)
+               target=linux64-mips64
+                ;;
+        linux-*-mips64el | linux-mips64el)
+               target=linux64-mips64
+                ;;
+	linux-microblaze*|linux-nios2*)
+		target=linux-generic32
+		;;
+	linux-powerpc)
+		target=linux-ppc
+		;;
+	linux-powerpc64)
+		target=linux-ppc64
+		;;
+	linux-riscv64)
+		target=linux-generic64
+		;;
+	linux-riscv32)
+		target=linux-generic32
+		;;
+	linux-supersparc)
+		target=linux-sparcv9
+		;;
+	linux-sparc)
+		target=linux-sparcv9
+		;;
+	darwin-i386)
+		target=darwin-i386-cc
+		;;
+	esac
+        useprefix=${prefix}
+        if [ "x$useprefix" = "x" ]; then
+                useprefix=/
+        fi
+	libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
+	perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
+}
+
+#| engines/afalg/e_afalg.c: In function 'eventfd':
+#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function)
+#|      return syscall(__NR_eventfd, n);
+#|                     ^~~~~~~~~~~~
+EXTRA_OECONF_aarch64 += "no-afalgeng"
+
+#| ./libcrypto.so: undefined reference to `getcontext'
+#| ./libcrypto.so: undefined reference to `setcontext'
+#| ./libcrypto.so: undefined reference to `makecontext'
+EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
+
+do_install () {
+        oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
+        oe_multilib_header openssl/opensslconf.h
+}
+
+do_install_append_class-native () {
+        # Install a custom version of c_rehash that can handle sysroots properly.
+        # This version is used for example when installing ca-certificates during
+        # image creation.
+        install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
+        sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
+}
+
+do_install_ptest() {
+        cp -r * ${D}${PTEST_PATH}
+
+        # Putting .so files in ptest package will mess up the dependencies of the main openssl package
+        # so we rename them to .so.ptest and patch the test accordingly
+        mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest
+        mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest
+        sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t
+}
+
+RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
+
+FILES_${PN} =+ " ${libdir}/ssl-1.1/*"
+
+PACKAGES =+ "${PN}-engines"
+FILES_${PN}-engines = "${libdir}/engines-1.1"
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
new file mode 100644
index 0000000..9362d12
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
@@ -0,0 +1,54 @@
+From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Mon, 9 Jan 2017 13:34:23 +0000
+Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
+
+This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
+included before <linux/in.h> otherwise the earlier, unaware of the latter,
+tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
+alone anymore, since it pulls the headers in the wrong order, so we better
+include <netinet/in.h> early.
+
+Upstream-Status: Backport
+[https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..c4aaa6e 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -47,6 +47,10 @@
+ #include <sys/socket.h>
+ #endif
+ 
++/* This has to be included before Linux 4.8's linux/in.h
++ * gets dragged in. */
++#include <netinet/in.h>
++
+ /* Ugly header files on some Linux boxes... */
+ #if defined(HAVE_LINUX_IF_H)
+ #include <linux/if.h>
+@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+ 
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+ 
+@@ -98,7 +100,6 @@ typedef unsigned long UINT32_t;
+ #endif
+ 
+ 
+-
+ /* Ethernet frame types according to RFC 2516 */
+ #define ETH_PPPOE_DISCOVERY 0x8863
+ #define ETH_PPPOE_SESSION   0x8864
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
index db4dbc2..7dd69d8 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch
@@ -4,10 +4,11 @@
 
 Upstream-Status: Inappropriate [debian/suse patches]
 
-diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
---- ppp-2.4.5-orig/pppd/ipcp.c	2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/ipcp.c	2010-06-30 16:40:00.478716855 +0800
-@@ -198,6 +198,16 @@
+Index: ppp-2.4.7/pppd/ipcp.c
+===================================================================
+--- ppp-2.4.7.orig/pppd/ipcp.c
++++ ppp-2.4.7/pppd/ipcp.c
+@@ -198,6 +198,16 @@ static option_t ipcp_option_list[] = {
        "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
        &ipcp_wantoptions[0].default_route },
  
@@ -24,7 +25,7 @@
      { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
        "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
      { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
-@@ -271,7 +281,7 @@
+@@ -271,7 +281,7 @@ struct protent ipcp_protent = {
      ip_active_pkt
  };
  
@@ -33,7 +34,7 @@
  static void ipcp_script __P((char *, int));	/* Run an up/down script */
  static void ipcp_script_done __P((void *));
  
-@@ -1742,7 +1752,12 @@
+@@ -1761,7 +1771,12 @@ ip_demand_conf(u)
      if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
  	return 0;
      if (wo->default_route)
@@ -46,7 +47,7 @@
  	    default_route_set[u] = 1;
      if (wo->proxy_arp)
  	if (sifproxyarp(u, wo->hisaddr))
-@@ -1830,7 +1845,8 @@
+@@ -1849,7 +1864,8 @@ ipcp_up(f)
       */
      if (demand) {
  	if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
@@ -56,7 +57,7 @@
  	    if (go->ouraddr != wo->ouraddr) {
  		warn("Local IP address changed to %I", go->ouraddr);
  		script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
-@@ -1855,7 +1871,12 @@
+@@ -1874,7 +1890,12 @@ ipcp_up(f)
  
  	    /* assign a default route through the interface if required */
  	    if (ipcp_wantoptions[f->unit].default_route) 
@@ -69,7 +70,7 @@
  		    default_route_set[f->unit] = 1;
  
  	    /* Make a proxy ARP entry if requested. */
-@@ -1905,7 +1926,12 @@
+@@ -1924,7 +1945,12 @@ ipcp_up(f)
  
  	/* assign a default route through the interface if required */
  	if (ipcp_wantoptions[f->unit].default_route) 
@@ -82,7 +83,7 @@
  		default_route_set[f->unit] = 1;
  
  	/* Make a proxy ARP entry if requested. */
-@@ -1983,7 +2009,7 @@
+@@ -2002,7 +2028,7 @@ ipcp_down(f)
  	sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
  	sifdown(f->unit);
  	ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
@@ -91,7 +92,7 @@
      }
  
      /* Execute the ip-down script */
-@@ -1999,12 +2025,21 @@
+@@ -2018,12 +2044,21 @@ ipcp_down(f)
   * proxy arp entries, etc.
   */
  static void
@@ -115,10 +116,11 @@
  	cifproxyarp(unit, hisaddr);
  	proxy_arp_set[unit] = 0;
      }
-diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
---- ppp-2.4.5-orig/pppd/ipcp.h	2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/ipcp.h	2010-06-30 16:40:49.586203129 +0800
-@@ -70,6 +70,7 @@
+Index: ppp-2.4.7/pppd/ipcp.h
+===================================================================
+--- ppp-2.4.7.orig/pppd/ipcp.h
++++ ppp-2.4.7/pppd/ipcp.h
+@@ -70,6 +70,7 @@ typedef struct ipcp_options {
      bool old_addrs;		/* Use old (IP-Addresses) option? */
      bool req_addr;		/* Ask peer to send IP address? */
      bool default_route;		/* Assign default route through interface? */
@@ -126,10 +128,11 @@
      bool proxy_arp;		/* Make proxy ARP entry for peer? */
      bool neg_vj;		/* Van Jacobson Compression? */
      bool old_vj;		/* use old (short) form of VJ option? */
-diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
---- ppp-2.4.5-orig/pppd/pppd.8	2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/pppd.8	2010-06-30 16:42:47.102413859 +0800
-@@ -121,6 +121,13 @@
+Index: ppp-2.4.7/pppd/pppd.8
+===================================================================
+--- ppp-2.4.7.orig/pppd/pppd.8
++++ ppp-2.4.7/pppd/pppd.8
+@@ -121,6 +121,13 @@ the gateway, when IPCP negotiation is su
  This entry is removed when the PPP connection is broken.  This option
  is privileged if the \fInodefaultroute\fR option has been specified.
  .TP
@@ -143,7 +146,7 @@
  .B disconnect \fIscript
  Execute the command specified by \fIscript\fR, by passing it to a
  shell, after
-@@ -717,7 +724,12 @@
+@@ -734,7 +741,12 @@ disable both forms of hardware flow cont
  .TP
  .B nodefaultroute
  Disable the \fIdefaultroute\fR option.  The system administrator who
@@ -157,10 +160,11 @@
  can do so by placing this option in the /etc/ppp/options file.
  .TP
  .B nodeflate
-diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
---- ppp-2.4.5-orig/pppd/pppd.h	2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/pppd.h	2010-06-30 16:43:36.514148327 +0800
-@@ -643,7 +643,11 @@
+Index: ppp-2.4.7/pppd/pppd.h
+===================================================================
+--- ppp-2.4.7.orig/pppd/pppd.h
++++ ppp-2.4.7/pppd/pppd.h
+@@ -665,7 +665,11 @@ int  sif6addr __P((int, eui64_t, eui64_t
  int  cif6addr __P((int, eui64_t, eui64_t));
  				/* Remove an IPv6 address from i/f */
  #endif
@@ -172,19 +176,20 @@
  				/* Create default route through i/f */
  int  cifdefaultroute __P((int, u_int32_t, u_int32_t));
  				/* Delete default route through i/f */
-diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
---- ppp-2.4.5-orig/pppd/sys-linux.c	2010-06-30 15:51:12.050166398 +0800
-+++ ppp-2.4.5/pppd/sys-linux.c	2010-06-30 16:54:00.362716231 +0800
-@@ -206,6 +206,8 @@
- 
+Index: ppp-2.4.7/pppd/sys-linux.c
+===================================================================
+--- ppp-2.4.7.orig/pppd/sys-linux.c
++++ ppp-2.4.7/pppd/sys-linux.c
+@@ -207,6 +207,8 @@ static unsigned char inbuf[512]; /* buff
  static int	if_is_up;	/* Interface has been marked up */
+ static int	if6_is_up;	/* Interface has been marked up for IPv6, to help differentiate */
  static int	have_default_route;	/* Gateway for default route added */
 +static struct rtentry old_def_rt;       /* Old default route */
 +static int       default_rt_repl_rest;  /* replace and restore old default rt */
  static u_int32_t proxy_arp_addr;	/* Addr for proxy arp entry added */
  static char proxy_arp_dev[16];		/* Device for proxy arp entry */
  static u_int32_t our_old_addr;		/* for detecting address changes */
-@@ -1537,6 +1539,9 @@
+@@ -1545,6 +1547,9 @@ static int read_route_table(struct rtent
  	p = NULL;
      }
  
@@ -194,7 +199,7 @@
      SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
      SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
      SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
-@@ -1606,20 +1611,51 @@
+@@ -1614,20 +1619,51 @@ int have_route_to(u_int32_t addr)
  /********************************************************************
   *
   * sifdefaultroute - assign a default route through the address given.
@@ -260,7 +265,7 @@
      }
  
      memset (&rt, 0, sizeof (rt));
-@@ -1638,6 +1674,12 @@
+@@ -1646,6 +1682,12 @@ int sifdefaultroute (int unit, u_int32_t
  	    error("default route ioctl(SIOCADDRT): %m");
  	return 0;
      }
@@ -273,7 +278,7 @@
  
      have_default_route = 1;
      return 1;
-@@ -1673,6 +1715,16 @@
+@@ -1681,6 +1723,16 @@ int cifdefaultroute (int unit, u_int32_t
  	    return 0;
  	}
      }
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
index d59717e..8a69396 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
@@ -6,10 +6,11 @@
 
 Upstream-Status: Inappropriate [configuration]
 
-diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
---- ppp-2.4.5-orig/pppd/Makefile.linux	2010-06-30 15:51:12.043682063 +0800
-+++ ppp-2.4.5/pppd/Makefile.linux	2010-06-30 17:08:21.806363042 +0800
-@@ -117,10 +117,10 @@
+Index: ppp-2.4.7/pppd/Makefile.linux
+===================================================================
+--- ppp-2.4.7.orig/pppd/Makefile.linux
++++ ppp-2.4.7/pppd/Makefile.linux
+@@ -120,10 +120,10 @@ CFLAGS   += -DHAS_SHADOW
  #LIBS     += -lshadow $(LIBS)
  endif
  
@@ -20,9 +21,9 @@
 -endif
 +#endif
  
- ifdef NEEDDES
- ifndef USE_CRYPT
-@@ -169,10 +169,10 @@
+ ifdef USE_LIBUTIL
+ CFLAGS	+= -DHAVE_LOGWTMP=1
+@@ -177,10 +177,10 @@ LIBS	+= -ldl
  endif
  
  ifdef FILTER
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
deleted file mode 100644
index f77b0de..0000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Thu, 13 Oct 2016 13:41:43 +0800
-Subject: [PATCH] ppp: fix building with linux-4.8
-
-Fix a build error when using the linux-4.8 headers that results in:
-
-In file included from pppoe.h:87:0,
-                 from plugin.c:29:
-../usr/include/netinet/in.h:211:8: note: originally defined here
- struct in6_addr
-        ^~~~~~~~
-In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
-                 from ../usr/include/linux/if_pppox.h:26,
-                 from plugin.c:52:
-../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
- struct sockaddr_in6 {
-        ^~~~~~~~~~~~
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/paulusmack/ppp/pull/69
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- pppd/plugins/rp-pppoe/pppoe.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee..96d2794 100644
---- a/pppd/plugins/rp-pppoe/pppoe.h
-+++ b/pppd/plugins/rp-pppoe/pppoe.h
-@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
-+#include <linux/in.h>
- 
- #ifdef HAVE_NETINET_IF_ETHER_H
- #include <sys/types.h>
--- 
-2.8.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index b2c4d4c..a5f764f 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -30,7 +30,7 @@
            file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
            file://ppp@.service \
            file://fix-CVE-2015-3310.patch \
-           file://ppp-fix-building-with-linux-4.8.patch \
+           file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
            file://0001-ppp-Remove-unneeded-include.patch \
 "
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
deleted file mode 100644
index 5715378..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 06fcf98f6ca40dc6b823d7d6231a240a1794ef2d Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Tue, 28 Feb 2017 10:40:37 +0800
-Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-commit 028524317d8d0011ed38e86e507a06738a5b5a97 from upstream
-
-IPv6 routes need the device argument for link-local routes, or they
-cannot be used at all. E.g. "gateway fe80::def" seems to be used in
-some places, but kernel refuses to insert the route unless device
-name is explicitly specified in the route addition.
-
-Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
----
- networking/ifupdown.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/networking/ifupdown.c b/networking/ifupdown.c
-index 17bc4e9..a00f68d 100644
---- a/networking/ifupdown.c
-+++ b/networking/ifupdown.c
-@@ -394,8 +394,8 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec)
- # if ENABLE_FEATURE_IFUPDOWN_IP
- 	result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec);
- 	result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec);
--	/* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */
--	result += execute("[[ip route add ::/0 via %gateway%]][[ metric %metric%]]", ifd, exec);
-+	/* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
-+	result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ metric %metric%]]", ifd, exec);
- # else
- 	result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec);
- 	result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec);
-@@ -421,7 +421,8 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t *ifd, execfn *exec)
- 			"%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, exec);
- 	result += execute("ip link set %iface% up", ifd, exec);
- 	result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec);
--	result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec);
-+	/* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
-+	result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec);
- 	return ((result == 4) ? 4 : 0);
- }
- 
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb
rename to import-layers/yocto-poky/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
index a6bfd46..d1675c3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
@@ -106,7 +106,7 @@
 }
 
 do_prepare_config () {
-	if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+	if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
 		export KCONFIG_NOTIMESTAMP=1
 	fi
 	sed -e '/CONFIG_STATIC/d' \
@@ -146,7 +146,7 @@
 
 do_compile() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-	if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+	if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
 		export KCONFIG_NOTIMESTAMP=1
 	fi
 	if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
@@ -158,6 +158,12 @@
 		cp .config .config.orig
 		oe_runmake busybox.cfg.suid
 		oe_runmake busybox.cfg.nosuid
+
+		# workaround for suid bug 10346
+		if ! grep -q "CONFIG_SH_IS_NONE" busybox.cfg.nosuid; then
+			echo "CONFIG_SH_IS_NONE" >> busybox.cfg.suid
+		fi
+
 		for i in `cat busybox.cfg.suid busybox.cfg.nosuid`; do
 			echo "# $i is not set" >> .config.disable.apps
 		done
@@ -167,12 +173,24 @@
 			cat busybox.cfg.$s | while read item; do
 				grep -w "$item" .config.orig
 			done > .config.app.$s
+
+			# workaround for suid bug 10346
+			if [ "$s" = "suid" ] ; then
+				sed "s/.*CONFIG_SH_IS_NONE.*$/CONFIG_SH_IS_NONE=y/" -i .config.app.suid
+			fi
+
 			merge_config.sh -m .config.nonapps .config.app.$s
 			oe_runmake busybox_unstripped
 			mv busybox_unstripped busybox.$s
 			oe_runmake busybox.links
 			mv busybox.links busybox.links.$s
 		done
+
+		# hard fail if sh is being linked to the suid busybox (detects bug 10346)
+		if grep -q -x "/bin/sh" busybox.links.suid; then
+			bbfatal "busybox suid binary incorrectly provides /bin/sh"
+		fi
+
 		# copy .config.orig back to .config, because the install process may check this file
 		cp .config.orig .config
 		# cleanup
@@ -206,7 +224,7 @@
 			install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
 			install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
 			install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
-			if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+			if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
 				ln -sf busybox.nosuid ${D}${base_bindir}/sh
 			fi
 			# Keep a default busybox for people who want to invoke busybox directly.
@@ -220,7 +238,7 @@
 				install -m 0755 ${B}/busybox ${D}${base_bindir}
 			fi
 			install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
-			if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+			if grep -q "CONFIG_SH_IS_ASH=y" ${B}/.config; then
 				ln -sf busybox ${D}${base_bindir}/sh
 			fi
 			# We make this symlink here to eliminate the error when upgrading together
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
deleted file mode 100644
index 78520f0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From e1d426fd65c00a6d01a10d85edf8a294ae8a2d2b Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 24 Apr 2016 18:19:49 +0200
-Subject: [PATCH] flock: fix -c; improve error handling of fork+exec
-
-function                                             old     new   delta
-flock_main                                           254     334     +80
-
-Upstream-Status: Backport
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- util-linux/flock.c | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/util-linux/flock.c b/util-linux/flock.c
-index 05a747f..539a835 100644
---- a/util-linux/flock.c
-+++ b/util-linux/flock.c
-@@ -57,7 +57,6 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- 	/* If it is "flock FILE -c PROG", then -c isn't caught by getopt32:
- 	 * we use "+" in order to support "flock -opt FILE PROG -with-opts",
- 	 * we need to remove -c by hand.
--	 * TODO: in upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
- 	 */
- 	if (argv[0]
- 	 && argv[0][0] == '-'
-@@ -66,6 +65,9 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- 	    )
- 	) {
- 		argv++;
-+		if (argv[1])
-+			bb_error_msg_and_die("-c takes only one argument");
-+		opt |= OPT_c;
- 	}
- 
- 	if (OPT_s == LOCK_SH && OPT_x == LOCK_EX && OPT_n == LOCK_NB && OPT_u == LOCK_UN) {
-@@ -90,8 +92,21 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- 		bb_perror_nomsg_and_die();
- 	}
- 
--	if (argv[0])
-+	if (argv[0]) {
-+		if (!(opt & OPT_c)) {
-+			int rc = spawn_and_wait(argv);
-+			if (rc < 0)
-+				bb_simple_perror_msg(argv[0]);
-+			return rc;
-+		}
-+		/* -c 'PROG ARGS' means "run sh -c 'PROG ARGS'" */
-+		argv -= 2;
-+		argv[0] = (char*)get_shell_name();
-+		argv[1] = (char*)"-c";
-+		/* argv[2] = "PROG ARGS"; */
-+		/* argv[3] = NULL; */
- 		return spawn_and_wait(argv);
-+	}
- 
- 	return EXIT_SUCCESS;
- }
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch
deleted file mode 100644
index 812a507..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 34ecc3b7aefdd6c31e8691bd5485037bbabedbd4 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 01:30:34 +0200
-Subject: [PATCH] ip: fix an improper optimization: req.r.rtm_scope may be
- nonzero here
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
-Upstream-Status: Backport
-Signed-off-by: André Draszik <adraszik@tycoint.com>
-
- networking/libiproute/iproute.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index e674e9a0d..48dc6e3d9 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -362,10 +362,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 		req.r.rtm_scope = RT_SCOPE_NOWHERE;
- 
- 	if (cmd != RTM_DELROUTE) {
-+		req.r.rtm_scope = RT_SCOPE_UNIVERSE;
- 		if (RTPROT_BOOT != 0)
- 			req.r.rtm_protocol = RTPROT_BOOT;
--		if (RT_SCOPE_UNIVERSE != 0)
--			req.r.rtm_scope = RT_SCOPE_UNIVERSE;
- 		if (RTN_UNICAST != 0)
- 			req.r.rtm_type = RTN_UNICAST;
- 	}
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch
deleted file mode 100644
index 66bc76e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-iproute-support-scope-.-Closes-8561.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From ce4bc1ed048233e89ee4cb95830bf6f01d523d1e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Wed, 30 Dec 2015 17:32:51 +0100
-Subject: [PATCH] iproute: support "scope". Closes 8561
-
-function                                             old     new   delta
-iproute_modify                                      1051    1120     +69
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-Modified patch to build against busybox 1.24.1:
-- s/invarg_1_to_2/invarg
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
- networking/libiproute/iproute.c | 52 ++++++++++++++++++++++++++---------------
- 1 file changed, 33 insertions(+), 19 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index d232ee6fd..82827488f 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -313,12 +313,13 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- static int iproute_modify(int cmd, unsigned flags, char **argv)
- {
- 	static const char keywords[] ALIGN1 =
--		"src\0""via\0""mtu\0""lock\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
-+		"src\0""via\0""mtu\0""lock\0""scope\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
- 		"dev\0""oif\0""to\0""metric\0""onlink\0";
- 	enum {
- 		ARG_src,
- 		ARG_via,
- 		ARG_mtu, PARM_lock,
-+		ARG_scope,
- 		ARG_protocol,
- IF_FEATURE_IP_RULE(ARG_table,)
- 		ARG_dev,
-@@ -344,6 +345,7 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 	unsigned mxlock = 0;
- 	char *d = NULL;
- 	smalluint ok = 0;
-+	smalluint scope_ok = 0;
- 	int arg;
- 
- 	memset(&req, 0, sizeof(req));
-@@ -352,15 +354,18 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 	req.n.nlmsg_flags = NLM_F_REQUEST | flags;
- 	req.n.nlmsg_type = cmd;
- 	req.r.rtm_family = preferred_family;
--	if (RT_TABLE_MAIN) /* if it is zero, memset already did it */
-+	if (RT_TABLE_MAIN != 0) /* if it is zero, memset already did it */
- 		req.r.rtm_table = RT_TABLE_MAIN;
--	if (RT_SCOPE_NOWHERE)
-+	if (RT_SCOPE_NOWHERE != 0)
- 		req.r.rtm_scope = RT_SCOPE_NOWHERE;
- 
- 	if (cmd != RTM_DELROUTE) {
--		req.r.rtm_protocol = RTPROT_BOOT;
--		req.r.rtm_scope = RT_SCOPE_UNIVERSE;
--		req.r.rtm_type = RTN_UNICAST;
-+		if (RTPROT_BOOT != 0)
-+			req.r.rtm_protocol = RTPROT_BOOT;
-+		if (RT_SCOPE_UNIVERSE != 0)
-+			req.r.rtm_scope = RT_SCOPE_UNIVERSE;
-+		if (RTN_UNICAST != 0)
-+			req.r.rtm_type = RTN_UNICAST;
- 	}
- 
- 	mxrta->rta_type = RTA_METRICS;
-@@ -393,6 +398,13 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 			}
- 			mtu = get_unsigned(*argv, "mtu");
- 			rta_addattr32(mxrta, sizeof(mxbuf), RTAX_MTU, mtu);
-+		} else if (arg == ARG_scope) {
-+			uint32_t scope;
-+			NEXT_ARG();
-+			if (rtnl_rtscope_a2n(&scope, *argv))
-+				invarg(*argv, "scope");
-+			req.r.rtm_scope = scope;
-+			scope_ok = 1;
- 		} else if (arg == ARG_protocol) {
- 			uint32_t prot;
- 			NEXT_ARG();
-@@ -469,20 +481,22 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 		addattr_l(&req.n, sizeof(req), RTA_METRICS, RTA_DATA(mxrta), RTA_PAYLOAD(mxrta));
- 	}
- 
--	if (req.r.rtm_type == RTN_LOCAL || req.r.rtm_type == RTN_NAT)
--		req.r.rtm_scope = RT_SCOPE_HOST;
--	else
--	if (req.r.rtm_type == RTN_BROADCAST
--	 || req.r.rtm_type == RTN_MULTICAST
--	 || req.r.rtm_type == RTN_ANYCAST
--	) {
--		req.r.rtm_scope = RT_SCOPE_LINK;
--	}
--	else if (req.r.rtm_type == RTN_UNICAST || req.r.rtm_type == RTN_UNSPEC) {
--		if (cmd == RTM_DELROUTE)
--			req.r.rtm_scope = RT_SCOPE_NOWHERE;
--		else if (!(ok & gw_ok))
-+	if (!scope_ok) {
-+		if (req.r.rtm_type == RTN_LOCAL || req.r.rtm_type == RTN_NAT)
-+			req.r.rtm_scope = RT_SCOPE_HOST;
-+		else
-+		if (req.r.rtm_type == RTN_BROADCAST
-+		 || req.r.rtm_type == RTN_MULTICAST
-+		 || req.r.rtm_type == RTN_ANYCAST
-+		) {
- 			req.r.rtm_scope = RT_SCOPE_LINK;
-+		}
-+		else if (req.r.rtm_type == RTN_UNICAST || req.r.rtm_type == RTN_UNSPEC) {
-+			if (cmd == RTM_DELROUTE)
-+				req.r.rtm_scope = RT_SCOPE_NOWHERE;
-+			else if (!(ok & gw_ok))
-+				req.r.rtm_scope = RT_SCOPE_LINK;
-+		}
- 	}
- 
- 	if (req.r.rtm_family == AF_UNSPEC) {
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
deleted file mode 100644
index aac5b40..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From b5a9234272e6084557224c73ab7737ed47f09848 Mon Sep 17 00:00:00 2001
-From: Lukasz Nowak <lnowak@tycoint.com>
-Date: Wed, 23 Nov 2016 12:48:21 +0000
-Subject: [PATCH v2] libiproute: handle table ids larger than 255
-
-Linux kernel, starting from 2.6.19 allows ip table ids to have 32-bit values.
-In order to preserve compatibility, the old 8-bit field: rtm_table is still
-in use when table id is lower than 256.
-
-Add support for the 32-bit table id (RTA_TABLE attribute) in:
-- ip route print
-- ip route modify
-- ip rule print
-- ip rule modify
-
-Add printing of table ids to ip route.
-
-Changes are compatible with the mainline iproute2 utilities.
-
-These changes are required for compatibility with ConnMan, which by default
-uses table ids greater than 255.
-
-Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2016-December/084989.html]
-
-Signed-off-by: Lukasz Nowak <lnowak@tycoint.com>
----
- networking/libiproute/iproute.c | 24 ++++++++++++++++++++----
- networking/libiproute/iprule.c  | 11 +++++++++--
- 2 files changed, 29 insertions(+), 6 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index 6ecd5f7..d5af498 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -87,6 +87,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 	inet_prefix dst;
- 	inet_prefix src;
- 	int host_len = -1;
-+	uint32_t tid;
- 
- 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
- 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
-@@ -99,6 +100,14 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 	if (len < 0)
- 		bb_error_msg_and_die("wrong nlmsg len %d", len);
- 
-+	memset(tb, 0, sizeof(tb));
-+	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
-+
-+	if (tb[RTA_TABLE])
-+		tid = *(uint32_t *)RTA_DATA(tb[RTA_TABLE]);
-+	else
-+		tid = r->rtm_table;
-+
- 	if (r->rtm_family == AF_INET6)
- 		host_len = 128;
- 	else if (r->rtm_family == AF_INET)
-@@ -128,7 +137,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 			}
- 		}
- 	} else {
--		if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
-+		if (G_filter.tb > 0 && G_filter.tb != tid) {
- 			return 0;
- 		}
- 	}
-@@ -157,10 +166,8 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 		return 0;
- 	}
- 
--	memset(tb, 0, sizeof(tb));
- 	memset(&src, 0, sizeof(src));
- 	memset(&dst, 0, sizeof(dst));
--	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
- 
- 	if (tb[RTA_SRC]) {
- 		src.bitlen = r->rtm_src_len;
-@@ -283,6 +290,10 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 	if (tb[RTA_OIF]) {
- 		printf("dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
- 	}
-+#if ENABLE_FEATURE_IP_RULE
-+	if (tid && tid != RT_TABLE_MAIN && !G_filter.tb)
-+		printf("table %s ", rtnl_rttable_n2a(tid));
-+#endif
- 
- 	/* Todo: parse & show "proto kernel", "scope link" here */
- 
-@@ -434,7 +445,12 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 			NEXT_ARG();
- 			if (rtnl_rttable_a2n(&tid, *argv))
- 				invarg(*argv, "table");
--			req.r.rtm_table = tid;
-+			if (tid < 256)
-+				req.r.rtm_table = tid;
-+			else {
-+				req.r.rtm_table = RT_TABLE_UNSPEC;
-+				addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+			}
- #endif
- 		} else if (arg == ARG_dev || arg == ARG_oif) {
- 			NEXT_ARG();
-diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
-index 774a3e2..3fac7c5 100644
---- a/networking/libiproute/iprule.c
-+++ b/networking/libiproute/iprule.c
-@@ -119,7 +119,9 @@ static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
- 		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
- 	}
- 
--	if (r->rtm_table)
-+	if (tb[RTA_TABLE])
-+		printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
-+	else if (r->rtm_table)
- 		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
- 
- 	if (tb[RTA_FLOW]) {
-@@ -259,7 +261,12 @@ static int iprule_modify(int cmd, char **argv)
- 			NEXT_ARG();
- 			if (rtnl_rttable_a2n(&tid, *argv))
- 				invarg(*argv, "table ID");
--			req.r.rtm_table = tid;
-+			if (tid < 256)
-+				req.r.rtm_table = tid;
-+			else {
-+				req.r.rtm_table = RT_TABLE_UNSPEC;
-+				addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+			}
- 			table_ok = 1;
- 		} else if (key == ARG_dev ||
- 			   key == ARG_iif
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
deleted file mode 100644
index 4f53984..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 903542f7331c58007a3ef938d41e1c55fc329648 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 31 Aug 2016 23:40:43 -0400
-Subject: [PATCH] sed: fix "sed n (flushes pattern space, terminates early)"
- testcase failure
-
-This patch fix "sed n (flushes pattern space, terminates early)"
-testcase failure. We can see it at:
-
-	https://git.busybox.net/busybox/commit/?id=76d72376e0244a5cafd4880cdc623e37d86a75e4
-
-Upstream-Status: Backport
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- editors/sed.c       | 19 ++++++++++---------
- testsuite/sed.tests |  6 +-----
- 2 files changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/editors/sed.c b/editors/sed.c
-index 7bbf820..259c39c 100644
---- a/editors/sed.c
-+++ b/editors/sed.c
-@@ -1274,16 +1274,17 @@ static void process_files(void)
- 		case 'n':
- 			if (!G.be_quiet)
- 				sed_puts(pattern_space, last_gets_char);
--			if (next_line) {
--				free(pattern_space);
--				pattern_space = next_line;
--				last_gets_char = next_gets_char;
--				next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
--				substituted = 0;
--				linenum++;
--				break;
-+			if (next_line == NULL) {
-+				/* If no next line, jump to end of script and exit. */
-+				goto discard_line;
- 			}
--			/* fall through */
-+			free(pattern_space);
-+			pattern_space = next_line;
-+			last_gets_char = next_gets_char;
-+			next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-+			substituted = 0;
-+			linenum++;
-+			break;
- 
- 		/* Quit.  End of script, end of input. */
- 		case 'q':
-diff --git a/testsuite/sed.tests b/testsuite/sed.tests
-index 34479e5..96ff7a5 100755
---- a/testsuite/sed.tests
-+++ b/testsuite/sed.tests
-@@ -73,13 +73,9 @@ testing "sed t (test/branch clears test bit)" "sed -e 's/a/b/;:loop;t loop'" \
- testing "sed T (!test/branch)" "sed -e 's/a/1/;T notone;p;: notone;p'" \
- 	"1\n1\n1\nb\nb\nc\nc\n" "" "a\nb\nc\n"
- 
--test x"$SKIP_KNOWN_BUGS" = x"" && {
--# Normal sed end-of-script doesn't print "c" because n flushed the pattern
--# space.  If n hits EOF, pattern space is empty when script ends.
--# Query: how does this interact with no newline at EOF?
- testing "sed n (flushes pattern space, terminates early)" "sed -e 'n;p'" \
- 	"a\nb\nb\nc\n" "" "a\nb\nc\n"
--}
-+
- # non-GNU sed: N does _not_ flush pattern space, therefore c is eaten @ script end
- # GNU sed: N flushes pattern space, therefore c is printed too @ script end
- testing "sed N (flushes pattern space (GNU behavior))" "sed -e 'N;p'" \
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch
deleted file mode 100644
index 828694c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/BUG9071_buffer_overflow_arp.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-busybox1.24.1: Fix busybox - (local) cmdline stack buffer overwrite 
-
-[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=9071
-
-busybox - (local) cmdline stack buffer overwrite 
-
-Busybox provides an `arp` applet which is missing an array bounds check for 
-command-line parameter `IFNAME`. It is therefore vulnerable to a command-line 
-based local stack buffer overwrite effectively allowing local users to write 
-past a 16 bytes fixed stack buffer. This leads to two scenarios, one (A) where 
-an IOCTL for GET_HW_ADDRESS (`SIOCGIFHWADDR`) fails and results in a corrupted 
-`va_list` being passed to `*printf()` and one (B) where an attacker might provide 
-valid params for the IOCTL and trick the program to proceed and result in a 
-`RET eip overwrite` eventually gaining code execution.
-
-Upstream-Status: Backport [https://git.busybox.net/busybox/commit/networking/arp.c?id=88e2b1cb626761b1924305b761a5dfc723613c4e]
-BUG: BUG9071
-Signed-off-by: Martin Balik <martin.balik@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
---
-
-diff --git a/networking/arp.c b/networking/arp.c
-index 0099aa5..87eb327 100644
---- a/networking/arp.c
-+++ b/networking/arp.c
-@@ -176,7 +176,7 @@ static int arp_del(char **args)
- 	if (flags == 0)
- 		flags = 3;
- 
--	strncpy(req.arp_dev, device, sizeof(req.arp_dev));
-+	strncpy_IFNAMSIZ(req.arp_dev, device);
- 
- 	err = -1;
- 
-@@ -217,7 +217,7 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa)
- 	struct ifreq ifr;
- 	const struct hwtype *xhw;
- 
--	strcpy(ifr.ifr_name, ifname);
-+	strncpy_IFNAMSIZ(ifr.ifr_name, ifname);
- 	ioctl_or_perror_and_die(sockfd, SIOCGIFHWADDR, &ifr,
- 					"can't get HW-Address for '%s'", ifname);
- 	if (hw_set && (ifr.ifr_hwaddr.sa_family != hw->type)) {
-@@ -330,7 +330,7 @@ static int arp_set(char **args)
- 	/* Fill in the remainder of the request. */
- 	req.arp_flags = flags;
- 
--	strncpy(req.arp_dev, device, sizeof(req.arp_dev));
-+	strncpy_IFNAMSIZ(req.arp_dev, device);
- 
- 	/* Call the kernel. */
- 	if (option_mask32 & ARP_OPT_v)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch
new file mode 100755
index 0000000..0926107
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2011-5325.patch
@@ -0,0 +1,481 @@
+busybox-1.27.2: Fix CVE-2011-5325
+
+[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=8411
+
+libarchive: do not extract unsafe symlinks
+
+Prevent unsafe links extracting unless env variable $EXTRACT_UNSAFE_SYMLINKS=1
+is not set. Untarring file with -C DESTDIR parameter could be extracted with
+unwanted symlinks. This doesn't feel right, and IIRC GNU tar doesn't do that.
+Include necessary changes from previous commits.
+
+Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=bc9bbeb2b81001e8731cd2ae501c8fccc8d87cc7]
+CVE: CVE-2011-5325
+bug: 8411
+Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+
+diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src
+index 942e755..e1a8a75 100644
+--- a/archival/libarchive/Kbuild.src
++++ b/archival/libarchive/Kbuild.src
+@@ -12,6 +12,8 @@ COMMON_FILES:= \
+ 	data_extract_all.o \
+ 	data_extract_to_stdout.o \
+ \
++	unsafe_symlink_target.o \
++\
+ 	filter_accept_all.o \
+ 	filter_accept_list.o \
+ 	filter_accept_reject_list.o \
+diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c
+index 1830ffb..b828b65 100644
+--- a/archival/libarchive/data_extract_all.c
++++ b/archival/libarchive/data_extract_all.c
+@@ -128,10 +128,9 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
+ 		res = link(hard_link, dst_name);
+ 		if (res != 0 && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)) {
+ 			/* shared message */
+-			bb_perror_msg("can't create %slink "
+-					"%s to %s", "hard",
+-					dst_name,
+-					hard_link);
++			bb_perror_msg("can't create %slink '%s' to '%s'",
++					 "hard", dst_name, hard_link
++			);
+ 		}
+ 		/* Hardlinks have no separate mode/ownership, skip chown/chmod */
+ 		goto ret;
+@@ -178,15 +177,17 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
+ 	case S_IFLNK:
+ 		/* Symlink */
+ //TODO: what if file_header->link_target == NULL (say, corrupted tarball?)
+-		res = symlink(file_header->link_target, dst_name);
+-		if (res != 0
+-		 && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)
+-		) {
+-			/* shared message */
+-			bb_perror_msg("can't create %slink "
+-				"%s to %s", "sym",
+-				dst_name,
+-				file_header->link_target);
++		if (!unsafe_symlink_target(file_header->link_target)) {
++			res = symlink(file_header->link_target, dst_name);
++			if (res != 0
++				&& !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)
++			) {
++						/* shared message */
++						bb_perror_msg("can't create %slink '%s' to '%s'",
++							"sym",
++							dst_name, file_header->link_target
++						);
++			}
+ 		}
+ 		break;
+ 	case S_IFSOCK:
+diff --git a/archival/libarchive/unsafe_symlink_target.c b/archival/libarchive/unsafe_symlink_target.c
+new file mode 100644
+index 0000000..ee46e28
+--- /dev/null
++++ b/archival/libarchive/unsafe_symlink_target.c
+@@ -0,0 +1,48 @@
++/* vi: set sw=4 ts=4: */
++/*
++ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
++ */
++#include "libbb.h"
++#include "bb_archive.h"
++
++int FAST_FUNC unsafe_symlink_target(const char *target)
++{
++	const char *dot;
++
++	if (target[0] == '/') {
++		const char *var;
++unsafe:
++		var = getenv("EXTRACT_UNSAFE_SYMLINKS");
++		if (var) {
++			if (LONE_CHAR(var, '1'))
++				return 0; /* pretend it's safe */
++			return 1; /* "UNSAFE!" */
++		}
++		bb_error_msg("skipping unsafe symlink to '%s' in archive,"
++			" set %s=1 to extract",
++			target,
++			"EXTRACT_UNSAFE_SYMLINKS"
++		);
++		/* Prevent further messages */
++		setenv("EXTRACT_UNSAFE_SYMLINKS", "0", 0);
++		return 1; /* "UNSAFE!" */
++	}
++
++	dot = target;
++	for (;;) {
++		dot = strchr(dot, '.');
++			if (!dot)
++				return 0; /* safe target */
++
++			/* Is it a path component starting with ".."? */
++			if ((dot[1] == '.')
++				&& (dot == target || dot[-1] == '/')
++					/* Is it exactly ".."? */
++				&& (dot[2] == '/' || dot[2] == '\0')
++			) {
++				goto unsafe;
++			}
++			/* NB: it can even be trailing ".", should only add 1 */
++			dot += 1;
++	}
++}
+\ No newline at end of file
+diff --git a/archival/unzip.c b/archival/unzip.c
+index 9037262..270e261 100644
+--- a/archival/unzip.c
++++ b/archival/unzip.c
+@@ -335,6 +335,44 @@ static void unzip_create_leading_dirs(const char *fn)
+ 	free(name);
+ }
+ 
++static void unzip_extract_symlink(zip_header_t *zip, const char *dst_fn)
++{
++	char *target;
++
++	if (zip->fmt.ucmpsize > 0xfff) /* no funny business please */
++		bb_error_msg_and_die("bad archive");
++
++	if (zip->fmt.method == 0) {
++		/* Method 0 - stored (not compressed) */
++		target = xzalloc(zip->fmt.ucmpsize + 1);
++		xread(zip_fd, target, zip->fmt.ucmpsize);
++	} else {
++#if 1
++		bb_error_msg_and_die("compressed symlink is not supported");
++#else
++		transformer_state_t xstate;
++		init_transformer_state(&xstate);
++		xstate.mem_output_size_max = zip->fmt.ucmpsize;
++		/* ...unpack... */
++		if (!xstate.mem_output_buf)
++			WTF();
++		target = xstate.mem_output_buf;
++		target = xrealloc(target, xstate.mem_output_size + 1);
++		target[xstate.mem_output_size] = '\0';
++#endif
++	}
++	if (!unsafe_symlink_target(target)) {
++//TODO: libbb candidate
++		if (symlink(target, dst_fn)) {
++			/* shared message */
++			bb_perror_msg_and_die("can't create %slink '%s' to '%s'",
++				"sym", dst_fn, target
++			);
++		}
++	}
++	free(target);
++}
++
+ static void unzip_extract(zip_header_t *zip, int dst_fd)
+ {
+ 	transformer_state_t xstate;
+@@ -813,7 +851,7 @@ int unzip_main(int argc, char **argv)
+ 		}
+  check_file:
+ 		/* Extract file */
+-		if (stat(dst_fn, &stat_buf) == -1) {
++		if (lstat(dst_fn, &stat_buf) == -1) {
+ 			/* File does not exist */
+ 			if (errno != ENOENT) {
+ 				bb_perror_msg_and_die("can't stat '%s'", dst_fn);
+@@ -834,6 +872,7 @@ int unzip_main(int argc, char **argv)
+ 			goto do_open_and_extract;
+ 		printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
+ 		my_fgets80(key_buf);
++//TODO: redo lstat + ISREG check! user input could have taken a long time!
+ 
+ 		switch (key_buf[0]) {
+ 		case 'A':
+@@ -842,7 +881,8 @@ int unzip_main(int argc, char **argv)
+  do_open_and_extract:
+ 			unzip_create_leading_dirs(dst_fn);
+ #if ENABLE_FEATURE_UNZIP_CDF
+-			dst_fd = xopen3(dst_fn, O_WRONLY | O_CREAT | O_TRUNC, file_mode);
++			if (!S_ISLNK(file_mode))
++				dst_fd = xopen3(dst_fn, O_WRONLY | O_CREAT | O_TRUNC, file_mode);
+ #else
+ 			dst_fd = xopen(dst_fn, O_WRONLY | O_CREAT | O_TRUNC);
+ #endif
+@@ -852,10 +892,18 @@ int unzip_main(int argc, char **argv)
+ 					? " extracting: %s\n"
+ 					: */ "  inflating: %s\n", dst_fn);
+ 			}
+-			unzip_extract(&zip, dst_fd);
+-			if (dst_fd != STDOUT_FILENO) {
+-				/* closing STDOUT is potentially bad for future business */
+-				close(dst_fd);
++#if ENABLE_FEATURE_UNZIP_CDF
++			if (S_ISLNK(file_mode)) {
++				if (dst_fd != STDOUT_FILENO) /* no -p */
++					unzip_extract_symlink(&zip, dst_fn);
++			} else
++#endif
++			{
++				unzip_extract(&zip, dst_fd);
++				if (dst_fd != STDOUT_FILENO) {
++					/* closing STDOUT is potentially bad for future business */
++					close(dst_fd);
++				};
+ 			}
+ 			break;
+ 
+diff --git a/coreutils/link.c b/coreutils/link.c
+index ac3ef85..aab249d 100644
+--- a/coreutils/link.c
++++ b/coreutils/link.c
+@@ -32,9 +32,8 @@ int link_main(int argc UNUSED_PARAM, char **argv)
+ 	argv += optind;
+ 	if (link(argv[0], argv[1]) != 0) {
+ 		/* shared message */
+-		bb_perror_msg_and_die("can't create %slink "
+-					"%s to %s", "hard",
+-					argv[1], argv[0]
++		bb_perror_msg_and_die("can't create %slink '%s' to '%s'",
++					"hard",	argv[1], argv[0]
+ 		);
+ 	}
+ 	return EXIT_SUCCESS;
+diff --git a/include/bb_archive.h b/include/bb_archive.h
+index 2b9c5f0..1e4da3c 100644
+--- a/include/bb_archive.h
++++ b/include/bb_archive.h
+@@ -196,6 +196,7 @@ void seek_by_jump(int fd, off_t amount) FAST_FUNC;
+ void seek_by_read(int fd, off_t amount) FAST_FUNC;
+ 
+ const char *strip_unsafe_prefix(const char *str) FAST_FUNC;
++int unsafe_symlink_target(const char *target) FAST_FUNC;
+ 
+ void data_align(archive_handle_t *archive_handle, unsigned boundary) FAST_FUNC;
+ const llist_t *find_list_entry(const llist_t *list, const char *filename) FAST_FUNC;
+diff --git a/libbb/copy_file.c b/libbb/copy_file.c
+index 23c0f83..be90066 100644
+--- a/libbb/copy_file.c
++++ b/libbb/copy_file.c
+@@ -371,7 +371,10 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
+ 			int r = symlink(lpath, dest);
+ 			free(lpath);
+ 			if (r < 0) {
+-				bb_perror_msg("can't create symlink '%s'", dest);
++				/* shared message */
++				bb_perror_msg("can't create %slink '%s' to '%s'",
++					"sym", dest, lpath
++				);
+ 				return -1;
+ 			}
+ 			if (flags & FILEUTILS_PRESERVE_STATUS)
+diff --git a/testsuite/tar.tests b/testsuite/tar.tests
+index 9f7ce15..b7cd74c 100755
+--- a/testsuite/tar.tests
++++ b/testsuite/tar.tests
+@@ -10,9 +10,6 @@ unset LC_COLLATE
+ unset LC_ALL
+ umask 022
+ 
+-rm -rf tar.tempdir 2>/dev/null
+-mkdir tar.tempdir && cd tar.tempdir || exit 1
+-
+ # testing "test name" "script" "expected result" "file input" "stdin"
+ 
+ testing "Empty file is not a tarball" '\
+@@ -53,6 +50,7 @@ dd if=/dev/zero bs=512 count=20 2>/dev/null | tar xvf - 2>&1; echo $?
+ "" ""
+ SKIP=
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # "tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input":
+ # GNU tar 1.26 records as hardlinks:
+ #  input_hard2 -> input_hard1
+@@ -64,7 +62,6 @@ SKIP=
+ # We also don't use "hrw-r--r--" notation for hardlinks in "tar tv" listing.
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar hardlinks and repeated files" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_hard1
+ ln input_hard1 input_hard2
+ mkdir input_dir
+@@ -95,10 +92,11 @@ drwxr-xr-x input_dir
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar hardlinks mode" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_hard1
+ chmod 741 input_hard1
+ ln input_hard1 input_hard2
+@@ -128,10 +126,11 @@ Ok: 0
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+ testing "tar symlinks mode" '\
+-rm -rf input_* test.tar 2>/dev/null
+ >input_file
+ chmod 741 input_file
+ ln -s input_file input_soft
+@@ -159,10 +158,11 @@ lrwxrwxrwx input_file
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional FEATURE_TAR_CREATE FEATURE_TAR_LONG_OPTIONS
+ testing "tar --overwrite" "\
+-rm -rf input_* test.tar 2>/dev/null
+ ln input input_hard
+ tar cf test.tar input_hard
+ echo WRONG >input
+@@ -174,12 +174,13 @@ Ok
+ " \
+ "Ok\n" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ test x"$SKIP_KNOWN_BUGS" = x"" && {
+ # Needs to be run under non-root for meaningful test
+ optional FEATURE_TAR_CREATE
+ testing "tar writing into read-only dir" '\
+-rm -rf input_* test.tar 2>/dev/null
+ mkdir input_dir
+ >input_dir/input_file
+ chmod 550 input_dir
+@@ -201,7 +202,9 @@ dr-xr-x--- input_dir
+ "" ""
+ SKIP=
+ }
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # Had a bug where on extract autodetect first "switched off" -z
+ # and then failed to recognize .tgz extension
+ optional FEATURE_TAR_CREATE FEATURE_SEAMLESS_GZ GUNZIP
+@@ -217,7 +220,9 @@ Ok
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # Do we detect XZ-compressed data (even w/o .tar.xz or txz extension)?
+ # (the uuencoded hello_world.txz contains one empty file named "hello_world")
+ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_XZ
+@@ -236,7 +241,9 @@ AAAEWVo=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # On extract, everything up to and including last ".." component is stripped
+ optional FEATURE_TAR_CREATE
+ testing "tar strips /../ on extract" "\
+@@ -255,7 +262,9 @@ Ok
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # attack.tar.bz2 has symlink pointing to a system file
+ # followed by a regular file with the same name
+ # containing "root::0:0::/root:/bin/sh":
+@@ -270,6 +279,7 @@ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_BZ2
+ testing "tar does not extract into symlinks" "\
+ >>/tmp/passwd && uudecode -o input && tar xf input 2>&1 && rm passwd; cat /tmp/passwd; echo \$?
+ " "\
++tar: skipping unsafe symlink to '/tmp/passwd' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ 0
+ " \
+ "" "\
+@@ -281,12 +291,15 @@ l4/V8LDoe90yiWJhOJvIypgEfxdyRThQkBVn/bI=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
++
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ # And same with -k
+ optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_BZ2
+ testing "tar -k does not extract into symlinks" "\
+ >>/tmp/passwd && uudecode -o input && tar xf input -k 2>&1 && rm passwd; cat /tmp/passwd; echo \$?
+ " "\
+-tar: can't open 'passwd': File exists
++tar: skipping unsafe symlink to '/tmp/passwd' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ 0
+ " \
+ "" "\
+@@ -298,7 +311,9 @@ l4/V8LDoe90yiWJhOJvIypgEfxdyRThQkBVn/bI=
+ ====
+ "
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
++mkdir tar.tempdir && cd tar.tempdir || exit 1
+ optional UNICODE_SUPPORT FEATURE_TAR_GNU_EXTENSIONS FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT
+ testing "Pax-encoded UTF8 names and symlinks" '\
+ tar xvf ../tar.utf8.tar.bz2 2>&1; echo $?
+@@ -309,17 +324,45 @@ rm -rf etc usr
+ ' "\
+ etc/ssl/certs/3b2716e5.0
+ etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
++tar: skipping unsafe symlink to '/usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
+ etc/ssl/certs/f80cc7f6.0
+ usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
+ 0
+ etc/ssl/certs/3b2716e5.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
+-etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem -> /usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
+ etc/ssl/certs/f80cc7f6.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
+ " \
+ "" ""
+ SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
+-
+-cd .. && rm -rf tar.tempdir || exit 1
++mkdir tar.tempdir && cd tar.tempdir || exit 1
++optional UUDECODE FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT
++testing "Symlink attack: create symlink and then write through it" '\
++exec 2>&1
++uudecode -o input && tar xvf input; echo $?
++ls /tmp/bb_test_evilfile
++ls bb_test_evilfile
++ls symlink/bb_test_evilfile
++' "\
++anything.txt
++symlink
++tar: skipping unsafe symlink to '/tmp' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract
++symlink/bb_test_evilfile
++0
++ls: /tmp/bb_test_evilfile: No such file or directory
++ls: bb_test_evilfile: No such file or directory
++symlink/bb_test_evilfile
++" \
++"" "\
++begin-base64 644 tar_symlink_attack.tar.bz2
++QlpoOTFBWSZTWZgs7bQAALT/hMmQAFBAAf+AEMAGJPPv32AAAIAIMAC5thlR
++omAjAmCMADQT1BqNE0AEwAAjAEwElTKeo9NTR6h6gaeoA0DQNLVdwZZ5iNTk
++AQwCAV6S00QFJYhrlfFkVCEDEGtgNVqYrI0uK3ggnt30gqk4e1TTQm5QIAKa
++SJqzRGSFLMmOloHSAcvLiFxxRiQtQZF+qPxbo173ZDISOAoNoPN4PQPhBhKS
++n8fYaKlioCTzL2oXYczyUUIP4u5IpwoSEwWdtoA=
++====
++"
++SKIP=
++cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+ 
+ exit $FAILCOUNT
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
deleted file mode 100644
index 84cae6a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d474ffc68290e0a83651c4432eeabfa62cd51e87 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Thu, 10 Mar 2016 11:47:58 +0100
-Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2147
-
-https://git.busybox.net/busybox/commit/?id=d474ffc
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/domain_codec.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/domain_codec.c
-+++ busybox-1.23.2/networking/udhcp/domain_codec.c
-@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- 				if (crtpos + *c + 1 > clen) /* label too long? abort */
- 					return NULL;
- 				if (dst)
--					memcpy(dst + len, c + 1, *c);
-+					/* \3com ---> "com." */
-+					((char*)mempcpy(dst + len, c + 1, *c))[0] = '.';
- 				len += *c + 1;
- 				crtpos += *c + 1;
--				if (dst)
--					dst[len - 1] = '.';
- 			} else {
- 				/* NUL: end of current domain name */
- 				if (retpos == 0) {
-@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- 					crtpos = retpos;
- 					retpos = depth = 0;
- 				}
--				if (dst)
-+				if (dst && len != 0)
-+					/* \4host\3com\0\4host and we are at \0:
-+					 * \3com was converted to "com.", change dot to space.
-+					 */
- 					dst[len - 1] = ' ';
- 			}
- 
-@@ -228,6 +230,9 @@ int main(int argc, char **argv)
- 	int len;
- 	uint8_t *encoded;
- 
-+        uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
-+        printf("NUL:'%s'\n",   dname_dec(str, 6, ""));
-+
- #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre))
- 	printf("'%s'\n",       DNAME_DEC("\4host\3com\0", "test1:"));
- 	printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
deleted file mode 100644
index b8349c0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1b7c17391de66502dd7a97c866e0a33681edbb1f Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 11 Mar 2016 00:26:58 +0100
-Subject: [PATCH] udhcpc: fix a warning in debug code
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Upstream-Status: Backport
-CVE: CVE-2016-2147 regression fix
-
-https://git.busybox.net/busybox/commit/?id=1b7c17
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
-index cee31f1..5a923cc 100644
---- a/networking/udhcp/domain_codec.c
-+++ b/networking/udhcp/domain_codec.c
-@@ -7,6 +7,7 @@
-  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
-  */
- #ifdef DNS_COMPR_TESTING
-+# define _GNU_SOURCE
- # define FAST_FUNC /* nothing */
- # define xmalloc malloc
- # include <stdlib.h>
--- 
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
deleted file mode 100644
index af04a7f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 352f79acbd759c14399e39baef21fc4ffe180ac2 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 26 Feb 2016 15:54:56 +0100
-Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
- buffer)
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2148
-https://git.busybox.net/busybox/commit/?id=352f79
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/common.c | 15 +++++++++++++--
- networking/udhcp/dhcpc.c  |  4 ++--
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/common.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/common.c
-+++ busybox-1.23.2/networking/udhcp/common.c
-@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1
-  * udhcp_str2optset: to determine how many bytes to allocate.
-  * xmalloc_optname_optval: to estimate string length
-  * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
-- * is the number of elements, multiply in by one element's string width
-+ * is the number of elements, multiply it by one element's string width
-  * (len_of_option_as_string[opt_type]) and you know how wide string you need.
-  */
- const uint8_t dhcp_option_lengths[] ALIGN1 = {
-@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIG
- 	[OPTION_S32] =     4,
- 	/* Just like OPTION_STRING, we use minimum length here */
- 	[OPTION_STATIC_ROUTES] = 5,
--	[OPTION_6RD] =    22,  /* ignored by udhcp_str2optset */
-+	[OPTION_6RD] =    12,  /* ignored by udhcp_str2optset */
-+	/* The above value was chosen as follows:
-+	 * len_of_option_as_string[] for this option is >60: it's a string of the form
-+	 * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
-+	 * Each additional ipv4 address takes 4 bytes in binary option and appends
-+	 * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4
-+	 * but this severely overestimates string length: instead of 16 bytes,
-+	 * it adds >60 for every 4 bytes in binary option.
-+	 * We cheat and declare here that option is in units of 12 bytes.
-+	 * This adds more than 60 bytes for every three ipv4 addresses - more than enough.
-+	 * (Even 16 instead of 12 should work, but let's be paranoid).
-+	 */
- };
- 
- 
-Index: busybox-1.23.2/networking/udhcp/dhcpc.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.23.2/networking/udhcp/dhcpc.c
-@@ -103,7 +103,7 @@ static const uint8_t len_of_option_as_st
- 	[OPTION_IP              ] = sizeof("255.255.255.255 "),
- 	[OPTION_IP_PAIR         ] = sizeof("255.255.255.255 ") * 2,
- 	[OPTION_STATIC_ROUTES   ] = sizeof("255.255.255.255/32 255.255.255.255 "),
--	[OPTION_6RD             ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
-+	[OPTION_6RD             ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
- 	[OPTION_STRING          ] = 1,
- 	[OPTION_STRING_HOST     ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
-@@ -214,7 +214,7 @@ static NOINLINE char *xmalloc_optname_op
- 	type = optflag->flags & OPTION_TYPE_MASK;
- 	optlen = dhcp_option_lengths[type];
- 	upper_length = len_of_option_as_string[type]
--		* ((unsigned)(len + optlen - 1) / (unsigned)optlen);
-+		* ((unsigned)(len + optlen) / (unsigned)optlen);
- 
- 	dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
- 	dest += sprintf(ret, "%s=", opt_name);
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch
deleted file mode 100644
index 851bc20..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-6301.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-busybox1.24.1: Fix CVE-2016-6301
-
-[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1363710
-
-ntpd: NTP server denial of service flaw
-
-The busybox NTP implementation doesn't check the NTP mode of packets
-received on the server port and responds to any packet with the right
-size. This includes responses from another NTP server. An attacker can
-send a packet with a spoofed source address in order to create an
-infinite loop of responses between two busybox NTP servers. Adding
-more packets to the loop increases the traffic between the servers
-until one of them has a fully loaded CPU and/or network.
-
-Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=150dc7a2b483b8338a3e185c478b4b23ee884e71]
-CVE: CVE-2016-6301
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/networking/ntpd.c b/networking/ntpd.c
-index 9732c9b..0f6a55f 100644
---- a/networking/ntpd.c
-+++ b/networking/ntpd.c
-@@ -1985,6 +1985,13 @@ recv_and_process_client_pkt(void /*int fd*/)
- 		goto bail;
- 	}
- 
-+	/* Respond only to client and symmetric active packets */
-+	if ((msg.m_status & MODE_MASK) != MODE_CLIENT
-+	 && (msg.m_status & MODE_MASK) != MODE_SYM_ACT
-+	) {
-+		goto bail;
-+	}
-+
- 	query_status = msg.m_status;
- 	query_xmttime = msg.m_xmttime;
- 
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch
new file mode 100644
index 0000000..5a027c9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2017-15873.patch
@@ -0,0 +1,95 @@
+busybox-1.27.2: Fix CVE-2017-15873
+
+[No upstream tracking] -- https://bugs.busybox.net/show_bug.cgi?id=10431
+
+bunzip2: fix runCnt overflow
+
+The get_next_block function in archival/libarchive/decompress_bunzip2.c
+in BusyBox 1.27.2 has an Integer Overflow that may lead to a write 
+access violation.
+
+Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=0402cb32df015d9372578e3db27db47b33d5c7b0]
+CVE: CVE-2017-15873
+bug: 10431
+Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
+
+diff --git a/archival/libarchive/decompress_bunzip2.c b/archival/libarchive/decompress_bunzip2.c
+index 7cd18f5..bec89ed 100644
+--- a/archival/libarchive/decompress_bunzip2.c
++++ b/archival/libarchive/decompress_bunzip2.c
+@@ -156,15 +156,15 @@ static unsigned get_bits(bunzip_data *bd, int bits_wanted)
+ static int get_next_block(bunzip_data *bd)
+ {
+ 	struct group_data *hufGroup;
+-	int dbufCount, dbufSize, groupCount, *base, *limit, selector,
+-		i, j, runPos, symCount, symTotal, nSelectors, byteCount[256];
+-	int runCnt = runCnt; /* for compiler */
++	int groupCount, *base, *limit, selector,
++		i, j, symCount, symTotal, nSelectors, byteCount[256];
+ 	uint8_t uc, symToByte[256], mtfSymbol[256], *selectors;
+ 	uint32_t *dbuf;
+ 	unsigned origPtr, t;
++	unsigned dbufCount, runPos;
++	unsigned runCnt = runCnt; /* for compiler */
+ 
+ 	dbuf = bd->dbuf;
+-	dbufSize = bd->dbufSize;
+ 	selectors = bd->selectors;
+ 
+ /* In bbox, we are ok with aborting through setjmp which is set up in start_bunzip */
+@@ -187,7 +187,7 @@ static int get_next_block(bunzip_data *bd)
+ 	   it didn't actually work. */
+ 	if (get_bits(bd, 1)) return RETVAL_OBSOLETE_INPUT;
+ 	origPtr = get_bits(bd, 24);
+-	if ((int)origPtr > dbufSize) return RETVAL_DATA_ERROR;
++	if (origPtr > bd->dbufSize) return RETVAL_DATA_ERROR;
+ 
+ 	/* mapping table: if some byte values are never used (encoding things
+ 	   like ascii text), the compression code removes the gaps to have fewer
+@@ -435,7 +435,14 @@ static int get_next_block(bunzip_data *bd)
+ 			   symbols, but a run of length 0 doesn't mean anything in this
+ 			   context).  Thus space is saved. */
+ 			runCnt += (runPos << nextSym); /* +runPos if RUNA; +2*runPos if RUNB */
+-			if (runPos < dbufSize) runPos <<= 1;
++//The 32-bit overflow of runCnt wasn't yet seen, but probably can happen.
++//This would be the fix (catches too large count way before it can overflow):
++//			if (runCnt > bd->dbufSize) {
++//				dbg("runCnt:%u > dbufSize:%u RETVAL_DATA_ERROR",
++//						runCnt, bd->dbufSize);
++//				return RETVAL_DATA_ERROR;
++//			}
++			if (runPos < bd->dbufSize) runPos <<= 1;
+ 			goto end_of_huffman_loop;
+ 		}
+ 
+@@ -445,14 +452,15 @@ static int get_next_block(bunzip_data *bd)
+ 		   literal used is the one at the head of the mtfSymbol array.) */
+ 		if (runPos != 0) {
+ 			uint8_t tmp_byte;
+-			if (dbufCount + runCnt > dbufSize) {
+-				dbg("dbufCount:%d+runCnt:%d %d > dbufSize:%d RETVAL_DATA_ERROR",
+-						dbufCount, runCnt, dbufCount + runCnt, dbufSize);
++			if (dbufCount + runCnt > bd->dbufSize) {
++				dbg("dbufCount:%u+runCnt:%u %u > dbufSize:%u RETVAL_DATA_ERROR",
++						dbufCount, runCnt, dbufCount + runCnt, bd->dbufSize);
+ 				return RETVAL_DATA_ERROR;
+ 			}
+ 			tmp_byte = symToByte[mtfSymbol[0]];
+ 			byteCount[tmp_byte] += runCnt;
+-			while (--runCnt >= 0) dbuf[dbufCount++] = (uint32_t)tmp_byte;
++			while ((int)--runCnt >= 0)
++				dbuf[dbufCount++] = (uint32_t)tmp_byte;
+ 			runPos = 0;
+ 		}
+ 
+@@ -466,7 +474,7 @@ static int get_next_block(bunzip_data *bd)
+ 		   first symbol in the mtf array, position 0, would have been handled
+ 		   as part of a run above.  Therefore 1 unused mtf position minus
+ 		   2 non-literal nextSym values equals -1.) */
+-		if (dbufCount >= dbufSize) return RETVAL_DATA_ERROR;
++		if (dbufCount >= bd->dbufSize) return RETVAL_DATA_ERROR;
+ 		i = nextSym - 1;
+ 		uc = mtfSymbol[i];
+ 
+-- 
+cgit v0.12
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
deleted file mode 100644
index cdc9108..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Backport
-
-  http://busybox.net/downloads/fixes-1.24.1/
-  https://git.busybox.net/busybox/commit/?id=e111a1640494fe87fc913f94fae3bb805de0fc99
-  https://git.busybox.net/busybox/commit/?h=1_24_stable&id=be729c1d3b5c923f10871dd68ea94156d0f8c803
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From be729c1d3b5c923f10871dd68ea94156d0f8c803 Mon Sep 17 00:00:00 2001
-From: Ari Sundholm <ari@tuxera.com>
-Date: Mon, 4 Jan 2016 15:40:37 +0200
-Subject: [PATCH] truncate: always set mode when opening file to avoid fortify
- errors
-
-Busybox crashes due to no mode being given when opening:
-$ ./busybox truncate -s 1M foo
-*** invalid open64 call: O_CREAT without mode ***: ./busybox terminated
-======= Backtrace: =========
-/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f]
-/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c]
-/lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa]
-./busybox[0x4899f9]
-======= Memory map: ========
-00400000-004d0000 r-xp 00000000 00:1a 137559                             /home/ari/busybox/busybox
-006cf000-006d0000 r--p 000cf000 00:1a 137559                             /home/ari/busybox/busybox
-006d0000-006d1000 rw-p 000d0000 00:1a 137559                             /home/ari/busybox/busybox
-006d1000-006d4000 rw-p 00000000 00:00 0
-014e7000-01508000 rw-p 00000000 00:00 0                                  [heap]
-7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0
-7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0
-7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0
-7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0
-7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0                          [stack]
-7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0                          [vdso]
-ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
-Aborted (core dumped)
-$
-
-Fix this by simply always setting the mode, as it doesn't hurt even
-when O_CREAT is not specified.
-
-This bug is a regression introduced in fc3e40e, as xopen(), which
-was originally used, would automatically set the mode.
-
-Signed-off-by: Ari Sundholm <ari@tuxera.com>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)
----
- coreutils/truncate.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coreutils/truncate.c b/coreutils/truncate.c
-index e5fa656..4c997bf 100644
---- a/coreutils/truncate.c
-+++ b/coreutils/truncate.c
-@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
- 
- 	argv += optind;
- 	while (*argv) {
--		int fd = open(*argv, flags);
-+		int fd = open(*argv, flags, 0666);
- 		if (fd < 0) {
- 			if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
- 				bb_perror_msg("%s: open", *argv);
--- 
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
deleted file mode 100644
index e3c5020..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Upstream-Status: Backport
-
-  http://busybox.net/downloads/fixes-1.24.1/
-  http://git.busybox.net/busybox/commit/?id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
-  http://git.busybox.net/busybox/commit/?h=1_24_stable&id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 092fabcf1df5d46cd22be4ffcd3b871f6180eb9c Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 30 Oct 2015 23:41:53 +0100
-Subject: [PATCH] [g]unzip: fix recent breakage.
-
-Also, do emit error message we so painstakingly pass from gzip internals
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-(cherry picked from commit 6bd3fff51aa74e2ee2d87887b12182a3b09792ef)
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
- testsuite/unzip.tests                   |  1 +
- 2 files changed, 22 insertions(+), 12 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index c76fd31..357c9bf 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 	huft_t *q;              /* points to current table */
- 	huft_t r;               /* table entry for structure assignment */
- 	huft_t *u[BMAX];        /* table stack */
--	unsigned v[N_MAX];      /* values in order of bit length */
--	unsigned v_end;
-+	unsigned v[N_MAX + 1];  /* values in order of bit length. last v[] is never used */
- 	int ws[BMAX + 1];       /* bits decoded stack */
- 	int w;                  /* bits decoded */
- 	unsigned x[BMAX + 1];   /* bit offsets, then code stack */
-@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
- 		*xp++ = j;
- 	}
- 
--	/* Make a table of values in order of bit lengths */
-+	/* Make a table of values in order of bit lengths.
-+	 * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
-+	 * In particular, last v[i] is never filled and must not be accessed.
-+	 */
-+	memset(v, 0xff, sizeof(v));
- 	p = b;
- 	i = 0;
--	v_end = 0;
- 	do {
- 		j = *p++;
- 		if (j != 0) {
- 			v[x[j]++] = i;
--			v_end = x[j];
- 		}
- 	} while (++i < n);
- 
-@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
- 			/* set up table entry in r */
- 			r.b = (unsigned char) (k - w);
--			if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
-+			if (/*p >= v + n || -- redundant, caught by the second check: */
-+			    *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
-+			) {
- 				r.e = 99; /* out of values--invalid code */
- 			} else if (*p < s) {
- 				r.e = (unsigned char) (*p < 256 ? 16 : 15);	/* 256 is EOB code */
-@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- 		e = t->e;
- 		if (e > 16)
- 			do {
--				if (e == 99)
--					abort_unzip(PASS_STATE_ONLY);;
-+				if (e == 99) {
-+					abort_unzip(PASS_STATE_ONLY);
-+				}
- 				bb >>= t->b;
- 				k -= t->b;
- 				e -= 16;
-@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- 			e = t->e;
- 			if (e > 16)
- 				do {
--					if (e == 99)
-+					if (e == 99) {
- 						abort_unzip(PASS_STATE_ONLY);
-+					}
- 					bb >>= t->b;
- 					k -= t->b;
- 					e -= 16;
-@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
- 
- 		b_dynamic >>= 4;
- 		k_dynamic -= 4;
--		if (nl > 286 || nd > 30)
-+		if (nl > 286 || nd > 30) {
- 			abort_unzip(PASS_STATE_ONLY);	/* bad lengths */
-+		}
- 
- 		/* read in bit-length-code lengths */
- 		for (j = 0; j < nb; j++) {
-@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
- 		bl = lbits;
- 
- 		i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
--		if (i != 0)
-+		if (i != 0) {
- 			abort_unzip(PASS_STATE_ONLY);
-+		}
- 		bd = dbits;
- 		i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
--		if (i != 0)
-+		if (i != 0) {
- 			abort_unzip(PASS_STATE_ONLY);
-+		}
- 
- 		/* set up data for inflate_codes() */
- 		inflate_codes_setup(PASS_STATE bl, bd);
-@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
- 	error_msg = "corrupted data";
- 	if (setjmp(error_jmp)) {
- 		/* Error from deep inside zip machinery */
-+		bb_error_msg(error_msg);
- 		n = -1;
- 		goto ret;
- 	}
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index ca0a458..d8738a3 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -34,6 +34,7 @@ rm foo.zip
- testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
- "Archive:  bad.zip
-   inflating: ]3j½r«IK-%Ix
-+unzip: corrupted data
- unzip: inflate error
- 1
- " \
--- 
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
deleted file mode 100644
index 7186726..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Upstream-Status: Backport
-
-  http://busybox.net/downloads/fixes-1.24.1/
-  http://git.busybox.net/busybox/commit/?id=1de25a6e87e0e627aa34298105a3d17c60a1f44e
-  http://git.busybox.net/busybox/commit/?h=1_24_stable&id=6767af17f11144c7cd3cfe9ef799d7f89a78fe65
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Mon, 26 Oct 2015 19:33:05 +0100
-Subject: [PATCH] unzip: test for bad archive SEGVing
-
-function                                             old     new   delta
-huft_build                                          1296    1300      +4
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- archival/libarchive/decompress_gunzip.c | 11 +++++++----
- testsuite/unzip.tests                   | 23 ++++++++++++++++++++++-
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index 7b6f459..30bf451 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned n,
- 	unsigned i;             /* counter, current code */
- 	unsigned j;             /* counter */
- 	int k;                  /* number of bits in current code */
--	unsigned *p;            /* pointer into c[], b[], or v[] */
-+	const unsigned *p;      /* pointer into c[], b[], or v[] */
- 	huft_t *q;              /* points to current table */
- 	huft_t r;               /* table entry for structure assignment */
- 	huft_t *u[BMAX];        /* table stack */
- 	unsigned v[N_MAX];      /* values in order of bit length */
-+	unsigned v_end;
- 	int ws[BMAX + 1];       /* bits decoded stack */
- 	int w;                  /* bits decoded */
- 	unsigned x[BMAX + 1];   /* bit offsets, then code stack */
-@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
- 	/* Generate counts for each bit length */
- 	memset(c, 0, sizeof(c));
--	p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
-+	p = b;
- 	i = n;
- 	do {
- 		c[*p]++; /* assume all entries <= BMAX */
-@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned n,
- 	}
- 
- 	/* Make a table of values in order of bit lengths */
--	p = (unsigned *) b;
-+	p = b;
- 	i = 0;
-+	v_end = 0;
- 	do {
- 		j = *p++;
- 		if (j != 0) {
- 			v[x[j]++] = i;
-+			v_end = x[j];
- 		}
- 	} while (++i < n);
- 
-@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
- 			/* set up table entry in r */
- 			r.b = (unsigned char) (k - w);
--			if (p >= v + n) {
-+			if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
- 				r.e = 99; /* out of values--invalid code */
- 			} else if (*p < s) {
- 				r.e = (unsigned char) (*p < 256 ? 16 : 15);	/* 256 is EOB code */
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index 8677a03..ca0a458 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -7,7 +7,7 @@
- 
- . ./testing.sh
- 
--# testing "test name" "options" "expected result" "file input" "stdin"
-+# testing "test name" "commands" "expected result" "file input" "stdin"
- #   file input will be file called "input"
- #   test can create a file "actual" instead of writing to stdout
- 
-@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f
- rmdir foo
- rm foo.zip
- 
-+# File containing some damaged encrypted stream
-+testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
-+"Archive:  bad.zip
-+  inflating: ]3j½r«IK-%Ix
-+unzip: inflate error
-+1
-+" \
-+"" "\
-+begin-base64 644 bad.zip
-+UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
-+eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
-+AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
-+oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
-+JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
-+BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
-+NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
-+====
-+"
-+
-+rm *
-+
- # Clean up scratch directory.
- 
- cd ..
--- 
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch
new file mode 100644
index 0000000..fc19ee3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-CVE-2017-16544.patch
@@ -0,0 +1,43 @@
+From c3797d40a1c57352192c6106cc0f435e7d9c11e8 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Tue, 7 Nov 2017 18:09:29 +0100
+Subject: lineedit: do not tab-complete any strings which have control
+ characters
+
+function                                             old     new   delta
+add_match                                             41      68     +27
+
+CVE: CVE-2017-16544
+Upstream-Status: Backport
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+---
+ libbb/lineedit.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/libbb/lineedit.c b/libbb/lineedit.c
+index c0e35bb..56e8140 100644
+--- a/libbb/lineedit.c
++++ b/libbb/lineedit.c
+@@ -645,6 +645,18 @@ static void free_tab_completion_data(void)
+ 
+ static void add_match(char *matched)
+ {
++	unsigned char *p = (unsigned char*)matched;
++	while (*p) {
++		/* ESC attack fix: drop any string with control chars */
++		if (*p < ' '
++		 || (!ENABLE_UNICODE_SUPPORT && *p >= 0x7f)
++		 || (ENABLE_UNICODE_SUPPORT && *p == 0x7f)
++		) {
++			free(matched);
++			return;
++		}
++		p++;
++	}
+ 	matches = xrealloc_vector(matches, 4, num_matches);
+ 	matches[num_matches] = matched;
+ 	num_matches++;
+-- 
+cgit v0.12
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
index bda8685..6faca22 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -33,7 +33,7 @@
  scripts/kconfig/lxdialog/Makefile          |    2 +-
  scripts/kconfig/lxdialog/check-lxdialog.sh |    8 ++++++++
  2 files changed, 9 insertions(+), 1 deletion(-)
-
+ 
 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh
 +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
 @@ -4,6 +4,10 @@
@@ -44,10 +44,10 @@
 +		echo "$CROSS_CURSES_LIB"
 +		exit
 +	fi
- 	for ext in so a dylib ; do
- 		for lib in ncursesw ncurses curses ; do
- 			$cc -print-file-name=lib${lib}.${ext} | grep -q /
-@@ -19,6 +23,10 @@ ldflags()
+ 	pkg-config --libs ncursesw 2>/dev/null && exit
+ 	pkg-config --libs ncurses 2>/dev/null && exit
+ 	for ext in so a dll.a dylib ; do
+@@ -21,6 +25,10 @@
  # Where is ncurses.h?
  ccflags()
  {
@@ -55,12 +55,12 @@
 +		echo "$CROSS_CURSES_INC"
 +		exit
 +	fi
- 	if [ -f /usr/include/ncursesw/ncurses.h ]; then
- 		echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
- 	elif [ -f /usr/include/ncursesw/curses.h ]; then
+ 	if pkg-config --cflags ncursesw 2>/dev/null; then
+ 		echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+ 	elif pkg-config --cflags ncurses 2>/dev/null; then
 --- a/scripts/kconfig/lxdialog/Makefile
 +++ b/scripts/kconfig/lxdialog/Makefile
-@@ -5,7 +5,7 @@ check-lxdialog  := $(srctree)/$(src)/che
+@@ -5,7 +5,7 @@
  
  # Use reursively expanded variables so we do not call gcc unless
  # we really need to do so. (Do not call gcc as part of make mrproper)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
deleted file mode 100644
index 38302e0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
-  http://git.busybox.net/busybox/commit/?id=d8e61bbf13d0cf38d477255cfd5dc71c5d51d575
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 21 Aug 2016 22:00:20 +0200
-Subject: build system: different fix for
- include/applet_tables.h/include/NUM_APPLETS.h
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index 5cc1827..3aedbbf 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
- 
- applets/applet_tables: .config include/applets.h
- applets/usage:         .config include/applets.h
--applets/usage_pod:     .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-+applets/usage_pod:     .config include/applets.h include/applet_tables.h
- 
- quiet_cmd_gen_usage_compressed = GEN     include/usage_compressed.h
-       cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -37,8 +37,21 @@ quiet_cmd_gen_usage_compressed = GEN     include/usage_compressed.h
- include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
- 	$(call cmd,gen_usage_compressed)
- 
--quiet_cmd_gen_applet_tables = GEN     include/applet_tables.h
-+quiet_cmd_gen_applet_tables = GEN     include/applet_tables.h include/NUM_APPLETS.h
-       cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
- 
--include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
-+include/NUM_APPLETS.h: applets/applet_tables
-+	$(call cmd,gen_applet_tables)
-+
-+# In fact, include/applet_tables.h depends only on applets/applet_tables,
-+# and is generated by it. But specifying only it can run
-+# applets/applet_tables twice, possibly in parallel.
-+# We say that it also needs NUM_APPLETS.h
-+#
-+# Unfortunately, we need to list the same command,
-+# and it can be executed twice (sequentially).
-+# The alternative is to not list any command,
-+# and then if include/applet_tables.h is deleted, it won't be rebuilt.
-+#
-+include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
- 	$(call cmd,gen_applet_tables)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch
deleted file mode 100644
index 0c3c9c0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From f94412f6bb49136694c5478d0aecb19118d1b08d Mon Sep 17 00:00:00 2001
-From: Ming Liu <peter.x.liu@external.atlascopco.com>
-Date: Wed, 31 May 2017 11:48:09 +0200
-Subject: [PATCH] tar: add IF_FEATURE_* checks
-
-A following linking error was observed:
-| ==========
-| archival/lib.a(tar.o): In function `tar_main':
-| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
-| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
-| ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined
-| ld: final link failed: Bad value
-
-this happened with clang compiler, with the following configs:
-| CONFIG_TAR=y
-| # CONFIG_FEATURE_SEAMLESS_Z is not set
-
-which can be fixed by adding IF_FEATURE_* checks in.
-
-Upstream-Status: Pending [ Sent to busybox upstream on 2017-06-02 ]
-
-Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
----
- archival/tar.c | 25 +++++++++++++++----------
- 1 file changed, 15 insertions(+), 10 deletions(-)
-
-diff --git a/archival/tar.c b/archival/tar.c
-index b70e00a..7598b71 100644
---- a/archival/tar.c
-+++ b/archival/tar.c
-@@ -1216,21 +1216,26 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
- 		USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_state_t *xstate);)
- 		USE_FOR_NOMMU(const char *xformer_prog;)
- 
--		if (opt & OPT_COMPRESS)
--			USE_FOR_MMU(xformer = unpack_Z_stream;)
-+		if (opt & OPT_COMPRESS) {
-+			USE_FOR_MMU(IF_FEATURE_SEAMLESS_Z(xformer = unpack_Z_stream;))
- 			USE_FOR_NOMMU(xformer_prog = "uncompress";)
--		if (opt & OPT_GZIP)
--			USE_FOR_MMU(xformer = unpack_gz_stream;)
-+		}
-+		if (opt & OPT_GZIP) {
-+			USE_FOR_MMU(IF_FEATURE_SEAMLESS_GZ(xformer = unpack_gz_stream;))
- 			USE_FOR_NOMMU(xformer_prog = "gunzip";)
--		if (opt & OPT_BZIP2)
--			USE_FOR_MMU(xformer = unpack_bz2_stream;)
-+		}
-+		if (opt & OPT_BZIP2) {
-+			USE_FOR_MMU(IF_FEATURE_SEAMLESS_BZ2(xformer = unpack_bz2_stream;))
- 			USE_FOR_NOMMU(xformer_prog = "bunzip2";)
--		if (opt & OPT_LZMA)
--			USE_FOR_MMU(xformer = unpack_lzma_stream;)
-+		}
-+		if (opt & OPT_LZMA) {
-+			USE_FOR_MMU(IF_FEATURE_SEAMLESS_LZMA(xformer = unpack_lzma_stream;))
- 			USE_FOR_NOMMU(xformer_prog = "unlzma";)
--		if (opt & OPT_XZ)
--			USE_FOR_MMU(xformer = unpack_xz_stream;)
-+		}
-+		if (opt & OPT_XZ) {
-+			USE_FOR_MMU(IF_FEATURE_SEAMLESS_XZ(xformer = unpack_xz_stream;))
- 			USE_FOR_NOMMU(xformer_prog = "unxz";)
-+		}
- 
- 		fork_transformer_with_sig(tar_handle->src_fd, xformer, xformer_prog);
- 		/* Can't lseek over pipes */
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
index 4c9ce3b..582a258 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -28,24 +28,23 @@
 
 Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
 ---
- networking/udhcp/dhcpc.c |   29 +++++++++++++++++++++--------
- 1 files changed, 21 insertions(+), 8 deletions(-)
+ networking/udhcp/dhcpc.c                       | 29 ++++++++++++++++------
+ 1 file changed, 21 insertions(+), 8 deletions(-)
 
-Index: busybox-1.20.2/networking/udhcp/dhcpc.c
+Index: busybox-1.27.2/networking/udhcp/dhcpc.c
 ===================================================================
---- busybox-1.20.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.20.2/networking/udhcp/dhcpc.c
-@@ -29,6 +29,9 @@
- #include <netpacket/packet.h>
- #include <linux/filter.h>
+--- busybox-1.27.2.orig/networking/udhcp/dhcpc.c
++++ busybox-1.27.2/networking/udhcp/dhcpc.c
+@@ -49,6 +49,8 @@ struct tpacket_auxdata {
+ };
+ #endif
  
 +/* option whether to down the interface when reconfiguring */
 +static int allow_deconfig = 1;
-+
+ 
  /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
  
- 
-@@ -81,8 +84,9 @@ enum {
+@@ -104,8 +106,9 @@ enum {
  	OPT_x = 1 << 18,
  	OPT_f = 1 << 19,
  	OPT_B = 1 << 20,
@@ -56,7 +55,7 @@
  	USE_FOR_MMU(             OPTBIT_b,)
  	IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
  	IF_FEATURE_UDHCP_PORT(   OPTBIT_P,)
-@@ -1040,7 +1044,8 @@ static void perform_renew(void)
+@@ -1110,7 +1113,8 @@ static void perform_renew(void)
  		state = RENEW_REQUESTED;
  		break;
  	case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
@@ -66,36 +65,37 @@
  	case REQUESTING:
  	case RELEASED:
  		change_listen_mode(LISTEN_RAW);
-@@ -1064,7 +1069,8 @@ static void perform_release(uint32_t ser
- 		bb_info_msg("Unicasting a release of %s to %s",
- 				inet_ntoa(temp_addr), buffer);
- 		send_release(server_addr, requested_ip); /* unicast */
--		udhcp_run_script(NULL, "deconfig");
-+		if (allow_deconfig)
-+			udhcp_run_script(NULL, "deconfig");
- 	}
- 	bb_info_msg("Entering released state");
+@@ -1146,7 +1150,8 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
+  * Users requested to be notified in all cases, even if not in one
+  * of the states above.
+  */
+-	udhcp_run_script(NULL, "deconfig");
++	if (allow_deconfig)
++		udhcp_run_script(NULL, "deconfig");
  
-@@ -1215,7 +1221,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+ 	change_listen_mode(LISTEN_NONE);
+ 	state = RELEASED;
+@@ -1298,7 +1303,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  	/* O,x: list; -T,-t,-A take numeric param */
- 	opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ;
+ 	IF_UDHCP_VERBOSE(opt_complementary = "vv";)
  	IF_LONG_OPTS(applet_long_options = udhcpc_longopts;)
--	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fB"
-+	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fBD"
+-	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
++	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
  		USE_FOR_MMU("b")
- 		IF_FEATURE_UDHCPC_ARPING("a")
+ 		IF_FEATURE_UDHCPC_ARPING("a::")
  		IF_FEATURE_UDHCP_PORT("P:")
-@@ -1316,6 +1322,9 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1409,6 +1414,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  		logmode |= LOGMODE_SYSLOG;
  	}
  
-+	if (opt & OPT_D)
++	if (opt & OPT_D) {
 +		allow_deconfig = 0;
++	}
 +
  	/* Make sure fd 0,1,2 are open */
  	bb_sanitize_stdio();
  	/* Equivalent of doing a fflush after every \n */
-@@ -1330,7 +1339,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1423,7 +1432,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  	srand(monotonic_us());
  
  	state = INIT_SELECTING;
@@ -105,17 +105,17 @@
  	change_listen_mode(LISTEN_RAW);
  	packet_num = 0;
  	timeout = 0;
-@@ -1484,7 +1494,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1577,7 +1587,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  				}
  				/* Timed out, enter init state */
- 				bb_info_msg("Lease lost, entering init state");
+ 				bb_error_msg("lease lost, entering init state");
 -				udhcp_run_script(NULL, "deconfig");
 +				if (allow_deconfig)
 +					udhcp_run_script(NULL, "deconfig");
  				state = INIT_SELECTING;
  				client_config.first_secs = 0; /* make secs field count from 0 */
  				/*timeout = 0; - already is */
-@@ -1667,7 +1678,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1770,7 +1781,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  						send_decline(/*xid,*/ server_addr, packet.yiaddr);
  
  						if (state != REQUESTING)
@@ -125,8 +125,8 @@
  						change_listen_mode(LISTEN_RAW);
  						state = INIT_SELECTING;
  						client_config.first_secs = 0; /* make secs field count from 0 */
-@@ -1711,7 +1723,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
- 				bb_info_msg("Received DHCP NAK");
+@@ -1840,7 +1852,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
+ 				bb_error_msg("received %s", "DHCP NAK");
  				udhcp_run_script(&packet, "nak");
  				if (state != REQUESTING)
 -					udhcp_run_script(NULL, "deconfig");
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
deleted file mode 100644
index 7f80a1d..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
-  http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Tue, 23 Aug 2016 20:21:36 +0200
-Subject: build system: always rewrite NUM_APPLETS.h
-
-Conditional rewrite can keep NUM_APPLETS.h mtime old,
-this causes make to try to regenerate it at every invocation.
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/applet_tables.c b/applets/applet_tables.c
-index 8401a15..ef911a4 100644
---- a/applets/applet_tables.c
-+++ b/applets/applet_tables.c
-@@ -192,27 +192,28 @@ int main(int argc, char **argv)
- 	printf("};\n");
- #endif
- 	//printf("#endif /* SKIP_definitions */\n");
-+
- //	printf("\n");
- //	printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
- 
- 	if (argv[2]) {
--		char line_old[80];
--		char line_new[80];
- 		FILE *fp;
-+		char line_new[80];
-+//		char line_old[80];
- 
--		line_old[0] = 0;
--		fp = fopen(argv[2], "r");
--		if (fp) {
--			fgets(line_old, sizeof(line_old), fp);
--			fclose(fp);
--		}
- 		sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
--		if (strcmp(line_old, line_new) != 0) {
-+//		line_old[0] = 0;
-+//		fp = fopen(argv[2], "r");
-+//		if (fp) {
-+//			fgets(line_old, sizeof(line_old), fp);
-+//			fclose(fp);
-+//		}
-+//		if (strcmp(line_old, line_new) != 0) {
- 			fp = fopen(argv[2], "w");
- 			if (!fp)
- 				return 1;
- 			fputs(line_new, fp);
--		}
-+//		}
- 	}
- 
- 	return 0;
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
index cc68bea..fbb5fd8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
@@ -1,43 +1,25 @@
 #
 # Automatically generated make config: don't edit
-# Busybox version: 1.24.1
-# Tue Oct 31 11:00:00 2015
+# Busybox version: 1.27.2
+# Wed Sep 27 08:56:13 2017
 #
 CONFIG_HAVE_DOT_CONFIG=y
 
 #
 # Busybox Settings
 #
-
-#
-# General Configuration
-#
 # CONFIG_DESKTOP is not set
 # CONFIG_EXTRA_COMPAT is not set
+# CONFIG_FEDORA_COMPAT is not set
 # CONFIG_INCLUDE_SUSv2 is not set
 # CONFIG_USE_PORTABLE_CODE is not set
-CONFIG_PLATFORM_LINUX=y
-CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
-# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
-# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
 CONFIG_SHOW_USAGE=y
 # CONFIG_FEATURE_VERBOSE_USAGE is not set
 CONFIG_FEATURE_COMPRESS_USAGE=y
+CONFIG_BUSYBOX=y
 # CONFIG_FEATURE_INSTALLER is not set
 # CONFIG_INSTALL_NO_USR is not set
-# CONFIG_LOCALE_SUPPORT is not set
-# CONFIG_UNICODE_SUPPORT is not set
-# CONFIG_UNICODE_USING_LOCALE is not set
-# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
-CONFIG_SUBST_WCHAR=0
-CONFIG_LAST_SUPPORTED_WCHAR=0
-# CONFIG_UNICODE_COMBINING_WCHARS is not set
-# CONFIG_UNICODE_WIDE_WCHARS is not set
-# CONFIG_UNICODE_BIDI_SUPPORT is not set
-# CONFIG_UNICODE_NEUTRAL_TABLE is not set
-# CONFIG_UNICODE_PRESERVE_BROKEN is not set
 # CONFIG_PAM is not set
-CONFIG_FEATURE_USE_SENDFILE=y
 CONFIG_LONG_OPTS=y
 CONFIG_FEATURE_DEVPTS=y
 # CONFIG_FEATURE_CLEAN_UP is not set
@@ -53,6 +35,7 @@
 CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
 CONFIG_FEATURE_SYSLOG=y
 # CONFIG_FEATURE_HAVE_RPC is not set
+CONFIG_PLATFORM_LINUX=y
 
 #
 # Build Options
@@ -71,17 +54,6 @@
 CONFIG_EXTRA_LDLIBS=""
 
 #
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_DEBUG_PESSIMIZE is not set
-# CONFIG_UNIT_TEST is not set
-# CONFIG_WERROR is not set
-CONFIG_NO_DEBUG_LIB=y
-# CONFIG_DMALLOC is not set
-# CONFIG_EFENCE is not set
-
-#
 # Installation Options ("make install" behavior)
 #
 CONFIG_INSTALL_APPLET_SYMLINKS=y
@@ -94,16 +66,30 @@
 CONFIG_PREFIX="./_install"
 
 #
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_DEBUG_SANITIZE is not set
+# CONFIG_UNIT_TEST is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+
+#
 # Busybox Library Tuning
 #
-CONFIG_FEATURE_SYSTEMD=y
+# CONFIG_FEATURE_USE_BSS_TAIL is not set
 CONFIG_FEATURE_RTMINMAX=y
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
 CONFIG_PASSWORD_MINLEN=6
 CONFIG_MD5_SMALL=1
 CONFIG_SHA3_SMALL=1
 CONFIG_FEATURE_FAST_TOP=y
 # CONFIG_FEATURE_ETC_NETWORKS is not set
-CONFIG_FEATURE_USE_TERMIOS=y
 CONFIG_FEATURE_EDITING=y
 CONFIG_FEATURE_EDITING_MAX_LEN=1024
 # CONFIG_FEATURE_EDITING_VI is not set
@@ -115,8 +101,20 @@
 CONFIG_FEATURE_USERNAME_COMPLETION=y
 CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
 # CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
+# CONFIG_LOCALE_SUPPORT is not set
+# CONFIG_UNICODE_SUPPORT is not set
+# CONFIG_UNICODE_USING_LOCALE is not set
+# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
+CONFIG_SUBST_WCHAR=0
+CONFIG_LAST_SUPPORTED_WCHAR=0
+# CONFIG_UNICODE_COMBINING_WCHARS is not set
+# CONFIG_UNICODE_WIDE_WCHARS is not set
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
 CONFIG_FEATURE_NON_POSIX_CP=y
 # CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+CONFIG_FEATURE_USE_SENDFILE=y
 CONFIG_FEATURE_COPYBUF_KB=4
 CONFIG_FEATURE_SKIP_ROOTFS=y
 CONFIG_MONOTONIC_SYSCALL=y
@@ -140,76 +138,59 @@
 # CONFIG_FEATURE_AR_CREATE is not set
 # CONFIG_UNCOMPRESS is not set
 CONFIG_GUNZIP=y
+CONFIG_ZCAT=y
+CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y
 CONFIG_BUNZIP2=y
+CONFIG_BZCAT=y
 # CONFIG_UNLZMA is not set
-# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_LZCAT=y
 # CONFIG_LZMA is not set
+# CONFIG_FEATURE_LZMA_FAST is not set
 # CONFIG_UNXZ is not set
+CONFIG_XZCAT=y
 # CONFIG_XZ is not set
 # CONFIG_BZIP2 is not set
+CONFIG_FEATURE_BZIP2_DECOMPRESS=y
 CONFIG_CPIO=y
 # CONFIG_FEATURE_CPIO_O is not set
 # CONFIG_FEATURE_CPIO_P is not set
 # CONFIG_DPKG is not set
 # CONFIG_DPKG_DEB is not set
-# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
 CONFIG_GZIP=y
 # CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
 CONFIG_GZIP_FAST=0
 # CONFIG_FEATURE_GZIP_LEVELS is not set
+CONFIG_FEATURE_GZIP_DECOMPRESS=y
 # CONFIG_LZOP is not set
+# CONFIG_UNLZOP is not set
+# CONFIG_LZOPCAT is not set
 # CONFIG_LZOP_COMPR_HIGH is not set
 # CONFIG_RPM is not set
 # CONFIG_RPM2CPIO is not set
 CONFIG_TAR=y
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
 CONFIG_FEATURE_TAR_CREATE=y
 CONFIG_FEATURE_TAR_AUTODETECT=y
 CONFIG_FEATURE_TAR_FROM=y
 CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
 # CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
 CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
 # CONFIG_FEATURE_TAR_TO_COMMAND is not set
 # CONFIG_FEATURE_TAR_UNAME_GNAME is not set
 CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
 # CONFIG_FEATURE_TAR_SELINUX is not set
 CONFIG_UNZIP=y
+CONFIG_FEATURE_UNZIP_CDF=y
+# CONFIG_FEATURE_UNZIP_BZIP2 is not set
+# CONFIG_FEATURE_UNZIP_LZMA is not set
+# CONFIG_FEATURE_UNZIP_XZ is not set
 
 #
 # Coreutils
 #
 CONFIG_BASENAME=y
 CONFIG_CAT=y
-CONFIG_DATE=y
-# CONFIG_FEATURE_DATE_ISOFMT is not set
-# CONFIG_FEATURE_DATE_NANO is not set
-CONFIG_FEATURE_DATE_COMPAT=y
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
-# CONFIG_FEATURE_DD_IBS_OBS is not set
-# CONFIG_FEATURE_DD_STATUS is not set
-# CONFIG_HOSTID is not set
-CONFIG_ID=y
-CONFIG_GROUPS=y
-CONFIG_SHUF=y
-CONFIG_SYNC=y
-# CONFIG_FEATURE_SYNC_FANCY is not set
-CONFIG_TEST=y
-CONFIG_FEATURE_TEST_64=y
-CONFIG_TOUCH=y
-CONFIG_FEATURE_TOUCH_NODEREF=y
-CONFIG_FEATURE_TOUCH_SUSV3=y
-CONFIG_TR=y
-CONFIG_FEATURE_TR_CLASSES=y
-# CONFIG_FEATURE_TR_EQUIV is not set
-# CONFIG_TRUNCATE is not set
-CONFIG_UNLINK=y
-# CONFIG_BASE64 is not set
-CONFIG_WHO=y
-CONFIG_USERS=y
-# CONFIG_CAL is not set
-# CONFIG_CATV is not set
+# CONFIG_FEATURE_CATV is not set
 CONFIG_CHGRP=y
 CONFIG_CHMOD=y
 CONFIG_CHOWN=y
@@ -220,6 +201,15 @@
 CONFIG_CP=y
 # CONFIG_FEATURE_CP_LONG_OPTIONS is not set
 CONFIG_CUT=y
+CONFIG_DATE=y
+# CONFIG_FEATURE_DATE_ISOFMT is not set
+# CONFIG_FEATURE_DATE_NANO is not set
+CONFIG_FEATURE_DATE_COMPAT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+# CONFIG_FEATURE_DD_STATUS is not set
 CONFIG_DF=y
 # CONFIG_FEATURE_DF_FANCY is not set
 CONFIG_DIRNAME=y
@@ -233,36 +223,57 @@
 CONFIG_FEATURE_ENV_LONG_OPTIONS=y
 # CONFIG_EXPAND is not set
 # CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
+# CONFIG_UNEXPAND is not set
+# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
 CONFIG_EXPR=y
 CONFIG_EXPR_MATH_SUPPORT_64=y
+# CONFIG_FACTOR is not set
 CONFIG_FALSE=y
 # CONFIG_FOLD is not set
 # CONFIG_FSYNC is not set
 CONFIG_HEAD=y
 # CONFIG_FEATURE_FANCY_HEAD is not set
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+CONFIG_GROUPS=y
 # CONFIG_INSTALL is not set
 # CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+# CONFIG_LINK is not set
 CONFIG_LN=y
 CONFIG_LOGNAME=y
 CONFIG_LS=y
 CONFIG_FEATURE_LS_FILETYPES=y
 CONFIG_FEATURE_LS_FOLLOWLINKS=y
 CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_WIDTH=y
 CONFIG_FEATURE_LS_SORTFILES=y
 CONFIG_FEATURE_LS_TIMESTAMPS=y
 CONFIG_FEATURE_LS_USERNAME=y
 CONFIG_FEATURE_LS_COLOR=y
 # CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
 CONFIG_MD5SUM=y
+# CONFIG_SHA1SUM is not set
+# CONFIG_SHA256SUM is not set
+# CONFIG_SHA512SUM is not set
+# CONFIG_SHA3SUM is not set
+
+#
+# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
 CONFIG_MKDIR=y
 CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
 CONFIG_MKFIFO=y
 CONFIG_MKNOD=y
+CONFIG_MKTEMP=y
 CONFIG_MV=y
 # CONFIG_FEATURE_MV_LONG_OPTIONS is not set
 # CONFIG_NICE is not set
+# CONFIG_NL is not set
 CONFIG_NOHUP=y
+CONFIG_NPROC=y
 CONFIG_OD=y
+# CONFIG_PASTE is not set
 # CONFIG_PRINTENV is not set
 CONFIG_PRINTF=y
 CONFIG_PWD=y
@@ -273,10 +284,8 @@
 CONFIG_RMDIR=y
 # CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
 CONFIG_SEQ=y
-# CONFIG_SHA1SUM is not set
-# CONFIG_SHA256SUM is not set
-# CONFIG_SHA512SUM is not set
-# CONFIG_SHA3SUM is not set
+# CONFIG_SHRED is not set
+CONFIG_SHUF=y
 CONFIG_SLEEP=y
 CONFIG_FEATURE_FANCY_SLEEP=y
 CONFIG_FEATURE_FLOAT_SLEEP=y
@@ -286,25 +295,43 @@
 # CONFIG_FEATURE_SPLIT_FANCY is not set
 CONFIG_STAT=y
 CONFIG_FEATURE_STAT_FORMAT=y
+CONFIG_FEATURE_STAT_FILESYSTEM=y
 CONFIG_STTY=y
 # CONFIG_SUM is not set
+CONFIG_SYNC=y
+# CONFIG_FEATURE_SYNC_FANCY is not set
 # CONFIG_TAC is not set
 CONFIG_TAIL=y
 CONFIG_FEATURE_FANCY_TAIL=y
 CONFIG_TEE=y
 # CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+CONFIG_TEST=y
+CONFIG_TEST1=y
+CONFIG_TEST2=y
+CONFIG_FEATURE_TEST_64=y
+# CONFIG_TIMEOUT is not set
+CONFIG_TOUCH=y
+CONFIG_FEATURE_TOUCH_NODEREF=y
+CONFIG_FEATURE_TOUCH_SUSV3=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+# CONFIG_FEATURE_TR_EQUIV is not set
 CONFIG_TRUE=y
+# CONFIG_TRUNCATE is not set
 CONFIG_TTY=y
 CONFIG_UNAME=y
 CONFIG_UNAME_OSNAME="GNU/Linux"
-# CONFIG_UNEXPAND is not set
-# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
 CONFIG_UNIQ=y
+CONFIG_UNLINK=y
 CONFIG_USLEEP=y
 # CONFIG_UUDECODE is not set
+# CONFIG_BASE64 is not set
 # CONFIG_UUENCODE is not set
 CONFIG_WC=y
 # CONFIG_FEATURE_WC_LARGE is not set
+CONFIG_WHO=y
+# CONFIG_W is not set
+CONFIG_USERS=y
 CONFIG_WHOAMI=y
 CONFIG_YES=y
 
@@ -319,30 +346,29 @@
 # CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
 
 #
-# Common options for ls, more and telnet
-#
-CONFIG_FEATURE_AUTOWIDTH=y
-
-#
 # Common options for df, du, ls
 #
 CONFIG_FEATURE_HUMAN_READABLE=y
 
 #
-# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
-#
-CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
 # Console Utilities
 #
 CONFIG_CHVT=y
-# CONFIG_FGCONSOLE is not set
 CONFIG_CLEAR=y
 CONFIG_DEALLOCVT=y
 CONFIG_DUMPKMAP=y
+# CONFIG_FGCONSOLE is not set
 # CONFIG_KBD_MODE is not set
 CONFIG_LOADFONT=y
+# CONFIG_SETFONT is not set
+# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
+CONFIG_DEFAULT_SETFONT_DIR=""
+
+#
+# Common options for loadfont and setfont
+#
+# CONFIG_FEATURE_LOADFONT_PSF2 is not set
+# CONFIG_FEATURE_LOADFONT_RAW is not set
 CONFIG_LOADKMAP=y
 CONFIG_OPENVT=y
 CONFIG_RESET=y
@@ -350,30 +376,20 @@
 # CONFIG_FEATURE_RESIZE_PRINT is not set
 CONFIG_SETCONSOLE=y
 # CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
-# CONFIG_SETFONT is not set
-# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
-CONFIG_DEFAULT_SETFONT_DIR=""
 # CONFIG_SETKEYCODES is not set
 # CONFIG_SETLOGCONS is not set
 # CONFIG_SHOWKEY is not set
 
 #
-# Common options for loadfont and setfont
-#
-# CONFIG_FEATURE_LOADFONT_PSF2 is not set
-# CONFIG_FEATURE_LOADFONT_RAW is not set
-
-#
 # Debian Utilities
 #
-CONFIG_MKTEMP=y
 # CONFIG_PIPE_PROGRESS is not set
 CONFIG_RUN_PARTS=y
 CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
 # CONFIG_FEATURE_RUN_PARTS_FANCY is not set
 CONFIG_START_STOP_DAEMON=y
-CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
 CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
 CONFIG_WHICH=y
 
 #
@@ -436,8 +452,8 @@
 # CONFIG_FEATURE_FIND_CONTEXT is not set
 # CONFIG_FEATURE_FIND_LINKS is not set
 CONFIG_GREP=y
-CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_EGREP=y
+CONFIG_FGREP=y
 CONFIG_FEATURE_GREP_CONTEXT=y
 CONFIG_XARGS=y
 # CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
@@ -453,40 +469,45 @@
 # CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
 # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
 CONFIG_HALT=y
+CONFIG_POWEROFF=y
+CONFIG_REBOOT=y
 # CONFIG_FEATURE_CALL_TELINIT is not set
 CONFIG_TELINIT_PATH=""
 # CONFIG_INIT is not set
+# CONFIG_LINUXRC is not set
 # CONFIG_FEATURE_USE_INITTAB is not set
 # CONFIG_FEATURE_KILL_REMOVED is not set
 CONFIG_FEATURE_KILL_DELAY=0
 # CONFIG_FEATURE_INIT_SCTTY is not set
 # CONFIG_FEATURE_INIT_SYSLOG is not set
-# CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_FEATURE_INIT_QUIET is not set
 # CONFIG_FEATURE_INIT_COREDUMPS is not set
-# CONFIG_FEATURE_INITRD is not set
 CONFIG_INIT_TERMINAL_TYPE=""
-CONFIG_MESG=y
-# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set
 
 #
 # Login/Password Management Utilities
 #
-# CONFIG_ADD_SHELL is not set
-# CONFIG_REMOVE_SHELL is not set
 # CONFIG_FEATURE_SHADOWPASSWDS is not set
 # CONFIG_USE_BB_PWD_GRP is not set
 # CONFIG_USE_BB_SHADOW is not set
 CONFIG_USE_BB_CRYPT=y
 # CONFIG_USE_BB_CRYPT_SHA is not set
+# CONFIG_ADD_SHELL is not set
+# CONFIG_REMOVE_SHELL is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
 # CONFIG_ADDUSER is not set
 # CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
 # CONFIG_FEATURE_CHECK_NAMES is not set
 CONFIG_LAST_ID=60000
 CONFIG_FIRST_SYSTEM_ID=100
 CONFIG_LAST_SYSTEM_ID=999
-# CONFIG_ADDGROUP is not set
-# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
-# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_CHPASSWD is not set
+CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
+# CONFIG_CRYPTPW is not set
+# CONFIG_MKPASSWD is not set
 # CONFIG_DELUSER is not set
 # CONFIG_DELGROUP is not set
 # CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
@@ -498,12 +519,10 @@
 # CONFIG_FEATURE_SECURETTY is not set
 # CONFIG_PASSWD is not set
 # CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
-# CONFIG_CRYPTPW is not set
-# CONFIG_CHPASSWD is not set
-CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
 # CONFIG_SU is not set
 # CONFIG_FEATURE_SU_SYSLOG is not set
 # CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set
 # CONFIG_SULOGIN is not set
 # CONFIG_VLOCK is not set
 
@@ -518,29 +537,29 @@
 #
 # Linux Module Utilities
 #
-# CONFIG_MODINFO is not set
 # CONFIG_MODPROBE_SMALL is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
-# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
+CONFIG_DEPMOD=y
 CONFIG_INSMOD=y
-CONFIG_RMMOD=y
 CONFIG_LSMOD=y
 # CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+# CONFIG_MODINFO is not set
 CONFIG_MODPROBE=y
 # CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
-CONFIG_DEPMOD=y
+CONFIG_RMMOD=y
 
 #
 # Options common to multiple modutils
 #
+CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS=y
+# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
 # CONFIG_FEATURE_2_4_MODULES is not set
-# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
 # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
 # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
 # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
 # CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
 # CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
 CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
 CONFIG_FEATURE_MODUTILS_ALIAS=y
 CONFIG_FEATURE_MODUTILS_SYMBOLS=y
 CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
@@ -549,15 +568,71 @@
 #
 # Linux System Utilities
 #
+# CONFIG_ACPID is not set
+# CONFIG_FEATURE_ACPID_COMPAT is not set
+# CONFIG_BLKDISCARD is not set
+# CONFIG_BLKID is not set
+# CONFIG_FEATURE_BLKID_TYPE is not set
 # CONFIG_BLOCKDEV is not set
+# CONFIG_CAL is not set
+CONFIG_DMESG=y
+CONFIG_FEATURE_DMESG_PRETTY=y
+# CONFIG_FALLOCATE is not set
 # CONFIG_FATATTR is not set
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+# CONFIG_FDFORMAT is not set
+CONFIG_FDISK=y
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+# CONFIG_FEATURE_OSF_LABEL is not set
+# CONFIG_FEATURE_GPT_LABEL is not set
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+# CONFIG_FINDFS is not set
+CONFIG_FLOCK=y
+# CONFIG_FDFLUSH is not set
+# CONFIG_FREERAMDISK is not set
+# CONFIG_FSCK_MINIX is not set
+# CONFIG_FSFREEZE is not set
 CONFIG_FSTRIM=y
+# CONFIG_GETOPT is not set
+# CONFIG_FEATURE_GETOPT_LONG is not set
+CONFIG_HEXDUMP=y
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+# CONFIG_HD is not set
+# CONFIG_XXD is not set
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
+CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+# CONFIG_IPCRM is not set
+# CONFIG_IPCS is not set
+# CONFIG_LAST is not set
+# CONFIG_FEATURE_LAST_FANCY is not set
+CONFIG_LOSETUP=y
+# CONFIG_LSPCI is not set
+# CONFIG_LSUSB is not set
 # CONFIG_MDEV is not set
 # CONFIG_FEATURE_MDEV_CONF is not set
 # CONFIG_FEATURE_MDEV_RENAME is not set
 # CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
 # CONFIG_FEATURE_MDEV_EXEC is not set
 # CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
+CONFIG_MESG=y
+# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
+# CONFIG_MKE2FS is not set
+# CONFIG_MKFS_EXT2 is not set
+# CONFIG_MKFS_MINIX is not set
+# CONFIG_FEATURE_MINIX2 is not set
+# CONFIG_MKFS_REISER is not set
+# CONFIG_MKDOSFS is not set
+# CONFIG_MKFS_VFAT is not set
+CONFIG_MKSWAP=y
+# CONFIG_FEATURE_MKSWAP_UUID is not set
+CONFIG_MORE=y
 CONFIG_MOUNT=y
 # CONFIG_FEATURE_MOUNT_FAKE is not set
 # CONFIG_FEATURE_MOUNT_VERBOSE is not set
@@ -568,67 +643,33 @@
 CONFIG_FEATURE_MOUNT_FLAGS=y
 CONFIG_FEATURE_MOUNT_FSTAB=y
 # CONFIG_FEATURE_MOUNT_OTHERTAB is not set
-# CONFIG_REV is not set
-# CONFIG_UEVENT is not set
-# CONFIG_ACPID is not set
-# CONFIG_FEATURE_ACPID_COMPAT is not set
-# CONFIG_BLKID is not set
-# CONFIG_FEATURE_BLKID_TYPE is not set
-CONFIG_DMESG=y
-CONFIG_FEATURE_DMESG_PRETTY=y
-CONFIG_FBSET=y
-CONFIG_FEATURE_FBSET_FANCY=y
-CONFIG_FEATURE_FBSET_READMODE=y
-# CONFIG_FDFLUSH is not set
-# CONFIG_FDFORMAT is not set
-CONFIG_FDISK=y
-CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
-CONFIG_FEATURE_FDISK_WRITABLE=y
-# CONFIG_FEATURE_AIX_LABEL is not set
-# CONFIG_FEATURE_SGI_LABEL is not set
-# CONFIG_FEATURE_SUN_LABEL is not set
-# CONFIG_FEATURE_OSF_LABEL is not set
-# CONFIG_FEATURE_GPT_LABEL is not set
-# CONFIG_FEATURE_FDISK_ADVANCED is not set
-# CONFIG_FINDFS is not set
-CONFIG_FLOCK=y
-# CONFIG_FREERAMDISK is not set
-# CONFIG_FSCK_MINIX is not set
-# CONFIG_MKFS_EXT2 is not set
-# CONFIG_MKFS_MINIX is not set
-# CONFIG_FEATURE_MINIX2 is not set
-# CONFIG_MKFS_REISER is not set
-# CONFIG_MKFS_VFAT is not set
-# CONFIG_GETOPT is not set
-# CONFIG_FEATURE_GETOPT_LONG is not set
-CONFIG_HEXDUMP=y
-# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
-# CONFIG_HD is not set
-CONFIG_HWCLOCK=y
-CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
-CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
-# CONFIG_IPCRM is not set
-# CONFIG_IPCS is not set
-CONFIG_LOSETUP=y
-# CONFIG_LSPCI is not set
-# CONFIG_LSUSB is not set
-CONFIG_MKSWAP=y
-# CONFIG_FEATURE_MKSWAP_UUID is not set
-CONFIG_MORE=y
+# CONFIG_NSENTER is not set
+# CONFIG_FEATURE_NSENTER_LONG_OPTS is not set
 CONFIG_PIVOT_ROOT=y
 CONFIG_RDATE=y
 # CONFIG_RDEV is not set
 # CONFIG_READPROFILE is not set
+CONFIG_RENICE=y
+# CONFIG_REV is not set
 # CONFIG_RTCWAKE is not set
 # CONFIG_SCRIPT is not set
 # CONFIG_SCRIPTREPLAY is not set
 # CONFIG_SETARCH is not set
-CONFIG_SWAPONOFF=y
+# CONFIG_LINUX32 is not set
+# CONFIG_LINUX64 is not set
+# CONFIG_SETPRIV is not set
+CONFIG_SWAPON=y
 CONFIG_FEATURE_SWAPON_DISCARD=y
 CONFIG_FEATURE_SWAPON_PRI=y
+CONFIG_SWAPOFF=y
 CONFIG_SWITCH_ROOT=y
+# CONFIG_TASKSET is not set
+# CONFIG_FEATURE_TASKSET_FANCY is not set
+# CONFIG_UEVENT is not set
 CONFIG_UMOUNT=y
 CONFIG_FEATURE_UMOUNT_ALL=y
+# CONFIG_UNSHARE is not set
+# CONFIG_WALL is not set
 
 #
 # Common options for mount/umount
@@ -637,6 +678,7 @@
 CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
 # CONFIG_FEATURE_MTAB_SUPPORT is not set
 # CONFIG_VOLUMEID is not set
+# CONFIG_FEATURE_VOLUMEID_BCACHE is not set
 # CONFIG_FEATURE_VOLUMEID_BTRFS is not set
 # CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
 # CONFIG_FEATURE_VOLUMEID_EXFAT is not set
@@ -656,17 +698,33 @@
 # CONFIG_FEATURE_VOLUMEID_ROMFS is not set
 # CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set
 # CONFIG_FEATURE_VOLUMEID_SYSV is not set
+# CONFIG_FEATURE_VOLUMEID_UBIFS is not set
 # CONFIG_FEATURE_VOLUMEID_UDF is not set
 # CONFIG_FEATURE_VOLUMEID_XFS is not set
 
 #
 # Miscellaneous Utilities
 #
+# CONFIG_BEEP is not set
+CONFIG_FEATURE_BEEP_FREQ=0
+CONFIG_FEATURE_BEEP_LENGTH_MS=0
 # CONFIG_CONSPY is not set
 # CONFIG_CROND is not set
 # CONFIG_FEATURE_CROND_D is not set
 # CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
 CONFIG_FEATURE_CROND_DIR=""
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+# CONFIG_HDPARM is not set
+# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
+# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
+# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
 # CONFIG_I2CGET is not set
 # CONFIG_I2CSET is not set
 # CONFIG_I2CDUMP is not set
@@ -682,19 +740,19 @@
 # CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
 # CONFIG_FEATURE_LESS_DASHCMD is not set
 # CONFIG_FEATURE_LESS_LINENUMS is not set
+# CONFIG_LSSCSI is not set
 # CONFIG_NANDWRITE is not set
 # CONFIG_NANDDUMP is not set
+# CONFIG_PARTPROBE is not set
 CONFIG_RFKILL=y
 # CONFIG_SETSERIAL is not set
-# CONFIG_TASKSET is not set
-# CONFIG_FEATURE_TASKSET_FANCY is not set
 # CONFIG_UBIATTACH is not set
 # CONFIG_UBIDETACH is not set
 # CONFIG_UBIMKVOL is not set
 # CONFIG_UBIRMVOL is not set
 # CONFIG_UBIRSVOL is not set
 # CONFIG_UBIUPDATEVOL is not set
-# CONFIG_WALL is not set
+# CONFIG_UBIRENAME is not set
 # CONFIG_ADJTIMEX is not set
 # CONFIG_BBCONFIG is not set
 # CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
@@ -729,7 +787,6 @@
 # CONFIG_IONICE is not set
 # CONFIG_INOTIFYD is not set
 # CONFIG_LAST is not set
-# CONFIG_FEATURE_LAST_SMALL is not set
 # CONFIG_FEATURE_LAST_FANCY is not set
 # CONFIG_HDPARM is not set
 # CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
@@ -760,24 +817,6 @@
 #
 # Networking Utilities
 #
-# CONFIG_NAMEIF is not set
-# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
-# CONFIG_NBDCLIENT is not set
-CONFIG_NC=y
-# CONFIG_NC_SERVER is not set
-# CONFIG_NC_EXTRA is not set
-# CONFIG_NC_110_COMPAT is not set
-CONFIG_PING=y
-CONFIG_PING6=y
-CONFIG_FEATURE_FANCY_PING=y
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-CONFIG_FEATURE_WGET_TIMEOUT=y
-# CONFIG_FEATURE_WGET_OPENSSL is not set
-# CONFIG_FEATURE_WGET_SSL_HELPER is not set
-# CONFIG_WHOIS is not set
 CONFIG_FEATURE_IPV6=y
 # CONFIG_FEATURE_UNIX_LOCAL is not set
 CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
@@ -789,15 +828,15 @@
 # CONFIG_FEATURE_BRCTL_SHOW is not set
 # CONFIG_DNSD is not set
 # CONFIG_ETHER_WAKE is not set
-# CONFIG_FAKEIDENTD is not set
 # CONFIG_FTPD is not set
-# CONFIG_FEATURE_FTP_WRITE is not set
+# CONFIG_FEATURE_FTPD_WRITE is not set
 # CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
-# CONFIG_FEATURE_FTP_AUTHENTICATION is not set
+# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set
 # CONFIG_FTPGET is not set
 # CONFIG_FTPPUT is not set
 # CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
 CONFIG_HOSTNAME=y
+CONFIG_DNSDOMAINNAME=y
 # CONFIG_HTTPD is not set
 # CONFIG_FEATURE_HTTPD_RANGES is not set
 # CONFIG_FEATURE_HTTPD_SETUID is not set
@@ -818,11 +857,10 @@
 # CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
 # CONFIG_IFENSLAVE is not set
 # CONFIG_IFPLUGD is not set
-CONFIG_IFUPDOWN=y
+CONFIG_IFUP=y
+CONFIG_IFDOWN=y
 CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
 CONFIG_FEATURE_IFUPDOWN_IP=y
-CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
-# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
 CONFIG_FEATURE_IFUPDOWN_IPV4=y
 CONFIG_FEATURE_IFUPDOWN_IPV6=y
 CONFIG_FEATURE_IFUPDOWN_MAPPING=y
@@ -835,22 +873,31 @@
 # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
 # CONFIG_FEATURE_INETD_RPC is not set
 CONFIG_IP=y
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_IPRULE is not set
+# CONFIG_IPNEIGH is not set
 CONFIG_FEATURE_IP_ADDRESS=y
 CONFIG_FEATURE_IP_LINK=y
 CONFIG_FEATURE_IP_ROUTE=y
 CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
 CONFIG_FEATURE_IP_TUNNEL=y
 # CONFIG_FEATURE_IP_RULE is not set
-# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_FEATURE_IP_NEIGH is not set
 # CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
-# CONFIG_IPADDR is not set
-# CONFIG_IPLINK is not set
-# CONFIG_IPROUTE is not set
-# CONFIG_IPTUNNEL is not set
-# CONFIG_IPRULE is not set
 # CONFIG_IPCALC is not set
-# CONFIG_FEATURE_IPCALC_FANCY is not set
 # CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_FEATURE_IPCALC_FANCY is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_NAMEIF is not set
+# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
+# CONFIG_NBDCLIENT is not set
+CONFIG_NC=y
+# CONFIG_NC_SERVER is not set
+# CONFIG_NC_EXTRA is not set
+# CONFIG_NC_110_COMPAT is not set
 CONFIG_NETSTAT=y
 # CONFIG_FEATURE_NETSTAT_WIDE is not set
 # CONFIG_FEATURE_NETSTAT_PRG is not set
@@ -858,13 +905,19 @@
 # CONFIG_NTPD is not set
 # CONFIG_FEATURE_NTPD_SERVER is not set
 # CONFIG_FEATURE_NTPD_CONF is not set
+CONFIG_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING=y
 # CONFIG_PSCAN is not set
 CONFIG_ROUTE=y
 # CONFIG_SLATTACH is not set
+# CONFIG_SSL_CLIENT is not set
 # CONFIG_TCPSVD is not set
+# CONFIG_UDPSVD is not set
 CONFIG_TELNET=y
 # CONFIG_FEATURE_TELNET_TTYPE is not set
 CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+CONFIG_FEATURE_TELNET_WIDTH=y
 # CONFIG_TELNETD is not set
 # CONFIG_FEATURE_TELNETD_STANDALONE is not set
 # CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
@@ -879,33 +932,43 @@
 # CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
 # CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
 # CONFIG_TFTP_DEBUG is not set
+CONFIG_TLS=y
 CONFIG_TRACEROUTE=y
 # CONFIG_TRACEROUTE6 is not set
 # CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
-# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
 # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
 # CONFIG_TUNCTL is not set
 # CONFIG_FEATURE_TUNCTL_UG is not set
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_TIMEOUT=y
+CONFIG_FEATURE_WGET_HTTPS=y
+# CONFIG_FEATURE_WGET_OPENSSL is not set
+# CONFIG_WHOIS is not set
+# CONFIG_ZCIP is not set
 # CONFIG_UDHCPC6 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
+# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
 CONFIG_UDHCPD=y
-# CONFIG_DHCPRELAY is not set
-CONFIG_DUMPLEASES=y
 # CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
 # CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
 CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
+CONFIG_DUMPLEASES=y
+# CONFIG_DHCPRELAY is not set
 CONFIG_UDHCPC=y
 CONFIG_FEATURE_UDHCPC_ARPING=y
 CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
+CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
 # CONFIG_FEATURE_UDHCP_PORT is not set
 CONFIG_UDHCP_DEBUG=0
 # CONFIG_FEATURE_UDHCP_RFC3397 is not set
 # CONFIG_FEATURE_UDHCP_8021Q is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
-# CONFIG_UDPSVD is not set
-# CONFIG_VCONFIG is not set
-# CONFIG_ZCIP is not set
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"
 
 #
 # Print Utilities
@@ -918,26 +981,45 @@
 # Mail Utilities
 #
 # CONFIG_MAKEMIME is not set
-CONFIG_FEATURE_MIME_CHARSET=""
 # CONFIG_POPMAILDIR is not set
 # CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
 # CONFIG_REFORMIME is not set
 # CONFIG_FEATURE_REFORMIME_COMPAT is not set
 # CONFIG_SENDMAIL is not set
+CONFIG_FEATURE_MIME_CHARSET=""
 
 #
 # Process Utilities
 #
+CONFIG_FREE=y
+CONFIG_FUSER=y
 # CONFIG_IOSTAT is not set
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+# CONFIG_KILLALL5 is not set
 # CONFIG_LSOF is not set
 # CONFIG_MPSTAT is not set
 # CONFIG_NMETER is not set
+# CONFIG_PGREP is not set
+# CONFIG_PKILL is not set
+CONFIG_PIDOF=y
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_FEATURE_PIDOF_OMIT is not set
 # CONFIG_PMAP is not set
 # CONFIG_POWERTOP is not set
+# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set
+CONFIG_PS=y
+CONFIG_FEATURE_PS_WIDE=y
+CONFIG_FEATURE_PS_LONG=y
+# CONFIG_FEATURE_PS_TIME is not set
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
 # CONFIG_PSTREE is not set
 # CONFIG_PWDX is not set
 # CONFIG_SMEMCAP is not set
+CONFIG_BB_SYSCTL=y
 CONFIG_TOP=y
+# CONFIG_FEATURE_TOP_INTERACTIVE is not set
 CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
 CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
 # CONFIG_FEATURE_TOP_SMP_CPU is not set
@@ -946,84 +1028,69 @@
 # CONFIG_FEATURE_TOPMEM is not set
 CONFIG_UPTIME=y
 # CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
-CONFIG_FREE=y
-CONFIG_FUSER=y
-CONFIG_KILL=y
-CONFIG_KILLALL=y
-# CONFIG_KILLALL5 is not set
-# CONFIG_PGREP is not set
-CONFIG_PIDOF=y
-# CONFIG_FEATURE_PIDOF_SINGLE is not set
-# CONFIG_FEATURE_PIDOF_OMIT is not set
-# CONFIG_PKILL is not set
-CONFIG_PS=y
-CONFIG_FEATURE_PS_WIDE=y
-CONFIG_FEATURE_PS_LONG=y
-# CONFIG_FEATURE_PS_TIME is not set
-# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
-# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
-CONFIG_RENICE=y
-CONFIG_BB_SYSCTL=y
-# CONFIG_FEATURE_SHOW_THREADS is not set
 CONFIG_WATCH=y
+# CONFIG_FEATURE_SHOW_THREADS is not set
 
 #
 # Runit Utilities
 #
-# CONFIG_RUNSV is not set
-# CONFIG_RUNSVDIR is not set
-# CONFIG_FEATURE_RUNSVDIR_LOG is not set
-# CONFIG_SV is not set
-CONFIG_SV_DEFAULT_SERVICE_DIR=""
-# CONFIG_SVLOGD is not set
 # CONFIG_CHPST is not set
 # CONFIG_SETUIDGID is not set
 # CONFIG_ENVUIDGID is not set
 # CONFIG_ENVDIR is not set
 # CONFIG_SOFTLIMIT is not set
-
-#
-#  SELinux utilities
-#
+# CONFIG_RUNSV is not set
+# CONFIG_RUNSVDIR is not set
+# CONFIG_FEATURE_RUNSVDIR_LOG is not set
+# CONFIG_SV is not set
+CONFIG_SV_DEFAULT_SERVICE_DIR=""
+# CONFIG_SVC is not set
+# CONFIG_SVLOGD is not set
 # CONFIG_CHCON is not set
 # CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
 # CONFIG_GETENFORCE is not set
 # CONFIG_GETSEBOOL is not set
 # CONFIG_LOAD_POLICY is not set
 # CONFIG_MATCHPATHCON is not set
-# CONFIG_RESTORECON is not set
 # CONFIG_RUNCON is not set
 # CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
 # CONFIG_SELINUXENABLED is not set
+# CONFIG_SESTATUS is not set
 # CONFIG_SETENFORCE is not set
 # CONFIG_SETFILES is not set
 # CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+# CONFIG_RESTORECON is not set
 # CONFIG_SETSEBOOL is not set
-# CONFIG_SESTATUS is not set
 
 #
 # Shells
 #
+CONFIG_SH_IS_ASH=y
+# CONFIG_SH_IS_HUSH is not set
+# CONFIG_SH_IS_NONE is not set
+# CONFIG_BASH_IS_ASH is not set
+# CONFIG_BASH_IS_HUSH is not set
+CONFIG_BASH_IS_NONE=y
 CONFIG_ASH=y
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+CONFIG_ASH_INTERNAL_GLOB=y
 CONFIG_ASH_BASH_COMPAT=y
-# CONFIG_ASH_IDLE_TIMEOUT is not set
 CONFIG_ASH_JOB_CONTROL=y
 CONFIG_ASH_ALIAS=y
-CONFIG_ASH_GETOPTS=y
-CONFIG_ASH_BUILTIN_ECHO=y
-CONFIG_ASH_BUILTIN_PRINTF=y
-CONFIG_ASH_BUILTIN_TEST=y
-CONFIG_ASH_HELP=y
-CONFIG_ASH_CMDCMD=y
-# CONFIG_ASH_MAIL is not set
-CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
 # CONFIG_ASH_RANDOM_SUPPORT is not set
 CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_ASH_IDLE_TIMEOUT is not set
+# CONFIG_ASH_MAIL is not set
+CONFIG_ASH_ECHO=y
+CONFIG_ASH_PRINTF=y
+CONFIG_ASH_TEST=y
+CONFIG_ASH_HELP=y
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_CMDCMD=y
 # CONFIG_CTTYHACK is not set
 # CONFIG_HUSH is not set
 # CONFIG_HUSH_BASH_COMPAT is not set
 # CONFIG_HUSH_BRACE_EXPANSION is not set
-# CONFIG_HUSH_HELP is not set
 # CONFIG_HUSH_INTERACTIVE is not set
 # CONFIG_HUSH_SAVEHISTORY is not set
 # CONFIG_HUSH_JOB is not set
@@ -1034,17 +1101,30 @@
 # CONFIG_HUSH_FUNCTIONS is not set
 # CONFIG_HUSH_LOCAL is not set
 # CONFIG_HUSH_RANDOM_SUPPORT is not set
-# CONFIG_HUSH_EXPORT_N is not set
 # CONFIG_HUSH_MODE_X is not set
+# CONFIG_HUSH_ECHO is not set
+# CONFIG_HUSH_PRINTF is not set
+# CONFIG_HUSH_TEST is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_EXPORT is not set
+# CONFIG_HUSH_EXPORT_N is not set
+# CONFIG_HUSH_KILL is not set
+# CONFIG_HUSH_WAIT is not set
+# CONFIG_HUSH_TRAP is not set
+# CONFIG_HUSH_TYPE is not set
+# CONFIG_HUSH_READ is not set
+# CONFIG_HUSH_SET is not set
+# CONFIG_HUSH_UNSET is not set
+# CONFIG_HUSH_ULIMIT is not set
+# CONFIG_HUSH_UMASK is not set
+# CONFIG_HUSH_MEMLEAK is not set
 # CONFIG_MSH is not set
-CONFIG_FEATURE_SH_IS_ASH=y
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_FEATURE_SH_IS_NONE is not set
-# CONFIG_FEATURE_BASH_IS_ASH is not set
-# CONFIG_FEATURE_BASH_IS_HUSH is not set
-CONFIG_FEATURE_BASH_IS_NONE=y
-CONFIG_SH_MATH_SUPPORT=y
-# CONFIG_SH_MATH_SUPPORT_64 is not set
+
+#
+# Options common to all shells
+#
+CONFIG_FEATURE_SH_MATH=y
+# CONFIG_FEATURE_SH_MATH_64 is not set
 CONFIG_FEATURE_SH_EXTRA_QUIET=y
 # CONFIG_FEATURE_SH_STANDALONE is not set
 # CONFIG_FEATURE_SH_NOFORK is not set
@@ -1053,19 +1133,17 @@
 #
 # System Logging Utilities
 #
+CONFIG_KLOGD=y
+CONFIG_FEATURE_KLOGD_KLOGCTL=y
+CONFIG_LOGGER=y
+# CONFIG_LOGREAD is not set
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
 # CONFIG_SYSLOGD is not set
 # CONFIG_FEATURE_ROTATE_LOGFILE is not set
 # CONFIG_FEATURE_REMOTE_LOG is not set
 # CONFIG_FEATURE_SYSLOGD_DUP is not set
 # CONFIG_FEATURE_SYSLOGD_CFG is not set
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
 # CONFIG_FEATURE_IPC_SYSLOG is not set
-# CONFIG_LOGREAD is not set
-# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
 # CONFIG_FEATURE_KMSG_SYSLOG is not set
-CONFIG_KLOGD=y
-
-#
-# klogd should not be used together with syslog to kernel printk buffer
-#
-CONFIG_FEATURE_KLOGD_KLOGCTL=y
-CONFIG_LOGGER=y
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
deleted file mode 100644
index 41c5656..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 4ab372d49a6e82b0bf097dedb96d26330c5f2d5f Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sun, 24 Apr 2016 17:39:02 +0200
-Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems
-
-Use designated initializers for struct msghdr.
-The struct layout is non-portable and musl libc does not match what busybox expects.
-
-Signed-off-by: Szabolcs Nagy <nsz@port70.net>
-Tested-by: Waldemar Brodkorb <wbx@openadk.org>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-
-https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/libiproute/libnetlink.c | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
-index c7533a4..cbb5daf 100644
---- a/networking/libiproute/libnetlink.c
-+++ b/networking/libiproute/libnetlink.c
-@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
- 	struct nlmsghdr nlh;
- 	struct sockaddr_nl nladdr;
- 	struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
-+	/* Use designated initializers, struct layout is non-portable */
- 	struct msghdr msg = {
--		(void*)&nladdr, sizeof(nladdr),
--		iov,  2,
--		NULL, 0,
--		0
-+		.msg_name = (void*)&nladdr,
-+		.msg_namelen = sizeof(nladdr),
-+		.msg_iov = iov,
-+		.msg_iovlen = 2,
-+		.msg_control = NULL,
-+		.msg_controllen = 0,
-+		.msg_flags = 0
- 	};
- 
- 	memset(&nladdr, 0, sizeof(nladdr));
-@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
- 	while (1) {
- 		int status;
- 		struct nlmsghdr *h;
--
-+		/* Use designated initializers, struct layout is non-portable */
- 		struct msghdr msg = {
--			(void*)&nladdr, sizeof(nladdr),
--			&iov, 1,
--			NULL, 0,
--			0
-+			.msg_name = (void*)&nladdr,
-+			.msg_namelen = sizeof(nladdr),
-+			.msg_iov = &iov,
-+			.msg_iovlen = 1,
-+			.msg_control = NULL,
-+			.msg_controllen = 0,
-+			.msg_flags = 0
- 		};
- 
- 		status = recvmsg(rth->fd, &msg, 0);
-@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- 	struct sockaddr_nl nladdr;
- 	struct iovec iov = { (void*)n, n->nlmsg_len };
- 	char   *buf = xmalloc(8*1024); /* avoid big stack buffer */
-+	/* Use designated initializers, struct layout is non-portable */
- 	struct msghdr msg = {
--		(void*)&nladdr, sizeof(nladdr),
--		&iov, 1,
--		NULL, 0,
--		0
-+		.msg_name = (void*)&nladdr,
-+		.msg_namelen = sizeof(nladdr),
-+		.msg_iov = &iov,
-+		.msg_iovlen = 1,
-+		.msg_control = NULL,
-+		.msg_controllen = 0,
-+		.msg_flags = 0
- 	};
- 
- 	memset(&nladdr, 0, sizeof(nladdr));
--- 
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
deleted file mode 100644
index 2e9842e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9e5820a86277818c2f83c11c2aa76d7f0a38283e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 02:54:27 +0200
-Subject: build system: fix include/NUM_APPLETS.h generation
-
-TBH, it's more like "work around my bad makefile-fu" than "fix"...
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- applets/Kbuild.src | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-Upstream-Status: Backport
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index b612399..5cc1827 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
- 
- applets/applet_tables: .config include/applets.h
- applets/usage:         .config include/applets.h
--applets/usage_pod:     .config include/applet_tables.h include/applets.h
-+applets/usage_pod:     .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
- 
- quiet_cmd_gen_usage_compressed = GEN     include/usage_compressed.h
-       cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -40,8 +40,5 @@ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compress
- quiet_cmd_gen_applet_tables = GEN     include/applet_tables.h
-       cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
- 
--include/applet_tables.h: applets/applet_tables
--	$(call cmd,gen_applet_tables)
--
--include/NUM_APPLETS.h: applets/applet_tables
-+include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
- 	$(call cmd,gen_applet_tables)
--- 
-cgit v0.12
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
index facfe85..6fffc91 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
@@ -2,7 +2,6 @@
 # CONFIG_SELINUX is not set
 # CONFIG_FEATURE_HAVE_RPC is not set
 # CONFIG_WERROR is not set
-# CONFIG_FEATURE_SYSTEMD is not set
 # CONFIG_FEATURE_VI_REGEX_SEARCH is not set
 # CONFIG_PAM is not set
 # CONFIG_FEATURE_INETD_RPC is not set
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
deleted file mode 100644
index 1c85808..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ /dev/null
@@ -1,68 +0,0 @@
-require busybox.inc
-
-SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
-           file://busybox-udhcpc-no_deconfig.patch \
-           file://find-touchscreen.sh \
-           file://busybox-cron \
-           file://busybox-httpd \
-           file://busybox-udhcpd \
-           file://default.script \
-           file://simple.script \
-           file://hwclock.sh \
-           file://mount.busybox \
-           file://syslog \
-           file://syslog-startup.conf \
-           file://syslog.conf \
-           file://busybox-syslog.default \
-           file://mdev \
-           file://mdev.conf \
-           file://mdev-mount.sh \
-           file://umount.busybox \
-           file://defconfig \
-           file://busybox-syslog.service.in \
-           file://busybox-klogd.service.in \
-           file://fail_on_no_media.patch \
-           file://run-ptest \
-           file://inetd.conf \
-           file://inetd \
-           file://login-utilities.cfg \
-           file://recognize_connmand.patch \
-           file://busybox-cross-menuconfig.patch \
-           file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
-           file://busybox-1.24.1-unzip.patch \
-           file://busybox-1.24.1-unzip-regression.patch \
-           file://busybox-1.24.1-truncate-open-mode.patch \
-           file://0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch \
-           file://mount-via-label.cfg \
-           file://sha1sum.cfg \
-           file://sha256sum.cfg \
-           file://getopts.cfg \
-           file://resize.cfg \
-           ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
-           ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \
-           file://syslog.cfg \
-           file://inittab \
-           file://rcS \
-           file://rcK \
-           file://runlevel \
-           file://CVE-2016-2148.patch \
-           file://CVE-2016-2147.patch \
-           file://CVE-2016-2147_2.patch \
-           file://CVE-2016-6301.patch \
-           file://ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch \
-           file://makefile-fix-backport.patch \
-           file://0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch \
-           file://busybox-kbuild-race-fix-commit-d8e61bb.patch \
-           file://commit-applet_tables-fix-commit-0dddbc1.patch \
-           file://makefile-libbb-race.patch \
-           file://0001-libiproute-handle-table-ids-larger-than-255.patch \
-           file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \
-           file://BUG9071_buffer_overflow_arp.patch \
-           file://busybox-tar-add-IF_FEATURE_-checks.patch \
-           file://0001-iproute-support-scope-.-Closes-8561.patch \
-           file://0001-ip-fix-an-improper-optimization-req.r.rtm_scope-may-.patch \
-"
-SRC_URI_append_libc-musl = " file://musl.cfg "
-
-SRC_URI[tarball.md5sum] = "be98a40cadf84ce2d6b05fa41a275c6a"
-SRC_URI[tarball.sha256sum] = "37d03132cc078937360b392170b7a1d0e5b322eee9f57c0b82292a8b1f0afe3d"
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.27.2.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.27.2.bb
new file mode 100644
index 0000000..36a6342
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.27.2.bb
@@ -0,0 +1,52 @@
+require busybox.inc
+
+SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
+           file://busybox-udhcpc-no_deconfig.patch \
+           file://find-touchscreen.sh \
+           file://busybox-cron \
+           file://busybox-httpd \
+           file://busybox-udhcpd \
+           file://default.script \
+           file://simple.script \
+           file://hwclock.sh \
+           file://mount.busybox \
+           file://syslog \
+           file://syslog-startup.conf \
+           file://syslog.conf \
+           file://busybox-syslog.default \
+           file://mdev \
+           file://mdev.conf \
+           file://mdev-mount.sh \
+           file://umount.busybox \
+           file://defconfig \
+           file://busybox-syslog.service.in \
+           file://busybox-klogd.service.in \
+           file://fail_on_no_media.patch \
+           file://run-ptest \
+           file://inetd.conf \
+           file://inetd \
+           file://login-utilities.cfg \
+           file://recognize_connmand.patch \
+           file://busybox-cross-menuconfig.patch \
+           file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
+           file://mount-via-label.cfg \
+           file://sha1sum.cfg \
+           file://sha256sum.cfg \
+           file://getopts.cfg \
+           file://resize.cfg \
+           ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
+           ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \
+           file://syslog.cfg \
+           file://inittab \
+           file://rcS \
+           file://rcK \
+           file://runlevel \
+           file://makefile-libbb-race.patch \
+           file://CVE-2011-5325.patch \
+           file://CVE-2017-15873.patch \
+           file://busybox-CVE-2017-16544.patch \
+"
+SRC_URI_append_libc-musl = " file://musl.cfg "
+
+SRC_URI[tarball.md5sum] = "476186f4bab81781dab2369bfd42734e"
+SRC_URI[tarball.sha256sum] = "9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df"
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
deleted file mode 100644
index 3c896a1..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils/man-decouple-manpages-from-build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b4d258629f090066783c3b4c91b40f63b9d0a296 Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Sun, 8 Feb 2015 16:51:57 -0500
-Subject: [PATCH] man: decouple manpages from build
-
-The use of "help2man" doesn't work at all for cross compile, in
-addition to the extra requirement of perl it adds.
-
-Just decouple the manpages from the build in order to pave the way for
-importing prebuilt manpages that can be used in a cross build situation.
-
-Upstream-Status: Inappropriate [upstream doesn't care about x-compile case.]
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index fb4af27..7576b2c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -214,5 +214,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
- include $(top_srcdir)/lib/local.mk
- include $(top_srcdir)/src/local.mk
- include $(top_srcdir)/doc/local.mk
--include $(top_srcdir)/man/local.mk
- include $(top_srcdir)/tests/local.mk
--- 
-2.2.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb
deleted file mode 100644
index ea8740a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.27.bb
+++ /dev/null
@@ -1,142 +0,0 @@
-SUMMARY = "The basic file, shell and text manipulation utilities"
-DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
-manipulation utilities. These are the core utilities which are expected to exist on \
-every system."
-HOMEPAGE = "http://www.gnu.org/software/coreutils/"
-BUGTRACKER = "http://debbugs.gnu.org/coreutils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
-                    file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
-DEPENDS = "gmp libcap"
-DEPENDS_class-native = ""
-
-inherit autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
-           http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
-           file://man-decouple-manpages-from-build.patch \
-           file://remove-usr-local-lib-from-m4.patch \
-           file://fix-selinux-flask.patch \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           file://0001-uname-report-processor-and-hardware-correctly.patch \
-           file://disable-ls-output-quoting.patch \
-           file://0001-local.mk-fix-cross-compiling-problem.patch \
-          "
-
-SRC_URI[tarball.md5sum] = "502795792c212932365e077946d353ae"
-SRC_URI[tarball.sha256sum] = "8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b"
-SRC_URI[manpages.md5sum] = "1b31a688d06764e0e94aa20b7ea08222"
-SRC_URI[manpages.sha256sum] = "1f615819e9167646c731636b6c5ecbe79837e82a18666bacc82c3fb1dfcfaea3"
-
-EXTRA_OECONF_class-native = "--without-gmp"
-EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
-EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
-
-# acl and xattr are not default features
-#
-PACKAGECONFIG_class-target ??= "\
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
-"
-
-# The lib/oe/path.py requires xattr
-PACKAGECONFIG_class-native ??= "xattr"
-
-# with, without, depends, rdepends
-#
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
-# [ df mktemp base64 gets a special treatment and is not included in this
-bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
-                env expand expr factor fmt fold groups head hostid id install \
-                join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
-                pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
-                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
-                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
-                     mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
-
-sbindir_progs= "chroot"
-
-# Let aclocal use the relative path for the m4 file rather than the
-# absolute since coreutils has a lot of m4 files, otherwise there might
-# be an "Argument list too long" error when it is built in a long/deep
-# directory.
-acpaths = "-I ./m4"
-
-# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
-do_compile_prepend () {
-	mkdir -p ${B}/src
-}
-
-do_install_class-native() {
-	autotools_do_install
-	# remove groups to fix conflict with shadow-native
-	rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
-	# The return is a must since native doesn't need the
-	# do_install_append() in the below.
-	return
-}
-
-do_install_append() {
-	for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
-
-	install -d ${D}${base_bindir}
-	[ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
-
-	install -d ${D}${sbindir}
-	[ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
-
-	# [ requires special handling because [.coreutils will cause the sed stuff
-	# in update-alternatives to fail, therefore use lbracket - the name used
-	# for the actual source file.
-	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
-	# prebuilt man pages
-	install -d ${D}/${mandir}/man1
-	install -t ${D}/${mandir}/man1 ${S}/man/*.1
-	# prebuilt man pages don't do a separate man page for [ vs test.
-	# see comment above r.e. sed and update-alternatives
-	cp -R --no-dereference --preserve=mode,links -v ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1  hostname.1"
-
-ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
-
-ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
-ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
-ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
-
-ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
-ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
-
-ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
-ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
-ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
-
-ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
-ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
-ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
-
-ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-python __anonymous() {
-	for prog in d.getVar('base_bindir_progs').split():
-		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
-
-	for prog in d.getVar('sbindir_progs').split():
-		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb
new file mode 100644
index 0000000..0b8acc5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.29.bb
@@ -0,0 +1,133 @@
+SUMMARY = "The basic file, shell and text manipulation utilities"
+DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
+manipulation utilities. These are the core utilities which are expected to exist on \
+every system."
+HOMEPAGE = "http://www.gnu.org/software/coreutils/"
+BUGTRACKER = "http://debbugs.gnu.org/coreutils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+                    file://src/ls.c;beginline=1;endline=15;md5=1c3f9411e1842a062ce5ce9210beee0e"
+DEPENDS = "gmp libcap"
+DEPENDS_class-native = ""
+
+inherit autotools gettext texinfo
+
+SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
+           file://remove-usr-local-lib-from-m4.patch \
+           file://fix-selinux-flask.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://0001-uname-report-processor-and-hardware-correctly.patch \
+           file://disable-ls-output-quoting.patch \
+           file://0001-local.mk-fix-cross-compiling-problem.patch \
+          "
+
+SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303"
+SRC_URI[sha256sum] = "92d0fa1c311cacefa89853bdb53c62f4110cdfda3820346b59cbd098f40f955e"
+
+EXTRA_OECONF_class-native = "--without-gmp"
+EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}"
+EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
+
+# acl and xattr are not default features
+#
+PACKAGECONFIG_class-target ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
+"
+
+# The lib/oe/path.py requires xattr
+PACKAGECONFIG_class-native ??= "xattr"
+
+# with, without, depends, rdepends
+#
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,,"
+
+# [ df mktemp base64 gets a special treatment and is not included in this
+bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
+                env expand expr factor fmt fold groups head hostid id install \
+                join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
+                pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
+                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
+                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
+
+# hostname gets a special treatment and is not included in this
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
+                     mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
+
+sbindir_progs= "chroot"
+
+# Let aclocal use the relative path for the m4 file rather than the
+# absolute since coreutils has a lot of m4 files, otherwise there might
+# be an "Argument list too long" error when it is built in a long/deep
+# directory.
+acpaths = "-I ./m4"
+
+# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
+do_compile_prepend () {
+	mkdir -p ${B}/src
+}
+
+do_install_class-native() {
+	autotools_do_install
+	# remove groups to fix conflict with shadow-native
+	rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+	# The return is a must since native doesn't need the
+	# do_install_append() in the below.
+	return
+}
+
+do_install_append() {
+	for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
+
+	install -d ${D}${base_bindir}
+	[ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
+
+	install -d ${D}${sbindir}
+	[ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
+
+	# [ requires special handling because [.coreutils will cause the sed stuff
+	# in update-alternatives to fail, therefore use lbracket - the name used
+	# for the actual source file.
+	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+# Make hostname's priority higher than busybox but lower than net-tools
+ALTERNATIVE_PRIORITY[hostname] = "90"
+ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
+ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1  hostname.1"
+
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+
+ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
+ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
+ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
+
+ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
+ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
+ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
+
+ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
+ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
+ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
+
+ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
+ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
+
+ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
+
+python __anonymous() {
+	for prog in d.getVar('base_bindir_progs').split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
+
+	for prog in d.getVar('sbindir_progs').split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb b/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
index 4afb90c..c24295b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus-wait/dbus-wait_git.bb
@@ -11,7 +11,7 @@
 PR = "r2"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
index fbb4967..32e7611 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
@@ -5,11 +5,13 @@
 Signed-off-by: Kevin Tian <kevin.tian@intel.com>
 Signed-off-by: Scott Garman <scott.a.garman@intel.com>
 
---- dbus-glib-0.70/dbus/Makefile.am.orig	2006-07-23 16:04:43.000000000 +0200
-+++ dbus-glib-0.70/dbus/Makefile.am	2006-07-23 16:04:52.000000000 +0200
+Index: dbus-glib-0.108/dbus/Makefile.am
+===================================================================
+--- dbus-glib-0.108.orig/dbus/Makefile.am
++++ dbus-glib-0.108/dbus/Makefile.am
 @@ -1,4 +1,4 @@
 -SUBDIRS = . examples
 +SUBDIRS = .
  
- INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" 
- 
+ AM_CPPFLAGS = \
+ 	-I$(top_srcdir)						\
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb
deleted file mode 100644
index eeadb7d..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.20.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
-                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-
-DEPENDS = "dbus glib-2.0"
-
-RDEPENDS_${PN} += "make"
-RDEPENDS_${PN}-dev = ""
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
-           file://tmpdir.patch \
-           file://run-ptest \
-           file://python-config.patch \
-           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
-           "
-
-SRC_URI[md5sum] = "94c991e763d4f9f13690416b2dcd9411"
-SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
-
-S="${WORKDIR}/dbus-${PV}"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
-
-inherit autotools pkgconfig gettext ptest upstream-version-is-even
-
-EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
-EXTRA_OECONF_X_class-native = "--without-x"
-
-EXTRA_OECONF = "--enable-tests \
-                --enable-modular-tests \
-                --enable-installed-tests \
-                --enable-checks \
-                --enable-asserts \
-                --enable-verbose-mode \
-                --disable-xml-docs \
-                --disable-doxygen-docs \
-                --disable-libaudit \
-                --disable-systemd \
-                --without-systemdsystemunitdir \
-                --with-dbus-test-dir=${PTEST_PATH} \
-                ${EXTRA_OECONF_X}"
-
-do_install() {
-    :
-}
-
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/test
-	l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
-	for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
-	l="bus bus-system bus-launch-helper"
-	for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
-	install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
-	cp -r ${B}/test/data ${D}${PTEST_PATH}/test
-}
-RDEPENDS_${PN}-ptest += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb
new file mode 100644
index 0000000..dce047a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.12.2.bb
@@ -0,0 +1,82 @@
+SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+
+DEPENDS = "dbus glib-2.0"
+
+RDEPENDS_${PN} += "make"
+RDEPENDS_${PN}-dev = ""
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+           file://tmpdir.patch \
+           file://run-ptest \
+           file://python-config.patch \
+           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+           "
+
+SRC_URI[md5sum] = "3361456cadb99aa6601bed5b48964254"
+SRC_URI[sha256sum] = "272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88"
+
+S="${WORKDIR}/dbus-${PV}"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
+
+inherit autotools pkgconfig gettext ptest upstream-version-is-even
+
+EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF_X_class-native = "--without-x"
+
+EXTRA_OECONF = "--enable-tests \
+                --enable-modular-tests \
+                --enable-installed-tests \
+                --enable-checks \
+                --enable-asserts \
+                --enable-verbose-mode \
+                --enable-largefile \
+                --disable-xml-docs \
+                --disable-doxygen-docs \
+                --disable-libaudit \
+                --with-dbus-test-dir=${PTEST_PATH} \
+                ${EXTRA_OECONF_X}"
+
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+    :
+}
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/test
+	l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
+	   variant uid-permissions syntax spawn sd-activation names monitor message fdpass "
+	for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
+
+	l="bus bus-system bus-launch-helper"
+	for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
+
+	cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+	install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+
+	install -d ${D}${PTEST_PATH}/test/.libs
+	cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
+
+	# Remove build host references...
+	find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
+		sed -i \
+		 -e 's:${B}:${PTEST_PATH}:g' \
+		 {} +
+}
+
+RDEPENDS_${PN}-ptest += "bash"
+
+PRIVATE_LIBS_${PN}-ptest = "libdbus-1.so.3"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
deleted file mode 100644
index 85acb7b..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1bfde222926be624a30a6e4b2cdc2c5064a36298 Mon Sep 17 00:00:00 2001
-From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-Date: Fri, 29 Jul 2016 01:19:37 +0300
-Subject: [PATCH] configure.ac: explicitely check stdint.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Otherwise HAVE_STDINT_H will not be defined or the var will not be
-picked up from cache so builds could fail with errors like:
-| ../../dbus-1.10.8/dbus/dbus-internals.h:239:8: error: ‘uintptr_t’ undeclared (first use in this function)
-
-Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
-[smcv: fix Autoconf underquoting]
-Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-
-Upstream-Status: Backport [from dbus-1.10]
-
----
- configure.ac | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index cf5c5b9..a228d63 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -699,6 +699,8 @@ AC_CHECK_HEADERS(byteswap.h)
- 
- AC_CHECK_HEADERS(unistd.h)
- 
-+AC_CHECK_HEADERS([stdint.h])
-+
- AC_CHECK_HEADERS(ws2tcpip.h)
- 
- AC_CHECK_HEADERS(alloca.h)
--- 
-2.9.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch
deleted file mode 100644
index 54c257f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-dbus: remove build host test in configure script
-
-The dbus build tests the build host to detect what initscript
-environment it expects.  Remove the test and set it to "redhat"
-unconditionally as the oe-core initscript has a redhat-style pid file
-path.
-
-Signed-off-by: Andy Ross <andy.ross@windriver.com>
-Upstream-Status: Inappropriate [embedded]
-
-diff -u a/configure.ac b/configure.ac
---- a/configure.ac	2012-08-28 11:23:43.040609874 -0700
-+++ b/configure.ac	2012-08-28 11:54:25.602913945 -0700
-@@ -1348,19 +1348,8 @@
- AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
- AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
- 
--#### Check our operating system
--operating_system=unknown
--if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
--   operating_system=redhat
--fi
--
--if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
--   operating_system=slackware
--fi
--
--if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then
--   operating_system=cygwin
--fi
-+#### Build host test removed from upstream code, openembedded initscript is redhat-like:
-+operating_system=redhat
- 
- #### Sort out init scripts
- 
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
index c72d083..8a8970e 100755
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
@@ -1,10 +1,24 @@
 #!/bin/sh
 
 output() {
-  if [ $? -eq 0 ]
+  retcode=$?
+  if [ $retcode -eq 0 ]
     then echo "PASS: $i"
-    else echo "FAIL: $i"
+  elif [ $retcode -eq 77 ]
+    then echo "SKIP: $i"
+  else echo "FAIL: $i"
   fi
 }
 
-for i in `ls test/test-*`; do ./$i ./test/data DBUS_TEST_HOMEDIR=./test >/dev/null; output; done
+export DBUS_TEST_HOMEDIR=./test
+export XDG_RUNTIME_DIR=./test
+export LD_LIBRARY_PATH=/usr/lib/dbus-test/ptest/test/.libs
+
+files=`ls test/test-*`
+
+for i in $files
+	do
+		./$i ./test/data >/dev/null
+		output
+	done
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb
deleted file mode 100644
index 9ddedc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.20.bb
+++ /dev/null
@@ -1,180 +0,0 @@
-SUMMARY = "D-Bus message bus"
-DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
-                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-DEPENDS = "expat virtual/libintl"
-RDEPENDS_dbus_class-native = ""
-RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"
-RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
-           file://tmpdir.patch \
-           file://dbus-1.init \
-           file://os-test.patch \
-           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
-           file://0001-configure.ac-explicitely-check-stdint.h.patch \
-"
-
-SRC_URI[md5sum] = "94c991e763d4f9f13690416b2dcd9411"
-SRC_URI[sha256sum] = "e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48"
-
-inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
-
-INITSCRIPT_NAME = "dbus-1"
-INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
-
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "-r netdev"
-USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
-                       --no-create-home --shell /bin/false \
-                       --user-group messagebus"
-
-CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
-
-DEBIANNAME_${PN} = "dbus-1"
-
-PACKAGES =+ "${PN}-lib"
-
-OLDPKGNAME = "dbus-x11"
-OLDPKGNAME_class-nativesdk = ""
-
-# for compatibility
-RPROVIDES_${PN} = "${OLDPKGNAME}"
-RREPLACES_${PN} += "${OLDPKGNAME}"
-
-FILES_${PN} = "${bindir}/dbus-daemon* \
-               ${bindir}/dbus-uuidgen \
-               ${bindir}/dbus-cleanup-sockets \
-               ${bindir}/dbus-send \
-               ${bindir}/dbus-monitor \
-               ${bindir}/dbus-launch \
-               ${bindir}/dbus-run-session \
-               ${bindir}/dbus-update-activation-environment \
-               ${libexecdir}/dbus* \
-               ${sysconfdir} \
-               ${localstatedir} \
-               ${datadir}/dbus-1/services \
-               ${datadir}/dbus-1/system-services \
-               ${datadir}/dbus-1/session.d \
-               ${datadir}/dbus-1/session.conf \
-               ${datadir}/dbus-1/system.d \
-               ${datadir}/dbus-1/system.conf \
-               ${systemd_system_unitdir} \
-               ${systemd_user_unitdir} \
-"
-FILES_${PN}-lib = "${libdir}/lib*.so.*"
-RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
-
-PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
-pkg_postinst_dbus() {
-	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
-        if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
-		if [ -n "$D" ]; then
-			OPTS="--root=$D"
-		fi
-		systemctl $OPTS mask dbus-1.service
-	fi
-
-	if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
-		/etc/init.d/populate-volatile.sh update
-	fi
-}
-
-EXTRA_OECONF = "--disable-tests \
-                --disable-xml-docs \
-                --disable-doxygen-docs \
-                --disable-libaudit \
-                --enable-largefile \
-                "
-
-EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
-EXTRA_OECONF_append_class-native = " --disable-selinux"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
-PACKAGECONFIG_class-native = ""
-PACKAGECONFIG_class-nativesdk = ""
-
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
-PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
-PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
-
-do_install() {
-	autotools_do_install
-
-	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
-		install -d ${D}${sysconfdir}/init.d
-		sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
-		install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
-	fi
-
-	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-		for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
-			install -d ${D}${systemd_system_unitdir}/$i; done
-		install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
-		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
-		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
-		ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
-	fi
-
-	install -d ${D}${sysconfdir}/default/volatiles
-	echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
-	     > ${D}${sysconfdir}/default/volatiles/99_dbus
-
-
-	mkdir -p ${D}${localstatedir}/lib/dbus
-
-	chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
-
-	chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
-	chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
-
-	# Remove Red Hat initscript
-	rm -rf ${D}${sysconfdir}/rc.d
-
-	# Remove empty testexec directory as we don't build tests
-	rm -rf ${D}${libdir}/dbus-1.0/test
-
-	# Remove /var/run as it is created on startup
-	rm -rf ${D}${localstatedir}/run
-}
-
-do_install_class-native() {
-	autotools_do_install
-
-	# for dbus-glib-native introspection generation
-	install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
-	# N.B. is below install actually required?
-	install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
-
-	# dbus-glib-native and dbus-glib need this xml file
-	./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
-	
-	# dbus-launch has no X support so lets not install it in case the host
-	# has a more featured and useful version
-	rm -f ${D}${bindir}/dbus-launch
-}
-
-do_install_class-nativesdk() {
-	autotools_do_install
-
-	# dbus-launch has no X support so lets not install it in case the host
-	# has a more featured and useful version
-	rm -f ${D}${bindir}/dbus-launch
-
-	# Remove /var/run to avoid QA error
-	rm -rf ${D}${localstatedir}/run
-}
-BBCLASSEXTEND = "native nativesdk"
-
-INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb
new file mode 100644
index 0000000..fb5b69a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.12.2.bb
@@ -0,0 +1,181 @@
+SUMMARY = "D-Bus message bus"
+DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+DEPENDS = "expat virtual/libintl autoconf-archive"
+RDEPENDS_dbus_class-native = ""
+RDEPENDS_dbus_class-nativesdk = ""
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
+ALLOW_EMPTY_dbus-ptest = "1"
+RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+           file://tmpdir.patch \
+           file://dbus-1.init \
+           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+"
+
+SRC_URI[md5sum] = "3361456cadb99aa6601bed5b48964254"
+SRC_URI[sha256sum] = "272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88"
+
+inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
+
+INITSCRIPT_NAME = "dbus-1"
+INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r netdev"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
+                       --no-create-home --shell /bin/false \
+                       --user-group messagebus"
+
+CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
+
+DEBIANNAME_${PN} = "dbus-1"
+
+PACKAGES =+ "${PN}-lib"
+
+OLDPKGNAME = "dbus-x11"
+OLDPKGNAME_class-nativesdk = ""
+
+# for compatibility
+RPROVIDES_${PN} = "${OLDPKGNAME}"
+RREPLACES_${PN} += "${OLDPKGNAME}"
+
+FILES_${PN} = "${bindir}/dbus-daemon* \
+               ${bindir}/dbus-uuidgen \
+               ${bindir}/dbus-cleanup-sockets \
+               ${bindir}/dbus-send \
+               ${bindir}/dbus-monitor \
+               ${bindir}/dbus-launch \
+               ${bindir}/dbus-run-session \
+               ${bindir}/dbus-update-activation-environment \
+               ${libexecdir}/dbus* \
+               ${sysconfdir} \
+               ${localstatedir} \
+               ${datadir}/dbus-1/services \
+               ${datadir}/dbus-1/system-services \
+               ${datadir}/dbus-1/session.d \
+               ${datadir}/dbus-1/session.conf \
+               ${datadir}/dbus-1/system.d \
+               ${datadir}/dbus-1/system.conf \
+               ${datadir}/xml/dbus-1 \
+               ${systemd_system_unitdir} \
+               ${systemd_user_unitdir} \
+               ${nonarch_libdir}/sysusers.d/dbus.conf \
+               ${nonarch_libdir}/tmpfiles.d/dbus.conf \
+"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+RRECOMMENDS_${PN}-lib = "${PN}"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
+
+PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
+pkg_postinst_dbus() {
+	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
+        if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+		if [ -n "$D" ]; then
+			OPTS="--root=$D"
+		fi
+		systemctl $OPTS mask dbus-1.service
+	fi
+
+	if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+		/etc/init.d/populate-volatile.sh update
+	fi
+}
+
+EXTRA_OECONF = "--disable-tests \
+                --disable-xml-docs \
+                --disable-doxygen-docs \
+                --disable-libaudit \
+                --enable-largefile \
+                "
+
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+EXTRA_OECONF_append_class-native = " --disable-selinux"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+	autotools_do_install
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/init.d
+		sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
+		install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
+	fi
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
+			install -d ${D}${systemd_system_unitdir}/$i; done
+		install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
+		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
+		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
+		ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
+	fi
+
+	install -d ${D}${sysconfdir}/default/volatiles
+	echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
+	     > ${D}${sysconfdir}/default/volatiles/99_dbus
+
+
+	mkdir -p ${D}${localstatedir}/lib/dbus
+
+	chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
+
+	chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
+	chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
+
+	# Remove Red Hat initscript
+	rm -rf ${D}${sysconfdir}/rc.d
+
+	# Remove empty testexec directory as we don't build tests
+	rm -rf ${D}${libdir}/dbus-1.0/test
+
+	# Remove /var/run as it is created on startup
+	rm -rf ${D}${localstatedir}/run
+}
+
+do_install_class-native() {
+	autotools_do_install
+
+	# for dbus-glib-native introspection generation
+	install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
+	# N.B. is below install actually required?
+	install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
+
+	# dbus-glib-native and dbus-glib need this xml file
+	./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
+	
+	# dbus-launch has no X support so lets not install it in case the host
+	# has a more featured and useful version
+	rm -f ${D}${bindir}/dbus-launch
+}
+
+do_install_class-nativesdk() {
+	autotools_do_install
+
+	# dbus-launch has no X support so lets not install it in case the host
+	# has a more featured and useful version
+	rm -f ${D}${bindir}/dbus-launch
+
+	# Remove /var/run to avoid QA error
+	rm -rf ${D}${localstatedir}/run
+}
+BBCLASSEXTEND = "native nativesdk"
+
+INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
index 7539d20..60c6a29 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0004-fix-2kb-keys.patch
@@ -5,18 +5,15 @@
  kex.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/kex.h b/kex.h
-index 72430e9..375c677 100644
---- a/kex.h
-+++ b/kex.h
-@@ -67,6 +67,6 @@ struct KEXState {
- };
+Index: dropbear-2017.75/kex.h
+===================================================================
+--- dropbear-2017.75.orig/kex.h
++++ dropbear-2017.75/kex.h
+@@ -106,6 +106,6 @@ int curve25519_donna(unsigned char *out,
+ #endif
  
  
 -#define MAX_KEXHASHBUF 2000
 +#define MAX_KEXHASHBUF 3000
  
- #endif /* _KEX_H_ */
--- 
-1.7.11.7
-
+ #endif /* DROPBEAR_KEX_H_ */
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc b/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
deleted file mode 100644
index 0ee6c27..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "A stream-oriented XML parser library"
-DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
-HOMEPAGE = "http://expat.sourceforge.net/"
-SECTION = "libs"
-LICENSE = "MIT"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
-           file://autotools.patch \
-           file://libtool-tag.patch \
-	  "
-
-SRC_URI_append_class-native = " file://no_getrandom.patch"
-
-inherit autotools lib_package
-
-# This package uses an archive format known to have issue with some
-# versions of gzip
-DEPENDS += "pigz-native"
-do_unpack[depends] += "pigz-native:do_populate_sysroot"
-
-do_configure_prepend () {
-	rm -f ${S}/conftools/libtool.m4
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
index 3d3c5ba..104717e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
@@ -10,11 +10,12 @@
 
 Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
 
-diff -Nurd expat-2.1.0/configure.in expat-2.1.0/configure.in
---- expat-2.1.0/configure.ac	2012-03-04 01:45:53.000000000 +0200
-+++ expat-2.1.0/configure.ac	2012-05-10 21:04:44.000000000 +0300
-@@ -51,8 +51,6 @@
- 
+Index: expat-2.2.5/configure.ac
+===================================================================
+--- expat-2.2.5.orig/configure.ac
++++ expat-2.2.5/configure.ac
+@@ -53,8 +53,6 @@ LIBAGE=6       # CMakeLists.txt!
+ CPPFLAGS="${CPPFLAGS} -DHAVE_EXPAT_CONFIG_H"
  AC_CONFIG_HEADER(expat_config.h)
  
 -sinclude(conftools/ac_c_bigendian_cross.m4)
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
index 3ef4197..0a0aed2 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/libtool-tag.patch
@@ -1,18 +1,30 @@
+From 10342e6b600858b091bc7771e454d9e06af06410 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Nov 2017 18:20:57 +0800
+Subject: [PATCH] Add CC tag to build
+
 Add CC tag to build
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: expat-2.2.2/Makefile.in
-===================================================================
---- expat-2.2.2.orig/Makefile.in
-+++ expat-2.2.2/Makefile.in
-@@ -109,7 +109,7 @@ mkdir-init:
- 
- CC = @CC@
- CXX = @CXX@
+diff --git a/Makefile.in b/Makefile.in
+index 9560a95..d444bd6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -319,7 +319,7 @@ LIBCURRENT = @LIBCURRENT@
+ LIBOBJS = @LIBOBJS@
+ LIBREVISION = @LIBREVISION@
+ LIBS = @LIBS@
 -LIBTOOL = @LIBTOOL@
 +LIBTOOL = @LIBTOOL@ --tag CC
- 
- INCLUDES = -I$(srcdir)/lib -I.
- LDFLAGS = @LDFLAGS@
+ LIPO = @LIPO@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch
deleted file mode 100644
index d64f1bf..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat/no_getrandom.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-The native version of expat may be used on older systems which dont have glibc 2.25
-and hence don't have getrandom() thanks to uninative. Disable the libc call and
-use the syscall instead to avoid a compatibility issue until we have 2.25 everywhere
-we support with uninative.
-
-RP
-2017/8/14
-
-Upstream-Status: Inappropriate
-
-Index: expat-2.2.3/configure.ac
-===================================================================
---- expat-2.2.3.orig/configure.ac
-+++ expat-2.2.3/configure.ac
-@@ -151,7 +151,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
-   #include <stdlib.h>  /* for NULL */
-   #include <sys/random.h>
-   int main() {
--    return getrandom(NULL, 0U, 0U);
-+    return getrandomBREAKME(NULL, 0U, 0U);
-   }
- ])], [
-     AC_DEFINE([HAVE_GETRANDOM], [1],
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
deleted file mode 100644
index abf8450..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.3.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require expat.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
-SRC_URI[md5sum] = "f053af63ef5f39bd9b78d01fbc203334"
-SRC_URI[sha256sum] = "b31890fb02f85c002a67491923f89bda5028a880fd6c374f707193ad81aace5f"
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb
new file mode 100644
index 0000000..c68a2ef
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.5.bb
@@ -0,0 +1,23 @@
+SUMMARY = "A stream-oriented XML parser library"
+DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
+HOMEPAGE = "http://expat.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "MIT"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
+           file://autotools.patch \
+           file://libtool-tag.patch \
+	  "
+
+SRC_URI[md5sum] = "789e297f547980fc9ecc036f9a070d49"
+SRC_URI[sha256sum] = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6"
+
+inherit autotools lib_package
+
+do_configure_prepend () {
+	rm -f ${S}/conftools/libtool.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
new file mode 100644
index 0000000..6156a15
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
@@ -0,0 +1,321 @@
+For reasons which I just can't fathom gnulib doesn't use the expected tools to
+find libraries but badly reinvents the wheel.  This will trivially lead to host
+contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad
+canonicalisation resulting in relative paths).
+
+Simply delete all the crazy, and replace with a single call to pkg-config.
+
+Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4
+index f79ea82f1..1f67274db 100644
+--- a/gettext-tools/gnulib-m4/libcroco.m4
++++ b/gettext-tools/gnulib-m4/libcroco.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+ 
+ AC_DEFUN([gl_LIBCROCO],
+ [
++  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+   dnl libcroco depends on libglib.
+   AC_REQUIRE([gl_LIBGLIB])
+ 
+@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO],
+   LTLIBCROCO=
+   INCCROCO=
+   if test "$gl_cv_libcroco_use_included" != yes; then
+-    dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to
+-    dnl use the included one.
+-    AC_CACHE_VAL([gl_cv_libcroco], [
+-      gl_cv_libcroco=no
+-      gl_cv_LIBCROCO=
+-      gl_cv_LTLIBCROCO=
+-      gl_cv_INCCROCO=
+-      gl_save_LIBS="$LIBS"
+-      dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and
+-      dnl INCCROCO_0_6 accordingly.
+-      dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when
+-      dnl cross-compiling or when the C compiler in use is different from the
+-      dnl one that built the library.
+-      AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0])
+-      LIBS="$gl_save_LIBS $LIBCROCO_0_6"
+-      AC_TRY_LINK([#include <libcroco-config.h>],
+-        [const char *version = LIBCROCO_VERSION; return !version;],
+-        [gl_cv_libcroco=yes
+-         gl_cv_LIBCROCO="$LIBCROCO_0_6"
+-         gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+-        ])
+-      if test "$gl_cv_libcroco" != yes; then
+-        gl_save_CPPFLAGS="$CPPFLAGS"
+-        CPPFLAGS="$CPPFLAGS $INCCROCO_0_6"
+-        AC_TRY_LINK([#include <libcroco-config.h>],
+-          [const char *version = LIBCROCO_VERSION; return !version;],
+-          [gl_cv_libcroco=yes
+-           gl_cv_LIBCROCO="$LIBCROCO_0_6"
+-           gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+-           gl_cv_INCCROCO="$INCCROCO_0_6"
+-          ])
+-        if test "$gl_cv_libcroco" != yes; then
+-          dnl Often the include files are installed in
+-          dnl /usr/include/libcroco-0.6/libcroco.
+-          AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>],
+-            [const char *version = LIBCROCO_VERSION; return !version;],
+-            [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])
+-             libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
+-             if test -d "$libcroco_include_dir"; then
+-               gl_cv_libcroco=yes
+-               gl_cv_LIBCROCO="$LIBCROCO_0_6"
+-               gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
+-               gl_cv_INCCROCO="-I$libcroco_include_dir"
+-             fi
+-            ])
+-        fi
+-        CPPFLAGS="$gl_save_CPPFLAGS"
+-      fi
+-      LIBS="$gl_save_LIBS"
+-    ])
+-    AC_MSG_CHECKING([for libcroco])
+-    AC_MSG_RESULT([$gl_cv_libcroco])
+-    if test $gl_cv_libcroco = yes; then
+-      LIBCROCO="$gl_cv_LIBCROCO"
+-      LTLIBCROCO="$gl_cv_LTLIBCROCO"
+-      INCCROCO="$gl_cv_INCCROCO"
+-    else
+-      gl_cv_libcroco_use_included=yes
+-    fi
++    PKG_CHECK_MODULES([CROCO], [libcroco-0.6])
++    LIBCROCO=$CROCO_LIBS
++    LTLIBCROCO=$CROCO_LIBS
++    INCCROCO=$CROCO_CFLAGS
+   fi
+   AC_SUBST([LIBCROCO])
+   AC_SUBST([LTLIBCROCO])
+diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4
+index 42e55e6fd..ab25a5b22 100644
+--- a/gettext-tools/gnulib-m4/libglib.m4
++++ b/gettext-tools/gnulib-m4/libglib.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+ 
+ AC_DEFUN([gl_LIBGLIB],
+ [
++  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+   AC_MSG_CHECKING([whether included glib is requested])
+   AC_ARG_WITH([included-glib],
+     [  --with-included-glib    use the glib2 included here],
+@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB],
+   LTLIBGLIB=
+   INCGLIB=
+   if test "$gl_cv_libglib_use_included" != yes; then
+-    dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use
+-    dnl the included one.
+-    AC_CACHE_VAL([gl_cv_libglib], [
+-      gl_cv_libglib=no
+-      gl_cv_LIBGLIB=
+-      gl_cv_LTLIBGLIB=
+-      gl_cv_INCGLIB=
+-      gl_save_LIBS="$LIBS"
+-      dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and
+-      dnl INCGLIB_2_0 accordingly.
+-      dnl Don't use glib-config nor pkg-config, since it doesn't work when
+-      dnl cross-compiling or when the C compiler in use is different from the
+-      dnl one that built the library.
+-      AC_LIB_LINKFLAGS_BODY([glib-2.0])
+-      LIBS="$gl_save_LIBS $LIBGLIB_2_0"
+-      AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+-        [g_string_new ("foo");],
+-        [gl_cv_libglib=yes
+-         gl_cv_LIBGLIB="$LIBGLIB_2_0"
+-         gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+-        ])
+-      if test "$gl_cv_libglib" != yes; then
+-        gl_save_CPPFLAGS="$CPPFLAGS"
+-        CPPFLAGS="$CPPFLAGS $INCGLIB_2_0"
+-        AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+-          [g_string_new ("foo");],
+-          [gl_cv_libglib=yes
+-           gl_cv_LIBGLIB="$LIBGLIB_2_0"
+-           gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+-           gl_cv_INCGLIB="$INCGLIB_2_0"
+-          ])
+-        if test "$gl_cv_libglib" != yes; then
+-          dnl Often the include files are installed in /usr/include/glib-2.0
+-          dnl and /usr/lib/glib-2.0/include.
+-          if test -n "$LIBGLIB_2_0_PREFIX"; then
+-            CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+-            AC_TRY_LINK([#include <glib.h>
+-#ifndef G_BEGIN_DECLS
+-error this glib.h includes a glibconfig.h from a glib version 1.x
+-#endif
+-],
+-              [g_string_new ("foo");],
+-              [gl_cv_libglib=yes
+-               gl_cv_LIBGLIB="$LIBGLIB_2_0"
+-               gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
+-               gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
+-              ])
+-          fi
+-        fi
+-        CPPFLAGS="$gl_save_CPPFLAGS"
+-      fi
+-      LIBS="$gl_save_LIBS"
+-    ])
+-    AC_MSG_CHECKING([for glib])
+-    AC_MSG_RESULT([$gl_cv_libglib])
+-    if test $gl_cv_libglib = yes; then
+-      LIBGLIB="$gl_cv_LIBGLIB"
+-      LTLIBGLIB="$gl_cv_LTLIBGLIB"
+-      INCGLIB="$gl_cv_INCGLIB"
+-    else
+-      gl_cv_libglib_use_included=yes
+-    fi
++    PKG_CHECK_MODULES([GLIB], [glib-2.0])
++    LIBGLIB="$GLIB_LIBS"
++    LTLIBGLIB="$GLIB_LIBS"
++    INCGLIB="$GLIB_CFLAGS"
+   fi
+   AC_SUBST([LIBGLIB])
+   AC_SUBST([LTLIBGLIB])
+diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4
+index 480c700d2..cb39309d5 100644
+--- a/gettext-tools/gnulib-m4/libxml.m4
++++ b/gettext-tools/gnulib-m4/libxml.m4
+@@ -8,6 +8,7 @@ dnl From Bruno Haible.
+
+ AC_DEFUN([gl_LIBXML],
+ [
++  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+   AC_REQUIRE([AM_ICONV_LINK])
+
+   AC_MSG_CHECKING([whether included libxml is requested])
+@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML],
+   LTLIBXML=
+   INCXML=
+   if test "$gl_cv_libxml_use_included" != yes; then
+-    dnl Figure out whether we can use a preinstalled libxml2, or have to use
+-    dnl the included one.
+-    AC_CACHE_VAL([gl_cv_libxml], [
+-      gl_cv_libxml=no
+-      gl_cv_LIBXML=
+-      gl_cv_LTLIBXML=
+-      gl_cv_INCXML=
+-      gl_save_LIBS="$LIBS"
+-      LIBS="$LIBS $LIBICONV"
+-      dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2
+-      dnl accordingly.
+-      dnl Don't use xml2-config nor pkg-config, since it doesn't work when
+-      dnl cross-compiling or when the C compiler in use is different from the
+-      dnl one that built the library.
+-      dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x,
+-      dnl libxml2 is built in such a way that uses of xmlFree work fine with
+-      dnl -Wl,--enable-auto-import but lead to a link error with
+-      dnl -Wl,--disable-auto-import.
+-      AC_LIB_LINKFLAGS_BODY([xml2])
+-      LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
+-      AC_TRY_LINK([#include <libxml/xmlversion.h>
+-                   #include <libxml/xmlmemory.h>
+-                   #include <libxml/xpath.h>
+-                  ],
+-        [xmlCheckVersion (0);
+-         xmlFree ((void *) 0);
+-         xmlXPathSetContextNode ((void *)0, (void *)0);
+-        ],
+-        [gl_cv_libxml=yes
+-         gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+-         gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+-        ])
+-      if test "$gl_cv_libxml" != yes; then
+-        gl_save_CPPFLAGS="$CPPFLAGS"
+-        CPPFLAGS="$CPPFLAGS $INCXML2"
+-        AC_TRY_LINK([#include <libxml/xmlversion.h>
+-                     #include <libxml/xmlmemory.h>
+-                     #include <libxml/xpath.h>
+-                    ],
+-          [xmlCheckVersion (0);
+-           xmlFree ((void *) 0);
+-           xmlXPathSetContextNode ((void *)0, (void *)0);
+-          ],
+-          [gl_cv_libxml=yes
+-           gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+-           gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+-           gl_cv_INCXML="$INCXML2"
+-          ])
+-        if test "$gl_cv_libxml" != yes; then
+-          dnl Often the include files are installed in /usr/include/libxml2.
+-          dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained.
+-          dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is
+-          dnl self-contained.
+-          libxml2_include_dir=
+-          AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>],
+-            [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h])
+-             libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
+-            ])
+-          if test -z "$libxml2_include_dir"; then
+-            AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>],
+-              [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h])
+-               libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
+-              ])
+-          fi
+-          if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then
+-            CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir"
+-            AC_TRY_LINK([#include <libxml/xmlversion.h>
+-                         #include <libxml/xmlmemory.h>
+-                         #include <libxml/xpath.h>
+-                        ],
+-              [xmlCheckVersion (0);
+-               xmlFree ((void *) 0);
+-               xmlXPathSetContextNode ((void *)0, (void *)0);
+-              ],
+-              [gl_cv_libxml=yes
+-               gl_cv_LIBXML="$LIBXML2 $LIBICONV"
+-               gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
+-               gl_cv_INCXML="-I$libxml2_include_dir"
+-              ])
+-          fi
+-        fi
+-        CPPFLAGS="$gl_save_CPPFLAGS"
+-      fi
+-      LIBS="$gl_save_LIBS"
+-    ])
+-    AC_MSG_CHECKING([for libxml])
+-    AC_MSG_RESULT([$gl_cv_libxml])
+-    if test $gl_cv_libxml = yes; then
+-      LIBXML="$gl_cv_LIBXML"
+-      LTLIBXML="$gl_cv_LTLIBXML"
+-      INCXML="$gl_cv_INCXML"
+-    else
+-      gl_cv_libxml_use_included=yes
+-    fi
++    PKG_CHECK_MODULES([XML], [libxml-2.0])
++    LIBXML=$XML_LIBS
++    LTLIBXML=$XML_LIBS
++    INCXML=$XML_CFLAGS
+   fi
+   AC_SUBST([LIBXML])
+   AC_SUBST([LTLIBXML])
+diff --git a/gnulib-local/lib/term-styled-ostream.oo.c b/gnulib-local/lib/term-styled-ostream.oo.c
+index 81a407467..218565329 100644
+--- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
++++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c
+@@ -25,4 +25,4 @@
+-#include <cr-om-parser.h>
+-#include <cr-sel-eng.h>
+-#include <cr-style.h>
+-#include <cr-rgb.h>
++#include <libcroco/cr-om-parser.h>
++#include <libcroco/cr-sel-eng.h>
++#include <libcroco/cr-style.h>
++#include <libcroco/cr-rgb.h>
+@@ -31 +31 @@
+-# include <cr-fonts.h>
++# include <libcroco/cr-fonts.h>
+@@ -33 +33 @@
+-#include <cr-string.h>
++#include <libcroco/cr-string.h>
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
index c2059e6..68f5cc3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -8,7 +8,7 @@
 LICENSE = "GPLv3+ & LGPL-2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-DEPENDS = "gettext-native virtual/libiconv expat"
+DEPENDS = "gettext-native virtual/libiconv"
 DEPENDS_class-native = "gettext-minimal-native"
 PROVIDES = "virtual/libintl virtual/gettext"
 PROVIDES_class-native = "virtual/gettext-native"
@@ -17,14 +17,13 @@
 	   file://parallel.patch \
 	   file://add-with-bisonlocaledir.patch \
 	   file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
+	   file://use-pkgconfig.patch \
 "
 
 SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
 SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"
 
-PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-
-inherit autotools texinfo
+inherit autotools texinfo pkgconfig
 
 EXTRA_OECONF += "--without-lispdir \
                  --disable-csharp \
@@ -33,18 +32,26 @@
                  --disable-native-java \
                  --disable-openmp \
                  --disable-acl \
-                 --with-included-glib \
                  --without-emacs \
                  --without-cvs \
                  --without-git \
-                 --with-included-libxml \
-                 --with-included-libcroco \
-                 --with-included-libunistring \
                 "
 EXTRA_OECONF_append_class-target = " \
                  --with-bisonlocaledir=${datadir}/locale \
 "
 
+PACKAGECONFIG ??= "croco glib libxml"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco"
+PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0"
+PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2"
+# Need paths here to avoid host contamination but this can cause RPATH warnings
+# or problems if $libdir isn't $prefix/lib.
+PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring"
+PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
+
 acpaths = '-I ${S}/gettext-runtime/m4 \
            -I ${S}/gettext-tools/m4'
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
index 41a190e..67ca624 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
@@ -1,7 +1,7 @@
-From 41534253b6b61ed4769eb6a3966698a50ee73b71 Mon Sep 17 00:00:00 2001
+From 2acf40361eecd17c6981743dabd06e25a9934258 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 12 Jun 2015 17:08:46 +0300
-Subject: [PATCH] Remove the warning about deprecated paths in schemas
+Subject: [PATCH 05/10] Remove the warning about deprecated paths in schemas
 
 Some schemas in gsettings-desktop-schemas (such as proxy and locale)
 are still using deprecated paths, as of 3.16.1. This causes warning
@@ -11,26 +11,33 @@
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
- gio/glib-compile-schemas.c | 6 ------
- 1 file changed, 6 deletions(-)
+ gio/glib-compile-schemas.c | 13 -------------
+ 1 file changed, 13 deletions(-)
 
 diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
-index e42949b..ec79d7c 100644
+index b8de090..130f89b 100644
 --- a/gio/glib-compile-schemas.c
 +++ b/gio/glib-compile-schemas.c
-@@ -1202,12 +1202,6 @@ parse_state_start_schema (ParseState  *state,
+@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState  *state,
        return;
      }
  
 -  if (path && (g_str_has_prefix (path, "/apps/") ||
 -               g_str_has_prefix (path, "/desktop/") ||
 -               g_str_has_prefix (path, "/system/")))
--    g_printerr ("warning: Schema '%s' has path '%s'.  Paths starting with "
--                "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path);
+-    {
+-      gchar *message = NULL;
+-      message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”.  "
+-                                   "Paths starting with "
+-                                   "“/apps/”, “/desktop/” or “/system/” are deprecated."),
+-                                 id, path);
+-      g_printerr ("%s\n", message);
+-      g_free (message);
+-    }
 -
    state->schema_state = schema_state_new (path, gettext_domain,
                                            extends, extends_name, list_of);
  
 -- 
-2.1.4
+2.14.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
new file mode 100644
index 0000000..697d63d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
@@ -0,0 +1,46 @@
+From b9160d951b9af647b97766c57295ca4f45cf9521 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 3 Oct 2017 10:45:55 +0300
+Subject: [PATCH 10/10] Do not hardcode python path into various tools
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +-
+ gobject/glib-genmarshal.in             | 2 +-
+ gobject/glib-mkenums.in                | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+index 8050981..e693ef3 100644
+--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+ 
+ # GDBus - GLib D-Bus Library
+ #
+diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
+index 09e8408..b2f9d99 100755
+--- a/gobject/glib-genmarshal.in
++++ b/gobject/glib-genmarshal.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+ 
+ # pylint: disable=too-many-lines, missing-docstring, invalid-name
+ 
+diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
+index d4bfd11..051fce4 100755
+--- a/gobject/glib-mkenums.in
++++ b/gobject/glib-mkenums.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env @PYTHON@
++#!/usr/bin/env python3
+ 
+ # If the code below looks horrible and unpythonic, do not panic.
+ #
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index 9b4ded1..b98f933 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -1,7 +1,7 @@
-From 310dfe1bdd16d4b254732fcc202c6211629bc7b6 Mon Sep 17 00:00:00 2001
+From d762907d33b81cf7469b5696c87f2188d2050afb Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Mon, 9 Nov 2015 11:07:27 +0200
-Subject: [PATCH] Enable more tests while cross-compiling
+Subject: [PATCH 06/10] Enable more tests while cross-compiling
 
 Upstream disables a few tests while cross-compiling because their build requires
 running other built binaries. This usually makes sense but in the cross-compile
@@ -9,16 +9,17 @@
 
 Upstream-Status: Inappropriate [OE specific]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
 ---
- gio/tests/Makefile.am     | 8 +++-----
- tests/gobject/Makefile.am | 8 +++-----
- 2 files changed, 6 insertions(+), 10 deletions(-)
+ gio/tests/Makefile.am     | 10 ++++++----
+ tests/gobject/Makefile.am |  8 +++++---
+ 2 files changed, 11 insertions(+), 7 deletions(-)
 
 diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
-index 868873f..533e454 100644
+index acc1da4..9176640 100644
 --- a/gio/tests/Makefile.am
 +++ b/gio/tests/Makefile.am
-@@ -503,10 +503,9 @@ test_programs += \
+@@ -516,10 +516,9 @@ test_programs += \
  endif
  
  # -----------------------------------------------------------------------------
@@ -31,7 +32,7 @@
  test_programs += resources
  resources_SOURCES = resources.c
  nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
-@@ -528,7 +527,11 @@ if !ENABLE_INSTALLED_TESTS
+@@ -543,7 +542,11 @@ if !ENABLE_INSTALLED_TESTS
  libresourceplugin_la_LDFLAGS += -rpath /
  endif
  
@@ -41,18 +42,18 @@
 +glib_compile_resources=glib-compile-resources
 +endif
  
- resources.o: test_resources2.h
- test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
-@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
+ test-generated.txt: test1.txt
+ 	$(AM_V_GEN) echo "Generated" > $@ && \
+@@ -564,7 +567,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
  
  EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
  CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
 -endif # !CROSS_COMPILING
  
- BUILT_SOURCES += giotypefuncs.c
+ BUILT_SOURCES += giotypefuncs.inc
  
 diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
-index 16f2827..4c2208e 100644
+index 656941d..68555ff 100644
 --- a/tests/gobject/Makefile.am
 +++ b/tests/gobject/Makefile.am
 @@ -48,10 +48,13 @@ if ENABLE_TIMELOOP
@@ -79,3 +80,6 @@
  
  dist-hook: $(BUILT_EXTRA_DIST)
  	files='$(BUILT_EXTRA_DIST)';				\
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
index aa5de27..59b8913 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
@@ -1,7 +1,7 @@
-From e8740833336c59d6f616a1781b256e648e338c26 Mon Sep 17 00:00:00 2001
+From 1dd1e6ddca5deada049bac2e1ee1fe4ecc5342c5 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Sat, 28 Apr 2012 18:24:50 +0200
-Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
+Subject: [PATCH 01/10] configure: use $host_alias-libtool instead of libtool
  directly
 
 Poky renames libtool to $host_alias-libtool.
@@ -18,24 +18,16 @@
 Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
 ---
- configure.ac | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 1af90c5..f6b7a73 100644
+index 6fa6eb0..b6f78a6 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1378,7 +1378,7 @@ if test x"$glib_native_win32" = xyes; then
-   G_MODULE_LDFLAGS=
- else
-   export SED
--  G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+  G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- fi
- dnl G_MODULE_IMPL= don't reset, so cmd-line can override
- G_MODULE_NEED_USCORE=0
-@@ -1427,13 +1427,13 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
+@@ -1428,9 +1428,9 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
  	LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
  dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
  	echo "void glib_plugin_test(void) { }" > plugin.c
@@ -47,20 +39,6 @@
  		${LDFLAGS} -module -o plugin.la -export-dynamic \
  		-shrext ".o" -avoid-version plugin.lo \
  		-rpath /dont/care >/dev/null 2>&1
--	eval `./libtool --config | grep ^objdir`
-+	eval `./$host_alias-libtool --config | grep ^objdir`
- 	AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
- 		glib_cv_rtldglobal_broken,[
- 		AC_TRY_RUN([
-@@ -1506,7 +1506,7 @@ fi
- 
- AC_MSG_CHECKING(for the suffix of module shared libraries)
- export SED
--shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
-+shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
- eval $shrext_cmds
- module=yes eval std_shrext=$shrext_cmds
- # chop the initial dot
 -- 
-1.9.1
+2.14.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb
deleted file mode 100644
index b1fe600..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.52.3.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require glib.inc
-
-PE = "1"
-
-SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
-           file://configure-libtool.patch \
-           file://run-ptest \
-           file://ptest-paths.patch \
-           file://uclibc_musl_translation.patch \
-           file://allow-run-media-sdX-drive-mount-if-username-root.patch \
-           file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
-           file://Enable-more-tests-while-cross-compiling.patch \
-           file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
-           file://0001-Do-not-ignore-return-value-of-write.patch \
-           file://0001-Test-for-pthread_getname_np-before-using-it.patch \
-           "
-
-SRC_URI_append_class-native = " file://relocate-modules.patch"
-
-SRC_URI[md5sum] = "89265d0289a436e99cad54491eb21ef4"
-SRC_URI[sha256sum] = "25ee7635a7c0fcd4ec91cbc3ae07c7f8f5ce621d8183511f414ded09e7e4e128"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
new file mode 100644
index 0000000..faf5945
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
@@ -0,0 +1,24 @@
+require glib.inc
+
+PE = "1"
+
+SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
+           file://configure-libtool.patch \
+           file://run-ptest \
+           file://ptest-paths.patch \
+           file://uclibc_musl_translation.patch \
+           file://allow-run-media-sdX-drive-mount-if-username-root.patch \
+           file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
+           file://Enable-more-tests-while-cross-compiling.patch \
+           file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
+           file://0001-Do-not-ignore-return-value-of-write.patch \
+           file://0001-Test-for-pthread_getname_np-before-using-it.patch \
+           file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
+           "
+
+SRC_URI_append_class-native = " file://relocate-modules.patch"
+
+SRC_URI[md5sum] = "16e886ad677bf07b7d48eb8188bcf759"
+SRC_URI[sha256sum] = "963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
index 4cdf141..f645ed6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
@@ -3,12 +3,12 @@
 HOMEPAGE = "https://developer.gnome.org/glib/"
 
 # pcre is under BSD;
-# docs/reference/COPYING is with a 'public domai'-like license!
-LICENSE = "LGPLv2+ & BSD & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://glib/glib.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
-                    file://gmodule/COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://gmodule/gmodule.h;beginline=4;endline=17;md5=b4f0f4a399c19e5ebb20c31b79d6bc32 \
+# docs/reference/COPYING is with a 'public domain'-like license!
+LICENSE = "LGPLv2.1+ & BSD & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
+                    file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \
                     file://glib/pcre/COPYING;md5=266ebc3ff74ee9ce6fad65577667c0f4 \
                     file://glib/pcre/pcre.h;beginline=11;endline=35;md5=de27f2bf633d20a2b7af0b1983423283 \
                     file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
@@ -19,16 +19,18 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-DEPENDS = "virtual/libiconv libffi zlib glib-2.0-native"
-DEPENDS_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' dbus', '', d)}"
-DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
-DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib glib-2.0-native"
+DEPENDS = "glib-2.0-native \
+           virtual/libintl \
+           virtual/libiconv \
+           libffi \
+           zlib \
+           ${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus', '', d)}"
 
 PACKAGES += "${PN}-codegen ${PN}-utils"
 
 LEAD_SONAME = "libglib-2.0.*"
 
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native manpages
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages
 
 S = "${WORKDIR}/glib-${PV}"
 
@@ -47,7 +49,7 @@
 EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
 
 # Tell configure that we'll have dbus-daemon on the target for the tests
-EXTRA_OECONF_class-target_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
 
 do_configure_prepend() {
 	sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -83,7 +85,14 @@
 # doesn't support mips16e
 CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1"
 
-USE_NLS = "yes"
+# GLib generally requires gettext to be present so for USE_NLS to yes.  For
+# native builds as i18n is disabled globally we can tell it to use a fake msgfmt.
+USE_NLS_class-target = "yes"
+USE_NLS_class-nativesdk = "yes"
+CACHED_CONFIGUREVARS_append_class-native = " ac_cv_path_MSGFMT=/bin/false"
+
+EXEEXT = ""
+EXEEXT_mingw32 = ".exe"
 
 do_install_append () {
 	if [ -f ${D}${bindir}/gtester-report ]; then
@@ -95,15 +104,14 @@
 	rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
 	rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
 
-	# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
-	# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
-	if [ -f ${D}${bindir}/glib-mkenums ]; then
-		sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
-	fi
-
 	if [ -e ${D}${libdir}/charset.alias ]; then
 		rm -f ${D}${libdir}/charset.alias
 	fi
+
+        # Make sure gio-querymodules is unique among multilibs
+        if test "x${MLPREFIX}" != "x"; then
+                mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
+        fi
 }
 
 do_install_append_class-target () {
@@ -114,18 +122,12 @@
 			rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
 		fi
 	fi
-
-	# Make sure gio-querymodules is unique among multilibs
-	if test "x${MLPREFIX}" != "x"; then
-		mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
-	fi
 }
 
-RDEPENDS_${PN}-codegen += "\
-            python3 \
-            python3-distutils \
-            python3-xml \
-           "
+CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
+CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
+
+RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
 
 RDEPENDS_${PN}-ptest += "\
             dbus \
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb
deleted file mode 100644
index 2782bd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.50.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "GLib networking extensions"
-DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
-HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "libs"
-DEPENDS = "glib-2.0"
-
-SRC_URI[archive.md5sum] = "4d06d0224646f274918b1cb6da9a07f6"
-SRC_URI[archive.sha256sum] = "3f1a442f3c2a734946983532ce59ed49120319fdb10c938447c373d5e5286bee"
-
-PACKAGECONFIG ??= "ca-certificates gnutls"
-
-# No explicit dependency as it works without ca-certificates installed
-PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
-
-EXTRA_OECONF = "--without-gnome-proxy"
-
-inherit gnomebase gettext upstream-version-is-even gio-module-cache
-
-FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
-FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
-FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb
new file mode 100644
index 0000000..2a6f8af
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.54.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "GLib networking extensions"
+DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
+HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+SECTION = "libs"
+DEPENDS = "glib-2.0"
+
+SRC_URI[archive.md5sum] = "99867463f182c2767bce0c74bc9cc981"
+SRC_URI[archive.sha256sum] = "eaa787b653015a0de31c928e9a17eb57b4ce23c8cf6f277afaec0d685335012f"
+
+PACKAGECONFIG ??= "ca-certificates gnutls"
+
+# No explicit dependency as it works without ca-certificates installed
+PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
+PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
+
+EXTRA_OECONF = "--without-gnome-proxy"
+
+inherit gnomebase gettext upstream-version-is-even gio-module-cache
+
+FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
+FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
+FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb
deleted file mode 100644
index 744085f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.26.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Cross locale generation tool for glibc"
-HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
-      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
-      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-# Tell autotools that we're working in the localedef directory
-#
-AUTOTOOLS_SCRIPT_PATH = "${S}/localedef"
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
-
-SRCBRANCH ?= "release/${PV}/master"
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRCREV_glibc ?= "d300041c533a3d837c9f37a099bcc95466860e98"
-SRCREV_localedef ?= "dfb4afe551c6c6e94f9cc85417bd1f582168c843"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
-           git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
-           file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
-           file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
-           file://0017-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
-           file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0021-eglibc-Install-PIC-archives.patch \
-           file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
-           file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
-           file://archive-path.patch \
-"
-# Makes for a rather long rev (22 characters), but...
-#
-SRCREV_FORMAT = "glibc_localedef"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--with-glibc=${S}"
-CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
new file mode 100644
index 0000000..5e92eb7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Cross locale generation tool for glibc"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+# Tell autotools that we're working in the localedef directory
+#
+AUTOTOOLS_SCRIPT_PATH = "${S}/localedef"
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+SRCBRANCH ?= "release/${PV}/master"
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
+
+SRCREV_glibc ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98"
+SRCREV_localedef ?= "de5bdbd5e76b5403a4151b9b9f958b6cca36b3e7"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+           git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+           file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
+           file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
+           file://0017-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+           file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0021-eglibc-Install-PIC-archives.patch \
+           file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+           file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+           file://archive-path.patch \
+"
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc_localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
index de859d5..aa871ac 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-collateral.inc
@@ -7,7 +7,8 @@
 # This needs to match with glibc.inc, otherwise glibc-scripts and glibc-locale
 # will fail to find main glibc, for details see
 # http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 
 deltask do_fetch
 deltask do_unpack
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
index b6d8074..728bc53 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
@@ -66,7 +66,7 @@
 		rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
 	fi
 
-	oe_multilib_header bits/syscall.h bits/long-double.h
+	oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h
 
 	if [ -f ${D}${bindir}/mtrace ]; then
 		sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
@@ -97,6 +97,7 @@
 	install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
 	install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf
 	sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd
+	sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf
 
 	install -d ${D}${systemd_unitdir}/system
 	install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
@@ -117,10 +118,10 @@
 		# The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1
 		install -d ${D}${nonarch_base_libdir}
 		if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then
-			ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
+			ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
 				${D}${nonarch_base_libdir}/ld-linux-aarch64.so.1
 		elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then
-			ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
+			ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
 				${D}${nonarch_base_libdir}/ld-linux-aarch64_be.so.1
 		fi
 	fi
@@ -206,8 +207,11 @@
 	rm -rf ${D}/${localedir}
 	rm -rf ${D}${datadir}/locale
 	if [ "${libdir}" != "${exec_prefix}/lib" ]; then
-		# This dir only exists to hold locales
-		rm -rf ${D}${exec_prefix}/lib
+		if [ -d ${D}${exec_prefix}/lib/locale ] ; then
+			rm -rf ${D}${exec_prefix}/lib/locale
+			# error out if directory isn't empty
+			rm -f ${D}${exec_prefix}/lib
+		fi
 	fi
 }
 addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.27.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.26.bb
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
index 21bbdc2..ce1222b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
@@ -35,7 +35,10 @@
 DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
 # nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
 #RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+
+CRYPTPROVIDES = "virtual/crypt"
+CRYPTPROVIDES_class-nativesdk = ""
+PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc ${CRYPTPROVIDES}"
 PROVIDES += "virtual/libintl virtual/libiconv"
 inherit autotools texinfo distro_features_check systemd
 
@@ -47,6 +50,7 @@
   libc_cv_rootsbindir=${base_sbindir} \
   libc_cv_localedir=${localedir} \
   libc_cv_ssp_strong=no \
+  libc_cv_ssp_all=no \
   libc_cv_ssp=no \
 "
 
@@ -57,7 +61,8 @@
 # This needs to match with glibc-collateral.inc, otherwise glibc-scripts and glibc-locale
 # will fail to find main glibc, for details see
 # http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 
 # glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
 # PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index 19c1d9b..86234c9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,7 @@
-From 81346b2f7735698078d5bf919a78b6c0269d6fee Mon Sep 17 00:00:00 2001
+From bd91b60ce6ff01f49b173b6b45e23ce94911b2a6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH 01/25] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as
  well
 
 Upstream-Status: Inappropriate [embedded specific]
@@ -31,10 +31,10 @@
  1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index c1b6d4ba0f..d7af9ebcbc 100644
+index 7554a99b5a..a73d11a62f 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -2054,6 +2054,14 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2007,6 +2007,14 @@ _dl_map_object (struct link_map *loader, const char *name,
              }
          }
  
@@ -49,7 +49,7 @@
  #ifdef USE_LDCONFIG
        if (fd == -1
  	  && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2112,14 +2120,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2065,14 +2073,6 @@ _dl_map_object (struct link_map *loader, const char *name,
  	}
  #endif
  
@@ -65,5 +65,5 @@
        if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
  	_dl_debug_printf ("\n");
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index 2ce240b..899481f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,7 @@
-From 82f2e910ec0e2de6a9e2b007825bddfc5850575d Mon Sep 17 00:00:00 2001
+From 50736f7fc1fdc9e1f7c05f1fec75c977d9be9228 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH 02/25] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/27] nativesdk-glibc: Fix buffer overrun with a relocated
  SDK
 
 When ld-linux-*.so.2 is relocated to a path that is longer than the
@@ -22,10 +22,10 @@
  1 file changed, 12 insertions(+)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index d7af9ebcbc..19c1db9948 100644
+index a73d11a62f..62e3eee478 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -1753,7 +1753,19 @@ open_path (const char *name, size_t namelen, int mode,
+@@ -1707,7 +1707,19 @@ open_path (const char *name, size_t namelen, int mode,
         given on the command line when rtld is run directly.  */
      return -1;
  
@@ -46,5 +46,5 @@
      {
        struct r_search_path_elem *this_dir = *dirs;
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index 397e8b3..03f9991 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,7 @@
-From 490a0eb4da1af726ea5d68e3efc0d18ba94c4054 Mon Sep 17 00:00:00 2001
+From 695e1cbff6ee6db3435c33e55311c67adf44476d Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH 03/25] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl
  paths
 
 This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -26,7 +26,7 @@
  7 files changed, 14 insertions(+), 10 deletions(-)
 
 diff --git a/elf/dl-cache.c b/elf/dl-cache.c
-index e9632da0b3..4de529d2cf 100644
+index 6ee5153ff9..37a5f701fa 100644
 --- a/elf/dl-cache.c
 +++ b/elf/dl-cache.c
 @@ -133,6 +133,10 @@ do									      \
@@ -38,14 +38,14 @@
 +
 +
  int
- internal_function
  _dl_cache_libcmp (const char *p1, const char *p2)
+ {
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 19c1db9948..70c259b400 100644
+index 62e3eee478..6ddba73650 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro;
- /* Get the generated information about the trusted directories.  */
+@@ -109,8 +109,8 @@ static size_t max_capstrlen attribute_relro;
+    gen-trusted-dirs.awk.  */
  #include "trusted-dirs.h"
  
 -static const char system_dirs[] = SYSTEM_DIRS;
@@ -56,7 +56,7 @@
    SYSTEM_DIRS_LEN
  };
 diff --git a/elf/interp.c b/elf/interp.c
-index b6e8f04444..47c20415bc 100644
+index 9cd50c7291..fc2f39d73c 100644
 --- a/elf/interp.c
 +++ b/elf/interp.c
 @@ -18,5 +18,5 @@
@@ -67,7 +67,7 @@
 +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
    = RUNTIME_LINKER;
 diff --git a/elf/ldconfig.c b/elf/ldconfig.c
-index 99caf9e9bb..36ea5df5f1 100644
+index fbdd814edf..9f4d8d69b1 100644
 --- a/elf/ldconfig.c
 +++ b/elf/ldconfig.c
 @@ -168,6 +168,9 @@ static struct argp argp =
@@ -81,7 +81,7 @@
     a platform.  */
  static int
 diff --git a/elf/rtld.c b/elf/rtld.c
-index 65647fb1c8..cd8381cb33 100644
+index 453f56eb15..08e0c4c94b 100644
 --- a/elf/rtld.c
 +++ b/elf/rtld.c
 @@ -128,6 +128,7 @@ dso_name_valid_for_suid (const char *p)
@@ -92,7 +92,7 @@
  
  /* LD_AUDIT variable contents.  Must be processed before the
     audit_list below.  */
-@@ -999,12 +1000,12 @@ of this helper program; chances are you did not intend to run this program.\n\
+@@ -1000,12 +1001,12 @@ of this helper program; chances are you did not intend to run this program.\n\
    --list                list all dependencies and how they are resolved\n\
    --verify              verify that given object really is a dynamically linked\n\
  			object we can handle\n\
@@ -108,7 +108,7 @@
        ++_dl_skip_args;
        --_dl_argc;
 diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
-index 5aa055de6e..b9a14b9bd3 100644
+index d6cf9d2a3e..9fcf970144 100644
 --- a/iconv/gconv_conf.c
 +++ b/iconv/gconv_conf.c
 @@ -36,7 +36,7 @@
@@ -121,7 +121,7 @@
  /* The path elements, as determined by the __gconv_get_path function.
     All path elements end in a slash.  */
 diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
-index 1f0b8f629d..acbe68399d 100644
+index cf43f1cf3b..7f07adde53 100644
 --- a/sysdeps/generic/dl-cache.h
 +++ b/sysdeps/generic/dl-cache.h
 @@ -27,10 +27,6 @@
@@ -136,5 +136,5 @@
  # define add_system_dir(dir) add_dir (dir)
  #endif
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
index 8db47bc..f9d70c2 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -1,7 +1,7 @@
-From 8fe1b56180c30d237cc2ab9a5a9c97a0311f41da Mon Sep 17 00:00:00 2001
+From 2bafdbd7067794c6a24e5e85608c0ec4638c5667 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 31 Dec 2015 14:35:35 -0800
-Subject: [PATCH 04/25] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 04/27] nativesdk-glibc: Allow 64 bit atomics for x86
 
 The fix consist of allowing 64bit atomic ops for x86.
 This should be safe for i586 and newer CPUs.
@@ -17,7 +17,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h
-index 0e24200617..1532f52dec 100644
+index 272da5dd8f..409c759f14 100644
 --- a/sysdeps/i386/atomic-machine.h
 +++ b/sysdeps/i386/atomic-machine.h
 @@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
@@ -30,5 +30,5 @@
  #define ATOMIC_EXCHANGE_USES_CAS 0
  
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
index 956b2aa..ad9106e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -1,7 +1,7 @@
-From b9edcc845641956b7286c60c833f05a9f70cfab9 Mon Sep 17 00:00:00 2001
+From 661adfe9c220d10617bf6bb283827471c3956b01 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH 05/25] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 05/27] fsl e500/e5500/e6500/603e fsqrt implementation
 
 Upstream-Status: Pending
 Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
@@ -1580,5 +1580,5 @@
 @@ -0,0 +1 @@
 +powerpc/powerpc64/e6500/fpu
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index c74fead..a3d50fd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -1,7 +1,7 @@
-From 324202488a1c2439be345745722f5cb04c0e0847 Mon Sep 17 00:00:00 2001
+From 615598fcca64461a71d84f756d75374f02d914ad Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH 06/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+Subject: [PATCH 06/27] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
  names
 
 This bolts in a hook for OE to pass its own version of interpreter
@@ -17,7 +17,7 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/elf/readlib.c b/elf/readlib.c
-index d278a189b2..a84cb85158 100644
+index 573c01476c..d8c7412287 100644
 --- a/elf/readlib.c
 +++ b/elf/readlib.c
 @@ -51,6 +51,7 @@ static struct known_names interpreters[] =
@@ -29,5 +29,5 @@
  
  static struct known_names known_libs[] =
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
index b643276..1234df0 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -1,7 +1,7 @@
-From cf00bf9de8128171e79a019de809e35f3aeed281 Mon Sep 17 00:00:00 2001
+From 804b73ae295bdfda29341e89f2d0c1b99492dc9a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH 07/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 07/27] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
 
 on ppc fixes the errors like below
 | ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -204,5 +204,5 @@
  }
 +strong_alias (__ieee754_sqrtf, __sqrtf_finite)
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 3aeec52..1b43647 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From babe311deca9ee2730278f13b061b914b5286dc3 Mon Sep 17 00:00:00 2001
+From 1a53084249d9dae1ef4281246efc899c8f9d63ed Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH 08/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 08/27] __ieee754_sqrt{,f} are now inline functions and call
  out __slow versions
 
 Upstream-Status: Pending
@@ -383,5 +383,5 @@
 +
  strong_alias (__ieee754_sqrtf, __sqrtf_finite)
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
index 7d5c2e3..ea49856 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -1,7 +1,7 @@
-From 93b5d6bed19939039031c45b777d29619db06184 Mon Sep 17 00:00:00 2001
+From 48262b6dda935278a40374ddf0080ab6cc999582 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH 09/25] Quote from bug 1443 which explains what the patch does
+Subject: [PATCH 09/27] Quote from bug 1443 which explains what the patch does
  :
 
   We build some random program and link it with -lust.  When we run it,
@@ -45,10 +45,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
-index 7053ead16e..0b1e1716b0 100644
+index 8a00eab5e3..623edcb1bd 100644
 --- a/sysdeps/arm/dl-machine.h
 +++ b/sysdeps/arm/dl-machine.h
-@@ -500,7 +500,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+@@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
  
  	case R_ARM_TLS_DTPOFF32:
  	  if (sym != NULL)
@@ -58,5 +58,5 @@
  
  	case R_ARM_TLS_TPOFF32:
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index 7275c3e..1751318 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -1,7 +1,7 @@
-From 1a6e0f4ee8584b04226156df1a3de3e467f0ef6f Mon Sep 17 00:00:00 2001
+From 72ea5410909aef6b6aee70e7f9a88d534583aa00 Mon Sep 17 00:00:00 2001
 From: Ting Liu <b28495@freescale.com>
 Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH 10/25] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 10/27] eglibc: run libm-err-tab.pl with specific dirs in ${S}
 
 libm-err-tab.pl will parse all the files named "libm-test-ulps"
 in the given dir recursively. To avoid parsing the one in
@@ -18,10 +18,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/manual/Makefile b/manual/Makefile
-index 4ed63a8ef3..e89919eb19 100644
+index c2756640a7..1b5bb16a96 100644
 --- a/manual/Makefile
 +++ b/manual/Makefile
-@@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
+@@ -102,7 +102,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
  $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
  						     $(dir)/libm-test-ulps))
  	pwd=`pwd`; \
@@ -32,5 +32,5 @@
  	touch $@
  
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 84f2ca5..1e70b2a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From 9b2af6cbf68d3353d72519e7f6c46becb7bd1d0f Mon Sep 17 00:00:00 2001
+From 8ae998a10b24545e0c12f1f3d8be97b191178204 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH 11/25] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 11/27] __ieee754_sqrt{,f} are now inline functions and call
  out __slow versions
 
 Upstream-Status: Pending
@@ -57,5 +57,5 @@
  #endif
  {
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index 2bf6b23..c35b759 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From ffd3c5a04d8f2f26fea71fed4ce41e88b6f51086 Mon Sep 17 00:00:00 2001
+From 4f9f39761909e67bd6d29b970b7165863e33e565 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH 12/25] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 12/27] sysdeps/gnu/configure.ac: handle correctly
  $libc_cv_rootsbindir
 
 Upstream-Status:Pending
@@ -14,7 +14,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
-index 71243ad0c6..f578187576 100644
+index c15d1087e8..37cc983f2a 100644
 --- a/sysdeps/gnu/configure
 +++ b/sysdeps/gnu/configure
 @@ -32,6 +32,6 @@ case "$prefix" in
@@ -38,5 +38,5 @@
    ;;
  esac
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
index 099fe50..62c6525 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From 049cce82f35e0d864d98075b83888dbba4d68afd Mon Sep 17 00:00:00 2001
+From bba7a647b636618d5fd083e904f995f7736b9168 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH 13/25] Add unused attribute
+Subject: [PATCH 13/27] Add unused attribute
 
 Helps in avoiding gcc warning when header is is included in
 a source file which does not use both functions
@@ -17,7 +17,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
-index 18d8bd6ae7..eb729da5d3 100644
+index 123e2a62ce..63cc83ec84 100644
 --- a/iconv/gconv_charset.h
 +++ b/iconv/gconv_charset.h
 @@ -21,7 +21,7 @@
@@ -30,5 +30,5 @@
  {
    int slash_count = 0;
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
index ddc70e0..6691128 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-yes-within-the-path-sets-wrong-config-variables.patch
@@ -1,7 +1,7 @@
-From 3b904bee81a1cfe81e3f437b5f3296efd54a51ac Mon Sep 17 00:00:00 2001
+From 62f44ce3dd01a257cf67116e355492cb1659a917 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH 14/25] 'yes' within the path sets wrong config variables
+Subject: [PATCH 14/27] 'yes' within the path sets wrong config variables
 
 It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
 but being such a short word to grep it is likely to produce
@@ -165,7 +165,7 @@
    ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
  if test $libc_cv_nios2_be = yes; then
 diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
-index a5513fad48..283b293ff3 100644
+index 1ee7f41a36..77e38bebde 100644
 --- a/sysdeps/unix/sysv/linux/mips/configure
 +++ b/sysdeps/unix/sysv/linux/mips/configure
 @@ -414,11 +414,11 @@ else
@@ -199,7 +199,7 @@
  
  libc_mips_nan=
 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-index 4e7fcf1d97..44a9cb3791 100644
+index ae7f254da4..874519000b 100644
 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
 +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
 @@ -155,12 +155,12 @@ else
@@ -259,5 +259,5 @@
      ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
    if test $libc_cv_ppc64_def_call_elf = no; then
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
index b5feffa..66bf4fd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-timezone-re-written-tzselect-as-posix-sh.patch
@@ -1,7 +1,7 @@
-From b8cb8cb242cb751d888feb1ada5c4d0f05cbc1d7 Mon Sep 17 00:00:00 2001
+From ac240fb01f6470ac207968adfbe20ccc93b16f8b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH 15/25] timezone: re-written tzselect as posix sh
+Subject: [PATCH 15/27] timezone: re-written tzselect as posix sh
 
 To avoid the bash dependency.
 
@@ -15,7 +15,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/timezone/Makefile b/timezone/Makefile
-index d6cc7ba357..e4ead6e1a7 100644
+index 0194aba4a1..58e5405a05 100644
 --- a/timezone/Makefile
 +++ b/timezone/Makefile
 @@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
@@ -41,5 +41,5 @@
  # Output one argument as-is to standard output.
  # Safer than 'echo', which can mishandle '\' or leading '-'.
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
index 1d9983b..0b1ee96 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,7 +1,7 @@
-From 69d378001adfe9a359d2f4b069c1ed2d36de4480 Mon Sep 17 00:00:00 2001
+From 790b133ff2bc5b77ed8533b8999abc65ed0da02b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 31 Dec 2015 14:33:02 -0800
-Subject: [PATCH 16/25] Remove bash dependency for nscd init script
+Subject: [PATCH 16/27] Remove bash dependency for nscd init script
 
 The nscd init script uses #! /bin/bash but only really uses one bashism
 (translated strings), so remove them and switch the shell to #!/bin/sh.
@@ -71,5 +71,5 @@
  	;;
  esac
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
index 3e39d74..fd82132 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,7 +1,7 @@
-From cdc88dffa226815e3a218604655459e33dc86483 Mon Sep 17 00:00:00 2001
+From 897430bbb65a0f22284d7957206b5fd4efd6607f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH 17/25] eglibc: Cross building and testing instructions
+Subject: [PATCH 17/27] eglibc: Cross building and testing instructions
 
 Ported from eglibc
 Upstream-Status: Pending
@@ -615,5 +615,5 @@
 +  simply place copies of these libraries in the top GLIBC build
 +  directory.
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
index 02f35f4..80d547c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
-From 1161cd1c683547d29a03626d9d7de7f9cc03b74a Mon Sep 17 00:00:00 2001
+From fcfa19b69e8749477022161a808a201807ef72ec Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH 18/25] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 18/27] eglibc: Help bootstrap cross toolchain
 
 Taken from EGLIBC, r1484 + r1525
 
@@ -29,7 +29,7 @@
  create mode 100644 include/stubs-bootstrap.h
 
 diff --git a/Makefile b/Makefile
-index 3e0ae6f43b..24dc66d17c 100644
+index bea4e27f8d..8c83cfadc6 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -70,9 +70,18 @@ subdir-dirs = include
@@ -96,5 +96,5 @@
 +   EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
 +   an empty stubs.h like this will do fine for GCC.  */
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
index adb28cf..17bfe4f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Clear-cache-lines-on-ppc8xx.patch
@@ -1,7 +1,7 @@
-From 1732c7f25453c879c17701839ef34876a7357008 Mon Sep 17 00:00:00 2001
+From c6f2db0d7c5c65bfa19766a0e1ce8210111f9c7d Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 31 Dec 2015 15:15:09 -0800
-Subject: [PATCH 19/25] eglibc: Clear cache lines on ppc8xx
+Subject: [PATCH 19/27] eglibc: Clear cache lines on ppc8xx
 
 2007-06-13  Nathan Sidwell  <nathan@codesourcery.com>
             Mark Shinwell  <shinwell@codesourcery.com>
@@ -21,7 +21,7 @@
  2 files changed, 28 insertions(+), 2 deletions(-)
 
 diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-index 23f5d5d388..7e45288db7 100644
+index 78051bc7bc..e24f442320 100644
 --- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
 +++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
 @@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
@@ -48,7 +48,7 @@
  	break;
  
 diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index ad036c1e4b..afee56a3da 100644
+index f2ad0c355d..3e6773795e 100644
 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
 +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
 @@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
@@ -79,5 +79,5 @@
  	break;
  #ifndef SHARED
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
index f835d87..09f7670 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -1,7 +1,7 @@
-From 108b3a1df96a85522c52a0dec032fc2c106f5f2d Mon Sep 17 00:00:00 2001
+From 577085016bb926a687abec145557fe8cb8f5af0e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH 20/25] eglibc: Resolve __fpscr_values on SH4
+Subject: [PATCH 20/27] eglibc: Resolve __fpscr_values on SH4
 
 2010-09-29  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
             Andrew Stubbs  <ams@codesourcery.com>
@@ -33,7 +33,7 @@
      # a*
      alphasort64;
 diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index 5f11bc737b..2fd217b00b 100644
+index c4e28ffb98..648bae03d5 100644
 --- a/sysdeps/unix/sysv/linux/sh/sysdep.S
 +++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
 @@ -30,3 +30,14 @@ ENTRY (__syscall_error)
@@ -52,5 +52,5 @@
 +weak_alias (___fpscr_values, __fpscr_values)
 +
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
index 6ee397b..530f4e1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Install-PIC-archives.patch
@@ -1,7 +1,7 @@
-From 3392ee83b0132c089dffb1e9892b4b252ce1ec0e Mon Sep 17 00:00:00 2001
+From c1beab8a11985f96f5eb644e7103d343b705afc6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:57:01 +0000
-Subject: [PATCH 21/25] eglibc: Install PIC archives
+Subject: [PATCH 21/27] eglibc: Install PIC archives
 
 Forward port from eglibc
 
@@ -29,10 +29,10 @@
  1 file changed, 40 insertions(+), 2 deletions(-)
 
 diff --git a/Makerules b/Makerules
-index 9bb707c168..74cbefb9ba 100644
+index ef6abeac6d..eeaa667f49 100644
 --- a/Makerules
 +++ b/Makerules
-@@ -775,6 +775,9 @@ ifeq ($(build-shared),yes)
+@@ -778,6 +778,9 @@ ifeq ($(build-shared),yes)
  $(common-objpfx)libc.so: $(common-objpfx)libc.map
  endif
  common-generated += libc.so libc_pic.os
@@ -42,7 +42,7 @@
  ifdef libc.so-version
  $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
  	$(make-link)
-@@ -1026,6 +1029,7 @@ endif
+@@ -1029,6 +1032,7 @@ endif
  
  install: check-install-supported
  
@@ -50,7 +50,7 @@
  install: $(installed-libcs)
  $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
  	$(make-target-directory)
-@@ -1054,6 +1058,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
+@@ -1057,6 +1061,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
  install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
  install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
  
@@ -73,7 +73,7 @@
  # For versioned libraries, we install three files:
  #	$(inst_libdir)/libfoo.so	-- for linking, symlink or ld script
  #	$(inst_slibdir)/libfoo.so.NN	-- for loading by SONAME, symlink
-@@ -1298,9 +1318,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
+@@ -1311,9 +1331,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
  endif	# headers-nonh
  endif	# headers
  
@@ -97,7 +97,7 @@
  install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
  install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
  install-rootsbin-nosubdir: \
-@@ -1313,6 +1346,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
+@@ -1326,6 +1359,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
  install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
  install-others-nosubdir: $(install-others)
  install-others-programs-nosubdir: $(install-others-programs)
@@ -108,7 +108,7 @@
  
  # We need all the `-nosubdir' targets so that `install' in the parent
  # doesn't depend on several things which each iterate over the subdirs.
-@@ -1322,7 +1359,8 @@ install-%:: install-%-nosubdir ;
+@@ -1335,7 +1372,8 @@ install-%:: install-%-nosubdir ;
  
  .PHONY: install install-no-libc.a-nosubdir
  install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
@@ -119,5 +119,5 @@
  install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
  			    install-rootsbin-nosubdir install-sbin-nosubdir \
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
index 2a8a20a..a629ce1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -1,7 +1,7 @@
-From d97533dc201cfd863765b1a67a27fde3e2622da7 Mon Sep 17 00:00:00 2001
+From e019fe6a2b410db6043e21803f497b5cbdd90a83 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 22/25] eglibc: Forward port cross locale generation support
+Subject: [PATCH 22/27] eglibc: Forward port cross locale generation support
 
 Upstream-Status: Pending
 
@@ -23,7 +23,7 @@
  create mode 100644 locale/catnames.c
 
 diff --git a/locale/Makefile b/locale/Makefile
-index 98ee76272d..bc3afb2248 100644
+index fd9972279b..176b3946de 100644
 --- a/locale/Makefile
 +++ b/locale/Makefile
 @@ -26,7 +26,8 @@ headers		= langinfo.h locale.h bits/locale.h \
@@ -91,7 +91,7 @@
 +    [LC_ALL] = sizeof ("LC_ALL") - 1
 +  };
 diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 4e1c8c568a..f7ed946f1c 100644
+index 68822a6319..fa36123776 100644
 --- a/locale/localeinfo.h
 +++ b/locale/localeinfo.h
 @@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
@@ -104,11 +104,11 @@
  # define NL_CURRENT_INDIRECT	1
  #endif
 diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index e55ab86e28..0f87e6dd28 100644
+index 34a8d32c92..cbb9436cd1 100644
 --- a/locale/programs/charmap-dir.c
 +++ b/locale/programs/charmap-dir.c
-@@ -19,7 +19,9 @@
- #include <error.h>
+@@ -18,7 +18,9 @@
+ #include <errno.h>
  #include <fcntl.h>
  #include <libintl.h>
 +#ifndef NO_UNCOMPRESS
@@ -117,7 +117,7 @@
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
-@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
+@@ -154,6 +156,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
    return closedir (dir);
  }
  
@@ -125,7 +125,7 @@
  /* Creates a subprocess decompressing the given pathname, and returns
     a stream reading its output (the decompressed data).  */
  static
-@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
+@@ -202,6 +205,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
      }
    return NULL;
  }
@@ -133,7 +133,7 @@
  
  /* Opens a charmap for reading, given its name (not an alias name).  */
  FILE *
-@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
+@@ -224,6 +228,7 @@ charmap_open (const char *directory, const char *name)
    if (stream != NULL)
      return stream;
  
@@ -141,7 +141,7 @@
    memcpy (p, ".gz", 4);
    stream = fopen_uncompressed (pathname, "gzip");
    if (stream != NULL)
-@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
+@@ -233,6 +238,7 @@ charmap_open (const char *directory, const char *name)
    stream = fopen_uncompressed (pathname, "bzip2");
    if (stream != NULL)
      return stream;
@@ -150,10 +150,10 @@
    return NULL;
  }
 diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index cec848cb7c..fcd768eb7d 100644
+index d2eebcfdbb..c3718d6589 100644
 --- a/locale/programs/ld-collate.c
 +++ b/locale/programs/ld-collate.c
-@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
+@@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
      }
    if (wcs != NULL)
      {
@@ -162,7 +162,7 @@
        uint32_t zero = 0;
        /* Handle <U0000> as a single character.  */
        if (nwcs == 0)
-@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+@@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
  
  	      if ((*eptr)->nwcs == runp->nwcs)
  		{
@@ -172,7 +172,7 @@
  
  		  if (c == 0)
  		    {
-@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
  	     one consecutive entry.  */
  	  if (runp->wcnext != NULL
  	      && runp->nwcs == runp->wcnext->nwcs
@@ -185,7 +185,7 @@
  	      && (runp->wcs[runp->nwcs - 1]
  		  == runp->wcnext->wcs[runp->nwcs - 1] + 1))
  	    {
-@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
  		runp = runp->wcnext;
  	      while (runp->wcnext != NULL
  		     && runp->nwcs == runp->wcnext->nwcs
@@ -199,10 +199,10 @@
  			 == runp->wcnext->wcs[runp->nwcs - 1] + 1));
  
 diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index df266c20d6..05c0152ec9 100644
+index f791e6b7e9..d809d6db7f 100644
 --- a/locale/programs/ld-ctype.c
 +++ b/locale/programs/ld-ctype.c
-@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
+@@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
    allocate_arrays (ctype, charmap, ctype->repertoire);
  
    default_missing_len = (ctype->default_missing
@@ -211,7 +211,7 @@
  			 : 0);
  
    init_locale_data (&file, nelems);
-@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
+@@ -1926,7 +1926,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
  	    ignore = 1;
  	  else
  	    /* This value is usable.  */
@@ -220,7 +220,7 @@
  
  	  first = 0;
  	}
-@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
+@@ -2460,8 +2460,8 @@ with character code range values one must use the absolute ellipsis `...'"));
  	    }
  
  	handle_tok_digit:
@@ -231,7 +231,7 @@
  	  handle_digits = 1;
  	  goto read_charclass;
  
-@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3901,8 +3901,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
  
  	  while (idx < number)
  	    {
@@ -241,7 +241,7 @@
  	      if (res == 0)
  		{
  		  replace = 1;
-@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3939,11 +3938,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
        for (size_t cnt = 0; cnt < number; ++cnt)
  	{
  	  struct translit_to_t *srunp;
@@ -255,7 +255,7 @@
  	      srunp = srunp->next;
  	    }
  	  /* Plus one for the extra NUL character marking the end of
-@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+@@ -3967,18 +3966,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
  	  ctype->translit_from_idx[cnt] = from_len;
  	  ctype->translit_to_idx[cnt] = to_len;
  
@@ -281,10 +281,10 @@
  	      srunp = srunp->next;
  	    }
 diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index 32e9c41e35..6a61fcedeb 100644
+index a755792363..e8b2f85522 100644
 --- a/locale/programs/ld-time.c
 +++ b/locale/programs/ld-time.c
-@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
+@@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME");
  	}
        else
  	{
@@ -296,7 +296,7 @@
  	}
      }
  
-@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
+@@ -231,7 +233,7 @@ No definition for %s category found"), "LC_TIME");
        const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
  				       31, 31, 30, 31 ,30, 31 };
        size_t idx;
@@ -305,7 +305,7 @@
  
        time->era_entries =
  	(struct era_data *) xmalloc (time->num_era
-@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
+@@ -457,18 +459,18 @@ No definition for %s category found"), "LC_TIME");
  	    }
  
  	  /* Now generate the wide character name and format.  */
@@ -331,7 +331,7 @@
  		}
  	      else
  		time->era_entries[idx].wname =
-@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME"));
+@@ -527,7 +529,16 @@ No definition for %s category found"), "LC_TIME");
    if (time->date_fmt == NULL)
      time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
    if (time->wdate_fmt == NULL)
@@ -350,7 +350,7 @@
  
  
 diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index 52b340963a..1a8bce17b4 100644
+index 3525c8a43d..f8a7fd9c24 100644
 --- a/locale/programs/linereader.c
 +++ b/locale/programs/linereader.c
 @@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
@@ -363,18 +363,18 @@
    size_t bufmax = 56;
  
 diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index 6acc1342c7..df87740f8b 100644
+index d718d2e9f4..e0a3ad5a83 100644
 --- a/locale/programs/localedef.c
 +++ b/locale/programs/localedef.c
-@@ -108,6 +108,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
- #define OPT_LIST_ARCHIVE 309
- #define OPT_LITTLE_ENDIAN 400
+@@ -105,6 +105,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
  #define OPT_BIG_ENDIAN 401
-+#define OPT_UINT32_ALIGN 402
+ #define OPT_NO_WARN 402
+ #define OPT_WARN 403
++#define OPT_UINT32_ALIGN 404
  
  /* Definitions of arguments for argp functions.  */
  static const struct argp_option options[] =
-@@ -143,6 +144,8 @@ static const struct argp_option options[] =
+@@ -147,6 +148,8 @@ static const struct argp_option options[] =
      N_("Generate little-endian output") },
    { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
      N_("Generate big-endian output") },
@@ -383,7 +383,7 @@
    { NULL, 0, NULL, 0, NULL }
  };
  
-@@ -232,12 +235,14 @@ main (int argc, char *argv[])
+@@ -236,12 +239,14 @@ main (int argc, char *argv[])
       ctype locale.  (P1003.2 4.35.5.2)  */
    setlocale (LC_CTYPE, "POSIX");
  
@@ -392,15 +392,15 @@
       defines error code 3 for this situation so I think it must be
       a fatal error (see P1003.2 4.35.8).  */
    if (sysconf (_SC_2_LOCALEDEF) < 0)
-     WITH_CUR_LOCALE (error (3, 0, _("\
- FATAL: system does not define `_POSIX2_LOCALEDEF'")));
+     record_error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'"));
 +#endif
  
    /* Process charmap file.  */
    charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -328,6 +333,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
-     case OPT_BIG_ENDIAN:
-       set_big_endian (true);
+@@ -389,6 +394,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+       /* Enable the warnings.  */
+       set_warnings (arg, true);
        break;
 +    case OPT_UINT32_ALIGN:
 +      uint32_align_mask = strtol (arg, NULL, 0) - 1;
@@ -409,7 +409,7 @@
        force_output = 1;
        break;
 diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 0990ef11be..683422c908 100644
+index 32e5f761f2..b41e77bd8d 100644
 --- a/locale/programs/locfile.c
 +++ b/locale/programs/locfile.c
 @@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
@@ -432,7 +432,7 @@
  
  /* Record that FILE's next element is the 32-bit integer VALUE.  */
 diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index 3407e13c13..0bb556caf8 100644
+index 89b347c72d..a636fc2960 100644
 --- a/locale/programs/locfile.h
 +++ b/locale/programs/locfile.h
 @@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
@@ -521,7 +521,7 @@
 +
  #endif /* locfile.h */
 diff --git a/locale/setlocale.c b/locale/setlocale.c
-index 19acc4b2c7..c89d3b87ad 100644
+index e4de907e1f..b5d8f5c17d 100644
 --- a/locale/setlocale.c
 +++ b/locale/setlocale.c
 @@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
@@ -562,5 +562,5 @@
  # define WEAK_POSTLOAD(postload) weak_extern (postload)
  #else
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
index 9e580d4..ae708ef 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-Define-DUMMY_LOCALE_T-if-not-defined.patch
@@ -1,7 +1,7 @@
-From cb4d00eac7f84092314de593626eea40f9529038 Mon Sep 17 00:00:00 2001
+From 9d71526be21abe68dd8ca3a5a219445851bbc2f4 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 20 Apr 2016 21:11:00 -0700
-Subject: [PATCH 23/25] Define DUMMY_LOCALE_T if not defined
+Subject: [PATCH 23/27] Define DUMMY_LOCALE_T if not defined
 
 This is a hack to fix building the locale bits on an older
 CentOs 5.X machine
@@ -14,7 +14,7 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/locale/programs/config.h b/locale/programs/config.h
-index 5b416be0d8..79e66eed5e 100644
+index 9956cd8446..04342f3644 100644
 --- a/locale/programs/config.h
 +++ b/locale/programs/config.h
 @@ -19,6 +19,9 @@
@@ -28,5 +28,5 @@
  #define PACKAGE _libc_intl_domainname
  #ifndef VERSION
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
index 0b59352..42ff667 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
@@ -1,7 +1,7 @@
-From a784742739c90eea0d4ccbbd073a067d55ca95e8 Mon Sep 17 00:00:00 2001
+From 03873af286f1dab1062f598d6deb774ce513421d Mon Sep 17 00:00:00 2001
 From: Mark Hatle <mark.hatle@windriver.com>
 Date: Thu, 18 Aug 2016 14:07:58 -0500
-Subject: [PATCH 24/25] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+Subject: [PATCH 24/27] elf/dl-deps.c: Make _dl_build_local_scope breadth first
 
 According to the ELF specification:
 
@@ -24,10 +24,10 @@
  1 file changed, 10 insertions(+), 4 deletions(-)
 
 diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index 1b8bac6593..c616808f31 100644
+index c975fcffd7..6ee58c74e0 100644
 --- a/elf/dl-deps.c
 +++ b/elf/dl-deps.c
-@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
+@@ -72,13 +72,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
  {
    struct link_map **p = list;
    struct link_map **q;
@@ -52,5 +52,5 @@
  }
  
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
index 09ad04a..7f5d142 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-locale-fix-hard-coded-reference-to-gcc-E.patch
@@ -1,7 +1,7 @@
-From f3a670496c8fe6d4acf045f5b167a19cf41b044e Mon Sep 17 00:00:00 2001
+From 56dab024751941c07eb479f47ef6682e2168c86a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
 Date: Mon, 22 Aug 2016 16:09:25 +0200
-Subject: [PATCH 25/25] locale: fix hard-coded reference to gcc -E
+Subject: [PATCH 25/27] locale: fix hard-coded reference to gcc -E
 
 When new version of compilers are published, they may not be compatible with
 older versions of software. This is particularly common when software is built
@@ -34,5 +34,5 @@
  
  sub cstrlen {
 -- 
-2.13.2
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch
deleted file mode 100644
index b2bb96b..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-assert-Suppress-pedantic-warning-caused-by-statement.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 037283cbc74739b72f36dfec827d120faa243406 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer at redhat dot com>
-Date: Thu, 6 Jul 2017 11:50:55 +0200
-Subject: [PATCH 26/26] assert: Suppress pedantic warning caused by statement
- expression [BZ# 21242]
-
-On 07/05/2017 10:15 PM, Zack Weinberg wrote:
-> On Wed, Jul 5, 2017 at 11:51 AM, Florian Weimer <fweimer@redhat.com> wrote:
->> On 07/05/2017 05:46 PM, Zack Weinberg wrote:
->>> A problem occurs to me: expressions involving VLAs _are_ evaluated
->>> inside sizeof.
->>
->> The type of the sizeof argument would still be int (due to the
->> comparison against 0), so this doesn't actually occur.
->
-> I rechecked what C99 says about sizeof and VLAs, and you're right -
-> the operand of sizeof is only evaluated when sizeof is _directly_
-> applied to a VLA.  So this is indeed safe, but I think this wrinkle
-> should be mentioned in the comment.  Perhaps
->
-> /* The first occurrence of EXPR is not evaluated due to the sizeof,
->    but will trigger any pedantic warnings masked by the __extension__
->    for the second occurrence.  The explicit comparison against zero
->    ensures that sizeof is not directly applied to a function pointer or
->    bit-field (which would be ill-formed) or VLA (which would be evaluated).  */
->
-> zw
-
-What about the attached patch?
-
-Siddhesh, is this okay during the freeze?  I'd like to backport it to
-2.25 as well.
-
-Thanks,
-Florian
-
-assert: Suppress pedantic warning caused by statement expression
-
-2017-07-06  Florian Weimer  <fweimer@redhat.com>
-
-	[BZ #21242]
-	* assert/assert.h [__GNUC__ && !__STRICT_ANSI__] (assert):
-	Suppress pedantic warning resulting from statement expression.
-	(__ASSERT_FUNCTION): Add missing __extendsion__.
----
-
-Upstream-Status: Submitted
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- assert/assert.h | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/assert/assert.h b/assert/assert.h
-index 22f019537c..6801cfeb10 100644
---- a/assert/assert.h
-+++ b/assert/assert.h
-@@ -91,13 +91,19 @@ __END_DECLS
-      ? __ASSERT_VOID_CAST (0)						\
-      : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
- # else
-+/* The first occurrence of EXPR is not evaluated due to the sizeof,
-+   but will trigger any pedantic warnings masked by the __extension__
-+   for the second occurrence.  The explicit comparison against zero is
-+   required to support function pointers and bit fields in this
-+   context, and to suppress the evaluation of variable length
-+   arrays.  */
- #  define assert(expr)							\
--    ({									\
-+  ((void) sizeof ((expr) == 0), __extension__ ({			\
-       if (expr)								\
-         ; /* empty */							\
-       else								\
-         __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION);	\
--    })
-+    }))
- # endif
- 
- # ifdef	__USE_GNU
-@@ -113,7 +119,7 @@ __END_DECLS
-    C9x has a similar variable called __func__, but prefer the GCC one since
-    it demangles C++ function names.  */
- # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
--#   define __ASSERT_FUNCTION	__PRETTY_FUNCTION__
-+#   define __ASSERT_FUNCTION	__extension__ __PRETTY_FUNCTION__
- # else
- #  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
- #   define __ASSERT_FUNCTION	__func__
--- 
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
new file mode 100644
index 0000000..eca1193
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
@@ -0,0 +1,40 @@
+From 847d37d5a34e4bf294de4ba98de3668950e28bc7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jan 2018 10:05:07 -0800
+Subject: [PATCH 26/27] reset dl_load_write_lock after forking
+
+The patch in this Bugzilla entry was requested by a customer:
+
+  https://www.sourceware.org/bugzilla/show_bug.cgi?id=19282
+
+The __libc_fork() code reset dl_load_lock, but it also needed to reset
+dl_load_write_lock.  The patch has not yet been integrated upstream.
+
+Upstream-Status: Pending [ No Author See bugzilla]
+
+Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/nptl/fork.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
+index 846fa49ef2..f87506f398 100644
+--- a/sysdeps/nptl/fork.c
++++ b/sysdeps/nptl/fork.c
+@@ -194,9 +194,9 @@ __libc_fork (void)
+ 	  _IO_list_resetlock ();
+ 	}
+ 
+-      /* Reset the lock the dynamic loader uses to protect its data.  */
++      /* Reset the locks the dynamic loader uses to protect its data.  */
+       __rtld_lock_initialize (GL(dl_load_lock));
+-
++      __rtld_lock_initialize (GL(dl_load_write_lock));
+       /* Run the handlers registered for the child.  */
+       while (allp != NULL)
+ 	{
+-- 
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
new file mode 100644
index 0000000..9ec234b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
@@ -0,0 +1,70 @@
+From 94225ab4bcc1613531558a632270b5edce779bc9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jan 2018 10:08:04 -0800
+Subject: [PATCH 27/27] Acquire ld.so lock before switching to malloc_atfork
+
+The patch is from
+  https://sourceware.org/bugzilla/show_bug.cgi?id=4578
+
+If a thread happens to hold dl_load_lock and have r_state set to RT_ADD or
+RT_DELETE at the time another thread calls fork(), then the child exit code
+from fork (in nptl/sysdeps/unix/sysv/linux/fork.c in our case) re-initializes
+dl_load_lock but does not restore r_state to RT_CONSISTENT. If the child
+subsequently requires ld.so functionality before calling exec(), then the
+assertion will fire.
+
+The patch acquires dl_load_lock on entry to fork() and releases it on exit
+from the parent path.  The child path is initialized as currently done.
+This is essentially pthreads_atfork, but forced to be first because the
+acquisition of dl_load_lock must happen before malloc_atfork is active
+to avoid a deadlock.
+
+The patch has not yet been integrated upstream.
+
+Upstream-Status: Pending [ Not Author See bugzilla]
+
+Signed-off-by: Raghunath Lolur <Raghunath.Lolur@kpit.com>
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/nptl/fork.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
+index f87506f398..225e7b51f8 100644
+--- a/sysdeps/nptl/fork.c
++++ b/sysdeps/nptl/fork.c
+@@ -25,6 +25,7 @@
+ #include <tls.h>
+ #include <hp-timing.h>
+ #include <ldsodefs.h>
++#include <libc-lock.h>
+ #include <stdio-lock.h>
+ #include <atomic.h>
+ #include <nptl/pthreadP.h>
+@@ -60,6 +61,10 @@ __libc_fork (void)
+      but our current fork implementation is not.  */
+   bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
+ 
++  /* grab ld.so lock BEFORE switching to malloc_atfork */
++  __rtld_lock_lock_recursive (GL(dl_load_lock));
++  __rtld_lock_lock_recursive (GL(dl_load_write_lock));
++
+   /* Run all the registered preparation handlers.  In reverse order.
+      While doing this we build up a list of all the entries.  */
+   struct fork_handler *runp;
+@@ -246,6 +251,10 @@ __libc_fork (void)
+ 
+ 	  allp = allp->next;
+ 	}
++
++      /* unlock ld.so last, because we locked it first */
++      __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
++      __rtld_lock_unlock_recursive (GL(dl_load_lock));
+     }
+ 
+   return pid;
+-- 
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch
deleted file mode 100644
index 777b253..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0027-glibc-reset-dl-load-write-lock-after-forking.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From a6bb73d1cfd20a73fbbe6076008376fb87879d1b Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <yuanjie.huang@windriver.com>
-Date: Thu, 18 Aug 2016 17:59:13 +0800
-Subject: [PATCH] reset dl_load_write_lock after forking
-
-The patch in this Bugzilla entry was requested by a customer:
-
-  https://www.sourceware.org/bugzilla/show_bug.cgi?id=19282
-
-The __libc_fork() code reset dl_load_lock, but it also needed to reset
-dl_load_write_lock.  The patch has not yet been integrated upstream.
-
-Upstream-Status: Pending [ Not Author See bugzilla]
-
-Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- sysdeps/nptl/fork.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
-index 2b9ae4b..3d0b8da 100644
---- a/sysdeps/nptl/fork.c
-+++ b/sysdeps/nptl/fork.c
-@@ -174,8 +174,9 @@ __libc_fork (void)
-       /* Reset locks in the I/O code.  */
-       _IO_list_resetlock ();
- 
--      /* Reset the lock the dynamic loader uses to protect its data.  */
-+      /* Reset the locks the dynamic loader uses to protect its data.  */
-       __rtld_lock_initialize (GL(dl_load_lock));
-+      __rtld_lock_initialize (GL(dl_load_write_lock));
- 
-       /* Run the handlers registered for the child.  */
-       while (allp != NULL)
--- 
-1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch
deleted file mode 100644
index f76237a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-Bug-4578-add-ld.so-lock-while-fork.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-The patch in this Bugzilla entry was requested by a customer:
-  https://sourceware.org/bugzilla/show_bug.cgi?id=4578
-
-If a thread happens to hold dl_load_lock and have r_state set to RT_ADD or
-RT_DELETE at the time another thread calls fork(), then the child exit code
-from fork (in nptl/sysdeps/unix/sysv/linux/fork.c in our case) re-initializes
-dl_load_lock but does not restore r_state to RT_CONSISTENT. If the child
-subsequently requires ld.so functionality before calling exec(), then the
-assertion will fire.
-
-The patch acquires dl_load_lock on entry to fork() and releases it on exit
-from the parent path.  The child path is initialized as currently done.
-This is essentially pthreads_atfork, but forced to be first because the
-acquisition of dl_load_lock must happen before malloc_atfork is active
-to avoid a deadlock.
-The patch has not yet been integrated upstream.
-
-Upstream-Status: Pending [ Not Author See bugzilla]
-
-Signed-off-by: Raghunath Lolur <Raghunath.Lolur@kpit.com>
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-
-Index: git/sysdeps/nptl/fork.c
-===================================================================
---- git.orig/sysdeps/nptl/fork.c       2017-08-03 16:02:15.674704080 +0800
-+++ git/sysdeps/nptl/fork.c    2017-08-04 18:15:02.463362015 +0800
-@@ -25,6 +25,7 @@
- #include <tls.h>
- #include <hp-timing.h>
- #include <ldsodefs.h>
-+#include <libc-lock.h>
- #include <stdio-lock.h>
- #include <atomic.h>
- #include <nptl/pthreadP.h>
-@@ -60,6 +61,10 @@
-      but our current fork implementation is not.  */
-   bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
- 
-+  /* grab ld.so lock BEFORE switching to malloc_atfork */
-+  __rtld_lock_lock_recursive (GL(dl_load_lock));
-+  __rtld_lock_lock_recursive (GL(dl_load_write_lock));
-+
-   /* Run all the registered preparation handlers.  In reverse order.
-      While doing this we build up a list of all the entries.  */
-   struct fork_handler *runp;
-@@ -247,6 +252,10 @@
- 
- 	  allp = allp->next;
- 	}
-+
-+      /* unlock ld.so last, because we locked it first */
-+      __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
-+      __rtld_lock_unlock_recursive (GL(dl_load_lock));
-     }
- 
-   return pid;
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
rename to import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
new file mode 100644
index 0000000..fa29f41
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
@@ -0,0 +1,40 @@
+From 113e0516fbd3ce18253f0423762416d4c4b38fb0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Mar 2018 17:57:37 -0700
+Subject: [PATCH 29/29] Replace strncpy with memccpy to fix
+ -Wstringop-truncation.
+
+	* nis/nss_nisplus/nisplus-parser.c: Replace strncpy with memcpy to
+	avoid -Wstringop-truncation.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2018-03/msg00531.html]
+
+ nis/nss_nisplus/nisplus-parser.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c
+index 8dc021e73d..b53284f889 100644
+--- a/nis/nss_nisplus/nisplus-parser.c
++++ b/nis/nss_nisplus/nisplus-parser.c
+@@ -87,7 +87,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+       if (len >= room_left)
+ 	goto no_more_room;
+ 
+-      strncpy (first_unused, numstr, len);
++      memcpy (first_unused, numstr, len);
+       first_unused[len] = '\0';
+       numstr = first_unused;
+     }
+@@ -103,7 +103,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+       if (len >= room_left)
+ 	goto no_more_room;
+ 
+-      strncpy (first_unused, numstr, len);
++      memcpy (first_unused, numstr, len);
+       first_unused[len] = '\0';
+       numstr = first_unused;
+     }
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch
deleted file mode 100644
index 3c7050f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0029-assert-Support-types-without-operator-int-BZ-21972.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-Upstream-Status: Backport
-
-* fixes "lambda-expression in unevaluated context" compile failures such as
-  https://github.com/nlohmann/json/issues/705
-
-* fixes "no match for 'operator==" compile failures such as
-  https://bugzilla.redhat.com/show_bug.cgi?id=1482990
-
-* Changelog edit was removed from upstream commit because it caused conflict
-
-Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
-
-From b5889d25e9bf944a89fdd7bcabf3b6c6f6bb6f7c Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Mon, 21 Aug 2017 13:03:29 +0200
-Subject: [PATCH] assert: Support types without operator== (int) [BZ #21972]
-
----
- assert/Makefile          | 11 ++++++-
- assert/assert.h          | 16 ++++++----
- assert/tst-assert-c++.cc | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
- assert/tst-assert-g++.cc | 19 ++++++++++++
- 4 files changed, 128 insertions(+), 7 deletions(-)
- create mode 100644 assert/tst-assert-c++.cc
- create mode 100644 assert/tst-assert-g++.cc
-
-diff --git a/assert/Makefile b/assert/Makefile
-index 1c3be9b..9ec1be8 100644
---- a/assert/Makefile
-+++ b/assert/Makefile
-@@ -25,6 +25,15 @@ include ../Makeconfig
- headers	:= assert.h
- 
- routines := assert assert-perr __assert
--tests := test-assert test-assert-perr
-+tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++
- 
- include ../Rules
-+
-+ifeq ($(have-cxx-thread_local),yes)
-+CFLAGS-tst-assert-c++.o = -std=c++11
-+LDLIBS-tst-assert-c++ = -lstdc++
-+CFLAGS-tst-assert-g++.o = -std=gnu++11
-+LDLIBS-tst-assert-g++ = -lstdc++
-+else
-+tests-unsupported += tst-assert-c++ tst-assert-g++
-+endif
-diff --git a/assert/assert.h b/assert/assert.h
-index 6801cfe..640c95c 100644
---- a/assert/assert.h
-+++ b/assert/assert.h
-@@ -85,7 +85,12 @@ __END_DECLS
- /* When possible, define assert so that it does not add extra
-    parentheses around EXPR.  Otherwise, those added parentheses would
-    suppress warnings we'd expect to be detected by gcc's -Wparentheses.  */
--# if !defined __GNUC__ || defined __STRICT_ANSI__
-+# if defined __cplusplus
-+#  define assert(expr)							\
-+     (static_cast <bool> (expr)						\
-+      ? void (0)							\
-+      : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
-+# elif !defined __GNUC__ || defined __STRICT_ANSI__
- #  define assert(expr)							\
-     ((expr)								\
-      ? __ASSERT_VOID_CAST (0)						\
-@@ -93,12 +98,11 @@ __END_DECLS
- # else
- /* The first occurrence of EXPR is not evaluated due to the sizeof,
-    but will trigger any pedantic warnings masked by the __extension__
--   for the second occurrence.  The explicit comparison against zero is
--   required to support function pointers and bit fields in this
--   context, and to suppress the evaluation of variable length
--   arrays.  */
-+   for the second occurrence.  The ternary operator is required to
-+   support function pointers and bit fields in this context, and to
-+   suppress the evaluation of variable length arrays.  */
- #  define assert(expr)							\
--  ((void) sizeof ((expr) == 0), __extension__ ({			\
-+  ((void) sizeof ((expr) ? 1 : 0), __extension__ ({			\
-       if (expr)								\
-         ; /* empty */							\
-       else								\
-diff --git a/assert/tst-assert-c++.cc b/assert/tst-assert-c++.cc
-new file mode 100644
-index 0000000..12a5e69
---- /dev/null
-+++ b/assert/tst-assert-c++.cc
-@@ -0,0 +1,78 @@
-+/* Tests for interactions between C++ and assert.
-+   Copyright (C) 2017 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library 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
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <assert.h>
-+
-+/* The C++ standard requires that if the assert argument is a constant
-+   subexpression, then the assert itself is one, too.  */
-+constexpr int
-+check_constexpr ()
-+{
-+  return (assert (true), 1);
-+}
-+
-+/* Objects of this class can be contextually converted to bool, but
-+   cannot be compared to int.  */
-+struct no_int
-+{
-+  no_int () = default;
-+  no_int (const no_int &) = delete;
-+
-+  explicit operator bool () const
-+  {
-+    return true;
-+  }
-+
-+  bool operator! () const; /* No definition.  */
-+  template <class T> bool operator== (T) const; /* No definition.  */
-+  template <class T> bool operator!= (T) const; /* No definition.  */
-+};
-+
-+/* This class tests that operator== is not used by assert.  */
-+struct bool_and_int
-+{
-+  bool_and_int () = default;
-+  bool_and_int (const no_int &) = delete;
-+
-+  explicit operator bool () const
-+  {
-+    return true;
-+  }
-+
-+  bool operator! () const; /* No definition.  */
-+  template <class T> bool operator== (T) const; /* No definition.  */
-+  template <class T> bool operator!= (T) const; /* No definition.  */
-+};
-+
-+static int
-+do_test ()
-+{
-+  {
-+    no_int value;
-+    assert (value);
-+  }
-+
-+  {
-+    bool_and_int value;
-+    assert (value);
-+  }
-+
-+  return 0;
-+}
-+
-+#include <support/test-driver.c>
-diff --git a/assert/tst-assert-g++.cc b/assert/tst-assert-g++.cc
-new file mode 100644
-index 0000000..8c06402
---- /dev/null
-+++ b/assert/tst-assert-g++.cc
-@@ -0,0 +1,19 @@
-+/* Tests for interactions between C++ and assert.  GNU C++11 version.
-+   Copyright (C) 2017 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library 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
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <tst-assert-c++.cc>
--- 
-1.9.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
new file mode 100644
index 0000000..6f03e1c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
@@ -0,0 +1,21 @@
+Improve reproducibility:
+Do not put any #line preprocessor commands in bison generated files.
+These lines contain absolute paths containing file locations on
+the host build machine.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+diff --git a/intl/Makefile b/intl/Makefile
+index 2219717..a203780 100644
+--- a/intl/Makefile
++++ b/intl/Makefile
+@@ -151,7 +151,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
+ 
+ CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+ 	    -D'LOCALE_ALIAS_PATH="$(localedir)"'
+-BISONFLAGS = --yacc --name-prefix=__gettext --output
++BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
+ 
+ $(inst_localedir)/locale.alias: locale.alias $(+force)
+ 	$(do-install)
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
new file mode 100644
index 0000000..a9132ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
@@ -0,0 +1,419 @@
+Background information:
+
+https://sourceware.org/ml/libc-alpha/2017-08/msg01257.html
+https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
+
+Upstream-Status: Submitted [libc-alpha@sourceware.org]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+From: Zack Weinberg <zackw@panix.com>
+Subject: [PATCH] Deprecate libcrypt and don't build it by default
+
+Back in June, Björn Esser proposed to add OpenBSD-compatible bcrypt
+support to our implementation of crypt(3), and Zack Weinberg replied
+that it might actually make more sense to _remove_ libcrypt from
+glibc, freeing up libcrypt.so.1 and crypt.h to be provided by a
+separate project that could move faster.  (For instance, libxcrypt:
+https://github.com/besser82/libxcrypt)
+
+This patch disables build and installation of libcrypt by default.  It
+can be re-enabled with --enable-obsolete-crypt to configure.  Unlike
+libnsl, we do *not* install a runtime shared library; that's left to
+the replacement.  (Unlike the SunRPC situation, I think we can
+probably drop this code altogether in a release or two.)
+
+The function prototypes for crypt and encrypt are removed from
+unistd.h, and the function prototype for setkey is removed from
+stdlib.h; they do *not* come back with --enable-obsolete-crypt.  This
+means glibc no longer provides the POSIX CRYPT option, and the macro
+_XOPEN_CRYPT is also removed from unistd.h to indicate that.
+(_SC_XOPEN_CRYPT is still defined, but sysconf(_SC_XOPEN_CRYPT) will
+return -1 at runtime.)  These functions are also unconditionally
+removed from conform/data/{stdlib,unistd}.h-data.
+
+	* posix/unistd.h (_XOPEN_CRYPT, crypt, encrypt): Don't declare.
+	* stdlib/stdlib.h (setkey): Don't declare.
+
+	* configure.ac (--enable-obsolete-crypt): New configure option.
+	* configure: Regenerate.
+	* config.make.in (build-obsolete-crypt): New makefile variable.
+	* crypt/Banner: Delete file.
+	* crypt/Makefile: Don't build anything unless
+	$(build-obsolete-crypt) is 'yes'.
+	* sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Only add things
+	to libcrypt-sysdep_routines when $(build-obsolete-crypt) is 'yes'.
+	* sysdeps/sparc/sparc64/multiarch/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/arm/Makefile: Likewise.
+
+	* conform/Makefile: Only include libcrypt.a in linknamespace tests
+	when $(build-obsolete-crypt) is 'yes'.
+	* conform/data/stdlib.h-data (setkey): Don't expect.
+	* conform/data/unistd.h-data (crypt, encrypt): Don't expect.
+	* elf/Makefile: Only perform various tests of libcrypt.so/libcrypt.a
+	when $(build-obsolete-crypt) is 'yes'.
+	* elf/tst-linkall-static.c: Don't include crypt.h when USE_CRYPT
+	is false.
+---
+ NEWS                                             | 18 ++++++++++++++++++
+ config.make.in                                   |  1 +
+ configure                                        | 13 +++++++++++++
+ configure.ac                                     |  8 ++++++++
+ conform/Makefile                                 | 14 ++++++++++----
+ conform/data/stdlib.h-data                       |  3 ---
+ conform/data/unistd.h-data                       |  6 ------
+ crypt/Makefile                                   |  5 +++++
+ elf/Makefile                                     | 16 ++++++++++++----
+ elf/tst-linkall-static.c                         |  2 ++
+ posix/unistd.h                                   | 16 ----------------
+ stdlib/stdlib.h                                  |  6 ------
+ sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile |  2 ++
+ sysdeps/sparc/sparc64/multiarch/Makefile         |  2 ++
+ sysdeps/unix/sysv/linux/arm/Makefile             |  2 ++
+ 15 files changed, 75 insertions(+), 39 deletions(-)
+
+diff --git a/config.make.in b/config.make.in
+index 9e5e24b2c6..8fe610d04d 100644
+--- a/config.make.in
++++ b/config.make.in
+@@ -82,6 +82,7 @@ mach-interface-list = @mach_interface_list@
+ 
+ experimental-malloc = @experimental_malloc@
+ 
++build-obsolete-crypt = @build_obsolete_crypt@
+ nss-crypt = @libc_cv_nss_crypt@
+ static-nss-crypt = @libc_cv_static_nss_crypt@
+ 
+diff --git a/configure b/configure
+index 7a8bd3f817..46f6bd7f86 100755
+--- a/configure
++++ b/configure
+@@ -672,6 +672,7 @@ base_machine
+ have_tunables
+ build_pt_chown
+ build_nscd
++build_obsolete_crypt
+ build_obsolete_nsl
+ link_obsolete_rpc
+ libc_cv_static_nss_crypt
+@@ -782,6 +783,7 @@ enable_experimental_malloc
+ enable_nss_crypt
+ enable_obsolete_rpc
+ enable_obsolete_nsl
++enable_obsolete_crypt
+ enable_systemtap
+ enable_build_nscd
+ enable_nscd
+@@ -1453,6 +1455,7 @@ Optional Features:
+                           link-time usage
+   --enable-obsolete-nsl   build and install the obsolete libnsl library and
+                           depending NSS modules
++  --enable-obsolete-crypt build and install the obsolete libcrypt library
+   --enable-systemtap      enable systemtap static probe points [default=no]
+   --disable-build-nscd    disable building and installing the nscd daemon
+   --disable-nscd          library functions will not contact the nscd daemon
+@@ -3632,6 +3635,16 @@ if test "$build_obsolete_nsl" = yes; then
+ 
+ fi
+ 
++# Check whether --enable-obsolete-crypt was given.
++if test "${enable_obsolete_crypt+set}" = set; then :
++  enableval=$enable_obsolete_crypt; build_obsolete_crypt=$enableval
++else
++  build_obsolete_crypt=no
++fi
++
++
++
++
+ # Check whether --enable-systemtap was given.
+ if test "${enable_systemtap+set}" = set; then :
+   enableval=$enable_systemtap; systemtap=$enableval
+diff --git a/configure.ac b/configure.ac
+index ca1282a6b3..0142353740 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -378,6 +378,14 @@ if test "$build_obsolete_nsl" = yes; then
+   AC_DEFINE(LINK_OBSOLETE_NSL)
+ fi
+ 
++AC_ARG_ENABLE([obsolete-crypt],
++              AC_HELP_STRING([--enable-obsolete-crypt],
++                             [build and install the obsolete libcrypt library]),
++              [build_obsolete_crypt=$enableval],
++              [build_obsolete_crypt=no])
++AC_SUBST(build_obsolete_crypt)
++
++
+ AC_ARG_ENABLE([systemtap],
+               [AS_HELP_STRING([--enable-systemtap],
+ 	       [enable systemtap static probe points @<:@default=no@:>@])],
+diff --git a/conform/Makefile b/conform/Makefile
+index 864fdeca21..5ef474fb24 100644
+--- a/conform/Makefile
++++ b/conform/Makefile
+@@ -193,22 +193,28 @@ linknamespace-libs-thr = $(linknamespace-libs-isoc) \
+ 			 $(common-objpfx)rt/librt.a $(static-thread-library)
+ linknamespace-libs-posix = $(linknamespace-libs-thr) \
+ 			   $(common-objpfx)dlfcn/libdl.a
+-linknamespace-libs-xsi = $(linknamespace-libs-posix) \
+-			 $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-xsi = $(linknamespace-libs-posix)
+ linknamespace-libs-ISO = $(linknamespace-libs-isoc)
+ linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)
+ linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)
+-linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) \
+-			  $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-XPG4 = $(linknamespace-libs-isoc)
+ linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4)
+ linknamespace-libs-POSIX = $(linknamespace-libs-thr)
+ linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi)
+ linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi)
+ linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix)
+ linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi)
++
++ifeq ($(build-obsolete-crypt),yes)
++linknamespace-libs-xsi += $(common-objpfx)crypt/libcrypt.a
++linknamespace-libs-XPG4 += $(common-objpfx)crypt/libcrypt.a
++endif
++
+ linknamespace-libs = $(foreach std,$(conformtest-standards),\
+ 				   $(linknamespace-libs-$(std)))
+ 
++
++
+ $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \
+ 					$(linknamespace-libs)
+ 	LC_ALL=C $(READELF) -W -s $(linknamespace-libs-$*) > $@; \
+diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
+index d8fcccc2fb..6913828196 100644
+--- a/conform/data/stdlib.h-data
++++ b/conform/data/stdlib.h-data
+@@ -149,9 +149,6 @@ function {unsigned short int*} seed48 (unsigned short int[3])
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
+ function int setenv (const char*, const char*, int)
+ #endif
+-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+-function void setkey (const char*)
+-#endif
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
+ function {char*} setstate (char*)
+ #endif
+diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
+index ddf4f25132..aa070528e8 100644
+--- a/conform/data/unistd.h-data
++++ b/conform/data/unistd.h-data
+@@ -437,9 +437,6 @@ function int chroot (const char*)
+ function int chown (const char*, uid_t, gid_t)
+ function int close (int)
+ function size_t confstr (int, char*, size_t)
+-#if !defined POSIX && !defined POSIX2008
+-function {char*} crypt (const char*, const char*)
+-#endif
+ #if defined XPG4 || defined XPG42 || defined UNIX98
+ function {char*} ctermid (char*)
+ function {char*} cuserid (char*)
+@@ -449,9 +446,6 @@ allow cuserid
+ #endif
+ function int dup (int)
+ function int dup2 (int, int)
+-#if !defined POSIX && !defined POSIX2008
+-function void encrypt (char[64], int)
+-#endif
+ function int execl (const char*, const char*, ...)
+ function int execle (const char*, const char*, ...)
+ function int execlp (const char*, const char*, ...)
+diff --git a/crypt/Makefile b/crypt/Makefile
+index 303800df73..024ec2c6ab 100644
+--- a/crypt/Makefile
++++ b/crypt/Makefile
+@@ -22,6 +22,8 @@ subdir	:= crypt
+ 
+ include ../Makeconfig
+ 
++ifeq ($(build-obsolete-crypt),yes)
++
+ headers := crypt.h
+ 
+ extra-libs := libcrypt
+@@ -52,9 +54,11 @@ tests += md5test sha256test sha512test
+ # machine over a minute.
+ xtests = md5test-giant
+ endif
++endif
+ 
+ include ../Rules
+ 
++ifeq ($(build-obsolete-crypt),yes)
+ ifneq ($(nss-crypt),yes)
+ md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
+ sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
+@@ -71,3 +75,4 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
+ else
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
+ endif
++endif
+diff --git a/elf/Makefile b/elf/Makefile
+index 2a432d8bee..366f7b80ec 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -385,15 +385,19 @@ $(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
+ CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
+ endif
+ 
+-# By default tst-linkall-static should try to use crypt routines to test
+-# static libcrypt use.
+-CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
++ifeq ($(build-obsolete-crypt),yes)
++# If the libcrypt library is being built, tst-linkall-static should
++# try to use crypt routines to test static libcrypt use.
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=1
+ # However, if we are using NSS crypto and we don't have a static
+ # library, then we exclude the use of crypt functions in the test.
+ # We similarly exclude libcrypt.a from the static link (see below).
+ ifeq (yesno,$(nss-crypt)$(static-nss-crypt))
+ CFLAGS-tst-linkall-static.c += -UUSE_CRYPT -DUSE_CRYPT=0
+ endif
++else
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=0
++endif
+ 
+ include ../Rules
+ 
+@@ -1113,8 +1117,10 @@ localplt-built-dso := $(addprefix $(common-objpfx),\
+ 				  rt/librt.so \
+ 				  dlfcn/libdl.so \
+ 				  resolv/libresolv.so \
+-				  crypt/libcrypt.so \
+ 		       )
++ifeq ($(build-obsolete-crypt),yes)
++localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)
++endif
+ ifeq ($(build-mathvec),yes)
+ localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)
+ endif
+@@ -1395,6 +1401,7 @@ $(objpfx)tst-linkall-static: \
+   $(common-objpfx)resolv/libanl.a \
+   $(static-thread-library)
+ 
++ifeq ($(build-obsolete-crypt),yes)
+ # If we are using NSS crypto and we have the ability to link statically
+ # then we include libcrypt.a, otherwise we leave out libcrypt.a and
+ # link as much as we can into the tst-linkall-static test.  This assumes
+@@ -1410,6 +1417,7 @@ ifeq (no,$(nss-crypt))
+ $(objpfx)tst-linkall-static: \
+   $(common-objpfx)crypt/libcrypt.a
+ endif
++endif
+ 
+ # The application depends on the DSO, and the DSO loads the plugin.
+ # The plugin also depends on the DSO. This creates the circular
+diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c
+index e8df38f74e..0ffae7c723 100644
+--- a/elf/tst-linkall-static.c
++++ b/elf/tst-linkall-static.c
+@@ -18,7 +18,9 @@
+ 
+ #include <math.h>
+ #include <pthread.h>
++#if USE_CRYPT
+ #include <crypt.h>
++#endif
+ #include <resolv.h>
+ #include <dlfcn.h>
+ #include <utmp.h>
+diff --git a/posix/unistd.h b/posix/unistd.h
+index 4d149f9945..e75ce4d4ec 100644
+--- a/posix/unistd.h
++++ b/posix/unistd.h
+@@ -107,9 +107,6 @@ __BEGIN_DECLS
+ /* The X/Open Unix extensions are available.  */
+ #define _XOPEN_UNIX	1
+ 
+-/* Encryption is present.  */
+-#define	_XOPEN_CRYPT	1
+-
+ /* The enhanced internationalization capabilities according to XPG4.2
+    are present.  */
+ #define	_XOPEN_ENH_I18N	1
+@@ -1118,20 +1115,7 @@ ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
+ extern int fdatasync (int __fildes);
+ #endif /* Use POSIX199309 */
+ 
+-
+-/* XPG4.2 specifies that prototypes for the encryption functions must
+-   be defined here.  */
+ #ifdef	__USE_XOPEN
+-/* Encrypt at most 8 characters from KEY using salt to perturb DES.  */
+-extern char *crypt (const char *__key, const char *__salt)
+-     __THROW __nonnull ((1, 2));
+-
+-/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
+-   block in place.  */
+-extern void encrypt (char *__glibc_block, int __edflag)
+-     __THROW __nonnull ((1));
+-
+-
+ /* Swab pairs bytes in the first N bytes of the area pointed to by
+    FROM and copy the result to TO.  The value of TO must not be in the
+    range [FROM - N + 1, FROM - 1].  If N is odd the first byte in FROM
+diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
+index 6b1ead31e0..8e23e93557 100644
+--- a/stdlib/stdlib.h
++++ b/stdlib/stdlib.h
+@@ -958,12 +958,6 @@ extern int getsubopt (char **__restrict __optionp,
+ #endif
+ 
+ 
+-#ifdef __USE_XOPEN
+-/* Setup DES tables according KEY.  */
+-extern void setkey (const char *__key) __THROW __nonnull ((1));
+-#endif
+-
+-
+ /* X/Open pseudo terminal handling.  */
+ 
+ #ifdef __USE_XOPEN2KXSI
+diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
+index a6d08f3a00..d8b8297fb0 100644
+--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
++++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
+@@ -1,6 +1,8 @@
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
+ endif
++endif
+ 
+ ifeq ($(subdir),locale)
+ localedef-aux += md5-crop
+diff --git a/sysdeps/sparc/sparc64/multiarch/Makefile b/sysdeps/sparc/sparc64/multiarch/Makefile
+index eaf758e7aa..0198f9886f 100644
+--- a/sysdeps/sparc/sparc64/multiarch/Makefile
++++ b/sysdeps/sparc/sparc64/multiarch/Makefile
+@@ -1,6 +1,8 @@
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
+ endif
++endif
+ 
+ ifeq ($(subdir),locale)
+ localedef-aux += md5-crop
+diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
+index 4adc35de04..6cab4f3a31 100644
+--- a/sysdeps/unix/sysv/linux/arm/Makefile
++++ b/sysdeps/unix/sysv/linux/arm/Makefile
+@@ -19,8 +19,10 @@ endif
+ # Add a syscall function to each library that needs one.
+ 
+ ifeq ($(subdir),crypt)
++ifeq ($(build-obsolete-crypt),yes)
+ libcrypt-sysdep_routines += libc-do-syscall
+ endif
++endif
+ 
+ ifeq ($(subdir),rt)
+ librt-sysdep_routines += libc-do-syscall
+-- 
+2.16.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch
deleted file mode 100644
index ae050a5..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2017-15670.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From a76376df7c07e577a9515c3faa5dbd50bda5da07 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 20 Oct 2017 18:41:14 +0200
-Subject: [PATCH] CVE-2017-15670: glob: Fix one-byte overflow [BZ #22320]
-
-(cherry picked from commit c369d66e5426a30e4725b100d5cd28e372754f90)
-
-Upstream-Status: Backport
-CVE: CVE-2017-15670
-Affects: glibc < 2.27
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog    | 6 ++++++
- NEWS         | 5 +++++
- posix/glob.c | 2 +-
- 3 files changed, 12 insertions(+), 1 deletion(-)
-
-Index: git/NEWS
-===================================================================
---- git.orig/NEWS
-+++ git/NEWS
-@@ -206,6 +206,11 @@ Security related changes:
- * A use-after-free vulnerability in clntudp_call in the Sun RPC system has been
-   fixed (CVE-2017-12133).
- 
-+  CVE-2017-15670: The glob function, when invoked with GLOB_TILDE,
-+  suffered from a one-byte overflow during ~ operator processing (either
-+  on the stack or the heap, depending on the length of the user name).
-+  Reported by Tim Rühsen.
-+
- The following bugs are resolved with this release:
- 
-   [984] network: Respond to changed resolv.conf in gethostbyname
-Index: git/posix/glob.c
-===================================================================
---- git.orig/posix/glob.c
-+++ git/posix/glob.c
-@@ -843,7 +843,7 @@ glob (const char *pattern, int flags, in
- 		  *p = '\0';
- 		}
- 	      else
--		*((char *) mempcpy (newp, dirname + 1, end_name - dirname))
-+		*((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1))
- 		  = '\0';
- 	      user_name = newp;
- 	    }
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-10-20  Paul Eggert <eggert@cs.ucla.edu>
-+
-+       [BZ #22320]
-+       CVE-2017-15670
-+       * posix/glob.c (__glob): Fix one-byte overflow.
-+
- 2017-08-02  Siddhesh Poyarekar  <siddhesh@sourceware.org>
- 
- 	* version.h (RELEASE): Set to "stable"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb
deleted file mode 100644
index 9d1e636..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.26.bb
+++ /dev/null
@@ -1,144 +0,0 @@
-require glibc.inc
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
-      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
-      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS += "gperf-native bison-native"
-
-SRCREV ?= "d300041c533a3d837c9f37a099bcc95466860e98"
-
-SRCBRANCH ?= "release/${PV}/master"
-
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
-           file://etc/ld.so.conf \
-           file://generate-supported.mk \
-           \
-           ${NATIVESDKFIXES} \
-           file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
-           file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
-           file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
-           file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
-           file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
-           file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
-           file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
-           file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
-           file://0013-Add-unused-attribute.patch \
-           file://0014-yes-within-the-path-sets-wrong-config-variables.patch \
-           file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
-           file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
-           file://0017-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
-           file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0021-eglibc-Install-PIC-archives.patch \
-           file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
-           file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
-           file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
-           file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
-           file://0027-glibc-reset-dl-load-write-lock-after-forking.patch \
-           file://0028-Bug-4578-add-ld.so-lock-while-fork.patch \
-           file://0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
-"
-
-NATIVESDKFIXES ?= ""
-NATIVESDKFIXES_class-nativesdk = "\
-           file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
-           file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
-           file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
-           file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
-           file://relocate-locales.patch \
-"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build-${TARGET_SYS}"
-
-PACKAGES_DYNAMIC = ""
-
-# the -isystem in bitbake.conf screws up glibc do_stage
-BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
-TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
-
-GLIBC_BROKEN_LOCALES = ""
-#
-# We will skip parsing glibc when target system C library selection is not glibc
-# this helps in easing out parsing for non-glibc system libraries
-#
-COMPATIBLE_HOST_libc-musl_class-target = "null"
-
-EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
-                --without-cvs --disable-profile \
-                --disable-debug --without-gd \
-                --enable-clocale=gnu \
-                --enable-add-ons=libidn \
-                --with-headers=${STAGING_INCDIR} \
-                --without-selinux \
-                --enable-obsolete-rpc \
-                --enable-obsolete-nsl \
-                --enable-tunables \
-                --enable-bind-now \
-                --enable-stack-protector=strong \
-                --enable-stackguard-randomization \
-                ${GLIBC_EXTRA_OECONF}"
-
-EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
-
-
-do_patch_append() {
-    bb.build.exec_func('do_fix_readlib_c', d)
-}
-
-do_fix_readlib_c () {
-	sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
-}
-
-do_configure () {
-# override this function to avoid the autoconf/automake/aclocal/autoheader
-# calls for now
-# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
-# version check and doesn't really help with anything
-        (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
-        find ${S} -name "configure" | xargs touch
-        # "plural.c" may or may not get regenerated from "plural.y" so we
-        # touch "plural.y" to make sure it does. (This should not be needed
-        # for glibc version 2.26+)
-        find ${S}/intl -name "plural.y" | xargs touch
-        CPPFLAGS="" oe_runconf
-}
-
-rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
-	  yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
-	  rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
-
-do_compile () {
-	# -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
-	unset LDFLAGS
-	base_do_compile
-	(
-		cd ${S}/sunrpc/rpcsvc
-		for r in ${rpcsvc}; do
-			h=`echo $r|sed -e's,\.x$,.h,'`
-			rm -f $h
-			${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
-		done
-	)
-	echo "Adjust ldd script"
-	if [ -n "${RTLDLIST}" ]
-	then
-		prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
-		if [ "${prevrtld}" != "${RTLDLIST}" ]
-		then
-			sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
-		fi
-	fi
-
-}
-
-require glibc-package.inc
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb
new file mode 100644
index 0000000..c814798
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.27.bb
@@ -0,0 +1,146 @@
+require glibc.inc
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS += "gperf-native bison-native"
+
+SRCREV ?= "df3ff4e49d4ee3cbbdaeb0b1cb5dc2344c08be98"
+
+SRCBRANCH ?= "release/${PV}/master"
+
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.(?!90)\d+)*)"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+           file://etc/ld.so.conf \
+           file://generate-supported.mk \
+           \
+           ${NATIVESDKFIXES} \
+           file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
+           file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+           file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
+           file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+           file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
+           file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+           file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+           file://0012-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+           file://0013-Add-unused-attribute.patch \
+           file://0014-yes-within-the-path-sets-wrong-config-variables.patch \
+           file://0015-timezone-re-written-tzselect-as-posix-sh.patch \
+           file://0016-Remove-bash-dependency-for-nscd-init-script.patch \
+           file://0017-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0018-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0019-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+           file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0021-eglibc-Install-PIC-archives.patch \
+           file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
+           file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+           file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
+           file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
+           file://0026-reset-dl_load_write_lock-after-forking.patch \
+           file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
+           file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
+           file://0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch \
+           file://0030-plural_c_no_preprocessor_lines.patch \
+"
+
+NATIVESDKFIXES ?= ""
+NATIVESDKFIXES_class-nativesdk = "\
+           file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
+           file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
+           file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
+           file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
+           file://relocate-locales.patch \
+           file://0031-nativesdk-deprecate-libcrypt.patch \
+"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+PACKAGES_DYNAMIC = ""
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+GLIBC_BROKEN_LOCALES = ""
+#
+# We will skip parsing glibc when target system C library selection is not glibc
+# this helps in easing out parsing for non-glibc system libraries
+#
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+
+GLIBCPIE ??= ""
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+                --without-cvs --disable-profile \
+                --disable-debug --without-gd \
+                --enable-clocale=gnu \
+                --enable-add-ons=libidn \
+                --with-headers=${STAGING_INCDIR} \
+                --without-selinux \
+                --enable-obsolete-rpc \
+                --enable-obsolete-nsl \
+                --enable-tunables \
+                --enable-bind-now \
+                --enable-stack-protector=strong \
+                --enable-stackguard-randomization \
+                ${GLIBCPIE} \
+                ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
+
+
+do_patch_append() {
+    bb.build.exec_func('do_fix_readlib_c', d)
+}
+
+do_fix_readlib_c () {
+	sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
+}
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+        (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+        find ${S} -name "configure" | xargs touch
+        CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+	  yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+	  rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+	# -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+	unset LDFLAGS
+	base_do_compile
+	(
+		cd ${S}/sunrpc/rpcsvc
+		for r in ${rpcsvc}; do
+			h=`echo $r|sed -e's,\.x$,.h,'`
+			rm -f $h
+			${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
+		done
+	)
+	echo "Adjust ldd script"
+	if [ -n "${RTLDLIST}" ]
+	then
+		prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
+		if [ "${prevrtld}" != "${RTLDLIST}" ]
+		then
+			sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
+		fi
+	fi
+
+}
+
+require glibc-package.inc
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers b/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
index 609ab53..69fedea 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/site_config/headers
@@ -9,7 +9,6 @@
 asm/types.h
 assert.h
 byteswap.h
-crypt.h
 ctype.h
 dirent.h
 dlfcn.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
index 5654528..e9f3a2a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
@@ -6,7 +6,7 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-SRC_URI = "git://anonscm.debian.org/git/collab-maint/ifupdown.git \
+SRC_URI = "git://salsa.debian.org/debian/ifupdown.git;protocol=https \
 	   file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
 	   file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
 	   file://99_network \
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index bd441ae..db2f58d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -22,8 +22,8 @@
 
 inherit core-image module-base setuptools3
 
-SRCREV ?= "a9588646fcec17e53199e1ea7e7b8dccf140817e"
-SRC_URI = "git://git.yoctoproject.org/poky;branch=rocko \
+SRCREV ?= "14d62d5c14e3552f2aeabdbd80d1504bb2c6ed64"
+SRC_URI = "git://git.yoctoproject.org/poky;branch=sumo \
            file://Yocto_Build_Appliance.vmx \
            file://Yocto_Build_Appliance.vmxf \
            file://README_VirtualBox_Guest_Additions.txt \
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
index c446e87..6de860e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -3,7 +3,15 @@
 the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
 first 'init' program more efficiently."
 
-PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+INITRAMFS_SCRIPTS ?= "\
+                      initramfs-framework-base \
+                      initramfs-module-setup-live \
+                      initramfs-module-udev \
+                      initramfs-module-install \
+                      initramfs-module-install-efi \
+                     "
+
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
 
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
index 16995e6..51d08a0 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -5,7 +5,7 @@
 actually generate an image but rather generates boot and rootfs artifacts \
 that can subsequently be picked up by external image generation tools such as wic."
 
-PACKAGE_INSTALL = "initramfs-live-boot packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
 
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 706418f..82b0aa8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -8,8 +8,19 @@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+    boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+    boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
 
 # 5% for swap
 swap_ratio=5
@@ -179,7 +190,7 @@
 parted ${device} set 1 boot on
 
 echo "Creating rootfs partition on $rootfs"
-parted ${device} mkpart root ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart root ext4 $rootfs_start $rootfs_end
 
 echo "Creating swap partition on $swap"
 parted ${device} mkpart swap linux-swap $swap_start 100%
@@ -196,8 +207,8 @@
 echo "Formatting $bootfs to vfat..."
 mkfs.vfat $bootfs
 
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
 
 echo "Formatting swap partition...($swap)"
 mkswap $swap
@@ -244,10 +255,9 @@
     sed -i "/initrd /d" $GRUBCFG
     # Delete any LABEL= strings
     sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
-    # Delete any root= strings
-    sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
-    # Add the root= and other standard boot options
-    sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
+    # Replace root= and add additional standard boot options
+    # We use root as a sentinel value, as vmlinuz is no longer guaranteed
+    sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet /g" $GRUBCFG
 fi
 
 if [ -d /run/media/$1/loader ]; then
@@ -269,7 +279,13 @@
 
 umount /tgt_root
 
-cp /run/media/$1/vmlinuz /boot
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+    for kernel in `find /run/media/$1/ -name $types*`; do
+        cp $kernel /boot
+    done
+done
 
 umount /boot
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
index dade059..28e8f09 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -7,8 +7,19 @@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-# We need 20 Mb for the boot partition
-boot_size=20
+# figure out how big of a boot partition we need
+boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
+# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
+if [ -e /run/media/$1/$2 ]; then
+    boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
+fi
+# remove initrd from size since its not currently installed
+if [ -e /run/media/$1/initrd ]; then
+    boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
+fi
+# add 10M to provide some extra space for users and account
+# for rounding in the above subtractions
+boot_size=$(( boot_size + 10 ))
 
 # 5% for the swap
 swap_ratio=5
@@ -203,7 +214,7 @@
 
 echo "Creating rootfs partition on $rootfs"
 [ $grub_version -eq 0 ] && pname='primary' || pname='root'
-parted ${device} mkpart $pname ext3 $rootfs_start $rootfs_end
+parted ${device} mkpart $pname ext4 $rootfs_start $rootfs_end
 
 echo "Creating swap partition on $swap"
 [ $grub_version -eq 0 ] && pname='primary' || pname='swap'
@@ -221,8 +232,8 @@
 echo "Formatting $bootfs to ext3..."
 mkfs.ext3 $bootfs
 
-echo "Formatting $rootfs to ext3..."
-mkfs.ext3 $rootfs
+echo "Formatting $rootfs to ext4..."
+mkfs.ext4 $rootfs
 
 echo "Formatting swap partition...($swap)"
 mkswap $swap
@@ -256,9 +267,34 @@
 umount /tgt_root
 umount /src_root
 
+echo "Looking for kernels to use as boot target.."
+# Find kernel to boot to
+# Give user options if multiple are found
+kernels="$(find /run/media/$1/ -type f  \
+           -name bzImage* -o -name zImage* \
+           -o -name vmlinux* -o -name vmlinuz* \
+           -o -name fitImage* \
+           | sed s:.*/::)"
+if [ -n "$(echo $kernels)" ]; then
+    # only one kernel entry if no space
+    if [ -z "$(echo $kernels | grep " ")" ]; then
+        kernel=$kernels
+        echo "$kernel will be used as the boot target"
+    else
+        echo "Which kernel do we want to boot by default? The following kernels were found:"
+        echo $kernels
+        read answer
+        kernel=$answer
+    fi
+else
+    echo "No kernels found, exiting..."
+    exit 1
+fi
+
 # Handling of the target boot partition
 mount $bootfs /boot
 echo "Preparing boot partition..."
+
 if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
     echo "Preparing custom grub2 menu..."
     root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
@@ -268,7 +304,7 @@
     cat >$GRUBCFG <<_EOF
 menuentry "Linux" {
     search --no-floppy --fs-uuid $boot_uuid --set root
-    linux /vmlinuz root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
+    linux /$kernel root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
 }
 _EOF
     chmod 0444 $GRUBCFG
@@ -282,10 +318,16 @@
     echo "timeout 30" >> /boot/grub/menu.lst
     echo "title Live Boot/Install-Image" >> /boot/grub/menu.lst
     echo "root  (hd0,0)" >> /boot/grub/menu.lst
-    echo "kernel /vmlinuz root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
+    echo "kernel /$kernel root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
 fi
 
-cp /run/media/$1/vmlinuz /boot/
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+    for kernel in `find /run/media/$1/ -name $types*`; do
+        cp $kernel /boot
+    done
+done
 
 umount /boot
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec
new file mode 100644
index 0000000..a8e2432
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/exec
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright (C) 2017 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+EXEC_DIR=/exec.d  # place to look for modules
+
+exec_enabled() {
+	return 0
+}
+
+exec_run() {
+	if [ ! -d $EXEC_DIR ]; then
+		msg "No contents to exec in $EXEC_DIR. Starting shell ..."
+		sh
+	fi
+
+	# Load and run modules
+	for m in $EXEC_DIR/*; do
+		# Skip backup files
+		if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
+			continue
+		fi
+
+		debug "Starting $m"
+
+		# process module
+		./$m
+	done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 14768f1..76fa84d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -31,6 +31,11 @@
 				bootparam_root="/dev/disk/by-partuuid/$root_uuid"
 			fi
 
+			if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
+				root_label=`echo $bootparam_root | cut -c7-`
+				bootparam_root="/dev/disk/by-label/$root_label"
+			fi
+
 			if [ -e "$bootparam_root" ]; then
 				flags=""
 				if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 2afc37e..75d965f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -8,6 +8,7 @@
 inherit allarch
 
 SRC_URI = "file://init \
+           file://exec \
            file://rootfs \
            file://finish \
            file://mdev \
@@ -26,6 +27,9 @@
     install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs
     install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
 
+	# exec
+    install -m 0755 ${WORKDIR}/exec ${D}/init.d/89-exec
+
     # mdev
     install -m 0755 ${WORKDIR}/mdev ${D}/init.d/01-mdev
 
@@ -45,6 +49,7 @@
 }
 
 PACKAGES = "${PN}-base \
+            initramfs-module-exec \
             initramfs-module-mdev \
             initramfs-module-udev \
             initramfs-module-e2fs \
@@ -62,6 +67,10 @@
 # and mounts the rootfs. Then 90-rootfs will proceed immediately.
 RRECOMMENDS_${PN}-base += "initramfs-module-rootfs"
 
+SUMMARY_initramfs-module-exec = "initramfs support for easy execution of applications"
+RDEPENDS_initramfs-module-exec = "${PN}-base"
+FILES_initramfs-module-exec = "/init.d/89-exec"
+
 SUMMARY_initramfs-module-mdev = "initramfs support for mdev"
 RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev"
 FILES_initramfs-module-mdev = "/init.d/01-mdev"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
new file mode 100644
index 0000000..7a9a8ec
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Live image init script"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+DEPENDS = "virtual/kernel"
+RDEPENDS_${PN} = "busybox-mdev"
+SRC_URI = "file://init-live.sh"
+
+PR = "r12"
+
+S = "${WORKDIR}"
+
+do_install() {
+        install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
+        install -d ${D}/dev
+        mknod -m 622 ${D}/dev/console c 5 1
+}
+
+FILES_${PN} += " /init /dev "
+
+# Due to kernel dependency
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
index 2a7f84d..f588a10 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
@@ -5,7 +5,7 @@
 
 PR = "r1"
 
-RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid"
+RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
 
 S = "${WORKDIR}"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
index a553a0d..9222d57 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -7,7 +7,7 @@
 
 S = "${WORKDIR}"
 
-RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid"
+RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
 
 do_install() {
         install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
index 1e7f76f..78a61cd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb
@@ -1,7 +1,7 @@
 SUMMARY = "initramfs-framework module for EFI installation option"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid"
+RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
 
 PR = "r4"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
index 02b69f3..04e90cd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb
@@ -1,7 +1,7 @@
 SUMMARY = "initramfs-framework module for installation option"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid"
+RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
 
 # The same restriction as grub
 COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
index 27d6f42..a9a3ab8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
@@ -13,10 +13,10 @@
 
 Signed-off-by: Kai Kang <kai.kang@windriver.com>
 
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 1976333..b36aef3 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
+Index: kbd-2.0.4/tests/Makefile.am
+===================================================================
+--- kbd-2.0.4.orig/tests/Makefile.am
++++ kbd-2.0.4/tests/Makefile.am
 @@ -1,7 +1,7 @@
  AM_CPPFLAGS = \
  	-I$(srcdir)/../src/libkeymap \
@@ -25,11 +25,11 @@
 +	-DDATADIR=\".\" -DBUILDDIR=\"$(builddir)\"
  
  AM_CFLAGS = $(CHECK_CFLAGS)
- LDADD  = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS)
-diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
-index ddd5ed8..772fb51 100755
---- a/tests/alt-is-meta.in
-+++ b/tests/alt-is-meta.in
+ LDADD  = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) @INTLLIBS@
+Index: kbd-2.0.4/tests/alt-is-meta.in
+===================================================================
+--- kbd-2.0.4.orig/tests/alt-is-meta.in
++++ kbd-2.0.4/tests/alt-is-meta.in
 @@ -7,8 +7,8 @@ cd "$cwd"
  rc=0
  temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
@@ -41,10 +41,10 @@
  
  if [ "$rc" != 0 ]; then
  	printf 'failed\n'
-diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
-index 7c856e5..14d92c1 100755
---- a/tests/dumpkeys-fulltable.in
-+++ b/tests/dumpkeys-fulltable.in
+Index: kbd-2.0.4/tests/dumpkeys-fulltable.in
+===================================================================
+--- kbd-2.0.4.orig/tests/dumpkeys-fulltable.in
++++ kbd-2.0.4/tests/dumpkeys-fulltable.in
 @@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")"
  cd "$cwd"
  
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
index 423b47a..4af3256 100644
--- a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.4.bb
@@ -3,7 +3,6 @@
 # everything minus console-fonts is GPLv2+
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5"
-DEPENDS = "libcheck"
 
 inherit autotools gettext ptest pkgconfig
 
@@ -19,8 +18,12 @@
 SRC_URI[md5sum] = "c1635a5a83b63aca7f97a3eab39ebaa6"
 SRC_URI[sha256sum] = "5fd90af6beb225a9bb9b9fb414c090fba53c9a55793e172f508cd43652e59a88"
 
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+                  ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \
+                  "
+
 PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck"
 
 do_compile_ptest() {
     oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta
@@ -29,6 +32,13 @@
 do_install_ptest() {
     install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
     sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+	-e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+	-e 's:${DEBUG_PREFIX_MAP}::g' \
+	-e 's:${HOSTTOOLS_DIR}/::g' \
+	-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+	-e 's:${RECIPE_SYSROOT}::g' \
+	-e 's:${S}/config/missing::g' \
+	-e 's:${WORKDIR}::g' \
 	-e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
 
     find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
@@ -48,7 +58,7 @@
 
 inherit update-alternatives
 
-ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
+ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey"
 ALTERNATIVE_PRIORITY = "100"
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb b/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
index e4b1782..7ddc81e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
@@ -9,7 +9,7 @@
 
 inherit autotools pkgconfig
 
-DEPENDS = "bison-native flex-native ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+DEPENDS = "bison-native flex-native"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v0.41/${BPN}-${PV}.tar.bz2"
 SRC_URI_append_libc-musl = " file://musl-decls-compat.patch"
@@ -20,9 +20,10 @@
 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libcg/files/libcgroup/"
 
 DEPENDS_append_libc-musl = " fts "
-EXTRA_OEMAKE_append_libc-musl = "LIBS=-lfts"
+EXTRA_OEMAKE_append_libc-musl = " LIBS=-lfts"
 
-EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
+PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[pam] = "--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes,--enable-pam=no,libpam"
 
 PACKAGES =+ "cgroups-pam-plugin"
 FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
@@ -33,8 +34,8 @@
 	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
 		mkdir -p ${D}/${base_libdir}/
 		mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
-		rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
-		ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
+		rm -f ${D}${libdir}/libcgroup.so
+		lnr ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
 	fi
 	# pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
 	if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb b/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb
new file mode 100644
index 0000000..6ed67a6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxcrypt/libxcrypt_4.0.1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Extended cryptographic library (from glibc)"
+DESCRIPTION = "Forked code from glibc libary to extract only crypto part."
+HOMEPAGE = "https://github.com/besser82/libxcrypt"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM ?= "file://LICENSING;md5=d1cc18f512ded3bd6000f3729f31be08 \
+      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+"
+
+inherit autotools
+
+SRCREV ?= "089479bb24acd168613757a6f12d63caa95416b4"
+SRCBRANCH ?= "master"
+
+SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \
+           "
+
+PROVIDES = "virtual/crypt"
+
+FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowcrypt*.so.* ${libdir}/libowcrypt-*.so"
+
+S = "${WORKDIR}/git"
+
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+python () {
+    if not bb.data.inherits_class('nativesdk', d):
+        raise bb.parse.SkipRecipe("Recipe only applies in nativesdk case for now")
+}
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
index d1ad551..2b92dbc 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
@@ -15,12 +15,12 @@
  python/tests/tstLastError.py |  2 +-
  4 files changed, 21 insertions(+), 4 deletions(-)
 
-diff --git a/Makefile.am b/Makefile.am
-index e181ee0..7960e7d 100644
---- a/Makefile.am
-+++ b/Makefile.am
+Index: libxml2-2.9.7/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/Makefile.am
++++ libxml2-2.9.7/Makefile.am
 @@ -207,9 +207,9 @@ install-ptest:
- 	install $(noinst_PROGRAMS) $(DESTDIR))
+ 	install $(check_PROGRAMS) $(DESTDIR))
  	cp -r $(srcdir)/test $(DESTDIR)
  	cp -r $(srcdir)/result $(DESTDIR)
 -	cp -r $(srcdir)/python $(DESTDIR)
@@ -28,13 +28,13 @@
  	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
 +	$(MAKE) -C python install-ptest
  
- runtests:
- 	[ -d test   ] || $(LN_S) $(srcdir)/test   .
-diff --git a/python/Makefile.am b/python/Makefile.am
-index 34aed96..ba3ec6a 100644
---- a/python/Makefile.am
-+++ b/python/Makefile.am
-@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+           testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
+Index: libxml2-2.9.7/python/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/python/Makefile.am
++++ libxml2-2.9.7/python/Makefile.am
+@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class
  
  $(GENERATED): $(srcdir)/generator.py $(API_DESC)
  	$(PYTHON) $(srcdir)/generator.py $(srcdir)
@@ -51,10 +51,10 @@
 +.PHONY: tests test
  tests test: all
  	cd tests && $(MAKE) tests
-diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
-index 95ebead..418e21e 100644
---- a/python/tests/Makefile.am
-+++ b/python/tests/Makefile.am
+Index: libxml2-2.9.7/python/tests/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/python/tests/Makefile.am
++++ libxml2-2.9.7/python/tests/Makefile.am
 @@ -59,6 +59,11 @@ XMLS=		\
  CLEANFILES = core tmp.xml *.pyc
  
@@ -81,10 +81,10 @@
 +
  tests:
  endif
-diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
-index d5f9be7..3e5bef8 100755
---- a/python/tests/tstLastError.py
-+++ b/python/tests/tstLastError.py
+Index: libxml2-2.9.7/python/tests/tstLastError.py
+===================================================================
+--- libxml2-2.9.7.orig/python/tests/tstLastError.py
++++ libxml2-2.9.7/python/tests/tstLastError.py
 @@ -25,7 +25,7 @@ class TestCase(unittest.TestCase):
          when the exception is raised, check the libxml2.lastError for
          expected values."""
@@ -94,6 +94,3 @@
          try:
              f(*args)
          except exc:
--- 
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
new file mode 100644
index 0000000..51a9e19
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
@@ -0,0 +1,21 @@
+Make sure that Makefile doesn't try to compile these tests again
+on the target where the source dependencies won't be available.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+Index: libxml2-2.9.7/Makefile.am
+===================================================================
+--- libxml2-2.9.7.orig/Makefile.am
++++ libxml2-2.9.7/Makefile.am
+@@ -211,8 +211,7 @@ install-ptest:
+ 	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+ 	$(MAKE) -C python install-ptest
+ 
+-runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+-          testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
++runtests:
+ 	[ -d test   ] || $(LN_S) $(srcdir)/test   .
+ 	[ -d result ] || $(LN_S) $(srcdir)/result .
+ 	$(CHECKER) ./runtest$(EXEEXT) && \
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
index 3277165..d9ed151 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -183,7 +183,7 @@
 -          echo "*** If you have an old version installed, it is best to remove it, although"
 -          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
 -        [ echo "*** The test program failed to compile or link. See the file config.log for the"
--          echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
+-          echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed"
 -          echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
 -          echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
 -          CPPFLAGS="$ac_save_CPPFLAGS"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
deleted file mode 100644
index bb55eed..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-4658.patch
+++ /dev/null
@@ -1,269 +0,0 @@
-libxml2-2.9.4: Fix CVE-2016-4658
-
-[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-4658
-
-xpointer: Disallow namespace nodes in XPointer points and ranges
-
-Namespace nodes must be copied to avoid use-after-free errors.
-But they don't necessarily have a physical representation in a
-document, so simply disallow them in XPointer ranges.
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- - [https://git.gnome.org/browse/libxml2/commit/?id=3f8a91036d338e51c059d54397a42d645f019c65]
-CVE: CVE-2016-4658
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..911680d 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -320,6 +320,45 @@ xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) {
- }
- 
- /**
-+ * xmlXPtrNewRangeInternal:
-+ * @start:  the starting node
-+ * @startindex:  the start index
-+ * @end:  the ending point
-+ * @endindex:  the ending index
-+ *
-+ * Internal function to create a new xmlXPathObjectPtr of type range
-+ *
-+ * Returns the newly created object.
-+ */
-+static xmlXPathObjectPtr
-+xmlXPtrNewRangeInternal(xmlNodePtr start, int startindex,
-+                        xmlNodePtr end, int endindex) {
-+    xmlXPathObjectPtr ret;
-+
-+    /*
-+     * Namespace nodes must be copied (see xmlXPathNodeSetDupNs).
-+     * Disallow them for now.
-+     */
-+    if ((start != NULL) && (start->type == XML_NAMESPACE_DECL))
-+	return(NULL);
-+    if ((end != NULL) && (end->type == XML_NAMESPACE_DECL))
-+	return(NULL);
-+
-+    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
-+    if (ret == NULL) {
-+        xmlXPtrErrMemory("allocating range");
-+	return(NULL);
-+    }
-+    memset(ret, 0, sizeof(xmlXPathObject));
-+    ret->type = XPATH_RANGE;
-+    ret->user = start;
-+    ret->index = startindex;
-+    ret->user2 = end;
-+    ret->index2 = endindex;
-+    return(ret);
-+}
-+
-+/**
-  * xmlXPtrNewRange:
-  * @start:  the starting node
-  * @startindex:  the start index
-@@ -344,17 +383,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex,
-     if (endindex < 0)
- 	return(NULL);
- 
--    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
--    if (ret == NULL) {
--        xmlXPtrErrMemory("allocating range");
--	return(NULL);
--    }
--    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
--    ret->type = XPATH_RANGE;
--    ret->user = start;
--    ret->index = startindex;
--    ret->user2 = end;
--    ret->index2 = endindex;
-+    ret = xmlXPtrNewRangeInternal(start, startindex, end, endindex);
-     xmlXPtrRangeCheckOrder(ret);
-     return(ret);
- }
-@@ -381,17 +410,8 @@ xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) {
-     if (end->type != XPATH_POINT)
- 	return(NULL);
- 
--    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
--    if (ret == NULL) {
--        xmlXPtrErrMemory("allocating range");
--	return(NULL);
--    }
--    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
--    ret->type = XPATH_RANGE;
--    ret->user = start->user;
--    ret->index = start->index;
--    ret->user2 = end->user;
--    ret->index2 = end->index;
-+    ret = xmlXPtrNewRangeInternal(start->user, start->index, end->user,
-+				  end->index);
-     xmlXPtrRangeCheckOrder(ret);
-     return(ret);
- }
-@@ -416,17 +436,7 @@ xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) {
-     if (start->type != XPATH_POINT)
- 	return(NULL);
- 
--    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
--    if (ret == NULL) {
--        xmlXPtrErrMemory("allocating range");
--	return(NULL);
--    }
--    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
--    ret->type = XPATH_RANGE;
--    ret->user = start->user;
--    ret->index = start->index;
--    ret->user2 = end;
--    ret->index2 = -1;
-+    ret = xmlXPtrNewRangeInternal(start->user, start->index, end, -1);
-     xmlXPtrRangeCheckOrder(ret);
-     return(ret);
- }
-@@ -453,17 +463,7 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) {
-     if (end->type != XPATH_POINT)
- 	return(NULL);
- 
--    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
--    if (ret == NULL) {
--        xmlXPtrErrMemory("allocating range");
--	return(NULL);
--    }
--    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
--    ret->type = XPATH_RANGE;
--    ret->user = start;
--    ret->index = -1;
--    ret->user2 = end->user;
--    ret->index2 = end->index;
-+    ret = xmlXPtrNewRangeInternal(start, -1, end->user, end->index);
-     xmlXPtrRangeCheckOrder(ret);
-     return(ret);
- }
-@@ -486,17 +486,7 @@ xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) {
-     if (end == NULL)
- 	return(NULL);
- 
--    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
--    if (ret == NULL) {
--        xmlXPtrErrMemory("allocating range");
--	return(NULL);
--    }
--    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
--    ret->type = XPATH_RANGE;
--    ret->user = start;
--    ret->index = -1;
--    ret->user2 = end;
--    ret->index2 = -1;
-+    ret = xmlXPtrNewRangeInternal(start, -1, end, -1);
-     xmlXPtrRangeCheckOrder(ret);
-     return(ret);
- }
-@@ -516,17 +506,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
-     if (start == NULL)
- 	return(NULL);
- 
--    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
--    if (ret == NULL) {
--        xmlXPtrErrMemory("allocating range");
--	return(NULL);
--    }
--    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
--    ret->type = XPATH_RANGE;
--    ret->user = start;
--    ret->index = -1;
--    ret->user2 = NULL;
--    ret->index2 = -1;
-+    ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1);
-     return(ret);
- }
- 
-@@ -541,6 +521,8 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
-  */
- xmlXPathObjectPtr
- xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
-+    xmlNodePtr endNode;
-+    int endIndex;
-     xmlXPathObjectPtr ret;
- 
-     if (start == NULL)
-@@ -549,7 +531,12 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- 	return(NULL);
-     switch (end->type) {
- 	case XPATH_POINT:
-+	    endNode = end->user;
-+	    endIndex = end->index;
-+	    break;
- 	case XPATH_RANGE:
-+	    endNode = end->user2;
-+	    endIndex = end->index2;
- 	    break;
- 	case XPATH_NODESET:
- 	    /*
-@@ -557,39 +544,15 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- 	     */
- 	    if (end->nodesetval->nodeNr <= 0)
- 		return(NULL);
-+	    endNode = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
-+	    endIndex = -1;
- 	    break;
- 	default:
- 	    /* TODO */
- 	    return(NULL);
-     }
- 
--    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
--    if (ret == NULL) {
--        xmlXPtrErrMemory("allocating range");
--	return(NULL);
--    }
--    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
--    ret->type = XPATH_RANGE;
--    ret->user = start;
--    ret->index = -1;
--    switch (end->type) {
--	case XPATH_POINT:
--	    ret->user2 = end->user;
--	    ret->index2 = end->index;
--	    break;
--	case XPATH_RANGE:
--	    ret->user2 = end->user2;
--	    ret->index2 = end->index2;
--	    break;
--	case XPATH_NODESET: {
--	    ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
--	    ret->index2 = -1;
--	    break;
--	}
--	default:
--	    STRANGE
--	    return(NULL);
--    }
-+    ret = xmlXPtrNewRangeInternal(start, -1, endNode, endIndex);
-     xmlXPtrRangeCheckOrder(ret);
-     return(ret);
- }
-@@ -1835,8 +1798,8 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- 		case XPATH_RANGE: {
- 		    xmlNodePtr node = tmp->user;
- 		    if (node != NULL) {
--			if (node->type == XML_ATTRIBUTE_NODE) {
--			    /* TODO: Namespace Nodes ??? */
-+			if ((node->type == XML_ATTRIBUTE_NODE) ||
-+			     (node->type == XML_NAMESPACE_DECL)) {
- 			    xmlXPathFreeObject(obj);
- 			    xmlXPtrFreeLocationSet(newset);
- 			    XP_ERROR(XPTR_SYNTAX_ERROR);
-@@ -1931,8 +1894,8 @@ xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- 		case XPATH_RANGE: {
- 		    xmlNodePtr node = tmp->user2;
- 		    if (node != NULL) {
--			if (node->type == XML_ATTRIBUTE_NODE) {
--			    /* TODO: Namespace Nodes ??? */
-+			if ((node->type == XML_ATTRIBUTE_NODE) ||
-+			     (node->type == XML_NAMESPACE_DECL)) {
- 			    xmlXPathFreeObject(obj);
- 			    xmlXPtrFreeLocationSet(newset);
- 			    XP_ERROR(XPTR_SYNTAX_ERROR);
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
deleted file mode 100644
index 9d47d02..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 28 Jun 2016 14:22:23 +0200
-Subject: [PATCH] Fix XPointer paths beginning with range-to
-
-The old code would invoke the broken xmlXPtrRangeToFunction. range-to
-isn't really a function but a special kind of location step. Remove
-this function and always handle range-to in the XPath code.
-
-The old xmlXPtrRangeToFunction could also be abused to trigger a
-use-after-free error with the potential for remote code execution.
-
-Found with afl-fuzz.
-
-Fixes CVE-2016-5131.
-
-CVE: CVE-2016-5131
-Upstream-Status: Backport
-https://git.gnome.org/browse/libxml2/commit/?id=9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
-
-Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
----
- result/XPath/xptr/vidbase | 13 ++++++++
- test/XPath/xptr/vidbase   |  1 +
- xpath.c                   |  7 ++++-
- xpointer.c                | 76 ++++-------------------------------------------
- 4 files changed, 26 insertions(+), 71 deletions(-)
-
-diff --git a/result/XPath/xptr/vidbase b/result/XPath/xptr/vidbase
-index 8b9e92d..f19193e 100644
---- a/result/XPath/xptr/vidbase
-+++ b/result/XPath/xptr/vidbase
-@@ -17,3 +17,16 @@ Object is a Location Set:
-   To node
-     ELEMENT p
- 
-+
-+========================
-+Expression: xpointer(range-to(id('chapter2')))
-+Object is a Location Set:
-+1 :   Object is a range :
-+  From node
-+     /
-+  To node
-+    ELEMENT chapter
-+      ATTRIBUTE id
-+        TEXT
-+          content=chapter2
-+
-diff --git a/test/XPath/xptr/vidbase b/test/XPath/xptr/vidbase
-index b146383..884b106 100644
---- a/test/XPath/xptr/vidbase
-+++ b/test/XPath/xptr/vidbase
-@@ -1,2 +1,3 @@
- xpointer(id('chapter1')/p)
- xpointer(id('chapter1')/p[1]/range-to(following-sibling::p[2]))
-+xpointer(range-to(id('chapter2')))
-diff --git a/xpath.c b/xpath.c
-index d992841..5a01b1b 100644
---- a/xpath.c
-+++ b/xpath.c
-@@ -10691,13 +10691,18 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
- 		    lc = 1;
- 		    break;
- 		} else if ((NXT(len) == '(')) {
--		    /* Note Type or Function */
-+		    /* Node Type or Function */
- 		    if (xmlXPathIsNodeType(name)) {
- #ifdef DEBUG_STEP
- 		        xmlGenericError(xmlGenericErrorContext,
- 				"PathExpr: Type search\n");
- #endif
- 			lc = 1;
-+#ifdef LIBXML_XPTR_ENABLED
-+                    } else if (ctxt->xptr &&
-+                               xmlStrEqual(name, BAD_CAST "range-to")) {
-+                        lc = 1;
-+#endif
- 		    } else {
- #ifdef DEBUG_STEP
- 		        xmlGenericError(xmlGenericErrorContext,
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..d74174a 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -1332,8 +1332,6 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
-     ret->here = here;
-     ret->origin = origin;
- 
--    xmlXPathRegisterFunc(ret, (xmlChar *)"range-to",
--	                 xmlXPtrRangeToFunction);
-     xmlXPathRegisterFunc(ret, (xmlChar *)"range",
- 	                 xmlXPtrRangeFunction);
-     xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside",
-@@ -2243,76 +2241,14 @@ xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) {
-  * @nargs:  the number of args
-  *
-  * Implement the range-to() XPointer function
-+ *
-+ * Obsolete. range-to is not a real function but a special type of location
-+ * step which is handled in xpath.c.
-  */
- void
--xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
--    xmlXPathObjectPtr range;
--    const xmlChar *cur;
--    xmlXPathObjectPtr res, obj;
--    xmlXPathObjectPtr tmp;
--    xmlLocationSetPtr newset = NULL;
--    xmlNodeSetPtr oldset;
--    int i;
--
--    if (ctxt == NULL) return;
--    CHECK_ARITY(1);
--    /*
--     * Save the expression pointer since we will have to evaluate
--     * it multiple times. Initialize the new set.
--     */
--    CHECK_TYPE(XPATH_NODESET);
--    obj = valuePop(ctxt);
--    oldset = obj->nodesetval;
--    ctxt->context->node = NULL;
--
--    cur = ctxt->cur;
--    newset = xmlXPtrLocationSetCreate(NULL);
--
--    for (i = 0; i < oldset->nodeNr; i++) {
--	ctxt->cur = cur;
--
--	/*
--	 * Run the evaluation with a node list made of a single item
--	 * in the nodeset.
--	 */
--	ctxt->context->node = oldset->nodeTab[i];
--	tmp = xmlXPathNewNodeSet(ctxt->context->node);
--	valuePush(ctxt, tmp);
--
--	xmlXPathEvalExpr(ctxt);
--	CHECK_ERROR;
--
--	/*
--	 * The result of the evaluation need to be tested to
--	 * decided whether the filter succeeded or not
--	 */
--	res = valuePop(ctxt);
--	range = xmlXPtrNewRangeNodeObject(oldset->nodeTab[i], res);
--	if (range != NULL) {
--	    xmlXPtrLocationSetAdd(newset, range);
--	}
--
--	/*
--	 * Cleanup
--	 */
--	if (res != NULL)
--	    xmlXPathFreeObject(res);
--	if (ctxt->value == tmp) {
--	    res = valuePop(ctxt);
--	    xmlXPathFreeObject(res);
--	}
--
--	ctxt->context->node = NULL;
--    }
--
--    /*
--     * The result is used as the new evaluation set.
--     */
--    xmlXPathFreeObject(obj);
--    ctxt->context->node = NULL;
--    ctxt->context->contextSize = -1;
--    ctxt->context->proximityPosition = -1;
--    valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
-+xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt,
-+                       int nargs ATTRIBUTE_UNUSED) {
-+    XP_ERROR(XPATH_EXPR_ERROR);
- }
- 
- /**
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch
deleted file mode 100644
index 0108265..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-0663.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-libxml2: Fix CVE-2017-0663
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=780228
-
-valid: Fix type confusion in xmlValidateOneNamespace
-
-Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types
-on namespace declarations make no practical sense anyway.
-
-Fixes bug 780228
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=92b9e8c8b3787068565a1820ba575d042f9eec66]
-CVE: CVE-2017-0663
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/valid.c b/valid.c
-index 19f84b8..e03d35e 100644
---- a/valid.c
-+++ b/valid.c
-@@ -4621,6 +4621,12 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
- 	}
-     }
- 
-+    /*
-+     * Casting ns to xmlAttrPtr is wrong. We'd need separate functions
-+     * xmlAddID and xmlAddRef for namespace declarations, but it makes
-+     * no practical sense to use ID types anyway.
-+     */
-+#if 0
-     /* Validity Constraint: ID uniqueness */
-     if (attrDecl->atype == XML_ATTRIBUTE_ID) {
-         if (xmlAddID(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
-@@ -4632,6 +4638,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
-         if (xmlAddRef(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
- 	    ret = 0;
-     }
-+#endif
- 
-     /* Validity Constraint: Notation Attributes */
-     if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) {
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch
deleted file mode 100644
index 571b05c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-5969.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-5969
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=758422
-
-valid: Fix NULL pointer deref in xmlDumpElementContent
-
-Can only be triggered in recovery mode.
-
-Fixes bug 758422
-
-Upstream-Status: Backport - [https://git.gnome.org/browse/libxml2/commit/?id=94691dc884d1a8ada39f073408b4bb92fe7fe882]
-CVE: CVE-2017-5969
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/valid.c b/valid.c
-index 19f84b8..0a8e58a 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1172,29 +1172,33 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
- 	    xmlBufferWriteCHAR(buf, content->name);
- 	    break;
- 	case XML_ELEMENT_CONTENT_SEQ:
--	    if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
--	        (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+	    if ((content->c1 != NULL) &&
-+	        ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+	         (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- 		xmlDumpElementContent(buf, content->c1, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c1, 0);
-             xmlBufferWriteChar(buf, " , ");
--	    if ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
--	        ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
--		 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+	    if ((content->c2 != NULL) &&
-+	        ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
-+	         ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
-+		  (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- 		xmlDumpElementContent(buf, content->c2, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c2, 0);
- 	    break;
- 	case XML_ELEMENT_CONTENT_OR:
--	    if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
--	        (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+	    if ((content->c1 != NULL) &&
-+	        ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+	         (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- 		xmlDumpElementContent(buf, content->c1, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c1, 0);
-             xmlBufferWriteChar(buf, " | ");
--	    if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
--	        ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
--		 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+	    if ((content->c2 != NULL) &&
-+	        ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
-+	         ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
-+		  (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- 		xmlDumpElementContent(buf, content->c2, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c2, 0);
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch
deleted file mode 100644
index 26779aa..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d2f873a541c72b0f67e15562819bf98b884b30b7 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 23 Aug 2017 16:04:49 +0800
-Subject: [PATCH] fix CVE-2017-8872
-
-this makes xmlHaltParser "empty" the buffer, as it resets cur and ava
-il too here.
-
-this seems to cure this specific issue, and also passes the testsuite
-
-Signed-off-by: Marcus Meissner <meissner@suse.de>
-
-https://bugzilla.gnome.org/show_bug.cgi?id=775200
-Upstream-Status: Backport [https://bugzilla.gnome.org/attachment.cgi?id=355527&action=diff]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- parser.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/parser.c b/parser.c
-index 9506ead..6c07ffd 100644
---- a/parser.c
-+++ b/parser.c
-@@ -12664,6 +12664,10 @@ xmlHaltParser(xmlParserCtxtPtr ctxt) {
- 	}
- 	ctxt->input->cur = BAD_CAST"";
- 	ctxt->input->base = ctxt->input->cur;
-+	if (ctxt->input->buf) {
-+		xmlBufEmpty (ctxt->input->buf->buffer);
-+	} else
-+		ctxt->input->length = 0;
-     }
- }
- 
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch
deleted file mode 100644
index 8b03456..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9047_CVE-2017-9048.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-9047 and CVE-2017-9048
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=781333
- -- https://bugzilla.gnome.org/show_bug.cgi?id=781701
-
-valid: Fix buffer size checks in xmlSnprintfElementContent
-
-xmlSnprintfElementContent failed to correctly check the available
-buffer space in two locations.
-
-Fixes bug 781333 and bug 781701
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=932cc9896ab41475d4aa429c27d9afd175959d74]
-CVE: CVE-2017-9047 CVE-2017-9048
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/result/valid/781333.xml b/result/valid/781333.xml
-new file mode 100644
-index 0000000..01baf11
---- /dev/null
-+++ b/result/valid/781333.xml
-@@ -0,0 +1,5 @@
-+<?xml version="1.0"?>
-+<!DOCTYPE a [
-+<!ELEMENT a (pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/result/valid/781333.xml.err b/result/valid/781333.xml.err
-new file mode 100644
-index 0000000..2176200
---- /dev/null
-+++ b/result/valid/781333.xml.err
-@@ -0,0 +1,3 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got 
-+<a/>
-+    ^
-diff --git a/result/valid/781333.xml.err.rdr b/result/valid/781333.xml.err.rdr
-new file mode 100644
-index 0000000..1195a04
---- /dev/null
-+++ b/result/valid/781333.xml.err.rdr
-@@ -0,0 +1,6 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got 
-+<a/>
-+    ^
-+./test/valid/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child
-+
-+^
-diff --git a/test/valid/781333.xml b/test/valid/781333.xml
-new file mode 100644
-index 0000000..bceac9c
---- /dev/null
-+++ b/test/valid/781333.xml
-@@ -0,0 +1,4 @@
-+<!DOCTYPE a [
-+    <!ELEMENT a (pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/valid.c b/valid.c
-index 19f84b8..aaa30f6 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1262,22 +1262,23 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
-         case XML_ELEMENT_CONTENT_PCDATA:
-             strcat(buf, "#PCDATA");
- 	    break;
--	case XML_ELEMENT_CONTENT_ELEMENT:
-+	case XML_ELEMENT_CONTENT_ELEMENT: {
-+            int qnameLen = xmlStrlen(content->name);
-+
-+	    if (content->prefix != NULL)
-+                qnameLen += xmlStrlen(content->prefix) + 1;
-+	    if (size - len < qnameLen + 10) {
-+		strcat(buf, " ...");
-+		return;
-+	    }
- 	    if (content->prefix != NULL) {
--		if (size - len < xmlStrlen(content->prefix) + 10) {
--		    strcat(buf, " ...");
--		    return;
--		}
- 		strcat(buf, (char *) content->prefix);
- 		strcat(buf, ":");
- 	    }
--	    if (size - len < xmlStrlen(content->name) + 10) {
--		strcat(buf, " ...");
--		return;
--	    }
- 	    if (content->name != NULL)
- 		strcat(buf, (char *) content->name);
- 	    break;
-+	}
- 	case XML_ELEMENT_CONTENT_SEQ:
- 	    if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
- 	        (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-@@ -1319,6 +1320,7 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
- 		xmlSnprintfElementContent(buf, size, content->c2, 0);
- 	    break;
-     }
-+    if (size - strlen(buf) <= 2) return;
-     if (englob)
-         strcat(buf, ")");
-     switch (content->ocur) {
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch
deleted file mode 100644
index 591075d..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-9049_CVE-2017-9050.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-libxml2-2.9.4: Fix CVE-2017-9049 and CVE-2017-9050
-
-[No upstream tracking] -- https://bugzilla.gnome.org/show_bug.cgi?id=781205
- -- https://bugzilla.gnome.org/show_bug.cgi?id=781361
-
-parser: Fix handling of parameter-entity references
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-Percent sign in DTD Names
-=========================
-
-The NEXTL macro used to call xmlParserHandlePEReference. When parsing
-"complex" names inside the DTD, this could result in entity expansion
-which created a new input buffer. The fix is to simply remove the call
-to xmlParserHandlePEReference from the NEXTL macro. This is safe because
-no users of the macro require expansion of parameter entities.
-
-- xmlParseNameComplex
-- xmlParseNCNameComplex
-- xmlParseNmtoken
-
-The percent sign is not allowed in names, which are grammatical tokens.
-
-- xmlParseEntityValue
-
-Parameter-entity references in entity values are expanded but this
-happens in a separate step in this function.
-
-- xmlParseSystemLiteral
-
-Parameter-entity references are ignored in the system literal.
-
-- xmlParseAttValueComplex
-- xmlParseCharDataComplex
-- xmlParseCommentComplex
-- xmlParsePI
-- xmlParseCDSect
-
-Parameter-entity references are ignored outside the DTD.
-
-- xmlLoadEntityContent
-
-This function is only called from xmlStringLenDecodeEntities and
-entities are replaced in a separate step immediately after the function
-call.
-
-This bug could also be triggered with an internal subset and double
-entity expansion.
-
-This fixes bug 766956 initially reported by Wei Lei and independently by
-Chromium's ClusterFuzz, Hanno Böck, and Marco Grassi. Thanks to everyone
-involved.
-
-xmlParseNameComplex with XML_PARSE_OLD10
-========================================
-
-When parsing Names inside an expanded parameter entity with the
-XML_PARSE_OLD10 option, xmlParseNameComplex would call xmlGROW via the
-GROW macro if the input buffer was exhausted. At the end of the
-parameter entity's replacement text, this function would then call
-xmlPopInput which invalidated the input buffer.
-
-There should be no need to invoke GROW in this situation because the
-buffer is grown periodically every XML_PARSER_CHUNK_SIZE characters and,
-at least for UTF-8, in xmlCurrentChar. This also matches the code path
-executed when XML_PARSE_OLD10 is not set.
-
-This fixes bugs 781205 (CVE-2017-9049) and 781361 (CVE-2017-9050).
-Thanks to Marcel Böhme and Thuan Pham for the report.
-
-Additional hardening
-====================
-
-A separate check was added in xmlParseNameComplex to validate the
-buffer size.
-
-Fixes bug 781205 and bug 781361
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=932cc9896ab41475d4aa429c27d9afd175959d74]
-CVE: CVE-2017-9049 CVE-2017-9050
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index 9f988b0..dab15a4 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -422,6 +422,24 @@ Errtests : xmllint$(EXEEXT)
- 	      if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
- 	      rm result.$$name error.$$name ; \
- 	  fi ; fi ; done)
-+	@echo "## Error cases regression tests (old 1.0)"
-+	-@(for i in $(srcdir)/test/errors10/*.xml ; do \
-+	  name=`basename $$i`; \
-+	  if [ ! -d $$i ] ; then \
-+	  if [ ! -f $(srcdir)/result/errors10/$$name ] ; then \
-+	      echo New test file $$name ; \
-+	      $(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i \
-+	         2> $(srcdir)/result/errors10/$$name.err \
-+		 > $(srcdir)/result/errors10/$$name ; \
-+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"; \
-+	  else \
-+	      log=`$(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i 2> error.$$name > result.$$name ; \
-+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"; \
-+	      diff $(srcdir)/result/errors10/$$name result.$$name ; \
-+	      diff $(srcdir)/result/errors10/$$name.err error.$$name` ; \
-+	      if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
-+	      rm result.$$name error.$$name ; \
-+	  fi ; fi ; done)
- 	@echo "## Error cases stream regression tests"
- 	-@(for i in $(srcdir)/test/errors/*.xml ; do \
- 	  name=`basename $$i`; \
-diff --git a/parser.c b/parser.c
-index 609a270..8e11c12 100644
---- a/parser.c
-+++ b/parser.c
-@@ -2115,7 +2115,6 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
- 	ctxt->input->line++; ctxt->input->col = 1;			\
-     } else ctxt->input->col++;						\
-     ctxt->input->cur += l;				\
--    if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt);	\
-   } while (0)
- 
- #define CUR_CHAR(l) xmlCurrentChar(ctxt, &l)
-@@ -3406,13 +3405,6 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
- 	    len += l;
- 	    NEXTL(l);
- 	    c = CUR_CHAR(l);
--	    if (c == 0) {
--		count = 0;
--		GROW;
--                if (ctxt->instate == XML_PARSER_EOF)
--                    return(NULL);
--		c = CUR_CHAR(l);
--	    }
- 	}
-     }
-     if ((len > XML_MAX_NAME_LENGTH) &&
-@@ -3420,6 +3412,16 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
-         xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
-         return(NULL);
-     }
-+    if (ctxt->input->cur - ctxt->input->base < len) {
-+        /*
-+         * There were a couple of bugs where PERefs lead to to a change
-+         * of the buffer. Check the buffer size to avoid passing an invalid
-+         * pointer to xmlDictLookup.
-+         */
-+        xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
-+                    "unexpected change of input buffer");
-+        return (NULL);
-+    }
-     if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r'))
-         return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len));
-     return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
-diff --git a/result/errors10/781205.xml b/result/errors10/781205.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/errors10/781205.xml.err b/result/errors10/781205.xml.err
-new file mode 100644
-index 0000000..da15c3f
---- /dev/null
-+++ b/result/errors10/781205.xml.err
-@@ -0,0 +1,21 @@
-+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+ %a; 
-+    ^
-+Entity: line 1: 
-+<:0000
-+^
-+Entity: line 1: parser error : DOCTYPE improperly terminated
-+ %a; 
-+    ^
-+Entity: line 1: 
-+<:0000
-+^
-+namespace error : Failed to parse QName ':0000'
-+ %a; 
-+    ^
-+<:0000
-+      ^
-+./test/errors10/781205.xml:4: parser error : Couldn't find end of Start Tag :0000 line 1
-+
-+^
-diff --git a/result/errors10/781361.xml b/result/errors10/781361.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/errors10/781361.xml.err b/result/errors10/781361.xml.err
-new file mode 100644
-index 0000000..655f41a
---- /dev/null
-+++ b/result/errors10/781361.xml.err
-@@ -0,0 +1,13 @@
-+./test/errors10/781361.xml:4: parser error : xmlParseElementDecl: 'EMPTY', 'ANY' or '(' expected
-+
-+^
-+./test/errors10/781361.xml:4: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+
-+^
-+./test/errors10/781361.xml:4: parser error : DOCTYPE improperly terminated
-+
-+^
-+./test/errors10/781361.xml:4: parser error : Start tag expected, '<' not found
-+
-+^
-diff --git a/result/valid/766956.xml b/result/valid/766956.xml
-new file mode 100644
-index 0000000..e69de29
-diff --git a/result/valid/766956.xml.err b/result/valid/766956.xml.err
-new file mode 100644
-index 0000000..34b1dae
---- /dev/null
-+++ b/result/valid/766956.xml.err
-@@ -0,0 +1,9 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+   ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent; 
-+      ^
-+Entity: line 1: 
-+value
-+^
-diff --git a/result/valid/766956.xml.err.rdr b/result/valid/766956.xml.err.rdr
-new file mode 100644
-index 0000000..7760346
---- /dev/null
-+++ b/result/valid/766956.xml.err.rdr
-@@ -0,0 +1,10 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+   ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent; 
-+      ^
-+Entity: line 1: 
-+value
-+^
-+./test/valid/766956.xml : failed to parse
-diff --git a/runtest.c b/runtest.c
-index bb74d2a..63e8c20 100644
---- a/runtest.c
-+++ b/runtest.c
-@@ -4202,6 +4202,9 @@ testDesc testDescriptions[] = {
-     { "Error cases regression tests",
-       errParseTest, "./test/errors/*.xml", "result/errors/", "", ".err",
-       0 },
-+    { "Error cases regression tests (old 1.0)",
-+      errParseTest, "./test/errors10/*.xml", "result/errors10/", "", ".err",
-+      XML_PARSE_OLD10 },
- #ifdef LIBXML_READER_ENABLED
-     { "Error cases stream regression tests",
-       streamParseTest, "./test/errors/*.xml", "result/errors/", NULL, ".str",
-diff --git a/test/errors10/781205.xml b/test/errors10/781205.xml
-new file mode 100644
-index 0000000..d9e9e83
---- /dev/null
-+++ b/test/errors10/781205.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE D [
-+  <!ENTITY % a "<:0000">
-+  %a;
-diff --git a/test/errors10/781361.xml b/test/errors10/781361.xml
-new file mode 100644
-index 0000000..67476bc
---- /dev/null
-+++ b/test/errors10/781361.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE doc [
-+  <!ENTITY % elem "<!ELEMENT e0000000000">
-+  %elem;
-diff --git a/test/valid/766956.xml b/test/valid/766956.xml
-new file mode 100644
-index 0000000..19a95a0
---- /dev/null
-+++ b/test/valid/766956.xml
-@@ -0,0 +1,2 @@
-+<!DOCTYPE test SYSTEM "dtds/766956.dtd">
-+<test/>
-diff --git a/test/valid/dtds/766956.dtd b/test/valid/dtds/766956.dtd
-new file mode 100644
-index 0000000..dddde68
---- /dev/null
-+++ b/test/valid/dtds/766956.dtd
-@@ -0,0 +1,2 @@
-+<!ENTITY % ent "value">
-+%ä%ent;
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
deleted file mode 100644
index c60e32f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-libxml2-2.9.4: Fix more NULL pointer derefs
-
-xpointer: Fix more NULL pointer derefs
-
-Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=e905f08123e4a6e7731549e6f09dadff4cab65bd]
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/xpointer.c b/xpointer.c
-index 676c510..074db24 100644
---- a/xpointer.c
-+++ b/xpointer.c
-@@ -555,7 +555,7 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
- 	    /*
- 	     * Empty set ...
- 	     */
--	    if (end->nodesetval->nodeNr <= 0)
-+	    if ((end->nodesetval == NULL) || (end->nodesetval->nodeNr <= 0))
- 		return(NULL);
- 	    break;
- 	default:
-@@ -1400,7 +1400,7 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
- 		     */
- 		    xmlNodeSetPtr set;
- 		    set = tmp->nodesetval;
--		    if ((set->nodeNr != 1) ||
-+		    if ((set == NULL) || (set->nodeNr != 1) ||
- 			(set->nodeTab[0] != (xmlNodePtr) ctx->doc))
- 			stack++;
- 		} else
-@@ -2073,9 +2073,11 @@ xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
- 	xmlXPathFreeObject(set);
-         XP_ERROR(XPATH_MEMORY_ERROR);
-     }
--    for (i = 0;i < oldset->locNr;i++) {
--	xmlXPtrLocationSetAdd(newset,
--		xmlXPtrCoveringRange(ctxt, oldset->locTab[i]));
-+    if (oldset != NULL) {
-+	for (i = 0;i < oldset->locNr;i++) {
-+	  xmlXPtrLocationSetAdd(newset,
-+		  xmlXPtrCoveringRange(ctxt, oldset->locTab[i]));
-+      }
-     }
- 
-     /*
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch
deleted file mode 100644
index faa5770..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_and_simplify_xmlParseStartTag2.patch
+++ /dev/null
@@ -1,590 +0,0 @@
-libxml2-2.9.4: Avoid reparsing and simplify control flow in xmlParseStartTag2
-
-[No upstream tracking]
-
-parser: Avoid reparsing in xmlParseStartTag2
-
-The code in xmlParseStartTag2 must handle the case that the input
-buffer was grown and reallocated which can invalidate pointers to
-attribute values. Before, this was handled by detecting changes of
-the input buffer "base" pointer and, in case of a change, jumping
-back to the beginning of the function and reparsing the start tag.
-
-The major problem of this approach is that whether an input buffer is
-reallocated is nondeterministic, resulting in seemingly random test
-failures. See the mailing list thread "runtest mystery bug: name2.xml
-error case regression test" from 2012, for example.
-
-If a reallocation was detected, the code also made no attempts to
-continue parsing in case of errors which makes a difference in
-the lax "recover" mode.
-
-Now we store the current input buffer "base" pointer for each (not
-separately allocated) attribute in the namespace URI field, which isn't
-used until later. After the whole start tag was parsed, the pointers to
-the attribute values are reconstructed using the offset between the
-new and the old input buffer. This relies on arithmetic on dangling
-pointers which is technically undefined behavior. But it seems like
-the easiest and most efficient fix and a similar approach is used in
-xmlParserInputGrow.
-
-This changes the error output of several tests, typically making it
-more verbose because we try harder to continue parsing in case of errors.
-
-(Another possible solution is to check not only the "base" pointer
-but the size of the input buffer as well. But this would result in
-even more reparsing.)
-
-Remove some goto labels and deduplicate a bit of code after handling
-namespaces.
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=07b7428b69c368611d215a140fe630b2d1e61349]
- - [https://git.gnome.org/browse/libxml2/commit/?id=855c19efb7cd30d927d673b3658563c4959ca6f0]
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
-diff --git a/parser.c b/parser.c
-index 609a270..74016e3 100644
---- a/parser.c
-+++ b/parser.c
-@@ -43,6 +43,7 @@
- #include <limits.h>
- #include <string.h>
- #include <stdarg.h>
-+#include <stddef.h>
- #include <libxml/xmlmemory.h>
- #include <libxml/threads.h>
- #include <libxml/globals.h>
-@@ -9377,8 +9378,7 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
-     const xmlChar **atts = ctxt->atts;
-     int maxatts = ctxt->maxatts;
-     int nratts, nbatts, nbdef;
--    int i, j, nbNs, attval, oldline, oldcol, inputNr;
--    const xmlChar *base;
-+    int i, j, nbNs, attval;
-     unsigned long cur;
-     int nsNr = ctxt->nsNr;
- 
-@@ -9392,13 +9392,8 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
-      *       The Shrinking is only possible once the full set of attribute
-      *       callbacks have been done.
-      */
--reparse:
-     SHRINK;
--    base = ctxt->input->base;
-     cur = ctxt->input->cur - ctxt->input->base;
--    inputNr = ctxt->inputNr;
--    oldline = ctxt->input->line;
--    oldcol = ctxt->input->col;
-     nbatts = 0;
-     nratts = 0;
-     nbdef = 0;
-@@ -9422,8 +9417,6 @@ reparse:
-      */
-     SKIP_BLANKS;
-     GROW;
--    if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
--        goto base_changed;
- 
-     while (((RAW != '>') &&
- 	   ((RAW != '/') || (NXT(1) != '>')) &&
-@@ -9434,203 +9427,174 @@ reparse:
- 
- 	attname = xmlParseAttribute2(ctxt, prefix, localname,
- 	                             &aprefix, &attvalue, &len, &alloc);
--	if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr)) {
--	    if ((attvalue != NULL) && (alloc != 0))
--	        xmlFree(attvalue);
--	    attvalue = NULL;
--	    goto base_changed;
--	}
--        if ((attname != NULL) && (attvalue != NULL)) {
--	    if (len < 0) len = xmlStrlen(attvalue);
--            if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
--	        const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
--		xmlURIPtr uri;
--
--                if (URL == NULL) {
--		    xmlErrMemory(ctxt, "dictionary allocation failure");
--		    if ((attvalue != NULL) && (alloc != 0))
--			xmlFree(attvalue);
--		    return(NULL);
--		}
--                if (*URL != 0) {
--		    uri = xmlParseURI((const char *) URL);
--		    if (uri == NULL) {
--			xmlNsErr(ctxt, XML_WAR_NS_URI,
--			         "xmlns: '%s' is not a valid URI\n",
--					   URL, NULL, NULL);
--		    } else {
--			if (uri->scheme == NULL) {
--			    xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
--				      "xmlns: URI %s is not absolute\n",
--				      URL, NULL, NULL);
--			}
--			xmlFreeURI(uri);
--		    }
--		    if (URL == ctxt->str_xml_ns) {
--			if (attname != ctxt->str_xml) {
--			    xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
--			 "xml namespace URI cannot be the default namespace\n",
--				     NULL, NULL, NULL);
--			}
--			goto skip_default_ns;
--		    }
--		    if ((len == 29) &&
--			(xmlStrEqual(URL,
--				 BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
--			xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
--			     "reuse of the xmlns namespace name is forbidden\n",
--				 NULL, NULL, NULL);
--			goto skip_default_ns;
--		    }
--		}
--		/*
--		 * check that it's not a defined namespace
--		 */
--		for (j = 1;j <= nbNs;j++)
--		    if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
--			break;
--		if (j <= nbNs)
--		    xmlErrAttributeDup(ctxt, NULL, attname);
--		else
--		    if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
--skip_default_ns:
--		if ((attvalue != NULL) && (alloc != 0)) {
--		    xmlFree(attvalue);
--		    attvalue = NULL;
--		}
--		if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
--		    break;
--		if (!IS_BLANK_CH(RAW)) {
--		    xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
--				   "attributes construct error\n");
--		    break;
--		}
--		SKIP_BLANKS;
--		if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
--		    goto base_changed;
--		continue;
--	    }
--            if (aprefix == ctxt->str_xmlns) {
--	        const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
--		xmlURIPtr uri;
--
--                if (attname == ctxt->str_xml) {
--		    if (URL != ctxt->str_xml_ns) {
--		        xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
--			         "xml namespace prefix mapped to wrong URI\n",
--			         NULL, NULL, NULL);
--		    }
--		    /*
--		     * Do not keep a namespace definition node
--		     */
--		    goto skip_ns;
--		}
-+        if ((attname == NULL) || (attvalue == NULL))
-+            goto next_attr;
-+	if (len < 0) len = xmlStrlen(attvalue);
-+
-+        if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
-+            const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-+            xmlURIPtr uri;
-+
-+            if (URL == NULL) {
-+                xmlErrMemory(ctxt, "dictionary allocation failure");
-+                if ((attvalue != NULL) && (alloc != 0))
-+                    xmlFree(attvalue);
-+                return(NULL);
-+            }
-+            if (*URL != 0) {
-+                uri = xmlParseURI((const char *) URL);
-+                if (uri == NULL) {
-+                    xmlNsErr(ctxt, XML_WAR_NS_URI,
-+                             "xmlns: '%s' is not a valid URI\n",
-+                                       URL, NULL, NULL);
-+                } else {
-+                    if (uri->scheme == NULL) {
-+                        xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-+                                  "xmlns: URI %s is not absolute\n",
-+                                  URL, NULL, NULL);
-+                    }
-+                    xmlFreeURI(uri);
-+                }
-                 if (URL == ctxt->str_xml_ns) {
--		    if (attname != ctxt->str_xml) {
--		        xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
--			         "xml namespace URI mapped to wrong prefix\n",
--			         NULL, NULL, NULL);
--		    }
--		    goto skip_ns;
--		}
--                if (attname == ctxt->str_xmlns) {
--		    xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
--			     "redefinition of the xmlns prefix is forbidden\n",
--			     NULL, NULL, NULL);
--		    goto skip_ns;
--		}
--		if ((len == 29) &&
--		    (xmlStrEqual(URL,
--		                 BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
--		    xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
--			     "reuse of the xmlns namespace name is forbidden\n",
--			     NULL, NULL, NULL);
--		    goto skip_ns;
--		}
--		if ((URL == NULL) || (URL[0] == 0)) {
--		    xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
--		             "xmlns:%s: Empty XML namespace is not allowed\n",
--			          attname, NULL, NULL);
--		    goto skip_ns;
--		} else {
--		    uri = xmlParseURI((const char *) URL);
--		    if (uri == NULL) {
--			xmlNsErr(ctxt, XML_WAR_NS_URI,
--			     "xmlns:%s: '%s' is not a valid URI\n",
--					   attname, URL, NULL);
--		    } else {
--			if ((ctxt->pedantic) && (uri->scheme == NULL)) {
--			    xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
--				      "xmlns:%s: URI %s is not absolute\n",
--				      attname, URL, NULL);
--			}
--			xmlFreeURI(uri);
--		    }
--		}
--
--		/*
--		 * check that it's not a defined namespace
--		 */
--		for (j = 1;j <= nbNs;j++)
--		    if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
--			break;
--		if (j <= nbNs)
--		    xmlErrAttributeDup(ctxt, aprefix, attname);
--		else
--		    if (nsPush(ctxt, attname, URL) > 0) nbNs++;
--skip_ns:
--		if ((attvalue != NULL) && (alloc != 0)) {
--		    xmlFree(attvalue);
--		    attvalue = NULL;
--		}
--		if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
--		    break;
--		if (!IS_BLANK_CH(RAW)) {
--		    xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
--				   "attributes construct error\n");
--		    break;
--		}
--		SKIP_BLANKS;
--		if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
--		    goto base_changed;
--		continue;
--	    }
-+                    if (attname != ctxt->str_xml) {
-+                        xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+                     "xml namespace URI cannot be the default namespace\n",
-+                                 NULL, NULL, NULL);
-+                    }
-+                    goto next_attr;
-+                }
-+                if ((len == 29) &&
-+                    (xmlStrEqual(URL,
-+                             BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-+                    xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+                         "reuse of the xmlns namespace name is forbidden\n",
-+                             NULL, NULL, NULL);
-+                    goto next_attr;
-+                }
-+            }
-+            /*
-+             * check that it's not a defined namespace
-+             */
-+            for (j = 1;j <= nbNs;j++)
-+                if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
-+                    break;
-+            if (j <= nbNs)
-+                xmlErrAttributeDup(ctxt, NULL, attname);
-+            else
-+                if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
-+
-+        } else if (aprefix == ctxt->str_xmlns) {
-+            const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
-+            xmlURIPtr uri;
-+
-+            if (attname == ctxt->str_xml) {
-+                if (URL != ctxt->str_xml_ns) {
-+                    xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+                             "xml namespace prefix mapped to wrong URI\n",
-+                             NULL, NULL, NULL);
-+                }
-+                /*
-+                 * Do not keep a namespace definition node
-+                 */
-+                goto next_attr;
-+            }
-+            if (URL == ctxt->str_xml_ns) {
-+                if (attname != ctxt->str_xml) {
-+                    xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+                             "xml namespace URI mapped to wrong prefix\n",
-+                             NULL, NULL, NULL);
-+                }
-+                goto next_attr;
-+            }
-+            if (attname == ctxt->str_xmlns) {
-+                xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+                         "redefinition of the xmlns prefix is forbidden\n",
-+                         NULL, NULL, NULL);
-+                goto next_attr;
-+            }
-+            if ((len == 29) &&
-+                (xmlStrEqual(URL,
-+                             BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
-+                xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+                         "reuse of the xmlns namespace name is forbidden\n",
-+                         NULL, NULL, NULL);
-+                goto next_attr;
-+            }
-+            if ((URL == NULL) || (URL[0] == 0)) {
-+                xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
-+                         "xmlns:%s: Empty XML namespace is not allowed\n",
-+                              attname, NULL, NULL);
-+                goto next_attr;
-+            } else {
-+                uri = xmlParseURI((const char *) URL);
-+                if (uri == NULL) {
-+                    xmlNsErr(ctxt, XML_WAR_NS_URI,
-+                         "xmlns:%s: '%s' is not a valid URI\n",
-+                                       attname, URL, NULL);
-+                } else {
-+                    if ((ctxt->pedantic) && (uri->scheme == NULL)) {
-+                        xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
-+                                  "xmlns:%s: URI %s is not absolute\n",
-+                                  attname, URL, NULL);
-+                    }
-+                    xmlFreeURI(uri);
-+                }
-+            }
- 
--	    /*
--	     * Add the pair to atts
--	     */
--	    if ((atts == NULL) || (nbatts + 5 > maxatts)) {
--	        if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
--		    if (attvalue[len] == 0)
--			xmlFree(attvalue);
--		    goto failed;
--		}
--	        maxatts = ctxt->maxatts;
--		atts = ctxt->atts;
--	    }
--	    ctxt->attallocs[nratts++] = alloc;
--	    atts[nbatts++] = attname;
--	    atts[nbatts++] = aprefix;
--	    atts[nbatts++] = NULL; /* the URI will be fetched later */
--	    atts[nbatts++] = attvalue;
--	    attvalue += len;
--	    atts[nbatts++] = attvalue;
--	    /*
--	     * tag if some deallocation is needed
--	     */
--	    if (alloc != 0) attval = 1;
--	} else {
--	    if ((attvalue != NULL) && (attvalue[len] == 0))
--		xmlFree(attvalue);
--	}
-+            /*
-+             * check that it's not a defined namespace
-+             */
-+            for (j = 1;j <= nbNs;j++)
-+                if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
-+                    break;
-+            if (j <= nbNs)
-+                xmlErrAttributeDup(ctxt, aprefix, attname);
-+            else
-+                if (nsPush(ctxt, attname, URL) > 0) nbNs++;
-+
-+        } else {
-+            /*
-+             * Add the pair to atts
-+             */
-+            if ((atts == NULL) || (nbatts + 5 > maxatts)) {
-+                if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
-+                    goto next_attr;
-+                }
-+                maxatts = ctxt->maxatts;
-+                atts = ctxt->atts;
-+            }
-+            ctxt->attallocs[nratts++] = alloc;
-+            atts[nbatts++] = attname;
-+            atts[nbatts++] = aprefix;
-+            /*
-+             * The namespace URI field is used temporarily to point at the
-+             * base of the current input buffer for non-alloced attributes.
-+             * When the input buffer is reallocated, all the pointers become
-+             * invalid, but they can be reconstructed later.
-+             */
-+            if (alloc)
-+                atts[nbatts++] = NULL;
-+            else
-+                atts[nbatts++] = ctxt->input->base;
-+            atts[nbatts++] = attvalue;
-+            attvalue += len;
-+            atts[nbatts++] = attvalue;
-+            /*
-+             * tag if some deallocation is needed
-+             */
-+            if (alloc != 0) attval = 1;
-+            attvalue = NULL; /* moved into atts */
-+        }
- 
--failed:
-+next_attr:
-+        if ((attvalue != NULL) && (alloc != 0)) {
-+            xmlFree(attvalue);
-+            attvalue = NULL;
-+        }
- 
- 	GROW
-         if (ctxt->instate == XML_PARSER_EOF)
-             break;
--	if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
--	    goto base_changed;
- 	if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
- 	    break;
- 	if (!IS_BLANK_CH(RAW)) {
-@@ -9646,8 +9610,20 @@ failed:
- 	    break;
- 	}
-         GROW;
--	if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
--	    goto base_changed;
-+    }
-+
-+    /* Reconstruct attribute value pointers. */
-+    for (i = 0, j = 0; j < nratts; i += 5, j++) {
-+        if (atts[i+2] != NULL) {
-+            /*
-+             * Arithmetic on dangling pointers is technically undefined
-+             * behavior, but well...
-+             */
-+            ptrdiff_t offset = ctxt->input->base - atts[i+2];
-+            atts[i+2]  = NULL;    /* Reset repurposed namespace URI */
-+            atts[i+3] += offset;  /* value */
-+            atts[i+4] += offset;  /* valuend */
-+        }
-     }
- 
-     /*
-@@ -9804,34 +9780,6 @@ failed:
-     }
- 
-     return(localname);
--
--base_changed:
--    /*
--     * the attribute strings are valid iif the base didn't changed
--     */
--    if (attval != 0) {
--	for (i = 3,j = 0; j < nratts;i += 5,j++)
--	    if ((ctxt->attallocs[j] != 0) && (atts[i] != NULL))
--	        xmlFree((xmlChar *) atts[i]);
--    }
--
--    /*
--     * We can't switch from one entity to another in the middle
--     * of a start tag
--     */
--    if (inputNr != ctxt->inputNr) {
--        xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
--		    "Start tag doesn't start and stop in the same entity\n");
--	return(NULL);
--    }
--
--    ctxt->input->cur = ctxt->input->base + cur;
--    ctxt->input->line = oldline;
--    ctxt->input->col = oldcol;
--    if (ctxt->wellFormed == 1) {
--	goto reparse;
--    }
--    return(NULL);
- }
- 
- /**
-diff --git a/result/errors/759398.xml.err b/result/errors/759398.xml.err
-index e08d9bf..f6036a3 100644
---- a/result/errors/759398.xml.err
-+++ b/result/errors/759398.xml.err
-@@ -1,9 +1,12 @@
- ./test/errors/759398.xml:210: parser error : StartTag: invalid element name
- need to worry about parsers whi<! don't expand PErefs finding
-                                 ^
--./test/errors/759398.xml:309: parser error : Opening and ending tag mismatch: spec line 50 and termdef
-+./test/errors/759398.xml:309: parser error : Opening and ending tag mismatch: ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–ā„–m line 308 and termdef
- and provide access to their content and structure.</termdef> <termdef
-                                                             ^
--./test/errors/759398.xml:309: parser error : Extra content at the end of the document
--and provide access to their content and structure.</termdef> <termdef
--                                                             ^
-+./test/errors/759398.xml:314: parser error : Opening and ending tag mismatch: spec line 50 and p
-+data and the information it must provide to the application.</p>
-+                                                                ^
-+./test/errors/759398.xml:316: parser error : Extra content at the end of the document
-+<div2 id='sec-origin-goals'>
-+^
-diff --git a/result/errors/attr1.xml.err b/result/errors/attr1.xml.err
-index 4f08538..c4c4fc8 100644
---- a/result/errors/attr1.xml.err
-+++ b/result/errors/attr1.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/attr1.xml:2: parser error : AttValue: ' expected
- 
- ^
--./test/errors/attr1.xml:1: parser error : Extra content at the end of the document
--<foo foo="oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/attr1.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/attr1.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
-diff --git a/result/errors/attr2.xml.err b/result/errors/attr2.xml.err
-index c8a9c7d..77e342e 100644
---- a/result/errors/attr2.xml.err
-+++ b/result/errors/attr2.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/attr2.xml:2: parser error : AttValue: ' expected
- 
- ^
--./test/errors/attr2.xml:1: parser error : Extra content at the end of the document
--<foo foo=">ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/attr2.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/attr2.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
-diff --git a/result/errors/name2.xml.err b/result/errors/name2.xml.err
-index a6649a1..8a6acee 100644
---- a/result/errors/name2.xml.err
-+++ b/result/errors/name2.xml.err
-@@ -1,6 +1,9 @@
- ./test/errors/name2.xml:2: parser error : Specification mandate value for attribute foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
- 
- ^
--./test/errors/name2.xml:1: parser error : Extra content at the end of the document
--<foo foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
-- ^
-+./test/errors/name2.xml:2: parser error : attributes construct error
-+
-+^
-+./test/errors/name2.xml:2: parser error : Couldn't find end of Start Tag foo line 1
-+
-+^
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
deleted file mode 100644
index 65f6bef..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-libxml2-2.9.4: Fix comparison with root node in xmlXPathCmpNodes and NULL pointer deref in XPointer
-
-xpath:
- - Check for errors after evaluating first operand.
- - Add sanity check for empty stack.
- - Include comparation in changes from xmlXPathCmpNodesExt to xmlXPathCmpNodes
-
-Upstream-Status: Backport
- - [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
- - [https://git.gnome.org/browse/libxml2/commit/?id=a005199330b86dada19d162cae15ef9bdcb6baa8]
-CVE: CVE-2016-5131
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
-
-diff --git a/result/XPath/xptr/viderror b/result/XPath/xptr/viderror
-new file mode 100644
-index 0000000..d589882
---- /dev/null
-+++ b/result/XPath/xptr/viderror
-@@ -0,0 +1,4 @@
-+
-+========================
-+Expression: xpointer(non-existing-fn()/range-to(id('chapter2')))
-+Object is empty (NULL)
-diff --git a/test/XPath/xptr/viderror b/test/XPath/xptr/viderror
-new file mode 100644
-index 0000000..da8c53b
---- /dev/null
-+++ b/test/XPath/xptr/viderror
-@@ -0,0 +1 @@
-+xpointer(non-existing-fn()/range-to(id('chapter2')))
-diff --git a/xpath.c b/xpath.c
-index 113bce6..d992841 100644
---- a/xpath.c
-+++ b/xpath.c
-@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
-      * compute depth to root
-      */
-     for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
--	if (cur == node1)
-+	if (cur->parent == node1)
- 	    return(1);
- 	depth2++;
-     }
-     root = cur;
-     for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
--	if (cur == node2)
-+	if (cur->parent == node2)
- 	    return(-1);
- 	depth1++;
-     }
-@@ -14005,9 +14005,14 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
-                 xmlNodeSetPtr oldset;
-                 int i, j;
- 
--                if (op->ch1 != -1)
-+                if (op->ch1 != -1) {
-                     total +=
-                         xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
-+                    CHECK_ERROR0;
-+                }
-+                if (ctxt->value == NULL) {
-+                    XP_ERROR0(XPATH_INVALID_OPERAND);
-+                }
-                 if (op->ch2 == -1)
-                     return (total);
- 
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
index 6e56857..cb171d5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/runtest.patch
@@ -2,47 +2,29 @@
 Print a standard result line for each test.
 
 Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
-Signed-off-by: Andrej Valek <andrej.valek@enea.com>
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
 Upstream-Status: Backport
 
 diff -uNr a/Makefile.am b/Makefile.am
---- a/Makefile.am	2016-05-22 03:49:02.000000000 +0200
-+++ b/Makefile.am	2017-06-14 10:38:43.381305385 +0200
-@@ -202,10 +202,24 @@
+--- a/Makefile.am	2017-08-28 15:01:14.000000000 +0200
++++ b/Makefile.am	2017-09-05 08:06:05.752287323 +0200
+@@ -202,6 +202,15 @@
  #testOOM_DEPENDENCIES = $(DEPS)
  #testOOM_LDADD= $(LDADDS)
  
 +install-ptest:
 +	@(if [ -d .libs ] ; then cd .libs; fi; \
-+	install $(noinst_PROGRAMS) $(DESTDIR))
++	install $(check_PROGRAMS) $(DESTDIR))
 +	cp -r $(srcdir)/test $(DESTDIR)
 +	cp -r $(srcdir)/result $(DESTDIR)
 +	cp -r $(srcdir)/python $(DESTDIR)
 +	cp Makefile $(DESTDIR)
 +	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
 +
- runtests:
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+           testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
  	[ -d test   ] || $(LN_S) $(srcdir)/test   .
- 	[ -d result ] || $(LN_S) $(srcdir)/result .
--	$(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
-+	$(CHECKER) ./runtest$(EXEEXT) && \
-+	    $(CHECKER) ./testrecurse$(EXEEXT) && \
-+	    ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT) && \
-+	    $(CHECKER) ./testchar$(EXEEXT) && \
-+	    $(CHECKER) ./testdict$(EXEEXT) && \
-+	    $(CHECKER) ./runxmlconf$(EXEEXT)
- 	@(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
- 	    $(MAKE) tests ; fi)
- 
-@@ -229,7 +243,7 @@
- 
- APItests: testapi$(EXEEXT)
- 	@echo "## Running the API regression tests this may take a little while"
--	-@($(CHECKER) $(top_builddir)/testapi -q)
-+	-@(ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) $(top_builddir)/testapi -q)
- 
- HTMLtests : testHTML$(EXEEXT)
- 	@(echo > .memdump)
+
 diff -uNr a/runsuite.c b/runsuite.c
 --- a/runsuite.c	2013-04-12 16:17:11.462823238 +0200
 +++ b/runsuite.c	2013-04-17 14:07:24.352693211 +0200
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
deleted file mode 100644
index 9adb29c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ /dev/null
@@ -1,110 +0,0 @@
-SUMMARY = "XML C Parser Library and Toolkit"
-DESCRIPTION = "The XML Parser Library allows for manipulation of XML files.  Libxml2 exports Push and Pull type parser interfaces for both XML and HTML.  It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD.  Libxml2 includes complete XPath, XPointer and Xinclude implementations.  It also has a SAX like interface, which is designed to be compatible with Expat."
-HOMEPAGE = "http://www.xmlsoft.org/"
-BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
-                    file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
-                    file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
-                    file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
-
-DEPENDS = "zlib virtual/libiconv"
-
-SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
-           http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
-           file://libxml-64bit.patch \
-           file://ansidecl.patch \
-           file://runtest.patch \
-           file://run-ptest \
-           file://python-sitepackages-dir.patch \
-           file://libxml-m4-use-pkgconfig.patch \
-           file://libxml2-fix_node_comparison.patch \
-           file://libxml2-CVE-2016-5131.patch \
-           file://libxml2-CVE-2016-4658.patch \
-           file://libxml2-fix_NULL_pointer_derefs.patch \
-           file://libxml2-fix_and_simplify_xmlParseStartTag2.patch \
-           file://libxml2-CVE-2017-9047_CVE-2017-9048.patch \
-           file://libxml2-CVE-2017-9049_CVE-2017-9050.patch \
-           file://libxml2-CVE-2017-5969.patch \
-           file://libxml2-CVE-2017-0663.patch \
-           file://libxml2-CVE-2017-8872.patch \
-           file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
-           "
-
-SRC_URI[libtar.md5sum] = "ae249165c173b1ff386ee8ad676815f5"
-SRC_URI[libtar.sha256sum] = "ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c"
-SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
-SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
-
-BINCONFIG = "${bindir}/xml2-config"
-
-PACKAGECONFIG ??= "python \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-"
-PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-inherit autotools pkgconfig binconfig-disabled ptest
-
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
-
-RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-argparse python3-logging python3-shell python3-signal python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
-
-RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5"
-
-export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-
-# WARNING: zlib is required for RPM use
-EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
-
-python populate_packages_prepend () {
-    # autonamer would call this libxml2-2, but we don't want that
-    if d.getVar('DEBIAN_NAMES'):
-        d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
-}
-
-PACKAGES += "${PN}-utils ${PN}-python"
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
-FILES_${PN}-utils += "${bindir}/*"
-FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
-
-do_configure_prepend () {
-	# executables take longer to package: these should not be executable
-	find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+
-}
-
-do_install_ptest () {
-	cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
-	if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
-		sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
-		    ${D}${PTEST_PATH}/python/tests/Makefile
-		grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
-			xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
-	fi
-	#Remove build host references from various Makefiles
-	find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
-	    sed -i \
-	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -e 's:${RECIPE_SYSROOT}::g' \
-	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-	    -e '/^RELDATE/d' \
-	    {} +
-}
-
-do_install_append_class-native () {
-	# Docs are not needed in the native case
-	rm ${D}${datadir}/gtk-doc -rf
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.7.bb b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.7.bb
new file mode 100644
index 0000000..2fb90a6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.7.bb
@@ -0,0 +1,105 @@
+SUMMARY = "XML C Parser Library and Toolkit"
+DESCRIPTION = "The XML Parser Library allows for manipulation of XML files.  Libxml2 exports Push and Pull type parser interfaces for both XML and HTML.  It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD.  Libxml2 includes complete XPath, XPointer and Xinclude implementations.  It also has a SAX like interface, which is designed to be compatible with Expat."
+HOMEPAGE = "http://www.xmlsoft.org/"
+BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
+                    file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
+                    file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
+                    file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
+
+DEPENDS = "zlib virtual/libiconv"
+
+SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
+           http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
+           file://libxml-64bit.patch \
+           file://ansidecl.patch \
+           file://runtest.patch \
+           file://run-ptest \
+           file://python-sitepackages-dir.patch \
+           file://libxml-m4-use-pkgconfig.patch \
+           file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
+           file://fix-execution-of-ptests.patch \
+           "
+
+SRC_URI[libtar.md5sum] = "896608641a08b465098a40ddf51cefba"
+SRC_URI[libtar.sha256sum] = "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c"
+SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
+SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
+
+BINCONFIG = "${bindir}/xml2-config"
+
+PACKAGECONFIG ??= "python \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+inherit autotools pkgconfig binconfig-disabled ptest
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
+
+RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell  python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
+
+RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5"
+
+export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
+
+# WARNING: zlib is required for RPM use
+EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
+
+python populate_packages_prepend () {
+    # autonamer would call this libxml2-2, but we don't want that
+    if d.getVar('DEBIAN_NAMES'):
+        d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
+}
+
+PACKAGES += "${PN}-utils ${PN}-python"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
+FILES_${PN}-utils += "${bindir}/*"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
+
+do_configure_prepend () {
+	# executables take longer to package: these should not be executable
+	find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+
+}
+
+do_compile_ptest() {
+	oe_runmake check-am
+}
+
+do_install_ptest () {
+	cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
+	if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
+		sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
+		    ${D}${PTEST_PATH}/python/tests/Makefile
+		grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
+			xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
+	fi
+	#Remove build host references from various Makefiles
+	find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+	    sed -i \
+	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+	    -e 's:${RECIPE_SYSROOT}::g' \
+	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+	    -e '/^RELDATE/d' \
+	    {} +
+}
+
+do_install_append_class-native () {
+	# Docs are not needed in the native case
+	rm ${D}${datadir}/gtk-doc -rf
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc b/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc
new file mode 100644
index 0000000..ed83dd7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -0,0 +1,24 @@
+SUMMARY = "Dummy packages which handle excluding packages from the sdk, e.g. ensuring perl is excluded from buildtools"
+LICENSE = "MIT"
+
+inherit allarch
+
+python() {
+    # Put the package somewhere separate to ensure it's never used except
+    # when we want it
+    # (note that we have to do this in anonymous python here to avoid
+    # allarch.bbclass disabling itself)
+    d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PR[vardeps] += "DUMMYPROVIDES"
+
+python populate_packages_prepend() {
+    p = d.getVar("PN")
+    d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}")
+    #d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
+    #d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}")
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
index 29da121..09f757a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
@@ -55,6 +55,8 @@
 
 	# Add version information
 	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+
+	toolchain_create_post_relocate_script ${SDK_OUTPUT}/${SDKPATH}/post-relocate-setup.sh
 }
 
 do_install() {
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
index 02abd8a..b299861 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -3,6 +3,8 @@
 
 INHIBIT_DEFAULT_DEPS = "1"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 addtask do_allpackagedata before do_build
 do_allpackagedata() {
 	:
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
index 0b58a02..f5bcb82 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -1,26 +1,11 @@
-SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
-LICENSE = "MIT"
+DUMMYARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
 
-inherit allarch
+DUMMYPROVIDES = "\
+    nativesdk-perl \
+    nativesdk-perl-module-file-path"
 
 PR = "r2"
 
-python() {
-    # Put the package somewhere separate to ensure it's never used except
-    # when we want it
-    # (note that we have to do this in anonymous python here to avoid
-    # allarch.bbclass disabling itself)
-    d.setVar('PACKAGE_ARCH', 'buildtools-dummy-${SDKPKGSUFFIX}')
-}
+require dummy-sdk-package.inc
 
-PERLPACKAGES = "nativesdk-perl \
-                nativesdk-perl-module-file-path"
-
-ALLOW_EMPTY_${PN} = "1"
-
-python populate_packages_prepend() {
-    d.appendVar(d.expand('RPROVIDES_${PN}'), '${PERLPACKAGES}')
-    d.appendVar(d.expand('RCONFLICTS_${PN}'), '${PERLPACKAGES}')
-    d.appendVar(d.expand('RREPLACES_${PN}'), '${PERLPACKAGES}')
-}
-
+inherit nativesdk
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
new file mode 100644
index 0000000..11a727d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -0,0 +1,15 @@
+DUMMYARCH = "sdk-provides-dummy-${SDKPKGSUFFIX}"
+
+# Add /bin/sh?
+DUMMYPROVIDES = "\
+    /bin/bash \
+    /usr/bin/env \
+    /usr/bin/perl \
+    pkgconfig \
+    libGL.so()(64bit) \
+    libGL.so \
+"
+
+require dummy-sdk-package.inc
+
+inherit nativesdk
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
index 2c1cc38..1e1c7e3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
@@ -41,6 +41,7 @@
 }
 do_get_public_keys[cleandirs] = "${B}"
 addtask get_public_keys before do_install
+do_get_public_keys[depends] += "gnupg-native:do_populate_sysroot"
 
 do_install () {
     if [ -f "${B}/rpm-key" ]; then
@@ -68,7 +69,8 @@
 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
 # cleandirs should possibly be in deploy.bbclass but we need it
 do_deploy[cleandirs] = "${DEPLOYDIR}"
-# clear stamp-extra-info since MACHINE is normally put there by deploy.bbclass
+# clear stamp-extra-info since MACHINE_ARCH is normally put there by
+# deploy.bbclass
 do_deploy[stamp-extra-info] = ""
 addtask deploy after do_get_public_keys
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
new file mode 100644
index 0000000..714d15d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -0,0 +1,11 @@
+DUMMYARCH = "sdk-provides-dummy-target"
+
+DUMMYPROVIDES = "\
+    /bin/sh \
+    /bin/bash \
+    /usr/bin/env \
+    /usr/bin/perl \
+    pkgconfig \
+"
+
+require dummy-sdk-package.inc
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
index 72f5531..c38ac90 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
@@ -10,7 +10,13 @@
 
 TOOLCHAIN_HOST_TASK ?= "${TEST_EXPORT_SDK_PACKAGES}"
 
-SDK_PACKAGE_ARCHS += "tesexport-tools-${SDKPKGSUFFIX}"
+MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
+
+SDK_PACKAGE_ARCHS += "testexport-tools-${SDKPKGSUFFIX}"
 
 TOOLCHAIN_OUTPUTNAME ?= "${TEST_EXPORT_SDK_NAME}"
 
@@ -22,7 +28,15 @@
 
 inherit meta
 inherit populate_sdk
-inherit toolchain-scripts
+inherit toolchain-scripts-base
+inherit nopackages
+
+deltask install
+deltask populate_sysroot
+
+do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
+
+REAL_MULTIMACH_TARGET_SYS = "none"
 
 create_sdk_files_append () {
 	rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
index 5fabf7f..38c3a31 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
@@ -13,6 +13,7 @@
     nativesdk-glibc-gconv-utf-16 \
     nativesdk-glibc-gconv-cp1252 \
     nativesdk-patchelf \
+    nativesdk-libxcrypt \
     "
 
 INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-cdefs.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-queue.h
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-queue.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h b/import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-tree.h
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
rename to import-layers/yocto-poky/meta/recipes-core/musl/bsd-headers/sys-tree.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb b/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb
new file mode 100644
index 0000000..74b846d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl-utils.bb
@@ -0,0 +1,25 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "getconf, getent and iconv implementations for musl"
+HOMEPAGE = "https://git.alpinelinux.org/cgit/aports/tree/main/musl"
+LICENSE = "BSD-2-Clause & GPL-2.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9d08215e611db87b357e8674b4b42564"
+SECTION = "utils"
+
+# Date of the commit in SRCREV
+PV = "20170421"
+
+SRCREV = "fb5630138ccabbbc14a19d372096a04e42573c7d"
+SRC_URI = "git://github.com/boltlinux/musl-utils"
+
+inherit autotools
+
+S = "${WORKDIR}/git"
+
+PACKAGES =+ "${PN}-iconv"
+
+FILES_${PN}-iconv = "${bindir}/iconv"
+
+COMPATIBLE_HOST = ".*-musl.*"
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
index 9af1172..ba9b1a0 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
@@ -9,7 +9,7 @@
 HOMEPAGE = "http://www.musl-libc.org/"
 LICENSE = "MIT"
 SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7928b7ad32ceda04932478e330e52f7f"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=2b9032093c4765e49ae85ddeba29afff"
 
 PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/import-layers/yocto-poky/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
rename to import-layers/yocto-poky/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
index db26b4f..9f8c512 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
@@ -3,9 +3,9 @@
 
 require musl.inc
 
-SRCREV = "eb03bde2f24582874cb72b56c7811bf51da0c817"
+SRCREV = "55df09bfccbfe21fc9dd7d8f94550c0ff25ace04"
 
-PV = "1.1.18+git${SRCPV}"
+PV = "1.1.19+git${SRCPV}"
 
 # mirror is at git://github.com/kraj/musl.git
 
@@ -15,7 +15,7 @@
 
 S = "${WORKDIR}/git"
 
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl"
+PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl virtual/crypt"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils \
            virtual/${TARGET_PREFIX}gcc-initial \
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch b/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch
deleted file mode 100644
index a19332c..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/files/CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch
+++ /dev/null
@@ -1,541 +0,0 @@
-From 4bf72cb8f1d3aa5f33c31eb817a5f0338f4aaf6f Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Wed, 20 Sep 2017 05:02:00 +0000
-Subject: [PATCH] Import upstream patch 20170826
-
-20170826
-	+ fixes for "iterm2" (report by Leonardo Brondani Schenkel) -TD
-	+ corrected a warning from tic about keys which are the same, to skip
-	  over missing/cancelled values.
-	+ add check in tic for unnecessary use of "2" to denote a shifted
-	  special key.
-	+ improve checks in trim_sgr0, comp_parse.c and parse_entry.c, for
-	  cancelled string capabilities.
-	+ add check in _nc_parse_entry() for invalid entry name, setting the
-	  name to "invalid" to avoid problems storing entries.
-	+ add/improve checks in tic's parser to address invalid input
-	  + add a check in comp_scan.c to handle the special case where a
-	    nontext file ending with a NUL rather than newline is given to tic
-	    as input (Redhat #1484274).
-	  + allow for cancelled capabilities in _nc_save_str (Redhat #1484276).
-	  + add validity checks for "use=" target in _nc_parse_entry (Redhat
-	    #1484284).
-	  + check for invalid strings in postprocess_termcap (Redhat #1484285)
-	  + reset secondary pointers on EOF in next_char() (Redhat #1484287).
-	  + guard _nc_safe_strcpy() and _nc_safe_strcat() against calls using
-	    cancelled strings (Redhat #1484291).
-	+ correct typo in curs_memleaks.3x (Sven Joachim).
-	+ improve test/configure checks for some curses variants not based on
-	  X/Open Curses.
-	+ add options for test/configure to disable checks for form, menu and
-	  panel libraries.
-
-Upstream-Status: Backport
-CVE: CVE-2017-13732, CVE-2017-13734, CVE-2017-13730, CVE-2017-13729, CVE-2017-13728, CVE-2017-13731
- 
-
-Author: Sven Joachim <svenjoac@gmx.de>
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- dist.mk                     |  4 +-
- include/ncurses_defs        |  4 +-
- ncurses/tinfo/alloc_entry.c |  4 +-
- ncurses/tinfo/comp_parse.c  | 10 ++---
- ncurses/tinfo/comp_scan.c   |  6 ++-
- ncurses/tinfo/parse_entry.c | 91 ++++++++++++++++++++++++++++++---------------
- ncurses/tinfo/strings.c     |  9 +++--
- ncurses/tinfo/trim_sgr0.c   |  4 +-
- progs/tic.c                 | 75 ++++++++++++++++++++++++++++++++++++-
- 9 files changed, 157 insertions(+), 50 deletions(-)
-
-diff --git a/dist.mk b/dist.mk
-index 9af2699..2c70472 100644
---- a/dist.mk
-+++ b/dist.mk
-@@ -25,7 +25,7 @@
- # use or other dealings in this Software without prior written               #
- # authorization.                                                             #
- ##############################################################################
--# $Id: dist.mk,v 1.1172 2017/07/13 00:15:27 tom Exp $
-+# $Id: dist.mk,v 1.1179 2017/08/20 15:33:41 tom Exp $
- # Makefile for creating ncurses distributions.
- #
- # This only needs to be used directly as a makefile by developers, but
-@@ -37,7 +37,7 @@ SHELL = /bin/sh
- # These define the major/minor/patch versions of ncurses.
- NCURSES_MAJOR = 6
- NCURSES_MINOR = 0
--NCURSES_PATCH = 20170715
-+NCURSES_PATCH = 20170826
- 
- # We don't append the patch to the version, since this only applies to releases
- VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-diff --git a/include/ncurses_defs b/include/ncurses_defs
-index e6611b7..d237db1 100644
---- a/include/ncurses_defs
-+++ b/include/ncurses_defs
-@@ -1,4 +1,4 @@
--# $Id: ncurses_defs,v 1.73 2017/06/24 14:20:57 tom Exp $
-+# $Id: ncurses_defs,v 1.75 2017/08/20 16:50:04 tom Exp $
- ##############################################################################
- # Copyright (c) 2000-2016,2017 Free Software Foundation, Inc.                #
- #                                                                            #
-@@ -50,7 +50,9 @@ HAVE_BSD_STRING_H
- HAVE_BTOWC 
- HAVE_BUILTIN_H
- HAVE_CHGAT	1
-+HAVE_COLOR_CONTENT	1
- HAVE_COLOR_SET	1
-+HAVE_CURSCR	1
- HAVE_DIRENT_H
- HAVE_ERRNO
- HAVE_FCNTL_H
-diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c
-index 5de09f1..09374d6 100644
---- a/ncurses/tinfo/alloc_entry.c
-+++ b/ncurses/tinfo/alloc_entry.c
-@@ -47,7 +47,7 @@
- 
- #include <tic.h>
- 
--MODULE_ID("$Id: alloc_entry.c,v 1.60 2017/06/27 23:48:55 tom Exp $")
-+MODULE_ID("$Id: alloc_entry.c,v 1.61 2017/08/25 09:09:08 tom Exp $")
- 
- #define ABSENT_OFFSET    -1
- #define CANCELLED_OFFSET -2
-@@ -98,7 +98,7 @@ _nc_save_str(const char *const string)
-     size_t old_next_free = next_free;
-     size_t len;
- 
--    if (string == 0)
-+    if (!VALID_STRING(string))
- 	return _nc_save_str("");
-     len = strlen(string) + 1;
- 
-diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c
-index 34e6216..580d4df 100644
---- a/ncurses/tinfo/comp_parse.c
-+++ b/ncurses/tinfo/comp_parse.c
-@@ -47,7 +47,7 @@
- 
- #include <tic.h>
- 
--MODULE_ID("$Id: comp_parse.c,v 1.96 2017/04/15 15:36:58 tom Exp $")
-+MODULE_ID("$Id: comp_parse.c,v 1.99 2017/08/26 16:15:50 tom Exp $")
- 
- static void sanity_check2(TERMTYPE2 *, bool);
- NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
-@@ -510,9 +510,9 @@ static void
- fixup_acsc(TERMTYPE2 *tp, int literal)
- {
-     if (!literal) {
--	if (acs_chars == 0
--	    && enter_alt_charset_mode != 0
--	    && exit_alt_charset_mode != 0)
-+	if (acs_chars == ABSENT_STRING
-+	    && PRESENT(enter_alt_charset_mode)
-+	    && PRESENT(exit_alt_charset_mode))
- 	    acs_chars = strdup(VT_ACSC);
-     }
- }
-@@ -568,9 +568,7 @@ sanity_check2(TERMTYPE2 *tp, bool literal)
-     PAIRED(enter_xon_mode, exit_xon_mode);
-     PAIRED(enter_am_mode, exit_am_mode);
-     ANDMISSING(label_off, label_on);
--#ifdef remove_clock
-     PAIRED(display_clock, remove_clock);
--#endif
-     ANDMISSING(set_color_pair, initialize_pair);
- }
- 
-diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c
-index 40d7f6a..b207257 100644
---- a/ncurses/tinfo/comp_scan.c
-+++ b/ncurses/tinfo/comp_scan.c
-@@ -50,7 +50,7 @@
- #include <ctype.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: comp_scan.c,v 1.106 2017/04/22 11:41:12 tom Exp $")
-+MODULE_ID("$Id: comp_scan.c,v 1.108 2017/08/25 22:57:21 tom Exp $")
- 
- /*
-  * Maximum length of string capability we'll accept before raising an error.
-@@ -168,6 +168,8 @@ next_char(void)
- 	if (result != 0) {
- 	    FreeAndNull(result);
- 	    FreeAndNull(pushname);
-+	    bufptr = 0;
-+	    bufstart = 0;
- 	    allocated = 0;
- 	}
- 	/*
-@@ -222,6 +224,8 @@ next_char(void)
- 		}
- 		if ((bufptr = bufstart) != 0) {
- 		    used = strlen(bufptr);
-+		    if (used == 0)
-+			return (EOF);
- 		    while (iswhite(*bufptr)) {
- 			if (*bufptr == '\t') {
- 			    _nc_curr_col = (_nc_curr_col | 7) + 1;
-diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
-index 3fa2f25..bbbfcb2 100644
---- a/ncurses/tinfo/parse_entry.c
-+++ b/ncurses/tinfo/parse_entry.c
-@@ -47,7 +47,7 @@
- #include <ctype.h>
- #include <tic.h>
- 
--MODULE_ID("$Id: parse_entry.c,v 1.86 2017/06/28 00:53:12 tom Exp $")
-+MODULE_ID("$Id: parse_entry.c,v 1.91 2017/08/26 16:13:34 tom Exp $")
- 
- #ifdef LINT
- static short const parametrized[] =
-@@ -180,6 +180,20 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type)
- }
- #endif /* NCURSES_XNAMES */
- 
-+static bool
-+valid_entryname(const char *name)
-+{
-+    bool result = TRUE;
-+    int ch;
-+    while ((ch = UChar(*name++)) != '\0') {
-+	if (ch <= ' ' || ch > '~' || ch == '/') {
-+	    result = FALSE;
-+	    break;
-+	}
-+    }
-+    return result;
-+}
-+
- /*
-  *	int
-  *	_nc_parse_entry(entry, literal, silent)
-@@ -211,6 +225,7 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
-     int token_type;
-     struct name_table_entry const *entry_ptr;
-     char *ptr, *base;
-+    const char *name;
-     bool bad_tc_usage = FALSE;
- 
-     token_type = _nc_get_token(silent);
-@@ -261,7 +276,12 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
-      * results in the terminal type getting prematurely set to correspond
-      * to that of the next entry.
-      */
--    _nc_set_type(_nc_first_name(entryp->tterm.term_names));
-+    name = _nc_first_name(entryp->tterm.term_names);
-+    if (!valid_entryname(name)) {
-+	_nc_warning("invalid entry name \"%s\"", name);
-+	name = "invalid";
-+    }
-+    _nc_set_type(name);
- 
-     /* check for overly-long names and aliases */
-     for (base = entryp->tterm.term_names; (ptr = strchr(base, '|')) != 0;
-@@ -283,13 +303,24 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
- 	bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0);
- 	bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0);
- 	if (is_use || is_tc) {
-+	    if (!VALID_STRING(_nc_curr_token.tk_valstring)
-+		|| _nc_curr_token.tk_valstring[0] == '\0') {
-+		_nc_warning("missing name for use-clause");
-+		continue;
-+	    } else if (!valid_entryname(_nc_curr_token.tk_valstring)) {
-+		_nc_warning("invalid name for use-clause \"%s\"",
-+			    _nc_curr_token.tk_valstring);
-+		continue;
-+	    } else if (entryp->nuses >= MAX_USES) {
-+		_nc_warning("too many use-clauses, ignored \"%s\"",
-+			    _nc_curr_token.tk_valstring);
-+		continue;
-+	    }
- 	    entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring);
- 	    entryp->uses[entryp->nuses].line = _nc_curr_line;
--	    if (VALID_STRING(entryp->uses[entryp->nuses].name)) {
--		entryp->nuses++;
--		if (entryp->nuses > 1 && is_tc) {
--		    BAD_TC_USAGE
--		}
-+	    entryp->nuses++;
-+	    if (entryp->nuses > 1 && is_tc) {
-+		BAD_TC_USAGE
- 	    }
- 	} else {
- 	    /* normal token lookup */
-@@ -641,13 +672,6 @@ static const char C_BS[] = "\b";
- static const char C_HT[] = "\t";
- 
- /*
-- * Note that WANTED and PRESENT are not simple inverses!  If a capability
-- * has been explicitly cancelled, it's not considered WANTED.
-- */
--#define WANTED(s)	((s) == ABSENT_STRING)
--#define PRESENT(s)	(((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
--
--/*
-  * This bit of legerdemain turns all the terminfo variable names into
-  * references to locations in the arrays Booleans, Numbers, and Strings ---
-  * precisely what's needed.
-@@ -672,10 +696,10 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- 
-     /* if there was a tc entry, assume we picked up defaults via that */
-     if (!has_base) {
--	if (WANTED(init_3string) && termcap_init2)
-+	if (WANTED(init_3string) && PRESENT(termcap_init2))
- 	    init_3string = _nc_save_str(termcap_init2);
- 
--	if (WANTED(reset_2string) && termcap_reset)
-+	if (WANTED(reset_2string) && PRESENT(termcap_reset))
- 	    reset_2string = _nc_save_str(termcap_reset);
- 
- 	if (WANTED(carriage_return)) {
-@@ -790,7 +814,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- 	if (init_tabs != 8 && init_tabs != ABSENT_NUMERIC)
- 	    _nc_warning("hardware tabs with a width other than 8: %d", init_tabs);
- 	else {
--	    if (tab && _nc_capcmp(tab, C_HT))
-+	    if (PRESENT(tab) && _nc_capcmp(tab, C_HT))
- 		_nc_warning("hardware tabs with a non-^I tab string %s",
- 			    _nc_visbuf(tab));
- 	    else {
-@@ -867,17 +891,22 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- 	     * The magic moment -- copy the mapped key string over,
- 	     * stripping out padding.
- 	     */
--	    for (dp = buf2, bp = tp->Strings[from_ptr->nte_index]; *bp; bp++) {
--		if (bp[0] == '$' && bp[1] == '<') {
--		    while (*bp && *bp != '>') {
--			++bp;
--		    }
--		} else
--		    *dp++ = *bp;
--	    }
--	    *dp = '\0';
-+	    bp = tp->Strings[from_ptr->nte_index];
-+	    if (VALID_STRING(bp)) {
-+		for (dp = buf2; *bp; bp++) {
-+		    if (bp[0] == '$' && bp[1] == '<') {
-+			while (*bp && *bp != '>') {
-+			    ++bp;
-+			}
-+		    } else
-+			*dp++ = *bp;
-+		}
-+		*dp = '\0';
- 
--	    tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
-+		tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
-+	    } else {
-+		tp->Strings[to_ptr->nte_index] = bp;
-+	    }
- 	}
- 
- 	/*
-@@ -886,7 +915,7 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- 	 * got mapped to kich1 and im to kIC to avoid a collision.
- 	 * If the description has im but not ic, hack kIC back to kich1.
- 	 */
--	if (foundim && WANTED(key_ic) && key_sic) {
-+	if (foundim && WANTED(key_ic) && PRESENT(key_sic)) {
- 	    key_ic = key_sic;
- 	    key_sic = ABSENT_STRING;
- 	}
-@@ -938,9 +967,9 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
- 	    acs_chars = _nc_save_str(buf2);
- 	    _nc_warning("acsc string synthesized from XENIX capabilities");
- 	}
--    } else if (acs_chars == 0
--	       && enter_alt_charset_mode != 0
--	       && exit_alt_charset_mode != 0) {
-+    } else if (acs_chars == ABSENT_STRING
-+	       && PRESENT(enter_alt_charset_mode)
-+	       && PRESENT(exit_alt_charset_mode)) {
- 	acs_chars = _nc_save_str(VT_ACSC);
-     }
- }
-diff --git a/ncurses/tinfo/strings.c b/ncurses/tinfo/strings.c
-index 393d8e7..10ec6c8 100644
---- a/ncurses/tinfo/strings.c
-+++ b/ncurses/tinfo/strings.c
-@@ -1,5 +1,5 @@
- /****************************************************************************
-- * Copyright (c) 2000-2007,2012 Free Software Foundation, Inc.              *
-+ * Copyright (c) 2000-2012,2017 Free Software Foundation, Inc.              *
-  *                                                                          *
-  * Permission is hereby granted, free of charge, to any person obtaining a  *
-  * copy of this software and associated documentation files (the            *
-@@ -35,8 +35,9 @@
- **/
- 
- #include <curses.priv.h>
-+#include <tic.h>
- 
--MODULE_ID("$Id: strings.c,v 1.8 2012/02/22 22:34:31 tom Exp $")
-+MODULE_ID("$Id: strings.c,v 1.9 2017/08/26 13:16:11 tom Exp $")
- 
- /****************************************************************************
-  * Useful string functions (especially for mvcur)
-@@ -105,7 +106,7 @@ _nc_str_copy(string_desc * dst, string_desc * src)
- NCURSES_EXPORT(bool)
- _nc_safe_strcat(string_desc * dst, const char *src)
- {
--    if (src != 0) {
-+    if (PRESENT(src)) {
- 	size_t len = strlen(src);
- 
- 	if (len < dst->s_size) {
-@@ -126,7 +127,7 @@ _nc_safe_strcat(string_desc * dst, const char *src)
- NCURSES_EXPORT(bool)
- _nc_safe_strcpy(string_desc * dst, const char *src)
- {
--    if (src != 0) {
-+    if (PRESENT(src)) {
- 	size_t len = strlen(src);
- 
- 	if (len < dst->s_size) {
-diff --git a/ncurses/tinfo/trim_sgr0.c b/ncurses/tinfo/trim_sgr0.c
-index 4cbcb65..4d92d15 100644
---- a/ncurses/tinfo/trim_sgr0.c
-+++ b/ncurses/tinfo/trim_sgr0.c
-@@ -36,7 +36,7 @@
- 
- #include <tic.h>
- 
--MODULE_ID("$Id: trim_sgr0.c,v 1.16 2017/04/05 22:33:07 tom Exp $")
-+MODULE_ID("$Id: trim_sgr0.c,v 1.17 2017/08/26 14:54:16 tom Exp $")
- 
- #undef CUR
- #define CUR tp->
-@@ -263,7 +263,7 @@ _nc_trim_sgr0(TERMTYPE2 *tp)
- 	    /*
- 	     * If rmacs is a substring of sgr(0), remove that chunk.
- 	     */
--	    if (exit_alt_charset_mode != 0) {
-+	    if (PRESENT(exit_alt_charset_mode)) {
- 		TR(TRACE_DATABASE, ("scan for rmacs %s", _nc_visbuf(exit_alt_charset_mode)));
- 		j = strlen(off);
- 		k = strlen(exit_alt_charset_mode);
-diff --git a/progs/tic.c b/progs/tic.c
-index c5d78e5..6dd4678 100644
---- a/progs/tic.c
-+++ b/progs/tic.c
-@@ -48,7 +48,7 @@
- #include <parametrized.h>
- #include <transform.h>
- 
--MODULE_ID("$Id: tic.c,v 1.233 2017/07/15 17:40:19 tom Exp $")
-+MODULE_ID("$Id: tic.c,v 1.243 2017/08/26 20:56:55 tom Exp $")
- 
- #define STDIN_NAME "<stdin>"
- 
-@@ -62,6 +62,10 @@ static bool showsummary = FALSE;
- static char **namelst = 0;
- static const char *to_remove;
- 
-+#if NCURSES_XNAMES
-+static bool using_extensions = FALSE;
-+#endif
-+
- static void (*save_check_termtype) (TERMTYPE2 *, bool);
- static void check_termtype(TERMTYPE2 *tt, bool);
- 
-@@ -850,6 +854,7 @@ main(int argc, char *argv[])
- 	    /* FALLTHRU */
- 	case 'x':
- 	    use_extended_names(TRUE);
-+	    using_extensions = TRUE;
- 	    break;
- #endif
- 	default:
-@@ -2405,10 +2410,17 @@ check_conflict(TERMTYPE2 *tp)
- 	    const char *a = given[j].value;
- 	    bool first = TRUE;
- 
-+	    if (!VALID_STRING(a))
-+		continue;
-+
- 	    for (k = j + 1; given[k].keycode; k++) {
- 		const char *b = given[k].value;
-+
-+		if (!VALID_STRING(b))
-+		    continue;
- 		if (check[k])
- 		    continue;
-+
- 		if (!_nc_capcmp(a, b)) {
- 		    check[j] = 1;
- 		    check[k] = 1;
-@@ -2431,6 +2443,67 @@ check_conflict(TERMTYPE2 *tp)
- 	    if (!first)
- 		fprintf(stderr, "\n");
- 	}
-+#if NCURSES_XNAMES
-+	if (using_extensions) {
-+	    /* *INDENT-OFF* */
-+	    static struct {
-+		const char *xcurses;
-+		const char *shifted;
-+	    } table[] = {
-+		{ "kDC",  NULL },
-+		{ "kDN",  "kind" },
-+		{ "kEND", NULL },
-+		{ "kHOM", NULL },
-+		{ "kLFT", NULL },
-+		{ "kNXT", NULL },
-+		{ "kPRV", NULL },
-+		{ "kRIT", NULL },
-+		{ "kUP",  "kri" },
-+		{ NULL,   NULL },
-+	    };
-+	    /* *INDENT-ON* */
-+
-+	    /*
-+	     * SVr4 curses defines the "xcurses" names listed above except for
-+	     * the special cases in the "shifted" column.  When using these
-+	     * names for xterm's extensions, that was confusing, and resulted
-+	     * in adding extended capabilities with "2" (shift) suffix.  This
-+	     * check warns about unnecessary use of extensions for this quirk.
-+	     */
-+	    for (j = 0; given[j].keycode; ++j) {
-+		const char *find = given[j].name;
-+		int value;
-+		char ch;
-+
-+		if (!VALID_STRING(given[j].value))
-+		    continue;
-+
-+		for (k = 0; table[k].xcurses; ++k) {
-+		    const char *test = table[k].xcurses;
-+		    size_t size = strlen(test);
-+
-+		    if (!strncmp(find, test, size) && strcmp(find, test)) {
-+			switch (sscanf(find + size, "%d%c", &value, &ch)) {
-+			case 1:
-+			    if (value == 2) {
-+				_nc_warning("expected '%s' rather than '%s'",
-+					    (table[k].shifted
-+					     ? table[k].shifted
-+					     : test), find);
-+			    } else if (value < 2 || value > 15) {
-+				_nc_warning("expected numeric 2..15 '%s'", find);
-+			    }
-+			    break;
-+			default:
-+			    _nc_warning("expected numeric suffix for '%s'", find);
-+			    break;
-+			}
-+			break;
-+		    }
-+		}
-+	    }
-+	}
-+#endif
- 	free(given);
- 	free(check);
-     }
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
index 1f21cd4..01e41d5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
@@ -13,7 +13,7 @@
 inherit autotools binconfig-disabled multilib_header pkgconfig
 
 # Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
-SRC_URI = "git://anonscm.debian.org/collab-maint/ncurses.git"
+SRC_URI = "git://salsa.debian.org/debian/ncurses.git;protocol=https"
 
 EXTRA_AUTORECONF = "-I m4"
 CONFIG_SITE =+ "${WORKDIR}/config.cache"
@@ -59,6 +59,7 @@
 EX_TERMINFO = ""
 EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
 EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
+EX_TERMLIB ?= "tinfo"
 
 # Helper function for do_configure to allow multiple configurations
 # $1 the directory to run configure in
@@ -80,7 +81,7 @@
 	        --disable-big-core \
 	        --program-prefix= \
 	        --with-ticlib \
-	        --with-termlib=tinfo \
+	        --with-termlib=${EX_TERMLIB} \
 	        --enable-sigwinch \
 	        --enable-pc-files \
 	        --disable-rpath-hack \
@@ -201,7 +202,10 @@
                 ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
         fi
 
-        rm -f ${D}${libdir}/terminfo
+        # When changing ${libdir} to e.g. /usr/lib/myawesomelib/ ncurses 
+        # still installs '/usr/lib/terminfo', so try to rm both 
+        # the proper path and a slightly hardcoded one
+        rm -f ${D}${libdir}/terminfo ${D}${prefix}/lib/terminfo
 
         # create linker scripts for libcurses.so and libncurses to
         # link against -ltinfo when needed. Some builds might break
@@ -227,7 +231,7 @@
         if [ ! -d "${D}${base_libdir}" ]; then
             # Setting base_libdir to libdir as is done in the -native
             # case will skip this code
-            mkdir ${D}${base_libdir}
+            mkdir -p ${D}${base_libdir}
             mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir}
             ! ${ENABLE_WIDEC} || \
                 mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir}
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb
deleted file mode 100644
index d1da5d1..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20170715.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ncurses.inc
-
-SRC_URI += "file://0001-tic-hang.patch \
-            file://0002-configure-reproducible.patch \
-            file://config.cache \
-            file://CVE-2017-13732-CVE-2017-13734-CVE-2017-13730-CVE-2017-13729-CVE-2017-13728-CVE-2017-13731.patch \
-"
-# commit id corresponds to the revision in package version
-SRCREV = "52681a6a1a18b4d6eb1a716512d0dd827bd71c87"
-S = "${WORKDIR}/git"
-EXTRA_OECONF += "--with-abi-version=5"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb
new file mode 100644
index 0000000..6c4b96f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb
@@ -0,0 +1,11 @@
+require ncurses.inc
+
+SRC_URI += "file://0001-tic-hang.patch \
+            file://0002-configure-reproducible.patch \
+            file://config.cache \
+"
+# commit id corresponds to the revision in package version
+SRCREV = "5d849e836052459901cfe0b85a0b2939ff8d2b2a"
+S = "${WORKDIR}/git"
+EXTRA_OECONF += "--with-abi-version=5"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
index 959b1c6..25e5b58 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
@@ -17,4 +17,4 @@
 +DEFINE GCC44_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings

  DEFINE GCC44_IA32_CC_FLAGS           = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie

  DEFINE GCC44_X64_CC_FLAGS            = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables

- DEFINE GCC44_IA32_X64_DLINK_COMMON   = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20

+ DEFINE GCC44_IA32_X64_DLINK_COMMON   = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -no-pie

diff --git a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
index fa0d662..8750b3c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ovmf/ovmf_git.bb
@@ -151,7 +151,7 @@
 
 do_compile_class-target() {
     export LFLAGS="${LDFLAGS}"
-    PARALLEL_JOBS="${@ '${PARALLEL_MAKE}'.replace('-j', '-n ')}"
+    PARALLEL_JOBS="${@oe.utils.parallel_make_argument(d, '-n %d')}"
     OVMF_ARCH="X64"
     if [ "${TARGET_ARCH}" != "x86_64" ] ; then
         OVMF_ARCH="IA32"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index aee4a03..e2f6169 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -23,8 +23,8 @@
     nativesdk-makedevs \
     nativesdk-dnf \
     nativesdk-cmake \
-    nativesdk-postinst-intercept \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
+    nativesdk-sdk-provides-dummy \
     "
 
 RDEPENDS_${PN}_darwin = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
index f9e6e2e..bb192ae 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -54,7 +54,6 @@
     packagegroup-distro-base \
     packagegroup-machine-base \
     \
-    sysfsutils \
     module-init-tools \
     ${@bb.utils.contains('MACHINE_FEATURES', 'apm', 'packagegroup-base-apm', '',d)} \
     ${@bb.utils.contains('MACHINE_FEATURES', 'acpi', 'packagegroup-base-acpi', '',d)} \
@@ -152,8 +151,7 @@
 
 SUMMARY_packagegroup-base-acpi = "ACPI support"
 RDEPENDS_packagegroup-base-acpi = "\
-    acpid \
-    libacpi "
+    acpid"
 
 SUMMARY_packagegroup-base-apm = "APM support"
 RDEPENDS_packagegroup-base-apm = "\
@@ -292,8 +290,6 @@
 SUMMARY_packagegroup-base-wifi = "WiFi support"
 RDEPENDS_packagegroup-base-wifi = "\
     ${VIRTUAL-RUNTIME_wireless-tools} \
-    ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'hostap-utils', '',d)} \
-    ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'hostap-utils', '',d)} \
     wpa-supplicant"
 
 RRECOMMENDS_packagegroup-base-wifi = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 04bc0f2..76cd7fc 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -23,6 +23,8 @@
 VIRTUAL-RUNTIME_initscripts ?= "initscripts"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
+EFI_PROVIDER ??= "grub-efi"
+
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
                     modutils-initscripts \
                     init-ifupdown \
@@ -35,6 +37,7 @@
     ${VIRTUAL-RUNTIME_base-utils} \
     ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
     ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
+    ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} kernel", "", d)} \
     netbase \
     ${VIRTUAL-RUNTIME_login_manager} \
     ${VIRTUAL-RUNTIME_init_manager} \
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index af0ce20..45e8c13 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -27,11 +27,10 @@
     tcl"
 
 SANITIZERS = "libasan-dev libubsan-dev"
-SANITIZERS_aarch64 = ""
+SANITIZERS_microblaze = ""
 SANITIZERS_mipsarch = ""
 SANITIZERS_nios2 = ""
-SANITIZERS_powerpc64 = ""
-SANITIZERS_sparc = ""
+SANITIZERS_riscv64 = ""
 SANITIZERS_libc-musl = ""
 
 RRECOMMENDS_packagegroup-core-sdk = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index a8e47da..fa0e363 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -26,7 +26,6 @@
 
 PROFILETOOLS = "\
     powertop \
-    latencytop \
     "
 PERF = "perf"
 PERF_libc-musl = ""
@@ -34,16 +33,16 @@
 # systemtap needs elfutils which is not fully buildable on some arches/libcs
 SYSTEMTAP = "systemtap"
 SYSTEMTAP_libc-musl = ""
-SYSTEMTAP_mipsarch = ""
 SYSTEMTAP_nios2 = ""
-SYSTEMTAP_aarch64 = ""
 
 # lttng-ust uses sched_getcpu() which is not there on for some platforms.
 LTTNGUST = "lttng-ust"
 LTTNGUST_libc-musl = ""
+LTTNGUST_riscv64 = ""
 
 LTTNGTOOLS = "lttng-tools"
 LTTNGTOOLS_libc-musl = ""
+LTTNGTOOLS_riscv64 = ""
 
 LTTNGMODULES = "lttng-modules"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index 3170978..b8e5070 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -10,9 +10,10 @@
 
 inherit packagegroup
 
-# kexec-tools doesn't work on e5500-64b and nios2 yet
+# kexec-tools doesn't work on e5500-64b, microblaze and nios2 yet
 KEXECTOOLS ?= "kexec"
 KEXECTOOLS_e5500-64b ?= ""
+KEXECTOOLS_microblaze ?= ""
 KEXECTOOLS_nios2 ?= ""
 
 X11GLTOOLS = "\
@@ -25,7 +26,7 @@
 
 X11TOOLS = "\
     fstests \
-    gst-player \
+    gst-examples \
     x11perf \
     xrestop \
     xwininfo \
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
index 3e19077..7d2ccbd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
@@ -5,4 +5,5 @@
 RDEPENDS_${PN} = " \
     go-runtime \
     go-runtime-dev \
+    go-runtime-staticdev \
 "
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index ff42866..adb0c56 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -136,7 +136,6 @@
     mtools \
     ncurses \
     ncurses-terminfo-base \
-    neon \
     nfs-utils \
     nfs-utils-client \
     openssl \
diff --git a/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb b/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
index 3b7f818..aab2c03 100644
--- a/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
@@ -12,7 +12,7 @@
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
            file://psplash-init \
            ${SPLASH_IMAGES}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb
deleted file mode 100644
index 7b18b25..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_234.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-require systemd.inc
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
-
-DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
-
-SRC_URI += "file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch"
-
-inherit autotools pkgconfig gettext
-inherit deploy
-
-EFI_CC ?= "${CC}"
-# Man pages are packaged through the main systemd recipe
-EXTRA_OECONF = " --enable-gnuefi \
-                 --with-efi-includedir=${STAGING_INCDIR} \
-                 --with-efi-ldsdir=${STAGING_LIBDIR} \
-                 --with-efi-libdir=${STAGING_LIBDIR} \
-                 --disable-manpages \
-                 EFI_CC='${EFI_CC}' \
-               "
-
-# Imported from the old gummiboot recipe
-TUNE_CCARGS_remove = "-mfpmath=sse"
-COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
-COMPATIBLE_HOST_linux-gnux32 = "null"
-
-do_compile() {
-	SYSTEMD_BOOT_EFI_ARCH="ia32"
-	if [ "${TARGET_ARCH}" = "x86_64" ]; then
-		SYSTEMD_BOOT_EFI_ARCH="x64"
-	fi
-
-	oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
-}
-
-do_install() {
-	# Bypass systemd installation with a NOP
-	:
-}
-
-do_deploy () {
-	install ${B}/systemd-boot*.efi ${DEPLOYDIR}
-}
-addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb
new file mode 100644
index 0000000..afd3848
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-boot_237.bb
@@ -0,0 +1,70 @@
+require systemd.inc
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
+
+DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
+
+SRC_URI += "file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+            file://0027-remove-nobody-user-group-checking.patch \
+            file://0001-Also-check-i386-i586-and-i686-for-ia32.patch \
+            file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
+            "
+
+inherit meson pkgconfig gettext
+inherit deploy
+
+EFI_CC ?= "${CC}"
+EXTRA_OEMESON += "-Defi=true \
+                  -Dgnu-efi=true \
+                  -Defi-includedir=${STAGING_INCDIR}/efi \
+                  -Defi-ldsdir=${STAGING_LIBDIR} \
+                  -Defi-libdir=${STAGING_LIBDIR} \
+                  -Dman=false \
+                  -Defi-cc='${EFI_CC}' \
+                  -Defi-ld='${LD}' \
+                  "
+
+# install to the image as boot*.efi if its the EFI_PROVIDER,
+# otherwise install as the full name.
+# This allows multiple bootloaders to coexist in a single image.
+python __anonymous () {
+    import re
+    target = d.getVar('TARGET_ARCH')
+    prefix = "" if d.getVar('EFI_PROVIDER', True) == "systemd-boot" else "systemd-"
+    if target == "x86_64":
+        systemdimage = prefix + "bootx64.efi"
+    else:
+        systemdimage = prefix + "bootia32.efi"
+    d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
+    prefix = "systemd-" if prefix == "" else ""
+    d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
+}
+
+FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}"
+
+RDEPENDS_${PN} += "virtual/systemd-bootconf"
+
+# Imported from the old gummiboot recipe
+TUNE_CCARGS_remove = "-mfpmath=sse"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+COMPATIBLE_HOST_x86-x32 = "null"
+
+do_compile() {
+	SYSTEMD_BOOT_EFI_ARCH="ia32"
+	if [ "${TARGET_ARCH}" = "x86_64" ]; then
+		SYSTEMD_BOOT_EFI_ARCH="x64"
+	fi
+
+	ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
+}
+
+do_install() {
+	install -d ${D}/boot
+	install -d ${D}/boot/EFI
+	install -d ${D}/boot/EFI/BOOT
+	install ${B}/src/boot/efi/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}
+}
+
+do_deploy () {
+	install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR}
+}
+addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
new file mode 100644
index 0000000..e9c2466
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
@@ -0,0 +1,31 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic systemd-boot configuration files"
+
+RPROVIDES_${PN} += "virtual/systemd-bootconf"
+
+inherit systemd-boot-cfg
+
+S = "${WORKDIR}"
+
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+APPEND_append = " ${ROOT}"
+
+python do_configure() {
+    bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND"
+
+do_install() {
+	install -d ${D}/boot
+	install -d ${D}/boot/loader
+	install -d ${D}/boot/loader/entries
+	install loader.conf ${D}/boot/loader/
+	rm loader.conf
+	install *.conf ${D}/boot/loader/entries/
+}
+
+FILES_${PN} = "/boot/loader/* /boot/loader/entries/*"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
index d934716..d67a3c9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -11,6 +11,10 @@
 
 S = "${WORKDIR}"
 
+# As this package is tied to systemd, only build it when we're also building systemd.
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
 do_install() {
 	if [ ! -z "${SERIAL_CONSOLES}" ] ; then
 		default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'`
@@ -43,10 +47,4 @@
 FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-# As this package is tied to systemd, only build it when we're also building systemd.
-python () {
-    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
-        raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-}
-
 ALLOW_EMPTY_${PN} = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
index d99d150..5fa48e7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
                     file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "c1edab7ad1e7ccc9be693bedfd464cd1cbffb395"
+SRCREV = "46659f7deb962f55c728e70597e37c2a3ab6326d"
 
 SRC_URI = "git://github.com/systemd/systemd.git;protocol=git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
new file mode 100644
index 0000000..877bb1c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
@@ -0,0 +1,28 @@
+From 3e8c19bb1bbc4493c591f75c00c1fefe3b1c8a69 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 20:42:41 -0800
+Subject: [PATCH] Also check i386, i586 and i686 for ia32
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 28cb8b60e..489531a43 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1217,7 +1217,7 @@ conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
+ if get_option('efi')
+         efi_arch = host_machine.cpu_family()
+ 
+-        if efi_arch == 'x86'
++        if efi_arch == 'x86' or efi_arch == 'i386' or efi_arch == 'i586' or efi_arch == 'i686'
+                 EFI_MACHINE_TYPE_NAME = 'ia32'
+                 gnu_efi_arch = 'ia32'
+         elif efi_arch == 'x86_64'
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
deleted file mode 100644
index 35599d4..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 3ca5326485cb19e775af6de615c17be66e44e472 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 24 Oct 2017 23:08:24 -0700
-Subject: [PATCH] Define _PATH_WTMPX and _PATH_UTMPX if not defined
-
-Musl needs these defines
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/shared/utmp-wtmp.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
-index 9750dcd81..bd55d74a1 100644
---- a/src/shared/utmp-wtmp.c
-+++ b/src/shared/utmp-wtmp.c
-@@ -27,6 +27,7 @@
- #include <sys/time.h>
- #include <sys/utsname.h>
- #include <unistd.h>
-+#include <utmp.h>
- #include <utmpx.h>
- 
- #include "alloc-util.h"
-@@ -41,6 +42,13 @@
- #include "util.h"
- #include "utmp-wtmp.h"
- 
-+#if defined _PATH_UTMP && !defined _PATH_UTMPX
-+# define _PATH_UTMPX _PATH_UTMP
-+#endif
-+#if defined _PATH_WTMP && !defined _PATH_WTMPX
-+# define _PATH_WTMPX _PATH_WTMP
-+#endif
-+
- int utmp_get_runlevel(int *runlevel, int *previous) {
-         struct utmpx *found, lookup = { .ut_type = RUN_LVL };
-         int r;
--- 
-2.14.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
new file mode 100644
index 0000000..e2e19ba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
@@ -0,0 +1,62 @@
+From 527413ec243564a89ffaad6368d446de44415970 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 21:42:23 -0800
+Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
+
+When cross-compiling, efi_cc and efi_ld may take the form of
+'xxx-gcc --sysroot=xxx', and this would cause run_command and
+the alike fail.
+
+Fix to split them to make commands run correctly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/boot/efi/meson.build | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 992a3ba4c..9f9ec4911 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -157,7 +157,7 @@ if have_gnu_efi
+                 o_file = custom_target(file + '.o',
+                                        input : file,
+                                        output : file + '.o',
+-                                       command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
++                                       command : efi_cc.split() + ['-c', '@INPUT@', '-o', '@OUTPUT@']
+                                                  + compile_args,
+                                        depend_files : efi_headers)
+                 if (common_sources + systemd_boot_sources).contains(file)
+@@ -168,7 +168,17 @@ if have_gnu_efi
+                 endif
+         endforeach
+ 
+-        libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
++        find_libgcc_cmd_all = efi_cc + ' -print-libgcc-file-name'
++        find_libgcc_cmd = find_libgcc_cmd_all.split()[0]
++        find_libgcc_args = []
++        cmd_args_all = find_libgcc_cmd_all.split()
++        foreach arg : cmd_args_all
++                if arg != find_libgcc_cmd
++                        find_libgcc_args += arg
++                endif
++        endforeach
++
++        libgcc_file_name = run_command(find_libgcc_cmd, find_libgcc_args).stdout().strip()
+         systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
+         stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
+         no_undefined_symbols = find_program('no-undefined-symbols.sh')
+@@ -179,7 +189,7 @@ if have_gnu_efi
+                         tuple[0],
+                         input : tuple[2],
+                         output : tuple[0],
+-                        command : [efi_ld, '-o', '@OUTPUT@'] +
++                        command : efi_ld.split() + ['-o', '@OUTPUT@'] +
+                                   efi_ldflags + tuple[2] +
+                                   ['-lefi', '-lgnuefi', libgcc_file_name])
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
new file mode 100644
index 0000000..2cffc42
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
@@ -0,0 +1,34 @@
+From 687a5af8dc5d38f918a6ce08fed5297234bf8346 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Mar 2018 18:00:17 -0800
+Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP
+
+for currently unknown reasons they get exported to the shared libries
+even without being listed in the sym file
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+
+Upstream-Status: Pending [ Conditional on master needing this, 234 does need it ]
+
+ src/libsystemd/sd-bus/bus-error.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
+index 378f7a377..49d797abd 100644
+--- a/src/libsystemd/sd-bus/bus-error.c
++++ b/src/libsystemd/sd-bus/bus-error.c
+@@ -71,8 +71,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
+ };
+ 
+ /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
+-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
+-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
++extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_;
++extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_;
+ 
+ /* Additional maps registered with sd_bus_error_add_map() are in this
+  * NULL terminated array */
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
new file mode 100644
index 0000000..e913e3f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
@@ -0,0 +1,33 @@
+From e361f6b4aefae57efff7e457df8db4d1067bec23 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:50:23 -0800
+Subject: [PATCH] Remove fstack-protector flags to workaround musl build
+
+Remove fstack-protector and fstack-protector-strong flags to fix
+the following build failure for qemux86 and qemuppc with musl.
+
+  undefined reference to `__stack_chk_fail_local'
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 7610ab12b..591b9cbab 100644
+--- a/meson.build
++++ b/meson.build
+@@ -329,8 +329,6 @@ foreach arg : ['-Wextra',
+                '-fdiagnostics-show-option',
+                '-fno-strict-aliasing',
+                '-fvisibility=hidden',
+-               '-fstack-protector',
+-               '-fstack-protector-strong',
+                '--param=ssp-buffer-size=4',
+               ]
+         if cc.has_argument(arg)
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
new file mode 100644
index 0000000..f4c15e1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
@@ -0,0 +1,33 @@
+From b1192a6e171413291d9d64fafc04773c6bbc9cab Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 10:04:48 +0800
+Subject: [PATCH 01/31] Use getenv when secure versions are not available
+
+musl doesnt implement secure version, so we default
+to it if configure does not detect a secure implementation
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Denied
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 1280e6c41..39c1fb700 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -605,7 +605,7 @@ struct btrfs_ioctl_quota_ctl_args {
+ #  if HAVE___SECURE_GETENV
+ #    define secure_getenv __secure_getenv
+ #  else
+-#    error "neither secure_getenv nor __secure_getenv are available"
++#    define secure_getenv getenv
+ #  endif
+ #endif
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch
deleted file mode 100644
index 779dc78..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From b2d4171c6e521cf1e70331fb769234d63a4a6d44 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 27 Oct 2017 13:00:41 -0700
-Subject: [PATCH] Use uintmax_t for handling rlim_t
-
-PRIu{32,64} is not right format to represent rlim_t type
-therefore use %ju and typecast the rlim_t variables to
-uintmax_t.
-
-Fixes portablility errors like
-
-execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
-|                          fprintf(f, "%s%s: " RLIM_FMT "\n",
-|                                     ^~~~~~~~
-|                                  prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
-|                                                               ~~~~~~~~~~~~~~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/7199]
-
- src/basic/format-util.h | 8 --------
- src/basic/rlimit-util.c | 8 ++++----
- src/core/execute.c      | 8 ++++----
- 3 files changed, 8 insertions(+), 16 deletions(-)
-
-diff --git a/src/basic/format-util.h b/src/basic/format-util.h
-index ae42a8f89..144249cd6 100644
---- a/src/basic/format-util.h
-+++ b/src/basic/format-util.h
-@@ -60,14 +60,6 @@
- #  define PRI_TIMEX "li"
- #endif
- 
--#if SIZEOF_RLIM_T == 8
--#  define RLIM_FMT "%" PRIu64
--#elif SIZEOF_RLIM_T == 4
--#  define RLIM_FMT "%" PRIu32
--#else
--#  error Unknown rlim_t size
--#endif
--
- #if SIZEOF_DEV_T == 8
- #  define DEV_FMT "%" PRIu64
- #elif SIZEOF_DEV_T == 4
-diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
-index ca834df62..41fcebb74 100644
---- a/src/basic/rlimit-util.c
-+++ b/src/basic/rlimit-util.c
-@@ -284,13 +284,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
-         if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
-                 s = strdup("infinity");
-         else if (rl->rlim_cur >= RLIM_INFINITY)
--                (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max);
-+                (void) asprintf(&s, "infinity:%ju", (uintmax_t)rl->rlim_max);
-         else if (rl->rlim_max >= RLIM_INFINITY)
--                (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur);
-+                (void) asprintf(&s, "%ju:infinity", (uintmax_t)rl->rlim_cur);
-         else if (rl->rlim_cur == rl->rlim_max)
--                (void) asprintf(&s, RLIM_FMT, rl->rlim_cur);
-+                (void) asprintf(&s, "%ju", (uintmax_t)rl->rlim_cur);
-         else
--                (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max);
-+                (void) asprintf(&s, "%ju:%ju", (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max);
- 
-         if (!s)
-                 return -ENOMEM;
-diff --git a/src/core/execute.c b/src/core/execute.c
-index d72e5bf08..d38946002 100644
---- a/src/core/execute.c
-+++ b/src/core/execute.c
-@@ -3443,10 +3443,10 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
- 
-         for (i = 0; i < RLIM_NLIMITS; i++)
-                 if (c->rlimit[i]) {
--                        fprintf(f, "%s%s: " RLIM_FMT "\n",
--                                prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
--                        fprintf(f, "%s%sSoft: " RLIM_FMT "\n",
--                                prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur);
-+                        fprintf(f, "%s%s: %ju\n",
-+                                prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max);
-+                        fprintf(f, "%s%sSoft: %ju\n",
-+                                prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur);
-                 }
- 
-         if (c->ioprio_set) {
--- 
-2.14.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch
deleted file mode 100644
index e2f7458..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch
+++ /dev/null
@@ -1,433 +0,0 @@
-From 0933ca6251808f856b92b0ce8da8696d5febc333 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 10:41:39 -0700
-Subject: [PATCH 01/12] add fallback parse_printf_format implementation
-
-Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile.am                     |   4 +
- configure.ac                    |   2 +
- src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++
- src/basic/parse-printf-format.h |  57 +++++++++
- src/basic/stdio-util.h          |   2 +-
- src/journal/journal-send.c      |   2 +-
- 6 files changed, 338 insertions(+), 2 deletions(-)
- create mode 100644 src/basic/parse-printf-format.c
- create mode 100644 src/basic/parse-printf-format.h
-
-diff --git a/Makefile.am b/Makefile.am
-index 692d7bb95..3cc8f3451 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -997,6 +997,10 @@ libbasic_la_SOURCES = \
- 	src/basic/journal-importer.h \
- 	src/basic/journal-importer.c
- 
-+if !HAVE_PRINTF_H
-+libbasic_la_SOURCES += src/basic/parse-printf-format.c
-+endif
-+
- nodist_libbasic_la_SOURCES = \
- 	src/basic/errno-from-name.h \
- 	src/basic/errno-to-name.h \
-diff --git a/configure.ac b/configure.ac
-index 60e7df5ee..efcdc6c16 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -308,8 +308,10 @@ AC_CHECK_HEADERS([uchar.h], [], [])
- AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
- AC_CHECK_HEADERS([linux/btrfs.h], [], [])
- AC_CHECK_HEADERS([linux/memfd.h], [], [])
-+AC_CHECK_HEADERS([printf.h], [], [])
- AC_CHECK_HEADERS([linux/vm_sockets.h], [], [], [#include <sys/socket.h>])
- 
-+AM_CONDITIONAL(HAVE_PRINTF_H, [test "x$ac_cv_header_printf_h" = xyes])
- # unconditionally pull-in librt with old glibc versions
- AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
- 
-diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
-new file mode 100644
-index 000000000..49437e544
---- /dev/null
-+++ b/src/basic/parse-printf-format.c
-@@ -0,0 +1,273 @@
-+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-+
-+/***
-+  This file is part of systemd.
-+
-+  Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
-+
-+  With parts from the musl C library
-+  Copyright 2005-2014 Rich Felker, et al.
-+
-+  systemd is free software; you can redistribute it and/or modify it
-+  under the terms of the GNU Lesser General Public License as published by
-+  the Free Software Foundation; either version 2.1 of the License, or
-+  (at your option) any later version.
-+
-+  systemd 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
-+  Lesser General Public License for more details.
-+
-+  You should have received a copy of the GNU Lesser General Public License
-+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-+***/
-+
-+#include <stddef.h>
-+#include <string.h>
-+
-+#include "parse-printf-format.h"
-+
-+static const char *consume_nonarg(const char *fmt)
-+{
-+        do {
-+                if (*fmt == '\0')
-+                        return fmt;
-+        } while (*fmt++ != '%');
-+        return fmt;
-+}
-+
-+static const char *consume_num(const char *fmt)
-+{
-+        for (;*fmt >= '0' && *fmt <= '9'; fmt++)
-+                /* do nothing */;
-+        return fmt;
-+}
-+
-+static const char *consume_argn(const char *fmt, size_t *arg)
-+{
-+        const char *p = fmt;
-+        size_t val = 0;
-+
-+        if (*p < '1' || *p > '9')
-+                return fmt;
-+        do {
-+                val = 10*val + (*p++ - '0');
-+        } while (*p >= '0' && *p <= '9');
-+
-+        if (*p != '$')
-+                return fmt;
-+        *arg = val;
-+        return p+1;
-+}
-+
-+static const char *consume_flags(const char *fmt)
-+{
-+        while (1) {
-+                switch (*fmt) {
-+                case '#':
-+                case '0':
-+                case '-':
-+                case ' ':
-+                case '+':
-+                case '\'':
-+                case 'I':
-+                        fmt++;
-+                        continue;
-+                }
-+                return fmt;
-+        }
-+}
-+
-+enum state {
-+        BARE,
-+        LPRE,
-+        LLPRE,
-+        HPRE,
-+        HHPRE,
-+        BIGLPRE,
-+        ZTPRE,
-+        JPRE,
-+        STOP
-+};
-+
-+enum type {
-+        NONE,
-+        PTR,
-+        INT,
-+        UINT,
-+        ULLONG,
-+        LONG,
-+        ULONG,
-+        SHORT,
-+        USHORT,
-+        CHAR,
-+        UCHAR,
-+        LLONG,
-+        SIZET,
-+        IMAX,
-+        UMAX,
-+        PDIFF,
-+        UIPTR,
-+        DBL,
-+        LDBL,
-+        MAXTYPE
-+};
-+
-+static const short pa_types[MAXTYPE] = {
-+        [NONE]   = PA_INT,
-+        [PTR]    = PA_POINTER,
-+        [INT]    = PA_INT,
-+        [UINT]   = PA_INT,
-+        [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
-+        [LONG]   = PA_INT | PA_FLAG_LONG,
-+        [ULONG]  = PA_INT | PA_FLAG_LONG,
-+        [SHORT]  = PA_INT | PA_FLAG_SHORT,
-+        [USHORT] = PA_INT | PA_FLAG_SHORT,
-+        [CHAR]   = PA_CHAR,
-+        [UCHAR]  = PA_CHAR,
-+        [LLONG]  = PA_INT | PA_FLAG_LONG_LONG,
-+        [SIZET]  = PA_INT | PA_FLAG_LONG,
-+        [IMAX]   = PA_INT | PA_FLAG_LONG_LONG,
-+        [UMAX]   = PA_INT | PA_FLAG_LONG_LONG,
-+        [PDIFF]  = PA_INT | PA_FLAG_LONG_LONG,
-+        [UIPTR]  = PA_INT | PA_FLAG_LONG,
-+        [DBL]    = PA_DOUBLE,
-+        [LDBL]   = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
-+};
-+
-+#define S(x) [(x)-'A']
-+#define E(x) (STOP + (x))
-+
-+static const unsigned char states[]['z'-'A'+1] = {
-+        { /* 0: bare types */
-+                S('d') = E(INT), S('i') = E(INT),
-+                S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
-+                S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL),  S('a') = E(DBL),
-+                S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL),  S('A') = E(DBL),
-+                S('c') = E(CHAR),S('C') = E(INT),
-+                S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
-+                S('m') = E(NONE),
-+                S('l') = LPRE,   S('h') = HPRE, S('L') = BIGLPRE,
-+                S('z') = ZTPRE,  S('j') = JPRE, S('t') = ZTPRE
-+        }, { /* 1: l-prefixed */
-+                S('d') = E(LONG), S('i') = E(LONG),
-+                S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
-+                S('e') = E(DBL),  S('f') = E(DBL),  S('g') = E(DBL),  S('a') = E(DBL),
-+                S('E') = E(DBL),  S('F') = E(DBL),  S('G') = E(DBL),  S('A') = E(DBL),
-+                S('c') = E(INT),  S('s') = E(PTR),  S('n') = E(PTR),
-+                S('l') = LLPRE
-+        }, { /* 2: ll-prefixed */
-+                S('d') = E(LLONG), S('i') = E(LLONG),
-+                S('o') = E(ULLONG),S('u') = E(ULLONG),
-+                S('x') = E(ULLONG),S('X') = E(ULLONG),
-+                S('n') = E(PTR)
-+        }, { /* 3: h-prefixed */
-+                S('d') = E(SHORT), S('i') = E(SHORT),
-+                S('o') = E(USHORT),S('u') = E(USHORT),
-+                S('x') = E(USHORT),S('X') = E(USHORT),
-+                S('n') = E(PTR),
-+                S('h') = HHPRE
-+        }, { /* 4: hh-prefixed */
-+                S('d') = E(CHAR), S('i') = E(CHAR),
-+                S('o') = E(UCHAR),S('u') = E(UCHAR),
-+                S('x') = E(UCHAR),S('X') = E(UCHAR),
-+                S('n') = E(PTR)
-+        }, { /* 5: L-prefixed */
-+                S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
-+                S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
-+                S('n') = E(PTR)
-+        }, { /* 6: z- or t-prefixed (assumed to be same size) */
-+                S('d') = E(PDIFF),S('i') = E(PDIFF),
-+                S('o') = E(SIZET),S('u') = E(SIZET),
-+                S('x') = E(SIZET),S('X') = E(SIZET),
-+                S('n') = E(PTR)
-+        }, { /* 7: j-prefixed */
-+                S('d') = E(IMAX), S('i') = E(IMAX),
-+                S('o') = E(UMAX), S('u') = E(UMAX),
-+                S('x') = E(UMAX), S('X') = E(UMAX),
-+                S('n') = E(PTR)
-+        }
-+};
-+
-+size_t parse_printf_format(const char *fmt, size_t n, int *types)
-+{
-+        size_t i = 0;
-+        size_t last = 0;
-+
-+        memset(types, 0, n);
-+
-+        while (1) {
-+                size_t arg;
-+                unsigned int state;
-+
-+                fmt = consume_nonarg(fmt);
-+                if (*fmt == '\0')
-+                        break;
-+                if (*fmt == '%') {
-+                        fmt++;
-+                        continue;
-+                }
-+                arg = 0;
-+                fmt = consume_argn(fmt, &arg);
-+                /* flags */
-+                fmt = consume_flags(fmt);
-+                /* width */
-+                if (*fmt == '*') {
-+                        size_t warg = 0;
-+                        fmt = consume_argn(fmt+1, &warg);
-+                        if (warg == 0)
-+                                warg = ++i;
-+                        if (warg > last)
-+                                last = warg;
-+                        if (warg <= n && types[warg-1] == NONE)
-+                                types[warg-1] = INT;
-+                } else
-+                        fmt = consume_num(fmt);
-+                /* precision */
-+                if (*fmt == '.') {
-+                        fmt++;
-+                        if (*fmt == '*') {
-+                                size_t parg = 0;
-+                                fmt = consume_argn(fmt+1, &parg);
-+                                if (parg == 0)
-+                                        parg = ++i;
-+                                if (parg > last)
-+                                        last = parg;
-+                                if (parg <= n && types[parg-1] == NONE)
-+                                        types[parg-1] = INT;
-+                        } else {
-+                                if (*fmt == '-')
-+                                        fmt++;
-+                                fmt = consume_num(fmt);
-+                        }
-+                }
-+                /* length modifier and conversion specifier */
-+                state = BARE;
-+                do {
-+                        unsigned char c = *fmt++;
-+
-+                        if (c < 'A' || c > 'z')
-+                                continue;
-+                        state = states[state]S(c);
-+                        if (state == 0)
-+                                continue;
-+                } while (state < STOP);
-+
-+                if (state == E(NONE))
-+                        continue;
-+
-+                if (arg == 0)
-+                        arg = ++i;
-+                if (arg > last)
-+                        last = arg;
-+                if (arg <= n)
-+                        types[arg-1] = state - STOP;
-+        }
-+
-+        if (last > n)
-+                last = n;
-+        for (i = 0; i < last; i++)
-+                types[i] = pa_types[types[i]];
-+
-+        return last;
-+}
-diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
-new file mode 100644
-index 000000000..4371177b0
---- /dev/null
-+++ b/src/basic/parse-printf-format.h
-@@ -0,0 +1,57 @@
-+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-+
-+/***
-+  This file is part of systemd.
-+
-+  Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
-+
-+  With parts from the GNU C Library
-+  Copyright 1991-2014 Free Software Foundation, Inc.
-+
-+  systemd is free software; you can redistribute it and/or modify it
-+  under the terms of the GNU Lesser General Public License as published by
-+  the Free Software Foundation; either version 2.1 of the License, or
-+  (at your option) any later version.
-+
-+  systemd 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
-+  Lesser General Public License for more details.
-+
-+  You should have received a copy of the GNU Lesser General Public License
-+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-+***/
-+
-+#pragma once
-+
-+#include "config.h"
-+
-+#ifdef HAVE_PRINTF_H
-+#include <printf.h>
-+#else
-+
-+#include <stddef.h>
-+
-+enum {				/* C type: */
-+  PA_INT,			/* int */
-+  PA_CHAR,			/* int, cast to char */
-+  PA_WCHAR,			/* wide char */
-+  PA_STRING,			/* const char *, a '\0'-terminated string */
-+  PA_WSTRING,			/* const wchar_t *, wide character string */
-+  PA_POINTER,			/* void * */
-+  PA_FLOAT,			/* float */
-+  PA_DOUBLE,			/* double */
-+  PA_LAST
-+};
-+
-+/* Flag bits that can be set in a type returned by `parse_printf_format'.  */
-+#define	PA_FLAG_MASK		0xff00
-+#define	PA_FLAG_LONG_LONG	(1 << 8)
-+#define	PA_FLAG_LONG_DOUBLE	PA_FLAG_LONG_LONG
-+#define	PA_FLAG_LONG		(1 << 9)
-+#define	PA_FLAG_SHORT		(1 << 10)
-+#define	PA_FLAG_PTR		(1 << 11)
-+
-+size_t parse_printf_format(const char *fmt, size_t n, int *types);
-+
-+#endif /* HAVE_PRINTF_H */
-diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
-index bd1144b4c..c9c95eb54 100644
---- a/src/basic/stdio-util.h
-+++ b/src/basic/stdio-util.h
-@@ -19,12 +19,12 @@
-   along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
- 
--#include <printf.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <sys/types.h>
- 
- #include "macro.h"
-+#include "parse-printf-format.h"
- 
- #define xsprintf(buf, fmt, ...) \
-         assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
-diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
-index 440fba67c..0236c43c4 100644
---- a/src/journal/journal-send.c
-+++ b/src/journal/journal-send.c
-@@ -19,7 +19,6 @@
- 
- #include <errno.h>
- #include <fcntl.h>
--#include <printf.h>
- #include <stddef.h>
- #include <sys/socket.h>
- #include <sys/un.h>
-@@ -38,6 +37,7 @@
- #include "stdio-util.h"
- #include "string-util.h"
- #include "util.h"
-+#include "parse-printf-format.h"
- 
- #define SNDBUF_SIZE (8*1024*1024)
- 
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
index 7f1bc44..98c8362 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
@@ -1,8 +1,7 @@
-From f1b5a6f717bda6f80a6b5e3e4d50b450f6cc7b09 Mon Sep 17 00:00:00 2001
+From 7844e070745611a52e355b73e7890f360dd540d0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 14 Dec 2015 04:09:19 +0000
-Subject: [PATCH 14/14] core/device.c: Change the default device timeout to 240
- sec.
+Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec.
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -17,10 +16,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/core/device.c b/src/core/device.c
-index 77601c552..98bf49ba2 100644
+index a43664d3b..4b16a8aec 100644
 --- a/src/core/device.c
 +++ b/src/core/device.c
-@@ -112,7 +112,7 @@ static void device_init(Unit *u) {
+@@ -113,7 +113,7 @@ static void device_init(Unit *u) {
           * indefinitely for plugged in devices, something which cannot
           * happen for the other units since their operations time out
           * anyway. */
@@ -29,6 +28,3 @@
  
          u->ignore_on_isolate = true;
  }
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch
deleted file mode 100644
index df100e5..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 28dd66ecfce743b1ea9046c7bb501e0fcaeff724 Mon Sep 17 00:00:00 2001
-From: Luca Bruno <luca.bruno@coreos.com>
-Date: Sun, 6 Aug 2017 13:24:24 +0000
-Subject: [PATCH] core: evaluate presets after generators have run (#6526)
-
-This commit moves the first-boot system preset-settings evaluation out
-of main and into the manager startup logic itself. Notably, it reverses
-the order between generators and presets evaluation, so that any changes
-performed by first-boot generators are taken into the account by presets
-logic.
-
-After this change, units created by a generator can be enabled as part
-of a preset.
-
-Upstream-Status: Backport
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- src/core/main.c    | 12 ++----------
- src/core/manager.c |  8 ++++++++
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/src/core/main.c b/src/core/main.c
-index dfedc3d..11ac9cf 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
-@@ -1809,18 +1809,10 @@ int main(int argc, char *argv[]) {
-                 if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
-                         log_warning_errno(errno, "Failed to make us a subreaper: %m");
- 
--        if (arg_system) {
-+        if (arg_system)
-+                /* Bump up RLIMIT_NOFILE for systemd itself */
-                 (void) bump_rlimit_nofile(&saved_rlimit_nofile);
- 
--                if (empty_etc) {
--                        r = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0);
--                        if (r < 0)
--                                log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r, "Failed to populate /etc with preset unit settings, ignoring: %m");
--                        else
--                                log_info("Populated /etc with preset unit settings.");
--                }
--        }
--
-         r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m);
-         if (r < 0) {
-                 log_emergency_errno(r, "Failed to allocate manager object: %m");
-diff --git a/src/core/manager.c b/src/core/manager.c
-index 1aadb70..fb5e2b5 100644
---- a/src/core/manager.c
-+++ b/src/core/manager.c
-@@ -1328,6 +1328,14 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
-         if (r < 0)
-                 return r;
- 
-+        if (m->first_boot && m->unit_file_scope == UNIT_FILE_SYSTEM) {
-+                q = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0);
-+                if (q < 0)
-+                        log_full_errno(q == -EEXIST ? LOG_NOTICE : LOG_WARNING, q, "Failed to populate /etc with preset unit settings, ignoring: %m");
-+                else
-+                        log_info("Populated /etc with preset unit settings.");
-+        }
-+
-         lookup_paths_reduce(&m->lookup_paths);
-         manager_build_unit_path_cache(m);
- 
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch
deleted file mode 100644
index a033b04..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From dea374e898a749a0474b72b2015cca9009b1432b Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Wed, 13 Sep 2017 10:31:40 +0200
-Subject: [PATCH] main: skip many initialization steps when running in --test
- mode
-
-Most importantly, don't collect open socket activation fds when in
---test mode. This specifically created a problem because we invoke
-pager_open() beforehand (which these days makes copies of the original
-stdout/stderr in order to be able to restore them when the pager goes
-away) and we might mistakenly the fd copies it creates as socket
-activation fds.
-
-Fixes: #6383
-
-Upstream-Status: Backport
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- src/core/main.c | 108 +++++++++++++++++++++++++++++---------------------------
- 1 file changed, 56 insertions(+), 52 deletions(-)
-
-diff --git a/src/core/main.c b/src/core/main.c
-index 11ac9cf..d1a53a5 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
-@@ -1679,20 +1679,22 @@ int main(int argc, char *argv[]) {
-         log_close();
- 
-         /* Remember open file descriptors for later deserialization */
--        r = fdset_new_fill(&fds);
--        if (r < 0) {
--                log_emergency_errno(r, "Failed to allocate fd set: %m");
--                error_message = "Failed to allocate fd set";
--                goto finish;
--        } else
--                fdset_cloexec(fds, true);
-+        if (arg_action == ACTION_RUN) {
-+                r = fdset_new_fill(&fds);
-+                if (r < 0) {
-+                        log_emergency_errno(r, "Failed to allocate fd set: %m");
-+                        error_message = "Failed to allocate fd set";
-+                        goto finish;
-+                } else
-+                        fdset_cloexec(fds, true);
- 
--        if (arg_serialization)
--                assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0);
-+                if (arg_serialization)
-+                        assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0);
- 
--        if (arg_system)
--                /* Become a session leader if we aren't one yet. */
--                setsid();
-+                if (arg_system)
-+                        /* Become a session leader if we aren't one yet. */
-+                        setsid();
-+        }
- 
-         /* Move out of the way, so that we won't block unmounts */
-         assert_se(chdir("/") == 0);
-@@ -1762,56 +1764,58 @@ int main(int argc, char *argv[]) {
-                           arg_action == ACTION_TEST ? " test" : "", getuid(), t);
-         }
- 
--        if (arg_system && !skip_setup) {
--                if (arg_show_status > 0)
--                        status_welcome();
-+        if (arg_action == ACTION_RUN) {
-+                if (arg_system && !skip_setup) {
-+                        if (arg_show_status > 0)
-+                                status_welcome();
- 
--                hostname_setup();
--                machine_id_setup(NULL, arg_machine_id, NULL);
--                loopback_setup();
--                bump_unix_max_dgram_qlen();
-+                        hostname_setup();
-+                        machine_id_setup(NULL, arg_machine_id, NULL);
-+                        loopback_setup();
-+                        bump_unix_max_dgram_qlen();
- 
--                test_usr();
--        }
-+                        test_usr();
-+                }
- 
--        if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY)
--                watchdog_set_timeout(&arg_runtime_watchdog);
-+                if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY)
-+                        watchdog_set_timeout(&arg_runtime_watchdog);
- 
--        if (arg_timer_slack_nsec != NSEC_INFINITY)
--                if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0)
--                        log_error_errno(errno, "Failed to adjust timer slack: %m");
-+                if (arg_timer_slack_nsec != NSEC_INFINITY)
-+                        if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0)
-+                                log_error_errno(errno, "Failed to adjust timer slack: %m");
- 
--        if (arg_system && !cap_test_all(arg_capability_bounding_set)) {
--                r = capability_bounding_set_drop_usermode(arg_capability_bounding_set);
--                if (r < 0) {
--                        log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m");
--                        error_message = "Failed to drop capability bounding set of usermode helpers";
--                        goto finish;
--                }
--                r = capability_bounding_set_drop(arg_capability_bounding_set, true);
--                if (r < 0) {
--                        log_emergency_errno(r, "Failed to drop capability bounding set: %m");
--                        error_message = "Failed to drop capability bounding set";
--                        goto finish;
-+                if (arg_system && !cap_test_all(arg_capability_bounding_set)) {
-+                        r = capability_bounding_set_drop_usermode(arg_capability_bounding_set);
-+                        if (r < 0) {
-+                                log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m");
-+                                error_message = "Failed to drop capability bounding set of usermode helpers";
-+                                goto finish;
-+                        }
-+                        r = capability_bounding_set_drop(arg_capability_bounding_set, true);
-+                        if (r < 0) {
-+                                log_emergency_errno(r, "Failed to drop capability bounding set: %m");
-+                                error_message = "Failed to drop capability bounding set";
-+                                goto finish;
-+                        }
-                 }
--        }
- 
--        if (arg_syscall_archs) {
--                r = enforce_syscall_archs(arg_syscall_archs);
--                if (r < 0) {
--                        error_message = "Failed to set syscall architectures";
--                        goto finish;
-+                if (arg_syscall_archs) {
-+                        r = enforce_syscall_archs(arg_syscall_archs);
-+                        if (r < 0) {
-+                                error_message = "Failed to set syscall architectures";
-+                                goto finish;
-+                        }
-                 }
--        }
- 
--        if (!arg_system)
--                /* Become reaper of our children */
--                if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
--                        log_warning_errno(errno, "Failed to make us a subreaper: %m");
-+                if (!arg_system)
-+                        /* Become reaper of our children */
-+                        if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
-+                                log_warning_errno(errno, "Failed to make us a subreaper: %m");
- 
--        if (arg_system)
--                /* Bump up RLIMIT_NOFILE for systemd itself */
--                (void) bump_rlimit_nofile(&saved_rlimit_nofile);
-+                if (arg_system)
-+                        /* Bump up RLIMIT_NOFILE for systemd itself */
-+                        (void) bump_rlimit_nofile(&saved_rlimit_nofile);
-+        }
- 
-         r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m);
-         if (r < 0) {
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 0000000..c3f4b39
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,81 @@
+From c93eb6cdec03f5e243e59e95dc49273fcb90e7c1 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 10:23:40 +0800
+Subject: [PATCH 02/31] binfmt: Don't install dependency links at install time
+ for the binfmt services
+
+use [Install] blocks so that they get created when the service is enabled
+like a traditional service.
+
+The [Install] blocks were rejected upstream as they don't have a way to
+"enable" it on install without static symlinks which can't be disabled,
+only masked. We however can do that in a postinst.
+
+Upstream-Status: Denied
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ units/meson.build                       | 6 ++----
+ units/proc-sys-fs-binfmt_misc.automount | 3 +++
+ units/systemd-binfmt.service.in         | 4 ++++
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/units/meson.build b/units/meson.build
+index 814ee7885..49ace0d0f 100644
+--- a/units/meson.build
++++ b/units/meson.build
+@@ -60,8 +60,7 @@ units = [
+         ['poweroff.target',                     '',
+          'runlevel0.target'],
+         ['printer.target',                      ''],
+-        ['proc-sys-fs-binfmt_misc.automount',   'ENABLE_BINFMT',
+-         'sysinit.target.wants/'],
++        ['proc-sys-fs-binfmt_misc.automount',   'ENABLE_BINFMT'],
+         ['proc-sys-fs-binfmt_misc.mount',       'ENABLE_BINFMT'],
+         ['reboot.target',                       '',
+          'runlevel6.target ctrl-alt-del.target'],
+@@ -144,8 +143,7 @@ in_units = [
+         ['systemd-ask-password-console.service', ''],
+         ['systemd-ask-password-wall.service',    ''],
+         ['systemd-backlight@.service',           'ENABLE_BACKLIGHT'],
+-        ['systemd-binfmt.service',               'ENABLE_BINFMT',
+-         'sysinit.target.wants/'],
++        ['systemd-binfmt.service',               'ENABLE_BINFMT'],
+         ['systemd-coredump@.service',            'ENABLE_COREDUMP'],
+         ['systemd-exit.service',                 ''],
+         ['systemd-firstboot.service',            'ENABLE_FIRSTBOOT',
+diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
+index 30a6bc991..4231f3b70 100644
+--- a/units/proc-sys-fs-binfmt_misc.automount
++++ b/units/proc-sys-fs-binfmt_misc.automount
+@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
+ 
+ [Automount]
+ Where=/proc/sys/fs/binfmt_misc
++
++[Install]
++WantedBy=sysinit.target
+diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
+index df9396d89..0687f4648 100644
+--- a/units/systemd-binfmt.service.in
++++ b/units/systemd-binfmt.service.in
+@@ -13,6 +13,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
+ Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+ DefaultDependencies=no
+ Conflicts=shutdown.target
++Wants=proc-sys-fs-binfmt_misc.automount
+ After=proc-sys-fs-binfmt_misc.automount
+ Before=sysinit.target shutdown.target
+ ConditionPathIsReadWrite=/proc/sys/
+@@ -27,3 +28,6 @@ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=@rootlibexecdir@/systemd-binfmt
+ TimeoutSec=90s
++
++[Install]
++WantedBy=sysinit.target
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
deleted file mode 100644
index 94c136b..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 585abd891a56409915314304101cac26b42c076b Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 10:45:46 -0700
-Subject: [PATCH 02/12] src/basic/missing.h: check for missing strndupa
-
-include missing.h  for definition of strndupa
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac           |  1 +
- src/basic/missing.h    | 11 +++++++++++
- src/basic/mkdir.c      |  1 +
- src/basic/parse-util.c |  1 +
- src/shared/pager.c     |  1 +
- src/shared/uid-range.c |  1 +
- 6 files changed, 16 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index efcdc6c16..cd035a971 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -329,6 +329,7 @@ AC_CHECK_DECLS([
-         pivot_root,
-         name_to_handle_at,
-         setns,
-+        strndupa,
-         renameat2,
-         kcmp,
-         keyctl,
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 04912bf52..8009888ad 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1104,6 +1104,17 @@ typedef int32_t key_serial_t;
- #define KEYCTL_DESCRIBE 6
- #endif
- 
-+#if !HAVE_DECL_STRNDUPA
-+#define strndupa(s, n) \
-+  ({ \
-+    const char *__old = (s); \
-+    size_t __len = strnlen(__old, (n)); \
-+    char *__new = (char *)alloca(__len + 1); \
-+    __new[__len] = '\0'; \
-+    (char *)memcpy(__new, __old, __len); \
-+  })
-+#endif
-+
- #ifndef KEYCTL_READ
- #define KEYCTL_READ 11
- #endif
-diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
-index 6b1a98402..d1388df48 100644
---- a/src/basic/mkdir.c
-+++ b/src/basic/mkdir.c
-@@ -28,6 +28,7 @@
- #include "path-util.h"
- #include "stat-util.h"
- #include "user-util.h"
-+#include "missing.h"
- 
- int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) {
-         struct stat st;
-diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
-index 4532f222c..7a30a0e06 100644
---- a/src/basic/parse-util.c
-+++ b/src/basic/parse-util.c
-@@ -30,6 +30,7 @@
- #include "parse-util.h"
- #include "process-util.h"
- #include "string-util.h"
-+#include "missing.h"
- 
- int parse_boolean(const char *v) {
-         assert(v);
-diff --git a/src/shared/pager.c b/src/shared/pager.c
-index 4d7b02c63..854efc0c9 100644
---- a/src/shared/pager.c
-+++ b/src/shared/pager.c
-@@ -38,6 +38,7 @@
- #include "string-util.h"
- #include "strv.h"
- #include "terminal-util.h"
-+#include "missing.h"
- 
- static pid_t pager_pid = 0;
- 
-diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
-index b6ec47439..91ce9fb7f 100644
---- a/src/shared/uid-range.c
-+++ b/src/shared/uid-range.c
-@@ -24,6 +24,7 @@
- #include "macro.h"
- #include "uid-range.h"
- #include "user-util.h"
-+#include "missing.h"
- 
- static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
-         assert(range);
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
deleted file mode 100644
index 9a2d2c8..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 5bbbc2a08a3b4283ec04af0e77e25fb205aa8b82 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 10:50:14 -0700
-Subject: [PATCH 03/12] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
- defined
-
-If the standard library doesn't provide brace
-expansion users just won't get it.
-
-Dont use GNU GLOB extentions on non-glibc systems
-
-Conditionalize use of GLOB_ALTDIRFUNC
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/glob-util.c     | 20 +++++++++++++++++---
- src/test/test-glob-util.c | 17 +++++++++++++++--
- src/tmpfiles/tmpfiles.c   |  8 ++++++++
- 3 files changed, 40 insertions(+), 5 deletions(-)
-
-diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
-index f611c42e4..ad6e2be8d 100644
---- a/src/basic/glob-util.c
-+++ b/src/basic/glob-util.c
-@@ -27,13 +27,18 @@
- #include "macro.h"
- #include "path-util.h"
- #include "strv.h"
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
- 
- int safe_glob(const char *path, int flags, glob_t *pglob) {
-         int k;
- 
-+#ifdef GLOB_ALTDIRFUNC
-         /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
-         assert(!(flags & GLOB_ALTDIRFUNC));
--
-         if (!pglob->gl_closedir)
-                 pglob->gl_closedir = (void (*)(void *)) closedir;
-         if (!pglob->gl_readdir)
-@@ -44,10 +49,13 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
-                 pglob->gl_lstat = lstat;
-         if (!pglob->gl_stat)
-                 pglob->gl_stat = stat;
--
-+#endif
-         errno = 0;
-+#ifdef GLOB_ALTDIRFUNC
-         k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
--
-+#else
-+        k = glob(path, flags, NULL, pglob);
-+#endif
-         if (k == GLOB_NOMATCH)
-                 return -ENOENT;
-         if (k == GLOB_NOSPACE)
-@@ -60,6 +68,12 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
-         return 0;
- }
- 
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
- int glob_exists(const char *path) {
-         _cleanup_globfree_ glob_t g = {};
-         int k;
-diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
-index af866e004..3afa09ada 100644
---- a/src/test/test-glob-util.c
-+++ b/src/test/test-glob-util.c
-@@ -29,6 +29,11 @@
- #include "glob-util.h"
- #include "macro.h"
- #include "rm-rf.h"
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
- 
- static void test_glob_exists(void) {
-         char name[] = "/tmp/test-glob_exists.XXXXXX";
-@@ -51,25 +56,33 @@ static void test_glob_exists(void) {
- static void test_glob_no_dot(void) {
-         char template[] = "/tmp/test-glob-util.XXXXXXX";
-         const char *fn;
--
-         _cleanup_globfree_ glob_t g = {
-+#ifdef GLOB_ALTDIRFUNC
-                 .gl_closedir = (void (*)(void *)) closedir,
-                 .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
-                 .gl_opendir = (void *(*)(const char *)) opendir,
-                 .gl_lstat = lstat,
-                 .gl_stat = stat,
-+#endif
-         };
--
-         int r;
- 
-         assert_se(mkdtemp(template));
- 
-         fn = strjoina(template, "/*");
-+#ifdef GLOB_ALTDIRFUNC
-         r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
-+#else
-+        r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
-+#endif
-         assert_se(r == GLOB_NOMATCH);
- 
-         fn = strjoina(template, "/.*");
-+#ifdef GLOB_ALTDIRFUNC
-         r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
-+#else
-+        r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
-+#endif
-         assert_se(r == GLOB_NOMATCH);
- 
-         (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
-diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
-index 9419c99e2..07027a765 100644
---- a/src/tmpfiles/tmpfiles.c
-+++ b/src/tmpfiles/tmpfiles.c
-@@ -71,6 +71,12 @@
- #include "umask-util.h"
- #include "user-util.h"
- #include "util.h"
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
- 
- /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
-  * them in the file system. This is intended to be used to create
-@@ -1092,7 +1098,9 @@ static int item_do_children(Item *i, const char *path, action_t action) {
- 
- static int glob_item(Item *i, action_t action, bool recursive) {
-         _cleanup_globfree_ glob_t g = {
-+#ifdef GLOB_ALTDIRFUNC
-                 .gl_opendir = (void *(*)(const char *)) opendir_nomod,
-+#endif
-         };
-         int r = 0, k;
-         char **fn;
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
new file mode 100644
index 0000000..28f1b21
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -0,0 +1,64 @@
+From 8b9d194e956848e0d1fb35ef2fba714b2691ebe6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 20:47:49 -0800
+Subject: [PATCH 03/31] use lnr wrapper instead of looking for --relative
+ option for ln
+
+Remove file manually to avoid the 'File Exists' error when creating
+symlink. This is because the original 'ln' command uses '-f' option.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build                 | 4 ----
+ tools/meson-make-symlink.sh | 3 ++-
+ units/meson-add-wants.sh    | 7 ++++++-
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 36a62d280..7347ea880 100644
+--- a/meson.build
++++ b/meson.build
+@@ -570,10 +570,6 @@ endforeach
+ 
+ conf.set_quoted('TELINIT', get_option('telinit-path'))
+ 
+-if run_command('ln', '--relative', '--help').returncode() != 0
+-        error('ln does not support --relative')
+-endif
+-
+ ############################################################
+ 
+ gperf = find_program('gperf')
+diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh
+index 501cd43d4..f4e4ac9ac 100755
+--- a/tools/meson-make-symlink.sh
++++ b/tools/meson-make-symlink.sh
+@@ -8,5 +8,6 @@ mkdir -vp "$(dirname "${DESTDIR:-}$2")"
+ if [ "$(dirname $1)" = . ]; then
+         ln -vfs -T "$1" "${DESTDIR:-}$2"
+ else
+-        ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
++        rm -f "${DESTDIR:-}$2"
++        lnr "${DESTDIR:-}$1" "${DESTDIR:-}$2"
+ fi
+diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh
+index 70f7172ae..a42666aac 100755
+--- a/units/meson-add-wants.sh
++++ b/units/meson-add-wants.sh
+@@ -25,4 +25,9 @@ case "$target" in
+                 ;;
+ esac
+ 
+-ln -vfs --relative "$unitpath" "$dir"
++if [ -d "$dir" ]; then
++        rm -f "$dir/$unit"
++        lnr "$unitpath" "$dir/$unit"
++else
++        lnr "$unitpath" "$dir"
++fi
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
deleted file mode 100644
index ab2cbe0..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5765cda4f7243e240b1e8723dc536fb20503d544 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:28:32 -0800
-Subject: [PATCH 04/19] Use getenv when secure versions are not available
-
-musl doesnt implement secure version, so we default
-to it if configure does not detect a secure imeplementation
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Denied
----
- src/basic/missing.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 4a3fd9c..4936873 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -529,7 +529,7 @@ struct btrfs_ioctl_quota_ctl_args {
- #  ifdef HAVE___SECURE_GETENV
- #    define secure_getenv __secure_getenv
- #  else
--#    error "neither secure_getenv nor __secure_getenv are available"
-+#    define secure_getenv getenv
- #  endif
- #endif
- 
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch
new file mode 100644
index 0000000..83fdb53
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch
@@ -0,0 +1,43 @@
+From 70d456fb21de2a80697fa364f08475339d6396c1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Sep 2015 06:31:47 +0000
+Subject: [PATCH 04/31] implment systemd-sysv-install for OE
+
+Use update-rc.d for enabling/disabling and status command
+to check the status of the sysv service
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
+index a53a3e622..5d877b06e 100755
+--- a/src/systemctl/systemd-sysv-install.SKELETON
++++ b/src/systemctl/systemd-sysv-install.SKELETON
+@@ -30,17 +30,17 @@ case "$1" in
+     enable)
+         # call the command to enable SysV init script $NAME here
+         # (consider optional $ROOT)
+-        echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
++        update-rc.d -f $NAME defaults
+         ;;
+     disable)
+         # call the command to disable SysV init script $NAME here
+         # (consider optional $ROOT)
+-        echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
++        update-rc.d -f $NAME remove
+         ;;
+     is-enabled)
+         # exit with 0 if $NAME is enabled, non-zero if it is disabled
+         # (consider optional $ROOT)
+-        echo "IMPLEMENT ME: checking SysV init.d script $NAME"
++        /etc/init.d/$NAME status
+         ;;
+     *)
+         usage ;;
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
deleted file mode 100644
index cb5ae99..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From c850b654e71677e0d6292f1345207b9b5acffc33 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 11:31:03 -0700
-Subject: [PATCH 04/12] src/basic/missing.h: check for missing __compar_fn_t
- typedef
-
-include missing.h for missing __compar_fn_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/missing.h | 5 +++++
- src/basic/strbuf.c  | 1 +
- 2 files changed, 6 insertions(+)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 8009888ad..671f341c6 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1063,6 +1063,11 @@ struct input_mask {
- #define RENAME_NOREPLACE (1 << 0)
- #endif
- 
-+#ifndef __COMPAR_FN_T
-+#define __COMPAR_FN_T
-+typedef int (*__compar_fn_t)(const void *, const void *);
-+#endif
-+
- #ifndef KCMP_FILE
- #define KCMP_FILE 0
- #endif
-diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c
-index 00aaf9e62..9dc4a584a 100644
---- a/src/basic/strbuf.c
-+++ b/src/basic/strbuf.c
-@@ -23,6 +23,7 @@
- 
- #include "alloc-util.h"
- #include "strbuf.h"
-+#include "missing.h"
- 
- /*
-  * Strbuf stores given strings in a single continuous allocated memory
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
deleted file mode 100644
index 7016e98..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 74450f0dbad2f8478c26eeaa46d4e4a987858f45 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:03:44 +0000
-Subject: [PATCH 05/19] binfmt: Don't install dependency links at install time
- for the binfmt services
-
-use [Install] blocks so that they get created when the service is enabled
-like a traditional service.
-
-The [Install] blocks were rejected upstream as they don't have a way to
-"enable"
-it on install without static symlinks which can't be disabled, only
-masked.  We
-however can do that in a postinst.
-
-Upstream-Status: Denied
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am                             | 4 ----
- units/proc-sys-fs-binfmt_misc.automount | 3 +++
- units/systemd-binfmt.service.in         | 5 +++++
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 50da458..29ed1dd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4635,10 +4635,6 @@ INSTALL_DIRS += \
- 	$(prefix)/lib/binfmt.d \
- 	$(sysconfdir)/binfmt.d
- 
--SYSINIT_TARGET_WANTS += \
--	systemd-binfmt.service \
--	proc-sys-fs-binfmt_misc.automount
--
- endif
- 
- EXTRA_DIST += \
-diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
-index 6be3893..709adef 100644
---- a/units/proc-sys-fs-binfmt_misc.automount
-+++ b/units/proc-sys-fs-binfmt_misc.automount
-@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
- 
- [Automount]
- Where=/proc/sys/fs/binfmt_misc
-+
-+[Install]
-+WantedBy=sysinit.target
-diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
-index d53073e..8c57ee0 100644
---- a/units/systemd-binfmt.service.in
-+++ b/units/systemd-binfmt.service.in
-@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
- Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
- DefaultDependencies=no
- Conflicts=shutdown.target
-+Wants=proc-sys-fs-binfmt_misc.automount
-+
- After=proc-sys-fs-binfmt_misc.automount
- Before=sysinit.target shutdown.target
- ConditionPathIsReadWrite=/proc/sys/
-@@ -25,3 +27,6 @@ Type=oneshot
- RemainAfterExit=yes
- ExecStart=@rootlibexecdir@/systemd-binfmt
- TimeoutSec=90s
-+
-+[Install]
-+WantedBy=sysinit.target
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch
new file mode 100644
index 0000000..e4421c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch
@@ -0,0 +1,33 @@
+From 7b5b34993002b4418ba8a3c2ae661a7337fd8ed0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 9 Nov 2016 19:41:13 -0800
+Subject: [PATCH 05/31] rules: whitelist hd* devices
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
+
+Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ rules/60-persistent-storage.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
+index 0de8cf3a1..d3f58f153 100644
+--- a/rules/60-persistent-storage.rules
++++ b/rules/60-persistent-storage.rules
+@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
+ ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
+ 
+ SUBSYSTEM!="block", GOTO="persistent_storage_end"
+-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*", GOTO="persistent_storage_end"
++KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|hd*", GOTO="persistent_storage_end"
+ 
+ # ignore partitions that span the entire disk
+ TEST=="whole_disk", GOTO="persistent_storage_end"
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
deleted file mode 100644
index 55887ee..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 21080b6a40d0a4ddd2db8f0fa37686f6fa885d1c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 11:38:33 -0700
-Subject: [PATCH 06/12] Include netinet/if_ether.h
-
-Fixes
-/mnt/a/oe/build/tmp/work/mips32r2-bec-linux-musl/systemd/1_234-r0/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
- struct ethhdr {
-        ^~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/libsystemd/sd-netlink/netlink-types.c | 1 +
- src/network/netdev/tuntap.c               | 1 +
- src/network/networkd-brvlan.c             | 1 +
- src/udev/net/ethtool-util.c               | 2 +-
- src/udev/udev-builtin-net_setup_link.c    | 2 +-
- 5 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
-index 923f7dd10..b95b1e4b2 100644
---- a/src/libsystemd/sd-netlink/netlink-types.c
-+++ b/src/libsystemd/sd-netlink/netlink-types.c
-@@ -19,6 +19,7 @@
- 
- #include <stdint.h>
- #include <sys/socket.h>
-+#include <netinet/if_ether.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
- #include <linux/can/netlink.h>
-diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c
-index 3d6280884..40e58c38f 100644
---- a/src/network/netdev/tuntap.c
-+++ b/src/network/netdev/tuntap.c
-@@ -18,6 +18,7 @@
- ***/
- 
- #include <fcntl.h>
-+#include <netinet/if_ether.h>
- #include <linux/if_tun.h>
- #include <net/if.h>
- #include <netinet/if_ether.h>
-diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
-index fa5d3ee7f..e0828962a 100644
---- a/src/network/networkd-brvlan.c
-+++ b/src/network/networkd-brvlan.c
-@@ -18,6 +18,7 @@
- ***/
- 
- #include <netinet/in.h>
-+#include <netinet/if_ether.h>
- #include <linux/if_bridge.h>
- #include <stdbool.h>
- 
-diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
-index 201fc2343..5f7cc2a0a 100644
---- a/src/udev/net/ethtool-util.c
-+++ b/src/udev/net/ethtool-util.c
-@@ -16,7 +16,7 @@
-   You should have received a copy of the GNU Lesser General Public License
-   along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
--
-+#include <netinet/if_ether.h>
- #include <net/if.h>
- #include <sys/ioctl.h>
- #include <linux/ethtool.h>
-diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
-index 8e4777513..d01fff2a4 100644
---- a/src/udev/udev-builtin-net_setup_link.c
-+++ b/src/udev/udev-builtin-net_setup_link.c
-@@ -16,7 +16,7 @@
-   You should have received a copy of the GNU Lesser General Public License
-   along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
--
-+#include <netinet/if_ether.h>
- #include "alloc-util.h"
- #include "link-config.h"
- #include "log.h"
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch
new file mode 100644
index 0000000..5ba9661
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch
@@ -0,0 +1,78 @@
+From 9d63227420f0c4f093c1c2066eafe2b6152070cf Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Fri, 23 Feb 2018 13:47:37 +0800
+Subject: [PATCH 06/31] Make root's home directory configurable
+
+OpenEmbedded has a configurable home directory for root. Allow
+systemd to be built using its idea of what root's home directory
+should be.
+
+Upstream-Status: Denied
+Upstream wants to have a unified hierarchy where everyone is
+using the same root folder.
+https://github.com/systemd/systemd/issues/541
+
+Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build       | 8 ++++++++
+ meson_options.txt | 2 ++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 7347ea880..918101d6b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -94,6 +94,11 @@ if rootlibdir == ''
+         rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1])
+ endif
+ 
++roothomedir = get_option('roothomedir')
++if roothomedir == ''
++        roothomedir = '/root'
++endif
++
+ # Dirs of external packages
+ pkgconfigdatadir = join_paths(datadir, 'pkgconfig')
+ pkgconfiglibdir = join_paths(libdir, 'pkgconfig')
+@@ -205,6 +210,7 @@ conf.set_quoted('UDEVLIBEXECDIR',                             udevlibexecdir)
+ conf.set_quoted('POLKIT_AGENT_BINARY_PATH',                   join_paths(bindir, 'pkttyagent'))
+ conf.set_quoted('LIBDIR',                                     libdir)
+ conf.set_quoted('ROOTLIBDIR',                                 rootlibdir)
++conf.set_quoted('ROOTHOMEDIR',                                roothomedir)
+ conf.set_quoted('ROOTLIBEXECDIR',                             rootlibexecdir)
+ conf.set_quoted('BOOTLIBDIR',                                 bootlibdir)
+ conf.set_quoted('SYSTEMD_PULL_PATH',                          join_paths(rootlibexecdir, 'systemd-pull'))
+@@ -221,6 +227,7 @@ substs.set('prefix',                                          prefixdir)
+ substs.set('exec_prefix',                                     prefixdir)
+ substs.set('libdir',                                          libdir)
+ substs.set('rootlibdir',                                      rootlibdir)
++substs.set('roothomedir',                                     roothomedir)
+ substs.set('includedir',                                      includedir)
+ substs.set('pkgsysconfdir',                                   pkgsysconfdir)
+ substs.set('bindir',                                          bindir)
+@@ -2705,6 +2712,7 @@ status = [
+         'include directory:                 @0@'.format(includedir),
+         'lib directory:                     @0@'.format(libdir),
+         'rootlib directory:                 @0@'.format(rootlibdir),
++        'roothome directory:                @0@'.format(roothomedir),
+         'SysV init scripts:                 @0@'.format(sysvinit_path),
+         'SysV rc?.d directories:            @0@'.format(sysvrcnd_path),
+         'PAM modules directory:             @0@'.format(pamlibdir),
+diff --git a/meson_options.txt b/meson_options.txt
+index 39822d6cd..0b24f0e0f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -22,6 +22,8 @@ option('rootlibdir', type : 'string',
+        description : '''[/usr]/lib/x86_64-linux-gnu or such''')
+ option('rootprefix', type : 'string',
+        description : '''override the root prefix''')
++option('roothomedir', type : 'string',
++       description : '''override the root home directory''')
+ option('link-udev-shared', type : 'boolean',
+        description : 'link systemd-udev and its helpers to libsystemd-shared.so')
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch
new file mode 100644
index 0000000..bb12d30
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch
@@ -0,0 +1,28 @@
+From 35d6d384e83ac38077603611bb791969ef95fe68 Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Thu, 19 Mar 2015 15:01:29 +1100
+Subject: [PATCH 07/31] Revert "rules: remove firmware loading rules"
+
+This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
+Userspace firmware loading support is needed for Linux < 3.7.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ rules/50-firmware.rules | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 rules/50-firmware.rules
+
+diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
+new file mode 100644
+index 000000000..f0ae68451
+--- /dev/null
++++ b/rules/50-firmware.rules
+@@ -0,0 +1,3 @@
++# do not edit this file, it will be overwritten on update
++
++SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch
deleted file mode 100644
index 5234c59..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 05dffe67919ffc72be5c017bc6cf82f164b2e8f9 Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Mon, 23 Oct 2017 11:42:03 -0700
-Subject: [PATCH 07/12] check for missing canonicalize_file_name
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac                | 2 ++
- src/basic/missing.h         | 1 +
- src/basic/missing_syscall.h | 6 ++++++
- 3 files changed, 9 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index cd035a971..3674190fb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -333,6 +333,7 @@ AC_CHECK_DECLS([
-         renameat2,
-         kcmp,
-         keyctl,
-+        canonicalize_file_name,
-         LO_FLAGS_PARTSCAN,
-         copy_file_range,
-         explicit_bzero],
-@@ -343,6 +344,7 @@ AC_CHECK_DECLS([
- #include <fcntl.h>
- #include <sched.h>
- #include <string.h>
-+#include <stdlib.h>
- #include <linux/loop.h>
- ]])
- 
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 671f341c6..8ae4964e1 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -1246,3 +1246,4 @@ struct ethtool_link_settings {
- #endif
- 
- #include "missing_syscall.h"
-+
-diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
-index 898116c7b..4d44ee4fa 100644
---- a/src/basic/missing_syscall.h
-+++ b/src/basic/missing_syscall.h
-@@ -28,6 +28,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
- }
- #endif
- 
-+#if !HAVE_DECL_CANONICALIZE_FILE_NAME
-+static inline char *canonicalize_file_name(const char *path) {
-+        return realpath(path, NULL);
-+}
-+#endif
-+
- /* ======================================================================= */
- 
- #if !HAVE_DECL_MEMFD_CREATE
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
deleted file mode 100644
index bc92db7..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a3482c91642cf568b3ac27fa6c0cb3c6b30669b7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:32:14 -0800
-Subject: [PATCH 07/19] use lnr wrapper instead of looking for --relative
- option for ln
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am  | 2 +-
- configure.ac | 2 --
- 2 files changed, 1 insertion(+), 3 deletions(-)
-
-Index: git/Makefile.am
-===================================================================
---- git.orig/Makefile.am
-+++ git/Makefile.am
-@@ -320,7 +320,7 @@ define install-relative-aliases
- 	while [ -n "$$1" ]; do \
- 		$(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
- 		rm -f $(DESTDIR)$$dir/$$2 && \
--		$(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
-+		lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
- 		shift 2 || exit $$?; \
- 	done
- endef
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr
- AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
- AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
- 
--AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
--
- M4_DEFINES=
- 
- AC_CHECK_TOOL(OBJCOPY, objcopy)
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch
deleted file mode 100644
index 67a4f8e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 48e7c0f5b2f5d777a16ac5584dc4f50f1dfa832c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 12:27:53 -0700
-Subject: [PATCH 08/12] Do not enable nss tests
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 3cc8f3451..df20a9a11 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -5290,6 +5290,7 @@ EXTRA_DIST += \
- 	src/timesync/timesyncd.conf.in
- 
- # ------------------------------------------------------------------------------
-+if ENABLE_NSS_SYSTEMD
- test_nss_SOURCES = \
- 	src/test/test-nss.c
- 
-@@ -5302,7 +5303,6 @@ manual_tests += \
- 	test-nss
- 
- # ------------------------------------------------------------------------------
--if ENABLE_NSS_SYSTEMD
- libnss_systemd_la_SOURCES = \
- 	src/nss-systemd/nss-systemd.sym \
- 	src/nss-systemd/nss-systemd.c
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch
new file mode 100644
index 0000000..15d7e02
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -0,0 +1,377 @@
+From 5cce7626f33e92f624ac06b613125813fb47d445 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:05:39 -0800
+Subject: [PATCH 08/31] Revert "udev: remove userspace firmware loading
+ support"
+
+This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
+Userspace firmware loading support is needed for Linux < 3.7.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ README                           |   4 +-
+ TODO                             |   1 +
+ meson.build                      |   9 +++
+ meson_options.txt                |   2 +
+ rules/meson.build                |   4 +
+ src/udev/meson.build             |   4 +
+ src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
+ src/udev/udev-builtin.c          |   3 +
+ src/udev/udev.h                  |   6 ++
+ src/udev/udevd.c                 |  12 +++
+ 10 files changed, 197 insertions(+), 2 deletions(-)
+ create mode 100644 src/udev/udev-builtin-firmware.c
+
+diff --git a/README b/README
+index 8807e5cfe..bfd7a35de 100644
+--- a/README
++++ b/README
+@@ -58,8 +58,8 @@ REQUIREMENTS:
+         Legacy hotplug slows down the system and confuses udev:
+           CONFIG_UEVENT_HELPER_PATH=""
+ 
+-        Userspace firmware loading is not supported and should
+-        be disabled in the kernel:
++        Userspace firmware loading is deprecated, will go away, and
++        sometimes causes problems:
+           CONFIG_FW_LOADER_USER_HELPER=n
+ 
+         Some udev rules and virtualization detection relies on it:
+diff --git a/TODO b/TODO
+index a77028c7b..39e72d7ec 100644
+--- a/TODO
++++ b/TODO
+@@ -783,6 +783,7 @@ Features:
+ * initialize the hostname from the fs label of /, if /etc/hostname does not exist?
+ 
+ * udev:
++  - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
+   - move to LGPL
+   - kill scsi_id
+   - add trigger --subsystem-match=usb/usb_device device
+diff --git a/meson.build b/meson.build
+index 918101d6b..9c25022a4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -72,6 +72,12 @@ conf.set10('HAVE_SYSV_COMPAT', have,
+            description : 'SysV init scripts and rcN.d links are supported')
+ m4_defines += have ? ['-DHAVE_SYSV_COMPAT'] : []
+ 
++firmware_path = get_option('firmware-path')
++have = firmware_path != ''
++conf.set10('HAVE_FIRMWARE', have,
++           description : 'Userspace firmware loading is supported')
++m4_defines += have ? ['-DHAVE_FIRMWARE'] : []
++
+ # join_paths ignore the preceding arguments if an absolute component is
+ # encountered, so this should canonicalize various paths when they are
+ # absolute or relative.
+@@ -178,6 +184,7 @@ conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH',                    join_paths(pkgsysc
+ conf.set_quoted('SYSTEM_DATA_UNIT_PATH',                      systemunitdir)
+ conf.set_quoted('SYSTEM_SYSVINIT_PATH',                       sysvinit_path)
+ conf.set_quoted('SYSTEM_SYSVRCND_PATH',                       sysvrcnd_path)
++conf.set_quoted('FIRMWARE_PATH',                              firmware_path)
+ conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START',                 get_option('rc-local'))
+ conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP',                  get_option('halt-local'))
+ conf.set_quoted('USER_CONFIG_UNIT_PATH',                      join_paths(pkgsysconfdir, 'user'))
+@@ -258,6 +265,7 @@ substs.set('SYSTEMCTL',                                       join_paths(rootbin
+ substs.set('RANDOM_SEED',                                     join_paths(randomseeddir, 'random-seed'))
+ substs.set('SYSTEM_SYSVINIT_PATH',                            sysvinit_path)
+ substs.set('SYSTEM_SYSVRCND_PATH',                            sysvrcnd_path)
++substs.set('FIRMWARE_PATH',                                   firmware_path)
+ substs.set('RC_LOCAL_SCRIPT_PATH_START',                      get_option('rc-local'))
+ substs.set('RC_LOCAL_SCRIPT_PATH_STOP',                       get_option('halt-local'))
+ 
+@@ -2715,6 +2723,7 @@ status = [
+         'roothome directory:                @0@'.format(roothomedir),
+         'SysV init scripts:                 @0@'.format(sysvinit_path),
+         'SysV rc?.d directories:            @0@'.format(sysvrcnd_path),
++        'firmware path:                     @0@'.format(firmware_path),
+         'PAM modules directory:             @0@'.format(pamlibdir),
+         'PAM configuration directory:       @0@'.format(pamconfdir),
+         'RPM macros directory:              @0@'.format(rpmmacrosdir),
+diff --git a/meson_options.txt b/meson_options.txt
+index 0b24f0e0f..92d25fa35 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -108,6 +108,8 @@ option('tmpfiles', type : 'boolean',
+        description : 'support for tmpfiles.d')
+ option('importd', type : 'combo', choices : ['auto', 'true', 'false'],
+        description : 'install the systemd-importd daemon')
++option('firmware-path', type : 'string', value : '',
++       description : 'Firmware search path')
+ option('hwdb', type : 'boolean',
+        description : 'support for the hardware database')
+ option('rfkill', type : 'boolean',
+diff --git a/rules/meson.build b/rules/meson.build
+index e253b9f59..5eee5fbca 100644
+--- a/rules/meson.build
++++ b/rules/meson.build
+@@ -41,6 +41,10 @@ rules = files('''
+ install_data(rules,
+              install_dir : udevrulesdir)
+ 
++if conf.get('HAVE_FIRMWARE') == 1
++        install_data('50-firmware.rules', install_dir : udevrulesdir)
++endif
++
+ all_rules = rules
+ 
+ rules_in = '''
+diff --git a/src/udev/meson.build b/src/udev/meson.build
+index de2fd2d9c..b6b0ca006 100644
+--- a/src/udev/meson.build
++++ b/src/udev/meson.build
+@@ -67,6 +67,10 @@ if conf.get('HAVE_ACL') == 1
+                                  sd_login_c]
+ endif
+ 
++if conf.get('HAVE_FIRMWARE') == 1
++        libudev_core_sources += ['udev-builtin-firmware.c']
++endif
++
+ ############################################################
+ 
+ generate_keyboard_keys_list = find_program('generate-keyboard-keys-list.sh')
+diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
+new file mode 100644
+index 000000000..bd8c2fb96
+--- /dev/null
++++ b/src/udev/udev-builtin-firmware.c
+@@ -0,0 +1,154 @@
++/*
++ * firmware - Kernel firmware loader
++ *
++ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
++ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
++ *
++ * 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:*
++ */
++
++#include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <getopt.h>
++#include <errno.h>
++#include <stdbool.h>
++#include <sys/utsname.h>
++#include <sys/stat.h>
++
++#include "udev.h"
++
++static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
++        FILE *ldfile;
++
++        ldfile = fopen(loadpath, "we");
++        if (ldfile == NULL) {
++                log_error("error: can not open '%s'", loadpath);
++                return false;
++        };
++        fprintf(ldfile, "%s\n", state);
++        fclose(ldfile);
++        return true;
++}
++
++static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
++        char *buf;
++        FILE *fsource = NULL, *ftarget = NULL;
++        bool ret = false;
++
++        buf = malloc(size);
++        if (buf == NULL) {
++                log_error("No memory available to load firmware file");
++                return false;
++        }
++
++        log_debug("writing '%s' (%zi) to '%s'", source, size, target);
++
++        fsource = fopen(source, "re");
++        if (fsource == NULL)
++                goto exit;
++        ftarget = fopen(target, "we");
++        if (ftarget == NULL)
++                goto exit;
++        if (fread(buf, size, 1, fsource) != 1)
++                goto exit;
++        if (fwrite(buf, size, 1, ftarget) == 1)
++                ret = true;
++exit:
++        if (ftarget != NULL)
++                fclose(ftarget);
++        if (fsource != NULL)
++                fclose(fsource);
++        free(buf);
++        return ret;
++}
++
++static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
++        struct udev *udev = udev_device_get_udev(dev);
++        static const char *searchpath[] = { FIRMWARE_PATH };
++        char loadpath[UTIL_PATH_SIZE];
++        char datapath[UTIL_PATH_SIZE];
++        char fwpath[UTIL_PATH_SIZE];
++        const char *firmware;
++        FILE *fwfile = NULL;
++        struct utsname kernel;
++        struct stat statbuf;
++        unsigned int i;
++        int rc = EXIT_SUCCESS;
++
++        firmware = udev_device_get_property_value(dev, "FIRMWARE");
++        if (firmware == NULL) {
++                log_error("firmware parameter missing");
++                rc = EXIT_FAILURE;
++                goto exit;
++        }
++
++        /* lookup firmware file */
++        uname(&kernel);
++        for (i = 0; i < ELEMENTSOF(searchpath); i++) {
++                strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
++                fwfile = fopen(fwpath, "re");
++                if (fwfile != NULL)
++                        break;
++
++                strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
++                fwfile = fopen(fwpath, "re");
++                if (fwfile != NULL)
++                        break;
++        }
++
++        strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
++
++        if (fwfile == NULL) {
++                log_debug("did not find firmware file '%s'", firmware);
++                rc = EXIT_FAILURE;
++                /*
++                 * Do not cancel the request in the initrd, the real root might have
++                 * the firmware file and the 'coldplug' run in the real root will find
++                 * this pending request and fulfill or cancel it.
++                 * */
++                if (!in_initrd())
++                        set_loading(udev, loadpath, "-1");
++                goto exit;
++        }
++
++        if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
++                if (!in_initrd())
++                        set_loading(udev, loadpath, "-1");
++                rc = EXIT_FAILURE;
++                goto exit;
++        }
++
++        if (!set_loading(udev, loadpath, "1"))
++                goto exit;
++
++        strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
++        if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
++                log_error("error sending firmware '%s' to device", firmware);
++                set_loading(udev, loadpath, "-1");
++                rc = EXIT_FAILURE;
++                goto exit;
++        };
++
++        set_loading(udev, loadpath, "0");
++exit:
++        if (fwfile)
++                fclose(fwfile);
++        return rc;
++}
++
++const struct udev_builtin udev_builtin_firmware = {
++        .name = "firmware",
++        .cmd = builtin_firmware,
++        .help = "kernel firmware loader",
++        .run_once = true,
++};
+diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
+index db2b6874f..ccd88638c 100644
+--- a/src/udev/udev-builtin.c
++++ b/src/udev/udev-builtin.c
+@@ -32,6 +32,9 @@ static const struct udev_builtin *builtins[] = {
+         [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
+ #endif
+         [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
++#if HAVE_FIRMWARE
++        [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
++#endif
+         [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
+         [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
+         [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
+diff --git a/src/udev/udev.h b/src/udev/udev.h
+index ea11c2d29..c47dd3d88 100644
+--- a/src/udev/udev.h
++++ b/src/udev/udev.h
+@@ -151,6 +151,9 @@ enum udev_builtin_cmd {
+         UDEV_BUILTIN_BLKID,
+ #endif
+         UDEV_BUILTIN_BTRFS,
++#if HAVE_FIRMWARE
++        UDEV_BUILTIN_FIRMWARE,
++#endif
+         UDEV_BUILTIN_HWDB,
+         UDEV_BUILTIN_INPUT_ID,
+         UDEV_BUILTIN_KEYBOARD,
+@@ -179,6 +182,9 @@ struct udev_builtin {
+ extern const struct udev_builtin udev_builtin_blkid;
+ #endif
+ extern const struct udev_builtin udev_builtin_btrfs;
++#if HAVE_FIRMWARE
++extern const struct udev_builtin udev_builtin_firmware;
++#endif
+ extern const struct udev_builtin udev_builtin_hwdb;
+ extern const struct udev_builtin udev_builtin_input_id;
+ extern const struct udev_builtin udev_builtin_keyboard;
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index 5c757d513..2f3313007 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -127,6 +127,9 @@ struct event {
+         bool is_block;
+         sd_event_source *timeout_warning;
+         sd_event_source *timeout;
++#if HAVE_FIRMWARE
++        bool nodelay;
++#endif
+ };
+ 
+ static void event_queue_cleanup(Manager *manager, enum event_state type);
+@@ -609,6 +612,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
+         event->devnum = udev_device_get_devnum(dev);
+         event->is_block = streq("block", udev_device_get_subsystem(dev));
+         event->ifindex = udev_device_get_ifindex(dev);
++#if HAVE_FIRMWARE
++        if (streq(udev_device_get_subsystem(dev), "firmware"))
++                event->nodelay = true;
++#endif
+ 
+         log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
+              udev_device_get_action(dev), udev_device_get_subsystem(dev));
+@@ -692,6 +699,11 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
+                         return true;
+                 }
+ 
++#if HAVE_FIRMWARE
++                /* allow to bypass the dependency tracking */
++                if (event->nodelay)
++                        continue;
++#endif
+                 /* parent device event found */
+                 if (event->devpath[common] == '/') {
+                         event->delaying_seqnum = loop_event->seqnum;
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch
new file mode 100644
index 0000000..1b14369
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch
@@ -0,0 +1,41 @@
+From ffdf9cb6ba0d932b81933d824f23a878c313a8d4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 Feb 2016 05:59:01 +0000
+Subject: [PATCH 09/31] remove duplicate include uchar.h
+
+missing.h already includes it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+---
+ src/basic/escape.h | 1 -
+ src/basic/utf8.h   | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/src/basic/escape.h b/src/basic/escape.h
+index de89f43a8..9921ccbbd 100644
+--- a/src/basic/escape.h
++++ b/src/basic/escape.h
+@@ -24,7 +24,6 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <sys/types.h>
+-#include <uchar.h>
+ 
+ #include "string-util.h"
+ #include "missing.h"
+diff --git a/src/basic/utf8.h b/src/basic/utf8.h
+index b0a7485ae..fa06d2906 100644
+--- a/src/basic/utf8.h
++++ b/src/basic/utf8.h
+@@ -23,7 +23,6 @@
+ #include <stdbool.h>
+ #include <stddef.h>
+ #include <stdint.h>
+-#include <uchar.h>
+ 
+ #include "macro.h"
+ #include "missing.h"
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch
deleted file mode 100644
index d3694dc..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 75f4e7f167de533a160ee1af2a03fba4c5a5ffc6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 12:33:22 -0700
-Subject: [PATCH 09/12] test-hexdecoct.c: Include missing.h form strndupa
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/test/test-hexdecoct.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
-index fcae427e7..5eb5e2ed7 100644
---- a/src/test/test-hexdecoct.c
-+++ b/src/test/test-hexdecoct.c
-@@ -21,6 +21,7 @@
- #include "hexdecoct.h"
- #include "macro.h"
- #include "string-util.h"
-+#include "missing.h"
- 
- static void test_hexchar(void) {
-         assert_se(hexchar(0xa) == 'a');
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch
new file mode 100644
index 0000000..9a44b54
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch
@@ -0,0 +1,45 @@
+From ea4caaa1c6a6dc682bb04548ab05c5c73d0b45d6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 15:34:52 +0800
+Subject: [PATCH 10/31] check for uchar.h in meson.build
+
+Use #if HAVE_UCHAR_H to include uchar.h conditionally.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build         | 1 +
+ src/basic/missing.h | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 9c25022a4..94a16712b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -623,6 +623,7 @@ foreach header : ['crypt.h',
+                   'sys/auxv.h',
+                   'valgrind/memcheck.h',
+                   'valgrind/valgrind.h',
++                  'uchar.h',
+                  ]
+ 
+         conf.set10('HAVE_' + header.underscorify().to_upper(),
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 39c1fb700..84d6d9167 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -38,7 +38,9 @@
+ #include <sys/resource.h>
+ #include <sys/socket.h>
+ #include <sys/syscall.h>
++#if HAVE_UCHAR_H
+ #include <uchar.h>
++#endif
+ #include <unistd.h>
+ 
+ #if HAVE_AUDIT
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
deleted file mode 100644
index 8828d6e..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 52726be92e2b841f744a96c378cc872ae0033a2b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 5 Sep 2015 06:31:47 +0000
-Subject: [PATCH 10/19] implment systemd-sysv-install for OE
-
-Use update-rc.d for enabling/disabling and status command
-to check the status of the sysv service
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
-index a53a3e6..5d877b0 100755
---- a/src/systemctl/systemd-sysv-install.SKELETON
-+++ b/src/systemctl/systemd-sysv-install.SKELETON
-@@ -30,17 +30,17 @@ case "$1" in
-     enable)
-         # call the command to enable SysV init script $NAME here
-         # (consider optional $ROOT)
--        echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
-+        update-rc.d -f $NAME defaults
-         ;;
-     disable)
-         # call the command to disable SysV init script $NAME here
-         # (consider optional $ROOT)
--        echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
-+        update-rc.d -f $NAME remove
-         ;;
-     is-enabled)
-         # exit with 0 if $NAME is enabled, non-zero if it is disabled
-         # (consider optional $ROOT)
--        echo "IMPLEMENT ME: checking SysV init.d script $NAME"
-+        /etc/init.d/$NAME status
-         ;;
-     *)
-         usage ;;
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
deleted file mode 100644
index 808c83a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 6e9d2bcaa6f886b2384c1c35a04e4ebc148aea68 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 23 Oct 2017 12:40:25 -0700
-Subject: [PATCH 10/12] test-sizeof.c: Disable tests for missing typedefs in
- musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/test/test-sizeof.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
-index 269adfd18..ba7855dff 100644
---- a/src/test/test-sizeof.c
-+++ b/src/test/test-sizeof.c
-@@ -18,7 +18,6 @@
- ***/
- 
- #include <stdio.h>
--
- #include "time-util.h"
- 
- /* Print information about various types. Useful when diagnosing
-@@ -48,8 +47,10 @@ int main(void) {
-         info(unsigned);
-         info(long unsigned);
-         info(long long unsigned);
-+#ifdef __GLIBC__
-         info(__syscall_ulong_t);
-         info(__syscall_slong_t);
-+#endif
- 
-         info(float);
-         info(double);
-@@ -59,7 +60,9 @@ int main(void) {
-         info(ssize_t);
-         info(time_t);
-         info(usec_t);
-+#ifdef __GLIBC__
-         info(__time_t);
-+#endif
- 
-         info(enum Enum);
-         info(enum BigEnum);
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch
deleted file mode 100644
index 7cfe829..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 2eb45f5a0a8bfb8bdca084587ad28e5001f3cc4b Mon Sep 17 00:00:00 2001
-From: Emil Renner Berthing <systemd@esmil.dk>
-Date: Thu, 18 Sep 2014 15:24:56 +0200
-Subject: [PATCH 11/12] don't use glibc-specific qsort_r
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/hwdb/hwdb.c         | 18 +++++++++++-------
- src/udev/udevadm-hwdb.c | 16 ++++++++++------
- 2 files changed, 21 insertions(+), 13 deletions(-)
-
-diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
-index 793398ca6..669b00818 100644
---- a/src/hwdb/hwdb.c
-+++ b/src/hwdb/hwdb.c
-@@ -151,13 +151,12 @@ static void trie_free(struct trie *trie) {
- 
- DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
- 
--static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
-+static struct trie *trie_node_add_value_trie;
-+static int trie_values_cmp(const void *v1, const void *v2) {
-         const struct trie_value_entry *val1 = v1;
-         const struct trie_value_entry *val2 = v2;
--        struct trie *trie = arg;
--
--        return strcmp(trie->strings->buf + val1->key_off,
--                      trie->strings->buf + val2->key_off);
-+        return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
-+                      trie_node_add_value_trie->strings->buf + val2->key_off);
- }
- 
- static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -182,7 +181,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-                         .value_off = v,
-                 };
- 
--                val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+                trie_node_add_value_trie = trie;
-+                val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+                trie_node_add_value_trie = NULL;
-+
-                 if (val) {
-                         /* At this point we have 2 identical properties on the same match-string.
-                          * Since we process files in order, we just replace the previous value.
-@@ -207,7 +209,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-         node->values[node->values_count].file_priority = file_priority;
-         node->values[node->values_count].line_number = line_number;
-         node->values_count++;
--        qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+        trie_node_add_value_trie = trie;
-+        qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+        trie_node_add_value_trie = NULL;
-         return 0;
- }
- 
-diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
-index 69b0b9025..fbd213300 100644
---- a/src/udev/udevadm-hwdb.c
-+++ b/src/udev/udevadm-hwdb.c
-@@ -128,13 +128,13 @@ static void trie_node_cleanup(struct trie_node *node) {
-         free(node);
- }
- 
--static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
-+static struct trie *trie_node_add_value_trie;
-+static int trie_values_cmp(const void *v1, const void *v2) {
-         const struct trie_value_entry *val1 = v1;
-         const struct trie_value_entry *val2 = v2;
--        struct trie *trie = arg;
- 
--        return strcmp(trie->strings->buf + val1->key_off,
--                      trie->strings->buf + val2->key_off);
-+        return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
-+                      trie_node_add_value_trie->strings->buf + val2->key_off);
- }
- 
- static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -155,7 +155,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-                         .value_off = v,
-                 };
- 
--                val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+                trie_node_add_value_trie = trie;
-+                val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+                trie_node_add_value_trie = NULL;
-                 if (val) {
-                         /* replace existing earlier key with new value */
-                         val->value_off = v;
-@@ -172,7 +174,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-         node->values[node->values_count].key_off = k;
-         node->values[node->values_count].value_off = v;
-         node->values_count++;
--        qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+        trie_node_add_value_trie = trie;
-+        qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+        trie_node_add_value_trie = NULL;
-         return 0;
- }
- 
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
deleted file mode 100644
index b01ae97..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 3f6f45578b828e414f50c6822375073e7174236a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 00:50:01 +0000
-Subject: [PATCH 11/19] nss-mymachines: Build conditionally when
- HAVE_MYHOSTNAME is set
-
-Fixes build failures when building with --disable-myhostname
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 02f4017..420e0e0 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -5146,6 +5146,7 @@ SYSTEM_UNIT_ALIASES += \
- BUSNAMES_TARGET_WANTS += \
- 	org.freedesktop.machine1.busname
- 
-+if HAVE_MYHOSTNAME
- libnss_mymachines_la_SOURCES = \
- 	src/nss-mymachines/nss-mymachines.sym \
- 	src/nss-mymachines/nss-mymachines.c
-@@ -5167,6 +5168,7 @@ rootlib_LTLIBRARIES += \
- 	libnss_mymachines.la
- 
- endif
-+endif
- 
- polkitpolicy_in_files += \
- 	src/machine/org.freedesktop.machine1.policy.in
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
new file mode 100644
index 0000000..b0923d1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
@@ -0,0 +1,39 @@
+From 60dd411e9756fc2b14c0e061ad803782b4aee874 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 15:46:05 +0800
+Subject: [PATCH 11/31] socket-util: don't fail if libc doesn't support IDN
+
+Upstream-Status: Pending
+
+Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/socket-util.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
+index 2c70cade1..67aedadd4 100644
+--- a/src/basic/socket-util.c
++++ b/src/basic/socket-util.c
+@@ -50,6 +50,16 @@
+ #include "utf8.h"
+ #include "util.h"
+ 
++/* Don't fail if the standard library
++ * doesn't support IDN */
++#ifndef NI_IDN
++#define NI_IDN 0
++#endif
++
++#ifndef NI_IDN_USE_STD3_ASCII_RULES
++#define NI_IDN_USE_STD3_ASCII_RULES 0
++#endif
++
+ #if ENABLE_IDN
+ #  define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
+ #else
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
deleted file mode 100644
index 1a6db65..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 9621618c701a2d5eb3e26f40c68354d4dfb8f872 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 10 Oct 2017 14:33:30 -0700
-Subject: [PATCH 12/12] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
-
-Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right
-thing to do and it's not portable (not supported by musl). See:
-
-  http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
-  http://www.openwall.com/lists/musl/2015/02/05/2
-
-Note that laccess() is never passing AT_EACCESS so a lot of the
-discussion in the links above doesn't apply. Note also that
-(currently) all systemd callers of laccess() pass mode as F_OK, so
-only check for existence of a file, not access permissions.
-Therefore, in this case, the only distiction between faccessat()
-with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
-for broken symlinks; laccess() on a broken symlink will succeed with
-(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
-
-The laccess() macros was added to systemd some time ago and it's not
-clear if or why it needs to return success for broken symlinks. Maybe
-just historical and not actually necessary or desired behaviour?
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/fs-util.h          | 22 +++++++++++++++++++++-
- src/shared/base-filesystem.c |  6 +++---
- 2 files changed, 24 insertions(+), 4 deletions(-)
-
-diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
-index 094acf179..cdbc0ae72 100644
---- a/src/basic/fs-util.h
-+++ b/src/basic/fs-util.h
-@@ -48,7 +48,27 @@ int fchmod_umask(int fd, mode_t mode);
- 
- int fd_warn_permissions(const char *path, int fd);
- 
--#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
-+/*
-+   Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
-+   do and it's not portable (not supported by musl). See:
-+
-+     http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
-+     http://www.openwall.com/lists/musl/2015/02/05/2
-+
-+   Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
-+   the links above doesn't apply. Note also that (currently) all systemd callers
-+   of laccess() pass mode as F_OK, so only check for existence of a file, not
-+   access permissions. Therefore, in this case, the only distiction between
-+   faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
-+   behaviour for broken symlinks; laccess() on a broken symlink will succeed
-+   with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
-+
-+   The laccess() macros was added to systemd some time ago and it's not clear if
-+   or why it needs to return success for broken symlinks. Maybe just historical
-+   and not actually necessary or desired behaviour?
-+*/
-+
-+#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0)
- 
- int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
- int touch(const char *path);
-diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
-index 903a18786..2f6052ee7 100644
---- a/src/shared/base-filesystem.c
-+++ b/src/shared/base-filesystem.c
-@@ -70,7 +70,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
-                 return log_error_errno(errno, "Failed to open root file system: %m");
- 
-         for (i = 0; i < ELEMENTSOF(table); i ++) {
--                if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
-+                if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
-                         continue;
- 
-                 if (table[i].target) {
-@@ -78,7 +78,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
- 
-                         /* check if one of the targets exists */
-                         NULSTR_FOREACH(s, table[i].target) {
--                                if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
-+                                if (faccessat(fd, s, F_OK, 0) < 0)
-                                         continue;
- 
-                                 /* check if a specific file exists at the target path */
-@@ -89,7 +89,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
-                                         if (!p)
-                                                 return log_oom();
- 
--                                        if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
-+                                        if (faccessat(fd, p, F_OK, 0) < 0)
-                                                 continue;
-                                 }
- 
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch
new file mode 100644
index 0000000..7207863
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch
@@ -0,0 +1,43 @@
+From 406a4c8692316e8c7e14c78f9a802689be304a95 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 17 Nov 2017 09:46:00 +0800
+Subject: [PATCH 12/31] rules: watch metadata changes in ide devices
+
+Formatting IDE storage does not trigger "change" uevents. As a result
+clients using udev API don't get any updates afterwards and get outdated
+information about the device.
+...
+root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
+Creating filesystem with 262144 4k blocks and 65536 inodes
+Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+
+root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory
+...
+Include hd* in a match for watch option assignment.
+
+Upstream-Status: Denied
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
+is deprecated.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ rules/60-block.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-block.rules b/rules/60-block.rules
+index 343fc06f8..b5237dac4 100644
+--- a/rules/60-block.rules
++++ b/rules/60-block.rules
+@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
+ ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
+ 
+ # watch metadata changes, caused by tools closing the device node which was opened for writing
+-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch"
++ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|hd*", OPTIONS+="watch"
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
deleted file mode 100644
index eb380ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ab5a27040133f7cdf062ac8cfeb94e081d3567b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 19:41:13 -0800
-Subject: [PATCH 07/14] rules: whitelist hd* devices
-
-qemu by default emulates IDE and the linux-yocto kernel(s) use
-CONFIG_IDE instead of the more modern libsata, so disks appear as
-/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
-
-Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
-
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- rules/60-persistent-storage.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
-index d2745f65f..63f472be8 100644
---- a/rules/60-persistent-storage.rules
-+++ b/rules/60-persistent-storage.rules
-@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
- ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
- 
- SUBSYSTEM!="block", GOTO="persistent_storage_end"
--KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*", GOTO="persistent_storage_end"
-+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|hd*", GOTO="persistent_storage_end"
- 
- # ignore partitions that span the entire disk
- TEST=="whole_disk", GOTO="persistent_storage_end"
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
deleted file mode 100644
index aeebbfb..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From 479e1f4aa2b9f1c911a4d0dd18e222d241a978ea Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 20:35:30 -0800
-Subject: [PATCH 42/48] Make root's home directory configurable
-
-OpenEmbedded has a configurable home directory for root. Allow
-systemd to be built using its idea of what root's home directory
-should be.
-
-Upstream-Status: Denied
-Upstream wants to have a unified hierarchy where everyone is
-using the same root folder.
-https://github.com/systemd/systemd/issues/541
-
-Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- Makefile.am                | 2 ++
- configure.ac               | 7 +++++++
- src/basic/user-util.c      | 4 ++--
- src/nspawn/nspawn.c        | 4 ++--
- units/emergency.service.in | 4 ++--
- units/rescue.service.in    | 4 ++--
- 6 files changed, 17 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 1bcd932c2..c2b4a99d2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -226,6 +226,7 @@ AM_CPPFLAGS = \
- 	-DLIBDIR=\"$(libdir)\" \
- 	-DROOTLIBDIR=\"$(rootlibdir)\" \
- 	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-+	-DROOTHOMEDIR=\"$(roothomedir)\" \
- 	-I $(top_srcdir)/src \
- 	-I $(top_builddir)/src/basic \
- 	-I $(top_srcdir)/src/basic \
-@@ -6356,6 +6357,7 @@ substitutions = \
-        '|rootlibdir=$(rootlibdir)|' \
-        '|rootlibexecdir=$(rootlibexecdir)|' \
-        '|rootbindir=$(rootbindir)|' \
-+       '|roothomedir=$(roothomedir)|' \
-        '|bindir=$(bindir)|' \
-        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
-        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
-diff --git a/configure.ac b/configure.ac
-index 0354ffe6a..b53ca1f1a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1641,6 +1641,11 @@ AC_ARG_WITH([rootlibdir],
-         [with_rootlibdir=${libdir}])
- AX_NORMALIZE_PATH([with_rootlibdir])
- 
-+AC_ARG_WITH([roothomedir],
-+        AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
-+        [],
-+        [with_roothomedir=/root])
-+
- AC_ARG_WITH([pamlibdir],
-         AS_HELP_STRING([--with-pamlibdir=DIR], [directory for PAM modules]),
-         [],
-@@ -1733,6 +1738,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
- AC_SUBST([rpmmacrosdir], [$with_rpmmacrosdir])
- AC_SUBST([rootprefix], [$with_rootprefix])
- AC_SUBST([rootlibdir], [$with_rootlibdir])
-+AC_SUBST([roothomedir], [$with_roothomedir])
- 
- AC_CONFIG_FILES([
-         Makefile
-@@ -1829,6 +1835,7 @@ AC_MSG_RESULT([
-         includedir:                        ${includedir}
-         lib dir:                           ${libdir}
-         rootlib dir:                       ${with_rootlibdir}
-+        root home dir:                     ${with_roothomedir}
-         SysV init scripts:                 ${SYSTEM_SYSVINIT_PATH}
-         SysV rc?.d directories:            ${SYSTEM_SYSVRCND_PATH}
-         build Python:                      ${PYTHON}
-diff --git a/src/basic/user-util.c b/src/basic/user-util.c
-index c619dad52..662682adf 100644
---- a/src/basic/user-util.c
-+++ b/src/basic/user-util.c
-@@ -129,7 +129,7 @@ int get_user_creds(
-                         *gid = 0;
- 
-                 if (home)
--                        *home = "/root";
-+                        *home = ROOTHOMEDIR;
- 
-                 if (shell)
-                         *shell = "/bin/sh";
-@@ -389,7 +389,7 @@ int get_home_dir(char **_h) {
-         /* Hardcode home directory for root to avoid NSS */
-         u = getuid();
-         if (u == 0) {
--                h = strdup("/root");
-+                h = strdup(ROOTHOMEDIR);
-                 if (!h)
-                         return -ENOMEM;
- 
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 8a5fedd4b..7b01ec078 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -2291,7 +2291,7 @@ static int inner_child(
-         if (envp[n_env])
-                 n_env++;
- 
--        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
-+        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
-             (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
-             (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
-                 return log_oom();
-@@ -2373,7 +2373,7 @@ static int inner_child(
-         } else {
-                 if (!arg_chdir)
-                         /* If we cannot change the directory, we'll end up in /, that is expected. */
--                        (void) chdir(home ?: "/root");
-+                        (void) chdir(home ?: ROOTHOMEDIR);
- 
-                 execle("/bin/bash", "-bash", NULL, env_use);
-                 execle("/bin/sh", "-sh", NULL, env_use);
-diff --git a/units/emergency.service.in b/units/emergency.service.in
-index e9eb238b9..32588e48a 100644
---- a/units/emergency.service.in
-+++ b/units/emergency.service.in
-@@ -15,8 +15,8 @@ Conflicts=syslog.socket
- Before=shutdown.target
- 
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStart=-@rootlibexecdir@/systemd-sulogin-shell emergency
- Type=idle
- StandardInput=tty-force
-diff --git a/units/rescue.service.in b/units/rescue.service.in
-index 4ab66f485..bd9898f2c 100644
---- a/units/rescue.service.in
-+++ b/units/rescue.service.in
-@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
- Before=shutdown.target
- 
- [Service]
--Environment=HOME=/root
--WorkingDirectory=-/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=-@roothomedir@
- ExecStart=-@rootlibexecdir@/systemd-sulogin-shell rescue
- Type=idle
- StandardInput=tty-force
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch
new file mode 100644
index 0000000..9c9278d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch
@@ -0,0 +1,431 @@
+From 580d23cf0b32e36a8fb96710336ffef432b3c7ce Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:10:58 -0800
+Subject: [PATCH] add fallback parse_printf_format implementation
+
+Upstream-Status: Pending
+
+Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build                     |   1 +
+ src/basic/meson.build           |   4 +
+ src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++
+ src/basic/parse-printf-format.h |  57 +++++++++
+ src/basic/stdio-util.h          |   2 +-
+ src/journal/journal-send.c      |   2 +-
+ 6 files changed, 337 insertions(+), 2 deletions(-)
+ create mode 100644 src/basic/parse-printf-format.c
+ create mode 100644 src/basic/parse-printf-format.h
+
+diff --git a/meson.build b/meson.build
+index 94a16712b..4eabaafe8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -620,6 +620,7 @@ foreach header : ['crypt.h',
+                   'linux/btrfs.h',
+                   'linux/memfd.h',
+                   'linux/vm_sockets.h',
++                  'printf.h',
+                   'sys/auxv.h',
+                   'valgrind/memcheck.h',
+                   'valgrind/valgrind.h',
+diff --git a/src/basic/meson.build b/src/basic/meson.build
+index 44cd31ecb..435c6ee02 100644
+--- a/src/basic/meson.build
++++ b/src/basic/meson.build
+@@ -310,6 +310,10 @@ endforeach
+ 
+ basic_sources += [missing_h] + generated_gperf_headers
+ 
++if conf.get('HAVE_PRINTF_H') != 1
++        basic_sources += [files('parse-printf-format.c')]
++endif
++
+ libbasic = static_library(
+         'basic',
+         basic_sources,
+diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
+new file mode 100644
+index 000000000..49437e544
+--- /dev/null
++++ b/src/basic/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++  This file is part of systemd.
++
++  Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++  With parts from the musl C library
++  Copyright 2005-2014 Rich Felker, et al.
++
++  systemd is free software; you can redistribute it and/or modify it
++  under the terms of the GNU Lesser General Public License as published by
++  the Free Software Foundation; either version 2.1 of the License, or
++  (at your option) any later version.
++
++  systemd 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
++  Lesser General Public License for more details.
++
++  You should have received a copy of the GNU Lesser General Public License
++  along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++        do {
++                if (*fmt == '\0')
++                        return fmt;
++        } while (*fmt++ != '%');
++        return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++        for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++                /* do nothing */;
++        return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++        const char *p = fmt;
++        size_t val = 0;
++
++        if (*p < '1' || *p > '9')
++                return fmt;
++        do {
++                val = 10*val + (*p++ - '0');
++        } while (*p >= '0' && *p <= '9');
++
++        if (*p != '$')
++                return fmt;
++        *arg = val;
++        return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++        while (1) {
++                switch (*fmt) {
++                case '#':
++                case '0':
++                case '-':
++                case ' ':
++                case '+':
++                case '\'':
++                case 'I':
++                        fmt++;
++                        continue;
++                }
++                return fmt;
++        }
++}
++
++enum state {
++        BARE,
++        LPRE,
++        LLPRE,
++        HPRE,
++        HHPRE,
++        BIGLPRE,
++        ZTPRE,
++        JPRE,
++        STOP
++};
++
++enum type {
++        NONE,
++        PTR,
++        INT,
++        UINT,
++        ULLONG,
++        LONG,
++        ULONG,
++        SHORT,
++        USHORT,
++        CHAR,
++        UCHAR,
++        LLONG,
++        SIZET,
++        IMAX,
++        UMAX,
++        PDIFF,
++        UIPTR,
++        DBL,
++        LDBL,
++        MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++        [NONE]   = PA_INT,
++        [PTR]    = PA_POINTER,
++        [INT]    = PA_INT,
++        [UINT]   = PA_INT,
++        [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++        [LONG]   = PA_INT | PA_FLAG_LONG,
++        [ULONG]  = PA_INT | PA_FLAG_LONG,
++        [SHORT]  = PA_INT | PA_FLAG_SHORT,
++        [USHORT] = PA_INT | PA_FLAG_SHORT,
++        [CHAR]   = PA_CHAR,
++        [UCHAR]  = PA_CHAR,
++        [LLONG]  = PA_INT | PA_FLAG_LONG_LONG,
++        [SIZET]  = PA_INT | PA_FLAG_LONG,
++        [IMAX]   = PA_INT | PA_FLAG_LONG_LONG,
++        [UMAX]   = PA_INT | PA_FLAG_LONG_LONG,
++        [PDIFF]  = PA_INT | PA_FLAG_LONG_LONG,
++        [UIPTR]  = PA_INT | PA_FLAG_LONG,
++        [DBL]    = PA_DOUBLE,
++        [LDBL]   = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++        { /* 0: bare types */
++                S('d') = E(INT), S('i') = E(INT),
++                S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++                S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL),  S('a') = E(DBL),
++                S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL),  S('A') = E(DBL),
++                S('c') = E(CHAR),S('C') = E(INT),
++                S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++                S('m') = E(NONE),
++                S('l') = LPRE,   S('h') = HPRE, S('L') = BIGLPRE,
++                S('z') = ZTPRE,  S('j') = JPRE, S('t') = ZTPRE
++        }, { /* 1: l-prefixed */
++                S('d') = E(LONG), S('i') = E(LONG),
++                S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++                S('e') = E(DBL),  S('f') = E(DBL),  S('g') = E(DBL),  S('a') = E(DBL),
++                S('E') = E(DBL),  S('F') = E(DBL),  S('G') = E(DBL),  S('A') = E(DBL),
++                S('c') = E(INT),  S('s') = E(PTR),  S('n') = E(PTR),
++                S('l') = LLPRE
++        }, { /* 2: ll-prefixed */
++                S('d') = E(LLONG), S('i') = E(LLONG),
++                S('o') = E(ULLONG),S('u') = E(ULLONG),
++                S('x') = E(ULLONG),S('X') = E(ULLONG),
++                S('n') = E(PTR)
++        }, { /* 3: h-prefixed */
++                S('d') = E(SHORT), S('i') = E(SHORT),
++                S('o') = E(USHORT),S('u') = E(USHORT),
++                S('x') = E(USHORT),S('X') = E(USHORT),
++                S('n') = E(PTR),
++                S('h') = HHPRE
++        }, { /* 4: hh-prefixed */
++                S('d') = E(CHAR), S('i') = E(CHAR),
++                S('o') = E(UCHAR),S('u') = E(UCHAR),
++                S('x') = E(UCHAR),S('X') = E(UCHAR),
++                S('n') = E(PTR)
++        }, { /* 5: L-prefixed */
++                S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++                S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++                S('n') = E(PTR)
++        }, { /* 6: z- or t-prefixed (assumed to be same size) */
++                S('d') = E(PDIFF),S('i') = E(PDIFF),
++                S('o') = E(SIZET),S('u') = E(SIZET),
++                S('x') = E(SIZET),S('X') = E(SIZET),
++                S('n') = E(PTR)
++        }, { /* 7: j-prefixed */
++                S('d') = E(IMAX), S('i') = E(IMAX),
++                S('o') = E(UMAX), S('u') = E(UMAX),
++                S('x') = E(UMAX), S('X') = E(UMAX),
++                S('n') = E(PTR)
++        }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++        size_t i = 0;
++        size_t last = 0;
++
++        memset(types, 0, n);
++
++        while (1) {
++                size_t arg;
++                unsigned int state;
++
++                fmt = consume_nonarg(fmt);
++                if (*fmt == '\0')
++                        break;
++                if (*fmt == '%') {
++                        fmt++;
++                        continue;
++                }
++                arg = 0;
++                fmt = consume_argn(fmt, &arg);
++                /* flags */
++                fmt = consume_flags(fmt);
++                /* width */
++                if (*fmt == '*') {
++                        size_t warg = 0;
++                        fmt = consume_argn(fmt+1, &warg);
++                        if (warg == 0)
++                                warg = ++i;
++                        if (warg > last)
++                                last = warg;
++                        if (warg <= n && types[warg-1] == NONE)
++                                types[warg-1] = INT;
++                } else
++                        fmt = consume_num(fmt);
++                /* precision */
++                if (*fmt == '.') {
++                        fmt++;
++                        if (*fmt == '*') {
++                                size_t parg = 0;
++                                fmt = consume_argn(fmt+1, &parg);
++                                if (parg == 0)
++                                        parg = ++i;
++                                if (parg > last)
++                                        last = parg;
++                                if (parg <= n && types[parg-1] == NONE)
++                                        types[parg-1] = INT;
++                        } else {
++                                if (*fmt == '-')
++                                        fmt++;
++                                fmt = consume_num(fmt);
++                        }
++                }
++                /* length modifier and conversion specifier */
++                state = BARE;
++                do {
++                        unsigned char c = *fmt++;
++
++                        if (c < 'A' || c > 'z')
++                                continue;
++                        state = states[state]S(c);
++                        if (state == 0)
++                                continue;
++                } while (state < STOP);
++
++                if (state == E(NONE))
++                        continue;
++
++                if (arg == 0)
++                        arg = ++i;
++                if (arg > last)
++                        last = arg;
++                if (arg <= n)
++                        types[arg-1] = state - STOP;
++        }
++
++        if (last > n)
++                last = n;
++        for (i = 0; i < last; i++)
++                types[i] = pa_types[types[i]];
++
++        return last;
++}
+diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
+new file mode 100644
+index 000000000..47be7522d
+--- /dev/null
++++ b/src/basic/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++  This file is part of systemd.
++
++  Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++  With parts from the GNU C Library
++  Copyright 1991-2014 Free Software Foundation, Inc.
++
++  systemd is free software; you can redistribute it and/or modify it
++  under the terms of the GNU Lesser General Public License as published by
++  the Free Software Foundation; either version 2.1 of the License, or
++  (at your option) any later version.
++
++  systemd 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
++  Lesser General Public License for more details.
++
++  You should have received a copy of the GNU Lesser General Public License
++  along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#if HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum {				/* C type: */
++  PA_INT,			/* int */
++  PA_CHAR,			/* int, cast to char */
++  PA_WCHAR,			/* wide char */
++  PA_STRING,			/* const char *, a '\0'-terminated string */
++  PA_WSTRING,			/* const wchar_t *, wide character string */
++  PA_POINTER,			/* void * */
++  PA_FLOAT,			/* float */
++  PA_DOUBLE,			/* double */
++  PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'.  */
++#define	PA_FLAG_MASK		0xff00
++#define	PA_FLAG_LONG_LONG	(1 << 8)
++#define	PA_FLAG_LONG_DOUBLE	PA_FLAG_LONG_LONG
++#define	PA_FLAG_LONG		(1 << 9)
++#define	PA_FLAG_SHORT		(1 << 10)
++#define	PA_FLAG_PTR		(1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
+index dbfafba26..8038380d6 100644
+--- a/src/basic/stdio-util.h
++++ b/src/basic/stdio-util.h
+@@ -20,12 +20,12 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ 
+ #include "macro.h"
++#include "parse-printf-format.h"
+ 
+ #define xsprintf(buf, fmt, ...) \
+         assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
+diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
+index 73329ba02..70bb9e0e8 100644
+--- a/src/journal/journal-send.c
++++ b/src/journal/journal-send.c
+@@ -20,7 +20,6 @@
+ 
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <printf.h>
+ #include <stddef.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+@@ -39,6 +38,7 @@
+ #include "stdio-util.h"
+ #include "string-util.h"
+ #include "util.h"
++#include "parse-printf-format.h"
+ 
+ #define SNDBUF_SIZE (8*1024*1024)
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
deleted file mode 100644
index e219981..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4b6733544beb662a0f77310302fae1fb7b76d167 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 12 Sep 2015 18:53:31 +0000
-Subject: [PATCH 13/13] comparison_fn_t is glibc specific, use raw signature in
- function pointer
-
-make it work with musl where comparison_fn_t is not provided
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/basic/util.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/basic/util.h b/src/basic/util.h
-index c7da6c39b..87f62b891 100644
---- a/src/basic/util.h
-+++ b/src/basic/util.h
-@@ -98,7 +98,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
-  * Normal qsort requires base to be nonnull. Here were require
-  * that only if nmemb > 0.
-  */
--static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
-+static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
-         if (nmemb <= 1)
-                 return;
- 
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
deleted file mode 100644
index ed7c68f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0f47cfcb16e8e40a90a9221f9995f8cd8a915c22 Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Thu, 19 Mar 2015 15:01:29 +1100
-Subject: [PATCH 14/19] Revert "rules: remove firmware loading rules"
-
-This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- rules/50-firmware.rules | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 rules/50-firmware.rules
-
-diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
-new file mode 100644
-index 0000000..f0ae684
---- /dev/null
-+++ b/rules/50-firmware.rules
-@@ -0,0 +1,3 @@
-+# do not edit this file, it will be overwritten on update
-+
-+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch
new file mode 100644
index 0000000..9f62cbb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -0,0 +1,118 @@
+From 33be9052315cc4ec8e929fa238e1f0cc0161ad07 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:15:28 -0800
+Subject: [PATCH] src/basic/missing.h: check for missing strndupa
+
+include missing.h  for definition of strndupa
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build             |  1 +
+ src/basic/missing.h     | 11 +++++++++++
+ src/basic/mkdir.c       |  1 +
+ src/basic/parse-util.c  |  1 +
+ src/basic/procfs-util.c |  1 +
+ src/shared/pager.c      |  1 +
+ src/shared/uid-range.c  |  1 +
+ 7 files changed, 17 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 4eabaafe8..12811b3f3 100644
+--- a/meson.build
++++ b/meson.build
+@@ -525,6 +525,7 @@ foreach ident : [
+         ['bpf',               '''#include <sys/syscall.h>
+                                  #include <unistd.h>'''],
+         ['explicit_bzero' ,   '''#include <string.h>'''],
++        ['strndupa' ,         '''#include <string.h>'''],
+ ]
+ 
+         have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 84d6d9167..07a8c8364 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1187,6 +1187,17 @@ struct input_mask {
+ typedef int32_t key_serial_t;
+ #endif
+ 
++#if ! HAVE_STRNDUPA
++#define strndupa(s, n) \
++  ({ \
++    const char *__old = (s); \
++    size_t __len = strnlen(__old, (n)); \
++    char *__new = (char *)alloca(__len + 1); \
++    __new[__len] = '\0'; \
++    (char *)memcpy(__new, __old, __len); \
++  })
++#endif
++
+ #ifndef KEYCTL_JOIN_SESSION_KEYRING
+ #define KEYCTL_JOIN_SESSION_KEYRING 1
+ #endif
+diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
+index de4746c86..d51518a5a 100644
+--- a/src/basic/mkdir.c
++++ b/src/basic/mkdir.c
+@@ -30,6 +30,7 @@
+ #include "path-util.h"
+ #include "stat-util.h"
+ #include "user-util.h"
++#include "missing.h"
+ 
+ int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, bool follow_symlink, mkdir_func_t _mkdir) {
+         struct stat st;
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 2c22753de..97533721d 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -33,6 +33,7 @@
+ #include "parse-util.h"
+ #include "process-util.h"
+ #include "string-util.h"
++#include "missing.h"
+ 
+ int parse_boolean(const char *v) {
+         assert(v);
+diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
+index 9bb42cc7b..23bbd9e67 100644
+--- a/src/basic/procfs-util.c
++++ b/src/basic/procfs-util.c
+@@ -9,6 +9,7 @@
+ #include "procfs-util.h"
+ #include "stdio-util.h"
+ #include "string-util.h"
++#include "missing.h"
+ 
+ int procfs_tasks_get_limit(uint64_t *ret) {
+         _cleanup_free_ char *value = NULL;
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 75db3c985..84f06bf7d 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -39,6 +39,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "terminal-util.h"
++#include "missing.h"
+ 
+ static pid_t pager_pid = 0;
+ 
+diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
+index c38b7cc98..8ec6bf08d 100644
+--- a/src/shared/uid-range.c
++++ b/src/shared/uid-range.c
+@@ -25,6 +25,7 @@
+ #include "macro.h"
+ #include "uid-range.h"
+ #include "user-util.h"
++#include "missing.h"
+ 
+ static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
+         assert(range);
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
deleted file mode 100644
index 95871bb..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
+++ /dev/null
@@ -1,351 +0,0 @@
-From 7883985a3a78677e9a1d5d61fe7fa8badf39f565 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 20:45:23 -0800
-Subject: [PATCH 10/14] Revert "udev: remove userspace firmware loading
- support"
-
-This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- Makefile.am                      |  12 +++
- README                           |   4 +-
- TODO                             |   1 +
- configure.ac                     |  18 +++++
- src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
- src/udev/udev-builtin.c          |   3 +
- src/udev/udev.h                  |   6 ++
- src/udev/udevd.c                 |  13 ++++
- 8 files changed, 209 insertions(+), 2 deletions(-)
- create mode 100644 src/udev/udev-builtin-firmware.c
-
-diff --git a/Makefile.am b/Makefile.am
-index c2b4a99d2..692d7bb95 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -3985,6 +3985,18 @@ libudev_core_la_LIBADD = \
- 	$(BLKID_LIBS) \
- 	$(KMOD_LIBS)
- 
-+libudev_core_la_CPPFLAGS = \
-+	$(AM_CPPFLAGS) \
-+	-DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-+
-+if ENABLE_FIRMWARE
-+libudev_core_la_SOURCES += \
-+	src/udev/udev-builtin-firmware.c
-+
-+dist_udevrules_DATA += \
-+	rules/50-firmware.rules
-+endif
-+
- if HAVE_KMOD
- libudev_core_la_SOURCES += \
- 	src/udev/udev-builtin-kmod.c
-diff --git a/README b/README
-index 60388eebe..e21976393 100644
---- a/README
-+++ b/README
-@@ -61,8 +61,8 @@ REQUIREMENTS:
-         Legacy hotplug slows down the system and confuses udev:
-           CONFIG_UEVENT_HELPER_PATH=""
- 
--        Userspace firmware loading is not supported and should
--        be disabled in the kernel:
-+        Userspace firmware loading is deprecated, will go away, and
-+        sometimes causes problems:
-           CONFIG_FW_LOADER_USER_HELPER=n
- 
-         Some udev rules and virtualization detection relies on it:
-diff --git a/TODO b/TODO
-index 61efa5e9f..67ccac224 100644
---- a/TODO
-+++ b/TODO
-@@ -740,6 +740,7 @@ Features:
- * initialize the hostname from the fs label of /, if /etc/hostname does not exist?
- 
- * udev:
-+  - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
-   - move to LGPL
-   - kill scsi_id
-   - add trigger --subsystem-match=usb/usb_device device
-diff --git a/configure.ac b/configure.ac
-index b53ca1f1a..1150ca50e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1522,6 +1522,23 @@ AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
- AC_ARG_ENABLE(hwdb, [AS_HELP_STRING([--disable-hwdb], [disable hardware database support])],
-        enable_hwdb=$enableval, enable_hwdb=yes)
- AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
-+AC_ARG_WITH(firmware-path,
-+       AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
-+          [Firmware search path (default="")]),
-+       [], [with_firmware_path=""])
-+OLD_IFS=$IFS
-+IFS=:
-+for i in $with_firmware_path; do
-+       if test "x${FIRMWARE_PATH}" = "x"; then
-+              FIRMWARE_PATH="\\\"${i}/\\\""
-+       else
-+              FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
-+       fi
-+done
-+IFS=$OLD_IFS
-+AC_SUBST(FIRMWARE_PATH)
-+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
-+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
- 
- # ------------------------------------------------------------------------------
- have_manpages=no
-@@ -1839,6 +1856,7 @@ AC_MSG_RESULT([
-         SysV init scripts:                 ${SYSTEM_SYSVINIT_PATH}
-         SysV rc?.d directories:            ${SYSTEM_SYSVRCND_PATH}
-         build Python:                      ${PYTHON}
-+        firmware path:                     ${FIRMWARE_PATH}
-         PAM modules dir:                   ${with_pamlibdir}
-         PAM configuration dir:             ${with_pamconfdir}
-         RPM macros dir:                    ${with_rpmmacrosdir}
-diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
-new file mode 100644
-index 000000000..bd8c2fb96
---- /dev/null
-+++ b/src/udev/udev-builtin-firmware.c
-@@ -0,0 +1,154 @@
-+/*
-+ * firmware - Kernel firmware loader
-+ *
-+ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
-+ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
-+ *
-+ * 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:*
-+ */
-+
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <stdio.h>
-+#include <getopt.h>
-+#include <errno.h>
-+#include <stdbool.h>
-+#include <sys/utsname.h>
-+#include <sys/stat.h>
-+
-+#include "udev.h"
-+
-+static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
-+        FILE *ldfile;
-+
-+        ldfile = fopen(loadpath, "we");
-+        if (ldfile == NULL) {
-+                log_error("error: can not open '%s'", loadpath);
-+                return false;
-+        };
-+        fprintf(ldfile, "%s\n", state);
-+        fclose(ldfile);
-+        return true;
-+}
-+
-+static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
-+        char *buf;
-+        FILE *fsource = NULL, *ftarget = NULL;
-+        bool ret = false;
-+
-+        buf = malloc(size);
-+        if (buf == NULL) {
-+                log_error("No memory available to load firmware file");
-+                return false;
-+        }
-+
-+        log_debug("writing '%s' (%zi) to '%s'", source, size, target);
-+
-+        fsource = fopen(source, "re");
-+        if (fsource == NULL)
-+                goto exit;
-+        ftarget = fopen(target, "we");
-+        if (ftarget == NULL)
-+                goto exit;
-+        if (fread(buf, size, 1, fsource) != 1)
-+                goto exit;
-+        if (fwrite(buf, size, 1, ftarget) == 1)
-+                ret = true;
-+exit:
-+        if (ftarget != NULL)
-+                fclose(ftarget);
-+        if (fsource != NULL)
-+                fclose(fsource);
-+        free(buf);
-+        return ret;
-+}
-+
-+static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
-+        struct udev *udev = udev_device_get_udev(dev);
-+        static const char *searchpath[] = { FIRMWARE_PATH };
-+        char loadpath[UTIL_PATH_SIZE];
-+        char datapath[UTIL_PATH_SIZE];
-+        char fwpath[UTIL_PATH_SIZE];
-+        const char *firmware;
-+        FILE *fwfile = NULL;
-+        struct utsname kernel;
-+        struct stat statbuf;
-+        unsigned int i;
-+        int rc = EXIT_SUCCESS;
-+
-+        firmware = udev_device_get_property_value(dev, "FIRMWARE");
-+        if (firmware == NULL) {
-+                log_error("firmware parameter missing");
-+                rc = EXIT_FAILURE;
-+                goto exit;
-+        }
-+
-+        /* lookup firmware file */
-+        uname(&kernel);
-+        for (i = 0; i < ELEMENTSOF(searchpath); i++) {
-+                strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
-+                fwfile = fopen(fwpath, "re");
-+                if (fwfile != NULL)
-+                        break;
-+
-+                strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
-+                fwfile = fopen(fwpath, "re");
-+                if (fwfile != NULL)
-+                        break;
-+        }
-+
-+        strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
-+
-+        if (fwfile == NULL) {
-+                log_debug("did not find firmware file '%s'", firmware);
-+                rc = EXIT_FAILURE;
-+                /*
-+                 * Do not cancel the request in the initrd, the real root might have
-+                 * the firmware file and the 'coldplug' run in the real root will find
-+                 * this pending request and fulfill or cancel it.
-+                 * */
-+                if (!in_initrd())
-+                        set_loading(udev, loadpath, "-1");
-+                goto exit;
-+        }
-+
-+        if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
-+                if (!in_initrd())
-+                        set_loading(udev, loadpath, "-1");
-+                rc = EXIT_FAILURE;
-+                goto exit;
-+        }
-+
-+        if (!set_loading(udev, loadpath, "1"))
-+                goto exit;
-+
-+        strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
-+        if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
-+                log_error("error sending firmware '%s' to device", firmware);
-+                set_loading(udev, loadpath, "-1");
-+                rc = EXIT_FAILURE;
-+                goto exit;
-+        };
-+
-+        set_loading(udev, loadpath, "0");
-+exit:
-+        if (fwfile)
-+                fclose(fwfile);
-+        return rc;
-+}
-+
-+const struct udev_builtin udev_builtin_firmware = {
-+        .name = "firmware",
-+        .cmd = builtin_firmware,
-+        .help = "kernel firmware loader",
-+        .run_once = true,
-+};
-diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
-index e6b36f124..cd9947e2a 100644
---- a/src/udev/udev-builtin.c
-+++ b/src/udev/udev-builtin.c
-@@ -31,6 +31,9 @@ static const struct udev_builtin *builtins[] = {
-         [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
- #endif
-         [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-+#ifdef HAVE_FIRMWARE
-+        [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
-+#endif
-         [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
-         [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
-         [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
-diff --git a/src/udev/udev.h b/src/udev/udev.h
-index c0cb7eae8..9f0f1cf13 100644
---- a/src/udev/udev.h
-+++ b/src/udev/udev.h
-@@ -150,6 +150,9 @@ enum udev_builtin_cmd {
-         UDEV_BUILTIN_BLKID,
- #endif
-         UDEV_BUILTIN_BTRFS,
-+#ifdef HAVE_FIRMWARE
-+        UDEV_BUILTIN_FIRMWARE,
-+#endif
-         UDEV_BUILTIN_HWDB,
-         UDEV_BUILTIN_INPUT_ID,
-         UDEV_BUILTIN_KEYBOARD,
-@@ -178,6 +181,9 @@ struct udev_builtin {
- extern const struct udev_builtin udev_builtin_blkid;
- #endif
- extern const struct udev_builtin udev_builtin_btrfs;
-+#ifdef HAVE_FIRMWARE
-+extern const struct udev_builtin udev_builtin_firmware;
-+#endif
- extern const struct udev_builtin udev_builtin_hwdb;
- extern const struct udev_builtin udev_builtin_input_id;
- extern const struct udev_builtin udev_builtin_keyboard;
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index acbddd418..20347b402 100644
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -125,6 +125,9 @@ struct event {
-         bool is_block;
-         sd_event_source *timeout_warning;
-         sd_event_source *timeout;
-+#ifdef HAVE_FIRMWARE
-+        bool nodelay;
-+#endif
- };
- 
- static inline struct event *node_to_event(struct udev_list_node *node) {
-@@ -613,6 +616,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
-         event->devnum = udev_device_get_devnum(dev);
-         event->is_block = streq("block", udev_device_get_subsystem(dev));
-         event->ifindex = udev_device_get_ifindex(dev);
-+#ifdef HAVE_FIRMWARE
-+        if (streq(udev_device_get_subsystem(dev), "firmware"))
-+                event->nodelay = true;
-+#endif
- 
-         log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
-              udev_device_get_action(dev), udev_device_get_subsystem(dev));
-@@ -698,6 +705,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
-                         return true;
-                 }
- 
-+#ifdef HAVE_FIRMWARE
-+                /* allow to bypass the dependency tracking */
-+                if (event->nodelay)
-+                        continue;
-+#endif
-+
-                 /* parent device event found */
-                 if (event->devpath[common] == '/') {
-                         event->delaying_seqnum = loop_event->seqnum;
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
new file mode 100644
index 0000000..4509476
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -0,0 +1,157 @@
+From b45cf4923c7e1f1165925e9b4d7db2108faf2eae Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 10:50:14 -0700
+Subject: [PATCH 15/31] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
+ defined
+
+If the standard library doesn't provide brace
+expansion users just won't get it.
+
+Dont use GNU GLOB extentions on non-glibc systems
+
+Conditionalize use of GLOB_ALTDIRFUNC
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/glob-util.c     | 20 +++++++++++++++++---
+ src/test/test-glob-util.c | 17 +++++++++++++++--
+ src/tmpfiles/tmpfiles.c   |  8 ++++++++
+ 3 files changed, 40 insertions(+), 5 deletions(-)
+
+diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
+index 6e80a1e23..312bb3fd1 100644
+--- a/src/basic/glob-util.c
++++ b/src/basic/glob-util.c
+@@ -28,13 +28,18 @@
+ #include "macro.h"
+ #include "path-util.h"
+ #include "strv.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
+ 
+ int safe_glob(const char *path, int flags, glob_t *pglob) {
+         int k;
+ 
++#ifdef GLOB_ALTDIRFUNC
+         /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
+         assert(!(flags & GLOB_ALTDIRFUNC));
+-
+         if (!pglob->gl_closedir)
+                 pglob->gl_closedir = (void (*)(void *)) closedir;
+         if (!pglob->gl_readdir)
+@@ -45,10 +50,13 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+                 pglob->gl_lstat = lstat;
+         if (!pglob->gl_stat)
+                 pglob->gl_stat = stat;
+-
++#endif
+         errno = 0;
++#ifdef GLOB_ALTDIRFUNC
+         k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
+-
++#else
++        k = glob(path, flags, NULL, pglob);
++#endif
+         if (k == GLOB_NOMATCH)
+                 return -ENOENT;
+         if (k == GLOB_NOSPACE)
+@@ -61,6 +69,12 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+         return 0;
+ }
+ 
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ int glob_exists(const char *path) {
+         _cleanup_globfree_ glob_t g = {};
+         int k;
+diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
+index bd2f8fcfd..a10c77427 100644
+--- a/src/test/test-glob-util.c
++++ b/src/test/test-glob-util.c
+@@ -30,6 +30,11 @@
+ #include "glob-util.h"
+ #include "macro.h"
+ #include "rm-rf.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
+ 
+ static void test_glob_exists(void) {
+         char name[] = "/tmp/test-glob_exists.XXXXXX";
+@@ -52,25 +57,33 @@ static void test_glob_exists(void) {
+ static void test_glob_no_dot(void) {
+         char template[] = "/tmp/test-glob-util.XXXXXXX";
+         const char *fn;
+-
+         _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+                 .gl_closedir = (void (*)(void *)) closedir,
+                 .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
+                 .gl_opendir = (void *(*)(const char *)) opendir,
+                 .gl_lstat = lstat,
+                 .gl_stat = stat,
++#endif
+         };
+-
+         int r;
+ 
+         assert_se(mkdtemp(template));
+ 
+         fn = strjoina(template, "/*");
++#ifdef GLOB_ALTDIRFUNC
+         r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++        r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+         assert_se(r == GLOB_NOMATCH);
+ 
+         fn = strjoina(template, "/.*");
++#ifdef GLOB_ALTDIRFUNC
+         r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
++#else
++        r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
++#endif
+         assert_se(r == GLOB_NOMATCH);
+ 
+         (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index 38cbb739c..88cc543f0 100644
+--- a/src/tmpfiles/tmpfiles.c
++++ b/src/tmpfiles/tmpfiles.c
+@@ -76,6 +76,12 @@
+ #include "umask-util.h"
+ #include "user-util.h"
+ #include "util.h"
++/* Don't fail if the standard library
++ * doesn't provide brace expansion */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ 
+ /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
+  * them in the file system. This is intended to be used to create
+@@ -1288,7 +1294,9 @@ static int item_do_children(Item *i, const char *path, action_t action) {
+ 
+ static int glob_item(Item *i, action_t action, bool recursive) {
+         _cleanup_globfree_ glob_t g = {
++#ifdef GLOB_ALTDIRFUNC
+                 .gl_opendir = (void *(*)(const char *)) opendir_nomod,
++#endif
+         };
+         int r = 0, k;
+         char **fn;
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
new file mode 100644
index 0000000..53037ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
@@ -0,0 +1,47 @@
+From efc57856f961c1f3bf016c511c53d990db8abdff Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Mon, 23 Oct 2017 11:31:03 -0700
+Subject: [PATCH 16/31] src/basic/missing.h: check for missing __compar_fn_t
+ typedef
+
+include missing.h for missing __compar_fn_t
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/missing.h | 5 +++++
+ src/basic/strbuf.c  | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 07a8c8364..1aee3346a 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1162,6 +1162,11 @@ struct input_mask {
+ #define RENAME_NOREPLACE (1 << 0)
+ #endif
+ 
++#ifndef __COMPAR_FN_T
++#define __COMPAR_FN_T
++typedef int (*__compar_fn_t)(const void *, const void *);
++#endif
++
+ #ifndef KCMP_FILE
+ #define KCMP_FILE 0
+ #endif
+diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c
+index 8befffa66..bcb860f95 100644
+--- a/src/basic/strbuf.c
++++ b/src/basic/strbuf.c
+@@ -24,6 +24,7 @@
+ 
+ #include "alloc-util.h"
+ #include "strbuf.h"
++#include "missing.h"
+ 
+ /*
+  * Strbuf stores given strings in a single continuous allocated memory
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch
new file mode 100644
index 0000000..a09cfdd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch
@@ -0,0 +1,85 @@
+From f2b0173cd9807864db1ef3b102abaa76ef37e506 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:19:12 -0800
+Subject: [PATCH 17/31] Include netinet/if_ether.h
+
+Fixes
+/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
+ struct ethhdr {
+        ^~~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/libsystemd/sd-netlink/netlink-types.c | 1 +
+ src/network/netdev/tuntap.c               | 1 +
+ src/network/networkd-brvlan.c             | 1 +
+ src/udev/net/ethtool-util.c               | 1 +
+ src/udev/udev-builtin-net_setup_link.c    | 1 +
+ 5 files changed, 5 insertions(+)
+
+diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
+index 0ee7d6f0d..ef75893a6 100644
+--- a/src/libsystemd/sd-netlink/netlink-types.c
++++ b/src/libsystemd/sd-netlink/netlink-types.c
+@@ -21,6 +21,7 @@
+ #include <netinet/in.h>
+ #include <stdint.h>
+ #include <sys/socket.h>
++#include <netinet/if_ether.h>
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/genetlink.h>
+diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c
+index 4fc9b610a..628c61c57 100644
+--- a/src/network/netdev/tuntap.c
++++ b/src/network/netdev/tuntap.c
+@@ -20,6 +20,7 @@
+ 
+ #include <errno.h>
+ #include <fcntl.h>
++#include <netinet/if_ether.h>
+ #include <linux/if_tun.h>
+ #include <net/if.h>
+ #include <netinet/if_ether.h>
+diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
+index 99dd41629..90407c9d8 100644
+--- a/src/network/networkd-brvlan.c
++++ b/src/network/networkd-brvlan.c
+@@ -19,6 +19,7 @@
+ ***/
+ 
+ #include <netinet/in.h>
++#include <netinet/if_ether.h>
+ #include <linux/if_bridge.h>
+ #include <stdbool.h>
+ 
+diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
+index 9bdaef8d9..948f89cf8 100644
+--- a/src/udev/net/ethtool-util.c
++++ b/src/udev/net/ethtool-util.c
+@@ -18,6 +18,7 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#include <netinet/if_ether.h>
+ #include <net/if.h>
+ #include <sys/ioctl.h>
+ #include <linux/ethtool.h>
+diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
+index 40158e0af..b24b3fce8 100644
+--- a/src/udev/udev-builtin-net_setup_link.c
++++ b/src/udev/udev-builtin-net_setup_link.c
+@@ -18,6 +18,7 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#include <netinet/if_ether.h>
+ #include "alloc-util.h"
+ #include "link-config.h"
+ #include "log.h"
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch
deleted file mode 100644
index d200635..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e78af874fc9f3d3af49498b8207109993d93a596 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Feb 2016 05:59:01 +0000
-Subject: [PATCH 17/19] remove duplicate include uchar.h
-
-missing.h already includes it
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
----
- src/basic/escape.h | 1 -
- src/basic/utf8.h   | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/src/basic/escape.h b/src/basic/escape.h
-index deaa4de..36d437c 100644
---- a/src/basic/escape.h
-+++ b/src/basic/escape.h
-@@ -23,7 +23,6 @@
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/types.h>
--#include <uchar.h>
- 
- #include "string-util.h"
- #include "missing.h"
-diff --git a/src/basic/utf8.h b/src/basic/utf8.h
-index f9b9c94..6ac9a3c 100644
---- a/src/basic/utf8.h
-+++ b/src/basic/utf8.h
-@@ -22,7 +22,6 @@
- #include <stdbool.h>
- #include <stddef.h>
- #include <stdint.h>
--#include <uchar.h>
- 
- #include "macro.h"
- #include "missing.h"
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch
new file mode 100644
index 0000000..ab7edf5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch
@@ -0,0 +1,47 @@
+From 690eeef9590c7ef1d9d2c31d8c1d5d8071da8c4c Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 17:21:11 +0800
+Subject: [PATCH 18/31] check for missing canonicalize_file_name
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build                 | 2 ++
+ src/basic/missing_syscall.h | 6 ++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 12811b3f3..f6515e97c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -520,6 +520,8 @@ foreach ident : [
+         ['kcmp',              '''#include <linux/kcmp.h>'''],
+         ['keyctl',            '''#include <sys/types.h>
+                                  #include <keyutils.h>'''],
++        ['canonicalize_file_name', '''#define _GNU_SOURCE
++                                      #include <stdlib.h>'''],
+         ['copy_file_range',   '''#include <sys/syscall.h>
+                                  #include <unistd.h>'''],
+         ['bpf',               '''#include <sys/syscall.h>
+diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
+index c938d0d97..308b9472b 100644
+--- a/src/basic/missing_syscall.h
++++ b/src/basic/missing_syscall.h
+@@ -31,6 +31,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
+ }
+ #endif
+ 
++#if !HAVE_CANONICALIZE_FILE_NAME
++static inline char *canonicalize_file_name(const char *path) {
++        return realpath(path, NULL);
++}
++#endif
++
+ /* ======================================================================= */
+ 
+ #if !HAVE_MEMFD_CREATE
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
deleted file mode 100644
index 067b73f..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1355457092b02a15c646fc1c72e68b694a86dd99 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Feb 2016 06:02:38 +0000
-Subject: [PATCH 12/14] check for uchar.h in configure
-
-Use ifdef to include uchar.h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
----
- configure.ac        | 1 +
- src/basic/missing.h | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 1150ca50e..60e7df5ee 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -304,6 +304,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
- 
- # ------------------------------------------------------------------------------
- 
-+AC_CHECK_HEADERS([uchar.h], [], [])
- AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
- AC_CHECK_HEADERS([linux/btrfs.h], [], [])
- AC_CHECK_HEADERS([linux/memfd.h], [], [])
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index 25a11f351..d631b7e3e 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -37,7 +37,9 @@
- #include <sys/resource.h>
- #include <sys/socket.h>
- #include <sys/syscall.h>
-+#ifdef HAVE_UCHAR_H
- #include <uchar.h>
-+#endif
- #include <unistd.h>
- 
- #ifdef HAVE_AUDIT
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch
new file mode 100644
index 0000000..16b21a0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch
@@ -0,0 +1,29 @@
+From f5f313915d78bc43eb96e2aafb8ce3cda304c277 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 26 Feb 2018 17:27:56 +0800
+Subject: [PATCH 19/31] Do not enable nss tests if nss-systemd is not enabled
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/meson.build b/src/test/meson.build
+index 1db8aa107..df3a1f5c5 100644
+--- a/src/test/meson.build
++++ b/src/test/meson.build
+@@ -646,7 +646,7 @@ tests += [
+         [['src/test/test-nss.c'],
+          [],
+          [libdl],
+-         '', 'manual'],
++         'ENABLE_NSS_SYSTEMD', 'manual'],
+ ]
+ 
+ ############################################################
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
deleted file mode 100644
index b609276..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From b7c6bfe2ec5ae426e586e1d6ecadb52a97128a3f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 9 Nov 2016 20:49:53 -0800
-Subject: [PATCH 13/14] socket-util: don't fail if libc doesn't support IDN
-
-Upstream-Status: Pending
-
-Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- src/basic/socket-util.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
-index 016e64aa0..d4658826e 100644
---- a/src/basic/socket-util.c
-+++ b/src/basic/socket-util.c
-@@ -47,6 +47,15 @@
- #include "user-util.h"
- #include "utf8.h"
- #include "util.h"
-+/* Don't fail if the standard library
-+ * doesn't support IDN */
-+#ifndef NI_IDN
-+#define NI_IDN 0
-+#endif
-+
-+#ifndef NI_IDN_USE_STD3_ASCII_RULES
-+#define NI_IDN_USE_STD3_ASCII_RULES 0
-+#endif
- 
- #ifdef ENABLE_IDN
- #  define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
new file mode 100644
index 0000000..ad49cfe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
@@ -0,0 +1,28 @@
+From d63d2fedcd80e58ee53655aeaf2836d4b0a14652 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Oct 2017 12:33:22 -0700
+Subject: [PATCH 20/31] test-hexdecoct.c: Include missing.h for strndupa
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/test-hexdecoct.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
+index 3e25a0bac..ab3e508f1 100644
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -24,6 +24,7 @@
+ #include "hexdecoct.h"
+ #include "macro.h"
+ #include "string-util.h"
++#include "missing.h"
+ 
+ static void test_hexchar(void) {
+         assert_se(hexchar(0xa) == 'a');
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
new file mode 100644
index 0000000..9c8aeca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -0,0 +1,42 @@
+From dfea4b98844795a0cd14fdaf40c67df389dbd27e Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:25:22 -0800
+Subject: [PATCH 21/31] test-sizeof.c: Disable tests for missing typedefs in
+ musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/test/test-sizeof.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
+index aed6db842..0de6fa63c 100644
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -50,8 +50,10 @@ int main(void) {
+         info(unsigned);
+         info(long unsigned);
+         info(long long unsigned);
++#ifdef __GLIBC__
+         info(__syscall_ulong_t);
+         info(__syscall_slong_t);
++#endif
+ 
+         info(float);
+         info(double);
+@@ -61,7 +63,9 @@ int main(void) {
+         info(ssize_t);
+         info(time_t);
+         info(usec_t);
++#ifdef __GLIBC__
+         info(__time_t);
++#endif
+         info(pid_t);
+         info(uid_t);
+         info(gid_t);
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch
new file mode 100644
index 0000000..a5f7442
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch
@@ -0,0 +1,105 @@
+From d343757d629402c70ca8e5eaa551deaf175c96f3 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Thu, 18 Sep 2014 15:24:56 +0200
+Subject: [PATCH 22/31] don't use glibc-specific qsort_r
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/hwdb/hwdb.c         | 18 +++++++++++-------
+ src/udev/udevadm-hwdb.c | 16 ++++++++++------
+ 2 files changed, 21 insertions(+), 13 deletions(-)
+
+diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
+index 4540260f9..81aca7a9b 100644
+--- a/src/hwdb/hwdb.c
++++ b/src/hwdb/hwdb.c
+@@ -152,13 +152,12 @@ static void trie_free(struct trie *trie) {
+ 
+ DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
+ 
+-static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
+         const struct trie_value_entry *val1 = v1;
+         const struct trie_value_entry *val2 = v2;
+-        struct trie *trie = arg;
+-
+-        return strcmp(trie->strings->buf + val1->key_off,
+-                      trie->strings->buf + val2->key_off);
++        return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
++                      trie_node_add_value_trie->strings->buf + val2->key_off);
+ }
+ 
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -183,7 +182,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+                         .value_off = v,
+                 };
+ 
+-                val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++                trie_node_add_value_trie = trie;
++                val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++                trie_node_add_value_trie = NULL;
++
+                 if (val) {
+                         /* At this point we have 2 identical properties on the same match-string.
+                          * Since we process files in order, we just replace the previous value.
+@@ -208,7 +210,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+         node->values[node->values_count].file_priority = file_priority;
+         node->values[node->values_count].line_number = line_number;
+         node->values_count++;
+-        qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++        trie_node_add_value_trie = trie;
++        qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++        trie_node_add_value_trie = NULL;
+         return 0;
+ }
+ 
+diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
+index ab5dc7ab6..c777e30ab 100644
+--- a/src/udev/udevadm-hwdb.c
++++ b/src/udev/udevadm-hwdb.c
+@@ -130,13 +130,13 @@ static void trie_node_cleanup(struct trie_node *node) {
+         free(node);
+ }
+ 
+-static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
+         const struct trie_value_entry *val1 = v1;
+         const struct trie_value_entry *val2 = v2;
+-        struct trie *trie = arg;
+ 
+-        return strcmp(trie->strings->buf + val1->key_off,
+-                      trie->strings->buf + val2->key_off);
++        return strcmp(trie_node_add_value_trie->strings->buf + val1->key_off,
++                      trie_node_add_value_trie->strings->buf + val2->key_off);
+ }
+ 
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -157,7 +157,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+                         .value_off = v,
+                 };
+ 
+-                val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++                trie_node_add_value_trie = trie;
++                val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++                trie_node_add_value_trie = NULL;
+                 if (val) {
+                         /* replace existing earlier key with new value */
+                         val->value_off = v;
+@@ -174,7 +176,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+         node->values[node->values_count].key_off = k;
+         node->values[node->values_count].value_off = v;
+         node->values_count++;
+-        qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++        trie_node_add_value_trie = trie;
++        qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++        trie_node_add_value_trie = NULL;
+         return 0;
+ }
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
new file mode 100644
index 0000000..09c2b5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -0,0 +1,99 @@
+From 7b802ada1207ed00ed3867b9804dd0f316641b9b Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 10 Oct 2017 14:33:30 -0700
+Subject: [PATCH 23/31] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
+
+Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right
+thing to do and it's not portable (not supported by musl). See:
+
+  http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
+  http://www.openwall.com/lists/musl/2015/02/05/2
+
+Note that laccess() is never passing AT_EACCESS so a lot of the
+discussion in the links above doesn't apply. Note also that
+(currently) all systemd callers of laccess() pass mode as F_OK, so
+only check for existence of a file, not access permissions.
+Therefore, in this case, the only distiction between faccessat()
+with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
+for broken symlinks; laccess() on a broken symlink will succeed with
+(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
+
+The laccess() macros was added to systemd some time ago and it's not
+clear if or why it needs to return success for broken symlinks. Maybe
+just historical and not actually necessary or desired behaviour?
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ src/basic/fs-util.h          | 22 +++++++++++++++++++++-
+ src/shared/base-filesystem.c |  6 +++---
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
+index 4dba1ea56..9c4b02ecc 100644
+--- a/src/basic/fs-util.h
++++ b/src/basic/fs-util.h
+@@ -50,7 +50,27 @@ int fchmod_umask(int fd, mode_t mode);
+ 
+ int fd_warn_permissions(const char *path, int fd);
+ 
+-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
++/*
++   Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
++   do and it's not portable (not supported by musl). See:
++
++     http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
++     http://www.openwall.com/lists/musl/2015/02/05/2
++
++   Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
++   the links above doesn't apply. Note also that (currently) all systemd callers
++   of laccess() pass mode as F_OK, so only check for existence of a file, not
++   access permissions. Therefore, in this case, the only distiction between
++   faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
++   behaviour for broken symlinks; laccess() on a broken symlink will succeed
++   with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
++
++   The laccess() macros was added to systemd some time ago and it's not clear if
++   or why it needs to return success for broken symlinks. Maybe just historical
++   and not actually necessary or desired behaviour?
++*/
++
++#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0)
+ 
+ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
+ int touch(const char *path);
+diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
+index 3c25aa534..574ca71c7 100644
+--- a/src/shared/base-filesystem.c
++++ b/src/shared/base-filesystem.c
+@@ -71,7 +71,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+                 return log_error_errno(errno, "Failed to open root file system: %m");
+ 
+         for (i = 0; i < ELEMENTSOF(table); i ++) {
+-                if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
++                if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
+                         continue;
+ 
+                 if (table[i].target) {
+@@ -79,7 +79,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+ 
+                         /* check if one of the targets exists */
+                         NULSTR_FOREACH(s, table[i].target) {
+-                                if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++                                if (faccessat(fd, s, F_OK, 0) < 0)
+                                         continue;
+ 
+                                 /* check if a specific file exists at the target path */
+@@ -90,7 +90,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+                                         if (!p)
+                                                 return log_oom();
+ 
+-                                        if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
++                                        if (faccessat(fd, p, F_OK, 0) < 0)
+                                                 continue;
+                                 }
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 0000000..fe7e623
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,31 @@
+From 76c71aa889155f29be1d5d2b74a2c4faa5909c8c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Sep 2015 18:53:31 +0000
+Subject: [PATCH 24/31] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+make it work with musl where comparison_fn_t is not provided
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/util.h b/src/basic/util.h
+index 9d1b10756..12db53a93 100644
+--- a/src/basic/util.h
++++ b/src/basic/util.h
+@@ -95,7 +95,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+  * Normal qsort requires base to be nonnull. Here were require
+  * that only if nmemb > 0.
+  */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
+         if (nmemb <= 1)
+                 return;
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
new file mode 100644
index 0000000..9376a8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
@@ -0,0 +1,43 @@
+From a0b1496322f4d7ce83f4fbfd2a90b91d0721f643 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 24 Oct 2017 23:08:24 -0700
+Subject: [PATCH 25/31] Define _PATH_WTMPX and _PATH_UTMPX if not defined
+
+Musl needs these defines
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/shared/utmp-wtmp.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
+index cab1cd6a2..f5eedac18 100644
+--- a/src/shared/utmp-wtmp.c
++++ b/src/shared/utmp-wtmp.c
+@@ -28,6 +28,7 @@
+ #include <sys/time.h>
+ #include <sys/utsname.h>
+ #include <unistd.h>
++#include <utmp.h>
+ #include <utmpx.h>
+ 
+ #include "alloc-util.h"
+@@ -42,6 +43,13 @@
+ #include "util.h"
+ #include "utmp-wtmp.h"
+ 
++#if defined _PATH_UTMP && !defined _PATH_UTMPX
++# define _PATH_UTMPX _PATH_UTMP
++#endif
++#if defined _PATH_WTMP && !defined _PATH_WTMPX
++# define _PATH_WTMPX _PATH_WTMP
++#endif
++
+ int utmp_get_runlevel(int *runlevel, int *previous) {
+         struct utmpx *found, lookup = { .ut_type = RUN_LVL };
+         int r;
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch
new file mode 100644
index 0000000..46d75ad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch
@@ -0,0 +1,89 @@
+From 88c48ea84db6fda19dfaeb64545fccf8fa0525ec Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 27 Oct 2017 13:00:41 -0700
+Subject: [PATCH 26/31] Use uintmax_t for handling rlim_t
+
+PRIu{32,64} is not right format to represent rlim_t type
+therefore use %ju and typecast the rlim_t variables to
+uintmax_t.
+
+Fixes portablility errors like
+
+execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
+|                          fprintf(f, "%s%s: " RLIM_FMT "\n",
+|                                     ^~~~~~~~
+|                                  prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
+|                                                               ~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/7199]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/format-util.h | 8 --------
+ src/basic/rlimit-util.c | 8 ++++----
+ src/core/execute.c      | 8 ++++----
+ 3 files changed, 8 insertions(+), 16 deletions(-)
+
+diff --git a/src/basic/format-util.h b/src/basic/format-util.h
+index d9a78f781..9a1bc21d7 100644
+--- a/src/basic/format-util.h
++++ b/src/basic/format-util.h
+@@ -61,14 +61,6 @@
+ #  define PRI_TIMEX "li"
+ #endif
+ 
+-#if SIZEOF_RLIM_T == 8
+-#  define RLIM_FMT "%" PRIu64
+-#elif SIZEOF_RLIM_T == 4
+-#  define RLIM_FMT "%" PRIu32
+-#else
+-#  error Unknown rlim_t size
+-#endif
+-
+ #if SIZEOF_DEV_T == 8
+ #  define DEV_FMT "%" PRIu64
+ #elif SIZEOF_DEV_T == 4
+diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
+index 00648211d..df3d9ecc1 100644
+--- a/src/basic/rlimit-util.c
++++ b/src/basic/rlimit-util.c
+@@ -286,13 +286,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
+         if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
+                 s = strdup("infinity");
+         else if (rl->rlim_cur >= RLIM_INFINITY)
+-                (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max);
++                (void) asprintf(&s, "infinity:%ju", (uintmax_t)rl->rlim_max);
+         else if (rl->rlim_max >= RLIM_INFINITY)
+-                (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur);
++                (void) asprintf(&s, "%ju:infinity", (uintmax_t)rl->rlim_cur);
+         else if (rl->rlim_cur == rl->rlim_max)
+-                (void) asprintf(&s, RLIM_FMT, rl->rlim_cur);
++                (void) asprintf(&s, "%ju", (uintmax_t)rl->rlim_cur);
+         else
+-                (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max);
++                (void) asprintf(&s, "%ju:%ju", (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max);
+ 
+         if (!s)
+                 return -ENOMEM;
+diff --git a/src/core/execute.c b/src/core/execute.c
+index 0df3971df..aabdddb68 100644
+--- a/src/core/execute.c
++++ b/src/core/execute.c
+@@ -3991,10 +3991,10 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
+ 
+         for (i = 0; i < RLIM_NLIMITS; i++)
+                 if (c->rlimit[i]) {
+-                        fprintf(f, "%s%s: " RLIM_FMT "\n",
+-                                prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
+-                        fprintf(f, "%s%sSoft: " RLIM_FMT "\n",
+-                                prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur);
++                        fprintf(f, "%s%s: %ju\n",
++                                prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max);
++                        fprintf(f, "%s%sSoft: %ju\n",
++                                prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur);
+                 }
+ 
+         if (c->ioprio_set) {
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch
new file mode 100644
index 0000000..42f59b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch
@@ -0,0 +1,63 @@
+From 5354eb767d1eba2ec41eb273f6b657f4a630ca8a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 9 Jan 2018 14:45:46 +0800
+Subject: [PATCH 27/31] remove nobody user/group checking
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 37 -------------------------------------
+ 1 file changed, 37 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index f6515e97c..1b947adac 100644
+--- a/meson.build
++++ b/meson.build
+@@ -700,43 +700,6 @@ substs.set('containeruidbasemax', container_uid_base_max)
+ nobody_user = get_option('nobody-user')
+ nobody_group = get_option('nobody-group')
+ 
+-getent_result = run_command('getent', 'passwd', '65534')
+-if getent_result.returncode() == 0
+-        name = getent_result.stdout().split(':')[0]
+-        if name != nobody_user
+-                message('WARNING:\n' +
+-                        '        The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
+-                        '        Your build will result in an user table setup that is incompatible with the local system.')
+-        endif
+-endif
+-id_result = run_command('id', '-u', nobody_user)
+-if id_result.returncode() == 0
+-        id = id_result.stdout().to_int()
+-        if id != 65534
+-                message('WARNING:\n' +
+-                        '        The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
+-                        '        Your build will result in an user table setup that is incompatible with the local system.')
+-        endif
+-endif
+-
+-getent_result = run_command('getent', 'group', '65534')
+-if getent_result.returncode() == 0
+-        name = getent_result.stdout().split(':')[0]
+-        if name != nobody_group
+-                message('WARNING:\n' +
+-                        '        The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
+-                        '        Your build will result in an group table setup that is incompatible with the local system.')
+-        endif
+-endif
+-id_result = run_command('id', '-g', nobody_group)
+-if id_result.returncode() == 0
+-        id = id_result.stdout().to_int()
+-        if id != 65534
+-                message('WARNING:\n' +
+-                        '        The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
+-                        '        Your build will result in an group table setup that is incompatible with the local system.')
+-        endif
+-endif
+ if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup')
+         message('WARNING:\n' +
+                 '        The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch
new file mode 100644
index 0000000..9ec3137
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch
@@ -0,0 +1,50 @@
+From 03cdd33be62db4c72a7fcf21b61d0d056c23c6a9 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 28 Feb 2018 21:36:32 -0800
+Subject: [PATCH 28/31] add missing FTW_ macros for musl
+
+This is to avoid build failures like below for musl.
+
+  locale-util.c:296:24: error: 'FTW_STOP' undeclared
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 1aee3346a..5b9fde692 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -207,6 +207,26 @@ struct sockaddr_vm {
+ #define BTRFS_QGROUP_LEVEL_SHIFT 48
+ #endif
+ 
++#ifndef FTW_ACTIONRETVAL
++#define FTW_ACTIONRETVAL 16
++#endif
++
++#ifndef FTW_CONTINUE
++#define FTW_CONTINUE 0
++#endif
++
++#ifndef FTW_STOP
++#define FTW_STOP 1
++#endif
++
++#ifndef FTW_SKIP_SUBTREE
++#define FTW_SKIP_SUBTREE 2
++#endif
++
++#ifndef FTW_SKIP_SIBLINGS
++#define FTW_SKIP_SIBLINGS 3
++#endif
++
+ #if ! HAVE_LINUX_BTRFS_H
+ #define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \
+                                struct btrfs_ioctl_qgroup_assign_args)
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch
new file mode 100644
index 0000000..517249f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch
@@ -0,0 +1,43 @@
+From 5845c82d1016a3e3f2696180d5ac91b46950540a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 12:56:21 +0800
+Subject: [PATCH 29/31] nss-mymachines: Build conditionally when
+ ENABLE_MYHOSTNAME is set
+
+Fixes build failures when building with --disable-myhostname
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ meson.build | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 1b947adac..1ed4dde72 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1351,12 +1351,15 @@ test_dlopen = executable(
+         link_with : [libbasic],
+         dependencies : [libdl])
+ 
+-foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'],
+-                 ['systemd',    'ENABLE_NSS_SYSTEMD'],
+-                 ['mymachines', 'ENABLE_MACHINED'],
+-                 ['resolve',    'ENABLE_RESOLVE']]
++foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME',  ''],
++                 ['systemd',    'ENABLE_NSS_SYSTEMD', ''],
++                 ['mymachines', 'ENABLE_MACHINED',    'ENABLE_MYHOSTNAME'],
++                 ['resolve',    'ENABLE_RESOLVE',     '']]
+ 
+         condition = tuple[1] == '' or conf.get(tuple[1]) == 1
++        if tuple[2] != '' and condition
++                condition = conf.get(tuple[2]) == 1
++        endif
+         if condition
+                 module = tuple[0]
+ 
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch
new file mode 100644
index 0000000..7f0b4bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -0,0 +1,45 @@
+From b7eacdf0388f930fc5271bdecfa46612c71dd65c Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 13:27:47 +0800
+Subject: [PATCH 30/31] fix missing of __register_atfork for non-glibc builds
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/process-util.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index dc7c9ef9e..85ce8a0cc 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -39,6 +39,9 @@
+ #if HAVE_VALGRIND_VALGRIND_H
+ #include <valgrind/valgrind.h>
+ #endif
++#ifndef __GLIBC__
++#include <pthread.h>
++#endif
+ 
+ #include "alloc-util.h"
+ #include "architecture.h"
+@@ -1112,11 +1115,15 @@ void reset_cached_pid(void) {
+         cached_pid = CACHED_PID_UNSET;
+ }
+ 
++#ifdef __GLIBC__
+ /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
+  * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
+  * libpthread, as it is part of glibc anyway. */
+ extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
+ extern void* __dso_handle __attribute__ ((__weak__));
++#else
++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
++#endif
+ 
+ pid_t getpid_cached(void) {
+         pid_t current_value;
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch
new file mode 100644
index 0000000..319c4b6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch
@@ -0,0 +1,30 @@
+From adcd7e426fcd80e754274a730221d1a1f49dbc21 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 27 Feb 2018 14:01:30 +0800
+Subject: [PATCH 31/31] fix missing ULONG_LONG_MAX definition in case of musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/missing.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 5b9fde692..a922f1346 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -72,6 +72,10 @@ struct sockaddr_vm {
+ };
+ #endif /* !HAVE_LINUX_VM_SOCKETS_H */
+ 
++#ifndef ULONG_LONG_MAX
++#define ULONG_LONG_MAX ULLONG_MAX
++#endif
++
+ #ifndef RLIMIT_RTTIME
+ #define RLIMIT_RTTIME 15
+ #endif
+-- 
+2.13.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch
new file mode 100644
index 0000000..f7cfd60
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0032-memfd.patch
@@ -0,0 +1,272 @@
+missing_syscall: when adding syscall replacements, use different names (
+
+#8229)
+
+In meson.build we check that functions are available using:
+    meson.get_compiler('c').has_function('foo')
+which checks the following:
+- if __stub_foo or __stub___foo are defined, return false
+- if foo is declared (a pointer to the function can be taken), return true
+- otherwise check for __builtin_memfd_create
+
+_stub is documented by glibc as
+   It defines a symbol '__stub_FUNCTION' for each function
+   in the C library which is a stub, meaning it will fail
+   every time called, usually setting errno to ENOSYS.
+
+So if __stub is defined, we know we don't want to use the glibc version, but
+this doesn't tell us if the name itself is defined or not. If it _is_ defined,
+and we define our replacement as an inline static function, we get an error:
+
+In file included from ../src/basic/missing.h:1358:0,
+                 from ../src/basic/util.h:47,
+                 from ../src/basic/calendarspec.h:29,
+                 from ../src/basic/calendarspec.c:34:
+../src/basic/missing_syscall.h:65:19: error: static declaration of 'memfd_create' follows non-static declaration
+ static inline int memfd_create(const char *name, unsigned int flags) {
+                   ^~~~~~~~~~~~
+.../usr/include/bits/mman-shared.h:46:5: note: previous declaration of 'memfd_create' was here
+ int memfd_create (const char *__name, unsigned int __flags) __THROW;
+     ^~~~~~~~~~~~
+
+To avoid this problem, call our inline functions different than glibc,
+and use a #define to map the official name to our replacement.
+
+Fixes #8099.
+
+v2:
+- use "missing_" as the prefix instead of "_"
+
+v3:
+- rebase and update for statx()
+
+  Unfortunately "statx" is also present in "struct statx", so the define
+  causes issues. Work around this by using a typedef.
+
+I checked that systemd compiles with current glibc
+(glibc-devel-2.26-24.fc27.x86_64) if HAVE_MEMFD_CREATE, HAVE_GETTID,
+HAVE_PIVOT_ROOT, HAVE_SETNS, HAVE_RENAMEAT2, HAVE_KCMP, HAVE_KEYCTL,
+HAVE_COPY_FILE_RANGE, HAVE_BPF, HAVE_STATX are forced to 0.
+
+Setting HAVE_NAME_TO_HANDLE_AT to 0 causes an issue, but it's not because of
+the define, but because of struct file_handle.
+
+
+backport https://github.com/systemd/systemd/commit/5187dd2c403caf92d09f3491e41f1ceb3f10491f
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/systemd/systemd/issues/8099]
+Index: git/src/basic/missing_syscall.h
+===================================================================
+--- git.orig/src/basic/missing_syscall.h
++++ git/src/basic/missing_syscall.h
+@@ -26,9 +26,11 @@
+ #include <sys/types.h>
+ 
+ #if !HAVE_PIVOT_ROOT
+-static inline int pivot_root(const char *new_root, const char *put_old) {
++static inline int missing_pivot_root(const char *new_root, const char *put_old) {
+         return syscall(SYS_pivot_root, new_root, put_old);
+ }
++
++#  define pivot_root missing_pivot_root
+ #endif
+ 
+ #if !HAVE_CANONICALIZE_FILE_NAME
+@@ -68,7 +70,7 @@ static inline char *canonicalize_file_na
+ #    endif
+ #  endif
+ 
+-static inline int memfd_create(const char *name, unsigned int flags) {
++static inline int missing_memfd_create(const char *name, unsigned int flags) {
+ #  ifdef __NR_memfd_create
+         return syscall(__NR_memfd_create, name, flags);
+ #  else
+@@ -76,6 +78,8 @@ static inline int memfd_create(const cha
+         return -1;
+ #  endif
+ }
++
++#  define memfd_create missing_memfd_create
+ #endif
+ 
+ /* ======================================================================= */
+@@ -115,7 +119,7 @@ static inline int memfd_create(const cha
+ #    endif
+ #  endif
+ 
+-static inline int getrandom(void *buffer, size_t count, unsigned flags) {
++static inline int missing_getrandom(void *buffer, size_t count, unsigned flags) {
+ #  ifdef __NR_getrandom
+         return syscall(__NR_getrandom, buffer, count, flags);
+ #  else
+@@ -123,14 +127,18 @@ static inline int getrandom(void *buffer
+         return -1;
+ #  endif
+ }
++
++#  define getrandom missing_getrandom
+ #endif
+ 
+ /* ======================================================================= */
+ 
+ #if !HAVE_GETTID
+-static inline pid_t gettid(void) {
++static inline pid_t missing_gettid(void) {
+         return (pid_t) syscall(SYS_gettid);
+ }
++
++#  define gettid missing_gettid
+ #endif
+ 
+ /* ======================================================================= */
+@@ -158,7 +166,7 @@ struct file_handle {
+         unsigned char f_handle[0];
+ };
+ 
+-static inline int name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
++static inline int missing_name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
+ #  ifdef __NR_name_to_handle_at
+         return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
+ #  else
+@@ -166,6 +174,8 @@ static inline int name_to_handle_at(int
+         return -1;
+ #  endif
+ }
++
++#  define name_to_handle_at missing_name_to_handle_at
+ #endif
+ 
+ /* ======================================================================= */
+@@ -183,7 +193,7 @@ static inline int name_to_handle_at(int
+ #    endif
+ #  endif
+ 
+-static inline int setns(int fd, int nstype) {
++static inline int missing_setns(int fd, int nstype) {
+ #  ifdef __NR_setns
+         return syscall(__NR_setns, fd, nstype);
+ #  else
+@@ -191,6 +201,8 @@ static inline int setns(int fd, int nsty
+         return -1;
+ #  endif
+ }
++
++#  define setns missing_setns
+ #endif
+ 
+ /* ======================================================================= */
+@@ -236,7 +248,7 @@ static inline pid_t raw_getpid(void) {
+ #    endif
+ #  endif
+ 
+-static inline int renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
++static inline int missing_renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
+ #  ifdef __NR_renameat2
+         return syscall(__NR_renameat2, oldfd, oldname, newfd, newname, flags);
+ #  else
+@@ -244,12 +256,14 @@ static inline int renameat2(int oldfd, c
+         return -1;
+ #  endif
+ }
++
++#  define renameat2 missing_renameat2
+ #endif
+ 
+ /* ======================================================================= */
+ 
+ #if !HAVE_KCMP
+-static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
++static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
+ #  ifdef __NR_kcmp
+         return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
+ #  else
+@@ -257,36 +271,44 @@ static inline int kcmp(pid_t pid1, pid_t
+         return -1;
+ #  endif
+ }
++
++#  define kcmp missing_kcmp
+ #endif
+ 
+ /* ======================================================================= */
+ 
+ #if !HAVE_KEYCTL
+-static inline long keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
++static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
+ #  ifdef __NR_keyctl
+         return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
+ #  else
+         errno = ENOSYS;
+         return -1;
+ #  endif
++
++#  define keyctl missing_keyctl
+ }
+ 
+-static inline key_serial_t add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
++static inline key_serial_t missing_add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
+ #  ifdef __NR_add_key
+         return syscall(__NR_add_key, type, description, payload, plen, ringid);
+ #  else
+         errno = ENOSYS;
+         return -1;
+ #  endif
++
++#  define add_key missing_add_key
+ }
+ 
+-static inline key_serial_t request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
++static inline key_serial_t missing_request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
+ #  ifdef __NR_request_key
+         return syscall(__NR_request_key, type, description, callout_info, destringid);
+ #  else
+         errno = ENOSYS;
+         return -1;
+ #  endif
++
++#  define request_key missing_request_key
+ }
+ #endif
+ 
+@@ -313,10 +335,10 @@ static inline key_serial_t request_key(c
+ #    endif
+ #  endif
+ 
+-static inline ssize_t copy_file_range(int fd_in, loff_t *off_in,
+-                                      int fd_out, loff_t *off_out,
+-                                      size_t len,
+-                                      unsigned int flags) {
++static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
++                                              int fd_out, loff_t *off_out,
++                                              size_t len,
++                                              unsigned int flags) {
+ #  ifdef __NR_copy_file_range
+         return syscall(__NR_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags);
+ #  else
+@@ -324,6 +346,8 @@ static inline ssize_t copy_file_range(in
+         return -1;
+ #  endif
+ }
++
++#  define copy_file_range missing_copy_file_range
+ #endif
+ 
+ /* ======================================================================= */
+@@ -351,7 +375,7 @@ static inline ssize_t copy_file_range(in
+ 
+ union bpf_attr;
+ 
+-static inline int bpf(int cmd, union bpf_attr *attr, size_t size) {
++static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
+ #ifdef __NR_bpf
+         return (int) syscall(__NR_bpf, cmd, attr, size);
+ #else
+@@ -360,6 +384,7 @@ static inline int bpf(int cmd, union bpf
+ #endif
+ }
+ 
++#  define bpf missing_bpf
+ #endif
+ 
+ /* ======================================================================= */
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
new file mode 100644
index 0000000..59647b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
@@ -0,0 +1,203 @@
+From 848e863acc51ecfb0f3955c498874588201d9130 Mon Sep 17 00:00:00 2001
+From: Franck Bui <fbui@suse.com>
+Date: Thu, 15 Mar 2018 06:23:46 +0100
+Subject: [PATCH] basic/macros: rename noreturn into _noreturn_ (#8456)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+"noreturn" is reserved and can be used in other header files we include:
+
+  [   16s] In file included from /usr/include/gcrypt.h:30:0,
+  [   16s]                  from ../src/journal/journal-file.h:26,
+  [   16s]                  from ../src/journal/journal-vacuum.c:31:
+  [   16s] /usr/include/gpg-error.h:1544:46: error: expected ‘,’ or ‘;’ before ‘)’ token
+  [   16s]  void gpgrt_log_bug (const char *fmt, ...)    GPGRT_ATTR_NR_PRINTF(1,2);
+
+Here we include grcrypt.h (which in turns include gpg-error.h) *after* we
+"noreturn" was defined in macro.h.
+---
+ src/basic/log.c                         |  4 ++--
+ src/basic/log.h                         |  4 ++--
+ src/basic/macro.h                       | 19 +++++++++----------
+ src/basic/process-util.c                |  2 +-
+ src/basic/process-util.h                |  2 +-
+ src/core/main.c                         |  4 ++--
+ src/journal/test-journal-interleaving.c |  2 +-
+ src/shared/pager.c                      |  2 +-
+ src/udev/collect/collect.c              |  2 +-
+ 9 files changed, 20 insertions(+), 21 deletions(-)
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/pull/8456]
+
+diff --git a/src/basic/log.c b/src/basic/log.c
+index 7a7f2cbec..16a2431c5 100644
+--- a/src/basic/log.c
++++ b/src/basic/log.c
+@@ -814,7 +814,7 @@ static void log_assert(
+         log_dispatch_internal(level, 0, file, line, func, NULL, NULL, NULL, NULL, buffer);
+ }
+ 
+-noreturn void log_assert_failed_realm(
++_noreturn_ void log_assert_failed_realm(
+                 LogRealm realm,
+                 const char *text,
+                 const char *file,
+@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm(
+         abort();
+ }
+ 
+-noreturn void log_assert_failed_unreachable_realm(
++_noreturn_ void log_assert_failed_unreachable_realm(
+                 LogRealm realm,
+                 const char *text,
+                 const char *file,
+diff --git a/src/basic/log.h b/src/basic/log.h
+index efcf0f1bf..314be128a 100644
+--- a/src/basic/log.h
++++ b/src/basic/log.h
+@@ -186,7 +186,7 @@ int log_dump_internal(
+                 char *buffer);
+ 
+ /* Logging for various assertions */
+-noreturn void log_assert_failed_realm(
++_noreturn_ void log_assert_failed_realm(
+                 LogRealm realm,
+                 const char *text,
+                 const char *file,
+@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm(
+ #define log_assert_failed(text, ...) \
+         log_assert_failed_realm(LOG_REALM, (text), __VA_ARGS__)
+ 
+-noreturn void log_assert_failed_unreachable_realm(
++_noreturn_ void log_assert_failed_unreachable_realm(
+                 LogRealm realm,
+                 const char *text,
+                 const char *file,
+diff --git a/src/basic/macro.h b/src/basic/macro.h
+index 95be63a20..8911edfc4 100644
+--- a/src/basic/macro.h
++++ b/src/basic/macro.h
+@@ -53,6 +53,15 @@
+ #else
+ #define _fallthrough_
+ #endif
++/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
++ * compiler versions */
++#ifndef _noreturn_
++#if __STDC_VERSION__ >= 201112L
++#define _noreturn_ _Noreturn
++#else
++#define _noreturn_ __attribute__((noreturn))
++#endif
++#endif
+ 
+ /* Temporarily disable some warnings */
+ #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT                     \
+@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
+ #endif
+ #endif
+ 
+-/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
+- * compiler versions */
+-#ifndef noreturn
+-#if __STDC_VERSION__ >= 201112L
+-#define noreturn _Noreturn
+-#else
+-#define noreturn __attribute__((noreturn))
+-#endif
+-#endif
+-
+ #define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func)                 \
+         static inline void func##p(type *p) {                   \
+                 if (*p)                                         \
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index aa9846db5..e6120af5b 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -987,7 +987,7 @@ bool is_main_thread(void) {
+         return cached > 0;
+ }
+ 
+-noreturn void freeze(void) {
++_noreturn_ void freeze(void) {
+ 
+         log_close();
+ 
+diff --git a/src/basic/process-util.h b/src/basic/process-util.h
+index 93029e36e..5170adec7 100644
+--- a/src/basic/process-util.h
++++ b/src/basic/process-util.h
+@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid);
+ 
+ bool is_main_thread(void);
+ 
+-noreturn void freeze(void);
++_noreturn_ void freeze(void);
+ 
+ bool oom_score_adjust_is_valid(int oa);
+ 
+diff --git a/src/core/main.c b/src/core/main.c
+index 076846a41..4b2d14923 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX;
+ static sd_id128_t arg_machine_id = {};
+ static EmergencyAction arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE;
+ 
+-noreturn static void freeze_or_reboot(void) {
++_noreturn_ static void freeze_or_reboot(void) {
+ 
+         if (arg_crash_reboot) {
+                 log_notice("Rebooting in 10s...");
+@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) {
+         freeze();
+ }
+ 
+-noreturn static void crash(int sig) {
++_noreturn_ static void crash(int sig) {
+         struct sigaction sa;
+         pid_t pid;
+ 
+diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c
+index 5a88b2774..d87bdbdd3 100644
+--- a/src/journal/test-journal-interleaving.c
++++ b/src/journal/test-journal-interleaving.c
+@@ -37,7 +37,7 @@
+ 
+ static bool arg_keep = false;
+ 
+-noreturn static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
++_noreturn_ static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
+         log_internal(LOG_CRIT, error, file, line, func,
+                      "'%s' failed at %s:%u (%s): %m", text, file, line, func);
+         abort();
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index 75db3c985..681af9c40 100644
+--- a/src/shared/pager.c
++++ b/src/shared/pager.c
+@@ -47,7 +47,7 @@ static int stored_stderr = -1;
+ static bool stdout_redirected = false;
+ static bool stderr_redirected = false;
+ 
+-noreturn static void pager_fallback(void) {
++_noreturn_ static void pager_fallback(void) {
+         int r;
+ 
+         r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0);
+diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
+index 2821640e9..c8fa47b3d 100644
+--- a/src/udev/collect/collect.c
++++ b/src/udev/collect/collect.c
+@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node)
+         return container_of(node, struct _mate, node);
+ }
+ 
+-noreturn static void sig_alrm(int signo)
++_noreturn_ static void sig_alrm(int signo)
+ {
+         exit(4);
+ }
+-- 
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch
new file mode 100644
index 0000000..e56061f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0034-Fix-format-truncation-compile-failure-by-typecasting.patch
@@ -0,0 +1,173 @@
+From c2b3ebe112ebfd9f9e82fb1531ee225c3152ca83 Mon Sep 17 00:00:00 2001
+From: Patrick Uiterwijk <patrick@puiterwijk.org>
+Date: Thu, 22 Feb 2018 19:41:30 +0100
+Subject: [PATCH] Fix format-truncation compile failure by typecasting USB IDs
+ (#8250)
+
+This patch adds safe_atoux16 for parsing an unsigned hexadecimal 16bit int, and
+uses that for parsing USB device and vendor IDs.
+
+This fixes a compile error with gcc-8 because while we know that USB IDs are 2 bytes,
+the compiler does not know that.
+
+../src/udev/udev-builtin-hwdb.c:80:38: error: '%04X' directive output may be
+truncated writing between 4 and 8 bytes into a region of size between 2 and 6
+[-Werror=format-truncation=]
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/5547c12503a683290eaed47954ffcfb2d1bc03cd]
+
+Signed-off-by: Adam Williamson <awilliam@redhat.com>
+Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
+---
+ src/basic/parse-util.c       | 24 ++++++++++++++++++++++
+ src/basic/parse-util.h       |  2 ++
+ src/test/test-parse-util.c   | 39 ++++++++++++++++++++++++++++++++++++
+ src/udev/udev-builtin-hwdb.c | 13 ++++++------
+ 4 files changed, 71 insertions(+), 7 deletions(-)
+
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 97533721d..ff3fc298a 100644
+--- a/src/basic/parse-util.c
++++ b/src/basic/parse-util.c
+@@ -532,6 +532,30 @@ int safe_atoi16(const char *s, int16_t *ret) {
+         return 0;
+ }
+ 
++int safe_atoux16(const char *s, uint16_t *ret) {
++        char *x = NULL;
++        unsigned long l;
++
++        assert(s);
++        assert(ret);
++
++        s += strspn(s, WHITESPACE);
++
++        errno = 0;
++        l = strtoul(s, &x, 16);
++        if (errno > 0)
++                return -errno;
++        if (!x || x == s || *x != 0)
++                return -EINVAL;
++        if (s[0] == '-')
++                return -ERANGE;
++        if ((unsigned long) (uint16_t) l != l)
++                return -ERANGE;
++
++        *ret = (uint16_t) l;
++        return 0;
++}
++
+ int safe_atod(const char *s, double *ret_d) {
+         _cleanup_(freelocalep) locale_t loc = (locale_t) 0;
+         char *x = NULL;
+diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h
+index 1eda1d7f9..727422056 100644
+--- a/src/basic/parse-util.h
++++ b/src/basic/parse-util.h
+@@ -54,6 +54,8 @@ int safe_atou8(const char *s, uint8_t *ret);
+ int safe_atou16(const char *s, uint16_t *ret);
+ int safe_atoi16(const char *s, int16_t *ret);
+ 
++int safe_atoux16(const char *s, uint16_t *ret);
++
+ static inline int safe_atou32(const char *s, uint32_t *ret_u) {
+         assert_cc(sizeof(uint32_t) == sizeof(unsigned));
+         return safe_atou(s, (unsigned*) ret_u);
+diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
+index 937500213..a99cea5a1 100644
+--- a/src/test/test-parse-util.c
++++ b/src/test/test-parse-util.c
+@@ -468,6 +468,44 @@ static void test_safe_atoi16(void) {
+         assert_se(r == -EINVAL);
+ }
+ 
++static void test_safe_atoux16(void) {
++        int r;
++        uint16_t l;
++
++        r = safe_atoux16("1234", &l);
++        assert_se(r == 0);
++        assert_se(l == 0x1234);
++
++        r = safe_atoux16("abcd", &l);
++        assert_se(r == 0);
++        assert_se(l == 0xabcd);
++
++        r = safe_atoux16("  1234", &l);
++        assert_se(r == 0);
++        assert_se(l == 0x1234);
++
++        r = safe_atoux16("12345", &l);
++        assert_se(r == -ERANGE);
++
++        r = safe_atoux16("-1", &l);
++        assert_se(r == -ERANGE);
++
++        r = safe_atoux16("  -1", &l);
++        assert_se(r == -ERANGE);
++
++        r = safe_atoux16("junk", &l);
++        assert_se(r == -EINVAL);
++
++        r = safe_atoux16("123x", &l);
++        assert_se(r == -EINVAL);
++
++        r = safe_atoux16("12.3", &l);
++        assert_se(r == -EINVAL);
++
++        r = safe_atoux16("", &l);
++        assert_se(r == -EINVAL);
++}
++
+ static void test_safe_atou64(void) {
+         int r;
+         uint64_t l;
+@@ -745,6 +783,7 @@ int main(int argc, char *argv[]) {
+         test_safe_atolli();
+         test_safe_atou16();
+         test_safe_atoi16();
++        test_safe_atoux16();
+         test_safe_atou64();
+         test_safe_atoi64();
+         test_safe_atod();
+diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
+index ca7f7c230..dbfe02429 100644
+--- a/src/udev/udev-builtin-hwdb.c
++++ b/src/udev/udev-builtin-hwdb.c
+@@ -27,6 +27,7 @@
+ 
+ #include "alloc-util.h"
+ #include "hwdb-util.h"
++#include "parse-util.h"
+ #include "string-util.h"
+ #include "udev-util.h"
+ #include "udev.h"
+@@ -63,7 +64,7 @@ int udev_builtin_hwdb_lookup(struct udev_device *dev,
+ 
+ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
+         const char *v, *p;
+-        int vn, pn;
++        uint16_t vn, pn;
+ 
+         v = udev_device_get_sysattr_value(dev, "idVendor");
+         if (!v)
+@@ -71,12 +72,10 @@ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
+         p = udev_device_get_sysattr_value(dev, "idProduct");
+         if (!p)
+                 return NULL;
+-        vn = strtol(v, NULL, 16);
+-        if (vn <= 0)
+-                return NULL;
+-        pn = strtol(p, NULL, 16);
+-        if (pn <= 0)
+-                return NULL;
++        if (safe_atoux16(v, &vn) < 0)
++		return NULL;
++        if (safe_atoux16(p, &pn) < 0)
++		return NULL;
+         snprintf(s, size, "usb:v%04Xp%04X*", vn, pn);
+         return s;
+ }
+-- 
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
new file mode 100644
index 0000000..736d525
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -0,0 +1,33 @@
+From 5f1f064c81ea30acf93cfa0fb466b38f094f488c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 27 May 2018 08:36:44 -0700
+Subject: [PATCH] Define glibc compatible basename() for non-glibc systems
+
+Fixes builds with musl, even though systemd is adamant about
+using non-posix basename implementation, we have a way out
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/machine/machine-dbus.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
+index 2d7806491b..9a3bdb1d76 100644
+--- a/src/machine/machine-dbus.c
++++ b/src/machine/machine-dbus.c
+@@ -29,6 +29,10 @@
+ #include <libgen.h>
+ #undef basename
+ 
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ #include "alloc-util.h"
+ #include "bus-common-errors.h"
+ #include "bus-internal.h"
+-- 
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch
new file mode 100644
index 0000000..b59d5b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/libmount.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 26 Mar 2018 17:34:53 +0200
+Subject: [PATCH] core: don't include libmount.h in a header file (#8580)
+
+linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_*
+definitions.
+
+To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h
+should be included. And missing.h must be included last.
+
+Without this, building systemd may fail with:
+
+In file included from [...]/libmount/libmount.h:31:0,
+                 from ../systemd-238/src/core/manager.h:23,
+                 from ../systemd-238/src/core/emergency-action.h:37,
+                 from ../systemd-238/src/core/unit.h:34,
+                 from ../systemd-238/src/core/dbus-timer.h:25,
+                 from ../systemd-238/src/core/timer.c:26:
+[...]/sys/mount.h:57:2: error: expected identifier before numeric constant
+---
+ src/core/dbus-execute.c | 1 +
+ src/core/manager.h      | 3 ++-
+ src/core/mount.c        | 2 ++
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
+index 7344623ebf6..c342093bca4 100644
+--- a/src/core/dbus-execute.c
++++ b/src/core/dbus-execute.c
+@@ -18,6 +18,7 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#include <sys/mount.h>
+ #include <sys/prctl.h>
+ #include <stdio_ext.h>
+ 
+diff --git a/src/core/manager.h b/src/core/manager.h
+index 28c5da225b1..e09e0cdf5e9 100644
+--- a/src/core/manager.h
++++ b/src/core/manager.h
+@@ -20,7 +20,6 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
+-#include <libmount.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+ 
+@@ -34,6 +33,8 @@
+ #include "list.h"
+ #include "ratelimit.h"
+ 
++struct libmnt_monitor;
++
+ /* Enforce upper limit how many names we allow */
+ #define MANAGER_MAX_NAMES 131072 /* 128K */
+ 
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 0e755da5c02..0154ebda5d6 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -23,6 +23,8 @@
+ #include <stdio.h>
+ #include <sys/epoll.h>
+ 
++#include <libmount.h>
++
+ #include "sd-messages.h"
+ 
+ #include "alloc-util.h"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
deleted file mode 100644
index 2ae76ff..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-cd tests
-tar -C test -xJf test/sys.tar.xz
-make check-TESTS
-cd ..
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb
deleted file mode 100644
index 9ce27bf..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_234.bb
+++ /dev/null
@@ -1,641 +0,0 @@
-require systemd.inc
-
-PROVIDES = "udev"
-
-PE = "1"
-
-DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup util-linux"
-
-SECTION = "base/shell"
-
-inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages
-
-SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
-           file://touchscreen.rules \
-           file://00-create-volatile.conf \
-           file://init \
-           file://run-ptest \
-           file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
-           file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
-           file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
-           file://0010-implment-systemd-sysv-install-for-OE.patch \
-           file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
-           file://0012-rules-whitelist-hd-devices.patch \
-           file://0013-Make-root-s-home-directory-configurable.patch \
-           file://0014-Revert-rules-remove-firmware-loading-rules.patch \
-           file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
-           file://0017-remove-duplicate-include-uchar.h.patch \
-           file://0018-check-for-uchar.h-in-configure.patch \
-           file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
-           file://0001-add-fallback-parse_printf_format-implementation.patch \
-           file://0002-src-basic-missing.h-check-for-missing-strndupa.patch \
-           file://0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
-           file://0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \
-           file://0006-Include-netinet-if_ether.h.patch \
-           file://0007-check-for-missing-canonicalize_file_name.patch \
-           file://0008-Do-not-enable-nss-tests.patch \
-           file://0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch \
-           file://0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
-           file://0011-don-t-use-glibc-specific-qsort_r.patch \
-           file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
-           file://0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
-           file://0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch \
-           file://0001-Use-uintmax_t-for-handling-rlim_t.patch \
-           file://0001-core-evaluate-presets-after-generators-have-run-6526.patch \
-           file://0001-main-skip-many-initialization-steps-when-running-in-.patch \
-           "
-SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
-
-PAM_PLUGINS = " \
-    pam-plugin-unix \
-    pam-plugin-loginuid \
-    pam-plugin-keyinit \
-"
-
-PACKAGECONFIG ??= " \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
-    backlight \
-    binfmt \
-    firstboot \
-    hibernate \
-    hostnamed \
-    ima \
-    localed \
-    logind \
-    machined \
-    myhostname \
-    networkd \
-    nss \
-    polkit \
-    quotacheck \
-    randomseed \
-    resolved \
-    smack \
-    sysusers \
-    timedated \
-    timesyncd \
-    utmp \
-    vconsole \
-    xz \
-"
-
-PACKAGECONFIG_remove_libc-musl = " \
-    localed \
-    myhostname \
-    nss \
-    resolved \
-    selinux \
-    smack \
-    sysusers \
-    utmp \
-"
-
-# Use the upstream systemd serial-getty@.service and rely on
-# systemd-getty-generator instead of using the OE-core specific
-# systemd-serialgetty.bb - not enabled by default.
-PACKAGECONFIG[serial-getty-generator] = ""
-
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
-PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
-PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
-PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
-PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
-PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
-PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
-# Sign the journal for anti-tampering
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
-PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
-PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
-PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
-# importd requires curl/xz/zlib/bzip2/gcrypt
-PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
-# Update NAT firewall rules
-PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
-PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
-PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig"
-PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
-PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
-PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
-PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
-PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
-PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
-PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
-PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
-PACKAGECONFIG[nss] = "--enable-nss-systemd,--disable-nss-systemd"
-PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
-PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
-PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
-PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
-PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
-# libseccomp is found in meta-security
-PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,initscripts-sushell"
-PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
-PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
-PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
-PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
-PACKAGECONFIG[usrmerge] = "--disable-split-usr,--enable-split-usr"
-PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
-PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no,valgrind"
-PACKAGECONFIG[vconsole] = "--enable-vconsole,--disable-vconsole,,${PN}-vconsole-setup"
-# Verify keymaps on locale change
-PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
-PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-
-# Hardcode target binary paths to avoid AC_PROG_PATH in the systemd
-# configure script detecting and setting paths from sysroot or host.
-CACHED_CONFIGUREVARS_class-target = " \
-    ac_cv_path_KEXEC=${sbindir}/kexec \
-    ac_cv_path_KILL=${base_bindir}/kill \
-    ac_cv_path_KMOD=${base_bindir}/kmod \
-    ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
-    ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
-    ac_cv_path_QUOTAON=${sbindir}/quotaon \
-    ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
-    ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
-"
-
-# Helper variables to clarify locations.  This mirrors the logic in systemd's
-# build system.
-rootprefix ?= "${root_prefix}"
-rootlibdir ?= "${base_libdir}"
-rootlibexecdir = "${rootprefix}/lib"
-
-EXTRA_OECONF = " \
-    --without-python \
-    --with-roothomedir=${ROOT_HOME} \
-    --with-rootlibdir=${rootlibdir} \
-    --with-rootprefix=${rootprefix} \
-    --with-sysvrcnd-path=${sysconfdir} \
-    --with-firmware-path=${nonarch_base_libdir}/firmware \
-"
-
-# per the systemd README, define VALGRIND=1 to run under valgrind
-CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
-
-# disable problematic GCC 5.2 optimizations [YOCTO #8291]
-FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
-
-COMPILER_NM ?= "${HOST_PREFIX}gcc-nm"
-COMPILER_AR ?= "${HOST_PREFIX}gcc-ar"
-COMPILER_RANLIB ?= "${HOST_PREFIX}gcc-ranlib"
-
-do_configure_prepend() {
-	export NM="${COMPILER_NM}"
-	export AR="${COMPILER_AR}"
-	export RANLIB="${COMPILER_RANLIB}"
-	export KMOD="${base_bindir}/kmod"
-	if [ -d ${S}/units.pre_sed ] ; then
-		cp -r ${S}/units.pre_sed ${S}/units
-	else
-		cp -r ${S}/units ${S}/units.pre_sed
-	fi
-	sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
-	sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
-}
-
-do_install() {
-	autotools_do_install
-	install -d ${D}/${base_sbindir}
-	if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
-		# Provided by a separate recipe
-		rm ${D}${systemd_unitdir}/system/serial-getty* -f
-	fi
-
-	# Provide support for initramfs
-	[ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
-	[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
-
-	# Create machine-id
-	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
-	touch ${D}${sysconfdir}/machine-id
-
-	install -d ${D}${sysconfdir}/udev/rules.d/
-	install -d ${D}${sysconfdir}/tmpfiles.d
-	install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
-	install -d ${D}${libdir}/pkgconfig
-	install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
-
-	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
-
-	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
-		install -d ${D}${sysconfdir}/init.d
-		install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
-		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
-	fi
-
-	chown root:systemd-journal ${D}/${localstatedir}/log/journal
-
-	# Delete journal README, as log can be symlinked inside volatile.
-	rm -f ${D}/${localstatedir}/log/README
-
-	install -d ${D}${systemd_unitdir}/system/graphical.target.wants
-	install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
-	install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
-	install -d ${D}${systemd_unitdir}/system/reboot.target.wants
-	install -d ${D}${systemd_unitdir}/system/rescue.target.wants
-
-	# Create symlinks for systemd-update-utmp-runlevel.service
-	if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
-		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
-		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
-		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
-		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
-		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
-	fi
-
-	# Enable journal to forward message to syslog daemon
-	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
-	# Set the maximium size of runtime journal to 64M as default
-	sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
-
-	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
-	# for existence else it fails
-	if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
-		${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
-	fi
-	if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
-		echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
-		echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
-		echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
-		ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
-	else
-		sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
-		ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
-	fi
-	install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
-
-	# If polkit is setup fixup permissions and ownership
-	if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
-		if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
-			chmod 700 ${D}${datadir}/polkit-1/rules.d
-			chown polkitd:root ${D}${datadir}/polkit-1/rules.d
-		fi
-	fi
-}
-
-do_install_ptest () {
-	# install data files needed for tests
-	install -d ${D}${PTEST_PATH}/tests/test
-	cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
-	# python is disabled for systemd, thus removing these python testing scripts
-	rm ${D}${PTEST_PATH}/tests/test/*.py
-	sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
-
-	install -d ${D}${PTEST_PATH}/tests/catalog
-	install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
-
-	install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
-
-	install -d ${D}${PTEST_PATH}/tests/rules
-	install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
-
-	# This directory needs to be there for udev-test.pl to work.
-	install -d ${D}${libdir}/udev/rules.d
-
-	# install actual test binaries
-	install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
-	install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
-
-	install ${B}/Makefile ${D}${PTEST_PATH}/tests/
-}
-
-python populate_packages_prepend (){
-    systemdlibdir = d.getVar("rootlibdir")
-    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
-}
-PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
-
-PACKAGES =+ "\
-    ${PN}-gui \
-    ${PN}-vconsole-setup \
-    ${PN}-initramfs \
-    ${PN}-analyze \
-    ${PN}-kernel-install \
-    ${PN}-rpm-macros \
-    ${PN}-binfmt \
-    ${PN}-zsh-completion \
-    ${PN}-xorg-xinitrc \
-    ${PN}-container \
-    ${PN}-extra-utils \
-"
-
-SUMMARY_${PN}-container = "Tools for containers and VMs"
-DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
-
-SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
-
-USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
-USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
-
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
-
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
-
-RDEPENDS_${PN}-ptest += "gawk make perl bash xz \
-                         tzdata tzdata-americas tzdata-asia \
-                         tzdata-europe tzdata-africa tzdata-antarctica \
-                         tzdata-arctic tzdata-atlantic tzdata-australia \
-                         tzdata-pacific tzdata-posix"
-
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
-
-FILES_${PN}-gui = "${bindir}/systemadm"
-
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
-                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
-                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
-
-RDEPENDS_${PN}-kernel-install += "bash"
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
-                              ${sysconfdir}/kernel/ \
-                              ${exec_prefix}/lib/kernel \
-                             "
-FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
-                         "
-
-FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
-
-FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
-
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
-                      ${exec_prefix}/lib/binfmt.d \
-                      ${rootlibexecdir}/systemd/systemd-binfmt \
-                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
-                      ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
-                         ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
-                         ${base_bindir}/machinectl \
-                         ${bindir}/systemd-nspawn \
-                         ${nonarch_libdir}/systemd/import-pubring.gpg \
-                         ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
-                         ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
-                         ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
-                         ${systemd_system_unitdir}/machine.slice \
-                         ${systemd_system_unitdir}/machines.target \
-                         ${systemd_system_unitdir}/org.freedesktop.import1.busname \
-                         ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
-                         ${systemd_system_unitdir}/systemd-importd.service \
-                         ${systemd_system_unitdir}/systemd-machined.service \
-                         ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
-                         ${systemd_system_unitdir}/var-lib-machines.mount \
-                         ${rootlibexecdir}/systemd/systemd-import \
-                         ${rootlibexecdir}/systemd/systemd-importd \
-                         ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
-                         ${rootlibexecdir}/systemd/systemd-journal-remote \
-                         ${rootlibexecdir}/systemd/systemd-journal-upload \
-                         ${rootlibexecdir}/systemd/systemd-machined \
-                         ${rootlibexecdir}/systemd/systemd-pull \
-                         ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
-                         ${systemd_system_unitdir}/systemd-nspawn@.service \
-                         ${libdir}/libnss_mymachines.so.2 \
-                         ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
-                         ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
-                         ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
-                         ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
-                         ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
-                        "
-
-FILES_${PN}-extra-utils = "\
-                        ${base_bindir}/systemd-escape \
-                        ${base_bindir}/systemd-inhibit \
-                        ${bindir}/systemd-detect-virt \
-                        ${bindir}/systemd-path \
-                        ${bindir}/systemd-run \
-                        ${bindir}/systemd-cat \
-                        ${bindir}/systemd-delta \
-                        ${bindir}/systemd-cgls \
-                        ${bindir}/systemd-cgtop \
-                        ${bindir}/systemd-stdio-bridge \
-                        ${base_bindir}/systemd-ask-password \
-                        ${base_bindir}/systemd-tty-ask-password-agent \
-                        ${systemd_unitdir}/system/systemd-ask-password-console.path \
-                        ${systemd_unitdir}/system/systemd-ask-password-console.service \
-                        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
-                        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
-                        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
-                        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
-                        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
-                        ${rootlibexecdir}/systemd/systemd-resolve-host \
-                        ${rootlibexecdir}/systemd/systemd-ac-power \
-                        ${rootlibexecdir}/systemd/systemd-activate \
-                        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
-                        ${systemd_unitdir}/system/systemd-bus-proxyd.service \
-                        ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
-                        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
-                        ${rootlibexecdir}/systemd/systemd-reply-password \
-                        ${rootlibexecdir}/systemd/systemd-sleep \
-                        ${rootlibexecdir}/systemd/system-sleep \
-                        ${systemd_unitdir}/system/systemd-hibernate.service \
-                        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
-                        ${systemd_unitdir}/system/systemd-suspend.service \
-                        ${systemd_unitdir}/system/sleep.target \
-                        ${rootlibexecdir}/systemd/systemd-initctl \
-                        ${systemd_unitdir}/system/systemd-initctl.service \
-                        ${systemd_unitdir}/system/systemd-initctl.socket \
-                        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
-                        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
-                        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
-"
-
-CONFFILES_${PN} = "${sysconfdir}/machine-id \
-                ${sysconfdir}/systemd/coredump.conf \
-                ${sysconfdir}/systemd/journald.conf \
-                ${sysconfdir}/systemd/logind.conf \
-                ${sysconfdir}/systemd/system.conf \
-                ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
-                ${datadir}/dbus-1/services \
-                ${datadir}/dbus-1/system-services \
-                ${datadir}/polkit-1 \
-                ${datadir}/${BPN} \
-                ${datadir}/factory \
-                ${sysconfdir}/dbus-1/ \
-                ${sysconfdir}/machine-id \
-                ${sysconfdir}/modules-load.d/ \
-                ${sysconfdir}/pam.d/ \
-                ${sysconfdir}/sysctl.d/ \
-                ${sysconfdir}/systemd/ \
-                ${sysconfdir}/tmpfiles.d/ \
-                ${sysconfdir}/xdg/ \
-                ${sysconfdir}/init.d/README \
-                ${sysconfdir}/resolv-conf.systemd \
-                ${rootlibexecdir}/systemd/* \
-                ${systemd_unitdir}/* \
-                ${base_libdir}/security/*.so \
-                /cgroup \
-                ${bindir}/systemd* \
-                ${bindir}/busctl \
-                ${bindir}/coredumpctl \
-                ${bindir}/localectl \
-                ${bindir}/hostnamectl \
-                ${bindir}/timedatectl \
-                ${bindir}/bootctl \
-                ${bindir}/kernel-install \
-                ${exec_prefix}/lib/tmpfiles.d/*.conf \
-                ${exec_prefix}/lib/systemd \
-                ${exec_prefix}/lib/modules-load.d \
-                ${exec_prefix}/lib/sysctl.d \
-                ${exec_prefix}/lib/sysusers.d \
-                ${exec_prefix}/lib/environment.d \
-                ${localstatedir} \
-                ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
-                ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
-                ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
-                ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
-                ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
-                ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
-                ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
-                ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
-                ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
-                ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
-                ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
-               "
-
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
-
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty"
-RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
-
-RRECOMMENDS_${PN} += "systemd-extra-utils \
-                      systemd-compat-units udev-hwdb \
-                      util-linux-fsck e2fsprogs-e2fsck \
-                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
-                      os-release \
-"
-
-INSANE_SKIP_${PN} += "dev-so libdir"
-INSANE_SKIP_${PN}-dbg += "libdir"
-INSANE_SKIP_${PN}-doc += " libdir"
-
-PACKAGES =+ "udev udev-hwdb"
-
-RPROVIDES_udev = "hotplug"
-
-RDEPENDS_udev-hwdb += "udev"
-
-FILES_udev += "${base_sbindir}/udevd \
-               ${rootlibexecdir}/systemd/systemd-udevd \
-               ${rootlibexecdir}/udev/accelerometer \
-               ${rootlibexecdir}/udev/ata_id \
-               ${rootlibexecdir}/udev/cdrom_id \
-               ${rootlibexecdir}/udev/collect \
-               ${rootlibexecdir}/udev/findkeyboards \
-               ${rootlibexecdir}/udev/keyboard-force-release.sh \
-               ${rootlibexecdir}/udev/keymap \
-               ${rootlibexecdir}/udev/mtd_probe \
-               ${rootlibexecdir}/udev/scsi_id \
-               ${rootlibexecdir}/udev/v4l_id \
-               ${rootlibexecdir}/udev/keymaps \
-               ${rootlibexecdir}/udev/rules.d/*.rules \
-               ${sysconfdir}/udev \
-               ${sysconfdir}/init.d/systemd-udevd \
-               ${systemd_unitdir}/system/*udev* \
-               ${systemd_unitdir}/system/*.wants/*udev* \
-               ${base_bindir}/udevadm \
-               ${datadir}/bash-completion/completions/udevadm \
-              "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
-
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
-
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-# TODO:
-# u-a for runlevel and telinit
-
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
-
-ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY[init] ?= "300"
-
-ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
-ALTERNATIVE_PRIORITY[halt] ?= "300"
-
-ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
-ALTERNATIVE_PRIORITY[reboot] ?= "300"
-
-ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
-ALTERNATIVE_PRIORITY[shutdown] ?= "300"
-
-ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
-ALTERNATIVE_PRIORITY[poweroff] ?= "300"
-
-ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
-ALTERNATIVE_PRIORITY[runlevel] ?= "300"
-
-ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
-ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
-ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
-
-pkg_postinst_${PN} () {
-	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
-		-i $D${sysconfdir}/nsswitch.conf
-}
-
-pkg_prerm_${PN} () {
-	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-		-e '/^hosts:/s/\s*myhostname//' \
-		-i $D${sysconfdir}/nsswitch.conf
-}
-
-PACKAGE_WRITE_DEPS += "qemu-native"
-pkg_postinst_udev-hwdb () {
-	if test -n "$D"; then
-		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
-			--root $D
-		chown root:root $D${sysconfdir}/udev/hwdb.bin
-	else
-		udevadm hwdb --update
-	fi
-}
-
-pkg_prerm_udev-hwdb () {
-	rm -f $D${sysconfdir}/udev/hwdb.bin
-}
-
-# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
-# that we don't build both udev and systemd in world builds.
-python () {
-    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
-        raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb
new file mode 100644
index 0000000..2e6558d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_237.bb
@@ -0,0 +1,595 @@
+require systemd.inc
+
+PROVIDES = "udev"
+
+PE = "1"
+
+DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup util-linux"
+
+SECTION = "base/shell"
+
+inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages distro_features_check
+
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SRC_URI += "file://touchscreen.rules \
+           file://00-create-volatile.conf \
+           file://init \
+           file://0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
+           file://0001-Use-getenv-when-secure-versions-are-not-available.patch \
+           file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
+           file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+           file://0004-implment-systemd-sysv-install-for-OE.patch \
+           file://0005-rules-whitelist-hd-devices.patch \
+           file://0006-Make-root-s-home-directory-configurable.patch \
+           file://0007-Revert-rules-remove-firmware-loading-rules.patch \
+           file://0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+           file://0009-remove-duplicate-include-uchar.h.patch \
+           file://0010-check-for-uchar.h-in-meson.build.patch \
+           file://0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
+           file://0012-rules-watch-metadata-changes-in-ide-devices.patch \
+           file://0013-add-fallback-parse_printf_format-implementation.patch \
+           file://0014-src-basic-missing.h-check-for-missing-strndupa.patch \
+           file://0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
+           file://0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \
+           file://0017-Include-netinet-if_ether.h.patch \
+           file://0018-check-for-missing-canonicalize_file_name.patch \
+           file://0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch \
+           file://0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch \
+           file://0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
+           file://0022-don-t-use-glibc-specific-qsort_r.patch \
+           file://0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
+           file://0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+           file://0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch \
+           file://0026-Use-uintmax_t-for-handling-rlim_t.patch \
+           file://0027-remove-nobody-user-group-checking.patch \
+           file://0028-add-missing-FTW_-macros-for-musl.patch \
+           file://0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch \
+           file://0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
+           file://0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \
+           file://0032-memfd.patch \
+           file://0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch \
+           file://libmount.patch \
+           file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \
+           file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
+           "
+SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
+
+# Workaround undefined reference to `__stack_chk_fail_local' on qemux86 and qemuppc for musl
+SRC_URI_append_libc-musl_qemux86 = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+SRC_URI_append_libc-musl_qemuppc = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+
+PAM_PLUGINS = " \
+    pam-plugin-unix \
+    pam-plugin-loginuid \
+    pam-plugin-keyinit \
+"
+
+PACKAGECONFIG ??= " \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+    backlight \
+    binfmt \
+    firstboot \
+    hibernate \
+    hostnamed \
+    ima \
+    localed \
+    logind \
+    machined \
+    myhostname \
+    networkd \
+    nss \
+    polkit \
+    quotacheck \
+    randomseed \
+    resolved \
+    smack \
+    sysusers \
+    timedated \
+    timesyncd \
+    utmp \
+    vconsole \
+    xz \
+"
+
+PACKAGECONFIG_remove_libc-musl = " \
+    localed \
+    myhostname \
+    nss \
+    resolved \
+    selinux \
+    smack \
+    sysusers \
+    utmp \
+"
+
+# Use the upstream systemd serial-getty@.service and rely on
+# systemd-getty-generator instead of using the OE-core specific
+# systemd-serialgetty.bb - not enabled by default.
+PACKAGECONFIG[serial-getty-generator] = ""
+
+PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
+PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
+PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
+PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
+PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
+PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
+PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
+PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
+PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
+PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
+PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
+PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
+PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
+# importd requires curl/xz/zlib/bzip2/gcrypt
+PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
+# Update NAT firewall rules
+PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
+PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
+PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false"
+PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
+PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
+PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
+PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
+PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
+PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
+PACKAGECONFIG[myhostname] = "-Dmyhostname=true,-Dmyhostname=false"
+PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
+PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
+PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
+PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
+PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
+PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
+PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
+PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
+# libseccomp is found in meta-security
+PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
+PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
+PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
+PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
+PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
+PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
+PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
+PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
+PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
+# Verify keymaps on locale change
+PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
+PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
+PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
+
+# Helper variables to clarify locations.  This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${root_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+# This links udev statically with systemd helper library.
+# Otherwise udev package would depend on systemd package (which has the needed shared library),
+# and always pull it into images.
+EXTRA_OEMESON += "-Dlink-udev-shared=false"
+
+EXTRA_OEMESON += "-Dnobody-user=nobody \
+                  -Dnobody-group=nobody \
+                  -Droothomedir=${ROOTHOME} \
+                  -Drootlibdir=${rootlibdir} \
+                  -Drootprefix=${rootprefix} \
+                  -Dsysvrcnd-path=${sysconfdir} \
+                  -Dfirmware-path=${nonarch_base_libdir}/firmware \
+                  "
+
+# Hardcode target binary paths to avoid using paths from sysroot
+EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
+                  -Dkill-path=${base_bindir}/kill \
+                  -Dkmod-path=${base_bindir}/kmod \
+                  -Dmount-path=${base_bindir}/mount \
+                  -Dquotacheck-path=${sbindir}/quotacheck \
+                  -Dquotaon-path=${sbindir}/quotaon \
+                  -Dsulogin-path=${base_sbindir}/sulogin \
+                  -Dumount-path=${base_bindir}/umount"
+
+do_install() {
+	meson_do_install
+	install -d ${D}/${base_sbindir}
+	if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
+		# Provided by a separate recipe
+		rm ${D}${systemd_unitdir}/system/serial-getty* -f
+	fi
+
+	# Provide support for initramfs
+	[ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+	[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+	# Create machine-id
+	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+	touch ${D}${sysconfdir}/machine-id
+
+	install -d ${D}${sysconfdir}/udev/rules.d/
+	install -d ${D}${sysconfdir}/tmpfiles.d
+	install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+	install -d ${D}${libdir}/pkgconfig
+	install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
+
+	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+		install -d ${D}${sysconfdir}/init.d
+		install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
+		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+	fi
+
+	chown root:systemd-journal ${D}/${localstatedir}/log/journal
+
+	# Delete journal README, as log can be symlinked inside volatile.
+	rm -f ${D}/${localstatedir}/log/README
+
+	install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+	install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+	install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+	install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+	install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+
+	# Create symlinks for systemd-update-utmp-runlevel.service
+	if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+	fi
+
+	# Enable journal to forward message to syslog daemon
+	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+	# Set the maximium size of runtime journal to 64M as default
+	sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
+
+	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+	# for existence else it fails
+	if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
+		${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
+	fi
+	if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
+		echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+		echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+		echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+		ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
+	else
+		sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+		ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
+	fi
+	install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
+
+	# If polkit is setup fixup permissions and ownership
+	if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
+		if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
+			chmod 700 ${D}${datadir}/polkit-1/rules.d
+			chown polkitd:root ${D}${datadir}/polkit-1/rules.d
+		fi
+	fi
+}
+
+
+python populate_packages_prepend (){
+    systemdlibdir = d.getVar("rootlibdir")
+    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
+
+PACKAGES =+ "\
+    ${PN}-gui \
+    ${PN}-vconsole-setup \
+    ${PN}-initramfs \
+    ${PN}-analyze \
+    ${PN}-kernel-install \
+    ${PN}-rpm-macros \
+    ${PN}-binfmt \
+    ${PN}-zsh-completion \
+    ${PN}-xorg-xinitrc \
+    ${PN}-container \
+    ${PN}-extra-utils \
+"
+
+SUMMARY_${PN}-container = "Tools for containers and VMs"
+DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
+SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+
+USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
+                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+RDEPENDS_${PN}-kernel-install += "bash"
+FILES_${PN}-kernel-install = "${bindir}/kernel-install \
+                              ${sysconfdir}/kernel/ \
+                              ${exec_prefix}/lib/kernel \
+                             "
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+                         "
+
+FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
+
+FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
+
+FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
+                      ${exec_prefix}/lib/binfmt.d \
+                      ${rootlibexecdir}/systemd/systemd-binfmt \
+                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+                      ${systemd_unitdir}/system/systemd-binfmt.service"
+RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+
+FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+                         ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+                         ${base_bindir}/machinectl \
+                         ${bindir}/systemd-nspawn \
+                         ${nonarch_libdir}/systemd/import-pubring.gpg \
+                         ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
+                         ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
+                         ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
+                         ${systemd_system_unitdir}/machine.slice \
+                         ${systemd_system_unitdir}/machines.target \
+                         ${systemd_system_unitdir}/org.freedesktop.import1.busname \
+                         ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
+                         ${systemd_system_unitdir}/systemd-importd.service \
+                         ${systemd_system_unitdir}/systemd-machined.service \
+                         ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
+                         ${systemd_system_unitdir}/var-lib-machines.mount \
+                         ${rootlibexecdir}/systemd/systemd-import \
+                         ${rootlibexecdir}/systemd/systemd-importd \
+                         ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
+                         ${rootlibexecdir}/systemd/systemd-journal-remote \
+                         ${rootlibexecdir}/systemd/systemd-journal-upload \
+                         ${rootlibexecdir}/systemd/systemd-machined \
+                         ${rootlibexecdir}/systemd/systemd-pull \
+                         ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
+                         ${systemd_system_unitdir}/systemd-nspawn@.service \
+                         ${libdir}/libnss_mymachines.so.2 \
+                         ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+                         ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+                         ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+                         ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
+                         ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
+                        "
+
+FILES_${PN}-extra-utils = "\
+                        ${base_bindir}/systemd-escape \
+                        ${base_bindir}/systemd-inhibit \
+                        ${bindir}/systemd-detect-virt \
+                        ${bindir}/systemd-path \
+                        ${bindir}/systemd-run \
+                        ${bindir}/systemd-cat \
+                        ${bindir}/systemd-delta \
+                        ${bindir}/systemd-cgls \
+                        ${bindir}/systemd-cgtop \
+                        ${bindir}/systemd-stdio-bridge \
+                        ${base_bindir}/systemd-ask-password \
+                        ${base_bindir}/systemd-tty-ask-password-agent \
+                        ${systemd_unitdir}/system/systemd-ask-password-console.path \
+                        ${systemd_unitdir}/system/systemd-ask-password-console.service \
+                        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+                        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+                        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+                        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
+                        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+                        ${rootlibexecdir}/systemd/systemd-resolve-host \
+                        ${rootlibexecdir}/systemd/systemd-ac-power \
+                        ${rootlibexecdir}/systemd/systemd-activate \
+                        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+                        ${systemd_unitdir}/system/systemd-bus-proxyd.service \
+                        ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
+                        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+                        ${rootlibexecdir}/systemd/systemd-reply-password \
+                        ${rootlibexecdir}/systemd/systemd-sleep \
+                        ${rootlibexecdir}/systemd/system-sleep \
+                        ${systemd_unitdir}/system/systemd-hibernate.service \
+                        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+                        ${systemd_unitdir}/system/systemd-suspend.service \
+                        ${systemd_unitdir}/system/sleep.target \
+                        ${rootlibexecdir}/systemd/systemd-initctl \
+                        ${systemd_unitdir}/system/systemd-initctl.service \
+                        ${systemd_unitdir}/system/systemd-initctl.socket \
+                        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+                        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+                        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+"
+
+CONFFILES_${PN} = "${sysconfdir}/machine-id \
+                ${sysconfdir}/systemd/coredump.conf \
+                ${sysconfdir}/systemd/journald.conf \
+                ${sysconfdir}/systemd/logind.conf \
+                ${sysconfdir}/systemd/system.conf \
+                ${sysconfdir}/systemd/user.conf"
+
+FILES_${PN} = " ${base_bindir}/* \
+                ${datadir}/dbus-1/services \
+                ${datadir}/dbus-1/system-services \
+                ${datadir}/polkit-1 \
+                ${datadir}/${BPN} \
+                ${datadir}/factory \
+                ${sysconfdir}/dbus-1/ \
+                ${sysconfdir}/machine-id \
+                ${sysconfdir}/modules-load.d/ \
+                ${sysconfdir}/pam.d/ \
+                ${sysconfdir}/sysctl.d/ \
+                ${sysconfdir}/systemd/ \
+                ${sysconfdir}/tmpfiles.d/ \
+                ${sysconfdir}/xdg/ \
+                ${sysconfdir}/init.d/README \
+                ${sysconfdir}/resolv-conf.systemd \
+                ${rootlibexecdir}/systemd/* \
+                ${systemd_unitdir}/* \
+                ${base_libdir}/security/*.so \
+                /cgroup \
+                ${bindir}/systemd* \
+                ${bindir}/busctl \
+                ${bindir}/coredumpctl \
+                ${bindir}/localectl \
+                ${bindir}/hostnamectl \
+                ${bindir}/timedatectl \
+                ${bindir}/bootctl \
+                ${bindir}/kernel-install \
+                ${exec_prefix}/lib/tmpfiles.d/*.conf \
+                ${exec_prefix}/lib/systemd \
+                ${exec_prefix}/lib/modules-load.d \
+                ${exec_prefix}/lib/sysctl.d \
+                ${exec_prefix}/lib/sysusers.d \
+                ${exec_prefix}/lib/environment.d \
+                ${localstatedir} \
+                ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
+                ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
+                ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
+                ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
+                ${nonarch_base_libdir}/modprobe.d/systemd.conf \
+                ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
+                ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
+                ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
+                ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
+                ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
+                ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
+                ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
+               "
+
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
+
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty"
+RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
+RDEPENDS_${PN} += "volatile-binds update-rc.d"
+
+RRECOMMENDS_${PN} += "systemd-extra-utils \
+                      systemd-compat-units udev-hwdb \
+                      util-linux-fsck e2fsprogs-e2fsck \
+                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+                      os-release \
+"
+
+INSANE_SKIP_${PN} += "dev-so libdir"
+INSANE_SKIP_${PN}-dbg += "libdir"
+INSANE_SKIP_${PN}-doc += " libdir"
+
+PACKAGES =+ "udev udev-hwdb"
+
+RPROVIDES_udev = "hotplug"
+
+RDEPENDS_udev-hwdb += "udev"
+
+FILES_udev += "${base_sbindir}/udevd \
+               ${rootlibexecdir}/systemd/systemd-udevd \
+               ${rootlibexecdir}/udev/accelerometer \
+               ${rootlibexecdir}/udev/ata_id \
+               ${rootlibexecdir}/udev/cdrom_id \
+               ${rootlibexecdir}/udev/collect \
+               ${rootlibexecdir}/udev/findkeyboards \
+               ${rootlibexecdir}/udev/keyboard-force-release.sh \
+               ${rootlibexecdir}/udev/keymap \
+               ${rootlibexecdir}/udev/mtd_probe \
+               ${rootlibexecdir}/udev/scsi_id \
+               ${rootlibexecdir}/udev/v4l_id \
+               ${rootlibexecdir}/udev/keymaps \
+               ${rootlibexecdir}/udev/rules.d/*.rules \
+               ${sysconfdir}/udev \
+               ${sysconfdir}/init.d/systemd-udevd \
+               ${systemd_unitdir}/system/*udev* \
+               ${systemd_unitdir}/system/*.wants/*udev* \
+               ${base_bindir}/udevadm \
+               ${datadir}/bash-completion/completions/udevadm \
+              "
+
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
+ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
+
+pkg_postinst_${PN} () {
+	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+		-i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+		-e '/^hosts:/s/\s*myhostname//' \
+		-i $D${sysconfdir}/nsswitch.conf
+}
+
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst_udev-hwdb () {
+	if test -n "$D"; then
+		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+			--root $D
+		chown root:root $D${sysconfdir}/udev/hwdb.bin
+	else
+		udevadm hwdb --update
+	fi
+}
+
+pkg_prerm_udev-hwdb () {
+	rm -f $D${sysconfdir}/udev/hwdb.bin
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 5b9c422..8585a41 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -53,8 +53,15 @@
 }
 
 pkg_postinst_${PN} () {
+# run this on host and on target
+if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
+       exit 0
+fi
+}
+
+pkg_postinst_ontarget_${PN} () {
 # run this on the target
-if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
+if [ -e /proc/consoles ]; then
 	tmp="${SERIAL_CONSOLES_CHECK}"
 	for i in $tmp
 	do
@@ -68,11 +75,7 @@
 	done
 	kill -HUP 1
 else
-	if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
-		exit 0
-	else
-		exit 1
-	fi
+	exit 1
 fi
 }
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 22a0ecf..ad65819 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -28,9 +28,11 @@
 S = "${WORKDIR}/sysvinit-${PV}"
 B = "${S}/src"
 
-inherit update-alternatives
+inherit update-alternatives distro_features_check
 DEPENDS_append = " update-rc.d-native base-passwd"
 
+REQUIRED_DISTRO_FEATURES = "sysvinit"
+
 ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall"
 
 ALTERNATIVE_PRIORITY = "200"
@@ -105,8 +107,3 @@
 	chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
 	chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
 }
-
-python () {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        raise bb.parse.SkipPackage("'sysvinit' not in DISTRO_FEATURES")
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb
deleted file mode 100644
index 02fb23a..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.2.bb
+++ /dev/null
@@ -1,96 +0,0 @@
-SUMMARY = "eudev is a fork of systemd's udev"
-HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
-LICENSE = "GPLv2.0+ & LGPL-2.1+"
-LICENSE_libudev = "LGPL-2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
-
-PROVIDES = "udev"
-
-SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
-           file://0014-Revert-rules-remove-firmware-loading-rules.patch \
-           file://Revert-udev-remove-userspace-firmware-loading-suppor.patch \
-           file://devfs-udev.rules \
-           file://init \
-           file://links.conf \
-           file://local.rules \
-           file://permissions.rules \
-           file://run.rules \
-           file://udev.rules \
-"
-UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
-
-SRC_URI[md5sum] = "41e19b70462692fefd072a3f38818b6e"
-SRC_URI[sha256sum] = "3e4c56ec2fc1854afd0a31f3affa48f922c62d40ee12a0c1a4b4f152ef5b0f63"
-
-inherit autotools update-rc.d qemu pkgconfig
-
-EXTRA_OECONF = " \
-    --sbindir=${base_sbindir} \
-    --with-rootlibdir=${base_libdir} \
-    --with-rootprefix= \
-"
-
-PACKAGECONFIG ??= "hwdb"
-PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
-
-do_install_append() {
-	install -d ${D}${sysconfdir}/init.d
-	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
-	sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
-
-	install -d ${D}${sysconfdir}/udev/rules.d
-	install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
-
-	# Use classic network interface naming scheme
-	touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
-
-	# hid2hci has moved to bluez4. removed in udev as of version 169
-	rm -f ${D}${base_libdir}/udev/hid2hci
-}
-
-do_install_prepend_class-target () {
-	# Remove references to buildmachine
-	sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-		${B}/src/udev/keyboard-keys-from-name.h
-}
-
-INITSCRIPT_NAME = "udev"
-INITSCRIPT_PARAMS = "start 04 S ."
-
-PACKAGES =+ "libudev"
-PACKAGES =+ "eudev-hwdb"
-
-
-FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
-                   ${includedir}/libudev.h ${libdir}/libudev.so \
-                   ${includedir}/udev.h ${libdir}/libudev.la \
-                   ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
-FILES_libudev = "${base_libdir}/libudev.so.*"
-FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
-
-RDEPENDS_eudev-hwdb += "eudev"
-
-RPROVIDES_${PN} = "hotplug udev"
-RPROVIDES_eudev-hwdb += "udev-hwdb"
-
-python () {
-    if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
-        raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
-}
-
-PACKAGE_WRITE_DEPS += "qemu-native"
-pkg_postinst_eudev-hwdb () {
-    if test -n "$D"; then
-        ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
-        chown root:root $D${sysconfdir}/udev/hwdb.bin
-    else
-        udevadm hwdb --update
-    fi
-}
-
-pkg_prerm_eudev-hwdb () {
-        rm -f $D${sysconfdir}/udev/hwdb.bin
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb
new file mode 100644
index 0000000..88ad8f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.5.bb
@@ -0,0 +1,92 @@
+SUMMARY = "eudev is a fork of systemd's udev"
+HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
+LICENSE = "GPLv2.0+ & LGPL-2.1+"
+LICENSE_libudev = "LGPL-2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
+
+PROVIDES = "udev"
+
+SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
+           file://0014-Revert-rules-remove-firmware-loading-rules.patch \
+           file://Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+           file://devfs-udev.rules \
+           file://init \
+           file://links.conf \
+           file://local.rules \
+           file://permissions.rules \
+           file://run.rules \
+           file://udev.rules \
+"
+
+SRC_URI[md5sum] = "6ca08c0e14380f87df8e8aceac123671"
+SRC_URI[sha256sum] = "49c2d04105cad2526302627e040fa24b1916a9a3e059539bc8bb919b973890af"
+
+inherit autotools update-rc.d qemu pkgconfig distro_features_check
+
+CONFLICT_DISTRO_FEATURES = "systemd"
+
+EXTRA_OECONF = " \
+    --sbindir=${base_sbindir} \
+    --with-rootlibdir=${base_libdir} \
+    --with-rootprefix= \
+"
+
+PACKAGECONFIG ??= "hwdb"
+PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+	sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
+
+	install -d ${D}${sysconfdir}/udev/rules.d
+	install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
+
+	# Use classic network interface naming scheme
+	touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+
+	# hid2hci has moved to bluez4. removed in udev as of version 169
+	rm -f ${D}${base_libdir}/udev/hid2hci
+}
+
+do_install_prepend_class-target () {
+	# Remove references to buildmachine
+	sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+		${B}/src/udev/keyboard-keys-from-name.h
+}
+
+INITSCRIPT_NAME = "udev"
+INITSCRIPT_PARAMS = "start 04 S ."
+
+PACKAGES =+ "libudev"
+PACKAGES =+ "eudev-hwdb"
+
+
+FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+                   ${includedir}/libudev.h ${libdir}/libudev.so \
+                   ${includedir}/udev.h ${libdir}/libudev.la \
+                   ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
+FILES_libudev = "${base_libdir}/libudev.so.*"
+FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
+
+RDEPENDS_eudev-hwdb += "eudev"
+
+RPROVIDES_${PN} = "hotplug udev"
+RPROVIDES_eudev-hwdb += "udev-hwdb"
+
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst_eudev-hwdb () {
+    if test -n "$D"; then
+        ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
+        chown root:root $D${sysconfdir}/udev/hwdb.bin
+    else
+        udevadm hwdb --update
+    fi
+}
+
+pkg_prerm_eudev-hwdb () {
+        rm -f $D${sysconfdir}/udev/hwdb.bin
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
index 6fc6f6e..76d4312 100644
--- a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
@@ -16,7 +16,7 @@
            file://check-if-symlinks-are-valid.patch \
            file://fix-to-handle-priority-numbers-correctly.patch \
           "
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
index f0ffd25..0b7db52 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
@@ -20,7 +20,7 @@
 
 #gtk-doc is not enabled as it requires xmlto which requires util-linux
 inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
-DEPENDS = "zlib ncurses"
+DEPENDS = "zlib ncurses virtual/crypt"
 DEPENDS_append_class-native = " lzo-native"
 DEPENDS_append_class-nativesdk = " lzo-native"
 
@@ -31,7 +31,7 @@
              util-linux-swaponoff util-linux-losetup util-linux-umount \
              util-linux-mount util-linux-readprofile util-linux-uuidd \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs util-linux-fsck \
-             util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \
+             util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-rfkill \
              util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
              util-linux-partx util-linux-hwclock util-linux-mountpoint \
              util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit \
@@ -44,7 +44,7 @@
 SHARED_EXTRA_OECONF = "--disable-use-tty-group \
                        --disable-makeinstall-chown \
                        --enable-kill --enable-last --enable-mesg --enable-partx \
-                       --enable-raw --enable-reset --disable-login \
+                       --enable-raw --enable-rfkill --disable-login \
                        --disable-vipw --disable-newgrp --disable-chfn-chsh \
                        --enable-write --enable-mount \
                        --enable-libuuid --enable-libblkid --enable-fsck \
@@ -86,7 +86,7 @@
 FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
 FILES_util-linux-uuidd = "${sbindir}/uuidd"
-FILES_util-linux-reset = "${base_bindir}/reset*"
+FILES_util-linux-rfkill = "${sbindir}/rfkill*"
 FILES_util-linux-partx = "${sbindir}/partx"
 FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
 FILES_util-linux-findfs = "${sbindir}/findfs"
@@ -119,9 +119,6 @@
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
 RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 
-# reset calls 'tput'
-RDEPENDS_util-linux-reset += "ncurses"
-
 RDEPENDS_util-linux-runuser += "libpam"
 RDEPENDS_util-linux-su += "libpam"
 
@@ -160,7 +157,7 @@
 
         sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
         sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin"
-        binprogs_a="dmesg getopt kill more umount mount login reset su mountpoint"
+        binprogs_a="dmesg getopt kill more umount mount login su mountpoint"
 
         if [ "${base_sbindir}" != "${sbindir}" ]; then
         	mkdir -p ${D}${base_sbindir}
@@ -198,17 +195,18 @@
 	fi
 }
 
-# reset and nologin causes a conflict with ncurses-native and shadow-native
+# nologin causes a conflict with shadow-native
+# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir})
 do_install_append_class-native () {
-	rm -f ${D}${base_bindir}/reset
 	rm -f ${D}${base_sbindir}/nologin
+	rm -f ${D}${base_bindir}/kill
 }
 
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
 ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -220,14 +218,14 @@
 ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
 ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
 
-ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
+ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
 
 ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
 ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
 ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
 ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
 ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
-ALTERNATIVE_LINK_NAME[reset.1] = "${mandir}/man1/reset.1"
+ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8"
 ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
 ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
 ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
@@ -272,9 +270,8 @@
 ALTERNATIVE_util-linux-blkid = "blkid"
 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
 
-ALTERNATIVE_util-linux-reset = "reset"
-ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
-ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
+ALTERNATIVE_util-linux-rfkill = "rfkill"
+ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill"
 
 ALTERNATIVE_util-linux-getopt = "getopt"
 ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
index 46d4d37..748b6ef 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
@@ -5,15 +5,16 @@
 Signed-off-by: Tudor Florea  <tudor.florea@enea.com>
 Upstream-Status: Inappropriate 
 
-diff -ruN a/configure.ac b/configure.ac
---- a/configure.ac	2014-05-27 12:37:42.119772658 +0200
-+++ b/configure.ac	2014-05-27 12:41:46.225573272 +0200
-@@ -10,7 +10,7 @@
+Index: util-linux-2.32/configure.ac
+===================================================================
+--- util-linux-2.32.orig/configure.ac
++++ util-linux-2.32/configure.ac
+@@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])
  dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
  dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
  AC_USE_SYSTEM_EXTENSIONS
--AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
-+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
-
+-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects])
++AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
+ 
  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
  			    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
index a5b1ff1..e475289 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
@@ -5,11 +5,11 @@
 Signed-off-by: Saul Wold <sgw@linux.intel.com
 Upstream-Status: Inappropriate [configuration]
 
-Index: util-linux-2.22.1/configure.ac
+Index: util-linux-2.31/configure.ac
 ===================================================================
---- util-linux-2.22.1.orig/configure.ac
-+++ util-linux-2.22.1/configure.ac
-@@ -73,7 +73,10 @@ AC_SUBST([localstatedir])
+--- util-linux-2.31.orig/configure.ac
++++ util-linux-2.31/configure.ac
+@@ -89,7 +89,10 @@ AC_SUBST([runstatedir])
  usrbin_execdir='${exec_prefix}/bin'
  AC_SUBST([usrbin_execdir])
  
@@ -20,4 +20,4 @@
 +fi
  AC_SUBST([usrsbin_execdir])
  
- case $libdir in
+ AS_CASE([$libdir],
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch
deleted file mode 100644
index b9fa1ca..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/no_getrandom.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-getrandom() is only available in glibc 2.25+ and uninative may relocate 
-binaries onto systems that don't have this function. For now, force the 
-code to the older codepath until we can come up with a better solution 
-for this kind of issue.
-
-Upstream-Status: Inappropriate
-RP
-2016/8/15
-
-Index: util-linux-2.30/configure.ac
-===================================================================
---- util-linux-2.30.orig/configure.ac
-+++ util-linux-2.30/configure.ac
-@@ -399,7 +399,6 @@ AC_CHECK_FUNCS([ \
- 	getdtablesize \
- 	getexecname \
- 	getmntinfo \
--	getrandom \
- 	getrlimit \
- 	getsgnam \
- 	inotify_init \
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb
deleted file mode 100644
index 39449d9..0000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.30.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-MAJOR_VERSION = "2.30"
-require util-linux.inc
-
-# To support older hosts, we need to patch and/or revert
-# some upstream changes.  Only do this for native packages.
-OLDHOST = ""
-OLDHOST_class-native = "file://util-linux-native-qsort.patch"
-
-SRC_URI += "file://configure-sbindir.patch \
-            file://runuser.pamd \
-            file://runuser-l.pamd \
-            ${OLDHOST} \
-            file://ptest.patch \
-            file://run-ptest \
-            file://display_testname_for_subtest.patch \
-            file://avoid_parallel_tests.patch \
-"
-SRC_URI_append_class-native = " file://no_getrandom.patch"
-SRC_URI[md5sum] = "eaa3429150268027908a1b8ae6ee9a62"
-SRC_URI[sha256sum] = "c208a4ff6906cb7f57940aa5bc3a6eed146e50a7cc0a092f52ef2ab65057a08d"
-
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
-
-EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
-                             --disable-fallocate \
-			     --disable-use-tty-group \
-"
-EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
-                                --disable-fallocate \
-				--disable-use-tty-group \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb
new file mode 100644
index 0000000..55cc98c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.32.bb
@@ -0,0 +1,30 @@
+MAJOR_VERSION = "2.32"
+require util-linux.inc
+
+# To support older hosts, we need to patch and/or revert
+# some upstream changes.  Only do this for native packages.
+OLDHOST = ""
+OLDHOST_class-native = "file://util-linux-native-qsort.patch"
+
+SRC_URI += "file://configure-sbindir.patch \
+            file://runuser.pamd \
+            file://runuser-l.pamd \
+            ${OLDHOST} \
+            file://ptest.patch \
+            file://run-ptest \
+            file://display_testname_for_subtest.patch \
+            file://avoid_parallel_tests.patch \
+"
+SRC_URI[md5sum] = "e0d8a25853f88cd15ff557e5d8cb4ea7"
+SRC_URI[sha256sum] = "6c7397abc764e32e8159c2e96042874a190303e77adceb4ac5bd502a272a4734"
+
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
+EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
+                             --disable-fallocate \
+			     --disable-use-tty-group \
+"
+EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
+                                --disable-fallocate \
+				--disable-use-tty-group \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb b/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
index a6e3254..d861a71 100644
--- a/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -67,7 +67,7 @@
     install -m 0755 mount-copybind ${D}${base_sbindir}/
 
     install -d ${D}${systemd_unitdir}/system
-    for service in ${SYSTEMD_SERVICE_volatile-binds}; do
+    for service in ${SYSTEMD_SERVICE_${PN}}; do
         install -m 0644 $service ${D}${systemd_unitdir}/system/
     done
 
diff --git a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
index 403b482..7ccbe1f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch
@@ -7,14 +7,15 @@
 
 Upstream-Status: Inappropriate [disable feature]
 
-diff -uNr zlib-1.2.6.orig/Makefile.in zlib-1.2.6/Makefile.in
---- zlib-1.2.6.orig/Makefile.in	2012-01-28 23:48:50.000000000 +0100
-+++ zlib-1.2.6/Makefile.in	2012-02-13 15:38:20.577700723 +0100
-@@ -199,7 +199,6 @@
+Index: zlib-1.2.11/Makefile.in
+===================================================================
+--- zlib-1.2.11.orig/Makefile.in
++++ zlib-1.2.11/Makefile.in
+@@ -322,7 +322,6 @@ install-libs: $(LIBS)
  	  rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
  	  ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
  	  ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
 -	  ($(LDCONFIG) || true)  >/dev/null 2>&1; \
  	fi
- 	cp zlib.3 $(DESTDIR)$(man3dir)
- 	chmod 644 $(DESTDIR)$(man3dir)/zlib.3
+ 	rm -f $(DESTDIR)$(man3dir)/zlib.3
+ 	cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
index 68f1b3c..ef232c1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
@@ -67,4 +67,10 @@
 	install -d ${D}${localstatedir}/cache/apt/archives/partial
 
 	install -d ${D}${localstatedir}/log/apt/
+
+	install -d ${D}${includedir}/apt-pkg
+	for h in `find ${S}/apt-pkg ${S}/apt-inst -name '*.h'`
+	do
+		install -m 0644 $h ${D}${includedir}/apt-pkg
+	done
 }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
index 0532671..d16b5c7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
@@ -17,10 +17,10 @@
  configure.ac | 7 -------
  2 files changed, 3 insertions(+), 13 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 7680f08..69527a5 100644
---- a/Makefile
-+++ b/Makefile
+Index: apt-1.2.24/Makefile
+===================================================================
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
 @@ -9,8 +9,8 @@ endif
  .PHONY: default
  default: startup all
@@ -32,9 +32,9 @@
  	$(MAKE) -C vendor $@
  	$(MAKE) -C apt-pkg $@
  	$(MAKE) -C apt-inst $@
-@@ -21,8 +21,6 @@ all headers library clean veryclean binary program doc manpages docbook test upd
+@@ -21,8 +21,6 @@ all headers library clean veryclean bina
  	$(MAKE) -C dselect $@
- 	$(MAKE) -C doc $@
+ #	$(MAKE) -C doc $@
  	$(MAKE) -C po $@
 -	# FIXME: -C test has issue swith parallel builds, investigate!
 -	-$(MAKE) -C test $@
@@ -52,10 +52,10 @@
  
  dirs: startup
  
-diff --git a/configure.ac b/configure.ac
-index 1f05da5..e47f459 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: apt-1.2.24/configure.ac
+===================================================================
+--- apt-1.2.24.orig/configure.ac
++++ apt-1.2.24/configure.ac
 @@ -90,13 +90,6 @@ AC_CHECK_LIB(curl, curl_easy_init,
       AC_MSG_ERROR([failed: I need CURL due https support]),
  )
@@ -70,6 +70,3 @@
  AC_SUBST(BDBLIB)
  
  HAVE_ZLIB=no
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
index 801ae6d..899c6ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
@@ -1,12 +1,14 @@
 Upstream-Status: Pending
 
---- a/apt-pkg/contrib/weakptr.h
-+++ b/apt-pkg/contrib/weakptr.h
+Index: apt-1.2.24/apt-pkg/contrib/weakptr.h
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/contrib/weakptr.h
++++ apt-1.2.24/apt-pkg/contrib/weakptr.h
 @@ -21,6 +21,7 @@
  #ifndef WEAK_POINTER_H
  #define WEAK_POINTER_H
  
 +#include <cstdlib>
  #include <set>
- /**
-  * Class for objects providing support for weak pointers.
+ #include <stddef.h>
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
index 46e3161..0c686d6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
@@ -8,16 +8,16 @@
 
 Upstream-Status: Pending
 
-Index: apt-0.9.9.4/buildlib/library.mak
+Index: apt-1.2.24/buildlib/library.mak
 ===================================================================
---- apt-0.9.9.4.orig/buildlib/library.mak	2013-07-31 15:45:07.320440575 +0300
-+++ apt-0.9.9.4/buildlib/library.mak	2013-07-31 15:46:49.440440561 +0300
-@@ -61,7 +61,7 @@
+--- apt-1.2.24.orig/buildlib/library.mak
++++ apt-1.2.24/buildlib/library.mak
+@@ -65,7 +65,7 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR
  
  # Compilation rules
  vpath %.cc $(SUBDIRS)
 -$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS)
 +$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS) $($(LOCAL)-HEADERS)
  	echo Compiling $< to $@
- 	$(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $<
+ 	$(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXSTD) $(CXXFLAGS) $(PICFLAGS) -o $@ '$(abspath $<)'
  	$(DoDep)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
index a0996d4..98b6c96 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
@@ -1,8 +1,10 @@
 Upstream-Status: Pending
 
---- a/apt-pkg/deb/dpkgpm.cc
-+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -42,6 +42,12 @@
+Index: apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/deb/dpkgpm.cc
++++ apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+@@ -54,6 +54,12 @@
  #include <apti18n.h>
  									/*}}}*/
  
@@ -14,8 +16,8 @@
 +
  using namespace std;
  
- namespace
-@@ -1279,7 +1285,7 @@ void pkgDPkgPM::WriteApportReport(const
+ APT_PURE static string
+@@ -1703,7 +1709,7 @@ void pkgDPkgPM::WriteApportReport(const
     }
  
     // check if its not a follow up error 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
index 449e42d..78cf538 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
@@ -3,16 +3,16 @@
 Upstream-Status: Inappropriate [configuration]
 Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
 
-Index: apt-0.9.7.7/Makefile
+Index: apt-1.2.24/Makefile
 ===================================================================
---- apt-0.9.7.7.orig/Makefile
-+++ apt-0.9.7.7/Makefile
-@@ -17,7 +17,7 @@ all headers library clean veryclean bina
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
+@@ -19,7 +19,7 @@ all headers library clean veryclean bina
  	$(MAKE) -C cmdline $@
  	$(MAKE) -C ftparchive $@
  	$(MAKE) -C dselect $@
 -	$(MAKE) -C doc $@
 +#	$(MAKE) -C doc $@
  	$(MAKE) -C po $@
- 	$(MAKE) -C test $@
- 
+ 	# FIXME: -C test has issue swith parallel builds, investigate!
+ 	-$(MAKE) -C test $@
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
index 104dc38..89d57ac 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
@@ -9,6 +9,10 @@
 SRC_URI[md5sum] = "bf19d4cddce260b3c3e1d51d42509071"
 SRC_URI[sha256sum] = "e8f2efd235f842bad2f6938bf4a72240a5e5fcd248e8444335e63beb60fabd82"
 
-inherit autotools
+inherit autotools allarch
+
+PACKAGES = "${PN} ${PN}-doc"
+
+FILES_${PN} += "${datadir}/aclocal"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
index ea62df8..df81bc6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
@@ -41,6 +41,10 @@
 CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'"
 
 do_configure() {
+	# manually install a newer config.guess/.sub
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/build-aux
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/build-aux
+
 	oe_runconf
 }
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
index 64eb253..96b5a3d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
@@ -22,10 +22,10 @@
  t/wrap/automake.in | 3 ++-
  4 files changed, 8 insertions(+), 4 deletions(-)
 
-diff --git a/bin/aclocal.in b/bin/aclocal.in
-index 349f24a..50cb8d3 100644
---- a/bin/aclocal.in
-+++ b/bin/aclocal.in
+Index: automake-1.15.1/bin/aclocal.in
+===================================================================
+--- automake-1.15.1.orig/bin/aclocal.in
++++ automake-1.15.1/bin/aclocal.in
 @@ -1,4 +1,4 @@
 -#!@PERL@ -w
 +#!@PERL@
@@ -40,17 +40,17 @@
  
  use Automake::Config;
  use Automake::General;
-diff --git a/bin/automake.in b/bin/automake.in
-index eedc8bc..e0a01cf 100644
---- a/bin/automake.in
-+++ b/bin/automake.in
+Index: automake-1.15.1/bin/automake.in
+===================================================================
+--- automake-1.15.1.orig/bin/automake.in
++++ automake-1.15.1/bin/automake.in
 @@ -1,4 +1,4 @@
 -#!@PERL@ -w
 +#!@PERL@
  # -*- perl -*-
  # @configure_input@
  
-@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
  package Automake;
  
  use strict;
@@ -58,16 +58,16 @@
  
  BEGIN
  {
-diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in
-index e64b546..9996899 100644
---- a/t/wrap/aclocal.in
-+++ b/t/wrap/aclocal.in
+Index: automake-1.15.1/t/wrap/aclocal.in
+===================================================================
+--- automake-1.15.1.orig/t/wrap/aclocal.in
++++ automake-1.15.1/t/wrap/aclocal.in
 @@ -1,4 +1,4 @@
 -#!@PERL@ -w
 +#!@PERL@
  # @configure_input@
  
- # Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ # Copyright (C) 2012-2017 Free Software Foundation, Inc.
 @@ -19,6 +19,7 @@
  BEGIN
  {
@@ -76,16 +76,16 @@
    @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib');
    unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib'
      if '@srcdir@' ne '.';
-diff --git a/t/wrap/automake.in b/t/wrap/automake.in
-index 8b943b1..be61226 100644
---- a/t/wrap/automake.in
-+++ b/t/wrap/automake.in
+Index: automake-1.15.1/t/wrap/automake.in
+===================================================================
+--- automake-1.15.1.orig/t/wrap/automake.in
++++ automake-1.15.1/t/wrap/automake.in
 @@ -1,4 +1,4 @@
 -#!@PERL@ -w
 +#!@PERL@
  # @configure_input@
  
- # Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ # Copyright (C) 2012-2017 Free Software Foundation, Inc.
 @@ -19,6 +19,7 @@
  BEGIN
  {
@@ -94,6 +94,3 @@
    @Automake::perl_libdirs = ('@abs_top_srcdir@/lib');
    unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib'
      if '@srcdir@' ne '.';
--- 
-2.3.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
index 1dd5337..c32cd1f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
@@ -4,21 +4,23 @@
 Signed-off-by: Björn Stenberg <bjst@enea.com>
 Upstream-Status: Pending
 
---- a/lib/am/check.am	2012-11-14 13:46:16.335475995 +0100
-+++ b/lib/am/check.am	2012-08-13 18:40:12.000000000 +0200
-@@ -44,7 +44,7 @@
- am__tty_colors = $(am__tty_colors_dummy)
- endif !%?COLOR%
-
+Index: automake-1.15.1/lib/am/check.am
+===================================================================
+--- automake-1.15.1.orig/lib/am/check.am
++++ automake-1.15.1/lib/am/check.am
+@@ -41,7 +41,7 @@ am__tty_colors = { \
+   fi; \
+ }
+ 
 -.PHONY: check-TESTS
 +.PHONY: check-TESTS buildtest-TESTS runtest-TESTS
-
- if %?PARALLEL_TESTS%
-
-@@ -465,7 +465,14 @@
-
- else !%?PARALLEL_TESTS%
-
+ 
+ if !%?SERIAL_TESTS%
+ 
+@@ -466,7 +466,14 @@ else %?SERIAL_TESTS%
+ 
+ ## Obsolescent serial testsuite driver.
+ 
 -check-TESTS: $(TESTS)
 +AM_RECURSIVE_TARGETS += buildtest runtest
 +
@@ -28,6 +30,6 @@
 +	$(MAKE) $(AM_MAKEFLAGS) runtest-TESTS
 +
 +runtest-TESTS:
-	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
-	srcdir=$(srcdir); export srcdir; \
+ 	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ 	srcdir=$(srcdir); export srcdir; \
  ## Make sure Solaris VPATH-expands all members of this list, even
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc
deleted file mode 100644
index 07a72e2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-LIC_FILES_CHKSUM="\
-    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
-    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
-    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
-    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
-    file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
-    file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
-    file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
-    file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
-    file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
-    "
-
-def binutils_branch_version(d):
-    pvsplit = d.getVar('PV').split('.')
-    return pvsplit[0] + "_" + pvsplit[1]
-
-BINUPV = "${@binutils_branch_version(d)}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-
-SRCREV ?= "90276f15379d380761fc499da2ba24cfb3c12a94"
-BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
-SRC_URI = "\
-     ${BINUTILS_GIT_URI} \
-     file://0003-configure-widen-the-regexp-for-SH-architectures.patch \
-     file://0004-Point-scripts-location-to-libdir.patch \
-     file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
-     file://0006-Use-libtool-2.4.patch \
-     file://0007-Add-the-armv5e-architecture-to-binutils.patch \
-     file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
-     file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
-     file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
-     file://0011-Change-default-emulation-for-mips64-linux.patch \
-     file://0012-Add-support-for-Netlogic-XLP.patch \
-     file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
-     file://0014-Detect-64-bit-MIPS-targets.patch \
-     file://0015-sync-with-OE-libtool-changes.patch \
-"
-S  = "${WORKDIR}/git"
-
-do_configure_prepend () {
-        rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc
new file mode 100644
index 0000000..9c883ac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc
@@ -0,0 +1,43 @@
+LIC_FILES_CHKSUM="\
+    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+    file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+    file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+    file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+    file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+    file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+    "
+
+def binutils_branch_version(d):
+    pvsplit = d.getVar('PV').split('.')
+    return pvsplit[0] + "_" + pvsplit[1]
+
+BINUPV = "${@binutils_branch_version(d)}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV ?= "caa839fba66600a6c36d3639906ed9110b79c307"
+BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
+SRC_URI = "\
+     ${BINUTILS_GIT_URI} \
+     file://0003-configure-widen-the-regexp-for-SH-architectures.patch \
+     file://0004-Point-scripts-location-to-libdir.patch \
+     file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+     file://0006-Use-libtool-2.4.patch \
+     file://0007-Add-the-armv5e-architecture-to-binutils.patch \
+     file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+     file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
+     file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+     file://0011-Change-default-emulation-for-mips64-linux.patch \
+     file://0012-Add-support-for-Netlogic-XLP.patch \
+     file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+     file://0014-Detect-64-bit-MIPS-targets.patch \
+     file://0015-sync-with-OE-libtool-changes.patch \
+"
+S  = "${WORKDIR}/git"
+
+do_configure_prepend () {
+        rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 0b515d8..2df8360 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,4 +1,4 @@
-From 58ac9f95a3d83c29efaf7a8906fb6aefea8c8e79 Mon Sep 17 00:00:00 2001
+From 2e1b5e24a6759de7f73aa6060a574848d9131b5a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:58:54 +0000
 Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs
@@ -18,7 +18,7 @@
  2 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index b6940d376d..a42c4d7a4b 100755
+index 8732422b3a..1f257e99ca 100755
 --- a/ld/genscripts.sh
 +++ b/ld/genscripts.sh
 @@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -37,16 +37,16 @@
  ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
    . ${CUSTOMIZER_SCRIPT}
    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xu
+ ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xu
 +unset PARTIAL_LINKING
  
- LD_FLAG=
  DATA_ALIGNMENT=${DATA_ALIGNMENT_}
+ RELOCATING=" "
 diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index d9138bc059..e48faeca43 100644
+index 9787ab5dac..0c8a93c2c8 100644
 --- a/ld/scripttempl/elf.sc
 +++ b/ld/scripttempl/elf.sc
-@@ -138,8 +138,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
+@@ -139,8 +139,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
      DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
    fi
  fi
@@ -58,5 +58,5 @@
  if test -z "$PLT"; then
    IPLT=".iplt         ${RELOCATING-0} : { *(.iplt) }"
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
index 370333d..bac7fb2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
@@ -1,4 +1,4 @@
-From 8f929c616208351d0971d7dfd7574d48d3144603 Mon Sep 17 00:00:00 2001
+From 58ddf38fa53abb48b69dd76e398c73451ad1a5eb Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 6 Mar 2017 23:37:05 -0800
 Subject: [PATCH 02/15] binutils-cross: Do not generate linker script
@@ -23,7 +23,7 @@
  1 file changed, 23 deletions(-)
 
 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index a42c4d7a4b..d727b4d07e 100755
+index 1f257e99ca..1583b73a2b 100755
 --- a/ld/genscripts.sh
 +++ b/ld/genscripts.sh
 @@ -189,29 +189,6 @@ append_to_lib_path()
@@ -57,5 +57,5 @@
    libs=${NATIVE_LIB_DIRS}
    if [ "x${NATIVE}" = "xyes" ] ; then
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
index b6c09cc..306afe7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
@@ -1,4 +1,4 @@
-From e5a806aae02a10290c71deb72f6294c98068368d Mon Sep 17 00:00:00 2001
+From 5089be88f670bcadf7db0e778894f900b2c05d7b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:07:33 +0000
 Subject: [PATCH 03/15] configure: widen the regexp for SH architectures
@@ -14,12 +14,12 @@
  2 files changed, 6 insertions(+), 1 deletion(-)
 
 diff --git a/configure b/configure
-index be9dd89d9b..d8af155ab5 100755
+index 2d615a9996..c4ad45c06c 100755
 --- a/configure
 +++ b/configure
-@@ -3844,7 +3844,7 @@ case "${target}" in
-   or1k*-*-*)
-     noconfigdirs="$noconfigdirs gdb"
+@@ -3835,7 +3835,7 @@ case "${target}" in
+   nvptx*-*-*)
+     noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
      ;;
 -  sh-*-*)
 +  sh*-*-* | sh64-*-*)
@@ -27,7 +27,7 @@
        sh*-*-elf)
           ;;
 diff --git a/gprof/configure b/gprof/configure
-index e71fe8b9e4..679e0dce77 100755
+index 1e25102976..6b43bf2b18 100755
 --- a/gprof/configure
 +++ b/gprof/configure
 @@ -5874,6 +5874,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -43,5 +43,5 @@
    if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
      lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
index 38eee30..3e29c58 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
@@ -1,4 +1,4 @@
-From 3634ec3547bc0f8a5d1b8ad15365e2f836cda642 Mon Sep 17 00:00:00 2001
+From a0e893ea094c48fa803046ffa89e31907aee0597 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:09:58 +0000
 Subject: [PATCH 04/15] Point scripts location to libdir
@@ -12,7 +12,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 625347ff62..d5334d2681 100644
+index 6243c12528..3c5d6c8202 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
 @@ -57,7 +57,7 @@ endif
@@ -25,7 +25,7 @@
  EMUL = @EMUL@
  EMULATION_OFILES = @EMULATION_OFILES@
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index ba251777b0..a2cf2282b5 100644
+index 760c037f9d..6dea692869 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
 @@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
@@ -38,5 +38,5 @@
  BFDDIR = $(BASEDIR)/bfd
  INCDIR = $(BASEDIR)/include
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index 59150a2..2f49969 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,4 +1,4 @@
-From 9d37c8f68c07da63186cb993f1221f6c11eca422 Mon Sep 17 00:00:00 2001
+From 518abb195d0eb47d8eef581d7fd0a5fd9fa73f7d Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:27:17 +0000
 Subject: [PATCH 05/15] Only generate an RPATH entry if LD_RUN_PATH is not
@@ -15,10 +15,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 9ac1840316..9dc4c149bc 100644
+index c0925fc9b9..7d7670a89f 100644
 --- a/ld/emultempl/elf32.em
 +++ b/ld/emultempl/elf32.em
-@@ -1463,6 +1463,8 @@ fragment <<EOF
+@@ -1470,6 +1470,8 @@ fragment <<EOF
  	      && command_line.rpath == NULL)
  	    {
  	      path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@
  	      if (path
  		  && gld${EMULATION_NAME}_search_needed (path, &n, force))
  		break;
-@@ -1740,6 +1742,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1750,6 +1752,8 @@ gld${EMULATION_NAME}_before_allocation (void)
    rpath = command_line.rpath;
    if (rpath == NULL)
      rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -37,5 +37,5 @@
    for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
      if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
index e87efe6..333e2ee 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
@@ -1,4 +1,4 @@
-From 71c734bb3754319029dcfc898cedbade42274dcb Mon Sep 17 00:00:00 2001
+From fad053cc59baa6277182b0fc90415a214060ba99 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 14 Feb 2016 17:04:07 +0000
 Subject: [PATCH 06/15] Use libtool 2.4
@@ -12,7 +12,6 @@
  bfd/configure        | 1318 +++++++++++++++++------
  bfd/configure.ac     |    2 +-
  binutils/configure   | 1316 +++++++++++++++++------
- configure            |    2 +-
  gas/configure        | 1314 +++++++++++++++++------
  gprof/configure      | 1321 +++++++++++++++++------
  ld/configure         | 1691 +++++++++++++++++++++--------
@@ -24,10 +23,10 @@
  opcodes/configure    | 1318 +++++++++++++++++------
  opcodes/configure.ac |    2 +-
  zlib/configure       | 1316 +++++++++++++++++------
- 15 files changed, 9927 insertions(+), 3694 deletions(-)
+ 14 files changed, 9926 insertions(+), 3693 deletions(-)
 
 diff --git a/bfd/configure b/bfd/configure
-index 48276594ed..3ece8943f3 100755
+index 6c2b24ebe3..5fdd723b7f 100755
 --- a/bfd/configure
 +++ b/bfd/configure
 @@ -672,6 +672,9 @@ OTOOL
@@ -1931,7 +1930,7 @@
    chmod +x "$ofile"
  
 diff --git a/bfd/configure.ac b/bfd/configure.ac
-index 8fd03a7ea8..8816c3286c 100644
+index 2342f3faea..a6451fccda 100644
 --- a/bfd/configure.ac
 +++ b/bfd/configure.ac
 @@ -254,7 +254,7 @@ changequote(,)dnl
@@ -1944,7 +1943,7 @@
  
  # More hacks to build DLLs on Windows.
 diff --git a/binutils/configure b/binutils/configure
-index 22e1b1736e..321b63535b 100755
+index 5d9c9105a7..a65b2b4518 100755
 --- a/binutils/configure
 +++ b/binutils/configure
 @@ -659,8 +659,11 @@ OTOOL
@@ -3841,21 +3840,8 @@
      (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    chmod +x "$ofile"
  
-diff --git a/configure b/configure
-index d8af155ab5..005ed827ab 100755
---- a/configure
-+++ b/configure
-@@ -3844,7 +3844,7 @@ case "${target}" in
-   or1k*-*-*)
-     noconfigdirs="$noconfigdirs gdb"
-     ;;
--  sh*-*-* | sh64-*-*)
-+  sh-*-* | sh64-*-*)
-     case "${target}" in
-       sh*-*-elf)
-          ;;
 diff --git a/gas/configure b/gas/configure
-index 93afb20c8f..81dd4cbd97 100755
+index fbac8f44d5..a40ac2144f 100755
 --- a/gas/configure
 +++ b/gas/configure
 @@ -650,8 +650,11 @@ OTOOL
@@ -5156,7 +5142,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15436,13 +16089,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15437,13 +16090,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -5177,7 +5163,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15457,14 +16117,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15458,14 +16118,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -5196,7 +5182,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15497,12 +16160,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15498,12 +16161,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -5210,7 +5196,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15557,8 +16220,13 @@ reload_flag \
+@@ -15558,8 +16221,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -5224,7 +5210,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -15568,12 +16236,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15569,12 +16237,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -5240,7 +5226,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -15589,7 +16259,6 @@ no_undefined_flag \
+@@ -15590,7 +16260,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -5248,7 +5234,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -15625,6 +16294,7 @@ module_cmds \
+@@ -15626,6 +16295,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -5256,7 +5242,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -16389,7 +17059,8 @@ $as_echo X"$file" |
+@@ -16390,7 +17060,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -5266,7 +5252,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -16492,19 +17163,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16493,19 +17164,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -5310,7 +5296,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -16534,6 +17228,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16535,6 +17229,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -5323,7 +5309,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -16543,6 +17243,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16544,6 +17244,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -5333,7 +5319,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -16657,12 +17360,12 @@ with_gcc=$GCC
+@@ -16658,12 +17361,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -5349,7 +5335,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -16749,9 +17452,6 @@ inherit_rpath=$inherit_rpath
+@@ -16750,9 +17453,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -5359,7 +5345,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -16767,6 +17467,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16768,6 +17468,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -5369,7 +5355,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -16799,210 +17502,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16800,210 +17503,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -5744,7 +5730,7 @@
    chmod +x "$ofile"
  
 diff --git a/gprof/configure b/gprof/configure
-index 679e0dce77..ac4c016a63 100755
+index 6b43bf2b18..245ee48bc3 100755
 --- a/gprof/configure
 +++ b/gprof/configure
 @@ -631,8 +631,11 @@ OTOOL
@@ -7654,7 +7640,7 @@
    chmod +x "$ofile"
  
 diff --git a/ld/configure b/ld/configure
-index d7f66f8cdc..4e71511bd1 100755
+index 0cc6e8a50f..db8b998722 100755
 --- a/ld/configure
 +++ b/ld/configure
 @@ -655,8 +655,11 @@ OTOOL
@@ -17336,7 +17322,7 @@
  # These exist entirely to fool aclocal when bootstrapping libtool.
  #
 diff --git a/opcodes/configure b/opcodes/configure
-index 17530f54b9..79b39611c2 100755
+index 4f29887098..2127d39288 100755
 --- a/opcodes/configure
 +++ b/opcodes/configure
 @@ -650,6 +650,9 @@ OTOOL
@@ -19240,7 +19226,7 @@
    chmod +x "$ofile"
  
 diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index a9fbfd61f1..c43780f64d 100644
+index b07f3f3629..5a32d9b1fc 100644
 --- a/opcodes/configure.ac
 +++ b/opcodes/configure.ac
 @@ -167,7 +167,7 @@ changequote(,)dnl
@@ -21153,5 +21139,5 @@
    chmod +x "$ofile"
  
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
index 8801960..4a51273 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
@@ -1,4 +1,4 @@
-From 2b87aad1741bc481dd0982f100ad5ea7f937bb61 Mon Sep 17 00:00:00 2001
+From 697903256e09533778baa8af66402c44d70219d9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:37:10 +0000
 Subject: [PATCH 07/15] Add the armv5e architecture to binutils
@@ -19,10 +19,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index a885efe4fc..735eaa7447 100644
+index ec50420518..a25d1721af 100644
 --- a/gas/config/tc-arm.c
 +++ b/gas/config/tc-arm.c
-@@ -25990,6 +25990,7 @@ static const struct arm_arch_option_table arm_archs[] =
+@@ -26195,6 +26195,7 @@ static const struct arm_arch_option_table arm_archs[] =
    ARM_ARCH_OPT ("armv4t",	ARM_ARCH_V4T,	 FPU_ARCH_FPA),
    ARM_ARCH_OPT ("armv4txm",	ARM_ARCH_V4TxM,	 FPU_ARCH_FPA),
    ARM_ARCH_OPT ("armv5",	ARM_ARCH_V5,	 FPU_ARCH_VFP),
@@ -31,5 +31,5 @@
    ARM_ARCH_OPT ("armv5txm",	ARM_ARCH_V5TxM,	 FPU_ARCH_VFP),
    ARM_ARCH_OPT ("armv5te",	ARM_ARCH_V5TE,	 FPU_ARCH_VFP),
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
index 30a22b5..939be67 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -1,4 +1,4 @@
-From 331443a87a31ec504e5652fc099d9129a9a4deb8 Mon Sep 17 00:00:00 2001
+From 622d66634eb2e509d4126f5bdcab26de367241a1 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:39:01 +0000
 Subject: [PATCH 08/15] don't let the distro compiler point to the wrong
@@ -17,7 +17,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index 25cfa29ad5..ce67a710e3 100644
+index ed1b334c36..d4ffd8b57b 100644
 --- a/libiberty/Makefile.in
 +++ b/libiberty/Makefile.in
 @@ -364,7 +364,8 @@ install-strip: install
@@ -31,5 +31,5 @@
  	if test -n "${target_header_dir}"; then \
  		${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
index e0e2578..e751047 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,4 +1,4 @@
-From 0a4afdcf0700efd45963568e2d0049127cdf4434 Mon Sep 17 00:00:00 2001
+From 27e38ee92c24fca86b1c3f6ef156a1892dd06bfd Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 15 Jan 2016 06:31:09 +0000
 Subject: [PATCH 09/15] warn for uses of system directories when cross linking
@@ -77,7 +77,7 @@
  #undef EXTRA_SHLIB_EXTENSION
  
 diff --git a/ld/configure b/ld/configure
-index 4e71511bd1..71c6ad1fd1 100755
+index db8b998722..489ead5c13 100755
 --- a/ld/configure
 +++ b/ld/configure
 @@ -789,6 +789,7 @@ with_lib_path
@@ -118,7 +118,7 @@
  if test "${enable_gold+set}" = set; then :
    enableval=$enable_gold; case "${enableval}" in
 diff --git a/ld/configure.ac b/ld/configure.ac
-index 00080f85fd..3aa98e37fb 100644
+index bada1b50b0..d074a3820b 100644
 --- a/ld/configure.ac
 +++ b/ld/configure.ac
 @@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
@@ -139,10 +139,10 @@
  dnl "install_as_default" is set to false if gold is the default linker.
  dnl "installed_linker" is the installed BFD linker name.
 diff --git a/ld/ld.h b/ld/ld.h
-index c6fa1247f0..01c373498f 100644
+index ba914b921e..9df17dab6c 100644
 --- a/ld/ld.h
 +++ b/ld/ld.h
-@@ -174,6 +174,14 @@ typedef struct
+@@ -180,6 +180,14 @@ typedef struct
       in the linker script.  */
    bfd_boolean force_group_allocation;
  
@@ -158,10 +158,10 @@
    enum endian_enum endian;
  
 diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index ebe7e7b7bd..33aa2c62fa 100644
+index c89915f1aa..df430837e2 100644
 --- a/ld/ld.texinfo
 +++ b/ld/ld.texinfo
-@@ -2480,6 +2480,18 @@ string identifying the original linked file does not change.
+@@ -2498,6 +2498,18 @@ string identifying the original linked file does not change.
  
  Passing @code{none} for @var{style} disables the setting from any
  @code{--build-id} options earlier on the command line.
@@ -181,7 +181,7 @@
  
  @c man end
 diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 3b37a0a3e2..5c85b01849 100644
+index 6532a57d96..f943f0b2e5 100644
 --- a/ld/ldfile.c
 +++ b/ld/ldfile.c
 @@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@@ -209,7 +209,7 @@
  
  /* Try to open a BFD for a lang_input_statement.  */
 diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 5aa7f6bc3e..cb655e0399 100644
+index 140ed1d9da..9965cbc04f 100644
 --- a/ld/ldlex.h
 +++ b/ld/ldlex.h
 @@ -147,6 +147,8 @@ enum option_values
@@ -222,7 +222,7 @@
  
  /* The initial parser states.  */
 diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 2b09f20413..89e2a3a805 100644
+index c473ed24c3..adae0b4610 100644
 --- a/ld/ldmain.c
 +++ b/ld/ldmain.c
 @@ -261,6 +261,8 @@ main (int argc, char **argv)
@@ -235,7 +235,7 @@
    /* We initialize DEMANGLING based on the environment variable
       COLLECT_NO_DEMANGLE.  The gcc collect2 program will demangle the
 diff --git a/ld/lexsup.c b/ld/lexsup.c
-index effa277b16..e4929607e9 100644
+index f2191602d4..bccb3bdeef 100644
 --- a/ld/lexsup.c
 +++ b/ld/lexsup.c
 @@ -538,6 +538,14 @@ static const struct ld_option ld_options[] =
@@ -269,5 +269,5 @@
      }
  
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
index 496242e..33dfff9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -1,4 +1,4 @@
-From 88fac08f1c472c612f381cbb9408756f2f58b4ff Mon Sep 17 00:00:00 2001
+From e205ae05c41a8cc8d47708f0a3b6f740e2bf2526 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:42:38 +0000
 Subject: [PATCH 10/15] Fix rpath in libtool when sysroot is enabled
@@ -48,5 +48,5 @@
  	    if test -z "$hardcode_libdirs"; then
  	      hardcode_libdirs="$libdir"
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
index ac87a2d..80fcbc1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
@@ -1,4 +1,4 @@
-From 497660bdbeb6788786553a5d733105f7f898dc62 Mon Sep 17 00:00:00 2001
+From 7978c1299021033c35c29c94e0997235f7ede248 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:44:14 +0000
 Subject: [PATCH 11/15] Change default emulation for mips64*-*-linux
@@ -14,10 +14,10 @@
  2 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/bfd/config.bfd b/bfd/config.bfd
-index dc24aabad5..4511024f22 100644
+index f04a993f06..8777f96bd2 100644
 --- a/bfd/config.bfd
 +++ b/bfd/config.bfd
-@@ -1186,12 +1186,12 @@ case "${targ}" in
+@@ -1189,12 +1189,12 @@ case "${targ}" in
      targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
      ;;
    mips64*el-*-linux*)
@@ -35,12 +35,12 @@
    mips*el-*-linux*)
      targ_defvec=mips_elf32_trad_le_vec
 diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 47c719cd05..fe7b9238b2 100644
+index 6183a85b3d..1d78465590 100644
 --- a/ld/configure.tgt
 +++ b/ld/configure.tgt
-@@ -530,11 +530,11 @@ mips*el-*-vxworks*)	targ_emul=elf32elmipvxworks
+@@ -535,11 +535,11 @@ mips*el-*-vxworks*)	targ_emul=elf32elmipvxworks
  mips*-*-vxworks*)	targ_emul=elf32ebmipvxworks
- 		        targ_extra_emuls="elf32elmipvxworks" ;;
+ 			targ_extra_emuls="elf32elmipvxworks" ;;
  mips*-*-windiss)	targ_emul=elf32mipswindiss ;;
 -mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
 -			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
@@ -55,5 +55,5 @@
  mips*el-*-linux-*)	targ_emul=elf32ltsmip
  			targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
index dc5e580..1fefb68 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
@@ -1,4 +1,4 @@
-From 8c60a55d3678589d93739bd27fec216911d80968 Mon Sep 17 00:00:00 2001
+From 3b40bf584615f794b85fd50d4d0a5c0a1d2ee7bf Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 14 Feb 2016 17:06:19 +0000
 Subject: [PATCH 12/15] Add support for Netlogic XLP
@@ -34,7 +34,7 @@
  14 files changed, 61 insertions(+), 21 deletions(-)
 
 diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index 3d38fda14b..0aec49bbb3 100644
+index eec9c4ad2a..3bf0a71e63 100644
 --- a/bfd/aoutx.h
 +++ b/bfd/aoutx.h
 @@ -814,6 +814,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
@@ -46,34 +46,34 @@
  	  arch_flags = M_MIPS2;
  	  break;
 diff --git a/bfd/archures.c b/bfd/archures.c
-index 433b95fa08..063b7943a1 100644
+index e83c57a2f3..3016ea1bae 100644
 --- a/bfd/archures.c
 +++ b/bfd/archures.c
 @@ -201,6 +201,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeon3          6503
- .#define bfd_mach_mips_xlr              887682   {* decimal 'XLR'  *}
- .#define bfd_mach_mips_interaptiv_mr2   736550   {* decimal 'IA2'  *}
-+.#define bfd_mach_mips_xlp              887680   {* decimal 'XLP'  *}
- .#define bfd_mach_mipsisa32             32
- .#define bfd_mach_mipsisa32r2           33
- .#define bfd_mach_mipsisa32r3           34
+ .#define bfd_mach_mips_octeon3		6503
+ .#define bfd_mach_mips_xlr		887682	 {* decimal 'XLR'.  *}
+ .#define bfd_mach_mips_interaptiv_mr2	736550	 {* decimal 'IA2'.  *}
++.#define bfd_mach_mips_xlp              887680   {* decimal 'XLP'.  *}
+ .#define bfd_mach_mipsisa32		32
+ .#define bfd_mach_mipsisa32r2		33
+ .#define bfd_mach_mipsisa32r3		34
 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index d126aed086..2b753b3a93 100644
+index 42991e7848..27abc5d5a8 100644
 --- a/bfd/bfd-in2.h
 +++ b/bfd/bfd-in2.h
-@@ -2060,6 +2060,7 @@ enum bfd_architecture
+@@ -2062,6 +2062,7 @@ enum bfd_architecture
  #define bfd_mach_mips_octeon3          6503
- #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'  */
- #define bfd_mach_mips_interaptiv_mr2   736550   /* decimal 'IA2'  */
-+#define bfd_mach_mips_xlp              887680   /* decimal 'XLP'  */
+ #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'.  */
+ #define bfd_mach_mips_interaptiv_mr2   736550   /* decimal 'IA2'.  */
++#define bfd_mach_mips_xlp              887680   /* decimal 'XLP'.  */
  #define bfd_mach_mipsisa32             32
  #define bfd_mach_mipsisa32r2           33
  #define bfd_mach_mipsisa32r3           34
 diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 4511024f22..f0f9072f10 100644
+index 8777f96bd2..7b80bda8c9 100644
 --- a/bfd/config.bfd
 +++ b/bfd/config.bfd
-@@ -1169,6 +1169,11 @@ case "${targ}" in
+@@ -1172,6 +1172,11 @@ case "${targ}" in
      targ_defvec=mips_elf32_le_vec
      targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
      ;;
@@ -86,7 +86,7 @@
      targ_defvec=mips_elf32_be_vec
      targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
 diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index 2493094bef..8375d1ae96 100644
+index cb50c64371..2b9d1d6ecf 100644
 --- a/bfd/cpu-mips.c
 +++ b/bfd/cpu-mips.c
 @@ -105,7 +105,8 @@ enum
@@ -100,7 +100,7 @@
  
  #define NN(index) (&arch_info_struct[(index) + 1])
 @@ -158,7 +159,8 @@ static const bfd_arch_info_type arch_info_struct[] =
-   N (64, 64, bfd_mach_mips_xlr, "mips:xlr",       FALSE, NN(I_xlr)),
+   N (64, 64, bfd_mach_mips_xlr, "mips:xlr",	  FALSE, NN(I_xlr)),
    N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE,
       NN(I_interaptiv_mr2)),
 -  N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
@@ -110,10 +110,10 @@
  
  /* The default architecture is mips:3000, but with a machine number of
 diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index fddf68c816..354c85d00b 100644
+index 285401367d..14ebb5f175 100644
 --- a/bfd/elfxx-mips.c
 +++ b/bfd/elfxx-mips.c
-@@ -6796,6 +6796,9 @@ _bfd_elf_mips_mach (flagword flags)
+@@ -6806,6 +6806,9 @@ _bfd_elf_mips_mach (flagword flags)
      case E_MIPS_MACH_IAMR2:
        return bfd_mach_mips_interaptiv_mr2;
  
@@ -123,7 +123,7 @@
      default:
        switch (flags & EF_MIPS_ARCH)
  	{
-@@ -11956,6 +11959,10 @@ mips_set_isa_flags (bfd *abfd)
+@@ -11963,6 +11966,10 @@ mips_set_isa_flags (bfd *abfd)
        val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
        break;
  
@@ -134,7 +134,7 @@
      case bfd_mach_mipsisa32:
        val = E_MIPS_ARCH_32;
        break;
-@@ -13989,6 +13996,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
+@@ -13936,6 +13943,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
    { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
    { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
    { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@@ -143,10 +143,10 @@
    /* MIPS64 extensions.  */
    { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
 diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 2b15f0f2cb..092744708e 100644
+index ae1cda9a7b..fed0387a94 100644
 --- a/binutils/readelf.c
 +++ b/binutils/readelf.c
-@@ -3335,6 +3335,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
+@@ -3370,6 +3370,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
  	    case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
  	    case E_MIPS_MACH_XLR:  strcat (buf, ", xlr"); break;
  	    case E_MIPS_MACH_IAMR2:  strcat (buf, ", interaptiv-mr2"); break;
@@ -155,7 +155,7 @@
  	    /* We simply ignore the field in this case to avoid confusion:
  	       MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
 diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index 3804df2958..9576c986db 100644
+index c135131b59..d8fbda8e31 100644
 --- a/gas/config/tc-mips.c
 +++ b/gas/config/tc-mips.c
 @@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
@@ -174,7 +174,7 @@
     )
  
  /* Whether the processor uses hardware interlocks to protect reads
-@@ -19738,7 +19740,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
+@@ -19737,7 +19739,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
    /* Broadcom XLP.
       XLP is mostly like XLR, with the prominent exception that it is
       MIPS64R2 rather than MIPS64.  */
@@ -184,7 +184,7 @@
    /* MIPS 64 Release 6 */
    { "i6400",	      0, ASE_MSA,		ISA_MIPS64R6, CPU_MIPS64R6},
 diff --git a/gas/configure b/gas/configure
-index 81dd4cbd97..95bdf3b19b 100755
+index a40ac2144f..65a6995243 100755
 --- a/gas/configure
 +++ b/gas/configure
 @@ -12989,6 +12989,9 @@ _ACEOF
@@ -198,7 +198,7 @@
  	    mips_cpu=r3900
  	    ;;
 diff --git a/include/elf/mips.h b/include/elf/mips.h
-index a4bea43ff8..73d904e25f 100644
+index 9de0b4e175..74fc4f7e55 100644
 --- a/include/elf/mips.h
 +++ b/include/elf/mips.h
 @@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@@ -210,7 +210,7 @@
  #define E_MIPS_MACH_OCTEON3	0x008e0000
  #define E_MIPS_MACH_5400	0x00910000
 diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index ceae9ec50a..276ee3c6c1 100644
+index 5eea72f139..90f6d57e15 100644
 --- a/include/opcode/mips.h
 +++ b/include/opcode/mips.h
 @@ -1259,6 +1259,8 @@ static const unsigned int mips_isa_table[] = {
@@ -241,10 +241,10 @@
        return FALSE;
      }
 diff --git a/ld/configure.tgt b/ld/configure.tgt
-index fe7b9238b2..2adf108b17 100644
+index 1d78465590..307e787b64 100644
 --- a/ld/configure.tgt
 +++ b/ld/configure.tgt
-@@ -516,6 +516,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
+@@ -521,6 +521,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
  mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
  			targ_emul=elf32btsmip
  			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
@@ -254,7 +254,7 @@
  			targ_extra_emuls="elf32lr5900"
  			targ_extra_libpath=$targ_extra_emuls ;;
 diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 45195007c1..4a80a05d19 100644
+index 984fcbb802..95b107d216 100644
 --- a/opcodes/mips-dis.c
 +++ b/opcodes/mips-dis.c
 @@ -655,13 +655,11 @@ const struct mips_arch_choice mips_arch_choices[] =
@@ -277,7 +277,7 @@
    /* This entry, mips16, is here only for ISA/processor selection; do
       not print its name.  */
 diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index 19fca408c9..d02069c528 100644
+index 180d613c93..65b7b8cc23 100644
 --- a/opcodes/mips-opc.c
 +++ b/opcodes/mips-opc.c
 @@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
@@ -389,5 +389,5 @@
  {"swc0",		"E,A(b)",	0,    (int) M_SWC0_AB,	INSN_MACRO,		0,		I1,		0,	IOCT|IOCTP|IOCT2|I37 },
  {"swc1",		"T,o(b)",	0xe4000000, 0xfc000000,	RD_1|RD_3|SM|FP_S,	0,		I1,		0,	0 },
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
index 247376b..c3e1b13 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -1,4 +1,4 @@
-From e46202becab625c6c08caf91e08ccbbc1bf799c4 Mon Sep 17 00:00:00 2001
+From 27ec22ca3cd56cfdf060d2e1f414bedce269b322 Mon Sep 17 00:00:00 2001
 From: Zhenhua Luo <zhenhua.luo@nxp.com>
 Date: Sat, 11 Jun 2016 22:08:29 -0500
 Subject: [PATCH 13/15] fix the incorrect assembling for ppc wait mnemonic
@@ -11,10 +11,10 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
-index 426261ab21..0d35916cdd 100644
+index bb17f26c2e..dbdd762b4e 100644
 --- a/opcodes/ppc-opc.c
 +++ b/opcodes/ppc-opc.c
-@@ -4881,7 +4881,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -5338,7 +5338,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
  {"ldepx",	X(31,29),	X_MASK,	  E500MC|PPCA2, 0,		{RT, RA0, RB}},
  
  {"waitasec",	X(31,30),      XRTRARB_MASK, POWER8,	POWER9,		{0}},
@@ -22,7 +22,7 @@
  
  {"lwepx",	X(31,31),	X_MASK,	  E500MC|PPCA2, 0,		{RT, RA0, RB}},
  
-@@ -4935,7 +4934,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -5392,7 +5391,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
  
  {"waitrsv",	X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0,		{0}},
  {"waitimpl",	X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0,		{0}},
@@ -32,5 +32,5 @@
  {"dcbstep",	XRT(31,63,0),	XRT_MASK,    E500MC|PPCA2, 0,		{RA0, RB}},
  
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
index 42b1065..cf3690f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
@@ -1,4 +1,4 @@
-From bf20d5823662d1f2eb47de2cdfd173627a205b17 Mon Sep 17 00:00:00 2001
+From 7dfbd6889d868a09d695dd2736104848c1a9c9c3 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 31 Mar 2017 11:42:03 -0700
 Subject: [PATCH 14/15] Detect 64-bit MIPS targets
@@ -14,7 +14,7 @@
  1 file changed, 14 insertions(+)
 
 diff --git a/gold/configure.tgt b/gold/configure.tgt
-index 3d63027297..c1f92a1360 100644
+index 8aef22a318..7030026ffa 100644
 --- a/gold/configure.tgt
 +++ b/gold/configure.tgt
 @@ -153,6 +153,13 @@ aarch64*-*)
@@ -46,5 +46,5 @@
   targ_obj=mips
   targ_machine=EM_MIPS
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
index 2c8900c..8c9fd23 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
@@ -1,4 +1,4 @@
-From 9b456a0e4f284fd41ac36595144ed44dc82410ee Mon Sep 17 00:00:00 2001
+From 298804f430939d6cc94b09732ee93e64c5e6be18 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Mon, 6 Mar 2017 23:33:27 -0800
 Subject: [PATCH 15/15] sync with OE libtool changes
@@ -85,5 +85,5 @@
  	elif test -n "$runpath_var"; then
  	  case "$finalize_perm_rpath " in
 -- 
-2.14.0
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch
deleted file mode 100644
index d139da5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-Upstream-Status: Pending
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
-Index: bison-2.4.2/m4/lcmessage.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/lcmessage.m4
-@@ -0,0 +1,32 @@
-+# lcmessage.m4 serial 3 (gettext-0.11.3)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License.  As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
-+
-+# Check whether LC_MESSAGES is available in <locale.h>.
-+
-+AC_DEFUN([AM_LC_MESSAGES],
-+[
-+  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-+    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-+  if test $am_cv_val_LC_MESSAGES = yes; then
-+    AC_DEFINE(HAVE_LC_MESSAGES, 1,
-+      [Define if your <locale.h> file defines LC_MESSAGES.])
-+  fi
-+])
-Index: bison-2.4.2/m4/uintmax_t.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/uintmax_t.m4
-@@ -0,0 +1,29 @@
-+# uintmax_t.m4 serial 6 (gettext-0.11)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License.  As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_PREREQ(2.13)
-+
-+# Define uintmax_t to `unsigned long' or `unsigned long long'
-+# if <inttypes.h> does not exist.
-+
-+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
-+[
-+  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
-+    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
-+    test $ac_cv_type_unsigned_long_long = yes \
-+      && ac_type='unsigned long long' \
-+      || ac_type='unsigned long'
-+    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-+  [Define to unsigned long or unsigned long long
-+   if <inttypes.h> and <stdint.h> don't define.])
-+  fi
-+])
-Index: bison-2.4.2/m4/ulonglong.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/ulonglong.m4
-@@ -0,0 +1,23 @@
-+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
-+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License.  As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
-+[
-+  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
-+  [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
-+    [unsigned long long ullmax = (unsigned long long) -1;
-+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
-+    ac_cv_type_unsigned_long_long=yes,
-+    ac_cv_type_unsigned_long_long=no)])
-+  if test $ac_cv_type_unsigned_long_long = yes; then
-+    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-+      [Define if you have the unsigned long long type.])
-+  fi
-+])
-Index: bison-2.4.2/m4/intdiv0.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/intdiv0.m4
-@@ -0,0 +1,72 @@
-+# intdiv0.m4 serial 1 (gettext-0.11.3)
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License.  As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([gt_INTDIV0],
-+[
-+  AC_REQUIRE([AC_PROG_CC])dnl
-+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+
-+  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-+    gt_cv_int_divbyzero_sigfpe,
-+    [
-+      AC_TRY_RUN([
-+#include <stdlib.h>
-+#include <signal.h>
-+
-+static void
-+#ifdef __cplusplus
-+sigfpe_handler (int sig)
-+#else
-+sigfpe_handler (sig) int sig;
-+#endif
-+{
-+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
-+  exit (sig != SIGFPE);
-+}
-+
-+int x = 1;
-+int y = 0;
-+int z;
-+int nan;
-+
-+int main ()
-+{
-+  signal (SIGFPE, sigfpe_handler);
-+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
-+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
-+  signal (SIGTRAP, sigfpe_handler);
-+#endif
-+/* Linux/SPARC yields signal SIGILL.  */
-+#if defined (__sparc__) && defined (__linux__)
-+  signal (SIGILL, sigfpe_handler);
-+#endif
-+
-+  z = x / y;
-+  nan = y / y;
-+  exit (1);
-+}
-+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
-+        [
-+          # Guess based on the CPU.
-+          case "$host_cpu" in
-+            alpha* | i[34567]86 | m68k | s390*)
-+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
-+            *)
-+              gt_cv_int_divbyzero_sigfpe="guessing no";;
-+          esac
-+        ])
-+    ])
-+  case "$gt_cv_int_divbyzero_sigfpe" in
-+    *yes) value=1;;
-+    *) value=0;;
-+  esac
-+  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
-+    [Define if integer division by zero raises signal SIGFPE.])
-+])
-Index: bison-2.4.2/m4/glib.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/glib.m4
-@@ -0,0 +1,196 @@
-+# Configure paths for GLIB
-+# Owen Taylor     97-11-3
-+
-+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or 
-+dnl gthread is specified in MODULES, pass to glib-config
-+dnl
-+AC_DEFUN(AM_PATH_GLIB,
-+[dnl 
-+dnl Get the cflags and libraries from the glib-config script
-+dnl
-+AC_ARG_WITH(glib-prefix,[  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)],
-+            glib_config_prefix="$withval", glib_config_prefix="")
-+AC_ARG_WITH(glib-exec-prefix,[  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
-+            glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
-+AC_ARG_ENABLE(glibtest, [  --disable-glibtest       Do not try to compile and run a test GLIB program],
-+		    , enable_glibtest=yes)
-+
-+  if test x$glib_config_exec_prefix != x ; then
-+     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
-+     if test x${GLIB_CONFIG+set} != xset ; then
-+        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
-+     fi
-+  fi
-+  if test x$glib_config_prefix != x ; then
-+     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
-+     if test x${GLIB_CONFIG+set} != xset ; then
-+        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
-+     fi
-+  fi
-+
-+  for module in . $4
-+  do
-+      case "$module" in
-+         gmodule) 
-+             glib_config_args="$glib_config_args gmodule"
-+         ;;
-+         gthread) 
-+             glib_config_args="$glib_config_args gthread"
-+         ;;
-+      esac
-+  done
-+
-+  AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
-+  min_glib_version=ifelse([$1], ,0.99.7,$1)
-+  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
-+  no_glib=""
-+  if test "$GLIB_CONFIG" = "no" ; then
-+    no_glib=yes
-+  else
-+    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
-+    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
-+    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
-+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-+    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
-+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-+    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
-+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-+    if test "x$enable_glibtest" = "xyes" ; then
-+      ac_save_CFLAGS="$CFLAGS"
-+      ac_save_LIBS="$LIBS"
-+      CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+      LIBS="$GLIB_LIBS $LIBS"
-+dnl
-+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
-+dnl checks the results of glib-config to some extent
-+dnl
-+      rm -f conf.glibtest
-+      AC_TRY_RUN([
-+#include <glib.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+int 
-+main ()
-+{
-+  int major, minor, micro;
-+  char *tmp_version;
-+
-+  system ("touch conf.glibtest");
-+
-+  /* HP/UX 9 (%@#!) writes to sscanf strings */
-+  tmp_version = g_strdup("$min_glib_version");
-+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-+     printf("%s, bad version string\n", "$min_glib_version");
-+     exit(1);
-+   }
-+
-+  if ((glib_major_version != $glib_config_major_version) ||
-+      (glib_minor_version != $glib_config_minor_version) ||
-+      (glib_micro_version != $glib_config_micro_version))
-+    {
-+      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
-+             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
-+             glib_major_version, glib_minor_version, glib_micro_version);
-+      printf ("*** was found! If glib-config was correct, then it is best\n");
-+      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
-+      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-+      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-+      printf("*** required on your system.\n");
-+      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
-+      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
-+      printf("*** before re-running configure\n");
-+    } 
-+  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
-+	   (glib_minor_version != GLIB_MINOR_VERSION) ||
-+           (glib_micro_version != GLIB_MICRO_VERSION))
-+    {
-+      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
-+	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
-+      printf("*** library (version %d.%d.%d)\n",
-+	     glib_major_version, glib_minor_version, glib_micro_version);
-+    }
-+  else
-+    {
-+      if ((glib_major_version > major) ||
-+        ((glib_major_version == major) && (glib_minor_version > minor)) ||
-+        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
-+      {
-+        return 0;
-+       }
-+     else
-+      {
-+        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
-+               glib_major_version, glib_minor_version, glib_micro_version);
-+        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
-+	       major, minor, micro);
-+        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
-+        printf("***\n");
-+        printf("*** If you have already installed a sufficiently new version, this error\n");
-+        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
-+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-+        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
-+        printf("*** correct copy of glib-config. (In this case, you will have to\n");
-+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-+        printf("*** so that the correct libraries are found at run-time))\n");
-+      }
-+    }
-+  return 1;
-+}
-+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-+       CFLAGS="$ac_save_CFLAGS"
-+       LIBS="$ac_save_LIBS"
-+     fi
-+  fi
-+  if test "x$no_glib" = x ; then
-+     AC_MSG_RESULT(yes)
-+     ifelse([$2], , :, [$2])     
-+  else
-+     AC_MSG_RESULT(no)
-+     if test "$GLIB_CONFIG" = "no" ; then
-+       echo "*** The glib-config script installed by GLIB could not be found"
-+       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
-+       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
-+       echo "*** full path to glib-config."
-+     else
-+       if test -f conf.glibtest ; then
-+        :
-+       else
-+          echo "*** Could not run GLIB test program, checking why..."
-+          CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+          LIBS="$LIBS $GLIB_LIBS"
-+          AC_TRY_LINK([
-+#include <glib.h>
-+#include <stdio.h>
-+],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
-+        [ echo "*** The test program compiled, but did not run. This usually means"
-+          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
-+          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
-+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-+          echo "*** is required on your system"
-+	  echo "***"
-+          echo "*** If you have an old version installed, it is best to remove it, although"
-+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-+          echo "***"
-+          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
-+          echo "*** came with the system with the command"
-+          echo "***"
-+          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
-+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-+          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
-+          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
-+          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
-+          CFLAGS="$ac_save_CFLAGS"
-+          LIBS="$ac_save_LIBS"
-+       fi
-+     fi
-+     GLIB_CFLAGS=""
-+     GLIB_LIBS=""
-+     ifelse([$3], , :, [$3])
-+  fi
-+  AC_SUBST(GLIB_CFLAGS)
-+  AC_SUBST(GLIB_LIBS)
-+  rm -f conf.glibtest
-+])
-Index: bison-2.4.2/m4/isc-posix.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/isc-posix.m4
-@@ -0,0 +1,26 @@
-+# isc-posix.m4 serial 2 (gettext-0.11.2)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License.  As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
-+
-+# This test replaces the one in autoconf.
-+# Currently this macro should have the same name as the autoconf macro
-+# because gettext's gettext.m4 (distributed in the automake package)
-+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
-+# give these diagnostics:
-+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-+
-+undefine([AC_ISC_POSIX])
-+
-+AC_DEFUN([AC_ISC_POSIX],
-+  [
-+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-+  ]
-+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
index 7d066be..58728f5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
@@ -10,7 +10,6 @@
 DEPENDS = "bison-native flex-native"
 
 SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
-           file://m4.patch \
            file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
            file://dont-depend-on-help2man.patch.patch \
            file://0001-src-local.mk-fix-parallel-issue.patch \
@@ -23,9 +22,9 @@
 SRC_URI[md5sum] = "c342201de104cc9ce0a21e0ad10d4021"
 SRC_URI[sha256sum] = "a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1"
 
-DEPENDS_class-native = "gettext-minimal-native"
-
 inherit autotools gettext texinfo
+
+# The automatic m4 path detection gets confused, so force the right value
 acpaths = "-I ${S}/m4"
 
 do_compile_prepend() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
index a310135..b3c889b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -90,7 +90,7 @@
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
 
-SRC_URI = "git://github.com/mmeeks/bootchart.git \
+SRC_URI = "git://github.com/xrmx/bootchart.git \
            file://bootchartd_stop.sh \
            file://0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch \
            file://0001-collector-Allocate-space-on-heap-for-chunks.patch \
@@ -139,7 +139,7 @@
 
 PACKAGES =+ "pybootchartgui"
 FILES_pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
+RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-shell python3-compression python3-codecs"
 RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
 RDEPENDS_${PN}_class-target += "lsb"
 DEPENDS_append_class-native = " python3-pycairo-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch
new file mode 100644
index 0000000..790676b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch
@@ -0,0 +1,26 @@
+From bc35c4caebb57cc8b96c30c25432b12ca8dc18d5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 6 Oct 2017 15:03:49 +0300
+Subject: [PATCH] Fix build with musl (missing header include for dev_t).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ convert/source-fs.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/convert/source-fs.h b/convert/source-fs.h
+index 23f3356..6fd770f 100644
+--- a/convert/source-fs.h
++++ b/convert/source-fs.h
+@@ -20,6 +20,7 @@
+ #include "kerncompat.h"
+ #include <linux/kdev_t.h>
+ #include <pthread.h>
++#include <sys/types.h>
+ 
+ #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
index a81900e..467de32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
@@ -12,19 +12,16 @@
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/Makefile b/Makefile
-index b3e2b63..347aaf1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -323,7 +323,7 @@ version.h: version.sh version.h.in configure.ac
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -343,7 +343,7 @@ version.h: version.sh version.h.in confi
  
  mktables: kernel-lib/mktables.c
  	@echo "    [CC]     $@"
 -	$(Q)$(CC) $(CFLAGS) $< -o $@
 +	$(Q)$(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
  
- kernel-lib/tables.c: mktables
- 	@echo "    [TABLE]  $@"
--- 
-2.13.2
-
+ # the target can be regenerated manually using mktables, but a local copy is
+ # kept so the build process is simpler
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
deleted file mode 100644
index c3cc89c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Checksumming Copy on Write Filesystem utilities"
-DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
-implementing advanced features while focusing on fault tolerance, repair and \
-easy administration. \
-This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
-btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
-
-HOMEPAGE = "https://btrfs.wiki.kernel.org"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
-SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl"
-DEPENDS_append_class-target = " udev"
-RDEPENDS_${PN} = "libgcc"
-
-SRCREV = "0607132c3200bcead1426e6dc685432008de95de"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
-           file://0001-Makefile-build-mktables-using-native-gcc.patch \
-           "
-
-inherit autotools-brokensep pkgconfig manpages
-
-PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
-EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
-
-do_configure_prepend() {
-	# Upstream doesn't ship this and autoreconf won't install it as automake isn't used.
-	mkdir -p ${S}/config
-	cp -f $(automake --print-libdir)/install-sh ${S}/config/
-}
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb
new file mode 100644
index 0000000..bc157e2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Checksumming Copy on Write Filesystem utilities"
+DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
+implementing advanced features while focusing on fault tolerance, repair and \
+easy administration. \
+This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
+btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
+
+HOMEPAGE = "https://btrfs.wiki.kernel.org"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+SECTION = "base"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
+DEPENDS_append_class-target = " udev"
+RDEPENDS_${PN} = "libgcc"
+
+SRCREV = "a7a1ea0f4f2a1d6eeeb3d106e062c7f1034f16d4"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+           file://0001-Makefile-build-mktables-using-native-gcc.patch \
+           file://0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch \
+           "
+
+RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://github.com/kdave/btrfs-progs/issues/109"
+inherit autotools-brokensep pkgconfig manpages
+
+CLEANBROKEN = "1"
+
+PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
+EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
+
+do_configure_prepend() {
+	# Upstream doesn't ship this and autoreconf won't install it as automake isn't used.
+	mkdir -p ${S}/config
+	cp -f $(automake --print-libdir)/install-sh ${S}/config/
+}
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
index 84d04cf..efcf6b6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -22,7 +22,7 @@
 SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
 PE = "1"
 PV = "2015.02.10+git${SRCPV}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb
deleted file mode 100644
index 1e535b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ccache.inc
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7fe21f9470f2305e95e7d8a632255079"
-
-SRC_URI[md5sum] = "95ab3c56284129cc2a32460c23069516"
-SRC_URI[sha256sum] = "24f15bf389e38c41548c9c259532187774ec0cb9686c3497bbb75504c8dc404f"
-
-SRC_URI += " \
-            file://0002-dev.mk.in-fix-file-name-too-long.patch \
-            file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb
new file mode 100644
index 0000000..929f0f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb
@@ -0,0 +1,12 @@
+require ccache.inc
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=dae379a85bb6e9d594773e0aa64876f6"
+
+SRC_URI[md5sum] = "eee58db7cce892febddb989308dc568f"
+SRC_URI[sha256sum] = "190576a6e938760ec8113523e6fd380141117303e90766cc4802e770422b30c6"
+
+SRC_URI += " \
+            file://0002-dev.mk.in-fix-file-name-too-long.patch \
+            file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
index 837cfad..3f01c69 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
@@ -14,10 +14,10 @@
  dev.mk.in |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/dev.mk.in b/dev.mk.in
-index 1261ad3..ec55ac4 100644
---- a/dev.mk.in
-+++ b/dev.mk.in
+Index: ccache-3.3.4/dev.mk.in
+===================================================================
+--- ccache-3.3.4.orig/dev.mk.in
++++ ccache-3.3.4/dev.mk.in
 @@ -1,7 +1,7 @@
  # GNU make syntax reigns in this file.
  
@@ -26,7 +26,4 @@
 +all_cppflags += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$(subst $(srcdir)/,,$<))).d
  
  ASCIIDOC = asciidoc
- GPERF = gperf
--- 
-1.7.9.5
-
+ CPPCHECK = cppcheck
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
index 0e0be62..78e1565 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
@@ -8,6 +8,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2"
+UPSTREAM_VERSION_UNKNOWN = "1"
 
 SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
 SRC_URI[sha256sum] = "ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5f5860f"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.10.3.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.10.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
index 6aeb25f..394c9eb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
@@ -6,41 +6,23 @@
 BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
 SECTION = "console/utils"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=8d8c7bc32f8797d23f5cf605d9339d2d \
-                    file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14"
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=79b5b78197c74d5c5f9c7ccadeee4e8c \
+                    file://Source/cmake.h;md5=4494dee184212fc89c469c3acd555a14;beginline=1;endline=3 \
+                    "
 
 CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
 
 SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://support-oe-qt4-tools-names.patch \
            file://qt4-fail-silent.patch \
-           file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \
+           file://cmake-Prevent-the-detection-of-Qt5.patch \
+           file://0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch \
+           file://0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch \
+           file://0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch \
+           file://0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch \
            "
 
-SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419"
-SRC_URI[sha256sum] = "da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d"
+SRC_URI[md5sum] = "1c38c67295ca696aeafd8c059d748b38"
+SRC_URI[sha256sum] = "0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8"
 
 UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-
-# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
-# and possibly missing qmake binary (qtbase-native can be removed from sysroot
-# e.g. in order to upgrade it, even when there is target qtbase)
-
-# Fixes errors like this in cmake(-native).do_configure:
-#| -- Performing Test run_pic_test - Success
-#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
-#|   The imported target "Qt5::Core" references the file
-#|
-#|      "/qmake"
-#|
-#|   but this file does not exist.  Possible reasons include:
-
-do_configure_prepend() {
-	sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Core REQUIRED)/#  find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Widgets QUIET NO_MODULE)/#  find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
-	sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Widgets REQUIRED)/#  find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutoUicInterface/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Widgets REQUIRED)/#  find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Core REQUIRED)/#  find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
new file mode 100644
index 0000000..fda60e3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
@@ -0,0 +1,52 @@
+From 433a2d495a2481c63b82c11a30f7c642d6abe63f Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 19:55:49 +1100
+Subject: [PATCH] FindBoost: Boost 1.66.0 dependency and release update
+
+Release notes: http://www.boost.org/users/history/version_1_66_0.html
+
+* All new libraries are header-only.
+* _Boost_COMPONENT_DEPENDENCIES is unchanged from 1.65.1
+* _Boost_FIBER_COMPILER_FEATURES is unchanged from 1.64.0
+
+Upstream-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -797,7 +797,7 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+       set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+     endif()
+-    if(NOT Boost_VERSION VERSION_LESS 106600)
++    if(NOT Boost_VERSION VERSION_LESS 106700)
+       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+       set(_Boost_IMPORTED_TARGETS FALSE)
+     endif()
+@@ -931,8 +931,8 @@ endfunction()
+ # `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.
+ #
+ function(_Boost_COMPILER_FEATURES component _ret)
+-  # Boost >= 1.62 and < 1.65
+-  if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106500)
++  # Boost >= 1.62 and < 1.67
++  if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700)
+     set(_Boost_FIBER_COMPILER_FEATURES
+         cxx_alias_templates
+         cxx_auto_type
+@@ -1038,7 +1038,7 @@ else()
+   # _Boost_COMPONENT_HEADERS.  See the instructions at the top of
+   # _Boost_COMPONENT_DEPENDENCIES.
+   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
+-    "1.65.1" "1.65.0" "1.65"
++    "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+     "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+     "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
+     "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
new file mode 100644
index 0000000..a45eda5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
@@ -0,0 +1,29 @@
+From b1e9f67137733bc109d355450fcd06edda4784c5 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 20:07:31 +1100
+Subject: [PATCH 1/6] FindBoost: Fix incorrect alphabetisation of headers list
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -831,8 +831,8 @@ function(_Boost_COMPONENT_HEADERS compon
+   set(_Boost_CONTAINER_HEADERS           "boost/container/container_fwd.hpp")
+   set(_Boost_CONTEXT_HEADERS             "boost/context/all.hpp")
+   set(_Boost_COROUTINE_HEADERS           "boost/coroutine/all.hpp")
+-  set(_Boost_EXCEPTION_HEADERS           "boost/exception/exception.hpp")
+   set(_Boost_DATE_TIME_HEADERS           "boost/date_time/date.hpp")
++  set(_Boost_EXCEPTION_HEADERS           "boost/exception/exception.hpp")
+   set(_Boost_FIBER_HEADERS               "boost/fiber/all.hpp")
+   set(_Boost_FILESYSTEM_HEADERS          "boost/filesystem/path.hpp")
+   set(_Boost_GRAPH_HEADERS               "boost/graph/adjacency_list.hpp")
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
deleted file mode 100644
index 9b820db..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 46d25e782ebd9b6c50771b6f30433c58fae03a51 Mon Sep 17 00:00:00 2001
-From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
-Date: Mon, 26 Jun 2017 11:30:07 -0400
-Subject: [PATCH] cmake: Use find_program if find_host_program is not
- available
-
-CMake does not define the `find_host_program` command we've been using
-in the cross-compiling code path.  It was provided by a widely used
-Android toolchain file.  For compatibility, continue to use
-`find_host_program` if available, but otherwise use just `find_program`.
-
-Upstream-Status: Accepted
-[https://gitlab.kitware.com/cmake/cmake/merge_requests/1009]
-        - Will be in 3.10
-
-Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
----
- Modules/FindCUDA.cmake | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
-index a4dca54..77ca351 100644
---- a/Modules/FindCUDA.cmake
-+++ b/Modules/FindCUDA.cmake
-@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)
-   # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers
-   set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}")
-   macro( cuda_find_host_program )
--    find_host_program( ${ARGN} )
-+    if (COMMAND find_host_program)
-+      find_host_program( ${ARGN} )
-+    else()
-+      find_program( ${ARGN} )
-+    endif()
-   endmacro()
- else()
-   # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
new file mode 100644
index 0000000..88301c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
@@ -0,0 +1,132 @@
+From b044f69a413123f15a05034c00a8e3763764a1e5 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 21:50:54 +1100
+Subject: [PATCH 2/6] FindBoost: Implement "Architecture and Address Model" tag
+
+This tag is new in Boost 1.66.0, and is present in the 'versioned'
+library file name layout.
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 52 +++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 42 insertions(+), 10 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -1385,8 +1385,11 @@ if(Boost_DEBUG)
+ endif()
+ 
+ #======================
+-# Systematically build up the Boost ABI tag
+-# http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
++# Systematically build up the Boost ABI tag for the 'tagged' and 'versioned' layouts
++# http://boost.org/doc/libs/1_66_0/more/getting_started/windows.html#library-naming
++# http://boost.org/doc/libs/1_66_0/boost/config/auto_link.hpp
++# http://boost.org/doc/libs/1_66_0/tools/build/src/tools/common.jam
++# http://boost.org/doc/libs/1_66_0/boostcpp.jam
+ set( _boost_RELEASE_ABI_TAG "-")
+ set( _boost_DEBUG_ABI_TAG   "-")
+ # Key       Use this library when:
+@@ -1418,11 +1421,40 @@ if(Boost_USE_STLPORT)
+   string(APPEND _boost_DEBUG_ABI_TAG "p")
+ endif()
+ #  n        using the STLport deprecated "native iostreams" feature
++#           removed from the documentation in 1.43.0 but still present in
++#           boost/config/auto_link.hpp
+ if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
+   string(APPEND _boost_RELEASE_ABI_TAG "n")
+   string(APPEND _boost_DEBUG_ABI_TAG "n")
+ endif()
+ 
++#  -x86     Architecture and address model tag
++#           First character is the architecture, then word-size, either 32 or 64
++#           Only used in 'versioned' layout, added in Boost 1.66.0
++set(_boost_ARCHITECTURE_TAG "")
++# {CMAKE_CXX_COMPILER_ARCHITECTURE_ID} is not currently set for all compilers
++if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600)
++  string(APPEND _boost_ARCHITECTURE_TAG "-")
++  # This needs to be kept in-sync with the section of CMakePlatformId.h.in
++  # inside 'defined(_WIN32) && defined(_MSC_VER)'
++  if(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "IA64")
++    string(APPEND _boost_ARCHITECTURE_TAG "i")
++  elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "X86"
++            OR ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "x64")
++    string(APPEND _boost_ARCHITECTURE_TAG "x")
++  elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} MATCHES "^ARM")
++    string(APPEND _boost_ARCHITECTURE_TAG "a")
++  elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "MIPS")
++    string(APPEND _boost_ARCHITECTURE_TAG "m")
++  endif()
++
++  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
++    string(APPEND _boost_ARCHITECTURE_TAG "64")
++  else()
++    string(APPEND _boost_ARCHITECTURE_TAG "32")
++  endif()
++endif()
++
+ if(Boost_DEBUG)
+   message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+     "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
+@@ -1616,22 +1648,22 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+   unset(_boost_RELEASE_NAMES)
+   foreach(compiler IN LISTS _boost_COMPILER)
+     list(APPEND _boost_RELEASE_NAMES
+-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
++      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+       ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
+   endforeach()
+   list(APPEND _boost_RELEASE_NAMES
+-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
++    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+     ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+     ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+   if(_boost_STATIC_RUNTIME_WORKAROUND)
+     set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+     foreach(compiler IN LISTS _boost_COMPILER)
+       list(APPEND _boost_RELEASE_NAMES
+-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+         ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+     endforeach()
+     list(APPEND _boost_RELEASE_NAMES
+-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+       ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+   endif()
+   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+@@ -1666,11 +1698,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+   unset(_boost_DEBUG_NAMES)
+   foreach(compiler IN LISTS _boost_COMPILER)
+     list(APPEND _boost_DEBUG_NAMES
+-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
++      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+       ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
+   endforeach()
+   list(APPEND _boost_DEBUG_NAMES
+-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
++    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+     ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+     ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}
+     ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+@@ -1678,11 +1710,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+     set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+     foreach(compiler IN LISTS _boost_COMPILER)
+       list(APPEND _boost_DEBUG_NAMES
+-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+         ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+     endforeach()
+     list(APPEND _boost_DEBUG_NAMES
+-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+       ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+   endif()
+   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
new file mode 100644
index 0000000..5178f5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
@@ -0,0 +1,31 @@
+From d56deff7d127b030739bd0034609d0046121d8cd Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 22:38:36 +1100
+Subject: [PATCH 3/6] FindBoost: Search for upstream-packaged libs next to
+ includes
+
+Upstream packages Boost binaries for Windows with the 'boost' directory
+(the INCLUDE_DIR) next to the lib-... directory (the LIBRARY_DIR).
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -1502,6 +1502,7 @@ foreach(c DEBUG RELEASE)
+       ${Boost_INCLUDE_DIR}/stage/lib
+       )
+     _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..")
++    _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}")
+     if( Boost_NO_SYSTEM_PATHS )
+       list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+     else()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch
new file mode 100644
index 0000000..88b7e94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch
@@ -0,0 +1,215 @@
+From 875c11dbf87d1258ad7d3697a40d605d503e5673 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Wed, 17 Jan 2018 10:02:14 -0200
+Subject: [PATCH] cmake: Prevent the detection of Qt5
+Organization: O.S. Systems Software LTDA.
+
+CMake doesn't have dependency on qt4/qt5, so these tests usually fail
+but still can cause undeterministic results or build failures (when
+OE_QMAKE_PATH_EXTERNAL_HOST_BINS is undefined or native qmake removed
+while running the test in cmake)
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Source/QtDialog/CMakeLists.txt                     | 2 +-
+ Tests/CMakeLists.txt                               | 2 +-
+ Tests/Qt4And5Automoc/CMakeLists.txt                | 4 ++--
+ Tests/QtAutoUicInterface/CMakeLists.txt            | 2 +-
+ Tests/QtAutogen/CMakeLists.txt                     | 2 +-
+ Tests/QtAutogen/macosFW/CMakeLists.txt             | 2 +-
+ Tests/QtAutogen/mocDepends/CMakeLists.txt          | 2 +-
+ Tests/QtAutogenRerun/CMakeLists.txt                | 4 ++--
+ Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt      | 2 +-
+ Tests/QtAutogenRerun/mocRerun/CMakeLists.txt       | 2 +-
+ Tests/QtAutogenRerun/rccDepends/CMakeLists.txt     | 2 +-
+ Tests/RunCMake/CMakeLists.txt                      | 2 +-
+ Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake | 2 +-
+ 13 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
+index b38797bca..b5fbfc5fa 100644
+--- a/Source/QtDialog/CMakeLists.txt
++++ b/Source/QtDialog/CMakeLists.txt
+@@ -6,7 +6,7 @@ if(POLICY CMP0020)
+   cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
+ endif()
+ CMake_OPTIONAL_COMPONENT(cmake-gui)
+-find_package(Qt5Widgets QUIET)
++#find_package(Qt5Widgets QUIET)
+ if (Qt5Widgets_FOUND)
+   include_directories(${Qt5Widgets_INCLUDE_DIRS})
+   add_definitions(${Qt5Widgets_DEFINITONS})
+diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
+index 533788a44..32ef03c55 100644
+--- a/Tests/CMakeLists.txt
++++ b/Tests/CMakeLists.txt
+@@ -1260,7 +1260,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
+     set(CMake_TEST_Qt5 1)
+   endif()
+   if(CMake_TEST_Qt5)
+-    find_package(Qt5Widgets QUIET NO_MODULE)
++    #find_package(Qt5Widgets QUIET NO_MODULE)
+   endif()
+   if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
+     add_test(NAME Qt5Autogen COMMAND ${CMAKE_CTEST_COMMAND}
+diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt
+index ad74961d9..a9dd74b15 100644
+--- a/Tests/Qt4And5Automoc/CMakeLists.txt
++++ b/Tests/Qt4And5Automoc/CMakeLists.txt
+@@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 2.8.12)
+ project(Qt4And5Automoc)
+ 
+ if (QT_REVERSE_FIND_ORDER)
+-  find_package(Qt5Core REQUIRED)
++  #find_package(Qt5Core REQUIRED)
+   find_package(Qt4 REQUIRED)
+ else()
+   find_package(Qt4 REQUIRED)
+-  find_package(Qt5Core REQUIRED)
++  #find_package(Qt5Core REQUIRED)
+ endif()
+ 
+ set(CMAKE_AUTOMOC ON)
+diff --git a/Tests/QtAutoUicInterface/CMakeLists.txt b/Tests/QtAutoUicInterface/CMakeLists.txt
+index a5c2d99b2..2d640e4a3 100644
+--- a/Tests/QtAutoUicInterface/CMakeLists.txt
++++ b/Tests/QtAutoUicInterface/CMakeLists.txt
+@@ -14,7 +14,7 @@ else()
+   if (NOT QT_TEST_VERSION STREQUAL 5)
+     message(SEND_ERROR "Invalid Qt version specified.")
+   endif()
+-  find_package(Qt5Widgets REQUIRED)
++  #find_package(Qt5Widgets REQUIRED)
+ 
+   set(QT_CORE_TARGET Qt5::Core)
+   set(QT_GUI_TARGET Qt5::Widgets)
+diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
+index dff9d0c66..c6e8fc3f5 100644
+--- a/Tests/QtAutogen/CMakeLists.txt
++++ b/Tests/QtAutogen/CMakeLists.txt
+@@ -23,7 +23,7 @@ else()
+   if (NOT QT_TEST_VERSION STREQUAL 5)
+     message(SEND_ERROR "Invalid Qt version specified.")
+   endif()
+-  find_package(Qt5Widgets REQUIRED)
++  #find_package(Qt5Widgets REQUIRED)
+ 
+   set(QT_QTCORE_TARGET Qt5::Core)
+ 
+diff --git a/Tests/QtAutogen/macosFW/CMakeLists.txt b/Tests/QtAutogen/macosFW/CMakeLists.txt
+index 114d9bac0..157fe0aaa 100644
+--- a/Tests/QtAutogen/macosFW/CMakeLists.txt
++++ b/Tests/QtAutogen/macosFW/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.8)
+ project(macos-fw-test)
+ 
+-find_package(Qt5Test REQUIRED)
++#find_package(Qt5Test REQUIRED)
+ 
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/bin)
+diff --git a/Tests/QtAutogen/mocDepends/CMakeLists.txt b/Tests/QtAutogen/mocDepends/CMakeLists.txt
+index 8217b8dbf..86bb7bc7f 100644
+--- a/Tests/QtAutogen/mocDepends/CMakeLists.txt
++++ b/Tests/QtAutogen/mocDepends/CMakeLists.txt
+@@ -10,7 +10,7 @@ else()
+     message(SEND_ERROR "Invalid Qt version specified.")
+   endif()
+ 
+-  find_package(Qt5Core REQUIRED)
++  #find_package(Qt5Core REQUIRED)
+   set(QT_CORE_TARGET Qt5::Core)
+ endif()
+ 
+diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt
+index e72c1912e..d7e6884ce 100644
+--- a/Tests/QtAutogenRerun/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/CMakeLists.txt
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.9)
+ cmake_policy(SET CMP0071 NEW)
+ project(QtAutogenRerun)
+ 
+-# Tell find_package(Qt5) where to find Qt.
++# Tell #find_package(Qt5) where to find Qt.
+ if(QT_QMAKE_EXECUTABLE)
+   get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
+   get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH)
+@@ -23,7 +23,7 @@ else()
+   if (NOT QT_TEST_VERSION STREQUAL 5)
+     message(SEND_ERROR "Invalid Qt version specified.")
+   endif()
+-  find_package(Qt5Widgets REQUIRED)
++  #find_package(Qt5Widgets REQUIRED)
+ 
+   set(QT_QTCORE_TARGET Qt5::Core)
+ 
+diff --git a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt b/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
+index b7cc5e9ff..e1d109953 100644
+--- a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
+@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC_DEPEND_FILTERS
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+   message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+-find_package(Qt5Widgets REQUIRED)
++#find_package(Qt5Widgets REQUIRED)
+ 
+ if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
+   add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC})
+diff --git a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
+index bafd9cf48..43ec933d2 100644
+--- a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
+@@ -10,7 +10,7 @@ else()
+     message(SEND_ERROR "Invalid Qt version specified.")
+   endif()
+ 
+-  find_package(Qt5Core REQUIRED)
++  #find_package(Qt5Core REQUIRED)
+   set(QT_CORE_TARGET Qt5::Core)
+ endif()
+ 
+diff --git a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
+index 291592e7d..40cd52868 100644
+--- a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
+@@ -9,7 +9,7 @@ else()
+     message(SEND_ERROR "Invalid Qt version specified.")
+   endif()
+ 
+-  find_package(Qt5Core REQUIRED)
++  #find_package(Qt5Core REQUIRED)
+   set(QT_CORE_TARGET Qt5::Core)
+ endif()
+ 
+diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
+index 29325ff0a..d30d01e78 100644
+--- a/Tests/RunCMake/CMakeLists.txt
++++ b/Tests/RunCMake/CMakeLists.txt
+@@ -274,7 +274,7 @@ add_RunCMake_test(configure_file)
+ add_RunCMake_test(CTestTimeoutAfterMatch)
+ 
+ find_package(Qt4 QUIET)
+-find_package(Qt5Core QUIET)
++#find_package(Qt5Core QUIET)
+ if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
+   add_RunCMake_test(IncompatibleQt)
+ endif()
+diff --git a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+index 4fccdc418..b76e1e531 100644
+--- a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
++++ b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+@@ -1,6 +1,6 @@
+ 
+ find_package(Qt4 REQUIRED)
+-find_package(Qt5Core REQUIRED)
++#find_package(Qt5Core REQUIRED)
+ 
+ add_executable(mainexe main.cpp)
+ target_link_libraries(mainexe Qt4::QtCore Qt5::Core)
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
index 15cbca8..6841554 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
@@ -1,4 +1,7 @@
-cmake: support OpenEmbedded Qt4 tool binary names
+From 10b8b523869124d2fc8cd98d9e028c0bcffd61b1 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 12 May 2011 15:36:03 +0000
+Subject: [PATCH 1/2] cmake: support OpenEmbedded Qt4 tool binary names
 
 The FindQt4 module looks for Qt4 binaries to be able to gather the
 paths used for compilation and also to be using during other processes
@@ -15,15 +18,16 @@
 Instead of find_program, _find_qt4_program is now used.
 
 Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
+
 ---
  Modules/FindQt4.cmake | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 11091b5..6704769 100644
+index c67d0be..0cf169b 100644
 --- a/Modules/FindQt4.cmake
 +++ b/Modules/FindQt4.cmake
-@@ -522,7 +522,7 @@ endfunction()
+@@ -516,7 +516,7 @@ endfunction()
  
  set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
  
@@ -32,7 +36,7 @@
  _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
  
  if (QT_QMAKE_EXECUTABLE AND
-@@ -1148,12 +1148,12 @@ if (QT_QMAKE_EXECUTABLE AND
+@@ -1142,12 +1142,12 @@ if (QT_QMAKE_EXECUTABLE AND
    _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
    _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
    _find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
@@ -50,5 +54,5 @@
    _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
  
 -- 
-1.9.1
+2.7.4
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.10.3.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.10.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
index 7b70daa..1c84fb1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
@@ -41,6 +41,7 @@
     [ -z "${cve_dir}" ] && cve_dir="${DL_DIR}/CVE_CHECK"
     [ -z "${cve_file}" ] && cve_file="${TMPDIR}/cve_check"
 
+    unused="${@bb.utils.export_proxies(d)}"
     bbdebug 2 "Updating cve-check-tool database located in $cve_dir"
     # --cacert works around curl-native not finding the CA bundle
     if cve-check-update --cacert ${sysconfdir}/ssl/certs/ca-certificates.crt -d "$cve_dir" ; then
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
index e6f159c..6604648 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
@@ -23,7 +23,6 @@
            file://distcc.service"
 SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c"
 S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
 
 inherit autotools pkgconfig update-rc.d useradd systemd
 
@@ -41,7 +40,9 @@
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "distcc.service"
 
-do_install_append() {
+do_install() {
+    # Improve reproducibility: compress w/o timestamps
+    oe_runmake 'DESTDIR=${D}'  "GZIP_BIN=gzip -n" install
     install -d ${D}${sysconfdir}/init.d/
     install -d ${D}${sysconfdir}/default
     install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch
deleted file mode 100644
index 05f3141..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 166833a88a928a574bf9143b9b65f544be482c77 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 18 Aug 2017 15:55:15 +0300
-Subject: [PATCH] Check conf.releasever instead of releasever
-
-The substitutions may actually set the conf.releasever correctly,
-and so the check should use that instead of the passed-in function
-parameter.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/901]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- dnf/cli/cli.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
-index 2d63420c..167943b8 100644
---- a/dnf/cli/cli.py
-+++ b/dnf/cli/cli.py
-@@ -914,7 +914,7 @@ class Cli(object):
-         conf.releasever = releasever
-         subst = conf.substitutions
-         subst.update_from_etc(conf.installroot)
--        if releasever is None:
-+        if conf.releasever is None:
-             logger.warning(_("Unable to detect release version (use '--releasever' to specify "
-                              "release version)"))
- 
--- 
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
index c9df458..6692b41 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
@@ -1,10 +1,11 @@
-From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001
+From 05e059cd4e9910c00b32d377f4f98e3c8dde6bc6 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 26 Jan 2017 16:36:20 +0200
-Subject: [PATCH] Corretly install tmpfiles.d configuration
+Subject: [PATCH 4/5] Corretly install tmpfiles.d configuration
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  etc/tmpfiles.d/CMakeLists.txt | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -17,5 +18,5 @@
 -INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
 +INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
index 0f261e5..15a7bfc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
@@ -1,16 +1,17 @@
-From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001
+From a8ef81c115a45f05dad145c98e10f3c4940e4e29 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 26 Jan 2017 16:25:47 +0200
-Subject: [PATCH] Do not hardcode /etc and systemd unit directories
+Subject: [PATCH 3/5] Do not hardcode /etc and systemd unit directories
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  CMakeLists.txt | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6a319935..db20ccd4 100644
+index 650b624a..10199618 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -7,8 +7,8 @@ if (NOT PYTHON_DESIRED)
@@ -25,5 +26,5 @@
  if (${PYTHON_DESIRED} STREQUAL "2")
  	FIND_PACKAGE (PythonInterp REQUIRED)
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
deleted file mode 100644
index a90e77c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 11 Jan 2017 15:10:13 +0200
-Subject: [PATCH] Do not prepend installroot to logdir.
-
-This would otherwise write the logs into rootfs/var/log
-(whereas we want them in $T),
-and will break installation of base-files rpm.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- dnf/cli/cli.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
-index b764801a..893f4bda 100644
---- a/dnf/cli/cli.py
-+++ b/dnf/cli/cli.py
-@@ -881,7 +881,7 @@ class Cli(object):
-         subst = conf.substitutions
-         subst.update_from_etc(conf.installroot)
- 
--        for opt in ('cachedir', 'logdir', 'persistdir'):
-+        for opt in ('cachedir', 'persistdir'):
-             conf.prepend_installroot(opt)
- 
-         self.base._logging._setup_from_dnf_conf(conf)
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
new file mode 100644
index 0000000..aa20009
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
@@ -0,0 +1,31 @@
+From 6365389074a1b86962f3d8b22a2ead2202026a98 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Jan 2017 15:10:13 +0200
+Subject: [PATCH 5/5] Do not prepend installroot to logdir.
+
+This would otherwise write the logs into rootfs/var/log
+(whereas we want them in $T),
+and will break installation of base-files rpm.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/cli/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
+index d2d9c082..82270ecf 100644
+--- a/dnf/cli/cli.py
++++ b/dnf/cli/cli.py
+@@ -920,7 +920,7 @@ class Cli(object):
+             logger.warning(_("Unable to detect release version (use '--releasever' to specify "
+                              "release version)"))
+ 
+-        for opt in ('cachedir', 'logdir', 'persistdir'):
++        for opt in ('cachedir', 'persistdir'):
+             conf.prepend_installroot(opt)
+ 
+         self.base._logging._setup_from_dnf_conf(conf)
+-- 
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
index 8c59f9f..6e01191 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -1,16 +1,17 @@
-From 3ddaa930cda57a62a2174faebcc87aebc59591d1 Mon Sep 17 00:00:00 2001
+From 7205033e44d8fba1d3b18b490e7eaab82da1ffa3 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 30 Dec 2016 18:29:07 +0200
-Subject: [PATCH 29/30] Do not set PYTHON_INSTALL_DIR by running python
+Subject: [PATCH 1/5] Do not set PYTHON_INSTALL_DIR by running python
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  CMakeLists.txt | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6a319935..466ca1e6 100644
+index 23e5f889..650b624a 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -18,7 +18,7 @@ else()
@@ -23,5 +24,5 @@
  MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
  
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
index 1abd880..eedbb57 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
@@ -1,19 +1,20 @@
-From 9c8d545152b35d8943be72b9503414a53e1ebf7c Mon Sep 17 00:00:00 2001
+From 8d97b72a1d77149e2f9048d1ca6cef66da1a8aa5 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 30 Dec 2016 18:29:37 +0200
-Subject: [PATCH 30/30] Run python scripts using env
+Subject: [PATCH 2/5] Run python scripts using env
 
 Otherwise the build tools hardcode the python path into them.
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  bin/dnf-automatic.in | 2 +-
  bin/dnf.in           | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
-index 5b06aa26..9f6f703e 100755
+index 5b06aa26..891b4c24 100755
 --- a/bin/dnf-automatic.in
 +++ b/bin/dnf-automatic.in
 @@ -1,4 +1,4 @@
@@ -23,7 +24,7 @@
  #
  # Copyright (C) 2014-2016 Red Hat, Inc.
 diff --git a/bin/dnf.in b/bin/dnf.in
-index 645d0f06..ab141abd 100755
+index 645d0f06..bdf7b3c4 100755
 --- a/bin/dnf.in
 +++ b/bin/dnf.in
 @@ -1,4 +1,4 @@
@@ -33,5 +34,5 @@
  #
  # Copyright (C) 2012-2016 Red Hat, Inc.
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
deleted file mode 100644
index 3ed6a74..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \
-                   "
-
-SRC_URI = "git://github.com/rpm-software-management/dnf.git \
-           file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
-           file://0030-Run-python-scripts-using-env.patch \
-           file://0001-Do-not-prepend-installroot-to-logdir.patch \
-           file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
-           file://0001-Corretly-install-tmpfiles.d-configuration.patch \
-           file://0001-Check-conf.releasever-instead-of-releasever.patch \
-           "
-
-SRCREV = "be2585183ec4485ee4d5e121f242d8669296f065"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-inherit cmake gettext bash-completion distutils3-base systemd
-
-DEPENDS += "libdnf librepo libcomps python3-iniparse"
-
-# manpages generation requires http://www.sphinx-doc.org/
-EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
-
-BBCLASSEXTEND = "native nativesdk"
-RDEPENDS_${PN}_class-target += "python3-core python3-codecs python3-netclient python3-email python3-threading python3-distutils librepo python3-shell python3-subprocess libcomps libdnf python3-sqlite3 python3-compression python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc python3-gpg"
-# Recommend gnupg so that GPG signature check on repository metadata is possible
-RRECOMMENDS_${PN}_class-target += "gnupg"
-
-# Create a symlink called 'dnf' as 'make install' does not do it, but
-# .spec file in dnf source tree does (and then Fedora and dnf documentation
-# says that dnf binary is plain 'dnf').
-do_install_append() {
-        lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
-        lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
-}
-
-# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
-do_install_append_class-native() {
-        create_wrapper ${D}/${bindir}/dnf \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-}
-
-SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
-                         dnf-automatic-download.service dnf-automatic-download.timer \
-                         dnf-automatic-install.service dnf-automatic-install.timer \
-                         dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb
new file mode 100644
index 0000000..b88ddb4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \
+                   "
+
+SRC_URI = "git://github.com/rpm-software-management/dnf.git \
+           file://0001-Corretly-install-tmpfiles.d-configuration.patch \
+           file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
+           file://0005-Do-not-prepend-installroot-to-logdir.patch \
+           file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+           file://0030-Run-python-scripts-using-env.patch \
+           "
+
+SRCREV = "564c44667c7014843fa6f1732621093114ec59b2"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake gettext bash-completion distutils3-base systemd
+
+DEPENDS += "libdnf librepo libcomps python3-iniparse"
+
+# manpages generation requires http://www.sphinx-doc.org/
+EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN}_class-target += " \
+  python3-core \
+  python3-codecs \
+  python3-netclient \
+  python3-email \
+  python3-threading \
+  python3-distutils \
+  python3-logging \
+  python3-fcntl \
+  librepo \
+  python3-shell \
+  libcomps \
+  libdnf \
+  python3-sqlite3 \
+  python3-compression \
+  python3-rpm \
+  python3-iniparse \
+  python3-json \
+  python3-curses \
+  python3-misc \
+  python3-gpg \
+  "
+
+RRECOMMENDS_${PN}_class-target += "gnupg"
+
+# Create a symlink called 'dnf' as 'make install' does not do it, but
+# .spec file in dnf source tree does (and then Fedora and dnf documentation
+# says that dnf binary is plain 'dnf').
+do_install_append() {
+        lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
+        lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
+}
+
+# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
+do_install_append_class-native() {
+        create_wrapper ${D}/${bindir}/dnf \
+                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1
+}
+
+SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
+                         dnf-automatic.service dnf-automatic.timer \
+                         dnf-automatic-download.service dnf-automatic-download.timer \
+                         dnf-automatic-install.service dnf-automatic-install.timer \
+                         dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
new file mode 100644
index 0000000..45c606e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
@@ -0,0 +1,54 @@
+From 319f32d743f5b5e725012654d124e49226d5de91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Mar 2018 20:28:24 -0700
+Subject: [PATCH] arch: Add support for riscv64 CPU
+
+  * Architecture support:
+    - Add support for riscv64 CPU. Closes: #822914
+      Thanks to Manuel A. Fernandez Montecelo <mafm@debian.org>
+
+Upstream-Status: Backport [https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=dpkg%2Fdpkg.git;a=commitdiff_plain;h=ee0855cc66076691de4796be48f8a0d889fde001;hp=2f5816d8be40b449d2473b22f9e0c33b32f3bd78]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ data/cputable         | 1 +
+ scripts/t/Dpkg_Arch.t | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/data/cputable b/data/cputable
+index a2bd7d6..9f2a8e0 100644
+--- a/data/cputable
++++ b/data/cputable
+@@ -41,6 +41,7 @@ powerpc		powerpc		(powerpc|ppc)		32	big
+ powerpcel	powerpcle	powerpcle		32	little
+ ppc64		powerpc64	(powerpc|ppc)64		64	big
+ ppc64el		powerpc64le	powerpc64le		64	little
++riscv64		riscv64		riscv64			64	little
+ s390		s390		s390			32	big
+ s390x		s390x		s390x			64	big
+ sh3		sh3		sh3			32	little
+diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t
+index d478b49..ecd5d66 100644
+--- a/scripts/t/Dpkg_Arch.t
++++ b/scripts/t/Dpkg_Arch.t
+@@ -16,7 +16,7 @@
+ use strict;
+ use warnings;
+ 
+-use Test::More tests => 16367;
++use Test::More tests => 16832;
+ 
+ use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch
+                         debarch_eq debarch_is debarch_is_wildcard
+@@ -162,7 +162,7 @@ is(gnutriplet_to_debarch(undef), undef, 'undef gnutriplet');
+ is(gnutriplet_to_debarch('unknown-unknown-unknown'), undef, 'unknown gnutriplet');
+ is(gnutriplet_to_debarch('x86_64-linux-gnu'), 'amd64', 'known gnutriplet');
+ 
+-is(scalar get_valid_arches(), 524, 'expected amount of known architectures');
++is(scalar get_valid_arches(), 539, 'expected amount of known architectures');
+ 
+ {
+     local $ENV{CC} = 'false';
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
index d929466..8797ea5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
@@ -5,6 +5,7 @@
 
 helps compiling dpkg for musl/arm-softfloat
 
+Upstream-Status: Pending
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
 ---
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
index d56b8a6..d483866 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
@@ -1,12 +1,17 @@
+From 9d260d408f9e17abd1d1dccd685bd7e80a3655a9 Mon Sep 17 00:00:00 2001
+From: Donn Seeley <donn.seeley@windriver.com>
+Date: Tue, 25 Feb 2014 17:44:04 +0800
+Subject: [PATCH] dpkg: fix a link problem for dpkg-native on CentOS 5.8
+
 CentOS 5.8 kernels and headers support the sync_file_range() system call,
 but glibc 2.5 doesn't provide the syscall stub.  It appears that this
 problem is known but will never be fixed:
 
   https://bugzilla.redhat.com/show_bug.cgi?id=518581
 
-  Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface 
+  Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
 
-  Status:       CLOSED CANTFIX 
+  Status:       CLOSED CANTFIX
   Last Closed:  2009-11-22 22:19:55
 
   Kirby Zhou 2009-08-20 23:37:55 EDT
@@ -60,13 +65,16 @@
 
 Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
 Signed-off-by: Lei Liu <lei.liu2@windriver.com>
+
 ---
- src/archives.c |    4 ++--
+ src/archives.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/src/archives.c b/src/archives.c
+index 4b2fc92..a92b795 100644
 --- a/src/archives.c
 +++ b/src/archives.c
-@@ -75,7 +75,7 @@
+@@ -69,7 +69,7 @@ fd_writeback_init(int fd)
    /* Ignore the return code as it should be considered equivalent to an
     * asynchronous hint for the kernel, we are doing an fsync() later on
     * anyway. */
@@ -75,7 +83,7 @@
    sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
  #elif defined(HAVE_POSIX_FADVISE)
    posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
-@@ -1179,7 +1179,7 @@
+@@ -1078,7 +1078,7 @@ tarobject(void *ctx, struct tar_entry *ti)
    return 0;
  }
  
@@ -84,3 +92,6 @@
  static void
  tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg)
  {
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
index c0c59f1..6d8ec34 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
@@ -14,6 +14,7 @@
            file://0006-add-musleabi-to-known-target-tripets.patch \
            file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \
            file://0001-dpkg-Support-muslx32-build.patch \
+           file://0001-arch-Add-support-for-riscv64-CPU.patch \
            "
 SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
new file mode 100644
index 0000000..c59a006
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
@@ -0,0 +1,22 @@
+SUMMARY = "A small utility for printing debig source file locations embedded in binaries"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://../dwarfsrcfiles.c;md5=31483894e453a77acbb67847565f1b5c;beginline=1;endline=8"
+
+SRC_URI = "file://dwarfsrcfiles.c"
+BBCLASSEXTEND = "native"
+DEPENDS = "elfutils"
+DEPENDS_append_libc-musl = " argp-standalone"
+
+do_compile () {
+	${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw
+}
+
+do_compile_libc-musl () {
+	${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw -largp 
+}
+
+do_install () {
+	install -d ${D}${bindir}
+	install -t ${D}${bindir} dwarfsrcfiles
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
new file mode 100644
index 0000000..af7af52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
@@ -0,0 +1,111 @@
+// dwarfsrcfiles.c - Get source files associated with the dwarf in a elf file.
+// gcc -Wall -g -O2 -lelf -ldw -o dwarfsrcfiles dwarfsrcfiles.c 
+//
+// Copyright (C) 2011, Mark Wielaard <mjw@redhat.com>
+//
+// This file is free software.  You can redistribute it and/or modify
+// it under the terms of the GNU General Public License (GPL); either
+// version 2, or (at your option) any later version.
+
+#include <argp.h>
+#include <stdio.h>
+
+#include <dwarf.h>
+#include <elfutils/libdw.h>
+#include <elfutils/libdwfl.h>
+
+static int
+process_cu (Dwarf_Die *cu_die)
+{
+  Dwarf_Attribute attr;
+  const char *name;
+  const char *dir = NULL;
+  
+  Dwarf_Files *files;
+  size_t n;
+  int i;
+  
+  if (dwarf_tag (cu_die) != DW_TAG_compile_unit)
+    {
+      fprintf (stderr, "DIE isn't a compile unit");
+      return -1;
+    }
+  
+  if (dwarf_attr (cu_die, DW_AT_name, &attr) == NULL)
+    {
+      fprintf(stderr, "CU doesn't have a DW_AT_name");
+      return -1;
+    }
+  
+  name = dwarf_formstring (&attr);
+  if (name == NULL)
+    {
+      fprintf(stderr, "Couldn't get DW_AT_name as string, %s",
+	     dwarf_errmsg (-1));
+      return -1;
+    }
+  
+  if (dwarf_attr (cu_die, DW_AT_comp_dir, &attr) != NULL)
+    {
+      dir = dwarf_formstring (&attr);
+      if (dir == NULL)
+	{
+	  fprintf(stderr, "Couldn't get DW_AT_comp_die as string, %s",
+		 dwarf_errmsg (-1));
+	  return -1;
+	}
+    }
+  
+  if (dir == NULL)
+    printf ("%s\n", name);
+  else
+    printf ("%s/%s\n", dir, name);
+  
+  if (dwarf_getsrcfiles (cu_die, &files, &n) != 0)
+    {
+      fprintf(stderr, "Couldn't get CU file table, %s",
+	     dwarf_errmsg (-1));
+      return -1;
+    }
+  
+  for (i = 1; i < n; i++)
+    {
+      const char *file = dwarf_filesrc (files, i, NULL, NULL);
+      if (dir != NULL && file[0] != '/')
+	printf ("\t%s/%s\n", dir, file);
+      else
+	printf ("\t%s\n", file);
+    }
+  
+  return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+  char* args[3];
+  int res = 0;
+  Dwfl *dwfl;
+  Dwarf_Addr bias;
+  
+  if (argc != 2)
+    fprintf(stderr, "Usage %s <file>", argv[0]);
+  
+  // Pretend "dwarfsrcfiles -e <file>" was given, so we can use standard
+  // dwfl argp parser to open the file for us and get our Dwfl. Useful
+  // in case argument is an ET_REL file (like kernel modules). libdwfl
+  // will fix up relocations for us.
+  args[0] = argv[0];
+  args[1] = "-e";
+  args[2] = argv[1];
+  
+  argp_parse (dwfl_standard_argp (), 3, args, 0, NULL, &dwfl);
+  
+  Dwarf_Die *cu = NULL;
+  while ((cu = dwfl_nextcu (dwfl, cu, &bias)) != NULL)
+    res |= process_cu (cu);
+  
+  dwfl_end (dwfl);
+
+  return res;
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch
new file mode 100644
index 0000000..ff1284e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch
@@ -0,0 +1,40 @@
+From ae6603206176b771c9ed1f82569f68fc1257f014 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Wed, 3 Jan 2018 01:32:02 -0500
+Subject: [PATCH] libext2fs: fix build failure in swapfs.c on big-endian
+ systems
+
+Addresses-Debian-Bug: #886119
+
+Reported-by: James Clarke <jrtc27@debian.org>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+---
+Upstream-Status: Backport
+
+ lib/ext2fs/swapfs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
+index 6e5cff97..b13dc422 100644
+--- a/lib/ext2fs/swapfs.c
++++ b/lib/ext2fs/swapfs.c
+@@ -19,6 +19,7 @@
+ 
+ #include "ext2_fs.h"
+ #include "ext2fs.h"
++#include "ext2fsP.h"
+ #include <ext2fs/ext2_ext_attr.h>
+ 
+ #ifdef WORDS_BIGENDIAN
+@@ -358,7 +359,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
+ 	if (inode_includes(inode_size, i_projid))
+                 t->i_projid = ext2fs_swab16(f->i_projid);
+ 	/* catch new static fields added after i_projid */
+-	EXT2FS_BUILD_BUG_ON(sizeof(ext2_inode_large) != 160);
++	EXT2FS_BUILD_BUG_ON(sizeof(struct ext2_inode_large) != 160);
+ 
+ 	i = sizeof(struct ext2_inode) + extra_isize + sizeof(__u32);
+ 	if (bufsize < (int) i)
+-- 
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch
deleted file mode 100644
index 308fe0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 647353f7c3fd29e1ffd468d7ff56d9643047ab35 Mon Sep 17 00:00:00 2001
-From: Palmer Dabbelt <palmer@dabbelt.com>
-Date: Fri, 29 Dec 2017 10:19:51 -0800
-Subject: [PATCH] misc: rename copy_file_range to copy_file_chunk
-
-As of 2.27, glibc will have a copy_file_range library call to wrap the
-new copy_file_range system call.  This conflicts with the function in
-misc/create_inode.c, which this patch renames _copy_file_range.
-
-Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-
-Upstream-Status: Backport
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- misc/create_inode.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 8ce3fafa..cd89146f 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -396,7 +396,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
- }
- #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
- 
--static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
-+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file,
- 				 off_t start, off_t end, char *buf,
- 				 char *zerobuf)
- {
-@@ -470,7 +470,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf,
- 
- 		data_blk = data & ~(fs->blocksize - 1);
- 		hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1);
--		err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
-+		err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf,
- 				      zerobuf);
- 		if (err)
- 			return err;
-@@ -521,7 +521,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file,
- 			goto out;
- 		for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
- 		     i++, ext++) {
--			err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
-+			err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical,
- 					      ext->fe_logical + ext->fe_length,
- 					      buf, zerobuf);
- 			if (err)
-@@ -574,7 +574,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
- 		goto out;
- #endif
- 
--	err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
-+	err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf,
- 			      zerobuf);
- out:
- 	ext2fs_free_mem(&zerobuf);
--- 
-2.16.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
index 38fb07e..38e1bdb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
@@ -19,10 +19,10 @@
  misc/mke2fs.conf.in | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
-diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
-index 812f7c7..0280398 100644
---- a/misc/mke2fs.conf.in
-+++ b/misc/mke2fs.conf.in
+Index: git/misc/mke2fs.conf.in
+===================================================================
+--- git.orig/misc/mke2fs.conf.in
++++ git/misc/mke2fs.conf.in
 @@ -11,8 +11,9 @@
  		features = has_journal
  	}
@@ -32,5 +32,5 @@
  		inode_size = 256
 +		auto_64-bit_support = 1
  	}
- 	ext4dev = {
- 		features = has_journal,extent,huge_file,flex_bg,uninit_bg,inline_data,64bit,dir_nlink,extra_isize
+ 	small = {
+ 		blocksize = 1024
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
deleted file mode 100644
index c0bd7db..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
+++ /dev/null
@@ -1,135 +0,0 @@
-# Extracted from the package's shipped aclocal.m4. Custom macros should be in
-# acinclude.m4 so running aclocal doesn't blow them away.
-#
-# Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-# from http://autoconf-archive.cryp.to/ax_tls.html
-#
-# This was licensed under the GPL with the following exception:
-#
-# As a special exception, the respective Autoconf Macro's copyright
-# owner gives unlimited permission to copy, distribute and modify the
-# configure scripts that are the output of Autoconf when processing
-# the Macro. You need not follow the terms of the GNU General Public
-# License when using or distributing such scripts, even though
-# portions of the text of the Macro appear in them. The GNU General
-# Public License (GPL) does govern all other use of the material that
-# constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the
-# Autoconf Macro released by the Autoconf Macro Archive. When you make
-# and distribute a modified version of the Autoconf Macro, you may
-# extend this special exception to the GPL to apply to your modified
-# version as well.
-#
-AC_DEFUN([AX_TLS], [
-  AC_MSG_CHECKING(for thread local storage (TLS) class)
-  AC_CACHE_VAL(ac_cv_tls, [
-    ax_tls_keywords="__thread __declspec(thread) none"
-    for ax_tls_keyword in $ax_tls_keywords; do
-       case $ax_tls_keyword in
-          none) ac_cv_tls=none ; break ;;
-          *)
-             AC_TRY_COMPILE(
-                [#include <stdlib.h>
-                 static void
-                 foo(void) {
-                 static ] $ax_tls_keyword [ int bar;
-                 exit(1);
-                 }],
-                 [],
-                 [ac_cv_tls=$ax_tls_keyword ; break],
-                 ac_cv_tls=none
-             )
-          esac
-    done
-])
-
-  if test "$ac_cv_tls" != "none"; then
-    dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
-    AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
-  fi
-  AC_MSG_RESULT($ac_cv_tls)
-])
-
-# ===========================================================================
-#         http://www.nongnu.org/autoconf-archive/check_gnu_make.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   CHECK_GNU_MAKE()
-#
-# DESCRIPTION
-#
-#   This macro searches for a GNU version of make. If a match is found, the
-#   makefile variable `ifGNUmake' is set to the empty string, otherwise it
-#   is set to "#". This is useful for including a special features in a
-#   Makefile, which cannot be handled by other versions of make. The
-#   variable _cv_gnu_make_command is set to the command to invoke GNU make
-#   if it exists, the empty string otherwise.
-#
-#   Here is an example of its use:
-#
-#   Makefile.in might contain:
-#
-#       # A failsafe way of putting a dependency rule into a makefile
-#       $(DEPEND):
-#               $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-#
-#       @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-#       @ifGNUmake@ include $(DEPEND)
-#       @ifGNUmake@ endif
-#
-#   Then configure.in would normally contain:
-#
-#       CHECK_GNU_MAKE()
-#       AC_OUTPUT(Makefile)
-#
-#   Then perhaps to cause gnu make to override any other make, we could do
-#   something like this (note that GNU make always looks for GNUmakefile
-#   first):
-#
-#       if  ! test x$_cv_gnu_make_command = x ; then
-#               mv Makefile GNUmakefile
-#               echo .DEFAULT: > Makefile ;
-#               echo \  $_cv_gnu_make_command \$@ >> Makefile;
-#       fi
-#
-#   Then, if any (well almost any) other make is called, and GNU make also
-#   exists, then the other make wraps the GNU make.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.
-#
-# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
-
-AC_DEFUN(
-        [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
-                _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
-                for a in "$MAKE" make gmake gnumake ; do
-                        if test -z "$a" ; then continue ; fi ;
-                        if  ( sh -c "$a --version" 2> /dev/null | grep GNU  2>&1 > /dev/null ) ;  then
-                                _cv_gnu_make_command=$a ;
-                                break;
-                        fi
-                done ;
-        ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
-        if test  "x$_cv_gnu_make_command" != "x"  ; then
-                ifGNUmake='' ;
-                ifNotGNUmake='#' ;
-        else
-                ifGNUmake='#' ;
-                ifNotGNUmake='' ;
-                AC_MSG_RESULT("Not found");
-        fi
-        AC_SUBST(ifGNUmake)
-        AC_SUBST(ifNotGNUmake)
-] )
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
index 33054c6..69c09bc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -1,3 +1,6 @@
+From c7914309aeee6209ddb6995c084805a911d9cc82 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 10 Aug 2016 11:19:44 +0800
 Subject: [PATCH] Fix missing check for permission denied.
 
 If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem,
@@ -10,15 +13,16 @@
 Written-by: Henrik Wallin <henrik.b.wallin@ericsson.com>
 
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
 ---
  lib/support/profile.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/support/profile.c b/lib/support/profile.c
-index 51a3314..1c1039f 100644
+index 9e96673b..32d83002 100644
 --- a/lib/support/profile.c
 +++ b/lib/support/profile.c
-@@ -335,7 +335,7 @@ profile_init(const char **files, profile_t *ret_profile)
+@@ -335,7 +335,7 @@ profile_init(const char * const *files, profile_t *ret_profile)
  				*last = new_file;
  				last = &new_file->next;
  			}
@@ -28,5 +32,5 @@
  			goto errout;
  
 -- 
-2.7.4
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
deleted file mode 100644
index 2a3aeff..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index c1fe224..f5ac628 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1374,7 +1374,8 @@ if test -n "$WITH_DIET_LIBC" ; then
- 	INCLUDES="$INCLUDES -D_REENTRANT"
- fi
- AC_SUBST(INCLUDES)
--AM_MKINSTALLDIRS
-+MKINSTALLDIRS="mkdir -p"
-+AC_SUBST(MKINSTALLDIRS)
- dnl
- dnl Build CFLAGS
- dnl
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
index 7df0967..7c4bb39 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
@@ -1,10 +1,10 @@
 Upstream-Status: Inappropriate
 
-diff --git a/tests/Makefile.in b/tests/Makefile.in
-index c130f4a..d2ade03 100644
---- a/tests/Makefile.in
-+++ b/tests/Makefile.in
-@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+Index: git/tests/Makefile.in
+===================================================================
+--- git.orig/tests/Makefile.in
++++ git/tests/Makefile.in
+@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile
  	@echo "#!/bin/sh" > test_one
  	@echo "HTREE=y" >> test_one
  	@echo "QUOTA=y" >> test_one
@@ -12,8 +12,8 @@
 +	@echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
  	@echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
  	@echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one
- 	@cat $(srcdir)/test_one.in >> test_one
-@@ -27,7 +27,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+ 	@echo "DD=@DD@" >>test_one
+@@ -28,7 +28,7 @@ test_one: $(srcdir)/test_one.in Makefile
  test_script: test_one test_script.in Makefile mke2fs.conf
  	@echo "Creating test_script..."
  	@echo "#!/bin/sh" > test_script
@@ -22,10 +22,10 @@
  	@cat $(srcdir)/test_script.in >> test_script
  	@chmod +x test_script
  
-diff --git a/tests/test_config b/tests/test_config
-index 547ef4c..e11e6f4 100644
---- a/tests/test_config
-+++ b/tests/test_config
+Index: git/tests/test_config
+===================================================================
+--- git.orig/tests/test_config
++++ git/tests/test_config
 @@ -3,24 +3,24 @@
  #
  
@@ -67,10 +67,10 @@
  CLEAN_OUTPUT="sed -f $cmd_dir/filter.sed"
  LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${LD_LIBRARY_PATH}
  DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${DYLD_LIBRARY_PATH}
-diff --git a/tests/test_script.in b/tests/test_script.in
-index 9959e30..442999d 100644
---- a/tests/test_script.in
-+++ b/tests/test_script.in
+Index: git/tests/test_script.in
+===================================================================
+--- git.orig/tests/test_script.in
++++ git/tests/test_script.in
 @@ -39,7 +39,7 @@ for i; do
  done
  
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch
deleted file mode 100644
index 8e5d1d3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Suppport for binary reproducibility.
-When compressing, do not save the original file name and time stamp.
-
-Upstream-Status: Submitted [Theodore Ts'o tytso@mit.edu (maintainer)]
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-diff --git a/doc/Makefile.in b/doc/Makefile.in
-index 9cb584c..0bee4e4 100644
---- a/doc/Makefile.in
-+++ b/doc/Makefile.in
-@@ -28,7 +28,7 @@ install-doc-libs: libext2fs.info libext2fs.dvi
- 		$(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
- 	done
- 	$(E) "	GZIP $(infodir)/libext2fs.info*"
--	-$(Q) gzip -9 $(DESTDIR)$(infodir)/libext2fs.info*
-+	-$(Q) gzip -9 -n $(DESTDIR)$(infodir)/libext2fs.info*
- 
- uninstall-doc-libs:
- 	$(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
deleted file mode 100644
index f1d7c08..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
+++ /dev/null
@@ -1,118 +0,0 @@
-require e2fsprogs.inc
-
-SRC_URI += "file://acinclude.m4 \
-            file://remove.ldconfig.call.patch \
-            file://quiet-debugfs.patch \
-            file://run-ptest \
-            file://ptest.patch \
-            file://mkdir.patch \
-            file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
-            file://mkdir_p.patch \
-            file://reproducible-doc.patch \
-            file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
-            file://0001-misc-rename-copy_file_range-to-copy_file_chunk.patch \
-"
-
-SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
-
-SRCREV = "2a13c84b513aa094d1cda727e92d35a89dd777da"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
-
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
-                --enable-elf-shlibs --disable-libuuid --disable-uuidd \
-                --disable-libblkid --enable-verbose-makecmds"
-
-EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
-
-do_configure_prepend () {
-	cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_install () {
-	oe_runmake 'DESTDIR=${D}' install
-	oe_runmake 'DESTDIR=${D}' install-libs
-	# We use blkid from util-linux now so remove from here
-	rm -f ${D}${base_libdir}/libblkid*
-	rm -rf ${D}${includedir}/blkid
-	rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
-	rm -f ${D}${base_sbindir}/blkid
-	rm -f ${D}${base_sbindir}/fsck
-	rm -f ${D}${base_sbindir}/findfs
-
-	# e2initrd_helper and the pkgconfig files belong in libdir
-	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
-		install -d ${D}${libdir}
-		mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
-		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
-	fi
-
-	oe_multilib_header ext2fs/ext2_types.h
-	install -d ${D}${base_bindir}
-	mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
-
-	install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
-
-	# Clean host path (build directory) in compile_et, mk_cmds
-	sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et
-	sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds
-}
-
-# Need to find the right mke2fs.conf file
-e2fsprogs_conf_fixup () {
-	for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do
-		create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
-	done
-}
-
-do_install_append_class-native() {
-	e2fsprogs_conf_fixup
-}
-
-do_install_append_class-nativesdk() {
-	e2fsprogs_conf_fixup
-}
-
-RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
-RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
-
-PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
-PACKAGES =+ "libcomerr libss libe2p libext2fs"
-
-FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
-FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
-FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
-FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
-FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
-FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
-FILES_libss = "${base_libdir}/libss.so.*"
-FILES_libe2p = "${base_libdir}/libe2p.so.*"
-FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
-FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds"
-
-ALTERNATIVE_${PN} = "chattr"
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
-ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
-
-ALTERNATIVE_${PN}-doc = "fsck.8"
-ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
-
-RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
-
-do_compile_ptest() {
-	oe_runmake -C ${B}/tests
-}
-
-do_install_ptest() {
-	cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
-	cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
-	sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
-
-	# Remove various files
-	find "${D}${PTEST_PATH}" -type f \
-	    \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\
-	    -exec  rm -f {} +
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
new file mode 100644
index 0000000..56abb3b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
@@ -0,0 +1,120 @@
+require e2fsprogs.inc
+
+SRC_URI += "file://remove.ldconfig.call.patch \
+            file://run-ptest \
+            file://ptest.patch \
+            file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
+            file://mkdir_p.patch \
+            file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
+            file://0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch \
+            "
+
+SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
+                                file://quiet-debugfs.patch \
+"
+
+SRCREV = "af2eac481cf426c05ae12b946396980e16c8ab19"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
+
+EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
+                --enable-elf-shlibs --disable-libuuid --disable-uuidd \
+                --disable-libblkid --enable-verbose-makecmds"
+
+EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
+
+# make locale rules sometimes fire, sometimes don't as git doesn't preserve
+# file mktime. Touch the files introducing non-determinism to the build
+do_compile_prepend (){
+	find ${S}/po -type f -name "*.po" -exec touch {} +
+}
+
+do_install () {
+	oe_runmake 'DESTDIR=${D}' install
+	oe_runmake 'DESTDIR=${D}' install-libs
+	# We use blkid from util-linux now so remove from here
+	rm -f ${D}${base_libdir}/libblkid*
+	rm -rf ${D}${includedir}/blkid
+	rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
+	rm -f ${D}${base_sbindir}/blkid
+	rm -f ${D}${base_sbindir}/fsck
+	rm -f ${D}${base_sbindir}/findfs
+
+	# e2initrd_helper and the pkgconfig files belong in libdir
+	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+		install -d ${D}${libdir}
+		mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
+		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+	fi
+
+	oe_multilib_header ext2fs/ext2_types.h
+	install -d ${D}${base_bindir}
+	mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
+
+	install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
+
+	# Clean host path (build directory) in compile_et, mk_cmds
+	sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et
+	sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds
+}
+
+# Need to find the right mke2fs.conf file
+e2fsprogs_conf_fixup () {
+	for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4; do
+		create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
+	done
+}
+
+do_install_append_class-native() {
+	e2fsprogs_conf_fixup
+}
+
+do_install_append_class-nativesdk() {
+	e2fsprogs_conf_fixup
+}
+
+RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
+RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
+
+PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
+PACKAGES =+ "libcomerr libss libe2p libext2fs"
+
+FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
+FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
+FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
+FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
+FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
+FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
+FILES_libss = "${base_libdir}/libss.so.*"
+FILES_libe2p = "${base_libdir}/libe2p.so.*"
+FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
+FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds"
+
+ALTERNATIVE_${PN} = "chattr"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
+ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
+
+ALTERNATIVE_${PN}-doc = "fsck.8"
+ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
+
+RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
+
+do_compile_ptest() {
+	oe_runmake -C ${B}/tests
+}
+
+do_install_ptest() {
+	cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
+	cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
+	sed -e 's!../e2fsck/e2fsck!e2fsck!g' \
+	    -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect*
+	sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script
+
+	# Remove various files
+	find "${D}${PTEST_PATH}" -type f \
+	    \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\
+	    -exec  rm -f {} +
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
index 3b81e28..14ac22e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
@@ -5,40 +5,31 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "libtool bzip2 zlib virtual/libintl"
 DEPENDS_append_libc-musl = " argp-standalone fts "
-SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2"
+# The Debian patches below are from:
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz
+SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
+           file://0001-dso-link-change.patch \
+           file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
+           file://0003-fixheadercheck.patch \
+           file://0004-Disable-the-test-to-convert-euc-jp.patch \
+           file://0005-fix-a-stack-usage-warning.patch \
+           file://0006-Fix-build-on-aarch64-musl.patch \
+           file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
+           file://0001-libasm-may-link-with-libbz2-if-found.patch \
+           file://debian/hppa_backend.diff \
+           file://debian/arm_backend.diff \
+           file://debian/mips_backend.patch \
+           file://debian/mips_readelf_w.patch \
+           file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
+           file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
+           file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
+           file://0001-Use-fallthrough-attribute.patch \
+           file://0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch \
+           "
+SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
 SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5"
 SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066"
 
-SRC_URI += "\
-        file://0001-dso-link-change.patch \
-        file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
-        file://0003-fixheadercheck.patch \
-        file://0004-Disable-the-test-to-convert-euc-jp.patch \
-        file://0005-fix-a-stack-usage-warning.patch \
-        file://0006-Fix-build-on-aarch64-musl.patch \
-        file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
-        file://0001-libasm-may-link-with-libbz2-if-found.patch \
-"
-SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
-
-# Pick patches from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz
-SRC_URI += "\
-        file://debian/hppa_backend.diff \
-        file://debian/arm_backend.diff \
-        file://debian/mips_backend.patch \
-        file://debian/mips_readelf_w.patch \
-        file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
-        file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
-        file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
-"
-# Fix the patches from Debian with GCC7
-SRC_URI += "file://debian/fallthrough.patch"
-
-# The buildsystem wants to generate 2 .h files from source using a binary it just built,
-# which can not pass the cross compiling, so let's work around it by adding 2 .h files
-# along with the do_configure_prepend()
-
 inherit autotools gettext
 
 EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
new file mode 100644
index 0000000..cf4d1df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
@@ -0,0 +1,34 @@
+From 732913a8c35c7b25c0cbf6903cab1ad6b602b525 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Mar 2018 22:44:03 -0700
+Subject: [PATCH] Ensure that packed structs follow the gcc memory layout
+
+Partial backport of
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d
+
+Helps fixing alignment errors e.g.
+linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus
+' is less than 4 [-Werror=packed-not-aligned]
+ ;
+ ^
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ backends/linux-core-note.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
+index 5f06c896..9faae4c3 100644
+--- a/backends/linux-core-note.c
++++ b/backends/linux-core-note.c
+@@ -111,7 +111,7 @@ struct EBLHOOK(prstatus)
+   FIELD (INT, pr_fpvalid);
+ }
+ #ifdef ALIGN_PRSTATUS
+-  __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
++  attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))
+ #endif
+ ;
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
new file mode 100644
index 0000000..5e2155b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
@@ -0,0 +1,791 @@
+From 5cb883f67d00a63531ef195c242763d36b1905ca Mon Sep 17 00:00:00 2001
+From: Joshua Watt <Joshua.Watt@garmin.com>
+Date: Fri, 9 Feb 2018 12:46:38 -0600
+Subject: [PATCH] Use fallthrough attribute
+
+Use __attribute__ ((fallthrough)) to indicate switch case fall through
+instead of a comment. This ensure that the fallthrough warning is not
+triggered even if the file is pre-processed (hence stripping the
+comments) before it is compiled.
+
+The actual fallback implementation is hidden behind a FALLBACK macro in
+case the compiler doesn't support it.
+
+Finally, the -Wimplict-fallthrough warning was upgraded to only allow
+the attribute to satisfy it; a comment alone is no longer sufficient.
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+
+Upstream-Status: Submitted [1]
+
+[1] https://sourceware.org/ml/elfutils-devel/2018-q1/msg00027.html
+---
+ backends/aarch64_retval.c    | 2 +-
+ backends/alpha_retval.c      | 4 ++--
+ backends/arm_regs.c          | 2 +-
+ backends/arm_retval.c        | 2 +-
+ backends/i386_regs.c         | 2 +-
+ backends/i386_retval.c       | 4 ++--
+ backends/ia64_retval.c       | 2 +-
+ backends/linux-core-note.c   | 2 +-
+ backends/m68k_retval.c       | 4 ++--
+ backends/mips_retval.c       | 4 ++--
+ backends/parisc_retval.c     | 5 +++--
+ backends/ppc64_retval.c      | 6 +++---
+ backends/ppc_regs.c          | 2 +-
+ backends/ppc_retval.c        | 4 ++--
+ backends/s390_retval.c       | 4 ++--
+ backends/sh_retval.c         | 2 +-
+ backends/sparc_retval.c      | 2 +-
+ backends/tilegx_retval.c     | 4 ++--
+ backends/x86_64_regs.c       | 2 +-
+ backends/x86_64_retval.c     | 2 +-
+ config/eu.am                 | 4 +++-
+ configure.ac                 | 6 ++++++
+ lib/eu-config.h              | 7 +++++++
+ libcpu/i386_disasm.c         | 2 +-
+ libcpu/i386_parse.c          | 4 ++--
+ libdw/cfi.c                  | 4 ++--
+ libdw/dwarf_frame_register.c | 2 +-
+ libdwfl/dwfl_report_elf.c    | 2 +-
+ libdwfl/frame_unwind.c       | 2 +-
+ libebl/eblobjnote.c          | 2 +-
+ libelf/elf32_updatenull.c    | 2 +-
+ libelf/elf_begin.c           | 4 ++--
+ libelf/elf_cntl.c            | 2 +-
+ src/addr2line.c              | 2 +-
+ src/elfcompress.c            | 2 +-
+ src/elflint.c                | 8 ++++----
+ src/objdump.c                | 2 +-
+ src/readelf.c                | 8 ++++----
+ src/strings.c                | 2 +-
+ tests/backtrace.c            | 2 +-
+ tests/elfstrmerge.c          | 3 ++-
+ 41 files changed, 75 insertions(+), 58 deletions(-)
+
+diff --git a/backends/aarch64_retval.c b/backends/aarch64_retval.c
+index 68de307..1308340 100644
+--- a/backends/aarch64_retval.c
++++ b/backends/aarch64_retval.c
+@@ -292,7 +292,7 @@ aarch64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  assert (count > 0);
+ 	  if (count <= 4)
+ 	    return pass_hfa (locp, base_size, count);
+-	  /* Fall through.  */
++	  FALLTHROUGH;
+ 
+ 	case 1:
+ 	  /* Not a HFA.  */
+diff --git a/backends/alpha_retval.c b/backends/alpha_retval.c
+index 53dbfa4..d9bae3b 100644
+--- a/backends/alpha_retval.c
++++ b/backends/alpha_retval.c
+@@ -85,7 +85,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -131,7 +131,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  }
+       }
+ 
+-      /* Else fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index 4ee1039..418c931 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
+@@ -81,7 +81,7 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
+        * but gcc maps FPA registers here
+        */
+       regno += 96 - 16;
+-      /* Fall through.  */
++      FALLTHROUGH;
+     case 96 + 0 ... 96 + 7:
+       *setname = "FPA";
+       *type = DW_ATE_float;
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 8687eab..313e4eb 100644
+--- a/backends/arm_retval.c
++++ b/backends/arm_retval.c
+@@ -90,7 +90,7 @@ arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+diff --git a/backends/i386_regs.c b/backends/i386_regs.c
+index fd963a6..7ec93bb 100644
+--- a/backends/i386_regs.c
++++ b/backends/i386_regs.c
+@@ -92,7 +92,7 @@ i386_register_info (Ebl *ebl __attribute__ ((unused)),
+     case 5:
+     case 8:
+       *type = DW_ATE_address;
+-      /* Fallthrough */
++      FALLTHROUGH;
+     case 0 ... 3:
+     case 6 ... 7:
+       name[0] = 'e';
+diff --git a/backends/i386_retval.c b/backends/i386_retval.c
+index 4aa646f..32fec72 100644
+--- a/backends/i386_retval.c
++++ b/backends/i386_retval.c
+@@ -85,7 +85,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -123,7 +123,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	if (size <= 8)
+ 	  return nloc_intregpair;
+       }
+-    /* Fallthrough */
++    FALLTHROUGH;
+ 
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+diff --git a/backends/ia64_retval.c b/backends/ia64_retval.c
+index dcd5f28..03ea4d8 100644
+--- a/backends/ia64_retval.c
++++ b/backends/ia64_retval.c
+@@ -260,7 +260,7 @@ ia64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
+index 67638d7..5f06c89 100644
+--- a/backends/linux-core-note.c
++++ b/backends/linux-core-note.c
+@@ -226,7 +226,7 @@ EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name,
+       if (memcmp (name, "CORE", nhdr->n_namesz) == 0)
+ 	break;
+       /* Buggy old Linux kernels didn't terminate "LINUX".  */
+-      /* Fall through. */
++      FALLTHROUGH;
+ 
+     case sizeof "LINUX":
+       if (memcmp (name, "LINUX", nhdr->n_namesz) == 0)
+diff --git a/backends/m68k_retval.c b/backends/m68k_retval.c
+index c68ed02..a653ba3 100644
+--- a/backends/m68k_retval.c
++++ b/backends/m68k_retval.c
+@@ -92,7 +92,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -135,7 +135,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	if (size <= 8)
+ 	  return nloc_intregpair;
+       }
+-      /* Fallthrough */
++      FALLTHROUGH;
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+     case DW_TAG_union_type:
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+index 57487bb..c6e1ffe 100644
+--- a/backends/mips_retval.c
++++ b/backends/mips_retval.c
+@@ -306,7 +306,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = dwarf_tag (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -389,7 +389,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+             }
+         }
+ 
+-      /* Fallthrough to handle large types */
++      FALLTHROUGH; /* Fallthrough to handle large types */
+ 
+     case DW_TAG_array_type:
+     large:
+diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
+index df7ec3a..1f1e91a 100644
+--- a/backends/parisc_retval.c
++++ b/backends/parisc_retval.c
+@@ -116,7 +116,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = dwarf_tag (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -167,6 +167,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+ 
+ 	/* Else fall through.  */
+       }
++      FALLTHROUGH;
+ 
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+@@ -189,7 +190,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+         *locp = loc_aggregate;
+         return nloc_aggregate;
+ #endif
+-	/* fall through.  */
++	FALLTHROUGH;
+       }
+     }
+ 
+diff --git a/backends/ppc64_retval.c b/backends/ppc64_retval.c
+index a251983..eb1c11e 100644
+--- a/backends/ppc64_retval.c
++++ b/backends/ppc64_retval.c
+@@ -96,7 +96,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -141,7 +141,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  return nloc_intreg;
+ 	}
+ 
+-      /* Else fall through.  */
++      FALLTHROUGH;
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+     case DW_TAG_union_type:
+@@ -161,7 +161,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	    return nloc_vmxreg;
+ 	  }
+       }
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_string_type:
+       if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8)
+diff --git a/backends/ppc_regs.c b/backends/ppc_regs.c
+index c2d5011..43d2534 100644
+--- a/backends/ppc_regs.c
++++ b/backends/ppc_regs.c
+@@ -140,7 +140,7 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)),
+     case 100:
+       if (*bits == 32)
+ 	return stpcpy (name, "mq") + 1 - name;
+-      /* Fallthrough */
++      FALLTHROUGH;
+     case 102 ... 107:
+       name[0] = 's';
+       name[1] = 'p';
+diff --git a/backends/ppc_retval.c b/backends/ppc_retval.c
+index b14a99f..39b42da 100644
+--- a/backends/ppc_retval.c
++++ b/backends/ppc_retval.c
+@@ -108,7 +108,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -172,7 +172,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	      return nloc_intregquad;
+ 	    }
+       }
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+diff --git a/backends/s390_retval.c b/backends/s390_retval.c
+index a927d46..2043f98 100644
+--- a/backends/s390_retval.c
++++ b/backends/s390_retval.c
+@@ -87,7 +87,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -127,7 +127,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	    return size <= asize ? nloc_intreg : nloc_intregpair;
+ 	  }
+       }
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+diff --git a/backends/sh_retval.c b/backends/sh_retval.c
+index d44f260..33d7d96 100644
+--- a/backends/sh_retval.c
++++ b/backends/sh_retval.c
+@@ -84,7 +84,7 @@ sh_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c
+index e1b1775..fb81cdc 100644
+--- a/backends/sparc_retval.c
++++ b/backends/sparc_retval.c
+@@ -91,7 +91,7 @@ sparc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+diff --git a/backends/tilegx_retval.c b/backends/tilegx_retval.c
+index db81a20..7f7d24b 100644
+--- a/backends/tilegx_retval.c
++++ b/backends/tilegx_retval.c
+@@ -79,7 +79,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+@@ -113,7 +113,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  return nloc_intreg;
+ 	}
+ 
+-      /* Else fall through.  */
++      FALLTHROUGH;
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+     case DW_TAG_union_type:
+diff --git a/backends/x86_64_regs.c b/backends/x86_64_regs.c
+index 8430440..ef987da 100644
+--- a/backends/x86_64_regs.c
++++ b/backends/x86_64_regs.c
+@@ -87,7 +87,7 @@ x86_64_register_info (Ebl *ebl __attribute__ ((unused)),
+ 
+     case 6 ... 7:
+       *type = DW_ATE_address;
+-      /* Fallthrough */
++      FALLTHROUGH;
+     case 0 ... 5:
+       name[0] = 'r';
+       name[1] = baseregs[regno][0];
+diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c
+index b3799ae..f9114cb 100644
+--- a/backends/x86_64_retval.c
++++ b/backends/x86_64_retval.c
+@@ -100,7 +100,7 @@ x86_64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	  typedie = dwarf_formref_die (attr, &die_mem);
+ 	  tag = DWARF_TAG_OR_RETURN (typedie);
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+ 
+     case DW_TAG_base_type:
+     case DW_TAG_enumeration_type:
+diff --git a/config/eu.am b/config/eu.am
+index 8fe1e25..b6ec581 100644
+--- a/config/eu.am
++++ b/config/eu.am
+@@ -62,7 +62,9 @@ NULL_DEREFERENCE_WARNING=
+ endif
+ 
+ if HAVE_IMPLICIT_FALLTHROUGH_WARNING
+-IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough
++# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the
++# warning
++IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5
+ else
+ IMPLICIT_FALLTHROUGH_WARNING=
+ endif
+diff --git a/configure.ac b/configure.ac
+index 1f1856d..698efbb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -360,6 +360,12 @@ CFLAGS="$old_CFLAGS"])
+ AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING,
+ 	       [test "x$ac_cv_implicit_fallthrough" != "xno"])
+ 
++# Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported
++if test "$ac_cv_implicit_fallthrough" = "yes"; then
++	AC_DEFINE([HAVE_FALLTHROUGH], [1],
++		  [Defined if __attribute__((fallthrough)) is supported])
++fi
++
+ dnl Check if we have argp available from our libc
+ AC_LINK_IFELSE(
+ 	[AC_LANG_PROGRAM(
+diff --git a/lib/eu-config.h b/lib/eu-config.h
+index 400cdc6..e8d4ec2 100644
+--- a/lib/eu-config.h
++++ b/lib/eu-config.h
+@@ -186,5 +186,12 @@ asm (".section predict_data, \"aw\"; .previous\n"
+ # define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
+ #endif
+ 
++#ifndef FALLTHROUGH
++# ifdef HAVE_FALLTHROUGH
++#  define FALLTHROUGH __attribute__ ((fallthrough))
++# else
++#  define FALLTHROUGH ((void) 0)
++# endif
++#endif
+ 
+ #endif	/* eu-config.h */
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index 60fd6d4..837a3a8 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -819,7 +819,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
+ 			      ++param_start;
+ 			      break;
+ 			    }
+-			  /* Fallthrough */
++			  FALLTHROUGH;
+ 			default:
+ 			  str = "";
+ 			  assert (! "INVALID not handled");
+diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
+index ef1ac35..6fa7ce3 100644
+--- a/libcpu/i386_parse.c
++++ b/libcpu/i386_parse.c
+@@ -1047,7 +1047,7 @@ yytnamerr (char *yyres, const char *yystr)
+           case '\\':
+             if (*++yyp != '\\')
+               goto do_not_strip_quotes;
+-            /* Fall through.  */
++            FALLTHROUGH;
+           default:
+             if (yyres)
+               yyres[yyn] = *yyp;
+@@ -2042,7 +2042,7 @@ yyabortlab:
+ yyexhaustedlab:
+   yyerror (YY_("memory exhausted"));
+   yyresult = 2;
+-  /* Fall through.  */
++  FALLTHROUGH;
+ #endif
+ 
+ yyreturn:
+diff --git a/libdw/cfi.c b/libdw/cfi.c
+index daa845f..341e055 100644
+--- a/libdw/cfi.c
++++ b/libdw/cfi.c
+@@ -138,7 +138,7 @@ execute_cfi (Dwarf_CFI *cache,
+ 
+ 	case DW_CFA_advance_loc1:
+ 	  operand = *program++;
+-	  /* Fallthrough */
++	  FALLTHROUGH;
+ 	case DW_CFA_advance_loc + 0 ... DW_CFA_advance_loc + CFI_PRIMARY_MAX:
+ 	advance_loc:
+ 	  loc += operand * cie->code_alignment_factor;
+@@ -301,7 +301,7 @@ execute_cfi (Dwarf_CFI *cache,
+ 
+ 	case DW_CFA_restore_extended:
+ 	  get_uleb128 (operand, program, end);
+-	  /* Fallthrough */
++	  FALLTHROUGH;
+ 	case DW_CFA_restore + 0 ... DW_CFA_restore + CFI_PRIMARY_MAX:
+ 
+ 	  if (unlikely (abi_cfi) && likely (opcode == DW_CFA_restore))
+diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c
+index 37e8e91..d0159fb 100644
+--- a/libdw/dwarf_frame_register.c
++++ b/libdw/dwarf_frame_register.c
+@@ -62,7 +62,7 @@ dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
+       /* Use the default rule for registers not yet mentioned in CFI.  */
+       if (fs->cache->default_same_value)
+ 	goto same_value;
+-      /*FALLTHROUGH*/
++      FALLTHROUGH;
+     case reg_undefined:
+       /* The value is known to be unavailable.  */
+       break;
+diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c
+index 6950a37..3fc9384 100644
+--- a/libdwfl/dwfl_report_elf.c
++++ b/libdwfl/dwfl_report_elf.c
+@@ -174,7 +174,7 @@ __libdwfl_elf_address_range (Elf *elf, GElf_Addr base, bool add_p_vaddr,
+       /* An assigned base address is meaningless for these.  */
+       base = 0;
+       add_p_vaddr = true;
+-      /* Fallthrough. */
++      FALLTHROUGH;
+     case ET_DYN:
+     default:;
+       size_t phnum;
+diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c
+index 4dc9c43..eaea495 100644
+--- a/libdwfl/frame_unwind.c
++++ b/libdwfl/frame_unwind.c
+@@ -442,7 +442,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops,
+ 	    }
+ 	  if (val1 == 0)
+ 	    break;
+-	  /* FALLTHRU */
++	  FALLTHROUGH;
+ 	case DW_OP_skip:;
+ 	  Dwarf_Word offset = op->offset + 1 + 2 + (int16_t) op->number;
+ 	  const Dwarf_Op *found = bsearch ((void *) (uintptr_t) offset, ops, nops,
+diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
+index f80a1a5..ca4f155 100644
+--- a/libebl/eblobjnote.c
++++ b/libebl/eblobjnote.c
+@@ -223,7 +223,7 @@ ebl_object_note (Ebl *ebl, const char *name, uint32_t type,
+ 		free (buf);
+ 	      break;
+ 	    }
+-	  /* FALLTHROUGH */
++	  FALLTHROUGH;
+ 
+ 	default:
+ 	  /* Unknown type.  */
+diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
+index a51bf70..5351518 100644
+--- a/libelf/elf32_updatenull.c
++++ b/libelf/elf32_updatenull.c
+@@ -232,7 +232,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
+ 		      __libelf_seterrno (ELF_E_GROUP_NOT_REL);
+ 		      return -1;
+ 		    }
+-		  /* FALLTHROUGH */
++		  FALLTHROUGH;
+ 		case SHT_SYMTAB_SHNDX:
+ 		  sh_entsize = elf_typesize (32, ELF_T_WORD, 1);
+ 		  break;
+diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
+index 6f85038..6de206a 100644
+--- a/libelf/elf_begin.c
++++ b/libelf/elf_begin.c
+@@ -582,7 +582,7 @@ read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd,
+ 			     ? sizeof (Elf32_Ehdr) : sizeof (Elf64_Ehdr)))
+ 	return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd,
+ 			      parent);
+-      /* FALLTHROUGH */
++      FALLTHROUGH;
+ 
+     default:
+       break;
+@@ -1097,7 +1097,7 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)
+ 	  retval = NULL;
+ 	  break;
+ 	}
+-      /* FALLTHROUGH */
++      FALLTHROUGH;
+ 
+     case ELF_C_READ:
+     case ELF_C_READ_MMAP:
+diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c
+index ab13ffb..fd68178 100644
+--- a/libelf/elf_cntl.c
++++ b/libelf/elf_cntl.c
+@@ -62,7 +62,7 @@ elf_cntl (Elf *elf, Elf_Cmd cmd)
+ 	  result = -1;
+ 	  break;
+ 	}
+-      /* FALLTHROUGH */
++      FALLTHROUGH;
+ 
+     case ELF_C_FDDONE:
+       /* Mark the file descriptor as not usable.  */
+diff --git a/src/addr2line.c b/src/addr2line.c
+index ba414a7..444ee52 100644
+--- a/src/addr2line.c
++++ b/src/addr2line.c
+@@ -618,7 +618,7 @@ handle_address (const char *string, Dwfl *dwfl)
+ 	case 1:
+ 	  addr = 0;
+ 	  j = i;
+-	  /* Fallthrough */
++	  FALLTHROUGH;
+ 	case 2:
+ 	  if (string[j] != '\0')
+ 	    break;
+diff --git a/src/elfcompress.c b/src/elfcompress.c
+index 8e0d5c5..25378a4 100644
+--- a/src/elfcompress.c
++++ b/src/elfcompress.c
+@@ -149,7 +149,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
+ 		    N_("Only one input file allowed together with '-o'"));
+       /* We only use this for checking the number of arguments, we don't
+ 	 actually want to consume them.  */
+-      /* Fallthrough */
++      FALLTHROUGH;
+     default:
+       return ARGP_ERR_UNKNOWN;
+     }
+diff --git a/src/elflint.c b/src/elflint.c
+index 51e53c2..df1b3a0 100644
+--- a/src/elflint.c
++++ b/src/elflint.c
+@@ -1764,7 +1764,7 @@ section [%2d] '%s': entry %zu: pointer does not match address of section [%2d] '
+ 	  if (dyn->d_tag < DT_ADDRRNGLO || dyn->d_tag > DT_ADDRRNGHI)
+ 	    /* Value is no pointer.  */
+ 	    break;
+-	  /* FALLTHROUGH */
++	  FALLTHROUGH;
+ 
+ 	case DT_AUXILIARY:
+ 	case DT_FILTER:
+@@ -3993,7 +3993,7 @@ section [%2zu] '%s': merge flag set but entry size is zero\n"),
+ 	    case SHT_NOBITS:
+ 	      if (is_debuginfo)
+ 		break;
+-	      /* Fallthrough */
++	      FALLTHROUGH;
+ 	    default:
+ 	      ERROR (gettext ("\
+ section [%2zu] '%s' has unexpected type %d for an executable section\n"),
+@@ -4137,7 +4137,7 @@ section [%2zu] '%s': ELF header says this is the section header string table but
+ 	    ERROR (gettext ("\
+ section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
+ 		   cnt, section_name (ebl, cnt));
+-	  /* FALLTHROUGH */
++	  FALLTHROUGH;
+ 	case SHT_SYMTAB:
+ 	  check_symtab (ebl, ehdr, shdr, cnt);
+ 	  break;
+@@ -4336,7 +4336,7 @@ section [%2d] '%s': unknown core file note type %" PRIu32
+ 	    if (nhdr.n_namesz == sizeof "Linux"
+ 		&& !memcmp (data->d_buf + name_offset, "Linux", sizeof "Linux"))
+ 	      break;
+-	    /* Fallthrough */
++	    FALLTHROUGH;
+ 	  default:
+ 	    if (shndx == 0)
+ 	      ERROR (gettext ("\
+diff --git a/src/objdump.c b/src/objdump.c
+index 860cfac..0dd9a6a 100644
+--- a/src/objdump.c
++++ b/src/objdump.c
+@@ -223,7 +223,7 @@ parse_opt (int key, char *arg,
+ 	}
+       /* We only use this for checking the number of arguments, we don't
+ 	 actually want to consume them.  */
+-      /* Fallthrough */
++      FALLTHROUGH;
+     default:
+       return ARGP_ERR_UNKNOWN;
+     }
+diff --git a/src/readelf.c b/src/readelf.c
+index 346eccd..6a27e7e 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -465,7 +465,7 @@ parse_opt (int key, char *arg,
+ 	  print_string_sections = true;
+ 	  break;
+ 	}
+-      /* Fall through.  */
++      FALLTHROUGH;
+     case 'x':
+       add_dump_section (arg, false);
+       any_control_option = true;
+@@ -6029,7 +6029,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
+ 			dwarf_form_name (form), (uintmax_t) num);
+ 	      return DWARF_CB_OK;
+ 	    }
+-	  /* else fallthrough */
++	  FALLTHROUGH;
+ 
+ 	/* These cases always take a loclistptr and no constant. */
+ 	case DW_AT_location:
+@@ -6195,7 +6195,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
+ 	      print_block (block.length, block.data);
+ 	      break;
+ 	    }
+-	  /* Fall through.  */
++	  FALLTHROUGH;
+ 
+ 	case DW_AT_location:
+ 	case DW_AT_data_location:
+@@ -9227,7 +9227,7 @@ handle_auxv_note (Ebl *ebl, Elf *core, GElf_Word descsz, GElf_Off desc_pos)
+ 		printf ("    %s\n", name);
+ 		break;
+ 	      }
+-	    /* Fall through */
++	    FALLTHROUGH;
+ 	  case 'x':		/* hex */
+ 	  case 'p':		/* address */
+ 	  case 's':		/* address of string */
+diff --git a/src/strings.c b/src/strings.c
+index d214356..03d0f13 100644
+--- a/src/strings.c
++++ b/src/strings.c
+@@ -246,7 +246,7 @@ parse_opt (int key, char *arg,
+ 	case 'b':
+ 	case 'B':
+ 	  big_endian = true;
+-	  /* FALLTHROUGH */
++	  FALLTHROUGH;
+ 
+ 	case 'l':
+ 	case 'L':
+diff --git a/tests/backtrace.c b/tests/backtrace.c
+index 21abe8a..f5dd761 100644
+--- a/tests/backtrace.c
++++ b/tests/backtrace.c
+@@ -127,7 +127,7 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+ 	  assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
+ 	  break;
+ 	}
+-      /* FALLTHRU */
++      FALLTHROUGH;
+     case 4:
+       /* Some simple frame unwinders get this wrong and think sigusr2
+ 	 is calling itself again. Allow it and just pretend there is
+diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
+index 8d5b53c..62c549d 100644
+--- a/tests/elfstrmerge.c
++++ b/tests/elfstrmerge.c
+@@ -578,7 +578,8 @@ main (int argc, char **argv)
+ 	      break;
+ 
+ 	    case SHT_DYNAMIC:
+-	      /* Fallthrough.  There are string indexes in here, but
++	      FALLTHROUGH;
++	      /* There are string indexes in here, but
+ 		 they (should) point to a allocated string table,
+ 		 which we don't alter.  */
+ 	    default:
+-- 
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
index 8864d44..a42ce7b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
@@ -1,4 +1,4 @@
-From 010b0c57e748440eb1ceb3d977875f2488d2b4ce Mon Sep 17 00:00:00 2001
+From ef0981744669149a00dd0439a54dac30de7b56a7 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 16 Aug 2017 10:06:26 +0800
 Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
@@ -10,6 +10,7 @@
 Rebase to 0.170
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
 ---
  Makefile.am                      |  2 +-
  lib/color.c                      |  3 ++-
@@ -83,7 +84,7 @@
  69 files changed, 95 insertions(+), 64 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 2ff444e..41f77df 100644
+index 2ff444e7..41f77df8 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
@@ -96,7 +97,7 @@
  EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
  	     COPYING COPYING-GPLV2 COPYING-LGPLV3
 diff --git a/lib/color.c b/lib/color.c
-index f62389d..a2a84b4 100644
+index f62389d5..a2a84b46 100644
 --- a/lib/color.c
 +++ b/lib/color.c
 @@ -32,13 +32,14 @@
@@ -116,7 +117,7 @@
  /* Prototype for option handler.  */
  static error_t parse_opt (int key, char *arg, struct argp_state *state);
 diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
-index dac2a5f..43016fc 100644
+index dac2a5f5..43016fc3 100644
 --- a/lib/fixedsizehash.h
 +++ b/lib/fixedsizehash.h
 @@ -30,7 +30,6 @@
@@ -128,7 +129,7 @@
  #include <system.h>
  
 diff --git a/lib/system.h b/lib/system.h
-index 9203335..1a60131 100644
+index 92033355..1a601319 100644
 --- a/lib/system.h
 +++ b/lib/system.h
 @@ -50,6 +50,16 @@
@@ -149,7 +150,7 @@
  #ifndef MAX
  #define MAX(m, n) ((m) < (n) ? (n) : (m))
 diff --git a/lib/xmalloc.c b/lib/xmalloc.c
-index 0cde384..217b054 100644
+index 0cde384f..217b0541 100644
 --- a/lib/xmalloc.c
 +++ b/lib/xmalloc.c
 @@ -30,7 +30,7 @@
@@ -162,7 +163,7 @@
  #include <stddef.h>
  #include <stdlib.h>
 diff --git a/libasm/asm_end.c b/libasm/asm_end.c
-index ced24f5..4ad918c 100644
+index ced24f50..4ad918c4 100644
 --- a/libasm/asm_end.c
 +++ b/libasm/asm_end.c
 @@ -32,7 +32,7 @@
@@ -175,7 +176,7 @@
  #include <stdio.h>
  #include <stdlib.h>
 diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c
-index ddbb25d..74a598d 100644
+index ddbb25df..74a598d9 100644
 --- a/libasm/asm_newscn.c
 +++ b/libasm/asm_newscn.c
 @@ -32,7 +32,7 @@
@@ -188,7 +189,7 @@
  #include <stdlib.h>
  #include <string.h>
 diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c
-index aae5eae..6d76016 100644
+index aae5eae6..6d760165 100644
 --- a/libcpu/i386_gendis.c
 +++ b/libcpu/i386_gendis.c
 @@ -31,7 +31,7 @@
@@ -201,7 +202,7 @@
  #include <stdio.h>
  #include <stdlib.h>
 diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c
-index ba5f4aa..b1e4191 100644
+index ba5f4aa5..b1e41916 100644
 --- a/libcpu/i386_lex.c
 +++ b/libcpu/i386_lex.c
 @@ -577,7 +577,7 @@ char *i386_text;
@@ -214,7 +215,7 @@
  
  #include <libeu.h>
 diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
-index ef1ac35..48f2e64 100644
+index 6fa7ce3d..bb270061 100644
 --- a/libcpu/i386_parse.c
 +++ b/libcpu/i386_parse.c
 @@ -107,7 +107,7 @@
@@ -227,7 +228,7 @@
  #include <libintl.h>
  #include <math.h>
 diff --git a/libdw/Makefile.am b/libdw/Makefile.am
-index ff8c291..89e792a 100644
+index ff8c291e..89e792aa 100644
 --- a/libdw/Makefile.am
 +++ b/libdw/Makefile.am
 @@ -105,7 +105,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
@@ -241,7 +242,7 @@
  libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
  # The rpath is necessary for libebl because its $ORIGIN use will
 diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c
-index 28a8cf6..29aeb3f 100644
+index 28a8cf6e..29aeb3f7 100644
 --- a/libdw/libdw_alloc.c
 +++ b/libdw/libdw_alloc.c
 @@ -31,7 +31,7 @@
@@ -254,7 +255,7 @@
  #include <stdlib.h>
  #include "libdwP.h"
 diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
-index ee0c164..b06ab59 100644
+index ee0c1646..b06ab596 100644
 --- a/libdwfl/dwfl_build_id_find_elf.c
 +++ b/libdwfl/dwfl_build_id_find_elf.c
 @@ -31,6 +31,7 @@
@@ -275,7 +276,7 @@
  	    {
  	      *file_name = name;
 diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
-index 7bcf61c..c345797 100644
+index 7bcf61cc..c345797a 100644
 --- a/libdwfl/dwfl_error.c
 +++ b/libdwfl/dwfl_error.c
 @@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
@@ -297,7 +298,7 @@
        return elf_errmsg (error & 0xffff);
      case OTHER_ERROR (LIBDW):
 diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
-index 9775ace..511c4a6 100644
+index 9775aced..511c4a6a 100644
 --- a/libdwfl/dwfl_module_getdwarf.c
 +++ b/libdwfl/dwfl_module_getdwarf.c
 @@ -35,6 +35,7 @@
@@ -309,7 +310,7 @@
  #include "../libelf/libelfP.h"
  #include "system.h"
 diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
-index 6d5a42a..9267788 100644
+index 6d5a42a6..9267788d 100644
 --- a/libdwfl/find-debuginfo.c
 +++ b/libdwfl/find-debuginfo.c
 @@ -389,7 +389,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
@@ -322,7 +323,7 @@
  	fd = find_debuginfo_in_path (mod, canon,
  				     debuglink_file, debuglink_crc,
 diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
-index f849128..6f0aca1 100644
+index f849128d..6f0aca1b 100644
 --- a/libdwfl/libdwfl_crc32_file.c
 +++ b/libdwfl/libdwfl_crc32_file.c
 @@ -29,6 +29,15 @@
@@ -342,7 +343,7 @@
  #define crc32 __libdwfl_crc32
  #include <libdwflP.h>
 diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 9d0fef2..9fc09b8 100644
+index 9d0fef2c..9fc09b88 100644
 --- a/libdwfl/linux-kernel-modules.c
 +++ b/libdwfl/linux-kernel-modules.c
 @@ -40,6 +40,7 @@
@@ -354,7 +355,7 @@
  #include <errno.h>
  #include <stdio.h>
 diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
-index 5371396..2e66dfd 100644
+index 53713963..2e66dfdd 100644
 --- a/libebl/eblopenbackend.c
 +++ b/libebl/eblopenbackend.c
 @@ -32,7 +32,7 @@
@@ -367,7 +368,7 @@
  #include <dwarf.h>
  #include <stdlib.h>
 diff --git a/libelf/elf.h b/libelf/elf.h
-index 5cf2b93..990b3af 100644
+index 5cf2b934..990b3afb 100644
 --- a/libelf/elf.h
 +++ b/libelf/elf.h
 @@ -21,7 +21,9 @@
@@ -392,7 +393,7 @@
  
  #endif	/* elf.h */
 diff --git a/libelf/libelf.h b/libelf/libelf.h
-index 547c0f5..dd78799 100644
+index 547c0f50..dd78799e 100644
 --- a/libelf/libelf.h
 +++ b/libelf/libelf.h
 @@ -29,6 +29,7 @@
@@ -404,7 +405,7 @@
  #include <sys/types.h>
  
 diff --git a/libelf/libelfP.h b/libelf/libelfP.h
-index 7ee6625..5840899 100644
+index 7ee6625a..58408997 100644
 --- a/libelf/libelfP.h
 +++ b/libelf/libelfP.h
 @@ -32,6 +32,7 @@
@@ -416,7 +417,7 @@
  #include <errno.h>
  #include <stdbool.h>
 diff --git a/src/addr2line.c b/src/addr2line.c
-index ba414a7..04b7116 100644
+index 444ee52c..9596fa67 100644
 --- a/src/addr2line.c
 +++ b/src/addr2line.c
 @@ -23,7 +23,7 @@
@@ -429,7 +430,7 @@
  #include <inttypes.h>
  #include <libdwfl.h>
 diff --git a/src/ar.c b/src/ar.c
-index ec32cee..4efd729 100644
+index ec32cee5..4efd729c 100644
 --- a/src/ar.c
 +++ b/src/ar.c
 @@ -22,7 +22,7 @@
@@ -442,7 +443,7 @@
  #include <gelf.h>
  #include <libintl.h>
 diff --git a/src/arlib.c b/src/arlib.c
-index e0839aa..1143658 100644
+index e0839aab..1143658f 100644
 --- a/src/arlib.c
 +++ b/src/arlib.c
 @@ -21,7 +21,7 @@
@@ -455,7 +456,7 @@
  #include <inttypes.h>
  #include <libintl.h>
 diff --git a/src/arlib2.c b/src/arlib2.c
-index 553fc57..46443d0 100644
+index 553fc57b..46443d0e 100644
 --- a/src/arlib2.c
 +++ b/src/arlib2.c
 @@ -20,7 +20,7 @@
@@ -468,7 +469,7 @@
  #include <limits.h>
  #include <string.h>
 diff --git a/src/elfcmp.c b/src/elfcmp.c
-index 5046420..cff183f 100644
+index 50464207..cff183fa 100644
 --- a/src/elfcmp.c
 +++ b/src/elfcmp.c
 @@ -23,7 +23,7 @@
@@ -481,7 +482,7 @@
  #include <locale.h>
  #include <libintl.h>
 diff --git a/src/elflint.c b/src/elflint.c
-index 51e53c2..da0b0dc 100644
+index df1b3a03..67d8d134 100644
 --- a/src/elflint.c
 +++ b/src/elflint.c
 @@ -24,7 +24,7 @@
@@ -494,7 +495,7 @@
  #include <gelf.h>
  #include <inttypes.h>
 diff --git a/src/findtextrel.c b/src/findtextrel.c
-index 8f1e239..71463af 100644
+index 8f1e239a..71463af3 100644
 --- a/src/findtextrel.c
 +++ b/src/findtextrel.c
 @@ -23,7 +23,7 @@
@@ -507,7 +508,7 @@
  #include <gelf.h>
  #include <libdw.h>
 diff --git a/src/nm.c b/src/nm.c
-index 969c6d3..3113c04 100644
+index 969c6d35..3113c04c 100644
 --- a/src/nm.c
 +++ b/src/nm.c
 @@ -26,7 +26,7 @@
@@ -520,7 +521,7 @@
  #include <gelf.h>
  #include <inttypes.h>
 diff --git a/src/objdump.c b/src/objdump.c
-index 860cfac..61e67bf 100644
+index 0dd9a6aa..9c8bf149 100644
 --- a/src/objdump.c
 +++ b/src/objdump.c
 @@ -21,7 +21,7 @@
@@ -533,7 +534,7 @@
  #include <inttypes.h>
  #include <libintl.h>
 diff --git a/src/ranlib.c b/src/ranlib.c
-index cc0ee23..ae851e4 100644
+index cc0ee233..ae851e40 100644
 --- a/src/ranlib.c
 +++ b/src/ranlib.c
 @@ -24,7 +24,7 @@
@@ -546,7 +547,7 @@
  #include <gelf.h>
  #include <libintl.h>
 diff --git a/src/readelf.c b/src/readelf.c
-index 346eccd..c831aa8 100644
+index 6a27e7e0..4759a965 100644
 --- a/src/readelf.c
 +++ b/src/readelf.c
 @@ -25,7 +25,7 @@
@@ -559,7 +560,7 @@
  #include <gelf.h>
  #include <inttypes.h>
 diff --git a/src/size.c b/src/size.c
-index ad8dbcb..fd83be0 100644
+index ad8dbcbb..fd83be06 100644
 --- a/src/size.c
 +++ b/src/size.c
 @@ -21,7 +21,7 @@
@@ -572,7 +573,7 @@
  #include <gelf.h>
  #include <inttypes.h>
 diff --git a/src/stack.c b/src/stack.c
-index 6f2ff69..6da0243 100644
+index 6f2ff69f..6da0243d 100644
 --- a/src/stack.c
 +++ b/src/stack.c
 @@ -18,7 +18,7 @@
@@ -585,7 +586,7 @@
  #include <inttypes.h>
  #include <stdio.h>
 diff --git a/src/strings.c b/src/strings.c
-index d214356..76cb26b 100644
+index 03d0f133..5c311cbd 100644
 --- a/src/strings.c
 +++ b/src/strings.c
 @@ -25,7 +25,7 @@
@@ -598,7 +599,7 @@
  #include <gelf.h>
  #include <inttypes.h>
 diff --git a/src/strip.c b/src/strip.c
-index c7830ec..0d7f148 100644
+index c7830ec6..0d7f148d 100644
 --- a/src/strip.c
 +++ b/src/strip.c
 @@ -24,7 +24,7 @@
@@ -611,7 +612,7 @@
  #include <fnmatch.h>
  #include <gelf.h>
 diff --git a/src/unstrip.c b/src/unstrip.c
-index 5074909..3d4f952 100644
+index 50749093..3d4f9525 100644
 --- a/src/unstrip.c
 +++ b/src/unstrip.c
 @@ -31,7 +31,7 @@
@@ -624,7 +625,7 @@
  #include <fnmatch.h>
  #include <libintl.h>
 diff --git a/tests/addrscopes.c b/tests/addrscopes.c
-index 791569f..54f4311 100644
+index 791569f5..54f4311b 100644
 --- a/tests/addrscopes.c
 +++ b/tests/addrscopes.c
 @@ -25,7 +25,7 @@
@@ -637,7 +638,7 @@
  
  
 diff --git a/tests/allregs.c b/tests/allregs.c
-index 286f7e3..c9de089 100644
+index 286f7e3c..c9de0897 100644
 --- a/tests/allregs.c
 +++ b/tests/allregs.c
 @@ -21,7 +21,7 @@
@@ -650,7 +651,7 @@
  #include <argp.h>
  #include <assert.h>
 diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c
-index a387d8f..955c27d 100644
+index a387d8ff..955c27d1 100644
 --- a/tests/backtrace-data.c
 +++ b/tests/backtrace-data.c
 @@ -27,7 +27,7 @@
@@ -663,7 +664,7 @@
  #include <dwarf.h>
  #if defined(__x86_64__) && defined(__linux__)
 diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
-index 2dc8a9a..24ca7fb 100644
+index 2dc8a9a2..24ca7fb0 100644
 --- a/tests/backtrace-dwarf.c
 +++ b/tests/backtrace-dwarf.c
 @@ -22,7 +22,7 @@
@@ -676,7 +677,7 @@
  #include <sys/types.h>
  #include <sys/wait.h>
 diff --git a/tests/backtrace.c b/tests/backtrace.c
-index 21abe8a..d733248 100644
+index f5dd761f..a93a8f03 100644
 --- a/tests/backtrace.c
 +++ b/tests/backtrace.c
 @@ -24,7 +24,7 @@
@@ -689,7 +690,7 @@
  #include <dwarf.h>
  #ifdef __linux__
 diff --git a/tests/buildid.c b/tests/buildid.c
-index 87c1877..2953e6b 100644
+index 87c18773..2953e6bb 100644
 --- a/tests/buildid.c
 +++ b/tests/buildid.c
 @@ -23,7 +23,7 @@
@@ -702,7 +703,7 @@
  #include <stdlib.h>
  #include <sys/types.h>
 diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c
-index 6d97d50..ee7e559 100644
+index 6d97d500..ee7e559e 100644
 --- a/tests/debugaltlink.c
 +++ b/tests/debugaltlink.c
 @@ -23,7 +23,7 @@
@@ -715,7 +716,7 @@
  #include <stdlib.h>
  #include <sys/types.h>
 diff --git a/tests/debuglink.c b/tests/debuglink.c
-index 935d102..741cb81 100644
+index 935d1029..741cb814 100644
 --- a/tests/debuglink.c
 +++ b/tests/debuglink.c
 @@ -21,7 +21,7 @@
@@ -728,7 +729,7 @@
  #include <stdlib.h>
  #include <sys/types.h>
 diff --git a/tests/deleted.c b/tests/deleted.c
-index 6be35bc..0190711 100644
+index 6be35bc2..01907113 100644
 --- a/tests/deleted.c
 +++ b/tests/deleted.c
 @@ -21,7 +21,7 @@
@@ -741,7 +742,7 @@
  #ifdef __linux__
  #include <sys/prctl.h>
 diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c
-index 21e470a..1ea1e3b 100644
+index 21e470a3..1ea1e3b2 100644
 --- a/tests/dwfl-addr-sect.c
 +++ b/tests/dwfl-addr-sect.c
 @@ -23,7 +23,7 @@
@@ -754,7 +755,7 @@
  #include <argp.h>
  #include ELFUTILS_HEADER(dwfl)
 diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c
-index aa8030e..02c8bef 100644
+index aa8030e1..02c8bef9 100644
 --- a/tests/dwfl-bug-addr-overflow.c
 +++ b/tests/dwfl-bug-addr-overflow.c
 @@ -20,7 +20,7 @@
@@ -767,7 +768,7 @@
  #include ELFUTILS_HEADER(dwfl)
  
 diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
-index 689cdd7..5973da3 100644
+index 689cdd79..5973da39 100644
 --- a/tests/dwfl-bug-fd-leak.c
 +++ b/tests/dwfl-bug-fd-leak.c
 @@ -24,7 +24,7 @@
@@ -780,7 +781,7 @@
  #include <dwarf.h>
  
 diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c
-index 1ee989f..fd62e65 100644
+index 1ee989f8..fd62e653 100644
 --- a/tests/dwfl-bug-getmodules.c
 +++ b/tests/dwfl-bug-getmodules.c
 @@ -18,7 +18,7 @@
@@ -793,7 +794,7 @@
  static const Dwfl_Callbacks callbacks =
    {
 diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c
-index a4e97d3..f471587 100644
+index a4e97d3c..f471587c 100644
 --- a/tests/dwfl-report-elf-align.c
 +++ b/tests/dwfl-report-elf-align.c
 @@ -20,7 +20,7 @@
@@ -806,7 +807,7 @@
  #include <string.h>
  #include <stdlib.h>
 diff --git a/tests/dwfllines.c b/tests/dwfllines.c
-index 90379dd..cbdf6c4 100644
+index 90379dd2..cbdf6c4c 100644
 --- a/tests/dwfllines.c
 +++ b/tests/dwfllines.c
 @@ -27,7 +27,7 @@
@@ -819,7 +820,7 @@
  int
  main (int argc, char *argv[])
 diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c
-index 0027f96..e68d3bc 100644
+index 0027f96b..e68d3bca 100644
 --- a/tests/dwflmodtest.c
 +++ b/tests/dwflmodtest.c
 @@ -23,7 +23,7 @@
@@ -832,7 +833,7 @@
  #include <argp.h>
  #include ELFUTILS_HEADER(dwfl)
 diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c
-index 49ac334..cf07830 100644
+index 49ac3346..cf078301 100644
 --- a/tests/dwflsyms.c
 +++ b/tests/dwflsyms.c
 @@ -25,7 +25,7 @@
@@ -845,7 +846,7 @@
  
  static const char *
 diff --git a/tests/early-offscn.c b/tests/early-offscn.c
-index 924cb9e..6f60d5a 100644
+index 924cb9ef..6f60d5a3 100644
 --- a/tests/early-offscn.c
 +++ b/tests/early-offscn.c
 @@ -19,7 +19,7 @@
@@ -858,7 +859,7 @@
  #include <gelf.h>
  #include <stdio.h>
 diff --git a/tests/ecp.c b/tests/ecp.c
-index 38a6859..743cea5 100644
+index 38a6859e..743cea5d 100644
 --- a/tests/ecp.c
 +++ b/tests/ecp.c
 @@ -20,7 +20,7 @@
@@ -871,7 +872,7 @@
  #include <gelf.h>
  #include <stdlib.h>
 diff --git a/tests/find-prologues.c b/tests/find-prologues.c
-index ba8ae37..76f5f04 100644
+index ba8ae371..76f5f047 100644
 --- a/tests/find-prologues.c
 +++ b/tests/find-prologues.c
 @@ -25,7 +25,7 @@
@@ -884,7 +885,7 @@
  #include <fnmatch.h>
  
 diff --git a/tests/funcretval.c b/tests/funcretval.c
-index 8d19d11..c8aaa93 100644
+index 8d19d117..c8aaa93d 100644
 --- a/tests/funcretval.c
 +++ b/tests/funcretval.c
 @@ -25,7 +25,7 @@
@@ -897,7 +898,7 @@
  #include <fnmatch.h>
  
 diff --git a/tests/funcscopes.c b/tests/funcscopes.c
-index 9c90185..dbccb89 100644
+index 9c901858..dbccb89e 100644
 --- a/tests/funcscopes.c
 +++ b/tests/funcscopes.c
 @@ -25,7 +25,7 @@
@@ -910,7 +911,7 @@
  #include <fnmatch.h>
  
 diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c
-index 055aede..9c394dd 100644
+index 055aede0..9c394dd0 100644
 --- a/tests/getsrc_die.c
 +++ b/tests/getsrc_die.c
 @@ -19,7 +19,7 @@
@@ -923,7 +924,7 @@
  #include <inttypes.h>
  #include <libelf.h>
 diff --git a/tests/line2addr.c b/tests/line2addr.c
-index e0d65d3..9bf0023 100644
+index e0d65d3d..9bf0023b 100644
 --- a/tests/line2addr.c
 +++ b/tests/line2addr.c
 @@ -26,7 +26,7 @@
@@ -936,7 +937,7 @@
  
  static void
 diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
-index d0f4302..8da4fbd 100644
+index d0f43023..8da4fbdf 100644
 --- a/tests/low_high_pc.c
 +++ b/tests/low_high_pc.c
 @@ -25,7 +25,7 @@
@@ -949,7 +950,7 @@
  #include <fnmatch.h>
  
 diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c
-index d50355e..3c41f40 100644
+index d50355e9..3c41f40b 100644
 --- a/tests/md5-sha1-test.c
 +++ b/tests/md5-sha1-test.c
 @@ -19,7 +19,7 @@
@@ -962,7 +963,7 @@
  #include "md5.h"
  #include "sha1.h"
 diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c
-index 6f027df..1ce5e6e 100644
+index 6f027dfe..1ce5e6ed 100644
 --- a/tests/rdwrmmap.c
 +++ b/tests/rdwrmmap.c
 @@ -19,7 +19,7 @@
@@ -975,7 +976,7 @@
  #include <fcntl.h>
  #include <unistd.h>
 diff --git a/tests/saridx.c b/tests/saridx.c
-index 8a450d8..b387801 100644
+index 8a450d82..b3878013 100644
 --- a/tests/saridx.c
 +++ b/tests/saridx.c
 @@ -17,7 +17,7 @@
@@ -988,7 +989,7 @@
  #include <gelf.h>
  #include <stdio.h>
 diff --git a/tests/sectiondump.c b/tests/sectiondump.c
-index 3033fed..8e888db 100644
+index 3033fedc..8e888db3 100644
 --- a/tests/sectiondump.c
 +++ b/tests/sectiondump.c
 @@ -18,7 +18,7 @@
@@ -1001,7 +1002,7 @@
  #include <gelf.h>
  #include <inttypes.h>
 diff --git a/tests/varlocs.c b/tests/varlocs.c
-index c3fba89..e043ea2 100644
+index c3fba89e..e043ea2c 100644
 --- a/tests/varlocs.c
 +++ b/tests/varlocs.c
 @@ -25,7 +25,7 @@
@@ -1014,7 +1015,7 @@
  #include <sys/types.h>
  #include <sys/stat.h>
 diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
-index b876c10..afb2823 100644
+index b876c10b..afb28232 100644
 --- a/tests/vdsosyms.c
 +++ b/tests/vdsosyms.c
 @@ -18,7 +18,7 @@
@@ -1026,6 +1027,3 @@
  #include <inttypes.h>
  #include <stdio.h>
  #include <string.h>
--- 
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
deleted file mode 100644
index b2623f9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through,
-however this causes warnings (which are promoted to errors) with the elfutils
-patches from Debian for mips and parisc, which use fallthrough's by design.
-
-Explicitly mark the intentional fallthrough switch cases with a comment to
-disable the warnings where the fallthrough behaviour is desired.
-
-Upstream-Status: Pending [debian]
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-
-Index: elfutils-0.168/backends/parisc_retval.c
-===================================================================
---- elfutils-0.168.orig/backends/parisc_retval.c
-+++ elfutils-0.168/backends/parisc_retval.c
-@@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die
- 	  return nloc_intregpair;
- 
- 	/* Else fall through.  */
--      }
-+      } // fallthrough
- 
-     case DW_TAG_structure_type:
-     case DW_TAG_class_type:
-Index: elfutils-0.168/backends/mips_retval.c
-===================================================================
---- elfutils-0.168.orig/backends/mips_retval.c
-+++ elfutils-0.168/backends/mips_retval.c
-@@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f
-               else
-                 return nloc_intregpair;
-             }
--        }
-+        } // fallthrough
- 
-       /* Fallthrough to handle large types */
- 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
index 44fda7f..56f852a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
@@ -1,10 +1,10 @@
 Upstream-Status: Backport [from debian]
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 
-Index: b/backends/parisc_init.c
+Index: elfutils-0.170/backends/parisc_init.c
 ===================================================================
 --- /dev/null
-+++ b/backends/parisc_init.c
++++ elfutils-0.170/backends/parisc_init.c
 @@ -0,0 +1,73 @@
 +/* Initialization of PA-RISC specific backend library.
 +   Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
@@ -79,10 +79,10 @@
 +
 +  return MODVERSION;
 +}
-Index: b/backends/parisc_regs.c
+Index: elfutils-0.170/backends/parisc_regs.c
 ===================================================================
 --- /dev/null
-+++ b/backends/parisc_regs.c
++++ elfutils-0.170/backends/parisc_regs.c
 @@ -0,0 +1,159 @@
 +/* Register names and numbers for PA-RISC DWARF.
 +   Copyright (C) 2005, 2006 Red Hat, Inc.
@@ -243,10 +243,10 @@
 +  name[namelen++] = '\0';
 +  return namelen;
 +}
-Index: b/backends/parisc_reloc.def
+Index: elfutils-0.170/backends/parisc_reloc.def
 ===================================================================
 --- /dev/null
-+++ b/backends/parisc_reloc.def
++++ elfutils-0.170/backends/parisc_reloc.def
 @@ -0,0 +1,128 @@
 +/* List the relocation types for PA-RISC.  -*- C -*-
 +   Copyright (C) 2005 Red Hat, Inc.
@@ -376,10 +376,10 @@
 +RELOC_TYPE (TLS_DTPMOD64,	DYN)
 +
 +#define NO_RELATIVE_RELOC       1
-Index: b/backends/parisc_retval.c
+Index: elfutils-0.170/backends/parisc_retval.c
 ===================================================================
 --- /dev/null
-+++ b/backends/parisc_retval.c
++++ elfutils-0.170/backends/parisc_retval.c
 @@ -0,0 +1,213 @@
 +/* Function return value location for Linux/PA-RISC ABI.
 +   Copyright (C) 2005 Red Hat, Inc.
@@ -594,10 +594,10 @@
 +  return parisc_return_value_location_ (functypedie, locp, 1);
 +}
 +
-Index: b/backends/parisc_symbol.c
+Index: elfutils-0.170/backends/parisc_symbol.c
 ===================================================================
 --- /dev/null
-+++ b/backends/parisc_symbol.c
++++ elfutils-0.170/backends/parisc_symbol.c
 @@ -0,0 +1,112 @@
 +/* PA-RISC specific symbolic name handling.
 +   Copyright (C) 2002, 2005 Red Hat, Inc.
@@ -711,10 +711,10 @@
 +      return ELF_T_NUM;
 +    }
 +}
-Index: b/backends/libebl_parisc.h
+Index: elfutils-0.170/backends/libebl_parisc.h
 ===================================================================
 --- /dev/null
-+++ b/backends/libebl_parisc.h
++++ elfutils-0.170/backends/libebl_parisc.h
 @@ -0,0 +1,9 @@
 +#ifndef _LIBEBL_HPPA_H
 +#define _LIBEBL_HPPA_H 1
@@ -725,10 +725,10 @@
 +extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
 +
 +#endif
-Index: b/backends/Makefile.am
+Index: elfutils-0.170/backends/Makefile.am
 ===================================================================
---- a/backends/Makefile.am
-+++ b/backends/Makefile.am
+--- elfutils-0.170.orig/backends/Makefile.am
++++ elfutils-0.170/backends/Makefile.am
 @@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
  
  
@@ -744,7 +744,7 @@
  noinst_LIBRARIES = $(libebl_pic)
  noinst_DATA = $(libebl_pic:_pic.a=.so)
  
-@@ -128,6 +128,9 @@ endif
+@@ -124,6 +124,9 @@ cpu_bpf = ../libcpu/libcpu_bpf.a
  libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
  am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)
  
@@ -752,13 +752,13 @@
 +libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
 +am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
  
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
  	@rm -f $(@:.so=.map)
-Index: b/libelf/elf.h
+Index: elfutils-0.170/libelf/elf.h
 ===================================================================
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -2055,16 +2055,24 @@ enum
+--- elfutils-0.170.orig/libelf/elf.h
++++ elfutils-0.170/libelf/elf.h
+@@ -2056,16 +2056,24 @@ enum
  #define R_PARISC_PCREL17F	12	/* 17 bits of rel. address.  */
  #define R_PARISC_PCREL14R	14	/* Right 14 bits of rel. address.  */
  #define R_PARISC_DPREL21L	18	/* Left 21 bits of rel. address.  */
@@ -783,7 +783,7 @@
  #define R_PARISC_LTOFF_FPTR32	57	/* 32 bits LT-rel. function pointer. */
  #define R_PARISC_LTOFF_FPTR21L	58	/* LT-rel. fct ptr, left 21 bits. */
  #define R_PARISC_LTOFF_FPTR14R	62	/* LT-rel. fct ptr, right 14 bits. */
-@@ -2073,6 +2081,7 @@ enum
+@@ -2074,6 +2082,7 @@ enum
  #define R_PARISC_PLABEL21L	66	/* Left 21 bits of fdesc address.  */
  #define R_PARISC_PLABEL14R	70	/* Right 14 bits of fdesc address.  */
  #define R_PARISC_PCREL64	72	/* 64 bits PC-rel. address.  */
@@ -791,7 +791,7 @@
  #define R_PARISC_PCREL22F	74	/* 22 bits PC-rel. address.  */
  #define R_PARISC_PCREL14WR	75	/* PC-rel. address, right 14 bits.  */
  #define R_PARISC_PCREL14DR	76	/* PC rel. address, right 14 bits.  */
-@@ -2098,6 +2107,8 @@ enum
+@@ -2099,6 +2108,8 @@ enum
  #define R_PARISC_LTOFF16WF	102	/* 16 bits LT-rel. address.  */
  #define R_PARISC_LTOFF16DF	103	/* 16 bits LT-rel. address.  */
  #define R_PARISC_SECREL64	104	/* 64 bits section rel. address.  */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
new file mode 100644
index 0000000..b1d322d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
@@ -0,0 +1,91 @@
+From f0049b4b2ea55b3b3c53bf6f0275654801c755d2 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 28 Sep 2017 15:54:55 +0800
+Subject: [PATCH] expect: Fix segfaults if Tcl is built with stubs and Expect
+ is used directly from C program
+
+Description: This dirty hack fixes segfaults if Tcl is built with stubs
+ and Expect is used directly from C program.
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588817
+Example:
+ #include <stdio.h>
+ #include <tcl8.5/expect.h>
+ int main()
+ {
+     FILE *pipe;
+     char *some_command = "uname";
+     char datum;
+     pipe = exp_popen(some_command);
+     if (pipe == NULL) return 1;
+     while ((datum = getc (pipe)) != EOF)
+ 	printf("%c",datum);
+ }
+Example:
+ #include <stdio.h>
+ #include "expect.h"
+ main()
+ {
+     int fd = 0;
+     fd = exp_spawnl("echo", "echo", "Hello User: Whats up?", (char*) 0);
+     switch (exp_expectl(fd, exp_regexp, "ser:", 1, exp_end)) {
+ 	case 1: {
+ 	    printf("GOT ser:\n");
+ 	    break;
+ 	}
+ 	default: {
+ 	    printf("DEFAULT\n");
+ 	    return 1;
+ 	}
+     }
+     printf("Normal Exit\n");
+     return 0;
+ }
+Author: Sergei Golovan <sgolovan@debian.org>
+
+Upstream-Status: Pending
+This patch is backported from fedora changes for expect:
+http://pkgs.fedoraproject.org/cgit/rpms/expect.git/commit/
+?h=master&id=b6737eed550be93182f2ed194e836a6cbbcf4fa3
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ exp_clib.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/exp_clib.c b/exp_clib.c
+index 172c05e..19341d5 100644
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -114,7 +114,11 @@ extern unsigned long	strtoul _ANSI_ARGS_((CONST char *string,
+ #include <stdlib.h>		/* for malloc */
+ #endif
+ 
+-#include <tcl.h>
++#define ckalloc(x) Tcl_Alloc(x)
++#define ckfree(x) Tcl_Free(x)
++extern char *Tcl_ErrnoMsg(int err);
++extern char *Tcl_Alloc(unsigned int size);
++extern void Tcl_Free(char *ptr);
+ #include "expect.h"
+ #define TclRegError exp_TclRegError
+ 
+@@ -389,7 +393,7 @@ char *exp;
+ 		FAIL("regexp too big");
+ 
+ 	/* Allocate space. */
+-	r = (regexp *)ckalloc(sizeof(regexp) + (unsigned)rcstate->regsize);
++	r = (regexp *)malloc(sizeof(regexp) + (unsigned)rcstate->regsize);
+ 	if (r == NULL)
+ 		FAIL("out of space");
+ 
+@@ -399,7 +403,7 @@ char *exp;
+ 	rcstate->regcode = r->program;
+ 	regc(MAGIC, rcstate);
+ 	if (reg(0, &flags, rcstate) == NULL) {
+-	  ckfree ((char*) r);
++	  free((char*) r);
+ 	  return(NULL);
+ 	}
+ 
+-- 
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb
new file mode 100644
index 0000000..96eacd9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -0,0 +1,76 @@
+SUMMARY = "tool for automating interactive applications according to a script"
+DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \
+Following the script, Expect knows what can be expected from a program and what \
+the correct response should be. Expect is also useful for testing these same \
+applications. And by adding Tk, you can also wrap interactive applications in \
+X11 GUIs. An interpreted language provides branching and high-level control \
+structures to direct the dialogue. In addition, the user can take control and \
+interact directly when desired, afterward returning control to the script. \
+"
+HOMEPAGE = "http://sourceforge.net/projects/expect/"
+LICENSE = "PD"
+SECTION = "devel"
+
+LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
+
+DEPENDS += "tcl"
+RDEPENDS_${PN} = "tcl"
+
+inherit autotools update-alternatives
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
+           file://0001-configure.in.patch \
+           file://0002-tcl.m4.patch \
+           file://01-example-shebang.patch \
+           file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
+           file://0001-Resolve-string-formatting-issues.patch \
+           file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
+          "
+SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
+SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
+UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
+
+S = "${WORKDIR}/${BPN}${PV}"
+
+do_install_append() {
+	install -d ${D}${libdir}
+        install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so   ${D}${libdir}/
+        install -m 0755 ${S}/fixline1           ${D}${libdir}/expect${PV}/
+        install -m 0755 ${S}/example/*          ${D}${libdir}/expect${PV}/
+        rm ${D}${libdir}/expect${PV}/libexpect*.so
+        sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
+}
+
+# Apparently the public Tcl headers are only in /usr/include/tcl8.6
+# when building for the target.
+TCL_INCLUDE_PATH = ""
+TCL_INCLUDE_PATH_class-target = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
+
+EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
+                 --enable-shared \
+                 --enable-threads \
+                 --disable-rpath \
+                 ${TCL_INCLUDE_PATH} \
+                "
+EXTRA_OEMAKE_install = " 'SCRIPTS=' "
+
+ALTERNATIVE_${PN}  = "mkpasswd"
+ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
+# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
+ALTERNATIVE_PRIORITY[mkpasswd] = "40"
+
+FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
+                   ${includedir}/expect.h \
+                   ${includedir}/expect_tcl.h \
+                   ${includedir}/expect_comm.h \
+                   ${includedir}/tcldbg.h \
+                   ${includedir}/*.h \
+                  "
+
+FILES_${PN} += "${libdir}/libexpect${PV}.so \
+                ${libdir}/expect${PV}/* \
+               "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
deleted file mode 100644
index e2d24e8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "tool for automating interactive applications according to a script"
-DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \
-Following the script, Expect knows what can be expected from a program and what \
-the correct response should be. Expect is also useful for testing these same \
-applications. And by adding Tk, you can also wrap interactive applications in \
-X11 GUIs. An interpreted language provides branching and high-level control \
-structures to direct the dialogue. In addition, the user can take control and \
-interact directly when desired, afterward returning control to the script. \
-"
-HOMEPAGE = "http://sourceforge.net/projects/expect/"
-LICENSE = "PD"
-SECTION = "devel"
-
-LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
-
-DEPENDS += "tcl"
-RDEPENDS_${PN} = "tcl"
-
-inherit autotools update-alternatives
-
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
-           file://0001-configure.in.patch \
-           file://0002-tcl.m4.patch \
-           file://01-example-shebang.patch \
-           file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
-           file://0001-Resolve-string-formatting-issues.patch \
-          "
-SRC_URI[md5sum] = "44e1a4f4c877e9ddc5a542dfa7ecc92b"
-SRC_URI[sha256sum] = "b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
-UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/${BPN}${PV}"
-
-do_install_append() {
-	install -d ${D}${libdir}
-        install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so   ${D}${libdir}/
-        install -m 0755 ${S}/fixline1           ${D}${libdir}/expect${PV}/
-        install -m 0755 ${S}/example/*          ${D}${libdir}/expect${PV}/
-        rm ${D}${libdir}/expect${PV}/libexpect*.so
-        sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
-}
-
-# Apparently the public Tcl headers are only in /usr/include/tcl8.6
-# when building for the target.
-TCL_INCLUDE_PATH = ""
-TCL_INCLUDE_PATH_class-target = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
-
-EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
-                 --enable-shared \
-                 --enable-threads \
-                 --disable-rpath \
-                 ${TCL_INCLUDE_PATH} \
-                "
-EXTRA_OEMAKE_install = " 'SCRIPTS=' "
-
-ALTERNATIVE_${PN}  = "mkpasswd"
-ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
-# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
-ALTERNATIVE_PRIORITY[mkpasswd] = "40"
-
-FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
-                   ${includedir}/expect.h \
-                   ${includedir}/expect_tcl.h \
-                   ${includedir}/expect_comm.h \
-                   ${includedir}/tcldbg.h \
-                   ${includedir}/*.h \
-                  "
-
-FILES_${PN} += "${libdir}/libexpect${PV}.so \
-                ${libdir}/expect${PV}/* \
-               "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
index d31ac59..319f9db 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
@@ -14,17 +14,14 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/magic/Magdir/commands b/magic/Magdir/commands
-index 1a46efd..255c04b 100644
+index f6ad1c8..f79e7dd 100644
 --- a/magic/Magdir/commands
 +++ b/magic/Magdir/commands
 @@ -57,6 +57,7 @@
  0	string/wt	#!\ /usr/bin/awk	awk script text executable
  !:mime	text/x-awk
- 0	regex/4096	=^[A-Za-z0-9_]{0,100}BEGIN[A-Za-z0-9_]{0,100}[{]	awk or perl script text
+ 0	regex/4096	=^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{]	awk or perl script text
 +!:strength - 12
  
  # AT&T Bell Labs' Plan 9 shell
  0	string/wt	#!\ /bin/rc	Plan 9 rc shell script text executable
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
deleted file mode 100644
index 1b1f502..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "File classification tool"
-DESCRIPTION = "File attempts to classify files depending \
-on their contents and prints a description if a match is found."
-HOMEPAGE = "http://www.darwinsys.com/file/"
-SECTION = "console/utils"
-
-# two clause BSD
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
-
-DEPENDS = "zlib file-replacement-native"
-DEPENDS_class-native = "zlib-native"
-
-# Blacklist a bogus tag in upstream check
-UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
-
-SRC_URI = "git://github.com/file/file.git \
-        file://debian-742262.patch \
-        file://0001-Add-P-prompt-into-Usage-info.patch \
-        "
-
-SRCREV = "70c5f15060c7ad81150177de83a3e64500a54c9f"
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-
-CFLAGS_append = " -std=c99"
-
-FILES_${PN} += "${datadir}/misc/*.mgc"
-
-do_install_append_class-native() {
-	create_cmdline_wrapper ${D}/${bindir}/file \
-		--magic-file ${datadir}/misc/magic.mgc
-}
-
-do_install_append_class-nativesdk() {
-	create_cmdline_wrapper ${D}/${bindir}/file \
-		--magic-file ${datadir}/misc/magic.mgc
-}
-
-BBCLASSEXTEND = "native nativesdk"
-PROVIDES_append_class-native = " file-replacement-native"
-# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
-# depends on file-replacement-native.
-bindir_append_class-native = "/file-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb
new file mode 100644
index 0000000..5e15925
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb
@@ -0,0 +1,48 @@
+SUMMARY = "File classification tool"
+DESCRIPTION = "File attempts to classify files depending \
+on their contents and prints a description if a match is found."
+HOMEPAGE = "http://www.darwinsys.com/file/"
+SECTION = "console/utils"
+
+# two clause BSD
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
+
+DEPENDS = "zlib file-replacement-native"
+DEPENDS_class-native = "zlib-native"
+
+# Blacklist a bogus tag in upstream check
+UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
+
+SRC_URI = "git://github.com/file/file.git \
+        file://debian-742262.patch \
+        file://0001-Add-P-prompt-into-Usage-info.patch \
+        "
+
+SRCREV = "d474e35513940dbca039b510b4de705b44f5bd9c"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+
+CFLAGS_append = " -std=c99"
+
+FILES_${PN} += "${datadir}/misc/*.mgc"
+
+do_install_append_class-native() {
+	create_cmdline_wrapper ${D}/${bindir}/file \
+		--magic-file ${datadir}/misc/magic.mgc
+}
+
+do_install_append_class-nativesdk() {
+	create_cmdline_wrapper ${D}/${bindir}/file \
+		--magic-file ${datadir}/misc/magic.mgc
+}
+
+BBCLASSEXTEND = "native nativesdk"
+PROVIDES_append_class-native = " file-replacement-native"
+# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
+# depends on file-replacement-native.
+bindir_append_class-native = "/file-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
index 032833a..29792ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
@@ -2,11 +2,11 @@
 
 Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
 
-Index: flex-2.5.37/doc/Makefile.am
+Index: flex-2.6.0/doc/Makefile.am
 ===================================================================
---- flex-2.5.37.orig/doc/Makefile.am	2012-07-21 04:18:27.000000000 +0300
-+++ flex-2.5.37/doc/Makefile.am	2013-07-30 17:57:09.834834531 +0300
-@@ -2,7 +2,7 @@
+--- flex-2.6.0.orig/doc/Makefile.am
++++ flex-2.6.0/doc/Makefile.am
+@@ -2,7 +2,7 @@ help2man = @HELP2MAN@
  
  info_TEXINFOS =	flex.texi
  dist_man_MANS = flex.1
@@ -14,4 +14,4 @@
 +EXTRA_DIST= flex.pdf
  
  CLEANFILES = \
- 	flex.hks \
+ 	flex.aux \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
index a906fe8..b89b751 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -43,6 +43,10 @@
 	create_wrapper ${D}/${bindir}/flex M4=${M4}
 }
 
+PACKAGES =+ "${PN}-libfl"
+
+FILES_${PN}-libfl = "${libdir}/libfl.so.* ${libdir}/libfl_pic.so.*"
+
 RDEPENDS_${PN} += "m4"
 RDEPENDS_${PN}-ptest += "bash gawk"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc
deleted file mode 100644
index 42eabef..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc
+++ /dev/null
@@ -1,145 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "6.4.0"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "6.4.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.4:${FILE_DIRNAME}/gcc-6.4/backport:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
-    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
-    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
-    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-    file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-
-
-BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
-#SRCREV = "bd9a826d5448db11d29d2ec5884e7e679066f140"
-#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git"
-#BASEURI ?= "ftp://sourceware.org/pub/gcc/snapshots/6.2.0-RC-20160815/gcc-6.2.0-RC-20160815.tar.bz2"
-
-SRC_URI = "\
-           ${BASEURI} \
-           file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
-           file://0008-missing-execinfo_h.patch \
-           file://0009-c99-snprintf.patch \
-           file://0010-gcc-poison-system-directories.patch \
-           file://0011-gcc-poison-dir-extend.patch \
-           file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
-           file://0013-64-bit-multilib-hack.patch \
-           file://0014-optional-libstdc.patch \
-           file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
-           file://0016-COLLECT_GCC_OPTIONS.patch \
-           file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
-           file://0018-fortran-cross-compile-hack.patch \
-           file://0019-cpp-honor-sysroot.patch \
-           file://0020-MIPS64-Default-to-N64-ABI.patch \
-           file://0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
-           file://0022-gcc-Fix-argument-list-too-long-error.patch \
-           file://0023-Disable-sdt.patch \
-           file://0024-libtool.patch \
-           file://0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
-           file://0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
-           file://0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
-           file://0028-export-CPP.patch \
-           file://0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
-           file://0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
-           file://0031-Ensure-target-gcc-headers-can-be-included.patch \
-           file://0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
-           file://0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
-           file://0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
-           file://0035-aarch64-Add-support-for-musl-ldso.patch \
-           file://0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
-           file://0037-handle-sysroot-support-for-nativesdk-gcc.patch \
-           file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
-           file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \
-           file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
-           file://0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
-           file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \
-           file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
-           file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
-           file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
-           file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
-           file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
-           file://0048-sync-gcc-stddef.h-with-musl.patch \
-           file://0054_all_nopie-all-flags.patch \
-           file://0055-unwind_h-glibc26.patch \
-           ${BACKPORTS} \
-"
-BACKPORTS = "\
-           file://CVE-2016-6131.patch \
-           file://0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \
-           file://0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch \
-           file://0001-i386-Move-struct-ix86_frame-to-machine_function.patch \
-           file://0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch \
-           file://0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch \
-           file://0004-x86-Add-mindirect-branch.patch \
-           file://0005-x86-Add-mfunction-return.patch \
-           file://0006-x86-Add-mindirect-branch-register.patch \
-           file://0007-x86-Add-V-register-operand-modifier.patch \
-           file://0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch \
-           file://0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch \
-           file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \
-           file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
-           file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
-           file://0013-gcc-sanitizers.patch \
-"
-
-SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
-SRC_URI[sha256sum] = "850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4"
-
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
-    ${LTO} \
-    --enable-libssp \
-    --enable-libitm \
-    --disable-bootstrap \
-    --disable-libmudflap \
-    --with-system-zlib \
-    --with-linker-hash-style=${LINKER_HASH_STYLE} \
-    --enable-linker-build-id \
-    --with-ppl=no \
-    --with-cloog=no \
-    --enable-checking=release \
-    --enable-cheaders=c_global \
-    --without-isl \
-"
-
-EXTRA_OECONF_INITIAL = "\
-    --disable-libmudflap \
-    --disable-libgomp \
-    --disable-libitm \
-    --disable-libquadmath \
-    --with-system-zlib \
-    --disable-lto \
-    --disable-plugin \
-    --enable-decimal-float=no \
-    --without-isl \
-    gcc_cv_libc_provides_ssp=yes \
-"
-
-EXTRA_OECONF_PATHS = "\
-    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
-    --with-sysroot=/not/exist \
-    --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 415f091..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 92ed30da16b7487b334f739be177eb39885ab772 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure    | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 35f231e..bfadc33 100755
---- a/configure
-+++ b/configure
-@@ -7550,7 +7550,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
- 
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
-  *" newlib "*)
-   case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 74bf58a..197d61b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3149,7 +3149,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
- 
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
-  *" newlib "*)
-   case " $target_configargs " in
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch
deleted file mode 100644
index 01e7c95..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6dde3da24ef4b9b357bca670d8551cab3fdda843 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/46] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index 6b38f2d..fca98ff 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
--     && !defined(__ia64__)
-+     && !defined(__ia64__) && !defined(__UCLIBC__)
- #   ifndef GC_HAVE_BUILTIN_BACKTRACE
- #     define GC_HAVE_BUILTIN_BACKTRACE
- #   endif
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch
deleted file mode 100644
index d62341a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b794f1f1c1c7c06f3f0d78cf76c4fb90c2ab8dfb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/46] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index a4119ba..8396f43 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@ namespace std
-   using ::vsprintf;
- } // namespace std
- 
--#if _GLIBCXX_USE_C99_STDIO
-+#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__)
- 
- #undef snprintf
- #undef vfscanf
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch
deleted file mode 100644
index ac4cf44..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From d76250323dad69212c958e4857a98d99ab51a39e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 10/46] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/common.opt      |  4 ++++
- gcc/config.in       |  6 ++++++
- gcc/configure       | 16 ++++++++++++++++
- gcc/configure.ac    | 10 ++++++++++
- gcc/doc/invoke.texi |  9 +++++++++
- gcc/gcc.c           |  2 ++
- gcc/incpath.c       | 19 +++++++++++++++++++
- 7 files changed, 66 insertions(+)
-
-diff --git a/gcc/common.opt b/gcc/common.opt
-index 67048db..733185c 100644
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -659,6 +659,10 @@ Wreturn-local-addr
- Common Var(warn_return_local_addr) Init(1) Warning
- Warn about returning a pointer/reference to a local or temporary variable.
- 
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another.
-diff --git a/gcc/config.in b/gcc/config.in
-index 115cb61..105b30f 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -187,6 +187,12 @@
- #endif
- 
- 
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
-    optimizer and back end) to be checked for dynamic type safety at runtime.
-    This is quite expensive. */
-diff --git a/gcc/configure b/gcc/configure
-index 1c6e340..8f83152 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -942,6 +942,7 @@ with_system_zlib
- enable_maintainer_mode
- enable_link_mutex
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_host_shared
- enable_libquadmath_support
-@@ -1681,6 +1682,8 @@ Optional Features:
-   --enable-version-specific-runtime-libs
-                           specify that runtime libraries should be installed
-                           in a compiler-specific directory
-+  --enable-poison-system-directories
-+                          warn for use of native system header directories
-   --enable-plugin         enable plugin support
-   --enable-host-shared    build host code as shared libraries
-   --disable-libquadmath-support
-@@ -28908,6 +28911,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
- fi
- 
- 
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+  enableval=$enable_poison_system_directories;
-+else
-+  enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
- 
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 6c1dcd9..0fccaef 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5861,6 +5861,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
-                 [specify that runtime libraries should be
-                  installed in a compiler-specific directory])])
- 
-+AC_ARG_ENABLE([poison-system-directories],
-+             AS_HELP_STRING([--enable-poison-system-directories],
-+                            [warn for use of native system header directories]),,
-+             [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+           [1],
-+           [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 821f8fd..8bb49e7 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -284,6 +284,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wparentheses -Wno-pedantic-ms-format @gol
- -Wplacement-new -Wplacement-new=@var{n} @gol
- -Wpointer-arith  -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wno-pragmas -Wredundant-decls  -Wno-return-local-addr @gol
- -Wreturn-type  -Wsequence-point  -Wshadow  -Wno-shadow-ivar @gol
- -Wshift-overflow -Wshift-overflow=@var{n} @gol
-@@ -4723,6 +4724,14 @@ made up of data only and thus requires no special treatment.  But, for
- most targets, it is made up of code and thus requires the stack to be
- made executable in order for the program to work properly.
- 
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling.  This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 1af5920..4cfef7f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1017,6 +1017,8 @@ proper position among the other output files.  */
-    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
-    "%X %{o*} %{e*} %{N} %{n} %{r}\
-     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
-+    %{Wno-poison-system-directories:--no-poison-system-directories} \
-+    %{Werror=poison-system-directories:--error-poison-system-directories} \
-     %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
-     VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
-     %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index ea40f4a..856da41 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -26,6 +26,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
- 
- /* Microsoft Windows does not natively support inodes.
-    VMS has non-numeric inodes.  */
-@@ -381,6 +382,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- 	}
-       fprintf (stderr, _("End of search list.\n"));
-     }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+  if (flag_poison_system_directories)
-+    {
-+       struct cpp_dir *p;
-+
-+       for (p = heads[QUOTE]; p; p = p->next)
-+         {
-+          if ((!strncmp (p->name, "/usr/include", 12))
-+              || (!strncmp (p->name, "/usr/local/include", 18))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+            warning (OPT_Wpoison_system_directories,
-+                     "include location \"%s\" is unsafe for "
-+                     "cross-compilation",
-+                     p->name);
-+         }
-+    }
-+#endif
- }
- 
- /* Use given -I paths for #include "..." but not #include <...>, and
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch
deleted file mode 100644
index a1736ae..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a1c24b59def393e43cd50b6768604a212c788ed3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 11/46] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch.  The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan.  If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 856da41..d2fc82c 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -392,7 +392,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
-          {
-           if ((!strncmp (p->name, "/usr/include", 12))
-               || (!strncmp (p->name, "/usr/local/include", 18))
--              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+              || (!strncmp (p->name, "/sw/include", 11))
-+              || (!strncmp (p->name, "/opt/include", 12)))
-             warning (OPT_Wpoison_system_directories,
-                      "include location \"%s\" is unsafe for "
-                      "cross-compilation",
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index 939b070..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 00ef5f0f2a8d3b33aeb1e55c0d23439f4dd495af Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index bfadc33..755d382 100755
---- a/configure
-+++ b/configure
-@@ -6819,6 +6819,38 @@ fi
- 
- 
- 
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+  CFLAGS_FOR_TARGET=$CFLAGS
-+  case " $CFLAGS " in
-+    *" -O2 "*) ;;
-+    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+  esac
-+  case " $CFLAGS " in
-+    *" -g "* | *" -g3 "*) ;;
-+    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+  esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+  CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+  case " $CXXFLAGS " in
-+    *" -O2 "*) ;;
-+    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+  esac
-+  case " $CXXFLAGS " in
-+    *" -g "* | *" -g3 "*) ;;
-+    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+  esac
-+fi
-+
-+
- # Handle --with-headers=XXX.  If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch
deleted file mode 100644
index e31cde4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 7fc7a070ac53a55950a1eac76f02877d4106b4b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 13/46] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64   |  6 ++----
- gcc/config/mips/t-linux64   | 10 +++-------
- gcc/config/rs6000/t-linux64 |  5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index c0cc8a3..365a5d6 100644
---- a/gcc/config/i386/t-linux64
-+++ b/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
-index 16c8adf..b932ace 100644
---- a/gcc/config/mips/t-linux64
-+++ b/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
- 
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
--	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
--	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
--	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index fa7550b..9b5d9ef 100644
---- a/gcc/config/rs6000/t-linux64
-+++ b/gcc/config/rs6000/t-linux64
-@@ -26,10 +26,9 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
- 
- MULTILIB_OPTIONS    := m64/m32
--MULTILIB_DIRNAMES   := 64 32
-+MULTILIB_DIRNAMES   := . .
- MULTILIB_EXTRA_OPTS := 
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
- 
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- 	$(COMPILE) $<
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch
deleted file mode 100644
index 44b0cc7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 36275f7981bdaf919bbc9b51a7c7fae1e192adb3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 14/46] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt  |  4 ++++
- gcc/cp/g++spec.c    |  1 +
- gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++-
- gcc/gcc.c           |  1 +
- 4 files changed, 37 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 4f86876..660da6c 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1647,6 +1647,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++.
- 
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 03cbde0..3642540 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
-       switch (decoded_options[i].opt_index)
- 	{
- 	case OPT_nostdlib:
-+	case OPT_nostdlib__:
- 	case OPT_nodefaultlibs:
- 	  library = -1;
- 	  break;
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 8bb49e7..84d68aa 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -207,6 +207,9 @@ in the following sections.
- -fno-weak  -nostdinc++ @gol
- -fvisibility-inlines-hidden @gol
- -fvisibility-ms-compat @gol
-+-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
-+-fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fext-numeric-literals @gol
- -Wabi=@var{n}  -Wabi-tag  -Wconversion-null  -Wctor-dtor-privacy @gol
- -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol
-@@ -470,7 +473,7 @@ Objective-C and Objective-C++ Dialects}.
- -s  -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
- -static-libmpx -static-libmpxwrappers @gol
---shared -shared-libgcc  -symbolic @gol
-+-shared -shared-libgcc  -symbolic -nostdlib++ @gol
- -T @var{script}  -Wl,@var{option}  -Xlinker @var{option} @gol
- -u @var{symbol} -z @var{keyword}}
- 
-@@ -10601,6 +10604,33 @@ library subroutines.
- constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
- GNU Compiler Collection (GCC) Internals}.)
- 
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
-+@cindex @option{-lgcc}, use with @option{-nostdlib}
-+@cindex @option{-nostdlib} and unresolved references
-+@cindex unresolved references and @option{-nostdlib}
-+@cindex @option{-lgcc}, use with @option{-nodefaultlibs}
-+@cindex @option{-nodefaultlibs} and unresolved references
-+@cindex unresolved references and @option{-nodefaultlibs}
-+One of the standard libraries bypassed by @option{-nostdlib} and
-+@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
-+which GCC uses to overcome shortcomings of particular machines, or special
-+needs for some languages.
-+(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
-+Collection (GCC) Internals},
-+for more discussion of @file{libgcc.a}.)
-+In most cases, you need @file{libgcc.a} even when you want to avoid
-+other standard libraries.  In other words, when you specify @option{-nostdlib}
-+or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
-+This ensures that you have no unresolved references to internal GCC
-+library subroutines.
-+(An example of such an internal subroutine is @code{__main}, used to ensure C++
-+constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
-+GNU Compiler Collection (GCC) Internals}.)
-+
- @item -pie
- @opindex pie
- Produce a position independent executable on targets that support it.
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 4cfef7f..da0b482 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1028,6 +1028,7 @@ proper position among the other output files.  */
-     %(mflib) " STACK_SPLIT_SPEC "\
-     %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
-     %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+    %{!nostdlib++:}\
-     %{!nostdlib:%{!nostartfiles:%E}} %{T*}  \n%(post_link) }}}}}}"
- #endif
- 
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 6fc7346..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 9346f6042d8f7f85a75ca2af15f3b8d234985165 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure    | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 8f83152..5e72f17 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27018,13 +27018,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
-         rm -f conftest.*
-       fi
-     fi
--    if test $gcc_cv_as_ld_jalr_reloc = yes; then
--      if test x$target_cpu_default = x; then
--        target_cpu_default=MASK_RELAX_PIC_CALLS
--      else
--        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
--      fi
--    fi
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 0fccaef..dd8f6fa 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4522,13 +4522,6 @@ x:
-         rm -f conftest.*
-       fi
-     fi
--    if test $gcc_cv_as_ld_jalr_reloc = yes; then
--      if test x$target_cpu_default = x; then
--        target_cpu_default=MASK_RELAX_PIC_CALLS
--      else
--        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
--      fi
--    fi
-     AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
- 
-     AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index c154864..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1033bc2d4efc5c301bb822b607a673f5b10cc69f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index da0b482..7ca129f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4591,6 +4591,15 @@ set_collect_gcc_options (void)
- 		sizeof ("COLLECT_GCC_OPTIONS=") - 1);
- 
-   first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+  if (target_system_root_changed && target_system_root)
-+    {
-+      obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+      obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+      obstack_grow (&collect_obstack, "'", 1);
-+      first_time = FALSE;
-+    }
-+#endif
-   for (i = 0; (int) i < n_switches; i++)
-     {
-       const char *const *args;
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index 0dbabd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 67123a306880af997a99ae514677c2da4973bd1a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
- ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-While compiling gcc-crosssdk-initial-x86_64 on some host, there is
-occasionally failure that test the existance of default.h doesn't
-work, the reason is tm_include_list='** defaults.h' rather than
-tm_include_list='** ./defaults.h'
-
-So we add the test condition for this situation.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in  | 2 +-
- gcc/configure    | 4 ++--
- gcc/configure.ac | 4 ++--
- gcc/mkconfig.sh  | 4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 6c5adc0..9a1d466 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -517,7 +517,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
- 
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index 5e72f17..389b6d5 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12130,8 +12130,8 @@ for f in $tm_file; do
-        tm_include_list="${tm_include_list} $f"
-        ;;
-     defaults.h )
--       tm_file_list="${tm_file_list} \$(srcdir)/$f"
--       tm_include_list="${tm_include_list} $f"
-+       tm_file_list="${tm_file_list} ./$f"
-+       tm_include_list="${tm_include_list} ./$f"
-        ;;
-     * )
-        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index dd8f6fa..91ac800 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1883,8 +1883,8 @@ for f in $tm_file; do
-        tm_include_list="${tm_include_list} $f"
-        ;;
-     defaults.h )
--       tm_file_list="${tm_file_list} \$(srcdir)/$f"
--       tm_include_list="${tm_include_list} $f"
-+       tm_file_list="${tm_file_list} ./$f"
-+       tm_include_list="${tm_include_list} ./$f"
-        ;;
-     * )
-        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 67dfac6..b73e08d 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
-     if [ $# -ge 1 ]; then
- 	echo '#ifdef IN_GCC' >> ${output}T
- 	for file in "$@"; do
--	    if test x"$file" = x"defaults.h"; then
-+	    if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
- 		postpone_defaults_h="yes"
- 	    else
- 		echo "# include \"$file\"" >> ${output}T
-@@ -109,7 +109,7 @@ esac
- 
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
--    echo "# include \"defaults.h\"" >> ${output}T
-+    echo "# include \"./defaults.h\"" >> ${output}T
- fi
- 
- # Add multiple inclusion protection guard, part two.
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch
deleted file mode 100644
index b43d89e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e360dc3e0f1e0b9b001ef722fcf66f8120a03dbc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 18/46] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure    | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index f746f6f..b4f3278 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12734,7 +12734,7 @@ esac
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 8f377bb..67710b5 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
- 
- # extra LD Flags which are required for targets
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch
deleted file mode 100644
index 417a5ed..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 98d9c0c1b5552294b2130f7304bfb522da323442 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 19/46] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h | 2 +-
- gcc/gcc.c           | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index 9707fac..fe487a2 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3.  If not see
-   {".ii", "@c++-cpp-output", 0, 0, 0},
-   {"@c++-cpp-output",
-    "%{!M:%{!MM:%{!E:\
--    cc1plus -fpreprocessed %i %(cc1_options) %2\
-+    cc1plus -fpreprocessed %i %I %(cc1_options) %2\
-     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 7ca129f..04fa81d 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1329,7 +1329,7 @@ static const struct compiler default_compilers[] =
- 					   %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
-   {".i", "@cpp-output", 0, 0, 0},
-   {"@cpp-output",
--   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-   {".s", "@assembler", 0, 0, 0},
-   {"@assembler",
-    "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index ba612f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 1f15447fbcf65142627af8a9694761534da8d0d1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 20/46] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index f66e48c..9c6d156 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2065,29 +2065,29 @@ mips*-*-linux*)				# Linux MIPS, either endian.
- 			default_mips_arch=mips32
- 			;;
- 		mips64el-st-linux-gnu)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			tm_file="${tm_file} mips/st.h"
- 			tmake_file="${tmake_file} mips/t-st"
- 			enable_mips_multilibs="yes"
- 			;;
- 		mips64octeon*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
- 			target_cpu_default=MASK_SOFT_FLOAT_ABI
- 			enable_mips_multilibs="yes"
- 			;;
- 		mipsisa64r6*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			default_mips_arch=mips64r6
- 			enable_mips_multilibs="yes"
- 			;;
- 		mipsisa64r2*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			default_mips_arch=mips64r2
- 			enable_mips_multilibs="yes"
- 			;;
- 		mips64*-*-linux* | mipsisa64*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			enable_mips_multilibs="yes"
- 			;;
- 	esac
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 6675ce3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 9f73c8918b63e6a1c9b79384fac411d1056eec1c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 21/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h |  4 ++--
- gcc/config/arm/linux-eabi.h  |  4 ++--
- gcc/config/arm/linux-elf.h   |  2 +-
- gcc/config/i386/linux.h      |  2 +-
- gcc/config/i386/linux64.h    |  6 +++---
- gcc/config/linux.h           |  8 ++++----
- gcc/config/mips/linux.h      | 12 ++++++------
- gcc/config/rs6000/linux64.h  | 16 ++++++----------
- gcc/config/sh/linux.h        |  2 +-
- gcc/config/sparc/linux.h     |  2 +-
- gcc/config/sparc/linux64.h   |  4 ++--
- 11 files changed, 29 insertions(+), 33 deletions(-)
-
-diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index a0764d3..02f7a7c 100644
---- a/gcc/config/alpha/linux-elf.h
-+++ b/gcc/config/alpha/linux-elf.h
-@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3.  If not see
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
- 
--#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER	SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index ace8481..4010435 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
-    GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
- 
- #undef  GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
- 
- #define GLIBC_DYNAMIC_LINKER \
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index a94bd2d..0220628 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
- 
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #define LINUX_TARGET_LINK_SPEC  "%{h*} \
-    %{static:-Bstatic} \
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index d37a875..edde586 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.  If not see
- <http://www.gnu.org/licenses/>.  */
- 
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 73d22e3..f4b5615 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
- 
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 9aeeb94..b055652 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
-    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
-    supporting both 32-bit and 64-bit compilation.  */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index fa253b6..da02c8d 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3.  If not see
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
- 
- #define GLIBC_DYNAMIC_LINKER32 \
--  "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
--  "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
--  "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- 
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
--  "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- #undef UCLIBC_DYNAMIC_LINKER64
- #define UCLIBC_DYNAMIC_LINKER64 \
--  "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
- #define UCLIBC_DYNAMIC_LINKERN32 \
--  "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- 
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index fefa0c4..7173938 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -412,16 +412,11 @@ extern int dot_symbols;
- #undef	LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
- 
--#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
--
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
- #else
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
- #endif
- 
- #define MUSL_DYNAMIC_LINKER32 \
-@@ -429,8 +424,9 @@ extern int dot_symbols;
- #define MUSL_DYNAMIC_LINKER64 \
-   "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
- 
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
-   "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index 2a036ac..50fb735 100644
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3.  If not see
-   "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
-   "%{mfdpic:-fdpic}.so.1"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
-diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 9b32577..7bd66de 100644
---- a/gcc/config/sparc/linux.h
-+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #undef  LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index a1ef325..3bae3d5 100644
---- a/gcc/config/sparc/linux64.h
-+++ b/gcc/config/sparc/linux64.h
-@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3.  If not see
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #ifdef SPARC_BI_ARCH
- 
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index fab6e4a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From acce5157f6b3a1dc9a3676b7118ac887dc5693be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 22/46] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 9a1d466..450cb79 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -3349,7 +3349,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- 	$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
--	headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
-+	headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
- 	srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- 	for file in $$headers; do \
- 	  if [ -f $$file ] ; then \
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch
deleted file mode 100644
index 0efd890..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 6573aec00ada35c48c1838c8491ce8f7798ae993 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 23/46] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure             | 12 ++++++------
- gcc/configure.ac          | 18 +++++++++---------
- libstdc++-v3/configure    |  6 +++---
- libstdc++-v3/configure.ac |  2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 389b6d5..73c264d 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -28528,12 +28528,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
--  have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+#  have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 91ac800..cecf121 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5514,15 +5514,15 @@ fi
- AC_SUBST([enable_default_ssp])
- 
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
--  have_sys_sdt_h=yes
--  AC_DEFINE(HAVE_SYS_SDT_H, 1,
--            [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+#  have_sys_sdt_h=yes
-+#  AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+#            [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
- 
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 8a5481c..6a40e92 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -21735,11 +21735,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
--  if test $glibcxx_cv_sys_sdt_h = yes; then
-+#  if test $glibcxx_cv_sys_sdt_h = yes; then
- 
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
- 
--  fi
-+#  fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
- 
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 9e19e99..0077ffd 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
- 
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch
deleted file mode 100644
index 1f73b5d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6c0aa5c2538829248547197718037ff0b9788676 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 24/46] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..0121fba 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- 	func_warning "ignoring multiple \`-rpath's for a libtool library"
- 
-       install_libdir="$1"
-+      if test -n "$install_libdir"; then
-+	func_normal_abspath "$install_libdir"
-+	install_libdir=$func_normal_abspath_result
-+      fi
- 
-       oldlibs=
-       if test -z "$rpath"; then
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index 3b7ee49..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b1263a48553ce75f8c3bed4fe12122af57845567 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 25/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 4010435..aaea1c9 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -94,10 +94,14 @@
- #define MUSL_DYNAMIC_LINKER \
-   "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
- 
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
- #undef  LINK_SPEC
--#define LINK_SPEC EABI_LINK_SPEC					\
-+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC			\
-   LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC,				\
- 		       LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
- 
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index be25be6..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From b5c305fc251299f2e328410b18cfb55c75b5f038 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 26/46] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure    | 22 ++++++++++++++++++----
- gcc/configure.ac | 22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 73c264d..377253e 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12110,10 +12110,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
--	if test -f ${srcdir}/config/$f
--	then
--		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
--	fi
-+  case $f in
-+    */t-linux64 )
-+       if test -f ./config/$f
-+       then
-+         tmake_file_="${tmake_file_} ./config/$f"
-+       fi
-+       ;;
-+    * )
-+       if test -f ${srcdir}/config/$f
-+       then
-+         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+       fi
-+       ;;
-+  esac
- done
- tmake_file="${tmake_file_}"
- 
-@@ -12124,6 +12134,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
-   case $f in
-+    */linux64.h )
-+       tm_file_list="${tm_file_list} ./config/$f"
-+       tm_include_list="${tm_include_list} ./config/$f"
-+       ;;
-     ./* )
-        f=`echo $f | sed 's/^..//'`
-        tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index cecf121..54e7619 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1863,10 +1863,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
--	if test -f ${srcdir}/config/$f
--	then
--		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
--	fi
-+  case $f in
-+    */t-linux64 )
-+       if test -f ./config/$f
-+       then
-+         tmake_file_="${tmake_file_} ./config/$f"
-+       fi
-+       ;;
-+    * )
-+       if test -f ${srcdir}/config/$f
-+       then
-+         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+       fi
-+       ;;
-+  esac
- done
- tmake_file="${tmake_file_}"
- 
-@@ -1877,6 +1887,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
-   case $f in
-+    */linux64.h )
-+       tm_file_list="${tm_file_list} ./config/$f"
-+       tm_include_list="${tm_include_list} ./config/$f"
-+       ;;
-     ./* )
-        f=`echo $f | sed 's/^..//'`
-        tm_file_list="${tm_file_list} $f"
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index d1bbebc..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From eb6178b7fb466ae429c56380c6dbc564a16d900a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:39:38 +0000
-Subject: [PATCH 27/46] Avoid using libdir from .la which usually points to a
- host path
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 0121fba..52bdbdb 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- 	    absdir="$abs_ladir"
- 	    libdir="$abs_ladir"
- 	  else
-+	    # Instead of using libdir from .la which usually points to a host path,
-+	    # use the path the .la is contained in.
-+	    libdir="$abs_ladir"
- 	    dir="$libdir"
- 	    absdir="$libdir"
- 	  fi
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch
deleted file mode 100644
index c212539..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 617184f35e97934d9e6268e71378574e2b776c2b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:40:59 +0000
-Subject: [PATCH 28/46] export CPP
-
-The OE environment sets and exports CPP as being the target gcc. When
-building gcc-cross-canadian for a mingw targetted sdk, the following can be found
-in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc  -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe  conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be
-using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
-headers are very different, using the wrong cpp is a real problem. It is leaking
-into configure through the CPP variable. Ultimately this leads to build
-failures related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build
-environment when using build targets. We could define a CPP_FOR_BUILD value which may be
-the version which needs to be upstreamed but for now, this fix is good enough to
-avoid the problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 1522e39..beb9b9a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
- 	AR="$(AR_FOR_BUILD)"; export AR; \
- 	AS="$(AS_FOR_BUILD)"; export AS; \
- 	CC="$(CC_FOR_BUILD)"; export CC; \
-+	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index 47b9c0d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e140700976e3b7eb4250b1ffde9bc16494456903 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH 29/46] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc               | 9 ++++++++-
- gcc/config/rs6000/linuxspe.h | 3 ---
- 2 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 9c6d156..18cff5a 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2392,7 +2392,14 @@ powerpc-*-rtems*)
- 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
- 	;;
- powerpc*-*-linux*)
--	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+	case ${target} in
-+	    powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+		;;
-+	    *)
-+		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
-+		;;
-+	esac
- 	extra_options="${extra_options} rs6000/sysv4.opt"
- 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
- 	extra_objs="$extra_objs rs6000-linux.o"
-diff --git a/gcc/config/rs6000/linuxspe.h b/gcc/config/rs6000/linuxspe.h
-index 35623cd..f74e00d 100644
---- a/gcc/config/rs6000/linuxspe.h
-+++ b/gcc/config/rs6000/linuxspe.h
-@@ -27,6 +27,3 @@
- #undef	TARGET_DEFAULT
- #define TARGET_DEFAULT MASK_STRICT_ALIGN
- #endif
--
--#undef  ASM_DEFAULT_SPEC
--#define	ASM_DEFAULT_SPEC "-mppc -mspe -me500"
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
deleted file mode 100644
index c09d019..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0ddcb95a86830766fd02122f19384fc929b377c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:21:55 +0000
-Subject: [PATCH 30/46] Disable the MULTILIB_OSDIRNAMES and other multilib
- options.
-
-Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
-systems where the libdir is NOT set to /lib64.  This is allowed by the
-ABI, as
-long as the dynamic loader is present in /lib.
-
-We simply want to use the default rules in gcc to find and configure the
-normal libdir.
-
-Upstream-Status: Inappropriate[OE-Specific]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/t-aarch64-linux | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index 1cfe9f3..d688ac9 100644
---- a/gcc/config/aarch64/t-aarch64-linux
-+++ b/gcc/config/aarch64/t-aarch64-linux
-@@ -21,8 +21,8 @@
- LIB1ASMSRC   = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
- 
--AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
--MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-+#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
-+#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
- 
--MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
-+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch
deleted file mode 100644
index fb1cd0f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From fc6621435a64a9d69aa251b70361da94cf2db6be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:25:11 +0000
-Subject: [PATCH 31/46] Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/Makefile.in  | 2 ++
- gcc/cppdefault.c | 4 ++++
- gcc/defaults.h   | 9 +++++++++
- gcc/gcc.c        | 7 -------
- 4 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 450cb79..cc75536 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -593,6 +593,7 @@ libexecdir = @libexecdir@
- 
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- # Directory in which all plugin resources are installed
-@@ -2688,6 +2689,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
- 
- PREPROCESSOR_DEFINES = \
-   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+  -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
-   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
-   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 54aaf06..7b4dd51 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
-     /* This is the dir for gcc's private headers.  */
-     { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+    /* This is the dir for gcc's private headers under the specified sysroot.  */
-+    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
-     /* /usr/local/include comes before the fixincluded header files.  */
-     { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index 3e18338..0f317f2 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1492,4 +1492,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
- #endif
- 
-+/* Default prefixes to attach to command names.  */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif  /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 04fa81d..9750cc2 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1450,13 +1450,6 @@ static const char *gcc_libexec_prefix;
- 
- /* Default prefixes to attach to command names.  */
- 
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE  /* Don't use these prefixes for a cross compiler.  */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
deleted file mode 100644
index c0b001d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From ff939c5063d8f8d444bdb25651a0a48e608efaa4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 11:17:19 +0000
-Subject: [PATCH 32/46] gcc 4.8+ won't build with --disable-dependency-tracking
-
-since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP
-2012/09/22
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libatomic/Makefile.am | 3 ++-
- libatomic/Makefile.in | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index b351244..399ce18 100644
---- a/libatomic/Makefile.am
-+++ b/libatomic/Makefile.am
-@@ -101,7 +101,8 @@ PAT_S		= $(word 3,$(PAT_SPLIT))
- IFUNC_DEF	= -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT	= $(word $(PAT_S),$(IFUNC_OPTIONS))
- 
--M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS		=
- M_SIZE		= -DN=$(PAT_N)
- M_IFUNC		= $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE		= $(PAT_BASE)_n.c
-diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index a083d87..a92cfce 100644
---- a/libatomic/Makefile.in
-+++ b/libatomic/Makefile.in
-@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
deleted file mode 100644
index e425d71..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5092f5389d02e78cd59690cf3fca24b56a97aff2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 3 Mar 2015 08:21:19 +0000
-Subject: [PATCH 33/46] Don't search host directory during "relink" if
- $inst_prefix is provided
-
-http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 52bdbdb..82bcec3 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6004,12 +6004,13 @@ func_mode_link ()
- 	      fi
- 	    else
- 	      # We cannot seem to hardcode it, guess we'll fake it.
-+	      # Default if $libdir is not relative to the prefix:
- 	      add_dir="-L$libdir"
--	      # Try looking first in the location we're being installed to.
-+
- 	      if test -n "$inst_prefix_dir"; then
- 		case $libdir in
- 		  [\\/]*)
--		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
-+		    add_dir="-L$inst_prefix_dir$libdir"
- 		    ;;
- 		esac
- 	      fi
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
deleted file mode 100644
index 922a855..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1faa6f69f93bb95af2b2b2bd24e181b50fb5b37c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:15:27 -0700
-Subject: [PATCH 34/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
- base_libdir
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 5fcaa59..8588ac0 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,7 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
- 
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch
deleted file mode 100644
index 9dfc472..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3768468c1a6cc170fff88c03b808c975ac653811 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:18:39 -0700
-Subject: [PATCH 35/46] aarch64: Add support for musl ldso
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 8588ac0..946b3ca 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -24,7 +24,7 @@
- #define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
- 
- #undef MUSL_DYNAMIC_LINKER
--#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define MUSL_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
- 
- #undef  ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
deleted file mode 100644
index f89a886..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From f4d3c8e970d42a43cd3d2f751e13324efa936ff8 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 5 Jul 2015 20:25:18 -0700
-Subject: [PATCH 36/46] libcc1: fix libcc1's install path and rpath
-
-* Install libcc1.so and libcc1plugin.so into
-  $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
-  had done to lto-plugin.
-* Fix bad RPATH iussue:
-  gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
- /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
- [rpaths]
-
-Upstream-Status: Inappropriate [OE configuration]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libcc1/Makefile.am | 4 ++--
- libcc1/Makefile.in | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index b40820b..32930c5 100644
---- a/libcc1/Makefile.am
-+++ b/libcc1/Makefile.am
-@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- 	    $(Wc)$(libiberty_normal)))
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
- 
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- 
- if ENABLE_PLUGIN
- plugin_LTLIBRARIES = libcc1plugin.la
-diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 79d39d3..227ec22 100644
---- a/libcc1/Makefile.in
-+++ b/libcc1/Makefile.in
-@@ -291,8 +291,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- 	    $(Wc)$(libiberty_normal)))
- 
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
- @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
- BUILT_SOURCES = compiler-name.h
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch
deleted file mode 100644
index 15efcb1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 1475b941d7a9c9874b0fb0558d01805945467331 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:39:54 +0000
-Subject: [PATCH 37/46] handle sysroot support for nativesdk-gcc
-
-Being able to build a nativesdk gcc is useful, particularly in cases
-where the host compiler may be of an incompatible version (or a 32
-bit compiler is needed).
-
-Sadly, building nativesdk-gcc is not straight forward. We install
-nativesdk-gcc into a relocatable location and this means that its
-library locations can change. "Normal" sysroot support doesn't help
-in this case since the values of paths like "libdir" change, not just
-base root directory of the system.
-
-In order to handle this we do two things:
-
-a) Add %r into spec file markup which can be used for injected paths
-   such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
-b) Add other paths which need relocation into a .gccrelocprefix section
-   which the relocation code will notice and adjust automatically.
-
-Upstream-Status: Inappropriate
-RP 2015/7/28
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++-------------
- gcc/cppdefault.h |  3 ++-
- gcc/gcc.c        | 20 ++++++++++++++------
- 3 files changed, 53 insertions(+), 20 deletions(-)
-
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 7b4dd51..9d1166c 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -35,6 +35,30 @@
- # undef CROSS_INCLUDE_DIR
- #endif
- 
-+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
-+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
-+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
-+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
-+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
-+#ifdef LOCAL_INCLUDE_DIR
-+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
-+#endif
-+#ifdef PREFIX_INCLUDE_DIR
-+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
-+#endif
-+#ifdef FIXED_INCLUDE_DIR
-+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
-+#endif
-+#ifdef CROSS_INCLUDE_DIR
-+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
-+#endif
-+#ifdef TOOL_INCLUDE_DIR
-+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
-+#endif
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
-+#endif
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
- = {
- #ifdef GPLUSPLUS_INCLUDE_DIR
-     /* Pick up GNU C++ generic include files.  */
--    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
-+    { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
-       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
-     /* Pick up GNU C++ target-dependent include files.  */
--    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
-+    { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
-       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
- #endif
- #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
-     /* Pick up GNU C++ backward and deprecated include files.  */
--    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
-+    { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
-       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GCC_INCLUDE_DIR
-     /* This is the dir for gcc's private headers.  */
--    { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+    { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef GCC_INCLUDE_SUBDIR_TARGET
-     /* This is the dir for gcc's private headers under the specified sysroot.  */
--    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+    { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
- #endif
- #ifdef LOCAL_INCLUDE_DIR
-     /* /usr/local/include comes before the fixincluded header files.  */
--    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
--    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
-+    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
- #endif
- #ifdef PREFIX_INCLUDE_DIR
--    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
-+    { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
- #endif
- #ifdef FIXED_INCLUDE_DIR
-     /* This is the dir for fixincludes.  */
--    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
-+    { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
-       /* A multilib suffix needs adding if different multilibs use
- 	 different headers.  */
- #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
- #endif
- #ifdef CROSS_INCLUDE_DIR
-     /* One place the target system's headers might be.  */
--    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+    { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef TOOL_INCLUDE_DIR
-     /* Another place the target system's headers might be.  */
--    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
-+    { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
- #endif
- #ifdef NATIVE_SYSTEM_HEADER_DIR
-     /* /usr/include comes dead last.  */
--    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
--    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
-+    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-+    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
- #endif
-     { 0, 0, 0, 0, 0, 0 }
-   };
-diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index 8a81b45..9759efd 100644
---- a/gcc/cppdefault.h
-+++ b/gcc/cppdefault.h
-@@ -33,7 +33,8 @@
- 
- struct default_include
- {
--  const char *const fname;	/* The name of the directory.  */
-+  const char *fname;     /* The name of the directory.  */
-+
-   const char *const component;	/* The component containing the directory
- 				   (see update_path in prefix.c) */
-   const char cplusplus;		/* Only look here if we're compiling C++.  */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 9750cc2..94c240e 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -247,6 +247,8 @@ FILE *report_times_to_file = NULL;
- #endif
- static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
- 
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
-+
- /* Nonzero means pass the updated target_system_root to the compiler.  */
- 
- static int target_system_root_changed;
-@@ -517,6 +519,7 @@ or with constant text in a single argument.
-  %G     process LIBGCC_SPEC as a spec.
-  %R     Output the concatenation of target_system_root and
-         target_sysroot_suffix.
-+ %r     Output the base path target_relocatable_prefix
-  %S     process STARTFILE_SPEC as a spec.  A capital S is actually used here.
-  %E     process ENDFILE_SPEC as a spec.  A capital E is actually used here.
-  %C     process CPP_SPEC as a spec.
-@@ -1473,10 +1476,10 @@ static const char *gcc_libexec_prefix;
-    gcc_exec_prefix is set because, in that case, we know where the
-    compiler has been installed, and use paths relative to that
-    location instead.  */
--static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
--static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
--static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
--static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
-+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
-+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
-+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- 
- /* For native compilers, these are well-known paths containing
-    components that may be provided by the system.  For cross
-@@ -1484,9 +1487,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *md_exec_prefix = MD_EXEC_PREFIX;
- static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
- static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_1
-+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
-   = STANDARD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_2
-+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
-   = STANDARD_STARTFILE_PREFIX_2;
- 
- /* A relative path to be used in finding the location of tools
-@@ -5762,6 +5765,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
- 	      }
- 	    break;
- 
-+          case 'r':
-+              obstack_grow (&obstack, target_relocatable_prefix,
-+		      strlen (target_relocatable_prefix));
-+            break;
-+
- 	  case 'S':
- 	    value = do_spec_1 (startfile_spec, 0, NULL);
- 	    if (value != 0)
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
deleted file mode 100644
index 89ee79d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 42e4cdcaad590536246866b0846ec279e124fa16 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:41:45 +0000
-Subject: [PATCH 38/46] Search target sysroot gcc version specific dirs with
- multilib.
-
-We install the gcc libraries (such as crtbegin.p) into
-<sysroot><libdir>/<target-sys>/5.2.0/
-which is a default search path for GCC (aka multi_suffix in the
-code below). <target-sys> is 'machine' in gcc's terminology. We use
-these directories so that multiple gcc versions could in theory
-co-exist on target.
-
-We only want to build one gcc-cross-canadian per arch and have this work
-for all multilibs. <target-sys> can be handled by mapping the multilib
-<target-sys> to the one used by gcc-cross-canadian, e.g.
-mips64-polkmllib32-linux
-is symlinked to by mips64-poky-linux.
-
-The default gcc search path in the target sysroot for a "lib64" mutlilib
-is:
-
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-which means that the lib32 crtbegin.o will be found and the lib64 ones
-will not which leads to compiler failures.
-
-This patch injects a multilib version of that path first so the lib64
-binaries can be found first. With this change the search path becomes:
-
-<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-Upstream-Status: Pending
-RP 2015/7/31
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 94c240e..2812819 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -2507,7 +2507,7 @@ for_each_path (const struct path_prefix *paths,
-       if (path == NULL)
- 	{
- 	  len = paths->max_len + extra_space + 1;
--	  len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
-+	  len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
- 	  path = XNEWVEC (char, len);
- 	}
- 
-@@ -2519,6 +2519,33 @@ for_each_path (const struct path_prefix *paths,
- 	  /* Look first in MACHINE/VERSION subdirectory.  */
- 	  if (!skip_multi_dir)
- 	    {
-+	      if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
-+	        {
-+	          const char *this_multi;
-+	          size_t this_multi_len;
-+
-+	          if (pl->os_multilib)
-+		    {
-+		      this_multi = multi_os_dir;
-+		      this_multi_len = multi_os_dir_len;
-+		    }
-+	          else
-+		    {
-+		      this_multi = multi_dir;
-+		      this_multi_len = multi_dir_len;
-+		    }
-+
-+	          /* Look in multilib MACHINE/VERSION subdirectory first */
-+	          if (this_multi_len)
-+	            {
-+		      memcpy (path + len, this_multi, this_multi_len + 1);
-+	              memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
-+	              ret = callback (path, callback_info);
-+	                if (ret)
-+		          break;
-+	            }
-+	        }
-+
- 	      memcpy (path + len, multi_suffix, suffix_len + 1);
- 	      ret = callback (path, callback_info);
- 	      if (ret)
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
deleted file mode 100644
index 0ce7aec..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 9ced49e459ccf1887feb58adf1e8836dcb4b1bdf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:42:45 +0000
-Subject: [PATCH 39/46] Fix various _FOR_BUILD and related variables
-
-When doing a FOR_BUILD thing, you have to override CFLAGS with
-CFLAGS_FOR_BUILD. And if you use C++, you also have to override
-CXXFLAGS with CXXFLAGS_FOR_BUILD.
-Without this, when building for mingw, you end up trying to use
-the mingw headers for a host build.
-
-The same goes for other variables as well, such as CPPFLAGS,
-CPP, and GMPINC.
-
-Upstream-Status: Pending
-
-Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in      | 6 ++++++
- Makefile.tpl     | 5 +++++
- gcc/Makefile.in  | 2 +-
- gcc/configure    | 2 +-
- gcc/configure.ac | 2 +-
- 5 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index beb9b9a..3e1c6bc 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
- 	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
- 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- 	GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+	CPP="$(CC_FOR_BUILD) -E" \
-+	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
- 
- # This is the list of directories to built for the host system.
-@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- 	$(BASE_EXPORTS) \
- 	CC="$(CC)"; export CC; \
-+	CPP="$(CC) -E"; export CPP; \
- 	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
- 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-@@ -713,6 +718,7 @@ BASE_FLAGS_TO_PASS = \
- 	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- 	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- 	"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
-+	"CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
- 	"EXPECT=$(EXPECT)" \
- 	"FLEX=$(FLEX)" \
- 	"INSTALL=$(INSTALL)" \
-diff --git a/Makefile.tpl b/Makefile.tpl
-index 6b2eb6a..114e462 100644
---- a/Makefile.tpl
-+++ b/Makefile.tpl
-@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
- 	CC="$(CC_FOR_BUILD)"; export CC; \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
- 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- 	GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+	CPP="$(CC_FOR_BUILD) -E" \
-+	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
- 
- # This is the list of directories to built for the host system.
-@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- 	$(BASE_EXPORTS) \
- 	CC="$(CC)"; export CC; \
-+	CPP="$(CC) -E"; export CPP; \
- 	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
- 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index cc75536..0ad2dc8 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -780,7 +780,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
- BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
- BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
- BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
--		-I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
-+		-I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
- 
- # Actual name to use when installing a native compiler.
- GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
-diff --git a/gcc/configure b/gcc/configure
-index 377253e..78fc64a 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11799,7 +11799,7 @@ else
- 	CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- 	CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- 	LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
--	GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+	GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- 	${realsrcdir}/configure \
- 		--enable-languages=${enable_languages-all} \
- 		--target=$target_alias --host=$build_alias --build=$build_alias
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 54e7619..a94666e 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1682,7 +1682,7 @@ else
- 	CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- 	CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- 	LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
--	GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+	GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- 	${realsrcdir}/configure \
- 		--enable-languages=${enable_languages-all} \
- 		--target=$target_alias --host=$build_alias --build=$build_alias
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index c9a6fd0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b0412c01c275aaeb6b458461cd2425120c8bcec8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 10:26:10 -0800
-Subject: [PATCH 40/46] nios2: Define MUSL_DYNAMIC_LINKER
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/config/nios2/linux.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
-index 4ef55b5..62bc1e7 100644
---- a/gcc/config/nios2/linux.h
-+++ b/gcc/config/nios2/linux.h
-@@ -30,6 +30,7 @@
- #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
- 
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
-+#define MUSL_DYNAMIC_LINKER  "/lib/ld-musl-nios2.so.1"
- 
- #undef LINK_SPEC
- #define LINK_SPEC LINK_SPEC_ENDIAN \
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
deleted file mode 100644
index 29b7ce7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 210f6b3b82084cc756e02b8bc12f909a43b14ee8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 27 Jun 2017 18:10:54 -0700
-Subject: [PATCH 40/49] Add ssp_nonshared to link commandline for musl targets
-
-when -fstack-protector options are enabled we need to
-link with ssp_shared on musl since it does not provide
-the __stack_chk_fail_local() so essentially it provides
-libssp but not libssp_nonshared something like
-TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED
- where-as for glibc the needed symbols
-are already present in libc_nonshared library therefore
-we do not need any library helper on glibc based systems
-but musl needs the libssp_noshared from gcc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/linux.h          |  7 +++++++
- gcc/config/rs6000/linux.h   | 10 ++++++++++
- gcc/config/rs6000/linux64.h | 10 ++++++++++
- 3 files changed, 27 insertions(+)
-
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 2e683d0c430..1b4df798671 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -182,6 +182,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-     { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },		\
-     { 0, 0, 0, 0, 0, 0 }				\
-   }
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+		       "|fstack-protector-strong|fstack-protector-explicit" \
-+		       ":-lssp_nonshared}"
-+#endif
-+
- #endif
- 
- #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
-diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
-index 684afd6c190..22cfa391b89 100644
---- a/gcc/config/rs6000/linux.h
-+++ b/gcc/config/rs6000/linux.h
-@@ -91,6 +91,16 @@
- 					 " -m elf32ppclinux")
- #endif
- 
-+/* link libssp_nonshared.a with musl */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+		       "|fstack-protector-strong|fstack-protector-explicit" \
-+		       ":-lssp_nonshared}"
-+#endif
-+#endif
-+
- #undef LINK_OS_LINUX_SPEC
- #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
-   %{rdynamic:-export-dynamic} \
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 3b00ec0fcf0..8371f8d7b6b 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -465,6 +465,16 @@ extern int dot_symbols;
- 					   " -m elf64ppc")
- #endif
- 
-+/* link libssp_nonshared.a with musl */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+		       "|fstack-protector-strong|fstack-protector-explicit" \
-+		       ":-lssp_nonshared}"
-+#endif
-+#endif
-+
- #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
-   %{rdynamic:-export-dynamic} \
-   -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
deleted file mode 100644
index 861f0fd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From ba738cc411c9a54e389e336bcaa0a2428dd4a9d2 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 02:27:43 -0400
-Subject: [PATCH 42/46] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
-
-Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
-directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
-__builtin_FILE ().
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
-
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/c-family/c-opts.c     | 13 +++++++
- gcc/c-family/c.opt        |  4 +++
- gcc/dwarf2out.c           |  1 +
- gcc/gimplify.c            |  3 ++
- libcpp/Makefile.in        | 10 +++---
- libcpp/file-map.c         | 92 +++++++++++++++++++++++++++++++++++++++++++++++
- libcpp/include/file-map.h | 30 ++++++++++++++++
- libcpp/macro.c            |  2 ++
- 8 files changed, 150 insertions(+), 5 deletions(-)
- create mode 100644 libcpp/file-map.c
- create mode 100644 libcpp/include/file-map.h
-
-diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index fec58bc..7a0af43 100644
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -38,6 +38,14 @@ along with GCC; see the file COPYING3.  If not see
- #include "opts.h"
- #include "plugin.h"		/* For PLUGIN_INCLUDE_FILE event.  */
- #include "mkdeps.h"
-+#include "file-map.h"
-+#include "c-target.h"
-+#include "tm.h"			/* For BYTES_BIG_ENDIAN,
-+				   DOLLARS_IN_IDENTIFIERS,
-+				   STDC_0_IN_SYSTEM_HEADERS,
-+				   TARGET_FLT_EVAL_METHOD_NON_DEFAULT and
-+				   TARGET_OPTF.  */
-+#include "tm_p.h"		/* For C_COMMON_OVERRIDE_OPTIONS.  */
- #include "dumpfile.h"
- 
- #ifndef DOLLARS_IN_IDENTIFIERS
-@@ -503,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
-       cpp_opts->narrow_charset = arg;
-       break;
- 
-+    case OPT_ffile_prefix_map_:
-+      if (add_file_prefix_map (arg) < 0)
-+        error ("invalid argument %qs to -ffile-prefix-map", arg);
-+      break;
-+
-     case OPT_fwide_exec_charset_:
-       cpp_opts->wide_charset = arg;
-       break;
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 660da6c..31f7b34 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1208,6 +1208,10 @@ fexec-charset=
- C ObjC C++ ObjC++ Joined RejectNegative
- -fexec-charset=<cset>	Convert all strings and character constants to character set <cset>.
- 
-+ffile-prefix-map=
-+C ObjC C++ ObjC++ Joined RejectNegative
-+-ffile-prefix-map=<old=new>	Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
-+
- fextended-identifiers
- C ObjC C++ ObjC++
- Permit universal character names (\\u and \\U) in identifiers.
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 80f2df5..a2bfcc0 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -21672,6 +21672,7 @@ gen_producer_string (void)
-       case OPT_fltrans_output_list_:
-       case OPT_fresolution_:
-       case OPT_fdebug_prefix_map_:
-+      case OPT_ffile_prefix_map_:
- 	/* Ignore these.  */
- 	continue;
-       default:
-diff --git a/gcc/gimplify.c b/gcc/gimplify.c
-index e223e59..1433c25 100644
---- a/gcc/gimplify.c
-+++ b/gcc/gimplify.c
-@@ -57,6 +57,8 @@ along with GCC; see the file COPYING3.  If not see
- #include "gomp-constants.h"
- #include "tree-dump.h"
- #include "gimple-walk.h"
-+#include "file-map.h"
-+
- #include "langhooks-def.h"	/* FIXME: for lhd_set_decl_assembler_name */
- #include "builtins.h"
- 
-@@ -2432,6 +2434,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
-       case BUILT_IN_FILE:
- 	{
- 	  const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p));
-+	  locfile = remap_file_filename (locfile);
- 	  *expr_p = build_string_literal (strlen (locfile) + 1, locfile);
- 	  return GS_OK;
- 	}
-diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
-index a7d7828..3d29572 100644
---- a/libcpp/Makefile.in
-+++ b/libcpp/Makefile.in
-@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
- 
- 
- libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
--	expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
--	mkdeps.o pch.o symtab.o traditional.o
-+	expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
-+	macro.o mkdeps.o pch.o symtab.o traditional.o
- 
- libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
--	expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
--	mkdeps.c pch.c symtab.c traditional.c
-+	expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
-+	macro.c mkdeps.c pch.c symtab.c traditional.c
- 
- all: libcpp.a $(USED_CATALOGS)
- 
-@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
- 
- TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
-     include/line-map.h include/symtab.h include/cpp-id-data.h \
--    include/cpplib.h include/mkdeps.h system.h
-+    include/cpplib.h include/mkdeps.h system.h include/file-map.h
- 
- TAGS: $(TAGS_SOURCES)
- 	cd $(srcdir) && etags $(TAGS_SOURCES)
-diff --git a/libcpp/file-map.c b/libcpp/file-map.c
-new file mode 100644
-index 0000000..18035ef
---- /dev/null
-+++ b/libcpp/file-map.c
-@@ -0,0 +1,92 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+   and __builtin_FILE ().
-+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+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 3, 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; see the file COPYING3.  If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them.   Help stamp out software-hoarding!  */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "file-map.h"
-+
-+/* Structure recording the mapping from source file and directory
-+   names at compile time to __FILE__ */
-+typedef struct file_prefix_map
-+{
-+  const char *old_prefix;
-+  const char *new_prefix;
-+  size_t old_len;
-+  size_t new_len;
-+  struct file_prefix_map *next;
-+} file_prefix_map;
-+
-+/* Linked list of such structures.  */
-+static file_prefix_map *file_prefix_maps;
-+
-+/* Record prefix mapping of __FILE__.  ARG is the argument to
-+   -ffile-prefix-map and must be of the form OLD=NEW.  */
-+int
-+add_file_prefix_map (const char *arg)
-+{
-+  file_prefix_map *map;
-+  const char *p;
-+
-+  p = strchr (arg, '=');
-+  if (!p)
-+  {
-+      fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
-+      return -1;
-+  }
-+  map = XNEW (file_prefix_map);
-+  map->old_prefix = xstrndup (arg, p - arg);
-+  map->old_len = p - arg;
-+  p++;
-+  map->new_prefix = xstrdup (p);
-+  map->new_len = strlen (p);
-+  map->next = file_prefix_maps;
-+  file_prefix_maps = map;
-+
-+  return 0;
-+}
-+
-+/* Perform user-specified mapping of __FILE__ prefixes.  Return
-+   the new name corresponding to filename.  */
-+
-+const char *
-+remap_file_filename (const char *filename)
-+{
-+  file_prefix_map *map;
-+  char *s;
-+  const char *name;
-+  size_t name_len;
-+
-+  for (map = file_prefix_maps; map; map = map->next)
-+    if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+      break;
-+  if (!map)
-+    return filename;
-+  name = filename + map->old_len;
-+  name_len = strlen (name) + 1;
-+  s = (char *) alloca (name_len + map->new_len);
-+  memcpy (s, map->new_prefix, map->new_len);
-+  memcpy (s + map->new_len, name, name_len);
-+
-+  return xstrdup (s);
-+}
-+
-+
-diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
-new file mode 100644
-index 0000000..8750315
---- /dev/null
-+++ b/libcpp/include/file-map.h
-@@ -0,0 +1,30 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+   and __builtin_FILE ().
-+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+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 3, 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; see the file COPYING3.  If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them.   Help stamp out software-hoarding!  */
-+
-+#ifndef LIBCPP_FILE_MAP_H
-+#define LIBCPP_FILE_MAP_H
-+
-+const char * remap_file_filename (const char *filename);
-+
-+int add_file_prefix_map (const char *arg);
-+
-+#endif /* !LIBCPP_FILE_MAP_H  */
-diff --git a/libcpp/macro.c b/libcpp/macro.c
-index c251553..3ceec3d 100644
---- a/libcpp/macro.c
-+++ b/libcpp/macro.c
-@@ -26,6 +26,7 @@ along with this program; see the file COPYING3.  If not see
- #include "system.h"
- #include "cpplib.h"
- #include "internal.h"
-+#include "file-map.h"
- 
- typedef struct macro_arg macro_arg;
- /* This structure represents the tokens of a macro argument.  These
-@@ -301,6 +302,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node,
- 	    if (!name)
- 	      abort ();
- 	  }
-+	name = remap_file_filename (name);
- 	len = strlen (name);
- 	buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
- 	result = buf;
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
deleted file mode 100644
index 0077f80..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 25c87c6cc40ec5cc6965f8bfb215bec01abd6d82 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 05:39:59 -0400
-Subject: [PATCH 43/46] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
-
-The oe-core may use external toolchain to compile,
-which may not support -ffile-prefix-map.
-
-Since we use -fdebug-prefix-map to do the same thing,
-so we could reuse it to replace -ffile-prefix-map.
-
-Upstream-Status: Inappropriate[oe-core specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/opts-global.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gcc/opts-global.c b/gcc/opts-global.c
-index b7e5232..121d7b9 100644
---- a/gcc/opts-global.c
-+++ b/gcc/opts-global.c
-@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3.  If not see
- #include "langhooks.h"
- #include "dbgcnt.h"
- #include "debug.h"
-+#include "file-map.h"
- #include "output.h"
- #include "plugin.h"
- #include "toplev.h"
-@@ -357,6 +358,9 @@ handle_common_deferred_options (void)
- 
- 	case OPT_fdebug_prefix_map_:
- 	  add_debug_prefix_map (opt->arg);
-+
-+	  /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
-+	  add_file_prefix_map (opt->arg);
- 	  break;
- 
- 	case OPT_fdump_:
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
deleted file mode 100644
index 5d41af4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6ab23e88aef22bbabee7b9600c459ff39547bb66 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 24 Mar 2016 11:23:14 -0400
-Subject: [PATCH 44/46] gcc/final.c: -fdebug-prefix-map support to remap
- sources with relative path
-
-PR other/70428
-* final.c (remap_debug_filename): Use lrealpath to translate
-relative path before remapping
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/final.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/final.c b/gcc/final.c
-index 55cf509..23293e5 100644
---- a/gcc/final.c
-+++ b/gcc/final.c
-@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
-   const char *name;
-   size_t name_len;
- 
-+  /* Support to remap filename with relative path  */
-+  char *realpath = lrealpath (filename);
-+  if (realpath == NULL)
-+    return filename;
-+
-   for (map = debug_prefix_maps; map; map = map->next)
--    if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+    if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
-       break;
-   if (!map)
--    return filename;
--  name = filename + map->old_len;
-+    {
-+      free (realpath);
-+      return filename;
-+    }
-+  name = realpath + map->old_len;
-   name_len = strlen (name) + 1;
-   s = (char *) alloca (name_len + map->new_len);
-   memcpy (s, map->new_prefix, map->new_len);
-   memcpy (s + map->new_len, name, name_len);
-+  free (realpath);
-   return ggc_strdup (s);
- }
- 
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
deleted file mode 100644
index c62b727..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 5a47d404ea29e2547269e3ddf38754462d93f903 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Apr 2016 20:03:28 +0000
-Subject: [PATCH 45/46] libgcc: Add knob to use ldbl-128 on ppc
-
-musl does not support ldbl 128 so we can not assume
-that linux as a whole supports ldbl-128 bits, instead
-act upon configure option passed to gcc and assume no
-on musl and yes otherwise if no option is passed since
-default behaviour is to assume ldbl128 it does not
-change the defaults
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libgcc/Makefile.in           |  1 +
- libgcc/config/rs6000/t-linux |  5 ++++-
- libgcc/configure             | 18 ++++++++++++++++++
- libgcc/configure.ac          | 12 ++++++++++++
- 4 files changed, 35 insertions(+), 1 deletion(-)
- mode change 100644 => 100755 libgcc/configure
-
-diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
-index f09b39b..296cf0f 100644
---- a/libgcc/Makefile.in
-+++ b/libgcc/Makefile.in
-@@ -43,6 +43,7 @@ enable_vtable_verify = @enable_vtable_verify@
- enable_decimal_float = @enable_decimal_float@
- fixed_point = @fixed_point@
- with_aix_soname = @with_aix_soname@
-+with_ldbl128 = @with_ldbl128@
- 
- host_noncanonical = @host_noncanonical@
- real_host_noncanonical = @real_host_noncanonical@
-diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
-index 4f6d4c4..c50dd94 100644
---- a/libgcc/config/rs6000/t-linux
-+++ b/libgcc/config/rs6000/t-linux
-@@ -1,3 +1,6 @@
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
- 
--HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
-+ifeq ($(with_ldbl128),yes)
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128
-+endif
-+HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
-diff --git a/libgcc/configure b/libgcc/configure
-old mode 100644
-new mode 100755
-index e7d6c75..e9a9019
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -614,6 +614,7 @@ build_vendor
- build_cpu
- build
- with_aix_soname
-+with_ldbl128
- enable_vtable_verify
- enable_shared
- libgcc_topdir
-@@ -663,6 +664,7 @@ with_cross_host
- with_ld
- enable_shared
- enable_vtable_verify
-+with_long_double_128
- with_aix_soname
- enable_version_specific_runtime_libs
- with_slibdir
-@@ -1319,6 +1321,7 @@ Optional Packages:
-   --with-target-subdir=SUBDIR      Configuring in a subdirectory for target
-   --with-cross-host=HOST           Configuring with a cross compiler
-   --with-ld               arrange to use the specified ld (full pathname)
-+  --with-long-double-128  use 128-bit long double by default
-   --with-aix-soname=aix|svr4|both
-                           shared library versioning (aka "SONAME") variant to
-                           provide on AIX
-@@ -2201,6 +2204,21 @@ fi
- 
- 
- 
-+# Check whether --with-long-double-128 was given.
-+if test "${with_long_double_128+set}" = set; then :
-+  withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
-+else
-+  case "${host}" in
-+ power*-*-musl*)
-+   with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+
-+fi
-+
-+
-+
-+
- # Check whether --with-aix-soname was given.
- if test "${with_aix_soname+set}" = set; then :
-   withval=$with_aix_soname; case "${host}:${enable_shared}" in
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index 269997f..81dc3ba 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify,
- [enable_vtable_verify=no])
- AC_SUBST(enable_vtable_verify)
- 
-+AC_ARG_WITH(long-double-128,
-+[AS_HELP_STRING([--with-long-double-128],
-+    [use 128-bit long double by default])],
-+      with_ldbl128="$with_long_double_128",
-+[case "${host}" in
-+ power*-*-musl*)
-+   with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+])
-+AC_SUBST(with_ldbl128)
-+
- AC_ARG_WITH(aix-soname,
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
-     [shared library versioning (aka "SONAME") variant to provide on AIX])],
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
deleted file mode 100644
index 390037f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 513bf3c33e2f551f08bd57605091d5ddeba3536b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 4 May 2016 21:11:34 -0700
-Subject: [PATCH 46/46] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
-
-Upstream-Status: Pending
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libgcc/config/t-slibgcc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
-index 8c5f890..29be909 100644
---- a/libgcc/config/t-slibgcc
-+++ b/libgcc/config/t-slibgcc
-@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
- 	$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
- 
- SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
--	$(SHLIB_LDFLAGS) \
-+	$(LDFLAGS) $(SHLIB_LDFLAGS) \
- 	-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
- 	$(SHLIB_OBJS) $(SHLIB_LC) && \
- 	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
deleted file mode 100644
index 6b5da02..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 0a9ed0479203cb7e69c3745b0c259007410f39ba Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sat, 24 Oct 2015 20:09:53 +0000
-Subject: [PATCH 47/47] libgcc_s: Use alias for __cpu_indicator_init instead of
- symver
-
-Adapter from
-
-https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
-
-This fix was debated but hasnt been applied gcc upstream since
-they expect musl to support '@' in symbol versioning which is
-a sun/gnu versioning extention. This patch however avoids the
-need for the '@' symbols at all
-
-libgcc/Changelog:
-
-2015-05-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-	* config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
-	(__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
-
-	* config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
-
-gcc/Changelog:
-
-2015-05-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-	* config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
-	call __cpu_indicator_init_local instead of __cpu_indicator_init.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Denied
-
- gcc/config/i386/i386.c       | 4 ++--
- libgcc/config/i386/cpuinfo.c | 6 +++---
- libgcc/config/i386/t-linux   | 2 +-
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 861a029..1c97d72 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -40323,10 +40323,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
-     {
-     case IX86_BUILTIN_CPU_INIT:
-       {
--	/* Make it call __cpu_indicator_init in libgcc. */
-+	/* Make it call __cpu_indicator_init_local in libgcc.a. */
- 	tree call_expr, fndecl, type;
-         type = build_function_type_list (integer_type_node, NULL_TREE); 
--	fndecl = build_fn_decl ("__cpu_indicator_init", type);
-+	fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
- 	call_expr = build_call_expr (fndecl, 0); 
- 	return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
-       }
-diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
-index 8c2248d..6c82f15 100644
---- a/libgcc/config/i386/cpuinfo.c
-+++ b/libgcc/config/i386/cpuinfo.c
-@@ -485,7 +485,7 @@ __cpu_indicator_init (void)
-   return 0;
- }
- 
--#if defined SHARED && defined USE_ELF_SYMVER
--__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
--__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
-+#ifndef SHARED
-+int __cpu_indicator_init_local (void)
-+  __attribute__ ((weak, alias ("__cpu_indicator_init")));
- #endif
-diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
-index 11bb46e..4f47f7b 100644
---- a/libgcc/config/i386/t-linux
-+++ b/libgcc/config/i386/t-linux
-@@ -3,4 +3,4 @@
- # t-slibgcc-elf-ver and t-linux
- SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
- 
--HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
-+HOST_LIBGCC2_CFLAGS += -mlong-double-80
--- 
-2.9.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch
deleted file mode 100644
index 30c158d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 10595c03c39b4e980d2a00e16fc84e9caf82292e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 3 Feb 2017 12:56:00 -0800
-Subject: [PATCH 48/48] sync gcc stddef.h with musl
-
-musl defines ptrdiff_t size_t and wchar_t
-so dont define them here if musl is definining them
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/ginclude/stddef.h | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
-index d711530d053..c315b7a97c1 100644
---- a/gcc/ginclude/stddef.h
-+++ b/gcc/ginclude/stddef.h
-@@ -134,6 +134,7 @@ _TYPE_wchar_t;
- #ifndef ___int_ptrdiff_t_h
- #ifndef _GCC_PTRDIFF_T
- #ifndef _PTRDIFF_T_DECLARED /* DragonFly */
-+#ifndef __DEFINED_ptrdiff_t /* musl */
- #define _PTRDIFF_T
- #define _T_PTRDIFF_
- #define _T_PTRDIFF
-@@ -143,10 +144,12 @@ _TYPE_wchar_t;
- #define ___int_ptrdiff_t_h
- #define _GCC_PTRDIFF_T
- #define _PTRDIFF_T_DECLARED
-+#define __DEFINED_ptrdiff_t /* musl */
- #ifndef __PTRDIFF_TYPE__
- #define __PTRDIFF_TYPE__ long int
- #endif
- typedef __PTRDIFF_TYPE__ ptrdiff_t;
-+#endif /* __DEFINED_ptrdiff_t */
- #endif /* _PTRDIFF_T_DECLARED */
- #endif /* _GCC_PTRDIFF_T */
- #endif /* ___int_ptrdiff_t_h */
-@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__	/* BeOS */
- #define __SIZE_T__	/* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
-   || defined(__DragonFly__) \
-   || defined(__FreeBSD_kernel__)
-@@ -235,6 +240,7 @@ typedef long ssize_t;
- #endif /* _SIZE_T */
- #endif /* __SIZE_T__ */
- #endif /* __size_t__ */
-+#endif /* __DEFINED_size_t */
- #undef	__need_size_t
- #endif /* _STDDEF_H or __need_size_t.  */
- 
-@@ -264,6 +270,7 @@ typedef long ssize_t;
- #ifndef ___int_wchar_t_h
- #ifndef __INT_WCHAR_T_H
- #ifndef _GCC_WCHAR_T
-+#ifndef __DEFINED_wchar_t /* musl */
- #define __wchar_t__	/* BeOS */
- #define __WCHAR_T__	/* Cray Unicos/Mk */
- #define _WCHAR_T
-@@ -279,6 +286,7 @@ typedef long ssize_t;
- #define __INT_WCHAR_T_H
- #define _GCC_WCHAR_T
- #define _WCHAR_T_DECLARED
-+#define __DEFINED_wchar_t /* musl */
- 
- /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
-    instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
-@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t;
- #endif
- #endif /* __WCHAR_T__ */
- #endif /* __wchar_t__ */
-+#endif /* __DEFINED_wchar_t musl */
- #undef	__need_wchar_t
- #endif /* _STDDEF_H or __need_wchar_t.  */
- 
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch
deleted file mode 100644
index 73ab950..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Need to pass NO_PIE_CFLAGS to ALL_* so gcc doesn't fail when
-we compile it with older gcc and pie.
-
-Upstream-Status: Inappropriate [configuration]
-
-Maintained by: Gentoo Toolchain Project <toolchain@gentoo.org>
-Signed-off-by: Stephen Arnold <stephen.arnold42@gmail.com>
-
---- a/gcc/Makefile.in	2015-06-25 19:18:12.000000000 +0200
-+++ b/gcc/Makefile.in	2016-04-22 00:12:54.029178860 +0200
-@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
- ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
-
- # This is the variable to use when using $(COMPILER).
--ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
-+ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # This is the variable to use when using $(LINKER).
--ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
-+ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # Build and host support libraries.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch
deleted file mode 100644
index c266cfe..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-Backport and edit of patches from:
-https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957
-by jsm28 (Joseph Myers)
-
-Current glibc no longer gives the ucontext_t type the tag struct
-ucontext, to conform with POSIX namespace rules.  This requires
-various linux-unwind.h files in libgcc, that were previously using
-struct ucontext, to be fixed to use ucontext_t instead.  This is
-similar to the removal of the struct siginfo tag from siginfo_t some
-years ago.
-
-This patch changes those files to use ucontext_t instead.  As the
-standard name that should be unconditionally safe, so this is not
-restricted to architectures supported by glibc, or conditioned on the
-glibc version.
-
-Upstream-Status: Backport
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
---- branches/gcc-6-branch/libgcc/config/aarch64/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/aarch64/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -52,7 +52,7 @@
-   struct rt_sigframe
-   {
-     siginfo_t info;
--    struct ucontext uc;
-+    ucontext_t uc;
-   };
- 
-   struct rt_sigframe *rt_;
---- branches/gcc-6-branch/libgcc/config/alpha/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/alpha/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -51,7 +51,7 @@
-     {
-       struct rt_sigframe {
- 	siginfo_t info;
--	struct ucontext uc;
-+	ucontext_t uc;
-       } *rt_ = context->cfa;
-       sc = &rt_->uc.uc_mcontext;
-     }
---- branches/gcc-6-branch/libgcc/config/bfin/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/bfin/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -52,7 +52,7 @@
- 	void *puc;
- 	char retcode[8];
- 	siginfo_t info;
--	struct ucontext uc;
-+	ucontext_t uc;
-       } *rt_ = context->cfa;
- 
-       /* The void * cast is necessary to avoid an aliasing warning.
---- branches/gcc-6-branch/libgcc/config/i386/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/i386/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -58,7 +58,7 @@
-   if (*(unsigned char *)(pc+0) == 0x48
-       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
-     {
--      struct ucontext *uc_ = context->cfa;
-+      ucontext_t *uc_ = context->cfa;
-       /* The void * cast is necessary to avoid an aliasing warning.
-          The aliasing warning is correct, but should not be a problem
-          because it does not alias anything.  */
-@@ -138,7 +138,7 @@
- 	siginfo_t *pinfo;
- 	void *puc;
- 	siginfo_t info;
--	struct ucontext uc;
-+	ucontext_t uc;
-       } *rt_ = context->cfa;
-       /* The void * cast is necessary to avoid an aliasing warning.
-          The aliasing warning is correct, but should not be a problem
---- branches/gcc-6-branch/libgcc/config/m68k/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/m68k/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -33,7 +33,7 @@
- /* <sys/ucontext.h> is unfortunately broken right now.  */
- struct uw_ucontext {
- 	unsigned long	  uc_flags;
--	struct ucontext  *uc_link;
-+	ucontext_t	 *uc_link;
- 	stack_t		  uc_stack;
- 	mcontext_t	  uc_mcontext;
- 	unsigned long	  uc_filler[80];
---- branches/gcc-6-branch/libgcc/config/nios2/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/nios2/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -38,7 +38,7 @@
- 
- struct nios2_ucontext {
-   unsigned long uc_flags;
--  struct ucontext *uc_link;
-+  ucontext_t *uc_link;
-   stack_t uc_stack;
-   struct nios2_mcontext uc_mcontext;
-   sigset_t uc_sigmask;	/* mask last for extensibility */
---- branches/gcc-6-branch/libgcc/config/pa/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/pa/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -80,7 +80,7 @@
-   struct sigcontext *sc;
-   struct rt_sigframe {
-     siginfo_t info;
--    struct ucontext uc;
-+    ucontext_t uc;
-   } *frame;
- 
-   /* rt_sigreturn trampoline:
---- branches/gcc-6-branch/libgcc/config/sh/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/sh/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -180,7 +180,7 @@
-     {
-       struct rt_sigframe {
- 	siginfo_t info;
--	struct ucontext uc;
-+	ucontext_t uc;
-       } *rt_ = context->cfa;
-       /* The void * cast is necessary to avoid an aliasing warning.
-          The aliasing warning is correct, but should not be a problem
---- branches/gcc-6-branch/libgcc/config/tilepro/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/tilepro/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -61,7 +61,7 @@
-   struct rt_sigframe {
-     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
-     siginfo_t info;
--    struct ucontext uc;
-+    ucontext_t uc;
-   } *rt_;
- 
-   /* Return if this is not a signal handler.  */
---- branches/gcc-6-branch/libgcc/config/xtensa/linux-unwind.h	2017/07/04 10:22:56	249956
---- b/libgcc/config/xtensa/linux-unwind.h	2017/07/04 10:23:57	249957
-@@ -67,7 +67,7 @@
- 
-   struct rt_sigframe {
-     siginfo_t info;
--    struct ucontext uc;
-+    ucontext_t uc;
-   } *rt_;
- 
-   /* movi a2, __NR_rt_sigreturn; syscall */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
deleted file mode 100644
index 0214ab8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From ad5bf450aef2ffee6d57ed193fabc5f72f8eaa65 Mon Sep 17 00:00:00 2001
-From: rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 19 Oct 2017 13:16:42 +0000
-Subject: [PATCH] [ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing
- with -mno-unaligned-access
-
-Peephole patterns exist in the arm backend to spot load/store
-operations to adjacent memory operations in order to convert them into
-ldrd/strd instructions.  However, when we have strict alignment
-enforced, then we can only do this if the accesses are known to be
-64-bit aligned; this is unlikely to be the case for most loads.  The
-patch adds some alignment checking to the code that validates the
-addresses for use in the peephole patterns.  This should also fix
-incorrect generation of ldrd/strd with unaligned accesses that could
-previously have occurred on ARMv5e where all such operations must be
-64-bit aligned.
-
-I've added some new tests as well.  In doing so I discovered that the
-ldrd/strd peephole tests could never fail since they would match the
-source file name in the scanned assembly as well as any instructions
-of the intended type.  I've fixed those by tightening the scan results
-slightly.
-
-gcc:
-
-* config/arm/arm.c (align_ok_ldrd_strd): New function.
-(mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of the
-mem into it.
-(gen_operands_ldrd_strd): Validate the alignment of the accesses.
-
-testsuite:
-
-* gcc.target/arm/peep-ldrd-1.c: Tighten test scan pattern.
-* gcc.target/arm/peep-strd-1.c: Likewise.
-* gcc.target/arm/peep-ldrd-2.c: New test.
-* gcc.target/arm/peep-strd-2.c: New test.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@253892 138bc75d-0d04-0410-961f-82ee72b054a4
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog                                      |  8 +++++++
- gcc/config/arm/arm.c                               | 27 ++++++++++++++++++----
- gcc/testsuite/ChangeLog                            |  8 +++++++
- gcc/testsuite/gcc.target/arm/peep-ldrd-1.c         |  2 +-
- .../arm/{peep-ldrd-1.c => peep-ldrd-2.c}           |  4 ++--
- gcc/testsuite/gcc.target/arm/peep-strd-1.c         |  2 +-
- .../arm/{peep-strd-1.c => peep-strd-2.c}           |  4 ++--
- 7 files changed, 44 insertions(+), 11 deletions(-)
- copy gcc/testsuite/gcc.target/arm/{peep-ldrd-1.c => peep-ldrd-2.c} (63%)
- copy gcc/testsuite/gcc.target/arm/{peep-strd-1.c => peep-strd-2.c} (58%)
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index 9c0813d598d..e3da9f77fb6 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -15926,12 +15926,23 @@ operands_ok_ldrd_strd (rtx rt, rtx rt2, rtx rn, HOST_WIDE_INT offset,
-   return true;
- }
- 
-+/* Return true if a 64-bit access with alignment ALIGN and with a
-+   constant offset OFFSET from the base pointer is permitted on this
-+   architecture.  */
-+static bool
-+align_ok_ldrd_strd (HOST_WIDE_INT align, HOST_WIDE_INT offset)
-+{
-+  return (unaligned_access
-+	  ? (align >= BITS_PER_WORD && (offset & 3) == 0)
-+	  : (align >= 2 * BITS_PER_WORD && (offset & 7) == 0));
-+}
-+
- /* Helper for gen_operands_ldrd_strd.  Returns true iff the memory
-    operand MEM's address contains an immediate offset from the base
--   register and has no side effects, in which case it sets BASE and
--   OFFSET accordingly.  */
-+   register and has no side effects, in which case it sets BASE,
-+   OFFSET and ALIGN accordingly.  */
- static bool
--mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
-+mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset, HOST_WIDE_INT *align)
- {
-   rtx addr;
- 
-@@ -15950,6 +15961,7 @@ mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
-   gcc_assert (MEM_P (mem));
- 
-   *offset = const0_rtx;
-+  *align = MEM_ALIGN (mem);
- 
-   addr = XEXP (mem, 0);
- 
-@@ -15990,7 +16002,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
-                         bool const_store, bool commute)
- {
-   int nops = 2;
--  HOST_WIDE_INT offsets[2], offset;
-+  HOST_WIDE_INT offsets[2], offset, align[2];
-   rtx base = NULL_RTX;
-   rtx cur_base, cur_offset, tmp;
-   int i, gap;
-@@ -16002,7 +16014,8 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
-      registers, and the corresponding memory offsets.  */
-   for (i = 0; i < nops; i++)
-     {
--      if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset))
-+      if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset,
-+				 &align[i]))
-         return false;
- 
-       if (i == 0)
-@@ -16114,6 +16127,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
-       /* Swap the instructions such that lower memory is accessed first.  */
-       std::swap (operands[0], operands[1]);
-       std::swap (operands[2], operands[3]);
-+      std::swap (align[0], align[1]);
-       if (const_store)
-         std::swap (operands[4], operands[5]);
-     }
-@@ -16127,6 +16141,9 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
-   if (gap != 4)
-     return false;
- 
-+  if (!align_ok_ldrd_strd (align[0], offset))
-+    return false;
-+
-   /* Make sure we generate legal instructions.  */
-   if (operands_ok_ldrd_strd (operands[0], operands[1], base, offset,
-                              false, load))
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-index eb2b86ee7b6..d49eff6b87e 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
-   *p = a;
-   return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-similarity index 63%
-copy from gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-index eb2b86ee7b6..6822c2b1454 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-@@ -1,6 +1,6 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" }  */
-+/* { dg-options "-O2 -mno-unaligned-access" }  */
- int foo(int a, int b, int* p, int *q)
- {
-   a = p[2] + p[3];
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
-   *p = a;
-   return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler-not "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-index bd330769599..fe1beac7229 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-@@ -6,4 +6,4 @@ void foo(int a, int b, int* p)
-   p[2] = a;
-   p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler "strd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-similarity index 58%
-copy from gcc/testsuite/gcc.target/arm/peep-strd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-strd-2.c
-index bd330769599..bfc5ebe9eec 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-@@ -1,9 +1,9 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" }  */
-+/* { dg-options "-O2 -mno-unaligned-access" }  */
- void foo(int a, int b, int* p)
- {
-   p[2] = a;
-   p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler-not "strd\\t" } } */
--- 
-2.15.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch
deleted file mode 100644
index 3f664c5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 22fcc126fad61a8e9ddaaabbc8036644273642dc Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 9 Nov 2017 14:34:28 +0000
-Subject: [PATCH] enable FL_LPAE flag for armv7ve cores
-
-The following commit added the FL_LPAE flag to FL_FOR_ARCH7VE, but
-neglected to also add it to the armv7ve compatible cores defined in
-arm-cores.def.
-
-  https://github.com/gcc-mirror/gcc/commit/af2d9b9e58e8be576c53d94f30c48c68146b0c98
-
-The result is that gcc 6.4 now refuses to allow -march=armv7ve and
--mcpu=XXX to be used together, even when -mcpu is set to an armv7ve
-compatible core:
-
-  arm-linux-gnueabi-gcc -march=armv7ve -mcpu=cortex-a7 -Werror ...
-  error: switch -mcpu=cortex-a7 conflicts with -march=armv7ve switch [-Werror]
-
-Fix by defining flags for armv7ve compatible cores directly from
-FL_FOR_ARCH7VE, rather than re-creating the armv7ve flags
-independently by combining FL_FOR_ARCH7A with the armv7ve specific
-FL_THUMB_DIV and FL_ARM_DIV flags.
-
-Upstream-Status: Backport
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@254584 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- gcc/config/arm/arm-cores.def | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def
-index 829b839..ca37e6f 100644
---- a/gcc/config/arm/arm-cores.def
-+++ b/gcc/config/arm/arm-cores.def
-@@ -145,12 +145,12 @@ ARM_CORE("cortex-m0plus.small-multiply",cortexm0plussmallmultiply, cortexm0plus,
- /* V7 Architecture Processors */
- ARM_CORE("generic-armv7-a",	genericv7a, genericv7a,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex)
- ARM_CORE("cortex-a5",		cortexa5, cortexa5,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a5)
--ARM_CORE("cortex-a7",		cortexa7, cortexa7,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a7)
-+ARM_CORE("cortex-a7",		cortexa7, cortexa7,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a7)
- ARM_CORE("cortex-a8",		cortexa8, cortexa8,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a8)
- ARM_CORE("cortex-a9",		cortexa9, cortexa9,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a9)
--ARM_CORE("cortex-a12",		cortexa12, cortexa17,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
--ARM_CORE("cortex-a15",		cortexa15, cortexa15,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a15)
--ARM_CORE("cortex-a17",		cortexa17, cortexa17,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
-+ARM_CORE("cortex-a12",		cortexa12, cortexa17,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
-+ARM_CORE("cortex-a15",		cortexa15, cortexa15,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a15)
-+ARM_CORE("cortex-a17",		cortexa17, cortexa17,		7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
- ARM_CORE("cortex-r4",		cortexr4, cortexr4,		7R,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7R), cortex)
- ARM_CORE("cortex-r4f",		cortexr4f, cortexr4f,		7R,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7R), cortex)
- ARM_CORE("cortex-r5",		cortexr5, cortexr5,		7R,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_ARM_DIV | FL_FOR_ARCH7R), cortex)
-@@ -162,8 +162,8 @@ ARM_CORE("cortex-m3",		cortexm3, cortexm3,		7M,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED |
- ARM_CORE("marvell-pj4",		marvell_pj4, marvell_pj4,	7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), marvell_pj4)
- 
- /* V7 big.LITTLE implementations */
--ARM_CORE("cortex-a15.cortex-a7", cortexa15cortexa7, cortexa7,	7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a15)
--ARM_CORE("cortex-a17.cortex-a7", cortexa17cortexa7, cortexa7,	7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
-+ARM_CORE("cortex-a15.cortex-a7", cortexa15cortexa7, cortexa7,	7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a15)
-+ARM_CORE("cortex-a17.cortex-a7", cortexa17cortexa7, cortexa7,	7A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
- 
- /* V8 Architecture Processors */
- ARM_CORE("cortex-a32",	cortexa32, cortexa53,	8A,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_CRC32 | FL_FOR_ARCH8A), cortex_a35)
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
deleted file mode 100644
index 00b0ffd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-From c2c7775c5587dc59b6756162d390d89d60971a16 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:27:24 +0000
-Subject: [PATCH 01/12] i386: Move struct ix86_frame to machine_function
-
-Make ix86_frame available to i386 code generation.  This is needed to
-backport the patch set of -mindirect-branch= to mitigate variant #2 of
-the speculative execution vulnerabilities on x86 processors identified
-by CVE-2017-5715, aka Spectre.
-
-	Backport from mainline
-	2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
-
-	* config/i386/i386.c (ix86_frame): Moved to ...
-	* config/i386/i386.h (ix86_frame): Here.
-	(machine_function): Add frame.
-	* config/i386/i386.c (ix86_compute_frame_layout): Repace the
-	frame argument with &cfun->machine->frame.
-	(ix86_can_use_return_insn_p): Don't pass &frame to
-	ix86_compute_frame_layout.  Copy frame from cfun->machine->frame.
-	(ix86_can_eliminate): Likewise.
-	(ix86_expand_prologue): Likewise.
-	(ix86_expand_epilogue): Likewise.
-	(ix86_expand_split_stack_prologue): Likewise.
-
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 68 ++++++++++----------------------------------------
- gcc/config/i386/i386.h | 53 ++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 65 insertions(+), 56 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 8b5faac..a1ff32b 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -2434,53 +2434,6 @@ struct GTY(()) stack_local_entry {
-   struct stack_local_entry *next;
- };
- 
--/* Structure describing stack frame layout.
--   Stack grows downward:
--
--   [arguments]
--					<- ARG_POINTER
--   saved pc
--
--   saved static chain			if ix86_static_chain_on_stack
--
--   saved frame pointer			if frame_pointer_needed
--					<- HARD_FRAME_POINTER
--   [saved regs]
--					<- regs_save_offset
--   [padding0]
--
--   [saved SSE regs]
--					<- sse_regs_save_offset
--   [padding1]          |
--		       |		<- FRAME_POINTER
--   [va_arg registers]  |
--		       |
--   [frame]	       |
--		       |
--   [padding2]	       | = to_allocate
--					<- STACK_POINTER
--  */
--struct ix86_frame
--{
--  int nsseregs;
--  int nregs;
--  int va_arg_size;
--  int red_zone_size;
--  int outgoing_arguments_size;
--
--  /* The offsets relative to ARG_POINTER.  */
--  HOST_WIDE_INT frame_pointer_offset;
--  HOST_WIDE_INT hard_frame_pointer_offset;
--  HOST_WIDE_INT stack_pointer_offset;
--  HOST_WIDE_INT hfp_save_offset;
--  HOST_WIDE_INT reg_save_offset;
--  HOST_WIDE_INT sse_reg_save_offset;
--
--  /* When save_regs_using_mov is set, emit prologue using
--     move instead of push instructions.  */
--  bool save_regs_using_mov;
--};
--
- /* Which cpu are we scheduling for.  */
- enum attr_cpu ix86_schedule;
- 
-@@ -2572,7 +2525,7 @@ static unsigned int ix86_function_arg_boundary (machine_mode,
- 						const_tree);
- static rtx ix86_static_chain (const_tree, bool);
- static int ix86_function_regparm (const_tree, const_tree);
--static void ix86_compute_frame_layout (struct ix86_frame *);
-+static void ix86_compute_frame_layout (void);
- static bool ix86_expand_vector_init_one_nonzero (bool, machine_mode,
- 						 rtx, rtx, int);
- static void ix86_add_new_builtins (HOST_WIDE_INT);
-@@ -10944,7 +10897,8 @@ ix86_can_use_return_insn_p (void)
-   if (crtl->args.pops_args && crtl->args.size >= 32768)
-     return 0;
- 
--  ix86_compute_frame_layout (&frame);
-+  ix86_compute_frame_layout ();
-+  frame = cfun->machine->frame;
-   return (frame.stack_pointer_offset == UNITS_PER_WORD
- 	  && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11355,8 +11309,8 @@ ix86_can_eliminate (const int from, const int to)
- HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
--  struct ix86_frame frame;
--  ix86_compute_frame_layout (&frame);
-+  ix86_compute_frame_layout ();
-+  struct ix86_frame frame = cfun->machine->frame;
- 
-   if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
-     return frame.hard_frame_pointer_offset;
-@@ -11395,8 +11349,9 @@ ix86_builtin_setjmp_frame_value (void)
- /* Fill structure ix86_frame about frame of currently computed function.  */
- 
- static void
--ix86_compute_frame_layout (struct ix86_frame *frame)
-+ix86_compute_frame_layout (void)
- {
-+  struct ix86_frame *frame = &cfun->machine->frame;
-   unsigned HOST_WIDE_INT stack_alignment_needed;
-   HOST_WIDE_INT offset;
-   unsigned HOST_WIDE_INT preferred_alignment;
-@@ -12702,7 +12657,8 @@ ix86_expand_prologue (void)
-   m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
-   m->fs.sp_valid = true;
- 
--  ix86_compute_frame_layout (&frame);
-+  ix86_compute_frame_layout ();
-+  frame = m->frame;
- 
-   if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
-     {
-@@ -13379,7 +13335,8 @@ ix86_expand_epilogue (int style)
-   bool using_drap;
- 
-   ix86_finalize_stack_realign_flags ();
--  ix86_compute_frame_layout (&frame);
-+  ix86_compute_frame_layout ();
-+  frame = m->frame;
- 
-   m->fs.sp_valid = (!frame_pointer_needed
- 		    || (crtl->sp_is_unchanging
-@@ -13876,7 +13833,8 @@ ix86_expand_split_stack_prologue (void)
-   gcc_assert (flag_split_stack && reload_completed);
- 
-   ix86_finalize_stack_realign_flags ();
--  ix86_compute_frame_layout (&frame);
-+  ix86_compute_frame_layout ();
-+  frame = cfun->machine->frame;
-   allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
- 
-   /* This is the label we will branch to if we have enough stack
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 8113f83..5414416 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2427,9 +2427,56 @@ enum avx_u128_state
- 
- #define FASTCALL_PREFIX '@'
- 
-+#ifndef USED_FOR_TARGET
-+/* Structure describing stack frame layout.
-+   Stack grows downward:
-+
-+   [arguments]
-+					<- ARG_POINTER
-+   saved pc
-+
-+   saved static chain			if ix86_static_chain_on_stack
-+
-+   saved frame pointer			if frame_pointer_needed
-+					<- HARD_FRAME_POINTER
-+   [saved regs]
-+					<- regs_save_offset
-+   [padding0]
-+
-+   [saved SSE regs]
-+					<- sse_regs_save_offset
-+   [padding1]          |
-+		       |		<- FRAME_POINTER
-+   [va_arg registers]  |
-+		       |
-+   [frame]	       |
-+		       |
-+   [padding2]	       | = to_allocate
-+					<- STACK_POINTER
-+  */
-+struct GTY(()) ix86_frame
-+{
-+  int nsseregs;
-+  int nregs;
-+  int va_arg_size;
-+  int red_zone_size;
-+  int outgoing_arguments_size;
-+
-+  /* The offsets relative to ARG_POINTER.  */
-+  HOST_WIDE_INT frame_pointer_offset;
-+  HOST_WIDE_INT hard_frame_pointer_offset;
-+  HOST_WIDE_INT stack_pointer_offset;
-+  HOST_WIDE_INT hfp_save_offset;
-+  HOST_WIDE_INT reg_save_offset;
-+  HOST_WIDE_INT sse_reg_save_offset;
-+
-+  /* When save_regs_using_mov is set, emit prologue using
-+     move instead of push instructions.  */
-+  bool save_regs_using_mov;
-+};
-+
- /* Machine specific frame tracking during prologue/epilogue generation.  */
- 
--#ifndef USED_FOR_TARGET
- struct GTY(()) machine_frame_state
- {
-   /* This pair tracks the currently active CFA as reg+offset.  When reg
-@@ -2475,6 +2522,9 @@ struct GTY(()) machine_function {
-   int varargs_fpr_size;
-   int optimize_mode_switching[MAX_386_ENTITIES];
- 
-+  /* Cached initial frame layout for the current function.  */
-+  struct ix86_frame frame;
-+
-   /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE
-      has been computed for.  */
-   int use_fast_prologue_epilogue_nregs;
-@@ -2554,6 +2604,7 @@ struct GTY(()) machine_function {
- #define ix86_current_function_calls_tls_descriptor \
-   (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG))
- #define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack)
-+#define ix86_red_zone_size (cfun->machine->frame.red_zone_size)
- 
- /* Control behavior of x86_file_start.  */
- #define X86_FILE_START_VERSION_DIRECTIVE false
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
deleted file mode 100644
index df65b08..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From fe2b3be3f4b6ec6b3a6f89c26016a3983b7cb351 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:28:44 +0000
-Subject: [PATCH 02/12] i386: Use reference of struct ix86_frame to avoid copy
-
-When there is no need to make a copy of ix86_frame, we can use reference
-of struct ix86_frame to avoid copy.
-
-	Backport from mainline
-	2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
-	of struct ix86_frame.
-	(ix86_initial_elimination_offset): Likewise.
-	(ix86_expand_split_stack_prologue): Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index a1ff32b..13ebf10 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -10887,7 +10887,6 @@ symbolic_reference_mentioned_p (rtx op)
- bool
- ix86_can_use_return_insn_p (void)
- {
--  struct ix86_frame frame;
- 
-   if (! reload_completed || frame_pointer_needed)
-     return 0;
-@@ -10898,7 +10897,7 @@ ix86_can_use_return_insn_p (void)
-     return 0;
- 
-   ix86_compute_frame_layout ();
--  frame = cfun->machine->frame;
-+  struct ix86_frame &frame = cfun->machine->frame;
-   return (frame.stack_pointer_offset == UNITS_PER_WORD
- 	  && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11310,7 +11309,7 @@ HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
-   ix86_compute_frame_layout ();
--  struct ix86_frame frame = cfun->machine->frame;
-+  struct ix86_frame &frame = cfun->machine->frame;
- 
-   if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
-     return frame.hard_frame_pointer_offset;
-@@ -13821,7 +13820,6 @@ static GTY(()) rtx split_stack_fn_large;
- void
- ix86_expand_split_stack_prologue (void)
- {
--  struct ix86_frame frame;
-   HOST_WIDE_INT allocate;
-   unsigned HOST_WIDE_INT args_size;
-   rtx_code_label *label;
-@@ -13834,7 +13832,7 @@ ix86_expand_split_stack_prologue (void)
- 
-   ix86_finalize_stack_realign_flags ();
-   ix86_compute_frame_layout ();
--  frame = cfun->machine->frame;
-+  struct ix86_frame &frame = cfun->machine->frame;
-   allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
- 
-   /* This is the label we will branch to if we have enough stack
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
deleted file mode 100644
index a5ffd85..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 82243732dc63e9b90396a5ae4ad99ca36af81355 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 27 Jan 2018 13:10:24 +0000
-Subject: [PATCH 03/12] i386: Use const reference of struct ix86_frame to avoid
- copy
-
-We can use const reference of struct ix86_frame to avoid making a local
-copy of ix86_frame.  ix86_expand_epilogue makes a local copy of struct
-ix86_frame and uses the reg_save_offset field as a local variable.  This
-patch uses a separate local variable for reg_save_offset.
-
-Tested on x86-64 with ada.
-
-	Backport from mainline
-	PR target/83905
-	* config/i386/i386.c (ix86_expand_prologue): Use cost reference
-	of struct ix86_frame.
-	(ix86_expand_epilogue): Likewise.  Add a local variable for
-	the reg_save_offset field in struct ix86_frame.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257123 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 13ebf10..6c98f75 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -12633,7 +12633,6 @@ ix86_expand_prologue (void)
- {
-   struct machine_function *m = cfun->machine;
-   rtx insn, t;
--  struct ix86_frame frame;
-   HOST_WIDE_INT allocate;
-   bool int_registers_saved;
-   bool sse_registers_saved;
-@@ -12657,7 +12656,7 @@ ix86_expand_prologue (void)
-   m->fs.sp_valid = true;
- 
-   ix86_compute_frame_layout ();
--  frame = m->frame;
-+  const struct ix86_frame &frame = cfun->machine->frame;
- 
-   if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
-     {
-@@ -13329,13 +13328,12 @@ ix86_expand_epilogue (int style)
- {
-   struct machine_function *m = cfun->machine;
-   struct machine_frame_state frame_state_save = m->fs;
--  struct ix86_frame frame;
-   bool restore_regs_via_mov;
-   bool using_drap;
- 
-   ix86_finalize_stack_realign_flags ();
-   ix86_compute_frame_layout ();
--  frame = m->frame;
-+  const struct ix86_frame &frame = cfun->machine->frame;
- 
-   m->fs.sp_valid = (!frame_pointer_needed
- 		    || (crtl->sp_is_unchanging
-@@ -13377,11 +13375,13 @@ ix86_expand_epilogue (int style)
- 				  + UNITS_PER_WORD);
-     }
- 
-+  HOST_WIDE_INT reg_save_offset = frame.reg_save_offset;
-+
-   /* Special care must be taken for the normal return case of a function
-      using eh_return: the eax and edx registers are marked as saved, but
-      not restored along this path.  Adjust the save location to match.  */
-   if (crtl->calls_eh_return && style != 2)
--    frame.reg_save_offset -= 2 * UNITS_PER_WORD;
-+    reg_save_offset -= 2 * UNITS_PER_WORD;
- 
-   /* EH_RETURN requires the use of moves to function properly.  */
-   if (crtl->calls_eh_return)
-@@ -13397,11 +13397,11 @@ ix86_expand_epilogue (int style)
-   else if (TARGET_EPILOGUE_USING_MOVE
- 	   && cfun->machine->use_fast_prologue_epilogue
- 	   && (frame.nregs > 1
--	       || m->fs.sp_offset != frame.reg_save_offset))
-+	       || m->fs.sp_offset != reg_save_offset))
-     restore_regs_via_mov = true;
-   else if (frame_pointer_needed
- 	   && !frame.nregs
--	   && m->fs.sp_offset != frame.reg_save_offset)
-+	   && m->fs.sp_offset != reg_save_offset)
-     restore_regs_via_mov = true;
-   else if (frame_pointer_needed
- 	   && TARGET_USE_LEAVE
-@@ -13439,7 +13439,7 @@ ix86_expand_epilogue (int style)
-       rtx t;
- 
-       if (frame.nregs)
--	ix86_emit_restore_regs_using_mov (frame.reg_save_offset, style == 2);
-+	ix86_emit_restore_regs_using_mov (reg_save_offset, style == 2);
- 
-       /* eh_return epilogues need %ecx added to the stack pointer.  */
-       if (style == 2)
-@@ -13529,19 +13529,19 @@ ix86_expand_epilogue (int style)
- 	 epilogues.  */
-       if (!m->fs.sp_valid
-  	  || (TARGET_SEH
--	      && (m->fs.sp_offset - frame.reg_save_offset
-+	      && (m->fs.sp_offset - reg_save_offset
- 		  >= SEH_MAX_FRAME_SIZE)))
- 	{
- 	  pro_epilogue_adjust_stack (stack_pointer_rtx, hard_frame_pointer_rtx,
- 				     GEN_INT (m->fs.fp_offset
--					      - frame.reg_save_offset),
-+					      - reg_save_offset),
- 				     style, false);
- 	}
--      else if (m->fs.sp_offset != frame.reg_save_offset)
-+      else if (m->fs.sp_offset != reg_save_offset)
- 	{
- 	  pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx,
- 				     GEN_INT (m->fs.sp_offset
--					      - frame.reg_save_offset),
-+					      - reg_save_offset),
- 				     style,
- 				     m->fs.cfa_reg == stack_pointer_rtx);
- 	}
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch
deleted file mode 100644
index a9d6e5f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch
+++ /dev/null
@@ -1,2154 +0,0 @@
-From 6140c2c0bb2b61e69d0da84315e0433ff3520aaa Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:55 -0800
-Subject: [PATCH 04/12] x86: Add -mindirect-branch=
-
-Add -mindirect-branch= option to convert indirect call and jump to call
-and return thunks.  The default is 'keep', which keeps indirect call and
-jump unmodified.  'thunk' converts indirect call and jump to call and
-return thunk.  'thunk-inline' converts indirect call and jump to inlined
-call and return thunk.  'thunk-extern' converts indirect call and jump to
-external call and return thunk provided in a separate object file.  You
-can control this behavior for a specific function by using the function
-attribute indirect_branch.
-
-2 kinds of thunks are geneated.  Memory thunk where the function address
-is at the top of the stack:
-
-__x86_indirect_thunk:
-	call L2
-L1:
-	pause
-	lfence
-	jmp L1
-L2:
-	lea 8(%rsp), %rsp|lea 4(%esp), %esp
-	ret
-
-Indirect jmp via memory, "jmp mem", is converted to
-
-	push memory
-	jmp __x86_indirect_thunk
-
-Indirect call via memory, "call mem", is converted to
-
-	jmp L2
-L1:
-	push [mem]
-	jmp __x86_indirect_thunk
-L2:
-	call L1
-
-Register thunk where the function address is in a register, reg:
-
-__x86_indirect_thunk_reg:
-	call	L2
-L1:
-	pause
-	lfence
-	jmp	L1
-L2:
-	movq	%reg, (%rsp)|movl    %reg, (%esp)
-	ret
-
-where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
-(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
-
-Indirect jmp via register, "jmp reg", is converted to
-
-	jmp __x86_indirect_thunk_reg
-
-Indirect call via register, "call reg", is converted to
-
-	call __x86_indirect_thunk_reg
-
-gcc/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/i386-opts.h (indirect_branch): New.
-	* config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
-	* config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
-	with local indirect jump when converting indirect call and jump.
-	(ix86_set_indirect_branch_type): New.
-	(ix86_set_current_function): Call ix86_set_indirect_branch_type.
-	(indirectlabelno): New.
-	(indirect_thunk_needed): Likewise.
-	(indirect_thunk_bnd_needed): Likewise.
-	(indirect_thunks_used): Likewise.
-	(indirect_thunks_bnd_used): Likewise.
-	(INDIRECT_LABEL): Likewise.
-	(indirect_thunk_name): Likewise.
-	(output_indirect_thunk): Likewise.
-	(output_indirect_thunk_function): Likewise.
-	(ix86_output_indirect_branch_via_reg): Likewise.
-	(ix86_output_indirect_branch_via_push): Likewise.
-	(ix86_output_indirect_branch): Likewise.
-	(ix86_output_indirect_jmp): Likewise.
-	(ix86_code_end): Call output_indirect_thunk_function if needed.
-	(ix86_output_call_insn): Call ix86_output_indirect_branch if
-	needed.
-	(ix86_handle_fndecl_attribute): Handle indirect_branch.
-	(ix86_attribute_table): Add indirect_branch.
-	* config/i386/i386.h (machine_function): Add indirect_branch_type
-	and has_local_indirect_jump.
-	* config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
-	to true.
-	(tablejump): Likewise.
-	(*indirect_jump): Use ix86_output_indirect_jmp.
-	(*tablejump_1): Likewise.
-	(simple_return_indirect_internal): Likewise.
-	* config/i386/i386.opt (mindirect-branch=): New option.
-	(indirect_branch): New.
-	(keep): Likewise.
-	(thunk): Likewise.
-	(thunk-inline): Likewise.
-	(thunk-extern): Likewise.
-	* doc/extend.texi: Document indirect_branch function attribute.
-	* doc/invoke.texi: Document -mindirect-branch= option.
-
-gcc/testsuite/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* gcc.target/i386/indirect-thunk-1.c: New test.
-	* gcc.target/i386/indirect-thunk-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-opts.h                        |  13 +
- gcc/config/i386/i386-protos.h                      |   1 +
- gcc/config/i386/i386.c                             | 639 ++++++++++++++++++++-
- gcc/config/i386/i386.h                             |   7 +
- gcc/config/i386/i386.md                            |  26 +-
- gcc/config/i386/i386.opt                           |  20 +
- gcc/doc/extend.texi                                |  10 +
- gcc/doc/invoke.texi                                |  13 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c   |  20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c   |  20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c   |  21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c   |  21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c   |  17 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c   |  18 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c   |  44 ++
- .../gcc.target/i386/indirect-thunk-attr-1.c        |  23 +
- .../gcc.target/i386/indirect-thunk-attr-2.c        |  21 +
- .../gcc.target/i386/indirect-thunk-attr-3.c        |  23 +
- .../gcc.target/i386/indirect-thunk-attr-4.c        |  22 +
- .../gcc.target/i386/indirect-thunk-attr-5.c        |  22 +
- .../gcc.target/i386/indirect-thunk-attr-6.c        |  21 +
- .../gcc.target/i386/indirect-thunk-attr-7.c        |  44 ++
- .../gcc.target/i386/indirect-thunk-attr-8.c        |  42 ++
- .../gcc.target/i386/indirect-thunk-bnd-1.c         |  20 +
- .../gcc.target/i386/indirect-thunk-bnd-2.c         |  21 +
- .../gcc.target/i386/indirect-thunk-bnd-3.c         |  19 +
- .../gcc.target/i386/indirect-thunk-bnd-4.c         |  20 +
- .../gcc.target/i386/indirect-thunk-extern-1.c      |  19 +
- .../gcc.target/i386/indirect-thunk-extern-2.c      |  19 +
- .../gcc.target/i386/indirect-thunk-extern-3.c      |  20 +
- .../gcc.target/i386/indirect-thunk-extern-4.c      |  20 +
- .../gcc.target/i386/indirect-thunk-extern-5.c      |  16 +
- .../gcc.target/i386/indirect-thunk-extern-6.c      |  17 +
- .../gcc.target/i386/indirect-thunk-extern-7.c      |  43 ++
- .../gcc.target/i386/indirect-thunk-inline-1.c      |  20 +
- .../gcc.target/i386/indirect-thunk-inline-2.c      |  20 +
- .../gcc.target/i386/indirect-thunk-inline-3.c      |  21 +
- .../gcc.target/i386/indirect-thunk-inline-4.c      |  21 +
- .../gcc.target/i386/indirect-thunk-inline-5.c      |  17 +
- .../gcc.target/i386/indirect-thunk-inline-6.c      |  18 +
- .../gcc.target/i386/indirect-thunk-inline-7.c      |  44 ++
- 41 files changed, 1486 insertions(+), 17 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-
-diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h
-index b7f92e3..cc21152 100644
---- a/gcc/config/i386/i386-opts.h
-+++ b/gcc/config/i386/i386-opts.h
-@@ -99,4 +99,17 @@ enum stack_protector_guard {
-   SSP_GLOBAL    /* global canary */
- };
- 
-+/* This is used to mitigate variant #2 of the speculative execution
-+   vulnerabilities on x86 processors identified by CVE-2017-5715, aka
-+   Spectre.  They convert indirect branches and function returns to
-+   call and return thunks to avoid speculative execution via indirect
-+   call, jmp and ret.  */
-+enum indirect_branch {
-+  indirect_branch_unset = 0,
-+  indirect_branch_keep,
-+  indirect_branch_thunk,
-+  indirect_branch_thunk_inline,
-+  indirect_branch_thunk_extern
-+};
-+
- #endif
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index ff47bc1..eca4cbf 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,6 +311,7 @@ extern enum attr_cpu ix86_schedule;
- #endif
- 
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
-+extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- 						enum machine_mode mode);
- 
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 6c98f75..0b9fc4d 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -3662,12 +3662,23 @@ make_pass_stv (gcc::context *ctxt)
-   return new pass_stv (ctxt);
- }
- 
--/* Return true if a red-zone is in use.  */
-+/* Return true if a red-zone is in use.  We can't use red-zone when
-+   there are local indirect jumps, like "indirect_jump" or "tablejump",
-+   which jumps to another place in the function, since "call" in the
-+   indirect thunk pushes the return address onto stack, destroying
-+   red-zone.
-+
-+   TODO: If we can reserve the first 2 WORDs, for PUSH and, another
-+   for CALL, in red-zone, we can allow local indirect jumps with
-+   indirect thunk.  */
- 
- bool
- ix86_using_red_zone (void)
- {
--  return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
-+  return (TARGET_RED_ZONE
-+	  && !TARGET_64BIT_MS_ABI
-+	  && (!cfun->machine->has_local_indirect_jump
-+	      || cfun->machine->indirect_branch_type == indirect_branch_keep));
- }
- 
- /* Return a string that documents the current -m options.  The caller is
-@@ -6350,6 +6361,37 @@ ix86_reset_previous_fndecl (void)
-   ix86_previous_fndecl = NULL_TREE;
- }
- 
-+/* Set the indirect_branch_type field from the function FNDECL.  */
-+
-+static void
-+ix86_set_indirect_branch_type (tree fndecl)
-+{
-+  if (cfun->machine->indirect_branch_type == indirect_branch_unset)
-+    {
-+      tree attr = lookup_attribute ("indirect_branch",
-+				    DECL_ATTRIBUTES (fndecl));
-+      if (attr != NULL)
-+	{
-+	  tree args = TREE_VALUE (attr);
-+	  if (args == NULL)
-+	    gcc_unreachable ();
-+	  tree cst = TREE_VALUE (args);
-+	  if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+	    cfun->machine->indirect_branch_type = indirect_branch_keep;
-+	  else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+	    cfun->machine->indirect_branch_type = indirect_branch_thunk;
-+	  else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+	    cfun->machine->indirect_branch_type = indirect_branch_thunk_inline;
-+	  else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+	    cfun->machine->indirect_branch_type = indirect_branch_thunk_extern;
-+	  else
-+	    gcc_unreachable ();
-+	}
-+      else
-+	cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+    }
-+}
-+
- /* Establish appropriate back-end context for processing the function
-    FNDECL.  The argument might be NULL to indicate processing at top
-    level, outside of any function scope.  */
-@@ -6360,7 +6402,13 @@ ix86_set_current_function (tree fndecl)
-      several times in the course of compiling a function, and we don't want to
-      slow things down too much or call target_reinit when it isn't safe.  */
-   if (fndecl == ix86_previous_fndecl)
--    return;
-+    {
-+      /* There may be 2 function bodies for the same function FNDECL,
-+	 one is extern inline and one isn't.  */
-+      if (fndecl != NULL_TREE)
-+	ix86_set_indirect_branch_type (fndecl);
-+      return;
-+    }
- 
-   tree old_tree;
-   if (ix86_previous_fndecl == NULL_TREE)
-@@ -6377,6 +6425,8 @@ ix86_set_current_function (tree fndecl)
-       return;
-     }
- 
-+  ix86_set_indirect_branch_type (fndecl);
-+
-   tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
-   if (new_tree == NULL_TREE)
-     new_tree = target_option_default_node;
-@@ -10962,6 +11012,220 @@ ix86_setup_frame_addresses (void)
- # endif
- #endif
- 
-+/* Label count for call and return thunks.  It is used to make unique
-+   labels in call and return thunks.  */
-+static int indirectlabelno;
-+
-+/* True if call and return thunk functions are needed.  */
-+static bool indirect_thunk_needed = false;
-+/* True if call and return thunk functions with the BND prefix are
-+   needed.  */
-+static bool indirect_thunk_bnd_needed = false;
-+
-+/* Bit masks of integer registers, which contain branch target, used
-+   by call and return thunks functions.  */
-+static int indirect_thunks_used;
-+/* Bit masks of integer registers, which contain branch target, used
-+   by call and return thunks functions with the BND prefix.  */
-+static int indirect_thunks_bnd_used;
-+
-+#ifndef INDIRECT_LABEL
-+# define INDIRECT_LABEL "LIND"
-+#endif
-+
-+/* Fills in the label name that should be used for the indirect thunk.  */
-+
-+static void
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+{
-+  if (USE_HIDDEN_LINKONCE)
-+    {
-+      const char *bnd = need_bnd_p ? "_bnd" : "";
-+      if (regno >= 0)
-+	{
-+	  const char *reg_prefix;
-+	  if (LEGACY_INT_REGNO_P (regno))
-+	    reg_prefix = TARGET_64BIT ? "r" : "e";
-+	  else
-+	    reg_prefix = "";
-+	  sprintf (name, "__x86_indirect_thunk%s_%s%s",
-+		   bnd, reg_prefix, reg_names[regno]);
-+	}
-+      else
-+	sprintf (name, "__x86_indirect_thunk%s", bnd);
-+    }
-+  else
-+    {
-+      if (regno >= 0)
-+	{
-+	  if (need_bnd_p)
-+	    ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-+	  else
-+	    ASM_GENERATE_INTERNAL_LABEL (name, "LITR", regno);
-+	}
-+      else
-+	{
-+	  if (need_bnd_p)
-+	    ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+	  else
-+	    ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+	}
-+    }
-+}
-+
-+/* Output a call and return thunk for indirect branch.  If BND_P is
-+   true, the BND prefix is needed.   If REGNO != -1,  the function
-+   address is in REGNO and the call and return thunk looks like:
-+
-+	call	L2
-+   L1:
-+	pause
-+	jmp	L1
-+   L2:
-+	mov	%REG, (%sp)
-+	ret
-+
-+   Otherwise, the function address is on the top of stack and the
-+   call and return thunk looks like:
-+
-+	call L2
-+  L1:
-+	pause
-+	jmp L1
-+  L2:
-+	lea WORD_SIZE(%sp), %sp
-+	ret
-+ */
-+
-+static void
-+output_indirect_thunk (bool need_bnd_p, int regno)
-+{
-+  char indirectlabel1[32];
-+  char indirectlabel2[32];
-+
-+  ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, INDIRECT_LABEL,
-+			       indirectlabelno++);
-+  ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, INDIRECT_LABEL,
-+			       indirectlabelno++);
-+
-+  /* Call */
-+  if (need_bnd_p)
-+    fputs ("\tbnd call\t", asm_out_file);
-+  else
-+    fputs ("\tcall\t", asm_out_file);
-+  assemble_name_raw (asm_out_file, indirectlabel2);
-+  fputc ('\n', asm_out_file);
-+
-+  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+  /* Pause + lfence.  */
-+  fprintf (asm_out_file, "\tpause\n\tlfence\n");
-+
-+  /* Jump.  */
-+  fputs ("\tjmp\t", asm_out_file);
-+  assemble_name_raw (asm_out_file, indirectlabel1);
-+  fputc ('\n', asm_out_file);
-+
-+  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+  if (regno >= 0)
-+    {
-+      /* MOV.  */
-+      rtx xops[2];
-+      xops[0] = gen_rtx_MEM (word_mode, stack_pointer_rtx);
-+      xops[1] = gen_rtx_REG (word_mode, regno);
-+      output_asm_insn ("mov\t{%1, %0|%0, %1}", xops);
-+    }
-+  else
-+    {
-+      /* LEA.  */
-+      rtx xops[2];
-+      xops[0] = stack_pointer_rtx;
-+      xops[1] = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+      output_asm_insn ("lea\t{%E1, %0|%0, %E1}", xops);
-+    }
-+
-+  if (need_bnd_p)
-+    fputs ("\tbnd ret\n", asm_out_file);
-+  else
-+    fputs ("\tret\n", asm_out_file);
-+}
-+
-+/* Output a funtion with a call and return thunk for indirect branch.
-+   If BND_P is true, the BND prefix is needed.   If REGNO != -1,  the
-+   function address is in REGNO.  Otherwise, the function address is
-+   on the top of stack.  */
-+
-+static void
-+output_indirect_thunk_function (bool need_bnd_p, int regno)
-+{
-+  char name[32];
-+  tree decl;
-+
-+  /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd.  */
-+  indirect_thunk_name (name, regno, need_bnd_p);
-+  decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
-+		     get_identifier (name),
-+		     build_function_type_list (void_type_node, NULL_TREE));
-+  DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
-+				   NULL_TREE, void_type_node);
-+  TREE_PUBLIC (decl) = 1;
-+  TREE_STATIC (decl) = 1;
-+  DECL_IGNORED_P (decl) = 1;
-+
-+#if TARGET_MACHO
-+  if (TARGET_MACHO)
-+    {
-+      switch_to_section (darwin_sections[picbase_thunk_section]);
-+      fputs ("\t.weak_definition\t", asm_out_file);
-+      assemble_name (asm_out_file, name);
-+      fputs ("\n\t.private_extern\t", asm_out_file);
-+      assemble_name (asm_out_file, name);
-+      putc ('\n', asm_out_file);
-+      ASM_OUTPUT_LABEL (asm_out_file, name);
-+      DECL_WEAK (decl) = 1;
-+    }
-+  else
-+#endif
-+    if (USE_HIDDEN_LINKONCE)
-+      {
-+	cgraph_node::create (decl)->set_comdat_group (DECL_ASSEMBLER_NAME (decl));
-+
-+	targetm.asm_out.unique_section (decl, 0);
-+	switch_to_section (get_named_section (decl, NULL, 0));
-+
-+	targetm.asm_out.globalize_label (asm_out_file, name);
-+	fputs ("\t.hidden\t", asm_out_file);
-+	assemble_name (asm_out_file, name);
-+	putc ('\n', asm_out_file);
-+	ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl);
-+      }
-+    else
-+      {
-+	switch_to_section (text_section);
-+	ASM_OUTPUT_LABEL (asm_out_file, name);
-+      }
-+
-+  DECL_INITIAL (decl) = make_node (BLOCK);
-+  current_function_decl = decl;
-+  allocate_struct_function (decl, false);
-+  init_function_start (decl);
-+  /* We're about to hide the function body from callees of final_* by
-+     emitting it directly; tell them we're a thunk, if they care.  */
-+  cfun->is_thunk = true;
-+  first_function_block_is_cold = false;
-+  /* Make sure unwind info is emitted for the thunk if needed.  */
-+  final_start_function (emit_barrier (), asm_out_file, 1);
-+
-+  output_indirect_thunk (need_bnd_p, regno);
-+
-+  final_end_function ();
-+  init_insn_lengths ();
-+  free_after_compilation (cfun);
-+  set_cfun (NULL);
-+  current_function_decl = NULL;
-+}
-+
- static int pic_labels_used;
- 
- /* Fills in the label name that should be used for a pc thunk for
-@@ -10988,11 +11252,32 @@ ix86_code_end (void)
-   rtx xops[2];
-   int regno;
- 
-+  if (indirect_thunk_needed)
-+    output_indirect_thunk_function (false, -1);
-+  if (indirect_thunk_bnd_needed)
-+    output_indirect_thunk_function (true, -1);
-+
-+  for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
-+    {
-+      int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+      if ((indirect_thunks_used & (1 << i)))
-+	output_indirect_thunk_function (false, regno);
-+
-+      if ((indirect_thunks_bnd_used & (1 << i)))
-+	output_indirect_thunk_function (true, regno);
-+    }
-+
-   for (regno = AX_REG; regno <= SP_REG; regno++)
-     {
-       char name[32];
-       tree decl;
- 
-+      if ((indirect_thunks_used & (1 << regno)))
-+	output_indirect_thunk_function (false, regno);
-+
-+      if ((indirect_thunks_bnd_used & (1 << regno)))
-+	output_indirect_thunk_function (true, regno);
-+
-       if (!(pic_labels_used & (1 << regno)))
- 	continue;
- 
-@@ -27369,12 +27654,292 @@ ix86_nopic_noplt_attribute_p (rtx call_op)
-   return false;
- }
- 
-+/* Output indirect branch via a call and return thunk.  CALL_OP is a
-+   register which contains the branch target.  XASM is the assembly
-+   template for CALL_OP.  Branch is a tail call if SIBCALL_P is true.
-+   A normal call is converted to:
-+
-+	call __x86_indirect_thunk_reg
-+
-+   and a tail call is converted to:
-+
-+	jmp __x86_indirect_thunk_reg
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
-+{
-+  char thunk_name_buf[32];
-+  char *thunk_name;
-+  bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+  int regno = REGNO (call_op);
-+
-+  if (cfun->machine->indirect_branch_type
-+      != indirect_branch_thunk_inline)
-+    {
-+      if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+	{
-+	  int i = regno;
-+	  if (i >= FIRST_REX_INT_REG)
-+	    i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1);
-+	  if (need_bnd_p)
-+	    indirect_thunks_bnd_used |= 1 << i;
-+	  else
-+	    indirect_thunks_used |= 1 << i;
-+	}
-+      indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+      thunk_name = thunk_name_buf;
-+    }
-+  else
-+    thunk_name = NULL;
-+
-+  if (sibcall_p)
-+    {
-+      if (thunk_name != NULL)
-+	{
-+	  if (need_bnd_p)
-+	    fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+	  else
-+	    fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+	}
-+      else
-+	output_indirect_thunk (need_bnd_p, regno);
-+    }
-+  else
-+    {
-+      if (thunk_name != NULL)
-+	{
-+	  if (need_bnd_p)
-+	    fprintf (asm_out_file, "\tbnd call\t%s\n", thunk_name);
-+	  else
-+	    fprintf (asm_out_file, "\tcall\t%s\n", thunk_name);
-+	  return;
-+	}
-+
-+      char indirectlabel1[32];
-+      char indirectlabel2[32];
-+
-+      ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+				   INDIRECT_LABEL,
-+				   indirectlabelno++);
-+      ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+				   INDIRECT_LABEL,
-+				   indirectlabelno++);
-+
-+      /* Jump.  */
-+      if (need_bnd_p)
-+	fputs ("\tbnd jmp\t", asm_out_file);
-+      else
-+	fputs ("\tjmp\t", asm_out_file);
-+      assemble_name_raw (asm_out_file, indirectlabel2);
-+      fputc ('\n', asm_out_file);
-+
-+      ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+      if (thunk_name != NULL)
-+	{
-+	  if (need_bnd_p)
-+	    fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+	  else
-+	    fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+	}
-+      else
-+	output_indirect_thunk (need_bnd_p, regno);
-+
-+      ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+      /* Call.  */
-+      if (need_bnd_p)
-+	fputs ("\tbnd call\t", asm_out_file);
-+      else
-+	fputs ("\tcall\t", asm_out_file);
-+      assemble_name_raw (asm_out_file, indirectlabel1);
-+      fputc ('\n', asm_out_file);
-+    }
-+}
-+
-+/* Output indirect branch via a call and return thunk.  CALL_OP is
-+   the branch target.  XASM is the assembly template for CALL_OP.
-+   Branch is a tail call if SIBCALL_P is true.  A normal call is
-+   converted to:
-+
-+	jmp L2
-+   L1:
-+	push CALL_OP
-+	jmp __x86_indirect_thunk
-+   L2:
-+	call L1
-+
-+   and a tail call is converted to:
-+
-+	push CALL_OP
-+	jmp __x86_indirect_thunk
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
-+				      bool sibcall_p)
-+{
-+  char thunk_name_buf[32];
-+  char *thunk_name;
-+  char push_buf[64];
-+  bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+  int regno = -1;
-+
-+  if (cfun->machine->indirect_branch_type
-+      != indirect_branch_thunk_inline)
-+    {
-+      if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+	{
-+	  if (need_bnd_p)
-+	    indirect_thunk_bnd_needed = true;
-+	  else
-+	    indirect_thunk_needed = true;
-+	}
-+      indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+      thunk_name = thunk_name_buf;
-+    }
-+  else
-+    thunk_name = NULL;
-+
-+  snprintf (push_buf, sizeof (push_buf), "push{%c}\t%s",
-+	    TARGET_64BIT ? 'q' : 'l', xasm);
-+
-+  if (sibcall_p)
-+    {
-+      output_asm_insn (push_buf, &call_op);
-+      if (thunk_name != NULL)
-+	{
-+	  if (need_bnd_p)
-+	    fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+	  else
-+	    fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+	}
-+      else
-+	output_indirect_thunk (need_bnd_p, regno);
-+    }
-+  else
-+    {
-+      char indirectlabel1[32];
-+      char indirectlabel2[32];
-+
-+      ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+				   INDIRECT_LABEL,
-+				   indirectlabelno++);
-+      ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+				   INDIRECT_LABEL,
-+				   indirectlabelno++);
-+
-+      /* Jump.  */
-+      if (need_bnd_p)
-+	fputs ("\tbnd jmp\t", asm_out_file);
-+      else
-+	fputs ("\tjmp\t", asm_out_file);
-+      assemble_name_raw (asm_out_file, indirectlabel2);
-+      fputc ('\n', asm_out_file);
-+
-+      ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+      /* An external function may be called via GOT, instead of PLT.  */
-+      if (MEM_P (call_op))
-+	{
-+	  struct ix86_address parts;
-+	  rtx addr = XEXP (call_op, 0);
-+	  if (ix86_decompose_address (addr, &parts)
-+	      && parts.base == stack_pointer_rtx)
-+	    {
-+	      /* Since call will adjust stack by -UNITS_PER_WORD,
-+		 we must convert "disp(stack, index, scale)" to
-+		 "disp+UNITS_PER_WORD(stack, index, scale)".  */
-+	      if (parts.index)
-+		{
-+		  addr = gen_rtx_MULT (Pmode, parts.index,
-+				       GEN_INT (parts.scale));
-+		  addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
-+				       addr);
-+		}
-+	      else
-+		addr = stack_pointer_rtx;
-+
-+	      rtx disp;
-+	      if (parts.disp != NULL_RTX)
-+		disp = plus_constant (Pmode, parts.disp,
-+				      UNITS_PER_WORD);
-+	      else
-+		disp = GEN_INT (UNITS_PER_WORD);
-+
-+	      addr = gen_rtx_PLUS (Pmode, addr, disp);
-+	      call_op = gen_rtx_MEM (GET_MODE (call_op), addr);
-+	    }
-+	}
-+
-+      output_asm_insn (push_buf, &call_op);
-+
-+      if (thunk_name != NULL)
-+	{
-+	  if (need_bnd_p)
-+	    fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+	  else
-+	    fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+	}
-+      else
-+	output_indirect_thunk (need_bnd_p, regno);
-+
-+      ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+      /* Call.  */
-+      if (need_bnd_p)
-+	fputs ("\tbnd call\t", asm_out_file);
-+      else
-+	fputs ("\tcall\t", asm_out_file);
-+      assemble_name_raw (asm_out_file, indirectlabel1);
-+      fputc ('\n', asm_out_file);
-+    }
-+}
-+
-+/* Output indirect branch via a call and return thunk.  CALL_OP is
-+   the branch target.  XASM is the assembly template for CALL_OP.
-+   Branch is a tail call if SIBCALL_P is true.   */
-+
-+static void
-+ix86_output_indirect_branch (rtx call_op, const char *xasm,
-+			     bool sibcall_p)
-+{
-+  if (REG_P (call_op))
-+    ix86_output_indirect_branch_via_reg (call_op, sibcall_p);
-+  else
-+    ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
-+}
-+/* Output indirect jump.  CALL_OP is the jump target.  Jump is a
-+   function return if RET_P is true.  */
-+
-+const char *
-+ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+{
-+  if (cfun->machine->indirect_branch_type != indirect_branch_keep)
-+    {
-+      /* We can't have red-zone if this isn't a function return since
-+	 "call" in the indirect thunk pushes the return address onto
-+	 stack, destroying red-zone.  */
-+      if (!ret_p && ix86_red_zone_size != 0)
-+	gcc_unreachable ();
-+
-+      ix86_output_indirect_branch (call_op, "%0", true);
-+      return "";
-+    }
-+  else
-+    return "%!jmp\t%A0";
-+}
-+
- /* Output the assembly for a call instruction.  */
- 
- const char *
- ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- {
-   bool direct_p = constant_call_address_operand (call_op, VOIDmode);
-+  bool output_indirect_p
-+    = (!TARGET_SEH
-+       && cfun->machine->indirect_branch_type != indirect_branch_keep);
-   bool seh_nop_p = false;
-   const char *xasm;
- 
-@@ -27383,7 +27948,13 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
-       if (direct_p)
- 	{
- 	  if (ix86_nopic_noplt_attribute_p (call_op))
--	    xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+	    {
-+	      direct_p = false;
-+	      if (output_indirect_p)
-+		xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+	      else
-+		xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+	    }
- 	  else
- 	    xasm = "%!jmp\t%P0";
- 	}
-@@ -27392,9 +27963,17 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
-       else if (TARGET_SEH)
- 	xasm = "%!rex.W jmp\t%A0";
-       else
--	xasm = "%!jmp\t%A0";
-+	{
-+	  if (output_indirect_p)
-+	    xasm = "%0";
-+	  else
-+	    xasm = "%!jmp\t%A0";
-+	}
- 
--      output_asm_insn (xasm, &call_op);
-+      if (output_indirect_p && !direct_p)
-+	ix86_output_indirect_branch (call_op, xasm, true);
-+      else
-+	output_asm_insn (xasm, &call_op);
-       return "";
-     }
- 
-@@ -27431,14 +28010,28 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
-   if (direct_p)
-     {
-       if (ix86_nopic_noplt_attribute_p (call_op))
--	xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+	{
-+	  direct_p = false;
-+	  if (output_indirect_p)
-+	    xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+	  else
-+	    xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+	}
-       else
- 	xasm = "%!call\t%P0";
-     }
-   else
--    xasm = "%!call\t%A0";
-+    {
-+      if (output_indirect_p)
-+	xasm = "%0";
-+      else
-+	xasm = "%!call\t%A0";
-+    }
- 
--  output_asm_insn (xasm, &call_op);
-+  if (output_indirect_p && !direct_p)
-+    ix86_output_indirect_branch (call_op, xasm, false);
-+  else
-+    output_asm_insn (xasm, &call_op);
- 
-   if (seh_nop_p)
-     return "nop";
-@@ -44836,7 +45429,7 @@ ix86_handle_struct_attribute (tree *node, tree name, tree, int,
- }
- 
- static tree
--ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
-+ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- 			      bool *no_add_attrs)
- {
-   if (TREE_CODE (*node) != FUNCTION_DECL)
-@@ -44845,6 +45438,29 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
-                name);
-       *no_add_attrs = true;
-     }
-+
-+  if (is_attribute_p ("indirect_branch", name))
-+    {
-+      tree cst = TREE_VALUE (args);
-+      if (TREE_CODE (cst) != STRING_CST)
-+	{
-+	  warning (OPT_Wattributes,
-+		   "%qE attribute requires a string constant argument",
-+		   name);
-+	  *no_add_attrs = true;
-+	}
-+      else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+	       && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+	       && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+	       && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+	{
-+	  warning (OPT_Wattributes,
-+		   "argument to %qE attribute is not "
-+		   "(keep|thunk|thunk-inline|thunk-extern)", name);
-+	  *no_add_attrs = true;
-+	}
-+    }
-+
-   return NULL_TREE;
- }
- 
-@@ -49072,6 +49688,9 @@ static const struct attribute_spec ix86_attribute_table[] =
-     false },
-   { "callee_pop_aggregate_return", 1, 1, false, true, true,
-     ix86_handle_callee_pop_aggregate_return, true },
-+  { "indirect_branch", 1, 1, true, false, false,
-+    ix86_handle_fndecl_attribute, false },
-+
-   /* End element.  */
-   { NULL,        0, 0, false, false, false, NULL, false }
- };
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 5414416..9dccdb0 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2572,6 +2572,13 @@ struct GTY(()) machine_function {
-   /* If true, it is safe to not save/restore DRAP register.  */
-   BOOL_BITFIELD no_drap_save_restore : 1;
- 
-+  /* How to generate indirec branch.  */
-+  ENUM_BITFIELD(indirect_branch) indirect_branch_type : 3;
-+
-+  /* If true, the current function has local indirect jumps, like
-+     "indirect_jump" or "tablejump".  */
-+  BOOL_BITFIELD has_local_indirect_jump : 1;
-+
-   /* If true, there is register available for argument passing.  This
-      is used only in ix86_function_ok_for_sibcall by 32-bit to determine
-      if there is scratch register available for indirect sibcall.  In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index d2bfe31..153e162 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11807,13 +11807,18 @@
- {
-   if (TARGET_X32)
-     operands[0] = convert_memory_address (word_mode, operands[0]);
-+  cfun->machine->has_local_indirect_jump = true;
- })
- 
- (define_insn "*indirect_jump"
-   [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
-   ""
--  "%!jmp\t%A0"
--  [(set_attr "type" "ibr")
-+  "* return ix86_output_indirect_jmp (operands[0], false);"
-+  [(set (attr "type")
-+     (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+				 != indirect_branch_keep)")
-+	(const_string "multi")
-+	(const_string "ibr")))
-    (set_attr "length_immediate" "0")
-    (set_attr "maybe_prefix_bnd" "1")])
- 
-@@ -11856,14 +11861,19 @@
- 
-   if (TARGET_X32)
-     operands[0] = convert_memory_address (word_mode, operands[0]);
-+  cfun->machine->has_local_indirect_jump = true;
- })
- 
- (define_insn "*tablejump_1"
-   [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
-    (use (label_ref (match_operand 1)))]
-   ""
--  "%!jmp\t%A0"
--  [(set_attr "type" "ibr")
-+  "* return ix86_output_indirect_jmp (operands[0], false);"
-+  [(set (attr "type")
-+     (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+				 != indirect_branch_keep)")
-+	(const_string "multi")
-+	(const_string "ibr")))
-    (set_attr "length_immediate" "0")
-    (set_attr "maybe_prefix_bnd" "1")])
- 
-@@ -12520,8 +12530,12 @@
-   [(simple_return)
-    (use (match_operand:SI 0 "register_operand" "r"))]
-   "reload_completed"
--  "%!jmp\t%A0"
--  [(set_attr "type" "ibr")
-+  "* return ix86_output_indirect_jmp (operands[0], true);"
-+  [(set (attr "type")
-+     (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+				 != indirect_branch_keep)")
-+	(const_string "multi")
-+	(const_string "ibr")))
-    (set_attr "length_immediate" "0")
-    (set_attr "maybe_prefix_bnd" "1")])
- 
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index f304b62..5ffa334 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -897,3 +897,23 @@ Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
- mmitigate-rop
- Target Var(flag_mitigate_rop) Init(0)
- Attempt to avoid generating instruction sequences containing ret bytes.
-+
-+mindirect-branch=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
-+Convert indirect call and jump to call and return thunks.
-+
-+Enum
-+Name(indirect_branch) Type(enum indirect_branch)
-+Known indirect branch choices (for use with the -mindirect-branch= option):
-+
-+EnumValue
-+Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk) Value(indirect_branch_thunk)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8cc4f7e..8668dae 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5419,6 +5419,16 @@ Specify which floating-point unit to use.  You must specify the
- @code{target("fpmath=sse,387")} option as
- @code{target("fpmath=sse+387")} because the comma would separate
- different options.
-+
-+@item indirect_branch("@var{choice}")
-+@cindex @code{indirect_branch} function attribute, x86
-+On x86 targets, the @code{indirect_branch} attribute causes the compiler
-+to convert indirect call and jump with @var{choice}.  @samp{keep}
-+keeps indirect call and jump unmodified.  @samp{thunk} converts indirect
-+call and jump to call and return thunk.  @samp{thunk-inline} converts
-+indirect call and jump to inlined call and return thunk.
-+@samp{thunk-extern} converts indirect call and jump to external call
-+and return thunk provided in a separate object file.
- @end table
- 
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index b066f7b..ff9a194 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,7 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop}
-+-mmitigate-rop -mindirect-branch=@var{choice}}
- 
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24218,6 +24218,17 @@ opcodes, to mitigate against certain forms of attack. At the moment,
- this option is limited in what it can do and should not be relied
- on to provide serious protection.
- 
-+@item -mindirect-branch=@var{choice}
-+@opindex -mindirect-branch
-+Convert indirect call and jump with @var{choice}.  The default is
-+@samp{keep}, which keeps indirect call and jump unmodified.
-+@samp{thunk} converts indirect call and jump to call and return thunk.
-+@samp{thunk-inline} converts indirect call and jump to inlined call
-+and return thunk.  @samp{thunk-extern} converts indirect call and jump
-+to external call and return thunk provided in a separate object file.
-+You can control this behavior for a specific function by using the
-+function attribute @code{indirect_branch}.  @xref{Function Attributes}.
-+
- @end table
- 
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-new file mode 100644
-index 0000000..d983e1c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-new file mode 100644
-index 0000000..58f09b4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-new file mode 100644
-index 0000000..f20d35c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-new file mode 100644
-index 0000000..0eff8fb
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-new file mode 100644
-index 0000000..a25b20d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+  bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-new file mode 100644
-index 0000000..cff114a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-new file mode 100644
-index 0000000..afdb600
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+  switch (i)
-+    {
-+    default:
-+      func0 ();
-+      break;
-+    case 1:
-+      func1 ();
-+      break;
-+    case 2:
-+      func2 ();
-+      break;
-+    case 3:
-+      func3 ();
-+      break;
-+    case 4:
-+      func4 ();
-+      break;
-+    case 5:
-+      func5 ();
-+      break;
-+    }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-new file mode 100644
-index 0000000..d64d978
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+extern void male_indirect_jump (long)
-+  __attribute__ ((indirect_branch("thunk")));
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-new file mode 100644
-index 0000000..9306745
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-new file mode 100644
-index 0000000..97744d6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+  __attribute__ ((indirect_branch("thunk-inline")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-new file mode 100644
-index 0000000..bfce3ea
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-new file mode 100644
-index 0000000..0833606
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+  __attribute__ ((indirect_branch("thunk-extern")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-new file mode 100644
-index 0000000..2eba0fb
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-new file mode 100644
-index 0000000..f58427e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (int i)
-+{
-+  switch (i)
-+    {
-+    default:
-+      func0 ();
-+      break;
-+    case 1:
-+      func1 ();
-+      break;
-+    case 2:
-+      func2 ();
-+      break;
-+    case 3:
-+      func3 ();
-+      break;
-+    case 4:
-+      func4 ();
-+      break;
-+    case 5:
-+      func5 ();
-+      break;
-+    }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-new file mode 100644
-index 0000000..564ed39
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -0,0 +1,42 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("keep")))
-+void
-+bar (int i)
-+{
-+  switch (i)
-+    {
-+    default:
-+      func0 ();
-+      break;
-+    case 1:
-+      func1 ();
-+      break;
-+    case 2:
-+      func2 ();
-+      break;
-+    case 3:
-+      func3 ();
-+      break;
-+    case 4:
-+      func4 ();
-+      break;
-+    case 5:
-+      func5 ();
-+      break;
-+    }
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-new file mode 100644
-index 0000000..50fbee2
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+  dispatch (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-new file mode 100644
-index 0000000..2976e67
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+  dispatch (buf);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-new file mode 100644
-index 0000000..da4bc98
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+  bar (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-new file mode 100644
-index 0000000..c64d12e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+  bar (buf);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-new file mode 100644
-index 0000000..49f27b4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-new file mode 100644
-index 0000000..a1e3eb6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-new file mode 100644
-index 0000000..395634e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-new file mode 100644
-index 0000000..fd3f633
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-new file mode 100644
-index 0000000..ba2f92b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -0,0 +1,16 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+  bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-new file mode 100644
-index 0000000..0c5a2d4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-new file mode 100644
-index 0000000..6652523
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -0,0 +1,43 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+  switch (i)
-+    {
-+    default:
-+      func0 ();
-+      break;
-+    case 1:
-+      func1 ();
-+      break;
-+    case 2:
-+      func2 ();
-+      break;
-+    case 3:
-+      func3 ();
-+      break;
-+    case 4:
-+      func4 ();
-+      break;
-+    case 5:
-+      func5 ();
-+      break;
-+    }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-new file mode 100644
-index 0000000..68c0ff7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-new file mode 100644
-index 0000000..e2da1fc
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-new file mode 100644
-index 0000000..244fec7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-new file mode 100644
-index 0000000..107ebe3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+  dispatch[offset](offset);
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-new file mode 100644
-index 0000000..17b04ef
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+  bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-new file mode 100644
-index 0000000..d9eb112
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-new file mode 100644
-index 0000000..d02b1dc
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+  switch (i)
-+    {
-+    default:
-+      func0 ();
-+      break;
-+    case 1:
-+      func1 ();
-+      break;
-+    case 2:
-+      func2 ();
-+      break;
-+    case 3:
-+      func3 ();
-+      break;
-+    case 4:
-+      func4 ();
-+      break;
-+    case 5:
-+      func5 ();
-+      break;
-+    }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch
deleted file mode 100644
index 5354c77..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch
+++ /dev/null
@@ -1,1570 +0,0 @@
-From e3270814b9e0caad63fbcdfd7ae9da2d52c97497 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 05/12] x86: Add -mfunction-return=
-
-Add -mfunction-return= option to convert function return to call and
-return thunks.  The default is 'keep', which keeps function return
-unmodified.  'thunk' converts function return to call and return thunk.
-'thunk-inline' converts function return to inlined call and return thunk.
-'thunk-extern' converts function return to external call and return
-thunk provided in a separate object file.  You can control this behavior
-for a specific function by using the function attribute function_return.
-
-Function return thunk is the same as memory thunk for -mindirect-branch=
-where the return address is at the top of the stack:
-
-__x86_return_thunk:
-	call L2
-L1:
-	pause
-	lfence
-	jmp L1
-L2:
-	lea 8(%rsp), %rsp|lea 4(%esp), %esp
-	ret
-
-and function return becomes
-
-	jmp __x86_return_thunk
-
--mindirect-branch= tests are updated with -mfunction-return=keep to
-avoid false test failures when -mfunction-return=thunk is added to
-RUNTESTFLAGS for "make check".
-
-gcc/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/i386-protos.h (ix86_output_function_return): New.
-	* config/i386/i386.c (ix86_set_indirect_branch_type): Also
-	set function_return_type.
-	(indirect_thunk_name): Add ret_p to indicate thunk for function
-	return.
-	(output_indirect_thunk_function): Pass false to
-	indirect_thunk_name.
-	(ix86_output_indirect_branch_via_reg): Likewise.
-	(ix86_output_indirect_branch_via_push): Likewise.
-	(output_indirect_thunk_function): Create alias for function
-	return thunk if regno < 0.
-	(ix86_output_function_return): New function.
-	(ix86_handle_fndecl_attribute): Handle function_return.
-	(ix86_attribute_table): Add function_return.
-	* config/i386/i386.h (machine_function): Add
-	function_return_type.
-	* config/i386/i386.md (simple_return_internal): Use
-	ix86_output_function_return.
-	(simple_return_internal_long): Likewise.
-	* config/i386/i386.opt (mfunction-return=): New option.
-	(indirect_branch): Mention -mfunction-return=.
-	* doc/extend.texi: Document function_return function attribute.
-	* doc/invoke.texi: Document -mfunction-return= option.
-
-gcc/testsuite/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* gcc.target/i386/indirect-thunk-1.c (dg-options): Add
-	-mfunction-return=keep.
-	* gcc.target/i386/indirect-thunk-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
-	* gcc.target/i386/ret-thunk-1.c: New test.
-	* gcc.target/i386/ret-thunk-10.c: Likewise.
-	* gcc.target/i386/ret-thunk-11.c: Likewise.
-	* gcc.target/i386/ret-thunk-12.c: Likewise.
-	* gcc.target/i386/ret-thunk-13.c: Likewise.
-	* gcc.target/i386/ret-thunk-14.c: Likewise.
-	* gcc.target/i386/ret-thunk-15.c: Likewise.
-	* gcc.target/i386/ret-thunk-16.c: Likewise.
-	* gcc.target/i386/ret-thunk-2.c: Likewise.
-	* gcc.target/i386/ret-thunk-3.c: Likewise.
-	* gcc.target/i386/ret-thunk-4.c: Likewise.
-	* gcc.target/i386/ret-thunk-5.c: Likewise.
-	* gcc.target/i386/ret-thunk-6.c: Likewise.
-	* gcc.target/i386/ret-thunk-7.c: Likewise.
-	* gcc.target/i386/ret-thunk-8.c: Likewise.
-	* gcc.target/i386/ret-thunk-9.c: Likewise.
-
-i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
-
-ASM_OUTPUT_DEF isn't defined for TARGET_MACHO.  Use ASM_OUTPUT_LABEL to
-generate the __x86_return_thunk label, instead of the set directive.
-Update testcase to remove the __x86_return_thunk label check.  Since
--fno-pic is ignored on Darwin, update testcases to sscan or "push"
-only on Linux.
-
-gcc/
-
-	Backport from mainline
-	2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR target/83839
-	* config/i386/i386.c (output_indirect_thunk_function): Use
-	ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
-	for  __x86.return_thunk.
-
-gcc/testsuite/
-
-	Backport from mainline
-	2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	PR target/83839
-	* gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
-	Linux.
-	* gcc.target/i386/indirect-thunk-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-register-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-register-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-register-4.c: Likewise.
-	* gcc.target/i386/ret-thunk-10.c: Likewise.
-	* gcc.target/i386/ret-thunk-11.c: Likewise.
-	* gcc.target/i386/ret-thunk-12.c: Likewise.
-	* gcc.target/i386/ret-thunk-13.c: Likewise.
-	* gcc.target/i386/ret-thunk-14.c: Likewise.
-	* gcc.target/i386/ret-thunk-15.c: Likewise.
-	* gcc.target/i386/ret-thunk-9.c: Don't check the
-	__x86_return_thunk label.
-	Scan for "push" only for Linux.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-protos.h                      |   1 +
- gcc/config/i386/i386.c                             | 152 +++++++++++++++++++--
- gcc/config/i386/i386.h                             |   3 +
- gcc/config/i386/i386.md                            |   9 +-
- gcc/config/i386/i386.opt                           |   6 +-
- gcc/doc/extend.texi                                |   9 ++
- gcc/doc/invoke.texi                                |  14 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c   |   4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c   |   4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c   |   4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c   |   4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c   |   2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c   |   2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c   |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c        |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c        |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c        |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c        |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c        |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c        |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c        |   4 +-
- .../gcc.target/i386/indirect-thunk-attr-8.c        |   2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c         |   4 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c         |   4 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c         |   2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c         |   2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c      |   2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c      |   2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c      |   4 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c      |   2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c      |   2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c      |   4 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-1.c        |  13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c       |  23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c       |  23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c       |  22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c       |  22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c       |  22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c       |  22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-16.c       |  18 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-2.c        |  13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-3.c        |  12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-4.c        |  12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-5.c        |  15 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-6.c        |  14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-7.c        |  13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-8.c        |  14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c        |  24 ++++
- 56 files changed, 516 insertions(+), 74 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index eca4cbf..620d70e 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -312,6 +312,7 @@ extern enum attr_cpu ix86_schedule;
- 
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
- extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_function_return (bool long_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- 						enum machine_mode mode);
- 
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 0b9fc4d..34e26a3 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6390,6 +6390,31 @@ ix86_set_indirect_branch_type (tree fndecl)
-       else
- 	cfun->machine->indirect_branch_type = ix86_indirect_branch;
-     }
-+
-+  if (cfun->machine->function_return_type == indirect_branch_unset)
-+    {
-+      tree attr = lookup_attribute ("function_return",
-+				    DECL_ATTRIBUTES (fndecl));
-+      if (attr != NULL)
-+	{
-+	  tree args = TREE_VALUE (attr);
-+	  if (args == NULL)
-+	    gcc_unreachable ();
-+	  tree cst = TREE_VALUE (args);
-+	  if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+	    cfun->machine->function_return_type = indirect_branch_keep;
-+	  else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+	    cfun->machine->function_return_type = indirect_branch_thunk;
-+	  else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+	    cfun->machine->function_return_type = indirect_branch_thunk_inline;
-+	  else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+	    cfun->machine->function_return_type = indirect_branch_thunk_extern;
-+	  else
-+	    gcc_unreachable ();
-+	}
-+      else
-+	cfun->machine->function_return_type = ix86_function_return;
-+    }
- }
- 
- /* Establish appropriate back-end context for processing the function
-@@ -11036,8 +11061,12 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk.  */
- 
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-+		     bool ret_p)
- {
-+  if (regno >= 0 && ret_p)
-+    gcc_unreachable ();
-+
-   if (USE_HIDDEN_LINKONCE)
-     {
-       const char *bnd = need_bnd_p ? "_bnd" : "";
-@@ -11052,7 +11081,10 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- 		   bnd, reg_prefix, reg_names[regno]);
- 	}
-       else
--	sprintf (name, "__x86_indirect_thunk%s", bnd);
-+	{
-+	  const char *ret = ret_p ? "return" : "indirect";
-+	  sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-+	}
-     }
-   else
-     {
-@@ -11065,10 +11097,20 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- 	}
-       else
- 	{
--	  if (need_bnd_p)
--	    ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+	  if (ret_p)
-+	    {
-+	      if (need_bnd_p)
-+		ASM_GENERATE_INTERNAL_LABEL (name, "LRTB", 0);
-+	      else
-+		ASM_GENERATE_INTERNAL_LABEL (name, "LRT", 0);
-+	    }
- 	  else
--	    ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+	    {
-+	      if (need_bnd_p)
-+		ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+	      else
-+		ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+	    }
- 	}
-     }
- }
-@@ -11163,7 +11205,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
-   tree decl;
- 
-   /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd.  */
--  indirect_thunk_name (name, regno, need_bnd_p);
-+  indirect_thunk_name (name, regno, need_bnd_p, false);
-   decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
- 		     get_identifier (name),
- 		     build_function_type_list (void_type_node, NULL_TREE));
-@@ -11206,6 +11248,36 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- 	ASM_OUTPUT_LABEL (asm_out_file, name);
-       }
- 
-+  if (regno < 0)
-+    {
-+      /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd.  */
-+      char alias[32];
-+
-+      indirect_thunk_name (alias, regno, need_bnd_p, true);
-+#if TARGET_MACHO
-+      if (TARGET_MACHO)
-+	{
-+	  fputs ("\t.weak_definition\t", asm_out_file);
-+	  assemble_name (asm_out_file, alias);
-+	  fputs ("\n\t.private_extern\t", asm_out_file);
-+	  assemble_name (asm_out_file, alias);
-+	  putc ('\n', asm_out_file);
-+	  ASM_OUTPUT_LABEL (asm_out_file, alias);
-+	}
-+#else
-+      ASM_OUTPUT_DEF (asm_out_file, alias, name);
-+      if (USE_HIDDEN_LINKONCE)
-+	{
-+	  fputs ("\t.globl\t", asm_out_file);
-+	  assemble_name (asm_out_file, alias);
-+	  putc ('\n', asm_out_file);
-+	  fputs ("\t.hidden\t", asm_out_file);
-+	  assemble_name (asm_out_file, alias);
-+	  putc ('\n', asm_out_file);
-+	}
-+#endif
-+    }
-+
-   DECL_INITIAL (decl) = make_node (BLOCK);
-   current_function_decl = decl;
-   allocate_struct_function (decl, false);
-@@ -27687,7 +27759,7 @@ ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
- 	  else
- 	    indirect_thunks_used |= 1 << i;
- 	}
--      indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+      indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
-       thunk_name = thunk_name_buf;
-     }
-   else
-@@ -27796,7 +27868,7 @@ ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
- 	  else
- 	    indirect_thunk_needed = true;
- 	}
--      indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+      indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
-       thunk_name = thunk_name_buf;
-     }
-   else
-@@ -27931,6 +28003,46 @@ ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-     return "%!jmp\t%A0";
- }
- 
-+/* Output function return.  CALL_OP is the jump target.  Add a REP
-+   prefix to RET if LONG_P is true and function return is kept.  */
-+
-+const char *
-+ix86_output_function_return (bool long_p)
-+{
-+  if (cfun->machine->function_return_type != indirect_branch_keep)
-+    {
-+      char thunk_name[32];
-+      bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+
-+      if (cfun->machine->function_return_type
-+	  != indirect_branch_thunk_inline)
-+	{
-+	  bool need_thunk = (cfun->machine->function_return_type
-+			     == indirect_branch_thunk);
-+	  indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+	  if (need_bnd_p)
-+	    {
-+	      indirect_thunk_bnd_needed |= need_thunk;
-+	      fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+	    }
-+	  else
-+	    {
-+	      indirect_thunk_needed |= need_thunk;
-+	      fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+	    }
-+	}
-+      else
-+	output_indirect_thunk (need_bnd_p, -1);
-+
-+      return "";
-+    }
-+
-+  if (!long_p || ix86_bnd_prefixed_insn_p (current_output_insn))
-+    return "%!ret";
-+
-+  return "rep%; ret";
-+}
-+
- /* Output the assembly for a call instruction.  */
- 
- const char *
-@@ -45461,6 +45573,28 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- 	}
-     }
- 
-+  if (is_attribute_p ("function_return", name))
-+    {
-+      tree cst = TREE_VALUE (args);
-+      if (TREE_CODE (cst) != STRING_CST)
-+	{
-+	  warning (OPT_Wattributes,
-+		   "%qE attribute requires a string constant argument",
-+		   name);
-+	  *no_add_attrs = true;
-+	}
-+      else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+	       && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+	       && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+	       && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+	{
-+	  warning (OPT_Wattributes,
-+		   "argument to %qE attribute is not "
-+		   "(keep|thunk|thunk-inline|thunk-extern)", name);
-+	  *no_add_attrs = true;
-+	}
-+    }
-+
-   return NULL_TREE;
- }
- 
-@@ -49690,6 +49824,8 @@ static const struct attribute_spec ix86_attribute_table[] =
-     ix86_handle_callee_pop_aggregate_return, true },
-   { "indirect_branch", 1, 1, true, false, false,
-     ix86_handle_fndecl_attribute, false },
-+  { "function_return", 1, 1, true, false, false,
-+    ix86_handle_fndecl_attribute, false },
- 
-   /* End element.  */
-   { NULL,        0, 0, false, false, false, NULL, false }
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 9dccdb0..b34bc11 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2579,6 +2579,9 @@ struct GTY(()) machine_function {
-      "indirect_jump" or "tablejump".  */
-   BOOL_BITFIELD has_local_indirect_jump : 1;
- 
-+  /* How to generate function return.  */
-+  ENUM_BITFIELD(indirect_branch) function_return_type : 3;
-+
-   /* If true, there is register available for argument passing.  This
-      is used only in ix86_function_ok_for_sibcall by 32-bit to determine
-      if there is scratch register available for indirect sibcall.  In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 153e162..2da671e 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -12489,7 +12489,7 @@
- (define_insn "simple_return_internal"
-   [(simple_return)]
-   "reload_completed"
--  "%!ret"
-+  "* return ix86_output_function_return (false);"
-   [(set_attr "length" "1")
-    (set_attr "atom_unit" "jeu")
-    (set_attr "length_immediate" "0")
-@@ -12503,12 +12503,7 @@
-   [(simple_return)
-    (unspec [(const_int 0)] UNSPEC_REP)]
-   "reload_completed"
--{
--  if (ix86_bnd_prefixed_insn_p (insn))
--    return "%!ret";
--
--  return "rep%; ret";
--}
-+  "* return ix86_output_function_return (true);"
-   [(set_attr "length" "2")
-    (set_attr "atom_unit" "jeu")
-    (set_attr "length_immediate" "0")
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index 5ffa334..ad5916f 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -902,9 +902,13 @@ mindirect-branch=
- Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
- Convert indirect call and jump to call and return thunks.
- 
-+mfunction-return=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_function_return) Init(indirect_branch_keep)
-+Convert function return to call and return thunk.
-+
- Enum
- Name(indirect_branch) Type(enum indirect_branch)
--Known indirect branch choices (for use with the -mindirect-branch= option):
-+Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
- 
- EnumValue
- Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8668dae..2cb6bd1 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5429,6 +5429,15 @@ call and jump to call and return thunk.  @samp{thunk-inline} converts
- indirect call and jump to inlined call and return thunk.
- @samp{thunk-extern} converts indirect call and jump to external call
- and return thunk provided in a separate object file.
-+
-+@item function_return("@var{choice}")
-+@cindex @code{function_return} function attribute, x86
-+On x86 targets, the @code{function_return} attribute causes the compiler
-+to convert function return with @var{choice}.  @samp{keep} keeps function
-+return unmodified.  @samp{thunk} converts function return to call and
-+return thunk.  @samp{thunk-inline} converts function return to inlined
-+call and return thunk.  @samp{thunk-extern} converts function return to
-+external call and return thunk provided in a separate object file.
- @end table
- 
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index ff9a194..fa63dc5 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,8 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop -mindirect-branch=@var{choice}}
-+-mmitigate-rop -mindirect-branch=@var{choice} @gol
-+-mfunction-return=@var{choice}}
- 
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24229,6 +24230,17 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}.  @xref{Function Attributes}.
- 
-+@item -mfunction-return=@var{choice}
-+@opindex -mfunction-return
-+Convert function return with @var{choice}.  The default is @samp{keep},
-+which keeps function return unmodified.  @samp{thunk} converts function
-+return to call and return thunk.  @samp{thunk-inline} converts function
-+return to inlined call and return thunk.  @samp{thunk-extern} converts
-+function return to external call and return thunk provided in a separate
-+object file.  You can control this behavior for a specific function by
-+using the function attribute @code{function_return}.
-+@xref{Function Attributes}.
-+
- @end table
- 
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index d983e1c..e365ef5 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 58f09b4..05a51ad 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index f20d35c..3c0d4c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 0eff8fb..14d4ef6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index a25b20d..b4836c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index cff114a..1f06bd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index afdb600..bc6b47a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index d64d978..2257be3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index 9306745..e9cfdc5 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 97744d6..f938db0 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index bfce3ea..4e58599 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 0833606..b8d5024 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 2eba0fb..455adab 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index f58427e..4595b84 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-@@ -36,7 +36,7 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-index 564ed39..d730d31 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 50fbee2..5e3e118 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
- 
- void (*dispatch) (char *);
- char buf[10];
-@@ -10,7 +10,7 @@ foo (void)
-   dispatch (buf);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2976e67..2801aa4 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
- 
- void (*dispatch) (char *);
- char buf[10];
-@@ -11,7 +11,7 @@ foo (void)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index da4bc98..70b4fb3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
- 
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index c64d12e..3baf03e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
- 
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 49f27b4..edeb264 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index a1e3eb6..1d00413 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 395634e..06ebf1c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index fd3f633..1c8f944 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index ba2f92b..21740ac 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 0c5a2d4..a77c1f4 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 6652523..86e9fd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 68c0ff7..3ecde87 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index e2da1fc..df32a19 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 244fec7..9540996 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index 107ebe3..f3db6e2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 17b04ef..0f687c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index d9eb112..b27c6fc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index d02b1dc..764a375 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-1.c b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-new file mode 100644
-index 0000000..7223f67
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-new file mode 100644
-index 0000000..3a6727b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } }  } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } }  } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-new file mode 100644
-index 0000000..b8f6818
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } }  } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-new file mode 100644
-index 0000000..01b0a02
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } }  } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-new file mode 100644
-index 0000000..4b497b5
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+extern void (*bar) (void);
-+extern int foo (void) __attribute__ ((function_return("thunk")));
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-new file mode 100644
-index 0000000..4ae4c44
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-inline")))
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-new file mode 100644
-index 0000000..5b5bc76
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-extern"), indirect_branch("thunk")))
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-16.c b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-new file mode 100644
-index 0000000..a16cad1
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("keep"), indirect_branch("keep")))
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-2.c b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-new file mode 100644
-index 0000000..c6659e3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-3.c b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-new file mode 100644
-index 0000000..0f7f388
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-4.c b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-new file mode 100644
-index 0000000..9ae37e8
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-5.c b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-new file mode 100644
-index 0000000..4bd0d2a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-@@ -0,0 +1,15 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+extern void foo (void) __attribute__ ((function_return("thunk")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-6.c b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-new file mode 100644
-index 0000000..053841f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-7.c b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-new file mode 100644
-index 0000000..262e678
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-8.c b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-new file mode 100644
-index 0000000..c1658e9
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+extern void foo (void) __attribute__ ((function_return("keep")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-new file mode 100644
-index 0000000..fa24a1f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -0,0 +1,24 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+  bar ();
-+  return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch
deleted file mode 100644
index ad73691..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch
+++ /dev/null
@@ -1,946 +0,0 @@
-From 3f1c39fb543884d36e759a6dc196a8e914eb4f73 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 06/12] x86: Add -mindirect-branch-register
-
-Add -mindirect-branch-register to force indirect branch via register.
-This is implemented by disabling patterns of indirect branch via memory,
-similar to TARGET_X32.
-
--mindirect-branch= and -mfunction-return= tests are updated with
--mno-indirect-branch-register to avoid false test failures when
--mindirect-branch-register is added to RUNTESTFLAGS for "make check".
-
-gcc/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/constraints.md (Bs): Disallow memory operand for
-	-mindirect-branch-register.
-	(Bw): Likewise.
-	* config/i386/predicates.md (indirect_branch_operand): Likewise.
-	(GOT_memory_operand): Likewise.
-	(call_insn_operand): Likewise.
-	(sibcall_insn_operand): Likewise.
-	(GOT32_symbol_operand): Likewise.
-	* config/i386/i386.md (indirect_jump): Call convert_memory_address
-	for -mindirect-branch-register.
-	(tablejump): Likewise.
-	(*sibcall_memory): Likewise.
-	(*sibcall_value_memory): Likewise.
-	Disallow peepholes of indirect call and jump via memory for
-	-mindirect-branch-register.
-	(*call_pop): Replace m with Bw.
-	(*call_value_pop): Likewise.
-	(*sibcall_pop_memory): Replace m with Bs.
-	* config/i386/i386.opt (mindirect-branch-register): New option.
-	* doc/invoke.texi: Document -mindirect-branch-register option.
-
-gcc/testsuite/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* gcc.target/i386/indirect-thunk-1.c (dg-options): Add
-	-mno-indirect-branch-register.
-	* gcc.target/i386/indirect-thunk-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
-	* gcc.target/i386/ret-thunk-10.c: Likewise.
-	* gcc.target/i386/ret-thunk-11.c: Likewise.
-	* gcc.target/i386/ret-thunk-12.c: Likewise.
-	* gcc.target/i386/ret-thunk-13.c: Likewise.
-	* gcc.target/i386/ret-thunk-14.c: Likewise.
-	* gcc.target/i386/ret-thunk-15.c: Likewise.
-	* gcc.target/i386/ret-thunk-9.c: Likewise.
-	* gcc.target/i386/indirect-thunk-register-1.c: New test.
-	* gcc.target/i386/indirect-thunk-register-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-register-3.c: Likewise.
-
-i386: Rename to ix86_indirect_branch_register
-
-Rename the variable for -mindirect-branch-register to
-ix86_indirect_branch_register to match the command-line option name.
-
-	Backport from mainline
-	2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/constraints.md (Bs): Replace
-	ix86_indirect_branch_thunk_register with
-	ix86_indirect_branch_register.
-	(Bw): Likewise.
-	* config/i386/i386.md (indirect_jump): Likewise.
-	(tablejump): Likewise.
-	(*sibcall_memory): Likewise.
-	(*sibcall_value_memory): Likewise.
-	Peepholes of indirect call and jump via memory: Likewise.
-	* config/i386/i386.opt: Likewise.
-	* config/i386/predicates.md (indirect_branch_operand): Likewise.
-	(GOT_memory_operand): Likewise.
-	(call_insn_operand): Likewise.
-	(sibcall_insn_operand): Likewise.
-	(GOT32_symbol_operand): Likewise.
-
-x86: Rewrite ix86_indirect_branch_register logic
-
-Rewrite ix86_indirect_branch_register logic with
-
-(and (not (match_test "ix86_indirect_branch_register"))
-     (original condition before r256662))
-
-	Backport from mainline
-	2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/predicates.md (constant_call_address_operand):
-	Rewrite ix86_indirect_branch_register logic.
-	(sibcall_insn_operand): Likewise.
-
-Don't check ix86_indirect_branch_register for GOT operand
-
-Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
-matches, don't check ix86_indirect_branch_register here.  If needed,
--mindirect-branch= will convert indirect branch via GOT slot to a call
-and return thunk.
-
-	Backport from mainline
-	2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/constraints.md (Bs): Update
-	ix86_indirect_branch_register check.  Don't check
-	ix86_indirect_branch_register with GOT_memory_operand.
-	(Bw): Likewise.
-	* config/i386/predicates.md (GOT_memory_operand): Don't check
-	ix86_indirect_branch_register here.
-	(GOT32_symbol_operand): Likewise.
-
-i386: Rewrite indirect_branch_operand logic
-
-	Backport from mainline
-	2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/predicates.md (indirect_branch_operand): Rewrite
-	ix86_indirect_branch_register logic.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/constraints.md                     |  6 ++--
- gcc/config/i386/i386.md                            | 34 ++++++++++++++--------
- gcc/config/i386/i386.opt                           |  4 +++
- gcc/config/i386/predicates.md                      | 21 +++++++------
- gcc/doc/invoke.texi                                |  6 +++-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c   |  2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c   |  2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c   |  2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c   |  2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c   |  2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c   |  2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c   |  2 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c        |  2 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c        |  2 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c        |  2 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c        |  2 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c        |  2 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c        |  2 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c        |  2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c         |  2 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c         |  2 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c         |  2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c         |  2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-register-1.c    | 22 ++++++++++++++
- .../gcc.target/i386/indirect-thunk-register-2.c    | 20 +++++++++++++
- .../gcc.target/i386/indirect-thunk-register-3.c    | 19 ++++++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c       |  2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c       |  2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c       |  2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c       |  2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c       |  2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c       |  2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c        |  2 +-
- 47 files changed, 147 insertions(+), 63 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 1a4c701..9204c8e 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,14 +172,16 @@
- 
- (define_constraint "Bs"
-   "@internal Sibcall memory operand."
--  (ior (and (not (match_test "TARGET_X32"))
-+  (ior (and (not (match_test "ix86_indirect_branch_register"))
-+	    (not (match_test "TARGET_X32"))
- 	    (match_operand 0 "sibcall_memory_operand"))
-        (and (match_test "TARGET_X32 && Pmode == DImode")
- 	    (match_operand 0 "GOT_memory_operand"))))
- 
- (define_constraint "Bw"
-   "@internal Call memory operand."
--  (ior (and (not (match_test "TARGET_X32"))
-+  (ior (and (not (match_test "ix86_indirect_branch_register"))
-+	    (not (match_test "TARGET_X32"))
- 	    (match_operand 0 "memory_operand"))
-        (and (match_test "TARGET_X32 && Pmode == DImode")
- 	    (match_operand 0 "GOT_memory_operand"))))
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 2da671e..05a88ff 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
-   [(set (pc) (match_operand 0 "indirect_branch_operand"))]
-   ""
- {
--  if (TARGET_X32)
-+  if (TARGET_X32 || ix86_indirect_branch_register)
-     operands[0] = convert_memory_address (word_mode, operands[0]);
-   cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- 					 OPTAB_DIRECT);
-     }
- 
--  if (TARGET_X32)
-+  if (TARGET_X32 || ix86_indirect_branch_register)
-     operands[0] = convert_memory_address (word_mode, operands[0]);
-   cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12048,7 +12048,7 @@
-   [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- 	 (match_operand 1))
-    (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
--  "!TARGET_X32"
-+  "!TARGET_X32 && !ix86_indirect_branch_register"
-   "* return ix86_output_call_insn (insn, operands[0]);"
-   [(set_attr "type" "call")])
- 
-@@ -12057,7 +12057,9 @@
- 	(match_operand:W 1 "memory_operand"))
-    (call (mem:QI (match_dup 0))
- 	 (match_operand 3))]
--  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+  "!TARGET_X32
-+   && !ix86_indirect_branch_register
-+   && SIBLING_CALL_P (peep2_next_insn (1))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-   [(parallel [(call (mem:QI (match_dup 1))
-@@ -12070,7 +12072,9 @@
-    (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-    (call (mem:QI (match_dup 0))
- 	 (match_operand 3))]
--  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+  "!TARGET_X32
-+   && !ix86_indirect_branch_register
-+   && SIBLING_CALL_P (peep2_next_insn (2))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-   [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12092,7 +12096,7 @@
- })
- 
- (define_insn "*call_pop"
--  [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lmBz"))
-+  [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lBwBz"))
- 	 (match_operand 1))
-    (set (reg:SI SP_REG)
- 	(plus:SI (reg:SI SP_REG)
-@@ -12112,7 +12116,7 @@
-   [(set_attr "type" "call")])
- 
- (define_insn "*sibcall_pop_memory"
--  [(call (mem:QI (match_operand:SI 0 "memory_operand" "m"))
-+  [(call (mem:QI (match_operand:SI 0 "memory_operand" "Bs"))
- 	 (match_operand 1))
-    (set (reg:SI SP_REG)
- 	(plus:SI (reg:SI SP_REG)
-@@ -12166,7 +12170,9 @@
-   [(set (match_operand:W 0 "register_operand")
-         (match_operand:W 1 "memory_operand"))
-    (set (pc) (match_dup 0))]
--  "!TARGET_X32 && peep2_reg_dead_p (2, operands[0])"
-+  "!TARGET_X32
-+   && !ix86_indirect_branch_register
-+   && peep2_reg_dead_p (2, operands[0])"
-   [(set (pc) (match_dup 1))])
- 
- ;; Call subroutine, returning value in operand 0
-@@ -12244,7 +12250,7 @@
-  	(call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- 	      (match_operand 2)))
-    (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
--  "!TARGET_X32"
-+  "!TARGET_X32 && !ix86_indirect_branch_register"
-   "* return ix86_output_call_insn (insn, operands[1]);"
-   [(set_attr "type" "callv")])
- 
-@@ -12254,7 +12260,9 @@
-    (set (match_operand 2)
-    (call (mem:QI (match_dup 0))
- 		 (match_operand 3)))]
--  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+  "!TARGET_X32
-+   && !ix86_indirect_branch_register
-+   && SIBLING_CALL_P (peep2_next_insn (1))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-   [(parallel [(set (match_dup 2)
-@@ -12269,7 +12277,9 @@
-    (set (match_operand 2)
- 	(call (mem:QI (match_dup 0))
- 	      (match_operand 3)))]
--  "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+  "!TARGET_X32
-+   && !ix86_indirect_branch_register
-+   && SIBLING_CALL_P (peep2_next_insn (2))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-   [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12294,7 +12304,7 @@
- 
- (define_insn "*call_value_pop"
-   [(set (match_operand 0)
--	(call (mem:QI (match_operand:SI 1 "call_insn_operand" "lmBz"))
-+	(call (mem:QI (match_operand:SI 1 "call_insn_operand" "lBwBz"))
- 	      (match_operand 2)))
-    (set (reg:SI SP_REG)
- 	(plus:SI (reg:SI SP_REG)
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index ad5916f..a97f84f 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -921,3 +921,7 @@ Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
- 
- EnumValue
- Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-+
-+mindirect-branch-register
-+Target Report Var(ix86_indirect_branch_register) Init(0)
-+Force indirect call and jump via register.
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index 93dda7b..d1f0a7d 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,8 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
-   (ior (match_operand 0 "register_operand")
--       (and (not (match_test "TARGET_X32"))
-+       (and (not (match_test "ix86_indirect_branch_register"))
-+	    (not (match_test "TARGET_X32"))
- 	    (match_operand 0 "memory_operand"))))
- 
- ;; Return true if OP is a memory operands that can be used in sibcalls.
-@@ -636,20 +637,22 @@
-   (ior (match_test "constant_call_address_operand
- 		     (op, mode == VOIDmode ? mode : Pmode)")
-        (match_operand 0 "call_register_no_elim_operand")
--       (ior (and (not (match_test "TARGET_X32"))
--		 (match_operand 0 "memory_operand"))
--	    (and (match_test "TARGET_X32 && Pmode == DImode")
--		 (match_operand 0 "GOT_memory_operand")))))
-+       (and (not (match_test "ix86_indirect_branch_register"))
-+	    (ior (and (not (match_test "TARGET_X32"))
-+		      (match_operand 0 "memory_operand"))
-+		 (and (match_test "TARGET_X32 && Pmode == DImode")
-+		      (match_operand 0 "GOT_memory_operand"))))))
- 
- ;; Similarly, but for tail calls, in which we cannot allow memory references.
- (define_special_predicate "sibcall_insn_operand"
-   (ior (match_test "constant_call_address_operand
- 		     (op, mode == VOIDmode ? mode : Pmode)")
-        (match_operand 0 "register_no_elim_operand")
--       (ior (and (not (match_test "TARGET_X32"))
--		 (match_operand 0 "sibcall_memory_operand"))
--	    (and (match_test "TARGET_X32 && Pmode == DImode")
--		 (match_operand 0 "GOT_memory_operand")))))
-+       (and (not (match_test "ix86_indirect_branch_register"))
-+	    (ior (and (not (match_test "TARGET_X32"))
-+		      (match_operand 0 "sibcall_memory_operand"))
-+		 (and (match_test "TARGET_X32 && Pmode == DImode")
-+		      (match_operand 0 "GOT_memory_operand"))))))
- 
- ;; Return true if OP is a 32-bit GOT symbol operand.
- (define_predicate "GOT32_symbol_operand"
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index fa63dc5..ad9f295 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1170,7 +1170,7 @@ See RS/6000 and PowerPC Options.
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
- -mmitigate-rop -mindirect-branch=@var{choice} @gol
---mfunction-return=@var{choice}}
-+-mfunction-return=@var{choice} -mindirect-branch-register}
- 
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24241,6 +24241,10 @@ object file.  You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
- 
-+@item -mindirect-branch-register
-+@opindex -mindirect-branch-register
-+Force indirect call and jump via register.
-+
- @end table
- 
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index e365ef5..60d0988 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 05a51ad..aac7516 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 3c0d4c3..9e24a38 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 14d4ef6..127b5d9 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index b4836c3..fcaa18d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index 1f06bd1..e464928 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index bc6b47a..17c2d0f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 2257be3..9194ccf 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e9cfdc5..e51f261 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index f938db0..4aeec18 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index 4e58599..ac0e599 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index b8d5024..573cf1e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 455adab..b2b37fc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4595b84..4a43e19 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 5e3e118..ac84ab6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
- 
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2801aa4..ce655e8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
- 
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index 70b4fb3..d34485a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
- 
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 3baf03e..0e19830 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
- 
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index edeb264..579441f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index 1d00413..c92e6f2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 06ebf1c..d9964c2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index 1c8f944..d4dca4d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 21740ac..5c07e02 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index a77c1f4..3eb4406 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 86e9fd1..aece938 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3ecde87..3aba5e8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index df32a19..0f0181d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 9540996..2eef6f3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index f3db6e2..e825a10 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- typedef void (*dispatch_t)(long offset);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 0f687c3..c6d77e1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index b27c6fc..6454827 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
- 
- extern void bar (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index 764a375..c67066c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-new file mode 100644
-index 0000000..7d396a3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch"  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk\n" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk_bnd\n" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-new file mode 100644
-index 0000000..e7e616b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch"  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-new file mode 100644
-index 0000000..5320e92
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+  dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch"  } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not {\t(pause|pause|nop)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index 3a6727b..e6fea84 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
- 
- extern void (*bar) (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index b8f6818..e239ec4 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
- 
- extern void (*bar) (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index 01b0a02..fa31813 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
- 
- extern void (*bar) (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index 4b497b5..fd5b41f 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
- 
- extern void (*bar) (void);
- extern int foo (void) __attribute__ ((function_return("thunk")));
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index 4ae4c44..d606373 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
- 
- extern void (*bar) (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 5b5bc76..75e45e2 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
- 
- extern void (*bar) (void);
- 
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index fa24a1f..d1db41c 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
- 
- extern void (*bar) (void);
- 
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch
deleted file mode 100644
index cec84fe..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 8f0efd692eb8db06d6c00b759c872bd2170b7f7b Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 07/12] x86: Add 'V' register operand modifier
-
-Add 'V', a special modifier which prints the name of the full integer
-register without '%'.  For
-
-extern void (*func_p) (void);
-
-void
-foo (void)
-{
-  asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-}
-
-it generates:
-
-foo:
-	movq	func_p(%rip), %rax
-	call	__x86_indirect_thunk_rax
-	ret
-
-gcc/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/i386.c (print_reg): Print the name of the full
-	integer register without '%'.
-	(ix86_print_operand): Handle 'V'.
-	 * doc/extend.texi: Document 'V' modifier.
-
-gcc/testsuite/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* gcc.target/i386/indirect-thunk-register-4.c: New test.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c                                    | 13 ++++++++++++-
- gcc/doc/extend.texi                                       |  3 +++
- gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
- 3 files changed, 28 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 34e26a3..eeca7e5 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -16869,6 +16869,7 @@ put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
-    If CODE is 'h', pretend the reg is the 'high' byte register.
-    If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op.
-    If CODE is 'd', duplicate the operand for AVX instruction.
-+   If CODE is 'V', print naked full integer register name without %.
-  */
- 
- void
-@@ -16879,7 +16880,7 @@ print_reg (rtx x, int code, FILE *file)
-   unsigned int regno;
-   bool duplicated;
- 
--  if (ASSEMBLER_DIALECT == ASM_ATT)
-+  if (ASSEMBLER_DIALECT == ASM_ATT && code != 'V')
-     putc ('%', file);
- 
-   if (x == pc_rtx)
-@@ -16922,6 +16923,14 @@ print_reg (rtx x, int code, FILE *file)
- 	      && regno != FPSR_REG
- 	      && regno != FPCR_REG);
- 
-+  if (code == 'V')
-+    {
-+      if (GENERAL_REGNO_P (regno))
-+	msize = GET_MODE_SIZE (word_mode);
-+      else
-+	error ("'V' modifier on non-integer register");
-+    }
-+
-   duplicated = code == 'd' && TARGET_AVX;
- 
-   switch (msize)
-@@ -17035,6 +17044,7 @@ print_reg (rtx x, int code, FILE *file)
-    & -- print some in-use local-dynamic symbol name.
-    H -- print a memory address offset by 8; used for sse high-parts
-    Y -- print condition for XOP pcom* instruction.
-+   V -- print naked full integer register name without %.
-    + -- print a branch hint as 'cs' or 'ds' prefix
-    ; -- print a semicolon (after prefixes due to bug in older gas).
-    ~ -- print "i" if TARGET_AVX2, "f" otherwise.
-@@ -17259,6 +17269,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
- 	case 'X':
- 	case 'P':
- 	case 'p':
-+	case 'V':
- 	  break;
- 
- 	case 's':
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 2cb6bd1..76ba1d4 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -8511,6 +8511,9 @@ The table below shows the list of supported modifiers and their effects.
- @tab @code{2}
- @end multitable
- 
-+@code{V} is a special modifier which prints the name of the full integer
-+register without @code{%}.
-+
- @anchor{x86floatingpointasmoperands}
- @subsubsection x86 Floating-Point @code{asm} Operands
- 
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-new file mode 100644
-index 0000000..f0cd9b7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*func_p) (void);
-+
-+void
-+foo (void)
-+{
-+  asm("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-+}
-+
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_eax" { target ia32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
deleted file mode 100644
index d8a5810..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-From 8e0d9bf93e2e2ec03c544572aef4b03a8e7090f3 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 13 Jan 2018 18:01:54 -0800
-Subject: [PATCH 08/12] x86: Disallow -mindirect-branch=/-mfunction-return=
- with -mcmodel=large
-
-Since the thunk function may not be reachable in large code model,
--mcmodel=large is incompatible with -mindirect-branch=thunk,
--mindirect-branch=thunk-extern, -mfunction-return=thunk and
--mfunction-return=thunk-extern.  Issue an error when they are used with
--mcmodel=large.
-
-gcc/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
-	-mcmodel=large with -mindirect-branch=thunk,
-	-mindirect-branch=thunk-extern, -mfunction-return=thunk and
-	-mfunction-return=thunk-extern.
-	* doc/invoke.texi: Document -mcmodel=large is incompatible with
-	-mindirect-branch=thunk, -mindirect-branch=thunk-extern,
-	-mfunction-return=thunk and -mfunction-return=thunk-extern.
-
-gcc/testsuite/
-
-	Backport from mainline
-	2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* gcc.target/i386/indirect-thunk-10.c: New test.
-	* gcc.target/i386/indirect-thunk-8.c: Likewise.
-	* gcc.target/i386/indirect-thunk-9.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
-	* gcc.target/i386/ret-thunk-17.c: Likewise.
-	* gcc.target/i386/ret-thunk-18.c: Likewise.
-	* gcc.target/i386/ret-thunk-19.c: Likewise.
-	* gcc.target/i386/ret-thunk-20.c: Likewise.
-	* gcc.target/i386/ret-thunk-21.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c                             | 26 ++++++++++++++++++++++
- gcc/doc/invoke.texi                                | 11 +++++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-10.c  |  7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-8.c   |  7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-9.c   |  7 ++++++
- .../gcc.target/i386/indirect-thunk-attr-10.c       |  9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-11.c       |  9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-9.c        |  9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-17.c       |  7 ++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-18.c       |  8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-19.c       |  8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-20.c       |  9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-21.c       |  9 ++++++++
- 13 files changed, 126 insertions(+)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index eeca7e5..9c038be 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6389,6 +6389,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- 	}
-       else
- 	cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+
-+      /* -mcmodel=large is not compatible with -mindirect-branch=thunk
-+	 nor -mindirect-branch=thunk-extern.  */
-+      if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+	  && ((cfun->machine->indirect_branch_type
-+	       == indirect_branch_thunk_extern)
-+	      || (cfun->machine->indirect_branch_type
-+		  == indirect_branch_thunk)))
-+	error ("%<-mindirect-branch=%s%> and %<-mcmodel=large%> are not "
-+	       "compatible",
-+	       ((cfun->machine->indirect_branch_type
-+		 == indirect_branch_thunk_extern)
-+		? "thunk-extern" : "thunk"));
-     }
- 
-   if (cfun->machine->function_return_type == indirect_branch_unset)
-@@ -6414,6 +6427,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- 	}
-       else
- 	cfun->machine->function_return_type = ix86_function_return;
-+
-+      /* -mcmodel=large is not compatible with -mfunction-return=thunk
-+	 nor -mfunction-return=thunk-extern.  */
-+      if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+	  && ((cfun->machine->function_return_type
-+	       == indirect_branch_thunk_extern)
-+	      || (cfun->machine->function_return_type
-+		  == indirect_branch_thunk)))
-+	error ("%<-mfunction-return=%s%> and %<-mcmodel=large%> are not "
-+	       "compatible",
-+	       ((cfun->machine->function_return_type
-+		 == indirect_branch_thunk_extern)
-+		? "thunk-extern" : "thunk"));
-     }
- }
- 
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index ad9f295..48e827f 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -24230,6 +24230,11 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}.  @xref{Function Attributes}.
- 
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mindirect-branch=thunk} nor
-+@option{-mindirect-branch=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
- @item -mfunction-return=@var{choice}
- @opindex -mfunction-return
- Convert function return with @var{choice}.  The default is @samp{keep},
-@@ -24241,6 +24246,12 @@ object file.  You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
- 
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mfunction-return=thunk} nor
-+@option{-mfunction-return=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
-+
- @item -mindirect-branch-register
- @opindex -mindirect-branch-register
- Force indirect call and jump via register.
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-new file mode 100644
-index 0000000..a0674bd
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-new file mode 100644
-index 0000000..7a80a89
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-new file mode 100644
-index 0000000..d4d45c5
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-new file mode 100644
-index 0000000..3a2aead
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-new file mode 100644
-index 0000000..8e52f03
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-new file mode 100644
-index 0000000..bdaa4f6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-17.c b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-new file mode 100644
-index 0000000..0605e2c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-18.c b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-new file mode 100644
-index 0000000..307019d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-19.c b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-new file mode 100644
-index 0000000..772617f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+
-+__attribute__ ((function_return("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-20.c b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-new file mode 100644
-index 0000000..1e9f9bd
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-21.c b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-new file mode 100644
-index 0000000..eea07f7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
deleted file mode 100644
index 7364a2c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 3eff2adada2b1667b0e76496fa559e0c248ecd84 Mon Sep 17 00:00:00 2001
-From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 25 Jan 2018 19:39:01 +0000
-Subject: [PATCH 09/12] Use INVALID_REGNUM in indirect thunk processing
-
-	Backport from mainline
-	2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
-
-	* config/i386/i386.c (indirect_thunk_name): Declare regno
-	as unsigned int.  Compare regno with INVALID_REGNUM.
-	(output_indirect_thunk): Ditto.
-	(output_indirect_thunk_function): Ditto.
-	(ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
-	in the call to output_indirect_thunk_function.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257067 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 9c038be..4012657 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11087,16 +11087,16 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk.  */
- 
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
--		     bool ret_p)
-+indirect_thunk_name (char name[32], unsigned int regno,
-+		     bool need_bnd_p, bool ret_p)
- {
--  if (regno >= 0 && ret_p)
-+  if (regno != INVALID_REGNUM && ret_p)
-     gcc_unreachable ();
- 
-   if (USE_HIDDEN_LINKONCE)
-     {
-       const char *bnd = need_bnd_p ? "_bnd" : "";
--      if (regno >= 0)
-+      if (regno != INVALID_REGNUM)
- 	{
- 	  const char *reg_prefix;
- 	  if (LEGACY_INT_REGNO_P (regno))
-@@ -11114,7 +11114,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-     }
-   else
-     {
--      if (regno >= 0)
-+      if (regno != INVALID_REGNUM)
- 	{
- 	  if (need_bnd_p)
- 	    ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-@@ -11166,7 +11166,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-  */
- 
- static void
--output_indirect_thunk (bool need_bnd_p, int regno)
-+output_indirect_thunk (bool need_bnd_p, unsigned int regno)
- {
-   char indirectlabel1[32];
-   char indirectlabel2[32];
-@@ -11196,7 +11196,7 @@ output_indirect_thunk (bool need_bnd_p, int regno)
- 
-   ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
- 
--  if (regno >= 0)
-+  if (regno != INVALID_REGNUM)
-     {
-       /* MOV.  */
-       rtx xops[2];
-@@ -11220,12 +11220,12 @@ output_indirect_thunk (bool need_bnd_p, int regno)
- }
- 
- /* Output a funtion with a call and return thunk for indirect branch.
--   If BND_P is true, the BND prefix is needed.   If REGNO != -1,  the
--   function address is in REGNO.  Otherwise, the function address is
-+   If BND_P is true, the BND prefix is needed.  If REGNO != INVALID_REGNUM,
-+   the function address is in REGNO.  Otherwise, the function address is
-    on the top of stack.  */
- 
- static void
--output_indirect_thunk_function (bool need_bnd_p, int regno)
-+output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- {
-   char name[32];
-   tree decl;
-@@ -11274,7 +11274,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- 	ASM_OUTPUT_LABEL (asm_out_file, name);
-       }
- 
--  if (regno < 0)
-+  if (regno == INVALID_REGNUM)
-     {
-       /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd.  */
-       char alias[32];
-@@ -11348,16 +11348,16 @@ static void
- ix86_code_end (void)
- {
-   rtx xops[2];
--  int regno;
-+  unsigned int regno;
- 
-   if (indirect_thunk_needed)
--    output_indirect_thunk_function (false, -1);
-+    output_indirect_thunk_function (false, INVALID_REGNUM);
-   if (indirect_thunk_bnd_needed)
--    output_indirect_thunk_function (true, -1);
-+    output_indirect_thunk_function (true, INVALID_REGNUM);
- 
-   for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
-     {
--      int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+      unsigned int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-       if ((indirect_thunks_used & (1 << i)))
- 	output_indirect_thunk_function (false, regno);
- 
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
deleted file mode 100644
index 080d741..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From c4300d9ad683e693c90d02d4f1b13183bf2d4acc Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 2 Feb 2018 16:47:02 +0000
-Subject: [PATCH 10/12] i386: Pass INVALID_REGNUM as invalid register number
-
-	Backport from mainline
-	* config/i386/i386.c (ix86_output_function_return): Pass
-	INVALID_REGNUM, instead of -1, as invalid register number to
-	indirect_thunk_name and output_indirect_thunk.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257341 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 4012657..66502ee 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -28056,7 +28056,8 @@ ix86_output_function_return (bool long_p)
- 	{
- 	  bool need_thunk = (cfun->machine->function_return_type
- 			     == indirect_branch_thunk);
--	  indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+	  indirect_thunk_name (thunk_name, INVALID_REGNUM, need_bnd_p,
-+			       true);
- 	  if (need_bnd_p)
- 	    {
- 	      indirect_thunk_bnd_needed |= need_thunk;
-@@ -28069,7 +28070,7 @@ ix86_output_function_return (bool long_p)
- 	    }
- 	}
-       else
--	output_indirect_thunk (need_bnd_p, -1);
-+	output_indirect_thunk (need_bnd_p, INVALID_REGNUM);
- 
-       return "";
-     }
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch
deleted file mode 100644
index 3b036fb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch
+++ /dev/null
@@ -1,453 +0,0 @@
-From b3a2269c7884378a9afd394ac7e669aab0443b57 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 15:29:30 +0000
-Subject: [PATCH 11/12] i386: Update -mfunction-return= for return with pop
-
-When -mfunction-return= is used, simple_return_pop_internal should pop
-return address into ECX register, adjust stack by bytes to pop from stack
-and jump to the return thunk via ECX register.
-
-Revision 257992 removed the bool argument from ix86_output_indirect_jmp.
-Update comments to reflect it.
-
-Tested on i686 and x86-64.
-
-	Backport from mainline
-	* config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
-
-	PR target/84530
-	* config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
-	the bool argument.
-	(ix86_output_indirect_function_return): New prototype.
-	(ix86_split_simple_return_pop_internal): Likewise.
-	* config/i386/i386.c (indirect_return_via_cx): New.
-	(indirect_return_via_cx_bnd): Likewise.
-	(indirect_thunk_name): Handle return va CX_REG.
-	(output_indirect_thunk_function): Create alias for
-	__x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
-	(ix86_output_indirect_jmp): Remove the bool argument.
-	(ix86_output_indirect_function_return): New function.
-	(ix86_split_simple_return_pop_internal): Likewise.
-	* config/i386/i386.md (*indirect_jump): Don't pass false
-	to ix86_output_indirect_jmp.
-	(*tablejump_1): Likewise.
-	(simple_return_pop_internal): Change it to define_insn_and_split.
-	Call ix86_split_simple_return_pop_internal to split it for
-	-mfunction-return=.
-	(simple_return_indirect_internal): Call
-	ix86_output_indirect_function_return instead of
-	ix86_output_indirect_jmp.
-
-gcc/testsuite/
-
-	Backport from mainline
-	PR target/84530
-	* gcc.target/i386/ret-thunk-22.c: New test.
-	* gcc.target/i386/ret-thunk-23.c: Likewise.
-	* gcc.target/i386/ret-thunk-24.c: Likewise.
-	* gcc.target/i386/ret-thunk-25.c: Likewise.
-	* gcc.target/i386/ret-thunk-26.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-protos.h                |   4 +-
- gcc/config/i386/i386.c                       | 127 +++++++++++++++++++++++----
- gcc/config/i386/i386.md                      |  11 ++-
- gcc/testsuite/gcc.target/i386/ret-thunk-22.c |  15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-23.c |  15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-24.c |  15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-25.c |  15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-26.c |  40 +++++++++
- 8 files changed, 222 insertions(+), 20 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-22.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-23.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-24.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-25.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index 620d70e..c7a0ccb5 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,8 +311,10 @@ extern enum attr_cpu ix86_schedule;
- #endif
- 
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
--extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_indirect_jmp (rtx call_op);
- extern const char * ix86_output_function_return (bool long_p);
-+extern const char * ix86_output_indirect_function_return (rtx ret_op);
-+extern void ix86_split_simple_return_pop_internal (rtx);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- 						enum machine_mode mode);
- 
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 66502ee..21c3c18 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11080,6 +11080,12 @@ static int indirect_thunks_used;
-    by call and return thunks functions with the BND prefix.  */
- static int indirect_thunks_bnd_used;
- 
-+/* True if return thunk function via CX is needed.  */
-+static bool indirect_return_via_cx;
-+/* True if return thunk function via CX with the BND prefix is
-+   needed.  */
-+static bool indirect_return_via_cx_bnd;
-+
- #ifndef INDIRECT_LABEL
- # define INDIRECT_LABEL "LIND"
- #endif
-@@ -11090,12 +11096,13 @@ static void
- indirect_thunk_name (char name[32], unsigned int regno,
- 		     bool need_bnd_p, bool ret_p)
- {
--  if (regno != INVALID_REGNUM && ret_p)
-+  if (regno != INVALID_REGNUM && regno != CX_REG && ret_p)
-     gcc_unreachable ();
- 
-   if (USE_HIDDEN_LINKONCE)
-     {
-       const char *bnd = need_bnd_p ? "_bnd" : "";
-+      const char *ret = ret_p ? "return" : "indirect";
-       if (regno != INVALID_REGNUM)
- 	{
- 	  const char *reg_prefix;
-@@ -11103,14 +11110,11 @@ indirect_thunk_name (char name[32], unsigned int regno,
- 	    reg_prefix = TARGET_64BIT ? "r" : "e";
- 	  else
- 	    reg_prefix = "";
--	  sprintf (name, "__x86_indirect_thunk%s_%s%s",
--		   bnd, reg_prefix, reg_names[regno]);
-+	  sprintf (name, "__x86_%s_thunk%s_%s%s",
-+		   ret, bnd, reg_prefix, reg_names[regno]);
- 	}
-       else
--	{
--	  const char *ret = ret_p ? "return" : "indirect";
--	  sprintf (name, "__x86_%s_thunk%s", ret, bnd);
--	}
-+	sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-     }
-   else
-     {
-@@ -11274,9 +11278,23 @@ output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- 	ASM_OUTPUT_LABEL (asm_out_file, name);
-       }
- 
-+  /* Create alias for __x86_return_thunk/__x86_return_thunk_bnd or
-+     __x86_return_thunk_ecx/__x86_return_thunk_ecx_bnd.  */
-+  bool need_alias;
-   if (regno == INVALID_REGNUM)
-+    need_alias = true;
-+  else if (regno == CX_REG)
-+    {
-+      if (need_bnd_p)
-+	need_alias = indirect_return_via_cx_bnd;
-+      else
-+	need_alias = indirect_return_via_cx;
-+    }
-+  else
-+    need_alias = false;
-+
-+  if (need_alias)
-     {
--      /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd.  */
-       char alias[32];
- 
-       indirect_thunk_name (alias, regno, need_bnd_p, true);
-@@ -28019,18 +28037,17 @@ ix86_output_indirect_branch (rtx call_op, const char *xasm,
-   else
-     ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
- }
--/* Output indirect jump.  CALL_OP is the jump target.  Jump is a
--   function return if RET_P is true.  */
-+
-+/* Output indirect jump.  CALL_OP is the jump target.  */
- 
- const char *
--ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+ix86_output_indirect_jmp (rtx call_op)
- {
-   if (cfun->machine->indirect_branch_type != indirect_branch_keep)
-     {
--      /* We can't have red-zone if this isn't a function return since
--	 "call" in the indirect thunk pushes the return address onto
--	 stack, destroying red-zone.  */
--      if (!ret_p && ix86_red_zone_size != 0)
-+      /* We can't have red-zone since "call" in the indirect thunk
-+         pushes the return address onto stack, destroying red-zone.  */
-+      if (ix86_red_zone_size != 0)
- 	gcc_unreachable ();
- 
-       ix86_output_indirect_branch (call_op, "%0", true);
-@@ -28081,6 +28098,86 @@ ix86_output_function_return (bool long_p)
-   return "rep%; ret";
- }
- 
-+/* Output indirect function return.  RET_OP is the function return
-+   target.  */
-+
-+const char *
-+ix86_output_indirect_function_return (rtx ret_op)
-+{
-+  if (cfun->machine->function_return_type != indirect_branch_keep)
-+    {
-+      char thunk_name[32];
-+      bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+      unsigned int regno = REGNO (ret_op);
-+      gcc_assert (regno == CX_REG);
-+
-+      if (cfun->machine->function_return_type
-+	  != indirect_branch_thunk_inline)
-+	{
-+	  bool need_thunk = (cfun->machine->function_return_type
-+			     == indirect_branch_thunk);
-+	  indirect_thunk_name (thunk_name, regno, need_bnd_p, true);
-+	  if (need_bnd_p)
-+	    {
-+	      if (need_thunk)
-+		{
-+		  indirect_return_via_cx_bnd = true;
-+		  indirect_thunks_bnd_used |= 1 << CX_REG;
-+		}
-+	      fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+	    }
-+	  else
-+	    {
-+	      if (need_thunk)
-+		{
-+		  indirect_return_via_cx = true;
-+		  indirect_thunks_used |= 1 << CX_REG;
-+		}
-+	      fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+	    }
-+	}
-+      else
-+	output_indirect_thunk (need_bnd_p, regno);
-+
-+      return "";
-+    }
-+  else
-+    return "%!jmp\t%A0";
-+}
-+
-+/* Split simple return with popping POPC bytes from stack to indirect
-+   branch with stack adjustment .  */
-+
-+void
-+ix86_split_simple_return_pop_internal (rtx popc)
-+{
-+  struct machine_function *m = cfun->machine;
-+  rtx ecx = gen_rtx_REG (SImode, CX_REG);
-+  rtx_insn *insn;
-+
-+  /* There is no "pascal" calling convention in any 64bit ABI.  */
-+  gcc_assert (!TARGET_64BIT);
-+
-+  insn = emit_insn (gen_pop (ecx));
-+  m->fs.cfa_offset -= UNITS_PER_WORD;
-+  m->fs.sp_offset -= UNITS_PER_WORD;
-+
-+  rtx x = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+  x = gen_rtx_SET (stack_pointer_rtx, x);
-+  add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+  add_reg_note (insn, REG_CFA_REGISTER, gen_rtx_SET (ecx, pc_rtx));
-+  RTX_FRAME_RELATED_P (insn) = 1;
-+
-+  x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, popc);
-+  x = gen_rtx_SET (stack_pointer_rtx, x);
-+  insn = emit_insn (x);
-+  add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+  RTX_FRAME_RELATED_P (insn) = 1;
-+
-+  /* Now return address is in ECX.  */
-+  emit_jump_insn (gen_simple_return_indirect_internal (ecx));
-+}
-+
- /* Output the assembly for a call instruction.  */
- 
- const char *
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 05a88ff..857466a 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11813,7 +11813,7 @@
- (define_insn "*indirect_jump"
-   [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
-   ""
--  "* return ix86_output_indirect_jmp (operands[0], false);"
-+  "* return ix86_output_indirect_jmp (operands[0]);"
-   [(set (attr "type")
-      (if_then_else (match_test "(cfun->machine->indirect_branch_type
- 				 != indirect_branch_keep)")
-@@ -11868,7 +11868,7 @@
-   [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
-    (use (label_ref (match_operand 1)))]
-   ""
--  "* return ix86_output_indirect_jmp (operands[0], false);"
-+  "* return ix86_output_indirect_jmp (operands[0]);"
-   [(set (attr "type")
-      (if_then_else (match_test "(cfun->machine->indirect_branch_type
- 				 != indirect_branch_keep)")
-@@ -12520,11 +12520,14 @@
-    (set_attr "prefix_rep" "1")
-    (set_attr "modrm" "0")])
- 
--(define_insn "simple_return_pop_internal"
-+(define_insn_and_split "simple_return_pop_internal"
-   [(simple_return)
-    (use (match_operand:SI 0 "const_int_operand"))]
-   "reload_completed"
-   "%!ret\t%0"
-+  "&& cfun->machine->function_return_type != indirect_branch_keep"
-+  [(const_int 0)]
-+  "ix86_split_simple_return_pop_internal (operands[0]); DONE;"
-   [(set_attr "length" "3")
-    (set_attr "atom_unit" "jeu")
-    (set_attr "length_immediate" "2")
-@@ -12535,7 +12538,7 @@
-   [(simple_return)
-    (use (match_operand:SI 0 "register_operand" "r"))]
-   "reload_completed"
--  "* return ix86_output_indirect_jmp (operands[0], true);"
-+  "* return ix86_output_indirect_function_return (operands[0]);"
-   [(set (attr "type")
-      (if_then_else (match_test "(cfun->machine->indirect_branch_type
- 				 != indirect_branch_keep)")
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-22.c b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-new file mode 100644
-index 0000000..89e086d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-23.c b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-new file mode 100644
-index 0000000..43f0cca
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not {\tpause} } } */
-+/* { dg-final { scan-assembler-not {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-24.c b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-new file mode 100644
-index 0000000..8729e35
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-new file mode 100644
-index 0000000..f73553c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_bnd_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-26.c b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-new file mode 100644
-index 0000000..9144e98
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-@@ -0,0 +1,40 @@
-+/* PR target/r84530 */
-+/* { dg-do run } */
-+/* { dg-options "-Os -mfunction-return=thunk" } */
-+
-+struct S { int i; };
-+__attribute__((const, noinline, noclone))
-+struct S foo (int x)
-+{
-+  struct S s;
-+  s.i = x;
-+  return s;
-+}
-+
-+int a[2048], b[2048], c[2048], d[2048];
-+struct S e[2048];
-+
-+__attribute__((noinline, noclone)) void
-+bar (void)
-+{
-+  int i;
-+  for (i = 0; i < 1024; i++)
-+    {
-+      e[i] = foo (i);
-+      a[i+2] = a[i] + a[i+1];
-+      b[10] = b[10] + i;
-+      c[i] = c[2047 - i];
-+      d[i] = d[i + 1];
-+    }
-+}
-+
-+int
-+main ()
-+{
-+  int i;
-+  bar ();
-+  for (i = 0; i < 1024; i++)
-+    if (e[i].i != i)
-+      __builtin_abort ();
-+  return 0;
-+}
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
deleted file mode 100644
index b50ac5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
+++ /dev/null
@@ -1,1004 +0,0 @@
-From 7ba192d11a43d24ce427a3dfce0ad0592bd52830 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 17:00:46 +0000
-Subject: [PATCH 12/12] i386: Add TARGET_INDIRECT_BRANCH_REGISTER
-
-For
-
----
-struct C {
-  virtual ~C();
-  virtual void f();
-};
-
-void
-f (C *p)
-{
-  p->f();
-  p->f();
-}
----
-
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
-        .cfi_startproc
-        pushq   %rbx
-        .cfi_def_cfa_offset 16
-        .cfi_offset 3, -16
-        movq    (%rdi), %rax
-        movq    %rdi, %rbx
-        jmp     .LIND1
-.LIND0:
-        pushq   16(%rax)
-        jmp     __x86_indirect_thunk
-.LIND1:
-        call    .LIND0
-        movq    (%rbx), %rax
-        movq    %rbx, %rdi
-        popq    %rbx
-        .cfi_def_cfa_offset 8
-        movq    16(%rax), %rax
-        jmp     __x86_indirect_thunk_rax
-        .cfi_endproc
-
-x86-64 is supposed to have asynchronous unwind tables by default, but
-there is nothing that reflects the change in the (relative) frame
-address after .LIND0.  That region really has to be moved outside of
-the .cfi_startproc/.cfi_endproc bracket.
-
-This patch adds TARGET_INDIRECT_BRANCH_REGISTER to force indirect
-branch via register whenever -mindirect-branch= is used.  Now,
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
-	.cfi_startproc
-	pushq	%rbx
-	.cfi_def_cfa_offset 16
-	.cfi_offset 3, -16
-	movq	(%rdi), %rax
-	movq	%rdi, %rbx
-	movq	16(%rax), %rax
-	call	__x86_indirect_thunk_rax
-	movq	(%rbx), %rax
-	movq	%rbx, %rdi
-	popq	%rbx
-	.cfi_def_cfa_offset 8
-	movq	16(%rax), %rax
-	jmp	__x86_indirect_thunk_rax
-	.cfi_endproc
-
-so that "-mindirect-branch=thunk-extern" is equivalent to
-"-mindirect-branch=thunk-extern -mindirect-branch-register", which is
-used by Linux kernel.
-
-gcc/
-
-	Backport from mainline
-	PR target/84039
-	* config/i386/constraints.md (Bs): Replace
-	ix86_indirect_branch_register with
-	TARGET_INDIRECT_BRANCH_REGISTER.
-	(Bw): Likewise.
-	* config/i386/i386.md (indirect_jump): Likewise.
-	(tablejump): Likewise.
-	(*sibcall_memory): Likewise.
-	(*sibcall_value_memory): Likewise.
-	Peepholes of indirect call and jump via memory: Likewise.
-	(*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
-	(*sibcall_value_GOT_32): Likewise.
-	* config/i386/predicates.md (indirect_branch_operand): Likewise.
-	(GOT_memory_operand): Likewise.
-	(call_insn_operand): Likewise.
-	(sibcall_insn_operand): Likewise.
-	(GOT32_symbol_operand): Likewise.
-	* config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
-
-gcc/testsuite/
-
-	Backport from mainline
-	PR target/84039
-	* gcc.target/i386/indirect-thunk-1.c: Updated.
-	* gcc.target/i386/indirect-thunk-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
-	* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
-	* gcc.target/i386/ret-thunk-9.c: Likewise.
-	* gcc.target/i386/ret-thunk-10.c: Likewise.
-	* gcc.target/i386/ret-thunk-11.c: Likewise.
-	* gcc.target/i386/ret-thunk-12.c: Likewise.
-	* gcc.target/i386/ret-thunk-13.c: Likewise.
-	* gcc.target/i386/ret-thunk-14.c: Likewise.
-	* gcc.target/i386/ret-thunk-15.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/constraints.md                     |  4 ++--
- gcc/config/i386/i386.h                             |  5 ++++
- gcc/config/i386/i386.md                            | 28 +++++++++++++---------
- gcc/config/i386/predicates.md                      |  6 ++---
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c   |  5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c   |  5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c   |  5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c   |  5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c   |  6 +++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c   | 12 ++++++----
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c   |  5 ++--
- .../gcc.target/i386/indirect-thunk-attr-1.c        |  5 ++--
- .../gcc.target/i386/indirect-thunk-attr-2.c        |  5 ++--
- .../gcc.target/i386/indirect-thunk-attr-3.c        |  3 +--
- .../gcc.target/i386/indirect-thunk-attr-4.c        |  3 +--
- .../gcc.target/i386/indirect-thunk-attr-5.c        |  9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-6.c        |  9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-7.c        |  5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-1.c         |  6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-2.c         |  6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-3.c         |  5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-4.c         |  7 +++---
- .../gcc.target/i386/indirect-thunk-extern-1.c      |  5 ++--
- .../gcc.target/i386/indirect-thunk-extern-2.c      |  5 ++--
- .../gcc.target/i386/indirect-thunk-extern-3.c      |  9 ++++---
- .../gcc.target/i386/indirect-thunk-extern-4.c      |  6 ++---
- .../gcc.target/i386/indirect-thunk-extern-5.c      |  6 +++--
- .../gcc.target/i386/indirect-thunk-extern-6.c      |  8 +++----
- .../gcc.target/i386/indirect-thunk-extern-7.c      |  5 ++--
- .../gcc.target/i386/indirect-thunk-inline-1.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c      |  2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c      |  3 ++-
- .../gcc.target/i386/indirect-thunk-inline-6.c      |  3 ++-
- .../gcc.target/i386/indirect-thunk-inline-7.c      |  4 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c       |  9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c       |  9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c       |  8 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c       |  5 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c       |  7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c       |  7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c        | 13 ++++------
- 43 files changed, 128 insertions(+), 141 deletions(-)
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 9204c8e..ef684a9 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,7 +172,7 @@
- 
- (define_constraint "Bs"
-   "@internal Sibcall memory operand."
--  (ior (and (not (match_test "ix86_indirect_branch_register"))
-+  (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- 	    (not (match_test "TARGET_X32"))
- 	    (match_operand 0 "sibcall_memory_operand"))
-        (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -180,7 +180,7 @@
- 
- (define_constraint "Bw"
-   "@internal Call memory operand."
--  (ior (and (not (match_test "ix86_indirect_branch_register"))
-+  (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- 	    (not (match_test "TARGET_X32"))
- 	    (match_operand 0 "memory_operand"))
-        (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index b34bc11..1816d71 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2676,6 +2676,11 @@ extern void debug_dispatch_window (int);
- #define TARGET_RECIP_VEC_DIV	((recip_mask & RECIP_MASK_VEC_DIV) != 0)
- #define TARGET_RECIP_VEC_SQRT	((recip_mask & RECIP_MASK_VEC_SQRT) != 0)
- 
-+
-+#define TARGET_INDIRECT_BRANCH_REGISTER \
-+  (ix86_indirect_branch_register \
-+   || cfun->machine->indirect_branch_type != indirect_branch_keep)
-+
- #define IX86_HLE_ACQUIRE (1 << 16)
- #define IX86_HLE_RELEASE (1 << 17)
- 
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 857466a..6a6dc26 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
-   [(set (pc) (match_operand 0 "indirect_branch_operand"))]
-   ""
- {
--  if (TARGET_X32 || ix86_indirect_branch_register)
-+  if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
-     operands[0] = convert_memory_address (word_mode, operands[0]);
-   cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- 					 OPTAB_DIRECT);
-     }
- 
--  if (TARGET_X32 || ix86_indirect_branch_register)
-+  if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
-     operands[0] = convert_memory_address (word_mode, operands[0]);
-   cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12029,7 +12029,10 @@
- 		     (match_operand:SI 0 "register_no_elim_operand" "U")
- 		     (match_operand:SI 1 "GOT32_symbol_operand"))))
- 	 (match_operand 2))]
--  "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+  "!TARGET_MACHO
-+  && !TARGET_64BIT
-+  && !TARGET_INDIRECT_BRANCH_REGISTER
-+  && SIBLING_CALL_P (insn)"
- {
-   rtx fnaddr = gen_rtx_PLUS (Pmode, operands[0], operands[1]);
-   fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12048,7 +12051,7 @@
-   [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- 	 (match_operand 1))
-    (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
--  "!TARGET_X32 && !ix86_indirect_branch_register"
-+  "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
-   "* return ix86_output_call_insn (insn, operands[0]);"
-   [(set_attr "type" "call")])
- 
-@@ -12058,7 +12061,7 @@
-    (call (mem:QI (match_dup 0))
- 	 (match_operand 3))]
-   "!TARGET_X32
--   && !ix86_indirect_branch_register
-+   && !TARGET_INDIRECT_BRANCH_REGISTER
-    && SIBLING_CALL_P (peep2_next_insn (1))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12073,7 +12076,7 @@
-    (call (mem:QI (match_dup 0))
- 	 (match_operand 3))]
-   "!TARGET_X32
--   && !ix86_indirect_branch_register
-+   && !TARGET_INDIRECT_BRANCH_REGISTER
-    && SIBLING_CALL_P (peep2_next_insn (2))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-@@ -12171,7 +12174,7 @@
-         (match_operand:W 1 "memory_operand"))
-    (set (pc) (match_dup 0))]
-   "!TARGET_X32
--   && !ix86_indirect_branch_register
-+   && !TARGET_INDIRECT_BRANCH_REGISTER
-    && peep2_reg_dead_p (2, operands[0])"
-   [(set (pc) (match_dup 1))])
- 
-@@ -12229,7 +12232,10 @@
- 			  (match_operand:SI 1 "register_no_elim_operand" "U")
- 			  (match_operand:SI 2 "GOT32_symbol_operand"))))
- 	 (match_operand 3)))]
--  "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+  "!TARGET_MACHO
-+   && !TARGET_64BIT
-+   && !TARGET_INDIRECT_BRANCH_REGISTER
-+   && SIBLING_CALL_P (insn)"
- {
-   rtx fnaddr = gen_rtx_PLUS (Pmode, operands[1], operands[2]);
-   fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12250,7 +12256,7 @@
-  	(call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- 	      (match_operand 2)))
-    (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
--  "!TARGET_X32 && !ix86_indirect_branch_register"
-+  "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
-   "* return ix86_output_call_insn (insn, operands[1]);"
-   [(set_attr "type" "callv")])
- 
-@@ -12261,7 +12267,7 @@
-    (call (mem:QI (match_dup 0))
- 		 (match_operand 3)))]
-   "!TARGET_X32
--   && !ix86_indirect_branch_register
-+   && !TARGET_INDIRECT_BRANCH_REGISTER
-    && SIBLING_CALL_P (peep2_next_insn (1))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12278,7 +12284,7 @@
- 	(call (mem:QI (match_dup 0))
- 	      (match_operand 3)))]
-   "!TARGET_X32
--   && !ix86_indirect_branch_register
-+   && !TARGET_INDIRECT_BRANCH_REGISTER
-    && SIBLING_CALL_P (peep2_next_insn (2))
-    && !reg_mentioned_p (operands[0],
- 			CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index d1f0a7d..5f8a98f 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,7 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
-   (ior (match_operand 0 "register_operand")
--       (and (not (match_test "ix86_indirect_branch_register"))
-+       (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- 	    (not (match_test "TARGET_X32"))
- 	    (match_operand 0 "memory_operand"))))
- 
-@@ -637,7 +637,7 @@
-   (ior (match_test "constant_call_address_operand
- 		     (op, mode == VOIDmode ? mode : Pmode)")
-        (match_operand 0 "call_register_no_elim_operand")
--       (and (not (match_test "ix86_indirect_branch_register"))
-+       (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- 	    (ior (and (not (match_test "TARGET_X32"))
- 		      (match_operand 0 "memory_operand"))
- 		 (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -648,7 +648,7 @@
-   (ior (match_test "constant_call_address_operand
- 		     (op, mode == VOIDmode ? mode : Pmode)")
-        (match_operand 0 "register_no_elim_operand")
--       (and (not (match_test "ix86_indirect_branch_register"))
-+       (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- 	    (ior (and (not (match_test "TARGET_X32"))
- 		      (match_operand 0 "sibcall_memory_operand"))
- 		 (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index 60d0988..6e94d2c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index aac7516..3c46707 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 9e24a38..2c7fb52 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 127b5d9..0d3f895 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index fcaa18d..fb26c00 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -9,8 +9,10 @@ foo (void)
-   bar ();
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index e464928..aa03fbd 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -10,9 +10,13 @@ foo (void)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index 17c2d0f..3c72036 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -35,9 +35,8 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 9194ccf..7106407 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e51f261..27c7e5b 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 4aeec18..89a2bac 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -14,10 +14,9 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index ac0e599..3eb83c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -13,10 +13,9 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 573cf1e..0098dd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index b2b37fc..ece8de1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -13,9 +13,8 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4a43e19..d53fc88 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -36,9 +36,8 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index ac84ab6..73d16ba 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -10,9 +10,9 @@ foo (void)
-   dispatch (buf);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index ce655e8..856751a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -11,10 +11,8 @@ foo (void)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index d34485a..42312f6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -10,8 +10,9 @@ foo (void)
-   bar (buf);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 0e19830..c8ca102 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -11,10 +11,9 @@ foo (void)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 1 } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 579441f..c09dd0a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index c92e6f2..826425a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index d9964c2..3856268 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index d4dca4d..1ae49b1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -12,9 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 5c07e02..5328239 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -9,8 +9,10 @@ foo (void)
-   bar ();
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 3eb4406..8ae4348 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -10,8 +10,8 @@ foo (void)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index aece938..2b9a33e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -35,9 +35,8 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3aba5e8..869d904 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch(offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index 0f0181d..c5c16ed 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
-   dispatch[offset](offset);
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 2eef6f3..4a63ebe 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index e825a10..a395ffc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index c6d77e1..21cbfd3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -9,7 +9,8 @@ foo (void)
-   bar ();
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index 6454827..d1300f1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -10,7 +10,8 @@ foo (void)
-   return 0;
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index c67066c..ea00924 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -35,8 +35,8 @@ bar (int i)
-     }
- }
- 
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index e6fea84..af9023a 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } }  } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } }  } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } }  } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index e239ec4..ba467c5 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } }  } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } }  } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index fa31813..43e57ca 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -15,8 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } }  } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } }  } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index fd5b41f..55f156c 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -14,9 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index d606373..1c79043 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } }  } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 75e45e2..58aba31 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index d1db41c..d2df8b8 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -14,11 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
--/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
deleted file mode 100644
index 47bcd8e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0fa7102d76376b27ae4bbc10848600aac6ed71d2 Mon Sep 17 00:00:00 2001
-From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 17 Jul 2017 19:41:08 +0000
-Subject: [PATCH] 	Backported from mainline 	2017-07-14  Jakub
- Jelinek  <jakub@redhat.com>
-
-	PR sanitizer/81066
-	* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
-	* sanitizer_common/sanitizer_linux.cc: Likewise.
-	* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
-	* tsan/tsan_platform_linux.cc: Likewise.
-
-[Romain cherry-pick on gcc-6-branch from gcc-7-branch]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
----
- libsanitizer/sanitizer_common/sanitizer_linux.cc                      | 3 +--
- libsanitizer/sanitizer_common/sanitizer_linux.h                       | 4 +---
- libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
- libsanitizer/tsan/tsan_platform_linux.cc                              | 2 +-
- 4 files changed, 4 insertions(+), 7 deletions(-)
-
-diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
-index 2cefa20..223d9c6 100644
---- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
-+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
-@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
- }
- #endif
- 
--uptr internal_sigaltstack(const struct sigaltstack *ss,
--                         struct sigaltstack *oss) {
-+uptr internal_sigaltstack(const void *ss, void *oss) {
-   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
- }
- 
-diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
-index 4497702..1594058 100644
---- a/libsanitizer/sanitizer_common/sanitizer_linux.h
-+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
-@@ -19,7 +19,6 @@
- #include "sanitizer_platform_limits_posix.h"
- 
- struct link_map;  // Opaque type returned by dlopen().
--struct sigaltstack;
- 
- namespace __sanitizer {
- // Dirent structure for getdents(). Note that this structure is different from
-@@ -28,8 +27,7 @@ struct linux_dirent;
- 
- // Syscall wrappers.
- uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
--uptr internal_sigaltstack(const struct sigaltstack* ss,
--                          struct sigaltstack* oss);
-+uptr internal_sigaltstack(const void* ss, void* oss);
- uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
-     __sanitizer_sigset_t *oldset);
- void internal_sigfillset(__sanitizer_sigset_t *set);
-diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-index c919e4f..014162af 100644
---- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
- 
-   // Alternate stack for signal handling.
-   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
--  struct sigaltstack handler_stack;
-+  stack_t handler_stack;
-   internal_memset(&handler_stack, 0, sizeof(handler_stack));
-   handler_stack.ss_sp = handler_stack_memory.data();
-   handler_stack.ss_size = kHandlerStackSize;
-diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
-index 09cec5f..908f4fe 100644
---- a/libsanitizer/tsan/tsan_platform_linux.cc
-+++ b/libsanitizer/tsan/tsan_platform_linux.cc
-@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
- int ExtractResolvFDs(void *state, int *fds, int nfd) {
- #if SANITIZER_LINUX
-   int cnt = 0;
--  __res_state *statp = (__res_state*)state;
-+  struct __res_state *statp = (struct __res_state*)state;
-   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
-     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
-       fds[cnt++] = statp->_u._ext.nssocks[i];
--- 
-2.9.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch
deleted file mode 100644
index 3cdbb2d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From 59a0e4bd8391962f62600ae3ac95ab0fba74d464 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 4 Aug 2016 16:53:18 +0000
-Subject: [PATCH] Fix for PR71696 in Libiberty Demangler
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[BZ #71696] -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696
-
-2016-08-04  Marcel Böhme  <boehme.marcel@gmail.com>
-
-	PR c++/71696
-	* cplus-dem.c: Prevent infinite recursion when there is a cycle
-	in the referencing of remembered mangled types.
-	(work_stuff): New stack to keep track of the remembered mangled
-	types that are currently being processed.
-	(push_processed_type): New method to push currently processed
-	remembered type onto the stack.
-	(pop_processed_type): New method to pop currently processed
-	remembered type from the stack.
-	(work_stuff_copy_to_from): Copy values of new variables.
-	(delete_non_B_K_work_stuff): Free stack memory.
-	(demangle_args): Push/Pop currently processed remembered type.
-	(do_type): Do not demangle a cyclic reference and push/pop
-	referenced remembered type.
-
-cherry-picked from commit of
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport [master]
-CVE: CVE-2016-6131
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- libiberty/ChangeLog                   | 17 ++++++++
- libiberty/cplus-dem.c                 | 78 ++++++++++++++++++++++++++++++++---
- libiberty/testsuite/demangle-expected | 18 ++++++++
- 3 files changed, 108 insertions(+), 5 deletions(-)
-
-Index: gcc-6.4.0/libiberty/cplus-dem.c
-===================================================================
---- gcc-6.4.0.orig/libiberty/cplus-dem.c
-+++ gcc-6.4.0/libiberty/cplus-dem.c
-@@ -144,6 +144,9 @@ struct work_stuff
-   string* previous_argument; /* The last function argument demangled.  */
-   int nrepeats;         /* The number of times to repeat the previous
- 			   argument.  */
-+  int *proctypevec;     /* Indices of currently processed remembered typevecs.  */
-+  int proctypevec_size;
-+  int nproctypes;
- };
- 
- #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI)
-@@ -435,6 +438,10 @@ iterate_demangle_function (struct work_s
- 
- static void remember_type (struct work_stuff *, const char *, int);
- 
-+static void push_processed_type (struct work_stuff *, int);
-+
-+static void pop_processed_type (struct work_stuff *);
-+
- static void remember_Btype (struct work_stuff *, const char *, int, int);
- 
- static int register_Btype (struct work_stuff *);
-@@ -1301,6 +1308,10 @@ work_stuff_copy_to_from (struct work_stu
-       memcpy (to->btypevec[i], from->btypevec[i], len);
-     }
- 
-+  if (from->proctypevec)
-+    to->proctypevec =
-+      XDUPVEC (int, from->proctypevec, from->proctypevec_size);
-+
-   if (from->ntmpl_args)
-     to->tmpl_argvec = XNEWVEC (char *, from->ntmpl_args);
- 
-@@ -1329,11 +1340,17 @@ delete_non_B_K_work_stuff (struct work_s
-   /* Discard the remembered types, if any.  */
- 
-   forget_types (work);
--  if (work -> typevec != NULL)
-+  if (work->typevec != NULL)
-     {
--      free ((char *) work -> typevec);
--      work -> typevec = NULL;
--      work -> typevec_size = 0;
-+      free ((char *) work->typevec);
-+      work->typevec = NULL;
-+      work->typevec_size = 0;
-+    }
-+  if (work->proctypevec != NULL)
-+    {
-+      free (work->proctypevec);
-+      work->proctypevec = NULL;
-+      work->proctypevec_size = 0;
-     }
-   if (work->tmpl_argvec)
-     {
-@@ -3552,6 +3569,8 @@ static int
- do_type (struct work_stuff *work, const char **mangled, string *result)
- {
-   int n;
-+  int i;
-+  int is_proctypevec;
-   int done;
-   int success;
-   string decl;
-@@ -3564,6 +3583,7 @@ do_type (struct work_stuff *work, const
- 
-   done = 0;
-   success = 1;
-+  is_proctypevec = 0;
-   while (success && !done)
-     {
-       int member;
-@@ -3616,8 +3636,15 @@ do_type (struct work_stuff *work, const
- 	      success = 0;
- 	    }
- 	  else
-+	    for (i = 0; i < work->nproctypes; i++)
-+	      if (work -> proctypevec [i] == n)
-+	        success = 0;
-+
-+	  if (success)
- 	    {
--	      remembered_type = work -> typevec[n];
-+	      is_proctypevec = 1;
-+	      push_processed_type (work, n);
-+	      remembered_type = work->typevec[n];
- 	      mangled = &remembered_type;
- 	    }
- 	  break;
-@@ -3840,6 +3867,9 @@ do_type (struct work_stuff *work, const
-     string_delete (result);
-   string_delete (&decl);
- 
-+  if (is_proctypevec)
-+    pop_processed_type (work);
-+
-   if (success)
-     /* Assume an integral type, if we're not sure.  */
-     return (int) ((tk == tk_none) ? tk_integral : tk);
-@@ -4252,6 +4282,41 @@ do_arg (struct work_stuff *work, const c
- }
- 
- static void
-+push_processed_type (struct work_stuff *work, int typevec_index)
-+{
-+  if (work->nproctypes >= work->proctypevec_size)
-+    {
-+      if (!work->proctypevec_size)
-+	{
-+	  work->proctypevec_size = 4;
-+	  work->proctypevec = XNEWVEC (int, work->proctypevec_size);
-+	}
-+      else
-+	{
-+	  if (work->proctypevec_size < 16)
-+	    /* Double when small.  */
-+	    work->proctypevec_size *= 2;
-+	  else
-+	    {
-+	      /* Grow slower when large.  */
-+	      if (work->proctypevec_size > (INT_MAX / 3) * 2)
-+                xmalloc_failed (INT_MAX);
-+              work->proctypevec_size = (work->proctypevec_size * 3 / 2);
-+	    }
-+          work->proctypevec
-+            = XRESIZEVEC (int, work->proctypevec, work->proctypevec_size);
-+	}
-+    }
-+    work->proctypevec [work->nproctypes++] = typevec_index;
-+}
-+
-+static void
-+pop_processed_type (struct work_stuff *work)
-+{
-+  work->nproctypes--;
-+}
-+
-+static void
- remember_type (struct work_stuff *work, const char *start, int len)
- {
-   char *tem;
-@@ -4515,10 +4580,13 @@ demangle_args (struct work_stuff *work,
- 		{
- 		  string_append (declp, ", ");
- 		}
-+	      push_processed_type (work, t);
- 	      if (!do_arg (work, &tem, &arg))
- 		{
-+		  pop_processed_type (work);
- 		  return (0);
- 		}
-+	      pop_processed_type (work);
- 	      if (PRINT_ARG_TYPES)
- 		{
- 		  string_appends (declp, &arg);
-Index: gcc-6.4.0/libiberty/testsuite/demangle-expected
-===================================================================
---- gcc-6.4.0.orig/libiberty/testsuite/demangle-expected
-+++ gcc-6.4.0/libiberty/testsuite/demangle-expected
-@@ -4491,3 +4491,21 @@ void eat<int*, Foo()::{lambda(auto:1*, a
- 
- _Z3eatIPiZ3BarIsEvvEUlPsPT_PT0_E0_EvRS3_RS5_
- void eat<int*, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}>(int*&, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}&)
-+#
-+# Tests write access violation PR70926
-+
-+0__Ot2m02R5T0000500000
-+0__Ot2m02R5T0000500000
-+#
-+
-+0__GT50000000000_
-+0__GT50000000000_
-+#
-+
-+__t2m05B500000000000000000_
-+__t2m05B500000000000000000_
-+#
-+# Tests stack overflow PR71696
-+
-+__10%0__S4_0T0T0
-+%0<>::%0(%0<>)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
index 2dc3db8..d968c32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -10,8 +10,8 @@
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.3:${FILE_DIRNAME}/gcc-7.3/backport:"
 
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
+DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
 
 LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
 
@@ -73,12 +73,12 @@
            file://0047-sync-gcc-stddef.h-with-musl.patch \
            file://0048-gcc-Enable-static-PIE.patch \
            file://fix-segmentation-fault-precompiled-hdr.patch \
-           file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
            file://no-sse-fix-test-case-failures.patch \
            ${BACKPORTS} \
 "
 BACKPORTS = "\
            file://0001-Fix-internal-compiler-error-in-testcase.patch \
+           file://0001-PR-rtl-optimization-83030.patch \
 "
 
 SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
@@ -101,7 +101,7 @@
     --disable-bootstrap \
     --disable-libmudflap \
     --with-system-zlib \
-    --with-linker-hash-style=${LINKER_HASH_STYLE} \
+    ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
     --enable-linker-build-id \
     --with-ppl=no \
     --with-cloog=no \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch
new file mode 100644
index 0000000..71f7988
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch
@@ -0,0 +1,272 @@
+From f5c4a9440f15ccf6775659910a2014a5494ee86e Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Nov 2017 21:43:22 +0000
+Subject: [PATCH] 	PR rtl-optimization/83030 	* doc/rtl.texi (Flags
+ in an RTL Expression): Alphabetize, add entry 	for CROSSING_JUMP_P and
+ mention usage of 'jump' for JUMP_INSNs. 	(Insns): Delete entry for
+ REG_CROSSING_JUMP in register notes. 	* bb-reorder.c
+ (update_crossing_jump_flags): Do not test whether the 	CROSSING_JUMP_P flag
+ is already set before setting it. 	* cfgrtl.c (fixup_partition_crossing):
+ Likewise. 	* reorg.c (relax_delay_slots): Do not consider a
+ CROSSING_JUMP_P insn 	as useless.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255083 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+
+This patch removes changes to Changelog from the original upstream patch.
+This will help us avoid conflicts.
+
+Original backport to GCC 7.x by Amruta Pawar <Amruta.Pawar@kpit.com>
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+---
+ gcc/bb-reorder.c |   5 +--
+ gcc/cfgrtl.c     |   3 +-
+ gcc/doc/rtl.texi | 129 ++++++++++++++++++++++++++++---------------------------
+ gcc/reorg.c      |   7 +--
+ 5 files changed, 84 insertions(+), 72 deletions(-)
+
+diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
+index 55e6dc6..794283c 100644
+--- a/gcc/bb-reorder.c
++++ b/gcc/bb-reorder.c
+@@ -2236,10 +2236,7 @@ update_crossing_jump_flags (void)
+     FOR_EACH_EDGE (e, ei, bb->succs)
+       if (e->flags & EDGE_CROSSING)
+ 	{
+-	  if (JUMP_P (BB_END (bb))
+-	      /* Some flags were added during fix_up_fall_thru_edges, via
+-		 force_nonfallthru_and_redirect.  */
+-	      && !CROSSING_JUMP_P (BB_END (bb)))
++	  if (JUMP_P (BB_END (bb)))
+ 	    CROSSING_JUMP_P (BB_END (bb)) = 1;
+ 	  break;
+ 	}
+diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
+index d6e5ac0..a2ad075 100644
+--- a/gcc/cfgrtl.c
++++ b/gcc/cfgrtl.c
+@@ -1334,8 +1334,7 @@ fixup_partition_crossing (edge e)
+   if (BB_PARTITION (e->src) != BB_PARTITION (e->dest))
+     {
+       e->flags |= EDGE_CROSSING;
+-      if (JUMP_P (BB_END (e->src))
+-	  && !CROSSING_JUMP_P (BB_END (e->src)))
++      if (JUMP_P (BB_END (e->src)))
+ 	CROSSING_JUMP_P (BB_END (e->src)) = 1;
+     }
+   else if (BB_PARTITION (e->src) == BB_PARTITION (e->dest))
+diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
+index 21524f5..a58eedc 100644
+--- a/gcc/doc/rtl.texi
++++ b/gcc/doc/rtl.texi
+@@ -565,6 +565,16 @@ that are used in certain types of expression.  Most often they
+ are accessed with the following macros, which expand into lvalues.
+ 
+ @table @code
++@findex CROSSING_JUMP_P
++@cindex @code{jump_insn} and @samp{/j}
++@item CROSSING_JUMP_P (@var{x})
++Nonzero in a @code{jump_insn} if it crosses between hot and cold sections,
++which could potentially be very far apart in the executable.  The presence
++of this flag indicates to other optimizations that this branching instruction
++should not be ``collapsed'' into a simpler branching construct.  It is used
++when the optimization to partition basic blocks into hot and cold sections
++is turned on.
++
+ @findex CONSTANT_POOL_ADDRESS_P
+ @cindex @code{symbol_ref} and @samp{/u}
+ @cindex @code{unchanging}, in @code{symbol_ref}
+@@ -577,37 +587,6 @@ In either case GCC assumes these addresses can be addressed directly,
+ perhaps with the help of base registers.
+ Stored in the @code{unchanging} field and printed as @samp{/u}.
+ 
+-@findex RTL_CONST_CALL_P
+-@cindex @code{call_insn} and @samp{/u}
+-@cindex @code{unchanging}, in @code{call_insn}
+-@item RTL_CONST_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a call to a
+-const function.  Stored in the @code{unchanging} field and printed as
+-@samp{/u}.
+-
+-@findex RTL_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/i}
+-@cindex @code{return_val}, in @code{call_insn}
+-@item RTL_PURE_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a call to a
+-pure function.  Stored in the @code{return_val} field and printed as
+-@samp{/i}.
+-
+-@findex RTL_CONST_OR_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/u} or @samp{/i}
+-@item RTL_CONST_OR_PURE_CALL_P (@var{x})
+-In a @code{call_insn}, true if @code{RTL_CONST_CALL_P} or
+-@code{RTL_PURE_CALL_P} is true.
+-
+-@findex RTL_LOOPING_CONST_OR_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/c}
+-@cindex @code{call}, in @code{call_insn}
+-@item RTL_LOOPING_CONST_OR_PURE_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a possibly
+-infinite looping call to a const or pure function.  Stored in the
+-@code{call} field and printed as @samp{/c}.  Only true if one of
+-@code{RTL_CONST_CALL_P} or @code{RTL_PURE_CALL_P} is true.
+-
+ @findex INSN_ANNULLED_BRANCH_P
+ @cindex @code{jump_insn} and @samp{/u}
+ @cindex @code{call_insn} and @samp{/u}
+@@ -702,6 +681,29 @@ Stored in the @code{call} field and printed as @samp{/c}.
+ Nonzero in a @code{mem} if the memory reference holds a pointer.
+ Stored in the @code{frame_related} field and printed as @samp{/f}.
+ 
++@findex MEM_READONLY_P
++@cindex @code{mem} and @samp{/u}
++@cindex @code{unchanging}, in @code{mem}
++@item MEM_READONLY_P (@var{x})
++Nonzero in a @code{mem}, if the memory is statically allocated and read-only.
++
++Read-only in this context means never modified during the lifetime of the
++program, not necessarily in ROM or in write-disabled pages.  A common
++example of the later is a shared library's global offset table.  This
++table is initialized by the runtime loader, so the memory is technically
++writable, but after control is transferred from the runtime loader to the
++application, this memory will never be subsequently modified.
++
++Stored in the @code{unchanging} field and printed as @samp{/u}.
++
++@findex PREFETCH_SCHEDULE_BARRIER_P
++@cindex @code{prefetch} and @samp{/v}
++@cindex @code{volatile}, in @code{prefetch}
++@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
++In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
++No other INSNs will be moved over it.
++Stored in the @code{volatil} field and printed as @samp{/v}.
++
+ @findex REG_FUNCTION_VALUE_P
+ @cindex @code{reg} and @samp{/i}
+ @cindex @code{return_val}, in @code{reg}
+@@ -731,6 +733,37 @@ The same hard register may be used also for collecting the values of
+ functions called by this one, but @code{REG_FUNCTION_VALUE_P} is zero
+ in this kind of use.
+ 
++@findex RTL_CONST_CALL_P
++@cindex @code{call_insn} and @samp{/u}
++@cindex @code{unchanging}, in @code{call_insn}
++@item RTL_CONST_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a call to a
++const function.  Stored in the @code{unchanging} field and printed as
++@samp{/u}.
++
++@findex RTL_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/i}
++@cindex @code{return_val}, in @code{call_insn}
++@item RTL_PURE_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a call to a
++pure function.  Stored in the @code{return_val} field and printed as
++@samp{/i}.
++
++@findex RTL_CONST_OR_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/u} or @samp{/i}
++@item RTL_CONST_OR_PURE_CALL_P (@var{x})
++In a @code{call_insn}, true if @code{RTL_CONST_CALL_P} or
++@code{RTL_PURE_CALL_P} is true.
++
++@findex RTL_LOOPING_CONST_OR_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/c}
++@cindex @code{call}, in @code{call_insn}
++@item RTL_LOOPING_CONST_OR_PURE_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a possibly
++infinite looping call to a const or pure function.  Stored in the
++@code{call} field and printed as @samp{/c}.  Only true if one of
++@code{RTL_CONST_CALL_P} or @code{RTL_PURE_CALL_P} is true.
++
+ @findex RTX_FRAME_RELATED_P
+ @cindex @code{insn} and @samp{/f}
+ @cindex @code{call_insn} and @samp{/f}
+@@ -765,21 +798,6 @@ computation performed by this instruction, i.e., one that
+ This flag is required for exception handling support on targets with RTL
+ prologues.
+ 
+-@findex MEM_READONLY_P
+-@cindex @code{mem} and @samp{/u}
+-@cindex @code{unchanging}, in @code{mem}
+-@item MEM_READONLY_P (@var{x})
+-Nonzero in a @code{mem}, if the memory is statically allocated and read-only.
+-
+-Read-only in this context means never modified during the lifetime of the
+-program, not necessarily in ROM or in write-disabled pages.  A common
+-example of the later is a shared library's global offset table.  This
+-table is initialized by the runtime loader, so the memory is technically
+-writable, but after control is transferred from the runtime loader to the
+-application, this memory will never be subsequently modified.
+-
+-Stored in the @code{unchanging} field and printed as @samp{/u}.
+-
+ @findex SCHED_GROUP_P
+ @cindex @code{insn} and @samp{/s}
+ @cindex @code{call_insn} and @samp{/s}
+@@ -879,14 +897,6 @@ Stored in the @code{volatil} field and printed as @samp{/v}.
+ Most uses of @code{SYMBOL_REF_FLAG} are historic and may be subsumed
+ by @code{SYMBOL_REF_FLAGS}.  Certainly use of @code{SYMBOL_REF_FLAGS}
+ is mandatory if the target requires more than one bit of storage.
+-
+-@findex PREFETCH_SCHEDULE_BARRIER_P
+-@cindex @code{prefetch} and @samp{/v}
+-@cindex @code{volatile}, in @code{prefetch}
+-@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
+-In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
+-No other INSNs will be moved over it.
+-Stored in the @code{volatil} field and printed as @samp{/v}.
+ @end table
+ 
+ These are the fields to which the above macros refer:
+@@ -974,6 +985,8 @@ In a @code{set}, 1 means it is for a return.
+ 
+ In a @code{call_insn}, 1 means it is a sibling call.
+ 
++In a @code{jump_insn}, 1 means it is a crossing jump.
++
+ In an RTL dump, this flag is represented as @samp{/j}.
+ 
+ @findex unchanging
+@@ -3887,16 +3900,6 @@ multiple targets; the last label in the insn (in the highest numbered
+ insn-field) goes into the @code{JUMP_LABEL} field and does not have a
+ @code{REG_LABEL_TARGET} note.  @xref{Insns, JUMP_LABEL}.
+ 
+-@findex REG_CROSSING_JUMP
+-@item REG_CROSSING_JUMP
+-This insn is a branching instruction (either an unconditional jump or
+-an indirect jump) which crosses between hot and cold sections, which
+-could potentially be very far apart in the executable.  The presence
+-of this note indicates to other optimizations that this branching
+-instruction should not be ``collapsed'' into a simpler branching
+-construct.  It is used when the optimization to partition basic blocks
+-into hot and cold sections is turned on.
+-
+ @findex REG_SETJMP
+ @item REG_SETJMP
+ Appears attached to each @code{CALL_INSN} to @code{setjmp} or a
+diff --git a/gcc/reorg.c b/gcc/reorg.c
+index 5914af6..77f3fe7 100644
+--- a/gcc/reorg.c
++++ b/gcc/reorg.c
+@@ -3360,10 +3360,11 @@ relax_delay_slots (rtx_insn *first)
+ 	}
+ 
+       /* See if we have a simple (conditional) jump that is useless.  */
+-      if (! INSN_ANNULLED_BRANCH_P (delay_jump_insn)
+-	  && ! condjump_in_parallel_p (delay_jump_insn)
++      if (!CROSSING_JUMP_P (delay_jump_insn)
++	  && !INSN_ANNULLED_BRANCH_P (delay_jump_insn)
++	  && !condjump_in_parallel_p (delay_jump_insn)
+ 	  && prev_active_insn (as_a<rtx_insn *> (target_label)) == insn
+-	  && ! BARRIER_P (prev_nonnote_insn (as_a<rtx_insn *> (target_label)))
++	  && !BARRIER_P (prev_nonnote_insn (as_a<rtx_insn *> (target_label)))
+ 	  /* If the last insn in the delay slot sets CC0 for some insn,
+ 	     various code assumes that it is in a delay slot.  We could
+ 	     put it back where it belonged and delete the register notes,
+-- 
+1.8.5.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
deleted file mode 100644
index 5a14d04..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 16210e6270e200cd4892a90ecef608906be3a130 Mon Sep 17 00:00:00 2001
-From: Kito Cheng <kito.cheng@gmail.com>
-Date: Thu, 4 May 2017 02:11:13 +0800
-Subject: [PATCH] RISC-V: Handle non-legitimate address in
- riscv_legitimize_move
-
-GCC may generate non-legitimate address due to we allow some
-load/store with non-legitimate address in pic.md.
-
-  2017-05-12  Kito Cheng  <kito.cheng@gmail.com>
-
-      * config/riscv/riscv.c (riscv_legitimize_move): Handle
-      non-legitimate address.
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog            |  5 +++++
- gcc/config/riscv/riscv.c | 16 ++++++++++++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
-index f7fec4bfcf8..d519be1659a 100644
---- a/gcc/config/riscv/riscv.c
-+++ b/gcc/config/riscv/riscv.c
-@@ -1385,6 +1385,22 @@ riscv_legitimize_move (enum machine_mode mode, rtx dest, rtx src)
-       return true;
-     }
- 
-+  /* RISC-V GCC may generate non-legitimate address due to we provide some
-+     pattern for optimize access PIC local symbol and it's make GCC generate
-+     unrecognizable instruction during optmizing.  */
-+
-+  if (MEM_P (dest) && !riscv_legitimate_address_p (mode, XEXP (dest, 0),
-+						   reload_completed))
-+    {
-+      XEXP (dest, 0) = riscv_force_address (XEXP (dest, 0), mode);
-+    }
-+
-+  if (MEM_P (src) && !riscv_legitimate_address_p (mode, XEXP (src, 0),
-+						  reload_completed))
-+    {
-+      XEXP (src, 0) = riscv_force_address (XEXP (src, 0), mode);
-+    }
-+
-   return false;
- }
- 
--- 
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 6d77620..bdd6f7e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -3,7 +3,7 @@
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
 PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
 
 GCCMULTILIB = "--enable-multilib"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb
deleted file mode 100644
index bf53c5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross-canadian.inc
-
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb
deleted file mode 100644
index 4c73e5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb
deleted file mode 100644
index b43cca0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb
deleted file mode 100644
index fd90e11..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require gcc-crosssdk-initial.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb
deleted file mode 100644
index 40a6c4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-crosssdk.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index d3d4bd3..7629fa5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -34,6 +34,18 @@
 # libmudflap
 # libgfortran needs separate recipe due to libquadmath dependency
 
+SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
+DEBUG_PREFIX_MAP_class-target = " \
+   -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
+   -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
+   -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
+   -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
+   -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
+   -fdebug-prefix-map=${B}=${SLIB_NEW} \
+   "
+
 do_configure () {
 	export CXX="${CXX} -nostdinc++ -nostdlib++"
 	for d in libgcc ${RUNTIMETARGET}; do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb
deleted file mode 100644
index 8f31e77..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-runtime.inc
-
-FILES_libgomp-dev += "\
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
-"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index 3183b29..3b7e002 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -61,15 +61,19 @@
 RDEPENDS_liblsan-dev += "${PN}"
 RDEPENDS_libtsan-dev += "${PN}"
 RRECOMMENDS_${PN} += "libasan libubsan"
-RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
 RRECOMMENDS_${PN}_append_x86 = " liblsan"
+RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_powerpc64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_aarch64 = " liblsan libtsan"
 
 do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
 do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
 do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
 
-# MIPS, aarch64, and SPARC are broken.
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm).*-linux'
+# Only x86, powerpc, sparc, s390, arm, and aarch64 are supported
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux'
+# musl is currently broken entirely
+COMPATIBLE_HOST_libc-musl = 'null'
 
 FILES_libasan += "${libdir}/libasan.so.*"
 FILES_libasan-dev += "\
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb
deleted file mode 100644
index 601f666..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-sanitizers.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb
deleted file mode 100644
index b890fa3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require recipes-devtools/gcc/gcc-source.inc
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb
deleted file mode 100644
index 2c618df..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-target.inc
-
-# Building with thumb enabled on armv4t fails with
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
-ARM_INSTRUCTION_SET_armv4 = "arm"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb
deleted file mode 100644
index 19f253f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc-initial.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
index 1500fb5..5f1dff6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
@@ -28,7 +28,7 @@
 
 FILES_${PN}-dev = "\
     ${base_libdir}/libgcc*.so \
-    ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
+    ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
     ${libdir}/${TARGET_SYS}/${BINV}* \
     ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
 "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb
deleted file mode 100644
index a5152f2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
index 5f5d4af..0523764 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -6,22 +6,28 @@
 "
 
 do_configure () {
-	rm -rf ${B}/${TARGET_SYS}/libgfortran/
-	mkdir -p ${B}/${TARGET_SYS}/libgfortran/
-	cd ${B}/${TARGET_SYS}/libgfortran/
-	chmod a+x ${S}/libgfortran/configure
-	relpath=${@os.path.relpath("${S}/libgfortran", "${B}/${TARGET_SYS}/libgfortran")}
-	$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
-	# Easiest way to stop bad RPATHs getting into the library since we have a
-	# broken libtool here
-	sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libgfortran/libtool
+	for target in libbacktrace libgfortran
+	do
+		rm -rf ${B}/${TARGET_SYS}/$target/
+		mkdir -p ${B}/${TARGET_SYS}/$target/
+		cd ${B}/${TARGET_SYS}/$target/
+		chmod a+x ${S}/$target/configure
+		relpath=${@os.path.relpath("${S}", "${B}/${TARGET_SYS}")}
+		../$relpath/$target/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+		# Easiest way to stop bad RPATHs getting into the library since we have a
+		# broken libtool here
+		sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/$target/libtool
+	done
 }
 EXTRACONFFUNCS += "extract_stashed_builddir"
 do_configure[depends] += "${COMPILERDEP}"
 
 do_compile () {
-	cd ${B}/${TARGET_SYS}/libgfortran/
-	oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/
+	for target in libbacktrace libgfortran
+	do
+		cd ${B}/${TARGET_SYS}/$target/
+		oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$target/
+	done
 }
 
 do_install () {
@@ -67,5 +73,5 @@
 python __anonymous () {
     f = d.getVar("FORTRAN")
     if "fortran" not in f:
-        raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler")
+        raise bb.parse.SkipRecipe("libgfortran needs fortran support to be enabled in the compiler")
 }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb
deleted file mode 100644
index 71dd8b4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgfortran.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc
new file mode 100644
index 0000000..4a5299b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc
@@ -0,0 +1,24 @@
+LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+		    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+		    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+		    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
+
+SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
+           file://0001-include-sys-types.h-for-mode_t.patch \
+           file://0002-make-man-install-relative-to-DESTDIR.patch \
+           file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
+           file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
+           file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \
+           file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \
+           file://0007-use-asm-sgidefs.h.patch \
+           file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
+           file://0009-Change-order-of-CFLAGS.patch \
+           file://0010-resolve-restrict-keyword-conflict.patch \
+           file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
+           file://0012-Unbreak-GDBserver-build-for-x32.patch \
+           file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
+"
+SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac"
+SRC_URI[sha256sum] = "3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
deleted file mode 100644
index 227abd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-		    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
-		    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
-		    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-
-SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
-           file://0001-include-sys-types.h-for-mode_t.patch \
-           file://0002-make-man-install-relative-to-DESTDIR.patch \
-           file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
-           file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
-           file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \
-           file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \
-           file://0007-use-asm-sgidefs.h.patch \
-           file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
-           file://0009-Change-order-of-CFLAGS.patch \
-           file://0010-resolve-restrict-keyword-conflict.patch \
-           file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
-           file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
-"
-SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88"
-SRC_URI[sha256sum] = "f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
index 9164a2b..039577b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -5,6 +5,7 @@
 
 LTTNGUST = "lttng-ust"
 LTTNGUST_aarch64 = ""
+LTTNGUST_riscv64 = ""
 LTTNGUST_mipsarch = ""
 LTTNGUST_sh4 = ""
 LTTNGUST_libc-musl = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 3ff1989..4fc6747 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -13,9 +13,9 @@
 # Overrides PACKAGECONFIG variables in gdb-common.inc
 PACKAGECONFIG ??= "python readline"
 PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
-                         nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
+                         nativesdk-python3-core \
                          nativesdk-python3-codecs nativesdk-python3-netclient \
-                         nativesdk-python3-importlib"
+                         "
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
new file mode 100644
index 0000000..18a3ce3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
@@ -0,0 +1,101 @@
+From 3e1e401053ea5f02a9e9c65abddd31a03baa1bd1 Mon Sep 17 00:00:00 2001
+From: Yao Qi <yao.qi@linaro.org>
+Date: Fri, 29 Dec 2017 12:57:25 +0800
+Subject: [PATCH] Unbreak GDBserver build for x32
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When I verify my target description changes, I build GDB and GDBserver for
+x32, but it failed.
+
+/../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’:
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: ‘X86_TDESC_AVX512’ was not declared in this scope
+     case X86_TDESC_AVX512:
+          ^
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: ‘tdesc_x32_avx512_linux’ was not declared in this scope
+       return tdesc_x32_avx512_linux;
+              ^
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘void initialize_low_tracepoint()’:
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:282:36: error: ‘init_registers_x32_avx512_linux’ was not declared in this scope
+   init_registers_x32_avx512_linux ();
+                                    ^
+
+ipa_x32_linux_regobj use to be there, but removed by
+22049425ce40324139be82d9a6ec518c46b65815 by mistake.
+
+gdb/gdbserver:
+
+2017-08-04  Yao Qi  <yao.qi@linaro.org>
+
+        * configure.srv (ipa_x32_linux_regobj): New.
+        * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
+        instead of X86_TDESC_AVX512.
+        (initialize_low_tracepoint): Call
+        init_registers_x32_avx_avx512_linux.
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=f02fd7745d003d65fd3b981618e07b874b721d79]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ ChangeLog                       | 8 ++++++++
+ gdb/gdbserver/configure.srv     | 1 +
+ gdb/gdbserver/linux-amd64-ipa.c | 6 +++---
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 4ac2d63..b5b8228 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++ 2017-08-04  Yao Qi  <yao.qi@linaro.org>
++
++	* configure.srv (ipa_x32_linux_regobj): New.
++	* linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
++	instead of X86_TDESC_AVX512.
++	(initialize_low_tracepoint): Call
++	init_registers_x32_avx_avx512_linux.
++
+ 2017-04-13  Andrew Jenner  <andrew@codesourcery.com>
+ 
+ 	* config.sub: Sync with master version in config project.
+diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
+index d00d9e2..56951c8 100644
+--- a/gdb/gdbserver/configure.srv
++++ b/gdb/gdbserver/configure.srv
+@@ -31,6 +31,7 @@ srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o
+ 
+ ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o  i386-avx-mpx-linux-ipa.o i386-avx-avx512-linux-ipa.o i386-avx-mpx-avx512-pku-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
+ ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx-avx512-linux-ipa.o amd64-avx-mpx-avx512-pku-linux-ipa.o amd64-mpx-linux-ipa.o"
++ipa_x32_linux_regobj="x32-linux-ipa.o x32-avx-linux-ipa.o x32-avx-avx512-linux-ipa.o"
+ ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o"
+ 
+ srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml i386/32bit-pkeys.xml"
+diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c
+index 67f36c2..683339b 100644
+--- a/gdb/gdbserver/linux-amd64-ipa.c
++++ b/gdb/gdbserver/linux-amd64-ipa.c
+@@ -181,8 +181,8 @@ get_ipa_tdesc (int idx)
+       return tdesc_x32_linux;
+     case X86_TDESC_AVX:
+       return tdesc_x32_avx_linux;
+-    case X86_TDESC_AVX512:
+-      return tdesc_x32_avx512_linux;
++    case X86_TDESC_AVX_AVX512:
++      return tdesc_x32_avx_avx512_linux;
+     default:
+       break;
+     }
+@@ -279,7 +279,7 @@ initialize_low_tracepoint (void)
+ #if defined __ILP32__
+   init_registers_x32_linux ();
+   init_registers_x32_avx_linux ();
+-  init_registers_x32_avx512_linux ();
++  init_registers_x32_avx_avx512_linux ();
+ #else
+   init_registers_amd64_linux ();
+   init_registers_amd64_avx_linux ();
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
index 9b4c128..dd9d792 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
@@ -116,6 +116,7 @@
     ${datadir}/gitweb/gitweb.cgi \
     ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
     ${datadir}/git-core/templates/hooks/pre-rebase.sample \
+    ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
 "
 
 # Git tools requiring perl
@@ -125,6 +126,7 @@
     ${libdir}/perl \
     ${datadir}/perl \
 "
+
 RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
 
 # git-tk package with gitk and git-gui
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb
deleted file mode 100644
index b3e3887..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
-                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
-                 "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.md5sum] = "d2dc550f6693ba7e5b16212b2714f59f"
-SRC_URI[tarball.sha256sum] = "1497001772f630d49809e981672edfe3e3ce1a1d18e905cd539c4d2f4dbcd75a"
-SRC_URI[manpages.md5sum] = "3037d11a4f4cdd19435871c267ca48b4"
-SRC_URI[manpages.sha256sum] = "f9b302eeb08ce08934e7afb42280ce9294411fbf5f7b6ac3fcc236e8031f10c5"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb
new file mode 100644
index 0000000..9dc4eba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb
@@ -0,0 +1,11 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+                 "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.md5sum] = "37467da8e79e72f28598d667f219f75e"
+SRC_URI[tarball.sha256sum] = "56cfa48af2b289bba172ca0a47c29f0083f5846cf4759978b70988e4f07fc9fd"
+SRC_URI[manpages.md5sum] = "5587407f3c28446af12fde3f3131ba34"
+SRC_URI[manpages.sha256sum] = "d499e825f429d76862be415f579c20cc26b046573a3a39237acaf9682cb71be7"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb
new file mode 100644
index 0000000..1a5b145
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Vendor Package Management for Golang"
+HOMEPAGE = "https://glide.sh"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=54905cf894f8cc416a92f4fc350c35b2"
+
+GO_IMPORT = "github.com/Masterminds/glide"
+SRC_URI = "git://${GO_IMPORT}"
+SRCREV = "67790b3dbede72cfdc54aa53be4706322c9499e0"
+
+inherit go
+
+RDEPENDS_${PN}-dev += "bash"
+RDEPENDS_${PN}-ptest += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 4fded60..8de8138 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -14,7 +14,7 @@
 SRC_URI = "git://git.savannah.gnu.org/config.git \
            file://gnu-configize.in"
 S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 CLEANBROKEN = "1"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc
new file mode 100644
index 0000000..3a135bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc
@@ -0,0 +1,24 @@
+require go-common.inc
+
+GO_BASEVERSION = "1.10"
+GO_MINOR = ".2"
+PV .= "${GO_MINOR}"
+FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
+
+SRC_URI += "\
+    file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \
+    file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \
+    file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \
+    file://0004-ld-add-soname-to-shareable-objects.patch \
+    file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
+    file://0006-cmd-dist-separate-host-and-target-builds.patch \
+    file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
+    file://0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch \
+"
+
+SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
+
+SRC_URI[main.md5sum] = "c63b35075bed693bbfc84d4a6262948a"
+SRC_URI[main.sha256sum] = "6264609c6b9cd8ed8e02ca84605d727ce1898d74efa79841660b2e3e985a98bd"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
new file mode 100644
index 0000000..3bb33b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
@@ -0,0 +1,33 @@
+From 7a7de46129fa6859fb6311096eb9f54c53c7fe2f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:49:33 -0800
+Subject: [PATCH 1/9] allow CC and CXX to have multiple words
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/envcmd/env.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index 603f7b5060..f891123f9c 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -82,11 +82,11 @@ func MkEnv() []cfg.EnvVar {
+ 
+ 	cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
+ 	if env := strings.Fields(os.Getenv("CC")); len(env) > 0 {
+-		cc = env[0]
++		cc = strings.Join(env, " ")
+ 	}
+ 	cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch)
+ 	if env := strings.Fields(os.Getenv("CXX")); len(env) > 0 {
+-		cxx = env[0]
++		cxx = strings.Join(env, " ")
+ 	}
+ 	env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
+ 	env = append(env, cfg.EnvVar{Name: "CXX", Value: cxx})
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
new file mode 100644
index 0000000..74f37a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -0,0 +1,220 @@
+From 8b2feaee81d7a16adc59e61d06c1e7314d3a5408 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:50:59 -0800
+Subject: [PATCH 2/9] cmd/go: make content-based hash generation less pedantic
+
+Go 1.10's build tool now uses content-based hashes to
+determine when something should be built or re-built.
+This same mechanism is used to maintain a built-artifact
+cache for speeding up builds.
+
+However, the hashes it generates include information that
+doesn't work well with OE, nor with using a shared runtime
+library.
+
+First, it embeds path names to source files, unless
+building within GOROOT.  This prevents the building
+of a package in GOPATH for later staging into GOROOT.
+
+This patch adds support for the environment variable
+GOPATH_OMIT_IN_ACTIONID.  If present, path name
+embedding is disabled.
+
+Second, if cgo is enabled, the build ID for cgo-related
+packages will include the current value of the environment
+variables for invoking the compiler (CC, CXX, FC) and
+any CGO_xxFLAGS variables.  Only if the settings used
+during a compilation exactly match, character for character,
+the values used for compiling runtime/cgo or any other
+cgo-enabled package being imported, will the tool
+decide that the imported package is up-to-date.
+
+This is done to help ensure correctness, but is overly
+simplistic and effectively prevents the reuse of built
+artifacts that use cgo (or shared runtime, which includes
+runtime/cgo).
+
+This patch filters out all compiler flags except those
+beginning with '-m'.  The default behavior can be restored
+by setting the CGO_PEDANTIC environment variable.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/envcmd/env.go |  2 +-
+ src/cmd/go/internal/work/exec.go  | 63 ++++++++++++++++++++++++++++-----------
+ 2 files changed, 46 insertions(+), 19 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index f891123f9c..ebacfbfdbc 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -113,7 +113,7 @@ func findEnv(env []cfg.EnvVar, name string) string {
+ func ExtraEnvVars() []cfg.EnvVar {
+ 	var b work.Builder
+ 	b.Init()
+-	cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{})
++	cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{}, false)
+ 	if err != nil {
+ 		// Should not happen - b.CFlags was given an empty package.
+ 		fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index c4c1500eb2..b0f6b45647 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -173,6 +173,8 @@ func (b *Builder) Do(root *Action) {
+ 	wg.Wait()
+ }
+ 
++var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != ""
++
+ // buildActionID computes the action ID for a build action.
+ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ 	p := a.Package
+@@ -189,7 +191,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ 	// but it does not hide the exact value of $GOPATH.
+ 	// Include the full dir in that case.
+ 	// Assume b.WorkDir is being trimmed properly.
+-	if !p.Goroot && !strings.HasPrefix(p.Dir, b.WorkDir) {
++	if !p.Goroot && !omitGopath && !strings.HasPrefix(p.Dir, b.WorkDir) {
+ 		fmt.Fprintf(h, "dir %s\n", p.Dir)
+ 	}
+ 	fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
+@@ -197,13 +199,13 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ 	fmt.Fprintf(h, "omitdebug %v standard %v local %v prefix %q\n", p.Internal.OmitDebug, p.Standard, p.Internal.Local, p.Internal.LocalPrefix)
+ 	if len(p.CgoFiles)+len(p.SwigFiles) > 0 {
+ 		fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
+-		cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p)
+-		fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(), cppflags, cflags)
++		cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p, true)
++		fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(true), cppflags, cflags)
+ 		if len(p.CXXFiles)+len(p.SwigFiles) > 0 {
+-			fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(), cxxflags)
++			fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(true), cxxflags)
+ 		}
+ 		if len(p.FFiles) > 0 {
+-			fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(), fflags)
++			fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(true), fflags)
+ 		}
+ 		// TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions?
+ 	}
+@@ -1731,33 +1733,33 @@ var (
+ // gccCmd returns a gcc command line prefix
+ // defaultCC is defined in zdefaultcc.go, written by cmd/dist.
+ func (b *Builder) GccCmd(incdir, workdir string) []string {
+-	return b.compilerCmd(b.ccExe(), incdir, workdir)
++	return b.compilerCmd(b.ccExe(false), incdir, workdir)
+ }
+ 
+ // gxxCmd returns a g++ command line prefix
+ // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
+ func (b *Builder) GxxCmd(incdir, workdir string) []string {
+-	return b.compilerCmd(b.cxxExe(), incdir, workdir)
++	return b.compilerCmd(b.cxxExe(false), incdir, workdir)
+ }
+ 
+ // gfortranCmd returns a gfortran command line prefix.
+ func (b *Builder) gfortranCmd(incdir, workdir string) []string {
+-	return b.compilerCmd(b.fcExe(), incdir, workdir)
++	return b.compilerCmd(b.fcExe(false), incdir, workdir)
+ }
+ 
+ // ccExe returns the CC compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) ccExe() []string {
+-	return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch))
++func (b *Builder) ccExe(filtered bool) []string {
++	return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch), filtered)
+ }
+ 
+ // cxxExe returns the CXX compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) cxxExe() []string {
+-	return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch))
++func (b *Builder) cxxExe(filtered bool) []string {
++	return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch), filtered)
+ }
+ 
+ // fcExe returns the FC compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) fcExe() []string {
+-	return b.compilerExe(os.Getenv("FC"), "gfortran")
++func (b *Builder) fcExe(filtered bool) []string {
++	return b.compilerExe(os.Getenv("FC"), "gfortran", filtered)
+ }
+ 
+ // compilerExe returns the compiler to use given an
+@@ -1766,11 +1768,14 @@ func (b *Builder) fcExe() []string {
+ // of the compiler but can have additional arguments if they
+ // were present in the environment value.
+ // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"].
+-func (b *Builder) compilerExe(envValue string, def string) []string {
++func (b *Builder) compilerExe(envValue string, def string, filtered bool) []string {
+ 	compiler := strings.Fields(envValue)
+ 	if len(compiler) == 0 {
+ 		compiler = []string{def}
+ 	}
++	if filtered {
++		return append(compiler[0:1], filterCompilerFlags(compiler[1:])...)
++	}
+ 	return compiler
+ }
+ 
+@@ -1920,8 +1925,23 @@ func envList(key, def string) []string {
+ 	return strings.Fields(v)
+ }
+ 
++var filterFlags = os.Getenv("CGO_PEDANTIC") == ""
++
++func filterCompilerFlags(flags []string) []string {
++	var newflags []string
++	if !filterFlags {
++		return flags
++	}
++	for _, flag := range flags {
++		if strings.HasPrefix(flag, "-m") {
++			newflags = append(newflags, flag)
++		}
++	}
++	return newflags
++}
++
+ // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo.
+-func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
++func (b *Builder) CFlags(p *load.Package, filtered bool) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
+ 	defaults := "-g -O2"
+ 
+ 	if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
+@@ -1939,6 +1959,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
+ 	if ldflags, err = buildFlags("LDFLAGS", defaults, p.CgoLDFLAGS, checkLinkerFlags); err != nil {
+ 		return
+ 	}
++	if filtered {
++		cppflags = filterCompilerFlags(cppflags)
++		cflags = filterCompilerFlags(cflags)
++		cxxflags = filterCompilerFlags(cxxflags)
++		fflags = filterCompilerFlags(fflags)
++		ldflags = filterCompilerFlags(ldflags)
++	}
+ 
+ 	return
+ }
+@@ -1954,7 +1981,7 @@ var cgoRe = regexp.MustCompile(`[/\\:]`)
+ 
+ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) {
+ 	p := a.Package
+-	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p)
++	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p, false)
+ 	if err != nil {
+ 		return nil, nil, err
+ 	}
+@@ -2306,7 +2333,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) {
+ 
+ // Run SWIG on one SWIG input file.
+ func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) {
+-	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p)
++	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p, false)
+ 	if err != nil {
+ 		return "", "", err
+ 	}
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
new file mode 100644
index 0000000..818fe66
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
@@ -0,0 +1,64 @@
+From acd179b49f1fc8d6f7f69e569fb4a56039c725a1 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 05:24:20 -0800
+Subject: [PATCH 3/9] allow GOTOOLDIR to be overridden in the environment
+
+to allow for split host/target build roots
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/dist/build.go          | 4 +++-
+ src/cmd/go/internal/cfg/cfg.go | 6 +++++-
+ src/go/build/build.go          | 2 +-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index 49ed80033e..afc615b5c2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -220,7 +220,9 @@ func xinit() {
+ 	workdir = xworkdir()
+ 	xatexit(rmworkdir)
+ 
+-	tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
++	if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
++		tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
++	}
+ }
+ 
+ // compilerEnv returns a map from "goos/goarch" to the
+diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
+index 1de4f0dc79..4f6010d660 100644
+--- a/src/cmd/go/internal/cfg/cfg.go
++++ b/src/cmd/go/internal/cfg/cfg.go
+@@ -96,7 +96,11 @@ func init() {
+ 	// as the tool directory does not move based on environment variables.
+ 	// This matches the initialization of ToolDir in go/build,
+ 	// except for using GOROOT rather than runtime.GOROOT().
+-	build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++	if s := os.Getenv("GOTOOLDIR"); s != "" {
++		build.ToolDir = filepath.Clean(s)
++	} else {
++		build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++	}
+ }
+ 
+ func findGOROOT() string {
+diff --git a/src/go/build/build.go b/src/go/build/build.go
+index 68fb423983..81b1b32270 100644
+--- a/src/go/build/build.go
++++ b/src/go/build/build.go
+@@ -1594,7 +1594,7 @@ func init() {
+ }
+ 
+ // ToolDir is the directory containing build tools.
+-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
+ 
+ // IsLocalImport reports whether the import path is
+ // a local import path, like ".", "..", "./foo", or "../foo".
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
new file mode 100644
index 0000000..c23ca94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
@@ -0,0 +1,47 @@
+From 85252f0bd8743223eb778edbe9fb31dff17a23d8 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:26:10 -0800
+Subject: [PATCH 4/9] ld: add soname to shareable objects
+
+so that OE's shared library dependency handling
+can find them.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/link/internal/ld/lib.go | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
+index 6dcaf64122..11cbb8a8bb 100644
+--- a/src/cmd/link/internal/ld/lib.go
++++ b/src/cmd/link/internal/ld/lib.go
+@@ -1134,6 +1134,7 @@ func (ctxt *Link) hostlink() {
+ 				argv = append(argv, "-Wl,-z,relro")
+ 			}
+ 			argv = append(argv, "-shared")
++			argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ 			if ctxt.HeadType != objabi.Hwindows {
+ 				// Pass -z nodelete to mark the shared library as
+ 				// non-closeable: a dlclose will do nothing.
+@@ -1145,6 +1146,8 @@ func (ctxt *Link) hostlink() {
+ 			argv = append(argv, "-Wl,-z,relro")
+ 		}
+ 		argv = append(argv, "-shared")
++		argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
++
+ 	case BuildModePlugin:
+ 		if ctxt.HeadType == objabi.Hdarwin {
+ 			argv = append(argv, "-dynamiclib")
+@@ -1153,6 +1156,7 @@ func (ctxt *Link) hostlink() {
+ 				argv = append(argv, "-Wl,-z,relro")
+ 			}
+ 			argv = append(argv, "-shared")
++			argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ 		}
+ 	}
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
new file mode 100644
index 0000000..67a9393
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -0,0 +1,40 @@
+From 16124d84648f4dfdfa4738c5660b5400b30bf9da Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:32:45 -0800
+Subject: [PATCH 5/9] make.bash: override CC when building dist and
+ go_bootstrap
+
+for handling OE cross-canadian builds.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/make.bash | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index 93a5c43d11..3a63682bc4 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -162,7 +162,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
+ 	exit 1
+ fi
+ rm -f cmd/dist/dist
+-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+ 
+ # -e doesn't propagate out of eval, so check success by hand.
+ eval $(./cmd/dist/dist env -p || echo FAIL=true)
+@@ -193,7 +193,7 @@ fi
+ # Run dist bootstrap to complete make.bash.
+ # Bootstrap installs a proper cmd/dist, built with the new toolchain.
+ # Throw ours, built with Go 1.4, away after bootstrap.
+-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
+ rm -f ./cmd/dist/dist
+ 
+ # DO NOT ADD ANY NEW CODE HERE.
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
new file mode 100644
index 0000000..9fe6996
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
@@ -0,0 +1,277 @@
+From 2f07af34697c61decdcfa5b11434451fbcf37704 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 10:03:48 -0800
+Subject: [PATCH 6/9] cmd/dist: separate host and target builds
+
+Change the dist tool to allow for OE-style cross-
+and cross-canadian builds:
+
+ - command flags --host-only and --target only are added;
+   if one is present, the other changes mentioned below
+   take effect, and arguments may also be specified on
+   the command line to enumerate the package(s) to be
+   built.
+
+ - for OE cross builds, go_bootstrap is always built for
+   the current build host, and is moved, along with the supporting
+   toolchain (asm, compile, etc.) to a separate 'native_native'
+   directory under GOROOT/pkg/tool.
+
+ - go_bootstrap is not automatically removed after the build,
+   so it can be reused later (e.g., building both static and
+   shared runtime).
+
+Note that for --host-only builds, it would be nice to specify
+just the "cmd" package to build only the go commands/tools,
+the staleness checks in the dist tool will fail if the "std"
+library has not also been built.  So host-only builds have to
+build everything anyway.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+
+more dist cleanup
+---
+ src/cmd/dist/build.go | 149 +++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 111 insertions(+), 38 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index afc615b5c2..36262665b2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -38,6 +38,7 @@ var (
+ 	goldflags        string
+ 	workdir          string
+ 	tooldir          string
++	build_tooldir	 string
+ 	oldgoos          string
+ 	oldgoarch        string
+ 	exe              string
+@@ -49,6 +50,7 @@ var (
+ 
+ 	rebuildall   bool
+ 	defaultclang bool
++	crossBuild   bool
+ 
+ 	vflag int // verbosity
+ )
+@@ -223,6 +225,8 @@ func xinit() {
+ 	if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
+ 		tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
+ 	}
++	build_tooldir = pathf("%s/pkg/tool/native_native", goroot)
++
+ }
+ 
+ // compilerEnv returns a map from "goos/goarch" to the
+@@ -252,7 +256,6 @@ func compilerEnv(envName, def string) map[string]string {
+ 		if gohostos != goos || gohostarch != goarch {
+ 			m[gohostos+"/"+gohostarch] = m[""]
+ 		}
+-		m[""] = env
+ 	}
+ 
+ 	for _, goos := range okgoos {
+@@ -479,8 +482,10 @@ func setup() {
+ 	// We keep it in pkg/, just like the object directory above.
+ 	if rebuildall {
+ 		xremoveall(tooldir)
++		xremoveall(build_tooldir)
+ 	}
+ 	xmkdirall(tooldir)
++	xmkdirall(build_tooldir)
+ 
+ 	// Remove tool binaries from before the tool/gohostos_gohostarch
+ 	xremoveall(pathf("%s/bin/tool", goroot))
+@@ -1130,11 +1135,29 @@ func cmdbootstrap() {
+ 
+ 	var noBanner bool
+ 	var debug bool
++	var hostOnly bool
++	var targetOnly bool
++	var toBuild = []string { "std", "cmd" }
++
+ 	flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
+ 	flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
+ 	flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
++	flag.BoolVar(&hostOnly, "host-only", hostOnly, "build only host binaries, not target")
++	flag.BoolVar(&targetOnly, "target-only", targetOnly, "build only target binaries, not host")
+ 
+-	xflagparse(0)
++	xflagparse(-1)
++
++	if (hostOnly && targetOnly) {
++		fatalf("specify only one of --host-only or --target-only\n")
++	}
++	crossBuild = hostOnly || targetOnly
++	if flag.NArg() > 0 {
++		if crossBuild {
++			toBuild = flag.Args()
++		} else {
++			fatalf("package names not permitted without --host-only or --target-only\n")
++		}
++	}
+ 
+ 	if debug {
+ 		// cmd/buildid is used in debug mode.
+@@ -1182,8 +1205,13 @@ func cmdbootstrap() {
+ 		xprintf("\n")
+ 	}
+ 
+-	gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
+-	goldflags = os.Getenv("GO_LDFLAGS")
++	// For split host/target cross/cross-canadian builds, we don't
++	// want to be setting these flags until after we have compiled
++	// the toolchain that runs on the build host.
++	if ! crossBuild {
++		gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
++		goldflags = os.Getenv("GO_LDFLAGS")
++	}
+ 	goBootstrap := pathf("%s/go_bootstrap", tooldir)
+ 	cmdGo := pathf("%s/go", gobin)
+ 	if debug {
+@@ -1212,7 +1240,11 @@ func cmdbootstrap() {
+ 		xprintf("\n")
+ 	}
+ 	xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
+-	os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++	if crossBuild {
++		os.Setenv("CC", defaultcc[""])
++	} else {
++		os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++	}
+ 	goInstall(goBootstrap, append([]string{"-i"}, toolchain...)...)
+ 	if debug {
+ 		run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
+@@ -1249,45 +1281,82 @@ func cmdbootstrap() {
+ 	}
+ 	checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
+ 
+-	if goos == oldgoos && goarch == oldgoarch {
+-		// Common case - not setting up for cross-compilation.
+-		timelog("build", "toolchain")
+-		if vflag > 0 {
+-			xprintf("\n")
++	if crossBuild {
++		gogcflags = os.Getenv("GO_GCFLAGS")
++		goldflags = os.Getenv("GO_LDFLAGS")
++		tool_files, _ := filepath.Glob(pathf("%s/*", tooldir))
++		for _, f := range tool_files {
++			copyfile(pathf("%s/%s", build_tooldir, filepath.Base(f)), f, writeExec)
++			xremove(f)
++		}
++		os.Setenv("GOTOOLDIR", build_tooldir)
++		goBootstrap = pathf("%s/go_bootstrap", build_tooldir)
++		if hostOnly {
++			timelog("build", "host toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			xprintf("Building %s for host, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
++			goInstall(goBootstrap, toBuild...)
++			checkNotStale(goBootstrap, toBuild...)
++			// Skip cmdGo staleness checks here, since we can't necessarily run the cmdGo binary
++
++			timelog("build", "target toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++		} else if targetOnly {
++			goos = oldgoos
++			goarch = oldgoarch
++			os.Setenv("GOOS", goos)
++			os.Setenv("GOARCH", goarch)
++			os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++			xprintf("Building %s for target, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
++			goInstall(goBootstrap, toBuild...)
++			checkNotStale(goBootstrap, toBuild...)
++			// Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary
+ 		}
+-		xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
+ 	} else {
+-		// GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
+-		// Finish GOHOSTOS/GOHOSTARCH installation and then
+-		// run GOOS/GOARCH installation.
+-		timelog("build", "host toolchain")
+-		if vflag > 0 {
+-			xprintf("\n")
++		if goos == oldgoos && goarch == oldgoarch {
++			// Common case - not setting up for cross-compilation.
++			timelog("build", "toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
++		} else {
++			// GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
++			// Finish GOHOSTOS/GOHOSTARCH installation and then
++			// run GOOS/GOARCH installation.
++			timelog("build", "host toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
++			goInstall(goBootstrap, "std", "cmd")
++			checkNotStale(goBootstrap, "std", "cmd")
++			checkNotStale(cmdGo, "std", "cmd")
++
++			timelog("build", "target toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			goos = oldgoos
++			goarch = oldgoarch
++			os.Setenv("GOOS", goos)
++			os.Setenv("GOARCH", goarch)
++			os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++			xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
+ 		}
+-		xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
+ 		goInstall(goBootstrap, "std", "cmd")
+ 		checkNotStale(goBootstrap, "std", "cmd")
+ 		checkNotStale(cmdGo, "std", "cmd")
+-
+-		timelog("build", "target toolchain")
+-		if vflag > 0 {
+-			xprintf("\n")
++		if debug {
++			run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
++			run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
++			checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
++			copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ 		}
+-		goos = oldgoos
+-		goarch = oldgoarch
+-		os.Setenv("GOOS", goos)
+-		os.Setenv("GOARCH", goarch)
+-		os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
+-		xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
+-	}
+-	goInstall(goBootstrap, "std", "cmd")
+-	checkNotStale(goBootstrap, "std", "cmd")
+-	checkNotStale(cmdGo, "std", "cmd")
+-	if debug {
+-		run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
+-		run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
+-		checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
+-		copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ 	}
+ 
+ 	// Check that there are no new files in $GOROOT/bin other than
+@@ -1305,7 +1374,11 @@ func cmdbootstrap() {
+ 	}
+ 
+ 	// Remove go_bootstrap now that we're done.
+-	xremove(pathf("%s/go_bootstrap", tooldir))
++	// Except that for split host/target cross-builds, we need to
++	// keep it.
++	if ! crossBuild {
++		xremove(pathf("%s/go_bootstrap", tooldir))
++	}
+ 
+ 	// Print trailing banner unless instructed otherwise.
+ 	if !noBanner {
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
new file mode 100644
index 0000000..7242762
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
@@ -0,0 +1,108 @@
+From f98aa287941417226a6e4f78759f8a5e19732cde Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Fri, 2 Mar 2018 06:00:20 -0800
+Subject: [PATCH 7/9] cmd/go: make GOROOT precious by default
+
+The go build tool normally rebuilds whatever it detects is
+stale.  This can be a problem when GOROOT is intended to
+be read-only and the go runtime has been built as a shared
+library, since we don't want every application to be rebuilding
+the shared runtime - particularly in cross-build/packaging
+setups, since that would lead to 'abi mismatch' runtime errors.
+
+This patch prevents the install and linkshared actions from
+installing to GOROOT unless overridden with the GOROOT_OVERRIDE
+environment variable.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/work/action.go |  3 +++
+ src/cmd/go/internal/work/build.go  |  5 +++++
+ src/cmd/go/internal/work/exec.go   | 25 +++++++++++++++++++++++++
+ 3 files changed, 33 insertions(+)
+
+diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
+index 9f1f8f8a50..a382880474 100644
+--- a/src/cmd/go/internal/work/action.go
++++ b/src/cmd/go/internal/work/action.go
+@@ -563,6 +563,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) {
+ 			if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] {
+ 				continue
+ 			}
++			if goRootPrecious && (p1.Standard || p1.Goroot) {
++				continue
++			}
+ 			haveShlib[filepath.Base(p1.Shlib)] = true
+ 			// TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild,
+ 			// we'll end up building an overall library or executable that depends at runtime
+diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
+index 57b7b00879..e2ba95420e 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -143,6 +143,7 @@ See also: go install, go get, go clean.
+ }
+ 
+ const concurrentGCBackendCompilationEnabledByDefault = true
++var goRootPrecious bool = true
+ 
+ func init() {
+ 	// break init cycle
+@@ -156,6 +157,10 @@ func init() {
+ 
+ 	AddBuildFlags(CmdBuild)
+ 	AddBuildFlags(CmdInstall)
++
++	if x := os.Getenv("GOROOT_OVERRIDE"); x != "" {
++		goRootPrecious = false
++	}
+ }
+ 
+ // Note that flags consulted by other parts of the code
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index b0f6b45647..c8f266a8ad 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -371,6 +371,23 @@ func (b *Builder) build(a *Action) (err error) {
+ 		return fmt.Errorf("missing or invalid binary-only package")
+ 	}
+ 
++	if goRootPrecious && (a.Package.Standard || a.Package.Goroot) {
++		_, err := os.Stat(a.Package.Target)
++		if err == nil {
++			a.built = a.Package.Target
++			a.Target = a.Package.Target
++			a.buildID = b.fileHash(a.Package.Target)
++			a.Package.Stale = false
++			a.Package.StaleReason = "GOROOT-resident package"
++			return nil
++		}
++		if b.ComputeStaleOnly {
++			a.Package.Stale = true
++			a.Package.StaleReason = "missing or invalid GOROOT-resident package"
++			return nil
++		}
++	}
++
+ 	if err := b.Mkdir(a.Objdir); err != nil {
+ 		return err
+ 	}
+@@ -1097,6 +1114,14 @@ func BuildInstallFunc(b *Builder, a *Action) (err error) {
+ 		return nil
+ 	}
+ 
++	if goRootPrecious && a.Package != nil {
++		p := a.Package
++		if p.Standard || p.Goroot {
++			err := fmt.Errorf("attempting to install package %s into read-only GOROOT", p.ImportPath)
++			return err
++		}
++	}
++
+ 	if err := b.Mkdir(a.Objdir); err != nil {
+ 		return err
+ 	}
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
new file mode 100644
index 0000000..1e75417
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
@@ -0,0 +1,58 @@
+From 41b90ed7af10a071ccfeede6a429e0d80518436d Mon Sep 17 00:00:00 2001
+From: Cherry Zhang <cherryyz@google.com>
+Date: Sat, 17 Feb 2018 10:31:39 -0500
+Subject: [PATCH 8/9] cmd/internal/obj/arm64: fix branch-too-far with TBZ like
+ instructions
+
+The compiler now emits TBZ like instructions, but the assembler's
+too-far-branch patch code didn't include that case. Add it.
+
+Fixes #23889.
+
+Change-Id: Ib75f9250c660b9fb652835fbc83263a5d5073dc5
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ src/cmd/internal/obj/arm64/asm7.go     | 11 +++++++++--
+ src/cmd/internal/obj/arm64/asm_test.go |  1 +
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go
+index ca81238c93..b1ee552489 100644
+--- a/src/cmd/internal/obj/arm64/asm7.go
++++ b/src/cmd/internal/obj/arm64/asm7.go
+@@ -696,9 +696,16 @@ func span7(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
+ 			o = c.oplook(p)
+ 
+ 			/* very large branches */
+-			if (o.type_ == 7 || o.type_ == 39) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like
++			if (o.type_ == 7 || o.type_ == 39 || o.type_ == 40) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like, 40: TBZ and like
+ 				otxt := p.Pcond.Pc - pc
+-				if otxt <= -(1<<18)+10 || otxt >= (1<<18)-10 {
++				var toofar bool
++				switch o.type_ {
++				case 7, 39: // branch instruction encodes 19 bits
++					toofar = otxt <= -(1<<20)+10 || otxt >= (1<<20)-10
++				case 40: // branch instruction encodes 14 bits
++					toofar = otxt <= -(1<<15)+10 || otxt >= (1<<15)-10
++				}
++				if toofar {
+ 					q := c.newprog()
+ 					q.Link = p.Link
+ 					p.Link = q
+diff --git a/src/cmd/internal/obj/arm64/asm_test.go b/src/cmd/internal/obj/arm64/asm_test.go
+index 369c48f510..3e0c9c13a6 100644
+--- a/src/cmd/internal/obj/arm64/asm_test.go
++++ b/src/cmd/internal/obj/arm64/asm_test.go
+@@ -52,6 +52,7 @@ func TestLarge(t *testing.T) {
+ // gen generates a very large program, with a very far conditional branch.
+ func gen(buf *bytes.Buffer) {
+ 	fmt.Fprintln(buf, "TEXT f(SB),0,$0-0")
++	fmt.Fprintln(buf, "TBZ $5, R0, label")
+ 	fmt.Fprintln(buf, "CBZ R0, label")
+ 	fmt.Fprintln(buf, "BEQ label")
+ 	for i := 0; i < 1<<19; i++ {
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
new file mode 100644
index 0000000..06b00b3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
@@ -0,0 +1,130 @@
+From f575d85c4bd9b2903223d6c0dcc38a12775d582f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sun, 18 Feb 2018 08:24:05 -0800
+Subject: [PATCH 9/9] ld: replace glibc dynamic linker with musl
+
+Rework of patch by Khem Raj <raj.khem@gmail.com>
+for go 1.10.  Should be applied conditionally on
+musl being the system C library.
+
+Upstream-Status: Inappropriate [Real fix should be portable across libcs]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/link/internal/amd64/obj.go  | 2 +-
+ src/cmd/link/internal/arm/obj.go    | 2 +-
+ src/cmd/link/internal/arm64/obj.go  | 2 +-
+ src/cmd/link/internal/mips/obj.go   | 2 +-
+ src/cmd/link/internal/mips64/obj.go | 2 +-
+ src/cmd/link/internal/ppc64/obj.go  | 2 +-
+ src/cmd/link/internal/s390x/obj.go  | 2 +-
+ src/cmd/link/internal/x86/obj.go    | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
+index 87e809166a..f522a63034 100644
+--- a/src/cmd/link/internal/amd64/obj.go
++++ b/src/cmd/link/internal/amd64/obj.go
+@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		PEreloc1:         pereloc1,
+ 		TLSIEtoLE:        tlsIEtoLE,
+ 
+-		Linuxdynld:     "/lib64/ld-linux-x86-64.so.2",
++		Linuxdynld:     "/lib64/ld-musl-x86-64.so.1",
+ 		Freebsddynld:   "/libexec/ld-elf.so.1",
+ 		Openbsddynld:   "/usr/libexec/ld.so",
+ 		Netbsddynld:    "/libexec/ld.elf_so",
+diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go
+index da16f92345..fd14940ede 100644
+--- a/src/cmd/link/internal/arm/obj.go
++++ b/src/cmd/link/internal/arm/obj.go
+@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld:     "/lib/ld-linux.so.3", // 2 for OABI, 3 for EABI
++		Linuxdynld:     "/lib/ld-musl-armhf.so.1",
+ 		Freebsddynld:   "/usr/libexec/ld-elf.so.1",
+ 		Openbsddynld:   "/usr/libexec/ld.so",
+ 		Netbsddynld:    "/libexec/ld.elf_so",
+diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
+index 6b386ad737..99863712cc 100644
+--- a/src/cmd/link/internal/arm64/obj.go
++++ b/src/cmd/link/internal/arm64/obj.go
+@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld: "/lib/ld-linux-aarch64.so.1",
++		Linuxdynld: "/lib/ld-musl-aarch64.so.1",
+ 
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go
+index c5d3451c39..fd85e6368d 100644
+--- a/src/cmd/link/internal/mips/obj.go
++++ b/src/cmd/link/internal/mips/obj.go
+@@ -60,7 +60,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld: "/lib/ld.so.1",
++		Linuxdynld: "/lib/ld-musl-mipsle.so.1",
+ 
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/mips64/obj.go b/src/cmd/link/internal/mips64/obj.go
+index 83974e5b56..097224f6da 100644
+--- a/src/cmd/link/internal/mips64/obj.go
++++ b/src/cmd/link/internal/mips64/obj.go
+@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld:     "/lib64/ld64.so.1",
++		Linuxdynld:     "/lib64/ld-musl-mips64le.so.1",
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+ 		Netbsddynld:    "XXX",
+diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go
+index 273d9b42cb..a503abe8ea 100644
+--- a/src/cmd/link/internal/ppc64/obj.go
++++ b/src/cmd/link/internal/ppc64/obj.go
+@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Machoreloc1:      machoreloc1,
+ 
+ 		// TODO(austin): ABI v1 uses /usr/lib/ld.so.1,
+-		Linuxdynld: "/lib64/ld64.so.1",
++		Linuxdynld: "/lib64/ld-musl-powerpc64le.so.1",
+ 
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/s390x/obj.go b/src/cmd/link/internal/s390x/obj.go
+index 9ac7eb8217..3825ff7abe 100644
+--- a/src/cmd/link/internal/s390x/obj.go
++++ b/src/cmd/link/internal/s390x/obj.go
+@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld: "/lib64/ld64.so.1",
++		Linuxdynld: "/lib64/ld-musl-s390x.so.1",
+ 
+ 		// not relevant for s390x
+ 		Freebsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go
+index 6a744dc04e..d81f392549 100644
+--- a/src/cmd/link/internal/x86/obj.go
++++ b/src/cmd/link/internal/x86/obj.go
+@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Machoreloc1:      machoreloc1,
+ 		PEreloc1:         pereloc1,
+ 
+-		Linuxdynld:   "/lib/ld-linux.so.2",
++		Linuxdynld:   "/lib/ld-musl-i386.so.1",
+ 		Freebsddynld: "/usr/libexec/ld-elf.so.1",
+ 		Openbsddynld: "/usr/libexec/ld.so",
+ 		Netbsddynld:  "/usr/libexec/ld.elf_so",
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
index 2823304..a942f6d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
@@ -1,7 +1,7 @@
 require go-common.inc
 
 GO_BASEVERSION = "1.9"
-GO_MINOR = ".4"
+GO_MINOR = ".6"
 PV .= "${GO_MINOR}"
 
 FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
@@ -22,5 +22,5 @@
 "
 SRC_URI_append_libc-musl = " file://set-external-linker.patch"
 
-SRC_URI[main.md5sum] = "6816441fd6680c63865cdd5cb8bc1960"
-SRC_URI[main.sha256sum] = "0573a8df33168977185aa44173305e5a0450f55213600e94541604b75d46dc06"
+SRC_URI[main.md5sum] = "52c1a3063291036597552d3fed0b2917"
+SRC_URI[main.sha256sum] = "36f4059be658f7f07091e27fe04bb9e97a0c4836eb446e4c5bac3c90ff9e5828"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
index 9af6873..11d55c4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
@@ -17,10 +17,17 @@
 SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main"
 S = "${WORKDIR}/go"
 B = "${S}"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
 
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 SSTATE_SCAN_CMD = "true"
 
+export GOROOT_OVERRIDE = "1"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+export GOCACHE = "off"
+export CGO_ENABLED = "1"
+
 do_compile_prepend() {
 	BUILD_CC=${BUILD_CC}
 }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
index 8afda6b..ea68b88 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -7,34 +7,29 @@
 
 export GOHOSTOS = "${BUILD_GOOS}"
 export GOHOSTARCH = "${BUILD_GOARCH}"
-export GOHOSTOS_CROSS = "${HOST_GOOS}"
-export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
-export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
-CC = "${HOST_PREFIX}gcc"
-export CGO_CFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${CFLAGS}"
-export CGO_LDFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"
-export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"'
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"'
 
 do_configure[noexec] = "1"
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
+	export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+	export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
 	cd src
 	./make.bash --host-only --no-banner
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 
 make_wrapper() {
-    rm -f ${D}${bindir}/$2
-    cat <<END >${D}${bindir}/$2
+	rm -f ${D}${bindir}/$2
+	cat <<END >${D}${bindir}/$2
 #!/bin/sh
 here=\`dirname \$0\`
 native_goroot=\`readlink -f \$here/../../lib/${TARGET_SYS}/go\`
@@ -42,11 +37,12 @@
 export GOOS="${TARGET_GOOS}"
 test -n "\$GOARM" || export GOARM="${TARGET_GOARM}"
 test -n "\$GO386" || export GO386="${TARGET_GO386}"
+test -n "\$GOMIPS" || export GOMIPS="${TARGET_GOMIPS}"
 export GOTOOLDIR="\$native_goroot/pkg/tool/${HOST_GOTUPLE}"
 test -n "\$GOROOT" || export GOROOT="\$OECORE_TARGET_SYSROOT/${target_libdir}/go"
 \$here/../../lib/${TARGET_SYS}/go/bin/$1 "\$@"
 END
-    chmod +x ${D}${bindir}/$2
+	chmod +x ${D}${bindir}/$2
 }
 
 do_install() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
new file mode 100644
index 0000000..7ac9449
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross-canadian.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
index 7ac9449..367a967 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
@@ -1,2 +1,12 @@
 require go-cross-canadian.inc
 require go-${PV}.inc
+
+export GOHOSTOS_CROSS = "${HOST_GOOS}"
+export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
+export CC_FOR_TARGET = "${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+export CXX_FOR_TARGET = "${HOST_PREFIX}g++ --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+
+do_compile_prepend() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
index 3ac7211..44f230b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
@@ -1,7 +1,7 @@
 inherit cross
 
 PROVIDES = "virtual/${TARGET_PREFIX}go"
-DEPENDS += "go-native"
+DEPENDS = "go-native"
 
 PN = "go-cross-${TARGET_ARCH}"
 
@@ -11,52 +11,52 @@
 export GOARCH = "${TARGET_GOARCH}"
 export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export GOCACHE = "off"
 CC = "${@d.getVar('BUILD_CC').strip()}"
 
 do_configure[noexec] = "1"
 
 do_compile() {
-    export GOBIN="${B}/bin"
-    rm -rf ${GOBIN} ${B}/pkg
-    mkdir ${GOBIN}
-    cd src
-    ./make.bash --host-only
-    cd ${B}
+	export CC_FOR_${GOOS}_${GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+	export CXX_FOR_${GOOS}_${GOARCh}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+	cd src
+	./make.bash --host-only --no-banner
+	cd ${B}
 }
-
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 make_wrapper() {
-    rm -f ${D}${bindir}/$2
-    cat <<END >${D}${bindir}/$2
+	rm -f ${D}${bindir}/$2
+	cat <<END >${D}${bindir}/$2
 #!/bin/bash
 here=\`dirname \$0\`
 export GOARCH="${TARGET_GOARCH}"
 export GOOS="${TARGET_GOOS}"
 export GOARM="\${GOARM:-${TARGET_GOARM}}"
 export GO386="\${GO386:-${TARGET_GO386}}"
+export GOMIPS="\${GOMIPS:-${TARGET_GOMIPS}}"
 \$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
 END
-    chmod +x ${D}${bindir}/$2
+	chmod +x ${D}${bindir}/$2
 }
 
 do_install() {
-    install -d ${D}${libdir}/go
-    cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
-    install -d ${D}${libdir}/go/src
-    (cd ${S}/src; for d in *; do \
-        [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
-    done)
-    rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
-    install -d ${D}${bindir} ${D}${libdir}/go/bin
-    for f in ${B}/bin/*
-    do
-        base=`basename $f`
-        install -m755 $f ${D}${libdir}/go/bin
-        make_wrapper $base ${TARGET_PREFIX}$base
-    done
+	install -d ${D}${libdir}/go
+	cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+	install -d ${D}${libdir}/go/src
+	(cd ${S}/src; for d in *; do \
+		[ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
+	done)
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+	install -d ${D}${bindir} ${D}${libdir}/go/bin
+	for f in ${B}/bin/*
+	do
+		base=`basename $f`
+		install -m755 $f ${D}${libdir}/go/bin
+		make_wrapper $base ${TARGET_PREFIX}$base
+	done
 }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb
new file mode 100644
index 0000000..80b5a03
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
index 80b5a03..4739c7d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
@@ -1,2 +1,10 @@
 require go-cross.inc
 require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+
+do_compile_prepend() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
index f67e4b9..4391b32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
@@ -10,22 +10,18 @@
 export GOARCH = "${TARGET_GOARCH}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export GO_INSTALL = "cmd"
-CC = "${@d.getVar('BUILD_CC').strip()}"
 
 do_configure[noexec] = "1"
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
+	export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
+	export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
 	cd src
-	./make.bash --host-only
+	./make.bash --host-only --no-banner
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 make_wrapper() {
     rm -f ${D}${bindir}/$2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb
new file mode 100644
index 0000000..1857c8a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb
@@ -0,0 +1,2 @@
+require go-crosssdk.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
index 1857c8a..3ac629b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
@@ -1,2 +1,11 @@
 require go-crosssdk.inc
 require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export GO_INSTALL = "cmd"
+
+do_compile_prepend() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
new file mode 100644
index 0000000..34ec987
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
@@ -0,0 +1,54 @@
+From f0fb80604385ae3266a472601ef685896b4cc0af Mon Sep 17 00:00:00 2001
+From: Vladimir Stefanovic <vladimir.stefanovic@imgtec.com>
+Date: Fri, 17 Feb 2017 20:44:43 +0100
+Subject: [PATCH] Add support for mips, mips64
+
+---
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ vendor/github.com/boltdb/bolt/bolt_mips64x.go | 12 ++++++++++++
+ vendor/github.com/boltdb/bolt/bolt_mipsx.go   | 12 ++++++++++++
+ 2 files changed, 24 insertions(+)
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mips64x.go
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mipsx.go
+
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mips64x.go b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+new file mode 100644
+index 00000000..134b578b
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+@@ -0,0 +1,12 @@
++// +build mips64 mips64le
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x8000000000 // 512GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0x7FFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mipsx.go b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+new file mode 100644
+index 00000000..d5ecb059
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+@@ -0,0 +1,12 @@
++// +build mips mipsle
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x40000000 // 1GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0xFFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
deleted file mode 100644
index abfeb48..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Dependency management tool for Golang"
-HOMEPAGE = "https://github.com/golang/dep"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d"
-
-GO_IMPORT = "github.com/golang/dep"
-SRC_URI = "git://${GO_IMPORT}"
-
-# Points to 0.3.0 tag
-SRCREV = "7a91b794bbfbf1f3b8b79823799316451127801b"
-
-inherit go
-
-GO_INSTALL = "${GO_IMPORT}/cmd/dep"
-
-RDEPENDS_${PN}-dev += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb
new file mode 100644
index 0000000..d82e637
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Dependency management tool for Golang"
+HOMEPAGE = "https://github.com/golang/dep"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d"
+
+GO_IMPORT = "github.com/golang/dep"
+SRC_URI = "git://${GO_IMPORT} \
+           file://0001-Add-support-for-mips-mips64.patch;patchdir=src/github.com/golang/dep \
+          "
+
+# Points to 0.4.1 tag
+SRCREV = "37d9ea0ac16f0e0a05afc3b60e1ac8c364b6c329"
+
+inherit go
+
+GO_INSTALL = "${GO_IMPORT}/cmd/dep"
+
+RDEPENDS_${PN}-dev += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
index 95db1c2..b76fb08 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
@@ -4,34 +4,31 @@
 
 inherit native
 
-SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4"
-SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04"
-SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
+SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
+SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016"
+SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
 
 export GOOS = "${BUILD_GOOS}"
 export GOARCH = "${BUILD_GOARCH}"
 CC = "${@d.getVar('BUILD_CC').strip()}"
 
-export CGO_ENABLED = "1"
+GOMAKEARGS ?= "--no-banner"
 
 do_configure() {
-    cd ${WORKDIR}/go1.4/go/src
-    CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
+	cd ${WORKDIR}/go1.4/go/src
+	CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
 }
 
 do_compile() {
-	export GOBIN="${B}/bin"
 	export GOROOT_FINAL="${nonstaging_libdir}/go"
 	export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go"
-	rm -rf ${GOBIN}
-	mkdir ${GOBIN}
-
-	export TMPDIR=${WORKDIR}/build-tmp
-	mkdir -p ${WORKDIR}/build-tmp
 
 	cd src
-	./make.bash --host-only
+	./make.bash ${GOMAKEARGS}
+	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin"
 
 make_wrapper() {
 	rm -f ${D}${bindir}/$2$3
@@ -51,7 +48,7 @@
 	(cd ${S}/src; for d in *; do \
 		[ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
 	done)
-	rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
 	install -d ${D}${bindir} ${D}${libdir}/go/bin
 	for f in ${B}/bin/*
 	do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb
new file mode 100644
index 0000000..bbf3c0d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb
@@ -0,0 +1,2 @@
+require ${PN}.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
index bbf3c0d..8621e1d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
@@ -1,2 +1,4 @@
 require ${PN}.inc
 require go-${PV}.inc
+
+GOMAKEARGS = "--host-only --no-banner"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
index 29ae86e..0041e8a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
@@ -8,13 +8,16 @@
 export GOARCH = "${TARGET_GOARCH}"
 export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export GO_TARGET_INSTALL = "std"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${CC}"
-export CXX_FOR_TARGET="${CXX}"
-export GOROOT_OVERRIDE = "1"
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_CPPFLAGS = "${CPPFLAGS}"
+export CGO_CXXFLAGS = "${CXXFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+
+GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
+GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
 
 do_configure() {
 	:
@@ -25,21 +28,20 @@
 }
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	export CC="${@d.getVar('BUILD_CC').strip()}"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
+	export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+	export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
+
 	cd src
-	./make.bash --host-only
-	cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
-	rm -rf ${B}/pkg/${TARGET_GOTUPLE}
-	./make.bash --target-only
+	./make.bash --target-only --no-banner std
 	if [ -n "${GO_DYNLINK}" ]; then
-		cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
-		GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+		export GOTOOLDIR="${B}/pkg/tool/native_native"
+		CC="$CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \
+			$GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_SHLIB_LDFLAGS} std
 	fi
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 do_install() {
 	install -d ${D}${libdir}/go/src
@@ -54,20 +56,10 @@
 	find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
 		cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
 	done
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
 	rm -f ${D}${libdir}/go/src/cmd/dist/dist
 }
 
-# Remove test binaries that cannot be relocated
-do_install_append_class-nativesdk() {
-	rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
-}
-
-# These testdata directories aren't needed for builds and contain binaries
-# that can cause errors in sysroot_strip(), so just remove them.
-sysroot_stage_all_append() {
-	find ${SYSROOT_DESTDIR}${libdir}/go/src -depth -type d -name 'testdata' -exec rm -rf {} \;
-}
-
 ALLOW_EMPTY_${PN} = "1"
 FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
 FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
@@ -78,8 +70,6 @@
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
-"
-FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
@@ -88,11 +78,15 @@
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
 "
-# The testdata directories in the source tree include some binaries for various
-# architectures, scripts, and .a files
-INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch"
+FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE}"
+
+# Go sources include some scripts and pre-built binaries for
+# multiple architectures.  The static .a files for dynamically-linked
+# runtime are also required in -dev.
+INSANE_SKIP_${PN}-dev = "staticdev file-rdeps arch"
 
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_SYSROOT_STRIP = "1"
 
 BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb
new file mode 100644
index 0000000..43b68b4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-runtime.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
index 43b68b4..d5279ea 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
@@ -1,2 +1,23 @@
 require go-${PV}.inc
 require go-runtime.inc
+
+export GO_TARGET_INSTALL = "std"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+	export CC=$BUILD_CC
+
+	cd src
+	CGO_CFLAGS="${BUILD_CFLAGS}" CGO_LDFLAGS="${BUILD_LDFLAGS}" ./make.bash --host-only
+	cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
+	rm -rf ${B}/pkg/${TARGET_GOTUPLE}
+	./make.bash --target-only
+	if [ -n "${GO_DYNLINK}" ]; then
+		cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
+		GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+	fi
+	cd ${B}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
index cac5d78..29a1344 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
@@ -1,4 +1,3 @@
-inherit goarch
 DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
 DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
 
@@ -8,41 +7,34 @@
 export GOARCH = "${TARGET_GOARCH}"
 export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${CC}"
-export CXX_FOR_TARGET = "${CXX}"
-export GO_TARGET_INSTALL = "cmd"
-export GO_FLAGS = "-a"
 GO_LDFLAGS = ""
 GO_LDFLAGS_class-nativesdk = "-linkmode external"
 export GO_LDFLAGS
 
-SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
-SECURITY_LDFLAGS = ""
+CC_append_class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
 
 do_configure[noexec] = "1"
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	export CC="${@d.getVar('BUILD_CC').strip()}"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
-
-	export TMPDIR=${WORKDIR}/build-tmp
-	mkdir -p ${WORKDIR}/build-tmp
+	export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+	export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
 
 	cd src
-	./make.bash
+	./make.bash --target-only --no-banner
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 do_install() {
 	install -d ${D}${libdir}/go/pkg/tool
 	cp --preserve=mode,timestamps -R ${B}/pkg/tool/${TARGET_GOTUPLE} ${D}${libdir}/go/pkg/tool/
 	install -d ${D}${libdir}/go/src
 	cp --preserve=mode,timestamps -R ${S}/src/cmd ${D}${libdir}/go/src/
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
 	install -d ${D}${libdir}/go/bin
 	install -d ${D}${bindir}
 	for f in ${B}/${GO_BUILD_BINDIR}/*; do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb
new file mode 100644
index 0000000..c67e2cb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-target.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
index c67e2cb..ec5a314 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
@@ -1,2 +1,17 @@
 require go-${PV}.inc
 require go-target.inc
+
+export GO_TARGET_INSTALL = "cmd"
+export GO_FLAGS = "-a"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+	export CC=$BUILD_CC
+
+	cd src
+	./make.bash
+	cd ${B}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
deleted file mode 100644
index 64dc32c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Program for creating simple man pages"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "autoconf-native automake-native"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "544aca496a7d89de3e5d99e56a2f03d3"
-SRC_URI[sha256sum] = "d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753"
-
-inherit autotools native
-
-EXTRA_OECONF = "--disable-nls"
-
-# We don't want to reconfigure things as it would require 'perlnative' to be
-# used.
-do_configure() {
-	oe_runconf
-}
-
-do_install_append () {
-	# Make sure we use /usr/bin/env perl
-	sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb
new file mode 100644
index 0000000..2dd6d38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Program for creating simple man pages"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "autoconf-native automake-native"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "1c886063c9e0ab463906de804596aa2f"
+SRC_URI[sha256sum] = "7ca60b2519fdbe97f463fe2df66a6188d18b514bfd44127d985f0234ee2461b1"
+
+inherit autotools native
+
+EXTRA_OECONF = "--disable-nls"
+
+# We don't want to reconfigure things as it would require 'perlnative' to be
+# used.
+do_configure() {
+	oe_runconf
+}
+
+do_install_append () {
+	# Make sure we use /usr/bin/env perl
+	sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
new file mode 100644
index 0000000..5b1a538
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
@@ -0,0 +1,32 @@
+From 01674fefe3bd24fd93412fbb3eb4e85fe70c80aa Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Mon, 18 Dec 2017 16:01:39 +0200
+Subject: [PATCH] i2c-tools: eeprog/Module.mk: Add missing dependency
+
+Absence of this dependency caused parallel build to run into a race
+and break.
+
+Upstream-Status: Accepted
+https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/commit/?id=f87c97317012a3b96b67237925893b8ffd5f4f50
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ eeprog/Module.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eeprog/Module.mk b/eeprog/Module.mk
+index 9d36869..d215855 100644
+--- a/eeprog/Module.mk
++++ b/eeprog/Module.mk
+@@ -20,7 +20,7 @@ EEPROG_TARGETS	:= eeprog
+ # Programs
+ #
+ 
+-$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o
++$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o $(LIB_DEPS)
+ 	$(CC) $(LDFLAGS) -o $@ $^ $(EEPROG_LDFLAGS)
+ 
+ #
+-- 
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
new file mode 100644
index 0000000..426b433
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
@@ -0,0 +1,37 @@
+From a6a59693066fd8da81f7107479df3e32a129247d Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Wed, 6 Dec 2017 09:55:04 +0100
+Subject: [PATCH] lib/Module.mk: Add missing dependencies
+
+The lib symlinks lacked a dependency to the actual library file, so
+parallel builds could run into a race and break.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ lib/Module.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Module.mk b/lib/Module.mk
+index 432a051..fd2c8c4 100644
+--- a/lib/Module.mk
++++ b/lib/Module.mk
+@@ -42,11 +42,11 @@ endif
+ $(LIB_DIR)/$(LIB_SHLIBNAME): $(LIB_DIR)/smbus.o
+ 	$(CC) -shared $(LDFLAGS) -Wl,--version-script=$(LIB_DIR)/libi2c.map -Wl,-soname,$(LIB_SHSONAME) -o $@ $^ -lc
+ 
+-$(LIB_DIR)/$(LIB_SHSONAME):
++$(LIB_DIR)/$(LIB_SHSONAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ 	$(RM) $@
+ 	$(LN) $(LIB_SHLIBNAME) $@
+ 
+-$(LIB_DIR)/$(LIB_SHBASENAME):
++$(LIB_DIR)/$(LIB_SHBASENAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ 	$(RM) $@
+ 	$(LN) $(LIB_SHLIBNAME) $@
+ 
+-- 
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
new file mode 100644
index 0000000..33cf2d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
@@ -0,0 +1,66 @@
+From 08b0d67ba7eceb862cb17f52eb1911e9579726ea Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Thu, 14 Dec 2017 08:52:26 +0100
+Subject: [PATCH] tools/Module.mk: Add missing dependencies
+
+Better build the library before building the tools which link against
+it, otherwise parallel builds could run into a race and break.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
+Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ lib/Module.mk   |  7 +++++++
+ tools/Module.mk | 10 +++++-----
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+Index: i2c-tools-4.0/lib/Module.mk
+===================================================================
+--- i2c-tools-4.0.orig/lib/Module.mk
++++ i2c-tools-4.0/lib/Module.mk
+@@ -35,6 +35,13 @@ LIB_TARGETS	+= $(LIB_STLIBNAME)
+ LIB_OBJECTS	+= smbus.ao
+ endif
+ 
++# Library file to link against (static or dynamic)
++ifeq ($(USE_STATIC_LIB),1)
++LIB_DEPS	:= $(LIB_DIR)/$(LIB_STLIBNAME)
++else
++LIB_DEPS	:= $(LIB_DIR)/$(LIB_SHBASENAME)
++endif
++
+ #
+ # Libraries
+ #
+Index: i2c-tools-4.0/tools/Module.mk
+===================================================================
+--- i2c-tools-4.0.orig/tools/Module.mk
++++ i2c-tools-4.0/tools/Module.mk
+@@ -24,19 +24,19 @@ TOOLS_TARGETS	:= i2cdetect i2cdump i2cse
+ # Programs
+ #
+ 
+-$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o
++$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o $(LIB_DEPS)
+ 	$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+ 
+-$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ 	$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+ 
+-$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ 	$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+ 
+-$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ 	$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+ 
+-$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ 	$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+ 
+ #
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk
deleted file mode 100644
index fcaf72f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# EEPROMER
-#
-# Licensed under the GNU General Public License.
-
-EEPROMER_DIR	:= eepromer
-
-EEPROMER_CFLAGS	:= -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
-		   -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
-		   -W -Wundef -Wmissing-prototypes -Iinclude
-
-EEPROMER_TARGETS	:= eepromer eeprom eeprog
-
-#
-# Programs
-#
-
-$(EEPROMER_DIR)/eepromer: $(EEPROMER_DIR)/eepromer.o
-	$(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprom: $(EEPROMER_DIR)/eeprom.o
-	$(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprog: $(EEPROMER_DIR)/eeprog.o $(EEPROMER_DIR)/24cXX.o 
-	$(CC) $(LDFLAGS) -o $@ $^
-
-#
-# Objects
-#
-
-$(EEPROMER_DIR)/eepromer.o: $(EEPROMER_DIR)/eepromer.c
-	$(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprom.o: $(EEPROMER_DIR)/eeprom.c
-	$(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprog.o: $(EEPROMER_DIR)/eeprog.c
-	$(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/24cXX.o: $(EEPROMER_DIR)/24cXX.c
-	$(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-#
-# Commands
-#
-
-all-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-strip-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-	strip $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-clean-eepromer:
-	$(RM) $(addprefix $(EEPROMER_DIR)/,*.o $(EEPROMER_TARGETS))
-
-install-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-	$(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
-	for program in $(EEPROMER_TARGETS) ; do \
-	$(INSTALL_PROGRAM) $(EEPROMER_DIR)/$$program $(DESTDIR)$(sbindir) ; done
-
-uninstall-eepromer:
-	for program in $(EEPROMER_TARGETS) ; do \
-	$(RM) $(DESTDIR)$(sbindir)/$$program ; \
-	$(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
-
-all: all-eepromer
-
-strip: strip-eepromer
-
-clean: clean-eepromer
-
-install: install-eepromer
-
-uninstall: uninstall-eepromer
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
new file mode 100644
index 0000000..703688d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
@@ -0,0 +1,98 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 226bc03acca44cf4b300597308064c44676b6f4b Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Tue, 23 Jan 2018 14:24:16 +0100
+Subject: Delete duplicate i2c-dev.h
+
+The <linux/i2c-dev.h> header file is provided by the kernel, so drop
+our own copy of this file.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Acked-by: Wolfram Sang <wsa@the-dreams.de>
+---
+ include/linux/i2c-dev.h | 72 -------------------------------------------------
+ 1 file changed, 72 deletions(-)
+ delete mode 100644 include/linux/i2c-dev.h
+
+diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
+deleted file mode 100644
+index 839d25a..0000000
+--- a/include/linux/i2c-dev.h
++++ /dev/null
+@@ -1,72 +0,0 @@
+-/*
+-    i2c-dev.h - i2c-bus driver, char device interface
+-
+-    Copyright (C) 1995-97 Simon G. Vogl
+-    Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl>
+-
+-    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.
+-*/
+-
+-#ifndef _LINUX_I2C_DEV_H
+-#define _LINUX_I2C_DEV_H
+-
+-#include <linux/types.h>
+-
+-
+-/* /dev/i2c-X ioctl commands.  The ioctl's parameter is always an
+- * unsigned long, except for:
+- *	- I2C_FUNCS, takes pointer to an unsigned long
+- *	- I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data
+- *	- I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data
+- */
+-#define I2C_RETRIES	0x0701	/* number of times a device address should
+-				   be polled when not acknowledging */
+-#define I2C_TIMEOUT	0x0702	/* set timeout in units of 10 ms */
+-
+-/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses
+- * are NOT supported! (due to code brokenness)
+- */
+-#define I2C_SLAVE	0x0703	/* Use this slave address */
+-#define I2C_SLAVE_FORCE	0x0706	/* Use this slave address, even if it
+-				   is already in use by a driver! */
+-#define I2C_TENBIT	0x0704	/* 0 for 7 bit addrs, != 0 for 10 bit */
+-
+-#define I2C_FUNCS	0x0705	/* Get the adapter functionality mask */
+-
+-#define I2C_RDWR	0x0707	/* Combined R/W transfer (one STOP only) */
+-
+-#define I2C_PEC		0x0708	/* != 0 to use PEC with SMBus */
+-#define I2C_SMBUS	0x0720	/* SMBus transfer */
+-
+-
+-/* This is the structure as used in the I2C_SMBUS ioctl call */
+-struct i2c_smbus_ioctl_data {
+-	__u8 read_write;
+-	__u8 command;
+-	__u32 size;
+-	union i2c_smbus_data *data;
+-};
+-
+-/* This is the structure as used in the I2C_RDWR ioctl call */
+-struct i2c_rdwr_ioctl_data {
+-	struct i2c_msg *msgs;	/* pointers to i2c_msgs */
+-	__u32 nmsgs;			/* number of i2c_msgs */
+-};
+-
+-#define  I2C_RDRW_IOCTL_MAX_MSGS	42
+-
+-
+-#endif /* _LINUX_I2C_DEV_H */
+-- 
+cgit v1.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
deleted file mode 100644
index c017252..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Set of i2c tools for linux"
-HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2 \
-           file://Module.mk \
-"
-SRC_URI[md5sum] = "7104a1043d11a5e2c7b131614eb1b962"
-SRC_URI[sha256sum] = "db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441"
-
-inherit autotools-brokensep
-
-do_compile_prepend() {
-    cp ${WORKDIR}/Module.mk ${S}/eepromer/
-    sed -i 's#/usr/local#/usr#' ${S}/Makefile
-    echo "include eepromer/Module.mk" >> ${S}/Makefile
-}
-
-do_install_append() {
-    install -d ${D}${includedir}/linux
-    install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
-    rm -f ${D}${includedir}/linux/i2c-dev.h
-}
-
-PACKAGES =+ "${PN}-misc"
-FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
-                        ${bindir}/ddcmon \
-                        ${bindir}/decode-edid \
-                        ${bindir}/decode-dimms \
-                        ${bindir}/decode-vaio \
-                       "
-RDEPENDS_${PN}-misc = "${PN} perl"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
new file mode 100644
index 0000000..01ac47f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Set of i2c tools for linux"
+HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
+           file://0001-lib-Module.mk-Add-missing-dependencies.patch \
+           file://0001-tools-Module.mk-Add-missing-dependencies.patch \
+           file://0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch \
+           file://remove-i2c-dev.patch \
+"
+
+SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa"
+SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403"
+
+EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \
+                incdir=${includedir} libdir=${libdir} \
+                mandir=${mandir} \
+                EXTRA=eeprog"
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "${PN}-misc"
+FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
+                        ${bindir}/ddcmon \
+                        ${bindir}/decode-edid \
+                        ${bindir}/decode-dimms \
+                        ${bindir}/decode-vaio \
+                       "
+RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \
+                       perl-module-constant perl-module-file-basename \
+                       perl-module-fcntl perl-module-strict perl-module-vars \
+                      "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
deleted file mode 100644
index f8f4aef..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "icecc environment setup script"
-DESCRIPTION = "This is a version of the icecc-create-env script that has \
-been modified in order to make it work with OE."
-SECTION = "base"
-# source file has just a "GPL" word, but upstream is GPLv2+.
-# most probably just GPL would be a mistake
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
-
-PR = "r2"
-
-DEPENDS = ""
-INHIBIT_DEFAULT_DEPS = "1"
-
-inherit native
-
-# This is needed, because otherwise there is dependency loop from quilt-native
-# Dependency loop #1 found:
-#  Task 10907 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install) (dependent Tasks ['quilt-native, do_compile'])
-#  Task 10908 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) (dependent Tasks ['quilt-native, do_install'])
-#  Task 10997 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_patch) (dependent Tasks ['icecc-create-env-native, do_unpack', 'quilt-native, do_populate_sysroot'])
-#  Task 11001 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_configure) (dependent Tasks ['icecc-create-env-native, do_patch'])
-#  Task 11002 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_compile) (dependent Tasks ['icecc-create-env-native, do_configure'])
-#  Task 10998 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_install) (dependent Tasks ['icecc-create-env-native, do_compile'])
-#  Task 10999 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_populate_sysroot) (dependent Tasks ['icecc-create-env-native, do_install'])
-#  Task 10910 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_configure) (dependent Tasks ['quilt-native, do_patch', 'icecc-create-env-native, do_populate_sysroot'])
-#  Task 10911 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_compile) (dependent Tasks ['quilt-native, do_configure'])
-PATCHTOOL = "patch"
-SRC_URI = "file://icecc-create-env"
-
-S = "${WORKDIR}"
-
-do_install() {
-    install -d ${D}/${bindir}
-    install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 7e4dbc4..64b5e20 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -4,69 +4,208 @@
 # Copyright (C) 2004 by the Icecream Authors
 # GPL
 
-target_files=
+target_paths=
+target_aliases=
 
-is_contained ()
+# Always prints, optionally to a log file
+print_output ()
 {
-  case " $target_files " in
-    *" $1 "* ) return 0 ;;
-    *"=$1 "* ) return 0;;
-    * ) return 1 ;;
-  esac
+    if test -n "$log_path"; then
+        echo "$@" | tee -a "$log_path"
+    else
+        echo "$@"
+    fi
+}
+
+# Only prints if the debug flag is specified
+print_debug ()
+{
+    if test -n "$debug"; then
+        print_output "$@"
+    fi
+}
+
+is_dynamic_elf ()
+{
+    # Is the file an dynamically linked ELF executable?
+    (file -L "$1" | grep 'ELF' > /dev/null 2>&1) && (! file -L "$1" | grep 'static' > /dev/null 2>&1)
+}
+
+fix_rpath ()
+{
+    # Patches the RPATH for a file. When the program is executed in the chroot
+    # be iceccd, /proc is not mounted. As such, $ORIGIN can't be resolved. To
+    # work around this, replace all instances of $ORIGIN in RPATH with the
+    # known chroot path to the executables directory
+    local path="$1"
+    local origin="$2"
+    if ! is_dynamic_elf "$path"; then
+        return
+    fi
+    local old_rpath="`$PATCHELF --print-rpath "$path"`"
+    local new_rpath="`echo "$old_rpath" | \
+        sed 's/.*\[\(.*\)\]/\1/g' | \
+        sed "s,\\\$ORIGIN,/$origin,g"`"
+
+    if test -n "$new_rpath"; then
+        print_debug "Converting RPATH '$old_rpath' -> '$new_rpath'"
+        $PATCHELF --set-rpath "$new_rpath" "$path"
+    fi
+}
+
+add_path ()
+{
+    case " $target_paths " in
+        *" $1 "*)
+            return 1
+            ;;
+        *)
+            target_paths="$target_paths $1"
+            return 0
+            ;;
+    esac
+}
+
+add_alias ()
+{
+    if test "$1" != "$2"; then
+        local alias="$1=$2"
+        case " $target_aliases " in
+            *" $alias "*)
+                ;;
+            *)
+                print_debug "Adding alias '$2' -> '$1'"
+                target_aliases="$target_aliases $alias"
+                ;;
+        esac
+    fi
+}
+
+normalize_path ()
+{
+    # Normalizes the path to a file or directory, removing all "." and ".."
+    # entries. Use pwd -L to explicitly prevent symlink expansion
+    local path=$1
+    if test -f "$path"; then
+        pushd $(dirname $path) > /dev/null 2>&1
+        dir_path=$(pwd -L)
+        path=$dir_path/$(basename $path)
+        popd > /dev/null 2>&1
+    elif test -d "$path"; then
+        pushd $path > /dev/null 2>&1
+        path=$(pwd -L)
+        popd > /dev/null 2>&1
+    fi
+    echo $path
+}
+
+add_file_common()
+{
+    local p="$1"
+    local path="$2"
+    local alias="$3"
+
+    add_alias "$path" "$p"
+    if test -n "$alias"; then
+        add_alias "$path" "$alias"
+    fi
+
+    add_path "$path" || return 1
+    print_debug "Adding file '$path'"
+
+    return 0
+}
+
+add_deps()
+{
+    local path="$1"
+    local interp="$2"
+
+    if test -n "$interp" && test -x "$interp"; then
+        # Use the dynamic loaders --list argument to list the
+        # dependencies. The program may have a different program
+        # interpreter (typical when using uninative tarballs), which is
+        # why we can't just call ldd.
+        deps="`$interp --list "$path"`"
+    else
+        deps="`ldd "$path"`"
+    fi
+
+    print_debug "Dependencies are:"
+    print_debug "$deps"
+    if test -n "$deps"; then
+        for lib in $deps; do
+            # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl
+            # based glibc this regexp parse the outputs like:
+            # ldd /usr/bin/gcc
+            #         linux-gate.so.1 =>  (0xffffe000)
+            #         libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
+            #         /lib/ld-linux.so.2 (0xb7fe8000)
+            # covering both situations ( with => and without )
+            lib="`echo "$lib" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`"
+
+            test -f "$lib" || continue
+            # Check whether the same library also exists in the parent
+            # directory, and prefer that on the assumption that it is a
+            # more generic one.
+            local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
+            test -f "$baselib" && lib=$baselib
+            add_dependency "$lib" "$interp"
+        done
+    fi
+}
+
+add_dependency()
+{
+    local p=`normalize_path $1`
+    # readlink is required for Yocto, so we can use it
+    local path=`readlink -f "$p"`
+    local interp="$2"
+
+    add_file_common "$p" "$path" || return
+
+    if test -x "$path" && is_dynamic_elf "$path"; then
+        add_deps "$path" "$interp"
+    fi
 }
 
 add_file ()
 {
-  local name="$1"
-  local path="$1";
-  if test -n "$2"; then
-    name="$2"
-  fi
-  test -z "$name" && return
-  # ls -H isn't really the same as readlink, but
-  # readlink is not portable enough.
-  path=`ls -H $path`
-  toadd="$name=$path"
-  is_contained "$toadd" && return
-  if test -z "$silent"; then
-  echo "adding file $toadd"
-  fi
-  target_files="$target_files $toadd"
-  if test -x "$path"; then
-    # Only call ldd when it makes sense
-    if file -L "$path" | grep 'ELF' > /dev/null 2>&1; then
-	if ! file -L "$path" | grep 'static' > /dev/null 2>&1; then
-	   # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl based glibc
-		# this regexp parse the outputs like:
-		# ldd /usr/bin/gcc
-		#         linux-gate.so.1 =>  (0xffffe000)
-		#         libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
-		#         /lib/ld-linux.so.2 (0xb7fe8000)
-		# covering both situations ( with => and without )
-          for lib in `ldd "$path" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do
-	    test -f "$lib" || continue
-	    # Check wether the same library also exists in the parent directory,
-	    # and prefer that on the assumption that it is a more generic one.
-	    local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
-	    test -f "$baselib" && lib=$baselib
-	  add_file "$lib"
-        done
-      fi
+    local p=`normalize_path $1`
+    # readlink is required for Yocto, so we can use it
+    local path=`readlink -f "$p"`
+
+    add_file_common "$p" "$path" "$2" || return
+
+    if test -x "$path" && is_dynamic_elf "$path"; then
+        # Request the program interpeter (dynamic loader)
+        interp=`readelf -W -l "$path" | grep "Requesting program interpreter:" | sed "s/\s*\[Requesting program interpreter:\s*\(.*\)\]/\1/g"`
+        print_debug "Interpreter is '$interp'"
+
+        add_deps "$path" "$interp"
     fi
-  fi
 }
 
-# backward compat
-if test "$1" = "--respect-path"; then
-  shift
-fi
-
-#add a --silent switch to avoid "broken pipe" errors when calling this scipt from within OE
-if test "$1" = "--silent"; then
- silent=1
- shift
-fi
-
+while test -n "$1"; do
+    case "$1" in
+        --respect-path)
+            # Ignore for backward compatability
+            ;;
+        --debug)
+            debug=1
+            ;;
+        --log)
+            do_log=1
+            ;;
+        --extra=*)
+            extra_tools="$extra_tools ${1#--extra=}"
+            ;;
+        *)
+            break
+            ;;
+    esac
+    shift
+done
 
 added_gcc=$1
 shift
@@ -76,19 +215,35 @@
 shift
 archive_name=$1
 
+if test -n "$do_log"; then
+    log_path="$archive_name.log"
+    rm -f "$log_path"
+fi
+
+if test -z "$PATCHELF"; then
+    PATCHELF=`which patchelf 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+    PATCHELF=`which patchelf-uninative 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+    print_output "patchelf is required"
+    exit 1
+fi
+
 if test -z "$added_gcc" || test -z "$added_gxx" ; then
-	echo "usage: $0 <gcc_path> <g++_path>"
-	exit 1
+    print_output "usage: $0 <gcc_path> <g++_path>"
+    exit 1
 fi
 
 if ! test -x "$added_gcc" ; then
-  echo "'$added_gcc' is no executable."
-  exit 1
+    print_output "'$added_gcc' is not executable."
+    exit 1
 fi
 
 if ! test -x "$added_gxx" ; then
-  echo "'$added_gcc' is no executable."
-  exit 1
+    print_output "'$added_gcc' is not executable."
+    exit 1
 fi
 
 
@@ -97,96 +252,131 @@
 add_file $added_gxx /usr/bin/g++
 
 if test -z "$added_as" ; then
- add_file /usr/bin/as /usr/bin/as
+    add_file /usr/bin/as /usr/bin/as
 else
- if ! test -x "$added_as" ; then
-  echo "'$added_as' is no executable."
-  exit 1
- fi
+    if ! test -x "$added_as" ; then
+        print_output "'$added_as' is not executable."
+        exit 1
+    fi
 
- add_file $added_as  /usr/bin/as
+    add_file $added_as  /usr/bin/as
 fi
 
 add_file `$added_gcc -print-prog-name=cc1` /usr/bin/cc1
 add_file `$added_gxx -print-prog-name=cc1plus` /usr/bin/cc1plus
 specfile=`$added_gcc -print-file-name=specs`
 if test -n "$specfile" && test -e "$specfile"; then
-  add_file "$specfile"
+    add_file "$specfile"
 fi
 
 ltofile=`$added_gcc -print-prog-name=lto1`
-pluginfile="${ltofile%lto1}liblto_plugin.so"
+pluginfile=`normalize_path "${ltofile%lto1}liblto_plugin.so"`
 if test -r "$pluginfile"
 then
-  add_file $pluginfile  ${pluginfile#*usr}
-  add_file $pluginfile  /usr${pluginfile#*usr}
+    add_file $pluginfile  ${pluginfile#*usr}
+    add_file $pluginfile  /usr${pluginfile#*usr}
 fi
 
+# for testing the environment is usable at all
+if test -x /bin/true; then
+    add_file /bin/true
+elif test -x /usr/bin/true; then
+    add_file /usr/bin/true /bin/true
+else
+    print_output "'true' not found"
+    exit 1
+fi
+
+for extra in $extra_tools; do
+    if test -x "$extra"; then
+        add_file "$extra"
+    else
+        print_output "'$extra' not found"
+        exit 1
+    fi
+done
+
+link_rel ()
+{
+    local target="$1"
+    local name="$2"
+    local base="$3"
+
+    local prefix=`dirname $name`
+
+    prefix=`echo $prefix | sed 's,[^/]\+,..,g' | sed 's,^/*,,g'`
+
+    ln -s $prefix/$target $base/$name
+}
+
 tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
-new_target_files=
-for i in $target_files; do
- case $i in
-   *=/*)
+target_files=
+for path in $target_paths; do
+    mkdir -p $tempdir/`dirname $path`
+    cp -pH $path $tempdir/$path
+
+    if test -f $tempdir/$path -a -x $tempdir/$path; then
+        strip -s $tempdir/$path 2>/dev/null
+    fi
+
+    fix_rpath $tempdir/$path `dirname $path`
+    target_files="$target_files $path"
+done
+
+for i in $target_aliases; do
     target=`echo $i | cut -d= -f1`
-    path=`echo $i | cut -d= -f2`
-    ;;
-   *)
-    path=$i
-    target=$i
-    ;;
-  esac
-  mkdir -p $tempdir/`dirname $target`
-  cp -p $path $tempdir/$target
-  if test -f $tempdir/$target -a -x $tempdir/$target; then
-    strip -s $tempdir/$target 2>/dev/null
-  fi
-  target=`echo $target | cut -b2-`
-  new_target_files="$new_target_files $target"
+    link_name=`echo $i | cut -d= -f2`
+
+    mkdir -p $tempdir/`dirname $link_name`
+    # Relative links are used because the files are checked for being
+    # executable outside the chroot
+    link_rel $target $link_name $tempdir
+
+    link_name=`echo $link_name | cut -b2-`
+    target_files="$target_files $link_name"
 done
 
 #sort the files
-target_files=`for i in $new_target_files; do echo $i; done | sort`
+target_files=`for i in $target_files; do echo $i; done | sort`
 
 #test if an archive name was supplied
 #if not use the md5 of all files as the archive name
 if test -z "$archive_name"; then
-  md5sum=NONE
-  for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
-    if test -x $file; then
-      md5sum=$file
-      break
-    fi
-  done
+    md5sum=NONE
+    for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
+        if test -x $file; then
+            md5sum=$file
+            break
+        fi
+    done
 
-  #calculate md5 and use it as the archive name
-  archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
-    if test -z "$silent"; then
-     echo "Couldn't compute MD5 sum."
-    fi
-    exit 2
-  }
-  mydir=`pwd`
-else
-  mydir="`dirname "$archive_name"`"
-
-  #check if we have a full path or only a filename
-  if test "$mydir" = "." ; then
+    #calculate md5 and use it as the archive name
+    archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
+        print_output "Couldn't compute MD5 sum."
+        exit 2
+    }
     mydir=`pwd`
-  else
-    mydir=""
-  fi
+else
+    mydir="`dirname "$archive_name"`"
+
+    #check if we have a full path or only a filename
+    if test "$mydir" = "." ; then
+        mydir=`pwd`
+    else
+        mydir=""
+    fi
 fi
 
-if test -z "$silent"; then
-echo "creating $archive_name"
-fi
+print_output "creating $archive_name"
 
 cd $tempdir
-tar -czhf "$mydir/$archive_name" $target_files || {
- if test -z "$silent"; then
-  echo "Couldn't create archive"
- fi
-  exit 3
+# Add everything in the temp directory. Tar doesn't like to be given files with
+# ".." in them, which frequently happens in $target_files, and will strip off
+# the path prefix past the offending "..". This makes the archive generate
+# incorrectly
+tar -czf "$mydir/$archive_name" . || {
+    print_output "Couldn't create archive"
+    exit 3
 }
 cd ..
 rm -rf $tempdir
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
new file mode 100644
index 0000000..053945e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
@@ -0,0 +1,36 @@
+SUMMARY = "icecc environment setup script"
+DESCRIPTION = "This is a version of the icecc-create-env script that has \
+been modified in order to make it work with OE."
+SECTION = "base"
+# source file has just a "GPL" word, but upstream is GPLv2+.
+# most probably just GPL would be a mistake
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
+
+PR = "r2"
+
+DEPENDS = ""
+INHIBIT_DEFAULT_DEPS = "1"
+
+# This is needed, because otherwise there is dependency loop from quilt-native
+# Dependency loop #1 found:
+#  Task 10907 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install) (dependent Tasks ['quilt-native, do_compile'])
+#  Task 10908 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) (dependent Tasks ['quilt-native, do_install'])
+#  Task 10997 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_patch) (dependent Tasks ['icecc-create-env-native, do_unpack', 'quilt-native, do_populate_sysroot'])
+#  Task 11001 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_configure) (dependent Tasks ['icecc-create-env-native, do_patch'])
+#  Task 11002 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_compile) (dependent Tasks ['icecc-create-env-native, do_configure'])
+#  Task 10998 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_install) (dependent Tasks ['icecc-create-env-native, do_compile'])
+#  Task 10999 (meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb, do_populate_sysroot) (dependent Tasks ['icecc-create-env-native, do_install'])
+#  Task 10910 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_configure) (dependent Tasks ['quilt-native, do_patch', 'icecc-create-env-native, do_populate_sysroot'])
+#  Task 10911 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_compile) (dependent Tasks ['quilt-native, do_configure'])
+PATCHTOOL = "patch"
+SRC_URI = "file://icecc-create-env"
+
+S = "${WORKDIR}"
+
+do_install() {
+    install -d ${D}/${bindir}
+    install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
new file mode 100644
index 0000000..9476007
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+if [ -z "$ICECC_PATH" ]; then
+    ICECC_PATH=$(which icecc 2> /dev/null)
+fi
+
+if [ -n "$ICECC_PATH" ]; then
+    # Default to disabling the caret workaround. If set to "1", icecc will
+    # locally recompile any files that have warnings, which can adversely
+    # affect performance.
+    #
+    # See: https://github.com/icecc/icecream/issues/190
+    if [ -z "$ICECC_CARET_WORKAROUND" ]; then
+        ICECC_CARET_WORKAROUND="0"
+    fi
+    if [ "$ICECC_CARET_WORKAROUND" != "1" ]; then
+        CFLAGS="$CFLAGS -fno-diagnostics-show-caret"
+        CXXFLAGS="$CXXFLAGS -fno-diagnostics-show-caret"
+    fi
+    export ICECC_PATH ICECC_CARET_WORKAROUND
+    export ICECC_VERSION="$OECORE_NATIVE_SYSROOT/usr/share/icecream/@TOOLCHAIN_ENV@"
+    export ICECC="$(which ${CROSS_COMPILE}gcc)"
+    export ICECXX="$(which ${CROSS_COMPILE}g++)"
+    export ICEAS="$(which ${CROSS_COMPILE}as)"
+    export PATH="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin:$PATH"
+else
+    echo "Icecc not found. Disabling distributed compiling"
+fi
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
new file mode 100644
index 0000000..0480826
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+# Setup environment
+for env_setup_script in `ls $1/environment-setup-*`; do
+	. $env_setup_script
+done
+
+# ICECC_PATH will have been found icecc-env.sh
+if [ -z "$ICECC_PATH" ]; then
+    exit 0
+fi
+
+echo "Setting up IceCream distributed compiling..."
+
+# Create the environment
+mkdir -p "`dirname $ICECC_VERSION`"
+icecc-create-env $ICECC $ICECXX $ICEAS $ICECC_VERSION || exit $?
+
+# Create symbolic links
+d="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin"
+mkdir -p "$d"
+ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}gcc"
+ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}g++"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
new file mode 100644
index 0000000..9d2750e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
@@ -0,0 +1,38 @@
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
+SUMMARY = "Generates Icecream toolchain for SDK"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/icecc-env.sh;beginline=2;endline=20;md5=dd6b68c1efed8a9fb04e409b3b287d47"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "\
+    file://icecc-env.sh \
+    file://icecc-setup.sh \
+    "
+
+inherit nativesdk
+
+ENV_NAME="${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}-${DISTRO_VERSION}.tar.gz"
+
+do_compile() {
+}
+
+do_install() {
+    install -d ${D}${SDKPATHNATIVE}${datadir}/icecream/bin
+
+    install -d ${D}${SDKPATHNATIVE}/environment-setup.d/
+    install -m 0644 ${WORKDIR}/icecc-env.sh ${D}${SDKPATHNATIVE}/environment-setup.d/
+    sed -i ${D}${SDKPATHNATIVE}/environment-setup.d/icecc-env.sh \
+        -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+
+    install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+    install -m 0755 ${WORKDIR}/icecc-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+    sed -i ${D}${SDKPATHNATIVE}/post-relocate-setup.d/icecc-setup.sh \
+        -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${SDKPATHNATIVE}"
+RDEPENDS_${PN} += "nativesdk-icecc-create-env"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
index eb52172..f1049e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
@@ -10,9 +10,11 @@
 Upstream-Status: Submitted (https://bugs.launchpad.net/intltool/+bug/1465010)
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
---- intltool-0.51.0-ORIG/intltool-update.in	2015-05-27 00:20:43.038379963 +0200
-+++ intltool-0.51.0/intltool-update.in	2015-05-27 00:23:53.309078052 +0200
-@@ -1062,7 +1062,7 @@
+Index: intltool-0.51.0/intltool-update.in
+===================================================================
+--- intltool-0.51.0.orig/intltool-update.in
++++ intltool-0.51.0/intltool-update.in
+@@ -1062,7 +1062,7 @@ sub SubstituteVariable
  	}
      }
  
@@ -21,7 +23,7 @@
      {
  	my $rest = $3;
  	my $untouched = $1;
-@@ -1190,10 +1190,10 @@
+@@ -1190,10 +1190,10 @@ sub FindPackageName
  	$name    =~ s/\(+$//g;
  	$version =~ s/\(+$//g;
  
@@ -36,7 +38,7 @@
      }
  
      if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
-@@ -1219,11 +1219,11 @@
+@@ -1219,11 +1219,11 @@ sub FindPackageName
  	$version =~ s/\(+$//g;
          $bugurl  =~ s/\(+$//g if (defined $bugurl);
  
@@ -52,4 +54,4 @@
 +        $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+\}?/);
      }
  
-     # \s makes this not work, why?
\ No newline at end of file
+     # \s makes this not work, why?
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch
deleted file mode 100644
index 537be5e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7b24f8bd95ad4f7d00c93ca2ad998c14a0266dbe Mon Sep 17 00:00:00 2001
-From: marxin <mliska@suse.cz>
-Date: Tue, 21 Mar 2017 08:42:11 +0100
-Subject: [PATCH] Add FALLTHRU comment to handle GCC7 warnings.
-
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- json_object.c  |  1 +
- json_tokener.c |  1 +
- linkhash.c     | 22 +++++++++++-----------
- 3 files changed, 13 insertions(+), 11 deletions(-)
-
-diff --git a/json_object.c b/json_object.c
-index 6cc73bc..77e8b21 100644
---- a/json_object.c
-+++ b/json_object.c
-@@ -552,6 +552,7 @@ int64_t json_object_get_int64(struct json_object *jso)
-     return jso->o.c_boolean;
-   case json_type_string:
- 	if (json_parse_int64(jso->o.c_string.str, &cint) == 0) return cint;
-+	/* FALLTHRU */
-   default:
-     return 0;
-   }
-diff --git a/json_tokener.c b/json_tokener.c
-index 9a76293..ae7b1ae 100644
---- a/json_tokener.c
-+++ b/json_tokener.c
-@@ -305,6 +305,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
-             tok->err = json_tokener_error_parse_unexpected;
-             goto out;
-         }
-+	/* FALLTHRU */
-       case '"':
- 	state = json_tokener_state_string;
- 	printbuf_reset(tok->pb);
-diff --git a/linkhash.c b/linkhash.c
-index 712c387..74e3b0f 100644
---- a/linkhash.c
-+++ b/linkhash.c
-@@ -376,17 +376,17 @@ static uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
-     /*-------------------------------- last block: affect all 32 bits of (c) */
-     switch(length)                   /* all the case statements fall through */
-     {
--    case 12: c+=((uint32_t)k[11])<<24;
--    case 11: c+=((uint32_t)k[10])<<16;
--    case 10: c+=((uint32_t)k[9])<<8;
--    case 9 : c+=k[8];
--    case 8 : b+=((uint32_t)k[7])<<24;
--    case 7 : b+=((uint32_t)k[6])<<16;
--    case 6 : b+=((uint32_t)k[5])<<8;
--    case 5 : b+=k[4];
--    case 4 : a+=((uint32_t)k[3])<<24;
--    case 3 : a+=((uint32_t)k[2])<<16;
--    case 2 : a+=((uint32_t)k[1])<<8;
-+    case 12: c+=((uint32_t)k[11])<<24; /* FALLTHRU */
-+    case 11: c+=((uint32_t)k[10])<<16; /* FALLTHRU */
-+    case 10: c+=((uint32_t)k[9])<<8; /* FALLTHRU */
-+    case 9 : c+=k[8]; /* FALLTHRU */
-+    case 8 : b+=((uint32_t)k[7])<<24; /* FALLTHRU */
-+    case 7 : b+=((uint32_t)k[6])<<16; /* FALLTHRU */
-+    case 6 : b+=((uint32_t)k[5])<<8; /* FALLTHRU */
-+    case 5 : b+=k[4]; /* FALLTHRU */
-+    case 4 : a+=((uint32_t)k[3])<<24; /* FALLTHRU */
-+    case 3 : a+=((uint32_t)k[2])<<16; /* FALLTHRU */
-+    case 2 : a+=((uint32_t)k[1])<<8; /* FALLTHRU */
-     case 1 : a+=k[0];
-              break;
-     case 0 : return c;
--- 
-2.12.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
deleted file mode 100644
index 401cf13..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "C bindings for apps which will manipulate JSON data"
-DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C."
-HOMEPAGE = "https://github.com/json-c/json-c/wiki"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
-
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
-           file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \
-           "
-SRC_URI[md5sum] = "55f7853f7d8cf664554ce3fa71bf1c7d"
-SRC_URI[sha256sum] = "2a136451a7932d80b7d197b10441e26e39428d67b1443ec43bbba824705e1123"
-
-UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
-# json-c releases page is fetching the list of releases in some weird XML format
-# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
-#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
-RECIPE_UPSTREAM_VERSION = "0.12.1"
-RECIPE_UPSTREAM_DATE = "Jun 07, 2016"
-CHECK_DATE = "Apr 19, 2017"
-
-RPROVIDES_${PN} = "libjson"
-
-inherit autotools
-
-EXTRA_OECONF = "--enable-rdrand"
-
-do_configure_prepend() {
-    # Clean up autoconf cruft that should not be in the tarball
-    rm -f ${S}/config.status
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb
new file mode 100644
index 0000000..06319de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb
@@ -0,0 +1,31 @@
+SUMMARY = "C bindings for apps which will manipulate JSON data"
+DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C."
+HOMEPAGE = "https://github.com/json-c/json-c/wiki"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
+
+SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+           "
+SRC_URI[md5sum] = "11fc5d90c77375e5fc8401e8b9efbf21"
+SRC_URI[sha256sum] = "0316780be9ad16c42d7c26b015a784fd5df4b0909fef0aba51cfb13e492ac24d"
+
+UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
+# json-c releases page is fetching the list of releases in some weird XML format
+# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
+#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
+RECIPE_UPSTREAM_VERSION = "0.13"
+RECIPE_UPSTREAM_DATE = "Dec 07, 2017"
+CHECK_DATE = "Jan 31, 2018"
+
+RPROVIDES_${PN} = "libjson"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-rdrand"
+
+do_configure_prepend() {
+    # Clean up autoconf cruft that should not be in the tarball
+    rm -f ${S}/config.status
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
index 280edb7..cbd0362 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -1,7 +1,8 @@
-From 3012a93745223751cc979e3770207a09a075bec6 Mon Sep 17 00:00:00 2001
+From 2bf0666544293dcfac2f67b678e24353acdcd4e7 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 7 Feb 2017 12:16:03 +0200
-Subject: [PATCH 5/5] Get parameters for both libsolv and libsolvext (libdnf is
+Subject: [PATCH 2/2] Get parameters for both libsolv and libsolvext (libdnf is
+
  using both)
 
 Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
@@ -12,12 +13,12 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8b2ab9a..e2d33d7 100644
+index ca280f3..6ab9827 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -29,7 +29,7 @@ find_package (PkgConfig REQUIRED)
  SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
  FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
 -PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
 +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
@@ -25,5 +26,5 @@
  if (ENABLE_RHSM_SUPPORT)
      pkg_check_modules (RHSM REQUIRED librhsm)
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
index 1ea9310..6cf48a4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -1,7 +1,8 @@
-From 55cbe6f40fe0836385e1a7241ec811cbe99e5840 Mon Sep 17 00:00:00 2001
+From bcea5c5063a2d5f07dbe6f40aee30370fc4ba656 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 30 Dec 2016 18:24:50 +0200
-Subject: [PATCH 4/5] Set libsolv variables with pkg-config (cmake's own module
+Subject: [PATCH 1/2] Set libsolv variables with pkg-config (cmake's own module
+
  doesn't work properly).
 
 Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
@@ -12,12 +13,12 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a75df04..8b2ab9a 100644
+index 8875bbf..ca280f3 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -29,7 +29,8 @@ find_package (PkgConfig REQUIRED)
  SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
  FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
 -find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext)
 +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
@@ -26,5 +27,5 @@
      pkg_check_modules (RHSM REQUIRED librhsm)
      include_directories (${RHSM_INCLUDE_DIRS})
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
new file mode 100644
index 0000000..4fc1d6d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Library providing simplified C and Python API to libsolv"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/libdnf \
+           file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
+           file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \
+           file://0003-Set-the-library-installation-directory-correctly.patch \
+           file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
+           file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
+           "
+
+SRCREV = "60f979bd8db651229c559c1412f1eb880257127d"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc"
+
+inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
+                  ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
+                "
+EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
+EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
deleted file mode 100644
index 01d9346..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Library providing simplified C and Python API to libsolv"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "git://github.com/rpm-software-management/libdnf \
-           file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
-           file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \
-           file://0003-Set-the-library-installation-directory-correctly.patch \
-           file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
-           file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
-           "
-
-SRCREV = "1b19950e82d88eec28d01b4e7c1da712c941201d"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc"
-
-inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
-
-EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
-                  ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
-                "
-EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
-EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
deleted file mode 100644
index 08a58f1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Dec 2016 18:04:35 +0200
-Subject: [PATCH 1/4] Correctly set the library installation directory
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- librepo/CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt
-index 2fe76d8..5026def 100644
---- a/librepo/CMakeLists.txt
-+++ b/librepo/CMakeLists.txt
-@@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY)
- IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
-   SET (LIB_SUFFIX "64")
- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
--SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-+#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-+SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
- 
- INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo)
- INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR})
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
index 7138dfc..d69deb5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -1,41 +1,62 @@
-From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001
+From 5b6849d9d7e030c3a521b5245d86f853b0271a61 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 30 Dec 2016 18:05:36 +0200
-Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running
+Subject: [PATCH 1/2] Do not try to obtain PYTHON_INSTALL_DIR by running
  python.
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
- librepo/python/python2/CMakeLists.txt | 2 +-
- librepo/python/python3/CMakeLists.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ librepo/python/python2/CMakeLists.txt | 12 ++++++------
+ librepo/python/python3/CMakeLists.txt | 12 ++++++------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
 
 diff --git a/librepo/python/python2/CMakeLists.txt b/librepo/python/python2/CMakeLists.txt
-index 3615e17..cffa99f 100644
+index 5ffbd62..90d3c22 100644
 --- a/librepo/python/python2/CMakeLists.txt
 +++ b/librepo/python/python2/CMakeLists.txt
-@@ -1,6 +1,6 @@
+@@ -1,11 +1,11 @@
  FIND_PACKAGE (PythonLibs 2 )
  FIND_PACKAGE (PythonInterp 2 REQUIRED)
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
  INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
  
  MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
 diff --git a/librepo/python/python3/CMakeLists.txt b/librepo/python/python3/CMakeLists.txt
-index dfecac9..38bcc72 100644
+index 47559f7..b39adc2 100644
 --- a/librepo/python/python3/CMakeLists.txt
 +++ b/librepo/python/python3/CMakeLists.txt
-@@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}")
+@@ -10,12 +10,12 @@ message("--- ${PYTHON_INCLUDE_DIR}")
  
  FIND_PACKAGE(PythonLibs 3.0)
  FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
  INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
  
  MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}")
 -- 
-2.11.0
+2.14.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
deleted file mode 100644
index 89ca60e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b1a5c92dbd1d11f1afdc094fccea64de334d2783 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Dec 2016 18:06:24 +0200
-Subject: [PATCH 3/4] tests: fix a race when deleting temporary directories
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- tests/python/tests/test_yum_repo_downloading.py | 2 +-
- tests/python/tests/test_yum_repo_locating.py    | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/python/tests/test_yum_repo_downloading.py b/tests/python/tests/test_yum_repo_downloading.py
-index ad597dc..4a32519 100644
---- a/tests/python/tests/test_yum_repo_downloading.py
-+++ b/tests/python/tests/test_yum_repo_downloading.py
-@@ -32,7 +32,7 @@ class TestCaseYumRepoDownloading(TestCaseWithFlask):
-             os.environ.pop('GNUPGHOME')
-         else:
-             os.environ['GNUPGHOME'] = self._gnupghome
--        shutil.rmtree(self.tmpdir)
-+        shutil.rmtree(self.tmpdir, True)
- 
-     def test_download_repo_01(self):
-         h = librepo.Handle()
-diff --git a/tests/python/tests/test_yum_repo_locating.py b/tests/python/tests/test_yum_repo_locating.py
-index 8f4bea5..db4294c 100644
---- a/tests/python/tests/test_yum_repo_locating.py
-+++ b/tests/python/tests/test_yum_repo_locating.py
-@@ -34,7 +34,7 @@ class TestCaseYumRepoLocating(TestCase):
-             os.environ.pop('GNUPGHOME')
-         else:
-             os.environ['GNUPGHOME'] = self._gnupghome
--        shutil.rmtree(self.tmpdir)
-+        shutil.rmtree(self.tmpdir, True)
- 
-     def test_read_mirrorlist(self):
-         h = librepo.Handle()
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
deleted file mode 100644
index b0c7d1c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a4bbbccce6edc1a2d1bd475506e2975fd7696c88 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 8 Jun 2017 16:31:30 +0800
-Subject: [PATCH] Fix typo: correct LRO_SSLVERIFYHOST with
- CURLOPT_SSL_VERIFYHOST
-
-In commit 51d32c6cd88ba0139c32793183fd6a236c1ef456
----
-Author: Tomas Mlcoch <tmlcoch@redhat.com>
-Date:   Mon May 5 14:31:35 2014 +0200
-
-    Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014)
----
-
-It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST.
-Use CURLOPT_SSL_VERIFYHOST to correct.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- librepo/handle.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/librepo/handle.c b/librepo/handle.c
-index ccea79b..ff39db4 100644
---- a/librepo/handle.c
-+++ b/librepo/handle.c
-@@ -629,7 +629,7 @@ lr_handle_setopt(LrHandle *handle,
- 
-     case LRO_SSLVERIFYHOST:
-         handle->sslverifyhost = va_arg(arg, long) ? 2 : 0;
--        c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYPEER, handle->sslverifyhost);
-+        c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYHOST, handle->sslverifyhost);
-         break;
- 
-     case LRO_SSLCLIENTCERT:
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb
new file mode 100644
index 0000000..4569885
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = " A library providing C and Python (libcURL like) API for downloading linux repository metadata and packages."
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/librepo.git \
+           file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
+           file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
+           "
+
+SRCREV = "7b9b7bf388f3f059529c6f50c40b30919fef30f9"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "curl expat glib-2.0 openssl attr gpgme"
+
+inherit cmake distutils3-base pkgconfig
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
deleted file mode 100644
index 3238b14..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = " A library providing C and Python (libcURL like) API for downloading linux repository metadata and packages."
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "git://github.com/rpm-software-management/librepo.git \
-           file://0001-Correctly-set-the-library-installation-directory.patch \
-           file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
-           file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \
-           file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
-           file://0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch \
-           "
-
-PV = "1.7.20+git${SRCPV}"
-SRCREV = "e1137cbbda78fecb192146300790680a5bc811b1"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "curl expat glib-2.0 openssl attr libcheck gpgme"
-
-inherit cmake distutils3-base pkgconfig
-
-EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
new file mode 100644
index 0000000..2809e4c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
@@ -0,0 +1,41 @@
+From 7f7743ce233fcd735ec580c75270413493658aa6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 19 Apr 2018 18:08:31 -0700
+Subject: [PATCH] Disable generating a native llvm-config
+
+OpenEmbedded already builds this as part of llvm-native
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tools/llvm-config/CMakeLists.txt | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
+index 25f99cec978..c45e9b642a8 100644
+--- a/tools/llvm-config/CMakeLists.txt
++++ b/tools/llvm-config/CMakeLists.txt
+@@ -63,19 +63,3 @@ endif()
+ 
+ # Add the dependency on the generation step.
+ add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})
+-
+-if(CMAKE_CROSSCOMPILING)
+-  set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config")
+-  set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE)
+-
+-  add_custom_command(OUTPUT "${${project}_LLVM_CONFIG_EXE}"
+-    COMMAND ${CMAKE_COMMAND} --build . --target llvm-config --config $<CONFIGURATION>
+-    DEPENDS ${LLVM_NATIVE_BUILD}/CMakeCache.txt
+-    WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
+-    COMMENT "Building native llvm-config..."
+-    USES_TERMINAL)
+-  add_custom_target(${project}NativeLLVMConfig DEPENDS ${${project}_LLVM_CONFIG_EXE})
+-  add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE)
+-
+-  add_dependencies(llvm-config ${project}NativeLLVMConfig)
+-endif(CMAKE_CROSSCOMPILING)
+-- 
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index e251799..209764c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,4 +1,4 @@
-From 28293e48cf1a52004c6a78de448718441f9e05f9 Mon Sep 17 00:00:00 2001
+From 96558c4f25d5132936014f6f2d6252cfdfdf478a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 21 May 2016 00:33:20 +0000
 Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they
@@ -15,10 +15,10 @@
  1 file changed, 21 insertions(+)
 
 diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def
-index 9cbe917c146..aff8419cf54 100644
+index a461ed813b9..f9fd9faeee0 100644
 --- a/include/llvm/Analysis/TargetLibraryInfo.def
 +++ b/include/llvm/Analysis/TargetLibraryInfo.def
-@@ -656,6 +656,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
+@@ -665,6 +665,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
  TLI_DEFINE_ENUM_INTERNAL(fopen)
  TLI_DEFINE_STRING_INTERNAL("fopen")
  /// FILE *fopen64(const char *filename, const char *opentype)
@@ -28,7 +28,7 @@
  TLI_DEFINE_ENUM_INTERNAL(fopen64)
  TLI_DEFINE_STRING_INTERNAL("fopen64")
  /// int fprintf(FILE *stream, const char *format, ...);
-@@ -691,6 +694,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
+@@ -700,6 +703,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
  /// int fseeko(FILE *stream, off_t offset, int whence);
  TLI_DEFINE_ENUM_INTERNAL(fseeko)
  TLI_DEFINE_STRING_INTERNAL("fseeko")
@@ -38,7 +38,7 @@
  /// int fseeko64(FILE *stream, off64_t offset, int whence)
  TLI_DEFINE_ENUM_INTERNAL(fseeko64)
  TLI_DEFINE_STRING_INTERNAL("fseeko64")
-@@ -701,6 +707,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
+@@ -710,6 +716,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
  TLI_DEFINE_ENUM_INTERNAL(fstat)
  TLI_DEFINE_STRING_INTERNAL("fstat")
  /// int fstat64(int filedes, struct stat64 *buf)
@@ -48,7 +48,7 @@
  TLI_DEFINE_ENUM_INTERNAL(fstat64)
  TLI_DEFINE_STRING_INTERNAL("fstat64")
  /// int fstatvfs(int fildes, struct statvfs *buf);
-@@ -716,6 +725,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
+@@ -725,6 +734,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
  TLI_DEFINE_ENUM_INTERNAL(ftello)
  TLI_DEFINE_STRING_INTERNAL("ftello")
  /// off64_t ftello64(FILE *stream)
@@ -58,7 +58,7 @@
  TLI_DEFINE_ENUM_INTERNAL(ftello64)
  TLI_DEFINE_STRING_INTERNAL("ftello64")
  /// int ftrylockfile(FILE *file);
-@@ -836,6 +848,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
+@@ -845,6 +857,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
  TLI_DEFINE_ENUM_INTERNAL(lstat)
  TLI_DEFINE_STRING_INTERNAL("lstat")
  /// int lstat64(const char *path, struct stat64 *buf);
@@ -68,7 +68,7 @@
  TLI_DEFINE_ENUM_INTERNAL(lstat64)
  TLI_DEFINE_STRING_INTERNAL("lstat64")
  /// void *malloc(size_t size);
-@@ -1055,6 +1070,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
+@@ -1064,6 +1079,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
  TLI_DEFINE_ENUM_INTERNAL(stat)
  TLI_DEFINE_STRING_INTERNAL("stat")
  /// int stat64(const char *path, struct stat64 *buf);
@@ -78,7 +78,7 @@
  TLI_DEFINE_ENUM_INTERNAL(stat64)
  TLI_DEFINE_STRING_INTERNAL("stat64")
  /// int statvfs(const char *path, struct statvfs *buf);
-@@ -1184,6 +1202,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
+@@ -1193,6 +1211,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
  TLI_DEFINE_ENUM_INTERNAL(tmpfile)
  TLI_DEFINE_STRING_INTERNAL("tmpfile")
  /// FILE *tmpfile64(void)
@@ -89,5 +89,5 @@
  TLI_DEFINE_STRING_INTERNAL("tmpfile64")
  /// int toascii(int c);
 -- 
-2.13.1
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
index 832bd72..21d2f81 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
@@ -1,4 +1,4 @@
-From d776487bac17650704614248d19d1e6b35775001 Mon Sep 17 00:00:00 2001
+From 2f8ea767afdaa440c6368040630e1b3ea6a0977a Mon Sep 17 00:00:00 2001
 From: Martin Kelly <mkelly@xevo.com>
 Date: Fri, 19 May 2017 00:22:57 -0700
 Subject: [PATCH 2/2] llvm: allow env override of exe path
@@ -35,5 +35,5 @@
    // allow taking the address of ::main however.
    void *P = (void *)(intptr_t)GetExecutablePath;
 -- 
-2.13.1
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
index f06fa49..cb3bba6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -8,7 +8,7 @@
 
 LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=e825e017edc35cfd58e26116e5251771"
 
-DEPENDS = "libffi libxml2-native zlib ninja-native llvm-native"
+DEPENDS = "libffi libxml2 zlib ninja-native llvm-native"
 
 RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
 
@@ -19,14 +19,16 @@
 LLVM_RELEASE = "${PV}"
 LLVM_DIR = "llvm${LLVM_RELEASE}"
 
-SRCREV = "9a5c333388cbb54a0ce3a67c4f539f5e590a089b"
-PV = "5.0"
+SRCREV = "089d4c0c490687db6c75f1d074e99c4d42936a50"
+PV = "6.0"
+BRANCH = "release_60"
 PATCH_VERSION = "0"
-SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=release_50;protocol=http \
+SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};protocol=http \
            file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
            file://0002-llvm-allow-env-override-of-exe-path.patch \
+           file://0001-Disable-generating-a-native-llvm-config.patch \
           "
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 S = "${WORKDIR}/git"
 
 LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
@@ -84,15 +86,15 @@
 }
 
 do_compile() {
-	NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE}
+	ninja -v ${PARALLEL_MAKE}
 }
 
 do_compile_class-native() {
-	NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+	ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
 }
 
 do_install() {
-	NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
+	DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
 	install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config
 
 	install -d ${D}${bindir}/${LLVM_DIR}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
index d7c8648..ee8bee4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -1,22 +1,29 @@
-require m4.inc
+SUMMARY = "Traditional Unix macro processor"
+HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
+DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor.  It is mostly SVR4 \
+compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
+GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
 
-EXTRA_OECONF += "--without-libsigsegv-prefix"
+inherit autotools texinfo
+
+SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
+           file://ac_config_links.patch \
+           file://remove-gets.patch \
+           "
+
+SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+
+SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
+SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
 
 LICENSE = "GPLv3"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
 	            file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
 
-SRC_URI += "file://ac_config_links.patch \
-            file://remove-gets.patch \
-           "
-
-SRC_URI_append_class-target = "\
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-	   "
-
 # Fix "Argument list too long" error when len(TMPDIR) = 410
 acpaths = "-I ./m4"
 
-SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
-SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
+EXTRA_OEMAKE += "'infodir=${infodir}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
index 06d8aa2..407ad89 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
@@ -11,3 +11,4 @@
 	oe_runconf
 }
 
+UPSTREAM_CHECK_URI = "${GNU_MIRROR}/m4/"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
deleted file mode 100644
index 2002594..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "Traditional Unix macro processor"
-HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
-DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor.  It is mostly SVR4 \
-compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
-GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
-
-inherit autotools texinfo
-
-EXTRA_OEMAKE += "'infodir=${infodir}'"
-SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
index 275c0b2..71edf59 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
@@ -14,10 +14,11 @@
 
 2009-11-10	Esben Haabendal	    <eha@doredevelopment.dk>
 
-diff -urN m4-1.4.13.orig/configure m4-1.4.13/configure
---- m4-1.4.13.orig/configure	2009-11-10 10:54:00.301707097 +0100
-+++ m4-1.4.13/configure	2009-11-10 10:54:17.314206379 +0100
-@@ -14860,8 +14860,8 @@
+Index: m4-1.4.18/configure
+===================================================================
+--- m4-1.4.18.orig/configure
++++ m4-1.4.18/configure
+@@ -24415,8 +24415,8 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFD
    # only, it does not matter if we skip the link with older autoconf.
    # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
    # builds, so use a shell variable to bypass this.
@@ -27,4 +28,4 @@
 + # ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
  
  
- 
+   :
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc b/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
index 849b742..b8905bc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
@@ -5,7 +5,10 @@
 HOMEPAGE = "http://www.gnu.org/software/make/"
 SECTION = "devel"
 
-SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2"
+SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \
+           file://0001-glob-Do-not-assume-glibc-glob-internals.patch \
+           file://0002-glob-Do-not-assume-glibc-glob-internals.patch \
+           "
 
 inherit autotools gettext pkgconfig texinfo
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000..2b6e4d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,70 @@
+From c90a7dda6c572f79b8e78da44b6ebf8704edef65 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 1/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do.  GNU 'make' should not get in
+the way of this.  See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ dir.c | 29 +++++++++++++++++++++++++++--
+ 1 file changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/dir.c b/dir.c
+index f34bbf5..12eef30 100644
+--- a/dir.c
++++ b/dir.c
+@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
+ }
+ #endif
+ 
++/* Similarly for lstat.  */
++#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
++# ifndef VMS
++#  ifndef HAVE_SYS_STAT_H
++int lstat (const char *path, struct stat *sbuf);
++#  endif
++# else
++    /* We are done with the fake lstat.  Go back to the real lstat */
++#   ifdef lstat
++#     undef lstat
++#   endif
++# endif
++# define local_lstat lstat
++#elif defined(WINDOWS32)
++/* Windows doesn't support lstat().  */
++# define local_lstat local_stat
++#else
++static int
++local_lstat (const char *path, struct stat *buf)
++{
++  int e;
++  EINTRLOOP (e, lstat (path, buf));
++  return e;
++}
++#endif
++
+ void
+ dir_setup_glob (glob_t *gl)
+ {
+   gl->gl_opendir = open_dirstream;
+   gl->gl_readdir = read_dirstream;
+   gl->gl_closedir = free;
++  gl->gl_lstat = local_lstat;
+   gl->gl_stat = local_stat;
+-  /* We don't bother setting gl_lstat, since glob never calls it.
+-     The slot is only there for compatibility with 4.4 BSD.  */
+ }
+ 
+ void
+-- 
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000..d49acd9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,38 @@
+From 9858702dbd1e137262c06765919937660879f63c Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 2/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do.  GNU 'make' should not get in
+the way of this.  See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64ec870..e87901c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -399,10 +399,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
+ #include <glob.h>
+ #include <fnmatch.h>
+ 
+-#define GLOB_INTERFACE_VERSION 1
+ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+ # include <gnu-versions.h>
+-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
++if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
+    gnu glob
+ # endif
+ #endif],
+-- 
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
new file mode 100644
index 0000000..97778c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
@@ -0,0 +1,30 @@
+From 4676224dbdff0f7107e8cbdbe0eab19c855f1454 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 17 Nov 2017 13:18:28 +0200
+Subject: [PATCH] Linker rules: move {cross_args} in front of {output_args}
+
+The previous order was found to break linking in some cases
+(e.g. when -no-pic -fno-PIC was present in {cross_args}.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/backend/ninjabackend.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
+index bb281e1..969b70e 100644
+--- a/mesonbuild/backend/ninjabackend.py
++++ b/mesonbuild/backend/ninjabackend.py
+@@ -1501,7 +1501,7 @@ int dummy;
+  rspfile_content = $ARGS  {output_args} $in $LINK_ARGS {cross_args} $aliasing
+ '''
+                 else:
+-                    command_template = ' command = {executable} $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing\n'
++                    command_template = ' command = {executable} $ARGS {cross_args} {output_args} $in $LINK_ARGS $aliasing\n'
+                 command = command_template.format(
+                     executable=' '.join(compiler.get_linker_exelist()),
+                     cross_args=' '.join(cross_args),
+-- 
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
new file mode 100644
index 0000000..1912e94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -0,0 +1,113 @@
+From c5692cac9c555664281377a82bf8b1e46934f437 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:16:41 +0300
+Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling
+
+Specifically:
+1) Make it possible to specify a wrapper for executing binaries
+(usually, some kind of target hardware emulator, such as qemu)
+2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will
+try to guess them, incorrectly.
+3) If things break down, print the full command with arguments,
+not just the binary name.
+4) Correctly determine the compiler/linker executables and cross-options when cross-compiling
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py        | 18 +++++++++++++++---
+ mesonbuild/scripts/gtkdochelper.py |  9 +++++++--
+ 2 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 56765a5..4f7fe30 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -769,6 +769,10 @@ This will become a hard error in the future.''')
+                 '--mode=' + mode]
+         if namespace:
+             args.append('--namespace=' + namespace)
++        gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None)
++        if gtkdoc_exe_wrapper is not None:
++            args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper)
++
+         args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
+         args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
+         args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
+@@ -796,14 +800,22 @@ This will become a hard error in the future.''')
+                 raise MesonException(
+                     'Gir include dirs should be include_directories().')
+         cflags.update(get_include_args(inc_dirs))
++
++        cross_c_args = " ".join(state.environment.cross_info.config["properties"].get('c_args', ""))
++        cross_link_args = " ".join(state.environment.cross_info.config["properties"].get('c_link_args', ""))
++
+         if cflags:
+-            args += ['--cflags=%s' % ' '.join(cflags)]
++            args += ['--cflags=%s %s' % (cross_c_args,' '.join(cflags))]
+         if ldflags:
+-            args += ['--ldflags=%s' % ' '.join(ldflags)]
++            args += ['--ldflags=%s %s' % (cross_link_args, ' '.join(ldflags))]
+         compiler = state.environment.coredata.compilers.get('c')
+-        if compiler:
++        cross_compiler = state.environment.coredata.cross_compilers.get('c')
++        if compiler and not state.environment.is_cross_build():
+             args += ['--cc=%s' % ' '.join(compiler.get_exelist())]
+             args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())]
++        elif cross_compiler and state.environment.is_cross_build():
++            args += ['--cc=%s' % ' '.join(cross_compiler.get_exelist())]
++            args += ['--ld=%s' % ' '.join(cross_compiler.get_linker_exelist())]
+ 
+         return args
+ 
+diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
+index 4406b28..b846827 100644
+--- a/mesonbuild/scripts/gtkdochelper.py
++++ b/mesonbuild/scripts/gtkdochelper.py
+@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers', dest='ignore_headers', default='')
+ parser.add_argument('--namespace', dest='namespace', default='')
+ parser.add_argument('--mode', dest='mode', default='')
+ parser.add_argument('--installdir', dest='install_dir')
++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
+ 
+ def gtkdoc_run_check(cmd, cwd):
+     # Put stderr into stdout since we want to print it out anyway.
+     # This preserves the order of messages.
+     p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2]
+     if p.returncode != 0:
+-        err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)]
++        err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)]
+         if out:
+             err_msg.append(out)
+         raise MesonException('\n'.join(err_msg))
+@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd):
+ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+                  main_file, module,
+                  html_args, scan_args, fixxref_args, mkdb_args,
+-                 gobject_typesfile, scanobjs_args, ld, cc, ldflags, cflags,
++                 gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper, ld, cc, ldflags, cflags,
+                  html_assets, content_files, ignore_headers, namespace,
+                  expand_content_files, mode):
+     print("Building documentation for %s" % module)
+@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+     if gobject_typesfile:
+         scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile,
+                                                               '--module=' + module,
++                                                              '--run=' + gtkdoc_exe_wrapper,
++                                                              '--cc=' + cc,
++                                                              '--ld=' + ld,
+                                                               '--cflags=' + cflags,
+                                                               '--ldflags=' + ldflags,
+                                                               '--ld=' + ld]
+@@ -207,6 +211,7 @@ def run(args):
+         mkdbargs,
+         options.gobject_typesfile,
+         scanobjsargs,
++        options.gtkdoc_exe_wrapper,
+         options.ld,
+         options.cc,
+         options.ldflags,
+-- 
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
new file mode 100644
index 0000000..ded42d1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
@@ -0,0 +1,42 @@
+From 972667e0d789a6969a5d79249404f3539f891810 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:18:47 +0300
+Subject: [PATCH 1/2] gobject-introspection: determine g-ir-scanner and
+ g-ir-compiler paths from pkgconfig
+
+Do not hardcode the name of those binaries; gobject-introspection
+provides them via pkgconfig, and they can be set to something else
+(for example when cross-compiling).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 4f7fe30..9610cf6 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -390,8 +390,6 @@ class GnomeModule(ExtensionModule):
+             raise MesonException('Gir takes one argument')
+         if kwargs.get('install_dir'):
+             raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
+-        giscanner = find_program('g-ir-scanner', 'Gir')
+-        gicompiler = find_program('g-ir-compiler', 'Gir')
+         girtarget = args[0]
+         while hasattr(girtarget, 'held_object'):
+             girtarget = girtarget.held_object
+@@ -402,6 +400,8 @@ class GnomeModule(ExtensionModule):
+                 self.gir_dep = PkgConfigDependency('gobject-introspection-1.0',
+                                                    state.environment,
+                                                    {'native': True})
++            giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
++            gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
+             pkgargs = self.gir_dep.get_compile_args()
+         except Exception:
+             raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.')
+-- 
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
new file mode 100644
index 0000000..af5e6a1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -0,0 +1,114 @@
+From ffa72eac56558aa4171dd70ac1e9c27a07338fa2 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Wed, 15 Nov 2017 15:05:01 +0100
+Subject: [PATCH 4/4] native_bindir
+
+Some libraries, like QT, have pre-processors that convert their input
+files into something that the cross-compiler can process. We find the
+path of those pre-processors via pkg-config-native instead of
+pkg-config.
+
+This path forces the use of pkg-config-native for host_bins arguments.
+
+There are some discussions upstream to merge this patch, but I presonaly believe
+that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+
+---
+ mesonbuild/dependencies/base.py | 16 ++++++++++------
+ mesonbuild/dependencies/ui.py   |  6 +++---
+ 2 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
+index bf79bc5..c9fd08c 100644
+--- a/mesonbuild/dependencies/base.py
++++ b/mesonbuild/dependencies/base.py
+@@ -131,7 +131,7 @@ class Dependency:
+     def need_threads(self):
+         return False
+ 
+-    def get_pkgconfig_variable(self, variable_name, kwargs):
++    def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+         raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
+ 
+     def get_configtool_variable(self, variable_name):
+@@ -150,7 +150,7 @@ class InternalDependency(Dependency):
+         self.sources = sources
+         self.ext_deps = ext_deps
+ 
+-    def get_pkgconfig_variable(self, variable_name, kwargs):
++    def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+         raise DependencyException('Method "get_pkgconfig_variable()" is '
+                                   'invalid for an internal dependency')
+ 
+@@ -425,10 +425,14 @@ class PkgConfigDependency(ExternalDependency):
+         return s.format(self.__class__.__name__, self.name, self.is_found,
+                         self.version_reqs)
+ 
+-    def _call_pkgbin(self, args, env=None):
++    def _call_pkgbin(self, args, env=None, use_native=False):
+         if not env:
+             env = os.environ
+-        p, out = Popen_safe([self.pkgbin] + args, env=env)[0:2]
++        if use_native:
++            pkgbin = [self.pkgbin + "-native"]
++        else:
++            pkgbin = [self.pkgbin]
++        p, out = Popen_safe(pkgbin + args, env=env)[0:2]
+         return p.returncode, out.strip()
+ 
+     def _convert_mingw_paths(self, args):
+@@ -522,7 +526,7 @@ class PkgConfigDependency(ExternalDependency):
+             # linkers such as MSVC, so prepend them.
+             self.link_args = ['-L' + lp for lp in libpaths] + self.link_args
+ 
+-    def get_pkgconfig_variable(self, variable_name, kwargs):
++    def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+         options = ['--variable=' + variable_name, self.name]
+ 
+         if 'define_variable' in kwargs:
+@@ -535,7 +539,7 @@ class PkgConfigDependency(ExternalDependency):
+ 
+             options = ['--define-variable=' + '='.join(definition)] + options
+ 
+-        ret, out = self._call_pkgbin(options)
++        ret, out = self._call_pkgbin(options, use_native=use_native)
+         variable = ''
+         if ret != 0:
+             if self.required:
+diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
+index 1db518c..4ed1d04 100644
+--- a/mesonbuild/dependencies/ui.py
++++ b/mesonbuild/dependencies/ui.py
+@@ -239,7 +239,7 @@ class QtBaseDependency(ExternalDependency):
+         self.bindir = self.get_pkgconfig_host_bins(core)
+         if not self.bindir:
+             # If exec_prefix is not defined, the pkg-config file is broken
+-            prefix = core.get_pkgconfig_variable('exec_prefix', {})
++            prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
+             if prefix:
+                 self.bindir = os.path.join(prefix, 'bin')
+ 
+@@ -359,7 +359,7 @@ class Qt4Dependency(QtBaseDependency):
+         applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
+         for application in applications:
+             try:
+-                return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
++                return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
+             except MesonException:
+                 pass
+ 
+@@ -369,7 +369,7 @@ class Qt5Dependency(QtBaseDependency):
+         QtBaseDependency.__init__(self, 'qt5', env, kwargs)
+ 
+     def get_pkgconfig_host_bins(self, core):
+-        return core.get_pkgconfig_variable('host_bins', {})
++        return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
+ 
+ 
+ # There are three different ways of depending on SDL2:
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb
new file mode 100644
index 0000000..6a81dab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb
@@ -0,0 +1,21 @@
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz \
+           file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
+           file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
+           file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
+           file://0003-native_bindir.patch \
+           "
+SRC_URI[md5sum] = "82b1198bf714b5a4da84bfe8376c79cc"
+SRC_URI[sha256sum] = "2ea1a721574adb23160b6481191bcc1173f374e02b0ff3bb0ae85d988d97e4fa"
+UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "ninja python3-core python3-modules"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c
deleted file mode 100644
index cb6faa8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c
+++ /dev/null
@@ -1,348 +0,0 @@
-0xfc, 0xfa, 0xa3, 0x9c, 0x02, 0x01, 0x00, 0x89, 0x1d, 0xa0, 0x02, 0x01, 0x00, 0x83, 0xfc, 0x00,
-0x74, 0x09, 0x8b, 0x44, 0x24, 0x04, 0xa3, 0xa4, 0x02, 0x01, 0x00, 0x8b, 0x25, 0x80, 0x14, 0x01,
-0x00, 0x6a, 0x00, 0x9d, 0x31, 0xc0, 0xbf, 0xb8, 0x15, 0x01, 0x00, 0xb9, 0x44, 0x58, 0x01, 0x00,
-0x29, 0xf9, 0xfc, 0xf3, 0xaa, 0xbe, 0xba, 0x02, 0x01, 0x00, 0xbf, 0x00, 0x10, 0x02, 0x00, 0xb9,
-0x70, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x0f, 0x01, 0x15, 0xb4, 0x02, 0x01, 0x00, 0x0f, 0x01, 0x1d,
-0xae, 0x02, 0x01, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xe0, 0x8e,
-0xe8, 0x8e, 0xd0, 0x68, 0x90, 0x14, 0x01, 0x00, 0xff, 0x35, 0xa4, 0x02, 0x01, 0x00, 0xff, 0x35,
-0xa0, 0x02, 0x01, 0x00, 0xff, 0x35, 0x9c, 0x02, 0x01, 0x00, 0xe8, 0xe3, 0x08, 0x00, 0x00, 0x89,
-0xc6, 0x83, 0xc4, 0x10, 0x6a, 0x00, 0x9d, 0x31, 0xdb, 0xa1, 0xac, 0x14, 0x01, 0x00, 0x83, 0xf8,
-0x01, 0x74, 0x13, 0x31, 0xc0, 0x31, 0xc9, 0x31, 0xd2, 0x31, 0xff, 0x31, 0xed, 0x6a, 0x10, 0xa1,
-0xa8, 0x14, 0x01, 0x00, 0x50, 0xcb, 0x89, 0xf0, 0xbe, 0x2a, 0x03, 0x01, 0x00, 0xbf, 0x00, 0x20,
-0x02, 0x00, 0xb9, 0x20, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x89, 0xc6, 0x0f, 0x01, 0x15, 0x2a, 0x03,
-0x01, 0x00, 0x31, 0xc0, 0x0f, 0xba, 0xe8, 0x05, 0x0f, 0x22, 0xe0, 0xbf, 0x00, 0x30, 0x02, 0x00,
-0x31, 0xc0, 0xb9, 0x00, 0x18, 0x00, 0x00, 0xf3, 0xab, 0xbf, 0x00, 0x30, 0x02, 0x00, 0x8d, 0x87,
-0x07, 0x10, 0x00, 0x00, 0x89, 0x07, 0xbf, 0x00, 0x40, 0x02, 0x00, 0x8d, 0x87, 0x07, 0x10, 0x00,
-0x00, 0xb9, 0x04, 0x00, 0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x10, 0x00, 0x00, 0x83, 0xc7, 0x08,
-0x49, 0x75, 0xf3, 0xbf, 0x00, 0x50, 0x02, 0x00, 0xb8, 0x83, 0x01, 0x00, 0x00, 0xb9, 0x00, 0x08,
-0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x00, 0x20, 0x00, 0x83, 0xc7, 0x08, 0x49, 0x75, 0xf3, 0xb8,
-0x00, 0x30, 0x02, 0x00, 0x0f, 0x22, 0xd8, 0xb9, 0x80, 0x00, 0x00, 0xc0, 0x0f, 0x32, 0x0f, 0xba,
-0xe8, 0x08, 0x0f, 0x30, 0x6a, 0x10, 0xa1, 0xa8, 0x14, 0x01, 0x00, 0x50, 0x31, 0xc0, 0x0f, 0xba,
-0xe8, 0x1f, 0x0f, 0xba, 0xe8, 0x00, 0x0f, 0x22, 0xc0, 0xcb, 0x55, 0x89, 0xe5, 0x53, 0x56, 0x57,
-0x8b, 0x7d, 0x08, 0x81, 0xef, 0x00, 0x00, 0x01, 0x00, 0x8b, 0x75, 0x0c, 0x56, 0xe8, 0xfc, 0x00,
-0x00, 0x00, 0x66, 0x31, 0xdb, 0x66, 0xb8, 0x20, 0xe8, 0x00, 0x00, 0x66, 0xba, 0x50, 0x41, 0x4d,
-0x53, 0x66, 0xb9, 0x14, 0x00, 0x00, 0x00, 0xcd, 0x15, 0x72, 0x18, 0x66, 0x3d, 0x50, 0x41, 0x4d,
-0x53, 0x75, 0x10, 0x66, 0x4e, 0x66, 0x85, 0xf6, 0x74, 0x09, 0x83, 0xc7, 0x14, 0x66, 0x83, 0xfb,
-0x00, 0x75, 0xd2, 0x66, 0xe8, 0x82, 0x00, 0x00, 0x00, 0x58, 0x29, 0xf0, 0x5f, 0x5e, 0x5b, 0x89,
-0xec, 0x5d, 0xc3, 0x53, 0x56, 0x57, 0xe8, 0xb3, 0x00, 0x00, 0x00, 0xf9, 0x31, 0xc9, 0x31, 0xd2,
-0xb8, 0x01, 0xe8, 0xcd, 0x15, 0x72, 0x28, 0x83, 0xf9, 0x00, 0x75, 0x09, 0x83, 0xfa, 0x00, 0x75,
-0x04, 0x89, 0xc1, 0x89, 0xda, 0x66, 0x81, 0xe2, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc1, 0xe2, 0x06,
-0x66, 0x89, 0xd0, 0x66, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x66, 0x01, 0xc8, 0xeb, 0x03, 0x66,
-0x31, 0xc0, 0x66, 0xe8, 0x33, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0x53, 0x56, 0x57, 0xe8,
-0x6a, 0x00, 0x00, 0x00, 0xb4, 0x88, 0xcd, 0x15, 0x66, 0x25, 0xff, 0xff, 0x00, 0x00, 0x66, 0xe8,
-0x17, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0xe8, 0x51, 0x00, 0x00, 0x00, 0xcd, 0x12, 0x89,
-0xc1, 0x66, 0xe8, 0x04, 0x00, 0x00, 0x00, 0x66, 0x89, 0xc8, 0xc3, 0xfa, 0x2e, 0x67, 0x0f, 0x01,
-0x15, 0xb4, 0x02, 0x00, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01, 0x0f, 0x22, 0xc0, 0x66,
-0xea, 0x37, 0x02, 0x01, 0x00, 0x10, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0,
-0x8e, 0xd0, 0x81, 0xc4, 0x00, 0x00, 0x01, 0x00, 0x31, 0xc0, 0x8e, 0xe0, 0x8e, 0xe8, 0x58, 0x05,
-0x00, 0x00, 0x01, 0x00, 0x50, 0x2e, 0x0f, 0x01, 0x1d, 0xae, 0x02, 0x01, 0x00, 0xc3, 0x58, 0x2d,
-0x00, 0x00, 0x01, 0x00, 0x50, 0x81, 0xec, 0x00, 0x00, 0x01, 0x00, 0xea, 0x72, 0x02, 0x00, 0x00,
-0x08, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xe0, 0xfe, 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x84, 0x02,
-0x00, 0x00, 0x00, 0x10, 0x8c, 0xc8, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xd0, 0x8e, 0xe0, 0x8e, 0xe8,
-0x2e, 0x67, 0x0f, 0x01, 0x1d, 0xa8, 0x02, 0x00, 0x00, 0xfb, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x9b, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x93,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x20, 0x00, 0x00, 0x20, 0x02, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xaf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x55, 0x89, 0xc1, 0x89, 0xe5, 0xba,
-0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x20, 0x74, 0xfb, 0xba, 0xf8, 0x03, 0x00, 0x00, 0x88, 0xc8,
-0xee, 0xba, 0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x40, 0x74, 0xfb, 0x5d, 0xc3, 0x55, 0x83, 0xf8,
-0x0a, 0x89, 0xe5, 0x53, 0x89, 0xc3, 0x75, 0x0a, 0xb8, 0x0d, 0x00, 0x00, 0x00, 0xe8, 0xc8, 0xff,
-0xff, 0xff, 0x89, 0xd8, 0x5b, 0x5d, 0xeb, 0xc2, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec,
-0x44, 0x8d, 0x5d, 0x0c, 0x8b, 0x7d, 0x08, 0x0f, 0xbe, 0x07, 0x84, 0xc0, 0x0f, 0x84, 0x68, 0x01,
-0x00, 0x00, 0x3c, 0x25, 0x74, 0x0d, 0xe8, 0xc2, 0xff, 0xff, 0xff, 0x89, 0x7d, 0xbc, 0xe9, 0x4e,
-0x01, 0x00, 0x00, 0x8d, 0x47, 0x01, 0x89, 0x45, 0xbc, 0x8a, 0x47, 0x01, 0x3c, 0x73, 0x75, 0x1a,
-0x89, 0xd8, 0x83, 0xc3, 0x04, 0x8b, 0x30, 0x0f, 0xbe, 0x06, 0x84, 0xc0, 0x0f, 0x84, 0x2f, 0x01,
-0x00, 0x00, 0xe8, 0x96, 0xff, 0xff, 0xff, 0x46, 0xeb, 0xed, 0x3c, 0x4c, 0x75, 0x0d, 0x8d, 0x47,
-0x02, 0xbe, 0x3c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x38, 0x3c, 0x6c, 0x75, 0x0d, 0x8d,
-0x47, 0x02, 0xbe, 0x1c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x27, 0xbe, 0x1c, 0x00, 0x00,
-0x00, 0x3c, 0x68, 0x75, 0x1e, 0x80, 0x7f, 0x02, 0x68, 0x74, 0x0d, 0x8d, 0x47, 0x02, 0xbe, 0x0c,
-0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x0b, 0x8d, 0x47, 0x03, 0xbe, 0x04, 0x00, 0x00, 0x00,
-0x89, 0x45, 0xbc, 0x8b, 0x45, 0xbc, 0x8a, 0x00, 0x88, 0xc2, 0x83, 0xca, 0x20, 0x80, 0xfa, 0x78,
-0x75, 0x5b, 0x8b, 0x13, 0x83, 0xfe, 0x1c, 0x7e, 0x0e, 0x8b, 0x4b, 0x04, 0x89, 0x55, 0xb0, 0x89,
-0x4d, 0xb4, 0x83, 0xc3, 0x08, 0xeb, 0x0b, 0x31, 0xc9, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xb4, 0x83,
-0xc3, 0x04, 0x83, 0xe0, 0x20, 0x8d, 0x7d, 0xc8, 0x88, 0x45, 0xbb, 0x89, 0xf1, 0x8b, 0x55, 0xb4,
-0x8b, 0x45, 0xb0, 0x0f, 0xad, 0xd0, 0xd3, 0xea, 0xf6, 0xc1, 0x20, 0x74, 0x02, 0x89, 0xd0, 0x83,
-0xe0, 0x0f, 0x8a, 0x55, 0xbb, 0x47, 0x0a, 0x90, 0x14, 0x10, 0x01, 0x00, 0x88, 0x57, 0xff, 0x83,
-0xe9, 0x04, 0x79, 0xd9, 0xc1, 0xee, 0x02, 0x8d, 0x74, 0x35, 0xc9, 0xeb, 0x62, 0x3c, 0x64, 0x75,
-0x4a, 0x8b, 0x03, 0x83, 0xfe, 0x1c, 0x7e, 0x05, 0x83, 0xc3, 0x08, 0xeb, 0x03, 0x83, 0xc3, 0x04,
-0x8d, 0x4d, 0xc8, 0x85, 0xc0, 0x79, 0x09, 0xc6, 0x45, 0xc8, 0x2d, 0x8d, 0x4d, 0xc9, 0xf7, 0xd8,
-0x89, 0xce, 0xbf, 0x0a, 0x00, 0x00, 0x00, 0x99, 0x46, 0xf7, 0xff, 0x83, 0xc2, 0x30, 0x85, 0xc0,
-0x88, 0x56, 0xff, 0x75, 0xf2, 0x89, 0xf0, 0x48, 0x39, 0xc1, 0x73, 0x23, 0x0f, 0xb6, 0x38, 0x8a,
-0x11, 0x41, 0x88, 0x10, 0x89, 0xfa, 0x88, 0x51, 0xff, 0xeb, 0xec, 0x3c, 0x63, 0x75, 0x0a, 0x8b,
-0x03, 0x83, 0xc3, 0x04, 0x88, 0x45, 0xc8, 0xeb, 0x03, 0x88, 0x45, 0xc8, 0x8d, 0x75, 0xc9, 0x8d,
-0x7d, 0xc8, 0x39, 0xf7, 0x73, 0x0b, 0x0f, 0xbe, 0x07, 0x47, 0xe8, 0x6e, 0xfe, 0xff, 0xff, 0xeb,
-0xf1, 0x8b, 0x7d, 0xbc, 0x47, 0xe9, 0x8d, 0xfe, 0xff, 0xff, 0x83, 0xc4, 0x44, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x56, 0x53, 0x31, 0xdb, 0x83, 0xec, 0x10, 0x39, 0xd3,
-0x74, 0x23, 0x0f, 0xb6, 0x34, 0x18, 0xf6, 0xc3, 0x01, 0x74, 0x03, 0xc1, 0xe6, 0x08, 0x01, 0xf1,
-0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x76, 0x0a, 0x89, 0xce, 0xc1, 0xee, 0x10, 0x01, 0xf1, 0x0f,
-0xb7, 0xc9, 0x43, 0xeb, 0xd9, 0x88, 0x4d, 0xf6, 0xc1, 0xe9, 0x08, 0x88, 0x4d, 0xf7, 0x0f, 0xb7,
-0x45, 0xf6, 0x83, 0xc4, 0x10, 0x5b, 0x5e, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89,
-0xc3, 0x51, 0x89, 0x55, 0xf0, 0x3b, 0x5d, 0xf0, 0x73, 0x5f, 0x81, 0x3b, 0x4c, 0x42, 0x49, 0x4f,
-0x74, 0x05, 0x83, 0xc3, 0x10, 0xeb, 0xee, 0x83, 0x7b, 0x04, 0x18, 0x75, 0xf5, 0xba, 0x18, 0x00,
-0x00, 0x00, 0x89, 0xd8, 0xe8, 0x89, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75, 0xe2,
-0x8d, 0x73, 0x18, 0x8b, 0x53, 0x0c, 0x89, 0xf0, 0xe8, 0x75, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x0f,
-0xb7, 0xc0, 0x39, 0x43, 0x10, 0x75, 0xcb, 0x8b, 0x4b, 0x0c, 0x31, 0xc0, 0x01, 0xf1, 0x39, 0xf1,
-0x76, 0x10, 0x89, 0xcf, 0x8b, 0x56, 0x04, 0x29, 0xf7, 0x39, 0xfa, 0x77, 0x05, 0x40, 0x01, 0xd6,
-0xeb, 0xec, 0x39, 0x43, 0x14, 0x75, 0xab, 0xeb, 0x02, 0x31, 0xdb, 0x5a, 0x89, 0xd8, 0x5b, 0x5e,
-0x5f, 0x5d, 0xc3, 0x55, 0xba, 0x00, 0x10, 0x00, 0x00, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89, 0xc3,
-0x31, 0xc0, 0x51, 0xe8, 0x71, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x17, 0xba, 0x00, 0x00, 0x10,
-0x00, 0xb8, 0x00, 0x00, 0x0f, 0x00, 0xe8, 0x5e, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x04, 0x31,
-0xc0, 0xeb, 0x2f, 0x8b, 0x50, 0x04, 0x01, 0xc2, 0x83, 0x3a, 0x11, 0x75, 0x16, 0x8b, 0x72, 0x08,
-0x89, 0xf2, 0x89, 0xf0, 0x81, 0xc2, 0x00, 0x10, 0x00, 0x00, 0xe8, 0x3a, 0xff, 0xff, 0xff, 0x85,
-0xc0, 0x74, 0xdc, 0x89, 0x43, 0x28, 0xc7, 0x43, 0x24, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00,
-0x00, 0x00, 0x5a, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec,
-0x14, 0x89, 0x55, 0xe8, 0x8b, 0x75, 0x0c, 0x8b, 0x5d, 0x08, 0x89, 0x75, 0xe4, 0x89, 0x4d, 0xec,
-0x0f, 0xb6, 0xb0, 0xe8, 0x01, 0x00, 0x00, 0x89, 0x5d, 0xe0, 0x8b, 0x7d, 0x10, 0x83, 0xfe, 0x1f,
-0x7f, 0x32, 0x89, 0xf3, 0x6b, 0xf6, 0x14, 0x01, 0xc6, 0x43, 0x89, 0x96, 0xd0, 0x02, 0x00, 0x00,
-0x89, 0x8e, 0xd4, 0x02, 0x00, 0x00, 0x8b, 0x55, 0xe0, 0x8b, 0x4d, 0xe4, 0x89, 0x96, 0xd8, 0x02,
-0x00, 0x00, 0x89, 0x8e, 0xdc, 0x02, 0x00, 0x00, 0x89, 0xbe, 0xe0, 0x02, 0x00, 0x00, 0x88, 0x98,
-0xe8, 0x01, 0x00, 0x00, 0x4f, 0x75, 0x65, 0x8b, 0x5d, 0xe0, 0x8b, 0x75, 0xe4, 0x03, 0x5d, 0xe8,
-0x13, 0x75, 0xec, 0x89, 0xd9, 0x89, 0xf3, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x81, 0xfb, 0xff, 0x03,
-0x00, 0x00, 0x77, 0x13, 0x0f, 0xac, 0xd9, 0x0a, 0x89, 0xce, 0x81, 0xf9, 0xff, 0xff, 0x3f, 0x00,
-0x76, 0x05, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x97, 0x00,
-0x04, 0x00, 0x00, 0x39, 0xf2, 0x73, 0x25, 0x8d, 0x96, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x90, 0xe0,
-0x01, 0x00, 0x00, 0x81, 0xfa, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0b, 0x66, 0x81, 0xee, 0x00, 0x04,
-0x66, 0x89, 0x70, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x40, 0x02, 0x00, 0xfc, 0x83, 0xc4, 0x14, 0x5b,
-0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xec, 0x5d, 0xc3, 0x55, 0x89, 0xe5,
-0x8b, 0x55, 0x08, 0x66, 0xed, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xed, 0x5d, 0xc3,
-0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x55, 0x0c, 0xee, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b,
-0x45, 0x08, 0x8b, 0x55, 0x0c, 0x66, 0xef, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b,
-0x55, 0x0c, 0xef, 0x5d, 0xc3, 0x55, 0x31, 0xc0, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0x3b, 0x45, 0x0c,
-0x74, 0x09, 0x80, 0x3c, 0x02, 0x00, 0x74, 0x03, 0x40, 0xeb, 0xf2, 0x5d, 0xc3, 0x55, 0x31, 0xd2,
-0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x4d, 0x0c, 0x3b, 0x55, 0x10, 0x74, 0x06, 0x88, 0x0c, 0x10,
-0x42, 0xeb, 0xf5, 0x5d, 0xc3, 0x55, 0x31, 0xd2, 0x89, 0xe5, 0x53, 0x8b, 0x45, 0x08, 0x8b, 0x4d,
-0x0c, 0x3b, 0x55, 0x10, 0x74, 0x09, 0x8a, 0x1c, 0x11, 0x88, 0x1c, 0x10, 0x42, 0xeb, 0xf2, 0x5b,
-0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x3b, 0x4d, 0x10, 0x74, 0x17, 0x8b, 0x45, 0x08, 0x0f,
-0xb6, 0x10, 0x8b, 0x45, 0x0c, 0x0f, 0xb6, 0x00, 0x38, 0xc2, 0x74, 0x04, 0x29, 0xd0, 0xeb, 0x05,
-0x41, 0xeb, 0xe4, 0x31, 0xc0, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x8b, 0x45, 0x08,
-0x68, 0x00, 0x01, 0x00, 0x00, 0x8b, 0x4d, 0x10, 0x8d, 0x98, 0x00, 0x08, 0x00, 0x00, 0x53, 0xe8,
-0x71, 0xff, 0xff, 0xff, 0x01, 0xc3, 0x5e, 0x81, 0xf9, 0xfe, 0x00, 0x00, 0x00, 0x5f, 0x8d, 0x73,
-0x01, 0xc6, 0x03, 0x20, 0x7e, 0x05, 0xb9, 0xff, 0x00, 0x00, 0x00, 0x51, 0xff, 0x75, 0x0c, 0xe8,
-0x51, 0xff, 0xff, 0xff, 0x5a, 0x59, 0x50, 0xff, 0x75, 0x0c, 0x89, 0xc7, 0x56, 0xe8, 0x73, 0xff,
-0xff, 0xff, 0x83, 0xc4, 0x0c, 0xc6, 0x44, 0x3b, 0x01, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x10, 0x8b, 0x55, 0x0c, 0x89, 0x45, 0x0c, 0x8b, 0x45,
-0x08, 0x89, 0x55, 0x10, 0x8b, 0x40, 0x10, 0x89, 0x45, 0x08, 0x5d, 0xeb, 0x8a, 0x55, 0x89, 0xe5,
-0x57, 0x56, 0x53, 0x8b, 0x5d, 0x08, 0x68, 0x00, 0x10, 0x00, 0x00, 0x6a, 0x00, 0xff, 0x73, 0x10,
-0xe8, 0x18, 0xff, 0xff, 0xff, 0x8b, 0x43, 0x10, 0xc7, 0x40, 0x0e, 0x19, 0x01, 0x10, 0x00, 0xc7,
-0x00, 0x00, 0x19, 0x00, 0x00, 0xc7, 0x40, 0x04, 0x00, 0x00, 0x00, 0x50, 0xc6, 0x80, 0xe8, 0x01,
-0x00, 0x00, 0x00, 0x8d, 0xb8, 0x00, 0x08, 0x00, 0x00, 0x66, 0xc7, 0x40, 0x0a, 0x00, 0x00, 0xc7,
-0x40, 0x20, 0x3f, 0xa3, 0x00, 0x08, 0x89, 0xb8, 0x28, 0x02, 0x00, 0x00, 0x8b, 0x43, 0x0c, 0x68,
-0xff, 0x00, 0x00, 0x00, 0x8d, 0x48, 0x28, 0x51, 0xe8, 0xb8, 0xfe, 0xff, 0xff, 0x5a, 0x5e, 0x89,
-0xc6, 0x50, 0x51, 0x57, 0xe8, 0xdc, 0xfe, 0xff, 0xff, 0x8b, 0x43, 0x10, 0x83, 0xc0, 0x40, 0xc6,
-0x84, 0x30, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x6a, 0x40, 0x6a, 0x00, 0x50, 0xe8, 0xac, 0xfe, 0xff,
-0xff, 0x83, 0xc4, 0x24, 0x8b, 0x43, 0x10, 0x83, 0xe8, 0x80, 0x6a, 0x20, 0x6a, 0x00, 0x50, 0xe8,
-0x99, 0xfe, 0xff, 0xff, 0x8b, 0x53, 0x0c, 0x8b, 0x43, 0x10, 0x05, 0x02, 0x02, 0x00, 0x00, 0x8b,
-0x4a, 0x14, 0x66, 0x8b, 0x52, 0x16, 0x66, 0x89, 0x48, 0xf6, 0x66, 0x89, 0x50, 0xfa, 0x66, 0xc7,
-0x80, 0x9e, 0xfe, 0xff, 0xff, 0x00, 0x00, 0xc7, 0x40, 0xde, 0x00, 0x00, 0x00, 0x00, 0x66, 0xc7,
-0x80, 0x00, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc7, 0x40, 0xf0, 0xff, 0xff, 0xc6, 0x40, 0xfd,
-0x00, 0x6a, 0x04, 0x68, 0x25, 0x10, 0x01, 0x00, 0x50, 0xe8, 0x67, 0xfe, 0xff, 0xff, 0x8b, 0x43,
-0x10, 0x66, 0xc7, 0x80, 0x10, 0x02, 0x00, 0x00, 0x50, 0x00, 0x83, 0xc4, 0x18, 0x8b, 0x4b, 0x0c,
-0x66, 0xc7, 0x80, 0x06, 0x02, 0x00, 0x00, 0x01, 0x02, 0xc7, 0x80, 0x18, 0x02, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xc7, 0x80, 0x1c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x51, 0x24,
-0x85, 0xd2, 0x74, 0x0f, 0x8b, 0x49, 0x20, 0x89, 0x90, 0x1c, 0x02, 0x00, 0x00, 0x89, 0x88, 0x18,
-0x02, 0x00, 0x00, 0xc7, 0x43, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec, 0x4c, 0xc7, 0x45, 0xc8, 0x00, 0x00,
-0x02, 0x00, 0x8b, 0x45, 0x08, 0x89, 0x45, 0xb8, 0x8b, 0x45, 0x0c, 0x89, 0x45, 0xbc, 0x8b, 0x45,
-0x10, 0x89, 0x45, 0xc0, 0x8b, 0x45, 0x14, 0x89, 0x45, 0xc4, 0x8d, 0x45, 0xb8, 0x50, 0xe8, 0x9a,
-0xfe, 0xff, 0xff, 0x8b, 0x45, 0xb8, 0x59, 0x3d, 0x02, 0xb0, 0xad, 0x2b, 0x75, 0x09, 0xc7, 0x45,
-0xcc, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x31, 0xf6, 0x3d, 0x07, 0xb0, 0x11, 0x0a, 0x75, 0x2c,
-0x8b, 0x45, 0xbc, 0x8b, 0x10, 0xe8, 0x58, 0xfb, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75,
-0x0e, 0xc7, 0x45, 0xd0, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x0d, 0x50,
-0x68, 0x2a, 0x10, 0x01, 0x00, 0xe8, 0xae, 0xf9, 0xff, 0xff, 0x58, 0x5a, 0x31, 0xdb, 0x81, 0x7d,
-0xb8, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x03, 0x8b, 0x5d, 0xbc, 0x8b, 0x45, 0xc0, 0x85, 0xc0, 0x74,
-0x0a, 0x81, 0x38, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x02, 0x89, 0xc3, 0x85, 0xf6, 0x0f, 0x85, 0xce,
-0x00, 0x00, 0x00, 0x85, 0xdb, 0x0f, 0x84, 0xc6, 0x00, 0x00, 0x00, 0x66, 0x83, 0x7b, 0x08, 0x00,
-0x74, 0x0f, 0x8b, 0x53, 0x04, 0x89, 0xd8, 0xe8, 0xf6, 0xfa, 0xff, 0xff, 0xf7, 0xd0, 0x0f, 0xb7,
-0xf0, 0x8b, 0x4b, 0x04, 0x8d, 0x43, 0x0c, 0x01, 0xd9, 0x31, 0xff, 0x89, 0x4d, 0xb4, 0x39, 0x45,
-0xb4, 0x76, 0x1f, 0x8b, 0x08, 0x8b, 0x50, 0x04, 0x83, 0xc1, 0x03, 0x83, 0xc2, 0x03, 0x83, 0xe1,
-0xfc, 0x83, 0xe2, 0xfc, 0x8d, 0x54, 0x11, 0x0c, 0x01, 0xd0, 0x39, 0x45, 0xb4, 0x72, 0x03, 0x47,
-0xeb, 0xdc, 0x81, 0x3b, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x1b, 0x85, 0xf6, 0x75, 0x17, 0x0f, 0xb7,
-0x43, 0x0a, 0x39, 0xf8, 0x75, 0x0f, 0xc7, 0x45, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x89, 0x5d, 0xc0,
-0xe9, 0x95, 0x00, 0x00, 0x00, 0x50, 0x68, 0x4d, 0x10, 0x01, 0x00, 0xe8, 0x08, 0xf9, 0xff, 0xff,
-0x56, 0x68, 0x67, 0x10, 0x01, 0x00, 0xe8, 0xfd, 0xf8, 0xff, 0xff, 0x57, 0x68, 0x79, 0x10, 0x01,
-0x00, 0xe8, 0xf2, 0xf8, 0xff, 0xff, 0x53, 0x68, 0x8b, 0x10, 0x01, 0x00, 0xe8, 0xe7, 0xf8, 0xff,
-0xff, 0x83, 0xc4, 0x20, 0xff, 0x73, 0x04, 0x68, 0x9d, 0x10, 0x01, 0x00, 0xe8, 0xd7, 0xf8, 0xff,
-0xff, 0xff, 0x33, 0x68, 0xaf, 0x10, 0x01, 0x00, 0xe8, 0xcb, 0xf8, 0xff, 0xff, 0x0f, 0xb7, 0x43,
-0x0a, 0x50, 0x68, 0xc1, 0x10, 0x01, 0x00, 0xe8, 0xbc, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x18, 0xeb,
-0x04, 0x85, 0xf6, 0x75, 0x35, 0x51, 0x68, 0xd3, 0x10, 0x01, 0x00, 0xe8, 0xa8, 0xf8, 0xff, 0xff,
-0xff, 0x75, 0xb8, 0x68, 0xee, 0x10, 0x01, 0x00, 0xe8, 0x9b, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xbc,
-0x68, 0xf7, 0x10, 0x01, 0x00, 0xe8, 0x8e, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xc0, 0x68, 0x00, 0x11,
-0x01, 0x00, 0xe8, 0x81, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x20, 0xc7, 0x45, 0xd8, 0x00, 0x00, 0x00,
-0x00, 0xc7, 0x45, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xd4, 0x00, 0x0f, 0x84, 0xfc, 0x00,
-0x00, 0x00, 0x8b, 0x7d, 0xc0, 0x8d, 0x57, 0x0c, 0x03, 0x7f, 0x04, 0x39, 0xd7, 0x76, 0x51, 0x8b,
-0x32, 0x8b, 0x5a, 0x04, 0x89, 0x5d, 0xb4, 0x83, 0xc3, 0x03, 0x8d, 0x4e, 0x03, 0x83, 0xe3, 0xfc,
-0x83, 0xe1, 0xfc, 0x8d, 0x42, 0x0c, 0x01, 0xcb, 0x01, 0xc3, 0x39, 0xdf, 0x72, 0x32, 0x83, 0x7a,
-0x08, 0x01, 0x75, 0x28, 0x85, 0xf6, 0x75, 0x24, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xac, 0x52, 0x6a,
-0x00, 0x6a, 0x00, 0x50, 0xe8, 0x29, 0xfc, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x89, 0xc6, 0x85, 0xc0,
-0x8b, 0x55, 0xb0, 0x8b, 0x4d, 0xac, 0x0f, 0x84, 0x1d, 0x04, 0x00, 0x00, 0x89, 0xda, 0xeb, 0xab,
-0x31, 0xd2, 0x31, 0xff, 0x31, 0xf6, 0x85, 0xd2, 0x0f, 0x95, 0xc3, 0xf7, 0xc6, 0x01, 0x00, 0x00,
-0x00, 0x75, 0x34, 0x84, 0xdb, 0x74, 0x30, 0x31, 0xf6, 0x83, 0x7a, 0x04, 0x0a, 0x75, 0x28, 0x89,
-0x55, 0xb4, 0x50, 0x6a, 0x0a, 0x68, 0x35, 0x11, 0x01, 0x00, 0x57, 0xe8, 0xe2, 0xfb, 0xff, 0xff,
-0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0, 0x75, 0x0d, 0x8d, 0x45, 0xb8, 0xe8, 0x11, 0xfa,
-0xff, 0xff, 0x8b, 0x55, 0xb4, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x0f, 0x84, 0xdb, 0x74, 0x0b, 0x31,
-0xc0, 0x83, 0x7a, 0x04, 0x00, 0x0f, 0x94, 0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x25, 0x84, 0xdb,
-0x74, 0x21, 0x83, 0x7a, 0x04, 0x01, 0x75, 0x1b, 0x50, 0x6a, 0x01, 0x68, 0x66, 0x10, 0x01, 0x00,
-0x57, 0xe8, 0x9c, 0xfb, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0, 0x0f, 0x94, 0xc0, 0x0f, 0xb6,
-0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x13, 0x84, 0xdb, 0x74, 0x0f, 0x57, 0x68, 0x0a, 0x11, 0x01,
-0x00, 0xe8, 0x72, 0xf7, 0xff, 0xff, 0x5f, 0x58, 0xeb, 0x04, 0x85, 0xf6, 0x75, 0x13, 0x8d, 0x45,
-0xb8, 0xe8, 0xad, 0xf9, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x07, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00,
-0x00, 0x51, 0x68, 0x25, 0x11, 0x01, 0x00, 0xe8, 0x4c, 0xf7, 0xff, 0xff, 0x5b, 0x83, 0x7d, 0xdc,
-0x00, 0x5e, 0x74, 0x0d, 0x50, 0x68, 0x34, 0x11, 0x01, 0x00, 0xe8, 0x39, 0xf7, 0xff, 0xff, 0x58,
-0x5a, 0x83, 0x7d, 0xd8, 0x00, 0x74, 0x0d, 0x53, 0x68, 0x3f, 0x11, 0x01, 0x00, 0xe8, 0x26, 0xf7,
-0xff, 0xff, 0x5e, 0x5f, 0x50, 0x68, 0x65, 0x10, 0x01, 0x00, 0xe8, 0x19, 0xf7, 0xff, 0xff, 0x5a,
-0x83, 0x7d, 0xdc, 0x00, 0x59, 0x75, 0x31, 0x83, 0x7d, 0xd8, 0x00, 0x0f, 0x84, 0x16, 0x01, 0x00,
-0x00, 0x50, 0x50, 0x6a, 0x20, 0x68, 0xc4, 0x55, 0x01, 0x00, 0xe8, 0xbb, 0xf4, 0xff, 0xff, 0xbb,
-0xc0, 0x55, 0x01, 0x00, 0xa3, 0xc0, 0x55, 0x01, 0x00, 0x83, 0xc4, 0x10, 0xc7, 0x45, 0xb4, 0x00,
-0x00, 0x00, 0x00, 0xe9, 0xaa, 0x00, 0x00, 0x00, 0x8b, 0x45, 0xe0, 0x8d, 0x58, 0x18, 0x8b, 0x48,
-0x0c, 0x01, 0xd9, 0x89, 0x4d, 0xb4, 0x39, 0x5d, 0xb4, 0x76, 0xbc, 0x8b, 0x55, 0xb4, 0x8b, 0x43,
-0x04, 0x29, 0xda, 0x39, 0xd0, 0x77, 0xb0, 0x83, 0x3b, 0x01, 0x75, 0x4f, 0x83, 0xe8, 0x08, 0xb9,
-0x14, 0x00, 0x00, 0x00, 0x31, 0xd2, 0x8d, 0x73, 0x08, 0xf7, 0xf1, 0x89, 0x45, 0xb0, 0x31, 0xff,
-0x39, 0x7d, 0xb0, 0x7e, 0x2f, 0x83, 0xff, 0x1f, 0x7f, 0x2a, 0x31, 0xc0, 0x8b, 0x16, 0x83, 0x7e,
-0x10, 0x01, 0x0f, 0x95, 0xc0, 0x83, 0xec, 0x04, 0x40, 0x8b, 0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45,
-0xc8, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14, 0xe8, 0x29, 0xf9, 0xff, 0xff, 0x83,
-0xc4, 0x10, 0xeb, 0xcc, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5b, 0x04, 0xeb, 0x96,
-0x8b, 0x43, 0x14, 0x8b, 0x53, 0x04, 0x8b, 0x4b, 0x08, 0x8b, 0x73, 0x0c, 0x8b, 0x7b, 0x10, 0x83,
-0xf8, 0x01, 0x75, 0x07, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0xec, 0x04, 0x83, 0xc3,
-0x14, 0x50, 0x8b, 0x45, 0xb0, 0x57, 0x56, 0xe8, 0xec, 0xf8, 0xff, 0xff, 0xff, 0x45, 0xb4, 0x83,
-0xc4, 0x10, 0x8b, 0x45, 0xb4, 0x3b, 0x05, 0xc0, 0x55, 0x01, 0x00, 0x8b, 0x45, 0xc8, 0x89, 0x45,
-0xb0, 0x7c, 0xbd, 0xe8, 0x3b, 0xf4, 0xff, 0xff, 0x8b, 0x7d, 0xb0, 0x89, 0x87, 0xe0, 0x01, 0x00,
-0x00, 0x8b, 0x5d, 0xc8, 0xe8, 0x73, 0xf4, 0xff, 0xff, 0x66, 0x89, 0x43, 0x02, 0x8b, 0x45, 0xc8,
-0x83, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x75, 0x07, 0x66, 0x83, 0x78, 0x02, 0x00, 0x74, 0x07,
-0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xcc, 0x00, 0x0f, 0x84, 0xb9, 0x00, 0x00,
-0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x55, 0xc8, 0x83, 0x7d, 0xe4, 0x00, 0x8b, 0x1e, 0x74, 0x4d, 0xf6,
-0xc3, 0x01, 0x74, 0x48, 0x8b, 0x46, 0x08, 0x05, 0x00, 0x04, 0x00, 0x00, 0x3d, 0xff, 0xff, 0x3f,
-0x00, 0x76, 0x05, 0xb8, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xba, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x8f,
-0x00, 0x04, 0x00, 0x00, 0x39, 0xc1, 0x73, 0x24, 0x8d, 0x88, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x8a,
-0xe0, 0x01, 0x00, 0x00, 0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0a, 0x66, 0x2d, 0x00, 0x04,
-0x66, 0x89, 0x42, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x42, 0x02, 0x00, 0xfc, 0x80, 0xe3, 0x04, 0x74,
-0x0f, 0x50, 0x6a, 0xff, 0xff, 0x76, 0x10, 0x52, 0xe8, 0xaa, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10,
-0x83, 0x7d, 0xe4, 0x00, 0x0f, 0x84, 0xbd, 0x01, 0x00, 0x00, 0xf6, 0x06, 0x40, 0x0f, 0x84, 0xb4,
-0x01, 0x00, 0x00, 0x8b, 0x5e, 0x30, 0x8b, 0x46, 0x2c, 0x01, 0xd8, 0x8b, 0x7d, 0xc8, 0x89, 0x45,
-0xb4, 0x8b, 0x73, 0xfc, 0x39, 0x5d, 0xb4, 0x0f, 0x86, 0x9a, 0x01, 0x00, 0x00, 0x8b, 0x13, 0x8b,
-0x4b, 0x04, 0x50, 0x89, 0xf8, 0xff, 0x73, 0x10, 0xff, 0x73, 0x0c, 0xff, 0x73, 0x08, 0x01, 0xf3,
-0xe8, 0xe3, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xda, 0x83, 0x7d, 0xd0, 0x00, 0x0f, 0x84,
-0xaa, 0x00, 0x00, 0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x46, 0x0c, 0x85, 0xc0, 0x74, 0x10, 0x52, 0x50,
-0xff, 0x76, 0x08, 0xff, 0x75, 0xc8, 0xe8, 0x3c, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x46,
-0x14, 0x8b, 0x5e, 0x10, 0x89, 0x45, 0xb4, 0x83, 0x7d, 0xb4, 0x00, 0x0f, 0x84, 0x46, 0x01, 0x00,
-0x00, 0x83, 0x3b, 0x01, 0x75, 0x6b, 0x83, 0x7d, 0xe4, 0x00, 0x74, 0x65, 0x8b, 0x45, 0xc8, 0xb9,
-0x14, 0x00, 0x00, 0x00, 0x89, 0x45, 0xb0, 0x8b, 0x43, 0x04, 0x83, 0xe8, 0x08, 0x31, 0xd2, 0xf7,
-0xf1, 0x89, 0x45, 0xac, 0x8d, 0x73, 0x08, 0x31, 0xff, 0x39, 0x7d, 0xac, 0x7e, 0x3c, 0x83, 0xff,
-0x1f, 0x7f, 0x37, 0x8b, 0x46, 0x10, 0x8d, 0x50, 0xff, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x83, 0xfa,
-0x03, 0x77, 0x07, 0x0f, 0xb6, 0x82, 0x10, 0x10, 0x01, 0x00, 0x83, 0xec, 0x04, 0x8b, 0x16, 0x8b,
-0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45, 0xb0, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14,
-0xe8, 0x43, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xbf, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00,
-0x00, 0x8b, 0x43, 0x04, 0x01, 0xc3, 0x29, 0x45, 0xb4, 0xe9, 0x79, 0xff, 0xff, 0xff, 0x83, 0x7d,
-0xd4, 0x00, 0x0f, 0x84, 0xbf, 0x00, 0x00, 0x00, 0x8b, 0x55, 0xc0, 0x8b, 0x7a, 0x04, 0x8d, 0x42,
-0x0c, 0x01, 0xd7, 0x39, 0xc7, 0x0f, 0x86, 0xac, 0x00, 0x00, 0x00, 0x8b, 0x10, 0x8d, 0x48, 0x0c,
-0x8d, 0x5a, 0x03, 0x83, 0xe3, 0xfc, 0x8d, 0x34, 0x19, 0x8b, 0x58, 0x04, 0x89, 0x75, 0xb4, 0x8d,
-0x73, 0x03, 0x83, 0xe6, 0xfc, 0x03, 0x75, 0xb4, 0x89, 0x75, 0xb0, 0x39, 0xf7, 0x0f, 0x82, 0x84,
-0x00, 0x00, 0x00, 0x8b, 0x35, 0x70, 0x14, 0x01, 0x00, 0x8b, 0x40, 0x08, 0x89, 0x75, 0xac, 0x39,
-0x05, 0x78, 0x14, 0x01, 0x00, 0x8b, 0x35, 0x74, 0x14, 0x01, 0x00, 0x75, 0x27, 0x3b, 0x55, 0xac,
-0x75, 0x22, 0x50, 0x52, 0x56, 0x51, 0xe8, 0x17, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0,
-0x75, 0x12, 0x52, 0x8d, 0x45, 0xb8, 0xff, 0x75, 0xb4, 0x53, 0x50, 0xff, 0x15, 0x7c, 0x14, 0x01,
-0x00, 0x83, 0xc4, 0x10, 0x8b, 0x45, 0xb0, 0xeb, 0x8a, 0x8d, 0x7c, 0x0a, 0x0c, 0x83, 0x7d, 0xb4,
-0x07, 0x0f, 0x85, 0xdf, 0xfb, 0xff, 0xff, 0x89, 0x55, 0xb4, 0x50, 0x6a, 0x07, 0x68, 0x40, 0x11,
-0x01, 0x00, 0x57, 0xe8, 0xda, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0,
-0x0f, 0x85, 0xc0, 0xfb, 0xff, 0xff, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00,
-0x00, 0x00, 0xe9, 0xaf, 0xfb, 0xff, 0xff, 0xb0, 0x80, 0xe6, 0x70, 0x31, 0xc0, 0xe6, 0xf0, 0xe6,
-0xf1, 0xb0, 0x11, 0xe6, 0x20, 0xe6, 0xa0, 0xb0, 0x20, 0xe6, 0x21, 0xb0, 0x28, 0xe6, 0xa1, 0xb0,
-0x04, 0xe6, 0x21, 0xb0, 0x02, 0xe6, 0xa1, 0xb0, 0x01, 0xe6, 0x21, 0xe6, 0xa1, 0xb0, 0xff, 0xe6,
-0xa1, 0xb0, 0xfb, 0xe6, 0x21, 0x8b, 0x45, 0xc8, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3,
-0x01, 0x02, 0x03, 0x04, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42,
-0x43, 0x44, 0x45, 0x46, 0x00, 0x48, 0x64, 0x72, 0x53, 0x00, 0x42, 0x61, 0x64, 0x20, 0x75, 0x6e,
-0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65,
-0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x21, 0x0a, 0x00, 0x42, 0x61, 0x64,
-0x20, 0x45, 0x4c, 0x46, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x74,
-0x61, 0x62, 0x6c, 0x65, 0x21, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73,
-0x75, 0x6d, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63,
-0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x68, 0x64, 0x72, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x62, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x62,
-0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a,
-0x00, 0x20, 0x20, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x25,
-0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x6c,
-0x6f, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x21, 0x0a, 0x00, 0x74, 0x79,
-0x70, 0x65, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x64, 0x61, 0x74, 0x61, 0x3d, 0x25, 0x78, 0x0a, 0x00,
-0x70, 0x61, 0x72, 0x61, 0x6d, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
-0x6e, 0x20, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a,
-0x20, 0x25, 0x73, 0x0a, 0x00, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79,
-0x70, 0x65, 0x3a, 0x00, 0x20, 0x4c, 0x69, 0x6e, 0x75, 0x78, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x20,
-0x50, 0x43, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x7a, 0x52, 0x00, 0x01, 0x7c, 0x08, 0x01, 0x1b, 0x0c, 0x04, 0x04, 0x88, 0x01, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xe2, 0xf1, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5d, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x20, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0xe5, 0xf1, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x45, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x51, 0xc3, 0x41, 0xc5,
-0x0c, 0x04, 0x04, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xdc, 0xf1, 0xff, 0xff,
-0x8a, 0x01, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x03, 0x7d, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04,
-0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x36, 0xf3, 0xff, 0xff,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x42, 0x86, 0x03,
-0x83, 0x04, 0x7d, 0xc3, 0x41, 0xc6, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00,
-0xb8, 0x00, 0x00, 0x00, 0x55, 0xf3, 0xff, 0xff, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08,
-0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x70, 0xc3, 0x41,
-0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
-0xa3, 0xf3, 0xff, 0xff, 0x65, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x47, 0x0d,
-0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x56, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41,
-0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xdc, 0xf3, 0xff, 0xff,
-0xcc, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x02, 0xbf, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04,
-0x1c, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x7c, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x00, 0x00, 0x65, 0xf4, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x4f, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x38, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0xf4, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x49, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x11, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfd, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0xf5, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x20, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0xed, 0xf3, 0xff, 0xff, 0x1d, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x55, 0xc3, 0x41, 0xc5,
-0x0c, 0x04, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0xe6, 0xf3, 0xff, 0xff,
-0x25, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5f, 0xc5, 0x0c,
-0x04, 0x04, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xeb, 0xf3, 0xff, 0xff,
-0x5b, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x02, 0x51, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04,
-0x1c, 0x00, 0x00, 0x00, 0xac, 0x02, 0x00, 0x00, 0x1a, 0xf4, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x56, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x2c, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x15, 0xf4, 0xff, 0xff, 0x35, 0x01, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05,
-0x03, 0x2b, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00,
-0x2c, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x00, 0x00, 0x1a, 0xf5, 0xff, 0xff, 0xae, 0x06, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05,
-0x03, 0xa1, 0x06, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x10, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x08, 0x01, 0x00,
-0xc0, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xa5, 0xa5, 0xa5, 0xa5, 0x70, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
-0x8c, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4f, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x41,
-0x47, 0x45, 0x3d, 0x68, 0x65, 0x61, 0x64, 0x2e, 0x53, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c,
-0x65, 0x3d, 0x74, 0x74, 0x79, 0x53, 0x30, 0x20, 0x69, 0x70, 0x3d, 0x64, 0x68, 0x63, 0x70, 0x20,
-0x72, 0x6f, 0x6f, 0x74, 0x3d, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x66, 0x73, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
deleted file mode 100644
index a162eb7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 14 Jul 2012 14:14:07 -0700
-Subject: [PATCH] mkelfimage: Fix cross build
-
-Make the tool to be cross compilable, by separating the variables for build
-tools from those for the target. Also modified to obey LDFLAGS.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
-Upstream-Status: Pending
-
----
- Makefile.conf.in    | 3 +++
- configure.ac        | 7 +++++--
- linux-i386/Makefile | 2 +-
- linux-ia64/Makefile | 2 +-
- main/Makefile       | 4 ++--
- 5 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile.conf.in b/Makefile.conf.in
-index 4645e44..dcb6cf2 100644
---- a/Makefile.conf.in
-+++ b/Makefile.conf.in
-@@ -17,6 +17,9 @@ DEFS=@DEFS@
- LIBS=@LIBS@
- HOST_CC=@HOST_CC@
- HOST_CFLAGS=@HOST_CFLAGS@  $(DEFS)
-+CC=@CC@
-+CFLAGS=@CFLAGS@ $(DEFS)
-+LDFLAGS=@LDFLAGS@
-
- I386_CC     =@I386_CC@
- I386_LD     =@I386_LD@
-diff --git a/configure.ac b/configure.ac
-index 652b952..0f2ac72 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,6 +70,9 @@ if test "with_default" != no ; then
- 		AC_MSG_ERROR([cc not found])
- 	fi
- 	eval "${with_default}_CC='$CC'"
-+	if test "x$HOST_CC" = 'x'; then
-+		AC_CHECK_PROG([HOST_CC], [$CC], [$CC], [gcc], [$PATH])
-+	fi
- 	AC_PROG_CPP
- 	if test "$CPP" = no; then
- 		AC_MSG_ERROR([cpp not found])
-@@ -172,8 +175,8 @@ fi
- 
- dnl ---Output variables...
- 
--HOST_CC=$CC
--HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
-+CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
-+HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
- 
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
-diff --git a/linux-i386/Makefile b/linux-i386/Makefile
-index 51531d6..7e8aa3c 100644
---- a/linux-i386/Makefile
-+++ b/linux-i386/Makefile
-@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
- 
- $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
- 	$(MKDIR) -p $(@D)
--	$(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+	$(CC) $(CFLAGS) -c -g $< -o $@
- 
- 
- ifdef I386_CC
-diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile
-index 38f5d8c..5df8870 100644
---- a/linux-ia64/Makefile
-+++ b/linux-ia64/Makefile
-@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
- 
- $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
- 	$(MKDIR) -p $(@D)
--	$(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+	$(CC) $(CFLAGS) -c -g $< -o $@
- 
- ifdef IA64_CC
- 
-diff --git a/main/Makefile b/main/Makefile
-index 403b0a4..cd53613 100644
---- a/main/Makefile
-+++ b/main/Makefile
-@@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \
- 
- $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS)
- 	$(MKDIR) -p $(@D)
--	$(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-+	$(CC) $(CFLAGS) $(LDFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
- 
- $(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS)
- 	$(MKDIR) -p $(@D)
--	$(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
-+	$(CC) $(CFLAGS) -c $< -o $@
- 
- $(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man
- 	$(MKDIR) -p $(@D)
---
-2.8.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
deleted file mode 100644
index be54754..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Let makefile find libz and zlib.h by CFLAGS and LDFLAGS.
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Upstream-Status: Pending
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0f2ac72..f9099a2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -62,7 +62,7 @@ AC_CHECK_PROG([RPM],   rpm,   rpm,   [], [$PATH])
- AC_CHECK_PROG([SED],   sed,   sed,   [], [$PATH])
- AC_CHECK_PROG([FIND],  find,  find,  [], [$PATH])
- 
--AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS -lz"]))
-+AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS $LDFLAGS -lz"]))
- 
- dnl Find the default programs
- if test "with_default" != no ; then
-@@ -176,7 +176,7 @@ fi
- dnl ---Output variables...
- 
- CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
--HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
-+HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS) $CFLAGS"
- 
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
deleted file mode 100644
index 330fa7c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Utility for creating ELF boot images for ELF-based Linux kernel images"
-HOMEPAGE = "http://www.coreboot.org/Mkelfimage"
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
-
-SRCREV = "686a48a339b3200184c27e7f98d4c03180b2be6c"
-PV = "4.0+git${SRCPV}"
-RECIPE_NO_UPDATE_REASON = "mkelfimage has been removed in coreboot 4.1 release: \
-http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=34fc4ab80b507739e2580d490dff67fcfdde11ea"
-
-
-DEPENDS += "zlib"
-
-SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
-           file://cross-compile.patch \
-           "
-SRC_URI_append_class-native = " \
-           file://fix-makefile-to-find-libz.patch   \
-           file://convert.bin.c \
-"
-
-CLEANBROKEN = "1"
-
-S = "${WORKDIR}/git/util/mkelfImage"
-
-CACHED_CONFIGUREVARS += "\
-    HOST_CC='${BUILD_CC}' \
-    HOST_CFLAGS='${BUILD_CFLAGS}' \
-    HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \
-    I386_CFLAGS='-fno-stack-protector' \
-    IA64_CFLAGS='-fno-stack-protector' \
-"
-EXTRA_OECONF_append_x86-64 = " --with-i386=${HOST_SYS}"
-
-inherit autotools-brokensep
-
-do_configure_prepend-class-native() {
-	cp ${WORKDIR}/convert.bin.c ${S}/linux-i386/
-}
-
-do_install_append() {
-	rmdir ${D}${datadir}/mkelfImage/elf32-i386
-	rmdir ${D}${datadir}/mkelfImage
-	chown root:root ${D}/${sbindir}/mkelfImage
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
index 7d6d62e..17d9af4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
@@ -1,7 +1,7 @@
-From f172101130604e4a9efa5746f4d8d30de99a0fdc Mon Sep 17 00:00:00 2001
+From dcb45256970b15b672d0004533826c94083356e5 Mon Sep 17 00:00:00 2001
 From: Yuanjie Huang <yuanjie.huang@windriver.com>
 Date: Fri, 17 Apr 2015 14:48:20 +0800
-Subject: [PATCH] avoid failure on symbol provided by application
+Subject: [PATCH 4/6] avoid failure on symbol provided by application
 
 Upstream-Status: Pending
 
@@ -13,12 +13,13 @@
 of symbols.
 
 Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+
 ---
  src/mklibs | 28 ++++++++++++++++++++++++----
  1 file changed, 24 insertions(+), 4 deletions(-)
 
 diff --git a/src/mklibs b/src/mklibs
-index c5614ea..b0d9034 100755
+index a3533c0..66b7a09 100755
 --- a/src/mklibs
 +++ b/src/mklibs
 @@ -133,9 +133,9 @@ class Symbol(object):
@@ -31,9 +32,9 @@
 -        self.weak, self.library = weak, library
 +        self.weak, self.library, self.object = weak, library, object
  
- # Return undefined symbols in an object as a set of tuples (name, weakness)
- def undefined_symbols(obj):
-@@ -144,6 +144,11 @@ def undefined_symbols(obj):
+ def symbol_is_blacklisted(name):
+     # The ARM Embedded ABI spec states symbols under this namespace as
+@@ -152,6 +152,11 @@ def undefined_symbols(obj):
  
      output = command("mklibs-readelf", "--print-symbols-undefined", obj)
  
@@ -45,7 +46,7 @@
      result = []
      for line in output:
          name, weak_string, version_string, library_string = line.split()[:4]
-@@ -160,7 +165,7 @@ def undefined_symbols(obj):
+@@ -171,7 +176,7 @@ def undefined_symbols(obj):
          if library_string.lower() != 'none':
              library = library_string
  
@@ -54,7 +55,7 @@
  
      return result
  
-@@ -495,12 +500,13 @@ while 1:
+@@ -498,12 +503,13 @@ while 1:
                       and re.search("^ps_", str(symbol)))
                  and not (re.search("ld-linux.so.3$", str(symbol)))
                  and not (re.search("^__gnu_local_gp", str(symbol)))):
@@ -68,8 +69,8 @@
 +    present_symbol_progs = {}
      checked_libs = small_libs
      checked_libs.extend(available_libs)
-     checked_libs.append(ldlib)
-@@ -510,6 +516,12 @@ while 1:
+     checked_libs.append(sysroot + ldlib)
+@@ -513,6 +519,12 @@ while 1:
              names = symbol.base_names()
              for name in names:
                  present_symbols[name] = symbol
@@ -82,7 +83,7 @@
  
      # are we finished?
      num_unresolved = 0
-@@ -565,6 +577,14 @@ while 1:
+@@ -568,6 +580,14 @@ while 1:
      for name in needed_symbols:
          if not name in symbol_provider:
              if not needed_symbols[name].weak:
@@ -98,5 +99,5 @@
          else:
              lib = symbol_provider[name]
 -- 
-1.8.5.2.233.g932f7e4
+2.16.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
new file mode 100644
index 0000000..62e25fd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
@@ -0,0 +1,36 @@
+From 175ac0f362bf6121c3537e2f1760ad41c8f81367 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Mar 2018 01:04:57 -0700
+Subject: [PATCH] lsmmc: replace strncpy with memmove on overlapping memory
+ copy
+
+here source and destination addresses are overlapping so using memmove is
+going to be more efficient.
+
+Additionally, the bounded size for copy is overflowing for first copy
+
+In function 'strncpy',
+    inlined from 'read_file' at lsmmc.c:356:3:
+/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/mmc-utils/0.1-r0/recipe-sysroot/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' accessing 4096 bytes at offsets 0 and 1 overlaps 4095 bytes at offset 1 [-Werror=restrict]
+   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
+          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10314723/]
+ lsmmc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index c4faa00..bcb854d 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -353,7 +353,7 @@ char *read_file(char *name)
+ 		line[strlen(line) - 1] = '\0';
+ 
+ 	while (isspace(line[0]))
+-		strncpy(&line[0], &line[1], sizeof(line));
++		memmove(&line[0], &line[1], sizeof(line)-1);
+ 
+ 	return strdup(line);
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 50acdb1..37a4755 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,12 +4,14 @@
 LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
 
 SRCBRANCH ?= "master"
-SRCREV = "37c86e60c0442fef570b75cd81aeb1db4d0cbafd"
+SRCREV = "b4fe0c8c0e57a74c01755fa9362703b60d7ee49d"
 
 PV = "0.1"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
+           file://0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch \
+           "
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
deleted file mode 100644
index bf3f98f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4dab9bed1033f797ef9b482c77342fe3fe26d0be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Oct 2015 23:51:34 +0000
-Subject: [PATCH] Fix build with musl
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- jffsX-utils/mkfs.jffs2.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c
-index 5446a16..ca5e0d5 100644
---- a/jffsX-utils/mkfs.jffs2.c
-+++ b/jffsX-utils/mkfs.jffs2.c
-@@ -72,6 +72,7 @@
- #include <byteswap.h>
- #include <crc32.h>
- #include <inttypes.h>
-+#include <limits.h>
- 
- #include "rbtree.h"
- #include "common.h"
--- 
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
deleted file mode 100644
index 853de6a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 82839c3c0371ca2a1643a99d7d01f5bc1c850b28 Mon Sep 17 00:00:00 2001
-From: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-Date: Thu, 2 Mar 2017 11:40:36 +0100
-Subject: [PATCH] Replace rpmatch() usage with checking first character of line
-
-This is based on the patch from Khem Raj used by openembedded. In
-addition to the original patch, this also removes the fallback
-implementation that was provided for C libraries that don't implement
-rpmatch.
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- include/common.h | 25 ++++++-------------------
- 1 file changed, 6 insertions(+), 19 deletions(-)
-
-diff --git a/include/common.h b/include/common.h
-index d0c706d..d609257 100644
---- a/include/common.h
-+++ b/include/common.h
-@@ -129,21 +129,6 @@ extern "C" {
- 	fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
- } while(0)
- 
--/* uClibc versions before 0.9.34 and musl don't have rpmatch() */
--#if defined(__UCLIBC__) && \
--		(__UCLIBC_MAJOR__ == 0 && \
--		(__UCLIBC_MINOR__ < 9 || \
--		(__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34))) || \
--	!defined(__GLIBC__)
--#undef rpmatch
--#define rpmatch __rpmatch
--static inline int __rpmatch(const char *resp)
--{
--    return (resp[0] == 'y' || resp[0] == 'Y') ? 1 :
--	(resp[0] == 'n' || resp[0] == 'N') ? 0 : -1;
--}
--#endif
--
- /**
-  * prompt the user for confirmation
-  */
-@@ -164,10 +149,12 @@ static inline bool prompt(const char *msg, bool def)
- 		}
- 
- 		if (strcmp("\n", line) != 0) {
--			switch (rpmatch(line)) {
--			case 0: ret = false; break;
--			case 1: ret = true; break;
--			case -1:
-+			switch (line[0]) {
-+			case 'N':
-+			case 'n': ret = false; break;
-+			case 'Y':
-+			case 'y': ret = true; break;
-+			default:
- 				puts("unknown response; please try again");
- 				continue;
- 			}
--- 
-2.6.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
index 0e3776a..5d874d9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -1,8 +1,10 @@
 Upstream-Status: Pending
 
---- /tmp/mkfs.jffs2.c	2009-01-11 15:28:41.000000000 +0100
-+++ git/jffsX-utils/mkfs.jffs2.c	2009-01-11 15:59:29.000000000 +0100
-@@ -100,6 +100,11 @@
+Index: git/jffsX-utils/mkfs.jffs2.c
+===================================================================
+--- git.orig/jffsX-utils/mkfs.jffs2.c
++++ git/jffsX-utils/mkfs.jffs2.c
+@@ -100,6 +100,11 @@ struct filesystem_entry {
  	struct rb_node hardlink_rb;
  };
  
@@ -14,7 +16,7 @@
  struct rb_root hardlinks;
  static int out_fd = -1;
  static int in_fd = -1;
-@@ -408,7 +413,7 @@
+@@ -309,7 +314,7 @@ static struct filesystem_entry *recursiv
  	char *hpath, *tpath;
  	struct dirent *dp, **namelist;
  	struct filesystem_entry *entry;
@@ -22,8 +24,8 @@
 +	struct ignorepath_entry* element = ignorepath;
  
  	if (lstat(hostpath, &sb)) {
- 		perror_msg_and_die("%s", hostpath);
-@@ -417,6 +422,15 @@
+ 		sys_errmsg_die("%s", hostpath);
+@@ -318,6 +323,15 @@ static struct filesystem_entry *recursiv
  	entry = add_host_filesystem_entry(targetpath, hostpath,
  			sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
  
@@ -38,8 +40,8 @@
 +
  	n = scandir(hostpath, &namelist, 0, alphasort);
  	if (n < 0) {
- 		perror_msg_and_die("opening directory %s", hostpath);
-@@ -1453,6 +1467,7 @@
+ 		sys_errmsg_die("opening directory %s", hostpath);
+@@ -1359,6 +1373,7 @@ static struct option long_options[] = {
  	{"root", 1, NULL, 'r'},
  	{"pagesize", 1, NULL, 's'},
  	{"eraseblock", 1, NULL, 'e'},
@@ -47,15 +49,15 @@
  	{"output", 1, NULL, 'o'},
  	{"help", 0, NULL, 'h'},
  	{"verbose", 0, NULL, 'v'},
-@@ -1500,6 +1515,7 @@
- "  -L, --list-compressors  Show the list of the avaiable compressors\n"
+@@ -1409,6 +1424,7 @@ static const char helptext[] =
+ "  -L, --list-compressors  Show the list of the available compressors\n"
  "  -t, --test-compression  Call decompress and compare with the original (for test)\n"
  "  -n, --no-cleanmarkers   Don't add a cleanmarker to every eraseblock\n"
 +"  -I, --ignore=PATH       Ignore sub directory and file tree below PATH when recursing over the file system\n"
  "  -o, --output=FILE       Output to FILE (default: stdout)\n"
  "  -l, --little-endian     Create a little-endian filesystem\n"
  "  -b, --big-endian        Create a big-endian filesystem\n"
-@@ -1666,6 +1682,7 @@
+@@ -1566,6 +1582,7 @@ int main(int argc, char **argv)
  	char *compr_name = NULL;
  	int compr_prior  = -1;
  	int warn_page_size = 0;
@@ -63,7 +65,7 @@
  
  	page_size = sysconf(_SC_PAGESIZE);
  	if (page_size < 0) /* System doesn't know so ... */
-@@ -1676,7 +1693,7 @@
+@@ -1576,7 +1593,7 @@ int main(int argc, char **argv)
  	jffs2_compressors_init();
  
  	while ((opt = getopt_long(argc, argv,
@@ -72,7 +74,7 @@
  	{
  		switch (opt) {
  			case 'D':
-@@ -1700,6 +1717,28 @@
+@@ -1600,6 +1617,28 @@ int main(int argc, char **argv)
  				warn_page_size = 0; /* set by user, so don't need to warn */
  				break;
  
@@ -100,4 +102,4 @@
 +
  			case 'o':
  				if (out_fd != -1) {
- 					error_msg_and_die("output filename specified more than once");
+ 					errmsg_die("output filename specified more than once");
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
deleted file mode 100644
index 6fc594f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 7d026a85946a08b8167dcd792ea6660bf6a49e08 Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Date: Thu, 2 Mar 2017 10:43:56 +0100
-Subject: [PATCH] Fix alignment trap triggered by NEON instructions
-
-NEON instruction VLD1.64 was used to copy 64 bits data after type
-casting, and they will trigger alignment trap.
-This patch uses memcpy to avoid alignment problem.
-
-Upstream-Status: Backport
-
-Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- ubifs-utils/mkfs.ubifs/key.h | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/ubifs-utils/mkfs.ubifs/key.h b/ubifs-utils/mkfs.ubifs/key.h
-index 39379fd..118858b 100644
---- a/ubifs-utils/mkfs.ubifs/key.h
-+++ b/ubifs-utils/mkfs.ubifs/key.h
-@@ -159,10 +159,12 @@ static inline void data_key_init(union ubifs_key *key, ino_t inum,
-  */
- static inline void key_write(const union ubifs_key *from, void *to)
- {
--	union ubifs_key *t = to;
-+	__le32 x[2];
- 
--	t->j32[0] = cpu_to_le32(from->u32[0]);
--	t->j32[1] = cpu_to_le32(from->u32[1]);
-+	x[0] = cpu_to_le32(from->u32[0]);
-+	x[1] = cpu_to_le32(from->u32[1]);
-+
-+	memcpy(to, &x, 8);
- 	memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8);
- }
- 
-@@ -174,10 +176,12 @@ static inline void key_write(const union ubifs_key *from, void *to)
-  */
- static inline void key_write_idx(const union ubifs_key *from, void *to)
- {
--	union ubifs_key *t = to;
-+	__le32 x[2];
-+
-+	x[0] = cpu_to_le32(from->u32[0]);
-+	x[1] = cpu_to_le32(from->u32[1]);
- 
--	t->j32[0] = cpu_to_le32(from->u32[0]);
--	t->j32[1] = cpu_to_le32(from->u32[1]);
-+	memcpy(to, &x, 8);
- }
- 
- /**
--- 
-2.6.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
deleted file mode 100644
index 0f42e73..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-Upstream-Status: Pending
-From patchwork Mon Aug  8 08:16:43 2011
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command
-Date: Sun, 07 Aug 2011 22:16:43 -0000
-From: b35362@freescale.com
-X-Patchwork-Id: 108873
-Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com>
-To: <dwmw2@infradead.org>
-Cc: Liu Shuo <b35362@freescale.com>, Artem.Bityutskiy@nokia.com,
- Li Yang <leoli@freescale.com>, linux-mtd@lists.infradead.org
-
-From: Liu Shuo <b35362@freescale.com>
-
-Flash_erase -j should fill discrete freeoob areas with required bytes
-of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill
-the first freeoob area.
-
-The below is the result without this workaround:
-
-JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00004000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00008000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00014000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00018000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00024000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00028000 is not formatted. It will be erased
-...
-
-Signed-off-by: Liu Shuo <b35362@freescale.com>
-Signed-off-by: Li Yang <leoli@freescale.com>
-
-Updated for the new version
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
----
-v2 : get length of availble freeoob bytes from oobinfo information,
-      not use the ioctl ECCGETLAYOUT which is being deprecated.
-
- flash_erase.c |   46 +++++++++++++++++++++++++++++++++++++++-------
- 1 files changed, 39 insertions(+), 7 deletions(-)
-
-diff --git a/flash_erase.c b/flash_erase.c
-index 933373a..4b9d84b 100644
---- a/misc-utils/flash_erase.c
-+++ b/misc-utils/flash_erase.c
-@@ -99,6 +99,7 @@ int main(int argc, char *argv[])
- 	bool isNAND;
- 	int error = 0;
- 	off_t offset = 0;
-+	void *oob_data = NULL;
- 
- 	/*
- 	 * Process user arguments
-@@ -201,15 +202,43 @@ int main(int argc, char *argv[])
- 			if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0)
- 				return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device);
- 
-+			cleanmarker.totlen = cpu_to_je32(8);
- 			/* Check for autoplacement */
- 			if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) {
--				/* Get the position of the free bytes */
--				if (!oobinfo.oobfree[0][1])
-+				struct nand_ecclayout_user ecclayout;
-+				int i, oobavail;
-+
-+				for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++)
-+					oobavail += oobinfo.oobfree[i][1];
-+
-+				if (!oobavail)
- 					return errmsg(" Eeep. Autoplacement selected and no empty space in oob");
-+
-+				/* Get the position of the free bytes */
- 				clmpos = oobinfo.oobfree[0][0];
--				clmlen = oobinfo.oobfree[0][1];
--				if (clmlen > 8)
--					clmlen = 8;
-+				clmlen = MIN(oobavail, 8);
-+
-+				if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) {
-+					int left, n, last = 0;
-+					void *cm;
-+
-+					oob_data = malloc(mtd.oob_size);
-+					if (!oob_data)
-+						return -ENOMEM;
-+
-+					memset(oob_data, 0xff, mtd.oob_size);
-+					cm = &cleanmarker;
-+					for (i = 0, left = clmlen; left ; i++) {
-+						n = MIN(left, oobinfo.oobfree[i][1]);
-+						memcpy(oob_data + oobinfo.oobfree[i][0],
-+								cm, n);
-+						left -= n;
-+						cm   += n;
-+						last = oobinfo.oobfree[i][0] + n;
-+					}
-+
-+					clmlen = last - clmpos;
-+				}
- 			} else {
- 				/* Legacy mode */
- 				switch (mtd.oob_size) {
-@@ -227,7 +256,6 @@ int main(int argc, char *argv[])
- 						break;
- 				}
- 			}
--			cleanmarker.totlen = cpu_to_je32(8);
- 		}
- 		cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4));
- 	}
-@@ -276,7 +304,8 @@ int main(int argc, char *argv[])
- 
- 		/* write cleanmarker */
- 		if (isNAND) {
--			if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, &cleanmarker) != 0) {
-+			void *data = oob_data ? oob_data + clmpos : &cleanmarker;
-+			if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, data) != 0) {
- 				sys_errmsg("%s: MTD writeoob failure", mtd_device);
- 				continue;
- 			}
-@@ -291,5 +320,8 @@ int main(int argc, char *argv[])
- 	show_progress(&mtd, offset, eb, eb_start, eb_cnt);
- 	bareverbose(!quiet, "\n");
- 
-+	if (oob_data)
-+		free(oob_data);
-+
- 	return 0;
- }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 48ba2ee..a0e1cf7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -8,42 +8,61 @@
 inherit autotools pkgconfig update-alternatives
 
 DEPENDS = "zlib lzo e2fsprogs util-linux"
+RDEPENDS_mtd-utils-tests += "bash"
 
-PV = "2.0.0"
+PV = "2.0.1+${SRCPV}"
 
-SRCREV = "1bfee8660131fca7a18f68e9548a18ca6b3378a0"
+SRCREV = "9c6173559f95e939e66efb2ec3193d6f3618cf69"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
            file://add-exclusion-to-mkfs-jffs2-git-2.patch \
-           file://fix-armv7-neon-alignment.patch \
-           file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch \
-           file://0001-Fix-build-with-musl.patch \
-           file://010-fix-rpmatch.patch \
 "
 
 S = "${WORKDIR}/git/"
 
+EXTRA_OECONF += "--enable-install-tests"
+
 # xattr support creates an additional compile-time dependency on acl because
 # the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
 # regardless whether acl is enabled or disabled in the distro should be okay.
 PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
 PACKAGECONFIG[xattr] = ",,acl,"
 
+CPPFLAGS_append_riscv64  = " -pthread -D_REENTRANT"
+
 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
 
-ALTERNATIVE_${PN} = "flash_eraseall"
+# Use higher priority than corresponding BusyBox-provided applets
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
+ALTERNATIVE_${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
+
 ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
-# Use higher priority than busybox's flash_eraseall (created when built with CONFIG_FLASH_ERASEALL)
-ALTERNATIVE_PRIORITY[flash_eraseall] = "100"
+ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
+ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
+ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
+ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
+ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
+ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
+ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
+ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
+ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
 
 do_install () {
 	oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
 }
 
-PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
+PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc mtd-utils-tests"
 
 FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
 FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
 FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
+FILES_mtd-utils-tests = "${libexecdir}/mtd-utils/*"
 
 BBCLASSEXTEND = "native nativesdk"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
index 2e2873a..8ceb0af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
@@ -1,8 +1,10 @@
 Upstream-Status: Inappropriate [licensing]
 
---- mtools-3.9.9/configure.in.orig	2006-04-14 16:05:54.337655192 -0600
-+++ mtools-3.9.9/configure.in	2006-04-14 16:12:29.736545424 -0600
-@@ -21,6 +21,33 @@
+Index: mtools-4.0.18/configure.in
+===================================================================
+--- mtools-4.0.18.orig/configure.in
++++ mtools-4.0.18/configure.in
+@@ -35,6 +35,33 @@ AC_CANONICAL_SYSTEM
  AC_C_CONST
  AC_C_INLINE
  
@@ -36,9 +38,11 @@
  
  dnl Check for configuration options
  dnl Enable OS/2 extended density format disks
---- mtools-3.9.9/Makefile.in.sav	2006-04-14 15:56:19.000000000 -0600
-+++ mtools-3.9.9/Makefile.in	2006-04-14 16:15:29.315245312 -0600
-@@ -11,10 +11,11 @@
+Index: mtools-4.0.18/Makefile.in
+===================================================================
+--- mtools-4.0.18.orig/Makefile.in
++++ mtools-4.0.18/Makefile.in
+@@ -26,10 +26,11 @@ USERCFLAGS =
  USERLDFLAGS =
  USERLDLIBS =
  
@@ -54,7 +58,7 @@
  
  
  # do not edit below this line
-@@ -181,7 +182,7 @@
+@@ -198,7 +199,7 @@ dvi: mtools.dvi
  
  ps: mtools.ps
  %.ps: %.dvi
@@ -62,4 +66,4 @@
 +	$(DVI2PS) -f < $< > $@
  
  pdf: mtools.pdf
- %.pdf: %.texi
+ %.pdf: %.texi sysconfdir.texi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch
new file mode 100644
index 0000000..12ae3a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch
@@ -0,0 +1,27 @@
+From 77c3a77210d8ca8b94e999c711156e984a8dc737 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 31 Mar 2018 11:05:33 -0700
+Subject: [PATCH] asmlib: Drop pure function attribute from seg_init
+
+seg_init returns void, so it is impure function
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ include/nasmlib.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/nasmlib.h b/include/nasmlib.h
+index 79e866b..b80b7e2 100644
+--- a/include/nasmlib.h
++++ b/include/nasmlib.h
+@@ -191,7 +191,7 @@ int64_t readstrnum(char *str, int length, bool *warn);
+  * seg_init: Initialise the segment-number allocator.
+  * seg_alloc: allocate a hitherto unused segment number.
+  */
+-void pure_func seg_init(void);
++void seg_init(void);
+ int32_t pure_func seg_alloc(void);
+ 
+ /*
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
deleted file mode 100644
index bf18cd6..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "General-purpose x86 assembler"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
-
-SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
-
-SRC_URI[md5sum] = "1f7d4662040d24351df7d6719ed4f97a"
-SRC_URI[sha256sum] = "08f97baf0a7f892128c6413cfa93b69dc5825fbbd06c70928aea028835d198fa"
-
-inherit autotools-brokensep
-
-do_configure_prepend () {
-	if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then
-		mv ${S}/aclocal.m4 ${S}/acinclude.m4
-	fi
-}
-
-do_install() {
-	install -d ${D}${bindir}
-	install -d ${D}${mandir}/man1
-
-	oe_runmake 'INSTALLROOT=${D}' install
-}
-
-BBCLASSEXTEND = "native"
-
-DEPENDS = "groff-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb
new file mode 100644
index 0000000..236d7e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb
@@ -0,0 +1,30 @@
+SUMMARY = "General-purpose x86 assembler"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
+
+SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
+           file://0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch \
+           "
+
+SRC_URI[md5sum] = "0c581d482f39d5111879ca9601938f74"
+SRC_URI[sha256sum] = "63ec86477ad3f0f6292325fd89e1d93aea2e2fd490070863f17d48f7cd387011"
+
+inherit autotools-brokensep
+
+do_configure_prepend () {
+	if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then
+		mv ${S}/aclocal.m4 ${S}/acinclude.m4
+	fi
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -d ${D}${mandir}/man1
+
+	oe_runmake 'INSTALLROOT=${D}' install
+}
+
+BBCLASSEXTEND = "native"
+
+DEPENDS = "groff-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb
deleted file mode 100644
index 4d3b272..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Ninja is a small build system with a focus on speed."
-HOMEPAGE = "http://martine.github.com/ninja/"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
-
-DEPENDS = "re2c-native ninja-native"
-
-SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b"
-
-SRC_URI = "git://github.com/martine/ninja.git;branch=release"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
-
-S = "${WORKDIR}/git"
-
-do_configure[noexec] = "1"
-
-do_compile_class-native() {
-	./configure.py --bootstrap
-}
-
-do_compile() {
-	./configure.py
-	ninja
-}
-
-do_install() {
-	install -D -m 0755  ${S}/ninja ${D}${bindir}/ninja
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb
new file mode 100644
index 0000000..c6fcfef
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Ninja is a small build system with a focus on speed."
+HOMEPAGE = "http://martine.github.com/ninja/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
+
+DEPENDS = "re2c-native ninja-native"
+
+SRCREV = "253e94c1fa511704baeb61cf69995bbf09ba435e"
+
+SRC_URI = "git://github.com/ninja-build/ninja.git;branch=release"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
+
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+do_compile_class-native() {
+	./configure.py --bootstrap
+}
+
+do_compile() {
+	./configure.py
+	ninja
+}
+
+do_install() {
+	install -D -m 0755  ${S}/ninja ${D}${bindir}/ninja
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
new file mode 100644
index 0000000..6b7ca7d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
@@ -0,0 +1,51 @@
+From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 09:42:56 -0800
+Subject: [PATCH 1/2] Only use --sort=name on versions of tar which support it.
+ This fixes compatibility with bsdtar and old versions of GNU tar (e.g.
+ RHEL6).
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Upstream-Status: Backport
+
+---
+ opkg-build | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+Index: opkg-utils-0.3.6/opkg-build
+===================================================================
+--- opkg-utils-0.3.6.orig/opkg-build
++++ opkg-utils-0.3.6/opkg-build
+@@ -232,6 +232,11 @@ if [ $compressor = "gzip" ] ; then
+ 	compressorargs=$zipargs
+ fi
+ 
++tsortargs=
++if tar --help 2>&1 | grep -- "--sort=" > /dev/null; then
++	tsortargs="--sort=name"
++fi
++
+ shift $(($OPTIND - 1))
+ 
+ # continue on to process additional arguments
+@@ -280,8 +285,8 @@ mkdir $tmp_dir
+ build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
+ 
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+ 
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -296,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+   ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext )
+ else
+-  ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++  ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+ 
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
new file mode 100644
index 0000000..e338914
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
@@ -0,0 +1,44 @@
+From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 10:17:01 -0800
+Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg
+ extracts files assuming local time rather than UTC. Also increase resolution
+ of build date down to the second, rather than clamping to midnight of the
+ current date.
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Upstream-Status: Backport
+
+---
+ opkg-build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: opkg-utils-0.3.6/opkg-build
+===================================================================
+--- opkg-utils-0.3.6.orig/opkg-build
++++ opkg-utils-0.3.6/opkg-build
+@@ -282,11 +282,11 @@ fi
+ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+ 
+-build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
++build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
+ 
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+ 
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -301,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+   ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext )
+ else
+-  ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++  ( cd $tmp_dir && tar -c $tsortargs --mtime="$build_date" $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+ 
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
index 3824eb3..d8931b2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
@@ -18,26 +18,27 @@
 
 
 Index: git/opkg-build
+
 ===================================================================
 --- git.orig/opkg-build
 +++ git/opkg-build
-@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
- mkdir $tmp_dir
+@@ -285,8 +285,21 @@ mkdir $tmp_dir
+ build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
  
  echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . )
--( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . )
+-( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
 +
 +
 +# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
 +rc=0
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . ) || rc=$?
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc 
 +fi
 +
 +rc=0
-+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc
 +fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
new file mode 100644
index 0000000..13a49f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
@@ -0,0 +1,18 @@
+Pass --threads=0 to xz so that it will use as many threads as there are cores to compress the packages.  This makes qemu's do_package_ipk run in 34s instead of 275s on my machine.
+
+Upstream-Status: Inappropriate (ugly but works, discussing with upstream now)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/opkg-build b/opkg-build
+index 0050c2b..93a7956 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -230,6 +230,8 @@ if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
+ fi
+ if [ $compressor = "gzip" ] ; then
+ 	compressorargs=$zipargs
++elif [ $compressor = "xz" ] ; then
++	compressorargs="--threads 0"
+ fi
+ 
+ tsortargs=
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
deleted file mode 100644
index 646cc8f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
+++ /dev/null
@@ -1,62 +0,0 @@
-SUMMARY = "Additional utilities for the opkg package manager"
-SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system"
-SECTION = "base"
-HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35"
-PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
-
-SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
-           file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
-"
-SRC_URI_append_class-native = " file://tar_ignore_error.patch"
-
-SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff"
-SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-# For native builds we use the host Python
-PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-subprocess python3-pickle python3-compression python3-textutils python3-stringold"
-PYTHONRDEPS_class-native = ""
-
-PACKAGECONFIG = "python update-alternatives"
-PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
-PACKAGECONFIG[update-alternatives] = ",,,"
-
-do_install() {
-	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
-	if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
-		rm -f "${D}${bindir}/update-alternatives"
-	fi
-
-    if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
-        grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm
-    fi
-}
-
-do_install_append_class-target() {
-	if [ -e "${D}${bindir}/update-alternatives" ]; then
-		sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g'
-	fi
-}
-
-# These are empty and will pull python3-dev into images where it wouldn't
-# have been otherwise, so don't generate them.
-PACKAGES_remove = "${PN}-dev ${PN}-staticdev"
-
-PACKAGES =+ "update-alternatives-opkg"
-FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
-RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth"
-RREPLACES_update-alternatives-opkg = "update-alternatives-cworth"
-RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
-
-pkg_postrm_update-alternatives-opkg() {
-	rm -rf $D${nonarch_libdir}/opkg/alternatives
-	rmdir $D${nonarch_libdir}/opkg || true
-}
-
-BBCLASSEXTEND = "native nativesdk"
-
-CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
new file mode 100644
index 0000000..0487c5f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
@@ -0,0 +1,67 @@
+SUMMARY = "Additional utilities for the opkg package manager"
+SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system"
+SECTION = "base"
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35"
+PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
+
+SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
+           file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
+           file://0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch \
+           file://0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch \
+           file://threaded-xz.patch \
+"
+SRC_URI_append_class-native = " file://tar_ignore_error.patch"
+UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
+
+
+SRC_URI[md5sum] = "391c1c80aca26961375dd22e1d2d0cbf"
+SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+# For native builds we use the host Python
+PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold"
+PYTHONRDEPS_class-native = ""
+
+PACKAGECONFIG = "python update-alternatives"
+PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
+PACKAGECONFIG[update-alternatives] = ",,,"
+
+do_install() {
+	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+	if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
+		rm -f "${D}${bindir}/update-alternatives"
+	fi
+
+    if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
+        grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm
+    fi
+}
+
+do_install_append_class-target() {
+	if [ -e "${D}${bindir}/update-alternatives" ]; then
+		sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g'
+	fi
+}
+
+# These are empty and will pull python3-dev into images where it wouldn't
+# have been otherwise, so don't generate them.
+PACKAGES_remove = "${PN}-dev ${PN}-staticdev"
+
+PACKAGES =+ "update-alternatives-opkg"
+FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
+RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth"
+RREPLACES_update-alternatives-opkg = "update-alternatives-cworth"
+RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
+
+pkg_postrm_update-alternatives-opkg() {
+	rm -rf $D${nonarch_libdir}/opkg/alternatives
+	rmdir $D${nonarch_libdir}/opkg || true
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
deleted file mode 100644
index 3e511b6..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-SUMMARY = "Open Package Manager"
-SUMMARY_libopkg = "Open Package Manager library"
-SECTION = "base"
-HOMEPAGE = "http://code.google.com/p/opkg/"
-BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
-
-DEPENDS = "libarchive"
-
-PE = "1"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
-           file://opkg-configure.service \
-           file://opkg.conf \
-           file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
-"
-
-SRC_URI[md5sum] = "d202d09ea0932943071b842626cab13c"
-SRC_URI[sha256sum] = "734bc21dea11262113fa86b928d09812618b3966f352350cf916a6ae0d343f32"
-
-inherit autotools pkgconfig systemd
-
-SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
-
-target_localstatedir := "${localstatedir}"
-OPKGLIBDIR = "${target_localstatedir}/lib"
-
-PACKAGECONFIG ??= "libsolv"
-
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
-PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
-PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
-
-EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
-
-do_install_append () {
-	install -d ${D}${sysconfdir}/opkg
-	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
-	echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
-
-	# We need to create the lock directory
-	install -d ${D}${OPKGLIBDIR}/opkg
-
-	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
-		install -d ${D}${systemd_unitdir}/system
-		install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
-		sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-			-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-			-e 's,@BINDIR@,${bindir},g' \
-			-e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
-			${D}${systemd_unitdir}/system/opkg-configure.service
-	fi
-}
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
-RCONFLICTS_${PN} = "opkg-collateral"
-RPROVIDES_${PN} = "opkg-collateral"
-
-PACKAGES =+ "libopkg"
-
-FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
-FILES_${PN} += "${systemd_unitdir}/system/"
-
-BBCLASSEXTEND = "native nativesdk"
-
-CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb
new file mode 100644
index 0000000..70f20af
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Open Package Manager"
+SUMMARY_libopkg = "Open Package Manager library"
+SECTION = "base"
+HOMEPAGE = "http://code.google.com/p/opkg/"
+BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
+
+DEPENDS = "libarchive"
+
+PE = "1"
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+           file://opkg-configure.service \
+           file://opkg.conf \
+           file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+"
+
+SRC_URI[md5sum] = "79e04307f6f54db431c251772d7d987c"
+SRC_URI[sha256sum] = "f607f0e61be8cf8a3bbd0d2dccd9ec9e9b6c21dd4307b671c600d6eeaf84d30b"
+
+inherit autotools pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
+
+target_localstatedir := "${localstatedir}"
+OPKGLIBDIR = "${target_localstatedir}/lib"
+
+PACKAGECONFIG ??= "libsolv"
+
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
+PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
+PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
+PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
+
+EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
+
+do_install_append () {
+	install -d ${D}${sysconfdir}/opkg
+	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
+	echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
+
+	# We need to create the lock directory
+	install -d ${D}${OPKGLIBDIR}/opkg
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
+		sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+			-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+			-e 's,@BINDIR@,${bindir},g' \
+			-e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
+			${D}${systemd_unitdir}/system/opkg-configure.service
+	fi
+}
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
+RCONFLICTS_${PN} = "opkg-collateral"
+RPROVIDES_${PN} = "opkg-collateral"
+
+PACKAGES =+ "libopkg"
+
+FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
+FILES_${PN} += "${systemd_unitdir}/system/"
+
+BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
deleted file mode 100644
index 303f991..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Optimised Inner Loop Runtime Compiler"
-HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
-LICENSE = "BSD-2-Clause & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "5837dc20dacb5b668935bbded10cbb61"
-SRC_URI[sha256sum] = "51e53e58fc8158e5986a1f1a49a6d970c5b16493841cf7b9de2c2bde7ce36b93"
-
-inherit autotools pkgconfig gtk-doc
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGES =+ "orc-examples"
-PACKAGES_DYNAMIC += "^liborc-.*"
-FILES_orc-examples = "${libdir}/orc/*"
-FILES_${PN} = "${bindir}/*"
-
-python populate_packages_prepend () {
-    libdir = d.expand('${libdir}')
-    do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
-}
-
-do_compile_prepend_class-native () {
-    sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb
new file mode 100644
index 0000000..415de64
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Optimised Inner Loop Runtime Compiler"
+HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
+LICENSE = "BSD-2-Clause & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "6b582ec4b3275c5efd51e3ae6406d445"
+SRC_URI[sha256sum] = "bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce"
+
+inherit autotools pkgconfig gtk-doc
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "orc-examples"
+PACKAGES_DYNAMIC += "^liborc-.*"
+FILES_orc-examples = "${libdir}/orc/*"
+FILES_${PN} = "${bindir}/*"
+
+python populate_packages_prepend () {
+    libdir = d.expand('${libdir}')
+    do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
+}
+
+do_compile_prepend_class-native () {
+    sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
new file mode 100644
index 0000000..b0bd6fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
@@ -0,0 +1,35 @@
+From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Mon, 12 Feb 2018 16:48:24 +0100
+Subject: [PATCH] Fix segfault with mangled rename patch
+
+http://savannah.gnu.org/bugs/?53132
+* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
+for renames and copies (fix the existing check).
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f290f48a621867084884bfff87f8093c15195e6a]
+CVE: CVE-2018-6951
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ src/pch.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index ff9ed2c..bc6278c 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
+     if ((pch_rename () || pch_copy ())
+ 	&& ! inname
+ 	&& ! ((i == OLD || i == NEW) &&
+-	      p_name[! reverse] &&
++	      p_name[reverse] && p_name[! reverse] &&
++	      name_is_valid (p_name[reverse]) &&
+ 	      name_is_valid (p_name[! reverse])))
+       {
+ 	say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
new file mode 100644
index 0000000..2a09d0c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
@@ -0,0 +1,38 @@
+From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 11:34:51 +0200
+Subject: [PATCH] Allow input files to be missing for ed-style patches
+
+* src/pch.c (do_ed_script): Allow input files to be missing so that new
+files will be created as with non-ed-style patches.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=b5a91a01e5d0897facdd0f49d64b76b0f02b43e1]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..0c5cc26 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname,
+ 
+     if (! dry_run && ! skip_rest_of_patch) {
+ 	int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+-	assert (! inerrno);
+-	*outname_needs_removal = true;
+-	copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++	if (inerrno != ENOENT)
++	  {
++	    *outname_needs_removal = true;
++	    copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++	  }
+ 	sprintf (buf, "%s %s%s", editor_program,
+ 		 verbosity == VERBOSE ? "" : "- ",
+ 		 outname);
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
new file mode 100644
index 0000000..d74c2f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
@@ -0,0 +1,215 @@
+From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 12:14:49 +0200
+Subject: [PATCH] Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)
+
+* src/pch.c (do_ed_script): Write ed script to a temporary file instead
+of piping it to ed: this will cause ed to abort on invalid commands
+instead of rejecting them and carrying on.
+* tests/ed-style: New test case.
+* tests/Makefile.am (TESTS): Add test case.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c         | 91 ++++++++++++++++++++++++++++++++++++++++---------------
+ tests/Makefile.am |  1 +
+ tests/ed-style    | 41 +++++++++++++++++++++++++
+ 3 files changed, 108 insertions(+), 25 deletions(-)
+ create mode 100644 tests/ed-style
+
+diff --git a/src/pch.c b/src/pch.c
+index 0c5cc26..4fd5a05 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -33,6 +33,7 @@
+ # include <io.h>
+ #endif
+ #include <safe.h>
++#include <sys/wait.h>
+ 
+ #define INITHUNKMAX 125			/* initial dynamic allocation size */
+ 
+@@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname,
+     static char const editor_program[] = EDITOR_PROGRAM;
+ 
+     file_offset beginning_of_this_line;
+-    FILE *pipefp = 0;
+     size_t chars_read;
++    FILE *tmpfp = 0;
++    char const *tmpname;
++    int tmpfd;
++    pid_t pid;
++
++    if (! dry_run && ! skip_rest_of_patch)
++      {
++	/* Write ed script to a temporary file.  This causes ed to abort on
++	   invalid commands such as when line numbers or ranges exceed the
++	   number of available lines.  When ed reads from a pipe, it rejects
++	   invalid commands and treats the next line as a new command, which
++	   can lead to arbitrary command execution.  */
++
++	tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
++	if (tmpfd == -1)
++	  pfatal ("Can't create temporary file %s", quotearg (tmpname));
++	tmpfp = fdopen (tmpfd, "w+b");
++	if (! tmpfp)
++	  pfatal ("Can't open stream for file %s", quotearg (tmpname));
++      }
+ 
+-    if (! dry_run && ! skip_rest_of_patch) {
+-	int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+-	if (inerrno != ENOENT)
+-	  {
+-	    *outname_needs_removal = true;
+-	    copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+-	  }
+-	sprintf (buf, "%s %s%s", editor_program,
+-		 verbosity == VERBOSE ? "" : "- ",
+-		 outname);
+-	fflush (stdout);
+-	pipefp = popen(buf, binary_transput ? "wb" : "w");
+-	if (!pipefp)
+-	  pfatal ("Can't open pipe to %s", quotearg (buf));
+-    }
+     for (;;) {
+ 	char ed_command_letter;
+ 	beginning_of_this_line = file_tell (pfp);
+@@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname,
+ 	}
+ 	ed_command_letter = get_ed_command_letter (buf);
+ 	if (ed_command_letter) {
+-	    if (pipefp)
+-		if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++	    if (tmpfp)
++		if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ 		    write_fatal ();
+ 	    if (ed_command_letter != 'd' && ed_command_letter != 's') {
+ 	        p_pass_comments_through = true;
+ 		while ((chars_read = get_line ()) != 0) {
+-		    if (pipefp)
+-			if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++		    if (tmpfp)
++			if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ 			    write_fatal ();
+ 		    if (chars_read == 2  &&  strEQ (buf, ".\n"))
+ 			break;
+@@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname,
+ 	    break;
+ 	}
+     }
+-    if (!pipefp)
++    if (!tmpfp)
+       return;
+-    if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
+-	|| fflush (pipefp) != 0)
++    if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
++	|| fflush (tmpfp) != 0)
+       write_fatal ();
+-    if (pclose (pipefp) != 0)
+-      fatal ("%s FAILED", editor_program);
++
++    if (lseek (tmpfd, 0, SEEK_SET) == -1)
++      pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
++
++    if (! dry_run && ! skip_rest_of_patch) {
++	int exclusive = *outname_needs_removal ? 0 : O_EXCL;
++	*outname_needs_removal = true;
++	if (inerrno != ENOENT)
++	  {
++	    *outname_needs_removal = true;
++	    copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++	  }
++	sprintf (buf, "%s %s%s", editor_program,
++		 verbosity == VERBOSE ? "" : "- ",
++		 outname);
++	fflush (stdout);
++
++	pid = fork();
++	if (pid == -1)
++	  pfatal ("Can't fork");
++	else if (pid == 0)
++	  {
++	    dup2 (tmpfd, 0);
++	    execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++	    _exit (2);
++	  }
++	else
++	  {
++	    int wstatus;
++	    if (waitpid (pid, &wstatus, 0) == -1
++	        || ! WIFEXITED (wstatus)
++		|| WEXITSTATUS (wstatus) != 0)
++	      fatal ("%s FAILED", editor_program);
++	  }
++    }
++
++    fclose (tmpfp);
++    safe_unlink (tmpname);
+ 
+     if (ofp)
+       {
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..16f8693 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -32,6 +32,7 @@ TESTS = \
+ 	crlf-handling \
+ 	dash-o-append \
+ 	deep-directories \
++	ed-style \
+ 	empty-files \
+ 	false-match \
+ 	fifo \
+diff --git a/tests/ed-style b/tests/ed-style
+new file mode 100644
+index 0000000..d8c0689
+--- /dev/null
++++ b/tests/ed-style
+@@ -0,0 +1,41 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++
++cat > ed1.diff <<EOF
++0a
++foo
++.
++EOF
++
++check 'patch -e foo -i ed1.diff' <<EOF
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
++
++cat > ed2.diff <<EOF
++1337a
++r !echo bar
++,p
++EOF
++
++check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
++?
++Status: 2
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb
deleted file mode 100644
index 151f021..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require patch.inc
-LICENSE = "GPLv3"
-
-SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
-
-SRC_URI[md5sum] = "ed4d5674ef4543b4eb463db168886dc7"
-SRC_URI[sha256sum] = "7436f5a19f93c3ca83153ce9c5cbe4847e97c5d956e57a220121e741f6e7968f"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-acpaths = "-I ${S}/m4 "
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb
new file mode 100644
index 0000000..823486d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb
@@ -0,0 +1,19 @@
+require patch.inc
+LICENSE = "GPLv3"
+
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+            file://0002-Fix-segfault-with-mangled-rename-patch.patch \
+            file://0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch \
+            file://0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch \
+"
+
+SRC_URI[md5sum] = "4c68cee989d83c87b00a3860bcd05600"
+SRC_URI[sha256sum] = "8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+acpaths = "-I ${S}/m4 "
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
deleted file mode 100644
index 6ae0e7e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Error - Error/exception handling in an OO-ish way"
-DESCRIPTION = "The Error package provides two interfaces. Firstly \
-Error provides a procedural interface to exception handling. \
-Secondly Error is a base class for errors/exceptions that can \
-either be thrown, for subsequent catch, or can simply be recorded."
-
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8f3499d09ee74a050c0319391ff9d100"
-
-DEPENDS += "perl"
-
-SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "7e3676a7fb14f65f568f12d4b40a2a72"
-SRC_URI[sha256sum] = "074db7c783a67b0667eca64a4f6a0c3de94998afc92c01d6453163eb04b9150d"
-
-S = "${WORKDIR}/Error-${PV}"
-
-inherit cpan
-
-do_compile() {
-	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
-	cpan_do_compile
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb
new file mode 100644
index 0000000..f6dc30d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Error - Error/exception handling in an OO-ish way"
+DESCRIPTION = "The Error package provides two interfaces. Firstly \
+Error provides a procedural interface to exception handling. \
+Secondly Error is a base class for errors/exceptions that can \
+either be thrown, for subsequent catch, or can simply be recorded."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8f3499d09ee74a050c0319391ff9d100"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "1a2ee7f0dc44f9ee76661a16bbbc0c48"
+SRC_URI[sha256sum] = "6c9f474ad3d4fe0cabff6b6be532cb1dd348245986d4a6b600ad921d5cfdefaf"
+
+S = "${WORKDIR}/Error-${PV}"
+
+inherit cpan ptest-perl
+
+do_compile() {
+	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+	cpan_do_compile
+}
+
+do_install_prepend() {
+	# test requires "-T" (taint) command line option
+	rm -rf ${B}/t/pod-coverage.t
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
new file mode 100644
index 0000000..e5ab7a3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Skip tests when modules not available"
+DESCRIPTION = "Skip test scripts if modules are not available. \
+The requested modules will be loaded, and optionally have their versions \
+checked. If the module is missing, the test script will be skipped. Modules \
+that are found but fail to compile will exit with an error rather than skip."
+
+HOMEPAGE = "https://metacpan.org/release/Test-Needs"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+CPAN_NAME = "Test-Needs"
+CPAN_AUTHOR = "HAARG"
+
+LIC_FILES_CHKSUM = "file://README;md5=3f3ccd21a0a48aa313db212cc3b1bc09;beginline=81;endline=82"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://www.cpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "356634a56c99282e8059f290f5d534c8"
+SRC_URI[sha256sum] = "5a4f33983586edacdbe00a3b429a9834190140190dab28d0f873c394eb7df399"
+
+S = "${WORKDIR}/${CPAN_NAME}-${PV}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test-more"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
deleted file mode 100644
index a399c10..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Perl module to manipulate and access URI strings"
-DESCRIPTION = "This package contains the URI.pm module with friends. \
-The module implements the URI class. URI objects can be used to access \
-and manipulate the various components that make up these strings."
-
-HOMEPAGE = "http://search.cpan.org/dist/URI/"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
-
-DEPENDS += "perl"
-
-SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "cd56d81ed429efaa97e7f3ff08851b48"
-SRC_URI[sha256sum] = "35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32"
-
-S = "${WORKDIR}/URI-${PV}"
-
-EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-
-inherit cpan
-
-do_compile() {
-	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
-	cpan_do_compile
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb
new file mode 100644
index 0000000..49238f3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Perl module to manipulate and access URI strings"
+DESCRIPTION = "This package contains the URI.pm module with friends. \
+The module implements the URI class. URI objects can be used to access \
+and manipulate the various components that make up these strings."
+
+HOMEPAGE = "http://search.cpan.org/dist/URI/"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "37d44a08e599aa945b32a9434ffe00a5"
+SRC_URI[sha256sum] = "cca7ab4a6f63f3ccaacae0f2e1337e8edf84137e73f18548ec7d659f23efe413"
+
+S = "${WORKDIR}/URI-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan ptest-perl
+
+do_compile() {
+	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+	cpan_do_compile
+}
+
+do_install_prepend() {
+	# these tests require "-T" (taint) command line option
+	rm -rf ${B}/t/cwd.t
+	rm -rf ${B}/t/file.t
+}
+
+RDEPENDS_${PN}-ptest += "libtest-needs-perl"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index cc3a660..c5e0ae6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -14,7 +14,7 @@
 
 EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
 
-inherit cpan
+inherit cpan ptest-perl
 
 # fix up sub MakeMaker project as arguments don't get propagated though
 # see https://rt.cpan.org/Public/Bug/Display.html?id=28632
@@ -34,4 +34,13 @@
 	cpan_do_compile
 }
 
+do_install_ptest() {
+	sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
+	sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
+	sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
+	sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
+	cp -r ${B}/samples ${D}${PTEST_PATH}
+	chown -R root:root ${D}${PTEST_PATH}/samples
+}
+
 BBCLASSEXTEND="native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
index 0478427..0f60998 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
@@ -19,7 +19,7 @@
 
 EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
 
-inherit cpan
+inherit cpan ptest-perl
 
 do_compile() {
 	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
index 0cf2eeb..f9d00d2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
@@ -19,6 +19,6 @@
 
 EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
 
-inherit cpan
+inherit cpan ptest-perl
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
index 6c56a7d..71f4589 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
@@ -1,8 +1,7 @@
 require perl.inc
 
 # We need gnugrep (for -I)
-DEPENDS = "virtual/db-native grep-native"
-DEPENDS += "gdbm-native zlib-native"
+DEPENDS = "db-native grep-native gdbm-native zlib-native"
 
 EXTRA_OEMAKE = "-e MAKEFLAGS="
 
@@ -16,6 +15,7 @@
            file://dynaloaderhack.patch \
            file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
            file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \
+           file://perl-5.26.1-guard_old_libcrypt_fix.patch \
           "
 
 SRC_URI[md5sum] = "af6a84c7c3e2b8b269c105a5db2f6d53"
@@ -135,3 +135,5 @@
 
 # Fix the path in sstate
 SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
+PACKAGES_DYNAMIC_class-native += "^perl-module-.*native$"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
index 1f549af..6a7a2d7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
@@ -2,31 +2,43 @@
 
 SRC_URI += "file://run-ptest \
            "
-
 do_install_ptest () {
 	mkdir -p ${D}${PTEST_PATH}
 	sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
 	sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
 	sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
-	tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+	tar -c --exclude='*.o' --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+	    --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \
+	    --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4  --exclude=buildcustomize.pl \
+	    --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \
+	    --exclude=veryclean.sh --exclude=realclean.sh  --exclude=getioctlsizes \
+	    --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=makefile.old \
 		--exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
 
-	sed -i -e "s,${D},,g" \
+	ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
+
+	# Remove build host references from various scattered files...
+	find "${D}${PTEST_PATH}" \
+	     \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \
+	     -o -name 'h2xs' -o -name 'h2ph' \
+	     -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man'  -o -name 'pod2text' \) \
+	    -type f -exec sed -i \
+	       -e "s,${D},,g" \
 	       -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
 	       -e "s,-isystem${STAGING_INCDIR} ,,g" \
+	       -e 's|${DEBUG_PREFIX_MAP}||g' \
+	       -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
 	       -e "s,${STAGING_LIBDIR},${libdir},g" \
 	       -e "s,${STAGING_BINDIR},${bindir},g" \
 	       -e "s,${STAGING_INCDIR},${includedir},g" \
-	       -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
 	       -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
 	       -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
-	    ${D}${PTEST_PATH}/lib/Config.pm \
-	    ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2man \
-	    ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2text
+	       -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+	       -e 's:${RECIPE_SYSROOT}::g' \
+	        {} +
 
-	ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
-	# Remove plan9 related stuff
-	rm -rf ${D}${PTEST_PATH}/plan9 ${D}${PTEST_PATH}/README.plan9 ${D}${PTEST_PATH}/pod/perlplan9.pod
+	 # Remove a useless timestamp...
+	 sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst
 }
 
 python populate_packages_prepend() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
new file mode 100644
index 0000000..0b59fcd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
@@ -0,0 +1,32 @@
+From 73d7247ecab863ef26b5687a37ccc75d6144ad0f Mon Sep 17 00:00:00 2001
+From: Karl Williamson <khw@cpan.org>
+Date: Tue, 17 Oct 2017 13:49:14 +0800
+Subject: [PATCH] fix CVE-2017-12837
+
+Signed-off-by: Karl Williamson <khw@cpan.org>
+Signed-off-by: Steve Hay <steve.m.hay@googlemail.com>
+
+CVE: CVE-2017-12837
+Upstream-Status: Backport
+https://perl5.git.perl.org/perl.git/commitdiff/96c83ed78aeea1a0496dd2b2d935869a822dc8a5
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ regcomp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/regcomp.c b/regcomp.c
+index 5498d14..31ec383 100644
+--- a/regcomp.c
++++ b/regcomp.c
+@@ -13021,6 +13021,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
+                             goto loopdone;
+                         }
+                         p = RExC_parse;
++                        RExC_parse = parse_start;
+                         if (ender > 0xff) {
+                             REQUIRE_UTF8(flagp);
+                         }
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
new file mode 100644
index 0000000..5c1805f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
@@ -0,0 +1,44 @@
+From 40b3cdad3649334585cee8f4630ec9a025e62be6 Mon Sep 17 00:00:00 2001
+From: Karl Williamson <khw@cpan.org>
+Date: Fri, 25 Aug 2017 11:33:58 -0600
+Subject: [PATCH] PATCH: [perl #131598]
+
+The cause of this is that the vFAIL macro uses RExC_parse, and that
+variable has just been changed in preparation for code after the vFAIL.
+The solution is to not change RExC_parse until after the vFAIL.
+
+This is a case where the macro hides stuff that can bite you.
+
+(cherry picked from commit 2be4edede4ae226e2eebd4eff28cedd2041f300f)
+
+Upstream-Status: Backport
+CVE: CVE-2017-12833
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ regcomp.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+Index: perl-5.24.1/regcomp.c
+===================================================================
+--- perl-5.24.1.orig/regcomp.c
++++ perl-5.24.1/regcomp.c
+@@ -11918,14 +11918,16 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pREx
+ 	}
+         sv_catpv(substitute_parse, ")");
+ 
+-        RExC_parse = RExC_start = RExC_adjusted_start = SvPV(substitute_parse,
+-                                                             len);
++        len = SvCUR(substitute_parse);
+ 
+ 	/* Don't allow empty number */
+ 	if (len < (STRLEN) 8) {
+             RExC_parse = endbrace;
+ 	    vFAIL("Invalid hexadecimal number in \\N{U+...}");
+ 	}
++
++        RExC_parse = RExC_start = RExC_adjusted_start
++                                              = SvPV_nolen(substitute_parse);
+ 	RExC_end = RExC_parse + len;
+ 
+         /* The values are Unicode, and therefore not subject to recoding, but
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
index fd8237f..c1db335 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
@@ -12,10 +12,10 @@
  Makefile.SH | 147 ++++++++++++++++++++++++++++--------------------------------
  1 file changed, 68 insertions(+), 79 deletions(-)
 
-diff --git a/Makefile.SH b/Makefile.SH
-index 916b332..b143d46 100755
---- a/Makefile.SH
-+++ b/Makefile.SH
+Index: perl-5.24.1/Makefile.SH
+===================================================================
+--- perl-5.24.1.orig/Makefile.SH
++++ perl-5.24.1/Makefile.SH
 @@ -48,10 +48,10 @@ case "$useshrplib" in
  true)
  	# Prefix all runs of 'miniperl' and 'perl' with
@@ -74,6 +74,10 @@
 -all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
 -	@echo " ";
 -	@echo "	Everything is up to date. Type '$(MAKE) test' to run test suite."
+-
+-$(MANIFEST_SRT):	MANIFEST $(PERL_EXE)
+-	@$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
+-	    $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
 +#all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
 +#	@echo " ";
 +#	@echo "	Everything is up to date. Type '$(MAKE) test' to run test suite."
@@ -83,10 +87,7 @@
 +more: $(generated_pods) $(private) $(public)
 +
 +more2: $(dynamic_ext)
- 
--$(MANIFEST_SRT):	MANIFEST $(PERL_EXE)
--	@$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
--	    $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
++
 +more3: $(nonxs_ext)
 +
 +more4: extras.make $(MANIFEST_SRT)
@@ -151,7 +152,7 @@
  	./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
  
  !NO!SUBS!
-@@ -878,7 +878,7 @@ $(LIBPERL): $& $(perllib_objs) $(DYNALOADER) $(LIBPERLEXPORT)
+@@ -878,7 +878,7 @@ $(LIBPERL): $& $(perllib_objs) $(DYNALOA
  	true)
  		$spitshell >>$Makefile <<'!NO!SUBS!'
  	rm -f $@
@@ -160,7 +161,7 @@
  !NO!SUBS!
  		case "$osname" in
  		aix)
-@@ -936,15 +936,19 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -936,15 +936,19 @@ lib/buildcustomize.pl: $& $(miniperl_obj
  		$spitshell >>$Makefile <<'!NO!SUBS!'
  lib/buildcustomize.pl: $& $(miniperl_objs)
  	$(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(miniperl_objs) $(libs)
@@ -183,7 +184,7 @@
  	$(MINIPERL) -f write_buildcustomize.pl    
  !NO!SUBS!
  		;;
-@@ -966,7 +970,9 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -966,7 +970,9 @@ lib/buildcustomize.pl: $& $(miniperl_obj
  	-@rm -f miniperl.xok
  	$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
  	    $(miniperl_objs) $(libs)
@@ -194,7 +195,7 @@
  	$(MINIPERL) -f write_buildcustomize.pl
  !NO!SUBS!
  		;;
-@@ -977,7 +983,9 @@ lib/buildcustomize.pl: \$& \$(miniperl_objs) write_buildcustomize.pl
+@@ -977,7 +983,9 @@ lib/buildcustomize.pl: \$& \$(miniperl_o
  	-@rm -f miniperl.xok
  	-@rm \$(MINIPERL_EXE)
  	\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
@@ -205,7 +206,7 @@
  	\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
  !GROK!THIS!
  		else
-@@ -986,7 +994,9 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -986,7 +994,9 @@ lib/buildcustomize.pl: $& $(miniperl_obj
  	-@rm -f miniperl.xok
  	$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
  	    $(miniperl_objs) $(libs)
@@ -225,7 +226,7 @@
  	-@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
  	(cd ext/Devel-PPPort && `pwd`/run.sh ../../$(MINIPERL_EXE) -I../../lib \$\$f); \
  	done
-@@ -1046,7 +1056,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM)
+@@ -1046,7 +1056,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM
  *)
  $spitshell >>$Makefile <<'!NO!SUBS!'
  .PHONY: makeppport
@@ -254,7 +255,7 @@
  	$(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
  #	Commented out so always runs, mktables looks at far more files than we
  #	can in this makefile to decide if needs to run or not
-@@ -1074,12 +1084,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
+@@ -1074,12 +1084,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) li
  # $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
  # But also this ensures that all extensions are built before we try to scan
  # them, which picks up Devel::PPPort's documentation.
@@ -270,9 +271,9 @@
  	$(MINIPERL) autodoc.pl
  
  pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
-@@ -1089,7 +1099,7 @@ pod/perl5240delta.pod: pod/perldelta.pod
- 	$(RMS) pod/perl5240delta.pod
- 	$(LNS) perldelta.pod pod/perl5240delta.pod
+@@ -1089,7 +1099,7 @@ pod/perl5241delta.pod: pod/perldelta.pod
+ 	$(RMS) pod/perl5241delta.pod
+ 	$(LNS) perldelta.pod pod/perl5241delta.pod
  
 -extra.pods: $(MINIPERL_EXE)
 +extra.pods:
@@ -345,7 +346,7 @@
  	$(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
  
  n_dummy $(nonxs_ext):	$(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE
-@@ -1479,14 +1468,14 @@ test_prep_pre: preplibrary utilities $(nonxs_ext)
+@@ -1479,14 +1468,14 @@ test_prep_pre: preplibrary utilities $(n
  
  case "$targethost" in
  '') $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -362,7 +363,7 @@
  	\$(dynamic_ext) \$(TEST_PERL_DLL) runtests \
  	\$(generated_pods)
  	$to libperl.*
-@@ -1539,7 +1528,7 @@ test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE
+@@ -1539,7 +1528,7 @@ test_prep test-prep: test_prep_pre \$(MI
  esac
  
  $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -380,6 +381,3 @@
  	- cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) <$(devtty)
  
  minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
index 4657673..ac0484c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
@@ -361,7 +361,7 @@
 d_ldexpl='define'
 d_lgamma='define'
 d_lgamma_r='define'
-d_libm_lib_version='define'
+d_libm_lib_version='undef'
 d_libname_unique='undef'
 d_link='define'
 d_llrint='define'
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
index a00ad61..33e2222 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
@@ -1,15 +1,15 @@
 Upstream-Status:Inappropriate [embedded specific]
 
-Index: perl-5.14.2/Makefile.SH
+Index: perl-5.24.1/Makefile.SH
 ===================================================================
---- perl-5.14.2.orig/Makefile.SH
-+++ perl-5.14.2/Makefile.SH
-@@ -622,7 +622,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
- 	$(RUN) ./generate_uudmap$(HOST_EXE_EXT) uudmap.h bitcount.h
+--- perl-5.24.1.orig/Makefile.SH
++++ perl-5.24.1/Makefile.SH
+@@ -710,7 +710,7 @@ bitcount.h: generate_uudmap\$(HOST_EXE_E
  
+ $spitshell >>$Makefile <<'!NO!SUBS!'
  generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
 -	$(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
 +	$(BUILD_CC) -o generate_uudmap$(EXE_EXT) generate_uudmap.c
  
- miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
- 	$(CCCMD) $(PLDLFLAGS) $*.c
+ !NO!SUBS!
+ ;;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
index 7650128..49efcbe 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
@@ -10,15 +10,15 @@
 It is a fix to MakeMaker within perl, so all such perl recipes will get 
 fixed with this perl fix.
 
-Index: perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+Index: perl-5.24.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
 ===================================================================
---- perl-5.14.2.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-+++ perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-@@ -55,6 +55,7 @@ sub _unix_os2_ext {
-     my($found) = 0;
+--- perl-5.24.1.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
++++ perl-5.24.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+@@ -57,6 +57,7 @@ sub _unix_os2_ext {
+     my ( $found ) = 0;
  
      # Debian-specific: don't use LD_RUN_PATH for standard dirs
 +    push(@libpath, "SYSROOTLIB");
      $ld_run_path_seen{$_}++ for @libpath;
  
-     foreach my $thislib (split ' ', $potential_libs) {
+     foreach my $thislib ( split ' ', $potential_libs ) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
index 4560123..7fd1f50 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
@@ -1,12 +1,12 @@
 Upstream-Status:Inappropriate [embedded specific]
 
-Index: perl-5.12.3/installperl
+Index: perl-5.24.1/installperl
 ===================================================================
---- perl-5.12.3.orig/installperl
-+++ perl-5.12.3/installperl
-@@ -3,8 +3,8 @@
+--- perl-5.24.1.orig/installperl
++++ perl-5.24.1/installperl
+@@ -2,8 +2,8 @@
+ 
  BEGIN {
-     require 5.004;
      chdir '..' if !-d 'lib' and -d '../lib';
 -    @INC = 'lib';
 -    $ENV{PERL5LIB} = 'lib';
@@ -14,4 +14,4 @@
 +#    $ENV{PERL5LIB} = 'lib';
  
      # This needs to be at BEGIN time, before any use of Config
-     require './install_lib.pl';
+     # install_lib itself loads and imports Config into main::
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
index de6f652..b2c5979 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
@@ -10,10 +10,10 @@
  make_ext.pl | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/make_ext.pl b/make_ext.pl
-index b433762..9fc1a36 100644
---- a/make_ext.pl
-+++ b/make_ext.pl
+Index: perl-5.24.1/make_ext.pl
+===================================================================
+--- perl-5.24.1.orig/make_ext.pl
++++ perl-5.24.1/make_ext.pl
 @@ -335,6 +335,10 @@ sub build_extension {
                  print "Deleting non-Cross makefile\n";
                  close $mfh or die "close $makefile: $!";
@@ -24,7 +24,4 @@
 +                }
              }
          }
-     }
--- 
-1.8.1.2
-
+     } else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch
new file mode 100644
index 0000000..ff3d6dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch
@@ -0,0 +1,28 @@
+commit 13e70b397dcb0d1bf4a869b670f041c1d7b730d0
+Author: Bjąø£ąø–rn Esser <besser82@fedoraproject.org>
+Date:   Sat Jan 20 20:22:53 2018 +0100
+
+    pp: Guard fix for really old bug in glibc libcrypt
+
+Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+diff --git a/pp.c b/pp.c
+index d50ad7ddbf..6510c7b15c 100644
+--- a/pp.c
++++ b/pp.c
+@@ -3650,8 +3650,12 @@ PP(pp_crypt)
+ #if defined(__GLIBC__) || defined(__EMX__)
+ 	if (PL_reentrant_buffer->_crypt_struct_buffer) {
+ 	    PL_reentrant_buffer->_crypt_struct_buffer->initialized = 0;
+-	    /* work around glibc-2.2.5 bug */
++#if (defined(__GLIBC__) && __GLIBC__ == 2) && \
++    (defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ >= 2 && __GLIBC_MINOR__ < 4)
++	    /* work around glibc-2.2.5 bug, has been fixed at some
++	     * time in glibc-2.3.X */
+ 	    PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
++#endif
+ 	}
+ #endif
+     }
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
index d912d00..37bf523 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
@@ -25,16 +25,16 @@
 
 Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
 
-Index: perl-5.14.2/config_h.SH
+Index: perl-5.24.1/config_h.SH
 ===================================================================
---- perl-5.14.2.orig/config_h.SH
-+++ perl-5.14.2/config_h.SH
-@@ -996,7 +996,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
+--- perl-5.24.1.orig/config_h.SH
++++ perl-5.24.1/config_h.SH
+@@ -1434,7 +1434,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
   *	in programs that are not prepared to deal with ~ expansion at run-time.
   */
  #$d_archlib ARCHLIB "$archlib"		/**/
 -#$d_archlib ARCHLIB_EXP "$archlibexp"		/**/
 +#$d_archlib ARCHLIB_EXP "$archlib_exp"		/**/
  
- /* ARCHNAME:
-  *	This symbol holds a string representing the architecture name.
+ /* BIN:
+  *	This symbol holds the path of the bin directory where the package will
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
index 035beba..2572067 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
@@ -7,13 +7,13 @@
 
 Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
 
-Index: perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
+Index: perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
 ===================================================================
---- perl-5.14.2.orig/dist/XSLoader/XSLoader_pm.PL
-+++ perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
-@@ -28,6 +28,20 @@ sub load {
- 
-     my ($module, $modlibname) = caller();
+--- perl-5.24.1.orig/dist/XSLoader/XSLoader_pm.PL
++++ perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
+@@ -52,6 +52,20 @@ sub load {
+     my ($caller, $modlibname) = caller();
+     my $module = $caller;
  
 +    # OE: Allow env to form dynamic loader to look in a different place
 +    # This is so it finds the host .so files, not the targets
@@ -30,5 +30,5 @@
 +    }
 +
      if (@_) {
- 	$module = $_[0];
+         $module = $_[0];
      } else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
deleted file mode 100644
index aa83fca..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Index: perl-5.8.8/config_h.SH
-===================================================================
---- perl-5.8.8.orig/config_h.SH	2005-11-01 02:13:05.000000000 +0800
-+++ perl-5.8.8/config_h.SH	2010-11-01 17:06:07.215219738 +0800
-@@ -709,6 +709,12 @@
-  */
- #$i_float I_FLOAT		/**/
- 
-+/* I_GDBM:
-+ *      This symbol, if defined, indicates that <gdbm.h> exists and should
-+ *      be included.
-+ */
-+#$i_gdbm I_GDBM /**/
-+
- /* I_LIMITS:
-  *	This symbol, if defined, indicates to the C program that it should
-  *	include <limits.h> to get definition of symbols like WORD_BIT or
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
index 90e4dcd..1d9a56d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
@@ -32,7 +32,7 @@
  ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm 0e1e4c25eddb999fec6c4dc66593f76db34cfd16
 -ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm bfd2aa00ca4ed251f342e1d1ad704abbaf5a615e
 -ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 5529ae3064365eafd99536621305d52f4ab31b45
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm d593d8fdc5c0ebcb6d3701c70fc6640c50d93455
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm f1ca5ec247eb69ba13a269f34dc205da37b61244
 +ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1
  ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm bc88b275af73b8faac6abd59a9aad3f625925810
  ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod 062e5d14a803fbbec8d61803086a3d7997e8a473
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
index b55d222..91f310d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -1,8 +1,7 @@
 require perl.inc
 
 # We need gnugrep (for -I)
-DEPENDS = "virtual/db grep-native"
-DEPENDS += "gdbm zlib"
+DEPENDS = "db grep-native gdbm zlib virtual/crypt"
 
 # Pick up patches from debian
 # http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
@@ -46,7 +45,6 @@
         file://letgcc-find-errno.patch \
         file://generate-sh.patch \
         file://native-perlinc.patch \
-        file://perl-enable-gdbm.patch \
         file://cross-generate_uudmap.patch \
         file://fix_bad_rpath.patch \
         file://dynaloaderhack.patch \
@@ -65,6 +63,9 @@
         file://perl-errno-generation-gcc5.patch \
         file://perl-fix-conflict-between-skip_all-and-END.patch \
         file://perl-test-customized.patch \
+        file://perl-5.26.1-guard_old_libcrypt_fix.patch \
+        file://CVE-2017-12883.patch \
+        file://CVE-2017-12837.patch \
 "
 
 # Fix test case issues
@@ -189,6 +190,19 @@
         oe_runmake perl LD="${CCLD}"
 }
 
+do_compile_append_class-target() {
+        # Remove build host references from numerous comments...
+        find "${S}/cpan/Encode" -type f \
+            \( -name '*.exh' -o -name '*.c' -o -name '*.h' \)\
+            -exec sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' {} +
+        sed -i -e 's:${RECIPE_SYSROOT}::g' ${S}/perl.h ${S}/pp.h
+        sed -i -e 's:${RECIPE_SYSROOT_NATIVE}/usr/bin/perl-native/perl${PV}.real:/usr/bin/perl${PV}:g'  \
+            ${S}/cpan/Compress-Raw-Bzip2/constants.h \
+            ${S}/cpan/Compress-Raw-Zlib/constants.h \
+            ${S}/cpan/IPC-SysV/const-c.inc \
+            ${S}/dist/Time-HiRes/const-c.inc
+}
+
 do_install() {
 	#export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
 	oe_runmake install DESTDIR=${D}
@@ -232,6 +246,7 @@
                -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
                -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
                -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
+               -e 's:${RECIPE_SYSROOT}::g' \
             ${PKGD}${bindir}/h2xs \
             ${PKGD}${bindir}/h2ph \
             ${PKGD}${bindir}/pod2man \
@@ -267,6 +282,7 @@
 FILES_${PN}-lib = "${libdir}/libperl.so* \
                    ${libdir}/perl5 \
                    ${libdir}/perl/config.sh \
+		   ${libdir}/perl/${PV}/Config_git.pl \
                    ${libdir}/perl/${PV}/Config_heavy.pl \
                    ${libdir}/perl/${PV}/Config_heavy-target.pl"
 FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
@@ -324,7 +340,7 @@
     d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
 }
 
-PACKAGES_DYNAMIC += "^perl-module-.*"
+PACKAGES_DYNAMIC += "^perl-module-.*(?<!\-native)$"
 PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
 
 RPROVIDES_perl-lib = "perl-lib"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
deleted file mode 100644
index 3805ad3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From 4d7b4d7c8e9966c593f472355607204c6c80fecb Mon Sep 17 00:00:00 2001
-From: Dan Kegel <dank@kegel.com>
-Date: Sun, 4 Jun 2017 19:19:55 -0700
-Subject: [PATCH] Minimal tweaks to compile with Visual C 2015
-
-Upstream-Status: Backport
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- getopt_long.c           |  2 ++
- libpkgconf/bsdstubs.c   |  1 +
- libpkgconf/libpkgconf.h |  2 +-
- libpkgconf/path.c       | 10 +++++-----
- libpkgconf/pkg.c        | 28 +++++++++++++++++++---------
- libpkgconf/stdinc.h     |  9 +++++++--
- 6 files changed, 35 insertions(+), 17 deletions(-)
-
-diff --git a/getopt_long.c b/getopt_long.c
-index afeb68d..5ce9bfd 100644
---- a/getopt_long.c
-+++ b/getopt_long.c
-@@ -62,7 +62,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifndef _WIN32
- #include <unistd.h>
-+#endif
- 
- #define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES
- 
-diff --git a/libpkgconf/bsdstubs.c b/libpkgconf/bsdstubs.c
-index 8f70ff3..2c000ac 100644
---- a/libpkgconf/bsdstubs.c
-+++ b/libpkgconf/bsdstubs.c
-@@ -17,6 +17,7 @@
-  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-  */
- 
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <string.h>
- 
-diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h
-index 404bf0c..551d85d 100644
---- a/libpkgconf/libpkgconf.h
-+++ b/libpkgconf/libpkgconf.h
-@@ -310,7 +310,7 @@ void pkgconf_audit_log_dependency(pkgconf_client_t *client, const pkgconf_pkg_t
- /* path.c */
- void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter);
- size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter);
--size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter);
-+size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter);
- bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist);
- void pkgconf_path_free(pkgconf_list_t *dirlist);
- bool pkgconf_path_relocate(char *buf, size_t buflen);
-diff --git a/libpkgconf/path.c b/libpkgconf/path.c
-index dddb3bf..59e003e 100644
---- a/libpkgconf/path.c
-+++ b/libpkgconf/path.c
-@@ -20,7 +20,7 @@
- # include <sys/cygwin.h>
- #endif
- 
--#ifdef HAVE_SYS_STAT_H
-+#if defined(HAVE_SYS_STAT_H) && ! defined(_WIN32)
- # include <sys/stat.h>
- # define PKGCONF_CACHE_INODES
- #endif
-@@ -156,12 +156,12 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
- /*
-  * !doc
-  *
-- * .. c:function:: size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist)
-+ * .. c:function:: size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist)
-  *
-  *    Adds the paths specified in an environment variable to a path list.  If the environment variable is not set,
-  *    an optional default set of paths is added.
-  *
-- *    :param char* environ: The environment variable to look up.
-+ *    :param char* envvarname: The environment variable to look up.
-  *    :param char* fallback: The fallback paths to use if the environment variable is not set.
-  *    :param pkgconf_list_t* dirlist: The path list to add the path nodes to.
-  *    :param bool filter: Whether to perform duplicate filtering.
-@@ -169,11 +169,11 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
-  *    :rtype: size_t
-  */
- size_t
--pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter)
-+pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter)
- {
- 	const char *data;
- 
--	data = getenv(environ);
-+	data = getenv(envvarname);
- 	if (data != NULL)
- 		return pkgconf_path_split(data, dirlist, filter);
- 
-diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c
-index 7aebd61..5dacae3 100644
---- a/libpkgconf/pkg.c
-+++ b/libpkgconf/pkg.c
-@@ -30,6 +30,8 @@
- #	define PKG_CONFIG_REG_KEY "Software\\pkgconfig\\PKG_CONFIG_PATH"
- #	undef PKG_DEFAULT_PATH
- #	define PKG_DEFAULT_PATH "../lib/pkgconfig;../share/pkgconfig"
-+#define strncasecmp _strnicmp
-+#define strcasecmp _stricmp
- #endif
- 
- #define PKG_CONFIG_EXT		".pc"
-@@ -134,21 +136,21 @@ static int pkgconf_pkg_parser_keyword_pair_cmp(const void *key, const void *ptr)
- static void
- pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
--	char **dest = ((void *) pkg + offset);
-+	char **dest = (char **)((char *) pkg + offset);
- 	*dest = pkgconf_tuple_parse(client, &pkg->vars, value);
- }
- 
- static void
- pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
--	pkgconf_list_t *dest = ((void *) pkg + offset);
-+	pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
- 	pkgconf_fragment_parse(client, dest, &pkg->vars, value);
- }
- 
- static void
- pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
--	pkgconf_list_t *dest = ((void *) pkg + offset);
-+	pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
- 	pkgconf_dependency_parse(client, pkg, dest, value);
- }
- 
-@@ -238,7 +240,7 @@ pkgconf_pkg_validate(const pkgconf_client_t *client, const pkgconf_pkg_t *pkg)
- 
- 	for (i = 0; i < PKGCONF_ARRAY_SIZE(pkgconf_pkg_validations); i++)
- 	{
--		char **p = ((void *) pkg + pkgconf_pkg_validations[i].offset);
-+		char **p = (char **)((char *) pkg + pkgconf_pkg_validations[i].offset);
- 
- 		if (*p != NULL)
- 			continue;
-@@ -587,7 +589,7 @@ pkgconf_scan_all(pkgconf_client_t *client, void *data, pkgconf_pkg_iteration_fun
- 
- #ifdef _WIN32
- static pkgconf_pkg_t *
--pkgconf_pkg_find_in_registry_key(const pkgconf_client_t *client, HKEY hkey, const char *name)
-+pkgconf_pkg_find_in_registry_key(pkgconf_client_t *client, HKEY hkey, const char *name)
- {
- 	pkgconf_pkg_t *pkg = NULL;
- 
-@@ -1048,8 +1050,12 @@ typedef struct {
- 
- static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_rules[] = {
- 	[PKGCONF_CMP_ANY] = {
--		.rulecmp = {},
--		.depcmp = {},
-+		.rulecmp = {
-+			[PKGCONF_CMP_ANY]			= pkgconf_pkg_comparator_none,
-+                },
-+		.depcmp = {
-+			[PKGCONF_CMP_ANY]			= pkgconf_pkg_comparator_none,
-+                },
- 	},
- 	[PKGCONF_CMP_LESS_THAN] = {
- 		.rulecmp = {
-@@ -1121,7 +1127,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
- 			[PKGCONF_CMP_EQUAL]			= pkgconf_pkg_comparator_eq,
- 			[PKGCONF_CMP_NOT_EQUAL]			= pkgconf_pkg_comparator_ne
- 		},
--		.depcmp = {},
-+		.depcmp = {
-+			[PKGCONF_CMP_ANY]			= pkgconf_pkg_comparator_none,
-+                },
- 	},
- 	[PKGCONF_CMP_NOT_EQUAL] = {
- 		.rulecmp = {
-@@ -1133,7 +1141,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
- 			[PKGCONF_CMP_EQUAL]			= pkgconf_pkg_comparator_ne,
- 			[PKGCONF_CMP_NOT_EQUAL]			= pkgconf_pkg_comparator_eq
- 		},
--		.depcmp = {},
-+		.depcmp = {
-+			[PKGCONF_CMP_ANY]			= pkgconf_pkg_comparator_none,
-+                },
- 	},
- };
- 
-diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
-index 58cc6c7..ac7e53c 100644
---- a/libpkgconf/stdinc.h
-+++ b/libpkgconf/stdinc.h
-@@ -24,9 +24,7 @@
- #include <stdbool.h>
- #include <stdarg.h>
- #include <string.h>
--#include <dirent.h>
- #include <sys/types.h>
--#include <unistd.h>
- #include <stdint.h>
- 
- #ifdef _WIN32
-@@ -34,8 +32,15 @@
- # include <windows.h>
- # include <malloc.h>
- # define PATH_DEV_NULL	"nul"
-+# ifndef ssize_t
-+#  include <BaseTsd.h>
-+#  define ssize_t SSIZE_T
-+# endif
-+# include "win-dirent.h"
- #else
- # define PATH_DEV_NULL	"/dev/null"
-+# include <dirent.h>
-+# include <unistd.h>
- #endif
- 
- #endif
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
deleted file mode 100644
index 49ebe31..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From ea28c5b34457cf7676181b284e22ea5f79a30d85 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Thu, 13 Jul 2017 14:47:31 +0300
-Subject: [PATCH] stdinc.h: fix build with mingw
-
-Fixes this build error with mingw:
-...
-| compilation terminated.
-| In file included from ../pkgconf-1.3.7/libpkgconf/libpkgconf.h:19:0,
-| from ../pkgconf-1.3.7/libpkgconf/audit.c:16:
-| ../pkgconf-1.3.7/libpkgconf/stdinc.h:36:12: fatal error: BaseTsd.h: No
-such file or directory
-| # include <BaseTsd.h>
-
-Upstream-Status: Submitted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- libpkgconf/stdinc.h | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
-index ac7e53c..d8efcf5 100644
---- a/libpkgconf/stdinc.h
-+++ b/libpkgconf/stdinc.h
-@@ -33,10 +33,18 @@
- # include <malloc.h>
- # define PATH_DEV_NULL	"nul"
- # ifndef ssize_t
-+# ifndef __MINGW32__
- #  include <BaseTsd.h>
-+# else
-+#  include <basetsd.h>
-+# endif
- #  define ssize_t SSIZE_T
- # endif
--# include "win-dirent.h"
-+# ifndef __MINGW32__
-+#  include "win-dirent.h"
-+# else
-+# include <dirent.h>
-+# endif
- #else
- # define PATH_DEV_NULL	"/dev/null"
- # include <dirent.h>
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
deleted file mode 100644
index 5da0dd1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
-DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
-flags for development frameworks. It is similar to pkg-config from \
-freedesktop.org, providing additional functionality while also maintaining \
-compatibility."
-HOMEPAGE = "http://pkgconf.org"
-BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
-SECTION = "devel"
-PROVIDES += "pkgconfig"
-RPROVIDES_${PN} += "pkgconfig"
-DEFAULT_PREFERENCE = "-1"
-
-# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
-# ISC, but has different wording, so needs its own name.
-LICENSE = "pkgconf"
-LIC_FILES_CHKSUM = "file://COPYING;md5=548a9d1db10cc0a84810c313a0e9266f"
-
-SRC_URI = "\
-    https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
-    file://0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch \
-    file://0001-stdinc.h-fix-build-with-mingw.patch \
-    file://pkg-config-wrapper \
-    file://pkg-config-native.in \
-    file://pkg-config-esdk.in \
-"
-SRC_URI[md5sum] = "ac35c34d84eeb6a03d4d61b8555d6197"
-SRC_URI[sha256sum] = "1be7e40900c7467893c65f810211b1e68da3f8d5e70fddb883fc24839cad0339"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
-
-do_install_append () {
-    # Install a wrapper which deals, as much as possible with pkgconf vs
-    # pkg-config compatibility issues.
-    install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
-}
-
-do_install_append_class-native () {
-    # Install a pkg-config-native wrapper that will use the native sysroot instead
-    # of the MACHINE sysroot, for using pkg-config when building native tools.
-    sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
-        < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
-    install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
-    sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
-        -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
-        < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
-    install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
-}
-
-ALTERNATIVE_${PN} = "pkg-config"
-
-# When using the RPM generated automatic package dependencies, some packages
-# will end up requiring 'pkgconfig(pkg-config)'.  Allow this behavior by
-# specifying an appropriate provide.
-RPROVIDES_${PN} += "pkgconfig(pkg-config)"
-
-# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
-FILES_${PN}-dev_remove = "${datadir}/aclocal"
-FILES_${PN} += "${datadir}/aclocal"
-
-BBCLASSEXTEND += "native nativesdk"
-
-pkgconf_sstate_fixup_esdk () {
-   if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
-       pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
-       mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
-       lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
-       sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
-   fi
-}
-
-SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb
new file mode 100644
index 0000000..ea7b666
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb
@@ -0,0 +1,71 @@
+SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
+DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
+flags for development frameworks. It is similar to pkg-config from \
+freedesktop.org, providing additional functionality while also maintaining \
+compatibility."
+HOMEPAGE = "http://pkgconf.org"
+BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
+SECTION = "devel"
+PROVIDES += "pkgconfig"
+RPROVIDES_${PN} += "pkgconfig"
+DEFAULT_PREFERENCE = "-1"
+
+# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
+# ISC, but has different wording, so needs its own name.
+LICENSE = "pkgconf"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0"
+
+SRC_URI = "\
+    https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
+    file://pkg-config-wrapper \
+    file://pkg-config-native.in \
+    file://pkg-config-esdk.in \
+"
+SRC_URI[md5sum] = "678d242b4eef1754bba6a58642af10bb"
+SRC_URI[sha256sum] = "bab39371d4ab972be1d539a8b10b6cc21f8eafc97f617102e667e82bd32eb234"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
+
+do_install_append () {
+    # Install a wrapper which deals, as much as possible with pkgconf vs
+    # pkg-config compatibility issues.
+    install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
+}
+
+do_install_append_class-native () {
+    # Install a pkg-config-native wrapper that will use the native sysroot instead
+    # of the MACHINE sysroot, for using pkg-config when building native tools.
+    sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+        < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
+    install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+    sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+        -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+        < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+    install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
+}
+
+ALTERNATIVE_${PN} = "pkg-config"
+
+# When using the RPM generated automatic package dependencies, some packages
+# will end up requiring 'pkgconfig(pkg-config)'.  Allow this behavior by
+# specifying an appropriate provide.
+RPROVIDES_${PN} += "pkgconfig(pkg-config)"
+
+# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
+FILES_${PN}-dev_remove = "${datadir}/aclocal"
+FILES_${PN} += "${datadir}/aclocal"
+
+BBCLASSEXTEND += "native nativesdk"
+
+pkgconf_sstate_fixup_esdk () {
+   if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
+       pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+       mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+       lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+       sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
+   fi
+}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
deleted file mode 100644
index 938ac8a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Postinstall scriptlets"
-LICENSE = "MIT"
-
-FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
-	install -d ${D}${datadir}/postinst-intercepts
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_icon_cache ${D}${datadir}/postinst-intercepts/
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
-}
-
-inherit nativesdk
-INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
index 570ef36..0f6d16e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
@@ -9,7 +9,7 @@
 runtime and thus programs come up faster."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-SRCREV = "ef20628dd78b92e1a3123afc67b64cf010bdd9e4"
+SRCREV = "05aeafd053e56356ec8c62f4bb8f7b95bae192f3"
 PV = "1.0+git${SRCPV}"
 
 #
@@ -32,8 +32,7 @@
            file://prelink.cron.daily \
            file://prelink.default \
 	   file://macros.prelink"
-UPSTREAM_CHECK_GITTAGREGEX = "upstream has no usable tags"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 TARGET_OS_ORIG := "${TARGET_OS}"
 OVERRIDES_append = ":${TARGET_OS_ORIG}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch
deleted file mode 100644
index 42557b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From 9e407e0be01695e7b927f5820ade87ee9602c248 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 15 Sep 2017 17:00:14 +0300
-Subject: [PATCH] Use epoll API on Linux
-
-Also a couple of other modifications due to epoll having
-a different approach to how the working set of fds is defined
-and used:
-1) open_client() returns an index into the array of clients
-2) close_client() has a protection against being called twice
-with the same client (which would mess up the active_clients
-counter)
-
-Upstream-Status: Submitted [Seebs CC'd by email]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- enums/exit_status.in |   3 +
- pseudo_server.c      | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 190 insertions(+), 2 deletions(-)
-
-diff --git a/enums/exit_status.in b/enums/exit_status.in
-index 6be44d3..88f94cd 100644
---- a/enums/exit_status.in
-+++ b/enums/exit_status.in
-@@ -18,3 +18,6 @@ listen_fd, "server loop had no valid listen fd"
- pseudo_loaded, "server couldn't get out of pseudo environment"
- pseudo_prefix, "couldn't get valid pseudo prefix"
- pseudo_invocation, "invalid server command arguments"
-+epoll_create, "epoll_create() failed"
-+epoll_ctl, "epoll_ctl() failed"
-+
-diff --git a/pseudo_server.c b/pseudo_server.c
-index ff16efd..14d34de 100644
---- a/pseudo_server.c
-+++ b/pseudo_server.c
-@@ -40,6 +40,12 @@
- #include "pseudo_client.h"
- #include "pseudo_db.h"
- 
-+// This has to come after pseudo includes, as that's where PSEUDO_PORT defines are
-+#ifdef PSEUDO_PORT_LINUX
-+#include <sys/epoll.h>
-+#endif
-+
-+
- static int listen_fd = -1;
- 
- typedef struct {
-@@ -59,6 +65,7 @@ static int active_clients = 0, highest_client = 0, max_clients = 0;
- 
- #define LOOP_DELAY 2
- #define DEFAULT_PSEUDO_SERVER_TIMEOUT 30
-+#define EPOLL_MAX_EVENTS 10
- int pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
- static int die_peacefully = 0;
- static int die_forcefully = 0;
-@@ -80,6 +87,9 @@ quit_now(int signal) {
- static int messages = 0, responses = 0;
- static struct timeval message_time = { .tv_sec = 0 };
- 
-+#ifdef PSEUDO_PORT_LINUX
-+static void pseudo_server_loop_epoll(void);
-+#endif
- static void pseudo_server_loop(void);
- 
- /* helper function to make a directory, just like mkdir -p.
-@@ -369,12 +379,16 @@ pseudo_server_start(int daemonize) {
- 			kill(ppid, SIGUSR1);
- 		}
- 	}
-+#ifdef PSEUDO_PORT_LINUX
-+	pseudo_server_loop_epoll();
-+#else
- 	pseudo_server_loop();
-+#endif
- 	return 0;
- }
- 
- /* mess with internal tables as needed */
--static void
-+static unsigned int
- open_client(int fd) {
- 	pseudo_client_t *new_clients;
- 	int i;
-@@ -390,7 +404,7 @@ open_client(int fd) {
- 			++active_clients;
- 			if (i > highest_client)
- 				highest_client = i;
--			return;
-+			return i;
- 		}
- 	}
- 
-@@ -414,9 +428,11 @@ open_client(int fd) {
- 
- 		max_clients += 16;
- 		++active_clients;
-+		return max_clients - 16;
- 	} else {
- 		pseudo_diag("error allocating new client, fd %d\n", fd);
- 		close(fd);
-+		return 0;
- 	}
- }
- 
-@@ -433,6 +449,10 @@ close_client(int client) {
- 			client, highest_client);
- 		return;
- 	}
-+	if (clients[client].fd == -1) {
-+		pseudo_debug(PDBGF_SERVER, "client %d already closed\n", client);
-+		return;
-+	}
- 	close(clients[client].fd);
- 	clients[client].fd = -1;
- 	free(clients[client].tag);
-@@ -566,6 +586,171 @@ serve_client(int i) {
- 	}
- }
- 
-+#ifdef PSEUDO_PORT_LINUX
-+static void pseudo_server_loop_epoll(void)
-+{
-+	struct sockaddr_un client;
-+	socklen_t len;
-+        int i;
-+        int rc;
-+        int fd;
-+	int timeout;
-+	struct epoll_event ev, events[EPOLL_MAX_EVENTS];
-+	int loop_timeout = pseudo_server_timeout;
-+
-+	clients = malloc(16 * sizeof(*clients));
-+
-+	clients[0].fd = listen_fd;
-+	clients[0].pid = getpid();
-+
-+	for (i = 1; i < 16; ++i) {
-+		clients[i].fd = -1;
-+		clients[i].pid = 0;
-+		clients[i].tag = NULL;
-+		clients[i].program = NULL;
-+	}
-+
-+	active_clients = 1;
-+	max_clients = 16;
-+	highest_client = 0;
-+
-+	pseudo_debug(PDBGF_SERVER, "server loop started.\n");
-+	if (listen_fd < 0) {
-+		pseudo_diag("got into loop with no valid listen fd.\n");
-+		exit(PSEUDO_EXIT_LISTEN_FD);
-+	}
-+
-+	timeout = LOOP_DELAY * 1000;
-+
-+	int epollfd = epoll_create1(0);
-+	if (epollfd == -1) {
-+		pseudo_diag("epoll_create1() failed.\n");
-+		exit(PSEUDO_EXIT_EPOLL_CREATE);
-+	}
-+	ev.events = EPOLLIN;
-+	ev.data.u64 = 0;
-+	if (epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[0].fd, &ev) == -1) {
-+		pseudo_diag("epoll_ctl() failed with listening socket.\n");
-+		exit(PSEUDO_EXIT_EPOLL_CTL);
-+	}
-+
-+	pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server started (pid %d)", getpid());
-+
-+        for (;;) {
-+		rc = epoll_wait(epollfd, events, EPOLL_MAX_EVENTS, timeout);
-+		if (rc == 0 || (rc == -1 && errno == EINTR)) {
-+			/* If there's no clients, start timing out.  If there
-+			 * are active clients, never time out.
-+			 */
-+			if (active_clients == 1) {
-+				loop_timeout -= LOOP_DELAY;
-+                                /* maybe flush database to disk */
-+                                pdb_maybe_backup();
-+				if (loop_timeout <= 0) {
-+					pseudo_debug(PDBGF_SERVER, "no more clients, got bored.\n");
-+					die_peacefully = 1;
-+				} else {
-+					/* display this if not exiting */
-+					pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "%d messages handled in %.4f seconds, %d responses\n",
-+						messages,
-+						(double) message_time.tv_sec +
-+						(double) message_time.tv_usec / 1000000.0,
-+                                                responses);
-+				}
-+			}
-+		} else if (rc > 0) {
-+			loop_timeout = pseudo_server_timeout;
-+			for (i = 0; i < rc; ++i) {
-+				if (clients[events[i].data.u64].fd == listen_fd) {
-+					if (!die_forcefully) {
-+						len = sizeof(client);
-+						if ((fd = accept(listen_fd, (struct sockaddr *) &client, &len)) != -1) {
-+						/* Don't allow clients to end up on fd 2, because glibc's
-+						 * malloc debug uses that fd unconditionally.
-+						 */
-+							if (fd == 2) {
-+								int newfd = fcntl(fd, F_DUPFD, 3);
-+								close(fd);
-+								fd = newfd;
-+							}
-+							pseudo_debug(PDBGF_SERVER, "new client fd %d\n", fd);
-+		                                        /* A new client implicitly cancels any
-+		                                         * previous shutdown request, or a
-+		                                         * shutdown for lack of clients.
-+		                                         */
-+		                                        pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
-+		                                        die_peacefully = 0;
-+
-+							ev.events = EPOLLIN;
-+							ev.data.u64 = open_client(fd);
-+							if (ev.data.u64 != 0 && epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[ev.data.u64].fd, &ev) == -1) {
-+								pseudo_diag("epoll_ctl() failed with accepted socket.\n");
-+								exit(PSEUDO_EXIT_EPOLL_CTL);
-+							}
-+						} else if (errno == EMFILE) {
-+							pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n");
-+		                                        /* In theory there is a potential race here where if we close a client, 
-+		                                           it may have sent us a fastop message which we don't act upon.
-+		                                           If we don't close a filehandle we'll loop indefinitely thought. 
-+		                                           Only close one per loop iteration in the interests of caution */
-+				                        for (int j = 1; j <= highest_client; ++j) {
-+				                                if (clients[j].fd != -1) {
-+				                                        close_client(j);
-+									break;
-+								}
-+							}
-+						}
-+					}
-+				} else {
-+					struct timeval tv1, tv2;
-+                                        int rc;
-+					gettimeofday(&tv1, NULL);
-+					rc = serve_client(events[i].data.u64);
-+					gettimeofday(&tv2, NULL);
-+					++messages;
-+                                        if (rc == 0)
-+                                                ++responses;
-+					message_time.tv_sec += (tv2.tv_sec - tv1.tv_sec);
-+					message_time.tv_usec += (tv2.tv_usec - tv1.tv_usec);
-+					if (message_time.tv_usec < 0) {
-+						message_time.tv_usec += 1000000;
-+						--message_time.tv_sec;
-+					} else while (message_time.tv_usec > 1000000) {
-+						message_time.tv_usec -= 1000000;
-+						++message_time.tv_sec;
-+					}
-+				}
-+				if (die_forcefully)
-+					break;
-+			}
-+			pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients);
-+		} else {
-+			pseudo_diag("epoll_wait failed: %s\n", strerror(errno));
-+			break;
-+		}
-+		if (die_peacefully || die_forcefully) {
-+			pseudo_debug(PDBGF_SERVER, "quitting.\n");
-+			pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "server %d exiting: handled %d messages in %.4f seconds\n",
-+				getpid(), messages,
-+				(double) message_time.tv_sec +
-+				(double) message_time.tv_usec / 1000000.0);
-+			pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server %d exiting: handled %d messages in %.4f seconds",
-+				getpid(), messages,
-+				(double) message_time.tv_sec +
-+				(double) message_time.tv_usec / 1000000.0);
-+			/* and at this point, we'll start refusing connections */
-+			close(clients[0].fd);
-+			/* This is a good place to insert a delay for
-+			 * debugging race conditions during startup. */
-+			/* usleep(300000); */
-+			exit(0);
-+		}
-+	}
-+
-+}
-+
-+#endif
-+
- /* get clients, handle messages, shut down.
-  * This doesn't actually do any work, it just calls a ton of things which
-  * do work.
--- 
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
deleted file mode 100644
index 3045a3b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b6b68db896f9963558334aff7fca61adde4ec10f Mon Sep 17 00:00:00 2001
-From: Seebs <seebs@seebs.net>
-Date: Thu, 13 Apr 2017 18:12:01 -0500
-Subject: Prevent bash from segfaulting when unloading pseudo
-
-bash's extremely fancy internal awareness of how the environment looks
-means that, if you directly call the underlying libc "unsetenv" on
-a variable, bash can end up trying to access a null pointer. Fixing
-this generically is actually rather hard; you can't really avoid
-writing to environ on fork() or popen(), even if you change all
-execv*() functions to use the execv*e() variants. So for now, instead
-of unsetting the variable, set it to an empty string.
-
-Thanks to Saur in IRC for spotting this and helping debug it.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-Upstream-Status: Backport
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index a2d30e9..8ba1ffa 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,8 @@
-+2017-04-13:
-+	* (seebs) don't unset LD_PRELOAD or the like, because if you
-+	  do that, bash can segfault because it "knows" how many
-+	  fields are in environ.
-+
- 2017-02-24:
- 	* (seebs) import posix_acl_default fix from Anton Gerasimov
- 	  <anton@advancedtelematic.com>
-diff --git a/pseudo_util.c b/pseudo_util.c
-index 172990b..6a1fac2 100644
---- a/pseudo_util.c
-+++ b/pseudo_util.c
-@@ -844,7 +844,7 @@ void pseudo_dropenv() {
- 		if (ld_preload && strlen(ld_preload)) {
- 			SETENV(PRELINK_LIBRARIES, ld_preload, 1);
- 		} else {
--			UNSETENV(PRELINK_LIBRARIES);
-+			SETENV(PRELINK_LIBRARIES, "", 1);
- 		}
- 	}
- }
--- 
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch
deleted file mode 100644
index 64fc58c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From efe0be279901006f939cd357ccee47b651c786da Mon Sep 17 00:00:00 2001
-From: Seebs <seebs@seebs.net>
-Date: Fri, 24 Feb 2017 12:47:38 -0600
-Subject: Don't try to record 0-length posix_acl_default xattrs
-
-Based on a submission from Anton Gerasimov <anton@advancedtelematic.com>
-
-On some systems, with some kernel configs, "cp -a" apparently tries to
-set an empty ACL list, with a valid header but no contents, which causes
-strange and mysterious behavior later if we actually create such an entry.
-So filter that out, also sanity-check a couple of other things.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-Upstream-Status: Backport
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index ae2a6e9..a2d30e9 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,6 @@
-+2017-02-24:
-+	* (seebs) import posix_acl_default fix from Anton Gerasimov
-+	  <anton@advancedtelematic.com>
- 2017-02-01:
-    * (seebs) handle xattr deletion slightly more carefully.
-    * (seebs) tag this as 1.8.2
-diff --git a/ports/linux/xattr/pseudo_wrappers.c b/ports/linux/xattr/pseudo_wrappers.c
-index 46bc053..d69d53e 100644
---- a/ports/linux/xattr/pseudo_wrappers.c
-+++ b/ports/linux/xattr/pseudo_wrappers.c
-@@ -62,9 +62,9 @@ static int
- posix_permissions(const acl_header *header, int entries, int *extra, int *mode) {
- 	int acl_seen = 0;
- 	if (le32(header->version) != 2) {
--		pseudo_diag("Fatal: ACL support no available for header version %d.\n",
-+		pseudo_diag("Fatal: ACL support not available for header version %d.\n",
- 			le32(header->version));
--		return 1;
-+		return -1;
- 	}
- 	*mode = 0;
- 	*extra = 0;
-@@ -140,12 +140,38 @@ static int shared_setxattr(const char *path, int fd, const char *name, const voi
- 	pseudo_debug(PDBGF_XATTR, "setxattr(%s [fd %d], %s => '%.*s')\n",
- 		path ? path : "<no path>", fd, name, (int) size, (char *) value);
- 
-+	/* Filter out erroneous sizes for POSIX ACL
-+	 *  see posix_acl_xattr_count in include/linux/posix_acl_xattr.h of Linux source code */
-+	/* I don't think there's any posix_acl_* values that aren't in this format */
-+	if (!strncmp(name, "system.posix_acl_", 17)) {
-+		// ACL is corrupt, issue an error
-+		if(size < sizeof(acl_header) || (size - sizeof(acl_header)) % sizeof(acl_entry) != 0) {
-+			pseudo_debug(PDBGF_XATTR, "invalid data size for %s: %d\n",
-+				name, (int) size);
-+			errno = EINVAL;
-+			return -1;
-+		}
-+
-+		// ACL is empty, do nothing
-+		if((size - sizeof(acl_header)) / sizeof(acl_entry) == 0) {
-+			/* on some systems, "cp -a" will attempt to clone the
-+			 * posix_acl_default entry for a directory (which would specify
-+			 * default ACLs for new files in that directory), but if the
-+			 * original was empty, we get a header but no entries. With
-+			 * real xattr, that ends up being silently discarded, apparently,
-+			 * so we discard it too.
-+			 */
-+			pseudo_debug(PDBGF_XATTR, "0-length ACL entry %s.\n", name);
-+			return 0;
-+		}
-+	}
- 	/* this may be a plain chmod */
- 	if (!strcmp(name, "system.posix_acl_access")) {
- 		int extra;
- 		int mode;
- 		int entries = (size - sizeof(acl_header)) / sizeof(acl_entry);
--		if (!posix_permissions(value, entries, &extra, &mode)) {
-+		int res = posix_permissions(value, entries, &extra, &mode);
-+		if (res == 0) {
- 			pseudo_debug(PDBGF_XATTR, "posix_acl_access translated to mode %04o. Remaining attribute(s): %d.\n",
- 				mode, extra);
- 			buf.st_mode = mode;
-@@ -164,8 +190,12 @@ static int shared_setxattr(const char *path, int fd, const char *name, const voi
- 			if (!extra) {
- 				return 0;
- 			}
-+		} else if (res == -1) {
-+			errno = EOPNOTSUPP;
-+			return -1;
- 		}
- 	}
-+
- 	if (!strcmp(name, "user.pseudo_data")) {
- 		pseudo_debug(PDBGF_XATTR | PDBGF_XATTRDB, "user.pseudo_data xattribute does not get to go in database.\n");
- 		return -1;
--- 
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
deleted file mode 100644
index 904c2d0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Ensure FASTOP messages get an ACK reply so that the client can be sure the server
-recieved them. This means if connections are terminated, data isn't lost.
-
-RP 2017/9/22
-
-Upstream-Status: Submitted
-
-Index: pseudo-1.8.2/pseudo_client.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_client.c
-+++ pseudo-1.8.2/pseudo_client.c
-@@ -1331,21 +1331,19 @@ pseudo_client_request(pseudo_msg_t *msg,
- 		 * indicating a successful send.
- 		 */
- 		pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "sent!\n");
--		if (msg->type != PSEUDO_MSG_FASTOP) {
--			response = pseudo_msg_receive(connect_fd);
--			if (!response) {
--				pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n");
-+		response = pseudo_msg_receive(connect_fd);
-+		if (!response) {
-+			pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n");
-+		} else {
-+			if (response->type != PSEUDO_MSG_ACK) {
-+				pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type);
-+				return 0;
-+			} else if (msg->type != PSEUDO_MSG_FASTOP) {
-+				pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type);
-+				return response;
- 			} else {
--				if (response->type != PSEUDO_MSG_ACK) {
--					pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type);
--					return 0;
--				} else {
--					pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type);
--					return response;
--				}
-+				return 0;
- 			}
--		} else {
--			return 0;
- 		}
- 	}
- 	pseudo_diag("pseudo: server connection persistently failed, aborting.\n");
-Index: pseudo-1.8.2/pseudo_server.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_server.c
-+++ pseudo-1.8.2/pseudo_server.c
-@@ -463,6 +463,11 @@ close_client(int client) {
- 			--highest_client;
- }
- 
-+static pseudo_msg_t server_fastop_reply = { 
-+        .type = PSEUDO_MSG_ACK,
-+        .op = OP_NONE,
-+};
-+
- /* Actually process a request.
-  */
- static int
-@@ -515,8 +520,14 @@ serve_client(int i) {
- 		 * pseudo_server_response.
- 		 */
- 		if (in->type != PSEUDO_MSG_SHUTDOWN) {
--                        if (in->type == PSEUDO_MSG_FASTOP)
-+                        if (in->type == PSEUDO_MSG_FASTOP) {
-                                 send_response = 0;
-+                                /* For fastops we reply now to say we got the data */
-+                                if ((rc = pseudo_msg_send(clients[i].fd, &server_fastop_reply, 0, NULL)) != 0) {
-+                                            pseudo_debug(PDBGF_SERVER, "failed to send fastop ack to client %d [%d]: %d (%s)\n",
-+                                                    i, (int) clients[i].pid, rc, strerror(errno));
-+                                }
-+                        }
- 			/* most messages don't need these, but xattr may */
- 			response_path = 0;
- 			response_pathlen = -1;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
index b085a45..bda7e4b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
@@ -1,3 +1,8 @@
+From b0b25fbc041a148d1de09f5a6503cd95973ec77c Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 25 Apr 2017 15:25:54 +0100
+Subject: [PATCH 3/3] pseudo: Handle too many files deadlock
+
 Currently if we max out the maximum number of files, pseudo can deadlock, unable to
 accept new connections yet unable to move forward and unblock the other processes
 waiting either.
@@ -11,19 +16,23 @@
 
 Upstream-Status: Submitted [Peter is aware of the issue]
 
-Index: pseudo-1.8.2/pseudo_server.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_server.c
-+++ pseudo-1.8.2/pseudo_server.c
-@@ -581,6 +581,7 @@ pseudo_server_loop(void) {
- 	int rc;
- 	int fd;
- 	int loop_timeout = pseudo_server_timeout;
+---
+ pseudo_server.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/pseudo_server.c b/pseudo_server.c
+index dac3258..15a3e8f 100644
+--- a/pseudo_server.c
++++ b/pseudo_server.c
+@@ -802,6 +802,7 @@ pseudo_server_loop(void) {
+ 	struct sigaction eat_usr2 = {
+ 		.sa_handler = set_do_list_clients
+ 	};
 +	int hitmaxfiles;
  
  	clients = malloc(16 * sizeof(*clients));
  
-@@ -597,6 +598,7 @@ pseudo_server_loop(void) {
+@@ -820,6 +821,7 @@ pseudo_server_loop(void) {
  	active_clients = 1;
  	max_clients = 16;
  	highest_client = 0;
@@ -31,9 +40,9 @@
  
  	pseudo_debug(PDBGF_SERVER, "server loop started.\n");
  	if (listen_fd < 0) {
-@@ -663,10 +665,15 @@ pseudo_server_loop(void) {
- 						message_time.tv_usec -= 1000000;
- 						++message_time.tv_sec;
+@@ -878,10 +880,15 @@ pseudo_server_loop(void) {
+ 					} else {
+ 						serve_client(i);
  					}
 +				} else if (hitmaxfiles) {
 +					/* Only close one per loop iteration in the interests of caution */
@@ -47,13 +56,16 @@
  			if (!die_forcefully && 
  			    (FD_ISSET(clients[0].fd, &events) ||
  			     FD_ISSET(clients[0].fd, &reads))) {
-@@ -688,6 +698,9 @@ pseudo_server_loop(void) {
-                                          */
-                                         pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
-                                         die_peacefully = 0;
+@@ -903,6 +910,9 @@ pseudo_server_loop(void) {
+ 					 */
+ 					pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
+ 					die_peacefully = 0;
 +				} else if (errno == EMFILE) {
 +					hitmaxfiles = 1;
 +					pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n");
  				}
  			}
  			pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients);
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
index 18ce9f9..cdc2a58 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
@@ -26,7 +26,7 @@
 NO32LIBS ??= "1"
 NO32LIBS_class-nativesdk = "1"
 
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback --enable-epoll --enable-xattr"
 
 # Compile for the local machine arch...
 do_compile () {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb
deleted file mode 100644
index 73ef572..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require pseudo.inc
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
-           file://0001-configure-Prune-PIE-flags.patch \
-           file://fallback-passwd \
-           file://fallback-group \
-           file://moreretries.patch \
-           file://efe0be279901006f939cd357ccee47b651c786da.patch \
-           file://b6b68db896f9963558334aff7fca61adde4ec10f.patch \
-           file://fastopreply.patch \
-           file://toomanyfiles.patch \
-           file://0001-Use-epoll-API-on-Linux.patch \
-           "
-
-SRC_URI[md5sum] = "7d41e72188fbea1f696c399c1a435675"
-SRC_URI[sha256sum] = "ceb456bd47770a37ca20784a91d715c5a7601e07e26ab11b0c77e9203ed3d196"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
index 42c7b2e..9103d49 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,15 +1,14 @@
 require pseudo.inc
 
-SRCREV = "02168305b0a19f981ffe857f36eb256ba8810b77"
-PV = "1.8.2+git${SRCPV}"
-
-DEFAULT_PREFERENCE = "-1"
-
 SRC_URI = "git://git.yoctoproject.org/pseudo \
            file://0001-configure-Prune-PIE-flags.patch \
            file://fallback-passwd \
            file://fallback-group \
-           file://moreretries.patch"
+           file://moreretries.patch \
+           file://toomanyfiles.patch \
+           "
 
+SRCREV = "fddbe854c9db058d5a05830d3bcdd4233d95ee2e"
 S = "${WORKDIR}/git"
+PV = "1.9.0+git${SRCPV}"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch
deleted file mode 100644
index b9e5856..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 4170b98e0d5864ef4db1c5704a6e9428c3be9fb8 Mon Sep 17 00:00:00 2001
-From: Iryna Shcherbina <ishcherb@redhat.com>
-Date: Thu, 24 Aug 2017 18:01:43 +0200
-Subject: [PATCH] BUG: fix infinite loop when creating np.pad on an empty array
-
-Upstream-Status: Backport [https://github.com/numpy/numpy/pull/9599/commits/6f9ea0abbd305d53f9017debab3a3a591fe0e249]
-CVE: CVE-2017-12852
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- numpy/lib/arraypad.py            | 3 +++
- numpy/lib/tests/test_arraypad.py | 4 ++++
- 2 files changed, 7 insertions(+)
-
-diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
-index 2dad99c..294a689 100644
---- a/numpy/lib/arraypad.py
-+++ b/numpy/lib/arraypad.py
-@@ -1406,6 +1406,9 @@ def pad(array, pad_width, mode, **kwargs):
-             newmat = _append_min(newmat, pad_after, chunk_after, axis)
- 
-     elif mode == 'reflect':
-+        if narray.size == 0:
-+            raise ValueError("There aren't any elements to reflect in `array`")
-+
-         for axis, (pad_before, pad_after) in enumerate(pad_width):
-             # Recursive padding along any axis where `pad_amt` is too large
-             # for indexing tricks. We can only safely pad the original axis
-diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
-index 056aa45..0f71d32 100644
---- a/numpy/lib/tests/test_arraypad.py
-+++ b/numpy/lib/tests/test_arraypad.py
-@@ -1014,6 +1014,10 @@ class ValueError1(TestCase):
-         assert_raises(ValueError, pad, arr, ((-2, 3), (3, 2)),
-                       **kwargs)
- 
-+    def test_check_empty_array(self):
-+        assert_raises(ValueError, pad, [], 4, mode='reflect')
-+        assert_raises(ValueError, pad, np.ndarray(0), 4, mode='reflect')
-+
- 
- class ValueError2(TestCase):
-     def test_check_negative_pad_amount(self):
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index ffd6ced..516ccd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -1,23 +1,24 @@
-From cc2ce6d8b6a3e6e2c8874896c10897034a80cd4f Mon Sep 17 00:00:00 2001
+From c8c6649b29a08f82e1d6761a6d62ce5f632313c5 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 10 Dec 2015 13:20:30 +0200
-Subject: [PATCH] Don't search /usr and so on for libraries by default to avoid
- host contamination.
+Subject: [PATCH 1/3] Don't search /usr and so on for libraries by default to
+ avoid host contamination.
 
 Upstream-Status: Inappropriate (As the code stands, this is a hack)
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  numpy/distutils/system_info.py | 50 +++++-------------------------------------
  1 file changed, 6 insertions(+), 44 deletions(-)
 
-Index: numpy-1.13.1/numpy/distutils/system_info.py
-===================================================================
---- numpy-1.13.1.orig/numpy/distutils/system_info.py
-+++ numpy-1.13.1/numpy/distutils/system_info.py
-@@ -211,51 +211,13 @@ if sys.platform == 'win32':
-     default_x11_lib_dirs = []
-     default_x11_include_dirs = []
+diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
+index bea120c..544e056 100644
+--- a/numpy/distutils/system_info.py
++++ b/numpy/distutils/system_info.py
+@@ -262,51 +262,13 @@ if sys.platform == 'win32':
+             add_system_root(os.path.join(conda_dir, 'Library'))
+                         
  else:
 -    default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
 -                                 '/opt/local/lib', '/sw/lib'], platform_bits)
@@ -29,10 +30,7 @@
 -                            '/opt/local/include', '/sw/include',
 -                            '/usr/include/suitesparse']
 -    default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
-+    default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
-+    default_include_dirs = ['/deaddir/include']
-+    default_src_dirs = ['.', '/deaddir/src']
- 
+-
 -    default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
 -                                     '/usr/lib'], platform_bits)
 -    default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
@@ -67,8 +65,15 @@
 -    finally:
 -        if tmp is not None:
 -            tmp.close()
++    default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
++    default_include_dirs = ['/deaddir/include']
++    default_src_dirs = ['.', '/deaddir/src']
++
 +    default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
 +    default_x11_include_dirs = ['/deaddir/include']
  
  if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
      default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
+-- 
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
new file mode 100644
index 0000000..4f5c4f5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
@@ -0,0 +1,28 @@
+From 30fb1bf9244bb0789c02ec7c98a923acc7200206 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Mar 2018 19:55:21 -0700
+Subject: [PATCH] npy_cpu: Add riscv support
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/10761]
+
+ numpy/core/include/numpy/npy_cpu.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
+index 84653ea18..9e88db873 100644
+--- a/numpy/core/include/numpy/npy_cpu.h
++++ b/numpy/core/include/numpy/npy_cpu.h
+@@ -78,6 +78,8 @@
+     #define NPY_CPU_AARCH64
+ #elif defined(__mc68000__)
+     #define NPY_CPU_M68K
++#elif defined(__riscv)
++    #define NPY_CPU_RISCV
+ #elif defined(__arc__) && defined(__LITTLE_ENDIAN__)
+     #define NPY_CPU_ARCEL
+ #elif defined(__arc__) && defined(__BIG_ENDIAN__)
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
deleted file mode 100644
index eb8a71a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c560abff71f98a39a7401f08c2c13dad9ae7f15f Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 25 Feb 2016 01:23:32 -0500
-Subject: [PATCH] remove build path in comments
-
-It has build path in comments, so remove it.
-
-Upstream-Status: Inappropriate [openembedded specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- numpy/distutils/misc_util.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
-index 345e60f..dafb068 100644
---- a/numpy/distutils/misc_util.py
-+++ b/numpy/distutils/misc_util.py
-@@ -2254,7 +2254,7 @@ def generate_config_py(target):
-     from distutils.dir_util import mkpath
-     mkpath(os.path.dirname(target))
-     f = open(target, 'w')
--    f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
-+    f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]).replace(os.path.abspath('../'),'')))
-     f.write('# It contains system_info results at the time of building this package.\n')
-     f.write('__all__ = ["get_info","show"]\n\n')
-     for k, i in system_info.saved_results.items():
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h
new file mode 100644
index 0000000..109deb0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h
@@ -0,0 +1,32 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_OFF_T 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x0000000A
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h
new file mode 100644
index 0000000..c30b868
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc
new file mode 100644
index 0000000..284f213
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc
@@ -0,0 +1,114 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fc53b33304171d132128ebe82ea4a645"
+
+SRCNAME = "numpy"
+
+SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
+           file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
+           file://fix_shebang_f2py.patch \
+           file://0001-npy_cpu-Add-riscv-support.patch \
+           ${CONFIGFILESURI} "
+SRC_URI[md5sum] = "e39878fafb11828983aeec583dda4a06"
+SRC_URI[sha256sum] = "ddbcda194f49e0cf0663fa8131cb9d7a3b876d14dea0047d3c5fdfaf20adbb40"
+
+UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+CONFIGFILESURI ?= ""
+
+CONFIGFILESURI_aarch64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_arm = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_armeb = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_mipsarcho32el = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_x86 = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_x86-64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarcho32eb = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn64eb = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn64el = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn32eb = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn32el = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_riscv64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+
+S = "${WORKDIR}/numpy-${PV}"
+
+# Make the build fail and replace *config.h with proper one
+# This is a ugly, ugly hack - Koen
+do_compile_prepend_class-target() {
+    ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+    true
+    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
+}
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
+
+# install what is needed for numpy.test()
+RDEPENDS_${PN} = "${PYTHON_PN}-unittest \
+                  ${PYTHON_PN}-difflib \
+                  ${PYTHON_PN}-pprint \
+                  ${PYTHON_PN}-pickle \
+                  ${PYTHON_PN}-shell \
+                  ${PYTHON_PN}-nose \
+                  ${PYTHON_PN}-doctest \
+                  ${PYTHON_PN}-datetime \
+                  ${PYTHON_PN}-distutils \
+                  ${PYTHON_PN}-misc \
+                  ${PYTHON_PN}-mmap \
+                  ${PYTHON_PN}-netclient \
+                  ${PYTHON_PN}-numbers \
+                  ${PYTHON_PN}-pydoc \
+                  ${PYTHON_PN}-pkgutil \
+                  ${PYTHON_PN}-email \
+                  ${PYTHON_PN}-compression \
+                  ${PYTHON_PN}-ctypes \
+                  ${PYTHON_PN}-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
deleted file mode 100644
index 13e8f4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
-
-SRCNAME = "numpy"
-
-SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
-           file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
-           file://remove-build-path-in-comments.patch \
-           file://fix_shebang_f2py.patch \
-           file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
-           ${CONFIGFILESURI} "
-
-SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
-SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
-
-UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32el = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32eb = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64eb = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64el = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32eb = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32el = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
-    ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
-    true
-    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python-unittest \
-                  python-difflib \
-                  python-pprint \
-                  python-pickle \
-                  python-shell \
-                  python-nose \
-                  python-doctest \
-                  python-datetime \
-                  python-distutils \
-                  python-misc \
-                  python-mmap \
-                  python-netclient \
-                  python-numbers \
-                  python-pydoc \
-                  python-pkgutil \
-                  python-email \
-                  python-subprocess \
-                  python-compression \
-                  python-ctypes \
-                  python-threading \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb
new file mode 100644
index 0000000..5013789
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-numpy.inc
+
+RDEPENDS_${PN}_class-target_append = " \
+    ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
deleted file mode 100644
index 29874b8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
-
-SRCNAME = "numpy"
-
-SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
-           file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
-           file://remove-build-path-in-comments.patch \
-           file://fix_shebang_f2py.patch \
-           file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
-           ${CONFIGFILESURI} "
-SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
-SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
-
-UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32el = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32eb = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64eb = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64el = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32eb = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32el = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools3
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
-    ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build ${DISTUTILS_BUILD_ARGS} || \
-    true
-    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python3-unittest \
-                  python3-difflib \
-                  python3-pprint \
-                  python3-pickle \
-                  python3-shell \
-                  python3-nose \
-                  python3-doctest \
-                  python3-datetime \
-                  python3-distutils \
-                  python3-misc \
-                  python3-mmap \
-                  python3-netclient \
-                  python3-numbers \
-                  python3-pydoc \
-                  python3-pkgutil \
-                  python3-email \
-                  python3-subprocess \
-                  python3-compression \
-                  python3-ctypes \
-                  python3-threading \
-                  python3-textutils \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb
new file mode 100644
index 0000000..915e6f8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-numpy.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
deleted file mode 100644
index 57d4834..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ /dev/null
@@ -1,287 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
- 
-
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 "
-
-SUMMARY_${PN}-argparse="Python command line argument parser"
-RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python2.7/argparse.* "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python2.7/wave.* ${libdir}/python2.7/chunk.* ${libdir}/python2.7/sndhdr.* ${libdir}/python2.7/lib-dynload/ossaudiodev.so ${libdir}/python2.7/lib-dynload/audioop.so ${libdir}/python2.7/audiodev.* ${libdir}/python2.7/sunaudio.* ${libdir}/python2.7/sunau.* ${libdir}/python2.7/toaiff.* "
-
-SUMMARY_${PN}-bsddb="Python bindings for the Berkeley Database"
-RDEPENDS_${PN}-bsddb="${PN}-core"
-FILES_${PN}-bsddb="${libdir}/python2.7/bsddb ${libdir}/python2.7/lib-dynload/_bsddb.so "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python2.7/codecs.* ${libdir}/python2.7/encodings ${libdir}/python2.7/gettext.* ${libdir}/python2.7/locale.* ${libdir}/python2.7/lib-dynload/_locale.so ${libdir}/python2.7/lib-dynload/_codecs* ${libdir}/python2.7/lib-dynload/_multibytecodec.so ${libdir}/python2.7/lib-dynload/unicodedata.so ${libdir}/python2.7/stringprep.* ${libdir}/python2.7/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python2.7/py_compile.* ${libdir}/python2.7/compileall.* "
-
-SUMMARY_${PN}-compiler="Python compiler support"
-RDEPENDS_${PN}-compiler="${PN}-core"
-FILES_${PN}-compiler="${libdir}/python2.7/compiler "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib"
-FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so "
-
-SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts."
-RDEPENDS_${PN}-contextlib="${PN}-core"
-FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.* "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
-FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/ast.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python2.7/hashlib.* ${libdir}/python2.7/md5.* ${libdir}/python2.7/sha.* ${libdir}/python2.7/lib-dynload/crypt.so ${libdir}/python2.7/lib-dynload/_hashlib.so ${libdir}/python2.7/lib-dynload/_sha256.so ${libdir}/python2.7/lib-dynload/_sha512.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core"
-FILES_${PN}-ctypes="${libdir}/python2.7/ctypes ${libdir}/python2.7/lib-dynload/_ctypes.so ${libdir}/python2.7/lib-dynload/_ctypes_test.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python2.7/curses ${libdir}/python2.7/lib-dynload/_curses.so ${libdir}/python2.7/lib-dynload/_curses_panel.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python2.7/_strptime.* ${libdir}/python2.7/calendar.* ${libdir}/python2.7/lib-dynload/datetime.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python2.7/anydbm.* ${libdir}/python2.7/dumbdbm.* ${libdir}/python2.7/whichdb.* "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint"
-FILES_${PN}-debugger="${libdir}/python2.7/bdb.* ${libdir}/python2.7/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python2.7/config/Makefile "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python2.7/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python2.7/config ${libdir}/python2.7/distutils "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python2.7/config/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python2.7/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python2.7/imaplib.* ${libdir}/python2.7/email "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python2.7/lib-dynload/fcntl.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python2.7/lib-dynload/gdbm.so "
-
-SUMMARY_${PN}-hotshot="Python hotshot performance profiler"
-RDEPENDS_${PN}-hotshot="${PN}-core"
-FILES_${PN}-hotshot="${libdir}/python2.7/hotshot ${libdir}/python2.7/lib-dynload/_hotshot.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python2.7/formatter.* ${libdir}/python2.7/htmlentitydefs.* ${libdir}/python2.7/htmllib.* ${libdir}/python2.7/markupbase.* ${libdir}/python2.7/sgmllib.* ${libdir}/python2.7/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python2.7/idlelib "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python2.7/colorsys.* ${libdir}/python2.7/imghdr.* ${libdir}/python2.7/lib-dynload/imageop.so ${libdir}/python2.7/lib-dynload/rgbimg.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core"
-FILES_${PN}-importlib="${libdir}/python2.7/importlib "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib"
-FILES_${PN}-io="${libdir}/python2.7/lib-dynload/_socket.so ${libdir}/python2.7/lib-dynload/_io.so ${libdir}/python2.7/lib-dynload/_ssl.so ${libdir}/python2.7/lib-dynload/select.so ${libdir}/python2.7/lib-dynload/termios.so ${libdir}/python2.7/lib-dynload/cStringIO.so ${libdir}/python2.7/pipes.* ${libdir}/python2.7/socket.* ${libdir}/python2.7/ssl.* ${libdir}/python2.7/tempfile.* ${libdir}/python2.7/StringIO.* ${libdir}/python2.7/io.* ${libdir}/python2.7/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re ${PN}-codecs"
-FILES_${PN}-json="${libdir}/python2.7/json ${libdir}/python2.7/lib-dynload/_json.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core"
-FILES_${PN}-lang="${libdir}/python2.7/lib-dynload/_bisect.so ${libdir}/python2.7/lib-dynload/_collections.so ${libdir}/python2.7/lib-dynload/_heapq.so ${libdir}/python2.7/lib-dynload/_weakref.so ${libdir}/python2.7/lib-dynload/_functools.so ${libdir}/python2.7/lib-dynload/array.so ${libdir}/python2.7/lib-dynload/itertools.so ${libdir}/python2.7/lib-dynload/operator.so ${libdir}/python2.7/lib-dynload/parser.so ${libdir}/python2.7/atexit.* ${libdir}/python2.7/bisect.* ${libdir}/python2.7/code.* ${libdir}/python2.7/codeop.* ${libdir}/python2.7/collections.* ${libdir}/python2.7/dis.* ${libdir}/python2.7/functools.* ${libdir}/python2.7/heapq.* ${libdir}/python2.7/inspect.* ${libdir}/python2.7/keyword.* ${libdir}/python2.7/opcode.* ${libdir}/python2.7/symbol.* ${libdir}/python2.7/repr.* ${libdir}/python2.7/token.* ${libdir}/python2.7/tokenize.* ${libdir}/python2.7/traceback.* ${libdir}/python2.7/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python2.7/logging "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python2.7/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python2.7/lib-dynload/cmath.so ${libdir}/python2.7/lib-dynload/math.so ${libdir}/python2.7/lib-dynload/_random.so ${libdir}/python2.7/random.* ${libdir}/python2.7/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python2.7/mimetools.* ${libdir}/python2.7/uu.* ${libdir}/python2.7/quopri.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python2.7/lib-dynload/mmap.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python2.7/lib-dynload/_multiprocessing.so ${libdir}/python2.7/multiprocessing "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
-FILES_${PN}-netclient="${libdir}/python2.7/*Cookie*.* ${libdir}/python2.7/base64.* ${libdir}/python2.7/cookielib.* ${libdir}/python2.7/ftplib.* ${libdir}/python2.7/gopherlib.* ${libdir}/python2.7/hmac.* ${libdir}/python2.7/httplib.* ${libdir}/python2.7/mimetypes.* ${libdir}/python2.7/nntplib.* ${libdir}/python2.7/poplib.* ${libdir}/python2.7/smtplib.* ${libdir}/python2.7/telnetlib.* ${libdir}/python2.7/urllib.* ${libdir}/python2.7/urllib2.* ${libdir}/python2.7/urlparse.* ${libdir}/python2.7/uuid.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python2.7/cgi.* ${libdir}/python2.7/*HTTPServer.* ${libdir}/python2.7/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python2.7/decimal.* ${libdir}/python2.7/fractions.* ${libdir}/python2.7/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python2.7/pickle.* ${libdir}/python2.7/shelve.* ${libdir}/python2.7/lib-dynload/cPickle.so ${libdir}/python2.7/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python2.7/pkgutil.* "
-
-SUMMARY_${PN}-plistlib="Generate and parse Mac OS X .plist files"
-RDEPENDS_${PN}-plistlib="${PN}-core ${PN}-datetime ${PN}-io"
-FILES_${PN}-plistlib="${libdir}/python2.7/plistlib.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python2.7/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python2.7/profile.* ${libdir}/python2.7/pstats.* ${libdir}/python2.7/cProfile.* ${libdir}/python2.7/lib-dynload/_lsprof.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python2.7/pydoc.* ${libdir}/python2.7/pydoc_data "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python2.7/re.* ${libdir}/python2.7/sre.* ${libdir}/python2.7/sre_compile.* ${libdir}/python2.7/sre_constants* ${libdir}/python2.7/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python2.7/lib-dynload/readline.so ${libdir}/python2.7/rlcompleter.* "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python2.7/lib-dynload/resource.so "
-
-SUMMARY_${PN}-robotparser="Python robots.txt parser"
-RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient"
-FILES_${PN}-robotparser="${libdir}/python2.7/robotparser.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
-FILES_${PN}-shell="${libdir}/python2.7/cmd.* ${libdir}/python2.7/commands.* ${libdir}/python2.7/dircache.* ${libdir}/python2.7/fnmatch.* ${libdir}/python2.7/glob.* ${libdir}/python2.7/popen2.* ${libdir}/python2.7/shlex.* ${libdir}/python2.7/shutil.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python2.7/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib"
-FILES_${PN}-sqlite3="${libdir}/python2.7/lib-dynload/_sqlite3.so ${libdir}/python2.7/sqlite3/dbapi2.* ${libdir}/python2.7/sqlite3/__init__.* ${libdir}/python2.7/sqlite3/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python2.7/sqlite3/test "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python2.7/lib-dynload/strop.so ${libdir}/python2.7/string.* ${libdir}/python2.7/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
-FILES_${PN}-subprocess="${libdir}/python2.7/subprocess.* "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python2.7/lib-dynload/syslog.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python2.7/pty.* ${libdir}/python2.7/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core ${PN}-modules"
-FILES_${PN}-tests="${libdir}/python2.7/test "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python2.7/lib-dynload/_csv.so ${libdir}/python2.7/csv.* ${libdir}/python2.7/optparse.* ${libdir}/python2.7/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python2.7/_threading_local.* ${libdir}/python2.7/dummy_thread.* ${libdir}/python2.7/dummy_threading.* ${libdir}/python2.7/mutex.* ${libdir}/python2.7/threading.* ${libdir}/python2.7/Queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python2.7/lib-dynload/_tkinter.so ${libdir}/python2.7/lib-tk "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python2.7/unittest/ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python2.7/lib-dynload/nis.so ${libdir}/python2.7/lib-dynload/grp.so ${libdir}/python2.7/lib-dynload/pwd.so ${libdir}/python2.7/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/_elementtree.so ${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
-FILES_${PN}-xmlrpc="${libdir}/python2.7/xmlrpclib.* ${libdir}/python2.7/SimpleXMLRPCServer.* ${libdir}/python2.7/DocXMLRPCServer.* "
-
-SUMMARY_${PN}-zlib="Python zlib compression support"
-RDEPENDS_${PN}-zlib="${PN}-core"
-FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib  "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
deleted file mode 100644
index 0260e87..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ /dev/null
@@ -1,283 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: 'scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
- 
-
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 ${libdir}/python3.5/lib2to3/__pycache__ "
-
-SUMMARY_${PN}-argparse="Python command line argument parser"
-RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python3.5/argparse.* ${libdir}/python3.5/__pycache__/argparse.* "
-
-SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
-RDEPENDS_${PN}-asyncio="${PN}-core"
-FILES_${PN}-asyncio="${libdir}/python3.5/asyncio ${libdir}/python3.5/asyncio/__pycache__ "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/__pycache__/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/__pycache__/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/__pycache__/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/__pycache__/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/__pycache__/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/__pycache__/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/__pycache__/sunau.* ${libdir}/python3.5/toaiff.* ${libdir}/python3.5/__pycache__/toaiff.* "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/__pycache__/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/encodings/__pycache__ ${libdir}/python3.5/gettext.* ${libdir}/python3.5/__pycache__/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/__pycache__/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_codecs*/__pycache__ ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/lib-dynload/__pycache__/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/__pycache__/stringprep.* ${libdir}/python3.5/xdrlib.* ${libdir}/python3.5/__pycache__/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/__pycache__/py_compile.* ${libdir}/python3.5/compileall.* ${libdir}/python3.5/__pycache__/compileall.* "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell"
-FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/__pycache__/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/__pycache__/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/__pycache__/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/__pycache__/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/zlib.*.so ${libdir}/python3.5/bz2.py ${libdir}/python3.5/__pycache__/bz2.py ${libdir}/python3.5/lzma.py ${libdir}/python3.5/__pycache__/lzma.py ${libdir}/python3.5/_compression.py ${libdir}/python3.5/__pycache__/_compression.py "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
-FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/__pycache__/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/__pycache__/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/__pycache__/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/__pycache__/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/__pycache__/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/__pycache__/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/__pycache__/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/__pycache__/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/__pycache__/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/__pycache__/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/__pycache__/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/__pycache__/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/__pycache__/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/__pycache__/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/__pycache__/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/__pycache__/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/__pycache__/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/__pycache__/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/__pycache__/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/__pycache__/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/__pycache__/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/__pycache__/types.* ${libdir}/python3.5/platform.* ${libdir}/python3.5/__pycache__/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/__pycache__/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/__pycache__/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/__pycache__/_sysconfigdata.* ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/__pycache__/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/__pycache__/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/__pycache__/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/__pycache__/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha512.*.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core ${PN}-subprocess"
-FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/ctypes/__pycache__ ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes_test.*.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/curses/__pycache__ ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses_panel.*.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/__pycache__/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/__pycache__/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/__pycache__/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_datetime.*.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/__pycache__/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/__pycache__/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/__pycache__/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/dbm/__pycache__ ${libdir}/python3.5/lib-dynload/_dbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_dbm.*.so "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil"
-FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/__pycache__/bdb.* ${libdir}/python3.5/pdb.* ${libdir}/python3.5/__pycache__/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python3.5/config*/Makefile ${libdir}/python3.5/config*/Makefile/__pycache__ "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python3.5/difflib.* ${libdir}/python3.5/__pycache__/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/config/__pycache__ ${libdir}/python3.5/distutils ${libdir}/python3.5/distutils/__pycache__ "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a ${libdir}/python3.5/config/__pycache__/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python3.5/doctest.* ${libdir}/python3.5/__pycache__/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/__pycache__/imaplib.* ${libdir}/python3.5/email ${libdir}/python3.5/email/__pycache__ "
-
-SUMMARY_${PN}-enum="Python support for enumerations"
-RDEPENDS_${PN}-enum="${PN}-core"
-FILES_${PN}-enum="${libdir}/python3.5/enum.* ${libdir}/python3.5/__pycache__/enum.* "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/fcntl.*.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_gdbm.*.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/__pycache__/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/html ${libdir}/python3.5/html/__pycache__ ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/__pycache__/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/__pycache__/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/__pycache__/sgmllib.* ${libdir}/python3.5/HTMLParser.* ${libdir}/python3.5/__pycache__/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib ${libdir}/python3.5/idlelib/__pycache__ "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/__pycache__/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/__pycache__/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so ${libdir}/python3.5/lib-dynload/__pycache__/rgbimg.*.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/importlib/__pycache__ ${libdir}/python3.5/imp.* ${libdir}/python3.5/__pycache__/imp.* "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/__pycache__/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/__pycache__/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cStringIO.*.so ${libdir}/python3.5/ipaddress.* ${libdir}/python3.5/__pycache__/ipaddress.* ${libdir}/python3.5/pipes.* ${libdir}/python3.5/__pycache__/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/__pycache__/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/__pycache__/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/__pycache__/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/__pycache__/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/__pycache__/io.* ${libdir}/python3.5/_pyio.* ${libdir}/python3.5/__pycache__/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
-FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/json/__pycache__ ${libdir}/python3.5/lib-dynload/_json.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_json.*.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core ${PN}-importlib"
-FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/__pycache__/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/__pycache__/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/lib-dynload/__pycache__/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/__pycache__/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/__pycache__/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/__pycache__/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/__pycache__/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/__pycache__/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/__pycache__/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/__pycache__/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/__pycache__/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/__pycache__/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/__pycache__/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/__pycache__/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/__pycache__/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/__pycache__/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/__pycache__/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/__pycache__/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/__pycache__/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/__pycache__/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/__pycache__/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/__pycache__/traceback.* ${libdir}/python3.5/weakref.* ${libdir}/python3.5/__pycache__/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python3.5/logging ${libdir}/python3.5/logging/__pycache__ "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* ${libdir}/python3.5/__pycache__/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/__pycache__/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/__pycache__/random.* ${libdir}/python3.5/sets.* ${libdir}/python3.5/__pycache__/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/__pycache__/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/__pycache__/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/MimeWriter.* ${libdir}/python3.5/__pycache__/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so ${libdir}/python3.5/lib-dynload/__pycache__/mmap.*.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing ${libdir}/python3.5/multiprocessing/__pycache__ "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime ${PN}-html"
-FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/__pycache__/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/__pycache__/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/__pycache__/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/__pycache__/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/__pycache__/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/__pycache__/hmac.* ${libdir}/python3.5/http* ${libdir}/python3.5/http*/__pycache__ ${libdir}/python3.5/httplib.* ${libdir}/python3.5/__pycache__/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/__pycache__/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/__pycache__/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/__pycache__/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/__pycache__/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/__pycache__/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/urllib/__pycache__ ${libdir}/python3.5/uuid.* ${libdir}/python3.5/__pycache__/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/socketserver.* ${libdir}/python3.5/__pycache__/socketserver.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/__pycache__/*HTTPServer.* ${libdir}/python3.5/SocketServer.* ${libdir}/python3.5/__pycache__/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/__pycache__/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/__pycache__/fractions.* ${libdir}/python3.5/numbers.* ${libdir}/python3.5/__pycache__/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python3.5/_compat_pickle.* ${libdir}/python3.5/__pycache__/_compat_pickle.* ${libdir}/python3.5/pickle.* ${libdir}/python3.5/__pycache__/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/__pycache__/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cPickle.*.so ${libdir}/python3.5/pickletools.* ${libdir}/python3.5/__pycache__/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* ${libdir}/python3.5/__pycache__/pkgutil.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python3.5/pprint.* ${libdir}/python3.5/__pycache__/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/__pycache__/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/__pycache__/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/__pycache__/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_lsprof.*.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/__pycache__/pydoc.* ${libdir}/python3.5/pydoc_data ${libdir}/python3.5/pydoc_data/__pycache__ "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/__pycache__/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/__pycache__/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/__pycache__/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_constants*/__pycache__ ${libdir}/python3.5/sre_parse.* ${libdir}/python3.5/__pycache__/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/lib-dynload/__pycache__/readline.*.so ${libdir}/python3.5/rlcompleter.* ${libdir}/python3.5/__pycache__/rlcompleter.* "
-
-SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
-RDEPENDS_${PN}-reprlib="${PN}-core"
-FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py ${libdir}/python3.5/__pycache__/reprlib.py "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so ${libdir}/python3.5/lib-dynload/__pycache__/resource.*.so "
-
-SUMMARY_${PN}-selectors="Python High-level I/O multiplexing"
-RDEPENDS_${PN}-selectors="${PN}-core"
-FILES_${PN}-selectors="${libdir}/python3.5/selectors.* ${libdir}/python3.5/__pycache__/selectors.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re ${PN}-compression"
-FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/__pycache__/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/__pycache__/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/__pycache__/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/__pycache__/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/__pycache__/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/__pycache__/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/__pycache__/shlex.* ${libdir}/python3.5/shutil.* ${libdir}/python3.5/__pycache__/shutil.* "
-
-SUMMARY_${PN}-signal="Python set handlers for asynchronous events support"
-RDEPENDS_${PN}-signal="${PN}-core ${PN}-enum"
-FILES_${PN}-signal="${libdir}/python3.5/signal.* ${libdir}/python3.5/__pycache__/signal.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* ${libdir}/python3.5/__pycache__/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
-FILES_${PN}-sqlite3="${libdir}/python3.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__pycache__/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/__pycache__/__init__.* ${libdir}/python3.5/sqlite3/dump.* ${libdir}/python3.5/sqlite3/__pycache__/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test ${libdir}/python3.5/sqlite3/test/__pycache__ "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/__pycache__/string.* ${libdir}/python3.5/stringold.* ${libdir}/python3.5/__pycache__/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors"
-FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/__pycache__/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_posixsubprocess.*.so "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so ${libdir}/python3.5/lib-dynload/__pycache__/syslog.*.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/__pycache__/pty.* ${libdir}/python3.5/tty.* ${libdir}/python3.5/__pycache__/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core ${PN}-compression"
-FILES_${PN}-tests="${libdir}/python3.5/test ${libdir}/python3.5/test/__pycache__ "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/__pycache__/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/__pycache__/optparse.* ${libdir}/python3.5/textwrap.* ${libdir}/python3.5/__pycache__/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/__pycache__/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/__pycache__/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/__pycache__/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/__pycache__/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/__pycache__/threading.* ${libdir}/python3.5/queue.* ${libdir}/python3.5/__pycache__/queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/lib-tk/__pycache__ ${libdir}/python3.5/tkinter ${libdir}/python3.5/tkinter/__pycache__ "
-
-SUMMARY_${PN}-typing="Python typing support"
-RDEPENDS_${PN}-typing="${PN}-core"
-FILES_${PN}-typing="${libdir}/python3.5/typing.* ${libdir}/python3.5/__pycache__/typing.* "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python3.5/unittest/ ${libdir}/python3.5/unittest/__pycache__ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/__pycache__/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/__pycache__/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pwd.*.so ${libdir}/python3.5/getpass.* ${libdir}/python3.5/__pycache__/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xml/__pycache__ ${libdir}/python3.5/xmllib.* ${libdir}/python3.5/__pycache__/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pydoc"
-FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/__pycache__/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/__pycache__/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/__pycache__/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc ${libdir}/python3.5/xmlrpc/__pycache__ "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc  "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
index 2c5cb4d..6664ab0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
@@ -4,12 +4,11 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/a/async/async-${PV}.tar.gz"
+inherit pypi
+
 SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
 SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
 
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/"
-
-S = "${WORKDIR}/async-${PV}"
+RDEPENDS_${PN} += "${PYTHON_PN}-threading"
 
 BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
index 777608c..8d37693 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
@@ -8,14 +8,25 @@
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
+PYPI_PACKAGE = "GitPython"
 
-SRC_URI[md5sum] = "df94212b19d270a625b67b4c84ac9a41"
-SRC_URI[sha256sum] = "5c00cbd256e2b1d039381d4f7d71fcb7ee5cc196ca10c101ff7191bd82ab5d9c"
+inherit pypi
 
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
-UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
+SRC_URI[md5sum] = "7a94ee1b923fb772a2a0c6649430a17c"
+SRC_URI[sha256sum] = "ad61bc25deadb535b047684d06f3654c001d9415e1971e51c9c20f5b510076e9"
 
-S = "${WORKDIR}/GitPython-${PV}"
+DEPENDS = "${PYTHON_PN}-gitdb"
 
+RDEPENDS_${PN} += " \
+                   ${PYTHON_PN}-datetime \
+                   ${PYTHON_PN}-gitdb \
+                   ${PYTHON_PN}-io \
+                   ${PYTHON_PN}-logging \
+                   ${PYTHON_PN}-math \
+                   ${PYTHON_PN}-netclient \
+                   ${PYTHON_PN}-stringold \
+                   ${PYTHON_PN}-unittest \
+                   ${PYTHON_PN}-unixadmin \
+                   git \
+"
 BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
index 08193fb..2d5292e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
@@ -4,13 +4,21 @@
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
+inherit pypi
 
-SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
-SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
+PYPI_PACKAGE = "gitdb2"
 
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/"
+SRC_URI[md5sum] = "d5217eb94ebd36fcec62b929d1f72b00"
+SRC_URI[sha256sum] = "b60e29d4533e5e25bb50b7678bbc187c8f6bcff1344b4f293b2ba55c85795f09"
 
-S = "${WORKDIR}/gitdb-${PV}"
+DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
 
+RDEPENDS_${PN} += "${PYTHON_PN}-async \
+                   ${PYTHON_PN}-compression \
+                   ${PYTHON_PN}-crypt \
+                   ${PYTHON_PN}-io \
+                   ${PYTHON_PN}-mmap \
+                   ${PYTHON_PN}-shell \
+                   ${PYTHON_PN}-smmap \
+"
 BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
index 1c83af6..e265bde 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
@@ -4,13 +4,18 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
+PYPI_PACKAGE = "Mako"
+
+inherit pypi
 
 SRC_URI[md5sum] = "5836cc997b1b773ef389bf6629c30e65"
 SRC_URI[sha256sum] = "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae"
 
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
-UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
+RDEPENDS_${PN} = "${PYTHON_PN}-html \
+                  ${PYTHON_PN}-netclient \
+                  ${PYTHON_PN}-threading \
+"
 
-S = "${WORKDIR}/Mako-${PV}"
+RDEPENDS_${PN}_class-native = ""
 
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc
deleted file mode 100644
index b05aae0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
- 
-
-RPROVIDES += "python-modules-native python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc
deleted file mode 100644
index f1f732e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../scripts/contrib/python/generate-manifest-3.5.py --native' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
- 
-
-RPROVIDES += "python3-modules-native python3-2to3-native python3-argparse-native python3-asyncio-native python3-audio-native python3-codecs-native python3-compile-native python3-compression-native python3-core-native python3-crypt-native python3-ctypes-native python3-curses-native python3-datetime-native python3-db-native python3-debugger-native python3-dev-native python3-difflib-native python3-distutils-native python3-distutils-staticdev-native python3-doctest-native python3-email-native python3-enum-native python3-fcntl-native python3-gdbm-native python3-html-native python3-idle-native python3-image-native python3-importlib-native python3-io-native python3-json-native python3-lang-native python3-logging-native python3-mailbox-native python3-math-native python3-mime-native python3-mmap-native python3-multiprocessing-native python3-netclient-native python3-netserver-native python3-numbers-native python3-pickle-native python3-pkgutil-native python3-pprint-native python3-profile-native python3-pydoc-native python3-re-native python3-readline-native python3-reprlib-native python3-resource-native python3-selectors-native python3-shell-native python3-signal-native python3-smtpd-native python3-sqlite3-native python3-sqlite3-tests-native python3-stringold-native python3-subprocess-native python3-syslog-native python3-terminal-native python3-tests-native python3-textutils-native python3-threading-native python3-tkinter-native python3-typing-native python3-unittest-native python3-unixadmin-native python3-xml-native python3-xmlrpc-native"
-
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
index ad46085..af0f173 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
@@ -12,10 +12,10 @@
 
 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
 
-Index: Python-2.7.13/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
 ===================================================================
---- Python-2.7.13.orig/Include/pythonrun.h
-+++ Python-2.7.13/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
 @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
  /* In their own files */
  PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -24,10 +24,10 @@
  PyAPI_FUNC(const char *) Py_GetCopyright(void);
  PyAPI_FUNC(const char *) Py_GetCompiler(void);
  PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.13/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
 ===================================================================
---- Python-2.7.13.orig/Lib/distutils/command/install.py
-+++ Python-2.7.13/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
 @@ -22,6 +22,8 @@ from site import USER_BASE
  from site import USER_SITE
  
@@ -46,10 +46,10 @@
          'headers': '$base/include/python$py_version_short/$dist_name',
          'scripts': '$base/bin',
          'data'   : '$base',
-Index: Python-2.7.13/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
 ===================================================================
---- Python-2.7.13.orig/Lib/pydoc.py
-+++ Python-2.7.13/Lib/pydoc.py
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
 @@ -375,7 +375,7 @@ class Doc:
      docmodule = docclass = docroutine = docother = docproperty = docdata = fail
  
@@ -59,10 +59,10 @@
                                         "python"+sys.version[0:3])):
          """Return the location of module docs or None"""
  
-Index: Python-2.7.13/Lib/site.py
+Index: Python-2.7.14/Lib/site.py
 ===================================================================
---- Python-2.7.13.orig/Lib/site.py
-+++ Python-2.7.13/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
 @@ -288,13 +288,19 @@ def getsitepackages():
          if sys.platform in ('os2emx', 'riscos'):
              sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -86,10 +86,10 @@
      return sitepackages
  
  def addsitepackages(known_paths):
-Index: Python-2.7.13/Lib/test/test_dl.py
+Index: Python-2.7.14/Lib/test/test_dl.py
 ===================================================================
---- Python-2.7.13.orig/Lib/test/test_dl.py
-+++ Python-2.7.13/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
 @@ -4,10 +4,11 @@
  import unittest
  from test.test_support import verbose, import_module
@@ -104,10 +104,10 @@
      ('/usr/bin/cygwin1.dll', 'getpid'),
      ('/usr/lib/libc.dylib', 'getpid'),
      ]
-Index: Python-2.7.13/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
 ===================================================================
---- Python-2.7.13.orig/Lib/trace.py
-+++ Python-2.7.13/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
 @@ -754,10 +754,10 @@ def main(argv=None):
                  # should I also call expanduser? (after all, could use $HOME)
  
@@ -121,11 +121,11 @@
                                             "python" + sys.version[:3]))
                  s = os.path.normpath(s)
                  ignore_dirs.append(s)
-Index: Python-2.7.13/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
 ===================================================================
---- Python-2.7.13.orig/Makefile.pre.in
-+++ Python-2.7.13/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAG
  
  # Machine-dependent subdirectories
  MACHDEP=	@MACHDEP@
@@ -133,7 +133,7 @@
  
  # Multiarch directory (may be empty)
  MULTIARCH=	@MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR=		@libdir@
+@@ -110,7 +111,7 @@ LIBDIR=		@libdir@
  MANDIR=		@mandir@
  INCLUDEDIR=	@includedir@
  CONFINCLUDEDIR=	$(exec_prefix)/include
@@ -142,7 +142,7 @@
  
  # Detailed destination directories
  BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-@@ -668,6 +669,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
  		-DEXEC_PREFIX='"$(exec_prefix)"' \
  		-DVERSION='"$(VERSION)"' \
  		-DVPATH='"$(VPATH)"' \
@@ -150,8 +150,8 @@
  		-o $@ $(srcdir)/Modules/getpath.c
  
  Modules/python.o: $(srcdir)/Modules/python.c
-@@ -708,7 +710,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -692,7 +694,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
  
  Python/getplatform.o: $(srcdir)/Python/getplatform.c
 -		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -159,10 +159,10 @@
  
  Python/importdl.o: $(srcdir)/Python/importdl.c
  		$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.13/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
 ===================================================================
---- Python-2.7.13.orig/Modules/getpath.c
-+++ Python-2.7.13/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
 @@ -100,6 +100,13 @@
  #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
  #endif
@@ -186,10 +186,10 @@
  
  static void
  reduce(char *dir)
-Index: Python-2.7.13/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
 ===================================================================
---- Python-2.7.13.orig/Python/getplatform.c
-+++ Python-2.7.13/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
 @@ -10,3 +10,13 @@ Py_GetPlatform(void)
  {
  	return PLATFORM;
@@ -204,10 +204,10 @@
 +{
 +	return LIB;
 +}
-Index: Python-2.7.13/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
 ===================================================================
---- Python-2.7.13.orig/Python/sysmodule.c
-+++ Python-2.7.13/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
 @@ -1437,6 +1437,8 @@ _PySys_Init(void)
                          PyString_FromString(Py_GetCopyright()));
      SET_SYS_FROM_STRING("platform",
@@ -217,11 +217,11 @@
      SET_SYS_FROM_STRING("executable",
                          PyString_FromString(Py_GetProgramFullPath()));
      SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.13/configure.ac
+Index: Python-2.7.14/configure.ac
 ===================================================================
---- Python-2.7.13.orig/configure.ac
-+++ Python-2.7.13/configure.ac
-@@ -759,6 +759,11 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,11 @@ SunOS*)
      ;;
  esac
  
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb
deleted file mode 100644
index 7edf153..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-require python.inc
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native"
-PR = "${INC_PR}.1"
-
-SRC_URI += "\
-            file://05-enable-ctypes-cross-build.patch \
-            file://10-distutils-fix-swig-parameter.patch \
-            file://11-distutils-never-modify-shebang-line.patch \
-            file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
-            file://debug.patch \
-            file://unixccompiler.patch \
-            file://nohostlibs.patch \
-            file://multilib.patch \
-            file://add-md5module-support.patch \
-            file://builddir.patch \
-            file://parallel-makeinst-create-bindir.patch \
-            file://revert_use_of_sysconfigdata.patch \
-           "
-
-S = "${WORKDIR}/Python-${PV}"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
-
-inherit native
-
-require python-native-${PYTHON_MAJMIN}-manifest.inc
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
-
-EXTRA_OEMAKE = '\
-  LIBC="" \
-  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
-  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-'
-
-do_configure_append() {
-	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
-	oe_runmake 'DESTDIR=${D}' install
-	install -d ${D}${bindir}/${PN}
-	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
-	# Make sure we use /usr/bin/env python
-	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
-		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
-	done
-
-	# Add a symlink to the native Python so that scripts can just invoke
-	# "nativepython" and get the right one without needing absolute paths
-	# (these often end up too long for the #! parser in the kernel as the
-	# buffer is 128 bytes long).
-	ln -s python-native/python ${D}${bindir}/nativepython
-
-	# We don't want modules in ~/.local being used in preference to those
-	# installed in the native sysroot, so disable user site support.
-	sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb
new file mode 100644
index 0000000..7c491fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb
@@ -0,0 +1,85 @@
+require python.inc
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
+PR = "${INC_PR}.1"
+
+SRC_URI += "\
+            file://05-enable-ctypes-cross-build.patch \
+            file://10-distutils-fix-swig-parameter.patch \
+            file://11-distutils-never-modify-shebang-line.patch \
+            file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
+            file://debug.patch \
+            file://unixccompiler.patch \
+            file://nohostlibs.patch \
+            file://multilib.patch \
+            file://add-md5module-support.patch \
+            file://builddir.patch \
+            file://parallel-makeinst-create-bindir.patch \
+            file://revert_use_of_sysconfigdata.patch \
+           "
+
+S = "${WORKDIR}/Python-${PV}"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
+
+inherit native
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
+
+EXTRA_OEMAKE = '\
+  LIBC="" \
+  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+'
+
+do_configure_append() {
+	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phase
+do_compile_prepend() {
+    oe_runmake regen-all
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install
+	install -d ${D}${bindir}/${PN}
+	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+	# Make sure we use /usr/bin/env python
+	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+	done
+
+	# Add a symlink to the native Python so that scripts can just invoke
+	# "nativepython" and get the right one without needing absolute paths
+	# (these often end up too long for the #! parser in the kernel as the
+	# buffer is 128 bytes long).
+	ln -s python-native/python ${D}${bindir}/nativepython
+
+	# We don't want modules in ~/.local being used in preference to those
+	# installed in the native sysroot, so disable user site support.
+	sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
+}
+
+python(){
+
+    # Read JSON manifest
+    import json
+    pythondir = d.getVar('THISDIR',True)
+    with open(pythondir+'/python/python2-manifest.json') as manifest_file:
+        python_manifest=json.load(manifest_file)
+
+    rprovides = d.getVar('RPROVIDES').split()
+
+    # Hardcoded since it cant be python-native-foo, should be python-foo-native
+    pn = 'python'
+
+    for key in python_manifest:
+        pypackage = pn + '-' + key + '-native'
+        if pypackage not in rprovides:
+              rprovides.append(pypackage)
+
+    d.setVar('RPROVIDES', ' '.join(rprovides))
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc
new file mode 100644
index 0000000..ccec68a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Extends Python unittest to make testing easier"
+HOMEPAGE = "http://readthedocs.org/docs/nose/"
+DESCRIPTION = "nose extends the test loading and running features of unittest, \
+making it easier to write, find and run tests."
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
+SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
+
+inherit pypi
+
+RDEPENDS_${PN} = "\
+  ${PYTHON_PN}-unittest \
+  "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
index 9b3509c..6d69d2d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
@@ -1,25 +1,2 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-HOMEPAGE = "http://readthedocs.org/docs/nose/"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
 inherit setuptools
-
-RDEPENDS_${PN} = "\
-  python-unittest \
-  "
-
-BBCLASSEXTEND = "native nativesdk"
+require python-nose.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb
deleted file mode 100644
index 3f43856..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a885dff6d14e4cd876d9008a09a42de"
-SRCNAME = "scons"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "3eac81e5e8206304a9b4683c57665aa4"
-SRC_URI[sha256sum] = "c8de85fc02ed1a687b1f2ac791eaa0c1707b4382a204f17d782b5b111b9fdf07"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/SCons/"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
-  python-fcntl \
-  python-io \
-  python-json \
-  python-subprocess \
-  "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
new file mode 100644
index 0000000..d5084b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=46ddf66004e5be5566367cb525a66fc6"
+
+SRC_URI[md5sum] = "b6a292e251b34b82c203b56cfa3968b3"
+SRC_URI[sha256sum] = "24475e38d39c19683bc88054524df018fe6949d70fbd4c69e298d39a0269f173"
+
+UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "\
+  python-fcntl \
+  python-io \
+  python-json \
+  python-subprocess \
+  python-shell \
+  python-pprint \
+  "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
index ca521a9..74706bf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -5,17 +5,44 @@
 
 LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158"
 
-SRCNAME = "setuptools"
+PYPI_PACKAGE_EXT = "zip"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.zip"
+inherit pypi
 
-SRC_URI[md5sum] = "b9e6c049617bac0f9e908a41ab4a29ac"
-SRC_URI[sha256sum] = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5"
+SRC_URI[md5sum] = "379642a4f17214071fdc1894255d8d11"
+SRC_URI[sha256sum] = "94dc566247f35009ed42c0f4422f2b4f0a032fab1372c8308b864c8f26d93388"
 
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
+DEPENDS += "${PYTHON_PN}"
+DEPENDS_class-native += "${PYTHON_PN}-native"
+DEPENDS_class-nativesdk += "nativesdk-${PYTHON_PN}"
 
-S = "${WORKDIR}/${SRCNAME}-${PV}"
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR} \
+                           --script-dir=${bindir}"
+
+RDEPENDS_${PN}_class-native = "\
+  ${PYTHON_PN}-distutils \
+  ${PYTHON_PN}-compression \
+"
+RDEPENDS_${PN} = "\
+  ${PYTHON_PN}-compile \
+  ${PYTHON_PN}-compression \
+  ${PYTHON_PN}-ctypes \
+  ${PYTHON_PN}-distutils \
+  ${PYTHON_PN}-email \
+  ${PYTHON_PN}-html \
+  ${PYTHON_PN}-netserver \
+  ${PYTHON_PN}-numbers \
+  ${PYTHON_PN}-pkgutil \
+  ${PYTHON_PN}-plistlib \
+  ${PYTHON_PN}-shell \
+  ${PYTHON_PN}-stringold \
+  ${PYTHON_PN}-threading \
+  ${PYTHON_PN}-unittest \
+  ${PYTHON_PN}-xml \
+"
 
 do_install_prepend() {
     install -d ${D}${PYTHON_SITEPACKAGES_DIR}
 }
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
deleted file mode 100644
index 0efacc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require python-setuptools.inc
-
-PROVIDES = "python-distribute"
-
-DEPENDS += "python"
-DEPENDS_class-native += "python-native"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
-  python-stringold \
-  python-email \
-  python-shell \
-  python-distutils \
-  python-compression \
-  python-pkgutil \
-  python-plistlib \
-  python-numbers \
-  python-html \
-  python-netserver \
-  python-ctypes \
-  python-subprocess \
-  python-unittest \
-  python-compile \
-"
-
-RDEPENDS_${PN}_class-native = "\
-  python-distutils \
-  python-compression \
-"
-
-RREPLACES_${PN} = "python-distribute"
-RPROVIDES_${PN} = "python-distribute"
-RCONFLICTS_${PN} = "python-distribute"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb
new file mode 100644
index 0000000..cf94404
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb
@@ -0,0 +1,9 @@
+require python-setuptools.inc
+
+PROVIDES = "python-distribute"
+
+inherit setuptools
+
+RREPLACES_${PN} = "python-distribute"
+RPROVIDES_${PN} = "python-distribute"
+RCONFLICTS_${PN} = "python-distribute"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
index bd12fa9..c774984 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
@@ -2,15 +2,13 @@
 HOMEPAGE = "https://pypi.python.org/pypi/six/"
 SECTION = "devel/python"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6f00d4a50713fa859858dd9abaa35b21"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=35cec5bf04dd0820d0a18533ea7c774a"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/six/six-${PV}.tar.gz"
-SRC_URI[md5sum] = "34eed507548117b2ab523ab14b2f8b55"
-SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
+SRC_URI[md5sum] = "d12789f9baf7e9fb2524c0c64f1773f8"
+SRC_URI[sha256sum] = "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
 
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/six/"
-UPSTREAM_CHECK_REGEX = "/six/(?P<pver>(\d+[\.\-_]*)+)"
+inherit pypi
+
+RDEPENDS_${PN} = "${PYTHON_PN}-io"
 
 BBCLASSEXTEND = "native nativesdk"
-
-S = "${WORKDIR}/six-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
index d67e6b5..55aa516 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
@@ -7,13 +7,12 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/smmap/smmap-${PV}.tar.gz"
+inherit pypi
+
 SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab"
 SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
 
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/"
-UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/smmap-${PV}"
-
+RDEPENDS_${PN} += "${PYTHON_PN}-codecs \
+                   ${PYTHON_PN}-mmap \
+"
 BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
index b40f551..979b601 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
@@ -5,12 +5,12 @@
 # bump this on every change in contrib/python/generate-manifest-2.7.py
 INC_PR = "r1"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"
+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b"
+SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66"
 
 # python recipe is actually python 2.x
 # also, exclude pre-releases for both python 2.x and 3.x
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
index 366ce3e..e795a74 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -9,6 +9,9 @@
 Rebased for python-2.7.9
 Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
 
+Rebased for python-2.7.14
+Signed-off-by: Derek Straka <derek@asterius.io>
+
 Index: Python-2.7.13/Makefile.pre.in
 ===================================================================
 --- Python-2.7.13.orig/Makefile.pre.in
@@ -30,14 +33,14 @@
  
  # Create build directory and generate the sysconfig build-time data there.
  # pybuilddir.txt contains the name of the build dir and is used for
-@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p
- 
- $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
+@@ -663,7 +663,7 @@
+ 	# Regenerate Include/graminit.h and Python/graminit.c
+ 	# from Grammar/Grammar using pgen
  	@$(MKDIR_P) Include
--	$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+	$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
- 	touch $(GRAMMAR_C)
+-	$(PGEN) $(srcdir)/Grammar/Grammar \
++	$(HOSTPGEN) $(srcdir)/Grammar/Grammar \
+ 		$(srcdir)/Include/graminit.h \
+ 		$(srcdir)/Python/graminit.c
  
 @@ -1121,27 +1122,27 @@ libinstall:	build_all $(srcdir)/Lib/$(PL
  			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
deleted file mode 100644
index 38e5377..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-
-From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner@gmail.com>
-Date: Mon, 9 Jan 2017 11:10:41 +0100
-Subject: [PATCH] Don't use getentropy() on Linux
-
-Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but
-read from /dev/urandom to get random bytes, for example in os.urandom().  On
-Linux, getentropy() is implemented which getrandom() is blocking mode, whereas
-os.urandom() should not block.
-
-(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227)
----
- Python/random.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/Python/random.c b/Python/random.c
-index b4bc1f3..f3f5d14 100644
---- a/Python/random.c
-+++ b/Python/random.c
-@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- }
- 
- /* Issue #25003: Don't use getentropy() on Solaris (available since
-- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
--#elif defined(HAVE_GETENTROPY) && !defined(sun)
-+   Solaris 11.3), it is blocking whereas os.urandom() should not block.
-+
-+   Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
-+   implements it with the getrandom() syscall which can fail with ENOSYS,
-+   and this error is not supported in py_getentropy() and getrandom() is called
-+   with flags=0 which blocks until system urandom is initialized, which is not
-+   the desired behaviour to seed the Python hash secret nor for os.urandom():
-+   see the PEP 524 which was only implemented in Python 3.6. */
-+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
- #define PY_GETENTROPY 1
- 
- /* Fill buffer with size pseudo-random bytes generated by getentropy().
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index a97ff6b..3297340 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -13,11 +13,11 @@
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: Python-2.7.11/configure.ac
+Index: Python-2.7.14/configure.ac
 ===================================================================
---- Python-2.7.11.orig/configure.ac
-+++ Python-2.7.11/configure.ac
-@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -36,7 +36,7 @@ if test "$cross_compiling" = yes; then
  	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
  	fi
          AC_MSG_RESULT($interp)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index 3347321..287095f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@
 Also simply disable the tk module since its not in DEPENDS.
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
 
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
 ===================================================================
---- Python-2.7.2.orig/setup.py	2012-04-05 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py	2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1783,10 +1783,12 @@ class PyBuildExt(build_ext):
+         self.extensions.extend(exts)
+ 
          # Call the method for detecting whether _tkinter can be compiled
-         self.detect_tkinter(inc_dirs, lib_dirs)
+-        self.detect_tkinter(inc_dirs, lib_dirs)
++        # self.detect_tkinter(inc_dirs, lib_dirs)
  
 -        if '_tkinter' not in [e.name for e in self.extensions]:
 -            missing.append('_tkinter')
@@ -22,18 +25,5 @@
 +        #if '_tkinter' not in [e.name for e in self.extensions]:
 +        #    missing.append('_tkinter')
  
-         return missing
- 
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
-         self.extensions.extend(exts)
- 
-         # Call the method for detecting whether _tkinter can be compiled
--        self.detect_tkinter(inc_dirs, lib_dirs)
-+        # self.detect_tkinter(inc_dirs, lib_dirs)
- 
-         # tkinter module will not be avalaible as yocto
-         # doesn't have tk integrated (yet)
+ ##         # Uncomment these lines if you want to play with xxmodule.c
+ ##         ext = Extension('xx', ['xxmodule.c'])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
index 337e0e3..8ba5823 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
@@ -5,12 +5,12 @@
 
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
 
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
 ===================================================================
---- Python-2.7.2.orig/setup.py	2012-04-05 22:29:18.049196608 +0300
-+++ Python-2.7.2/setup.py	2012-04-05 22:29:57.505195453 +0300
-@@ -1522,8 +1522,9 @@
-         if platform == 'sunos5':
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1671,8 +1671,9 @@ class PyBuildExt(build_ext):
+         if host_platform == 'sunos5':
              # SunOS specific modules
              exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
 -        else:
@@ -19,5 +19,5 @@
 +        #else:
 +        #    missing.append('sunaudiodev')
  
-         if platform == 'darwin':
+         if host_platform == 'darwin':
              # _scproxy
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py
new file mode 100644
index 0000000..e745045
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py
@@ -0,0 +1,277 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is: 
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, ont this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+import sys
+import subprocess
+import json
+import os
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot='recipe-sysroot-native'
+for p in sys.path:
+  if pivot in p:
+    nativelibfolder=p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = {}
+
+# Check for repeated files, folders and wildcards
+allfiles=[]
+repeated=[]
+wildcards=[]
+
+hasfolders=[]
+allfolders=[]
+
+def isFolder(value):
+  if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+    return True
+  else:
+    return False
+
+# Read existing JSON manifest
+with open('python2-manifest.json') as manifest:
+  old_manifest=json.load(manifest)
+
+
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+print ("Getting dependencies for core package:")
+
+# Special call to check for core package
+output = subprocess.check_output([sys.executable, 'get_module_deps2.py', 'python-core-package'])
+for item in output.split():
+    # We append it so it doesnt hurt what we currently have:
+    if item not in old_manifest['core']['files']:
+        # We use the same data structure since its the one which will be used to check
+        # dependencies for other packages
+        old_manifest['core']['files'].append(item)
+
+for value in old_manifest['core']['files']:
+  # Ignore folders, since we don't import those, difficult to handle multilib
+  if isFolder(value):
+    # Pass it directly
+    if value not in old_manifest['core']['files']:
+      old_manifest['core']['files'].append(value)
+  # Ignore binaries, since we don't import those, assume it was added correctly (manually)
+  if '${bindir}' in value:
+    # Pass it directly
+    if value not in old_manifest['core']['files']:
+      old_manifest['core']['files'].append(value)
+    continue
+  # Ignore empty values
+  if value == '':
+    continue
+  if '${includedir}' in value:
+    if value not in old_manifest['core']['files']:
+      old_manifest['core']['files'].append(value)
+    continue
+  # Get module name , shouldnt be affected by libdir/bindir
+  value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+
+  # Launch separate task for each module for deterministic behavior
+  # Each module will only import what is necessary for it to work in specific
+  print ('Getting dependencies for module: %s' % value)
+  output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+  for item in output.split():
+    # We append it so it doesnt hurt what we currently have:
+    if item not in old_manifest['core']['files']:
+      old_manifest['core']['files'].append(item)
+
+# We check which packages include folders
+for key in old_manifest:
+    for value in old_manifest[key]['files']:
+        # Ignore folders, since we don't import those, difficult to handle multilib
+        if isFolder(value):
+            print ('%s is a folder' % value)
+            if key not in hasfolders:
+                hasfolders.append(key)
+            if value not in allfolders:
+                allfolders.append(value)
+
+for key in old_manifest:
+    # Use an empty dict as data structure to hold data for each package and fill it up
+    new_manifest[key]={}
+    new_manifest[key]['files']=[]
+    new_manifest[key]['rdepends']=[]
+    # All packages should depend on core
+    if key != 'core':
+         new_manifest[key]['rdepends'].append('core')
+    new_manifest[key]['summary']=old_manifest[key]['summary']
+
+    # Handle special cases, we assume that when they were manually added 
+    # to the manifest we knew what we were doing.
+    print ('Handling package %s' % key)
+    special_packages=['misc', 'modules', 'dev']
+    if key in special_packages or 'staticdev' in key:
+        print('Passing %s package directly' % key)
+        new_manifest[key]=old_manifest[key]
+        continue
+
+    for value in old_manifest[key]['files']:
+        # We already handled core on the first pass
+        if key == 'core':
+            new_manifest[key]['files'].append(value)
+            continue
+        # Ignore folders, since we don't import those, difficult to handle multilib
+        if isFolder(value):
+            # Pass folders directly
+            new_manifest[key]['files'].append(value)
+        # Ignore binaries, since we don't import those
+        if '${bindir}' in value:
+            # Pass it directly to the new manifest data structure
+            if value not in new_manifest[key]['files']:
+                new_manifest[key]['files'].append(value)
+            continue
+        # Ignore empty values
+        if value == '':
+            continue
+        if '${includedir}' in value:
+            if value not in new_manifest[key]['files']:
+                new_manifest[key]['files'].append(value)
+            continue
+        # Get module name , shouldnt be affected by libdir/bindir
+        value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+        # Launch separate task for each module for deterministic behavior
+        # Each module will only import what is necessary for it to work in specific
+        print ('Getting dependencies for module: %s' % value)
+        output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+
+        # We can print dependencies for debugging purposes
+        #print (output)
+        # Output will have all dependencies
+        for item in output.split():
+
+            # Warning: This first part is ugly
+            # One of the dependencies that was found, could be inside of one of the folders included by another package
+            # We need to check if this happens so we can add the package containing the folder as an RDEPENDS
+            # e.g. Folder encodings contained in codecs
+            # This would be solved if no packages included any folders
+
+            # This can be done in two ways:
+            # 1 - We assume that if we take out the filename from the path we would get
+            #   the folder string, then we would check if folder string is in the list of folders
+            #   This would not work if a package contains a folder which contains another folder
+            #   e.g. path/folder1/folder2/filename  folder_string= path/folder1/folder2
+            #   folder_string would not match any value contained in the list of folders
+            #
+            # 2 - We do it the other way around, checking if the folder is contained in the path
+            #   e.g. path/folder1/folder2/filename  folder_string= path/folder1/folder2
+            #   is folder_string inside path/folder1/folder2/filename?, 
+            #   Yes, it works, but we waste a couple of milliseconds.
+
+            inFolders=False
+            for folder in allfolders:
+                if folder in item:
+                    inFolders = True # Did we find a folder?
+                    folderFound = False # Second flag to break inner for
+                    # Loop only through packages which contain folders
+                    for keyfolder in hasfolders:
+                        if (folderFound == False):
+                            #print("Checking folder %s on package %s" % (item,keyfolder))
+                            for file_folder in old_manifest[keyfolder]['files']:
+                                if file_folder==folder:
+                                    print ('%s found in %s' % (folder, keyfolder))
+                                    folderFound = True
+                                    if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
+                                        new_manifest[key]['rdepends'].append(keyfolder)
+                        else:
+                            break
+
+            # A folder was found so we're done with this item, we can go on
+            if inFolders:
+                continue
+
+            # We might already have it on the dictionary since it could depend on a (previously checked) module
+            if item not in new_manifest[key]['files']:
+                # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+                if key=='core':
+                  print('Adding %s to %s FILES' % (item, key))
+                  if item.endswith('*'):
+                      wildcards.append(item)
+                  new_manifest[key]['files'].append(item)
+
+                  # Check for repeated files
+                  if item not in allfiles:
+                      allfiles.append(item)
+                  else:
+                      repeated.append(item)
+
+                else:
+
+                    # Check if this dependency is already contained on another package, so we add it
+                    # as an RDEPENDS, or if its not, it means it should be contained on the current
+                    # package, so we should add it to FILES
+                    for newkey in old_manifest:
+                        # Debug
+                        #print("Checking %s " % item + " in %s" % newkey)
+                        if item in old_manifest[newkey]['files']:      
+                                # Since were nesting, we need to check its not the same key
+                                if(newkey!=key):
+                                    if newkey not in new_manifest[key]['rdepends']:
+                                       # Add it to the new manifest data struct
+                                       # Debug
+                                       print('Adding %s to %s RDEPENDS, because it contains %s' % (newkey, key, item))
+                                       new_manifest[key]['rdepends'].append(newkey)
+                                    break
+                    else:
+                      # Debug
+                      print('Adding %s to %s FILES' % (item, key))
+                      # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+                      new_manifest[key]['files'].append(item)
+                      if item.endswith('*'):
+                          wildcards.append(item)
+                      if item not in allfiles:
+                          allfiles.append(item)
+                      else:
+                          repeated.append(item)
+
+print ('The following files are repeated (contained in more than one package), please check which package should get it:')
+print (repeated)
+print('The following files contain wildcards, please check they are necessary')
+print(wildcards)
+print('The following files contain folders, please check they are necessary')
+print(hasfolders)
+
+# Sort it just so it looks nice 
+for key in new_manifest:
+    new_manifest[key]['files'].sort()
+    new_manifest[key]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python2-manifest.json.new','w') as outfile:
+    json.dump(new_manifest,outfile,sort_keys=True, indent=4, separators=(',', ': '))
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
index 669112d..60d782c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
@@ -4,18 +4,19 @@
 Signed-off-by: Tudor Florea <tudor.florea@enea.com>
 Upstream-Status: Pending
 ---
-diff -ruN a/Makefile.pre.in b/Makefile.pre.in
---- a/Makefile.pre.in	2013-06-27 10:44:11.033840532 +0200
-+++ b/Makefile.pre.in	2013-06-27 10:44:39.572635273 +0200
-@@ -709,14 +709,19 @@
- # generated bytecode.  This is sometimes a very shy bug needing a lot of
- # sample data.
+Index: Python-2.7.14/Makefile.pre.in
+===================================================================
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -846,14 +846,19 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
+ 
+ .PHONY: test testall testuniversal buildbottest pythoninfo
  
 -TESTOPTS=	-l $(EXTRATESTOPTS)
 +TESTOPTS=	-l -v $(EXTRATESTOPTS)
  TESTPROG=	$(srcdir)/Lib/test/regrtest.py
 -TESTPYTHON=	$(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
--test:		all platform
+-test:		@DEF_MAKE_RULE@ platform
 -		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
 +TESTPYTHON=	$(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
 +test:		build-test
@@ -26,8 +27,8 @@
  		-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  
-+build-test:	all platform
++build-test:	@DEF_MAKE_RULE@ platform
 +
- testall:	all platform
+ testall:	@DEF_MAKE_RULE@ platform
  		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  		$(TESTPYTHON) $(srcdir)/Lib/compileall.py
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py
new file mode 100644
index 0000000..73e7c6f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py
@@ -0,0 +1,112 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints 
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+    import os
+    # We DONT want the path on our HOST system
+    pivot='recipe-sysroot-native'
+    dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+    if '/usr/bin' in dep_path:
+        dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+    # Handle multilib, is there a better way?
+    if '/usr/lib32' in dep_path:
+        dep_path = dep_path.replace('/usr/lib32','${libdir}')
+    if '/usr/lib64' in dep_path:
+        dep_path = dep_path.replace('/usr/lib64','${libdir}')
+    if '/usr/lib' in dep_path:
+        dep_path = dep_path.replace('/usr/lib','${libdir}')
+    if '/usr/include' in dep_path:
+        dep_path = dep_path.replace('/usr/include','${includedir}')
+    if '__init__.' in dep_path:
+        dep_path =  os.path.split(dep_path)[0]
+
+    # If a *.pyc file was imported, we replace it with *.py (since we deal with PYCs on create_manifest)
+    if '.pyc' in dep_path:
+        dep_path = dep_path.replace('.pyc','.py')
+
+    return dep_path
+
+# Module to import was passed as an argument
+current_module =  str(sys.argv[1]).rstrip()
+if(debug==True):
+	log = open('log_%s' % current_module,'w')
+        log.write('Module %s generated the following dependencies:\n' % current_module)
+try:
+    importlib.import_module('%s' % current_module)
+except ImportError as e:
+    if (debug==True):
+        log.write('Module was not found')
+    pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+    dif = core_deps
+else:
+    dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+    dep_path=''
+    try:
+        if (debug==True):
+            log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+        dep_path = sys.modules['%s' % item].__file__
+    except AttributeError as e:
+        # Deals with thread (builtin module) not having __file__ attribute
+	if debug==True:
+            log.write(item + ' ')
+            log.write(str(e))
+	    log.write('\n')
+            pass
+    except NameError as e:
+        # Deals with NameError: name 'dep_path' is not defined
+        # because module is not found (wasn't compiled?), e.g. bddsm
+        if (debug==True):
+            log.write(item+' ') 
+            log.write(str(e))                                              
+        pass
+
+    # Site-customize is a special case since we (OpenEmbedded) put it there manually
+    if 'sitecustomize' in dep_path:
+        dep_path = '${libdir}/python2.7/sitecustomize.py'
+        # Prints out result, which is what will be used by create_manifest
+        print (dep_path)
+        continue
+
+    dep_path = fix_path(dep_path)
+
+    if (debug==True):
+        log.write(dep_path+'\n')
+
+    # Prints out result, which is what will be used by create_manifest
+    print (dep_path)
+
+if debug==True:
+    log.close()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
index f5568d2..1116dd5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
@@ -1,11 +1,11 @@
 Rebased for python-2.7.9
 Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
 Upstream-Status: Pending
-Index: Python-2.7.13/configure.ac
+Index: Python-2.7.14/configure.ac
 ===================================================================
---- Python-2.7.13.orig/configure.ac
-+++ Python-2.7.13/configure.ac
-@@ -759,6 +759,10 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,10 @@ SunOS*)
      ;;
  esac
  
@@ -16,10 +16,10 @@
  
  AC_SUBST(LIBRARY)
  AC_MSG_CHECKING(LIBRARY)
-Index: Python-2.7.13/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
 ===================================================================
---- Python-2.7.13.orig/Include/pythonrun.h
-+++ Python-2.7.13/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
 @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
  /* In their own files */
  PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -28,10 +28,10 @@
  PyAPI_FUNC(const char *) Py_GetCopyright(void);
  PyAPI_FUNC(const char *) Py_GetCompiler(void);
  PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.13/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
 ===================================================================
---- Python-2.7.13.orig/Lib/distutils/command/install.py
-+++ Python-2.7.13/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
 @@ -22,6 +22,8 @@ from site import USER_BASE
  from site import USER_SITE
  
@@ -41,19 +41,21 @@
  if sys.version < "2.2":
      WINDOWS_SCHEME = {
          'purelib': '$base',
-@@ -42,7 +44,7 @@ else:
+@@ -41,8 +43,8 @@ else:
+ 
  INSTALL_SCHEMES = {
      'unix_prefix': {
-         'purelib': '$base/lib/python$py_version_short/site-packages',
+-        'purelib': '$base/lib/python$py_version_short/site-packages',
 -        'platlib': '$platbase/lib/python$py_version_short/site-packages',
++        'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
 +        'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
          'headers': '$base/include/python$py_version_short/$dist_name',
          'scripts': '$base/bin',
          'data'   : '$base',
-Index: Python-2.7.13/Lib/distutils/sysconfig.py
+Index: Python-2.7.14/Lib/distutils/sysconfig.py
 ===================================================================
---- Python-2.7.13.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.13/Lib/distutils/sysconfig.py
+--- Python-2.7.14.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.14/Lib/distutils/sysconfig.py
 @@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
          prefix = plat_specific and EXEC_PREFIX or PREFIX
  
@@ -68,10 +70,10 @@
          if standard_lib:
              return libpython
          else:
-Index: Python-2.7.13/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
 ===================================================================
---- Python-2.7.13.orig/Lib/pydoc.py
-+++ Python-2.7.13/Lib/pydoc.py
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
 @@ -375,7 +375,7 @@ class Doc:
      docmodule = docclass = docroutine = docother = docproperty = docdata = fail
  
@@ -81,10 +83,10 @@
                                         "python"+sys.version[0:3])):
          """Return the location of module docs or None"""
  
-Index: Python-2.7.13/Lib/site.py
+Index: Python-2.7.14/Lib/site.py
 ===================================================================
---- Python-2.7.13.orig/Lib/site.py
-+++ Python-2.7.13/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
 @@ -288,13 +288,18 @@ def getsitepackages():
          if sys.platform in ('os2emx', 'riscos'):
              sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -107,10 +109,10 @@
      return sitepackages
  
  def addsitepackages(known_paths):
-Index: Python-2.7.13/Lib/sysconfig.py
+Index: Python-2.7.14/Lib/sysconfig.py
 ===================================================================
---- Python-2.7.13.orig/Lib/sysconfig.py
-+++ Python-2.7.13/Lib/sysconfig.py
+--- Python-2.7.14.orig/Lib/sysconfig.py
++++ Python-2.7.14/Lib/sysconfig.py
 @@ -7,10 +7,10 @@ from os.path import pardir, realpath
  
  _INSTALL_SCHEMES = {
@@ -139,10 +141,10 @@
          'include': '{userbase}/include/python{py_version_short}',
          'scripts': '{userbase}/bin',
          'data'   : '{userbase}',
-Index: Python-2.7.13/Lib/test/test_dl.py
+Index: Python-2.7.14/Lib/test/test_dl.py
 ===================================================================
---- Python-2.7.13.orig/Lib/test/test_dl.py
-+++ Python-2.7.13/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
 @@ -4,10 +4,11 @@
  import unittest
  from test.test_support import verbose, import_module
@@ -157,11 +159,11 @@
      ('/usr/bin/cygwin1.dll', 'getpid'),
      ('/usr/lib/libc.dylib', 'getpid'),
      ]
-Index: Python-2.7.13/Lib/test/test_site.py
+Index: Python-2.7.14/Lib/test/test_site.py
 ===================================================================
---- Python-2.7.13.orig/Lib/test/test_site.py
-+++ Python-2.7.13/Lib/test/test_site.py
-@@ -235,12 +235,16 @@ class HelperFunctionsTests(unittest.Test
+--- Python-2.7.14.orig/Lib/test/test_site.py
++++ Python-2.7.14/Lib/test/test_site.py
+@@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test
              self.assertEqual(dirs[0], wanted)
          elif os.sep == '/':
              # OS X, Linux, FreeBSD, etc
@@ -181,10 +183,10 @@
          else:
              # other platforms
              self.assertEqual(len(dirs), 2)
-Index: Python-2.7.13/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
 ===================================================================
---- Python-2.7.13.orig/Lib/trace.py
-+++ Python-2.7.13/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
 @@ -754,10 +754,10 @@ def main(argv=None):
                  # should I also call expanduser? (after all, could use $HOME)
  
@@ -198,11 +200,11 @@
                                             "python" + sys.version[:3]))
                  s = os.path.normpath(s)
                  ignore_dirs.append(s)
-Index: Python-2.7.13/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
 ===================================================================
---- Python-2.7.13.orig/Makefile.pre.in
-+++ Python-2.7.13/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAG
  
  # Machine-dependent subdirectories
  MACHDEP=	@MACHDEP@
@@ -210,7 +212,7 @@
  
  # Multiarch directory (may be empty)
  MULTIARCH=	@MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR=		@libdir@
+@@ -110,7 +111,7 @@ LIBDIR=		@libdir@
  MANDIR=		@mandir@
  INCLUDEDIR=	@includedir@
  CONFINCLUDEDIR=	$(exec_prefix)/include
@@ -219,7 +221,7 @@
  
  # Detailed destination directories
  BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -645,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
  		-DEXEC_PREFIX='"$(exec_prefix)"' \
  		-DVERSION='"$(VERSION)"' \
  		-DVPATH='"$(VPATH)"' \
@@ -227,8 +229,8 @@
  		-o $@ $(srcdir)/Modules/getpath.c
  
  Modules/python.o: $(srcdir)/Modules/python.c
-@@ -709,7 +711,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -693,7 +695,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
  
  Python/getplatform.o: $(srcdir)/Python/getplatform.c
 -		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -236,10 +238,10 @@
  
  Python/importdl.o: $(srcdir)/Python/importdl.c
  		$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.13/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
 ===================================================================
---- Python-2.7.13.orig/Modules/getpath.c
-+++ Python-2.7.13/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
 @@ -100,6 +100,13 @@
  #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
  #endif
@@ -263,10 +265,10 @@
  
  static void
  reduce(char *dir)
-Index: Python-2.7.13/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
 ===================================================================
---- Python-2.7.13.orig/Python/getplatform.c
-+++ Python-2.7.13/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
 @@ -10,3 +10,13 @@ Py_GetPlatform(void)
  {
  	return PLATFORM;
@@ -281,10 +283,10 @@
 +{
 +	return LIB;
 +}
-Index: Python-2.7.13/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
 ===================================================================
---- Python-2.7.13.orig/Python/sysmodule.c
-+++ Python-2.7.13/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
 @@ -1437,6 +1437,8 @@ _PySys_Init(void)
                          PyString_FromString(Py_GetCopyright()));
      SET_SYS_FROM_STRING("platform",
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
index 951cb46..abab41e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
@@ -8,12 +8,12 @@
 
 --- Python-2.7.3.orig/Makefile.pre.in
 +++ Python-2.7.3/Makefile.pre.in
-@@ -1008,7 +1008,7 @@ LIBPL=		$(LIBP)/config
+@@ -1187,7 +1187,7 @@
  LIBPC=		$(LIBDIR)/pkgconfig
-
- libainstall:	all python-config
+ 
+ libainstall:	@DEF_MAKE_RULE@ python-config
 -	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
 +	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \
-	do \
-		if test ! -d $(DESTDIR)$$i; then \
-			echo "Creating directory $$i"; \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+ 			echo "Creating directory $$i"; \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json
new file mode 100644
index 0000000..723e513
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json
@@ -0,0 +1,1047 @@
+{
+    "2to3": {
+        "files": [
+            "${bindir}/2to3",
+            "${libdir}/python2.7/lib2to3"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python automated Python 2 to 3 code translator"
+    },
+    "argparse": {
+        "files": [
+            "${libdir}/python2.7/argparse.py"
+        ],
+        "rdepends": [
+            "codecs",
+            "core",
+            "lang",
+            "textutils"
+        ],
+        "summary": "Python command line argument parser"
+    },
+    "audio": {
+        "files": [
+            "${libdir}/python2.7/audiodev.py",
+            "${libdir}/python2.7/chunk.py",
+            "${libdir}/python2.7/lib-dynload/audioop.so",
+            "${libdir}/python2.7/lib-dynload/ossaudiodev.so",
+            "${libdir}/python2.7/sndhdr.py",
+            "${libdir}/python2.7/sunau.py",
+            "${libdir}/python2.7/sunaudio.py",
+            "${libdir}/python2.7/toaiff.py",
+            "${libdir}/python2.7/wave.py"
+        ],
+        "rdepends": [
+            "core",
+            "crypt",
+            "fcntl",
+            "io",
+            "math"
+        ],
+        "summary": "Python Audio Handling"
+    },
+    "bsddb": {
+        "files": [
+            "${libdir}/python2.7/bsddb",
+            "${libdir}/python2.7/lib-dynload/_bsddb.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python bindings for the Berkeley Database"
+    },
+    "codecs": {
+        "files": [
+            "${libdir}/python2.7/gettext.py",
+            "${libdir}/python2.7/lib-dynload/_codecs_cn.so",
+            "${libdir}/python2.7/lib-dynload/_codecs_hk.so",
+            "${libdir}/python2.7/lib-dynload/_codecs_iso2022.so",
+            "${libdir}/python2.7/lib-dynload/_codecs_jp.so",
+            "${libdir}/python2.7/lib-dynload/_codecs_kr.so",
+            "${libdir}/python2.7/lib-dynload/_codecs_tw.so",
+            "${libdir}/python2.7/lib-dynload/_multibytecodec.so",
+            "${libdir}/python2.7/lib-dynload/unicodedata.so",
+            "${libdir}/python2.7/locale.py",
+            "${libdir}/python2.7/stringprep.py",
+            "${libdir}/python2.7/xdrlib.py"
+        ],
+        "rdepends": [
+            "core",
+            "io",
+            "lang"
+        ],
+        "summary": "Python codec"
+    },
+    "compile": {
+        "files": [
+            "${libdir}/python2.7/compileall.py",
+            "${libdir}/python2.7/py_compile.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python bytecode compilation support"
+    },
+    "compiler": {
+        "files": [
+            "${libdir}/python2.7/compiler"
+        ],
+        "rdepends": [
+            "core",
+            "io",
+            "lang"
+        ],
+        "summary": "Python compiler support"
+    },
+    "compression": {
+        "files": [
+            "${libdir}/python2.7/gzip.py",
+            "${libdir}/python2.7/lib-dynload/bz2.so",
+            "${libdir}/python2.7/tarfile.py",
+            "${libdir}/python2.7/zipfile.py"
+        ],
+        "rdepends": [
+            "core",
+            "io",
+            "shell",
+            "unixadmin",
+            "zlib"
+        ],
+        "summary": "Python high-level compression support"
+    },
+    "contextlib": {
+        "files": [
+            "${libdir}/python2.7/contextlib.py"
+        ],
+        "rdepends": [
+            "core",
+            "lang"
+        ],
+        "summary": "Python utilities for with-statementcontexts."
+    },
+    "core": {
+        "files": [
+            "${bindir}/python*",
+            "${includedir}/python2.7/pyconfig*.h",
+            "${libdir}/python2.7/ConfigParser.py",
+            "${libdir}/python2.7/UserDict.py",
+            "${libdir}/python2.7/UserList.py",
+            "${libdir}/python2.7/UserString.py",
+            "${libdir}/python2.7/__future__.py",
+            "${libdir}/python2.7/_abcoll.py",
+            "${libdir}/python2.7/_sysconfigdata.py",
+            "${libdir}/python2.7/_weakrefset.py",
+            "${libdir}/python2.7/abc.py",
+            "${libdir}/python2.7/ast.py",
+            "${libdir}/python2.7/atexit.py",
+            "${libdir}/python2.7/codecs.py",
+            "${libdir}/python2.7/collections.py",
+            "${libdir}/python2.7/copy.py",
+            "${libdir}/python2.7/copy_reg.py",
+            "${libdir}/python2.7/encodings",
+            "${libdir}/python2.7/encodings/aliases.py",
+            "${libdir}/python2.7/encodings/utf_8.py",
+            "${libdir}/python2.7/genericpath.py",
+            "${libdir}/python2.7/getopt.py",
+            "${libdir}/python2.7/heapq.py",
+            "${libdir}/python2.7/importlib",
+            "${libdir}/python2.7/keyword.py",
+            "${libdir}/python2.7/lib-dynload/_collections.so",
+            "${libdir}/python2.7/lib-dynload/_heapq.so",
+            "${libdir}/python2.7/lib-dynload/_locale.so",
+            "${libdir}/python2.7/lib-dynload/_struct.so",
+            "${libdir}/python2.7/lib-dynload/binascii.so",
+            "${libdir}/python2.7/lib-dynload/itertools.so",
+            "${libdir}/python2.7/lib-dynload/operator.so",
+            "${libdir}/python2.7/lib-dynload/readline.so",
+            "${libdir}/python2.7/lib-dynload/strop.so",
+            "${libdir}/python2.7/lib-dynload/time.so",
+            "${libdir}/python2.7/lib-dynload/xreadlines.so",
+            "${libdir}/python2.7/linecache.py",
+            "${libdir}/python2.7/new.py",
+            "${libdir}/python2.7/os.py",
+            "${libdir}/python2.7/platform.py",
+            "${libdir}/python2.7/posixpath.py",
+            "${libdir}/python2.7/re.py",
+            "${libdir}/python2.7/rlcompleter.py",
+            "${libdir}/python2.7/site.py",
+            "${libdir}/python2.7/sitecustomize.py",
+            "${libdir}/python2.7/sre_compile.py",
+            "${libdir}/python2.7/sre_constants.py",
+            "${libdir}/python2.7/sre_parse.py",
+            "${libdir}/python2.7/stat.py",
+            "${libdir}/python2.7/string.py",
+            "${libdir}/python2.7/struct.py",
+            "${libdir}/python2.7/sysconfig.py",
+            "${libdir}/python2.7/traceback.py",
+            "${libdir}/python2.7/types.py",
+            "${libdir}/python2.7/warnings.py",
+            "${libdir}/python2.7/weakref.py"
+        ],
+        "rdepends": [],
+        "summary": "Python interpreter and core modules"
+    },
+    "crypt": {
+        "files": [
+            "${libdir}/python2.7/hashlib.py",
+            "${libdir}/python2.7/lib-dynload/_hashlib.so",
+            "${libdir}/python2.7/lib-dynload/crypt.so",
+            "${libdir}/python2.7/md5.py",
+            "${libdir}/python2.7/sha.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python basic cryptographic and hashing support"
+    },
+    "ctypes": {
+        "files": [
+            "${libdir}/python2.7/ctypes",
+            "${libdir}/python2.7/lib-dynload/_ctypes.so",
+            "${libdir}/python2.7/lib-dynload/_ctypes_test.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python C types support"
+    },
+    "curses": {
+        "files": [
+            "${libdir}/python2.7/curses",
+            "${libdir}/python2.7/lib-dynload/_curses.so",
+            "${libdir}/python2.7/lib-dynload/_curses_panel.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python curses support"
+    },
+    "datetime": {
+        "files": [
+            "${libdir}/python2.7/_strptime.py",
+            "${libdir}/python2.7/calendar.py",
+            "${libdir}/python2.7/lib-dynload/datetime.so"
+        ],
+        "rdepends": [
+            "codecs",
+            "core",
+            "lang"
+        ],
+        "summary": "Python calendar and time support"
+    },
+    "db": {
+        "files": [
+            "${libdir}/python2.7/anydbm.py",
+            "${libdir}/python2.7/dbhash.py",
+            "${libdir}/python2.7/dumbdbm.py",
+            "${libdir}/python2.7/lib-dynload/dbm.so",
+            "${libdir}/python2.7/whichdb.py"
+        ],
+        "rdepends": [
+            "bsddb",
+            "core",
+            "gdbm"
+        ],
+        "summary": "Python file-based database support"
+    },
+    "debugger": {
+        "files": [
+            "${libdir}/python2.7/bdb.py",
+            "${libdir}/python2.7/pdb.py"
+        ],
+        "rdepends": [
+            "core",
+            "io",
+            "lang",
+            "pprint",
+            "shell"
+        ],
+        "summary": "Python debugger"
+    },
+    "dev": {
+        "files": [
+            "${base_libdir}/*.a",
+            "${base_libdir}/*.o",
+            "${datadir}/aclocal",
+            "${datadir}/pkgconfig",
+            "${includedir}",
+            "${libdir}/*.a",
+            "${libdir}/*.la",
+            "${libdir}/*.o",
+            "${libdir}/lib*${SOLIBSDEV}",
+            "${libdir}/pkgconfig",
+            "${libdir}/python2.7/config/Makefile"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python development package"
+    },
+    "difflib": {
+        "files": [
+            "${libdir}/python2.7/difflib.py"
+        ],
+        "rdepends": [
+            "core",
+            "lang"
+        ],
+        "summary": "Python helpers for computing deltas between objects"
+    },
+    "distutils": {
+        "files": [
+            "${libdir}/python2.7/config",
+            "${libdir}/python2.7/distutils"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Distribution Utilities"
+    },
+    "distutils-staticdev": {
+        "files": [
+            "${libdir}/python2.7/config/lib*.a"
+        ],
+        "rdepends": [
+            "distutils"
+        ],
+        "summary": "Python distribution utilities (static libraries)"
+    },
+    "doctest": {
+        "files": [
+            "${libdir}/python2.7/doctest.py"
+        ],
+        "rdepends": [
+            "core",
+            "crypt",
+            "debugger",
+            "difflib",
+            "fcntl",
+            "io",
+            "lang",
+            "math",
+            "pprint",
+            "shell",
+            "unittest"
+        ],
+        "summary": "Python framework for running examples in docstrings"
+    },
+    "email": {
+        "files": [
+            "${libdir}/python2.7/email",
+            "${libdir}/python2.7/imaplib.py"
+        ],
+        "rdepends": [
+            "contextlib",
+            "core",
+            "crypt",
+            "fcntl",
+            "io",
+            "lang",
+            "math",
+            "netclient",
+            "pickle",
+            "subprocess",
+            "textutils"
+        ],
+        "summary": "Python email support"
+    },
+    "fcntl": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/fcntl.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python's fcntl interface"
+    },
+    "gdbm": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/gdbm.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python GNU database support"
+    },
+    "hotshot": {
+        "files": [
+            "${libdir}/python2.7/hotshot",
+            "${libdir}/python2.7/lib-dynload/_hotshot.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python hotshot performance profiler"
+    },
+    "html": {
+        "files": [
+            "${libdir}/python2.7/HTMLParser.py",
+            "${libdir}/python2.7/formatter.py",
+            "${libdir}/python2.7/htmlentitydefs.py",
+            "${libdir}/python2.7/htmllib.py",
+            "${libdir}/python2.7/markupbase.py",
+            "${libdir}/python2.7/sgmllib.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python HTML processing support"
+    },
+    "idle": {
+        "files": [
+            "${bindir}/idle",
+            "${libdir}/python2.7/idlelib"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Integrated Development Environment"
+    },
+    "image": {
+        "files": [
+            "${libdir}/python2.7/colorsys.py",
+            "${libdir}/python2.7/imghdr.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python graphical image handling"
+    },
+    "io": {
+        "files": [
+            "${libdir}/python2.7/StringIO.py",
+            "${libdir}/python2.7/_pyio.py",
+            "${libdir}/python2.7/io.py",
+            "${libdir}/python2.7/lib-dynload/_io.so",
+            "${libdir}/python2.7/lib-dynload/_socket.so",
+            "${libdir}/python2.7/lib-dynload/_ssl.so",
+            "${libdir}/python2.7/lib-dynload/cStringIO.so",
+            "${libdir}/python2.7/lib-dynload/select.so",
+            "${libdir}/python2.7/lib-dynload/termios.so",
+            "${libdir}/python2.7/pipes.py",
+            "${libdir}/python2.7/socket.py",
+            "${libdir}/python2.7/ssl.py",
+            "${libdir}/python2.7/tempfile.py"
+        ],
+        "rdepends": [
+            "contextlib",
+            "core",
+            "crypt",
+            "fcntl",
+            "lang",
+            "math",
+            "netclient",
+            "textutils"
+        ],
+        "summary": "Python low-level I/O"
+    },
+    "json": {
+        "files": [
+            "${libdir}/python2.7/json",
+            "${libdir}/python2.7/lib-dynload/_json.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python JSON support"
+    },
+    "lang": {
+        "files": [
+            "${libdir}/python2.7/bisect.py",
+            "${libdir}/python2.7/code.py",
+            "${libdir}/python2.7/codeop.py",
+            "${libdir}/python2.7/dis.py",
+            "${libdir}/python2.7/functools.py",
+            "${libdir}/python2.7/inspect.py",
+            "${libdir}/python2.7/lib-dynload/_bisect.so",
+            "${libdir}/python2.7/lib-dynload/_functools.so",
+            "${libdir}/python2.7/lib-dynload/array.so",
+            "${libdir}/python2.7/lib-dynload/parser.so",
+            "${libdir}/python2.7/opcode.py",
+            "${libdir}/python2.7/repr.py",
+            "${libdir}/python2.7/symbol.py",
+            "${libdir}/python2.7/token.py",
+            "${libdir}/python2.7/tokenize.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python low-level language support"
+    },
+    "logging": {
+        "files": [
+            "${libdir}/python2.7/logging"
+        ],
+        "rdepends": [
+            "core",
+            "io",
+            "threading"
+        ],
+        "summary": "Python logging support"
+    },
+    "mailbox": {
+        "files": [
+            "${libdir}/python2.7/mailbox.py"
+        ],
+        "rdepends": [
+            "codecs",
+            "contextlib",
+            "core",
+            "crypt",
+            "datetime",
+            "email",
+            "fcntl",
+            "io",
+            "lang",
+            "math",
+            "mime",
+            "netclient",
+            "textutils"
+        ],
+        "summary": "Python mailbox format support"
+    },
+    "math": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/_random.so",
+            "${libdir}/python2.7/lib-dynload/cmath.so",
+            "${libdir}/python2.7/lib-dynload/math.so",
+            "${libdir}/python2.7/random.py",
+            "${libdir}/python2.7/sets.py"
+        ],
+        "rdepends": [
+            "core",
+            "crypt"
+        ],
+        "summary": "Python math support"
+    },
+    "mime": {
+        "files": [
+            "${libdir}/python2.7/MimeWriter.py",
+            "${libdir}/python2.7/mimetools.py",
+            "${libdir}/python2.7/mimetypes.py",
+            "${libdir}/python2.7/quopri.py",
+            "${libdir}/python2.7/rfc822.py",
+            "${libdir}/python2.7/uu.py"
+        ],
+        "rdepends": [
+            "contextlib",
+            "core",
+            "crypt",
+            "fcntl",
+            "io",
+            "lang",
+            "math",
+            "netclient",
+            "textutils"
+        ],
+        "summary": "Python MIME handling APIs"
+    },
+    "mmap": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/mmap.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python memory-mapped file support"
+    },
+    "modules": {
+        "files": [],
+        "rdepends": [
+            "2to3",
+            "argparse",
+            "audio",
+            "bsddb",
+            "codecs",
+            "compile",
+            "compiler",
+            "compression",
+            "contextlib",
+            "core",
+            "crypt",
+            "ctypes",
+            "curses",
+            "datetime",
+            "db",
+            "debugger",
+            "difflib",
+            "distutils",
+            "doctest",
+            "email",
+            "fcntl",
+            "gdbm",
+            "hotshot",
+            "html",
+            "idle",
+            "image",
+            "io",
+            "json",
+            "lang",
+            "logging",
+            "mailbox",
+            "math",
+            "mime",
+            "mmap",
+            "multiprocessing",
+            "netclient",
+            "netserver",
+            "numbers",
+            "pickle",
+            "pkgutil",
+            "plistlib",
+            "pprint",
+            "profile",
+            "pydoc",
+            "re",
+            "resource",
+            "robotparser",
+            "runpy",
+            "shell",
+            "smtpd",
+            "sqlite3",
+            "sqlite3",
+            "stringold",
+            "subprocess",
+            "syslog",
+            "terminal",
+            "textutils",
+            "threading",
+            "tkinter",
+            "unittest",
+            "unixadmin",
+            "xml",
+            "xmlrpc",
+            "zlib"
+        ],
+        "summary": "All Python modules"
+    },
+    "multiprocessing": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/_multiprocessing.so",
+            "${libdir}/python2.7/multiprocessing"
+        ],
+        "rdepends": [
+            "core",
+            "fcntl",
+            "io",
+            "pickle",
+            "subprocess",
+            "threading"
+        ],
+        "summary": "Python multiprocessing support"
+    },
+    "netclient": {
+        "files": [
+            "${libdir}/python2.7/Cookie.py",
+            "${libdir}/python2.7/_LWPCookieJar.py",
+            "${libdir}/python2.7/_MozillaCookieJar.py",
+            "${libdir}/python2.7/base64.py",
+            "${libdir}/python2.7/cookielib.py",
+            "${libdir}/python2.7/ftplib.py",
+            "${libdir}/python2.7/hmac.py",
+            "${libdir}/python2.7/httplib.py",
+            "${libdir}/python2.7/nntplib.py",
+            "${libdir}/python2.7/poplib.py",
+            "${libdir}/python2.7/smtplib.py",
+            "${libdir}/python2.7/telnetlib.py",
+            "${libdir}/python2.7/urllib.py",
+            "${libdir}/python2.7/urllib2.py",
+            "${libdir}/python2.7/urlparse.py",
+            "${libdir}/python2.7/uuid.py"
+        ],
+        "rdepends": [
+            "codecs",
+            "contextlib",
+            "core",
+            "crypt",
+            "ctypes",
+            "datetime",
+            "email",
+            "fcntl",
+            "io",
+            "lang",
+            "math",
+            "mime",
+            "pickle",
+            "subprocess",
+            "textutils",
+            "threading"
+        ],
+        "summary": "Python Internet Protocol clients"
+    },
+    "netserver": {
+        "files": [
+            "${libdir}/python2.7/BaseHTTPServer.py",
+            "${libdir}/python2.7/CGIHTTPServer.py",
+            "${libdir}/python2.7/SimpleHTTPServer.py",
+            "${libdir}/python2.7/SocketServer.py",
+            "${libdir}/python2.7/cgi.py"
+        ],
+        "rdepends": [
+            "compression",
+            "contextlib",
+            "core",
+            "crypt",
+            "fcntl",
+            "io",
+            "lang",
+            "math",
+            "mime",
+            "netclient",
+            "shell",
+            "textutils",
+            "threading",
+            "unixadmin",
+            "zlib"
+        ],
+        "summary": "Python Internet Protocol servers"
+    },
+    "numbers": {
+        "files": [
+            "${libdir}/python2.7/decimal.py",
+            "${libdir}/python2.7/fractions.py",
+            "${libdir}/python2.7/numbers.py"
+        ],
+        "rdepends": [
+            "codecs",
+            "core",
+            "lang",
+            "math",
+            "threading"
+        ],
+        "summary": "Python number APIs"
+    },
+    "pickle": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/cPickle.so",
+            "${libdir}/python2.7/pickle.py",
+            "${libdir}/python2.7/pickletools.py",
+            "${libdir}/python2.7/shelve.py"
+        ],
+        "rdepends": [
+            "core",
+            "io"
+        ],
+        "summary": "Python serialisation/persistence support"
+    },
+    "pkgutil": {
+        "files": [
+            "${libdir}/python2.7/pkgutil.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python package extension utility support"
+    },
+    "plistlib": {
+        "files": [
+            "${libdir}/python2.7/plistlib.py"
+        ],
+        "rdepends": [
+            "core",
+            "datetime",
+            "io"
+        ],
+        "summary": "Generate and parse Mac OS X .plist files"
+    },
+    "pprint": {
+        "files": [
+            "${libdir}/python2.7/pprint.py"
+        ],
+        "rdepends": [
+            "core",
+            "io"
+        ],
+        "summary": "Python pretty-print support"
+    },
+    "profile": {
+        "files": [
+            "${libdir}/python2.7/cProfile.py",
+            "${libdir}/python2.7/lib-dynload/_lsprof.so",
+            "${libdir}/python2.7/profile.py",
+            "${libdir}/python2.7/pstats.py"
+        ],
+        "rdepends": [
+            "codecs",
+            "core",
+            "lang",
+            "resource",
+            "textutils"
+        ],
+        "summary": "Python basic performance profiling support"
+    },
+    "pydoc": {
+        "files": [
+            "${bindir}/pydoc",
+            "${libdir}/python2.7/pydoc.py",
+            "${libdir}/python2.7/pydoc_data"
+        ],
+        "rdepends": [
+            "codecs",
+            "core",
+            "lang",
+            "pkgutil"
+        ],
+        "summary": "Python interactive help support"
+    },
+    "re": {
+        "files": [
+            "${libdir}/python2.7/sre.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Regular Expression APIs"
+    },
+    "resource": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/resource.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python resource control interface"
+    },
+    "robotparser": {
+        "files": [
+            "${libdir}/python2.7/robotparser.py"
+        ],
+        "rdepends": [
+            "contextlib",
+            "core",
+            "io",
+            "lang",
+            "netclient",
+            "textutils"
+        ],
+        "summary": "Python robots.txt parser"
+    },
+    "runpy": {
+        "files": [
+            "${libdir}/python2.7/runpy.py"
+        ],
+        "rdepends": [
+            "core",
+            "pkgutil"
+        ],
+        "summary": "Python helper for locating/executing scripts in module namespace"
+    },
+    "shell": {
+        "files": [
+            "${libdir}/python2.7/cmd.py",
+            "${libdir}/python2.7/commands.py",
+            "${libdir}/python2.7/dircache.py",
+            "${libdir}/python2.7/fnmatch.py",
+            "${libdir}/python2.7/glob.py",
+            "${libdir}/python2.7/popen2.py",
+            "${libdir}/python2.7/shlex.py",
+            "${libdir}/python2.7/shutil.py"
+        ],
+        "rdepends": [
+            "compression",
+            "core",
+            "io",
+            "unixadmin",
+            "zlib"
+        ],
+        "summary": "Python shell-like functionality"
+    },
+    "smtpd": {
+        "files": [
+            "${bindir}/smtpd.py",
+            "${libdir}/python2.7/asynchat.py",
+            "${libdir}/python2.7/asyncore.py",
+            "${libdir}/python2.7/smtpd.py"
+        ],
+        "rdepends": [
+            "core",
+            "fcntl",
+            "io",
+            "lang"
+        ],
+        "summary": "Python Simple Mail Transport Daemon"
+    },
+    "sqlite3": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/_sqlite3.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Sqlite3 database support"
+    },
+    "sqlite3-tests": {
+        "files": [
+            "${libdir}/python2.7/sqlite3/test"
+        ],
+        "rdepends": [
+            "core",
+            "tests"
+        ],
+        "summary": "Python Sqlite3 database support tests"
+    },
+    "stringold": {
+        "files": [
+            "${libdir}/python2.7/stringold.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python string APIs [deprecated]"
+    },
+    "subprocess": {
+        "files": [
+            "${libdir}/python2.7/subprocess.py"
+        ],
+        "rdepends": [
+            "core",
+            "fcntl",
+            "io",
+            "pickle"
+        ],
+        "summary": "Python subprocess support"
+    },
+    "syslog": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/syslog.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python syslog interface"
+    },
+    "terminal": {
+        "files": [
+            "${libdir}/python2.7/pty.py",
+            "${libdir}/python2.7/tty.py"
+        ],
+        "rdepends": [
+            "core",
+            "io"
+        ],
+        "summary": "Python terminal controlling support"
+    },
+    "tests": {
+        "files": [
+            "${libdir}/python2.7/test"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python tests"
+    },
+    "textutils": {
+        "files": [
+            "${libdir}/python2.7/csv.py",
+            "${libdir}/python2.7/lib-dynload/_csv.so",
+            "${libdir}/python2.7/optparse.py",
+            "${libdir}/python2.7/textwrap.py"
+        ],
+        "rdepends": [
+            "codecs",
+            "core",
+            "io",
+            "lang"
+        ],
+        "summary": "Python option parsin"
+    },
+    "threading": {
+        "files": [
+            "${libdir}/python2.7/Queue.py",
+            "${libdir}/python2.7/_threading_local.py",
+            "${libdir}/python2.7/dummy_thread.py",
+            "${libdir}/python2.7/dummy_threading.py",
+            "${libdir}/python2.7/mutex.py",
+            "${libdir}/python2.7/threading.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python threading & synchronization support"
+    },
+    "tkinter": {
+        "files": [
+            "${libdir}/python2.7/lib-tk"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Tcl/Tk bindings"
+    },
+    "unittest": {
+        "files": [
+            "${libdir}/python2.7/unittest"
+        ],
+        "rdepends": [
+            "core",
+            "difflib",
+            "io",
+            "lang",
+            "pprint",
+            "shell"
+        ],
+        "summary": "Python unit testing framework"
+    },
+    "unixadmin": {
+        "files": [
+            "${libdir}/python2.7/getpass.py",
+            "${libdir}/python2.7/lib-dynload/grp.so",
+            "${libdir}/python2.7/lib-dynload/nis.so"
+        ],
+        "rdepends": [
+            "core",
+            "io"
+        ],
+        "summary": "Python Unix administration support"
+    },
+    "xml": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/_elementtree.so",
+            "${libdir}/python2.7/lib-dynload/pyexpat.so",
+            "${libdir}/python2.7/xml"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python basic XML support"
+    },
+    "xmlrpc": {
+        "files": [
+            "${libdir}/python2.7/DocXMLRPCServer.py",
+            "${libdir}/python2.7/SimpleXMLRPCServer.py"
+        ],
+        "rdepends": [
+            "codecs",
+            "compression",
+            "contextlib",
+            "core",
+            "crypt",
+            "datetime",
+            "fcntl",
+            "io",
+            "lang",
+            "math",
+            "mime",
+            "netclient",
+            "netserver",
+            "pkgutil",
+            "pydoc",
+            "textutils",
+            "threading",
+            "xml",
+            "zlib"
+        ],
+        "summary": "Python XML-RPC support"
+    },
+    "zlib": {
+        "files": [
+            "${libdir}/python2.7/lib-dynload/zlib.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python zlib compression support"
+    }
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
index 2739018..4c8b5e2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
@@ -27,19 +27,11 @@
     except IOError:
         pass
 
-def __enableDefaultEncoding():
-    import sys
-    try:
-        sys.setdefaultencoding( "utf8" )
-    except LookupError:
-        pass
-
 import sys
 try:
     import rlcompleter, readline
 except ImportError:
     pass
 else:
-    __enableDefaultEncoding()
     __registerExitHandler()
     __enableReadlineSupport()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
index 54a30f5..0da5fde 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
@@ -1,6 +1,2 @@
-require python-async.inc
-
 inherit setuptools3
-
-RDEPENDS_${PN} += "python3-threading python3-lang"
-
+require python-async.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
deleted file mode 100644
index de5a01c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Python bindings for the DBus inter-process communication system"
-SECTION = "devel/python"
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
-DEPENDS = "expat dbus dbus-glib virtual/libintl"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5"
-SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
-S = "${WORKDIR}/dbus-python-${PV}"
-
-inherit distutils3-base autotools pkgconfig
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
-PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
-
-RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
-
-FILES_${PN}-dev += "${libdir}/pkgconfig"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb
new file mode 100644
index 0000000..19cbae9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Python bindings for the DBus inter-process communication system"
+SECTION = "devel/python"
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4"
+DEPENDS = "expat dbus dbus-glib virtual/libintl"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
+"
+
+RSRC_URI[md5sum] = "1ce1ddf2582060f8f971652ea54cc17e"
+SRC_URI[sha256sum] = "32f29c17172cdb9cb61c68b1f1a71dfe7351506fc830869029c47449bd04faeb"
+S = "${WORKDIR}/dbus-python-${PV}"
+
+inherit distutils3-base autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
+PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
+
+RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
+
+FILES_${PN}-dev += "${libdir}/pkgconfig"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
deleted file mode 100644
index 4ac2a0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-git.inc
-
-DEPENDS = "python3-gitdb"
-
-inherit setuptools3
-
-RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient python3-unittest python3-argparse git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb
new file mode 100644
index 0000000..ac320fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb
@@ -0,0 +1,2 @@
+require python-git.inc
+inherit setuptools3
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
deleted file mode 100644
index 80d9d46..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-gitdb.inc
-
-DEPENDS = "python3-async python3-smmap"
-
-inherit distutils3
-
-RDEPENDS_${PN} += "python3-smmap python3-async python3-mmap python3-lang python3-io python3-shell python3-crypt python3-compression"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb
new file mode 100644
index 0000000..fe15832
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-gitdb.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
index f51ce64..4eba9ec 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
@@ -4,17 +4,14 @@
 LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
                     file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
 
-SRC_URI = "https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-${PV}.tar.gz \
-           file://0001-Add-python-3-compatibility.patch "
+SRC_URI = "file://0001-Add-python-3-compatibility.patch "
+
 SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6"
 SRC_URI[sha256sum] = "abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/iniparse/"
 
-inherit distutils3
+inherit pypi distutils3
 
 RDEPENDS_${PN} += "python3-core python3-six"
 DEPENDS += "python3-six"
 
 BBCLASSEXTEND = "native nativesdk"
-
-S = "${WORKDIR}/iniparse-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
index 2b50ffd..22ceeeb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
@@ -1,11 +1,2 @@
-require python-mako.inc
-
 inherit setuptools3
-
-RDEPENDS_${PN} = "python3-threading \
-                  python3-netclient \
-                  python3-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
+require python-mako.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
deleted file mode 100644
index 8cd9c88..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
+++ /dev/null
@@ -1,84 +0,0 @@
-require recipes-devtools/python/python.inc
-
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://12-distutils-prefix-is-inside-staging-area.patch \
-file://python-config.patch \
-file://0001-cross-compile-support.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://python-3.3-multilib.patch \
-file://03-fix-tkinter-detection.patch \
-file://avoid_warning_about_tkinter.patch \
-file://shutil-follow-symlink-fix.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://sysroot-include-headers.patch \
-file://unixccompiler.patch \
-${DISTRO_SRC_URI} \
-file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
-file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
-file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
-"
-
-SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
-SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-S = "${WORKDIR}/Python-${PV}"
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
-
-inherit native
-
-require python-native-${PYTHON_MAJMIN}-manifest.inc
-
-# uninative may be used on pre glibc 2.25 systems which don't have getentropy
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no"
-
-EXTRA_OEMAKE = '\
-  LIBC="" \
-  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
-  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-  LIB=${baselib} \
-  ARCH=${TARGET_ARCH} \
-'
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
-	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-	sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
-}
-
-do_install() {
-	install -d ${D}${libdir}/pkgconfig
-	oe_runmake 'DESTDIR=${D}' install
-	if [ -e ${WORKDIR}/sitecustomize.py ]; then
-		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
-	fi
-	install -d ${D}${bindir}/${PN}
-	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
-	# Make sure we use /usr/bin/env python
-	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
-		sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
-	done
-
-	# Tests are large and we don't need them in the native sysroot
-	rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf
-}
-
-RPROVIDES += "python3-misc-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb
new file mode 100644
index 0000000..3098027
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb
@@ -0,0 +1,112 @@
+require recipes-devtools/python/python.inc
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
+file://0001-cross-compile-support.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://python-3.3-multilib.patch \
+file://03-fix-tkinter-detection.patch \
+file://avoid_warning_about_tkinter.patch \
+file://shutil-follow-symlink-fix.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://sysroot-include-headers.patch \
+file://unixccompiler.patch \
+${DISTRO_SRC_URI} \
+file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
+file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
+file://regen-all.patch \
+"
+
+SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
+SRC_URI[sha256sum] = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+S = "${WORKDIR}/Python-${PV}"
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"
+
+inherit native
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
+
+EXTRA_OEMAKE = '\
+  LIBC="" \
+  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+  LIB=${baselib} \
+  ARCH=${TARGET_ARCH} \
+'
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+do_configure_append() {
+	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+	sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
+}
+
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phase
+#
+do_compile_prepend() {
+    # Assuming https://bugs.python.org/issue33080 has been addressed in Makefile.
+    oe_runmake regen-all
+}
+
+do_install() {
+	install -d ${D}${libdir}/pkgconfig
+	oe_runmake 'DESTDIR=${D}' install
+	if [ -e ${WORKDIR}/sitecustomize.py ]; then
+		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+	fi
+	install -d ${D}${bindir}/${PN}
+	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+	# Make sure we use /usr/bin/env python
+	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
+	done
+
+        # Add a symlink to the native Python so that scripts can just invoke
+        # "nativepython" and get the right one without needing absolute paths
+        # (these often end up too long for the #! parser in the kernel as the
+        # buffer is 128 bytes long).
+        ln -s python3-native/python3 ${D}${bindir}/nativepython3
+}
+
+python(){
+
+    # Read JSON manifest
+    import json
+    pythondir = d.getVar('THISDIR',True)
+    with open(pythondir+'/python3/python3-manifest.json') as manifest_file:
+        python_manifest=json.load(manifest_file)
+
+    rprovides = d.getVar('RPROVIDES').split()
+
+    # Hardcoded since it cant be python3-native-foo, should be python3-foo-native
+    pn = 'python3'
+
+    for key in python_manifest:
+        pypackage = pn + '-' + key + '-native'
+        if pypackage not in rprovides:
+              rprovides.append(pypackage)
+
+    d.setVar('RPROVIDES', ' '.join(rprovides))
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
index 1e2ff74..8bc1f49 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
@@ -1,28 +1,6 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
 inherit setuptools3
+require python-nose.inc
 
 do_install_append() {
     mv ${D}${bindir}/nosetests ${D}${bindir}/nosetests3
 }
-
-RDEPENDS_${PN}_class-target = "\
-  python3-unittest \
-  "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb
deleted file mode 100644
index 9b907a2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "The PyPA recommended tool for installing Python packages"
-sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
-
-SRCNAME = "pip"
-DEPENDS += "python3 python3-setuptools-native"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "35f01da33009719497f01a4ba69d63c9"
-SRC_URI[sha256sum] = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_prepend() {
-    install -d ${D}${PYTHON_SITEPACKAGES_DIR}
-}
-
-# Use setuptools site.py instead, avoid shared state issue
-do_install_append() {
-    rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
-    rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
-
-    # Install as pip3 and leave pip2 as default
-    rm ${D}/${bindir}/pip
-
-    # Installed eggs need to be passed directly to the interpreter via a pth file
-    echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
-
-    # Make sure we use /usr/bin/env python3
-    for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do
-        sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
-    done
-}
-
-RDEPENDS_${PN} = "\
-  python3-compile \
-  python3-io \
-  python3-enum \
-  python3-html \
-  python3-json \
-  python3-netserver \
-  python3-setuptools \
-  python3-unixadmin \
-  python3-xmlrpc \
-"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb
new file mode 100644
index 0000000..53fd6dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb
@@ -0,0 +1,48 @@
+SUMMARY = "The PyPA recommended tool for installing Python packages"
+HOMEPAGE = "https://pypi.python.org/pypi/pip"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
+
+DEPENDS += "python3 python3-setuptools-native"
+
+SRC_URI[md5sum] = "2fddd680422326b9d1fbf56112cf341d"
+SRC_URI[sha256sum] = "88110a224e9d30e5d76592a0b2130ef10e7e67a6426e8617bb918fffbfe91fe5"
+
+inherit pypi distutils3
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
+
+do_install_prepend() {
+    install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+}
+
+# Use setuptools site.py instead, avoid shared state issue
+do_install_append() {
+    rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
+    rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
+
+    # Install as pip3 and leave pip2 as default
+    rm ${D}/${bindir}/pip
+
+    # Installed eggs need to be passed directly to the interpreter via a pth file
+    echo "./${PYPI_PACKAGE}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${PYPI_PACKAGE}-${PV}.pth
+
+    # Make sure we use /usr/bin/env python3
+    for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do
+        sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
+    done
+}
+
+RDEPENDS_${PN} = "\
+  python3-compile \
+  python3-io \
+  python3-html \
+  python3-json \
+  python3-netserver \
+  python3-setuptools \
+  python3-unixadmin \
+  python3-xmlrpc \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
deleted file mode 100644
index 9258ba1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Python bindings for the Cairo canvas library"
-HOMEPAGE = "http://cairographics.org/pycairo"
-BUGTRACKER = "http://bugs.freedesktop.org"
-SECTION = "python-devel"
-LICENSE = "LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-# cairo >= 1.8.8
-DEPENDS = "cairo"
-PR = "r2"
-
-SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "e6fd3f2f1e6a72e0db0868c4985669c5"
-SRC_URI[sha256sum] = "9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be"
-
-S = "${WORKDIR}/pycairo-${PV}"
-
-inherit distutils3 pkgconfig
-
-CFLAGS += "-fPIC"
-
-BBCLASSEXTEND = "native"
-
-do_configure() {
-	PYTHON=${PYTHON} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
-}
-
-do_compile() {
-	./waf build ${PARALLEL_MAKE}
-}
-
-do_install() {
-	./waf install
-	sed \
-		-e 's:@prefix@:${prefix}:' \
-		-e 's:@VERSION@:${PV}:' \
-		-e 's:@includedir@:${includedir}:' \
-		py3cairo.pc.in > py3cairo.pc
-	install -m 0644 py3cairo.pc ${D}${libdir}/pkgconfig/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
new file mode 100644
index 0000000..5c3e1e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Python bindings for the Cairo canvas library"
+HOMEPAGE = "http://cairographics.org/pycairo"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "python-devel"
+LICENSE = "LGPLv2.1 & MPLv1.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
+                    file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
+                    file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
+
+# cairo >= 1.14
+DEPENDS = "cairo"
+
+SRC_URI = "https://github.com/pygobject/pycairo/releases/download/v${PV}/pycairo-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/pygobject/pycairo/releases/"
+
+SRC_URI[md5sum] = "3ff210c34e7b052590e15fd0fb147766"
+SRC_URI[sha256sum] = "ad150ea637860836b66705e0513b8e59494538f0b80497ad3462051368755016"
+
+S = "${WORKDIR}/pycairo-${PV}"
+
+inherit setuptools3 pkgconfig
+
+CFLAGS += "-fPIC"
+
+BBCLASSEXTEND = "native"
+
+do_install_append() {
+    install -d ${D}${includedir}/pycairo/
+    install -m 0644 ${D}${datadir}/include/pycairo/py3cairo.h ${D}${includedir}/pycairo/
+}
+FILES_${PN} += "${datadir}/include/pycairo/py3cairo.h"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch
deleted file mode 100644
index aaedb58..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 206360744cedff20eae3c8fcfde9938fdae99592 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 6 Jul 2017 11:47:21 +0300
-Subject: [PATCH] configure.ac: Don't use gnome-common macros
-
-remove GNOME_COMPILE_WARNINGS() call: it's from gnome-common which
-is deprecated.
-
-This patch can be removed when upgrading to 3.25.1: at that point
-pygobject needs autoconf-archive instead.
-
-Upstream-Status: Inappropriate [Already handled upstream]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1f15b3c..5cb170f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -221,8 +221,6 @@ AC_ARG_WITH(common,
-     with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
- 
--# compiler warnings, errors, required cflags, and code coverage support
--GNOME_COMPILE_WARNINGS([maximum], [-Wno-error=missing-prototypes])
- AC_MSG_CHECKING(for Gnome code coverage support)
- m4_ifdef([GNOME_CODE_COVERAGE],
-          [AC_MSG_RESULT(yes)
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
deleted file mode 100644
index a391f7e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e5350d730f85957a42c6d846d347d080e7dd996 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 23 Oct 2015 12:40:34 +0300
-Subject: [PATCH] configure.ac: add sysroot path to GI_DATADIR; don't set
- introspection scanner and compiler paths
-
-Upstream-Status: Pending [review on oe-core maillist]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2c0cfbd..cfcb3bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -194,7 +194,7 @@ PKG_CHECK_MODULES(GI,
-     gobject-introspection-1.0 >= introspection_required_version
- )
- 
--GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-+GI_DATADIR=$PKG_CONFIG_SYSROOT_DIR$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
- AC_SUBST(GI_DATADIR)
- 
- if test "$enable_cairo" != no; then
-@@ -219,12 +219,6 @@ AC_ARG_WITH(common,
-     with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
- 
--INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
--INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
--
--AC_SUBST(INTROSPECTION_SCANNER)
--AC_SUBST(INTROSPECTION_COMPILER)
--
- # compiler warnings, errors, required cflags, and code coverage support
- GNOME_COMPILE_WARNINGS([maximum])
- AC_MSG_CHECKING(for Gnome code coverage support)
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
deleted file mode 100644
index 9d10af2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Python GObject bindings"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-
-inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even
-
-DEPENDS += "python3 glib-2.0"
-
-SRCNAME="pygobject"
-SRC_URI = " \
-    http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
-    file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
-    file://0001-configure.ac-Don-t-use-gnome-common-macros.patch \
-"
-
-SRC_URI[md5sum] = "69a843311d0f0385dff376e11a2d83d2"
-SRC_URI[sha256sum] = "a628a95aa0909e13fb08230b1b98fc48adef10b220932f76d62f6821b3fdbffd"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-
-PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
-
-# python3-pycairo is checked on configuration -> DEPENDS
-# we don't link against python3-pycairo -> RDEPENDS
-PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo"
-
-RDEPENDS_${PN} += "python3-setuptools python3-importlib"
-
-BBCLASSEXTEND = "native"
-PACKAGECONFIG_class-native = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb
new file mode 100644
index 0000000..97286f4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Python GObject bindings"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even
+
+DEPENDS += "python3 glib-2.0"
+
+SRCNAME="pygobject"
+SRC_URI = " \
+    http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "612e9e2863d117d810e78672f7bc3ad6"
+SRC_URI[sha256sum] = "42312b4a5015571fa0a4f2d201005da46b71c251ea2625bc95702d071c4ff895"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
+
+# python3-pycairo is checked on configuration -> DEPENDS
+# we don't link against python3-pycairo -> RDEPENDS
+PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo"
+
+RDEPENDS_${PN} += "python3-setuptools"
+
+BBCLASSEXTEND = "native"
+PACKAGECONFIG_class-native = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
deleted file mode 100644
index a7bca97..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-require python-setuptools.inc
-
-DEPENDS += "python3"
-DEPENDS_class-native += "python3-native"
-DEPENDS_class-nativesdk += "nativesdk-python3"
-
-inherit setuptools3
-
-do_install_append() {
-    mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
-}
-
-RDEPENDS_${PN}_class-native = "\
-  python3-distutils \
-  python3-compression \
-"
-RDEPENDS_${PN} = "\
-  python3-ctypes \
-  python3-distutils \
-  python3-email \
-  python3-importlib \
-  python3-numbers \
-  python3-compression \
-  python3-shell \
-  python3-subprocess \
-  python3-textutils \
-  python3-pkgutil \
-  python3-threading \
-  python3-misc \
-  python3-unittest \
-  python3-xml \
-"
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb
new file mode 100644
index 0000000..0dc1ed8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb
@@ -0,0 +1,6 @@
+require python-setuptools.inc
+inherit setuptools3
+
+do_install_append() {
+    mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
deleted file mode 100644
index 38a47b7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools3
-require python-six.inc
-
-RDEPENDS_${PN} += "python3-io"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb
new file mode 100644
index 0000000..8795313
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-six.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
index 9f8a26d..e87b8df8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
@@ -1,5 +1,2 @@
-require python-smmap.inc
-
 inherit setuptools3
-
-RDEPENDS_${PN} += "python3-codecs python3-mmap python3-lang"
+require python-smmap.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
index 118d75d..7cd7e3b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
@@ -1,4 +1,4 @@
-From 624c029abcc73c724020ccea9a2b4b5b5c00f2a6 Mon Sep 17 00:00:00 2001
+From ecde3ea170999a9ef734e8af4d7c25be5ba81697 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 31 Mar 2017 15:42:46 +0300
 Subject: [PATCH] cross-compile support
@@ -8,60 +8,63 @@
 
 -Khem
 
+Rebased on 3.5.4
+
 Upstream-Status: Inappropriate[Configuration Specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Derek Straka <derek@asterius.io>
 ---
  Makefile.pre.in | 14 ++++++++------
  1 file changed, 8 insertions(+), 6 deletions(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index a88b7d5..7cb8bb3 100644
+index 144c1f8629..f252ac2417 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -221,6 +221,7 @@ LIBOBJS=	@LIBOBJS@
- 
+@@ -223,6 +223,7 @@ LIBOBJS=	@LIBOBJS@
+
  PYTHON=		python$(EXE)
  BUILDPYTHON=	python$(BUILDEXE)
 +HOSTPYTHON=    $(BUILDPYTHON)
- 
- PYTHON_FOR_GEN=@PYTHON_FOR_GEN@
+
+ PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@
  PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
-@@ -280,6 +281,7 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
+@@ -277,6 +278,7 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
  ##########################################################################
  # Parser
  PGEN=		Parser/pgen$(EXE)
 +HOSTPGEN=	$(PGEN)$(EXE)
- 
+
  PSRCS=		\
  		Parser/acceler.c \
-@@ -510,7 +512,7 @@ build_all_generate_profile:
- 
+@@ -478,7 +480,7 @@ build_all_generate_profile:
+
  run_profile_task:
  	: # FIXME: can't run for a cross build
 -	$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
 +	$(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true
- 
+
  build_all_merge_profile:
  	$(LLVM_PROF_MERGER)
-@@ -787,7 +789,7 @@ $(IO_OBJS): $(IO_H)
- 
- $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
+@@ -772,7 +774,7 @@ regen-grammar: $(PGEN)
+ 	# Regenerate Include/graminit.h and Python/graminit.c
+ 	# from Grammar/Grammar using pgen
  	@$(MKDIR_P) Include
--	$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+	$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
- 	touch $(GRAMMAR_C)
- 
-@@ -976,7 +978,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
+-	$(PGEN) $(srcdir)/Grammar/Grammar \
++	$(HOSTPGEN) $(srcdir)/Grammar/Grammar \
+ 		$(srcdir)/Include/graminit.h \
+ 		$(srcdir)/Python/graminit.c
+
+@@ -978,7 +980,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
  ######################################################################
- 
+
  TESTOPTS=	$(EXTRATESTOPTS)
 -TESTPYTHON=	$(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
 +TESTPYTHON=	$(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS)
  TESTRUNNER=	$(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
  TESTTIMEOUT=	3600
- 
-@@ -1468,7 +1470,7 @@ frameworkinstallstructure:	$(LDLIBRARY)
+
+@@ -1470,7 +1472,7 @@ frameworkinstallstructure:	$(LDLIBRARY)
  		fi; \
  	done
  	$(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
@@ -70,24 +73,24 @@
  	$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  	$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
  	$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1534,7 +1536,7 @@ config.status:	$(srcdir)/configure
- 
+@@ -1543,7 +1545,7 @@ Python/dtoa.o: Python/dtoa.c
+
  # Run reindent on the library
  reindent:
 -	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
 +	$(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
- 
+
  # Rerun configure with the same options as it was run last time,
  # provided the config.status script exists
-@@ -1674,7 +1676,7 @@ funny:
- 
+@@ -1678,7 +1680,7 @@ funny:
+
  # Perform some verification checks on any modified files.
- patchcheck: all
+ patchcheck: @DEF_MAKE_RULE@
 -	$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+	$(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
- 
++	$(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
+
  # Dependencies
- 
--- 
+
+--
 2.11.0
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
index 789929b..f9971c6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
@@ -8,9 +8,11 @@
  Makefile.pre.in |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1306,8 +1306,8 @@ touch:
+Index: Python-3.5.3/Makefile.pre.in
+===================================================================
+--- Python-3.5.3.orig/Makefile.pre.in
++++ Python-3.5.3/Makefile.pre.in
+@@ -1574,8 +1574,8 @@ touch:
  # Sanitation targets -- clean leaves libraries, executables and tags
  # files, which clobber removes as well
  pycremoval:
@@ -21,7 +23,7 @@
  
  rmtestturds:
  	-rm -f *BAD *GOOD *SKIPPED
-@@ -1321,9 +1321,9 @@ docclean:
+@@ -1589,9 +1589,9 @@ docclean:
  	-rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
  
  clean: pycremoval
@@ -32,5 +34,5 @@
 +	find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
 +	find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
  	find build -name 'fficonfig.h' -exec rm -f {} ';' || true
- 	find build -name 'fficonfig.py' -exec rm -f {} ';' || true
- 	-rm -f Lib/lib2to3/*Grammar*.pickle
+ 	find build -name '*.py' -exec rm -f {} ';' || true
+ 	find build -name '*.py[co]' -exec rm -f {} ';' || true
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
deleted file mode 100644
index 7217c6e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 62dcf34987b680e95873eb947b3f4d802199c667 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C5=81ukasz=20Langa?= <lukasz@langa.pl>
-Date: Fri, 10 Feb 2017 00:14:55 -0800
-Subject: [PATCH] Fix #29519: weakref spewing exceptions during interp
- finalization
-
-commit 9cd7e17640a49635d1c1f8c2989578a8fc2c1de6
-from https://github.com/python/cpython
-
-Upstream-Status: Backport
-
-Signed-off-by: Lukasz Langa <lukasz@langa.pl>
----
- Lib/weakref.py | 4 ++--
- Misc/NEWS      | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/Lib/weakref.py b/Lib/weakref.py
-index aaebd0c..787e33a 100644
---- a/Lib/weakref.py
-+++ b/Lib/weakref.py
-@@ -106,7 +106,7 @@ class WeakValueDictionary(collections.MutableMapping):
-         self, *args = args
-         if len(args) > 1:
-             raise TypeError('expected at most 1 arguments, got %d' % len(args))
--        def remove(wr, selfref=ref(self)):
-+        def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
-             self = selfref()
-             if self is not None:
-                 if self._iterating:
-@@ -114,7 +114,7 @@ class WeakValueDictionary(collections.MutableMapping):
-                 else:
-                     # Atomic removal is necessary since this function
-                     # can be called asynchronously by the GC
--                    _remove_dead_weakref(d, wr.key)
-+                    _atomic_removal(d, wr.key)
-         self._remove = remove
-         # A list of keys to be removed
-         self._pending_removals = []
-diff --git a/Misc/NEWS b/Misc/NEWS
-index 41cfdba..6d89f52 100644
---- a/Misc/NEWS
-+++ b/Misc/NEWS
-@@ -5719,6 +5719,9 @@ Core and Builtins
- Library
- -------
- 
-+- Issue #29519: Fix weakref spewing exceptions during interpreter shutdown
-+  when used with a rare combination of multiprocessing and custom codecs.
-+
- - Issue #20154: Deadlock in asyncio.StreamReader.readexactly().
- 
- - Issue #16113: Remove sha3 module again.
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 3347321..a3cc48c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@
 Also simply disable the tk module since its not in DEPENDS.
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
 
-Index: Python-2.7.2/setup.py
+Index: Python-3.5.3/setup.py
 ===================================================================
---- Python-2.7.2.orig/setup.py	2012-04-05 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py	2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+--- Python-3.5.3.orig/setup.py
++++ Python-3.5.3/setup.py
+@@ -1558,10 +1558,12 @@ class PyBuildExt(build_ext):
+         self.extensions.extend(exts)
+ 
          # Call the method for detecting whether _tkinter can be compiled
-         self.detect_tkinter(inc_dirs, lib_dirs)
+-        self.detect_tkinter(inc_dirs, lib_dirs)
++        # self.detect_tkinter(inc_dirs, lib_dirs)
  
 -        if '_tkinter' not in [e.name for e in self.extensions]:
 -            missing.append('_tkinter')
@@ -22,18 +25,5 @@
 +        #if '_tkinter' not in [e.name for e in self.extensions]:
 +        #    missing.append('_tkinter')
  
-         return missing
- 
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
-         self.extensions.extend(exts)
- 
-         # Call the method for detecting whether _tkinter can be compiled
--        self.detect_tkinter(inc_dirs, lib_dirs)
-+        # self.detect_tkinter(inc_dirs, lib_dirs)
- 
-         # tkinter module will not be avalaible as yocto
-         # doesn't have tk integrated (yet)
+ ##         # Uncomment these lines if you want to play with xxmodule.c
+ ##         ext = Extension('xx', ['xxmodule.c'])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py
new file mode 100644
index 0000000..2f944f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -0,0 +1,354 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is: 
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, ont this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# This script differs from its python2 version mostly on how shared libraries are handled
+# The manifest file for python3 has an extra field which contains the cached files for
+# each package.
+# Tha method to handle cached files does not work when a module includes a folder which
+# itself contains the pycache folder, gladly this is almost never the case.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+import sys
+import subprocess
+import json
+import os
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot='recipe-sysroot-native'
+for p in sys.path:
+  if pivot in p:
+    nativelibfolder=p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = {}
+
+# Check for repeated files, folders and wildcards
+allfiles=[]
+repeated=[]
+wildcards=[]
+
+hasfolders=[]
+allfolders=[]
+
+def isFolder(value):
+  if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+    return True
+  else:
+    return False
+
+def isCached(item):
+  if '__pycache__' in item:
+    return True
+  else:
+    return False
+
+# Read existing JSON manifest
+with open('python3-manifest.json') as manifest:
+  old_manifest=json.load(manifest)
+
+
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+print ('Getting dependencies for package: core')
+
+# Special call to check for core package
+output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package']).decode('utf8')
+for item in output.split():
+    # We append it so it doesnt hurt what we currently have:
+    if isCached(item):
+        if item not in old_manifest['core']['cached']:
+            # We use the same data structure since its the one which will be used to check
+            # dependencies for other packages
+            old_manifest['core']['cached'].append(item)
+    else:
+        if item not in old_manifest['core']['files']:
+            # We use the same data structure since its the one which will be used to check
+            # dependencies for other packages
+            old_manifest['core']['files'].append(item)
+
+for value in old_manifest['core']['files']:
+  # Ignore folders, since we don't import those, difficult to handle multilib
+  if isFolder(value):
+    # Pass it directly
+    if isCached(value):
+        if value not in old_manifest['core']['cached']:
+            old_manifest['core']['cached'].append(value)
+    else:
+        if value not in old_manifest['core']['files']:
+            old_manifest['core']['files'].append(value)
+    continue
+  # Ignore binaries, since we don't import those, assume it was added correctly (manually)
+  if '${bindir}' in value:
+    # Pass it directly
+    if value not in old_manifest['core']['files']:
+      old_manifest['core']['files'].append(value)
+    continue
+  # Ignore empty values
+  if value == '':
+    continue
+  if '${includedir}' in value:
+    if value not in old_manifest['core']['files']:
+      old_manifest['core']['files'].append(value)
+    continue
+  # Get module name , shouldnt be affected by libdir/bindir
+  value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+  # Launch separate task for each module for deterministic behavior
+  # Each module will only import what is necessary for it to work in specific
+  print ('Getting dependencies for module: %s' % value)
+  output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % value]).decode('utf8')
+  print ('The following dependencies were found for module %s:\n' % value)
+  print (output)
+  for item in output.split():
+    # We append it so it doesnt hurt what we currently have:
+    if isCached(item):
+        if item not in old_manifest['core']['cached']:
+            # We use the same data structure since its the one which will be used to check
+            # dependencies for other packages
+            old_manifest['core']['cached'].append(item)
+    else:
+        if item not in old_manifest['core']['files']:
+            # We use the same data structure since its the one which will be used to check
+            # dependencies for other packages
+            old_manifest['core']['files'].append(item)
+
+
+# We check which packages include folders
+for key in old_manifest:
+    for value in old_manifest[key]['files']:
+        # Ignore folders, since we don't import those, difficult to handle multilib
+        if isFolder(value):
+            print ('%s is a folder' % value)
+            if key not in hasfolders:
+                hasfolders.append(key)
+            if value not in allfolders:
+                allfolders.append(value)
+
+for key in old_manifest:
+    # Use an empty dict as data structure to hold data for each package and fill it up
+    new_manifest[key]={}
+    new_manifest[key]['files']=[]
+    
+    new_manifest[key]['rdepends']=[]
+    # All packages should depend on core
+    if key != 'core':
+         new_manifest[key]['rdepends'].append('core')
+         new_manifest[key]['cached']=[]
+    else:
+         new_manifest[key]['cached']=old_manifest[key]['cached']
+    new_manifest[key]['summary']=old_manifest[key]['summary']
+
+    # Handle special cases, we assume that when they were manually added 
+    # to the manifest we knew what we were doing.
+    print('\n')
+    print('--------------------------')
+    print ('Handling package %s' % key)
+    print('--------------------------')
+    special_packages=['misc', 'modules', 'dev']
+    if key in special_packages or 'staticdev' in key:
+        print('Passing %s package directly' % key)
+        new_manifest[key]=old_manifest[key]
+        continue
+
+    for value in old_manifest[key]['files']:
+        # We already handled core on the first pass
+        if key == 'core':
+            new_manifest[key]['files'].append(value)
+            continue
+        # Ignore folders, since we don't import those, difficult to handle multilib
+        if isFolder(value):
+            # Pass folders directly
+            new_manifest[key]['files'].append(value)
+        # Ignore binaries, since we don't import those
+        if '${bindir}' in value:
+            # Pass it directly to the new manifest data structure
+            if value not in new_manifest[key]['files']:
+                new_manifest[key]['files'].append(value)
+            continue
+        # Ignore empty values
+        if value == '':
+            continue
+        if '${includedir}' in value:
+            if value not in new_manifest[key]['files']:
+                new_manifest[key]['files'].append(value)
+            continue
+
+        # Get module name , shouldnt be affected by libdir/bindir
+        # We need to check if the imported module comes from another (e.g. sqlite3.dump)
+        path,value = os.path.split(value)
+        path = os.path.basename(path)
+        value = os.path.splitext(os.path.basename(value))[0]
+
+        # If this condition is met, it means we need to import it from another module
+        # or its the folder itself (e.g. unittest)
+        if path == key:
+          if value:
+            value = path + '.' + value
+          else:
+            value = path
+
+        # Launch separate task for each module for deterministic behavior
+        # Each module will only import what is necessary for it to work in specific
+        print ('\nGetting dependencies for module: %s' % value)
+        output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % value]).decode('utf8')
+        # We can print dependencies for debugging purposes
+        print ('The following dependencies were found for module %s:\n' % value)
+        print (output)
+        # Output will have all dependencies
+
+        reportFILES = []
+        reportRDEPS = []
+
+        for item in output.split():
+
+            # Warning: This first part is ugly
+            # One of the dependencies that was found, could be inside of one of the folders included by another package
+            # We need to check if this happens so we can add the package containing the folder as an rdependency
+            # e.g. Folder encodings contained in codecs
+            # This would be solved if no packages included any folders
+
+            # This can be done in two ways:
+            # 1 - We assume that if we take out the filename from the path we would get
+            #   the folder string, then we would check if folder string is in the list of folders
+            #   This would not work if a package contains a folder which contains another folder
+            #   e.g. path/folder1/folder2/filename  folder_string= path/folder1/folder2
+            #   folder_string would not match any value contained in the list of folders
+            #
+            # 2 - We do it the other way around, checking if the folder is contained in the path
+            #   e.g. path/folder1/folder2/filename  folder_string= path/folder1/folder2
+            #   is folder_string inside path/folder1/folder2/filename?, 
+            #   Yes, it works, but we waste a couple of milliseconds.
+
+            inFolders=False
+            for folder in allfolders:
+                if folder in item:
+                    inFolders = True # Did we find a folder?
+                    folderFound = False # Second flag to break inner for
+                    # Loop only through packages which contain folders
+                    for keyfolder in hasfolders:
+                        if (folderFound == False):
+                            #print('Checking folder %s on package %s' % (item,keyfolder))
+                            for file_folder in old_manifest[keyfolder]['files'] or file_folder in old_manifest[keyfolder]['cached']:
+                                if file_folder==folder:
+                                    print ('%s folder found in %s' % (folder, keyfolder))
+                                    folderFound = True
+                                    if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
+                                        new_manifest[key]['rdepends'].append(keyfolder)
+                                    
+                        else:
+                            break
+
+            # A folder was found so we're done with this item, we can go on
+            if inFolders:
+                continue
+
+
+            # We might already have it on the dictionary since it could depend on a (previously checked) module
+            if item not in new_manifest[key]['files'] and item not in new_manifest[key]['cached']:
+                # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+                if key=='core':
+                  print('Adding %s to %s FILES' % (item, key))
+                  if item.endswith('*'):
+                      wildcards.append(item)
+                  if isCached(item):
+                      new_manifest[key]['cached'].append(item)
+                  else:
+                      new_manifest[key]['files'].append(item)
+
+                  # Check for repeated files
+                  if item not in allfiles:
+                      allfiles.append(item)
+                  else:
+                      repeated.append(item)
+
+                else:
+
+
+                    # Check if this dependency is already contained on another package, so we add it
+                    # as an RDEPENDS, or if its not, it means it should be contained on the current
+                    # package, so we should add it to FILES
+                    for newkey in old_manifest:
+                        # Debug
+                        #print('Checking %s ' % item + ' in %s' % newkey)
+                        if item in old_manifest[newkey]['files'] or item in old_manifest[newkey]['cached']:      
+                                # Since were nesting, we need to check its not the same key
+                                if(newkey!=key):
+                                    if newkey not in new_manifest[key]['rdepends']:
+                                       # Add it to the new manifest data struct
+                                       reportRDEPS.append('Adding %s to %s RDEPENDS, because it contains %s\n' % (newkey, key, item))
+                                       new_manifest[key]['rdepends'].append(newkey)
+                                    break
+                    else:
+                      # A module shouldn't contain itself (${libdir}/python3/sqlite3 shouldnt be on sqlite3 files)
+                      if os.path.basename(item) != key:
+                        reportFILES.append(('Adding %s to %s FILES\n' % (item, key)))
+                        # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+                        if isCached(item):
+                            new_manifest[key]['cached'].append(item)
+                        else:
+                            new_manifest[key]['files'].append(item)
+
+                        if item.endswith('*'):
+                            wildcards.append(item)
+                        if item not in allfiles:
+                            allfiles.append(item)
+                        else:
+                            repeated.append(item)
+
+        print('\n')
+        print('#################################')
+        print('Summary for module %s' % value)
+        print('FILES found for module %s:' % value)
+        print(''.join(reportFILES))
+        print('RDEPENDS found for module %s:' % value)
+        print(''.join(reportRDEPS))
+        print('#################################')
+
+print ('The following files are repeated (contained in more than one package), please check which package should get it:')
+print (repeated)
+print('The following files contain wildcards, please check they are necessary')
+print(wildcards)
+print('The following files contain folders, please check they are necessary')
+print(hasfolders)
+
+# Sort it just so it looks nicer
+for key in new_manifest:
+    new_manifest[key]['files'].sort()
+    new_manifest[key]['cached'].sort()
+    new_manifest[key]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python3-manifest.json.new','w') as outfile:
+    json.dump(new_manifest,outfile,sort_keys=True, indent=4)
+    outfile.write('\n')
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py
new file mode 100644
index 0000000..fd12baa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -0,0 +1,146 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints 
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+    import os
+    # We DONT want the path on our HOST system
+    pivot='recipe-sysroot-native'
+    dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+    if '/usr/bin' in dep_path:
+        dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+    # Handle multilib, is there a better way?
+    if '/usr/lib32' in dep_path:
+        dep_path = dep_path.replace('/usr/lib32','${libdir}')
+    if '/usr/lib64' in dep_path:
+        dep_path = dep_path.replace('/usr/lib64','${libdir}')
+    if '/usr/lib' in dep_path:
+        dep_path = dep_path.replace('/usr/lib','${libdir}')
+    if '/usr/include' in dep_path:
+        dep_path = dep_path.replace('/usr/include','${includedir}')
+    if '__init__.' in dep_path:
+        dep_path =  os.path.split(dep_path)[0]
+    return dep_path
+
+
+# Module to import was passed as an argument
+current_module =  str(sys.argv[1]).rstrip()
+if(debug==True):
+    log = open('log_%s' % current_module,'w')
+    log.write('Module %s generated the following dependencies:\n' % current_module)
+try: 
+    importlib.import_module('%s' % current_module)
+except ImportError as e:
+    if (debug==True):
+        log.write('Module was not found')
+    pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+    dif = core_deps
+else:
+    # We know this is not the core package, so there must be a difference.
+    dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+    dep_path=''
+    try:
+        if (debug==True):
+            log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+        dep_path = sys.modules['%s' % item].__file__
+    except AttributeError as e:
+        # Deals with thread (builtin module) not having __file__ attribute
+        if debug==True:
+            log.write(item + ' ')
+            log.write(str(e))
+            log.write('\n')
+        pass
+    except NameError as e:
+        # Deals with NameError: name 'dep_path' is not defined
+        # because module is not found (wasn't compiled?), e.g. bddsm
+        if (debug==True):
+            log.write(item+' ') 
+            log.write(str(e))                                              
+        pass
+
+    # Site-customize is a special case since we (OpenEmbedded) put it there manually
+    if 'sitecustomize' in dep_path:
+        dep_path = '${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py'
+        # Prints out result, which is what will be used by create_manifest
+        print (dep_path)
+        continue
+
+    dep_path = fix_path(dep_path)
+
+    import sysconfig
+    soabi=sysconfig.get_config_var('SOABI')
+    # Check if its a shared library and deconstruct it
+    if soabi in dep_path:
+        if (debug==True):
+            log.write('Shared library found in %s' % dep_path)
+        dep_path = dep_path.replace(soabi,'*')
+        print (dep_path)
+        continue
+
+    if (debug==True):
+        log.write(dep_path+'\n')
+    # Prints out result, which is what will be used by create_manifest
+    print (dep_path)
+
+
+    import imp
+    cpython_tag = imp.get_tag() 
+    cached=''
+    # Theres no naive way to find *.pyc files on python3
+    try:
+        if (debug==True):
+            log.write('Calling: sys.modules[' + '%s' % item + '].__cached__\n')
+        cached = sys.modules['%s' % item].__cached__
+    except AttributeError as e:
+        # Deals with thread (builtin module) not having __cached__ attribute
+        if debug==True:
+            log.write(item + ' ')
+            log.write(str(e))
+            log.write('\n')
+        pass
+    except NameError as e:
+        # Deals with NameError: name 'cached' is not defined
+        if (debug==True):
+            log.write(item+' ') 
+            log.write(str(e))                                              
+        pass
+    if cached is not None:
+        if (debug==True):
+            log.write(cached)
+        cached = fix_path(cached)
+        cached = cached.replace(cpython_tag,'*')
+        print (cached)
+
+if debug==True:
+    log.close()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index 08c4403..cc35dc1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -25,10 +25,10 @@
  setup.py                         |  9 ++++-----
  12 files changed, 97 insertions(+), 23 deletions(-)
 
-diff --git a/Include/pythonrun.h b/Include/pythonrun.h
-index 9c2e813..2f79cb6 100644
---- a/Include/pythonrun.h
-+++ b/Include/pythonrun.h
+Index: Python-3.5.4/Include/pythonrun.h
+===================================================================
+--- Python-3.5.4.orig/Include/pythonrun.h
++++ Python-3.5.4/Include/pythonrun.h
 @@ -23,6 +23,9 @@ typedef struct {
  } PyCompilerFlags;
  #endif
@@ -39,10 +39,10 @@
  #ifndef Py_LIMITED_API
  PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
  PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
-diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
-index 67db007..b46b45b 100644
---- a/Lib/distutils/command/install.py
-+++ b/Lib/distutils/command/install.py
+Index: Python-3.5.4/Lib/distutils/command/install.py
+===================================================================
+--- Python-3.5.4.orig/Lib/distutils/command/install.py
++++ Python-3.5.4/Lib/distutils/command/install.py
 @@ -19,6 +19,8 @@ from site import USER_BASE
  from site import USER_SITE
  HAS_USER_SITE = True
@@ -52,20 +52,22 @@
  WINDOWS_SCHEME = {
      'purelib': '$base/Lib/site-packages',
      'platlib': '$base/Lib/site-packages',
-@@ -30,7 +32,7 @@ WINDOWS_SCHEME = {
+@@ -29,8 +31,8 @@ WINDOWS_SCHEME = {
+ 
  INSTALL_SCHEMES = {
      'unix_prefix': {
-         'purelib': '$base/lib/python$py_version_short/site-packages',
+-        'purelib': '$base/lib/python$py_version_short/site-packages',
 -        'platlib': '$platbase/lib/python$py_version_short/site-packages',
++        'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
 +        'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
          'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
          'scripts': '$base/bin',
          'data'   : '$base',
-diff --git a/Lib/pydoc.py b/Lib/pydoc.py
-index 3ca08c9..6528730 100755
---- a/Lib/pydoc.py
-+++ b/Lib/pydoc.py
-@@ -384,7 +384,7 @@ class Doc:
+Index: Python-3.5.4/Lib/pydoc.py
+===================================================================
+--- Python-3.5.4.orig/Lib/pydoc.py
++++ Python-3.5.4/Lib/pydoc.py
+@@ -389,7 +389,7 @@ class Doc:
      docmodule = docclass = docroutine = docother = docproperty = docdata = fail
  
      def getdocloc(self, object,
@@ -74,10 +76,10 @@
                                         "python%d.%d" %  sys.version_info[:2])):
          """Return the location of module docs or None"""
  
-diff --git a/Lib/site.py b/Lib/site.py
-index 3f78ef5..511931e 100644
---- a/Lib/site.py
-+++ b/Lib/site.py
+Index: Python-3.5.4/Lib/site.py
+===================================================================
+--- Python-3.5.4.orig/Lib/site.py
++++ Python-3.5.4/Lib/site.py
 @@ -303,12 +303,12 @@ def getsitepackages(prefixes=None):
          seen.add(prefix)
  
@@ -93,20 +95,21 @@
          if sys.platform == "darwin":
              # for framework builds *only* we add the standard Apple
              # locations.
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 9c34be0..3d1181a 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
+Index: Python-3.5.4/Lib/sysconfig.py
+===================================================================
+--- Python-3.5.4.orig/Lib/sysconfig.py
++++ Python-3.5.4/Lib/sysconfig.py
 @@ -20,10 +20,10 @@ __all__ = [
  
  _INSTALL_SCHEMES = {
      'posix_prefix': {
 -        'stdlib': '{installed_base}/lib/python{py_version_short}',
 -        'platstdlib': '{platbase}/lib/python{py_version_short}',
+-        'purelib': '{base}/lib/python{py_version_short}/site-packages',
+-        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
 +        'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}',
 +        'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
-         'purelib': '{base}/lib/python{py_version_short}/site-packages',
--        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++        'purelib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
 +        'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
          'include':
              '{installed_base}/include/python{py_version_short}{abiflags}',
@@ -117,10 +120,11 @@
      'posix_home': {
 -        'stdlib': '{installed_base}/lib/python',
 -        'platstdlib': '{base}/lib/python',
+-        'purelib': '{base}/lib/python',
+-        'platlib': '{base}/lib/python',
 +        'stdlib': '{installed_base}/'+sys.lib+'/python',
 +        'platstdlib': '{base}/'+sys.lib+'/python',
-         'purelib': '{base}/lib/python',
--        'platlib': '{base}/lib/python',
++        'purelib': '{base}/'+sys.lib+'/python',
 +        'platlib': '{base}/'+sys.lib+'/python',
          'include': '{installed_base}/include/python',
          'platinclude': '{installed_base}/include/python',
@@ -131,18 +135,19 @@
      'posix_user': {
 -        'stdlib': '{userbase}/lib/python{py_version_short}',
 -        'platstdlib': '{userbase}/lib/python{py_version_short}',
+-        'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+-        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
 +        'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
 +        'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
-         'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
--        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++        'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
 +        'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
          'include': '{userbase}/include/python{py_version_short}',
          'scripts': '{userbase}/bin',
          'data': '{userbase}',
-diff --git a/Lib/trace.py b/Lib/trace.py
-index f108266..7fd83f2 100755
---- a/Lib/trace.py
-+++ b/Lib/trace.py
+Index: Python-3.5.4/Lib/trace.py
+===================================================================
+--- Python-3.5.4.orig/Lib/trace.py
++++ Python-3.5.4/Lib/trace.py
 @@ -749,10 +749,10 @@ def main(argv=None):
                  # should I also call expanduser? (after all, could use $HOME)
  
@@ -156,11 +161,11 @@
                                             "python" + sys.version[:3]))
                  s = os.path.normpath(s)
                  ignore_dirs.append(s)
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 109f402..61a41e2 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -106,6 +106,8 @@ PY_CORE_CFLAGS=	$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARE
+Index: Python-3.5.4/Makefile.pre.in
+===================================================================
+--- Python-3.5.4.orig/Makefile.pre.in
++++ Python-3.5.4/Makefile.pre.in
+@@ -109,6 +109,8 @@ CFLAGS_ALIASING=@CFLAGS_ALIASING@
  
  # Machine-dependent subdirectories
  MACHDEP=	@MACHDEP@
@@ -169,7 +174,7 @@
  
  # Multiarch directory (may be empty)
  MULTIARCH=	@MULTIARCH@
-@@ -125,7 +127,7 @@ LIBDIR=		@libdir@
+@@ -128,7 +130,7 @@ LIBDIR=		@libdir@
  MANDIR=		@mandir@
  INCLUDEDIR=	@includedir@
  CONFINCLUDEDIR=	$(exec_prefix)/include
@@ -178,7 +183,7 @@
  ABIFLAGS=	@ABIFLAGS@
  
  # Detailed destination directories
-@@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
+@@ -731,6 +733,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
  		-DEXEC_PREFIX='"$(exec_prefix)"' \
  		-DVERSION='"$(VERSION)"' \
  		-DVPATH='"$(VPATH)"' \
@@ -186,8 +191,8 @@
  		-o $@ $(srcdir)/Modules/getpath.c
  
  Programs/python.o: $(srcdir)/Programs/python.c
-@@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -813,7 +816,7 @@ regen-opcode:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
  
  Python/getplatform.o: $(srcdir)/Python/getplatform.c
 -		$(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -195,10 +200,10 @@
  
  Python/importdl.o: $(srcdir)/Python/importdl.c
  		$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-diff --git a/Modules/getpath.c b/Modules/getpath.c
-index 18deb60..a01c3f8 100644
---- a/Modules/getpath.c
-+++ b/Modules/getpath.c
+Index: Python-3.5.4/Modules/getpath.c
+===================================================================
+--- Python-3.5.4.orig/Modules/getpath.c
++++ Python-3.5.4/Modules/getpath.c
 @@ -105,6 +105,13 @@
  #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
  #endif
@@ -230,10 +235,10 @@
  
      if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
          Py_FatalError(
-diff --git a/Python/getplatform.c b/Python/getplatform.c
-index 6899140..66a49c6 100644
---- a/Python/getplatform.c
-+++ b/Python/getplatform.c
+Index: Python-3.5.4/Python/getplatform.c
+===================================================================
+--- Python-3.5.4.orig/Python/getplatform.c
++++ Python-3.5.4/Python/getplatform.c
 @@ -10,3 +10,23 @@ Py_GetPlatform(void)
  {
  	return PLATFORM;
@@ -258,11 +263,11 @@
 +{
 +	return LIB;
 +}
-diff --git a/Python/sysmodule.c b/Python/sysmodule.c
-index 8d7e05a..d9dee0f 100644
---- a/Python/sysmodule.c
-+++ b/Python/sysmodule.c
-@@ -1790,6 +1790,10 @@ _PySys_Init(void)
+Index: Python-3.5.4/Python/sysmodule.c
+===================================================================
+--- Python-3.5.4.orig/Python/sysmodule.c
++++ Python-3.5.4/Python/sysmodule.c
+@@ -1827,6 +1827,10 @@ _PySys_Init(void)
                          PyUnicode_FromString(Py_GetCopyright()));
      SET_SYS_FROM_STRING("platform",
                          PyUnicode_FromString(Py_GetPlatform()));
@@ -273,11 +278,11 @@
      SET_SYS_FROM_STRING("executable",
                          PyUnicode_FromWideChar(
                                 Py_GetProgramFullPath(), -1));
-diff --git a/configure.ac b/configure.ac
-index 707324d..e8d59a3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -883,6 +883,41 @@ PLATDIR=plat-$MACHDEP
+Index: Python-3.5.4/configure.ac
+===================================================================
+--- Python-3.5.4.orig/configure.ac
++++ Python-3.5.4/configure.ac
+@@ -885,6 +885,41 @@ PLATDIR=plat-$MACHDEP
  AC_SUBST(PLATDIR)
  AC_SUBST(PLATFORM_TRIPLET)
  
@@ -319,11 +324,11 @@
  
  AC_MSG_CHECKING([for -Wl,--no-as-needed])
  save_LDFLAGS="$LDFLAGS"
-diff --git a/setup.py b/setup.py
-index 6d26deb..7b14215 100644
---- a/setup.py
-+++ b/setup.py
-@@ -495,7 +495,7 @@ class PyBuildExt(build_ext):
+Index: Python-3.5.4/setup.py
+===================================================================
+--- Python-3.5.4.orig/setup.py
++++ Python-3.5.4/setup.py
+@@ -494,7 +494,7 @@ class PyBuildExt(build_ext):
          # directories (i.e. '.' and 'Include') must be first.  See issue
          # 10520.
          if not cross_compiling:
@@ -332,7 +337,7 @@
              add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
          # only change this for cross builds for 3.3, issues on Mageia
          if cross_compiling:
-@@ -553,8 +553,7 @@ class PyBuildExt(build_ext):
+@@ -552,8 +552,7 @@ class PyBuildExt(build_ext):
          # be assumed that no additional -I,-L directives are needed.
          if not cross_compiling:
              lib_dirs = self.compiler.library_dirs + [
@@ -342,7 +347,7 @@
                  ]
              inc_dirs = self.compiler.include_dirs + ['/usr/include']
          else:
-@@ -746,11 +745,11 @@ class PyBuildExt(build_ext):
+@@ -745,11 +744,11 @@ class PyBuildExt(build_ext):
              elif curses_library:
                  readline_libs.append(curses_library)
              elif self.compiler.find_library_file(lib_dirs +
@@ -356,6 +361,3 @@
                                     extra_link_args=readline_extra_link_args,
                                     libraries=readline_libs) )
          else:
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json
new file mode 100644
index 0000000..2491f36
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -0,0 +1,1149 @@
+{
+    "2to3": {
+        "cached": [],
+        "files": [
+            "${bindir}/2to3-*",
+            "${libdir}/python3.5/lib2to3"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python automated Python 2 to 3 code translator"
+    },
+    "asyncio": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/asyncio",
+            "${libdir}/python3.5/concurrent",
+            "${libdir}/python3.5/concurrent/futures"
+        ],
+        "rdepends": [
+            "compression",
+            "core",
+            "crypt",
+            "io",
+            "logging",
+            "math",
+            "multiprocessing",
+            "netclient",
+            "pickle",
+            "shell",
+            "stringold",
+            "threading",
+            "unixadmin"
+        ],
+        "summary": "Python Asynchronous I/"
+    },
+    "audio": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/chunk.*.pyc",
+            "${libdir}/python3.5/__pycache__/sndhdr.*.pyc",
+            "${libdir}/python3.5/__pycache__/sunau.*.pyc",
+            "${libdir}/python3.5/__pycache__/wave.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/chunk.py",
+            "${libdir}/python3.5/lib-dynload/audioop.*.so",
+            "${libdir}/python3.5/lib-dynload/ossaudiodev.*.so",
+            "${libdir}/python3.5/sndhdr.py",
+            "${libdir}/python3.5/sunau.py",
+            "${libdir}/python3.5/wave.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Audio Handling"
+    },
+    "codecs": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/xdrlib.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/_multibytecodec.*.so",
+            "${libdir}/python3.5/xdrlib.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python codec"
+    },
+    "compile": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/compileall.*.pyc",
+            "${libdir}/python3.5/__pycache__/py_compile.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/compileall.py",
+            "${libdir}/python3.5/py_compile.py"
+        ],
+        "rdepends": [
+            "asyncio",
+            "compression",
+            "core",
+            "crypt",
+            "io",
+            "logging",
+            "math",
+            "multiprocessing",
+            "pickle",
+            "shell",
+            "stringold",
+            "threading",
+            "unixadmin"
+        ],
+        "summary": "Python bytecode compilation support"
+    },
+    "compression": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/_compression.*.pyc",
+            "${libdir}/python3.5/__pycache__/bz2.*.pyc",
+            "${libdir}/python3.5/__pycache__/gzip.*.pyc",
+            "${libdir}/python3.5/__pycache__/lzma.*.pyc",
+            "${libdir}/python3.5/__pycache__/tarfile.*.pyc",
+            "${libdir}/python3.5/__pycache__/zipfile.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/_compression.py",
+            "${libdir}/python3.5/bz2.py",
+            "${libdir}/python3.5/gzip.py",
+            "${libdir}/python3.5/lib-dynload/_bz2.*.so",
+            "${libdir}/python3.5/lib-dynload/_lzma.*.so",
+            "${libdir}/python3.5/lib-dynload/zlib.*.so",
+            "${libdir}/python3.5/lzma.py",
+            "${libdir}/python3.5/tarfile.py",
+            "${libdir}/python3.5/zipfile.py"
+        ],
+        "rdepends": [
+            "core",
+            "shell",
+            "unixadmin"
+        ],
+        "summary": "Python high-level compression support"
+    },
+    "core": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/__future__.*.pyc",
+            "${libdir}/python3.5/__pycache__/_bootlocale.*.pyc",
+            "${libdir}/python3.5/__pycache__/_collections_abc.*.pyc",
+            "${libdir}/python3.5/__pycache__/_markupbase.*.pyc",
+            "${libdir}/python3.5/__pycache__/_sitebuiltins.*.pyc",
+            "${libdir}/python3.5/__pycache__/_sysconfigdata.*.pyc",
+            "${libdir}/python3.5/__pycache__/_weakrefset.*.pyc",
+            "${libdir}/python3.5/__pycache__/abc.*.pyc",
+            "${libdir}/python3.5/__pycache__/argparse.*.pyc",
+            "${libdir}/python3.5/__pycache__/ast.*.pyc",
+            "${libdir}/python3.5/__pycache__/bisect.*.pyc",
+            "${libdir}/python3.5/__pycache__/code.*.pyc",
+            "${libdir}/python3.5/__pycache__/codecs.*.pyc",
+            "${libdir}/python3.5/__pycache__/codeop.*.pyc",
+            "${libdir}/python3.5/__pycache__/configparser.*.pyc",
+            "${libdir}/python3.5/__pycache__/contextlib.*.pyc",
+            "${libdir}/python3.5/__pycache__/copy.*.pyc",
+            "${libdir}/python3.5/__pycache__/copyreg.*.pyc",
+            "${libdir}/python3.5/__pycache__/csv.*.pyc",
+            "${libdir}/python3.5/__pycache__/dis.*.pyc",
+            "${libdir}/python3.5/__pycache__/enum.*.pyc",
+            "${libdir}/python3.5/__pycache__/functools.*.pyc",
+            "${libdir}/python3.5/__pycache__/genericpath.*.pyc",
+            "${libdir}/python3.5/__pycache__/getopt.*.pyc",
+            "${libdir}/python3.5/__pycache__/gettext.*.pyc",
+            "${libdir}/python3.5/__pycache__/heapq.*.pyc",
+            "${libdir}/python3.5/__pycache__/imp.*.pyc",
+            "${libdir}/python3.5/__pycache__/inspect.*.pyc",
+            "${libdir}/python3.5/__pycache__/io.*.pyc",
+            "${libdir}/python3.5/__pycache__/keyword.*.pyc",
+            "${libdir}/python3.5/__pycache__/linecache.*.pyc",
+            "${libdir}/python3.5/__pycache__/locale.*.pyc",
+            "${libdir}/python3.5/__pycache__/opcode.*.pyc",
+            "${libdir}/python3.5/__pycache__/operator.*.pyc",
+            "${libdir}/python3.5/__pycache__/optparse.*.pyc",
+            "${libdir}/python3.5/__pycache__/os.*.pyc",
+            "${libdir}/python3.5/__pycache__/platform.*.pyc",
+            "${libdir}/python3.5/__pycache__/posixpath.*.pyc",
+            "${libdir}/python3.5/__pycache__/re.*.pyc",
+            "${libdir}/python3.5/__pycache__/reprlib.*.pyc",
+            "${libdir}/python3.5/__pycache__/rlcompleter.*.pyc",
+            "${libdir}/python3.5/__pycache__/selectors.*.pyc",
+            "${libdir}/python3.5/__pycache__/signal.*.pyc",
+            "${libdir}/python3.5/__pycache__/site.*.pyc",
+            "${libdir}/python3.5/__pycache__/sre_compile.*.pyc",
+            "${libdir}/python3.5/__pycache__/sre_constants.*.pyc",
+            "${libdir}/python3.5/__pycache__/sre_parse.*.pyc",
+            "${libdir}/python3.5/__pycache__/stat.*.pyc",
+            "${libdir}/python3.5/__pycache__/stringprep.*.pyc",
+            "${libdir}/python3.5/__pycache__/struct.*.pyc",
+            "${libdir}/python3.5/__pycache__/subprocess.*.pyc",
+            "${libdir}/python3.5/__pycache__/symbol.*.pyc",
+            "${libdir}/python3.5/__pycache__/sysconfig.*.pyc",
+            "${libdir}/python3.5/__pycache__/textwrap.*.pyc",
+            "${libdir}/python3.5/__pycache__/threading.*.pyc",
+            "${libdir}/python3.5/__pycache__/token.*.pyc",
+            "${libdir}/python3.5/__pycache__/tokenize.*.pyc",
+            "${libdir}/python3.5/__pycache__/traceback.*.pyc",
+            "${libdir}/python3.5/__pycache__/types.*.pyc",
+            "${libdir}/python3.5/__pycache__/warnings.*.pyc",
+            "${libdir}/python3.5/__pycache__/weakref.*.pyc",
+            "${libdir}/python3.5/collections/__pycache__",
+            "${libdir}/python3.5/collections/__pycache__/abc.*.pyc",
+            "${libdir}/python3.5/encodings/__pycache__",
+            "${libdir}/python3.5/encodings/__pycache__/aliases.*.pyc",
+            "${libdir}/python3.5/encodings/__pycache__/latin_1.*.pyc",
+            "${libdir}/python3.5/encodings/__pycache__/utf_8.*.pyc",
+            "${libdir}/python3.5/importlib/__pycache__",
+            "${libdir}/python3.5/importlib/__pycache__/abc.*.pyc",
+            "${libdir}/python3.5/importlib/__pycache__/machinery.*.pyc",
+            "${libdir}/python3.5/importlib/__pycache__/util.*.pyc"
+        ],
+        "files": [
+            "${bindir}/python*[!-config]",
+            "${includedir}/python${PYTHON_BINABI}/pyconfig*.h",
+            "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py",
+            "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py",
+            "${libdir}/python${PYTHON_MAJMIN}/collections",
+            "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py",
+            "${libdir}/python3.5/UserDict.py",
+            "${libdir}/python3.5/UserList.py",
+            "${libdir}/python3.5/UserString.py",
+            "${libdir}/python3.5/__future__.py",
+            "${libdir}/python3.5/_abcoll.py",
+            "${libdir}/python3.5/_bootlocale.py",
+            "${libdir}/python3.5/_collections_abc.py",
+            "${libdir}/python3.5/_markupbase.py",
+            "${libdir}/python3.5/_sitebuiltins.py",
+            "${libdir}/python3.5/_sysconfigdata.py",
+            "${libdir}/python3.5/_weakrefset.py",
+            "${libdir}/python3.5/abc.py",
+            "${libdir}/python3.5/argparse.py",
+            "${libdir}/python3.5/ast.py",
+            "${libdir}/python3.5/bisect.py",
+            "${libdir}/python3.5/code.py",
+            "${libdir}/python3.5/codecs.py",
+            "${libdir}/python3.5/codeop.py",
+            "${libdir}/python3.5/collections",
+            "${libdir}/python3.5/collections/abc.py",
+            "${libdir}/python3.5/configparser.py",
+            "${libdir}/python3.5/contextlib.py",
+            "${libdir}/python3.5/copy.py",
+            "${libdir}/python3.5/copyreg.py",
+            "${libdir}/python3.5/csv.py",
+            "${libdir}/python3.5/dis.py",
+            "${libdir}/python3.5/encodings",
+            "${libdir}/python3.5/encodings/aliases.py",
+            "${libdir}/python3.5/encodings/latin_1.py",
+            "${libdir}/python3.5/encodings/utf_8.py",
+            "${libdir}/python3.5/enum.py",
+            "${libdir}/python3.5/functools.py",
+            "${libdir}/python3.5/genericpath.py",
+            "${libdir}/python3.5/getopt.py",
+            "${libdir}/python3.5/gettext.py",
+            "${libdir}/python3.5/heapq.py",
+            "${libdir}/python3.5/imp.py",
+            "${libdir}/python3.5/importlib",
+            "${libdir}/python3.5/importlib/_bootstrap.py",
+            "${libdir}/python3.5/importlib/_bootstrap_external.py",
+            "${libdir}/python3.5/importlib/abc.py",
+            "${libdir}/python3.5/importlib/machinery.py",
+            "${libdir}/python3.5/importlib/util.py",
+            "${libdir}/python3.5/inspect.py",
+            "${libdir}/python3.5/io.py",
+            "${libdir}/python3.5/keyword.py",
+            "${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so",
+            "${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so",
+            "${libdir}/python3.5/lib-dynload/__pycache__/time.*.so",
+            "${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so",
+            "${libdir}/python3.5/lib-dynload/_bisect.*.so",
+            "${libdir}/python3.5/lib-dynload/_csv.*.so",
+            "${libdir}/python3.5/lib-dynload/_heapq.*.so",
+            "${libdir}/python3.5/lib-dynload/_opcode.*.so",
+            "${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so",
+            "${libdir}/python3.5/lib-dynload/_struct.*.so",
+            "${libdir}/python3.5/lib-dynload/array.*.so",
+            "${libdir}/python3.5/lib-dynload/binascii.*.so",
+            "${libdir}/python3.5/lib-dynload/math.*.so",
+            "${libdir}/python3.5/lib-dynload/parser.*.so",
+            "${libdir}/python3.5/lib-dynload/readline.*.so",
+            "${libdir}/python3.5/lib-dynload/select.*.so",
+            "${libdir}/python3.5/lib-dynload/time.*.so",
+            "${libdir}/python3.5/lib-dynload/unicodedata.*.so",
+            "${libdir}/python3.5/lib-dynload/xreadlines.*.so",
+            "${libdir}/python3.5/linecache.py",
+            "${libdir}/python3.5/locale.py",
+            "${libdir}/python3.5/new.py",
+            "${libdir}/python3.5/opcode.py",
+            "${libdir}/python3.5/operator.py",
+            "${libdir}/python3.5/optparse.py",
+            "${libdir}/python3.5/os.py",
+            "${libdir}/python3.5/platform.py",
+            "${libdir}/python3.5/posixpath.py",
+            "${libdir}/python3.5/re.py",
+            "${libdir}/python3.5/reprlib.py",
+            "${libdir}/python3.5/rlcompleter.py",
+            "${libdir}/python3.5/selectors.py",
+            "${libdir}/python3.5/signal.py",
+            "${libdir}/python3.5/site.py",
+            "${libdir}/python3.5/sre_compile.py",
+            "${libdir}/python3.5/sre_constants.py",
+            "${libdir}/python3.5/sre_parse.py",
+            "${libdir}/python3.5/stat.py",
+            "${libdir}/python3.5/stringprep.py",
+            "${libdir}/python3.5/struct.py",
+            "${libdir}/python3.5/subprocess.py",
+            "${libdir}/python3.5/symbol.py",
+            "${libdir}/python3.5/sysconfig.py",
+            "${libdir}/python3.5/textwrap.py",
+            "${libdir}/python3.5/threading.py",
+            "${libdir}/python3.5/token.py",
+            "${libdir}/python3.5/tokenize.py",
+            "${libdir}/python3.5/traceback.py",
+            "${libdir}/python3.5/types.py",
+            "${libdir}/python3.5/warnings.py",
+            "${libdir}/python3.5/weakref.py"
+        ],
+        "rdepends": [],
+        "summary": "Python interpreter and core modules"
+    },
+    "crypt": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/crypt.*.pyc",
+            "${libdir}/python3.5/__pycache__/hashlib.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/crypt.py",
+            "${libdir}/python3.5/hashlib.py",
+            "${libdir}/python3.5/lib-dynload/_crypt.*.so",
+            "${libdir}/python3.5/lib-dynload/_hashlib.*.so",
+            "${libdir}/python3.5/lib-dynload/_sha256.*.so",
+            "${libdir}/python3.5/lib-dynload/_sha512.*.so"
+        ],
+        "rdepends": [
+            "core",
+            "math",
+            "stringold"
+        ],
+        "summary": "Python basic cryptographic and hashing support"
+    },
+    "ctypes": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/ctypes",
+            "${libdir}/python3.5/lib-dynload/_ctypes.*.so",
+            "${libdir}/python3.5/lib-dynload/_ctypes_test.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python C types support"
+    },
+    "curses": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/curses",
+            "${libdir}/python3.5/lib-dynload/_curses.*.so",
+            "${libdir}/python3.5/lib-dynload/_curses_panel.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python curses support"
+    },
+    "datetime": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/_strptime.*.pyc",
+            "${libdir}/python3.5/__pycache__/calendar.*.pyc",
+            "${libdir}/python3.5/__pycache__/datetime.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/_strptime.py",
+            "${libdir}/python3.5/calendar.py",
+            "${libdir}/python3.5/datetime.py",
+            "${libdir}/python3.5/lib-dynload/_datetime.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python calendar and time support"
+    },
+    "db": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/dbm",
+            "${libdir}/python3.5/lib-dynload/_dbm.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python file-based database support"
+    },
+    "debugger": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/bdb.*.pyc",
+            "${libdir}/python3.5/__pycache__/pdb.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/bdb.py",
+            "${libdir}/python3.5/pdb.py"
+        ],
+        "rdepends": [
+            "core",
+            "pprint",
+            "shell",
+            "stringold"
+        ],
+        "summary": "Python debugger"
+    },
+    "dev": {
+        "cached": [],
+        "files": [
+            "${base_libdir}/*.a",
+            "${base_libdir}/*.o",
+            "${bindir}/python*-config",
+            "${datadir}/aclocal",
+            "${datadir}/pkgconfig",
+            "${includedir}",
+            "${libdir}/*.a",
+            "${libdir}/*.la",
+            "${libdir}/*.o",
+            "${libdir}/lib*${SOLIBSDEV}",
+            "${libdir}/pkgconfig",
+            "${libdir}/python3.5/config*/Makefile",
+            "${libdir}/python3.5/config*/Makefile/__pycache__"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python development package"
+    },
+    "difflib": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/difflib.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/difflib.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python helpers for computing deltas between objects"
+    },
+    "distutils": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/distutils"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Distribution Utilities"
+    },
+    "distutils-staticdev": {
+        "cached": [
+            "${libdir}/python3.5/config/__pycache__/lib*.a"
+        ],
+        "files": [
+            "${libdir}/python3.5/config/lib*.a"
+        ],
+        "rdepends": [
+            "distutils"
+        ],
+        "summary": "Python distribution utilities (static libraries)"
+    },
+    "doctest": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/doctest.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/doctest.py"
+        ],
+        "rdepends": [
+            "core",
+            "debugger",
+            "difflib",
+            "logging",
+            "pprint",
+            "shell",
+            "stringold",
+            "unittest"
+        ],
+        "summary": "Python framework for running examples in docstrings"
+    },
+    "email": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/imaplib.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/email",
+            "${libdir}/python3.5/imaplib.py"
+        ],
+        "rdepends": [
+            "core",
+            "crypt",
+            "datetime",
+            "io",
+            "math",
+            "netclient"
+        ],
+        "summary": "Python email support"
+    },
+    "fcntl": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/fcntl.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python's fcntl interface"
+    },
+    "gdbm": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/_gdbm.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python GNU database support"
+    },
+    "html": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/formatter.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/formatter.py",
+            "${libdir}/python3.5/html"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python HTML processing support"
+    },
+    "idle": {
+        "cached": [],
+        "files": [
+            "${bindir}/idle*",
+            "${libdir}/python3.5/idlelib"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Integrated Development Environment"
+    },
+    "image": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/colorsys.*.pyc",
+            "${libdir}/python3.5/__pycache__/imghdr.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/colorsys.py",
+            "${libdir}/python3.5/imghdr.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python graphical image handling"
+    },
+    "io": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/_pyio.*.pyc",
+            "${libdir}/python3.5/__pycache__/ipaddress.*.pyc",
+            "${libdir}/python3.5/__pycache__/pipes.*.pyc",
+            "${libdir}/python3.5/__pycache__/socket.*.pyc",
+            "${libdir}/python3.5/__pycache__/ssl.*.pyc",
+            "${libdir}/python3.5/__pycache__/tempfile.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/_pyio.py",
+            "${libdir}/python3.5/ipaddress.py",
+            "${libdir}/python3.5/lib-dynload/_socket.*.so",
+            "${libdir}/python3.5/lib-dynload/_ssl.*.so",
+            "${libdir}/python3.5/lib-dynload/termios.*.so",
+            "${libdir}/python3.5/pipes.py",
+            "${libdir}/python3.5/socket.py",
+            "${libdir}/python3.5/ssl.py",
+            "${libdir}/python3.5/tempfile.py"
+        ],
+        "rdepends": [
+            "compression",
+            "core",
+            "crypt",
+            "math",
+            "netclient",
+            "shell",
+            "unixadmin"
+        ],
+        "summary": "Python low-level I/O"
+    },
+    "json": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/json",
+            "${libdir}/python3.5/lib-dynload/_json.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python JSON support"
+    },
+    "logging": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/logging"
+        ],
+        "rdepends": [
+            "core",
+            "stringold"
+        ],
+        "summary": "Python logging support"
+    },
+    "mailbox": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/mailbox.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/mailbox.py"
+        ],
+        "rdepends": [
+            "core",
+            "crypt",
+            "datetime",
+            "email",
+            "fcntl",
+            "io",
+            "math",
+            "mime",
+            "netclient",
+            "stringold"
+        ],
+        "summary": "Python mailbox format support"
+    },
+    "math": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/random.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/_random.*.so",
+            "${libdir}/python3.5/lib-dynload/cmath.*.so",
+            "${libdir}/python3.5/random.py"
+        ],
+        "rdepends": [
+            "core",
+            "crypt"
+        ],
+        "summary": "Python math support"
+    },
+    "mime": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/quopri.*.pyc",
+            "${libdir}/python3.5/__pycache__/uu.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/quopri.py",
+            "${libdir}/python3.5/uu.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python MIME handling APIs"
+    },
+    "mmap": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/mmap.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python memory-mapped file support"
+    },
+    "modules": {
+        "cached": [],
+        "files": [],
+        "rdepends": [
+            "2to3",
+            "asyncio",
+            "audio",
+            "codecs",
+            "compile",
+            "compression",
+            "core",
+            "crypt",
+            "ctypes",
+            "curses",
+            "datetime",
+            "db",
+            "debugger",
+            "difflib",
+            "distutils",
+            "doctest",
+            "email",
+            "fcntl",
+            "html",
+            "idle",
+            "image",
+            "io",
+            "json",
+            "logging",
+            "mailbox",
+            "math",
+            "mime",
+            "mmap",
+            "multiprocessing",
+            "netclient",
+            "netserver",
+            "numbers",
+            "pickle",
+            "pkgutil",
+            "plistlib",
+            "pprint",
+            "profile",
+            "pydoc",
+            "resource",
+            "runpy",
+            "shell",
+            "smtpd",
+            "sqlite3",
+            "stringold",
+            "syslog",
+            "terminal",
+            "threading",
+            "tkinter",
+            "typing",
+            "unittest",
+            "unixadmin",
+            "xml",
+            "xmlrpc"
+        ],
+        "summary": "All Python modules"
+    },
+    "multiprocessing": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/_multiprocessing.*.so",
+            "${libdir}/python3.5/multiprocessing"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python multiprocessing support"
+    },
+    "netclient": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/base64.*.pyc",
+            "${libdir}/python3.5/__pycache__/ftplib.*.pyc",
+            "${libdir}/python3.5/__pycache__/hmac.*.pyc",
+            "${libdir}/python3.5/__pycache__/mimetypes.*.pyc",
+            "${libdir}/python3.5/__pycache__/nntplib.*.pyc",
+            "${libdir}/python3.5/__pycache__/poplib.*.pyc",
+            "${libdir}/python3.5/__pycache__/smtplib.*.pyc",
+            "${libdir}/python3.5/__pycache__/telnetlib.*.pyc",
+            "${libdir}/python3.5/__pycache__/uuid.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/base64.py",
+            "${libdir}/python3.5/ftplib.py",
+            "${libdir}/python3.5/hmac.py",
+            "${libdir}/python3.5/http",
+            "${libdir}/python3.5/http/__pycache__",
+            "${libdir}/python3.5/mimetypes.py",
+            "${libdir}/python3.5/nntplib.py",
+            "${libdir}/python3.5/poplib.py",
+            "${libdir}/python3.5/smtplib.py",
+            "${libdir}/python3.5/telnetlib.py",
+            "${libdir}/python3.5/urllib",
+            "${libdir}/python3.5/urllib/__pycache__",
+            "${libdir}/python3.5/uuid.py"
+        ],
+        "rdepends": [
+            "compression",
+            "core",
+            "crypt",
+            "ctypes",
+            "datetime",
+            "email",
+            "io",
+            "math",
+            "mime",
+            "shell",
+            "stringold",
+            "unixadmin"
+        ],
+        "summary": "Python Internet Protocol clients"
+    },
+    "netserver": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/cgi.*.pyc",
+            "${libdir}/python3.5/__pycache__/socketserver.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/cgi.py",
+            "${libdir}/python3.5/socketserver.py"
+        ],
+        "rdepends": [
+            "compression",
+            "core",
+            "crypt",
+            "datetime",
+            "email",
+            "html",
+            "io",
+            "math",
+            "mime",
+            "netclient",
+            "shell",
+            "stringold",
+            "unixadmin"
+        ],
+        "summary": "Python Internet Protocol servers"
+    },
+    "numbers": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/_pydecimal.*.pyc",
+            "${libdir}/python3.5/__pycache__/decimal.*.pyc",
+            "${libdir}/python3.5/__pycache__/fractions.*.pyc",
+            "${libdir}/python3.5/__pycache__/numbers.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/_pydecimal.py",
+            "${libdir}/python3.5/decimal.py",
+            "${libdir}/python3.5/fractions.py",
+            "${libdir}/python3.5/lib-dynload/_decimal.*.so",
+            "${libdir}/python3.5/numbers.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python number APIs"
+    },
+    "pickle": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/_compat_pickle.*.pyc",
+            "${libdir}/python3.5/__pycache__/pickle.*.pyc",
+            "${libdir}/python3.5/__pycache__/pickletools.*.pyc",
+            "${libdir}/python3.5/__pycache__/shelve.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/_compat_pickle.py",
+            "${libdir}/python3.5/lib-dynload/_pickle.*.so",
+            "${libdir}/python3.5/pickle.py",
+            "${libdir}/python3.5/pickletools.py",
+            "${libdir}/python3.5/shelve.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python serialisation/persistence support"
+    },
+    "pkgutil": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/pkgutil.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/pkgutil.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python package extension utility support"
+    },
+    "plistlib": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/plistlib.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/plistlib.py"
+        ],
+        "rdepends": [
+            "core",
+            "datetime",
+            "xml"
+        ],
+        "summary": "Generate and parse Mac OS X .plist files"
+    },
+    "pprint": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/pprint.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/pprint.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python pretty-print support"
+    },
+    "profile": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/cProfile.*.pyc",
+            "${libdir}/python3.5/__pycache__/profile.*.pyc",
+            "${libdir}/python3.5/__pycache__/pstats.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/cProfile.py",
+            "${libdir}/python3.5/lib-dynload/_lsprof.*.so",
+            "${libdir}/python3.5/profile.py",
+            "${libdir}/python3.5/pstats.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python basic performance profiling support"
+    },
+    "pydoc": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/pydoc.*.pyc"
+        ],
+        "files": [
+            "${bindir}/pydoc*",
+            "${libdir}/python3.5/pydoc.py",
+            "${libdir}/python3.5/pydoc_data"
+        ],
+        "rdepends": [
+            "core",
+            "netclient",
+            "pkgutil"
+        ],
+        "summary": "Python interactive help support"
+    },
+    "resource": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/resource.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python resource control interface"
+    },
+    "runpy": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/runpy.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/runpy.py"
+        ],
+        "rdepends": [
+            "core",
+            "pkgutil"
+        ],
+        "summary": "Python helper for locating/executing scripts in module namespace"
+    },
+    "shell": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/cmd.*.pyc",
+            "${libdir}/python3.5/__pycache__/fnmatch.*.pyc",
+            "${libdir}/python3.5/__pycache__/glob.*.pyc",
+            "${libdir}/python3.5/__pycache__/shlex.*.pyc",
+            "${libdir}/python3.5/__pycache__/shutil.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/cmd.py",
+            "${libdir}/python3.5/fnmatch.py",
+            "${libdir}/python3.5/glob.py",
+            "${libdir}/python3.5/shlex.py",
+            "${libdir}/python3.5/shutil.py"
+        ],
+        "rdepends": [
+            "compression",
+            "core",
+            "stringold",
+            "unixadmin"
+        ],
+        "summary": "Python shell-like functionality"
+    },
+    "smtpd": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/asynchat.*.pyc",
+            "${libdir}/python3.5/__pycache__/asyncore.*.pyc",
+            "${libdir}/python3.5/__pycache__/smtpd.*.pyc"
+        ],
+        "files": [
+            "${bindir}/smtpd.py",
+            "${libdir}/python3.5/asynchat.py",
+            "${libdir}/python3.5/asyncore.py",
+            "${libdir}/python3.5/smtpd.py"
+        ],
+        "rdepends": [
+            "core",
+            "crypt",
+            "datetime",
+            "email",
+            "io",
+            "math",
+            "mime",
+            "netclient",
+            "stringold"
+        ],
+        "summary": "Python Simple Mail Transport Daemon"
+    },
+    "sqlite3": {
+        "cached": [
+            "${libdir}/python3.5/sqlite3/__pycache__",
+            "${libdir}/python3.5/sqlite3/__pycache__/dbapi2.*.pyc",
+            "${libdir}/python3.5/sqlite3/__pycache__/dump.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/_sqlite3.*.so",
+            "${libdir}/python3.5/sqlite3/dbapi2.py",
+            "${libdir}/python3.5/sqlite3/dump.py"
+        ],
+        "rdepends": [
+            "core",
+            "datetime"
+        ],
+        "summary": "Python Sqlite3 database support"
+    },
+    "sqlite3-tests": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/sqlite3/test"
+        ],
+        "rdepends": [
+            "core",
+            "tests"
+        ],
+        "summary": "Python Sqlite3 database support tests"
+    },
+    "stringold": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/string.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/string.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python string APIs [deprecated]"
+    },
+    "syslog": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/syslog.*.so"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python syslog interface"
+    },
+    "terminal": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/pty.*.pyc",
+            "${libdir}/python3.5/__pycache__/tty.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/pty.py",
+            "${libdir}/python3.5/tty.py"
+        ],
+        "rdepends": [
+            "core",
+            "io"
+        ],
+        "summary": "Python terminal controlling support"
+    },
+    "tests": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/test"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python tests"
+    },
+    "threading": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/_dummy_thread.*.pyc",
+            "${libdir}/python3.5/__pycache__/_threading_local.*.pyc",
+            "${libdir}/python3.5/__pycache__/dummy_threading.*.pyc",
+            "${libdir}/python3.5/__pycache__/queue.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/_dummy_thread.py",
+            "${libdir}/python3.5/_threading_local.py",
+            "${libdir}/python3.5/dummy_threading.py",
+            "${libdir}/python3.5/queue.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python threading & synchronization support"
+    },
+    "tkinter": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/tkinter"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python Tcl/Tk bindings"
+    },
+    "typing": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/typing.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/typing.py"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python typing support"
+    },
+    "unittest": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/unittest",
+            "${libdir}/python3.5/unittest/",
+            "${libdir}/python3.5/unittest/__pycache__"
+        ],
+        "rdepends": [
+            "core",
+            "difflib",
+            "logging",
+            "pprint",
+            "shell",
+            "stringold"
+        ],
+        "summary": "Python unit testing framework"
+    },
+    "unixadmin": {
+        "cached": [
+            "${libdir}/python3.5/__pycache__/getpass.*.pyc"
+        ],
+        "files": [
+            "${libdir}/python3.5/getpass.py",
+            "${libdir}/python3.5/lib-dynload/grp.*.so",
+            "${libdir}/python3.5/lib-dynload/nis.*.so"
+        ],
+        "rdepends": [
+            "core",
+            "io"
+        ],
+        "summary": "Python Unix administration support"
+    },
+    "xml": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/lib-dynload/_elementtree.*.so",
+            "${libdir}/python3.5/lib-dynload/pyexpat.*.so",
+            "${libdir}/python3.5/xml"
+        ],
+        "rdepends": [
+            "core"
+        ],
+        "summary": "Python basic XML support"
+    },
+    "xmlrpc": {
+        "cached": [],
+        "files": [
+            "${libdir}/python3.5/xmlrpc",
+            "${libdir}/python3.5/xmlrpc/__pycache__"
+        ],
+        "rdepends": [
+            "core",
+            "xml"
+        ],
+        "summary": "Python XML-RPC support"
+    }
+}
\ No newline at end of file
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
deleted file mode 100644
index 2bc8b8c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 43238e1ac13e32984d015c92a5841f3de1fe1d15 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Tue, 18 Nov 2014 00:07:07 -0500
-Subject: [PATCH] setup.py: no host headers libs
-
-When we are cross-compiling, setup.py should never look in /usr
-or /usr/local to find headers or libraries.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- setup.py | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index f020b28..e8339cd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -444,10 +444,7 @@ class PyBuildExt(build_ext):
-         if not cross_compiling:
-             add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
-             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
--        # only change this for cross builds for 3.3, issues on Mageia
--        if cross_compiling:
-             self.add_gcc_paths()
--        if not cross_compiling:
-             self.add_multiarch_paths()
- 
-         # Add paths specified in the environment variables LDFLAGS and
--- 
-2.0.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index 74490d9..a4f8bd4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -10,11 +10,11 @@
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/configure.ac b/configure.ac
-index 989baf9..2890c96 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -67,7 +67,7 @@ if test "$cross_compiling" = yes; then
+Index: Python-3.5.4/configure.ac
+===================================================================
+--- Python-3.5.4.orig/configure.ac
++++ Python-3.5.4/configure.ac
+@@ -73,7 +73,7 @@ if test "$cross_compiling" = yes; then
  	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
  	fi
          AC_MSG_RESULT($interp)
@@ -23,6 +23,3 @@
      fi
  elif test "$cross_compiling" = maybe; then
      AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
--- 
-2.0.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch
new file mode 100644
index 0000000..36b9d9d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch
@@ -0,0 +1,25 @@
+python3-native: run regen-importlib target correctly
+
+regen-importlib depends on other regen- targets, so we must be sure to
+run it after (most of) the others.  In reality, we do not need to run it
+at all since "make" will invoke it, if necessary.  We do not want to
+rely on that, though.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -709,7 +709,8 @@ regen-importlib: Programs/_freeze_import
+ ############################################################################
+ # Regenerate all generated files
+ 
+-regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast regen-importlib
++regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast
++	$(MAKE) regen-importlib
+ 
+ ############################################################################
+ # Special rules for object files
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
deleted file mode 100644
index f26bd38..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Patch setup.py so that the detect_modules() function looks for required
-libraries and headers in STAGING_LIBDIR / STAGING_INCDIR.
-
-Without this patch, several extension modules are not built, even though
-their dependencies are present in the compiler's search paths.
-The result is the following warning, and ultimately incomplete packages:
-
-| The necessary bits to build these optional modules were not found:
-| _bz2                  _curses_panel         _dbm
-| _gdbm                 _lzma                 _sqlite3
-| nis                   readline              zlib
-| To find the necessary bits, look in setup.py in detect_modules() for the module's name.
-
-Upstream-Status:  Inappropriate [Cross compile specific]
-
-Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
-
-Index: Python-3.4.3/setup.py
-===================================================================
---- Python-3.4.3.orig/setup.py
-+++ Python-3.4.3/setup.py
-@@ -521,6 +521,8 @@ class PyBuildExt(build_ext):
-         else:
-             lib_dirs = self.compiler.library_dirs[:]
-             inc_dirs = self.compiler.include_dirs[:]
-+            lib_dirs.append(os.environ.get('STAGING_LIBDIR'))
-+            inc_dirs.append(os.environ.get('STAGING_INCDIR'))
-         exts = []
-         missing = []
- 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
index de07643..c89d9a3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
@@ -17,12 +17,12 @@
  Lib/sysconfig.py           |    5 ++++-
  2 files changed, 8 insertions(+), 2 deletions(-)
 
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index a545ab9..74317d1 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -554,7 +554,10 @@ def get_config_vars(*args):
-         _config_vars['exec_prefix'] = EXEC_PREFIX
+Index: Python-3.5.3/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-3.5.3.orig/Lib/distutils/sysconfig.py
++++ Python-3.5.3/Lib/distutils/sysconfig.py
+@@ -498,7 +498,10 @@ def get_config_vars(*args):
+             _config_vars['SO'] = SO
  
          # Always convert srcdir to an absolute path
 -        srcdir = _config_vars.get('srcdir', project_base)
@@ -33,11 +33,11 @@
          if os.name == 'posix':
              if python_build:
                  # If srcdir is a relative path (typically '.' or '..')
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 7287f11..cc92998 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
-@@ -562,7 +562,10 @@ def get_config_vars(*args):
+Index: Python-3.5.3/Lib/sysconfig.py
+===================================================================
+--- Python-3.5.3.orig/Lib/sysconfig.py
++++ Python-3.5.3/Lib/sysconfig.py
+@@ -544,7 +544,10 @@ def get_config_vars(*args):
          _CONFIG_VARS['userbase'] = _getuserbase()
  
          # Always convert srcdir to an absolute path
@@ -49,6 +49,3 @@
          if os.name == 'posix':
              if _PYTHON_BUILD:
                  # If srcdir is a relative path (typically '.' or '..')
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch
deleted file mode 100644
index 9b40e8a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch
+++ /dev/null
@@ -1,703 +0,0 @@
-From 035ba5da3e53e45c712b39fe1f6fb743e697c032 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner@gmail.com>
-Date: Mon, 9 Jan 2017 11:18:53 +0100
-Subject: [PATCH] Issue #29157: Prefer getrandom() over getentropy()
-
-Copy and then adapt Python/random.c from default branch. Difference between 3.5
-and default branches:
-
-* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK
-* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and
-  remembers that getrandom() doesn't work.
-* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
-  works in non-blocking mode on Python 3.5
-
-Upstream-Status: Backport [https://github.com/python/cpython/commit/035ba5da3e53e45c712b39fe1f6fb743e697c032]
-Signed-off-by: Alexander Kanavin <alexander.kanavin@intel.com>
-
----
- Python/random.c | 494 +++++++++++++++++++++++++++++++++-----------------------
- 1 file changed, 294 insertions(+), 200 deletions(-)
-
-diff --git a/Python/random.c b/Python/random.c
-index d203939..31f61d0 100644
---- a/Python/random.c
-+++ b/Python/random.c
-@@ -1,6 +1,9 @@
- #include "Python.h"
- #ifdef MS_WINDOWS
- #  include <windows.h>
-+/* All sample MSDN wincrypt programs include the header below. It is at least
-+ * required with Min GW. */
-+#  include <wincrypt.h>
- #else
- #  include <fcntl.h>
- #  ifdef HAVE_SYS_STAT_H
-@@ -37,10 +40,9 @@ win32_urandom_init(int raise)
-     return 0;
- 
- error:
--    if (raise)
-+    if (raise) {
-         PyErr_SetFromWindowsErr(0);
--    else
--        Py_FatalError("Failed to initialize Windows random API (CryptoGen)");
-+    }
-     return -1;
- }
- 
-@@ -53,8 +55,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- 
-     if (hCryptProv == 0)
-     {
--        if (win32_urandom_init(raise) == -1)
-+        if (win32_urandom_init(raise) == -1) {
-             return -1;
-+        }
-     }
- 
-     while (size > 0)
-@@ -63,11 +66,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
-         if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer))
-         {
-             /* CryptGenRandom() failed */
--            if (raise)
-+            if (raise) {
-                 PyErr_SetFromWindowsErr(0);
--            else
--                Py_FatalError("Failed to initialized the randomized hash "
--                        "secret using CryptoGen)");
-+            }
-             return -1;
-         }
-         buffer += chunk;
-@@ -76,58 +77,23 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
-     return 0;
- }
- 
--/* Issue #25003: Don't use getentropy() on Solaris (available since
-- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
--#elif defined(HAVE_GETENTROPY) && !defined(sun)
--#define PY_GETENTROPY 1
--
--/* Fill buffer with size pseudo-random bytes generated by getentropy().
--   Return 0 on success, or raise an exception and return -1 on error.
--
--   If fatal is nonzero, call Py_FatalError() instead of raising an exception
--   on error. */
--static int
--py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
--{
--    while (size > 0) {
--        Py_ssize_t len = Py_MIN(size, 256);
--        int res;
--
--        if (!fatal) {
--            Py_BEGIN_ALLOW_THREADS
--            res = getentropy(buffer, len);
--            Py_END_ALLOW_THREADS
--
--            if (res < 0) {
--                PyErr_SetFromErrno(PyExc_OSError);
--                return -1;
--            }
--        }
--        else {
--            res = getentropy(buffer, len);
--            if (res < 0)
--                Py_FatalError("getentropy() failed");
--        }
--
--        buffer += len;
--        size -= len;
--    }
--    return 0;
--}
--
--#else
-+#else /* !MS_WINDOWS */
- 
- #if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL)
- #define PY_GETRANDOM 1
- 
--/* Call getrandom()
-+/* Call getrandom() to get random bytes:
-+
-    - Return 1 on success
--   - Return 0 if getrandom() syscall is not available (failed with ENOSYS or
--     EPERM) or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom
--     not initialized yet) and raise=0.
-+   - Return 0 if getrandom() is not available (failed with ENOSYS or EPERM),
-+     or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom not
-+     initialized yet).
-    - Raise an exception (if raise is non-zero) and return -1 on error:
--     getrandom() failed with EINTR and the Python signal handler raised an
--     exception, or getrandom() failed with a different error. */
-+     if getrandom() failed with EINTR, raise is non-zero and the Python signal
-+     handler raised an exception, or if getrandom() failed with a different
-+     error.
-+
-+   getrandom() is retried if it failed with EINTR: interrupted by a signal. */
- static int
- py_getrandom(void *buffer, Py_ssize_t size, int raise)
- {
-@@ -142,16 +108,19 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
-      * see https://bugs.python.org/issue26839. To avoid this, use the
-      * GRND_NONBLOCK flag. */
-     const int flags = GRND_NONBLOCK;
-+    char *dest;
-     long n;
- 
-     if (!getrandom_works) {
-         return 0;
-     }
- 
-+    dest = buffer;
-     while (0 < size) {
- #ifdef sun
-         /* Issue #26735: On Solaris, getrandom() is limited to returning up
--           to 1024 bytes */
-+           to 1024 bytes. Call it multiple times if more bytes are
-+           requested. */
-         n = Py_MIN(size, 1024);
- #else
-         n = Py_MIN(size, LONG_MAX);
-@@ -161,34 +130,35 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
- #ifdef HAVE_GETRANDOM
-         if (raise) {
-             Py_BEGIN_ALLOW_THREADS
--            n = getrandom(buffer, n, flags);
-+            n = getrandom(dest, n, flags);
-             Py_END_ALLOW_THREADS
-         }
-         else {
--            n = getrandom(buffer, n, flags);
-+            n = getrandom(dest, n, flags);
-         }
- #else
-         /* On Linux, use the syscall() function because the GNU libc doesn't
--         * expose the Linux getrandom() syscall yet. See:
--         * https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
-+           expose the Linux getrandom() syscall yet. See:
-+           https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
-         if (raise) {
-             Py_BEGIN_ALLOW_THREADS
--            n = syscall(SYS_getrandom, buffer, n, flags);
-+            n = syscall(SYS_getrandom, dest, n, flags);
-             Py_END_ALLOW_THREADS
-         }
-         else {
--            n = syscall(SYS_getrandom, buffer, n, flags);
-+            n = syscall(SYS_getrandom, dest, n, flags);
-         }
- #endif
- 
-         if (n < 0) {
--            /* ENOSYS: getrandom() syscall not supported by the kernel (but
--             * maybe supported by the host which built Python). EPERM:
--             * getrandom() syscall blocked by SECCOMP or something else. */
-+            /* ENOSYS: the syscall is not supported by the kernel.
-+               EPERM: the syscall is blocked by a security policy (ex: SECCOMP)
-+               or something else. */
-             if (errno == ENOSYS || errno == EPERM) {
-                 getrandom_works = 0;
-                 return 0;
-             }
-+
-             if (errno == EAGAIN) {
-                 /* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system
-                    urandom is not initialiazed yet. In this case, fall back on
-@@ -202,169 +172,225 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
-             }
- 
-             if (errno == EINTR) {
--                if (PyErr_CheckSignals()) {
--                    if (!raise) {
--                        Py_FatalError("getrandom() interrupted by a signal");
-+                if (raise) {
-+                    if (PyErr_CheckSignals()) {
-+                        return -1;
-                     }
--                    return -1;
-                 }
- 
--                /* retry getrandom() */
-+                /* retry getrandom() if it was interrupted by a signal */
-                 continue;
-             }
- 
-             if (raise) {
-                 PyErr_SetFromErrno(PyExc_OSError);
-             }
--            else {
--                Py_FatalError("getrandom() failed");
--            }
-             return -1;
-         }
- 
--        buffer += n;
-+        dest += n;
-         size -= n;
-     }
-     return 1;
- }
--#endif
- 
--static struct {
--    int fd;
--    dev_t st_dev;
--    ino_t st_ino;
--} urandom_cache = { -1 };
-+#elif defined(HAVE_GETENTROPY)
-+#define PY_GETENTROPY 1
- 
-+/* Fill buffer with size pseudo-random bytes generated by getentropy():
- 
--/* Read 'size' random bytes from py_getrandom(). Fall back on reading from
--   /dev/urandom if getrandom() is not available.
-+   - Return 1 on success
-+   - Return 0 if getentropy() syscall is not available (failed with ENOSYS or
-+     EPERM).
-+   - Raise an exception (if raise is non-zero) and return -1 on error:
-+     if getentropy() failed with EINTR, raise is non-zero and the Python signal
-+     handler raised an exception, or if getentropy() failed with a different
-+     error.
- 
--   Call Py_FatalError() on error. */
--static void
--dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size)
-+   getentropy() is retried if it failed with EINTR: interrupted by a signal. */
-+static int
-+py_getentropy(char *buffer, Py_ssize_t size, int raise)
- {
--    int fd;
--    Py_ssize_t n;
-+    /* Is getentropy() supported by the running kernel? Set to 0 if
-+       getentropy() failed with ENOSYS or EPERM. */
-+    static int getentropy_works = 1;
- 
--    assert (0 < size);
--
--#ifdef PY_GETRANDOM
--    if (py_getrandom(buffer, size, 0) == 1) {
--        return;
-+    if (!getentropy_works) {
-+        return 0;
-     }
--    /* getrandom() failed with ENOSYS or EPERM,
--       fall back on reading /dev/urandom */
--#endif
- 
--    fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
--    if (fd < 0) {
--        Py_FatalError("Failed to open /dev/urandom");
--    }
-+    while (size > 0) {
-+        /* getentropy() is limited to returning up to 256 bytes. Call it
-+           multiple times if more bytes are requested. */
-+        Py_ssize_t len = Py_MIN(size, 256);
-+        int res;
- 
--    while (0 < size)
--    {
--        do {
--            n = read(fd, buffer, (size_t)size);
--        } while (n < 0 && errno == EINTR);
-+        if (raise) {
-+            Py_BEGIN_ALLOW_THREADS
-+            res = getentropy(buffer, len);
-+            Py_END_ALLOW_THREADS
-+        }
-+        else {
-+            res = getentropy(buffer, len);
-+        }
- 
--        if (n <= 0) {
--            /* read() failed or returned 0 bytes */
--            Py_FatalError("Failed to read bytes from /dev/urandom");
--            break;
-+        if (res < 0) {
-+            /* ENOSYS: the syscall is not supported by the running kernel.
-+               EPERM: the syscall is blocked by a security policy (ex: SECCOMP)
-+               or something else. */
-+            if (errno == ENOSYS || errno == EPERM) {
-+                getentropy_works = 0;
-+                return 0;
-+            }
-+
-+            if (errno == EINTR) {
-+                if (raise) {
-+                    if (PyErr_CheckSignals()) {
-+                        return -1;
-+                    }
-+                }
-+
-+                /* retry getentropy() if it was interrupted by a signal */
-+                continue;
-+            }
-+
-+            if (raise) {
-+                PyErr_SetFromErrno(PyExc_OSError);
-+            }
-+            return -1;
-         }
--        buffer += n;
--        size -= n;
-+
-+        buffer += len;
-+        size -= len;
-     }
--    close(fd);
-+    return 1;
- }
-+#endif /* defined(HAVE_GETENTROPY) && !defined(sun) */
- 
--/* Read 'size' random bytes from py_getrandom(). Fall back on reading from
--   /dev/urandom if getrandom() is not available.
- 
--   Return 0 on success. Raise an exception and return -1 on error. */
-+static struct {
-+    int fd;
-+    dev_t st_dev;
-+    ino_t st_ino;
-+} urandom_cache = { -1 };
-+
-+/* Read random bytes from the /dev/urandom device:
-+
-+   - Return 0 on success
-+   - Raise an exception (if raise is non-zero) and return -1 on error
-+
-+   Possible causes of errors:
-+
-+   - open() failed with ENOENT, ENXIO, ENODEV, EACCES: the /dev/urandom device
-+     was not found. For example, it was removed manually or not exposed in a
-+     chroot or container.
-+   - open() failed with a different error
-+   - fstat() failed
-+   - read() failed or returned 0
-+
-+   read() is retried if it failed with EINTR: interrupted by a signal.
-+
-+   The file descriptor of the device is kept open between calls to avoid using
-+   many file descriptors when run in parallel from multiple threads:
-+   see the issue #18756.
-+
-+   st_dev and st_ino fields of the file descriptor (from fstat()) are cached to
-+   check if the file descriptor was replaced by a different file (which is
-+   likely a bug in the application): see the issue #21207.
-+
-+   If the file descriptor was closed or replaced, open a new file descriptor
-+   but don't close the old file descriptor: it probably points to something
-+   important for some third-party code. */
- static int
--dev_urandom_python(char *buffer, Py_ssize_t size)
-+dev_urandom(char *buffer, Py_ssize_t size, int raise)
- {
-     int fd;
-     Py_ssize_t n;
--    struct _Py_stat_struct st;
--#ifdef PY_GETRANDOM
--    int res;
--#endif
--
--    if (size <= 0)
--        return 0;
- 
--#ifdef PY_GETRANDOM
--    res = py_getrandom(buffer, size, 1);
--    if (res < 0) {
--        return -1;
--    }
--    if (res == 1) {
--        return 0;
--    }
--    /* getrandom() failed with ENOSYS or EPERM,
--       fall back on reading /dev/urandom */
--#endif
-+    if (raise) {
-+        struct _Py_stat_struct st;
- 
--    if (urandom_cache.fd >= 0) {
--        /* Does the fd point to the same thing as before? (issue #21207) */
--        if (_Py_fstat_noraise(urandom_cache.fd, &st)
--            || st.st_dev != urandom_cache.st_dev
--            || st.st_ino != urandom_cache.st_ino) {
--            /* Something changed: forget the cached fd (but don't close it,
--               since it probably points to something important for some
--               third-party code). */
--            urandom_cache.fd = -1;
--        }
--    }
--    if (urandom_cache.fd >= 0)
--        fd = urandom_cache.fd;
--    else {
--        fd = _Py_open("/dev/urandom", O_RDONLY);
--        if (fd < 0) {
--            if (errno == ENOENT || errno == ENXIO ||
--                errno == ENODEV || errno == EACCES)
--                PyErr_SetString(PyExc_NotImplementedError,
--                                "/dev/urandom (or equivalent) not found");
--            /* otherwise, keep the OSError exception raised by _Py_open() */
--            return -1;
--        }
-         if (urandom_cache.fd >= 0) {
--            /* urandom_fd was initialized by another thread while we were
--               not holding the GIL, keep it. */
--            close(fd);
--            fd = urandom_cache.fd;
-+            /* Does the fd point to the same thing as before? (issue #21207) */
-+            if (_Py_fstat_noraise(urandom_cache.fd, &st)
-+                || st.st_dev != urandom_cache.st_dev
-+                || st.st_ino != urandom_cache.st_ino) {
-+                /* Something changed: forget the cached fd (but don't close it,
-+                   since it probably points to something important for some
-+                   third-party code). */
-+                urandom_cache.fd = -1;
-+            }
-         }
-+        if (urandom_cache.fd >= 0)
-+            fd = urandom_cache.fd;
-         else {
--            if (_Py_fstat(fd, &st)) {
--                close(fd);
-+            fd = _Py_open("/dev/urandom", O_RDONLY);
-+            if (fd < 0) {
-+                if (errno == ENOENT || errno == ENXIO ||
-+                    errno == ENODEV || errno == EACCES) {
-+                    PyErr_SetString(PyExc_NotImplementedError,
-+                                    "/dev/urandom (or equivalent) not found");
-+                }
-+                /* otherwise, keep the OSError exception raised by _Py_open() */
-                 return -1;
-             }
-+            if (urandom_cache.fd >= 0) {
-+                /* urandom_fd was initialized by another thread while we were
-+                   not holding the GIL, keep it. */
-+                close(fd);
-+                fd = urandom_cache.fd;
-+            }
-             else {
--                urandom_cache.fd = fd;
--                urandom_cache.st_dev = st.st_dev;
--                urandom_cache.st_ino = st.st_ino;
-+                if (_Py_fstat(fd, &st)) {
-+                    close(fd);
-+                    return -1;
-+                }
-+                else {
-+                    urandom_cache.fd = fd;
-+                    urandom_cache.st_dev = st.st_dev;
-+                    urandom_cache.st_ino = st.st_ino;
-+                }
-             }
-         }
--    }
- 
--    do {
--        n = _Py_read(fd, buffer, (size_t)size);
--        if (n == -1) {
--            return -1;
--        }
--        if (n == 0) {
--            PyErr_Format(PyExc_RuntimeError,
--                    "Failed to read %zi bytes from /dev/urandom",
--                    size);
-+        do {
-+            n = _Py_read(fd, buffer, (size_t)size);
-+            if (n == -1)
-+                return -1;
-+            if (n == 0) {
-+                PyErr_Format(PyExc_RuntimeError,
-+                        "Failed to read %zi bytes from /dev/urandom",
-+                        size);
-+                return -1;
-+            }
-+
-+            buffer += n;
-+            size -= n;
-+        } while (0 < size);
-+    }
-+    else {
-+        fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
-+        if (fd < 0) {
-             return -1;
-         }
- 
--        buffer += n;
--        size -= n;
--    } while (0 < size);
-+        while (0 < size)
-+        {
-+            do {
-+                n = read(fd, buffer, (size_t)size);
-+            } while (n < 0 && errno == EINTR);
- 
-+            if (n <= 0) {
-+                /* stop on error or if read(size) returned 0 */
-+                close(fd);
-+                return -1;
-+            }
-+
-+            buffer += n;
-+            size -= n;
-+        }
-+        close(fd);
-+    }
-     return 0;
- }
- 
-@@ -376,8 +402,8 @@ dev_urandom_close(void)
-         urandom_cache.fd = -1;
-     }
- }
-+#endif /* !MS_WINDOWS */
- 
--#endif
- 
- /* Fill buffer with pseudo-random bytes generated by a linear congruent
-    generator (LCG):
-@@ -400,31 +426,100 @@ lcg_urandom(unsigned int x0, unsigned char *buffer, size_t size)
-     }
- }
- 
--/* Fill buffer with size pseudo-random bytes from the operating system random
--   number generator (RNG). It is suitable for most cryptographic purposes
--   except long living private keys for asymmetric encryption.
-+/* Read random bytes:
- 
--   Return 0 on success, raise an exception and return -1 on error. */
--int
--_PyOS_URandom(void *buffer, Py_ssize_t size)
-+   - Return 0 on success
-+   - Raise an exception (if raise is non-zero) and return -1 on error
-+
-+   Used sources of entropy ordered by preference, preferred source first:
-+
-+   - CryptGenRandom() on Windows
-+   - getrandom() function (ex: Linux and Solaris): call py_getrandom()
-+   - getentropy() function (ex: OpenBSD): call py_getentropy()
-+   - /dev/urandom device
-+
-+   Read from the /dev/urandom device if getrandom() or getentropy() function
-+   is not available or does not work.
-+
-+   Prefer getrandom() over getentropy() because getrandom() supports blocking
-+   and non-blocking mode and Python requires non-blocking RNG at startup to
-+   initialize its hash secret: see the PEP 524.
-+
-+   Prefer getrandom() and getentropy() over reading directly /dev/urandom
-+   because these functions don't need file descriptors and so avoid ENFILE or
-+   EMFILE errors (too many open files): see the issue #18756.
-+
-+   Only use RNG running in the kernel. They are more secure because it is
-+   harder to get the internal state of a RNG running in the kernel land than a
-+   RNG running in the user land. The kernel has a direct access to the hardware
-+   and has access to hardware RNG, they are used as entropy sources.
-+
-+   Note: the OpenSSL RAND_pseudo_bytes() function does not automatically reseed
-+   its RNG on fork(), two child processes (with the same pid) generate the same
-+   random numbers: see issue #18747. Kernel RNGs don't have this issue,
-+   they have access to good quality entropy sources.
-+
-+   If raise is zero:
-+
-+   - Don't raise an exception on error
-+   - Don't call the Python signal handler (don't call PyErr_CheckSignals()) if
-+     a function fails with EINTR: retry directly the interrupted function
-+   - Don't release the GIL to call functions.
-+*/
-+static int
-+pyurandom(void *buffer, Py_ssize_t size, int raise)
- {
-+#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY)
-+    int res;
-+#endif
-+
-     if (size < 0) {
--        PyErr_Format(PyExc_ValueError,
--                     "negative argument not allowed");
-+        if (raise) {
-+            PyErr_Format(PyExc_ValueError,
-+                         "negative argument not allowed");
-+        }
-         return -1;
-     }
--    if (size == 0)
-+
-+    if (size == 0) {
-         return 0;
-+    }
- 
- #ifdef MS_WINDOWS
--    return win32_urandom((unsigned char *)buffer, size, 1);
--#elif defined(PY_GETENTROPY)
--    return py_getentropy(buffer, size, 0);
-+    return win32_urandom((unsigned char *)buffer, size, raise);
-+#else
-+
-+#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY)
-+#ifdef PY_GETRANDOM
-+    res = py_getrandom(buffer, size, raise);
- #else
--    return dev_urandom_python((char*)buffer, size);
-+    res = py_getentropy(buffer, size, raise);
-+#endif
-+    if (res < 0) {
-+        return -1;
-+    }
-+    if (res == 1) {
-+        return 0;
-+    }
-+    /* getrandom() or getentropy() function is not available: failed with
-+       ENOSYS, EPERM or EAGAIN. Fall back on reading from /dev/urandom. */
-+#endif
-+
-+    return dev_urandom(buffer, size, raise);
- #endif
- }
- 
-+/* Fill buffer with size pseudo-random bytes from the operating system random
-+   number generator (RNG). It is suitable for most cryptographic purposes
-+   except long living private keys for asymmetric encryption.
-+
-+   Return 0 on success. Raise an exception and return -1 on error. */
-+int
-+_PyOS_URandom(void *buffer, Py_ssize_t size)
-+{
-+    return pyurandom(buffer, size, 1);
-+}
-+
- void
- _PyRandom_Init(void)
- {
-@@ -463,13 +558,14 @@ _PyRandom_Init(void)
-         }
-     }
-     else {
--#ifdef MS_WINDOWS
--        (void)win32_urandom(secret, secret_size, 0);
--#elif defined(PY_GETENTROPY)
--        (void)py_getentropy(secret, secret_size, 1);
--#else
--        dev_urandom_noraise(secret, secret_size);
--#endif
-+        int res;
-+
-+        /* _PyRandom_Init() is called very early in the Python initialization
-+           and so exceptions cannot be used (use raise=0). */
-+        res = pyurandom(secret, secret_size, 0);
-+        if (res < 0) {
-+            Py_FatalError("failed to get random numbers to initialize Python");
-+        }
-     }
- }
- 
-@@ -481,8 +577,6 @@ _PyRandom_Fini(void)
-         CryptReleaseContext(hCryptProv, 0);
-         hCryptProv = 0;
-     }
--#elif defined(PY_GETENTROPY)
--    /* nothing to clean */
- #else
-     dev_urandom_close();
- #endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
deleted file mode 100644
index 13df12f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
+++ /dev/null
@@ -1,227 +0,0 @@
-require recipes-devtools/python/python.inc
-
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-PYTHON_BINABI= "${PYTHON_MAJMIN}m"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://python-config.patch \
-file://0001-cross-compile-support.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
-file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
-${DISTRO_SRC_URI} \
-"
-
-SRC_URI += "\
-            file://03-fix-tkinter-detection.patch \
-            file://avoid_warning_about_tkinter.patch \
-            file://cgi_py.patch \
-            file://host_include_contamination.patch \
-            file://python-3.3-multilib.patch \
-            file://shutil-follow-symlink-fix.patch \
-            file://sysroot-include-headers.patch \
-            file://unixccompiler.patch \
-            file://avoid-ncursesw-include-path.patch \
-            file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
-            file://python3-setup.py-no-host-headers-libs.patch \
-            file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
-            file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-            file://setup.py-find-libraries-in-staging-dirs.patch \
-            file://configure.ac-fix-LIBPL.patch \
-            file://upstream-random-fixes.patch \
-            file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch \
-            file://Fix-29519-weakref-spewing-exceptions-during-interp-f.patch \
-            file://pass-missing-libraries-to-Extension-for-mul.patch \
-           "
-SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
-SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python3native pkgconfig
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
-                ac_cv_have_lchflags=no \
-                ac_cv_have_long_long_format=yes \
-                ac_cv_buggy_getaddrinfo=no \
-                ac_cv_file__dev_ptmx=yes \
-                ac_cv_file__dev_ptc=no \
-"
-
-TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
-SDK_CC_ARCH += "-DNDEBUG -fno-inline"
-EXTRA_OEMAKE += "CROSS_COMPILE=yes"
-EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
-
-export CROSS_COMPILE = "${TARGET_PREFIX}"
-export _PYTHON_PROJECT_BASE = "${B}"
-export _PYTHON_PROJECT_SRC = "${S}"
-export CCSHARED = "-fPIC"
-
-# Fix cross compilation of different modules
-export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
-	rm -f ${S}/Makefile.orig
-	autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
-        # regenerate platform specific files, because they depend on system headers
-        cd ${S}/Lib/plat-linux*
-        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
-                ${STAGING_INCDIR}/dlfcn.h \
-                ${STAGING_INCDIR}/linux/cdrom.h \
-                ${STAGING_INCDIR}/netinet/in.h \
-                ${STAGING_INCDIR}/sys/types.h
-        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
-        cd -
-
-
-	# remove any bogus LD_LIBRARY_PATH
-	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
-	if [ ! -f Makefile.orig ]; then
-		install -m 0644 Makefile Makefile.orig
-	fi
-	sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
-		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
-		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
-		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
-		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
-		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
-		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
-		Makefile
-	# save copy of it now, because if we do it in do_install and 
-	# then call do_install twice we get Makefile.orig == Makefile.sysroot
-	install -m 0644 Makefile Makefile.sysroot
-
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		OPT="${CFLAGS}" libpython3.so
-
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		OPT="${CFLAGS}"
-}
-
-do_install() {
-	# make install needs the original Makefile, or otherwise the inclues would
-	# go to ${D}${STAGING...}/...
-	install -m 0644 Makefile.orig Makefile
-
-	install -d ${D}${libdir}/pkgconfig
-	install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
-
-	# rerun the build once again with original makefile this time
-	# run install in a separate step to avoid compile/install race
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		DESTDIR=${D} LIBDIR=${libdir}
-	
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		DESTDIR=${D} LIBDIR=${libdir} install
-
-	# avoid conflict with 2to3 from Python 2
-	rm -f ${D}/${bindir}/2to3
-
-	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
-
-	if [ -e ${WORKDIR}/sitecustomize.py ]; then
-		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
-	fi
-
-	oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
-	create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
-	# copy back the old Makefile to fix target package
-	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
-	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
-	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-modules = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-crypt = "openssl"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
-
-FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
-FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
-
-PACKAGES =+ "${PN}-pyvenv"
-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
-
-# package libpython3
-PACKAGES =+ "libpython3 libpython3-staticdev"
-FILES_libpython3 = "${libdir}/libpython*.so.*"
-FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
-INSANE_SKIP_${PN}-dev += "dev-elf"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb
new file mode 100644
index 0000000..f893b84
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb
@@ -0,0 +1,323 @@
+require recipes-devtools/python/python.inc
+
+DEPENDS = "python3-native libffi bzip2 gdbm openssl sqlite3 zlib virtual/libintl xz"
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+PYTHON_BINABI= "${PYTHON_MAJMIN}m"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://python-config.patch \
+file://0001-cross-compile-support.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
+file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
+${DISTRO_SRC_URI} \
+"
+
+SRC_URI += "\
+            file://03-fix-tkinter-detection.patch \
+            file://avoid_warning_about_tkinter.patch \
+            file://cgi_py.patch \
+            file://host_include_contamination.patch \
+            file://python-3.3-multilib.patch \
+            file://shutil-follow-symlink-fix.patch \
+            file://sysroot-include-headers.patch \
+            file://unixccompiler.patch \
+            file://avoid-ncursesw-include-path.patch \
+            file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+            file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+            file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+            file://configure.ac-fix-LIBPL.patch \
+            file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch \
+            file://pass-missing-libraries-to-Extension-for-mul.patch \
+           "
+SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
+SRC_URI[sha256sum] = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python3native pkgconfig
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
+                ac_cv_have_lchflags=no \
+                ac_cv_have_long_long_format=yes \
+                ac_cv_buggy_getaddrinfo=no \
+                ac_cv_file__dev_ptmx=yes \
+                ac_cv_file__dev_ptc=no \
+"
+
+TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
+SDK_CC_ARCH += "-DNDEBUG -fno-inline"
+EXTRA_OEMAKE += "CROSS_COMPILE=yes"
+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
+
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
+export CCSHARED = "-fPIC"
+
+# Fix cross compilation of different modules
+export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+PACKAGECONFIG ??= "readline"
+PACKAGECONFIG[readline] = ",,readline"
+
+do_configure_append() {
+	rm -f ${S}/Makefile.orig
+	autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+        # regenerate platform specific files, because they depend on system headers
+        cd ${S}/Lib/plat-linux*
+        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+                ${STAGING_INCDIR}/dlfcn.h \
+                ${STAGING_INCDIR}/linux/cdrom.h \
+                ${STAGING_INCDIR}/netinet/in.h \
+                ${STAGING_INCDIR}/sys/types.h
+        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+        cd -
+
+
+	# remove any bogus LD_LIBRARY_PATH
+	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+	if [ ! -f Makefile.orig ]; then
+		install -m 0644 Makefile Makefile.orig
+	fi
+	sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+		Makefile
+	# save copy of it now, because if we do it in do_install and 
+	# then call do_install twice we get Makefile.orig == Makefile.sysroot
+	install -m 0644 Makefile Makefile.sysroot
+
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		OPT="${CFLAGS}" libpython3.so
+
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		OPT="${CFLAGS}"
+}
+
+do_install() {
+	# make install needs the original Makefile, or otherwise the inclues would
+	# go to ${D}${STAGING...}/...
+	install -m 0644 Makefile.orig Makefile
+
+	install -d ${D}${libdir}/pkgconfig
+	install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
+
+	# rerun the build once again with original makefile this time
+	# run install in a separate step to avoid compile/install race
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		DESTDIR=${D} LIBDIR=${libdir}
+	
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		DESTDIR=${D} LIBDIR=${libdir} install
+
+	# avoid conflict with 2to3 from Python 2
+	rm -f ${D}/${bindir}/2to3
+
+	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
+
+	if [ -e ${WORKDIR}/sitecustomize.py ]; then
+		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+	fi
+
+	oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
+}
+
+do_install_append_class-nativesdk () {
+	create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+	# copy back the old Makefile to fix target package
+	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
+	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
+	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+		-e 's|${DEBUG_PREFIX_MAP}||g' \
+		-e 's:${HOSTTOOLS_DIR}/::g' \
+		-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+		-e 's:${RECIPE_SYSROOT}::g' \
+		-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py \
+		${PKGD}/${bindir}/python${PYTHON_BINABI}-config
+
+	# Recompile _sysconfigdata after modifying it
+	cd ${PKGD}
+	${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+	     -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py')"
+	${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+	     -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=1)"
+	${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+	     -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=2)"
+	cd -
+}
+
+# manual dependency additions
+RPROVIDES_${PN}-modules = "${PN}"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"
+RRECOMMENDS_${PN}-crypt = "openssl"
+RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
+
+FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
+FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
+FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
+
+PACKAGES =+ "${PN}-pyvenv"
+FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
+
+# package libpython3
+PACKAGES =+ "libpython3 libpython3-staticdev"
+FILES_libpython3 = "${libdir}/libpython*.so.*"
+FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
+INSANE_SKIP_${PN}-dev += "dev-elf"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+BBCLASSEXTEND = "nativesdk"
+
+RPROVIDES_${PN} += "${PN}-modules"
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+INCLUDE_PYCS ?= "1"
+
+python(){
+    import json
+
+    filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')
+    # This python changes the datastore based on the contents of a file, so mark
+    # that dependency.
+    bb.parse.mark_dependency(d, filename)
+
+    with open(filename) as manifest_file:
+        python_manifest=json.load(manifest_file)
+
+    include_pycs = d.getVar('INCLUDE_PYCS')
+
+    packages = d.getVar('PACKAGES').split()
+    pn = d.getVar('PN')
+
+    newpackages=[]
+    for key in python_manifest:
+        pypackage= pn + '-' + key
+
+        if pypackage not in packages:
+            # We need to prepend, otherwise python-misc gets everything
+            # so we use a new variable
+            newpackages.append(pypackage)
+
+        # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+        d.setVar('FILES_' + pypackage, '')
+        for value in python_manifest[key]['files']:
+            d.appendVar('FILES_' + pypackage, ' ' + value)
+
+    	# Add cached files
+        if include_pycs == '1':
+            for value in python_manifest[key]['cached']:
+                    d.appendVar('FILES_' + pypackage, ' ' + value)
+
+        d.setVar('RDEPENDS_' + pypackage, '')
+        for value in python_manifest[key]['rdepends']:
+            # Make it work with or without $PN
+            if '${PN}' in value:
+                value=value.split('-')[1]
+            d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+        d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+    # We need to ensure staticdev packages match for files first so we sort in reverse
+    newpackages.sort(reverse=True)
+    # Prepending so to avoid python-misc getting everything
+    packages = newpackages + packages
+    d.setVar('PACKAGES', ' '.join(packages))
+    d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+SRC_URI += "file://create_manifest3.py file://get_module_deps3.py file://python3-manifest.json"
+
+do_create_manifest() {
+    # This task should be run with every new release of Python.
+    # We must ensure that PACKAGECONFIG enables everything when creating
+    # a new manifest, this is to base our new manifest on a complete
+    # native python build, containing all dependencies, otherwise the task
+    # wont be able to find the required files.
+    # e.g. BerkeleyDB is an optional build dependency so it may or may not
+    # be present, we must ensure it is.
+
+    cd ${WORKDIR}
+    # This needs to be executed by python-native and NOT by HOST's python
+    nativepython3 create_manifest3.py
+    cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "python3:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "python3:do_patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb
deleted file mode 100644
index 754c029..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb
+++ /dev/null
@@ -1,195 +0,0 @@
-require python.inc
-DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}"
-
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI += "\
-  file://01-use-proper-tools-for-cross-build.patch \
-  file://03-fix-tkinter-detection.patch \
-  file://06-avoid_usr_lib_termcap_path_in_linking.patch \
-  ${DISTRO_SRC_URI} \
-  file://multilib.patch \
-  file://cgi_py.patch \
-  file://setup_py_skip_cross_import_check.patch \
-  file://add-md5module-support.patch \
-  file://host_include_contamination.patch \
-  file://fix_for_using_different_libdir.patch \
-  file://setuptweaks.patch \
-  file://check-if-target-is-64b-not-host.patch \
-  file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
-  file://avoid_warning_about_tkinter.patch \
-  file://avoid_warning_for_sunos_specific_module.patch \
-  file://python-2.7.3-remove-bsdb-rpath.patch \
-  file://fix-makefile-for-ptest.patch \
-  file://run-ptest \
-  file://parallel-makeinst-create-bindir.patch \
-  file://use_sysroot_ncurses_instead_of_host.patch \
-  file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
-  file://Don-t-use-getentropy-on-Linux.patch \
-  file://pass-missing-libraries-to-Extension-for-mul.patch \
-  file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
-"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python-dir pythonnative
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
-
-PACKAGECONFIG ??= "bdb"
-PACKAGECONFIG[bdb] = ",,db"
-
-do_configure_append() {
-	rm -f ${S}/Makefile.orig
-        autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
-        # regenerate platform specific files, because they depend on system headers
-        cd ${S}/Lib/plat-linux2
-        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
-                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
-                ${STAGING_INCDIR}/dlfcn.h \
-                ${STAGING_INCDIR}/linux/cdrom.h \
-                ${STAGING_INCDIR}/netinet/in.h \
-                ${STAGING_INCDIR}/sys/types.h
-        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
-        cd -
-
-	# remove any bogus LD_LIBRARY_PATH
-	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
-	if [ ! -f Makefile.orig ]; then
-		install -m 0644 Makefile Makefile.orig
-	fi
-	sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
-		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
-		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
-		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
-		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
-		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
-		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
-		Makefile
-	# save copy of it now, because if we do it in do_install and 
-	# then call do_install twice we get Makefile.orig == Makefile.sysroot
-	install -m 0644 Makefile Makefile.sysroot
-
-	export CROSS_COMPILE="${TARGET_PREFIX}"
-	export PYTHONBUILDDIR="${B}"
-
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		OPT="${CFLAGS}"
-}
-
-do_install() {
-	# make install needs the original Makefile, or otherwise the inclues would
-	# go to ${D}${STAGING...}/...
-	install -m 0644 Makefile.orig Makefile
-
-	export CROSS_COMPILE="${TARGET_PREFIX}"
-	export PYTHONBUILDDIR="${B}"
-
-	# After swizzling the makefile, we need to run the build again.
-	# install can race with the build so we have to run this first, then install
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		DESTDIR=${D} LIBDIR=${libdir}
-	
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		DESTDIR=${D} LIBDIR=${libdir} install
-
-	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
-	if [ -e ${WORKDIR}/sitecustomize.py ]; then
-		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
-	fi
-
-	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
-
-    if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
-        rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
-    fi
-}
-
-do_install_append_class-nativesdk () {
-	create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
-	# copy back the old Makefile to fix target package
-	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
-	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
-	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-    python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
-RRECOMMENDS_${PN}-crypt = "openssl"
-
-# package libpython2
-PACKAGES =+ "lib${BPN}2"
-FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-
-# ptest
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
-	cp ${B}/Makefile ${D}${PTEST_PATH}
-	sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
-	 -e s:LIBDIR:${libdir}:g \
-	 -i ${D}${PTEST_PATH}/run-ptest
-
-	#Remove build host references
-	sed -i \
-		-e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
-	    -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT}::g' \
-	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-	${D}/${PTEST_PATH}/Makefile
-}
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-# Nasty but if bdb isn't enabled the package won't be generated
-RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb
new file mode 100644
index 0000000..0a09926
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb
@@ -0,0 +1,281 @@
+require python.inc
+
+DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
+
+PR = "${INC_PR}"
+
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI += "\
+  file://01-use-proper-tools-for-cross-build.patch \
+  file://03-fix-tkinter-detection.patch \
+  file://06-avoid_usr_lib_termcap_path_in_linking.patch \
+  ${DISTRO_SRC_URI} \
+  file://multilib.patch \
+  file://cgi_py.patch \
+  file://setup_py_skip_cross_import_check.patch \
+  file://add-md5module-support.patch \
+  file://host_include_contamination.patch \
+  file://fix_for_using_different_libdir.patch \
+  file://setuptweaks.patch \
+  file://check-if-target-is-64b-not-host.patch \
+  file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
+  file://avoid_warning_about_tkinter.patch \
+  file://avoid_warning_for_sunos_specific_module.patch \
+  file://python-2.7.3-remove-bsdb-rpath.patch \
+  file://fix-makefile-for-ptest.patch \
+  file://run-ptest \
+  file://parallel-makeinst-create-bindir.patch \
+  file://use_sysroot_ncurses_instead_of_host.patch \
+  file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+  file://pass-missing-libraries-to-Extension-for-mul.patch \
+  file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
+"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python-dir pythonnative
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
+
+PACKAGECONFIG ??= "bdb"
+PACKAGECONFIG[bdb] = ",,db"
+
+do_configure_append() {
+	rm -f ${S}/Makefile.orig
+        autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+        # regenerate platform specific files, because they depend on system headers
+        cd ${S}/Lib/plat-linux2
+        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
+                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+                ${STAGING_INCDIR}/dlfcn.h \
+                ${STAGING_INCDIR}/linux/cdrom.h \
+                ${STAGING_INCDIR}/netinet/in.h \
+                ${STAGING_INCDIR}/sys/types.h
+        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+        cd -
+
+	# remove any bogus LD_LIBRARY_PATH
+	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+	if [ ! -f Makefile.orig ]; then
+		install -m 0644 Makefile Makefile.orig
+	fi
+	sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
+		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+		Makefile
+	# save copy of it now, because if we do it in do_install and 
+	# then call do_install twice we get Makefile.orig == Makefile.sysroot
+	install -m 0644 Makefile Makefile.sysroot
+
+	export CROSS_COMPILE="${TARGET_PREFIX}"
+	export PYTHONBUILDDIR="${B}"
+
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		OPT="${CFLAGS}"
+}
+
+do_install() {
+	# make install needs the original Makefile, or otherwise the inclues would
+	# go to ${D}${STAGING...}/...
+	install -m 0644 Makefile.orig Makefile
+
+	export CROSS_COMPILE="${TARGET_PREFIX}"
+	export PYTHONBUILDDIR="${B}"
+
+	# After swizzling the makefile, we need to run the build again.
+	# install can race with the build so we have to run this first, then install
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		DESTDIR=${D} LIBDIR=${libdir}
+	
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		DESTDIR=${D} LIBDIR=${libdir} install
+
+	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+	if [ -e ${WORKDIR}/sitecustomize.py ]; then
+		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+	fi
+
+	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+
+    if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
+        rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
+    fi
+}
+
+do_install_append_class-nativesdk () {
+	create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+	# copy back the old Makefile to fix target package
+	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
+	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+		-e 's|${DEBUG_PREFIX_MAP}||g' \
+		-e 's:${HOSTTOOLS_DIR}/::g' \
+		-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+		-e 's:${RECIPE_SYSROOT}::g' \
+		-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+	(cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
+}
+
+
+# manual dependency additions
+RPROVIDES_${PN}-core = "${PN}"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
+RRECOMMENDS_${PN}-crypt = "openssl"
+
+# package libpython2
+PACKAGES =+ "lib${BPN}2"
+FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+
+# ptest
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
+#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
+inherit ptest
+
+# This must come after inherit ptest for the override to take effect
+do_install_ptest() {
+	cp ${B}/Makefile ${D}${PTEST_PATH}
+	sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
+	 -e s:LIBDIR:${libdir}:g \
+	 -i ${D}${PTEST_PATH}/run-ptest
+
+	#Remove build host references
+	sed -i \
+		-e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+	    -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    -e 's:${RECIPE_SYSROOT}::g' \
+	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+	${D}/${PTEST_PATH}/Makefile
+}
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+# Nasty but if bdb isn't enabled the package won't be generated
+RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
+
+BBCLASSEXTEND = "nativesdk"
+
+RPROVIDES_${PN} += "${PN}-modules"
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+
+INCLUDE_PYCS ?= "1"
+
+python(){
+    import json
+
+    filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json')
+    # This python changes the datastore based on the contents of a file, so mark
+    # that dependency.
+    bb.parse.mark_dependency(d, filename)
+
+    with open(filename) as manifest_file:
+        python_manifest=json.load(manifest_file)
+
+    include_pycs = d.getVar('INCLUDE_PYCS')
+
+    packages = d.getVar('PACKAGES').split()
+    pn = d.getVar('PN')
+
+    newpackages=[]
+
+    for key in python_manifest:
+        pypackage= pn + '-' + key
+
+        if pypackage not in packages:
+            # We need to prepend, otherwise python-misc gets everything
+            # so we use a new variable
+            newpackages.append(pypackage)
+
+        # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+        d.setVar('FILES_' + pypackage, '')
+        for value in python_manifest[key]['files']:
+            d.appendVar('FILES_' + pypackage, ' ' + value)
+            if include_pycs == '1':
+                if value.endswith('.py'):
+                    d.appendVar('FILES_' + pypackage, ' ' + value + 'c')
+
+        d.setVar('RDEPENDS_' + pypackage, '')
+        for value in python_manifest[key]['rdepends']:
+            # Make it work with or without $PN
+            if '${PN}' in value:
+                value=value.split('-')[1]
+            d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+        d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+    # We need to ensure staticdev packages match for files first so we sort in reverse
+    newpackages.sort(reverse=True)
+    # Prepending so to avoid python-misc getting everything
+    packages = newpackages + packages
+    d.setVar('PACKAGES', ' '.join(packages))
+    d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json"
+
+do_create_manifest() {
+    # This task should be run with every new release of Python.
+    # We must ensure that PACKAGECONFIG enables everything when creating
+    # a new manifest, this is to base our new manifest on a complete
+    # native python build, containing all dependencies, otherwise the task
+    # wont be able to find the required files.
+    # e.g. BerkeleyDB is an optional build dependency so it may or may not
+    # be present, we must ensure it is.
+
+    cd ${WORKDIR}
+    # This needs to be executed by python-native and NOT by HOST's python
+    nativepython create_manifest2.py
+    cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "python:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "python:do_patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
index 943ca5f..cdc2f51 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Qemu helper scripts"
 LICENSE = "GPLv2"
-RDEPENDS_${PN} = "nativesdk-qemu nativesdk-python3-subprocess \
-                  nativesdk-python3-shell nativesdk-python3-fcntl \
+RDEPENDS_${PN} = "nativesdk-qemu \
+                  nativesdk-python3-shell nativesdk-python3-fcntl nativesdk-python3-logging \
                 "
 
 PR = "r9"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
index 2a1d14b..dc73df8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
@@ -28,7 +28,7 @@
     --target-list=${@get_qemu_target_list(d)} \
     --extra-cflags='${CFLAGS}' \
     "
-EXTRA_OECONF_append_class-native = " --python=${USRBINPATH}/python2.7"
+EXTRA_OECONF_append_class-native = " --python=python2.7"
 
 EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch
deleted file mode 100644
index 74dc6f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch
+++ /dev/null
@@ -1,870 +0,0 @@
-From 8737eef18f39ed087fd911d0a0886e8174d0468c Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 1/4] Provide support for the CUSE TPM
-
-Rather than integrating TPM functionality into QEMU directly
-using the TPM emulation of libtpms, we now integrate an external
-emulated TPM device. This device is expected to implement a Linux
-CUSE interface (CUSE = character device in userspace).
-
-QEMU talks to the CUSE TPM using much functionality of the
-passthrough driver. For example, the TPM commands and responses
-are sent to the CUSE TPM using the read()/write() interface.
-However, some out-of-band control needs to be done using the CUSE
-TPM's ioctls. The CUSE TPM currently defines and implements 15
-different ioctls for controlling certain life-cycle aspects of
-the emulated TPM. The ioctls can be regarded as a replacement for
-direct function calls to a TPM emulator if the TPM were to be
-directly integrated into QEMU.
-
-One of the ioctls allows to get a bitmask of supported capabilities.
-Each returned bit indicates which capabilities have been implemented.
-An include file defining the various ioctls is added to QEMU.
-
-The CUSE TPM and associated tools can be found here:
-
-https://github.com/stefanberger/swtpm
-
-(please use the latest version)
-
-To use the external CUSE TPM, the CUSE TPM should be started as follows:
-
-/usr/bin/swtpm_ioctl -s /dev/vtpm-test
-
-/usr/bin/swtpm_cuse -n vtpm-test
-
-QEMU can then be started using the following parameters:
-
-qemu-system-x86_64 \
-	[...] \
-        -tpmdev cuse-tpm,id=tpm0,cancel-path=/dev/null,path=/dev/vtpm-test \
-        -device tpm-tis,id=tpm0,tpmdev=tpm0 \
-	[...]
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Cc: Eric Blake <eblake@redhat.com>
-
-Conflicts:
-	docs/qmp-commands.txt
-
-Patch cherry-picked from https://github.com/stefanberger/qemu-tpm, branch v2.8.0+tpm,
-commit 27d6cd856d5a14061955df7a93ee490697a7a174. Applied cleanly except for
-docs/qmp-commands.txt which did not exist yet in qemu 2.7.
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hmp.c                    |   6 ++
- hw/tpm/tpm_int.h         |   1 +
- hw/tpm/tpm_ioctl.h       | 215 +++++++++++++++++++++++++++++++++++++
- hw/tpm/tpm_passthrough.c | 274 +++++++++++++++++++++++++++++++++++++++++++++--
- qapi-schema.json         |  18 +++-
- qemu-options.hx          |  21 +++-
- tpm.c                    |  11 +-
- 7 files changed, 529 insertions(+), 17 deletions(-)
- create mode 100644 hw/tpm/tpm_ioctl.h
-
-diff --git a/hmp.c b/hmp.c
-index cc2056e9e2..277b45ef5a 100644
---- a/hmp.c
-+++ b/hmp.c
-@@ -883,6 +883,12 @@ void hmp_info_tpm(Monitor *mon, const QDict *qdict)
-                            tpo->has_cancel_path ? ",cancel-path=" : "",
-                            tpo->has_cancel_path ? tpo->cancel_path : "");
-             break;
-+        case TPM_TYPE_OPTIONS_KIND_CUSE_TPM:
-+            tpo = ti->options->u.passthrough.data;
-+            monitor_printf(mon, "%s%s",
-+                           tpo->has_path ? ",path=" : "",
-+                           tpo->has_path ? tpo->path : "");
-+            break;
-         case TPM_TYPE_OPTIONS_KIND__MAX:
-             break;
-         }
-diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
-index f2f285b3cc..6b2c9c953a 100644
---- a/hw/tpm/tpm_int.h
-+++ b/hw/tpm/tpm_int.h
-@@ -61,6 +61,7 @@ struct tpm_resp_hdr {
- #define TPM_TAG_RSP_AUTH1_COMMAND 0xc5
- #define TPM_TAG_RSP_AUTH2_COMMAND 0xc6
- 
-+#define TPM_SUCCESS               0
- #define TPM_FAIL                  9
- 
- #define TPM_ORD_ContinueSelfTest  0x53
-diff --git a/hw/tpm/tpm_ioctl.h b/hw/tpm/tpm_ioctl.h
-new file mode 100644
-index 0000000000..a341e15741
---- /dev/null
-+++ b/hw/tpm/tpm_ioctl.h
-@@ -0,0 +1,215 @@
-+/*
-+ * tpm_ioctl.h
-+ *
-+ * (c) Copyright IBM Corporation 2014, 2015.
-+ *
-+ * This file is licensed under the terms of the 3-clause BSD license
-+ */
-+#ifndef _TPM_IOCTL_H_
-+#define _TPM_IOCTL_H_
-+
-+#include <stdint.h>
-+#include <sys/uio.h>
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+
-+/*
-+ * Every response from a command involving a TPM command execution must hold
-+ * the ptm_res as the first element.
-+ * ptm_res corresponds to the error code of a command executed by the TPM.
-+ */
-+
-+typedef uint32_t ptm_res;
-+
-+/* PTM_GET_TPMESTABLISHED: get the establishment bit */
-+struct ptm_est {
-+    union {
-+        struct {
-+            ptm_res tpm_result;
-+            unsigned char bit; /* TPM established bit */
-+        } resp; /* response */
-+    } u;
-+};
-+
-+/* PTM_RESET_TPMESTABLISHED: reset establishment bit */
-+struct ptm_reset_est {
-+    union {
-+        struct {
-+            uint8_t loc; /* locality to use */
-+        } req; /* request */
-+        struct {
-+            ptm_res tpm_result;
-+        } resp; /* response */
-+    } u;
-+};
-+
-+/* PTM_INIT */
-+struct ptm_init {
-+    union {
-+        struct {
-+            uint32_t init_flags; /* see definitions below */
-+        } req; /* request */
-+        struct {
-+            ptm_res tpm_result;
-+        } resp; /* response */
-+    } u;
-+};
-+
-+/* above init_flags */
-+#define PTM_INIT_FLAG_DELETE_VOLATILE (1 << 0)
-+    /* delete volatile state file after reading it */
-+
-+/* PTM_SET_LOCALITY */
-+struct ptm_loc {
-+    union {
-+        struct {
-+            uint8_t loc; /* locality to set */
-+        } req; /* request */
-+        struct {
-+            ptm_res tpm_result;
-+        } resp; /* response */
-+    } u;
-+};
-+
-+/* PTM_HASH_DATA: hash given data */
-+struct ptm_hdata {
-+    union {
-+        struct {
-+            uint32_t length;
-+            uint8_t data[4096];
-+        } req; /* request */
-+        struct {
-+            ptm_res tpm_result;
-+        } resp; /* response */
-+    } u;
-+};
-+
-+/*
-+ * size of the TPM state blob to transfer; x86_64 can handle 8k,
-+ * ppc64le only ~7k; keep the response below a 4k page size
-+ */
-+#define PTM_STATE_BLOB_SIZE (3 * 1024)
-+
-+/*
-+ * The following is the data structure to get state blobs from the TPM.
-+ * If the size of the state blob exceeds the PTM_STATE_BLOB_SIZE, multiple reads
-+ * with this ioctl and with adjusted offset are necessary. All bytes
-+ * must be transferred and the transfer is done once the last byte has been
-+ * returned.
-+ * It is possible to use the read() interface for reading the data; however,
-+ * the first bytes of the state blob will be part of the response to the ioctl();
-+ * a subsequent read() is only necessary if the total length (totlength) exceeds
-+ * the number of received bytes. seek() is not supported.
-+ */
-+struct ptm_getstate {
-+    union {
-+        struct {
-+            uint32_t state_flags; /* may be: PTM_STATE_FLAG_DECRYPTED */
-+            uint32_t type;        /* which blob to pull */
-+            uint32_t offset;      /* offset from where to read */
-+        } req; /* request */
-+        struct {
-+            ptm_res tpm_result;
-+            uint32_t state_flags; /* may be: PTM_STATE_FLAG_ENCRYPTED */
-+            uint32_t totlength;   /* total length that will be transferred */
-+            uint32_t length;      /* number of bytes in following buffer */
-+            uint8_t  data[PTM_STATE_BLOB_SIZE];
-+        } resp; /* response */
-+    } u;
-+};
-+
-+/* TPM state blob types */
-+#define PTM_BLOB_TYPE_PERMANENT  1
-+#define PTM_BLOB_TYPE_VOLATILE   2
-+#define PTM_BLOB_TYPE_SAVESTATE  3
-+
-+/* state_flags above : */
-+#define PTM_STATE_FLAG_DECRYPTED     1 /* on input:  get decrypted state */
-+#define PTM_STATE_FLAG_ENCRYPTED     2 /* on output: state is encrypted */
-+
-+/*
-+ * The following is the data structure to set state blobs in the TPM.
-+ * If the size of the state blob exceeds the PTM_STATE_BLOB_SIZE, multiple
-+ * 'writes' using this ioctl are necessary. The last packet is indicated
-+ * by the length being smaller than the PTM_STATE_BLOB_SIZE.
-+ * The very first packet may have a length indicator of '0' enabling
-+ * a write() with all the bytes from a buffer. If the write() interface
-+ * is used, a final ioctl with a non-full buffer must be made to indicate
-+ * that all data were transferred (a write with 0 bytes would not work).
-+ */
-+struct ptm_setstate {
-+    union {
-+        struct {
-+            uint32_t state_flags; /* may be PTM_STATE_FLAG_ENCRYPTED */
-+            uint32_t type;        /* which blob to set */
-+            uint32_t length;      /* length of the data;
-+                                     use 0 on the first packet to
-+                                     transfer using write() */
-+            uint8_t data[PTM_STATE_BLOB_SIZE];
-+        } req; /* request */
-+        struct {
-+            ptm_res tpm_result;
-+        } resp; /* response */
-+    } u;
-+};
-+
-+/*
-+ * PTM_GET_CONFIG: Data structure to get runtime configuration information
-+ * such as which keys are applied.
-+ */
-+struct ptm_getconfig {
-+    union {
-+        struct {
-+            ptm_res tpm_result;
-+            uint32_t flags;
-+        } resp; /* response */
-+    } u;
-+};
-+
-+#define PTM_CONFIG_FLAG_FILE_KEY        0x1
-+#define PTM_CONFIG_FLAG_MIGRATION_KEY   0x2
-+
-+
-+typedef uint64_t ptm_cap;
-+typedef struct ptm_est ptm_est;
-+typedef struct ptm_reset_est ptm_reset_est;
-+typedef struct ptm_loc ptm_loc;
-+typedef struct ptm_hdata ptm_hdata;
-+typedef struct ptm_init ptm_init;
-+typedef struct ptm_getstate ptm_getstate;
-+typedef struct ptm_setstate ptm_setstate;
-+typedef struct ptm_getconfig ptm_getconfig;
-+
-+/* capability flags returned by PTM_GET_CAPABILITY */
-+#define PTM_CAP_INIT               (1)
-+#define PTM_CAP_SHUTDOWN           (1<<1)
-+#define PTM_CAP_GET_TPMESTABLISHED (1<<2)
-+#define PTM_CAP_SET_LOCALITY       (1<<3)
-+#define PTM_CAP_HASHING            (1<<4)
-+#define PTM_CAP_CANCEL_TPM_CMD     (1<<5)
-+#define PTM_CAP_STORE_VOLATILE     (1<<6)
-+#define PTM_CAP_RESET_TPMESTABLISHED (1<<7)
-+#define PTM_CAP_GET_STATEBLOB      (1<<8)
-+#define PTM_CAP_SET_STATEBLOB      (1<<9)
-+#define PTM_CAP_STOP               (1<<10)
-+#define PTM_CAP_GET_CONFIG         (1<<11)
-+
-+enum {
-+    PTM_GET_CAPABILITY     = _IOR('P', 0, ptm_cap),
-+    PTM_INIT               = _IOWR('P', 1, ptm_init),
-+    PTM_SHUTDOWN           = _IOR('P', 2, ptm_res),
-+    PTM_GET_TPMESTABLISHED = _IOR('P', 3, ptm_est),
-+    PTM_SET_LOCALITY       = _IOWR('P', 4, ptm_loc),
-+    PTM_HASH_START         = _IOR('P', 5, ptm_res),
-+    PTM_HASH_DATA          = _IOWR('P', 6, ptm_hdata),
-+    PTM_HASH_END           = _IOR('P', 7, ptm_res),
-+    PTM_CANCEL_TPM_CMD     = _IOR('P', 8, ptm_res),
-+    PTM_STORE_VOLATILE     = _IOR('P', 9, ptm_res),
-+    PTM_RESET_TPMESTABLISHED = _IOWR('P', 10, ptm_reset_est),
-+    PTM_GET_STATEBLOB      = _IOWR('P', 11, ptm_getstate),
-+    PTM_SET_STATEBLOB      = _IOWR('P', 12, ptm_setstate),
-+    PTM_STOP               = _IOR('P', 13, ptm_res),
-+    PTM_GET_CONFIG         = _IOR('P', 14, ptm_getconfig),
-+};
-+
-+#endif /* _TPM_IOCTL_H */
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index e88c0d20bc..050f2ba850 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -33,6 +33,7 @@
- #include "sysemu/tpm_backend_int.h"
- #include "tpm_tis.h"
- #include "tpm_util.h"
-+#include "tpm_ioctl.h"
- 
- #define DEBUG_TPM 0
- 
-@@ -45,6 +46,7 @@
- #define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
- #define TPM_PASSTHROUGH(obj) \
-     OBJECT_CHECK(TPMPassthruState, (obj), TYPE_TPM_PASSTHROUGH)
-+#define TYPE_TPM_CUSE "tpm-cuse"
- 
- static const TPMDriverOps tpm_passthrough_driver;
- 
-@@ -71,12 +73,18 @@ struct TPMPassthruState {
-     bool had_startup_error;
- 
-     TPMVersion tpm_version;
-+    ptm_cap cuse_cap; /* capabilities of the CUSE TPM */
-+    uint8_t cur_locty_number; /* last set locality */
- };
- 
- typedef struct TPMPassthruState TPMPassthruState;
- 
- #define TPM_PASSTHROUGH_DEFAULT_DEVICE "/dev/tpm0"
- 
-+#define TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt) (tpm_pt->cuse_cap != 0)
-+
-+#define TPM_CUSE_IMPLEMENTS_ALL(S, cap) (((S)->cuse_cap & (cap)) == (cap))
-+
- /* functions */
- 
- static void tpm_passthrough_cancel_cmd(TPMBackend *tb);
-@@ -148,7 +156,28 @@ static bool tpm_passthrough_is_selftest(const uint8_t *in, uint32_t in_len)
-     return false;
- }
- 
-+static int tpm_passthrough_set_locality(TPMPassthruState *tpm_pt,
-+                                        uint8_t locty_number)
-+{
-+    ptm_loc loc;
-+
-+    if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+        if (tpm_pt->cur_locty_number != locty_number) {
-+            loc.u.req.loc = locty_number;
-+            if (ioctl(tpm_pt->tpm_fd, PTM_SET_LOCALITY, &loc) < 0) {
-+                error_report("tpm_cuse: could not set locality on "
-+                             "CUSE TPM: %s",
-+                             strerror(errno));
-+                return -1;
-+            }
-+            tpm_pt->cur_locty_number = locty_number;
-+        }
-+    }
-+    return 0;
-+}
-+
- static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
-+                                        uint8_t locality_number,
-                                         const uint8_t *in, uint32_t in_len,
-                                         uint8_t *out, uint32_t out_len,
-                                         bool *selftest_done)
-@@ -157,6 +186,11 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
-     bool is_selftest;
-     const struct tpm_resp_hdr *hdr;
- 
-+    ret = tpm_passthrough_set_locality(tpm_pt, locality_number);
-+    if (ret < 0) {
-+        goto err_exit;
-+    }
-+
-     tpm_pt->tpm_op_canceled = false;
-     tpm_pt->tpm_executing = true;
-     *selftest_done = false;
-@@ -207,10 +241,12 @@ err_exit:
- }
- 
- static int tpm_passthrough_unix_transfer(TPMPassthruState *tpm_pt,
-+                                         uint8_t locality_number,
-                                          const TPMLocality *locty_data,
-                                          bool *selftest_done)
- {
-     return tpm_passthrough_unix_tx_bufs(tpm_pt,
-+                                        locality_number,
-                                         locty_data->w_buffer.buffer,
-                                         locty_data->w_offset,
-                                         locty_data->r_buffer.buffer,
-@@ -231,6 +267,7 @@ static void tpm_passthrough_worker_thread(gpointer data,
-     switch (cmd) {
-     case TPM_BACKEND_CMD_PROCESS_CMD:
-         tpm_passthrough_unix_transfer(tpm_pt,
-+                                      thr_parms->tpm_state->locty_number,
-                                       thr_parms->tpm_state->locty_data,
-                                       &selftest_done);
- 
-@@ -247,6 +284,93 @@ static void tpm_passthrough_worker_thread(gpointer data,
- }
- 
- /*
-+ * Gracefully shut down the external CUSE TPM
-+ */
-+static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt)
-+{
-+    ptm_res res;
-+
-+    if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+        if (ioctl(tpm_pt->tpm_fd, PTM_SHUTDOWN, &res) < 0) {
-+            error_report("tpm_cuse: Could not cleanly shut down "
-+                         "the CUSE TPM: %s",
-+                         strerror(errno));
-+        }
-+    }
-+}
-+
-+/*
-+ * Probe for the CUSE TPM by sending an ioctl() requesting its
-+ * capability flags.
-+ */
-+static int tpm_passthrough_cuse_probe(TPMPassthruState *tpm_pt)
-+{
-+    int rc = 0;
-+
-+    if (ioctl(tpm_pt->tpm_fd, PTM_GET_CAPABILITY, &tpm_pt->cuse_cap) < 0) {
-+        error_report("Error: CUSE TPM was requested, but probing failed");
-+        rc = -1;
-+    }
-+
-+    return rc;
-+}
-+
-+static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt)
-+{
-+    int rc = 0;
-+    ptm_cap caps = 0;
-+    const char *tpm = NULL;
-+
-+    /* check for min. required capabilities */
-+    switch (tpm_pt->tpm_version) {
-+    case TPM_VERSION_1_2:
-+        caps = PTM_CAP_INIT | PTM_CAP_SHUTDOWN | PTM_CAP_GET_TPMESTABLISHED |
-+               PTM_CAP_SET_LOCALITY;
-+        tpm = "1.2";
-+        break;
-+    case TPM_VERSION_2_0:
-+        caps = PTM_CAP_INIT | PTM_CAP_SHUTDOWN | PTM_CAP_GET_TPMESTABLISHED |
-+               PTM_CAP_SET_LOCALITY | PTM_CAP_RESET_TPMESTABLISHED;
-+        tpm = "2";
-+        break;
-+    case TPM_VERSION_UNSPEC:
-+        error_report("tpm_cuse: %s: TPM version has not been set",
-+                     __func__);
-+        return -1;
-+    }
-+
-+    if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) {
-+        error_report("tpm_cuse: TPM does not implement minimum set of required "
-+                     "capabilities for TPM %s (0x%x)", tpm, (int)caps);
-+        rc = -1;
-+    }
-+
-+    return rc;
-+}
-+
-+/*
-+ * Initialize the external CUSE TPM
-+ */
-+static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt)
-+{
-+    int rc = 0;
-+    ptm_init init = {
-+        .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE,
-+    };
-+
-+    if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+        if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) {
-+            error_report("tpm_cuse: Detected CUSE TPM but could not "
-+                         "send INIT: %s",
-+                         strerror(errno));
-+            rc = -1;
-+        }
-+    }
-+
-+    return rc;
-+}
-+
-+/*
-  * Start the TPM (thread). If it had been started before, then terminate
-  * and start it again.
-  */
-@@ -261,6 +385,8 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb)
-                               tpm_passthrough_worker_thread,
-                               &tpm_pt->tpm_thread_params);
- 
-+    tpm_passthrough_cuse_init(tpm_pt);
-+
-     return 0;
- }
- 
-@@ -291,14 +417,43 @@ static int tpm_passthrough_init(TPMBackend *tb, TPMState *s,
- 
- static bool tpm_passthrough_get_tpm_established_flag(TPMBackend *tb)
- {
-+    TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+    ptm_est est;
-+
-+    if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+        if (ioctl(tpm_pt->tpm_fd, PTM_GET_TPMESTABLISHED, &est) < 0) {
-+            error_report("tpm_cuse: Could not get the TPM established "
-+                         "flag from the CUSE TPM: %s",
-+                         strerror(errno));
-+            return false;
-+        }
-+        return (est.u.resp.bit != 0);
-+    }
-     return false;
- }
- 
- static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb,
-                                                       uint8_t locty)
- {
-+    TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+    int rc = 0;
-+    ptm_reset_est ptmreset_est;
-+
-     /* only a TPM 2.0 will support this */
--    return 0;
-+    if (tpm_pt->tpm_version == TPM_VERSION_2_0) {
-+        if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+            ptmreset_est.u.req.loc = tpm_pt->cur_locty_number;
-+
-+            if (ioctl(tpm_pt->tpm_fd, PTM_RESET_TPMESTABLISHED,
-+                      &ptmreset_est) < 0) {
-+                error_report("tpm_cuse: Could not reset the establishment bit "
-+                             "failed: %s",
-+                             strerror(errno));
-+                rc = -1;
-+            }
-+        }
-+    }
-+    return rc;
- }
- 
- static bool tpm_passthrough_get_startup_error(TPMBackend *tb)
-@@ -329,7 +484,8 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
- {
-     TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
--    int n;
-+    ptm_res res;
-+    static bool error_printed;
- 
-     /*
-      * As of Linux 3.7 the tpm_tis driver does not properly cancel
-@@ -338,17 +494,34 @@ static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
-      * command, e.g., a command executed on the host.
-      */
-     if (tpm_pt->tpm_executing) {
--        if (tpm_pt->cancel_fd >= 0) {
--            n = write(tpm_pt->cancel_fd, "-", 1);
--            if (n != 1) {
--                error_report("Canceling TPM command failed: %s",
--                             strerror(errno));
--            } else {
--                tpm_pt->tpm_op_canceled = true;
-+        if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+            if (TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, PTM_CAP_CANCEL_TPM_CMD)) {
-+                if (ioctl(tpm_pt->tpm_fd, PTM_CANCEL_TPM_CMD, &res) < 0) {
-+                    error_report("tpm_cuse: Could not cancel command on "
-+                                 "CUSE TPM: %s",
-+                                 strerror(errno));
-+                } else if (res != TPM_SUCCESS) {
-+                    if (!error_printed) {
-+                        error_report("TPM error code from command "
-+                                     "cancellation of CUSE TPM: 0x%x", res);
-+                        error_printed = true;
-+                    }
-+                } else {
-+                    tpm_pt->tpm_op_canceled = true;
-+                }
-             }
-         } else {
--            error_report("Cannot cancel TPM command due to missing "
--                         "TPM sysfs cancel entry");
-+            if (tpm_pt->cancel_fd >= 0) {
-+                if (write(tpm_pt->cancel_fd, "-", 1) != 1) {
-+                    error_report("Canceling TPM command failed: %s",
-+                                 strerror(errno));
-+                } else {
-+                    tpm_pt->tpm_op_canceled = true;
-+                }
-+            } else {
-+                error_report("Cannot cancel TPM command due to missing "
-+                             "TPM sysfs cancel entry");
-+            }
-         }
-     }
- }
-@@ -378,6 +551,11 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb)
-     char *dev;
-     char path[PATH_MAX];
- 
-+    if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+        /* not needed, but so we have a fd */
-+        return qemu_open("/dev/null", O_WRONLY);
-+    }
-+
-     if (tb->cancel_path) {
-         fd = qemu_open(tb->cancel_path, O_WRONLY);
-         if (fd < 0) {
-@@ -412,12 +590,22 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- {
-     TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-     const char *value;
-+    bool have_cuse = false;
-+
-+    value = qemu_opt_get(opts, "type");
-+    if (value != NULL && !strcmp("cuse-tpm", value)) {
-+        have_cuse = true;
-+    }
- 
-     value = qemu_opt_get(opts, "cancel-path");
-     tb->cancel_path = g_strdup(value);
- 
-     value = qemu_opt_get(opts, "path");
-     if (!value) {
-+        if (have_cuse) {
-+            error_report("Missing path to access CUSE TPM");
-+            goto err_free_parameters;
-+        }
-         value = TPM_PASSTHROUGH_DEFAULT_DEVICE;
-     }
- 
-@@ -432,15 +620,36 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
-         goto err_free_parameters;
-     }
- 
-+    tpm_pt->cur_locty_number = ~0;
-+
-+    if (have_cuse) {
-+        if (tpm_passthrough_cuse_probe(tpm_pt)) {
-+            goto err_close_tpmdev;
-+        }
-+        /* init TPM for probing */
-+        if (tpm_passthrough_cuse_init(tpm_pt)) {
-+            goto err_close_tpmdev;
-+        }
-+    }
-+
-     if (tpm_util_test_tpmdev(tpm_pt->tpm_fd, &tpm_pt->tpm_version)) {
-         error_report("'%s' is not a TPM device.",
-                      tpm_pt->tpm_dev);
-         goto err_close_tpmdev;
-     }
- 
-+    if (have_cuse) {
-+        if (tpm_passthrough_cuse_check_caps(tpm_pt)) {
-+            goto err_close_tpmdev;
-+        }
-+    }
-+
-+
-     return 0;
- 
-  err_close_tpmdev:
-+    tpm_passthrough_shutdown(tpm_pt);
-+
-     qemu_close(tpm_pt->tpm_fd);
-     tpm_pt->tpm_fd = -1;
- 
-@@ -491,6 +700,8 @@ static void tpm_passthrough_destroy(TPMBackend *tb)
- 
-     tpm_backend_thread_end(&tpm_pt->tbt);
- 
-+    tpm_passthrough_shutdown(tpm_pt);
-+
-     qemu_close(tpm_pt->tpm_fd);
-     qemu_close(tpm_pt->cancel_fd);
- 
-@@ -564,3 +775,44 @@ static void tpm_passthrough_register(void)
- }
- 
- type_init(tpm_passthrough_register)
-+
-+/* CUSE TPM */
-+static const char *tpm_passthrough_cuse_create_desc(void)
-+{
-+    return "CUSE TPM backend driver";
-+}
-+
-+static const TPMDriverOps tpm_cuse_driver = {
-+    .type                     = TPM_TYPE_CUSE_TPM,
-+    .opts                     = tpm_passthrough_cmdline_opts,
-+    .desc                     = tpm_passthrough_cuse_create_desc,
-+    .create                   = tpm_passthrough_create,
-+    .destroy                  = tpm_passthrough_destroy,
-+    .init                     = tpm_passthrough_init,
-+    .startup_tpm              = tpm_passthrough_startup_tpm,
-+    .realloc_buffer           = tpm_passthrough_realloc_buffer,
-+    .reset                    = tpm_passthrough_reset,
-+    .had_startup_error        = tpm_passthrough_get_startup_error,
-+    .deliver_request          = tpm_passthrough_deliver_request,
-+    .cancel_cmd               = tpm_passthrough_cancel_cmd,
-+    .get_tpm_established_flag = tpm_passthrough_get_tpm_established_flag,
-+    .reset_tpm_established_flag = tpm_passthrough_reset_tpm_established_flag,
-+    .get_tpm_version          = tpm_passthrough_get_tpm_version,
-+};
-+
-+static const TypeInfo tpm_cuse_info = {
-+    .name = TYPE_TPM_CUSE,
-+    .parent = TYPE_TPM_BACKEND,
-+    .instance_size = sizeof(TPMPassthruState),
-+    .class_init = tpm_passthrough_class_init,
-+    .instance_init = tpm_passthrough_inst_init,
-+    .instance_finalize = tpm_passthrough_inst_finalize,
-+};
-+
-+static void tpm_cuse_register(void)
-+{
-+    type_register_static(&tpm_cuse_info);
-+    tpm_register_driver(&tpm_cuse_driver);
-+}
-+
-+type_init(tpm_cuse_register)
-diff --git a/qapi-schema.json b/qapi-schema.json
-index 5658723b37..53120d0f63 100644
---- a/qapi-schema.json
-+++ b/qapi-schema.json
-@@ -3522,10 +3522,12 @@
- # An enumeration of TPM types
- #
- # @passthrough: TPM passthrough type
-+# @cuse-tpm: CUSE TPM type
-+#            Since: 2.6
- #
- # Since: 1.5
- ##
--{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
-+{ 'enum': 'TpmType', 'data': [ 'passthrough', 'cuse-tpm' ] }
- 
- ##
- # @query-tpm-types:
-@@ -3554,6 +3556,17 @@
-                                              '*cancel-path' : 'str'} }
- 
- ##
-+# @TPMCuseOptions:
-+#
-+# Information about the CUSE TPM type
-+#
-+# @path: string describing the path used for accessing the TPM device
-+#
-+# Since: 2.6
-+##
-+{ 'struct': 'TPMCuseOptions', 'data': { 'path' : 'str'}}
-+
-+##
- # @TpmTypeOptions:
- #
- # A union referencing different TPM backend types' configuration options
-@@ -3563,7 +3576,8 @@
- # Since: 1.5
- ##
- { 'union': 'TpmTypeOptions',
--   'data': { 'passthrough' : 'TPMPassthroughOptions' } }
-+   'data': { 'passthrough' : 'TPMPassthroughOptions',
-+             'cuse-tpm' : 'TPMCuseOptions' } }
- 
- ##
- # @TpmInfo:
-diff --git a/qemu-options.hx b/qemu-options.hx
-index a71aaf8ea8..e0f1d8e676 100644
---- a/qemu-options.hx
-+++ b/qemu-options.hx
-@@ -2763,7 +2763,10 @@ DEF("tpmdev", HAS_ARG, QEMU_OPTION_tpmdev, \
-     "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
-     "                use path to provide path to a character device; default is /dev/tpm0\n"
-     "                use cancel-path to provide path to TPM's cancel sysfs entry; if\n"
--    "                not provided it will be searched for in /sys/class/misc/tpm?/device\n",
-+    "                not provided it will be searched for in /sys/class/misc/tpm?/device\n"
-+    "-tpmdev cuse-tpm,id=id,path=path\n"
-+    "                use path to provide path to a character device to talk to the\n"
-+    "                TPM emulator providing a CUSE interface\n",
-     QEMU_ARCH_ALL)
- STEXI
- 
-@@ -2772,8 +2775,8 @@ The general form of a TPM device option is:
- 
- @item -tpmdev @var{backend} ,id=@var{id} [,@var{options}]
- @findex -tpmdev
--Backend type must be:
--@option{passthrough}.
-+Backend type must be either one of the following:
-+@option{passthrough}, @option{cuse-tpm}.
- 
- The specific backend type will determine the applicable options.
- The @code{-tpmdev} option creates the TPM backend and requires a
-@@ -2823,6 +2826,18 @@ To create a passthrough TPM use the following two options:
- Note that the @code{-tpmdev} id is @code{tpm0} and is referenced by
- @code{tpmdev=tpm0} in the device option.
- 
-+@item -tpmdev cuse-tpm, id=@var{id}, path=@var{path}
-+
-+(Linux-host only) Enable access to a TPM emulator with a CUSE interface.
-+
-+@option{path} specifies the path to the CUSE TPM character device.
-+
-+To create a backend device accessing the CUSE TPM emulator using /dev/vtpm
-+use the following two options:
-+@example
-+-tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm -device tpm-tis,tpmdev=tpm0
-+@end example
-+
- @end table
- 
- ETEXI
-diff --git a/tpm.c b/tpm.c
-index 9a7c7114d3..5ec2373286 100644
---- a/tpm.c
-+++ b/tpm.c
-@@ -25,7 +25,7 @@ static QLIST_HEAD(, TPMBackend) tpm_backends =
- 
- 
- #define TPM_MAX_MODELS      1
--#define TPM_MAX_DRIVERS     1
-+#define TPM_MAX_DRIVERS     2
- 
- static TPMDriverOps const *be_drivers[TPM_MAX_DRIVERS] = {
-     NULL,
-@@ -272,6 +272,15 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv)
-             tpo->has_cancel_path = true;
-         }
-         break;
-+    case TPM_TYPE_CUSE_TPM:
-+        res->options->type = TPM_TYPE_OPTIONS_KIND_CUSE_TPM;
-+        tpo = g_new0(TPMPassthroughOptions, 1);
-+        res->options->u.passthrough.data = tpo;
-+        if (drv->path) {
-+            tpo->path = g_strdup(drv->path);
-+            tpo->has_path = true;
-+        }
-+        break;
-     case TPM_TYPE__MAX:
-         break;
-     }
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
new file mode 100644
index 0000000..f90cae6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
@@ -0,0 +1,67 @@
+From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Fri, 23 Mar 2018 18:26:45 +0000
+Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
+ DISAS_EXIT
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In OE project 4.15 linux kernel boot hang was observed under
+single cpu aarch64 qemu. Kernel code was in a loop waiting for
+vtimer arrival, spinning in TC generated blocks, while interrupt
+was pending unprocessed. This happened because when qemu tried to
+handle vtimer interrupt target had interrupts disabled, as
+result flag indicating TCG exit, cpu->icount_decr.u16.high,
+was cleared but arm_cpu_exec_interrupt function did not call
+arm_cpu_do_interrupt to process interrupt. Later when target
+reenabled interrupts, it happened without exit into main loop, so
+following code that waited for result of interrupt execution
+run in infinite loop.
+
+To solve the problem instructions that operate on CPU sys state
+(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
+should be considered as DISAS_EXIT variant, and should be
+forced to exit back to main loop so qemu will have a chance
+processing pending CPU state updates, including pending
+interrupts.
+
+This change brings consistency with how DISAS_UPDATE is treated
+in aarch32 case.
+
+CC: Peter Maydell <peter.maydell@linaro.org>
+CC: Alex Bennée <alex.bennee@linaro.org>
+CC: qemu-stable@nongnu.org
+Suggested-by: Peter Maydell <peter.maydell@linaro.org>
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
+Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
+Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
+Upstream-Status: Backport
+---
+ target/arm/translate-a64.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
+index 31ff047..327513e 100644
+--- a/target/arm/translate-a64.c
++++ b/target/arm/translate-a64.c
+@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
+         case DISAS_UPDATE:
+             gen_a64_set_pc_im(dc->pc);
+             /* fall through */
+-        case DISAS_JUMP:
+-            tcg_gen_lookup_and_goto_ptr();
+-            break;
+         case DISAS_EXIT:
+             tcg_gen_exit_tb(0);
+             break;
++        case DISAS_JUMP:
++            tcg_gen_lookup_and_goto_ptr();
++            break;
+         case DISAS_NORETURN:
+         case DISAS_SWI:
+             break;
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch
deleted file mode 100644
index c88c98e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From b5ffd3aa4e9bd4edb09cc84c46f78da72697a946 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 2/4] Introduce condition to notify waiters of completed
- command
-
-Introduce a lock and a condition to notify anyone waiting for the completion
-of the execution of a TPM command by the backend (thread). The backend
-uses the condition to signal anyone waiting for command completion.
-We need to place the condition in two locations: one is invoked by the
-backend thread, the other by the bottom half thread.
-We will use the signalling to wait for command completion before VM
-suspend.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_int.h |  3 +++
- hw/tpm/tpm_tis.c | 14 ++++++++++++++
- 2 files changed, 17 insertions(+)
-
-diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
-index 6b2c9c953a..70be1ad8d9 100644
---- a/hw/tpm/tpm_int.h
-+++ b/hw/tpm/tpm_int.h
-@@ -30,6 +30,9 @@ struct TPMState {
-     char *backend;
-     TPMBackend *be_driver;
-     TPMVersion be_tpm_version;
-+
-+    QemuMutex state_lock;
-+    QemuCond cmd_complete;
- };
- 
- #define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
-diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
-index 381e7266ea..14d9e83ea2 100644
---- a/hw/tpm/tpm_tis.c
-+++ b/hw/tpm/tpm_tis.c
-@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque)
-     TPMTISEmuState *tis = &s->s.tis;
-     uint8_t locty = s->locty_number;
- 
-+    qemu_mutex_lock(&s->state_lock);
-+
-     tpm_tis_sts_set(&tis->loc[locty],
-                     TPM_TIS_STS_VALID | TPM_TIS_STS_DATA_AVAILABLE);
-     tis->loc[locty].state = TPM_TIS_STATE_COMPLETION;
-@@ -384,6 +386,10 @@ static void tpm_tis_receive_bh(void *opaque)
-     tpm_tis_raise_irq(s, locty,
-                       TPM_TIS_INT_DATA_AVAILABLE | TPM_TIS_INT_STS_VALID);
- #endif
-+
-+    /* notify of completed command */
-+    qemu_cond_signal(&s->cmd_complete);
-+    qemu_mutex_unlock(&s->state_lock);
- }
- 
- /*
-@@ -403,6 +409,11 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
-         }
-     }
- 
-+    qemu_mutex_lock(&s->state_lock);
-+    /* notify of completed command */
-+    qemu_cond_signal(&s->cmd_complete);
-+    qemu_mutex_unlock(&s->state_lock);
-+
-     qemu_bh_schedule(tis->bh);
- }
- 
-@@ -1072,6 +1083,9 @@ static void tpm_tis_initfn(Object *obj)
-     memory_region_init_io(&s->mmio, OBJECT(s), &tpm_tis_memory_ops,
-                           s, "tpm-tis-mmio",
-                           TPM_TIS_NUM_LOCALITIES << TPM_TIS_LOCALITY_SHIFT);
-+
-+    qemu_mutex_init(&s->state_lock);
-+    qemu_cond_init(&s->cmd_complete);
- }
- 
- static void tpm_tis_class_init(ObjectClass *klass, void *data)
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch
deleted file mode 100644
index e58f019..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 732a8e046948fd62b32cd1dd76a6798eb1caf4d6 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 3/4] Introduce condition in TPM backend for notification
-
-TPM backends will suspend independently of the frontends. Also
-here we need to be able to wait for the TPM command to have been
-completely processed.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_passthrough.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index 050f2ba850..44739ebad2 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -75,6 +75,10 @@ struct TPMPassthruState {
-     TPMVersion tpm_version;
-     ptm_cap cuse_cap; /* capabilities of the CUSE TPM */
-     uint8_t cur_locty_number; /* last set locality */
-+
-+    QemuMutex state_lock;
-+    QemuCond cmd_complete;  /* singnaled once tpm_busy is false */
-+    bool tpm_busy;
- };
- 
- typedef struct TPMPassthruState TPMPassthruState;
-@@ -274,6 +278,11 @@ static void tpm_passthrough_worker_thread(gpointer data,
-         thr_parms->recv_data_callback(thr_parms->tpm_state,
-                                       thr_parms->tpm_state->locty_number,
-                                       selftest_done);
-+        /* result delivered */
-+        qemu_mutex_lock(&tpm_pt->state_lock);
-+        tpm_pt->tpm_busy = false;
-+        qemu_cond_signal(&tpm_pt->cmd_complete);
-+        qemu_mutex_unlock(&tpm_pt->state_lock);
-         break;
-     case TPM_BACKEND_CMD_INIT:
-     case TPM_BACKEND_CMD_END:
-@@ -401,6 +410,7 @@ static void tpm_passthrough_reset(TPMBackend *tb)
-     tpm_backend_thread_end(&tpm_pt->tbt);
- 
-     tpm_pt->had_startup_error = false;
-+    tpm_pt->tpm_busy = false;
- }
- 
- static int tpm_passthrough_init(TPMBackend *tb, TPMState *s,
-@@ -478,6 +488,11 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- {
-     TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
- 
-+    /* TPM considered busy once TPM Request scheduled for processing */
-+    qemu_mutex_lock(&tpm_pt->state_lock);
-+    tpm_pt->tpm_busy = true;
-+    qemu_mutex_unlock(&tpm_pt->state_lock);
-+
-     tpm_backend_thread_deliver_request(&tpm_pt->tbt);
- }
- 
-@@ -746,6 +761,11 @@ static const TPMDriverOps tpm_passthrough_driver = {
- 
- static void tpm_passthrough_inst_init(Object *obj)
- {
-+    TPMBackend *tb = TPM_BACKEND(obj);
-+    TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+    qemu_mutex_init(&tpm_pt->state_lock);
-+    qemu_cond_init(&tpm_pt->cmd_complete);
- }
- 
- static void tpm_passthrough_inst_finalize(Object *obj)
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
deleted file mode 100644
index f1dbaff..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
+++ /dev/null
@@ -1,719 +0,0 @@
-From 5e9dd9063f514447ea4f54046793f4f01c297ed4 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 4/4] Add support for VM suspend/resume for TPM TIS
-
-Extend the TPM TIS code to support suspend/resume. In case a command
-is being processed by the external TPM when suspending, wait for the command
-to complete to catch the result. In case the bottom half did not run,
-run the one function the bottom half is supposed to run. This then
-makes the resume operation work.
-
-The passthrough backend does not support suspend/resume operation
-and is therefore blocked from suspend/resume and migration.
-
-The CUSE TPM's supported capabilities are tested and if sufficient
-capabilities are implemented, suspend/resume, snapshotting and
-migration are supported by the CUSE TPM.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_passthrough.c     | 130 +++++++++++++++++++++++--
- hw/tpm/tpm_tis.c             | 137 +++++++++++++++++++++++++-
- hw/tpm/tpm_tis.h             |   2 +
- hw/tpm/tpm_util.c            | 223 +++++++++++++++++++++++++++++++++++++++++++
- hw/tpm/tpm_util.h            |   7 ++
- include/sysemu/tpm_backend.h |  12 +++
- 6 files changed, 503 insertions(+), 8 deletions(-)
-
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index 44739ebad2..bc8072d0bc 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -34,6 +34,8 @@
- #include "tpm_tis.h"
- #include "tpm_util.h"
- #include "tpm_ioctl.h"
-+#include "migration/migration.h"
-+#include "qapi/error.h"
- 
- #define DEBUG_TPM 0
- 
-@@ -49,6 +51,7 @@
- #define TYPE_TPM_CUSE "tpm-cuse"
- 
- static const TPMDriverOps tpm_passthrough_driver;
-+static const VMStateDescription vmstate_tpm_cuse;
- 
- /* data structures */
- typedef struct TPMPassthruThreadParams {
-@@ -79,6 +82,10 @@ struct TPMPassthruState {
-     QemuMutex state_lock;
-     QemuCond cmd_complete;  /* singnaled once tpm_busy is false */
-     bool tpm_busy;
-+
-+    Error *migration_blocker;
-+
-+    TPMBlobBuffers tpm_blobs;
- };
- 
- typedef struct TPMPassthruState TPMPassthruState;
-@@ -306,6 +313,10 @@ static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt)
-                          strerror(errno));
-         }
-     }
-+    if (tpm_pt->migration_blocker) {
-+        migrate_del_blocker(tpm_pt->migration_blocker);
-+        error_free(tpm_pt->migration_blocker);
-+    }
- }
- 
- /*
-@@ -360,12 +371,14 @@ static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt)
- /*
-  * Initialize the external CUSE TPM
-  */
--static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt)
-+static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt,
-+                                     bool is_resume)
- {
-     int rc = 0;
--    ptm_init init = {
--        .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE,
--    };
-+    ptm_init init;
-+    if (is_resume) {
-+        init.u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE;
-+    }
- 
-     if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-         if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) {
-@@ -394,7 +407,7 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb)
-                               tpm_passthrough_worker_thread,
-                               &tpm_pt->tpm_thread_params);
- 
--    tpm_passthrough_cuse_init(tpm_pt);
-+    tpm_passthrough_cuse_init(tpm_pt, false);
- 
-     return 0;
- }
-@@ -466,6 +479,32 @@ static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb,
-     return rc;
- }
- 
-+static int tpm_cuse_get_state_blobs(TPMBackend *tb,
-+                                    bool decrypted_blobs,
-+                                    TPMBlobBuffers *tpm_blobs)
-+{
-+    TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+    assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt));
-+
-+    return tpm_util_cuse_get_state_blobs(tpm_pt->tpm_fd, decrypted_blobs,
-+                                         tpm_blobs);
-+}
-+
-+static int tpm_cuse_set_state_blobs(TPMBackend *tb,
-+                                    TPMBlobBuffers *tpm_blobs)
-+{
-+    TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+    assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt));
-+
-+    if (tpm_util_cuse_set_state_blobs(tpm_pt->tpm_fd, tpm_blobs)) {
-+        return 1;
-+    }
-+
-+    return tpm_passthrough_cuse_init(tpm_pt, true);
-+}
-+
- static bool tpm_passthrough_get_startup_error(TPMBackend *tb)
- {
-     TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-@@ -488,7 +527,7 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- {
-     TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
- 
--    /* TPM considered busy once TPM Request scheduled for processing */
-+    /* TPM considered busy once TPM request scheduled for processing */
-     qemu_mutex_lock(&tpm_pt->state_lock);
-     tpm_pt->tpm_busy = true;
-     qemu_mutex_unlock(&tpm_pt->state_lock);
-@@ -601,6 +640,25 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb)
-     return fd;
- }
- 
-+static void tpm_passthrough_block_migration(TPMPassthruState *tpm_pt)
-+{
-+    ptm_cap caps;
-+
-+    if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+        caps = PTM_CAP_GET_STATEBLOB | PTM_CAP_SET_STATEBLOB |
-+               PTM_CAP_STOP;
-+        if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) {
-+            error_setg(&tpm_pt->migration_blocker,
-+                       "Migration disabled: CUSE TPM lacks necessary capabilities");
-+            migrate_add_blocker(tpm_pt->migration_blocker);
-+        }
-+    } else {
-+        error_setg(&tpm_pt->migration_blocker,
-+                   "Migration disabled: Passthrough TPM does not support migration");
-+        migrate_add_blocker(tpm_pt->migration_blocker);
-+    }
-+}
-+
- static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- {
-     TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-@@ -642,7 +700,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
-             goto err_close_tpmdev;
-         }
-         /* init TPM for probing */
--        if (tpm_passthrough_cuse_init(tpm_pt)) {
-+        if (tpm_passthrough_cuse_init(tpm_pt, false)) {
-             goto err_close_tpmdev;
-         }
-     }
-@@ -659,6 +717,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
-         }
-     }
- 
-+    tpm_passthrough_block_migration(tpm_pt);
- 
-     return 0;
- 
-@@ -766,10 +825,13 @@ static void tpm_passthrough_inst_init(Object *obj)
- 
-     qemu_mutex_init(&tpm_pt->state_lock);
-     qemu_cond_init(&tpm_pt->cmd_complete);
-+
-+    vmstate_register(NULL, -1, &vmstate_tpm_cuse, obj);
- }
- 
- static void tpm_passthrough_inst_finalize(Object *obj)
- {
-+    vmstate_unregister(NULL, &vmstate_tpm_cuse, obj);
- }
- 
- static void tpm_passthrough_class_init(ObjectClass *klass, void *data)
-@@ -802,6 +864,60 @@ static const char *tpm_passthrough_cuse_create_desc(void)
-     return "CUSE TPM backend driver";
- }
- 
-+static void tpm_cuse_pre_save(void *opaque)
-+{
-+    TPMPassthruState *tpm_pt = opaque;
-+    TPMBackend *tb = &tpm_pt->parent;
-+
-+     qemu_mutex_lock(&tpm_pt->state_lock);
-+     /* wait for TPM to finish processing */
-+     if (tpm_pt->tpm_busy) {
-+        qemu_cond_wait(&tpm_pt->cmd_complete, &tpm_pt->state_lock);
-+     }
-+     qemu_mutex_unlock(&tpm_pt->state_lock);
-+
-+    /* get the decrypted state blobs from the TPM */
-+    tpm_cuse_get_state_blobs(tb, TRUE, &tpm_pt->tpm_blobs);
-+}
-+
-+static int tpm_cuse_post_load(void *opaque,
-+                              int version_id __attribute__((unused)))
-+{
-+    TPMPassthruState *tpm_pt = opaque;
-+    TPMBackend *tb = &tpm_pt->parent;
-+
-+    return tpm_cuse_set_state_blobs(tb, &tpm_pt->tpm_blobs);
-+}
-+
-+static const VMStateDescription vmstate_tpm_cuse = {
-+    .name = "cuse-tpm",
-+    .version_id = 1,
-+    .minimum_version_id = 0,
-+    .minimum_version_id_old = 0,
-+    .pre_save  = tpm_cuse_pre_save,
-+    .post_load = tpm_cuse_post_load,
-+    .fields = (VMStateField[]) {
-+        VMSTATE_UINT32(tpm_blobs.permanent_flags, TPMPassthruState),
-+        VMSTATE_UINT32(tpm_blobs.permanent.size, TPMPassthruState),
-+        VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.permanent.buffer,
-+                                     TPMPassthruState, 1, NULL,
-+                                     tpm_blobs.permanent.size),
-+
-+        VMSTATE_UINT32(tpm_blobs.volatil_flags, TPMPassthruState),
-+        VMSTATE_UINT32(tpm_blobs.volatil.size, TPMPassthruState),
-+        VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.volatil.buffer,
-+                                     TPMPassthruState, 1, NULL,
-+                                     tpm_blobs.volatil.size),
-+
-+        VMSTATE_UINT32(tpm_blobs.savestate_flags, TPMPassthruState),
-+        VMSTATE_UINT32(tpm_blobs.savestate.size, TPMPassthruState),
-+        VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.savestate.buffer,
-+                                     TPMPassthruState, 1, NULL,
-+                                     tpm_blobs.savestate.size),
-+        VMSTATE_END_OF_LIST()
-+    }
-+};
-+
- static const TPMDriverOps tpm_cuse_driver = {
-     .type                     = TPM_TYPE_CUSE_TPM,
-     .opts                     = tpm_passthrough_cmdline_opts,
-diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
-index 14d9e83ea2..9b660cf737 100644
---- a/hw/tpm/tpm_tis.c
-+++ b/hw/tpm/tpm_tis.c
-@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque)
-     TPMTISEmuState *tis = &s->s.tis;
-     uint8_t locty = s->locty_number;
- 
-+    tis->bh_scheduled = false;
-+
-     qemu_mutex_lock(&s->state_lock);
- 
-     tpm_tis_sts_set(&tis->loc[locty],
-@@ -415,6 +417,8 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
-     qemu_mutex_unlock(&s->state_lock);
- 
-     qemu_bh_schedule(tis->bh);
-+
-+    tis->bh_scheduled = true;
- }
- 
- /*
-@@ -1030,9 +1034,140 @@ static void tpm_tis_reset(DeviceState *dev)
-     tpm_tis_do_startup_tpm(s);
- }
- 
-+
-+/* persistent state handling */
-+
-+static void tpm_tis_pre_save(void *opaque)
-+{
-+    TPMState *s = opaque;
-+    TPMTISEmuState *tis = &s->s.tis;
-+    uint8_t locty = tis->active_locty;
-+
-+    DPRINTF("tpm_tis: suspend: locty = %d : r_offset = %d, w_offset = %d\n",
-+            locty, tis->loc[0].r_offset, tis->loc[0].w_offset);
-+#ifdef DEBUG_TIS
-+    tpm_tis_dump_state(opaque, 0);
-+#endif
-+
-+    qemu_mutex_lock(&s->state_lock);
-+
-+    /* wait for outstanding request to complete */
-+    if (TPM_TIS_IS_VALID_LOCTY(locty) &&
-+        tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) {
-+        /*
-+         * If we get here when the bh is scheduled but did not run,
-+         * we won't get notified...
-+         */
-+        if (!tis->bh_scheduled) {
-+            /* backend thread to notify us */
-+            qemu_cond_wait(&s->cmd_complete, &s->state_lock);
-+        }
-+        if (tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) {
-+            /* bottom half did not run - run its function */
-+            qemu_mutex_unlock(&s->state_lock);
-+            tpm_tis_receive_bh(opaque);
-+            qemu_mutex_lock(&s->state_lock);
-+        }
-+    }
-+
-+    qemu_mutex_unlock(&s->state_lock);
-+
-+    /* copy current active read or write buffer into the buffer
-+       written to disk */
-+    if (TPM_TIS_IS_VALID_LOCTY(locty)) {
-+        switch (tis->loc[locty].state) {
-+        case TPM_TIS_STATE_RECEPTION:
-+            memcpy(tis->buf,
-+                   tis->loc[locty].w_buffer.buffer,
-+                   MIN(sizeof(tis->buf),
-+                       tis->loc[locty].w_buffer.size));
-+            tis->offset = tis->loc[locty].w_offset;
-+        break;
-+        case TPM_TIS_STATE_COMPLETION:
-+            memcpy(tis->buf,
-+                   tis->loc[locty].r_buffer.buffer,
-+                   MIN(sizeof(tis->buf),
-+                       tis->loc[locty].r_buffer.size));
-+            tis->offset = tis->loc[locty].r_offset;
-+        break;
-+        default:
-+            /* leak nothing */
-+            memset(tis->buf, 0x0, sizeof(tis->buf));
-+        break;
-+        }
-+    }
-+}
-+
-+static int tpm_tis_post_load(void *opaque,
-+                             int version_id __attribute__((unused)))
-+{
-+    TPMState *s = opaque;
-+    TPMTISEmuState *tis = &s->s.tis;
-+
-+    uint8_t locty = tis->active_locty;
-+
-+    if (TPM_TIS_IS_VALID_LOCTY(locty)) {
-+        switch (tis->loc[locty].state) {
-+        case TPM_TIS_STATE_RECEPTION:
-+            memcpy(tis->loc[locty].w_buffer.buffer,
-+                   tis->buf,
-+                   MIN(sizeof(tis->buf),
-+                       tis->loc[locty].w_buffer.size));
-+            tis->loc[locty].w_offset = tis->offset;
-+        break;
-+        case TPM_TIS_STATE_COMPLETION:
-+            memcpy(tis->loc[locty].r_buffer.buffer,
-+                   tis->buf,
-+                   MIN(sizeof(tis->buf),
-+                       tis->loc[locty].r_buffer.size));
-+            tis->loc[locty].r_offset = tis->offset;
-+        break;
-+        default:
-+        break;
-+        }
-+    }
-+
-+    DPRINTF("tpm_tis: resume : locty = %d : r_offset = %d, w_offset = %d\n",
-+            locty, tis->loc[0].r_offset, tis->loc[0].w_offset);
-+
-+    return 0;
-+}
-+
-+static const VMStateDescription vmstate_locty = {
-+    .name = "loc",
-+    .version_id = 1,
-+    .minimum_version_id = 0,
-+    .minimum_version_id_old = 0,
-+    .fields      = (VMStateField[]) {
-+        VMSTATE_UINT32(state, TPMLocality),
-+        VMSTATE_UINT32(inte, TPMLocality),
-+        VMSTATE_UINT32(ints, TPMLocality),
-+        VMSTATE_UINT8(access, TPMLocality),
-+        VMSTATE_UINT32(sts, TPMLocality),
-+        VMSTATE_UINT32(iface_id, TPMLocality),
-+        VMSTATE_END_OF_LIST(),
-+    }
-+};
-+
- static const VMStateDescription vmstate_tpm_tis = {
-     .name = "tpm",
--    .unmigratable = 1,
-+    .version_id = 1,
-+    .minimum_version_id = 0,
-+    .minimum_version_id_old = 0,
-+    .pre_save  = tpm_tis_pre_save,
-+    .post_load = tpm_tis_post_load,
-+    .fields = (VMStateField[]) {
-+        VMSTATE_UINT32(s.tis.offset, TPMState),
-+        VMSTATE_BUFFER(s.tis.buf, TPMState),
-+        VMSTATE_UINT8(s.tis.active_locty, TPMState),
-+        VMSTATE_UINT8(s.tis.aborting_locty, TPMState),
-+        VMSTATE_UINT8(s.tis.next_locty, TPMState),
-+
-+        VMSTATE_STRUCT_ARRAY(s.tis.loc, TPMState, TPM_TIS_NUM_LOCALITIES, 1,
-+                             vmstate_locty, TPMLocality),
-+
-+        VMSTATE_END_OF_LIST()
-+    }
- };
- 
- static Property tpm_tis_properties[] = {
-diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h
-index a1df41fa21..b7fc0ea1a9 100644
---- a/hw/tpm/tpm_tis.h
-+++ b/hw/tpm/tpm_tis.h
-@@ -54,6 +54,8 @@ typedef struct TPMLocality {
- 
- typedef struct TPMTISEmuState {
-     QEMUBH *bh;
-+    bool bh_scheduled; /* bh scheduled but did not run yet */
-+
-     uint32_t offset;
-     uint8_t buf[TPM_TIS_BUFFER_MAX];
- 
-diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c
-index 7b35429725..b6ff74d946 100644
---- a/hw/tpm/tpm_util.c
-+++ b/hw/tpm/tpm_util.c
-@@ -22,6 +22,17 @@
- #include "qemu/osdep.h"
- #include "tpm_util.h"
- #include "tpm_int.h"
-+#include "tpm_ioctl.h"
-+#include "qemu/error-report.h"
-+
-+#define DEBUG_TPM 0
-+
-+#define DPRINTF(fmt, ...) do { \
-+    if (DEBUG_TPM) { \
-+        fprintf(stderr, fmt, ## __VA_ARGS__); \
-+    } \
-+} while (0)
-+
- 
- /*
-  * A basic test of a TPM device. We expect a well formatted response header
-@@ -125,3 +136,215 @@ int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version)
- 
-     return 1;
- }
-+
-+static void tpm_sized_buffer_reset(TPMSizedBuffer *tsb)
-+{
-+    g_free(tsb->buffer);
-+    tsb->buffer = NULL;
-+    tsb->size = 0;
-+}
-+
-+/*
-+ * Transfer a TPM state blob from the TPM into a provided buffer.
-+ *
-+ * @fd: file descriptor to talk to the CUSE TPM
-+ * @type: the type of blob to transfer
-+ * @decrypted_blob: whether we request to receive decrypted blobs
-+ * @tsb: the TPMSizeBuffer to fill with the blob
-+ * @flags: the flags to return to the caller
-+ */
-+static int tpm_util_cuse_get_state_blob(int fd,
-+                                        uint8_t type,
-+                                        bool decrypted_blob,
-+                                        TPMSizedBuffer *tsb,
-+                                        uint32_t *flags)
-+{
-+    ptm_getstate pgs;
-+    uint16_t offset = 0;
-+    ptm_res res;
-+    ssize_t n;
-+    size_t to_read;
-+
-+    tpm_sized_buffer_reset(tsb);
-+
-+    pgs.u.req.state_flags = (decrypted_blob) ? PTM_STATE_FLAG_DECRYPTED : 0;
-+    pgs.u.req.type = type;
-+    pgs.u.req.offset = offset;
-+
-+    if (ioctl(fd, PTM_GET_STATEBLOB, &pgs) < 0) {
-+        error_report("CUSE TPM PTM_GET_STATEBLOB ioctl failed: %s",
-+                     strerror(errno));
-+        goto err_exit;
-+    }
-+    res = pgs.u.resp.tpm_result;
-+    if (res != 0 && (res & 0x800) == 0) {
-+        error_report("Getting the stateblob (type %d) failed with a TPM "
-+                     "error 0x%x", type, res);
-+        goto err_exit;
-+    }
-+
-+    *flags = pgs.u.resp.state_flags;
-+
-+    tsb->buffer = g_malloc(pgs.u.resp.totlength);
-+    memcpy(tsb->buffer, pgs.u.resp.data, pgs.u.resp.length);
-+    tsb->size = pgs.u.resp.length;
-+
-+    /* if there are bytes left to get use read() interface */
-+    while (tsb->size < pgs.u.resp.totlength) {
-+        to_read = pgs.u.resp.totlength - tsb->size;
-+        if (unlikely(to_read > SSIZE_MAX)) {
-+            to_read = SSIZE_MAX;
-+        }
-+
-+        n = read(fd, &tsb->buffer[tsb->size], to_read);
-+        if (n != to_read) {
-+            error_report("Could not read stateblob (type %d) : %s",
-+                         type, strerror(errno));
-+            goto err_exit;
-+        }
-+        tsb->size += to_read;
-+    }
-+
-+    DPRINTF("tpm_util: got state blob type %d, %d bytes, flags 0x%08x, "
-+            "decrypted=%d\n", type, tsb->size, *flags, decrypted_blob);
-+
-+    return 0;
-+
-+err_exit:
-+    return 1;
-+}
-+
-+int tpm_util_cuse_get_state_blobs(int tpm_fd,
-+                                  bool decrypted_blobs,
-+                                  TPMBlobBuffers *tpm_blobs)
-+{
-+    if (tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT,
-+                                     decrypted_blobs,
-+                                     &tpm_blobs->permanent,
-+                                     &tpm_blobs->permanent_flags) ||
-+       tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE,
-+                                     decrypted_blobs,
-+                                     &tpm_blobs->volatil,
-+                                     &tpm_blobs->volatil_flags) ||
-+       tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE,
-+                                     decrypted_blobs,
-+                                     &tpm_blobs->savestate,
-+                                     &tpm_blobs->savestate_flags)) {
-+        goto err_exit;
-+    }
-+
-+    return 0;
-+
-+ err_exit:
-+    tpm_sized_buffer_reset(&tpm_blobs->volatil);
-+    tpm_sized_buffer_reset(&tpm_blobs->permanent);
-+    tpm_sized_buffer_reset(&tpm_blobs->savestate);
-+
-+    return 1;
-+}
-+
-+static int tpm_util_cuse_do_set_stateblob_ioctl(int fd,
-+                                                uint32_t flags,
-+                                                uint32_t type,
-+                                                uint32_t length)
-+{
-+    ptm_setstate pss;
-+
-+    pss.u.req.state_flags = flags;
-+    pss.u.req.type = type;
-+    pss.u.req.length = length;
-+
-+    if (ioctl(fd, PTM_SET_STATEBLOB, &pss) < 0) {
-+        error_report("CUSE TPM PTM_SET_STATEBLOB ioctl failed: %s",
-+                     strerror(errno));
-+        return 1;
-+    }
-+
-+    if (pss.u.resp.tpm_result != 0) {
-+        error_report("Setting the stateblob (type %d) failed with a TPM "
-+                     "error 0x%x", type, pss.u.resp.tpm_result);
-+        return 1;
-+    }
-+
-+    return 0;
-+}
-+
-+
-+/*
-+ * Transfer a TPM state blob to the CUSE TPM.
-+ *
-+ * @fd: file descriptor to talk to the CUSE TPM
-+ * @type: the type of TPM state blob to transfer
-+ * @tsb: TPMSizeBuffer containing the TPM state blob
-+ * @flags: Flags describing the (encryption) state of the TPM state blob
-+ */
-+static int tpm_util_cuse_set_state_blob(int fd,
-+                                        uint32_t type,
-+                                        TPMSizedBuffer *tsb,
-+                                        uint32_t flags)
-+{
-+    uint32_t offset = 0;
-+    ssize_t n;
-+    size_t to_write;
-+
-+    /* initiate the transfer to the CUSE TPM */
-+    if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) {
-+        return 1;
-+    }
-+
-+    /* use the write() interface for transferring the state blob */
-+    while (offset < tsb->size) {
-+        to_write = tsb->size - offset;
-+        if (unlikely(to_write > SSIZE_MAX)) {
-+            to_write = SSIZE_MAX;
-+        }
-+
-+        n = write(fd, &tsb->buffer[offset], to_write);
-+        if (n != to_write) {
-+            error_report("Writing the stateblob (type %d) failed: %s",
-+                         type, strerror(errno));
-+            goto err_exit;
-+        }
-+        offset += to_write;
-+    }
-+
-+    /* inidicate that the transfer is finished */
-+    if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) {
-+        goto err_exit;
-+    }
-+
-+    DPRINTF("tpm_util: set the state blob type %d, %d bytes, flags 0x%08x\n",
-+            type, tsb->size, flags);
-+
-+    return 0;
-+
-+err_exit:
-+    return 1;
-+}
-+
-+int tpm_util_cuse_set_state_blobs(int tpm_fd,
-+                                  TPMBlobBuffers *tpm_blobs)
-+{
-+    ptm_res res;
-+
-+    if (ioctl(tpm_fd, PTM_STOP, &res) < 0) {
-+        error_report("tpm_passthrough: Could not stop "
-+                     "the CUSE TPM: %s (%i)",
-+                     strerror(errno), errno);
-+        return 1;
-+    }
-+
-+    if (tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT,
-+                                     &tpm_blobs->permanent,
-+                                     tpm_blobs->permanent_flags) ||
-+        tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE,
-+                                     &tpm_blobs->volatil,
-+                                     tpm_blobs->volatil_flags) ||
-+        tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE,
-+                                     &tpm_blobs->savestate,
-+                                     tpm_blobs->savestate_flags)) {
-+        return 1;
-+    }
-+
-+    return 0;
-+}
-diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h
-index df76245e6e..c24071d812 100644
---- a/hw/tpm/tpm_util.h
-+++ b/hw/tpm/tpm_util.h
-@@ -26,4 +26,11 @@
- 
- int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version);
- 
-+int tpm_util_cuse_get_state_blobs(int tpm_fd,
-+                                  bool decrypted_blobs,
-+                                  TPMBlobBuffers *tpm_blobs);
-+
-+int tpm_util_cuse_set_state_blobs(int tpm_fd,
-+                                  TPMBlobBuffers *tpm_blobs);
-+
- #endif /* TPM_TPM_UTIL_H */
-diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
-index b58f52d39f..3403821b9d 100644
---- a/include/sysemu/tpm_backend.h
-+++ b/include/sysemu/tpm_backend.h
-@@ -62,6 +62,18 @@ typedef struct TPMSizedBuffer {
-     uint8_t  *buffer;
- } TPMSizedBuffer;
- 
-+/* blobs from the TPM; part of VM state when migrating */
-+typedef struct TPMBlobBuffers {
-+    uint32_t permanent_flags;
-+    TPMSizedBuffer permanent;
-+
-+    uint32_t volatil_flags;
-+    TPMSizedBuffer volatil;
-+
-+    uint32_t savestate_flags;
-+    TPMSizedBuffer savestate;
-+} TPMBlobBuffers;
-+
- struct TPMDriverOps {
-     enum TpmType type;
-     const QemuOptDesc *opts;
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch
deleted file mode 100644
index ce0b1ee..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch
+++ /dev/null
@@ -1,504 +0,0 @@
-From 3d90c6254863693a6b13d918d2b8682e08bbc681 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 28 Aug 2017 14:29:06 +0200
-Subject: [PATCH] vga: stop passing pointers to vga_draw_line* functions
-
-Instead pass around the address (aka offset into vga memory).
-Add vga_read_* helper functions which apply vbe_size_mask to
-the address, to make sure the address stays within the valid
-range, similar to the cirrus blitter fixes (commits ffaf857778
-and 026aeffcb4).
-
-Impact:  DoS for privileged guest users.  qemu crashes with
-a segfault, when hitting the guard page after vga memory
-allocation, while reading vga memory for display updates.
-
-Fixes: CVE-2017-13672
-Cc: P J P <ppandit@redhat.com>
-Reported-by: David Buchanan <d@vidbuchanan.co.uk>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-id: 20170828122906.18993-1-kraxel@redhat.com
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=3d90c6254863693a6b13d918d2b8682e08bbc681]
-
-CVE: CVE-2017-13672
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/display/vga-helpers.h | 202 ++++++++++++++++++++++++++---------------------
- hw/display/vga.c         |   5 +-
- hw/display/vga_int.h     |   1 +
- 3 files changed, 114 insertions(+), 94 deletions(-)
-
-diff --git a/hw/display/vga-helpers.h b/hw/display/vga-helpers.h
-index 94f6de2..5a752b3 100644
---- a/hw/display/vga-helpers.h
-+++ b/hw/display/vga-helpers.h
-@@ -95,20 +95,46 @@ static void vga_draw_glyph9(uint8_t *d, int linesize,
-     } while (--h);
- }
- 
-+static inline uint8_t vga_read_byte(VGACommonState *vga, uint32_t addr)
-+{
-+    return vga->vram_ptr[addr & vga->vbe_size_mask];
-+}
-+
-+static inline uint16_t vga_read_word_le(VGACommonState *vga, uint32_t addr)
-+{
-+    uint32_t offset = addr & vga->vbe_size_mask & ~1;
-+    uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset);
-+    return lduw_le_p(ptr);
-+}
-+
-+static inline uint16_t vga_read_word_be(VGACommonState *vga, uint32_t addr)
-+{
-+    uint32_t offset = addr & vga->vbe_size_mask & ~1;
-+    uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset);
-+    return lduw_be_p(ptr);
-+}
-+
-+static inline uint32_t vga_read_dword_le(VGACommonState *vga, uint32_t addr)
-+{
-+    uint32_t offset = addr & vga->vbe_size_mask & ~3;
-+    uint32_t *ptr = (uint32_t *)(vga->vram_ptr + offset);
-+    return ldl_le_p(ptr);
-+}
-+
- /*
-  * 4 color mode
-  */
--static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
--                           const uint8_t *s, int width)
-+static void vga_draw_line2(VGACommonState *vga, uint8_t *d,
-+                           uint32_t addr, int width)
- {
-     uint32_t plane_mask, *palette, data, v;
-     int x;
- 
--    palette = s1->last_palette;
--    plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+    palette = vga->last_palette;
-+    plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-     width >>= 3;
-     for(x = 0; x < width; x++) {
--        data = ((uint32_t *)s)[0];
-+        data = vga_read_dword_le(vga, addr);
-         data &= plane_mask;
-         v = expand2[GET_PLANE(data, 0)];
-         v |= expand2[GET_PLANE(data, 2)] << 2;
-@@ -124,7 +150,7 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
-         ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf];
-         ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf];
-         d += 32;
--        s += 4;
-+        addr += 4;
-     }
- }
- 
-@@ -134,17 +160,17 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
- /*
-  * 4 color mode, dup2 horizontal
-  */
--static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d,
--                             const uint8_t *s, int width)
-+static void vga_draw_line2d2(VGACommonState *vga, uint8_t *d,
-+                             uint32_t addr, int width)
- {
-     uint32_t plane_mask, *palette, data, v;
-     int x;
- 
--    palette = s1->last_palette;
--    plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+    palette = vga->last_palette;
-+    plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-     width >>= 3;
-     for(x = 0; x < width; x++) {
--        data = ((uint32_t *)s)[0];
-+        data = vga_read_dword_le(vga, addr);
-         data &= plane_mask;
-         v = expand2[GET_PLANE(data, 0)];
-         v |= expand2[GET_PLANE(data, 2)] << 2;
-@@ -160,24 +186,24 @@ static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d,
-         PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]);
-         PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]);
-         d += 64;
--        s += 4;
-+        addr += 4;
-     }
- }
- 
- /*
-  * 16 color mode
-  */
--static void vga_draw_line4(VGACommonState *s1, uint8_t *d,
--                           const uint8_t *s, int width)
-+static void vga_draw_line4(VGACommonState *vga, uint8_t *d,
-+                           uint32_t addr, int width)
- {
-     uint32_t plane_mask, data, v, *palette;
-     int x;
- 
--    palette = s1->last_palette;
--    plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+    palette = vga->last_palette;
-+    plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-     width >>= 3;
-     for(x = 0; x < width; x++) {
--        data = ((uint32_t *)s)[0];
-+        data = vga_read_dword_le(vga, addr);
-         data &= plane_mask;
-         v = expand4[GET_PLANE(data, 0)];
-         v |= expand4[GET_PLANE(data, 1)] << 1;
-@@ -192,24 +218,24 @@ static void vga_draw_line4(VGACommonState *s1, uint8_t *d,
-         ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf];
-         ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf];
-         d += 32;
--        s += 4;
-+        addr += 4;
-     }
- }
- 
- /*
-  * 16 color mode, dup2 horizontal
-  */
--static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
--                             const uint8_t *s, int width)
-+static void vga_draw_line4d2(VGACommonState *vga, uint8_t *d,
-+                             uint32_t addr, int width)
- {
-     uint32_t plane_mask, data, v, *palette;
-     int x;
- 
--    palette = s1->last_palette;
--    plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+    palette = vga->last_palette;
-+    plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-     width >>= 3;
-     for(x = 0; x < width; x++) {
--        data = ((uint32_t *)s)[0];
-+        data = vga_read_dword_le(vga, addr);
-         data &= plane_mask;
-         v = expand4[GET_PLANE(data, 0)];
-         v |= expand4[GET_PLANE(data, 1)] << 1;
-@@ -224,7 +250,7 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
-         PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]);
-         PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]);
-         d += 64;
--        s += 4;
-+        addr += 4;
-     }
- }
- 
-@@ -233,21 +259,21 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
-  *
-  * XXX: add plane_mask support (never used in standard VGA modes)
-  */
--static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d,
--                             const uint8_t *s, int width)
-+static void vga_draw_line8d2(VGACommonState *vga, uint8_t *d,
-+                             uint32_t addr, int width)
- {
-     uint32_t *palette;
-     int x;
- 
--    palette = s1->last_palette;
-+    palette = vga->last_palette;
-     width >>= 3;
-     for(x = 0; x < width; x++) {
--        PUT_PIXEL2(d, 0, palette[s[0]]);
--        PUT_PIXEL2(d, 1, palette[s[1]]);
--        PUT_PIXEL2(d, 2, palette[s[2]]);
--        PUT_PIXEL2(d, 3, palette[s[3]]);
-+        PUT_PIXEL2(d, 0, palette[vga_read_byte(vga, addr + 0)]);
-+        PUT_PIXEL2(d, 1, palette[vga_read_byte(vga, addr + 1)]);
-+        PUT_PIXEL2(d, 2, palette[vga_read_byte(vga, addr + 2)]);
-+        PUT_PIXEL2(d, 3, palette[vga_read_byte(vga, addr + 3)]);
-         d += 32;
--        s += 4;
-+        addr += 4;
-     }
- }
- 
-@@ -256,63 +282,63 @@ static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d,
-  *
-  * XXX: add plane_mask support (never used in standard VGA modes)
-  */
--static void vga_draw_line8(VGACommonState *s1, uint8_t *d,
--                           const uint8_t *s, int width)
-+static void vga_draw_line8(VGACommonState *vga, uint8_t *d,
-+                           uint32_t addr, int width)
- {
-     uint32_t *palette;
-     int x;
- 
--    palette = s1->last_palette;
-+    palette = vga->last_palette;
-     width >>= 3;
-     for(x = 0; x < width; x++) {
--        ((uint32_t *)d)[0] = palette[s[0]];
--        ((uint32_t *)d)[1] = palette[s[1]];
--        ((uint32_t *)d)[2] = palette[s[2]];
--        ((uint32_t *)d)[3] = palette[s[3]];
--        ((uint32_t *)d)[4] = palette[s[4]];
--        ((uint32_t *)d)[5] = palette[s[5]];
--        ((uint32_t *)d)[6] = palette[s[6]];
--        ((uint32_t *)d)[7] = palette[s[7]];
-+        ((uint32_t *)d)[0] = palette[vga_read_byte(vga, addr + 0)];
-+        ((uint32_t *)d)[1] = palette[vga_read_byte(vga, addr + 1)];
-+        ((uint32_t *)d)[2] = palette[vga_read_byte(vga, addr + 2)];
-+        ((uint32_t *)d)[3] = palette[vga_read_byte(vga, addr + 3)];
-+        ((uint32_t *)d)[4] = palette[vga_read_byte(vga, addr + 4)];
-+        ((uint32_t *)d)[5] = palette[vga_read_byte(vga, addr + 5)];
-+        ((uint32_t *)d)[6] = palette[vga_read_byte(vga, addr + 6)];
-+        ((uint32_t *)d)[7] = palette[vga_read_byte(vga, addr + 7)];
-         d += 32;
--        s += 8;
-+        addr += 8;
-     }
- }
- 
- /*
-  * 15 bit color
-  */
--static void vga_draw_line15_le(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line15_le(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
-     int w;
-     uint32_t v, r, g, b;
- 
-     w = width;
-     do {
--        v = lduw_le_p((void *)s);
-+        v = vga_read_word_le(vga, addr);
-         r = (v >> 7) & 0xf8;
-         g = (v >> 2) & 0xf8;
-         b = (v << 3) & 0xf8;
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 2;
-+        addr += 2;
-         d += 4;
-     } while (--w != 0);
- }
- 
--static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line15_be(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
-     int w;
-     uint32_t v, r, g, b;
- 
-     w = width;
-     do {
--        v = lduw_be_p((void *)s);
-+        v = vga_read_word_be(vga, addr);
-         r = (v >> 7) & 0xf8;
-         g = (v >> 2) & 0xf8;
-         b = (v << 3) & 0xf8;
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 2;
-+        addr += 2;
-         d += 4;
-     } while (--w != 0);
- }
-@@ -320,38 +346,38 @@ static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d,
- /*
-  * 16 bit color
-  */
--static void vga_draw_line16_le(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line16_le(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
-     int w;
-     uint32_t v, r, g, b;
- 
-     w = width;
-     do {
--        v = lduw_le_p((void *)s);
-+        v = vga_read_word_le(vga, addr);
-         r = (v >> 8) & 0xf8;
-         g = (v >> 3) & 0xfc;
-         b = (v << 3) & 0xf8;
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 2;
-+        addr += 2;
-         d += 4;
-     } while (--w != 0);
- }
- 
--static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line16_be(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
-     int w;
-     uint32_t v, r, g, b;
- 
-     w = width;
-     do {
--        v = lduw_be_p((void *)s);
-+        v = vga_read_word_be(vga, addr);
-         r = (v >> 8) & 0xf8;
-         g = (v >> 3) & 0xfc;
-         b = (v << 3) & 0xf8;
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 2;
-+        addr += 2;
-         d += 4;
-     } while (--w != 0);
- }
-@@ -359,36 +385,36 @@ static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d,
- /*
-  * 24 bit color
-  */
--static void vga_draw_line24_le(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line24_le(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
-     int w;
-     uint32_t r, g, b;
- 
-     w = width;
-     do {
--        b = s[0];
--        g = s[1];
--        r = s[2];
-+        b = vga_read_byte(vga, addr + 0);
-+        g = vga_read_byte(vga, addr + 1);
-+        r = vga_read_byte(vga, addr + 2);
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 3;
-+        addr += 3;
-         d += 4;
-     } while (--w != 0);
- }
- 
--static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line24_be(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
-     int w;
-     uint32_t r, g, b;
- 
-     w = width;
-     do {
--        r = s[0];
--        g = s[1];
--        b = s[2];
-+        r = vga_read_byte(vga, addr + 0);
-+        g = vga_read_byte(vga, addr + 1);
-+        b = vga_read_byte(vga, addr + 2);
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 3;
-+        addr += 3;
-         d += 4;
-     } while (--w != 0);
- }
-@@ -396,44 +422,36 @@ static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d,
- /*
-  * 32 bit color
-  */
--static void vga_draw_line32_le(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line32_le(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
--#ifndef HOST_WORDS_BIGENDIAN
--    memcpy(d, s, width * 4);
--#else
-     int w;
-     uint32_t r, g, b;
- 
-     w = width;
-     do {
--        b = s[0];
--        g = s[1];
--        r = s[2];
-+        b = vga_read_byte(vga, addr + 0);
-+        g = vga_read_byte(vga, addr + 1);
-+        r = vga_read_byte(vga, addr + 2);
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 4;
-+        addr += 4;
-         d += 4;
-     } while (--w != 0);
--#endif
- }
- 
--static void vga_draw_line32_be(VGACommonState *s1, uint8_t *d,
--                               const uint8_t *s, int width)
-+static void vga_draw_line32_be(VGACommonState *vga, uint8_t *d,
-+                               uint32_t addr, int width)
- {
--#ifdef HOST_WORDS_BIGENDIAN
--    memcpy(d, s, width * 4);
--#else
-     int w;
-     uint32_t r, g, b;
- 
-     w = width;
-     do {
--        r = s[1];
--        g = s[2];
--        b = s[3];
-+        r = vga_read_byte(vga, addr + 1);
-+        g = vga_read_byte(vga, addr + 2);
-+        b = vga_read_byte(vga, addr + 3);
-         ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
--        s += 4;
-+        addr += 4;
-         d += 4;
-     } while (--w != 0);
--#endif
- }
-diff --git a/hw/display/vga.c b/hw/display/vga.c
-index ad7a465..6fc8c87 100644
---- a/hw/display/vga.c
-+++ b/hw/display/vga.c
-@@ -1005,7 +1005,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
- }
- 
- typedef void vga_draw_line_func(VGACommonState *s1, uint8_t *d,
--                                const uint8_t *s, int width);
-+                                uint32_t srcaddr, int width);
- 
- #include "vga-helpers.h"
- 
-@@ -1666,7 +1666,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
-             if (y_start < 0)
-                 y_start = y;
-             if (!(is_buffer_shared(surface))) {
--                vga_draw_line(s, d, s->vram_ptr + addr, width);
-+                vga_draw_line(s, d, addr, width);
-                 if (s->cursor_draw_line)
-                     s->cursor_draw_line(s, d, y);
-             }
-@@ -2170,6 +2170,7 @@ void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate)
-     if (!s->vbe_size) {
-         s->vbe_size = s->vram_size;
-     }
-+    s->vbe_size_mask = s->vbe_size - 1;
- 
-     s->is_vbe_vmstate = 1;
-     memory_region_init_ram_nomigrate(&s->vram, obj, "vga.vram", s->vram_size,
-diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
-index dd6c958..ad34a1f 100644
---- a/hw/display/vga_int.h
-+++ b/hw/display/vga_int.h
-@@ -94,6 +94,7 @@ typedef struct VGACommonState {
-     uint32_t vram_size;
-     uint32_t vram_size_mb; /* property */
-     uint32_t vbe_size;
-+    uint32_t vbe_size_mask;
-     uint32_t latch;
-     bool has_chain4_alias;
-     MemoryRegion chain4_alias;
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch
deleted file mode 100644
index 3d0695f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From e65294157d4b69393b3f819c99f4f647452b48e3 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 28 Aug 2017 14:33:07 +0200
-Subject: [PATCH] vga: fix display update region calculation (split screen)
-
-vga display update mis-calculated the region for the dirty bitmap
-snapshot in case split screen mode is used.  This can trigger an
-assert in cpu_physical_memory_snapshot_get_dirty().
-
-Impact:  DoS for privileged guest users.
-
-Fixes: CVE-2017-13673
-Fixes: fec5e8c92becad223df9d972770522f64aafdb72
-Cc: P J P <ppandit@redhat.com>
-Reported-by: David Buchanan <d@vidbuchanan.co.uk>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-id: 20170828123307.15392-1-kraxel@redhat.com
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=e65294157d4b69393b3f819c99f4f647452b48e3]
-
-CVE: CVE-2017-13673
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/display/vga.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/hw/display/vga.c b/hw/display/vga.c
-index 3433102..ad7a465 100644
---- a/hw/display/vga.c
-+++ b/hw/display/vga.c
-@@ -1628,9 +1628,15 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
-     y1 = 0;
- 
-     if (!full_update) {
-+        ram_addr_t region_start = addr1;
-+        ram_addr_t region_end = addr1 + line_offset * height;
-         vga_sync_dirty_bitmap(s);
--        snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
--                                                      line_offset * height,
-+        if (s->line_compare < height) {
-+            /* split screen mode */
-+            region_start = 0;
-+        }
-+        snap = memory_region_snapshot_and_clear_dirty(&s->vram, region_start,
-+                                                      region_end - region_start,
-                                                       DIRTY_MEMORY_VGA);
-     }
- 
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch
deleted file mode 100644
index 352f73f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 1201d308519f1e915866d7583d5136d03cc1d384 Mon Sep 17 00:00:00 2001
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date: Fri, 25 Aug 2017 01:35:53 +0200
-Subject: [PATCH] slirp: fix clearing ifq_so from pending packets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The if_fastq and if_batchq contain not only packets, but queues of packets
-for the same socket. When sofree frees a socket, it thus has to clear ifq_so
-from all the packets from the queues, not only the first.
-
-Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
-Cc: qemu-stable@nongnu.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=1201d308519f1e915866d7583d5136d03cc1d384]
-
-CVE: CVE-2017-13711
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- slirp/socket.c | 39 +++++++++++++++++++++++----------------
- 1 file changed, 23 insertions(+), 16 deletions(-)
-
-diff --git a/slirp/socket.c b/slirp/socket.c
-index ecec029..cb7b5b6 100644
---- a/slirp/socket.c
-+++ b/slirp/socket.c
-@@ -60,29 +60,36 @@ socreate(Slirp *slirp)
- }
- 
- /*
-+ * Remove references to so from the given message queue.
-+ */
-+static void
-+soqfree(struct socket *so, struct quehead *qh)
-+{
-+    struct mbuf *ifq;
-+
-+    for (ifq = (struct mbuf *) qh->qh_link;
-+             (struct quehead *) ifq != qh;
-+             ifq = ifq->ifq_next) {
-+        if (ifq->ifq_so == so) {
-+            struct mbuf *ifm;
-+            ifq->ifq_so = NULL;
-+            for (ifm = ifq->ifs_next; ifm != ifq; ifm = ifm->ifs_next) {
-+                ifm->ifq_so = NULL;
-+            }
-+        }
-+    }
-+}
-+
-+/*
-  * remque and free a socket, clobber cache
-  */
- void
- sofree(struct socket *so)
- {
-   Slirp *slirp = so->slirp;
--  struct mbuf *ifm;
- 
--  for (ifm = (struct mbuf *) slirp->if_fastq.qh_link;
--       (struct quehead *) ifm != &slirp->if_fastq;
--       ifm = ifm->ifq_next) {
--    if (ifm->ifq_so == so) {
--      ifm->ifq_so = NULL;
--    }
--  }
--
--  for (ifm = (struct mbuf *) slirp->if_batchq.qh_link;
--       (struct quehead *) ifm != &slirp->if_batchq;
--       ifm = ifm->ifq_next) {
--    if (ifm->ifq_so == so) {
--      ifm->ifq_so = NULL;
--    }
--  }
-+  soqfree(so, &slirp->if_fastq);
-+  soqfree(so, &slirp->if_batchq);
- 
-   if (so->so_emu==EMU_RSH && so->extra) {
- 	sofree(so->extra);
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch
deleted file mode 100644
index 969ad87..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 7 Sep 2017 12:02:56 +0530
-Subject: [PATCH] multiboot: validate multiboot header address values
-
-While loading kernel via multiboot-v1 image, (flags & 0x00010000)
-indicates that multiboot header contains valid addresses to load
-the kernel image. These addresses are used to compute kernel
-size and kernel text offset in the OS image. Validate these
-address values to avoid an OOB access issue.
-
-This is CVE-2017-14167.
-
-Reported-by: Thomas Garnier <thgarnie@google.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Message-Id: <20170907063256.7418-1-ppandit@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb]
-
-CVE: CVE-2017-14167
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/i386/multiboot.c | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
-diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
-index 6001f4c..c7b70c9 100644
---- a/hw/i386/multiboot.c
-+++ b/hw/i386/multiboot.c
-@@ -221,15 +221,34 @@ int load_multiboot(FWCfgState *fw_cfg,
-         uint32_t mh_header_addr = ldl_p(header+i+12);
-         uint32_t mh_load_end_addr = ldl_p(header+i+20);
-         uint32_t mh_bss_end_addr = ldl_p(header+i+24);
-+
-         mh_load_addr = ldl_p(header+i+16);
-+        if (mh_header_addr < mh_load_addr) {
-+            fprintf(stderr, "invalid mh_load_addr address\n");
-+            exit(1);
-+        }
-+
-         uint32_t mb_kernel_text_offset = i - (mh_header_addr - mh_load_addr);
-         uint32_t mb_load_size = 0;
-         mh_entry_addr = ldl_p(header+i+28);
- 
-         if (mh_load_end_addr) {
-+            if (mh_bss_end_addr < mh_load_addr) {
-+                fprintf(stderr, "invalid mh_bss_end_addr address\n");
-+                exit(1);
-+            }
-             mb_kernel_size = mh_bss_end_addr - mh_load_addr;
-+
-+            if (mh_load_end_addr < mh_load_addr) {
-+                fprintf(stderr, "invalid mh_load_end_addr address\n");
-+                exit(1);
-+            }
-             mb_load_size = mh_load_end_addr - mh_load_addr;
-         } else {
-+            if (kernel_file_size < mb_kernel_text_offset) {
-+                fprintf(stderr, "invalid kernel_file_size\n");
-+                exit(1);
-+            }
-             mb_kernel_size = kernel_file_size - mb_kernel_text_offset;
-             mb_load_size = mb_kernel_size;
-         }
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
index 9bbbc6f..d6a3522 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -28,12 +28,12 @@
  hw/intc/apic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index 45887d99..c5ae4087 100644
---- a/hw/intc/apic.c
-+++ b/hw/intc/apic.c
-@@ -587,7 +587,7 @@ int apic_accept_pic_intr(DeviceState *dev)
-     APICCommonState *s = APIC_COMMON(dev);
+Index: qemu-2.11.1/hw/intc/apic.c
+===================================================================
+--- qemu-2.11.1.orig/hw/intc/apic.c
++++ qemu-2.11.1/hw/intc/apic.c
+@@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *de
+     APICCommonState *s = APIC(dev);
      uint32_t lvt0;
  
 -    if (!s)
@@ -41,6 +41,3 @@
          return -1;
  
      lvt0 = s->lvt[APIC_LVT_LINT0];
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
new file mode 100644
index 0000000..6e6bf95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
@@ -0,0 +1,242 @@
+From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Thu, 21 Dec 2017 11:35:16 -0800
+Subject: [PATCH] chardev: connect socket to a spawned command
+
+The command is started in a shell (sh -c) with stdin connect to QEMU
+via a Unix domain stream socket. QEMU then exchanges data via its own
+end of the socket, just like it normally does.
+
+"-chardev socket" supports some ways of connecting via protocols like
+telnet, but that is only a subset of the functionality supported by
+tools socat. To use socat instead, for example to connect via a socks
+proxy, use:
+
+  -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \
+  -device usb-serial,chardev=socat
+
+Beware that commas in the command must be escaped as double commas.
+
+Or interactively in the console:
+   (qemu) chardev-add socket,id=cat,cmd=cat
+   (qemu) device_add usb-serial,chardev=cat
+   ^ac
+   # cat >/dev/ttyUSB0
+   hello
+   hello
+
+Another usage is starting swtpm from inside QEMU. swtpm will
+automatically shut down once it looses the connection to the parent
+QEMU, so there is no risk of lingering processes:
+
+  -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \
+  -tpmdev emulator,id=tpm0,chardev=chrtpm0 \
+  -device tpm-tis,tpmdev=tpm0
+
+The patch was discussed upstream, but QEMU developers believe that the
+code calling QEMU should be responsible for managing additional
+processes. In OE-core, that would imply enhancing runqemu and
+oeqa. This patch is a simpler solution.
+
+Because it is not going upstream, the patch was written so that it is
+as simple as possible.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++---
+ chardev/char.c        |  3 ++
+ qapi/char.json        |  5 +++
+ 3 files changed, 90 insertions(+), 4 deletions(-)
+
+diff --git a/chardev/char-socket.c b/chardev/char-socket.c
+index 53eda8ef00..f566107c35 100644
+--- a/chardev/char-socket.c
++++ b/chardev/char-socket.c
+@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
+     return false;
+ }
+ 
++#ifndef _WIN32
++static void chardev_open_socket_cmd(Chardev *chr,
++                                    const char *cmd,
++                                    Error **errp)
++{
++    int fds[2] = { -1, -1 };
++    QIOChannelSocket *sioc = NULL;
++    pid_t pid = -1;
++    const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
++
++    /*
++     * We need a Unix domain socket for commands like swtpm and a single
++     * connection, therefore we cannot use qio_channel_command_new_spawn()
++     * without patching it first. Duplicating the functionality is easier.
++     */
++    if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) {
++        error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)");
++        goto error;
++    }
++
++    pid = qemu_fork(errp);
++    if (pid < 0) {
++        goto error;
++    }
++
++    if (!pid) {
++        /* child */
++        dup2(fds[1], STDIN_FILENO);
++        execv(argv[0], (char * const *)argv);
++        _exit(1);
++    }
++
++    /*
++     * Hand over our end of the socket pair to the qio channel.
++     *
++     * We don't reap the child because it is expected to keep
++     * running. We also don't support the "reconnect" option for the
++     * same reason.
++     */
++    sioc = qio_channel_socket_new_fd(fds[0], errp);
++    if (!sioc) {
++        goto error;
++    }
++    fds[0] = -1;
++
++    g_free(chr->filename);
++    chr->filename = g_strdup_printf("cmd:%s", cmd);
++    tcp_chr_new_client(chr, sioc);
++
++ error:
++    if (fds[0] >= 0) {
++        close(fds[0]);
++    }
++    if (fds[1] >= 0) {
++        close(fds[1]);
++    }
++    if (sioc) {
++        object_unref(OBJECT(sioc));
++    }
++}
++#endif
++
+ static void qmp_chardev_open_socket(Chardev *chr,
+                                     ChardevBackend *backend,
+                                     bool *be_opened,
+@@ -859,6 +921,9 @@
+ {
+     SocketChardev *s = SOCKET_CHARDEV(chr);
+     ChardevSocket *sock = backend->u.socket.data;
++#ifndef _WIN32
++    const char *cmd     = sock->cmd;
++#endif
+     bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
+     bool is_listen      = sock->has_server  ? sock->server  : true;
+     bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
+@@ -925,7 +990,14 @@
+     } else if (reconnect > 0) {
+         s->reconnect_time = reconnect;
+     }
+-
++#ifndef _WIN32
++    if (cmd) {
++        chardev_open_socket_cmd(chr, cmd, errp);
++
++        /* everything ready (or failed permanently) before we return */
++        *be_opened = true;
++    } else
++#endif
+     if (s->reconnect_time) {
+         sioc = qio_channel_socket_new();
+         tcp_chr_set_client_ioc_name(chr, sioc);
+@@ -985,10 +1057,26 @@
+     const char *host = qemu_opt_get(opts, "host");
+     const char *port = qemu_opt_get(opts, "port");
+     const char *tls_creds = qemu_opt_get(opts, "tls-creds");
++#ifndef _WIN32
++    const char *cmd = qemu_opt_get(opts, "cmd");
++#endif
+     SocketAddressLegacy *addr;
+     ChardevSocket *sock;
+ 
+     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
++#ifndef _WIN32
++    if (cmd) {
++        /*
++         * Here we have to ensure that no options are set which are incompatible with
++         * spawning a command, otherwise unmodified code that doesn't know about
++         * command spawning (like socket_reconnect_timeout()) might get called.
++         */
++        if (path || is_listen || is_telnet || is_tn3270 || reconnect || host || port || tls_creds) {
++            error_setg(errp, "chardev: socket: cmd does not support any additional options");
++            return;
++        }
++    } else
++#endif
+     if (!path) {
+         if (!host) {
+             error_setg(errp, "chardev: socket: no host given");
+@@ -1021,13 +1109,24 @@
+     sock->has_reconnect = true;
+     sock->reconnect = reconnect;
+     sock->tls_creds = g_strdup(tls_creds);
++#ifndef _WIN32
++    sock->cmd = g_strdup(cmd);
++#endif
+ 
+     addr = g_new0(SocketAddressLegacy, 1);
++#ifndef _WIN32
++    if (path || cmd) {
++#else
+     if (path) {
++#endif
+         UnixSocketAddress *q_unix;
+         addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
+         q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
++#ifndef _WIN32
++        q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
++#else
+         q_unix->path = g_strdup(path);
++#endif
+     } else {
+         addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
+         addr->u.inet.data = g_new(InetSocketAddress, 1);
+diff --git a/chardev/char.c b/chardev/char.c
+index 2ae4f465ec..5d52cd5de5 100644
+--- a/chardev/char.c
++++ b/chardev/char.c
+@@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
+         },{
+             .name = "path",
+             .type = QEMU_OPT_STRING,
++        },{
++            .name = "cmd",
++            .type = QEMU_OPT_STRING,
+         },{
+             .name = "host",
+             .type = QEMU_OPT_STRING,
+diff --git a/qapi/char.json b/qapi/char.json
+index ae19dcd1ed..6de0f29bcd 100644
+--- a/qapi/char.json
++++ b/qapi/char.json
+@@ -241,6 +241,10 @@
+ #
+ # @addr: socket address to listen on (server=true)
+ #        or connect to (server=false)
++# @cmd: command to run via "sh -c" with stdin as one end of
++#       a AF_UNIX SOCK_DSTREAM socket pair. The other end
++#       is used by the chardev. Either an addr or a cmd can
++#       be specified, but not both.
+ # @tls-creds: the ID of the TLS credentials object (since 2.6)
+ # @server: create server socket (default: true)
+ # @wait: wait for incoming connection on server
+@@ -258,6 +262,7 @@
+ # Since: 1.4
+ ##
+ { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddressLegacy',
++                                     '*cmd'       : 'str',
+                                      '*tls-creds'  : 'str',
+                                      '*server'    : 'bool',
+                                      '*wait'      : 'bool',
+-- 
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
new file mode 100644
index 0000000..f8d7f66
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
@@ -0,0 +1,63 @@
+From ee9a17d0e12143971a9676227cce953c0dbe52fb Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp@fedoraproject.org>
+Date: Thu, 16 Nov 2017 13:21:55 +0530
+Subject: [PATCH] ps2: check PS2Queue pointers in post_load routine
+
+During Qemu guest migration, a destination process invokes ps2
+post_load function. In that, if 'rptr' and 'count' values were
+invalid, it could lead to OOB access or infinite loop issue.
+Add check to avoid it.
+
+Reported-by: Cyrille Chatras <cyrille.chatras@orange.com>
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Message-id: 20171116075155.22378-1-ppandit@redhat.com
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+
+CVE: CVE-2017-16845
+Upstream-Status: Backport
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ hw/input/ps2.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/hw/input/ps2.c b/hw/input/ps2.c
+index f388a23..de171a2 100644
+--- a/hw/input/ps2.c
++++ b/hw/input/ps2.c
+@@ -1225,24 +1225,21 @@ static void ps2_common_reset(PS2State *s)
+ static void ps2_common_post_load(PS2State *s)
+ {
+     PS2Queue *q = &s->queue;
+-    int size;
+-    int i;
+-    int tmp_data[PS2_QUEUE_SIZE];
++    uint8_t i, size;
++    uint8_t tmp_data[PS2_QUEUE_SIZE];
+ 
+     /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */
+-    size = q->count > PS2_QUEUE_SIZE ? 0 : q->count;
++    size = (q->count < 0 || q->count > PS2_QUEUE_SIZE) ? 0 : q->count;
+ 
+     /* move the queue elements to the start of data array */
+-    if (size > 0) {
+-        for (i = 0; i < size; i++) {
+-            /* move the queue elements to the temporary buffer */
+-            tmp_data[i] = q->data[q->rptr];
+-            if (++q->rptr == 256) {
+-                q->rptr = 0;
+-            }
++    for (i = 0; i < size; i++) {
++        if (q->rptr < 0 || q->rptr >= sizeof(q->data)) {
++            q->rptr = 0;
+         }
+-        memcpy(q->data, tmp_data, size);
++        tmp_data[i] = q->data[q->rptr++];
+     }
++    memcpy(q->data, tmp_data, size);
++
+     /* reset rptr/wptr/count */
+     q->rptr = 0;
+     q->wptr = size;
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
index 123833f..7711789 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
@@ -24,11 +24,11 @@
  ui/sdl.c | 12 ++++++++++--
  1 file changed, 10 insertions(+), 2 deletions(-)
 
-diff --git a/ui/sdl.c b/ui/sdl.c
-index 39a42d6..9b8abe5 100644
---- a/ui/sdl.c
-+++ b/ui/sdl.c
-@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL;
+Index: qemu-2.11.1/ui/sdl.c
+===================================================================
+--- qemu-2.11.1.orig/ui/sdl.c
++++ qemu-2.11.1/ui/sdl.c
+@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
  static int scaling_active = 0;
  static Notifier mouse_mode_notifier;
  static int idle_counter;
@@ -37,10 +37,10 @@
 +#endif
 +static doing_grabs = True;
  
- static void sdl_update(DisplayChangeListener *dcl,
-                        int x, int y, int w, int h)
-@@ -384,14 +388,16 @@ static void sdl_grab_start(void)
-             }
+ #define SDL_REFRESH_INTERVAL_BUSY 10
+ #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
+@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
+         }
      } else
          sdl_hide_cursor();
 -    SDL_WM_GrabInput(SDL_GRAB_ON);
@@ -58,7 +58,7 @@
      gui_grab = 0;
      sdl_show_cursor();
      sdl_update_caption();
-@@ -909,6 +915,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
+@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
       * This requires SDL >= 1.2.14. */
      setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
  
@@ -67,6 +67,3 @@
      flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
      if (SDL_Init (flags)) {
          fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
--- 
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
deleted file mode 100644
index f593cf9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-[PATCH] exclude some arm EABI obsolete syscalls
-
-Upstream-Status: Pending
-
-some syscalls are obsolete and no longer available for EABI, exclude them to
-fix the below error:
-	In file included from qemu-seccomp.c:16:0:
-	qemu-seccomp.c:28:7: error: '__NR_select' undeclared here (not in a function)
-	      { SCMP_SYS(select), 252 },
-	        ^
-	qemu-seccomp.c:36:7: error: '__NR_mmap' undeclared here (not in a function)
-	      { SCMP_SYS(mmap), 247 },
-	        ^
-	qemu-seccomp.c:57:7: error: '__NR_getrlimit' undeclared here (not in a function)
-	      { SCMP_SYS(getrlimit), 245 },
-	        ^
-	qemu-seccomp.c:96:7: error: '__NR_time' undeclared here (not in a function)
-	      { SCMP_SYS(time), 245 },
-	        ^
-	qemu-seccomp.c:185:7: error: '__NR_alarm' undeclared here (not in a function)
-	      { SCMP_SYS(alarm), 241 },
-
-please refer source files:
-	arch/arm/include/uapi/asm/unistd.h
-or kernel header:
-	/usr/include/asm/unistd.h
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- qemu-seccomp.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/qemu-seccomp.c b/qemu-seccomp.c
-index df75d9c..0e577f8 100644
---- a/qemu-seccomp.c
-+++ b/qemu-seccomp.c
-@@ -35,15 +35,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
-     { SCMP_SYS(timer_settime), 255 },
-     { SCMP_SYS(timer_gettime), 254 },
-     { SCMP_SYS(futex), 253 },
-+#if !defined(__ARM_EABI__)
-     { SCMP_SYS(select), 252 },
-+    { SCMP_SYS(time), 245 },
-+    { SCMP_SYS(alarm), 241 },
-+    { SCMP_SYS(getrlimit), 245 },
-+    { SCMP_SYS(mmap), 247 },
-+    { SCMP_SYS(socketcall), 250 },
-+    { SCMP_SYS(ipc), 245 },
-+#endif
-     { SCMP_SYS(recvfrom), 251 },
-     { SCMP_SYS(sendto), 250 },
--    { SCMP_SYS(socketcall), 250 },
-     { SCMP_SYS(read), 249 },
-     { SCMP_SYS(io_submit), 249 },
-     { SCMP_SYS(brk), 248 },
-     { SCMP_SYS(clone), 247 },
--    { SCMP_SYS(mmap), 247 },
-     { SCMP_SYS(mprotect), 246 },
-     { SCMP_SYS(execve), 245 },
-     { SCMP_SYS(open), 245 },
-@@ -58,7 +64,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
-     { SCMP_SYS(bind), 245 },
-     { SCMP_SYS(listen), 245 },
-     { SCMP_SYS(semget), 245 },
--    { SCMP_SYS(ipc), 245 },
-     { SCMP_SYS(gettimeofday), 245 },
-     { SCMP_SYS(readlink), 245 },
-     { SCMP_SYS(access), 245 },
-@@ -104,7 +109,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
-     { SCMP_SYS(times), 245 },
-     { SCMP_SYS(exit), 245 },
-     { SCMP_SYS(clock_gettime), 245 },
--    { SCMP_SYS(time), 245 },
-     { SCMP_SYS(restart_syscall), 245 },
-     { SCMP_SYS(pwrite64), 245 },
-     { SCMP_SYS(nanosleep), 245 },
-@@ -194,7 +198,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
-     { SCMP_SYS(lstat64), 241 },
-     { SCMP_SYS(sendfile64), 241 },
-     { SCMP_SYS(ugetrlimit), 241 },
--    { SCMP_SYS(alarm), 241 },
-     { SCMP_SYS(rt_sigsuspend), 241 },
-     { SCMP_SYS(rt_sigqueueinfo), 241 },
-     { SCMP_SYS(rt_tgsigqueueinfo), 241 },
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
deleted file mode 100644
index a6908bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From: Christopher Covington
-Date: Wed, 28 Dec 2016 15:04:33 -0500
-Subject: [Qemu-devel] [PATCH v3] build: include sys/sysmacros.h for major() and minor()a
-
-The definition of the major() and minor() macros are moving within glibc to
-<sys/sysmacros.h>. Include this header when it is available to avoid the
-following sorts of build-stopping messages:
-
-qga/commands-posix.c: In function ‘dev_major_minor’:
-qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined
- by <sys/sysmacros.h>. For historical compatibility, it is
- currently defined by <sys/types.h> as well, but we plan to
- remove this soon. To use "major", include <sys/sysmacros.h>
- directly. If you did not intend to use a system-defined macro
- "major", you should undefine it after including <sys/types.h>. [-Werror]
-         *devmajor = major(st.st_rdev);
-             ^~~~~~~~~~~~~~~~~~~~~~~~~~
-
-qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined
- by <sys/sysmacros.h>. For historical compatibility, it is
- currently defined by <sys/types.h> as well, but we plan to
- remove this soon. To use "minor", include <sys/sysmacros.h>
- directly. If you did not intend to use a system-defined macro
- "minor", you should undefine it after including <sys/types.h>. [-Werror]
-         *devminor = minor(st.st_rdev);
-             ^~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The additional include allows the build to complete on Fedora 26 (Rawhide)
-with glibc version 2.24.90.
-
-Signed-off-by: Christopher Covington <address@hidden>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Submitted https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03548.html
-
-diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
---- qemu-2.8.0.orig/configure  2017-02-21 19:05:13.180094708 +0100
-+++ qemu-2.8.0/configure       2017-02-21 19:08:53.114087084 +0100
-@@ -4727,6 +4727,20 @@
- then
- fi
- 
- ##########################################
-+# check for sysmacros.h
-+
-+have_sysmacros=no
-+cat > $TMPC << EOF
-+#include <sys/sysmacros.h>
-+int main(void) {
-+    return makedev(0, 0);
-+}
-+EOF
-+if compile_prog "" "" ; then
-+    have_sysmacros=yes
-+fi
-+
-+##########################################
- # End of CC checks
- # After here, no more $cc or $ld runs
- 
-diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
---- qemu-2.8.0.orig/configure  2017-02-21 19:05:13.180094708 +0100
-+++ qemu-2.8.0/configure       2017-02-21 19:08:53.114087084 +0100
-@@ -5695,6 +5709,10 @@
-   echo "CONFIG_AF_VSOCK=y" >> $config_host_mak
- fi
- 
-+if test "$have_sysmacros" = "yes" ; then
-+  echo "CONFIG_SYSMACROS=y" >> $config_host_mak
-+fi
-+
- # Hold two types of flag:
- #   CONFIG_THREAD_SETNAME_BYTHREAD  - we've got a way of setting the name on
- #                                     a thread we have a handle to
-diff -uNr qemu-2.8.0.orig/include/sysemu/os-posix.h qemu-2.8.0/include/sysemu/os-posix.h
---- qemu-2.8.0.orig/include/sysemu/os-posix.h	2016-12-20 21:16:48.000000000 +0100
-+++ qemu-2.8.0/include/sysemu/os-posix.h	2017-02-21 19:07:18.009090381 +0100
-@@ -34,6 +34,10 @@
- #include <netdb.h>
- #include <sys/un.h>
- 
-+#ifdef CONFIG_SYSMACROS
-+#include <sys/sysmacros.h>
-+#endif
-+
- void os_set_line_buffering(void);
- void os_set_proc_name(const char *s);
- void os_setup_signal_handling(void);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
new file mode 100644
index 0000000..d2c5225
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -0,0 +1,35 @@
+From 4fa4aae4176ef6d8f4d4b8323d061e2433918a26 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Wed, 17 Jan 2018 10:51:49 -0800
+Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
+
+Since commit "linux-user: Tidy and enforce reserved_va initialization"
+(18e80c55bb6ec17c05ec0ba717ec83933c2bfc07) the Yocto webkitgtk build
+hangs when cross compiling for 32-bit x86 on a 64-bit x86 machine using
+musl.
+
+To fix the issue reduce the MAX_RESERVED_VA macro to be a closer match
+to what it was before the problematic commit.
+
+Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
+Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
+---
+ linux-user/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux-user/main.c b/linux-user/main.c
+index 450eb3ce65..c7cc0a184e 100644
+--- a/linux-user/main.c
++++ b/linux-user/main.c
+@@ -77,7 +77,7 @@ do {                                                                    \
+       (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
+ /* There are a number of places where we assign reserved_va to a variable
+    of type abi_ulong and expect it to fit.  Avoid the last page.  */
+-#   define MAX_RESERVED_VA  (0xfffffffful & TARGET_PAGE_MASK)
++#   define MAX_RESERVED_VA  (0x7ffffffful & TARGET_PAGE_MASK)
+ #  else
+ #   define MAX_RESERVED_VA  (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
+ #  endif
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch
deleted file mode 100644
index 6f72243..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-I've tracked down what I think is a problem causing qemu-system-ppc
-to hang whilst booting images.
-
-I believe the decrementer timer stops receiving interrupts so
-tasks in our images hang indefinitely as the timer stopped. 
-
-It can be summed up with this line of debug:
-
-ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000004
-
-It should normally read:
-
-ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000002
-
-The question is why CPU_INTERRUPT_EXITTB ends up being set when the
-lines above this log message clearly sets CPU_INTERRUPT_HARD (via 
-cpu_interrupt() ).
-
-I note in cpu.h:
-
-    /* updates protected by BQL */
-    uint32_t interrupt_request;
-
-(for struct CPUState)
-
-The ppc code does "cs->interrupt_request |= CPU_INTERRUPT_EXITTB" in 5
-places, 3 in excp_helper.c and 2 in helper_regs.h. In all cases,  
-g_assert(qemu_mutex_iothread_locked()); fails. If I do something like:
-
-if (!qemu_mutex_iothread_locked()) {
-    qemu_mutex_lock_iothread();
-    cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-    qemu_mutex_unlock_iothread();
-} else {
-    cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-}
-
-in these call sites then I can no longer lock qemu up with my test
-case.
-
-I suspect the _HARD setting gets overwritten which stops the 
-decrementer interrupts being delivered.
-
-Upstream-Status: Submitted [Issue discussed on qemu mailing list 2017/11/20]
-RP 2017/11/20
-
-Index: qemu-2.10.1/target/ppc/excp_helper.c
-===================================================================
---- qemu-2.10.1.orig/target/ppc/excp_helper.c
-+++ qemu-2.10.1/target/ppc/excp_helper.c
-@@ -207,7 +207,9 @@ static inline void powerpc_excp(PowerPCC
-                         "Entering checkstop state\n");
-             }
-             cs->halted = 1;
--            cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+            qemu_mutex_lock_iothread();
-+            cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+            qemu_mutex_unlock_iothread();
-         }
-         if (env->msr_mask & MSR_HVB) {
-             /* ISA specifies HV, but can be delivered to guest with HV clear
-@@ -940,7 +942,9 @@ void helper_store_msr(CPUPPCState *env,
- 
-     if (excp != 0) {
-         CPUState *cs = CPU(ppc_env_get_cpu(env));
--        cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+        qemu_mutex_lock_iothread();
-+        cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+        qemu_mutex_unlock_iothread();
-         raise_exception(env, excp);
-     }
- }
-@@ -995,7 +999,9 @@ static inline void do_rfi(CPUPPCState *e
-     /* No need to raise an exception here,
-      * as rfi is always the last insn of a TB
-      */
--    cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+    qemu_mutex_lock_iothread();
-+    cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+    qemu_mutex_unlock_iothread();
- 
-     /* Reset the reservation */
-     env->reserve_addr = -1;
-Index: qemu-2.10.1/target/ppc/helper_regs.h
-===================================================================
---- qemu-2.10.1.orig/target/ppc/helper_regs.h
-+++ qemu-2.10.1/target/ppc/helper_regs.h
-@@ -114,11 +114,15 @@ static inline int hreg_store_msr(CPUPPCS
-     }
-     if (((value >> MSR_IR) & 1) != msr_ir ||
-         ((value >> MSR_DR) & 1) != msr_dr) {
--        cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+        qemu_mutex_lock_iothread();
-+        cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+        qemu_mutex_unlock_iothread();
-     }
-     if ((env->mmu_model & POWERPC_MMU_BOOKE) &&
-         ((value >> MSR_GS) & 1) != msr_gs) {
--        cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+        qemu_mutex_lock_iothread();
-+        cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+        qemu_mutex_unlock_iothread();
-     }
-     if (unlikely((env->flags & POWERPC_FLAG_TGPR) &&
-                  ((value ^ env->msr) & (1 << MSR_TGPR)))) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb
deleted file mode 100644
index bdf6c21..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-require qemu.inc
-
-inherit ptest
-
-RDEPENDS_${PN}-ptest = "bash make"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
-                    file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-
-SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
-           file://powerpc_rom.bin \
-           file://disable-grabs.patch \
-           file://exclude-some-arm-EABI-obsolete-syscalls.patch \
-           file://wacom.patch \
-           file://add-ptest-in-makefile-v10.patch \
-           file://run-ptest \
-           file://qemu-enlarge-env-entry-size.patch \
-           file://no-valgrind.patch \
-           file://pathlimit.patch \
-           file://qemu-2.5.0-cflags.patch \
-           file://glibc-2.25.patch \
-           file://0001-Provide-support-for-the-CUSE-TPM.patch \
-           file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \
-           file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \
-           file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch \
-           file://apic-fixup-fallthrough-to-PIC.patch \
-           file://CVE-2017-13711.patch \
-           file://CVE-2017-13673.patch \
-           file://CVE-2017-13672.patch \
-           file://CVE-2017-14167.patch \
-           file://ppc_locking.patch \
-           file://memfd.patch \
-           "
-UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
-
-
-SRC_URI_append_class-native = " \
-            file://fix-libcap-header-issue-on-some-distro.patch \
-            file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
-            "
-
-SRC_URI[md5sum] = "ca73441de73a9b52c6c49c97190d2185"
-SRC_URI[sha256sum] = "7e9f39e1306e6dcc595494e91c1464d4b03f55ddd2053183e0e1b69f7f776d48"
-
-COMPATIBLE_HOST_mipsarchn32 = "null"
-COMPATIBLE_HOST_mipsarchn64 = "null"
-
-do_install_append() {
-    # Prevent QA warnings about installed ${localstatedir}/run
-    if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
-    install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
-}
-
-do_compile_ptest() {
-	make buildtest-TESTS
-}
-
-do_install_ptest() {
-	cp -rL ${B}/tests ${D}${PTEST_PATH}
-	find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
-
-	cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb
new file mode 100644
index 0000000..ab82c5f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb
@@ -0,0 +1,59 @@
+require qemu.inc
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest = "bash make"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+                    file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
+
+SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
+           file://powerpc_rom.bin \
+           file://disable-grabs.patch \
+           file://wacom.patch \
+           file://add-ptest-in-makefile-v10.patch \
+           file://run-ptest \
+           file://qemu-enlarge-env-entry-size.patch \
+           file://no-valgrind.patch \
+           file://pathlimit.patch \
+           file://qemu-2.5.0-cflags.patch \
+           file://chardev-connect-socket-to-a-spawned-command.patch \
+           file://apic-fixup-fallthrough-to-PIC.patch \
+           file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
+           file://memfd.patch \
+           file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
+           file://check-PS2Queue-pointers-in-post_load-routine.patch \
+           "
+UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
+
+
+SRC_URI_append_class-native = " \
+            file://fix-libcap-header-issue-on-some-distro.patch \
+            file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
+            "
+
+SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
+SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
+
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
+
+do_install_append() {
+    # Prevent QA warnings about installed ${localstatedir}/run
+    if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+    install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
+}
+
+do_compile_ptest() {
+	make buildtest-TESTS
+}
+
+do_install_ptest() {
+	cp -rL ${B}/tests ${D}${PTEST_PATH}
+	find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
+
+	cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+	# Don't check the file genreated by configure
+	sed -i -e '/wildcard config-host.mak/d' \
+	       -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch
deleted file mode 100644
index daf4429..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-Upstream-Status: Pending
-
-Add the aclocal.m4 as acinclude.m4
-
-Index: quilt-0.47/acinclude.m4
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ quilt-0.47/acinclude.m4	2006-10-10 17:05:56.000000000 +0100
-@@ -0,0 +1,119 @@
-+dnl Allow configure to specify a specific binary
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH],[
-+  m4_define([internal_$2_cmd],[esyscmd(ls compat/$2.in 2>/dev/null)])
-+
-+  AC_ARG_WITH($2, AC_HELP_STRING(
-+    [--with-$2], [name of the $2 executable to use]
-+                 m4_if(internal_$2_cmd,[],[],[ (use --without-$2
-+                          to use an internal mechanism)])),
-+  [
-+    if test x"$withval" = xnone; then
-+      AC_MSG_ERROR([Invalid configure argument.  use --without-$2])
-+    fi
-+    if test x"$withval" != xno; then
-+      AC_MSG_CHECKING(for $2)
-+      $1="$withval"
-+      if test -e "$$1"; then
-+	if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+	  AC_MSG_ERROR([$$1 is not an executable file])
-+	fi
-+      fi
-+      AC_MSG_RESULT([$$1])
-+      if test ! -e "$$1"; then
-+        AC_MSG_WARN([$$1 does not exist])
-+      fi
-+      COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+    fi
-+  ],[
-+    m4_if([$3],[],[
-+      AC_PATH_PROG($1,$2,,$PATH:$4)
-+    ],[
-+      AC_PATH_PROGS($1,$3,,$PATH:$4)
-+      if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+	COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+      fi
-+    ])
-+    m4_if([$4],[],[],[
-+      if test -n "$$1"; then
-+	as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+        for dir in "$4"; do
-+          if test "`dirname $$1`" = "$dir"; then
-+            COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+	    break
-+	  fi
-+        done
-+	IFS="$as_save_IFS"
-+      fi
-+    ])
-+  ])
-+  if test -z "$$1"; then
-+    m4_if(internal_$2_cmd,[],[
-+      AC_MSG_ERROR([Please specify the location of $2 with the option '--with-$2'])
-+    ],[
-+      AC_MSG_WARN([Using internal $2 mechanism.  Use option '--with-$2' to override])
-+      COMPAT_PROGRAMS="$COMPAT_PROGRAMS $2"
-+      $1=$2
-+      INTERNAL_$1=1
-+    ])
-+  fi
-+  AC_SUBST($1)
-+])
-+
-+dnl Allow configure to specify a specific binary
-+dnl This variant is for optional binaries.
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
-+  AC_ARG_WITH($2, AC_HELP_STRING(
-+    [--with-$2], [name of the $2 executable to use]),
-+  [
-+    if test x"$withval" != xno; then
-+      AC_MSG_CHECKING(for $2)
-+      $1="$withval"
-+      if test -e "$$1"; then
-+	if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+	  AC_MSG_ERROR([$$1 is not an executable file])
-+	fi
-+      fi
-+      AC_MSG_RESULT([$$1])
-+      if test ! -e "$$1"; then
-+        AC_MSG_WARN([$$1 does not exist])
-+      fi
-+      COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+    fi
-+  ],[
-+    m4_if([$3],[],[
-+      AC_PATH_PROG($1,$2,,$PATH:$4)
-+    ],[
-+      AC_PATH_PROGS($1,$3,,$PATH:$4)
-+      if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+	COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+      fi
-+    ])
-+    m4_if([$4],[],[],[
-+      if test -n "$$1"; then
-+	as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+        for dir in "$4"; do
-+          if test "`dirname $$1`" = "$dir"; then
-+            COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+	    break
-+	  fi
-+        done
-+	IFS="$as_save_IFS"
-+      fi
-+    ])
-+    if test -z "$$1"; then
-+      AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
-+    fi
-+  ])
-+  if test -z "$$1"; then
-+    $1=$2
-+  fi
-+  AC_SUBST($1)
-+])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
index 12859f0..5bf818d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
@@ -1,6 +1,8 @@
 require quilt.inc
 inherit gettext
+
+SRC_URI += "file://gnu_patch_test_fix_target.patch"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
 RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
-SRC_URI += "file://aclocal.patch \
-            file://gnu_patch_test_fix_target.patch \
-           "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch
deleted file mode 100644
index b809332..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 36cf0ff26ece53e529e8b4f2d2f09acd8794b055 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 24 Mar 2017 15:35:47 +0200
-Subject: [PATCH] Add PYTHON_ABI when searching for python libraries.
-
-It has a value of 'm' when using Python3, and so without it
-configure will not find the libraries.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9c58467c1..a506ec819 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -642,7 +642,7 @@ AS_IF([test "$enable_python" = yes],[
-       ])
-     CPPFLAGS="$save_CPPFLAGS"
-     save_LIBS="$LIBS"
--    AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[
-+    AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION}${PYTHON_ABI} python],[
-       WITH_PYTHON_LIB="$ac_res"
-     ],[AC_MSG_ERROR([missing python library])
-     ])
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 1f61aca..5604cb9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,10 +1,10 @@
-From d82691b8d58201dd03e30585daacd8ffd1556ae2 Mon Sep 17 00:00:00 2001
+From c82c19dc583843b1a975f2e3f2e151656a6f377c Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 27 Feb 2017 09:43:30 +0200
-Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
+Subject: [PATCH 06/14] Do not hardcode "lib/rpm" as the installation path for
  default configuration and macros.
 
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/263]
+Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
@@ -14,10 +14,10 @@
  3 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 4f3be8770..92ffd3d68 100644
+index 7155d9f00..21b95ae5f 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -875,7 +875,7 @@ else
+@@ -1047,7 +1047,7 @@ else
      usrprefix=$prefix
  fi
  
@@ -27,10 +27,10 @@
  
  AC_SUBST(OBJDUMP)
 diff --git a/macros.in b/macros.in
-index c6d5a6b03..84ae25275 100644
+index d08624856..68a972f1e 100644
 --- a/macros.in
 +++ b/macros.in
-@@ -877,7 +877,7 @@ package or when debugging this package.\
+@@ -954,7 +954,7 @@ package or when debugging this package.\
  %_sharedstatedir	%{_prefix}/com
  %_localstatedir		%{_prefix}/var
  %_lib			lib
@@ -40,7 +40,7 @@
  %_infodir		%{_datadir}/info
  %_mandir		%{_datadir}/man
 diff --git a/rpm.am b/rpm.am
-index 1f43ad8a0..6854ff6ba 100644
+index 51225892d..e0c834d37 100644
 --- a/rpm.am
 +++ b/rpm.am
 @@ -1,10 +1,10 @@
@@ -55,7 +55,7 @@
 +rpmconfigdir = $(libdir)/rpm
  
  # Libtool version (current-revision-age) for all our libraries
- rpm_version_info = 7:0:0
+ rpm_version_info = 8:1:0
 -- 
-2.11.0
+2.15.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
index a38675f..bf24d43 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
@@ -6,6 +6,9 @@
 
 We add lots of native stuff into it and scriptlets rely on that.
 
+Also need to remove the xx test later in the function since the
+value could now be used un-initialised.
+
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
@@ -25,6 +28,13 @@
  	free(ipath);
      }
  
--- 
-2.11.0
-
+@@ -206,9 +206,7 @@ static void doScriptExec(ARGV_const_t ar
+ 	/* XXX Don't mtrace into children. */
+ 	unsetenv("MALLOC_CHECK_");
+ 
+-	if (xx == 0) {
+ 	    xx = execv(argv[0], argv);
+-	}
+     }
+     _exit(127); /* exit 127 for compatibility with bash(1) */
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
new file mode 100644
index 0000000..6f440c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
@@ -0,0 +1,148 @@
+From 9c3e5de3240554c8ea1b29d52eeadee4840fefac Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 17:37:05 -0700
+Subject: [PATCH 1/3] Factor out and unify setting CLOEXEC
+
+Commit 7a7c31f5 ("Set FD_CLOEXEC on opened files before exec from
+lua script is called") copied the code that sets CLOEXEC flag on all
+possible file descriptors from lib/rpmscript.c to luaext/lposix.c,
+essentially creating two copies of the same code (modulo comments
+and the unused assignment).
+
+This commit moves the functionality into its own function, without
+any code modifications, using the version from luaext/lposix.c.
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ lib/rpmscript.c        | 18 ++----------------
+ luaext/lposix.c        | 13 ++-----------
+ rpmio/rpmio.c          | 16 ++++++++++++++++
+ rpmio/rpmio_internal.h |  6 ++++++
+ 4 files changed, 26 insertions(+), 27 deletions(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 747385a5b..b4ccd3246 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -3,7 +3,6 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <errno.h>
+-#include <unistd.h>
+ 
+ #include <rpm/rpmfileutil.h>
+ #include <rpm/rpmmacro.h>
+@@ -14,6 +13,7 @@
+ 
+ #include "rpmio/rpmlua.h"
+ #include "lib/rpmscript.h"
++#include "rpmio/rpmio_internal.h"
+ 
+ #include "lib/rpmplugins.h"     /* rpm plugins hooks */
+ 
+@@ -170,26 +170,12 @@ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr
+ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
+ 			FD_t scriptFd, FD_t out)
+ {
+-    int flag;
+-    int fdno;
+     int xx;
+-    int open_max;
+ 
+     /* SIGPIPE is ignored in rpm, reset to default for the scriptlet */
+     (void) signal(SIGPIPE, SIG_DFL);
+ 
+-    /* XXX Force FD_CLOEXEC on all inherited fdno's. */
+-    open_max = sysconf(_SC_OPEN_MAX);
+-    if (open_max == -1) {
+-	open_max = 1024;
+-    }
+-    for (fdno = 3; fdno < open_max; fdno++) {
+-	flag = fcntl(fdno, F_GETFD);
+-	if (flag == -1 || (flag & FD_CLOEXEC))
+-	    continue;
+-	xx = fcntl(fdno, F_SETFD, FD_CLOEXEC);
+-	/* XXX W2DO? debug msg for inheirited fdno w/o FD_CLOEXEC */
+-    }
++    rpmSetCloseOnExec();
+ 
+     if (scriptFd != NULL) {
+ 	int sfdno = Fileno(scriptFd);
+diff --git a/luaext/lposix.c b/luaext/lposix.c
+index 0a7c26c71..5d7ad3c87 100644
+--- a/luaext/lposix.c
++++ b/luaext/lposix.c
+@@ -27,6 +27,7 @@
+ #include <unistd.h>
+ #include <utime.h>
+ #include <rpm/rpmutil.h>
++#include "rpmio/rpmio_internal.h"
+ 
+ #define MYNAME		"posix"
+ #define MYVERSION	MYNAME " library for " LUA_VERSION " / Nov 2003"
+@@ -335,21 +336,11 @@ static int Pexec(lua_State *L)			/** exec(path,[args]) */
+ 	const char *path = luaL_checkstring(L, 1);
+ 	int i,n=lua_gettop(L);
+ 	char **argv;
+-	int flag, fdno, open_max;
+ 
+ 	if (!have_forked)
+ 	    return luaL_error(L, "exec not permitted in this context");
+ 
+-	open_max = sysconf(_SC_OPEN_MAX);
+-	if (open_max == -1) {
+-	    open_max = 1024;
+-	}
+-	for (fdno = 3; fdno < open_max; fdno++) {
+-	    flag = fcntl(fdno, F_GETFD);
+-	    if (flag == -1 || (flag & FD_CLOEXEC))
+-		continue;
+-	    fcntl(fdno, F_SETFD, FD_CLOEXEC);
+-	}
++	rpmSetCloseOnExec();
+ 
+ 	argv = malloc((n+1)*sizeof(char*));
+ 	if (argv==NULL) return luaL_error(L,"not enough memory");
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index c7cbc32aa..ea111d2ec 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -1759,3 +1759,19 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id)
+ 
+     return ctx;
+ }
++
++void rpmSetCloseOnExec(void)
++{
++	int flag, fdno, open_max;
++
++	open_max = sysconf(_SC_OPEN_MAX);
++	if (open_max == -1) {
++		open_max = 1024;
++	}
++	for (fdno = 3; fdno < open_max; fdno++) {
++		flag = fcntl(fdno, F_GETFD);
++		if (flag == -1 || (flag & FD_CLOEXEC))
++			continue;
++		fcntl(fdno, F_SETFD, FD_CLOEXEC);
++	}
++}
+diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
+index fbed183b0..370cbdc75 100644
+--- a/rpmio/rpmio_internal.h
++++ b/rpmio/rpmio_internal.h
+@@ -41,6 +41,12 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id);
+ int rpmioSlurp(const char * fn,
+                 uint8_t ** bp, ssize_t * blenp);
+ 
++/**
++ * Set close-on-exec flag for all opened file descriptors, except
++ * stdin/stdout/stderr.
++ */
++void rpmSetCloseOnExec(void);
++
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
index edf9ec0..0b1d629 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
@@ -1,24 +1,21 @@
-From 211c2d11200e6657132c52e7ac68f8c118231262 Mon Sep 17 00:00:00 2001
+From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 27 Feb 2017 14:43:21 +0200
-Subject: [PATCH] Fix build with musl C library.
+Subject: [PATCH 1/9] Fix build with musl C library.
 
-Upstream-Status: Inappropriate [problem already solved in master branch]
+Upstream-Status: Pending
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
- configure.ac        | 3 ++-
- misc/Makefile.am    | 3 +--
- misc/rpmxprogname.c | 3 +--
- 3 files changed, 4 insertions(+), 5 deletions(-)
+ configure.ac       | 3 ++-
+ rpmio/digest_nss.c | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index 92ffd3d68..9c58467c1 100644
+index c04a2e8d1..c9d9ac16d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
+@@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
  # Check for libelf library. Prefer external, otherwise none.
  WITH_LIBELF_LIB=
  AC_CHECK_HEADER([libelf.h])
@@ -26,7 +23,7 @@
  AC_CHECK_HEADERS([gelf.h], [
  	AC_CHECK_LIB(elf, gelf_getvernaux, [
  	    AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
-@@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [
+@@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [
  	])
  ])
  AC_SUBST(WITH_LIBELF_LIB)
@@ -35,40 +32,17 @@
  
  AC_CHECK_HEADERS([dwarf.h], [
    WITH_LIBDWARF=yes
-diff --git a/misc/Makefile.am b/misc/Makefile.am
-index 8bf0093d9..b9db3d31a 100644
---- a/misc/Makefile.am
-+++ b/misc/Makefile.am
-@@ -5,10 +5,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc
+diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
+index 992d9acf6..e11920e3e 100644
+--- a/rpmio/digest_nss.c
++++ b/rpmio/digest_nss.c
+@@ -1,5 +1,6 @@
+ #include "system.h"
  
- EXTRA_DIST = \
- 	fnmatch.c	fnmatch.h \
--	rpmxprogname.c	rpmxprogname.h \
- 	stpcpy.c	stpncpy.c
- 
- noinst_LTLIBRARIES = libmisc.la
- 
--libmisc_la_SOURCES = fts.c fts.h
-+libmisc_la_SOURCES = fts.c fts.h rpmxprogname.c rpmxprogname.h
- libmisc_la_LIBADD = @LTLIBOBJS@
-diff --git a/misc/rpmxprogname.c b/misc/rpmxprogname.c
-index f89600613..e94625ea8 100644
---- a/misc/rpmxprogname.c
-+++ b/misc/rpmxprogname.c
-@@ -13,7 +13,7 @@ char *_rpmxgetprogname(void)
- {
-   const char *empty = "";
- 
--  if (_rpmxprognam != NULL) /* never return NULL string */
-+  if (_rpmxprogname != NULL) /* never return NULL string */
-     return _rpmxprogname;
-   else
-     return empty;
-@@ -30,4 +30,3 @@ void _rpmxsetprogname(const char *pn)
-   }
- }
- 
--#endif /* _RPMXPROGNAME_H */
++#include <signal.h>
+ #include <pthread.h>
+ #include <nss.h>
+ #include <sechash.h>
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
deleted file mode 100644
index 9648cac..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d42ece6fa15b98d7f9221b90b85b78631df2c0a0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 14 Feb 2017 13:51:19 +0200
-Subject: [PATCH] When nice value cannot be reset, issue a notice instead of a
- warning
-
-Otherwise build logs on the autobuilder get very clutter, as it
-doesn't allow the nice value to be reset for some reason.
-
-Upstream-Status: Inappropriate [oe specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- lib/rpmscript.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/rpmscript.c b/lib/rpmscript.c
-index 5e1e99906..3975aead8 100644
---- a/lib/rpmscript.c
-+++ b/lib/rpmscript.c
-@@ -347,7 +347,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
-         int ret;
-         ret = setpriority(PRIO_PROCESS, 0, 0);
-         if (ret == -1) {
--            rpmlog(RPMLOG_WARNING, _("Unable to reset nice value: %s"),
-+            rpmlog(RPMLOG_NOTICE, _("Unable to reset nice value: %s\n"),
-                 strerror(errno));
-         }
- 
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
new file mode 100644
index 0000000..dc71d9b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
@@ -0,0 +1,42 @@
+From dfb422c744fdc1838afc40b8e1f161bb46093d92 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Sun, 8 Apr 2018 12:06:42 +0800
+Subject: [PATCH] configure.ac: add option for dbus
+
+Add option for dbus so that users could choose to build with dbus
+or with no dbus.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ configure.ac | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4db15c7909..493f393d31 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -976,12 +976,15 @@ AS_IF([test "$enable_plugins" = yes],[
+ ])
+ AM_CONDITIONAL(ENABLE_PLUGINS,[test "$enable_plugins" = yes])
+ 
+-with_dbus=no
+-AS_IF([test "$enable_plugins" != no],[
++AC_ARG_WITH([dbus], [AS_HELP_STRING([--with-dbus], [build with dbus support])],
++            [],
++            [with_dbus=yes])
++
++AS_IF([test "$with_dbus" != no],[
+   PKG_CHECK_MODULES([DBUS],
+     [dbus-1 >= 1.3],
+-    [AC_DEFINE(DBUS, 1, [Build with dbus support?]) with_dbus=yes],
+-    [with_dbus=no])
++    [AC_DEFINE(DBUS, 1, [Build with dbus support?])],
++    [AC_MSG_ERROR([dbus not present (--without-dbus to disable)])])
+   AC_SUBST(DBUS_CFLAGS)
+   AC_SUBST(DBUS_LIBS)
+ ])
+-- 
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
new file mode 100644
index 0000000..a27f8e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
@@ -0,0 +1,100 @@
+From 5e6f05cd8dad6c1ee6bd1e6e43f176976c9c3416 Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 17:52:56 -0700
+Subject: [PATCH 2/3] Optimize rpmSetCloseOnExec
+
+In case maximum number of open files limit is set too high, both
+luaext/Pexec() and lib/doScriptExec() spend way too much time
+trying to set FD_CLOEXEC flag for all those file descriptors,
+resulting in severe increase of time it takes to execute say
+rpm or dnf.
+
+This becomes increasingly noticeable when running with e.g. under
+Docker, the reason being:
+
+> $ docker run fedora ulimit -n
+> 1048576
+
+One obvious fix is to use procfs to get the actual list of opened fds
+and iterate over it. My quick-n-dirty benchmark shows the /proc approach
+is about 10x faster than iterating through a list of just 1024 fds,
+so it's an improvement even for default ulimit values.
+
+Note that the old method is still used in case /proc is not available.
+
+While at it,
+
+ 1. fix the function by making sure we modify (rather than set)
+    the existing flags. As the only known flag is FD_CLOEXEC,
+    this change is currently purely aesthetical, but in case
+    other flags will appear it will become a real bug fix.
+
+ 2. get rid of magic number 3; use STDERR_FILENO
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+
+Fixes #444
+
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ rpmio/rpmio.c | 43 ++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 34 insertions(+), 9 deletions(-)
+
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index ea111d2ec..55351c221 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -1760,18 +1760,43 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id)
+     return ctx;
+ }
+ 
++static void set_cloexec(int fd)
++{
++	int flags = fcntl(fd, F_GETFD);
++
++	if (flags == -1 || (flags & FD_CLOEXEC))
++		return;
++
++	fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
++}
++
+ void rpmSetCloseOnExec(void)
+ {
+-	int flag, fdno, open_max;
++	const int min_fd = STDERR_FILENO; /* don't touch stdin/out/err */
++	int fd;
++
++	DIR *dir = opendir("/proc/self/fd");
++	if (dir == NULL) { /* /proc not available */
++		/* iterate over all possible fds, might be slow */
++		int open_max = sysconf(_SC_OPEN_MAX);
++		if (open_max == -1)
++			open_max = 1024;
+ 
+-	open_max = sysconf(_SC_OPEN_MAX);
+-	if (open_max == -1) {
+-		open_max = 1024;
++		for (fd = min_fd + 1; fd < open_max; fd++)
++			set_cloexec(fd);
++
++		return;
+ 	}
+-	for (fdno = 3; fdno < open_max; fdno++) {
+-		flag = fcntl(fdno, F_GETFD);
+-		if (flag == -1 || (flag & FD_CLOEXEC))
+-			continue;
+-		fcntl(fdno, F_SETFD, FD_CLOEXEC);
++
++	/* iterate over fds obtained from /proc */
++	struct dirent *entry;
++	while ((entry = readdir(dir)) != NULL) {
++		fd = atoi(entry->d_name);
++		if (fd > min_fd)
++			set_cloexec(fd);
+ 	}
++
++	closedir(dir);
++
++	return;
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
new file mode 100644
index 0000000..389b41b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
@@ -0,0 +1,53 @@
+From 307e28b4cb08b05bc044482058eeebc9f59bb9a9 Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 18:09:27 -0700
+Subject: [PATCH 3/3] rpmSetCloseOnExec: use getrlimit()
+
+In case /proc is not available to get the actual list of opened fds,
+we fall back to iterating through the list of all possible fds.
+
+It is possible that during the course of the program execution the limit
+on number of open file descriptors might be lowered, so using the
+current limit, as returned by sysconf(_SC_OPEN_MAX), might omit some
+fds. Therefore, it is better to use rlim_max from the structure
+filled in by gertlimit(RLIMIT_NOFILE) to make sure we're checking
+all fds.
+
+This slows down the function, but only in the case /proc is not
+available, which should be rare in practice.
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ rpmio/rpmio.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index 55351c221..e051c9863 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -10,6 +10,7 @@
+ #include <sys/personality.h>
+ #endif
+ #include <sys/utsname.h>
++#include <sys/resource.h>
+ 
+ #include <rpm/rpmlog.h>
+ #include <rpm/rpmmacro.h>
+@@ -1778,7 +1779,14 @@ void rpmSetCloseOnExec(void)
+ 	DIR *dir = opendir("/proc/self/fd");
+ 	if (dir == NULL) { /* /proc not available */
+ 		/* iterate over all possible fds, might be slow */
+-		int open_max = sysconf(_SC_OPEN_MAX);
++		struct rlimit rl;
++		int open_max;
++
++		if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY)
++			open_max = rl.rlim_max;
++		else
++			open_max = sysconf(_SC_OPEN_MAX);
++
+ 		if (open_max == -1)
+ 			open_max = 1024;
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
index 64a5651..8989dce 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
@@ -1,7 +1,7 @@
-From ec305795a302d226343e69031ff2024dfcde69c0 Mon Sep 17 00:00:00 2001
+From 8ce9fbab2990609bdace457e146160334e931c89 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 8 Jun 2017 17:08:09 +0300
-Subject: [PATCH 3/3] build/pack.c: remove static local variables from
+Subject: [PATCH 14/15] build/pack.c: remove static local variables from
  buildHost() and getBuildTime()
 
 Their use is causing difficult to diagnoze data races when building multiple
@@ -11,8 +11,8 @@
 Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
-
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  build/build.c             | 54 ++++++++++++++++++++++++++++--
  build/pack.c              | 84 +++++++++--------------------------------------
@@ -20,7 +20,7 @@
  3 files changed, 74 insertions(+), 72 deletions(-)
 
 diff --git a/build/build.c b/build/build.c
-index 5f99c8db7..09a1311c5 100644
+index 81152e53e..6001f9e52 100644
 --- a/build/build.c
 +++ b/build/build.c
 @@ -6,6 +6,8 @@
@@ -83,7 +83,7 @@
  /**
   */
  static rpmRC doRmSource(rpmSpec spec)
-@@ -203,6 +249,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
      rpmRC rc = RPMRC_OK;
      int test = (what & RPMBUILD_NOBUILD);
      char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
@@ -93,7 +93,7 @@
  
      if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
  	getenv("SOURCE_DATE_EPOCH") == NULL) {
-@@ -271,11 +320,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
  		goto exit;
  
  	if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
@@ -107,7 +107,7 @@
  		goto exit;
  	
  	if ((what & RPMBUILD_CLEAN) &&
-@@ -295,6 +344,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
  	(void) unlink(spec->specFile);
  
  exit:
@@ -116,7 +116,7 @@
      spec->rootDir = NULL;
      if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
 diff --git a/build/pack.c b/build/pack.c
-index ed5b9ab4e..62427065a 100644
+index df15876ff..17a4b0905 100644
 --- a/build/pack.c
 +++ b/build/pack.c
 @@ -6,8 +6,6 @@
@@ -128,7 +128,7 @@
  #include <sys/wait.h>
  
  #include <rpm/rpmlib.h>			/* RPMSIGTAG*, rpmReadPackageFile */
-@@ -151,57 +149,6 @@ exit:
+@@ -152,57 +150,6 @@ exit:
      return rc;
  }
  
@@ -186,9 +186,9 @@
  static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
  {
      struct TriggerFileEntry *p;
-@@ -308,7 +255,8 @@ static int haveRichDep(Package pkg)
- }
- 
+@@ -476,7 +423,8 @@ exit:
+  * order to how the RPM format is laid on disk.
+  */
  static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
 -		      const char *fileName, char **cookie)
 +		      const char *fileName, char **cookie,
@@ -196,7 +196,7 @@
  {
      FD_t fd = NULL;
      char * rpmio_flags = NULL;
-@@ -397,7 +345,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
+@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
  
      /* Create and add the cookie */
      if (cookie) {
@@ -204,8 +204,8 @@
 +	rasprintf(cookie, "%s %d", buildHost, buildTime);
  	headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
      }
-     
-@@ -546,7 +494,7 @@ static rpmRC checkPackages(char *pkgcheck)
+ 
+@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
      return RPMRC_OK;
  }
  
@@ -214,7 +214,7 @@
  {
  	const char *errorString;
  	rpmRC rc = RPMRC_OK;
-@@ -565,8 +513,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
  	headerCopyTags(spec->packages->header, pkg->header, copyTags);
  	
  	headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
@@ -225,7 +225,7 @@
  
  	if (spec->sourcePkgId != NULL) {
  	    headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
-@@ -604,7 +552,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
  	    free(binRpm);
  	}
  
@@ -234,7 +234,7 @@
  	if (rc == RPMRC_OK) {
  	    /* Do check each written package if enabled */
  	    char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
-@@ -624,7 +572,7 @@ struct binaryPackageTaskData
+@@ -719,7 +667,7 @@ struct binaryPackageTaskData
      struct binaryPackageTaskData *next;
  };
  
@@ -243,7 +243,7 @@
  {
      struct binaryPackageTaskData *tasks = NULL;
      struct binaryPackageTaskData *task = NULL;
-@@ -636,7 +584,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
          if (pkg == spec->packages) {
              // the first package needs to be processed ahead of others, as they copy
              // changelog data from it, and so otherwise data races would happen
@@ -252,7 +252,7 @@
              rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
              tasks = task;
          }
-@@ -653,7 +601,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
          if (task != tasks)
          #pragma omp task
          {
@@ -261,7 +261,7 @@
              rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
          }
      }
-@@ -671,11 +619,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
+@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
      }
  }
  
@@ -275,7 +275,7 @@
  
      for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
          if (task->result == RPMRC_OK) {
-@@ -702,22 +650,22 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
      return RPMRC_OK;
  }
  
@@ -284,6 +284,7 @@
  {
      Package sourcePkg = spec->sourcePackage;
      rpmRC rc;
+@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
  
      /* Add some cruft */
      headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
@@ -291,9 +292,10 @@
 -    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
 +    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
 +    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
+     headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
  
      /* XXX this should be %_srpmdir */
-     {	char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL);
+@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
  	char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
  
  	spec->sourcePkgId = NULL;
@@ -303,10 +305,10 @@
  	/* Do check SRPM package if enabled */
  	if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
 diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
-index 8351a6a34..797337ca7 100644
+index 439b7d3b5..07e8338ad 100644
 --- a/build/rpmbuild_internal.h
 +++ b/build/rpmbuild_internal.h
-@@ -408,19 +408,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
+@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
   * @param spec		spec file control structure
   * @param cookie	build identifier "cookie" or NULL
   * @param cheating	was build shortcircuited?
@@ -333,5 +335,5 @@
  RPM_GNUC_INTERNAL
  int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
 -- 
-2.11.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
index c910a47..4ac5c38 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
@@ -1,7 +1,7 @@
-From d65d6e8760afbd7f70b22a1f3297a037bc475fea Mon Sep 17 00:00:00 2001
+From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001
 From: Peter Kjellerstedt <pkj@axis.com>
 Date: Mon, 15 May 2017 10:21:08 +0200
-Subject: [PATCH 11/13] Do not require that ELF binaries are executable to be
+Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be
  identifiable
 
 There is nothing that requires, e.g., a DSO to be executable, but it
@@ -14,19 +14,20 @@
 
 Upstream-Status: Inappropriate
 Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
 ---
  fileattrs/elf.attr | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
-index 595b33e09..bac52649d 100644
+index 5805dd0ee..3516f309d 100644
 --- a/fileattrs/elf.attr
 +++ b/fileattrs/elf.attr
 @@ -1,4 +1,3 @@
  %__elf_provides		%{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
  %__elf_requires		%{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
- %__elf_magic		^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*$
+ %__elf_magic		^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
 -%__elf_flags		exeonly
 -- 
-2.12.0
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
deleted file mode 100644
index 996da90..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 77808db4036dc4a012c47aca36255549ed764a6a Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Tue, 16 May 2017 10:58:18 +0200
-Subject: [PATCH 12/13] Use conditional to access %{_docdir} in macros.in
-
-This avoids the following warning:
-
-warning: Ignoring invalid regex %{_docdir}
-
-when runing `rpmdeps -R <file>`, since %{_docdir} is only defined when
-parsing a spec file (in parseSpec()).
-
-Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/216]
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- macros.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/macros.in b/macros.in
-index 84ae25275..cca67a500 100644
---- a/macros.in
-+++ b/macros.in
-@@ -200,8 +200,8 @@ package or when debugging this package.\
- # Their purpouse is to set up global filtering for all packages. If you need
- # to set up specific filtering for your package use %__requires_exclude_from
- # and %__provides_exclude_from instead.
--%__global_requires_exclude_from		%{_docdir}
--%__global_provides_exclude_from		%{_docdir}
-+%__global_requires_exclude_from		%{?_docdir:%{_docdir}}
-+%__global_provides_exclude_from		%{?_docdir:%{_docdir}}
- 
- #	The path to the gzip executable (legacy, use %{__gzip} instead).
- %_gzipbin		%{__gzip}
--- 
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
deleted file mode 100644
index faaf629..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 3bf20a6116ae3e1a5a3a6907bee7e881b17efb2f Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Mon, 15 May 2017 11:23:26 +0200
-Subject: [PATCH 13/13] Add a new option --alldeps to rpmdeps
-
-This will send the output from rpmfcPrint() to stdout. This is an
-alternative to using the --rpmfcdebug option, which will send the same
-output to stderr. The two options have totally different use cases
-though. While --alldeps is used when the output from rpmfcPrint() is
-what is wanted, --rpmfcdebug can be used together with the other
-output options, e.g., --requires, without affecting their output.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/220]
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- build/rpmfc.c   | 27 ++++++++++++++-------------
- build/rpmfc.h   |  1 -
- tools/rpmdeps.c | 44 +++++++++++++++++++++++++-------------------
- 3 files changed, 39 insertions(+), 33 deletions(-)
-
-diff --git a/build/rpmfc.c b/build/rpmfc.c
-index c8e2f876a..44f1cdc9a 100644
---- a/build/rpmfc.c
-+++ b/build/rpmfc.c
-@@ -732,7 +732,6 @@ static rpm_color_t rpmfcColor(const char * fmstr)
- 
- void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
- {
--    rpm_color_t fcolor;
-     int ndx;
-     int dx;
-     int fx;
-@@ -744,21 +743,23 @@ void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
- 
-     if (fc)
-     for (fx = 0; fx < fc->nfiles; fx++) {
--	rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
--	fcolor = fc->fcolor[fx];
--	ARGV_t fattrs = fc->fattrs[fx];
--
- 	fprintf(fp, "%3d %s", fx, fc->fn[fx]);
--	if (fcolor != RPMFC_BLACK)
-+	if (_rpmfc_debug) {
-+	    rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
-+	    rpm_color_t fcolor = fc->fcolor[fx];
-+	    ARGV_t fattrs = fc->fattrs[fx];
-+
-+	    if (fcolor != RPMFC_BLACK)
- 		fprintf(fp, "\t0x%x", fc->fcolor[fx]);
--	else
-+	    else
- 		fprintf(fp, "\t%s", rpmstrPoolStr(fc->cdict, cx));
--	if (fattrs) {
--	    char *attrs = argvJoin(fattrs, ",");
--	    fprintf(fp, " [%s]", attrs);
--	    free(attrs);
--	} else {
--	    fprintf(fp, " [none]");
-+	    if (fattrs) {
-+		char *attrs = argvJoin(fattrs, ",");
-+		fprintf(fp, " [%s]", attrs);
-+		free(attrs);
-+	    } else {
-+		fprintf(fp, " [none]");
-+	    }
- 	}
- 	fprintf(fp, "\n");
- 
-diff --git a/build/rpmfc.h b/build/rpmfc.h
-index dae8ea5b1..3d87b31cf 100644
---- a/build/rpmfc.h
-+++ b/build/rpmfc.h
-@@ -45,7 +45,6 @@ typedef const struct rpmfcTokens_s * rpmfcToken;
- 
- /** \ingroup rpmfc
-  * Print results of file classification.
-- * @todo Remove debugging routine.
-  * @param msg		message prefix (NULL for none)
-  * @param fc		file classifier
-  * @param fp		output file handle (NULL for stderr)
-diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c
-index a414b6343..f260a38c4 100644
---- a/tools/rpmdeps.c
-+++ b/tools/rpmdeps.c
-@@ -23,6 +23,8 @@ static int print_conflicts;
- 
- static int print_obsoletes;
- 
-+static int print_alldeps;
-+
- static void rpmdsPrint(const char * msg, rpmds ds, FILE * fp)
- {
-     if (fp == NULL) fp = stderr;
-@@ -57,6 +59,8 @@ static struct poptOption optionsTable[] = {
-         NULL, NULL },
-  { "obsoletes", '\0', POPT_ARG_VAL, &print_obsoletes, -1,
-         NULL, NULL },
-+ { "alldeps", '\0', POPT_ARG_VAL, &print_alldeps, -1,
-+        NULL, NULL },
- 
-    POPT_AUTOALIAS
-    POPT_AUTOHELP
-@@ -100,25 +104,27 @@ main(int argc, char *argv[])
-     if (rpmfcClassify(fc, av, NULL) || rpmfcApply(fc))
- 	goto exit;
- 
--    if (_rpmfc_debug)
--	rpmfcPrint(buf, fc, NULL);
--
--    if (print_provides)
--	rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
--    if (print_requires)
--	rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
--    if (print_recommends)
--	rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
--    if (print_suggests)
--	rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
--    if (print_supplements)
--	rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
--    if (print_enhances)
--	rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
--    if (print_conflicts)
--	rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
--    if (print_obsoletes)
--	rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
-+    if (print_alldeps || _rpmfc_debug)
-+	rpmfcPrint(NULL, fc, print_alldeps ? stdout : NULL);
-+
-+    if (!print_alldeps) {
-+	if (print_provides)
-+	    rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
-+	if (print_requires)
-+	    rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
-+	if (print_recommends)
-+	    rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
-+	if (print_suggests)
-+	    rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
-+	if (print_supplements)
-+	    rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
-+	if (print_enhances)
-+	    rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
-+	if (print_conflicts)
-+	    rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
-+	if (print_obsoletes)
-+	    rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
-+    }
- 
-     ec = 0;
- 
--- 
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb
new file mode 100644
index 0000000..6012922
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb
@@ -0,0 +1,138 @@
+SUMMARY = "The RPM package management system"
+DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
+package management system capable of installing, uninstalling, \
+verifying, querying, and updating software packages. Each software \
+package consists of an archive of files along with information about \
+the package like its version, a description, etc."
+
+SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
+DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
+development files will simplify the process of writing programs that \
+manipulate RPM packages and databases. These files are intended to \
+simplify the process of creating graphical package managers or any \
+other tools that need an intimate knowledge of RPM packages in order \
+to function."
+
+SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages"
+DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \
+written in the Python programming language to use the interface \
+supplied by the RPM Package Manager libraries."
+
+HOMEPAGE = "http://www.rpm.org"
+
+# libraries are also LGPL - how to express this?
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
+
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
+           file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
+           file://0001-Do-not-read-config-files-from-HOME.patch \
+           file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
+           file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
+           file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
+           file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
+           file://0001-Fix-build-with-musl-C-library.patch \
+           file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
+           file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
+           file://0001-Split-binary-package-building-into-a-separate-functi.patch \
+           file://0002-Run-binary-package-creation-via-thread-pools.patch \
+           file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
+           file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
+           file://0001-perl-disable-auto-reqs.patch \
+           file://0001-configure.ac-add-option-for-dbus.patch \
+           file://0001-Factor-out-and-unify-setting-CLOEXEC.patch \
+           file://0002-Optimize-rpmSetCloseOnExec.patch \
+           file://0003-rpmSetCloseOnExec-use-getrlimit.patch \
+           "
+
+PE = "1"
+SRCREV = "bfee1410af51c1cc9724791fb8d985260a62102b"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3"
+DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
+
+inherit autotools gettext pkgconfig python3native
+export PYTHON_ABI
+
+# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
+EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
+
+EXTRA_OECONF_append = " --without-lua --enable-python"
+EXTRA_OECONF_append_libc-musl = " --disable-nls"
+
+# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
+#
+# --localstatedir prevents rpm from writing its database to native sysroot when building images
+#
+# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
+# Also disable plugins by default for native.
+EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
+
+# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
+# libmagic also has sysroot path contamination, so override it
+do_install_append_class-native() {
+        tools="\
+                ${bindir}/rpm \
+                ${bindir}/rpm2archive \
+                ${bindir}/rpm2cpio \
+                ${bindir}/rpmbuild \
+                ${bindir}/rpmdb \
+                ${bindir}/rpmgraph \
+                ${bindir}/rpmkeys \
+                ${bindir}/rpmsign \
+                ${bindir}/rpmspec \
+                ${libdir}/rpm/rpmdeps \
+        "
+
+        for tool in $tools; do
+                create_wrapper ${D}$tool \
+                        RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                        RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+                        MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+                        RPM_NO_CHROOT_FOR_SCRIPTS=1
+        done
+}
+
+# Rpm's make install creates var/tmp which clashes with base-files packaging
+do_install_append_class-target() {
+    rm -rf ${D}/var
+}
+
+do_install_append () {
+	sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
+	    ${D}/${libdir}/rpm/macros
+
+	sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
+	    ${D}${libdir}/rpm/pythondistdeps.py \
+	    ${D}${libdir}/rpm/python-macro-helper
+}
+
+FILES_${PN} += "${libdir}/rpm-plugins/*.so \
+               "
+
+FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
+                    "
+
+PACKAGES += "python3-rpm"
+PROVIDES += "python3-rpm"
+FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
+
+# rpm 5.x was packaging the rpm build tools separately
+RPROVIDES_${PN} += "rpm-build"
+
+RDEPENDS_${PN} = "bash perl python3-core"
+
+PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
+
+# Do not specify a sysroot when compiling on a target.
+rpm_package_preprocess () {
+	sed -i -e 's:--sysroot[^ ]*::g' \
+	    ${PKGD}/${libdir}/rpm/macros
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
deleted file mode 100644
index 7866314..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
+++ /dev/null
@@ -1,138 +0,0 @@
-SUMMARY = "The RPM package management system"
-DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
-package management system capable of installing, uninstalling, \
-verifying, querying, and updating software packages. Each software \
-package consists of an archive of files along with information about \
-the package like its version, a description, etc."
-
-SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
-DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
-development files will simplify the process of writing programs that \
-manipulate RPM packages and databases. These files are intended to \
-simplify the process of creating graphical package managers or any \
-other tools that need an intimate knowledge of RPM packages in order \
-to function."
-
-SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages"
-DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \
-written in the Python programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-HOMEPAGE = "http://www.rpm.org"
-
-# libraries are also LGPL - how to express this?
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f5259151d26ff18e78023450a5ac8d96"
-
-SRC_URI = "git://github.com/rpm-software-management/rpm \
-           file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
-           file://0001-Do-not-read-config-files-from-HOME.patch \
-           file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
-           file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
-           file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
-           file://0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch \
-           file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
-           file://0001-Fix-build-with-musl-C-library.patch \
-           file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
-           file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \
-           file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
-           file://0012-Use-conditional-to-access-_docdir-in-macros.in.patch \
-           file://0013-Add-a-new-option-alldeps-to-rpmdeps.patch \
-           file://0001-Split-binary-package-building-into-a-separate-functi.patch \
-           file://0002-Run-binary-package-creation-via-thread-pools.patch \
-           file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
-           file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
-           file://0001-perl-disable-auto-reqs.patch \
-           "
-UPSTREAM_VERSION_UNKNOWN = "1"
-
-PV = "4.13.90+git${SRCPV}"
-PE = "1"
-SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3"
-DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
-
-inherit autotools gettext pkgconfig python3native
-export PYTHON_ABI
-
-# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
-EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
-
-EXTRA_OECONF_append = " --without-lua --enable-python"
-EXTRA_OECONF_append_libc-musl = " --disable-nls"
-
-# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
-#
-# --localstatedir prevents rpm from writing its database to native sysroot when building images
-#
-# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
-EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
-
-# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
-# libmagic also has sysroot path contamination, so override it
-do_install_append_class-native() {
-        tools="\
-                ${bindir}/rpm \
-                ${bindir}/rpm2archive \
-                ${bindir}/rpm2cpio \
-                ${bindir}/rpmbuild \
-                ${bindir}/rpmdb \
-                ${bindir}/rpmgraph \
-                ${bindir}/rpmkeys \
-                ${bindir}/rpmsign \
-                ${bindir}/rpmspec \
-                ${libdir}/rpm/rpmdeps \
-        "
-
-        for tool in $tools; do
-                create_wrapper ${D}$tool \
-                        RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                        RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                        MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                        RPM_NO_CHROOT_FOR_SCRIPTS=1
-        done
-}
-
-# Rpm's make install creates var/tmp which clashes with base-files packaging
-do_install_append_class-target() {
-    rm -rf ${D}/var
-}
-
-do_install_append () {
-	sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
-	    ${D}/${libdir}/rpm/macros
-
-	sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
-	    ${D}${libdir}/rpm/pythondistdeps.py
-}
-
-FILES_${PN} += "${libdir}/rpm-plugins/*.so \
-               "
-
-FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
-                    "
-
-PACKAGES += "python3-rpm"
-PROVIDES += "python3-rpm"
-FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
-
-# rpm 5.x was packaging the rpm build tools separately
-RPROVIDES_${PN} += "rpm-build"
-
-RDEPENDS_${PN} = "bash perl python3-core"
-
-PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
-
-# Do not specify a sysroot when compiling on a target.
-rpm_package_preprocess () {
-	sed -i -e 's:--sysroot[^ ]*::g' \
-	    ${PKGD}/${libdir}/rpm/macros
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
deleted file mode 100644
index 1031984..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-require rsync.inc
-
-SRC_URI += "file://makefile-no-rebuild.patch"
-
-SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
-SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
-
-# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-PACKAGECONFIG ??= "acl attr \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-"
-PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
-PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
-
-# By default, if crosscompiling, rsync disables a number of
-# capabilities, hardlinking symlinks and special files (i.e. devices)
-CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
-
-# rsync 3.0 uses configure.sh instead of configure, and
-# makefile checks the existence of configure.sh
-do_configure_prepend () {
-	rm -f ${S}/configure ${S}/configure.sh
-}
-
-do_configure_append () {
-	cp -f ${S}/configure ${S}/configure.sh
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
new file mode 100644
index 0000000..84a0258
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
@@ -0,0 +1,32 @@
+require rsync.inc
+
+SRC_URI += "file://makefile-no-rebuild.patch"
+
+SRC_URI[md5sum] = "1581a588fde9d89f6bc6201e8129afaf"
+SRC_URI[sha256sum] = "55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0"
+
+# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PACKAGECONFIG ??= "acl attr \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+"
+PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
+PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
+
+# By default, if crosscompiling, rsync disables a number of
+# capabilities, hardlinking symlinks and special files (i.e. devices)
+CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
+
+# rsync 3.0 uses configure.sh instead of configure, and
+# makefile checks the existence of configure.sh
+do_configure_prepend () {
+	rm -f ${S}/configure ${S}/configure.sh
+}
+
+do_configure_append () {
+	cp -f ${S}/configure ${S}/configure.sh
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
index d719898..fd3911b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
@@ -8,13 +8,13 @@
 SECTION = "devel/ruby"
 LICENSE = "Ruby | BSD | GPLv2"
 LIC_FILES_CHKSUM = "\
-    file://COPYING;md5=8a960b08d972f43f91ae84a6f00dcbfb \
+    file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \
     file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\
     file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\
-    file://LEGAL;md5=daf349ad59dd19bd8c919171bff3c5d6 \
+    file://LEGAL;md5=8f871f3f03732c018a5fa9b185958231 \
 "
 
-DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
+DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline"
 DEPENDS_class-native = "openssl-native libyaml-native"
 
 SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
index b0114ba..4cf579f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
@@ -10,19 +10,16 @@
  Makefile.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/Makefile.in b/Makefile.in
-index 7da2488..5b4aea1 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -75,7 +75,7 @@ EXTLIBS =
- LIBS = @LIBS@ $(EXTLIBS)
+Index: ruby-2.5.0/Makefile.in
+===================================================================
+--- ruby-2.5.0.orig/Makefile.in
++++ ruby-2.5.0/Makefile.in
+@@ -77,7 +77,7 @@ LIBS = @LIBS@ $(EXTLIBS)
  MISSING = @LIBOBJS@ @ALLOCA@
+ ENABLE_SHARED = @ENABLE_SHARED@
  LDSHARED = @LIBRUBY_LDSHARED@
 -DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
 +DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
  SOLIBS = @SOLIBS@
+ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@
  MAINLIBS = @MAINLIBS@
- ARCHMINIOBJS = @MINIOBJS@
--- 
-2.8.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
index a5b2184..404b9af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
@@ -2,13 +2,15 @@
 diff -ru ruby-1.8.7-p248.orig/ext/extmk.rb ruby-1.8.7-p248/ext/extmk.rb
 --- ruby-1.8.7-p248.orig/ext/extmk.rb	2009-12-24 03:01:58.000000000 -0600
 +++ ruby-1.8.7-p248/ext/extmk.rb	2010-02-12 15:55:27.370061558 -0600
-@@ -354,8 +354,8 @@
-   $ruby = '$(topdir)/miniruby' + EXEEXT
+@@ -413,8 +413,8 @@ def $mflags.defined?(var)
  end
- $ruby << " -I'$(topdir)'"
-+$ruby << " -I'$(top_srcdir)/lib'"
+ $ruby = [$ruby]
+ $ruby << "-I'$(topdir)'"
++$ruby << "-I'$(top_srcdir)/lib'"
  unless CROSS_COMPILING
--  $ruby << " -I'$(top_srcdir)/lib'"
-   $ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
-   $ruby << " -I./- -I'$(top_srcdir)/ext' -rpurelib.rb"
+-  $ruby << "-I'$(top_srcdir)/lib'"
+   $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout
    ENV["RUBYLIB"] = "-"
+ end
+-- 
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch
deleted file mode 100644
index 88e693c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 8f782fd8e181d9cfe9387ded43a5ca9692266b85 Mon Sep 17 00:00:00 2001
-From: Florian Frank <flori@ping.de>
-Date: Thu, 2 Mar 2017 12:12:33 +0100
-Subject: [PATCH] Fix arbitrary heap exposure problem
-
-Upstream-Status: Backport
-CVE: CVE-2017-14064
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- ext/json/generator/generator.c | 12 ++++++------
- ext/json/generator/generator.h |  1 -
- 2 files changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
-index ef85bb7..c88818c 100644
---- a/ext/json/generator/generator.c
-+++ b/ext/json/generator/generator.c
-@@ -308,7 +308,7 @@ static char *fstrndup(const char *ptr, unsigned long len) {
-   char *result;
-   if (len <= 0) return NULL;
-   result = ALLOC_N(char, len);
--  memccpy(result, ptr, 0, len);
-+  memcpy(result, ptr, len);
-   return result;
- }
- 
-@@ -1062,7 +1062,7 @@ static VALUE cState_indent_set(VALUE self, VALUE indent)
-         }
-     } else {
-         if (state->indent) ruby_xfree(state->indent);
--        state->indent = strdup(RSTRING_PTR(indent));
-+        state->indent = fstrndup(RSTRING_PTR(indent), len);
-         state->indent_len = len;
-     }
-     return Qnil;
-@@ -1100,7 +1100,7 @@ static VALUE cState_space_set(VALUE self, VALUE space)
-         }
-     } else {
-         if (state->space) ruby_xfree(state->space);
--        state->space = strdup(RSTRING_PTR(space));
-+        state->space = fstrndup(RSTRING_PTR(space), len);
-         state->space_len = len;
-     }
-     return Qnil;
-@@ -1136,7 +1136,7 @@ static VALUE cState_space_before_set(VALUE self, VALUE space_before)
-         }
-     } else {
-         if (state->space_before) ruby_xfree(state->space_before);
--        state->space_before = strdup(RSTRING_PTR(space_before));
-+        state->space_before = fstrndup(RSTRING_PTR(space_before), len);
-         state->space_before_len = len;
-     }
-     return Qnil;
-@@ -1173,7 +1173,7 @@ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl)
-         }
-     } else {
-         if (state->object_nl) ruby_xfree(state->object_nl);
--        state->object_nl = strdup(RSTRING_PTR(object_nl));
-+        state->object_nl = fstrndup(RSTRING_PTR(object_nl), len);
-         state->object_nl_len = len;
-     }
-     return Qnil;
-@@ -1208,7 +1208,7 @@ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl)
-         }
-     } else {
-         if (state->array_nl) ruby_xfree(state->array_nl);
--        state->array_nl = strdup(RSTRING_PTR(array_nl));
-+        state->array_nl = fstrndup(RSTRING_PTR(array_nl), len);
-         state->array_nl_len = len;
-     }
-     return Qnil;
-diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
-index 900b4d5..c367a62 100644
---- a/ext/json/generator/generator.h
-+++ b/ext/json/generator/generator.h
-@@ -1,7 +1,6 @@
- #ifndef _GENERATOR_H_
- #define _GENERATOR_H_
- 
--#include <string.h>
- #include <math.h>
- #include <ctype.h>
- 
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch
deleted file mode 100644
index 848139b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 690313a061f7a4fa614ec5cc8368b4f2284e059b Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Tue, 23 May 2017 10:28:58 +0900
-Subject: [PATCH] fix #57 : DATA_ENSURE() check must be before data access
-
----
- regexec.c |    5 -----
- 1 file changed, 5 deletions(-)
-
---- end of original header
-
-CVE: CVE-2017-9224
-
-Context modified so that patch applies for version 2.4.1.
-
-Upstream-Status: Pending
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-
-diff --git a/regexec.c b/regexec.c
-index 35fef11..d4e577d 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -1473,14 +1473,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
-       NEXT;
-
-     CASE(OP_EXACT1)  MOP_IN(OP_EXACT1);
--#if 0
-       DATA_ENSURE(1);
-       if (*p != *s) goto fail;
-       p++; s++;
--#endif
--      if (*p != *s++) goto fail;
--      DATA_ENSURE(0);
--      p++;
-       MOP_OUT;
-       break;
- 
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
index 0f2a430..89437bb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
@@ -20,22 +20,13 @@
 
 --- ruby-2.4.1.orig/regparse.c
 +++ ruby-2.4.1/regparse.c
-@@ -3644,7 +3644,7 @@ fetch_token(OnigToken* tok, UChar** src,
-       if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
- 	prev = p;
- 	num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);
--	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
-+	if (num < 0 || 0xff < num) return ONIGERR_TOO_BIG_NUMBER;
- 	if (p == prev) {  /* can't read nothing. */
- 	  num = 0; /* but, it's not error */
- 	}
 @@ -4450,6 +4450,9 @@ next_state_val(CClassNode* cc, CClassNod
    switch (*state) {
    case CCS_VALUE:
      if (*type == CCV_SB) {
-+      if (*vs > 0xff)
++      if (*from > 0xff)
 +          return ONIGERR_INVALID_CODE_POINT_VALUE;
 +
-       BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*vs));
+       BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*from));
        if (IS_NOT_NULL(asc_cc))
- 	BITSET_SET_BIT(asc_cc->bs, (int )(*vs));
+ 	BITSET_SET_BIT(asc_cc->bs, (int )(*from));
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch
deleted file mode 100644
index 85e7ccb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814 Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Tue, 23 May 2017 16:15:35 +0900
-Subject: [PATCH] fix #58 : access to invalid address by reg->dmin value
-
----
- regexec.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- end of original header
-
-CVE: CVE-2017-9227
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-diff --git a/regexec.c b/regexec.c
-index d4e577d..2fa0f3d 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -3154,6 +3154,8 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
-     }
-     else {
-       UChar *q = p + reg->dmin;
-+
-+      if (q >= end) return 0; /* fail */
-       while (p < q) p += enclen(reg->enc, p, end);
-     }
-   }
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch
deleted file mode 100644
index 6e765bf..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From b690371bbf97794b4a1d3f295d4fb9a8b05d402d Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Wed, 24 May 2017 10:27:04 +0900
-Subject: [PATCH] fix #59 : access to invalid address by reg->dmax value
-
----
- regexec.c |   27 +++++++++++++++++----------
- 1 file changed, 17 insertions(+), 10 deletions(-)
-
---- end of original header
-
-CVE: CVE-2017-9229
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-diff --git a/regexec.c b/regexec.c
-index 49bcc50..c0626ef 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -3756,18 +3756,25 @@ forward_search_range(regex_t* reg, const
-     }
-     else {
-       if (reg->dmax != ONIG_INFINITE_DISTANCE) {
--	*low = p - reg->dmax;
--	if (*low > s) {
--	  *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
--							      *low, end, (const UChar** )low_prev);
--	  if (low_prev && IS_NULL(*low_prev))
--	    *low_prev = onigenc_get_prev_char_head(reg->enc,
--						   (pprev ? pprev : s), *low, end);
-+        if (p - str < reg->dmax) {
-+          *low = (UChar* )str;
-+          if (low_prev)
-+            *low_prev = onigenc_get_prev_char_head(reg->enc, str, *low, end);
- 	}
- 	else {
--	  if (low_prev)
--	    *low_prev = onigenc_get_prev_char_head(reg->enc,
--					       (pprev ? pprev : str), *low, end);
-+          *low = p - reg->dmax;
-+          if (*low > s) {
-+            *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
-+                                                 *low, end, (const UChar** )low_prev);
-+            if (low_prev && IS_NULL(*low_prev))
-+              *low_prev = onigenc_get_prev_char_head(reg->enc,
-+                                                     (pprev ? pprev : s), *low, end);
-+          }
-+          else {
-+            if (low_prev)
-+              *low_prev = onigenc_get_prev_char_head(reg->enc,
-+                                                     (pprev ? pprev : str), *low, end);
-+          }
- 	}
-       }
-     }
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
deleted file mode 100644
index 7d27ac8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-require ruby.inc
-
-SRC_URI += " \
-           file://ruby-CVE-2017-9224.patch \
-           file://ruby-CVE-2017-9226.patch \
-           file://ruby-CVE-2017-9227.patch \
-           file://ruby-CVE-2017-9228.patch \
-           file://ruby-CVE-2017-9229.patch \
-           file://ruby-CVE-2017-14064.patch \
-           "
-
-SRC_URI[md5sum] = "782bca562e474dd25956dd0017d92677"
-SRC_URI[sha256sum] = "a330e10d5cb5e53b3a0078326c5731888bb55e32c4abfeb27d9e7f8e5d000250"
-
-# it's unknown to configure script, but then passed to extconf.rb
-# maybe it's not really needed as we're hardcoding the result with
-# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
-UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-
-PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
-PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp"
-PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
-
-EXTRA_AUTORECONF += "--exclude=aclocal"
-
-EXTRA_OECONF = "\
-    --disable-versioned-paths \
-    --disable-rpath \
-    --disable-dtrace \
-    --enable-shared \
-    --enable-load-relative \
-"
-
-do_install() {
-    oe_runmake 'DESTDIR=${D}' install
-}
-
-PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
-
-SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
-RDEPENDS_${PN}-ri-docs = "${PN}"
-FILES_${PN}-ri-docs += "${datadir}/ri"
-
-SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
-RDEPENDS_${PN}-rdoc = "${PN}"
-FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
-
-FILES_${PN} += "${datadir}/rubygems"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb
new file mode 100644
index 0000000..1ac7f2a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb
@@ -0,0 +1,49 @@
+require ruby.inc
+
+SRC_URI += " \
+           file://ruby-CVE-2017-9226.patch \
+           file://ruby-CVE-2017-9228.patch \
+           "
+
+SRC_URI[md5sum] = "f4711f856fe14de222b9da3d3b8efa89"
+SRC_URI[sha256sum] = "46e6f3630f1888eb653b15fa811d77b5b1df6fd7a3af436b343cfe4f4503f2ab"
+
+# it's unknown to configure script, but then passed to extconf.rb
+# maybe it's not really needed as we're hardcoding the result with
+# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
+UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
+PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
+PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+EXTRA_OECONF = "\
+    --disable-versioned-paths \
+    --disable-rpath \
+    --disable-dtrace \
+    --enable-shared \
+    --enable-load-relative \
+"
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
+
+SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
+RDEPENDS_${PN}-ri-docs = "${PN}"
+FILES_${PN}-ri-docs += "${datadir}/ri"
+
+SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
+RDEPENDS_${PN}-rdoc = "${PN}"
+FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
+
+FILES_${PN} += "${datadir}/rubygems"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 50c0a1a..307feb7 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -43,7 +43,7 @@
 	fi
 }
 
-if [ -z "$pi_dir" ]; then
+if ! [ -d $pi_dir ]; then
 	remove_rcsd_link
 	exit 0
 fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 31c98ec..85b3fc8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Runs postinstall scripts on first boot of the target device"
 SECTION = "devel"
-PR = "r9"
+PR = "r10"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
index d545146..0ce7b4e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
@@ -23,7 +23,7 @@
 ===================================================================
 --- squashfs-tools.orig/mksquashfs.c
 +++ squashfs-tools/mksquashfs.c
-@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
+@@ -1261,6 +1261,10 @@ void write_dir(squashfs_inode *inode, st
  		dir_size + 3, directory_block, directory_offset, NULL, NULL,
  		dir, 0);
  
@@ -50,9 +50,9 @@
 ===================================================================
 --- squashfs-tools.orig/unsquashfs.c
 +++ squashfs-tools/unsquashfs.c
-@@ -38,6 +38,10 @@
- #include <limits.h>
- #include <ctype.h>
+@@ -42,6 +42,10 @@
+ #include <sys/sysmacros.h>
+ #endif
  
 +#ifndef FNM_EXTMATCH
 +#define FNM_EXTMATCH 0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index 0f99170..a8baca5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -16,7 +16,7 @@
            file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \
            file://fix-compat.patch \
 "
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
 SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
 
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index 97bcc90..a12f4c3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -14,23 +14,23 @@
  2 files changed, 19 insertions(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index 61d6425..6387c24 100644
+index 5f0aec4..8eaacc6 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -41,7 +41,7 @@ AC_COPYRIGHT([Copyright (C) 1999-]copyright_year[ The strace developers.])
+@@ -42,7 +42,7 @@ AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
  AC_CONFIG_SRCDIR([strace.c])
  AC_CONFIG_AUX_DIR([.])
  AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
-+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
- AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
+-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests 1.13])
++AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests 1.13])
  AM_MAINTAINER_MODE
  AC_CANONICAL_HOST
+ 
 diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 5aa7f89..a55a355 100644
+index b4ba22a..5836438 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -379,3 +379,21 @@ clean-local-check:
+@@ -408,3 +408,21 @@ BUILT_SOURCES = ksysent.h
  CLEANFILES = ksysent.h
  
  include ../scno.am
@@ -52,6 +52,3 @@
 +		sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
 +	done
 +	for i in net scm_rights-fd rt_sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
deleted file mode 100644
index 5b2891a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "System call tracing tool"
-HOMEPAGE = "http://strace.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f132b4d2adfccc63da4139a609367711"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
-           file://disable-git-version-gen.patch \
-           file://more-robust-test-for-m32-mx32-compile-support.patch \
-           file://update-gawk-paths.patch \
-           file://Makefile-ptest.patch \
-           file://run-ptest \
-           file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
-           file://mips-SIGEMT.patch \
-           file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
-           file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
-           "
-
-SRC_URI[md5sum] = "3579b3266bb096cebaefbe2cdb1a3a78"
-SRC_URI[sha256sum] = "89ad887c1e6226bdbca8da31d589cadea4be0744b142eb47b768086c937fca08"
-
-inherit autotools ptest bluetooth
-
-RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
-
-PACKAGECONFIG_class-target ??= "\
-    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-"
-
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-
-TESTDIR = "tests"
-
-do_install_append() {
-	# We don't ship strace-graph here because it needs perl
-	rm ${D}${bindir}/strace-graph
-}
-
-do_compile_ptest() {
-	oe_runmake -C ${TESTDIR} buildtest-TESTS
-}
-
-do_install_ptest() {
-	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-	sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
-	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -e 's:${RECIPE_SYSROOT}::g' \
-	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-	    -e '/^DEB_CHANGELOGTIME/d' \
-	    -e '/^RPM_CHANGELOGTIME/d' \
-	${D}/${PTEST_PATH}/${TESTDIR}/Makefile
-}
-
-BBCLASSEXTEND = "native"
-TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb
new file mode 100644
index 0000000..869c12f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb
@@ -0,0 +1,59 @@
+SUMMARY = "System call tracing tool"
+HOMEPAGE = "http://strace.io"
+SECTION = "console/utils"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f132b4d2adfccc63da4139a609367711"
+
+SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
+           file://disable-git-version-gen.patch \
+           file://more-robust-test-for-m32-mx32-compile-support.patch \
+           file://update-gawk-paths.patch \
+           file://Makefile-ptest.patch \
+           file://run-ptest \
+           file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
+           file://mips-SIGEMT.patch \
+           file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
+           file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
+           "
+
+SRC_URI[md5sum] = "f2271ab0fac49ebee9cbd7f3469227cb"
+SRC_URI[sha256sum] = "5bf3148dd17306a42566f7da17368fdd781afa147db05ea63a4ca2b50f58c523"
+
+inherit autotools ptest bluetooth
+
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
+
+PACKAGECONFIG_class-target ??= "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+"
+
+PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+
+TESTDIR = "tests"
+
+do_install_append() {
+	# We don't ship strace-graph here because it needs perl
+	rm ${D}${bindir}/strace-graph
+}
+
+do_compile_ptest() {
+	oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+	sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
+	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+	    -e 's:${RECIPE_SYSROOT}::g' \
+	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+	    -e '/^DEB_CHANGELOGTIME/d' \
+	    -e '/^RPM_CHANGELOGTIME/d' \
+	${D}/${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch
deleted file mode 100644
index 0599c2b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-------------------------------------------------------------------------
-r1804691 | danielsh | 2017-08-10 11:14:13 -0700 (Thu, 10 Aug 2017) | 18 lines
-
-Fix CVE-2017-9800.
-
-See: https://subversion.apache.org/security/CVE-2017-0800-advisory.txt
-
-* subversion/libsvn_ra_svn/client.c
-  (svn_ctype.h): Include.
-  (find_tunnel_agent): Pass a "--" end-of-options guard to ssh.
-    Expect the 'hostinfo' parameter to be URI-decoded.
-  (is_valid_hostinfo): New.
-  (ra_svn_open): Validate the hostname before using it.
-
-* subversion/libsvn_subr/config_file.c
-  (svn_config_ensure): Update the example configuration likewise.
-
-Patch by: philip
-Review by: danielsh
-           stsp
-           astieger (earlier version)
-
-Upstream-Status: Backport
-http://svn.apache.org/viewvc?view=revision&amp;sortby=rev&amp;revision=1804691
-
-CVE: CVE-2017-9800
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
-Index: subversion/libsvn_subr/config_file.c
-===================================================================
---- subversion/libsvn_subr/config_file.c	(revision 1804690)
-+++ subversion/libsvn_subr/config_file.c	(revision 1804691)
-@@ -1448,12 +1448,12 @@
-         "### passed to the tunnel agent as <user>@<hostname>.)  If the"      NL
-         "### built-in ssh scheme were not predefined, it could be defined"   NL
-         "### as:"                                                            NL
--        "# ssh = $SVN_SSH ssh -q"                                            NL
-+        "# ssh = $SVN_SSH ssh -q --"                                         NL
-         "### If you wanted to define a new 'rsh' scheme, to be used with"    NL
-         "### 'svn+rsh:' URLs, you could do so as follows:"                   NL
--        "# rsh = rsh"                                                        NL
-+        "# rsh = rsh --"                                                     NL
-         "### Or, if you wanted to specify a full path and arguments:"        NL
--        "# rsh = /path/to/rsh -l myusername"                                 NL
-+        "# rsh = /path/to/rsh -l myusername --"                              NL
-         "### On Windows, if you are specifying a full path to a command,"    NL
-         "### use a forward slash (/) or a paired backslash (\\\\) as the"    NL
-         "### path separator.  A single backslash will be treated as an"      NL
-Index: subversion/libsvn_ra_svn/client.c
-===================================================================
---- subversion/libsvn_ra_svn/client.c	(revision 1804690)
-+++ subversion/libsvn_ra_svn/client.c	(revision 1804691)
-@@ -46,6 +46,7 @@
- #include "svn_props.h"
- #include "svn_mergeinfo.h"
- #include "svn_version.h"
-+#include "svn_ctype.h"
- 
- #include "svn_private_config.h"
- 
-@@ -398,7 +399,7 @@
-        * versions have it too. If the user is using some other ssh
-        * implementation that doesn't accept it, they can override it
-        * in the [tunnels] section of the config. */
--      val = "$SVN_SSH ssh -q";
-+      val = "$SVN_SSH ssh -q --";
-     }
- 
-   if (!val || !*val)
-@@ -443,7 +444,7 @@
-   for (n = 0; cmd_argv[n] != NULL; n++)
-     argv[n] = cmd_argv[n];
- 
--  argv[n++] = svn_path_uri_decode(hostinfo, pool);
-+  argv[n++] = hostinfo;
-   argv[n++] = "svnserve";
-   argv[n++] = "-t";
-   argv[n] = NULL;
-@@ -811,7 +812,33 @@
- }
- 
- 
-+/* A simple whitelist to ensure the following are valid:
-+ *   user@server
-+ *   [::1]:22
-+ *   server-name
-+ *   server_name
-+ *   127.0.0.1
-+ * with an extra restriction that a leading '-' is invalid.
-+ */
-+static svn_boolean_t
-+is_valid_hostinfo(const char *hostinfo)
-+{
-+  const char *p = hostinfo;
- 
-+  if (p[0] == '-')
-+    return FALSE;
-+
-+  while (*p)
-+    {
-+      if (!svn_ctype_isalnum(*p) && !strchr(":.-_[]@", *p))
-+        return FALSE;
-+
-+      ++p;
-+    }
-+
-+  return TRUE;
-+}
-+
- static svn_error_t *ra_svn_open(svn_ra_session_t *session,
-                                 const char **corrected_url,
-                                 const char *url,
-@@ -844,8 +871,18 @@
-           || (callbacks->check_tunnel_func && callbacks->open_tunnel_func
-               && !callbacks->check_tunnel_func(callbacks->tunnel_baton,
-                                                tunnel))))
--    SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config,
--                              result_pool));
-+    {
-+      const char *decoded_hostinfo;
-+
-+      decoded_hostinfo = svn_path_uri_decode(uri.hostinfo, result_pool);
-+
-+      if (!is_valid_hostinfo(decoded_hostinfo))
-+        return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("Invalid host '%s'"),
-+                                 uri.hostinfo);
-+
-+      SVN_ERR(find_tunnel_agent(tunnel, decoded_hostinfo, &tunnel_argv,
-+                                config, result_pool));
-+    }
-   else
-     tunnel_argv = NULL;
- 
-
-------------------------------------------------------------------------
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
deleted file mode 100644
index 532edeb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "Subversion (svn) version control system client"
-SECTION = "console/network"
-DEPENDS = "apr-util serf sqlite3 file"
-DEPENDS_append_class-native = " file-replacement-native"
-RDEPENDS_${PN} = "serf"
-LICENSE = "Apache-2"
-HOMEPAGE = "http://subversion.tigris.org"
-
-BBCLASSEXTEND = "native"
-
-inherit gettext pkgconfig
-
-SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://disable_macos.patch \
-           file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
-           file://0001-Fix-libtool-name-in-configure.ac.patch \
-           file://serfmacro.patch \
-           file://CVE-2017-9800.patch;striplevel=0 \
-           "
-
-SRC_URI[md5sum] = "f27e00338d4a9f7f9aec9d4a3f8b418b"
-SRC_URI[sha256sum] = "dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
-
-PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
-PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
-
-EXTRA_OECONF = " \
-                --without-berkeley-db --without-apxs \
-                --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
-                --with-apr-util=${STAGING_BINDIR_CROSS} \
-                --disable-keychain \
-                ac_cv_path_RUBY=none"
-
-inherit autotools
-
-export LDFLAGS += " -L${STAGING_LIBDIR} "
-CPPFLAGS += "-P"
-BUILD_CPPFLAGS += "-P"
-
-acpaths = "-I build/ -I build/ac-macros/"
-
-do_configure_prepend () {
-	rm -f ${S}/libtool
-	rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
-	rm -f ${S}/aclocal.m4
-	sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
-}
-
-#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
-#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
-#| make: *** [install-serf-lib] Error 1
-PARALLEL_MAKEINST = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb
new file mode 100644
index 0000000..57735f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Subversion (svn) version control system client"
+SECTION = "console/network"
+DEPENDS = "apr-util serf sqlite3 file"
+DEPENDS_append_class-native = " file-replacement-native"
+RDEPENDS_${PN} = "serf"
+LICENSE = "Apache-2"
+HOMEPAGE = "http://subversion.tigris.org"
+
+BBCLASSEXTEND = "native"
+
+inherit gettext pkgconfig
+
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+           file://disable_macos.patch \
+           file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
+           file://0001-Fix-libtool-name-in-configure.ac.patch \
+           file://serfmacro.patch \
+           "
+
+SRC_URI[md5sum] = "05b0c677681073920f938c1f322e0be2"
+SRC_URI[sha256sum] = "c3b118333ce12e501d509e66bb0a47bcc34d053990acab45559431ac3e491623"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
+
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
+PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
+
+EXTRA_OECONF = " \
+                --without-berkeley-db --without-apxs \
+                --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
+                --with-apr-util=${STAGING_BINDIR_CROSS} \
+                --disable-keychain \
+                ac_cv_path_RUBY=none"
+
+inherit autotools
+
+export LDFLAGS += " -L${STAGING_LIBDIR} "
+CPPFLAGS += "-P"
+BUILD_CPPFLAGS += "-P"
+
+acpaths = "-I build/ -I build/ac-macros/"
+
+do_configure_prepend () {
+	rm -f ${S}/libtool
+	rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
+	rm -f ${S}/aclocal.m4
+	sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
+}
+
+#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
+#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
+#| make: *** [install-serf-lib] Error 1
+PARALLEL_MAKEINST = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
index 8cb6fbd..bf61b02 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
@@ -11,7 +11,7 @@
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
 
-inherit autotools python3native
+inherit autotools python3native pkgconfig
 
 EXTRA_OECONF = " \
     --with-python3=${PYTHON} \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
new file mode 100644
index 0000000..885c395
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
@@ -0,0 +1,330 @@
+From 1a5aadcd66e85c63d228bfd811a521d617c22a38 Mon Sep 17 00:00:00 2001
+From: Patrick Schneider <patrick.schneider@meetnow.eu>
+Date: Thu, 13 Apr 2017 15:02:53 +0200
+Subject: [PATCH] Add Node 7.x aka V8 5.2+ support
+
+* Use WeakCallbackInfo instead of WeakCallbackData
+* Use GetPrivate instead of GetHiddenValue
+* Adopted new signature for SetWeak to support destructor calling
+* SetAccessor deprecation fixed
+* Proper version checks where applicable
+
+Upstream-Status: Submitted [https://github.com/swig/swig/pull/968]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ Lib/javascript/v8/javascriptcode.swg    | 27 +++++++++++++++++-----
+ Lib/javascript/v8/javascripthelpers.swg | 29 +++++++++++++++++++++---
+ Lib/javascript/v8/javascriptinit.swg    | 16 +++++++++++--
+ Lib/javascript/v8/javascriptrun.swg     | 40 ++++++++++++++++++++++++++++-----
+ 4 files changed, 95 insertions(+), 17 deletions(-)
+
+diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg
+index fb7d55c..b8c5089 100644
+--- a/Lib/javascript/v8/javascriptcode.swg
++++ b/Lib/javascript/v8/javascriptcode.swg
+@@ -133,10 +133,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+   SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+   v8::Local<v8::Object> object = data.GetValue();
+   SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++  static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++  SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+ 
+   if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -147,7 +150,9 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+   }
+   delete proxy;
+ 
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   object.Clear();
++#endif
+   
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+   object.Dispose();
+@@ -155,7 +160,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+   object.Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
+   object->Dispose(isolate);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   object->Dispose();
+ #endif
+ }
+@@ -177,10 +182,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+   SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+   v8::Local<v8::Object> object = data.GetValue();
+   SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++  SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+ 
+   if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -197,7 +205,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+   object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+   object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   object.Clear();
+ #endif
+ }
+@@ -211,7 +219,11 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+  * ----------------------------------------------------------------------------- */
+ %fragment("js_getter", "templates")
+ %{
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo &info) {
++#else
++static SwigV8ReturnValue $jswrapper(v8::Local<v8::Name> property, const SwigV8PropertyCallbackInfo &info) {
++#endif
+   SWIGV8_HANDLESCOPE();
+   
+   v8::Handle<v8::Value> jsresult;
+@@ -233,8 +245,11 @@ fail:
+  * ----------------------------------------------------------------------------- */
+ %fragment("js_setter", "templates")
+ %{
+-static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+-  const SwigV8PropertyCallbackInfoVoid &info) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#else
++static void $jswrapper(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#endif
+   SWIGV8_HANDLESCOPE();
+   
+   $jslocals
+diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
+index 091467d..7461079 100644
+--- a/Lib/javascript/v8/javascripthelpers.swg
++++ b/Lib/javascript/v8/javascripthelpers.swg
+@@ -6,11 +6,16 @@ typedef v8::InvocationCallback  SwigV8FunctionCallback;
+ typedef v8::AccessorGetter      SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetter      SwigV8AccessorSetterCallback;
+ typedef v8::AccessorInfo        SwigV8PropertyCallbackInfoVoid;
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ typedef v8::FunctionCallback            SwigV8FunctionCallback;
+ typedef v8::AccessorGetterCallback      SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetterCallback      SwigV8AccessorSetterCallback;
+ typedef v8::PropertyCallbackInfo<void>  SwigV8PropertyCallbackInfoVoid;
++#else
++typedef v8::FunctionCallback            SwigV8FunctionCallback;
++typedef v8::AccessorNameGetterCallback  SwigV8AccessorGetterCallback;
++typedef v8::AccessorNameSetterCallback  SwigV8AccessorSetterCallback;
++typedef v8::PropertyCallbackInfo<void>  SwigV8PropertyCallbackInfoVoid;
+ #endif
+ 
+ /**
+@@ -65,18 +70,36 @@ SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle<v8::Object> obj, const char
+  */
+ SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle<v8::Object> obj, const char* symbol,
+   SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#else
++  obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#endif
+ }
+ 
+-SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+-  const SwigV8PropertyCallbackInfoVoid& info)
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#else
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#endif
+ {
+     char buffer[256];
+     char msg[512];
+     int res;
+ 
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+     property->WriteUtf8(buffer, 256);
+     res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++#else
++    v8::Local<v8::String> sproperty;
++    if (property->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocal(&sproperty)) {
++      sproperty->WriteUtf8(buffer, 256);
++      res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++    }
++    else {
++      res = -1;
++    }
++#endif
+ 
+     if(res<0) {
+       SWIG_exception(SWIG_ERROR, "Tried to write read-only variable.");
+diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
+index 34befa7..86008d9 100644
+--- a/Lib/javascript/v8/javascriptinit.swg
++++ b/Lib/javascript/v8/javascriptinit.swg
+@@ -7,15 +7,27 @@ SWIG_V8_SetModule(void *, swig_module_info *swig_module) {
+   v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
+   v8::Local<v8::External> mod = SWIGV8_EXTERNAL_NEW(swig_module);
+   assert(!mod.IsEmpty());
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod);
++#else
++  v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++  global_obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, mod);
++#endif
+ }
+ 
+ SWIGRUNTIME swig_module_info *
+ SWIG_V8_GetModule(void *) {
+   v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   v8::Local<v8::Value> moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"));
++#else
++  v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++  v8::Local<v8::Value> moduleinfo;
++  if (!global_obj->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&moduleinfo))
++    return 0;
++#endif
+ 
+-  if (moduleinfo.IsEmpty())
++  if (moduleinfo.IsEmpty() || moduleinfo->IsNull() || moduleinfo->IsUndefined())
+   {
+     // It's not yet loaded
+     return 0;
+@@ -23,7 +35,7 @@ SWIG_V8_GetModule(void *) {
+ 
+   v8::Local<v8::External> moduleinfo_extern = v8::Local<v8::External>::Cast(moduleinfo);
+ 
+-  if (moduleinfo_extern.IsEmpty())
++  if (moduleinfo_extern.IsEmpty() || moduleinfo_extern->IsNull() || moduleinfo_extern->IsUndefined())
+   {
+     // Something's not right
+     return 0;
+diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
+index 5ac52a5..30002c0 100644
+--- a/Lib/javascript/v8/javascriptrun.swg
++++ b/Lib/javascript/v8/javascriptrun.swg
+@@ -193,8 +193,10 @@ public:
+   void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+   void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
++#else
++  void (*dtor) (const v8::WeakCallbackInfo<SWIGV8_Proxy> &data);
+ #endif
+ };
+ 
+@@ -241,9 +243,12 @@ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Val
+   SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+   SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++  SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+ 
+   delete proxy;
+@@ -312,12 +317,18 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void *ptr, sw
+   } else {
+     cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+   }
+-#else
++#elifif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
+     cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
+   } else {
+     cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+   }
++#else
++  if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
++    cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor, v8::WeakCallbackType::kParameter);
++  } else {
++    cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor, v8::WeakCallbackType::kParameter);
++  }
+ #endif
+ 
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+@@ -470,7 +481,14 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
+   
+   v8::Handle<v8::Object> objRef = valRef->ToObject();
+   if(objRef->InternalFieldCount() < 1) return false;
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   v8::Handle<v8::Value> flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"));
++#else
++  v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++  v8::Local<v8::Value> flag;
++  if (!objRef->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&flag))
++    return false;
++#endif
+   return (flag->IsBoolean() && flag->BooleanValue());
+ }
+ 
+@@ -519,10 +537,13 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persist
+   SwigV8PackedData *cdata = static_cast<SwigV8PackedData *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SwigV8PackedData *cdata) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
+   v8::Local<v8::Object> object = data.GetValue();
+   SwigV8PackedData *cdata = data.GetParameter();
++#else
++SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackInfo<SwigV8PackedData> &data) {
++  SwigV8PackedData *cdata = data.GetParameter();
+ #endif
+ 
+   delete cdata;
+@@ -537,7 +558,7 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Ob
+   object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+   object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   object.Clear();
+ #endif
+ }
+@@ -550,7 +571,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ //  v8::Handle<v8::Object> obj = SWIGV8_OBJECT_NEW();
+   v8::Local<v8::Object> obj = SWIGV8_OBJECT_NEW();
+ 
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true));
++#else
++  v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++  obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, SWIGV8_BOOLEAN_NEW(true));
++#endif
+ 
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031511)
+   obj->SetPointerInInternalField(0, cdata);
+@@ -573,9 +599,11 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+   cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+   cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+   cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
+ //  v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete);
++#else
++  cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete, v8::WeakCallbackType::kParameter);
+ #endif
+ 
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+-- 
+2.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
index d5caa67..15f7348 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
@@ -2,6 +2,7 @@
 
 SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
             file://0001-configure-use-pkg-config-for-pcre-detection.patch \
+            file://0001-Add-Node-7.x-aka-V8-5.2-support.patch \
            "
 SRC_URI[md5sum] = "82133dfa7bba75ff9ad98a7046be687c"
 SRC_URI[sha256sum] = "7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
index c0714b5..6ba96ae 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
@@ -20,15 +20,12 @@
  com32/Makefile |    1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/com32/Makefile b/com32/Makefile
-index 9a1721b..f172db2 100644
---- a/com32/Makefile
-+++ b/com32/Makefile
-@@ -21,3 +21,4 @@ rosh: lib libutil
- samples: libutil elflink/ldlinux
- sysdump: libupload gpllib
+Index: syslinux-6.03/com32/Makefile
+===================================================================
+--- syslinux-6.03.orig/com32/Makefile
++++ syslinux-6.03/com32/Makefile
+@@ -22,3 +22,4 @@ samples: libutil elflink/ldlinux
+ sysdump: lib libutil libupload gpllib
+ lua/src: cmenu modules
  gpllib: lib
 +libupload: lib
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
deleted file mode 100644
index 5aa0463..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d379126d56d0b6e935b2d97ca71579e6cc54d1bb Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 18 Jul 2017 13:37:27 +0300
-Subject: [PATCH] parse-util: Don't use xlocale.h
-
-glibc 2.26 no longer contains the non-standard xlocale.h
-(http://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27)
-
-This change shouldn't break anything as xlocale.h was a subset of
-locale.h.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted [https://github.com/systemd/systemd-bootchart/pull/35]
----
- src/parse-util.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/parse-util.c b/src/parse-util.c
-index 5635a68..1b2169c 100644
---- a/src/parse-util.c
-+++ b/src/parse-util.c
-@@ -21,7 +21,6 @@
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
--#include <xlocale.h>
- 
- #include "macro.h"
- #include "parse-util.h"
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 0000000..f392cea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,36 @@
+From 45b401a947af944c20b3c451a35dfe53bca5ef3b Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:24:57 -0800
+Subject: [PATCH 1/3] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+Make it work with musl where comparison_fn_t is not provided
+
+Reuse the approach from systemd:
+systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util.h b/src/util.h
+index 561f9e7..e9cfd81 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -57,7 +57,7 @@ extern char **saved_argv;
+  * Normal qsort requires base to be nonnull. Here were require
+  * that only if nmemb > 0.
+  */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
+         if (nmemb <= 1)
+                 return;
+ 
+-- 
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
new file mode 100644
index 0000000..196272f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
@@ -0,0 +1,423 @@
+From 6f9454184a02310802b1ed3e40287958b524a495 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:39:51 -0800
+Subject: [PATCH 2/3] musl does not provide printf.h
+
+Reuse the approach from systemd:
+systemd/0001-add-fallback-parse_printf_format-implementation.patch
+
+Original patch author: Emil Renner Berthing <systemd@esmil.dk>
+Includes work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am               |   4 +
+ configure.ac              |   3 +
+ src/log.c                 |   1 +
+ src/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/parse-printf-format.h |  57 ++++++++++
+ src/stdio-util.h          |   1 -
+ 6 files changed, 338 insertions(+), 1 deletion(-)
+ create mode 100644 src/parse-printf-format.c
+ create mode 100644 src/parse-printf-format.h
+
+diff --git a/Makefile.am b/Makefile.am
+index 9bbc8fa..b887d16 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -169,6 +169,10 @@ libutils_la_SOURCES = \
+ 	src/util.c \
+ 	src/util.h
+ 
++if !HAVE_PRINTF_H 
++libutils_la_SOURCES += src/parse-printf-format.c
++endif
++
+ libutils_la_CFLAGS = \
+ 	$(AM_CFLAGS) \
+ 	$(LIBSYSTEMD_CFLAGS)
+diff --git a/configure.ac b/configure.ac
+index 7f74bac..062e310 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,6 +73,9 @@ AS_IF([test "x$with_libsystemd" != xno],
+         )]
+ )
+ 
++AC_CHECK_HEADERS([printf.h], [], [])
++AM_CONDITIONAL(HAVE_PRINTF_H, [test "x$ac_cv_header_print_h" = xyes])
++
+ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+         -pipe \
+         -Wall \
+diff --git a/src/log.c b/src/log.c
+index 15dec83..aecf231 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -28,6 +28,7 @@
+ #include <sys/uio.h>
+ #include <unistd.h>
+ 
++#include "parse-printf-format.h"
+ #include "sd-messages.h"
+ 
+ #include "fd-util.h"
+diff --git a/src/parse-printf-format.c b/src/parse-printf-format.c
+new file mode 100644
+index 0000000..49437e5
+--- /dev/null
++++ b/src/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++  This file is part of systemd.
++
++  Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++  With parts from the musl C library
++  Copyright 2005-2014 Rich Felker, et al.
++
++  systemd is free software; you can redistribute it and/or modify it
++  under the terms of the GNU Lesser General Public License as published by
++  the Free Software Foundation; either version 2.1 of the License, or
++  (at your option) any later version.
++
++  systemd 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
++  Lesser General Public License for more details.
++
++  You should have received a copy of the GNU Lesser General Public License
++  along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++        do {
++                if (*fmt == '\0')
++                        return fmt;
++        } while (*fmt++ != '%');
++        return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++        for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++                /* do nothing */;
++        return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++        const char *p = fmt;
++        size_t val = 0;
++
++        if (*p < '1' || *p > '9')
++                return fmt;
++        do {
++                val = 10*val + (*p++ - '0');
++        } while (*p >= '0' && *p <= '9');
++
++        if (*p != '$')
++                return fmt;
++        *arg = val;
++        return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++        while (1) {
++                switch (*fmt) {
++                case '#':
++                case '0':
++                case '-':
++                case ' ':
++                case '+':
++                case '\'':
++                case 'I':
++                        fmt++;
++                        continue;
++                }
++                return fmt;
++        }
++}
++
++enum state {
++        BARE,
++        LPRE,
++        LLPRE,
++        HPRE,
++        HHPRE,
++        BIGLPRE,
++        ZTPRE,
++        JPRE,
++        STOP
++};
++
++enum type {
++        NONE,
++        PTR,
++        INT,
++        UINT,
++        ULLONG,
++        LONG,
++        ULONG,
++        SHORT,
++        USHORT,
++        CHAR,
++        UCHAR,
++        LLONG,
++        SIZET,
++        IMAX,
++        UMAX,
++        PDIFF,
++        UIPTR,
++        DBL,
++        LDBL,
++        MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++        [NONE]   = PA_INT,
++        [PTR]    = PA_POINTER,
++        [INT]    = PA_INT,
++        [UINT]   = PA_INT,
++        [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++        [LONG]   = PA_INT | PA_FLAG_LONG,
++        [ULONG]  = PA_INT | PA_FLAG_LONG,
++        [SHORT]  = PA_INT | PA_FLAG_SHORT,
++        [USHORT] = PA_INT | PA_FLAG_SHORT,
++        [CHAR]   = PA_CHAR,
++        [UCHAR]  = PA_CHAR,
++        [LLONG]  = PA_INT | PA_FLAG_LONG_LONG,
++        [SIZET]  = PA_INT | PA_FLAG_LONG,
++        [IMAX]   = PA_INT | PA_FLAG_LONG_LONG,
++        [UMAX]   = PA_INT | PA_FLAG_LONG_LONG,
++        [PDIFF]  = PA_INT | PA_FLAG_LONG_LONG,
++        [UIPTR]  = PA_INT | PA_FLAG_LONG,
++        [DBL]    = PA_DOUBLE,
++        [LDBL]   = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++        { /* 0: bare types */
++                S('d') = E(INT), S('i') = E(INT),
++                S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++                S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL),  S('a') = E(DBL),
++                S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL),  S('A') = E(DBL),
++                S('c') = E(CHAR),S('C') = E(INT),
++                S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++                S('m') = E(NONE),
++                S('l') = LPRE,   S('h') = HPRE, S('L') = BIGLPRE,
++                S('z') = ZTPRE,  S('j') = JPRE, S('t') = ZTPRE
++        }, { /* 1: l-prefixed */
++                S('d') = E(LONG), S('i') = E(LONG),
++                S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++                S('e') = E(DBL),  S('f') = E(DBL),  S('g') = E(DBL),  S('a') = E(DBL),
++                S('E') = E(DBL),  S('F') = E(DBL),  S('G') = E(DBL),  S('A') = E(DBL),
++                S('c') = E(INT),  S('s') = E(PTR),  S('n') = E(PTR),
++                S('l') = LLPRE
++        }, { /* 2: ll-prefixed */
++                S('d') = E(LLONG), S('i') = E(LLONG),
++                S('o') = E(ULLONG),S('u') = E(ULLONG),
++                S('x') = E(ULLONG),S('X') = E(ULLONG),
++                S('n') = E(PTR)
++        }, { /* 3: h-prefixed */
++                S('d') = E(SHORT), S('i') = E(SHORT),
++                S('o') = E(USHORT),S('u') = E(USHORT),
++                S('x') = E(USHORT),S('X') = E(USHORT),
++                S('n') = E(PTR),
++                S('h') = HHPRE
++        }, { /* 4: hh-prefixed */
++                S('d') = E(CHAR), S('i') = E(CHAR),
++                S('o') = E(UCHAR),S('u') = E(UCHAR),
++                S('x') = E(UCHAR),S('X') = E(UCHAR),
++                S('n') = E(PTR)
++        }, { /* 5: L-prefixed */
++                S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++                S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++                S('n') = E(PTR)
++        }, { /* 6: z- or t-prefixed (assumed to be same size) */
++                S('d') = E(PDIFF),S('i') = E(PDIFF),
++                S('o') = E(SIZET),S('u') = E(SIZET),
++                S('x') = E(SIZET),S('X') = E(SIZET),
++                S('n') = E(PTR)
++        }, { /* 7: j-prefixed */
++                S('d') = E(IMAX), S('i') = E(IMAX),
++                S('o') = E(UMAX), S('u') = E(UMAX),
++                S('x') = E(UMAX), S('X') = E(UMAX),
++                S('n') = E(PTR)
++        }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++        size_t i = 0;
++        size_t last = 0;
++
++        memset(types, 0, n);
++
++        while (1) {
++                size_t arg;
++                unsigned int state;
++
++                fmt = consume_nonarg(fmt);
++                if (*fmt == '\0')
++                        break;
++                if (*fmt == '%') {
++                        fmt++;
++                        continue;
++                }
++                arg = 0;
++                fmt = consume_argn(fmt, &arg);
++                /* flags */
++                fmt = consume_flags(fmt);
++                /* width */
++                if (*fmt == '*') {
++                        size_t warg = 0;
++                        fmt = consume_argn(fmt+1, &warg);
++                        if (warg == 0)
++                                warg = ++i;
++                        if (warg > last)
++                                last = warg;
++                        if (warg <= n && types[warg-1] == NONE)
++                                types[warg-1] = INT;
++                } else
++                        fmt = consume_num(fmt);
++                /* precision */
++                if (*fmt == '.') {
++                        fmt++;
++                        if (*fmt == '*') {
++                                size_t parg = 0;
++                                fmt = consume_argn(fmt+1, &parg);
++                                if (parg == 0)
++                                        parg = ++i;
++                                if (parg > last)
++                                        last = parg;
++                                if (parg <= n && types[parg-1] == NONE)
++                                        types[parg-1] = INT;
++                        } else {
++                                if (*fmt == '-')
++                                        fmt++;
++                                fmt = consume_num(fmt);
++                        }
++                }
++                /* length modifier and conversion specifier */
++                state = BARE;
++                do {
++                        unsigned char c = *fmt++;
++
++                        if (c < 'A' || c > 'z')
++                                continue;
++                        state = states[state]S(c);
++                        if (state == 0)
++                                continue;
++                } while (state < STOP);
++
++                if (state == E(NONE))
++                        continue;
++
++                if (arg == 0)
++                        arg = ++i;
++                if (arg > last)
++                        last = arg;
++                if (arg <= n)
++                        types[arg-1] = state - STOP;
++        }
++
++        if (last > n)
++                last = n;
++        for (i = 0; i < last; i++)
++                types[i] = pa_types[types[i]];
++
++        return last;
++}
+diff --git a/src/parse-printf-format.h b/src/parse-printf-format.h
+new file mode 100644
+index 0000000..4371177
+--- /dev/null
++++ b/src/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++  This file is part of systemd.
++
++  Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++  With parts from the GNU C Library
++  Copyright 1991-2014 Free Software Foundation, Inc.
++
++  systemd is free software; you can redistribute it and/or modify it
++  under the terms of the GNU Lesser General Public License as published by
++  the Free Software Foundation; either version 2.1 of the License, or
++  (at your option) any later version.
++
++  systemd 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
++  Lesser General Public License for more details.
++
++  You should have received a copy of the GNU Lesser General Public License
++  along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#ifdef HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum {				/* C type: */
++  PA_INT,			/* int */
++  PA_CHAR,			/* int, cast to char */
++  PA_WCHAR,			/* wide char */
++  PA_STRING,			/* const char *, a '\0'-terminated string */
++  PA_WSTRING,			/* const wchar_t *, wide character string */
++  PA_POINTER,			/* void * */
++  PA_FLOAT,			/* float */
++  PA_DOUBLE,			/* double */
++  PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'.  */
++#define	PA_FLAG_MASK		0xff00
++#define	PA_FLAG_LONG_LONG	(1 << 8)
++#define	PA_FLAG_LONG_DOUBLE	PA_FLAG_LONG_LONG
++#define	PA_FLAG_LONG		(1 << 9)
++#define	PA_FLAG_SHORT		(1 << 10)
++#define	PA_FLAG_PTR		(1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/stdio-util.h b/src/stdio-util.h
+index 0a67557..21cc515 100644
+--- a/src/stdio-util.h
++++ b/src/stdio-util.h
+@@ -19,7 +19,6 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+-- 
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
new file mode 100644
index 0000000..7670d95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
@@ -0,0 +1,33 @@
+From 79396449d264bde58b4daa3ef6dd99f0f0652429 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 22:10:58 -0800
+Subject: [PATCH 3/3] musl does not provide canonicalize_file_name
+
+Reuse the approach from systemd:
+systemd/0007-check-for-missing-canonicalize_file_name.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/path-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/path-util.c b/src/path-util.c
+index 2fb6366..12e2e17 100644
+--- a/src/path-util.c
++++ b/src/path-util.c
+@@ -63,7 +63,7 @@ char **path_strv_resolve(char **l, const char *prefix) {
+                         t = *s;
+ 
+                 errno = 0;
+-                u = canonicalize_file_name(t);
++                u = realpath(t, NULL);
+                 if (!u) {
+                         if (errno == ENOENT) {
+                                 if (prefix) {
+-- 
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb
deleted file mode 100644
index 4da000e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-LICENSE = "LGPLv2.1 & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
-                    file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
-           file://0001-parse-util-Don-t-use-xlocale.h.patch \
-"
-
-# Modify these as desired
-PV = "231+git${SRCPV}"
-SRCREV = "9ee2ffc1dc6c8209725e625954bbd89f96cb7139"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "systemd libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native intltool"
-
-inherit pkgconfig autotools systemd distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "systemd"
-
-SYSTEMD_SERVICE_${PN} = "systemd-bootchart.service"
-
-do_configure_prepend() {
-    # intltool.m4 is a soft link to /usr/share/aclocal/m4, delete it and use the one in our sysroot
-    rm -f ${S}/m4/intltool.m4
-}
-
-FILES_${PN} += "${systemd_unitdir}/systemd-bootchart"
-
-EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
-                 --with-rootlibdir=${base_libdir}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
new file mode 100644
index 0000000..1ae21b1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
@@ -0,0 +1,37 @@
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
+                    file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
+"
+
+SRC_URI_append_libc-musl = " \
+    file://0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+    file://0002-musl-does-not-provide-printf-h.patch \
+    file://0003-musl-does-not-provide-canonicalize_file_name.patch \
+    "
+
+
+# Modify these as desired
+PV = "233+git${SRCPV}"
+SRCREV = "fe1c5e41e6bdb78043dad8fa863fc2df66d1dadf"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "systemd libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native intltool"
+
+inherit pkgconfig autotools systemd distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SYSTEMD_SERVICE_${PN} = "systemd-bootchart.service"
+
+do_configure_prepend() {
+    # intltool.m4 is a soft link to /usr/share/aclocal/m4, delete it and use the one in our sysroot
+    rm -f ${S}/m4/intltool.m4
+}
+
+FILES_${PN} += "${systemd_unitdir}/systemd-bootchart"
+
+EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
+                 --with-rootlibdir=${base_libdir}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
index 5d70456..b66f41a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
@@ -1,14 +1,16 @@
 Upstream-Status: Inappropriate [poky-specific fix]
 
---- a/Makefile.inc
-+++ b/Makefile.inc
-@@ -57,6 +57,9 @@
-   ifeq ($(NO_UUID),)
-     LIBS += -luuid
+Index: agent/Makefile.inc
+===================================================================
+--- agent.orig/Makefile.inc
++++ agent/Makefile.inc
+@@ -88,6 +88,9 @@ ifneq ($(OPSYS),Windows)
+   ifneq ($(CC),g++)
+     OPTS += -Wmissing-prototypes
    endif
 +  ifneq ($(RANLIB),)
 +    RANLIB += $@
 +  endif
  endif
  
- ifneq ($(OPSYS),Windows)
+ # Compiler flags definition
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 9db26dc..ba14c42 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -16,7 +16,6 @@
            file://tcf-agent.init \
            file://tcf-agent.service \
           "
-UPSTREAM_VERSION_UNKNOWN = "1"
 
 DEPENDS = "util-linux openssl"
 RDEPENDS_${PN} = "bash"
@@ -31,7 +30,7 @@
 INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
 
 # mangling needed for make
-MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64,a64,`"
+MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64.*,a64,`"
 MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`"
 
 EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
index 96276ea..d1fc9b9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
@@ -11,7 +11,7 @@
 +	    # following line added by CW for Debian GNU/Linux
 +	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
 +
- 	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ 	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
  	    DL_OBJS="tclLoadDl.o"
  	    DL_LIBS="-ldl"
 Index: unix/tcl.m4
@@ -25,7 +25,7 @@
 +	    # following line added by CW for Debian GNU/Linux
 +	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
 +
- 	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ 	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
  	    DL_OBJS="tclLoadDl.o"
  	    DL_LIBS="-ldl"
 Index: unix/Makefile.in
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
deleted file mode 100644
index dac73be..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
+++ /dev/null
@@ -1,101 +0,0 @@
-SUMMARY = "Tool Command Language"
-HOMEPAGE = "http://tcl.sourceforge.net"
-SECTION = "devel/tcltk"
-
-# http://www.tcl.tk/software/tcltk/license.html
-LICENSE = "tcl & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-    file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-    file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-    file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-    file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-    file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-"
-
-DEPENDS = "tcl-native zlib"
-
-BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
-                file://tcl-add-soname.patch"
-SRC_URI = "${BASE_SRC_URI} \
-           file://fix_non_native_build_issue.patch \
-           file://fix_issue_with_old_distro_glibc.patch \
-           file://no_packages.patch \
-           file://tcl-remove-hardcoded-install-path.patch \
-           file://alter-includedir.patch \
-           file://run-ptest \
-"
-SRC_URI[md5sum] = "5673aaf45b5de5d8dd80bb3daaeb8838"
-SRC_URI[sha256sum] = "7c6b8f84e37332423cfe5bae503440d88450da8cc1243496249faa5268026ba5"
-
-SRC_URI_class-native = "${BASE_SRC_URI}"
-
-S = "${WORKDIR}/${BPN}${PV}/unix"
-
-VER = "${PV}"
-
-inherit autotools ptest binconfig
-
-EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
-
-do_compile_prepend() {
-	echo > ${S}/../compat/fixstrtod.c
-}
-
-do_install() {
-	autotools_do_install
-	oe_runmake 'DESTDIR=${D}' install-private-headers
-	ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
-	ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
-	sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
-	sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh
-	install -d ${D}${bindir_crossscripts}
-	install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
-	install -m 0755 tclConfig.sh ${D}${libdir}
-	for dir in compat generic unix; do
-		install -d ${D}${includedir}/${BPN}${VER}/$dir
-		install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
-	done
-}
-
-SYSROOT_DIRS += "${bindir_crossscripts}"
-
-PACKAGES =+ "tcl-lib"
-FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
-FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
-FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
-
-# isn't getting picked up by shlibs code
-RDEPENDS_${PN} += "tcl-lib"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}-ptest += "libgcc"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_compile_ptest() {
-	oe_runmake tcltest
-}
-
-do_install_ptest() {
-	cp ${B}/tcltest ${D}${PTEST_PATH}
-	cp -r ${S}/../library ${D}${PTEST_PATH}
-	cp -r ${S}/../tests ${D}${PTEST_PATH}
-}
-
-# Fix some paths that might be used by Tcl extensions
-BINCONFIG_GLOB = "*Config.sh"
-
-# Fix the path in sstate
-SSTATE_SCAN_FILES += "*Config.sh"
-
-# Cleanup host path from ${libdir}/tclConfig.sh and remove the
-# ${bindir_crossscripts}/tclConfig.sh from target
-PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
-tcl_package_preprocess() {
-	sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
-	       -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
-	       -e "s;${STAGING_INCDIR};${includedir};g" \
-	       -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
-	       ${PKGD}${libdir}/tclConfig.sh
-
-	rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb
new file mode 100644
index 0000000..4be2e89
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb
@@ -0,0 +1,101 @@
+SUMMARY = "Tool Command Language"
+HOMEPAGE = "http://tcl.sourceforge.net"
+SECTION = "devel/tcltk"
+
+# http://www.tcl.tk/software/tcltk/license.html
+LICENSE = "tcl & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+    file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+    file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+    file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+    file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+    file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+"
+
+DEPENDS = "tcl-native zlib"
+
+BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
+                file://tcl-add-soname.patch"
+SRC_URI = "${BASE_SRC_URI} \
+           file://fix_non_native_build_issue.patch \
+           file://fix_issue_with_old_distro_glibc.patch \
+           file://no_packages.patch \
+           file://tcl-remove-hardcoded-install-path.patch \
+           file://alter-includedir.patch \
+           file://run-ptest \
+"
+SRC_URI[md5sum] = "81656d3367af032e0ae6157eff134f89"
+SRC_URI[sha256sum] = "c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a"
+
+SRC_URI_class-native = "${BASE_SRC_URI}"
+
+S = "${WORKDIR}/${BPN}${PV}/unix"
+
+VER = "${PV}"
+
+inherit autotools ptest binconfig
+
+EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
+
+do_compile_prepend() {
+	echo > ${S}/../compat/fixstrtod.c
+}
+
+do_install() {
+	autotools_do_install
+	oe_runmake 'DESTDIR=${D}' install-private-headers
+	ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
+	ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
+	sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
+	sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh
+	install -d ${D}${bindir_crossscripts}
+	install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
+	install -m 0755 tclConfig.sh ${D}${libdir}
+	for dir in compat generic unix; do
+		install -d ${D}${includedir}/${BPN}${VER}/$dir
+		install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
+	done
+}
+
+SYSROOT_DIRS += "${bindir_crossscripts}"
+
+PACKAGES =+ "tcl-lib"
+FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
+FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
+FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
+
+# isn't getting picked up by shlibs code
+RDEPENDS_${PN} += "tcl-lib"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}-ptest += "libgcc"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+	oe_runmake tcltest
+}
+
+do_install_ptest() {
+	cp ${B}/tcltest ${D}${PTEST_PATH}
+	cp -r ${S}/../library ${D}${PTEST_PATH}
+	cp -r ${S}/../tests ${D}${PTEST_PATH}
+}
+
+# Fix some paths that might be used by Tcl extensions
+BINCONFIG_GLOB = "*Config.sh"
+
+# Fix the path in sstate
+SSTATE_SCAN_FILES += "*Config.sh"
+
+# Cleanup host path from ${libdir}/tclConfig.sh and remove the
+# ${bindir_crossscripts}/tclConfig.sh from target
+PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
+tcl_package_preprocess() {
+	sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
+	       -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
+	       -e "s;${STAGING_INCDIR};${includedir};g" \
+	       -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
+	       ${PKGD}${libdir}/tclConfig.sh
+
+	rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
index 1261c02..b22faad 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
@@ -34,6 +34,8 @@
         chmod +x ${B}/vapigen-wrapper
 }
 
+EXTRA_OECONF += " --disable-graphviz"
+
 # Vapigen wrapper needs to be available system-wide, because it will be used
 # to build vapi files from all other packages with vala support
 do_install_append_class-target() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
new file mode 100644
index 0000000..9b27b7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
@@ -0,0 +1,32 @@
+From b6ca3876e233c724fd460c1579abc4ab63c8d01e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Oct 2017 15:23:08 +0300
+Subject: [PATCH] Disable valadoc
+
+Valadoc is a documentation generator for Vala sources, which was
+recently merged into the main vala source tree. Unsurprisingly,
+it's broken in cross-compile environment in multiple ways,
+so let's fix it some other time.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e5dc0cc..813b3fc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,8 +13,6 @@ SUBDIRS = \
+ 	doc \
+ 	gobject-introspection \
+ 	vapigen \
+-	libvaladoc \
+-	valadoc \
+ 	$(NULL)
+ 
+ if ENABLE_UNVERSIONED
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
new file mode 100644
index 0000000..15d186d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
@@ -0,0 +1,223 @@
+From eb716dc856c20b3da146a4e83e9800bd1f53c739 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz@ubuntu.com>
+Date: Wed, 6 Sep 2017 18:52:55 +0200
+Subject: [PATCH] libvaladoc: Allow disabling the graphviz dependency of
+ valadoc
+
+https://bugzilla.gnome.org/show_bug.cgi?id=787375
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Upstream-Status: Submitted [bugzilla link above]
+---
+ configure.ac                          | 60 +++++++++++++++++++----------------
+ libvaladoc/Makefile.am                | 25 +++++++++++----
+ libvaladoc/html/basicdoclet.vala      |  8 +++++
+ libvaladoc/html/htmlmarkupwriter.vala |  4 +++
+ 4 files changed, 63 insertions(+), 34 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c73d5d6b1..291e503d5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,34 +98,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
+ AC_SUBST(GMODULE_CFLAGS)
+ AC_SUBST(GMODULE_LIBS)
+ 
+-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+-AC_MSG_CHECKING([for CGRAPH])
+-cgraph_tmp_LIBADD="$LIBADD"
+-cgraph_tmp_CFLAGS="$CFLAGS"
+-LIBADD="$LIBADD $LIBGVC_LIBS"
+-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
+-AC_RUN_IFELSE(
+-	[AC_LANG_SOURCE([
+-		#include <gvc.h>
+-
+-		int main(void) {
+-			#ifdef WITH_CGRAPH
+-				return 0;
+-			#else
+-				return -1;
+-			#endif
+-		}
+-	])], [
+-		AC_MSG_RESULT([yes])
+-		VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
+-		have_cgraph=yes
+-	], [
+-		AC_MSG_RESULT([no])
+-		have_cgraph=no
+-	]
+-)
+-LIBADD="$cgraph_tmp_LIBADD"
+-CFLAGS="$cgraph_tmp_CFLAGS"
++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
++if test x$enable_graphviz = xyes; then
++	PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
++	AC_MSG_CHECKING([for CGRAPH])
++	VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
++	cgraph_tmp_LIBADD="$LIBADD"
++	cgraph_tmp_CFLAGS="$CFLAGS"
++	LIBADD="$LIBADD $LIBGVC_LIBS"
++	CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
++	AC_RUN_IFELSE(
++		[AC_LANG_SOURCE([
++			#include <gvc.h>
++			int main(void) {
++				#ifdef WITH_CGRAPH
++					return 0;
++				#else
++					return -1;
++				#endif
++			}
++		])], [
++			AC_MSG_RESULT([yes])
++			VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
++			have_cgraph=yes
++		], [
++			AC_MSG_RESULT([no])
++			have_cgraph=no
++		]
++	)
++	LIBADD="$cgraph_tmp_LIBADD"
++	CFLAGS="$cgraph_tmp_CFLAGS"
++fi
++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+ 
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
+index 89245d86b..7c07498b9 100644
+--- a/libvaladoc/Makefile.am
++++ b/libvaladoc/Makefile.am
+@@ -127,10 +127,6 @@ libvaladoc_la_VALASOURCES = \
+ 	content/tablerow.vala \
+ 	content/taglet.vala \
+ 	content/text.vala \
+-	charts/chart.vala \
+-	charts/chartfactory.vala \
+-	charts/hierarchychart.vala \
+-	charts/simplechartfactory.vala \
+ 	parser/manyrule.vala \
+ 	parser/oneofrule.vala \
+ 	parser/optionalrule.vala \
+@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
+ 	highlighter/codetoken.vala \
+ 	highlighter/highlighter.vala \
+ 	html/basicdoclet.vala \
+-	html/htmlchartfactory.vala \
+ 	html/linkhelper.vala \
+ 	html/cssclassresolver.vala \
+ 	html/htmlmarkupwriter.vala \
+ 	html/htmlrenderer.vala \
+ 	$(NULL)
+ 
++if ENABLE_GRAPHVIZ
++libvaladoc_la_VALASOURCES += \
++	charts/chart.vala \
++	charts/chartfactory.vala \
++	charts/hierarchychart.vala \
++	charts/simplechartfactory.vala \
++	html/htmlchartfactory.vala \
++	$(NULL)
++
++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
++endif
++
+ libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
+ 	libvaladoc.vala.stamp \
+ 	$(libvaladoc_la_VALASOURCES:.vala=.c) \
+@@ -182,8 +189,8 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ 		--library valadoc \
+ 		--vapi valadoc@PACKAGE_SUFFIX@.vapi \
+ 		--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
+-		--vapidir $(top_srcdir)/vapi --pkg libgvc \
+ 		--vapidir $(top_srcdir)/gee --pkg gee \
++		$(LIBGVC_PKG) \
+ 		--pkg config \
+ 		$(filter %.vala %.c,$^)
+ 	touch $@
+@@ -209,6 +216,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
+ 
+ valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc //g" $@
++endif
+ 
+ vapidir = $(datadir)/vala/vapi
+ dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
+@@ -216,6 +226,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
+ 
+ valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc//g" $@
++endif
+ 
+ EXTRA_DIST = \
+ 	$(libvaladoc_la_VALASOURCES) \
+diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
+index cc9ea4ed7..432c3818f 100644
+--- a/libvaladoc/html/basicdoclet.vala
++++ b/libvaladoc/html/basicdoclet.vala
+@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	protected HtmlRenderer _renderer;
+ 	protected Html.MarkupWriter writer;
+ 	protected Html.CssClassResolver cssresolver;
++#if HAVE_GRAPHVIZ
+ 	protected Charts.Factory image_factory;
++#else
++	protected void* image_factory;
++#endif
+ 	protected ErrorReporter reporter;
+ 	protected string package_list_link = "../index.html";
+ 
+@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 		this.linker = new LinkHelper ();
+ 
+ 		_renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
++#if HAVE_GRAPHVIZ
+ 		this.image_factory = new SimpleChartFactory (settings, linker);
++#endif
+ 	}
+ 
+ 
+@@ -1025,6 +1031,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	}
+ 
+ 	protected void write_image_block (Api.Node element) {
++#if HAVE_GRAPHVIZ
+ 		if (element is Class || element is Interface || element is Struct) {
+ 			unowned string format = (settings.use_svg_images ? "svg" : "png");
+ 			var chart = new Charts.Hierarchy (image_factory, element);
+@@ -1044,6 +1051,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 									   this.get_img_path_html (element, format)});
+ 			writer.add_usemap (chart);
+ 		}
++#endif
+ 	}
+ 
+ 	public void write_namespace_content (Namespace node, Api.Node? parent) {
+diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
+index 15ed9efd1..fe0d705d4 100644
+--- a/libvaladoc/html/htmlmarkupwriter.vala
++++ b/libvaladoc/html/htmlmarkupwriter.vala
+@@ -43,12 +43,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
+ 		}, xml_declaration);
+ 	}
+ 
++#if HAVE_GRAPHVIZ
+ 	public MarkupWriter add_usemap (Charts.Chart chart) {
+ 		string? buf = (string?) chart.write_buffer ("cmapx");
+ 		if (buf != null) {
+ 			raw_text ("\n");
+ 			raw_text ((!) buf);
+ 		}
++#else
++	public MarkupWriter add_usemap (void* chart) {
++#endif
+ 
+ 		return this;
+ 	}
+-- 
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
deleted file mode 100644
index 51000d9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
-             file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
-"
-
-SRC_URI[md5sum] = "3c19014093f1a3d995357253b463082c"
-SRC_URI[sha256sum] = "e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb
new file mode 100644
index 0000000..e2baf65
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb
@@ -0,0 +1,10 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
+             file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
+	     file://disable-graphviz.patch \
+	     file://0001-Disable-valadoc.patch \
+"
+
+SRC_URI[md5sum] = "37edd0467d056fd9e3937d0bbceda80b"
+SRC_URI[sha256sum] = "2fa746b51cd66e43577d1da06a80b708c2875cadaafee77e9700ea35cf23882c"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
deleted file mode 100644
index e9112da..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:01:34 +0200
-Subject: [PATCH 2/5] remove rpath
-
-Upstream-Status: Inappropriate [embedded config]
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- none/tests/Makefile.am | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
-index 54f2a7e..25b0f49 100644
---- a/none/tests/Makefile.am
-+++ b/none/tests/Makefile.am
-@@ -326,7 +326,6 @@ threadederrno_CFLAGS	+= --std=c99
- endif
- tls_SOURCES		= tls.c tls2.c
- tls_DEPENDENCIES	= tls.so tls2.so
--tls_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests
- tls_LDADD		= tls.so tls2.so -lpthread
- tls_so_SOURCES		= tls_so.c
- tls_so_DEPENDENCIES	= tls2.so
-@@ -334,7 +333,7 @@ if VGCONF_OS_IS_DARWIN
-  tls_so_LDFLAGS		= -dynamic -dynamiclib -all_load -fpic
-  tls_so_LDADD		= `pwd`/tls2.so
- else
-- tls_so_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
-+ tls_so_LDFLAGS		= -shared -fPIC
-  tls_so_LDADD		= tls2.so
- endif
- tls_so_CFLAGS		= $(AM_CFLAGS) -fPIC
--- 
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch
new file mode 100644
index 0000000..89a95b8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch
@@ -0,0 +1,36 @@
+Fix runtime Valgrind failure
+
+This patch is derived from
+https://bugzilla.redhat.com/show_bug.cgi?id=1464211
+
+At runtime it will fails like this:
+
+ARM64 front end: branch_etc
+disInstr(arm64): unhandled instruction 0xD5380001
+disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0001 ==2082==
+valgrind: Unrecognised instruction at address 0x4014e64.
+
+This patch is a workaround by masking all HWCAP
+
+Upstream-Status: Pending
+
+Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
+
+Index: valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c
+===================================================================
+
+--- valgrind-3.13.0.orig/coregrind/m_initimg/initimg-linux.c   2018-03-04 22:22:17.698572675 -0800
++++ valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c        2018-03-04 22:23:25.727815624 -0800
+@@ -703,6 +703,12 @@
+                   (and anything above) are not supported by Valgrind. */
+                auxv->u.a_val &= VKI_HWCAP_S390_TE - 1;
+             }
++#           elif defined(VGP_arm64_linux)
++            {
++               /* Linux 4.11 started populating this for arm64, but we
++                  currently don't support any. */
++               auxv->u.a_val = 0;
++            }
+ #           endif
+             break;
+ #        if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
index bf3cfd7..d3af35e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
@@ -16,7 +16,6 @@
            file://fixed-perl-path.patch \
            file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
            file://run-ptest \
-           file://0002-remove-rpath.patch \
            file://0004-Fix-out-of-tree-builds.patch \
            file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
            file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
@@ -37,6 +36,7 @@
            file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
            file://link-gz-tests.patch \
            file://ppc-headers.patch \
+           file://mask-CPUID-support-in-HWCAP-on-aarch64.patch \
            "
 SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369"
 SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b"
@@ -86,6 +86,8 @@
 
 do_configure_prepend () {
     rm -rf ${S}/config.h
+    sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am
+    sed -i -e 's:$(top_builddir):$(pkglibdir)/ptest:g' ${S}/memcheck/tests/Makefile.am
 }
 
 do_install_append () {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
deleted file mode 100644
index 021c058..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-# zisofs-tools-native OE build file
-# Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-SUMMARY = "Utilities for creating compressed CD-ROM filesystems"
-HOMEPAGE = "http://freecode.com/projects/zisofs-tools"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "zlib-native"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/zisofs-tools/zisofs-tools-${PV}.tar.bz2/2d0ed8c9a1f60b45f949b136f9be1f6c/zisofs-tools-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "2d0ed8c9a1f60b45f949b136f9be1f6c"
-SRC_URI[sha256sum] = "ae4e53e4914934d41660248fb59d3c8761f1f1fd180d5ec993c17ddb3afd04f3"
-
-inherit native
-
-do_install() {
-	oe_runmake install INSTALLROOT=${D} bindir=${bindir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb b/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb
index 868505b..51ae77b 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/acpica/acpica_20170303.bb
@@ -17,7 +17,6 @@
 DEPENDS = "bison flex"
 
 SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
-    file://no-werror.patch \
     file://rename-yy_scan_string-manually.patch \
     file://manipulate-fds-instead-of-FILE.patch;striplevel=2 \
     file://0001-Linux-add-support-for-X32-ABI-compilation.patch \
@@ -49,7 +48,6 @@
 PROVIDES = "iasl"
 RPROVIDES_${PN} += "iasl"
 RREPLACES_${PN} += "iasl"
-RCONFLIGHTS_${PN} += "iasl"
+RCONFLICTS_${PN} += "iasl"
 
-NATIVE_INSTALL_WORKS = "1"
 BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/acpica/files/no-werror.patch b/import-layers/yocto-poky/meta/recipes-extended/acpica/files/no-werror.patch
deleted file mode 100644
index a6e7b54..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/acpica/files/no-werror.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: remove -Werror flag
-Forwarded: not-needed
-Author: Fathi Boudra <fathi.boudra@linaro.org>
-Upstream-Status: Pending
----
- generate/unix/iasl/Makefile |   12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
---- a/generate/unix/iasl/Makefile
-+++ b/generate/unix/iasl/Makefile
-@@ -266,19 +266,19 @@ $(OBJDIR)/prparser.y.h: $(OBJDIR)/prpars
- # by the utilities above and they are not necessarily ANSI C, etc.
- #
- $(OBJDIR)/aslcompilerlex.o :   $(OBJDIR)/aslcompilerlex.c
--	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+	$(CC) -c $(CFLAGS) -Wall -o$@ $<
- 
- $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
--	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+	$(CC) -c $(CFLAGS) -Wall -o$@ $<
- 
- $(OBJDIR)/dtparserlex.o :      $(OBJDIR)/dtparserlex.c
--	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+	$(CC) -c $(CFLAGS) -Wall -o$@ $<
- 
- $(OBJDIR)/dtparserparse.o :    $(OBJDIR)/dtparserparse.c
--	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+	$(CC) -c $(CFLAGS) -Wall -o$@ $<
- 
- $(OBJDIR)/prparserlex.o :      $(OBJDIR)/prparserlex.c
--	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
-+	$(CC) -c $(CFLAGS) -Wall -o$@ $<
diff --git a/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch b/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch
index 932a4c0..d6056dc 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/at/at/makefile-fix-parallel.patch
@@ -15,13 +15,13 @@
  Makefile |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/Makefile.in b/Makefile.in
-index 2a9b918..aa7c04a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -75,7 +75,9 @@ at: $(ATOBJECTS)
+Index: at-3.1.20/Makefile.in
+===================================================================
+--- at-3.1.20.orig/Makefile.in
++++ at-3.1.20/Makefile.in
+@@ -76,7 +76,9 @@ at: $(ATOBJECTS)
  atd: $(RUNOBJECTS)
- 	$(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
+ 	$(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB)
  
 -y.tab.c y.tab.h: parsetime.y
 +y.tab.h: y.tab.c
@@ -30,6 +30,3 @@
  	$(YACC) -d parsetime.y
  
  lex.yy.c: parsetime.l
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb b/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
index 9b537ee..8fe3b43 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
@@ -5,7 +5,7 @@
 SECTION = "base"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
-DEPENDS = "flex flex-native \
+DEPENDS = "flex flex-native bison-native \
            ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
index f4e1f7a..9c2b065 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
@@ -6,7 +6,7 @@
 
 inherit autotools gettext texinfo update-alternatives ptest
 
-EXTRA_AUTORECONF += "--exclude=autoheader"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=aclocal"
 EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
 
 # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
@@ -25,7 +25,7 @@
 RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-ptest += "make"
 
-DEPENDS_append_libc-glibc = " glibc-locale"
+DEPENDS_append_libc-glibc = " virtual/libc-locale"
 RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-fr-fr locale-base-de-de"
 
 USERADD_PACKAGES = "${PN}-ptest"
@@ -33,12 +33,6 @@
 
 CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
 
-do_configure_prepend () {
-	if [ ! -e ${S}/acinclude.m4 ]; then
-		cat ${S}/aclocal.m4 > ${S}/acinclude.m4
-	fi
-}
-
 do_compile_ptest () {
 	oe_runmake buildtest
 }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch
index 81f8f0a..9970b4d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch
@@ -1,8 +1,10 @@
 Upstream-Status: Inappropriate [embedded specific]
 
---- execute_cmd.c.orig	Fri Jun  3 13:34:42 2011
-+++ execute_cmd.c	Fri Jun  3 13:36:41 2011
-@@ -2202,7 +2202,11 @@
+Index: execute_cmd.c
+===================================================================
+--- execute_cmd.c.orig
++++ execute_cmd.c
+@@ -2459,7 +2459,11 @@ execute_pipeline (command, asynchronous,
    /* If the `lastpipe' option is set with shopt, and job control is not
       enabled, execute the last element of non-async pipelines in the
       current shell environment. */
@@ -13,5 +15,5 @@
 +#endif
 +		asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
      {
-       lstdin = move_to_high_fd (0, 0, 255);
+       lstdin = move_to_high_fd (0, 1, -1);
        if (lstdin > 0)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/pathexp-dep.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/pathexp-dep.patch
new file mode 100644
index 0000000..e05bbda
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/pathexp-dep.patch
@@ -0,0 +1,13 @@
+pathexp includes libintl.h but doesn't depend on it, thus a build race can occur.
+
+Upstream-Status: Submitted (https://savannah.gnu.org/patch/index.php?9503)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.in b/Makefile.in
+index c7b62bc0..241cbf12 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1281,2 +1281,3 @@ nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+ y.tab.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
++pathexp.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+ pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.12.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.12.bb
new file mode 100644
index 0000000..9382a77
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.12.bb
@@ -0,0 +1,24 @@
+require bash.inc
+
+# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
+           file://execute_cmd.patch;striplevel=0 \
+           file://mkbuiltins_have_stringize.patch \
+           file://build-tests.patch \
+           file://test-output.patch \
+           file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
+           file://run-ptest \
+           file://fix-run-builtins.patch \
+           file://0001-help-fix-printf-format-security-warning.patch \
+           file://bash-memleak-bug-fix-for-builtin-command-read.patch \
+           file://pathexp-dep.patch \
+           "
+
+SRC_URI[tarball.md5sum] = "7c112970cbdcadfc331e10eeb5f6aa41"
+SRC_URI[tarball.sha256sum] = "57d8432be54541531a496fd4904fdc08c12542f43605a9202594fa5d5f9f2331"
+
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.bb
deleted file mode 100644
index e544d07..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.4.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-require bash.inc
-
-# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-001;apply=yes;striplevel=0;name=patch001 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-002;apply=yes;striplevel=0;name=patch002 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-003;apply=yes;striplevel=0;name=patch003 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-004;apply=yes;striplevel=0;name=patch004 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-005;apply=yes;striplevel=0;name=patch005 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-006;apply=yes;striplevel=0;name=patch006 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-007;apply=yes;striplevel=0;name=patch007 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-008;apply=yes;striplevel=0;name=patch008 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-009;apply=yes;striplevel=0;name=patch009 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-010;apply=yes;striplevel=0;name=patch010 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-011;apply=yes;striplevel=0;name=patch011 \
-           ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-012;apply=yes;striplevel=0;name=patch012 \
-           file://execute_cmd.patch;striplevel=0 \
-           file://mkbuiltins_have_stringize.patch \
-           file://build-tests.patch \
-           file://test-output.patch \
-           file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
-           file://run-ptest \
-           file://fix-run-builtins.patch \
-           file://0001-help-fix-printf-format-security-warning.patch \
-           file://bash-memleak-bug-fix-for-builtin-command-read.patch \
-           "
-
-SRC_URI[tarball.md5sum] = "148888a7c95ac23705559b6f477dfe25"
-SRC_URI[tarball.sha256sum] = "d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb"
-
-SRC_URI[patch001.md5sum] = "817d01a6c0af6f79308a8b7b649e53d8"
-SRC_URI[patch001.sha256sum] = "3e28d91531752df9a8cb167ad07cc542abaf944de9353fe8c6a535c9f1f17f0f"
-SRC_URI[patch002.md5sum] = "765e14cff12c7284009772e8e24f2fe0"
-SRC_URI[patch002.sha256sum] = "7020a0183e17a7233e665b979c78c184ea369cfaf3e8b4b11f5547ecb7c13c53"
-SRC_URI[patch003.md5sum] = "49e7da93bf07f510a2eb6bb43ac3e5a2"
-SRC_URI[patch003.sha256sum] = "51df5a9192fdefe0ddca4bdf290932f74be03ffd0503a3d112e4199905e718b2"
-SRC_URI[patch004.md5sum] = "4557d674ab5831a5fa98052ab19edaf4"
-SRC_URI[patch004.sha256sum] = "ad080a30a4ac6c1273373617f29628cc320a35c8cd06913894794293dc52c8b3"
-SRC_URI[patch005.md5sum] = "cce96dd77cdd1d293beec10848f6cbb5"
-SRC_URI[patch005.sha256sum] = "221e4b725b770ad0bb6924df3f8d04f89eeca4558f6e4c777dfa93e967090529"
-SRC_URI[patch006.md5sum] = "d3379f8d8abce5c6ee338f931ad008d5"
-SRC_URI[patch006.sha256sum] = "6a8e2e2a6180d0f1ce39dcd651622fb6d2fd05db7c459f64ae42d667f1e344b8"
-SRC_URI[patch007.md5sum] = "ec38c76ca439ca7f9c178e9baede84fc"
-SRC_URI[patch007.sha256sum] = "de1ccc07b7bfc9e25243ad854f3bbb5d3ebf9155b0477df16aaf00a7b0d5edaf"
-SRC_URI[patch008.md5sum] = "e0ba18c1e3b94f905da9b5bf9d38b58b"
-SRC_URI[patch008.sha256sum] = "86144700465933636d7b945e89b77df95d3620034725be161ca0ca5a42e239ba"
-SRC_URI[patch009.md5sum] = "e952d4f44e612048930c559d90eb99bb"
-SRC_URI[patch009.sha256sum] = "0b6bdd1a18a0d20e330cc3bc71e048864e4a13652e29dc0ebf3918bea729343c"
-SRC_URI[patch010.md5sum] = "57b5b35955d68f9a09dbef6b86d2c782"
-SRC_URI[patch010.sha256sum] = "8465c6f2c56afe559402265b39d9e94368954930f9aa7f3dfa6d36dd66868e06"
-SRC_URI[patch011.md5sum] = "cc896e1fa696b93ded568e557e2392d5"
-SRC_URI[patch011.sha256sum] = "dd56426ef7d7295e1107c0b3d06c192eb9298f4023c202ca2ba6266c613d170d"
-SRC_URI[patch012.md5sum] = "fa47fbfa56fb7e9e5367f19a9df5fc9e"
-SRC_URI[patch012.sha256sum] = "fac271d2bf6372c9903e3b353cb9eda044d7fe36b5aab52f21f3f21cd6a2063e"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
index 5379eb6..db013cf 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -10,12 +10,12 @@
  ppdc/Makefile |   30 +++++++++++++++---------------
  1 files changed, 15 insertions(+), 15 deletions(-)
 
-Index: cups-2.0.0/ppdc/Makefile
+Index: cups-2.2.6/ppdc/Makefile
 ===================================================================
---- cups-2.0.0.orig/ppdc/Makefile
-+++ cups-2.0.0/ppdc/Makefile
-@@ -242,8 +242,8 @@ genstrings:		genstrings.o libcupsppdc.a
- 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
+--- cups-2.2.6.orig/ppdc/Makefile
++++ cups-2.2.6/ppdc/Makefile
+@@ -228,8 +228,8 @@ genstrings:		genstrings.o libcupsppdc.a
+ 	$(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
  		libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
  		$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
 -	echo Generating localization strings...
@@ -25,8 +25,8 @@
  
  
  #
-@@ -260,9 +260,9 @@ ppdc-static:		ppdc.o libcupsppdc.a ../cu
- 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+@@ -246,9 +246,9 @@ ppdc-static:		ppdc.o libcupsppdc.a ../cu
+ 	$(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
  		../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
  		$(COMMONLIBS) $(LIBZ)
 -	echo Testing PPD compiler...
@@ -38,8 +38,8 @@
  
  
  #
-@@ -288,17 +288,17 @@ ppdi-static:		ppdc-static ppdi.o libcups
- 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
+@@ -274,17 +274,17 @@ ppdi-static:		ppdc-static ppdi.o libcups
+ 	$(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
  		../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
  		$(COMMONLIBS) $(LIBZ)
 -	echo Testing PPD importer...
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.4.bb b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.4.bb
deleted file mode 100644
index ed94b67..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.4.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
-
-SRC_URI[md5sum] = "d26e5a0a574a69fe1d01079b2931fc49"
-SRC_URI[sha256sum] = "596d4db72651c335469ae5f37b0da72ac9f97d73e30838d787065f559dea98cc"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.6.bb b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.6.bb
new file mode 100644
index 0000000..3aa934b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.2.6.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
+
+SRC_URI[md5sum] = "e91c26d8d97b5a1630a962f530f02192"
+SRC_URI[sha256sum] = "40385778c2b3bdf55030d1c999734e22774c79e3425d91339ce677825620169b"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc
index 7c5be50..c9e3130 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils.inc
@@ -10,3 +10,4 @@
 ALTERNATIVE_${PN} = "diff cmp"
 ALTERNATIVE_PRIORITY = "100"
 
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
index bf66267..de38104 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
@@ -5,11 +5,12 @@
 Upstream-Status: Inappropriate
 (default automake behavior incompatible with ptest)
 
-diff -ruN a/configure.ac b/configure.ac
---- a/configure.ac	2014-05-28 18:19:13.513980977 +0200
-+++ b/configure.ac	2014-05-28 18:19:21.129660215 +0200
-@@ -2,7 +2,7 @@
- AC_INIT(ethtool, 3.14, netdev@vger.kernel.org)
+Index: ethtool-4.13/configure.ac
+===================================================================
+--- ethtool-4.13.orig/configure.ac
++++ ethtool-4.13/configure.ac
+@@ -2,7 +2,7 @@ dnl Process this file with autoconf to p
+ AC_INIT(ethtool, 4.13, netdev@vger.kernel.org)
  AC_PREREQ(2.52)
  AC_CONFIG_SRCDIR([ethtool.c])
 -AM_INIT_AUTOMAKE([gnu])
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.11.bb b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.11.bb
deleted file mode 100644
index befe9b9..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.11.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Display or change ethernet card settings"
-DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
-HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
-           file://run-ptest \
-           file://avoid_parallel_tests.patch \
-           "
-
-SRC_URI[md5sum] = "8f1072679888c9335e49b17efb798b4c"
-SRC_URI[sha256sum] = "af2fd9692f3159d3ab1e41e6f9b7d8db2a4693f1cb22348c88ba89f70f0e6503"
-
-inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
-
-do_compile_ptest() {
-   oe_runmake buildtest-TESTS
-}
-
-do_install_ptest () {
-   cp ${B}/Makefile                 ${D}${PTEST_PATH}
-   install ${B}/test-cmdline        ${D}${PTEST_PATH}
-   install ${B}/test-features       ${D}${PTEST_PATH}
-   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
-   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.13.bb b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.13.bb
new file mode 100644
index 0000000..c862a57
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.13.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Display or change ethernet card settings"
+DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
+HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
+           file://run-ptest \
+           file://avoid_parallel_tests.patch \
+           "
+
+SRC_URI[md5sum] = "2ba44eb0ca96752392e9bf8dc83ba302"
+SRC_URI[sha256sum] = "d311c4b557c44c5248ac5436b9e19c391a60d8e4830b6a7f41be16d89c0556de"
+
+inherit autotools ptest
+RDEPENDS_${PN}-ptest += "make"
+
+do_compile_ptest() {
+   oe_runmake buildtest-TESTS
+}
+
+do_install_ptest () {
+   cp ${B}/Makefile                 ${D}${PTEST_PATH}
+   install ${B}/test-cmdline        ${D}${PTEST_PATH}
+   install ${B}/test-features       ${D}${PTEST_PATH}
+   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
+   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/test-arrayind1-Remove-hashbang-line.patch b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/test-arrayind1-Remove-hashbang-line.patch
deleted file mode 100644
index d4262ed..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/test-arrayind1-Remove-hashbang-line.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a3a3f26078223c47871c7b53e5c015ad163ae045 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Thu, 3 Nov 2016 14:50:52 -0200
-Subject: [PATCH] test/arrayind1: Remove hashbang line
-Organization: O.S. Systems Software LTDA.
-
-Remove "#!/usr/local/bin/awk -f" as none of the other awk scripts in the
-test suite have a hashbang.
-
-Upstream-Status: Submitted [1]
-
-[1] https://lists.gnu.org/archive/html/bug-gawk/2016-11/msg00003.html
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- test/arrayind1.awk | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/test/arrayind1.awk b/test/arrayind1.awk
-index 5d4a6f3..59e8b4e 100755
---- a/test/arrayind1.awk
-+++ b/test/arrayind1.awk
-@@ -1,4 +1,3 @@
--#!/usr/local/bin/awk -f
- # this script renums pedigrees with metafounders
- # so that they are added *before*regular animals
- # mf are ascertained because they are not in the 1st column
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/run-ptest b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk/run-ptest
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-4.1.4/run-ptest
rename to import-layers/yocto-poky/meta/recipes-extended/gawk/gawk/run-ptest
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.4.bb b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.4.bb
deleted file mode 100644
index 995d37d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.4.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "GNU awk text processing utility"
-DESCRIPTION = "The GNU version of awk, a text processing utility. \
-Awk interprets a special-purpose programming language to do \
-quick and easy text pattern matching and reformatting jobs."
-HOMEPAGE = "https://www.gnu.org/software/gawk/"
-BUGTRACKER  = "bug-gawk@gnu.org"
-SECTION = "console/utils"
-
-# gawk <= 3.1.5: GPLv2
-# gawk >= 3.1.6: GPLv3
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS += "readline"
-
-PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
-
-SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
-           file://run-ptest \
-           file://test-arrayind1-Remove-hashbang-line.patch \
-"
-
-SRC_URI[md5sum] = "f20c94ca51b6ebfc9bffb90f95c8ffbb"
-SRC_URI[sha256sum] = "8c03080e2b5a56263e8783f6f1f306398d4591be18254041f3f547efef944d35"
-
-inherit autotools gettext texinfo update-alternatives
-
-FILES_${PN} += "${datadir}/awk"
-FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
-
-ALTERNATIVE_${PN} = "awk"
-ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
-ALTERNATIVE_PRIORITY = "100"
-
-do_install_append() {
-	# remove the link since we don't package it
-	rm ${D}${bindir}/awk
-}
-
-inherit ptest
-
-do_install_ptest() {
-	mkdir ${D}${PTEST_PATH}/test
-	for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \
-	  do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
-	done
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.2.0.bb b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.2.0.bb
new file mode 100644
index 0000000..27f79a2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_4.2.0.bb
@@ -0,0 +1,48 @@
+SUMMARY = "GNU awk text processing utility"
+DESCRIPTION = "The GNU version of awk, a text processing utility. \
+Awk interprets a special-purpose programming language to do \
+quick and easy text pattern matching and reformatting jobs."
+HOMEPAGE = "https://www.gnu.org/software/gawk/"
+BUGTRACKER  = "bug-gawk@gnu.org"
+SECTION = "console/utils"
+
+# gawk <= 3.1.5: GPLv2
+# gawk >= 3.1.6: GPLv3
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS += "readline"
+
+PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+
+SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
+           file://run-ptest \
+"
+
+SRC_URI[md5sum] = "0b598c31bc703d66082bd958d4189980"
+SRC_URI[sha256sum] = "c88046c6e8396ee548bcb941e16def809b7b55b60a1044b5dd254094f347c7d9"
+
+inherit autotools gettext texinfo update-alternatives
+
+FILES_${PN} += "${datadir}/awk"
+FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
+
+ALTERNATIVE_${PN} = "awk"
+ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install_append() {
+	# remove the link since we don't package it
+	rm ${D}${bindir}/awk
+}
+
+inherit ptest
+
+do_install_ptest() {
+	mkdir ${D}${PTEST_PATH}/test
+	for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \
+	  do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
+	done
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch
deleted file mode 100644
index b7eed12..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 8abd22010eb4db0fb1b10e430d5f5d83e015ef70 Mon Sep 17 00:00:00 2001
-From: Chris Liddell <chris.liddell@artifex.com>
-Date: Mon, 3 Oct 2016 01:46:28 +0100
-Subject: [PATCH] Bug 697169: Be rigorous with SAFER permissions
-
-Once we've opened our input file from the command line, enforce the SAFER
-rules.
-
-Upstream-Status: Backport
-CVE: CVE-2016-7977
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- psi/zfile.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/psi/zfile.c b/psi/zfile.c
-index b6caea2..2c6c958 100644
---- a/psi/zfile.c
-+++ b/psi/zfile.c
-@@ -1081,6 +1081,9 @@ lib_file_open(gs_file_path_ptr  lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx
-     gs_main_instance *minst = get_minst_from_memory(mem);
-     int code;
- 
-+    if (i_ctx_p && starting_arg_file)
-+        i_ctx_p->starting_arg_file = false;
-+
-     /* when starting arg files (@ files) iodev_default is not yet set */
-     if (iodev == 0)
-         iodev = (gx_io_device *)gx_io_device_table[0];
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
index e28a949..b4c14ea 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
@@ -12,11 +12,12 @@
 # Summary: Generate arch.h for ppc32
 #
 
-diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
---- ghostscript-8.64.orig/base/lib.mak	2010-02-10 10:30:02.000000000 +0800
-+++ ghostscript-8.64/base/lib.mak	2010-02-10 10:56:21.000000000 +0800
-@@ -67,8 +67,8 @@
- stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+Index: ghostscript-9.21/base/lib.mak
+===================================================================
+--- ghostscript-9.21.orig/base/lib.mak
++++ ghostscript-9.21/base/lib.mak
+@@ -73,8 +73,8 @@ arch_h=$(GLGEN)arch.h
+ stdpre_h=$(GLSRC)stdpre.h
  stdint__h=$(GLSRC)stdint_.h $(std_h)
  
 -$(GLGEN)arch.h : $(GENARCH_XE)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index bf985c4..50ec7e2 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -32,7 +32,6 @@
            file://ghostscript-9.02-genarch.patch \
            file://objarch.h \
            file://cups-no-gcrypt.patch \
-           file://CVE-2016-7977.patch \
            file://CVE-2017-7207.patch \
            file://CVE-2017-5951.patch \
            file://CVE-2017-7975.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb b/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
index 222fc9d..ab70ea9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
@@ -7,6 +7,7 @@
 
 SRC_URI = "git://${GO_IMPORT}"
 SRCREV = "46695d81d1fae905a270fb7db8a4d11a334562fe"
+UPSTREAM_CHECK_COMMITS = "1"
 
 GO_IMPORT = "github.com/golang/example"
 GO_INSTALL = "${GO_IMPORT}/hello"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf.inc b/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf.inc
deleted file mode 100644
index a8ce230..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "GNU gperf is a perfect hash function generator"
-HOMEPAGE = "http://www.gnu.org/software/gperf"
-SUMMARY  = "Generate a perfect hash function from a set of keywords"
-LICENSE  = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
-
-SRC_URI  = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
-
-inherit autotools
-
-# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
-# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
-EXTRA_AUTORECONF += " -I ${S}"
-
-do_configure_prepend() {
-        if [ ! -e ${S}/acinclude.m4 ]; then
-                cat ${S}/aclocal.m4 > ${S}/acinclude.m4
-        fi
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb b/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb
index 942820b..f61b2a3 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/gperf/gperf_3.1.bb
@@ -1,5 +1,18 @@
-require gperf.inc
+DESCRIPTION = "GNU gperf is a perfect hash function generator"
+HOMEPAGE = "http://www.gnu.org/software/gperf"
+SUMMARY  = "Generate a perfect hash function from a set of keywords"
+LICENSE  = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
 
-
+SRC_URI  = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
 SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e"
 SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2"
+
+inherit autotools
+
+# The nested configures don't find the parent aclocal.m4 out of the box, so tell
+# it where to look explicitly (mirroring the behaviour of upstream's Makefile.devel).
+EXTRA_AUTORECONF += " -I ${S} --exclude=aclocal"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb b/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb
index 05b6b93..71810dc 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/grep/grep_3.1.bb
@@ -14,8 +14,6 @@
 
 inherit autotools gettext texinfo pkgconfig
 
-EXTRA_OECONF = "--disable-perl-regexp"
-
 # Fix "Argument list too long" error when len(TMPDIR) = 410
 acpaths = "-I ./m4"
 
@@ -36,6 +34,9 @@
 
 inherit update-alternatives
 
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre"
+
 ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN} = "grep egrep fgrep"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch
deleted file mode 100644
index 20d5a19..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 5f712621829ed81a758077431226a86df37fbc3b Mon Sep 17 00:00:00 2001
-From: Denys Zagorui <denys.zagorui@globallogic.com>
-Date: Thu, 8 Jun 2017 16:05:50 +0300
-Subject: [PATCH] gzip: port zdiff, zless to Busybox
-
-Problem reported by Denys Zagorui (Bug#26088).
-* tests/zdiff: Check that diff uses POSIX-format output.
-* zless.in (less_version): Don't exit merely because 'less -V'
-fails; instead, assume 'less' is compatible with an old version of
-the original 'less'.  Busybox 'less -V' fails, but apparently its
-'less' works anyway somehow.
-
-Signed-off-by: Denys Zagorui <denys.zagorui@globallogic.com>
-
-Upstream-Status: Accepted
----
- tests/zdiff | 4 +++-
- zless.in    | 2 +-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/tests/zdiff b/tests/zdiff
-index 0bb7c7d..9cd4fd4 100755
---- a/tests/zdiff
-+++ b/tests/zdiff
-@@ -22,7 +22,6 @@
- 
- echo a > a || framework_failure_
- echo b > b || framework_failure_
--gzip a b || framework_failure_
- 
- cat <<EOF > exp
- 1c1
-@@ -31,7 +30,10 @@ cat <<EOF > exp
- > b
- EOF
- 
-+diff a b | diff exp - || skip_ "diff output format is incompatible with POSIX"
-+
- fail=0
-+gzip a b || fail=1
- zdiff a.gz b.gz > out 2>&1
- test $? = 1 || fail=1
- 
-diff --git a/zless.in b/zless.in
-index e634af6..9759ae6 100644
---- a/zless.in
-+++ b/zless.in
-@@ -47,7 +47,7 @@ if test "${LESSMETACHARS+set}" != set; then
-   export LESSMETACHARS
- fi
- 
--less_version=`less -V` || exit
-+less_version=`less -V 2>/dev/null`
- case $less_version in
- less' '45[1-9]* | \
- less' '4[6-9][0-9]* | \
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
deleted file mode 100644
index 4dc1000..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-fix MakeMaker issues with using wrong SHELL/GREP
-
-A set of substitution is being processed to all target scripts with sed by
-replacing some key words with the detected values at configure time, this
-is exactly not compliant with cross compling, and will cause missing path
-errors at run time like:
-"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
-
-Fixed by removing unneeded substitution and using real runtime paths
-instead.
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-Upstream-Status: Pending
-
-Index: gzip-1.8/Makefile.am
-===================================================================
---- gzip-1.8.orig/Makefile.am
-+++ gzip-1.8/Makefile.am
-@@ -81,8 +81,7 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
- SUFFIXES = .in
- .in:
- 	$(AM_V_GEN)sed \
--		-e 's|/bin/sh|$(SHELL)|g' \
--		-e 's|[@]GREP@|$(GREP)|g' \
-+		-e 's|[@]GREP@|$(base_bindir)/grep|g' \
- 		-e 's|[@]VERSION@|$(VERSION)|g' \
- 		$(srcdir)/$@.in >$@-t \
- 	  && chmod a+x $@-t \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch
new file mode 100644
index 0000000..7c37bc8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.9/wrong-path-fix.patch
@@ -0,0 +1,36 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d4ecc3f..e4657d2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -82,8 +82,7 @@ SUFFIXES = .in
+ .in:
+ 	$(AM_V_GEN)rm -f $@-t $@ \
+           && sed \
+-		-e 's|/bin/sh|$(SHELL)|g' \
+-		-e 's|[@]GREP@|$(GREP)|g' \
++		-e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ 		-e 's|[@]VERSION@|$(VERSION)|g' \
+ 		$(srcdir)/$@.in >$@-t \
+ 	  && chmod a=rx $@-t \
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb
deleted file mode 100644
index d093207..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-require gzip.inc
-
-LICENSE = "GPLv3+"
-
-SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \
-            file://0001-gzip-port-zdiff-zless-to-Busybox.patch \
-            file://run-ptest"
-SRC_URI_append_class-target = " file://wrong-path-fix.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
-
-PROVIDES_append_class-native = " gzip-replacement-native"
-
-BBCLASSEXTEND = "native"
-
-inherit ptest
-
-do_install_ptest() {
-	mkdir -p ${D}${PTEST_PATH}/src/build-aux
-	cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/
-	mkdir -p ${D}${PTEST_PATH}/src/tests
-	cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests
-	sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \
-            -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \
-            -e 's/^GREP = ..*/GREP = grep/'             \
-            -e 's/^AWK = ..*/AWK = awk/'                \
-            -e 's/^srcdir = ..*/srcdir = \./'           \
-            -e 's/^Makefile: ..*/Makefile: /'           \
-            -e 's,--sysroot=${STAGING_DIR_TARGET},,g'   \
-            -e 's|${DEBUG_PREFIX_MAP}||g' \
-            -e 's:${HOSTTOOLS_DIR}/::g'                 \
-            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-            ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile
-}
-
-SRC_URI[md5sum] = "732553152814b22dc35aa0267df5286c"
-SRC_URI[sha256sum] = "1ff7aedb3d66a0d73f442f6261e4b3860df6fd6c94025c2cb31a202c9c60fe0e"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.9.bb b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.9.bb
new file mode 100644
index 0000000..a8eeba1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.9.bb
@@ -0,0 +1,38 @@
+require gzip.inc
+
+LICENSE = "GPLv3+"
+
+SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \
+            file://run-ptest"
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
+
+PROVIDES_append_class-native = " gzip-replacement-native"
+
+BBCLASSEXTEND = "native"
+
+inherit ptest
+
+do_install_ptest() {
+	mkdir -p ${D}${PTEST_PATH}/src/build-aux
+	cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/
+	mkdir -p ${D}${PTEST_PATH}/src/tests
+	cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests
+	sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \
+            -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \
+            -e 's/^GREP = ..*/GREP = grep/'             \
+            -e 's/^AWK = ..*/AWK = awk/'                \
+            -e 's/^srcdir = ..*/srcdir = \./'           \
+            -e 's/^Makefile: ..*/Makefile: /'           \
+            -e 's,--sysroot=${STAGING_DIR_TARGET},,g'   \
+            -e 's|${DEBUG_PREFIX_MAP}||g' \
+            -e 's:${HOSTTOOLS_DIR}/::g'                 \
+            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+            ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile
+}
+
+SRC_URI[md5sum] = "929d6a6b832f75b28e3eeeafb30c1d9b"
+SRC_URI[sha256sum] = "5d2d3a3432ef32f24cdb060d278834507b481a75adeca18850c73592f778f6ad"
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch
new file mode 100644
index 0000000..4af1b61
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm/wiper.sh-fix-stat-path.patch
@@ -0,0 +1,38 @@
+From e233006ee212109d2a1401dac37a9a851cc493d8 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 14 Dec 2017 15:23:47 +0800
+Subject: [PATCH] wiper.sh: fix stat path
+
+Fix the stat path for OE.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ wiper/wiper.sh | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/wiper/wiper.sh b/wiper/wiper.sh
+index 79eddc8..9ef2840 100755
+--- a/wiper/wiper.sh
++++ b/wiper/wiper.sh
+@@ -97,7 +97,6 @@ function find_prog(){
+ hash -r  ## Refresh bash's cached PATH entries
+ HDPARM=`find_prog /sbin/hdparm`	|| exit 1
+ FIND=`find_prog /usr/bin/find`	|| exit 1
+-STAT=`find_prog /usr/bin/stat`	|| exit 1
+ GAWK=`find_prog /usr/bin/gawk`	|| exit 1
+ BLKID=`find_prog /sbin/blkid`	|| exit 1
+ GREP=`find_prog /bin/grep`	|| exit 1
+@@ -105,7 +104,7 @@ ID=`find_prog /usr/bin/id`	|| exit 1
+ LS=`find_prog /bin/ls`		|| exit 1
+ DF=`find_prog /bin/df`		|| exit 1
+ RM=`find_prog /bin/rm`		|| exit 1
+-STAT=`find_prog /usr/bin/stat`	|| exit 1
++STAT=`find_prog /bin/stat`	|| exit 1
+ 
+ [ $verbose -gt 1 ] && HDPARM="$HDPARM --verbose"
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.52.bb b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.52.bb
deleted file mode 100644
index 49fdc94..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.52.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
-HOMEPAGE = "http://sourceforge.net/projects/hdparm/"
-DESCRIPTION = "hdparm is a Linux shell utility for viewing \
-and manipulating various IDE drive and driver parameters."
-SECTION = "console/utils"
-
-LICENSE = "BSD & GPLv2"
-LICENSE_${PN} = "BSD"
-LICENSE_${PN}-dbg = "BSD"
-LICENSE_wiper = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=495d03e50dc6c89d6a30107ab0df5b03 \
-                    file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
-                    file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
-                    file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
-
-
-PACKAGES =+ "wiper"
-
-FILES_wiper = "${bindir}/wiper.sh"
-
-RDEPENDS_wiper = "bash gawk stat"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "410539d0bf3cc247181594581edbfb53"
-SRC_URI[sha256sum] = "c3429cd423e271fa565bf584598fd751dd2e773bb7199a592b06b5a61cec4fb6"
-
-EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"'
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "hdparm"
-ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
-ALTERNATIVE_PRIORITY = "100"
-
-do_install () {
-	install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
-	oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
-	cp ${S}/wiper/wiper.sh ${D}/${bindir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.53.bb b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.53.bb
new file mode 100644
index 0000000..4c3ec5c4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.53.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
+HOMEPAGE = "http://sourceforge.net/projects/hdparm/"
+DESCRIPTION = "hdparm is a Linux shell utility for viewing \
+and manipulating various IDE drive and driver parameters."
+SECTION = "console/utils"
+
+LICENSE = "BSD & GPLv2"
+LICENSE_${PN} = "BSD"
+LICENSE_${PN}-dbg = "BSD"
+LICENSE_wiper = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=495d03e50dc6c89d6a30107ab0df5b03 \
+                    file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
+                    file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
+                    file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
+
+
+PACKAGES =+ "wiper"
+
+FILES_wiper = "${bindir}/wiper.sh"
+
+RDEPENDS_wiper = "bash gawk coreutils"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz \
+           file://wiper.sh-fix-stat-path.patch \
+          "
+
+SRC_URI[md5sum] = "1e54b52e0c8cb79389d4d47eacba411d"
+SRC_URI[sha256sum] = "2673f591df6916c6a1faec07069a7eb1cb8ee307615a615d808192fb0c0265e5"
+
+EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"'
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "hdparm"
+ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install () {
+	install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
+	oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
+	cp ${S}/wiper/wiper.sh ${D}/${bindir}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
deleted file mode 100644
index f1f85a6..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-[PATCH] fix build with musl
-
-Define additional TCOPTS if not there
-u_initX types are in sys/types.h be explicit about it
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c
---- iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c	2015-12-09 14:55:06.000000000 +0200
-+++ iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c	2015-12-29 14:44:32.585327077 +0200
-@@ -12,6 +12,21 @@
- #ifndef TCPOPT_MD5SIG
- #	define TCPOPT_MD5SIG 19
- #endif
-+#ifndef TCPOPT_MAXSEG
-+#define TCPOPT_MAXSEG 2
-+#endif
-+#ifndef TCPOPT_WINDOW
-+#define TCPOPT_WINDOW 3
-+#endif
-+#ifndef TCPOPT_SACK_PERMITTED
-+#define TCPOPT_SACK_PERMITTED 4
-+#endif
-+#ifndef TCPOPT_SACK
-+#define TCPOPT_SACK 5
-+#endif
-+#ifndef TCPOPT_TIMESTAMP
-+#define TCPOPT_TIMESTAMP 8
-+#endif
- 
- enum {
- 	O_STRIP_OPTION = 0,
-diff -Naur iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h
---- iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h	2015-12-09 14:55:06.000000000 +0200
-+++ iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h	2015-12-29 14:40:21.250469195 +0200
-@@ -15,6 +15,7 @@
- #ifndef _IPTABLES_H
- #define _IPTABLES_H
- 
-+#include <sys/types.h>
- #include <linux/types.h>
- 
- #include <linux/netfilter_ipv4.h>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
deleted file mode 100644
index 24ee29e..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Fri, 23 Mar 2012 14:27:20 -0400
-Subject: [PATCH] types.h: add defines that are required for if_packet.h
-
-The iptables local linux/types.h overrides the kernel/sysroot
-types.h. As such, we need to provide some defines that are required
-to build against 3.2+ kernel headers.
-
-ifndef protection is provided for the defines to ensure that
-configuration that already have these defines are still buildable.
-
-This commit is temporary until a new version of iptables can be
-used that contains the defines.
-
-This is similar to the commit in the iptables git repository:
-
-  https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b
-
-Upstream-Status: Backport
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- include/linux/types.h |   10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
-
-diff --git a/include/linux/types.h b/include/linux/types.h
-index 8b483c8..ebf6432 100644
---- a/include/linux/types.h
-+++ b/include/linux/types.h
-@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64;
- typedef __u16 __bitwise __sum16;
- typedef __u32 __bitwise __wsum;
- 
-+#ifndef __aligned_u64
-+#define __aligned_u64 __u64 __attribute__((aligned(8)))
-+#endif
-+#ifndef __aligned_be64
-+#define __aligned_be64 __be64 __attribute__((aligned(8)))
-+#endif
-+#ifndef __aligned_le64
-+#define __aligned_le64 __le64 __attribute__((aligned(8)))
-+#endif
-+
- #endif /*  __ASSEMBLY__ */
- #endif /* _LINUX_TYPES_H */
--- 
-1.7.0.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.1.bb b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.1.bb
deleted file mode 100644
index b37c55a..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.1.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Tools for managing kernel packet filtering capabilities"
-DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
-filtering code in Linux."
-HOMEPAGE = "http://www.netfilter.org/"
-BUGTRACKER = "http://bugzilla.netfilter.org/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
-                    file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
-
-RRECOMMENDS_${PN} = "kernel-module-x-tables \
-                     kernel-module-ip-tables \
-                     kernel-module-iptable-filter \
-                     kernel-module-iptable-nat \
-                     kernel-module-nf-defrag-ipv4 \
-                     kernel-module-nf-conntrack \
-                     kernel-module-nf-conntrack-ipv4 \
-                     kernel-module-nf-nat \
-                     kernel-module-ipt-masquerade"
-FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
-
-SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
-           file://types.h-add-defines-that-are-required-for-if_packet.patch \
-           file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
-           file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
-           file://0001-fix-build-with-musl.patch \
-"
-
-SRC_URI[md5sum] = "ab38a33806b6182c6f53d6afb4619add"
-SRC_URI[sha256sum] = "0fc2d7bd5d7be11311726466789d4c65fb4c8e096c9182b56ce97440864f0cf5"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
-               "
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-# libnfnetlink recipe is in meta-networking layer
-PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
-
-# libnftnl recipe is in meta-networking layer(previously known as libnftables)
-PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
-
-do_configure_prepend() {
-	# Remove some libtool m4 files
-	# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
-	rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.2.bb
new file mode 100644
index 0000000..38a83d2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.2.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Tools for managing kernel packet filtering capabilities"
+DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
+filtering code in Linux."
+HOMEPAGE = "http://www.netfilter.org/"
+BUGTRACKER = "http://bugzilla.netfilter.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
+                    file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
+
+RRECOMMENDS_${PN} = "kernel-module-x-tables \
+                     kernel-module-ip-tables \
+                     kernel-module-iptable-filter \
+                     kernel-module-iptable-nat \
+                     kernel-module-nf-defrag-ipv4 \
+                     kernel-module-nf-conntrack \
+                     kernel-module-nf-conntrack-ipv4 \
+                     kernel-module-nf-nat \
+                     kernel-module-ipt-masquerade"
+FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
+
+SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
+           file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
+           file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
+"
+
+SRC_URI[md5sum] = "7d2b7847e4aa8832a18437b8a4c1873d"
+SRC_URI[sha256sum] = "55d02dfa46263343a401f297d44190f2a3e5113c8933946f094ed40237053733"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
+               "
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# libnfnetlink recipe is in meta-networking layer
+PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
+
+# libnftnl recipe is in meta-networking layer(previously known as libnftables)
+PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
+
+do_configure_prepend() {
+	# Remove some libtool m4 files
+	# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
+	rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch
new file mode 100644
index 0000000..ce8cfeb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch
@@ -0,0 +1,95 @@
+From c6c5966d9fae27bc2f0a34ab59b999555111bd2d Mon Sep 17 00:00:00 2001
+From: Aric Belsito <lluixhi@gmail.com>
+Date: Sun, 29 Oct 2017 23:17:03 +0100
+Subject: [PATCH] Fix build on MUSL
+
+Add missing AI_IDN and NI_IDN declarations.
+
+Bug: https://bugs.gentoo.org/503914
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ arping.c      |  7 +++++++
+ ping.h        | 11 +++++++++++
+ tracepath.c   |  8 ++++++++
+ traceroute6.c |  4 ++++
+ 4 files changed, 30 insertions(+)
+
+diff --git a/arping.c b/arping.c
+index 1a3f40b..531d29d 100644
+--- a/arping.c
++++ b/arping.c
+@@ -45,6 +45,13 @@ struct sysfs_devattr_values;
+ #ifdef USE_IDN
+ #include <idna.h>
+ #include <locale.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef AI_CANONIDN
++#define AI_CANONIDN 0x0080
++#endif
+ #endif
+ 
+ #include "SNAPSHOT.h"
+diff --git a/ping.h b/ping.h
+index 749f3ff..227315f 100644
+--- a/ping.h
++++ b/ping.h
+@@ -38,6 +38,17 @@
+ #include <locale.h>
+ #include <idna.h>
+ #include <stringprep.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef AI_CANONIDN
++#define AI_CANONIDN 0x0080
++#endif
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
+ #define getnameinfo_flags NI_IDN
+ #else
+diff --git a/tracepath.c b/tracepath.c
+index 74a829d..dcec5b9 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -30,6 +30,14 @@
+ #ifdef USE_IDN
+ #include <idna.h>
+ #include <locale.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getnameinfo_flags	NI_IDN
+ #else
+ #define getnameinfo_flags	0
+diff --git a/traceroute6.c b/traceroute6.c
+index 48fc5c5..8d1eebf 100644
+--- a/traceroute6.c
++++ b/traceroute6.c
+@@ -251,6 +251,10 @@
+ #include <idna.h>
+ #include <locale.h>
+ 
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getnameinfo_flags	NI_IDN
+ #else
+ #define getnameinfo_flags	0
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
deleted file mode 100644
index 20ef07e..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 14:14:22 -0800
-Subject: [PATCH] Fix header inclusion for musl
-
-Fix errors e.g.
-
-In file included from tracepath.c:17:0:
-/usr/include/linux/errqueue.h:33:18:
-error: array type has incomplete element type 'struct timespec'
-  struct timespec ts[3];
-                  ^
-tracepath.c: In function 'main':
-tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this
-function)
-      overhead, INT_MAX);
-                ^
-tracepath.c:329:16: note: each undeclared identifier is reported only
-once for each function it appears in
-Makefile:131: recipe for target 'tracepath.o' failed
-make: *** [tracepath.o] Error 1
-
-ping_common.c: In function 'main_loop':
-ping_common.c:756:15: error: 'HZ' undeclared (first use in this
-function)
-    if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ &&
-next * HZ <= 1000)) {
-
-protocols/timed.h is not needed and is absent in musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- clockdiff.c   | 1 -
- ping_common.c | 1 +
- tracepath.c   | 2 ++
- tracepath6.c  | 1 +
- 4 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/clockdiff.c b/clockdiff.c
-index 7c1ea1b..1d6341e 100644
---- a/clockdiff.c
-+++ b/clockdiff.c
-@@ -14,7 +14,6 @@
- #include <netinet/ip.h>
- #include <netinet/ip_icmp.h>
- #define TSPTYPES
--#include <protocols/timed.h>
- #include <fcntl.h>
- #include <netdb.h>
- #include <arpa/inet.h>
-diff --git a/ping_common.c b/ping_common.c
-index 7f82851..3ce699d 100644
---- a/ping_common.c
-+++ b/ping_common.c
-@@ -2,6 +2,7 @@
- #include <ctype.h>
- #include <sched.h>
- #include <math.h>
-+#include <asm-generic/param.h>
- 
- int options;
- 
-diff --git a/tracepath.c b/tracepath.c
-index 89e6d16..c9d6ddd 100644
---- a/tracepath.c
-+++ b/tracepath.c
-@@ -12,6 +12,8 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <limits.h>
-+#include <time.h>
- #include <sys/socket.h>
- #include <linux/types.h>
- #include <linux/errqueue.h>
-diff --git a/tracepath6.c b/tracepath6.c
-index 126fadf..9d5745c 100644
---- a/tracepath6.c
-+++ b/tracepath6.c
-@@ -12,6 +12,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <limits.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/icmp6.h>
--- 
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
deleted file mode 100644
index 6da01dc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 000629f74908a2a95f6104444c77ad93cf40d62d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 08:50:50 +0000
-Subject: [PATCH] Intialize struct elements by name
-
-makes it portable across glibc and musl
-
-Fixes errors
-
-| ping.c: In function 'send_probe':
-| ping.c:735:19: warning: initialization makes integer from pointer
-without a cast [-Wint-conversion]
-|           &iov, 1, &cmsg, 0, 0 };
-|                    ^
-| ping.c:735:19: note: (near initialization for 'm.__pad1')
-| ping.c:735:19: error: initializer element is not computable at load
-time
-| ping.c:735:19: note: (near initialization for 'm.__pad1')
-| make: *** [ping.o] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- ping.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/ping.c b/ping.c
-index 4989760..e67f381 100644
---- a/ping.c
-+++ b/ping.c
-@@ -731,8 +731,15 @@ int send_probe()
- 
- 	do {
- 		static struct iovec iov = {outpack, 0};
--		static struct msghdr m = { &whereto, sizeof(whereto),
--						   &iov, 1, &cmsg, 0, 0 };
-+		static struct msghdr m = {
-+			.msg_name = &whereto,
-+			.msg_namelen = sizeof(whereto),
-+			.msg_iov = &iov,
-+			.msg_iovlen = 1,
-+			.msg_control = &cmsg,
-+			.msg_controllen = 0,
-+			.msg_flags= 0,
-+		};
- 		m.msg_controllen = cmsg_len;
- 		iov.iov_len = cc;
- 
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch
deleted file mode 100644
index 7b56276..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-arping: fix arping hang if SIGALRM is blocked
-
-Unblock SIGALRM so that the previously called alarm() can prevent
-recvfrom() from blocking forever in case the inherited procmask is
-blocking SIGALRM and no packet is received.
-
-Upstream-Status: Backport
-
-Reported-by: Rui Prior <rprior@dcc.fc.up.pt>
-RH-Bugzilla: #1085971
-Signed-off-by: Jan Synacek <jsynacek@redhat.com>
-Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
-
-diff --git a/arping.c.orig b/arping.c
-index 35408c1..2098159 100644
---- a/arping.c.orig
-+++ b/arping.c
-@@ -1215,16 +1215,22 @@ main(int argc, char **argv)
- 		socklen_t alen = sizeof(from);
- 		int cc;
- 
-+		sigemptyset(&sset);
-+		sigaddset(&sset, SIGALRM);
-+		sigaddset(&sset, SIGINT);
-+		/* Unblock SIGALRM so that the previously called alarm()
-+		 * can prevent recvfrom from blocking forever in case the
-+		 * inherited procmask is blocking SIGALRM and no packet
-+		 * is received. */
-+		sigprocmask(SIG_UNBLOCK, &sset, &osset);
-+
- 		if ((cc = recvfrom(s, packet, sizeof(packet), 0,
- 				   (struct sockaddr *)&from, &alen)) < 0) {
- 			perror("arping: recvfrom");
- 			continue;
- 		}
- 
--		sigemptyset(&sset);
--		sigaddset(&sset, SIGALRM);
--		sigaddset(&sset, SIGINT);
--		sigprocmask(SIG_BLOCK, &sset, &osset);
-+		sigprocmask(SIG_BLOCK, &sset, NULL);
- 		recv_pack(packet, cc, (struct sockaddr_ll *)&from);
- 		sigprocmask(SIG_SETMASK, &osset, NULL);
- 	}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff
deleted file mode 100644
index 2cb5576..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [disable feature]
-
-Index: iputils-s20121221/Makefile
-===================================================================
---- iputils-s20121221.orig/Makefile
-+++ iputils-s20121221/Makefile
-@@ -106,7 +106,7 @@ endif
- endif
- 
- # -------------------------------------
--IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
-+IPV4_TARGETS=tracepath ping clockdiff arping
- IPV6_TARGETS=tracepath6 traceroute6 ping6
- TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
- 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
deleted file mode 100644
index d3b1886..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending [from other distro Debian]
-
-Index: iputils-s20121221/tracepath.c
-===================================================================
---- iputils-s20121221.orig/tracepath.c
-+++ iputils-s20121221/tracepath.c
-@@ -370,9 +370,9 @@ main(int argc, char **argv)
- 	}
- #endif
- 
--	he = gethostbyname(p);
-+	he = gethostbyname2(argv[0], AF_INET);
- 	if (he == NULL) {
--		herror("gethostbyname");
-+		herror("gethostbyname2");
- 		exit(1);
- 	}
- 
-Index: iputils-s20121221/ping.c
-===================================================================
---- iputils-s20121221.orig/ping.c
-+++ iputils-s20121221/ping.c
-@@ -279,7 +279,7 @@ main(int argc, char **argv)
- #else
- 			idn = target;
- #endif
--			hp = gethostbyname(idn);
-+			hp = gethostbyname2(idn, AF_INET);
- 			if (!hp) {
- 				fprintf(stderr, "ping: unknown host %s\n", target);
- 				exit(2);
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
deleted file mode 100644
index 92bf946..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix nsgmls path issue
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Index: iputils-s20101006/doc/Makefile
-===================================================================
---- iputils-s20101006.orig/doc/Makefile	2011-09-13 20:42:27.000000000 +0800
-+++ iputils-s20101006/doc/Makefile	2011-09-13 21:01:52.000000000 +0800
-@@ -27,10 +27,15 @@
- # docbook2man produces utterly ugly output and I did not find
- # any way to customize this but hacking backend perl script a little.
- # Well, hence...
-+# nsgmls seems append path to search directory according to the sysid path.
-+# e.g. if input ../index.db, it would search $search_directory/../ rather than
-+# $search_directory, which leads searching failure. Fixing nsgmls probably
-+# introduce some side effects, so use this ugly hack: running nsgmls in current
-+# directory, and running docbook2man in tmp directory.
- 
- $(MANFILES): index.db
- 	@-mkdir tmp.db2man
--	@set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
-+	@set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
- 	@-rm -rf tmp.db2man
- 
- clean:
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb b/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
deleted file mode 100644
index 46de6fc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
+++ /dev/null
@@ -1,72 +0,0 @@
-SUMMARY = "Network monitoring tools"
-DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
-tracepath, tracepath6, ping, ping6 and arping."
-HOMEPAGE = "http://www.skbuff.net/iputils"
-SECTION = "console/network"
-
-LICENSE = "BSD & GPLv2+"
-
-LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
-                    file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
-                    file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
-                    file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
-
-DEPENDS = "gnutls libcap libgcrypt"
-
-
-SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
-           file://debian/use_gethostbyname2.diff \
-           file://debian/targets.diff \
-           file://nsgmls-path-fix.patch \
-           file://0001-Fix-header-inclusion-for-musl.patch \
-           file://0001-Intialize-struct-elements-by-name.patch \
-           file://arping-fix-arping-hang-if-SIGALRM-is-blocked.patch \
-          "
-
-SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce"
-SRC_URI[sha256sum] = "549f58d71951e52b46595829134d4e330642f522f50026917fadc349a54825a1"
-
-UPSTREAM_CHECK_REGEX = "iputils-(?P<pver>s\d+).tar"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_compile () {
-	oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all
-}
-
-do_install () {
-	install -m 0755 -d ${D}${base_bindir}
-	# SUID root programs
-	install -m 4555 ping ${D}${base_bindir}/ping
-	install -m 4555 ping6 ${D}${base_bindir}/ping6
-	install -m 4555 traceroute6 ${D}${base_bindir}/
-	install -m 4555 clockdiff ${D}${base_bindir}/
-	# Other programgs
-	for i in arping tracepath tracepath6; do
-	  install -m 0755 $i ${D}${base_bindir}/
-	done
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN}-ping = "ping"
-ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
-
-ALTERNATIVE_${PN}-ping6 = "ping6"
-ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
-
-PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-ALLOW_EMPTY_${PN} = "1"
-RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-FILES_${PN}	= ""
-FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
-FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
-FILES_${PN}-arping = "${base_bindir}/arping"
-FILES_${PN}-tracepath = "${base_bindir}/tracepath"
-FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
-FILES_${PN}-traceroute6	= "${base_bindir}/traceroute6"
-FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20161105.bb b/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20161105.bb
new file mode 100644
index 0000000..0125739
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/iputils/iputils_s20161105.bb
@@ -0,0 +1,62 @@
+SUMMARY = "Network monitoring tools"
+DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
+tracepath, tracepath6, ping, ping6 and arping."
+HOMEPAGE = "https://github.com/iputils/iputils"
+SECTION = "console/network"
+
+LICENSE = "BSD & GPLv2+"
+
+LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
+                    file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
+                    file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
+                    file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
+
+DEPENDS = "gnutls libcap libgcrypt"
+
+SRC_URI = "git://github.com/iputils/iputils \
+           file://0001-Fix-build-on-MUSL.patch \
+           "
+S = "${WORKDIR}/git"
+SRCREV = "bffc0e957b98d626ab4cea218c89251201425442"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn"
+
+do_compile () {
+	oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all
+}
+
+do_install () {
+	install -m 0755 -d ${D}${base_bindir}
+	# SUID root programs
+	install -m 4555 ping ${D}${base_bindir}/ping
+	install -m 4555 traceroute6 ${D}${base_bindir}/
+	install -m 4555 clockdiff ${D}${base_bindir}/
+	# Other programgs
+	for i in arping tracepath; do
+	  install -m 0755 $i ${D}${base_bindir}/
+	done
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-ping = "ping"
+ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
+
+PACKAGES += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
+
+FILES_${PN}	= ""
+FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES_${PN}-arping = "${base_bindir}/arping"
+FILES_${PN}-tracepath = "${base_bindir}/tracepath"
+FILES_${PN}-traceroute6	= "${base_bindir}/traceroute6"
+FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/less/less_487.bb b/import-layers/yocto-poky/meta/recipes-extended/less/less_487.bb
deleted file mode 100644
index 23ae484..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/less/less_487.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Text file viewer similar to more"
-DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
-based program for viewing text files and the output from other \
-programs. Less offers many features beyond those that more does."
-HOMEPAGE = "http://www.greenwoodsoftware.com/"
-SECTION = "console/utils"
-
-# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
-# Including email author giving permissing to use BSD
-#
-# From: Mark Nudelman <markn@greenwoodsoftware.com>
-# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
-# Date: 12/19/11
-#
-# Hi Elizabeth,
-# Using a generic BSD license for less is fine with me.
-# Thanks,
-#
-# --Mark
-#
-
-LICENSE = "GPLv3+ | BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234"
-DEPENDS = "ncurses"
-
-SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
-	  "
-
-SRC_URI[md5sum] = "dcc8bf183a83b362d37fe9ef8df1fb60"
-SRC_URI[sha256sum] = "f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706"
-
-UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
-
-inherit autotools update-alternatives
-
-do_install () {
-        oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
-}
-
-ALTERNATIVE_${PN} = "less"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/less/less_529.bb b/import-layers/yocto-poky/meta/recipes-extended/less/less_529.bb
new file mode 100644
index 0000000..c86f754
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/less/less_529.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Text file viewer similar to more"
+DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
+based program for viewing text files and the output from other \
+programs. Less offers many features beyond those that more does."
+HOMEPAGE = "http://www.greenwoodsoftware.com/"
+SECTION = "console/utils"
+
+# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
+# Including email author giving permissing to use BSD
+#
+# From: Mark Nudelman <markn@greenwoodsoftware.com>
+# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
+# Date: 12/19/11
+#
+# Hi Elizabeth,
+# Using a generic BSD license for less is fine with me.
+# Thanks,
+#
+# --Mark
+#
+
+LICENSE = "GPLv3+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234"
+DEPENDS = "ncurses"
+
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
+	  "
+
+SRC_URI[md5sum] = "32018b53a1f7319ab54349baf80e6aa8"
+SRC_URI[sha256sum] = "dba42cd4c38174b7bd0d426d8a39df2be6bcc1ec18946a4642713290f6bf9a0b"
+
+UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
+
+inherit autotools update-alternatives
+
+do_install () {
+        oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
+}
+
+ALTERNATIVE_${PN} = "less"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch
index dad9601..0f90406 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/destdir.patch
@@ -2,16 +2,16 @@
 
 from openembedded, added by Qing He <qing.he@intel.com>
 
-Index: libaio-0.3.106/Makefile
+Index: libaio-0.3.110/Makefile
 ===================================================================
---- libaio-0.3.106.orig/Makefile	2004-02-26 07:25:10.000000000 -0800
-+++ libaio-0.3.106/Makefile	2006-10-14 09:19:07.000000000 -0700
-@@ -15,7 +15,7 @@
+--- libaio-0.3.110.orig/Makefile
++++ libaio-0.3.110/Makefile
+@@ -15,7 +15,7 @@ all:
  	@$(MAKE) -C src
  
  install:
 -	@$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir)
 +	@$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
  
- 
- clean:
+ check:
+ 	@$(MAKE) -C harness check
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
index 5683d3c..db91317 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
@@ -9,12 +9,12 @@
 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
 2012/05/03
 
-Index: libidn-1.24/configure.ac
+Index: libidn-1.33/configure.ac
 ===================================================================
---- libidn-1.24.orig/configure.ac
-+++ libidn-1.24/configure.ac
-@@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
- AC_SUBST(LT_REVISION, 7)
+--- libidn-1.33.orig/configure.ac
++++ libidn-1.33/configure.ac
+@@ -33,6 +33,10 @@ AC_SUBST(LT_CURRENT, 17)
+ AC_SUBST(LT_REVISION, 16)
  AC_SUBST(LT_AGE, 6)
  
 +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb b/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
index b458799..23262e8 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/libmnl/libmnl_1.0.4.bb
@@ -11,3 +11,5 @@
 SRC_URI[tar.sha256sum] = "171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81"
 
 inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb
new file mode 100644
index 0000000..14cc9e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libpipeline/libpipeline_1.5.0.bb
@@ -0,0 +1,14 @@
+SUMMARY = "pipeline manipulation library"
+DESCRIPTION = "This is a C library for setting up and running pipelines of processes, \
+without needing to involve shell command-line parsing which is often \
+error-prone and insecure."
+HOMEPAGE = "http://libpipeline.nongnu.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/libpipeline/libpipeline-${PV}.tar.gz"
+SRC_URI[md5sum] = "b7437a5020190cfa84f09c412db38902"
+SRC_URI[sha256sum] = "0d72e12e4f2afff67fd7b9df0a24d7ba42b5a7c9211ac5b3dcccc5cd8b286f2b"
+
+inherit pkgconfig autotools
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
index a575d0e..e5cb60d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
@@ -1,4 +1,4 @@
-From 4d9b6ec30b78d00ead0a22eb5d047dcdba37e99c Mon Sep 17 00:00:00 2001
+From 47c6f1b4332a9e4935c48cca826786a6b8fe6f59 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?=
  =?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?=
  <ngompa13@gmail.com>
@@ -13,6 +13,7 @@
 
 Upstream-Status: Denied [https://github.com/openSUSE/libsolv/pull/112]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  ext/CMakeLists.txt                     |   7 ++
  ext/solv_xfopen.c                      |  10 +--
@@ -23,7 +24,7 @@
  create mode 100644 ext/solv_xfopen_fallback_fopencookie.h
 
 diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
-index 586eda8..477a2ef 100644
+index b8917a2..fac6c32 100644
 --- a/ext/CMakeLists.txt
 +++ b/ext/CMakeLists.txt
 @@ -4,6 +4,13 @@ SET (libsolvext_SRCS
@@ -41,11 +42,11 @@
      SET (libsolvext_SRCS ${libsolvext_SRCS}
          pool_fileconflicts.c repo_rpmdb.c)
 diff --git a/ext/solv_xfopen.c b/ext/solv_xfopen.c
-index b0421bf..31345dd 100644
+index 2c64bb6..eb3a3ad 100644
 --- a/ext/solv_xfopen.c
 +++ b/ext/solv_xfopen.c
-@@ -13,6 +13,10 @@
- #include <zlib.h>
+@@ -12,6 +12,10 @@
+ #include <string.h>
  #include <fcntl.h>
  
 +#if !defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
@@ -55,7 +56,7 @@
  #include "solv_xfopen.h"
  #include "util.h"
  
-@@ -39,7 +43,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
+@@ -21,7 +25,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
  	ssize_t (*cwrite)(void *, const char *, size_t),
  	int (*cclose)(void *))
  {
@@ -64,7 +65,7 @@
    if (!cookie)
      return 0;
    return funopen(cookie,
-@@ -48,7 +52,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
+@@ -30,7 +34,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
        (fpos_t (*)(void *, fpos_t, int))NULL,					/* seekfn */
        cclose
        );
@@ -73,7 +74,7 @@
    cookie_io_functions_t cio;
  
    if (!cookie)
-@@ -60,8 +64,6 @@ static FILE *cookieopen(void *cookie, const char *mode,
+@@ -42,8 +46,6 @@ static FILE *cookieopen(void *cookie, const char *mode,
      cio.write = cwrite;
    cio.close = cclose;
    return  fopencookie(cookie, *mode == 'w' ? "w" : "r", cio);
@@ -246,5 +247,5 @@
 +
 +#endif
 -- 
-2.11.0
+2.4.0
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch
deleted file mode 100644
index 4a4e5cb..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1c4c935cb73ac1ccb9693df1a51ba218a22e8ca8 Mon Sep 17 00:00:00 2001
-From: Ming Liu <liu.ming50@gmail.com>
-Date: Sat, 30 Sep 2017 11:15:16 +0800
-Subject: [PATCH] repo_rpmdb.c: increase MAX_HDR_CNT and MAX_HDR_DSIZE
-
-Upstream-Status: Submitted [https://github.com/openSUSE/libsolv/pull/230]
-
-We encountered 'corrupt rpm' issues when installing extreme big RPM
-packages like the kernel-devsrc package of Yocto project.
-
-It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE per test.
-
-Signed-off-by: Ming Liu <liu.ming50@gmail.com>
----
- ext/repo_rpmdb.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
-index c7000a9..7000835 100644
---- a/ext/repo_rpmdb.c
-+++ b/ext/repo_rpmdb.c
-@@ -170,8 +170,8 @@
- #define MAX_SIG_CNT		0x100000
- #define MAX_SIG_DSIZE		0x100000
- 
--#define MAX_HDR_CNT		0x100000
--#define MAX_HDR_DSIZE		0x2000000
-+#define MAX_HDR_CNT		0x200000
-+#define MAX_HDR_DSIZE		0x4000000
- 
- typedef struct rpmhead {
-   int cnt;
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch
index efb4e3a..93b8cc9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0002-Fixes-to-internal-fopencookie-implementation.patch
@@ -1,4 +1,4 @@
-From 99b10cdf6a0f8a24e1670c1813b1d9563ae3f5b5 Mon Sep 17 00:00:00 2001
+From 84e12bf7ece49073c559dfd58005132a6099a964 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?=
  =?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?=
  <ngompa13@gmail.com>
@@ -11,6 +11,7 @@
 
 Upstream-Status: Denied [https://github.com/openSUSE/libsolv/pull/112]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  ext/solv_xfopen_fallback_fopencookie.c | 19 ++++++++++---------
  ext/solv_xfopen_fallback_fopencookie.h | 10 +++++-----
@@ -100,5 +101,5 @@
  
  #ifndef SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H
 -- 
-2.11.0
+2.4.0
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.28.bb b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.28.bb
deleted file mode 100644
index 6c8f7fc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.28.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Library for solving packages and reading repositories"
-HOMEPAGE = "https://github.com/openSUSE/libsolv"
-BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
-SECTION = "devel"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
-
-DEPENDS = "expat zlib rpm"
-
-SRC_URI = "git://github.com/openSUSE/libsolv.git \
-           file://0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch \
-          "
-SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch \
-                             file://0002-Fixes-to-internal-fopencookie-implementation.patch \
-                           "
-
-SRCREV = "b8a9ddd88eb4e0ab351eb55a53186b5dc5ac0825"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_COMPLEX_DEPS=ON"
-
-PACKAGES =+ "${PN}-tools ${PN}ext"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
-FILES_${PN}-tools = "${bindir}/*"
-FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb
new file mode 100644
index 0000000..0401ced
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.33.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for solving packages and reading repositories"
+HOMEPAGE = "https://github.com/openSUSE/libsolv"
+BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
+
+DEPENDS = "expat zlib rpm"
+
+SRC_URI = "git://github.com/openSUSE/libsolv.git \
+          "
+SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch \
+                             file://0002-Fixes-to-internal-fopencookie-implementation.patch \
+                           "
+
+SRCREV = "69f1803978ba7a46a57928fa4be6430792419e4e"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_COMPLEX_DEPS=ON"
+
+PACKAGES =+ "${PN}-tools ${PN}ext"
+
+FILES_${PN}-tools = "${bindir}/*"
+FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
index 1765346..7ec54eb 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
@@ -22,6 +22,9 @@
 
 DEPENDS = "popt libpam glib-2.0 python3"
 
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
 inherit autotools gettext python3native python3-dir pkgconfig gtk-doc
 
 EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
index b8c7f37..f17bdce 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
@@ -1,4 +1,4 @@
-From e7a8c925b9316a72bdc8f32789ffe56fda5c4788 Mon Sep 17 00:00:00 2001
+From 22afc5d9aaa215c3c87ba21c77d47da44ab3b113 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 26 Aug 2016 18:20:32 +0300
 Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script.
@@ -7,31 +7,36 @@
 Upstream-Status: Pending
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
- configure.ac | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
+ configure.ac | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 1d172a1..a9236da 100644
+index 5383cec..c29a902 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -380,11 +380,12 @@ if test "$WITH_PCRE" != "no"; then
- 			PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
- 			CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
- 		else
--			AC_PATH_PROG(PCRECONFIG, pcre-config)
--			if test x"$PCRECONFIG" != x; then
--				PCRE_LIB=`$PCRECONFIG --libs`
--				CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
--			fi
-+			PKG_CHECK_MODULES(PCREPKG, [libpcre], [
+@@ -651,10 +651,18 @@ AC_ARG_WITH([pcre],
+ )
+ AC_MSG_RESULT([$WITH_PCRE])
+ 
+-if test "$WITH_PCRE" != no; then
+-  if test "$WITH_PCRE" != yes; then
+-    PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
+-    CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
++if test "$WITH_PCRE" != "no"; then
++  PKG_CHECK_MODULES(PCREPKG, [libpcre], [
 +				PCRE_LIB=${PCREPKG_LIBS}
 +				CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
-+			], [
++  ], [
 +				AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre])
-+			])
- 		fi
- 
-   if test x"$PCRE_LIB" != x; then
++  ])
++
++  if test x"$PCRE_LIB" != x; then
++    AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
++    AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
++    AC_SUBST(PCRE_LIB)
+   else
+     AC_PATH_PROG([PCRECONFIG], [pcre-config])
+     if test -n "$PCRECONFIG"; then
 -- 
-2.9.3
+2.15.0
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb
deleted file mode 100644
index 08dda33..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb
+++ /dev/null
@@ -1,85 +0,0 @@
-SUMMARY = "Lightweight high-performance web server"
-HOMEPAGE = "http://www.lighttpd.net/"
-BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
-
-SECTION = "net"
-RDEPENDS_${PN} = "lighttpd-module-dirlisting \
-                  lighttpd-module-indexfile \
-                  lighttpd-module-staticfile"
-RRECOMMENDS_${PN} = "lighttpd-module-access \
-                     lighttpd-module-accesslog"
-
-SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
-        file://index.html.lighttpd \
-        file://lighttpd.conf \
-        file://lighttpd \
-        file://lighttpd.service \
-        file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
-        "
-
-SRC_URI[md5sum] = "a128e1eda76899ce3fd115efae5fe631"
-SRC_URI[sha256sum] = "1c97225deea33eefba6d4158c2cef27913d47553263516bbe9d2e2760fc43a3f"
-
-PACKAGECONFIG ??= "openssl pcre zlib \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
-PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
-PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
-PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
-PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
-PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
-PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
-PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
-PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
-PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
-
-EXTRA_OECONF += "--enable-lfs"
-
-inherit autotools pkgconfig update-rc.d gettext systemd
-
-INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "lighttpd.service"
-
-do_install_append() {
-	install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
-	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
-	install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
-	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
-
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@SBINDIR@,${sbindir},g' \
-		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-		-e 's,@BASE_BINDIR@,${base_bindir},g' \
-		${D}${systemd_unitdir}/system/lighttpd.service
-	#For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
-	ln -sf ${localstatedir}/log ${D}/www/logs
-	ln -sf ${localstatedir}/tmp ${D}/www/var
-}
-
-FILES_${PN} += "${sysconfdir} /www"
-
-CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
-
-PACKAGES_DYNAMIC += "^lighttpd-module-.*"
-
-python populate_packages_prepend () {
-    lighttpd_libdir = d.expand('${libdir}')
-    do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb
new file mode 100644
index 0000000..3c4444c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb
@@ -0,0 +1,85 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+SECTION = "net"
+RDEPENDS_${PN} = "lighttpd-module-dirlisting \
+                  lighttpd-module-indexfile \
+                  lighttpd-module-staticfile"
+RRECOMMENDS_${PN} = "lighttpd-module-access \
+                     lighttpd-module-accesslog"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
+        file://index.html.lighttpd \
+        file://lighttpd.conf \
+        file://lighttpd \
+        file://lighttpd.service \
+        file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
+        "
+
+SRC_URI[md5sum] = "1e3a9eb5078f481e3a8a1d0aaac8c3c8"
+SRC_URI[sha256sum] = "0f8ad5aac7529d7b948b9d7e8cd0b4a9e177309d85d6bf6516e28e6e40d74f36"
+
+PACKAGECONFIG ??= "openssl pcre zlib \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
+PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
+PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
+PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
+PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
+PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
+PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
+PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
+PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
+PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
+PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
+
+EXTRA_OECONF += "--enable-lfs"
+
+inherit autotools pkgconfig update-rc.d gettext systemd
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE_${PN} = "lighttpd.service"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
+	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+	install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' \
+		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+		-e 's,@BASE_BINDIR@,${base_bindir},g' \
+		${D}${systemd_unitdir}/system/lighttpd.service
+	#For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
+	ln -sf ${localstatedir}/log ${D}/www/logs
+	ln -sf ${localstatedir}/tmp ${D}/www/var
+}
+
+FILES_${PN} += "${sysconfdir} /www"
+
+CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
+
+PACKAGES_DYNAMIC += "^lighttpd-module-.*"
+
+python populate_packages_prepend () {
+    lighttpd_libdir = d.expand('${libdir}')
+    do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.12.3.bb b/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.12.3.bb
deleted file mode 100644
index 620b208..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.12.3.bb
+++ /dev/null
@@ -1,85 +0,0 @@
-SUMMARY = "Rotates, compresses, removes and mails system log files"
-SECTION = "console/utils"
-HOMEPAGE = "https://github.com/logrotate/logrotate/issues"
-LICENSE = "GPLv2"
-
-# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
-
-DEPENDS="coreutils popt"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-# When updating logrotate to latest upstream, SRC_URI should point to
-# a proper release tarball from https://github.com/logrotate/logrotate/releases
-# and we have to take the snapshot for now because there is no such
-# tarball available for 3.9.1.
-
-S = "${WORKDIR}/${BPN}-${PV}"
-
-UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
-UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
-            file://act-as-mv-when-rotate.patch \
-            file://update-the-manual.patch \
-            file://disable-check-different-filesystems.patch \
-            "
-
-SRC_URI[md5sum] = "a560c57fac87c45b2fc17406cdf79288"
-SRC_URI[sha256sum] = "2e6a401cac9024db2288297e3be1a8ab60e7401ba8e91225218aaf4a27e82a07"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
-
-PACKAGECONFIG[acl] = ",,acl"
-PACKAGECONFIG[selinux] = ",,libselinux"
-
-CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
-		    ${sysconfdir}/logrotate.conf"
-
-# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
-# optimization variables, so use it rather than EXTRA_CFLAGS.
-EXTRA_OEMAKE = "\
-    LFS= \
-    OS_NAME='${OS_NAME}' \
-    'CC=${CC}' \
-    'RPM_OPT_FLAGS=${CFLAGS}' \
-    'EXTRA_LDFLAGS=${LDFLAGS}' \
-    ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
-    ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
-"
-
-# OS_NAME in the makefile defaults to `uname -s`. The behavior for
-# freebsd/netbsd is questionable, so leave it as Linux, which only sets
-# INSTALL=install and BASEDIR=/usr.
-OS_NAME = "Linux"
-
-inherit autotools systemd
-
-SYSTEMD_SERVICE_${PN} = "\
-    ${BPN}.service \
-    ${BPN}.timer \
-"
-
-LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily"
-LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h"
-
-do_install(){
-    oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
-    mkdir -p ${D}${sysconfdir}/logrotate.d
-    mkdir -p ${D}${localstatedir}/lib
-    install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
-    touch ${D}${localstatedir}/lib/logrotate.status
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -d ${D}${systemd_system_unitdir}
-        install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service
-        install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer
-        sed -i -e 's,OnCalendar=.*$,OnCalendar=${LOGROTATE_SYSTEMD_TIMER_BASIS},g' ${D}${systemd_system_unitdir}/logrotate.timer
-        sed -i -e 's,AccuracySec=.*$,AccuracySec=${LOGROTATE_SYSTEMD_TIMER_ACCURACY},g' ${D}${systemd_system_unitdir}/logrotate.timer
-    fi
-
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
-        mkdir -p ${D}${sysconfdir}/cron.daily
-        install -p -m 0755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
-    fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb b/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb
new file mode 100644
index 0000000..990cf91
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb
@@ -0,0 +1,85 @@
+SUMMARY = "Rotates, compresses, removes and mails system log files"
+SECTION = "console/utils"
+HOMEPAGE = "https://github.com/logrotate/logrotate/issues"
+LICENSE = "GPLv2"
+
+# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
+
+DEPENDS="coreutils popt"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+# When updating logrotate to latest upstream, SRC_URI should point to
+# a proper release tarball from https://github.com/logrotate/logrotate/releases
+# and we have to take the snapshot for now because there is no such
+# tarball available for 3.9.1.
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
+UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+            file://act-as-mv-when-rotate.patch \
+            file://update-the-manual.patch \
+            file://disable-check-different-filesystems.patch \
+            "
+
+SRC_URI[md5sum] = "78ef24d6fddcc4df8e412dd75c551b4c"
+SRC_URI[sha256sum] = "3222ca032f99be8d7a4a8c6ad69f3dcc49b9511bfe384bd5a271ebcd9bd3e52c"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
+
+PACKAGECONFIG[acl] = ",,acl"
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
+		    ${sysconfdir}/logrotate.conf"
+
+# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
+# optimization variables, so use it rather than EXTRA_CFLAGS.
+EXTRA_OEMAKE = "\
+    LFS= \
+    OS_NAME='${OS_NAME}' \
+    'CC=${CC}' \
+    'RPM_OPT_FLAGS=${CFLAGS}' \
+    'EXTRA_LDFLAGS=${LDFLAGS}' \
+    ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
+"
+
+# OS_NAME in the makefile defaults to `uname -s`. The behavior for
+# freebsd/netbsd is questionable, so leave it as Linux, which only sets
+# INSTALL=install and BASEDIR=/usr.
+OS_NAME = "Linux"
+
+inherit autotools systemd
+
+SYSTEMD_SERVICE_${PN} = "\
+    ${BPN}.service \
+    ${BPN}.timer \
+"
+
+LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily"
+LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h"
+
+do_install(){
+    oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
+    mkdir -p ${D}${sysconfdir}/logrotate.d
+    mkdir -p ${D}${localstatedir}/lib
+    install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
+    touch ${D}${localstatedir}/lib/logrotate.status
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service
+        install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer
+        sed -i -e 's,OnCalendar=.*$,OnCalendar=${LOGROTATE_SYSTEMD_TIMER_BASIS},g' ${D}${systemd_system_unitdir}/logrotate.timer
+        sed -i -e 's,AccuracySec=.*$,AccuracySec=${LOGROTATE_SYSTEMD_TIMER_ACCURACY},g' ${D}${systemd_system_unitdir}/logrotate.timer
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        mkdir -p ${D}${sysconfdir}/cron.daily
+        install -p -m 0755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
+    fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
deleted file mode 100644
index 0785610..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
+++ /dev/null
@@ -1,135 +0,0 @@
-SUMMARY = "LSB support for OpenEmbedded"
-SECTION = "console/utils"
-HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
-LICENSE = "GPLv2+"
-PR = "r2"
-
-LSB_CORE = "lsb-core-${TARGET_ARCH}"
-LSB_CORE_x86 = "lsb-core-ia32"
-LSB_CORE_x86-64 = "lsb-core-amd64"
-RPROVIDES_${PN} += "${LSB_CORE}"
-
-# lsb_release needs getopt, lsbinitscripts
-RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt} lsbinitscripts"
-
-LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
-           file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \
-           file://init-functions \
-           file://lsb_killproc \
-           file://lsb_log_message \
-           file://lsb_pidofproc \
-           file://lsb_start_daemon \
-           "
-UPSTREAM_VERSION_UNKNOWN = "1"
-
-SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
-SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
-UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/lsb-release-1.4"
-
-CLEANBROKEN = "1"
-
-do_install() {
-	oe_runmake install prefix=${D}${base_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D}
-
-	# these two dirs are needed by package lsb-dist-checker
-	mkdir -p ${D}${sysconfdir}/opt
-	mkdir -p ${D}${localstatedir}/opt
-
-	mkdir -p ${D}${base_libdir}
-	mkdir -p ${D}${sysconfdir}/lsb-release.d
-	printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
-
-	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
-		printf "core-4.1-ia32" >>  ${D}${sysconfdir}/lsb-release
-	else
-		printf "core-4.1-${TARGET_ARCH}" >>  ${D}${sysconfdir}/lsb-release
-	fi
-	echo "\"" >> ${D}${sysconfdir}/lsb-release
-	echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
-	echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
-	if [ -n "${DISTRO_CODENAME}" ]; then
-		echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
-	fi
-	echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
-
-	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
-		mkdir -p ${D}${sysconfdir}/lsb-release.d
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
-		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
-		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
-	elif [ "${TARGET_ARCH}" = "x86_64" ]; then
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
-		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
-	fi
-	if [ "${TARGET_ARCH}" = "powerpc" ]; then
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
-		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
-	elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
-		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
-		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
-	fi
-}
-
-do_install_append() {
-       install -d ${D}${sysconfdir}/core-lsb
-       for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
-       do
-           install -m 0755 ${WORKDIR}/$i ${D}${sysconfdir}/core-lsb
-       done
-
-       install -d ${D}${nonarch_base_libdir}/lsb
-       install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb
-
-       # create links for LSB test
-       if [ -e ${sbindir}/chkconfig ]; then
-               if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
-                       install -d ${D}${nonarch_libdir}/lsb
-               fi
-               ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
-               ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
-       fi
-
-       if [ "${TARGET_ARCH}" = "x86_64" ]; then
-               if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
-                   lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
-               fi
-	       cd ${D}${base_libdir}
-               ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
-               ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
-       fi
-       if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
-	       cd ${D}${base_libdir}
-               ln -sf ld-linux.so.2 ld-lsb.so.2
-               ln -sf ld-linux.so.2 ld-lsb.so.3
-       fi
-
-       if [ "${TARGET_ARCH}" = "powerpc64" ]; then
-               if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
-                   lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
-               fi
-               cd ${D}${base_libdir}
-               ln -sf ld64.so.1 ld-lsb-ppc64.so.2
-               ln -sf ld64.so.1 ld-lsb-ppc64.so.3
-       fi
-       if [ "${TARGET_ARCH}" = "powerpc" ]; then
-	       cd ${D}${base_libdir}
-               ln -sf ld.so.1 ld-lsb-ppc32.so.2
-               ln -sf ld.so.1 ld-lsb-ppc32.so.3
-       fi
-}
-
-FILES_${PN} += "${@'${base_prefix}/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${base_libdir}' != '${base_prefix}/lib64' else ''} \
-                ${base_libdir} \
-                ${nonarch_libdir}/lsb \
-                ${nonarch_base_libdir}/lsb/* \
-                "
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_5.0.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_5.0.bb
new file mode 100644
index 0000000..df4812e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsb_5.0.bb
@@ -0,0 +1,134 @@
+SUMMARY = "LSB support for OpenEmbedded"
+SECTION = "console/utils"
+HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
+LICENSE = "GPLv2+"
+
+LSB_CORE = "lsb-core-${TARGET_ARCH}"
+LSB_CORE_x86 = "lsb-core-ia32"
+LSB_CORE_x86-64 = "lsb-core-amd64"
+RPROVIDES_${PN} += "${LSB_CORE}"
+
+# lsb_release needs getopt, lsbinitscripts
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt} lsbinitscripts"
+
+LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
+           file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \
+           file://init-functions \
+           file://lsb_killproc \
+           file://lsb_log_message \
+           file://lsb_pidofproc \
+           file://lsb_start_daemon \
+           "
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
+SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
+UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
+
+S = "${WORKDIR}/lsb-release-1.4"
+
+CLEANBROKEN = "1"
+
+do_install() {
+	oe_runmake install prefix=${D}${base_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D}
+
+	# these two dirs are needed by package lsb-dist-checker
+	mkdir -p ${D}${sysconfdir}/opt
+	mkdir -p ${D}${localstatedir}/opt
+
+	mkdir -p ${D}${base_libdir}
+	mkdir -p ${D}${sysconfdir}/lsb-release.d
+	printf "LSB_VERSION=\"core-5.0-noarch:" > ${D}${sysconfdir}/lsb-release
+
+	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
+		printf "core-5.0-ia32" >>  ${D}${sysconfdir}/lsb-release
+	else
+		printf "core-5.0-${TARGET_ARCH}" >>  ${D}${sysconfdir}/lsb-release
+	fi
+	echo "\"" >> ${D}${sysconfdir}/lsb-release
+	echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
+	echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
+	if [ -n "${DISTRO_CODENAME}" ]; then
+		echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
+	fi
+	echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
+
+	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
+		mkdir -p ${D}${sysconfdir}/lsb-release.d
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
+	elif [ "${TARGET_ARCH}" = "x86_64" ]; then
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
+	fi
+	if [ "${TARGET_ARCH}" = "powerpc" ]; then
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
+	elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
+	fi
+}
+
+do_install_append() {
+       install -d ${D}${sysconfdir}/core-lsb
+       for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
+       do
+           install -m 0755 ${WORKDIR}/$i ${D}${sysconfdir}/core-lsb
+       done
+
+       install -d ${D}${nonarch_base_libdir}/lsb
+       install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb
+
+       # create links for LSB test
+       if [ -e ${sbindir}/chkconfig ]; then
+               if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
+                       install -d ${D}${nonarch_libdir}/lsb
+               fi
+               ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
+               ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
+       fi
+
+       if [ "${TARGET_ARCH}" = "x86_64" ]; then
+               if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
+                   lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
+               fi
+	       cd ${D}${base_libdir}
+               ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
+               ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+       fi
+       if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then
+	       cd ${D}${base_libdir}
+               ln -sf ld-linux.so.2 ld-lsb.so.2
+               ln -sf ld-linux.so.2 ld-lsb.so.3
+       fi
+
+       if [ "${TARGET_ARCH}" = "powerpc64" ]; then
+               if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
+                   lnr ${D}${base_libdir} ${D}${base_prefix}/lib64
+               fi
+               cd ${D}${base_libdir}
+               ln -sf ld64.so.1 ld-lsb-ppc64.so.2
+               ln -sf ld64.so.1 ld-lsb-ppc64.so.3
+       fi
+       if [ "${TARGET_ARCH}" = "powerpc" ]; then
+	       cd ${D}${base_libdir}
+               ln -sf ld.so.1 ld-lsb-ppc32.so.2
+               ln -sf ld.so.1 ld-lsb-ppc32.so.3
+       fi
+}
+
+FILES_${PN} += "${@'${base_prefix}/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${base_libdir}' != '${base_prefix}/lib64' else ''} \
+                ${base_libdir} \
+                ${nonarch_libdir}/lsb \
+                ${nonarch_base_libdir}/lsb/* \
+                "
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
index 17c9002..c007645 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
@@ -7,18 +7,15 @@
  rc.d/init.d/functions | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
-index 6850046..11223f7 100644
---- a/rc.d/init.d/functions
-+++ b/rc.d/init.d/functions
-@@ -597,6 +597,6 @@ if [ "$_use_systemctl" = "1" ]; then
- 	fi
+Index: initscripts-9.72/rc.d/init.d/functions
+===================================================================
+--- initscripts-9.72.orig/rc.d/init.d/functions
++++ initscripts-9.72/rc.d/init.d/functions
+@@ -686,6 +686,6 @@ if [ "$_use_systemctl" = "1" ]; then
+     fi
  fi
  
 -strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
 +strstr "$(cat /proc/cmdline)" "rc.debug" && set -x || true
  return 0
-
--- 
-2.1.0
-
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
index 9c58d90..e912daa 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
@@ -1,7 +1,7 @@
-From 57468c5f4e364bdad556604dca09046e1afca929 Mon Sep 17 00:00:00 2001
+From e46b056282c8420f096d5c34d78c00f816788784 Mon Sep 17 00:00:00 2001
 From: Fan Xin <fan.xin@jp.fujitsu.com>
 Date: Mon, 5 Jun 2017 16:26:47 +0900
-Subject: [PATCH] Upstream-Status: Inappropriate [configuration]
+Subject: [PATCH 1/2] Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
 Signed-off-by: Saul Wold <sgw@linux.intel.com>
@@ -10,23 +10,24 @@
 
 Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
 Upstream-Status: Pending
+
 ---
- initscripts-9.72/rc.d/init.d/functions | 2 +-
+ rc.d/init.d/functions | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/initscripts-9.72/rc.d/init.d/functions b/initscripts-9.72/rc.d/init.d/functions
-index 0f627f1..a6aa092 100644
---- a/initscripts-9.72/rc.d/init.d/functions
-+++ b/initscripts-9.72/rc.d/init.d/functions
+diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
+index 2e3da964..1a204dec 100644
+--- a/rc.d/init.d/functions
++++ b/rc.d/init.d/functions
 @@ -59,7 +59,7 @@ systemctl_redirect () {
  [ -z "${COLUMNS:-}" ] && COLUMNS=80
  
  if [ -z "${CONSOLETYPE:-}" ]; then
--    if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then
-+    if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then
+-    if [ -c "/dev/stderr" ] && [ -r "/dev/stderr" ]; then
++    if [ -c "/dev/stderr" ] && [ -r "/dev/stderr" ] && [ -e /sbin/consoletype ]; then
          CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
      else
          CONSOLETYPE="serial"
 -- 
-1.9.1
+2.15.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.72.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.72.bb
deleted file mode 100644
index 2d74a6f..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.72.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "SysV init scripts which are only used in an LSB image"
-HOMEPAGE = "https://wiki.debian.org/LSBInitScripts"
-SECTION = "base"
-LICENSE = "GPLv2"
-DEPENDS = "popt glib-2.0"
-
-RPROVIDES_${PN} += "initd-functions"
-RDEPENDS_${PN} += "util-linux"
-RCONFLICTS_${PN} = "initscripts-functions"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
-
-S="${WORKDIR}/initscripts-${PV}"
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.gz/sha512/b6ed38f9576e9227c2ecf047e2d60e1e872f40d51d13861b0c91dddb282f10f7e6b79706a4d1435d7a57a14a0b73a1b71541cfe44c00e8e03ef96b08de19ec32/initscripts-${PV}.tar.gz \
-           file://functions.patch;striplevel=2 \
-           file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
-          " 
-
-SRC_URI[md5sum] = "d6c798f40dceb117e12126d94cb25a9a"
-SRC_URI[sha256sum] = "1793677bdd1f7ee4cb00878ce43346196374f848a4c8e4559e086040fc7487db"
-
-# Since we are only taking the patched version of functions, no need to
-# configure or compile anything so do not execute these
-do_configure[noexec] = "1" 
-do_compile[noexec] = "1" 
-
-do_install(){
-	install -d ${D}${sysconfdir}/init.d/
-	install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb
new file mode 100644
index 0000000..46edeed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.79.bb
@@ -0,0 +1,32 @@
+SUMMARY = "SysV init scripts which are only used in an LSB image"
+HOMEPAGE = "https://wiki.debian.org/LSBInitScripts"
+SECTION = "base"
+LICENSE = "GPLv2"
+DEPENDS = "popt glib-2.0"
+
+RPROVIDES_${PN} += "initd-functions"
+RDEPENDS_${PN} += "util-linux"
+RCONFLICTS_${PN} = "initscripts-functions"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/fedora-sysv/initscripts \
+           file://functions.patch \
+           file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
+          " 
+SRCREV = "a51c1b4f7dcf55b568b2ee4c2b18078849943469"
+UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)"
+
+SRC_URI[md5sum] = "d6c798f40dceb117e12126d94cb25a9a"
+SRC_URI[sha256sum] = "1793677bdd1f7ee4cb00878ce43346196374f848a4c8e4559e086040fc7487db"
+
+# Since we are only taking the patched version of functions, no need to
+# configure or compile anything so do not execute these
+do_configure[noexec] = "1" 
+do_compile[noexec] = "1" 
+
+do_install(){
+	install -d ${D}${sysconfdir}/init.d/
+	install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
index 0eb2793..073e247 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -60,7 +60,7 @@
 
 PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb"
 
-BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary"
+BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/released-all/binary"
 RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime"
 RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime"
 APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
@@ -98,7 +98,7 @@
 fi
 
 # Official download server list. You can replace them with your own server.
-SERVER_IPADDR="140.211.169.23"
+SERVER_IPADDR="140.211.169.28"
 SERVER_NAME="ftp.linuxfoundation.org"
 
 if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
index 959f931..1a6c116 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
@@ -1,7 +1,7 @@
 LSB_RELEASE="released-5.0"
 LSB_ARCH="lsbarch"
 
-BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm"
+BASE_PACKAGES_LIST="lsb-setup-5.0.0-2.noarch.rpm"
 
 RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-5.0.0.1-1.targetarch.rpm \
 	lsb-tet3-lite-3.7-27.lsb5.targetarch.rpm \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
index 3abcca7..4d47e40 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
@@ -2,7 +2,7 @@
 VERBOSE_LEVEL:   1
 ARCHITECTURE:    targetarch
 USE_INTERNET:    1
-STD_VERSION:     LSB 4.1
+STD_VERSION:     LSB 5.0
 STD_PROFILE:     no
 [cmdchk]
 RUN: 1
@@ -126,15 +126,6 @@
 AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python
 AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results
 
-[qt4-azov]
-RUN: 1
-VERSION: local|*
-
-[qt4-azov|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov
-AUTOREPLY_X11_FONT_PATH: [default]
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results
-
 [xml2-azov]
 RUN: 1
 VERSION: local|*
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb
index 36f52fd..a90c023 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest_1.0.bb
@@ -10,14 +10,13 @@
 		   file://packages_list \
 		   file://session \
 		   "
-RDEPENDS_${PN} = "rpm"
+RDEPENDS_${PN} = "lsb rpm"
 
 S = "${WORKDIR}"
 
 do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 ${S}/LSB_Test.sh ${D}${bindir}
 	install -d  ${D}/opt/lsb-test
+	install -m 0755 ${S}/LSB_Test.sh ${D}/opt/lsb-test/LSB_Test.sh
 	install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
 	install -m 0644 ${S}/session ${D}/opt/lsb-test/session
 	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch
deleted file mode 100644
index 7ec66f8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From ae10245c15a617bd57337981bb42eb36629f9b59 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 8 Feb 2017 15:53:31 +0800
-Subject: [PATCH 01/26] add _GNU_SOURCE to pec_listener.c
-
-In previous patch 0007-replace-SIGCLD-with-SIGCHLD.patch made by Khem Raj
-contains two aspects:
-
-	1. replace SIGCLD with SIGCHLD
-	2. add _GNU_SOURCE to pec_listener.c
-
-The replace SIGCLD with SIGCHLD have been integrated upstream, so make a
-another patch to add _GNU_SOURCE to pec_listener.c comply with Khem Raj's
-previous patch.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-Upstream-Status: Pending
-
-%% original patch: 0001-add-_GNU_SOURCE-to-pec_listener.c.patch
----
- testcases/kernel/connectors/pec/pec_listener.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
-index d11e4dc..b8b5e0d 100644
---- a/testcases/kernel/connectors/pec/pec_listener.c
-+++ b/testcases/kernel/connectors/pec/pec_listener.c
-@@ -20,6 +20,7 @@
- /*                                                                            */
- /******************************************************************************/
- 
-+#define _GNU_SOURCE
- #include <sys/socket.h>
- #include <sys/poll.h>
- #include <sys/types.h>
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
new file mode 100644
index 0000000..da62687
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
@@ -0,0 +1,31 @@
+From 4ace68a6ba501907a0741dba5f5f155e06a74c35 Mon Sep 17 00:00:00 2001
+From: Petr Vorel <pvorel@suse.cz>
+Date: Wed, 7 Feb 2018 11:09:49 +0100
+Subject: [PATCH] configure: Fix default value of --without-numa switch in help
+
+The default value is no.
+
+Fixes: 39a85a1f1 ("configure: add knob to control numa support")
+
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+Upstream-Status: Accepted
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b39a31d..d66ea00 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -86,7 +86,7 @@ fi
+ # Numa
+ AC_ARG_WITH([numa],
+   AC_HELP_STRING([--without-numa],
+-    [without numa support (default=yes)]),
++    [without numa support (default=no)]),
+   [with_numa=no],
+   [with_numa=yes]
+ )
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
new file mode 100644
index 0000000..8aaa287
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
@@ -0,0 +1,50 @@
+From 39a85a1f1e6624f554215ba4b6843d3689a8415e Mon Sep 17 00:00:00 2001
+From: Anders Roxell <anders.roxell@linaro.org>
+Date: Mon, 5 Feb 2018 11:56:04 +0100
+Subject: [PATCH] configure: add knob to control numa support
+
+Allow to disable numa from the top level.
+
+Based on patch:
+http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/ltp?id=4c7873552e13dfdba96afca7562c398d2966ca71
+
+Reported-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+Upstream-Status: Accepted
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 5c8d4ea..b39a31d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -83,6 +83,14 @@ else
+     AC_SUBST([WITH_EXPECT],["no"])
+ fi
+ 
++# Numa
++AC_ARG_WITH([numa],
++  AC_HELP_STRING([--without-numa],
++    [without numa support (default=yes)]),
++  [with_numa=no],
++  [with_numa=yes]
++)
++
+ # Perl
+ AC_ARG_WITH([perl],
+   [AC_HELP_STRING([--with-perl],
+@@ -157,7 +165,9 @@ LTP_CHECK_SELINUX
+ LTP_CHECK_SIGNAL
+ LTP_CHECK_SYSCALL_EVENTFD
+ LTP_CHECK_SYSCALL_MODIFY_LDT
++if test "x$with_numa" = xyes; then
+ LTP_CHECK_SYSCALL_NUMA
++fi
+ LTP_CHECK_SYSCALL_QUOTACTL
+ LTP_CHECK_SYSCALL_SIGNALFD
+ LTP_CHECK_SYSCALL_UNSHARE
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
deleted file mode 100644
index 9865020..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 867ad5d5d64b9b27ee32148027532db0a00f6433 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Thu, 7 Jan 2016 17:33:26 +0000
-Subject: [PATCH 02/32] Add knob to control whether numa support should be
- checked
-
-otherwise undeterministic dependency will be generated
-during build depending upong numa being staged or not
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
----
- m4/ltp-numa.m4 | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
-index 60ae07b..ed7078d 100644
---- a/m4/ltp-numa.m4
-+++ b/m4/ltp-numa.m4
-@@ -24,7 +24,13 @@ dnl ----------------------------
- dnl
- AC_DEFUN([LTP_CHECK_SYSCALL_NUMA],
- [dnl
--AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
-+AC_MSG_CHECKING([for numa])
-+AC_ARG_WITH(
-+	[numa],
-+	AC_HELP_STRING([--without-numa],
-+	[without numa support]),
-+	[],
-+	[AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
- 	LTP_SYSCALL_NUMA_HEADERS=yes
- 	AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
- 	if  test "x$have_numa_alloc_onnode" = "xyes"; then
-@@ -48,3 +54,5 @@ if test "x$have_mpol_constants" = "xyes"; then
- 	AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
- fi
- )])
-+AC_MSG_RESULT([$with_numa])
-+])
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
index cf74463..84ab37e 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
@@ -22,10 +22,10 @@
  testcases/realtime/stress/pi-tests/Makefile | 5 +++++
  8 files changed, 35 insertions(+), 2 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 297f8e7..906b280 100644
---- a/Makefile
-+++ b/Makefile
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
 @@ -49,6 +49,11 @@ SKIP_IDCHECK		?= 0
  UCLINUX			?= 0
  export UCLINUX
@@ -38,11 +38,11 @@
  # CLEAN_TARGETS:	Targets which exist solely in clean.
  # COMMON_TARGETS:	Targets which exist in all, clean, and install.
  # INSTALL_TARGETS:	Targets which exist in clean and install (contains
-diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
-index 50a12fa..4f1987f 100644
---- a/testcases/kernel/Makefile
-+++ b/testcases/kernel/Makefile
-@@ -47,13 +47,16 @@ SUBDIRS			+= connectors \
+Index: git/testcases/kernel/Makefile
+===================================================================
+--- git.orig/testcases/kernel/Makefile
++++ git/testcases/kernel/Makefile
+@@ -48,13 +48,16 @@ SUBDIRS			+= connectors \
  			   logging \
  			   mem \
  			   numa \
@@ -60,10 +60,10 @@
  ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
  SUBDIRS			+= power_management
  endif
-diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
-index 6245ed0..aa4eb7f 100644
---- a/testcases/kernel/sched/Makefile
-+++ b/testcases/kernel/sched/Makefile
+Index: git/testcases/kernel/sched/Makefile
+===================================================================
+--- git.orig/testcases/kernel/sched/Makefile
++++ git/testcases/kernel/sched/Makefile
 @@ -23,5 +23,7 @@
  top_srcdir		?= ../../..
  
@@ -73,11 +73,11 @@
 +	FILTER_OUT_DIRS += process_stress
 +endif
  include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
-index 8acb395..b749126 100644
---- a/testcases/kernel/syscalls/Makefile
-+++ b/testcases/kernel/syscalls/Makefile
-@@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
+Index: git/testcases/kernel/syscalls/Makefile
+===================================================================
+--- git.orig/testcases/kernel/syscalls/Makefile
++++ git/testcases/kernel/syscalls/Makefile
+@@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1)
  FILTER_OUT_DIRS	+= capget capset chmod chown clone fork getcontext llseek \
  		   mincore mprotect nftw profil remap_file_pages sbrk
  endif
@@ -87,12 +87,13 @@
 +		   ustat
 +endif
  
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
-index 8bc78c2..c36cf50 100644
---- a/testcases/network/nfsv4/acl/Makefile
-+++ b/testcases/network/nfsv4/acl/Makefile
-@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
+ ifeq ($(UCLIBC),1)
+ FILTER_OUT_DIRS	+= profil
+Index: git/testcases/network/nfsv4/acl/Makefile
+===================================================================
+--- git.orig/testcases/network/nfsv4/acl/Makefile
++++ git/testcases/network/nfsv4/acl/Makefile
+@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre
  
  LDLIBS			+= $(ACL_LIBS)
  
@@ -101,10 +102,10 @@
 +endif
 +
  include $(top_srcdir)/include/mk/generic_leaf_target.mk
-diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
-index 3160813..9bdf5d0 100644
---- a/testcases/network/rpc/basic_tests/Makefile
-+++ b/testcases/network/rpc/basic_tests/Makefile
+Index: git/testcases/network/rpc/basic_tests/Makefile
+===================================================================
+--- git.orig/testcases/network/rpc/basic_tests/Makefile
++++ git/testcases/network/rpc/basic_tests/Makefile
 @@ -23,4 +23,9 @@
  top_srcdir		?= ../../../..
  
@@ -115,11 +116,11 @@
 +endif
 +
  include $(top_srcdir)/include/mk/generic_trunk_target.mk
-diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
-index 7a7a57a..5808866 100644
---- a/testcases/realtime/func/pi-tests/Makefile
-+++ b/testcases/realtime/func/pi-tests/Makefile
-@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
+Index: git/testcases/realtime/func/pi-tests/Makefile
+===================================================================
+--- git.orig/testcases/realtime/func/pi-tests/Makefile
++++ git/testcases/realtime/func/pi-tests/Makefile
+@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre
  include $(abs_srcdir)/../../config.mk
  
  MAKE_TARGETS		:= testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
@@ -129,10 +130,10 @@
 +
  
  include $(top_srcdir)/include/mk/generic_leaf_target.mk
-diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
-index 5edc3b4..aa5987a 100644
---- a/testcases/realtime/stress/pi-tests/Makefile
-+++ b/testcases/realtime/stress/pi-tests/Makefile
+Index: git/testcases/realtime/stress/pi-tests/Makefile
+===================================================================
+--- git.orig/testcases/realtime/stress/pi-tests/Makefile
++++ git/testcases/realtime/stress/pi-tests/Makefile
 @@ -24,4 +24,9 @@ top_srcdir		?= ../../../..
  
  include $(top_srcdir)/include/mk/env_pre.mk
@@ -143,6 +144,3 @@
 +endif
 +
  include $(top_srcdir)/include/mk/generic_leaf_target.mk
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
deleted file mode 100644
index 25f6ba7..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From dc1905b6d972f9176b40da270c83d8fb4d1751b5 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 8 Feb 2017 16:12:34 +0800
-Subject: [PATCH 2/5] Rename sigset variable to sigset1
-
-sigset API from signal.h is shadowed by this name conflict
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- testcases/kernel/mem/shmt/shmt04.c                    | 10 +++++-----
- testcases/kernel/mem/shmt/shmt06.c                    | 10 +++++-----
- testcases/kernel/syscalls/sigprocmask/sigprocmask01.c | 10 +++++-----
- 3 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
-index b2682da..3f35fad 100644
---- a/testcases/kernel/mem/shmt/shmt04.c
-+++ b/testcases/kernel/mem/shmt/shmt04.c
-@@ -56,7 +56,7 @@ int TST_TOTAL = 2;		/* Total number of test cases. */
- /**************/
- 
- key_t key;
--sigset_t set;
-+sigset_t set1;
- 
- #define  SIZE  16*1024
- 
-@@ -71,9 +71,9 @@ int main(void)
- 
- 	key = (key_t) getpid();
- 
--	sigemptyset(&set);
--	sigaddset(&set, SIGUSR1);
--	sigprocmask(SIG_BLOCK, &set, NULL);
-+	sigemptyset(&set1);
-+	sigaddset(&set1, SIGUSR1);
-+	sigprocmask(SIG_BLOCK, &set1, NULL);
- 
- 	pid = fork();
- 	switch (pid) {
-@@ -148,7 +148,7 @@ int child(void)
- 	char *cp;
- 	int sig;
- 
--	sigwait(&set, &sig);
-+	sigwait(&set1, &sig);
- 	chld_pid = getpid();
- /*--------------------------------------------------------*/
- 
-diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
-index dd69de7..56fb1da 100644
---- a/testcases/kernel/mem/shmt/shmt06.c
-+++ b/testcases/kernel/mem/shmt/shmt06.c
-@@ -57,7 +57,7 @@ int TST_TOTAL = 2;		/* Total number of test cases. */
- /**************/
- 
- key_t key;
--sigset_t set;
-+sigset_t set1;
- 
- int child();
- static int rm_shm(int);
-@@ -70,9 +70,9 @@ int main(void)
- 
- 	key = (key_t) getpid();
- 
--	sigemptyset(&set);
--	sigaddset(&set, SIGUSR1);
--	sigprocmask(SIG_BLOCK, &set, NULL);
-+	sigemptyset(&set1);
-+	sigaddset(&set1, SIGUSR1);
-+	sigprocmask(SIG_BLOCK, &set1, NULL);
- 
- 	pid = fork();
- 	switch (pid) {
-@@ -147,7 +147,7 @@ int child(void)
- 	char *cp;
- 	int sig;
- 
--	sigwait(&set, &sig);
-+	sigwait(&set1, &sig);
- 	chld_pid = getpid();
- 
- 	if ((shmid = shmget(key, SIZE, 0)) < 0) {
-diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-index 232d25a..06d902f 100644
---- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-+++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-@@ -91,7 +91,7 @@ int TST_TOTAL = 1;
- int sig_catch = 0;		/* variable to blocked/unblocked signals */
- 
- struct sigaction sa_new;	/* struct to hold signal info */
--sigset_t set;		/* signal set to hold signal lists */
-+sigset_t set1;		/* signal set to hold signal lists */
- sigset_t sigset2;
- 
- int main(int ac, char **av)
-@@ -112,7 +112,7 @@ int main(int ac, char **av)
- 		 * so that, signal will not be delivered to
- 		 * the test process.
- 		 */
--		TEST(sigprocmask(SIG_BLOCK, &set, 0));
-+		TEST(sigprocmask(SIG_BLOCK, &set1, 0));
- 
- 		/* Get the process id of test process */
- 		my_pid = getpid();
-@@ -165,7 +165,7 @@ int main(int ac, char **av)
- 				 */
- 				errno = 0;
- 				if (sigprocmask(SIG_UNBLOCK,
--						&set, 0) == -1) {
-+						&set1, 0) == -1) {
- 					tst_brkm(TFAIL, cleanup,
- 						 "sigprocmask() failed "
- 						 "to unblock signal, "
-@@ -212,7 +212,7 @@ void setup(void)
- 	 * Initialise the signal sets with the list that
- 	 * excludes/includes  all system-defined signals.
- 	 */
--	if (sigemptyset(&set) == -1) {
-+	if (sigemptyset(&set1) == -1) {
- 		tst_brkm(TFAIL, cleanup,
- 			 "sigemptyset() failed, errno=%d : %s",
- 			 errno, strerror(errno));
-@@ -235,7 +235,7 @@ void setup(void)
- 	 * Add specified signal (SIGINT) to the signal set
- 	 * which excludes system-defined signals.
- 	 */
--	if (sigaddset(&set, SIGINT) == -1) {
-+	if (sigaddset(&set1, SIGINT) == -1) {
- 		tst_brkm(TFAIL, cleanup,
- 			 "sigaddset() failed, errno=%d : %s",
- 			 errno, strerror(errno));
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
index 3e79c9f..462976d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
@@ -18,10 +18,10 @@
  testcases/kernel/syscalls/mremap/mremap03.c | 2 ++
  3 files changed, 7 insertions(+), 1 deletion(-)
 
-diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
-index d63d1e4..24ca174 100644
---- a/testcases/kernel/syscalls/mremap/mremap01.c
-+++ b/testcases/kernel/syscalls/mremap/mremap01.c
+Index: git/testcases/kernel/syscalls/mremap/mremap01.c
+===================================================================
+--- git.orig/testcases/kernel/syscalls/mremap/mremap01.c
++++ git/testcases/kernel/syscalls/mremap/mremap01.c
 @@ -76,10 +76,12 @@
   */
  #include <unistd.h>
@@ -35,11 +35,11 @@
 +#undef _GNU_SOURCE
  
  #include "test.h"
- 
-diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c
-index 5a51b9a..a530a6b 100644
---- a/testcases/kernel/syscalls/mremap/mremap02.c
-+++ b/testcases/kernel/syscalls/mremap/mremap02.c
+ #include "safe_macros.h"
+Index: git/testcases/kernel/syscalls/mremap/mremap02.c
+===================================================================
+--- git.orig/testcases/kernel/syscalls/mremap/mremap02.c
++++ git/testcases/kernel/syscalls/mremap/mremap02.c
 @@ -75,9 +75,11 @@
  #include <errno.h>
  #include <unistd.h>
@@ -52,10 +52,10 @@
  
  #include "test.h"
  
-diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
-index 12e3829..9b39f8b 100644
---- a/testcases/kernel/syscalls/mremap/mremap03.c
-+++ b/testcases/kernel/syscalls/mremap/mremap03.c
+Index: git/testcases/kernel/syscalls/mremap/mremap03.c
+===================================================================
+--- git.orig/testcases/kernel/syscalls/mremap/mremap03.c
++++ git/testcases/kernel/syscalls/mremap/mremap03.c
 @@ -76,9 +76,11 @@
  #include <errno.h>
  #include <unistd.h>
@@ -68,6 +68,3 @@
  
  #include "test.h"
  
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
deleted file mode 100644
index afcba63..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9d14edfc12eefac900dd54729a88b3ccf91c1c43 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:18:15 +0000
-Subject: [PATCH 25/32] mc_gethost: include sys/types.h
-
-Fix build on musl
-error: unknown type name 'u_char'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- testcases/network/multicast/mc_gethost/mc_gethost.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
-index 5b9a790..c799e2a 100644
---- a/testcases/network/multicast/mc_gethost/mc_gethost.c
-+++ b/testcases/network/multicast/mc_gethost/mc_gethost.c
-@@ -6,6 +6,7 @@
- 
- #include <sys/param.h>
- #include <sys/socket.h>
-+#include <sys/types.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <arpa/nameser.h>
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
deleted file mode 100644
index adf6f27..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1471012164ba8f26046d4b1ce5531a0d92805ef5 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 8 Feb 2017 16:21:16 +0800
-Subject: [PATCH 4/5] sysconf01: Use _SC_2_C_VERSION conditionally
-
-_SC_2_C_VERSION is not available on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
-index 583deef..de93695 100644
---- a/testcases/kernel/syscalls/sysconf/sysconf01.c
-+++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
-@@ -103,7 +103,9 @@ int main(void)
- 	test_sysconf(_SC_2_C_BIND);
- 	test_sysconf(_SC_2_C_DEV);
- #ifdef _SC_2_C_VERSION
-+#ifdef __GLIBC__
- 	test_sysconf(_SC_2_C_VERSION);
-+#endif
- #else
- 	tst_resm(TCONF, "_SC_2_C_VERSION not defined");
- #endif
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
deleted file mode 100644
index efa6d06..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 00ba7cdd0608b1507027428f9f87b1cb9747372b Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 9 Feb 2017 15:54:53 +0800
-Subject: [PATCH] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc
-
-e.g. musl does not implement the _NP mutex types
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- lib/tst_res.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lib/tst_res.c b/lib/tst_res.c
-index 61daaeb..435224f 100644
---- a/lib/tst_res.c
-+++ b/lib/tst_res.c
-@@ -79,7 +79,11 @@ int TEST_ERRNO;
- 	assert(strlen(buf) > 0);		\
- } while (0)
- 
-+#ifdef __GLIBC__
- static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-+#else
-+static pthread_mutex_t tmutex = {  PTHREAD_MUTEX_RECURSIVE };
-+#endif
- 
- static void check_env(void);
- static void tst_condense(int tnum, int ttype, const char *tmesg);
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
deleted file mode 100644
index 868e1cf..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e3dea669e5b0b769f322d54a3bb9f320b5327da Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Mar 2016 15:47:14 +0000
-Subject: [PATCH 26/26] shmat1: Cover GNU specific code under __USE_GNU
-
-on x86, we use uc_mcontext element from sigcontext
-which is marked gnu-specific in glibc, this patch
-adds this condition around the code
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- testcases/kernel/mem/mtest06/shmat1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
-index 0d6d7a4..bee69f6 100644
---- a/testcases/kernel/mem/mtest06/shmat1.c
-+++ b/testcases/kernel/mem/mtest06/shmat1.c
-@@ -111,7 +111,7 @@ int done_shmat = 0;		/* disallow read and writes before shmat      */
- static void sig_handler(int signal,	/* signal number, set to handle SIGALRM       */
- 			int code, struct ucontext *ut)
- {				/* contains pointer to sigcontext structure   */
--#ifdef __i386__
-+#if defined(__i386__) && defined(__USE_GNU)
- 	unsigned long except;	/* exception type.                            */
- 	int ret = 0;		/* exit code from signal handler.             */
- 	struct sigcontext *scp =	/* pointer to sigcontext structure            */
-@@ -122,7 +122,7 @@ static void sig_handler(int signal,	/* signal number, set to handle SIGALRM
- 		fprintf(stdout, "Test ended, success\n");
- 		exit(0);
- 	}
--#ifdef __i386__
-+#if defined(__i386__) && defined(__USE_GNU)
- 	else {
- 		except = scp->trapno;
- 		fprintf(stderr, "signal caught - [%d] ", signal);
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch
deleted file mode 100644
index c8738ae..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From a9d5595d2fa2ab252f1cabf63f4b65c3efbafeb9 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 10 Aug 2017 15:27:03 +0800
-Subject: [PATCH] ltp: fix PAGE_SIZE redefinition and O_CREAT undeclear when
- build with musl
-
-error 1:
-
-|stack_clash.c:50:22: error: expected identifier or '(' before numeric constant
-| static unsigned long PAGE_SIZE;
-
-This is because the musl libc already contain PAGE_SIZE definition in limits.c,
-we can check it here:
-
-    https://git.musl-libc.org/cgit/musl/tree/include/limits.h#n43
-
-error 2:
-
-|ck01.c:157:22: error: 'O_CREAT' undeclared (first use in this function); did you mean 'S_IREAD'?
-|   fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, 0644);
-|                       ^~~~~~~
-|                       S_IREAD
-
-This is because the musl libc put those in fcntl.h, so we should include that
-file.
-
-Upstream-Status: Submitted [ https://github.com/linux-test-project/ltp/pull/194 ]
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- testcases/cve/stack_clash.c               | 12 ++++++------
- testcases/kernel/syscalls/flock/flock01.c |  1 +
- testcases/kernel/syscalls/flock/flock02.c |  1 +
- 3 files changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/testcases/cve/stack_clash.c b/testcases/cve/stack_clash.c
-index 2ef1a82..7c45991 100644
---- a/testcases/cve/stack_clash.c
-+++ b/testcases/cve/stack_clash.c
-@@ -47,7 +47,7 @@
- #include "tst_test.h"
- #include "tst_safe_stdio.h"
- 
--static unsigned long PAGE_SIZE;
-+static unsigned long PAGE_SIZE_tst;
- static unsigned long PAGE_MASK;
- static unsigned long GAP_PAGES = 256;
- static unsigned long THRESHOLD;
-@@ -66,7 +66,7 @@ void exhaust_stack_into_sigsegv(void)
- 	exhaust_stack_into_sigsegv();
- }
- 
--#define MAPPED_LEN PAGE_SIZE
-+#define MAPPED_LEN PAGE_SIZE_tst
- static unsigned long mapped_addr;
- 
- void segv_handler(int sig, siginfo_t *info, void *data LTP_ATTRIBUTE_UNUSED)
-@@ -150,7 +150,7 @@ void do_child(void)
- 	stack_t signal_stack;
- 	struct sigaction segv_sig = {.sa_sigaction = segv_handler, .sa_flags = SA_ONSTACK|SA_SIGINFO};
- 	void *map;
--	unsigned long gap = GAP_PAGES * PAGE_SIZE;
-+	unsigned long gap = GAP_PAGES * PAGE_SIZE_tst;
- 	struct rlimit rlimit;
- 
- 	rlimit.rlim_cur = rlimit.rlim_max = RLIM_INFINITY;
-@@ -200,8 +200,8 @@ void setup(void)
- {
- 	char buf[4096], *p;
- 
--	PAGE_SIZE = sysconf(_SC_PAGESIZE);
--	PAGE_MASK = ~(PAGE_SIZE - 1);
-+	PAGE_SIZE_tst = sysconf(_SC_PAGESIZE);
-+	PAGE_MASK = ~(PAGE_SIZE_tst - 1);
- 
- 	buf[4095] = '\0';
- 	SAFE_FILE_SCANF("/proc/cmdline", "%4095[^\n]", buf);
-@@ -214,7 +214,7 @@ void setup(void)
- 		tst_res(TINFO, "stack_guard_gap = %ld", GAP_PAGES);
- 	}
- 
--	THRESHOLD = (GAP_PAGES - 1) * PAGE_SIZE;
-+	THRESHOLD = (GAP_PAGES - 1) * PAGE_SIZE_tst;
- 
- 	{
- 		volatile int *a = alloca(128);
-diff --git a/testcases/kernel/syscalls/flock/flock01.c b/testcases/kernel/syscalls/flock/flock01.c
-index 3e17be4..06d89e3 100644
---- a/testcases/kernel/syscalls/flock/flock01.c
-+++ b/testcases/kernel/syscalls/flock/flock01.c
-@@ -69,6 +69,7 @@
- #include <stdio.h>
- #include <sys/wait.h>
- #include <sys/file.h>
-+#include <fcntl.h>
- #include "test.h"
- 
- void setup(void);
-diff --git a/testcases/kernel/syscalls/flock/flock02.c b/testcases/kernel/syscalls/flock/flock02.c
-index 414df68..9ddf729 100644
---- a/testcases/kernel/syscalls/flock/flock02.c
-+++ b/testcases/kernel/syscalls/flock/flock02.c
-@@ -75,6 +75,7 @@
- #include <sys/types.h>
- #include <sys/file.h>
- #include <sys/wait.h>
-+#include <fcntl.h>
- #include <errno.h>
- #include <stdio.h>
- #include "test.h"
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch
deleted file mode 100644
index f7c0a4b..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0 Mon Sep 17 00:00:00 2001
-From: Jan Stancek <jstancek@redhat.com>
-Date: Mon, 11 Sep 2017 12:57:58 +0200
-Subject: [PATCH] commands/gdb01: replace stdin with /dev/null
-
-If this testcase runs as background process, gdb can receive
-SIGTTOU and then testcase gets stuck.
-
-Signed-off-by: Jan Stancek <jstancek@redhat.com>
-
-Upstream-Status: Backport
-[https://github.com/linux-test-project/ltp/commit/2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0]
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- testcases/commands/gdb/gdb01.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/commands/gdb/gdb01.sh b/testcases/commands/gdb/gdb01.sh
-index 07ae36f..e3a5b51 100755
---- a/testcases/commands/gdb/gdb01.sh
-+++ b/testcases/commands/gdb/gdb01.sh
-@@ -29,7 +29,7 @@ TST_NEEDS_CMDS="gdb /bin/cat"
- 
- simple_test()
- {
--	gdb /bin/cat -ex "run /etc/passwd" -ex quit
-+	gdb /bin/cat -ex "run /etc/passwd" -ex quit < /dev/null
- 	RC=$?
- 	if [ $RC -eq 0 ] ; then
- 		tst_res TPASS "gdb attached to process and completed run"
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
new file mode 100644
index 0000000..e7c927e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
@@ -0,0 +1,252 @@
+From 04da9478887e705ea38e4f097492da20e651686c Mon Sep 17 00:00:00 2001
+From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+Date: Wed, 13 Sep 2017 15:48:42 +0800
+Subject: [PATCH] commands/ar01: Fix for test in deterministic mode
+
+If binutils was configured with --enable-deterministic-archives,
+ar will run in deterministic mode by default, and use zero for
+timestamps and uids/gids, which makes the test case abnormal.
+
+Fix this by add the "U" modifier when deterministic mode is default.
+
+Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+Signed-off-by: Fei Jie <feij.fnst@cn.fujitsu.com>
+
+Upstream-Status: Backport
+[http://lists.linux.it/pipermail/ltp/2017-September/005668.html]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/commands/ar/ar01 | 92 ++++++++++++++++++++++++++--------------------
+ 1 file changed, 52 insertions(+), 40 deletions(-)
+
+diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01
+index ddab2e0..d688f76 100644
+--- a/testcases/commands/ar/ar01
++++ b/testcases/commands/ar/ar01
+@@ -23,14 +23,26 @@
+ # This is a basic ar command test.
+ #
+ TST_CNT=17
++TST_SETUP=setup
+ TST_TESTFUNC=test
+ TST_NEEDS_TMPDIR=1
+ . tst_test.sh
+ 
++setup()
++{
++	ar --help | grep "use zero for timestamps and uids/gids (default)" \
++		>/dev/null
++	if [ $? -eq 0 ]; then
++		MOD="U"
++	else
++		MOD=""
++	fi
++}
++
+ test1()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+-	ROD ar -ra file1.in lib.a $TST_DATAROOT/file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++	ROD ar -ra"$MOD" file1.in lib.a $TST_DATAROOT/file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -47,9 +59,9 @@ test1()
+ 
+ test2()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-		         $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
+-	ROD ar -ma file1.in lib.a file4.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
++	ROD ar -ma"$MOD" file1.in lib.a file4.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -66,8 +78,8 @@ test2()
+ 
+ test3()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+-	ROD ar -rb file3.in lib.a $TST_DATAROOT/file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++	ROD ar -rb"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -84,9 +96,9 @@ test3()
+ 
+ test4()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+-	                 $TST_DATAROOT/file2.in
+-	ROD ar -mb file3.in lib.a file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++			       $TST_DATAROOT/file2.in
++	ROD ar -mb"$MOD" file3.in lib.a file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -103,7 +115,7 @@ test4()
+ 
+ test5()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
+ 
+ 	if [ -s ar.out ]; then
+ 		tst_res TFAIL "ar produced output unexpectedly (-c)"
+@@ -117,7 +129,7 @@ test5()
+ 
+ test6()
+ {
+-	ROD ar -qc lib.a $TST_DATAROOT/file1.in \> ar.out
++	ROD ar -qc"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
+ 
+ 	if [ -s ar.out ]; then
+ 		tst_res TFAIL "ar produced output unexpectedly (-qc)"
+@@ -131,9 +143,9 @@ test6()
+ 
+ test7()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -d lib.a file1.in file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -d"$MOD" lib.a file1.in file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file3.in\n" > ar.exp
+@@ -150,9 +162,9 @@ test7()
+ 
+ test8()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -d lib.a
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -d"$MOD" lib.a
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -169,8 +181,8 @@ test8()
+ 
+ test9()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+-	ROD ar -ri file3.in lib.a $TST_DATAROOT/file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++	ROD ar -ri"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -187,9 +199,9 @@ test9()
+ 
+ test10()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+-	                 $TST_DATAROOT/file2.in
+-	ROD ar -mi file3.in lib.a file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++			       $TST_DATAROOT/file2.in
++	ROD ar -mi"$MOD" file3.in lib.a file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -206,9 +218,9 @@ test10()
+ 
+ test11()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+-	                 $TST_DATAROOT/file2.in
+-	ROD ar -m lib.a file3.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++			       $TST_DATAROOT/file2.in
++	ROD ar -m"$MOD" lib.a file3.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -225,9 +237,9 @@ test11()
+ 
+ test12()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -p lib.a \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -p"$MOD" lib.a \> ar.out
+ 
+ 	printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp
+ 
+@@ -244,9 +256,9 @@ test12()
+ test13()
+ {
+ 
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -q lib.a $TST_DATAROOT/file4.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -q"$MOD" lib.a $TST_DATAROOT/file4.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp
+@@ -264,14 +276,14 @@ test13()
+ test14()
+ {
+ 	ROD touch file0.in
+-	ROD ar -cr lib.a file0.in $TST_DATAROOT/file1.in
++	ROD ar -cr"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
+ 
+ 	file0_mtime1=$(ar -tv lib.a | grep file0.in)
+ 	file1_mtime1=$(ar -tv lib.a | grep file1.in)
+ 
+ 	touch -c -t $(date --date='next day' +"%Y%m%d%H%M") file0.in
+ 
+-	ROD ar -ru lib.a file0.in $TST_DATAROOT/file1.in
++	ROD ar -ru"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
+ 
+ 	file0_mtime2=$(ar -tv lib.a | grep file0.in)
+ 	file1_mtime2=$(ar -tv lib.a | grep file1.in)
+@@ -293,7 +305,7 @@ test14()
+ 
+ test15()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in
+ 	ROD ar -tv lib.a \> ar.out
+ 
+ 	if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then
+@@ -308,9 +320,9 @@ test15()
+ 
+ test16()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -xv lib.a \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -xv"$MOD" lib.a \> ar.out
+ 
+ 	printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp
+ 
+@@ -332,8 +344,8 @@ test16()
+ 
+ test17()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
+-	ROD ar -xv lib.a file2.in \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
++	ROD ar -xv"$MOD" lib.a file2.in \> ar.out
+ 
+ 	printf "x - file2.in\n" > ar.exp
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch
new file mode 100644
index 0000000..5096a85
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch
@@ -0,0 +1,40 @@
+From 67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d Mon Sep 17 00:00:00 2001
+From: Li Wang <liwang@redhat.com>
+Date: Tue, 23 Jan 2018 17:46:35 +0800
+Subject: [PATCH] safe_macros: make is_fuse() return zero if fs_type is NULL
+
+This commmit 28507e514c(safe_mount: Do not try mount() syscall for FUSE fs)
+involves FUSE fs check in safe_mount(), but we'd better guarantee the "fs_type"
+is legal to check in is_fuse() function otherwise system will kill the program.
+
+  cmdline="fanotify06"
+  contacts=""
+  analysis=exit
+  <<<test_output>>>
+  tst_test.c:980: INFO: Timeout per run is 0h 10m 00s
+  tst_test.c:1025: BROK: Test killed by SIGSEGV!
+
+Signed-off-by: Li Wang <liwang@redhat.com>
+Acked-by: Jan Stancek <jstancek@redhat.com>
+Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/commit/67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d]
+---
+ lib/safe_macros.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/safe_macros.c b/lib/safe_macros.c
+index c48e436dc..abdeca013 100644
+--- a/lib/safe_macros.c
++++ b/lib/safe_macros.c
+@@ -708,6 +708,9 @@ static int is_fuse(const char *fs_type)
+ {
+ 	unsigned int i;
+ 
++	if (!fs_type)
++		return 0;
++
+ 	for (i = 0; i < ARRAY_SIZE(fuse_fs_types); i++) {
+ 		if (!strcmp(fuse_fs_types[i], fs_type))
+ 			return 1;
+-- 
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20170516.bb b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20170516.bb
deleted file mode 100644
index 653cbfd..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20170516.bb
+++ /dev/null
@@ -1,123 +0,0 @@
-SUMMARY = "Linux Test Project"
-DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
-HOMEPAGE = "http://ltp.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
-LIC_FILES_CHKSUM = "\
-    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-    file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
-    file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
-    file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
-    file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
-    file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \
-    file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
-    file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-    file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-    file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
-"
-
-DEPENDS = "attr libaio libcap acl openssl zip-native"
-DEPENDS_append_libc-musl = " fts "
-EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
-CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
-SRCREV = "18916a2e6d8c997b7b29dcfa9550d5a15b22ed22"
-
-SRC_URI = "git://github.com/linux-test-project/ltp.git \
-           file://0001-add-_GNU_SOURCE-to-pec_listener.c.patch \
-           file://0002-Add-knob-to-control-whether-numa-support-should-be-c.patch \
-           file://0003-Add-knob-to-control-tirpc-support.patch \
-           file://0004-build-Add-option-to-select-libc-implementation.patch \
-           file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
-           file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \
-           file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
-           file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \
-           file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
-           file://0011-Rename-sigset-variable-to-sigset1.patch \
-           file://0018-guard-mallocopt-with-__GLIBC__.patch \
-           file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
-           file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
-           file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
-           file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
-           file://0025-mc_gethost-include-sys-types.h.patch \
-           file://0026-crash01-Define-_GNU_SOURCE.patch \
-           file://0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch \
-           file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
-           file://0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch \
-           file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
-           file://0034-periodic_output.patch \
-           file://0035-fix-test_proc_kill-hang.patch \
-           file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
-           file://0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch \
-           file://0038-commands-gdb01-replace-stdin-with-dev-null.patch \
-           "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-export prefix = "/opt/ltp"
-export exec_prefix = "/opt/ltp"
-
-PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
-EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
-EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
-# ltp network/rpc test cases ftbfs when libtirpc is found
-EXTRA_OECONF += " --without-tirpc "
-
-do_install(){
-    install -d ${D}/opt/ltp/
-    oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
-
-    # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run
-    # as it lacks dependency on some perl moudle such as LWP::Simple
-    # And this script previously works as a tool for analyzing failures from LTP
-    # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses
-    # http://khack.osdl.org to retrieve ltp test results run on
-    # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
-    rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
-
-    # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
-    cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
-}
-
-RDEPENDS_${PN} = "\
-    acl \
-    at \
-    attr \
-    bash \
-    cpio \
-    cronie \
-    curl \
-    e2fsprogs-mke2fs \
-    expect \
-    gawk \
-    gzip \
-    iproute2 \
-    ldd \
-    libaio \
-    logrotate \
-    perl \
-    python-core \
-    unzip \
-    util-linux \
-    which \
-"
-
-FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a /opt/ltp/testcases/data/nm01/lib.a"
-
-FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*"
-
-# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-# However, test_arch_stripped is already stripped, so...
-INSANE_SKIP_${PN} += "already-stripped"
-
-# Avoid file dependency scans, as LTP checks for things that may or may not
-# exist on the running system.  For instance it has specific checks for
-# csh and ksh which are not typically part of OpenEmbedded systems (but
-# can be added via additional layers.)
-SKIP_FILEDEPS_${PN} = '1'
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20180118.bb b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20180118.bb
new file mode 100644
index 0000000..14fb41b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20180118.bb
@@ -0,0 +1,116 @@
+SUMMARY = "Linux Test Project"
+DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
+HOMEPAGE = "http://ltp.sourceforge.net"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
+LIC_FILES_CHKSUM = "\
+    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+    file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
+    file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+    file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+    file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \
+    file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+    file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+    file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+    file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
+"
+
+DEPENDS = "attr libaio libcap acl openssl zip-native"
+DEPENDS_append_libc-musl = " fts "
+EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
+CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
+SRCREV = "731cd34e682d297b207668be8b1d15320a9ac1b1"
+
+SRC_URI = "git://github.com/linux-test-project/ltp.git \
+           file://0001-configure-add-knob-to-control-numa-support.patch \
+           file://0001-configure-Fix-default-value-of-without-numa-switch-i.patch \
+           file://0003-Add-knob-to-control-tirpc-support.patch \
+           file://0004-build-Add-option-to-select-libc-implementation.patch \
+           file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
+           file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \
+           file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
+           file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \
+           file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+           file://0018-guard-mallocopt-with-__GLIBC__.patch \
+           file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
+           file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
+           file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
+           file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
+           file://0026-crash01-Define-_GNU_SOURCE.patch \
+           file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
+           file://0034-periodic_output.patch \
+           file://0035-fix-test_proc_kill-hang.patch \
+           file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
+           file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \
+           file://0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+export prefix = "/opt/ltp"
+export exec_prefix = "/opt/ltp"
+
+PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
+EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
+# ltp network/rpc test cases ftbfs when libtirpc is found
+EXTRA_OECONF += " --without-tirpc "
+
+do_install(){
+    install -d ${D}/opt/ltp/
+    oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
+
+    # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run
+    # as it lacks dependency on some perl moudle such as LWP::Simple
+    # And this script previously works as a tool for analyzing failures from LTP
+    # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses
+    # http://khack.osdl.org to retrieve ltp test results run on
+    # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
+    rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
+
+    # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
+    cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
+}
+
+RDEPENDS_${PN} = "\
+    acl \
+    at \
+    attr \
+    bash \
+    cpio \
+    cronie \
+    curl \
+    e2fsprogs-mke2fs \
+    expect \
+    gawk \
+    gzip \
+    iproute2 \
+    ldd \
+    libaio \
+    logrotate \
+    perl \
+    python-core \
+    procps \
+    unzip \
+    util-linux \
+    which \
+    tar \
+"
+
+FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a"
+
+# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail
+INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01"
+INSANE_SKIP_${PN} += "already-stripped staticdev"
+
+# Avoid file dependency scans, as LTP checks for things that may or may not
+# exist on the running system.  For instance it has specific checks for
+# csh and ksh which are not typically part of OpenEmbedded systems (but
+# can be added via additional layers.)
+SKIP_FILEDEPS_${PN} = '1'
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-db/man-db_2.8.1.bb b/import-layers/yocto-poky/meta/recipes-extended/man-db/man-db_2.8.1.bb
new file mode 100644
index 0000000..8328a67
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/man-db/man-db_2.8.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "An implementation of the standard Unix documentation system accessed using the man command"
+HOMEPAGE = "http://man-db.nongnu.org/"
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://docs/COPYING;md5=eb723b61539feef013de476e68b5c50a"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz"
+SRC_URI[md5sum] = "51842978e06686286421f9498d1009b7"
+SRC_URI[sha256sum] = "a6aec641ca3d9942b054cc0e9c3f05cb46a3a992bc0006795755e2fed1357f3e"
+
+DEPENDS = "libpipeline gdbm groff-native"
+
+# | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr'
+USE_NLS_libc-musl = "no"
+
+inherit gettext pkgconfig autotools
+
+EXTRA_OECONF = "--with-pager=less --disable-cache-owner"
+
+do_install_append_libc-musl() {
+        rm -f ${D}${libdir}/charset.alias
+}
+
+FILES_${PN} += "${prefix}/lib/tmpfiles.d"
+
+FILES_${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so"
+
+RDEPENDS_${PN} += "groff"
+RRECOMMENDS_${PN} += "less"
+RPROVIDES_${PN} += " man"
+
+def compress_pkg(d):
+    if bb.utils.contains("INHERIT", "compress_doc", True, False, d):
+         compress = d.getVar("DOC_COMPRESS")
+         if compress == "gz":
+             return "gzip"
+         elif compress == "bz2":
+             return "bzip2"
+         elif compress == "xz":
+             return "xz"
+    return ""
+
+RDEPENDS_${PN} += "${@compress_pkg(d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.11.bb b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.11.bb
deleted file mode 100644
index a3077a9..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.11.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Linux man-pages"
-DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
-SECTION = "console/utils"
-HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
-SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "408300ed09d1ad5938070158b21da1d1"
-SRC_URI[sha256sum] = "e6db91a24e68c7c765b7b8e60f1591ed1049bc2dc3143db779eae4838b89d195"
-
-RDEPENDS_${PN} = "man"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
-        oe_runmake install DESTDIR=${D}
-}
-
-# Only deliveres man-pages so FILES_${PN} gets everything
-FILES_${PN}-doc = ""
-FILES_${PN} = "${mandir}/*"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
-ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
-ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.14.bb b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.14.bb
new file mode 100644
index 0000000..f8bd090
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.14.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Linux man-pages"
+DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
+SECTION = "console/utils"
+HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://README;md5=794f701617cc03fe50c53257660d8ec4"
+SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "82bd2d05c4d0dba5e7a90d39c9555197"
+SRC_URI[sha256sum] = "aeebc6b09a11e7f7bbc98f3984fe8b8b2bde9d2f5f9dcbd4348a9e0d93704238"
+
+RDEPENDS_${PN} = "man"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+        oe_runmake install DESTDIR=${D}
+}
+
+# Only deliveres man-pages so FILES_${PN} gets everything
+FILES_${PN}-doc = ""
+FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/configure_sed.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/configure_sed.patch
deleted file mode 100644
index d49e683..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/configure_sed.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-man: replace ',' with '#'
-
-Sometimes, the parameters of CC/BUILD_CC contains the ',', which
-cause the sed command failed, so replace the ',' with '#'
-
-Upstream-Status: Pending
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- configure | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 9f62cf9..9a565ae 100755
---- a/configure
-+++ b/configure
-@@ -1321,9 +1321,9 @@ do
-   echo "Creating $infile from $infile.in"
-   sed -e '
- s,@version@,$version,
--s,@CC@,$CC,
-+s#@CC@#$CC#
- s,@EXEEXT@,$EXEEXT,
--s,@BUILD_CC@,$BUILD_CC,
-+s#@BUILD_CC@#$BUILD_CC#
- s,@INSTALL@,$INSTALL,
- s,@DEFS@,$DEFS,
- s,@LIBS@,$LIBS,
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
deleted file mode 100644
index 6f834bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -u -r man-1.5g.old/configure man-1.5g/configure
---- man-1.5g.old/configure	Wed Apr  7 04:16:05 1999
-+++ man-1.5g/configure	Mon May 15 15:22:44 2000
-@@ -791,7 +791,7 @@
-     read mode
-     if test "$mode" != ""; then man_mode=$mode; fi
-   fi
--  man_install_flags="-m $man_mode -o $man_user -g $man_group"
-+  man_install_flags=""
- fi
- 
- # What sections do we anticipate?
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-gencat.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
deleted file mode 100644
index 044b14c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- gencat/genlib.c	2006-08-02 20:11:44.000000000 +0200
-+++ gencat/genlib.c.oden	2008-12-21 19:18:50.000000000 +0100
-@@ -47,6 +47,7 @@ up-to-date.  Many thanks.
- 01/14/91   4 nazgul	Off by one on number specified entries
- */
- 
-+#undef _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #ifdef SYSV
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-make.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-make.patch
deleted file mode 100644
index 8631eb2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5h1-make.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5g/man/Makefile.in.mike	Fri Apr  9 13:35:54 1999
-+++ man-1.5g/man/Makefile.in	Fri Apr  9 13:36:45 1999
-@@ -1,8 +1,8 @@
- # only executed from a subdir
- MAN1 = man whatis apropos
--MAN5 = man.conf
-+MAN5 = man.config
- MAN8 = makewhatis
--ALL = man.1 whatis.1 apropos.1 man.conf.5
-+ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
- 
- .SUFFIXES: .man .1 .5 .8
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-initial.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-initial.patch
deleted file mode 100644
index fe56c07..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-initial.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5i2/src/makewhatis.sh.initial	Tue Jul  3 15:38:39 2001
-+++ man-1.5i2/src/makewhatis.sh	Tue Jul  3 15:39:39 2001
-@@ -81,8 +81,10 @@
- 	continue;;
-     -s) setsections=1
- 	continue;;
--    -u) findarg="-newer /var/cache/man/whatis"
--	update=1
-+    -u) if [ -e /var/cache/man/whatis ]; then
-+	  findarg="-newer /var/cache/man/whatis"
-+	  update=1
-+	fi
- 	continue;;
-     -v) verbose=1
- 	continue;;
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-newline.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-newline.patch
deleted file mode 100644
index 611df5d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-newline.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- src/man.c	2008-12-21 19:17:31.000000000 +0100
-+++ src/man.c.oden	2008-12-21 19:17:38.000000000 +0100
-@@ -391,7 +391,7 @@ again:
- 	  beg++;
- 
-      end = beg;
--     while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
-+     while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE)
- 	  end++;		/* note that buf is NUL-terminated */
-      *end = '\0';
- 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-overflow.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
deleted file mode 100644
index 52d2881..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5i2/src/man.c.overflow	Mon Jun 25 00:01:45 2001
-+++ man-1.5i2/src/man.c	Mon Jun 25 00:01:45 2001
-@@ -381,6 +381,9 @@
- 	  strcat(name, "/");
- 	  strcat(name, beg);
-      }
-+     /* If this is too long, bad things have already happened. *
-+      * we should quit IMMEDIATELY.                            */
-+     if(strlen(name)>sizeof(ultname)) _exit(1);
- 
-      goto again;
- }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-i18n.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-i18n.patch
deleted file mode 100644
index 2ae09c0..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-i18n.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/msgs/inst.sh.i18n	Wed Apr 25 10:40:50 2001
-+++ man-1.5j/msgs/inst.sh	Wed Apr 25 10:41:17 2001
-@@ -27,8 +27,7 @@
- for j in $M; do
-   if [ -f $j ]; then
-     i=`echo $j | sed -e 's/mess.//; s/.cat//'`
--    dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
--    dest=${PREFIX}$dest
-+    dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
-     echo "mkdir -p `dirname $dest`"
-     mkdir -p `dirname $dest`;
-     echo "install -c -m 644 $j $dest"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-nocache.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-nocache.patch
deleted file mode 100644
index 751dddd..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-nocache.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/src/man.conf.in.nocache	Thu Nov 22 15:07:12 2001
-+++ man-1.5j/src/man.conf.in	Thu Nov 22 15:07:12 2001
-@@ -81,6 +81,9 @@
- # 
- #NOCACHE
- #
-+# NOCACHE keeps man from creating cache pages
-+NOCACHE
-+#
- # Useful paths - note that COL should not be defined when
- # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
- # not only is it superfluous, but it actually damages the output.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-utf8.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-utf8.patch
deleted file mode 100644
index 33d3e4c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5j-utf8.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/configure.utf8	Thu Nov 22 15:02:35 2001
-+++ man-1.5j/configure	Thu Nov 22 15:03:15 2001
-@@ -408,9 +408,9 @@
-   Fgawk=/bin/gawk
-   Fawk=/bin/gawk
-   Fmawk=missing
--  troff=""
--  nroff=""
--  jnroff=""
-+  troff=/usr/bin/troff
-+  nroff=/usr/bin/nroff
-+  jnroff=/usr/bin/nroff
-   eqn=""
-   neqn=""
-   jneqn=""
-@@ -453,6 +453,8 @@
-     done
-   done
-   Fgroff=/usr/bin/groff
-+  Fnroff=/usr/bin/nroff
-+  Fjnroff=/usr/bin/nroff
-   Fgeqn=/usr/bin/geqn
-   Fgtbl=/usr/bin/gtbl
-   Fcol=/usr/bin/col
-@@ -485,25 +487,25 @@
-   then
-     if test $Fnroff = "missing"
-     then
--      nroff="nroff -Tlatin1 -mandoc"
-+      nroff="nroff -Tutf8 -mandoc"
-     else
--      nroff="$Fnroff -Tlatin1 -mandoc"
-+      nroff="$Fnroff -Tutf8 -mandoc"
-     fi
-     troff="troff -mandoc"
-     echo "Warning: could not find groff"
-   else
-     if test $Fnroff = "missing"
-     then
--      nroff="$Fgroff -Tlatin1 -mandoc"
-+      nroff="$Fgroff -Tutf8 -mandoc"
-     else
--      nroff="$Fnroff -Tlatin1 -mandoc"
-+      nroff="$Fnroff -Tutf8 -mandoc"
-     fi
-     troff="$Fgroff -Tps -mandoc"
--    jnroff="$Fgroff -Tnippon -mandocj"
-+    jnroff="$Fjnroff -Tutf8 -mandocj"
-   fi
-   eqn="$Fgeqn -Tps"
--  neqn="$Fgeqn -Tlatin1"
--  jneqn="$Fgeqn -Tnippon"
-+  neqn="$Fgeqn -Tutf8"
-+  jneqn="$Fgeqn -Tutf8"
-   tbl="$Fgtbl"
-   col="$Fcol"
-   vgrind="$Fvgrind"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-confpath.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-confpath.patch
deleted file mode 100644
index b5746c2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-confpath.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- configure	2006-05-01 19:56:14.000000000 +0200
-+++ configure.oden	2008-12-21 19:16:50.000000000 +0100
-@@ -198,7 +198,7 @@
-     confdir="${confprefix}/share/misc"
-   fi
- fi
--conffilename="man.conf"
-+conffilename="man.config"
- 
- if test "$RANDOM" = "$RANDOM"; then
-   # Plain old Bourne shell.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-nonascii.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
deleted file mode 100644
index d662d9b..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./src/apropos.sh.nonascii	2001-11-23 00:30:42.000000000 +0100
-+++ ./src/apropos.sh	2002-08-13 15:44:53.000000000 +0200
-@@ -18,9 +18,9 @@
- 
- # When man pages in your favorite locale look to grep like binary files
- # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
--aproposgrepopt1='i'
-+aproposgrepopt1='ia'
- aproposgrepopt2=''
--whatisgrepopt1='iw'
-+whatisgrepopt1='iwa'
- whatisgrepopt2='^'
- grepopt1=$%apropos_or_whatis%grepopt1
- grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-sofix.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-sofix.patch
deleted file mode 100644
index 50b9252..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5k-sofix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5j/src/man.c.sofix	Thu Nov 22 14:51:44 2001
-+++ man-1.5j/src/man.c	Thu Nov 22 14:52:44 2001
-@@ -300,7 +300,7 @@
- 
-      if (strlen(name0) >= sizeof(ultname))
- 	     return name0;
--     strcpy(ultname, name0);
-+     strncpy(ultname, name0, BUFSIZE-32);
-      name = ultname;
- 
- again:
-@@ -332,7 +332,7 @@
- 	   * .so files - we could glob for all possible extensions,
- 	   * for now: only try .gz
- 	   */
--	  else if (fp == NULL && get_expander(".gz") &&
-+	  if (fp == NULL && get_expander(".gz") &&
- 		   strlen(name)+strlen(".gz") < BUFSIZE) {
- 	       strcat(name, ".gz");
- 	       fp = fopen (name, "r");
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
deleted file mode 100644
index 0512999..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./configure.ad	2003-12-11 19:17:10.000000000 +0100
-+++ ./configure	2003-12-11 19:17:27.000000000 +0100
-@@ -26,7 +26,7 @@
- # (Indeed, -r may cause the terminal to get into funny states.
- # Very inconvenient. For viewing pages in strange locales, set LC_*.)
- #
--DEFAULTLESSOPT="-is"
-+DEFAULTLESSOPT="-isr"
- #
- # Note that not creating any cat directories (/var/cache/man or so)
- # and not making man suid or sgid is recommended.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
deleted file mode 100644
index bc97f56..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- ./configure.less	2003-12-11 19:18:15.000000000 +0100
-+++ ./configure	2003-12-11 19:20:03.000000000 +0100
-@@ -401,18 +401,13 @@
- 
- if test "$ans" = "false"
- then
--  for i in more less cmp cat awk gawk mawk
--  do
--    eval F$i="missing"
--    for j in $DEFPATH
--    do
--      if test -f $j/$i
--      then
--	eval F$i=$j/$i
--	break
--      fi
--    done
--  done
-+  Fmore=/bin/more
-+  Fless=/usr/bin/less
-+  Fcmp=/usr/bin/cmp
-+  Fcat=/bin/cat
-+  Fgawk=/bin/gawk
-+  Fawk=/bin/gawk
-+  Fmawk=missing
-   troff=""
-   nroff=""
-   jnroff=""
-@@ -457,6 +452,19 @@
-       fi
-     done
-   done
-+  Fgroff=/usr/bin/groff
-+  Fgeqn=/usr/bin/geqn
-+  Fgtbl=/usr/bin/gtbl
-+  Fcol=/usr/bin/col
-+  Fgrefer=/usr/bin/grefer
-+  Fgpic=/usr/bin/gpic
-+  Fmore=/bin/more
-+  Fless=/usr/bin/less
-+  Fcmp=/usr/bin/cmp
-+  Fcat=/bin/cat
-+  Fgawk=/bin/gawk
-+
-+
-   for i in eqn tbl refer pic
-   do
-     if test `eval echo \\$Fg$i` = "missing"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
deleted file mode 100644
index c85ff1d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5m2/configure.color	2006-09-16 18:27:37.000000000 +0200
-+++ man-1.5m2/configure	2006-09-16 18:28:44.000000000 +0200
-@@ -539,6 +539,8 @@
-     troff="$troff -c"
-     nroff="$nroff -c"
-     jnroff="$jnroff -c"
-+else
-+    troff="$troff -c"
- fi
- 
- if [ x$default = x ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
deleted file mode 100644
index 8af78ea..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.5m2/src/util.c_sigpipe	2006-12-09 13:43:21.000000000 +0100
-+++ man-1.5m2/src/util.c	2006-12-09 13:53:13.000000000 +0100
-@@ -116,11 +116,14 @@
- static int
- system1 (const char *command) {
- 	void (*prev_handler)(int) = signal (SIGINT,catch_int);
-+	signal (SIGPIPE,SIG_IGN);
- 	int ret = system(command);
- 
- 	/* child terminated with signal? */
- 	if (WIFSIGNALED(ret) &&
--	    (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
-+	    (WTERMSIG(ret) == SIGINT ||
-+		 WTERMSIG(ret) == SIGPIPE ||
-+		 WTERMSIG(ret) == SIGQUIT))
- 		exit(1);
- 
- 	/* or we caught an interrupt? */
-@@ -128,6 +131,7 @@
- 		exit(1);
- 
- 	signal(SIGINT,prev_handler);
-+	signal(SIGPIPE,SIG_DFL);
- 	return ret;
- }
- 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
deleted file mode 100644
index e321325..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh
---- man-1.6e.orig/src/apropos.sh	2007-05-18 13:49:31.000000000 -0300
-+++ man-1.6e/src/apropos.sh	2007-05-18 14:24:33.000000000 -0300
-@@ -60,16 +60,56 @@
-     esac
- done
- 
-+# list of languages to look for
-+LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
-+DIR_LIST=""
-+for d in /var/cache/man $manpath /usr/lib
-+do
-+    for l in $LANG_LIST
-+    do
-+        if [ -d $d/$l ]
-+        then
-+            # check that the path is not already in the list
-+            if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
-+            then
-+                DIR_LIST="$DIR_LIST $d/$l"
-+            fi
-+        fi
-+    done
-+    DIR_LIST="$DIR_LIST $d"
-+    # check that the path is not already in the list
-+    if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
-+    then
-+        DIR_LIST="$DIR_LIST $d/$l"
-+    fi
-+done
-+
- while [ "$1" != "" ]
- do
-     found=0
--    for d in /var/cache/man $manpath /usr/lib
-+    # in order not to display lines in more than one language for
-+    # a same man page; we check that a given man page name
-+    # hasn't already been displayed
-+    BAZ=""
-+    for d in $DIR_LIST
-     do
-         if [ -f $d/whatis ]
-         then
--            if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
-+            if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
-             then
--                found=1
-+                # the LC_ALL=C is needed in case the text is
-+                # in a different encoding than the locale
-+                BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
-+                for i in $BAR
-+                do
-+                    if ! echo "$BAZ" | grep "$i" > /dev/null
-+                    then
-+                        BAZ="$BAZ $i"
-+                        i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
-+                        echo -e "$FOO" | grep "$i"
-+                        found=1
-+                    fi
-+                done
- # Some people are satisfied with a single occurrence
- # But it is better to give all
- #               break
-diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
---- man-1.6e.orig/src/makewhatis.sh	2007-05-18 13:49:31.000000000 -0300
-+++ man-1.6e/src/makewhatis.sh	2007-05-18 13:50:07.000000000 -0300
-@@ -41,12 +41,32 @@
- 
- program=`basename $0`
- 
-+# this allows to define language specific values fro NAME, DESCRIPTION
-+# if not defined, using those default values
-+if [ -z "$MAN_NAME" ]
-+then
-+	MAN_NAME="Š˜ŠœŠ•|NOM|JMÉNO|NAVN|ΟΝΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\
-+NÉV|NOME|名前|ģ“ė¦„|NAAM|NAZWA|NUME|Š˜ŠœŠÆ|MENO|ŠŠŠ—Š’Š|名ē§°|名ēر"
-+fi
-+if [ -z "$MAN_DESCRIPTION" ]
-+then
-+	MAN_DESCRIPTION="ŠžŠŸŠ˜Š”ŠŠŠ˜Š•|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\
-+ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÍRÁS|DESCRIZIONE|\
-+čŖ¬ę˜Ž|ģ„¤ėŖ…|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ŠžŠŸŠ˜Š”|ꏏčæ°"
-+fi
-+# make them into awk regexp
-+MAN_NAME="^(${MAN_NAME})";
-+MAN_DESCRIPTION="^(${MAN_DESCRIPTION})";
-+
- # In case both /usr/man and /usr/share/man exist, the former is local
- # and should be first.
- # It is a bug to add /var/cache/man to DEFCATPATH.
- dm=
- for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
- do
-+    if [ -n "$LANG" -a -d "$d/$LANG" ]; then
-+	if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi
-+    fi
-     if [ -d $d ]; then
- 	if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
-     fi
-@@ -55,6 +75,9 @@
- dc=
- for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
- do
-+    if [ -n "$LANG" -a -d "$d/$LANG" ]; then
-+	if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
-+    fi
-     if [ -d $d ]; then
- 	if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
-     fi
-@@ -194,7 +217,7 @@
- 	    section=$i
- 	    curdir=$mandir/${pages}$i
- 	    export section verbose curdir
--	    find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
-+	    find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
- 
- 	    function readline() {
- 	      if (use_zcat || use_bzcat) {
-@@ -261,13 +284,7 @@
- 		gsub(/.\b/, "");
- 		if (($1 ~ /^\.[Ss][Hh]/ &&
- 		  ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
--		   $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
--		   $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
--		   $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
--		   $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ ||
--		   $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ ||
--		   $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ ||
--		   $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) ||
-+		   $2 ~ MAN_NAME )) ||
- 		  (pages == "cat" && $1 ~ /^NAME/)) {
- 		    if (!insh) {
- 		      insh = 1;
-@@ -278,6 +295,7 @@
- 		  if ($1 ~ /^\.[Ss][HhYS]/ ||
- 		    (pages == "cat" &&
- 		    ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
-+		     $1 ~ MAN_DESCRIPTION ||
- 		     $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
- 		     $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
- 		     $0 ~ /^[^ ]/))) {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-mandirs.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
deleted file mode 100644
index b240064..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.6e.orig/src/man.conf.in	2005-08-20 20:26:06.000000000 -0300
-+++ man-1.6e/src/man.conf.in	2007-05-18 10:30:29.000000000 -0300
-@@ -36,11 +36,12 @@
- #
- # Every automatically generated MANPATH includes these fields
- #
--MANPATH	/usr/man
- MANPATH	/usr/share/man
-+MANPATH	/usr/X11R6/man
- MANPATH	/usr/local/man
- MANPATH	/usr/local/share/man
--MANPATH	/usr/X11R6/man
-+MANPATH	/usr/kerberos/man
-+MANPATH	/usr/man
- #
- # Uncomment if you want to include one of these by default
- #
-@@ -67,6 +68,9 @@
- MANPATH_MAP	/usr/X11R6/bin		/usr/X11R6/man
- MANPATH_MAP	/usr/bin/X11		/usr/X11R6/man
- MANPATH_MAP	/usr/bin/mh		/usr/share/man
-+MANPATH_MAP	/usr/kerberos/bin		/usr/kerberos/man
-+MANPATH_MAP	/usr/kerberos/sbin		/usr/kerberos/man
-+
- #
- # NOAUTOPATH keeps man from automatically adding directories that look like
- # manual page directories to the path.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-new_sections.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
deleted file mode 100644
index fb9773c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man-1.6e.orig/configure	2006-05-01 14:56:14.000000000 -0300
-+++ man-1.6e/configure	2007-05-18 14:35:43.000000000 -0300
-@@ -960,7 +960,7 @@
- 
- # What sections do we anticipate?
- 
--tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
-+tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
- 
- if [ x$default = x ]; then
-   echo ""
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
deleted file mode 100644
index 1d1cb0c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: man-1.6f/src/makewhatis.sh
-===================================================================
---- man-1.6f.orig/src/makewhatis.sh	2010-12-29 13:42:34.000000000 -0800
-+++ man-1.6f/src/makewhatis.sh	2010-12-29 13:42:35.667428347 -0800
-@@ -124,7 +124,7 @@
- 	continue;;
-     -s) setsections=1
- 	continue;;
--    -u) findarg="-ctime 0"
-+    -u) findarg="-newer /var/cache/man/whatis"
- 	update=1
- 	continue;;
-     -v) verbose=1
-@@ -165,14 +165,7 @@
- # first truncate all the whatis files that will be created new,
- # then only update - we might visit the same directory twice
- if [ x$update = x ]; then
--   for pages in man cat
--   do
--      eval path="\$$pages"path
--      for mandir in $path
--      do
--	 cp /dev/null $mandir/whatis
--      done
--   done
-+   cp /dev/null /var/cache/man/whatis
- fi
- 
- for pages in man cat
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-security.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-security.patch
deleted file mode 100644
index 312a882..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-security.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
---- man-1.6e.orig/src/makewhatis.sh	2006-07-19 01:58:08.000000000 -0300
-+++ man-1.6e/src/makewhatis.sh	2007-05-18 10:18:31.000000000 -0300
-@@ -45,7 +45,7 @@
- # and should be first.
- # It is a bug to add /var/cache/man to DEFCATPATH.
- dm=
--for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
-+for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
- do
-     if [ -d $d ]; then
- 	if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
-@@ -53,7 +53,7 @@
- done
- DEFMANPATH=$dm
- dc=
--for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
-+for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
- do
-     if [ -d $d ]; then
- 	if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
-@@ -76,12 +76,12 @@
- # We try here to be careful (and avoid preconstructed symlinks)
- # in case makewhatis is run as root, by creating a subdirectory of /tmp.
- 
--TMPFILEDIR=/tmp/whatis.tmp.dir.$$
--rm -rf $TMPFILEDIR
--if ! mkdir -m 0700 $TMPFILEDIR; then
--    echo Could not create $TMPFILEDIR
--    exit 1;
-+TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX`
-+if [ $? -ne 0 ]; then
-+   echo "$0: Can't create temp file, exiting..."
-+   exit 1
- fi
-+chmod 0700 $TMPFILEDIR
- TMPFILE=$TMPFILEDIR/w
- 
- # make sure TMPFILEDIR is deleted if program is killed or terminates
-diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c
---- man-1.6e.orig/src/man.c	2006-05-01 17:34:22.000000000 -0300
-+++ man-1.6e/src/man.c	2007-05-18 10:11:33.000000000 -0300
-@@ -1234,7 +1234,6 @@
- #endif
- 
- 
--#if 0
-      {
- 	/* There are no known cases of buffer overflow caused by
- 	   excessively long environment variables. In case you find one,
-@@ -1257,7 +1256,6 @@
- 	   MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
- 	   MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
-      }
--#endif
- 
- 
- #ifndef __FreeBSD__ 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
deleted file mode 100644
index 568f742..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c
---- man-1.6e.orig/catopen/catopen.c	2005-08-20 20:26:06.000000000 -0300
-+++ man-1.6e/catopen/catopen.c	2007-05-18 11:31:05.000000000 -0300
-@@ -9,22 +9,63 @@
- extern char *index (const char *, int);         /* not always in <string.h> */
- extern char *my_malloc(int);	/* in util.c */
- 
-+/* if the program has sgid/suid privileges then getenv doesn't return
-+ * NLSPATH; so we set here a good default value.
-+ */
- #ifndef DEFAULT_NLSPATH
- # if __GLIBC__ >= 2
--#  define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
-+#  define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
- # else
- #  define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
- # endif
- #endif
- 
--static nl_catd my_catopenpath(char *name, char *path);
-+static nl_catd my_catopenpath(char *name, char *path, char *lang);
- 
- static				/* this source included in gripes.c */
- nl_catd
- my_catopen(char *name, int oflag) {
--  nl_catd fd;
-+  nl_catd fd = (nl_catd) -1;
-+
-+  /* using first the my_catopenpath, which looks with LANGUAGE
-+   * and only if it fails ressort to catopen, it gives better i18n
-+   */
-+  {
-+    char *nlspath, *lang, *s;
- 
--  fd = catopen(name, oflag);
-+    /*
-+     * "If NLSPATH does not exist in the environment, or if a
-+     * message catalog cannot be opened in any of the paths specified
-+     * by NLSPATH, then an implementation defined default path is used"
-+     */
-+    nlspath = getenv("NLSPATH");
-+    if (!nlspath)
-+      nlspath = DEFAULT_NLSPATH;
-+ 
-+    lang = getenv("LANGUAGE");
-+    if (!lang)
-+      lang = getenv("LC_ALL");
-+    if (!lang)
-+      lang = getenv("LC_MESSAGES");
-+    if (!lang)
-+      lang = getenv("LANG");
-+    if (!lang)
-+      lang = "";
-+ 
-+    while(*lang && (fd == (nl_catd) -1)) {
-+      s = index(lang, ':');
-+      if (s) *s = 0;
-+        fd = my_catopenpath(name, nlspath, lang);
-+      if (s) lang=s+1;
-+      else lang = "";
-+    }
-+    if (fd == (nl_catd) -1)
-+      fd = my_catopenpath(name, nlspath, "en");
-+  }
-+
-+  /* still not found, use the system catopen */
-+  if (fd == (nl_catd) -1)
-+    fd = catopen(name, oflag);
- 
-   if (fd == (nl_catd) -1 && oflag) {
-     oflag = 0;
-@@ -32,8 +73,6 @@
-   }
- 
-   if (fd == (nl_catd) -1) {
--    char *nlspath;
--
-     /* The libc catopen fails - let us see if we can do better */
-     /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
- 
-@@ -58,17 +97,6 @@
- #endif
-     }
- 
--    /*
--     * "If NLSPATH does not exist in the environment, or if a
--     * message catalog cannot be opened in any of the paths specified
--     * by NLSPATH, then an implementation defined default path is used"
--     */
--
--    nlspath = getenv("NLSPATH");
--    if (nlspath)
--      fd = my_catopenpath(name, nlspath);
--    if (fd == (nl_catd) -1)
--      fd = my_catopenpath(name, DEFAULT_NLSPATH);
-   }
-   return fd;
- }
-@@ -90,15 +118,13 @@
-  *
-  */
- static nl_catd
--my_catopenpath(char *name, char *nlspath) {
--  int fd;
-+my_catopenpath(char *name, char *nlspath, char *lang) {
-   nl_catd cfd = (nl_catd) -1;
--  char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
-+  char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
-   int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
- 
-   namesz = strlen(name);
- 
--  lang = getenv("LANG");
-   if (!lang)
-     lang = "";
-   langsz = strlen(lang);
-@@ -194,14 +220,9 @@
-       path = s+1;
-     } else
-       path = 0;
--    fd = open(file, O_RDONLY);
--    if (fd != -1) {
--      /* we found the right catalog - but we don't know the
--	 type of nl_catd, so close it again and ask libc */
--      close(fd);
--      cfd = catopen(file, 0);
--      break;
--    }
-+	cfd = catopen(file, 0);
-+	if (cfd != (nl_catd) -1)
-+			break;
-   }
- 
-   free(path0);
-diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c
---- man-1.6e.orig/src/manpath.c	2006-08-03 18:18:33.000000000 -0300
-+++ man-1.6e/src/manpath.c	2007-05-18 11:02:48.000000000 -0300
-@@ -282,13 +282,14 @@
- 		/* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
- 		   the return value of setlocale is an opaque string. */
- 		/* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
--		if((lang = getenv("LC_ALL")) != NULL)
-+	        /* LANGUAGE is GNU/Linux and overrules all */
-+		if((lang = getenv("LANGUAGE")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
--		if((lang = getenv("LC_MESSAGES")) != NULL)
-+		else if((lang = getenv("LC_ALL")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
--		if((lang = getenv("LANG")) != NULL)
-+		else if((lang = getenv("LC_MESSAGES")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
--		if((lang = getenv("LANGUAGE")) != NULL)
-+		else if((lang = getenv("LANG")) != NULL)
- 			split2(dir, lang, add_to_mandirlist_x, perrs);
- 		add_to_mandirlist_x(dir, 0, perrs);
- 	}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-whatis2.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
deleted file mode 100644
index fc4ed31..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: man-1.6f/src/makewhatis.sh
-===================================================================
---- man-1.6f.orig/src/makewhatis.sh	2010-12-29 13:51:45.000000000 -0800
-+++ man-1.6f/src/makewhatis.sh	2010-12-29 13:59:35.399799412 -0800
-@@ -164,10 +164,15 @@
- fi
- catpath=`echo ${catpath} | tr : ' '`
- 
-+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
-+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
-+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
-+
- # first truncate all the whatis files that will be created new,
- # then only update - we might visit the same directory twice
- if [ x$update = x ]; then
--   cp /dev/null /var/cache/man/whatis
-+   mkdir -p $WHATIS_DIR/
-+   /bin/echo -n > $WHATIS_DIR/whatis
- fi
- 
- for pages in man cat
-@@ -180,13 +185,7 @@
- 	echo "about to enter $mandir" > /dev/stderr
-      fi
- 
--     # kludge for Slackware's /usr/man/preformat
--     if [ $mandir = /usr/man/preformat ]
--     then
--	mandir1=/usr/man
--     else
--	mandir1=$mandir
--     fi
-+     mandir1=$WHATIS_DIR
- 
-      # if $mandir is on a readonly partition, and the whatis file
-      # is not a symlink, then let's skip trying to update it
-@@ -207,11 +206,6 @@
- 	fi
-      fi
- 
--     if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
--	if [ x$verbose != x ]; then
--	   echo skipping $mandir - we did it already > /dev/stderr
--	fi
--     else      
-        here=`pwd`
-        cd $mandir
-        for i in $sections
-@@ -447,7 +447,6 @@
-
-        chmod 644 ${mandir1}/whatis
-        rm $TMPFILE
--     fi
-    done
- done
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
deleted file mode 100644
index 4631d2d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Fix a build error when building man.config.5 (a remnant of a long
-ago previous patch). Optimized the manpages Makefile for parallel
-builds. Also, fix compile warnings in a couple other files.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle@intel.com>
-
---- man-1.6g/man/Makefile.in.orig	2016-03-28 17:31:08.723949180 -0700
-+++ man-1.6g/man/Makefile.in	2016-03-28 17:46:12.866910386 -0700
-@@ -5,6 +5,13 @@
- ALL = man.1 whatis.1 apropos.1 man.config.5
- MAYBE8 = makewhatis
- 
-+SUBDIRS := $(shell echo @languages@)
-+
-+.PHONY: subdirs $(SUBDIRS)
-+
-+man.config.man: man.conf.man
-+	@cp $< $@
-+
- .SUFFIXES: .man .1 .5 .8
- 
- .man.1:
-@@ -19,11 +26,11 @@
- INSTALL = @INSTALL@ -c -m 644
- 
- # Where to put the manual pages.
--mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
-+mandir := $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
- 
- all:	$(ALL)
- 	for i in $(MAYBE8); \
--		do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
-+		do if test -f $$i.man; then $(MAKE) -f ../Makefile $$i.8; fi; done
- 
- install: $(ALL)
- 	mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
-@@ -38,24 +45,27 @@
- 	rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
- 
- spotless:
-+	rm -f man.config.man
- 
- subdirs:
--	@for i in @languages@; do if test -d $$i; then echo; \
--		echo "==== Making the `cat $$i.txt` man pages. ===="; \
--		cd $$i; make -f ../Makefile; cd ..; \
--		else echo "==== No $$i man pages found. ===="; fi; done
-+subdirs: $(SUBDIRS)
-+$(SUBDIRS):
-+	if test -d $@; then echo; \
-+		echo "==== Making the `cat $@.txt` man pages. ===="; \
-+		$(MAKE) -C $@ -f ../Makefile all; \
-+		else echo "==== No $@ man pages found. ===="; fi
- 
- installsubdirs:
- 	@for i in @languages@; do if test -d $$i; then echo; \
- 		echo "==== Installing the `cat $$i.txt` man pages. ===="; \
- 		cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
--		export SLANG; make -f ../Makefile install; cd ..; \
-+		export SLANG; $(MAKE) -f ../Makefile install; cd ..; \
- 		else echo "==== No $$i man pages found. ===="; fi; done
- 
- cleansubdirs:
--	@for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
-+	@for i in ??; do $(MAKE) -C $$i -f ../Makefile clean; done
- 	rm -f core *~
- 
- spotlesssubdirs:
--	for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done
-+	for i in ??; do $(MAKE) -C $$i -f ../Makefile spotless; done
- 	rm -f Makefile
-
---- man-1.6g/src/gripes.c.orig	2006-11-21 11:53:44.000000000 -0800
-+++ man-1.6g/src/gripes.c	2016-03-30 16:32:31.601103487 -0700
-@@ -7,8 +7,6 @@
- 
- extern char *msg[];
- 
--static char *mantexts = "man";		/* e.g. /usr/lib/locale/%L/man.cat */
--
- #ifdef NONLS
- 
- static char *
-@@ -30,6 +28,8 @@
- #include <nl_types.h>
- #include "../catopen/catopen.c"
- 
-+static char *mantexts = "man";		/* e.g. /usr/lib/locale/%L/man.cat */
-+
- nl_catd catfd = (nl_catd) -1;
- int cat_is_open = 0;
- 
---- man-1.6g/src/manfile.c.orig	2005-08-20 16:26:06.000000000 -0700
-+++ man-1.6g/src/manfile.c	2016-03-29 09:10:21.527841285 -0700
-@@ -299,7 +299,7 @@
- 	const char *((*tocat)(const char *man_filename, const char *ext,
- 			      int flags))) {
-      char **sl;
--     struct manpage *res;
-+     struct manpage *res = 0;
- 
-      standards = (flags & (FHS | FSSTND | DO_HP | DO_IRIX));
-      to_cat_filename = tocat;
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
deleted file mode 100644
index 106cc98..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Use BUILD_CC and target include files for configuration tests.
-If cross-compiling, force pathnames for helper programs, since
-autodiscovery by the configure script will not work.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle at intel.com>
-
---- man-1.6g/configure.orig	2016-03-28 17:46:12.734910976 -0700
-+++ man-1.6g/configure	2016-03-30 21:47:45.110572908 -0700
-@@ -216,7 +216,8 @@
- INCLUDEDIR=${INCLUDEDIR-/usr/include}
- 
- rm -f conftest conftest.c
--compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
-+# since we are interested in target feature support, use that sysroot
-+compile="$BUILD_CC -isystem/${PKG_CONFIG_SYSROOT_DIR}/usr/include $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
- 
- # Check for various header files.
- 
-@@ -455,19 +456,23 @@
-       fi
-     done
-   done
--  Fgroff=/usr/bin/groff
--  Fnroff=/usr/bin/nroff
--  Fjnroff=/usr/bin/nroff
--  Fgeqn=/usr/bin/geqn
--  Fgtbl=/usr/bin/gtbl
--  Fcol=/usr/bin/col
--  Fgrefer=/usr/bin/grefer
--  Fgpic=/usr/bin/gpic
--  Fmore=/bin/more
--  Fless=/usr/bin/less
--  Fcmp=/usr/bin/cmp
--  Fcat=/bin/cat
--  Fgawk=/bin/gawk
-+  if [ $BUILD_CC != $CC ]; then
-+    # cross compiling => target fs not available, so force defaults
-+    Fgroff=/usr/bin/groff
-+    Fnroff=/usr/bin/nroff
-+    Fjnroff=/usr/bin/nroff
-+    Fgeqn=/usr/bin/eqn
-+    Fgneqn=/usr/bin/neqn
-+    Fgtbl=/usr/bin/tbl
-+    Fcol=/usr/bin/col
-+    Fgrefer=/usr/bin/refer
-+    Fgpic=/usr/bin/pic
-+    Fmore=/bin/more
-+    Fless=/usr/bin/less
-+    Fcmp=/usr/bin/cmp
-+    Fcat=/bin/cat
-+    Fgawk=/usr/bin/gawk
-+  fi
- 
- 
-   for i in eqn tbl refer pic
-@@ -507,8 +512,8 @@
-     jnroff="$Fjnroff -Tutf8 -mandocj"
-   fi
-   eqn="$Fgeqn -Tps"
--  neqn="$Fgeqn -Tutf8"
--  jneqn="$Fgeqn -Tutf8"
-+  neqn="$Fgneqn -Tutf8"
-+  jneqn="$Fgneqn -Tutf8"
-   tbl="$Fgtbl"
-   col="$Fcol"
-   vgrind="$Fvgrind"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
deleted file mode 100644
index 72a88b8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-The Makefile for man has a rule to create two generated targets with
-a program run from the shell. Because the rule was run twice, with
-parallel make, the generated files were being overwritten at the same
-time they were being compiled. This patch forces the rule to be run
-only once.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bill Randle <william.c.randle at intel.com>
-
---- man-1.6g/src/Makefile.in.orig	2010-12-31 12:28:46.000000000 -0800
-+++ man-1.6g/src/Makefile.in	2016-03-28 09:09:16.845458798 -0700
-@@ -43,8 +43,10 @@
- makemsg:
- 	$(BUILD_CC) -o makemsg makemsg.c
- 
--msg.c gripedefs.h: ../msgs/mess.en makemsg
-+msg.c gripedefs.h: genfiles-stamp
-+genfiles-stamp: ../msgs/mess.en makemsg
- 	./makemsg ../msgs/mess.en gripedefs.h msg.c
-+	touch genfiles-stamp
- 
- # glob.c does not have prototypes
- glob.o: glob.c ndir.h
-@@ -117,4 +119,4 @@
- 
- spotless: clean
- 	rm -f Makefile config.status paths.h version.h man.conf
--	rm -f gripedefs.h msg.c mess.*.cat
-+	rm -f gripedefs.h msg.c mess.*.cat genfiles-stamp
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-whatis3.patch b/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
deleted file mode 100644
index 6334456..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Do not use absolute path for awk while getting the path of awk
-when running makewhatis.
-This can avoid errors if path of awk changes.
-
-Upstream-Status: Submitted [man-1.6g]
-
-Signed-off-by: Jian Liu <jian.liu@windriver.com>
-
-diff -Nur man-1.6g.orig/src/makewhatis.sh man-1.6g/src/makewhatis.sh
---- man-1.6g.orig/src/makewhatis.sh	2015-02-25 16:13:12.657611419 +0800
-+++ man-1.6g/src/makewhatis.sh	2015-02-25 16:14:49.334694815 +0800
-@@ -67,7 +67,7 @@
- # but that leads to problems and bugs.
-
- # AWK=/usr/bin/gawk
--AWK=@awk@
-+AWK=`which awk`
-
- # Find a place for our temporary files. If security is not a concern, use
- #	TMPFILE=/tmp/whatis$$; TMPFILEDIR=none
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.1.gz b/import-layers/yocto-poky/meta/recipes-extended/man/man/man.1.gz
deleted file mode 100644
index c368045..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.1.gz
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.7.gz b/import-layers/yocto-poky/meta/recipes-extended/man/man/man.7.gz
deleted file mode 100644
index e85af82..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.7.gz
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.conf b/import-layers/yocto-poky/meta/recipes-extended/man/man/man.conf
deleted file mode 100644
index fc10be2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/man.conf
+++ /dev/null
@@ -1,141 +0,0 @@
-#
-# Generated automatically from man.conf.in by the
-# configure script.
-#
-# man.conf from man-1.5p
-#
-# For more information about this file, see the man pages man(1)
-# and man.conf(5).
-#
-# This file is read by man to configure the default manpath (also used
-# when MANPATH contains an empty substring), to find out where the cat
-# pages corresponding to given man pages should be stored,
-# and to map each PATH element to a manpath element.
-# It may also record the pathname of the man binary. [This is unused.]
-# The format is:
-#
-# MANBIN		pathname
-# MANPATH		manpath_element	[corresponding_catdir]
-# MANPATH_MAP		path_element	manpath_element
-#
-# If no catdir is given, it is assumed to be equal to the mandir
-# (so that this dir has both man1 etc. and cat1 etc. subdirs).
-# This is the traditional Unix setup.
-# Certain versions of the FSSTND recommend putting formatted versions
-# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
-# The keyword FSSTND will cause this behaviour.
-# Certain versions of the FHS recommend putting formatted versions of
-# /usr/.../share/man/[locale/]manx/page.x into
-# /var/cache/man/.../[locale/]catx/page.x.
-# The keyword FHS will cause this behaviour (and overrides FSSTND).
-# Explicitly given catdirs override.
-#
-# FSSTND
-FHS
-#
-# This file is also read by man in order to find how to call nroff, less, etc.,
-# and to determine the correspondence between extensions and decompressors.
-#
-# MANBIN		/usr/local/bin/man
-#
-# Every automatically generated MANPATH includes these fields
-#
-MANPATH	/usr/man
-MANPATH	/usr/share/man
-MANPATH	/usr/local/man
-MANPATH	/usr/local/share/man
-MANPATH	/usr/X11R6/man
-#
-# Uncomment if you want to include one of these by default
-#
-# MANPATH	/opt/*/man
-# MANPATH	/usr/lib/*/man
-# MANPATH	/usr/share/*/man
-# MANPATH	/usr/kerberos/man
-#
-# Set up PATH to MANPATH mapping
-#
-# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
-# and the docs are found in "/dir/man", then no mapping is required.
-#
-# The below mappings are superfluous when the right hand side is
-# in the mandatory manpath already, but will keep man from statting
-# lots of other nearby files and directories.
-#
-MANPATH_MAP	/bin			/usr/share/man
-MANPATH_MAP	/sbin			/usr/share/man
-MANPATH_MAP	/usr/bin		/usr/share/man
-MANPATH_MAP	/usr/sbin		/usr/share/man
-MANPATH_MAP	/usr/local/bin		/usr/local/share/man
-MANPATH_MAP	/usr/local/sbin		/usr/local/share/man
-MANPATH_MAP	/usr/X11R6/bin		/usr/X11R6/man
-MANPATH_MAP	/usr/bin/X11		/usr/X11R6/man
-MANPATH_MAP	/usr/bin/mh		/usr/share/man
-#
-# NOAUTOPATH keeps man from automatically adding directories that look like
-# manual page directories to the path.
-#
-#NOAUTOPATH
-#
-# NOCACHE keeps man from creating cache pages ("cat pages")
-# (generally one enables/disable cat page creation by creating/deleting
-# the directory they would live in - man never does mkdir)
-# 
-#NOCACHE
-#
-# Useful paths - note that COL should not be defined when
-# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
-# not only is it superfluous, but it actually damages the output.
-# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
-# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
-#
-# If you have a new troff (version 1.18.1?) and its colored output
-# causes problems, add the -c option to TROFF, NROFF, JNROFF.
-#
-TROFF		/usr/bin/groff -Tps -mandoc
-NROFF		/usr/bin/nroff -Tlatin1 -mandoc
-JNROFF		/usr/bin/groff -Tnippon -mandocj
-EQN		/usr/bin/eqn -Tps
-NEQN		/usr/bin/eqn -Tlatin1
-JNEQN		/usr/bin/eqn -Tnippon
-TBL		/usr/bin/tbl
-# COL		/usr/bin/col
-REFER		/usr/bin/refer
-PIC		/usr/bin/pic
-VGRIND		
-GRAP		
-PAGER		/usr/bin/less -isR
-CAT		/bin/cat
-#
-# The command "man -a xyzzy" will show all man pages for xyzzy.
-# When CMP is defined man will try to avoid showing the same
-# text twice. (But compressed pages compare unequal.)
-#
-CMP		/usr/bin/cmp -s
-#
-# Compress cat pages
-#
-COMPRESS	/bin/bzip2
-COMPRESS_EXT	.bz2
-#
-# Default manual sections (and order) to search if -S is not specified
-# and the MANSECT environment variable is not set.
-#
-MANSECT		1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
-#
-# Default options to use when man is invoked without options
-# This is mainly for the benefit of those that think -a should be the default
-# Note that some systems have /usr/man/allman, causing pages to be shown twice.
-#
-#MANDEFOPTIONS	-a
-#
-# Decompress with given decompressor when input file has given extension
-# The command given must act as a filter.
-#
-.gz		/bin/gunzip -c
-.bz2		/usr/bin/bunzip2 -c
-.xz		/usr/bin/unxz -c
-.z		
-.Z		/bin/zcat
-.F		
-.Y		
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man/manpath.5.gz b/import-layers/yocto-poky/meta/recipes-extended/man/man/manpath.5.gz
deleted file mode 100644
index c012ff8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man/manpath.5.gz
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man/man_1.6g.bb b/import-layers/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
deleted file mode 100644
index ff603f8..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
+++ /dev/null
@@ -1,86 +0,0 @@
-SUMMARY = "Online documentation tools"
-DESCRIPTION = "A set of documentation tools: man, apropos and whatis"
-SECTION = "console/utils"
-HOMEPAGE = "http://primates.ximian.com/~flucifredi/man"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-PR = "r1"
-
-DEPENDS = "groff less"
-
-def compress_pkg(d):
-    if "compress_doc" in (d.getVar("INHERIT") or "").split():
-         compress = d.getVar("DOC_COMPRESS")
-         if compress == "gz":
-             return "gzip"
-         elif compress == "bz2":
-             return "bzip2"
-         elif compress == "xz":
-             return "xz"
-    return ""
-
-RDEPENDS_${PN} += "${@compress_pkg(d)}"
-
-SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba154d5796928b841c9c69f0ae376660/${BP}.tar.gz \
-           file://man-1.5k-confpath.patch;striplevel=0 \
-           file://man-1.5h1-make.patch \
-           file://man-1.5k-nonascii.patch \
-           file://man-1.6e-security.patch \
-           file://man-1.6e-mandirs.patch \
-           file://man-1.5m2-bug11621.patch \
-           file://man-1.5k-sofix.patch \
-           file://man-1.5m2-buildroot.patch \
-           file://man-1.6e-ro_usr.patch \
-           file://man-1.5i2-newline.patch;striplevel=0 \
-           file://man-1.5j-utf8.patch \
-           file://man-1.5i2-overflow.patch \
-           file://man-1.5j-nocache.patch \
-           file://man-1.5i2-initial.patch \
-           file://man-1.5h1-gencat.patch;striplevel=0 \
-           file://man-1.5g-nonrootbuild.patch \
-           file://man-1.5j-i18n.patch \
-           file://man-1.6e-whatis2.patch \
-           file://man-1.6e-use_i18n_vars_in_a_std_way.patch \
-           file://man-1.5m2-no-color-for-printing.patch \
-           file://man-1.5m2-sigpipe.patch \
-           file://man-1.6e-i18n_whatis.patch \
-           file://man-1.6e-new_sections.patch \
-           file://man.1.gz;unpack=false \
-           file://man.7.gz;unpack=false \
-           file://man.conf \
-           file://manpath.5.gz;unpack=false \
-           file://man-1.6g-whatis3.patch \
-           file://configure_sed.patch \
-           file://man-1.6g-parallel.patch \
-           file://man-1.6g-compile-warnings.patch \
-           file://man-1.6g-configure.patch \
-"
-
-SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
-SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f"
-
-CFLAGS += "-DSYSV"
-
-do_configure () {
-        ${S}/configure -default -confdir /etc +sgid +fhs +lang all
-}
-
-
-do_install() {
-        oe_runmake install DESTDIR=${D}
-}
-
-do_install_append(){
-	mkdir -p  ${D}${sysconfdir}
-        mkdir -p ${D}${datadir}/man/man5
-        mkdir -p ${D}${datadir}/man/man7
-	cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config
-        cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/
-        cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/
-        cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/
-}
-
-
-RDEPENDS_${PN} = "less groff"
-FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/files/0002-Ticket-3697-tty_init-unify-curses-initialization.patch b/import-layers/yocto-poky/meta/recipes-extended/mc/files/0002-Ticket-3697-tty_init-unify-curses-initialization.patch
deleted file mode 100644
index c54d4d0..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/mc/files/0002-Ticket-3697-tty_init-unify-curses-initialization.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 4d46a108629beb66a293672db7b44f863b6598ba Mon Sep 17 00:00:00 2001
-From: Thomas Dickey <dickey@his.com>
-Date: Fri, 14 Apr 2017 14:06:13 +0300
-Subject: [PATCH] Ticket #3697: (tty_init): unify curses initialization
-
-...for various curses implementations.
-
-Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
-
-Upstream-Status: Backport [https://github.com/MidnightCommander/mc.git]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
----
- lib/tty/tty-ncurses.c | 26 +++++++++-----------------
- 1 file changed, 9 insertions(+), 17 deletions(-)
-
-diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
-index a7a11f3..8e69b39 100644
---- a/lib/tty/tty-ncurses.c
-+++ b/lib/tty/tty-ncurses.c
-@@ -179,6 +179,8 @@ mc_tty_normalize_lines_char (const char *ch)
- void
- tty_init (gboolean mouse_enable, gboolean is_xterm)
- {
-+    struct termios mode;
-+
-     initscr ();
- 
- #ifdef HAVE_ESCDELAY
-@@ -194,25 +196,15 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
-     ESCDELAY = 200;
- #endif /* HAVE_ESCDELAY */
- 
--#ifdef NCURSES_VERSION
-+    tcgetattr (STDIN_FILENO, &mode);
-     /* use Ctrl-g to generate SIGINT */
--    cur_term->Nttyb.c_cc[VINTR] = CTRL ('g');   /* ^g */
-+    mode.c_cc[VINTR] = CTRL ('g');  /* ^g */
-     /* disable SIGQUIT to allow use Ctrl-\ key */
--    cur_term->Nttyb.c_cc[VQUIT] = NULL_VALUE;
--    tcsetattr (cur_term->Filedes, TCSANOW, &cur_term->Nttyb);
--#else
--    /* other curses implementation (bsd curses, ...) */
--    {
--        struct termios mode;
--
--        tcgetattr (STDIN_FILENO, &mode);
--        /* use Ctrl-g to generate SIGINT */
--        mode.c_cc[VINTR] = CTRL ('g');  /* ^g */
--        /* disable SIGQUIT to allow use Ctrl-\ key */
--        mode.c_cc[VQUIT] = NULL_VALUE;
--        tcsetattr (STDIN_FILENO, TCSANOW, &mode);
--    }
--#endif /* NCURSES_VERSION */
-+    mode.c_cc[VQUIT] = NULL_VALUE;
-+    tcsetattr (STDIN_FILENO, TCSANOW, &mode);
-+
-+    /* curses remembers the "in-program" modes after this call */
-+    def_prog_mode ();
- 
-     tty_start_interrupt_key ();
- 
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.19.bb b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.19.bb
deleted file mode 100644
index b3a156c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.19.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Midnight Commander is an ncurses based file manager"
-HOMEPAGE = "http://www.midnight-commander.org/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
-SECTION = "console/utils"
-DEPENDS = "ncurses glib-2.0 util-linux"
-RDEPENDS_${PN} = "ncurses-terminfo"
-
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
-           file://0001-mc-replace-perl-w-with-use-warnings.patch \
-           file://0002-Ticket-3697-tty_init-unify-curses-initialization.patch \
-           "
-SRC_URI[md5sum] = "ef423f5b6f80a1a5a5fc53b8324cab70"
-SRC_URI[sha256sum] = "d0dddfae7149fac903f74ef55cfcb2a198e0f7004346c7bded43669d61ba436f"
-
-inherit autotools gettext pkgconfig
-
-#
-# Both Samba (smb) and sftp require package delivered from meta-openembedded
-#
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
-PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
-
-EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
-
-CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
-
-do_install_append () {
-	sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
-        
-        rm ${D}${libexecdir}/mc/extfs.d/s3+ ${D}${libexecdir}/mc/extfs.d/uc1541
-}
-
-PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers ${BPN}-fish"
-
-SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
-FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
-                             ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
-                             ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
-                             ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ 
-                             ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ 
-                             ${libexecdir}/mc/extfs.d/uzip"
-RDEPENDS_${BPN}-helpers-perl = "perl"
-
-SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
-FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
-
-SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
-FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.20.bb b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.20.bb
new file mode 100644
index 0000000..70d1b5e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.20.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Midnight Commander is an ncurses based file manager"
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0 util-linux"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+           file://0001-mc-replace-perl-w-with-use-warnings.patch \
+           "
+SRC_URI[md5sum] = "dcfc7aa613c62291a0f71f6b698d8267"
+SRC_URI[sha256sum] = "2d85daaa6ab26e524946df4823ac2f69802bc16bc967781b5e28d5b86fc3b979"
+
+inherit autotools gettext pkgconfig
+
+#
+# Both Samba (smb) and sftp require package delivered from meta-openembedded
+#
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
+PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
+
+do_install_append () {
+	sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+        
+        rm ${D}${libexecdir}/mc/extfs.d/s3+ ${D}${libexecdir}/mc/extfs.d/uc1541
+}
+
+PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers ${BPN}-fish"
+
+SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
+FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
+                             ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
+                             ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
+                             ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ 
+                             ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ 
+                             ${libexecdir}/mc/extfs.d/uzip"
+RDEPENDS_${BPN}-helpers-perl = "perl"
+
+SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
+FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
+
+SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
+FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch
index 54bf1d7..df21399 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/gcc-4.9.patch
@@ -7,13 +7,13 @@
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
 
-Index: mdadm-3.3/super-intel.c
+Index: mdadm-4.0/super-intel.c
 ===================================================================
---- mdadm-3.3.orig/super-intel.c	2014-05-02 15:08:21.154319651 -0700
-+++ mdadm-3.3/super-intel.c	2014-05-02 15:09:31.470985794 -0700
-@@ -5060,7 +5060,7 @@
- 	spare->cache_size = mpb->cache_size,
- 	spare->pwr_cycle_count = __cpu_to_le32(1),
+--- mdadm-4.0.orig/super-intel.c
++++ mdadm-4.0/super-intel.c
+@@ -5725,7 +5725,7 @@ static int write_super_imsm_spares(struc
+ 	spare->cache_size = mpb->cache_size;
+ 	spare->pwr_cycle_count = __cpu_to_le32(1);
  
 -	snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
 +	(void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
index c656d07..00e6657 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -5,13 +5,13 @@
 
 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
 
-Index: mdadm-3.3.4/monitor.c
+Index: mdadm-4.0/monitor.c
 ===================================================================
---- mdadm-3.3.4.orig/monitor.c
-+++ mdadm-3.3.4/monitor.c
-@@ -257,9 +257,12 @@ static int read_and_act(struct active_ar
- 			mdi->curr_state = read_dev_state(mdi->state_fd);
- 		}
+--- mdadm-4.0.orig/monitor.c
++++ mdadm-4.0/monitor.c
+@@ -445,9 +445,12 @@ static int read_and_act(struct active_ar
+ 		if (FD_ISSET(mdi->bb_fd, fds))
+ 			check_for_cleared_bb(a, mdi);
  	}
 -
  	gettimeofday(&tv, NULL);
diff --git a/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb b/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
index 1a31a87..e6afe2b 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
@@ -27,3 +27,4 @@
 	for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done
 }
 
+RRECOMMENDS_${PN} += "lrzsz"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
index 12eed17..78daf6c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
@@ -11,10 +11,10 @@
  statistics.c |  68 +++++++++-
  2 files changed, 465 insertions(+), 14 deletions(-)
 
-diff --git a/netstat.c b/netstat.c
-index 1fb9e0c..5d1a4a1 100644
---- a/netstat.c
-+++ b/netstat.c
+Index: net-tools-1.60/netstat.c
+===================================================================
+--- net-tools-1.60.orig/netstat.c
++++ net-tools-1.60/netstat.c
 @@ -58,6 +58,7 @@
   *
   *990420 {1.38} Tuan Hoang              removed a useless assignment from igmp_do_one()
@@ -23,7 +23,7 @@
   *
   *              This program is free software; you can redistribute it
   *              and/or  modify it under  the terms of  the GNU General
-@@ -105,7 +106,7 @@
+@@ -106,7 +107,7 @@
  #endif
  
  /* prototypes for statistics.c */
@@ -32,7 +32,7 @@
  void inittab(void);
  void parsesnmp6(int, int, int);
  void inittab6(void);
-@@ -118,6 +119,28 @@ typedef enum {
+@@ -119,6 +120,28 @@ typedef enum {
      SS_DISCONNECTING		/* in process of disconnecting  */
  } socket_state;
  
@@ -61,7 +61,7 @@
  #define SO_ACCEPTCON    (1<<16)	/* performed a listen           */
  #define SO_WAITDATA     (1<<17)	/* wait data to read            */
  #define SO_NOSPACE      (1<<18)	/* no space to write            */
-@@ -148,6 +171,7 @@ int flag_opt = 0;
+@@ -149,6 +172,7 @@ int flag_opt = 0;
  int flag_raw = 0;
  int flag_tcp = 0;
  int flag_udp = 0;
@@ -69,7 +69,7 @@
  int flag_igmp= 0;
  int flag_rom = 0;
  int flag_exp = 1;
-@@ -990,6 +1014,365 @@ static int udp_info(void)
+@@ -995,6 +1019,365 @@ static int udp_info(void)
  	       udp_do_one);
  }
  
@@ -435,7 +435,7 @@
  static void raw_do_one(int lnr, const char *line)
  {
      char buffer[8192], local_addr[64], rem_addr[64];
-@@ -1549,7 +1932,7 @@ static void usage(void)
+@@ -1558,7 +1941,7 @@ static void usage(void)
      fprintf(stderr, _("        -F, --fib                display Forwarding Information Base (default)\n"));
      fprintf(stderr, _("        -C, --cache              display routing cache instead of FIB\n\n"));
  
@@ -444,7 +444,7 @@
      fprintf(stderr, _("  <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
      fprintf(stderr, _("  List of possible address families (which support routing):\n"));
      print_aflist(1); /* 1 = routeable */
-@@ -1574,6 +1957,7 @@ int main
+@@ -1583,6 +1966,7 @@ int main
  	{"protocol", 1, 0, 'A'},
  	{"tcp", 0, 0, 't'},
  	{"udp", 0, 0, 'u'},
@@ -452,7 +452,7 @@
  	{"raw", 0, 0, 'w'},
  	{"unix", 0, 0, 'x'},
  	{"listening", 0, 0, 'l'},
-@@ -1604,7 +1988,7 @@ int main
+@@ -1613,7 +1997,7 @@ int main
      getroute_init();		/* Set up AF routing support */
  
      afname[0] = '\0';
@@ -461,7 +461,7 @@
  	switch (i) {
  	case -1:
  	    break;
-@@ -1696,10 +2080,12 @@ int main
+@@ -1705,10 +2089,12 @@ int main
  	case 't':
  	    flag_tcp++;
  	    break;
@@ -475,7 +475,7 @@
  	case 'w':
  	    flag_raw++;
  	    break;
-@@ -1717,13 +2103,13 @@ int main
+@@ -1726,13 +2112,13 @@ int main
      if (flag_int + flag_rou + flag_mas + flag_sta > 1)
  	usage();
  
@@ -493,7 +493,7 @@
  	+ flag_ax25 + flag_netrom + flag_igmp + flag_x25;
  
      if (flag_mas) {
-@@ -1751,7 +2137,7 @@ int main
+@@ -1760,7 +2146,7 @@ int main
          char buf[256];
          if (!afname[0]) {
              inittab();
@@ -502,7 +502,7 @@
          } else {
              safe_strncpy(buf, afname, sizeof(buf));
              tmp1 = buf;
-@@ -1804,7 +2190,7 @@ int main
+@@ -1815,7 +2201,7 @@ int main
  	return (i);
      }
      for (;;) {
@@ -511,7 +511,7 @@
  #if HAVE_AFINET
  	    prg_cache_load();
  	    printf(_("Active Internet connections "));	/* xxx */
-@@ -1843,6 +2229,11 @@ int main
+@@ -1854,6 +2240,11 @@ int main
  	    if (i)
  		return (i);
  	}
@@ -523,10 +523,10 @@
  	if (!flag_arg || flag_raw) {
  	    i = raw_info();
  	    if (i)
-diff --git a/statistics.c b/statistics.c
-index 03600d7..eb8d7dc 100644
---- a/statistics.c
-+++ b/statistics.c
+Index: net-tools-1.60/statistics.c
+===================================================================
+--- net-tools-1.60.orig/statistics.c
++++ net-tools-1.60/statistics.c
 @@ -21,7 +21,7 @@
  #define UFWARN(x)
  #endif
@@ -537,7 +537,7 @@
  enum State {
      number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
 @@ -297,6 +297,27 @@ struct entry Tcpexttab[] =
-     { "TCPRenoRecoveryFail", N_("%u classic Reno fast retransmits failed"), opt_number },
+     { "TCPRenoRecoveryFail", N_("%llu classic Reno fast retransmits failed"), opt_number },
  };
  
 +struct entry Sctptab[] =
@@ -616,7 +616,7 @@
      f = proc_fopen("/proc/net/snmp");
      if (!f) {
  	perror(_("cannot open /proc/net/snmp"));
-@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
+@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tc
      
          fclose(f);
      }
@@ -633,6 +633,3 @@
      return;
  }
      
--- 
-1.8.5.2.233.g932f7e4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch b/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch
index 03007aa..86cc0be 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/newt/files/cross_ar.patch
@@ -18,18 +18,19 @@
  configure.ac | 4 ++++
  2 files changed, 6 insertions(+), 1 deletion(-)
 
-diff --git a/Makefile.in b/Makefile.in
---- a/Makefile.in
-+++ b/Makefile.in
+Index: newt-0.52.20/Makefile.in
+===================================================================
+--- newt-0.52.20.orig/Makefile.in
++++ newt-0.52.20/Makefile.in
 @@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@
  LDFLAGS = @LDFLAGS@
- CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ 
+ CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
  GNU_LD = @GNU_LD@
 +AR = @AR@
  
  VERSION = @VERSION@
  TAG = r$(subst .,-,$(VERSION))
-@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH)
+@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNE
  	$(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt  $(LIBTCL) -lpopt $(LIBS)
  
  $(LIBNEWT): $(LIBOBJS)
@@ -38,10 +39,10 @@
  
  newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
  
-diff --git a/configure.ac b/configure.ac
-index 92e6da8..cd83d57 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: newt-0.52.20/configure.ac
+===================================================================
+--- newt-0.52.20.orig/configure.ac
++++ newt-0.52.20/configure.ac
 @@ -15,6 +15,10 @@ AC_PROG_INSTALL
  AC_PROG_LN_S
  AC_PROG_GREP
@@ -51,8 +52,5 @@
 +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
 +AC_PROG_AR
  
- # Are we using GNU ld?
- AC_MSG_CHECKING([for GNU ld])
--- 
-1.8.1.2
-
+ AC_CHECK_SIZEOF([long])
+ AC_CHECK_SIZEOF([long long])
diff --git a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
index fdede59..9002fbc 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -89,7 +89,6 @@
     mktemp \
     ncurses \
     net-tools \
-    pax \
     popt \
     procps \
     psmisc \
@@ -140,19 +139,13 @@
     bzip2 \
     cronie \
     dbus \
-    dbus-glib \
     elfutils \
     gzip \
     less \
-    libcap \
-    libevent \
     logrotate \
     nfs-utils \
     pciutils \
-    libpcre \
     rpcbind \
-    sysfsutils \
     tcp-wrappers \
     tzdata \
     "
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index 5baaf35..53d100c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -14,12 +14,15 @@
 # libglu needs virtual/libgl, which requires opengl in DISTRO_FEATURES
 REQUIRED_DISTRO_FEATURES += "opengl"
 
+# libpam, pam-plugin-wheel requires pam in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES += "pam"
+
 #
 # We will skip parsing this packagegeoup for non-glibc systems
 #
 python __anonymous () {
     if d.getVar('TCLIBC') != "glibc":
-        raise bb.parse.SkipPackage("incompatible with %s C library" %
+        raise bb.parse.SkipRecipe("incompatible with %s C library" %
                                    d.getVar('TCLIBC'))
 }
 
@@ -68,7 +71,6 @@
     mc-helpers-perl \
     mdadm \
     minicom \
-    neon \
     parted \
     quota \
     screen \
@@ -159,7 +161,6 @@
     mktemp \
     msmtp \
     patch \
-    pax \
     procps \
     psmisc \
     sed \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch
index be68745..7edf66f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/libpam-xtests.patch
@@ -3,18 +3,20 @@
 Upstream-Status: Pending
 
 Signed-off-by: Kang Kai <kai.kang@windriver.com>
---- Linux-PAM-1.1.4/xtests/Makefile.am.orig	2011-07-19 17:00:09.619980001 +0800
-+++ Linux-PAM-1.1.4/xtests/Makefile.am	2011-07-19 16:54:00.229979998 +0800
-@@ -7,7 +7,7 @@
- AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \
- 	-L$(top_builddir)/libpam_misc -lpam_misc
+Index: Linux-PAM-1.3.0/xtests/Makefile.am
+===================================================================
+--- Linux-PAM-1.3.0.orig/xtests/Makefile.am
++++ Linux-PAM-1.3.0/xtests/Makefile.am
+@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src
+ LDADD = $(top_builddir)/libpam/libpam.la \
+ 	$(top_builddir)/libpam_misc/libpam_misc.la
  
 -CLEANFILES = *~ $(XTESTS)
 +CLEANFILES = *~
  
  EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
  	tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
-@@ -51,3 +51,18 @@
+@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS)
  
  xtests: $(XTESTS) run-xtests.sh
  	"$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
index f1834f6..9b8d4c2 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
@@ -5,12 +5,13 @@
 
 Signed-off-by: Ming Liu <ming.liu@windriver.com>
 ===================================================================
-diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am
---- a/modules/pam_securetty/Makefile.am	2013-07-05 11:08:23.224483237 +0800
-+++ b/modules/pam_securetty/Makefile.am	2013-07-05 11:15:21.304486456 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am
+===================================================================
+--- Linux-PAM-1.3.0.orig/modules/pam_securetty/Makefile.am
++++ Linux-PAM-1.3.0/modules/pam_securetty/Makefile.am
 @@ -24,6 +24,10 @@ endif
  securelib_LTLIBRARIES = pam_securetty.la
- pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam
+ pam_securetty_la_LIBADD = $(top_builddir)/libpam/libpam.la
  
 +pam_securetty_la_SOURCES =	\
 +	pam_securetty.c		\
@@ -19,9 +20,10 @@
  if ENABLE_REGENERATE_MAN
  noinst_DATA = README
  README: pam_securetty.8.xml
-diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
---- a/modules/pam_securetty/pam_securetty.c	2013-07-05 11:07:50.064483568 +0800
-+++ b/modules/pam_securetty/pam_securetty.c	2013-07-05 11:12:23.994483344 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c
+===================================================================
+--- Linux-PAM-1.3.0.orig/modules/pam_securetty/pam_securetty.c
++++ Linux-PAM-1.3.0/modules/pam_securetty/pam_securetty.c
 @@ -1,7 +1,5 @@
  /* pam_securetty module */
  
@@ -104,9 +106,10 @@
  
      if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) {
          FILE *cmdlinefile;
-diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c
---- a/modules/pam_securetty/tty_secure.c	1970-01-01 08:30:00.000000000 +0830
-+++ b/modules/pam_securetty/tty_secure.c	2013-07-05 11:14:21.534482900 +0800
+Index: Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c
+===================================================================
+--- /dev/null
++++ Linux-PAM-1.3.0/modules/pam_securetty/tty_secure.c
 @@ -0,0 +1,90 @@
 +/*
 + * A function to determine if a particular line is in /etc/securetty
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
index 8f7753d..92ab72a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
@@ -151,11 +151,8 @@
 	fi
 }
 
-python do_pam_sanity () {
-    if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
-        bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
-}
-addtask pam_sanity before do_configure
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
 
 BBCLASSEXTEND = "nativesdk native"
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch b/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch
index 58d8db4..e6a26d1 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/parted/files/no_check.patch
@@ -5,12 +5,12 @@
 
 RP - 4/11/08
 
-Index: parted-1.9.0/configure.ac
+Index: parted-3.2/configure.ac
 ===================================================================
---- parted-1.9.0.orig/configure.ac	2009-07-23 18:52:08.000000000 +0100
-+++ parted-1.9.0/configure.ac	2010-02-02 14:13:56.013905093 +0000
-@@ -477,7 +477,7 @@
- AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux])
+--- parted-3.2.orig/configure.ac
++++ parted-3.2/configure.ac
+@@ -555,7 +555,7 @@ AC_CHECK_HEADER([execinfo.h], [
+ AM_CONDITIONAL([COMPILE_FOR_S390], [test "$host_cpu" = s390 || test "$host_cpu" = s390x])
  
  dnl check for "check", unit testing library/header
 -PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch b/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch
index e9bbe9a..93205a0 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/parted/files/syscalls.patch
@@ -4,10 +4,10 @@
  libparted/arch/linux.c |   13 +++++++++++++
  1 file changed, 13 insertions(+)
 
-Index: parted-1.9.0/libparted/arch/linux.c
+Index: parted-3.2/libparted/arch/linux.c
 ===================================================================
---- parted-1.9.0.orig/libparted/arch/linux.c	2009-07-23 18:52:08.000000000 +0100
-+++ parted-1.9.0/libparted/arch/linux.c	2010-02-02 14:14:16.523904768 +0000
+--- parted-3.2.orig/libparted/arch/linux.c
++++ parted-3.2/libparted/arch/linux.c
 @@ -17,6 +17,8 @@
  
  #define PROC_DEVICES_BUFSIZ 16384
@@ -16,8 +16,8 @@
 +
  #include <config.h>
  #include <arch/linux.h>
- 
-@@ -1477,12 +1479,14 @@
+ #include <linux/blkpg.h>
+@@ -1696,12 +1698,14 @@ linux_refresh_close (PedDevice* dev)
  
  #if SIZEOF_OFF_T < 8
  
@@ -32,7 +32,7 @@
  
  loff_t
  llseek (unsigned int fd, loff_t offset, unsigned int whence)
-@@ -1490,11 +1494,20 @@
+@@ -1709,11 +1713,20 @@ llseek (unsigned int fd, loff_t offset,
          loff_t result;
          int retval;
  
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch
deleted file mode 100644
index b76f85a..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From e67bb3debe582f0e77770b714bd012bb1082fc41 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 19 Apr 2017 11:32:00 -0700
-Subject: [PATCH] Add a comment for fallthrough
-
-Fixes warnings with gcc7 e.g.
-
-../../../../../../../workspace/sources/pax/src/options.c: In function 'tar_options':
-../../../../../../../workspace/sources/pax/src/options.c:725:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
-    if (opt_add ("write_opt=nodir") < 0)
-       ^
-../../../../../../../workspace/sources/pax/src/options.c:730:2: note: here
-  case 'O':
-  ^~~~
-cc1: all warnings being treated as errors
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/options.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/options.c b/src/options.c
-index c663b4e..b80819a 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -724,6 +724,7 @@ tar_options (int argc, char **argv)
- 	case 'o':
- 	  if (opt_add ("write_opt=nodir") < 0)
- 	    tar_usage ();
-+	  /* fallthru */
- 	case 'O':
- 	  Oflag = 1;
- 	  break;
--- 
-2.12.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
deleted file mode 100644
index 61bf2de..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,1287 +0,0 @@
-From 47c4db8d37248d968fac7ee4a71ca64398890723 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 11:57:21 -0800
-Subject: [PATCH] Fix build with musl
-
-Remove BSDisms
-Remove fts, and link to libfts thats provided externally
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate[musl specific]
-
- lib/Makefile.am |    4 +-
- lib/fts.c       | 1025 -------------------------------------------------------
- lib/fts.h       |  131 -------
- lib/vis.h       |   13 +-
- src/Makefile.am |    2 +-
- src/extern.h    |    2 -
- src/file_subs.c |    2 +-
- src/tables.c    |    2 +-
- 8 files changed, 14 insertions(+), 1167 deletions(-)
- delete mode 100644 lib/fts.c
- delete mode 100644 lib/fts.h
-
-diff --git a/lib/Makefile.am b/lib/Makefile.am
-index 56d0859..7f5045a 100644
---- a/lib/Makefile.am
-+++ b/lib/Makefile.am
-@@ -8,8 +8,8 @@ AUTOMAKE_OPTIONS = 1.7 gnits
- CLEANFILES = *~
- 
- noinst_LIBRARIES = libbsdfunc.a
--noinst_HEADERS = vis.h bsdfunc.h fts.h
-+noinst_HEADERS = vis.h bsdfunc.h
- 
- AM_CFLAGS = @EXTRA_CFLAGS@
- 
--libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c fts.c
-+libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c
-diff --git a/lib/fts.c b/lib/fts.c
-deleted file mode 100644
-index 45e90ca..0000000
---- a/lib/fts.c
-+++ /dev/null
-@@ -1,1025 +0,0 @@
--/*-
-- * Copyright (c) 1990, 1993, 1994
-- *      The Regents of the University of California.  All rights reserved.
-- *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. Redistributions in binary form must reproduce the above copyright
-- *    notice, this list of conditions and the following disclaimer in the
-- *    documentation and/or other materials provided with the distribution.
-- * 4. Neither the name of the University nor the names of its contributors
-- *    may be used to endorse or promote products derived from this software
-- *    without specific prior written permission.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-- */
--
--#ifdef HAVE_CONFIG_H
--#include <config.h>
--#endif
--
--#include <sys/stat.h>
--#include <fcntl.h>
--#include <dirent.h>
--#include <errno.h>
--#include <fts.h>
--#include <stdlib.h>
--#include <string.h>
--#include <unistd.h>
--
--/* Largest alignment size needed, minus one.
--   Usually long double is the worst case.  */
--#ifndef ALIGNBYTES
--#define ALIGNBYTES	(__alignof__ (long double) - 1)
--#endif
--/* Align P to that size.  */
--#ifndef ALIGN
--#define	ALIGN(p)	(((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES)
--#endif
--
--
--static FTSENT	*fts_alloc (FTS *, const char *, int);
--static FTSENT	*fts_build (FTS *, int);
--static void	 fts_lfree (FTSENT *);
--static void	 fts_load (FTS *, FTSENT *);
--static size_t	 fts_maxarglen (char * const *);
--static void	 fts_padjust (FTS *, FTSENT *);
--static int	 fts_palloc (FTS *, size_t);
--static FTSENT	*fts_sort (FTS *, FTSENT *, int);
--static u_short	 fts_stat (FTS *, FTSENT *, int);
--static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *);
--
--#ifndef MAX
--#define MAX(a, b)	(a > b ? a : b)
--#endif
--
--#define	ISDOT(a)	(a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
--
--#define CLR(opt)	(sp->fts_options &= ~(opt))
--#define	ISSET(opt)	(sp->fts_options & (opt))
--#define	SET(opt)	(sp->fts_options |= (opt))
--
--#define	FCHDIR(sp, fd)	(!ISSET(FTS_NOCHDIR) && fchdir(fd))
--
--#define	BREAD		3		/* fts_read */
--
--FTS *
--fts_open(argv, koptions, compar)
--	char * const *argv;
--	register int koptions;
--	int (*compar) (const FTSENT **, const FTSENT **);
--{
--	register FTS *sp;
--	register FTSENT *p, *root;
--	register int nitems;
--	FTSENT *parent, *tmp;
--	int len;
--
--tmp = NULL;	/* stop compiler whinging */
--	/* Options check. */
--	if (koptions & ~FTS_OPTIONMASK) {
--		errno = EINVAL;
--		return (NULL);
--	}
--
--	/* Allocate/initialize the stream */
--	if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
--		return (NULL);
--	memset(sp, 0, sizeof(FTS));
--	sp->fts_compar = (int (*) (const void *, const void *)) compar;
--	sp->fts_options = koptions;
--
--	/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
--	if (ISSET(FTS_LOGICAL))
--		SET(FTS_NOCHDIR);
--
--	/*
--	 * Start out with 1K of path space, and enough, in any case,
--	 * to hold the user's paths.
--	 */
--#ifndef MAXPATHLEN
--#define MAXPATHLEN 1024
--#endif
--	if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
--		goto mem1;
--
--	/* Allocate/initialize root's parent. */
--	if ((parent = fts_alloc(sp, "", 0)) == NULL)
--		goto mem2;
--	parent->fts_level = FTS_ROOTPARENTLEVEL;
--
--	/* Allocate/initialize root(s). */
--	for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
--		/* Don't allow zero-length paths. */
--		if ((len = strlen(*argv)) == 0) {
--			errno = ENOENT;
--			goto mem3;
--		}
--
--		p = fts_alloc(sp, *argv, len);
--		p->fts_level = FTS_ROOTLEVEL;
--		p->fts_parent = parent;
--		p->fts_accpath = p->fts_name;
--		p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
--
--		/* Command-line "." and ".." are real directories. */
--		if (p->fts_info == FTS_DOT)
--			p->fts_info = FTS_D;
--
--		/*
--		 * If comparison routine supplied, traverse in sorted
--		 * order; otherwise traverse in the order specified.
--		 */
--		if (compar) {
--			p->fts_link = root;
--			root = p;
--		} else {
--			p->fts_link = NULL;
--			if (root == NULL)
--				tmp = root = p;
--			else {
--				tmp->fts_link = p;
--				tmp = p;
--			}
--		}
--	}
--	if (compar && nitems > 1)
--		root = fts_sort(sp, root, nitems);
--
--	/*
--	 * Allocate a dummy pointer and make fts_read think that we've just
--	 * finished the node before the root(s); set p->fts_info to FTS_INIT
--	 * so that everything about the "current" node is ignored.
--	 */
--	if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
--		goto mem3;
--	sp->fts_cur->fts_link = root;
--	sp->fts_cur->fts_info = FTS_INIT;
--
--	/*
--	 * If using chdir(2), grab a file descriptor pointing to dot to ensure
--	 * that we can get back here; this could be avoided for some paths,
--	 * but almost certainly not worth the effort.  Slashes, symbolic links,
--	 * and ".." are all fairly nasty problems.  Note, if we can't get the
--	 * descriptor we run anyway, just more slowly.
--	 */
--	if (!ISSET(FTS_NOCHDIR)
--	    && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
--		SET(FTS_NOCHDIR);
--
--	return (sp);
--
--mem3:	fts_lfree(root);
--	free(parent);
--mem2:	free(sp->fts_path);
--mem1:	free(sp);
--	return (NULL);
--}
--
--static void
--fts_load(sp, p)
--	FTS *sp;
--	register FTSENT *p;
--{
--	register int len;
--	register char *cp;
--
--	/*
--	 * Load the stream structure for the next traversal.  Since we don't
--	 * actually enter the directory until after the preorder visit, set
--	 * the fts_accpath field specially so the chdir gets done to the right
--	 * place and the user can access the first node.  From fts_open it's
--	 * known that the path will fit.
--	 */
--	len = p->fts_pathlen = p->fts_namelen;
--	memmove(sp->fts_path, p->fts_name, len + 1);
--	if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
--		len = strlen(++cp);
--		memmove(p->fts_name, cp, len + 1);
--		p->fts_namelen = len;
--	}
--	p->fts_accpath = p->fts_path = sp->fts_path;
--	sp->fts_dev = p->fts_dev;
--}
--
--int
--fts_close(sp)
--	FTS *sp;
--{
--	register FTSENT *freep, *p;
--	int saved_errno;
--
--	/*
--	 * This still works if we haven't read anything -- the dummy structure
--	 * points to the root list, so we step through to the end of the root
--	 * list which has a valid parent pointer.
--	 */
--	if (sp->fts_cur) {
--		for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
--			freep = p;
--			p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
--			free(freep);
--		}
--		free(p);
--	}
--
--	/* Free up child linked list, sort array, path buffer. */
--	if (sp->fts_child)
--		fts_lfree(sp->fts_child);
--	if (sp->fts_array)
--		free(sp->fts_array);
--	free(sp->fts_path);
--
--	/* Return to original directory, save errno if necessary. */
--	if (!ISSET(FTS_NOCHDIR)) {
--		saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
--		(void)close(sp->fts_rfd);
--
--		/* Set errno and return. */
--		if (saved_errno != 0) {
--			/* Free up the stream pointer. */
--			free(sp);
--			errno = saved_errno;
--			return (-1);
--		}
--	}
--
--	/* Free up the stream pointer. */
--	free(sp);
--	return (0);
--}
--
--/*
-- * Special case of "/" at the end of the path so that slashes aren't
-- * appended which would cause paths to be written as "....//foo".
-- */
--#define	NAPPEND(p)							\
--	(p->fts_path[p->fts_pathlen - 1] == '/'				\
--	    ? p->fts_pathlen - 1 : p->fts_pathlen)
--
--FTSENT *
--fts_read(sp)
--	register FTS *sp;
--{
--	register FTSENT *p, *tmp;
--	register int instr;
--	register char *t;
--	int saved_errno;
--
--	/* If finished or unrecoverable error, return NULL. */
--	if (sp->fts_cur == NULL || ISSET(FTS_STOP))
--		return (NULL);
--
--	/* Set current node pointer. */
--	p = sp->fts_cur;
--
--	/* Save and zero out user instructions. */
--	instr = p->fts_instr;
--	p->fts_instr = FTS_NOINSTR;
--
--	/* Any type of file may be re-visited; re-stat and re-turn. */
--	if (instr == FTS_AGAIN) {
--		p->fts_info = fts_stat(sp, p, 0);
--		return (p);
--	}
--
--	/*
--	 * Following a symlink -- SLNONE test allows application to see
--	 * SLNONE and recover.  If indirecting through a symlink, have
--	 * keep a pointer to current location.  If unable to get that
--	 * pointer, follow fails.
--	 */
--	if (instr == FTS_FOLLOW &&
--	    (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
--		p->fts_info = fts_stat(sp, p, 1);
--		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
--			if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
--				p->fts_errno = errno;
--				p->fts_info = FTS_ERR;
--			} else
--				p->fts_flags |= FTS_SYMFOLLOW;
--		}
--		return (p);
--	}
--
--	/* Directory in pre-order. */
--	if (p->fts_info == FTS_D) {
--		/* If skipped or crossed mount point, do post-order visit. */
--		if (instr == FTS_SKIP ||
--		    (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
--			if (p->fts_flags & FTS_SYMFOLLOW)
--				(void)close(p->fts_symfd);
--			if (sp->fts_child) {
--				fts_lfree(sp->fts_child);
--				sp->fts_child = NULL;
--			}
--			p->fts_info = FTS_DP;
--			return (p);
--		}
--
--		/* Rebuild if only read the names and now traversing. */
--		if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
--			CLR(FTS_NAMEONLY);
--			fts_lfree(sp->fts_child);
--			sp->fts_child = NULL;
--		}
--
--		/*
--		 * Cd to the subdirectory.
--		 *
--		 * If have already read and now fail to chdir, whack the list
--		 * to make the names come out right, and set the parent errno
--		 * so the application will eventually get an error condition.
--		 * Set the FTS_DONTCHDIR flag so that when we logically change
--		 * directories back to the parent we don't do a chdir.
--		 *
--		 * If haven't read do so.  If the read fails, fts_build sets
--		 * FTS_STOP or the fts_info field of the node.
--		 */
--		if (sp->fts_child != NULL) {
--			if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
--				p->fts_errno = errno;
--				p->fts_flags |= FTS_DONTCHDIR;
--				for (p = sp->fts_child; p != NULL;
--				     p = p->fts_link)
--					p->fts_accpath =
--					    p->fts_parent->fts_accpath;
--			}
--		} else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
--			if (ISSET(FTS_STOP))
--				return (NULL);
--			return (p);
--		}
--		p = sp->fts_child;
--		sp->fts_child = NULL;
--		goto name;
--	}
--
--	/* Move to the next node on this level. */
--next:	tmp = p;
--	if ((p = p->fts_link) != NULL) {
--		free(tmp);
--
--		/*
--		 * If reached the top, return to the original directory (or
--		 * the root of the tree), and load the paths for the next root.
--		 */
--		if (p->fts_level == FTS_ROOTLEVEL) {
--			if (FCHDIR(sp, sp->fts_rfd)) {
--				SET(FTS_STOP);
--				return (NULL);
--			}
--			fts_load(sp, p);
--			return (sp->fts_cur = p);
--		}
--
--		/*
--		 * User may have called fts_set on the node.  If skipped,
--		 * ignore.  If followed, get a file descriptor so we can
--		 * get back if necessary.
--		 */
--		if (p->fts_instr == FTS_SKIP)
--			goto next;
--		if (p->fts_instr == FTS_FOLLOW) {
--			p->fts_info = fts_stat(sp, p, 1);
--			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
--				if ((p->fts_symfd =
--				    open(".", O_RDONLY, 0)) < 0) {
--					p->fts_errno = errno;
--					p->fts_info = FTS_ERR;
--				} else
--					p->fts_flags |= FTS_SYMFOLLOW;
--			}
--			p->fts_instr = FTS_NOINSTR;
--		}
--
--name:		t = sp->fts_path + NAPPEND(p->fts_parent);
--		*t++ = '/';
--		memmove(t, p->fts_name, p->fts_namelen + 1);
--		return (sp->fts_cur = p);
--	}
--
--	/* Move up to the parent node. */
--	p = tmp->fts_parent;
--	free(tmp);
--
--	if (p->fts_level == FTS_ROOTPARENTLEVEL) {
--		/*
--		 * Done; free everything up and set errno to 0 so the user
--		 * can distinguish between error and EOF.
--		 */
--		free(p);
--		errno = 0;
--		return (sp->fts_cur = NULL);
--	}
--
--	/* NUL terminate the pathname. */
--	sp->fts_path[p->fts_pathlen] = '\0';
--
--	/*
--	 * Return to the parent directory.  If at a root node or came through
--	 * a symlink, go back through the file descriptor.  Otherwise, cd up
--	 * one directory.
--	 */
--	if (p->fts_level == FTS_ROOTLEVEL) {
--		if (FCHDIR(sp, sp->fts_rfd)) {
--			SET(FTS_STOP);
--			return (NULL);
--		}
--	} else if (p->fts_flags & FTS_SYMFOLLOW) {
--		if (FCHDIR(sp, p->fts_symfd)) {
--			saved_errno = errno;
--			(void)close(p->fts_symfd);
--			errno = saved_errno;
--			SET(FTS_STOP);
--			return (NULL);
--		}
--		(void)close(p->fts_symfd);
--	} else if (!(p->fts_flags & FTS_DONTCHDIR) &&
--		   fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
--		SET(FTS_STOP);
--		return (NULL);
--	}
--	p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
--	return (sp->fts_cur = p);
--}
--
--/*
-- * Fts_set takes the stream as an argument although it's not used in this
-- * implementation; it would be necessary if anyone wanted to add global
-- * semantics to fts using fts_set.  An error return is allowed for similar
-- * reasons.
-- */
--/* ARGSUSED */
--int
--fts_set(sp, p, instr)
--	FTS __attribute__((__unused__)) *sp;
--	FTSENT *p;
--	int instr;
--{
--sp = NULL;	/* stop compiler whinging */
--	if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
--	    instr != FTS_NOINSTR && instr != FTS_SKIP) {
--		errno = EINVAL;
--		return (1);
--	}
--	p->fts_instr = instr;
--	return (0);
--}
--
--/*
-- * This is the tricky part -- do not casually change *anything* in here.  The
-- * idea is to build the linked list of entries that are used by fts_children
-- * and fts_read.  There are lots of special cases.
-- *
-- * The real slowdown in walking the tree is the stat calls.  If FTS_NOSTAT is
-- * set and it's a physical walk (so that symbolic links can't be directories),
-- * we can do things quickly.  First, if it's a 4.4BSD file system, the type
-- * of the file is in the directory entry.  Otherwise, we assume that the number
-- * of subdirectories in a node is equal to the number of links to the parent.
-- * The former skips all stat calls.  The latter skips stat calls in any leaf
-- * directories and for any files after the subdirectories in the directory have
-- * been found, cutting the stat calls by about 2/3.
-- */
--static FTSENT *
--fts_build(sp, type)
--	register FTS *sp;
--	int type;
--{
--	register struct dirent *dp;
--	register FTSENT *p, *head;
--	register int nitems;
--	FTSENT *cur, *tail;
--	DIR *dirp;
--	void *oldaddr;
--	int cderrno, descend, len, level, nlinks, saved_errno,
--	    nostat, doadjust;
--	size_t maxlen;
--	char *cp;
--
--	/* Set current node pointer. */
--	cur = sp->fts_cur;
--
--	/*
--	 * Open the directory for reading.  If this fails, we're done.
--	 * If being called from fts_read, set the fts_info field.
--	 */
--       if ((dirp = opendir(cur->fts_accpath)) == NULL) {
--		if (type == BREAD) {
--			cur->fts_info = FTS_DNR;
--			cur->fts_errno = errno;
--		}
--		return (NULL);
--	}
--
--	/*
--	 * Nlinks is the number of possible entries of type directory in the
--	 * directory if we're cheating on stat calls, 0 if we're not doing
--	 * any stat calls at all, -1 if we're doing stats on everything.
--	 */
--	nlinks = -1;
--	nostat = 0;
--
--	/*
--	 * If we're going to need to stat anything or we want to descend
--	 * and stay in the directory, chdir.  If this fails we keep going,
--	 * but set a flag so we don't chdir after the post-order visit.
--	 * We won't be able to stat anything, but we can still return the
--	 * names themselves.  Note, that since fts_read won't be able to
--	 * chdir into the directory, it will have to return different path
--	 * names than before, i.e. "a/b" instead of "b".  Since the node
--	 * has already been visited in pre-order, have to wait until the
--	 * post-order visit to return the error.  There is a special case
--	 * here, if there was nothing to stat then it's not an error to
--	 * not be able to stat.  This is all fairly nasty.  If a program
--	 * needed sorted entries or stat information, they had better be
--	 * checking FTS_NS on the returned nodes.
--	 */
--	cderrno = 0;
--	if (nlinks || type == BREAD) {
--		if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
--			if (nlinks && type == BREAD)
--				cur->fts_errno = errno;
--			cur->fts_flags |= FTS_DONTCHDIR;
--			descend = 0;
--			cderrno = errno;
--			(void)closedir(dirp);
--			dirp = NULL;
--		} else
--			descend = 1;
--	} else
--		descend = 0;
--
--	/*
--	 * Figure out the max file name length that can be stored in the
--	 * current path -- the inner loop allocates more path as necessary.
--	 * We really wouldn't have to do the maxlen calculations here, we
--	 * could do them in fts_read before returning the path, but it's a
--	 * lot easier here since the length is part of the dirent structure.
--	 *
--	 * If not changing directories set a pointer so that can just append
--	 * each new name into the path.
--	 */
--	len = NAPPEND(cur);
--	if (ISSET(FTS_NOCHDIR)) {
--		cp = sp->fts_path + len;
--		*cp++ = '/';
--	} else {
--		/* GCC, you're too verbose. */
--		cp = NULL;
--	}
--	len++;
--	maxlen = sp->fts_pathlen - len;
--
--	level = cur->fts_level + 1;
--
--	/* Read the directory, attaching each entry to the `link' pointer. */
--	doadjust = 0;
--	for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
--		if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
--			continue;
--
--		if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
--			goto mem1;
--		if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
--			oldaddr = sp->fts_path;
--			if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
--				/*
--				 * No more memory for path or structures.  Save
--				 * errno, free up the current structure and the
--				 * structures already allocated.
--				 */
--mem1:				saved_errno = errno;
--				if (p)
--					free(p);
--				fts_lfree(head);
--				(void)closedir(dirp);
--				cur->fts_info = FTS_ERR;
--				SET(FTS_STOP);
--				errno = saved_errno;
--				return (NULL);
--			}
--			/* Did realloc() change the pointer? */
--			if (oldaddr != sp->fts_path) {
--				doadjust = 1;
--				if (ISSET(FTS_NOCHDIR))
--					cp = sp->fts_path + len;
--			}
--			maxlen = sp->fts_pathlen - len;
--		}
--
--		if (len + _D_EXACT_NAMLEN (dp) >= 0x10000) {
--			/*
--			 * In an FTSENT, fts_pathlen is a u_short so it is
--			 * possible to wraparound here.  If we do, free up
--			 * the current structure and the structures already
--			 * allocated, then error out with ENAMETOOLONG.
--			 */
--			free(p);
--			fts_lfree(head);
--			(void)closedir(dirp);
--			cur->fts_info = FTS_ERR;
--			SET(FTS_STOP);
--			errno = ENAMETOOLONG;
--			return (NULL);
--		}
--		p->fts_level = level;
--		p->fts_parent = sp->fts_cur;
--		p->fts_pathlen = len + _D_EXACT_NAMLEN (dp);
--
--#if defined FTS_WHITEOUT && 0
--		if (dp->d_type == DT_WHT)
--			p->fts_flags |= FTS_ISW;
--#endif
--
--		if (cderrno) {
--			if (nlinks) {
--				p->fts_info = FTS_NS;
--				p->fts_errno = cderrno;
--			} else
--				p->fts_info = FTS_NSOK;
--			p->fts_accpath = cur->fts_accpath;
--		} else if (nlinks == 0
--#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
--			   || (nostat &&
--			       dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
--#endif
--		    ) {
--			p->fts_accpath =
--			    ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
--			p->fts_info = FTS_NSOK;
--		} else {
--			/* Build a file name for fts_stat to stat. */
--			if (ISSET(FTS_NOCHDIR)) {
--				p->fts_accpath = p->fts_path;
--				memmove(cp, p->fts_name, p->fts_namelen + 1);
--			} else
--				p->fts_accpath = p->fts_name;
--			/* Stat it. */
--			p->fts_info = fts_stat(sp, p, 0);
--
--			/* Decrement link count if applicable. */
--			if (nlinks > 0 && (p->fts_info == FTS_D ||
--			    p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
--				--nlinks;
--		}
--
--		/* We walk in directory order so "ls -f" doesn't get upset. */
--		p->fts_link = NULL;
--		if (head == NULL)
--			head = tail = p;
--		else {
--			tail->fts_link = p;
--			tail = p;
--		}
--		++nitems;
--	}
--	if (dirp)
--		(void)closedir(dirp);
--
--	/*
--	 * If realloc() changed the address of the path, adjust the
--	 * addresses for the rest of the tree and the dir list.
--	 */
--	if (doadjust)
--		fts_padjust(sp, head);
--
--	/*
--	 * If not changing directories, reset the path back to original
--	 * state.
--	 */
--	if (ISSET(FTS_NOCHDIR)) {
--		if (len == sp->fts_pathlen || nitems == 0)
--			--cp;
--		*cp = '\0';
--	}
--
--	/*
--	 * If descended after called from fts_children or after called from
--	 * fts_read and nothing found, get back.  At the root level we use
--	 * the saved fd; if one of fts_open()'s arguments is a relative path
--	 * to an empty directory, we wind up here with no other way back.  If
--	 * can't get back, we're done.
--	 */
--	if (descend && nitems == 0 &&
--	    (cur->fts_level == FTS_ROOTLEVEL ?
--	     FCHDIR(sp, sp->fts_rfd) :
--	     fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
--		cur->fts_info = FTS_ERR;
--		SET(FTS_STOP);
--		return (NULL);
--	}
--
--	/* If didn't find anything, return NULL. */
--	if (!nitems) {
--		if (type == BREAD)
--			cur->fts_info = FTS_DP;
--		return (NULL);
--	}
--
--	/* Sort the entries. */
--	if (sp->fts_compar && nitems > 1)
--		head = fts_sort(sp, head, nitems);
--	return (head);
--}
--
--static u_short
--fts_stat(sp, p, follow)
--	FTS *sp;
--	register FTSENT *p;
--	int follow;
--{
--	register FTSENT *t;
--	register dev_t dev;
--	register ino_t ino;
--	struct stat *sbp;
--	int saved_errno;
--
--	/* If user needs stat info, stat buffer already allocated. */
--	sbp = p->fts_statp;
--
--#if defined FTS_WHITEOUT && 0
--	/* check for whiteout */
--	if (p->fts_flags & FTS_ISW) {
--		if (sbp != &sb) {
--			memset(sbp, '\0', sizeof (*sbp));
--			sbp->st_mode = S_IFWHT;
--		}
--		return (FTS_W);
--       }
--#endif
--
--	/*
--	 * If doing a logical walk, or application requested FTS_FOLLOW, do
--	 * a stat(2).  If that fails, check for a non-existent symlink.  If
--	 * fail, set the errno from the stat call.
--	 */
--	if (ISSET(FTS_LOGICAL) || follow) {
--		if (stat(p->fts_accpath, sbp)) {
--			saved_errno = errno;
--			if (!lstat(p->fts_accpath, sbp)) {
--				errno = 0;
--				return (FTS_SLNONE);
--			}
--			p->fts_errno = saved_errno;
--			goto err;
--		}
--	} else if (lstat(p->fts_accpath, sbp)) {
--		p->fts_errno = errno;
--err:		memset(sbp, 0, sizeof(struct stat));
--		return (FTS_NS);
--	}
--
--	if (S_ISDIR(sbp->st_mode)) {
--		/*
--		 * Set the device/inode.  Used to find cycles and check for
--		 * crossing mount points.  Also remember the link count, used
--		 * in fts_build to limit the number of stat calls.  It is
--		 * understood that these fields are only referenced if fts_info
--		 * is set to FTS_D.
--		 */
--		dev = p->fts_dev = sbp->st_dev;
--		ino = p->fts_ino = sbp->st_ino;
--		p->fts_nlink = sbp->st_nlink;
--
--		if (ISDOT(p->fts_name))
--			return (FTS_DOT);
--
--		/*
--		 * Cycle detection is done by brute force when the directory
--		 * is first encountered.  If the tree gets deep enough or the
--		 * number of symbolic links to directories is high enough,
--		 * something faster might be worthwhile.
--		 */
--		for (t = p->fts_parent;
--		    t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
--			if (ino == t->fts_ino && dev == t->fts_dev) {
--				p->fts_cycle = t;
--				return (FTS_DC);
--			}
--		return (FTS_D);
--	}
--	if (S_ISLNK(sbp->st_mode))
--		return (FTS_SL);
--	if (S_ISREG(sbp->st_mode))
--		return (FTS_F);
--	return (FTS_DEFAULT);
--}
--
--static FTSENT *
--fts_sort(sp, head, nitems)
--	FTS *sp;
--	FTSENT *head;
--	register int nitems;
--{
--	register FTSENT **ap, *p;
--
--	/*
--	 * Construct an array of pointers to the structures and call qsort(3).
--	 * Reassemble the array in the order returned by qsort.  If unable to
--	 * sort for memory reasons, return the directory entries in their
--	 * current order.  Allocate enough space for the current needs plus
--	 * 40 so don't realloc one entry at a time.
--	 */
--	if (nitems > sp->fts_nitems) {
--		struct _ftsent **a;
--
--		sp->fts_nitems = nitems + 40;
--		if ((a = realloc(sp->fts_array,
-- 		    (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
--			free(sp->fts_array);
--			sp->fts_array = NULL;
--			sp->fts_nitems = 0;
--			return (head);
--		}
--		sp->fts_array = a;
--	}
--	for (ap = sp->fts_array, p = head; p; p = p->fts_link)
--		*ap++ = p;
--	qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
--	for (head = *(ap = sp->fts_array); --nitems; ++ap)
--		ap[0]->fts_link = ap[1];
--	ap[0]->fts_link = NULL;
--	return (head);
--}
--
--static FTSENT *
--fts_alloc(sp, name, namelen)
--	FTS *sp;
--	const char *name;
--	register int namelen;
--{
--	register FTSENT *p;
--	size_t len;
--
--	/*
--	 * The file name is a variable length array and no stat structure is
--	 * necessary if the user has set the nostat bit.  Allocate the FTSENT
--	 * structure, the file name and the stat structure in one chunk, but
--	 * be careful that the stat structure is reasonably aligned.  Since the
--	 * fts_name field is declared to be of size 1, the fts_name pointer is
--	 * namelen + 2 before the first possible address of the stat structure.
--	 */
--	len = sizeof(FTSENT) + namelen;
--	len += sizeof(struct stat) + ALIGNBYTES;
--	if ((p = malloc(len)) == NULL)
--		return (NULL);
--
--	/* Copy the name and guarantee NUL termination. */
--	memmove(p->fts_name, name, namelen);
--	p->fts_name[namelen] = '\0';
--
--	p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
--	p->fts_namelen = namelen;
--	p->fts_path = sp->fts_path;
--	p->fts_errno = 0;
--	p->fts_flags = 0;
--	p->fts_instr = FTS_NOINSTR;
--	p->fts_number = 0;
--	p->fts_pointer = NULL;
--	return (p);
--}
--
--static void
--fts_lfree(head)
--	register FTSENT *head;
--{
--	register FTSENT *p;
--
--	/* Free a linked list of structures. */
--	while ((p = head)) {
--		head = head->fts_link;
--		free(p);
--	}
--}
--
--/*
-- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
-- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
-- * though the kernel won't resolve them.  Add the size (not just what's needed)
-- * plus 256 bytes so don't realloc the path 2 bytes at a time.
-- */
--static int
--fts_palloc(sp, more)
--	FTS *sp;
--	size_t more;
--{
--	char *p;
--
--	sp->fts_pathlen += more + 256;
--	/*
--	 * Check for possible wraparound.  In an FTS, fts_pathlen is
--	 * a signed int but in an FTSENT it is an unsigned short.
--	 * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
--	 */
--	if (sp->fts_pathlen < 0 || sp->fts_pathlen >= 0x10000) {
--		if (sp->fts_path) {
--			free(sp->fts_path);
--			sp->fts_path = NULL;
--		}
--		sp->fts_path = NULL;
--		errno = ENAMETOOLONG;
--		return (1);
--	}
--	p = realloc(sp->fts_path, sp->fts_pathlen);
--	if (p == NULL) {
--		free(sp->fts_path);
--		sp->fts_path = NULL;
--		return 1;
--	}
--	sp->fts_path = p;
--	return 0;
--}
--
--/*
-- * When the path is realloc'd, have to fix all of the pointers in structures
-- * already returned.
-- */
--static void
--fts_padjust(sp, head)
--	FTS *sp;
--	FTSENT *head;
--{
--	FTSENT *p;
--	char *addr = sp->fts_path;
--
--#define	ADJUST(p) do {							\
--	if ((p)->fts_accpath != (p)->fts_name) {			\
--		(p)->fts_accpath =					\
--		    (char *)addr + ((p)->fts_accpath - (p)->fts_path);	\
--	}								\
--	(p)->fts_path = addr;						\
--} while (0)
--	/* Adjust the current set of children. */
--	for (p = sp->fts_child; p; p = p->fts_link)
--		ADJUST(p);
--
--	/* Adjust the rest of the tree, including the current level. */
--	for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
--		ADJUST(p);
--		p = p->fts_link ? p->fts_link : p->fts_parent;
--	}
--}
--
--static size_t
--fts_maxarglen(argv)
--	char * const *argv;
--{
--	size_t len, max;
--
--	for (max = 0; *argv; ++argv)
--		if ((len = strlen(*argv)) > max)
--			max = len;
--	return (max + 1);
--}
--
--/*
-- * Change to dir specified by fd or p->fts_accpath without getting
-- * tricked by someone changing the world out from underneath us.
-- * Assumes p->fts_dev and p->fts_ino are filled in.
-- */
--static int
--fts_safe_changedir(sp, p, fd, path)
--	FTS *sp;
--	FTSENT *p;
--	int fd;
--	const char *path;
--{
--	int ret, oerrno, newfd;
--	struct stat sb;
--
--	newfd = fd;
--	if (ISSET(FTS_NOCHDIR))
--		return (0);
--	if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
--		return (-1);
--	if (fstat(newfd, &sb)) {
--		ret = -1;
--		goto bail;
--	}
--	if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
--		errno = ENOENT;		/* disinformation */
--		ret = -1;
--		goto bail;
--	}
--	ret = fchdir(newfd);
--bail:
--	oerrno = errno;
--	if (fd < 0)
--		(void)close(newfd);
--	errno = oerrno;
--	return (ret);
--}
-diff --git a/lib/fts.h b/lib/fts.h
-deleted file mode 100644
-index 58846b9..0000000
---- a/lib/fts.h
-+++ /dev/null
-@@ -1,131 +0,0 @@
--/*
-- * Copyright (c) 1989, 1993
-- *	The Regents of the University of California.  All rights reserved.
-- *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer.
-- * 2. Redistributions in binary form must reproduce the above copyright
-- *    notice, this list of conditions and the following disclaimer in the
-- *    documentation and/or other materials provided with the distribution.
-- * 4. Neither the name of the University nor the names of its contributors
-- *    may be used to endorse or promote products derived from this software
-- *    without specific prior written permission.
-- *
-- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-- *
-- *	@(#)fts.h	8.3 (Berkeley) 8/14/94
-- */
--
--#ifndef	_FTS_H
--#define	_FTS_H 1
--
--#include <features.h>
--#include <sys/types.h>
--
--typedef struct {
--	struct _ftsent *fts_cur;	/* current node */
--	struct _ftsent *fts_child;	/* linked list of children */
--	struct _ftsent **fts_array;	/* sort array */
--	dev_t fts_dev;			/* starting device # */
--	char *fts_path;			/* path for this descent */
--	int fts_rfd;			/* fd for root */
--	int fts_pathlen;		/* sizeof(path) */
--	int fts_nitems;			/* elements in the sort array */
--	int (*fts_compar) (const void *, const void *); /* compare fn */
--
--#define	FTS_COMFOLLOW	0x0001		/* follow command line symlinks */
--#define	FTS_LOGICAL	0x0002		/* logical walk */
--#define	FTS_NOCHDIR	0x0004		/* don't change directories */
--#define	FTS_NOSTAT	0x0008		/* don't get stat info */
--#define	FTS_PHYSICAL	0x0010		/* physical walk */
--#define	FTS_SEEDOT	0x0020		/* return dot and dot-dot */
--#define	FTS_XDEV	0x0040		/* don't cross devices */
--#define FTS_WHITEOUT	0x0080		/* return whiteout information */
--#define	FTS_OPTIONMASK	0x00ff		/* valid user option mask */
--
--#define	FTS_NAMEONLY	0x0100		/* (private) child names only */
--#define	FTS_STOP	0x0200		/* (private) unrecoverable error */
--	int fts_options;		/* fts_open options, global flags */
--} FTS;
--
--typedef struct _ftsent {
--	struct _ftsent *fts_cycle;	/* cycle node */
--	struct _ftsent *fts_parent;	/* parent directory */
--	struct _ftsent *fts_link;	/* next file in directory */
--	long fts_number;	        /* local numeric value */
--	void *fts_pointer;	        /* local address value */
--	char *fts_accpath;		/* access path */
--	char *fts_path;			/* root path */
--	int fts_errno;			/* errno for this node */
--	int fts_symfd;			/* fd for symlink */
--	u_short fts_pathlen;		/* strlen(fts_path) */
--	u_short fts_namelen;		/* strlen(fts_name) */
--
--	ino_t fts_ino;			/* inode */
--	dev_t fts_dev;			/* device */
--	nlink_t fts_nlink;		/* link count */
--
--#define	FTS_ROOTPARENTLEVEL	-1
--#define	FTS_ROOTLEVEL		 0
--	short fts_level;		/* depth (-1 to N) */
--
--#define	FTS_D		 1		/* preorder directory */
--#define	FTS_DC		 2		/* directory that causes cycles */
--#define	FTS_DEFAULT	 3		/* none of the above */
--#define	FTS_DNR		 4		/* unreadable directory */
--#define	FTS_DOT		 5		/* dot or dot-dot */
--#define	FTS_DP		 6		/* postorder directory */
--#define	FTS_ERR		 7		/* error; errno is set */
--#define	FTS_F		 8		/* regular file */
--#define	FTS_INIT	 9		/* initialized only */
--#define	FTS_NS		10		/* stat(2) failed */
--#define	FTS_NSOK	11		/* no stat(2) requested */
--#define	FTS_SL		12		/* symbolic link */
--#define	FTS_SLNONE	13		/* symbolic link without target */
--#define FTS_W		14		/* whiteout object */
--	u_short fts_info;		/* user flags for FTSENT structure */
--
--#define	FTS_DONTCHDIR	 0x01		/* don't chdir .. to the parent */
--#define	FTS_SYMFOLLOW	 0x02		/* followed a symlink to get here */
--	u_short fts_flags;		/* private flags for FTSENT structure */
--
--#define	FTS_AGAIN	 1		/* read node again */
--#define	FTS_FOLLOW	 2		/* follow symbolic link */
--#define	FTS_NOINSTR	 3		/* no instructions */
--#define	FTS_SKIP	 4		/* discard node */
--	u_short fts_instr;		/* fts_set() instructions */
--
--	struct stat *fts_statp;		/* stat(2) information */
--	char fts_name[1];		/* file name */
--} FTSENT;
--
--__BEGIN_DECLS
--
--#define fts_children pax_fts_children
--#define fts_close pax_fts_close
--#define fts_open pax_fts_open
--#define fts_read pax_fts_read
--#define fts_set pax_fts_set
--
--FTSENT	*fts_children (FTS *, int);
--int	 fts_close (FTS *);
--FTS	*fts_open (char * const *, int,
--		   int (*)(const FTSENT **, const FTSENT **));
--FTSENT	*fts_read (FTS *);
--int	 fts_set (FTS *, FTSENT *, int) __THROW;
--__END_DECLS
--
--#endif /* fts.h */
-diff --git a/lib/vis.h b/lib/vis.h
-index d34d342..71fa5f4 100644
---- a/lib/vis.h
-+++ b/lib/vis.h
-@@ -73,14 +73,19 @@
-  */
- #define	UNVIS_END	1	/* no more characters */
- 
--#include <sys/cdefs.h>
-+#ifndef __P
-+#define __P(x) x
-+#endif
- 
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- char	*vis __P((char *, int, int, int));
- int	strvis __P((char *, const char *, int));
- int	strvisx __P((char *, const char *, size_t, int));
- int	strunvis __P((char *, const char *));
- int	unvis __P((char *, char, int *, int));
--__END_DECLS
--
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* !_VIS_H_ */
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5ef52a3..227cdef 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -22,4 +22,4 @@ pax_SOURCES = ar_io.c ar_subs.c buf_subs.c cache.c cpio.c\
- 	file_subs.c ftree.c gen_subs.c getoldopt.c options.c\
- 	pat_rep.c pax.c sel_subs.c tables.c tar.c tty_subs.c
- 
--pax_LDADD = $(top_builddir)/lib/libbsdfunc.a
-+pax_LDADD = $(top_builddir)/lib/libbsdfunc.a -lfts
-diff --git a/src/extern.h b/src/extern.h
-index 361fa81..3ed365d 100644
---- a/src/extern.h
-+++ b/src/extern.h
-@@ -37,8 +37,6 @@
-  * External references from each source file
-  */
- 
--#include <sys/cdefs.h>
--
- /*
-  * ar_io.c
-  */
-diff --git a/src/file_subs.c b/src/file_subs.c
-index 5590ff1..15bc339 100644
---- a/src/file_subs.c
-+++ b/src/file_subs.c
-@@ -52,7 +52,7 @@
- #include "extern.h"
- 
- static int
--mk_link __P((register char *,register struct stat *,register char *, int));
-+mk_link (register char *,register struct stat *,register char *, int);
- 
- /*
-  * routines that deal with file operations such as: creating, removing;
-diff --git a/src/tables.c b/src/tables.c
-index 2275bf7..8fddca4 100644
---- a/src/tables.c
-+++ b/src/tables.c
-@@ -39,7 +39,7 @@
- #include <sys/time.h>
- #include <sys/stat.h>
- #include <sys/param.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
--- 
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch
deleted file mode 100644
index 1d969bc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-include-sys-sysmacros.h-for-major-minor-definitions.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 7f4f379f8343c0ce92aa30f3f9037288a089a902 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 18 Dec 2016 08:24:56 +0000
-Subject: [PATCH] include <sys/sysmacros.h> for major/minor definitions
-
-glibc 2.25 will error out if the applications are expecting
-this to come from sys/types.h, it is being removed from
-there.
-
-Fixes
-
-error: In the GNU C Library, "minor" is defined
-|  by <sys/sysmacros.h>. For historical compatibility, it is
-|  currently defined by <sys/types.h> as well, but we plan to
-|  remove this soon. To use "minor", include <sys/sysmacros.h>
-|  directly. If you did not intend to use a system-defined macro
-|  "minor", you should undefine it after including <sys/types.h>. [-Werror]
-|        ul_oct ((u_long) MINOR (arcn->sb.st_rdev), hd->devminor,
-|              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/cpio.c     | 2 +-
- src/gen_subs.c | 2 +-
- src/tar.c      | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-Index: pax-3.4/src/cpio.c
-===================================================================
---- pax-3.4.orig/src/cpio.c
-+++ pax-3.4/src/cpio.c
-@@ -36,6 +36,7 @@
- #include "config.h"
- #endif
- 
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/stat.h>
-Index: pax-3.4/src/gen_subs.c
-===================================================================
---- pax-3.4.orig/src/gen_subs.c
-+++ pax-3.4/src/gen_subs.c
-@@ -37,6 +37,7 @@
- #include "config.h"
- #endif
- 
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/stat.h>
-Index: pax-3.4/src/tar.c
-===================================================================
---- pax-3.4.orig/src/tar.c
-+++ pax-3.4/src/tar.c
-@@ -37,6 +37,7 @@
- #include "config.h"
- #endif
- 
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/stat.h>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
deleted file mode 100644
index 58ac9ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b1f50320332c9c90fa33ab136ef0ec2d12cda461 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 6 Jan 2016 12:30:52 -0800
-Subject: [PATCH] use strtoll instead of strtoq
-
-Use LLONG_MAX instead of LONG_LONG_MAX
-LONG_LONG_MAX is GNU specific
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/options.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/options.c b/src/options.c
-index da8b4cf..c663b4e 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -1547,8 +1547,8 @@ str_offt (char *val)
- 
- #if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-     || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
--  num = strtoq (val, &expr, 0);
--  if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
-+  num = strtoll (val, &expr, 0);
-+  if ((num == LLONG_MAX) || (num <= 0) || (expr == val))
- #else
-   num = strtol (val, &expr, 0);
-   if ((num == LONG_MAX) || (num <= 0) || (expr == val))
--- 
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
deleted file mode 100644
index 88779c3..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes this compiler error with gcc 4.6.0
-
-Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08
-
-| fts.c: In function 'pax_fts_set':
-| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter]
-| cc1: all warnings being treated as errors
-| 
-| make[2]: *** [fts.o] Error 1
-
-Index: pax-3.4/lib/fts.c
-===================================================================
---- pax-3.4.orig/lib/fts.c
-+++ pax-3.4/lib/fts.c
-@@ -466,7 +466,7 @@ name:		t = sp->fts_path + NAPPEND(p->fts
- /* ARGSUSED */
- int
- fts_set(sp, p, instr)
--	FTS *sp;
-+	FTS __attribute__((__unused__)) *sp;
- 	FTSENT *p;
- 	int instr;
- {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
deleted file mode 100644
index 7adbd02..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-Upstream-Status: Pending
-
-Author: H.J. Lu <hjl.tools@gmail.com>
-Date:   Tue Dec 6 10:34:53 2011 -0800
-
-    Fix pax-3.4 build for x32
-    
-    off_t is 8byte for x32.  We need to check both _FILE_OFFSET_BITS and
-    size of off_t to see if file offset is 64bit.  This patch adds
-    AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
-
-Index: pax-3.4/configure.in
-===================================================================
---- pax-3.4.orig/configure.in
-+++ pax-3.4/configure.in
-@@ -33,4 +33,7 @@ dnl Checks for header files.
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- 
-+AC_CHECK_SIZEOF(off_t)
-+AC_CHECK_SIZEOF(long)
-+
- AC_OUTPUT([Makefile lib/Makefile src/Makefile])
-Index: pax-3.4/src/ar_io.c
-===================================================================
---- pax-3.4.orig/src/ar_io.c
-+++ pax-3.4/src/ar_io.c
-@@ -378,7 +378,8 @@ ar_close(void)
- 	 * could have written anything yet.
- 	 */
- 	if (frmt == NULL) {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- 		(void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
- #else
- 		(void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
-@@ -391,7 +392,8 @@ ar_close(void)
- 
- 	if (strcmp(NM_CPIO, argv0) == 0)
- 		(void)fprintf(listf,
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- 		    "%qu blocks\n",
- #else
- 		    "%lu blocks\n",
-@@ -399,7 +401,8 @@ ar_close(void)
- 			(rdcnt ? rdcnt : wrcnt) / 5120);
- 	else if (strcmp(NM_TAR, argv0) != 0)
- 		(void)fprintf(listf,
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- 		    "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
- #else
- 		    "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
-Index: pax-3.4/src/cpio.c
-===================================================================
---- pax-3.4.orig/src/cpio.c
-+++ pax-3.4/src/cpio.c
-@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn)
- 	 */
- 	if ((arcn->sb.st_size == 0) ||
- 	    (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- 		paxwarn (1, "Cpio link name length is invalid: %qu",
- 			 arcn->sb.st_size);
- #else
-Index: pax-3.4/src/gen_subs.c
-===================================================================
---- pax-3.4.orig/src/gen_subs.c
-+++ pax-3.4/src/gen_subs.c
-@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
-    * print device id's for devices, or sizes for other nodes
-    */
-   if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-     (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev),
- 		    (unsigned long) MINOR (sbp->st_rdev));
- #else
-@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
- #endif
-   else
-     {
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-       (void) fprintf (fp, "%9qu ", sbp->st_size);
- #else
-       (void) fprintf (fp, "%9lu ", sbp->st_size);
-@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len, 
-   return (0);
- }
- 
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- /*
-  * asc_uqd()
-  *	convert hex/octal character string into a u_quad_t. We do not have to
-Index: pax-3.4/src/options.c
-===================================================================
---- pax-3.4.orig/src/options.c
-+++ pax-3.4/src/options.c
-@@ -1545,7 +1545,8 @@ str_offt (char *val)
-   char *expr;
-   off_t num, t;
- 
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-   num = strtoq (val, &expr, 0);
-   if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
- #else
-Index: pax-3.4/src/tar.c
-===================================================================
---- pax-3.4.orig/src/tar.c
-+++ pax-3.4/src/tar.c
-@@ -58,7 +58,8 @@
- static unsigned long tar_chksm (char *, int);
- static char *name_split (char *, int);
- static int ul_oct (u_long, char *, int, int);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- static int uqd_oct (u_quad_t, char *, int, int);
- #endif
- 
-@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str, 
-   return (0);
- }
- 
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- /*
-  * uqd_oct()
-  *	convert an u_quad_t to an octal string. one of many oddball field
-@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf)
- 			       0xfff);
-   arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT);
-   arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-   arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
- #else
-   arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
-@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn)
-        * data follows this file, so set the pad
-        */
-       hd->linkflag = AREGTYPE;
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-       if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
- 		   sizeof (hd->size), 1))
- #else
-@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf)
-    */
-   arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) &
- 			       0xfff);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-   arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
- #else
-   arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
-@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn)
-       else
- 	hd->typeflag = REGTYPE;
-       arcn->pad = TAR_PAD (arcn->sb.st_size);
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
-+    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
-       if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
- 		   sizeof (hd->size), 3))
- 	{
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb b/import-layers/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
deleted file mode 100644
index 6df9a81..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Portable Archive eXchange"
-DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
-HOMEPAGE = "http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
-BUGTRACKER = "http://www.openbsd.org/query-pr.html"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
-                    file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \
-                    file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \
-                    file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053"
-
-SECTION = "base"
-PR = "r2"
-
-DEPENDS_append_libc-musl = " fts "
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
-           file://fix_for_compile_with_gcc-4.6.0.patch \
-           file://pax-3.4_fix_for_x32.patch \
-           file://0001-include-sys-sysmacros.h-for-major-minor-definitions.patch \
-           file://0001-Add-a-comment-for-fallthrough.patch \
-           "
-
-SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \
-                             file://0001-use-strtoll-instead-of-strtoq.patch \
-                           "
-
-SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
-SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
-
-inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
index 170e7ec..644d820 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
@@ -10,7 +10,7 @@
 
 S = "${WORKDIR}/Convert-ASN1-${PV}"
 
-inherit cpan
+inherit cpan ptest-perl
 
 EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
index 427613c..8e1461c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
@@ -9,7 +9,7 @@
 
 S = "${WORKDIR}/TimeDate-${PV}"
 
-inherit cpan
+inherit cpan ptest-perl
 
 BBCLASSEXTEND = "native"
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
index 3498a28..fa9f995 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.12.bb
@@ -6,18 +6,22 @@
 
 SECTION = "libs"
 LICENSE = "Artistic-1.0 | GPL-1.0+"
-PR = "r3"
 
-LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=9ca1a4a941496e7feedac72c4fb8b137"
+SRCNAME = "XML-NamespaceSupport"
 
-SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c9d8a117e7620b5adf8d69c29613ceab"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/P/PE/PERIGRIN/${SRCNAME}-${PV}.tar.gz"
 SRC_URI[md5sum] = "a8916c6d095bcf073e1108af02e78c97"
 SRC_URI[sha256sum] = "47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef"
 
+UPSTREAM_CHECK_REGEX = "XML\-NamespaceSupport\-(?P<pver>(\d+\.\d+))(?!_\d+).tar"
 
-S = "${WORKDIR}/XML-NamespaceSupport-${PV}"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit cpan
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test-more"
 
 BBCLASSEXTEND="native"
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
index cd3a580..b3e01e9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-base-perl_1.09.bb
@@ -19,6 +19,6 @@
 
 S = "${WORKDIR}/XML-SAX-Base-${PV}"
 
-inherit cpan
+inherit cpan ptest-perl
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
index ad31b9c..cdcbebf 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
@@ -23,6 +23,11 @@
 
 S = "${WORKDIR}/XML-SAX-${PV}"
 
-inherit cpan
+inherit cpan ptest-perl
+
+do_install_ptest() {
+	cp -r ${B}/testfiles ${D}${PTEST_PATH}
+	chown -R root:root ${D}${PTEST_PATH}/testfiles
+}
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz.inc b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz.inc
deleted file mode 100644
index 978f905..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "A parallel implementation of gzip"
-DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
-fully functional replacement for gzip that exploits multiple processors and \
-multiple cores to the hilt when compressing data. pigz was written by Mark \
-Adler, and uses the zlib and pthread libraries."
-HOMEPAGE = "http://zlib.net/pigz/"
-SECTION = "console/utils"
-LICENSE = "Zlib & Apache-2.0"
-
-PROVIDES_class-native += "gzip-native"
-
-DEPENDS = "zlib"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-inherit update-alternatives
-
-do_install_class-target() {
-	# Install files into /bin (FHS), which is typical place for gzip
-	install -d ${D}${base_bindir}
-	install ${B}/pigz ${D}${base_bindir}/pigz
-	ln -nsf pigz ${D}${base_bindir}/unpigz
-	ln -nsf pigz ${D}${base_bindir}/pigzcat
-}
-
-do_install() {
-	install -d ${D}${bindir}
-	install ${B}/pigz ${D}${bindir}/gzip
-	ln -nsf gzip ${D}${bindir}/gunzip
-	ln -nsf gzip ${D}${bindir}/zcat
-}
-
-ALTERNATIVE_PRIORITY = "80"
-ALTERNATIVE_${PN} = "gunzip gzip zcat"
-ALTERNATIVE_${PN}_class-nativesdk = ""
-ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
-ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
-ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
-ALTERNATIVE_TARGET = "${base_bindir}/pigz"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.4.bb b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.4.bb
deleted file mode 100644
index f4832df..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.4.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require pigz.inc
-LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
-
-UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
-UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
-SRC_URI = "https://github.com/madler/pigz/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
-SRC_URI[md5sum] = "c109057050b15edf3eb9bb4d0805235e"
-SRC_URI[sha256sum] = "763f2fdb203aa0b7b640e63385e38e5dd4e5aaa041bc8e42aa96f2ef156b06e8"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.4.bb b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.4.bb
new file mode 100644
index 0000000..6e6da9c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.4.bb
@@ -0,0 +1,30 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/"
+SECTION = "console/utils"
+LICENSE = "Zlib & Apache-2.0"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
+
+SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
+SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df"
+SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73"
+# Point this at the homepage in case /fossils/ isn't updated
+UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
+UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
+
+DEPENDS = "zlib"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_install() {
+	# Install files into /bin (FHS), which is typical place for gzip
+	install -d ${D}${base_bindir}
+	install ${B}/pigz ${D}${base_bindir}/pigz
+	ln -nsf pigz ${D}${base_bindir}/unpigz
+	ln -nsf pigz ${D}${base_bindir}/pigzcat
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb b/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
index adabd75..ecf215f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
@@ -1,7 +1,7 @@
 SUMMARY = "System and process monitoring utilities"
 DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
 the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
-HOMEPAGE = "https://gitorious.org/procps"
+HOMEPAGE = "https://gitlab.com/procps-ng/procps"
 SECTION = "base"
 LICENSE = "GPLv2+ & LGPLv2+"
 LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
@@ -23,8 +23,6 @@
 
 EXTRA_OECONF = "--enable-skill --disable-modern-top"
 
-CPPFLAGS += "-I${S}"
-
 do_install_append () {
 	install -d ${D}${base_bindir}
 	[ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
@@ -44,7 +42,7 @@
 
 CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
 
-bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
 base_bindir_progs += "kill pidof ps watch"
 base_sbindir_progs += "sysctl"
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
deleted file mode 100644
index e57d60f..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001
-From: Brad Jorsch <anomie@users.sourceforge.net>
-Date: Fri, 28 Feb 2014 21:55:02 +1100
-Subject: [PATCH] Typo in fuser makes -M on all the time
-
-Brad found that fuser had the -M option on all the time.
-A simple but significant typo caused this, thanks the the patch.
-
-Bug-Debian: http://bugs.debian.org/740275
-
-Upstream-Status: Backport
-
-Signed-off-by: Craig Small <csmall@enc.com.au>
----
- ChangeLog   | 4 ++++
- src/fuser.c | 2 +-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index fd1cccf..e5f784c 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,7 @@
-+Changes in 22.22
-+================
-+	* Fixed typo in fuser which has -M on Debian #740275
-+
- Changes in 22.21
- ================
- 	* Missing comma in fuser(1) added Debian #702391
-diff --git a/src/fuser.c b/src/fuser.c
-index b485f65..389b302 100644
---- a/src/fuser.c
-+++ b/src/fuser.c
-@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[])
- 		usage(_("No process specification given"));
- 
- 	/* Check if -M flag was used and if so check mounts */
--	if (opts * OPT_ISMOUNTPOINT) {
-+	if (opts & OPT_ISMOUNTPOINT) {
- 	    check_mountpoints(&mounts, &names_head, &names_tail);
- 	}
- 
--- 
-1.8.4.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
deleted file mode 100644
index c8afcac..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Wed, 20 Aug 2014 10:31:37 +0000
-Subject: [PATCH] Include <limits.h> for PATH_MAX
-
-When building against musl libc, PATH_MAX is defined in <limits.h>.
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-
-Upstream-Status: Accepted (Should be in next release after 22.21)
----
- src/pstree.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/pstree.c b/src/pstree.c
-index 071e6c4..0d28260 100644
---- a/src/pstree.c
-+++ b/src/pstree.c
-@@ -41,6 +41,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/ioctl.h>
-+#include <limits.h>
- 
- #include "i18n.h"
- #include "comm.h"
--- 
-2.0.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
index 66a784b..82ef947 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
@@ -16,6 +16,15 @@
 
 inherit autotools gettext
 
+# Upstream has a custom autogen.sh which invokes po/update-potfiles as they 
+# don't ship a po/POTFILES.in (which is silly).  Without that file gettext 
+# doesn't believe po/ is a gettext directory and won't generate po/Makefile.
+EXTRA_AUTORECONF_remove = "--exclude=autopoint"
+do_configure_prepend() {
+    ( cd ${S} && po/update-potfiles )
+}
+
+
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch
new file mode 100644
index 0000000..4d44495
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch
@@ -0,0 +1,30 @@
+From 285877b7761d74736aca2687ed9bef2f78b82c33 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 2 Nov 2017 16:21:22 +0200
+Subject: [PATCH] Makefile.am: create src directory before attempting to write
+ there
+
+Otherwise out of tree builds will fail.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 9f61ab4..b4ced7f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -79,7 +79,7 @@ EXTRA_DIST = src/signames.c README.md
+ CLEANFILES = src/signames.h
+ 
+ src/signames.h: src/signames.c Makefile
+-		export LC_ALL=C ; \
++		export LC_ALL=C ; mkdir -p src ; \
+ 		@CPP@ -dM $< |\
+ 		tr -s '\t ' ' ' | sort -n -k 3 | sed \
+ 	's:#define SIG\([A-Z][A-Z]*[0-9]*\) \([0-9][0-9]*\).*$\:{\ \2,"\1" },:p;d' | \
+-- 
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
deleted file mode 100644
index 1c6473e..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require psmisc.inc
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
-SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
-           file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
-           file://0002-Include-limits.h-for-PATH_MAX.patch \
-           file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
-           "
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_23.0.bb b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_23.0.bb
new file mode 100644
index 0000000..2b07f49
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc_23.0.bb
@@ -0,0 +1,10 @@
+require psmisc.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https \
+           file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
+	   file://0001-Makefile.am-create-src-directory-before-attempting-t.patch \
+           "
+SRCREV = "67b1da268f4c0ce6859980e3dfcfaec5b2448e80"
+S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
deleted file mode 100644
index 6add470..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 776757a23e9930588950c7fcbc7827ec7a3e51c4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
-Date: Mon, 4 Jan 2016 15:48:19 +0100
-Subject: [PATCH] Do not accidentaly override commandline passed CFLAGS.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport
-
-Signed-off-by: Tomáš Chvátal <tchvatal@suse.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3ba1386..1552c15 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [
- # ================
- # Check for cflags
- # ================
--CFLAGS="-D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-+CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
- AC_ARG_ENABLE([werror],
-     [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])],
-     [enable_werror="$enableval"],
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
deleted file mode 100644
index a79e477..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 39fd30ce57e3c34c3649866bf9345a71f0b78667 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Mon, 4 Jan 2016 15:10:53 +0100
-Subject: [PATCH] Fix build with disabled ldap
-
-Upstream-Status: Backport
-
-Reported-by: Tomas Chvatal <tchvatal@suse.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- warnquota.c | 36 ++++++++++++++++++------------------
- 1 file changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/warnquota.c b/warnquota.c
-index 3734f0e..e9868c1 100644
---- a/warnquota.c
-+++ b/warnquota.c
-@@ -109,13 +109,13 @@ struct configparams {
- 	char *user_signature;
- 	char *group_message;
- 	char *group_signature;
-+	time_t cc_before;
-+#ifdef USE_LDAP_MAIL_LOOKUP
- 	int use_ldap_mail; /* 0 */
-+	int ldap_is_setup; /* 0 */
- 	int ldap_starttls; /* 0 */
- 	int ldap_tls; /* LDAP_OPT_X_TLS_NEVER */
- 	int ldap_vers; /* LDAP_VERSION3 */
--	time_t cc_before;
--#ifdef USE_LDAP_MAIL_LOOKUP
--	int ldap_is_setup; /* 0 */
- 	char ldap_host[CNF_BUFFER];
- 	int ldap_port;
- 	char ldap_uri[CNF_BUFFER];
-@@ -729,13 +729,13 @@ static int readconfigfile(const char *filename, struct configparams *config)
- 	}
- 	maildev[0] = 0;
- 	config->user_signature = config->user_message = config->group_signature = config->group_message = NULL;
-+	config->cc_before = -1;
-+
-+#ifdef USE_LDAP_MAIL_LOOKUP
- 	config->use_ldap_mail = 0;
- 	config->ldap_starttls = 0;
- 	config->ldap_tls = LDAP_OPT_X_TLS_NEVER;
- 	config->ldap_vers = LDAP_VERSION3;
--	config->cc_before = -1;
--
--#ifdef USE_LDAP_MAIL_LOOKUP
- 	config->ldap_port = config->ldap_is_setup = 0;
- 	config->ldap_host[0] = 0;
- 	config->ldap_uri[0] = 0;
-@@ -820,6 +820,18 @@ static int readconfigfile(const char *filename, struct configparams *config)
- 				create_eoln(config->group_signature);
- 				verify_format(config->group_signature, "GROUP_SIGNATURE");
- 			}
-+			else if (!strcmp(var, "CC_BEFORE")) {
-+				int num;
-+				char unit[10];
-+
-+				if (sscanf(value, "%d%s", &num, unit) != 2)
-+					goto cc_parse_err;
-+				if (str2timeunits(num, unit, &config->cc_before) < 0) {
-+cc_parse_err:
-+					die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
-+				}
-+			}
-+#ifdef USE_LDAP_MAIL_LOOKUP
- 			else if (!strcmp(var, "LDAP_MAIL")) {
- 				if(strcasecmp(value, "true") == 0) 
- 					config->use_ldap_mail = 1;
-@@ -846,18 +858,6 @@ static int readconfigfile(const char *filename, struct configparams *config)
- 				else
- 					config->ldap_starttls = 0;
- 			}
--			else if (!strcmp(var, "CC_BEFORE")) {
--				int num;
--				char unit[10];
--
--				if (sscanf(value, "%d%s", &num, unit) != 2)
--					goto cc_parse_err;
--				if (str2timeunits(num, unit, &config->cc_before) < 0) {
--cc_parse_err:
--					die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
--				}
--			}
--#ifdef USE_LDAP_MAIL_LOOKUP
- 			else if (!strcmp(var, "LDAP_HOST"))
- 				sstrncpy(config->ldap_host, value, CNF_BUFFER);
- 			else if (!strcmp(var, "LDAP_PORT"))
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
deleted file mode 100644
index 6fb2daf..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From feca6d2e55d992bbe176ee8faa734c105eb1b2e1 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 29 Mar 2016 20:48:05 -0400
-Subject: [PATCH] Use NGROUPS_MAX instead of NGROUPS
-
-NGRROUPS_MAX is what is defined by SuSv3; NGROUPS is not guaranteed by
-any standard, but is just an ancient BSD'ism.  Since Android's bionic
-libc has the former but not the latter, let's use NGROUPS_MAX instead.
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- quota.c    | 5 +++--
- quotaops.c | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/quota.c b/quota.c
-index 049dac4..e195ead 100644
---- a/quota.c
-+++ b/quota.c
-@@ -48,6 +48,7 @@
- #include <errno.h>
- #include <string.h>
- #include <unistd.h>
-+#include <limits.h>
- #ifdef RPC
- #include <rpc/rpc.h>
- #include "rquota.h"
-@@ -296,7 +297,7 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
- int main(int argc, char **argv)
- {
- 	int ngroups;
--	gid_t gidset[NGROUPS], *gidsetp;
-+	gid_t gidset[NGROUPS_MAX], *gidsetp;
- 	int i, ret;
- 	struct option long_opts[] = {
- 		{ "help", 0, NULL, 'h' },
-@@ -405,7 +406,7 @@ int main(int argc, char **argv)
- 			ret |= showquotas(USRQUOTA, getuid(), argc, argv);
- 		if (flags & FL_GROUP) {
- 			ngroups = sysconf(_SC_NGROUPS_MAX);
--			if (ngroups > NGROUPS) {
-+			if (ngroups > NGROUPS_MAX) {
- 				gidsetp = malloc(ngroups * sizeof(gid_t));
- 				if (!gidsetp)
- 					die(1, _("Gid set allocation (%d): %s\n"), ngroups, strerror(errno));
-diff --git a/quotaops.c b/quotaops.c
-index 136aec3..590dc1b 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -51,6 +51,7 @@
- #include <unistd.h>
- #include <time.h>
- #include <ctype.h>
-+#include <limits.h>
- 
- #if defined(RPC)
- #include "rquota.h"
-@@ -97,7 +98,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
- #if defined(BSD_BEHAVIOUR)
- 	int j, ngroups;
- 	uid_t euid;
--	gid_t gidset[NGROUPS], *gidsetp;
-+	gid_t gidset[NGROUPS_MAX], *gidsetp;
- #endif
- 
- 	for (i = 0; handles[i]; i++) {
-@@ -115,7 +116,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
- 				if (geteuid() == 0)
- 					break;
- 				ngroups = sysconf(_SC_NGROUPS_MAX);
--				if (ngroups > NGROUPS) {
-+				if (ngroups > NGROUPS_MAX) {
- 					gidsetp = malloc(ngroups * sizeof(gid_t));
- 					if (!gidsetp) {
- 						gid2group(id, name);
--- 
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
deleted file mode 100644
index 6cea548..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From f30e1ada8326463cc0af048afa058bc2f1dc9370 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 29 Mar 2016 20:48:04 -0400
-Subject: [PATCH] Allow building on systems that do not have rpc header files
-
-Android's bionic C library doesn't have Sun RPC support.
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- Makefile.am | 30 ++++++++++++++++--------------
- quotaops.c  |  2 ++
- setquota.c  |  2 ++
- 3 files changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 6d7ea0e..82db99f 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,5 @@
- ACLOCAL_AMFLAGS = -I m4
- 
--BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
--
- docdir = $(datadir)/doc/@PACKAGE@
- doc_DATA = \
- 	README.mailserver \
-@@ -12,11 +10,6 @@ doc_DATA = \
- 	doc/quotas.preformated \
- 	doc/quotas-1.eps
- 
--rpcsvcdir = $(includedir)/rpcsvc
--rpcsvc_DATA = \
--	rquota.h \
--	rquota.x
--
- sysconf_DATA = \
- 	warnquota.conf \
- 	quotatab \
-@@ -35,15 +28,12 @@ man_MANS = \
- 	quota.1 \
- 	quot.8 \
- 	repquota.8 \
--	rpc.rquotad.8 \
- 	rquota.3 \
- 	setquota.8 \
- 	warnquota.conf.5 \
- 	warnquota.8 \
- 	xqmstats.8
- 
--CLEANFILES = rquota.c rquota.h rquota_clnt.c
--
- SUBDIRS = po
- 
- EXTRA_DIST = \
-@@ -55,9 +45,15 @@ EXTRA_DIST = \
- 	Changelog \
- 	ldap-scripts
- 
--noinst_LIBRARIES = \
--	libquota.a \
--	librpcclient.a
-+noinst_LIBRARIES = libquota.a
-+
-+if WITH_RPC
-+rpcsvcdir = $(includedir)/rpcsvc
-+rpcsvc_DATA = \
-+	rquota.h \
-+	rquota.x
-+
-+noinst_LIBRARIES += librpcclient.a
- 
- librpcclient_a_SOURCES = \
- 	rquota.c \
-@@ -67,8 +63,10 @@ librpcclient_a_SOURCES = \
- 	rquota_clnt.c
- librpcclient_a_CFLAGS = -Wno-unused
- 
--if WITH_RPC
- RPCLIBS = librpcclient.a
-+BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
-+CLEANFILES = rquota.c rquota.h rquota_clnt.c
-+man_MANS += rpc.rquotad.8
- endif
- 
- libquota_a_SOURCES = \
-@@ -217,6 +215,7 @@ convertquota_LDADD = \
- 	libquota.a \
- 	$(RPCLIBS)
- 
-+if WITH_RPC
- rpc_rquotad_SOURCES = \
- 	rquota_server.c \
- 	rquota_svc.c \
-@@ -225,6 +224,7 @@ rpc_rquotad_LDADD = \
- 	libquota.a \
- 	$(WRAP_LIBS) \
- 	$(RPCLIBS)
-+endif
- 
- quota_nld_SOURCES = quota_nld.c
- quota_nld_CFLAGS = \
-@@ -236,6 +236,7 @@ quota_nld_LDADD = \
- 	$(DBUS_LIBS) \
- 	$(LIBNL3_LIBS)
- 
-+if WITH_RPC
- # ------------------
- # Rpcgen conversions
- # ------------------
-@@ -250,6 +251,7 @@ quota_nld_LDADD = \
- rquota_clnt.c: rquota.x
- 	@rm -f $@
- 	@$(RPCGEN) -l -o $@ $<
-+endif
- 
- # --------
- # Quotaoff
-diff --git a/quotaops.c b/quotaops.c
-index 47ef9a7..136aec3 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -34,7 +34,9 @@
- 
- #include "config.h"
- 
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/file.h>
-diff --git a/setquota.c b/setquota.c
-index 51d7b3c..8ecd9c3 100644
---- a/setquota.c
-+++ b/setquota.c
-@@ -7,7 +7,9 @@
- 
- #include "config.h"
- 
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <errno.h>
- #include <stdio.h>
--- 
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
deleted file mode 100644
index 1455384..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From c7a76237e7a51a69d0236ebfc191e462f805cf4e Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Mon, 15 Feb 2016 14:42:14 +0100
-Subject: [PATCH] Don't build rpc.rquotad when --disable-rpc was requested.
-
-This fixes a buch of undefined references:
-
-x86_64-pc-linux-gnu-gcc  -march=native -mtune=native -O2 -pipe -D_GNU_SOURCE -Wa
-ll -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pie -Wl,-O1 -Wl,--hash-st
-yle=gnu -Wl,--sort-common -Wl,--as-needed -o rpc.rquotad rquota_server.o rquota_
-svc.o svc_socket.o libquota.a
-rquota_svc.o: In function `rquotaprog_2':
-rquota_svc.c:(.text+0x1d3): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x1da): undefined reference to `xdr_ext_setquota_args'
-rquota_svc.c:(.text+0x2b2): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x2b9): undefined reference to `xdr_ext_setquota_args'
-rquota_svc.c:(.text+0x2ff): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x306): undefined reference to `xdr_ext_getquota_args'
-rquota_svc.c:(.text+0x31a): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x321): undefined reference to `xdr_ext_getquota_args'
-rquota_svc.o: In function `rquotaprog_1':
-rquota_svc.c:(.text+0x3f3): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x3fa): undefined reference to `xdr_setquota_args'
-rquota_svc.c:(.text+0x4d2): undefined reference to `xdr_setquota_rslt'
-rquota_svc.c:(.text+0x4d9): undefined reference to `xdr_setquota_args'
-rquota_svc.c:(.text+0x51f): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x526): undefined reference to `xdr_getquota_args'
-rquota_svc.c:(.text+0x53a): undefined reference to `xdr_getquota_rslt'
-rquota_svc.c:(.text+0x541): undefined reference to `xdr_getquota_args'
-collect2: error: ld returned 1 exit status
-Makefile:901: recipe for target 'rpc.rquotad' failed
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- Makefile.am | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 77f8400..6d7ea0e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -116,8 +116,11 @@ sbin_PROGRAMS = \
- 	xqmstats \
- 	edquota \
- 	setquota \
--	convertquota \
-+	convertquota
-+if WITH_RPC
-+sbin_PROGRAMS += \
- 	rpc.rquotad
-+endif
- if WITH_NETLINK
- sbin_PROGRAMS += \
- 	quota_nld
--- 
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
deleted file mode 100644
index bdb4cea..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From c4b56ee58b9b76d2598535cf6109a27b22e60abe Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Wed, 30 Mar 2016 10:21:13 +0200
-Subject: [PATCH] Fix warnings due to missing stdlib.h
-
-When compiling without RPC, we do not get stdlib.h automatically
-included via other includes and thus miss some function definitions.
-Include stdlib.h explicitely.
-
-Signed-off-by: Jan Kara <jack@suse.cz>
----
- quotaops.c | 1 +
- setquota.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/quotaops.c b/quotaops.c
-index 590dc1b..56cf622 100644
---- a/quotaops.c
-+++ b/quotaops.c
-@@ -52,6 +52,7 @@
- #include <time.h>
- #include <ctype.h>
- #include <limits.h>
-+#include <stdlib.h>
- 
- #if defined(RPC)
- #include "rquota.h"
-diff --git a/setquota.c b/setquota.c
-index 8ecd9c3..421631e 100644
---- a/setquota.c
-+++ b/setquota.c
-@@ -17,6 +17,7 @@
- #include <getopt.h>
- #include <time.h>
- #include <ctype.h>
-+#include <stdlib.h>
- 
- #if defined(RPC)
- #include "rquota.h"
--- 
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
index 9ca2ffc..4687ca0 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
@@ -1,20 +1,32 @@
-Replace getrpcbynumber_r with getrpcbynumber
+From a3808fd165847298d025971eb3c7be7d11caba9d Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 8 Nov 2017 11:56:55 +0200
+Subject: [PATCH] Replace getrpcbynumber_r with getrpcbynumber
+
 musl and uclibc dont implement it
 
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: quota-tools/svc_socket.c
-===================================================================
---- quota-tools.orig/svc_socket.c
-+++ quota-tools/svc_socket.c
-@@ -55,7 +55,8 @@ static int svc_socket (u_long number, in
- 	addr.sin_family = AF_INET;
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ svc_socket.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/svc_socket.c b/svc_socket.c
+index 8a44604..5bdaaa0 100644
+--- a/svc_socket.c
++++ b/svc_socket.c
+@@ -36,7 +36,8 @@ static int get_service_port(u_long number, const char *proto)
+ 	struct servent servbuf, *servp = NULL;
+ 	int ret;
  
- 	if (!port) {
--		ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
-+		rpcp = getrpcbynumber(number);
-+		ret = 0;
- 		if (ret == 0 && rpcp != NULL) {
- 			/* First try name */
- 			ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
+-	ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
++    rpcp = getrpcbynumber(number);
++    ret = 0;
+ 	if (ret == 0 && rpcp != NULL) {
+ 		/* First try name */
+ 		ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
+-- 
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
deleted file mode 100644
index 28b3854..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
-SECTION = "base"
-HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
-LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
-                    file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
-                    file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
-           file://0001-Fix-build-with-disabled-ldap.patch \
-           file://0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch \
-           file://fcntl.patch \
-           file://remove_non_posix_types.patch \
-           file://0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch \
-           file://0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch \
-           file://0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch \
-           file://0004-Fix-warnings-due-to-missing-stdlib.h.patch \
-          "
-SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
-
-SRC_URI[md5sum] = "6b09f9c93515c25a528be5754cdfb6f5"
-SRC_URI[sha256sum] = "9c6c4d9ae7bf30506dd2aa3d8056c4ff2f8d087930d7c721616f5c093bdc674b"
-
-CVE_PRODUCT = "linux_diskquota"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
-UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
-
-DEPENDS = "gettext-native e2fsprogs libnl dbus"
-
-inherit autotools-brokensep gettext pkgconfig
-
-CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}"
-LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
-ASNEEDED = ""
-
-PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
-PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
-
-PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
-PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
-PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
-PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.04.bb b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.04.bb
new file mode 100644
index 0000000..93f3762
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.04.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
+SECTION = "base"
+HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
+                    file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
+                    file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
+           file://fcntl.patch \
+           file://remove_non_posix_types.patch \
+          "
+SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
+
+SRC_URI[md5sum] = "f46f3b0b5141f032f25684005dac49d3"
+SRC_URI[sha256sum] = "735be1887e7f51f54165e778ae43fc859c04e44d88834ecb2f470e91d4ef8edf"
+
+CVE_PRODUCT = "linux_diskquota"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
+UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
+
+DEPENDS = "gettext-native e2fsprogs libnl dbus"
+
+inherit autotools-brokensep gettext pkgconfig
+
+CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}"
+LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
+ASNEEDED = ""
+
+PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
+PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
+
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
+PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
+PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch
new file mode 100644
index 0000000..4c23ee0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch
@@ -0,0 +1,30 @@
+From c49a7ea639eb700823e174fd605bbbe183e229aa Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Wed, 17 May 2017 10:52:25 -0400
+Subject: [PATCH] pmapproc_dump: Fixed typo in memory leak patch
+
+commit 7ea36eee introduce a typo that caused
+NIS (aka ypbind) to fail.
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pmap_svc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: rpcbind-0.2.4/src/pmap_svc.c
+===================================================================
+--- rpcbind-0.2.4.orig/src/pmap_svc.c
++++ rpcbind-0.2.4/src/pmap_svc.c
+@@ -384,7 +384,7 @@ pmapproc_dump(struct svc_req *rqstp /*__
+ 	}
+ 
+ done:
+-	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) {
++	if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) {
+ 		if (debugging) {
+ 			/*(void) xlog(LOG_DEBUG, "unable to free arguments\n");*/
+ 			if (doabort) {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch
new file mode 100644
index 0000000..9a000d0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch
@@ -0,0 +1,100 @@
+From 7c7590ad536c0e24bef790cb1e65702fc54db566 Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Tue, 30 May 2017 11:27:22 -0400
+Subject: [PATCH] rpcbproc_callit_com: Stop freeing a static pointer
+
+commit 7ea36ee introduced a svc_freeargs() call
+that ended up freeing static pointer.
+
+It turns out the allocations for the rmt_args
+is not necessary . The xdr routines (xdr_bytes) will
+handle the memory management and the largest
+possible message size is UDPMSGSIZE (due to UDP only)
+which is smaller than RPC_BUF_MAX
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/rpcb_svc_com.c | 39 ++++++---------------------------------
+ 1 file changed, 6 insertions(+), 33 deletions(-)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index cb63afd..1fc2229 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -612,9 +612,9 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ 	struct netconfig *nconf;
+ 	struct netbuf *caller;
+ 	struct r_rmtcall_args a;
+-	char *buf_alloc = NULL, *outbufp;
++	char *outbufp;
+ 	char *outbuf_alloc = NULL;
+-	char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX];
++	char  outbuf[RPC_BUF_MAX];
+ 	struct netbuf *na = (struct netbuf *) NULL;
+ 	struct rpc_msg call_msg;
+ 	int outlen;
+@@ -635,36 +635,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ 	}
+ 	if (si.si_socktype != SOCK_DGRAM)
+ 		return;	/* Only datagram type accepted */
+-	sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE);
+-	if (sendsz == 0) {	/* data transfer not supported */
+-		if (reply_type == RPCBPROC_INDIRECT)
+-			svcerr_systemerr(transp);
+-		return;
+-	}
+-	/*
+-	 * Should be multiple of 4 for XDR.
+-	 */
+-	sendsz = ((sendsz + 3) / 4) * 4;
+-	if (sendsz > RPC_BUF_MAX) {
+-#ifdef	notyet
+-		buf_alloc = alloca(sendsz);		/* not in IDR2? */
+-#else
+-		buf_alloc = malloc(sendsz);
+-#endif	/* notyet */
+-		if (buf_alloc == NULL) {
+-			if (debugging)
+-				xlog(LOG_DEBUG,
+-					"rpcbproc_callit_com:  No Memory!\n");
+-			if (reply_type == RPCBPROC_INDIRECT)
+-				svcerr_systemerr(transp);
+-			return;
+-		}
+-		a.rmt_args.args = buf_alloc;
+-	} else {
+-		a.rmt_args.args = buf;
+-	}
++	sendsz = UDPMSGSIZE;
+ 
+ 	call_msg.rm_xid = 0;	/* For error checking purposes */
++	memset(&a, 0, sizeof(a)); /* Zero out the input buffer */
+ 	if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
+ 		if (reply_type == RPCBPROC_INDIRECT)
+ 			svcerr_decode(transp);
+@@ -704,7 +678,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ 	if (rbl == (rpcblist_ptr)NULL) {
+ #ifdef RPCBIND_DEBUG
+ 		if (debugging)
+-			xlog(LOG_DEBUG, "not found\n");
++			xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", 
++				a.rmt_prog, a.rmt_vers);
+ #endif
+ 		if (reply_type == RPCBPROC_INDIRECT)
+ 			svcerr_noprog(transp);
+@@ -937,8 +912,6 @@ out:
+ 	}
+ 	if (local_uaddr)
+ 		free(local_uaddr);
+-	if (buf_alloc)
+-		free(buf_alloc);
+ 	if (outbuf_alloc)
+ 		free(outbuf_alloc);
+ 	if (na) {
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb
index 60e46ed..dcdee6c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.4.bb
@@ -16,6 +16,8 @@
            file://rpcbind.socket \
            file://rpcbind.service \
            file://0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch \
+           file://pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch \
+           file://rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch \
           "
 SRC_URI[md5sum] = "cf10cd41ed8228fc54c316191c1f07fe"
 SRC_URI[sha256sum] = "074a9a530dc7c11e0d905aa59bcb0847c009313f02e98d3d798aa9568f414c66"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
index e8db12c..1274b27 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
@@ -9,7 +9,8 @@
 We rarely use "yes;" to name build dir, so s/yes/yes;/g
 could fix the issue
 
-Upstream-Status: Pending
+Upstream-Status: Accepted
+https://git.savannah.gnu.org/cgit/screen.git/commit/?h=screen-v4&id=8c2b4061d16756ee2ed37f08db063b8215656943
 
 Signed-off-by: Jian Kang <jian.kang@windriver.com>
 ---
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
index b5d71cc..a01dc24 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
@@ -15,19 +15,16 @@
  src/Makefile.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/src/Makefile.in b/src/Makefile.in
-index e791e79..d4f7c0b 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -113,7 +113,7 @@ term.h: term.c term.sh
- 
- kmapdef.c: term.h
+Index: screen-4.6.1/Makefile.in
+===================================================================
+--- screen-4.6.1.orig/Makefile.in
++++ screen-4.6.1/Makefile.in
+@@ -133,7 +133,7 @@ kmapdef.c: term.h
+ tty.c:	tty.sh 
+ 	sh $(srcdir)/tty.sh tty.c
  
 -comm.h: comm.c comm.sh config.h
 +comm.h: comm.c comm.sh config.h term.h
  	AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh
  
- docs:
--- 
-2.4.1
-
+ osdef.h: osdef.sh config.h osdef.h.in
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.1.bb b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.1.bb
deleted file mode 100644
index bcd83a2..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.1.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Multiplexing terminal manager"
-DESCRIPTION = "Screen is a full-screen window manager \
-that multiplexes a physical terminal between several \
-processes, typically interactive shells."
-HOMEPAGE = "http://www.gnu.org/software/screen/"
-BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
-
-SECTION = "console/utils"
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
-
-DEPENDS = "ncurses \
-          ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} = "base-files"
-
-SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \
-           file://Remove-redundant-compiler-sanity-checks.patch \
-           file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \
-           file://Skip-host-file-system-checks-when-cross-compiling.patch \
-           file://Avoid-mis-identifying-systems-as-SVR4.patch \
-           file://0002-comm.h-now-depends-on-term.h.patch \
-           file://0001-fix-for-multijob-build.patch \
-           file://0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch \
-          "
-
-SRC_URI[md5sum] = "132c893aabfaf2020074790215c8cacd"
-SRC_URI[sha256sum] = "aba9af66cb626155d6abce4703f45cce0e30a5114a368bd6387c966cbbbb7c64"
-
-inherit autotools texinfo
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
-
-EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
-               ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
-
-do_install_append () {
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
-		install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
-	fi
-}
-
-pkg_postinst_${PN} () {
-	grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
-}
-
-pkg_postrm_${PN} () {
-	printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.2.bb b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.2.bb
new file mode 100644
index 0000000..7a33c31
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.6.2.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Multiplexing terminal manager"
+DESCRIPTION = "Screen is a full-screen window manager \
+that multiplexes a physical terminal between several \
+processes, typically interactive shells."
+HOMEPAGE = "http://www.gnu.org/software/screen/"
+BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
+
+SECTION = "console/utils"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
+
+DEPENDS = "ncurses \
+          ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "base-files"
+
+SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \
+           file://Remove-redundant-compiler-sanity-checks.patch \
+           file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \
+           file://Skip-host-file-system-checks-when-cross-compiling.patch \
+           file://Avoid-mis-identifying-systems-as-SVR4.patch \
+           file://0002-comm.h-now-depends-on-term.h.patch \
+           file://0001-fix-for-multijob-build.patch \
+           file://0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch \
+          "
+
+SRC_URI[md5sum] = "a0f529d3333b128dfaa324d978ba73a8"
+SRC_URI[sha256sum] = "1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a"
+
+inherit autotools texinfo
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
+
+EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
+               ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+
+do_install_append () {
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+		install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
+	fi
+}
+
+pkg_postinst_${PN} () {
+	grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+	printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb b/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb
index e31bec2..f10e365 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -42,6 +42,12 @@
 
 do_install_ptest() {
 	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+	sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+	    -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
 }
 
 RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
index cc18964..673207f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
@@ -6,8 +6,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
                     file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
 
-DEPENDS_class-native = ""
-DEPENDS_class-nativesdk = ""
+DEPENDS = "virtual/crypt"
 
 SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
            file://shadow-4.1.3-dots-in-usernames.patch \
@@ -190,7 +189,7 @@
 ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
 
 PACKAGE_WRITE_DEPS += "shadow-native"
-pkg_postinst_${PN} () {
+pkg_postinst_${PN}_class-target () {
 	if [ "x$D" != "x" ]; then
 	  rootarg="--root $D"
 	else
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.1a.bb b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.1a.bb
deleted file mode 100644
index 0585c14..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.1a.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-SUMMARY = "The shared library for the S-Lang extension language"
-
-DESCRIPTION = "S-Lang is an interpreted language and a programming library.  The \
-S-Lang language was designed so that it can be easily embedded into \
-a program to provide the program with a powerful extension language. \
-The S-Lang library, provided in this package, provides the S-Lang \
-extension language.  S-Lang's syntax resembles C, which makes it easy \
-to recode S-Lang procedures in C if you need to."
-
-HOMEPAGE = "http://www.jedsoft.org/slang/"
-SECTION = "libs"
-DEPENDS = "ncurses virtual/libiconv"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
-
-SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
-           file://no-x.patch \
-           file://dont-link-to-host.patch \
-           file://test-add-output-in-the-format-result-testname.patch \
-           file://terminfo_fixes.patch \
-           file://run-ptest \
-          "
-
-SRC_URI[md5sum] = "c5235313042ed0e71ec708f7b85ec241"
-SRC_URI[sha256sum] = "54f0c3007fde918039c058965dffdfd6c5aec0bad0f4227192cc486021f08c36"
-
-UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
-PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/ \n"
-
-inherit autotools-brokensep ptest
-CLEANBROKEN = "1"
-
-EXTRA_OECONF = "--without-onig"
-# There's no way to turn off rpaths and slang will -rpath to the default search
-# path. Unset RPATH to stop this.
-EXTRA_OEMAKE = "RPATH=''"
-
-PACKAGECONFIG ??= "pcre"
-PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
-PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
-PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
-
-do_configure_prepend() {
-    cd ${S}/autoconf
-    # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
-    # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
-    # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
-    gnu-configize --force && mv autoconf/config.* .
-    # For the same reason we also need to run autoconf manually.
-    autoconf && mv configure ..
-    cd ${B}
-}
-
-do_compile_ptest() {
-	oe_runmake -C src static
-	oe_runmake -C src/test sltest
-}
-
-do_install_ptest() {
-	mkdir ${D}${PTEST_PATH}/test
-	for f in Makefile sltest runtests.sh *.sl *.inc; do
-		cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/
-	done
-	sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \
-	    -e '/\$(CC).*(TEST_PGM)/d' \
-	    -i ${D}${PTEST_PATH}/test/Makefile
-
-	cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/
-	sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl
-
-	cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/
-	sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl
-}
-
-FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
-
-PARALLEL_MAKE = ""
-PARALLEL_MAKEINST = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.2.bb b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.2.bb
new file mode 100644
index 0000000..87fd41a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.2.bb
@@ -0,0 +1,81 @@
+SUMMARY = "The shared library for the S-Lang extension language"
+
+DESCRIPTION = "S-Lang is an interpreted language and a programming library.  The \
+S-Lang language was designed so that it can be easily embedded into \
+a program to provide the program with a powerful extension language. \
+The S-Lang library, provided in this package, provides the S-Lang \
+extension language.  S-Lang's syntax resembles C, which makes it easy \
+to recode S-Lang procedures in C if you need to."
+
+HOMEPAGE = "http://www.jedsoft.org/slang/"
+SECTION = "libs"
+DEPENDS = "ncurses virtual/libiconv"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
+
+SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
+           file://no-x.patch \
+           file://dont-link-to-host.patch \
+           file://test-add-output-in-the-format-result-testname.patch \
+           file://terminfo_fixes.patch \
+           file://run-ptest \
+          "
+
+SRC_URI[md5sum] = "c2d5a7aa0246627da490be4e399c87cb"
+SRC_URI[sha256sum] = "fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a"
+
+UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
+PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/ \n"
+
+inherit autotools-brokensep ptest
+CLEANBROKEN = "1"
+
+EXTRA_OECONF = "--without-onig"
+# There's no way to turn off rpaths and slang will -rpath to the default search
+# path. Unset RPATH to stop this.
+EXTRA_OEMAKE = "RPATH=''"
+
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
+PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
+
+do_configure_prepend() {
+    cd ${S}/autoconf
+    # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
+    # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
+    # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
+    gnu-configize --force && mv autoconf/config.* .
+    # For the same reason we also need to run autoconf manually.
+    autoconf && mv configure ..
+    cd ${B}
+}
+
+do_compile_ptest() {
+	oe_runmake -C src static
+	oe_runmake -C src/test sltest
+}
+
+do_install_ptest() {
+	mkdir ${D}${PTEST_PATH}/test
+	for f in Makefile sltest runtests.sh *.sl *.inc; do
+		cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/
+	done
+	sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \
+	    -e '/\$(CC).*(TEST_PGM)/d' \
+	    -i ${D}${PTEST_PATH}/test/Makefile
+
+	cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/
+	sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl
+
+	cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/
+	sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl
+}
+
+FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
+
+PARALLEL_MAKE = ""
+PARALLEL_MAKEINST = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch b/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
deleted file mode 100644
index 032995d..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-This patch fixies the wrong return code of stat -h.
-
-Upstream-Status: Pending
-Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com>
-
---- stat-3.3/stat.c.orig	2013-08-22 10:49:45.000000000 +0800
-+++ stat-3.3/stat.c	2013-08-22 10:50:31.000000000 +0800
-@@ -845,7 +845,7 @@
-     fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n");
-     fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n");
-     fprintf(stderr, "\t\t%%d - Free file nodes in file system\n");
--    exit(1);
-+    exit(0);
- }
-   
- 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch b/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
deleted file mode 100644
index 0c01ed0..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-stat: Fixing security formatting issues
-
-Fix security formatting issues related to printf without NULL argument 
-
-stat.c: In function 'print_human_access':
-stat.c:292:13: error: format not a string literal and no format arguments [-Werror=format-security]
-     printf (access);
-             ^
-stat.c: In function 'print_human_time':
-stat.c:299:57: error: format not a string literal and no format arguments [-Werror=format-security]
-   if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
-                                                         ^
-stat.c: In function 'print_it':
-stat.c:613:6: error: format not a string literal and no format arguments [-Werror=format-security]
-      printf(b);
-      ^
-stat.c:642:6: error: format not a string literal and no format arguments [-Werror=format-security]
-      printf(b);
-      ^
-
-[YOCTO #9550]
-[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9550]
-
-Upstream-Status: Pending
-
-Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
-
-diff --git a/stat.c b/stat.c
-index 1ed07a9..2be6f62 100644
---- a/stat.c
-+++ b/stat.c
-@@ -289,15 +289,15 @@ void print_human_access(struct stat *statbuf)
-     default:
-       access[0] = '?';
-     }
--    printf (access);
-+    fputs(access,stdout);
- }
- 
- void print_human_time(time_t *t)
- {
-   char str[40];
-   
--  if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
--  else printf("Cannot calculate human readable time, sorry");
-+  if (strftime(str, 40, "%c", localtime(t)) > 0) fputs(str,stdout);
-+  else fputs("Cannot calculate human readable time, sorry",stdout);
- }
- 
- /* print statfs info */
-@@ -610,7 +610,7 @@ void print_it(char *masterformat, char *filename,
- 	{
- 	    strcpy (pformat, "%");
- 	    *m++ = '\0';
--	    printf(b);
-+	    fputs(b,stdout);
- 
- 	    /* copy all format specifiers to our format string */
- 	    while (isdigit(*m) || strchr("#0-+. I", *m))
-@@ -639,7 +639,7 @@ void print_it(char *masterformat, char *filename,
- 	}
- 	else
- 	{
--	    printf(b);
-+	    fputs(b,stdout);
- 	    b = NULL;
- 	}
-     }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb b/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
deleted file mode 100644
index 8ac8e89..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Command line file status display utility"
-HOMEPAGE = "http://www.ibiblio.org/pub/Linux/utils/file/"
-DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides."
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
-                    file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/${BP}.tar.gz \
-           file://fix-security-format.patch \
-           file://fix-error-return.patch"
-
-SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
-SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_install() {
-	install -d ${D}${base_bindir} ${D}${mandir}/man1
-	install -m 755 stat ${D}${base_bindir}/stat.stat
-	install -m 644 stat.1 ${D}${mandir}/man1
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "stat"
-ALTERNATIVE_PRIORITY[stat] = "200"
-ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat"
-ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat"
-
-ALTERNATIVE_${PN}-doc = "stat.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-BBCLASSEXTEND = "native"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc
index 80ec0ae..362bd3a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo.inc
@@ -4,8 +4,8 @@
 BUGTRACKER = "http://www.sudo.ws/bugs/"
 SECTION = "admin"
 LICENSE = "ISC & BSD & Zlib"
-LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=652fb4334c13b511597d7940ef8b3323 \
-                    file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=cfe41112f96c19a074934d128f45c693 \
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=7765a3d787cb4fed3ccc3c9cee030af9 \
+                    file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=805782a8466975716f8376b2be9aedde \
                     file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \
                     file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
                     file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.20p2.bb b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.20p2.bb
deleted file mode 100644
index 4f24b3c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.20p2.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require sudo.inc
-
-SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
-           file://0001-Include-sys-types.h-for-id_t-definition.patch \
-           "
-
-PAM_SRC_URI = "file://sudo.pam"
-
-SRC_URI[md5sum] = "03da8e711caca6fd93e57751bfb74adc"
-SRC_URI[sha256sum] = "bd42ae1059e935f795c69ea97b3de09fe9410a58a74b5d5e6836eb5067a445d9"
-
-DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
-
-EXTRA_OECONF += " \
-             ac_cv_type_rsize_t=no \
-             ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
-             ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
-             "
-
-do_install_append () {
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
-		install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
-	fi
-
-	chmod 4111 ${D}${bindir}/sudo
-	chmod 0440 ${D}${sysconfdir}/sudoers
-
-	# Explicitly remove the ${localstatedir}/run directory to avoid QA error
-	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
-}
-
-FILES_${PN} += "${libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
-                    ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.22.bb b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.22.bb
new file mode 100644
index 0000000..9150178
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.22.bb
@@ -0,0 +1,36 @@
+require sudo.inc
+
+SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+           file://0001-Include-sys-types.h-for-id_t-definition.patch \
+           "
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "24abdea48db4c5abcd410167c801cc8c"
+SRC_URI[sha256sum] = "7256cb27c20883b14360eddbd17f98922073d104b214cf65aeacf1d9c9b9fd02"
+
+DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " \
+             ac_cv_type_rsize_t=no \
+             ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+             ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+             "
+
+do_install_append () {
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+		install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+	fi
+
+	chmod 4111 ${D}${bindir}/sudo
+	chmod 0440 ${D}${sysconfdir}/sudoers
+
+	# Explicitly remove the ${localstatedir}/run directory to avoid QA error
+	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
+}
+
+FILES_${PN} += "${libdir}/tmpfiles.d"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
+                    ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch
index 00fba71..d426c83 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysklogd/files/no-strip-install.patch
@@ -1,10 +1,10 @@
 Upstream-Status: Inappropriate [configuration]
 
-Index: sysklogd-1.5/Makefile
+Index: sysklogd-1.5.1/Makefile
 ===================================================================
---- sysklogd-1.5.orig/Makefile	2009-06-09 13:02:41.000000000 +0200
-+++ sysklogd-1.5/Makefile	2009-06-09 13:03:06.000000000 +0200
-@@ -127,8 +127,8 @@
+--- sysklogd-1.5.1.orig/Makefile
++++ sysklogd-1.5.1/Makefile
+@@ -127,8 +127,8 @@ clobber: clean
  	rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd
  
  install_exec: syslogd klogd
@@ -14,4 +14,4 @@
 +	${INSTALL} -m 500 klogd ${BINDIR}/klogd
  
  install_man:
- 	${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
+ 	${INSTALL} -o ${MAN_USER} -g ${MAN_GROUP} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
index c126523..1b63299 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
@@ -21,10 +21,10 @@
  sa_common.c | 1 +
  3 files changed, 3 insertions(+)
 
-diff --git a/common.c b/common.c
-index a23155b..ad86446 100644
---- a/common.c
-+++ b/common.c
+Index: sysstat-11.7.1/common.c
+===================================================================
+--- sysstat-11.7.1.orig/common.c
++++ sysstat-11.7.1/common.c
 @@ -20,6 +20,7 @@
   */
  
@@ -32,11 +32,11 @@
 +#include <limits.h>
  #include <string.h>
  #include <stdlib.h>
- #include <time.h>
-diff --git a/ioconf.c b/ioconf.c
-index 7d88c5d..6d67691 100644
---- a/ioconf.c
-+++ b/ioconf.c
+ #include <stdarg.h>
+Index: sysstat-11.7.1/ioconf.c
+===================================================================
+--- sysstat-11.7.1.orig/ioconf.c
++++ sysstat-11.7.1/ioconf.c
 @@ -27,6 +27,7 @@
  #include <errno.h>
  #include <dirent.h>
@@ -45,10 +45,10 @@
  
  #include "ioconf.h"
  #include "common.h"
-diff --git a/sa_common.c b/sa_common.c
-index b7351d9..c9e3299 100644
---- a/sa_common.c
-+++ b/sa_common.c
+Index: sysstat-11.7.1/sa_common.c
+===================================================================
+--- sysstat-11.7.1.orig/sa_common.c
++++ sysstat-11.7.1/sa_common.c
 @@ -20,6 +20,7 @@
   */
  
@@ -56,7 +56,4 @@
 +#include <limits.h>
  #include <string.h>
  #include <stdlib.h>
- #include <time.h>
--- 
-2.5.2
-
+ #include <stdint.h>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.5.7.bb b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.5.7.bb
deleted file mode 100644
index 72af931..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.5.7.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require sysstat.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
-
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
-
-SRC_URI[md5sum] = "8f4a5d0de29f1056153e25e7a9c518d2"
-SRC_URI[sha256sum] = "4a38efaa0ca85ee5484d046bd427012979264fef17f07fd7855860e592819482"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
new file mode 100644
index 0000000..86738e7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
@@ -0,0 +1,8 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
+
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+
+SRC_URI[md5sum] = "bdcda7c9048c7c22fb1f30f75285d13d"
+SRC_URI[sha256sum] = "303a595b1af0330b183a0f1febfccf89f183b9575ae0562b91fdb876f3ef1feb"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/CVE-2016-6321.patch b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/CVE-2016-6321.patch
deleted file mode 100644
index 6d35bcc..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/CVE-2016-6321.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 7340f67b9860ea0531c1450e5aa261c50f67165d Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
-Date: Sat, 29 Oct 2016 21:04:40 -0700
-Subject: [PATCH] When extracting, skip ".." members
-
-* NEWS: Document this.
-* src/extract.c (extract_archive): Skip members whose names
-contain "..".
-
-CVE: CVE-2016-6321
-Upstream-Status: Backport
-
-Cherry picked from commit: 7340f67 When extracting, skip ".." members
-
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- NEWS          | 8 +++++++-
- src/extract.c | 8 ++++++++
- 2 files changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/NEWS b/NEWS
-index 501164a..fc97cfc 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,6 +1,12 @@
--GNU tar NEWS - User visible changes. 2016-05-16
-+GNU tar NEWS - User visible changes. 2016-10-29
- Please send GNU tar bug reports to <bug-tar@gnu.org>
- 
-+* Member names containing '..' components are now skipped when extracting.
-+
-+This fixes tar's behavior to match its documentation, and is a bit
-+safer when extracting untrusted archives over old files (an unsafe
-+practice that the tar manual has long recommended against).
-+
- 
- version 1.29 - Sergey Poznyakoff, 2016-05-16
- 
-diff --git a/src/extract.c b/src/extract.c
-index f982433..7904148 100644
---- a/src/extract.c
-+++ b/src/extract.c
-@@ -1629,12 +1629,20 @@ extract_archive (void)
- {
-   char typeflag;
-   tar_extractor_t fun;
-+  bool skip_dotdot_name;
- 
-   fatal_exit_hook = extract_finish;
- 
-   set_next_block_after (current_header);
- 
-+  skip_dotdot_name = (!absolute_names_option
-+		      && contains_dot_dot (current_stat_info.orig_file_name));
-+  if (skip_dotdot_name)
-+    ERROR ((0, 0, _("%s: Member name contains '..'"),
-+	    quotearg_colon (current_stat_info.orig_file_name)));
-+
-   if (!current_stat_info.file_name[0]
-+      || skip_dotdot_name
-       || (interactive_option
- 	  && !confirm ("extract", current_stat_info.file_name)))
-     {
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
index b0dc16c..2d98ed1 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
@@ -14,6 +14,6 @@
 -              linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
 +              linux*-gnu*|linux*-musl*)
 +                           gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                            # Guess no on native Windows.
+               mingw*)      gl_cv_struct_dirent_d_ino="guessing no" ;;
                             # If we don't know, assume the worst.
-               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
-             esac
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb
deleted file mode 100644
index f22d9c9..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require tar.inc
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI += "file://remove-gets.patch \
-            file://musl_dirent.patch \
-            file://CVE-2016-6321.patch \
-           "
-SRC_URI[md5sum] = "955cd533955acb1804b83fd70218da51"
-SRC_URI[sha256sum] = "236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2"
-
-do_install_append_libc-musl() {
-	rm -f ${D}${libdir}/charset.alias
-	rmdir ${D}${libdir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.30.bb b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.30.bb
new file mode 100644
index 0000000..e743a6d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.30.bb
@@ -0,0 +1,18 @@
+require tar.inc
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI += "file://remove-gets.patch \
+            file://musl_dirent.patch \
+           "
+SRC_URI[md5sum] = "8404e4c1fc5a3000228ab2b8ad674a65"
+SRC_URI[sha256sum] = "87592b86cb037c554375f5868bdd3cc57748aef38d6cb741c81065f0beac63b7"
+
+do_install_append_libc-musl() {
+	rm -f ${D}${libdir}/charset.alias
+	rmdir ${D}${libdir}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
new file mode 100644
index 0000000..9d1e05d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
@@ -0,0 +1,65 @@
+From 7f8878ac1aaf4a19992d39379797c151301bedb1 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <oobitots@cisco.com>
+Date: Mon, 5 Feb 2018 08:29:10 -0800
+Subject: [PATCH] Fix build with clang
+
+Fix "error: non-void function 'fix_options' should return a value".
+Add function prototype to tcpd.c and miscd.c.
+
+Upstream-Status: Pending
+
+Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
+---
+ v2 - add function prototypes
+
+ fix_options.c | 2 +-
+ miscd.c       | 4 ++++
+ tcpd.c        | 4 ++++
+ 3 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/fix_options.c b/fix_options.c
+index b5e81b8..9958ff4 100644
+--- a/fix_options.c
++++ b/fix_options.c
+@@ -29,7 +29,7 @@ static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
+ 
+ /* fix_options - get rid of IP-level socket options */
+ 
+-fix_options(request)
++void fix_options(request)
+ struct request_info *request;
+ {
+ #ifdef IP_OPTIONS
+diff --git a/miscd.c b/miscd.c
+index 1ab835c..723b83a 100644
+--- a/miscd.c
++++ b/miscd.c
+@@ -40,6 +40,10 @@ static char sccsid[] = "@(#) miscd.c 1.10 96/02/11 17:01:30";
+ #include "patchlevel.h"
+ #include "tcpd.h"
+ 
++#ifdef KILL_IP_OPTIONS
++void fix_options(struct request_info *);
++#endif
++
+ int     allow_severity = SEVERITY;	/* run-time adjustable */
+ int     deny_severity = LOG_WARNING;	/* ditto */
+ 
+diff --git a/tcpd.c b/tcpd.c
+index d865b9c..a179891 100644
+--- a/tcpd.c
++++ b/tcpd.c
+@@ -38,6 +38,10 @@ static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
+ #include "patchlevel.h"
+ #include "tcpd.h"
+ 
++#ifdef KILL_IP_OPTIONS
++void fix_options(struct request_info *);
++#endif
++
+ int     allow_severity = SEVERITY;	/* run-time adjustable */
+ int     deny_severity = LOG_WARNING;	/* ditto */
+ 
+-- 
+2.10.3.dirty
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
index e8289e4..d473fb6 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
@@ -1,9 +1,10 @@
 Upstream-Status: Backport
 
-diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
---- tcp_wrappers_7.6.orig/Makefile	2003-08-21 01:43:39.000000000 +0200
-+++ tcp_wrappers_7.6/Makefile	2003-08-21 01:43:35.000000000 +0200
-@@ -45,7 +45,7 @@
+Index: tcp_wrappers_7.6/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig/Makefile
++++ tcp_wrappers_7.6/Makefile
+@@ -45,7 +45,7 @@ what:
  #
  # SysV.4 Solaris 2.x OSF AIX
  #REAL_DAEMON_DIR=/usr/sbin
@@ -12,7 +13,7 @@
  # BSD 4.4
  #REAL_DAEMON_DIR=/usr/libexec
  #
-@@ -512,6 +519,7 @@
+@@ -513,6 +513,7 @@ VSYSLOG	= -Dvsyslog=myvsyslog
  # (examples: allow, deny, banners, twist and spawn).
  # 
  #STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
@@ -20,7 +21,7 @@
  
  ################################################################
  # Optional: Changing the default disposition of logfile records
-@@ -535,6 +543,7 @@
+@@ -536,6 +537,7 @@ VSYSLOG	= -Dvsyslog=myvsyslog
  # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
  
  FACILITY= LOG_MAIL	# LOG_MAIL is what most sendmail daemons use
@@ -28,7 +29,7 @@
  
  # The syslog priority at which successful connections are logged.
  
-@@ -631,6 +640,7 @@
+@@ -632,6 +634,7 @@ TABLES	= -DHOSTS_DENY=\"/etc/hosts.deny\
  # lookups altogether, see the next section.
  
  PARANOID= -DPARANOID
@@ -36,7 +37,7 @@
  
  ########################################
  # Optional: turning off hostname lookups
-@@ -644,6 +654,7 @@
+@@ -645,6 +648,7 @@ PARANOID= -DPARANOID
  # mode (see previous section) and comment out the following definition.
  
  HOSTNAME= -DALWAYS_HOSTNAME
@@ -44,7 +45,7 @@
  
  #############################################
  # Optional: Turning on host ADDRESS checking
-@@ -670,6 +681,7 @@
+@@ -671,6 +675,7 @@ HOSTNAME= -DALWAYS_HOSTNAME
  # Solaris 2.x, and Linux. See your system documentation for details.
  #
  # KILL_OPT= -DKILL_IP_OPTIONS
@@ -52,7 +53,7 @@
  
  ## End configuration options
  ############################
-@@ -677,9 +689,10 @@
+@@ -678,9 +683,10 @@ HOSTNAME= -DALWAYS_HOSTNAME
  # Protection against weird shells or weird make programs.
  
  SHELL	= /bin/sh
@@ -65,7 +66,7 @@
  	$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
  	-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
  	-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
-@@ -712,10 +725,11 @@
+@@ -713,11 +719,12 @@ all other: config-check tcpd tcpdmatch t
  
  config-check:
  	@set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
@@ -81,3 +82,4 @@
 +	@if [ ! -d shared ]; then mkdir shared; fi
  
  $(LIB):	$(LIB_OBJ)
+ 	rm -f $(LIB)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index 1effef1..3ece8c3 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -45,6 +45,7 @@
            file://safe_finger.8 \
            file://makefile-fix-parallel.patch \
            file://musl-decls.patch \
+           file://0001-Fix-build-with-clang.patch \
            "
 
 SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.3.bb b/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.3.bb
deleted file mode 100644
index f58df92..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.3.bb
+++ /dev/null
@@ -1,88 +0,0 @@
-SUMMARY = "Documentation system for on-line information and printed output"
-DESCRIPTION = "Texinfo is a documentation system that can produce both \
-online information and printed output from a single source file. The \
-GNU Project uses the Texinfo file format for most of its documentation."
-HOMEPAGE = "http://www.gnu.org/software/texinfo/"
-SECTION = "console/utils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-PROVIDES_append_class-native = " texinfo-replacement-native"
-
-def compress_pkg(d):
-    if bb.data.inherits_class('compress_doc', d):
-         compress = d.getVar("DOC_COMPRESS")
-         if compress == "gz":
-             return "gzip"
-         elif compress == "bz2":
-             return "bzip2"
-         elif compress == "xz":
-             return "xz"
-    return ""
-
-RDEPENDS_info += "${@compress_pkg(d)}"
-
-DEPENDS = "zlib ncurses texinfo-replacement-native"
-DEPENDS_class-native = "zlib-native ncurses-native"
-
-TARGET_PATCH = "file://use_host_makedoc.patch"
-TARGET_PATCH_class-native = ""
-
-SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
-           file://texinfo-4.12-zlib.patch \
-           file://disable-native-tools.patch \
-           file://link-zip.patch \
-           file://dont-depend-on-help2man.patch \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           ${TARGET_PATCH} \
-          "
-
-SRC_URI[md5sum] = "9b08daca9bf8eccae9b0f884aba41f9e"
-SRC_URI[sha256sum] = "300a6ba4958c2dd4a6d5ce60f0a335daf7e379f5374f276f6ba31a221f02f606"
-
-tex_texinfo = "texmf/tex/texinfo"
-
-inherit gettext autotools
-
-do_configure_prepend () {
-	# autotools_do_configure updates po/Makefile.in.in, we also need
-	# update po_document.
-	cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
-}
-
-do_compile_prepend() {
-	if [ -d tools ];then
-		oe_runmake -C tools/gnulib/lib
-	fi
-}
-
-do_install_append() {
-	mkdir -p ${D}${datadir}/${tex_texinfo}
-	install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
-	sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
-}
-
-do_install_append_class-native() {
-	install -m 755 info/makedoc ${D}${bindir}
-}
-
-PACKAGES += "info info-doc"
-
-FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
-FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
-                  ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
-                  ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
-
-FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
-RDEPENDS_${PN} = "perl"
-FILES_${PN}-doc = "${infodir}/texinfo* \
-                   ${datadir}/${tex_texinfo} \
-                   ${mandir}/man1 ${mandir}/man5"
-
-# Lie about providing the Locale::gettext_xs module. It is not actually built,
-# but the code will test for it and if not found use Locale::gettext_pp instead.
-# However, this causes a file dependency on perl(Locale::gettext_xs) to be
-# generated, which must be satisfied.
-RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.5.bb b/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.5.bb
new file mode 100644
index 0000000..f966457
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.5.bb
@@ -0,0 +1,90 @@
+SUMMARY = "Documentation system for on-line information and printed output"
+DESCRIPTION = "Texinfo is a documentation system that can produce both \
+online information and printed output from a single source file. The \
+GNU Project uses the Texinfo file format for most of its documentation."
+HOMEPAGE = "http://www.gnu.org/software/texinfo/"
+SECTION = "console/utils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PROVIDES_append_class-native = " texinfo-replacement-native"
+
+def compress_pkg(d):
+    if bb.data.inherits_class('compress_doc', d):
+         compress = d.getVar("DOC_COMPRESS")
+         if compress == "gz":
+             return "gzip"
+         elif compress == "bz2":
+             return "bzip2"
+         elif compress == "xz":
+             return "xz"
+    return ""
+
+RDEPENDS_info += "${@compress_pkg(d)}"
+
+DEPENDS = "zlib ncurses texinfo-replacement-native"
+DEPENDS_class-native = "zlib-native ncurses-native"
+
+TARGET_PATCH = "file://use_host_makedoc.patch"
+TARGET_PATCH_class-native = ""
+
+SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
+           file://texinfo-4.12-zlib.patch \
+           file://disable-native-tools.patch \
+           file://link-zip.patch \
+           file://dont-depend-on-help2man.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           ${TARGET_PATCH} \
+          "
+
+SRC_URI[md5sum] = "94e8f7149876793030e5518dd8d6e956"
+SRC_URI[sha256sum] = "d34272e4042c46186ddcd66bd5d980c0ca14ff734444686ccf8131f6ec8b1427"
+
+tex_texinfo = "texmf/tex/texinfo"
+
+inherit gettext autotools
+
+EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
+
+do_configure_prepend () {
+	# autotools_do_configure updates po/Makefile.in.in, we also need
+	# update po_document.
+	cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
+}
+
+do_compile_prepend() {
+	if [ -d tools ];then
+		oe_runmake -C tools/gnulib/lib
+	fi
+}
+
+do_install_append() {
+	mkdir -p ${D}${datadir}/${tex_texinfo}
+	install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+	sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
+}
+
+do_install_append_class-native() {
+	install -m 755 info/makedoc ${D}${bindir}
+}
+
+PACKAGES += "info info-doc"
+
+FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
+FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
+                  ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
+                  ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
+
+FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
+RDEPENDS_${PN} = "perl"
+FILES_${PN}-doc = "${infodir}/texinfo* \
+                   ${datadir}/${tex_texinfo} \
+                   ${mandir}/man1 ${mandir}/man5"
+
+# Lie about providing the Locale::gettext_xs module. It is not actually built,
+# but the code will test for it and if not found use Locale::gettext_pp instead.
+# However, this causes a file dependency on perl(Locale::gettext_xs) to be
+# generated, which must be satisfied.
+RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time-1.7/debian.patch b/import-layers/yocto-poky/meta/recipes-extended/time/time-1.7/debian.patch
deleted file mode 100644
index 23ea0e3..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/time/time-1.7/debian.patch
+++ /dev/null
@@ -1,1301 +0,0 @@
-Upstream-Status: Backport
-
---- time-1.7.orig/configure.in
-+++ time-1.7/configure.in
-@@ -1,11 +1,8 @@
- dnl Process this file with autoconf to produce a configure script.
- AC_INIT(time.c)
--VERSION=1.7
--AC_SUBST(VERSION)
--PACKAGE=time
--AC_SUBST(PACKAGE)
-+AM_INIT_AUTOMAKE(time, 1.7)
- 
--AC_ARG_PROGRAM
-+AM_MAINTAINER_MODE
- 
- dnl Checks for programs.
- AC_PROG_CC
-@@ -15,7 +12,7 @@
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_HEADER_SYS_WAIT
--AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h)
-+AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h)
- 
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
---- time-1.7.orig/version.texi
-+++ time-1.7/version.texi
-@@ -1,3 +1,3 @@
--@set UPDATED 12 June 1996
-+@set UPDATED 9 May 2002
- @set EDITION 1.7
- @set VERSION 1.7
---- time-1.7.orig/time.c
-+++ time-1.7/time.c
-@@ -147,6 +147,10 @@
-   NULL
- };
- 
-+
-+/* If true, do not show the exit message */
-+static boolean quiet;
-+
- /* If true, show an English description next to each statistic.  */
- static boolean verbose;
- 
-@@ -172,6 +176,7 @@
-   {"help", no_argument, NULL, 'h'},
-   {"output-file", required_argument, NULL, 'o'},
-   {"portability", no_argument, NULL, 'p'},
-+  {"quiet", no_argument,NULL, 'q'},
-   {"verbose", no_argument, NULL, 'v'},
-   {"version", no_argument, NULL, 'V'},
-   {NULL, no_argument, NULL, 0}
-@@ -333,7 +338,8 @@
-   else if (WIFSIGNALED (resp->waitstatus))
-     fprintf (fp, "Command terminated by signal %d\n",
- 	     WTERMSIG (resp->waitstatus));
--  else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus))
-+  else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)
-+	   && !quiet)
-     fprintf (fp, "Command exited with non-zero status %d\n",
- 	     WEXITSTATUS (resp->waitstatus));
- 
-@@ -523,6 +529,7 @@
-   char *format;			/* Format found in environment.  */
- 
-   /* Initialize the option flags.  */
-+  quiet = false;
-   verbose = false;
-   outfile = NULL;
-   outfp = stderr;
-@@ -536,7 +543,7 @@
-   if (format)
-     output_format = format;
- 
--  while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0))
-+  while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0))
- 	 != EOF)
-     {
-       switch (optc)
-@@ -555,6 +562,9 @@
- 	case 'p':
- 	  output_format = posix_format;
- 	  break;
-+	case 'q':
-+	  quiet = true;
-+	  break;
- 	case 'v':
- 	  verbose = true;
- 	  break;
-@@ -642,9 +652,9 @@
-   fflush (outfp);
- 
-   if (WIFSTOPPED (res.waitstatus))
--    exit (WSTOPSIG (res.waitstatus));
-+    exit (WSTOPSIG (res.waitstatus) + 128);
-   else if (WIFSIGNALED (res.waitstatus))
--    exit (WTERMSIG (res.waitstatus));
-+    exit (WTERMSIG (res.waitstatus) + 128);
-   else if (WIFEXITED (res.waitstatus))
-     exit (WEXITSTATUS (res.waitstatus));
- }
-@@ -657,7 +667,7 @@
-   fprintf (stream, "\
- Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\
-        [--portability] [--format=format] [--output=file] [--version]\n\
--       [--help] command [arg...]\n",
-+       [--quiet] [--help] command [arg...]\n",
- 	   program_name);
-   exit (status);
- }
---- time-1.7.orig/resuse.h
-+++ time-1.7/resuse.h
-@@ -36,19 +36,8 @@
- # include <sys/rusage.h>
- #else
- # define TV_MSEC tv_usec / 1000
--# if HAVE_WAIT3
-+# if HAVE_SYS_RESOURCE_H
- #  include <sys/resource.h>
--# else
--/* Process resource usage structure.  */
--struct rusage
--{
--  struct timeval ru_utime;	/* User time used.  */
--  struct timeval ru_stime;	/* System time used.  */
--  int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss,
--  ru_minflt, ru_majflt, ru_nswap, ru_inblock, 
--  ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals,
--  ru_nvcsw, ru_nivcsw;
--};
- # endif
- #endif
- 
---- time-1.7.orig/time.texi
-+++ time-1.7/time.texi
-@@ -11,6 +11,12 @@
- @finalout
- @end iftex
- 
-+@dircategory Individual utilities
-+@direntry
-+* time: (time).                     Run programs and summarize
-+                                    system resource usage.
-+@end direntry
-+
- @ifinfo
- This file documents the the GNU @code{time} command for running programs
- and summarizing the system resources they use.
-@@ -185,6 +191,10 @@
- sys %S
- @end example
- 
-+@item -q
-+@itemx --quiet
-+Suppress non-zero error code from the executed program.
-+
- @item -v
- @itemx --verbose
- @cindex format
---- time-1.7.orig/time.info
-+++ time-1.7/time.info
-@@ -1,5 +1,10 @@
--This is Info file ./time.info, produced by Makeinfo-1.55 from the input
--file time.texi.
-+This is time.info, produced by makeinfo version 4.1 from time.texi.
-+
-+INFO-DIR-SECTION Individual utilities
-+START-INFO-DIR-ENTRY
-+* time: (time).                     Run programs and summarize
-+                                    system resource usage.
-+END-INFO-DIR-ENTRY
- 
-    This file documents the the GNU `time' command for running programs
- and summarizing the system resources they use.
-@@ -31,7 +36,7 @@
- 
- * Resource Measurement::  Measuring program resource use.
- 
-- -- The Detailed Node Listing --
-+ --- The Detailed Node Listing ---
- 
- Measuring Program Resource Use
- 
-@@ -58,14 +63,14 @@
-    The `time' command runs another program, then displays information
- about the resources used by that program, collected by the system while
- the program was running.  You can select which information is reported
--and the format in which it is shown (*note Setting Format::.), or have
-+and the format in which it is shown (*note Setting Format::), or have
- `time' save the information in a file instead of displaying it on the
--screen (*note Redirecting::.).
-+screen (*note Redirecting::).
- 
-    The resources that `time' can report on fall into the general
- categories of time, memory, and I/O and IPC calls.  Some systems do not
- provide much information about program resource use; `time' reports
--unavailable information as zero values (*note Accuracy::.).
-+unavailable information as zero values (*note Accuracy::).
- 
-    The format of the `time' command is:
- 
-@@ -132,6 +137,10 @@
-           user %U
-           sys %S
- 
-+`-q'
-+`--quiet'
-+     Suppress non-zero error code from the executed program.
-+
- `-v'
- `--verbose'
-      Use the built-in verbose format, which displays each available
-@@ -174,7 +183,7 @@
-    The resource specifiers, which are a superset of those recognized by
- the `tcsh' builtin `time' command, are listed below.  Not all resources
- are measured by all versions of Unix, so some of the values might be
--reported as zero (*note Accuracy::.).
-+reported as zero (*note Accuracy::).
- 
- * Menu:
- 
-@@ -308,11 +317,11 @@
- `-o FILE'
- `--output=FILE'
-      Write the resource use statistics to FILE.  By default, this
--     *overwrites* the file, destroying the file's previous contents.
-+     _overwrites_ the file, destroying the file's previous contents.
- 
- `-a'
- `--append'
--     *Append* the resource use information to the output file instead
-+     _Append_ the resource use information to the output file instead
-      of overwriting it.  This option is only useful with the `-o' or
-      `--output' option.
- 
-@@ -437,7 +446,7 @@
- 
- `-a'
- `--append'
--     *Append* the resource use information to the output file instead
-+     _Append_ the resource use information to the output file instead
-      of overwriting it.
- 
- `-f FORMAT'
-@@ -462,17 +471,17 @@
- 
- 
- Tag Table:
--Node: Top934
--Node: Resource Measurement1725
--Node: Setting Format3678
--Node: Format String4907
--Node: Time Resources6214
--Node: Memory Resources6844
--Node: I/O Resources7549
--Node: Command Info8747
--Node: Redirecting8964
--Node: Examples9754
--Node: Accuracy12064
--Node: Invoking time13586
-+Node: Top1115
-+Node: Resource Measurement1908
-+Node: Setting Format3858
-+Node: Format String5164
-+Node: Time Resources6470
-+Node: Memory Resources7100
-+Node: I/O Resources7805
-+Node: Command Info9003
-+Node: Redirecting9220
-+Node: Examples10010
-+Node: Accuracy12320
-+Node: Invoking time13842
- 
- End Tag Table
---- time-1.7.orig/time.html
-+++ time-1.7/time.html
-@@ -0,0 +1,1021 @@
-+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-+                      "http://www.w3.org/TR/html40/loose.dtd">
-+<HTML>
-+<!-- Created on September, 1 2003 by texi2html 1.66 -->
-+<!--
-+Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
-+            Karl Berry  <karl@freefriends.org>
-+            Olaf Bachmann <obachman@mathematik.uni-kl.de>
-+            and many others.
-+Maintained by: Many creative people <dev@texi2html.cvshome.org>
-+Send bugs and suggestions to <users@texi2html.cvshome.org>
-+
-+-->
-+<HEAD>
-+<TITLE>Measuring Program Resource Use</TITLE>
-+
-+<META NAME="description" CONTENT="Measuring Program Resource Use">
-+<META NAME="keywords" CONTENT="Measuring Program Resource Use">
-+<META NAME="resource-type" CONTENT="document">
-+<META NAME="distribution" CONTENT="global">
-+<META NAME="Generator" CONTENT="texi2html 1.66">
-+
-+</HEAD>
-+
-+<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
-+
-+<A NAME="SEC_Top"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Measuring Program Resource Use</H1>
-+
-+<P>
-+
-+This file documents the the GNU <CODE>time</CODE> command for running programs
-+and summarizing the system resources they use.
-+This is edition 1.7, for version 1.7.
-+</P>
-+<P>
-+
-+</P>
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC1">1. Measuring Program Resource Use</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Measuring program resource use.</TD></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing ---
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String
-+</TH></TR>
-+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
-+</TH></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+</TABLE>
-+<P>
-+
-+<HR SIZE=1>
-+<A NAME="SEC1"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<A NAME="Resource Measurement"></A>
-+<H1> 1. Measuring Program Resource Use </H1>
-+<!--docid::SEC1::-->
-+<P>
-+
-+The <CODE>time</CODE> command runs another program, then displays information
-+about the resources used by that program, collected by the system while
-+the program was running.  You can select which information is reported
-+and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have
-+<CODE>time</CODE> save the information in a file instead of displaying it on the
-+screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>).
-+</P>
-+<P>
-+
-+The resources that <CODE>time</CODE> can report on fall into the general
-+categories of time, memory, and I/O and IPC calls.  Some systems do not
-+provide much information about program resource use; <CODE>time</CODE>
-+reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
-+</P>
-+<P>
-+
-+The format of the <CODE>time</CODE> command is:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
-+</pre></td></tr></table><P>
-+
-+<A NAME="IDX1"></A>
-+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
-+<VAR>arg</VAR><small>...</small>.  When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
-+information about resources used by <VAR>command</VAR>.
-+</P>
-+<P>
-+
-+Here is an example of using <CODE>time</CODE> to measure the time and other
-+resources used by running the program <CODE>grep</CODE>:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time grep nobody /etc/aliases
-+nobody:/dev/null
-+etc-files:nobody
-+misc-group:nobody
-+0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
-+46inputs+7outputs (43major+251minor)pagefaults 0swaps
-+</pre></td></tr></table><P>
-+
-+Mail suggestions and bug reports for GNU <CODE>time</CODE> to
-+<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>.  Please include the version of
-+<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the
-+operating system and C compiler you used.
-+</P>
-+<P>
-+
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
-+</TABLE>
-+<P>
-+
-+<A NAME="Setting Format"></A>
-+<HR SIZE="6">
-+<A NAME="SEC2"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.1 Setting the Output Format </H2>
-+<!--docid::SEC2::-->
-+<P>
-+
-+<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to
-+display about the resources used by the command it runs.  See section <A HREF="time.html#SEC3">1.2 The Format String</A>, for the interpretation of the format string contents.
-+</P>
-+<P>
-+
-+You can specify a format string with the command line options listed
-+below.  If no format is specified on the command line, but the
-+<CODE>TIME</CODE> environment variable is set, its value is used as the format
-+string.  Otherwise, the default format built into <CODE>time</CODE> is used:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
-+%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
-+</pre></td></tr></table><P>
-+
-+The command line options to set the format are:
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-f <VAR>format</VAR></CODE>
-+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
-+<DD>Use <VAR>format</VAR> as the format string.
-+<P>
-+
-+</P>
-+<DT><CODE>-p</CODE>
-+<DD><DT><CODE>--portability</CODE>
-+<DD>Use the following format string, for conformance with POSIX standard
-+1003.2:
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>real %e
-+user %U
-+sys %S
-+</pre></td></tr></table><P>
-+
-+</P>
-+<DT><CODE>-q</CODE>
-+<DD><DT><CODE>--quiet</CODE>
-+<DD>Suppress non-zero error code from the executed program.
-+<P>
-+
-+</P>
-+<DT><CODE>-v</CODE>
-+<DD><DT><CODE>--verbose</CODE>
-+<DD><A NAME="IDX2"></A>
-+Use the built-in verbose format, which displays each available piece of
-+information on the program's resource use on its own line, with an
-+English description of its meaning.
-+</DL>
-+<P>
-+
-+<A NAME="Format String"></A>
-+<HR SIZE="6">
-+<A NAME="SEC3"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.2 The Format String </H2>
-+<!--docid::SEC3::-->
-+<P>
-+
-+<A NAME="IDX3"></A>
-+<A NAME="IDX4"></A>
-+The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output.
-+It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed
-+with plain text.
-+</P>
-+<P>
-+
-+A backslash introduces an <EM>escape</EM>, which is translated
-+into a single printing character upon output.  The valid escapes are
-+listed below.  An invalid escape is output as a question mark followed
-+by a backslash.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>\t</CODE>
-+<DD>a tab character
-+<P>
-+
-+</P>
-+<DT><CODE>\n</CODE>
-+<DD>a newline
-+<P>
-+
-+</P>
-+<DT><CODE>\\</CODE>
-+<DD>a literal backslash
-+</DL>
-+<P>
-+
-+<CODE>time</CODE> always prints a newline after printing the resource use
-+information, so normally format strings do not end with a newline
-+character (or `<SAMP>\n</SAMP>').
-+</P>
-+<P>
-+
-+A resource specifier consists of a percent sign followed by another
-+character.  An invalid resource specifier is output as a question mark
-+followed by the invalid character.  Use `<SAMP>%%</SAMP>' to output a literal
-+percent sign.
-+</P>
-+<P>
-+
-+The resource specifiers, which are a superset of those recognized by the
-+<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below.  Not all
-+resources are measured by all versions of Unix, so some of the values
-+might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
-+</P>
-+<P>
-+
-+<TABLE BORDER="0" CELLSPACING="0">
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
-+</TABLE>
-+<P>
-+
-+<A NAME="Time Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC4"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.1 Time Resources </H3>
-+<!--docid::SEC4::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>E</CODE>
-+<DD>Elapsed real (wall clock) time used by the process, in
-+[hours:]minutes:seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>e</CODE>
-+<DD>Elapsed real (wall clock) time used by the process, in
-+seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>S</CODE>
-+<DD>Total number of CPU-seconds used by the system on behalf of the process
-+(in kernel mode), in seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>U</CODE>
-+<DD>Total number of CPU-seconds that the process used directly (in user
-+mode), in seconds.
-+<P>
-+
-+</P>
-+<DT><CODE>P</CODE>
-+<DD>Percentage of the CPU that this job got.  This is just user + system
-+times divied by the total running time.
-+</DL>
-+<P>
-+
-+<A NAME="Memory Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC5"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.2 Memory Resources </H3>
-+<!--docid::SEC5::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>M</CODE>
-+<DD>Maximum resident set size of the process during its lifetime, in
-+Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>t</CODE>
-+<DD>Average resident set size of the process, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>K</CODE>
-+<DD>Average total (data+stack+text) memory use of the process, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>D</CODE>
-+<DD>Average size of the process's unshared data area, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>p</CODE>
-+<DD>Average size of the process's unshared stack, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>X</CODE>
-+<DD>Average size of the process's shared text, in Kilobytes.
-+<P>
-+
-+</P>
-+<DT><CODE>Z</CODE>
-+<DD>System's page size, in bytes.  This is a per-system constant, but
-+varies between systems.
-+</DL>
-+<P>
-+
-+<A NAME="I/O Resources"></A>
-+<HR SIZE="6">
-+<A NAME="SEC6"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.3 I/O Resources </H3>
-+<!--docid::SEC6::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>F</CODE>
-+<DD>Number of major, or I/O-requiring, page faults that occurred while the
-+process was running.  These are faults where the page has actually
-+migrated out of primary memory.
-+<P>
-+
-+</P>
-+<DT><CODE>R</CODE>
-+<DD>Number of minor, or recoverable, page faults.  These are pages that are
-+not valid (so they fault) but which have not yet been claimed by other
-+virtual pages.  Thus the data in the page is still valid but the system
-+tables must be updated.
-+<P>
-+
-+</P>
-+<DT><CODE>W</CODE>
-+<DD>Number of times the process was swapped out of main memory.
-+<P>
-+
-+</P>
-+<DT><CODE>c</CODE>
-+<DD>Number of times the process was context-switched involuntarily (because
-+the time slice expired).
-+<P>
-+
-+</P>
-+<DT><CODE>w</CODE>
-+<DD>Number of times that the program was context-switched voluntarily, for
-+instance while waiting for an I/O operation to complete.
-+<P>
-+
-+</P>
-+<DT><CODE>I</CODE>
-+<DD>Number of file system inputs by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>O</CODE>
-+<DD>Number of file system outputs by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>r</CODE>
-+<DD>Number of socket messages received by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>s</CODE>
-+<DD>Number of socket messages sent by the process.
-+<P>
-+
-+</P>
-+<DT><CODE>k</CODE>
-+<DD>Number of signals delivered to the process.
-+</DL>
-+<P>
-+
-+<A NAME="Command Info"></A>
-+<HR SIZE="6">
-+<A NAME="SEC7"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H3> 1.2.4 Command Info </H3>
-+<!--docid::SEC7::-->
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>C</CODE>
-+<DD>Name and command line arguments of the command being timed.
-+<P>
-+
-+</P>
-+<DT><CODE>x</CODE>
-+<DD>Exit status of the command.
-+</DL>
-+<P>
-+
-+<A NAME="Redirecting"></A>
-+<HR SIZE="6">
-+<A NAME="SEC8"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.3 Redirecting Output </H2>
-+<!--docid::SEC8::-->
-+<P>
-+
-+By default, <CODE>time</CODE> writes the resource use statistics to the
-+standard error stream.  The options below make it write the statistics
-+to a file instead.  Doing this can be useful if the program you're
-+running writes to the standard error or you're running <CODE>time</CODE>
-+noninteractively or in the background.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-o <VAR>file</VAR></CODE>
-+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
-+<DD>Write the resource use statistics to <VAR>file</VAR>.  By default, this
-+<EM>overwrites</EM> the file, destroying the file's previous contents.
-+<P>
-+
-+</P>
-+<DT><CODE>-a</CODE>
-+<DD><DT><CODE>--append</CODE>
-+<DD><EM>Append</EM> the resource use information to the output file instead
-+of overwriting it.  This option is only useful with the `<SAMP>-o</SAMP>' or
-+`<SAMP>--output</SAMP>' option.
-+</DL>
-+<P>
-+
-+<A NAME="Examples"></A>
-+<HR SIZE="6">
-+<A NAME="SEC9"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.4 Examples </H2>
-+<!--docid::SEC9::-->
-+<P>
-+
-+Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time wc /etc/hosts
-+      35     111    1134 /etc/hosts
-+0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
-+1inputs+1outputs (0major+0minor)pagefaults 0swaps
-+</pre></td></tr></table><P>
-+
-+Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and
-+wall-clock time:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -f &quot;\t%E real,\t%U user,\t%S sys&quot; ls -Fs
-+total 16
-+1 account/      1 db/           1 mail/         1 run/
-+1 backups/      1 emacs/        1 msgs/         1 rwho/
-+1 crash/        1 games/        1 preserve/     1 spool/
-+1 cron/         1 log/          1 quotas/       1 tmp/
-+        0:00.03 real,   0.00 user,      0.01 sys
-+</pre></td></tr></table><P>
-+
-+Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time
-+and number of signals to the file `<TT>log</TT>', reading the format string
-+from the environment variable <CODE>TIME</CODE>:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ export TIME=&quot;\t%E,\t%k&quot; # If using bash or ksh
-+eg$ setenv TIME &quot;\t%E,\t%k&quot; # If using csh or tcsh
-+eg$ time -a -o log emacs .bashrc
-+eg$ cat log
-+        0:16.55,        726
-+</pre></td></tr></table><P>
-+
-+Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it
-+verbosely:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -v sleep 4
-+        Command being timed: &quot;sleep 4&quot;
-+        User time (seconds): 0.00
-+        System time (seconds): 0.05
-+        Percent of CPU this job got: 1%
-+        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26
-+        Average shared text size (kbytes): 36
-+        Average unshared data size (kbytes): 24
-+        Average stack size (kbytes): 0
-+        Average total size (kbytes): 60
-+        Maximum resident set size (kbytes): 32
-+        Average resident set size (kbytes): 24
-+        Major (requiring I/O) page faults: 3
-+        Minor (reclaiming a frame) page faults: 0
-+        Voluntary context switches: 11
-+        Involuntary context switches: 0
-+        Swaps: 0
-+        File system inputs: 3
-+        File system outputs: 1
-+        Socket messages sent: 0
-+        Socket messages received: 0
-+        Signals delivered: 1
-+        Page size (bytes): 4096
-+        Exit status: 0
-+</pre></td></tr></table><P>
-+
-+<A NAME="Accuracy"></A>
-+<HR SIZE="6">
-+<A NAME="SEC10"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> &gt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.5 Accuracy </H2>
-+<!--docid::SEC10::-->
-+<P>
-+
-+The elapsed time is not collected atomically with the execution of the
-+program; as a result, in bizarre circumstances (if the <CODE>time</CODE>
-+command gets stopped or swapped out in between when the program being
-+timed exits and when <CODE>time</CODE> calculates how long it took to run), it
-+could be much larger than the actual execution time.
-+</P>
-+<P>
-+
-+When the running time of a command is very nearly zero, some values
-+(e.g., the percentage of CPU used) may be reported as either zero (which
-+is wrong) or a question mark.
-+</P>
-+<P>
-+
-+Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE>
-+system call.  The numbers are only as good as those returned by
-+<CODE>wait3</CODE>.  Many systems do not measure all of the resources that
-+<CODE>time</CODE> can report on; those resources are reported as zero.  The
-+systems that measure most or all of the resources are based on 4.2 or
-+4.3BSD.  Later BSD releases use different memory management code that
-+measures fewer resources.
-+</P>
-+<P>
-+
-+On systems that do not have a <CODE>wait3</CODE> call that returns status
-+information, the <CODE>times</CODE> system call is used instead.  It provides
-+much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE>
-+reports most of the resources as zero.
-+</P>
-+<P>
-+
-+The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only &quot;real&quot; input
-+and output and do not include those supplied by caching devices.  The
-+meaning of &quot;real&quot; I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be
-+muddled for workstations, especially diskless ones.
-+</P>
-+<P>
-+
-+<A NAME="Invoking time"></A>
-+<HR SIZE="6">
-+<A NAME="SEC11"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H2> 1.6 Running the <CODE>time</CODE> Command </H2>
-+<!--docid::SEC11::-->
-+<P>
-+
-+The format of the <CODE>time</CODE> command is:
-+</P>
-+<P>
-+
-+<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
-+</pre></td></tr></table><P>
-+
-+<A NAME="IDX5"></A>
-+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
-+<VAR>arg</VAR><small>...</small>.  When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
-+information about resources used by <VAR>command</VAR> (on the standard error
-+output, by default).  If <VAR>command</VAR> exits with non-zero status or is
-+terminated by a signal, <CODE>time</CODE> displays a warning message and the
-+exit status or signal number.
-+</P>
-+<P>
-+
-+Options to <CODE>time</CODE> must appear on the command line before
-+<VAR>command</VAR>.  Anything on the command line after <VAR>command</VAR> is
-+passed as arguments to <VAR>command</VAR>.
-+</P>
-+<P>
-+
-+</P>
-+<DL COMPACT>
-+<DT><CODE>-o <VAR>file</VAR></CODE>
-+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
-+<DD>Write the resource use statistics to <VAR>file</VAR>.
-+<P>
-+
-+</P>
-+<DT><CODE>-a</CODE>
-+<DD><DT><CODE>--append</CODE>
-+<DD><EM>Append</EM> the resource use information to the output file instead
-+of overwriting it.
-+<P>
-+
-+</P>
-+<DT><CODE>-f <VAR>format</VAR></CODE>
-+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
-+<DD>Use <VAR>format</VAR> as the format string.
-+<P>
-+
-+</P>
-+<DT><CODE>--help</CODE>
-+<DD>Print a summary of the command line options to <CODE>time</CODE> and exit.
-+<P>
-+
-+</P>
-+<DT><CODE>-p</CODE>
-+<DD><DT><CODE>--portability</CODE>
-+<DD>Use the POSIX format.
-+<P>
-+
-+</P>
-+<DT><CODE>-v</CODE>
-+<DD><DT><CODE>--verbose</CODE>
-+<DD><A NAME="IDX6"></A>
-+Use the built-in verbose format.
-+<P>
-+
-+</P>
-+<DT><CODE>-V</CODE>
-+<DD><DT><CODE>--version</CODE>
-+<DD><A NAME="IDX7"></A>
-+Print the version number of <CODE>time</CODE> and exit.
-+</DL>
-+<P>
-+
-+<HR SIZE="6">
-+<A NAME="SEC_Contents"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Table of Contents</H1>
-+<BLOCKQUOTE>
-+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
-+<BR>
-+<BLOCKQUOTE>
-+<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A>
-+<BR>
-+<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A>
-+<BR>
-+<BLOCKQUOTE>
-+<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A>
-+<BR>
-+<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A>
-+<BR>
-+<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A>
-+<BR>
-+<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A>
-+<BR>
-+</BLOCKQUOTE>
-+<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A>
-+<BR>
-+<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A>
-+<BR>
-+<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A>
-+<BR>
-+<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A>
-+<BR>
-+</BLOCKQUOTE>
-+</BLOCKQUOTE>
-+<HR SIZE=1>
-+<A NAME="SEC_OVERVIEW"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>Short Table of Contents</H1>
-+<BLOCKQUOTE>
-+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
-+<BR>
-+
-+</BLOCKQUOTE>
-+<HR SIZE=1>
-+<A NAME="SEC_About"></A>
-+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
-+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
-+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
-+</TR></TABLE>
-+<H1>About this document</H1>
-+This document was generated
-+by 
-+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
-+<P></P>
-+The buttons in the navigation panels have the following meaning:
-+<P></P>
-+<table border = "1">
-+<TR>
-+<TH> Button </TH>
-+<TH> Name </TH>
-+<TH> Go to </TH>
-+<TH> From 1.2.3 go to</TH>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &lt; ] </TD>
-+<TD ALIGN="CENTER">
-+Back
-+</TD>
-+<TD>
-+previous section in reading order
-+</TD>
-+<TD>
-+1.2.2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &gt; ] </TD>
-+<TD ALIGN="CENTER">
-+Forward
-+</TD>
-+<TD>
-+next section in reading order
-+</TD>
-+<TD>
-+1.2.4
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &lt;&lt; ] </TD>
-+<TD ALIGN="CENTER">
-+FastBack
-+</TD>
-+<TD>
-+beginning of this chapter or previous chapter
-+</TD>
-+<TD>
-+1
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ Up ] </TD>
-+<TD ALIGN="CENTER">
-+Up
-+</TD>
-+<TD>
-+up section
-+</TD>
-+<TD>
-+1.2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ &gt;&gt; ] </TD>
-+<TD ALIGN="CENTER">
-+FastForward
-+</TD>
-+<TD>
-+next chapter
-+</TD>
-+<TD>
-+2
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Top] </TD>
-+<TD ALIGN="CENTER">
-+Top
-+</TD>
-+<TD>
-+cover (top) of document
-+</TD>
-+<TD>
-+ &nbsp; 
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Contents] </TD>
-+<TD ALIGN="CENTER">
-+Contents
-+</TD>
-+<TD>
-+table of contents
-+</TD>
-+<TD>
-+ &nbsp; 
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [Index] </TD>
-+<TD ALIGN="CENTER">
-+Index
-+</TD>
-+<TD>
-+concept index
-+</TD>
-+<TD>
-+ &nbsp; 
-+</TD>
-+</TR>
-+<TR>
-+<TD ALIGN="CENTER">
-+ [ ? ] </TD>
-+<TD ALIGN="CENTER">
-+About
-+</TD>
-+<TD>
-+this page
-+</TD>
-+<TD>
-+ &nbsp; 
-+</TD>
-+</TR>
-+</TABLE>
-+    <P>
-+      where the <STRONG> Example </STRONG> assumes that the current position
-+      is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
-+      the following structure:</P>
-+    <UL>
-+      <LI> 1. Section One
-+        <UL>
-+          <LI>1.1 Subsection One-One
-+            <UL>
-+              <LI>...</LI>
-+            </UL>
-+          <LI>1.2 Subsection One-Two
-+            <UL>
-+              <LI>1.2.1 Subsubsection One-Two-One</LI>
-+              <LI>1.2.2 Subsubsection One-Two-Two</LI>
-+              <LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
-+                <STRONG>&lt;== Current Position </STRONG></LI>
-+              <LI>1.2.4 Subsubsection One-Two-Four</LI>
-+            </UL>
-+          </LI>
-+          <LI>1.3 Subsection One-Three
-+            <UL>
-+              <LI>...</LI>
-+            </UL>
-+          </LI>
-+          <LI>1.4 Subsection One-Four</LI>
-+        </UL>
-+      </LI>
-+    </UL>
-+
-+<HR SIZE=1>
-+<BR>
-+<FONT SIZE="-1">
-+This document was generated
-+by <I>root</I> on <I>September, 1 2003</I>
-+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
-+</FONT>
-+
-+</BODY>
-+</HTML>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time.inc b/import-layers/yocto-poky/meta/recipes-extended/time/time.inc
deleted file mode 100644
index 6b20d7c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/time/time.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Tool that measures CPU resources"
-DESCRIPTION = "time measures many of the CPU resources, such as time and \
-memory, that other programs use."
-HOMEPAGE = "http://www.gnu.org/software/time/"
-SECTION = "utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-inherit texinfo update-alternatives
-
-ALTERNATIVE_${PN} = "time"
-ALTERNATIVE_PRIORITY = "100"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time_1.7.bb b/import-layers/yocto-poky/meta/recipes-extended/time/time_1.7.bb
deleted file mode 100644
index 92c5353..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/time/time_1.7.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require time.inc
-
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \
-	   file://debian.patch"
-
-SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3"
-SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d"
-
-inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-extended/time/time_1.8.bb b/import-layers/yocto-poky/meta/recipes-extended/time/time_1.8.bb
new file mode 100644
index 0000000..fb3147a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/time/time_1.8.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Tool that measures CPU resources"
+DESCRIPTION = "time measures many of the CPU resources, such as time and \
+memory, that other programs use."
+HOMEPAGE = "http://www.gnu.org/software/time/"
+SECTION = "utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit texinfo update-alternatives
+
+ALTERNATIVE_${PN} = "time"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4e00dcb8c3ab11c7cf5a0d698828ac96"
+SRC_URI[sha256sum] = "8a2f540155961a35ba9b84aec5e77e3ae36c74cecb4484db455960601b7a2e1b"
+
+inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch b/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
deleted file mode 100644
index e49fa09..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From b520d20b8122a783f99f088758b78d928f70ee34 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Mon, 23 Oct 2017 11:42:45 -0700
-Subject: [PATCH] Fix Makefile quoting bug
-
-Problem with INSTALLARGS reported by Zefram in:
-https://mm.icann.org/pipermail/tz/2017-October/025360.html
-Fix similar problems too.
-* Makefile (ZIC_INSTALL, VALIDATE_ENV, CC, install)
-(INSTALL, version, INSTALLARGS, right_posix, posix_right)
-(check_public): Use apostrophes to prevent undesirable
-interpretation of names by the shell.  We still do not support
-directory names containing apostrophes or newlines, but this is
-good enough.
-
-Upstream-Status: Backport
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-* NEWS: Mention this.
----
- Makefile | 64 ++++++++++++++++++++++++++++++++--------------------------------
- NEWS     |  8 ++++++++
- 2 files changed, 40 insertions(+), 32 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c92edc0..97649ca 100644
---- a/Makefile
-+++ b/Makefile
-@@ -313,7 +313,7 @@ ZFLAGS=
- 
- # How to use zic to install tz binary files.
- 
--ZIC_INSTALL=	$(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
-+ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
- 
- # The name of a Posix-compliant 'awk' on your system.
- AWK=		awk
-@@ -341,8 +341,8 @@ SGML_CATALOG_FILES= \
- VALIDATE = nsgmls
- VALIDATE_FLAGS = -s -B -wall -wno-unused-param
- VALIDATE_ENV = \
--  SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
--  SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
-+  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
-+  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
-   SP_CHARSET_FIXED=YES \
-   SP_ENCODING=UTF-8
- 
-@@ -396,7 +396,7 @@ GZIPFLAGS=	-9n
- #MAKE=		make
- 
- cc=		cc
--CC=		$(cc) -DTZDIR=\"$(TZDIR)\"
-+CC=		$(cc) -DTZDIR='"$(TZDIR)"'
- 
- AR=		ar
- 
-@@ -473,29 +473,29 @@ all:		tzselect yearistype zic zdump libtz.a $(TABDATA)
- ALL:		all date $(ENCHILADA)
- 
- install:	all $(DATA) $(REDO) $(MANS)
--		mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
--			$(DESTDIR)$(LIBDIR) \
--			$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
--			$(DESTDIR)$(MANDIR)/man8
-+		mkdir -p '$(DESTDIR)$(ETCDIR)' '$(DESTDIR)$(TZDIR)' \
-+			'$(DESTDIR)$(LIBDIR)' \
-+			'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
-+			'$(DESTDIR)$(MANDIR)/man8'
- 		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
--		cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
--		cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
--		cp libtz.a $(DESTDIR)$(LIBDIR)/.
--		$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
--		cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
--		cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
--		cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
-+		cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
-+		cp tzselect zic zdump '$(DESTDIR)$(ETCDIR)/.'
-+		cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
-+		$(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
-+		cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
-+		cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
-+		cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
- 
- INSTALL:	ALL install date.1
--		mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
--		cp date $(DESTDIR)$(BINDIR)/.
--		cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.
-+		mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
-+		cp date '$(DESTDIR)$(BINDIR)/.'
-+		cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
- 
- version:	$(VERSION_DEPS)
- 		{ (type git) >/dev/null 2>&1 && \
- 		  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
- 				--abbrev=7 --dirty` || \
--		  V=$(VERSION); } && \
-+		  V='$(VERSION)'; } && \
- 		printf '%s\n' "$$V" >$@.out
- 		mv $@.out $@
- 
-@@ -529,12 +529,12 @@ leapseconds:	$(LEAP_DEPS)
- # Arguments to pass to submakes of install_data.
- # They can be overridden by later submake arguments.
- INSTALLARGS = \
-- BACKWARD=$(BACKWARD) \
-- DESTDIR=$(DESTDIR) \
-+ BACKWARD='$(BACKWARD)' \
-+ DESTDIR='$(DESTDIR)' \
-  LEAPSECONDS='$(LEAPSECONDS)' \
-  PACKRATDATA='$(PACKRATDATA)' \
-- TZDIR=$(TZDIR) \
-- YEARISTYPE=$(YEARISTYPE) \
-+ TZDIR='$(TZDIR)' \
-+ YEARISTYPE='$(YEARISTYPE)' \
-  ZIC='$(ZIC)'
- 
- # 'make install_data' installs one set of tz binary files.
-@@ -558,16 +558,16 @@ right_only:
- # You must replace all of $(TZDIR) to switch from not using leap seconds
- # to using them, or vice versa.
- right_posix:	right_only
--		rm -fr $(DESTDIR)$(TZDIR)-leaps
--		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
--		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
--		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
-+		rm -fr '$(DESTDIR)$(TZDIR)-leaps'
-+		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \
-+		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
-+		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
- 
- posix_right:	posix_only
--		rm -fr $(DESTDIR)$(TZDIR)-posix
--		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
--		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
--		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
-+		rm -fr '$(DESTDIR)$(TZDIR)-posix'
-+		ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \
-+		  $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only
-+		$(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only
- 
- # This obsolescent rule is present for backwards compatibility with
- # tz releases 2014g through 2015g.  It should go away eventually.
-@@ -764,7 +764,7 @@ set-timestamps.out: $(ENCHILADA)
- 
- check_public:
- 		$(MAKE) maintainer-clean
--		$(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL
-+		$(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
- 		mkdir -p public.dir
- 		for i in $(TDATA) tzdata.zi; do \
- 		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
-diff --git a/NEWS b/NEWS
-index bd2bec2..75ab095 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,5 +1,13 @@
- News for the tz database
- 
-+Unreleased, experimental changes
-+
-+  Changes to build procedure
-+
-+    The Makefile now quotes values like BACKWARD more carefully when
-+    passing them to the shell.  (Problem reported by Zefram.)
-+
-+
- Release 2017c - 2017-10-20 14:49:34 -0700
- 
-   Briefly:
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch b/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch
deleted file mode 100644
index 87afe47..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From e231da4fb2beb17c60b4b1a5c276366d6a6e433f Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Mon, 23 Oct 2017 17:58:36 -0700
-Subject: [PATCH] Port zdump to C90 + snprintf
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Problem reported by Jon Skeet in:
-https://mm.icann.org/pipermail/tz/2017-October/025362.html
-* NEWS: Mention this.
-* zdump.c (my_snprintf): New macro or function.  If a macro, it is
-just snprintf.  If a function, it is the same as the old snprintf
-static function, with an ATTRIBUTE_FORMAT to pacify modern GCC.
-All uses of snprintf changed to use my_snprintf.  This way,
-installers don’t need to specify -DHAVE_SNPRINTF if they are using
-a pre-C99 compiler with a library that has snprintf.
-
-Upstream-Status: Backport
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- NEWS    |  4 ++++
- zdump.c | 29 ++++++++++++++++-------------
- 2 files changed, 20 insertions(+), 13 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index 75ab095..dea08b8 100644
---- a/NEWS
-+++ b/NEWS
-@@ -7,6 +7,10 @@ Unreleased, experimental changes
-     The Makefile now quotes values like BACKWARD more carefully when
-     passing them to the shell.  (Problem reported by Zefram.)
- 
-+    Builders no longer need to specify -DHAVE_SNPRINTF on platforms
-+    that have snprintf and use pre-C99 compilers.  (Problem reported
-+    by Jon Skeet.)
-+
- 
- Release 2017c - 2017-10-20 14:49:34 -0700
- 
-diff --git a/zdump.c b/zdump.c
-index 8e3bf3e..d4e6084 100644
---- a/zdump.c
-+++ b/zdump.c
-@@ -795,12 +795,14 @@ show(timezone_t tz, char *zone, time_t t, bool v)
- 		abbrok(abbr(tmp), zone);
- }
- 
--#if !HAVE_SNPRINTF
-+#if HAVE_SNPRINTF
-+# define my_snprintf snprintf
-+#else
- # include <stdarg.h>
- 
- /* A substitute for snprintf that is good enough for zdump.  */
--static int
--snprintf(char *s, size_t size, char const *format, ...)
-+static int ATTRIBUTE_FORMAT((printf, 3, 4))
-+my_snprintf(char *s, size_t size, char const *format, ...)
- {
-   int n;
-   va_list args;
-@@ -839,10 +841,10 @@ format_local_time(char *buf, size_t size, struct tm const *tm)
- {
-   int ss = tm->tm_sec, mm = tm->tm_min, hh = tm->tm_hour;
-   return (ss
--	  ? snprintf(buf, size, "%02d:%02d:%02d", hh, mm, ss)
-+	  ? my_snprintf(buf, size, "%02d:%02d:%02d", hh, mm, ss)
- 	  : mm
--	  ? snprintf(buf, size, "%02d:%02d", hh, mm)
--	  : snprintf(buf, size, "%02d", hh));
-+	  ? my_snprintf(buf, size, "%02d:%02d", hh, mm)
-+	  : my_snprintf(buf, size, "%02d", hh));
- }
- 
- /* Store into BUF, of size SIZE, a formatted UTC offset for the
-@@ -877,10 +879,10 @@ format_utc_offset(char *buf, size_t size, struct tm const *tm, time_t t)
-   mm = off / 60 % 60;
-   hh = off / 60 / 60;
-   return (ss || 100 <= hh
--	  ? snprintf(buf, size, "%c%02ld%02d%02d", sign, hh, mm, ss)
-+	  ? my_snprintf(buf, size, "%c%02ld%02d%02d", sign, hh, mm, ss)
- 	  : mm
--	  ? snprintf(buf, size, "%c%02ld%02d", sign, hh, mm)
--	  : snprintf(buf, size, "%c%02ld", sign, hh));
-+	  ? my_snprintf(buf, size, "%c%02ld%02d", sign, hh, mm)
-+	  : my_snprintf(buf, size, "%c%02ld", sign, hh));
- }
- 
- /* Store into BUF (of size SIZE) a quoted string representation of P.
-@@ -983,15 +985,16 @@ istrftime(char *buf, size_t size, char const *time_fmt,
- 	    for (abp = ab; is_alpha(*abp); abp++)
- 	      continue;
- 	    len = (!*abp && *ab
--		   ? snprintf(b, s, "%s", ab)
-+		   ? my_snprintf(b, s, "%s", ab)
- 		   : format_quoted_string(b, s, ab));
- 	    if (s <= len)
- 	      return false;
- 	    b += len, s -= len;
- 	  }
--	  formatted_len = (tm->tm_isdst
--			   ? snprintf(b, s, &"\t\t%d"[show_abbr], tm->tm_isdst)
--			   : 0);
-+	  formatted_len
-+	    = (tm->tm_isdst
-+	       ? my_snprintf(b, s, &"\t\t%d"[show_abbr], tm->tm_isdst)
-+	       : 0);
- 	}
- 	break;
-       }
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018c.bb b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018c.bb
deleted file mode 100644
index 85e9b70..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018c.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
-LICENSE = "PD & BSD & BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
-
-SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
-           http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
-           "
-
-UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-
-SRC_URI[tzcode.md5sum] = "e6e0d4b2ce3fa6906f303157bed2612e"
-SRC_URI[tzcode.sha256sum] = "31fa7fc0f94a6ff2d6bc878c0a35e8ab8b5aa0e8b01445a1d4a8f14777d0e665"
-SRC_URI[tzdata.md5sum] = "c412b1531adef1be7a645ab734f86acc"
-SRC_URI[tzdata.sha256sum] = "2825c3e4b7ef520f24d393bcc02942f9762ffd3e7fc9b23850789ed8f22933f6"
-
-S = "${WORKDIR}"
-
-inherit native
-
-EXTRA_OEMAKE += "cc='${CC}'"
-
-do_install () {
-        install -d ${D}${bindir}/
-        install -m 755 zic ${D}${bindir}/
-        install -m 755 zdump ${D}${bindir}/
-        install -m 755 tzselect ${D}${bindir}/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018d.bb b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018d.bb
new file mode 100644
index 0000000..7933a5d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2018d.bb
@@ -0,0 +1,30 @@
+# note that we allow for us to use data later than our code version
+#
+SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+LICENSE = "PD & BSD & BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
+
+SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
+           http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
+           "
+
+UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
+
+SRC_URI[tzcode.md5sum] = "96612b4f5d7e8804fd9a0981c021be90"
+SRC_URI[tzcode.sha256sum] = "7de44e85baad748d217e3fd60706f599f9aec68bce6356b163f52b0dbd40a8d9"
+SRC_URI[tzdata.md5sum] = "871a7ef808eb42ebc551acdb3d661554"
+SRC_URI[tzdata.sha256sum] = "5106eddceb5f1ae3a91dbd3960e1b8b11ba0dc08579a31cf0724a7691b10c054"
+
+S = "${WORKDIR}"
+
+inherit native
+
+EXTRA_OEMAKE += "cc='${CC}'"
+
+do_install () {
+        install -d ${D}${bindir}/
+        install -m 755 zic ${D}${bindir}/
+        install -m 755 zdump ${D}${bindir}/
+        install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018c.bb b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018c.bb
deleted file mode 100644
index ff5ec1c..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018c.bb
+++ /dev/null
@@ -1,215 +0,0 @@
-SUMMARY = "Timezone data"
-HOMEPAGE = "http://www.iana.org/time-zones"
-SECTION = "base"
-LICENSE = "PD & BSD & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
-
-DEPENDS = "tzcode-native"
-
-SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
-UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-
-SRC_URI[tzdata.md5sum] = "c412b1531adef1be7a645ab734f86acc"
-SRC_URI[tzdata.sha256sum] = "2825c3e4b7ef520f24d393bcc02942f9762ffd3e7fc9b23850789ed8f22933f6"
-
-inherit allarch
-
-RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
-             timezone-arctic timezone-asia timezone-atlantic \
-             timezone-australia timezone-europe timezone-indian \
-             timezone-iso3166.tab timezone-pacific timezone-zone.tab"
-
-S = "${WORKDIR}"
-
-DEFAULT_TIMEZONE ?= "Universal"
-INSTALL_TIMEZONE_FILE ?= "1"
-
-TZONES= "africa antarctica asia australasia europe northamerica southamerica  \
-         factory etcetera backward systemv \
-        "
-# pacificnew 
-
-do_compile () {
-        for zone in ${TZONES}; do \
-            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
-                -y ${S}/yearistype.sh ${S}/${zone} ; \
-            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
-                -y ${S}/yearistype.sh ${S}/${zone} ; \
-            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
-                -y ${S}/yearistype.sh ${S}/${zone} ; \
-        done
-}
-
-do_install () {
-        install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
-        cp -pPR ${S}/$exec_prefix ${D}/
-        # libc is removing zoneinfo files from package
-        cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
-        cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo
-        cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
-
-        # Install default timezone
-        if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
-            install -d ${D}${sysconfdir}
-            if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
-                echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
-            fi
-            ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
-        else
-            bberror "DEFAULT_TIMEZONE is set to an invalid value."
-            exit 1
-        fi
-
-        chown -R root:root ${D}
-}
-
-pkg_postinst_${PN} () {
-	etc_lt="$D${sysconfdir}/localtime"
-	src="$D${sysconfdir}/timezone"
-
-	if [ -e ${src} ] ; then
-		tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
-	fi
-	
-	if [ -z "${tz}" ] ; then
-		exit 0
-	fi
-	
-	if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
-		echo "You have an invalid TIMEZONE setting in ${src}"
-		echo "Your ${etc_lt} has been reset to Universal; enjoy!"
-		tz="Universal"
-		echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
-		if [ -L ${etc_lt} ] ; then
-			rm -f "${etc_lt}"
-		fi
-		ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
-	fi
-}
-
-# Packages primarily organized by directory with a major city
-# in most time zones in the base package
-
-PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
-    tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
-    tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
-
-FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
-RPROVIDES_tzdata-africa = "tzdata-africa"
-
-FILES_tzdata-americas += "${datadir}/zoneinfo/America/*  \
-                ${datadir}/zoneinfo/US/*                \
-                ${datadir}/zoneinfo/Brazil/*            \
-                ${datadir}/zoneinfo/Canada/*            \
-                ${datadir}/zoneinfo/Mexico/*            \
-                ${datadir}/zoneinfo/Chile/*"
-RPROVIDES_tzdata-americas = "tzdata-americas"
-
-FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
-RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
-
-FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
-RPROVIDES_tzdata-arctic = "tzdata-arctic"
-
-FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/*        \
-                ${datadir}/zoneinfo/Indian/*            \
-                ${datadir}/zoneinfo/Mideast/*"
-RPROVIDES_tzdata-asia = "tzdata-asia"
-
-FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
-RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
-
-FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
-RPROVIDES_tzdata-australia = "tzdata-australia"
-
-FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
-RPROVIDES_tzdata-europe = "tzdata-europe"
-
-FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
-RPROVIDES_tzdata-pacific = "tzdata-pacific"
-
-FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
-RPROVIDES_tzdata-posix = "tzdata-posix"
-
-FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
-RPROVIDES_tzdata-right = "tzdata-right"
-
-
-FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba           \
-                ${datadir}/zoneinfo/Egypt                \
-                ${datadir}/zoneinfo/Eire                 \
-                ${datadir}/zoneinfo/Factory              \
-                ${datadir}/zoneinfo/GB-Eire              \
-                ${datadir}/zoneinfo/Hongkong             \
-                ${datadir}/zoneinfo/Iceland              \
-                ${datadir}/zoneinfo/Iran                 \
-                ${datadir}/zoneinfo/Israel               \
-                ${datadir}/zoneinfo/Jamaica              \
-                ${datadir}/zoneinfo/Japan                \
-                ${datadir}/zoneinfo/Kwajalein            \
-                ${datadir}/zoneinfo/Libya                \
-                ${datadir}/zoneinfo/Navajo               \
-                ${datadir}/zoneinfo/Poland               \
-                ${datadir}/zoneinfo/Portugal             \
-                ${datadir}/zoneinfo/Singapore            \
-                ${datadir}/zoneinfo/Turkey"
-RPROVIDES_tzdata-misc = "tzdata-misc"
-
-
-FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu     \
-                ${datadir}/zoneinfo/America/Anchorage    \
-                ${datadir}/zoneinfo/America/Los_Angeles  \
-                ${datadir}/zoneinfo/America/Denver       \
-                ${datadir}/zoneinfo/America/Chicago      \
-                ${datadir}/zoneinfo/America/New_York     \
-                ${datadir}/zoneinfo/America/Caracas      \
-                ${datadir}/zoneinfo/America/Sao_Paulo    \
-                ${datadir}/zoneinfo/Europe/London        \
-                ${datadir}/zoneinfo/Europe/Paris         \
-                ${datadir}/zoneinfo/Africa/Cairo         \
-                ${datadir}/zoneinfo/Europe/Moscow        \
-                ${datadir}/zoneinfo/Asia/Dubai           \
-                ${datadir}/zoneinfo/Asia/Karachi         \
-                ${datadir}/zoneinfo/Asia/Dhaka           \
-                ${datadir}/zoneinfo/Asia/Bankok          \
-                ${datadir}/zoneinfo/Asia/Hong_Kong       \
-                ${datadir}/zoneinfo/Asia/Tokyo           \
-                ${datadir}/zoneinfo/Australia/Darwin     \
-                ${datadir}/zoneinfo/Australia/Adelaide   \
-                ${datadir}/zoneinfo/Australia/Brisbane   \
-                ${datadir}/zoneinfo/Australia/Sydney     \
-                ${datadir}/zoneinfo/Pacific/Noumea       \
-                ${datadir}/zoneinfo/CET                  \
-                ${datadir}/zoneinfo/CST6CDT              \
-                ${datadir}/zoneinfo/EET                  \
-                ${datadir}/zoneinfo/EST                  \
-                ${datadir}/zoneinfo/EST5EDT              \
-                ${datadir}/zoneinfo/GB                   \
-                ${datadir}/zoneinfo/GMT                  \
-                ${datadir}/zoneinfo/GMT+0                \
-                ${datadir}/zoneinfo/GMT-0                \
-                ${datadir}/zoneinfo/GMT0                 \
-                ${datadir}/zoneinfo/Greenwich            \
-                ${datadir}/zoneinfo/HST                  \
-                ${datadir}/zoneinfo/MET                  \
-                ${datadir}/zoneinfo/MST                  \
-                ${datadir}/zoneinfo/MST7MDT              \
-                ${datadir}/zoneinfo/NZ                   \
-                ${datadir}/zoneinfo/NZ-CHAT              \
-                ${datadir}/zoneinfo/PRC                  \
-                ${datadir}/zoneinfo/PST8PDT              \
-                ${datadir}/zoneinfo/ROC                  \
-                ${datadir}/zoneinfo/ROK                  \
-                ${datadir}/zoneinfo/UCT                  \
-                ${datadir}/zoneinfo/UTC                  \
-                ${datadir}/zoneinfo/Universal            \
-                ${datadir}/zoneinfo/W-SU                 \
-                ${datadir}/zoneinfo/WET                  \
-                ${datadir}/zoneinfo/Zulu                 \
-                ${datadir}/zoneinfo/zone.tab             \
-                ${datadir}/zoneinfo/zone1970.tab         \
-                ${datadir}/zoneinfo/iso3166.tab          \
-                ${datadir}/zoneinfo/Etc/*"
-
-CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }"
-CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018d.bb b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018d.bb
new file mode 100644
index 0000000..f7fce80
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2018d.bb
@@ -0,0 +1,215 @@
+SUMMARY = "Timezone data"
+HOMEPAGE = "http://www.iana.org/time-zones"
+SECTION = "base"
+LICENSE = "PD & BSD & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
+
+DEPENDS = "tzcode-native"
+
+SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
+UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
+
+SRC_URI[tzdata.md5sum] = "871a7ef808eb42ebc551acdb3d661554"
+SRC_URI[tzdata.sha256sum] = "5106eddceb5f1ae3a91dbd3960e1b8b11ba0dc08579a31cf0724a7691b10c054"
+
+inherit allarch
+
+RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
+             timezone-arctic timezone-asia timezone-atlantic \
+             timezone-australia timezone-europe timezone-indian \
+             timezone-iso3166.tab timezone-pacific timezone-zone.tab"
+
+S = "${WORKDIR}"
+
+DEFAULT_TIMEZONE ?= "Universal"
+INSTALL_TIMEZONE_FILE ?= "1"
+
+TZONES= "africa antarctica asia australasia europe northamerica southamerica  \
+         factory etcetera backward systemv \
+        "
+# pacificnew 
+
+do_compile () {
+        for zone in ${TZONES}; do \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+        done
+}
+
+do_install () {
+        install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
+        cp -pPR ${S}/$exec_prefix ${D}/
+        # libc is removing zoneinfo files from package
+        cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
+        cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo
+        cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
+
+        # Install default timezone
+        if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
+            install -d ${D}${sysconfdir}
+            if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
+                echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+            fi
+            ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
+        else
+            bberror "DEFAULT_TIMEZONE is set to an invalid value."
+            exit 1
+        fi
+
+        chown -R root:root ${D}
+}
+
+pkg_postinst_${PN} () {
+	etc_lt="$D${sysconfdir}/localtime"
+	src="$D${sysconfdir}/timezone"
+
+	if [ -e ${src} ] ; then
+		tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+	fi
+	
+	if [ -z "${tz}" ] ; then
+		exit 0
+	fi
+	
+	if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+		echo "You have an invalid TIMEZONE setting in ${src}"
+		echo "Your ${etc_lt} has been reset to Universal; enjoy!"
+		tz="Universal"
+		echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
+		if [ -L ${etc_lt} ] ; then
+			rm -f "${etc_lt}"
+		fi
+		ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
+	fi
+}
+
+# Packages primarily organized by directory with a major city
+# in most time zones in the base package
+
+PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
+    tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
+    tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+
+FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
+RPROVIDES_tzdata-africa = "tzdata-africa"
+
+FILES_tzdata-americas += "${datadir}/zoneinfo/America/*  \
+                ${datadir}/zoneinfo/US/*                \
+                ${datadir}/zoneinfo/Brazil/*            \
+                ${datadir}/zoneinfo/Canada/*            \
+                ${datadir}/zoneinfo/Mexico/*            \
+                ${datadir}/zoneinfo/Chile/*"
+RPROVIDES_tzdata-americas = "tzdata-americas"
+
+FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
+RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
+
+FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
+RPROVIDES_tzdata-arctic = "tzdata-arctic"
+
+FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/*        \
+                ${datadir}/zoneinfo/Indian/*            \
+                ${datadir}/zoneinfo/Mideast/*"
+RPROVIDES_tzdata-asia = "tzdata-asia"
+
+FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
+RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
+
+FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
+RPROVIDES_tzdata-australia = "tzdata-australia"
+
+FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
+RPROVIDES_tzdata-europe = "tzdata-europe"
+
+FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
+RPROVIDES_tzdata-pacific = "tzdata-pacific"
+
+FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
+RPROVIDES_tzdata-posix = "tzdata-posix"
+
+FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
+RPROVIDES_tzdata-right = "tzdata-right"
+
+
+FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba           \
+                ${datadir}/zoneinfo/Egypt                \
+                ${datadir}/zoneinfo/Eire                 \
+                ${datadir}/zoneinfo/Factory              \
+                ${datadir}/zoneinfo/GB-Eire              \
+                ${datadir}/zoneinfo/Hongkong             \
+                ${datadir}/zoneinfo/Iceland              \
+                ${datadir}/zoneinfo/Iran                 \
+                ${datadir}/zoneinfo/Israel               \
+                ${datadir}/zoneinfo/Jamaica              \
+                ${datadir}/zoneinfo/Japan                \
+                ${datadir}/zoneinfo/Kwajalein            \
+                ${datadir}/zoneinfo/Libya                \
+                ${datadir}/zoneinfo/Navajo               \
+                ${datadir}/zoneinfo/Poland               \
+                ${datadir}/zoneinfo/Portugal             \
+                ${datadir}/zoneinfo/Singapore            \
+                ${datadir}/zoneinfo/Turkey"
+RPROVIDES_tzdata-misc = "tzdata-misc"
+
+
+FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu     \
+                ${datadir}/zoneinfo/America/Anchorage    \
+                ${datadir}/zoneinfo/America/Los_Angeles  \
+                ${datadir}/zoneinfo/America/Denver       \
+                ${datadir}/zoneinfo/America/Chicago      \
+                ${datadir}/zoneinfo/America/New_York     \
+                ${datadir}/zoneinfo/America/Caracas      \
+                ${datadir}/zoneinfo/America/Sao_Paulo    \
+                ${datadir}/zoneinfo/Europe/London        \
+                ${datadir}/zoneinfo/Europe/Paris         \
+                ${datadir}/zoneinfo/Africa/Cairo         \
+                ${datadir}/zoneinfo/Europe/Moscow        \
+                ${datadir}/zoneinfo/Asia/Dubai           \
+                ${datadir}/zoneinfo/Asia/Karachi         \
+                ${datadir}/zoneinfo/Asia/Dhaka           \
+                ${datadir}/zoneinfo/Asia/Bangkok         \
+                ${datadir}/zoneinfo/Asia/Hong_Kong       \
+                ${datadir}/zoneinfo/Asia/Tokyo           \
+                ${datadir}/zoneinfo/Australia/Darwin     \
+                ${datadir}/zoneinfo/Australia/Adelaide   \
+                ${datadir}/zoneinfo/Australia/Brisbane   \
+                ${datadir}/zoneinfo/Australia/Sydney     \
+                ${datadir}/zoneinfo/Pacific/Noumea       \
+                ${datadir}/zoneinfo/CET                  \
+                ${datadir}/zoneinfo/CST6CDT              \
+                ${datadir}/zoneinfo/EET                  \
+                ${datadir}/zoneinfo/EST                  \
+                ${datadir}/zoneinfo/EST5EDT              \
+                ${datadir}/zoneinfo/GB                   \
+                ${datadir}/zoneinfo/GMT                  \
+                ${datadir}/zoneinfo/GMT+0                \
+                ${datadir}/zoneinfo/GMT-0                \
+                ${datadir}/zoneinfo/GMT0                 \
+                ${datadir}/zoneinfo/Greenwich            \
+                ${datadir}/zoneinfo/HST                  \
+                ${datadir}/zoneinfo/MET                  \
+                ${datadir}/zoneinfo/MST                  \
+                ${datadir}/zoneinfo/MST7MDT              \
+                ${datadir}/zoneinfo/NZ                   \
+                ${datadir}/zoneinfo/NZ-CHAT              \
+                ${datadir}/zoneinfo/PRC                  \
+                ${datadir}/zoneinfo/PST8PDT              \
+                ${datadir}/zoneinfo/ROC                  \
+                ${datadir}/zoneinfo/ROK                  \
+                ${datadir}/zoneinfo/UCT                  \
+                ${datadir}/zoneinfo/UTC                  \
+                ${datadir}/zoneinfo/Universal            \
+                ${datadir}/zoneinfo/W-SU                 \
+                ${datadir}/zoneinfo/WET                  \
+                ${datadir}/zoneinfo/Zulu                 \
+                ${datadir}/zoneinfo/zone.tab             \
+                ${datadir}/zoneinfo/zone1970.tab         \
+                ${datadir}/zoneinfo/iso3166.tab          \
+                ${datadir}/zoneinfo/Etc/*"
+
+CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }"
+CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
index c989df1..ca4aaad 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
@@ -9,9 +9,11 @@
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 
---- a/extract.c
-+++ b/extract.c
-@@ -2232,10 +2232,17 @@
+Index: unzip60/extract.c
+===================================================================
+--- unzip60.orig/extract.c
++++ unzip60/extract.c
+@@ -2233,10 +2233,17 @@ static int test_compr_eb(__G__ eb, eb_si
      if (compr_offset < 4)                /* field is not compressed: */
          return PK_OK;                    /* do nothing and signal OK */
  
@@ -30,5 +32,5 @@
 +     ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN))))
 +        return IZ_EF_TRUNC;             /* no/bad compressed data! */
  
-     if (
- #ifdef INT_16BIT
+     method = makeword(eb + (EB_HEADSIZE + compr_offset));
+     if ((method == STORED) &&
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch
new file mode 100644
index 0000000..338e0cd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch
@@ -0,0 +1,68 @@
+From c1fe14fa5bd168292cc4670034bc48b954e9dac7 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 13 Mar 2018 14:49:55 +0200
+Subject: [PATCH] watchdog: remove interdependencies of watchdog and
+ wd_keepalive services
+
+Since watchdog and watchdog-keepalive packages can't be installed
+together, remove the inter-dependencies of watchdog and wd_keepalive
+services
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ debian/watchdog.service     |  9 +++------
+ debian/wd_keepalive.service | 10 +++++-----
+ 2 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/debian/watchdog.service b/debian/watchdog.service
+index 7a2fc36..f31d1fe 100644
+--- a/debian/watchdog.service
++++ b/debian/watchdog.service
+@@ -1,16 +1,13 @@
+ [Unit]
+ Description=watchdog daemon
+-Conflicts=wd_keepalive.service
+ After=multi-user.target
+-OnFailure=wd_keepalive.service
+ 
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/default/watchdog
+ ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
+-ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
+-ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'
++ExecStart=/bin/sh -c '[ x$run_watchdog != x1 ] || exec /usr/sbin/watchdog $watchdog_options'
++PIDFile=/var/run/watchdog.pid
+ 
+ [Install]
+-WantedBy=default.target
+-
++WantedBy=multi-user.target
+diff --git a/debian/wd_keepalive.service b/debian/wd_keepalive.service
+index 45b018e..7f8b1dc 100644
+--- a/debian/wd_keepalive.service
++++ b/debian/wd_keepalive.service
+@@ -1,13 +1,13 @@
+ [Unit]
+ Description=watchdog keepalive daemon
+-Before=watchdog.service shutdown.target
+-Conflicts=watchdog.service shutdown.target
++After=multi-user.target
+ 
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/default/watchdog
+ ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
+-ExecStartPre=-/bin/systemctl reset-failed watchdog.service
+ ExecStart=/usr/sbin/wd_keepalive $watchdog_options
+-ExecStartPost=/bin/sh -c 'ln -s /var/run/wd_keepalive.pid /run/sendsigs.omit.d/wd_keepalive.pid'
+-ExecStopPost=/bin/sh -c 'rm -f /run/sendsigs.omit.d/wd_keepalive.pid'
++PIDFile=/var/run/wd_keepalive.pid
++
++[Install]
++WantedBy=multi-user.target
+-- 
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
index e68ad54..ec44c80 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
@@ -1,14 +1,16 @@
 Signed-off-by: Diego Rondini <diego.ml@zoho.com>
 Upstream-Status: Inappropriate
 
---- watchdog-5.13.orig/watchdog.conf	2013-02-01 12:15:44.000000000 +0100
-+++ watchdog-5.13/watchdog.conf	2014-11-13 10:59:43.233943000 +0100
-@@ -20,7 +20,7 @@
- #test-binary		= 
- #test-timeout		= 
+Index: watchdog-5.15/watchdog.conf
+===================================================================
+--- watchdog-5.15.orig/watchdog.conf
++++ watchdog-5.15/watchdog.conf
+@@ -28,7 +28,7 @@
+ #retry-timeout		= 60
+ #repair-maximum		= 1
  
 -#watchdog-device	= /dev/watchdog
 +watchdog-device	= /dev/watchdog
  
  # Defaults compiled into the binary
- #temperature-device	=
+ #temperature-sensor	=
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
index 3d0b72e..37b37ae 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -10,6 +10,7 @@
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
            file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
+           file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \
            file://watchdog-init.patch \
            file://watchdog-conf.patch \
            file://wd_keepalive.init \
@@ -36,7 +37,9 @@
 INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
 INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ."
 
-SYSTEMD_SERVICE_${PN} = "watchdog.service wd_keepalive.service"
+SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
+SYSTEMD_SERVICE_${PN} = "watchdog.service"
+SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service"
 
 do_install_append() {
 	install -d ${D}${systemd_system_unitdir}
@@ -54,6 +57,7 @@
 
 FILES_${PN}-keepalive = " \
     ${sysconfdir}/init.d/wd_keepalive \
+    ${systemd_system_unitdir}/wd_keepalive.service \
     ${sbindir}/wd_keepalive \
 "
 
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc b/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
index 1299edb..3cff656 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
@@ -2,7 +2,7 @@
 HOMEPAGE = "https://www.gnu.org/software/wget/"
 SECTION = "console/network"
 LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e"
 DEPENDS = "gnutls zlib libpcre"
 
 inherit autotools gettext texinfo update-alternatives pkgconfig
@@ -10,6 +10,9 @@
 EXTRA_OECONF = "--with-ssl=gnutls --disable-rpath --disable-iri \
                 --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no"
 
+EXTRA_OEMAKE += 'TOOLCHAIN_OPTIONS="${TOOLCHAIN_OPTIONS}" \
+                 DEBUG_PREFIX_MAP="${DEBUG_PREFIX_MAP}"'
+
 ALTERNATIVE_${PN} = "wget"
 ALTERNATIVE_${PN}_class-nativesdk = ""
 ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch b/import-layers/yocto-poky/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
new file mode 100644
index 0000000..8781df2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
@@ -0,0 +1,61 @@
+From 7f1357529d23b356b45fbb0dd7388588162e4cb8 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 10 Jan 2018 14:43:20 +0800
+Subject: [PATCH] src/Makefile.am: improve reproducibility
+
+Remove build host references from the internally
+generated file version.c. The references get compiled into
+executables, which leads to non-reproducible builds.
+The removed references (--sysroot, -fdebug-prefix-map) were
+only used as part of the `wget --version' which do not have
+side effect.
+
+...
+$ wget --version
+GNU Wget 1.14 built on linux-gnu.
+
++digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
+
+Wgetrc:
+    /etc/wgetrc (system)
+Locale: /usr/share/locale
+Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
+    -DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe
+    -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
+    --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
+Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
+    -fstack-protector-strong --param=ssp-buffer-size=4
+    -grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto
+    /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so
+    -ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o
+    ../lib/libgnu.a
+...
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 28c0be2..44084a3 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -87,9 +87,13 @@ version.c:  $(wget_SOURCES) ../lib/libgnu.a
+ 	echo '#include "version.h"' >> $@
+ 	echo 'const char *version_string = "@VERSION@";' >> $@
+ 	echo 'const char *compilation_string = "'$(COMPILE)'";' \
++	    | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
++	          -e "s,$(DEBUG_PREFIX_MAP),,g" \
+ 	    | $(ESCAPEQUOTE) >> $@
+ 	echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ 	$(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
++	    | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
++	          -e "s,$(DEBUG_PREFIX_MAP),,g" \
+ 	    | $(ESCAPEQUOTE) >> $@
+ 
+ css.c: $(srcdir)/css.l
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget/CVE-2017-6508.patch b/import-layers/yocto-poky/meta/recipes-extended/wget/wget/CVE-2017-6508.patch
deleted file mode 100644
index b9c290f..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget/CVE-2017-6508.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4d729e322fae359a1aefaafec1144764a54e8ad4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
-Date: Mon, 6 Mar 2017 10:04:22 +0100
-Subject: [PATCH] Fix CRLF injection in Wget host part
-
-* src/url.c (url_parse): Reject control characters in host part of URL
-
-Reported-by: Orange Tsai
-
-Upstream-Status: Backport
-[http://git.savannah.gnu.org/cgit/wget.git/commit/?id=4d729e322fae359a1aefaafec1144764a54e8ad4]
-
-CVE: CVE-2017-6508
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- src/url.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/src/url.c b/src/url.c
-index 8f8ff0b..7d36b27 100644
---- a/src/url.c
-+++ b/src/url.c
-@@ -925,6 +925,17 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
-       url_unescape (u->host);
-       host_modified = true;
- 
-+      /* check for invalid control characters in host name */
-+      for (p = u->host; *p; p++)
-+        {
-+          if (c_iscntrl(*p))
-+            {
-+              url_free(u);
-+              error_code = PE_INVALID_HOST_NAME;
-+              goto error;
-+            }
-+        }
-+
-       /* Apply IDNA regardless of iri->utf8_encode status */
-       if (opt.enable_iri && iri)
-         {
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.1.bb b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.1.bb
deleted file mode 100644
index 78bde95..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           file://CVE-2017-6508.patch \
-          "
-
-SRC_URI[md5sum] = "87cea36b7161fd43e3fd51a4e8b89689"
-SRC_URI[sha256sum] = "9e4f12da38cc6167d0752d934abe27c7b1599a9af294e73829be7ac7b5b4da40"
-
-require wget.inc
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.5.bb b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.5.bb
new file mode 100644
index 0000000..e37d8c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.19.5.bb
@@ -0,0 +1,9 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://0002-improve-reproducibility.patch \
+          "
+
+SRC_URI[md5sum] = "2db6f03d655041f82eb64b8c8a1fa7da"
+SRC_URI[sha256sum] = "b39212abe1a73f2b28f4c6cb223c738559caac91d6e416a6d91d4b9d55c9faee"
+
+require wget.inc
diff --git a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
deleted file mode 100644
index 34f8d10..0000000
--- a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Basic desktop integration functions"
-HOMEPAGE = "https://www.freedesktop.org/wiki/Software/xdg-utils/"
-DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
-desktop integration functions for any Free Desktop, such as Linux. \
-They are intended to provide a set of defacto standards. \
-The following scripts are provided at this time: \
-xdg-desktop-icon \
-xdg-desktop-menu \
-xdg-email \
-xdg-icon-resource \
-xdg-mime \
-xdg-open \
-xdg-screensaver \
-xdg-terminal \
-"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
-
-SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
-           file://0001-Reinstate-xdg-terminal.patch \
-           file://0001-Don-t-build-the-in-script-manual.patch \
-          "
-
-SRC_URI[md5sum] = "2d0aec6037769a5f138ff404b1bb4b15"
-SRC_URI[sha256sum] = "b0dd63a2576e0bb16f1aa78d6ddf7d6784784a098d4df17161cd6a17c7bc4125"
-
-UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
-
-# Needs brokensep as this doesn't use automake
-inherit autotools-brokensep distro_features_check
-
-# The xprop requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS = "xmlto-native libxslt-native"
-RDEPENDS_${PN} += "xprop"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb
new file mode 100644
index 0000000..7339289
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.2.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Basic desktop integration functions"
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/xdg-utils/"
+DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
+desktop integration functions for any Free Desktop, such as Linux. \
+They are intended to provide a set of defacto standards. \
+The following scripts are provided at this time: \
+xdg-desktop-icon \
+xdg-desktop-menu \
+xdg-email \
+xdg-icon-resource \
+xdg-mime \
+xdg-open \
+xdg-screensaver \
+xdg-terminal \
+"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
+
+SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
+           file://0001-Reinstate-xdg-terminal.patch \
+           file://0001-Don-t-build-the-in-script-manual.patch \
+          "
+
+SRC_URI[md5sum] = "361e75eb76c94d19f6f4f330d8ee626b"
+SRC_URI[sha256sum] = "951952e2c6bb21214e0bb54e0dffa057d30f5563300225c24c16fba846258bcc"
+
+UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
+
+# Needs brokensep as this doesn't use automake
+inherit autotools-brokensep distro_features_check
+
+# The xprop requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS = "xmlto-native libxslt-native"
+RDEPENDS_${PN} += "xprop"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.24.3.bb b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.24.3.bb
deleted file mode 100644
index c507d23..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.24.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "WebKit based web browser for GNOME"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes avahi libnotify gcr \
-	   gsettings-desktop-schemas gnome-desktop3 libxml2-native \
-	   glib-2.0 glib-2.0-native json-glib"
-
-inherit gnomebase gsettings distro_features_check upstream-version-is-even gettext
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch \
-            file://0001-bookmarks-Check-for-return-value-of-fread.patch \
-           "
-SRC_URI[archive.md5sum] = "c0221aec6a08935e6854eaa9de9451ef"
-SRC_URI[archive.sha256sum] = "fef51676310d9f37e18c9b2d778254232eb17cccd988c2d1ecf42c7b2963a154"
-
-EXTRA_OECONF += " --with-distributor-name=${DISTRO} --enable-debug=no"
-
-do_configure_prepend() {
-    sed -i -e s:help::g ${S}/Makefile.am
-}
-
-FILES_${PN} += "${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
-RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.26.6.bb b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.26.6.bb
new file mode 100644
index 0000000..e250f76
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.26.6.bb
@@ -0,0 +1,22 @@
+SUMMARY = "WebKit based web browser for GNOME"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes avahi libnotify gcr \
+	   gsettings-desktop-schemas gnome-desktop3 libxml2-native \
+	   glib-2.0 glib-2.0-native json-glib"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gsettings distro_features_check upstream-version-is-even gettext
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
+           file://0002-help-meson.build-disable-the-use-of-yelp.patch \
+           "
+SRC_URI[archive.md5sum] = "8449968366a6f9aaff3ac228ddfc7c66"
+SRC_URI[archive.sha256sum] = "01b16aa55d312ae0f17d3136f90d8c68ac748715f119412fb1917023c6f630a8"
+
+EXTRA_OEMESON += " -Ddistributor_name=${DISTRO}"
+
+FILES_${PN} += "${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
+RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch
deleted file mode 100644
index ddcd394..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From aa2176be32eed2578da82f34d31148f934c11c34 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 28 Jun 2017 17:03:45 -0700
-Subject: [PATCH] bookmarks: Check for return value of fread()
-
-Fixes below compiler error
-ignoring return value of 'fread', declared with attribute warn_unused_result
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/bookmarks/ephy-bookmark.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c
-index ff0239b..8633ce4 100644
---- a/src/bookmarks/ephy-bookmark.c
-+++ b/src/bookmarks/ephy-bookmark.c
-@@ -217,7 +217,8 @@ ephy_bookmark_init (EphyBookmark *self)
-   bytes = g_malloc (num_bytes);
- 
-   fp = fopen ("/dev/urandom", "r");
--  fread (bytes, sizeof (guint8), num_bytes, fp);
-+  if (fread (bytes, sizeof (guint8), num_bytes, fp) != num_bytes)
-+    g_warning("Unable to read data from /dev/urandom\n");
- 
-   self->id = g_malloc0 (ID_LEN + 1);
-   for (gsize i = 0; i < num_bytes; i++) {
--- 
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch
deleted file mode 100644
index 2585d7f..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0001-yelp.m4-drop-the-check-for-itstool.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 30f03a256efe375a4d5c3a24bf4168ebf380e3ab Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 30 Jul 2015 15:13:23 +0300
-Subject: [PATCH] yelp.m4: drop the check for itstool
-
-It isn't used for anything during build, so there's no need to provide
-it as a recipe.
-
-Upstream-Status: Inappropriate [tarball-specific issue]
----
- m4/yelp.m4 | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/m4/yelp.m4 b/m4/yelp.m4
-index 5db847f..1b6ede4 100644
---- a/m4/yelp.m4
-+++ b/m4/yelp.m4
-@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
- HELP_DIR="$with_help_dir"
- AC_SUBST(HELP_DIR)
- 
--AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
--AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
--if test x"$ITSTOOL" = x; then
--  AC_MSG_ERROR([itstool not found])
--fi
--
- AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
- AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
- if test x"$XMLLINT" = x; then
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch
new file mode 100644
index 0000000..249517d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/files/0002-help-meson.build-disable-the-use-of-yelp.patch
@@ -0,0 +1,34 @@
+From fc314fc3a66c92fe73e1a0cea4f49d11b29e1f45 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 31 Jan 2018 15:50:38 +0200
+Subject: [PATCH 2/2] help/meson.build: disable the use of yelp
+
+In particular this avoids calling itstool which oe-core doesn't provide.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ help/meson.build | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/help/meson.build b/help/meson.build
+index f720add..cbfeb1e 100644
+--- a/help/meson.build
++++ b/help/meson.build
+@@ -46,8 +46,8 @@ help_linguas = [
+   'sv'
+ ]
+ 
+-gnome.yelp(meson.project_name(),
+-  sources: help_files,
+-  media: help_media,
+-  languages: help_linguas,
+-)
++#gnome.yelp(meson.project_name(),
++#  sources: help_files,
++#  media: help_media,
++#  languages: help_linguas,
++#)
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
index 4450e15..a68e0f6 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
@@ -8,7 +8,7 @@
 DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt \
            ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}"
 
-inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
+inherit gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
 # depends on gtk+3, but also x11 through gtk+-x11
 REQUIRED_DISTRO_FEATURES = "x11"
 
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch
new file mode 100644
index 0000000..2a54d8e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch
@@ -0,0 +1,27 @@
+From 460befc992adb32434b0408b453be39a6866ccf8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 10 Oct 2017 14:33:18 +0300
+Subject: [PATCH] Fix --without-libtiff not having an effect.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=788770]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 315e0cc..98e780c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -676,7 +676,7 @@ if test x$gio_can_sniff = x; then
+   AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])
+ fi
+ 
+-AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != x)
++AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != xno)
+ AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
+ AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
+ AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-queryloaders-Make-output-more-reproducible.patch b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-queryloaders-Make-output-more-reproducible.patch
deleted file mode 100644
index aa21419..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-queryloaders-Make-output-more-reproducible.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 1049fbd887e52f94afeb03fc7942c01c143ebdfc Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 9 Jun 2017 12:01:25 +0300
-Subject: [PATCH] queryloaders: Make output more reproducible
-
-Reproducible builds are good: Sort the output by module name so that
-same input always leads to same output.
-
-This should also make gdk-pixbuf-print-mime-types output and
-gdk-pixbuf-thumbnailer.thumbnailer reproducible.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=783592
-
-Upstream-Status: Submitted
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- gdk-pixbuf/queryloaders.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
-index 395674a..4ac9b28 100644
---- a/gdk-pixbuf/queryloaders.c
-+++ b/gdk-pixbuf/queryloaders.c
-@@ -346,6 +346,7 @@ int main (int argc, char **argv)
- #ifdef USE_GMODULE
-                 const char *path;
-                 GDir *dir;
-+                GList *l, *modules = NULL;
- 
-                 path = g_getenv ("GDK_PIXBUF_MODULEDIR");
- #ifdef G_OS_WIN32
-@@ -365,12 +366,19 @@ int main (int argc, char **argv)
-                                 gint len = strlen (dent);
-                                 if (len > SOEXT_LEN &&
-                                     strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
-+                                        modules = g_list_prepend (modules,
-+                                                                  g_strdup (dent));
--                                        if (!query_module (contents, path, dent))
--                                                success = FALSE;
-                                 }
-                         }
-                         g_dir_close (dir);
-                 }
-+
-+                modules = g_list_sort (modules, (GCompareFunc)strcmp);
-+                for (l = modules; l != NULL; l = l->next)
-+                        if (!query_module (contents, path, l->data))
-+                                success = FALSE;
-+
-+                g_list_free_full (modules, g_free);
- #else
-                 g_string_append_printf (contents, "# dynamic loading of modules not supported\n");
- #endif
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
index 70146c6..7d0d54b 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
@@ -1,11 +1,20 @@
+From b6a7b30522455cab39a0b9ea8463313380146e70 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 1 Apr 2014 17:23:36 +0100
+Subject: [PATCH 3/4] gdk-pixbuf: add an option so that loader errors are fatal
+
 If an environment variable is specified set the return value from main() to
 non-zero if the loader had errors (missing libraries, generally).
 
 Upstream-Status: Pending
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
+---
+ gdk-pixbuf/queryloaders.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
 diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
-index a9ca015..395674a 100644
+index a81c804..350bec8 100644
 --- a/gdk-pixbuf/queryloaders.c
 +++ b/gdk-pixbuf/queryloaders.c
 @@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
@@ -47,17 +56,18 @@
  
  #ifdef G_OS_WIN32
          gchar *libdir;
-@@ -360,7 +365,8 @@ int main (int argc, char **argv)
-                                 gint len = strlen (dent);
-                                 if (len > SOEXT_LEN &&
-                                     strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
--                                        query_module (contents, path, dent);
-+                                        if (!query_module (contents, path, dent))
-+                                                success = FALSE;
-                                 }
-                         }
-                         g_dir_close (dir);
-@@ -378,7 +384,8 @@ int main (int argc, char **argv)
+@@ -370,7 +375,9 @@ int main (int argc, char **argv)
+                 }
+                 modules = g_list_sort (modules, (GCompareFunc)strcmp);
+                 for (l = modules; l != NULL; l = l->next)
+-                        query_module (contents, path, l->data);
++                        if (!query_module (contents, path, l->data))
++                                success = FALSE;
++
+                 g_list_free_full (modules, g_free);
+ #else
+                 g_string_append_printf (contents, "# dynamic loading of modules not supported\n");
+@@ -385,7 +392,8 @@ int main (int argc, char **argv)
                          infilename = g_locale_to_utf8 (infilename,
                                                         -1, NULL, NULL, NULL);
  #endif
@@ -67,7 +77,7 @@
                  }
                  g_free (cwd);
          }
-@@ -394,5 +401,8 @@ int main (int argc, char **argv)
+@@ -401,5 +409,8 @@ int main (int argc, char **argv)
          else
                  g_print ("%s\n", contents->str);
  
@@ -77,3 +87,6 @@
 +        else
 +                return 0;
  }
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
new file mode 100644
index 0000000..99c84c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
@@ -0,0 +1,102 @@
+SUMMARY = "Image loading library for GTK+"
+HOMEPAGE = "http://www.gtk.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
+
+SECTION = "libs"
+
+DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+           file://hardcoded_libtool.patch \
+           file://extending-libinstall-dependencies.patch \
+           file://run-ptest \
+           file://fatal-loader.patch \
+           file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
+           file://0001-Fix-without-libtiff-not-having-an-effect.patch \
+           "
+
+SRC_URI[md5sum] = "6e84e5485c17ce7c25df77fe76eb2d6a"
+SRC_URI[sha256sum] = "ae62ab87250413156ed72ef756347b10208c00e76b222d82d9ed361ed9dde2f3"
+
+inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
+
+LIBV = "2.10.0"
+
+GDK_PIXBUF_LOADERS ?= "png jpeg"
+
+PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_linuxstdbase = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
+
+PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
+PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
+PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
+PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
+
+PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
+
+PACKAGES =+ "${PN}-xlib"
+
+# For GIO image type sniffing
+RDEPENDS_${PN} = "shared-mime-info"
+
+FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
+ALLOW_EMPTY_${PN}-xlib = "1"
+
+FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
+
+FILES_${PN}-dev += " \
+	${bindir}/gdk-pixbuf-csource \
+	${bindir}/gdk-pixbuf-pixdata \
+        ${bindir}/gdk-pixbuf-print-mime-types \
+	${includedir}/* \
+	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
+"
+
+PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
+PACKAGES_DYNAMIC_class-native = ""
+
+python populate_packages_prepend () {
+    postinst_pixbufloader = d.getVar("postinst_pixbufloader")
+
+    loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
+
+    packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
+    d.setVar('PIXBUF_PACKAGES', packages)
+
+    # The test suite exercises all the loaders, so ensure they are all
+    # dependencies of the ptest package.
+    d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages)
+}
+
+do_install_append() {
+	# Move gdk-pixbuf-query-loaders into libdir so it is always available
+	# in multilib builds.
+	mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
+}
+
+do_install_append_class-native() {
+	find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
+
+	create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+	create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+	create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+	create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+		GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
+}
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.8.bb b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.8.bb
deleted file mode 100644
index 8c35904..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.8.bb
+++ /dev/null
@@ -1,102 +0,0 @@
-SUMMARY = "Image loading library for GTK+"
-HOMEPAGE = "http://www.gtk.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
-
-SECTION = "libs"
-
-DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-           file://hardcoded_libtool.patch \
-           file://extending-libinstall-dependencies.patch \
-           file://run-ptest \
-           file://fatal-loader.patch \
-           file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
-           file://0001-queryloaders-Make-output-more-reproducible.patch \
-           "
-
-SRC_URI[md5sum] = "e0aaa0061eb12667b32b27472230b962"
-SRC_URI[sha256sum] = "5d68e5283cdc0bf9bda99c3e6a1d52ad07a03364fa186b6c26cfc86fcd396a19"
-
-inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
-
-LIBV = "2.10.0"
-
-GDK_PIXBUF_LOADERS ?= "png jpeg"
-
-PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_linuxstdbase = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
-
-PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
-PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
-PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
-PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
-
-PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
-
-PACKAGES =+ "${PN}-xlib"
-
-# For GIO image type sniffing
-RDEPENDS_${PN} = "shared-mime-info"
-
-FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
-ALLOW_EMPTY_${PN}-xlib = "1"
-
-FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
-
-FILES_${PN}-dev += " \
-	${bindir}/gdk-pixbuf-csource \
-	${bindir}/gdk-pixbuf-pixdata \
-        ${bindir}/gdk-pixbuf-print-mime-types \
-	${includedir}/* \
-	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
-"
-
-PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
-PACKAGES_DYNAMIC_class-native = ""
-
-python populate_packages_prepend () {
-    postinst_pixbufloader = d.getVar("postinst_pixbufloader")
-
-    loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
-
-    packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
-    d.setVar('PIXBUF_PACKAGES', packages)
-
-    # The test suite exercises all the loaders, so ensure they are all
-    # dependencies of the ptest package.
-    d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages)
-}
-
-do_install_append() {
-	# Move gdk-pixbuf-query-loaders into libdir so it is always available
-	# in multilib builds.
-	mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
-}
-
-do_install_append_class-native() {
-	find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
-
-	create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
-	create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
-	create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
-	create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
-		GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
-}
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/0001-Disable-libseccomp-sycall-filtering-mechanism.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/0001-Disable-libseccomp-sycall-filtering-mechanism.patch
new file mode 100644
index 0000000..10b0743
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/0001-Disable-libseccomp-sycall-filtering-mechanism.patch
@@ -0,0 +1,38 @@
+From 9dfada06f8d2e02d7a04f793ba6e1d4a2aa5ffb7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 5 Oct 2017 14:54:17 +0300
+Subject: [PATCH] Disable libseccomp (sycall filtering mechanism)
+
+Upstream forgot to make it optional, and it is not currently used in Yocto
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 86bcf1f..8911f19 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -157,17 +157,6 @@ else
+ fi
+ 
+ SECCOMP_PKG=""
+-dnl Check for bubblewrap compatible platform
+-case $host_os in
+-  linux*)
+-    PKG_CHECK_MODULES(LIBSECCOMP, [libseccomp])
+-    SECCOMP_PKG="libseccomp"
+-    AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define to include GNU extensions])
+-    AC_DEFINE_UNQUOTED(HAVE_BWRAP, 1, [Define to 1 if Bubblewrap support is available])
+-    AC_DEFINE([ENABLE_SECCOMP], [1], [Define if using seccomp])
+-    AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix", [Path to library install prefix])
+-    ;;
+-esac
+ 
+ dnl pkg-config dependency checks
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch
new file mode 100644
index 0000000..fcc152f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch
@@ -0,0 +1,61 @@
+From 9048939b76b3bd10783adb79ed0aaf6cd13895cc Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 20:39:51 -0700
+Subject: [PATCH 1/2] gnome-desktop-thumbnail: don't convert time_t to long
+
+Explicitly use strftime+strptime rather than snprintf+atol. This fixes the
+build for X32, where long's size doesn't match that of time_t.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+
+Modify patch described above to eliminate replacement of
+
+g_snprintf (mtime_str, 21, "%" G_GINT64_FORMAT, (gint64) mtime)
+
+which is not necessary.  Retain replacement of atol().
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+ libgnome-desktop/gnome-desktop-thumbnail.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
+index e56c3d7..5d96bf3 100644
+--- a/libgnome-desktop/gnome-desktop-thumbnail.c
++++ b/libgnome-desktop/gnome-desktop-thumbnail.c
+@@ -120,6 +120,8 @@
+  * Since: 2.2
+  */
+ 
++#define _XOPEN_SOURCE
++
+ #include <config.h>
+ 
+ #include <glib.h>
+@@ -1319,6 +1326,7 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf          *pixbuf,
+ {
+   const char *thumb_uri, *thumb_mtime_str;
+   time_t thumb_mtime;
++  struct tm tmp_mtime;
+ 
+   thumb_uri = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::URI");
+   if (g_strcmp0 (uri, thumb_uri) != 0)
+@@ -1327,7 +1335,11 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf          *pixbuf,
+   thumb_mtime_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::MTime");
+   if (!thumb_mtime_str)
+     return FALSE;
+-  thumb_mtime = atol (thumb_mtime_str);
++  if (!strptime (thumb_mtime_str, "%s", &tmp_mtime))
++    return FALSE;
++  thumb_mtime = mktime (&tmp_mtime);
++  if (!thumb_mtime)
++    return FALSE;
+   if (mtime != thumb_mtime)
+     return FALSE;
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch
deleted file mode 100644
index 18a069f..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From adfa0c8f9fec1faac4bea6a94d947ea32e585923 Mon Sep 17 00:00:00 2001
-From: Christopher Larson <chris_larson@mentor.com>
-Date: Tue, 13 Dec 2016 20:39:51 -0700
-Subject: [PATCH] gnome-desktop-thumbnail: don't convert time_t to long
-
-Explicitly use strftime+strptime rather than snprintf+atol. This fixes the
-build for X32, where long's size doesn't match that of time_t.
-
-Upstream-Status: Pending
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
----
- libgnome-desktop/gnome-desktop-thumbnail.c | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
-index 3946309..b756333 100644
---- a/libgnome-desktop/gnome-desktop-thumbnail.c
-+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
-@@ -126,6 +126,8 @@
-  * Since: 2.2
-  */
- 
-+#define _XOPEN_SOURCE
-+
- #include <config.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -1483,6 +1485,7 @@ save_thumbnail (GdkPixbuf  *pixbuf,
-   char *tmp_path = NULL;
-   int tmp_fd;
-   char mtime_str[21];
-+  struct tm *tmp_mtime = NULL;
-   gboolean ret = FALSE;
-   GError *error = NULL;
-   const char *width, *height;
-@@ -1502,7 +1505,11 @@ save_thumbnail (GdkPixbuf  *pixbuf,
-     goto out;
-   close (tmp_fd);
- 
--  g_snprintf (mtime_str, 21, "%ld",  mtime);
-+  tmp_mtime = localtime (&mtime);
-+  if (!tmp_mtime)
-+    goto out;
-+  strftime (mtime_str, 21, "%s", tmp_mtime);
-+  free (tmp_mtime);
-   width = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Width");
-   height = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Height");
- 
-@@ -1695,6 +1702,7 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf          *pixbuf,
- {
-   const char *thumb_uri, *thumb_mtime_str;
-   time_t thumb_mtime;
-+  struct tm tmp_mtime;
-   
-   thumb_uri = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::URI");
-   if (!thumb_uri)
-@@ -1705,7 +1713,11 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf          *pixbuf,
-   thumb_mtime_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::MTime");
-   if (!thumb_mtime_str)
-     return FALSE;
--  thumb_mtime = atol (thumb_mtime_str);
-+  if (!strptime (thumb_mtime_str, "%s", &tmp_mtime))
-+    return FALSE;
-+  thumb_mtime = mktime (&tmp_mtime);
-+  if (!thumb_mtime)
-+    return FALSE;
-   if (mtime != thumb_mtime)
-     return FALSE;
-   
--- 
-2.8.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.24.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.24.2.bb
deleted file mode 100644
index 5c1c213..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.24.2.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "gnome-desktop"
-
-inherit gnome pkgconfig upstream-version-is-even gobject-introspection
-SRC_URI[archive.md5sum] = "af7c6a243df7a335a010bdc05b34ca93"
-SRC_URI[archive.sha256sum] = "8fa1de66a6a75963bffc79b01a60434c71237d44c51beca09c0f714a032d785e"
-
-SRC_URI += "file://gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch \
-            file://0001-configure.ac-Remove-gnome-common-macro-calls.patch \
-"
-
-DEPENDS += "intltool-native gsettings-desktop-schemas gconf virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes udev"
-
-inherit distro_features_check gtk-doc
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-desktop-docs"
-
-PACKAGES =+ "libgnome-desktop3"
-FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
-
-RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.26.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.26.2.bb
new file mode 100644
index 0000000..879dc9a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.26.2.bb
@@ -0,0 +1,29 @@
+SUMMARY = "GNOME library for reading .desktop files"
+SECTION = "x11/gnome"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+BPN = "gnome-desktop"
+
+inherit gnome pkgconfig upstream-version-is-even gobject-introspection
+SRC_URI[archive.md5sum] = "6cee2ecd677d87eaa0eb5ebfa7b45fb3"
+SRC_URI[archive.sha256sum] = "f7561a7a313fc474b2c390cd9696df1f5c1e1556080e43f4afe042b1060e5f2a"
+
+SRC_URI += " \
+           file://gnome-desktop-thumbnail-don-t-assume-time_t-is-long.patch \
+           file://0001-configure.ac-Remove-gnome-common-macro-calls.patch \
+           file://0001-Disable-libseccomp-sycall-filtering-mechanism.patch \
+           "
+
+DEPENDS += "intltool-native gsettings-desktop-schemas gconf virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes udev"
+
+inherit distro_features_check gtk-doc
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-desktop-docs"
+
+PACKAGES =+ "libgnome-desktop3"
+FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
+
+RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
index e7ac97b..96ec96b 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch
@@ -1,29 +1,27 @@
-From d2b9ad8a80bf9320fe35c9aee8f52e55ebd40e06 Mon Sep 17 00:00:00 2001
+From 88ed996cc9e2b296cacfdbeece4be28a90bab511 Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Tue, 30 May 2017 14:55:49 +0300
-Subject: [PATCH] Don't use AC_CANONICAL_HOST
+Subject: [PATCH 1/2] Don't use AC_CANONICAL_HOST
 
 This won't work when building allarch (and is only used to find out if
 target is windows).
 
 Upstream-Status: Inappropriate [embedded specific]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
 ---
  configure.ac | 1 -
  1 file changed, 1 deletion(-)
 
-diff --git a/configure.ac b/configure.ac
-index d855b7a..6908f59 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: adwaita-icon-theme-3.26.1/configure.ac
+===================================================================
+--- adwaita-icon-theme-3.26.1.orig/configure.ac
++++ adwaita-icon-theme-3.26.1/configure.ac
 @@ -3,7 +3,6 @@ AC_PREREQ(2.53)
  
- AC_INIT([adwaita-icon-theme], [3.24.0],
+ AC_INIT([adwaita-icon-theme], [3.26.1],
          [http://bugzilla.gnome.org/enter_bug.cgi?product=adwaita-icon-theme])
 -AC_CANONICAL_HOST
  AC_CONFIG_MACRO_DIR([m4])
  AC_CONFIG_SRCDIR([index.theme.in])
  
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.24.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.24.0.bb
deleted file mode 100644
index d340536..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.24.0.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "GTK+ icon theme"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome"
-
-LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
-
-inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
-
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-           file://0001-Don-t-use-AC_CANONICAL_HOST.patch \
-           file://0001-Run-installation-commands-as-shell-jobs.patch \
-           "
-
-SRC_URI[md5sum] = "3ccac0d600ffc936d2adfb80e9245bc5"
-SRC_URI[sha256sum] = "ccf79ff3bd340254737ce4d28b87f0ccee4b3358cd3cd5cd11dc7b42f41b272a"
-
-do_install_append() {
-	# Build uses gtk-encode-symbolic-svg to create png versions:
-        # no need to store the svgs anymore.
-	rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
-	      ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
-}
-
-PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}"
-
-RREPLACES_${PN} = "gnome-icon-theme"
-RCONFLICTS_${PN} = "gnome-icon-theme"
-RPROVIDES_${PN} = "gnome-icon-theme"
-
-FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
-FILES_${PN}-symbolic-hires = "${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
-                              ${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
-                              ${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
-                              ${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
-FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
-                        ${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png"
-FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/ \
-                     ${prefix}/share/icons/Adwaita/512x512/"
-FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
-               ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.26.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.26.1.bb
new file mode 100644
index 0000000..6437d5e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.26.1.bb
@@ -0,0 +1,44 @@
+SUMMARY = "GTK+ icon theme"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome"
+
+LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
+
+inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
+
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+           file://0001-Don-t-use-AC_CANONICAL_HOST.patch \
+           file://0001-Run-installation-commands-as-shell-jobs.patch \
+           "
+
+SRC_URI[md5sum] = "3ef87e789711e5130792d4b5366c005d"
+SRC_URI[sha256sum] = "28ba7392c7761996efd780779167ea6c940eedfb1bf37cfe9bccb7021f54d79d"
+
+do_install_append() {
+	# Build uses gtk-encode-symbolic-svg to create png versions:
+        # no need to store the svgs anymore.
+	rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
+	      ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
+}
+
+PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}"
+
+RREPLACES_${PN} = "gnome-icon-theme"
+RCONFLICTS_${PN} = "gnome-icon-theme"
+RPROVIDES_${PN} = "gnome-icon-theme"
+
+FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
+FILES_${PN}-symbolic-hires = "${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
+                              ${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
+                              ${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
+                              ${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
+FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
+                        ${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png"
+FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/ \
+                     ${prefix}/share/icons/Adwaita/512x512/"
+FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
+               ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf/create_config_directory.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
new file mode 100644
index 0000000..cd72e73
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+In some circumstances, gconf isn't able to save configurations
+because ~/.config folder aka root_dir doesn't exist.
+This issue was not seen before because ~/.config directory is shared
+between several packages and one of those packages usually creates it
+by the time gconf wants to use it.
+
+This patch makes sure that gconf creates the .config directory if it
+doesn't exist, along with the gconf directory inside it.
+
+Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
+Signed-off-by: Alejandro Hernandez <alejandr@xilinx.com>
+
+
+Index: GConf-3.2.6/backends/markup-backend.c
+===================================================================
+--- GConf-3.2.6.orig/backends/markup-backend.c
++++ GConf-3.2.6/backends/markup-backend.c
+@@ -276,7 +276,7 @@ resolve_address (const char *address,
+       /* dir_mode without search bits */
+       file_mode = dir_mode & (~0111);
+     }
+-  else if (g_mkdir (root_dir, dir_mode) < 0)
++  else if (g_mkdir_with_parents (root_dir, dir_mode) < 0)
+     {
+       /* Error out even on EEXIST - shouldn't happen anyway */
+       gconf_set_error (err, GCONF_ERROR_FAILED,
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
index 92fd12c..120ae3e 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
@@ -11,6 +11,7 @@
 SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.xz;name=archive \
            file://remove_plus_from_invalid_characters_list.patch \
            file://unable-connect-dbus.patch \
+           file://create_config_directory.patch \
 "
 
 SRC_URI[archive.md5sum] = "2b16996d0e4b112856ee5c59130e822c"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
new file mode 100644
index 0000000..4ec527d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
@@ -0,0 +1,73 @@
+From e48f1e18f5ea41656f0ba10fe61d69d2604b0064 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 3 Jan 2018 17:02:01 +0200
+Subject: [PATCH] giscanner: add a --lib-dirs-envvar option
+
+By default LD_LIBRARY_PATH is set to the list of target library paths;
+this breaks down in cross-compilation environment, as we need to run a
+native emulation wrapper rather than the target binary itself. This patch
+allows exporting those paths to a different environment variable
+which can be picked up and used by the wrapper.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ giscanner/ccompiler.py   | 4 ++--
+ giscanner/dumper.py      | 3 ++-
+ giscanner/scannermain.py | 3 +++
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
+index 29de0ee..928eae8 100644
+--- a/giscanner/ccompiler.py
++++ b/giscanner/ccompiler.py
+@@ -109,7 +109,7 @@ class CCompiler(object):
+ 
+             self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
+ 
+-    def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
++    def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar):
+         # An "internal" link is where the library to be introspected
+         # is being built in the current directory.
+ 
+@@ -119,7 +119,7 @@ class CCompiler(object):
+         if self.check_is_msvc():
+             runtime_path_envvar = ['LIB', 'PATH']
+         else:
+-            runtime_path_envvar = ['LD_LIBRARY_PATH']
++            runtime_path_envvar = ['LD_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar]
+             # Search the current directory first
+             # (This flag is not supported nor needed for Visual C++)
+             args.append('-L.')
+diff --git a/giscanner/dumper.py b/giscanner/dumper.py
+index 7f77bd2..db96df6 100644
+--- a/giscanner/dumper.py
++++ b/giscanner/dumper.py
+@@ -259,7 +259,8 @@ class DumpCompiler(object):
+                                                    libtool,
+                                                    self._options.libraries,
+                                                    self._options.extra_libraries,
+-                                                   self._options.library_paths)
++                                                   self._options.library_paths,
++                                                   self._options.lib_dirs_envvar)
+             args.extend(pkg_config_libs)
+ 
+         else:
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 38a45c1..b603850 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -130,6 +130,9 @@ def _get_option_parser():
+     parser.add_option("", "--use-ldd-wrapper",
+                       action="store", dest="ldd_wrapper", default=None,
+                       help="wrapper to use instead of ldd (useful when cross-compiling)")
++    parser.add_option("", "--lib-dirs-envvar",
++                      action="store", dest="lib_dirs_envvar", default=None,
++                      help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH")
+     parser.add_option("", "--program-arg",
+                       action="append", dest="program_args", default=[],
+                       help="extra arguments to program")
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
index 48a0c85..c682b42 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
@@ -32,10 +32,10 @@
  tests/Makefile.am |  5 ++++-
  4 files changed, 87 insertions(+), 1 deletion(-)
 
-diff --git a/Makefile.am b/Makefile.am
-index b080a89..ce8d29b 100644
---- a/Makefile.am
-+++ b/Makefile.am
+Index: gobject-introspection-1.52.1/Makefile.am
+===================================================================
+--- gobject-introspection-1.52.1.orig/Makefile.am
++++ gobject-introspection-1.52.1/Makefile.am
 @@ -21,7 +21,9 @@ include Makefile-cmph.am
  include Makefile-girepository.am
  include Makefile-giscanner.am
@@ -46,10 +46,10 @@
  include Makefile-tools.am
  include Makefile-msvcproj.am
  
-diff --git a/common.mk b/common.mk
-index e26c637..9f3a65f 100644
---- a/common.mk
-+++ b/common.mk
+Index: gobject-introspection-1.52.1/common.mk
+===================================================================
+--- gobject-introspection-1.52.1.orig/common.mk
++++ gobject-introspection-1.52.1/common.mk
 @@ -6,6 +6,15 @@
  # module itself.
  #
@@ -130,13 +130,13 @@
  
  INTROSPECTION_DOCTOOL_ARGS = \
      --add-include-path=$(srcdir) \
-diff --git a/configure.ac b/configure.ac
-index 6c91fa5..21340a5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -360,6 +360,48 @@ fi
- 
- AC_SUBST(EXTRA_LINK_FLAGS)
+Index: gobject-introspection-1.52.1/configure.ac
+===================================================================
+--- gobject-introspection-1.52.1.orig/configure.ac
++++ gobject-introspection-1.52.1/configure.ac
+@@ -366,6 +366,48 @@ dnl
+ AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x])
+ AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x])
  
 +AC_ARG_ENABLE([host-gi],
 +[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])],
@@ -183,10 +183,10 @@
  AC_CONFIG_FILES([
  Makefile
  tests/Makefile
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index bdd0fa7..75dd3c9 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
+Index: gobject-introspection-1.52.1/tests/Makefile.am
+===================================================================
+--- gobject-introspection-1.52.1.orig/tests/Makefile.am
++++ gobject-introspection-1.52.1/tests/Makefile.am
 @@ -1,6 +1,9 @@
  include $(top_srcdir)/common.mk
  
@@ -198,6 +198,3 @@
  
  EXTRA_DIST=
  BUILT_SOURCES=
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
deleted file mode 100644
index 3fe71a3..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
+++ /dev/null
@@ -1,188 +0,0 @@
-SUMMARY = "Middleware layer between GObject-using C libraries and language bindings"
-HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "libs"
-LICENSE = "LGPLv2+ & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
-                    file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
-                    file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
-                    file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/1.52/${BPN}-${PV}.tar.xz \
-           file://0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch \
-           file://0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch \
-           file://0003-giscanner-add-use-binary-wrapper-option.patch \
-           file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
-           file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
-           "
-SRC_URI[md5sum] = "34157073991f9eeb0ed953351b65eb61"
-SRC_URI[sha256sum] = "2ed0c38d52fe1aa6fc4def0c868fe481cb87b532fc694756b26d6cfab29faff4"
-
-inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even
-BBCLASSEXTEND = "native"
-
-# needed for writing out the qemu wrapper script
-export STAGING_DIR_HOST
-export B
-
-DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native"
-
-# target build needs qemu to run temporary introspection binaries created
-# on the fly by g-ir-scanner and a native version of itself to run
-# native versions of its own tools during build.
-# Also prelink-rtld is used to find out library dependencies of introspection binaries
-# (standard ldd doesn't work when cross-compiling).
-DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
-
-SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}"
-
-do_configure_prepend_class-native() {
-        # Tweak the native python scripts so that they don't refer to the
-        # full path of native python binary (the solution is taken from glib-2.0 recipe)
-        # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
-        sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
-}
-
-do_configure_prepend_class-target() {
-        # Write out a qemu wrapper that will be given to gi-scanner so that it
-        # can run target helper binaries through that.
-        qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
-        cat > ${B}/g-ir-scanner-qemuwrapper << EOF
-#!/bin/sh
-# Use a modules directory which doesn't exist so we don't load random things
-# which may then get deleted (or their dependencies) and potentially segfault
-export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
-
-$qemu_binary "\$@"
-if [ \$? -ne 0 ]; then
-    echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
-    echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
-    exit 1
-fi
-EOF
-        chmod +x ${B}/g-ir-scanner-qemuwrapper
-
-        # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files
-        # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use
-        # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory 
-        # from the target sysroot.
-        cat > ${B}/g-ir-scanner-wrapper << EOF
-#!/bin/sh
-# This prevents g-ir-scanner from writing cache data to $HOME
-export GI_SCANNER_DISABLE_CACHE=1
-
-g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
-EOF
-        chmod +x ${B}/g-ir-scanner-wrapper
-
-        # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
-        # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
-        cat > ${B}/g-ir-compiler-wrapper << EOF
-#!/bin/sh
-${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
-EOF
-        chmod +x ${B}/g-ir-compiler-wrapper
-
-        # Write out a wrapper to use instead of ldd, which does not work when a binary is built
-        # for a different architecture
-        cat > ${B}/g-ir-scanner-lddwrapper << EOF
-#!/bin/sh
-prelink-rtld --root=$STAGING_DIR_HOST "\$@"
-EOF
-        chmod +x ${B}/g-ir-scanner-lddwrapper
-
-        # Also tweak the target python scripts so that they don't refer to the
-        # native version of python binary (the solution is taken from glib-2.0 recipe)
-        sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
-}
-
-# Configure target build to use native tools of itself and to use a qemu wrapper
-# and optionally to generate introspection data
-EXTRA_OECONF_class-target += "--enable-host-gi \
-                              --disable-static \
-                              --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
-                              --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
-                              ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
-                             "
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python3-mako,"
-
-do_compile_prepend() {
-        # This prevents g-ir-scanner from writing cache data to $HOME
-        export GI_SCANNER_DISABLE_CACHE=1
-
-        # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
-        export GIR_EXTRA_LIBS_PATH=$B/.libs
-}
-
-# Our wrappers need to be available system-wide, because they will be used 
-# to build introspection files for all other gobject-based packages
-do_install_append_class-target() {
-        install -d ${D}${bindir}/
-        install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
-        install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
-        install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
-        install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
-}
-
-# .typelib files are needed at runtime and so they go to the main package
-FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
-
-# .gir files go to dev package, as they're needed for developing (but not for running)
-# things that depends on introspection.
-FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
-
-# These are used by gobject-based packages
-# to generate transient introspection binaries
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
-               ${datadir}/gobject-introspection-1.0/Makefile.introspection"
-
-# These are used by dependent packages (e.g. pygobject) to build their
-# testsuites.
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
-                   ${datadir}/gobject-introspection-1.0/tests/*.h"
-
-FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
-FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
-
-# we need target versions of introspection tools in sysroot so that they can be run via qemu
-# when building introspection files in other packages
-SYSROOT_DIRS_append_class-target = " ${bindir}"
-
-SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
-gi_binaries_sysroot_preprocess() {
-        # Tweak the binary names in the introspection pkgconfig file, so that it
-        # picks up our wrappers which do the cross-compile and qemu magic.
-        sed -i \
-           -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
-           -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
-           ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
-}
-
-# Need to ensure ld.so.conf exists so prelink-native works
-# both before we build and if we install from sstate
-do_configure[prefuncs] += "gobject_introspection_preconfigure"
-python gobject_introspection_preconfigure () {
-    oe.utils.write_ld_so_conf(d)
-}
-
-SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess"
-gi_ldsoconf_sysroot_preprocess () {
-	mkdir -p ${SYSROOT_DESTDIR}${bindir}
-	dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN}
-	echo "#!/bin/sh" > $dest
-	echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest
-	echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
-	echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
-	chmod 755 $dest
-}
-
-# Remove wrapper files from the package, only used for cross-compiling
-PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess"
-gi_package_preprocess() {
-	rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper
-	rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper
-	rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper
-	rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb
new file mode 100644
index 0000000..85c8001
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb
@@ -0,0 +1,190 @@
+SUMMARY = "Middleware layer between GObject-using C libraries and language bindings"
+HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "libs"
+LICENSE = "LGPLv2+ & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
+                    file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
+                    file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
+                    file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/1.54/${BPN}-${PV}.tar.xz \
+           file://0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch \
+           file://0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch \
+           file://0003-giscanner-add-use-binary-wrapper-option.patch \
+           file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
+           file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
+           file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \
+           "
+SRC_URI[md5sum] = "126c29e4d54adbed2ed4e2b04483de41"
+SRC_URI[sha256sum] = "b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e"
+
+inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even
+BBCLASSEXTEND = "native"
+
+# needed for writing out the qemu wrapper script
+export STAGING_DIR_HOST
+export B
+
+DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native"
+
+# target build needs qemu to run temporary introspection binaries created
+# on the fly by g-ir-scanner and a native version of itself to run
+# native versions of its own tools during build.
+# Also prelink-rtld is used to find out library dependencies of introspection binaries
+# (standard ldd doesn't work when cross-compiling).
+DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
+
+SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}"
+
+do_configure_prepend_class-native() {
+        # Tweak the native python scripts so that they don't refer to the
+        # full path of native python binary (the solution is taken from glib-2.0 recipe)
+        # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
+        sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+do_configure_prepend_class-target() {
+        # Write out a qemu wrapper that will be given to gi-scanner so that it
+        # can run target helper binaries through that.
+        qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+        cat > ${B}/g-ir-scanner-qemuwrapper << EOF
+#!/bin/sh
+# Use a modules directory which doesn't exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+
+$qemu_binary "\$@"
+if [ \$? -ne 0 ]; then
+    echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
+    echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
+    exit 1
+fi
+EOF
+        chmod +x ${B}/g-ir-scanner-qemuwrapper
+
+        # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files
+        # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use
+        # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory 
+        # from the target sysroot.
+        cat > ${B}/g-ir-scanner-wrapper << EOF
+#!/bin/sh
+# This prevents g-ir-scanner from writing cache data to $HOME
+export GI_SCANNER_DISABLE_CACHE=1
+
+g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
+EOF
+        chmod +x ${B}/g-ir-scanner-wrapper
+
+        # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
+        # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
+        cat > ${B}/g-ir-compiler-wrapper << EOF
+#!/bin/sh
+${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
+EOF
+        chmod +x ${B}/g-ir-compiler-wrapper
+
+        # Write out a wrapper to use instead of ldd, which does not work when a binary is built
+        # for a different architecture
+        cat > ${B}/g-ir-scanner-lddwrapper << EOF
+#!/bin/sh
+prelink-rtld --root=$STAGING_DIR_HOST "\$@"
+EOF
+        chmod +x ${B}/g-ir-scanner-lddwrapper
+
+        # Also tweak the target python scripts so that they don't refer to the
+        # native version of python binary (the solution is taken from glib-2.0 recipe)
+        sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+# Configure target build to use native tools of itself and to use a qemu wrapper
+# and optionally to generate introspection data
+EXTRA_OECONF_class-target += "--enable-host-gi \
+                              --disable-static \
+                              --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
+                              --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
+                              ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
+                             "
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python3-mako,"
+
+do_compile_prepend() {
+        # This prevents g-ir-scanner from writing cache data to $HOME
+        export GI_SCANNER_DISABLE_CACHE=1
+
+        # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
+        export GIR_EXTRA_LIBS_PATH=$B/.libs
+}
+
+# Our wrappers need to be available system-wide, because they will be used 
+# to build introspection files for all other gobject-based packages
+do_install_append_class-target() {
+        install -d ${D}${bindir}/
+        install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
+        install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
+        install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
+        install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
+}
+
+# .typelib files are needed at runtime and so they go to the main package
+FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
+
+# .gir files go to dev package, as they're needed for developing (but not for running)
+# things that depends on introspection.
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc"
+
+# These are used by gobject-based packages
+# to generate transient introspection binaries
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
+               ${datadir}/gobject-introspection-1.0/Makefile.introspection"
+
+# These are used by dependent packages (e.g. pygobject) to build their
+# testsuites.
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
+                   ${datadir}/gobject-introspection-1.0/tests/*.h"
+
+FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
+FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
+
+# we need target versions of introspection tools in sysroot so that they can be run via qemu
+# when building introspection files in other packages
+SYSROOT_DIRS_append_class-target = " ${bindir}"
+
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
+gi_binaries_sysroot_preprocess() {
+        # Tweak the binary names in the introspection pkgconfig file, so that it
+        # picks up our wrappers which do the cross-compile and qemu magic.
+        sed -i \
+           -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
+           -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
+           ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
+}
+
+# Need to ensure ld.so.conf exists so prelink-native works
+# both before we build and if we install from sstate
+do_configure[prefuncs] += "gobject_introspection_preconfigure"
+python gobject_introspection_preconfigure () {
+    oe.utils.write_ld_so_conf(d)
+}
+
+SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess"
+gi_ldsoconf_sysroot_preprocess () {
+	mkdir -p ${SYSROOT_DESTDIR}${bindir}
+	dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN}
+	echo "#!/bin/sh" > $dest
+	echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest
+	echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
+	echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest
+	chmod 755 $dest
+}
+
+# Remove wrapper files from the package, only used for cross-compiling
+PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess"
+gi_package_preprocess() {
+	rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper
+	rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper
+	rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper
+	rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.22.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.22.0.bb
deleted file mode 100644
index d84a4f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.22.0.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-SUMMARY = "GNOME desktop-wide GSettings schemas"
-HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "glib-2.0 intltool-native"
-
-inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even
-
-SRC_URI[archive.md5sum] = "5b9056ab6eff42a0117f2912edff5f20"
-SRC_URI[archive.sha256sum] = "0f06c7ba34c3a99e4d58b10889496133c9aaad6698ea2d8405d481c7f1a7eae1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.24.1.bb
new file mode 100644
index 0000000..b61fd24
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.24.1.bb
@@ -0,0 +1,13 @@
+SUMMARY = "GNOME desktop-wide GSettings schemas"
+HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "glib-2.0 intltool-native"
+
+inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even
+
+SRC_URI[archive.md5sum] = "796b6ac1eff450261edd521b72e7fe6d"
+SRC_URI[archive.sha256sum] = "76a3fa309f9de6074d66848987214f0b128124ba7184c958c15ac78a8ac7eea7"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
index 1ae728e..9eb7f6b 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
@@ -3,19 +3,20 @@
 Updated to apply to gtk+-2.24.15
 
 Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
---- gtk+-2.24.15/configure.ac	2013-01-12 20:52:54.000000000 +0200
-+++ gtk+-2.24.15/configure.ac	2013-02-12 21:33:30.689925967 +0200
-@@ -415,7 +415,7 @@
+Index: gtk+-2.24.31/configure.ac
+===================================================================
+--- gtk+-2.24.31.orig/configure.ac
++++ gtk+-2.24.31/configure.ac
+@@ -415,7 +415,7 @@ AC_MSG_CHECKING([Whether to write depend
  case $enable_explicit_deps in
    auto)
      export SED
 -    deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
 +    deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
      if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
-       enable_explicit_deps=yes
+       enable_explicit_deps=yes  
      else
-@@ -774,7 +774,7 @@
+@@ -772,7 +772,7 @@ else
      dnl Now we check to see if our libtool supports shared lib deps
      dnl (in a rather ugly way even)
      if $dynworks; then
@@ -24,7 +25,7 @@
          module_deplibs_check=`$module_libtool_config | \
              grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
              sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1574,7 +1574,7 @@
+@@ -1579,7 +1579,7 @@ fi
  # We are using gmodule-no-export now, but I'm leaving the stripping
  # code in place for now, since pango and atk still require gmodule.
  export SED
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
index 0a357db..420ead2 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -35,7 +35,6 @@
                  --enable-modules \
                  --disable-cups \
                  --disable-colord \
-                 WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
                  ${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \
                  "
 
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
index ab7b659..cc7edf7 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
@@ -1,4 +1,4 @@
-From 2d2361f24be1e51201063dbbda570debe8702b6f Mon Sep 17 00:00:00 2001
+From 23a563155406980dfc8cf6f7c2da6cce0ac310f0 Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Fri, 16 Oct 2015 16:35:16 +0300
 Subject: [PATCH 2/4] Do not try to initialize GL without libGL
@@ -15,29 +15,29 @@
 
 Upstream-Status: Denied
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
 ---
- configure.ac            | 7 +++++++
+ configure.ac            | 6 ++++++
  gdk/x11/gdkvisual-x11.c | 5 +++++
- 2 files changed, 12 insertions(+)
+ 2 files changed, 11 insertions(+)
 
 diff --git a/configure.ac b/configure.ac
-index f43ac09..965eec9 100644
+index 757fd7c..0a48875 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -346,6 +346,13 @@ AC_ARG_ENABLE(mir-backend,
-                               [enable the Mir gdk backend])],
- 			      [backend_set=yes])
- 
+@@ -351,6 +351,12 @@ AC_ARG_ENABLE(cloudproviders,
+               [AS_HELP_STRING([--enable-cloudproviders],
+                               [enable libcloudproviders integration])],
+                               [cloudproviders_set=yes])
 +AC_ARG_ENABLE(glx,
 +              [AS_HELP_STRING([--enable-glx],
 +                              [When enabled Gdk will try to initialize GLX])])
 +AS_IF([test "x$enable_glx" != "xno"], [
 +  AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime])
 +])
-+
+ 
  if test -z "$backend_set"; then
    if test "$platform_win32" = yes; then
-     enable_win32_backend=yes
 diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
 index 81479d8..3c8c5c0 100644
 --- a/gdk/x11/gdkvisual-x11.c
@@ -56,5 +56,5 @@
  
  gint
 -- 
-2.12.0
+2.14.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
index 9cdee0e..d2f12dc 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
@@ -1,4 +1,4 @@
-From a2e6b7cbbd6d741fed38d91b3742aa4a08395aba Mon Sep 17 00:00:00 2001
+From de36df70d87ba3453ed4f2b92e990021c67238f5 Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Tue, 21 Jun 2016 15:11:39 +0300
 Subject: [PATCH 3/4] Add --disable-opengl configure option
@@ -19,41 +19,40 @@
 
 Upstream-Status: Inappropriate [Evil eye expected from upstream]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
 ---
- configure.ac                      | 13 +++++++--
- demos/gtk-demo/glarea.c           | 14 +++++++++
- docs/tools/Makefile.am            |  9 ++++--
- docs/tools/widgets.c              |  4 ++-
- gdk/gdkdisplay.c                  |  4 ++-
- gdk/gdkgl.c                       | 10 +++++++
- gdk/gdkglcontext.c                |  6 ++++
- gdk/gdkwindow.c                   | 13 +++++++++
- gdk/x11/Makefile.am               | 30 +++++++++++++++++---
- gdk/x11/gdkdisplay-x11.c          |  6 +++-
- gdk/x11/gdkscreen-x11.c           |  5 ++++
- gdk/x11/gdkwindow-x11.c           |  4 +++
- gdk/x11/gdkx-autocleanups.h       |  2 ++
- gdk/x11/gdkx-with-gl-context.h    | 59 ++++++++++++++++++++++++++++++++++++++
- gdk/x11/gdkx-without-gl-context.h | 58 +++++++++++++++++++++++++++++++++++++
- gdk/x11/gdkx.h                    | 60 ---------------------------------------
- gtk/Makefile.am                   |  3 +-
- gtk/gtkglarea.c                   | 20 ++++++++++++-
- gtk/inspector/general.c           |  6 ++++
- tests/Makefile.am                 | 10 +++++--
- testsuite/gtk/objects-finalize.c  |  2 ++
- 21 files changed, 261 insertions(+), 77 deletions(-)
- create mode 100644 gdk/x11/gdkx-with-gl-context.h
+ configure.ac                               | 13 +++++--
+ demos/gtk-demo/glarea.c                    | 14 ++++++++
+ docs/tools/Makefile.am                     |  9 +++--
+ docs/tools/widgets.c                       |  4 ++-
+ gdk/gdkdisplay.c                           |  4 ++-
+ gdk/gdkgl.c                                | 10 ++++++
+ gdk/gdkglcontext.c                         |  6 ++++
+ gdk/gdkwindow.c                            | 13 +++++++
+ gdk/x11/Makefile.am                        | 30 +++++++++++++---
+ gdk/x11/gdkdisplay-x11.c                   |  6 +++-
+ gdk/x11/gdkscreen-x11.c                    |  5 +++
+ gdk/x11/gdkwindow-x11.c                    |  4 +++
+ gdk/x11/gdkx-autocleanups.h                |  2 ++
+ gdk/x11/{gdkx.h => gdkx-with-gl-context.h} |  1 -
+ gdk/x11/gdkx-without-gl-context.h          | 58 ++++++++++++++++++++++++++++++
+ gtk/Makefile.am                            |  3 +-
+ gtk/gtkglarea.c                            | 20 ++++++++++-
+ gtk/inspector/general.c                    |  6 ++++
+ tests/Makefile.am                          | 10 ++++--
+ testsuite/gtk/objects-finalize.c           |  2 ++
+ 20 files changed, 202 insertions(+), 18 deletions(-)
+ rename gdk/x11/{gdkx.h => gdkx-with-gl-context.h} (98%)
  create mode 100644 gdk/x11/gdkx-without-gl-context.h
- delete mode 100644 gdk/x11/gdkx.h
 
 diff --git a/configure.ac b/configure.ac
-index 965eec9..00bf544 100644
+index 0a48875..6f0a3a6 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -346,6 +346,15 @@ AC_ARG_ENABLE(mir-backend,
-                               [enable the Mir gdk backend])],
- 			      [backend_set=yes])
- 
+@@ -351,6 +351,15 @@ AC_ARG_ENABLE(cloudproviders,
+               [AS_HELP_STRING([--enable-cloudproviders],
+                               [enable libcloudproviders integration])],
+                               [cloudproviders_set=yes])
 +AC_ARG_ENABLE(opengl,
 +              [AS_HELP_STRING([--enable-opengl],
 +                              [When enabled, Gtk+ will use libepoxy and exposes GtkGLArea widget ])])
@@ -66,16 +65,16 @@
  AC_ARG_ENABLE(glx,
                [AS_HELP_STRING([--enable-glx],
                                [When enabled Gdk will try to initialize GLX])])
-@@ -1352,7 +1361,7 @@ CFLAGS="$saved_cflags"
+@@ -1372,7 +1381,7 @@ CFLAGS="$saved_cflags"
  LDFLAGS="$saved_ldflags"
  
  GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
--GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
-+GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends $EPOXY_PACKAGES"
+-GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES"
++GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends $EPOXY_PACKAGES $CLOUDPROVIDER_PACKAGES"
  
  PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
  GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
-@@ -1386,7 +1395,7 @@ fi
+@@ -1406,7 +1415,7 @@ fi
  PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
  
  GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
@@ -210,10 +209,10 @@
  
    return info;
 diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
-index 6b012ca..311c7f7 100644
+index 40225e9..c55e1de 100644
 --- a/gdk/gdkdisplay.c
 +++ b/gdk/gdkdisplay.c
-@@ -2409,7 +2409,9 @@ gboolean
+@@ -2406,7 +2406,9 @@ gboolean
  gdk_display_make_gl_context_current (GdkDisplay   *display,
                                       GdkGLContext *context)
  {
@@ -347,7 +346,7 @@
  
  /**
 diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
-index 689d666..fb84256 100644
+index c0e0a7d..437ab03 100644
 --- a/gdk/gdkwindow.c
 +++ b/gdk/gdkwindow.c
 @@ -45,7 +45,9 @@
@@ -360,7 +359,7 @@
  
  /* for the use of round() */
  #include "fallback-c89.c"
-@@ -2819,6 +2821,13 @@ gdk_window_get_paint_gl_context (GdkWindow  *window,
+@@ -2822,6 +2824,13 @@ gdk_window_get_paint_gl_context (GdkWindow  *window,
  {
    GError *internal_error = NULL;
  
@@ -374,7 +373,7 @@
    if (_gdk_gl_flags & GDK_GL_DISABLE)
      {
        g_set_error_literal (error, GDK_GL_ERROR,
-@@ -2954,6 +2963,7 @@ gdk_window_begin_paint_internal (GdkWindow            *window,
+@@ -2957,6 +2966,7 @@ gdk_window_begin_paint_internal (GdkWindow            *window,
          }
        else
          {
@@ -382,7 +381,7 @@
  	  gdk_gl_context_make_current (context);
            /* With gl we always need a surface to combine the gl
               drawing with the native drawing. */
-@@ -2968,6 +2978,7 @@ gdk_window_begin_paint_internal (GdkWindow            *window,
+@@ -2971,6 +2981,7 @@ gdk_window_begin_paint_internal (GdkWindow            *window,
            glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
  
            glViewport (0, 0, ww, wh);
@@ -390,7 +389,7 @@
          }
      }
  
-@@ -3031,6 +3042,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
+@@ -3034,6 +3045,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
  
            gdk_gl_context_make_current (window->gl_paint_context);
  
@@ -398,7 +397,7 @@
            if (!cairo_region_is_empty (opaque_region))
              gdk_gl_texture_from_surface (window->current_paint.surface,
                                           opaque_region);
-@@ -3041,6 +3053,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
+@@ -3044,6 +3056,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
                                             window->current_paint.need_blend_region);
                glDisable(GL_BLEND);
              }
@@ -479,7 +478,7 @@
 +
  -include $(top_srcdir)/git.mk
 diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
-index ad65e29..91345ee 100644
+index e9a263f..2829a31 100644
 --- a/gdk/x11/gdkdisplay-x11.c
 +++ b/gdk/x11/gdkdisplay-x11.c
 @@ -37,7 +37,9 @@
@@ -492,7 +491,7 @@
  #include "gdk-private.h"
  
  #include <glib.h>
-@@ -2994,7 +2996,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
+@@ -3169,7 +3171,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
    display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
    display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
  
@@ -554,71 +553,21 @@
  G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref)
  G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref)
  G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref)
-diff --git a/gdk/x11/gdkx-with-gl-context.h b/gdk/x11/gdkx-with-gl-context.h
-new file mode 100644
-index 0000000..ae05fa6
---- /dev/null
+diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx-with-gl-context.h
+similarity index 98%
+rename from gdk/x11/gdkx.h
+rename to gdk/x11/gdkx-with-gl-context.h
+index 1f64bcc..ae05fa6 100644
+--- a/gdk/x11/gdkx.h
 +++ b/gdk/x11/gdkx-with-gl-context.h
-@@ -0,0 +1,59 @@
-+/* GDK - The GIMP Drawing Kit
-+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library 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
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+/*
-+ * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
-+ * file for a list of people on the GTK+ Team.  See the ChangeLog
-+ * files for a list of changes.  These files are distributed with
-+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
-+ */
-+
-+#ifndef __GDK_X_H__
-+#define __GDK_X_H__
-+
-+#include <gdk/gdk.h>
-+
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+
-+#define __GDKX_H_INSIDE__
-+
-+#include <gdk/x11/gdkx11applaunchcontext.h>
-+#include <gdk/x11/gdkx11cursor.h>
-+#include <gdk/x11/gdkx11device.h>
-+#include <gdk/x11/gdkx11device-core.h>
-+#include <gdk/x11/gdkx11device-xi2.h>
-+#include <gdk/x11/gdkx11devicemanager.h>
-+#include <gdk/x11/gdkx11devicemanager-core.h>
-+#include <gdk/x11/gdkx11devicemanager-xi2.h>
-+#include <gdk/x11/gdkx11display.h>
-+#include <gdk/x11/gdkx11displaymanager.h>
-+#include <gdk/x11/gdkx11dnd.h>
-+#include <gdk/x11/gdkx11glcontext.h>
-+#include <gdk/x11/gdkx11keys.h>
-+#include <gdk/x11/gdkx11property.h>
-+#include <gdk/x11/gdkx11screen.h>
-+#include <gdk/x11/gdkx11selection.h>
-+#include <gdk/x11/gdkx11utils.h>
-+#include <gdk/x11/gdkx11visual.h>
-+#include <gdk/x11/gdkx11window.h>
-+
-+#include <gdk/x11/gdkx-autocleanups.h>
-+
-+#undef __GDKX_H_INSIDE__
-+
-+#endif /* __GDK_X_H__ */
+@@ -45,7 +45,6 @@
+ #include <gdk/x11/gdkx11dnd.h>
+ #include <gdk/x11/gdkx11glcontext.h>
+ #include <gdk/x11/gdkx11keys.h>
+-#include <gdk/x11/gdkx11monitor.h>
+ #include <gdk/x11/gdkx11property.h>
+ #include <gdk/x11/gdkx11screen.h>
+ #include <gdk/x11/gdkx11selection.h>
 diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h
 new file mode 100644
 index 0000000..c9e2617
@@ -683,77 +632,11 @@
 +#undef __GDKX_H_INSIDE__
 +
 +#endif /* __GDK_X_H__ */
-diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
-deleted file mode 100644
-index 1f64bcc..0000000
---- a/gdk/x11/gdkx.h
-+++ /dev/null
-@@ -1,60 +0,0 @@
--/* GDK - The GIMP Drawing Kit
-- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library 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
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
-- */
--
--/*
-- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
-- * file for a list of people on the GTK+ Team.  See the ChangeLog
-- * files for a list of changes.  These files are distributed with
-- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
-- */
--
--#ifndef __GDK_X_H__
--#define __GDK_X_H__
--
--#include <gdk/gdk.h>
--
--#include <X11/Xlib.h>
--#include <X11/Xutil.h>
--
--#define __GDKX_H_INSIDE__
--
--#include <gdk/x11/gdkx11applaunchcontext.h>
--#include <gdk/x11/gdkx11cursor.h>
--#include <gdk/x11/gdkx11device.h>
--#include <gdk/x11/gdkx11device-core.h>
--#include <gdk/x11/gdkx11device-xi2.h>
--#include <gdk/x11/gdkx11devicemanager.h>
--#include <gdk/x11/gdkx11devicemanager-core.h>
--#include <gdk/x11/gdkx11devicemanager-xi2.h>
--#include <gdk/x11/gdkx11display.h>
--#include <gdk/x11/gdkx11displaymanager.h>
--#include <gdk/x11/gdkx11dnd.h>
--#include <gdk/x11/gdkx11glcontext.h>
--#include <gdk/x11/gdkx11keys.h>
--#include <gdk/x11/gdkx11monitor.h>
--#include <gdk/x11/gdkx11property.h>
--#include <gdk/x11/gdkx11screen.h>
--#include <gdk/x11/gdkx11selection.h>
--#include <gdk/x11/gdkx11utils.h>
--#include <gdk/x11/gdkx11visual.h>
--#include <gdk/x11/gdkx11window.h>
--
--#include <gdk/x11/gdkx-autocleanups.h>
--
--#undef __GDKX_H_INSIDE__
--
--#endif /* __GDK_X_H__ */
 diff --git a/gtk/Makefile.am b/gtk/Makefile.am
-index 45fb7c2..ce81011 100644
+index 842c2f9..0921bc7 100644
 --- a/gtk/Makefile.am
 +++ b/gtk/Makefile.am
-@@ -1411,14 +1411,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources)  gtkprivatetypebuiltins.
+@@ -1416,14 +1416,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources)  gtkprivatetypebuiltins.
  	&& cp xgen-gptbc gtkprivatetypebuiltins.c  \
  	&& rm -f xgen-gptbc
  
@@ -913,7 +796,7 @@
    if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
      {
 diff --git a/tests/Makefile.am b/tests/Makefile.am
-index f86c166..ba1acad 100644
+index e2db6e4..e51cf34 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
 @@ -80,8 +80,6 @@ noinst_PROGRAMS =  $(TEST_PROGS)	\
@@ -949,17 +832,16 @@
 index 0b3a519..07b096f 100644
 --- a/testsuite/gtk/objects-finalize.c
 +++ b/testsuite/gtk/objects-finalize.c
-@@ -115,8 +115,10 @@ main (int argc, char **argv)
+@@ -115,7 +115,9 @@ main (int argc, char **argv)
  	  all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_CORE &&
  	  all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_XI2 &&
  	  all_types[i] != GDK_TYPE_X11_DISPLAY_MANAGER &&
 +#ifdef HAVE_OPENGL
  	  all_types[i] != GDK_TYPE_X11_GL_CONTEXT &&
- #endif
 +#endif
+ #endif
  	  /* Not allowed to finalize a GdkPixbufLoader without calling gdk_pixbuf_loader_close() */
  	  all_types[i] != GDK_TYPE_PIXBUF_LOADER &&
- 	  all_types[i] != GDK_TYPE_DRAWING_CONTEXT &&
 -- 
-2.12.0
+2.14.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
deleted file mode 100644
index aca55ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 34f4d3928e8206a89b0a601bdf79d6194b3cc77e Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 9 Jun 2016 11:21:36 +0300
-Subject: [PATCH 4/4] configure.ac: Fix wayland-protocols path
-
-The wayland-protocols directory is used during build: Fix the path
-to point to sysroot specified in recipe.
-
-Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
-breaks multilib gtk+ as it would point to multilib sysroot when the
-(allarch) wayland-protocols is actually in the machine sysroot.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 00bf544..5515915 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -465,7 +465,7 @@ fi
- if test "$enable_wayland_backend" = "yes"; then
-   # For the cairo image backend
-   cairo_backends="$cairo_backends cairo"
--  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`)
-   GDK_BACKENDS="$GDK_BACKENDS wayland"
-   GDK_WINDOWING="$GDK_WINDOWING
- #define GDK_WINDOWING_WAYLAND"
--- 
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.17.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.17.bb
deleted file mode 100644
index 66a5463..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.17.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require gtk+3.inc
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
-           file://0001-Hardcoded-libtool.patch \
-           file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
-           file://0003-Add-disable-opengl-configure-option.patch \
-           file://0004-configure.ac-Fix-wayland-protocols-path.patch \
-          "
-SRC_URI[md5sum] = "29f85430cf7cfa8ca8d0703ba65dbe11"
-SRC_URI[sha256sum] = "a6c1fb8f229c626a3d9c0e1ce6ea138de7f64a5a6bc799d45fa286fe461c3437"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
-                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
-                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
-                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.28.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.28.bb
new file mode 100644
index 0000000..864e826
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.22.28.bb
@@ -0,0 +1,18 @@
+require gtk+3.inc
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+           file://0001-Hardcoded-libtool.patch \
+           file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
+           file://0003-Add-disable-opengl-configure-option.patch \
+          "
+SRC_URI[md5sum] = "8c1f5ab987ddc7dab3e59660f89dcd9b"
+SRC_URI[sha256sum] = "d299612b018cfed7b2c689168ab52b668023708e17c335eb592260d186f15e1f"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.31.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.31.bb
deleted file mode 100644
index cc31bab..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.31.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-require gtk+.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
-                    file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
-                    file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
-           file://xsettings.patch \
-           file://hardcoded_libtool.patch \
-           file://toggle-font.diff;striplevel=0 \
-           file://doc-fixes.patch \
-           file://strict-prototypes.patch \
-	  "
-
-SRC_URI[md5sum] = "526a1008586094a2cbb4592fd3f9ee10"
-SRC_URI[sha256sum] = "68c1922732c7efc08df4656a5366dcc3afdc8791513400dac276009b40954658"
-
-EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
-
-LIBV = "2.10.0"
-
-PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
-
-python populate_packages_prepend () {
-    gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
-    immodules_root = os.path.join(gtk_libdir, 'immodules')
-    printmodules_root = os.path.join(gtk_libdir, 'printbackends');
-
-    d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
-    do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
-
-    if (d.getVar('DEBIAN_NAMES')):
-        d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
new file mode 100644
index 0000000..2070358
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
@@ -0,0 +1,34 @@
+require gtk+.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
+                    file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
+                    file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
+           file://xsettings.patch \
+           file://hardcoded_libtool.patch \
+           file://toggle-font.diff;striplevel=0 \
+           file://doc-fixes.patch \
+           file://strict-prototypes.patch \
+	  "
+
+SRC_URI[md5sum] = "d5742aa42275203a499b59b4c382a784"
+SRC_URI[sha256sum] = "b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e"
+
+EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
+
+LIBV = "2.10.0"
+
+PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
+
+python populate_packages_prepend () {
+    gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
+    immodules_root = os.path.join(gtk_libdir, 'immodules')
+    printmodules_root = os.path.join(gtk_libdir, 'printbackends');
+
+    d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
+    do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
+
+    if (d.getVar('DEBIAN_NAMES')):
+        d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.17.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.17.bb
deleted file mode 100644
index 032d82d..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.17.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Native icon utils for GTK+"
-DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
-SECTION = "libs"
-
-DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
-          file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
-SRC_URI[md5sum] = "29f85430cf7cfa8ca8d0703ba65dbe11"
-SRC_URI[sha256sum] = "a6c1fb8f229c626a3d9c0e1ce6ea138de7f64a5a6bc799d45fa286fe461c3437"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
-                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
-                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
-                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-inherit pkgconfig native
-
-# versions >= 3.90 are development versions, otherwise like upstream-version-is-even
-UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar"
-
-PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
-
-do_configure() {
-	# Quite ugly but defines enough to compile the tools.
-	if ! test -f gtk/config.h; then
-		echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
-		echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
-		echo "#define HAVE_FTW_H 1" >> gtk/config.h
-	fi
-	if ! test -f gdk/config.h; then
-		touch gdk/config.h
-	fi
-}
-
-do_compile() {
-	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
-		${S}/gtk/updateiconcache.c \
-		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
-		-o gtk-update-icon-cache
-
-	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
-		${S}/gtk/encodesymbolic.c \
-		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
-		-o gtk-encode-symbolic-svg
-}
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
-	install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
-
-	create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-	create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.28.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.28.bb
new file mode 100644
index 0000000..942c047
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.28.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Native icon utils for GTK+"
+DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
+SECTION = "libs"
+
+DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+          file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
+SRC_URI[md5sum] = "8c1f5ab987ddc7dab3e59660f89dcd9b"
+SRC_URI[sha256sum] = "d299612b018cfed7b2c689168ab52b668023708e17c335eb592260d186f15e1f"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+inherit pkgconfig native
+
+# versions >= 3.90 are development versions, otherwise like upstream-version-is-even
+UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar"
+
+PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
+
+do_configure() {
+	# Quite ugly but defines enough to compile the tools.
+	if ! test -f gtk/config.h; then
+		echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
+		echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
+		echo "#define HAVE_FTW_H 1" >> gtk/config.h
+	fi
+	if ! test -f gdk/config.h; then
+		touch gdk/config.h
+	fi
+}
+
+do_compile() {
+	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+		${S}/gtk/updateiconcache.c \
+		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
+		-o gtk-update-icon-cache
+
+	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+		${S}/gtk/encodesymbolic.c \
+		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
+		-o gtk-encode-symbolic-svg
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
+	install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
+
+	create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+	create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
deleted file mode 100644
index 4a90287..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e733241fb580f032efbbe684ec35d4c9d27f1595 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 8 Sep 2016 13:38:39 +0300
-Subject: [PATCH] Do not error out if perl is not found or its version is too
- old.
-
-This allows use to avoid depending on perl-native if we're not going
-to use it (when api-docs are disabled).
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2a61d6e..29415bd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -36,7 +36,7 @@ dnl Check for Perl.
- dnl
- AC_PATH_PROG([PERL], [perl])
- if test -z "$PERL"; then
--	AC_MSG_ERROR([perl not found])
-+	AC_MSG_WARN([perl not found])
- fi
- 
- AC_MSG_CHECKING([if Perl version >= 5.18.0])
-@@ -44,7 +44,7 @@ if "$PERL" -e "require v5.18.0"; then
- 	AC_MSG_RESULT([yes])
- else
- 	AC_MSG_RESULT([no])
--	AC_MSG_ERROR([perl >= 5.18.0 is required for gtk-doc])
-+	AC_MSG_WARN([perl >= 5.18.0 is required for gtk-doc])
- fi
- 
- dnl
--- 
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
index 477fc9a..2fe3ab9 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
@@ -1,7 +1,7 @@
-From 6fab82b93c7bd301eb42448515b02f7cb3306897 Mon Sep 17 00:00:00 2001
+From 928102874bc2339a1d57c6b178877e0c6002cb3a Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 31 Aug 2016 16:44:46 +0300
-Subject: [PATCH] Do not hardocode paths to perl/python in scripts.
+Subject: [PATCH 1/3] Do not hardocode paths to perl/python in scripts.
 
 Doing so when the interpreters are somewhere deep in a sysroot directory
 can reach the shebang line limit, and resulting scripts wouldn't work
@@ -9,131 +9,134 @@
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
- gtkdoc-check.in     | 2 +-
- gtkdoc-common.pl.in | 2 +-
- gtkdoc-depscan.in   | 2 +-
- gtkdoc-fixxref.in   | 2 +-
- gtkdoc-mkdb.in      | 2 +-
- gtkdoc-mktmpl.in    | 2 +-
- gtkdoc-rebase.in    | 2 +-
- gtkdoc-scan.in      | 2 +-
- gtkdoc-scangobj.in  | 2 +-
- tests/tools.sh.in   | 4 ++--
- 10 files changed, 11 insertions(+), 11 deletions(-)
+ gtkdoc-check.in    | 2 +-
+ gtkdoc-depscan.in  | 2 +-
+ gtkdoc-fixxref.in  | 2 +-
+ gtkdoc-mkdb.in     | 2 +-
+ gtkdoc-mkhtml.in   | 2 +-
+ gtkdoc-mkman.in    | 2 +-
+ gtkdoc-mkpdf.in    | 2 +-
+ gtkdoc-rebase.in   | 2 +-
+ gtkdoc-scan.in     | 2 +-
+ gtkdoc-scangobj.in | 2 +-
+ tests/tools.sh.in  | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
 
 diff --git a/gtkdoc-check.in b/gtkdoc-check.in
-index 560d69b..b60857f 100755
+index 8c8e917..f6a25f6 100755
 --- a/gtkdoc-check.in
 +++ b/gtkdoc-check.in
 @@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
- #
- # gtk-doc - GTK DocBook documentation generator.
-diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
-index 4747396..cfadb78 100644
---- a/gtkdoc-common.pl.in
-+++ b/gtkdoc-common.pl.in
-@@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
  #
  # gtk-doc - GTK DocBook documentation generator.
 diff --git a/gtkdoc-depscan.in b/gtkdoc-depscan.in
-index 83af01b..917e247 100644
+index 9bfaf30..aadc952 100644
 --- a/gtkdoc-depscan.in
 +++ b/gtkdoc-depscan.in
 @@ -1,4 +1,4 @@
 -#!@PYTHON@
-+#!/usr/bin/env python
++#!/usr/bin/env python3
  
- import gzip, os.path, re
+ from __future__ import print_function
  
 diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
-index 3d9e8d0..d55190b 100755
+index 0ea02d4..bdd443a 100755
 --- a/gtkdoc-fixxref.in
 +++ b/gtkdoc-fixxref.in
 @@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
  #
  # gtk-doc - GTK DocBook documentation generator.
 diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
-index 8dd6d5e..d808750 100755
+index 42d5731..3a56d56 100755
 --- a/gtkdoc-mkdb.in
 +++ b/gtkdoc-mkdb.in
 @@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
  #
  # gtk-doc - GTK DocBook documentation generator.
-diff --git a/gtkdoc-mktmpl.in b/gtkdoc-mktmpl.in
-index c64dfd3..2f46c18 100755
---- a/gtkdoc-mktmpl.in
-+++ b/gtkdoc-mktmpl.in
+diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
+index 0d0a15d..914ff55 100644
+--- a/gtkdoc-mkhtml.in
++++ b/gtkdoc-mkhtml.in
 @@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mkman.in b/gtkdoc-mkman.in
+index c5445cd..65db71a 100644
+--- a/gtkdoc-mkman.in
++++ b/gtkdoc-mkman.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mkpdf.in b/gtkdoc-mkpdf.in
+index e8c0c03..f807236 100755
+--- a/gtkdoc-mkpdf.in
++++ b/gtkdoc-mkpdf.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python; coding: utf-8 -*-
  #
  # gtk-doc - GTK DocBook documentation generator.
 diff --git a/gtkdoc-rebase.in b/gtkdoc-rebase.in
-index 375482d..cf05b45 100644
+index 17a71c2..ec3fd28 100755
 --- a/gtkdoc-rebase.in
 +++ b/gtkdoc-rebase.in
 @@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
  #
  # gtk-doc - GTK DocBook documentation generator.
 diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
-index 048e5c9..78c6136 100755
+index 954c811..f461504 100755
 --- a/gtkdoc-scan.in
 +++ b/gtkdoc-scan.in
 @@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
  #
  # gtk-doc - GTK DocBook documentation generator.
 diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
-index fb66b76..67ee8f7 100644
+index 4cbe130..52c2c24 100644
 --- a/gtkdoc-scangobj.in
 +++ b/gtkdoc-scangobj.in
 @@ -1,4 +1,4 @@
--#!@PERL@ -w
-+#!/usr/bin/env perl
- # -*- cperl -*-
+-#!@PYTHON@
++#!/usr/bin/env python3
+ # -*- python -*-
  #
  # gtk-doc - GTK DocBook documentation generator.
 diff --git a/tests/tools.sh.in b/tests/tools.sh.in
-index a114a42..7073883 100644
+index 4d301d0..565fc1e 100644
 --- a/tests/tools.sh.in
 +++ b/tests/tools.sh.in
-@@ -11,7 +11,7 @@ echo "Running suite(s): gtk-doc-$suite";
- 
- # test perl scripts
- for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj ; do
--  @PERL@ -cwT `which $file`
-+  perl -cwT `which $file`
-   if test $? = 1 ; then failed=`expr $failed + 1`; fi
-   tested=`expr $tested + 1`
+@@ -31,7 +31,7 @@ done
+ # TODO: test python 2 and 3 (python3 -mcompileall gtkdoc/*.py)
+ for file in gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase gtkdoc-scangobj; do
+     fullfile=`which $file`
+-    @PYTHON@ -m py_compile $fullfile
++    python3 -m py_compile $fullfile
+     if test $? != 0 ; then failed=`expr $failed + 1`; fi
+     tested=`expr $tested + 1`
  done
-@@ -34,7 +34,7 @@ done
- 
- 
- # test python scripts
--@PYTHON@ -m py_compile `which gtkdoc-depscan`
-+python -m py_compile `which gtkdoc-depscan`
- if test $? != 0 ; then failed=`expr $failed + 1`; fi
- tested=`expr $tested + 1`
- 
 -- 
-2.9.3
+2.14.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
index 0c180f2..21c2db7 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/conditionaltests.patch
@@ -1,14 +1,23 @@
+From 78bbf185934147a69ceb4b617d424e12e70997bf Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 27 Jun 2017 21:00:58 +0100
+Subject: [PATCH 3/3] gtk-doc: Handle floating gtk-doc dependency
+
 Allow the tests to be explicitly disabled to avoid floating dependnecy
 issues. This is not really an issue with RSS but is on previous releases.
 
 RP 2017/6/27
 Upstream-Status: Pending
 
-Index: gtk-doc-1.25/configure.ac
-===================================================================
---- gtk-doc-1.25.orig/configure.ac
-+++ gtk-doc-1.25/configure.ac
-@@ -161,6 +161,11 @@ if test "x$GCC" = "xyes"; then
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 684e2d1..e5e3aab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -146,6 +146,11 @@ if test "x$GCC" = "xyes"; then
  	fi
  fi
  
@@ -20,7 +29,7 @@
  dnl if glib is available we can enable the tests
  PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >= 2.6.0 gobject-2.0 >= 2.6.0],
  	[	glib_prefix="`$PKG_CONFIG --variable=prefix glib-2.0`"
-@@ -171,6 +176,11 @@ PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >
+@@ -156,6 +161,11 @@ PKG_CHECK_MODULES(TEST_DEPS, [glib-2.0 >= 2.6.0 gobject-2.0 >= 2.6.0],
  		build_tests="no"
  	]
  )
@@ -30,5 +39,8 @@
 +fi
 +
  AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL" -a x$gtk_doc_use_libtool = xyes )
- dnl this enable the rule in test/Makefile.am
+ dnl this enables the rule in test/Makefile.am
  AM_CONDITIONAL(BUILD_TESTS, test x$build_tests = xyes)
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/no-clobber.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
new file mode 100644
index 0000000..0fa22b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
@@ -0,0 +1,27 @@
+In out-of-tree builds gtk-doc's setup-build target copies all the content from $srcdir to $builddir.
+
+However, if some of this content is regenerated at configure time this can happen:
+
+1) configure writes new build/version.xml
+2) make compile copies content, including the tarball's src/version.xml
+   to build/version.xml, and generates gtk-doc.
+3) make install notices build/version.xml is older than configure.status,
+   so regenerates gtk-doc.
+
+gtk-doc generation is a slow process at the best of times, so doing it twice isn't good.
+
+Solve this by changing cp --force to cp --no-clobber, so setup-build only copies
+files which don't already exist.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=794571]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gtk-doc.make b/gtk-doc.make
+index f87eaab..246f3c0 100644
+--- a/gtk-doc.make
++++ b/gtk-doc.make
+@@ -113,3 +113,3 @@ setup-build.stamp:
+ 	      test -f $(abs_srcdir)/$$file && \
+-	        cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
++	        cp -pn $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
+ 	    done; \
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
index c768870..bfbc777 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
@@ -1,24 +1,32 @@
-Use native pkg-config when looking for gtk-doc.
+From 5f145621b4780cfd6a5632fcc97c45f572938efc Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 5 Sep 2016 22:25:44 +0100
+Subject: [PATCH 5/5] Use native pkg-config when looking for gtk-doc.
 
 Upstream-Status: Inappropriate
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
-diff --git a/gtk-doc.m4 b/gtk-doc.m4
-index 3675543..94881ae 100644
---- a/gtk-doc.m4
-+++ b/gtk-doc.m4
-@@ -1,6 +1,6 @@
- dnl -*- mode: autoconf -*-
+---
+ gtk-doc.m4 | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
 
+Index: gtk-doc-1.27/gtk-doc.m4
+===================================================================
+--- gtk-doc-1.27.orig/gtk-doc.m4
++++ gtk-doc-1.27/gtk-doc.m4
+@@ -25,7 +25,7 @@
+ # Macro appear in them. The GNU General Public License (GPL) does govern
+ # all other use of the material that constitutes the Autoconf Macro.
+ 
 -# serial 2
 +# serial 2.1
-
+ 
  dnl Usage:
  dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
-@@ -10,11 +10,16 @@ AC_DEFUN([GTK_DOC_CHECK],
+@@ -35,11 +35,16 @@ AC_DEFUN([GTK_DOC_CHECK],
    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-
+ 
 +  gtkdoc_pkgconfig_save=$PKG_CONFIG
 +  PKG_CONFIG=pkg-config-native
 +
@@ -26,7 +34,7 @@
    AC_MSG_CHECKING([for gtk-doc])
    PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
    AC_MSG_RESULT($have_gtk_doc)
-
+ 
 +  PKG_CONFIG=$gtkdoc_pkgconfig_save
 +
    if test "$have_gtk_doc" = "no"; then
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
deleted file mode 100644
index e0eb994..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Documentation generator for glib-based software"
-DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
-               from glib-based software and produce a set of html documentation files from them"
-HOMEPAGE = "http://www.gtk.org/gtk-doc/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-inherit gnomebase
-
-# Configure the scripts correctly (and build their dependencies) only if they are actually
-# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
-PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
-
-# This will cause target gtk-doc to hardcode paths of native dependencies
-# into its scripts. This means that target gtk-doc package is broken;
-# hopefully no one minds because its scripts are not used for anything during build
-# and shouldn't be used on targets.
-PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native perl-native"
-PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,glib-2.0"
-
-# We cannot use host perl, because it may be too old for gtk-doc
-EXTRANATIVEPATH += "perl-native"
-
-SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
-            file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
-            file://0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch \
-            file://conditionaltests.patch \
-           "
-SRC_URI_append_class-native = " file://pkg-config-native.patch"
-
-SRC_URI[archive.md5sum] = "0dc6570953112a464a409fb99258ccbc"
-SRC_URI[archive.sha256sum] = "1ea46ed400e6501f975acaafea31479cea8f32f911dca4dff036f59e6464fd42"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# Do not check for XML catalogs when building because that
-# information is not used for anything during build. Recipe
-# dependencies make sure we have all the right bits.
-do_configure_prepend() {
-        sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
-}
-
-FILES_${PN} += "${datadir}/sgml"
-FILES_${PN}-dev += "${libdir}/cmake"
-FILES_${PN}-doc = ""
-
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
-gtkdoc_makefiles_sysroot_preprocess() {
-        # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
-        # instead of libtool wrapper or running them directly
-        sed -i \
-           -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
-           ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb
new file mode 100644
index 0000000..4552811
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Documentation generator for glib-based software"
+DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
+               from glib-based software and produce a set of html documentation files from them"
+HOMEPAGE = "http://www.gtk.org/gtk-doc/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit gnomebase
+
+# Configure the scripts correctly (and build their dependencies) only if they are actually
+# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
+
+# This will cause target gtk-doc to hardcode paths of native dependencies
+# into its scripts. This means that target gtk-doc package is broken;
+# hopefully no one minds because its scripts are not used for anything during build
+# and shouldn't be used on targets.
+PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native python3-six"
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,glib-2.0"
+
+SRC_URI[archive.md5sum] = "b29949e0964762e474b706ce22171602"
+SRC_URI[archive.sha256sum] = "e26bd3f7080c749b1cb66c46c6bf8239e2f320a949964fb9c6d56e1b0c6d9a6f"
+SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
+           file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
+           file://conditionaltests.patch \
+           file://no-clobber.patch \
+           "
+SRC_URI_append_class-native = " file://pkg-config-native.patch"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Do not check for XML catalogs when building because that
+# information is not used for anything during build. Recipe
+# dependencies make sure we have all the right bits.
+do_configure_prepend() {
+        sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
+}
+
+FILES_${PN} += "${datadir}/sgml"
+FILES_${PN}-dev += "${libdir}/cmake"
+FILES_${PN}-doc = ""
+
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
+gtkdoc_makefiles_sysroot_preprocess() {
+        # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+        # instead of libtool wrapper or running them directly
+        sed -i \
+           -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+           ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb b/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb
deleted file mode 100644
index a704632..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.15.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Default icon theme that all icon themes automatically inherit from"
-HOMEPAGE = "http://icon-theme.freedesktop.org/wiki/HicolorTheme"
-BUGTRACKER = "https://bugs.freedesktop.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
-
-SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "6aa2b3993a883d85017c7cc0cfc0fb73"
-SRC_URI[sha256sum] = "9cc45ac3318c31212ea2d8cb99e64020732393ee7630fa6c1810af5f987033cc"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb b/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
new file mode 100644
index 0000000..7064b19
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Default icon theme that all icon themes automatically inherit from"
+HOMEPAGE = "http://icon-theme.freedesktop.org/wiki/HicolorTheme"
+BUGTRACKER = "https://bugs.freedesktop.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
+
+SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "84eec8d6f810240a069c731f1870b474"
+SRC_URI[sha256sum] = "317484352271d18cbbcfac3868eab798d67fff1b8402e740baa6ff41d588a9d8"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb
deleted file mode 100644
index 2c5d381..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
-DESCRIPTION = "Use JSON-GLib it is possible to parse and generate valid JSON\
- data structures, using a DOM-like API. JSON-GLib also offers GObject \
-integration, providing the ability to serialize and deserialize GObject \
-instances to and from JSON data types."
-HOMEPAGE = "http://live.gnome.org/JsonGlib"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI[archive.md5sum] = "ff31e7d0594df44318e12facda3d086e"
-SRC_URI[archive.sha256sum] = "fd55a9037d39e7a10f0db64309f5f0265fa32ec962bf85066087b83a2807f40a"
-
-inherit gnomebase gettext lib_package gobject-introspection gtk-doc manpages
-
-PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb
new file mode 100644
index 0000000..19fe3cc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb
@@ -0,0 +1,40 @@
+SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
+DESCRIPTION = "Use JSON-GLib it is possible to parse and generate valid JSON\
+ data structures, using a DOM-like API. JSON-GLib also offers GObject \
+integration, providing the ability to serialize and deserialize GObject \
+instances to and from JSON data types."
+HOMEPAGE = "http://live.gnome.org/JsonGlib"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI[archive.md5sum] = "35107e23a7bbbc70f31c34f7b9adf1c3"
+SRC_URI[archive.sha256sum] = "2d7709a44749c7318599a6829322e081915bdc73f5be5045882ed120bb686dc8"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase lib_package gobject-introspection gtk-doc gettext
+
+# This builds both API docs (via gtk-doc) and manpages
+GTKDOC_ENABLE_FLAG = "-Ddocs=true"
+GTKDOC_DISABLE_FLAG = "-Ddocs=false"
+
+GI_ENABLE_FLAG = "-Dintrospection=true"
+GI_DISABLE_FLAG = "-Dintrospection=false"
+
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
+                                                                                    '${GTKDOC_DISABLE_FLAG}', d)} "
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \
+                                                                                    '${GI_DISABLE_FLAG}', d)} "
+
+do_install_append() {
+    # FIXME: these need to be provided via ptest
+    rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Currently it's not possible to disable gettext in Meson, so we need to force
+# this back on.
+USE_NLS_class-native = "yes"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_231.bb b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_231.bb
deleted file mode 100644
index ad67926..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_231.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "GObject wrapper for libudev"
-HOMEPAGE = "https://wiki.gnome.org/Projects/libgudev"
-SRC_URI[archive.md5sum] = "916c10c51ec61131e244c3936bbb2e0c"
-SRC_URI[archive.sha256sum] = "3b1ef99d4a8984c35044103d8ddfc3cc52c80035c36abab2bcc5e3532e063f96"
-
-DEPENDS = "glib-2.0 udev"
-
-EXTRA_OECONF = "--disable-umockdev"
-
-RCONFLICTS_${PN} = "systemd (<= 220)"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-inherit gnomebase gobject-introspection gtk-doc
-
-UPSTREAM_CHECK_URI = "http://ftp.gnome.org/pub/GNOME/sources/libgudev/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>(\d+))"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_232.bb b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_232.bb
new file mode 100644
index 0000000..19fe962
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_232.bb
@@ -0,0 +1,18 @@
+SUMMARY = "GObject wrapper for libudev"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libgudev"
+SRC_URI[archive.sha256sum] = "ee4cb2b9c573cdf354f6ed744f01b111d4b5bed3503ffa956cefff50489c7860"
+SRC_URI[archive.md5sum] = "6914852377156665567abf8a38d89236"
+
+DEPENDS = "glib-2.0 udev"
+
+EXTRA_OECONF = "--disable-umockdev"
+
+RCONFLICTS_${PN} = "systemd (<= 220)"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gobject-introspection gtk-doc
+
+UPSTREAM_CHECK_URI = "http://ftp.gnome.org/pub/GNOME/sources/libgudev/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>(\d+))"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.18.bb b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.18.bb
deleted file mode 100644
index 21a0dc2..0000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.18.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Library for rendering SVG files"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
-
-SECTION = "x11/utils"
-DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
-BBCLASSEXTEND = "native"
-
-inherit autotools pkgconfig gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://gtk-option.patch"
-
-SRC_URI[archive.md5sum] = "eaa5c8a8bbe2600ab5194c0d3b1b621b"
-SRC_URI[archive.sha256sum] = "bfc8c488c89c1e7212c478beb95c41b44701636125a3e6dab41187f1485b564c"
-
-CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-# The older ld (2.22) on the host (Centos 6.5) doesn't have the
-# -Bsymbolic-functions option, we can disable it for native.
-EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
-
-PACKAGECONFIG ??= "gdkpixbuf"
-# The gdk-pixbuf loader
-PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
-# GTK+ test application (rsvg-view)
-PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
-
-do_install_append() {
-	# Loadable modules don't need .a or .la on Linux
-	rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
-}
-
-PACKAGES =+ "librsvg-gtk rsvg"
-FILES_rsvg = "${bindir}/rsvg* \
-	      ${datadir}/pixmaps/svg-viewer.svg \
-	      ${datadir}/themes"
-FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so \
-                     ${datadir}/thumbnailers/librsvg.thumbnailer"
-
-PIXBUF_PACKAGES = "librsvg-gtk"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
new file mode 100644
index 0000000..e376d52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Library for rendering SVG files"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+RECIPE_NO_UPDATE_REASON = "Versions from 2.41.0 requires Rust compiler to build it"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
+
+SECTION = "x11/utils"
+DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
+BBCLASSEXTEND = "native"
+
+inherit gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://gtk-option.patch"
+
+SRC_URI[archive.md5sum] = "4949d313b0c5d9161a5c259104af5568"
+SRC_URI[archive.sha256sum] = "cff4dd3c3b78bfe99d8fcfad3b8ba1eee3289a0823c0e118d78106be6b84c92b"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+# The older ld (2.22) on the host (Centos 6.5) doesn't have the
+# -Bsymbolic-functions option, we can disable it for native.
+EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
+
+PACKAGECONFIG ??= "gdkpixbuf"
+# The gdk-pixbuf loader
+PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
+# GTK+ test application (rsvg-view)
+PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
+
+do_install_append() {
+	# Loadable modules don't need .a or .la on Linux
+	rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
+}
+
+PACKAGES =+ "librsvg-gtk rsvg"
+FILES_rsvg = "${bindir}/rsvg* \
+	      ${datadir}/pixmaps/svg-viewer.svg \
+	      ${datadir}/themes"
+FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so \
+                     ${datadir}/thumbnailers/librsvg.thumbnailer"
+RRECOMMENDS_librsvg-gtk = "gdk-pixbuf-bin"
+
+PIXBUF_PACKAGES = "librsvg-gtk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.10.bb
deleted file mode 100644
index fcdddc6..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.10.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-require cairo.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
-
-SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
-           file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ 
-           file://0001-cairo-Fix-CVE-2017-9814.patch \
-          "
-
-SRC_URI[md5sum] = "146f5f4d0b4439fc3792fd3452b7b12a"
-SRC_URI[sha256sum] = "7e87878658f2c9951a14fc64114d4958c0e65ac47530b8ac3078b2ce41b66a09"
-
-PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
-
-SUMMARY_${PN} = "The Cairo 2D vector graphics library"
-DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
-vector-based rendering for multiple target backends. Paths consist \
-of line segments and cubic splines and can be rendered at any width \
-with various join and cap styles. All colors may be specified with \
-optional translucence (opacity/alpha) and combined using the \
-extended Porter/Duff compositing algebra as found in the X Render \
-Extension."
-
-SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
-DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
-
-SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
-DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
-CairoScript.  CairoScript is used by tracing utilities to enable the ability \
-to replay rendering."
-
-DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
-
-FILES_${PN} = "${libdir}/libcairo.so.*"
-FILES_${PN}-dev += "${libdir}/cairo/*.so"
-FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
-FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
-FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
-
-do_install_append () {
-	rm -rf ${D}${bindir}/cairo-sphinx
-	rm -rf ${D}${libdir}/cairo/cairo-fdr*
-	rm -rf ${D}${libdir}/cairo/cairo-sphinx*
-	rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
-	rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.12.bb b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.12.bb
new file mode 100644
index 0000000..075ca1e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.12.bb
@@ -0,0 +1,46 @@
+require cairo.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
+
+SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
+           file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ 
+           file://0001-cairo-Fix-CVE-2017-9814.patch \
+          "
+
+SRC_URI[md5sum] = "9f0db9dbfca0966be8acd682e636d165"
+SRC_URI[sha256sum] = "8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16"
+
+PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
+
+SUMMARY_${PN} = "The Cairo 2D vector graphics library"
+DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
+vector-based rendering for multiple target backends. Paths consist \
+of line segments and cubic splines and can be rendered at any width \
+with various join and cap styles. All colors may be specified with \
+optional translucence (opacity/alpha) and combined using the \
+extended Porter/Duff compositing algebra as found in the X Render \
+Extension."
+
+SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
+DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
+
+SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
+DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
+CairoScript.  CairoScript is used by tracing utilities to enable the ability \
+to replay rendering."
+
+DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
+
+FILES_${PN} = "${libdir}/libcairo.so.*"
+FILES_${PN}-dev += "${libdir}/cairo/*.so"
+FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
+FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
+FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
+
+do_install_append () {
+	rm -rf ${D}${bindir}/cairo-sphinx
+	rm -rf ${D}${libdir}/cairo/cairo-fdr*
+	rm -rf ${D}${libdir}/cairo/cairo-sphinx*
+	rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
+	rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
index 3b6a70e..ce9ab3a 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/install-examples.patch
@@ -3,11 +3,11 @@
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 Upstream-Status: Inappropriate
 
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index 4b9b449..232cd19 100644
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -38,6 +38,7 @@ AM_CPPFLAGS = \
+Index: clutter-1.26.2/examples/Makefile.am
+===================================================================
+--- clutter-1.26.2.orig/examples/Makefile.am
++++ clutter-1.26.2/examples/Makefile.am
+@@ -33,7 +33,8 @@ AM_CPPFLAGS = \
  	-I$(top_srcdir)/clutter \
  	-I$(top_builddir)/clutter
  
@@ -16,3 +16,4 @@
 +example_PROGRAMS = $(all_examples)
  
  EXTRA_DIST = redhand.png
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
index 26ae91c..4c87798 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
@@ -15,7 +15,3 @@
 FILES_${PN}          += "${libdir}/gstreamer-1.0/lib*.so"
 FILES_${PN}-dev      += "${libdir}/gstreamer-1.0/*.la"
 FILES_${PN}-examples  = "${bindir}/video-player ${bindir}/video-sink"
-
-# Needs to be disable due to a dependency on gstreamer-plugins introspection files
-EXTRA_OECONF_append_mips64 = " --disable-introspection "
-
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
deleted file mode 100644
index 78050df..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-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/clutter/clutter-gtk-1.0_1.8.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb
new file mode 100644
index 0000000..f0300c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.4.bb
@@ -0,0 +1,6 @@
+require clutter-gtk-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI[archive.md5sum] = "b363ac9878e2337be887b8ee9e1da00e"
+SRC_URI[archive.sha256sum] = "521493ec038973c77edcb8bc5eac23eed41645117894aaee7300b2487cb42b06"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
index bf52637..40bebc0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
@@ -12,11 +12,11 @@
  configure.ac | 14 ++++++++++++--
  1 file changed, 12 insertions(+), 2 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index e3048c7..918d21d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -137,6 +137,12 @@ AC_ARG_ENABLE(install-test-programs,
+Index: libdrm-2.4.91/configure.ac
+===================================================================
+--- libdrm-2.4.91.orig/configure.ac
++++ libdrm-2.4.91/configure.ac
+@@ -163,6 +163,12 @@ AC_ARG_ENABLE(install-test-programs,
  		  [Install test programs (default: no)]),
  		  [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no])
  
@@ -29,8 +29,8 @@
  dnl ===========================================================================
  dnl check compiler flags
  AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
-@@ -372,7 +378,7 @@ if test "x$RADEON" = xyes; then
- 	AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
+@@ -411,7 +417,7 @@ else
+ 	AC_DEFINE(HAVE_RADEON, 0)
  fi
  
 -if test "x$AMDGPU" != xno; then
@@ -38,8 +38,8 @@
  	# Detect cunit library
  	PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
  	# If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
-@@ -399,7 +406,11 @@ if test "x$AMDGPU" = xyes; then
- 	AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support])
+@@ -436,7 +442,11 @@ if test "x$AMDGPU" = xyes; then
+ 	AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support])
  
  	if test "x$have_cunit" = "xno"; then
 -		AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
@@ -49,8 +49,5 @@
 +			AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
 +		fi
  	fi
- fi
- 
--- 
-2.1.4
-
+ else
+ 	AC_DEFINE(HAVE_AMDGPU, 0)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.83.bb b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.83.bb
deleted file mode 100644
index a5cb75c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.83.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Userspace interface to the kernel DRM services"
-DESCRIPTION = "The runtime library for accessing the kernel DRM services.  DRM \
-stands for \"Direct Rendering Manager\", which is the kernel portion of the \
-\"Direct Rendering Infrastructure\" (DRI).  DRI is required for many hardware \
-accelerated OpenGL drivers."
-HOMEPAGE = "http://dri.freedesktop.org"
-SECTION = "x11/base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
-PROVIDES = "drm"
-DEPENDS = "libpthread-stubs libpciaccess"
-
-SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
-           file://installtests.patch \
-           file://fix_O_CLOEXEC_undeclared.patch \
-           file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
-          "
-
-SRC_URI[md5sum] = "23800953ed7564988872e1e8c61fde31"
-SRC_URI[sha256sum] = "03a52669da60ead62548a35bc430aafb6c2d8dd21ec9dba3a90f96eff5fe36d6"
-
-inherit autotools pkgconfig manpages
-
-EXTRA_OECONF += "--disable-cairo-tests \
-                 --without-cunit \
-                 --enable-omap-experimental-api \
-                 --enable-etnaviv-experimental-api \
-                 --enable-install-test-programs \
-                 --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}-etnaviv"
-
-RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
-                             ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
-                             ${PN}-etnaviv"
-
-FILES_${PN}-tests = "${bindir}/*"
-FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
-FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
-FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
-FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
-FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
-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/drm/libdrm_2.4.91.bb b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.91.bb
new file mode 100644
index 0000000..c490285
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.91.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Userspace interface to the kernel DRM services"
+DESCRIPTION = "The runtime library for accessing the kernel DRM services.  DRM \
+stands for \"Direct Rendering Manager\", which is the kernel portion of the \
+\"Direct Rendering Infrastructure\" (DRI).  DRI is required for many hardware \
+accelerated OpenGL drivers."
+HOMEPAGE = "http://dri.freedesktop.org"
+SECTION = "x11/base"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
+PROVIDES = "drm"
+DEPENDS = "libpthread-stubs libpciaccess"
+
+SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
+           file://installtests.patch \
+           file://fix_O_CLOEXEC_undeclared.patch \
+           file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
+          "
+
+SRC_URI[md5sum] = "23d87cda92700b710a37d9b8edaa9f54"
+SRC_URI[sha256sum] = "634a0ed0cc1eff06f48674b1da81aafa661a9f001e7a4f43dde81076886dc800"
+
+inherit autotools pkgconfig manpages
+
+EXTRA_OECONF += "--disable-cairo-tests \
+                 --without-cunit \
+                 --enable-omap-experimental-api \
+                 --enable-etnaviv-experimental-api \
+                 --enable-install-test-programs \
+                 --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}-etnaviv"
+
+RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
+                             ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
+                             ${PN}-etnaviv"
+
+FILES_${PN}-tests = "${bindir}/*"
+FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
+FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
+FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
+FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
+FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
+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/fontconfig/fontconfig/0001-src-fcxml.c-avoid-double-free-of-filename.patch b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-src-fcxml.c-avoid-double-free-of-filename.patch
new file mode 100644
index 0000000..3ca9fde
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-src-fcxml.c-avoid-double-free-of-filename.patch
@@ -0,0 +1,28 @@
+From a163c81ac430cdc292add200f3e6a0c048be4d7e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Oct 2017 17:40:09 +0300
+Subject: [PATCH] src/fcxml.c: avoid double free() of filename
+
+It's also freed after bail1, so no need to do it here.
+
+Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=103221]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/fcxml.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/fcxml.c b/src/fcxml.c
+index 19ce96a..edb6054 100644
+--- a/src/fcxml.c
++++ b/src/fcxml.c
+@@ -3398,7 +3398,6 @@ FcConfigParseAndLoad (FcConfig	    *config,
+ 
+     fd = FcOpen ((char *) filename, O_RDONLY);
+     if (fd == -1) {
+-	FcStrFree (filename);
+ 	goto bail1;
+     }
+ 
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.4.bb
deleted file mode 100644
index a058b35..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.4.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Generic font configuration library"
-DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
-does not depend on the X Window System. It is designed to locate \
-fonts within the system and select them according to requirements \
-specified by applications. \
-Fontconfig is not a rasterization library, nor does it impose a \
-particular rasterization library on the application. The X-specific \
-library 'Xft' uses fontconfig along with freetype to specify and \
-rasterize fonts."
-
-HOMEPAGE = "http://www.fontconfig.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
-
-LICENSE = "MIT-style & MIT & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
-                    file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
-                    file://src/fccache.c;beginline=1367;endline=1382;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
-
-SECTION = "libs"
-
-DEPENDS = "expat freetype zlib gperf-native"
-
-SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
-           file://revert-static-pkgconfig.patch \
-           "
-SRC_URI[md5sum] = "4fb01fc3f41760c41c69e37cc784b658"
-SRC_URI[sha256sum] = "fd5a6a663f4c4a00e196523902626654dd0c4a78686cbc6e472f338e50fdf806"
-
-do_configure_prepend() {
-    # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
-    rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
-}
-
-PACKAGES =+ "fontconfig-utils"
-FILES_${PN} =+ "${datadir}/xml/*"
-FILES_fontconfig-utils = "${bindir}/*"
-
-# Work around past breakage in debian.bbclass
-RPROVIDES_fontconfig-utils = "libfontconfig-utils"
-RREPLACES_fontconfig-utils = "libfontconfig-utils"
-RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
-DEBIAN_NOAUTONAME_fontconfig-utils = "1"
-
-inherit autotools pkgconfig relative_symlinks
-
-FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
-
-# comma separated list of additional directories
-# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
-FONTCONFIG_FONT_DIRS ?= "no"
-
-EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb
new file mode 100644
index 0000000..d4cbce8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb
@@ -0,0 +1,58 @@
+SUMMARY = "Generic font configuration library"
+DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
+does not depend on the X Window System. It is designed to locate \
+fonts within the system and select them according to requirements \
+specified by applications. \
+Fontconfig is not a rasterization library, nor does it impose a \
+particular rasterization library on the application. The X-specific \
+library 'Xft' uses fontconfig along with freetype to specify and \
+rasterize fonts."
+
+HOMEPAGE = "http://www.fontconfig.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
+
+LICENSE = "MIT-style & MIT & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
+                    file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
+                    file://src/fccache.c;beginline=1367;endline=1382;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
+
+SECTION = "libs"
+
+DEPENDS = "expat freetype zlib gperf-native"
+
+SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
+           file://revert-static-pkgconfig.patch \
+           file://0001-src-fcxml.c-avoid-double-free-of-filename.patch \
+           "
+
+SRC_URI[md5sum] = "00e748c67fad11e7057a71ed385e8bdb"
+SRC_URI[sha256sum] = "064b9ebf060c9e77011733ac9dc0e2ce92870b574cca2405e11f5353a683c334"
+
+UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
+
+do_configure_prepend() {
+    # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
+    rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
+}
+
+PACKAGES =+ "fontconfig-utils"
+FILES_${PN} =+ "${datadir}/xml/*"
+FILES_fontconfig-utils = "${bindir}/*"
+
+# Work around past breakage in debian.bbclass
+RPROVIDES_fontconfig-utils = "libfontconfig-utils"
+RREPLACES_fontconfig-utils = "libfontconfig-utils"
+RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
+DEBIAN_NOAUTONAME_fontconfig-utils = "1"
+
+inherit autotools pkgconfig relative_symlinks
+
+FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
+
+# comma separated list of additional directories
+# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
+FONTCONFIG_FONT_DIRS ?= "no"
+
+EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.8.bb
deleted file mode 100644
index 8e88e84..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.8.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Freetype font rendering library"
-DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
-highly customizable, and portable while capable of producing high-quality output (glyph \
-images). It can be used in graphics libraries, display servers, font conversion tools, text \
-image generation tools, and many other products as well."
-HOMEPAGE = "http://www.freetype.org/"
-BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
-SECTION = "libs"
-
-LICENSE = "FreeType | GPLv2+"
-LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
-                    file://docs/FTL.TXT;md5=13b25413274c9b3b09b63e4028216ff4 \
-                    file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
-           file://use-right-libtool.patch"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
-
-SRC_URI[md5sum] = "2413ac3eaf508ada019c63959ea81a92"
-SRC_URI[sha256sum] = "a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b"
-
-inherit autotools pkgconfig binconfig-disabled multilib_header
-
-# Adapt autotools to work with the minimal autoconf usage in freetype
-AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
-CONFIGURE_SCRIPT = "${S}/configure"
-EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
-
-PACKAGECONFIG ??= "zlib"
-
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-# harfbuzz results in a circular dependency so enabling is non-trivial
-PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
-PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
-
-TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
-
-do_install_append() {
-	oe_multilib_header freetype2/freetype/config/ftconfig.h
-}
-
-BINCONFIG = "${bindir}/freetype-config"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.9.bb
new file mode 100644
index 0000000..da05916
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.9.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Freetype font rendering library"
+DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
+highly customizable, and portable while capable of producing high-quality output (glyph \
+images). It can be used in graphics libraries, display servers, font conversion tools, text \
+image generation tools, and many other products as well."
+HOMEPAGE = "http://www.freetype.org/"
+BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
+SECTION = "libs"
+
+LICENSE = "FreeType | GPLv2+"
+LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
+                    file://docs/FTL.TXT;md5=9f37b4e6afa3fef9dba8932b16bd3f97 \
+                    file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
+           file://use-right-libtool.patch"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
+UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
+
+SRC_URI[md5sum] = "513c403c110016fdc7e537216a642b1d"
+SRC_URI[sha256sum] = "e6ffba3c8cef93f557d1f767d7bc3dee860ac7a3aaff588a521e081bc36f4c8a"
+
+inherit autotools pkgconfig binconfig-disabled multilib_header
+
+# Adapt autotools to work with the minimal autoconf usage in freetype
+AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
+CONFIGURE_SCRIPT = "${S}/configure"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
+
+PACKAGECONFIG ??= "zlib"
+
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+# harfbuzz results in a circular dependency so enabling is non-trivial
+PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
+PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+
+EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
+
+TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
+
+do_install_append() {
+	oe_multilib_header freetype2/freetype/config/ftconfig.h
+}
+
+BINCONFIG = "${bindir}/freetype-config"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb
index 9e09cd2..69f2178 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fstests/fstests_git.bb
@@ -8,7 +8,7 @@
 PV = "0.1+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 LIC_FILES_CHKSUM = "file://test-pango-gdk.c;endline=24;md5=1ee74ec851ecda57eb7ac6cc180f7655"
 
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
deleted file mode 100644
index f2ab756..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "OpenGL extension loading library"
-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"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
-           file://no-strip.patch"
-
-SRC_URI[md5sum] = "2a2cd7c98f13854d2fcddae0d2b20411"
-SRC_URI[sha256sum] = "c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
-UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
-
-inherit lib_package pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-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"
-
-CFLAGS += "-D_GNU_SOURCE"
-# 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}' \
-                GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
-                LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
-
-do_compile() {
-	oe_runmake
-}
-
-do_install() {
-	oe_runmake 'DESTDIR=${D}' install.all
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.1.0.bb
new file mode 100644
index 0000000..be725e0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.1.0.bb
@@ -0,0 +1,44 @@
+SUMMARY = "OpenGL extension loading library"
+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"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
+           file://no-strip.patch"
+
+SRC_URI[md5sum] = "b2ab12331033ddfaa50dc39345343980"
+SRC_URI[sha256sum] = "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
+UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit lib_package pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+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"
+
+CFLAGS += "-D_GNU_SOURCE"
+# 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}' \
+                GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
+                LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
+
+do_compile() {
+	oe_runmake
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install.all
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bb
deleted file mode 100644
index 4f5e5a3..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Text shaping library"
-DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
-                    file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
-"
-
-DEPENDS = "glib-2.0 cairo fontconfig freetype"
-
-SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "d1aa446e1e65717311c15d9ac0cf31ee"
-SRC_URI[sha256sum] = "ccec4930ff0bb2d0c40aee203075447954b64a8c2695202413cc5e428c907131"
-
-inherit autotools pkgconfig lib_package gtk-doc
-
-PACKAGECONFIG ??= "icu"
-PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
-
-EXTRA_OECONF = " \
-    --with-cairo \
-    --with-fontconfig \
-    --with-freetype \
-    --with-glib \
-    --without-graphite2 \
-"
-
-PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
-
-FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
-FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
-                       ${libdir}/libharfbuzz-icu.so \
-                       ${libdir}/pkgconfig/harfbuzz-icu.pc \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.7.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.7.5.bb
new file mode 100644
index 0000000..0a9b029
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.7.5.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Text shaping library"
+DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
+                    file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
+"
+
+DEPENDS = "glib-2.0 cairo fontconfig freetype"
+
+SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "1466ab51fc5aaa6af4065936939cec62"
+SRC_URI[sha256sum] = "84574e1b1f65ca694cb8fb6905309665c0368af18a312357f8ff886ee2f29563"
+
+inherit autotools pkgconfig lib_package gtk-doc
+
+PACKAGECONFIG ??= "icu"
+PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
+
+EXTRA_OECONF = " \
+    --with-cairo \
+    --with-fontconfig \
+    --with-freetype \
+    --with-glib \
+    --without-graphite2 \
+"
+
+PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
+
+FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
+FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
+                       ${libdir}/libharfbuzz-icu.so \
+                       ${libdir}/pkgconfig/harfbuzz-icu.pc \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.2.bb
deleted file mode 100644
index 58646d3..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.2.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Hardware accelerated JPEG compression/decompression library"
-DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
-HOMEPAGE = "http://libjpeg-turbo.org/"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=05bab7c7ad899d85bfba60da1a1271f2 \
-                    file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
-                    file://djpeg.c;endline=11;md5=b90b6d2b4119f9e5807cd273f525d2af \
-"
-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] = "6b4923e297a7eaa255f08511017a8818"
-SRC_URI[sha256sum] = "9098943b270388727ae61de82adec73cf9f0dbb240b3bc8b172595ebf405b528"
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
-UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
-
-PE= "1"
-
-# Drop-in replacement for jpeg
-PROVIDES = "jpeg"
-RPROVIDES_${PN} += "jpeg"
-RREPLACES_${PN} += "jpeg"
-RCONFLICTS_${PN} += "jpeg"
-
-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)}"
-
-# Work around missing non-floating point ABI support in MIPS
-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)}"
-
-PACKAGES =+ "jpeg-tools libturbojpeg"
-
-DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality.  These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
-FILES_jpeg-tools = "${bindir}/*"
-
-DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
-FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
new file mode 100644
index 0000000..50a5ae0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Hardware accelerated JPEG compression/decompression library"
+DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
+HOMEPAGE = "http://libjpeg-turbo.org/"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=8184bcc7c4ac7b9edc6a7bc00f231d0b \
+                    file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
+                    file://djpeg.c;endline=11;md5=c59e19811c006cb38f82d6477134d314 \
+"
+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] = "7c82f0f6a3130ec06b8a4d0b321cbca3"
+SRC_URI[sha256sum] = "b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
+UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
+
+PE= "1"
+
+# Drop-in replacement for jpeg
+PROVIDES = "jpeg"
+RPROVIDES_${PN} += "jpeg"
+RREPLACES_${PN} += "jpeg"
+RCONFLICTS_${PN} += "jpeg"
+
+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)}"
+
+# Work around missing non-floating point ABI support in MIPS
+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)}"
+
+def get_build_time(d):
+    if d.getVar('SOURCE_DATE_EPOCH') != None:
+        import datetime
+        return " --with-build-date="+ datetime.datetime.fromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d")
+    return ""
+
+EXTRA_OECONF_append_class-target = "${@get_build_time(d)}"
+
+PACKAGES =+ "jpeg-tools libturbojpeg"
+
+DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality.  These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
+FILES_jpeg-tools = "${bindir}/*"
+
+DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
+FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
new file mode 100644
index 0000000..3605446
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
@@ -0,0 +1,116 @@
+From 761bf993ca55095f46380c0238583791c1797295 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
+Date: Tue, 11 Jul 2017 14:50:37 -0500
+Subject: [PATCH kmscube] Detect gst_bo_map/_unmap and use it (or avoid it)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Those functions are not available on libMali, thus breaking
+builds and creating havoc.
+
+Removing the specific parts of the code that deal with
+gbm_bo_map() and gbm_bo_unmap() renders the kmscube utility
+a little less useful, but still valuable.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Cc: Rob Clark <robdclark@gmail.com>
+Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
+
+Upstream-Status: Submitted [https://lists.freedesktop.org/archives/mesa-dev/2017-July/163020.html]
+---
+ Makefile.am   | 5 ++++-
+ configure.ac  | 3 +++
+ gst-decoder.c | 7 ++++++-
+ kmscube.c     | 4 ++++
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a36087d..ab4adbf 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,7 +43,6 @@ kmscube_SOURCES = \
+ 	common.c \
+ 	common.h \
+ 	cube-smooth.c \
+-	cube-tex.c \
+ 	drm-atomic.c \
+ 	drm-common.c \
+ 	drm-common.h \
+@@ -59,3 +58,7 @@ kmscube_LDADD += $(GST_LIBS)
+ kmscube_CFLAGS += $(GST_CFLAGS)
+ kmscube_SOURCES += cube-video.c gst-decoder.c
+ endif
++
++if ENABLE_GBM_MAP
++kmscube_SOURCES += cube-tex.c
++endif
+diff --git a/configure.ac b/configure.ac
+index 8397f7b..c7f1f4d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -65,5 +65,8 @@ if test "x$enable_gbm_modifiers" = xyes; then
+ 	AC_DEFINE(HAVE_GBM_MODIFIERS, 1, [Define if you can use GBM properties.])
+ fi
+ 
++AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], [])
++AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"])
++
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+diff --git a/gst-decoder.c b/gst-decoder.c
+index 2d6d581..b84980e 100644
+--- a/gst-decoder.c
++++ b/gst-decoder.c
+@@ -332,6 +332,7 @@ set_last_frame(struct decoder *dec, EGLImage frame, GstSample *samp)
+ 	dec->last_samp = samp;
+ }
+ 
++#if HAVE_GBM_BO_MAP
+ // TODO this could probably be a helper re-used by cube-tex:
+ static int
+ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+@@ -357,6 +358,7 @@ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+ 
+ 	return fd;
+ }
++#endif
+ 
+ static EGLImage
+ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+@@ -410,12 +412,15 @@ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+ 
+ 	if (is_dmabuf_mem) {
+ 		dmabuf_fd = dup(gst_dmabuf_memory_get_fd(mem));
+-	} else {
++	}
++#if HAVE_GBM_BO_MAP
++	else {
+ 		GstMapInfo map_info;
+ 		gst_buffer_map(buf, &map_info, GST_MAP_READ);
+ 		dmabuf_fd = buf_to_fd(dec->gbm, map_info.size, map_info.data);
+ 		gst_buffer_unmap(buf, &map_info);
+ 	}
++#endif
+ 
+ 	if (dmabuf_fd < 0) {
+ 		GST_ERROR("could not obtain DMABUF FD");
+diff --git a/kmscube.c b/kmscube.c
+index 3a2c4dd..276dc55 100644
+--- a/kmscube.c
++++ b/kmscube.c
+@@ -142,7 +142,11 @@ int main(int argc, char *argv[])
+ 	else if (mode == VIDEO)
+ 		egl = init_cube_video(gbm, video);
+ 	else
++#if HAVE_GBM_BO_MAP
+ 		egl = init_cube_tex(gbm, mode);
++#else
++		printf("gbm_bo_map() support missing\n");
++#endif
+ 
+ 	if (!egl) {
+ 		printf("failed to initialize EGL\n");
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb
index cab68ff..5b64ed6 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -7,8 +7,9 @@
 LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
 
 SRCREV = "0d8de4ce3a03f36af1817f9b0586d132ad2c5d2e"
-SRC_URI = "git://anongit.freedesktop.org/mesa/kmscube;branch=master;protocol=git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+SRC_URI = "git://anongit.freedesktop.org/mesa/kmscube;branch=master;protocol=git \
+    file://detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
deleted file mode 100644
index b929725..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Add fallback definition for EGL_CAST
-
-The EGL API update from d11104f introduced a dependency on the
-EGL_CAST() macro, provided by an updated eglplatform.h. Given that we
-don't provide eglplatform.h, add a fallback definition for if we're
-building against Mesa 17.0.x or similar.
-
-https://bugs.gentoo.org/show_bug.cgi?id=623926
-
-Upstream-Status: Backport [https://github.com/anholt/libepoxy/commit/ebe3a53db1c0bb34e1ca963b95d1f222115f93f8]
-
-Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-
-Index: libepoxy-1.4.3/src/gen_dispatch.py
-===================================================================
---- libepoxy-1.4.3.orig/src/gen_dispatch.py	2017-06-06 04:24:13.000000000 -0500
-+++ libepoxy-1.4.3/src/gen_dispatch.py	2017-11-06 12:45:43.594966473 -0600
-@@ -491,6 +491,15 @@
-             self.outln('#include "epoxy/gl.h"')
-             if self.target == "egl":
-                 self.outln('#include "EGL/eglplatform.h"')
-+                # Account for older eglplatform.h, which doesn't define
-+                # the EGL_CAST macro.
-+                self.outln('#ifndef EGL_CAST')
-+                self.outln('#if defined(__cplusplus)')
-+                self.outln('#define EGL_CAST(type, value) (static_cast<type>(value))')
-+                self.outln('#else')
-+                self.outln('#define EGL_CAST(type, value) ((type) (value))')
-+                self.outln('#endif')
-+                self.outln('#endif')
-         else:
-             # Add some ridiculous inttypes.h redefinitions that are
-             # from khrplatform.h and not included in the XML.  We
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch
new file mode 100644
index 0000000..d2b6c1a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch
@@ -0,0 +1,33 @@
+Add option to disable tests.
+
+Upstream-Status: Submitted (https://github.com/anholt/libepoxy/pull/158)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/meson.build b/meson.build
+index b2ebaef..9632c7a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -242,7 +242,10 @@ libepoxy_inc = [
+ 
+ subdir('include/epoxy')
+ subdir('src')
+-subdir('test')
++
++if get_option('tests')
++  subdir('test')
++endif
+ 
+ if get_option('docs')
+   doxygen = find_program('doxygen', required: false)
+diff --git a/meson_options.txt b/meson_options.txt
+index b5d7c98..dc30e68 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -15,3 +15,7 @@ option('x11',
+        type: 'boolean',
+        value: true,
+        description: 'Enable X11 support (GLX or EGL-X11)')
++option('tests',
++       type: 'boolean',
++       value: true,
++       description: 'Build the test suite')
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
deleted file mode 100644
index 0172322..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
+++ /dev/null
@@ -1,22 +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 = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
-           file://Add-fallback-definition-for-EGL-CAST.patch"
-SRC_URI[md5sum] = "af4c3ce0fb1143bdc4e43f85695a9bed"
-SRC_URI[sha256sum] = "0b808a06c9685a62fca34b680abb8bc7fb2fda074478e329b063c1f872b826f6"
-UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
-
-inherit autotools pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "util-macros"
-
-PACKAGECONFIG[egl] = "--enable-egl, --disable-egl, virtual/egl"
-PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
new file mode 100644
index 0000000..5ca0868
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
@@ -0,0 +1,23 @@
+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/${PV}/${BP}.tar.xz \
+           file://no-tests.patch \
+           "
+SRC_URI[md5sum] = "63fe3847789258254dcd7e3fdb9e7f5e"
+SRC_URI[sha256sum] = "4c94995398a6ebf691600dda2e9685a0cac261414175c2adf4645cdfab42a5d5"
+UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
+
+inherit meson pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl"
+PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
+
+EXTRA_OEMESON += "-Dtests=false"
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
deleted file mode 100644
index efc8418..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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/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
deleted file mode 100644
index 7837315..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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
deleted file mode 100644
index 1520bcf..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-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/linkage.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
deleted file mode 100644
index 60185b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-When building use the libtool intermediate .lo files instead of explicitly using
-the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is
-a static build, and .libs/foo.o is a shared build.
-
-If static libraries have been disabled globally then libtool won't generate them
-and explicit references to foo.o won't be satisfied.
-
-Upstream-Status: Pending
-RP
-2016/1/16
-
-
-Index: SDL2-2.0.4/configure.in
-===================================================================
---- SDL2-2.0.4.orig/configure.in
-+++ SDL2-2.0.4/configure.in
-@@ -3464,23 +3464,23 @@ done
- 
- VERSION_OBJECTS=`echo $VERSION_SOURCES`
- VERSION_DEPENDS=`echo $VERSION_SOURCES`
--VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
-+VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
- VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
--\\$(objects)/\\2.o: \\1/\\2.rc\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.rc\\\\
- 	\\$(WINDRES) \\$< \\$@,g"`
- 
- SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
- SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
--SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
-+SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
- SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
--\\$(objects)/\\2.o: \\1/\\2.c\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- 	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
- 
- SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
- SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
--SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
-+SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
- SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
--\\$(objects)/\\2.o: \\1/\\2.c\\\\
-+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- 	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
- 
- # Set runtime shared library paths as needed
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
deleted file mode 100644
index 12d3aaf..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-SUMMARY = "Simple DirectMedia Layer"
-DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
-library designed to provide low level access to audio, keyboard, mouse, \
-joystick, 3D hardware via OpenGL, and 2D video framebuffer."
-HOMEPAGE = "http://www.libsdl.org"
-BUGTRACKER = "http://bugzilla.libsdl.org/"
-
-SECTION = "libs"
-
-LICENSE = "Zlib"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=b2304ad7e91711027590d3f102a754b7"
-
-PROVIDES = "virtual/libsdl2"
-
-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-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] = "d4055424d556b4a908aa76fad63abd3c"
-SRC_URI[sha256sum] = "442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785"
-
-inherit autotools lib_package binconfig pkgconfig
-
-EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
-                --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
-                --disable-video-dummy \
-                --enable-pthreads \
-                --enable-sdl-dlopen \
-                --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.filter('DISTRO_FEATURES', 'opengl', d)}"
-
-PACKAGECONFIG ??= " \
-    ${PACKAGECONFIG_GL} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
-"
-PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
-PACKAGECONFIG[directfb]   = "--enable-video-directfb,--disable-video-directfb,directfb"
-PACKAGECONFIG[gles2]      = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
-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-native wayland wayland-protocols libxkbcommon"
-PACKAGECONFIG[x11]        = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
-
-EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
-
-do_configure_prepend() {
-        # Remove old libtool macros.
-        MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
-        for i in ${MACROS}; do
-               rm -f ${S}/acinclude/$i
-        done
-        export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
-}
-
-FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
new file mode 100644
index 0000000..c0cf70d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
@@ -0,0 +1,65 @@
+SUMMARY = "Simple DirectMedia Layer"
+DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
+library designed to provide low level access to audio, keyboard, mouse, \
+joystick, 3D hardware via OpenGL, and 2D video framebuffer."
+HOMEPAGE = "http://www.libsdl.org"
+BUGTRACKER = "http://bugzilla.libsdl.org/"
+
+SECTION = "libs"
+
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=02ee26814dd044bd7838ae24e05b880f"
+
+PROVIDES = "virtual/libsdl2"
+
+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 \
+"
+
+S = "${WORKDIR}/SDL2-${PV}"
+
+SRC_URI[md5sum] = "3800d705cef742c6a634f202c37f263f"
+SRC_URI[sha256sum] = "edc77c57308661d576e843344d8638e025a7818bff73f8fbfab09c3c5fd092ec"
+
+inherit autotools lib_package binconfig pkgconfig
+
+EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
+                --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+                --disable-video-dummy \
+                --enable-pthreads \
+                --enable-sdl-dlopen \
+                --disable-rpath \
+                "
+
+# 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.filter('DISTRO_FEATURES', 'opengl', d)}"
+
+PACKAGECONFIG ??= " \
+    ${PACKAGECONFIG_GL} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
+"
+PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
+PACKAGECONFIG[directfb]   = "--enable-video-directfb,--disable-video-directfb,directfb"
+PACKAGECONFIG[gles2]      = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
+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-native wayland wayland-protocols libxkbcommon"
+PACKAGECONFIG[x11]        = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
+
+EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
+
+do_configure_prepend() {
+        # Remove old libtool macros.
+        MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
+        for i in ${MACROS}; do
+               rm -f ${S}/acinclude/$i
+        done
+        export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
+}
+
+FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_1.8.3.bb
deleted file mode 100644
index c082c18..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_1.8.3.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "libva-utils is a collection of utilities from libva project"
-
-DESCRIPTION = "libva-utils is a collection of utilities \
-and examples to exercise VA-API in accordance with the libva \
-project.VA-API is an open-source library and API specification, \
-which provides access to graphics hardware acceleration capabilities \
-for video processing. It consists of a main library and driver-specific \
-acceleration backends for each supported hardware vendor"
-
-HOMEPAGE = "https://01.org/linuxmedia/vaapi"
-BUGTRACKER = "https://github.com/01org/libva-utils/issues"
-
-SECTION = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
-
-SRC_URI = "git://github.com/01org/libva-utils.git;branch=v1.8-branch"
-SRCREV = "011c709b98b52db3b10aeb361dfea9da43930364"
-UPSTREAM_CHECK_URI = "https://github.com/01org/libva-utils/releases"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-S = "${WORKDIR}/git"
-
-DEPENDS = "libva"
-
-inherit autotools pkgconfig distro_features_check
-
-# depends on libva which requires opengl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-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"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_2.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_2.1.0.bb
new file mode 100644
index 0000000..a8018ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva-utils_2.1.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "libva-utils is a collection of utilities from libva project"
+
+DESCRIPTION = "libva-utils is a collection of utilities \
+and examples to exercise VA-API in accordance with the libva \
+project.VA-API is an open-source library and API specification, \
+which provides access to graphics hardware acceleration capabilities \
+for video processing. It consists of a main library and driver-specific \
+acceleration backends for each supported hardware vendor"
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/intel/libva-utils/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+SRC_URI[md5sum] = "6649be70390606651cb636320bfd43c6"
+SRC_URI[sha256sum] = "f6a7790c3dcc56537372c90a83036a3136194a8b397e84e97bf9cc9254fa2c51"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva-utils/releases"
+
+DEPENDS = "libva"
+
+inherit autotools pkgconfig distro_features_check
+
+# depends on libva which requires opengl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+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"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.8.3.bb
deleted file mode 100644
index ceeda84..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.8.3.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-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.8-branch "
-SRCREV = "457470987cc9df5976ce8c72ffd4bfbd9baaf0f9"
-UPSTREAM_CHECK_GITTAGREGEX = "^(?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 = "ac_cv_prog_WAYLAND_SCANNER=wayland-scanner"
-
-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/libva/libva_2.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_2.1.0.bb
new file mode 100644
index 0000000..d3cf633
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_2.1.0.bb
@@ -0,0 +1,46 @@
+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/intel/libva/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "9d6e4f1d36c407566343e9dde5a972b8"
+SRC_URI[sha256sum] = "f3fa953a11d3210c3a4ee79031abdbe0863d5ce13d9b3f93f315f1eec60a4b0f"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
+
+DEPENDS = "libdrm virtual/mesa"
+
+inherit autotools pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+EXTRA_OECONF = "ac_cv_prog_WAYLAND_SCANNER=wayland-scanner"
+
+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}-glx ${PN}-wayland"
+
+RDEPENDS_${PN}-x11 =+ "${PN}"
+RDEPENDS_${PN}-glx =+ "${PN}-x11"
+
+FILES_${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}"
+FILES_${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}"
+FILES_${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
index bd1e863..f908d46 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
@@ -20,17 +20,18 @@
 
 explictly add EXPAT_LIBS to intel's VULKAN_LIB_DEPS
 
-Upstream-Status: Submitted [mesa-dev@lists.freedesktop.org]
+Upstream-Status: Accepted
+https://cgit.freedesktop.org/mesa/mesa/commit/?id=05fc62d89f59ce19a18bfd4e63a09624910d6caf
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
  src/intel/Makefile.vulkan.am | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am
-index 271b0a5..8fbe2c8 100644
---- a/src/intel/Makefile.vulkan.am
-+++ b/src/intel/Makefile.vulkan.am
+Index: mesa-17.3.6/src/intel/Makefile.vulkan.am
+===================================================================
+--- mesa-17.3.6.orig/src/intel/Makefile.vulkan.am
++++ mesa-17.3.6/src/intel/Makefile.vulkan.am
 @@ -144,6 +144,7 @@ VULKAN_LIB_DEPS = \
  	$(LIBDRM_LIBS) \
  	$(PTHREAD_LIBS) \
@@ -38,7 +39,4 @@
 +	$(EXPAT_LIBS) \
  	-lm
  
- if HAVE_PLATFORM_X11
--- 
-2.7.4
-
+ if HAVE_PLATFORM_ANDROID
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
index eb6ff4f..2444b28 100644
--- 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
@@ -14,12 +14,12 @@
  configure.ac | 7 +------
  1 file changed, 1 insertion(+), 6 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index 2c7e636fac..d2b2350739 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2174,12 +2174,7 @@ if test "x$with_platforms" != xauto; then
-     with_egl_platforms=$with_platforms
+Index: mesa-17.3.6/configure.ac
+===================================================================
+--- mesa-17.3.6.orig/configure.ac
++++ mesa-17.3.6/configure.ac
+@@ -1694,12 +1694,7 @@ if test "x$with_platforms" = xauto; then
+     with_platforms=$with_egl_platforms
  fi
  
 -PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
@@ -30,8 +30,5 @@
 -fi
 +AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
  
- # Do per-EGL platform setups and checks
- egl_platforms=`IFS=', '; echo $with_egl_platforms`
--- 
-2.13.0
-
+ PKG_CHECK_EXISTS([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], [have_wayland_protocols=yes], [have_wayland_protocols=no])
+ if test "x$have_wayland_protocols" = xyes; then
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
deleted file mode 100644
index b27a3bc..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9861437e58fdd0de01193a102608d34e5952953f Mon Sep 17 00:00:00 2001
-From: Christoph Haag <haagch+mesadev@frickel.club>
-Date: Thu, 20 Apr 2017 10:34:18 +0200
-Subject: [PATCH 1/2] ac: fix build after LLVM 5.0 SVN r300718
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-v2: previously getWithDereferenceableBytes() exists, but addAttr() doesn't take that type
-
-Signed-off-by: Christoph Haag <haagch+mesadev@frickel.club>
-Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
-Tested-and-reviewed-by: Mike Lothian <mike@fireburn.co.uk>
----
-Upstream-Status: Backport
-
- src/amd/common/ac_llvm_helper.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp
-index d9ea4b1..11fa809 100644
---- a/src/amd/common/ac_llvm_helper.cpp
-+++ b/src/amd/common/ac_llvm_helper.cpp
-@@ -44,9 +44,13 @@ typedef AttributeSet AttributeList;
- void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
- {
-    llvm::Argument *A = llvm::unwrap<llvm::Argument>(val);
-+#if HAVE_LLVM < 0x0500
-    llvm::AttrBuilder B;
-    B.addDereferenceableAttr(bytes);
-    A->addAttr(llvm::AttributeList::get(A->getContext(), A->getArgNo() + 1,  B));
-+#else
-+   A->addAttr(llvm::Attribute::getWithDereferenceableBytes(A->getContext(), bytes));
-+#endif
- }
- 
- bool ac_is_sgpr_param(LLVMValueRef arg)
--- 
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-configure.ac-Always-check-for-expat.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-configure.ac-Always-check-for-expat.patch
deleted file mode 100644
index 4753c49..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-configure.ac-Always-check-for-expat.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 1f7d752193f02d15d5923cee992e8f46d4c6df1b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Mon, 28 Aug 2017 13:51:49 +0300
-Subject: [PATCH] configure.ac: Always check for expat
-
-expat was not checked if dri was not built leading to build failure
-in vulkan driver: backport a fix (a combination of multiple commits
-that should end up in 17.3).
-
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index fd346c8aa2..662faecefa 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1777,6 +1777,12 @@ if test "x$with_dri_drivers" = xno; then
-     with_dri_drivers=''
- fi
- 
-+# Check for expat
-+PKG_CHECK_MODULES([EXPAT], [expat])
-+PKG_CHECK_MODULES([EXPAT], [expat],,
-+    [PKG_CHECK_MODULES([EXPAT], [expat21])]
-+)
-+
- dnl If $with_dri_drivers is yes, drivers will be added through
- dnl platform checks. Set DEFINES and LIB_DEPS
- if test "x$enable_dri" = xyes; then
-@@ -1810,15 +1816,6 @@ if test "x$enable_dri" = xyes; then
-         with_dri_drivers="i915 i965 nouveau r200 radeon swrast"
-     fi
- 
--    # Check for expat
--    PKG_CHECK_MODULES([EXPAT], [expat], [],
--        # expat version 2.0 and earlier do not provide expat.pc
--        [AC_CHECK_HEADER([expat.h],[],
--                         [AC_MSG_ERROR([Expat headers required for DRI not found])])
--         AC_CHECK_LIB([expat],[XML_ParserCreate],[],
--                     [AC_MSG_ERROR([Expat library required for DRI not found])])
--         EXPAT_LIBS="-lexpat"])
--
-     # put all the necessary libs together
-     DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
- fi
--- 
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch
new file mode 100644
index 0000000..6aba785
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch
@@ -0,0 +1,43 @@
+From 4cbecb61682a0ee426faaa03d824fc8fd7aef826 Mon Sep 17 00:00:00 2001
+From: Daniel Stone <daniels@collabora.com>
+Date: Mon, 2 Apr 2018 13:20:34 +0100
+Subject: [PATCH] st/dri: Initialise modifier to INVALID for DRI2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When allocating a buffer for DRI2, set the modifier to INVALID to inform
+the backend that we have no supplied modifiers and it should do its own
+thing. The missed initialisation forced linear, even if the
+implementation had made other decisions.
+
+This resulted in VC4 DRI2 clients failing with:
+  Modifier 0x0 vs. tiling (0x700000000000001) mismatch
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+Reported-by: Andreas Müller <schnitzeltony@gmail.com>
+Reviewed-by: Eric Anholt <eric@anholt.net>
+Fixes: 3f8513172ff6 ("gallium/winsys/drm: introduce modifier field to winsys_handle")
+
+Upstream-Status: Backport [1]
+
+[1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=4cbecb61682a0ee426faaa03d824fc8fd7aef826
+---
+ src/gallium/state_trackers/dri/dri2.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
+index 31d17d46c2..58a6757f03 100644
+--- a/src/gallium/state_trackers/dri/dri2.c
++++ b/src/gallium/state_trackers/dri/dri2.c
+@@ -806,6 +806,7 @@ dri2_allocate_textures(struct dri_context *ctx,
+          whandle.handle = buf->name;
+          whandle.stride = buf->pitch;
+          whandle.offset = 0;
++         whandle.modifier = DRM_FORMAT_MOD_INVALID;
+          if (screen->can_share_buffer)
+             whandle.type = DRM_API_HANDLE_TYPE_SHARED;
+          else
+-- 
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch
deleted file mode 100644
index ac8caec..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From a02a0dfda2712d30ad62b8f0421ec7b8244ba2cb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
-Date: Wed, 10 May 2017 17:26:07 +0900
-Subject: [PATCH 2/2] gallivm: Fix build against LLVM SVN >= r302589
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-deregisterEHFrames doesn't take any parameters anymore.
-
-Reviewed-by: Vedran Miletić <vedran@miletic.net>
-Reviewed-by: Marek Olšák <marek.olsak@amd.com>
----
-Upstream-Status: Backport
-
- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
-index 2a388cb..0e4a531 100644
---- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
-+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
-@@ -342,14 +342,20 @@ class DelegatingJITMemoryManager : public BaseMemoryManager {
-       virtual void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
-          mgr()->registerEHFrames(Addr, LoadAddr, Size);
-       }
--      virtual void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
--         mgr()->deregisterEHFrames(Addr, LoadAddr, Size);
--      }
- #else
-       virtual void registerEHFrames(llvm::StringRef SectionData) {
-          mgr()->registerEHFrames(SectionData);
-       }
- #endif
-+#if HAVE_LLVM >= 0x0500
-+      virtual void deregisterEHFrames() {
-+         mgr()->deregisterEHFrames();
-+      }
-+#elif HAVE_LLVM >= 0x0304
-+      virtual void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {
-+         mgr()->deregisterEHFrames(Addr, LoadAddr, Size);
-+      }
-+#endif
-       virtual void *getPointerToNamedFunction(const std::string &Name,
-                                               bool AbortOnFailure=true) {
-          return mgr()->getPointerToNamedFunction(Name, AbortOnFailure);
--- 
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/Use-Python-3-to-execute-the-scripts.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/Use-Python-3-to-execute-the-scripts.patch
new file mode 100644
index 0000000..0b4aabf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/Use-Python-3-to-execute-the-scripts.patch
@@ -0,0 +1,32 @@
+From 18c3e684a8259a0644214f88c7ead7fa31573fd9 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Fri, 29 Dec 2017 10:27:59 -0200
+Subject: [PATCH] Use Python 3 to execute the scripts
+Organization: O.S. Systems Software LTDA.
+
+The MESA build system uses Python 2 but as OE-Core has moved away from
+it, we change it to use Python 3 instead.
+
+Upstream-Status: Inappropriate [ configuration ]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b107f04c2e..055546142d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,7 +114,7 @@ AC_PROG_CXX
+ AM_PROG_CC_C_O
+ AM_PROG_AS
+ AX_CHECK_GNU_MAKE
+-AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python])
++AC_CHECK_PROGS([PYTHON2], [python3.5 python3 python])
+ AC_PROG_SED
+ AC_PROG_MKDIR_P
+ 
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch
index aa33a1e..fd79991 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/llvm-config-version.patch
@@ -1,18 +1,24 @@
-When building llvm from git or svn it embeds the svn/git revision into internal version string
+From: Otavio Salvador <otavio@ossystems.com.br>
+Subject: [PATCH] Properly get LLVM version when using LLVM Git releases
 
-$ /mnt/a/oe/build/tmp/work/corei7-64-bec-linux/mesa/2_17.1.5-r0/recipe-sysroot/usr/lib/llvm5.0/llvm-config-host --version
+$ llvm-config-host --version
 5.0.0git-9a5c333388c
 
-We need to ignore everything after 5.0.0 which is what the cut cmd is doing
+We need to ignore everything after 5.0.0 which is what the cut cmd is
+doing
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
-Index: mesa-17.1.5/configure.ac
-===================================================================
---- mesa-17.1.5.orig/configure.ac
-+++ mesa-17.1.5/configure.ac
-@@ -967,7 +967,7 @@ strip_unwanted_llvm_flags() {
+diff --git a/configure.ac b/configure.ac
+index a02173f244..b107f04c2e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -995,7 +995,7 @@ strip_unwanted_llvm_flags() {
  
  llvm_set_environment_variables() {
      if test "x$LLVM_CONFIG" != xno; then
@@ -21,12 +27,15 @@
          LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
          LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
          LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
-@@ -2560,7 +2560,7 @@ if test "x$enable_llvm" = xyes; then
+@@ -2644,7 +2644,7 @@ detect_old_buggy_llvm() {
+     dnl ourselves.
      dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
-     if test "x$enable_llvm_shared_libs" = xyes; then
-         dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
--        LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
-+        LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version|cut -c1-5`
-         AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
+     dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
+-    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
++    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5`
+     AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
  
-         if test "x$llvm_have_one_so" = xyes; then
+     if test "x$llvm_have_one_so" = xyes; then
+-- 
+2.15.1
+
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
deleted file mode 100644
index 0280ee8..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-endianness check is OS wide and not specific to libc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-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
- 
--#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/files/vulkan-mkdir.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/vulkan-mkdir.patch
deleted file mode 100644
index 15ee5ee..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/vulkan-mkdir.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From c78979fd95a1c4f732f7e6edf0f32c524e5955b8 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 12 Jul 2017 17:10:07 +0100
-Subject: [PATCH] src/intel/Makefile.vulkan.am: create target directories when
- required
-
-In out-of-tree builds src/intel/vulkan won't exist, so always create it before
-writing into it.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- src/intel/Makefile.vulkan.am | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am
-index 3857a5dc62..26e9cd410c 100644
---- a/src/intel/Makefile.vulkan.am
-+++ b/src/intel/Makefile.vulkan.am
-@@ -44,11 +44,13 @@ EXTRA_DIST += \
- 	vulkan/TODO
- 
- vulkan/dev_icd.json : vulkan/dev_icd.json.in
-+	$(MKDIR_GEN)
- 	$(AM_V_GEN) $(SED) \
- 		-e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
- 		< $(srcdir)/vulkan/dev_icd.json.in > $@
- 
- vulkan/intel_icd.@host_cpu@.json : vulkan/intel_icd.json.in
-+	$(MKDIR_GEN)
- 	$(AM_V_GEN) $(SED) \
- 		-e "s#@install_libdir@#${libdir}#" \
- 		< $(srcdir)/vulkan/intel_icd.json.in > $@
--- 
-2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.1.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.3.8.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.1.7.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.3.8.bb
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 4f31ed2..b501b7e 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
@@ -16,9 +16,15 @@
 
 DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native"
 EXTRANATIVEPATH += "chrpath-native"
-PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa"
+PROVIDES = " \
+    ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
+    virtual/mesa \
+    "
 
-inherit autotools pkgconfig gettext distro_features_check
+inherit autotools pkgconfig python3native gettext distro_features_check
 
 ANY_OF_DISTRO_FEATURES = "opengl vulkan"
 
@@ -34,7 +40,7 @@
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
 		   "
 
@@ -45,7 +51,7 @@
 # "x11" requires "opengl"
 PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
 PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
-PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm"
+PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
 
 DRIDRIVERS = "swrast"
 DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
@@ -59,7 +65,7 @@
 VULKAN_DRIVERS = ""
 VULKAN_DRIVERS_append_x86 = ",intel"
 VULKAN_DRIVERS_append_x86-64 = ",intel"
-PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers"
+PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
 
 PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"
 
@@ -77,13 +83,13 @@
 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)}"
+GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
 GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 GALLIUMDRIVERS_append_x86 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
 GALLIUMDRIVERS_append_x86-64 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
 # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
 PACKAGECONFIG[gallium]      = "--enable-texture-float --with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
-MESA_LLVM_RELEASE ?= "5.0"
+MESA_LLVM_RELEASE ?= "6.0"
 PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \
                                ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
@@ -99,9 +105,6 @@
 
 CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
 
-# Multiple virtual/gl providers being built breaks staging
-EXCLUDE_FROM_WORLD = "1"
-
 # Remove the mesa dependency on mesa-dev, as mesa is empty
 RDEPENDS_${PN}-dev = ""
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.1.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.1.7.bb
deleted file mode 100644
index 39cfce9..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.1.7.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
-           file://replace_glibc_check_with_linux.patch \
-           file://disable-asm-on-non-gcc.patch \
-           file://0001-Use-wayland-scanner-in-the-path.patch \
-           file://0002-hardware-gloat.patch \
-           file://vulkan-mkdir.patch \
-           file://llvm-config-version.patch \
-           file://0001-ac-fix-build-after-LLVM-5.0-SVN-r300718.patch \
-           file://0002-gallivm-Fix-build-against-LLVM-SVN-r302589.patch \
-           file://0001-winsys-svga-drm-Include-sys-types.h.patch \
-           file://0001-configure.ac-Always-check-for-expat.patch \
-           file://0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch \
-           "
-SRC_URI[md5sum] = "e40bb428a263bd28cbf6478dae45b207"
-SRC_URI[sha256sum] = "69f472a874b1122404fa0bd13e2d6bf87eb3b9ad9c21d2f39872a96d83d9e5f5"
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
-    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
-        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
-    fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.3.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.3.8.bb
new file mode 100644
index 0000000..2d3fd3c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.3.8.bb
@@ -0,0 +1,23 @@
+require ${BPN}.inc
+
+SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
+           file://disable-asm-on-non-gcc.patch \
+	   file://Use-Python-3-to-execute-the-scripts.patch \
+           file://0001-Use-wayland-scanner-in-the-path.patch \
+           file://0002-hardware-gloat.patch \
+           file://llvm-config-version.patch \
+           file://0001-winsys-svga-drm-Include-sys-types.h.patch \
+           file://0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch \
+           file://0001-st-dri-Initialise-modifier-to-INVALID-for-DRI2.patch \
+           "
+
+SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
+SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+    fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
index 812da21..9e1626e 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
@@ -6,7 +6,7 @@
 They take precendence over our customized macros, and so
 introspection doesn't work correctly.
 
-Upstream-Status: Pending [review on oe-core list]
+Upstream-Status: Backport [upstream 5ccfe0]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
  acinclude.m4 | 96 ------------------------------------------------------------
@@ -118,4 +118,3 @@
 -])
 -- 
 2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.14.bb b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.14.bb
new file mode 100644
index 0000000..3bd9c64
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.14.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Framework for layout and rendering of internationalized text"
+DESCRIPTION = "Pango is a library for laying out and rendering of text, \
+with an emphasis on internationalization. Pango can be used anywhere \
+that text layout is needed, though most of the work on Pango so far has \
+been done in the context of the GTK+ widget toolkit. Pango forms the \
+core of text and font handling for GTK+-2.x."
+HOMEPAGE = "http://www.pango.org/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+SECTION = "libs"
+LICENSE = "LGPLv2.0+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
+
+inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://run-ptest \
+            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] = "18d7eb8d52e7e445e733c109ddaa7b78"
+SRC_URI[archive.sha256sum] = "90af1beaa7bf9e4c52db29ec251ec4fd0a8f2cc185d521ad1f88d01b3a6a17e3"
+
+DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
+
+EXTRA_OECONF = " \
+	        --disable-debug \
+	        "
+
+LEAD_SONAME = "libpango-1.0*"
+LIBV = "1.8.0"
+
+# This binary needs to be compiled for the host architecture.  This isn't pretty!
+do_compile_prepend_class-target () {
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
+		make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="${BUILD_LDFLAGS}" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
+	fi
+}
+
+FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
+FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
+
+RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
+
+RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
+                    pango-module-basic-fc pango-module-arabic-lang"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.6.bb
deleted file mode 100644
index 31c3d2a..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.6.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Framework for layout and rendering of internationalized text"
-DESCRIPTION = "Pango is a library for laying out and rendering of text, \
-with an emphasis on internationalization. Pango can be used anywhere \
-that text layout is needed, though most of the work on Pango so far has \
-been done in the context of the GTK+ widget toolkit. Pango forms the \
-core of text and font handling for GTK+-2.x."
-HOMEPAGE = "http://www.pango.org/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-SECTION = "libs"
-LICENSE = "LGPLv2.0+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://run-ptest \
-            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] = "507c6746fbf53fc9d48c577f1e265de3"
-SRC_URI[archive.sha256sum] = "ca152b7383a1e9f7fd74ae96023dc6770dc5043414793bfe768ff06b6759e573"
-
-DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
-
-EXTRA_AUTORECONF = ""
-
-EXTRA_OECONF = " \
-	        --disable-debug \
-	        "
-
-LEAD_SONAME = "libpango-1.0*"
-LIBV = "1.8.0"
-
-# This binary needs to be compiled for the host architecture.  This isn't pretty!
-do_compile_prepend_class-target () {
-	if ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
-		make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="${BUILD_LDFLAGS}" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
-	fi
-}
-
-FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
-FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
-
-RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
-
-RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
-                    pango-module-basic-fc pango-module-arabic-lang"
-
-BBCLASSEXTEND = "native"
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 d274a8f..b936ad8 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
@@ -6,10 +6,10 @@
            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 \
            "
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
-# From 2017-07-03
-SRCREV = "c8f4fd9eeb298a2ef0855927f22634f794ef3eff"
+# From 2018-02-26
+SRCREV = "4ce0887e2f7f848d2be2e435a2d0f3c80e44ea3b"
 # (when PV goes above 1.0 remove the trailing r)
 PV = "1.0+gitr${SRCPV}"
 
@@ -40,14 +40,12 @@
    fi
 }
 
-do_install() {
-	oe_runmake -C ${B} 'DESTDIR=${D}' install/strip
-}
+OECMAKE_TARGET_INSTALL = "install/strip"
 
 RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
-	python3-subprocess python3-misc python3-importlib \
+	python3-misc \
 	python3-unixadmin python3-xml python3-multiprocessing \
-	python3-six python3-shell python3-io python3-argparse \
+	python3-six python3-shell python3-io \
 	python3-netserver mesa-demos bash \
 	"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
index b2e4cef..70b32cf 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
@@ -13,26 +13,20 @@
 
 FONT_PACKAGES = "${PN}"
 
-SRC_URI = "${GNOME_MIRROR}/ttf-bitstream-vera/1.10/ttf-bitstream-vera-${PV}.tar.bz2" 
-
-do_install () { 
-        install -d ${D}${prefix}/share/fonts/ttf/ 
-        for i in *.ttf; do 
-                install -m 644 $i ${D}${prefix}/share/fonts/ttf/${i} 
-        done 
-
-	# fontconfig ships this too.  not sure what to do about it.
-        #install -d ${D}${sysconfdir}/fonts 
-        #install -m 644 local.conf ${D}${sysconfdir}/fonts/local.conf 
-
-
-        install -d ${D}${prefix}/share/doc/${BPN}/
-        for i in *.TXT; do 
-                install -m 644 $i ${D}${prefix}/share/doc/${BPN}/$i
-        done 
-} 
-
-FILES_${PN} = "/etc ${datadir}/fonts"
-
+SRC_URI = "${GNOME_MIRROR}/ttf-bitstream-vera/1.10/ttf-bitstream-vera-${PV}.tar.bz2"
 SRC_URI[md5sum] = "bb22bd5b4675f5dbe17c6963d8c00ed6"
 SRC_URI[sha256sum] = "db5b27df7bbb318036ebdb75acd3e98f1bd6eb6608fb70a67d478cd243d178dc"
+
+do_install () {
+        install -d ${D}${datadir}/fonts/ttf
+        for i in *.ttf; do
+                install -m 644 $i ${D}${datadir}/fonts/ttf
+        done
+
+        install -d ${D}${docdir}/${BPN}
+        for i in *.TXT; do
+                install -m 644 $i ${D}${docdir}/${BPN}
+        done
+}
+
+FILES_${PN} = "${datadir}/fonts"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb
deleted file mode 100644
index 7a96a4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.0.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \
-               various well-known 3D model formats in a uniform manner."
-HOMEPAGE = "http://www.assimp.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271"
-
-DEPENDS = "zlib"
-
-SRC_URI = "git://github.com/assimp/assimp.git"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV = "52c8d06f5d6498afd66df983da348a6b112f1314"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"
-
-FILES_${PN}-dev += "${libdir}/cmake/"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.1.0.bb
new file mode 100644
index 0000000..194cbe3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/assimp_4.1.0.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \
+               various well-known 3D model formats in a uniform manner."
+HOMEPAGE = "http://www.assimp.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271"
+
+DEPENDS = "zlib"
+
+SRC_URI = "git://github.com/assimp/assimp.git"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV = "80799bdbf90ce626475635815ee18537718a05b1"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
index 0b89435..5fc9c2d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
@@ -10,7 +10,7 @@
            file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \
            file://0001-Fix-build-on-x86.patch \
 "
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 SRCREV = "18df00c7b4677b0889486e16977857aa987947e2"
 UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
 S = "${WORKDIR}/git"
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
index 3cf241d..bcf84a5 100644
--- 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
@@ -11,9 +11,11 @@
 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 @@
+Index: git/demos/CMakeLists.txt
+===================================================================
+--- git.orig/demos/CMakeLists.txt
++++ git/demos/CMakeLists.txt
+@@ -63,46 +63,6 @@ elseif(UNIX)
  else()
  endif()
  
@@ -60,7 +62,7 @@
  
  if(WIN32)
      include_directories (
-@@ -114,43 +74,6 @@
+@@ -116,43 +76,6 @@ endif()
  add_executable(${API_LOWERCASE}info vulkaninfo.c)
  target_link_libraries(${API_LOWERCASE}info ${LIBRARIES})
  
@@ -103,4 +105,4 @@
 -endif()
  
  if(UNIX)
-     install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR})
+     if(INSTALL_LVL_FILES)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
deleted file mode 100644
index 9de39bc..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.51.0.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-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.51 \
-           file://demos-Don-t-build-tri-or-cube.patch \
-"
-SRCREV = "8d021e4d5a9f91436f4462df1dafb222908e296d"
-UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-REQUIRED_DISTRO_FEATURES = "vulkan"
-
-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"
-
-RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.65.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.65.2.bb
new file mode 100644
index 0000000..1c8a895
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.65.2.bb
@@ -0,0 +1,36 @@
+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.65 \
+           file://demos-Don-t-build-tri-or-cube.patch \
+           "
+SRCREV = "73486a1a169d862d5210e2ad520d95319a2383fa"
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+REQUIRED_DISTRO_FEATURES = "vulkan"
+
+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"
+
+RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
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 a5179db..43c3edc 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
@@ -35,6 +35,3 @@
 
 # I say virtual/libgl, actually wants egl.pc
 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/0001-tools-Fix-race-in-autotools-install.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
deleted file mode 100644
index 4667538..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5e8864c5b7a2e258eea041b0ef66dac7fcab9b7f Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 9 Aug 2017 09:47:14 +0300
-Subject: [PATCH] tools: Fix race in (autotools) install
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-exec/data distinction is done based on install dir so compat scripts
-must be moved in exec hook.
-
-This should fix this occasional failure:
-| install: cannot change permissions of
-| ‘/usr/bin/libinput-debug-events.compat’: No such file or directory
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- tools/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 2c8660b..7ee8b90 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -63,7 +63,7 @@ endif
- 
- EXTRA_DIST = make-ptraccel-graphs.sh install-compat-scripts.sh $(bin_SCRIPTS)
- 
--install-data-hook:
-+install-exec-hook:
- 	(cd $(DESTDIR)$(bindir) && mv libinput-list-devices.compat libinput-list-devices)
- 	(cd $(DESTDIR)$(bindir) && mv libinput-debug-events.compat libinput-debug-events)
- 
--- 
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.8.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.8.1.bb
deleted file mode 100644
index a21babe..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.8.1.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Library to handle input devices in Wayland compositors"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
-
-DEPENDS = "libevdev udev mtdev"
-
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
-           file://0001-tools-Fix-race-in-autotools-install.patch \
-"
-
-SRC_URI[md5sum] = "8247f0bb67052ffb272c50c3cb9c5998"
-SRC_URI[sha256sum] = "e3590a9037e561a5791c8bd3b34bfd30fad5cacd8cbefc0d75fafe3a41d07147"
-
-inherit autotools pkgconfig lib_package
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
-PACKAGECONFIG[gui] = "--enable-debug-gui,--disable-debug-gui,cairo gtk+3"
-
-UDEVDIR = "`pkg-config --variable=udevdir udev`"
-
-EXTRA_OECONF += "--with-udev-dir=${UDEVDIR} --disable-documentation --disable-tests"
-
-# package name changed in 1.8.1 upgrade: make sure package upgrades work
-RPROVIDES_${PN} = "libinput"
-RREPLACES_${PN} = "libinput"
-RCONFLICTS_${PN} = "libinput"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.9.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.9.4.bb
new file mode 100644
index 0000000..67a49df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.9.4.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+           "
+SRC_URI[md5sum] = "8b43d07d1698fb207a0492fc67554d4f"
+SRC_URI[sha256sum] = "0bcdbd4c4e3c2a2db322fbdf2ef3284f2e6d6fb7be3af80e6d8de7783f675190"
+
+UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
+inherit meson pkgconfig lib_package
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom"
+PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3"
+
+UDEVDIR = "`pkg-config --variable=udevdir udev`"
+
+EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} -Ddocumentation=false -Dtests=false"
+
+# package name changed in 1.8.1 upgrade: make sure package upgrades work
+RPROVIDES_${PN} = "libinput"
+RREPLACES_${PN} = "libinput"
+RCONFLICTS_${PN} = "libinput"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb
deleted file mode 100644
index 4f9e9f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Collection of additional Wayland protocols"
-DESCRIPTION = "Wayland protocols that add functionality not \
-available in the Wayland core protocol. Such protocols either add \
-completely new functionality, or extend the functionality of some other \
-protocol either in Wayland core, or some other protocol in \
-wayland-protocols."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
-                    file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-           "
-SRC_URI[md5sum] = "84a7846c2b6a6a3e265fc9be36453e60"
-SRC_URI[sha256sum] = "5719c51d7354864983171c5083e93a72ac99229e2b460c4bb10513de08839c0a"
-
-inherit allarch autotools pkgconfig
-
-PACKAGES = "${PN}"
-FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.13.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.13.bb
new file mode 100644
index 0000000..1ef1ee1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.13.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Collection of additional Wayland protocols"
+DESCRIPTION = "Wayland protocols that add functionality not \
+available in the Wayland core protocol. Such protocols either add \
+completely new functionality, or extend the functionality of some other \
+protocol either in Wayland core, or some other protocol in \
+wayland-protocols."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
+                    file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+           "
+SRC_URI[md5sum] = "29312149dafcd4a0e739ba94995a574d"
+SRC_URI[sha256sum] = "0758bc8008d5332f431b2a84fea7de64d971ce270ed208206a098ff2ebc68f38"
+
+inherit allarch autotools pkgconfig
+
+PACKAGES = "${PN}"
+FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
new file mode 100644
index 0000000..ad3526d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
@@ -0,0 +1,32 @@
+Fix wayland-client and wayland-scanner pc files
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+
+Index: wayland-1.14.0/src/wayland-client.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-client.pc.in
++++ wayland-1.14.0/src/wayland-client.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+-pkgdatadir=@datadir@/@PACKAGE@
++pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
+ libdir=@libdir@
+ includedir=@includedir@
+ 
+Index: wayland-1.14.0/src/wayland-scanner.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-scanner.pc.in
++++ wayland-1.14.0/src/wayland-scanner.pc.in
+@@ -2,7 +2,7 @@ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+ pkgdatadir=@datadir@/@PACKAGE@
+-wayland_scanner=@bindir@/wayland-scanner
++wayland_scanner=wayland-scanner
+ 
+ Name: Wayland Scanner
+ Description: Wayland scanner
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb
deleted file mode 100644
index b9396b6..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Wayland, a protocol between a compositor and clients"
-DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
-as well as a C library implementation of that protocol. The compositor can be \
-a standalone display server running on Linux kernel modesetting and evdev \
-input devices, an X application, or a wayland client itself. The clients can \
-be traditional applications, X servers (rootless or fullscreen) or other \
-display servers."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
-                    file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
-
-DEPENDS = "expat libxml2 libffi wayland-native"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-           "
-SRC_URI[md5sum] = "cae152ed956da6de53f9727bc1c45039"
-SRC_URI[sha256sum] = "69b052c031a61e89af7cc8780893d0da1e301492352aa449dee9345043e6fe51"
-
-inherit autotools pkgconfig
-
-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.
-do_install_append_class-native() {
-  sed -e 's,PKG_CHECK_MODULES(.*),,g' \
-      -e 's,$PKG_CONFIG,pkg-config-native,g' \
-      -i ${D}/${datadir}/aclocal/wayland-scanner.m4
-}
-
-sysroot_stage_all_append_class-target () {
-	rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
-	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
-}
-
-FILES_${PN} = "${libdir}/*${SOLIBS}"
-FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.14.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.14.0.bb
new file mode 100644
index 0000000..1a9ff98
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.14.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Wayland, a protocol between a compositor and clients"
+DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
+as well as a C library implementation of that protocol. The compositor can be \
+a standalone display server running on Linux kernel modesetting and evdev \
+input devices, an X application, or a wayland client itself. The clients can \
+be traditional applications, X servers (rootless or fullscreen) or other \
+display servers."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
+                    file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
+
+DEPENDS = "expat libxml2 libffi wayland-native"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+	   file://fixpathinpcfiles.patch \
+           "
+SRC_URI[md5sum] = "0235f6075c32c3be61cff94fa0b9f108"
+SRC_URI[sha256sum] = "ed80cabc0961a759a42092e2c39aabfc1ec9a13c86c98bbe2b812f008da27ab8"
+
+inherit autotools pkgconfig
+
+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.
+do_install_append_class-native() {
+  sed -e 's,PKG_CHECK_MODULES(.*),,g' \
+      -e 's,$PKG_CONFIG,pkg-config-native,g' \
+      -i ${D}/${datadir}/aclocal/wayland-scanner.m4
+}
+
+sysroot_stage_all_append_class-target () {
+	rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
+	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
+}
+
+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/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
deleted file mode 100644
index 5f4d79c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1cfc1434a5d385a74de593ec7601674dba39e2fe Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 11 May 2016 16:16:30 +0300
-Subject: [PATCH] configure.ac: Fix wayland-protocols path
-
-The wayland-protocols directory is used during build: Fix the path
-to point to sysroot specified in recipe.
-
-Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
-breaks multilib weston as it would point to multilib sysroot when the
-(allarch) wayland-protocols is actually in the machine sysroot.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Inappropriate [embedded specific]
----
- configure.ac |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib
- PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
- 
- 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],,
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 e2213ac..0671a45 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
@@ -16,9 +16,11 @@
  3 files changed, 23 insertions(+), 1 deletion(-)
  create mode 100644 src/weston-error.h
 
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,6 +60,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+Index: weston-3.0.0/configure.ac
+===================================================================
+--- weston-3.0.0.orig/configure.ac
++++ weston-3.0.0/configure.ac
+@@ -103,6 +103,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
  	      [[#include <time.h>]])
  AC_CHECK_HEADERS([execinfo.h])
  
@@ -26,9 +28,11 @@
 +
  AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
  
- COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
+ # check for libdrm as a build-time dependency only
+Index: weston-3.0.0/libweston/weston-error.h
+===================================================================
 --- /dev/null
-+++ b/libweston/weston-error.h
++++ weston-3.0.0/libweston/weston-error.h
 @@ -0,0 +1,20 @@
 +#ifndef _WESTON_ERROR_H
 +#define _WESTON_ERROR_H
@@ -50,8 +54,10 @@
 +
 +#endif
 +
---- a/libweston/weston-launch.c
-+++ b/libweston/weston-launch.c
+Index: weston-3.0.0/libweston/weston-launch.c
+===================================================================
+--- weston-3.0.0.orig/libweston/weston-launch.c
++++ weston-3.0.0/libweston/weston-launch.c
 @@ -33,7 +33,6 @@
  #include <poll.h>
  #include <errno.h>
@@ -60,7 +66,7 @@
  #include <getopt.h>
  
  #include <sys/types.h>
-@@ -59,6 +58,7 @@
+@@ -60,6 +59,7 @@
  #endif
  
  #include "weston-launch.h"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
new file mode 100644
index 0000000..55c0d4f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
@@ -0,0 +1,30 @@
+On the musl C library, tests/timespec-text.c does not build, with the
+following error:
+
+    In file included from tests/timespec-test.c:36:0:
+    ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
+    inside parameter list will not be visible outside of this definition
+    or declaration
+     timespec_sub(struct timespec *r,
+                         ^~~~~~~~
+   [...]
+
+Indeed, struct timespec is defined in time.h, so we must include it.
+
+Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+
+Index: weston-3.0.0/shared/timespec-util.h
+===================================================================
+--- weston-3.0.0.orig/shared/timespec-util.h
++++ weston-3.0.0/shared/timespec-util.h
+@@ -28,6 +28,7 @@
+ 
+ #include <stdint.h>
+ #include <assert.h>
++#include <time.h>
+ 
+ #define NSEC_PER_SEC 1000000000
+ 
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..b3e1d06
--- /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
+@@ -1445,14 +1445,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],
+@@ -1477,6 +1476,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_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb
deleted file mode 100644
index 54b07bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "Weston, a Wayland compositor"
-DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
-                    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://xwayland.weston-start \
-           file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
-"
-SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
-SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
-
-inherit autotools pkgconfig useradd distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
-DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
-
-EXTRA_OECONF = "--enable-setuid-install \
-                --disable-rdp-compositor \
-                WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
-                "
-EXTRA_OECONF_append_qemux86 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
-EXTRA_OECONF_append_qemux86-64 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
-                   ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
-                   clients launch"
-#
-# Compositor choices
-#
-# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
-# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
-# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
-# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
-# Weston on framebuffer
-PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
-# weston-launch
-PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
-# VA-API desktop recorder
-PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
-# Weston with EGL support
-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
-# Weston with cairo glesv2 support
-PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
-# Weston with lcms support
-PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
-# Weston with webp support
-PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
-# Weston with unwinding support
-PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
-# Weston with systemd-login support
-PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
-# Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
-# colord CMS support
-PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
-# Clients support
-PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
-# Weston with PAM support
-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
-
-do_install_append() {
-	# Weston doesn't need the .la files to load modules, so wipe them
-	rm -f ${D}/${libdir}/libweston-2/*.la
-
-	# If X11, ship a desktop file to launch it
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
-		install -d ${D}${datadir}/applications
-		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
-
-		install -d ${D}${datadir}/icons/hicolor/48x48/apps
-		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
-	fi
-
-	if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
-		install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
-	fi
-}
-
-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}/libweston-2/xwayland.so"
-RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
-
-RDEPENDS_${PN} += "xkeyboard-config"
-RRECOMMENDS_${PN} = "liberation-fonts"
-RRECOMMENDS_${PN}-dev += "wayland-protocols"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_3.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_3.0.0.bb
new file mode 100644
index 0000000..ad0cdc2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_3.0.0.bb
@@ -0,0 +1,114 @@
+SUMMARY = "Weston, a Wayland compositor"
+DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
+                    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://xwayland.weston-start \
+           file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+	   file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
+	   file://fix-missing-header.patch \
+"
+SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
+SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
+
+inherit autotools pkgconfig useradd distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
+
+EXTRA_OECONF = "--enable-setuid-install \
+                --disable-rdp-compositor \
+                "
+EXTRA_OECONF_append_qemux86 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+EXTRA_OECONF_append_qemux86-64 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
+                   clients launch"
+#
+# Compositor choices
+#
+# Weston on KMS
+PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
+# Weston on Wayland (nested Weston)
+PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
+# Weston on X11
+PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
+# Headless Weston
+PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
+# Weston on framebuffer
+PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
+# weston-launch
+PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
+# VA-API desktop recorder
+PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
+# Weston with EGL support
+PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
+# Weston with cairo glesv2 support
+PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
+# Weston with lcms support
+PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
+# Weston with webp support
+PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
+# Weston with unwinding support
+PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+# Weston with systemd-login support
+PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
+# Weston with Xwayland support (requires X11 and Wayland)
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
+# colord CMS support
+PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
+# Clients support
+PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
+# Weston with PAM support
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+
+do_install_append() {
+	# Weston doesn't need the .la files to load modules, so wipe them
+	rm -f ${D}/${libdir}/libweston-3/*.la
+
+	# If X11, ship a desktop file to launch it
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
+		install -d ${D}${datadir}/applications
+		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
+
+		install -d ${D}${datadir}/icons/hicolor/48x48/apps
+		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+		install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
+	fi
+}
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
+             libweston-3 ${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-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
+SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
+
+FILES_${PN}-examples = "${bindir}/*"
+
+FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
+RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "liberation-fonts"
+RRECOMMENDS_${PN}-dev += "wayland-protocols"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
index 324a26f..87dc4f8 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
@@ -5,6 +5,7 @@
 EnvironmentFile=/etc/default/xserver-nodm
 User=@USER@
 ExecStart=/etc/xserver-nodm/Xserver
+Restart=always
 
 [Install]
 Alias=display-manager.service
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
index 345b589..a77c564 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
@@ -60,7 +60,7 @@
     fi
 }
 
-RDEPENDS_${PN} = "xinit ${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
+RDEPENDS_${PN} = "xinit ${@oe.utils.conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
 
 INITSCRIPT_NAME = "xserver-nodm"
 INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
index 733ebce..a4ab7f6 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
@@ -11,7 +11,7 @@
 PV = "0.1.1+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
index 97d13a3..a97c7b7 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
@@ -4,11 +4,11 @@
 
 Rebase for 1.2.1 by: Yu Ke <ke.yu@intel.com>
 
-diff --git a/configure.ac b/configure.ac
-index 81c3ae4..26601bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -52,11 +52,15 @@ PKG_CHECK_MODULES(SET_XEXT, xext,
+Index: xset-1.2.3/configure.ac
+===================================================================
+--- xset-1.2.3.orig/configure.ac
++++ xset-1.2.3/configure.ac
+@@ -53,11 +53,15 @@ PKG_CHECK_MODULES(SET_XEXT, xext,
  	AC_CHECK_HEADERS([X11/extensions/dpms.h X11/extensions/MITMisc.h],,,[#include <X11/Xlib.h>])
  	CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
  
@@ -22,5 +22,5 @@
  	CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
 +fi
  
- AC_ARG_WITH(xf86misc, AC_HELP_STRING([--without-xf86misc],[Disable xf86misc support.]),
+ AC_ARG_WITH(xf86misc, AS_HELP_STRING([--without-xf86misc],[Disable xf86misc support.]),
                  [USE_XF86MISC="$withval"], [USE_XF86MISC="yes"])
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.25.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.25.1.bb
deleted file mode 100644
index 7b3ea16..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.25.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "Generic input driver for the X.Org server based on libinput"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
-
-DEPENDS += "libinput"
-
-SRC_URI[md5sum] = "14003139614b25cc76c9a4cad059df89"
-SRC_URI[sha256sum] = "489f7d591c9ef08463d4966e61f7c6ea433f5fcbb9f5370fb621da639a84c7e0"
-
-FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.26.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.26.0.bb
new file mode 100644
index 0000000..54c33d7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.26.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-input.inc
+
+SUMMARY = "Generic input driver for the X.Org server based on libinput"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
+
+DEPENDS += "libinput"
+
+SRC_URI[md5sum] = "da47ef62eab1d0e922a8fa929ff81758"
+SRC_URI[sha256sum] = "abca558fc2226f295691f1cf3412d4c0edeaa439f677ca25b5c9fab310d2387b"
+
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch
new file mode 100644
index 0000000..06ef105
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch
@@ -0,0 +1,116 @@
+From 96d4e8e7b8a699f0ef77fa7b210d4de5f1c703d0 Mon Sep 17 00:00:00 2001
+From: Liwei Song <liwei.song@windriver.com>
+Date: Wed, 22 Nov 2017 08:59:03 +0000
+Subject: [PATCH] Add Coffeelake PCI IDs for S Skus
+
+Add the Coffeelake PCI IDs based on the following kernel patches:
+
+commit b056f8f3d6b900e8afd19f312719160346d263b4
+Author: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Date:   Thu Jun 8 16:41:05 2017 -0700
+
+    drm/i915/cfl: Add Coffee Lake PCI IDs for S Skus.
+
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10139905]
+
+Signed-off-by: Liwei Song <liwei.song@windriver.com>
+---
+ src/i915_pciids.h     |  7 +++++++
+ src/intel_module.c    | 13 +++++++++++++
+ src/sna/gen9_render.c | 12 ++++++++++++
+ 3 files changed, 32 insertions(+)
+
+diff --git a/src/i915_pciids.h b/src/i915_pciids.h
+index 0370f830c541..11ccfa9c047a 100644
+--- a/src/i915_pciids.h
++++ b/src/i915_pciids.h
+@@ -340,4 +340,11 @@
+ 	INTEL_VGA_DEVICE(0x3184, info), \
+ 	INTEL_VGA_DEVICE(0x3185, info)
+ 
++#define INTEL_CFL_S_IDS(info) \
++	INTEL_VGA_DEVICE(0x3E90, info), /* SRV GT1 */ \
++	INTEL_VGA_DEVICE(0x3E93, info), /* SRV GT1 */ \
++	INTEL_VGA_DEVICE(0x3E91, info), /* SRV GT2 */ \
++	INTEL_VGA_DEVICE(0x3E92, info), /* SRV GT2 */ \
++	INTEL_VGA_DEVICE(0x3E96, info)  /* SRV GT2 */
++
+ #endif /* _I915_PCIIDS_H */
+diff --git a/src/intel_module.c b/src/intel_module.c
+index 6b04857e2853..4827a67255f0 100644
+--- a/src/intel_module.c
++++ b/src/intel_module.c
+@@ -138,6 +138,10 @@ static const struct intel_device_info intel_geminilake_info = {
+ 	.gen = 0113,
+ };
+ 
++static const struct intel_device_info intel_coffeelake_info = {
++	.gen = 0114,
++};
++
+ static const SymTabRec intel_chipsets[] = {
+ 	{PCI_CHIP_I810,				"i810"},
+ 	{PCI_CHIP_I810_DC100,			"i810-dc100"},
+@@ -303,6 +307,13 @@ static const SymTabRec intel_chipsets[] = {
+ 	{0x5916, "HD Graphics 620"},
+ 	{0x591E, "HD Graphics 615"},
+ 
++	/*Coffeelake*/
++	{0x3E90, "HD Graphics"},
++	{0x3E93, "HD Graphics"},
++	{0x3E91, "HD Graphics"},
++	{0x3E92, "HD Graphics"},
++	{0x3E96, "HD Graphics"},
++
+ 	/* When adding new identifiers, also update:
+ 	 * 1. intel_identify()
+ 	 * 2. man/intel.man
+@@ -368,6 +379,8 @@ static const struct pci_id_match intel_device_match[] = {
+ 
+ 	INTEL_GLK_IDS(&intel_geminilake_info),
+ 
++	INTEL_CFL_S_IDS(&intel_coffeelake_info),
++
+ 	INTEL_VGA_DEVICE(PCI_MATCH_ANY, &intel_generic_info),
+ #endif
+ 
+diff --git a/src/sna/gen9_render.c b/src/sna/gen9_render.c
+index e5f12c723956..7f49052c5ec1 100644
+--- a/src/sna/gen9_render.c
++++ b/src/sna/gen9_render.c
+@@ -245,6 +245,11 @@ static const struct gt_info glk_gt_info = {
+ 	.urb = { .max_vs_entries = 320 },
+ };
+ 
++static const struct gt_info cfl_gt_info = {
++	.name = "Coffeelake (gen9)",
++	.urb = { .max_vs_entries = 960 },
++};
++
+ static bool is_skl(struct sna *sna)
+ {
+ 	return sna->kgem.gen == 0110;
+@@ -265,6 +270,11 @@ static bool is_glk(struct sna *sna)
+ 	return sna->kgem.gen == 0113;
+ }
+ 
++static bool is_cfl(struct sna *sna)
++{
++	return sna->kgem.gen == 0114;
++}
++
+ 
+ static inline bool too_large(int width, int height)
+ {
+@@ -4040,6 +4050,8 @@ static bool gen9_render_setup(struct sna *sna)
+ 		state->info = &kbl_gt_info;
+ 	if (is_glk(sna))
+ 		state->info = &glk_gt_info;
++	if (is_cfl(sna))
++		state->info = &cfl_gt_info;
+ 
+ 	sna_static_stream_init(&general);
+ 
+-- 
+2.13.3
+
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 138dfdd..2623cb2 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
@@ -16,6 +16,7 @@
 SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel \
            file://disable-x11-dri3.patch \
            file://always_include_xorg_server.h.patch \
+           file://0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch \
            "
 
 SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
@@ -37,7 +38,7 @@
 PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
 
 # --enable-kms-only option is required by ROOTLESS_X
-EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
+EXTRA_OECONF += '${@oe.utils.conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
 
 COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
index e652394..bef3636 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
@@ -36,6 +36,6 @@
 
 python () {
     if not bb.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
-        raise bb.parse.SkipPackage("'opengl' not in DISTRO_FEATURES")
+        raise bb.parse.SkipRecipe("'opengl' not in DISTRO_FEATURES")
 }
 
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 fe42f11..bca0aad 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
@@ -38,3 +38,5 @@
 
     pn = d.getVar("PN")
     d.appendVar('RDEPENDS_' + pn, ' ' + abi)
+
+SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.5.bb
deleted file mode 100644
index a3b682b..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.13.5.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Generic PCI access library for X"
-
-DESCRIPTION = "libpciaccess provides functionality for X to access the \
-PCI bus and devices in a platform-independent way."
-
-require xorg-lib-common.inc
-
-SRC_URI += "\
-            file://0004-Don-t-include-sys-io.h-on-arm.patch \
-"
-
-SRC_URI[md5sum] = "d810ab17e24c1418dedf7207fb2841d4"
-SRC_URI[sha256sum] = "752c54e9b3c311b4347cb50aea8566fa48eab274346ea8a06f7f15de3240b999"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=277aada5222b9a22fbf3471ff3687068"
-
-REQUIRED_DISTRO_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb
new file mode 100644
index 0000000..a44a5c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Generic PCI access library for X"
+
+DESCRIPTION = "libpciaccess provides functionality for X to access the \
+PCI bus and devices in a platform-independent way."
+
+require xorg-lib-common.inc
+
+SRC_URI += "\
+            file://0004-Don-t-include-sys-io.h-on-arm.patch \
+"
+
+SRC_URI[md5sum] = "8f436e151d5106a9cfaa71857a066d33"
+SRC_URI[sha256sum] = "3df543e12afd41fea8eac817e48cbfde5aed8817b81670a4e9e493bb2f5bf2a4"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=277aada5222b9a22fbf3471ff3687068"
+
+REQUIRED_DISTRO_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
index a699841..ffa1c85 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libpthread-stubs_0.4.bb
@@ -7,17 +7,11 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6edc1fea03d959f0c2d743fe5ca746ad"
 
-#DEPENDS = "xcb-proto xproto libxau libxslt-native"
-# DEPENDS += "xsltproc-native gperf-native"
-
-ALLOW_EMPTY_${PN} = "1"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/libpthread-stubs-${PV}.tar.bz2"
-
+SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2"
 SRC_URI[md5sum] = "48c1544854a94db0e51499cc3afd797f"
 SRC_URI[sha256sum] = "e4d05911a3165d3b18321cc067fdd2f023f06436e391c6a28dff618a78d2e733"
 
-inherit autotools pkgconfig
+inherit autotools
 
 RDEPENDS_${PN}-dev = ""
 RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc
index b04eafb..4af40ab 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11.inc
@@ -35,7 +35,3 @@
 FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${datadir}/X11/Xcms.txt"
 FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*"
 FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
-
-# Multiple libx11 derivatives from from this file and are selected by virtual/libx11
-# A world build should only build the correct version, not all of them.
-EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
index 7c7fa3d..0fe6531 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcalibrate_git.bb
@@ -16,7 +16,7 @@
 
 SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate \
            file://fix-xcb.patch"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
index 5641c0f..c0efbdc 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/disable-check.patch
@@ -9,17 +9,17 @@
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
 
-diff --git a/configure.ac b/configure.ac
-index 6d7c9a5..22cceb9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -21,7 +21,8 @@ AC_USE_SYSTEM_EXTENSIONS
- 
- AM_PATH_PYTHON([2.6])
+Index: libxcb-1.12/configure.ac
+===================================================================
+--- libxcb-1.12.orig/configure.ac
++++ libxcb-1.12/configure.ac
+@@ -36,7 +36,8 @@ if test x"$HAVE_DOT" = xno; then
+     AC_MSG_WARN([dot not found - doxygen targets will be skipped])
+ fi
  
 -PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
 +dnl PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
 +HAVE_CHECK=no
  AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xyes)
  
- AC_CONFIG_HEADERS([src/config.h])
+ XSLTPROC=no
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
deleted file mode 100644
index 1762904..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Xcursor: X Cursor management library"
-
-DESCRIPTION = "Xcursor is a simple library designed to help locate and \
-load cursors. Cursors can be loaded from files or memory. A library of \
-common cursors exists which map to the standard X cursor names. Cursors \
-can exist in several sizes and the library automatically picks the best \
-size."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8902e6643f7bcd7793b23dcd5d8031a4"
-
-DEPENDS += "libxrender libxfixes"
-BBCLASSEXTEND = "native nativesdk"
-
-PE = "1"
-
-XORG_PN = "libXcursor"
-
-SRC_URI[md5sum] = "1e7c17afbbce83e2215917047c57d1b3"
-SRC_URI[sha256sum] = "9bc6acb21ca14da51bda5bc912c8955bc6e5e433f0ab00c5e8bef842596c33df"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.15.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.15.bb
new file mode 100644
index 0000000..dc9af23
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.15.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Xcursor: X Cursor management library"
+
+DESCRIPTION = "Xcursor is a simple library designed to help locate and \
+load cursors. Cursors can be loaded from files or memory. A library of \
+common cursors exists which map to the standard X cursor names. Cursors \
+can exist in several sizes and the library automatically picks the best \
+size."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8902e6643f7bcd7793b23dcd5d8031a4"
+
+DEPENDS += "libxrender libxfixes"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+XORG_PN = "libXcursor"
+
+SRC_URI[md5sum] = "58fe3514e1e7135cf364101e714d1a14"
+SRC_URI[sha256sum] = "294e670dd37cd23995e69aae626629d4a2dfe5708851bbc13d032401b7a3df6b"
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
deleted file mode 100644
index 4bfb290..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-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/libxfont2_2.0.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.3.bb
new file mode 100644
index 0000000..5f27a55
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.3.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] = "b7ca87dfafeb5205b28a1e91ac3efe85"
+SRC_URI[sha256sum] = "0e8ab7fd737ccdfe87e1f02b55f221f0bd4503a1c5f28be4ed6a54586bac9c4e"
+
+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.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb
deleted file mode 100644
index b11dda5..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "XFont: X Font rasterisation library"
-
-DESCRIPTION = "libXfont 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"
-PROVIDES = "xfont"
-
-PE = "1"
-
-XORG_PN = "libXfont"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "254ee42bd178d18ebc7a73aacfde7f79"
-SRC_URI[sha256sum] = "02945ea68da447102f3e6c2b896c1d2061fd115de99404facc2aca3ad7010d71"
-
-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.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
new file mode 100644
index 0000000..79f77fc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb
@@ -0,0 +1,25 @@
+SUMMARY = "XFont: X Font rasterisation library"
+
+DESCRIPTION = "libXfont 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"
+PROVIDES = "xfont"
+
+PE = "1"
+
+XORG_PN = "libXfont"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "16eaf156edd79b68038b6a7c44aa9e9b"
+SRC_URI[sha256sum] = "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242"
+
+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/libxkbcommon_0.7.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb
deleted file mode 100644
index 81df1dd..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Generic XKB keymap library"
-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=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] = "947ba609cb0239b9462127d5cf8908ee"
-SRC_URI[sha256sum] = "ba59305d2e19e47c27ea065c2e0df96ebac6a3c6e97e28ae5620073b6084e68b"
-
-UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-docs"
-
-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/libxkbcommon_0.8.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.0.bb
new file mode 100644
index 0000000..050d0b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Generic XKB keymap library"
+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=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] = "7d0e4c4a137d0ac45bf6b328c84c3a81"
+SRC_URI[sha256sum] = "e829265db04e0aebfb0591b6dc3377b64599558167846c3f5ee5c5e53641fe6d"
+
+UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-docs"
+
+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/libxres_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb
deleted file mode 100644
index 8c04c44..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.0.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "XRes: X Resource extension library"
-
-DESCRIPTION = "libXRes provides an X Window System client interface to \
-the Resource extension to the X protocol.  The Resource extension allows \
-for X clients to see and monitor the X resource usage of various clients \
-(pixmaps, et al)."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8c89441a8df261bdc56587465e13c7fa"
-
-DEPENDS += "libxext resourceproto"
-
-PE = "1"
-
-XORG_PN = "libXres"
-
-SRC_URI[md5sum] = "45ef29206a6b58254c81bea28ec6c95f"
-SRC_URI[sha256sum] = "26899054aa87f81b17becc68e8645b240f140464cf90c42616ebb263ec5fa0e5"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb
new file mode 100644
index 0000000..8c34e47
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxres_1.2.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "XRes: X Resource extension library"
+
+DESCRIPTION = "libXRes provides an X Window System client interface to \
+the Resource extension to the X protocol.  The Resource extension allows \
+for X clients to see and monitor the X resource usage of various clients \
+(pixmaps, et al)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8c89441a8df261bdc56587465e13c7fa"
+
+DEPENDS += "libxext resourceproto"
+
+PE = "1"
+
+XORG_PN = "libXres"
+
+SRC_URI[md5sum] = "5d6d443d1abc8e1f6fc1c57fb27729bb"
+SRC_URI[sha256sum] = "ff75c1643488e64a7cfbced27486f0f944801319c84c18d3bd3da6bf28c812d4"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence/extensions.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence/extensions.patch
new file mode 100644
index 0000000..4cc9e05
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence/extensions.patch
@@ -0,0 +1,17 @@
+With glibc 2.27 memfd_create is behind a _GNU_SOURCE guard, so call
+AC_USE_SYSTEM_EXTENSIONS to get that defined.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 0c98875..ebf4dee 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,4 +29,6 @@ AC_CONFIG_SRCDIR([Makefile.am])
+ AC_CONFIG_HEADERS([config.h])
+ 
++AC_USE_SYSTEM_EXTENSIONS
++
+ # Initialize Automake
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
index ae34b1f..1df068d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxshmfence_1.2.bb
@@ -13,5 +13,7 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
+SRC_URI += "file://extensions.patch"
+
 SRC_URI[md5sum] = "66662e76899112c0f99e22f2fc775a7e"
 SRC_URI[sha256sum] = "d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.21.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.21.bb
deleted file mode 100644
index 01a51ad..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.21.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Keyboard configuration database for X Window"
-
-DESCRIPTION = "The non-arch keyboard configuration database for X \
-Window.  The goal is to provide the consistent, well-structured, \
-frequently released open source of X keyboard configuration data for X \
-Window System implementations.  The project is targeted to XKB-based \
-systems."
-
-HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
-
-SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "af9498e8954907d0a47f0f7b3d21e1ef"
-SRC_URI[sha256sum] = "30c17049fae129fc14875656da9aa3099e3031d6ce0ee1d77aae190fd9edcec5"
-
-SECTION = "x11/libs"
-DEPENDS = "intltool-native util-macros libxslt-native"
-
-EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
-
-FILES_${PN} += "${datadir}/X11/xkb"
-
-inherit autotools pkgconfig gettext
-
-do_install_append () {
-    install -d ${D}${datadir}/X11/xkb/compiled
-    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.22.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.22.bb
new file mode 100644
index 0000000..4fd894f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.22.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Keyboard configuration database for X Window"
+
+DESCRIPTION = "The non-arch keyboard configuration database for X \
+Window.  The goal is to provide the consistent, well-structured, \
+frequently released open source of X keyboard configuration data for X \
+Window System implementations.  The project is targeted to XKB-based \
+systems."
+
+HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
+
+SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "eb61fb3fd419e817df572b0c8d94a883"
+SRC_URI[sha256sum] = "deaec9989fbc443358b43864437b7b6d39caff07890a4a8055105ce9fcaa59bd"
+
+SECTION = "x11/libs"
+DEPENDS = "intltool-native util-macros libxslt-native"
+
+EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
+
+FILES_${PN} += "${datadir}/X11/xkb"
+
+inherit autotools pkgconfig gettext
+
+do_install_append () {
+    install -d ${D}${datadir}/X11/xkb/compiled
+    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
index 3a98926..eb4b422 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/calibrateproto_git.bb
@@ -17,5 +17,5 @@
 SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/calibrateproto \
            file://fix.patch;apply=yes"
 S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
deleted file mode 100644
index 09b6088..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream uses AM_PATH_PYTHON to find a python binary and ask it where to install
-libraries.  This means we either need to depend on python-native (large build
-dependency, early in the build) or use the host python (pythondir reflects the
-host and not the target, breaks builds).
-
-The third option is to just hardcode the path where the module goes, as most
-callers of the code use pkg-config to find where it was installed anyway.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index d140bfe..c7b68da 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -14,7 +14,10 @@ if test "$XMLLINT" = "no"; then
-    AC_MSG_WARN([xmllint not found; unable to validate against schema.])
- fi
-
--AM_PATH_PYTHON([2.5])
-+pythondir="${libdir}/xcb-proto"
-+AC_SUBST(pythondir)
-+PYTHON="python3"
-+AC_SUBST(PYTHON)
-
- xcbincludedir='${datadir}/xcb'
- AC_SUBST(xcbincludedir)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
index bc04bc4..25a8373 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
@@ -11,8 +11,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
                     file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
 
-SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \
-           file://no-python-native.patch \
+SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2 \
            file://0001-Make-whitespace-use-consistent.patch \
            file://0002-print-is-a-function-and-needs-parentheses.patch \
            "
@@ -21,6 +20,10 @@
 
 inherit autotools pkgconfig
 
+# Force the use of Python 3 and a specific library path so we don't need to
+# depend on python3-native
+CACHED_CONFIGUREVARS += "PYTHON=python3 am_cv_python_pythondir=${libdir}/xcb-proto"
+
 PACKAGES += "python-xcbgen"
 
 FILES_${PN} = ""
@@ -32,9 +35,19 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-do_install_append() {
-    # Makefile's do_install creates .pyc files for python3, now also create
-    # them for python2 so that they will be recorded by manifest, and can be
-    # cleaned correctly.
-    python -m py_compile ${D}${libdir}/xcb-proto/xcbgen/*.py
+# Need to do this dance because we're forcing the use of host Python above and
+# if xcb-proto is built with Py3.5 and then re-used from sstate on a host with
+# Py3.6 the second build will write new cache files into the sysroot which won't
+# be listed in the manifest so won't be deleted, resulting in an error on
+# rebuilds.  Solve this by deleting the entire cache directory when this package
+# is removed from the sysroot.
+SSTATEPOSTINSTFUNCS += "xcb_sstate_postinst"
+xcb_sstate_postinst() {
+	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+	then
+		cat <<EOF >${SSTATE_INST_POSTRM}
+#!/bin/sh
+rm -rf ${libdir}/xcb-proto/xcbgen/__pycache__
+EOF
+	fi
 }
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
index 8a5ff58..4f9ed99 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
@@ -10,13 +10,15 @@
 Received this patch from H.J. Lu <hjl.tools@gmail.com>
 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
 
---- xproto-7.0.22/Xmd.h.x32	2009-07-11 04:19:50.000000000 -0700
-+++ xproto-7.0.22/Xmd.h	2011-11-30 17:14:19.290395893 -0800
+Index: xproto-7.0.31/Xmd.h
+===================================================================
+--- xproto-7.0.31.orig/Xmd.h
++++ xproto-7.0.31/Xmd.h
 @@ -62,7 +62,6 @@ SOFTWARE.
       defined(__ia64__) || defined(ia64) || \
       defined(__sparc64__) || \
       defined(__s390x__) || \
 -     defined(__amd64__) || defined(amd64) || \
       defined(__powerpc64__)
- #  define LONG64				/* 32/64-bit architecture */
- # endif
+ #  if !defined(__ILP32__) /* amd64-x32 is 32bit */
+ #   define LONG64				/* 32/64-bit architecture */
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 4c442bc..5420b7d 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
@@ -10,7 +10,6 @@
 S = "${WORKDIR}"
 
 CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf"
-CONFFILES_${PN}_append_libc-musl = " ${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 ALLOW_EMPTY_${PN} = "1"
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 863d80c..cf2286c 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
@@ -117,7 +117,6 @@
                  --sysconfdir=/etc/X11 \
                  --localstatedir=/var \
                  --with-xkb-output=/var/lib/xkb \
-                 WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
 "
 
 OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
@@ -133,7 +132,7 @@
 # DRI3 requires xshmfence to also be enabled
 PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
 PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,glproto virtual/libgl virtual/libx11"
-PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy,libegl"
+PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
 PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch
new file mode 100644
index 0000000..d05eec5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch
@@ -0,0 +1,53 @@
+From d77cdc5e1eee26821ab98c947abea53fb7b18fe5 Mon Sep 17 00:00:00 2001
+From: California Sullivan <california.l.sullivan@intel.com>
+Date: Fri, 16 Mar 2018 17:23:11 -0700
+Subject: [PATCH] xf86pciBus.c: use Intel ddx only for pre-gen4 hardware
+
+Use intel ddx only on pre-gen4 hw, newer ones will fall back to modesetting
+Author: Timo Aaltonen <tjaalton@debian.org>
+
+Instead of defaulting to the Intel driver for all Intel hardware, only
+default it for older hardware for which it has shown to be better for.
+
+Others fall through to the -modesetting default.
+
+Upstream-Status: Pending [Debian/Fedora patch
+https://src.fedoraproject.org/rpms/xorg-x11-server/c/ee515e44b07e37689abf48cf2fffb41578f3bc1d]
+
+Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
+---
+ hw/xfree86/common/xf86pciBus.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index e61ae0cd4..d70c99197 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1173,7 +1173,23 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
+ 		case 0x0bef:
+ 			/* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */
+ 			break;
+-		default:
++		/* Default to intel only on pre-gen4 chips */
++		case 0x3577:
++		case 0x2562:
++		case 0x3582:
++		case 0x358e:
++		case 0x2572:
++		case 0x2582:
++		case 0x258a:
++		case 0x2592:
++		case 0x2772:
++		case 0x27a2:
++		case 0x27ae:
++		case 0x29b2:
++		case 0x29c2:
++		case 0x29d2:
++		case 0xa001:
++		case 0xa011:
+ 			driverList[0] = "intel";
+ 			break;
+         }
+-- 
+2.14.3
+
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
deleted file mode 100644
index eafd07a..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-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/CVE-2017-10971-1.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch
deleted file mode 100644
index 23c8049..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-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
deleted file mode 100644
index 5c9887a..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-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
deleted file mode 100644
index 54ba481..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-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/macro_tweak.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
index ec0eea6..c36e4e7 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch
@@ -5,13 +5,13 @@
 
 Signed-off-by: Yu Ke <ke.yu@intel.com>
 
-diff --git a/xorg-server.m4 b/xorg-server.m4
-index bdecf62..040fdb8 100644
---- a/xorg-server.m4
-+++ b/xorg-server.m4
+Index: xorg-server-1.19.6/xorg-server.m4
+===================================================================
+--- xorg-server-1.19.6.orig/xorg-server.m4
++++ xorg-server-1.19.6/xorg-server.m4
 @@ -28,10 +28,12 @@ dnl
- # Checks for the $1 define in xorg-server.h (from the sdk).  If it
- # is defined, then add $1 to $REQUIRED_MODULES.
+ # Checks for the MACRO define in xorg-server.h (from the sdk).  If it
+ # is defined, then add the given PROTO to $REQUIRED_MODULES.
  
 +m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
 +
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.3.bb
deleted file mode 100644
index 65ef6c6..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.3.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-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] = "015d2fc4b9f2bfe7a626edb63a62c65e"
-SRC_URI[sha256sum] = "677a8166e03474719238dfe396ce673c4234735464d6dadf2959b600d20e5a98"
-
-# 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.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb
new file mode 100644
index 0000000..c680cf9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb
@@ -0,0 +1,32 @@
+require xserver-xorg.inc
+
+SRC_URI += "file://musl-arm-inb-outb.patch \
+            file://0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch \
+            file://0003-modesetting-Fix-16-bit-depth-bpp-mode.patch \
+            file://0003-Remove-check-for-useSIGIO-option.patch \
+            file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \
+            "
+SRC_URI[md5sum] = "3e47777ff034a331aed2322b078694a8"
+SRC_URI[sha256sum] = "a732502f1db000cf36a376cd0c010ffdbf32ecdd7f1fa08ba7f5bdf9601cc197"
+
+# 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/xvideo-tests/xvideo-tests_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
index 2667dd8..1d275a0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
@@ -8,7 +8,7 @@
 PV = "0.1+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/test-xvideo"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
deleted file mode 100644
index a4b7157..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6b5bbdfaac7f216fe8a02c4cf29e5eb2aee5a409 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Sep 2015 00:01:00 +0000
-Subject: [PATCH] include sys/types.h for dev_t definition
-
-Avoids the build failures when sys/types.h does not get included
-indirectly through other headers.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- blktrace.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/blktrace.h b/blktrace.h
-index 380aec7..944fc08 100644
---- a/blktrace.h
-+++ b/blktrace.h
-@@ -5,6 +5,7 @@
- #include <limits.h>
- #include <byteswap.h>
- #include <endian.h>
-+#include <sys/types.h>
- 
- #include "blktrace_api.h"
- #include "rbtree.h"
--- 
-2.5.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
index dea1aa2..ab905cf 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
@@ -10,6 +10,8 @@
 
 Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
 
+Index: git/Makefile
+===================================================================
 --- git.orig/Makefile
 +++ git/Makefile
 @@ -1,5 +1,6 @@
@@ -19,7 +21,7 @@
  ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  PROGS	= blkparse blktrace verify_blkparse blkrawverify blkiomon
  LIBS	= -lpthread
-@@ -23,19 +24,19 @@ btreplay/btreplay:
+@@ -26,19 +27,19 @@ btreplay/btreplay:
  	$(CC) -o $*.o -c $(ALL_CFLAGS) $<
  
  blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
@@ -44,6 +46,8 @@
  
  $(PROGS): | depend
  
+Index: git/btreplay/Makefile
+===================================================================
 --- git.orig/btreplay/Makefile
 +++ git/btreplay/Makefile
 @@ -7,6 +7,7 @@
@@ -55,8 +59,8 @@
  OCFLAGS	= -UCOUNT_IOS -UDEBUG -DNDEBUG
  XCFLAGS	= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 @@ -32,10 +33,10 @@ clean: docsclean
-	$(CC) $(CFLAGS) -c -o $*.o $<
-
+ 	$(CC) $(CFLAGS) -c -o $*.o $<
+ 
  btrecord: btrecord.o
 -	$(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
 +	$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
@@ -67,6 +71,8 @@
  
  depend:
  	@$(CC) -MM $(CFLAGS) *.c 1> .depend
+Index: git/btt/Makefile
+===================================================================
 --- git.orig/btt/Makefile
 +++ git/btt/Makefile
 @@ -7,6 +7,7 @@
@@ -86,11 +92,13 @@
  
  ifneq ($(wildcard .depend),)
  include .depend
+Index: git/iowatcher/Makefile
+===================================================================
 --- git.orig/iowatcher/Makefile
 +++ git/iowatcher/Makefile
 @@ -1,5 +1,6 @@
- C      = gcc
- CFLAGS  = -Wall -O0 -g -W
+ CC      = gcc
+ CFLAGS  = -Wall -O2 -g -W -Wunused-result
 +LDFLAGS =
  ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  
@@ -99,8 +107,8 @@
  	$(CC) -o $*.o -c $(ALL_CFLAGS) $<
  
  iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
--	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm
-+	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS)
+-	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
++	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt
  
  depend:
  	@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
index 770575f..663de2e 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -5,13 +5,12 @@
 
 DEPENDS = "libaio"
 
-SRCREV = "43fc870ce04e963def45dfc0d1ed4ea21ef10d4b"
+SRCREV = "cca113f2fe0759b91fd6a0e10fdcda2c28f18a7e"
 
-PV = "1.1.0+git${SRCPV}"
+PV = "1.2.0+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.dk/blktrace.git \
            file://ldflags.patch \
-           file://0001-include-sys-types.h-for-dev_t-definition.patch \
 "
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
index 552eb6a..ed6d0ec 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.9.bb
@@ -9,6 +9,7 @@
 
 SRC_URI += " \
 file://0001-Disable-installing-header-file-provided-by-another-p.patch \
+file://0001-ioctl.c-Fix-build-with-linux-4.13.patch \
 "
 
 EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
index 50366e7..ab15bc1 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -3,11 +3,9 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "http://nwl.cc/pub/cryptodev-linux/cryptodev-linux-${PV}.tar.gz"
+SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux"
+SRCREV = "87d959d9a279c055b361de8e730fab6a7144edd7"
 
-SRC_URI[md5sum] = "cb4e0ed9e5937716c7c8a7be84895b6d"
-SRC_URI[sha256sum] = "9f4c0b49b30e267d776f79455d09c70cc9c12c86eee400a0d0a0cd1d8e467950"
-
-S = "${WORKDIR}/cryptodev-linux-${PV}"
+S = "${WORKDIR}/git"
 
 CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
index 3f0298b..84fd27e 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
@@ -14,37 +14,37 @@
  tests/Makefile |    8 ++++++++
  2 files changed, 14 insertions(+), 0 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 31c4b3f..2ecf2a9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -34,6 +34,9 @@ modules_install:
- 	@echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
- 	@install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -35,6 +35,9 @@ modules_install:
+ 	$(MAKE) $(KERNEL_MAKE_OPTS) modules_install
+ 	install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
  
 +install_tests:
 +	make -C tests install DESTDIR=$(PREFIX)
 +
  clean:
- 	make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
+ 	$(MAKE) $(KERNEL_MAKE_OPTS) clean
  	rm -f $(hostprogs) *~
-@@ -42,6 +45,9 @@ clean:
+@@ -43,6 +46,9 @@ clean:
  check:
- 	CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests check
+ 	CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests check
  
 +testprogs:
 +	KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs
 +
  CPOPTS =
- ifneq (${SHOW_TYPES},)
+ ifneq ($(SHOW_TYPES),)
  CPOPTS += --show-types
-diff --git a/tests/Makefile b/tests/Makefile
-index c9f04e8..cd202af 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o
- example-async-speed-objs := async_speed.o
- example-hashcrypt-speed-objs := hashcrypt_speed.c
+Index: git/tests/Makefile
+===================================================================
+--- git.orig/tests/Makefile
++++ git/tests/Makefile
+@@ -23,6 +23,12 @@ bindir = $(execprefix)/bin
+ 
+ all: $(hostprogs)
  
 +install:
 +	install -d  $(DESTDIR)/usr/bin/tests_cryptodev
@@ -55,9 +55,9 @@
  check: $(hostprogs)
  	./cipher
  	./hmac
-@@ -28,6 +34,8 @@ check: $(hostprogs)
- 	./cipher-gcm
- 	./cipher-aead
+@@ -38,6 +44,8 @@ install:
+ 		install -m 755 $$prog $(DESTDIR)/$(bindir); \
+ 	done
  
 +testprogs: $(hostprogs)
 +
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch
new file mode 100644
index 0000000..a41efac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-with-linux-4.13.patch
@@ -0,0 +1,49 @@
+From f0d69774afb27ffc62bf353465fba145e70cb85a Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Mon, 4 Sep 2017 11:05:08 +0200
+Subject: [PATCH] ioctl.c: Fix build with linux 4.13
+
+git/ioctl.c:1127:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
+   {0, },
+    ^
+note: (near initialization for 'verbosity_ctl_dir[1]')
+git/ioctl.c:1136:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
+   {0, },
+    ^
+
+Linux kernel has added -Werror=designated-init around 4.11 (c834f0e8a8b)
+triggering build errors with gcc 5 and 6 (but not with gcc 4)
+
+Upstream-Status: Backport
+
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
+---
+ ioctl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ioctl.c b/ioctl.c
+index 0385203..8d4a162 100644
+--- a/ioctl.c
++++ b/ioctl.c
+@@ -1124,7 +1124,7 @@ static struct ctl_table verbosity_ctl_dir[] = {
+ 		.mode           = 0644,
+ 		.proc_handler   = proc_dointvec,
+ 	},
+-	{0, },
++	{},
+ };
+ 
+ static struct ctl_table verbosity_ctl_root[] = {
+@@ -1133,7 +1133,7 @@ static struct ctl_table verbosity_ctl_root[] = {
+ 		.mode           = 0555,
+ 		.child          = verbosity_ctl_dir,
+ 	},
+-	{0, },
++	{},
+ };
+ static struct ctl_table_header *verbosity_sysctl_header;
+ static int __init init_cryptodev(void)
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc
index d759946..9a90d44 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc.inc
@@ -7,9 +7,11 @@
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
            file://make_install.patch \
-	  "
+           file://0001-checks-Use-proper-format-modifier-for-size_t.patch \
+           "
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
-EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
+EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
 
 S = "${WORKDIR}/git"
 
@@ -20,4 +22,4 @@
 PACKAGES =+ "${PN}-misc"
 FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
 
-RDEPENDS_${PN}-misc += "bash"
+RDEPENDS_${PN}-misc += "bash diffutils"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch
new file mode 100644
index 0000000..cab384d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/0001-checks-Use-proper-format-modifier-for-size_t.patch
@@ -0,0 +1,43 @@
+From c7a4c3817796107bb824a1f173faf90fae45396b Mon Sep 17 00:00:00 2001
+From: Thierry Reding <treding@nvidia.com>
+Date: Wed, 27 Sep 2017 15:04:09 +0200
+Subject: [PATCH] checks: Use proper format modifier for size_t
+
+The size of size_t can vary between architectures, so using %ld isn't
+going to work on 32-bit builds. Use the %zu modifier to make sure it is
+always correct.
+
+Upstream-Status: Backport
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ checks.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/checks.c b/checks.c
+index 902f2e3..08a3a29 100644
+--- a/checks.c
++++ b/checks.c
+@@ -972,7 +972,7 @@ static void check_property_phandle_args(struct check *c,
+ 	int cell, cellsize = 0;
+ 
+ 	if (prop->val.len % sizeof(cell_t)) {
+-		FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s",
++		FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s",
+ 		     prop->name, prop->val.len, sizeof(cell_t), node->fullpath);
+ 		return;
+ 	}
+@@ -1163,7 +1163,7 @@ static void check_interrupts_property(struct check *c,
+ 		return;
+ 
+ 	if (irq_prop->val.len % sizeof(cell_t))
+-		FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s",
++		FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s",
+ 		     irq_prop->name, irq_prop->val.len, sizeof(cell_t),
+ 		     node->fullpath);
+ 
+-- 
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch
index 1120617..ccf17b3 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc/make_install.patch
@@ -2,11 +2,11 @@
 
 Index: git/Makefile
 ===================================================================
---- git.orig/Makefile	2011-11-02 14:52:17.243104779 -0700
-+++ git/Makefile	2011-11-02 15:06:01.555104982 -0700
-@@ -161,8 +161,8 @@
- 	$(INSTALL) -d $(DESTDIR)$(BINDIR)
- 	$(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+--- git.orig/Makefile
++++ git/Makefile
+@@ -168,8 +168,8 @@ install-bin: all $(SCRIPTS)
+ install-lib: all
+ 	@$(VECHO) INSTALL-LIB
  	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
 -	$(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
 -	ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
@@ -14,4 +14,4 @@
 +	ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib))
  	ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
  	$(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
- 	$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb
deleted file mode 100644
index eadb7ba..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require dtc.inc
-
-LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
-		    file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
-
-SRCREV = "558cd81bdd432769b59bff01240c44f82cfb1a9d"
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb
new file mode 100644
index 0000000..0e46cfb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/dtc/dtc_1.4.5.bb
@@ -0,0 +1,10 @@
+require dtc.inc
+
+LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+		    file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
+
+SRCREV = "22a65c5331c22979d416738eb756b9541672e00d"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 3a3992a..8ccd8ce 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -12,6 +12,7 @@
 
 SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
 S = "${WORKDIR}"
+UPSTREAM_CHECK_COMMITS = "1"
 
 do_compile() { 
 	:
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
deleted file mode 100644
index c689bec..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Kexec fast reboot tools"
-DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
-AUTHOR = "Eric Biederman"
-HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
-SECTION = "kernel/userland"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
-                    file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
-DEPENDS = "zlib xz"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
-           file://kdump \
-           file://kdump.conf \
-           file://kdump.service \
-"
-
-PR = "r1"
-
-inherit autotools
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
-
-INSANE_SKIP_${PN} = "arch"
-
-do_compile_prepend() {
-    # Remove the prepackaged config.h from the source tree as it overrides
-    # the same file generated by configure and placed in the build tree
-    rm -f ${S}/include/config.h
-
-    # Remove the '*.d' file to make sure the recompile is OK
-    for dep in `find ${B} -type f -name '*.d'`; do
-        dep_no_d="`echo $dep | sed 's#.d$##'`"
-        # Remove file.d when there is a file.o
-        if [ -f "$dep_no_d.o" ]; then
-            rm -f $dep
-        fi
-    done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch
deleted file mode 100644
index 84e94d7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 3bb73e5e5649b455e15d5ca3a7ad1a90c4960972 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 11:54:36 -0700
-Subject: [PATCH] arm64: Disable PIC
-
-Fix
-| cc1: sorry, unimplemented: code model 'large' with -fPIC
-| make: *** [Makefile:118: purgatory/arch/arm64/entry.o] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- purgatory/arch/arm64/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/purgatory/arch/arm64/Makefile b/purgatory/arch/arm64/Makefile
-index 636abea..80068ca 100644
---- a/purgatory/arch/arm64/Makefile
-+++ b/purgatory/arch/arm64/Makefile
-@@ -1,6 +1,7 @@
- 
- arm64_PURGATORY_EXTRA_CFLAGS = \
- 	-mcmodel=large \
-+	-fno-PIC \
- 	-fno-stack-protector \
- 	-fno-asynchronous-unwind-tables \
- 	-Wundef \
--- 
-2.13.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
deleted file mode 100644
index 822f28c..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 02eed0f8f2748fd7579f69e5373445b52b2b8754 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Mon, 17 Oct 2016 13:56:58 +0900
-Subject: [PATCH 1/9] kexec: exntend the semantics of kexec_iomem_for_each_line
-
-The current kexec_iomem_for_each_line() counts up all the lines for which
-a callback function returns zero(0) or positive, and otherwise it stops
-further scanning.
-This behavior is incovenient in some cases. For instance, on arm64, we want
-to count up "System RAM" entries, but need to skip "reserved" entries.
-
-So this patch extends the semantics so that we will continue to scan
-succeeding entries but not count lines for which a callback function
-returns positive.
-
-The current users of kexec_iomem_for_each_line(), arm, sh and x86, will not
-be affected by this change because
-* arm
-  The callback function only returns -1 or 0, and the return value of
-  kexec_iomem_for_each_line() will never be used.
-* sh, x86
-  The callback function may return (-1 for sh,) 0 or 1, but always returns
-  1 once we have reached the maximum number of entries allowed.
-  Even so the current kexec_iomem_for_each_line() counts them up.
-  This change actually fixes this bug.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/kexec-iomem.c | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c
-index 485a2e8..0a0277a 100644
---- a/kexec/kexec-iomem.c
-+++ b/kexec/kexec-iomem.c
-@@ -18,6 +18,9 @@
-  * Iterate over each line in the file returned by proc_iomem(). If match is
-  * NULL or if the line matches with our match-pattern then call the
-  * callback if non-NULL.
-+ * If match is NULL, callback should return a negative if error.
-+ * Otherwise the interation goes on, incrementing nr but only if callback
-+ * returns 0 (matched).
-  *
-  * Return the number of lines matched.
-  */
-@@ -37,7 +40,7 @@ int kexec_iomem_for_each_line(char *match,
- 	char *str;
- 	int consumed;
- 	int count;
--	int nr = 0;
-+	int nr = 0, ret;
- 
- 	fp = fopen(iomem, "r");
- 	if (!fp)
-@@ -50,11 +53,13 @@ int kexec_iomem_for_each_line(char *match,
- 		str = line + consumed;
- 		size = end - start + 1;
- 		if (!match || memcmp(str, match, strlen(match)) == 0) {
--			if (callback
--			    && callback(data, nr, str, start, size) < 0) {
--				break;
-+			if (callback) {
-+				ret = callback(data, nr, str, start, size);
-+				if (ret < 0)
-+					break;
-+				else if (ret == 0)
-+					nr++;
- 			}
--			nr++;
- 		}
- 	}
- 
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
deleted file mode 100644
index 90c2f6e..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 9 Jan 2016 17:16:16 -0800
-Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE
-
-loff_t is guarded with _GNU_SOURCE on some C library implementations
-e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
-include this define, it should help compiling on musl while nothing
-changes for glibc based systems since there _GNU_SOURCE is already
-defined
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- vmcore-dmesg/vmcore-dmesg.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
-index 0364636..a8f56df 100644
---- a/vmcore-dmesg/vmcore-dmesg.c
-+++ b/vmcore-dmesg/vmcore-dmesg.c
-@@ -1,4 +1,5 @@
- #define _XOPEN_SOURCE 600
-+#define _GNU_SOURCE
- #define _LARGEFILE_SOURCE 1
- #define _FILE_OFFSET_BITS 64
- #include <endian.h>
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch
deleted file mode 100644
index e601f52..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-From 1550f81bf1886aa0520da0b6181cd61c1a75d4ad Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <panand@redhat.com>
-Date: Tue, 14 Mar 2017 17:59:22 +0530
-Subject: [PATCH 1/2] x86/x86_64: Fix format warning with die()
-
-Fedora koji uses gcc version 7.0.1-0.12.fc27, and it generates a build
-warning
-
-   kexec/arch/i386/kexec-elf-x86.c:299:3: error: format not a string
-   literal and no format arguments [-Werror=format-security]
-       die(error_msg);
-       ^~~
-    cc1: some warnings being treated as errors
-
-error_msg can have a format specifier as well in string. In such cases,
-if there is no other arguments for the format variable then code will
-try to access a non existing argument. Therefore, use 1st argument as
-format specifier for string print and pass error_msg as the string to be
-printed.
-
-While doing that,also use const qualifier before "char *error_msg".
-
-Signed-off-by: Pratyush Anand <panand@redhat.com>
-Signed-off-by: Simon Horman <horms@verge.net.au>
----
- kexec/arch/i386/kexec-elf-x86.c      | 4 ++--
- kexec/arch/x86_64/kexec-elf-x86_64.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/kexec/arch/i386/kexec-elf-x86.c b/kexec/arch/i386/kexec-elf-x86.c
-index de00dcb..fedf031 100644
---- a/kexec/arch/i386/kexec-elf-x86.c
-+++ b/kexec/arch/i386/kexec-elf-x86.c
-@@ -91,7 +91,7 @@ int elf_x86_load(int argc, char **argv, const char *buf, off_t len,
- 	char *command_line = NULL, *modified_cmdline = NULL;
- 	const char *append = NULL;
- 	char *tmp_cmdline = NULL;
--	char *error_msg = NULL;
-+	const char *error_msg = NULL;
- 	int result;
- 	int command_line_len;
- 	const char *ramdisk;
-@@ -296,6 +296,6 @@ out:
- 	free(command_line);
- 	free(modified_cmdline);
- 	if (error_msg)
--		die(error_msg);
-+		die("%s", error_msg);
- 	return result;
- }
-diff --git a/kexec/arch/x86_64/kexec-elf-x86_64.c b/kexec/arch/x86_64/kexec-elf-x86_64.c
-index ae65692..ad22311 100644
---- a/kexec/arch/x86_64/kexec-elf-x86_64.c
-+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c
-@@ -99,7 +99,7 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len,
- #define ARG_STYLE_NONE  2
- 	int opt;
- 	int result = 0;
--	char *error_msg = NULL;
-+	const char *error_msg = NULL;
- 
- 	/* See options.h and add any new options there too! */
- 	static const struct option options[] = {
-@@ -276,6 +276,6 @@ out:
- 	free(command_line);
- 	free(modified_cmdline);
- 	if (error_msg)
--		die(error_msg);
-+		die("%s", error_msg);
- 	return result;
- }
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
deleted file mode 100644
index 953f13b..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From d29f37bb6e9114aba96c606103b110f511bee9a1 Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <panand@redhat.com>
-Date: Wed, 2 Nov 2016 15:05:25 +0530
-Subject: [PATCH 2/9] kexec: generalize and rename get_kernel_stext_sym()
-
-get_kernel_stext_sym() has been defined for both arm and i386. Other
-architecture might need some other kernel symbol address. Therefore rewrite
-this function as generic function to get any kernel symbol address.
-
-More over, kallsyms is not arch specific representation, therefore have
-common function for all arches.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: Pratyush Anand <panand@redhat.com>
-[created symbols.c]
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/Makefile                  |  1 +
- kexec/arch/arm/crashdump-arm.c  | 40 +---------------------------------------
- kexec/arch/i386/crashdump-x86.c | 29 -----------------------------
- kexec/kexec.h                   |  2 ++
- kexec/symbols.c                 | 41 +++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 45 insertions(+), 68 deletions(-)
- create mode 100644 kexec/symbols.c
-
-diff --git a/kexec/Makefile b/kexec/Makefile
-index 39f365f..2b4fb3d 100644
---- a/kexec/Makefile
-+++ b/kexec/Makefile
-@@ -26,6 +26,7 @@ KEXEC_SRCS_base += kexec/kernel_version.c
- KEXEC_SRCS_base += kexec/lzma.c
- KEXEC_SRCS_base += kexec/zlib.c
- KEXEC_SRCS_base += kexec/kexec-xen.c
-+KEXEC_SRCS_base += kexec/symbols.c
- 
- KEXEC_GENERATED_SRCS += $(PURGATORY_HEX_C)
- 
-diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
-index 4a89b5e..245c21a 100644
---- a/kexec/arch/arm/crashdump-arm.c
-+++ b/kexec/arch/arm/crashdump-arm.c
-@@ -73,48 +73,10 @@ static struct crash_elf_info elf_info = {
- 
- extern unsigned long long user_page_offset;
- 
--/* Retrieve kernel _stext symbol virtual address from /proc/kallsyms */
--static unsigned long long get_kernel_stext_sym(void)
--{
--	const char *kallsyms = "/proc/kallsyms";
--	const char *stext = "_stext";
--	char sym[128];
--	char line[128];
--	FILE *fp;
--	unsigned long long vaddr = 0;
--	char type;
--
--	fp = fopen(kallsyms, "r");
--	if (!fp) {
--		fprintf(stderr, "Cannot open %s\n", kallsyms);
--		return 0;
--	}
--
--	while(fgets(line, sizeof(line), fp) != NULL) {
--		unsigned long long addr;
--
--		if (sscanf(line, "%Lx %c %s", &addr, &type, sym) != 3)
--			continue;
--
--		if (strcmp(sym, stext) == 0) {
--			dbgprintf("kernel symbol %s vaddr = %#llx\n", stext, addr);
--			vaddr = addr;
--			break;
--		}
--	}
--
--	fclose(fp);
--
--	if (vaddr == 0)
--		fprintf(stderr, "Cannot get kernel %s symbol address\n", stext);
--
--	return vaddr;
--}
--
- static int get_kernel_page_offset(struct kexec_info *info,
- 		struct crash_elf_info *elf_info)
- {
--	unsigned long long stext_sym_addr = get_kernel_stext_sym();
-+	unsigned long long stext_sym_addr = get_kernel_sym("_stext");
- 	if (stext_sym_addr == 0) {
- 		if (user_page_offset != (-1ULL)) {
- 			elf_info->page_offset = user_page_offset;
-diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
-index ab833d4..abf82a5 100644
---- a/kexec/arch/i386/crashdump-x86.c
-+++ b/kexec/arch/i386/crashdump-x86.c
-@@ -102,35 +102,6 @@ static int get_kernel_paddr(struct kexec_info *UNUSED(info),
- 	return -1;
- }
- 
--/* Retrieve kernel symbol virtual address from /proc/kallsyms */
--static unsigned long long get_kernel_sym(const char *symbol)
--{
--	const char *kallsyms = "/proc/kallsyms";
--	char sym[128];
--	char line[128];
--	FILE *fp;
--	unsigned long long vaddr;
--	char type;
--
--	fp = fopen(kallsyms, "r");
--	if (!fp) {
--		fprintf(stderr, "Cannot open %s\n", kallsyms);
--		return 0;
--	}
--
--	while(fgets(line, sizeof(line), fp) != NULL) {
--		if (sscanf(line, "%Lx %c %s", &vaddr, &type, sym) != 3)
--			continue;
--		if (strcmp(sym, symbol) == 0) {
--			dbgprintf("kernel symbol %s vaddr = %16llx\n", symbol, vaddr);
--			return vaddr;
--		}
--	}
--
--	fprintf(stderr, "Cannot get kernel %s symbol address\n", symbol);
--	return 0;
--}
--
- /* Retrieve info regarding virtual address kernel has been compiled for and
-  * size of the kernel from /proc/kcore. Current /proc/kcore parsing from
-  * from kexec-tools fails because of malformed elf notes. A kernel patch has
-diff --git a/kexec/kexec.h b/kexec/kexec.h
-index 9194f1c..b4fafad 100644
---- a/kexec/kexec.h
-+++ b/kexec/kexec.h
-@@ -312,4 +312,6 @@ int xen_kexec_load(struct kexec_info *info);
- int xen_kexec_unload(uint64_t kexec_flags);
- void xen_kexec_exec(void);
- 
-+extern unsigned long long get_kernel_sym(const char *text);
-+
- #endif /* KEXEC_H */
-diff --git a/kexec/symbols.c b/kexec/symbols.c
-new file mode 100644
-index 0000000..ea6e327
---- /dev/null
-+++ b/kexec/symbols.c
-@@ -0,0 +1,41 @@
-+#include <stdio.h>
-+#include <string.h>
-+#include "kexec.h"
-+
-+/* Retrieve kernel symbol virtual address from /proc/kallsyms */
-+unsigned long long get_kernel_sym(const char *text)
-+{
-+	const char *kallsyms = "/proc/kallsyms";
-+	char sym[128];
-+	char line[128];
-+	FILE *fp;
-+	unsigned long long vaddr = 0;
-+	char type;
-+
-+	fp = fopen(kallsyms, "r");
-+	if (!fp) {
-+		fprintf(stderr, "Cannot open %s\n", kallsyms);
-+		return 0;
-+	}
-+
-+	while (fgets(line, sizeof(line), fp) != NULL) {
-+		unsigned long long addr;
-+
-+		if (sscanf(line, "%Lx %c %s", &addr, &type, sym) != 3)
-+			continue;
-+
-+		if (strcmp(sym, text) == 0) {
-+			dbgprintf("kernel symbol %s vaddr = %#llx\n",
-+								text, addr);
-+			vaddr = addr;
-+			break;
-+		}
-+	}
-+
-+	fclose(fp);
-+
-+	if (vaddr == 0)
-+		fprintf(stderr, "Cannot get kernel %s symbol address\n", text);
-+
-+	return vaddr;
-+}
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch
deleted file mode 100644
index 6a1c06d..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 1c956fc8c6b6324d8d38bba5f9e60a018051c6f5 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 16 Mar 2017 15:39:06 +0200
-Subject: [PATCH 2/2] ppc: Fix format warning with die()
-
-Enable compiling kexec-tools for ppc with -Werror=format-security.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted [Mailing list]
----
- kexec/arch/ppc/kexec-elf-ppc.c    | 2 +-
- kexec/arch/ppc/kexec-uImage-ppc.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/kexec/arch/ppc/kexec-elf-ppc.c b/kexec/arch/ppc/kexec-elf-ppc.c
-index 291f06d..ad43ad1 100644
---- a/kexec/arch/ppc/kexec-elf-ppc.c
-+++ b/kexec/arch/ppc/kexec-elf-ppc.c
-@@ -453,7 +453,7 @@ out:
- 	if (!tmp_cmdline)
- 		free(command_line);
- 	if (error_msg)
--		die(error_msg);
-+		die("%s", error_msg);
- 
- 	return result;
- }
-diff --git a/kexec/arch/ppc/kexec-uImage-ppc.c b/kexec/arch/ppc/kexec-uImage-ppc.c
-index 5eec6e4..e8f7adc 100644
---- a/kexec/arch/ppc/kexec-uImage-ppc.c
-+++ b/kexec/arch/ppc/kexec-uImage-ppc.c
-@@ -306,7 +306,7 @@ out:
- 	if (!tmp_cmdline)
- 		free(command_line);
- 	if (error_msg)
--		die(error_msg);
-+		die("%s", error_msg);
- 	return ret;
- }
- 
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
deleted file mode 100644
index 1a1c317..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 16df170ad4808d12acd5e919ac4f6e7f33a247b3 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Thu, 1 Sep 2016 10:57:42 +0900
-Subject: [PATCH 3/9] arm64: identify PHYS_OFFSET correctly
-
-Due to the kernel patch, commit e7cd190385d1 ("arm64: mark reserved
-memblock regions explicitly in iomem"), the current code will not be able
-to identify the correct value of PHYS_OFFSET if some "reserved" memory
-region, which is likely to be UEFI runtime services code/data, exists at
-an address below the first "System RAM" regions.
-
-This patch fixes this issue.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/iomem.h       |  7 +++++++
- kexec/arch/arm64/kexec-arm64.c | 12 ++++++++++--
- 2 files changed, 17 insertions(+), 2 deletions(-)
- create mode 100644 kexec/arch/arm64/iomem.h
-
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h
-new file mode 100644
-index 0000000..7fd66eb
---- /dev/null
-+++ b/kexec/arch/arm64/iomem.h
-@@ -0,0 +1,7 @@
-+#ifndef IOMEM_H
-+#define IOMEM_H
-+
-+#define SYSTEM_RAM		"System RAM\n"
-+#define IOMEM_RESERVED		"reserved\n"
-+
-+#endif
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index 2e8839a..8ac811d 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -21,6 +21,7 @@
- #include "crashdump-arm64.h"
- #include "dt-ops.h"
- #include "fs2dt.h"
-+#include "iomem.h"
- #include "kexec-syscall.h"
- #include "arch/options.h"
- 
-@@ -475,7 +476,14 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str,
- 		return -1;
- 
- 	r = (struct memory_range *)data + nr;
--	r->type = RANGE_RAM;
-+
-+	if (!strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)))
-+		r->type = RANGE_RAM;
-+	else if (!strncmp(str, IOMEM_RESERVED, strlen(IOMEM_RESERVED)))
-+		r->type = RANGE_RESERVED;
-+	else
-+		return 1;
-+
- 	r->start = base;
- 	r->end = base + length - 1;
- 
-@@ -494,7 +502,7 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str,
- static int get_memory_ranges_iomem(struct memory_range *array,
- 	unsigned int *count)
- {
--	*count = kexec_iomem_for_each_line("System RAM\n",
-+	*count = kexec_iomem_for_each_line(NULL,
- 		get_memory_ranges_iomem_cb, array);
- 
- 	if (!*count) {
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
deleted file mode 100644
index 66600f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From 48a4c7874d8264ddbfaec2e9858d7866a2d2eb60 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Wed, 5 Aug 2015 13:16:30 +0900
-Subject: [PATCH 4/9] arm64: kdump: identify memory regions
-
-The following regions need to be identified for later use:
- a) memory regions which belong to the 1st kernel
- b) usable memory reserved for crash dump kernel
-
-We go through /proc/iomem to find out a) and b) which are marked
-as "System RAM" and "Crash kernel", respectively.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/Makefile          |   2 +
- kexec/arch/arm64/crashdump-arm64.c | 100 ++++++++++++++++++++++++++++++++++++-
- kexec/arch/arm64/crashdump-arm64.h |  14 +++++-
- kexec/arch/arm64/iomem.h           |   1 +
- 4 files changed, 114 insertions(+), 3 deletions(-)
-
-diff --git a/kexec/arch/arm64/Makefile b/kexec/arch/arm64/Makefile
-index 74b677f..2d4ae0e 100644
---- a/kexec/arch/arm64/Makefile
-+++ b/kexec/arch/arm64/Makefile
-@@ -6,6 +6,8 @@ arm64_FS2DT_INCLUDE += \
- 
- arm64_DT_OPS += kexec/dt-ops.c
- 
-+arm64_MEM_REGIONS = kexec/mem_regions.c
-+
- arm64_CPPFLAGS += -I $(srcdir)/kexec/
- 
- arm64_KEXEC_SRCS += \
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c
-index d2272c8..dcaca43 100644
---- a/kexec/arch/arm64/crashdump-arm64.c
-+++ b/kexec/arch/arm64/crashdump-arm64.c
-@@ -1,5 +1,13 @@
- /*
-  * ARM64 crashdump.
-+ *     partly derived from arm implementation
-+ *
-+ * Copyright (c) 2014-2016 Linaro Limited
-+ * Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-  */
- 
- #define _GNU_SOURCE
-@@ -10,12 +18,102 @@
- #include "kexec.h"
- #include "crashdump.h"
- #include "crashdump-arm64.h"
-+#include "iomem.h"
- #include "kexec-arm64.h"
- #include "kexec-elf.h"
-+#include "mem_regions.h"
- 
--struct memory_ranges usablemem_rgns = {};
-+/* memory ranges on crashed kernel */
-+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
-+static struct memory_ranges crash_memory_rgns = {
-+	.size = 0,
-+	.max_size = CRASH_MAX_MEMORY_RANGES,
-+	.ranges = crash_memory_ranges,
-+};
-+
-+/* memory range reserved for crashkernel */
-+struct memory_range crash_reserved_mem;
-+struct memory_ranges usablemem_rgns = {
-+	.size = 0,
-+	.max_size = 1,
-+	.ranges = &crash_reserved_mem,
-+};
-+
-+/*
-+ * iomem_range_callback() - callback called for each iomem region
-+ * @data: not used
-+ * @nr: not used
-+ * @str: name of the memory region
-+ * @base: start address of the memory region
-+ * @length: size of the memory region
-+ *
-+ * This function is called once for each memory region found in /proc/iomem.
-+ * It locates system RAM and crashkernel reserved memory and places these to
-+ * variables, respectively, crash_memory_ranges and crash_reserved_mem.
-+ */
-+
-+static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),
-+				char *str, unsigned long long base,
-+				unsigned long long length)
-+{
-+	if (strncmp(str, CRASH_KERNEL, strlen(CRASH_KERNEL)) == 0)
-+		return mem_regions_add(&usablemem_rgns,
-+				       base, length, RANGE_RAM);
-+	else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0)
-+		return mem_regions_add(&crash_memory_rgns,
-+				       base, length, RANGE_RAM);
-+
-+	return 0;
-+}
- 
- int is_crashkernel_mem_reserved(void)
- {
-+	if (!crash_reserved_mem.end)
-+		kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL);
-+
-+	return crash_reserved_mem.start != crash_reserved_mem.end;
-+}
-+
-+/*
-+ * crash_get_memory_ranges() - read system physical memory
-+ *
-+ * Function reads through system physical memory and stores found memory
-+ * regions in crash_memory_ranges.
-+ * Regions are sorted in ascending order.
-+ *
-+ * Returns 0 in case of success and -1 otherwise (errno is set).
-+ */
-+static int crash_get_memory_ranges(void)
-+{
-+	/*
-+	 * First read all memory regions that can be considered as
-+	 * system memory including the crash area.
-+	 */
-+	if (!usablemem_rgns.size)
-+		kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL);
-+
-+	/* allow only a single region for crash dump kernel */
-+	if (usablemem_rgns.size != 1) {
-+		errno = EINVAL;
-+		return -1;
-+	}
-+
-+	dbgprint_mem_range("Reserved memory range", &crash_reserved_mem, 1);
-+
-+	if (mem_regions_exclude(&crash_memory_rgns, &crash_reserved_mem)) {
-+		fprintf(stderr,
-+			"Error: Number of crash memory ranges excedeed the max limit\n");
-+		errno = ENOMEM;
-+		return -1;
-+	}
-+
-+	/*
-+	 * Make sure that the memory regions are sorted.
-+	 */
-+	mem_regions_sort(&crash_memory_rgns);
-+
-+	dbgprint_mem_range("Coredump memory ranges",
-+			   crash_memory_rgns.ranges, crash_memory_rgns.size);
-+
- 	return 0;
- }
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h
-index f33c7a2..07a0ed0 100644
---- a/kexec/arch/arm64/crashdump-arm64.h
-+++ b/kexec/arch/arm64/crashdump-arm64.h
-@@ -1,12 +1,22 @@
- /*
-  * ARM64 crashdump.
-+ *
-+ * Copyright (c) 2014-2016 Linaro Limited
-+ * Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-  */
- 
--#if !defined(CRASHDUMP_ARM64_H)
-+#ifndef CRASHDUMP_ARM64_H
- #define CRASHDUMP_ARM64_H
- 
- #include "kexec.h"
- 
-+#define CRASH_MAX_MEMORY_RANGES	32
-+
- extern struct memory_ranges usablemem_rgns;
-+extern struct memory_range crash_reserved_mem;
- 
--#endif
-+#endif /* CRASHDUMP_ARM64_H */
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h
-index 7fd66eb..20cda87 100644
---- a/kexec/arch/arm64/iomem.h
-+++ b/kexec/arch/arm64/iomem.h
-@@ -2,6 +2,7 @@
- #define IOMEM_H
- 
- #define SYSTEM_RAM		"System RAM\n"
-+#define CRASH_KERNEL		"Crash kernel\n"
- #define IOMEM_RESERVED		"reserved\n"
- 
- #endif
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
deleted file mode 100644
index fe535b6..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From 769da25627cebb2a53caee5d5be78a32d376adc1 Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Wed, 5 Aug 2015 13:45:15 +0900
-Subject: [PATCH 5/9] arm64: kdump: add elf core header segment
-
-Elf core header contains the information necessary for the coredump of
-the 1st kernel, including its physcal memory layout as well as cpu register
-states at the panic.
-The segment is allocated inside the reserved memory of crash dump kernel.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/crashdump-arm64.c | 96 ++++++++++++++++++++++++++++++++++++++
- kexec/arch/arm64/crashdump-arm64.h |  3 ++
- kexec/arch/arm64/iomem.h           |  2 +
- kexec/arch/arm64/kexec-elf-arm64.c | 10 ++++
- 4 files changed, 111 insertions(+)
-
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c
-index dcaca43..8346131 100644
---- a/kexec/arch/arm64/crashdump-arm64.c
-+++ b/kexec/arch/arm64/crashdump-arm64.c
-@@ -39,6 +39,39 @@ struct memory_ranges usablemem_rgns = {
- 	.ranges = &crash_reserved_mem,
- };
- 
-+struct memory_range elfcorehdr_mem;
-+
-+static struct crash_elf_info elf_info = {
-+	.class		= ELFCLASS64,
-+#if (__BYTE_ORDER == __LITTLE_ENDIAN)
-+	.data		= ELFDATA2LSB,
-+#else
-+	.data		= ELFDATA2MSB,
-+#endif
-+	.machine	= EM_AARCH64,
-+};
-+
-+/*
-+ * Note: The returned value is correct only if !CONFIG_RANDOMIZE_BASE.
-+ */
-+static uint64_t get_kernel_page_offset(void)
-+{
-+	int i;
-+
-+	if (elf_info.kern_vaddr_start == UINT64_MAX)
-+		return UINT64_MAX;
-+
-+	/* Current max virtual memory range is 48-bits. */
-+	for (i = 48; i > 0; i--)
-+		if (!(elf_info.kern_vaddr_start & (1UL << i)))
-+			break;
-+
-+	if (i <= 0)
-+		return UINT64_MAX;
-+	else
-+		return UINT64_MAX << i;
-+}
-+
- /*
-  * iomem_range_callback() - callback called for each iomem region
-  * @data: not used
-@@ -62,6 +95,10 @@ static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),
- 	else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0)
- 		return mem_regions_add(&crash_memory_rgns,
- 				       base, length, RANGE_RAM);
-+	else if (strncmp(str, KERNEL_CODE, strlen(KERNEL_CODE)) == 0)
-+		elf_info.kern_paddr_start = base;
-+	else if (strncmp(str, KERNEL_DATA, strlen(KERNEL_DATA)) == 0)
-+		elf_info.kern_size = base + length - elf_info.kern_paddr_start;
- 
- 	return 0;
- }
-@@ -115,5 +152,64 @@ static int crash_get_memory_ranges(void)
- 	dbgprint_mem_range("Coredump memory ranges",
- 			   crash_memory_rgns.ranges, crash_memory_rgns.size);
- 
-+	/*
-+	 * For additional kernel code/data segment.
-+	 * kern_paddr_start/kern_size are determined in iomem_range_callback
-+	 */
-+	elf_info.kern_vaddr_start = get_kernel_sym("_text");
-+	if (!elf_info.kern_vaddr_start)
-+		elf_info.kern_vaddr_start = UINT64_MAX;
-+
-+	return 0;
-+}
-+
-+/*
-+ * load_crashdump_segments() - load the elf core header
-+ * @info: kexec info structure
-+ *
-+ * This function creates and loads an additional segment of elf core header
-+ : which is used to construct /proc/vmcore on crash dump kernel.
-+ *
-+ * Return 0 in case of success and -1 in case of error.
-+ */
-+
-+int load_crashdump_segments(struct kexec_info *info)
-+{
-+	unsigned long elfcorehdr;
-+	unsigned long bufsz;
-+	void *buf;
-+	int err;
-+
-+	/*
-+	 * First fetch all the memory (RAM) ranges that we are going to
-+	 * pass to the crash dump kernel during panic.
-+	 */
-+
-+	err = crash_get_memory_ranges();
-+
-+	if (err)
-+		return err;
-+
-+	elf_info.page_offset = get_kernel_page_offset();
-+	dbgprintf("%s: page_offset:   %016llx\n", __func__,
-+			elf_info.page_offset);
-+
-+	err = crash_create_elf64_headers(info, &elf_info,
-+			crash_memory_rgns.ranges, crash_memory_rgns.size,
-+			&buf, &bufsz, ELF_CORE_HEADER_ALIGN);
-+
-+	if (err)
-+		return err;
-+
-+	elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 0,
-+		crash_reserved_mem.start, crash_reserved_mem.end,
-+		-1, 0);
-+
-+	elfcorehdr_mem.start = elfcorehdr;
-+	elfcorehdr_mem.end = elfcorehdr + bufsz - 1;
-+
-+	dbgprintf("%s: elfcorehdr 0x%llx-0x%llx\n", __func__,
-+			elfcorehdr_mem.start, elfcorehdr_mem.end);
-+
- 	return 0;
- }
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h
-index 07a0ed0..da75a2d 100644
---- a/kexec/arch/arm64/crashdump-arm64.h
-+++ b/kexec/arch/arm64/crashdump-arm64.h
-@@ -18,5 +18,8 @@
- 
- extern struct memory_ranges usablemem_rgns;
- extern struct memory_range crash_reserved_mem;
-+extern struct memory_range elfcorehdr_mem;
-+
-+extern int load_crashdump_segments(struct kexec_info *info);
- 
- #endif /* CRASHDUMP_ARM64_H */
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h
-index 20cda87..d4864bb 100644
---- a/kexec/arch/arm64/iomem.h
-+++ b/kexec/arch/arm64/iomem.h
-@@ -2,6 +2,8 @@
- #define IOMEM_H
- 
- #define SYSTEM_RAM		"System RAM\n"
-+#define KERNEL_CODE		"Kernel code\n"
-+#define KERNEL_DATA		"Kernel data\n"
- #define CRASH_KERNEL		"Crash kernel\n"
- #define IOMEM_RESERVED		"reserved\n"
- 
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
-index daf8bf0..c70a37a 100644
---- a/kexec/arch/arm64/kexec-elf-arm64.c
-+++ b/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -119,6 +119,16 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- 	dbgprintf("%s: PE format:      %s\n", __func__,
- 		(arm64_header_check_pe_sig(header) ? "yes" : "no"));
- 
-+	if (info->kexec_flags & KEXEC_ON_CRASH) {
-+		/* create and initialize elf core header segment */
-+		result = load_crashdump_segments(info);
-+		if (result) {
-+			dbgprintf("%s: Creating eflcorehdr failed.\n",
-+								__func__);
-+			goto exit;
-+		}
-+	}
-+
- 	/* load the kernel */
- 	result = elf_exec_load(&ehdr, info);
- 
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
deleted file mode 100644
index 4149551..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 4079c93ac5453ef5f7889ab64920c1e9427690ef Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Tue, 17 Feb 2015 16:06:55 +0900
-Subject: [PATCH 6/9] arm64: kdump: set up kernel image segment
-
-On arm64, we can use the same kernel image as 1st kernel, but
-we have to modify the entry point as well as segments' addresses
-in the kernel's elf header in order to load them into correct places.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/crashdump-arm64.c | 23 +++++++++++++++++++++++
- kexec/arch/arm64/crashdump-arm64.h |  1 +
- kexec/arch/arm64/kexec-arm64.c     | 25 ++++++++++++++++++++-----
- kexec/arch/arm64/kexec-elf-arm64.c | 10 +++++++++-
- 4 files changed, 53 insertions(+), 6 deletions(-)
-
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c
-index 8346131..9517329 100644
---- a/kexec/arch/arm64/crashdump-arm64.c
-+++ b/kexec/arch/arm64/crashdump-arm64.c
-@@ -213,3 +213,26 @@ int load_crashdump_segments(struct kexec_info *info)
- 
- 	return 0;
- }
-+
-+/*
-+ * e_entry and p_paddr are actually in virtual address space.
-+ * Those values will be translated to physcal addresses by
-+ * using virt_to_phys().
-+ * So let's get ready for later use so the memory base (phys_offset)
-+ * will be correctly replaced with crash_reserved_mem.start.
-+ */
-+void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr)
-+{
-+	struct mem_phdr *phdr;
-+	int i;
-+
-+	ehdr->e_entry += - arm64_mem.phys_offset + crash_reserved_mem.start;
-+
-+	for (i = 0; i < ehdr->e_phnum; i++) {
-+		phdr = &ehdr->e_phdr[i];
-+		if (phdr->p_type != PT_LOAD)
-+			continue;
-+		phdr->p_paddr +=
-+			(-arm64_mem.phys_offset + crash_reserved_mem.start);
-+	}
-+}
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h
-index da75a2d..382f571 100644
---- a/kexec/arch/arm64/crashdump-arm64.h
-+++ b/kexec/arch/arm64/crashdump-arm64.h
-@@ -21,5 +21,6 @@ extern struct memory_range crash_reserved_mem;
- extern struct memory_range elfcorehdr_mem;
- 
- extern int load_crashdump_segments(struct kexec_info *info);
-+extern void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr);
- 
- #endif /* CRASHDUMP_ARM64_H */
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index 8ac811d..cec4e41 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -307,12 +307,27 @@ unsigned long arm64_locate_kernel_segment(struct kexec_info *info)
- {
- 	unsigned long hole;
- 
--	hole = locate_hole(info,
--		arm64_mem.text_offset + arm64_mem.image_size,
--		MiB(2), 0, ULONG_MAX, 1);
-+	if (info->kexec_flags & KEXEC_ON_CRASH) {
-+		unsigned long hole_end;
-+
-+		hole = (crash_reserved_mem.start < mem_min ?
-+				mem_min : crash_reserved_mem.start);
-+		hole = _ALIGN_UP(hole, MiB(2));
-+		hole_end = hole + arm64_mem.text_offset + arm64_mem.image_size;
-+
-+		if ((hole_end > mem_max) ||
-+		    (hole_end > crash_reserved_mem.end)) {
-+			dbgprintf("%s: Crash kernel out of range\n", __func__);
-+			hole = ULONG_MAX;
-+		}
-+	} else {
-+		hole = locate_hole(info,
-+			arm64_mem.text_offset + arm64_mem.image_size,
-+			MiB(2), 0, ULONG_MAX, 1);
- 
--	if (hole == ULONG_MAX)
--		dbgprintf("%s: locate_hole failed\n", __func__);
-+		if (hole == ULONG_MAX)
-+			dbgprintf("%s: locate_hole failed\n", __func__);
-+	}
- 
- 	return hole;
- }
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
-index c70a37a..842ce21 100644
---- a/kexec/arch/arm64/kexec-elf-arm64.c
-+++ b/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -9,6 +9,7 @@
- #include <stdlib.h>
- #include <linux/elf.h>
- 
-+#include "crashdump-arm64.h"
- #include "kexec-arm64.h"
- #include "kexec-elf.h"
- #include "kexec-syscall.h"
-@@ -105,7 +106,8 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- 	}
- 
- 	arm64_mem.vp_offset = _ALIGN_DOWN(ehdr.e_entry, MiB(2));
--	arm64_mem.vp_offset -= kernel_segment - get_phys_offset();
-+	if (!(info->kexec_flags & KEXEC_ON_CRASH))
-+		arm64_mem.vp_offset -= kernel_segment - get_phys_offset();
- 
- 	dbgprintf("%s: kernel_segment: %016lx\n", __func__, kernel_segment);
- 	dbgprintf("%s: text_offset:    %016lx\n", __func__,
-@@ -127,6 +129,12 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- 								__func__);
- 			goto exit;
- 		}
-+
-+		/*
-+		 * offset addresses in order to fit vmlinux
-+		 * (elf_exec) into crash kernel's memory
-+		 */
-+		modify_ehdr_for_crashdump(&ehdr);
- 	}
- 
- 	/* load the kernel */
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
deleted file mode 100644
index 2745466..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 07ad14e12665221d754fde8e47c32ac18c24586a Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Fri, 31 Jul 2015 20:01:39 +0900
-Subject: [PATCH 7/9] arm64: kdump: set up other segments
-
-We make sure that all the other segments, initrd and device-tree blob,
-also be loaded into the reserved memory of crash dump kernel.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/kexec-arm64.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index cec4e41..78a0035 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -374,7 +374,10 @@ int arm64_load_other_segments(struct kexec_info *info,
- 	/* Put the other segments after the image. */
- 
- 	hole_min = image_base + arm64_mem.image_size;
--	hole_max = ULONG_MAX;
-+	if (info->kexec_flags & KEXEC_ON_CRASH)
-+		hole_max = crash_reserved_mem.end;
-+	else
-+		hole_max = ULONG_MAX;
- 
- 	if (arm64_opts.initrd) {
- 		initrd_buf = slurp_file(arm64_opts.initrd, &initrd_size);
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
deleted file mode 100644
index 31c3d85..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 23bf7ac189cc3b87ceb9d1d3b69b5c4815354add Mon Sep 17 00:00:00 2001
-From: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Date: Wed, 27 Jan 2016 13:38:39 +0900
-Subject: [PATCH 8/9] arm64: kdump: add DT properties to crash dump kernel's
- dtb
-
-We pass the following properties to crash dump kernel:
-linux,elfcorehdr: elf core header segment,
-		  same as "elfcorehdr=" kernel parameter on other archs
-linux,usable-memory-range: usable memory reserved for crash dump kernel
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/kexec-arm64.c     | 76 +++++++++++++++++++++++++++++++++++---
- kexec/arch/arm64/kexec-elf-arm64.c |  5 ---
- 2 files changed, 71 insertions(+), 10 deletions(-)
-
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
-index 78a0035..a8fb64f 100644
---- a/kexec/arch/arm64/kexec-arm64.c
-+++ b/kexec/arch/arm64/kexec-arm64.c
-@@ -128,9 +128,6 @@ int arch_process_options(int argc, char **argv)
- 		case OPT_INITRD:
- 			arm64_opts.initrd = optarg;
- 			break;
--		case OPT_PANIC:
--			die("load-panic (-p) not supported");
--			break;
- 		default:
- 			break; /* Ignore core and unknown options. */
- 		}
-@@ -285,8 +282,12 @@ on_success:
-  * setup_2nd_dtb - Setup the 2nd stage kernel's dtb.
-  */
- 
--static int setup_2nd_dtb(struct dtb *dtb, char *command_line)
-+static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)
- {
-+	char *new_buf;
-+	int new_size;
-+	int nodeoffset;
-+	uint64_t range[2];
- 	int result;
- 
- 	result = fdt_check_header(dtb->buf);
-@@ -298,8 +299,72 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line)
- 
- 	result = set_bootargs(dtb, command_line);
- 
-+	/* remove those anyway */
-+	nodeoffset = fdt_path_offset(dtb->buf, "/chosen");
-+	fdt_delprop(dtb->buf, nodeoffset, "linux,crashkernel-base");
-+	fdt_delprop(dtb->buf, nodeoffset, "linux,crashkernel-size");
-+
-+	if (on_crash) {
-+		nodeoffset = fdt_path_offset(dtb->buf, "/chosen");
-+		fdt_delprop(dtb->buf, nodeoffset, "linux,elfcorehdr");
-+		fdt_delprop(dtb->buf, nodeoffset, "linux,usable-memory-range");
-+		new_size = fdt_totalsize(dtb->buf)
-+			+ 2 * (sizeof(struct fdt_property)
-+					+ FDT_TAGALIGN(sizeof(range)))
-+			+ strlen("linux,elfcorehdr") + 1
-+			+ strlen("linux,usable-memory-range") + 1;
-+
-+		new_buf = xmalloc(new_size);
-+		result = fdt_open_into(dtb->buf, new_buf, new_size);
-+		if (result) {
-+			dbgprintf("%s: fdt_open_into failed: %s\n", __func__,
-+				fdt_strerror(result));
-+			result = -ENOSPC;
-+			goto on_error;
-+		}
-+
-+		range[0] = cpu_to_be64(elfcorehdr_mem.start);
-+		range[1] = cpu_to_be64(elfcorehdr_mem.end
-+				- elfcorehdr_mem.start + 1);
-+		nodeoffset = fdt_path_offset(new_buf, "/chosen");
-+		result = fdt_setprop(new_buf, nodeoffset, "linux,elfcorehdr",
-+				(void *)range, sizeof(range));
-+		if (result) {
-+			dbgprintf("%s: fdt_setprop failed: %s\n", __func__,
-+				fdt_strerror(result));
-+			result = -EINVAL;
-+			goto on_error;
-+		}
-+
-+		range[0] = cpu_to_be64(crash_reserved_mem.start);
-+		range[1] = cpu_to_be64(crash_reserved_mem.end
-+				- crash_reserved_mem.start + 1);
-+		nodeoffset = fdt_path_offset(new_buf, "/chosen");
-+		result = fdt_setprop(new_buf, nodeoffset,
-+				"linux,usable-memory-range",
-+				(void *)range, sizeof(range));
-+		if (result) {
-+			dbgprintf("%s: fdt_setprop failed: %s\n", __func__,
-+				fdt_strerror(result));
-+			result = -EINVAL;
-+			goto on_error;
-+		}
-+
-+		fdt_pack(new_buf);
-+		dtb->buf = new_buf;
-+		dtb->size = fdt_totalsize(new_buf);
-+	}
-+
- 	dump_reservemap(dtb);
- 
-+
-+	return result;
-+
-+on_error:
-+	fprintf(stderr, "kexec: %s failed.\n", __func__);
-+	if (new_buf)
-+		free(new_buf);
-+
- 	return result;
- }
- 
-@@ -366,7 +431,8 @@ int arm64_load_other_segments(struct kexec_info *info,
- 		}
- 	}
- 
--	result = setup_2nd_dtb(&dtb, command_line);
-+	result = setup_2nd_dtb(&dtb, command_line,
-+			info->kexec_flags & KEXEC_ON_CRASH);
- 
- 	if (result)
- 		return -EFAILED;
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
-index 842ce21..b17a31a 100644
---- a/kexec/arch/arm64/kexec-elf-arm64.c
-+++ b/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -47,11 +47,6 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,
- 	int result;
- 	int i;
- 
--	if (info->kexec_flags & KEXEC_ON_CRASH) {
--		fprintf(stderr, "kexec: kdump not yet supported on arm64\n");
--		return -EFAILED;
--	}
--
- 	result = build_elf_exec_info(kernel_buf, kernel_size, &ehdr, 0);
- 
- 	if (result < 0) {
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
deleted file mode 100644
index 8b1c018..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 5a4958f01a793c3e7f440f5bae75666a4349cc50 Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <panand@redhat.com>
-Date: Thu, 14 May 2015 11:25:37 +0530
-Subject: [PATCH 9/9] arm64: kdump: Add support for binary image files
-
-This patch adds support to use binary image ie arch/arm64/boot/Image with
-kdump.
-
-Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git]
-
-Signed-off-by: Pratyush Anand <panand@redhat.com>
-[takahiro.akashi@linaro.org: a bit reworked]
-Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- kexec/arch/arm64/kexec-image-arm64.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/kexec/arch/arm64/kexec-image-arm64.c b/kexec/arch/arm64/kexec-image-arm64.c
-index 960ed96..982e431 100644
---- a/kexec/arch/arm64/kexec-image-arm64.c
-+++ b/kexec/arch/arm64/kexec-image-arm64.c
-@@ -4,7 +4,9 @@
- 
- #define _GNU_SOURCE
- 
-+#include "crashdump-arm64.h"
- #include "kexec-arm64.h"
-+#include "kexec-syscall.h"
- #include <limits.h>
- 
- int image_arm64_probe(const char *kernel_buf, off_t kernel_size)
-@@ -58,6 +60,16 @@ int image_arm64_load(int argc, char **argv, const char *kernel_buf,
- 	dbgprintf("%s: PE format:      %s\n", __func__,
- 		(arm64_header_check_pe_sig(header) ? "yes" : "no"));
- 
-+	if (info->kexec_flags & KEXEC_ON_CRASH) {
-+		/* create and initialize elf core header segment */
-+		result = load_crashdump_segments(info);
-+		if (result) {
-+			dbgprintf("%s: Creating eflcorehdr failed.\n",
-+								__func__);
-+			goto exit;
-+		}
-+	}
-+
- 	/* load the kernel */
- 	add_segment_phys_virt(info, kernel_buf, kernel_size,
- 			kernel_segment + arm64_mem.text_offset,
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
deleted file mode 100644
index b03f582..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
+++ /dev/null
@@ -1,801 +0,0 @@
-From: Geoff Levand <geoff@infradead.org>
-Date: Mon, 15 Jul 2013 23:32:36 +0000 (-0700)
-Subject: Add arm64 support
-X-Git-Url: https://git.linaro.org/gitweb?p=people%2Fgeoff%2Fkexec-tools.git;a=commitdiff_plain;h=fbf5ac6c2c70ec0f6da2b9ff563e573999752c01
-
-Add arm64 support
-
-Signed-off-by: Geoff Levand <geoff@infradead.org>
-
-Get patch from:
-https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-
----
- configure.ac                            |    3 
- kexec/Makefile                          |    1 
- kexec/arch/arm64/Makefile               |   13 +
- kexec/arch/arm64/crashdump-arm64.c      |  305 ++++++++++++++++++++++++++++++++
- kexec/arch/arm64/include/arch/options.h |   26 ++
- kexec/arch/arm64/kexec-arm64.c          |  177 ++++++++++++++++++
- kexec/arch/arm64/kexec-arm64.h          |   20 ++
- kexec/arch/arm64/kexec-elf-arm64.c      |  114 +++++++++++
- kexec/kexec-syscall.h                   |    9 
- kexec/kexec.c                           |    2 
- purgatory/arch/arm64/Makefile           |    7 
- 11 files changed, 675 insertions(+), 2 deletions(-)
-
-Index: kexec-tools-2.0.10/configure.ac
-===================================================================
---- kexec-tools-2.0.10.orig/configure.ac
-+++ kexec-tools-2.0.10/configure.ac
-@@ -36,6 +36,9 @@ case $target_cpu in
- 		ARCH="ppc64"
- 		SUBARCH="LE"
- 		;;
-+	aarch64* )
-+		ARCH="arm64"
-+		;;
- 	arm* )
- 		ARCH="arm"
- 		;;
-Index: kexec-tools-2.0.10/kexec/Makefile
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/Makefile
-+++ kexec-tools-2.0.10/kexec/Makefile
-@@ -71,6 +71,7 @@ KEXEC_SRCS			+= $($(ARCH)_FS2DT)
- 
- include $(srcdir)/kexec/arch/alpha/Makefile
- include $(srcdir)/kexec/arch/arm/Makefile
-+include $(srcdir)/kexec/arch/arm64/Makefile
- include $(srcdir)/kexec/arch/i386/Makefile
- include $(srcdir)/kexec/arch/ia64/Makefile
- include $(srcdir)/kexec/arch/m68k/Makefile
-Index: kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-@@ -0,0 +1,13 @@
-+
-+arm64_KEXEC_SRCS += \
-+	kexec/arch/arm64/kexec-arm64.c \
-+	kexec/arch/arm64/kexec-elf-arm64.c \
-+	kexec/arch/arm64/crashdump-arm64.c
-+
-+arm64_ARCH_REUSE_INITRD =
-+arm64_ADD_SEGMENT =
-+arm64_VIRT_TO_PHYS =
-+
-+dist += $(arm64_KEXEC_SRCS) \
-+	kexec/arch/arm64/Makefile \
-+	kexec/arch/arm64/kexec-arm64.h
-Index: kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-@@ -0,0 +1,305 @@
-+/*
-+ * 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 (version 2 of the License).
-+ */
-+
-+#include "../../kexec.h"
-+#include "../../kexec-elf.h"
-+#include "../../crashdump.h"
-+
-+int is_crashkernel_mem_reserved(void)
-+{
-+	return 0;
-+}
-+
-+#if 0
-+/*
-+ * Used to save various memory ranges/regions needed for the captured
-+ * kernel to boot. (lime memmap= option in other archs)
-+ */
-+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
-+struct memory_ranges usablemem_rgns = {
-+    .size = 0,
-+    .ranges = crash_memory_ranges,
-+};
-+
-+/* memory range reserved for crashkernel */
-+static struct memory_range crash_reserved_mem;
-+
-+static struct crash_elf_info elf_info = {
-+	.class		= ELFCLASS32,
-+	.data		= ELFDATA2LSB,
-+	.machine	= EM_ARM,
-+	.page_offset	= PAGE_OFFSET,
-+};
-+
-+unsigned long phys_offset;
-+
-+/**
-+ * crash_range_callback() - callback called for each iomem region
-+ * @data: not used
-+ * @nr: not used
-+ * @str: name of the memory region
-+ * @base: start address of the memory region
-+ * @length: size of the memory region
-+ *
-+ * This function is called once for each memory region found in /proc/iomem. It
-+ * locates system RAM and crashkernel reserved memory and places these to
-+ * variables: @crash_memory_ranges and @crash_reserved_mem. Number of memory
-+ * regions is placed in @crash_memory_nr_ranges.
-+ */
-+static int crash_range_callback(void *UNUSED(data), int UNUSED(nr),
-+				char *str, unsigned long base,
-+				unsigned long length)
-+{
-+	struct memory_range *range;
-+
-+	if (usablemem_rgns.size >= CRASH_MAX_MEMORY_RANGES)
-+		return 1;
-+
-+	range = usablemem_rgns.ranges + usablemem_rgns.size;
-+
-+	if (strncmp(str, "System RAM\n", 11) == 0) {
-+		range->start = base;
-+		range->end = base + length - 1;
-+		range->type = RANGE_RAM;
-+		usablemem_rgns.size++;
-+	} else if (strncmp(str, "Crash kernel\n", 13) == 0) {
-+		crash_reserved_mem.start = base;
-+		crash_reserved_mem.end = base + length - 1;
-+		crash_reserved_mem.type = RANGE_RAM;
-+	}
-+
-+	return 0;
-+}
-+
-+/**
-+ * crash_exclude_range() - excludes memory region reserved for crashkernel
-+ *
-+ * Function locates where crashkernel reserved memory is and removes that region
-+ * from the available memory regions.
-+ */
-+static void crash_exclude_range(void)
-+{
-+	const struct memory_range *range = &crash_reserved_mem;
-+	int i;
-+
-+	for (i = 0; i < usablemem_rgns.size; i++) {
-+		struct memory_range *r = usablemem_rgns.ranges + i;
-+
-+		/*
-+		 * We assume that crash area is fully contained in
-+		 * some larger memory area.
-+		 */
-+		if (r->start <= range->start && r->end >= range->end) {
-+			struct memory_range *new;
-+			/*
-+			 * Let's split this area into 2 smaller ones and
-+			 * remove excluded range from between. First create
-+			 * new entry for the remaining area.
-+			 */
-+			new = usablemem_rgns.ranges + usablemem_rgns.size;
-+			new->start = range->end + 1;
-+			new->end = r->end;
-+			usablemem_rgns.size++;
-+			/*
-+			 * Next update this area to end before excluded range.
-+			 */
-+			r->end = range->start - 1;
-+			break;
-+		}
-+	}
-+}
-+
-+static int range_cmp(const void *a1, const void *a2)
-+{
-+	const struct memory_range *r1 = a1;
-+	const struct memory_range *r2 = a2;
-+
-+	if (r1->start > r2->start)
-+		return 1;
-+	if (r1->start < r2->start)
-+		return -1;
-+
-+	return 0;
-+}
-+
-+/**
-+ * crash_get_memory_ranges() - read system physical memory
-+ *
-+ * Function reads through system physical memory and stores found memory regions
-+ * in @crash_memory_ranges. Number of memory regions found is placed in
-+ * @crash_memory_nr_ranges. Regions are sorted in ascending order.
-+ *
-+ * Returns %0 in case of success and %-1 otherwise (errno is set).
-+ */
-+static int crash_get_memory_ranges(void)
-+{
-+	/*
-+	 * First read all memory regions that can be considered as
-+	 * system memory including the crash area.
-+	 */
-+	kexec_iomem_for_each_line(NULL, crash_range_callback, NULL);
-+
-+	if (usablemem_rgns.size < 1) {
-+		errno = EINVAL;
-+		return -1;
-+	}
-+
-+	/*
-+	 * Exclude memory reserved for crashkernel (this may result a split memory
-+	 * region).
-+	 */
-+	crash_exclude_range();
-+
-+	/*
-+	 * Make sure that the memory regions are sorted.
-+	 */
-+	qsort(usablemem_rgns.ranges, usablemem_rgns.size,
-+	      sizeof(*usablemem_rgns.ranges), range_cmp);
-+
-+	return 0;
-+}
-+
-+/**
-+ * cmdline_add_elfcorehdr() - adds elfcorehdr= to @cmdline
-+ * @cmdline: buffer where parameter is placed
-+ * @elfcorehdr: physical address of elfcorehdr
-+ *
-+ * Function appends 'elfcorehdr=start' at the end of the command line given in
-+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
-+ * (inclunding %NUL).
-+ */
-+static void cmdline_add_elfcorehdr(char *cmdline, unsigned long elfcorehdr)
-+{
-+	char buf[COMMAND_LINE_SIZE];
-+	int buflen;
-+
-+	buflen = snprintf(buf, sizeof(buf), "%s elfcorehdr=%#lx",
-+			  cmdline, elfcorehdr);
-+	if (buflen < 0)
-+		die("Failed to construct elfcorehdr= command line parameter\n");
-+	if (buflen >= sizeof(buf))
-+		die("Command line overflow\n");
-+
-+	(void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
-+	cmdline[COMMAND_LINE_SIZE - 1] = '\0';
-+}
-+
-+/**
-+ * cmdline_add_mem() - adds mem= parameter to kernel command line
-+ * @cmdline: buffer where parameter is placed
-+ * @size: size of the kernel reserved memory (in bytes)
-+ *
-+ * This function appends 'mem=size' at the end of the command line given in
-+ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
-+ * (including %NUL).
-+ */
-+static void cmdline_add_mem(char *cmdline, unsigned long size)
-+{
-+	char buf[COMMAND_LINE_SIZE];
-+	int buflen;
-+
-+	buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK", cmdline, size >> 10);
-+	if (buflen < 0)
-+		die("Failed to construct mem= command line parameter\n");
-+	if (buflen >= sizeof(buf))
-+		die("Command line overflow\n");
-+
-+	(void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
-+	cmdline[COMMAND_LINE_SIZE - 1] = '\0';
-+}
-+
-+static unsigned long long range_size(const struct memory_range *r)
-+{
-+	return r->end - r->start + 1;
-+}
-+
-+static void dump_memory_ranges(void)
-+{
-+	int i;
-+
-+	if (!kexec_debug)
-+		return;
-+
-+	dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n",
-+		  crash_reserved_mem.start, crash_reserved_mem.end,
-+		  (unsigned long)range_size(&crash_reserved_mem) >> 20);
-+
-+	for (i = 0; i < usablemem_rgns.size; i++) {
-+		struct memory_range *r = usablemem_rgns.ranges + i;
-+		dbgprintf("memory range: [%#llx - %#llx] (%ldM)\n",
-+			  r->start, r->end, (unsigned long)range_size(r) >> 20);
-+	}
-+}
-+
-+/**
-+ * load_crashdump_segments() - loads additional segments needed for kdump
-+ * @info: kexec info structure
-+ * @mod_cmdline: kernel command line
-+ *
-+ * This function loads additional segments which are needed for the dump capture
-+ * kernel. It also updates kernel command line passed in @mod_cmdline to have
-+ * right parameters for the dump capture kernel.
-+ *
-+ * Return %0 in case of success and %-1 in case of error.
-+ */
-+int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
-+{
-+	unsigned long elfcorehdr;
-+	unsigned long bufsz;
-+	void *buf;
-+	int err;
-+
-+	/*
-+	 * First fetch all the memory (RAM) ranges that we are going to pass to
-+	 * the crashdump kernel during panic.
-+	 */
-+	err = crash_get_memory_ranges();
-+	if (err)
-+		return err;
-+
-+	/*
-+	 * Now that we have memory regions sorted, we can use first memory
-+	 * region as PHYS_OFFSET.
-+	 */
-+	phys_offset = usablemem_rgns.ranges->start;
-+	dbgprintf("phys_offset: %#lx\n", phys_offset);
-+
-+	err = crash_create_elf32_headers(info, &elf_info,
-+					 usablemem_rgns.ranges,
-+					 usablemem_rgns.size, &buf, &bufsz,
-+					 ELF_CORE_HEADER_ALIGN);
-+	if (err)
-+		return err;
-+
-+	/*
-+	 * We allocate ELF core header from the end of the memory area reserved
-+	 * for the crashkernel. We align the header to SECTION_SIZE (which is
-+	 * 1MB) so that available memory passed in kernel command line will be
-+	 * aligned to 1MB. This is because kernel create_mapping() wants memory
-+	 * regions to be aligned to SECTION_SIZE.
-+	 */
-+	elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
-+					  crash_reserved_mem.start,
-+					  crash_reserved_mem.end, -1, 0);
-+
-+	dbgprintf("elfcorehdr: %#lx\n", elfcorehdr);
-+	cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
-+
-+	/*
-+	 * Add 'mem=size' parameter to dump capture kernel command line. This
-+	 * prevents the dump capture kernel from using any other memory regions
-+	 * which belong to the primary kernel.
-+	 */
-+	cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start);
-+
-+	dump_memory_ranges();
-+	dbgprintf("kernel command line: \"%s\"\n", mod_cmdline);
-+
-+	return 0;
-+}
-+
-+#endif
-+
-Index: kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/include/arch/options.h
-@@ -0,0 +1,26 @@
-+#ifndef KEXEC_ARCH_ARM64_OPTIONS_H
-+#define KEXEC_ARCH_ARM64_OPTIONS_H
-+
-+//#define OPT_ARCH_MAX	((OPT_MAX)+0)
-+
-+#define OPT_APPEND	((OPT_MAX)+0)
-+#define OPT_RAMDISK	((OPT_MAX)+1)
-+#define OPT_DTB		((OPT_MAX)+2)
-+
-+#define OPT_ARCH_MAX	((OPT_MAX)+3)
-+
-+
-+#define KEXEC_ARCH_OPTIONS \
-+	KEXEC_OPTIONS \
-+	{ "append",       1, NULL, OPT_APPEND }, \
-+	{ "command-line", 1, NULL, OPT_APPEND }, \
-+	{ "dtb",          1, NULL, OPT_DTB }, \
-+	{ "initrd",       1, NULL, OPT_RAMDISK }, \
-+	{ "ramdisk",      1, NULL, OPT_RAMDISK }, \
-+
-+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR /* Only accept long arch options. */
-+
-+#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS
-+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR
-+
-+#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.c
-@@ -0,0 +1,177 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <errno.h>
-+#include <stddef.h>
-+
-+//#include <linux/kexec.h>
-+
-+#include "../../kexec.h"
-+#include "../../kexec-syscall.h"
-+#include "kexec-arm64.h"
-+
-+
-+void arch_usage(void)
-+{
-+	fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+	printf(
-+"     --append=STRING       Set the kernel command line to STRING.\n"
-+"     --command-line=STRING Set the kernel command line to STRING.\n"
-+"     --dtb=FILE            Use FILE as the device tree blob.\n"
-+"     --initrd=FILE         Use FILE as the kernel initial ramdisk.\n"
-+"     --ramdisk=FILE        Use FILE as the kernel initial ramdisk.\n");
-+
-+	fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-+
-+int arch_process_options(int UNUSED(argc), char **UNUSED(argv))
-+{
-+	fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+	return 0;
-+}
-+
-+const struct arch_map_entry arches[] = {
-+	{ "aarch64", KEXEC_ARCH_ARM64 },
-+	{ NULL, 0 },
-+};
-+
-+void arch_update_purgatory(struct kexec_info *UNUSED(info))
-+{
-+	fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+}
-+
-+unsigned long virt_to_phys(unsigned long addr)
-+{
-+	fprintf(stderr, "%s:%d: %016lx -> %016lx\n", __func__, __LINE__, addr,
-+		addr + 0x080000000UL);
-+	return addr + 0x080000000UL;
-+}
-+
-+void add_segment(struct kexec_info *info, const void *buf, size_t bufsz,
-+	unsigned long base, size_t memsz)
-+{
-+	fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+	add_segment_phys_virt(info, buf, bufsz, base, memsz, 1);
-+	fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-+
-+static int get_memory_ranges_1(struct memory_range **range, int *ranges,
-+			unsigned long kexec_flags)
-+{
-+	static struct memory_range memory_range[KEXEC_SEGMENT_MAX];
-+	const char *iomem;
-+	int range_count = 0;
-+	char line[MAX_LINE];
-+	FILE *fp;
-+
-+	iomem = proc_iomem();
-+	fp = fopen(iomem, "r");
-+
-+	if (!fp) {
-+		fprintf(stderr, "Cannot open %s: %s\n",
-+			iomem, strerror(errno));
-+		return -1;
-+	}
-+
-+	dbgprintf("memory ranges:\n");
-+
-+	while(fgets(line, sizeof(line), fp) != 0) {
-+		struct memory_range r;
-+		char *str;
-+		int consumed;
-+
-+		if (range_count >= KEXEC_SEGMENT_MAX)
-+			break;
-+
-+		if (sscanf(line, "%Lx-%Lx : %n", &r.start, &r.end, &consumed)
-+			!= 2)
-+			continue;
-+
-+		str = line + consumed;
-+		r.end++;
-+
-+		if (memcmp(str, "System RAM\n", 11)) {
-+			dbgprintf(" Skip: %016Lx - %016Lx : %s", r.start, r.end,
-+				str);
-+			continue;
-+		}
-+
-+		r.type = RANGE_RAM;
-+		memory_range[range_count] = r;
-+		range_count++;
-+
-+		dbgprintf(" Add:  %016Lx - %016Lx : %s", r.start, r.end, str);
-+	}
-+
-+	fclose(fp);
-+	*range = memory_range;
-+	*ranges = range_count;
-+
-+	return 0;
-+}
-+
-+static int get_memory_ranges_2(struct memory_range **range, int *ranges,
-+		      unsigned long UNUSED(kexec_flags))
-+{
-+	static struct memory_range memory_range[2];
-+
-+	memory_range[0].start = 0x080000000;
-+	memory_range[0].end   = 0x100000000;
-+	memory_range[0].type = RANGE_RAM;
-+
-+	memory_range[1].start = 0x900000000;
-+	memory_range[1].end   = 0x880000000;
-+	memory_range[1].type = RANGE_RAM;
-+
-+	*range = memory_range;
-+	*ranges = sizeof(memory_range) / sizeof(memory_range[0]);
-+
-+	return 0;
-+}
-+
-+int get_memory_ranges(struct memory_range **range, int *ranges,
-+			unsigned long kexec_flags)
-+{
-+	/* FIXME: Should get this info from device tree. */
-+	
-+	return get_memory_ranges_1(range, ranges, kexec_flags);
-+}
-+
-+struct file_type file_type[] = {
-+	{ "elf-arm64", elf_arm64_probe, elf_arm64_load, elf_arm64_usage },
-+};
-+
-+int file_types = sizeof(file_type) / sizeof(file_type[0]);
-+
-+int arch_compat_trampoline(struct kexec_info *info)
-+{
-+	fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+	return 0;
-+}
-+
-+void arch_reuse_initrd(void)
-+{
-+}
-+
-+int machine_verify_elf_rel(struct mem_ehdr *ehdr)
-+{
-+	(void)ehdr;
-+
-+	fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+	return 0;
-+}
-+
-+void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
-+	void *location, unsigned long address, unsigned long value)
-+{
-+	(void)ehdr;
-+	(void)r_type;
-+	(void)location;
-+	(void)address;
-+	(void)value;
-+	fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+}
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-arm64.h
-@@ -0,0 +1,20 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#if !defined(KEXEC_ARM64_H)
-+#define KEXEC_ARM64_H
-+
-+/* #include <linux/kexec.h> FIXME: this is broken */
-+#include <sys/types.h>
-+
-+#include "../../kexec.h"
-+
-+#define KEXEC_SEGMENT_MAX 16 /* FIXME: this should come from <linux/kexec.h> */
-+
-+int elf_arm64_probe(const char *buf, off_t len);
-+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
-+	struct kexec_info *info);
-+void elf_arm64_usage(void);
-+
-+#endif
-\ No newline at end of file
-Index: kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/kexec-elf-arm64.c
-@@ -0,0 +1,114 @@
-+/*
-+ * ARM64 kexec support.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <elf.h>
-+#include <getopt.h>
-+
-+#include "../../kexec-syscall.h"
-+
-+#include "kexec-arm64.h"
-+#include "arch/options.h"
-+
-+#if !defined(EM_AARCH64)
-+# define EM_AARCH64 183
-+#endif
-+
-+int elf_arm64_probe(const char *buf, off_t len)
-+{
-+	int result;
-+	struct mem_ehdr ehdr;
-+
-+	fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+	
-+	result = build_elf_exec_info(buf, len, &ehdr, 0);
-+
-+	if (result < 0) {
-+		dbgprintf("Not an ELF executable\n");
-+		goto out;
-+	}
-+
-+	if (ehdr.e_machine != EM_AARCH64) {
-+		dbgprintf("Not an AARCH64 executable\n");
-+		result = -1;
-+		goto out;
-+	}
-+
-+	result = 0;
-+
-+out:
-+	free_elf_info(&ehdr);
-+	fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+	return result;
-+}
-+
-+int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
-+			struct kexec_info *info)
-+{
-+	static const struct option options[] = {
-+		KEXEC_ARCH_OPTIONS
-+		{ 0 }
-+	};
-+	static const char short_options[] = KEXEC_OPT_STR "";
-+	const char *command_line = NULL;
-+	unsigned int command_line_len = 0;
-+	const char *ramdisk = NULL;
-+	const char *dtb = NULL;
-+	int opt;
-+	struct mem_ehdr ehdr;
-+	int result;
-+
-+	fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+
-+	while ((opt = getopt_long(argc, argv, short_options, options, 0))
-+		!= -1) {
-+		switch (opt) {
-+		default:
-+			if (opt < OPT_MAX) /* Ignore core options */
-+				break;
-+		case OPT_APPEND:
-+			command_line = optarg;
-+			command_line_len = strlen(command_line) + 1;
-+			break;
-+		case OPT_RAMDISK:
-+			ramdisk = optarg;
-+			break;
-+		case OPT_DTB:
-+			dtb = optarg;
-+			break;
-+		}
-+	}
-+
-+	fprintf(stderr, "%s:%d: command_line: %s\n", __func__, __LINE__, command_line);
-+	fprintf(stderr, "%s:%d: ramdisk: %s\n", __func__, __LINE__, ramdisk);
-+	fprintf(stderr, "%s:%d: dtb: %s\n", __func__, __LINE__, dtb);
-+
-+	if (info->kexec_flags & KEXEC_ON_CRASH) {
-+		fprintf(stderr, "kexec: kdump not yet supported on arm64\n");
-+		return -1;
-+	}
-+
-+	result = build_elf_exec_info(buf, len, &ehdr, 0);
-+
-+	if (result < 0) {
-+		free_elf_info(&ehdr);
-+		fprintf(stderr, "%s:%d: free_elf_info failed\n", __func__,
-+			__LINE__);
-+		return result;
-+	}
-+
-+	elf_exec_build_load(info, &ehdr, buf, len, 0);
-+
-+	info->entry = (void*)0x80080000UL;  // FIXME
-+
-+	fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+	return 0;
-+}
-+
-+void elf_arm64_usage(void)
-+{
-+	fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
-+	fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
-+}
-Index: kexec-tools-2.0.10/kexec/kexec-syscall.h
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec-syscall.h
-+++ kexec-tools-2.0.10/kexec/kexec-syscall.h
-@@ -39,8 +39,8 @@
- #ifdef __s390__
- #define __NR_kexec_load		277
- #endif
--#ifdef __arm__
--#define __NR_kexec_load		__NR_SYSCALL_BASE + 347  
-+#if defined(__arm__) || defined(__arm64__)
-+#define __NR_kexec_load		__NR_SYSCALL_BASE + 347
- #endif
- #if defined(__mips__)
- #define __NR_kexec_load                4311
-@@ -108,6 +108,8 @@ static inline long kexec_file_load(int k
- #define KEXEC_ARCH_PPC64   (21 << 16)
- #define KEXEC_ARCH_IA_64   (50 << 16)
- #define KEXEC_ARCH_ARM     (40 << 16)
-+#define KEXEC_ARCH_ARM64   (183 << 16)
-+/* #define KEXEC_ARCH_AARCH64 (183 << 16) */
- #define KEXEC_ARCH_S390    (22 << 16)
- #define KEXEC_ARCH_SH      (42 << 16)
- #define KEXEC_ARCH_MIPS_LE (10 << 16)
-@@ -153,5 +155,8 @@ static inline long kexec_file_load(int k
- #ifdef __m68k__
- #define KEXEC_ARCH_NATIVE	KEXEC_ARCH_68K
- #endif
-+#if defined(__arm64__)
-+#define KEXEC_ARCH_NATIVE	KEXEC_ARCH_ARM64
-+#endif
- 
- #endif /* KEXEC_SYSCALL_H */
-Index: kexec-tools-2.0.10/kexec/kexec.c
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/kexec.c
-+++ kexec-tools-2.0.10/kexec/kexec.c
-@@ -664,6 +664,8 @@ static int my_load(const char *type, int
- 	memset(&info, 0, sizeof(info));
- 	info.kexec_flags = kexec_flags;
- 
-+	fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
-+
- 	result = 0;
- 	if (argc - fileind <= 0) {
- 		fprintf(stderr, "No kernel specified\n");
-Index: kexec-tools-2.0.10/purgatory/arch/arm64/Makefile
-===================================================================
---- /dev/null
-+++ kexec-tools-2.0.10/purgatory/arch/arm64/Makefile
-@@ -0,0 +1,7 @@
-+#
-+# Purgatory arm64
-+#
-+
-+arm64_PURGATORY_SRCS =
-+
-+dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
deleted file mode 100644
index 0f6398f..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-require kexec-tools.inc
-export LDFLAGS = "-L${STAGING_LIBDIR}"
-EXTRA_OECONF = " --with-zlib=yes"
-
-SRC_URI += "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
-            file://0002-powerpc-change-the-memory-size-limit.patch \
-            file://0001-purgatory-Pass-r-directly-to-linker.patch \
-            file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
-            file://0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch \
-            file://0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch \
-            file://0003-arm64-identify-PHYS_OFFSET-correctly.patch \
-            file://0004-arm64-kdump-identify-memory-regions.patch \
-            file://0005-arm64-kdump-add-elf-core-header-segment.patch \
-            file://0006-arm64-kdump-set-up-kernel-image-segment.patch \
-            file://0007-arm64-kdump-set-up-other-segments.patch \
-            file://0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch \
-            file://0009-arm64-kdump-Add-support-for-binary-image-files.patch \
-            file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
-            file://0001-x86-x86_64-Fix-format-warning-with-die.patch \
-            file://0002-ppc-Fix-format-warning-with-die.patch \
-            file://kexec-x32.patch \
-            file://0001-Disable-PIE-during-link.patch \
-            file://0001-arm64-Disable-PIC.patch \
-         "
-
-SRC_URI[md5sum] = "b2b2c5e6b29d467d6e99d587fb6b7cf5"
-SRC_URI[sha256sum] = "b3e69519d2acced256843b1e8f1ecfa00d9b54fa07449ed78f05b9193f239370"
-
-SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
-
-PACKAGES =+ "kexec kdump vmcore-dmesg"
-
-ALLOW_EMPTY_${PN} = "1"
-RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
-
-FILES_kexec = "${sbindir}/kexec"
-FILES_kdump = "${sbindir}/kdump \
-               ${sysconfdir}/sysconfig/kdump.conf \
-               ${sysconfdir}/init.d/kdump \
-               ${libexecdir}/kdump-helper \
-               ${systemd_unitdir}/system/kdump.service \
-"
-
-FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
-
-inherit update-rc.d systemd
-
-INITSCRIPT_PACKAGES = "kdump"
-INITSCRIPT_NAME_kdump = "kdump"
-INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
-
-do_install_append () {
-        install -d ${D}${sysconfdir}/sysconfig
-        install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
-
-        if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
-                install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
-        fi
-
-        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-                install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
-                install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service
-                sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service
-        fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb
new file mode 100644
index 0000000..ebb4832
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.16.bb
@@ -0,0 +1,86 @@
+
+SUMMARY = "Kexec fast reboot tools"
+DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
+AUTHOR = "Eric Biederman"
+HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
+SECTION = "kernel/userland"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
+                    file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
+DEPENDS = "zlib xz"
+
+PR = "r1"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
+           file://kdump \
+           file://kdump.conf \
+           file://kdump.service \
+           file://0002-powerpc-change-the-memory-size-limit.patch \
+           file://0001-purgatory-Pass-r-directly-to-linker.patch \
+           file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
+           file://kexec-x32.patch \
+           file://0001-Disable-PIE-during-link.patch \
+         "
+
+SRC_URI[md5sum] = "5198968de79b5ded96f97f3c2ea9637b"
+SRC_URI[sha256sum] = "cf17fc99bf77c9b39f06ee88ac0e86d0349c4a0c3f8214a3cc78eece872f6f3a"
+
+inherit autotools update-rc.d systemd
+
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
+
+do_compile_prepend() {
+    # Remove the prepackaged config.h from the source tree as it overrides
+    # the same file generated by configure and placed in the build tree
+    rm -f ${S}/include/config.h
+
+    # Remove the '*.d' file to make sure the recompile is OK
+    for dep in `find ${B} -type f -name '*.d'`; do
+        dep_no_d="`echo $dep | sed 's#.d$##'`"
+        # Remove file.d when there is a file.o
+        if [ -f "$dep_no_d.o" ]; then
+            rm -f $dep
+        fi
+    done
+}
+
+do_install_append () {
+        install -d ${D}${sysconfdir}/sysconfig
+        install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
+
+        if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+                install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
+        fi
+
+        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+                install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
+                install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service
+                sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service
+        fi
+}
+
+PACKAGES =+ "kexec kdump vmcore-dmesg"
+
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
+
+FILES_kexec = "${sbindir}/kexec"
+FILES_kdump = "${sbindir}/kdump \
+               ${sysconfdir}/sysconfig/kdump.conf \
+               ${sysconfdir}/init.d/kdump \
+               ${libexecdir}/kdump-helper \
+               ${systemd_unitdir}/system/kdump.service \
+"
+
+FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
+
+INITSCRIPT_PACKAGES = "kdump"
+INITSCRIPT_NAME_kdump = "kdump"
+INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
+
+SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
+
+INSANE_SKIP_${PN} = "arch"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 44d013f..9a17267 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -11,6 +11,7 @@
 SSTATE_SCAN_FILES += "depmodwrapper"
 EXTRA_STAGING_FIXMES += "PKGDATA_DIR"
 
+DEPENDS += "kmod-native"
 do_populate_sysroot[depends] = ""
 
 do_install() {
@@ -23,17 +24,13 @@
     echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2
     exit 1
 fi
-if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then
-    echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2
-else
-    kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion)
-    if [ "\$kernelabi" != "\$4" ]; then
-        echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2
-        exit 1
-    fi
+
+kernelabi=""
+if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then
+    kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion")
 fi
 
-if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then
     echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
     exec env depmod "\$1" "\$2" "\$3" "\$4"
 else
@@ -45,4 +42,5 @@
 
 SYSROOT_DIRS += "${bindir_crossscripts}"
 
+PACKAGES = ""
 inherit nopackages
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
index 7fb10b5..29885fb 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
@@ -14,9 +14,9 @@
                    "
 inherit autotools gtk-doc pkgconfig manpages
 
-SRCREV = "ef4257b59c4307b8c627d89f3c7f1feedb32582f"
+SRCREV = "aca4eca103d6699543f7ed663335c28c2e9908bb"
 # Lookout for PV bump too when SRCREV is changed
-PV = "24+git${SRCPV}"
+PV = "25+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
            file://depmod-search.conf \
@@ -35,9 +35,7 @@
 PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
 PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
 
-do_configure_prepend () {
-        gtkdocize --docdir ${S}/libkmod/docs --srcdir ${S}
-}
+GTKDOC_DOCDIR = "${S}/libkmod/docs"
 
 do_configure_append () {
 	sed -i 's#}libtool#}${TARGET_SYS}-libtool#' ${B}/doltlibtool
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
index feafcb9..5f45fce 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch
@@ -11,10 +11,10 @@
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/configure.ac b/configure.ac
-index eb0f9d1..a539968 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac
++++ git/configure.ac
 @@ -14,7 +14,7 @@ AC_USE_SYSTEM_EXTENSIONS
  AC_SYS_LARGEFILE
  AC_PREFIX_DEFAULT([/usr])
@@ -23,7 +23,4 @@
 +AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests])
  AM_SILENT_RULES([yes])
  LT_INIT([disable-static pic-only])
- 
--- 
-1.9.1
-
+ DOLT
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
index 8161d61..5d9d40c 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch
@@ -18,12 +18,12 @@
  libkmod/libkmod-internal.h |    4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h
-index 0180124..100b40f 100644
---- a/libkmod/libkmod-internal.h
-+++ b/libkmod/libkmod-internal.h
-@@ -9,6 +9,10 @@
- #include "macro.h"
+Index: git/libkmod/libkmod-internal.h
+===================================================================
+--- git.orig/libkmod/libkmod-internal.h
++++ git/libkmod/libkmod-internal.h
+@@ -10,6 +10,10 @@
+ 
  #include "libkmod.h"
  
 +#ifndef O_CLOEXEC
@@ -33,6 +33,3 @@
  static _always_inline_ _printf_format_(2, 3) void
  	kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {}
  
--- 
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
deleted file mode 100644
index b248133..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From db112739dc4f608a968b8104b382955dc3d96ca3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 07:40:10 +0000
-Subject: [PATCH] Rectify the function signatures to fix prototype mismatches
-
-clang is less forgiving when it comes to coding standards, correct the
-function signatures to reflect the function logic
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- fsync.c      | 7 ++++---
- latencytop.h | 2 +-
- 2 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/fsync.c b/fsync.c
-index 82dff0e..5cefba9 100644
---- a/fsync.c
-+++ b/fsync.c
-@@ -51,7 +51,7 @@ struct fsync_files {
- static GList *fsync_data;
- 
- 
--static chain_file(struct fsync_process *proc, char *filename)
-+static void chain_file(struct fsync_process *proc, char *filename)
- {
- 	struct fsync_files *file;
- 	GList *item;
-@@ -75,7 +75,7 @@ static chain_file(struct fsync_process *proc, char *filename)
- 	proc->files = g_list_append(proc->files, file);
- }
- 
--static report_file(char *process, char *file)
-+static void report_file(char *process, char *file)
- {
- 	struct fsync_process *proc;
- 	GList *item;
-@@ -157,9 +157,10 @@ int enable_fsync_tracer(void)
- 	write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");	
- 	write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");	
- 	write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
-+	return ret;
- }
- 
--int disable_fsync_tracer(void)
-+void disable_fsync_tracer(void)
- {
- 	write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
- }
-diff --git a/latencytop.h b/latencytop.h
-index 5394d73..9d107a8 100644
---- a/latencytop.h
-+++ b/latencytop.h
-@@ -54,5 +54,5 @@ extern char *translate(char *line);
- extern void init_translations(char *filename);
- extern int fsync_display(int duration);
- extern int enable_fsync_tracer(void);
--extern int disable_fsync_tracer(void);
-+extern void disable_fsync_tracer(void);
- extern void update_list(void);
--- 
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
deleted file mode 100644
index 7848ccf..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-linux: sysfs: use tracing_on as tracing_enabled is deprecated
-
-tracing_enabled use in the kernel is being deprecated as per commit
-6752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in
-the linux mainline kernel. tracing_enabled use will generate a warning
-and may no longer function as expected, therefore move to use tracing_on.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dennis Hall <dennis.hall@windriver.com>
-
-Index: latencytop-0.5/fsync.c
-===================================================================
---- latencytop-0.5.orig/fsync.c	2012-08-03 10:45:49.000000000 -0400
-+++ latencytop-0.5/fsync.c	2012-08-03 10:48:39.000000000 -0400
-@@ -149,19 +149,19 @@
-  * cd /sys/kernel/debug/tracing
-  * echo fsync > current_tracer
-  * echo ftrace_printk > iter_ctrl 
-- * echo 1 > tracing_enabled
-+ * echo 1 > tracing_on
-  */
- 	ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
- 	if (!ret) 
- 		return -1;
- 	write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");	
- 	write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");	
--	write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
-+	write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
- }
- 
- int disable_fsync_tracer(void)
- {
--	write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
-+	write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
- }
- 
- 
-@@ -339,8 +339,8 @@
- 		if (curduration > 5)
- 			curduration = 5;
- 		/* clear the ftrace buffer */
--		write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
--		write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
-+		write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
-+		write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
- 		key = select(1, &rfds, NULL, NULL, &end);
- 		parse_ftrace();
- 		print_global_list();
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
deleted file mode 100644
index 7147fda..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
-Upstream-Status: Pending
-
-diff --git a/Makefile.orig b/Makefile
-index 16a2369..fa797a2 100644
---- a/Makefile.orig
-+++ b/Makefile
-@@ -1,10 +1,11 @@
--# FIXME: Use autoconf ?
--HAS_GTK_GUI = 1
-+#
-+#
- 
- DESTDIR =
- SBINDIR = /usr/sbin
- XCFLAGS = -W  -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
--LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 
-+LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncurses $(LDFLAGS)
-+CC ?= gcc
- 
- OBJS= latencytop.o text_display.o translate.o fsync.o
- 
-@@ -26,16 +27,17 @@ endif
- 
- # We write explicity this "implicit rule"
- %.o : %.c
--	gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@
-+	$(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@
- 
- latencytop:  $(OBJS) latencytop.h Makefile
--	gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop 
-+	$(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop
- 
- clean:
- 	rm -f *~ latencytop DEADJOE *.o
- 
- install: latencytop
- 	mkdir -p $(DESTDIR)/usr/share/latencytop
-+	mkdir -p $(DESTDIR)/$(SBINDIR)
- 	install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
- 	install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/
- 	install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb
deleted file mode 100644
index eb19471..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Linux tool for measuring and fixing latency"
-HOMEPAGE = "http://www.latencytop.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa"
-
-inherit pkgconfig
-
-DEPENDS = "virtual/libintl ncurses glib-2.0"
-
-PR = "r3"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
-            file://latencytop-makefile.patch \
-            file://latencytop-fsync.patch \
-            file://0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch \
-"
-
-SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
-SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-
-PACKAGECONFIG[x11] = ",,gtk+"
-
-EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}"
-
-#CFLAGS += "${LDFLAGS}"
-
-do_install() {
-    oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch
deleted file mode 100644
index d59a7f7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 272a8a069a8f5f06a1e5dfa0ef12f5f92984728b Mon Sep 17 00:00:00 2001
-From: Noor <noor_ahsan@mentor.com>
-Date: Wed, 12 Aug 2015 20:54:00 +0500
-Subject: [PATCH] Makefile: Add LDFLAGS variable to SLDFLAGS.
-
-* Add LDFLAGS variable to SLDFLAGS so that extra linker
-  flags can be sent via this variable.
-
-Upstream-Status: Submitted [perfmon2-libpfm4-commits@lists.sourceforge.net]
-
-Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
----
- lib/Makefile |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/Makefile b/lib/Makefile
-index 1cc8765..4bd92ef 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -187,7 +187,7 @@ CFLAGS += -DCONFIG_PFMLIB_CELL
- endif
- 
- ifeq ($(SYS),Linux)
--SLDFLAGS=-shared -Wl,-soname -Wl,$(VLIBPFM)
-+SLDFLAGS=$(LDFLAGS) -shared -Wl,-soname -Wl,$(VLIBPFM)
- SLIBPFM=libpfm.so.$(VERSION).$(REVISION).$(AGE)
- VLIBPFM=libpfm.so.$(VERSION)
- SOLIBEXT=so
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
deleted file mode 100644
index 25d47ef..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: Pending
-
-Fix compile error:
-
-| syst_count.c:346:3: error: this 'for' clause does not guard... [-Werror=misleading-indentation] 
-|    for(c=cmin ; c < cmax; c++) 
-|       ^~~ 
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff --git a/perf_examples/syst_count.c b/perf_examples/syst_count.c
-index 0d53078..2dfb9b9 100644
---- a/perf_examples/syst_count.c
-+++ b/perf_examples/syst_count.c
-@@ -343,8 +343,9 @@ measure(void)
- 
- 		for (delay = 1 ; delay <= options.delay; delay++) {
- 
--		for(c=cmin ; c < cmax; c++)
--			start_cpu(c);
-+			for(c=cmin ; c < cmax; c++) {
-+				start_cpu(c);
-+			}
- 
- 			if (0) {
- 				tv.tv_sec = 0;
-@@ -353,8 +354,9 @@ measure(void)
- 			} else
- 				sleep(1);
- 
--		for(c=cmin ; c < cmax; c++)
--			stop_cpu(c);
-+			for(c=cmin ; c < cmax; c++) {
-+				stop_cpu(c);
-+			}
- 
- 			for(c = cmin; c < cmax; c++) {
- 				printf("# %'ds -----\n", delay);
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
deleted file mode 100644
index 4136eac..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Monitoring tools exploiting the performance monitoring events"
-DESCRIPTION = "This package provides a library, called libpfm4 which is used to develop \
-monitoring tools exploiting the performance monitoring events such as those \
-provided by the Performance Monitoring Unit (PMU) of modern processors."
-HOMEPAGE = "http://perfmon2.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=144822&atid=759953&source=navbar"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0de488f3bd4424e308e2e399cb99c788"
-
-SECTION = "devel"
-
-COMPATIBLE_HOST = "powerpc64"
-
-SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/${BPN}/libpfm-${PV}.tar.gz \
-           file://0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch \
-           file://fix-misleading-indentation-error.patch \
-          "
-
-SRC_URI[md5sum] = "5077b9022440e4951d96f2d0e73bd487"
-SRC_URI[sha256sum] = "5ab1e5b0472550f9037a8800834f6bc3b927690070f69fac0b67284b4b05fd5f"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/perfmon2/files/libpfm4/"
-
-EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LIBDIR=\"${libdir}\" LDCONFIG=\"true\""
-EXTRA_OEMAKE_append_powerpc = " ARCH=\"powerpc\""
-EXTRA_OEMAKE_append_powerpc64 = " ARCH=\"powerpc\" BITMODE=\"64\""
-
-S = "${WORKDIR}/libpfm-${PV}"
-
-do_install () {
-	oe_runmake install
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index 9054b33..8d6f2f2 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -37,6 +37,7 @@
     & Firmware-ath9k-htc \
     & Firmware-phanfw \
     & Firmware-qat \
+    & Firmware-qcom \
     & Firmware-qla1280 \
     & Firmware-qla2xxx \
     & Firmware-qualcommAthos_ar3k \
@@ -90,12 +91,13 @@
     file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
     file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
     file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
-    file://LICENCE.Netronome;md5=cd2a3e6effe3cdf42731575b8e9477ed \
+    file://LICENCE.Netronome;md5=4add08f2577086d44447996503cddf5f \
     file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \
     file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
     file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
     file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
     file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
+    file://LICENSE.qcom;md5=164e3362a538eb11d3ac51e8e134294b \
     file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \
     file://LICENCE.qla2xxx;md5=505855e921b75f1be4a437ad9b79dff0 \
     file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \
@@ -116,7 +118,7 @@
     file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
     file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
     file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
-    file://WHENCE;md5=038edbc9e744171d8b6235e0224028ba \
+    file://WHENCE;md5=6f46986f4e913ef16b765c2319cc5141 \
 "
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -156,6 +158,7 @@
 NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware"
 NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw"
 NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware"
+NO_GENERIC_LICENSE[Firmware-qcom] = "LICENSE.qcom"
 NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280"
 NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx"
 NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k"
@@ -178,13 +181,13 @@
 NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c"
 NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
 
-SRCREV = "bf04291309d3169c0ad3b8db52564235bbd08e30"
+SRCREV = "8fc2d4e55685bf73b6f7752383da9067404a74bb"
 PE = "1"
 PV = "0.0+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
 
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"
 
@@ -249,14 +252,19 @@
              ${PN}-iwlwifi-7260 \
              ${PN}-iwlwifi-7265 \
              ${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \
+             ${PN}-iwlwifi-9000 \
              ${PN}-iwlwifi-misc \
              ${PN}-ibt-license ${PN}-ibt ${PN}-ibt-misc \
              ${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \
+             ${PN}-ibt-17 \
              ${PN}-i915-license ${PN}-i915 \
              ${PN}-adsp-sst-license ${PN}-adsp-sst \
              ${PN}-bnx2-mips \
              ${PN}-netronome-license ${PN}-netronome \
              ${PN}-qat ${PN}-qat-license \
+             ${PN}-qcom-license \
+             ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 \
+             ${PN}-qcom-adreno-a3xx ${PN}-qcom-adreno-a530 \
              ${PN}-whence-license \
              ${PN}-license \
              "
@@ -596,6 +604,7 @@
 LICENSE_${PN}-iwlwifi-7265d     = "Firmware-iwlwifi_firmware"
 LICENSE_${PN}-iwlwifi-8000c     = "Firmware-iwlwifi_firmware"
 LICENSE_${PN}-iwlwifi-8265      = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-9000      = "Firmware-iwlwifi_firmware"
 LICENSE_${PN}-iwlwifi-misc      = "Firmware-iwlwifi_firmware"
 LICENSE_${PN}-iwlwifi-license   = "Firmware-iwlwifi_firmware"
 
@@ -622,6 +631,7 @@
 FILES_${PN}-iwlwifi-7265d   = "${nonarch_base_libdir}/firmware/iwlwifi-7265D-*.ucode"
 FILES_${PN}-iwlwifi-8000c   = "${nonarch_base_libdir}/firmware/iwlwifi-8000C-*.ucode"
 FILES_${PN}-iwlwifi-8265   = "${nonarch_base_libdir}/firmware/iwlwifi-8265-*.ucode"
+FILES_${PN}-iwlwifi-9000   = "${nonarch_base_libdir}/firmware/iwlwifi-9000-*.ucode"
 FILES_${PN}-iwlwifi-misc   = "${nonarch_base_libdir}/firmware/iwlwifi-*.ucode"
 
 RDEPENDS_${PN}-iwlwifi-135-6     = "${PN}-iwlwifi-license"
@@ -645,6 +655,7 @@
 RDEPENDS_${PN}-iwlwifi-7265d     = "${PN}-iwlwifi-license"
 RDEPENDS_${PN}-iwlwifi-8000c     = "${PN}-iwlwifi-license"
 RDEPENDS_${PN}-iwlwifi-8265      = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-9000      = "${PN}-iwlwifi-license"
 RDEPENDS_${PN}-iwlwifi-misc      = "${PN}-iwlwifi-license"
 
 # -iwlwifi-misc is a "catch all" package that includes all the iwlwifi
@@ -670,6 +681,7 @@
 LICENSE_${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware"
 LICENSE_${PN}-ibt-11-5    = "Firmware-ibt_firmware"
 LICENSE_${PN}-ibt-12-16   = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-17 = "Firmware-ibt_firmware"
 LICENSE_${PN}-ibt-misc    = "Firmware-ibt_firmware"
 
 FILES_${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware"
@@ -677,12 +689,14 @@
 FILES_${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bseq"
 FILES_${PN}-ibt-11-5    = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi /lib/firmware/intel/ibt-11-5.ddc"
 FILES_${PN}-ibt-12-16   = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi /lib/firmware/intel/ibt-12-16.ddc"
+FILES_${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi /lib/firmware/intel/ibt-17-*.ddc"
 FILES_${PN}-ibt-misc    = "${nonarch_base_libdir}/firmware/ibt-*"
 
 RDEPENDS_${PN}-ibt-hw-37-7 = "${PN}-ibt-license"
 RDEPENDS_${PN}-ibt-hw-37.8 = "${PN}-ibt-license"
 RDEPENDS_${PN}-ibt-11-5    = "${PN}-ibt-license"
 RDEPENDS_${PN}-ibt-12-16   = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-17 = "${PN}-ibt-license"
 RDEPENDS_${PN}-ibt-misc    = "${PN}-ibt-license"
 
 ALLOW_EMPTY_${PN}-ibt= "1"
@@ -707,6 +721,18 @@
 FILES_${PN}-qat           = "${nonarch_base_libdir}/firmware/qat*.bin"
 RDEPENDS_${PN}-qat        = "${PN}-qat-license"
 
+# For QCOM VPU/GPU
+LICENSE_${PN}-qcom-license = "Firmware-qcom"
+FILES_${PN}-qcom-license   = "${nonarch_base_libdir}/firmware/LICENSE.qcom ${nonarch_base_libdir}/firmware/qcom/NOTICE.txt"
+FILES_${PN}-qcom-venus-1.8 = "${nonarch_base_libdir}/firmware/qcom/venus-1.8/*"
+FILES_${PN}-qcom-venus-4.2 = "${nonarch_base_libdir}/firmware/qcom/venus-4.2/*"
+FILES_${PN}-qcom-adreno-a3xx = "${nonarch_base_libdir}/firmware/qcom/a300_*.fw ${nonarch_base_libdir}/firmware/a300_*.fw"
+FILES_${PN}-qcom-adreno-a530 = "${nonarch_base_libdir}/firmware/qcom/a530*.*"
+RDEPENDS_${PN}-qcom-venus-1.8 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-venus-4.2 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-adreno-a3xx = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-adreno-a530 = "${PN}-qcom-license"
+
 # For other firmwares
 # Maybe split out to separate packages when needed.
 LICENSE_${PN} = "\
@@ -737,6 +763,7 @@
     & Firmware-ath9k-htc \
     & Firmware-phanfw \
     & Firmware-qat \
+    & Firmware-qcom \
     & Firmware-qla1280 \
     & Firmware-qla2xxx \
     & Firmware-r8a779x_usb3 \
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 1657df6..9903c06 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -78,7 +78,7 @@
 }
 
 do_install_armmultilib () {
-	oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/mman.h asm/param.h asm/perf_regs.h
+	oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
 	oe_multilib_header asm/posix_types.h asm/ptrace.h  asm/setup.h  asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h  asm/statfs.h asm/swab.h  asm/types.h asm/unistd.h
 }
 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch
new file mode 100644
index 0000000..68b2446
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch
@@ -0,0 +1,31 @@
+From 897736166fd709906a5fdf16eb23f8fddff770b5 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Thu, 1 Mar 2018 18:31:01 -0500
+Subject: [PATCH] if_ether: move muslc ethhdr protection to uapi file
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+Upstream-Status: Pending
+---
+ include/uapi/linux/if_ether.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
+index 153c9c2..7b69b73 100644
+--- a/include/uapi/linux/if_ether.h
++++ b/include/uapi/linux/if_ether.h
+@@ -149,6 +149,12 @@
+  *	This is an Ethernet frame header.
+  */
+ 
++#ifdef _NETINET_IF_ETHER_H /* musl */
++#define __UAPI_DEF_ETHHDR 0
++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */
++#define __UAPI_DEF_ETHHDR 1
++#endif
++
+ /* allow libcs like musl to deactivate this, glibc does not implement this. */
+ #ifndef __UAPI_DEF_ETHHDR
+ #define __UAPI_DEF_ETHHDR		1
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
index 8bb775c..064a391 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
@@ -11,11 +11,11 @@
  include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
  1 file changed, 8 insertions(+), 17 deletions(-)
 
-Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
+Index: linux-4.15/include/uapi/linux/libc-compat.h
 ===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
-@@ -48,13 +48,12 @@
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h	2018-02-05 17:37:44.724314379 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h	2018-02-05 17:38:02.148913820 -0500
+@@ -49,13 +49,12 @@
  #ifndef _UAPI_LIBC_COMPAT_H
  #define _UAPI_LIBC_COMPAT_H
  
@@ -33,7 +33,7 @@
   * that would already be defined. */
  
  #define __UAPI_DEF_IF_IFCONF 0
-@@ -98,15 +97,7 @@
+@@ -99,15 +98,7 @@
  #define __UAPI_DEF_IN_CLASS		0
  
  #define __UAPI_DEF_IN6_ADDR		0
@@ -49,7 +49,7 @@
  #define __UAPI_DEF_SOCKADDR_IN6		0
  #define __UAPI_DEF_IPV6_MREQ		0
  #define __UAPI_DEF_IPPROTO_V6		0
-@@ -114,10 +105,10 @@
+@@ -115,10 +106,10 @@
  #define __UAPI_DEF_IN6_PKTINFO		0
  #define __UAPI_DEF_IP6_MTUINFO		0
  
@@ -62,7 +62,7 @@
   * __UAPI_DEF_* defines and adjust appropriately. */
  #define __UAPI_DEF_IN_ADDR		1
  #define __UAPI_DEF_IN_IPPROTO		1
-@@ -127,7 +118,7 @@
+@@ -128,7 +119,7 @@
  #define __UAPI_DEF_IN_CLASS		1
  
  #define __UAPI_DEF_IN6_ADDR		1
@@ -71,18 +71,18 @@
   * coordinate. */
  #define __UAPI_DEF_IN6_ADDR_ALT		1
  #define __UAPI_DEF_SOCKADDR_IN6		1
-@@ -149,7 +140,7 @@
- /* If we did not see any headers from any supported C libraries,
+@@ -170,7 +161,7 @@
   * or we are being included in the kernel, then define everything
-  * that we need. */
+  * that we need. Check for previous __UAPI_* definitions to give
+  * unsupported C libraries a way to opt out of any kernel definition. */
 -#else /* !defined(__GLIBC__) */
 +#else /* __KERNEL__ */
  
  /* Definitions for if.h */
- #define __UAPI_DEF_IF_IFCONF 1
-@@ -182,6 +173,6 @@
- /* Definitions for xattr.h */
+ #ifndef __UAPI_DEF_IF_IFCONF
+@@ -262,6 +253,6 @@
  #define __UAPI_DEF_XATTR		1
+ #endif
  
 -#endif /* __GLIBC__ */
 +#endif /* __KERNEL__ */
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
index 8dc1edc..fb7e1de 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
@@ -11,37 +11,11 @@
  include/uapi/linux/libc-compat.h | 6 ++++++
  2 files changed, 9 insertions(+), 1 deletion(-)
 
-Index: linux-4.8-rc4/include/uapi/linux/if_ether.h
+Index: linux-4.15/include/uapi/linux/libc-compat.h
 ===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/if_ether.h
-+++ linux-4.8-rc4/include/uapi/linux/if_ether.h
-@@ -22,6 +22,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
- 
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
- 
- /*
-  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
-@@ -138,11 +139,12 @@
-  *	This is an Ethernet frame header.
-  */
- 
-+#if __UAPI_DEF_ETHHDR
- struct ethhdr {
- 	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
- 	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
- 	__be16		h_proto;		/* packet type ID field	*/
- } __attribute__((packed));
--
-+#endif
- 
- #endif /* _UAPI_LINUX_IF_ETHER_H */
-Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
-===================================================================
---- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
-@@ -50,6 +50,12 @@
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h	2018-02-05 17:40:42.338370731 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h	2018-02-05 17:40:42.334370603 -0500
+@@ -51,6 +51,12 @@
  
  #ifndef __KERNEL__ /* we're used from userspace */
  
@@ -52,5 +26,5 @@
 +#endif
 +
  /* Coordinate with libc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
+ #if defined(_NET_IF_H)
  
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb
deleted file mode 100644
index f0d0abf..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.12.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require linux-libc-headers.inc
-
-SRC_URI_append_libc-musl = "\
-    file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
-    file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
-    file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
-    file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \
-   "
-
-SRC_URI[md5sum] = "fc454157e2d024d401a60905d6481c6b"
-SRC_URI[sha256sum] = "a45c3becd4d08ce411c14628a949d08e2433d8cdeca92036c7013980e93858ab"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb
new file mode 100644
index 0000000..a7db4c9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.15.7.bb
@@ -0,0 +1,13 @@
+require linux-libc-headers.inc
+
+SRC_URI_append_libc-musl = "\
+    file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
+    file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
+    file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
+    file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \
+    file://0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch \
+   "
+
+
+SRC_URI[md5sum] = "8186ce63c489199b58b6a58ad2a24a94"
+SRC_URI[sha256sum] = "cd44df4b23a3e0edc14be63df95d768b9600b31c35be05fb89f93226907fc8c6"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
index c1b5b77..8bbfa23 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -69,6 +69,13 @@
                 cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
         fi
 
+        # Remove fixdep/objtool as they won't be target binaries
+        for i in fixdep objtool; do
+                if [ -e $kerneldir/tools/objtool/$i ]; then
+                        rm -rf $kerneldir/tools/objtool/$i
+                fi
+        done
+
         chown -R root:root ${D}
 }
 # Ensure we don't race against "make scripts" during cpio
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 5852b42..4201faf 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -28,10 +28,13 @@
 SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
 SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
 
-LINUX_VERSION ?= "4.12-rc+"
+LINUX_VERSION ?= "4.16-rc+"
 LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
 COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)"
 
 KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb
deleted file mode 100644
index fd31bf9..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
-    if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.10.17"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
index 64b1da1..5edc0fa 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
@@ -7,17 +7,17 @@
 # to build multiple virtual/kernel providers, e.g. as dependency of
 # core-image-rt-sdk, core-image-rt.
 python () {
-    if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+    if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "da775aa9aab41e8a2b4e9b44ffe268446c51759f"
-SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7"
+SRCREV_machine ?= "705d03507a0c10dcbf9cad3ff70f5d60b70f2d99"
+SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "4.12.20"
+LINUX_VERSION ?= "4.12.24"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
new file mode 100644
index 0000000..81306a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
@@ -0,0 +1,41 @@
+KBRANCH ?= "v4.14/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+    if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "7272e9132fdaaf0dd78bc94e9f297aaf73452982"
+SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.14.30"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
new file mode 100644
index 0000000..c5d3ee0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
@@ -0,0 +1,41 @@
+KBRANCH ?= "v4.15/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+    if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.15.13"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
deleted file mode 100644
index 97538e2..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
-    if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "d5efeeeb928a0111fc187fd1e8d03d2e4e35d4a0"
-SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.4.113"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
deleted file mode 100644
index 5c016ed..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
-    if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "90d1ffa36cbd36722638c97c1bb46a5874dbe28e"
-SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.9.82"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb
deleted file mode 100644
index b223497..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.10.17"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "qemux86|qemux86-64"
-
-# Functionality flags
-KERNEL_FEATURES = ""
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
index 0bbd8e2..31307a6 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
@@ -4,13 +4,13 @@
 
 require recipes-kernel/linux/linux-yocto.inc
 
-LINUX_VERSION ?= "4.12.20"
+LINUX_VERSION ?= "4.12.24"
 
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7"
+SRCREV_machine ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
new file mode 100644
index 0000000..34bee09
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
@@ -0,0 +1,28 @@
+KBRANCH ?= "v4.14/standard/tiny/common-pc"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.14.30"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine ?= "ad31896630f8bf6a459164263adc0a8faf984d9e"
+SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
new file mode 100644
index 0000000..05b9ca3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
@@ -0,0 +1,25 @@
+KBRANCH ?= "v4.15/standard/tiny/common-pc"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.15.13"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
deleted file mode 100644
index 8a98189..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.4.113"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "qemux86|qemux86-64"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
deleted file mode 100644
index 4d46802..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-KBRANCH ?= "standard/tiny/common-pc"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "4.9.82"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "qemux86|qemux86-64"
-
-# Functionality flags
-KERNEL_FEATURES = ""
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
index 9c1f61b..3bb872a 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
@@ -12,9 +12,9 @@
 # PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
 # by the use of AUTOREV SRCREVs, which are the default for this recipe.
 python () {
-    if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
+    if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
         d.delVar("BB_DONT_CACHE")
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
+        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
 }
 
 DEPENDS += "xz-native bc-native"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb
deleted file mode 100644
index 1fe3cca..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm  ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc  ?= "standard/qemuppc"
-KBRANCH_qemux86  ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "ae12e19cecc19af66f64a50538909cb1cad185f9"
-SRCREV_machine_qemuarm64 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemumips ?= "b71b80fd679a17dfb4f73b352263c49273f721d4"
-SRCREV_machine_qemuppc ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemux86 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemux86-64 ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_machine_qemumips64 ?= "8bb135e71037c46175bbcc7acf387309b2e17133"
-SRCREV_machine ?= "c1d8c4408b8aedd88eeb6ccc89ce834dd41b3f09"
-SRCREV_meta ?= "1d9a8200184af22f8981fa24b0e82af49c7988dd"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;name=machine;branch=${KBRANCH}; \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.10.17"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb
index fabf0f5..8d56012 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb
@@ -11,20 +11,22 @@
 KBRANCH_qemux86-64 ?= "standard/base"
 KBRANCH_qemumips64 ?= "standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "42cf4d6a1bc84b90681cb82ad95c129387d76b4b"
-SRCREV_machine_qemuarm64 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemumips ?= "571315a5526b9e22262cf99bae7c0dd6e5bd204c"
-SRCREV_machine_qemuppc ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemux86 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemux86-64 ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_machine_qemumips64 ?= "e7889ba18f060368d4ab35e70b076728d73ba622"
-SRCREV_machine ?= "60b649971940737dc7e3a7f247c62ffbd7c82e4c"
-SRCREV_meta ?= "4f825eeb783a279216ee45ed3b9a63dd6837f7d7"
+SRCREV_machine_qemuarm ?= "45824c60ca37f414a5ac5783e970338db9a5a2af"
+SRCREV_machine_qemuarm64 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemumips ?= "66f741b0b3d093e6b6df0f44120913ef3a259e23"
+SRCREV_machine_qemuppc ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemux86 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemux86-64 ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_machine_qemumips64 ?= "c5d838c9e26bd657b49dfe28b115e5bc4b580850"
+SRCREV_machine ?= "f9d67777b07ac97966186c1b56db78afe2a16f92"
+SRCREV_meta ?= "46171de19220c49d670544017cfbeffc1ec70e80"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "4.12.20"
+DEPENDS += "openssl-native util-linux-native"
+
+LINUX_VERSION ?= "4.12.24"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb
new file mode 100644
index 0000000..16142f8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.14.bb
@@ -0,0 +1,47 @@
+KBRANCH ?= "v4.14/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm  ?= "v4.14/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v4.14/standard/qemuarm64"
+KBRANCH_qemumips ?= "v4.14/standard/mti-malta32"
+KBRANCH_qemuppc  ?= "v4.14/standard/qemuppc"
+KBRANCH_qemux86  ?= "v4.14/standard/base"
+KBRANCH_qemux86-64 ?= "v4.14/standard/base"
+KBRANCH_qemumips64 ?= "v4.14/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "d6268fc3460d3904fd49087f7a822efbaab9bfe8"
+SRCREV_machine_qemuarm64 ?= "c94189843b8ad62cafe9a307e7f7d60741690505"
+SRCREV_machine_qemumips ?= "4afd92347b2b35dc8e0006712f8fa00ac57f2a36"
+SRCREV_machine_qemuppc ?= "e8af5c9b65c5187d148ecd11bd7979489460ca64"
+SRCREV_machine_qemux86 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
+SRCREV_machine_qemux86-64 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
+SRCREV_machine_qemumips64 ?= "9863b327e770b42b8c18da3e0cfaf06e8f99ae97"
+SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
+SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.14.30"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb
new file mode 100644
index 0000000..70bd711
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.15.bb
@@ -0,0 +1,47 @@
+KBRANCH ?= "v4.15/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm  ?= "v4.15/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v4.15/standard/qemuarm64"
+KBRANCH_qemumips ?= "v4.15/standard/mti-malta32"
+KBRANCH_qemuppc  ?= "v4.15/standard/qemuppc"
+KBRANCH_qemux86  ?= "v4.15/standard/base"
+KBRANCH_qemux86-64 ?= "v4.15/standard/base"
+KBRANCH_qemumips64 ?= "v4.15/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "4b6902b42f47593928117b2ff0900cd965cf6443"
+SRCREV_machine_qemuarm64 ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemumips ?= "19ba2d843750ff65d8fe590acdfc99aea6153945"
+SRCREV_machine_qemuppc ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemux86 ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemux86-64 ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_machine_qemumips64 ?= "97000c3f4664643bac7828bbdc048f7ec216cc31"
+SRCREV_machine ?= "91084d030bc841c483c31e8664289c7940aa5506"
+SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.15.13"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
deleted file mode 100644
index 97c16d5..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm  ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc  ?= "standard/qemuppc"
-KBRANCH_qemux86  ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "400c0f39b954cd8fffdf53e6ec97852b73fea7af"
-SRCREV_machine_qemuarm64 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemumips ?= "fb03a9472367b6c177729ac631326aafd5d17c92"
-SRCREV_machine_qemuppc ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemux86 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemux86-64 ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_machine_qemumips64 ?= "26b8ba186a6d39728fc1510bd2264110c75842f5"
-SRCREV_machine ?= "4d31a8b7661509ff1044abcf9050750cc2478e20"
-SRCREV_meta ?= "b149d14ccae8349ab33e101f6af233a12f4b17ba"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.4.113"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb
deleted file mode 100644
index a5a165f..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.9.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm  ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc  ?= "standard/qemuppc"
-KBRANCH_qemux86  ?= "standard/base"
-KBRANCH_qemux86-64 ?= "standard/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "23369eb7e07c839fa73a8c1e85aba37a07bf14c1"
-SRCREV_machine_qemuarm64 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemumips ?= "cab9e059447878f5383f91a05db12813f69cbfc1"
-SRCREV_machine_qemuppc ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemux86 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemux86-64 ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_machine_qemumips64 ?= "c2e5ef83b612d50f50fafeed9930dbea302fbe8c"
-SRCREV_machine ?= "eb3b2079ea43b451e06be443f8bc146736f9c4bc"
-SRCREV_meta ?= "0774eacea2a7d3a150594533b8c80d0c0bfdfded"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;name=machine;branch=${KBRANCH}; \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "4.9.82"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb
deleted file mode 100644
index 4d81da0..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Babeltrace - Trace Format Babel Tower"
-DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
-HOMEPAGE = "http://www.efficios.com/babeltrace/"
-BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
-
-LICENSE = "MIT & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
-
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-
-inherit autotools pkgconfig
-
-SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \
-"
-
-EXTRA_OECONF = "--disable-debug-info"
-
-SRC_URI[md5sum] = "0cec2745ac316649791c43f416d71ea1"
-SRC_URI[sha256sum] = "2249fee5beba657731f5d6a84c5296c6517f544bfbe7571bd1fd7af23726137c"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb
new file mode 100644
index 0000000..a29402a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Babeltrace - Trace Format Babel Tower"
+DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
+HOMEPAGE = "http://www.efficios.com/babeltrace/"
+BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
+
+LICENSE = "MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
+
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \
+"
+
+EXTRA_OECONF = "--disable-debug-info"
+
+SRC_URI[md5sum] = "3e8cdafec3ac0346a389870e87bf1344"
+SRC_URI[sha256sum] = "9643039923a0abc75a25b3d594cee0017423b57f10d2b625e96ed1e8d4891fc1"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
index 6e92c22..93626dd 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
@@ -25,6 +25,7 @@
 PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
 PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
 PACKAGECONFIG_remove_libc-musl = "lttng-ust"
+PACKAGECONFIG_remove_riscv64 = "lttng-ust"
 
 SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://x32.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
index 0f18c5d..bff8527 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
@@ -6,13 +6,12 @@
 
 Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
 
-Index: doc/Makefile.am
+Index: lttng-ust-2.9.1/doc/Makefile.am
 ===================================================================
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -1,4 +1,4 @@
+--- lttng-ust-2.9.1.orig/doc/Makefile.am
++++ lttng-ust-2.9.1/doc/Makefile.am
+@@ -1,3 +1,3 @@
 -SUBDIRS = . man examples
 +SUBDIRS = . man
  
- dist_man_MANS = man/lttng-gen-tp.1 \
- 	man/lttng-ust.3 \
+ dist_doc_DATA = java-agent.txt
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
new file mode 100644
index 0000000..97c58c5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Build tools needed by external modules"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+inherit kernel-arch
+inherit pkgconfig
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+S = "${WORKDIR}"
+
+do_configure[depends] += "virtual/kernel:do_shared_workdir openssl-native:do_populate_sysroot"
+do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
+
+DEPENDS += "bc-native"
+
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+
+# Build some host tools under work-shared.  CC, LD, and AR are probably
+# not used, but this is the historical way of invoking "make scripts".
+#
+do_configure() {
+	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+	oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+	           -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts prepare
+
+}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
deleted file mode 100644
index 4b01654..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
+++ /dev/null
@@ -1,65 +0,0 @@
-SUMMARY = "System-Wide Profiler"
-DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
-of profiling all running code at low overhead."
-HOMEPAGE = "http://oprofile.sourceforge.net/news/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191"
-
-LICENSE = "LGPLv2.1+ & GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \
-                   "
-SECTION = "devel"
-
-DEPENDS = "popt binutils"
-RDEPENDS_${PN} = "binutils-symlinks"
-RRECOMMENDS_${PN} = "kernel-vmlinux"
-
-FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
-FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
-FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
-           file://acinclude.m4 \
-           file://automake-foreign.patch \
-           file://oprofile-cross-compile-tests.patch \
-           file://run-ptest \
-           file://root-home-dir.patch \
-           file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
-           file://0001-Fix-FTBFS-problem-with-GCC-6.patch \
-"
-UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/"
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/"
-
-SRC_URI_append_libc-musl = " file://musl.patch"
-
-inherit autotools pkgconfig ptest
-
-EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC="
-do_configure () {
-	cp ${WORKDIR}/acinclude.m4 ${S}/
-	autotools_do_configure
-}
-
-EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests"
-do_compile_ptest() {
-	oe_runmake check
-}
-
-do_install_ptest() {
-	subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
-	for tooltest in ${subdirs}
-	do
-		find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
-	done
-
-	# needed by some libop tests
-	cp -r events ${D}${PTEST_PATH}
-
-	# needed by libregex regex_test
-	cp libregex/stl.pat ${D}${PTEST_PATH}/libregex
-	cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
-
-	# needed by litutil++ file_manip_tests
-	cp ${S}/libutil++/tests/file_manip_tests.cpp \
-		libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
deleted file mode 100644
index ae8562a..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Tue, 9 Feb 2016 02:00:29 +0100
-Subject: [PATCH] Add rmb() definition for NIOS2 architecture
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ]
----
- libperf_events/operf_utils.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
-index 32954cc..8270e53 100644
---- a/libperf_events/operf_utils.h
-+++ b/libperf_events/operf_utils.h
-@@ -178,6 +178,11 @@ void op_release_resources(void);
- #define cpu_relax()	asm volatile("" ::: "memory")
- #endif
- 
-+#ifdef __nios2__
-+#define rmb()		asm volatile("" ::: "memory")
-+#define cpu_relax()	asm volatile("" ::: "memory")
-+#endif
-+
- #ifdef __tile__
- #include <asm/unistd.h>
- #define rmb()		__insn_mf()
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
deleted file mode 100644
index d372fd5..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 39d4d46a0bd504ac708ffe72df87bf74cd12ad30 Mon Sep 17 00:00:00 2001
-From: William Cohen <wcohen@redhat.com>
-Date: Fri, 5 Feb 2016 17:30:19 -0500
-Subject: [PATCH] Fix FTBFS problem with GCC-6
-
-GCC-6 is pickier about some of the type conversions causing the Fedora
-24 mass rebuild the build of oprofile failed with:
-
-make[3]: Entering directory '/builddir/build/BUILD/oprofile-1.1.0/libutil++'
-g++ -DHAVE_CONFIG_H -I. -I..  -I ../libutil -I ../libop -I ../libpp   -W -Wall -fno-common -ftemplate-depth-50 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c -o op_bfd.o op_bfd.cpp
-op_bfd.cpp: In member function 'void op_bfd::get_symbol_range(symbol_index_t, long long unsigned int&, long long unsigned int&) const':
-op_bfd.cpp:538:47: error: cannot convert 'std::ostream {aka std::basic_ostream<char>}' to 'const bool' in initialization
-  bool const verbose = cverb << (vbfd & vlevel1);
-                                               ^
-op_bfd.cpp:546:7: error: in argument to unary !
-  if (!verbose)
-       ^~~~~~~
-
-Avoid the intermediate bool type to make GCC-6 happy.
-
-Signed-off-by: William Cohen <wcohen@redhat.com>
----
-Upstream-Status: Backport
-
- libutil++/op_bfd.cpp | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp
-index 389c920..f2eb42b 100644
---- a/libutil++/op_bfd.cpp
-+++ b/libutil++/op_bfd.cpp
-@@ -535,15 +535,13 @@ void op_bfd::get_symbol_range(symbol_index_t sym_idx,
- {
- 	op_bfd_symbol const & sym = syms[sym_idx];
- 
--	bool const verbose = cverb << (vbfd & vlevel1);
--
- 	if (anon_obj)
- 		start = sym.vma();
- 	else
- 		start = sym.filepos();
- 	end = start + sym.size();
- 
--	if (!verbose)
-+	if (!(cverb << (vbfd & vlevel1)))
- 		return;
- 
- 	io_state state(cverb << (vbfd & vlevel1));
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
deleted file mode 100644
index 95ecd91..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
+++ /dev/null
@@ -1,581 +0,0 @@
-dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found)
-dnl see if autoconf.h defines the option
-AC_DEFUN([AX_KERNEL_OPTION], [
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-I$KINC -O2 -D__KERNEL__"
-AC_TRY_COMPILE( [#include <linux/config.h>],
-[
-#ifndef $1
-break_me_hard(\\\);
-#endif
-],[$2],[$3],)
-CFLAGS=$SAVE_CFLAGS
-])
-
-dnl Handle the 2.4 module inside module/
-AC_DEFUN([AX_CONFIG_MODULE],
-[
-if test ! -f $KINC/linux/autoconf.h; then
-	AC_MSG_ERROR([no suitably configured kernel include tree found])
-fi
-
-dnl  --- Get Linux kernel version and compile parameters ---
-
-AC_SUBST(KVERS)
-AC_MSG_CHECKING([for kernel version])
-dnl it's like this to handle mandrake's fubar version.h - bug #471448
-eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'`
-AC_MSG_RESULT([$KVERS])
-case "$KVERS" in
-2.2.*|2.4.*) ;;
-*) AC_MSG_ERROR([Unsupported kernel version])
-esac
-
-dnl Check for the minimal kernel version supported
-AC_MSG_CHECKING([kernel version])
-AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section]))
-
-dnl linux/spinlock.h added at some point in past
-AC_MSG_CHECKING([for $KINC/linux/spinlock.h])
-if test -f $KINC/linux/spinlock.h; then
-	EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER"
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_RESULT([no])
-fi
-
-AC_MSG_CHECKING([for rtc_lock])
-gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null
-if test "$?" -eq 0; then
-	EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK"
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_RESULT([no])
-fi
-	 
-arch="unknown"
-AC_MSG_CHECKING(for x86-64 architecture)
-AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0)
-AX_MSG_RESULT_YN($x8664)
-BUILD_HAMMER=no
-if test "$x8664" -eq 1; then
-	arch="x86"
-	BUILD_HAMMER=yes
-else
-	AC_MSG_CHECKING(for x86 architecture)
-	AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0)
-	AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86)
-	AX_MSG_RESULT_YN($x86)
-	test "$x86" = 1 && arch="x86"
-	
-	if test "$arch" = "unknown"; then
-  		AC_MSG_CHECKING(for ia64 architecture)
-  		AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0)
-  		AX_MSG_RESULT_YN($ia64)
-  		test "$ia64" = 1 && arch="ia64"
-	fi
-
-fi
-AC_SUBST(BUILD_HAMMER)
-
-test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture)
-
-dnl check to see if kernel verion appropriate for arch
-AC_MSG_CHECKING(arch/kernel version combination)
-case "$arch" in
-ia64)
-	AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]),
-		AC_MSG_ERROR([unsupported arch/kernel])) ;;
-*) AC_MSG_RESULT([ok])
-esac
-
-dnl for now we do not support PREEMPT patch
-AC_MSG_CHECKING([for preempt patch])
-AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0)
-AX_MSG_RESULT_YN([$preempt])
-test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT])
-
-AC_SUBST(KINC)
-
-MODINSTALLDIR=/lib/modules/$KVERS
- 
-OPROFILE_MODULE_ARCH=$arch
-AC_SUBST(OPROFILE_MODULE_ARCH)
-]
-)
-
-dnl AX_MSG_RESULT_YN(a)
-dnl results "yes" iff a==1, "no" else
-AC_DEFUN([AX_MSG_RESULT_YN], [x=no
-test "x$1" = "x1" && x=yes
-AC_MSG_RESULT($x)])
-
-dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc))
-AC_DEFUN([AX_MALLOC_ATTRIBUTE],
-[
-AC_MSG_CHECKING([whether malloc attribute is understood])
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-AC_TRY_COMPILE(,[
-void monkey() __attribute__((malloc));
-],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no]))
-CFLAGS=$SAVE_CFLAGS 
-]
-)
-
-dnl builtin_expect is used in module we can't add that in config.h
-AC_DEFUN([AX_BUILTIN_EXPECT],
-[
-AC_MSG_CHECKING([whether __builtin_expect is understood])
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-AC_TRY_LINK(,[
-int i;
-if (__builtin_expect(i, 0)) { }
-],
-AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK",
-AC_MSG_RESULT([no]);)
-CFLAGS=$SAVE_CFLAGS 
-]
-) 
-
-dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs
-AC_DEFUN([AX_EXTRA_DIRS],
-[
-AC_ARG_WITH(extra-includes,
-[  --with-extra-includes=DIR    add extra include paths],
-  use_extra_includes="$withval",
-  use_extra_includes=NO
-)
-if test -n "$use_extra_includes" && \
-        test "$use_extra_includes" != "NO"; then
-  ac_save_ifs=$IFS
-  IFS=':'
-  for dir in $use_extra_includes; do
-    extra_includes="$extra_includes -I$dir"
-  done
-  IFS=$ac_save_ifs
-  CPPFLAGS="$CPPFLAGS $extra_includes"
-fi
-
-AC_ARG_WITH(extra-libs,
-[  --with-extra-libs=DIR        add extra library paths],
-  use_extra_libs=$withval,
-  use_extra_libs=NO
-)
-if test -n "$use_extra_libs" && \
-        test "$use_extra_libs" != "NO"; then
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $use_extra_libs; do
-     extra_libraries="$extra_libraries -L$dir"
-   done
-   IFS=$ac_save_ifs
-   LDFLAGS="$LDFLAGS $extra_libraries"
-fi
-]
-)
-
-dnl AX_POPT_CONST - check popt prototype
-AC_DEFUN([AX_POPT_CONST],
-[
-AC_MSG_CHECKING([popt prototype])
-SAVE_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-Werror $CXXFLAGS"
-AC_TRY_COMPILE([#include <popt.h>],
-[
-int c; char **v;
-poptGetContext(0, c, v, 0, 0);
-],
-AC_MSG_RESULT([takes char **]);,
-AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **]))
-CXXFLAGS="$SAVE_CXXFLAGS"
-]
-)
-
-dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK
-AC_DEFUN([AX_CHECK_SSTREAM],
-[
-AC_MSG_CHECKING([whether to use included sstream])
-AC_TRY_COMPILE([#include <sstream>], [], 
-AC_MSG_RESULT([no]);,
-AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include")
-]
-)
-
-dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false)
-dnl exec action-if-true if typedef_name is a typedef to type else exec 
-dnl action-if-false
-dnl currently work only with type typedef'ed in stddef.h
-AC_DEFUN([AX_CHECK_TYPEDEF], [
-dnl AC_LANG_PUSH(C) not in autoconf 2.13
-AC_LANG_SAVE
-AC_LANG_C
-SAVE_CFLAGS=$CFLAGS
-CFLAGS="-Werror $CFLAGS"
-
-AC_TRY_COMPILE(
-  [
-  #include <stddef.h>
-  ],
-  [
-  typedef void (*fct1)($1);
-  typedef void (*fct2)($2);
-  fct1 f1 = 0;
-  fct2 f2 = 0;
-  if (f1 == f2) {}
-  ],
-[$3],[$4])
-
-CFLAGS=$SAVE_CFLAGS
-AC_LANG_RESTORE
-])
-
-
-dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name)
-dnl set var_name to the typedef name of $1 which must be in canditate_list
-dnl else produce a fatal error
-AC_DEFUN([AX_TYPEDEFED_NAME], [
-	AC_MSG_CHECKING([type of $1])
-	for f in $2; do
-		AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="")
-		if test -n "${$3}"; then
-			break
-		fi
-	done
-	if test -n "${$3}"; then
-		AC_MSG_RESULT([${$3}])
-	else
-		AC_MSG_ERROR([not found])
-	fi
-])
-
-dnl find a binary in the path
-AC_DEFUN([QT_FIND_PATH],
-[
-	AC_MSG_CHECKING([for $1])
-	AC_CACHE_VAL(qt_cv_path_$1,
-	[
-		qt_cv_path_$1="NONE"
-		if test -n "$$2"; then
-			qt_cv_path_$1="$$2";
-		else
-			dirs="$3"
-			qt_save_IFS=$IFS
-			IFS=':'
-			for dir in $PATH; do
-				dirs="$dirs $dir"
-			done
-			IFS=$qt_save_IFS
- 
-			for dir in $dirs; do
-				if test -x "$dir/$1"; then
-					if test -n "$5"; then
-						evalstr="$dir/$1 $5 2>&1 "
-						if eval $evalstr; then
-							qt_cv_path_$1="$dir/$1"
-							break
-						fi
-					else
-						qt_cv_path_$1="$dir/$1"
-						break
-					fi
-				fi
-			done
-		fi
-	])
- 
-	if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then
-		AC_MSG_RESULT(not found)
-		$4
-	else
-		AC_MSG_RESULT($qt_cv_path_$1)
-		$2=$qt_cv_path_$1
-	fi
-])
-
-dnl Find the uic compiler on the path or in qt_cv_dir
-AC_DEFUN([QT_FIND_UIC],
-[
-	QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin)
-	if test -z "$ac_uic" -a "$FATAL" = 1; then
-		AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !])
-	fi
-])
- 
-dnl Find the right moc in path/qt_cv_dir
-AC_DEFUN([QT_FIND_MOC],
-[
-	QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin)
-	QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin)
-
-	if test -n "$ac_moc1" -a -n "$ac_moc2"; then
-		dnl found both. Prefer Qt3's if it exists else moc2
-		$ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null
-		if test "$?" = 0; then
-			ac_moc=$ac_moc1;
-		else
-			ac_moc=$ac_moc2;
-		fi
-	else
-		if test -n "$ac_moc1"; then
-			ac_moc=$ac_moc1;
-		else
-			ac_moc=$ac_moc2;
-		fi
-	fi
-
-	if test -z "$ac_moc"  -a "$FATAL" = 1; then
-		AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !])
-	fi
-])
-
-dnl check a particular libname
-AC_DEFUN([QT_TRY_LINK],
-[
-	SAVE_LIBS="$LIBS"
-	LIBS="$LIBS $1"
-	AC_TRY_LINK([
-	#include <qglobal.h>
-	#include <qstring.h>
-		],
-	[
-	QString s("mangle_failure");
-	#if (QT_VERSION < 221)
-	break_me_(\\\);
-	#endif
-	],
-	qt_cv_libname=$1,
-	)
-	LIBS="$SAVE_LIBS"
-])
- 
-dnl check we can do a compile
-AC_DEFUN([QT_CHECK_COMPILE],
-[
-	AC_MSG_CHECKING([for Qt library name])
- 
-	AC_CACHE_VAL(qt_cv_libname,
-	[
-		AC_LANG_CPLUSPLUS
-		SAVE_CXXFLAGS=$CXXFLAGS
-		CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS" 
-
-		for libname in -lqt-mt -lqt3 -lqt2 -lqt;
-		do
-			QT_TRY_LINK($libname)
-			if test -n "$qt_cv_libname"; then
-				break;
-			fi
-		done
-
-		CXXFLAGS=$SAVE_CXXFLAGS
-	])
-
-	if test -z "$qt_cv_libname"; then
-		AC_MSG_RESULT([failed]) 
-		if test "$FATAL" = 1 ; then
-			AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !])
-		fi
-	else
-		AC_MSG_RESULT([$qt_cv_libname])
-	fi
-])
-
-dnl get Qt version we're using
-AC_DEFUN([QT_GET_VERSION],
-[
-	AC_CACHE_CHECK([Qt version],lyx_cv_qtversion,
-	[
-		AC_LANG_CPLUSPLUS
-		SAVE_CPPFLAGS=$CPPFLAGS
-		CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
-
-		cat > conftest.$ac_ext <<EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-#include <qglobal.h>
-"%%%"QT_VERSION_STR"%%%"
-EOF
-		lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
-			grep '^"%%%"'  2>/dev/null | \
-			sed -e 's/"%%%"//g' -e 's/"//g'`
-		rm -f conftest.$ac_ext
-		CPPFLAGS=$SAVE_CPPFLAGS
-	])
- 
-	QT_VERSION=$lyx_cv_qtversion
-	AC_SUBST(QT_VERSION)
-])
- 
-dnl start here 
-AC_DEFUN([QT_DO_IT_ALL],
-[
-	dnl Please leave this alone. I use this file in
-	dnl oprofile.
-	FATAL=0
-
-	AC_ARG_WITH(qt-dir, [  --with-qt-dir           where the root of Qt is installed ],
-		[ qt_cv_dir=`eval echo "$withval"/` ])
-	 
-	AC_ARG_WITH(qt-includes, [  --with-qt-includes      where the Qt includes are. ],
-		[ qt_cv_includes=`eval echo "$withval"` ])
- 
-	AC_ARG_WITH(qt-libraries, [  --with-qt-libraries     where the Qt library is installed.],
-		[  qt_cv_libraries=`eval echo "$withval"` ])
-
-	dnl pay attention to $QTDIR unless overridden
-	if test -z "$qt_cv_dir"; then
-		qt_cv_dir=$QTDIR
-	fi
- 
-	dnl derive inc/lib if needed
-	if test -n "$qt_cv_dir"; then
-		if test -z "$qt_cv_includes"; then
-			qt_cv_includes=$qt_cv_dir/include
-		fi
-		if test -z "$qt_cv_libraries"; then
-			qt_cv_libraries=$qt_cv_dir/lib
-		fi
-	fi
-
-	dnl flags for compilation
-	QT_INCLUDES=
-	QT_LDFLAGS=
-	if test -n "$qt_cv_includes"; then
-		QT_INCLUDES="-I$qt_cv_includes"
-	fi
-	if test -n "$qt_cv_libraries"; then
-		QT_LDFLAGS="-L$qt_cv_libraries"
-	fi
-	AC_SUBST(QT_INCLUDES)
-	AC_SUBST(QT_LDFLAGS)
- 
-	QT_FIND_MOC
-	MOC=$ac_moc
-	AC_SUBST(MOC)
-	QT_FIND_UIC
-	UIC=$ac_uic
-	AC_SUBST(UIC)
-
-	QT_CHECK_COMPILE
- 
-	QT_LIB=$qt_cv_libname;
-	AC_SUBST(QT_LIB)
-
-	if test -n "$qt_cv_libname"; then
-		QT_GET_VERSION
-	fi
-])
-
-dnl AX_CXXFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CXX support it.
-AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [
-AC_MSG_CHECKING([whether ${CXX} support precompiled header])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-SAVE_CXXFLAGS=$CXXFLAGS
-dnl we consider than if -Winvalid-pch is accepted pch will works ...
-CXXFLAGS=-Winvalid-pch
-dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and
-dnl the fact than some pch will be invalid for the given compilation option
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no]))
-CXXFLAGS=$SAVE_CXXFLAGS
-AC_LANG_RESTORE
-])
-
-dnl AX_CHECK_DOCBOOK
-AC_DEFUN([AX_CHECK_DOCBOOK], [
-# It's just rude to go over the net to build
-XSLTPROC_FLAGS=--nonet
-DOCBOOK_ROOT=
-if test ! -f /etc/xml/catalog; then
-	for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/;
-	do
-		if test -d "$i"; then
-			DOCBOOK_ROOT=$i
-		fi
-	done
-
-	# Last resort - try net
-	if test -z "$DOCBOOK_ROOT"; then
-		XSLTPROC_FLAGS=
-	fi
-else
-	XML_CATALOG=/etc/xml/catalog
-	CAT_ENTRY_START='<!--'
-	CAT_ENTRY_END='-->'
-fi
-
-AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
-XSLTPROC_WORKS=no
-if test -n "$XSLTPROC"; then
-	AC_MSG_CHECKING([whether xsltproc works])
-
-	if test -n "$XML_CATALOG"; then
-		DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
-	else
-		DB_FILE="$DOCBOOK_ROOT/docbook.xsl"
-	fi
-
-	$XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
-<?xml version="1.0" encoding='ISO-8859-1'?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<book id="test">
-</book>
-END
-	if test "$?" = 0; then
-		XSLTPROC_WORKS=yes
-	fi
-	AC_MSG_RESULT($XSLTPROC_WORKS)
-fi
-AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
-
-AC_SUBST(XML_CATALOG)
-AC_SUBST(XSLTPROC_FLAGS)
-AC_SUBST(DOCBOOK_ROOT)
-AC_SUBST(CAT_ENTRY_START)
-AC_SUBST(CAT_ENTRY_END)
-])
-
-dnl AX_CFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CC support it.
-AC_DEFUN([AX_CFLAGS_OPTION], [
-AC_MSG_CHECKING([whether ${CC} $2 is understood])
-AC_LANG_SAVE
-AC_LANG_C
-SAVE_CFLAGS=$CFLAGS
-CFLAGS=$2
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
-CFLAGS=$SAVE_CFLAGS
-AC_LANG_RESTORE
-])
-
-
-dnl AX_CXXFLAGS_OPTIONS(var-name, option)
-dnl add option to var-name if $CXX support it.
-AC_DEFUN([AX_CXXFLAGS_OPTION], [
-AC_MSG_CHECKING([whether ${CXX} $2 is understood])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-SAVE_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=$2
-AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
-CXXFLAGS=$SAVE_CXXFLAGS
-AC_LANG_RESTORE
-])
-
-dnl AX_COPY_IF_CHANGE(source, dest)
-dnl copy source to dest if they don't compare equally or if dest doesn't exist
-AC_DEFUN([AX_COPY_IF_CHANGE], [
-if test -r $2; then
-	if cmp $1 $2 > /dev/null; then
-		echo $2 is unchanged
-	else
-		cp -f $1 $2
-	fi
-else
-	cp -f $1 $2
-fi
-])
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
deleted file mode 100644
index b9bb6c5..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign".
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index 5740585..cf6c316 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([foreign])
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch
deleted file mode 100644
index 51db408..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Fix glibc-isms so that oprofile builds with musl.
-
-Patch taken from openwrt (https://github.com/openwrt-mirror/openwrt/blob/master/package/devel/oprofile/patches/100-musl.patch)
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
---- a/pe_profiling/operf.cpp
-+++ b/pe_profiling/operf.cpp
-@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_
-                                 int tflag  __attribute__((unused)),
-                                 struct FTW *ftwbuf __attribute__((unused)))
- {
-+	int err;
-+
- 	if (remove(fpath)) {
-+		err = errno;
- 		perror("sample data removal error");
--		return FTW_STOP;
-+		return err;
- 	} else {
--		return FTW_CONTINUE;
-+		return 0;
- 	}
- }
- 
-@@ -896,7 +899,7 @@ static void convert_sample_data(void)
- 		return;
- 
- 	if (!operf_options::append) {
--                int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
-+                int flags = FTW_DEPTH;
- 		errno = 0;
- 		if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
- 				errno != ENOENT) {
---- a/libop/op_events.c
-+++ b/libop/op_events.c
-@@ -83,7 +83,7 @@ static int parse_hex(char const * str)
- static u64 parse_long_hex(char const * str)
- {
- 	u64 value;
--	if (sscanf(str, "%Lx", &value) != 1)
-+	if (sscanf(str, "0x%llx", &value) != 1)
- 		parse_error("expected long hexadecimal value");
- 
- 	fflush(stderr);
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
deleted file mode 100644
index aefa954..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Prevent running check tests on host if cross compiling
-
-This patch enables running the 'make check' tests on the target
-in a cross-compiled environment. If not cross-compiling, then 'make
- check' builds and executes the tests; no change from this patch.
-In a cross-compiling environment, the make variable CROSS_COMPILE is
-set which bypasses assiging tests to the makekfile variable TESTS.
-Since TESTS is empty, the 'make check' process never tries to run the
-tests on the hosts.  On the target, the tests must be run manually.
-
-Also, in the libutil++ tests, a makefile variable SRCDIR is passed into
-the compilation phase, pointing to the runtime location of the test
-'file-manip-tests'.  The mechanism used for a host test, based on
-'topdir' doesn't work.  Instead, if CROSS_COMPILE is set, the
-makefile takes the path of SRCDIR from the build environment and not
-from an expression based on the host path 'topdir'.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-diff --git a/configure.ac b/configure.ac
-index 41ece64..ce5a16f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check,
- 	enable_account_check=$enableval, enable_account_check=yes)
- 
- AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes")
-+AM_CONDITIONAL(CROSS_COMPILE, test "x$cross_compiling" = "xyes")
- 
- AC_SUBST(OP_CFLAGS)
- AC_SUBST(OP_CXXFLAGS)
-diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am
-index 8a69003..d820090 100644
---- a/libdb/tests/Makefile.am
-+++ b/libdb/tests/Makefile.am
-@@ -13,4 +13,6 @@ check_PROGRAMS = db_test
- db_test_SOURCES = db_test.c
- db_test_LDADD = ../libodb.a ../../libutil/libutil.a
- 
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am
-index 8a79eb5..6d417c4 100644
---- a/libop/tests/Makefile.am
-+++ b/libop/tests/Makefile.am
-@@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS}
- mangle_tests_SOURCES = mangle_tests.c
- mangle_tests_LDADD = ${COMMON_LIBS}
- 
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS} utf8_checker.sh
-+endif
-diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am
-index 6f19838..1d176f9 100644
---- a/libregex/tests/Makefile.am
-+++ b/libregex/tests/Makefile.am
-@@ -18,4 +18,6 @@ java_test_LDADD = \
- 
- EXTRA_DIST = mangled-name.in
- 
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am
-index 51af031..a01ea2d 100644
---- a/libutil++/tests/Makefile.am
-+++ b/libutil++/tests/Makefile.am
-@@ -1,7 +1,9 @@
- 
- REALPATH= readlink -f
- 
-+if ! CROSS_COMPILE
- SRCDIR := $(shell $(REALPATH) $(topdir)/libutil++/tests/ )
-+endif
- 
- AM_CPPFLAGS = \
- 	-I ${top_srcdir}/libutil++ -D SRCDIR="\"$(SRCDIR)/\"" @OP_CPPFLAGS@
-@@ -46,4 +48,6 @@ cached_value_tests_LDADD = ${COMMON_LIBS}
- utility_tests_SOURCES = utility_tests.cpp
- utility_tests_LDADD = ${COMMON_LIBS}
- 
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
-diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am
-index dfcd6ec..e8831b5 100644
---- a/libutil/tests/Makefile.am
-+++ b/libutil/tests/Makefile.am
-@@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a
- string_tests_SOURCES = string_tests.c
- string_tests_LDADD = ../libutil.a
- 
-+if ! CROSS_COMPILE
- TESTS = ${check_PROGRAMS}
-+endif
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
deleted file mode 100644
index 3eaf6a7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-oprofile: Determine the root home directory dynamically
-
-This commit detects the root home directory dynamically with changes to
-the oprofile gui app source.
-
-The commit replaces an earlier fix that detected and adjusted a
-'non-standard' root home directory at build time.  The advantage of this
-patch is that the oprofile tools are adjusted to the current run-time
-path to ~root, not the build time path.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-Index: oprofile-1.0.0/doc/oprofile.html
-===================================================================
---- oprofile-1.0.0.orig/doc/oprofile.html	2014-11-03 17:55:31.511034857 +0000
-+++ oprofile-1.0.0/doc/oprofile.html	2014-11-03 17:57:26.415037988 +0000
-@@ -1563,8 +1563,8 @@
- 		<span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process
- 		the profile data it has collected.  Use <code class="code">kill -SIGINT &lt;operf-PID&gt;</code>
- 		for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span>
--		with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory
--		of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users.
-+		with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory
-+		of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users.
- 		</p>
-               </dd>
-               <dt>
-Index: oprofile-1.0.0/doc/oprofile.xml
-===================================================================
---- oprofile-1.0.0.orig/doc/oprofile.xml	2014-11-03 17:55:31.515034857 +0000
-+++ oprofile-1.0.0/doc/oprofile.xml	2014-11-03 17:58:03.719039005 +0000
-@@ -654,8 +654,8 @@
- 		<emphasis>must</emphasis> stop it in a controlled manner in order to process
- 		the profile data it has collected.  Use <code>kill -SIGINT &lt;operf-PID&gt;</code>
- 		for this purpose. It is recommended that when running <command>operf</command>
--		with this option, your current working directory should be <filename>/root</filename> or a subdirectory
--		of <filename>/root</filename> to avoid storing sample data files in locations accessible by regular users.
-+		with this option, your current working directory should be <filename>~root</filename> or a subdirectory
-+		of <filename>~root</filename> to avoid storing sample data files in locations accessible by regular users.
- 		</para></listitem>
- 	</varlistentry>
- 	<varlistentry>
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest
deleted file mode 100644
index 4814be6..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/run-ptest
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-saved_dir=$PWD
-for dir in */tests ; do
-	cd $dir
-	for atest in * ; do
-		if [ \( -x $atest \) -a \( -f $atest \) ] ; then
-			./$atest > ${atest}.stdout 2> ${atest}.stderr
-			if [ $? = 0 ] ; then
-				echo "PASS: $dir $atest"
-				rm ${atest}.stdout ${atest}.stderr
-			else
-				echo "FAIL: ${dir}/${atest}"
-			fi
-		fi
-	done
-	cd $saved_dir
-done
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
deleted file mode 100644
index 92a94ad..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require oprofile.inc
-
-DEPENDS += "virtual/kernel"
-DEPENDS_append_powerpc64 = " libpfm4"
-
-SRC_URI[md5sum] = "248c4c069f9476f427fa7195563f9867"
-SRC_URI[sha256sum] = "cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c"
-
-S = "${WORKDIR}/oprofile-${PV}"
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
index b79b973..51f5597 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
@@ -22,11 +22,14 @@
 PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
 PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
 
+# libaudit support would need scripting to be enabled
+PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
+
 DEPENDS = " \
     virtual/${MLPREFIX}libc \
     ${MLPREFIX}elfutils \
     ${MLPREFIX}binutils \
-    bison flex xz \
+    bison-native flex-native xz \
     xmlto-native \
     asciidoc-native \
 "
@@ -35,9 +38,10 @@
 
 PROVIDES = "virtual/perf"
 
-inherit linux-kernel-base kernel-arch pythonnative
+inherit linux-kernel-base kernel-arch
 
 # needed for building the tools/perf Python bindings
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'pythonnative', '', d)}
 inherit python-dir
 export PYTHON_SITEPACKAGES_DIR
 
@@ -47,7 +51,8 @@
 do_populate_lic[depends] += "virtual/kernel:do_patch"
 
 # needed for building the tools/perf Perl binding
-inherit perlnative cpan-base
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perlnative', '', d)}
+inherit cpan-base
 # Env var which tells perl if it should use host (no) or target (yes) settings
 export PERLCONFIGTARGET = "${@is_target(d)}"
 export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
@@ -56,7 +61,7 @@
 
 inherit kernelsrc
 
-B = "${WORKDIR}/${BPN}-${PV}"
+S = "${WORKDIR}/${BP}"
 SPDX_S = "${S}/tools/perf"
 
 # The LDFLAGS is required or some old kernels fails due missing
@@ -92,6 +97,17 @@
     'infodir=${@os.path.relpath(infodir, prefix)}' \
 "
 
+PERF_SRC ?= "Makefile \
+             include \
+             tools/arch \
+             tools/build \
+             tools/include \
+             tools/lib \
+             tools/Makefile \
+             tools/perf \
+             tools/scripts \
+"
+
 PERF_EXTRA_LDFLAGS = ""
 
 # MIPS N32
@@ -114,11 +130,22 @@
 	fi
 }
 
-do_configure_prepend () {
-    # Fix for rebuilding
-    rm -rf ${B}/
-    mkdir -p ${B}/
+do_configure[prefuncs] += "copy_perf_source_from_kernel"
+python copy_perf_source_from_kernel() {
+    sources = (d.getVar("PERF_SRC") or "").split()
+    src_dir = d.getVar("STAGING_KERNEL_DIR")
+    dest_dir = d.getVar("S")
+    bb.utils.mkdirhier(dest_dir)
+    for s in sources:
+        src = oe.path.join(src_dir, s)
+        dest = oe.path.join(dest_dir, s)
+        if os.path.isdir(src):
+            oe.path.copyhardlinktree(src, dest)
+        else:
+            bb.utils.copyfile(src, dest)
+}
 
+do_configure_prepend () {
     # If building a multlib based perf, the incorrect library path will be
     # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
     # build, with a 64 bit multilib, the arch won't match and the detection of a 
@@ -214,20 +241,21 @@
 RDEPENDS_${PN} += "elfutils bash"
 RDEPENDS_${PN}-doc += "man"
 RDEPENDS_${PN}-archive =+ "bash"
-RDEPENDS_${PN}-python =+ "bash python python-modules"
+RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
 RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
 RDEPENDS_${PN}-tests =+ "python"
 
 RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}"
 RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
 
-#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent"
 FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
 FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
 FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
-FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}"
-FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*"
-FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
+FILES_${PN}-python = " \
+                       ${PYTHON_SITEPACKAGES_DIR} \
+                       ${libexecdir}/perf-core/scripts/python \
+                       "
+FILES_${PN}-perl = "${libexecdir}/perf-core/scripts/perl"
 
 
 INHIBIT_PACKAGE_DEBUG_SPLIT="1"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
deleted file mode 100644
index 0fd6310..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0856d8145d187a7e5a49625247abe43a13f95acc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 15 Sep 2015 19:36:28 +0000
-Subject: [PATCH] include rquired headers for typedefs
-
-timeval struct needs to include sys/time.h and sprintf() usage requires
-to include stdio.h headers from system
-
-Fixes
-src/perf/perf_bundle.cpp:141:2: error: use of undeclared identifier 'sprintf'; did you mean 'vswprintf'?
-src/devices/devfreq.h:35:18: error: field has incomplete type 'struct timeval'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/devices/devfreq.h    | 1 +
- src/perf/perf_bundle.cpp | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h
-index 16a60fb..4bede7c 100644
---- a/src/devices/devfreq.h
-+++ b/src/devices/devfreq.h
-@@ -25,6 +25,7 @@
- #ifndef _INCLUDE_GUARD_DEVFREQ_H
- #define _INCLUDE_GUARD_DEVFREQ_H
- 
-+#include <sys/time.h>
- #include "device.h"
- #include "../parameters/parameters.h"
- 
-diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp
-index cf1ae11..232f894 100644
---- a/src/perf/perf_bundle.cpp
-+++ b/src/perf/perf_bundle.cpp
-@@ -27,6 +27,7 @@
- #include <algorithm>
- #include <string.h>
- #include <stdint.h>
-+#include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
--- 
-2.5.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb
deleted file mode 100644
index 4d7a3e7..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Power usage tool"
-DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
-HOMEPAGE = "http://01.org/powertop/"
-BUGTRACKER = "http://bugzilla.lesswatts.org/"
-DEPENDS = "ncurses libnl pciutils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-
-SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz \
-           file://0001-include-rquired-headers-for-typedefs.patch \
-"
-
-SRC_URI[md5sum] = "c55fedb69203e480801b18bd7b886241"
-SRC_URI[sha256sum] = "a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a"
-
-UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads"
-
-inherit autotools gettext pkgconfig
-
-# we do not want libncursesw if we can
-do_configure_prepend() {
-    # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
-    sed -i -e "s/ncursesw//g" ${S}/configure.ac
-    mkdir -p ${B}/src/tuning/
-}
-
-inherit update-alternatives
-ALTERNATIVE_${PN} = "powertop"
-ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb
new file mode 100644
index 0000000..4fe5447
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/powertop/powertop_2.9.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Power usage tool"
+DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
+HOMEPAGE = "http://01.org/powertop/"
+BUGTRACKER = "http://bugzilla.lesswatts.org/"
+DEPENDS = "ncurses libnl pciutils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
+
+SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-v${PV}.tar.gz \
+"
+
+SRC_URI[md5sum] = "583518c5c4434c6e9b9c58c3920950b6"
+SRC_URI[sha256sum] = "aa7fb7d8e9a00f05e7d8a7a2866d85929741e0d03a5bf40cab22d2021c959250"
+
+UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads"
+UPSTREAM_CHECK_REGEX = "powertop-[v]?(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools gettext pkgconfig
+
+S = "${WORKDIR}/${BPN}-v${PV}"
+
+# we do not want libncursesw if we can
+do_configure_prepend() {
+    # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
+    sed -i -e "s/ncursesw//g" ${S}/configure.ac
+    mkdir -p ${B}/src/tuning/
+}
+
+inherit update-alternatives
+ALTERNATIVE_${PN} = "powertop"
+ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
deleted file mode 100644
index 202f354..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 27df521c68e7c8b5b050dab15f40aa15fd03623a Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 14:58:24 +0300
-Subject: [PATCH] Avoid building docs
-
-Upstream-Status: Inappropriate
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Makefile.am | 2 +-
- m4/yelp.m4  | 6 ------
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index b919a3f..3a3851d 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = daemon data help lib po src tools tests
-+SUBDIRS = daemon data lib po src tools tests
- 
- EXTRA_DIST = AUTHORS tap-test COPYING.gpl-2
- 
-diff --git a/m4/yelp.m4 b/m4/yelp.m4
-index 5db847f..1b6ede4 100644
---- a/m4/yelp.m4
-+++ b/m4/yelp.m4
-@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
- HELP_DIR="$with_help_dir"
- AC_SUBST(HELP_DIR)
- 
--AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
--AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
--if test x"$ITSTOOL" = x; then
--  AC_MSG_ERROR([itstool not found])
--fi
--
- AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
- AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
- if test x"$XMLLINT" = x; then
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
deleted file mode 100644
index 6085232..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 765d578145e31ddc9495adfab8037ade33c6a9cc Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 10:59:36 +0300
-Subject: [PATCH] Disable check for polkit for UI
-
-The check is not technically required: sysprof just needs
-to be able to access system perf counters at runtime.
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8559597..ecf93ad 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -131,8 +131,8 @@ AS_IF([test "$enable_gtk" = auto],[
- 	AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[enable_gtk=yes],[enable_gtk=no])
- ])
- AS_IF([test "$enable_gtk" = "yes"],[
--	AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[],[
--		AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version and polkit-gobject-1])
-+	AS_IF([test "$have_gtk" = "yes"],[],[
-+		AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version])
- 	])
- ])
- AM_CONDITIONAL(ENABLE_GTK, test "$enable_gtk" = "yes")
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
new file mode 100644
index 0000000..e28fdca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
@@ -0,0 +1,26 @@
+From c2495a4c042e6a675da69bab20cc3669391e8e2a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 23 Aug 2017 18:38:26 +0300
+Subject: [PATCH 1/2] Do not build anything in help/ as it requires itstool.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4ac3934..8c4369a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -116,7 +116,6 @@ subdir('tools')
+ subdir('tests')
+ 
+ subdir('data')
+-subdir('help')
+ subdir('po')
+ 
+ meson.add_install_script('build-aux/meson_post_install.sh')
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
deleted file mode 100644
index 158d997..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2b4005d72d3393933a7914be102ea65505c536cc Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Thu, 21 Jul 2016 11:53:31 +0300
-Subject: [PATCH] configure: Add option to enable/disable polkit
-
-Changes the configure behaviour from autodetecting the polkit by default
-to having an option to disable it explicitly
-
-Upstream-Status: Pending
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 2246d5a..3d3fe0f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -104,10 +104,18 @@ PKG_CHECK_MODULES(GTK,
-                   [gtk+-3.0 >= gtk_required_version],
-                   [have_gtk=yes],
-                   [have_gtk=no])
-+AC_ARG_ENABLE([polkit],
-+                   AS_HELP_STRING([--disable-polkit], [Do not use Polkit]),
-+                   [enable_polkit="$enableval"], [enable_polkit="yes"])
-+
-+AS_IF([test "x$enable_polkit" = "xyes"], [
- PKG_CHECK_MODULES(POLKIT,
-                   [polkit-gobject-1],
-                   [have_polkit=yes],
-                   [have_polkit=no])
-+                                         ])
-+AM_CONDITIONAL([HAVE_POLKIT], [test "x$enable_polkit" = "xyes"])
-+
- PKG_CHECK_MODULES(SYSTEMD,
-                   [libsystemd >= systemd_required_version],
-                   [have_systemd=yes],
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb
deleted file mode 100644
index 79a27be..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.24.1.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "System-wide Performance Profiler for Linux"
-HOMEPAGE = "http://www.sysprof.com"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
-
-inherit gnomebase gettext systemd upstream-version-is-even
-
-DEPENDS = "glib-2.0 libxml2-native glib-2.0-native"
-
-SRC_URI += " \
-           file://define-NT_GNU_BUILD_ID.patch \
-           file://0001-configure-Add-option-to-enable-disable-polkit.patch \
-           file://0001-Disable-check-for-polkit-for-UI.patch \
-           file://0001-Avoid-building-docs.patch \
-          "
-SRC_URI[archive.md5sum] = "2b44ae1d8cd899417294a9c4509d7870"
-SRC_URI[archive.sha256sum] = "054eebe2afb6fe3c06ac8c46bc045c42f675d4fd64e6f16cbc602d5c7ce27bec"
-
-AUTOTOOLS_AUXDIR = "${S}/build-aux"
-
-EXTRA_OECONF = "--enable-compile-warnings"
-
-PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
-PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit dbus"
-
-SOLIBS = ".so"
-FILES_SOLIBSDEV = ""
-
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'sysprof2.service', '', d)}"
-
-# We do not yet work for aarch64.
-COMPATIBLE_HOST = "^(?!aarch64).*"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
new file mode 100644
index 0000000..1989b52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "System-wide Performance Profiler for Linux"
+HOMEPAGE = "http://www.sysprof.com"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gettext systemd upstream-version-is-even
+
+DEPENDS = "glib-2.0 libxml2-native glib-2.0-native"
+
+SRC_URI[archive.md5sum] = "6f9f947960ba79bb1269d8ee49b7db78"
+SRC_URI[archive.sha256sum] = "d8b9d5c2246696e4a3776a312731dc7c014fbd33478bb14d5512c6f1f35a3b11"
+SRC_URI += " \
+           file://define-NT_GNU_BUILD_ID.patch \
+           file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \
+           "
+
+PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
+PACKAGECONFIG[gtk] = "-Denable_gtk=true,-Denable_gtk=false,gtk+3"
+PACKAGECONFIG[sysprofd] = "-Dwith_sysprofd=bundled,-Dwith_sysprofd=none,polkit"
+
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service', '', d)}"
+
+# We do not yet work for aarch64.
+COMPATIBLE_HOST = "^(?!aarch64).*"
+
+FILES_${PN} += " \
+               ${datadir}/dbus-1/system-services \
+               ${datadir}/dbus-1/system.d \
+               "
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch
new file mode 100644
index 0000000..c0ceb5a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch
@@ -0,0 +1,42 @@
+From a714658727206d2a98a7194b7e6d29dbd3e27b8d Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Mon, 19 Mar 2018 16:50:05 -0500
+Subject: [PATCH] Added a couple of small sysroot fixes.
+
+* tapsets.cxx (dwarf_builder::build): Fix commit 4ffecddf5.
+  (path_remove_sysroot): Fix extra '/' present at start of paths.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ tapsets.cxx | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+Index: git/tapsets.cxx
+===================================================================
+--- git.orig/tapsets.cxx
++++ git/tapsets.cxx
+@@ -1395,7 +1395,8 @@ string path_remove_sysroot(const systemt
+   string retval = path;
+   if (!sess.sysroot.empty() &&
+       (pos = retval.find(sess.sysroot)) != string::npos)
+-    retval.replace(pos, sess.sysroot.length(), "/");
++    retval.replace(pos, sess.sysroot.length(),
++		   (sess.sysroot.back() == '/' ? "/": ""));
+   return retval;
+ }
+ 
+@@ -8412,8 +8413,11 @@ dwarf_builder::build(systemtap_session &
+ 
+       // PR13338: unquote glob results
+       module_name = unescape_glob_chars (module_name);
+-      user_path = find_executable (module_name, "", sess.sysenv); // canonicalize it
+-      if (!is_fully_resolved(user_path, sess.sysroot, sess.sysenv))
++      user_path = find_executable (module_name, sess.sysroot, sess.sysenv); // canonicalize it
++      // Note we don't need to pass the sysroot to
++      // is_fully_resolved(), since we just passed it to
++      // find_executable().
++      if (!is_fully_resolved(user_path, "", sess.sysenv))
+         throw SEMANTIC_ERROR(_F("cannot find executable '%s'",
+                                 user_path.to_string().c_str()));
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch
new file mode 100644
index 0000000..89951a2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch
@@ -0,0 +1,61 @@
+From 4ffecddf5433d65a6f01241990c9d516586b1c79 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Mon, 19 Mar 2018 08:53:51 -0500
+Subject: [PATCH] Delay adding sysroot path to module name in case of non
+ absolute executable
+
+Current stap code adds sysroot prematurely for probes that specify non
+absolute path name, i.e like "foo", so when find_executable called it
+receives full path as <sysroot>/foo and find_executable does not search
+PATH while applying sysroot.
+
+Fix delays adding sysroot till path inside of sysroot is searched first.
+
+Also fix missing sysroot addition in glob expansion case.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ tapsets.cxx | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: git/tapsets.cxx
+===================================================================
+--- git.orig/tapsets.cxx
++++ git/tapsets.cxx
+@@ -746,7 +746,7 @@ base_query::base_query(dwflpp & dw, lite
+               pid_val = 0;
+               get_string_param(params, TOK_PROCESS, module_val);
+             }
+-          module_val = find_executable (module_val, "", sess.sysenv);
++          module_val = find_executable (module_val, sess.sysroot, sess.sysenv);
+           if (!is_fully_resolved(module_val, "", sess.sysenv))
+             throw SEMANTIC_ERROR(_F("cannot find executable '%s'",
+                                     module_val.to_string().c_str()));
+@@ -8287,7 +8287,6 @@ dwarf_builder::build(systemtap_session &
+             }
+           else
+             {
+-              module_name = (string)sess.sysroot + (string)module_name;
+               filled_parameters[TOK_PROCESS] = new literal_string(module_name);
+             }
+         }
+@@ -8321,7 +8320,8 @@ dwarf_builder::build(systemtap_session &
+           assert (lit);
+ 
+           // Evaluate glob here, and call derive_probes recursively with each match.
+-          const auto& globs = glob_executable (module_name);
++          const auto& globs = glob_executable (sess.sysroot
++					       + string(module_name));
+           unsigned results_pre = finished_results.size();
+           for (auto it = globs.begin(); it != globs.end(); ++it)
+             {
+@@ -8413,7 +8413,7 @@ dwarf_builder::build(systemtap_session &
+       // PR13338: unquote glob results
+       module_name = unescape_glob_chars (module_name);
+       user_path = find_executable (module_name, "", sess.sysenv); // canonicalize it
+-      if (!is_fully_resolved(user_path, "", sess.sysenv))
++      if (!is_fully_resolved(user_path, sess.sysroot, sess.sysenv))
+         throw SEMANTIC_ERROR(_F("cannot find executable '%s'",
+                                 user_path.to_string().c_str()));
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch
new file mode 100644
index 0000000..460c3b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch
@@ -0,0 +1,277 @@
+From fbb26e17a4c026f05a497fc5d584516bad3b6950 Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Wed, 6 Dec 2017 14:37:42 -0600
+Subject: [PATCH] Fix PR22551 by updating the use of timers for the 4.15
+ kernel.
+
+* runtime/linux/timer_compatibility.h: New file.
+* runtime/time.c: Update timer callback function parameter type. Update
+  timer initialization.
+* runtime/transport/relay_v2.c: Ditto.
+* runtime/transport/transport.c: Ditto.
+* tapset-timers.cxx (timer_derived_probe_group::emit_module_decls):
+  Ditto. Handle old and new timer callback interface.
+* runtime/linux/runtime.h: Include timer_compatibility.h instead of timer.h.
+* tapset/linux/scsi.stp: Ditto.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+
+---
+ runtime/linux/runtime.h             |  2 +-
+ runtime/linux/timer_compatibility.h | 76 +++++++++++++++++++++++++++++++++++++
+ runtime/time.c                      |  7 ++--
+ runtime/transport/relay_v2.c        |  8 ++--
+ runtime/transport/transport.c       | 13 +++----
+ tapset-timers.cxx                   | 14 +++++--
+ tapset/linux/scsi.stp               |  2 +-
+ 7 files changed, 100 insertions(+), 22 deletions(-)
+ create mode 100644 runtime/linux/timer_compatibility.h
+
+diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h
+index 9c585a2..df9b74c 100644
+--- a/runtime/linux/runtime.h
++++ b/runtime/linux/runtime.h
+@@ -34,7 +34,7 @@
+ #include <linux/compat.h>
+ #include <linux/sched.h>
+ #include <linux/mm.h>
+-#include <linux/timer.h>
++#include "timer_compatibility.h"
+ #include <linux/delay.h>
+ #include <linux/profile.h>
+ #include <linux/rcupdate.h>
+diff --git a/runtime/linux/timer_compatibility.h b/runtime/linux/timer_compatibility.h
+new file mode 100644
+index 0000000..ac03de9
+--- /dev/null
++++ b/runtime/linux/timer_compatibility.h
+@@ -0,0 +1,76 @@
++/*
++ * linux/timer.h compatibility defines and inlines
++ * Copyright (C) 2017 Red Hat Inc.
++ *
++ * This file is part of systemtap, and is free software.  You can
++ * redistribute it and/or modify it under the terms of the GNU General
++ * Public License (GPL); either version 2, or (at your option) any
++ * later version.
++ */
++
++#ifndef _TIMER_COMPATIBILITY_H_
++#define _TIMER_COMPATIBILITY_H_
++
++#include <linux/timer.h>
++
++/*
++ * Starting with the 4.15 kernel, the timer interface
++ * changed. Originally, you'd do something like:
++ *
++ *   static void timer_func(unsigned long val);
++ *
++ *   init_timer(&timer);
++ *   timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
++ *   timer.function = timer_func;
++ *   timer.data = 0;
++ *   add_timer(&timer);
++ *
++ * The 'data' parameter would get passed to the callback
++ * function. Starting with 4.15, you'd do something like this:
++ *
++ *   static void timer_func(struct timer_list *val);
++ *
++ *   timer_setup(&timer, timer_func, 0);
++ *   timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
++ *   add_timer(&timer);
++ *   
++ * With the new code, the timer that caused the callback gets passed
++ * to the timer callback function. The 'data' field has been removed.
++ *
++ * So, we're going to use the new interface. To hide the differences
++ * between the callback function parameter type, we'll define a new
++ * type, 'stp_timer_callback_parameter_t'.
++ *
++ * If code needs to figure out the difference between the old and new
++ * interface, it should test the TIMER_TRACE_FLAGMASK define (which
++ * only exists in the new interface).
++ */
++
++#if defined(TIMER_TRACE_FLAGMASK) 
++/* This is the >= 4.15 kernel interface. */
++
++typedef struct timer_list * stp_timer_callback_parameter_t;
++
++#else
++/* This is the < 4.15 kernel interface. */
++
++typedef unsigned long stp_timer_callback_parameter_t;
++
++/**
++ * timer_setup - prepare a timer for first use
++ * @timer: the timer in question
++ * @callback: the function to call when timer expires
++ * @flags: any TIMER_* flags (note that anything other than 0 is an
++ * 	   error, since this compatibility function can't support any
++ *	   of the TIMER_* flags)
++ */
++#define timer_setup(timer, callback, flags)			\
++	{							\
++		init_timer((timer));				\
++		(timer)->function = callback;			\
++		(timer)->data = 0;				\
++		BUILD_BUG_ON_ZERO((flags) != 0);		\
++	}
++#endif
++
++#endif /* _TIMER_COMPATIBILITY_H_ */
+diff --git a/runtime/time.c b/runtime/time.c
+index 2e666d5..91ceafa 100644
+--- a/runtime/time.c
++++ b/runtime/time.c
+@@ -168,10 +168,10 @@ __stp_time_smp_callback(void *val)
+ 
+ /* The timer callback is in a softIRQ -- interrupts enabled. */
+ static void
+-__stp_time_timer_callback(unsigned long val)
++__stp_time_timer_callback(stp_timer_callback_parameter_t unused)
+ {
+     stp_time_t *time =__stp_time_local_update();
+-    (void) val;
++    (void) unused;
+ 
+     /* PR6481: make sure IRQs are enabled before resetting the timer
+        (IRQs are disabled and then reenabled in
+@@ -200,9 +200,8 @@ __stp_init_time(void *info)
+     time->freq = __stp_get_freq();
+     __stp_time_local_update();
+ 
+-    init_timer(&time->timer);
++    timer_setup(&time->timer, __stp_time_timer_callback, 0);
+     time->timer.expires = jiffies + STP_TIME_SYNC_INTERVAL;
+-    time->timer.function = __stp_time_timer_callback;
+ 
+ #ifndef STAPCONF_ADD_TIMER_ON
+     add_timer(&time->timer);
+diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c
+index f81d75d..135951a 100644
+--- a/runtime/transport/relay_v2.c
++++ b/runtime/transport/relay_v2.c
+@@ -30,7 +30,7 @@
+ #include <linux/debugfs.h>
+ #include <linux/mm.h>
+ #include <linux/relay.h>
+-#include <linux/timer.h>
++#include "../linux/timer_compatibility.h"
+ #include "../uidgid_compatibility.h"
+ #include "relay_compat.h"
+ 
+@@ -120,7 +120,7 @@ static void __stp_relay_wakeup_readers(struct rchan_buf *buf)
+ 		wake_up_interruptible(&buf->read_wait);
+ }
+ 
+-static void __stp_relay_wakeup_timer(unsigned long val)
++static void __stp_relay_wakeup_timer(stp_timer_callback_parameter_t unused)
+ {
+ #ifdef STP_BULKMODE
+ 	int i;
+@@ -151,10 +151,8 @@ static void __stp_relay_wakeup_timer(unsigned long val)
+ static void __stp_relay_timer_init(void)
+ {
+ 	atomic_set(&_stp_relay_data.wakeup, 0);
+-	init_timer(&_stp_relay_data.timer);
++	timer_setup(&_stp_relay_data.timer, __stp_relay_wakeup_timer, 0);
+ 	_stp_relay_data.timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
+-	_stp_relay_data.timer.function = __stp_relay_wakeup_timer;
+-	_stp_relay_data.timer.data = 0;
+ 	add_timer(&_stp_relay_data.timer);
+ 	smp_mb();
+ }
+diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
+index 3400f22..320fd18 100644
+--- a/runtime/transport/transport.c
++++ b/runtime/transport/transport.c
+@@ -311,7 +311,7 @@ static void _stp_detach(void)
+ }
+ 
+ 
+-static void _stp_ctl_work_callback(unsigned long val);
++static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused);
+ 
+ /*
+  * Called when stapio opens the control channel.
+@@ -320,13 +320,12 @@ static void _stp_attach(void)
+ {
+ 	dbug_trans(1, "attach\n");
+ 	_stp_pid = current->pid;
+-  if (_stp_namespaces_pid < 1)
+-    _stp_namespaces_pid = _stp_pid;
++	if (_stp_namespaces_pid < 1)
++		_stp_namespaces_pid = _stp_pid;
+ 	_stp_transport_data_fs_overwrite(0);
+-	init_timer(&_stp_ctl_work_timer);
++
++	timer_setup(&_stp_ctl_work_timer, _stp_ctl_work_callback, 0);
+ 	_stp_ctl_work_timer.expires = jiffies + STP_CTL_TIMER_INTERVAL;
+-	_stp_ctl_work_timer.function = _stp_ctl_work_callback;
+-	_stp_ctl_work_timer.data= 0;
+ 	add_timer(&_stp_ctl_work_timer);
+ }
+ 
+@@ -341,7 +340,7 @@ static void _stp_attach(void)
+  *	notified. Reschedules itself if someone is still attached
+  *	to the cmd channel.
+  */
+-static void _stp_ctl_work_callback(unsigned long val)
++static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused)
+ {
+ 	int do_io = 0;
+ 	unsigned long flags;
+diff --git a/tapset-timers.cxx b/tapset-timers.cxx
+index 1a40bcd..0ab4d69 100644
+--- a/tapset-timers.cxx
++++ b/tapset-timers.cxx
+@@ -122,9 +122,13 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s)
+   s.op->newline(-1) << "};";
+   s.op->newline();
+ 
+-  s.op->newline() << "static void enter_timer_probe (unsigned long val) {";
++  s.op->newline() << "static void enter_timer_probe (stp_timer_callback_parameter_t val) {";
++  s.op->newline() << "#if defined(TIMER_TRACE_FLAGMASK)";
++  s.op->newline(1) << "struct stap_timer_probe* stp = container_of(val, struct stap_timer_probe, timer_list);";
++  s.op->newline(-1) << "#else";
+   s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [val];";
+-  s.op->newline() << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
++  s.op->newline(-1) << "#endif";
++  s.op->newline(1) << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
+   s.op->newline() << "    (atomic_read (session_state()) == STAP_SESSION_RUNNING))";
+   s.op->newline(1) << "mod_timer (& stp->timer_list, jiffies + ";
+   emit_interval (s.op);
+@@ -148,9 +152,11 @@ timer_derived_probe_group::emit_module_init (systemtap_session& s)
+   s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
+   s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [i];";
+   s.op->newline() << "probe_point = stp->probe->pp;";
+-  s.op->newline() << "init_timer (& stp->timer_list);";
+-  s.op->newline() << "stp->timer_list.function = & enter_timer_probe;";
++
++  s.op->newline() << "timer_setup (& stp->timer_list, enter_timer_probe, 0);";
++  s.op->newline() << "#if !defined(TIMER_TRACE_FLAGMASK)";
+   s.op->newline() << "stp->timer_list.data = i;"; // NB: important!
++  s.op->newline() << "#endif";
+   // copy timer renew calculations from above :-(
+   s.op->newline() << "stp->timer_list.expires = jiffies + ";
+   emit_interval (s.op);
+diff --git a/tapset/linux/scsi.stp b/tapset/linux/scsi.stp
+index 44f686c..3577942 100644
+--- a/tapset/linux/scsi.stp
++++ b/tapset/linux/scsi.stp
+@@ -14,7 +14,7 @@
+ #include <scsi/scsi_cmnd.h>
+ #include <scsi/scsi_device.h>
+ #include <scsi/scsi_host.h>
+-#include <linux/timer.h>
++#include "linux/timer_compatibility.h"
+ #include <linux/blkdev.h>
+ %}
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch
new file mode 100644
index 0000000..a1b0bff
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Fixes-for-gcc-8.patch
@@ -0,0 +1,215 @@
+From 4ffe00f1d9eac332d928f7dc01fe250dc32b1bb8 Mon Sep 17 00:00:00 2001
+From: Stan Cox <scox@redhat.com>
+Date: Tue, 13 Feb 2018 22:38:03 -0500
+Subject: [PATCH] Fixes for gcc 8
+
+* includes/sys/sdt.h (__SDT_COND_SIGNED):  Add CT, cast type argument
+
+Author: Will Cohen <wcohen.redhat.com>
+
+* stap-serverd.cxx (generate_mok, handleRequest, handle_connection):
+  Catch format overflow
+
+* translate.cxx (translate_pass): Use ref in catch.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ includes/sys/sdt.h | 20 ++++++++--------
+ stap-serverd.cxx   | 67 +++++++++++++++++++++++++++++++++++++++++++++++-------
+ translate.cxx      |  2 +-
+ 3 files changed, 70 insertions(+), 19 deletions(-)
+
+diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
+index 940f74483..c0c5a492c 100644
+--- a/includes/sys/sdt.h
++++ b/includes/sys/sdt.h
+@@ -119,8 +119,8 @@ struct __sdt_type
+   
+ #define __SDT_ALWAYS_SIGNED(T) \
+ template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
+-#define __SDT_COND_SIGNED(T) \
+-template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 1); };
++#define __SDT_COND_SIGNED(T,CT)						\
++template<> struct __sdt_type<T> { static const bool __sdt_signed = ((CT)(-1) < 1); };
+ __SDT_ALWAYS_SIGNED(signed char)
+ __SDT_ALWAYS_SIGNED(short)
+ __SDT_ALWAYS_SIGNED(int)
+@@ -141,14 +141,14 @@ __SDT_ALWAYS_SIGNED(const volatile short)
+ __SDT_ALWAYS_SIGNED(const volatile int)
+ __SDT_ALWAYS_SIGNED(const volatile long)
+ __SDT_ALWAYS_SIGNED(const volatile long long)
+-__SDT_COND_SIGNED(char)
+-__SDT_COND_SIGNED(wchar_t)
+-__SDT_COND_SIGNED(volatile char)
+-__SDT_COND_SIGNED(volatile wchar_t)
+-__SDT_COND_SIGNED(const char)
+-__SDT_COND_SIGNED(const wchar_t)
+-__SDT_COND_SIGNED(const volatile char)
+-__SDT_COND_SIGNED(const volatile wchar_t)
++__SDT_COND_SIGNED(char, char)
++__SDT_COND_SIGNED(wchar_t, wchar_t)
++__SDT_COND_SIGNED(volatile char, char)
++__SDT_COND_SIGNED(volatile wchar_t, wchar_t)
++__SDT_COND_SIGNED(const char, char)
++__SDT_COND_SIGNED(const wchar_t, wchar_t)
++__SDT_COND_SIGNED(const volatile char, char)
++__SDT_COND_SIGNED(const volatile wchar_t, wchar_t)
+ #if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ /* __SDT_COND_SIGNED(char16_t) */
+ /* __SDT_COND_SIGNED(char32_t) */
+diff --git a/stap-serverd.cxx b/stap-serverd.cxx
+index 7cf76c617..41f77ee9e 100644
+--- a/stap-serverd.cxx
++++ b/stap-serverd.cxx
+@@ -1607,6 +1607,7 @@ generate_mok(string &mok_fingerprint)
+   char tmpdir[PATH_MAX] = { '\0' };
+   string public_cert_path, private_cert_path, destdir;
+   mode_t old_umask;
++  int retlen;
+ 
+   mok_fingerprint.clear ();
+ 
+@@ -1631,7 +1632,14 @@ generate_mok(string &mok_fingerprint)
+     }
+ 
+   // Make a temporary directory to store results in.
+-  snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ());
++  retlen = snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ());
++  if (retlen < 0 || retlen >= PATH_MAX)
++    {
++      server_error (_F("Could not create %s name", "temporary directory"));
++      tmpdir[0] = '\0';
++      goto cleanup;
++    }
++
+   if (mkdtemp (tmpdir) == NULL)
+     {
+       server_error (_F("Could not create temporary directory %s: %s", tmpdir, 
+@@ -1704,6 +1712,7 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
+   unsigned u;
+   unsigned i;
+   FILE* f;
++  int retlen;
+ 
+   // Save the server version. Do this early, so the client knows what version of the server
+   // it is dealing with, even if the request is not fully completed.
+@@ -1782,7 +1791,12 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
+       struct stat st;
+       char *arg;
+ 
+-      snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i);
++      retlen = snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i);
++      if (retlen < 0 || retlen >= PATH_MAX)
++        {
++          server_error (_F("Error creating %s name", "path"));
++          return;
++        }
+ 
+       rc = stat(stapargfile, & st);
+       if (rc) break;
+@@ -1888,7 +1902,15 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
+     {
+       glob_t globber;
+       char pattern[PATH_MAX];
+-      snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str());
++      int retlen;
++
++      retlen = snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str());
++      if (retlen < 0 || retlen >= PATH_MAX)
++        {
++          server_error (_F("Error creating %s name", "pattern"));
++          return;
++        }
++
+       rc = glob (pattern, GLOB_ERR, NULL, &globber);
+       if (rc)
+         server_error (_F("Unable to find a module in %s", new_staptmpdir.c_str()));
+@@ -2164,6 +2186,7 @@ handle_connection (void *arg)
+                         copy for each connection.*/
+   vector<string>     argv;
+   PRInt32            bytesRead;
++  int		     retlen;
+ 
+   /* Detatch to avoid a memory leak */
+   if(max_threads > 0)
+@@ -2213,7 +2236,13 @@ handle_connection (void *arg)
+ #endif
+ 
+   secStatus = SECFailure;
+-  snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp");
++  retlen = snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp");
++  if (retlen < 0 || retlen >= PATH_MAX)
++    {
++      server_error (_F("Error creating %s name", "temporary directory"));
++      tmpdir[0]=0; /* prevent /bin/rm */
++      goto cleanup;
++    }
+   rc1 = mkdtemp(tmpdir);
+   if (! rc1)
+     {
+@@ -2223,9 +2252,20 @@ handle_connection (void *arg)
+     }
+ 
+   /* Create a temporary files names and directories.  */
+-  snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir);
++  retlen = snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir);
++  if (retlen < 0 || retlen >= PATH_MAX)
++    {
++      server_error (_F("Error creating %s name", "request.zip path"));
++      goto cleanup;
++    }
++
++  retlen = snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir);
++  if (retlen < 0 || retlen >= PATH_MAX)
++    {
++      server_error (_F("Error creating %s name", "request directory path"));
++      goto cleanup;
++    }
+ 
+-  snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir);
+   rc = mkdir(requestDirName, 0700);
+   if (rc)
+     {
+@@ -2233,7 +2273,13 @@ handle_connection (void *arg)
+       goto cleanup;
+     }
+ 
+-  snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir);
++  retlen = snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir);
++  if (retlen < 0 || retlen >= PATH_MAX)
++    {
++      server_error (_F("Error creating %s name", "response directory path"));
++      goto cleanup;
++    }
++
+   rc = mkdir(responseDirName, 0700);
+   if (rc)
+     {
+@@ -2243,7 +2289,12 @@ handle_connection (void *arg)
+   // Set this early, since it gets used for errors to be returned to the client.
+   stapstderr = string(responseDirName) + "/stderr";
+ 
+-  snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir);
++  retlen = snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir);
++  if (retlen < 0 || retlen >= PATH_MAX)
++    {
++      server_error (_F("Error creating %s name", "response.zip path"));
++      goto cleanup;
++    }
+ 
+   /* Read data from the socket.
+    * If the user is requesting/requiring authentication, authenticate
+diff --git a/translate.cxx b/translate.cxx
+index 1240a80ec..4ade06fdd 100644
+--- a/translate.cxx
++++ b/translate.cxx
+@@ -7860,7 +7860,7 @@ translate_pass (systemtap_session& s)
+ 	  if (versions.size() >= 3 && s.verbose > 1)
+ 	    clog << _F("ignoring extra parts of compat version: %s", s.compatible.c_str()) << endl;
+ 	}
+-      catch (const runtime_error)
++      catch (const runtime_error&)
+ 	{
+ 	  throw SEMANTIC_ERROR(_F("parse error in compatibility version: %s", s.compatible.c_str()));
+ 	}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch
new file mode 100644
index 0000000..7cd9030
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch
@@ -0,0 +1,128 @@
+From 41efad04730be89889d1483719f9a6c9396dc250 Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Wed, 14 Mar 2018 17:05:25 -0500
+Subject: [PATCH] Make sure sysroot paths don't end with a slash.
+
+* session.cxx (parse_cmdline): Make sure a sysroot path does not end with
+  a '/', since we build paths like: sysroot + "/lib/modules". If the
+  sysroot path ends with a '/', we end up with paths like
+  '/SYSROOT//lib/modules'.
+  (setup_kernel_release): Take a string parameter, not a character pointer.
+* session.h: Update setup_kernel_release() prototype.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ session.cxx | 34 ++++++++++++++++++++++++++--------
+ session.h   |  2 +-
+ 2 files changed, 27 insertions(+), 9 deletions(-)
+
+Index: git/session.cxx
+===================================================================
+--- git.orig/session.cxx
++++ git/session.cxx
+@@ -722,6 +722,9 @@ systemtap_session::parse_cmdline (int ar
+   client_options_disallowed_for_unprivileged = "";
+   std::set<std::string> additional_unwindsym_modules;
+   struct rlimit our_rlimit;
++  bool sysroot_option_seen = false;
++  string kernel_release_value;
++
+   while (true)
+     {
+       char * num_endptr;
+@@ -887,7 +890,7 @@ systemtap_session::parse_cmdline (int ar
+ 	    // Note that '-' must come last in a regex bracket expression.
+             assert_regexp_match("-r parameter from client", optarg, "^[a-z0-9_.+-]+$");
+ 	  server_args.push_back (string ("-") + (char)grc + optarg);
+-          setup_kernel_release(optarg);
++	  kernel_release_value = optarg;
+           break;
+ 
+         case 'a':
+@@ -1473,7 +1476,7 @@ systemtap_session::parse_cmdline (int ar
+ 	  if (client_options) {
+ 	      cerr << _F("ERROR: %s invalid with %s", "--sysroot", "--client-options") << endl;
+ 	      return 1;
+-	  } else if (!sysroot.empty()) {
++	  } else if (sysroot_option_seen) {
+ 	      cerr << "ERROR: multiple --sysroot options not supported" << endl;
+ 	      return 1;
+ 	  } else {
+@@ -1487,11 +1490,17 @@ systemtap_session::parse_cmdline (int ar
+ 
+ 	      sysroot = string(spath);
+ 	      free (spath);
+-	      if (sysroot[sysroot.size() - 1] != '/')
+-		  sysroot.append("/");
+ 
+-	      break;
++	      // We do path creation like this:
++	      //   sysroot + "/lib/modules"
++	      // So, we don't want the sysroot path to end with a '/',
++	      // otherwise we'll end up with '/foo//lib/modules'.
++	      if (sysroot.back() == '/') {
++		  sysroot.pop_back();
++	      }
+ 	  }
++	  sysroot_option_seen = true;
++	  break;
+ 
+ 	case LONG_OPT_SYSENV:
+ 	  if (client_options) {
+@@ -1501,7 +1510,7 @@ systemtap_session::parse_cmdline (int ar
+ 	      string sysenv_str = optarg;
+ 	      string value;
+ 	      size_t pos;
+-	      if (sysroot.empty()) {
++	      if (! sysroot_option_seen) {
+ 		  cerr << "ERROR: --sysenv must follow --sysroot" << endl;
+ 		  return 1;
+ 	      }
+@@ -1646,6 +1655,15 @@ systemtap_session::parse_cmdline (int ar
+ 	}
+     }
+ 
++  if (! kernel_release_value.empty())
++  {
++      setup_kernel_release(kernel_release_value);
++  }
++  else if (! sysroot.empty())
++  {
++      kernel_build_tree = sysroot + "/lib/modules/" + kernel_release  + "/build";
++  }
++
+   return 0;
+ }
+ 
+@@ -2152,7 +2170,7 @@ void systemtap_session::insert_loaded_mo
+ }
+ 
+ void
+-systemtap_session::setup_kernel_release (const char* kstr) 
++systemtap_session::setup_kernel_release (const string& kstr) 
+ {
+   // Sometimes we may get dupes here... e.g. a server may have a full
+   // -r /path/to/kernel followed by a client's -r kernel.
+@@ -2183,7 +2201,7 @@ systemtap_session::setup_kernel_release
+   else
+     {
+       update_release_sysroot = true;
+-      kernel_release = string (kstr);
++      kernel_release = kstr;
+       if (!kernel_release.empty())
+         kernel_build_tree = "/lib/modules/" + kernel_release + "/build";
+ 
+Index: git/session.h
+===================================================================
+--- git.orig/session.h
++++ git/session.h
+@@ -144,7 +144,7 @@ public:
+ 
+   // NB: It is very important for all of the above (and below) fields
+   // to be cleared in the systemtap_session ctor (session.cxx).
+-  void setup_kernel_release (const char* kstr);
++  void setup_kernel_release (const std::string& kstr);
+   void insert_loaded_modules ();
+ 
+   // command line parsing
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch
new file mode 100644
index 0000000..b2820b3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-Use-sysroot-when-looking-for-the-System.map-file.patch
@@ -0,0 +1,29 @@
+From 436063d5e4738a9b03535d330a2242be5118e745 Mon Sep 17 00:00:00 2001
+From: David Smith <dsmith@redhat.com>
+Date: Thu, 8 Mar 2018 16:01:58 -0600
+Subject: [PATCH] Use sysroot when looking for the System.map file.
+
+Add sysroot to system_map_path + "/boot/System.map" case. Otherwise
+stap tries to look symbols on host system and it produce error like this:
+
+> Kernel symbol table /boot/System.map-4.9.78-yocto-standard unavailable, (No such file or directory)
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ session.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/session.cxx
+===================================================================
+--- git.orig/session.cxx
++++ git/session.cxx
+@@ -2013,7 +2013,7 @@ systemtap_session::parse_kernel_function
+ 	clog << _F("Kernel symbol table %s unavailable, (%s)",
+ 		   system_map_path.c_str(), strerror(errno)) << endl;
+ 
+-      system_map_path = "/boot/System.map-" + kernel_release;
++      system_map_path = sysroot + "/boot/System.map-" + kernel_release;
+       system_map.clear();
+       system_map.open(system_map_path.c_str(), ifstream::in);
+       if (! system_map.is_open())
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch
new file mode 100644
index 0000000..98181a1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch
@@ -0,0 +1,39 @@
+From 183c7a7a8167333c873525f7908913837b8dc3cb Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Tue, 20 Mar 2018 12:41:05 -0500
+Subject: [PATCH] _stp_umodule_relocate needs target file path, not host file
+ path
+
+Strip of sysroot from module name is required when _stp_umodule_relocate
+call is generated. Otherwise path won't match path on target and could
+will fail to calculated address within the file.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ loc2stap.cxx | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/loc2stap.cxx b/loc2stap.cxx
+index 4818ee0..e09954f 100644
+--- a/loc2stap.cxx
++++ b/loc2stap.cxx
+@@ -17,6 +17,7 @@
+ 
+ #include "loc2stap.h"
+ #include "dwflpp.h"
++#include "tapsets.h"
+ 
+ #if ! _ELFUTILS_PREREQ(0, 153)
+ #define DW_OP_GNU_entry_value 0xf3
+@@ -106,7 +107,9 @@ location_context::translate_address(Dwarf_Addr addr)
+           c = "/* pragma:vma */ "
+               "({ unsigned long addr = 0; "
+               "addr = _stp_umodule_relocate (\""
+-              + resolve_path(dw->module_name.c_str()) + "\", "
++              + path_remove_sysroot(dw->sess,
++				    resolve_path(dw->module_name.c_str()))
++	      + "\", "
+               + lex_cast_hex (addr)
+ 	      + ", current); addr; })";
+ 	}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch
new file mode 100644
index 0000000..160642d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch
@@ -0,0 +1,42 @@
+From b29e448e12040ed8f4d83743a14db0f138a7cc67 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Wed, 14 Mar 2018 16:54:08 -0500
+Subject: [PATCH] debuginfo lookup with sysroot case do not remove sysroot from
+ file_name
+
+If sysroot option is passed, and debug symbols reside in sysroot along
+with executable <foo> in <foo_dir>/.debug/<foo_file> directory,
+stap fails to find debuginfo because it strips out sysroot path
+from file_name so dwfl_standard_find_debuginfo ends up looking at
+host <foo_dir>/.debug/<foo_file> rather then checking
+<sysroot>/<foo_dir>/.debug/<foo_file>.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ setupdwfl.cxx | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/setupdwfl.cxx b/setupdwfl.cxx
+index 11e0bb2..2a87982 100644
+--- a/setupdwfl.cxx
++++ b/setupdwfl.cxx
+@@ -627,18 +627,6 @@ internal_find_debuginfo (Dwfl_Module *mod,
+ 
+   call_dwfl_standard_find_debuginfo:
+ 
+-  if (current_session_for_find_debuginfo)
+-    {
+-      string sysroot = current_session_for_find_debuginfo->sysroot + "/*";
+-      int    found   = fnmatch(sysroot.c_str(), file_name, 0);
+-
+-      if (found)
+-	{
+-	  file_name = file_name
+-	    + current_session_for_find_debuginfo->sysroot.length() - 1;
+-	}
+-    }
+-
+   /* Call the original dwfl_standard_find_debuginfo */
+   return dwfl_standard_find_debuginfo(mod, userdata, modname, base,
+               file_name, debuglink_file,
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch
new file mode 100644
index 0000000..6fe7d4d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch
@@ -0,0 +1,40 @@
+From 7e11f129ff370ce5f39812ce2ae6ce40818a347f Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Thu, 22 Mar 2018 16:02:02 -0500
+Subject: [PATCH] sysroot: fix short release -r option handling follow up
+
+In case of sysroot set and short release -r option it does not make sense
+to pass short release name into dwfl_linux_kernel_report_offline
+function. This function is not aware about sysroot and it won't look for
+kernel modules under sysroot directory.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ setupdwfl.cxx | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/setupdwfl.cxx b/setupdwfl.cxx
+index c419afa..0cf5810 100644
+--- a/setupdwfl.cxx
++++ b/setupdwfl.cxx
+@@ -367,7 +367,15 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s)
+   // hard-code this magic here.
+   string lib_path = s.sysroot + "/lib/modules/" + s.kernel_release + "/build";
+   if (s.kernel_build_tree == lib_path)
+-    elfutils_kernel_path = s.kernel_release;
++    {
++      if (s.sysroot != "")
++        // If we have sysroot set does not make sense to pass
++        // short release to dwfl, it won't take a sysroot into
++        // account. Let's construct full path in such case.
++	elfutils_kernel_path = string(s.sysroot + "/lib/modules/" + s.kernel_release);
++      else
++	elfutils_kernel_path = s.kernel_release;
++    }
+   else
+     elfutils_kernel_path = s.kernel_build_tree;
+   offline_modules_found = 0;
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch
new file mode 100644
index 0000000..b31d627
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling.patch
@@ -0,0 +1,53 @@
+From a9ce89bcd2d78728faef59bda60e75510972cd56 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Wed, 14 Mar 2018 17:09:44 -0500
+Subject: [PATCH] sysroot: fix short release -r option handling
+
+* setupdwfl.cxx (debuginfo_path_insert_sysroot): Add a '/' to the end of
+  the sysroot for path_insert_sysroot().
+  (setup_dwfl_kernel): Simplify logic when finding the kernel path to send
+  to elfutils.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ setupdwfl.cxx | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/setupdwfl.cxx b/setupdwfl.cxx
+index 2a87982..f6c3157 100644
+--- a/setupdwfl.cxx
++++ b/setupdwfl.cxx
+@@ -339,6 +339,13 @@ static char * path_insert_sysroot(string sysroot, string path)
+ 
+ void debuginfo_path_insert_sysroot(string sysroot)
+ {
++  // FIXME: This is a short-term fix, until we expect sysroot paths to
++  // always end with a '/' (and never be empty).
++  //
++  // The path_insert_sysroot() function assumes that sysroot has a '/'
++  // on the end. Make sure that is true.
++  if (sysroot.back() != '/')
++    sysroot.push_back('/');
+   debuginfo_path = path_insert_sysroot(sysroot, debuginfo_path);
+   debuginfo_usr_path = path_insert_sysroot(sysroot, debuginfo_usr_path);
+ }
+@@ -358,13 +365,11 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s)
+   // no way to set the dwfl_callback.debuginfo_path and always
+   // passs the plain kernel_release here.  So instead we have to
+   // hard-code this magic here.
+-   string lib_path = "/lib/modules/" + s.kernel_release + "/build";
+-   if (s.kernel_build_tree == string(s.sysroot + lib_path) ||
+-       (s.kernel_build_tree == lib_path
+-	&& s.sysroot == "/"))
+-      elfutils_kernel_path = s.kernel_release;
+-   else
+-      elfutils_kernel_path = s.kernel_build_tree;
++  string lib_path = s.sysroot + "/lib/modules/" + s.kernel_release + "/build";
++  if (s.kernel_build_tree == lib_path)
++    elfutils_kernel_path = s.kernel_release;
++  else
++    elfutils_kernel_path = s.kernel_build_tree;
+   offline_modules_found = 0;
+ 
+   // First try to report full path modules.
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch
new file mode 100644
index 0000000..8a3d39a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch
@@ -0,0 +1,117 @@
+From 2041085d1a700201dc088991ca8136e7935bf42f Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Wed, 21 Mar 2018 11:35:26 -0500
+Subject: [PATCH] sysroot: handle symbolic links with absolute name relative to
+ sysroot
+
+In case of symbolic link found under sysroot point to absolute path,
+instead of trying to look for such absolute path in host system,
+apply sysroot prefix first.
+
+Upstream-Status: Backport
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+---
+ util.cxx | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 76 insertions(+)
+
+Index: git/util.cxx
+===================================================================
+--- git.orig/util.cxx
++++ git/util.cxx
+@@ -441,6 +441,64 @@ split_lines(const char *buf, size_t n)
+   return lines;
+ }
+ 
++static string
++follow_link(const string& name, const string& sysroot)
++{
++  char *linkname;
++  ssize_t r;
++  string retpath;
++  struct stat st;
++
++  const char *f = name.c_str();
++
++  lstat(f, &st);
++
++  linkname = (char *) malloc(st.st_size + 1);
++
++  if (linkname)
++    {
++      r = readlink(f, linkname, st.st_size + 1);
++      linkname[st.st_size] = '\0';
++      /*
++       * If we have non-empty sysroot and we got link that
++       * points to absolute path name, we need to look at
++       * this path relative to sysroot itself. access and
++       * stat will follow symbolic links correctly only in
++       * case with empty sysroot.
++       */
++      while (r != -1 && linkname && linkname[0] == '/')
++	{
++	  string fname1 = sysroot + linkname;
++	  const char *f1 = fname1.c_str();
++	  if (access(f1, X_OK) == 0
++	      && stat(f1, &st) == 0
++	      && S_ISREG(st.st_mode))
++	    {
++	      retpath = fname1;
++	      break;
++	    }
++	  else if (lstat(f1, &st) == 0
++		   && S_ISLNK(st.st_mode))
++	    {
++	      free(linkname);
++	      linkname = (char *) malloc(st.st_size + 1);
++	      if (linkname)
++		{
++		  r = readlink(f1, linkname, st.st_size + 1);
++		  linkname[st.st_size] = '\0';
++		}
++	    }
++	  else
++	    {
++	      break;
++	    }
++	}
++    }
++  free(linkname);
++
++  return retpath;
++}
++
+ // Resolve an executable name to a canonical full path name, with the
+ // same policy as execvp().  A program name not containing a slash
+ // will be searched along the $PATH.
+@@ -465,6 +523,14 @@ string find_executable(const string& nam
+   if (name.find('/') != string::npos) // slash in the path already?
+     {
+       retpath = sysroot + name;
++
++      const char *f = retpath.c_str();
++      if (sysroot != ""
++	  && lstat(f, &st) == 0
++	  && S_ISLNK(st.st_mode))
++	{
++	  retpath = follow_link(f, sysroot);
++	}
+     }
+   else // Nope, search $PATH.
+     {
+@@ -493,6 +559,16 @@ string find_executable(const string& nam
+                   retpath = fname;
+                   break;
+                 }
++              else if (sysroot != ""
++                       && lstat(f, &st) == 0
++                       && S_ISLNK(st.st_mode))
++		{
++		  retpath = follow_link(f, sysroot);
++		  if (retpath != "")
++		    {
++		      break;
++		    }
++		}
+             }
+         }
+     }
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
deleted file mode 100644
index 013af5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-systemtap: Cross compilation fix
-
-This is a cross compilation fix. It allows systemtap to find
-the kernel map file in the right place, i.e. in the kernel build tree.
-Without this fix it takes a map file from the build host, if available.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
-
-Index: git/session.cxx
-===================================================================
---- git.orig/session.cxx
-+++ git/session.cxx
-@@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function
- 	clog << _F("Kernel symbol table %s unavailable, (%s)",
- 		   system_map_path.c_str(), strerror(errno)) << endl;
- 
--      system_map_path = "/boot/System.map-" + kernel_release;
-+      system_map_path = kernel_build_tree + "/System.map-" + kernel_release;
-       system_map.clear();
-       system_map.open(system_map_path.c_str(), ifstream::in);
-       if (! system_map.is_open())
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
index 475b207..b280f58 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -3,9 +3,7 @@
 
 require systemtap_git.inc
 
-DEPENDS = "boost elfutils"
-
-RDEPENDS_${PN} += "python3-core bash perl"
+DEPENDS = "elfutils"
 
 EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
             --without-nss --without-avahi --without-dyninst \
@@ -18,7 +16,8 @@
 
 EXTRA_OECONF += "${STAP_DOCS} "
 
-PACKAGECONFIG ??= "sqlite monitor python3-probes"
+PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
+PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,python3-core bash perl"
 PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
 PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
 PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
@@ -26,4 +25,12 @@
 
 inherit autotools gettext pkgconfig distutils3-base
 
+do_install_append () {
+   if [ ! -f ${D}${bindir}/stap ]; then
+      # translator disabled case, need to leave only minimal runtime
+      rm -rf ${D}${datadir}/${PN}
+      rm ${D}${libexecdir}/${PN}/stap-env
+   fi
+}
+
 BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
index 3dc688a..e2f5204 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,10 +1,9 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "45d0e7a09a15a21078d0ebf2db5175ed9e87014e"
-PV = "3.1"
+SRCREV = "4051c70c9318c837981384cbb23f3e9eb1bd0892"
+PV = "3.2"
 
 SRC_URI = "git://sourceware.org/git/systemtap.git \
-           file://system_map_location.patch \
            file://configure-allow-to-disable-libvirt.patch \
            file://x32_abi_time.patch \
            file://monitor-option.patch \
@@ -13,10 +12,21 @@
            file://0001-Install-python-modules-to-correct-library-dir.patch \
            file://0001-buildrun-remove-quotes-around-I-include-line.patch \
            file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
+           file://0001-Fix-PR22551-by-updating-the-use-of-timers-for-the-4..patch \
+           file://0001-Fixes-for-gcc-8.patch \
+           file://0001-Use-sysroot-when-looking-for-the-System.map-file.patch \
+           file://0001-debuginfo-lookup-with-sysroot-case-do-not-remove-sys.patch \
+           file://0001-Make-sure-sysroot-paths-don-t-end-with-a-slash.patch \
+           file://0001-sysroot-fix-short-release-r-option-handling.patch \
+           file://0001-Delay-adding-sysroot-path-to-module-name-in-case-of-.patch \
+           file://0001-Added-a-couple-of-small-sysroot-fixes.patch \
+           file://0001-_stp_umodule_relocate-needs-target-file-path-not-hos.patch \
+           file://0001-sysroot-handle-symbolic-links-with-absolute-name-rel.patch \
+           file://0001-sysroot-fix-short-release-r-option-handling-follow-u.patch \
            "
 
-# systemtap doesn't support mips
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64).*-linux'
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux'
+COMPATIBLE_HOST_libc-musl = 'null'
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
index 002ee65..0a1789c 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
@@ -1,11 +1,11 @@
-SRCREV = "021710e1073fe203341b427cd1a4bac577ec899c"
-PV = "2.6.1"
+SRCREV = "7d0147bbba3ed1d5ef6eea4eec3f0ad4c98f02b5"
+PV = "2.7"
 
 inherit pkgconfig
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.6 \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \
            file://blktrace-api-compatibility.patch \
            file://0001-Include-limits.h-so-that-PATH_MAX-is-defined-an-issu.patch \
 "
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
deleted file mode 100644
index 795e48a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 3408f8e78776b12f131e433749721602f87e0a70 Mon Sep 17 00:00:00 2001
-From: "Hong H. Pham" <hong.pham@windriver.com>
-Date: Fri, 29 Aug 2014 17:13:55 +0300
-Subject: [PATCH] Check if wordexp function is supported
-
-eglibc could be configured to build without wordexp, so it is not enough
-to check if wordexp.h exists (the header file could be installed, but it's
-possible that the wordexp() function is not supported).  An additional
-check if wordexp() is supported by the system C library is needed.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- configure.ac   | 5 ++++-
- src/userfile.c | 2 +-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9490d39..b08a90a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -295,7 +295,10 @@ fi
- AC_SUBST(ALSA_DEPLIBS)
- 
- dnl Check for headers
--AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h])
-+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h],
-+  dnl Make sure wordexp is supported by the C library
-+  AC_CHECK_FUNCS([wordexp])
-+)
- 
- dnl Check for resmgr support...
- AC_MSG_CHECKING(for resmgr support)
-diff --git a/src/userfile.c b/src/userfile.c
-index 72779da..e9d13e6 100644
---- a/src/userfile.c
-+++ b/src/userfile.c
-@@ -32,7 +32,7 @@
-  * stores the first matchine one.  The returned string is strdup'ed.
-  */
- 
--#ifdef HAVE_WORDEXP_H
-+#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP))
- #include <wordexp.h>
- #include <assert.h>
- int snd_user_file(const char *file, char **result)
--- 
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
deleted file mode 100644
index 3d44585..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From c2c13cf0c469862cd39b2a69862002331ab7c8cb Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 9 Feb 2016 14:01:18 -0800
-Subject: [PATCH] avoid including <sys/poll.h> directly
-
-Fixes compiler warnings when building with musl libc.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- aserver/aserver.c         | 2 +-
- include/asoundlib-head.h  | 2 +-
- include/asoundlib.h       | 2 +-
- include/local.h           | 2 +-
- src/control/control.c     | 2 +-
- src/control/control_shm.c | 2 +-
- src/pcm/pcm_direct.c      | 2 +-
- src/pcm/pcm_mmap.c        | 2 +-
- src/pcm/pcm_share.c       | 2 +-
- src/pcm/pcm_shm.c         | 2 +-
- src/seq/seq.c             | 2 +-
- src/shmarea.c             | 2 +-
- 12 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/aserver/aserver.c b/aserver/aserver.c
-index ac20706..46f731a 100644
---- a/aserver/aserver.c
-+++ b/aserver/aserver.c
-@@ -20,7 +20,7 @@
- 
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/uio.h>
- #include <stdio.h>
-diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
-index 1ec611e..21e32c6 100644
---- a/include/asoundlib-head.h
-+++ b/include/asoundlib-head.h
-@@ -35,6 +35,6 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <errno.h>
- #include <stdarg.h>
-diff --git a/include/asoundlib.h b/include/asoundlib.h
-index 3c2766e..a546194 100644
---- a/include/asoundlib.h
-+++ b/include/asoundlib.h
-@@ -35,7 +35,7 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <errno.h>
- #include <stdarg.h>
- #include <endian.h>
-diff --git a/include/local.h b/include/local.h
-index 317f2e3..6a43a47 100644
---- a/include/local.h
-+++ b/include/local.h
-@@ -47,7 +47,7 @@
- #error Header defining endianness not defined
- #endif
- #include <stdarg.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/types.h>
- #include <errno.h>
- #if defined(__linux__)
-diff --git a/src/control/control.c b/src/control/control.c
-index 6c00b8e..fd0c303 100644
---- a/src/control/control.c
-+++ b/src/control/control.c
-@@ -90,7 +90,7 @@ I/O operations.
- #include <string.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <stdbool.h>
- #include "control_local.h"
- 
-diff --git a/src/control/control_shm.c b/src/control/control_shm.c
-index bd07d4a..9a2e268 100644
---- a/src/control/control_shm.c
-+++ b/src/control/control_shm.c
-@@ -27,7 +27,7 @@
- #include <fcntl.h>
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/uio.h>
- #include <sys/mman.h>
-diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
-index c3925cc..18f1dd5 100644
---- a/src/pcm/pcm_direct.c
-+++ b/src/pcm/pcm_direct.c
-@@ -30,7 +30,7 @@
- #include <grp.h>
- #include <sys/ioctl.h>
- #include <sys/mman.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/shm.h>
- #include <sys/sem.h>
- #include <sys/wait.h>
-diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
-index 1948289..4cf220a 100644
---- a/src/pcm/pcm_mmap.c
-+++ b/src/pcm/pcm_mmap.c
-@@ -22,7 +22,7 @@
- #include <stdio.h>
- #include <malloc.h>
- #include <string.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/mman.h>
- #ifdef HAVE_SYS_SHM_H
- #include <sys/shm.h>
-diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
-index 5d8aaf2..21a57fc 100644
---- a/src/pcm/pcm_share.c
-+++ b/src/pcm/pcm_share.c
-@@ -34,7 +34,7 @@
- #include <signal.h>
- #include <math.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <pthread.h>
- #include "pcm_local.h"
- 
-diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
-index a815ac6..4ee958c 100644
---- a/src/pcm/pcm_shm.c
-+++ b/src/pcm/pcm_shm.c
-@@ -36,7 +36,7 @@
- #include <sys/ioctl.h>
- #include <sys/shm.h>
- #include <sys/socket.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/un.h>
- #include <sys/mman.h>
- #include <netinet/in.h>
-diff --git a/src/seq/seq.c b/src/seq/seq.c
-index 9279830..d2027cb 100644
---- a/src/seq/seq.c
-+++ b/src/seq/seq.c
-@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev)
- 
- */
- 
--#include <sys/poll.h>
-+#include <poll.h>
- #include "seq_local.h"
- 
- /****************************************************************************
-diff --git a/src/shmarea.c b/src/shmarea.c
-index 9843aa8..eaa71f0 100644
---- a/src/shmarea.c
-+++ b/src/shmarea.c
-@@ -27,7 +27,7 @@
- #include <malloc.h>
- #include <string.h>
- #include <errno.h>
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/mman.h>
- #include <sys/shm.h>
- #include "list.h"
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.4.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.4.1.bb
deleted file mode 100644
index acdeae1..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.4.1.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "ALSA sound library"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
-                    file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
-           file://Check-if-wordexp-function-is-supported.patch \
-           file://avoid-including-sys-poll.h-directly.patch \
-"
-SRC_URI[md5sum] = "29fa3e69122d3cf3e8f0e01a0cb1d183"
-SRC_URI[sha256sum] = "91bb870c14d1c7c269213285eeed874fa3d28112077db061a3af8010d0885b76"
-
-inherit autotools pkgconfig
-
-require alsa-fpu.inc
-EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
-
-EXTRA_OECONF += "--disable-python"
-
-PACKAGES =+ "alsa-server libasound alsa-conf alsa-doc"
-FILES_libasound = "${libdir}/libasound.so.*"
-FILES_alsa-server = "${bindir}/*"
-FILES_alsa-conf = "${datadir}/alsa/"
-
-RDEPENDS_libasound = "alsa-conf"
-
-# alsa-lib gets automatically added to alsa-lib-dev dependencies, but the
-# alsa-lib package doesn't exist. libasound is the real library package.
-RDEPENDS_${PN}-dev = "libasound"
-
-# upgrade path
-RPROVIDES_${PN}-dev = "alsa-dev"
-RREPLACES_${PN}-dev = "alsa-dev"
-RCONFLICTS_${PN}-dev = "alsa-dev"
-
-RPROVIDES_alsa-conf = "alsa-conf-base"
-RREPLACES_alsa-conf = "alsa-conf-base"
-RCONFLICTS_alsa-conf = "alsa-conf-base"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.5.bb
new file mode 100644
index 0000000..c5bf107
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.5.bb
@@ -0,0 +1,40 @@
+SUMMARY = "ALSA sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+                    file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2"
+SRC_URI[md5sum] = "a2b465c3a5265d8a57f3ff39c6c4fc29"
+SRC_URI[sha256sum] = "f4f68ad3c6da36b0b5241ac3c798a7a71e0e97d51f972e9f723b3f20a9650ae6"
+
+inherit autotools pkgconfig
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+EXTRA_OECONF += "--disable-python"
+
+PACKAGES =+ "alsa-server libasound alsa-conf alsa-doc"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+
+RDEPENDS_libasound = "alsa-conf"
+
+# alsa-lib gets automatically added to alsa-lib-dev dependencies, but the
+# alsa-lib package doesn't exist. libasound is the real library package.
+RDEPENDS_${PN}-dev = "libasound"
+
+# upgrade path
+RPROVIDES_${PN}-dev = "alsa-dev"
+RREPLACES_${PN}-dev = "alsa-dev"
+RCONFLICTS_${PN}-dev = "alsa-dev"
+
+RPROVIDES_alsa-conf = "alsa-conf-base"
+RREPLACES_alsa-conf = "alsa-conf-base"
+RCONFLICTS_alsa-conf = "alsa-conf-base"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.4.bb
deleted file mode 100644
index b7f79b7..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.4.bb
+++ /dev/null
@@ -1,103 +0,0 @@
-SUMMARY = "ALSA Plugins"
-HOMEPAGE = "http://alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "multimedia"
-
-# The primary license of alsa-plugins is LGPLv2.1.
-#
-# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
-# build system, and doesn't affect the licensing of the build result.
-#
-# The samplerate plugin source code is licensed under GPLv2+ to be consistent
-# with the libsamplerate license. However, if the licensee has a commercial
-# license for libsamplerate, the samplerate plugin may be used under the terms
-# of LGPLv2.1 like the rest of the plugins.
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "\
-        file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
-        file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
-        file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
-        file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
-"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2"
-SRC_URI[md5sum] = "de51130a7444b79b2dd3c25e28420754"
-SRC_URI[sha256sum] = "530d1c3bdaeb058f2a03607a33b9e16ee5369bfd30a96bc09bd2c69b4ddd1a8a"
-
-DEPENDS += "alsa-lib"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "\
-        samplerate \
-        speexdsp \
-        ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
-"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
-PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
-PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
-PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
-PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
-
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
-
-PACKAGES_DYNAMIC = "^libasound-module-.*"
-
-# The alsa-plugins package doesn't itself contain anything, it just depends on
-# all built plugins.
-ALLOW_EMPTY_${PN} = "1"
-
-do_install_append() {
-	rm ${D}${libdir}/alsa-lib/*.la
-
-	# We use the example as is, so just drop the .example suffix.
-	if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
-		mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
-	fi
-}
-
-python populate_packages_prepend() {
-    plugindir = d.expand('${libdir}/alsa-lib/')
-    packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
-    d.setVar("RDEPENDS_alsa-plugins", packages)
-}
-
-# The rate plugins create some symlinks. For example, the samplerate plugin
-# creates these links to the main plugin file:
-#
-#   libasound_module_rate_samplerate_best.so
-#   libasound_module_rate_samplerate_linear.so
-#   libasound_module_rate_samplerate_medium.so
-#   libasound_module_rate_samplerate_order.so
-#
-# The other rate plugins create similar links. We have to add the links to
-# FILES manually, because do_split_packages() skips the links (which is good,
-# because we wouldn't want do_split_packages() to create separate packages for
-# the symlinks).
-#
-# The symlinks cause QA errors, because usually it's a bug if a non
-# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
-# the errors are false positives, so we disable the QA checks.
-FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
-
-# 50-pulseaudio.conf defines a device named "pulse" that applications can use
-# if they explicitly want to use the PulseAudio plugin.
-# 99-pulseaudio-default.conf configures the "default" device to use the
-# PulseAudio plugin.
-FILES_${PN}-pulseaudio-conf += "\
-        ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
-        ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
-"
-
-RDEPENDS_${PN}-pulseaudio-conf += "\
-        libasound-module-conf-pulse \
-        libasound-module-ctl-pulse \
-        libasound-module-pcm-pulse \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.5.bb
new file mode 100644
index 0000000..4bd0acc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.5.bb
@@ -0,0 +1,103 @@
+SUMMARY = "ALSA Plugins"
+HOMEPAGE = "http://alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "multimedia"
+
+# The primary license of alsa-plugins is LGPLv2.1.
+#
+# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
+# build system, and doesn't affect the licensing of the build result.
+#
+# The samplerate plugin source code is licensed under GPLv2+ to be consistent
+# with the libsamplerate license. However, if the licensee has a commercial
+# license for libsamplerate, the samplerate plugin may be used under the terms
+# of LGPLv2.1 like the rest of the plugins.
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "\
+        file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+        file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+        file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
+        file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
+"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2"
+SRC_URI[md5sum] = "f898b0e6e8acf3f6f82bc2a0f0c84a97"
+SRC_URI[sha256sum] = "797da5f8f53379fbea28817bc466de16affd2c07849e84f1af8d5e22f7bb7f1c"
+
+DEPENDS += "alsa-lib"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "\
+        samplerate \
+        speexdsp \
+        ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
+"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
+PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
+PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
+
+PACKAGES_DYNAMIC = "^libasound-module-.*"
+
+# The alsa-plugins package doesn't itself contain anything, it just depends on
+# all built plugins.
+ALLOW_EMPTY_${PN} = "1"
+
+do_install_append() {
+	rm ${D}${libdir}/alsa-lib/*.la
+
+	# We use the example as is, so just drop the .example suffix.
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
+		mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
+	fi
+}
+
+python populate_packages_prepend() {
+    plugindir = d.expand('${libdir}/alsa-lib/')
+    packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
+    d.setVar("RDEPENDS_alsa-plugins", packages)
+}
+
+# The rate plugins create some symlinks. For example, the samplerate plugin
+# creates these links to the main plugin file:
+#
+#   libasound_module_rate_samplerate_best.so
+#   libasound_module_rate_samplerate_linear.so
+#   libasound_module_rate_samplerate_medium.so
+#   libasound_module_rate_samplerate_order.so
+#
+# The other rate plugins create similar links. We have to add the links to
+# FILES manually, because do_split_packages() skips the links (which is good,
+# because we wouldn't want do_split_packages() to create separate packages for
+# the symlinks).
+#
+# The symlinks cause QA errors, because usually it's a bug if a non
+# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
+# the errors are false positives, so we disable the QA checks.
+FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
+
+# 50-pulseaudio.conf defines a device named "pulse" that applications can use
+# if they explicitly want to use the PulseAudio plugin.
+# 99-pulseaudio-default.conf configures the "default" device to use the
+# PulseAudio plugin.
+FILES_${PN}-pulseaudio-conf += "\
+        ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
+        ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
+"
+
+RDEPENDS_${PN}-pulseaudio-conf += "\
+        libasound-module-conf-pulse \
+        libasound-module-ctl-pulse \
+        libasound-module-pcm-pulse \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
deleted file mode 100644
index d049a30..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 1e5926df74a35fe2cd90bc59f5264a8715c94048 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 08:16:59 +0000
-Subject: [PATCH] as10k1: Make output_tram_line() static inline
-
-The function is not used in any other file, its better to make it static
-inline so compiler has a better chance of optimizing here
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- as10k1/as10k1.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/as10k1/as10k1.c b/as10k1/as10k1.c
-index 96af0c3..d0766fd 100644
---- a/as10k1/as10k1.c
-+++ b/as10k1/as10k1.c
-@@ -366,7 +366,7 @@ void as_exit(const char *message)
- 	exit(1);
- }
- 
--inline void output_tram_line( struct list_head *line_head, int type){
-+static inline void output_tram_line( struct list_head *line_head, int type){
-         
-         struct tram *tram_sym;
-         struct list_head *entry;
--- 
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
index 319f25d..2e74963 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
@@ -20,7 +20,7 @@
 --- alsa-tools-1.0.24.1-orig//Makefile	2011-07-06 11:27:40.207665000 +0800
 +++ alsa-tools-1.0.24.1/Makefile	2011-07-14 15:08:08.877665009 +0800
 @@ -1,8 +1,8 @@
- VERSION = 1.1.0
+ VERSION = 1.1.5
  TOP = .
 -SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
 +SUBDIRS = as10k1 envy24control \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
index 9bd6848..54373d1 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
@@ -14,7 +14,7 @@
 --- a/Makefile
 +++ b/Makefile
 @@ -1,9 +1,9 @@
- VERSION = 1.1.0
+ VERSION = 1.1.5
  TOP = .
 -SUBDIRS = as10k1 envy24control \
 -	  mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.3.bb
deleted file mode 100644
index 9e97c0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.3.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Advanced tools for certain ALSA sound card drivers"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & LGPLv2+"
-DEPENDS = "alsa-lib ncurses glib-2.0"
-
-LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
-           file://autotools.patch \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
-           file://gitcompile_hdajacksensetest \
-           file://0001-as10k1-Make-output_tram_line-static-inline.patch \
-           "
-
-SRC_URI[md5sum] = "b23eaae687d55410b92587c2053b301f"
-SRC_URI[sha256sum] = "d88f1dcd6872121383eded5fa24e328e68c54e527db4547e1435d5eabc2b6709"
-
-inherit autotools-brokensep pkgconfig
-
-CLEANBROKEN = "1"
-
-EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
-PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
-
-# configure.ac/.in doesn't exist so force copy
-AUTOTOOLS_COPYACLOCAL = "1"
-
-do_compile_prepend () {
-    #Automake dir is not correctly detected in cross compilation case
-    export AUTOMAKE_DIR="$(automake --print-libdir)"
-    export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/ ${ACLOCALEXTRAPATH}"
-
-    cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
-}
-
-FILES_${PN} += "${datadir}/ld10k1"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.5.bb
new file mode 100644
index 0000000..1be43aa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.5.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Advanced tools for certain ALSA sound card drivers"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & LGPLv2+"
+DEPENDS = "alsa-lib ncurses glib-2.0"
+
+LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
+           file://autotools.patch \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
+           file://gitcompile_hdajacksensetest \
+           "
+
+SRC_URI[md5sum] = "3afb92eb1b4f2edc8691498e57c3ec78"
+SRC_URI[sha256sum] = "bc3c6567de835223ee7d69487b8c22fb395a2e8c613341b0c96e6a5f6a2bd534"
+
+inherit autotools-brokensep pkgconfig
+
+CLEANBROKEN = "1"
+
+EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
+PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
+
+# configure.ac/.in doesn't exist so force copy
+AUTOTOOLS_COPYACLOCAL = "1"
+
+do_compile_prepend () {
+    #Automake dir is not correctly detected in cross compilation case
+    export AUTOMAKE_DIR="$(automake --print-libdir)"
+    export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/ ${ACLOCALEXTRAPATH}"
+
+    cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
+}
+
+FILES_${PN} += "${datadir}/ld10k1"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.5.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.4.bb
rename to import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.5.bb
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
index e578dfe..907ca5c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
@@ -1,4 +1,4 @@
-From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001
+From b9d41b784657152a4c5683a9458dffab557f0689 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Fri, 29 Aug 2014 18:58:56 +0300
 Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
@@ -22,7 +22,7 @@
  2 files changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
-index cac8094..ff865dc 100644
+index 90fab9d..190525a 100644
 --- a/alsactl/Makefile.am
 +++ b/alsactl/Makefile.am
 @@ -38,9 +38,10 @@ install-data-hook:
@@ -40,17 +40,17 @@
  
  alsa-state.service: alsa-state.service.in
 diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
-index 2884098..bac3ccc 100644
+index 80fd5fd..6beb36d 100644
 --- a/alsactl/alsa-restore.service.in
 +++ b/alsactl/alsa-restore.service.in
-@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State
+@@ -7,6 +7,7 @@
+ Description=Save/Restore Sound Card State
  ConditionPathExists=!@daemonswitch@
  ConditionPathExistsGlob=/dev/snd/control*
- After=alsa-state.service
 +ConditionPathExists=@localstatedir@/lib/alsa/asound.state
  
  [Service]
  Type=oneshot
 -- 
-2.7.0.rc3
+2.14.2
 
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb
deleted file mode 100644
index c8f4b86..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.4.bb
+++ /dev/null
@@ -1,109 +0,0 @@
-SUMMARY = "ALSA sound utilities"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
-SECTION = "console/utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
-DEPENDS = "alsa-lib ncurses libsamplerate0"
-
-PACKAGECONFIG ??= "udev"
-
-# alsabat can be built also without fftw support (with reduced functionality).
-# It would be better to always enable alsabat, but provide an option for
-# enabling/disabling fftw. The configure script doesn't support that, however
-# (at least in any obvious way), so for now we only support alsabat with fftw
-# or no alsabat at all.
-PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
-
-PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
-PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
-           file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
-          "
-
-SRC_URI[md5sum] = "01e3934ca5bd22a80c27289d1b0adcdc"
-SRC_URI[sha256sum] = "a7831044de92c5bf33bf3365a3f36e49397f4191e934df460ae1ca15138c9d9d"
-
-# On build machines with python-docutils (not python3-docutils !!) installed
-# rst2man (not rst2man.py) is detected and compile fails with
-# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'.  Stop.
-# Avoid this by disabling expicitly
-EXTRA_OECONF = "--disable-rst2man"
-
-inherit autotools gettext pkgconfig manpages
-
-# This are all packages that we need to make. Also, the now empty alsa-utils
-# ipk depends on them.
-
-ALSA_UTILS_PKGS = "\
-             ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
-             alsa-utils-alsamixer \
-             alsa-utils-alsatplg \
-             alsa-utils-midi \
-             alsa-utils-aplay \
-             alsa-utils-amixer \
-             alsa-utils-aconnect \
-             alsa-utils-iecset \
-             alsa-utils-speakertest \
-             alsa-utils-aseqnet \
-             alsa-utils-aseqdump \
-             alsa-utils-alsactl \
-             alsa-utils-alsaloop \
-             alsa-utils-alsaucm \
-            "
-
-PACKAGES += "${ALSA_UTILS_PKGS}"
-RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
-
-FILES_${PN} = ""
-FILES_alsa-utils-alsabat     = "${bindir}/alsabat"
-FILES_alsa-utils-alsatplg    = "${bindir}/alsatplg"
-FILES_alsa-utils-aplay       = "${bindir}/aplay ${bindir}/arecord"
-FILES_alsa-utils-amixer      = "${bindir}/amixer"
-FILES_alsa-utils-alsamixer   = "${bindir}/alsamixer"
-FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
-FILES_alsa-utils-midi        = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
-FILES_alsa-utils-aconnect    = "${bindir}/aconnect"
-FILES_alsa-utils-aseqnet     = "${bindir}/aseqnet"
-FILES_alsa-utils-iecset      = "${bindir}/iecset"
-FILES_alsa-utils-alsactl     = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
-FILES_alsa-utils-aseqdump    = "${bindir}/aseqdump"
-FILES_alsa-utils-alsaloop    = "${bindir}/alsaloop"
-FILES_alsa-utils-alsaucm     = "${bindir}/alsaucm"
-
-SUMMARY_alsa-utils-alsabat      = "Command-line sound tester for ALSA sound card driver"
-SUMMARY_alsa-utils-alsatplg     = "Converts topology text files into binary format for kernel"
-SUMMARY_alsa-utils-aplay        = "Play (and record) sound files using ALSA"
-SUMMARY_alsa-utils-amixer       = "Command-line control for ALSA mixer and settings"
-SUMMARY_alsa-utils-alsamixer    = "ncurses-based control for ALSA mixer and settings"
-SUMMARY_alsa-utils-speakertest  = "ALSA surround speaker test utility"
-SUMMARY_alsa-utils-midi         = "Miscellaneous MIDI utilities for ALSA"
-SUMMARY_alsa-utils-aconnect     = "ALSA sequencer connection manager"
-SUMMARY_alsa-utils-aseqnet      = "Network client/server for ALSA sequencer"
-SUMMARY_alsa-utils-iecset       = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
-SUMMARY_alsa-utils-alsactl      = "Saves/restores ALSA-settings in /etc/asound.state"
-SUMMARY_alsa-utils-aseqdump     = "Shows the events received at an ALSA sequencer port"
-SUMMARY_alsa-utils-alsaloop     = "ALSA PCM loopback utility"
-SUMMARY_alsa-utils-alsaucm      = "ALSA Use Case Manager"
-
-RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
-
-ALLOW_EMPTY_alsa-utils = "1"
-
-do_install() {
-	autotools_do_install
-
-	# We don't ship this here because it requires a dependency on bash.
-	# See alsa-utils-scripts_${PV}.bb
-	rm ${D}${sbindir}/alsaconf
-	rm ${D}${sbindir}/alsa-info.sh
-	rm -f ${D}${sbindir}/alsabat-test.sh
-
-	if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
-		# This is where alsa-utils will install its rules if we don't tell it anything else.
-		rm -rf ${D}${nonarch_base_libdir}/udev
-		rmdir --ignore-fail-on-non-empty ${D}${nonarch_base_libdir}
-	fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.5.bb
new file mode 100644
index 0000000..33215bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.5.bb
@@ -0,0 +1,108 @@
+SUMMARY = "ALSA sound utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+                    file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
+DEPENDS = "alsa-lib ncurses libsamplerate0"
+
+PACKAGECONFIG ??= "udev"
+
+# alsabat can be built also without fftw support (with reduced functionality).
+# It would be better to always enable alsabat, but provide an option for
+# enabling/disabling fftw. The configure script doesn't support that, however
+# (at least in any obvious way), so for now we only support alsabat with fftw
+# or no alsabat at all.
+PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
+
+PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev"
+PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
+           file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
+          "
+
+SRC_URI[md5sum] = "dfe6ea147a5e07a056919591c2f5dac3"
+SRC_URI[sha256sum] = "320bd285e91db6e7fd7db3c9ec6f55b02f35449ff273c7844780ac6a5a3de2e8"
+
+# On build machines with python-docutils (not python3-docutils !!) installed
+# rst2man (not rst2man.py) is detected and compile fails with
+# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'.  Stop.
+# Avoid this by disabling expicitly
+EXTRA_OECONF = "--disable-rst2man"
+
+inherit autotools gettext pkgconfig manpages
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depends on them.
+
+ALSA_UTILS_PKGS = "\
+             ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
+             alsa-utils-alsamixer \
+             alsa-utils-alsatplg \
+             alsa-utils-midi \
+             alsa-utils-aplay \
+             alsa-utils-amixer \
+             alsa-utils-aconnect \
+             alsa-utils-iecset \
+             alsa-utils-speakertest \
+             alsa-utils-aseqnet \
+             alsa-utils-aseqdump \
+             alsa-utils-alsactl \
+             alsa-utils-alsaloop \
+             alsa-utils-alsaucm \
+            "
+
+PACKAGES += "${ALSA_UTILS_PKGS}"
+RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
+
+FILES_${PN} = ""
+FILES_alsa-utils-alsabat     = "${bindir}/alsabat"
+FILES_alsa-utils-alsatplg    = "${bindir}/alsatplg"
+FILES_alsa-utils-aplay       = "${bindir}/aplay ${bindir}/arecord"
+FILES_alsa-utils-amixer      = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer   = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
+FILES_alsa-utils-midi        = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect    = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet     = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset      = "${bindir}/iecset"
+FILES_alsa-utils-alsactl     = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
+FILES_alsa-utils-aseqdump    = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaloop    = "${bindir}/alsaloop"
+FILES_alsa-utils-alsaucm     = "${bindir}/alsaucm"
+
+SUMMARY_alsa-utils-alsabat      = "Command-line sound tester for ALSA sound card driver"
+SUMMARY_alsa-utils-alsatplg     = "Converts topology text files into binary format for kernel"
+SUMMARY_alsa-utils-aplay        = "Play (and record) sound files using ALSA"
+SUMMARY_alsa-utils-amixer       = "Command-line control for ALSA mixer and settings"
+SUMMARY_alsa-utils-alsamixer    = "ncurses-based control for ALSA mixer and settings"
+SUMMARY_alsa-utils-speakertest  = "ALSA surround speaker test utility"
+SUMMARY_alsa-utils-midi         = "Miscellaneous MIDI utilities for ALSA"
+SUMMARY_alsa-utils-aconnect     = "ALSA sequencer connection manager"
+SUMMARY_alsa-utils-aseqnet      = "Network client/server for ALSA sequencer"
+SUMMARY_alsa-utils-iecset       = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
+SUMMARY_alsa-utils-alsactl      = "Saves/restores ALSA-settings in /etc/asound.state"
+SUMMARY_alsa-utils-aseqdump     = "Shows the events received at an ALSA sequencer port"
+SUMMARY_alsa-utils-alsaloop     = "ALSA PCM loopback utility"
+SUMMARY_alsa-utils-alsaucm      = "ALSA Use Case Manager"
+
+RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
+
+ALLOW_EMPTY_alsa-utils = "1"
+
+do_install() {
+	autotools_do_install
+
+	# We don't ship this here because it requires a dependency on bash.
+	# See alsa-utils-scripts_${PV}.bb
+	rm ${D}${sbindir}/alsaconf
+	rm ${D}${sbindir}/alsa-info.sh
+	rm -f ${D}${sbindir}/alsabat-test.sh
+
+	# If udev is disabled, we told configure to install the rules
+	# in /unwanted, so we can remove them now. If udev is enabled,
+	# then /unwanted won't exist and this will have no effect.
+	rm -rf ${D}/unwanted
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-build-fix-for-mips.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-build-fix-for-mips.patch
deleted file mode 100644
index 3f8224a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-build-fix-for-mips.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f34c567045bea5a7ded9bcfa8e785cfd24cc7dde Mon Sep 17 00:00:00 2001
-From: Shivraj Patil <shivraj.patil@imgtec.com>
-Date: Tue, 4 Apr 2017 18:56:01 +0530
-Subject: [PATCH] build fix for mips
-
-Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
-Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
----
-Upstream-Status: Backport
-
- libavcodec/mips/hevcpred_init_mips.c | 3 ++-
- libavcodec/mips/hevcpred_msa.c       | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/mips/hevcpred_init_mips.c b/libavcodec/mips/hevcpred_init_mips.c
-index 331cfac115..e987698d66 100644
---- a/libavcodec/mips/hevcpred_init_mips.c
-+++ b/libavcodec/mips/hevcpred_init_mips.c
-@@ -18,7 +18,8 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavcodec/hevc.h"
-+#include "config.h"
-+#include "libavutil/attributes.h"
- #include "libavcodec/mips/hevcpred_mips.h"
- 
- #if HAVE_MSA
-diff --git a/libavcodec/mips/hevcpred_msa.c b/libavcodec/mips/hevcpred_msa.c
-index 6a3b2815fd..963c64c861 100644
---- a/libavcodec/mips/hevcpred_msa.c
-+++ b/libavcodec/mips/hevcpred_msa.c
-@@ -18,7 +18,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavcodec/hevc.h"
-+#include "libavcodec/hevcdec.h"
- #include "libavutil/mips/generic_macros_msa.h"
- #include "hevcpred_mips.h"
- 
--- 
-2.13.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14054.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14054.patch
deleted file mode 100644
index e8baa18..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14054.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 124eb202e70678539544f6268efc98131f19fa49 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 01:15:28 +0200
-Subject: [PATCH] avformat/rmdec: Fix DoS due to lack of eof check
-
-Fixes: loop.ivr
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14054
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/rmdec.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
-index 178eaea..d6d7d9c 100644
---- a/libavformat/rmdec.c
-+++ b/libavformat/rmdec.c
-@@ -1223,8 +1223,11 @@ static int ivr_read_header(AVFormatContext *s)
-             av_log(s, AV_LOG_DEBUG, "%s = '%s'\n", key, val);
-         } else if (type == 4) {
-             av_log(s, AV_LOG_DEBUG, "%s = '0x", key);
--            for (j = 0; j < len; j++)
-+            for (j = 0; j < len; j++) {
-+                if (avio_feof(pb))
-+                    return AVERROR_INVALIDDATA;
-                 av_log(s, AV_LOG_DEBUG, "%X", avio_r8(pb));
-+            }
-             av_log(s, AV_LOG_DEBUG, "'\n");
-         } else if (len == 4 && type == 3 && !strncmp(key, "StreamCount", tlen)) {
-             nb_streams = value = avio_rb32(pb);
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14055.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14055.patch
deleted file mode 100644
index 37d0d1a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14055.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4f05e2e2dc1a89f38cd9f0960a6561083d714f1e Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Fri, 25 Aug 2017 01:15:30 +0200
-Subject: [PATCH] avformat/mvdec: Fix DoS due to lack of eof check
-
-Fixes: loop.mv
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14055
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mvdec.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c
-index 0e12c8c..f7aa4cb 100644
---- a/libavformat/mvdec.c
-+++ b/libavformat/mvdec.c
-@@ -342,6 +342,8 @@ static int mv_read_header(AVFormatContext *avctx)
-             uint32_t pos   = avio_rb32(pb);
-             uint32_t asize = avio_rb32(pb);
-             uint32_t vsize = avio_rb32(pb);
-+            if (avio_feof(pb))
-+                return AVERROR_INVALIDDATA;
-             avio_skip(pb, 8);
-             av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME);
-             av_add_index_entry(vst, pos + asize, i, vsize, 0, AVINDEX_KEYFRAME);
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14056.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14056.patch
deleted file mode 100644
index 088b357..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14056.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 96f24d1bee7fe7bac08e2b7c74db1a046c9dc0de Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 01:15:29 +0200
-Subject: [PATCH] avformat/rl2: Fix DoS due to lack of eof check
-
-Fixes: loop.rl2
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14056
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/rl2.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/libavformat/rl2.c b/libavformat/rl2.c
-index 0bec8f1..eb1682d 100644
---- a/libavformat/rl2.c
-+++ b/libavformat/rl2.c
-@@ -170,12 +170,21 @@ static av_cold int rl2_read_header(AVFormatContext *s)
-     }
- 
-     /** read offset and size tables */
--    for(i=0; i < frame_count;i++)
-+    for(i=0; i < frame_count;i++) {
-+        if (avio_feof(pb))
-+            return AVERROR_INVALIDDATA;
-         chunk_size[i] = avio_rl32(pb);
--    for(i=0; i < frame_count;i++)
-+    }
-+    for(i=0; i < frame_count;i++) {
-+        if (avio_feof(pb))
-+            return AVERROR_INVALIDDATA;
-         chunk_offset[i] = avio_rl32(pb);
--    for(i=0; i < frame_count;i++)
-+    }
-+    for(i=0; i < frame_count;i++) {
-+        if (avio_feof(pb))
-+            return AVERROR_INVALIDDATA;
-         audio_size[i] = avio_rl32(pb) & 0xFFFF;
-+    }
- 
-     /** build the sample index */
-     for(i=0;i<frame_count;i++){
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14057.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14057.patch
deleted file mode 100644
index b301d23..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14057.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 7f9ec5593e04827249e7aeb466da06a98a0d7329 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 12:37:25 +0200
-Subject: [PATCH] avformat/asfdec: Fix DoS due to lack of eof check
-
-Fixes: loop.asf
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14057
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/asfdec_f.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
-index be09a92..f3acbae 100644
---- a/libavformat/asfdec_f.c
-+++ b/libavformat/asfdec_f.c
-@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t size)
-     count = avio_rl32(pb);    // markers count
-     avio_rl16(pb);            // reserved 2 bytes
-     name_len = avio_rl16(pb); // name length
--    for (i = 0; i < name_len; i++)
--        avio_r8(pb); // skip the name
-+    avio_skip(pb, name_len);
- 
-     for (i = 0; i < count; i++) {
-         int64_t pres_time;
-         int name_len;
- 
-+        if (avio_feof(pb))
-+            return AVERROR_INVALIDDATA;
-+
-         avio_rl64(pb);             // offset, 8 bytes
-         pres_time = avio_rl64(pb); // presentation time
-         pres_time -= asf->hdr.preroll * 10000;
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14058.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14058.patch
deleted file mode 100644
index 95803ce..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14058.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 7ec414892ddcad88313848494b6fc5f437c9ca4a Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Sat, 26 Aug 2017 01:26:58 +0200
-Subject: [PATCH] avformat/hls: Fix DoS due to infinite loop
-
-Fixes: loop.m3u
-
-The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-
-Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14058
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- doc/demuxers.texi | 18 ++++++++++++++++++
- libavformat/hls.c |  7 +++++++
- 2 files changed, 25 insertions(+)
-
-diff --git a/doc/demuxers.texi b/doc/demuxers.texi
-index 29a23d4..73dc0fe 100644
---- a/doc/demuxers.texi
-+++ b/doc/demuxers.texi
-@@ -300,6 +300,24 @@ used to end the output video at the length of the shortest input file,
- which in this case is @file{input.mp4} as the GIF in this example loops
- infinitely.
- 
-+@section hls
-+
-+HLS demuxer
-+
-+It accepts the following options:
-+
-+@table @option
-+@item live_start_index
-+segment index to start live streams at (negative values are from the end).
-+
-+@item allowed_extensions
-+',' separated list of file extensions that hls is allowed to access.
-+
-+@item max_reload
-+Maximum number of times a insufficient list is attempted to be reloaded.
-+Default value is 1000.
-+@end table
-+
- @section image2
- 
- Image file demuxer.
-diff --git a/libavformat/hls.c b/libavformat/hls.c
-index 01731bd..0995345 100644
---- a/libavformat/hls.c
-+++ b/libavformat/hls.c
-@@ -205,6 +205,7 @@ typedef struct HLSContext {
-     AVDictionary *avio_opts;
-     int strict_std_compliance;
-     char *allowed_extensions;
-+    int max_reload;
- } HLSContext;
- 
- static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
-@@ -1263,6 +1264,7 @@ static int read_data(void *opaque, uint8_t *buf, int buf_size)
-     HLSContext *c = v->parent->priv_data;
-     int ret, i;
-     int just_opened = 0;
-+    int reload_count = 0;
- 
- restart:
-     if (!v->needed)
-@@ -1294,6 +1296,9 @@ restart:
-         reload_interval = default_reload_interval(v);
- 
- reload:
-+        reload_count++;
-+        if (reload_count > c->max_reload)
-+            return AVERROR_EOF;
-         if (!v->finished &&
-             av_gettime_relative() - v->last_load_time >= reload_interval) {
-             if ((ret = parse_playlist(c, v->url, v, NULL)) < 0) {
-@@ -2150,6 +2155,8 @@ static const AVOption hls_options[] = {
-         OFFSET(allowed_extensions), AV_OPT_TYPE_STRING,
-         {.str = "3gp,aac,avi,flac,mkv,m3u8,m4a,m4s,m4v,mpg,mov,mp2,mp3,mp4,mpeg,mpegts,ogg,ogv,oga,ts,vob,wav"},
-         INT_MIN, INT_MAX, FLAGS},
-+    {"max_reload", "Maximum number of times a insufficient list is attempted to be reloaded",
-+        OFFSET(max_reload), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, FLAGS},
-     {NULL}
- };
- 
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14059.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14059.patch
deleted file mode 100644
index 34fde0b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14059.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 7e80b63ecd259d69d383623e75b318bf2bd491f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=20and=20=E5=BC=A0=E6=B4=AA=E4=BA=AE=28?=
- =?UTF-8?q?=E6=9C=9B=E5=88=9D=29?= <tony.sh and wangchu.zhl@alibaba-inc.com>
-Date: Fri, 25 Aug 2017 01:15:27 +0200
-Subject: [PATCH] avformat/cinedec: Fix DoS due to lack of eof check
-
-Fixes: loop.cine
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14059
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/cinedec.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c
-index 763b93b..de34fb9 100644
---- a/libavformat/cinedec.c
-+++ b/libavformat/cinedec.c
-@@ -267,8 +267,12 @@ static int cine_read_header(AVFormatContext *avctx)
- 
-     /* parse image offsets */
-     avio_seek(pb, offImageOffsets, SEEK_SET);
--    for (i = 0; i < st->duration; i++)
-+    for (i = 0; i < st->duration; i++) {
-+        if (avio_feof(pb))
-+            return AVERROR_INVALIDDATA;
-+
-         av_add_index_entry(st, avio_rl64(pb), i, 0, 0, AVINDEX_KEYFRAME);
-+    }
- 
-     return 0;
- }
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14169.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14169.patch
deleted file mode 100644
index e1284fa..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14169.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 9d00fb9d70ee8c0cc7002b89318c5be00f1bbdad Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
- <tony.sh@alibaba-inc.com>
-Date: Tue, 29 Aug 2017 23:59:21 +0200
-Subject: [PATCH] avformat/mxfdec: Fix Sign error in mxf_read_primer_pack()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes: 20170829B.mxf
-
-Co-Author: å¼ ę“Ŗäŗ®(ęœ›åˆ)" <wangchu.zhl@alibaba-inc.com>
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14169
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mxfdec.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
-index 6adb77d..91731a7 100644
---- a/libavformat/mxfdec.c
-+++ b/libavformat/mxfdec.c
-@@ -500,7 +500,7 @@ static int mxf_read_primer_pack(void *arg, AVIOContext *pb, int tag, int size, U
-         avpriv_request_sample(pb, "Primer pack item length %d", item_len);
-         return AVERROR_PATCHWELCOME;
-     }
--    if (item_num > 65536) {
-+    if (item_num > 65536 || item_num < 0) {
-         av_log(mxf->fc, AV_LOG_ERROR, "item_num %d is too large\n", item_num);
-         return AVERROR_INVALIDDATA;
-     }
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch
deleted file mode 100644
index 8860125..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 900f39692ca0337a98a7cf047e4e2611071810c2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
- <tony.sh@alibaba-inc.com>
-Date: Tue, 29 Aug 2017 23:59:21 +0200
-Subject: [PATCH] avformat/mxfdec: Fix DoS issues in
- mxf_read_index_entry_array()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes: 20170829A.mxf
-
-Co-Author: å¼ ę“Ŗäŗ®(ęœ›åˆ)" <wangchu.zhl@alibaba-inc.com>
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14170
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mxfdec.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
-index f8d0f9e..6adb77d 100644
---- a/libavformat/mxfdec.c
-+++ b/libavformat/mxfdec.c
-@@ -899,6 +899,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
-     segment->nb_index_entries = avio_rb32(pb);
- 
-     length = avio_rb32(pb);
-+    if(segment->nb_index_entries && length < 11)
-+        return AVERROR_INVALIDDATA;
- 
-     if (!(segment->temporal_offset_entries=av_calloc(segment->nb_index_entries, sizeof(*segment->temporal_offset_entries))) ||
-         !(segment->flag_entries          = av_calloc(segment->nb_index_entries, sizeof(*segment->flag_entries))) ||
-@@ -909,6 +911,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
-     }
- 
-     for (i = 0; i < segment->nb_index_entries; i++) {
-+        if(avio_feof(pb))
-+            return AVERROR_INVALIDDATA;
-         segment->temporal_offset_entries[i] = avio_r8(pb);
-         avio_r8(pb);                                        /* KeyFrameOffset */
-         segment->flag_entries[i] = avio_r8(pb);
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14171.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14171.patch
deleted file mode 100644
index e2ae204..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14171.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From c24bcb553650b91e9eff15ef6e54ca73de2453b7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
- <tony.sh@alibaba-inc.com>
-Date: Tue, 29 Aug 2017 23:59:21 +0200
-Subject: [PATCH] avformat/nsvdec: Fix DoS due to lack of eof check in
- nsvs_file_offset loop.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes: 20170829.nsv
-
-Co-Author: å¼ ę“Ŗäŗ®(ęœ›åˆ)" <wangchu.zhl@alibaba-inc.com>
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14171
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/nsvdec.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
-index c6ddb67..d8ce656 100644
---- a/libavformat/nsvdec.c
-+++ b/libavformat/nsvdec.c
-@@ -335,8 +335,11 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
-         if (!nsv->nsvs_file_offset)
-             return AVERROR(ENOMEM);
- 
--        for(i=0;i<table_entries_used;i++)
-+        for(i=0;i<table_entries_used;i++) {
-+            if (avio_feof(pb))
-+                return AVERROR_INVALIDDATA;
-             nsv->nsvs_file_offset[i] = avio_rl32(pb) + size;
-+        }
- 
-         if(table_entries > table_entries_used &&
-            avio_rl32(pb) == MKTAG('T','O','C','2')) {
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14222.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14222.patch
deleted file mode 100644
index ee02037..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14222.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9cb4eb772839c5e1de2855d126bf74ff16d13382 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Tue, 5 Sep 2017 00:16:29 +0200
-Subject: [PATCH] avformat/mov: Fix DoS in read_tfra()
-
-Fixes: Missing EOF check in loop
-No testcase
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14222
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/mov.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/libavformat/mov.c b/libavformat/mov.c
-index 994e9c6..2519707 100644
---- a/libavformat/mov.c
-+++ b/libavformat/mov.c
-@@ -6094,6 +6094,13 @@ static int read_tfra(MOVContext *mov, AVIOContext *f)
-     }
-     for (i = 0; i < index->item_count; i++) {
-         int64_t time, offset;
-+
-+        if (avio_feof(f)) {
-+            index->item_count = 0;
-+            av_freep(&index->items);
-+            return AVERROR_INVALIDDATA;
-+        }
-+
-         if (version == 1) {
-             time   = avio_rb64(f);
-             offset = avio_rb64(f);
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14223.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14223.patch
deleted file mode 100644
index d1fef6b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14223.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From afc9c683ed9db01edb357bc8c19edad4282b3a97 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michael@niedermayer.cc>
-Date: Tue, 5 Sep 2017 00:16:29 +0200
-Subject: [PATCH] avformat/asfdec: Fix DoS in asf_build_simple_index()
-
-Fixes: Missing EOF check in loop
-No testcase
-
-Found-by: Xiaohei and Wangchu from Alibaba Security Team
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14223
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- libavformat/asfdec_f.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
-index f3acbae..cc648b9 100644
---- a/libavformat/asfdec_f.c
-+++ b/libavformat/asfdec_f.c
-@@ -1610,6 +1610,11 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index)
-             int64_t pos       = s->internal->data_offset + s->packet_size * (int64_t)pktnum;
-             int64_t index_pts = FFMAX(av_rescale(itime, i, 10000) - asf->hdr.preroll, 0);
- 
-+            if (avio_feof(s->pb)) {
-+                ret = AVERROR_INVALIDDATA;
-+                goto end;
-+            }
-+
-             if (pos != last_pos) {
-                 av_log(s, AV_LOG_DEBUG, "pktnum:%d, pktct:%d  pts: %"PRId64"\n",
-                        pktnum, pktct, index_pts);
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14225.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14225.patch
deleted file mode 100644
index ce6845e..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14225.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Subject: [PATCH] ffprobe: Fix null pointer dereference with color primaries
-
-Found-by: AD-lab of venustech
-Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-CVE: CVE-2017-14225
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- ffprobe.c | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/ffprobe.c b/ffprobe.c
-index a219fc1..df22b30 100644
---- a/ffprobe.c
-+++ b/ffprobe.c
-@@ -1899,6 +1899,16 @@ static void print_pkt_side_data(WriterContext *w,
-     writer_print_section_footer(w);
- }
- 
-+static void print_primaries(WriterContext *w, enum AVColorPrimaries color_primaries)
-+{
-+    const char *val = av_color_primaries_name(color_primaries);
-+    if (!val || color_primaries == AVCOL_PRI_UNSPECIFIED) {
-+	print_str_opt("color_primaries", "unknown");
-+    } else {
-+	print_str("color_primaries", val);
-+    }
-+}
-+
- static void clear_log(int need_lock)
- {
-     int i;
-@@ -2420,10 +2430,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
-         else
-             print_str_opt("color_transfer", av_color_transfer_name(par->color_trc));
- 
--        if (par->color_primaries != AVCOL_PRI_UNSPECIFIED)
--            print_str("color_primaries", av_color_primaries_name(par->color_primaries));
--        else
--            print_str_opt("color_primaries", av_color_primaries_name(par->color_primaries));
-+        print_primaries(w, par->color_primaries);
- 
-         if (par->chroma_location != AVCHROMA_LOC_UNSPECIFIED)
-             print_str("chroma_location", av_chroma_location_name(par->chroma_location));
--- 
-2.1.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.3.bb
deleted file mode 100644
index c1ebecf..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.3.bb
+++ /dev/null
@@ -1,165 +0,0 @@
-SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
-DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
-               mux, demux, stream, filter and play pretty much anything that humans and machines \
-               have created. It supports the most obscure ancient formats up to the cutting edge."
-HOMEPAGE = "https://www.ffmpeg.org/"
-SECTION = "libs"
-
-LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
-LICENSE_${PN} = "GPLv2+"
-LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libpostproc = "GPLv2+"
-LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
-LICENSE_FLAGS = "commercial"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
-                    file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
-           file://mips64_cpu_detection.patch \
-           file://0001-build-fix-for-mips.patch \
-           file://CVE-2017-14054.patch \
-           file://CVE-2017-14055.patch \
-           file://CVE-2017-14056.patch \
-           file://CVE-2017-14057.patch \
-           file://CVE-2017-14058.patch \
-           file://CVE-2017-14059.patch \
-           file://CVE-2017-14169.patch \
-           file://CVE-2017-14170.patch \
-           file://CVE-2017-14171.patch \
-           file://CVE-2017-14222.patch \
-           file://CVE-2017-14223.patch \
-           file://CVE-2017-14225.patch \
-          "
-SRC_URI[md5sum] = "743dc66ebe67180283b92d029f690d0f"
-SRC_URI[sha256sum] = "d2a9002cdc6b533b59728827186c044ad02ba64841f1b7cd6c21779875453a1e"
-
-# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
-ARM_INSTRUCTION_SET = "arm"
-
-# Should be API compatible with libav (which was a fork of ffmpeg)
-# libpostproc was previously packaged from a separate recipe
-PROVIDES = "libav libpostproc"
-
-DEPENDS = "alsa-lib zlib libogg yasm-native"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
-                   bzlib gpl lzma theora x264 \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}"
-
-# libraries to build in addition to avutil
-PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
-PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
-PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
-PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
-PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
-PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
-PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
-
-# features to support
-PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
-PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
-PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
-PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
-PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
-PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
-PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
-PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
-PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
-PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
-PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
-PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
-PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
-PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
-
-# Check codecs that require --enable-nonfree
-USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
-
-def cpu(d):
-    for arg in (d.getVar('TUNE_CCARGS') or '').split():
-        if arg.startswith('-mcpu='):
-            return arg[6:]
-    return 'generic'
-
-EXTRA_OECONF = " \
-    --disable-stripping \
-    --enable-pic \
-    --enable-shared \
-    --enable-pthreads \
-    --disable-libxcb \
-    --disable-libxcb-shm \
-    --disable-libxcb-xfixes \
-    --disable-libxcb-shape \
-    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
-    \
-    --cross-prefix=${TARGET_PREFIX} \
-    \
-    --ld="${CCLD}" \
-    --cc="${CC}" \
-    --cxx="${CXX}" \
-    --arch=${TARGET_ARCH} \
-    --target-os="linux" \
-    --enable-cross-compile \
-    --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
-    --extra-ldflags="${TARGET_LDFLAGS}" \
-    --sysroot="${STAGING_DIR_TARGET}" \
-    --enable-hardcoded-tables \
-    ${EXTRA_FFCONF} \
-    --libdir=${libdir} \
-    --shlibdir=${libdir} \
-    --datadir=${datadir}/ffmpeg \
-    ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
-    --cpu=${@cpu(d)} \
-    --pkg-config=pkg-config \
-"
-
-EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
-
-do_configure() {
-    ${S}/configure ${EXTRA_OECONF}
-}
-
-PACKAGES =+ "libavcodec \
-             libavdevice \
-             libavfilter \
-             libavformat \
-             libavresample \
-             libavutil \
-             libpostproc \
-             libswresample \
-             libswscale"
-
-FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
-FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
-FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
-FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
-FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
-FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
-FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
-FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
-FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
-
-# ffmpeg disables PIC on some platforms (e.g. x86-32)
-INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
-INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
-INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
-INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
-INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
-INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
-INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb
new file mode 100644
index 0000000..879cf7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb
@@ -0,0 +1,151 @@
+SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
+DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
+               mux, demux, stream, filter and play pretty much anything that humans and machines \
+               have created. It supports the most obscure ancient formats up to the cutting edge."
+HOMEPAGE = "https://www.ffmpeg.org/"
+SECTION = "libs"
+
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libpostproc = "GPLv2+"
+LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
+LICENSE_FLAGS = "commercial"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+                    file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
+           file://mips64_cpu_detection.patch \
+           "
+SRC_URI[md5sum] = "cbf4ead227fcedddf54c86013705a988"
+SRC_URI[sha256sum] = "2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740"
+
+# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
+ARM_INSTRUCTION_SET = "arm"
+
+# Should be API compatible with libav (which was a fork of ffmpeg)
+# libpostproc was previously packaged from a separate recipe
+PROVIDES = "libav libpostproc"
+
+DEPENDS = "alsa-lib zlib libogg yasm-native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
+                   bzlib gpl lzma theora x264 \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}"
+
+# libraries to build in addition to avutil
+PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
+PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
+PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
+PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
+PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
+PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
+PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
+
+# features to support
+PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
+
+def cpu(d):
+    for arg in (d.getVar('TUNE_CCARGS') or '').split():
+        if arg.startswith('-mcpu='):
+            return arg[6:]
+    return 'generic'
+
+EXTRA_OECONF = " \
+    --disable-stripping \
+    --enable-pic \
+    --enable-shared \
+    --enable-pthreads \
+    --disable-libxcb \
+    --disable-libxcb-shm \
+    --disable-libxcb-xfixes \
+    --disable-libxcb-shape \
+    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+    \
+    --cross-prefix=${TARGET_PREFIX} \
+    \
+    --ld="${CCLD}" \
+    --cc="${CC}" \
+    --cxx="${CXX}" \
+    --arch=${TARGET_ARCH} \
+    --target-os="linux" \
+    --enable-cross-compile \
+    --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+    --extra-ldflags="${TARGET_LDFLAGS}" \
+    --sysroot="${STAGING_DIR_TARGET}" \
+    --enable-hardcoded-tables \
+    ${EXTRA_FFCONF} \
+    --libdir=${libdir} \
+    --shlibdir=${libdir} \
+    --datadir=${datadir}/ffmpeg \
+    ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
+    --cpu=${@cpu(d)} \
+    --pkg-config=pkg-config \
+"
+
+EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
+
+do_configure() {
+    ${S}/configure ${EXTRA_OECONF}
+}
+
+PACKAGES =+ "libavcodec \
+             libavdevice \
+             libavfilter \
+             libavformat \
+             libavresample \
+             libavutil \
+             libpostproc \
+             libswresample \
+             libswscale"
+
+FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
+FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
+FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
+FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
+FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
+FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
+FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
+FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
+FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
+
+# ffmpeg disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
+INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
+INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
+INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
+INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
+INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
+INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
new file mode 100644
index 0000000..67a872c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
@@ -0,0 +1,35 @@
+From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 25 Jan 2018 17:55:02 +0200
+Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall
+ through to system plugin scanner
+
+If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
+
+Falling through to the one installed on the system is problamatic in cross-compilation
+environemnts, regardless of whether one pointed to by the env var succeeded or failed.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst/gstpluginloader.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
+index 430829d..3a75731 100644
+--- a/gst/gstpluginloader.c
++++ b/gst/gstpluginloader.c
+@@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
+     helper_bin = g_strdup (env);
+     res = gst_plugin_loader_try_helper (loader, helper_bin);
+     g_free (helper_bin);
+-  }
+-
+-  if (!res) {
++  } else {
+     GST_LOG ("Trying installed plugin scanner");
+ 
+ #ifdef G_OS_WIN32
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
new file mode 100644
index 0000000..d86c78d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
@@ -0,0 +1,47 @@
+From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 20 Dec 2017 13:03:03 +0000
+Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc
+
+Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient
+binaries instead of libtool wrapper or running them directly.
+
+Also substitute a bogus plugin scanner, as trying to run the real one is causing
+issues during build on x86_64.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ common/gtk-doc.mak | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak
+index 3f83491..e5cb0d1 100644
+--- a/common/gtk-doc.mak
++++ b/common/gtk-doc.mak
+@@ -6,11 +6,11 @@
+ if GTK_DOC_USE_LIBTOOL
+ GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+-GTKDOC_RUN = $(LIBTOOL) --mode=execute
++GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
+ else
+ GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+-GTKDOC_RUN =
++GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
+ endif
+ 
+ # We set GPATH here; this gives us semantics for GNU make
+@@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ 	    GST_PLUGIN_PATH_1_0=					\
+ 	    GST_REGISTRY_1_0=doc-registry.xml				\
+ 	    $(GTKDOC_EXTRA_ENVIRONMENT)					\
++	    GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \
+ 	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)"	\
+ 	    CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)"				\
+ 	    LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)"				\
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
new file mode 100644
index 0000000..0338bad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
@@ -0,0 +1,39 @@
+From 755f6dab07565aca7b6aefacad8be65de364ff75 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 17 Aug 2017 11:07:02 +0300
+Subject: [PATCH] Make player examples installable
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Denied [Upstream considers these code examples, for now a least]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=777827
+---
+ playback/player/gst-play/meson.build | 1 +
+ playback/player/gtk/meson.build      | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build
+index 719b55b..a56fe13 100644
+--- a/playback/player/gst-play/meson.build
++++ b/playback/player/gst-play/meson.build
+@@ -8,5 +8,6 @@ executable('gst-play',
+     ['gst-play.c',
+      'gst-play-kb.c',
+      'gst-play-kb.h'],
++    install: true,
+     dependencies : [gst_dep, gstplayer_dep, m_dep])
+ 
+diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build
+index 08aae4f..671a65d 100644
+--- a/playback/player/gtk/meson.build
++++ b/playback/player/gtk/meson.build
+@@ -18,5 +18,6 @@ executable('gtk-play',
+       gtk_play_resources,
+      'gtk-video-renderer.h',
+      'gtk-video-renderer.c'],
++    install: true,
+     dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep])
+ 
+-- 
+2.13.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
rename to import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb
new file mode 100644
index 0000000..1d87f24
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "GStreamer examples (including gtk-play, gst-play)"
+LICENSE = "LGPL-2.0+"
+LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
+
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native"
+
+SRC_URI = "git://anongit.freedesktop.org/gstreamer/gst-examples \
+           file://0001-Make-player-examples-installable.patch \
+           file://gst-player.desktop"
+
+SRCREV = "48247c6ab6807d6ae179cf653cbdc64714d3313c"
+PV = "0.0.1+git${SRCPV}"
+UPSTREAM_CHECK_COMMITS = "1"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig distro_features_check
+
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+do_install_append() {
+	install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
+}
+
+RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
+RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
+                     gstreamer1.0-plugins-good-meta \
+                     gstreamer1.0-plugins-bad-meta \
+                      ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
+                     ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
+RPROVIDES_${PN} += "gst-player gst-player-bin"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
deleted file mode 100644
index 4fe8fde..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "GStreamer playback helper library and examples"
-LICENSE = "LGPL-2.0+"
-LIC_FILES_CHKSUM = "file://gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
-
-DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native"
-
-SRC_URI = "git://github.com/sdroege/gst-player.git \
-           file://gst-player.desktop"
-
-SRCREV = "ee3c226c82767a089743e4e06058743e67f73cdb"
-PV = "0.0.1+git${SRCPV}"
-UPSTREAM_VERSION_UNKNOWN = "1"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-do_configure_prepend() {
-	touch ${S}/ChangeLog
-}
-
-do_install_append() {
-	install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
-}
-
-RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
-RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
-                     gstreamer1.0-plugins-good-meta \
-                     gstreamer1.0-plugins-bad-meta \
-                      ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
-                     ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
-RPROVIDES_${PN} += "${PN}-bin"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-validate_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-validate_1.12.4.bb
new file mode 100644
index 0000000..0f2585a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-validate_1.12.4.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Gstreamer validation tool"
+DESCRIPTION = "A Tool to test GStreamer components"
+HOMEPAGE = "https://gstreamer.freedesktop.org/releases/gst-validate/1.12.3.html"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "bc074d49677081f9c27de11a09165746"
+SRC_URI[sha256sum] = "f9da9dfe6e5d6f5ba3b38c5752b42d3f927715904942b405c2924d3cb77afba1"
+
+DEPENDS = "json-glib glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base"
+RRECOMMENDS_${PN} = "git"
+
+FILES_${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*"
+
+inherit pkgconfig gettext autotools gobject-introspection gtk-doc upstream-version-is-even
+
+# With gtk-doc enabled this recipe fails to build, so forcibly disable it:
+# WORKDIR/build/docs/validate/gst-validate-scan: line 117:
+# WORKDIR/build/docs/validate/.libs/lt-gst-validate-scan: No such file or directory
+GTKDOC_ENABLED = "False"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb
deleted file mode 100644
index 3b5bbd1..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require gstreamer1.0-libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
-                    file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
-                    file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
-                    file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
-           file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
-           file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
-           file://mips64_cpu_detection.patch \
-           file://0001-configure-check-for-armv7ve-variant.patch \
-           file://0001-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch \
-           "
-SRC_URI[md5sum] = "8788aecc032a287227b4bd239d1b998a"
-SRC_URI[sha256sum] = "5bb735b9bb218b652ae4071ea6f6be8eaae55e9d3233aec2f36b882a27542db3"
-
-S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.4.bb
new file mode 100644
index 0000000..af547ba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.4.bb
@@ -0,0 +1,21 @@
+require gstreamer1.0-libav.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+                    file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+                    file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+                    file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
+           file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
+           file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
+           file://mips64_cpu_detection.patch \
+           file://0001-configure-check-for-armv7ve-variant.patch \
+           file://0001-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch \
+           "
+SRC_URI[md5sum] = "8a851bf2e475e90a3fdac9506e3e4dbd"
+SRC_URI[sha256sum] = "2a56aa5d2d8cd912f2bce17f174713d2c417ca298f1f9c28ee66d4aa1e1d9e62"
+
+S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.2.bb
deleted file mode 100644
index a1d4576..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.2.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-include gstreamer1.0-omx.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "4a1404a20b72e4ab6e826500218ec308"
-SRC_URI[sha256sum] = "1b22398f45a027e977d2b5309625ec91cdcaf0da8751cbc7f596d639a45ba298"
-
-S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.4.bb
new file mode 100644
index 0000000..7f7eae3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12.4.bb
@@ -0,0 +1,11 @@
+include gstreamer1.0-omx.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "eb8d5ae3b69cfeed9dc77c592106247e"
+SRC_URI[sha256sum] = "a025fa24242ec868fe0ff1e66d806a1070bcbc7c14a987a89cdc3395d0d56d5f"
+
+S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 7be15d9..ca2ea9e 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -22,7 +22,7 @@
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
     ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
-    bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
+    bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile uvch264 webp \
 "
 
 PACKAGECONFIG[assrender]       = "--enable-assrender,--disable-assrender,libass"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
deleted file mode 100644
index 48d93ab..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7c8f68c5428380b930579dc9ef27c853264448fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 15 May 2017 15:06:11 +0300
-Subject: [PATCH] Prepend PKG_CONFIG_SYSROOT_DIR to pkg-config output
-
-In cross environment we have to prepend the sysroot to the path found by
-pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
-it ends up using the files from host system. If build host has wayland installed
-the build will succeed but if you dont have wayland-protocols installed on build
-host then it wont find the files on build host
-
-This should work ok with non sysrooted builds too since
-in those cases PKG_CONFIG_SYSROOT_DIR will be empty
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index e307be6..83cdeb0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2272,7 +2272,7 @@ AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [
-   PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.4.0 libdrm >= 2.4.55 wayland-protocols >= 1.4, [
-     if test "x$wayland_scanner" != "x"; then
-       HAVE_WAYLAND="yes"
--      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`)
-     else
-       AC_MSG_RESULT([wayland-scanner is required to build the wayland plugin])
-       HAVE_WAYLAND="no"
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
index d52afd5..ad86329 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
@@ -18,11 +18,11 @@
  configure.ac |   23 +++++++++++++++++------
  1 file changed, 17 insertions(+), 6 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index 0e95c5c..12153b4 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [
+Index: gst-plugins-bad-1.12.3/configure.ac
+===================================================================
+--- gst-plugins-bad-1.12.3.orig/configure.ac
++++ gst-plugins-bad-1.12.3/configure.ac
+@@ -2139,6 +2139,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chrom
  ])
  
  dnl *** Curl ***
@@ -37,8 +37,8 @@
 +
  translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
  AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
-   PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [
-@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
+   PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [
+@@ -2161,12 +2170,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin]
    ])
    AC_SUBST(CURL_CFLAGS)
    AC_SUBST(CURL_LIBS)
@@ -59,6 +59,3 @@
    AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes")
    AC_SUBST(SSH2_CFLAGS)
    AC_SUBST(SSH2_LIBS)
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb
deleted file mode 100644
index 8321da0..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require gstreamer1.0-plugins-bad.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
-                    file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
-
-SRC_URI = " \
-    http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
-    file://configure-allow-to-disable-libssh2.patch \
-    file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
-    file://avoid-including-sys-poll.h-directly.patch \
-    file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
-    file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
-    file://0009-glimagesink-Downrank-to-marginal.patch \
-    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-    file://0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch \
-    file://link-with-libvchostif.patch \
-    file://0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch \
-    file://0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch \
-"
-SRC_URI[md5sum] = "5683f0ea91f9e1e0613b0f6f729980a7"
-SRC_URI[sha256sum] = "9c2c7edde4f59d74eb414e0701c55131f562e5c605a3ce9b091754f106c09e37"
-
-S = "${WORKDIR}/gst-plugins-bad-${PV}"
-
-EXTRA_OECONF += "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.4.bb
new file mode 100644
index 0000000..82c7ffc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.4.bb
@@ -0,0 +1,24 @@
+require gstreamer1.0-plugins-bad.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
+                    file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
+    file://configure-allow-to-disable-libssh2.patch \
+    file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
+    file://avoid-including-sys-poll.h-directly.patch \
+    file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
+    file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
+    file://0009-glimagesink-Downrank-to-marginal.patch \
+    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+    file://link-with-libvchostif.patch \
+    file://0001-vkdisplay-Use-ifdef-for-platform-specific-defines.patch \
+    file://0002-vulkan-Use-the-generated-version-of-vkconfig.h.patch \
+"
+SRC_URI[md5sum] = "64bf16cf15edaab1c0e02c8dee7170d0"
+SRC_URI[sha256sum] = "0c7857be16686d5c1ba6e34bd338664d3d4599d32714a8eca5c8a41a101e2d08"
+
+S = "${WORKDIR}/gst-plugins-bad-${PV}"
+
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
index 0a8bc9b..6616e2c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
@@ -20,11 +20,11 @@
  gst-libs/gst/video/Makefile.am      |  8 ++++----
  11 files changed, 38 insertions(+), 38 deletions(-)
 
-diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
-index bc7f53a..0ef5f86 100644
---- a/gst-libs/gst/allocators/Makefile.am
-+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -35,7 +35,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+Index: gst-plugins-base-1.12.3/gst-libs/gst/allocators/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/allocators/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/allocators/Makefile.am
+@@ -36,7 +36,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(I
  		--c-include "gst/allocators/allocators.h" \
  		-I$(top_srcdir)/gst-libs \
  		-I$(top_builddir)/gst-libs \
@@ -33,7 +33,7 @@
  		--library=libgstallocators-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
  		--libtool="$(LIBTOOL)" \
-@@ -59,7 +59,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -60,7 +60,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		$(INTROSPECTION_COMPILER) \
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
@@ -42,11 +42,11 @@
  		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  
  CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
-index dcc2fe0..dc076cb 100644
---- a/gst-libs/gst/app/Makefile.am
-+++ b/gst-libs/gst/app/Makefile.am
-@@ -48,8 +48,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/app/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/app/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/app/Makefile.am
+@@ -48,8 +48,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPE
  		--c-include "gst/app/app.h" \
  		-I$(top_srcdir)/gst-libs \
  		-I$(top_builddir)/gst-libs \
@@ -57,11 +57,11 @@
  		--library=libgstapp-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
  		--include=GstBase-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
-index 2374196..295eb42 100644
---- a/gst-libs/gst/audio/Makefile.am
-+++ b/gst-libs/gst/audio/Makefile.am
-@@ -106,12 +106,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+Index: gst-plugins-base-1.12.3/gst-libs/gst/audio/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/audio/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/audio/Makefile.am
+@@ -167,12 +167,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROS
  		-I$(top_srcdir)/gst-libs \
  		-I$(top_builddir)/gst-libs \
  		--c-include "gst/audio/audio.h" \
@@ -78,7 +78,7 @@
  		--library-path="$(top_builddir)/gst-libs/gst/tag/" \
  		--include=Gst-@GST_API_VERSION@ \
  		--include=GstBase-@GST_API_VERSION@ \
-@@ -140,8 +140,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -201,8 +201,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
  		--includedir="$(top_builddir)/gst-libs/gst/tag/" \
@@ -89,11 +89,11 @@
  		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  
  CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
-index f545354..1bb6243 100644
---- a/gst-libs/gst/fft/Makefile.am
-+++ b/gst-libs/gst/fft/Makefile.am
-@@ -62,7 +62,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/fft/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/fft/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/fft/Makefile.am
+@@ -63,7 +63,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPE
  		--c-include "gst/fft/fft.h" \
  		-I$(top_srcdir)/gst-libs \
  		-I$(top_builddir)/gst-libs \
@@ -102,7 +102,7 @@
  		--library=libgstfft-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
  		--libtool="$(LIBTOOL)" \
-@@ -86,7 +86,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -87,7 +87,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		$(INTROSPECTION_COMPILER) \
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
@@ -111,11 +111,11 @@
  		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  
  CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
-index 91dc214..dc8e1d3 100644
---- a/gst-libs/gst/pbutils/Makefile.am
-+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -84,14 +84,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+Index: gst-plugins-base-1.12.3/gst-libs/gst/pbutils/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/pbutils/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/pbutils/Makefile.am
+@@ -85,14 +85,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTR
  		--c-include "gst/pbutils/pbutils.h" \
  		-I$(top_srcdir)/gst-libs \
  		-I$(top_builddir)/gst-libs \
@@ -134,7 +134,7 @@
  		--library-path="$(top_builddir)/gst-libs/gst/tag/" \
  		--library-path="$(top_builddir)/gst-libs/gst/video/" \
  		--library-path="$(top_builddir)/gst-libs/gst/audio/" \
-@@ -124,8 +124,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -125,8 +125,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		$(INTROSPECTION_COMPILER) \
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
@@ -145,11 +145,11 @@
  		--includedir="$(top_builddir)/gst-libs/gst/tag/" \
  		--includedir="$(top_builddir)/gst-libs/gst/video/" \
  		--includedir="$(top_builddir)/gst-libs/gst/audio/" \
-diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
-index 3bd8fc0..0a115cc 100644
---- a/gst-libs/gst/riff/Makefile.am
-+++ b/gst-libs/gst/riff/Makefile.am
-@@ -41,8 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+Index: gst-plugins-base-1.12.3/gst-libs/gst/riff/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/riff/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/riff/Makefile.am
+@@ -42,8 +42,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS
  #		--c-include "gst/riff/riff.h" \
  #		--add-include-path=$(builddir)/../tag \
  #		--add-include-path=$(builddir)/../audio \
@@ -160,7 +160,7 @@
  #		--library=libgstriff-@GST_API_VERSION@.la \
  #		--include=GstAudio-@GST_API_VERSION@ \
  #		--include=GstTag-@GST_API_VERSION@ \
-@@ -73,8 +73,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+@@ -74,8 +74,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS
  #		--includedir=$(builddir) \
  #		--includedir=$(builddir)/../tag \
  #		--includedir=$(builddir)/../audio \
@@ -171,11 +171,11 @@
  #		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  #
  #CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
-index f5445c1..527c0b4 100644
---- a/gst-libs/gst/rtp/Makefile.am
-+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -60,8 +60,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/rtp/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/rtp/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/rtp/Makefile.am
+@@ -61,8 +61,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPE
  		--c-include "gst/rtp/rtp.h" \
  		-I$(top_builddir)/gst-libs \
  		-I$(top_srcdir)/gst-libs \
@@ -186,7 +186,7 @@
  		--library=libgstrtp-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
  		--include=GstBase-@GST_API_VERSION@ \
-@@ -88,8 +88,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -89,8 +89,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		$(INTROSPECTION_COMPILER) \
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
@@ -197,11 +197,11 @@
  		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  
  CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
-index 9b0b258..4f6d9f8 100644
---- a/gst-libs/gst/rtsp/Makefile.am
-+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -67,7 +67,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+Index: gst-plugins-base-1.12.3/gst-libs/gst/rtsp/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/rtsp/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/rtsp/Makefile.am
+@@ -68,7 +68,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSP
  		-I$(top_builddir)/gst-libs \
  		-I$(top_srcdir)/gst-libs \
  		--add-include-path=$(builddir)/../sdp \
@@ -210,7 +210,7 @@
  		--library=libgstrtsp-@GST_API_VERSION@.la \
  		--include=Gio-2.0 \
  		--include=Gst-@GST_API_VERSION@ \
-@@ -97,7 +97,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -98,7 +98,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
  		--includedir=$(builddir)/../sdp \
@@ -219,11 +219,11 @@
  		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  
  CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
-index 0e149b8..9aa0512 100644
---- a/gst-libs/gst/sdp/Makefile.am
-+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -29,7 +29,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/sdp/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/sdp/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/sdp/Makefile.am
+@@ -30,7 +30,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPE
  		--warn-all \
  		--c-include "gst/sdp/sdp.h" \
  		-I$(top_srcdir)/gst-libs \
@@ -232,7 +232,7 @@
  		--library=libgstsdp-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
  		--libtool="$(LIBTOOL)" \
-@@ -53,7 +53,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -54,7 +54,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		$(INTROSPECTION_COMPILER) \
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
@@ -241,11 +241,11 @@
  		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  
  CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
-index cafafd3..ba99279 100644
---- a/gst-libs/gst/tag/Makefile.am
-+++ b/gst-libs/gst/tag/Makefile.am
-@@ -40,8 +40,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+Index: gst-plugins-base-1.12.3/gst-libs/gst/tag/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/tag/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/tag/Makefile.am
+@@ -59,8 +59,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPE
  		--c-include "gst/tag/tag.h" \
  		-I$(top_srcdir)/gst-libs \
  		-I$(top_builddir)/gst-libs \
@@ -256,33 +256,7 @@
  		--library=libgsttag-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
  		--include=GstBase-@GST_API_VERSION@ \
-@@ -68,8 +68,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
- 		$(INTROSPECTION_COMPILER) \
- 		--includedir=$(srcdir) \
- 		--includedir=$(builddir) \
--		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
-+		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
-+		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
- 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
- 
- CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
-diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
-index ac64eb3..342c8c6 100644
---- a/gst-libs/gst/video/Makefile.am
-+++ b/gst-libs/gst/video/Makefile.am
-@@ -111,8 +111,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
- 		--c-include "gst/video/video.h" \
- 		-I$(top_srcdir)/gst-libs \
- 		-I$(top_builddir)/gst-libs \
--		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
-+		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
-+		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
- 		--library=libgstvideo-@GST_API_VERSION@.la \
- 		--include=Gst-@GST_API_VERSION@ \
- 		--include=GstBase-@GST_API_VERSION@ \
-@@ -139,8 +139,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -87,8 +87,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
  		$(INTROSPECTION_COMPILER) \
  		--includedir=$(srcdir) \
  		--includedir=$(builddir) \
@@ -293,6 +267,29 @@
  		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
  
  CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
--- 
-2.6.2
-
+Index: gst-plugins-base-1.12.3/gst-libs/gst/video/Makefile.am
+===================================================================
+--- gst-plugins-base-1.12.3.orig/gst-libs/gst/video/Makefile.am
++++ gst-plugins-base-1.12.3/gst-libs/gst/video/Makefile.am
+@@ -116,8 +116,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROS
+ 		--c-include "gst/video/video.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--library=libgstvideo-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+@@ -144,8 +144,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.2.bb
deleted file mode 100644
index 5de0b8b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require gstreamer1.0-plugins-base.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
-                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
-                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-
-SRC_URI = " \
-    http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
-    file://get-caps-from-src-pad-when-query-caps.patch \
-    file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
-    file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
-    file://make-gio_unix_2_0-dependency-configurable.patch \
-    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-"
-SRC_URI[md5sum] = "77f5379c4ca677616b415e3b3ff95578"
-SRC_URI[sha256sum] = "5067dce3afe197a9536fea0107c77213fab536dff4a213b07fc60378d5510675"
-
-S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.4.bb
new file mode 100644
index 0000000..dd895bb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.4.bb
@@ -0,0 +1,18 @@
+require gstreamer1.0-plugins-base.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
+                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
+    file://get-caps-from-src-pad-when-query-caps.patch \
+    file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+    file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+    file://make-gio_unix_2_0-dependency-configurable.patch \
+    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+SRC_URI[md5sum] = "b35b04071f69b8ab69a7f3a497ff0131"
+SRC_URI[sha256sum] = "4c306b03df0212f1b8903784e29bb3493319ba19ebebf13b0c56a17870292282"
+
+S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
deleted file mode 100644
index f78818a..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 545646cccba243236e10362fe7325f89be57da1f Mon Sep 17 00:00:00 2001
-From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
-Date: Tue, 18 Jul 2017 11:28:37 -0400
-Subject: [PATCH] v4l2: Fix 4K colorimetry
-
-Since 1.6, the transfer function for BT2020 has been changed from BT709
-to BT2020_12. It's the same function, but with more precision. As a side
-effect, the V4L2 colorpsace didn't match GStreamer colorspace. When
-GStreamer ended up making a guess, it would not match anything supported
-by V4L2 anymore. This this by using BT2020_12 for BT2020 colorspace and
-BT2020 transfer function in replacement of BT709 whenever a 4K
-resolution is detected.
-
-Upstream-Status: Backport
-Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
-
----
- sys/v4l2/gstv4l2object.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
-index 61244455f..aae2c55e7 100644
---- a/sys/v4l2/gstv4l2object.c
-+++ b/sys/v4l2/gstv4l2object.c
-@@ -1960,7 +1960,7 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
-     case V4L2_COLORSPACE_BT2020:
-       cinfo->range = GST_VIDEO_COLOR_RANGE_16_235;
-       cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT2020;
--      cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
-+      cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
-       cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT2020;
-       break;
-     case V4L2_COLORSPACE_SMPTE240M:
-@@ -2062,7 +2062,10 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt,
- 
-   switch (transfer) {
-     case V4L2_XFER_FUNC_709:
--      cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
-+      if (fmt->fmt.pix.height > 2160)
-+        cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12;
-+      else
-+        cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
-       break;
-     case V4L2_XFER_FUNC_SRGB:
-       cinfo->transfer = GST_VIDEO_TRANSFER_SRGB;
--- 
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb
deleted file mode 100644
index f9593c9..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require gstreamer1.0-plugins-good.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
-                    file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-
-SRC_URI = " \
-    http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
-    file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
-    file://avoid-including-sys-poll.h-directly.patch \
-    file://ensure-valid-sentinel-for-gst_structure_get.patch \
-    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-    file://0001-v4l2-Fix-4K-colorimetry.patch \
-"
-SRC_URI[md5sum] = "20254217d9805484532e08ff1c3aa296"
-SRC_URI[sha256sum] = "5591ee7208ab30289a30658a82b76bf87169c927572d9b794f3a41ed48e1ee96"
-
-S = "${WORKDIR}/gst-plugins-good-${PV}"
-
-RPROVIDES_${PN}-pulseaudio += "${PN}-pulse"
-RPROVIDES_${PN}-soup += "${PN}-souphttpsrc"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.4.bb
new file mode 100644
index 0000000..a060964
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.4.bb
@@ -0,0 +1,20 @@
+require gstreamer1.0-plugins-good.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
+                    file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
+    file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
+    file://avoid-including-sys-poll.h-directly.patch \
+    file://ensure-valid-sentinel-for-gst_structure_get.patch \
+    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+SRC_URI[md5sum] = "bdf4791a2b788ec6a149b81ff4032038"
+SRC_URI[sha256sum] = "649f49bec60892d47ee6731b92266974c723554da1c6649f21296097715eb957"
+
+S = "${WORKDIR}/gst-plugins-good-${PV}"
+
+RPROVIDES_${PN}-pulseaudio += "${PN}-pulse"
+RPROVIDES_${PN}-soup += "${PN}-souphttpsrc"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.2.bb
deleted file mode 100644
index 6956c85..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.2.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require gstreamer1.0-plugins-ugly.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
-
-SRC_URI = " \
-    http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
-    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-"
-SRC_URI[md5sum] = "eb639021905a32cf3013ca5bac1b694d"
-SRC_URI[sha256sum] = "1cc3942bbf3ea87da3e35437d4e014e991b103db22a6174f62a98c89c3f5f466"
-
-S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.4.bb
new file mode 100644
index 0000000..f833351
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.12.4.bb
@@ -0,0 +1,13 @@
+require gstreamer1.0-plugins-ugly.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
+    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+SRC_URI[md5sum] = "e2b836fb2747f6ae3a1a6f33a9d8c952"
+SRC_URI[sha256sum] = "1c165b8d888ed350acd8e6ac9f6fe06508e6fcc0a3afc6ccc9fbeb30df9be522"
+
+S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
index c40d398..5906e4a 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -5,6 +5,8 @@
 
 DEPENDS = "gstreamer1.0 glib-2.0-native"
 
+SRC_URI_append = " file://gtk-doc-tweaks.patch"
+
 inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
 
 acpaths = "-I ${S}/common/m4 -I ${S}/m4"
@@ -34,21 +36,6 @@
 	rm -f "${S}/common/m4/gtk-doc.m4"
 }
 
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
-        # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
-        # instead of libtool wrapper or running them directly
-        # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
-        sed -i \
-           -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
-           -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
-           ${S}/common/gtk-doc*mak
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
+do_configure[prefuncs] += " delete_pkg_m4_file"
 
 PACKAGES_DYNAMIC = "^${PN}-.*"
-
-# qemu-mips64: error while loading shared libraries: .../recipe-sysroot/usr/lib/libgthread-2.0.so.0: ELF file data encoding not little-endian
-EXTRA_OECONF_append_mips64 = " --disable-introspection "
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
index 961b930..361f0bc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
@@ -8,8 +8,6 @@
 
 PNREAL = "gst-python"
 
-SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
-
 S = "${WORKDIR}/${PNREAL}-${PV}"
 
 inherit autotools pkgconfig distutils3-base upstream-version-is-even gobject-introspection
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.2.bb
deleted file mode 100644
index b2dc05b..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.2.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require gstreamer1.0-python.inc
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
-SRC_URI[md5sum] = "da5c9fa42290bc3006661c869e076ffe"
-SRC_URI[sha256sum] = "f4cc32ad46a653e1ae2f27ac2a16078b00075c9106b2784a1a8d1f31c5069e47"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.4.bb
new file mode 100644
index 0000000..faec356
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.12.4.bb
@@ -0,0 +1,7 @@
+require gstreamer1.0-python.inc
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
+SRC_URI[md5sum] = "f1fd046ea781736a794f9f552d77c50d"
+SRC_URI[sha256sum] = "20ce6af6615c9a440c1928c31259a78226516d06bf1a65f888c6d109826fa3ea"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
index 68173ce..3776f92 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
@@ -3,18 +3,21 @@
 SECTION = "multimedia"
 LICENSE = "LGPLv2"
 
-DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base libcheck"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
 
 PNREAL = "gst-rtsp-server"
 
 SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
            file://0001-Don-t-hardcode-libtool-name-when-using-introspection.patch \
-           file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
+           file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+           file://gtk-doc-tweaks.patch"
 
 S = "${WORKDIR}/${PNREAL}-${PV}"
 
 inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
 
+EXTRA_OECONF = "--disable-examples --disable-tests"
+
 # Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
 LIBV = "1.0"
 require gst-plugins-package.inc
@@ -24,17 +27,5 @@
         rm "${S}/common/m4/pkg.m4" || true
 }
 
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
-        # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
-        # instead of libtool wrapper or running them directly
-        sed -i \
-           -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
-           ${S}/common/gtk-doc*mak
-}
+do_configure[prefuncs] += " delete_pkg_m4_file"
 
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
-
-# Needs to be disable due to a dependency on gstreamer-plugins introspection files
-EXTRA_OECONF_append_mips64 = " --disable-introspection "
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.2.bb
deleted file mode 100644
index 2426cca..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require gstreamer1.0-rtsp-server.inc
-
-SRC_URI[md5sum] = "022757cab183f5b970086e9101c60a98"
-SRC_URI[sha256sum] = "d8ba9264e8ae6e440293328e759e40456f161aa66077b3143dd07581136190b3"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.4.bb
new file mode 100644
index 0000000..da68dcb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.12.4.bb
@@ -0,0 +1,6 @@
+require gstreamer1.0-rtsp-server.inc
+
+SRC_URI[md5sum] = "ad70a9735f58da21d0f5cedf48ccadd3"
+SRC_URI[sha256sum] = "7660112ebd59838f1054796b38109dcbe32f0a040e3a252a68a81055aeaa56a9"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.2.bb
deleted file mode 100644
index fbd9f86..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require gstreamer1.0-vaapi.inc
-SRC_URI[md5sum] = "bea015f33696a15ad9575fb71af862ed"
-SRC_URI[sha256sum] = "23c714e0474b3c7ae6ff8884aebf8503a1bc3ded335fa2d2b2ac31788466163a"
-
-DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.4.bb
new file mode 100644
index 0000000..1df2301
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.4.bb
@@ -0,0 +1,5 @@
+require gstreamer1.0-vaapi.inc
+SRC_URI[md5sum] = "2149982cdb348139bca946bb63766f4c"
+SRC_URI[sha256sum] = "1c2d77242e1f30c4d1394636cae9f6877228a017960fca96881e0080d8b6e9c9"
+
+DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index 3291934..c2df1f3 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -16,6 +16,8 @@
 
 SRC_URI_append = " \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+    file://gtk-doc-tweaks.patch \
+    file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
 "
 
 PACKAGECONFIG ??= ""
@@ -52,19 +54,7 @@
         rm -f "${S}/common/m4/gtk-doc.m4"
 }
 
-# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
-# but its own custom ones, which we have to patch here
-patch_gtk_doc_makefiles() {
-        # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
-        # instead of libtool wrapper or running them directly
-        # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
-        sed -i \
-           -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
-           -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
-           ${S}/common/gtk-doc*mak
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
+do_configure[prefuncs] += "delete_pkg_m4_file"
 
 do_compile_prepend() {
         export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-configure-Add-switches-for-enabling-disabling-libdw-.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-configure-Add-switches-for-enabling-disabling-libdw-.patch
deleted file mode 100644
index 1132fd5..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-configure-Add-switches-for-enabling-disabling-libdw-.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From a0cb41ba72913eda06049d266ec43ea8f52b5bee Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Fri, 11 Aug 2017 21:21:36 +0200
-Subject: [PATCH] configure: Add switches for enabling/disabling libdw and
- libunwind
-
-[Original patch modified to be applicable to 1.12.2]
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=778193]
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- configure.ac | 38 ++++++++++++++++++++++++++++++++------
- 1 file changed, 32 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b6b2923..32dd827 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -821,15 +821,41 @@ fi
- AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
- 
- dnl libunwind is optionally used by the leaks tracer
--PKG_CHECK_MODULES(UNWIND, libunwind, HAVE_UNWIND=yes, HAVE_UNWIND=no)
--if test "x$HAVE_UNWIND" = "xyes"; then
--  AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
-+AC_ARG_WITH([unwind],[AS_HELP_STRING([--with-unwind=yes|no|auto],[use libunwind])],
-+            [], [with_unwind=auto])
-+if [ test "x${with_unwind}" != "xno" ]; then
-+  PKG_CHECK_MODULES(UNWIND, [libunwind],
-+      [
-+        HAVE_UNWIND=yes
-+        AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
-+      ],
-+      [
-+        HAVE_UNWIND=no
-+        if [ test "x${with_unwind}" = "xyes" ]; then
-+          AC_MSG_ERROR([could not find libunwind])
-+        fi
-+      ])
-+else
-+  HAVE_UNWIND=no
- fi
- 
- dnl libdw is optionally used to add source lines and numbers to backtraces
--PKG_CHECK_MODULES(DW, libdw, HAVE_DW=yes, HAVE_DW=no)
--if test "x$HAVE_DW" = "xyes"; then
--  AC_DEFINE(HAVE_DW, 1, [libdw available])
-+AC_ARG_WITH([dw],[AS_HELP_STRING([--with-dw=yes|no|auto],[use libdw])],
-+            [], [with_dw=auto])
-+if [ test "x${with_dw}" != "xno" ]; then
-+  PKG_CHECK_MODULES(DW, [libdw],
-+      [
-+        HAVE_DW=yes
-+        AC_DEFINE(HAVE_DW, 1, [libdw available])
-+      ],
-+      [
-+        HAVE_DW=no
-+        if [ test "x${with_dw}" = "xyes" ]; then
-+          AC_MSG_ERROR([could not find libdw])
-+        fi
-+      ])
-+else
-+  HAVE_DW=no
- fi
- 
- dnl Check for backtrace() from libc
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.2.bb
deleted file mode 100644
index 8d41a59..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.2.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require gstreamer1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
-                    file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-SRC_URI = " \
-    http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
-    file://0001-configure-Add-switches-for-enabling-disabling-libdw-.patch \
-"
-SRC_URI[md5sum] = "4748860621607ffd96244fb79c86c238"
-SRC_URI[sha256sum] = "9fde3f39a2ea984f9e07ce09250285ce91f6e3619d186889f75b5154ecf994ba"
-
-S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.4.bb
new file mode 100644
index 0000000..01b2396
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.12.4.bb
@@ -0,0 +1,14 @@
+require gstreamer1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+                    file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+"
+SRC_URI[md5sum] = "9d268f2e891cce1ac0832f1cc467d4ea"
+SRC_URI[sha256sum] = "5a8704aa4c2eeb04da192c4a9942f94f860ac1a585de90d9f914bac26a970674"
+
+S = "${WORKDIR}/gstreamer-${PV}"
+
+CVE_PRODUCT = "gstreamer"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
deleted file mode 100644
index 51baef2..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Pending
-
-Fix this kind of errors with automake 1.12.x:
-| doc/man/Makefile.am:3: error: automatic de-ANSI-fication support has been removed
-| autoreconf: automake failed with exit status: 1
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/13
-
-Index: lame-3.99.5/configure.in
-===================================================================
---- lame-3.99.5.orig/configure.in
-+++ lame-3.99.5/configure.in
-@@ -77,9 +77,6 @@ if test "${GCC}" = "yes"; then
- 	AC_MSG_RESULT(${GCC_version})
- fi
- 
--dnl more automake stuff
--AM_C_PROTOTYPES
--
- AC_CHECK_HEADER(dmalloc.h)
- if test "${ac_cv_header_dmalloc_h}" = "yes"; then
- 	AM_WITH_DMALLOC
-Index: lame-3.99.5/doc/html/Makefile.am
-===================================================================
---- lame-3.99.5.orig/doc/html/Makefile.am
-+++ lame-3.99.5/doc/html/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $
- 
--AUTOMAKE_OPTIONS = foreign ansi2knr
-+AUTOMAKE_OPTIONS = foreign
- 
- docdir = $(datadir)/doc
- pkgdocdir = $(docdir)/$(PACKAGE)
-Index: lame-3.99.5/libmp3lame/i386/Makefile.am
-===================================================================
---- lame-3.99.5.orig/libmp3lame/i386/Makefile.am
-+++ lame-3.99.5/libmp3lame/i386/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.26 2011/04/04 09:42:34 aleidinger Exp $
- 
--AUTOMAKE_OPTIONS = foreign $(top_srcdir)/ansi2knr
-+AUTOMAKE_OPTIONS = foreign
- 
- DEFS = @DEFS@ @CONFIG_DEFS@
- 
-Index: lame-3.99.5/doc/man/Makefile.am
-===================================================================
---- lame-3.99.5.orig/doc/man/Makefile.am
-+++ lame-3.99.5/doc/man/Makefile.am
-@@ -1,6 +1,6 @@
- ## $Id: Makefile.am,v 1.1 2000/10/22 11:39:44 aleidinger Exp $
- 
--AUTOMAKE_OPTIONS = foreign ansi2knr
-+AUTOMAKE_OPTIONS = foreign
- 
- man_MANS = lame.1
- EXTRA_DIST = ${man_MANS}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.100.bb b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.100.bb
new file mode 100644
index 0000000..ff6ac7e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.100.bb
@@ -0,0 +1,27 @@
+SUMMARY = "High quality MP3 audio encoder"
+HOMEPAGE = "http://lame.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
+SECTION = "console/utils"
+LICENSE = "LGPLv2+"
+LICENSE_FLAGS = "commercial"
+
+DEPENDS = "ncurses gettext-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
+                    file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
+"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
+           file://no-gtk1.patch \
+           "
+
+SRC_URI[md5sum] = "83e260acbe4389b54fe08e0bdbf7cddb"
+SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e"
+
+inherit autotools pkgconfig
+
+PACKAGES += "libmp3lame libmp3lame-dev"
+FILES_${PN} = "${bindir}/lame"
+FILES_libmp3lame = "${libdir}/libmp3lame.so.*"
+FILES_libmp3lame-dev = "${includedir} ${libdir}/*"
+FILES_${PN}-dev = ""
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb
deleted file mode 100644
index 0477611..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "High quality MP3 audio encoder"
-HOMEPAGE = "http://lame.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
-SECTION = "console/utils"
-LICENSE = "LGPLv2+"
-LICENSE_FLAGS = "commercial"
-
-DEPENDS = "ncurses gettext-native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
-                    file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
-"
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
-           file://no-gtk1.patch \
-           file://lame-3.99.5_fix_for_automake-1.12.x.patch "
-
-SRC_URI[md5sum] = "84835b313d4a8b68f5349816d33e07ce"
-SRC_URI[sha256sum] = "24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff"
-
-inherit autotools pkgconfig
-
-PACKAGES += "libmp3lame libmp3lame-dev"
-FILES_${PN} = "${bindir}/lame"
-FILES_libmp3lame = "${libdir}/libmp3lame.so.*"
-FILES_libmp3lame-dev = "${includedir} ${libdir}/*"
-FILES_${PN}-dev = ""
-
-CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
deleted file mode 100644
index 0142e0f..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Ogg bitstream and framing libary"
-DESCRIPTION = "libogg is the bitstream and framing library \
-for the Ogg project. It provides functions which are \
-necessary to codec libraries like libvorbis."
-HOMEPAGE = "http://xiph.org/"
-BUGTRACKER = "https://trac.xiph.org/newticket"
-SECTION = "libs"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
-                    file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
-
-SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "5c3a34309d8b98640827e5d0991a4015"
-SRC_URI[sha256sum] = "3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b"
-
-inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb
new file mode 100644
index 0000000..8d88f1f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Ogg bitstream and framing libary"
+DESCRIPTION = "libogg is the bitstream and framing library \
+for the Ogg project. It provides functions which are \
+necessary to codec libraries like libvorbis."
+HOMEPAGE = "http://xiph.org/"
+BUGTRACKER = "https://trac.xiph.org/newticket"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
+                    file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
+
+SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "87ed742047f065046eb6c36745d871b8"
+SRC_URI[sha256sum] = "4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.31.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.31.bb
deleted file mode 100644
index c96ea14..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.31.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6f21e4e1f795810b5ea491b333bc6ea1 \
-                    file://png.h;endline=144;md5=af300c419a45c53a8d2daa0b7d167a66"
-DEPENDS = "zlib"
-
-LIBV = "16"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "1b34eab440263e32cfa39d19413fad54"
-SRC_URI[sha256sum] = "232a602de04916b2b5ce6f901829caf419519e6a16cc9cd7c1c91187d3ee8b41"
-
-MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
-
-BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-# Work around missing symbols
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
-
-PACKAGES =+ "${PN}-tools"
-
-FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.34.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.34.bb
new file mode 100644
index 0000000..e52d032
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.34.bb
@@ -0,0 +1,30 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2db717a05a20e36f2fa673265bd31568 \
+                    file://png.h;endline=144;md5=3ac9fd250a8786ae581e34254bf79429"
+DEPENDS = "zlib"
+
+LIBV = "16"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
+SRC_URI[md5sum] = "c05b6ca7190a5e387b78657dbe5536b2"
+SRC_URI[sha256sum] = "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6"
+
+MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
+
+UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html"
+
+BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+# Work around missing symbols
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
+
+PACKAGES =+ "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-10688.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-10688.patch
deleted file mode 100644
index b0db969..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-10688.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 333ba5599e87bd7747516d7863d61764e4ca2d92 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Fri, 30 Jun 2017 17:29:44 +0000
-Subject: [PATCH] * libtiff/tif_dirwrite.c: in
- TIFFWriteDirectoryTagCheckedXXXX() functions associated with LONG8/SLONG8
- data type, replace assertion that the file is BigTIFF, by a non-fatal error.
- Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712 Reported by team
- OWL337
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/6173a57d39e04d68b139f8c1aa499a24dbe74ba1]
-
-CVE: CVE-2017-10688
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog              |  8 ++++++++
- libtiff/tif_dirwrite.c | 20 ++++++++++++++++----
- 2 files changed, 24 insertions(+), 4 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 0240f0b..42eaeb7 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,11 @@
-+2017-06-30  Even Rouault <even.rouault at spatialys.com>
-+
-+	* libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX()
-+	functions associated with LONG8/SLONG8 data type, replace assertion that
-+	the file is BigTIFF, by a non-fatal error.
-+	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712
-+	Reported by team OWL337
-+
- 2017-06-26  Even Rouault <even.rouault at spatialys.com>
- 
- 	* libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode()
-diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
-index 2967da5..8d6686b 100644
---- a/libtiff/tif_dirwrite.c
-+++ b/libtiff/tif_dirwrite.c
-@@ -2111,7 +2111,10 @@ TIFFWriteDirectoryTagCheckedLong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, ui
- {
- 	uint64 m;
- 	assert(sizeof(uint64)==8);
--	assert(tif->tif_flags&TIFF_BIGTIFF);
-+	if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+		TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","LONG8 not allowed for ClassicTIFF");
-+		return(0);
-+	}
- 	m=value;
- 	if (tif->tif_flags&TIFF_SWAB)
- 		TIFFSwabLong8(&m);
-@@ -2124,7 +2127,10 @@ TIFFWriteDirectoryTagCheckedLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* di
- {
- 	assert(count<0x20000000);
- 	assert(sizeof(uint64)==8);
--	assert(tif->tif_flags&TIFF_BIGTIFF);
-+	if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+		TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","LONG8 not allowed for ClassicTIFF");
-+		return(0);
-+	}
- 	if (tif->tif_flags&TIFF_SWAB)
- 		TIFFSwabArrayOfLong8(value,count);
- 	return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG8,count,count*8,value));
-@@ -2136,7 +2142,10 @@ TIFFWriteDirectoryTagCheckedSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, u
- {
- 	int64 m;
- 	assert(sizeof(int64)==8);
--	assert(tif->tif_flags&TIFF_BIGTIFF);
-+	if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+		TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","SLONG8 not allowed for ClassicTIFF");
-+		return(0);
-+	}
- 	m=value;
- 	if (tif->tif_flags&TIFF_SWAB)
- 		TIFFSwabLong8((uint64*)(&m));
-@@ -2149,7 +2158,10 @@ TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* d
- {
- 	assert(count<0x20000000);
- 	assert(sizeof(int64)==8);
--	assert(tif->tif_flags&TIFF_BIGTIFF);
-+	if( !(tif->tif_flags&TIFF_BIGTIFF) ) {
-+		TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","SLONG8 not allowed for ClassicTIFF");
-+		return(0);
-+	}
- 	if (tif->tif_flags&TIFF_SWAB)
- 		TIFFSwabArrayOfLong8((uint64*)value,count);
- 	return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG8,count,count*8,value));
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-11335.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-11335.patch
deleted file mode 100644
index d08e761..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-11335.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From e8b15ccf8c9c593000f8202cf34cc6c4b936d01e Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Sat, 15 Jul 2017 11:13:46 +0000
-Subject: [PATCH] * tools/tiff2pdf.c: prevent heap buffer overflow write in
- "Raw" mode on PlanarConfig=Contig input images. Fixes
- http://bugzilla.maptools.org/show_bug.cgi?id=2715 Reported by team OWL337
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/69bfeec247899776b1b396651adb47436e5f1556]
-
-CVE: CVE-2017-11355
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog        | 7 +++++++
- tools/tiff2pdf.c | 7 ++++++-
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 42eaeb7..6980da8 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-07-15  Even Rouault <even.rouault at spatialys.com>
-+
-+	* tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw"
-+	mode on PlanarConfig=Contig input images.
-+	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715
-+	Reported by team OWL337
-+
- 2017-06-30  Even Rouault <even.rouault at spatialys.com>
- 
- 	* libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX()
-diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
-index db196e0..cd1e235 100644
---- a/tools/tiff2pdf.c
-+++ b/tools/tiff2pdf.c
-@@ -1737,7 +1737,12 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
- 	    return;
- 
- 	t2p->pdf_transcode = T2P_TRANSCODE_ENCODE;
--	if(t2p->pdf_nopassthrough==0){
-+        /* It seems that T2P_TRANSCODE_RAW mode doesn't support separate->contig */
-+        /* conversion. At least t2p_read_tiff_size and t2p_read_tiff_size_tile */
-+        /* do not take into account the number of samples, and thus */
-+        /* that can cause heap buffer overflows such as in */
-+        /* http://bugzilla.maptools.org/show_bug.cgi?id=2715 */
-+	if(t2p->pdf_nopassthrough==0 && t2p->tiff_planar!=PLANARCONFIG_SEPARATE){
- #ifdef CCITT_SUPPORT
- 		if(t2p->tiff_compression==COMPRESSION_CCITTFAX4  
- 			){
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13726.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13726.patch
deleted file mode 100644
index c60ffa6..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13726.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 5317ce215936ce611846557bb104b49d3b4c8345 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Wed, 23 Aug 2017 13:21:41 +0000
-Subject: [PATCH] * libtiff/tif_dirwrite.c: replace assertion related to not
- finding the SubIFD tag by runtime check. Fixes
- http://bugzilla.maptools.org/show_bug.cgi?id=2727 Reported by team OWL337
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/f91ca83a21a6a583050e5a5755ce1441b2bf1d7e]
-
-CVE: CVE-2017-13726
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog              | 7 +++++++
- libtiff/tif_dirwrite.c | 7 ++++++-
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 6980da8..3e299d9 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-08-23  Even Rouault <even.rouault at spatialys.com>
-+
-+	* libtiff/tif_dirwrite.c: replace assertion related to not finding the
-+	SubIFD tag by runtime check.
-+	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727
-+	Reported by team OWL337
-+
- 2017-07-15  Even Rouault <even.rouault at spatialys.com>
- 
- 	* tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw"
-diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
-index 8d6686b..14090ae 100644
---- a/libtiff/tif_dirwrite.c
-+++ b/libtiff/tif_dirwrite.c
-@@ -821,7 +821,12 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
- 			TIFFDirEntry* nb;
- 			for (na=0, nb=dir; ; na++, nb++)
- 			{
--				assert(na<ndir);
-+				if( na == ndir )
-+                                {
-+                                    TIFFErrorExt(tif->tif_clientdata,module,
-+                                                 "Cannot find SubIFD tag");
-+                                    goto bad;
-+                                }
- 				if (nb->tdir_tag==TIFFTAG_SUBIFD)
- 					break;
- 			}
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13727.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13727.patch
deleted file mode 100644
index e228c2f..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-13727.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From a5e8245cc67646f7b448b4ca29258eaac418102c Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Wed, 23 Aug 2017 13:33:42 +0000
-Subject: [PATCH] * libtiff/tif_dirwrite.c: replace assertion to tag value not
- fitting on uint32 when selecting the value of SubIFD tag by runtime check (in
- TIFFWriteDirectoryTagSubifd()). Fixes
- http://bugzilla.maptools.org/show_bug.cgi?id=2728 Reported by team OWL337
-
-SubIFD tag by runtime check (in TIFFWriteDirectorySec())
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/b6af137bf9ef852f1a48a50a5afb88f9e9da01cc]
-
-CVE: CVE-2017-13727
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog              | 10 +++++++++-
- libtiff/tif_dirwrite.c |  9 ++++++++-
- 2 files changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 3e299d9..8f5efe9 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,7 +1,15 @@
- 2017-08-23  Even Rouault <even.rouault at spatialys.com>
- 
-+	* libtiff/tif_dirwrite.c: replace assertion to tag value not fitting
-+	on uint32 when selecting the value of SubIFD tag by runtime check
-+	(in TIFFWriteDirectoryTagSubifd()).
-+	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2728
-+	Reported by team OWL337
-+
-+2017-08-23  Even Rouault <even.rouault at spatialys.com>
-+
- 	* libtiff/tif_dirwrite.c: replace assertion related to not finding the
--	SubIFD tag by runtime check.
-+	SubIFD tag by runtime check (in TIFFWriteDirectorySec())
- 	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727
- 	Reported by team OWL337
- 
-diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
-index 14090ae..f0a4baa 100644
---- a/libtiff/tif_dirwrite.c
-+++ b/libtiff/tif_dirwrite.c
-@@ -1949,7 +1949,14 @@ TIFFWriteDirectoryTagSubifd(TIFF* tif, uint32* ndir, TIFFDirEntry* dir)
- 		for (p=0; p < tif->tif_dir.td_nsubifd; p++)
- 		{
-                         assert(pa != 0);
--			assert(*pa <= 0xFFFFFFFFUL);
-+
-+                        /* Could happen if an classicTIFF has a SubIFD of type LONG8 (which is illegal) */
-+                        if( *pa > 0xFFFFFFFFUL)
-+                        {
-+                            TIFFErrorExt(tif->tif_clientdata,module,"Illegal value for SubIFD tag");
-+                            _TIFFfree(o);
-+                            return(0);
-+                        }
- 			*pb++=(uint32)(*pa++);
- 		}
- 		n=TIFFWriteDirectoryTagCheckedIfdArray(tif,ndir,dir,TIFFTAG_SUBIFD,tif->tif_dir.td_nsubifd,o);
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch
new file mode 100644
index 0000000..878e0de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch
@@ -0,0 +1,42 @@
+From 293c8b0298e91d20ba51291e2351ab7d110671d0 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sun, 31 Dec 2017 15:09:41 +0100
+Subject: [PATCH] libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer
+ dereference on corrupted file. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2770
+
+Upstream-Status: Backport
+[https://gitlab.com/libtiff/libtiff/commit/c6f41df7b581402dfba3c19a1e3df4454c551a01]
+
+CVE: CVE-2017-18013
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ libtiff/tif_print.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
+index 24d4b98..f494cfb 100644
+--- a/libtiff/tif_print.c
++++ b/libtiff/tif_print.c
+@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ 			fprintf(fd, "    %3lu: [%8I64u, %8I64u]\n",
+ 			    (unsigned long) s,
+-			    (unsigned __int64) td->td_stripoffset[s],
+-			    (unsigned __int64) td->td_stripbytecount[s]);
++			    td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
++			    td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
+ #else
+ 			fprintf(fd, "    %3lu: [%8llu, %8llu]\n",
+ 			    (unsigned long) s,
+-			    (unsigned long long) td->td_stripoffset[s],
+-			    (unsigned long long) td->td_stripbytecount[s]);
++			    td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
++			    td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
+ #endif
+ 	}
+ }
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9147.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9147.patch
deleted file mode 100644
index 3392285..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9147.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From 0acf01fea714af573b814e10cf105c3359a236c3 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Thu, 1 Jun 2017 12:44:04 +0000
-Subject: [PATCH] * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(),
-and use it in TIFFReadDirectory() so as to ignore fields whose tag is a
-codec-specified tag but this codec is not enabled. This avoids TIFFGetField()
-to behave differently depending on whether the codec is enabled or not, and
-thus can avoid stack based buffer overflows in a number of TIFF utilities
-such as tiffsplit, tiffcmp, thumbnail, etc.
-Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch
-(http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog.
-Fixes:
-http://bugzilla.maptools.org/show_bug.cgi?id=2580
-http://bugzilla.maptools.org/show_bug.cgi?id=2693
-http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095)
-http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554)
-http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318)
-http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128)
-http://bugzilla.maptools.org/show_bug.cgi?id=2441
-http://bugzilla.maptools.org/show_bug.cgi?id=2433
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/4d4fa0b68ae9ae038959ee4f69ebe288ec892f06]
-
-CVE: CVE-2017-9147
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog             |  20 ++++++++++
- libtiff/tif_dir.h     |   1 +
- libtiff/tif_dirinfo.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++
- libtiff/tif_dirread.c |   4 ++
- 4 files changed, 128 insertions(+)
-
-diff --git a/ChangeLog b/ChangeLog
-index ee8d9d0..5739292 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,23 @@
-+2017-06-01  Even Rouault <even.rouault at spatialys.com>
-+
-+	* libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(),
-+	and use it in TIFFReadDirectory() so as to ignore fields whose tag is a
-+	codec-specified tag but this codec is not enabled. This avoids TIFFGetField()
-+	to behave differently depending on whether the codec is enabled or not, and
-+	thus can avoid stack based buffer overflows in a number of TIFF utilities
-+	such as tiffsplit, tiffcmp, thumbnail, etc.
-+	Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch
-+	(http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog.
-+	Fixes:
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2580
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2693
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095)
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554)
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318)
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128)
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2441
-+	http://bugzilla.maptools.org/show_bug.cgi?id=2433
-+
- 2017-05-21  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
- 
- 	* configure.ac: libtiff 4.0.8 released.
-diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h
-index e12b44b..5206be4 100644
---- a/libtiff/tif_dir.h
-+++ b/libtiff/tif_dir.h
-@@ -291,6 +291,7 @@ struct _TIFFField {
- extern int _TIFFMergeFields(TIFF*, const TIFFField[], uint32);
- extern const TIFFField* _TIFFFindOrRegisterField(TIFF *, uint32, TIFFDataType);
- extern  TIFFField* _TIFFCreateAnonField(TIFF *, uint32, TIFFDataType);
-+extern int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag);
- 
- #if defined(__cplusplus)
- }
-diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
-index 0c8ef42..97c0df0 100644
---- a/libtiff/tif_dirinfo.c
-+++ b/libtiff/tif_dirinfo.c
-@@ -956,6 +956,109 @@ TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], uint32 n)
- 	return 0;
- }
- 
-+int
-+_TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
-+{
-+	/* Filter out non-codec specific tags */
-+	switch (tag) {
-+	    /* Shared tags */
-+	    case TIFFTAG_PREDICTOR:
-+	    /* JPEG tags */
-+	    case TIFFTAG_JPEGTABLES:
-+	    /* OJPEG tags */
-+	    case TIFFTAG_JPEGIFOFFSET:
-+	    case TIFFTAG_JPEGIFBYTECOUNT:
-+	    case TIFFTAG_JPEGQTABLES:
-+	    case TIFFTAG_JPEGDCTABLES:
-+	    case TIFFTAG_JPEGACTABLES:
-+	    case TIFFTAG_JPEGPROC:
-+	    case TIFFTAG_JPEGRESTARTINTERVAL:
-+	    /* CCITT* */
-+	    case TIFFTAG_BADFAXLINES:
-+	    case TIFFTAG_CLEANFAXDATA:
-+	    case TIFFTAG_CONSECUTIVEBADFAXLINES:
-+	    case TIFFTAG_GROUP3OPTIONS:
-+	    case TIFFTAG_GROUP4OPTIONS:
-+		break;
-+	    default:
-+		return 1;
-+	}
-+	/* Check if codec specific tags are allowed for the current
-+	 * compression scheme (codec) */
-+	switch (tif->tif_dir.td_compression) {
-+	    case COMPRESSION_LZW:
-+		if (tag == TIFFTAG_PREDICTOR)
-+		    return 1;
-+		break;
-+	    case COMPRESSION_PACKBITS:
-+		/* No codec-specific tags */
-+		break;
-+	    case COMPRESSION_THUNDERSCAN:
-+		/* No codec-specific tags */
-+		break;
-+	    case COMPRESSION_NEXT:
-+		/* No codec-specific tags */
-+		break;
-+	    case COMPRESSION_JPEG:
-+		if (tag == TIFFTAG_JPEGTABLES)
-+		    return 1;
-+		break;
-+	    case COMPRESSION_OJPEG:
-+		switch (tag) {
-+		    case TIFFTAG_JPEGIFOFFSET:
-+		    case TIFFTAG_JPEGIFBYTECOUNT:
-+		    case TIFFTAG_JPEGQTABLES:
-+		    case TIFFTAG_JPEGDCTABLES:
-+		    case TIFFTAG_JPEGACTABLES:
-+		    case TIFFTAG_JPEGPROC:
-+		    case TIFFTAG_JPEGRESTARTINTERVAL:
-+			return 1;
-+		}
-+		break;
-+	    case COMPRESSION_CCITTRLE:
-+	    case COMPRESSION_CCITTRLEW:
-+	    case COMPRESSION_CCITTFAX3:
-+	    case COMPRESSION_CCITTFAX4:
-+		switch (tag) {
-+		    case TIFFTAG_BADFAXLINES:
-+		    case TIFFTAG_CLEANFAXDATA:
-+		    case TIFFTAG_CONSECUTIVEBADFAXLINES:
-+			return 1;
-+		    case TIFFTAG_GROUP3OPTIONS:
-+			if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3)
-+			    return 1;
-+			break;
-+		    case TIFFTAG_GROUP4OPTIONS:
-+			if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4)
-+			    return 1;
-+			break;
-+		}
-+		break;
-+	    case COMPRESSION_JBIG:
-+		/* No codec-specific tags */
-+		break;
-+	    case COMPRESSION_DEFLATE:
-+	    case COMPRESSION_ADOBE_DEFLATE:
-+		if (tag == TIFFTAG_PREDICTOR)
-+		    return 1;
-+		break;
-+	   case COMPRESSION_PIXARLOG:
-+		if (tag == TIFFTAG_PREDICTOR)
-+		    return 1;
-+		break;
-+	    case COMPRESSION_SGILOG:
-+	    case COMPRESSION_SGILOG24:
-+		/* No codec-specific tags */
-+		break;
-+	    case COMPRESSION_LZMA:
-+		if (tag == TIFFTAG_PREDICTOR)
-+		    return 1;
-+		break;
-+
-+	}
-+	return 0;
-+}
-+
- /* vim: set ts=8 sts=8 sw=8 noet: */
- 
- /*
-diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
-index 1d4f0b9..f1dc3d7 100644
---- a/libtiff/tif_dirread.c
-+++ b/libtiff/tif_dirread.c
-@@ -3580,6 +3580,10 @@ TIFFReadDirectory(TIFF* tif)
- 							goto bad;
- 						dp->tdir_tag=IGNORE;
- 						break;
-+                                        default:
-+                                            if( !_TIFFCheckFieldIsValidForCodec(tif, dp->tdir_tag) )
-+                                                dp->tdir_tag=IGNORE;
-+                                            break;
- 				}
- 			}
- 		}
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch
new file mode 100644
index 0000000..60684dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch
@@ -0,0 +1,160 @@
+From abb0055d21c52a9925314d5b0628fb2b6307619c Mon Sep 17 00:00:00 2001
+From: Brian May <brian@linuxpenguins.xyz>
+Date: Thu, 7 Dec 2017 07:46:47 +1100
+Subject: [PATCH] tiff2pdf: Fix CVE-2017-9935
+
+Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704
+
+This vulnerability - at least for the supplied test case - is because we
+assume that a tiff will only have one transfer function that is the same
+for all pages. This is not required by the TIFF standards.
+
+We than read the transfer function for every page.  Depending on the
+transfer function, we allocate either 2 or 4 bytes to the XREF buffer.
+We allocate this memory after we read in the transfer function for the
+page.
+
+For the first exploit - POC1, this file has 3 pages. For the first page
+we allocate 2 extra extra XREF entries. Then for the next page 2 more
+entries. Then for the last page the transfer function changes and we
+allocate 4 more entries.
+
+When we read the file into memory, we assume we have 4 bytes extra for
+each and every page (as per the last transfer function we read). Which
+is not correct, we only have 2 bytes extra for the first 2 pages. As a
+result, we end up writing past the end of the buffer.
+
+There are also some related issues that this also fixes. For example,
+TIFFGetField can return uninitalized pointer values, and the logic to
+detect a N=3 vs N=1 transfer function seemed rather strange.
+
+It is also strange that we declare the transfer functions to be of type
+float, when the standard says they are unsigned 16 bit values. This is
+fixed in another patch.
+
+This patch will check to ensure that the N value for every transfer
+function is the same for every page. If this changes, we abort with an
+error. In theory, we should perhaps check that the transfer function
+itself is identical for every page, however we don't do that due to the
+confusion of the type of the data in the transfer function.
+
+Upstream-Status: Backport
+[https://gitlab.com/libtiff/libtiff/commit/3dd8f6a357981a4090f126ab9025056c938b6940]
+
+CVE: CVE-2017-9935
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ libtiff/tif_dir.c |  3 +++
+ tools/tiff2pdf.c  | 65 +++++++++++++++++++++++++++++++++++++------------------
+ 2 files changed, 47 insertions(+), 21 deletions(-)
+
+diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c
+index f00f808..c36a5f3 100644
+--- a/libtiff/tif_dir.c
++++ b/libtiff/tif_dir.c
+@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
+ 			if (td->td_samplesperpixel - td->td_extrasamples > 1) {
+ 				*va_arg(ap, uint16**) = td->td_transferfunction[1];
+ 				*va_arg(ap, uint16**) = td->td_transferfunction[2];
++			} else {
++				*va_arg(ap, uint16**) = NULL;
++				*va_arg(ap, uint16**) = NULL;
+ 			}
+ 			break;
+ 		case TIFFTAG_REFERENCEBLACKWHITE:
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 454befb..0b5973e 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -1047,6 +1047,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ 	uint16 pagen=0;
+ 	uint16 paged=0;
+ 	uint16 xuint16=0;
++	uint16 tiff_transferfunctioncount=0;
++	float* tiff_transferfunction[3];
+ 
+ 	directorycount=TIFFNumberOfDirectories(input);
+ 	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
+@@ -1147,26 +1149,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+                 }
+ #endif
+ 		if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION,
+-                                 &(t2p->tiff_transferfunction[0]),
+-                                 &(t2p->tiff_transferfunction[1]),
+-                                 &(t2p->tiff_transferfunction[2]))) {
+-			if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+-                           (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+-                           (t2p->tiff_transferfunction[1] !=
+-                            t2p->tiff_transferfunction[0])) {
+-				t2p->tiff_transferfunctioncount = 3;
+-				t2p->tiff_pages[i].page_extra += 4;
+-				t2p->pdf_xrefcount += 4;
+-			} else {
+-				t2p->tiff_transferfunctioncount = 1;
+-				t2p->tiff_pages[i].page_extra += 2;
+-				t2p->pdf_xrefcount += 2;
+-			}
+-			if(t2p->pdf_minorversion < 2)
+-				t2p->pdf_minorversion = 2;
++                                 &(tiff_transferfunction[0]),
++                                 &(tiff_transferfunction[1]),
++                                 &(tiff_transferfunction[2]))) {
++
++                        if((tiff_transferfunction[1] != (float*) NULL) &&
++                           (tiff_transferfunction[2] != (float*) NULL)
++                          ) {
++                            tiff_transferfunctioncount=3;
++                        } else {
++                            tiff_transferfunctioncount=1;
++                        }
+                 } else {
+-			t2p->tiff_transferfunctioncount=0;
++			tiff_transferfunctioncount=0;
+ 		}
++
++                if (i > 0){
++                    if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){
++                        TIFFError(
++                            TIFF2PDF_MODULE,
++                            "Different transfer function on page %d",
++                            i);
++                        t2p->t2p_error = T2P_ERR_ERROR;
++                        return;
++                    }
++                }
++
++                t2p->tiff_transferfunctioncount = tiff_transferfunctioncount;
++                t2p->tiff_transferfunction[0] = tiff_transferfunction[0];
++                t2p->tiff_transferfunction[1] = tiff_transferfunction[1];
++                t2p->tiff_transferfunction[2] = tiff_transferfunction[2];
++                if(tiff_transferfunctioncount == 3){
++                        t2p->tiff_pages[i].page_extra += 4;
++                        t2p->pdf_xrefcount += 4;
++                        if(t2p->pdf_minorversion < 2)
++                                t2p->pdf_minorversion = 2;
++                } else if (tiff_transferfunctioncount == 1){
++                        t2p->tiff_pages[i].page_extra += 2;
++                        t2p->pdf_xrefcount += 2;
++                        if(t2p->pdf_minorversion < 2)
++                                t2p->pdf_minorversion = 2;
++                }
++
+ 		if( TIFFGetField(
+ 			input, 
+ 			TIFFTAG_ICCPROFILE, 
+@@ -1828,9 +1852,8 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
+ 			 &(t2p->tiff_transferfunction[1]),
+ 			 &(t2p->tiff_transferfunction[2]))) {
+ 		if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+-                   (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+-                   (t2p->tiff_transferfunction[1] !=
+-                    t2p->tiff_transferfunction[0])) {
++                   (t2p->tiff_transferfunction[2] != (float*) NULL)
++                  ) {
+ 			t2p->tiff_transferfunctioncount=3;
+ 		} else {
+ 			t2p->tiff_transferfunctioncount=1;
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9936.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9936.patch
deleted file mode 100644
index fc99363..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9936.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 62efea76592647426deec5592fd7274d5c950646 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 26 Jun 2017 15:19:59 +0000
-Subject: [PATCH] * libtiff/tif_jbig.c: fix memory leak in error code path of
- JBIGDecode() Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706 Reported
- by team OWL337
-
-* libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg
-
-Upstream-Status: Backport
-[https://github.com/vadz/libtiff/commit/fe8d7165956b88df4837034a9161dc5fd20cf67a]
-
-CVE: CVE-2017-9936
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- ChangeLog          | 6 ++++++
- libtiff/tif_jbig.c | 1 +
- 2 files changed, 7 insertions(+)
-
-diff --git a/ChangeLog b/ChangeLog
-index 5739292..0240f0b 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-06-26  Even Rouault <even.rouault at spatialys.com>
-+
-+	* libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode()
-+	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706
-+	Reported by team OWL337
-+
- 2017-06-01  Even Rouault <even.rouault at spatialys.com>
- 
- 	* libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(),
-diff --git a/libtiff/tif_jbig.c b/libtiff/tif_jbig.c
-index 5f5f75e..c75f31d 100644
---- a/libtiff/tif_jbig.c
-+++ b/libtiff/tif_jbig.c
-@@ -94,6 +94,7 @@ static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s)
- 			     jbg_strerror(decodeStatus)
- #endif
- 			     );
-+		jbg_dec_free(&decoder);
- 		return 0;
- 	}
- 
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch
new file mode 100644
index 0000000..406001d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch
@@ -0,0 +1,135 @@
+From 6cdea15213be6b67d9f8380c7bb40e325d3adace Mon Sep 17 00:00:00 2001
+From: Nathan Baker <nathanb@lenovo-chrome.com>
+Date: Tue, 6 Feb 2018 10:13:57 -0500
+Subject: [PATCH] Fix for bug 2772
+
+It is possible to craft a TIFF document where the IFD list is circular,
+leading to an infinite loop while traversing the chain. The libtiff
+directory reader has a failsafe that will break out of this loop after
+reading 65535 directory entries, but it will continue processing,
+consuming time and resources to process what is essentially a bogus TIFF
+document.
+
+This change fixes the above behavior by breaking out of processing when
+a TIFF document has >= 65535 directories and terminating with an error.
+
+Upstream-Status: Backport
+[https://gitlab.com/libtiff/libtiff/commit/473851d211cf8805a161820337ca74cc9615d6ef]
+
+CVE: CVE-2018-5784
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ contrib/addtiffo/tif_overview.c | 14 +++++++++++++-
+ tools/tiff2pdf.c                | 10 ++++++++++
+ tools/tiffcrop.c                | 13 +++++++++++--
+ 3 files changed, 34 insertions(+), 3 deletions(-)
+
+diff --git a/contrib/addtiffo/tif_overview.c b/contrib/addtiffo/tif_overview.c
+index c61ffbb..03b3573 100644
+--- a/contrib/addtiffo/tif_overview.c
++++ b/contrib/addtiffo/tif_overview.c
+@@ -65,6 +65,8 @@
+ #  define MAX(a,b)      ((a>b) ? a : b)
+ #endif
+ 
++#define TIFF_DIR_MAX  65534
++
+ void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
+                          int (*)(double,void*), void * );
+ 
+@@ -91,6 +93,7 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+ {
+     toff_t	nBaseDirOffset;
+     toff_t	nOffset;
++    tdir_t	iNumDir;
+ 
+     (void) bUseSubIFDs;
+ 
+@@ -147,7 +150,16 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+         return 0;
+ 
+     TIFFWriteDirectory( hTIFF );
+-    TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) );
++    iNumDir = TIFFNumberOfDirectories(hTIFF);
++    if( iNumDir > TIFF_DIR_MAX )
++    {
++        TIFFErrorExt( TIFFClientdata(hTIFF),
++                      "TIFF_WriteOverview",
++                      "File `%s' has too many directories.\n",
++                      TIFFFileName(hTIFF) );
++        exit(-1);
++    }
++    TIFFSetDirectory( hTIFF, (tdir_t) (iNumDir - 1) );
+ 
+     nOffset = TIFFCurrentDirOffset( hTIFF );
+ 
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 0b5973e..ef5d6a0 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -68,6 +68,8 @@ extern int getopt(int, char**, char*);
+ 
+ #define PS_UNIT_SIZE	72.0F
+ 
++#define TIFF_DIR_MAX    65534
++
+ /* This type is of PDF color spaces. */
+ typedef enum {
+ 	T2P_CS_BILEVEL = 0x01,	/* Bilevel, black and white */
+@@ -1051,6 +1053,14 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ 	float* tiff_transferfunction[3];
+ 
+ 	directorycount=TIFFNumberOfDirectories(input);
++	if(directorycount > TIFF_DIR_MAX) {
++		TIFFError(
++			TIFF2PDF_MODULE,
++			"TIFF contains too many directories, %s",
++			TIFFFileName(input));
++		t2p->t2p_error = T2P_ERR_ERROR;
++		return;
++	}
+ 	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
+ 	if(t2p->tiff_pages==NULL){
+ 		TIFFError(
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index c69177e..c60cb38 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -217,6 +217,8 @@ extern int getopt(int argc, char * const argv[], const char *optstring);
+ #define DUMP_TEXT   1
+ #define DUMP_RAW    2
+ 
++#define TIFF_DIR_MAX  65534
++
+ /* Offsets into buffer for margins and fixed width and length segments */
+ struct offset {
+   uint32  tmargin;
+@@ -2233,7 +2235,7 @@ main(int argc, char* argv[])
+     pageNum = -1;
+   else
+     total_images = 0;
+-  /* read multiple input files and write to output file(s) */
++  /* Read multiple input files and write to output file(s) */
+   while (optind < argc - 1)
+     {
+     in = TIFFOpen (argv[optind], "r");
+@@ -2241,7 +2243,14 @@ main(int argc, char* argv[])
+       return (-3);
+ 
+     /* If only one input file is specified, we can use directory count */
+-    total_images = TIFFNumberOfDirectories(in); 
++    total_images = TIFFNumberOfDirectories(in);
++    if (total_images > TIFF_DIR_MAX)
++      {
++      TIFFError (TIFFFileName(in), "File contains too many directories");
++      if (out != NULL)
++        (void) TIFFClose(out);
++      return (1);
++      }
+     if (image_count == 0)
+       {
+       dirnum = 0;
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
index 457202e..a84c688 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
@@ -4,13 +4,13 @@
  configure.ac |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: tiff-3.9.5/configure.ac
+Index: tiff-4.0.9/configure.ac
 ===================================================================
---- tiff-3.9.5.orig/configure.ac
-+++ tiff-3.9.5/configure.ac
+--- tiff-4.0.9.orig/configure.ac
++++ tiff-4.0.9/configure.ac
 @@ -27,7 +27,7 @@ dnl Process this file with autoconf to p
  AC_PREREQ(2.64)
- AC_INIT([LibTIFF Software],[3.9.5],[tiff@lists.maptools.org],[tiff])
+ AC_INIT([LibTIFF Software],[4.0.9],[tiff@lists.maptools.org],[tiff])
  AC_CONFIG_AUX_DIR(config)
 -AC_CONFIG_MACRO_DIR(m4)
 +dnl AC_CONFIG_MACRO_DIR(m4)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb
deleted file mode 100644
index ebee6f8..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
-
-CVE_PRODUCT = "libtiff"
-
-SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
-           file://libtool2.patch \
-           file://CVE-2017-9147.patch \
-           file://CVE-2017-9936.patch \
-           file://CVE-2017-10688.patch \
-           file://CVE-2017-11335.patch \
-           file://CVE-2017-13726.patch \
-           file://CVE-2017-13727.patch \
-          "
-
-SRC_URI[md5sum] = "2a7d1c1318416ddf36d5f6fa4600069b"
-SRC_URI[sha256sum] = "59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910"
-
-# exclude betas
-UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
-
-inherit autotools multilib_header
-
-CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
-
-PACKAGECONFIG ?= "cxx jpeg zlib lzma \
-                  strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
-
-PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
-
-# Convert single-strip uncompressed images to multiple strips of specified
-# size (default: 8192) to reduce memory usage
-PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
-
-# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
-PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
-
-# Control picking up YCbCr subsample info. Disable to support files lacking
-# the tag
-PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
-
-# Support a mechanism allowing reading large strips (usually one strip files)
-# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
-PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
-
-PACKAGES =+ "tiffxx tiff-utils"
-FILES_tiffxx = "${libdir}/libtiffxx.so.*"
-FILES_tiff-utils = "${bindir}/*"
-
-do_install_append() {
-    oe_multilib_header tiffconf.h
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb
new file mode 100644
index 0000000..8c3bba5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
+
+CVE_PRODUCT = "libtiff"
+
+SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
+           file://libtool2.patch \
+           file://CVE-2017-9935.patch \
+           file://CVE-2017-18013.patch \
+           file://CVE-2018-5784.patch \
+          "
+
+SRC_URI[md5sum] = "54bad211279cc93eb4fca31ba9bfdc79"
+SRC_URI[sha256sum] = "6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd"
+
+# exclude betas
+UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
+
+inherit autotools multilib_header
+
+CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
+
+PACKAGECONFIG ?= "cxx jpeg zlib lzma \
+                  strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
+
+# Convert single-strip uncompressed images to multiple strips of specified
+# size (default: 8192) to reduce memory usage
+PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
+
+# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
+PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
+
+# Control picking up YCbCr subsample info. Disable to support files lacking
+# the tag
+PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
+
+# Support a mechanism allowing reading large strips (usually one strip files)
+# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
+PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
+
+PACKAGES =+ "tiffxx tiff-utils"
+FILES_tiffxx = "${libdir}/libtiffxx.so.*"
+FILES_tiff-utils = "${bindir}/*"
+
+do_install_append() {
+    oe_multilib_header tiffconf.h
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14632.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14632.patch
new file mode 100644
index 0000000..4036b96
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14632.patch
@@ -0,0 +1,62 @@
+From 39704ce16835e5c019bb03f6a94dc1f0677406c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Wed, 15 Nov 2017 18:22:59 +0100
+Subject: [PATCH] CVE-2017-14632: vorbis_analysis_header_out: Don't clear opb
+ if not initialized
+
+If the number of channels is not within the allowed range
+we call oggback_writeclear altough it's not initialized yet.
+
+This fixes
+
+    =23371== Invalid free() / delete / delete[] / realloc()
+    ==23371==    at 0x4C2CE1B: free (vg_replace_malloc.c:530)
+    ==23371==    by 0x829CA31: oggpack_writeclear (in /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2)
+    ==23371==    by 0x84B96EE: vorbis_analysis_headerout (info.c:652)
+    ==23371==    by 0x9FBCBCC: ??? (in /usr/lib/x86_64-linux-gnu/sox/libsox_fmt_vorbis.so)
+    ==23371==    by 0x4E524F1: ??? (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+    ==23371==    by 0x4E52CCA: sox_open_write (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+    ==23371==    by 0x10D82A: open_output_file (sox.c:1556)
+    ==23371==    by 0x10D82A: process (sox.c:1753)
+    ==23371==    by 0x10D82A: main (sox.c:3012)
+    ==23371==  Address 0x68768c8 is 488 bytes inside a block of size 880 alloc'd
+    ==23371==    at 0x4C2BB1F: malloc (vg_replace_malloc.c:298)
+    ==23371==    by 0x4C2DE9F: realloc (vg_replace_malloc.c:785)
+    ==23371==    by 0x4E545C2: lsx_realloc (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+    ==23371==    by 0x9FBC9A0: ??? (in /usr/lib/x86_64-linux-gnu/sox/libsox_fmt_vorbis.so)
+    ==23371==    by 0x4E524F1: ??? (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+    ==23371==    by 0x4E52CCA: sox_open_write (in /usr/lib/x86_64-linux-gnu/libsox.so.2.0.1)
+    ==23371==    by 0x10D82A: open_output_file (sox.c:1556)
+    ==23371==    by 0x10D82A: process (sox.c:1753)
+    ==23371==    by 0x10D82A: main (sox.c:3012)
+
+as seen when using the testcase from CVE-2017-11333 with
+008d23b782be09c8d75ba8190b1794abd66c7121 applied. However the error was
+there before.
+
+Upstream-Status: Backport
+CVE: CVE-2017-14632
+
+Reference to upstream patch:
+https://git.xiph.org/?p=vorbis.git;a=commitdiff;h=c1c2831fc7306d5fbd7bc800324efd12b28d327f
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ lib/info.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/info.c b/lib/info.c
+index 81b7557..4d82568 100644
+--- a/lib/info.c
++++ b/lib/info.c
+@@ -584,6 +584,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
+   private_state *b=v->backend_state;
+ 
+   if(!b||vi->channels<=0||vi->channels>256){
++    b = NULL;
+     ret=OV_EFAULT;
+     goto err_out;
+   }
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14633.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14633.patch
new file mode 100644
index 0000000..9c9e688
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2017-14633.patch
@@ -0,0 +1,42 @@
+From 07eda55f336e5c44dfc0e4a1e21628faed7255fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Tue, 31 Oct 2017 18:32:46 +0100
+Subject: [PATCH] CVE-2017-14633: Don't allow for more than 256 channels
+
+Otherwise
+
+ for(i=0;i<vi->channels;i++){
+      /* the encoder setup assumes that all the modes used by any
+         specific bitrate tweaking use the same floor */
+      int submap=info->chmuxlist[i];
+
+overreads later in mapping0_forward since chmuxlist is a fixed array of
+256 elements max.
+
+Upstream-Status: Backport
+CVE: CVE-2017-14633
+
+Reference to upstream patch:
+https://git.xiph.org/?p=vorbis.git;a=commitdiff;h=667ceb4aab60c1f74060143bb24e5f427b3cce5f
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ lib/info.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/info.c b/lib/info.c
+index e447a0c..81b7557 100644
+--- a/lib/info.c
++++ b/lib/info.c
+@@ -583,7 +583,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
+   oggpack_buffer opb;
+   private_state *b=v->backend_state;
+ 
+-  if(!b||vi->channels<=0){
++  if(!b||vi->channels<=0||vi->channels>256){
+     ret=OV_EFAULT;
+     goto err_out;
+   }
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-5146.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-5146.patch
new file mode 100644
index 0000000..6d4052a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis/CVE-2018-5146.patch
@@ -0,0 +1,100 @@
+From 3a017f591457bf6e80231b563bf83ee583fdbca8 Mon Sep 17 00:00:00 2001
+From: Thomas Daede <daede003@umn.edu>
+Date: Thu, 15 Mar 2018 14:15:31 -0700
+Subject: [PATCH] CVE-2018-5146: Prevent out-of-bounds write in codebook
+ decoding.
+
+Codebooks that are not an exact divisor of the partition size are now
+truncated to fit within the partition.
+
+Upstream-Status: Backport
+CVE: CVE-2018-5146
+
+Reference to upstream patch:
+https://git.xiph.org/?p=vorbis.git;a=commitdiff;h=667ceb4aab60c1f74060143bb24e5f427b3cce5f
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ lib/codebook.c | 48 ++++++++++--------------------------------------
+ 1 file changed, 10 insertions(+), 38 deletions(-)
+
+diff --git a/lib/codebook.c b/lib/codebook.c
+index 8b766e8..7022fd2 100644
+--- a/lib/codebook.c
++++ b/lib/codebook.c
+@@ -387,7 +387,7 @@ long vorbis_book_decodevs_add(codebook *book,float *a,oggpack_buffer *b,int n){
+       t[i] = book->valuelist+entry[i]*book->dim;
+     }
+     for(i=0,o=0;i<book->dim;i++,o+=step)
+-      for (j=0;j<step;j++)
++      for (j=0;o+j<n && j<step;j++)
+         a[o+j]+=t[j][i];
+   }
+   return(0);
+@@ -399,41 +399,12 @@ long vorbis_book_decodev_add(codebook *book,float *a,oggpack_buffer *b,int n){
+     int i,j,entry;
+     float *t;
+ 
+-    if(book->dim>8){
+-      for(i=0;i<n;){
+-        entry = decode_packed_entry_number(book,b);
+-        if(entry==-1)return(-1);
+-        t     = book->valuelist+entry*book->dim;
+-        for (j=0;j<book->dim;)
+-          a[i++]+=t[j++];
+-      }
+-    }else{
+-      for(i=0;i<n;){
+-        entry = decode_packed_entry_number(book,b);
+-        if(entry==-1)return(-1);
+-        t     = book->valuelist+entry*book->dim;
+-        j=0;
+-        switch((int)book->dim){
+-        case 8:
+-          a[i++]+=t[j++];
+-        case 7:
+-          a[i++]+=t[j++];
+-        case 6:
+-          a[i++]+=t[j++];
+-        case 5:
+-          a[i++]+=t[j++];
+-        case 4:
+-          a[i++]+=t[j++];
+-        case 3:
+-          a[i++]+=t[j++];
+-        case 2:
+-          a[i++]+=t[j++];
+-        case 1:
+-          a[i++]+=t[j++];
+-        case 0:
+-          break;
+-        }
+-      }
++    for(i=0;i<n;){
++      entry = decode_packed_entry_number(book,b);
++      if(entry==-1)return(-1);
++      t     = book->valuelist+entry*book->dim;
++      for(j=0;i<n && j<book->dim;)
++        a[i++]+=t[j++];
+     }
+   }
+   return(0);
+@@ -471,12 +442,13 @@ long vorbis_book_decodevv_add(codebook *book,float **a,long offset,int ch,
+   long i,j,entry;
+   int chptr=0;
+   if(book->used_entries>0){
+-    for(i=offset/ch;i<(offset+n)/ch;){
++    int m=(offset+n)/ch;
++    for(i=offset/ch;i<m;){
+       entry = decode_packed_entry_number(book,b);
+       if(entry==-1)return(-1);
+       {
+         const float *t = book->valuelist+entry*book->dim;
+-        for (j=0;j<book->dim;j++){
++        for (j=0;i<m && j<book->dim;j++){
+           a[chptr++][i]+=t[j];
+           if(chptr==ch){
+             chptr=0;
+-- 
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
index 56c5b0a..20f887c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
@@ -12,6 +12,9 @@
 
 SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \
            file://0001-configure-Check-for-clang.patch \
+           file://CVE-2017-14633.patch \
+           file://CVE-2017-14632.patch \
+           file://CVE-2018-5146.patch \
           "
 SRC_URI[md5sum] = "28cb28097c07a735d6af56e598e1c90f"
 SRC_URI[sha256sum] = "54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb
new file mode 100644
index 0000000..929069a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
+DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
+mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
+and also can write the decoded audio to WAV."
+HOMEPAGE = "http://mpg123.de/"
+BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
+
+SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
+SRC_URI[md5sum] = "ea32caa61d41d8be797f0b04a1b43ad9"
+SRC_URI[sha256sum] = "6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023"
+
+inherit autotools pkgconfig
+
+# The options should be mutually exclusive for configuration script.
+# If both alsa and pulseaudio are specified (as in the default distro features)
+# pulseaudio takes precedence.
+PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
+
+PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
+PACKAGECONFIG[esd] = ",,esound"
+PACKAGECONFIG[jack] = ",,jack"
+PACKAGECONFIG[openal] = ",,openal-soft"
+PACKAGECONFIG[portaudio] = ",,portaudio-v19"
+PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
+PACKAGECONFIG[sdl] = ",,libsdl"
+
+# Following are possible sound output modules:
+# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
+AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
+
+EXTRA_OECONF = " \
+    --enable-shared \
+    --with-audio='${AUDIOMODS}' \
+    ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
+    ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
+"
+# Fails to build with thumb-1 (qemuarm)
+#| {standard input}: Assembler messages:
+#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
+#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
+#...
+#| make[3]: *** [equalizer.lo] Error 1
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.6.bb b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.6.bb
deleted file mode 100644
index cb86199..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.25.6.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
-DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
-mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
-and also can write the decoded audio to WAV."
-HOMEPAGE = "http://mpg123.de/"
-BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
-SECTION = "multimedia"
-
-LICENSE = "LGPLv2.1"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
-
-SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "43336bef78f67c2e66c4f6c288ca1eb3"
-SRC_URI[sha256sum] = "0f0458c9b87799bc2c9bf9455279cc4d305e245db43b51a39ef27afe025c5a8e"
-
-inherit autotools pkgconfig
-
-# The options should be mutually exclusive for configuration script.
-# If both alsa and pulseaudio are specified (as in the default distro features)
-# pulseaudio takes precedence.
-PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
-
-PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
-PACKAGECONFIG[esd] = ",,esound"
-PACKAGECONFIG[jack] = ",,jack"
-PACKAGECONFIG[openal] = ",,openal-soft"
-PACKAGECONFIG[portaudio] = ",,portaudio-v19"
-PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
-PACKAGECONFIG[sdl] = ",,libsdl"
-
-# Following are possible sound output modules:
-# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
-AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
-AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
-
-EXTRA_OECONF = " \
-    --enable-shared \
-    --with-audio='${AUDIOMODS}' \
-    ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
-    ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
-"
-# Fails to build with thumb-1 (qemuarm)
-#| {standard input}: Assembler messages:
-#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
-#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
-#...
-#| make[3]: *** [equalizer.lo] Error 1
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index fdbf5ab..8189a56 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -160,7 +160,7 @@
 }
 
 USERADD_PACKAGES = "pulseaudio-server"
-GROUPADD_PARAM_pulseaudio-server = "pulse"
+GROUPADD_PARAM_pulseaudio-server = "--system pulse"
 USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \
                               --no-create-home --shell /bin/false \
                               --groups audio,pulse --gid pulse pulse"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch
new file mode 100644
index 0000000..0391f37
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch
@@ -0,0 +1,66 @@
+From 0cb66c0c5aafd48b63a755860746e70afb332c8d Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Wed, 24 Jan 2018 03:51:49 +0200
+Subject: [PATCH] memfd-wrappers: only define memfd_create() if not already
+ defined
+
+glibc 2.27 is to be released soon, and it will provide memfd_create().
+If glibc provides the function, we must not define it ourselves,
+otherwise building fails due to conflict between the two implementations
+of the same function.
+
+BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104733
+---
+Upstream-Status: Submitted [https://bugs.freedesktop.org/attachment.cgi?id=136927]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ configure.ac                   | 3 +++
+ src/pulsecore/memfd-wrappers.h | 7 ++++---
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 77b5ff5..3a71fd8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -607,6 +607,9 @@ AS_IF([test "x$enable_memfd" = "xyes" && test "x$HAVE_MEMFD" = "x0"],
+     [AC_MSG_ERROR([*** Your Linux kernel does not support memfd shared memory.
+                   *** Use linux v3.17 or higher for such a feature.])])
+ 
++AS_IF([test "x$HAVE_MEMFD" = "x1"],
++    AC_CHECK_FUNCS([memfd_create]))
++
+ AC_SUBST(HAVE_MEMFD)
+ AM_CONDITIONAL([HAVE_MEMFD], [test "x$HAVE_MEMFD" = x1])
+ AS_IF([test "x$HAVE_MEMFD" = "x1"], AC_DEFINE([HAVE_MEMFD], 1, [Have memfd shared memory.]))
+diff --git a/src/pulsecore/memfd-wrappers.h b/src/pulsecore/memfd-wrappers.h
+index 3bed9b2..c7aadfd 100644
+--- a/src/pulsecore/memfd-wrappers.h
++++ b/src/pulsecore/memfd-wrappers.h
+@@ -20,13 +20,14 @@
+   License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
+-#ifdef HAVE_MEMFD
++#if defined(HAVE_MEMFD) && !defined(HAVE_MEMFD_CREATE)
+ 
+ #include <sys/syscall.h>
+ #include <fcntl.h>
+ 
+ /*
+- * No glibc wrappers exist for memfd_create(2), so provide our own.
++ * Before glibc version 2.27 there was no wrapper for memfd_create(2),
++ * so we have to provide our own.
+  *
+  * Also define memfd fcntl sealing macros. While they are already
+  * defined in the kernel header file <linux/fcntl.h>, that file as
+@@ -63,6 +64,6 @@ static inline int memfd_create(const char *name, unsigned int flags) {
+ #define F_SEAL_WRITE    0x0008  /* prevent writes */
+ #endif
+ 
+-#endif /* HAVE_MEMFD */
++#endif /* HAVE_MEMFD && !HAVE_MEMFD_CREATE */
+ 
+ #endif
+-- 
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch
deleted file mode 100644
index 11b56ab..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From patchwork Sat Feb  4 12:19:01 2017
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [pulseaudio-discuss] iochannel: don't use variable length array in
- union
-From: Tanu Kaskinen <tanuk@iki.fi>
-X-Patchwork-Id: 136885
-Message-Id: <20170204121901.17428-1-tanuk@iki.fi>
-To: pulseaudio-discuss@lists.freedesktop.org
-Date: Sat,  4 Feb 2017 14:19:01 +0200
-
-Clang didn't like the variable length array:
-
-pulsecore/iochannel.c:358:17: error: fields must have a constant size:
-'variable length array in structure' extension will never be supported
-        uint8_t data[CMSG_SPACE(sizeof(int) * nfd)];
-                ^
-
-Commit 451d1d6762 introduced the variable length array in order to have
-the correct value in msg_controllen. This patch reverts that commit and
-uses a different way to achieve the same goal.
-
-BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=99458
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- src/pulsecore/iochannel.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
-index 8ace297ff..897337522 100644
---- a/src/pulsecore/iochannel.c
-+++ b/src/pulsecore/iochannel.c
-@@ -355,7 +355,7 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
-     struct iovec iov;
-     union {
-         struct cmsghdr hdr;
--        uint8_t data[CMSG_SPACE(sizeof(int) * nfd)];
-+        uint8_t data[CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)];
-     } cmsg;
- 
-     pa_assert(io);
-@@ -382,7 +382,13 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
-     mh.msg_iov = &iov;
-     mh.msg_iovlen = 1;
-     mh.msg_control = &cmsg;
--    mh.msg_controllen = sizeof(cmsg);
-+
-+    /* If we followed the example on the cmsg man page, we'd use
-+     * sizeof(cmsg.data) here, but if nfd < MAX_ANCIL_DATA_FDS, then the data
-+     * buffer is larger than needed, and the kernel doesn't like it if we set
-+     * msg_controllen to a larger than necessary value. The commit message for
-+     * commit 451d1d6762 contains a longer explanation. */
-+    mh.msg_controllen = CMSG_SPACE(sizeof(int) * nfd);
- 
-     if ((r = sendmsg(io->ofd, &mh, MSG_NOSIGNAL)) >= 0) {
-         io->writable = io->hungup = false;
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb
deleted file mode 100644
index 9a34afa..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require pulseaudio.inc
-
-SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
-           file://0001-padsp-Make-it-compile-on-musl.patch \
-           file://0001-client-conf-Add-allow-autospawn-for-root.patch \
-           file://pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch \
-           file://volatiles.04_pulse \
-"
-SRC_URI[md5sum] = "4950d2799bf55ab91f6b7f990b7f0971"
-SRC_URI[sha256sum] = "a3186824de9f0d2095ded5d0d0db0405dc73133983c2fbb37291547e37462f57"
-
-do_compile_prepend() {
-    mkdir -p ${S}/libltdl
-    cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb
new file mode 100644
index 0000000..245302d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb
@@ -0,0 +1,15 @@
+require pulseaudio.inc
+
+SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
+           file://0001-padsp-Make-it-compile-on-musl.patch \
+           file://0001-client-conf-Add-allow-autospawn-for-root.patch \
+           file://volatiles.04_pulse \
+           file://0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch \
+           "
+SRC_URI[md5sum] = "390de38231d5cdd6b43ada8939eb74f1"
+SRC_URI[sha256sum] = "f2521c525a77166189e3cb9169f75c2ee2b82fa3fcf9476024fbc2c3a6c9cd9e"
+
+do_compile_prepend() {
+    mkdir -p ${S}/libltdl
+    cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.0.bb
deleted file mode 100644
index bc565e9..0000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.0.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "WebP is an image format designed for the Web"
-DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
-               used on a large variety of photographic, translucent and \
-               graphical images found on the web. The degree of lossy \
-               compression is adjustable so a user can choose the trade-off \
-               between file size and image quality. WebP typically achieves \
-               an average of 30% more compression than JPEG and JPEG 2000, \
-               without loss of image quality."
-HOMEPAGE = "https://developers.google.com/speed/webp/"
-SECTION = "libs"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
-                    file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
-
-SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
-SRC_URI[md5sum] = "19a6e926ab1721268df03161b84bb4a0"
-SRC_URI[sha256sum] = "c928119229d4f8f35e20113ffb61f281eda267634a8dc2285af4b0ee27cf2b40"
-
-UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
-
-EXTRA_OECONF = " \
-    --disable-experimental \
-    --disable-wic \
-    --enable-libwebpmux \
-    --enable-libwebpdemux \
-    --enable-threading \
-"
-# Do not trust configure to determine if neon is available.
-#
-EXTRA_OECONF_append_arm = " \
-    ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
-"
-
-inherit autotools lib_package
-
-PACKAGECONFIG ??= ""
-
-# libwebpdecoder is a subset of libwebp, don't build it unless requested
-PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
-
-# Apply for examples programs: cwebp and dwebp
-PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
-PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
-
-# Apply only for example program vwebp
-PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
-
-PACKAGES =+ "${PN}-gif2webp"
-
-DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
-FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.1.bb
new file mode 100644
index 0000000..e9d4d78
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.6.1.bb
@@ -0,0 +1,54 @@
+SUMMARY = "WebP is an image format designed for the Web"
+DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
+               used on a large variety of photographic, translucent and \
+               graphical images found on the web. The degree of lossy \
+               compression is adjustable so a user can choose the trade-off \
+               between file size and image quality. WebP typically achieves \
+               an average of 30% more compression than JPEG and JPEG 2000, \
+               without loss of image quality."
+HOMEPAGE = "https://developers.google.com/speed/webp/"
+SECTION = "libs"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
+                    file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
+
+SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
+SRC_URI[md5sum] = "b49ce9c3e3e9acae4d91bca44bb85a72"
+SRC_URI[sha256sum] = "06503c782d9f151baa325591c3579c68ed700ffc62d4f5a32feead0ff017d8ab"
+
+UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
+
+EXTRA_OECONF = " \
+    --disable-experimental \
+    --disable-wic \
+    --enable-libwebpmux \
+    --enable-libwebpdemux \
+    --enable-threading \
+"
+# Do not trust configure to determine if neon is available.
+#
+EXTRA_OECONF_append_arm = " \
+    ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
+"
+
+inherit autotools lib_package
+
+PACKAGECONFIG ??= ""
+
+# libwebpdecoder is a subset of libwebp, don't build it unless requested
+PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
+
+# Apply for examples programs: cwebp and dwebp
+PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+
+# Apply only for example program vwebp
+PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
+
+PACKAGES =+ "${PN}-gif2webp"
+
+DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
+FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
index 73f2aac..065e3b3 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
@@ -1,20 +1,33 @@
--march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8
--mfpu=neon.
+From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Fri, 2 Feb 2018 15:10:08 +0200
+Subject: [PATCH] dont default to cortex-a9 with neon
+
+-march flag is not in CFLAGS so this will always default to
+ -mcpu=cortex-a8 -mfpu=neon.
 
 Upstream-Status: Pending
+
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure | 3 ---
+ 1 file changed, 3 deletions(-)
 
 diff --git a/configure b/configure
-index 9d1586c..3109ec4 100755
+index 0e3ef23..955b993 100755
 --- a/configure
 +++ b/configure
-@@ -874,9 +874,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
+@@ -911,9 +911,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
  fi
  
  if [ $asm = auto -a $ARCH = ARM ] ; then
 -    # set flags so neon is built by default
--    echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+-    [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
 -
-     if  cc_check '' '' '__asm__("rev ip, ip");' ; then      define HAVE_ARMV6
-         cc_check '' '' '__asm__("movt r0, #0");'         && define HAVE_ARMV6T2
-         cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
+     cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
+     if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
+         define HAVE_ARMV6
+-- 
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
index c5476c7..c445d15 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
@@ -6,17 +6,17 @@
 LICENSE_FLAGS = "commercial"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-DEPENDS = "yasm-native"
+DEPENDS = "nasm-native"
 
 SRC_URI = "git://github.com/mirror/x264;branch=stable \
            file://don-t-default-to-cortex-a9-with-neon.patch \
            file://Fix-X32-build-by-disabling-asm.patch \
            "
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
 
-SRCREV = "2b741f81e51f92d053d87a49f59ff1026553a0f6"
+SRCREV = "e9a5903edf8ca59ef20e6f4894c196f135af735e"
 
-PV = "r2731+git${SRCPV}"
+PV = "r2854+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
@@ -43,6 +43,8 @@
                '
 
 do_configure() {
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
     ./configure ${EXTRA_OECONF}
 }
 
diff --git a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
index 7c1e5bf..0f7f091 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
@@ -5,7 +5,7 @@
 # to build multiple virtual/kernel providers.
 python () {
     if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
 DESCRIPTION = "Small image capable of booting a device with a test suite and \
diff --git a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
index d8bb04a..9cb93b3 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
@@ -5,7 +5,7 @@
 # to build multiple virtual/kernel providers.
 python () {
     if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
 DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
index 012b2dd..5f61c4e 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_1.1.bb
@@ -22,5 +22,5 @@
 }
 
 FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
-RDEPENDS_${PN} = "python3 python3-subprocess python3-textutils"
+RDEPENDS_${PN} = "python3-core "
 RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
index 4336c50..496f04f 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
@@ -26,6 +26,6 @@
         cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
 }
 
-RDEPENDS_${PN}-ptest += " stress python3 python3-subprocess python3-multiprocessing python3-datetime python3-re python3-lang python3-misc"
+RDEPENDS_${PN}-ptest += " stress python3 python3-multiprocessing python3-datetime python3-misc"
 
 FILES_${PN} += "${prefix}/src/backfire"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 97cced7..224428d 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -46,7 +46,7 @@
 SUMMARY_${PN}-apps = "Sato desktop - applications"
 RDEPENDS_${PN}-apps = "\
     l3afpad \
-    gst-player \
+    gst-examples \
     matchbox-terminal \
     sato-screenshot \
     ${FILEMANAGER} \
diff --git a/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb b/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb
index 75ff773..4127a07 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.5.bb
@@ -9,9 +9,6 @@
 SECTION = "x11"
 DEPENDS = "gtk+3 startup-notification libfm intltool-native gettext-native glib-2.0-native"
 
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
-
 SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
 	   file://gnome-fs-directory.png \
 	   file://gnome-fs-regular.png \
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch
deleted file mode 100644
index 89aa158..0000000
--- a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Clarify-conditions-to-avoid-compiler-errors.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 72f2e9043ef509992dfa61791638db87bf0ae37b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Dec 2016 01:20:00 +0000
-Subject: [PATCH] Clarify conditions to avoid compiler errors
-
-Fix errors pointed out by clang
-
-error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
-|         if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue;
-|                               ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- signpost.c | 2 +-
- tracks.c   | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/signpost.c b/signpost.c
-index aa2e13a..2e2dff2 100644
---- a/signpost.c
-+++ b/signpost.c
-@@ -284,7 +284,7 @@ static int check_nums(game_state *orig, game_state *copy, int only_immutable)
-     int i, ret = 1;
-     assert(copy->n == orig->n);
-     for (i = 0; i < copy->n; i++) {
--        if (only_immutable && !copy->flags[i] & FLAG_IMMUTABLE) continue;
-+        if (only_immutable && !(copy->flags[i] & FLAG_IMMUTABLE)) continue;
-         assert(copy->nums[i] >= 0);
-         assert(copy->nums[i] <= copy->n);
-         if (copy->nums[i] != orig->nums[i]) {
-diff --git a/tracks.c b/tracks.c
-index 5b27350..ca44ce1 100644
---- a/tracks.c
-+++ b/tracks.c
-@@ -1072,7 +1072,7 @@ static int solve_check_single_sub(game_state *state, int si, int id, int n,
-         x = i%w;
-         y = i/w;
-         if (abs(ox-x) > 1 || abs(oy-y) > 1) {
--            if (!state->sflags[i] & S_TRACK)
-+            if (!(state->sflags[i] & S_TRACK))
-                 did += solve_set_sflag(state, x, y, S_NOTRACK, what);
-         }
-     }
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
index decd2a8..bfd8177 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -7,18 +7,17 @@
 REQUIRED_DISTRO_FEATURES = "x11"
 
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=da6110d4ed1225a287eab2bf0ac0193b"
 
 SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
            file://fix-compiling-failure-with-option-g-O.patch \
            file://0001-Use-labs-instead-of-abs.patch \
            file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
-           file://0001-Clarify-conditions-to-avoid-compiler-errors.patch \
            file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
            "
-UPSTREAM_VERSION_UNKNOWN = "1"
-SRCREV = "8dfe5cec31e784e4ece2955ecc8cc35ee7e8fbb3"
-PE = "1"
+UPSTREAM_CHECK_COMMITS = "1"
+SRCREV = "2adf0052d66eae88c7a5e55e67fe16e13f7018b5"
+PE = "2"
 PV = "0.0+git${SRCPV}"
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc b/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
index 4d5daa6..b568f04 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
+++ b/import-layers/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
@@ -12,7 +12,7 @@
 	   file://rxvt.desktop \
 	   file://rxvt.png"
 
-inherit autotools update-alternatives
+inherit autotools pkgconfig update-alternatives
 
 PROVIDES = "virtual/x-terminal-emulator"
 ALTERNATIVE_${PN} = "x-terminal-emulator"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
index ceaecca..bb6b69b 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
@@ -10,7 +10,7 @@
 # SRCREV tagged 0.0.2
 SRCREV = "b2e5da502f8c5ff75e9e6da771372ef8e40fd9a2"
 SRC_URI = "git://git.yoctoproject.org/xsettings-daemon \
-           file://addsoundkeys.patch;apply=yes \
+           file://addsoundkeys.patch \
            file://70settings-daemon.sh \
            "
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-gles3-header-when-gles2-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-gles3-header-when-gles2-is-enabled.patch
new file mode 100644
index 0000000..2157407
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-gles3-header-when-gles2-is-enabled.patch
@@ -0,0 +1,38 @@
+From adf3d4c9d4133bd6995590d921c0ccaec5254da9 Mon Sep 17 00:00:00 2001
+From: Bhargava Sreekantappa Gayathri
+ <bhargava.sreekantappa-gayathri@xilinx.com>
+Date: Tue, 27 Feb 2018 16:09:31 -0800
+Subject: [PATCH] Fix gles3 header when gles2 is enabled
+
+A GLES 2 application should not use gl3.h.
+Fix the gles3 header failure while compiling webkitgtk.
+
+FAILED:
+Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/GLContext.cpp.o
+           ^~~~~~~~~~~~~
+compilation terminated.
+
+Upstream-Status: Backport
+Imported patch from: https://bugs.webkit.org/show_bug.cgi?id=183008
+
+Signed-off-by: Bhargava Sreekantappa Gayathri <bhargava.sreekantappa-gayathri@xilinx.com>
+Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
+---
+ Source/WebCore/platform/graphics/GLContext.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Source/WebCore/platform/graphics/GLContext.cpp b/Source/WebCore/platform/graphics/GLContext.cpp
+index 599dcc0..46d2fd4 100644
+--- a/Source/WebCore/platform/graphics/GLContext.cpp
++++ b/Source/WebCore/platform/graphics/GLContext.cpp
+@@ -31,7 +31,6 @@
+ #elif USE(OPENGL_ES_2)
+ #define GL_GLEXT_PROTOTYPES 1
+ #include <GLES2/gl2.h>
+-#include <GLES3/gl3.h>
+ #endif
+
+ #if USE(GLX)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
index dfdc116..9fc1421 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
@@ -16,6 +16,7 @@
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
+Upstream-Status: Pending
 ---
  Source/JavaScriptCore/shell/CMakeLists.txt | 2 +-
  Source/WebCore/PlatformGTK.cmake           | 6 +++---
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb
index 9fac044..c29fa7f 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.18.6.bb
@@ -21,6 +21,7 @@
            file://0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch \
            file://0001-Fix-build-with-musl.patch \
            file://fix-configure-failure-aarch64.patch \
+           file://0001-Fix-gles3-header-when-gles2-is-enabled.patch \
            "
 
 SRC_URI[md5sum] = "c1a548595135ee75ad3bf2e18ac83112"
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.0.bb
deleted file mode 100644
index 748d196..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.0.bb
+++ /dev/null
@@ -1,95 +0,0 @@
-SUMMARY = "Apache Portable Runtime (APR) companion library"
-HOMEPAGE = "http://apr.apache.org/"
-SECTION = "libs"
-DEPENDS = "apr expat gdbm"
-
-BBCLASSEXTEND = "native nativesdk"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
-                    file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
-
-SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
-           file://configfix.patch \
-           file://configure_fixes.patch \
-           file://run-ptest \
-"
-
-SRC_URI[md5sum] = "3b03dbff60728a4f4c33f5d929e8b35a"
-SRC_URI[sha256sum] = "483ef4d59e6ac9a36c7d3fd87ad7b9db7ad8ae29c06b9dd8ff22dda1cc416389"
-
-EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ 
-		--without-odbc \
-		--without-pgsql \
-		--with-dbm=gdbm \
-		--with-gdbm=${STAGING_DIR_HOST}${prefix} \
-		--without-sqlite2 \
-		--with-expat=${STAGING_DIR_HOST}${prefix}"
-
-
-inherit autotools lib_package binconfig
-
-PR = "r1"
-
-OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
-
-do_configure_append() {
-	if [ "${CLASSOVERRIDE}" = "class-target" ]; then
-		cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
-	fi
-}
-do_configure_prepend_class-native() {
-	mkdir ${B}/build
-	cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
-}
-do_configure_append_class-native() {
-	sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
-	# sometimes there isn't SHELL
-	sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
-}
-
-do_configure_prepend_class-nativesdk() {
-	cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
-}
-
-do_configure_append_class-nativesdk() {
-	sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
-	sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
-	sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
-	sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
-}
-
-do_install_append_class-target() {
-	sed -i -e 's,${STAGING_DIR_HOST},,g' \
-	       -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
-	       -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
-}
-
-PACKAGECONFIG ??= "crypto"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
-PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
-
-#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
-FILES_${PN}     += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
-FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
-FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
-
-INSANE_SKIP_${PN} += "dev-so"
-
-inherit ptest
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
-
-do_compile_ptest() {
-	cd ${B}/test
-	oe_runmake
-}
-
-do_install_ptest() {
-	t=${D}${PTEST_PATH}/test
-	mkdir $t
-	for i in testall data; do \
-	  cp -r ${B}/test/$i $t; \
-	done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.1.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.1.bb
new file mode 100644
index 0000000..88b4300
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr-util_1.6.1.bb
@@ -0,0 +1,93 @@
+SUMMARY = "Apache Portable Runtime (APR) companion library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "apr expat gdbm"
+
+BBCLASSEXTEND = "native nativesdk"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
+                    file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
+           file://configfix.patch \
+           file://configure_fixes.patch \
+           file://run-ptest \
+"
+
+SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f"
+SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
+
+EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ 
+		--without-odbc \
+		--without-pgsql \
+		--with-dbm=gdbm \
+		--with-gdbm=${STAGING_DIR_HOST}${prefix} \
+		--without-sqlite2 \
+		--with-expat=${STAGING_DIR_HOST}${prefix}"
+
+
+inherit autotools lib_package binconfig
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+do_configure_append() {
+	if [ "${CLASSOVERRIDE}" = "class-target" ]; then
+		cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
+	fi
+}
+do_configure_prepend_class-native() {
+	mkdir ${B}/build
+	cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
+}
+do_configure_append_class-native() {
+	sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+	# sometimes there isn't SHELL
+	sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+}
+
+do_configure_prepend_class-nativesdk() {
+	cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
+}
+
+do_configure_append_class-nativesdk() {
+	sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+	sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+	sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+	sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
+}
+
+do_install_append_class-target() {
+	sed -i -e 's,${STAGING_DIR_HOST},,g' \
+	       -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+	       -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
+}
+
+PACKAGECONFIG ??= "crypto"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
+
+#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
+FILES_${PN}     += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
+FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
+FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
+
+INSANE_SKIP_${PN} += "dev-so"
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
+
+do_compile_ptest() {
+	cd ${B}/test
+	oe_runmake
+}
+
+do_install_ptest() {
+	t=${D}${PTEST_PATH}/test
+	mkdir $t
+	for i in testall data; do \
+	  cp -r ${B}/test/$i $t; \
+	done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
deleted file mode 100644
index c5e92ac..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From f26e8b88d2c90ed7eb9d4e276412b0923c23d10f Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 14 Dec 2016 18:13:08 +0800
-Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross
- compiling
-
-In configure.in, it contains the following:
-
-	APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
-
-the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
-it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
-compiling enable.
-
-So it was hardcoded for cross compiling, we should detect it dynamic based on
-the sysroot's glibc. We change it to the following:
-
-	AC_CHECK_SIZEOF(off_t)
-
-The same for the following hardcoded types for cross compiling:
-
-	pid_t	8
-	ssize_t	8
-	size_t	8
-	off_t	8
-
-Change the above correspondingly.
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
----
- configure.in | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 9d57ae6..5b19940 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1681,7 +1681,7 @@ else
-     socklen_t_value="int"
- fi
- 
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
-+AC_CHECK_SIZEOF(pid_t)
- 
- if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
-     pid_t_fmt='#define APR_PID_T_FMT "hd"'
-@@ -1750,7 +1750,7 @@ APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
- APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
- APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
- 
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
-+AC_CHECK_SIZEOF(ssize_t)
- 
- AC_MSG_CHECKING([which format to use for apr_ssize_t])
- if test -n "$ssize_t_fmt"; then
-@@ -1767,7 +1767,7 @@ fi
- 
- ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
- 
--APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
-+AC_CHECK_SIZEOF(size_t)
- 
- AC_MSG_CHECKING([which format to use for apr_size_t])
- if test -n "$size_t_fmt"; then
-@@ -1784,7 +1784,7 @@ fi
- 
- size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
- 
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
-+AC_CHECK_SIZEOF(off_t)
- 
- if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
-     # Enable LFS
--- 
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch
new file mode 100644
index 0000000..097c195
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch
@@ -0,0 +1,32 @@
+From 4efdc06fb17b8a00a9eca923caa176be741d1e04 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Feb 2018 14:56:13 +0800
+Subject: [PATCH 1/7] build/buildcheck.sh: improve libtool detection
+
+Support customize libtool by variable assigning, it is helpful
+for cross compileing (such as libtool=aarch64-linux-libtool)
+
+Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/buildcheck.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build/buildcheck.sh b/build/buildcheck.sh
+index ab5df44..f191a41 100755
+--- a/build/buildcheck.sh
++++ b/build/buildcheck.sh
+@@ -40,7 +40,9 @@ fi
+ # output is multiline from 1.5 onwards
+ 
+ # Require libtool 1.4 or newer
+-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
++if test -z "$libtool"; then
++  libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
++fi
+ lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
+ if test -z "$lt_pversion"; then
+   echo "buildconf: libtool not found."
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
new file mode 100644
index 0000000..72e706f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
@@ -0,0 +1,74 @@
+From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:39:06 +0800
+Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr
+ files
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+The generated `apr-1-config' is used by other recipes at build time or
+packages at target run time, the workdir path caused confusion.
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ apr-config.in | 26 ++------------------------
+ 1 file changed, 2 insertions(+), 24 deletions(-)
+
+diff --git a/apr-config.in b/apr-config.in
+index 84b4073..bbbf651 100644
+--- a/apr-config.in
++++ b/apr-config.in
+@@ -152,14 +152,7 @@ while test $# -gt 0; do
+     flags="$flags $LDFLAGS"
+     ;;
+     --includes)
+-    if test "$location" = "installed"; then
+         flags="$flags -I$includedir $EXTRA_INCLUDES"
+-    elif test "$location" = "source"; then
+-        flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+-    else
+-        # this is for VPATH builds
+-        flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+-    fi
+     ;;
+     --srcdir)
+     echo $APR_SOURCE_DIR
+@@ -181,29 +174,14 @@ while test $# -gt 0; do
+     exit 0
+     ;;
+     --link-ld)
+-    if test "$location" = "installed"; then
+-        ### avoid using -L if libdir is a "standard" location like /usr/lib
+-        flags="$flags -L$libdir -l${APR_LIBNAME}"
+-    else
+-        ### this surely can't work since the library is in .libs?
+-        flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
+-    fi
++        flags="$flags -l${APR_LIBNAME}"
+     ;;
+     --link-libtool)
+     # If the LA_FILE exists where we think it should be, use it.  If we're
+     # installed and the LA_FILE does not exist, assume to use -L/-l
+     # (the LA_FILE may not have been installed).  If we're building ourselves,
+     # we'll assume that at some point the .la file be created.
+-    if test -f "$LA_FILE"; then
+-        flags="$flags $LA_FILE"
+-    elif test "$location" = "installed"; then
+-        ### avoid using -L if libdir is a "standard" location like /usr/lib
+-        # Since the user is specifying they are linking with libtool, we
+-        # *know* that -R will be recognized by libtool.
+-        flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
+-    else
+-        flags="$flags $LA_FILE"
+-    fi
++        flags="$flags -l${APR_LIBNAME}"
+     ;;
+     --shlib-path-var)
+     echo "$SHLIBPATH_VAR"
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch
deleted file mode 100644
index 7d0dddc..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 94d1ca0266a0f9c0446f1299b54f752e87b8a695 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 3 Mar 2017 22:24:17 +0100
-Subject: [PATCH] explicitly link libapr against phtread to make gold happy on
- test
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_create'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_join'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_once'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete'
-| ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific'
-| collect2: error: ld returned 1 exit status
-| Makefile:114: recipe for target 'globalmutexchild' failed
-| make[1]: *** [globalmutexchild] Error 1
-| make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test'
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure.in b/configure.in
-index 5b19940..cdf4d58 100644
---- a/configure.in
-+++ b/configure.in
-@@ -766,6 +766,7 @@ else
-           APR_PTHREADS_CHECK_RESTORE ] )
-     fi
-     if test "$pthreadh" = "1"; then
-+        APR_ADDTO(LIBS,[-lpthread])
-         APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
-         APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
-         APR_CHECK_PTHREAD_RECURSIVE_MUTEX
--- 
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
new file mode 100644
index 0000000..4dd53bd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
@@ -0,0 +1,63 @@
+From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 2 Feb 2018 15:51:42 +0800
+Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling
+
+While cross compiling, the tools/gen_test_char could not
+be executed at build time, use AX_PROG_CC_FOR_BUILD to
+build native tools/gen_test_char
+
+Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in  | 10 +++-------
+ configure.in |  3 +++
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5fb760e..8675f90 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@
+ 
+ CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
+ 	build/apr_rules.out tools/gen_test_char@EXEEXT@ \
+-	tools/gen_test_char.o tools/gen_test_char.lo \
++	tools/gen_test_char.o \
+ 	include/private/apr_escape_test_char.h
+ DISTCLEAN_TARGETS = config.cache config.log config.status \
+ 	include/apr.h include/arch/unix/apr_private.h \
+@@ -131,13 +131,9 @@ check: $(TARGET_LIB)
+ etags:
+ 	etags `find . -name '*.[ch]'`
+ 
+-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
+-tools/gen_test_char.lo: tools/gen_test_char.c
++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
+ 	$(APR_MKDIR) tools
+-	$(LT_COMPILE)
+-
+-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
+-	$(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
++	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
+ 
+ include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
+ 	$(APR_MKDIR) include/private
+diff --git a/configure.in b/configure.in
+index 719f331..361120f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -183,6 +183,9 @@ dnl can only be used once within a configure script, so this prevents a
+ dnl preload section from invoking the macro to get compiler info.
+ AC_PROG_CC
+ 
++dnl Check build CC for gen_test_char compiling which is executed at build time.
++AX_PROG_CC_FOR_BUILD
++
+ dnl AC_PROG_SED is only avaliable in recent autoconf versions.
+ dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
+ ifdef([AC_PROG_SED],
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
new file mode 100644
index 0000000..30fc07d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
@@ -0,0 +1,39 @@
+From 7925eb1766a00ccee05c6e80b1d34f163a04b7b1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:43:34 +0800
+Subject: [PATCH 4/7] Fix packet discards HTTP redirect.
+
+Disconnect the connection by poll() timeout.
+If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
+apr_socket_recv() returns EAGAIN.
+
+Upstream-Status: Pending
+
+Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
+Signed-off-by: Li Wang <li.wang@windriver.com>
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ network_io/unix/sendrecv.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
+index 4c0e0a6..1bdafba 100644
+--- a/network_io/unix/sendrecv.c
++++ b/network_io/unix/sendrecv.c
+@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
+                       && (sock->timeout > 0)) {
+ do_select:
+         arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
++        if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
++            *len = 0;
++            return EAGAIN;
++        }
+         if (arv != APR_SUCCESS) {
+             *len = 0;
+             return arv;
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
new file mode 100644
index 0000000..02634e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
@@ -0,0 +1,36 @@
+From 2e66cece0c3adff92733332111204ddc1d730a07 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 19 Nov 2015 18:25:38 -0800
+Subject: [PATCH 5/7] configure.in: fix LTFLAGS to make it work with ccache
+
+When ccache is enabled, libtool requires --tag=CC when use ccache,
+otherwise when building apr-util with ccache enabled:
+
+| libtool: compile: unable to infer tagged configuration
+| libtool: error: specify a tag with '--tag'
+| libtool: compile: unable to infer tagged configuration
+| make[1]: *** [buckets/apr_buckets.lo] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 361120f..3b10422 100644
+--- a/configure.in
++++ b/configure.in
+@@ -249,7 +249,7 @@ case $host in
+     ;;
+ *)
+     if test "x$LTFLAGS" = "x"; then
+-        LTFLAGS='--silent'
++        LTFLAGS='--silent --tag=CC'
+     fi
+     if test "$experimental_libtool" = "yes"; then
+         # Use a custom-made libtool replacement
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
new file mode 100644
index 0000000..5f5e7ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
@@ -0,0 +1,78 @@
+From f4d6e45ed5d2ccffd1af4c2ccdf7099ba0dce137 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 14 Dec 2016 18:13:08 +0800
+Subject: [PATCH 6/7] apr: fix off_t size doesn't match in glibc when cross
+ compiling
+
+In configure.in, it contains the following:
+
+	APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
+
+the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
+it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
+compiling enable.
+
+So it was hardcoded for cross compiling, we should detect it dynamic based on
+the sysroot's glibc. We change it to the following:
+
+	AC_CHECK_SIZEOF(off_t)
+
+The same for the following hardcoded types for cross compiling:
+
+	pid_t	8
+	ssize_t	8
+	size_t	8
+	off_t	8
+
+Change the above correspondingly.
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+
+Upstream-Status: Pending
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 3b10422..a227e72 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1769,7 +1769,7 @@ else
+     socklen_t_value="int"
+ fi
+ 
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
++AC_CHECK_SIZEOF(pid_t)
+ 
+ if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
+     pid_t_fmt='#define APR_PID_T_FMT "hd"'
+@@ -1838,7 +1838,7 @@ APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
+ 
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
++AC_CHECK_SIZEOF(ssize_t)
+ 
+ AC_MSG_CHECKING([which format to use for apr_ssize_t])
+ if test -n "$ssize_t_fmt"; then
+@@ -1855,7 +1855,7 @@ fi
+ 
+ ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
+ 
+-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
++AC_CHECK_SIZEOF(size_t)
+ 
+ AC_MSG_CHECKING([which format to use for apr_size_t])
+ if test -n "$size_t_fmt"; then
+@@ -1872,7 +1872,7 @@ fi
+ 
+ size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
+ 
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
++AC_CHECK_SIZEOF(off_t)
+ 
+ if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
+     # Enable LFS
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
new file mode 100644
index 0000000..8760b01
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
@@ -0,0 +1,50 @@
+From c6afc4a4a766478cb6aa6b43a50051881b6318d7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 3 Mar 2017 22:24:17 +0100
+Subject: [PATCH 7/7] explicitly link libapr against phtread to make gold happy
+ on test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_join'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_once'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific'
+| collect2: error: ld returned 1 exit status
+| Makefile:114: recipe for target 'globalmutexchild' failed
+| make[1]: *** [globalmutexchild] Error 1
+| make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test'
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.in b/configure.in
+index a227e72..cbc0f90 100644
+--- a/configure.in
++++ b/configure.in
+@@ -784,6 +784,7 @@ else
+           APR_PTHREADS_CHECK_RESTORE ] )
+     fi
+     if test "$pthreadh" = "1"; then
++        APR_ADDTO(LIBS,[-lpthread])
+         APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
+         APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
+         APR_CHECK_PTHREAD_RECURSIVE_MUTEX
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
deleted file mode 100644
index 6805b8b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix packet discards HTTP redirect.
-
-Disconnect the connection by poll() timeout.
-If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
-apr_socket_recv() returns EAGAIN.
-
-Upstream-Status: Pending
-
-Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- network_io/unix/sendrecv.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
-index c133a26..e8faf15 100644
---- a/network_io/unix/sendrecv.c
-+++ b/network_io/unix/sendrecv.c
-@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
-                       && (sock->timeout > 0)) {
- do_select:
-         arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
-+        if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
-+            *len = 0;
-+            return EAGAIN;
-+        }
-         if (arv != APR_SUCCESS) {
-             *len = 0;
-             return arv;
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch
deleted file mode 100644
index b6784e0..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.4.2/build/buildcheck.sh
-===================================================================
---- apr-1.4.2.orig/build/buildcheck.sh	2009-11-13 08:27:16.000000000 +0800
-+++ apr-1.4.2/build/buildcheck.sh	2010-11-26 15:44:00.000000000 +0800
-@@ -32,35 +32,4 @@
- echo "buildconf: autoconf version $ac_version (ok)"
- fi
- 
--# Sample libtool --version outputs:
--# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
--# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
--# output is multiline from 1.5 onwards
--
--# Require libtool 1.4 or newer
--libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
--lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
--if test -z "$lt_pversion"; then
--echo "buildconf: libtool not found."
--echo "           You need libtool version 1.4 or newer installed"
--echo "           to build APR from SVN."
--exit 1
--fi
--lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
--IFS=.; set $lt_version; IFS=' '
--lt_status="good"
--if test "$1" = "1"; then
--   if test "$2" -lt "4"; then
--      lt_status="bad"
--   fi
--fi
--if test $lt_status = "good"; then
--   echo "buildconf: libtool version $lt_pversion (ok)"
--   exit 0
--fi
--
--echo "buildconf: libtool version $lt_pversion found."
--echo "           You need libtool version 1.4 or newer installed"
--echo "           to build APR from SVN."
--
--exit 1
-+exit 0
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configfix.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/configfix.patch
deleted file mode 100644
index 605c4f6..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configfix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.3.3/apr-config.in
-===================================================================
---- apr-1.3.3.orig/apr-config.in	2009-01-12 15:16:31.000000000 +0000
-+++ apr-1.3.3/apr-config.in	2009-01-12 15:19:25.000000000 +0000
-@@ -152,14 +152,7 @@
-     flags="$flags $LDFLAGS"
-     ;;
-     --includes)
--    if test "$location" = "installed"; then
-         flags="$flags -I$includedir $EXTRA_INCLUDES"
--    elif test "$location" = "source"; then
--        flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
--    else
--        # this is for VPATH builds
--        flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
--    fi
-     ;;
-     --srcdir)
-     echo $APR_SOURCE_DIR
-@@ -181,29 +167,14 @@
-     exit 0
-     ;;
-     --link-ld)
--    if test "$location" = "installed"; then
--        ### avoid using -L if libdir is a "standard" location like /usr/lib
--        flags="$flags -L$libdir -l${APR_LIBNAME}"
--    else
--        ### this surely can't work since the library is in .libs?
--        flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
--    fi
-+        flags="$flags -l${APR_LIBNAME}"
-     ;;
-     --link-libtool)
-     # If the LA_FILE exists where we think it should be, use it.  If we're
-     # installed and the LA_FILE does not exist, assume to use -L/-l
-     # (the LA_FILE may not have been installed).  If we're building ourselves,
-     # we'll assume that at some point the .la file be created.
--    if test -f "$LA_FILE"; then
--        flags="$flags $LA_FILE"
--    elif test "$location" = "installed"; then
--        ### avoid using -L if libdir is a "standard" location like /usr/lib
--        # Since the user is specifying they are linking with libtool, we
--        # *know* that -R will be recognized by libtool.
--        flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
--    else
--        flags="$flags $LA_FILE"
--    fi
-+        flags="$flags -l${APR_LIBNAME}"
-     ;;
-     --shlib-path-var)
-     echo "$SHLIBPATH_VAR"
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
deleted file mode 100644
index 7521eeb..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d439093aa07a486f559206ac9e5808a6a18218cd Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 19 Nov 2015 18:25:38 -0800
-Subject: [PATCH] configure.in: fix LTFLAGS to make it work with ccache
-
-When ccache is enabled, libtool requires --tag=CC when use ccache,
-otherwise when building apr-util with ccache enabled:
-
-| libtool: compile: unable to infer tagged configuration
-| libtool: error: specify a tag with '--tag'
-| libtool: compile: unable to infer tagged configuration
-| make[1]: *** [buckets/apr_buckets.lo] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.in |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 5a4a988..9d57ae6 100644
---- a/configure.in
-+++ b/configure.in
-@@ -246,7 +246,7 @@ case $host in
-     ;;
- *)
-     if test "x$LTFLAGS" = "x"; then
--        LTFLAGS='--silent'
-+        LTFLAGS='--silent --tag=CC'
-     fi
-     if test "$experimental_libtool" = "yes"; then
-         # Use a custom-made libtool replacement
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch
deleted file mode 100644
index 0514000..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: apr-1.3.3/configure.in
-===================================================================
---- apr-1.3.3.orig/configure.in
-+++ apr-1.3.3/configure.in
-@@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm
-                 create_area])
- 
- APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
--AC_CHECK_FILE(/dev/zero)
--
--# Not all systems can mmap /dev/zero (such as HP-UX).  Check for that.
--if test "$ac_cv_func_mmap" = "yes" &&
--   test "$ac_cv_file__dev_zero" = "yes"; then
--    AC_MSG_CHECKING(for mmap that can map /dev/zero)
--    AC_TRY_RUN([
--#include <sys/types.h>
--#include <sys/stat.h>
--#include <fcntl.h>
--#ifdef HAVE_SYS_MMAN_H
--#include <sys/mman.h>
--#endif
--    int main()
--    {
--        int fd;
--        void *m;
--        fd = open("/dev/zero", O_RDWR);
--        if (fd < 0) {
--            return 1;
--        }
--        m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
--        if (m == (void *)-1) {  /* aka MAP_FAILED */
--            return 2;
--        }
--        if (munmap(m, sizeof(void*)) < 0) {
--            return 3;
--        }
--        return 0;
--    }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
--
--    AC_MSG_RESULT($ac_cv_file__dev_zero)
--fi
- 
- # Now we determine which one is our anonymous shmem preference.
- haveshmgetanon="0"
-@@ -1518,13 +1485,14 @@ else
-     bigendian=0
- fi
- 
--APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
--#include <sys/uio.h>],struct iovec,0)
--if test "$ac_cv_sizeof_struct_iovec" = "0"; then
--    have_iovec=0
--else
--    have_iovec=1
--fi
-+#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
-+##include <sys/uio.h>],struct iovec,0)
-+#if test "$ac_cv_sizeof_struct_iovec" = "0"; then
-+#    have_iovec=0
-+#else
-+#    have_iovec=1
-+#fi
-+have_iovec=1
- 
- AC_SUBST(voidp_size)
- AC_SUBST(short_value)
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/import-layers/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
deleted file mode 100644
index 16499f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Makefile.in: fix cross compiling failed
-
-The tools/gen_test_char was invoked at build time,
-and it didn't work for the cross compiling, so we
-compile it with $BUILD_CC.
-
-Remove the 'tools' dir creation, it always existed.
-And it caused gen_test_char unexpected rebuilt at
-do_install time.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- Makefile.in | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index a2a5194..5fe028f 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -46,7 +46,6 @@ LT_VERSION = @LT_VERSION@
- 
- CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
- 	build/apr_rules.out tools/gen_test_char@EXEEXT@ \
--	tools/gen_test_char.o tools/gen_test_char.lo \
- 	include/private/apr_escape_test_char.h
- DISTCLEAN_TARGETS = config.cache config.log config.status \
- 	include/apr.h include/arch/unix/apr_private.h \
-@@ -129,13 +128,8 @@ check: $(TARGET_LIB)
- etags:
- 	etags `find . -name '*.[ch]'`
- 
--OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
--tools/gen_test_char.lo: tools/gen_test_char.c
--	$(APR_MKDIR) tools
--	$(LT_COMPILE)
--
--tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
--	$(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
-+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
-+	$(BUILD_CC) $(CFLAGS_FOR_BUILD) $< -o $@
- 
- include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
- 	$(APR_MKDIR) include/private
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.2.bb
deleted file mode 100644
index e2eed53..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.2.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "Apache Portable Runtime (APR) library"
-HOMEPAGE = "http://apr.apache.org/"
-SECTION = "libs"
-DEPENDS = "util-linux"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
-                    file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
-           file://configure_fixes.patch \
-           file://cleanup.patch \
-           file://configfix.patch \
-           file://run-ptest \
-           file://upgrade-and-fix-1.5.1.patch \
-           file://Fix-packet-discards-HTTP-redirect.patch \
-           file://configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
-           file://0001-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
-           file://0002-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
-"
-
-SRC_URI[md5sum] = "e81a851967c79b5ce9bfbc909e4bf735"
-SRC_URI[sha256sum] = "09109cea377bab0028bba19a92b5b0e89603df9eab05c0f7dbd4dd83d48dcebd"
-
-inherit autotools-brokensep lib_package binconfig multilib_header ptest
-
-OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
-
-# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
-CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
-
-# Also suppress trying to use sctp.
-#
-CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
-
-# Otherwise libtool fails to compile apr-utils
-# x86_64-linux-libtool: compile: unable to infer tagged configuration
-# x86_64-linux-libtool:   error: specify a tag with '--tag'
-CCACHE = ""
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-do_configure_prepend() {
-	# Avoid absolute paths for grep since it causes failures
-	# when using sstate between different hosts with different
-	# install paths for grep.
-	export GREP="grep"
-
-	cd ${S}
-	./buildconf
-}
-
-FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
-RDEPENDS_${PN}-dev += "bash"
-
-#for some reason, build/libtool.m4 handled by buildconf still be overwritten
-#when autoconf, so handle it again.
-do_configure_append() {
-	sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
-	sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
-}
-
-do_install_append() {
-	oe_multilib_header apr.h
-	install -d ${D}${datadir}/apr
-}
-
-do_install_append_class-target() {
-	sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
-	sed -i -e 's,${STAGING_DIR_HOST},,g' \
-	       -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
-	       -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
-}
-
-SSTATE_SCAN_FILES += "apr_rules.mk libtool"
-
-SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
-
-apr_sysroot_preprocess () {
-	d=${SYSROOT_DESTDIR}${datadir}/apr
-	install -d $d/
-	cp ${S}/build/apr_rules.mk $d/
-	sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
-	sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
-	sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
-	sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
-	cp ${S}/build/mkdir.sh $d/
-	cp ${S}/build/make_exports.awk $d/
-	cp ${S}/build/make_var_export.awk $d/
-	cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
-}
-
-do_compile_ptest() {
-	cd ${S}/test
-	oe_runmake
-}
-
-do_install_ptest() {
-	t=${D}${PTEST_PATH}/test
-	mkdir -p $t/.libs
-	cp -r ${S}/test/data $t/
-	cp -r ${S}/test/.libs/*.so $t/.libs/
-	cp ${S}/test/proc_child $t/
-	cp ${S}/test/readchild $t/
-	cp ${S}/test/sockchild $t/
-	cp ${S}/test/sockperf $t/
-	cp ${S}/test/testall $t/
-	cp ${S}/test/tryread $t/
-}
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.3.bb
new file mode 100644
index 0000000..87b8787
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.6.3.bb
@@ -0,0 +1,117 @@
+SUMMARY = "Apache Portable Runtime (APR) library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "util-linux"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
+                    file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
+           file://run-ptest \
+           file://0001-build-buildcheck.sh-improve-libtool-detection.patch \
+           file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \
+           file://0003-Makefile.in-configure.in-support-cross-compiling.patch \
+           file://0004-Fix-packet-discards-HTTP-redirect.patch \
+           file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
+           file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
+           file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
+"
+
+SRC_URI[md5sum] = "12f2a349483ad6f12db49ba01fbfdbfa"
+SRC_URI[sha256sum] = "131f06d16d7aabd097fa992a33eec2b6af3962f93e6d570a9bd4d85e95993172"
+
+inherit autotools-brokensep lib_package binconfig multilib_header ptest
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
+CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
+
+# Also suppress trying to use sctp.
+#
+CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
+
+CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes"
+CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes"
+
+# Otherwise libtool fails to compile apr-utils
+# x86_64-linux-libtool: compile: unable to infer tagged configuration
+# x86_64-linux-libtool:   error: specify a tag with '--tag'
+CCACHE = ""
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_configure_prepend() {
+	# Avoid absolute paths for grep since it causes failures
+	# when using sstate between different hosts with different
+	# install paths for grep.
+	export GREP="grep"
+
+	cd ${S}
+	libtool='${HOST_SYS}-libtool' ./buildconf
+}
+
+FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
+RDEPENDS_${PN}-dev += "bash"
+
+#for some reason, build/libtool.m4 handled by buildconf still be overwritten
+#when autoconf, so handle it again.
+do_configure_append() {
+	sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
+	sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
+}
+
+do_install_append() {
+	oe_multilib_header apr.h
+	install -d ${D}${datadir}/apr
+}
+
+do_install_append_class-target() {
+	sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
+	       -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
+	sed -i -e 's,${STAGING_DIR_HOST},,g' \
+	       -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+	       -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
+}
+
+SSTATE_SCAN_FILES += "apr_rules.mk libtool"
+
+SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
+
+apr_sysroot_preprocess () {
+	d=${SYSROOT_DESTDIR}${datadir}/apr
+	install -d $d/
+	cp ${S}/build/apr_rules.mk $d/
+	sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
+	sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
+	sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
+	sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
+	cp ${S}/build/mkdir.sh $d/
+	cp ${S}/build/make_exports.awk $d/
+	cp ${S}/build/make_var_export.awk $d/
+	cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
+}
+
+do_compile_ptest() {
+	cd ${S}/test
+	oe_runmake
+}
+
+do_install_ptest() {
+	t=${D}${PTEST_PATH}/test
+	mkdir -p $t/.libs
+	cp -r ${S}/test/data $t/
+	cp -r ${S}/test/.libs/*.so $t/.libs/
+	cp ${S}/test/proc_child $t/
+	cp ${S}/test/readchild $t/
+	cp ${S}/test/sockchild $t/
+	cp ${S}/test/sockperf $t/
+	cp ${S}/test/testall $t/
+	cp ${S}/test/tryread $t/
+}
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.24.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.24.1.bb
deleted file mode 100644
index 4a0e411..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.24.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "AT-SPI 2 Toolkit Bridge"
-HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "79388fbc4dc7f27394556dd389aeb594"
-SRC_URI[sha256sum] = "60dc90ac4f74b8ffe96a9363c25208a443b381bacecfefea6de549f20ed6957d"
-
-DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core"
-
-inherit autotools pkgconfig distro_features_check upstream-version-is-even
-
-# The at-spi2-core requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
-
-FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
-FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb
new file mode 100644
index 0000000..8617bb8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "AT-SPI 2 Toolkit Bridge"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "eeec6cead3350dca48a235271c105b3e"
+SRC_URI[sha256sum] = "b4f0c27b61dbffba7a5b5ba2ff88c8cee10ff8dac774fa5b79ce906853623b75"
+
+DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core"
+
+inherit autotools pkgconfig distro_features_check upstream-version-is-even
+
+# The at-spi2-core requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
+
+FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
+FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
index 4103eaa..1f8c9f3 100644
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
@@ -1,4 +1,4 @@
-From 2f47c975ebe52b6916a45ade023ae3bac21bb0e0 Mon Sep 17 00:00:00 2001
+From fa376762b92404b9e3c430054b8c3341ca0fdd8b Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Tue, 21 Jun 2016 16:00:02 +0300
 Subject: [PATCH] build: Add --with-systemduserunitdir
@@ -8,29 +8,30 @@
 
 Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=767911]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
 ---
  bus/Makefile.am | 2 +-
- configure.ac    | 7 +++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
+ configure.ac    | 9 +++++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
 
 diff --git a/bus/Makefile.am b/bus/Makefile.am
-index b189e02..52fbb0b 100644
+index 688f82a..10cde62 100644
 --- a/bus/Makefile.am
 +++ b/bus/Makefile.am
-@@ -26,7 +26,7 @@ dbusservice_DATA = org.a11y.Bus.service
- org.a11y.Bus.service: org.a11y.Bus.service.in
- 	sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+@@ -29,7 +29,7 @@ org.a11y.Bus.service: org.a11y.Bus.service.in
+ EXTRA_DIST += org.a11y.Bus.service.in
+ CLEANFILES += org.a11y.Bus.service
  
 -systemd_userdir = $(prefix)/lib/systemd/user
 +systemd_userdir = $(systemduserunitdir)
  systemd_user_DATA = at-spi-dbus-bus.service
  at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile
- 	sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+ 	$(AM_V_GEN) $(SED) -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
 diff --git a/configure.ac b/configure.ac
-index f9061c2..2b8eeed 100644
+index 8c4fca2..1415cca 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -183,6 +183,13 @@ else
+@@ -146,6 +146,15 @@ else
  fi
  AC_SUBST(DBUS_SERVICES_DIR)
  
@@ -41,9 +42,11 @@
 +            [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
 +AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
 +
- AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
++AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
++
+ GOBJECT_INTROSPECTION_CHECK([1.32.0])
  
- GOBJECT_INTROSPECTION_CHECK([0.9.6])
+ AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
 -- 
-2.1.4
+2.14.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch
deleted file mode 100644
index 69a51d5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c320799c941d42a9b7e351805359694ea3b36d2d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 5 Apr 2015 09:08:38 -0700
-Subject: [PATCH] nls.m4: Take it from gettext-0.15
-
-It otherwise expects gettext to provide it. Lets go independent
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- m4/nls.m4 | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
- create mode 100644 m4/nls.m4
-
-diff --git a/m4/nls.m4 b/m4/nls.m4
-new file mode 100644
-index 0000000..2c8fe69
---- /dev/null
-+++ b/m4/nls.m4
-@@ -0,0 +1,30 @@
-+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
-+dnl This file is free software; the Free Software Foundation
-+dnl gives unlimited permission to copy and/or distribute it,
-+dnl with or without modifications, as long as this notice is preserved.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are not in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper drepper@cygnus.com, 1995-2000.
-+dnl Bruno Haible haible@clisp.cons.org, 2000-2003.
-+
-+AC_PREREQ(2.50)
-+
-+AC_DEFUN([AM_NLS],
-+[
-+AC_MSG_CHECKING([whether NLS is requested])
-+dnl Default is enabled NLS
-+AC_ARG_ENABLE(nls,
-+[ --disable-nls do not use Native Language Support],
-+USE_NLS=$enableval, USE_NLS=yes)
-+AC_MSG_RESULT($USE_NLS)
-+AC_SUBST(USE_NLS)
-+])
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.24.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.24.1.bb
deleted file mode 100644
index 1687ae3..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.24.1.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
-HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-           file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
-           file://0001-build-Add-with-systemduserunitdir.patch \
-          "
-
-SRC_URI[md5sum] = "61d0a471e693292934a73f288ebff35c"
-SRC_URI[sha256sum] = "1e90d064b937aacfe79a96232ac7e63d28d716e85bd9ff4333f865305a959b5b"
-
-DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
-
-inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-xevie \
-                --with-systemduserunitdir=${systemd_user_unitdir} \
-                --with-dbus-daemondir=${bindir}"
-
-FILES_${PN} += "${datadir}/dbus-1/services/*.service \
-                ${datadir}/dbus-1/accessibility-services/*.service \
-                ${datadir}/defaults/at-spi2 \
-                ${systemd_user_unitdir}/at-spi-dbus-bus.service \
-                "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb
new file mode 100644
index 0000000..521ee3b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+           file://0001-build-Add-with-systemduserunitdir.patch \
+           "
+
+SRC_URI[md5sum] = "4a042e4c801fdb793788b749eab21485"
+SRC_URI[sha256sum] = "c80e0cdf5e3d713400315b63c7deffa561032a6c37289211d8afcfaa267c2615"
+
+DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst"
+
+inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = " \
+                --with-systemduserunitdir=${systemd_user_unitdir} \
+                --with-dbus-daemondir=${bindir}"
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+                ${datadir}/dbus-1/accessibility-services/*.service \
+                ${datadir}/defaults/at-spi2 \
+                ${systemd_user_unitdir}/at-spi-dbus-bus.service \
+                "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.24.0.bb b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.24.0.bb
deleted file mode 100644
index d62319c..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.24.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Accessibility toolkit for GNOME"
-HOMEPAGE = "http://live.gnome.org/GAP/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/libs"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
-                    file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
-
-DEPENDS = "glib-2.0"
-
-inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
-
-SRC_URI[archive.md5sum] = "3747a80089dfa3c0bbcf21adfff9968b"
-SRC_URI[archive.sha256sum] = "bb2daa9a808c73a7a79d2983f333e0ba74be42fc51e3ba1faf2551a636487a49"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-glibtest \
-               "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.26.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.26.1.bb
new file mode 100644
index 0000000..685b599
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.26.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Accessibility toolkit for GNOME"
+HOMEPAGE = "http://live.gnome.org/GAP/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/libs"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+                    file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
+
+DEPENDS = "glib-2.0"
+
+inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
+
+SRC_URI[archive.md5sum] = "7cddcc313b9a3efd19b2ddf079ba68f5"
+SRC_URI[archive.sha256sum] = "ef00ff6b83851dddc8db38b4d9faeffb99572ba150b0664ee02e46f015ea97cb"
+
+BBCLASSEXTEND = "native"
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
index 0b350be..f392465 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
@@ -35,61 +35,56 @@
 
 Signed-off-by: Kamil Dudka <kdudka@redhat.com>
 Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- test/cp.test            | 2 +-
- test/misc.test          | 6 +++---
- test/sbits-restore.test | 6 +++---
- 3 files changed, 7 insertions(+), 7 deletions(-)
 
-diff --git a/test/cp.test b/test/cp.test
-index 0867f63..a927195 100644
---- a/test/cp.test
-+++ b/test/cp.test
-@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
+Index: acl-2.2.52/test/cp.test
+===================================================================
+--- acl-2.2.52.orig/test/cp.test
++++ acl-2.2.52/test/cp.test
+@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if
  	> -rw-rw-r--+
-
+ 	
  	$ cp f g
 -	$ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
 +	$ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
  	> -rw-r--r--
-
+ 	
  	$ rm g
-diff --git a/test/misc.test b/test/misc.test
-index 6e98053..29372b7 100644
---- a/test/misc.test
-+++ b/test/misc.test
+Index: acl-2.2.52/test/misc.test
+===================================================================
+--- acl-2.2.52.orig/test/misc.test
++++ acl-2.2.52/test/misc.test
 @@ -254,7 +254,7 @@ Add some users and groups
  Symlink in directory with default ACL?
-
+ 	 
  	$ ln -s d d/l
 -	$ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
 +	$ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
  	> lrwxrwxrwx
-
+ 
  	$ ls -dl -L d/l | awk '{print $1}'
 @@ -343,7 +343,7 @@ Remove the default ACL
  Reset to base entries
-
+ 	 
  	$ setfacl -b d
 -	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
 +	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
  	> drwxr-x---
-
+ 
  	$ getfacl --omit-header d
 @@ -355,7 +355,7 @@ Reset to base entries
  Now, chmod should change the group_obj entry
-
+ 	 
  	$ chmod 775 d
 -	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
 +	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
  	> drwxrwxr-x
-
+ 	
  	$ getfacl --omit-header d
-diff --git a/test/sbits-restore.test b/test/sbits-restore.test
-index de21340..5899b0a 100644
---- a/test/sbits-restore.test
-+++ b/test/sbits-restore.test
-@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
+Index: acl-2.2.52/test/sbits-restore.test
+===================================================================
+--- acl-2.2.52.orig/test/sbits-restore.test
++++ acl-2.2.52/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via -
  	$ touch d/g
  	$ touch d/u
  	$ setfacl --restore d.acl
@@ -103,6 +98,3 @@
 +	$ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
  	> -rw-r-Sr--
  	$ rm -Rf d
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc b/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc
index e6f4c72..1339ecc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/ea-acl.inc
@@ -17,7 +17,7 @@
 EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
 
 do_install () {
-	oe_runmake install install-lib install-dev DIST_ROOT="${D}"
+	oe_runmake install install-lib install-dev DIST_ROOT="${D}" ZIP="gzip -n"
 }
 
 do_install_append_class-native () {
diff --git a/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
index 70b6e91..9d8191f 100644
--- a/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
@@ -9,10 +9,12 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "git://github.com/intel/bmap-tools.git"
-SRCREV = "9dad724104df265442226972a1e310813f9ffcba"
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/v${PV}/${BP}.tgz"
 
-S = "${WORKDIR}/git"
+SRC_URI[md5sum] = "883420183611aa137cbaf68a91ef0d7e"
+SRC_URI[sha256sum] = "0064891270c180c190f41925b0f6fb9cecac3056f1168d2592dbe90e5f226c0a"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/${BPN}/releases"
 
 RDEPENDS_${PN} = "python3-core python3-compression python3-mmap python3-setuptools"
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.64.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.64.0.bb
deleted file mode 100644
index 46013f3..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.64.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require boost-${PV}.inc
-
-SUMMARY = "Portable Boost.Jam build tool for boost"
-SECTION = "devel"
-
-inherit native
-
-SRC_URI += "file://bjam-native-build-bjam.debug.patch"
-
-do_compile() {
-    ./bootstrap.sh --with-toolset=gcc
-}
-
-do_install() {
-    install -d ${D}${bindir}/
-    # install unstripped version for bjam
-    install -c -m 755 bjam.debug ${D}${bindir}/bjam
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.66.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.66.0.bb
new file mode 100644
index 0000000..92c86a3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.66.0.bb
@@ -0,0 +1,19 @@
+require boost-${PV}.inc
+
+SUMMARY = "Portable Boost.Jam build tool for boost"
+SECTION = "devel"
+
+inherit native
+
+SRC_URI += "file://bjam-native-build-bjam.debug.patch \
+            file://0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch"
+
+do_compile() {
+    ./bootstrap.sh --with-toolset=gcc
+}
+
+do_install() {
+    install -d ${D}${bindir}/
+    # install unstripped version for bjam
+    install -c -m 755 bjam.debug ${D}${bindir}/bjam
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.64.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.64.0.inc
deleted file mode 100644
index dc7b1a9..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.64.0.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-# The Boost web site provides free peer-reviewed portable
-# C++ source libraries. The emphasis is on libraries which
-# work well with the C++ Standard Library. The libraries are
-# intended to be widely useful, and are in regular use by
-# thousands of programmers across a broad spectrum of applications.
-HOMEPAGE = "http://www.boost.org/"
-LICENSE = "BSL-1.0 & MIT & Python-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-
-BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}"
-BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
-BOOST_P = "boost_${BOOST_VER}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/boost/boost/${PV}/${BOOST_P}.tar.bz2"
-SRC_URI[md5sum] = "93eecce2abed9d2442c9676914709349"
-SRC_URI[sha256sum] = "7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332"
-
-UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/"
-UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/"
-
-S = "${WORKDIR}/${BOOST_P}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.66.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.66.0.inc
new file mode 100644
index 0000000..fe2b863
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.66.0.inc
@@ -0,0 +1,21 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+HOMEPAGE = "http://www.boost.org/"
+LICENSE = "BSL-1.0 & MIT & Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/boost/boost/${PV}/${BOOST_P}.tar.bz2"
+SRC_URI[md5sum] = "b2dfbd6c717be4a7bb2d88018eaccf75"
+SRC_URI[sha256sum] = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9"
+
+UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/"
+UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
index 41fc90f..0461ec6 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
@@ -135,29 +135,7 @@
 
 # use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater parallelism causes bjam to segfault or to ignore -j
 # https://svn.boost.org/trac/boost/ticket/7634
-def get_boost_parallel_make(d):
-    pm = d.getVar('PARALLEL_MAKE')
-    if pm:
-        # look for '-j' and throw other options (e.g. '-l') away
-        # because they might have different meaning in bjam
-        pm = pm.split()
-        while pm:
-            v = None
-            opt = pm.pop(0)
-            if opt == '-j':
-                v = pm.pop(0)
-            elif opt.startswith('-j'):
-                v = opt[2:].strip()
-            else:
-                v = None
-
-            if v:
-                v = min(64, int(v))
-                return '-j' + str(v)
-
-    return ""
-
-BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(d)}"
+BOOST_PARALLEL_MAKE = "${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}"
 BJAM_OPTS    = '${BOOST_PARALLEL_MAKE} -d+2 -q \
 		${BJAM_TOOLS} \
 		-sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
deleted file mode 100644
index 8a85aac..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 40192301130dcd913aa6d9cb9dba9e5f8dbd9d16 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
-Date: Wed, 24 Aug 2016 21:01:43 +0100
-Subject: [PATCH 1/4] use POSIX poll.h instead of sys/poll.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-POSIX specifies that <poll.h> is the correct header to
-include for poll()
-  http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html
-whereas <sys/poll.h> is only needed for ancient glibc (<2.3),
-so let's follow POSIX instead.
-
-As a side-effect, this silences a warning when compiling
-against the musl C-library:
-
-In file included from ./boost/asio/detail/socket_types.hpp:61:0,
-                 from ./boost/asio/ip/address_v4.hpp:21,
-                 from ./boost/asio/ip/address.hpp:21,
-                 from libs/log/src/init_from_settings.cpp:65:
-<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
- #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
-  ^~~~~~~
-
-etc.
-
-Signed-off-by: André Draszik <adraszik@tycoint.com>
----
-Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/12419
- boost/asio/detail/socket_types.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp
-index e8c7109..7e65d3c 100644
---- a/boost/asio/detail/socket_types.hpp
-+++ b/boost/asio/detail/socket_types.hpp
-@@ -58,7 +58,7 @@
- #else
- # include <sys/ioctl.h>
- # if !defined(__SYMBIAN32__)
--#  include <sys/poll.h>
-+#  include <poll.h>
- # endif
- # include <sys/types.h>
- # include <sys/stat.h>
--- 
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-correct-error-which-appeared-when-compiling-non-c-co.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-correct-error-which-appeared-when-compiling-non-c-co.patch
deleted file mode 100644
index f96005e..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-correct-error-which-appeared-when-compiling-non-c-co.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 02fa5cee1b8d0321787113e2dc10b162c657f333 Mon Sep 17 00:00:00 2001
-From: Robert Ramey <ramey@rrsd.com>
-Date: Wed, 1 Feb 2017 16:43:59 -0800
-Subject: [PATCH] correct error which appeared when compiling non c++ compliant
- code for arrays
-
-Upstream-Status: Backport [expected to be released in v1.65]
-
----
- boost/serialization/array.hpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/boost/serialization/array.hpp b/boost/serialization/array.hpp
-index 61708b3..612d1a6 100644
---- a/boost/serialization/array.hpp
-+++ b/boost/serialization/array.hpp
-@@ -23,6 +23,8 @@ namespace std{
- } // namespace std
- #endif
- 
-+#include <boost/serialization/array_wrapper.hpp>
-+
- #ifndef BOOST_NO_CXX11_HDR_ARRAY
- 
- #include <array>
--- 
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
index e9c7e4c..26f3cbb 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
@@ -1,97 +1,65 @@
-From c0e785f8da2caa6617052b1c7b347e0dffb1520d Mon Sep 17 00:00:00 2001
+From e4d3a7470b307693660d0412732e7266d1738d8c Mon Sep 17 00:00:00 2001
 From: Christopher Larson <chris_larson@mentor.com>
 Date: Tue, 13 Dec 2016 10:29:17 -0700
-Subject: [PATCH 2/3] Don't set up -m32/-m64, we do that ourselves
+Subject: [PATCH 6/6] Don't set up -m32/-m64, we do that ourselves
 
 Upstream-Status: Inappropriate
 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
 ---
- tools/build/src/tools/gcc.jam | 10 ----------
- 1 file changed, 10 deletions(-)
+ tools/build/src/tools/gcc.jam | 39 ---------------------------------------
+ 1 file changed, 39 deletions(-)
 
 diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
-index 0f346a5..942f141 100644
+index e4fc6c32..37914fd0 100644
 --- a/tools/build/src/tools/gcc.jam
 +++ b/tools/build/src/tools/gcc.jam
-@@ -509,7 +509,6 @@ rule compile.c++.pch ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
+@@ -337,45 +337,6 @@ rule set-address-model-options ( targets * : sources * : properties * )
+     {
+         local option ;
+         local target-os = [ feature.get-values target-os : $(properties) ] ;
+-        if $(target-os) = aix
+-        {
+-            if $(model) = 32
+-            {
+-                option = -maix32 ;
+-            }
+-            else
+-            {
+-                option = -maix64 ;
+-            }
+-        }
+-        else if $(target-os) = hpux
+-        {
+-            if $(model) = 32
+-            {
+-                option = -milp32 ;
+-            }
+-            else
+-            {
+-                option = -mlp64 ;
+-            }
+-        }
+-        else
+-        {
+-            local arch = [ feature.get-values architecture : $(properties) ] ;
+-            if $(arch) = power || $(arch) = sparc || $(arch) = x86
+-            {
+-                if $(model) = 32
+-                {
+-                    option = -m32 ;
+-                }
+-                else if $(model) = 64
+-                {
+-                    option = -m64 ;
+-                }
+-            }
+-            # For darwin, the model can be 32_64. darwin.jam will handle that
+-            # on its own.
+-        }
+         OPTIONS on $(targets) += $(option) ;
+     }
  }
- 
- actions compile.c++.pch
-@@ -521,7 +520,6 @@ rule compile.c.pch ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
- }
- 
- actions compile.c.pch
-@@ -533,7 +531,6 @@ rule compile.c++.preprocess ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
- 
-     # Some extensions are compiled as C++ by default. For others, we need to
-     # pass -x c++. We could always pass -x c++ but distcc does not work with it.
-@@ -548,7 +545,6 @@ rule compile.c.preprocess ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
- 
-     # If we use the name g++ then default file suffix -> language mapping does
-     # not work. So have to pass -x option. Maybe, we can work around this by
-@@ -564,7 +560,6 @@ rule compile.c++ ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
- 
-     # Some extensions are compiled as C++ by default. For others, we need to
-     # pass -x c++. We could always pass -x c++ but distcc does not work with it.
-@@ -594,7 +589,6 @@ rule compile.c ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
- 
-     # If we use the name g++ then default file suffix -> language mapping does
-     # not work. So have to pass -x option. Maybe, we can work around this by
-@@ -610,7 +604,6 @@ rule compile.fortran ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
- }
- 
- actions compile.c++ bind PCH_FILE
-@@ -641,7 +634,6 @@ actions compile.fortran
- rule compile.asm ( targets * : sources * : properties * )
- {
-     setup-fpic $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
-     LANG on $(<) = "-x assembler-with-cpp" ;
- }
- 
-@@ -950,7 +942,6 @@ rule quote-rpath ( targets * )
- rule link ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
-     SPACE on $(targets) = " " ;
-     # Serialize execution of the 'link' action, since running N links in
-     # parallel is just slower. For now, serialize only gcc links, it might be a
-@@ -1018,7 +1009,6 @@ actions piecemeal archive
- rule link.dll ( targets * : sources * : properties * )
- {
-     setup-threading $(targets) : $(sources) : $(properties) ;
--    setup-address-model $(targets) : $(sources) : $(properties) ;
-     SPACE on $(targets) = " " ;
-     JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
-     quote-rpath $(targets) ;
 -- 
-2.8.0
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
index 6bb25f8..fb6d971 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
@@ -1,20 +1,21 @@
-From 7c49525812567f1219706c4ed330b3bd2cc8e94a Mon Sep 17 00:00:00 2001
+From 0868761e7d2d75d472090e3ef96f3d2f9ced27f3 Mon Sep 17 00:00:00 2001
 From: Christopher Larson <chris_larson@mentor.com>
 Date: Tue, 13 Dec 2016 10:29:32 -0700
-Subject: [PATCH 3/3] Don't set up arch/instruction-set flags, we do that
+Subject: [PATCH 5/6] Don't set up arch/instruction-set flags, we do that
  ourselves
 
 Upstream-Status: Inappropriate
 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
 ---
- tools/build/src/tools/gcc.jam | 121 ------------------------------------------
- 1 file changed, 121 deletions(-)
+ tools/build/src/tools/gcc.jam | 127 ------------------------------------------
+ 1 file changed, 127 deletions(-)
 
 diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
-index 942f141..d062c20 100644
+index e3b1b952..e4fc6c32 100644
 --- a/tools/build/src/tools/gcc.jam
 +++ b/tools/build/src/tools/gcc.jam
-@@ -1068,124 +1068,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
+@@ -1276,130 +1276,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
          <architecture>$(architecture)/<instruction-set>$(instruction-set)
          : $(values) ;
  }
@@ -60,6 +61,10 @@
 -cpu-flags gcc OPTIONS : x86 : core-avx-i : -march=core-avx-i ;
 -cpu-flags gcc OPTIONS : x86 : ivy-bridge : -march=core-avx-i ;
 -cpu-flags gcc OPTIONS : x86 : haswell : -march=core-avx-i -mavx2 -mfma -mbmi -mbmi2 -mlzcnt ;
+-cpu-flags gcc OPTIONS : x86 : broadwell : -march=broadwell ;
+-cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
+-cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
+-cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
 -cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
 -cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
 -cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
@@ -81,8 +86,10 @@
 -cpu-flags gcc OPTIONS : x86 : bdver1 : -march=bdver1 ;
 -cpu-flags gcc OPTIONS : x86 : bdver2 : -march=bdver2 ;
 -cpu-flags gcc OPTIONS : x86 : bdver3 : -march=bdver3 ;
+-cpu-flags gcc OPTIONS : x86 : bdver4 : -march=bdver4 ;
 -cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
 -cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
+-cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ;
 -cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
 -cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
 -cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
@@ -140,4 +147,5 @@
 -# AIX variant of RS/6000 & PowerPC
 -toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;
 -- 
-2.8.0
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.64.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.64.0.bb
deleted file mode 100644
index d1c20e1..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.64.0.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require boost-${PV}.inc
-require boost.inc
-
-SRC_URI += "\
-    file://arm-intrinsics.patch \
-    file://boost-CVE-2012-2677.patch \
-    file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \
-    file://boost-math-disable-pch-for-gcc.patch \
-    file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
-    file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
-    file://0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch \
-    file://0001-correct-error-which-appeared-when-compiling-non-c-co.patch \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.66.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.66.0.bb
new file mode 100644
index 0000000..63b82a5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.66.0.bb
@@ -0,0 +1,11 @@
+require boost-${PV}.inc
+require boost.inc
+
+SRC_URI += "\
+    file://arm-intrinsics.patch \
+    file://boost-CVE-2012-2677.patch \
+    file://boost-math-disable-pch-for-gcc.patch \
+    file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
+    file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
+    file://0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch b/import-layers/yocto-poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch
new file mode 100644
index 0000000..a75133d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch
@@ -0,0 +1,37 @@
+From 5685527364198597f25fc1c6236cb64cbc3de44f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Oct 2017 18:16:08 +0300
+Subject: [PATCH] Fix a strange assert typo; how was this released without
+ noticing?
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tools/build/src/engine/debugger.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/build/src/engine/debugger.c b/tools/build/src/engine/debugger.c
+index 802f262..152a7e6 100644
+--- a/tools/build/src/engine/debugger.c
++++ b/tools/build/src/engine/debugger.c
+@@ -1092,7 +1092,7 @@ static void debug_start_child( int argc, const char * * argv )
+     PROCESS_INFORMATION pi = { NULL, NULL, 0, 0 };
+     STARTUPINFO si = { sizeof( STARTUPINFO ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+         0, 0, 0, 0, 0, 0 };
+-    assert( DEBUG_STATE == DEBUG_NO_CHILD );
++    assert( debug_state == DEBUG_NO_CHILD );
+     if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) )
+     {
+         printf("internal error\n");
+@@ -1176,7 +1176,7 @@ static void debug_start_child( int argc, const char * * argv )
+     int read_fd;
+     int pid;
+     int i;
+-    assert( DEBUG_STATE == DEBUG_NO_CHILD );
++    assert( debug_state == DEBUG_NO_CHILD );
+     pipe(pipe1);
+     pipe(pipe2);
+     pid = fork();
+-- 
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
new file mode 100644
index 0000000..4bd967f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
@@ -0,0 +1,71 @@
+From a9fc13b2aee55655d58fcb77a3180fa99f96438a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Wed, 28 Mar 2018 16:45:05 +0100
+Subject: [PATCH] update-ca-certificates: use relative symlinks from
+ $ETCCERTSDIR
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+update-ca-certificates symlinks (trusted) certificates
+from $CERTSDIR or $LOCALCERTSDIR into $ETCCERTSDIR.
+update-ca-certificates can call hook scripts installed
+into /etc/ca-certificates/update.d. Those scripts are
+passed the pem file in /etc/ssl/certs/ that was added or
+removed in this run and those pem files are absolute
+symlinks into $CERTSDIR or $LOCALCERTSDIR at the moment.
+
+When running update-ca-certificates during image build
+time, they thusly all point into the host's file system,
+not into the $SYSROOT. This means:
+* the host's file system layout must match the one
+  produced by OE, and
+* it also means that the host must have installed the same
+  (or more) certificates as the target in $CERTSDIR and
+  $LOCALCERTSDIR
+
+This is a problem when wanting to execute hook scripts,
+because they all need to be taught about $SYSROOT, and
+behave differently depending on whether they're called
+at image build time, or on the target, as otherwise they
+will be trying to actually read the host's certificates
+from $CERTSDIR or $LOCALCERTSDIR.
+
+This also is a problem when running anything else during
+image build time that depends on the trusted CA
+certificates.
+
+Changing the symlink to be relative solves all of these
+problems. Do so.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ sbin/update-ca-certificates | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index 00f80c7..7e911a9 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -29,6 +29,7 @@ CERTSDIR=$SYSROOT/usr/share/ca-certificates
+ LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
+ CERTBUNDLE=ca-certificates.crt
+ ETCCERTSDIR=$SYSROOT/etc/ssl/certs
++FSROOT=../../../ # to get from $ETCCERTSDIR to the root of the file system
+ HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
+ 
+ while [ $# -gt 0 ];
+@@ -125,9 +126,10 @@ add() {
+   PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
+                                                   -e 's/[()]/=/g' \
+                                                   -e 's/,/_/g').pem"
+-  if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ]
++  DST="$(echo ${CERT} | sed -e "s|^$SYSROOT||" -e "s|^/|$FSROOT|" )"
++  if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${DST}" ]
+   then
+-    ln -sf "${CERT##$SYSROOT}" "$PEM"
++    ln -sf "${DST}" "$PEM"
+     echo "+$PEM" >> "$ADDED"
+   fi
+   # Add trailing newline to certificate, if it is missing (#635570)
diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
index e4ffbd3..3502948 100644
--- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
@@ -16,15 +16,17 @@
 
 SRCREV = "34b8e19e541b8af4076616b2e170c7a70cdaded0"
 
-SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
+SRC_URI = "git://salsa.debian.org/debian/ca-certificates.git;protocol=https \
            file://0002-update-ca-certificates-use-SYSROOT.patch \
            file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
            file://update-ca-certificates-support-Toybox.patch \
            file://default-sysroot.patch \
-           file://sbindir.patch"
+           file://sbindir.patch \
+           file://0003-update-ca-certificates-use-relative-symlinks-from-ET.patch \
+           "
 
 S = "${WORKDIR}/git"
-SYSROOT_DIRS_class-native += "/etc"
+SYSROOT_DIRS_class-native += "${sysconfdir} ${datadir}/ca-certificates"
 
 inherit allarch
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
index 74e5d99..a7db1b3 100644
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
@@ -1,17 +1,21 @@
-[PATCH] replace krb5-config with pkg-config
+From ed70f0623708b8a6c1f58a5d243d87c5ff45b24d Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 26 Apr 2016 13:13:01 +0800
+Subject: [PATCH] replace krb5-config with pkg-config
 
 Upstream-Status:  Pending
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
  configure.ac | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index e99b303..dc93f39 100644
+index 5569a26..56b0380 100755
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1196,7 +1196,7 @@ AC_ARG_WITH(gssapi,
+@@ -1290,7 +1290,7 @@ AC_ARG_WITH(gssapi,
    fi
  ])
  
@@ -20,7 +24,7 @@
  
  save_CPPFLAGS="$CPPFLAGS"
  AC_MSG_CHECKING([if GSS-API support is requested])
-@@ -1207,7 +1207,7 @@ if test x"$want_gss" = xyes; then
+@@ -1301,7 +1301,7 @@ if test x"$want_gss" = xyes; then
       if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
          GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
       elif test -f "$KRB5CONFIG"; then
@@ -29,7 +33,7 @@
       elif test "$GSSAPI_ROOT" != "yes"; then
          GSSAPI_INCS="-I$GSSAPI_ROOT/include"
       fi
-@@ -1300,7 +1300,7 @@ if test x"$want_gss" = xyes; then
+@@ -1394,7 +1394,7 @@ if test x"$want_gss" = xyes; then
          elif test -f "$KRB5CONFIG"; then
             dnl krb5-config doesn't have --libs-only-L or similar, put everything
             dnl into LIBS
@@ -38,6 +42,3 @@
             LIBS="$gss_libs $LIBS"
          else
             case $host in
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000099.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
deleted file mode 100644
index 96ff1b0..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c9332fa5e84f24da300b42b1a931ade929d3e27d Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Tue, 1 Aug 2017 17:17:06 +0200
-Subject: [PATCH] file: output the correct buffer to the user
-
-Regression brought by 7c312f84ea930d8 (April 2017)
-
-CVE: CVE-2017-1000099
-
-Bug: https://curl.haxx.se/docs/adv_20170809C.html
-
-Credit to OSS-Fuzz for the discovery
-
-Upstream-Status: Backport
-https://github.com/curl/curl/commit/c9332fa5e84f24da300b42b1a931ade929d3e27d
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- lib/file.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/file.c b/lib/file.c
-index bd426eac2..666cbe75b 100644
---- a/lib/file.c
-+++ b/lib/file.c
-@@ -499,11 +499,11 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
-              Curl_month[tm->tm_mon],
-              tm->tm_year + 1900,
-              tm->tm_hour,
-              tm->tm_min,
-              tm->tm_sec);
--    result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
-+    result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0);
-     if(!result)
-       /* set the file size to make it available post transfer */
-       Curl_pgrsSetDownloadSize(data, expected_size);
-     return result;
-   }
--- 
-2.13.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000100.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000100.patch
deleted file mode 100644
index f74f1dd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000100.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 358b2b131ad6c095696f20dcfa62b8305263f898 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Tue, 1 Aug 2017 17:16:46 +0200
-Subject: [PATCH] tftp: reject file name lengths that don't fit
-
-... and thereby avoid telling send() to send off more bytes than the
-size of the buffer!
-
-CVE: CVE-2017-1000100
-
-Bug: https://curl.haxx.se/docs/adv_20170809B.html
-Reported-by: Even Rouault
-
-Credit to OSS-Fuzz for the discovery
-
-Upstream-Status: Backport
-https://github.com/curl/curl/commit/358b2b131ad6c095696f20dcfa62b8305263f898
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- lib/tftp.c |    7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/lib/tftp.c b/lib/tftp.c
-index 02bd842..f6f4bce 100644
---- a/lib/tftp.c
-+++ b/lib/tftp.c
-@@ -5,7 +5,7 @@
-  *                            | (__| |_| |  _ <| |___
-  *                             \___|\___/|_| \_\_____|
-  *
-- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
-+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
-  *
-  * This software is licensed as described in the file COPYING, which
-  * you should have received as part of this distribution. The terms
-@@ -491,6 +491,11 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
-     if(result)
-       return result;
- 
-+    if(strlen(filename) > (state->blksize - strlen(mode) - 4)) {
-+      failf(data, "TFTP file name too long\n");
-+      return CURLE_TFTP_ILLEGAL; /* too long file name field */
-+    }
-+
-     snprintf((char *)state->spacket.data+2,
-              state->blksize,
-              "%s%c%s%c", filename, '\0',  mode, '\0');
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000101.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000101.patch
deleted file mode 100644
index c300fff..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000101.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 453e7a7a03a2cec749abd3878a48e728c515cca7 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Tue, 1 Aug 2017 17:16:07 +0200
-Subject: [PATCH] glob: do not continue parsing after a strtoul() overflow
- range
-
-Added test 1289 to verify.
-
-CVE: CVE-2017-1000101
-
-Bug: https://curl.haxx.se/docs/adv_20170809A.html
-Reported-by: Brian Carpenter
-
-Upstream-Status: Backport
-https://github.com/curl/curl/commit/453e7a7a03a2cec749abd3878a48e728c515cca7
-
-Rebase the tests/data/Makefile.inc changes for curl 7.54.1.
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- src/tool_urlglob.c      |  5 ++++-
- tests/data/Makefile.inc |  2 +-
- tests/data/test1289     | 35 +++++++++++++++++++++++++++++++++++
- 3 files changed, 40 insertions(+), 2 deletions(-)
- create mode 100644 tests/data/test1289
-
-diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
-index 6b1ece0..d56dcd9 100644
---- a/src/tool_urlglob.c
-+++ b/src/tool_urlglob.c
-@@ -273,7 +273,10 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
-         }
-         errno = 0;
-         max_n = strtoul(pattern, &endp, 10);
--        if(errno || (*endp == ':')) {
-+        if(errno)
-+          /* overflow */
-+          endp = NULL;
-+        else if(*endp == ':') {
-           pattern = endp+1;
-           errno = 0;
-           step_n = strtoul(pattern, &endp, 10);
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index 155320a..7adbee6 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -132,7 +132,7 @@ test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 \
- test1260 test1261 test1262 \
- \
- test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
--test1288 \
-+test1288 test1289 \
- \
- test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
- test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
-diff --git a/tests/data/test1289 b/tests/data/test1289
-new file mode 100644
-index 0000000..d679cc0
---- /dev/null
-+++ b/tests/data/test1289
-@@ -0,0 +1,35 @@
-+<testcase>
-+<info>
-+<keywords>
-+HTTP
-+HTTP GET
-+globbing
-+</keywords>
-+</info>
-+
-+#
-+# Server-side
-+<reply>
-+</reply>
-+
-+# Client-side
-+<client>
-+<server>
-+http
-+</server>
-+<name>
-+globbing with overflow and bad syntxx
-+</name>
-+<command>
-+http://ur%20[0-60000000000000000000
-+</command>
-+</client>
-+
-+# Verify data after the test has been "shot"
-+<verify>
-+# curl: (3) [globbing] bad range in column 
-+<errorcode>
-+3
-+</errorcode>
-+</verify>
-+</testcase>
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000254.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000254.patch
deleted file mode 100644
index 2b0798b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/CVE-2017-1000254.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 1b2eba6f9745c064f7283e0ada8f46df9d9d6e42 Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Mon, 23 Oct 2017 00:26:50 -0700
-Subject: [PATCH] FTP: zero terminate the entry path even on bad input
-
-... a single double quote could leave the entry path buffer without a zero
-terminating byte. CVE-2017-1000254
-
-Test 1152 added to verify.
-
-Reported-by: Max Dymond
-Bug: https://curl.haxx.se/docs/adv_20171004.html
-
-Upstream-Status: Backport
-CVE: CVE-2017-1000254
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- lib/ftp.c               |  7 ++++--
- tests/data/Makefile.inc |  2 ++
- tests/data/test1152     | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 68 insertions(+), 2 deletions(-)
- create mode 100644 tests/data/test1152
-
-diff --git a/lib/ftp.c b/lib/ftp.c
-index 5edec37..493dbf9 100644
---- a/lib/ftp.c
-+++ b/lib/ftp.c
-@@ -2826,6 +2826,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
-         const size_t buf_size = data->set.buffer_size;
-         char *dir;
-         char *store;
-+        bool entry_extracted = FALSE;
- 
-         dir = malloc(nread + 1);
-         if(!dir)
-@@ -2857,7 +2858,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
-               }
-               else {
-                 /* end of path */
--                *store = '\0'; /* zero terminate */
-+                entry_extracted = TRUE;
-                 break; /* get out of this loop */
-               }
-             }
-@@ -2866,7 +2867,9 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
-             store++;
-             ptr++;
-           }
--
-+          *store = '\0'; /* zero terminate */
-+        }
-+        if(entry_extracted) {
-           /* If the path name does not look like an absolute path (i.e.: it
-              does not start with a '/'), we probably need some server-dependent
-              adjustments. For example, this is the case when connecting to
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index 7adbee6..5284654 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -121,6 +121,8 @@ test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
- test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
- test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
- test1144 test1145 test1146 \
-+test1152 \
-+\
- test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
- test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
- test1216 test1217 test1218 test1219 \
-diff --git a/tests/data/test1152 b/tests/data/test1152
-new file mode 100644
-index 0000000..aa8c0a7
---- /dev/null
-+++ b/tests/data/test1152
-@@ -0,0 +1,61 @@
-+<testcase>
-+<info>
-+<keywords>
-+FTP
-+PASV
-+LIST
-+</keywords>
-+</info>
-+#
-+# Server-side
-+<reply>
-+<servercmd>
-+REPLY PWD 257 "just one
-+</servercmd>
-+
-+# When doing LIST, we get the default list output hard-coded in the test
-+# FTP server
-+<data mode="text">
-+total 20
-+drwxr-xr-x   8 98       98           512 Oct 22 13:06 .
-+drwxr-xr-x   8 98       98           512 Oct 22 13:06 ..
-+drwxr-xr-x   2 98       98           512 May  2  1996 curl-releases
-+-r--r--r--   1 0        1             35 Jul 16  1996 README
-+lrwxrwxrwx   1 0        1              7 Dec  9  1999 bin -> usr/bin
-+dr-xr-xr-x   2 0        1            512 Oct  1  1997 dev
-+drwxrwxrwx   2 98       98           512 May 29 16:04 download.html
-+dr-xr-xr-x   2 0        1            512 Nov 30  1995 etc
-+drwxrwxrwx   2 98       1            512 Oct 30 14:33 pub
-+dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
-+</data>
-+</reply>
-+
-+#
-+# Client-side
-+<client>
-+<server>
-+ftp
-+</server>
-+ <name>
-+FTP with uneven quote in PWD response
-+ </name>
-+ <command>
-+ftp://%HOSTIP:%FTPPORT/test-1152/
-+</command>
-+</client>
-+
-+#
-+# Verify data after the test has been "shot"
-+<verify>
-+<protocol>
-+USER anonymous
-+PASS ftp@example.com
-+PWD
-+CWD test-1152
-+EPSV
-+TYPE A
-+LIST
-+QUIT
-+</protocol>
-+</verify>
-+</testcase>
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch
deleted file mode 100644
index b8bd304..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status:  Pending
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -281,7 +281,7 @@ dnl ************************************
- 
- CURL_CHECK_COMPILER
- CURL_SET_COMPILER_BASIC_OPTS
--CURL_SET_COMPILER_DEBUG_OPTS
-+dnl CURL_SET_COMPILER_DEBUG_OPTS
- CURL_SET_COMPILER_OPTIMIZE_OPTS
- CURL_SET_COMPILER_WARNING_OPTS
- 
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/reproducible-mkhelp.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
deleted file mode 100644
index 268bbeb..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1fe92fd3dd64c7228f6ff41e3fc16c4f2392471a Mon Sep 17 00:00:00 2001
-From: Juro Bystricky <juro.bystricky@intel.com>
-Date: Fri, 27 Oct 2017 08:28:25 -0700
-Subject: mkhelp.pl: support reproducible build
-
-Do not generate line with the current date, such as:
-
-* Generation time: Tue Oct-24 18:01:41 2017
-
-This will improve reproducibility. The generated string is only
-part of a comment, so there should be no adverse consequences.
-
-Upstream-Status: Submitted [ https://github.com/curl/curl/pull/2026 ]
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-diff --git a/src/mkhelp.pl b/src/mkhelp.pl
-index 270daa2..757f024 100755
---- a/src/mkhelp.pl
-+++ b/src/mkhelp.pl
-@@ -102,11 +102,9 @@ while(<READ>) {
- }
- close(READ);
- 
--$now = localtime;
- print <<HEAD
- /*
-  * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
-- * Generation time: $now
-  */
- #ifdef USE_MANUAL
- #include "tool_hugehelp.h"
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.54.1.bb b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.54.1.bb
deleted file mode 100644
index 58f0531..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.54.1.bb
+++ /dev/null
@@ -1,87 +0,0 @@
-SUMMARY = "Command line tool and library for client-side URL transfers"
-HOMEPAGE = "http://curl.haxx.se/"
-BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
-SECTION = "console/network"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
-
-SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
-           file://0001-replace-krb5-config-with-pkg-config.patch \
-           file://CVE-2017-1000099.patch \
-           file://CVE-2017-1000100.patch \
-           file://CVE-2017-1000101.patch \
-           file://CVE-2017-1000254.patch \
-"
-
-SRC_URI_append_class-target = " \
-           file://reproducible-mkhelp.patch \
-"
-
-# curl likes to set -g0 in CFLAGS, so we stop it
-# from mucking around with debug options
-#
-SRC_URI += " file://configure_ac.patch"
-
-SRC_URI[md5sum] = "6b6eb722f512e7a24855ff084f54fe55"
-SRC_URI[sha256sum] = "fdfc4df2d001ee0c44ec071186e770046249263c491fcae48df0e1a3ca8f25a0"
-
-CVE_PRODUCT = "libcurl"
-inherit autotools pkgconfig binconfig multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy threaded-resolver zlib"
-PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver zlib"
-PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver zlib"
-
-# 'ares' and 'threaded-resolver' are mutually exclusive
-PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares"
-PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
-PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
-PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
-PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn"
-PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
-PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
-PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
-PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
-PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
-PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
-PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
-PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
-PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
-PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
-PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver"
-PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
-PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
-PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
-
-EXTRA_OECONF = " \
-    --enable-crypto-auth \
-    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
-    --without-libmetalink \
-    --without-libpsl \
-"
-
-do_install_append() {
-	oe_multilib_header curl/curlbuild.h
-}
-
-do_install_append_class-target() {
-	# cleanup buildpaths from curl-config
-	sed -i \
-	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    ${D}${bindir}/curl-config
-}
-
-PACKAGES =+ "lib${BPN}"
-
-FILES_lib${BPN} = "${libdir}/lib*.so.*"
-RRECOMMENDS_lib${BPN} += "ca-certificates"
-
-FILES_${PN} += "${datadir}/zsh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.60.0.bb
new file mode 100644
index 0000000..fe04fa6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.60.0.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Command line tool and library for client-side URL transfers"
+HOMEPAGE = "http://curl.haxx.se/"
+BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
+SECTION = "console/network"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
+
+SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
+           file://0001-replace-krb5-config-with-pkg-config.patch \
+"
+
+SRC_URI[md5sum] = "bd2aabf78ded6a9aec8a54532fd6b5d7"
+SRC_URI[sha256sum] = "897dfb2204bd99be328279f88f55b7c61592216b0542fcbe995c60aa92871e9b"
+
+CVE_PRODUCT = "libcurl"
+inherit autotools pkgconfig binconfig multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy threaded-resolver zlib"
+PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver zlib"
+
+# 'ares' and 'threaded-resolver' are mutually exclusive
+PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares"
+PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
+PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
+PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
+PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
+PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
+PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
+PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
+PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
+PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+
+EXTRA_OECONF = " \
+    --enable-crypto-auth \
+    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+    --without-libmetalink \
+    --without-libpsl \
+"
+
+do_install_append_class-target() {
+	# cleanup buildpaths from curl-config
+	sed -i \
+	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    ${D}${bindir}/curl-config
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+RRECOMMENDS_lib${BPN} += "ca-certificates"
+
+FILES_${PN} += "${datadir}/zsh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
index fb4befb..093ee44 100644
--- a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
@@ -12,9 +12,11 @@
 SUMMARY = "Berkeley Database v5"
 HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
 LICENSE = "Sleepycat"
-VIRTUAL_NAME ?= "virtual/db"
 RCONFLICTS_${PN} = "db3"
 
+CVE_PRODUCT = "oracle_berkeley_db"
+CVE_VERSION = "11.2.${PV}"
+
 PR = "r1"
 PE = "1"
 
@@ -37,15 +39,6 @@
 
 inherit autotools
 
-# Put virtual/db in any appropriate provider of a
-# relational database, use it as a dependency in
-# place of a specific db and use:
-#
-# PREFERRED_PROVIDER_virtual/db
-#
-# to select the correct db in the build (distro) .conf
-PROVIDES += "${VIRTUAL_NAME}"
-
 # The executables go in a separate package - typically there
 # is no need to install these unless doing real database
 # management on the system.
diff --git a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.1.1.bb b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.1.1.bb
deleted file mode 100644
index 1857d4b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.1.1.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Miscellaneous utilities specific to Debian"
-SECTION = "base"
-LICENSE = "GPLv2 & SMAIL_GPL"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20170402T211732Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
-# the package is taken from snapshots.debian.org; that source is static and goes stale
-# so we check the latest upstream from a directory that does get updated
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
-
-SRC_URI[md5sum] = "ee5fcecaab071bd0c93e8a0cee65d6c4"
-SRC_URI[sha256sum] = "06446cd4c0d309fd31a0682c5c2f07f7613fb867f769414b9cc51f155ad73172"
-
-inherit autotools update-alternatives
-
-do_configure_prepend() {
-    sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
-}
-
-do_install_append() {
-    if [ "${base_bindir}" != "${bindir}" ]; then
-        # Debian places some utils into ${base_bindir} as does busybox
-        install -d ${D}${base_bindir}
-        for app in run-parts tempfile; do
-            mv ${D}${bindir}/$app ${D}${base_bindir}/$app
-        done
-    fi
-}
-
-# Note that we package the update-alternatives name.
-#
-PACKAGES =+ "${PN}-run-parts"
-FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
-
-RDEPENDS_${PN} += "${PN}-run-parts"
-RDEPENDS_${PN}_class-native = ""
-
-ALTERNATIVE_PRIORITY="30"
-ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
-
-ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
-ALTERNATIVE_${PN}-run-parts = "run-parts"
-
-ALTERNATIVE_${PN}-doc = "which.1"
-ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
-
-ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
-ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
-ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
-ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
-ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
-ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
-ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb
new file mode 100644
index 0000000..300e6f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20180129T164727Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
+# the package is taken from snapshots.debian.org; that source is static and goes stale
+# so we check the latest upstream from a directory that does get updated
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
+
+SRC_URI[md5sum] = "a6dcd496b4f79b3c452c3a74c2d3f89c"
+SRC_URI[sha256sum] = "c061ab99aea61f892043b7624b021ab5b193e9c6bbfd474da0fbcdd506be1eb2"
+
+S = "${WORKDIR}/${BPN}"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+    sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
+}
+
+do_install_append() {
+    if [ "${base_bindir}" != "${bindir}" ]; then
+        # Debian places some utils into ${base_bindir} as does busybox
+        install -d ${D}${base_bindir}
+        for app in run-parts tempfile; do
+            mv ${D}${bindir}/$app ${D}${base_bindir}/$app
+        done
+    fi
+}
+
+# Note that we package the update-alternatives name.
+#
+PACKAGES =+ "${PN}-run-parts"
+FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
+
+RDEPENDS_${PN} += "${PN}-run-parts"
+RDEPENDS_${PN}_class-native = ""
+
+ALTERNATIVE_PRIORITY="30"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
+
+ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
+ALTERNATIVE_${PN}-run-parts = "run-parts"
+
+ALTERNATIVE_${PN}-doc = "which.1"
+ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
+
+ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
+ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
+ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
+ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
+ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
+ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
+ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.13.bb b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.13.bb
deleted file mode 100644
index 4bbe147..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.13.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Key/value database library with extensible hashing"
-HOMEPAGE = "http://www.gnu.org/software/gdbm/"
-SECTION = "libs"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
-
-
-SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
-           file://run-ptest \
-           file://ptest.patch \
-          "
-
-SRC_URI[md5sum] = "8929dcda2a8de3fd2367bdbf66769376"
-SRC_URI[sha256sum] = "9d252cbd7d793f7b12bcceaddda98d257c14f4d1890d851c386c37207000a253"
-
-inherit autotools gettext texinfo lib_package ptest
-
-# Needed for dbm python module
-EXTRA_OECONF = "-enable-libgdbm-compat"
-
-# Stop presence of dbm/nbdm on the host contaminating builds
-CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_append () {
-    # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
-    # these headers
-    install -d ${D}${includedir}/gdbm
-    ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
-    ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
-}
-
-RDEPENDS_${PN}-ptest += "diffutils"
-
-do_compile_ptest() {
-    oe_runmake -C tests buildtests
-}
-
-PACKAGES =+ "${PN}-compat \
-            "
-FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
-                     "
diff --git a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb
new file mode 100644
index 0000000..54e5696
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Key/value database library with extensible hashing"
+HOMEPAGE = "http://www.gnu.org/software/gdbm/"
+SECTION = "libs"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
+
+
+SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
+           file://run-ptest \
+           file://ptest.patch \
+          "
+
+SRC_URI[md5sum] = "c2ddcb3897efa0f57484af2bd4f4f848"
+SRC_URI[sha256sum] = "cdceff00ffe014495bed3aed71c7910aa88bf29379f795abc0f46d4ee5f8bc5f"
+
+inherit autotools gettext texinfo lib_package ptest
+
+# Needed for dbm python module
+EXTRA_OECONF = "-enable-libgdbm-compat"
+
+# Stop presence of dbm/nbdm on the host contaminating builds
+CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append () {
+    # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+    # these headers
+    install -d ${D}${includedir}/gdbm
+    ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+    ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}
+
+RDEPENDS_${PN}-ptest += "diffutils"
+
+do_compile_ptest() {
+    oe_runmake -C tests buildtests
+}
+
+PACKAGES =+ "${PN}-compat \
+            "
+FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
+                     "
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
index 6653676..1e47924 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
@@ -18,13 +18,13 @@
  configure.ac | 11 -----------
  1 file changed, 11 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index 857ea3b..359e919 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -607,15 +607,6 @@ case $host in
-     GMP_INCLUDE_MPN(arm/arm-defs.m4)
-     CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo'
+Index: gmp-6.1.2/configure.ac
+===================================================================
+--- gmp-6.1.2.orig/configure.ac
++++ gmp-6.1.2/configure.ac
+@@ -604,15 +604,6 @@ case $host in
+     any_32_testlist="sizeof-long-4"
+     any_64_testlist="sizeof-long-8"
  
 -    # This is needed for clang, which is not content with flags like -mfpu=neon
 -    # alone.
@@ -38,7 +38,7 @@
      # FIXME: We make mandatory compiler options optional here.  We should
      # either enforce them, or organise to strip paths as the corresponding
      # options fail.
-@@ -686,8 +677,6 @@ case $host in
+@@ -746,8 +737,6 @@ case $host in
  	;;
        *)
  	path="arm"
@@ -47,6 +47,3 @@
  	;;
      esac
      ;;
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
index 564d12d..3935589 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
@@ -1,10 +1,10 @@
 Upstream-Status: Pending
 
-Index: gmp-5.0.3/longlong.h
+Index: gmp-6.1.2/longlong.h
 ===================================================================
---- gmp-5.0.3.orig/longlong.h
-+++ gmp-5.0.3/longlong.h
-@@ -994,8 +994,10 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
+--- gmp-6.1.2.orig/longlong.h
++++ gmp-6.1.2/longlong.h
+@@ -1036,8 +1036,10 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype
     count is only an int. */
  #define count_trailing_zeros(count, x)					\
    do {									\
@@ -14,5 +14,5 @@
 +    __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x)));	\
 +    (count) = __cbtmp;							\
    } while (0)
- #endif /* x86_64 */
+ #endif /* __amd64__ */
  
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
index 74904a2..6b089cf 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
@@ -1,15 +1,15 @@
 Upstream-Status: Pending
 
-Index: gmp-4.2.4/Makefile.am
+Index: gmp-6.1.2/Makefile.am
 ===================================================================
---- gmp-4.2.4.orig/Makefile.am	2008-09-10 19:31:27.000000000 +0000
-+++ gmp-4.2.4/Makefile.am	2009-07-06 20:19:19.000000000 +0000
-@@ -106,7 +106,7 @@
- # but anyone knowledgable enough to be playing with exec_prefix will be able
+--- gmp-6.1.2.orig/Makefile.am
++++ gmp-6.1.2/Makefile.am
+@@ -130,7 +130,7 @@ EXTRA_DIST += gmpxx.h
+ # but anyone knowledgeable enough to be playing with exec_prefix will be able
  # to address that.
  #
 -includeexecdir = $(exec_prefix)/include
 +includeexecdir = $(includedir)
  include_HEADERS = $(GMPXX_HEADERS_OPTION)
- nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
- lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
+ nodist_includeexec_HEADERS = gmp.h
+ lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION)
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
new file mode 100644
index 0000000..3e3a64d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
@@ -0,0 +1,30 @@
+From 0b97148c3aad0993a9aeb088596fa63a2fec5328 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 22 Jan 2018 18:00:21 +0200
+Subject: [PATCH] configure.ac: use a custom value for the location of
+ gpg-agent socket in the filesystem
+
+This should avoid clashes with the host gpg-agent observed on autobuilders.
+
+Upstream-Status: Inappropriate [oe-core specific, and only for -native]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 382ef1d..0570d7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1818,7 +1818,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
+ 
+ AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
+ 
+-AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent",
++AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent.yocto-native",
+                    [The name of the agent socket])
+ AC_DEFINE_UNQUOTED(GPG_AGENT_EXTRA_SOCK_NAME, "S.gpg-agent.extra",
+                    [The name of the agent socket for remote access])
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.0.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.0.bb
deleted file mode 100644
index 0176ddd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.0.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
-HOMEPAGE = "http://www.gnupg.org/"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
-                    file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
-
-DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
-
-inherit autotools gettext texinfo pkgconfig
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch \
-           file://0002-use-pkgconfig-instead-of-npth-config.patch \
-           file://0003-dirmngr-uses-libgpg-error.patch \
-           file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
-          "
-
-SRC_URI[md5sum] = "789f16949fae2d003d387f49e9da4b74"
-SRC_URI[sha256sum] = "d4514a0be0f7a1ff263193330019eb4b53c82f0f5e230af3c14df371271a45e6"
-
-EXTRA_OECONF = "--disable-ldap \
-		--disable-ccid-driver \
-		--with-zlib=${STAGING_LIBDIR}/.. \
-		--with-bzip2=${STAGING_LIBDIR}/.. \
-		--with-readline=${STAGING_LIBDIR}/.. \
-		--enable-gpg-is-gpg2 \
-               "
-RRECOMMENDS_${PN} = "pinentry"
-
-do_configure_prepend () {
-	# Else these could be used in prefernce to those in aclocal-copy
-	rm -f ${S}/m4/gpg-error.m4
-	rm -f ${S}/m4/libassuan.m4
-	rm -f ${S}/m4/ksba.m4
-	rm -f ${S}/m4/libgcrypt.m4
-}
-
-do_install_append() {
-	ln -sf gpg2 ${D}${bindir}/gpg
-	ln -sf gpgv2 ${D}${bindir}/gpgv
-}
-
-PACKAGECONFIG ??= "gnutls"
-PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
-PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb
new file mode 100644
index 0000000..d3f1a8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb
@@ -0,0 +1,50 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
+                    file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
+
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
+
+inherit autotools gettext texinfo pkgconfig
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+           file://0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch \
+           file://0002-use-pkgconfig-instead-of-npth-config.patch \
+           file://0003-dirmngr-uses-libgpg-error.patch \
+           file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
+          "
+SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch"
+
+
+SRC_URI[md5sum] = "709e5af5bba84d251c520222e720972f"
+SRC_URI[sha256sum] = "401a3e64780fdfa6d7670de0880aa5c9d589b3db7a7098979d7606cec546f2ec"
+
+EXTRA_OECONF = "--disable-ldap \
+		--disable-ccid-driver \
+		--with-zlib=${STAGING_LIBDIR}/.. \
+		--with-bzip2=${STAGING_LIBDIR}/.. \
+		--with-readline=${STAGING_LIBDIR}/.. \
+		--enable-gpg-is-gpg2 \
+               "
+RRECOMMENDS_${PN} = "pinentry"
+
+do_configure_prepend () {
+	# Else these could be used in prefernce to those in aclocal-copy
+	rm -f ${S}/m4/gpg-error.m4
+	rm -f ${S}/m4/libassuan.m4
+	rm -f ${S}/m4/ksba.m4
+	rm -f ${S}/m4/libgcrypt.m4
+}
+
+do_install_append() {
+	ln -sf gpg2 ${D}${bindir}/gpg
+	ln -sf gpgv2 ${D}${bindir}/gpgv
+}
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
index 29b5dd6..7bcb913 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
@@ -21,7 +21,7 @@
 
 inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc
 
-PACKAGECONFIG ??= "libidn zlib"
+PACKAGECONFIG ??= "libidn"
 
 # You must also have CONFIG_SECCOMP enabled in the kernel for
 # seccomp to work.
@@ -32,7 +32,6 @@
 PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
 PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
 PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
 
 EXTRA_OECONF = " \
     --enable-doc \
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
index f0b7ca2..b6e7bc9 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
@@ -14,19 +14,16 @@
  configure.ac | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/configure.ac b/configure.ac
-index 6907b21..7c70d9e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -948,7 +948,7 @@ YEAR=`date +%Y`
+Index: gnutls-3.5.16/configure.ac
+===================================================================
+--- gnutls-3.5.16.orig/configure.ac
++++ gnutls-3.5.16/configure.ac
+@@ -955,7 +955,7 @@ YEAR=`date +%Y`
  AC_SUBST([YEAR], $YEAR)
  
  for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
 -	nam=$(basename $i|sed 's/.bak//g')
 +	nam=$(basename $i|sed 's/\.bak$//')
  	if test "$create_libopts_links" = "yes";then
+ 		rm -f "src/$nam.stamp"
  		rm -f "src/$nam"
- 		AC_CONFIG_LINKS([src/$nam:$i])
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
deleted file mode 100644
index ae141a5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 18081068a97c00015aabc5fa321664951458ea0d Mon Sep 17 00:00:00 2001
-From: Fan Xin <fan.xin@jp.fujitsu.com>
-Date: Fri, 9 Jun 2017 15:20:31 +0900
-Subject: [PATCH] From cee80af1fe93f5b76765afeebfcc3b902768f5d6 Mon Sep 17
- 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Tue, 26 May
- 2015 21:41:24 -0700 Subject: [PATCH] use pkg-config to locate zlib
-
-AC_LIB_HAVE_LINKFLAGS can sometimes find host libs and is therefore not
-robust when cross-compiling. Remove it for zlib and use PKG_CHECK_MODULES
-instead.
-
-Removing AC_LIB_HAVE_LINKFLAGS for zlib also removes the --with-libz-prefix
-configure option. If zlib support is enabled, then failure to find zlib via
-pkg-config is now treated as a fatal error.
-
-Change based on ChromeOS gnutls 2.12.23 cross-compile fixes patch:
-
-  https://chromium-review.googlesource.com/#/c/271661/
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-Rebase on gnutls 3.5.13
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
----
- configure.ac | 25 +++++++++----------------
- 1 file changed, 9 insertions(+), 16 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c65268e..f6a18aa 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -735,28 +735,21 @@ AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
- AC_MSG_CHECKING([whether to include zlib compression support])
- if test x$ac_zlib != xno; then
-  AC_MSG_RESULT(yes)
-- AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
-- if test x$ac_cv_libz != xyes; then
--   AC_MSG_WARN(
--*** 
--*** ZLIB was not found. You will not be able to use ZLIB compression.)
-- fi
- else
-  AC_MSG_RESULT(no)
- fi
- 
--PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
--
- if test x$ac_zlib != xno; then
--  if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
--    if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
--      GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
--    else
--      GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
--    fi
--    LIBZ_PC=""
-+  PKG_CHECK_MODULES(ZLIB, zlib)
-+  HAVE_LIBZ=yes
-+  AC_DEFINE([HAVE_LIBZ], [1], [zlib is enabled])
-+  AC_SUBST(HAVE_LIBZ)
-+  LTLIBZ=$ZLIB_LIBS
-+  AC_SUBST(LTLIBZ)
-+  if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
-+    GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
-   else
--    LIBZ_PC=$LIBZ
-+    GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
-   fi
- fi
- AC_SUBST(LIBZ_PC)
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.13.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.13.bb
deleted file mode 100644
index 35d7d09..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.13.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require gnutls.inc
-
-SRC_URI += "file://0001-configure.ac-fix-sed-command.patch \
-            file://use-pkg-config-to-locate-zlib.patch \
-            file://arm_eabi.patch \
-           "
-SRC_URI[md5sum] = "4fd41ad86572933c2379b4cc321a0959"
-SRC_URI[sha256sum] = "79f5480ad198dad5bc78e075f4a40c4a315a1b2072666919d2d05a08aec13096"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb
new file mode 100644
index 0000000..7624a20
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb
@@ -0,0 +1,9 @@
+require gnutls.inc
+
+SRC_URI += "file://0001-configure.ac-fix-sed-command.patch \
+            file://arm_eabi.patch \
+           "
+SRC_URI[md5sum] = "4b65ae3ffef59f3eeed51a6166ff12b3"
+SRC_URI[sha256sum] = "20b10d2c9994bc032824314714d0e84c0f19bdb3d715d8ed55beb7364a8ebaed"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/CVE-2017-10790.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/CVE-2017-10790.patch
deleted file mode 100644
index be84380..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/CVE-2017-10790.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d8d805e1f2e6799bb2dff4871a8598dc83088a39 Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
-Date: Thu, 22 Jun 2017 16:31:37 +0200
-Subject: [PATCH] _asn1_check_identifier: safer access to values read
-
-Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-
-http://git.savannah.gnu.org/gitweb/?p=libtasn1.git;a=commit;h=d8d805e1f2e6799bb2dff4871a8598dc83088a39
-Upstream-Status: Backport
-
-CVE: CVE-2017-10790
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- lib/parser_aux.c |   17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/lib/parser_aux.c b/lib/parser_aux.c
-index 976ab38..786ea64 100644
---- a/lib/parser_aux.c
-+++ b/lib/parser_aux.c
-@@ -955,7 +955,7 @@ _asn1_check_identifier (asn1_node node)
- 	  if (p2 == NULL)
- 	    {
- 	      if (p->value)
--		_asn1_strcpy (_asn1_identifierMissing, p->value);
-+		_asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p->value);
- 	      else
- 		_asn1_strcpy (_asn1_identifierMissing, "(null)");
- 	      return ASN1_IDENTIFIER_NOT_FOUND;
-@@ -968,9 +968,15 @@ _asn1_check_identifier (asn1_node node)
- 	  if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT))
- 	    {
- 	      _asn1_str_cpy (name2, sizeof (name2), node->name);
--	      _asn1_str_cat (name2, sizeof (name2), ".");
--	      _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
--	      _asn1_strcpy (_asn1_identifierMissing, p2->value);
-+	      if (p2->value)
-+	        {
-+	          _asn1_str_cat (name2, sizeof (name2), ".");
-+	          _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
-+	          _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
-+	        }
-+	      else
-+		_asn1_strcpy (_asn1_identifierMissing, "(null)");
-+
- 	      p2 = asn1_find_node (node, name2);
- 	      if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID) ||
- 		  !(p2->type & CONST_ASSIGN))
-@@ -990,7 +996,8 @@ _asn1_check_identifier (asn1_node node)
- 		  _asn1_str_cpy (name2, sizeof (name2), node->name);
- 		  _asn1_str_cat (name2, sizeof (name2), ".");
- 		  _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
--		  _asn1_strcpy (_asn1_identifierMissing, p2->value);
-+		  _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
-+
- 		  p2 = asn1_find_node (node, name2);
- 		  if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID)
- 		      || !(p2->type & CONST_ASSIGN))
--- 
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.12.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.12.bb
deleted file mode 100644
index 7a7571a..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.12.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Library for ASN.1 and DER manipulation"
-HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN}-bin = "GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
-                    file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
-
-SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
-           file://dont-depend-on-help2man.patch \
-           file://0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch \
-           file://CVE-2017-10790.patch \
-           "
-
-DEPENDS = "bison-native"
-
-SRC_URI[md5sum] = "5c724bd1f73aaf4a311833e1cd297b21"
-SRC_URI[sha256sum] = "6753da2e621257f33f5b051cc114d417e5206a0818fe0b1ecfd6153f70934753"
-
-inherit autotools texinfo binconfig lib_package gtk-doc
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.13.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.13.bb
new file mode 100644
index 0000000..2d22386
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.13.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Library for ASN.1 and DER manipulation"
+HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+                    file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
+
+SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
+           file://dont-depend-on-help2man.patch \
+           file://0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch \
+           "
+
+DEPENDS = "bison-native"
+
+SRC_URI[md5sum] = "ce2ba4d3088119b48e7531a703669c52"
+SRC_URI[sha256sum] = "7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca"
+
+inherit autotools texinfo binconfig lib_package gtk-doc
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
index 14a43ee..f1997e1 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
@@ -1,7 +1,7 @@
-From 8ae149035c97d27cd2c624704d1651806c53577e Mon Sep 17 00:00:00 2001
+From 265faf8fe0acaca2043a248a4df02b0868ffa6de Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Wed, 16 Aug 2017 02:00:08 -0400
-Subject: [PATCH 1/5] pkgconfig
+Subject: [PATCH 1/4] pkgconfig
 
 Update gpgme to use pkgconfig instead of -config files since its
 simpler and less error prone when cross compiling.
@@ -25,10 +25,10 @@
  create mode 100644 src/gpgme.pc.in
 
 diff --git a/configure.ac b/configure.ac
-index 0dac6ce..6a9e507 100644
+index 6ea4bcd..2a0d528 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -866,6 +866,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
+@@ -887,6 +887,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
                  src/versioninfo.rc
                  src/gpgme.h)
  AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
@@ -299,5 +299,5 @@
 +Requires: libassuan gpg-error
 \ No newline at end of file
 -- 
-2.8.1
+1.8.3.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
index f1f8c91..d20271e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
@@ -1,29 +1,28 @@
-From fb165c9bd96aca8c9ee3e4509c9b6e35d238ad2e Mon Sep 17 00:00:00 2001
-From: Mark Hatle <mark.hatle@windriver.com>
-Date: Wed, 16 Aug 2017 02:02:47 -0400
-Subject: [PATCH 2/5] gpgme/lang/python: gpg-error-config should not be used.
+From 30f7a694cc4568ecb24f77c83a6123ed3f4075fa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Jan 2018 10:44:19 +0800
+Subject: [PATCH] gpgme/lang/python: gpg-error-config should not be used
 
-gpg-error-config was modified by OE to always return an error.  So we want
-to find an alternative way to retrieve whatever it is we need.  It turns
-out that the system is just trying to find the path to the gpg-error.h, which
-we can pull in from the STAGING_INC environment.
+gpg-error-config was modified by OE to always return an error.
+So we want to find an alternative way to retrieve whatever it
+is we need.
 
 Upstream-Status: Inappropriate [changes are specific to OE]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
-Rebase to 1.9.0
+Rework to 1.10.0
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
- lang/python/setup.py.in | 15 ++-------------
- 1 file changed, 2 insertions(+), 13 deletions(-)
+ lang/python/setup.py.in | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
 
 diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
-index bf4efa3..7c34487 100755
+index f9dda20..9f5d61f 100755
 --- a/lang/python/setup.py.in
 +++ b/lang/python/setup.py.in
-@@ -24,7 +24,6 @@ import glob
+@@ -26,7 +26,6 @@ import shutil
  import subprocess
  
  # Out-of-tree build of the gpg bindings.
@@ -31,35 +30,22 @@
  gpgme_config_flags = ["--thread=pthread"]
  gpgme_config = ["gpgme-config"] + gpgme_config_flags
  gpgme_h = ""
-@@ -52,13 +51,6 @@ else:
-     devnull = open(os.devnull, "w")
+@@ -174,14 +173,7 @@ class BuildExtFirstHack(build):
  
- try:
--    subprocess.check_call(gpg_error_config + ['--version'],
--                          stdout=devnull)
--except:
--    sys.exit("Could not find gpg-error-config.  " +
--             "Please install the libgpg-error development package.")
+     def _generate_errors_i(self):
+ 
+-        try:
+-            subprocess.check_call(gpg_error_config + ['--version'],
+-                                  stdout=devnull)
+-        except:
+-            sys.exit("Could not find gpg-error-config.  " +
+-                     "Please install the libgpg-error development package.")
 -
--try:
-     subprocess.check_call(gpgme_config + ['--version'],
-                           stdout=devnull)
- except:
-@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and minor >= 7)):
- if not gpgme_h:
-     gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h")
+-        gpg_error_content = self._read_header("gpg-error.h", getconfig("cflags", config=gpg_error_config))
++        gpg_error_content = self._read_header("gpg-error.h", os.environ.get('CFLAGS').split())
  
--gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0]
--gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h")
-+gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h")
- if not os.path.exists(gpg_error_h):
--    gpg_error_h = \
--        glob.glob(os.path.join(gpg_error_prefix, "include",
--                               "*", "gpg-error.h"))[0]
-+    sys.exit("gpg_error_h not found: %s" % gpg_error_h)
- 
- print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h))
- 
+         filter_re = re.compile(r'GPG_ERR_[^ ]* =')
+         rewrite_re = re.compile(r' *(.*) = .*')
 -- 
-2.8.1
+1.8.3.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
index d383311..7c9cccc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
@@ -1,7 +1,7 @@
-From 62332eec752dd790f4dd071dfb0dbe86be377203 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 16 Aug 2017 02:05:34 -0400
-Subject: [PATCH 3/5] Correctly install python modules
+From 93aae34ee70b8d50b31a19a65d6ac8290cb148ae Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 15:28:49 +0800
+Subject: [PATCH 2/4] Correctly install python modules
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
@@ -9,22 +9,25 @@
 Rebase to 1.9.0
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Rebase to 1.10.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
  lang/python/Makefile.am | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
-index d91ead9..67f7cdc 100644
+index 8d74cbd..ce4f0a5 100644
 --- a/lang/python/Makefile.am
 +++ b/lang/python/Makefile.am
-@@ -106,6 +106,7 @@ install-exec-local:
- 	  cd python$${VERSION}-gpg ; \
- 	  $$PYTHON setup.py install \
- 	  --prefix $(DESTDIR)$(prefix) \
+@@ -91,6 +91,7 @@ install-exec-local:
+ 	  --build-base="$$(basename "$${PYTHON}")-gpg" \
+ 	  install \
+ 	  --prefix "$(DESTDIR)$(prefix)" \
 +	  --install-lib=$(DESTDIR)${pythondir} \
- 	  --record files.txt \
  	  --verbose ; \
- 	  cat files.txt >> ../install_files.txt ; \
+ 	done
+ 
 -- 
-2.8.1
+1.8.3.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
index 9307103..d2b039d 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
@@ -1,7 +1,7 @@
-From ccbf028eea8815d3b16d6c34b527253a6b108ec3 Mon Sep 17 00:00:00 2001
+From 32ecc3f058307060e40af86127cd226248a73c41 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Wed, 16 Aug 2017 02:06:45 -0400
-Subject: [PATCH 4/5] python import
+Subject: [PATCH 3/4] python import
 
 Don't check for output on stderr to know if an import worked, host inputrc and
 sysroot readline can cause warnings on stderr.
@@ -30,5 +30,5 @@
  	else
  		AC_MSG_RESULT([no])
 -- 
-2.8.1
+1.8.3.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
index 7a6cc7b..963ae87 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
@@ -1,7 +1,7 @@
-From 064ae4441e2c11329748a18157988f9e953f9752 Mon Sep 17 00:00:00 2001
+From 6dcedc4dd055af902719b1a1cb10daa935a27f58 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 13 Apr 2017 16:40:27 +0300
-Subject: [PATCH 5/5] gpgme-config: skip all /lib* or /usr/lib* directories in
+Subject: [PATCH 4/4] gpgme-config: skip all /lib* or /usr/lib* directories in
  output
 
 The logic was not working in multilib setups which use other
@@ -27,5 +27,5 @@
                        ;;
                    -L*|-l*)
 -- 
-2.8.1
+1.8.3.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
new file mode 100644
index 0000000..8cc8983
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
@@ -0,0 +1,37 @@
+From 180a5669e4a13a550b1b0dcef1689b6c0470fe54 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Jan 2018 11:01:09 +0800
+Subject: [PATCH] fix build path issue
+
+Get the "--root" directory supplied to the "install" command,
+and use it as a prefix to strip off the purported filename
+encoded in bytecode files.
+
+Since --root added, we need to tweak --prefix and --install-lib
+to use relative path.
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/Makefile.am | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index ce4f0a5..5a468f1 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -90,8 +90,9 @@ install-exec-local:
+ 	  build \
+ 	  --build-base="$$(basename "$${PYTHON}")-gpg" \
+ 	  install \
+-	  --prefix "$(DESTDIR)$(prefix)" \
+-	  --install-lib=$(DESTDIR)${pythondir} \
++	  --root=${DESTDIR} \
++	  --prefix "$(prefix)" \
++	  --install-lib=${pythondir} \
+ 	  --verbose ; \
+ 	done
+ 
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch
new file mode 100644
index 0000000..ce3745c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch
@@ -0,0 +1,78 @@
+From f47e8c6f9e461803468a64581d3640d873352eaa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Feb 2018 10:14:30 +0800
+Subject: [PATCH] qt/python: Add variables to tests
+
+* configure.ac, lang/python/Makefile.am:
+  New variable to `lang/python', set to `lang/python' if RUN_LANG_PYTHON_TESTS
+
+* configure.ac, lang/qt/Makefile.am:
+  New variable to `lang/qt', set to `lang/qt' if RUN_LANG_QT_TESTS
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac            | 11 +++++++++++
+ lang/python/Makefile.am |  3 +++
+ lang/qt/Makefile.am     |  8 +++++++-
+ 3 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 608c376..fad7467 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -536,6 +536,17 @@ AC_ARG_ENABLE(g13-test,
+          run_g13_test=$enableval)
+ AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
+ 
++run_lang_python_test="yes"
++AC_ARG_ENABLE(lang-python-test,
++  AC_HELP_STRING([--disable-lang-python-test], [disable Python regression test]),
++         run_lang_python_test=$enableval)
++AM_CONDITIONAL(RUN_LANG_PYTHON_TESTS, test "$run_lang_python_test" = "yes")
++
++run_lang_qt_test="yes"
++AC_ARG_ENABLE(lang-qt-test,
++  AC_HELP_STRING([--disable-lang-qt-test], [disable Qt regression test]),
++         run_lang_qt_test=$enableval)
++AM_CONDITIONAL(RUN_LANG_QT_TESTS, test "$run_lang_qt_test" = "yes")
+ 
+ # Checks for header files.
+ AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 8d74cbd..43b5d1e 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -24,7 +24,10 @@ EXTRA_DIST = \
+ 	examples \
+ 	src
+ 
++if RUN_LANG_PYTHON_TESTS
+ SUBDIRS = . tests
++endif
++
+ 
+ .PHONY: prepare
+ prepare: copystamp
+diff --git a/lang/qt/Makefile.am b/lang/qt/Makefile.am
+index ab85960..a244ede 100644
+--- a/lang/qt/Makefile.am
++++ b/lang/qt/Makefile.am
+@@ -19,6 +19,12 @@
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ # 02111-1307, USA
+ 
+-SUBDIRS = src tests doc
++if RUN_LANG_QT_TESTS
++qttests = tests
++else
++qttests =
++endif
++
++SUBDIRS = src ${qttests} doc
+ 
+ EXTRA_DIST = README
+-- 
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb
new file mode 100644
index 0000000..f015f3a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb
@@ -0,0 +1,86 @@
+SUMMARY = "High-level GnuPG encryption/signing API"
+DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
+HOMEPAGE = "http://www.gnupg.org/gpgme.html"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
+                    file://src/gpgme.h.in;endline=23;md5=9d157d08a69059344e6f82abd2d25781 \
+                    file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
+           file://0001-pkgconfig.patch \
+           file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
+           file://0003-Correctly-install-python-modules.patch \
+           file://0004-python-import.patch \
+           file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
+           file://0006-fix-build-path-issue.patch \
+           file://0007-qt-python-Add-variables-to-tests.patch \
+          "
+
+SRC_URI[md5sum] = "78b1533c593478982ee2fc548260c563"
+SRC_URI[sha256sum] = "1a8fed1197c3b99c35f403066bb344a26224d292afc048cfdfc4ccd5690a0693"
+
+DEPENDS = "libgpg-error libassuan"
+RDEPENDS_${PN}-cpp += "libstdc++"
+
+RDEPENDS_python2-gpg += "python-unixadmin"
+RDEPENDS_python3-gpg += "python3-unixadmin"
+
+BINCONFIG = "${bindir}/gpgme-config"
+
+# Note select python2 or python3, but you can't select both at the same time
+PACKAGECONFIG ??= "python3"
+PACKAGECONFIG[python2] = ",,python swig-native,"
+PACKAGECONFIG[python3] = ",,python3 swig-native,"
+
+# Default in configure.ac: "cl cpp python qt"
+# Supported: "cl cpp python python2 python3 qt"
+# python says 'search and find python2 or python3'
+
+# Building the C++ bindings for native requires a C++ compiler with C++11
+# support. Since these bindings are currently not needed, we can disable them.
+DEFAULT_LANGUAGES = ""
+DEFAULT_LANGUAGES_class-target = "cpp"
+LANGUAGES ?= "${DEFAULT_LANGUAGES}"
+LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}"
+LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}"
+
+PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
+PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
+
+EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
+                 --disable-gpgconf-test \
+                 --disable-gpg-test \
+                 --disable-gpgsm-test \
+                 --disable-g13-test \
+                 --disable-lang-qt-test \
+                 --disable-lang-python-test \
+'
+
+inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
+
+export PKG_CONFIG='pkg-config'
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "${PN}-cpp"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
+
+FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
+FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
+                    ${libdir}/cmake/* \
+"
+
+CFLAGS_append_libc-musl = " -D__error_t_defined "
+do_configure_prepend () {
+	# Else these could be used in preference to those in aclocal-copy
+	rm -f ${S}/m4/gpg-error.m4
+	rm -f ${S}/m4/libassuan.m4
+	rm -f ${S}/m4/python.m4
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.9.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.9.0.bb
deleted file mode 100644
index 065c346..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.9.0.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "High-level GnuPG encryption/signing API"
-DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
-HOMEPAGE = "http://www.gnupg.org/gpgme.html"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
-                    file://src/gpgme.h.in;endline=23;md5=9d157d08a69059344e6f82abd2d25781 \
-                    file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
-           file://0001-pkgconfig.patch \
-           file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
-           file://0003-Correctly-install-python-modules.patch \
-           file://0004-python-import.patch \
-           file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
-          "
-
-SRC_URI[md5sum] = "1e00bb8ef04d1d05d5a0f19e143854c3"
-SRC_URI[sha256sum] = "1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb"
-
-DEPENDS = "libgpg-error libassuan"
-RDEPENDS_${PN}-cpp += "libstdc++"
-
-RDEPENDS_python2-gpg += "python-unixadmin"
-RDEPENDS_python3-gpg += "python3-unixadmin"
-
-BINCONFIG = "${bindir}/gpgme-config"
-
-# Note select python2 or python3, but you can't select both at the same time
-PACKAGECONFIG ??= "python3"
-PACKAGECONFIG[python2] = ",,python swig-native,"
-PACKAGECONFIG[python3] = ",,python3 swig-native,"
-
-# Default in configure.ac: "cl cpp python qt"
-# Supported: "cl cpp python python2 python3 qt"
-# python says 'search and find python2 or python3'
-
-# Building the C++ bindings for native requires a C++ compiler with C++11
-# support. Since these bindings are currently not needed, we can disable them.
-DEFAULT_LANGUAGES = ""
-DEFAULT_LANGUAGES_class-target = "cpp"
-LANGUAGES ?= "${DEFAULT_LANGUAGES}"
-LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}"
-LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}"
-
-PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
-PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
-
-EXTRA_OECONF += '--enable-languages="${LANGUAGES}"'
-
-inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
-
-export PKG_CONFIG='pkg-config'
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGES =+ "${PN}-cpp"
-PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
-PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
-
-FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
-FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
-                    ${libdir}/cmake/* \
-"
-
-CFLAGS_append_libc-musl = " -D__error_t_defined "
-do_configure_prepend () {
-	# Else these could be used in preference to those in aclocal-copy
-	rm -f ${S}/m4/gpg-error.m4
-	rm -f ${S}/m4/libassuan.m4
-	rm -f ${S}/m4/python.m4
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc b/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
index a1ef9ec..983118c 100644
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
@@ -17,6 +17,8 @@
 
 BINCONFIG = "${bindir}/icu-config"
 
+ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
+
 inherit autotools pkgconfig binconfig
 
 # ICU needs the native build directory as an argument to its --with-cross-build option when
@@ -26,6 +28,8 @@
 EXTRA_OECONF_class-native = ""
 EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 
+EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
+TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}"
 
 # strtod_l() is not supported by musl; also xlocale.h is missing
 # It is not possible to disable its use via configure switches or env vars
@@ -34,6 +38,15 @@
     sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' ${S}/configure.ac
 }
 
+do_compile_prepend_class-target () {
+	# Make sure certain build host references do not end up being compiled
+	# in the image. This only affects libicutu and icu-dbg
+	sed  \
+	    -e 's,DU_BUILD=,DU_BUILD_unused=,g' \
+	    -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -i ${B}/tools/toolutil/Makefile
+}
+
 PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
 do_install_append_class-native() {
 	mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
@@ -44,6 +57,23 @@
 	cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
 }
 
+do_install_append_class-target() {
+    # The native pkgdata can not generate the correct data file.
+    # Use icupkg to re-generate it.
+    if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
+        rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+        icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+    fi
+	
+	# Remove build host references...
+	sed -i  \
+	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \
+	    ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc
+}
+
 PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
 
 FILES_${PN}-dev += "${libdir}/${BPN}/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
index add0d76..f0c49e1 100644
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
@@ -1,31 +1,34 @@
-From c4254fd8ff1888ca285e3242b812010357ce2b3e Mon Sep 17 00:00:00 2001
+From d6b57c1b4eb9a24d9d95342a961c93946539c93b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 24 Jun 2017 22:52:40 -0700
-Subject: [PATCH] i18n: Drop include <xlocale.h>
+Subject: [PATCH 3/4] i18n: Drop include <xlocale.h>
 
 glibc 2.26 drops this header
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
 Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
- i18n/digitlst.cpp | 6 +-----
+---
+ source/i18n/digitlst.cpp | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
 
-Index: source/i18n/digitlst.cpp
-===================================================================
---- source.orig/i18n/digitlst.cpp
-+++ source/i18n/digitlst.cpp
-@@ -61,11 +61,7 @@
+diff --git a/source/i18n/digitlst.cpp b/source/i18n/digitlst.cpp
+index 8e86fa7..0bdbb2c 100644
+--- a/i18n/digitlst.cpp
++++ b/i18n/digitlst.cpp
+@@ -62,11 +62,7 @@
  #endif
  
  #if U_USE_STRTOD_L
--# if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN
--#   include <locale.h>
--# else
+-# if U_HAVE_XLOCALE_H
 -#   include <xlocale.h>
+-# else
+-#   include <locale.h>
 -# endif
 +# include <locale.h>
  #endif
  
  // ***************************************************************************
+-- 
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/CVE-2017-14952.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/CVE-2017-14952.patch
deleted file mode 100644
index f759efc..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/CVE-2017-14952.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From fc83cd832725d3968011f118637b9f5d212e8717 Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Fri, 10 Nov 2017 16:51:25 +0200
-Subject: [PATCH] Removed redundant UVector entry clean up function call.
-
-Upstream-Status: Backport
-CVE: CVE-2017-14952
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- i18n/zonemeta.cpp | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/i18n/zonemeta.cpp b/i18n/zonemeta.cpp
-index 84a9657..e163b00 100644
---- a/i18n/zonemeta.cpp
-+++ b/i18n/zonemeta.cpp
-@@ -690,7 +690,6 @@ ZoneMeta::createMetazoneMappings(const UnicodeString &tzid) {
-                     mzMappings = new UVector(deleteOlsonToMetaMappingEntry, NULL, status);
-                     if (U_FAILURE(status)) {
-                         delete mzMappings;
--                        deleteOlsonToMetaMappingEntry(entry);
-                         uprv_free(entry);
-                         break;
-                     }
--- 
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch
index ec63f50..8186fb4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu/fix-install-manx.patch
@@ -1,3 +1,8 @@
+From 3063a9211669bee673840ee81f81d30699b9b702 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Fri, 9 Oct 2015 17:50:41 +0100
+Subject: [PATCH 2/4] icu: fix install race
+
 The generic recursive target calls target-local so also adding it to the
 dependency list results in races due to install-local being executed twice in
 parallel.  For example, install-manx can fail if the two install processes race
@@ -9,12 +14,15 @@
 Upstream-Status: Pending
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
+---
+ source/Makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
 
-diff --git a/Makefile.in b/Makefile.in
-index 9db6c52..3441afa 100644
+diff --git a/source/Makefile.in b/source/Makefile.in
+index c1db15b..4948deb 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -71,7 +71,7 @@ EXTRA_DATA =
+@@ -73,7 +73,7 @@ EXTRA_DATA =
  
  ## List of phony targets
  .PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls		\
@@ -23,7 +31,7 @@
  distclean-local distclean-recursive doc dist dist-local dist-recursive	\
  check check-local check-recursive clean-recursive-with-twist install-icu \
  doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \
-@@ -82,10 +82,10 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
+@@ -84,9 +84,9 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
  
  ## List of standard targets
  all: all-local all-recursive
@@ -31,13 +39,11 @@
 +install: install-recursive
  clean: clean-recursive-with-twist clean-local
 -distclean : distclean-recursive distclean-local
--dist: dist-recursive dist-local
 +distclean : distclean-recursive
-+dist: dist-recursive
+ dist: dist-recursive
  check: all check-recursive
  check-recursive: all
- xcheck: all xcheck-recursive
-@@ -352,7 +352,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
+@@ -350,7 +350,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
  
  install-manx: $(MANX_FILES)
  	$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
@@ -46,3 +52,6 @@
  
  config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
  	cd $(top_builddir) \
+-- 
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu_59.1.bb b/import-layers/yocto-poky/meta/recipes-support/icu/icu_59.1.bb
deleted file mode 100644
index 9fb1be8..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu_59.1.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require icu.inc
-
-LIC_FILES_CHKSUM = "file://../LICENSE;md5=fe9e1f2c500466d8f18df2cd068e4b74"
-
-def icu_download_version(d):
-    pvsplit = d.getVar('PV').split('.')
-    return pvsplit[0] + "_" + pvsplit[1]
-
-ICU_PV = "${@icu_download_version(d)}"
-
-# http://errors.yoctoproject.org/Errors/Details/20486/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
-SRC_URI = "${BASE_SRC_URI} \
-           file://icu-pkgdata-large-cmd.patch \
-           file://fix-install-manx.patch \
-           file://0001-i18n-Drop-include-xlocale.h.patch \
-           file://CVE-2017-14952.patch \
-           "
-
-SRC_URI_append_class-target = "\
-           file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
-          "
-SRC_URI[md5sum] = "54923fa9fab5b2b83f235fb72523de37"
-SRC_URI[sha256sum] = "7132fdaf9379429d004005217f10e00b7d2319d0fea22bdfddef8991c45b75fe"
-
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
-UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu_60.2.bb b/import-layers/yocto-poky/meta/recipes-support/icu/icu_60.2.bb
new file mode 100644
index 0000000..585a92b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu_60.2.bb
@@ -0,0 +1,29 @@
+require icu.inc
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=675f2d069434d8a1e4e6b0dcf4379226"
+
+def icu_download_version(d):
+    pvsplit = d.getVar('PV').split('.')
+    return pvsplit[0] + "_" + pvsplit[1]
+
+ICU_PV = "${@icu_download_version(d)}"
+
+# http://errors.yoctoproject.org/Errors/Details/20486/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
+SRC_URI = "${BASE_SRC_URI} \
+           file://icu-pkgdata-large-cmd.patch \
+           file://fix-install-manx.patch \
+           file://0001-i18n-Drop-include-xlocale.h.patch \
+           "
+
+SRC_URI_append_class-target = "\
+           file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
+          "
+SRC_URI[md5sum] = "43861b127744b3c0b9d7f386f4b9fa40"
+SRC_URI[sha256sum] = "f073ea8f35b926d70bb33e6577508aa642a8b316a803f11be20af384811db418"
+
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.75.bb b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.75.bb
deleted file mode 100644
index 4f3d53c..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.75.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "ISO language, territory, currency, script codes and their translations"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
-SRC_URI[md5sum] = "9ba173b69d4360003414f23837597a92"
-SRC_URI[sha256sum] = "7335e0301cd77cd4ee019bf5d3709aa79309d49dd66e85ba350caf67e00b00cd"
-
-# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
-# are inhibited by allarch
-DEPENDS = "gettext-native"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/xml/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb
new file mode 100644
index 0000000..bd613ac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb
@@ -0,0 +1,15 @@
+SUMMARY = "ISO language, territory, currency, script codes and their translations"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
+SRC_URI[md5sum] = "9d0d06cfb4634428b300845edcd7140a"
+SRC_URI[sha256sum] = "21cd73a4c6f95d9474ebfcffd4e065223857720f24858e564f4409b19f7f0d90"
+
+# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
+# are inhibited by allarch
+DEPENDS = "gettext-native"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/xml/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
index b6ccdda..525b076 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -6,32 +6,15 @@
 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
 
-Index: libassuan-2.1.2/Makefile.am
-===================================================================
---- libassuan-2.1.2.orig/Makefile.am
-+++ libassuan-2.1.2/Makefile.am
-@@ -24,10 +24,13 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gz
- # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
- GITLOG_TO_CHANGELOG=gitlog-to-changelog
- 
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = libassuan.pc
-+
- EXTRA_DIST = autogen.sh autogen.rc README.GIT         	                \
-              ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 	\
-              tests/ChangeLog-2011 contrib/ChangeLog-2011     		\
--             build-aux/git-log-footer build-aux/git-log-fix
-+             build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in
- 
- SUBDIRS = m4 src doc tests
- 
-Index: libassuan-2.1.2/libassuan.pc.in
+forward ported to 2.4.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: libassuan-2.4.4/libassuan.pc.in
 ===================================================================
 --- /dev/null
-+++ libassuan-2.1.2/libassuan.pc.in
-@@ -0,0 +1,14 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
++++ libassuan-2.4.4/libassuan.pc.in
+@@ -0,0 +1,13 @@
++prefix=@exec_prefix@
 +libdir=@libdir@
 +includedir=@includedir@
 +api_version=@LIBASSUAN_CONFIG_API_VERSION@
@@ -44,24 +27,42 @@
 +Libs: -L${libdir} -lassuan
 +Libs.private: -lgpg-error
 +Cflags: -I${includedir}
-Index: libassuan-2.1.2/configure.ac
+Index: libassuan-2.4.4/Makefile.am
 ===================================================================
---- libassuan-2.1.2.orig/configure.ac
-+++ libassuan-2.1.2/configure.ac
-@@ -439,7 +439,7 @@ AC_CONFIG_FILES([doc/Makefile])
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,10 +25,13 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-doc
+ # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
+ GITLOG_TO_CHANGELOG=gitlog-to-changelog
+ 
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libassuan.pc
++
+ EXTRA_DIST = autogen.sh autogen.rc README.GIT VERSION                   \
+              ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 	\
+              tests/ChangeLog-2011 contrib/ChangeLog-2011     		\
+-             build-aux/git-log-footer build-aux/git-log-fix
++             build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in
+ 
+ if BUILD_DOC
+ doc = doc
+Index: 2.4.4-r0/libassuan-2.4.4/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -485,6 +485,7 @@ AC_CONFIG_FILES([doc/Makefile])
  AC_CONFIG_FILES([tests/Makefile])
  AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
  AC_CONFIG_FILES([src/versioninfo.rc])
--
 +AC_CONFIG_FILES([libassuan.pc])
+ 
  AC_OUTPUT
  
- echo "
-Index: libassuan-2.1.2/src/libassuan.m4
+Index: libassuan-2.4.4/src/libassuan.m4
 ===================================================================
---- libassuan-2.1.2.orig/src/libassuan.m4
-+++ libassuan-2.1.2/src/libassuan.m4
-@@ -15,18 +15,6 @@ dnl Returns ok set to yes or no.
+--- a/src/libassuan.m4
++++ b/src/libassuan.m4
+@@ -16,18 +16,6 @@ dnl Returns ok set to yes or no.
  dnl
  AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
  [ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -80,7 +81,7 @@
  
    tmp=ifelse([$1], ,1:0.9.2,$1)
    if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-@@ -37,51 +25,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+@@ -38,51 +26,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
      min_libassuan_version="$tmp"
    fi
  
@@ -105,7 +106,7 @@
 -
 -    if test "$major" -gt "$req_major"; then
 -        ok=yes
--    else 
+-    else
 -        if test "$major" -eq "$req_major"; then
 -            if test "$minor" -gt "$req_minor"; then
 -               ok=yes
@@ -134,7 +135,7 @@
        if test "$tmp" -gt 0 ; then
          AC_MSG_CHECKING([LIBASSUAN API version])
          if test "$req_libassuan_api" -eq "$tmp" ; then
-@@ -96,7 +45,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+@@ -97,7 +46,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
  
    if test $ok = yes; then
      if test x"$host" != x ; then
@@ -143,7 +144,7 @@
        if test x"$libassuan_config_host" != xnone ; then
          if test x"$libassuan_config_host" != x"$host" ; then
    AC_MSG_WARN([[
-@@ -137,12 +86,8 @@ dnl
+@@ -138,12 +87,8 @@ dnl
  AC_DEFUN([AM_PATH_LIBASSUAN],
  [ _AM_PATH_LIBASSUAN_COMMON($1)
    if test $ok = yes; then
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb
deleted file mode 100644
index 926c279..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "IPC library used by GnuPG and GPGME"
-HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-doc = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
-                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
-                    file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
-
-DEPENDS = "libgpg-error"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
-	   file://libassuan-add-pkgconfig-support.patch"
-
-SRC_URI[md5sum] = "8e01a7c72d3e5d154481230668e6eb5a"
-SRC_URI[sha256sum] = "22843a3bdb256f59be49842abf24da76700354293a066d82ade8134bb5aa2b71"
-
-BINCONFIG = "${bindir}/libassuan-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-do_configure_prepend () {
-	# Else these could be used in preference to those in aclocal-copy
-	rm -f ${S}/m4/*.m4
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb
new file mode 100644
index 0000000..34d5f16
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "IPC library used by GnuPG and GPGME"
+HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-doc = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://src/assuan.c;endline=20;md5=ab92143a5a2adabd06d7994d1467ea5c\
+                    file://src/assuan-defs.h;endline=20;md5=15d950c83e82978e35b35e790d7e4d39"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
+           file://libassuan-add-pkgconfig-support.patch \
+          "
+
+SRC_URI[md5sum] = "4354b7ae296894f232ada226a062d7d7"
+SRC_URI[sha256sum] = "47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449"
+
+BINCONFIG = "${bindir}/libassuan-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+do_configure_prepend () {
+	# Else these could be used in preference to those in aclocal-copy
+	rm -f ${S}/m4/*.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
deleted file mode 100644
index c051075..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Tue, 15 Mar 2016 10:09:26 +0300
-Subject: [PATCH] Add initial nios2 architecture support
-
-* src/Makefile.am (nobase_private_HEADERS): Add nios2.h.
-* src/atomic_ops.h: Include nios2.h if __nios2__.
-* src/atomic_ops/sysdeps/gcc/nios2.h: New file.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [ https://github.com/ivmai/libatomic_ops.git 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 ]
----
- src/Makefile.am                    |  1 +
- src/atomic_ops.h                   |  3 +++
- src/atomic_ops/sysdeps/gcc/nios2.h | 17 +++++++++++++++++
- 3 files changed, 21 insertions(+)
- create mode 100644 src/atomic_ops/sysdeps/gcc/nios2.h
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index fc09b27..d463427 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -79,6 +79,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
-           atomic_ops/sysdeps/gcc/ia64.h \
-           atomic_ops/sysdeps/gcc/m68k.h \
-           atomic_ops/sysdeps/gcc/mips.h \
-+          atomic_ops/sysdeps/gcc/nios2.h \
-           atomic_ops/sysdeps/gcc/powerpc.h \
-           atomic_ops/sysdeps/gcc/s390.h \
-           atomic_ops/sysdeps/gcc/sh.h \
-diff --git a/src/atomic_ops.h b/src/atomic_ops.h
-index 33fe00e..ec02ba4 100644
---- a/src/atomic_ops.h
-+++ b/src/atomic_ops.h
-@@ -262,6 +262,9 @@
- # if defined(__m68k__)
- #   include "atomic_ops/sysdeps/gcc/m68k.h"
- # endif /* __m68k__ */
-+# if defined(__nios2__)
-+#   include "atomic_ops/sysdeps/gcc/nios2.h"
-+# endif /* __nios2__ */
- # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
-      || defined(__powerpc64__) || defined(__ppc64__)
- #   include "atomic_ops/sysdeps/gcc/powerpc.h"
-diff --git a/src/atomic_ops/sysdeps/gcc/nios2.h b/src/atomic_ops/sysdeps/gcc/nios2.h
-new file mode 100644
-index 0000000..f402cbb
---- /dev/null
-+++ b/src/atomic_ops/sysdeps/gcc/nios2.h
-@@ -0,0 +1,17 @@
-+/*
-+ * Copyright (C) 2016 Marek Vasut <marex@denx.de>
-+ *
-+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
-+ *
-+ * Permission is hereby granted to use or copy this program
-+ * for any purpose, provided the above notices are retained on all copies.
-+ * Permission to modify the code and to distribute modified code is granted,
-+ * provided the above notices are retained, and a notice that the code was
-+ * modified is included with the above copyright notice.
-+ */
-+
-+#include "../test_and_set_t_is_ao_t.h"
-+#include "generic.h"
-+
-+#define AO_T_IS_INT
--- 
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.0.bb
deleted file mode 100644
index 4463d86..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "A library for atomic integer operations"
-HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
-SECTION = "optional"
-PROVIDES += "libatomics-ops"
-LICENSE = "GPLv2 & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
-		   "
-PV .= "+git${SRCPV}"
-
-SRCREV = "73c60c5ef1ed370111549ee5aab6d4020ba70ed4"
-SRC_URI = "git://github.com/ivmai/libatomic_ops"
-
-S = "${WORKDIR}/git"
-
-ALLOW_EMPTY_${PN} = "1"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb
new file mode 100644
index 0000000..f7b4163
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "A library for atomic integer operations"
+HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
+SECTION = "optional"
+PROVIDES += "libatomics-ops"
+LICENSE = "GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
+		   "
+PV .= "+git${SRCPV}"
+SRCBRANCH ?= "release-7_6"
+
+SRCREV = "5ae4b4aeea2baf13752d07e3038c47f70f06dcac"
+SRC_URI = "git://github.com/ivmai/libatomic_ops;branch=${SRCBRANCH}"
+
+S = "${WORKDIR}/git"
+
+ALLOW_EMPTY_${PN} = "1"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
index e97e30e..54617b5 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
@@ -4,6 +4,7 @@
 Subject: [PATCH 1/3] Replace __BEGIN_DECLS and __END_DECLS
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
 ---
 Upstream-Status: Pending
 
@@ -13,14 +14,14 @@
  include/bsd/nlist.h          | 10 ++++++++--
  include/bsd/readpassphrase.h | 10 ++++++++--
  include/bsd/stdio.h          | 10 ++++++++--
- include/bsd/stdlib.h         | 10 ++++++++--
- include/bsd/string.h         | 10 ++++++++--
+ include/bsd/stdlib.h         | 12 +++++++++---
+ include/bsd/string.h         | 12 +++++++++---
  include/bsd/stringlist.h     | 10 ++++++++--
  include/bsd/unistd.h         | 10 ++++++++--
  include/bsd/vis.h            | 10 ++++++++--
  include/bsd/wchar.h          | 10 ++++++++--
  src/hash/sha512.h            | 10 ++++++++--
- 13 files changed, 104 insertions(+), 26 deletions(-)
+ 13 files changed, 106 insertions(+), 28 deletions(-)
 
 diff --git a/include/bsd/err.h b/include/bsd/err.h
 index 12fd051..43dfc32 100644
@@ -50,7 +51,7 @@
  
  #endif
 diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h
-index ebb6160..28b919d 100644
+index 45b3b15..9c936e5 100644
 --- a/include/bsd/libutil.h
 +++ b/include/bsd/libutil.h
 @@ -53,7 +53,10 @@ struct pidfh {
@@ -78,7 +79,7 @@
  /* humanize_number(3) */
  #define HN_DECIMAL              0x01
 diff --git a/include/bsd/md5.h b/include/bsd/md5.h
-index 9a75fad..3531fd6 100644
+index 5f3ae46..5d80e5c 100644
 --- a/include/bsd/md5.h
 +++ b/include/bsd/md5.h
 @@ -30,7 +30,10 @@ typedef struct MD5Context {
@@ -103,14 +104,14 @@
 +#endif
 +/* __END_DECLS */
  
- #endif /* _MD5_H_ */
+ #endif /* LIBBSD_MD5_H */
 diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h
-index 2730237..0389ab7 100644
+index cb297e8..e63bbbd 100644
 --- a/include/bsd/nlist.h
 +++ b/include/bsd/nlist.h
-@@ -30,8 +30,14 @@
- #include <sys/cdefs.h>
- #include <a.out.h>
+@@ -88,8 +88,14 @@ struct nlist {
+ 
+ #define N_FORMAT	"%08x"	/* namelist value format; XXX */
  
 -__BEGIN_DECLS
 +/* __BEGIN_DECLS */
@@ -126,7 +127,7 @@
  
  #endif
 diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h
-index e1dacc3..76e0d33 100644
+index 14744b8..fa73361 100644
 --- a/include/bsd/readpassphrase.h
 +++ b/include/bsd/readpassphrase.h
 @@ -34,8 +34,14 @@
@@ -145,13 +146,13 @@
 +#endif
 +/* __END_DECLS */
  
- #endif /* !_READPASSPHRASE_H_ */
+ #endif /* !LIBBSD_READPASSPHRASE_H */
 diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
-index 7697425..b5b3efd 100644
+index 4b69983..18645b7 100644
 --- a/include/bsd/stdio.h
 +++ b/include/bsd/stdio.h
-@@ -41,7 +41,10 @@
- #include <sys/cdefs.h>
+@@ -45,7 +45,10 @@
+ #endif
  #include <sys/types.h>
  
 -__BEGIN_DECLS
@@ -162,7 +163,7 @@
  const char *fmtcheck(const char *, const char *);
  
  /* XXX: The function requires cooperation from the system libc to store the
-@@ -69,7 +72,10 @@ FILE *funopen(const void *cookie,
+@@ -73,7 +76,10 @@ FILE *funopen(const void *cookie,
  #define fwopen(cookie, fn) funopen(cookie, NULL, fn, NULL, NULL)
  
  int fpurge(FILE *fp);
@@ -175,7 +176,7 @@
  #endif
  #endif
 diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
-index 0604cad..b9f0515 100644
+index ebc9638..c4b54b6 100644
 --- a/include/bsd/stdlib.h
 +++ b/include/bsd/stdlib.h
 @@ -46,7 +46,10 @@
@@ -189,8 +190,17 @@
 +#endif
  uint32_t arc4random(void);
  void arc4random_stir(void);
- void arc4random_addrandom(u_char *dat, int datlen);
-@@ -73,6 +76,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval,
+ void arc4random_addrandom(unsigned char *dat, int datlen);
+@@ -67,7 +70,7 @@ int sradixsort(const unsigned char **base, int nmemb,
+                const unsigned char *table, unsigned endbyte);
+ 
+ void *reallocf(void *ptr, size_t size);
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26)
++#if defined(_GNU_SOURCE) && defined(__GLIBC__)
+ void *reallocarray(void *ptr, size_t nmemb, size_t size);
+ #endif
+ 
+@@ -75,6 +78,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval,
                     const char **errstr);
  
  char *getbsize(int *headerlenp, long *blocksizep);
@@ -202,10 +212,10 @@
  
  #endif
 diff --git a/include/bsd/string.h b/include/bsd/string.h
-index ee2f953..fbf8c54 100644
+index 6798bf6..fa1193f 100644
 --- a/include/bsd/string.h
 +++ b/include/bsd/string.h
-@@ -36,13 +36,19 @@
+@@ -36,15 +36,21 @@
  #include <sys/cdefs.h>
  #include <sys/types.h>
  
@@ -219,7 +229,10 @@
  char *strnstr(const char *str, const char *find, size_t str_len);
  void strmode(mode_t mode, char *str);
  
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 25)
++#if defined(_GNU_SOURCE) && defined(__GLIBC__)
  void explicit_bzero(void *buf, size_t len);
+ #endif
 -__END_DECLS
 +#ifdef __cplusplus
 +}
@@ -228,7 +241,7 @@
  
  #endif
 diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h
-index e3c42e9..40d0a52 100644
+index ff30cac..4600f6b 100644
 --- a/include/bsd/stringlist.h
 +++ b/include/bsd/stringlist.h
 @@ -43,12 +43,18 @@ typedef struct _stringlist {
@@ -251,7 +264,7 @@
 +#endif
 +/* __END_DECLS */
  
- #endif /* _STRINGLIST_H */
+ #endif /* LIBBSD_STRINGLIST_H */
 diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
 index 1f9c5f8..5b2f4c7 100644
 --- a/include/bsd/unistd.h
@@ -280,7 +293,7 @@
  
  #endif
 diff --git a/include/bsd/vis.h b/include/bsd/vis.h
-index 835d2d6..63c951e 100644
+index 970dfdd..621d3c6 100644
 --- a/include/bsd/vis.h
 +++ b/include/bsd/vis.h
 @@ -74,7 +74,10 @@
@@ -305,7 +318,7 @@
 +#endif
 +/* __END_DECLS */
  
- #endif /* !_VIS_H_ */
+ #endif /* !LIBBSD_VIS_H */
 diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h
 index 33a500e..aa70742 100644
 --- a/include/bsd/wchar.h
@@ -359,5 +372,5 @@
  
  #endif /* !_SHA512_H_ */
 -- 
-2.10.2
+1.9.1
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.6.bb b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.6.bb
deleted file mode 100644
index 182543f..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.6.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Library of utility functions from BSD systems"
-DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
-               and lacking on others like GNU systems, thus making it easier to port \
-               projects with strong BSD origins, without needing to embed the same \
-               code over and over again on each project."
-
-HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
-# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
-# OE @ ~/projects/libbsd $ grep ^License: COPYING  | sort
-# License: BSD-2-clause
-# License: BSD-2-clause
-# License: BSD-2-clause-NetBSD
-# License: BSD-2-clause-author
-# License: BSD-2-clause-verbatim
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause-Peter-Wemm
-# License: BSD-3-clause-Regents
-# License: BSD-4-clause-Christopher-G-Demetriou
-# License: BSD-4-clause-Niels-Provos
-# License: BSD-5-clause-Peter-Wemm
-# License: Beerware
-# License: Expat
-# License: ISC
-# License: ISC-Original
-# License: public-domain
-# License: public-domain-Colin-Plumb
-LICENSE = "BSD-4-Clause & ISC & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=08fc4e66be4526715dab09c5fba5e9e8"
-SECTION = "libs"
-
-SRC_URI = " \
-    http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-    file://0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch \
-"
-SRC_URI_append_libc-musl  = " \
-    file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \
-    file://0002-Remove-funopen.patch \
-"
-
-SRC_URI[md5sum] = "4ab7bec639af17d0aacb50222b479110"
-SRC_URI[sha256sum] = "467fbf9df1f49af11f7f686691057c8c0a7613ae5a870577bef9155de39f9687"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb
new file mode 100644
index 0000000..552a85c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb
@@ -0,0 +1,50 @@
+# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library of utility functions from BSD systems"
+DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
+               and lacking on others like GNU systems, thus making it easier to port \
+               projects with strong BSD origins, without needing to embed the same \
+               code over and over again on each project."
+
+HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
+# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
+# OE @ ~/projects/libbsd $ grep ^License: COPYING  | sort
+# License: BSD-2-clause
+# License: BSD-2-clause
+# License: BSD-2-clause-NetBSD
+# License: BSD-2-clause-author
+# License: BSD-2-clause-verbatim
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause-Peter-Wemm
+# License: BSD-3-clause-Regents
+# License: BSD-4-clause-Christopher-G-Demetriou
+# License: BSD-4-clause-Niels-Provos
+# License: BSD-5-clause-Peter-Wemm
+# License: Beerware
+# License: Expat
+# License: ISC
+# License: ISC-Original
+# License: public-domain
+# License: public-domain-Colin-Plumb
+LICENSE = "BSD-4-Clause & ISC & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08fc4e66be4526715dab09c5fba5e9e8"
+SECTION = "libs"
+
+SRC_URI = " \
+    http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+    file://0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch \
+"
+SRC_URI_append_libc-musl  = " \
+    file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+    file://0002-Remove-funopen.patch \
+"
+
+SRC_URI[md5sum] = "d9e6980fbfe44f94fd92b89a33cce67d"
+SRC_URI[sha256sum] = "f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb b/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb
deleted file mode 100644
index 9d34198..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY  = "Check - unit testing framework for C code"
-HOMEPAGE = "http://check.sourceforge.net/"
-SECTION = "devel"
-
-LICENSE  = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
-          "
-
-SRC_URI[md5sum] = "53c5e5c77d090e103a17f3ed7fd7d8b8"
-SRC_URI[sha256sum] = "f5f50766aa6f8fe5a2df752666ca01a950add45079aa06416b83765b1cf71052"
-
-S = "${WORKDIR}/check-${PV}"
-
-inherit autotools pkgconfig texinfo
-
-CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
-
-RREPLACES_${PN} = "check (<= 0.9.5)"
-RDEPENDS_${PN} += "gawk"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb b/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb
new file mode 100644
index 0000000..e646d43
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb
@@ -0,0 +1,23 @@
+SUMMARY  = "Check - unit testing framework for C code"
+HOMEPAGE = "http://check.sourceforge.net/"
+SECTION = "devel"
+
+LICENSE  = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+SRC_URI = "https://github.com/${BPN}/check/releases/download/${PV}/check-${PV}.tar.gz"
+SRC_URI[md5sum] = "31b17c6075820a434119592941186f70"
+SRC_URI[sha256sum] = "464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234"
+UPSTREAM_CHECK_URI = "https://github.com/libcheck/check/releases/"
+
+S = "${WORKDIR}/check-${PV}"
+
+inherit autotools pkgconfig texinfo
+
+CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
+
+RREPLACES_${PN} = "check (<= 0.9.5)"
+RDEPENDS_${PN} += "gawk"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb b/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
index b0af759..d86ddd6 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
@@ -9,12 +9,12 @@
 
 SECTION = "x11/utils"
 DEPENDS = "glib-2.0 libxml2 zlib"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 EXTRA_OECONF += "--enable-Bsymbolic=auto"
 
 BINCONFIG = "${bindir}/croco-0.6-config"
 
-inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
+inherit gnomebase gtk-doc binconfig-disabled
 
 SRC_URI[archive.md5sum] = "bc0984fce078ba2ce29f9500c6b9ddce"
 SRC_URI[archive.sha256sum] = "ddc4b5546c9fb4280a5017e2707fbd4839034ed1aba5b7d4372212f34f84f860"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.7.bb b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.7.bb
deleted file mode 100644
index f740da2..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.7.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Wrapper library for evdev devices"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
-SECTION = "libs"
-
-LICENSE = "MIT-X"
-LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
-                    file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
-
-SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "4f1cfaee8d75ea3fbbfeb99a98730952"
-SRC_URI[sha256sum] = "a1e59e37a2f0d397ffd7e83b73af0e638db83b8dd08902ef0f651a21cc1dd422"
-
-inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb
new file mode 100644
index 0000000..c138014
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Wrapper library for evdev devices"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
+SECTION = "libs"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
+                    file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
+
+SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "c25a8c3939e4ad59a5e9e5e1e354832d"
+SRC_URI[sha256sum] = "6083d81e46609da8ba80cb826c02d9080764a6dec33c8267ccb7e158833d4c6d"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch
new file mode 100644
index 0000000..36d0820
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch
@@ -0,0 +1,48 @@
+From 69a3813c513c84e02212250c3d5b8a02ecefa698 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Mon, 15 Jan 2018 08:00:33 +0000
+Subject: [PATCH] test: fix 32bit linux regress
+
+This patch comes from https://github.com/libevent/libevent.git,
+the commit is 63c4bf78d6af3c6ff46d2e8e4b53dd9f577a9ca9
+
+Upstream-Status: Backport
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ configure.ac        | 1 +
+ test/regress_util.c | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 7528d37..e64cb1f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -663,6 +663,7 @@ AC_CHECK_SIZEOF(short)
+ AC_CHECK_SIZEOF(size_t)
+ AC_CHECK_SIZEOF(void *)
+ AC_CHECK_SIZEOF(off_t)
++AC_CHECK_SIZEOF(time_t)
+ 
+ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
+ [#define _GNU_SOURCE
+diff --git a/test/regress_util.c b/test/regress_util.c
+index ef6a148..0c7eafb 100644
+--- a/test/regress_util.c
++++ b/test/regress_util.c
+@@ -1412,10 +1412,12 @@ static struct date_rfc1123_case {
+ 	{  1289433600, "Thu, 11 Nov 2010 00:00:00 GMT"},
+ 	{  1323648000, "Mon, 12 Dec 2011 00:00:00 GMT"},
+ #ifndef _WIN32
++#if EVENT__SIZEOF_TIME_T > 4
+ 	/** In win32 case we have max   "23:59:59 January 18, 2038, UTC" for time32 */
+ 	{  4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */,
+ 	/** In win32 case we have max "23:59:59, December 31, 3000, UTC" for time64 */
+ 	{253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */,
++#endif /* time_t != 32bit */
+ 	{  1456704000, "Mon, 29 Feb 2016 00:00:00 GMT"} /* leap year */,
+ #endif
+ 	{  1435708800, "Wed, 01 Jul 2015 00:00:00 GMT"} /* leap second */,
+-- 
+2.13.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb
index 1270d62..83ce464 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent_2.1.8.bb
@@ -9,6 +9,7 @@
 SRC_URI = " \
     https://github.com/libevent/libevent/releases/download/release-${PV}-stable/${BP}-stable.tar.gz \
     file://Makefile-missing-test-dir.patch \
+    file://0001-test-fix-32bit-linux-regress.patch \
     file://run-ptest \
 "
 
diff --git a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
index 1e90125..80c40a4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
@@ -11,12 +11,16 @@
 Upstream-Status: Inappropriate
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
---- a/configure.ac~	2014-11-12 11:56:51.000000000 +0000
-+++ b/configure.ac	2016-02-04 14:02:53.765710532 +0000
-@@ -593,5 +593,5 @@
+Index: libffi-3.2.1/configure.ac
+===================================================================
+--- libffi-3.2.1.orig/configure.ac
++++ libffi-3.2.1/configure.ac
+@@ -592,7 +592,7 @@ AC_ARG_ENABLE(purify-safety,
+ 
  # These variables are only ever used when we cross-build to X86_WIN32.
  # And we only support this with GCC, so...
 -if test "x$GCC" = "xyes"; then
 +if false; then
    if test -n "$with_cross_host" &&
-      test x"$with_cross_host" != x"no"; then
\ No newline at end of file
+      test x"$with_cross_host" != x"no"; then
+     toolexecdir="${exec_prefix}"/'$(target_alias)'
diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
index 0134572..c0fd83e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
@@ -5,7 +5,7 @@
 LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
 
 SECTION = "x11/libs"
-DEPENDS = "glib-2.0 intltool-native gettext-native"
+DEPENDS = "glib-2.0-native glib-2.0 intltool-native"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
            file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
@@ -18,6 +18,6 @@
 
 EXTRA_OECONF = "--with-extra-only --with-gtk=no"
 
-inherit autotools pkgconfig gtk-doc
+inherit autotools pkgconfig gtk-doc gettext
 
 do_configure[dirs] =+ "${S}/m4"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch
new file mode 100644
index 0000000..40e5329
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch
@@ -0,0 +1,76 @@
+From ed4ca8c0b17ff5d3c768b92409c1787e3f3f1841 Mon Sep 17 00:00:00 2001
+From: Andriy Grytsenko <andrej@rep.kiev.ua>
+Date: Sun, 26 Nov 2017 22:30:15 +0200
+Subject: [PATCH 2/2] Enclose text in <programlisting> into <![CDATA[
+
+New gtk-doc fails on tag-like data in it.
+See https://bugs.freedesktop.org/show_bug.cgi?id=101585
+That is definitely bug of gtk-doc but let workaround it.
+
+Upstream-Status: Backport [https://git.lxde.org/gitweb/?p=lxde/libfm.git;a=commit;h=b072ee0400432d72fdf86ba9fed74a7e0ec11ec1]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/base/fm-module.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/base/fm-module.c b/src/base/fm-module.c
+index d364b2d..2e8c978 100644
+--- a/src/base/fm-module.c
++++ b/src/base/fm-module.c
+@@ -44,7 +44,7 @@
+  * of that type should include:
+  * <example id="example-fm-dummy-h">
+  * <title>Sample of fm-dummy.h</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+  * #include <libfm/fm.h>
+  *
+  * #define FM_MODULE_dummy_VERSION 1
+@@ -54,7 +54,7 @@
+  * } FmDummyInit;
+  *
+  * extern FmDummyInit fm_module_init_dummy;
+- * </programlisting>
++ * ]]></programlisting>
+  * </example>
+  * The FM_MODULE_dummy_VERSION is a number which should be increased each
+  * time something in FmDummyInit structure is changed. The FmDummyInit
+@@ -65,7 +65,7 @@
+  * module handling in your code:
+  * <example id="example-fm-dummy-widget-c">
+  * <title>Sample of fm-dummy-widget.c</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+  * #include "fm-dummy.h"
+  *
+  * FM_MODULE_DEFINE_TYPE(dummy, FmDummyInit, 1)
+@@ -87,7 +87,7 @@
+  *         result = module->get_new("test sample");
+  *     return result;
+  * }
+- * </programlisting>
++ * ]]></programlisting>
+  * </example>
+  *
+  * Third thing application should do is to register module type on the
+@@ -108,7 +108,7 @@
+  * interface (see the fm-dummy.h header example above):
+  * <example id="example-fm-dummy-test-c">
+  * <title>Sample of module dummy/test</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+  * #include "fm-dummy.h"
+  *
+  * FM_DEFINE_MODULE(dummy, test)
+@@ -121,7 +121,7 @@
+  * FmDummyInit fm_module_init_dummy = {
+  *     fm_dummy_test_get_new;
+  * };
+- * </programlisting>
++ * ]]></programlisting>
+  * </example>
+  * The fm_module_init_dummy should be exactly the same structure that is
+  * defined in the header file above.
+-- 
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb
index 1ddddfd..5964083 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.5.bb
@@ -9,22 +9,36 @@
 
 
 SECTION = "x11/libs"
-DEPENDS = "glib-2.0 pango gtk+3 menu-cache intltool-native libexif libfm-extra gettext-native"
+DEPENDS = "glib-2.0 glib-2.0-native pango gtk+3 menu-cache intltool-native libexif libfm-extra"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
-           file://0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch"
+           file://0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch \
+           file://0001-Enclose-text-in-programlisting-into-CDATA.patch \
+           "
 
 SRC_URI[md5sum] = "a1ba9ae5e920f38b647dd511edd6c807"
 SRC_URI[sha256sum] = "c706bb1020cf5f2d6f5a9226f692ce1985947134dcf2bde64278bd0420779b5a"
 
-inherit autotools pkgconfig gtk-doc distro_features_check
+inherit autotools pkgconfig gtk-doc gettext distro_features_check
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
 EXTRA_OECONF = "--with-gtk=3"
 
 do_configure[dirs] =+ "${S}/m4"
 
+PACKAGES =+ "libfm-gtk"
 PACKAGES += "${PN}-mime"
+FILES_libfm-gtk = " \
+    ${libdir}/libfm-gtk*so.* \
+    ${libdir}/libfm/modules/gtk* \
+    ${bindir}/libfm-pref-apps \
+    ${bindir}/lxshortcut \
+    ${datadir}/applications/libfm-pref-apps.desktop \
+    ${datadir}/applications/lxshortcut.desktop \
+    ${datadir}/libfm/images/folder.png \
+    ${datadir}/libfm/images/unknown.png \
+    ${datadir}/libfm/ui/*.ui \
+"
 FILES_${PN}-mime = "${datadir}/mime/"
 
 do_install_append () {
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0005-ecc-Add-input-validation-for-X25519.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0005-ecc-Add-input-validation-for-X25519.patch
deleted file mode 100644
index 66fdd74..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0005-ecc-Add-input-validation-for-X25519.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From ef570e3d2773c12126e7d3fcdc4db9ef80a5e214 Mon Sep 17 00:00:00 2001
-From: NIIBE Yutaka <gniibe@fsij.org>
-Date: Fri, 25 Aug 2017 18:13:28 +0900
-Subject: [PATCH] ecc: Add input validation for X25519.
-
-* cipher/ecc.c (ecc_decrypt_raw): Add input validation.
-* mpi/ec.c (ec_p_init): Use scratch buffer for bad points.
-(_gcry_mpi_ec_bad_point): New.
-
---
-
-Following is the paper describing the attack:
-
-    May the Fourth Be With You: A Microarchitectural Side Channel Attack
-    on Real-World Applications of Curve25519
-    by Daniel Genkin, Luke Valenta, and Yuval Yarom
-
-In the current implementation, we do output checking and it results an
-error for those bad points.  However, when attacked, the computation
-will done with leak of private key, even it will results errors.  To
-mitigate leak, we added input validation.
-
-Note that we only list bad points with MSB=0.  By X25519, MSB is
-always cleared.
-
-In future, we should implement constant-time field computation.  Then,
-this input validation could be removed, if performance is important
-and we are sure for no leak.
-
-CVE-id: CVE-2017-0379
-Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-
-Upstream-Status: Backport
-CVE: CVE-2017-0379
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- cipher/ecc.c | 17 +++++++++++++++--
- mpi/ec.c     | 51 ++++++++++++++++++++++++++++++++++++++++++++++++---
- src/mpi.h    |  1 +
- 3 files changed, 64 insertions(+), 5 deletions(-)
-
-diff --git a/cipher/ecc.c b/cipher/ecc.c
-index e25bf09..4e3e5b1 100644
---- a/cipher/ecc.c
-+++ b/cipher/ecc.c
-@@ -1628,9 +1628,22 @@ ecc_decrypt_raw (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms)
-   if (DBG_CIPHER)
-     log_printpnt ("ecc_decrypt    kG", &kG, NULL);
- 
--  if (!(flags & PUBKEY_FLAG_DJB_TWEAK)
-+  if ((flags & PUBKEY_FLAG_DJB_TWEAK))
-+    {
-       /* For X25519, by its definition, validation should not be done.  */
--      && !_gcry_mpi_ec_curve_point (&kG, ec))
-+      /* (Instead, we do output check.)
-+       *
-+       * However, to mitigate secret key leak from our implementation,
-+       * we also do input validation here.  For constant-time
-+       * implementation, we can remove this input validation.
-+       */
-+      if (_gcry_mpi_ec_bad_point (&kG, ec))
-+        {
-+          rc = GPG_ERR_INV_DATA;
-+          goto leave;
-+        }
-+    }
-+  else if (!_gcry_mpi_ec_curve_point (&kG, ec))
-     {
-       rc = GPG_ERR_INV_DATA;
-       goto leave;
-diff --git a/mpi/ec.c b/mpi/ec.c
-index a0f7357..4c16603 100644
---- a/mpi/ec.c
-+++ b/mpi/ec.c
-@@ -396,6 +396,29 @@ ec_get_two_inv_p (mpi_ec_t ec)
- }
- 
- 
-+static const char *curve25519_bad_points[] = {
-+  "0x0000000000000000000000000000000000000000000000000000000000000000",
-+  "0x0000000000000000000000000000000000000000000000000000000000000001",
-+  "0x00b8495f16056286fdb1329ceb8d09da6ac49ff1fae35616aeb8413b7c7aebe0",
-+  "0x57119fd0dd4e22d8868e1c58c45c44045bef839c55b1d0b1248c50a3bc959c5f",
-+  "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec",
-+  "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed",
-+  "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee",
-+  NULL
-+};
-+
-+static gcry_mpi_t
-+scanval (const char *string)
-+{
-+  gpg_err_code_t rc;
-+  gcry_mpi_t val;
-+
-+  rc = _gcry_mpi_scan (&val, GCRYMPI_FMT_HEX, string, 0, NULL);
-+  if (rc)
-+    log_fatal ("scanning ECC parameter failed: %s\n", gpg_strerror (rc));
-+  return val;
-+}
-+
- 
- /* This function initialized a context for elliptic curve based on the
-    field GF(p).  P is the prime specifying this field, A is the first
-@@ -434,9 +457,17 @@ ec_p_init (mpi_ec_t ctx, enum gcry_mpi_ec_models model,
- 
-   _gcry_mpi_ec_get_reset (ctx);
- 
--  /* Allocate scratch variables.  */
--  for (i=0; i< DIM(ctx->t.scratch); i++)
--    ctx->t.scratch[i] = mpi_alloc_like (ctx->p);
-+  if (model == MPI_EC_MONTGOMERY)
-+    {
-+      for (i=0; i< DIM(ctx->t.scratch) && curve25519_bad_points[i]; i++)
-+        ctx->t.scratch[i] = scanval (curve25519_bad_points[i]);
-+    }
-+  else
-+    {
-+      /* Allocate scratch variables.  */
-+      for (i=0; i< DIM(ctx->t.scratch); i++)
-+        ctx->t.scratch[i] = mpi_alloc_like (ctx->p);
-+    }
- 
-   /* Prepare for fast reduction.  */
-   /* FIXME: need a test for NIST values.  However it does not gain us
-@@ -1572,3 +1603,17 @@ _gcry_mpi_ec_curve_point (gcry_mpi_point_t point, mpi_ec_t ctx)
- 
-   return res;
- }
-+
-+
-+int
-+_gcry_mpi_ec_bad_point (gcry_mpi_point_t point, mpi_ec_t ctx)
-+{
-+  int i;
-+  gcry_mpi_t x_bad;
-+
-+  for (i = 0; (x_bad = ctx->t.scratch[i]); i++)
-+    if (!mpi_cmp (point->x, x_bad))
-+      return 1;
-+
-+  return 0;
-+}
-diff --git a/src/mpi.h b/src/mpi.h
-index b5385b5..aeba7f8 100644
---- a/src/mpi.h
-+++ b/src/mpi.h
-@@ -296,6 +296,7 @@ void _gcry_mpi_ec_mul_point (mpi_point_t result,
-                              gcry_mpi_t scalar, mpi_point_t point,
-                              mpi_ec_t ctx);
- int  _gcry_mpi_ec_curve_point (gcry_mpi_point_t point, mpi_ec_t ctx);
-+int _gcry_mpi_ec_bad_point (gcry_mpi_point_t point, mpi_ec_t ctx);
- 
- gcry_mpi_t _gcry_mpi_ec_ec2os (gcry_mpi_point_t point, mpi_ec_t ectx);
- 
--- 
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
deleted file mode 100644
index 65b9fd4..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 4a7aa30ae9f3ce798dd886c2f2d4164c43027748 Mon Sep 17 00:00:00 2001
-From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-Date: Sat, 29 Jul 2017 14:34:23 +0300
-Subject: [PATCH] Fix building AArch32 CE implementations when target is ARMv6
- arch
-
-* cipher/cipher-gcm-armv8-aarch32-ce.S: Select ARMv8 architecure.
-* cipher/rijndael-armv8-aarch32-ce.S: Ditto.
-* cipher/sha1-armv8-aarch32-ce.S: Ditto.
-* cipher/sha256-armv8-aarch32-ce.S: Ditto.
-* configure.ac (gcry_cv_gcc_inline_asm_aarch32_crypto): Ditto.
---
-
-Raspbian distribution defaults to ARMv6 architecture thus 'rbit'
-instruction is not available with default compiler flags. Patch
-adds explicit architecture selection for ARMv8 to enable 'rbit'
-usage with ARMv8/AArch32-CE assembly implementations of SHA,
-GHASH and AES.
-
-Reported-by: Chris Horry <zerbey@gmail.com>
-Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-
-Signed-off-by: Paul Barker <pbarker@toganlabs.com>
-Upstream-Status: Backport
-
----
- cipher/cipher-gcm-armv8-aarch32-ce.S | 1 +
- cipher/rijndael-armv8-aarch32-ce.S   | 1 +
- cipher/sha1-armv8-aarch32-ce.S       | 1 +
- cipher/sha256-armv8-aarch32-ce.S     | 1 +
- configure.ac                         | 1 +
- 5 files changed, 5 insertions(+)
-
-diff --git a/cipher/cipher-gcm-armv8-aarch32-ce.S b/cipher/cipher-gcm-armv8-aarch32-ce.S
-index b61a7871..1de66a16 100644
---- a/cipher/cipher-gcm-armv8-aarch32-ce.S
-+++ b/cipher/cipher-gcm-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
-     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/cipher/rijndael-armv8-aarch32-ce.S b/cipher/rijndael-armv8-aarch32-ce.S
-index f375f673..5c8fa3c0 100644
---- a/cipher/rijndael-armv8-aarch32-ce.S
-+++ b/cipher/rijndael-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
-     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/cipher/sha1-armv8-aarch32-ce.S b/cipher/sha1-armv8-aarch32-ce.S
-index b0bc5ffe..bf2b233b 100644
---- a/cipher/sha1-armv8-aarch32-ce.S
-+++ b/cipher/sha1-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
-     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA1)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/cipher/sha256-armv8-aarch32-ce.S b/cipher/sha256-armv8-aarch32-ce.S
-index 2041a237..2b17ab1b 100644
---- a/cipher/sha256-armv8-aarch32-ce.S
-+++ b/cipher/sha256-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
-     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA256)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/configure.ac b/configure.ac
-index 27faa7f4..66e7cd67 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1619,6 +1619,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch32 Crypto Extension i
-           AC_COMPILE_IFELSE([AC_LANG_SOURCE(
-           [[__asm__(
-                 ".syntax unified\n\t"
-+                ".arch armv8-a\n\t"
-                 ".arm\n\t"
-                 ".fpu crypto-neon-fp-armv8\n\t"
- 
--- 
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb
deleted file mode 100644
index 02982f0..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
-HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-SECTION = "libs"
-
-# helper program gcryptrnd and getrandom are under GPL, rest LGPL
-LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-dev = "GPLv2+ & LGPLv2.1+"
-LICENSE_dumpsexp-dev = "GPLv3+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
-
-DEPENDS = "libgpg-error"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
-           file://0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch \
-           file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \
-           file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
-           file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
-           file://0005-ecc-Add-input-validation-for-X25519.patch \
-           file://0006-Fix-building-AArch32-CE-implementations-when-target-.patch \
-"
-SRC_URI[md5sum] = "110ce4352f9ea6f560bdc6c5644ae93c"
-SRC_URI[sha256sum] = "f6e470b7f2d3a703e8747f05a8c19d9e10e26ebf2d5f3d71ff75a40f504e12ee"
-
-BINCONFIG = "${bindir}/libgcrypt-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-EXTRA_OECONF = "--disable-asm"
-EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
-
-PACKAGECONFIG ??= "capabilities"
-PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
-
-do_configure_prepend () {
-	# Else this could be used in preference to the one in aclocal-copy
-	rm -f ${S}/m4/gpg-error.m4
-}
-
-# libgcrypt.pc is added locally and thus installed here
-do_install_append() {
-	install -d ${D}/${libdir}/pkgconfig
-	install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
-}
-
-PACKAGES =+ "dumpsexp-dev"
-
-FILES_${PN}-dev += "${bindir}/hmac256"
-FILES_dumpsexp-dev += "${bindir}/dumpsexp"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb
new file mode 100644
index 0000000..b36e653
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb
@@ -0,0 +1,53 @@
+SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
+HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+SECTION = "libs"
+
+# helper program gcryptrnd and getrandom are under GPL, rest LGPL
+LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-dev = "GPLv2+ & LGPLv2.1+"
+LICENSE_dumpsexp-dev = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
+           file://0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch \
+           file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \
+           file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
+           file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
+"
+SRC_URI[md5sum] = "cfb0b5c79eab07686b6898160a407139"
+SRC_URI[sha256sum] = "c8064cae7558144b13ef0eb87093412380efa16c4ee30ad12ecb54886a524c07"
+
+BINCONFIG = "${bindir}/libgcrypt-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+EXTRA_OECONF = "--disable-asm"
+EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
+
+PACKAGECONFIG ??= "capabilities"
+PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
+
+do_configure_prepend () {
+	# Else this could be used in preference to the one in aclocal-copy
+	rm -f ${S}/m4/gpg-error.m4
+}
+
+# libgcrypt.pc is added locally and thus installed here
+do_install_append() {
+	install -d ${D}/${libdir}/pkgconfig
+	install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
+}
+
+PACKAGES =+ "dumpsexp-dev"
+
+FILES_${PN}-dev += "${bindir}/hmac256"
+FILES_dumpsexp-dev += "${bindir}/dumpsexp"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
index b2e2d50..b74f079 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
@@ -21,7 +21,7 @@
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-inherit autotools binconfig-disabled pkgconfig gettext
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header
 CPPFLAGS += "-P"
 do_compile_prepend() {
 	TARGET_FILE=linux-gnu
@@ -53,6 +53,7 @@
 do_install_append() {
 	# we don't have common lisp in OE
 	rm -rf "${D}${datadir}/common-lisp/"
+	oe_multilib_header gpg-error.h gpgrt.h
 }
 
 FILES_${PN}-dev += "${bindir}/gpg-error"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch b/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
index c5c0cb0..b50f50e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
@@ -14,11 +14,11 @@
  CMakeLists.txt | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d5aad80..5cc9863 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -91,8 +91,7 @@ if(SHARED_ONLY)
+Index: libical-2.0.0/CMakeLists.txt
+===================================================================
+--- libical-2.0.0.orig/CMakeLists.txt
++++ libical-2.0.0/CMakeLists.txt
+@@ -116,8 +116,7 @@ if(SHARED_ONLY)
    set(LIBRARY_TYPE SHARED)
  endif()
  
@@ -26,8 +26,5 @@
 -find_package(Perl REQUIRED)
 +set(PERL_EXECUTABLE perl)
  
- # MSVC specific definitions
- if(WIN32)
--- 
-2.1.4
-
+ # Ensure finding 64bit libs when using 64-bit compilers
+ if(CMAKE_CL_64)
diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
index d4fe868..dcc21cc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
@@ -17,5 +17,3 @@
 UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
 
 inherit cmake pkgconfig
-
-FILES_${PN}-dev += "${libdir}/cmake/*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
index d28dfd9..5afe6de 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
@@ -6,13 +6,13 @@
 
 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 
-Index: libksba-1.3.0/Makefile.am
+Index: libksba-1.3.5/Makefile.am
 ===================================================================
---- libksba-1.3.0.orig/Makefile.am	2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/Makefile.am	2014-05-13 21:39:22.462385646 +0000
-@@ -21,6 +21,9 @@
+--- libksba-1.3.5.orig/Makefile.am
++++ libksba-1.3.5/Makefile.am
+@@ -20,6 +20,9 @@
+ 
  ACLOCAL_AMFLAGS = -I m4 -I gl/m4
- AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
  
 +pkgconfigdir = ${libdir}/pkgconfig
 +pkgconfig_DATA = ksba.pc
@@ -20,11 +20,11 @@
  # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
  GITLOG_TO_CHANGELOG=gitlog-to-changelog
  
-Index: libksba-1.3.0/configure.ac
+Index: libksba-1.3.5/configure.ac
 ===================================================================
---- libksba-1.3.0.orig/configure.ac	2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/configure.ac	2014-05-13 21:39:22.462385646 +0000
-@@ -400,6 +400,7 @@
+--- libksba-1.3.5.orig/configure.ac
++++ libksba-1.3.5/configure.ac
+@@ -414,6 +414,7 @@ gl/Makefile
  src/Makefile
  src/ksba-config
  src/versioninfo.rc
@@ -32,10 +32,10 @@
  tests/Makefile
  doc/Makefile
  ])
-Index: libksba-1.3.0/ksba.pc.in
+Index: libksba-1.3.5/ksba.pc.in
 ===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ libksba-1.3.0/ksba.pc.in	2014-05-13 21:39:22.462385646 +0000
+--- /dev/null
++++ libksba-1.3.5/ksba.pc.in
 @@ -0,0 +1,17 @@
 +prefix=@prefix@
 +exec_prefix=@exec_prefix@
@@ -54,11 +54,11 @@
 +Libs.private: -L${libdir} -lgpg-error
 +Cflags: -I${includedir}
 +
-Index: libksba-1.3.0/src/ksba.m4
+Index: libksba-1.3.5/src/ksba.m4
 ===================================================================
---- libksba-1.3.0.orig/src/ksba.m4	2014-05-13 21:39:22.390385646 +0000
-+++ libksba-1.3.0/src/ksba.m4	2014-05-13 21:49:03.650382696 +0000
-@@ -22,18 +22,7 @@
+--- libksba-1.3.5.orig/src/ksba.m4
++++ libksba-1.3.5/src/ksba.m4
+@@ -22,18 +22,7 @@ dnl with a changed API.
  dnl
  AC_DEFUN([AM_PATH_KSBA],
  [AC_REQUIRE([AC_CANONICAL_HOST])
@@ -77,7 +77,7 @@
    tmp=ifelse([$1], ,1:1.0.0,$1)
    if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
       req_ksba_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -43,48 +32,13 @@
+@@ -43,48 +32,13 @@ AC_DEFUN([AM_PATH_KSBA],
       min_ksba_version="$tmp"
    fi
  
@@ -129,7 +129,7 @@
          if test "$tmp" -gt 0 ; then
             AC_MSG_CHECKING([KSBA API version])
             if test "$req_ksba_api" -eq "$tmp" ; then
-@@ -97,10 +51,8 @@
+@@ -97,10 +51,8 @@ AC_DEFUN([AM_PATH_KSBA],
       fi
    fi
    if test $ok = yes; then
@@ -141,7 +141,7 @@
      if test x"$libksba_config_host" != xnone ; then
        if test x"$libksba_config_host" != x"$host" ; then
    AC_MSG_WARN([[
-@@ -114,8 +66,6 @@
+@@ -114,8 +66,6 @@ AC_DEFUN([AM_PATH_KSBA],
        fi
      fi
    else
diff --git a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb
index 36b6670..a7ea53f 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.5.bb
@@ -24,3 +24,5 @@
 	# Else these could be used in preference to those in aclocal-copy
 	rm -f ${S}/m4/gpg-error.m4
 }
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb b/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
deleted file mode 100644
index 5881324..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require libmpc.inc
-
-DEPENDS = "gmp mpfr"
-
-LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI = "https://ftp.gnu.org/gnu/mpc/mpc-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "d6a1d5f8ddea3abd2cc3e98f58352d26"
-SRC_URI[sha256sum] = "617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"
-
-UPSTREAM_CHECK_URI = "http://www.multiprecision.org/index.php?prog=mpc&page=download"
-
-S = "${WORKDIR}/mpc-${PV}"
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb
new file mode 100644
index 0000000..2d25d38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb
@@ -0,0 +1,15 @@
+require libmpc.inc
+
+DEPENDS = "gmp mpfr"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
+SRC_URI = "https://ftp.gnu.org/gnu/mpc/mpc-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4125404e41e482ec68282a2e687f6c73"
+SRC_URI[sha256sum] = "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"
+
+UPSTREAM_CHECK_URI = "http://www.multiprecision.org/mpc/download.html"
+
+S = "${WORKDIR}/mpc-${PV}"
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch
new file mode 100644
index 0000000..b20a299
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch
@@ -0,0 +1,38 @@
+Subject: [PATCH] fix libnl-3.4.0 musl compile problem  
+Avoid in6_addr redefinition
+
+Upstream-Status: Pending
+
+Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+---
+ include/linux-private/linux/if_bridge.h | 1 -
+ include/linux-private/linux/ipv6.h      | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/include/linux-private/linux/if_bridge.h b/include/linux-private/linux/if_bridge.h
+index f24050b..8f7490c 100644
+--- a/include/linux-private/linux/if_bridge.h
++++ b/include/linux-private/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+ 
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+ 
+ #define SYSFS_BRIDGE_ATTR	"bridge"
+ #define SYSFS_BRIDGE_FDB	"brforward"
+diff --git a/include/linux-private/linux/ipv6.h b/include/linux-private/linux/ipv6.h
+index e05e684..f16349d 100644
+--- a/include/linux-private/linux/ipv6.h
++++ b/include/linux-private/linux/ipv6.h
+@@ -2,7 +2,6 @@
+ #define _IPV6_H
+ 
+ #include <asm/byteorder.h>
+-#include <linux/in6.h>
+ 
+ /* The latest drafts declared increase in minimal mtu up to 1280. */
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
deleted file mode 100644
index 79aa0bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-libnl has progressed to 0.3.2 and there does not appear to be any
-"make -j" issues with this build after my limited testing on that
-newer version so we can assume this issue is fixed upstream
-
-Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-
-Index: libnl-3.2.25/lib/Makefile.am
-===================================================================
---- libnl-3.2.25.orig/lib/Makefile.am
-+++ libnl-3.2.25/lib/Makefile.am
-@@ -46,9 +46,12 @@ CLEANFILES = \
- 
- # Hack to avoid using ylwrap. It does not function correctly in combination
- # with --header-file=
-+route/pktloc.lo: route/pktloc_syntax.h route/pktloc_grammar.h
-+route/pktloc_grammar.h: route/pktloc_grammar.c
- route/pktloc_grammar.c: route/pktloc_grammar.l
- 	$(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
- 
-+route/pktloc_syntax.h: route/pktloc_syntax.c
- route/pktloc_syntax.c: route/pktloc_syntax.y
- 	$(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
- 
-@@ -102,7 +105,9 @@ BUILT_SOURCES = \
- 	route/cls/ematch_grammar.c \
- 	route/cls/ematch_syntax.c \
- 	route/pktloc_grammar.c \
--	route/pktloc_syntax.c
-+   route/pktloc_syntax.c \
-+   route/pktloc_syntax.h \
-+   route/pktloc_grammar.h
- 
- EXTRA_DIST = \
- 	route/pktloc_grammar.l \
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.29.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.29.bb
deleted file mode 100644
index 7d4839b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.29.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "A library for applications dealing with netlink sockets"
-HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
-SECTION = "libs/network"
-
-PE = "1"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "flex-native bison-native"
-
-SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \
-           file://fix-pktloc_syntax_h-race.patch \
-           file://fix-pc-file.patch \
-"
-UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
-
-SRC_URI[md5sum] = "a8ba62a5c4f883f4e493a46d1f3733fe"
-SRC_URI[sha256sum] = "0beb593dc6abfffa18a5c787b27884979c1b7e7f1fd468c801e3cc938a685922"
-
-inherit autotools pkgconfig
-
-FILES_${PN} = "${libdir}/libnl-3.so.* \
-               ${libdir}/libnl.so.* \
-               ${sysconfdir}"
-RREPLACES_${PN} = "libnl2"
-RCONFLICTS_${PN} = "libnl2"
-FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
-FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
-
-PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
-FILES_${PN}-cli   = "${libdir}/libnl-cli-3.so.* \
-                     ${libdir}/libnl/cli/*/*.so \
-                     ${bindir}/genl-ctrl-list \
-                     ${bindir}/idiag-socket-details \
-                     ${bindir}/nf-* \
-                     ${bindir}/nl-*"
-FILES_${PN}-genl  = "${libdir}/libnl-genl-3.so.* \
-                     ${libdir}/libnl-genl.so.*"
-FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
-FILES_${PN}-nf    = "${libdir}/libnl-nf-3.so.*"
-FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
-FILES_${PN}-xfrm  = "${libdir}/libnl-xfrm-3.so.*"
-RREPLACES_${PN}-genl = "libnl-genl2"
-RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.4.0.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.4.0.bb
new file mode 100644
index 0000000..90dc644
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.4.0.bb
@@ -0,0 +1,46 @@
+SUMMARY = "A library for applications dealing with netlink sockets"
+HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
+SECTION = "libs/network"
+
+PE = "1"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \
+           file://fix-pc-file.patch \
+           file://0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch \
+"
+
+UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
+
+SRC_URI[md5sum] = "8f71910c03db363b41e2ea62057a4311"
+SRC_URI[sha256sum] = "b7287637ae71c6db6f89e1422c995f0407ff2fe50cecd61a312b6a9b0921f5bf"
+
+inherit autotools pkgconfig
+
+FILES_${PN} = "${libdir}/libnl-3.so.* \
+               ${libdir}/libnl.so.* \
+               ${sysconfdir}"
+RREPLACES_${PN} = "libnl2"
+RCONFLICTS_${PN} = "libnl2"
+FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
+FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
+
+PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
+FILES_${PN}-cli   = "${libdir}/libnl-cli-3.so.* \
+                     ${libdir}/libnl/cli/*/*.so \
+                     ${bindir}/genl-ctrl-list \
+                     ${bindir}/idiag-socket-details \
+                     ${bindir}/nf-* \
+                     ${bindir}/nl-*"
+FILES_${PN}-genl  = "${libdir}/libnl-genl-3.so.* \
+                     ${libdir}/libnl-genl.so.*"
+FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
+FILES_${PN}-nf    = "${libdir}/libnl-nf-3.so.*"
+FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
+FILES_${PN}-xfrm  = "${libdir}/libnl-xfrm-3.so.*"
+RREPLACES_${PN}-genl = "libnl-genl2"
+RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-7186.patch b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-7186.patch
deleted file mode 100644
index bfa3bfe..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-7186.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-libpcre2-10.23: Fix CVE-2017-7186
-
-A fuzz on libpcre1 through the pcretest utility revealed an invalid read in the
-library. For who is interested in a detailed description of the bug, will
-follow a feedback from upstream:
-
-This was a genuine bug in the 32-bit library. Thanks for finding it. The crash
-was caused by trying to find a Unicode property for a code value greater than
-0x10ffff, the Unicode maximum, when running in non-UTF mode (where character
-values can be up to 0xffffffff).
-
-The complete ASan output:
-
-# pcretest -32 -d $FILE
-==14788==ERROR: AddressSanitizer: SEGV on unknown address 0x7f1bbffed4df (pc 0x7f1bbee3fe6b bp 0x7fff8b50d8c0 sp 0x7fff8b50d3a0 T0)
-==14788==The signal is caused by a READ memory access.
-    #0 0x7f1bbee3fe6a in match /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcre_exec.c:5473:18
-    #1 0x7f1bbee09226 in pcre32_exec /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcre_exec.c:6936:8
-    #2 0x527d6c in main /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcretest.c:5218:9
-    #3 0x7f1bbddd678f in __libc_start_main /tmp/portage/sys-libs/glibc-2.23-r3/work/glibc-2.23/csu/../csu/libc-start.c:289
-    #4 0x41b438 in _init (/usr/bin/pcretest+0x41b438)
-
-AddressSanitizer can not provide additional info.
-SUMMARY: AddressSanitizer: SEGV /tmp/portage/dev-libs/libpcre-8.40/work/pcre-8.40/pcre_exec.c:5473:18 in match
-==14788==ABORTING
-
-Upstream-Status: Backport [https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_ucd.c?view=patch&r1=316&r2=670&sortby=date \
-                        https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_internal.h?view=patch&r1=600&r2=670&sortby=date]
-CVE: CVE-2017-7186
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
---- trunk/src/pcre2_ucd.c  2015/07/17 15:44:51 316
-+++ trunk/src/pcre2_ucd.c  2017/02/24 18:25:32 670
-@@ -41,6 +41,20 @@
- 
- const char *PRIV(unicode_version) = "8.0.0";
- 
-+/* If the 32-bit library is run in non-32-bit mode, character values
-+greater than 0x10ffff may be encountered. For these we set up a
-+special record. */
-+
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+const ucd_record PRIV(dummy_ucd_record)[] = {{
-+  ucp_Common,    /* script */
-+  ucp_Cn,        /* type unassigned */
-+  ucp_gbOther,   /* grapheme break property */
-+  0,             /* case set */
-+  0,             /* other case */
-+  }};
-+#endif
-+
- /* When recompiling tables with a new Unicode version, please check the
- types in this structure definition from pcre2_internal.h (the actual
- field names will be different):
---- trunk/src/pcre2_internal.h 2016/11/19 12:46:24 600
-+++ trunk/src/pcre2_internal.h 2017/02/24 18:25:32 670
-@@ -1774,10 +1774,17 @@
- /* UCD access macros */
- 
- #define UCD_BLOCK_SIZE 128
--#define GET_UCD(ch) (PRIV(ucd_records) + \
-+#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \
-         PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \
-         UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE])
- 
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+#define GET_UCD(ch) ((ch > MAX_UTF_CODE_POINT)? \
-+  PRIV(dummy_ucd_record) : REAL_GET_UCD(ch))
-+#else
-+#define GET_UCD(ch) REAL_GET_UCD(ch)
-+#endif
-+
- #define UCD_CHARTYPE(ch)    GET_UCD(ch)->chartype
- #define UCD_SCRIPT(ch)      GET_UCD(ch)->script
- #define UCD_CATEGORY(ch)    PRIV(ucp_gentype)[UCD_CHARTYPE(ch)]
-@@ -1834,6 +1841,9 @@
- #define _pcre2_default_compile_context PCRE2_SUFFIX(_pcre2_default_compile_context_)
- #define _pcre2_default_match_context   PCRE2_SUFFIX(_pcre2_default_match_context_)
- #define _pcre2_default_tables          PCRE2_SUFFIX(_pcre2_default_tables_)
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+#define _pcre2_dummy_ucd_record        PCRE2_SUFFIX(_pcre2_dummy_ucd_record_)
-+#endif
- #define _pcre2_hspace_list             PCRE2_SUFFIX(_pcre2_hspace_list_)
- #define _pcre2_vspace_list             PCRE2_SUFFIX(_pcre2_vspace_list_)
- #define _pcre2_ucd_caseless_sets       PCRE2_SUFFIX(_pcre2_ucd_caseless_sets_)
-@@ -1858,6 +1868,9 @@
- extern const uint32_t                  PRIV(vspace_list)[];
- extern const uint32_t                  PRIV(ucd_caseless_sets)[];
- extern const ucd_record                PRIV(ucd_records)[];
-+#if PCRE2_CODE_UNIT_WIDTH == 32
-+extern const ucd_record                PRIV(dummy_ucd_record)[];
-+#endif
- extern const uint8_t                   PRIV(ucd_stage1)[];
- extern const uint16_t                  PRIV(ucd_stage2)[];
- extern const uint32_t                  PRIV(ucp_gbtable)[];
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-8786.patch b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-8786.patch
deleted file mode 100644
index eafafc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/libpcre2-CVE-2017-8786.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-libpcre2-10.23: Fix CVE-2017-8786
-
-The pcre2test.c in PCRE2 10.23 allows remote attackers to cause a denial of
-service (heap-based buffer overflow) or possibly have unspecified other impact
-via a crafted regular expression.
-
-Upstream-Status: Backport [https://vcs.pcre.org/pcre2/code/trunk/src/pcre2test.c?r1=692&r2=697&view=patch]
-CVE: CVE-2017-8786
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
---- trunk/src/pcre2test.c  2017/03/21 16:18:54 692
-+++ trunk/src/pcre2test.c  2017/03/21 18:36:13 697
-@@ -1017,9 +1017,9 @@
-   if (test_mode == PCRE8_MODE) \
-     r = pcre2_get_error_message_8(a,G(b,8),G(G(b,8),_size)); \
-   else if (test_mode == PCRE16_MODE) \
--    r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size)); \
-+    r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size/2)); \
-   else \
--    r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size))
-+    r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size/4))
- 
- #define PCRE2_GET_OVECTOR_COUNT(a,b) \
-   if (test_mode == PCRE8_MODE) \
-@@ -1399,6 +1399,9 @@
- 
- /* ----- Common macros for two-mode cases ----- */
- 
-+#define BYTEONE (BITONE/8)
-+#define BYTETWO (BITTWO/8)
-+
- #define CASTFLD(t,a,b) \
-   ((test_mode == G(G(PCRE,BITONE),_MODE))? (t)(G(a,BITONE)->b) : \
-     (t)(G(a,BITTWO)->b))
-@@ -1481,9 +1484,9 @@
- 
- #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
-   if (test_mode == G(G(PCRE,BITONE),_MODE)) \
--    r = G(pcre2_get_error_message_,BITONE)(a,G(b,BITONE),G(G(b,BITONE),_size)); \
-+    r = G(pcre2_get_error_message_,BITONE)(a,G(b,BITONE),G(G(b,BITONE),_size/BYTEONE)); \
-   else \
--    r = G(pcre2_get_error_message_,BITTWO)(a,G(b,BITTWO),G(G(b,BITTWO),_size))
-+    r = G(pcre2_get_error_message_,BITTWO)(a,G(b,BITTWO),G(G(b,BITTWO),_size/BYTETWO))
- 
- #define PCRE2_GET_OVECTOR_COUNT(a,b) \
-   if (test_mode == G(G(PCRE,BITONE),_MODE)) \
-@@ -1904,7 +1907,7 @@
- #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
-   a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h,i,j)
- #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
--  r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size))
-+  r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size/2))
- #define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_16(G(b,16))
- #define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_16(G(b,16))
- #define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_16(G(a,16),b)
-@@ -2000,7 +2003,7 @@
- #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
-   a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h,i,j)
- #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
--  r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size))
-+  r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size/4))
- #define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_32(G(b,32))
- #define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_32(G(b,32))
- #define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_32(G(a,32),b)
-@@ -2889,7 +2892,7 @@
-   {
-   if (pbuffer32 != NULL) free(pbuffer32);
-   pbuffer32_size = 4*len + 4;
--  if (pbuffer32_size < 256) pbuffer32_size = 256;
-+  if (pbuffer32_size < 512) pbuffer32_size = 512;
-   pbuffer32 = (uint32_t *)malloc(pbuffer32_size);
-   if (pbuffer32 == NULL)
-     {
-@@ -7600,7 +7603,8 @@
-   int errcode;
-   char *endptr;
- 
--/* Ensure the relevant non-8-bit buffer is available. */
-+/* Ensure the relevant non-8-bit buffer is available. Ensure that it is at 
-+least 128 code units, because it is used for retrieving error messages. */
- 
- #ifdef SUPPORT_PCRE2_16
-   if (test_mode == PCRE16_MODE)
-@@ -7620,7 +7624,7 @@
- #ifdef SUPPORT_PCRE2_32
-   if (test_mode == PCRE32_MODE)
-     {
--    pbuffer32_size = 256;
-+    pbuffer32_size = 512;
-     pbuffer32 = (uint32_t *)malloc(pbuffer32_size);
-     if (pbuffer32 == NULL)
-       {
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
index 9516caf..871cdfc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
@@ -9,11 +9,11 @@
 
 Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
 
-diff --git a/Makefile.am b/Makefile.am
-index 38f1d41..2bde083 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -298,9 +298,21 @@ bin_SCRIPTS = pcre2-config
+Index: pcre2-10.30/Makefile.am
+===================================================================
+--- pcre2-10.30.orig/Makefile.am
++++ pcre2-10.30/Makefile.am
+@@ -325,9 +325,21 @@ bin_SCRIPTS = pcre2-config
  ## to copy a distributed set of tables that are defined for ASCII code. In this
  ## case, dftables is not needed.
  
@@ -35,13 +35,13 @@
  src/pcre2_chartables.c: dftables$(EXEEXT)
  	rm -f $@
  	./dftables$(EXEEXT) $@
-diff --git a/configure.ac b/configure.ac
-index d7c57aa..d6eb0aa 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,6 +59,23 @@ then
-   fi
- fi
+Index: pcre2-10.30/configure.ac
+===================================================================
+--- pcre2-10.30.orig/configure.ac
++++ pcre2-10.30/configure.ac
+@@ -60,6 +60,23 @@ fi
+ # This is a new thing required to stop a warning from automake 1.12
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  
 +if test x"$cross_compiling" = xyes; then
 +    CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.23.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.23.bb
deleted file mode 100644
index ca2b028..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.23.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-DESCRIPTION = "There are two major versions of the PCRE library. The \
-newest version is PCRE2, which is a re-working of the original PCRE \
-library to provide an entirely new API. The original, very widely \
-deployed PCRE library's API and feature are stable, future releases \
- will be for bugfixes only. All new future features will be to PCRE2, \
-not the original PCRE 8.x series."
-SUMMARY = "Perl Compatible Regular Expressions version 2"
-HOMEPAGE = "http://www.pcre.org"
-SECTION = "devel"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=3de34df49e1fe3c3b59a08dff214488b"
-
-SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \
-           file://pcre-cross.patch \
-           file://libpcre2-CVE-2017-8786.patch \
-           file://libpcre2-CVE-2017-7186.patch \
-"
-
-SRC_URI[md5sum] = "b2cd00ca7e24049040099b0a46bb3649"
-SRC_URI[sha256sum] = "dfc79b918771f02d33968bd34a749ad7487fa1014aeb787fad29dd392b78c56e"
-
-CVE_PRODUCT = "pcre2"
-
-S = "${WORKDIR}/pcre2-${PV}"
-
-PROVIDES += "pcre2"
-DEPENDS += "bzip2 zlib"
-
-BINCONFIG = "${bindir}/pcre2-config"
-
-inherit autotools binconfig-disabled
-
-EXTRA_OECONF = "\
-    --enable-newline-is-lf \
-    --enable-rebuild-chartables \
-    --with-link-size=2 \
-    --with-match-limit=10000000 \
-"
-
-# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
-# set CFLAGS_FOR_BUILD, required for the libpcre build.
-BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src"
-CFLAGS += "-D_REENTRANT"
-CXXFLAGS_append_powerpc = " -lstdc++"
-
-export CCLD_FOR_BUILD ="${BUILD_CCLD}"
-
-PACKAGES =+ "pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
-
-SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes"
-SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs"
-SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions"
-SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs"
-
-FILES_pcre2grep = "${bindir}/pcre2grep"
-FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1"
-FILES_pcre2test = "${bindir}/pcre2test"
-FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.30.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.30.bb
new file mode 100644
index 0000000..46c2d63
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre2_10.30.bb
@@ -0,0 +1,61 @@
+DESCRIPTION = "There are two major versions of the PCRE library. The \
+newest version is PCRE2, which is a re-working of the original PCRE \
+library to provide an entirely new API. The original, very widely \
+deployed PCRE library's API and feature are stable, future releases \
+ will be for bugfixes only. All new future features will be to PCRE2, \
+not the original PCRE 8.x series."
+SUMMARY = "Perl Compatible Regular Expressions version 2"
+HOMEPAGE = "http://www.pcre.org"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=12d55e15a0c6da5c645ba40382bd3293"
+
+SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \
+           file://pcre-cross.patch \
+"
+
+SRC_URI[md5sum] = "d3adf4b130eed854a530390f00020a65"
+SRC_URI[sha256sum] = "90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db"
+
+CVE_PRODUCT = "pcre2"
+
+S = "${WORKDIR}/pcre2-${PV}"
+
+PROVIDES += "pcre2"
+DEPENDS += "bzip2 zlib"
+
+BINCONFIG = "${bindir}/pcre2-config"
+
+inherit autotools binconfig-disabled
+
+EXTRA_OECONF = "\
+    --enable-newline-is-lf \
+    --enable-rebuild-chartables \
+    --with-link-size=2 \
+    --with-match-limit=10000000 \
+    --enable-pcre2-16 \
+    --enable-pcre2-32 \
+"
+# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
+# set CFLAGS_FOR_BUILD, required for the libpcre build.
+BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src"
+CFLAGS += "-D_REENTRANT"
+CXXFLAGS_append_powerpc = " -lstdc++"
+
+export CCLD_FOR_BUILD ="${BUILD_CCLD}"
+
+PACKAGES =+ "libpcre2-16 libpcre2-32 pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
+
+SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes"
+SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs"
+SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions"
+SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs"
+
+FILES_libpcre2-16 = "${libdir}/libpcre2-16.so.*"
+FILES_libpcre2-32 = "${libdir}/libpcre2-32.so.*"
+FILES_pcre2grep = "${bindir}/pcre2grep"
+FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1"
+FILES_pcre2test = "${bindir}/pcre2test"
+FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb
index 0eaed18..0187c08 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.41.bb
@@ -80,4 +80,8 @@
 	for i in RunTest RunGrepTest test-driver; \
 	  do cp ${S}/$i $t; \
 	done
+	# Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
+	# If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8
+	# locale so the test fails if fr_FR is UTF-8 locale.
+	sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest 
 }
diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.14.bb b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.14.bb
deleted file mode 100644
index 4c39f52..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.14.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Library providing automatic proxy configuration management"
-HOMEPAGE = "https://github.com/libproxy/libproxy"
-BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
-SECTION = "libs"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "e7514f78f5432210e17a01b6b618dde2"
-SRC_URI[sha256sum] = "e25d046850346a505c0617646f1e68b660092efadf665548a89c280900262ea6"
-
-UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
-UPSTREAM_CHECK_REGEX = "libproxy-(?P<pver>.*)\.tar"
-
-inherit cmake pkgconfig
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
-PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
-PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
-
-EXTRA_OECMAKE += " \
-    -DWITH_KDE4=no \
-    -DWITH_MOZJS=no \
-    -DWITH_NM=no \
-    -DWITH_PERL=no \
-    -DWITH_PYTHON=no \
-    -DWITH_WEBKIT=no \
-    -DLIB_INSTALL_DIR=${libdir} \
-    -DLIBEXEC_INSTALL_DIR=${libexecdir} \
-"
-SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
-
-FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
-FILES_${PN}-dev += "${datadir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb
new file mode 100644
index 0000000..991c9d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Library providing automatic proxy configuration management"
+HOMEPAGE = "https://github.com/libproxy/libproxy"
+BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
+SRC_URI[md5sum] = "f6b1d2a1e17a99cd3debaae6d04ab152"
+SRC_URI[sha256sum] = "654db464120c9534654590b6683c7fa3887b3dad0ca1c4cd412af24fbfca6d4f"
+
+UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
+UPSTREAM_CHECK_REGEX = "libproxy-(?P<pver>.*)\.tar"
+
+inherit cmake pkgconfig
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
+PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
+PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
+
+EXTRA_OECMAKE += " \
+    -DWITH_KDE4=no \
+    -DWITH_MOZJS=no \
+    -DWITH_NM=no \
+    -DWITH_PERL=no \
+    -DWITH_PYTHON=no \
+    -DWITH_WEBKIT=no \
+    -DLIB_INSTALL_DIR=${libdir} \
+    -DLIBEXEC_INSTALL_DIR=${libexecdir} \
+"
+SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
+
+FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.58.2.bb b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.58.2.bb
deleted file mode 100644
index c9f95e5..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.58.2.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "An HTTP library implementation in C"
-HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome/libs"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
-
-SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
-
-SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "eb33adb459c2283efc5c7d09ccdbbcfc"
-SRC_URI[sha256sum] = "442300ca1b1bf8a3bbf2f788203287ff862542d4fc048f19a92a068a27d17b72"
-
-S = "${WORKDIR}/libsoup-${PV}"
-
-inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
-
-# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
-PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
-
-EXTRA_OECONF = "--disable-vala"
-
-# When built without gnome support, libsoup-2.4 will contain only one shared lib
-# and will therefore become subject to renaming by debian.bbclass. Prevent
-# renaming in order to keep the package name consistent regardless of whether
-# gnome support is enabled or disabled.
-DEBIAN_NOAUTONAME_${PN} = "1"
-
-# glib-networking is needed for SSL, proxies, etc.
-RRECOMMENDS_${PN} = "glib-networking"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb
new file mode 100644
index 0000000..e2e7ff4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb
@@ -0,0 +1,35 @@
+SUMMARY = "An HTTP library implementation in C"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome/libs"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
+
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "4cf8937d161d3dd71a65f1684e317824"
+SRC_URI[sha256sum] = "1b0dc762f23abe4e0d29b77370e539fd35f31d8e8e0318d6ddccff395be68a22"
+
+S = "${WORKDIR}/libsoup-${PV}"
+
+inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
+PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
+
+EXTRA_OECONF = "--disable-vala"
+
+# When built without gnome support, libsoup-2.4 will contain only one shared lib
+# and will therefore become subject to renaming by debian.bbclass. Prevent
+# renaming in order to keep the package name consistent regardless of whether
+# gnome support is enabled or disabled.
+DEBIAN_NOAUTONAME_${PN} = "1"
+
+# glib-networking is needed for SSL, proxies, etc.
+RRECOMMENDS_${PN} = "glib-networking"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
index d448916..9e8ce22 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
@@ -1,6 +1,6 @@
-From 8d99a368615656a835f5502326afd31cec2cebfe Mon Sep 17 00:00:00 2001
+From 30562065ba9e4c238e76100b5f9f0c5add0e635b Mon Sep 17 00:00:00 2001
 From: Jackie Huang <jackie.huang@windriver.com>
-Date: Mon, 16 Sep 2013 18:16:12 +0800
+Date: Tue, 5 Dec 2017 09:30:36 +0200
 Subject: [PATCH] remove the test to convert euc-jp
 
 Remove the test "Test against HP-UX 11.11 bug:
@@ -13,28 +13,44 @@
 
 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
 ---
- gnulib-m4/iconv.m4 |   11 -----------
- 1 files changed, 0 insertions(+), 11 deletions(-)
+---
+ gnulib-m4/iconv.m4 | 23 -----------------------
+ 1 file changed, 23 deletions(-)
 
-Index: libunistring-0.9.4/gnulib-m4/iconv.m4
-===================================================================
---- libunistring-0.9.4.orig/gnulib-m4/iconv.m4	2014-11-03 17:41:29.755011917 +0000
-+++ libunistring-0.9.4/gnulib-m4/iconv.m4	2014-11-03 17:43:03.795014480 +0000
-@@ -159,17 +159,6 @@
+diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
+index b33ecd0..73b6aa1 100644
+--- a/gnulib-m4/iconv.m4
++++ b/gnulib-m4/iconv.m4
+@@ -165,29 +165,6 @@ AC_DEFUN([AM_ICONV_LINK],
        }
    }
  #endif
 -  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
 -     provided.  */
--  if (/* Try standardized names.  */
--      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
--      /* Try IRIX, OSF/1 names.  */
--      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
--      /* Try AIX names.  */
--      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
--      /* Try HP-UX names.  */
--      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
--    result |= 16;
+-  {
+-    /* Try standardized names.  */
+-    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+-    /* Try IRIX, OSF/1 names.  */
+-    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+-    /* Try AIX names.  */
+-    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+-    /* Try HP-UX names.  */
+-    iconv_t cd4 = iconv_open ("utf8", "eucJP");
+-    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+-        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+-      result |= 16;
+-    if (cd1 != (iconv_t)(-1))
+-      iconv_close (cd1);
+-    if (cd2 != (iconv_t)(-1))
+-      iconv_close (cd2);
+-    if (cd3 != (iconv_t)(-1))
+-      iconv_close (cd3);
+-    if (cd4 != (iconv_t)(-1))
+-      iconv_close (cd4);
+-  }
    return result;
- }]])],
-         [am_cv_func_iconv_works=yes],
+ ]])],
+           [am_cv_func_iconv_works=yes], ,
+-- 
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.7.bb b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.7.bb
deleted file mode 100644
index f77a210..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.7.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Library for manipulating C and Unicode strings"
-
-DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
- consist of very different scripts from Latin letters to Chinese Hanzi\
- with many kinds of special characters accents, right-to-left writing\
- marks, hyphens, Roman numbers, and much more. But the POSIX platform\
- APIs for text do not contain adequate functions for dealing with\
- particular properties of many Unicode characters. In fact, the POSIX\
- APIs for text have several assumptions at their base which don't hold\
- for Unicode text.  This library provides functions for manipulating\
- Unicode strings and for manipulating C strings according to the Unicode\
- standard.  This package contains documentation."
-
-HOMEPAGE = "http://www.gnu.org/software/libunistring/"
-SECTION = "devel"
-LICENSE = "LGPLv3+ | GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
-                    file://README;beginline=45;endline=65;md5=08287d16ba8d839faed8d2dc14d7d6a5 \
-                    file://doc/libunistring.texi;md5=b86c9fd7acaac623017239640631912c \
-                   "
-
-SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
-           file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-"
-SRC_URI[md5sum] = "8e663454aa372181ee8e46edaa3ba4c8"
-SRC_URI[sha256sum] = "9ce081cbee1951b55597b30e7030bda9d7b2f034ef901a135ff3a020be5a41e5"
-
-inherit autotools texinfo
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb
new file mode 100644
index 0000000..ab7cba5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for manipulating C and Unicode strings"
+
+DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
+ consist of very different scripts from Latin letters to Chinese Hanzi\
+ with many kinds of special characters accents, right-to-left writing\
+ marks, hyphens, Roman numbers, and much more. But the POSIX platform\
+ APIs for text do not contain adequate functions for dealing with\
+ particular properties of many Unicode characters. In fact, the POSIX\
+ APIs for text have several assumptions at their base which don't hold\
+ for Unicode text.  This library provides functions for manipulating\
+ Unicode strings and for manipulating C strings according to the Unicode\
+ standard.  This package contains documentation."
+
+HOMEPAGE = "http://www.gnu.org/software/libunistring/"
+SECTION = "devel"
+LICENSE = "LGPLv3+ | GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+                    file://README;beginline=45;endline=65;md5=08287d16ba8d839faed8d2dc14d7d6a5 \
+                    file://doc/libunistring.texi;md5=efb80a3799a60f95feaf80661d4f204c \
+                   "
+
+SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
+           file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+"
+SRC_URI[md5sum] = "4f689e37e4c3bd67de5786aa51d98b13"
+SRC_URI[sha256sum] = "f5e90c08f9e5427ca3a2c0c53f19aa38b25c500913510ad25afef86448bea84a"
+
+inherit autotools texinfo
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
index 0dff2c8..c8faca4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
@@ -28,10 +28,10 @@
  include/libunwind_i.h | 1 +
  2 files changed, 2 insertions(+), 7 deletions(-)
 
-diff --git a/acinclude.m4 b/acinclude.m4
-index 497f7c2..9c15af1 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
+Index: libunwind-1.2.1/acinclude.m4
+===================================================================
+--- libunwind-1.2.1.orig/acinclude.m4
++++ libunwind-1.2.1/acinclude.m4
 @@ -22,11 +22,5 @@ fi])
  AC_DEFUN([CHECK_ATOMIC_OPS],
  [dnl Check whether the system has the atomic_ops package installed.
@@ -45,18 +45,15 @@
 -#  AC_CHECK_LIB(atomic_ops, main)
 +  AC_CHECK_LIB(atomic_ops, main)
  ])
-diff --git a/include/libunwind_i.h b/include/libunwind_i.h
-index 23f615e..deabdfd 100644
---- a/include/libunwind_i.h
-+++ b/include/libunwind_i.h
-@@ -95,6 +95,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
- 	(pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
+Index: libunwind-1.2.1/include/libunwind_i.h
+===================================================================
+--- libunwind-1.2.1.orig/include/libunwind_i.h
++++ libunwind-1.2.1/include/libunwind_i.h
+@@ -116,6 +116,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+         (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
  
  #ifdef HAVE_ATOMIC_OPS_H
 +# define AO_REQUIRE_CAS
  # include <atomic_ops.h>
  static inline int
  cmpxchg_ptr (void *addr, void *old, void *new)
--- 
-1.9.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/fix-mips.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/fix-mips.patch
deleted file mode 100644
index 0022237..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/fix-mips.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 5f354cb7b9c84dae006f0ebd8ad7a78d7e2aad0c Mon Sep 17 00:00:00 2001
-From: Dave Watson <davejwatson@fb.com>
-Date: Wed, 25 Jan 2017 16:18:02 -0800
-Subject: [PATCH] mips/tilegx: Add missing unwind_i.h header file
-
-reported-by: John Knight <John.Knight@belkin.com>
----
- src/Makefile.am | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5d874755..7de4c425 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -280,7 +280,7 @@ libunwind_hppa_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common)	\
- 	hppa/Gresume.c hppa/Gstep.c
- 
- # The list of files that go info libunwind and libunwind-mips:
--noinst_HEADERS += mips/init.h mips/offsets.h
-+noinst_HEADERS += mips/init.h mips/offsets.h mips/unwind_i.h
- libunwind_la_SOURCES_mips_common = $(libunwind_la_SOURCES_common)	    \
- 	mips/is_fpreg.c mips/regname.c
- 
-@@ -299,7 +299,7 @@ libunwind_mips_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common)	    \
- 	mips/Gis_signal_frame.c mips/Gregs.c mips/Gresume.c mips/Gstep.c
- 
- # The list of files that go info libunwind and libunwind-tilegx:
--noinst_HEADERS += tilegx/init.h tilegx/offsets.h
-+noinst_HEADERS += tilegx/init.h tilegx/offsets.h tilegx/unwind_i.h
- libunwind_la_SOURCES_tilegx_common = $(libunwind_la_SOURCES_common)	    \
- 	tilegx/is_fpreg.c tilegx/regname.c
- 
-diff --git a/src/mips/unwind_i.h b/src/mips/unwind_i.h
-new file mode 100644
-index 0000000..3382dcf
---- /dev/null
-+++ b/src/mips/unwind_i.h
-@@ -0,0 +1,43 @@
-+/* libunwind - a platform-independent unwind library
-+   Copyright (C) 2008 CodeSourcery
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
-+
-+#ifndef unwind_i_h
-+#define unwind_i_h
-+
-+#include <stdint.h>
-+
-+#include <libunwind-mips.h>
-+
-+#include "libunwind_i.h"
-+
-+#define mips_lock                       UNW_OBJ(lock)
-+#define mips_local_resume               UNW_OBJ(local_resume)
-+#define mips_local_addr_space_init      UNW_OBJ(local_addr_space_init)
-+
-+extern int mips_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
-+                             void *arg);
-+
-+extern void mips_local_addr_space_init (void);
-+
-+#endif /* unwind_i_h */
-diff --git a/src/tilegx/unwind_i.h b/src/tilegx/unwind_i.h
-new file mode 100644
-index 0000000..aac7be3
---- /dev/null
-+++ b/src/tilegx/unwind_i.h
-@@ -0,0 +1,44 @@
-+/* libunwind - a platform-independent unwind library
-+   Copyright (C) 2008 CodeSourcery
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
-+
-+#ifndef unwind_i_h
-+#define unwind_i_h
-+
-+#include <memory.h>
-+#include <stdint.h>
-+
-+#include <libunwind-tilegx.h>
-+
-+#include "libunwind_i.h"
-+
-+#define tilegx_local_resume            UNW_OBJ(local_resume)
-+#define tilegx_local_addr_space_init   UNW_OBJ(local_addr_space_init)
-+
-+extern int tilegx_local_resume (unw_addr_space_t as,
-+                                unw_cursor_t *cursor,
-+                                void *arg);
-+
-+extern void tilegx_local_addr_space_init (void);
-+
-+#endif /* unwind_i_h */
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb
new file mode 100644
index 0000000..37a7624
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb
@@ -0,0 +1,23 @@
+require libunwind.inc
+
+SRC_URI[md5sum] = "06ba9e60d92fd6f55cd9dadb084df19e"
+SRC_URI[sha256sum] = "3f3ecb90e28cbe53fba7a4a27ccce7aad188d3210bb1964a923a731a27a75acb"
+
+SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
+           file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+           file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
+           file://0001-x86-Stub-out-x86_local_resume.patch \
+           file://0001-Fix-build-on-mips-musl.patch \
+           file://0001-add-knobs-to-disable-enable-tests.patch \
+           file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
+           file://libunwind-1.1-x32.patch \
+           "
+
+SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
+EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
+
+# http://errors.yoctoproject.org/Errors/Details/20487/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.bb
deleted file mode 100644
index c6312f2..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require libunwind.inc
-
-SRC_URI[md5sum] = "eefcb5d7f78fdc8f1ed172a26ea4202f"
-SRC_URI[sha256sum] = "1de38ffbdc88bd694d10081865871cd2bfbb02ad8ef9e1606aee18d65532b992"
-
-SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
-           file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
-           file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
-           file://0001-x86-Stub-out-x86_local_resume.patch \
-           file://0001-Fix-build-on-mips-musl.patch \
-           file://0001-add-knobs-to-disable-enable-tests.patch \
-           file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
-           file://libunwind-1.1-x32.patch \
-           file://fix-mips.patch \
-           "
-
-SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
-EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
-
-# http://errors.yoctoproject.org/Errors/Details/20487/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.0.bb b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.0.bb
deleted file mode 100644
index 4ecb20b..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.0.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Userspace RCU (read-copy-update) library"
-HOMEPAGE = "http://lttng.org/urcu"
-BUGTRACKER = "http://lttng.org/project/issues"
-
-LICENSE = "LGPLv2.1+ & MIT-style"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
-                    file://src/urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
-                    file://include/urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
-
-SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
-           "
-
-SRC_URI[md5sum] = "69dab85b6929c378338b9504adc6aea7"
-SRC_URI[sha256sum] = "7cb58a7ba5151198087f025dc8d19d8918e9c6d56772f039696c111d9aad3190"
-
-S = "${WORKDIR}/userspace-rcu-${PV}"
-inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb
new file mode 100644
index 0000000..459c04a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Userspace RCU (read-copy-update) library"
+HOMEPAGE = "http://lttng.org/urcu"
+BUGTRACKER = "http://lttng.org/project/issues"
+
+LICENSE = "LGPLv2.1+ & MIT-style"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
+                    file://src/urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
+                    file://include/urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
+
+SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+           "
+
+SRC_URI[md5sum] = "281a2f92fdc39c40ad6b76f6631fdbd7"
+SRC_URI[sha256sum] = "9c09220be4435dc27fcd22d291707b94b97f159e0c442fbcd60c168f8f79eb06"
+
+S = "${WORKDIR}/userspace-rcu-${PV}"
+inherit autotools
+
+CPPFLAGS_append_riscv64  = " -pthread -D_REENTRANT"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Check-for-integer-overflow-in-xsltAddTextString.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Check-for-integer-overflow-in-xsltAddTextString.patch
deleted file mode 100644
index 57aaacc..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Check-for-integer-overflow-in-xsltAddTextString.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 08ab2774b870de1c7b5a48693df75e8154addae5 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Thu, 12 Jan 2017 15:39:52 +0100
-Subject: [PATCH] Check for integer overflow in xsltAddTextString
-
-Limit buffer size in xsltAddTextString to INT_MAX. The issue can be
-exploited to trigger an out of bounds write on 64-bit systems.
-
-Originally reported to Chromium:
-
-https://crbug.com/676623
-
-CVE: CVE-2017-5029
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitus.com>
-
----
- libxslt/transform.c     | 25 ++++++++++++++++++++++---
- libxslt/xsltInternals.h |  4 ++--
- 2 files changed, 24 insertions(+), 5 deletions(-)
-
-diff --git a/libxslt/transform.c b/libxslt/transform.c
-index 519133f..02bff34 100644
---- a/libxslt/transform.c
-+++ b/libxslt/transform.c
-@@ -813,13 +813,32 @@ xsltAddTextString(xsltTransformContextPtr ctxt, xmlNodePtr target,
-         return(target);
- 
-     if (ctxt->lasttext == target->content) {
-+        int minSize;
- 
--	if (ctxt->lasttuse + len >= ctxt->lasttsize) {
-+        /* Check for integer overflow accounting for NUL terminator. */
-+        if (len >= INT_MAX - ctxt->lasttuse) {
-+            xsltTransformError(ctxt, NULL, target,
-+                "xsltCopyText: text allocation failed\n");
-+            return(NULL);
-+        }
-+        minSize = ctxt->lasttuse + len + 1;
-+
-+        if (ctxt->lasttsize < minSize) {
- 	    xmlChar *newbuf;
- 	    int size;
-+            int extra;
-+
-+            /* Double buffer size but increase by at least 100 bytes. */
-+            extra = minSize < 100 ? 100 : minSize;
-+
-+            /* Check for integer overflow. */
-+            if (extra > INT_MAX - ctxt->lasttsize) {
-+                size = INT_MAX;
-+            }
-+            else {
-+                size = ctxt->lasttsize + extra;
-+            }
- 
--	    size = ctxt->lasttsize + len + 100;
--	    size *= 2;
- 	    newbuf = (xmlChar *) xmlRealloc(target->content,size);
- 	    if (newbuf == NULL) {
- 		xsltTransformError(ctxt, NULL, target,
-diff --git a/libxslt/xsltInternals.h b/libxslt/xsltInternals.h
-index 060b178..5ad1771 100644
---- a/libxslt/xsltInternals.h
-+++ b/libxslt/xsltInternals.h
-@@ -1754,8 +1754,8 @@ struct _xsltTransformContext {
-      * Speed optimization when coalescing text nodes
-      */
-     const xmlChar  *lasttext;		/* last text node content */
--    unsigned int    lasttsize;		/* last text node size */
--    unsigned int    lasttuse;		/* last text node use */
-+    int             lasttsize;		/* last text node size */
-+    int             lasttuse;		/* last text node use */
-     /*
-      * Per Context Debugging
-      */
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch
deleted file mode 100644
index 16ffeba..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 487e2f7e35dad3deec7978ce4478a3d4ea5070e7 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 10 Feb 2017 14:26:59 +0200
-Subject: [PATCH] Link libraries with libm
-
-Otherwise linking the resulting libraries to a binary (e.g. xsltproc)
-fails when using gold linker:
-| ../libxslt/.libs/libxslt.so: error: undefined reference to 'fmod'
-| ../libxslt/.libs/libxslt.so: error: undefined reference to 'pow'
-| ../libexslt/.libs/libexslt.so: error: undefined reference to 'floor'
-| collect2: error: ld returned 1 exit status
-
-Upstream-Status: Submitted [mailing list, Feb 10 2017]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- libexslt/Makefile.am | 2 +-
- libxslt/Makefile.am  | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libexslt/Makefile.am b/libexslt/Makefile.am
-index 1cf5138..5449524 100644
---- a/libexslt/Makefile.am
-+++ b/libexslt/Makefile.am
-@@ -27,7 +27,7 @@ libexslt_la_SOURCES =                   \
- 	libexslt.h			\
- 	dynamic.c
- 
--libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS)
-+libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS) $(M_LIBS)
- libexslt_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info $(LIBEXSLT_VERSION_INFO)
- 
- man_MANS = libexslt.3
-diff --git a/libxslt/Makefile.am b/libxslt/Makefile.am
-index d9fed68..9d44c3d 100644
---- a/libxslt/Makefile.am
-+++ b/libxslt/Makefile.am
-@@ -62,7 +62,7 @@ else
- LIBXSLT_VERSION_SCRIPT =
- endif
- 
--libxslt_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS)
-+libxslt_la_LIBADD = $(LIBXML_LIBS) $(M_LIBS) $(EXTRA_LIBS)
- libxslt_la_LDFLAGS =					\
- 		$(WIN32_EXTRA_LDFLAGS)			\
- 		$(LIBXSLT_VERSION_SCRIPT)		\
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
deleted file mode 100644
index 7186706..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From ed71ac9548a2bb6ecd2dc5ad880c604975f872b0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 2 Jun 2016 14:20:04 +0300
-Subject: [PATCH] Use pkg-config to find gcrypt and libxml2.
-
-Upstream-Status: Pending [libxml2 is upstreamable]
-
-RP 2014/5/22
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.in | 70 +++++++++++-------------------------------------------------
- 1 file changed, 12 insertions(+), 58 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 8bdf45a..0b2b312 100644
---- a/configure.in
-+++ b/configure.in
-@@ -377,6 +377,8 @@ AC_SUBST(pythondir)
- AC_SUBST(PYTHON_SUBDIR)
- AC_SUBST(PYTHON_LIBS)
- 
-+PKG_PROG_PKG_CONFIG
-+
- AC_ARG_WITH(crypto, [  --with-crypto           Add crypto support to exslt (on)])
- WITH_CRYPTO=0
- CRYPTO_TESTDIR=
-@@ -394,27 +396,14 @@ case $host in
-     CRYPTO_TESTDIR=crypto
-     ;;
-   *)
--    AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
--    if test "$LIBGCRYPT_CONFIG" != "no" ; then
--      LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
--      if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
--      then
--        LIBGCRYPT_CFLAGS=""
--        LIBGCRYPT_LIBS=""
--        echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
--      else
--        LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
--        LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
--        AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
--        echo 'Crypto extensions will be available.'
-+    PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
-+          AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
-+          echo 'Crypto extensions will be available.'
-         WITH_CRYPTO=1
-         CRYPTO_TESTDIR=crypto
--      fi
--    else
--      LIBGCRYPT_CFLAGS=""
--      LIBGCRYPT_LIBS=""
--      echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
--    fi
-+       ], [
-+          echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
-+        ])
- esac
- fi
- AC_SUBST(WITH_CRYPTO)
-@@ -476,24 +465,8 @@ dnl original work - Mathieu Lacage 30/03/2000
- dnl some tweaking - David Härdeman 30/10/2001
- dnl
- 
--LIBXML_CONFIG_PREFIX=""
- LIBXML_SRC=""
- 
--AC_ARG_WITH(libxml-prefix,
--        [  --with-libxml-prefix=[PFX]		Specify location of libxml config],
--	LIBXML_CONFIG_PREFIX=$withval
--)
--        
--AC_ARG_WITH(libxml-include-prefix,
--        [  --with-libxml-include-prefix=[PFX]	Specify location of libxml headers],
--        LIBXML_CFLAGS="-I$withval"
--)
--
--AC_ARG_WITH(libxml-libs-prefix,
--        [  --with-libxml-libs-prefix=[PFX]	Specify location of libxml libs],
--        LIBXML_LIBS="-L$withval"
--)
--
- AC_ARG_WITH(libxml-src,
- 	[  --with-libxml-src=[DIR]              For libxml thats not installed yet (sets all three above)],
- 	LIBXML_SRC="$withval"
-@@ -556,28 +529,9 @@ then
- 	fi
- fi
- 
--dnl
--dnl make sure xml2-config is executable,
--dnl test version and init our variables
--dnl
--
--if ${XML_CONFIG} --libs print > /dev/null 2>&1
--then
--	XMLVERS=`$XML_CONFIG --version`
--	if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
--	then
--		AC_MSG_RESULT($XMLVERS found)
--	else
--		AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
--	fi
--	LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
--	if test "x$LIBXML_SRC" = "x"; then
--		LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
--	fi
--else
--	AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
--fi
--
-+PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
-+    [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
-+)
- 
- AC_SUBST(CFLAGS)
- AC_SUBST(CPPFLAGS)
-@@ -602,7 +556,7 @@ fi
- 
- if test "$with_plugins" = "yes" ; then
-   AC_MSG_CHECKING([libxml2 module support])
--  WITH_MODULES="`$XML_CONFIG --modules`"
-+  WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
-   if test "${WITH_MODULES}" = "1"; then
-     AC_MSG_RESULT(yes)
-   else
--- 
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
deleted file mode 100644
index 16a8010..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: libxslt-1.1.27/libexslt.pc.in
-===================================================================
---- libxslt-1.1.27.orig/libexslt.pc.in
-+++ libxslt-1.1.27/libexslt.pc.in
-@@ -8,5 +8,5 @@ Name: libexslt
- Version: @LIBEXSLT_VERSION@
- Description: EXSLT Extension library
- Requires: libxml-2.0
--Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@
-+Libs: -lexslt @EXSLT_LIBDIR@ @EXSLT_LIBS@
- Cflags: @EXSLT_INCLUDEDIR@
-Index: libxslt-1.1.27/libxslt.pc.in
-===================================================================
---- libxslt-1.1.27.orig/libxslt.pc.in
-+++ libxslt-1.1.27/libxslt.pc.in
-@@ -8,5 +8,5 @@ Name: libxslt
- Version: @VERSION@
- Description: XSLT library version 2.
- Requires: libxml-2.0
--Libs: @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
-+Libs: -lxslt @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
- Cflags: @XSLT_INCLUDEDIR@
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb
deleted file mode 100644
index 5b11bc2..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "GNOME XSLT library"
-HOMEPAGE = "http://xmlsoft.org/XSLT/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
-
-SECTION = "libs"
-DEPENDS = "libxml2"
-
-SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz \
-           file://pkgconfig_fix.patch \
-           file://0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch \
-           file://0001-Link-libraries-with-libm.patch \
-           file://0001-Check-for-integer-overflow-in-xsltAddTextString.patch \
-           "
-
-SRC_URI[md5sum] = "a129d3c44c022de3b9dcf6d6f288d72e"
-SRC_URI[sha256sum] = "b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce"
-
-UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
-
-S = "${WORKDIR}/libxslt-${PV}"
-
-BINCONFIG = "${bindir}/xslt-config"
-
-inherit autotools pkgconfig binconfig-disabled lib_package
-
-# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
-do_configure_prepend () {
-	sed -i -e 's/ansidecl.h//' ${S}/configure.in
-
-	# The timestamps in the 1.1.28 tarball are messed up causing this file to
-	# appear out of date.  Touch it so that we don't try to regenerate it.
-	touch ${S}/doc/xsltproc.1
-}
-
-EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
-# older versions of this recipe had ${PN}-utils
-RPROVIDES_${PN}-bin += "${PN}-utils"
-RCONFLICTS_${PN}-bin += "${PN}-utils"
-RREPLACES_${PN}-bin += "${PN}-utils"
-
-
-do_install_append_class-native () {
-    create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
-}
-
-FILES_${PN} += "${libdir}/libxslt-plugins"
-FILES_${PN}-dev += "${libdir}/xsltConf.sh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb
new file mode 100644
index 0000000..6a03f77
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb
@@ -0,0 +1,46 @@
+SUMMARY = "GNOME XSLT library"
+HOMEPAGE = "http://xmlsoft.org/XSLT/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
+
+SECTION = "libs"
+DEPENDS = "libxml2"
+
+SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz"
+SRC_URI[md5sum] = "1fc72f98e98bf4443f1651165f3aa146"
+SRC_URI[sha256sum] = "526ecd0abaf4a7789041622c3950c0e7f2c4c8835471515fd77eec684a355460"
+
+UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
+
+S = "${WORKDIR}/libxslt-${PV}"
+
+BINCONFIG = "${bindir}/xslt-config"
+
+inherit autotools pkgconfig binconfig-disabled lib_package
+
+# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
+do_configure_prepend () {
+	sed -i -e 's/ansidecl.h//' ${S}/configure.ac
+
+	# The timestamps in the 1.1.28 tarball are messed up causing this file to
+	# appear out of date.  Touch it so that we don't try to regenerate it.
+	touch ${S}/doc/xsltproc.1
+}
+
+EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
+# older versions of this recipe had ${PN}-utils
+RPROVIDES_${PN}-bin += "${PN}-utils"
+RCONFLICTS_${PN}-bin += "${PN}-utils"
+RREPLACES_${PN}-bin += "${PN}-utils"
+
+
+do_install_append_class-native () {
+    create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+}
+
+FILES_${PN} += "${libdir}/libxslt-plugins"
+FILES_${PN}-dev += "${libdir}/xsltConf.sh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4
deleted file mode 100644
index c4d2ccd..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4
+++ /dev/null
@@ -1,358 +0,0 @@
-
-AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
-AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
-])#
-
-AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
-AC_HEADER_TIME
-AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
-])#
-
-AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
-AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
-])#
-
-
-AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(__int16)
-AC_CHECK_SIZEOF(__int32)
-AC_CHECK_SIZEOF(__int64)
-
-AC_CHECK_SIZEOF(void *)
-AC_CHECK_SIZEOF(size_t)
-AC_CHECK_SIZEOF(ptrdiff_t)
-])#
-
-
-# /***********************************************************************
-# // Check for ACC_conformance
-# ************************************************************************/
-
-AC_DEFUN([mfx_ACC_ACCCHK], [
-mfx_tmp=$1
-mfx_save_CPPFLAGS=$CPPFLAGS
-dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
-test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
-
-AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#define ACC_CONFIG_NO_HEADER 1
-#include "acc/acc.h"
-#include "acc/acc_incd.h"
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-static void test_acc_compile_time_assert(void) {
-#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-}
-#undef NDEBUG
-#include <assert.h>
-static int test_acc_run_time_assert(int r) {
-#define ACCCHK_ASSERT(expr)     assert(expr);
-#include "acc/acc_chk.ch"
-#undef ACCCHK_ASSERT
-return r;
-}
-]], [[
-test_acc_compile_time_assert();
-if (test_acc_run_time_assert(1) != 1) return 1;
-]]
-)])
-
-mfx_tmp=FAILED
-_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
-rm -f conftest.$ac_ext conftest.$ac_objext
-
-CPPFLAGS=$mfx_save_CPPFLAGS
-
-AC_MSG_RESULT([$mfx_tmp])
-case x$mfx_tmp in
-  xpassed | xyes) ;;
-  *)
-    AC_MSG_NOTICE([])
-    AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
-    AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
-    AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
-    AC_MSG_NOTICE([Thanks for your support.])
-    AC_MSG_NOTICE([])
-    AC_MSG_ERROR([ACC conformance test failed. Stop.])
-dnl    AS_EXIT
-    ;;
-esac
-])# mfx_ACC_ACCCHK
-
-
-# /***********************************************************************
-# // Check for ACC_conformance
-# ************************************************************************/
-
-AC_DEFUN([mfx_MINIACC_ACCCHK], [
-mfx_tmp=$1
-mfx_save_CPPFLAGS=$CPPFLAGS
-dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
-test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
-
-AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#define ACC_CONFIG_NO_HEADER 1
-#define ACC_WANT_ACC_INCD_H 1
-#include $2
-
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
-#include $2
-
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
-static void test_acc_compile_time_assert(void) {
-#include $2
-}
-
-#undef NDEBUG
-#include <assert.h>
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr)  assert(expr);
-static int test_acc_run_time_assert(int r) {
-#include $2
-return r;
-}
-]], [[
-test_acc_compile_time_assert();
-if (test_acc_run_time_assert(1) != 1) return 1;
-]]
-)])
-
-mfx_tmp=FAILED
-_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
-rm -f conftest.$ac_ext conftest.$ac_objext
-
-CPPFLAGS=$mfx_save_CPPFLAGS
-
-AC_MSG_RESULT([$mfx_tmp])
-case x$mfx_tmp in
-  xpassed | xyes) ;;
-  *)
-    AC_MSG_NOTICE([])
-    AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
-    AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
-    AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
-    AC_MSG_NOTICE([Thanks for your support.])
-    AC_MSG_NOTICE([])
-    AC_MSG_ERROR([ACC conformance test failed. Stop.])
-dnl    AS_EXIT
-    ;;
-esac
-])# mfx_MINIACC_ACCCHK
-
-
-
-# serial 1
-
-AC_DEFUN([mfx_PROG_CPPFLAGS], [
-AC_MSG_CHECKING([whether the C preprocessor needs special flags])
-
-AC_LANG_CONFTEST([AC_LANG_PROGRAM(
-[[#include <limits.h>
-#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
-#  include "your C preprocessor is broken 1"
-#elif (0xffffu == 0xfffffffful)
-#  include "your C preprocessor is broken 2"
-#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
-#  include "your C preprocessor is broken 3"
-#endif
-]], [[ ]]
-)])
-
-mfx_save_CPPFLAGS=$CPPFLAGS
-mfx_tmp=ERROR
-for mfx_arg in "" -no-cpp-precomp
-do
-  CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
-  _AC_COMPILE_IFELSE([],
-[mfx_tmp=$mfx_arg
-break])
-done
-CPPFLAGS=$mfx_save_CPPFLAGS
-rm -f conftest.$ac_ext conftest.$ac_objext
-case x$mfx_tmp in
-  x)
-    AC_MSG_RESULT([none needed]) ;;
-  xERROR)
-    AC_MSG_RESULT([ERROR])
-    AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
-    ;;
-  *)
-    AC_MSG_RESULT([$mfx_tmp])
-    CPPFLAGS="$mfx_tmp $CPPFLAGS"
-    ;;
-esac
-])# mfx_PROG_CPPFLAGS
-
-
-
-# serial 3
-
-AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
-AC_CACHE_CHECK([whether limits.h is sane],
-mfx_cv_header_sane_limits_h,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
-#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
-#  if defined(__APPLE__) && defined(__GNUC__)
-#    error "your preprocessor is broken - use compiler option -no-cpp-precomp"
-#  else
-#    include "your preprocessor is broken"
-#  endif
-#endif
-#define MFX_0xffff          0xffff
-#define MFX_0xffffffffL     4294967295ul
-#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
-#  include "error CHAR_BIT"
-#endif
-#if !defined(UCHAR_MAX)
-#  include "error UCHAR_MAX 1"
-#endif
-#if !defined(USHRT_MAX)
-#  include "error USHRT_MAX 1"
-#endif
-#if !defined(UINT_MAX)
-#  include "error UINT_MAX 1"
-#endif
-#if !defined(ULONG_MAX)
-#  include "error ULONG_MAX 1"
-#endif
-#if !defined(SHRT_MAX)
-#  include "error SHRT_MAX 1"
-#endif
-#if !defined(INT_MAX)
-#  include "error INT_MAX 1"
-#endif
-#if !defined(LONG_MAX)
-#  include "error LONG_MAX 1"
-#endif
-#if (UCHAR_MAX < 1)
-#  include "error UCHAR_MAX 2"
-#endif
-#if (USHRT_MAX < 1)
-#  include "error USHRT_MAX 2"
-#endif
-#if (UINT_MAX < 1)
-#  include "error UINT_MAX 2"
-#endif
-#if (ULONG_MAX < 1)
-#  include "error ULONG_MAX 2"
-#endif
-#if (UCHAR_MAX < 0xff)
-#  include "error UCHAR_MAX 3"
-#endif
-#if (USHRT_MAX < MFX_0xffff)
-#  include "error USHRT_MAX 3"
-#endif
-#if (UINT_MAX < MFX_0xffff)
-#  include "error UINT_MAX 3"
-#endif
-#if (ULONG_MAX < MFX_0xffffffffL)
-#  include "error ULONG_MAX 3"
-#endif
-#if (USHRT_MAX > UINT_MAX)
-#  include "error USHRT_MAX vs UINT_MAX"
-#endif
-#if (UINT_MAX > ULONG_MAX)
-#  include "error UINT_MAX vs ULONG_MAX"
-#endif
-]], [[
-#if (USHRT_MAX == MFX_0xffff)
-{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
-#elif (USHRT_MAX >= MFX_0xffff)
-{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
-#endif
-#if (UINT_MAX == MFX_0xffff)
-{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
-#elif (UINT_MAX >= MFX_0xffff)
-{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
-#endif
-#if (ULONG_MAX == MFX_0xffff)
-{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
-#elif (ULONG_MAX >= MFX_0xffff)
-{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
-#endif
-#if (USHRT_MAX == MFX_0xffffffffL)
-{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
-#elif (USHRT_MAX >= MFX_0xffffffffL)
-{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
-#endif
-#if (UINT_MAX == MFX_0xffffffffL)
-{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
-#elif (UINT_MAX >= MFX_0xffffffffL)
-{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
-#endif
-#if (ULONG_MAX == MFX_0xffffffffL)
-{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
-#elif (ULONG_MAX >= MFX_0xffffffffL)
-{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
-#endif
-]])],
-[mfx_cv_header_sane_limits_h=yes],
-[mfx_cv_header_sane_limits_h=no])])
-])
-
-# /***********************************************************************
-# // standard
-# ************************************************************************/
-
-AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
-AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
-])#
-
-
-# /***********************************************************************
-# //
-# ************************************************************************/
-
-dnl more types which are not yet covered by ACC
-
-AC_DEFUN([mfx_CHECK_SIZEOF], [
-AC_CHECK_SIZEOF(__int32)
-AC_CHECK_SIZEOF(intmax_t)
-AC_CHECK_SIZEOF(uintmax_t)
-AC_CHECK_SIZEOF(intptr_t)
-AC_CHECK_SIZEOF(uintptr_t)
-
-AC_CHECK_SIZEOF(float)
-AC_CHECK_SIZEOF(double)
-AC_CHECK_SIZEOF(long double)
-
-AC_CHECK_SIZEOF(dev_t)
-AC_CHECK_SIZEOF(fpos_t)
-AC_CHECK_SIZEOF(mode_t)
-AC_CHECK_SIZEOF(off_t)
-AC_CHECK_SIZEOF(ssize_t)
-AC_CHECK_SIZEOF(time_t)
-])#
-
-
-
-AC_DEFUN([mfx_CHECK_LIB_WINMM], [
-if test "X$GCC" = Xyes; then
-case $host_os in
-cygwin* | mingw* | pw32*)
-     test "X$LIBS" != "X" && LIBS="$LIBS "
-     LIBS="${LIBS}-lwinmm" ;;
-*)
-     ;;
-esac
-fi
-])#
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb
index 490d230..8eefec3 100644
--- a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo_2.10.bb
@@ -8,7 +8,6 @@
 SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
            file://0001-Use-memcpy-instead-of-reinventing-it.patch \
 	   file://0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch \
-           file://acinclude.m4 \
            file://run-ptest \
            "
 
@@ -19,10 +18,6 @@
 
 EXTRA_OECONF = "--enable-shared"
 
-do_configure_prepend () {
-	cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
 do_install_ptest() {
 	t=${D}${PTEST_PATH}
 	cp ${S}/util/check.sh $t
diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr.inc b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr.inc
deleted file mode 100644
index 7f3f917..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
-HOMEPAGE = "http://www.mpfr.org/"
-LICENSE = "LGPLv3+"
-SECTION = "devel"
-
-inherit autotools texinfo
diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
index 2d59c4a..a78c0bd 100644
--- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
@@ -1,6 +1,10 @@
-require mpfr.inc
+SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
+HOMEPAGE = "http://www.mpfr.org/"
+LICENSE = "LGPLv3+"
+SECTION = "devel"
 
-LICENSE = "GPLv3 & LGPLv3"
+inherit autotools texinfo
+
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
 		    file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
 DEPENDS = "gmp"
@@ -13,6 +17,4 @@
 
 UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
 
-S = "${WORKDIR}/mpfr-${PV}"
-
 BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/neon/neon_0.30.2.bb b/import-layers/yocto-poky/meta/recipes-support/neon/neon_0.30.2.bb
deleted file mode 100644
index 5792c56..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/neon/neon_0.30.2.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "An HTTP and WebDAV client library with a C interface"
-HOMEPAGE = "http://www.webdav.org/neon/"
-SECTION = "libs"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
-                    file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
-
-SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
-           file://pkgconfig.patch \
-          "
-
-SRC_URI[md5sum] = "e28d77bf14032d7f5046b3930704ef41"
-SRC_URI[sha256sum] = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca"
-
-inherit autotools binconfig-disabled lib_package pkgconfig
-
-# Enable gnutls or openssl, not both
-PACKAGECONFIG ?= "expat gnutls libproxy webdav zlib"
-PACKAGECONFIG_class-native = "expat gnutls webdav zlib"
-
-PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
-PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
-PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2"
-PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
-PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF += "--enable-shared"
-
-do_compile_append() {
-	oe_runmake -C test
-}
-
-BINCONFIG = "${bindir}/neon-config"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
deleted file mode 100644
index 23da777..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 46edf01cc98db9f9feec984897836dfdd26bdc8d Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 12 Aug 2015 23:27:27 +0300
-Subject: [PATCH] Add target to only build tests (not run them)
-
-Not sending upstream as this is only a start of a solution to
-installable tests: It's useful for us already as is.
-
-Upstream-Status: Inappropriate [not a complete solution]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Makefile.in           | 3 +++
- testsuite/Makefile.in | 2 ++
- 2 files changed, 5 insertions(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 08efb7d..7909342 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-clean tags:
- 	  echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
- 	$(MAKE) $@-here
- 
-+buildtest:
-+	echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
-+
- check-here:
- 	true
- 
-diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
-index 6bc1907..bb65bf0 100644
---- a/testsuite/Makefile.in
-+++ b/testsuite/Makefile.in
-@@ -116,6 +116,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
- # data.
- VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
- 
-+buildtest: $(TS_ALL)
-+
- # The PATH update is for locating dlls on w*ndows.
- check: $(TS_ALL)
- 	LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
deleted file mode 100644
index e7216ba..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Fri, 9 Dec 2016 15:23:17 +0800
-Subject: [PATCH] nettle: check header files of openssl only if
- 'enable_openssl=yes'.
-
-The original configure script checks openssl header files to generate
-config.h even if 'enable_openssl' is not set to yes, this made inconsistent
-building for nettle.
-
-Upstream-Status: Pending
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
----
- configure.ac | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4ead52c..982760f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -185,9 +185,11 @@ AC_HEADER_TIME
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(size_t)
- 
--AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h openssl/aes.h openssl/ecdsa.h],,
--[enable_openssl=no
-- break])
-+if test "x$enable_openssl" = "xyes"; then
-+  AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h openssl/aes.h openssl/ecdsa.h],,
-+  [enable_openssl=no
-+  break])
-+fi
- 
- AC_CHECK_HEADERS([valgrind/memcheck.h])
- 
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch
new file mode 100644
index 0000000..c007060
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch
@@ -0,0 +1,38 @@
+Add target to only build tests (not run them)
+
+Not sending upstream as this is only a start of a solution to
+installable tests: It's useful for us already as is.
+
+Upstream-Status: Inappropriate [not a complete solution]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Refactored for 3.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/Makefile.in
+===================================================================
+--- nettle-3.4.orig/Makefile.in
++++ nettle-3.4/Makefile.in
+@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-c
+ 	  echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
+ 	$(MAKE) $@-here
+ 
++buildtest:
++	echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
++
+ check-here:
+ 	true
+ 
+Index: nettle-3.4/testsuite/Makefile.in
+===================================================================
+--- nettle-3.4.orig/testsuite/Makefile.in
++++ nettle-3.4/testsuite/Makefile.in
+@@ -131,6 +131,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$
+ # data.
+ VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
+ 
++buildtest: $(TS_ALL)
++
+ # The PATH update is for windows dlls, DYLD_LIBRARY_PATH is for OSX.
+ check: $(TS_ALL)
+ 	LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" DYLD_LIBRARY_PATH=../.lib \
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 0000000..d5f2666
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,36 @@
+From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 9 Dec 2016 15:23:17 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+
+refactored for 3.4. pending not in as of 3.4
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/configure.ac
+===================================================================
+--- nettle-3.4.orig/configure.ac
++++ nettle-3.4/configure.ac
+@@ -185,9 +185,11 @@ AC_HEADER_TIME
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(size_t)
+ 
+-AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++  AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
++  [enable_openssl=no
++   break])
++fi
+ 
+ # For use by the testsuite
+ AC_CHECK_HEADERS([valgrind/memcheck.h])
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch
rename to import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/files/run-ptest b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/run-ptest
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/nettle/files/run-ptest
rename to import-layers/yocto-poky/meta/recipes-support/nettle/nettle-3.4/run-ptest
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle.inc b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle.inc
deleted file mode 100644
index af51fb6..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "A low level cryptographic library"
-HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
-SECTION = "libs"
-
-DEPENDS += "gmp"
-
-SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz \
-           file://Add-target-to-only-build-tests-not-run-them.patch \
-           file://run-ptest \
-           "
-
-UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit autotools ptest
-
-EXTRA_OECONF = "--disable-openssl"
-
-do_configure_prepend() {
-       if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then
-               cp ${S}/aclocal.m4 ${S}/acinclude.m4
-       fi
-}
-
-do_compile_ptest() {
-        oe_runmake buildtest
-}
-
-do_install_ptest() {
-        install -d ${D}${PTEST_PATH}/testsuite/
-        install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
-        install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
-        # tools can be found in PATH, not in ../tools/
-        sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
-        install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.3.bb b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.3.bb
deleted file mode 100644
index 3951678..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require nettle.inc
-
-LICENSE = "LGPLv3+ | GPLv2+"
-
-LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
-                    file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
-                    file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
-
-SRC_URI += "\
-            file://check-header-files-of-openssl-only-if-enable_.patch \
-            "
-
-SRC_URI_append_class-target = "\
-            file://dlopen-test.patch \
-            "
-
-SRC_URI[md5sum] = "10f969f78a463704ae73529978148dbe"
-SRC_URI[sha256sum] = "46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.4.bb b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.4.bb
new file mode 100644
index 0000000..7a3cc65
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_3.4.bb
@@ -0,0 +1,47 @@
+SUMMARY = "A low level cryptographic library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
+SECTION = "libs"
+LICENSE = "LGPLv3+ | GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+                    file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
+                    file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
+
+DEPENDS += "gmp"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+           file://Add-target-to-only-build-tests-not-run-them.patch \
+           file://run-ptest \
+           file://check-header-files-of-openssl-only-if-enable_.patch \
+           "
+
+SRC_URI_append_class-target = "\
+            file://dlopen-test.patch \
+            "
+
+SRC_URI[md5sum] = "dc0f13028264992f58e67b4e8915f53d"
+SRC_URI[sha256sum] = "ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94"
+
+UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools ptest
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+EXTRA_OECONF = "--disable-openssl"
+
+do_compile_ptest() {
+        oe_runmake buildtest
+}
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/testsuite/
+        install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
+        install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+        # tools can be found in PATH, not in ../tools/
+        sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
+        install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb
index 54de70c..e7db6ae 100644
--- a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.5.bb
@@ -19,3 +19,5 @@
 
 FILES_${PN} = "${libdir}/libnpth.so.*"
 FILES_${PN}-dev += "${bindir}/npth-config"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch
deleted file mode 100644
index b3bdd8e..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f7551ec58e2f0a892295e0c2a650083101e12c54 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 20 May 2017 13:24:26 -0700
-Subject: [PATCH] include stdint.h for SSIZE_MAX and SIZE_MAX definitions
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- pr/tests/prfz.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/pr/tests/prfz.c b/pr/tests/prfz.c
-index 0c5a432..9c17590 100644
---- a/pr/tests/prfz.c
-+++ b/pr/tests/prfz.c
-@@ -10,7 +10,9 @@
- #include <sys/types.h>
- #include <limits.h>
- #include <string.h>
--
-+#ifdef XP_UNIX
-+#include <stdint.h>
-+#endif
- int
- main(int argc, char **argv)
- {
--- 
-2.13.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
index c2b7258..f12acc8 100644
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
@@ -49,4 +49,4 @@
 -            PR_MD_ASFILES=os_Linux_ppc.s
          fi
          ;;
-     m68k)
+     esac    
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
index a7e7853..ecc6d31 100644
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
@@ -11,12 +11,12 @@
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
 Upstream-Status: Pending
 
-Index: nspr-4.8.9/mozilla/nsprpub/pr/tests/Makefile.in
+Index: nspr/pr/tests/Makefile.in
 ===================================================================
---- nsprpub.orig/pr/tests/Makefile.in	2012-02-11 00:01:10.476220505 +0200
-+++ nsprpub/pr/tests/Makefile.in	2012-02-10 23:57:40.000000000 +0200
-@@ -379,7 +379,7 @@
- endif
+--- nspr.orig/pr/tests/Makefile.in
++++ nspr/pr/tests/Makefile.in
+@@ -315,7 +315,7 @@ ifeq ($(OS_ARCH), SunOS)
+ endif # SunOS
  
  ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
 -    LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.16.bb b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.16.bb
deleted file mode 100644
index 78ef994..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.16.bb
+++ /dev/null
@@ -1,191 +0,0 @@
-SUMMARY = "Netscape Portable Runtime Library"
-HOMEPAGE =  "http://www.mozilla.org/projects/nspr/"
-LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
-LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
-                    file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
-SECTION = "libs/network"
-
-SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
-           file://remove-rpath-from-tests.patch \
-           file://fix-build-on-x86_64.patch \
-           file://remove-srcdir-from-configure-in.patch \
-           file://0002-Add-nios2-support.patch \
-           file://0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch \
-           file://0001-md-Fix-build-with-musl.patch \
-           file://nspr.pc.in \
-"
-
-CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
-                                          -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
-                                          -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
-                                          -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
-
-UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
-UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
-
-SRC_URI[md5sum] = "42fd8963a4b394f62d43ba604f03fab7"
-SRC_URI[sha256sum] = "9b3102d97665504aeee73363c11a21c062ad67a2522242368b7f019f96a53cd1"
-
-CVE_PRODUCT = "netscape_portable_runtime"
-
-S = "${WORKDIR}/nspr-${PV}/nspr"
-
-RDEPENDS_${PN}-dev += "perl"
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-TESTS = " \
-    accept \
-    acceptread \
-    acceptreademu \
-    affinity \
-    alarm \
-    anonfm \
-    atomic \
-    attach \
-    bigfile \
-    cleanup \
-    cltsrv  \
-    concur \
-    cvar \
-    cvar2 \
-    dlltest \
-    dtoa \
-    errcodes \
-    exit \
-    fdcach \
-    fileio \
-    foreign \
-    formattm \
-    fsync \
-    gethost \
-    getproto \
-    i2l \
-    initclk \
-    inrval \
-    instrumt \
-    intrio \
-    intrupt \
-    io_timeout \
-    ioconthr \
-    join \
-    joinkk \
-    joinku \
-    joinuk \
-    joinuu \
-    layer \
-    lazyinit \
-    libfilename \
-    lltest \
-    lock \
-    lockfile \
-    logfile \
-    logger \
-    many_cv \
-    multiwait \
-    nameshm1 \
-    nblayer \
-    nonblock \
-    ntioto \
-    ntoh \
-    op_2long \
-    op_excl \
-    op_filnf \
-    op_filok \
-    op_nofil \
-    parent \
-    parsetm \
-    peek \
-    perf \
-    pipeping \
-    pipeping2 \
-    pipeself \
-    poll_nm \
-    poll_to \
-    pollable \
-    prftest \
-    primblok \
-    provider \
-    prpollml \
-    ranfile \
-    randseed \
-    reinit \
-    rwlocktest \
-    sel_spd \
-    selct_er \
-    selct_nm \
-    selct_to \
-    selintr \
-    sema \
-    semaerr \
-    semaping \
-    sendzlf \
-    server_test \
-    servr_kk \
-    servr_uk \
-    servr_ku \
-    servr_uu \
-    short_thread \
-    sigpipe \
-    socket \
-    sockopt \
-    sockping \
-    sprintf \
-    stack \
-    stdio \
-    str2addr \
-    strod \
-    switch \
-    system \
-    testbit \
-    testfile \
-    threads \
-    timemac \
-    timetest \
-    tpd \
-    udpsrv \
-    vercheck \
-    version \
-    writev \
-    xnotify \
-    zerolen"
-
-inherit autotools
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-do_compile_prepend() {
-	oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
-}
-
-do_compile_append() {
-	oe_runmake -C pr/tests
-}
-
-do_install_append() {
-    install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i  \
-    -e 's:NSPRVERSION:${PV}:g' \
-    -e 's:OEPREFIX:${prefix}:g' \
-    -e 's:OELIBDIR:${libdir}:g' \
-    -e 's:OEINCDIR:${includedir}:g' \
-    -e 's:OEEXECPREFIX:${exec_prefix}:g' \
-    ${D}${libdir}/pkgconfig/nspr.pc
-
-    mkdir -p ${D}${libdir}/nspr/tests
-    install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
-    install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
-    cd ${B}/pr/tests
-    install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
-
-    # delete compile-et.pl and perr.properties from ${bindir} because these are
-    # only used to generate prerr.c and prerr.h files from prerr.et at compile
-    # time
-    rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
-}
-
-FILES_${PN} = "${libdir}/lib*.so"
-FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
-                ${includedir}/* ${datadir}/aclocal/* "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.19.bb b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.19.bb
new file mode 100644
index 0000000..de2c871
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.19.bb
@@ -0,0 +1,190 @@
+SUMMARY = "Netscape Portable Runtime Library"
+HOMEPAGE =  "http://www.mozilla.org/projects/nspr/"
+LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
+LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
+                    file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
+SECTION = "libs/network"
+
+SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
+           file://remove-rpath-from-tests.patch \
+           file://fix-build-on-x86_64.patch \
+           file://remove-srcdir-from-configure-in.patch \
+           file://0002-Add-nios2-support.patch \
+           file://0001-md-Fix-build-with-musl.patch \
+           file://nspr.pc.in \
+"
+
+CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
+                                          -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
+                                          -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
+                                          -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
+
+UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
+
+SRC_URI[md5sum] = "e1d27282ad6286b69d6b9fd07201d3dd"
+SRC_URI[sha256sum] = "2ed95917fa2277910d1d1cf36030607dccc0ba522bba08e2af13c113dcd8f729"
+
+CVE_PRODUCT = "netscape_portable_runtime"
+
+S = "${WORKDIR}/nspr-${PV}/nspr"
+
+RDEPENDS_${PN}-dev += "perl"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+TESTS = " \
+    accept \
+    acceptread \
+    acceptreademu \
+    affinity \
+    alarm \
+    anonfm \
+    atomic \
+    attach \
+    bigfile \
+    cleanup \
+    cltsrv  \
+    concur \
+    cvar \
+    cvar2 \
+    dlltest \
+    dtoa \
+    errcodes \
+    exit \
+    fdcach \
+    fileio \
+    foreign \
+    formattm \
+    fsync \
+    gethost \
+    getproto \
+    i2l \
+    initclk \
+    inrval \
+    instrumt \
+    intrio \
+    intrupt \
+    io_timeout \
+    ioconthr \
+    join \
+    joinkk \
+    joinku \
+    joinuk \
+    joinuu \
+    layer \
+    lazyinit \
+    libfilename \
+    lltest \
+    lock \
+    lockfile \
+    logfile \
+    logger \
+    many_cv \
+    multiwait \
+    nameshm1 \
+    nblayer \
+    nonblock \
+    ntioto \
+    ntoh \
+    op_2long \
+    op_excl \
+    op_filnf \
+    op_filok \
+    op_nofil \
+    parent \
+    parsetm \
+    peek \
+    perf \
+    pipeping \
+    pipeping2 \
+    pipeself \
+    poll_nm \
+    poll_to \
+    pollable \
+    prftest \
+    primblok \
+    provider \
+    prpollml \
+    ranfile \
+    randseed \
+    reinit \
+    rwlocktest \
+    sel_spd \
+    selct_er \
+    selct_nm \
+    selct_to \
+    selintr \
+    sema \
+    semaerr \
+    semaping \
+    sendzlf \
+    server_test \
+    servr_kk \
+    servr_uk \
+    servr_ku \
+    servr_uu \
+    short_thread \
+    sigpipe \
+    socket \
+    sockopt \
+    sockping \
+    sprintf \
+    stack \
+    stdio \
+    str2addr \
+    strod \
+    switch \
+    system \
+    testbit \
+    testfile \
+    threads \
+    timemac \
+    timetest \
+    tpd \
+    udpsrv \
+    vercheck \
+    version \
+    writev \
+    xnotify \
+    zerolen"
+
+inherit autotools
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_compile_prepend() {
+	oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
+}
+
+do_compile_append() {
+	oe_runmake -C pr/tests
+}
+
+do_install_append() {
+    install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
+    sed -i  \
+    -e 's:NSPRVERSION:${PV}:g' \
+    -e 's:OEPREFIX:${prefix}:g' \
+    -e 's:OELIBDIR:${libdir}:g' \
+    -e 's:OEINCDIR:${includedir}:g' \
+    -e 's:OEEXECPREFIX:${exec_prefix}:g' \
+    ${D}${libdir}/pkgconfig/nspr.pc
+
+    mkdir -p ${D}${libdir}/nspr/tests
+    install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
+    install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
+    cd ${B}/pr/tests
+    install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
+
+    # delete compile-et.pl and perr.properties from ${bindir} because these are
+    # only used to generate prerr.c and prerr.h files from prerr.et at compile
+    # time
+    rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
+}
+
+FILES_${PN} = "${libdir}/lib*.so"
+FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
+                ${includedir}/* ${datadir}/aclocal/* "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch
new file mode 100644
index 0000000..bc10f33
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch
@@ -0,0 +1,119 @@
+From 6f7d7be9997ba6727a5ad7c3800df9051160dc12 Mon Sep 17 00:00:00 2001
+From: Martin Thomson <martin.thomson@gmail.com>
+Date: Tue, 13 Feb 2018 12:30:58 +1100
+Subject: [PATCH] Bug 1437734 - Use snprintf in sign.c, r=ttaubert
+
+--HG--
+extra : rebase_source : 97921ece71ff86b18d32b891591608290eed4d83
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/0a9078b3cde97add7c825c9d13467a8401ad0c88#diff-b42512151dc137537091f823f7701804.patch]
+
+ nss/cmd/signtool/sign.c | 58 ++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 48 insertions(+), 10 deletions(-)
+
+diff --git a/nss/cmd/signtool/sign.c b/nss/cmd/signtool/sign.c
+index 6e776069a..6f8e43946 100644
+--- a/nss/cmd/signtool/sign.c
++++ b/nss/cmd/signtool/sign.c
+@@ -43,6 +43,7 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+     int status;
+     char tempfn[FNSIZE], fullfn[FNSIZE];
+     int keyType = rsaKey;
++    int count;
+ 
+     metafile = meta_file;
+     optimize = _optimize;
+@@ -81,9 +82,18 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+         }
+ 
+         /* rsa/dsa to zip */
+-        sprintf(tempfn, "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa"
+-                                                                   : "rsa"));
+-        sprintf(fullfn, "%s/%s", tree, tempfn);
++        count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa" : "rsa"));
++        if (count >= sizeof(tempfn)) {
++            PR_fprintf(errorFD, "unable to write key metadata\n");
++            errorCount++;
++            exit(ERRX);
++        }
++        count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++        if (count >= sizeof(fullfn)) {
++            PR_fprintf(errorFD, "unable to write key metadata\n");
++            errorCount++;
++            exit(ERRX);
++        }
+         JzipAdd(fullfn, tempfn, zipfile, compression_level);
+ 
+         /* Loop through all files & subdirectories, add to archive */
+@@ -93,20 +103,44 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+     }
+     /* mf to zip */
+     strcpy(tempfn, "META-INF/manifest.mf");
+-    sprintf(fullfn, "%s/%s", tree, tempfn);
++    count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++    if (count >= sizeof(fullfn)) {
++        PR_fprintf(errorFD, "unable to write manifest\n");
++        errorCount++;
++        exit(ERRX);
++    }
+     JzipAdd(fullfn, tempfn, zipfile, compression_level);
+ 
+     /* sf to zip */
+-    sprintf(tempfn, "META-INF/%s.sf", base);
+-    sprintf(fullfn, "%s/%s", tree, tempfn);
++    count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.sf", base);
++    if (count >= sizeof(tempfn)) {
++        PR_fprintf(errorFD, "unable to write sf metadata\n");
++        errorCount++;
++        exit(ERRX);
++    }
++    count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++    if (count >= sizeof(fullfn)) {
++        PR_fprintf(errorFD, "unable to write sf metadata\n");
++        errorCount++;
++        exit(ERRX);
++    }
+     JzipAdd(fullfn, tempfn, zipfile, compression_level);
+ 
+     /* Add the rsa/dsa file to the zip archive normally */
+     if (!xpi_arc) {
+         /* rsa/dsa to zip */
+-        sprintf(tempfn, "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa"
+-                                                                   : "rsa"));
+-        sprintf(fullfn, "%s/%s", tree, tempfn);
++        count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa" : "rsa"));
++        if (count >= sizeof(tempfn)) {
++            PR_fprintf(errorFD, "unable to write key metadata\n");
++            errorCount++;
++            exit(ERRX);
++        }
++        count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++        if (count >= sizeof(fullfn)) {
++            PR_fprintf(errorFD, "unable to write key metadata\n");
++            errorCount++;
++            exit(ERRX);
++        }
+         JzipAdd(fullfn, tempfn, zipfile, compression_level);
+     }
+ 
+@@ -408,6 +442,7 @@ static int
+ manifesto_xpi_fn(char *relpath, char *basedir, char *reldir, char *filename, void *arg)
+ {
+     char fullname[FNSIZE];
++    int count;
+ 
+     if (verbosity >= 0) {
+         PR_fprintf(outputFD, "--> %s\n", relpath);
+@@ -421,7 +456,10 @@ manifesto_xpi_fn(char *relpath, char *basedir, char *reldir, char *filename, voi
+         if (!PL_HashTableLookup(extensions, ext))
+             return 0;
+     }
+-    sprintf(fullname, "%s/%s", basedir, relpath);
++    count = snprintf(fullname, sizeof(fullname), "%s/%s", basedir, relpath);
++    if (count >= sizeof(fullname)) {
++        return 1;
++    }
+     JzipAdd(fullname, relpath, zipfile, compression_level);
+ 
+     return 0;
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch
new file mode 100644
index 0000000..8276f89
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Daiki Ueno <dueno@redhat.com>
+# Date 1516710574 -3600
+#      Tue Jan 23 13:29:34 2018 +0100
+# Node ID 27f27ce21c2c6ff5a47fa9e17c438b000366c9c9
+# Parent  be1dca5ac80541d3b81a8da9d42854d8b1cceefb
+Build Hacl_Poly1305_64.o on aarch64 even with make
+
+Upstream-Status: Backport
+https://bug1432455.bmoattachments.org/attachment.cgi?id=8944691
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nss-3.35/nss/lib/freebl/Makefile
+===================================================================
+--- nss-3.35.orig/nss/lib/freebl/Makefile
++++ nss-3.35/nss/lib/freebl/Makefile
+@@ -533,7 +533,12 @@ ifndef NSS_DISABLE_CHACHAPOLY
+             EXTRA_SRCS += chacha20_vec.c
+         endif
+     else
+-        EXTRA_SRCS += poly1305.c
++        ifeq ($(CPU_ARCH),aarch64)
++            EXTRA_SRCS += Hacl_Poly1305_64.c
++        else
++            EXTRA_SRCS += poly1305.c
++        endif
++
+         EXTRA_SRCS += chacha20.c
+         VERIFIED_SRCS += Hacl_Chacha20.c
+     endif # x86_64
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.31.1.bb b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.31.1.bb
deleted file mode 100644
index 2bb9bdb..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.31.1.bb
+++ /dev/null
@@ -1,253 +0,0 @@
-SUMMARY = "Mozilla's SSL and TLS implementation"
-DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
-designed to support cross-platform development of \
-security-enabled client and server applications. \
-Applications built with NSS can support SSL v2 and v3, \
-TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
-v3 certificates, and other security standards."
-HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
-SECTION = "libs"
-
-LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
-
-LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
-                    file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
-                    file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
-
-VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}"
-
-SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \
-           file://nss.pc.in \
-           file://signlibs.sh \
-           file://0001-nss-fix-support-cross-compiling.patch \
-           file://nss-no-rpath-for-cross-compiling.patch \
-           file://nss-fix-incorrect-shebang-of-perl.patch \
-           file://nss-fix-nsinstall-build.patch \
-           file://disable-Wvarargs-with-clang.patch \
-           file://pqg.c-ULL_addend.patch \
-           file://Fix-compilation-for-X32.patch \
-           "
-
-SRC_URI[md5sum] = "ebb44f1394250d2cf6ec3c2e3d71fa20"
-SRC_URI[sha256sum] = "933439214dc03ee60e86d1419c19e1568998b0776dde987f41fa70ced6cd08dc"
-
-UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
-UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
-
-inherit siteinfo
-
-DEPENDS = "sqlite3 nspr zlib nss-native"
-DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
-RDEPENDS_${PN}-smime = "perl"
-
-TD = "${S}/tentative-dist"
-TDS = "${S}/tentative-dist-staging"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_configure_prepend_libc-musl () {
-    sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
-}
-
-do_compile_prepend_class-native() {
-    export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
-    export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
-    export NSS_ENABLE_WERROR=0
-}
-
-do_compile_prepend_class-nativesdk() {
-    export LDFLAGS=""
-}
-
-do_compile_prepend_class-native() {
-    # Need to set RPATH so that chrpath will do its job correctly
-    RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
-}
-
-do_compile() {
-    export CROSS_COMPILE=1
-    export NATIVE_CC="${BUILD_CC}"
-    export NATIVE_FLAGS="${BUILD_CFLAGS}"
-    export BUILD_OPT=1
-
-    export FREEBL_NO_DEPEND=1
-    export FREEBL_LOWHASH=1
-
-    export LIBDIR=${libdir}
-    export MOZILLA_CLIENT=1
-    export NS_USE_GCC=1
-    export NSS_USE_SYSTEM_SQLITE=1
-    export NSS_ENABLE_ECC=1
-
-    export OS_RELEASE=3.4
-    export OS_TARGET=Linux
-    export OS_ARCH=Linux
-
-    if [ "${TARGET_ARCH}" = "powerpc" ]; then
-        OS_TEST=ppc
-    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
-        OS_TEST=ppc64
-    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
-        OS_TEST=mips
-    else
-        OS_TEST="${TARGET_ARCH}"
-    fi
-
-    if [ "${SITEINFO_BITS}" = "64" ]; then
-        export USE_64=1
-    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
-        export USE_X32=1
-    fi
-
-    export NSS_DISABLE_GTESTS=1
-
-    # We can modify CC in the environment, but if we set it via an
-    # argument to make, nsinstall, a host program, will also build with it!
-    #
-    # nss pretty much does its own thing with CFLAGS, so we put them into CC.
-    # Optimization will get clobbered, but most of the stuff will survive.
-    # The motivation for this is to point to the correct place for debug
-    # source files and CFLAGS does that.  Nothing uses CCC.
-    #
-    export CC="${CC} ${CFLAGS}"
-    make -C ./nss CCC="${CXX} -g" \
-        OS_TEST=${OS_TEST} \
-        RPATH="${RPATH}"
-}
-do_compile[vardepsexclude] += "SITEINFO_BITS"
-
-
-do_install_prepend_class-nativesdk() {
-    export LDFLAGS=""
-}
-
-do_install() {
-    export CROSS_COMPILE=1
-    export NATIVE_CC="${BUILD_CC}"
-    export BUILD_OPT=1
-
-    export FREEBL_NO_DEPEND=1
-
-    export LIBDIR=${libdir}
-    export MOZILLA_CLIENT=1
-    export NS_USE_GCC=1
-    export NSS_USE_SYSTEM_SQLITE=1
-    export NSS_ENABLE_ECC=1
-
-    export OS_RELEASE=3.4
-    export OS_TARGET=Linux
-    export OS_ARCH=Linux
-
-    if [ "${TARGET_ARCH}" = "powerpc" ]; then
-        OS_TEST=ppc
-    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
-        OS_TEST=ppc64
-    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
-        OS_TEST=mips
-    else
-        OS_TEST="${TARGET_ARCH}"
-    fi
-    if [ "${SITEINFO_BITS}" = "64" ]; then
-        export USE_64=1
-    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
-        export USE_X32=1
-    fi
-
-    export NSS_DISABLE_GTESTS=1
-
-    make -C ./nss \
-        CCC="${CXX}" \
-        OS_TEST=${OS_TEST} \
-        SOURCE_LIB_DIR="${TD}/${libdir}" \
-        SOURCE_BIN_DIR="${TD}/${bindir}" \
-        install
-
-    install -d ${D}/${libdir}/
-    for file in ${S}/dist/*.OBJ/lib/*.so; do
-        echo "Installing `basename $file`..."
-        cp $file  ${D}/${libdir}/
-    done
-
-    for shared_lib in ${TD}/${libdir}/*.so.*; do
-        if [ -f $shared_lib ]; then
-            cp $shared_lib ${D}/${libdir}
-            ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
-        fi
-    done
-    for shared_lib in ${TD}/${libdir}/*.so; do
-        if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
-            cp $shared_lib ${D}/${libdir}
-        fi
-    done
-
-    install -d ${D}/${includedir}/nss3
-    install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
-
-    install -d ${D}/${bindir}
-    for binary in ${TD}/${bindir}/*; do
-        install -m 755 -t ${D}/${bindir} $binary
-    done
-}
-do_install[vardepsexclude] += "SITEINFO_BITS"
-
-do_install_append() {
-    # Create empty .chk files for the NSS libraries at build time. They could
-    # be regenerated at target's boot time.
-    for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
-        touch ${D}/${libdir}/$file
-        chmod 755 ${D}/${libdir}/$file
-    done
-    install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
-
-    install -d ${D}${libdir}/pkgconfig/
-    sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
-}
-
-do_install_append_class-target() {
-    # Create a blank certificate
-    mkdir -p ${D}${sysconfdir}/pki/nssdb/
-    touch ./empty_password
-    certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
-    chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
-    rm ./empty_password
-}
-
-PACKAGE_WRITE_DEPS += "nss-native"
-pkg_postinst_${PN} () {
-    if [ -n "$D" ]; then
-        for I in $D${libdir}/lib*.chk; do
-            DN=`dirname $I`
-            BN=`basename $I .chk`
-            FN=$DN/$BN.so
-            shlibsign -i $FN
-            if [ $? -ne 0 ]; then
-                exit 1
-            fi
-        done
-    else
-        signlibs.sh
-    fi
-}
-
-PACKAGES =+ "${PN}-smime"
-FILES_${PN}-smime = "\
-    ${bindir}/smime \
-"
-FILES_${PN} = "\
-    ${sysconfdir} \
-    ${bindir} \
-    ${libdir}/lib*.chk \
-    ${libdir}/lib*.so \
-    "
-FILES_${PN}-dev = "\
-    ${libdir}/nss \
-    ${libdir}/pkgconfig/* \
-    ${includedir}/* \
-    "
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.35.bb b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.35.bb
new file mode 100644
index 0000000..84f1916
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.35.bb
@@ -0,0 +1,255 @@
+SUMMARY = "Mozilla's SSL and TLS implementation"
+DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
+designed to support cross-platform development of \
+security-enabled client and server applications. \
+Applications built with NSS can support SSL v2 and v3, \
+TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
+v3 certificates, and other security standards."
+HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
+SECTION = "libs"
+
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
+
+LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
+                    file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
+                    file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
+
+VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}"
+
+SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \
+           file://nss.pc.in \
+           file://signlibs.sh \
+           file://0001-nss-fix-support-cross-compiling.patch \
+           file://nss-no-rpath-for-cross-compiling.patch \
+           file://nss-fix-incorrect-shebang-of-perl.patch \
+           file://nss-fix-nsinstall-build.patch \
+           file://disable-Wvarargs-with-clang.patch \
+           file://pqg.c-ULL_addend.patch \
+           file://Fix-compilation-for-X32.patch \
+           file://nss-build-hacl-poly1305-aarch64.patch \
+           file://0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch \
+           "
+
+SRC_URI[md5sum] = "9467ec9e65c5aeb3254a50250490f5f7"
+SRC_URI[sha256sum] = "f4127de09bede39f5fd0f789d33c3504c5d261e69ea03022d46b319b3e32f6fa"
+
+UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
+UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
+
+inherit siteinfo
+
+DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
+RDEPENDS_${PN}-smime = "perl"
+
+TD = "${S}/tentative-dist"
+TDS = "${S}/tentative-dist-staging"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_configure_prepend_libc-musl () {
+    sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
+}
+
+do_compile_prepend_class-native() {
+    export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+    export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
+    export NSS_ENABLE_WERROR=0
+}
+
+do_compile_prepend_class-nativesdk() {
+    export LDFLAGS=""
+}
+
+do_compile_prepend_class-native() {
+    # Need to set RPATH so that chrpath will do its job correctly
+    RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
+}
+
+do_compile() {
+    export CROSS_COMPILE=1
+    export NATIVE_CC="${BUILD_CC}"
+    export NATIVE_FLAGS="${BUILD_CFLAGS}"
+    export BUILD_OPT=1
+
+    export FREEBL_NO_DEPEND=1
+    export FREEBL_LOWHASH=1
+
+    export LIBDIR=${libdir}
+    export MOZILLA_CLIENT=1
+    export NS_USE_GCC=1
+    export NSS_USE_SYSTEM_SQLITE=1
+    export NSS_ENABLE_ECC=1
+
+    export OS_RELEASE=3.4
+    export OS_TARGET=Linux
+    export OS_ARCH=Linux
+
+    if [ "${TARGET_ARCH}" = "powerpc" ]; then
+        OS_TEST=ppc
+    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+        OS_TEST=ppc64
+    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+        OS_TEST=mips
+    else
+        OS_TEST="${TARGET_ARCH}"
+    fi
+
+    if [ "${SITEINFO_BITS}" = "64" ]; then
+        export USE_64=1
+    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+        export USE_X32=1
+    fi
+
+    export NSS_DISABLE_GTESTS=1
+
+    # We can modify CC in the environment, but if we set it via an
+    # argument to make, nsinstall, a host program, will also build with it!
+    #
+    # nss pretty much does its own thing with CFLAGS, so we put them into CC.
+    # Optimization will get clobbered, but most of the stuff will survive.
+    # The motivation for this is to point to the correct place for debug
+    # source files and CFLAGS does that.  Nothing uses CCC.
+    #
+    export CC="${CC} ${CFLAGS}"
+    make -C ./nss CCC="${CXX} -g" \
+        OS_TEST=${OS_TEST} \
+        RPATH="${RPATH}"
+}
+do_compile[vardepsexclude] += "SITEINFO_BITS"
+
+
+do_install_prepend_class-nativesdk() {
+    export LDFLAGS=""
+}
+
+do_install() {
+    export CROSS_COMPILE=1
+    export NATIVE_CC="${BUILD_CC}"
+    export BUILD_OPT=1
+
+    export FREEBL_NO_DEPEND=1
+
+    export LIBDIR=${libdir}
+    export MOZILLA_CLIENT=1
+    export NS_USE_GCC=1
+    export NSS_USE_SYSTEM_SQLITE=1
+    export NSS_ENABLE_ECC=1
+
+    export OS_RELEASE=3.4
+    export OS_TARGET=Linux
+    export OS_ARCH=Linux
+
+    if [ "${TARGET_ARCH}" = "powerpc" ]; then
+        OS_TEST=ppc
+    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+        OS_TEST=ppc64
+    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+        OS_TEST=mips
+    else
+        OS_TEST="${TARGET_ARCH}"
+    fi
+    if [ "${SITEINFO_BITS}" = "64" ]; then
+        export USE_64=1
+    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+        export USE_X32=1
+    fi
+
+    export NSS_DISABLE_GTESTS=1
+
+    make -C ./nss \
+        CCC="${CXX}" \
+        OS_TEST=${OS_TEST} \
+        SOURCE_LIB_DIR="${TD}/${libdir}" \
+        SOURCE_BIN_DIR="${TD}/${bindir}" \
+        install
+
+    install -d ${D}/${libdir}/
+    for file in ${S}/dist/*.OBJ/lib/*.so; do
+        echo "Installing `basename $file`..."
+        cp $file  ${D}/${libdir}/
+    done
+
+    for shared_lib in ${TD}/${libdir}/*.so.*; do
+        if [ -f $shared_lib ]; then
+            cp $shared_lib ${D}/${libdir}
+            ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
+        fi
+    done
+    for shared_lib in ${TD}/${libdir}/*.so; do
+        if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
+            cp $shared_lib ${D}/${libdir}
+        fi
+    done
+
+    install -d ${D}/${includedir}/nss3
+    install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
+
+    install -d ${D}/${bindir}
+    for binary in ${TD}/${bindir}/*; do
+        install -m 755 -t ${D}/${bindir} $binary
+    done
+}
+do_install[vardepsexclude] += "SITEINFO_BITS"
+
+do_install_append() {
+    # Create empty .chk files for the NSS libraries at build time. They could
+    # be regenerated at target's boot time.
+    for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
+        touch ${D}/${libdir}/$file
+        chmod 755 ${D}/${libdir}/$file
+    done
+    install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
+
+    install -d ${D}${libdir}/pkgconfig/
+    sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
+}
+
+do_install_append_class-target() {
+    # Create a blank certificate
+    mkdir -p ${D}${sysconfdir}/pki/nssdb/
+    touch ./empty_password
+    certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+    chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
+    rm ./empty_password
+}
+
+PACKAGE_WRITE_DEPS += "nss-native"
+pkg_postinst_${PN} () {
+    if [ -n "$D" ]; then
+        for I in $D${libdir}/lib*.chk; do
+            DN=`dirname $I`
+            BN=`basename $I .chk`
+            FN=$DN/$BN.so
+            shlibsign -i $FN
+            if [ $? -ne 0 ]; then
+                exit 1
+            fi
+        done
+    else
+        signlibs.sh
+    fi
+}
+
+PACKAGES =+ "${PN}-smime"
+FILES_${PN}-smime = "\
+    ${bindir}/smime \
+"
+FILES_${PN} = "\
+    ${sysconfdir} \
+    ${bindir} \
+    ${libdir}/lib*.chk \
+    ${libdir}/lib*.so \
+    "
+FILES_${PN}-dev = "\
+    ${libdir}/nss \
+    ${libdir}/pkgconfig/* \
+    ${includedir}/* \
+    "
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/gpg-error_pkconf.patch b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/gpg-error_pkconf.patch
rename to import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/libassuan_pkgconf.patch b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.0.0/libassuan_pkgconf.patch
rename to import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.0.0.bb b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.0.0.bb
deleted file mode 100644
index 319acd3..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.0.0.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
-DESCRIPTION = "\
-	Pinentry is a collection of simple PIN or passphrase entry dialogs which \
-	utilize the Assuan protocol as described by the aegypten project; see \
-	http://www.gnupg.org/aegypten/ for details."
-
-HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
-
-inherit autotools pkgconfig
-
-DEPENDS = "gettext-native libassuan libgpg-error"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://libassuan_pkgconf.patch \
-           file://gpg-error_pkconf.patch \
-"
-
-SRC_URI[md5sum] = "4a3fad8b31f9b4c5526c8837495015dc"
-SRC_URI[sha256sum] = "1672c2edc1feb036075b187c0773787b2afd0544f55025c645a71b4c2f79275a"
-
-EXTRA_OECONF = "--disable-rpath --disable-dependency-tracking \
-                --disable-pinentry-qt5  \
-"
-
-PACKAGECONFIG ??= "ncurses libcap"
-
-PACKAGECONFIG[ncurses] = "--enable-ncurses  --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
-PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
-PACKAGECONFIG[qt] = "--enable-pinentry-qt, --disable-pinentry-qt, qt4-x11"
-PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
-
-#To use libsecret, add meta-gnome
-PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb
new file mode 100644
index 0000000..1eaa261
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
+DESCRIPTION = "\
+	Pinentry is a collection of simple PIN or passphrase entry dialogs which \
+	utilize the Assuan protocol as described by the aegypten project; see \
+	http://www.gnupg.org/aegypten/ for details."
+
+HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
+
+inherit autotools pkgconfig
+
+DEPENDS = "gettext-native libassuan libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+           file://libassuan_pkgconf.patch \
+           file://gpg-error_pkconf.patch \
+"
+
+SRC_URI[md5sum] = "3829315cb0a1e9cedc05ffe6def7a2c6"
+SRC_URI[sha256sum] = "68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570"
+
+EXTRA_OECONF = "--disable-rpath --disable-dependency-tracking \
+                --disable-pinentry-qt5  \
+"
+
+PACKAGECONFIG ??= "ncurses libcap"
+
+PACKAGECONFIG[ncurses] = "--enable-ncurses  --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
+PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
+PACKAGECONFIG[qt] = "--enable-pinentry-qt, --disable-pinentry-qt, qt4-x11"
+PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
+
+#To use libsecret, add meta-gnome
+PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb
new file mode 100644
index 0000000..e5b71c0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A C program to run all installed ptests"
+DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
+program which loops through all installed ptest test suites and \
+runs them in sequence."
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SRCREV = "16413d71cc06b02a6d859c35a017cc49b88283f7"
+PV = "2.1.1+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
+S = "${WORKDIR}/git"
+
+FILES_${PN} = "${bindir}/ptest-runner"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_compile () {
+	oe_runmake
+}
+
+do_install () {
+	install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.bb b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.bb
deleted file mode 100644
index 71c1dab..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "A C program to run all installed ptests"
-DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
-program which loops through all installed ptest test suites and \
-runs them in sequence."
-HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SRCREV = "8a93832dad621535e90aa8e1fb74ae5ba743fc3e"
-PV = "2.1+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
-S = "${WORKDIR}/git"
-
-FILES_${PN} = "${bindir}/ptest-runner"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_compile () {
-	oe_runmake
-}
-
-do_install () {
-	install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch
new file mode 100644
index 0000000..8aa13bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch
@@ -0,0 +1,98 @@
+rng-tools: modify 'read error' message
+
+Make the 'read error' message more descriptive.
+
+Copied from https://bugzilla.redhat.com/attachment.cgi?id=1295857
+and modified in one place to apply successfully.  Error message during
+bootstrap modified to show device name.
+
+Upstream-Status: pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/rngd.c
++++ b/rngd.c
+@@ -247,8 +247,11 @@ static void do_loop(int random_step)
+ 				continue;	/* failed, no work */
+ 
+ 			retval = iter->xread(buf, sizeof buf, iter);
+-			if (retval)
++			if (retval) {
++				message(LOG_DAEMON|LOG_ERR,
++					"Error reading from entropy source\n");
+ 				continue;	/* failed, no work */
++			}
+ 
+ 			work_done = true;
+ 
+--- a/rngd_entsource.c
++++ b/rngd_entsource.c
+@@ -63,10 +63,8 @@ int xread(void *buf, size_t size, struct
+ 		size -= r;
+ 	}
+ 
+-	if (size) {
+-		message(LOG_DAEMON|LOG_ERR, "read error\n");
++	if (size)
+ 		return -1;
+-	}
+ 	return 0;
+ }
+ 
+@@ -152,7 +150,7 @@ error_out:
+ }
+ 
+ /* Initialize entropy source */
+-static int discard_initial_data(struct rng *ent_src)
++static int discard_initial_data(struct rng *ent_src, int *buf)
+ {
+ 	/* Trash 32 bits of what is probably stale (non-random)
+ 	 * initial state from the RNG.  For Intel's, 8 bits would
+@@ -164,10 +162,12 @@ static int discard_initial_data(struct r
+ 	xread(tempbuf, sizeof(tempbuf), ent_src);
+ 
+ 	/* Return 32 bits of bootstrap data */
+-	xread(tempbuf, sizeof(tempbuf), ent_src);
++	if (xread(tempbuf, sizeof(tempbuf), ent_src) != 0)
++		return -1;
+ 
+-	return tempbuf[0] | (tempbuf[1] << 8) |
++	*buf = tempbuf[0] | (tempbuf[1] << 8) |
+ 		(tempbuf[2] << 16) | (tempbuf[3] << 24);
++	return 0;
+ }
+ 
+ /*
+@@ -175,6 +175,8 @@ static int discard_initial_data(struct r
+  */
+ int init_entropy_source(struct rng *ent_src)
+ {
++	int bootstrap;
++
+ 	ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY);
+ 	if (ent_src->rng_fd == -1) {
+ 		return 1;
+@@ -182,7 +184,11 @@ int init_entropy_source(struct rng *ent_
+ 	src_list_add(ent_src);
+ 	/* Bootstrap FIPS tests */
+ 	ent_src->fipsctx = malloc(sizeof(fips_ctx_t));
+-	fips_init(ent_src->fipsctx, discard_initial_data(ent_src));
++	if (discard_initial_data(ent_src, &bootstrap) != 0) {
++		message(LOG_ERR|LOG_INFO, "Read failure in %s during bootstrap\n",ent_src->rng_name);
++		return 1;
++	}
++	fips_init(ent_src->fipsctx, bootstrap);
+ 	return 0;
+ }
+ 
+--- a/rngtest.c
++++ b/rngtest.c
+@@ -335,6 +335,7 @@ static int discard_initial_data(void)
+ 
+ 	return tempbuf[0] | (tempbuf[1] << 8) |
+ 		(tempbuf[2] << 16) | (tempbuf[3] << 24);
++
+ }
+ 
+ static void do_rng_fips_test_loop( void )
diff --git a/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
index 4a66bed..b3c9fd9 100644
--- a/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
@@ -7,6 +7,7 @@
            file://0002-Add-argument-to-control-the-libargp-dependency.patch \
            file://underquote.patch \
            file://rng-tools-5-fix-textrels-on-PIC-x86.patch \
+           file://read_error_msg.patch \
            file://init \
            file://default \
            file://rngd.service \
diff --git a/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch b/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch
index 380f5d0..c392444 100644
--- a/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/serf/serf/norpath.patch
@@ -5,11 +5,11 @@
 
 RP 2014/7/17
 
-Index: serf-1.3.6/SConstruct
+Index: serf-1.3.9/SConstruct
 ===================================================================
---- serf-1.3.6.orig/SConstruct	2014-07-17 19:57:57.724389150 +0000
-+++ serf-1.3.6/SConstruct	2014-07-17 20:04:21.784399616 +0000
-@@ -218,8 +218,7 @@
+--- serf-1.3.9.orig/SConstruct
++++ serf-1.3.9/SConstruct
+@@ -224,8 +224,7 @@ if sys.platform != 'win32':
  else:
    LIBNAMESTATIC = 'serf-${MAJOR}'
  
@@ -17,9 +17,9 @@
 -           PDB='${TARGET.filebase}.pdb')
 +env.Append(PDB='${TARGET.filebase}.pdb')
  
- #for i in env:
- #    print(str(env[i]))
-@@ -371,12 +370,6 @@
+ if sys.platform == 'darwin':
+ #  linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,))
+@@ -385,12 +384,6 @@ if gssapi and CALLOUT_OKAY:
  if sys.platform == 'win32':
    env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
  
@@ -32,8 +32,8 @@
  # Set up the construction of serf-*.pc
  pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
                           env.File('build/serf.pc.in'),
-@@ -446,7 +439,6 @@
-                           ENV={'PATH' : os.environ['PATH']}))
+@@ -461,7 +454,6 @@ else:
+   TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ]
  
  # Find the (dynamic) library in this directory
 -tenv.Replace(RPATH=thisdir)
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
index 3c9f1ea..262ff75 100644
--- a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
@@ -8,16 +8,18 @@
 
 Signed-off-by: Joe Slater <jslater@windriver.com>
 
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -44,7 +44,9 @@ $(pkgconfig_DATA): config.status
- @INTLTOOL_XML_RULE@
- @INTLTOOL_DESKTOP_RULE@
+Index: shared-mime-info-1.9/Makefile.am
+===================================================================
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
+@@ -50,7 +50,9 @@ else
+   update_mime_database="$(top_builddir)/update-mime-database$(EXEEXT)"
+ endif
  
 -install-data-hook: install-binPROGRAMS
 +# do NOT make this dependent on anything!
 +#
 +install-data-hook:
  if ENABLE_UPDATE_MIMEDB
- 	$(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
+ 	$(update_mime_database) -V "$(DESTDIR)$(datadir)/mime"
  endif
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
index 84c4d03..fea34a5 100644
--- a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
@@ -11,17 +11,17 @@
 Upstream-Status: Pending
 Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
 
-Index: shared-mime-info-1.0/Makefile.am
+Index: shared-mime-info-1.9/Makefile.am
 ===================================================================
---- shared-mime-info-1.0.orig/Makefile.am
-+++ shared-mime-info-1.0/Makefile.am
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
 @@ -1,5 +1,3 @@
 -SUBDIRS=. po
 -
  AM_CPPFLAGS = $(ALL_CFLAGS)
  
  packagesdir = $(datadir)/mime/packages
-@@ -72,8 +70,7 @@ uninstall-hook:
+@@ -81,8 +79,7 @@ endif
  
  all: $(defaultmakedeps)
  
@@ -29,5 +29,5 @@
 -	$(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
 +create-pot: po
  
- check: create-pot freedesktop.org.xml update-mime-database check-translations
- 	if test -e $(top_builddir)/freedesktop.org.xml; then \
+ local-test: create-pot freedesktop.org.xml update-mime-database$(EXEEXT)
+ if CROSS_COMPILING
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.8.bb b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.8.bb
deleted file mode 100644
index 849d999..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require shared-mime-info.inc
-
-SRC_URI += "file://parallelmake.patch \
-	    file://install-data-hook.patch"
-
-SRC_URI[md5sum] = "f6dcadce764605552fc956563efa058c"
-SRC_URI[sha256sum] = "2af55ef1a0319805b74ab40d331a3962c905477d76c086f49e34dc96363589e9"
diff --git a/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb
new file mode 100644
index 0000000..f9b273e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI += "file://parallelmake.patch \
+	    file://install-data-hook.patch"
+
+SRC_URI[md5sum] = "45103889b91242850aa47f09325e798b"
+SRC_URI[sha256sum] = "5c0133ec4e228e41bdf52f726d271a2d821499c2ab97afd3aa3d6cf43efcdc83"
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch b/import-layers/yocto-poky/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch
deleted file mode 100644
index aac428c..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Fix CVE-2017-13685
-
-The dump_callback function in SQLite 3.20.0 allows remote attackers to
-cause a denial of service (EXC_BAD_ACCESS and application crash) via a
-crafted file.
-
-References:
-https://sqlite.org/src/info/02f0f4c54f2819b3
-http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg105314.html
-
-Upstream-Status: Backport [https://sqlite.org/src/info/cf0d3715caac9149]
-
-CVE: CVE-2017-13685
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
-Index: src/shell.c
-==================================================================
---- src/shell.c
-+++ src/shell.c
-@@ -2657,10 +2657,11 @@
-   int *aiType      /* Column types */
- ){
-   int i;
-   ShellState *p = (ShellState*)pArg;
- 
-+  if( azArg==0 ) return 0;
-   switch( p->cMode ){
-     case MODE_Line: {
-       int w = 5;
-       if( azArg==0 ) break;
-       for(i=0; i<nArg; i++){
-@@ -3007,10 +3008,11 @@
- */
- static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
-   ShellText *p = (ShellText*)pArg;
-   int i;
-   UNUSED_PARAMETER(az);
-+  if( azArg==0 ) return 0;
-   if( p->n ) appendText(p, "|", 0);
-   for(i=0; i<nArg; i++){
-     if( i ) appendText(p, ",", 0);
-     if( azArg[i] ) appendText(p, azArg[i], 0);
-   }
-@@ -3888,11 +3890,11 @@
-   const char *zType;
-   const char *zSql;
-   ShellState *p = (ShellState *)pArg;
- 
-   UNUSED_PARAMETER(azNotUsed);
--  if( nArg!=3 ) return 1;
-+  if( nArg!=3 || azArg==0 ) return 0;
-   zTable = azArg[0];
-   zType = azArg[1];
-   zSql = azArg[2];
- 
-   if( strcmp(zTable, "sqlite_sequence")==0 ){
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.20.0.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.20.0.bb
deleted file mode 100644
index e508258..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.20.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require sqlite3.inc
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
-
-SRC_URI = "\
-  http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_PV}.tar.gz \
-  file://sqlite3-fix-CVE-2017-13685.patch \
-  "
-SRC_URI[md5sum] = "e262a28b73cc330e7e83520c8ce14e4d"
-SRC_URI[sha256sum] = "3814c6f629ff93968b2b37a70497cfe98b366bf587a2261a56a5f750af6ae6a0"
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb
new file mode 100644
index 0000000..ef88659
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb
@@ -0,0 +1,10 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
+
+SRC_URI = "\
+  http://www.sqlite.org/2018/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+  "
+SRC_URI[md5sum] = "96b5648d542e8afa6ab7ffb8db8ddc3d"
+SRC_URI[sha256sum] = "2824ab1238b706bc66127320afbdffb096361130e23291f26928a027b885c612"
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.48.3.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.48.3.bb
deleted file mode 100644
index 4720841..0000000
--- a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.48.3.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Virtual terminal emulator GTK+ widget library"
-BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
-LICENSE = "LGPLv2.1+"
-DEPENDS = "glib-2.0 gtk+3 libpcre2 intltool-native libxml2-native gperf-native"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection
-
-# vapigen.m4 is required when vala is not present (but the one from vala should be used normally)
-SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \
-            ${@bb.utils.contains('PACKAGECONFIG', 'vala', '', 'file://0001-Add-m4-vapigen.m4.patch', d) } \
-            "
-SRC_URI[archive.md5sum] = "b300675ac5f269aa6eb48fe89a0d726d"
-SRC_URI[archive.sha256sum] = "a3a9fb182740b392a45cd3f46fa61a985f68bb6b1817b52daec22034c46158c3"
-
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-
-# Instead of "inherit vala" we do the relevant settings here so we can
-# set DEPENDS based on PACKAGECONFIG.
-
-# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
-export STAGING_DATADIR
-# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
-export XDG_DATA_DIRS = "${STAGING_DATADIR}"
-
-# Help g-ir-scanner find the .so for linking
-do_compile_prepend() {
-        export GIR_EXTRA_LIBS_PATH="${B}/src/.libs"
-}
-
-# Package additional files
-FILES_${PN}-dev += "${datadir}/vala/vapi/*"
-
-PACKAGECONFIG ??= "gnutls"
-PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-EXTRA_OECONF = "--disable-test-application"
-
-# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds.
-# Use libtool-cross (which has a hack to prevent that) instead.
-EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
-
-PACKAGES =+ "libvte"
-FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.50.2.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.50.2.bb
new file mode 100644
index 0000000..8b9ee33
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.50.2.bb
@@ -0,0 +1,48 @@
+SUMMARY = "Virtual terminal emulator GTK+ widget library"
+BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
+LICENSE = "LGPLv2.1+"
+DEPENDS = "glib-2.0 gtk+3 libpcre2 intltool-native libxml2-native gperf-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection
+
+# vapigen.m4 is required when vala is not present (but the one from vala should be used normally)
+SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \
+            ${@bb.utils.contains('PACKAGECONFIG', 'vala', '', 'file://0001-Add-m4-vapigen.m4.patch', d) } \
+            "
+SRC_URI[archive.md5sum] = "1912cfd1d9cdd30cebeb908507acadc5"
+SRC_URI[archive.sha256sum] = "79dd316bfaff48f2fb74d066baae0d830e1f44436796fe410a57297e5c5f09cf"
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+# Instead of "inherit vala" we do the relevant settings here so we can
+# set DEPENDS based on PACKAGECONFIG.
+
+# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
+export STAGING_DATADIR
+# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
+export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+
+# Help g-ir-scanner find the .so for linking
+do_compile_prepend() {
+        export GIR_EXTRA_LIBS_PATH="${B}/src/.libs"
+}
+
+# Package additional files
+FILES_${PN}-dev += "${datadir}/vala/vapi/*"
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+EXTRA_OECONF = "--disable-test-application"
+
+# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds.
+# Use libtool-cross (which has a hack to prevent that) instead.
+EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
+
+PACKAGES =+ "libvte"
+FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"
diff --git a/import-layers/yocto-poky/meta/site/arm-linux b/import-layers/yocto-poky/meta/site/arm-linux
index e6b9a72..fb3c81d 100644
--- a/import-layers/yocto-poky/meta/site/arm-linux
+++ b/import-layers/yocto-poky/meta/site/arm-linux
@@ -3,7 +3,6 @@
 ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
 ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=1}
 ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
 ac_cv_sizeof_char_p=${ac_cv_sizeof_int_p=4}
 ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
 ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4}
@@ -142,7 +141,6 @@
 clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
 clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
 clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 
 #dbus
 ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
diff --git a/import-layers/yocto-poky/meta/site/common b/import-layers/yocto-poky/meta/site/common
index 5ccc14f..ff55232 100644
--- a/import-layers/yocto-poky/meta/site/common
+++ b/import-layers/yocto-poky/meta/site/common
@@ -18,4 +18,4 @@
 # python: deactivate a runtime check for ipv6-support in python >=2.7.1 that fails when cross-compiling
 ac_cv_buggy_getaddrinfo=no
 
-ac_cv_path_SED=sed
+ac_cv_path_SED=${ac_cv_path_SED=sed}
diff --git a/import-layers/yocto-poky/meta/site/common-linux b/import-layers/yocto-poky/meta/site/common-linux
index 2958716..71ec961 100644
--- a/import-layers/yocto-poky/meta/site/common-linux
+++ b/import-layers/yocto-poky/meta/site/common-linux
@@ -48,6 +48,7 @@
 
 # coreutils
 gl_cv_func_fstatat_zero_flag=${gl_cv_func_fstatat_zero_flag=yes}
+gl_cv_have_proc_uptime=${gl_cv_have_proc_uptime=yes}
 
 # mysql
 ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=yes}
diff --git a/import-layers/yocto-poky/meta/site/common-musl b/import-layers/yocto-poky/meta/site/common-musl
index 26fc103..1b4fc32 100644
--- a/import-layers/yocto-poky/meta/site/common-musl
+++ b/import-layers/yocto-poky/meta/site/common-musl
@@ -12,6 +12,7 @@
 ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
 ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
 ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
+ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 
 # glib
 glib_cv_strlcpy=${glib_cv_strlcpy=no}
diff --git a/import-layers/yocto-poky/meta/site/ix86-common b/import-layers/yocto-poky/meta/site/ix86-common
index 4fbf58c..c5e354c 100644
--- a/import-layers/yocto-poky/meta/site/ix86-common
+++ b/import-layers/yocto-poky/meta/site/ix86-common
@@ -53,7 +53,6 @@
 clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
 clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
 clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 
 # cvs
 cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes}
diff --git a/import-layers/yocto-poky/meta/site/microblaze-linux b/import-layers/yocto-poky/meta/site/microblaze-linux
new file mode 100644
index 0000000..c6a40c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/microblaze-linux
@@ -0,0 +1,54 @@
+# general
+ac_cv_va_val_copy=${ac_cv_va_val_copy=yes}
+ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
+ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
+ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4}
+ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
+ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
+ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
+ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_ssize_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4}
+ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
+ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
+ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
+ac_cv_sizeof_unsigned=${ac_cv_sizeof_unsigned=4}
+ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
+ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2}
+ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4}
+ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=4}
+ac_cv_sizeof_unsigned_long_long=${ac_cv_sizeof_unsigned_long_long=8}
+ac_cv_sizeof_signed_char=${ac_cv_sizeof_signed_char=1}
+ac_cv_uchar=${ac_cv_uchar=no}
+ac_cv_uint=${ac_cv_uint=yes}
+ac_cv_ulong=${ac_cv_ulong=yes}
+ac_cv_ushort=${ac_cv_ushort=yes}
+
+# glib
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_uscore=${glib_cv_uscore=no}
+glib_cv_va_copy=${glib_cv_va_copy=yes}
+glib_cv_va_val_copy=${glib_cv_va_val_copy=yes}
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+
+# glib-2.0
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8}
+glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}
+glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_sys_use_pid_niceness_surrogate=${glib_cv_sys_use_pid_niceness_surrogate=yes}
+
+# startup-notification
+lf_cv_sane_realloc=yes
+
diff --git a/import-layers/yocto-poky/meta/site/nios2-linux b/import-layers/yocto-poky/meta/site/nios2-linux
index 5bae748..67a3fc8 100644
--- a/import-layers/yocto-poky/meta/site/nios2-linux
+++ b/import-layers/yocto-poky/meta/site/nios2-linux
@@ -232,7 +232,6 @@
 ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
 ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=1}
 ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
 ac_cv_sizeof_char_p=${ac_cv_sizeof_int_p=4}
 ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
 ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4}
@@ -372,7 +371,6 @@
 clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
 clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
 clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 
 #dbus
 ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
diff --git a/import-layers/yocto-poky/meta/site/powerpc32-linux b/import-layers/yocto-poky/meta/site/powerpc32-linux
index 06d961f..f37e915 100644
--- a/import-layers/yocto-poky/meta/site/powerpc32-linux
+++ b/import-layers/yocto-poky/meta/site/powerpc32-linux
@@ -1,6 +1,5 @@
 ac_cv_func_setvbuf_reversed=no
 ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
-ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1}
 ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
 ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4}
 ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
diff --git a/import-layers/yocto-poky/meta/site/riscv32-linux b/import-layers/yocto-poky/meta/site/riscv32-linux
new file mode 100644
index 0000000..97de628
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/riscv32-linux
@@ -0,0 +1,11 @@
+# general
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
diff --git a/import-layers/yocto-poky/meta/site/riscv64-linux b/import-layers/yocto-poky/meta/site/riscv64-linux
new file mode 100644
index 0000000..38bc5f0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/riscv64-linux
@@ -0,0 +1,11 @@
+# general
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
diff --git a/import-layers/yocto-poky/meta/site/sh-common b/import-layers/yocto-poky/meta/site/sh-common
index fc4d6ad..97c9693 100644
--- a/import-layers/yocto-poky/meta/site/sh-common
+++ b/import-layers/yocto-poky/meta/site/sh-common
@@ -227,7 +227,6 @@
 clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes}
 clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes}
 clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes}
-ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 
 # libnet 
 ac_cv_lbl_unaligned_fail=${ac_cv_lbl_unaligned_fail=no}
diff --git a/import-layers/yocto-poky/scripts/buildhistory-diff b/import-layers/yocto-poky/scripts/buildhistory-diff
index e79cb7a..70805b0 100755
--- a/import-layers/yocto-poky/scripts/buildhistory-diff
+++ b/import-layers/yocto-poky/scripts/buildhistory-diff
@@ -38,7 +38,7 @@
     parser.add_argument('-a', '--report-all',
                         action='store_true',
                         dest='report_all',
-                        default='False',
+                        default=False,
                         help="Report all changes, not just the default significant ones")
     parser.add_argument('-s', '---signatures',
                         action='store_true',
@@ -53,6 +53,10 @@
     parser.add_argument('-e', '--exclude-path',
                         action='append',
                         help="Exclude path from the output")
+    parser.add_argument('-c', '--colour',
+                        choices=('yes', 'no', 'auto'),
+                        default="auto",
+                        help="Whether to colourise (defaults to auto)")
     parser.add_argument('revisions',
                         default = ['build-minus-1', 'HEAD'],
                         nargs='*',
@@ -107,10 +111,11 @@
     elif len(args.revisions) == 2:
         fromrev, torev = args.revisions
 
-    from oe.buildhistory_analysis import process_changes
-
+    from oe.buildhistory_analysis import init_colours, process_changes
     import gitdb
 
+    init_colours({"yes": True, "no": False, "auto": sys.stdout.isatty()}[args.colour])
+
     try:
         changes = process_changes(args.buildhistory_dir, fromrev, torev,
                                   args.report_all, args.report_ver, args.sigs,
diff --git a/import-layers/yocto-poky/scripts/contrib/bbvars.py b/import-layers/yocto-poky/scripts/contrib/bbvars.py
index d8d0594..286b5a9 100755
--- a/import-layers/yocto-poky/scripts/contrib/bbvars.py
+++ b/import-layers/yocto-poky/scripts/contrib/bbvars.py
@@ -23,62 +23,38 @@
 import os.path
 import re
 
+# Set up sys.path to let us import tinfoil
+scripts_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+lib_path = scripts_path + '/lib'
+sys.path.insert(0, lib_path)
+import scriptpath
+scriptpath.add_bitbake_lib_path()
+import bb.tinfoil
+
 def usage():
-    print('Usage: %s -d FILENAME [-d FILENAME]* -m METADIR [-m MATADIR]*' % os.path.basename(sys.argv[0]))
+    print('Usage: %s -d FILENAME [-d FILENAME]*' % os.path.basename(sys.argv[0]))
     print('  -d FILENAME         documentation file to search')
     print('  -h, --help          display this help and exit')
-    print('  -m METADIR          meta directory to search for recipes')
     print('  -t FILENAME         documentation config file (for doc tags)')
     print('  -T                  Only display variables with doc tags (requires -t)')
 
-def recipe_bbvars(recipe):
-    ''' Return a unique set of every bbvar encountered in the recipe '''
-    prog = re.compile("[A-Z_]+")
-    vset = set()
-    try:
-        r = open(recipe)
-    except IOError as err:
-        print('WARNING: Failed to open recipe ', recipe)
-        print(err.args[1])
+def bbvar_is_documented(var, documented_vars):
+    ''' Check if variable (var) is in the list of documented variables(documented_vars) '''
+    if var in documented_vars:
+        return True
+    else:
+        return False
 
-    for line in r:
-        # Strip any comments from the line
-        line = line.rsplit('#')[0]
-        vset = vset.union(set(prog.findall(line)))
-    r.close()
+def collect_documented_vars(docfiles):
+    ''' Walk the docfiles and collect the documented variables '''
+    documented_vars = []
+    prog = re.compile(".*($|[^A-Z_])<glossentry id=\'var-")
+    var_prog = re.compile('<glossentry id=\'var-(.*)\'>')
+    for d in docfiles:
+        with open(d) as f:
+            documented_vars += var_prog.findall(f.read())
 
-    bbvars = {}
-    for v in vset:
-        bbvars[v] = 1
-
-    return bbvars
-
-def collect_bbvars(metadir):
-    ''' Walk the metadir and collect the bbvars from each recipe found '''
-    bbvars = {}
-    for root,dirs,files in os.walk(metadir):
-        for name in files:
-            if name.find(".bb") >= 0:
-                for key in recipe_bbvars(os.path.join(root,name)).keys():
-                    if key in bbvars:
-                        bbvars[key] = bbvars[key] + 1
-                    else:
-                        bbvars[key] = 1
-    return bbvars
-
-def bbvar_is_documented(var, docfiles):
-    prog = re.compile(".*($|[^A-Z_])%s([^A-Z_]|$)" % (var))
-    for doc in docfiles:
-        try:
-            f = open(doc)
-        except IOError as err:
-            print('WARNING: Failed to open doc ', doc)
-            print(err.args[1])
-        for line in f:
-            if prog.match(line):
-                return True
-        f.close()
-    return False
+    return documented_vars
 
 def bbvar_doctag(var, docconf):
     prog = re.compile('^%s\[doc\] *= *"(.*)"' % (var))
@@ -100,8 +76,7 @@
 
 def main():
     docfiles = []
-    metadirs = []
-    bbvars = {}
+    bbvars = set()
     undocumented = []
     docconf = ""
     onlydoctags = False
@@ -124,12 +99,6 @@
             else:
                 print('ERROR: documentation file %s is not a regular file' % a)
                 sys.exit(3)
-        elif o == '-m':
-            if os.path.isdir(a):
-                metadirs.append(a)
-            else:
-                print('ERROR: meta directory %s is not a directory' % a)
-                sys.exit(4)
         elif o == "-t":
             if os.path.isfile(a):
                 docconf = a
@@ -143,43 +112,68 @@
         usage()
         sys.exit(5)
 
-    if len(metadirs) == 0:
-        print('ERROR: no metadir specified')
-        usage()
-        sys.exit(6)
-
     if onlydoctags and docconf == "":
         print('ERROR: no docconf specified')
         usage()
         sys.exit(7)
 
-    # Collect all the variable names from the recipes in the metadirs
-    for m in metadirs:
-        for key,cnt in collect_bbvars(m).items():
-            if key in bbvars:
-                bbvars[key] = bbvars[key] + cnt
+    prog = re.compile("^[^a-z]*$")
+    with bb.tinfoil.Tinfoil() as tinfoil:
+        tinfoil.prepare(config_only=False)
+        parser = bb.codeparser.PythonParser('parser', None)
+        datastore = tinfoil.config_data
+
+        def bbvars_update(data):
+            if prog.match(data):
+                bbvars.add(data)
+            if tinfoil.config_data.getVarFlag(data, 'python'):
+                try:
+                    parser.parse_python(tinfoil.config_data.getVar(data))
+                except bb.data_smart.ExpansionError:
+                    pass
+                for var in parser.references:
+                    if prog.match(var):
+                        bbvars.add(var)
             else:
-                bbvars[key] = cnt
+                try:
+                    expandedVar = datastore.expandWithRefs(datastore.getVar(data, False), data)
+                    for var in expandedVar.references:
+                        if prog.match(var):
+                            bbvars.add(var)
+                except bb.data_smart.ExpansionError:
+                    pass
+
+        # Use tinfoil to collect all the variable names globally
+        for data in datastore:
+            bbvars_update(data)
+
+        # Collect variables from all recipes
+        for recipe in tinfoil.all_recipe_files(variants=False):
+            print("Checking %s" % recipe)
+            for data in tinfoil.parse_recipe_file(recipe):
+                bbvars_update(data)
+
+    documented_vars = collect_documented_vars(docfiles)
 
     # Check each var for documentation
     varlen = 0
-    for v in bbvars.keys():
+    for v in bbvars:
         if len(v) > varlen:
             varlen = len(v)
-        if not bbvar_is_documented(v, docfiles):
+        if not bbvar_is_documented(v, documented_vars):
             undocumented.append(v)
     undocumented.sort()
     varlen = varlen + 1
 
     # Report all undocumented variables
     print('Found %d undocumented bb variables (out of %d):' % (len(undocumented), len(bbvars)))
-    header = '%s%s%s' % (str("VARIABLE").ljust(varlen), str("COUNT").ljust(6), str("DOCTAG").ljust(7))
+    header = '%s%s' % (str("VARIABLE").ljust(varlen), str("DOCTAG").ljust(7))
     print(header)
     print(str("").ljust(len(header), '='))
     for v in undocumented:
         doctag = bbvar_doctag(v, docconf)
         if not onlydoctags or not doctag == "":
-            print('%s%s%s' % (v.ljust(varlen), str(bbvars[v]).ljust(6), doctag))
+            print('%s%s' % (v.ljust(varlen), doctag))
 
 
 if __name__ == "__main__":
diff --git a/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh b/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh
index 7d99228..9a091ed 100755
--- a/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh
+++ b/import-layers/yocto-poky/scripts/contrib/build-perf-test.sh
@@ -283,7 +283,7 @@
 
 test1_p1 () {
     log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir"
-    bbnotime $IMAGE -c fetchall
+    bbnotime $IMAGE --runall=fetch
     do_rmtmp
     do_rmsstate
     do_sync
diff --git a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py b/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py
deleted file mode 100755
index 586b329..0000000
--- a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py
+++ /dev/null
@@ -1,421 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-#  * Updated to no longer generate special -dbg package, instead use the
-#    single system -dbg
-#  * Update version with ".1" to indicate this change
-#
-# February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com>
-#  * Updated to support generating manifest for native python
-
-import os
-import sys
-import time
-import argparse
-
-VERSION = "2.7.2"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20110222.2"
-
-class MakefileMaker:
-
-    def __init__( self, outfile, isNative ):
-        """initialize"""
-        self.packages = {}
-        self.excluded_pkgs = []
-        self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
-        self.isNative = isNative
-        self.output = outfile
-        self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-""" % ( sys.argv[0], ' --native' if isNative else '', __version__ ) )
-
-    #
-    # helper functions
-    #
-
-    def out( self, data ):
-        """print a line to the output file"""
-        self.output.write( "%s\n" % data )
-
-    def setPrefix( self, targetPrefix ):
-        """set a file prefix for addPackage files"""
-        self.targetPrefix = targetPrefix
-
-    def doProlog( self ):
-        self.out( """ """ )
-        self.out( "" )
-
-    def addPackage( self, name, description, dependencies, filenames, mod_exclude = False ):
-        """add a package to the Makefile"""
-        if type( filenames ) == type( "" ):
-            filenames = filenames.split()
-        fullFilenames = []
-        for filename in filenames:
-            if filename[0] != "$":
-                fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
-            else:
-                fullFilenames.append( filename )
-        if mod_exclude:
-            self.excluded_pkgs.append( name )
-        self.packages[name] = description, dependencies, fullFilenames
-
-    def doBody( self ):
-        """generate body of Makefile"""
-
-        global VERSION
-
-        #
-        # generate rprovides line for native
-        #
-
-        if self.isNative:
-            pkglist = []
-            for name in ['${PN}-modules'] + sorted(self.packages):
-                pkglist.append('%s-native' % name.replace('${PN}', 'python'))
-
-            self.out('RPROVIDES += "%s"' % " ".join(pkglist))
-            return
-
-        #
-        # generate provides line
-        #
-
-        provideLine = 'PROVIDES+="'
-        for name in sorted(self.packages):
-            provideLine += "%s " % name
-        provideLine += '"'
-
-        self.out( provideLine )
-        self.out( "" )
-
-        #
-        # generate package line
-        #
-
-        packageLine = 'PACKAGES="${PN}-dbg '
-        for name in sorted(self.packages):
-            if name.startswith("${PN}-distutils"):
-                if name == "${PN}-distutils":
-                    packageLine += "%s-staticdev %s " % (name, name)
-            elif name != '${PN}-dbg':
-                packageLine += "%s " % name
-        packageLine += '${PN}-modules"'
-
-        self.out( packageLine )
-        self.out( "" )
-
-        #
-        # generate package variables
-        #
-
-        for name, data in sorted(self.packages.items()):
-            desc, deps, files = data
-
-            #
-            # write out the description, revision and dependencies
-            #
-            self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
-            self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
-            line = 'FILES_%s="' % name
-
-            #
-            # check which directories to make in the temporary directory
-            #
-
-            dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
-            for target in files:
-                dirset[os.path.dirname( target )] = True
-
-            #
-            # generate which files to copy for the target (-dfR because whole directories are also allowed)
-            #
-
-            for target in files:
-                line += "%s " % target
-
-            line += '"'
-            self.out( line )
-            self.out( "" )
-
-        self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
-        line = 'RDEPENDS_${PN}-modules="'
-
-        for name, data in sorted(self.packages.items()):
-            if name not in ['${PN}-dev', '${PN}-distutils-staticdev'] and name not in self.excluded_pkgs:
-                line += "%s " % name
-
-        self.out( "%s \"" % line )
-        self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
-    def doEpilog( self ):
-        self.out( """""" )
-        self.out( "" )
-
-    def make( self ):
-        self.doProlog()
-        self.doBody()
-        self.doEpilog()
-
-if __name__ == "__main__":
-    parser = argparse.ArgumentParser( description='generate python manifest' )
-    parser.add_argument( '-n', '--native', help='generate manifest for native python', action='store_true' )
-    parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' )
-    args = parser.parse_args()
-
-    if args.outfile:
-        try:
-            os.unlink( args.outfile )
-        except Exception:
-            sys.exc_clear()
-        outfile = open( args.outfile, "w" )
-    else:
-        outfile = sys.stdout
-
-    m = MakefileMaker( outfile, args.native )
-
-    # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
-    # Parameters: revision, name, description, dependencies, filenames
-    #
-
-    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re",
-    "__future__.* _abcoll.* abc.* ast.* copy.* copy_reg.* ConfigParser.* " +
-    "genericpath.* getopt.* linecache.* new.* " +
-    "os.* posixpath.* struct.* " +
-    "warnings.* site.* stat.* " +
-    "UserDict.* UserList.* UserString.* " +
-    "lib-dynload/binascii.so lib-dynload/_struct.so lib-dynload/time.so " +
-    "lib-dynload/xreadlines.so types.* platform.* ${bindir}/python* "  +
-    "_weakrefset.* sysconfig.* _sysconfigdata.* " +
-    "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " +
-    "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
-    m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
-    "${includedir} " +
-    "${libdir}/lib*${SOLIBSDEV} " +
-    "${libdir}/*.la " +
-    "${libdir}/*.a " +
-    "${libdir}/*.o " +
-    "${libdir}/pkgconfig " +
-    "${base_libdir}/*.a " +
-    "${base_libdir}/*.o " +
-    "${datadir}/aclocal " +
-    "${datadir}/pkgconfig " +
-    "config/Makefile ")
-
-    m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
-    "${bindir}/2to3 lib2to3" ) # package
-
-    m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
-    "${bindir}/idle idlelib" ) # package
-
-    m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
-    "${bindir}/pydoc pydoc.* pydoc_data" )
-
-    m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
-    "${bindir}/smtpd.* smtpd.*" )
-
-    m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
-    "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.so lib-dynload/audioop.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
-    m.addPackage( "${PN}-bsddb", "Python bindings for the Berkeley Database", "${PN}-core",
-    "bsddb lib-dynload/_bsddb.so" ) # package
-
-    m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
-    "codecs.* encodings gettext.* locale.* lib-dynload/_locale.so lib-dynload/_codecs* lib-dynload/_multibytecodec.so lib-dynload/unicodedata.so stringprep.* xdrlib.*" )
-
-    m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
-    "py_compile.* compileall.*" )
-
-    m.addPackage( "${PN}-compiler", "Python compiler support", "${PN}-core",
-    "compiler" ) # package
-
-    m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-zlib",
-    "gzip.* zipfile.* tarfile.* lib-dynload/bz2.so" )
-
-    m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
-    "hashlib.* md5.* sha.* lib-dynload/crypt.so lib-dynload/_hashlib.so lib-dynload/_sha256.so lib-dynload/_sha512.so" )
-
-    m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
-    "lib-dynload/_csv.so csv.* optparse.* textwrap.*" )
-
-    m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
-    "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core",
-    "ctypes lib-dynload/_ctypes.so lib-dynload/_ctypes_test.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
-    "_strptime.* calendar.* lib-dynload/datetime.so" )
-
-    m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
-    "anydbm.* dumbdbm.* whichdb.* " )
-
-    m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint",
-    "bdb.* pdb.*" )
-
-    m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
-    "difflib.*" )
-
-    m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
-    "config/lib*.a" ) # package
-
-    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
-    "config distutils" ) # package
-
-    m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
-    "doctest.*" )
-
-    m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
-    "imaplib.* email" ) # package
-
-    m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
-    "lib-dynload/fcntl.so" )
-
-    m.addPackage( "${PN}-hotshot", "Python hotshot performance profiler", "${PN}-core",
-    "hotshot lib-dynload/_hotshot.so" )
-
-    m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
-    "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
-    m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core",
-    "importlib" )
-
-    m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
-    "lib-dynload/gdbm.so" )
-
-    m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
-    "colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" )
-
-    m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib",
-    "lib-dynload/_socket.so lib-dynload/_io.so lib-dynload/_ssl.so lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so " +
-    "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
-    m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re ${PN}-codecs",
-    "json lib-dynload/_json.so" ) # package
-
-    m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core",
-    "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_functools.so " +
-    "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " +
-    "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " +
-    "tokenize.* traceback.* weakref.*" )
-
-    m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
-    "logging" ) # package
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt",
-    "lib-dynload/cmath.so lib-dynload/math.so lib-dynload/_random.so random.* sets.*" )
-
-    m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
-    "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
-    m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
-    "lib-dynload/mmap.so " )
-
-    m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
-    "lib-dynload/_multiprocessing.so multiprocessing" ) # package
-
-    m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
-    "*Cookie*.* " +
-    "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.* uuid.* rfc822.* mimetools.*" )
-
-    m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
-    "cgi.* *HTTPServer.* SocketServer.*" )
-
-    m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
-    "decimal.* fractions.* numbers.*" )
-
-    m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
-    "pickle.* shelve.* lib-dynload/cPickle.so pickletools.*" )
-
-    m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
-    "pkgutil.*")
-
-    m.addPackage( "${PN}-plistlib", "Generate and parse Mac OS X .plist files", "${PN}-core ${PN}-datetime ${PN}-io",
-    "plistlib.*")
-
-    m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
-    "pprint.*" )
-
-    m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
-    "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" )
-
-    m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
-    "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
-    m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
-    "lib-dynload/readline.so rlcompleter.*" )
-
-    m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
-    "lib-dynload/resource.so" )
-
-    m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re",
-    "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
-    m.addPackage( "${PN}-robotparser", "Python robots.txt parser", "${PN}-core ${PN}-netclient",
-    "robotparser.*")
-
-    m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle",
-    "subprocess.*" )
-
-    m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib",
-    "lib-dynload/_sqlite3.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
-    m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
-    "sqlite3/test" )
-
-    m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
-    "lib-dynload/strop.so string.* stringold.*" )
-
-    m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
-    "lib-dynload/syslog.so" )
-
-    m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
-    "pty.* tty.*" )
-
-    m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-modules",
-    "test", True ) # package
-
-    m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
-    "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
-
-    m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
-    "lib-dynload/_tkinter.so lib-tk" ) # package
-
-    m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
-    "unittest/" )
-
-    m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
-    "lib-dynload/nis.so lib-dynload/grp.so lib-dynload/pwd.so getpass.*" )
-
-    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
-    "lib-dynload/_elementtree.so lib-dynload/pyexpat.so xml xmllib.*" ) # package
-
-    m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
-    "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.*" )
-
-    m.addPackage( "${PN}-zlib", "Python zlib compression support", "${PN}-core",
-    "lib-dynload/zlib.so" )
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
-    "argparse.*" )
-
-    m.addPackage( "${PN}-contextlib", "Python utilities for with-statement" +
-    "contexts.", "${PN}-core",
-    "${libdir}/python${PYTHON_MAJMIN}/contextlib.*" )
-
-    m.make()
diff --git a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py b/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py
deleted file mode 100755
index 6352f8f..0000000
--- a/import-layers/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py
+++ /dev/null
@@ -1,433 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-#  * Updated to no longer generate special -dbg package, instead use the
-#    single system -dbg
-#  * Update version with ".1" to indicate this change
-#
-# 2014 Khem Raj <raj.khem@gmail.com>
-# Added python3 support
-#
-# February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com>
-# * Updated to support generating manifest for native python3
-
-import os
-import sys
-import time
-import argparse
-
-VERSION = "3.5.0"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20140131"
-
-class MakefileMaker:
-
-    def __init__( self, outfile, isNative ):
-        """initialize"""
-        self.packages = {}
-        self.excluded_pkgs = []
-        self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
-        self.isNative = isNative
-        self.output = outfile
-        self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-""" % ( sys.argv[0], ' --native' if isNative else '', __version__ ) )
-
-    #
-    # helper functions
-    #
-
-    def out( self, data ):
-        """print a line to the output file"""
-        self.output.write( "%s\n" % data )
-
-    def setPrefix( self, targetPrefix ):
-        """set a file prefix for addPackage files"""
-        self.targetPrefix = targetPrefix
-
-    def doProlog( self ):
-        self.out( """ """ )
-        self.out( "" )
-
-    def addPackage( self, name, description, dependencies, filenames, mod_exclude = False ):
-        """add a package to the Makefile"""
-        if type( filenames ) == type( "" ):
-            filenames = filenames.split()
-        fullFilenames = []
-        for filename in filenames:
-            if filename[0] != "$":
-                fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
-                fullFilenames.append( "%s%s" % ( self.targetPrefix,
-                                                 self.pycachePath( filename ) ) )
-            else:
-                fullFilenames.append( filename )
-        if mod_exclude:
-            self.excluded_pkgs.append( name )
-        self.packages[name] = description, dependencies, fullFilenames
-
-    def pycachePath( self, filename ):
-        dirname = os.path.dirname( filename )
-        basename = os.path.basename( filename )
-        if '.' in basename:
-            return os.path.join( dirname, '__pycache__', basename )
-        else:
-            return os.path.join( dirname, basename, '__pycache__' )
-
-    def doBody( self ):
-        """generate body of Makefile"""
-
-        global VERSION
-
-        #
-        # generate rprovides line for native
-        #
-
-        if self.isNative:
-            pkglist = []
-            for name in ['${PN}-modules'] + sorted(self.packages):
-                pkglist.append('%s-native' % name.replace('${PN}', 'python3'))
-
-            self.out('RPROVIDES += "%s"' % " ".join(pkglist))
-            return
-
-        #
-        # generate provides line
-        #
-
-        provideLine = 'PROVIDES+="'
-        for name in sorted(self.packages):
-            provideLine += "%s " % name
-        provideLine += '"'
-
-        self.out( provideLine )
-        self.out( "" )
-
-        #
-        # generate package line
-        #
-
-        packageLine = 'PACKAGES="${PN}-dbg '
-        for name in sorted(self.packages):
-            if name.startswith("${PN}-distutils"):
-                if name == "${PN}-distutils":
-                    packageLine += "%s-staticdev %s " % (name, name)
-            elif name != '${PN}-dbg':
-                packageLine += "%s " % name
-        packageLine += '${PN}-modules"'
-
-        self.out( packageLine )
-        self.out( "" )
-
-        #
-        # generate package variables
-        #
-
-        for name, data in sorted(self.packages.items()):
-            desc, deps, files = data
-
-            #
-            # write out the description, revision and dependencies
-            #
-            self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
-            self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
-            line = 'FILES_%s="' % name
-
-            #
-            # check which directories to make in the temporary directory
-            #
-
-            dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
-            for target in files:
-                dirset[os.path.dirname( target )] = True
-
-            #
-            # generate which files to copy for the target (-dfR because whole directories are also allowed)
-            #
-
-            for target in files:
-                line += "%s " % target
-
-            line += '"'
-            self.out( line )
-            self.out( "" )
-
-        self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
-        line = 'RDEPENDS_${PN}-modules="'
-
-        for name, data in sorted(self.packages.items()):
-            if name not in ['${PN}-dev', '${PN}-distutils-staticdev'] and name not in self.excluded_pkgs:
-                line += "%s " % name
-
-        self.out( "%s \"" % line )
-        self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
-    def doEpilog( self ):
-        self.out( """""" )
-        self.out( "" )
-
-    def make( self ):
-        self.doProlog()
-        self.doBody()
-        self.doEpilog()
-
-if __name__ == "__main__":
-    parser = argparse.ArgumentParser( description='generate python3 manifest' )
-    parser.add_argument( '-n', '--native', help='generate manifest for native python3', action='store_true' )
-    parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' )
-    args = parser.parse_args()
-
-    if args.outfile:
-        try:
-            os.unlink( args.outfile )
-        except Exception:
-            sys.exc_clear()
-        outfile = open( args.outfile, "w" )
-    else:
-        outfile = sys.stdout
-
-    m = MakefileMaker( outfile, args.native )
-
-    # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
-    # Parameters: revision, name, description, dependencies, filenames
-    #
-
-    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
-    "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* " +
-    "genericpath.* getopt.* linecache.* new.* " +
-    "os.* posixpath.* struct.* " +
-    "warnings.* site.* stat.* " +
-    "UserDict.* UserList.* UserString.* " +
-    "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " +
-    "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* "  + 
-    "_weakrefset.* sysconfig.* _sysconfigdata.* " +
-    "${includedir}/python${PYTHON_BINABI}/pyconfig*.h " +
-    "${libdir}/python${PYTHON_MAJMIN}/collections " +
-    "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* " +
-    "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* " +
-    "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
-    m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
-    "${includedir} " +
-    "${libdir}/lib*${SOLIBSDEV} " +
-    "${libdir}/*.la " +
-    "${libdir}/*.a " +
-    "${libdir}/*.o " +
-    "${libdir}/pkgconfig " +
-    "${base_libdir}/*.a " +
-    "${base_libdir}/*.o " +
-    "${datadir}/aclocal " +
-    "${datadir}/pkgconfig " +
-    "config*/Makefile ")
-
-    m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
-    "lib2to3" ) # package
-
-    m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
-    "${bindir}/idle idlelib" ) # package
-
-    m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
-    "${bindir}/pydoc pydoc.* pydoc_data" )
-
-    m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
-    "${bindir}/smtpd.* smtpd.*" )
-
-    m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
-    "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
-    m.addPackage( "${PN}-argparse", "Python command line argument parser", "${PN}-core ${PN}-codecs ${PN}-textutils",
-    "argparse.*" )
-
-    m.addPackage( "${PN}-asyncio", "Python Asynchronous I/O, event loop, coroutines and tasks", "${PN}-core",
-    "asyncio" )
-
-    m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
-    "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" )
-
-    m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
-    "py_compile.* compileall.*" )
-
-    m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell",
-    "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so lib-dynload/zlib.*.so bz2.py lzma.py _compression.py" )
-
-    m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
-    "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" )
-
-    m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
-    "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" )
-
-    m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
-    "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core ${PN}-subprocess",
-    "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
-    "_strptime.* calendar.* datetime.* lib-dynload/_datetime.*.so" )
-
-    m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
-    "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" )
-
-    m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil",
-    "bdb.* pdb.*" )
-
-    m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
-    "difflib.*" )
-
-    m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
-    "config/lib*.a" ) # package
-
-    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
-    "config distutils" ) # package
-
-    m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
-    "doctest.*" )
-
-    m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
-    "imaplib.* email" ) # package
-
-    m.addPackage( "${PN}-enum", "Python support for enumerations", "${PN}-core",
-    "enum.*" )
-
-    m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
-    "lib-dynload/fcntl.*.so" )
-
-    m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
-    "formatter.* htmlentitydefs.* html htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
-    m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core ${PN}-lang",
-    "importlib imp.*" )
-
-    m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
-    "lib-dynload/_gdbm.*.so" )
-
-    m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
-    "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" )
-
-    m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math",
-    "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
-    "ipaddress.* pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
-    m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re",
-    "json lib-dynload/_json.*.so" ) # package
-
-    m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core ${PN}-importlib",
-    "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " +
-    "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " +
-    "atexit.* bisect.* code.* codeop.* collections.* _collections_abc.* contextlib.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* operator.* symbol.* repr.* token.* " +
-    "tokenize.* traceback.* weakref.*" )
-
-    m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
-    "logging" ) # package
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt",
-    "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" )
-
-    m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
-    "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
-    m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
-    "lib-dynload/mmap.*.so " )
-
-    m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
-    "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
-
-    m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime ${PN}-html",
-    "*Cookie*.* " +
-    "base64.* cookielib.* ftplib.* gopherlib.* hmac.* http* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* mimetools.*" )
-
-    m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
-    "cgi.* socketserver.* *HTTPServer.* SocketServer.*" )
-
-    m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
-    "decimal.* fractions.* numbers.*" )
-
-    m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
-    "_compat_pickle.* pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
-
-    m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
-    "pkgutil.*")
-
-    m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
-    "pprint.*" )
-
-    m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
-    "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" )
-
-    m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
-    "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
-    m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
-    "lib-dynload/readline.*.so rlcompleter.*" )
-
-    m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core",
-    "reprlib.py" )
-
-    m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
-    "lib-dynload/resource.*.so" )
-
-    m.addPackage( "${PN}-selectors", "Python High-level I/O multiplexing", "${PN}-core",
-    "selectors.*" )
-
-    m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re ${PN}-compression",
-    "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
-    m.addPackage( "${PN}-signal", "Python set handlers for asynchronous events support", "${PN}-core ${PN}-enum",
-    "signal.*" )
-
-    m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors",
-    "subprocess.* lib-dynload/_posixsubprocess.*.so" )
-
-    m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading",
-    "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
-    m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
-    "sqlite3/test" )
-
-    m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
-    "lib-dynload/strop.*.so string.* stringold.*" )
-
-    m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
-    "lib-dynload/syslog.*.so" )
-
-    m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
-    "pty.* tty.*" )
-
-    m.addPackage( "${PN}-tests", "Python tests", "${PN}-core ${PN}-compression",
-    "test", True ) # package
-
-    m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
-    "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* queue.*" )
-
-    m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
-    "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package
-
-    m.addPackage( "${PN}-typing", "Python typing support", "${PN}-core",
-    "typing.*" )
-
-    m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
-    "unittest/" )
-
-    m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
-    "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" )
-
-    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
-    "lib-dynload/_elementtree.*.so lib-dynload/pyexpat.*.so xml xmllib.*" ) # package
-
-    m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pydoc",
-    "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" )
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.make()
diff --git a/import-layers/yocto-poky/scripts/contrib/yocto-bsp-kernel-update.sh b/import-layers/yocto-poky/scripts/contrib/yocto-bsp-kernel-update.sh
deleted file mode 100755
index b3aa705..0000000
--- a/import-layers/yocto-poky/scripts/contrib/yocto-bsp-kernel-update.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2017, Intel Corporation.
-# All rights reserved.
-#
-# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Description: creates a new set of kernel templates based on version
-#
-
-set -o nounset
-set -o errexit
-
-if [ $# -ne 4 ]; then
-    cat << EOF
-usage: $0 from_mayor from_minor to_mayor to_minor
-EOF
-    exit 1
-else
-    fma=$1 # from mayor
-    fmi=$2 # from minor
-    tma=$3 # to mayor
-    tmi=$4 # to minor
-fi
-
-poky=$(readlink -e $(dirname $(dirname $(dirname $0))))
-arch=$poky/scripts/lib/bsp/substrate/target/arch
-
-
-# copy/rename templates
-for from in $(ls -1 $arch/*/recipes-kernel/linux/linux-yocto*_$fma\.$fmi.bbappend)
-do
-    to=$(echo $from | sed s/$fma\.$fmi/$tma\.$tmi/)
-    cp $from $to
-done
-
-# replace versions string inside new templates
-for bbappend in $(ls -1 $arch/*/recipes-kernel/linux/linux-yocto*_$tma\.$tmi.bbappend)
-do
-    sed -i 1s/$fma\.$fmi/$tma\.$tmi/ $bbappend
-    sed -i \$s/$fma\.$fmi/$tma\.$tmi/ $bbappend
-done
-
-# update the noinstall files
-for noinstall in $(ls -1 $arch/*/recipes-kernel/linux/kernel-list.noinstall)
-do
-    sed -i s/$fma\.$fmi/$tma\.$tmi/g $noinstall;
-done
diff --git a/import-layers/yocto-poky/scripts/crosstap b/import-layers/yocto-poky/scripts/crosstap
index 39739bb..e33fa4a 100755
--- a/import-layers/yocto-poky/scripts/crosstap
+++ b/import-layers/yocto-poky/scripts/crosstap
@@ -1,15 +1,22 @@
-#!/bin/bash
+#!/usr/bin/env python3
 #
-# Run a systemtap script on remote target
+# Build a systemtap script for a given image, kernel
 #
-# Examples (run on build host, target is 192.168.1.xxx):
-#   $ source oe-init-build-env"
-#   $ cd ~/my/systemtap/scripts"
+# Effectively script extracts needed information from set of
+# 'bitbake -e' commands and contructs proper invocation of stap on
+# host to build systemtap script for a given target.
 #
-#   $ crosstap root@192.168.1.xxx myscript.stp"
-#   $ crosstap root@192.168.1.xxx myscript-with-args.stp 99 ninetynine"
+# By default script will compile scriptname.ko that could be copied
+# to taget and activated with 'staprun scriptname.ko' command. Or if
+# --remote user@hostname option is specified script will build, load
+# execute script on target.
 #
-# Copyright (c) 2012, Intel Corporation.
+# This script is very similar and inspired by crosstap shell script.
+# The major difference that this script supports user-land related
+# systemtap script, whereas crosstap could deal only with scripts
+# related to kernel.
+#
+# Copyright (c) 2018, Cisco Systems.
 # All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -25,131 +32,438 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-function usage() {
-    echo "Usage: $0 <user@hostname> <sytemtap-script> [additional systemtap-script args]"
-}
+import sys
+import re
+import subprocess
+import os
+import optparse
 
-function setup_usage() {
-    echo ""
-    echo "'crosstap' requires a local sdk build of the target system"
-    echo "(or a build that includes 'tools-profile') in order to build"
-    echo "kernel modules that can probe the target system."
-    echo ""
-    echo "Practically speaking, that means you need to do the following:"
-    echo "  - If you're running a pre-built image, download the release"
-    echo "    and/or BSP tarballs used to build the image."
-    echo "  - If you're working from git sources, just clone the metadata"
-    echo "    and BSP layers needed to build the image you'll be booting."
-    echo "  - Make sure you're properly set up to build a new image (see"
-    echo "    the BSP README and/or the widely available basic documentation"
-    echo "    that discusses how to build images)."
-    echo "  - Build an -sdk version of the image e.g.:"
-    echo "      $ bitbake core-image-sato-sdk"
-    echo "  OR"
-    echo "  - Build a non-sdk image but include the profiling tools:"
-    echo "      [ edit local.conf and add 'tools-profile' to the end of"
-    echo "        the EXTRA_IMAGE_FEATURES variable ]"
-    echo "      $ bitbake core-image-sato"
-    echo ""
-    echo "  [ NOTE that 'crosstap' needs to be able to ssh into the target"
-    echo "    system, which isn't enabled by default in -minimal images. ]"
-    echo ""
-    echo "Once you've build the image on the host system, you're ready to"
-    echo "boot it (or the equivalent pre-built image) and use 'crosstap'"
-    echo "to probe it (you need to source the environment as usual first):"
-    echo ""
-    echo "    $ source oe-init-build-env"
-    echo "    $ cd ~/my/systemtap/scripts"
-    echo "    $ crosstap root@192.168.1.xxx myscript.stp"
-    echo ""
-}
+class Stap(object):
+    def __init__(self, script, module, remote):
+        self.script = script
+        self.module = module
+        self.remote = remote
+        self.stap = None
+        self.sysroot = None
+        self.runtime = None
+        self.tapset = None
+        self.arch = None
+        self.cross_compile = None
+        self.kernel_release = None
+        self.target_path = None
+        self.target_ld_library_path = None
 
-function systemtap_target_arch() {
-    SYSTEMTAP_TARGET_ARCH=$1
-    case $SYSTEMTAP_TARGET_ARCH in
-        i?86)
-            SYSTEMTAP_TARGET_ARCH="i386"
-            ;;
-        x86?64*)
-            SYSTEMTAP_TARGET_ARCH="x86_64"
-            ;;
-        arm*)
-            SYSTEMTAP_TARGET_ARCH="arm"
-            ;;
-        powerpc*)
-            SYSTEMTAP_TARGET_ARCH="powerpc"
-            ;;
-        *)
-            ;;
-    esac
-}
+        if not self.remote:
+            if not self.module:
+                # derive module name from script
+                self.module = os.path.basename(self.script)
+                if self.module[-4:] == ".stp":
+                    self.module = self.module[:-4]
+                    # replace - if any with _
+                    self.module = self.module.replace("-", "_")
 
-if [ $# -lt 2 ]; then
-	usage
-	exit 1
-fi
+    def command(self, args):
+        ret = []
+        ret.append(self.stap)
 
-if [ -z "$BUILDDIR" ]; then
-    echo "Error: Unable to find the BUILDDIR environment variable."
-    echo "Did you forget to source your build system environment setup script?"
-    exit 1
-fi
+        if self.remote:
+            ret.append("--remote")
+            ret.append(self.remote)
+        else:
+            ret.append("-p4")
+            ret.append("-m")
+            ret.append(self.module)
 
-pushd $PWD
-cd $BUILDDIR
-BITBAKE_VARS=`bitbake -e virtual/kernel`
-popd
+        ret.append("-a")
+        ret.append(self.arch)
 
-STAGING_BINDIR_TOOLCHAIN=$(echo "$BITBAKE_VARS" | grep ^STAGING_BINDIR_TOOLCHAIN \
-  | cut -d '=' -f2 | cut -d '"' -f2)
-STAGING_BINDIR_TOOLPREFIX=$(echo "$BITBAKE_VARS" | grep ^TARGET_PREFIX \
-  | cut -d '=' -f2 | cut -d '"' -f2)
-TARGET_ARCH=$(echo "$BITBAKE_VARS" | grep ^TRANSLATED_TARGET_ARCH \
-  | cut -d '=' -f2 | cut -d '"' -f2)
-TARGET_KERNEL_BUILDDIR=$(echo "$BITBAKE_VARS" | grep ^B= \
-  | cut -d '=' -f2 | cut -d '"' -f2)
+        ret.append("-B")
+        ret.append("CROSS_COMPILE=" + self.cross_compile)
 
-# Build and populate the recipe-sysroot-native with systemtap-native
-pushd $PWD
-cd $BUILDDIR
-BITBAKE_VARS=`bitbake -e systemtap-native`
-popd
-SYSTEMTAP_HOST_INSTALLDIR=$(echo "$BITBAKE_VARS" | grep ^STAGING_DIR_NATIVE \
-  | cut -d '=' -f2 | cut -d '"' -f2)
+        ret.append("-r")
+        ret.append(self.kernel_release)
 
-systemtap_target_arch "$TARGET_ARCH"
+        ret.append("-I")
+        ret.append(self.tapset)
 
-if [ ! -d $TARGET_KERNEL_BUILDDIR ] ||
-   [ ! -f $TARGET_KERNEL_BUILDDIR/vmlinux ]; then
-    echo -e "\nError: No target kernel build found."
-    echo -e "Did you forget to create a local build of your image?"
-    setup_usage
-    exit 1
-fi
+        ret.append("-R")
+        ret.append(self.runtime)
 
-if [ ! -f $SYSTEMTAP_HOST_INSTALLDIR/usr/bin/stap ]; then
-    echo -e "\nError: Native (host) systemtap not found."
-    echo -e "Did you accidentally build a local non-sdk image? (or forget to"
-    echo -e "add 'tools-profile' to EXTRA_IMAGE_FEATURES in your local.conf)?"
-    echo -e "You can also: bitbake -c addto_recipe_sysroot systemtap-native"
-    setup_usage
-    exit 1
-fi
+        if self.sysroot:
+            ret.append("--sysroot")
+            ret.append(self.sysroot)
 
-target_user_hostname="$1"
-full_script_name="$2"
-script_name=$(basename "$2")
-script_base=${script_name%.*}
-shift 2
+            ret.append("--sysenv=PATH=" + self.target_path)
+            ret.append("--sysenv=LD_LIBRARY_PATH=" + self.target_ld_library_path)
 
-${SYSTEMTAP_HOST_INSTALLDIR}/usr/bin/stap \
-  -a ${SYSTEMTAP_TARGET_ARCH} \
-  -B CROSS_COMPILE="${STAGING_BINDIR_TOOLCHAIN}/${STAGING_BINDIR_TOOLPREFIX}" \
-  -r ${TARGET_KERNEL_BUILDDIR} \
-  -I ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/tapset \
-  -R ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/runtime \
-  --remote=$target_user_hostname \
-  -m $script_base \
-   $full_script_name "$@"
+        ret = ret + args
 
-exit 0
+        ret.append(self.script)
+        return ret
+
+    def additional_environment(self):
+        ret = {}
+        ret["SYSTEMTAP_DEBUGINFO_PATH"] = "+:.debug:build"
+        return ret
+
+    def environment(self):
+        ret = os.environ.copy()
+        additional = self.additional_environment()
+        for e in additional:
+            ret[e] = additional[e]
+        return ret
+
+    def display_command(self, args):
+        additional_env = self.additional_environment()
+        command = self.command(args)
+
+        print("#!/bin/sh")
+        for e in additional_env:
+            print("export %s=\"%s\"" % (e, additional_env[e]))
+        print(" ".join(command))
+
+class BitbakeEnvInvocationException(Exception):
+    def __init__(self, message):
+        self.message = message
+
+class BitbakeEnv(object):
+    BITBAKE="bitbake"
+
+    def __init__(self, package):
+        self.package = package
+        self.cmd = BitbakeEnv.BITBAKE + " -e " + self.package
+        self.popen = subprocess.Popen(self.cmd, shell=True,
+                                      stdout=subprocess.PIPE,
+                                      stderr=subprocess.STDOUT)
+        self.__lines = self.popen.stdout.readlines()
+        self.popen.wait()
+
+        self.lines = []
+        for line in self.__lines:
+                self.lines.append(line.decode('utf-8'))
+
+    def get_vars(self, vars):
+        if self.popen.returncode:
+            raise BitbakeEnvInvocationException(
+                "\nFailed to execute '" + self.cmd +
+                "' with the following message:\n" +
+                ''.join(self.lines))
+
+        search_patterns = []
+        retdict = {}
+        for var in vars:
+            # regular not exported variable
+            rexpr = "^" + var + "=\"(.*)\""
+            re_compiled = re.compile(rexpr)
+            search_patterns.append((var, re_compiled))
+
+            # exported variable
+            rexpr = "^export " + var + "=\"(.*)\""
+            re_compiled = re.compile(rexpr)
+            search_patterns.append((var, re_compiled))
+
+            for line in self.lines:
+                for var, rexpr in search_patterns:
+                    m = rexpr.match(line)
+                    if m:
+                        value = m.group(1)
+                        retdict[var] = value
+
+        # fill variables values in order how they were requested
+        ret = []
+        for var in vars:
+            ret.append(retdict.get(var))
+
+        # if it is single value list return it as scalar, not the list
+        if len(ret) == 1:
+            ret = ret[0]
+
+        return ret
+
+class ParamDiscovery(object):
+    SYMBOLS_CHECK_MESSAGE = """
+WARNING: image '%s' does not have dbg-pkgs IMAGE_FEATURES enabled and no
+"image-combined-dbg" in inherited classes is specified. As result the image
+does not have symbols for user-land processes DWARF based probes. Consider
+adding 'dbg-pkgs' to EXTRA_IMAGE_FEATURES or adding "image-combined-dbg" to
+USER_CLASSES. I.e add this line 'USER_CLASSES += "image-combined-dbg"' to
+local.conf file.
+
+Or you may use IMAGE_GEN_DEBUGFS="1" option, and then after build you need
+recombine/unpack image and image-dbg tarballs and pass resulting dir location
+with --sysroot option.
+"""
+
+    def __init__(self, image):
+        self.image = image
+
+        self.image_rootfs = None
+        self.image_features = None
+        self.image_gen_debugfs = None
+        self.inherit = None
+        self.base_bindir = None
+        self.base_sbindir = None
+        self.base_libdir = None
+        self.bindir = None
+        self.sbindir = None
+        self.libdir = None
+
+        self.staging_bindir_toolchain = None
+        self.target_prefix = None
+        self.target_arch = None
+        self.target_kernel_builddir = None
+
+        self.staging_dir_native = None
+
+        self.image_combined_dbg = False
+
+    def discover(self):
+        if self.image:
+            benv_image = BitbakeEnv(self.image)
+            (self.image_rootfs,
+             self.image_features,
+             self.image_gen_debugfs,
+             self.inherit,
+             self.base_bindir,
+             self.base_sbindir,
+             self.base_libdir,
+             self.bindir,
+             self.sbindir,
+             self.libdir
+            ) = benv_image.get_vars(
+                 ("IMAGE_ROOTFS",
+                  "IMAGE_FEATURES",
+                  "IMAGE_GEN_DEBUGFS",
+                  "INHERIT",
+                  "base_bindir",
+                  "base_sbindir",
+                  "base_libdir",
+                  "bindir",
+                  "sbindir",
+                  "libdir"
+                  ))
+
+        benv_kernel = BitbakeEnv("virtual/kernel")
+        (self.staging_bindir_toolchain,
+         self.target_prefix,
+         self.target_arch,
+         self.target_kernel_builddir
+        ) = benv_kernel.get_vars(
+             ("STAGING_BINDIR_TOOLCHAIN",
+              "TARGET_PREFIX",
+              "TRANSLATED_TARGET_ARCH",
+              "B"
+            ))
+
+        benv_systemtap = BitbakeEnv("systemtap-native")
+        (self.staging_dir_native
+        ) = benv_systemtap.get_vars(["STAGING_DIR_NATIVE"])
+
+        if self.inherit:
+            if "image-combined-dbg" in self.inherit.split():
+                self.image_combined_dbg = True
+
+    def check(self, sysroot_option):
+        ret = True
+        if self.image_rootfs:
+            sysroot = self.image_rootfs
+            if not os.path.isdir(self.image_rootfs):
+                print("ERROR: Cannot find '" + sysroot +
+                      "' directory. Was '" + self.image + "' image built?")
+                ret = False
+
+        stap = self.staging_dir_native + "/usr/bin/stap"
+        if not os.path.isfile(stap):
+            print("ERROR: Cannot find '" + stap +
+                  "'. Was 'systemtap-native' built?")
+            ret = False
+
+        if not os.path.isdir(self.target_kernel_builddir):
+            print("ERROR: Cannot find '" + self.target_kernel_builddir +
+                  "' directory. Was 'kernel/virtual' built?")
+            ret = False
+
+        if not sysroot_option and self.image_rootfs:
+            dbg_pkgs_found = False
+
+            if self.image_features:
+                image_features = self.image_features.split()
+                if "dbg-pkgs" in image_features:
+                    dbg_pkgs_found = True
+
+            if not dbg_pkgs_found \
+               and not self.image_combined_dbg:
+                print(ParamDiscovery.SYMBOLS_CHECK_MESSAGE % (self.image))
+
+        if not ret:
+            print("")
+
+        return ret
+
+    def __map_systemtap_arch(self):
+        a = self.target_arch
+        ret = a
+        if   re.match('(athlon|x86.64)$', a):
+            ret = 'x86_64'
+        elif re.match('i.86$', a):
+            ret = 'i386'
+        elif re.match('arm$', a):
+            ret = 'arm'
+        elif re.match('aarch64$', a):
+            ret = 'arm64'
+        elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a):
+            ret = 'mips'
+        elif re.match('p(pc|owerpc)(|64)', a):
+            ret = 'powerpc'
+        return ret
+
+    def fill_stap(self, stap):
+        stap.stap = self.staging_dir_native + "/usr/bin/stap"
+        if not stap.sysroot:
+            if self.image_rootfs:
+                if self.image_combined_dbg:
+                    stap.sysroot = self.image_rootfs + "-dbg"
+                else:
+                    stap.sysroot = self.image_rootfs
+        stap.runtime = self.staging_dir_native + "/usr/share/systemtap/runtime"
+        stap.tapset = self.staging_dir_native + "/usr/share/systemtap/tapset"
+        stap.arch = self.__map_systemtap_arch()
+        stap.cross_compile = self.staging_bindir_toolchain + "/" + \
+                             self.target_prefix
+        stap.kernel_release = self.target_kernel_builddir
+
+        # do we have standard that tells in which order these need to appear
+        target_path = []
+        if self.sbindir:
+            target_path.append(self.sbindir)
+        if self.bindir:
+            target_path.append(self.bindir)
+        if self.base_sbindir:
+            target_path.append(self.base_sbindir)
+        if self.base_bindir:
+            target_path.append(self.base_bindir)
+        stap.target_path = ":".join(target_path)
+
+        target_ld_library_path = []
+        if self.libdir:
+            target_ld_library_path.append(self.libdir)
+        if self.base_libdir:
+            target_ld_library_path.append(self.base_libdir)
+        stap.target_ld_library_path = ":".join(target_ld_library_path)
+
+
+def main():
+    usage = """usage: %prog -s <systemtap-script> [options] [-- [systemtap options]]
+
+%prog cross compile given SystemTap script against given image, kernel
+
+It needs to run in environtment set for bitbake - it uses bitbake -e
+invocations to retrieve information to construct proper stap cross build
+invocation arguments. It assumes that systemtap-native is built in given
+bitbake workspace.
+
+Anything after -- option is passed directly to stap.
+
+Legacy script invocation style supported but depreciated:
+  %prog <user@hostname> <sytemtap-script> [systemtap options]
+
+To enable most out of systemtap the following site.conf or local.conf
+configuration is recommended:
+
+# enables symbol + target binaries rootfs-dbg in workspace
+IMAGE_GEN_DEBUGFS = "1"
+IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
+USER_CLASSES += "image-combined-dbg"
+
+# enables kernel debug symbols
+KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
+
+# minimal, just run-time systemtap configuration in target image
+PACKAGECONFIG_pn-systemtap = "monitor"
+
+# add systemtap run-time into target image if it is not there yet
+IMAGE_INSTALL_append = " systemtap"
+"""
+    option_parser = optparse.OptionParser(usage=usage)
+
+    option_parser.add_option("-s", "--script", dest="script",
+                             help="specify input script FILE name",
+                             metavar="FILE")
+
+    option_parser.add_option("-i", "--image", dest="image",
+                             help="specify image name for which script should be compiled")
+
+    option_parser.add_option("-r", "--remote", dest="remote",
+                             help="specify username@hostname of remote target to run script "
+                             "optional, it assumes that remote target can be accessed through ssh")
+
+    option_parser.add_option("-m", "--module", dest="module",
+                             help="specify module name, optional, has effect only if --remote is not used, "
+                             "if not specified module name will be derived from passed script name")
+
+    option_parser.add_option("-y", "--sysroot", dest="sysroot",
+                             help="explicitely specify image sysroot location. May need to use it in case "
+                             "when IMAGE_GEN_DEBUGFS=\"1\" option is used and recombined with symbols "
+                             "in different location",
+                             metavar="DIR")
+
+    option_parser.add_option("-o", "--out", dest="out",
+                             action="store_true",
+                             help="output shell script that equvivalent invocation of this script with "
+                             "given set of arguments, in given bitbake environment. It could be stored in "
+                             "separate shell script and could be repeated without incuring bitbake -e "
+                             "invocation overhead",
+                             default=False)
+
+    option_parser.add_option("-d", "--debug", dest="debug",
+                             action="store_true",
+                             help="enable debug output. Use this option to see resulting stap invocation",
+                             default=False)
+
+    # is invocation follow syntax from orignal crosstap shell script
+    legacy_args = False
+
+    # check if we called the legacy way
+    if len(sys.argv) >= 3:
+        if sys.argv[1].find("@") != -1 and os.path.exists(sys.argv[2]):
+            legacy_args = True
+
+            # fill options values for legacy invocation case
+            options = optparse.Values
+            options.script = sys.argv[2]
+            options.remote = sys.argv[1]
+            options.image = None
+            options.module = None
+            options.sysroot = None
+            options.out = None
+            options.debug = None
+            remaining_args = sys.argv[3:]
+
+    if not legacy_args:
+        (options, remaining_args) = option_parser.parse_args()
+
+    if not options.script or not os.path.exists(options.script):
+        print("'-s FILE' option is missing\n")
+        option_parser.print_help()
+    else:
+        stap = Stap(options.script, options.module, options.remote)
+        discovery = ParamDiscovery(options.image)
+        discovery.discover()
+        if not discovery.check(options.sysroot):
+            option_parser.print_help()
+        else:
+            stap.sysroot = options.sysroot
+            discovery.fill_stap(stap)
+
+            if options.out:
+                stap.display_command(remaining_args)
+            else:
+                cmd = stap.command(remaining_args)
+                env = stap.environment()
+
+                if options.debug:
+                    print(" ".join(cmd))
+
+                os.execve(cmd[0], cmd, env)
+
+main()
diff --git a/import-layers/yocto-poky/scripts/devtool b/import-layers/yocto-poky/scripts/devtool
index 5292f18..d681a19 100755
--- a/import-layers/yocto-poky/scripts/devtool
+++ b/import-layers/yocto-poky/scripts/devtool
@@ -113,22 +113,30 @@
     externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-([^ =]+))? *= *"([^"]*)"$')
     for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')):
         with open(fn, 'r') as f:
+            pnvalues = {}
             for line in f:
                 res = externalsrc_re.match(line.rstrip())
                 if res:
-                    pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+                    recipepn = os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+                    pn = res.group(2) or recipepn
                     # Find the recipe file within the workspace, if any
                     bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*')
                     recipefile = glob.glob(os.path.join(config.workspace_path,
                                                         'recipes',
-                                                        pn,
+                                                        recipepn,
                                                         bbfile))
                     if recipefile:
                         recipefile = recipefile[0]
-                    workspace[pn] = {'srctree': res.group(3),
-                                     'bbappend': fn,
-                                     'recipefile': recipefile}
-                    logger.debug('Found recipe %s' % workspace[pn])
+                    pnvalues['srctree'] = res.group(3)
+                    pnvalues['bbappend'] = fn
+                    pnvalues['recipefile'] = recipefile
+                elif line.startswith('# srctreebase: '):
+                    pnvalues['srctreebase'] = line.split(':', 1)[1].strip()
+            if pnvalues:
+                if not pnvalues.get('srctreebase', None):
+                    pnvalues['srctreebase'] = pnvalues['srctree']
+                logger.debug('Found recipe %s' % pnvalues)
+                workspace[pn] = pnvalues
 
 def create_workspace(args, config, basepath, workspace):
     if args.layerpath:
@@ -157,6 +165,7 @@
             f.write('BBFILE_PATTERN_workspacelayer = "^$' + '{LAYERDIR}/"\n')
             f.write('BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1"\n')
             f.write('BBFILE_PRIORITY_workspacelayer = "99"\n')
+            f.write('LAYERSERIES_COMPAT_workspacelayer = "${LAYERSERIES_COMPAT_core}"\n')
         # Add a README file
         with open(os.path.join(workspacedir, 'README'), 'w') as f:
             f.write('This layer was created by the OpenEmbedded devtool utility in order to\n')
@@ -182,7 +191,11 @@
     if not os.path.exists(bblayers_conf):
         logger.error('Unable to find bblayers.conf')
         return
-    _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, config.workspace_path)
+    if os.path.abspath(workspacedir) != os.path.abspath(config.workspace_path):
+        removedir = config.workspace_path
+    else:
+        removedir = None
+    _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, removedir)
     if added:
         logger.info('Enabling workspace layer in bblayers.conf')
     if config.workspace_path != workspacedir:
diff --git a/import-layers/yocto-poky/scripts/distro/build-recipe-list.py b/import-layers/yocto-poky/scripts/distro/build-recipe-list.py
new file mode 100755
index 0000000..2162764
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/distro/build-recipe-list.py
@@ -0,0 +1,129 @@
+#!/usr/bin/env python3
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope 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.
+#
+
+import os
+import shutil
+import csv
+import sys
+import argparse
+
+__version__ = "0.1.0"
+
+# set of BPNs
+recipenames = set()
+# map of recipe -> data
+allrecipes = {}
+
+def make_bpn(recipe):
+    prefixes = ("nativesdk-",)
+    suffixes = ("-native", "-cross", "-initial", "-intermediate", "-crosssdk", "-cross-canadian")
+    for ix in prefixes + suffixes:
+        if ix in recipe:
+            recipe = recipe.replace(ix, "")
+    return recipe
+
+def gather_recipes(rows):
+    for row in rows:
+        recipe = row[0]
+        bpn = make_bpn(recipe)
+        if bpn not in recipenames:
+            recipenames.add(bpn)
+        if recipe not in allrecipes:
+            allrecipes[recipe] = row
+
+def generate_recipe_list():
+    # machine list
+    machine_list = ( "qemuarm64", "qemuarm", "qemumips64", "qemumips", "qemuppc", "qemux86-64", "qemux86" )
+    # set filename format
+    fnformat = 'distrodata.%s.csv'
+
+    # store all data files in distrodata
+    datadir = 'distrodata'
+
+    # create the directory if it does not exists
+    if not os.path.exists(datadir):
+        os.mkdir(datadir)
+
+    # doing bitbake distrodata
+    for machine in machine_list:
+        os.system('MACHINE='+ machine + ' bitbake -k universe -c distrodata')
+        shutil.copy('tmp/log/distrodata.csv', 'distrodata/' + fnformat % machine)
+
+    for machine in machine_list:
+        with open('distrodata/' + fnformat % machine) as f:
+            reader = csv.reader(f)
+            rows = reader.__iter__()
+            gather_recipes(rows)
+
+    with open('recipe-list.txt', 'w') as f:
+        for recipe in sorted(recipenames):
+            f.write("%s\n" % recipe)
+    print("file : recipe-list.txt is created with %d entries." % len(recipenames))
+
+    with open('all-recipe-list.txt', 'w') as f:
+        for recipe, row in sorted(allrecipes.items()):
+            f.write("%s\n" % ','.join(row))
+
+
+def diff_for_new_recipes(recipe1, recipe2):
+    prev_recipe_path = recipe1 + '/'
+    curr_recipe_path = recipe2 + '/'
+    if not os.path.isfile(prev_recipe_path + 'recipe-list.txt') or not os.path.isfile(curr_recipe_path + 'recipe-list.txt'):
+        print("recipe files do not exists. please verify that the file exists.")
+        exit(1)
+
+    import csv
+
+    prev = []
+    new = []
+
+    with open(prev_recipe_path + 'recipe-list.txt') as f:
+        prev = f.readlines()
+
+    with open(curr_recipe_path + 'recipe-list.txt') as f:
+        new = f.readlines()
+
+    updates = []
+    for pn in new:
+        if not pn in prev:
+            updates.append(pn.rstrip())
+
+    allrecipe = []
+    with open(recipe1 + '_' + recipe2 + '_new_recipe_list.txt','w') as dr:
+        with open(curr_recipe_path + 'all-recipe-list.txt') as f:
+            reader = csv.reader(f, delimiter=',')
+            for row in reader:
+                if row[0] in updates:
+                    dr.write("%s,%s,%s" % (row[0], row[3], row[5]))
+                    if len(row[9:]) > 0:
+                        dr.write(",%s" % ','.join(row[9:]))
+                    dr.write("\n")
+
+def main(argv):
+    if argv[0] == "generate_recipe_list":
+        generate_recipe_list()
+    elif argv[0] == "compare_recipe":
+        diff_for_new_recipes(argv[1], argv[2])
+    else:
+        print("no such option. choose either 'generate_recipe_list' or 'compare_recipe'")
+
+    exit(0)
+
+if __name__ == "__main__":
+    try:
+        sys.exit(main(sys.argv[1:]))
+    except Exception as e:
+        print("Exception :", e)
+        sys.exit(1)
+
diff --git a/import-layers/yocto-poky/scripts/distro/distrocompare.sh b/import-layers/yocto-poky/scripts/distro/distrocompare.sh
new file mode 100755
index 0000000..908760c
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/distro/distrocompare.sh
@@ -0,0 +1,123 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2017, Intel Corporation.
+# All rights reserved.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# distrocompare.sh : provides capability to get a list of new packages
+#                    based on two distinct branches. This script takes
+#                    2 parameters; either a commit-ish or a branch name
+#
+#                    To run : distrocompare.sh <older hash> <newer hash>
+#                    E.g. distrocompare.sh morty 92aa0e7
+#                    E.g. distrocompare.sh morty pyro
+#
+
+# get input as version
+previous_version=$1
+current_version=$2
+
+# set previous and current version
+if [ -z "$2" ]; then
+    previous_version=$1
+    current_version="current"
+fi
+
+# get script location. That's where the source supposedly located as well.
+scriptdir="$( realpath $(dirname "${BASH_SOURCE[0]}" ))"
+sourcedir="$( realpath $scriptdir/../.. )"
+
+# create working directory
+workdir=$(mktemp -d)
+
+# prepare to rollback to the branch if not similar
+branch=`cd $sourcedir; git branch | grep \* | cut -d ' ' -f2`
+
+# set current workdir to store final result
+currentworkdir=`pwd`
+
+# persists the file after local repo change
+cp $scriptdir/build-recipe-list.py $workdir
+
+#==================================================================
+
+function bake_distrodata {
+    # get to source directory of the git
+    cd $sourcedir
+
+    # change the branch / commit. Do not change if input is current
+    if [ "$1" != "current" ]; then
+        output=$(git checkout $1 2>&1)
+
+        # exit if git fails
+        if [[ $output == *"error"* ]]; then
+            echo "git error : $output"
+            echo "exiting ... "
+            rm -rf $workdir
+            exit
+        fi
+    fi
+
+    # make tmp as workdir
+    cd $workdir
+
+    # source oe-init to generate a new build folder
+    source $sourcedir/oe-init-build-env $1
+
+    # if file already exists with distrodata, do not append
+    if ! grep -q "distrodata" "conf/local.conf"; then
+        # add inherit distrodata to local.conf to enable distrodata feature
+        echo 'INHERIT += "distrodata"' >> conf/local.conf
+    fi
+
+    # use from tmp
+    $workdir/build-recipe-list.py generate_recipe_list
+}
+
+bake_distrodata $previous_version
+bake_distrodata $current_version
+
+#==================================================================
+
+cd $workdir
+
+# compare the 2 generated recipe-list.txt
+$workdir/build-recipe-list.py compare_recipe $previous_version $current_version
+
+# copy final result to current working directory
+cp $workdir/*_new_recipe_list.txt $currentworkdir
+
+if [ $? -ne 0 ]; then
+    rm -rf $workdir/$previous_version
+    rm -rf $workdir/$current_version
+    rm $workdir/build-recipe-list.py
+    # preserve the result in /tmp/distrodata if fail to copy the result over
+    exit
+fi
+
+# cleanup
+rm -rf $workdir
+
+# perform rollback branch
+cd $sourcedir
+currentbranch=`git branch | grep \* | cut -d ' ' -f2`
+if [ "$currentbranch" != "$branch" ]; then
+    git checkout $branch
+fi
+
+cd $currentworkdir
+
+#==================================================================
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/__init__.py b/import-layers/yocto-poky/scripts/lib/bsp/__init__.py
deleted file mode 100644
index 8bbb6e1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Yocto BSP tools library
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/engine.py b/import-layers/yocto-poky/scripts/lib/bsp/engine.py
deleted file mode 100644
index 07a15bb..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/engine.py
+++ /dev/null
@@ -1,1931 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# DESCRIPTION
-# This module implements the templating engine used by 'yocto-bsp' to
-# create BSPs.  The BSP templates are simply the set of files expected
-# to appear in a generated BSP, marked up with a small set of tags
-# used to customize the output.  The engine parses through the
-# templates and generates a Python program containing all the logic
-# and input elements needed to display and retrieve BSP-specific
-# information from the user.  The resulting program uses those results
-# to generate the final BSP files.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import os
-import sys
-from abc import ABCMeta, abstractmethod
-from .tags import *
-import shlex
-import json
-import subprocess
-import shutil
-
-class Line(metaclass=ABCMeta):
-    """
-    Generic (abstract) container representing a line that will appear
-    in the BSP-generating program.
-    """
-
-    def __init__(self, line):
-        self.line = line
-        self.generated_line = ""
-        self.prio = sys.maxsize
-        self.discard = False
-
-    @abstractmethod
-    def gen(self, context = None):
-        """
-        Generate the final executable line that will appear in the
-        BSP-generation program.
-        """
-        pass
-
-    def escape(self, line):
-        """
-        Escape single and double quotes and backslashes until I find
-        something better (re.escape() escapes way too much).
-        """
-        return line.replace("\\", "\\\\").replace("\"", "\\\"").replace("'", "\\'")
-
-    def parse_error(self, msg, lineno, line):
-         raise SyntaxError("%s: %s" % (msg, line))
-
-
-class NormalLine(Line):
-    """
-    Container for normal (non-tag) lines.
-    """
-    def __init__(self, line):
-        Line.__init__(self, line)
-        self.is_filename = False
-        self.is_dirname = False
-        self.out_filebase = None
-
-    def gen(self, context = None):
-        if self.is_filename:
-            line = "current_file = \"" + os.path.join(self.out_filebase, self.escape(self.line)) + "\"; of = open(current_file, \"w\")"
-        elif self.is_dirname:
-            dirname = os.path.join(self.out_filebase, self.escape(self.line))
-            line = "if not os.path.exists(\"" + dirname + "\"): os.mkdir(\"" + dirname + "\")"
-        else:
-            line = "of.write(\"" + self.escape(self.line) + "\\n\")"
-        return line
-
-
-class CodeLine(Line):
-    """
-    Container for Python code tag lines.
-    """
-    def __init__(self, line):
-        Line.__init__(self, line)
-
-    def gen(self, context = None):
-        return self.line
-
-
-class Assignment:
-    """
-    Representation of everything we know about {{=name }} tags.
-    Instances of these are used by Assignment lines.
-    """
-    def __init__(self, start, end, name):
-        self.start = start
-        self.end = end
-        self.name = name
-
-
-class AssignmentLine(NormalLine):
-    """
-    Container for normal lines containing assignment tags.  Assignment
-    tags must be in ascending order of 'start' value.
-    """
-    def __init__(self, line):
-        NormalLine.__init__(self, line)
-        self.assignments = []
-
-    def add_assignment(self, start, end, name):
-        self.assignments.append(Assignment(start, end, name))
-
-    def gen(self, context = None):
-        line = self.escape(self.line)
-
-        for assignment in self.assignments:
-            replacement = "\" + " + assignment.name + " + \""
-            idx = line.find(ASSIGN_TAG)
-            line = line[:idx] + replacement + line[idx + assignment.end - assignment.start:]
-        if self.is_filename:
-            return "current_file = \"" + os.path.join(self.out_filebase, line) + "\"; of = open(current_file, \"w\")"
-        elif self.is_dirname:
-            dirname = os.path.join(self.out_filebase, line)
-            return "if not os.path.exists(\"" + dirname + "\"): os.mkdir(\"" + dirname + "\")"
-        else:
-            return "of.write(\"" + line + "\\n\")"
-
-
-class InputLine(Line):
-    """
-    Base class for Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        Line.__init__(self, tag)
-        self.props = props
-        self.lineno = lineno
-
-        try:
-            self.prio = int(props["prio"])
-        except KeyError:
-            self.prio = sys.maxsize
-
-    def gen(self, context = None):
-        try:
-            depends_on = self.props["depends-on"]
-            try:
-                depends_on_val = self.props["depends-on-val"]
-            except KeyError:
-                self.parse_error("No 'depends-on-val' for 'depends-on' property",
-                                 self.lineno, self.line)
-        except KeyError:
-            pass
-
-
-class EditBoxInputLine(InputLine):
-    """
-    Base class for 'editbox' Input lines.
-
-    props:
-        name: example - "Load address"
-        msg: example - "Please enter the load address"
-    result:
-        Sets the value of the variable specified by 'name' to
-        whatever the user typed.
-    """
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = default(input(\"" + msg + " \"), " + name + ")"
-
-        return line
-
-
-class GitRepoEditBoxInputLine(EditBoxInputLine):
-    """
-    Base class for 'editbox' Input lines for user input of remote git
-    repos.  This class verifies the existence and connectivity of the
-    specified git repo.
-
-    props:
-        name: example - "Load address"
-        msg: example - "Please enter the load address"
-    result:
-        Sets the value of the variable specified by 'name' to
-        whatever the user typed.
-    """
-    def __init__(self, props, tag, lineno):
-        EditBoxInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        EditBoxInputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = get_verified_git_repo(\"" + msg + "\"," + name + ")"
-
-        return line
-
-
-class FileEditBoxInputLine(EditBoxInputLine):
-    """
-    Base class for 'editbox' Input lines for user input of existing
-    files.  This class verifies the existence of the specified file.
-
-    props:
-        name: example - "Load address"
-        msg: example - "Please enter the load address"
-    result:
-        Sets the value of the variable specified by 'name' to
-        whatever the user typed.
-    """
-    def __init__(self, props, tag, lineno):
-        EditBoxInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        EditBoxInputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = get_verified_file(\"" + msg + "\"," + name + ", True)"
-
-        return line
-
-
-class BooleanInputLine(InputLine):
-    """
-    Base class for boolean Input lines.
-    props:
-        name: example - "keyboard"
-        msg:  example - "Got keyboard?"
-    result:
-        Sets the value of the variable specified by 'name' to "yes" or "no"
-        example - keyboard = "yes"
-    """
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-        name = self.props["name"]
-        if not name:
-            self.parse_error("No input 'name' property found",
-                             self.lineno, self.line)
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        line = name + " = boolean(input(\"" + msg + " \"), " + name + ")"
-
-        return line
-
-
-class ListInputLine(InputLine, metaclass=ABCMeta):
-    """
-    Base class for List-based Input lines. e.g. Choicelist, Checklist.
-    """
-
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-        self.choices = []
-
-    def gen_choicepair_list(self):
-        """Generate a list of 2-item val:desc lists from self.choices."""
-        if not self.choices:
-            return None
-
-        choicepair_list = list()
-
-        for choice in self.choices:
-            choicepair = []
-            choicepair.append(choice.val)
-            choicepair.append(choice.desc)
-            choicepair_list.append(choicepair)
-
-        return choicepair_list
-
-    def gen_degenerate_choicepair_list(self, choices):
-        """Generate a list of 2-item val:desc with val=desc from passed-in choices."""
-        choicepair_list = list()
-
-        for choice in choices:
-            choicepair = []
-            choicepair.append(choice)
-            choicepair.append(choice)
-            choicepair_list.append(choicepair)
-
-        return choicepair_list
-
-    def exec_listgen_fn(self, context = None):
-        """
-        Execute the list-generating function contained as a string in
-        the "gen" property.
-        """
-        retval = None
-        try:
-            fname = self.props["gen"]
-            modsplit = fname.split('.')
-            mod_fn = modsplit.pop()
-            mod = '.'.join(modsplit)
-
-            __import__(mod)
-            # python 2.7 has a better way to do this using importlib.import_module
-            m = sys.modules[mod]
-
-            fn = getattr(m, mod_fn)
-            if not fn:
-                self.parse_error("couldn't load function specified for 'gen' property ",
-                                 self.lineno, self.line)
-            retval = fn(context)
-            if not retval:
-                self.parse_error("function specified for 'gen' property returned nothing ",
-                                 self.lineno, self.line)
-        except KeyError:
-            pass
-
-        return retval
-
-    def gen_choices_str(self, choicepairs):
-        """
-        Generate a numbered list of choices from a list of choicepairs
-        for display to the user.
-        """
-        choices_str = ""
-
-        for i, choicepair in enumerate(choicepairs):
-            choices_str += "\t" + str(i + 1) + ") " + choicepair[1] + "\n"
-
-        return choices_str
-
-    def gen_choices_val_str(self, choicepairs):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str().
-        """
-        choices_val_list = "["
-
-        for i, choicepair in enumerate(choicepairs):
-            choices_val_list += "\"" + choicepair[0] + "\","
-        choices_val_list += "]"
-
-        return choices_val_list
-
-    def gen_choices_val_list(self, choicepairs):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str().
-        """
-        choices_val_list = []
-
-        for i, choicepair in enumerate(choicepairs):
-            choices_val_list.append(choicepair[0])
-
-        return choices_val_list
-
-    def gen_choices_list(self, context = None, checklist = False):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str().
-        """
-        choices = self.exec_listgen_fn(context)
-        if choices:
-            if len(choices) == 0:
-                self.parse_error("No entries available for input list",
-                                 self.lineno, self.line)
-            choicepairs = self.gen_degenerate_choicepair_list(choices)
-        else:
-            if len(self.choices) == 0:
-                self.parse_error("No entries available for input list",
-                                 self.lineno, self.line)
-            choicepairs = self.gen_choicepair_list()
-
-        return choicepairs
-
-    def gen_choices(self, context = None, checklist = False):
-        """
-        Generate an array of choice values corresponding to the
-        numbered list generated by gen_choices_str(), display it to
-        the user, and process the result.
-        """
-        msg = self.props["msg"]
-        if not msg:
-            self.parse_error("No input 'msg' property found",
-                             self.lineno, self.line)
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        msg += " [default: " + default_choice + "]"
-
-        choicepairs = self.gen_choices_list(context, checklist)
-
-        choices_str = self.gen_choices_str(choicepairs)
-        choices_val_list = self.gen_choices_val_list(choicepairs)
-        if checklist:
-            choiceval = default(find_choicevals(input(msg + "\n" + choices_str), choices_val_list), default_choice)
-        else:
-            choiceval = default(find_choiceval(input(msg + "\n" + choices_str), choices_val_list), default_choice)
-
-        return choiceval
-
-
-def find_choiceval(choice_str, choice_list):
-    """
-    Take number as string and return val string from choice_list,
-    empty string if oob.  choice_list is a simple python list.
-    """
-    choice_val = ""
-
-    try:
-        choice_idx = int(choice_str)
-        if choice_idx <= len(choice_list):
-            choice_idx -= 1
-            choice_val = choice_list[choice_idx]
-    except ValueError:
-        pass
-
-    return choice_val
-
-
-def find_choicevals(choice_str, choice_list):
-    """
-    Take numbers as space-separated string and return vals list from
-    choice_list, empty list if oob.  choice_list is a simple python
-    list.
-    """
-    choice_vals = []
-
-    choices = choice_str.split()
-    for choice in choices:
-        choice_vals.append(find_choiceval(choice, choice_list))
-
-    return choice_vals
-
-
-def default(input_str, name):
-    """
-    Return default if no input_str, otherwise stripped input_str.
-    """
-    if not input_str:
-        return name
-
-    return input_str.strip()
-
-
-def verify_git_repo(giturl):
-    """
-    Verify that the giturl passed in can be connected to.  This can be
-    used as a check for the existence of the given repo and/or basic
-    git remote connectivity.
-
-    Returns True if the connection was successful, fals otherwise
-    """
-    if not giturl:
-        return False
-
-    gitcmd = "git ls-remote %s > /dev/null 2>&1" % (giturl)
-    rc = subprocess.call(gitcmd, shell=True)
-    if rc == 0:
-        return True
-
-    return False
-
-
-def get_verified_git_repo(input_str, name):
-    """
-    Return git repo if verified, otherwise loop forever asking user
-    for filename.
-    """
-    msg = input_str.strip() + " "
-
-    giturl = default(input(msg), name)
-
-    while True:
-        if verify_git_repo(giturl):
-            return giturl
-        giturl = default(input(msg), name)
-
-
-def get_verified_file(input_str, name, filename_can_be_null):
-    """
-    Return filename if the file exists, otherwise loop forever asking
-    user for filename.
-    """
-    msg = input_str.strip() + " "
-
-    filename = default(input(msg), name)
-
-    while True:
-        if not filename and filename_can_be_null:
-            return filename
-        if os.path.isfile(filename):
-            return filename
-        filename = default(input(msg), name)
-
-
-def replace_file(replace_this, with_this):
-    """
-    Replace the given file with the contents of filename, retaining
-    the original filename.
-    """
-    try:
-        replace_this.close()
-        shutil.copy(with_this, replace_this.name)
-    except IOError:
-        pass
-
-
-def boolean(input_str, name):
-    """
-    Return lowercase version of first char in string, or value in name.
-    """
-    if not input_str:
-        return name
-
-    str = input_str.lower().strip()
-    if str and str[0] == "y" or str[0] == "n":
-        return str[0]
-    else:
-        return name
-
-
-def strip_base(input_str):
-    """
-    strip '/base' off the end of input_str, so we can use 'base' in
-    the branch names we present to the user.
-    """
-    if input_str and input_str.endswith("/base"):
-        return input_str[:-len("/base")]
-    return input_str.strip()
-
-
-deferred_choices = {}
-
-def gen_choices_defer(input_line, context, checklist = False):
-    """
-    Save the context hashed the name of the input item, which will be
-    passed to the gen function later.
-    """
-    name = input_line.props["name"]
-
-    try:
-        nameappend = input_line.props["nameappend"]
-    except KeyError:
-        nameappend = ""
-
-    try:
-        branches_base = input_line.props["branches_base"]
-    except KeyError:
-        branches_base = ""
-
-    filename = input_line.props["filename"]
-
-    closetag_start = filename.find(CLOSE_TAG)
-
-    if closetag_start != -1:
-        filename = filename[closetag_start + len(CLOSE_TAG):]
-
-    filename = filename.strip()
-    filename = os.path.splitext(filename)[0]
-
-    captured_context = capture_context(context)
-    context["filename"] = filename
-    captured_context["filename"] = filename
-    context["nameappend"] = nameappend
-    captured_context["nameappend"] = nameappend
-    context["branches_base"] = branches_base
-    captured_context["branches_base"] = branches_base
-
-    deferred_choice = (input_line, captured_context, checklist)
-    key = name + "_" + filename + "_" + nameappend
-    deferred_choices[key] = deferred_choice
-
-
-def invoke_deferred_choices(name):
-    """
-    Invoke the choice generation function using the context hashed by
-    'name'.
-    """
-    deferred_choice = deferred_choices[name]
-    input_line = deferred_choice[0]
-    context = deferred_choice[1]
-    checklist = deferred_choice[2]
-
-    context["name"] = name
-
-    choices = input_line.gen_choices(context, checklist)
-
-    return choices
-
-
-class ChoicelistInputLine(ListInputLine):
-    """
-    Base class for choicelist Input lines.
-    props:
-        name: example - "xserver_choice"
-        msg:  example - "Please select an xserver for this machine"
-    result:
-        Sets the value of the variable specified by 'name' to whichever Choice was chosen
-        example - xserver_choice = "xserver_vesa"
-    """
-    def __init__(self, props, tag, lineno):
-        ListInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-
-        gen_choices_defer(self, context)
-        name = self.props["name"]
-        nameappend = context["nameappend"]
-        filename = context["filename"]
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        line = name + " = default(invoke_deferred_choices(\"" + name + "_" + filename + "_" + nameappend + "\"), \"" + default_choice + "\")"
-
-        return line
-
-
-class ListValInputLine(InputLine):
-    """
-    Abstract base class for choice and checkbox Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        InputLine.__init__(self, props, tag, lineno)
-
-        try:
-            self.val = self.props["val"]
-        except KeyError:
-            self.parse_error("No input 'val' property found", self.lineno, self.line)
-
-        try:
-            self.desc = self.props["msg"]
-        except KeyError:
-            self.parse_error("No input 'msg' property found", self.lineno, self.line)
-
-
-class ChoiceInputLine(ListValInputLine):
-    """
-    Base class for choicelist item Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        ListValInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        return None
-
-
-class ChecklistInputLine(ListInputLine):
-    """
-    Base class for checklist Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        ListInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        InputLine.gen(self, context)
-
-        gen_choices_defer(self, context, True)
-        name = self.props["name"]
-        nameappend = context["nameappend"]
-        filename = context["filename"]
-
-        try:
-            default_choice = self.props["default"]
-        except KeyError:
-            default_choice = ""
-
-        line = name + " = default(invoke_deferred_choices(\"" + name + "_" + filename + "_" + nameappend + "\"), \"" + default_choice + "\")"
-
-        return line
-
-
-class CheckInputLine(ListValInputLine):
-    """
-    Base class for checklist item Input lines.
-    """
-    def __init__(self, props, tag, lineno):
-        ListValInputLine.__init__(self, props, tag, lineno)
-
-    def gen(self, context = None):
-        return None
-
-
-dirname_substitutions = {}
-
-class SubstrateBase(object):
-    """
-    Base class for both expanded and unexpanded file and dir container
-    objects.
-    """
-    def __init__(self, filename, filebase, out_filebase):
-        self.filename = filename
-        self.filebase = filebase
-        self.translated_filename = filename
-        self.out_filebase = out_filebase
-        self.raw_lines = []
-        self.expanded_lines = []
-        self.prev_choicelist = None
-
-    def parse_error(self, msg, lineno, line):
-         raise SyntaxError("%s: [%s: %d]: %s" % (msg, self.filename, lineno, line))
-
-    def expand_input_tag(self, tag, lineno):
-        """
-        Input tags consist of the word 'input' at the beginning,
-        followed by name:value property pairs which are converted into
-        a dictionary.
-        """
-        propstr = tag[len(INPUT_TAG):]
-
-        props = dict(prop.split(":", 1) for prop in shlex.split(propstr))
-        props["filename"] = self.filename
-
-        input_type = props[INPUT_TYPE_PROPERTY]
-        if not props[INPUT_TYPE_PROPERTY]:
-            self.parse_error("No input 'type' property found", lineno, tag)
-
-        if input_type == "boolean":
-            return BooleanInputLine(props, tag, lineno)
-        if input_type == "edit":
-            return EditBoxInputLine(props, tag, lineno)
-        if input_type == "edit-git-repo":
-            return GitRepoEditBoxInputLine(props, tag, lineno)
-        if input_type == "edit-file":
-            return FileEditBoxInputLine(props, tag, lineno)
-        elif input_type == "choicelist":
-            self.prev_choicelist = ChoicelistInputLine(props, tag, lineno)
-            return self.prev_choicelist
-        elif input_type == "choice":
-            if not self.prev_choicelist:
-                self.parse_error("Found 'choice' input tag but no previous choicelist",
-                                 lineno, tag)
-            choice = ChoiceInputLine(props, tag, lineno)
-            self.prev_choicelist.choices.append(choice)
-            return choice
-        elif input_type == "checklist":
-            return ChecklistInputLine(props, tag, lineno)
-        elif input_type == "check":
-            return CheckInputLine(props, tag, lineno)
-
-    def expand_assignment_tag(self, start, line, lineno):
-        """
-        Expand all tags in a line.
-        """
-        expanded_line = AssignmentLine(line.rstrip())
-
-        while start != -1:
-            end = line.find(CLOSE_TAG, start)
-            if end == -1:
-                self.parse_error("No close tag found for assignment tag", lineno, line)
-            else:
-                name = line[start + len(ASSIGN_TAG):end].strip()
-                expanded_line.add_assignment(start, end + len(CLOSE_TAG), name)
-                start = line.find(ASSIGN_TAG, end)
-
-        return expanded_line
-
-    def expand_tag(self, line, lineno):
-        """
-        Returns a processed tag line, or None if there was no tag
-
-        The rules for tags are very simple:
-            - No nested tags
-            - Tags start with {{ and end with }}
-            - An assign tag, {{=, can appear anywhere and will
-              be replaced with what the assignment evaluates to
-            - Any other tag occupies the whole line it is on
-                - if there's anything else on the tag line, it's an error
-                - if it starts with 'input', it's an input tag and
-                  will only be used for prompting and setting variables
-                - anything else is straight Python
-                - tags are in effect only until the next blank line or tag or 'pass' tag
-                - we don't have indentation in tags, but we need some way to end a block
-                  forcefully without blank lines or other tags - that's the 'pass' tag
-                - todo: implement pass tag
-                - directories and filenames can have tags as well, but only assignment
-                  and 'if' code lines
-                - directories and filenames are the only case where normal tags can
-                  coexist with normal text on the same 'line'
-        """
-        start = line.find(ASSIGN_TAG)
-        if start != -1:
-            return self.expand_assignment_tag(start, line, lineno)
-
-        start = line.find(OPEN_TAG)
-        if start == -1:
-            return None
-
-        end = line.find(CLOSE_TAG, 0)
-        if end == -1:
-             self.parse_error("No close tag found for open tag", lineno, line)
-
-        tag = line[start + len(OPEN_TAG):end].strip()
-
-        if not tag.lstrip().startswith(INPUT_TAG):
-            return CodeLine(tag)
-
-        return self.expand_input_tag(tag, lineno)
-
-    def append_translated_filename(self, filename):
-        """
-        Simply append filename to translated_filename
-        """
-        self.translated_filename = os.path.join(self.translated_filename, filename)
-
-    def get_substituted_file_or_dir_name(self, first_line, tag):
-        """
-        If file or dir names contain name substitutions, return the name
-        to substitute.  Note that this is just the file or dirname and
-        doesn't include the path.
-        """
-        filename = first_line.find(tag)
-        if filename != -1:
-            filename += len(tag)
-        substituted_filename = first_line[filename:].strip()
-        this = substituted_filename.find(" this")
-        if this != -1:
-            head, tail = os.path.split(self.filename)
-            substituted_filename = substituted_filename[:this + 1] + tail
-            if tag == DIRNAME_TAG: # get rid of .noinstall in dirname
-                substituted_filename = substituted_filename.split('.')[0]
-
-        return substituted_filename
-
-    def get_substituted_filename(self, first_line):
-        """
-        If a filename contains a name substitution, return the name to
-        substitute.  Note that this is just the filename and doesn't
-        include the path.
-        """
-        return self.get_substituted_file_or_dir_name(first_line, FILENAME_TAG)
-
-    def get_substituted_dirname(self, first_line):
-        """
-        If a dirname contains a name substitution, return the name to
-        substitute.  Note that this is just the dirname and doesn't
-        include the path.
-        """
-        return self.get_substituted_file_or_dir_name(first_line, DIRNAME_TAG)
-
-    def substitute_filename(self, first_line):
-        """
-        Find the filename in first_line and append it to translated_filename.
-        """
-        substituted_filename = self.get_substituted_filename(first_line)
-        self.append_translated_filename(substituted_filename);
-
-    def substitute_dirname(self, first_line):
-        """
-        Find the dirname in first_line and append it to translated_filename.
-        """
-        substituted_dirname = self.get_substituted_dirname(first_line)
-        self.append_translated_filename(substituted_dirname);
-
-    def is_filename_substitution(self, line):
-        """
-        Do we have a filename subustition?
-        """
-        if line.find(FILENAME_TAG) != -1:
-            return True
-        return False
-
-    def is_dirname_substitution(self, line):
-        """
-        Do we have a dirname subustition?
-        """
-        if line.find(DIRNAME_TAG) != -1:
-            return True
-        return False
-
-    def translate_dirname(self, first_line):
-        """
-        Just save the first_line mapped by filename.  The later pass
-        through the directories will look for a dirname.noinstall
-        match and grab the substitution line.
-        """
-        dirname_substitutions[self.filename] = first_line
-
-    def translate_dirnames_in_path(self, path):
-        """
-        Translate dirnames below this file or dir, not including tail.
-        dirname_substititions is keyed on actual untranslated filenames.
-        translated_path contains the subsititutions for each element.
-        """
-        remainder = path[len(self.filebase)+1:]
-        translated_path = untranslated_path = self.filebase
-
-        untranslated_dirs = remainder.split(os.sep)
-
-        for dir in untranslated_dirs:
-            key = os.path.join(untranslated_path, dir + '.noinstall')
-            try:
-                first_line = dirname_substitutions[key]
-            except KeyError:
-                translated_path = os.path.join(translated_path, dir)
-                untranslated_path = os.path.join(untranslated_path, dir)
-                continue
-            substituted_dir = self.get_substituted_dirname(first_line)
-            translated_path = os.path.join(translated_path, substituted_dir)
-            untranslated_path = os.path.join(untranslated_path, dir)
-
-        return translated_path
-
-    def translate_file_or_dir_name(self):
-        """
-        Originally we were allowed to use open/close/assign tags and python
-        code in the filename, which fit in nicely with the way we
-        processed the templates and generated code.  Now that we can't
-        do that, we make those tags proper file contents and have this
-        pass substitute the nice but non-functional names with those
-        'strange' ones, and then proceed as usual.
-
-        So, if files or matching dir<.noinstall> files contain
-        filename substitutions, this function translates them into the
-        corresponding 'strange' names, which future passes will expand
-        as they always have.  The resulting pathname is kept in the
-        file or directory's translated_filename.  Another way to think
-        about it is that self.filename is the input filename, and
-        translated_filename is the output filename before expansion.
-        """
-        # remove leaf file or dirname
-        head, tail = os.path.split(self.filename)
-        translated_path = self.translate_dirnames_in_path(head)
-        self.translated_filename = translated_path
-
-        # This is a dirname - does it have a matching .noinstall with
-        # a substitution?  If so, apply the dirname subsititution.
-        if not os.path.isfile(self.filename):
-            key = self.filename + ".noinstall"
-            try:
-                first_line = dirname_substitutions[key]
-            except KeyError:
-                self.append_translated_filename(tail)
-                return
-            self.substitute_dirname(first_line)
-            return
-
-        f = open(self.filename)
-        first_line = f.readline()
-        f.close()
-
-        # This is a normal filename not needing translation, just use
-        # it as-is.
-        if not first_line or not first_line.startswith("#"):
-            self.append_translated_filename(tail)
-            return
-
-        # If we have a filename substitution (first line in the file
-        # is a FILENAME_TAG line) do the substitution now.  If we have
-        # a dirname substitution (DIRNAME_TAG in dirname.noinstall
-        # meta-file), hash it so we can apply it when we see the
-        # matching dirname later.  Otherwise we have a regular
-        # filename, just use it as-is.
-        if self.is_filename_substitution(first_line):
-            self.substitute_filename(first_line)
-        elif self.is_dirname_substitution(first_line):
-            self.translate_dirname(first_line)
-        else:
-            self.append_translated_filename(tail)
-
-    def expand_file_or_dir_name(self):
-        """
-        Expand file or dir names into codeline.  Dirnames and
-        filenames can only have assignments or if statements.  First
-        translate if statements into CodeLine + (dirname or filename
-        creation).
-        """
-        lineno = 0
-
-        line = self.translated_filename[len(self.filebase):]
-        if line.startswith("/"):
-            line = line[1:]
-        opentag_start = -1
-
-        start = line.find(OPEN_TAG)
-        while start != -1:
-            if not line[start:].startswith(ASSIGN_TAG):
-                opentag_start = start
-                break
-            start += len(ASSIGN_TAG)
-            start = line.find(OPEN_TAG, start)
-
-        if opentag_start != -1:
-            end = line.find(CLOSE_TAG, opentag_start)
-            if end == -1:
-                self.parse_error("No close tag found for open tag", lineno, line)
-            # we have a {{ tag i.e. code
-            tag = line[opentag_start + len(OPEN_TAG):end].strip()
-            if not tag.lstrip().startswith(IF_TAG):
-                self.parse_error("Only 'if' tags are allowed in file or directory names",
-                                 lineno, line)
-            self.expanded_lines.append(CodeLine(tag))
-
-            # everything after }} is the actual filename (possibly with assignments)
-            # everything before is the pathname
-            line = line[:opentag_start] + line[end + len(CLOSE_TAG):].strip()
-
-        assign_start = line.find(ASSIGN_TAG)
-        if assign_start != -1:
-            assignment_tag = self.expand_assignment_tag(assign_start, line, lineno)
-            if isinstance(self, SubstrateFile):
-                assignment_tag.is_filename = True
-                assignment_tag.out_filebase = self.out_filebase
-            elif isinstance(self, SubstrateDir):
-                assignment_tag.is_dirname = True
-                assignment_tag.out_filebase = self.out_filebase
-            self.expanded_lines.append(assignment_tag)
-            return
-
-        normal_line = NormalLine(line)
-        if isinstance(self, SubstrateFile):
-            normal_line.is_filename = True
-            normal_line.out_filebase = self.out_filebase
-        elif isinstance(self, SubstrateDir):
-            normal_line.is_dirname = True
-            normal_line.out_filebase = self.out_filebase
-        self.expanded_lines.append(normal_line)
-
-    def expand(self):
-        """
-        Expand the file or dir name first, eventually this ends up
-        creating the file or dir.
-        """
-        self.translate_file_or_dir_name()
-        self.expand_file_or_dir_name()
-
-
-class SubstrateFile(SubstrateBase):
-    """
-    Container for both expanded and unexpanded substrate files.
-    """
-    def __init__(self, filename, filebase, out_filebase):
-        SubstrateBase.__init__(self, filename, filebase, out_filebase)
-
-    def read(self):
-        if self.raw_lines:
-            return
-        f = open(self.filename)
-        self.raw_lines = f.readlines()
-
-    def expand(self):
-        """Expand the contents of all template tags in the file."""
-        SubstrateBase.expand(self)
-        self.read()
-
-        for lineno, line in enumerate(self.raw_lines):
-            # only first line can be a filename substitition
-            if lineno == 0 and line.startswith("#") and FILENAME_TAG in line:
-                continue # skip it - we've already expanded it
-            expanded_line = self.expand_tag(line, lineno + 1) # humans not 0-based
-            if not expanded_line:
-                expanded_line = NormalLine(line.rstrip())
-            self.expanded_lines.append(expanded_line)
-
-    def gen(self, context = None):
-        """Generate the code that generates the BSP."""
-        base_indent = 0
-
-        indent = new_indent = base_indent
-
-        for line in self.expanded_lines:
-            genline = line.gen(context)
-            if not genline:
-                continue
-            if isinstance(line, InputLine):
-                line.generated_line = genline
-                continue
-            if genline.startswith(OPEN_START):
-                if indent == 1:
-                    base_indent = 1
-            if indent:
-                if genline == BLANKLINE_STR or (not genline.startswith(NORMAL_START)
-                                                and not genline.startswith(OPEN_START)):
-                    indent = new_indent = base_indent
-            if genline.endswith(":"):
-                new_indent = base_indent + 1
-            line.generated_line = (indent * INDENT_STR) + genline
-            indent = new_indent
-
-
-class SubstrateDir(SubstrateBase):
-    """
-    Container for both expanded and unexpanded substrate dirs.
-    """
-    def __init__(self, filename, filebase, out_filebase):
-        SubstrateBase.__init__(self, filename, filebase, out_filebase)
-
-    def expand(self):
-        SubstrateBase.expand(self)
-
-    def gen(self, context = None):
-        """Generate the code that generates the BSP."""
-        indent = new_indent = 0
-        for line in self.expanded_lines:
-            genline = line.gen(context)
-            if not genline:
-                continue
-            if genline.endswith(":"):
-                new_indent = 1
-            else:
-                new_indent = 0
-            line.generated_line = (indent * INDENT_STR) + genline
-            indent = new_indent
-
-
-def expand_target(target, all_files, out_filebase):
-    """
-    Expand the contents of all template tags in the target.  This
-    means removing tags and categorizing or creating lines so that
-    future passes can process and present input lines and generate the
-    corresponding lines of the Python program that will be exec'ed to
-    actually produce the final BSP.  'all_files' includes directories.
-    """
-    for root, dirs, files in os.walk(target):
-        for file in files:
-            if file.endswith("~") or file.endswith("#"):
-                continue
-            f = os.path.join(root, file)
-            sfile = SubstrateFile(f, target, out_filebase)
-            sfile.expand()
-            all_files.append(sfile)
-
-        for dir in dirs:
-            d = os.path.join(root, dir)
-            sdir = SubstrateDir(d, target, out_filebase)
-            sdir.expand()
-            all_files.append(sdir)
-
-
-def gen_program_machine_lines(machine, program_lines):
-    """
-    Use the input values we got from the command line.
-    """
-    line = "machine = \"" + machine + "\""
-    program_lines.append(line)
-
-    line = "layer_name = \"" + machine + "\""
-    program_lines.append(line)
-
-
-def sort_inputlines(input_lines):
-    """Sort input lines according to priority (position)."""
-    input_lines.sort(key = lambda l: l.prio)
-
-
-def find_parent_dependency(lines, depends_on):
-    for i, line in lines:
-        if isinstance(line, CodeLine):
-            continue
-        if line.props["name"] == depends_on:
-            return i
-
-    return -1
-
-
-def process_inputline_dependencies(input_lines, all_inputlines):
-    """If any input lines depend on others, put the others first."""
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            group_inputlines = []
-            process_inputline_dependencies(line.group, group_inputlines)
-            line.group = group_inputlines
-            all_inputlines.append(line)
-            continue
-
-        if isinstance(line, CodeLine) or isinstance(line, NormalLine):
-            all_inputlines.append(line)
-            continue
-
-        try:
-            depends_on = line.props["depends-on"]
-            depends_codeline = "if " + line.props["depends-on"] + " == \"" + line.props["depends-on-val"] + "\":"
-            all_inputlines.append(CodeLine(depends_codeline))
-            all_inputlines.append(line)
-        except KeyError:
-            all_inputlines.append(line)
-
-
-def conditional_filename(filename):
-    """
-    Check if the filename itself contains a conditional statement.  If
-    so, return a codeline for it.
-    """
-    opentag_start = filename.find(OPEN_TAG)
-
-    if opentag_start != -1:
-        if filename[opentag_start:].startswith(ASSIGN_TAG):
-            return None
-        end = filename.find(CLOSE_TAG, opentag_start)
-        if end == -1:
-            print("No close tag found for open tag in filename %s" % filename)
-            sys.exit(1)
-
-        # we have a {{ tag i.e. code
-        tag = filename[opentag_start + len(OPEN_TAG):end].strip()
-        if not tag.lstrip().startswith(IF_TAG):
-            print("Only 'if' tags are allowed in file or directory names, filename: %s" % filename)
-            sys.exit(1)
-
-        return CodeLine(tag)
-
-    return None
-
-
-class InputLineGroup(InputLine):
-    """
-    InputLine that does nothing but group other input lines
-    corresponding to all the input lines in a SubstrateFile so they
-    can be generated as a group.  prio is the only property used.
-    """
-    def __init__(self, codeline):
-        InputLine.__init__(self, {}, "", 0)
-        self.group = []
-        self.prio = sys.maxsize
-        self.group.append(codeline)
-
-    def append(self, line):
-        self.group.append(line)
-        if line.prio < self.prio:
-            self.prio = line.prio
-
-    def len(self):
-        return len(self.group)
-
-
-def gather_inputlines(files):
-    """
-    Gather all the InputLines - we want to generate them first.
-    """
-    all_inputlines = []
-    input_lines = []
-
-    for file in files:
-        if isinstance(file, SubstrateFile):
-            group = None
-            basename = os.path.basename(file.translated_filename)
-
-            codeline = conditional_filename(basename)
-            if codeline:
-                group = InputLineGroup(codeline)
-
-            have_condition = False
-            condition_to_write = None
-            for line in file.expanded_lines:
-                if isinstance(line, CodeLine):
-                    have_condition = True
-                    condition_to_write = line
-                    continue
-                if isinstance(line, InputLine):
-                    if group:
-                        if condition_to_write:
-                            condition_to_write.prio = line.prio
-                            condition_to_write.discard = True
-                            group.append(condition_to_write)
-                            condition_to_write = None
-                        group.append(line)
-                    else:
-                        if condition_to_write:
-                            condition_to_write.prio = line.prio
-                            condition_to_write.discard = True
-                            input_lines.append(condition_to_write)
-                            condition_to_write = None
-                        input_lines.append(line)
-                else:
-                    if condition_to_write:
-                        condition_to_write = None
-                    if have_condition:
-                        if not line.line.strip():
-                            line.discard = True
-                            input_lines.append(line)
-                    have_condition = False
-
-            if group and group.len() > 1:
-                input_lines.append(group)
-
-    sort_inputlines(input_lines)
-    process_inputline_dependencies(input_lines, all_inputlines)
-
-    return all_inputlines
-
-
-def run_program_lines(linelist, codedump):
-    """
-    For a single file, print all the python code into a buf and execute it.
-    """
-    buf = "\n".join(linelist)
-
-    if codedump:
-        of = open("bspgen.out", "w")
-        of.write(buf)
-        of.close()
-    exec(buf)
-
-
-def gen_target(files, context = None):
-    """
-    Generate the python code for each file.
-    """
-    for file in files:
-        file.gen(context)
-
-
-def gen_program_header_lines(program_lines):
-    """
-    Generate any imports we need.
-    """
-    program_lines.append("current_file = \"\"")
-
-
-def gen_supplied_property_vals(properties, program_lines):
-    """
-    Generate user-specified entries for input values instead of
-    generating input prompts.
-    """
-    for name, val in properties.items():
-        program_line = name + " = \"" + val + "\""
-        program_lines.append(program_line)
-
-
-def gen_initial_property_vals(input_lines, program_lines):
-    """
-    Generate null or default entries for input values, so we don't
-    have undefined variables.
-    """
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            gen_initial_property_vals(line.group, program_lines)
-            continue
-
-        if isinstance(line, InputLine):
-            try:
-                name = line.props["name"]
-                try:
-                    default_val = "\"" + line.props["default"] + "\""
-                except:
-                    default_val = "\"\""
-                program_line = name + " = " + default_val
-                program_lines.append(program_line)
-            except KeyError:
-                pass
-
-
-def gen_program_input_lines(input_lines, program_lines, context, in_group = False):
-    """
-    Generate only the input lines used for prompting the user.  For
-    that, we only have input lines and CodeLines that affect the next
-    input line.
-    """
-    indent = new_indent = 0
-
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            gen_program_input_lines(line.group, program_lines, context, True)
-            continue
-        if not line.line.strip():
-            continue
-
-        genline = line.gen(context)
-        if not genline:
-            continue
-        if genline.endswith(":"):
-            new_indent += 1
-        else:
-            if indent > 1 or (not in_group and indent):
-                new_indent -= 1
-
-        line.generated_line = (indent * INDENT_STR) + genline
-        program_lines.append(line.generated_line)
-
-        indent = new_indent
-
-
-def gen_program_lines(target_files, program_lines):
-    """
-    Generate the program lines that make up the BSP generation
-    program.  This appends the generated lines of all target_files to
-    program_lines, and skips input lines, which are dealt with
-    separately, or omitted.
-    """
-    for file in target_files:
-        if file.filename.endswith("noinstall"):
-            continue
-
-        for line in file.expanded_lines:
-            if isinstance(line, InputLine):
-                continue
-            if line.discard:
-                continue
-
-            program_lines.append(line.generated_line)
-
-
-def create_context(machine, arch, scripts_path):
-    """
-    Create a context object for use in deferred function invocation.
-    """
-    context = {}
-
-    context["machine"] = machine
-    context["arch"] = arch
-    context["scripts_path"] = scripts_path
-
-    return context
-
-
-def capture_context(context):
-    """
-    Create a context object for use in deferred function invocation.
-    """
-    captured_context = {}
-
-    captured_context["machine"] = context["machine"]
-    captured_context["arch"] = context["arch"]
-    captured_context["scripts_path"] = context["scripts_path"]
-
-    return captured_context
-
-
-def expand_targets(context, bsp_output_dir, expand_common=True):
-    """
-    Expand all the tags in both the common and machine-specific
-    'targets'.
-
-    If expand_common is False, don't expand the common target (this
-    option is used to create special-purpose layers).
-    """
-    target_files = []
-
-    machine = context["machine"]
-    arch = context["arch"]
-    scripts_path = context["scripts_path"]
-
-    lib_path = scripts_path + '/lib'
-    bsp_path = lib_path + '/bsp'
-    arch_path = bsp_path + '/substrate/target/arch'
-
-    if expand_common:
-        common = os.path.join(arch_path, "common")
-        expand_target(common, target_files, bsp_output_dir)
-
-    arches = os.listdir(arch_path)
-    if arch not in arches or arch == "common":
-        print("Invalid karch, exiting\n")
-        sys.exit(1)
-
-    target = os.path.join(arch_path, arch)
-    expand_target(target, target_files, bsp_output_dir)
-
-    gen_target(target_files, context)
-
-    return target_files
-
-
-def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedump, properties_file, properties_str="", expand_common=True):
-    """
-    Common layer-creation code
-
-    machine - user-defined machine name (if needed, will generate 'machine' var)
-    target - the 'target' the layer will be based on, must be one in
-           scripts/lib/bsp/substrate/target/arch
-    scripts_path - absolute path to yocto /scripts dir
-    layer_output_dir - dirname to create for layer
-    codedump - dump generated code to bspgen.out
-    properties_file - use values from this file if nonempty i.e no prompting
-    properties_str - use values from this string if nonempty i.e no prompting
-    expand_common - boolean, use the contents of (for bsp layers) arch/common
-    """
-    if os.path.exists(layer_output_dir):
-        print("\nlayer output dir already exists, exiting. (%s)" % layer_output_dir)
-        sys.exit(1)
-
-    properties = None
-
-    if properties_file:
-        try:
-            infile = open(properties_file, "r")
-            properties = json.load(infile)
-        except IOError:
-            print("Couldn't open properties file %s for reading, exiting" % properties_file)
-            sys.exit(1)
-        except ValueError:
-            print("Wrong format on properties file %s, exiting" % properties_file)
-            sys.exit(1)
-
-    if properties_str and not properties:
-        properties = json.loads(properties_str)
-
-    os.mkdir(layer_output_dir)
-
-    context = create_context(machine, target, scripts_path)
-    target_files = expand_targets(context, layer_output_dir, expand_common)
-
-    input_lines = gather_inputlines(target_files)
-
-    program_lines = []
-
-    gen_program_header_lines(program_lines)
-
-    gen_initial_property_vals(input_lines, program_lines)
-
-    if properties:
-        gen_supplied_property_vals(properties, program_lines)
-
-    gen_program_machine_lines(machine, program_lines)
-
-    if not properties:
-        gen_program_input_lines(input_lines, program_lines, context)
-
-    gen_program_lines(target_files, program_lines)
-
-    run_program_lines(program_lines, codedump)
-
-
-def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, properties_file, properties=""):
-    """
-    Create yocto layer
-
-    layer_name - user-defined layer name
-    scripts_path - absolute path to yocto /scripts dir
-    layer_output_dir - dirname to create for layer
-    codedump - dump generated code to bspgen.out
-    properties_file - use values from this file if nonempty i.e no prompting
-    properties - use values from this string if nonempty i.e no prompting
-    """
-    yocto_common_create(layer_name, "layer", scripts_path, layer_output_dir, codedump, properties_file, properties, False)
-
-    print("\nNew layer created in %s.\n" % layer_output_dir)
-    print("Don't forget to add it to your BBLAYERS (for details see %s/README)." % layer_output_dir)
-
-
-def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties=None):
-    """
-    Create bsp
-
-    machine - user-defined machine name
-    arch - the arch the bsp will be based on, must be one in
-           scripts/lib/bsp/substrate/target/arch
-    scripts_path - absolute path to yocto /scripts dir
-    bsp_output_dir - dirname to create for BSP
-    codedump - dump generated code to bspgen.out
-    properties_file - use values from this file if nonempty i.e no prompting
-    properties - use values from this string if nonempty i.e no prompting
-    """
-    yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties)
-
-    print("\nNew %s BSP created in %s" % (arch, bsp_output_dir))
-
-
-def print_dict(items, indent = 0):
-    """
-    Print the values in a possibly nested dictionary.
-    """
-    for key, val in items.items():
-        print("    "*indent + "\"%s\" :" % key)
-        if type(val) == dict:
-            print("{")
-            print_dict(val, indent + 1)
-            print("    "*indent + "}")
-        else:
-            print("%s" % val)
-
-
-def get_properties(input_lines):
-    """
-    Get the complete set of properties for all the input items in the
-    BSP, as a possibly nested dictionary.
-    """
-    properties = {}
-
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            statement = line.group[0].line
-            group_properties = get_properties(line.group)
-            properties[statement] = group_properties
-            continue
-
-        if not isinstance(line, InputLine):
-            continue
-
-        if isinstance(line, ChoiceInputLine):
-            continue
-
-        props = line.props
-        item = {}
-        name = props["name"]
-        for key, val in props.items():
-            if not key == "name":
-                item[key] = val
-        properties[name] = item
-
-    return properties
-
-
-def yocto_layer_list_properties(arch, scripts_path, properties_file, expand_common=True):
-    """
-    List the complete set of properties for all the input items in the
-    layer.  If properties_file is non-null, write the complete set of
-    properties as a nested JSON object corresponding to a possibly
-    nested dictionary.
-    """
-    context = create_context("unused", arch, scripts_path)
-    target_files = expand_targets(context, "unused", expand_common)
-
-    input_lines = gather_inputlines(target_files)
-
-    properties = get_properties(input_lines)
-    if properties_file:
-        try:
-            of = open(properties_file, "w")
-        except IOError:
-            print("Couldn't open properties file %s for writing, exiting" % properties_file)
-            sys.exit(1)
-
-        json.dump(properties, of, indent=1)
-    else:
-        print_dict(properties)
-
-
-def split_nested_property(property):
-    """
-    A property name of the form x.y describes a nested property
-    i.e. the property y is contained within x and can be addressed
-    using standard JSON syntax for nested properties.  Note that if a
-    property name itself contains '.', it should be contained in
-    double quotes.
-    """
-    splittable_property = ""
-    in_quotes = False
-    for c in property:
-        if c == '.' and not in_quotes:
-            splittable_property += '\n'
-            continue
-        if c == '"':
-            in_quotes = not in_quotes
-        splittable_property += c
-
-    split_properties = splittable_property.split('\n')
-
-    if len(split_properties) > 1:
-        return split_properties
-
-    return None
-
-
-def find_input_line_group(substring, input_lines):
-    """
-    Find and return the InputLineGroup containing the specified substring.
-    """
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            if substring in line.group[0].line:
-                return line
-
-    return None
-
-
-def find_input_line(name, input_lines):
-    """
-    Find the input line with the specified name.
-    """
-    for line in input_lines:
-        if isinstance(line, InputLineGroup):
-            l = find_input_line(name, line.group)
-            if l:
-                return l
-
-        if isinstance(line, InputLine):
-            try:
-                if line.props["name"] == name:
-                    return line
-                if line.props["name"] + "_" + line.props["nameappend"] == name:
-                    return line
-            except KeyError:
-                pass
-
-    return None
-
-
-def print_values(type, values_list):
-    """
-    Print the values in the given list of values.
-    """
-    if type == "choicelist":
-        for value in values_list:
-            print("[\"%s\", \"%s\"]" % (value[0], value[1]))
-    elif type == "boolean":
-        for value in values_list:
-            print("[\"%s\", \"%s\"]" % (value[0], value[1]))
-
-
-def yocto_layer_list_property_values(arch, property, scripts_path, properties_file, expand_common=True):
-    """
-    List the possible values for a given input property.  If
-    properties_file is non-null, write the complete set of properties
-    as a JSON object corresponding to an array of possible values.
-    """
-    context = create_context("unused", arch, scripts_path)
-    context["name"] = property
-
-    target_files = expand_targets(context, "unused", expand_common)
-
-    input_lines = gather_inputlines(target_files)
-
-    properties = get_properties(input_lines)
-
-    nested_properties = split_nested_property(property)
-    if nested_properties:
-        # currently the outer property of a nested property always
-        # corresponds to an input line group
-        input_line_group = find_input_line_group(nested_properties[0], input_lines)
-        if input_line_group:
-            input_lines[:] = input_line_group.group[1:]
-            # The inner property of a nested property name is the
-            # actual property name we want, so reset to that
-            property = nested_properties[1]
-
-    input_line = find_input_line(property, input_lines)
-    if not input_line:
-        print("Couldn't find values for property %s" % property)
-        return
-
-    values_list = []
-
-    type = input_line.props["type"]
-    if type == "boolean":
-        values_list.append(["y", "n"])
-    elif type == "choicelist" or type == "checklist":
-        try:
-            gen_fn = input_line.props["gen"]
-            if nested_properties:
-                context["filename"] = nested_properties[0]
-                try:
-                    context["branches_base"] = input_line.props["branches_base"]
-                except KeyError:
-                    context["branches_base"] = None
-            values_list = input_line.gen_choices_list(context, False)
-        except KeyError:
-            for choice in input_line.choices:
-                choicepair = []
-                choicepair.append(choice.val)
-                choicepair.append(choice.desc)
-                values_list.append(choicepair)
-
-    if properties_file:
-        try:
-            of = open(properties_file, "w")
-        except IOError:
-            print("Couldn't open properties file %s for writing, exiting" % properties_file)
-            sys.exit(1)
-
-        json.dump(values_list, of)
-
-    print_values(type, values_list)
-
-
-def yocto_bsp_list(args, scripts_path):
-    """
-    Print available architectures, or the complete list of properties
-    defined by the BSP, or the possible values for a particular BSP
-    property.
-    """
-    if args.karch == "karch":
-        lib_path = scripts_path + '/lib'
-        bsp_path = lib_path + '/bsp'
-        arch_path = bsp_path + '/substrate/target/arch'
-        print("Architectures available:")
-        for arch in os.listdir(arch_path):
-            if arch == "common" or arch == "layer":
-                continue
-            print("    %s" % arch)
-        return
-
-    if args.properties:
-        yocto_layer_list_properties(args.karch, scripts_path, args.properties_file)
-    elif args.property:
-        yocto_layer_list_property_values(args.karch, args.property, scripts_path, args.properties_file)
-
-
-
-def yocto_layer_list(args, scripts_path, properties_file):
-    """
-    Print the complete list of input properties defined by the layer,
-    or the possible values for a particular layer property.
-    """
-    if len(args) < 1:
-        return False
-
-    if len(args) < 1 or len(args) > 2:
-        return False
-
-    if len(args) == 1:
-        if args[0] == "properties":
-            yocto_layer_list_properties("layer", scripts_path, properties_file, False)
-        else:
-            return False
-
-    if len(args) == 2:
-        if args[0] == "property":
-            yocto_layer_list_property_values("layer", args[1], scripts_path, properties_file, False)
-        else:
-            return False
-
-    return True
-
-
-def map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
-    """
-    Return the linux-yocto bsp branch to use with the specified
-    kbranch.  This handles the -standard variants for 3.4 and 3.8; the
-    other variants don't need mappings.
-    """
-    if need_new_kbranch == "y":
-        kbranch = new_kbranch
-    else:
-        kbranch = existing_kbranch
-
-    if kbranch.startswith("standard/common-pc-64"):
-        return "bsp/common-pc-64/common-pc-64-standard.scc"
-    if kbranch.startswith("standard/common-pc"):
-        return "bsp/common-pc/common-pc-standard.scc"
-    else:
-        return "ktypes/standard/standard.scc"
-
-
-def map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
-    """
-    Return the linux-yocto bsp branch to use with the specified
-    kbranch.  This handles the -preempt-rt variants for 3.4 and 3.8;
-    the other variants don't need mappings.
-    """
-    if need_new_kbranch == "y":
-        kbranch = new_kbranch
-    else:
-        kbranch = existing_kbranch
-
-    if kbranch.startswith("standard/preempt-rt/common-pc-64"):
-        return "bsp/common-pc-64/common-pc-64-preempt-rt.scc"
-    if kbranch.startswith("standard/preempt-rt/common-pc"):
-        return "bsp/common-pc/common-pc-preempt-rt.scc"
-    else:
-        return "ktypes/preempt-rt/preempt-rt.scc"
-
-
-def map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
-    """
-    Return the linux-yocto bsp branch to use with the specified
-    kbranch.  This handles the -tiny variants for 3.4 and 3.8; the
-    other variants don't need mappings.
-    """
-    if need_new_kbranch == "y":
-        kbranch = new_kbranch
-    else:
-        kbranch = existing_kbranch
-
-    if kbranch.startswith("standard/tiny/common-pc"):
-        return "bsp/common-pc/common-pc-tiny.scc"
-    else:
-        return "ktypes/tiny/tiny.scc"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/help.py b/import-layers/yocto-poky/scripts/lib/bsp/help.py
deleted file mode 100644
index 85d446b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/help.py
+++ /dev/null
@@ -1,1054 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# DESCRIPTION
-# This module implements some basic help invocation functions along
-# with the bulk of the help topic text for the Yocto BSP Tools.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import subprocess
-import logging
-
-
-def subcommand_error(args):
-    logging.info("invalid subcommand %s" % args[0])
-
-
-def display_help(subcommand, subcommands):
-    """
-    Display help for subcommand.
-    """
-    if subcommand not in subcommands:
-        return False
-
-    help = subcommands.get(subcommand, subcommand_error)[2]
-    pager = subprocess.Popen('less', stdin=subprocess.PIPE)
-    pager.communicate(bytes(help, 'UTF-8'))
-
-    return True
-
-
-def yocto_help(args, usage_str, subcommands):
-    """
-    Subcommand help dispatcher.
-    """
-    if len(args) == 1 or not display_help(args[1], subcommands):
-        print(usage_str)
-
-
-def invoke_subcommand(args, parser, main_command_usage, subcommands):
-    """
-    Dispatch to subcommand handler borrowed from combo-layer.
-    Should use argparse, but has to work in 2.6.
-    """
-    if not args:
-        logging.error("No subcommand specified, exiting")
-        parser.print_help()
-    elif args[0] == "help":
-        yocto_help(args, main_command_usage, subcommands)
-    elif args[0] not in subcommands:
-        logging.error("Unsupported subcommand %s, exiting\n" % (args[0]))
-        parser.print_help()
-    else:
-        usage = subcommands.get(args[0], subcommand_error)[1]
-        subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
-
-
-##
-# yocto-bsp help and usage strings
-##
-
-yocto_bsp_usage = """
-
- Create a customized Yocto BSP layer.
-
- usage: yocto-bsp [--version] [--help] COMMAND [ARGS]
-
- Current 'yocto-bsp' commands are:
-    create            Create a new Yocto BSP
-    list              List available values for options and BSP properties
-
- See 'yocto-bsp help COMMAND' for more information on a specific command.
-"""
-
-yocto_bsp_help_usage = """
-
- usage: yocto-bsp help <subcommand>
-
- This command displays detailed help for the specified subcommand.
-"""
-
-yocto_bsp_create_usage = """
-
- Create a new Yocto BSP
-
- usage: yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
-            [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-            [-c | --codedump] [-s | --skip-git-check]
-
- This command creates a Yocto BSP based on the specified parameters.
- The new BSP will be a new Yocto BSP layer contained by default within
- the top-level directory specified as 'meta-bsp-name'.  The -o option
- can be used to place the BSP layer in a directory with a different
- name and location.
-
- The value of the 'karch' parameter determines the set of files that
- will be generated for the BSP, along with the specific set of
- 'properties' that will be used to fill out the BSP-specific portions
- of the BSP.  The possible values for the 'karch' parameter can be
- listed via 'yocto-bsp list karch'.
-
- NOTE: Once created, you should add your new layer to your
- bblayers.conf file in order for it to be subsequently seen and
- modified by the yocto-kernel tool.
-
- See 'yocto bsp help create' for more detailed instructions.
-"""
-
-yocto_bsp_create_help = """
-
-NAME
-    yocto-bsp create - Create a new Yocto BSP
-
-SYNOPSIS
-    yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
-        [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-        [-c | --codedump] [-s | --skip-git-check]
-
-DESCRIPTION
-    This command creates a Yocto BSP based on the specified
-    parameters.  The new BSP will be a new Yocto BSP layer contained
-    by default within the top-level directory specified as
-    'meta-bsp-name'.  The -o option can be used to place the BSP layer
-    in a directory with a different name and location.
-
-    The value of the 'karch' parameter determines the set of files
-    that will be generated for the BSP, along with the specific set of
-    'properties' that will be used to fill out the BSP-specific
-    portions of the BSP.  The possible values for the 'karch' parameter
-    can be listed via 'yocto-bsp list karch'.
-
-    The BSP-specific properties that define the values that will be
-    used to generate a particular BSP can be specified on the
-    command-line using the -i option and supplying a JSON object
-    consisting of the set of name:value pairs needed by the BSP.
-
-    If the -i option is not used, the user will be interactively
-    prompted for each of the required property values, which will then
-    be used as values for BSP generation.
-
-    The set of properties available for a given architecture can be
-    listed using the 'yocto-bsp list' command.
-
-    Specifying -c causes the Python code generated and executed to
-    create the BSP to be dumped to the 'bspgen.out' file in the
-    current directory, and is useful for debugging.
-
-    NOTE: Once created, you should add your new layer to your
-    bblayers.conf file in order for it to be subsequently seen and
-    modified by the yocto-kernel tool.
-
-    For example, assuming your poky repo is at /path/to/poky, your new
-    BSP layer is at /path/to/poky/meta-mybsp, and your build directory
-    is /path/to/build:
-
-    $ gedit /path/to/build/conf/bblayers.conf
-
-    BBLAYERS ?= " \\
-      /path/to/poky/meta \\
-      /path/to/poky/meta-poky \\
-      /path/to/poky/meta-mybsp \\
-      "
-"""
-
-yocto_bsp_list_usage = """
-
- usage: yocto-bsp list karch
-        yocto-bsp list <karch> --properties
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-        yocto-bsp list <karch> --property <xxx>
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-
- This command enumerates the complete set of possible values for a
- specified option or property needed by the BSP creation process.
-
- The first form enumerates all the possible values that exist and can
- be specified for the 'karch' parameter to the 'yocto bsp create'
- command.
-
- The second form enumerates all the possible properties that exist and
- must have values specified for them in the 'yocto bsp create' command
- for the given 'karch'.
-
- The third form enumerates all the possible values that exist and can
- be specified for any of the enumerable properties of the given
- 'karch' in the 'yocto bsp create' command.
-
- See 'yocto-bsp help list' for more details.
-"""
-
-yocto_bsp_list_help = """
-
-NAME
-    yocto-bsp list - List available values for options and BSP properties
-
-SYNOPSIS
-    yocto-bsp list karch
-    yocto-bsp list <karch> --properties
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-    yocto-bsp list <karch> --property <xxx>
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-
-DESCRIPTION
-    This command enumerates the complete set of possible values for a
-    specified option or property needed by the BSP creation process.
-
-    The first form enumerates all the possible values that exist and
-    can be specified for the 'karch' parameter to the 'yocto bsp
-    create' command.  Example output for the 'list karch' command:
-
-    $ yocto-bsp list karch
-    Architectures available:
-        arm
-        powerpc
-        i386
-        mips
-        mips64
-        x86_64
-        qemu
-
-    The second form enumerates all the possible properties that exist
-    and must have values specified for them in the 'yocto bsp create'
-    command for the given 'karch'.  This command is mainly meant to
-    allow the development user interface alternatives to the default
-    text-based prompting interface.  If the -o option is specified,
-    the list of properties, in addition to being displayed, will be
-    written to the specified file as a JSON object.  In this case, the
-    object will consist of the set of name:value pairs corresponding
-    to the (possibly nested) dictionary of properties defined by the
-    input statements used by the BSP.  Some example output for the
-    'list --properties' command:
-
-    $ yocto-bsp list arm --properties
-    "touchscreen" : {
-        "msg" : Does your BSP have a touchscreen? (y/N)
-        "default" : n
-        "type" : boolean
-    }
-    "uboot_loadaddress" : {
-        "msg" : Please specify a value for UBOOT_LOADADDRESS.
-        "default" : 0x80008000
-        "type" : edit
-        "prio" : 40
-    }
-    "kernel_choice" : {
-        "prio" : 10
-        "default" : linux-yocto_3.2
-        "depends-on" : use_default_kernel
-        "depends-on-val" : n
-        "msg" : Please choose the kernel to use in this BSP =>
-        "type" : choicelist
-        "gen" : bsp.kernel.kernels
-    }
-    "if kernel_choice == "linux-yocto_3.0":" : {
-        "base_kbranch_linux_yocto_3_0" : {
-            "prio" : 20
-            "default" : yocto/standard
-            "depends-on" : new_kbranch_linux_yocto_3_0
-            "depends-on-val" : y
-            "msg" : Please choose a machine branch to base this BSP on =>
-            "type" : choicelist
-            "gen" : bsp.kernel.all_branches
-    }
-    .
-    .
-    .
-
-    Each entry in the output consists of the name of the input element
-    e.g. "touchscreen", followed by the properties defined for that
-    element enclosed in braces.  This information should provide
-    sufficient information to create a complete user interface with.
-    Two features of the scheme provide for conditional input.  First,
-    if a Python "if" statement appears in place of an input element
-    name, the set of enclosed input elements apply and should be
-    presented to the user only if the 'if' statement evaluates to
-    true.  The test in the if statement will always reference another
-    input element in the list, which means that the element being
-    tested should be presented to the user before the elements
-    enclosed by the if block.  Secondly, in a similar way, some
-    elements contain "depends-on" and depends-on-val" tags, which mean
-    that the affected input element should only be presented to the
-    user if the element it depends on has already been presented to
-    the user and the user has selected the specified value for that
-    element.
-
-    The third form enumerates all the possible values that exist and
-    can be specified for any of the enumerable properties of the given
-    'karch' in the 'yocto bsp create' command.  If the -o option is
-    specified, the list of values for the given property, in addition
-    to being displayed, will be written to the specified file as a
-    JSON object.  In this case, the object will consist of the set of
-    name:value pairs corresponding to the array of property values
-    associated with the property.
-
-    $ yocto-bsp list i386 --property xserver_choice
-        ["xserver_vesa", "VESA xserver support"]
-        ["xserver_i915", "i915 xserver support"]
-
-    $ yocto-bsp list arm --property base_kbranch_linux_yocto_3_0
-        Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.0...
-        ["yocto/base", "yocto/base"]
-        ["yocto/eg20t", "yocto/eg20t"]
-        ["yocto/gma500", "yocto/gma500"]
-        ["yocto/pvr", "yocto/pvr"]
-        ["yocto/standard/arm-versatile-926ejs", "yocto/standard/arm-versatile-926ejs"]
-        ["yocto/standard/base", "yocto/standard/base"]
-        ["yocto/standard/cedartrail", "yocto/standard/cedartrail"]
-        .
-        .
-        .
-        ["yocto/standard/qemu-ppc32", "yocto/standard/qemu-ppc32"]
-        ["yocto/standard/routerstationpro", "yocto/standard/routerstationpro"]
-
-    The third form as well is meant mainly for developers of
-    alternative interfaces - it allows the developer to fetch the
-    possible values for a given input element on-demand.  This
-    on-demand capability is especially valuable for elements that
-    require relatively expensive remote operations to fulfill, such as
-    the example that returns the set of branches available in a remote
-    git tree above.
-
-"""
-
-##
-# yocto-kernel help and usage strings
-##
-
-yocto_kernel_usage = """
-
- Modify and list Yocto BSP kernel config items and patches.
-
- usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
-
- Current 'yocto-kernel' commands are:
-   config list       List the modifiable set of bare kernel config options for a BSP
-   config add        Add or modify bare kernel config options for a BSP
-   config rm         Remove bare kernel config options from a BSP
-   patch list        List the patches associated with a BSP
-   patch add         Patch the Yocto kernel for a BSP
-   patch rm          Remove patches from a BSP
-   feature list      List the features used by a BSP
-   feature add       Have a BSP use a feature
-   feature rm        Have a BSP stop using a feature
-   features list     List the features available to BSPs
-   feature describe  Describe a particular feature
-   feature create    Create a new BSP-local feature
-   feature destroy   Remove a BSP-local feature
-
- See 'yocto-kernel help COMMAND' for more information on a specific command.
-
-"""
-
-
-yocto_kernel_help_usage = """
-
- usage: yocto-kernel help <subcommand>
-
- This command displays detailed help for the specified subcommand.
-"""
-
-yocto_kernel_config_list_usage = """
-
- List the modifiable set of bare kernel config options for a BSP
-
- usage: yocto-kernel config list <bsp-name>
-
- This command lists the 'modifiable' config items for a BSP i.e. the
- items which are eligible for modification or removal by other
- yocto-kernel commands.
-
- 'modifiable' config items are the config items contained a BSP's
- user-config.cfg base config.
-"""
-
-
-yocto_kernel_config_list_help = """
-
-NAME
-    yocto-kernel config list - List the modifiable set of bare kernel
-    config options for a BSP
-
-SYNOPSIS
-    yocto-kernel config list <bsp-name>
-
-DESCRIPTION
-    This command lists the 'modifiable' config items for a BSP
-    i.e. the items which are eligible for modification or removal by
-    other yocto-kernel commands.
-"""
-
-
-yocto_kernel_config_add_usage = """
-
- Add or modify bare kernel config options for a BSP
-
- usage: yocto-kernel config add <bsp-name> [<CONFIG_XXX=x> ...]
-
- This command adds one or more CONFIG_XXX=x items to a BSP's user-config.cfg
- base config.
-"""
-
-
-yocto_kernel_config_add_help = """
-
-NAME
-    yocto-kernel config add - Add or modify bare kernel config options
-    for a BSP
-
-SYNOPSIS
-    yocto-kernel config add <bsp-name> [<CONFIG_XXX=x> ...]
-
-DESCRIPTION
-    This command adds one or more CONFIG_XXX=x items to a BSP's
-    foo.cfg base config.
-
-    NOTE: It's up to the user to determine whether or not the config
-    options being added make sense or not - this command does no
-    sanity checking or verification of any kind to ensure that a
-    config option really makes sense and will actually be set in in
-    the final config.  For example, if a config option depends on
-    other config options, it will be turned off by kconfig if the
-    other options aren't set correctly.
-"""
-
-
-yocto_kernel_config_rm_usage = """
-
- Remove bare kernel config options from a BSP
-
- usage: yocto-kernel config rm <bsp-name>
-
- This command removes (turns off) one or more CONFIG_XXX items from a
- BSP's user-config.cfg base config.
-
- The set of config items available to be removed by this command for a
- BSP is listed and the user prompted for the specific items to remove.
-"""
-
-
-yocto_kernel_config_rm_help = """
-
-NAME
-    yocto-kernel config rm - Remove bare kernel config options from a
-    BSP
-
-SYNOPSIS
-    yocto-kernel config rm <bsp-name>
-
-DESCRIPTION
-    This command removes (turns off) one or more CONFIG_XXX items from a
-    BSP's user-config.cfg base config.
-
-    The set of config items available to be removed by this command
-    for a BSP is listed and the user prompted for the specific items
-    to remove.
-"""
-
-
-yocto_kernel_patch_list_usage = """
-
- List the patches associated with the kernel for a BSP
-
- usage: yocto-kernel patch list <bsp-name>
-
- This command lists the patches associated with a BSP.
-
- NOTE: this only applies to patches listed in the kernel recipe's
- user-patches.scc file (and currently repeated in its SRC_URI).
-"""
-
-
-yocto_kernel_patch_list_help = """
-
-NAME
-    yocto-kernel patch list - List the patches associated with the kernel
-    for a BSP
-
-SYNOPSIS
-    yocto-kernel patch list <bsp-name>
-
-DESCRIPTION
-    This command lists the patches associated with a BSP.
-
-    NOTE: this only applies to patches listed in the kernel recipe's
-    user-patches.scc file (and currently repeated in its SRC_URI).
-"""
-
-
-yocto_kernel_patch_add_usage = """
-
- Patch the Yocto kernel for a specific BSP
-
- usage: yocto-kernel patch add <bsp-name> [<PATCH> ...]
-
- This command adds one or more patches to a BSP's machine branch.  The
- patch will be added to the BSP's linux-yocto kernel user-patches.scc
- file (and currently repeated in its SRC_URI) and will be guaranteed
- to be applied in the order specified.
-"""
-
-
-yocto_kernel_patch_add_help = """
-
-NAME
-    yocto-kernel patch add - Patch the Yocto kernel for a specific BSP
-
-SYNOPSIS
-    yocto-kernel patch add <bsp-name> [<PATCH> ...]
-
-DESCRIPTION
-    This command adds one or more patches to a BSP's machine branch.
-    The patch will be added to the BSP's linux-yocto kernel
-    user-patches.scc file (and currently repeated in its SRC_URI) and
-    will be guaranteed to be applied in the order specified.
-
-    NOTE: It's up to the user to determine whether or not the patches
-    being added makes sense or not - this command does no sanity
-    checking or verification of any kind to ensure that a patch can
-    actually be applied to the BSP's kernel branch; it's assumed that
-    the user has already done that.
-"""
-
-
-yocto_kernel_patch_rm_usage = """
-
- Remove a patch from the Yocto kernel for a specific BSP
-
- usage: yocto-kernel patch rm <bsp-name>
-
- This command removes one or more patches from a BSP's machine branch.
- The patch will be removed from the BSP's linux-yocto kernel
- user-patches.scc file (and currently repeated in its SRC_URI) and
- kernel SRC_URI dir.
-
- The set of patches available to be removed by this command for a BSP
- is listed and the user prompted for the specific patches to remove.
-"""
-
-
-yocto_kernel_patch_rm_help = """
-
-NAME
-    yocto-kernel patch rm - Remove a patch from the Yocto kernel for a specific BSP
-
-SYNOPSIS
-    yocto-kernel patch rm <bsp-name>
-
-DESCRIPTION
-    This command removes one or more patches from a BSP's machine
-    branch.  The patch will be removed from the BSP's linux-yocto
-    kernel user-patches.scc file (and currently repeated in its
-    SRC_URI).
-
-    The set of patches available to be removed by this command for a
-    BSP is listed and the user prompted for the specific patches to
-    remove.
-"""
-
-yocto_kernel_feature_list_usage = """
-
- List the BSP features that are being used by a BSP
-
- usage: yocto-kernel feature list <bsp-name>
-
- This command lists the features being used by a BSP i.e. the features
- which are eligible for modification or removal by other yocto-kernel
- commands.
-
- 'modifiable' features are the features listed in a BSP's
- user-features.scc file.
-"""
-
-
-yocto_kernel_feature_list_help = """
-
-NAME
-    yocto-kernel feature list - List the modifiable set of features
-    being used by a BSP
-
-SYNOPSIS
-    yocto-kernel feature list <bsp-name>
-
-DESCRIPTION
-    This command lists the 'modifiable' features being used by a BSP
-    i.e. the features which are eligible for modification or removal
-    by other yocto-kernel commands.
-"""
-
-
-yocto_kernel_feature_add_usage = """
-
- Add to or modify the list of features being used for a BSP
-
- usage: yocto-kernel feature add <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
- This command adds one or more feature items to a BSP's kernel
- user-features.scc file, which is the file used to manage features in
- a yocto-bsp-generated BSP.  Features to be added must be specified as
- fully-qualified feature names.
-"""
-
-
-yocto_kernel_feature_add_help = """
-
-NAME
-    yocto-kernel feature add - Add to or modify the list of features
-    being used for a BSP
-
-SYNOPSIS
-    yocto-kernel feature add <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
-DESCRIPTION
-    This command adds one or more feature items to a BSP's
-    user-features.scc file, which is the file used to manage features
-    in a yocto-bsp-generated BSP.  Features to be added must be
-    specified as fully-qualified feature names.
-"""
-
-
-yocto_kernel_feature_rm_usage = """
-
- Remove a feature from the list of features being used for a BSP
-
- usage: yocto-kernel feature rm <bsp-name>
-
- This command removes (turns off) one or more features from a BSP's
- user-features.scc file, which is the file used to manage features in
- a yocto-bsp-generated BSP.
-
- The set of features available to be removed by this command for a BSP
- is listed and the user prompted for the specific items to remove.
-"""
-
-
-yocto_kernel_feature_rm_help = """
-
-NAME
-    yocto-kernel feature rm - Remove a feature from the list of
-    features being used for a BSP
-
-SYNOPSIS
-    yocto-kernel feature rm <bsp-name>
-
-DESCRIPTION
-    This command removes (turns off) one or more features from a BSP's
-    user-features.scc file, which is the file used to manage features
-    in a yocto-bsp-generated BSP.
-
-    The set of features available to be removed by this command for a
-    BSP is listed and the user prompted for the specific items to
-    remove.
-"""
-
-
-yocto_kernel_available_features_list_usage = """
-
- List the set of kernel features available to a BSP
-
- usage: yocto-kernel features list <bsp-name>
-
- This command lists the complete set of kernel features available to a
- BSP.  This includes the features contained in linux-yocto meta
- branches as well as recipe-space features defined locally to the BSP.
-"""
-
-
-yocto_kernel_available_features_list_help = """
-
-NAME
-    yocto-kernel features list - List the set of kernel features
-    available to a BSP
-
-SYNOPSIS
-    yocto-kernel features list <bsp-name>
-
-DESCRIPTION
-     This command lists the complete set of kernel features available
-     to a BSP.  This includes the features contained in linux-yocto
-     meta branches as well as recipe-space features defined locally to
-     the BSP.
-"""
-
-
-yocto_kernel_feature_describe_usage = """
-
- Print the description and compatibility information for a given kernel feature
-
- usage: yocto-kernel feature describe <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
- This command prints the description and compatibility of a specific
- feature in the format 'description [compatibility].
-"""
-
-
-yocto_kernel_feature_describe_help = """
-
-NAME
-    yocto-kernel feature describe - print the description and
-    compatibility information for a given kernel feature
-
-SYNOPSIS
-    yocto-kernel feature describe <bsp-name> [/xxxx/yyyy/feature.scc ...]
-
-DESCRIPTION
-    This command prints the description and compatibility of a
-    specific feature in the format 'description [compatibility].  If
-    the feature doesn't define a description or compatibility, a
-    string with generic unknown values will be printed.
-"""
-
-
-yocto_kernel_feature_create_usage = """
-
- Create a recipe-space kernel feature in a BSP
-
- usage: yocto-kernel feature create <bsp-name> newfeature.scc \
-        "Feature Description" capabilities [<CONFIG_XXX=x> ...] [<PATCH> ...]
-
- This command creates a new kernel feature from the bare config
- options and patches specified on the command-line.
-"""
-
-
-yocto_kernel_feature_create_help = """
-
-NAME
-    yocto-kernel feature create - create a recipe-space kernel feature
-    in a BSP
-
-SYNOPSIS
-    yocto-kernel feature create <bsp-name> newfeature.scc \
-        "Feature Description" capabilities [<CONFIG_XXX=x> ...] [<PATCH> ...]
-
-DESCRIPTION
-    This command creates a new kernel feature from the bare config
-    options and patches specified on the command-line.  The new
-    feature will be created in recipe-space, specifically in either
-    the kernel .bbappend's /files/cfg or /files/features subdirectory,
-    depending on whether or not the feature contains config items only
-    or config items along with patches.  The named feature must end
-    with .scc and must not contain a feature directory to contain the
-    feature (this will be determined automatically), and a feature
-    description in double-quotes along with a capabilities string
-    (which for the time being can be one of: 'all' or 'board').
-"""
-
-
-yocto_kernel_feature_destroy_usage = """
-
- Destroy a recipe-space kernel feature in a BSP
-
- usage: yocto-kernel feature destroy <bsp-name> feature.scc
-
- This command destroys a kernel feature defined in the specified BSP's
- recipe-space kernel definition.
-"""
-
-
-yocto_kernel_feature_destroy_help = """
-
-NAME
-    yocto-kernel feature destroy <bsp-name> feature.scc - destroy a
-    recipe-space kernel feature in a BSP
-
-SYNOPSIS
-    yocto-kernel feature destroy <bsp-name> feature.scc
-
-DESCRIPTION
-    This command destroys a kernel feature defined in the specified
-    BSP's recipe-space kernel definition.  The named feature must end
-    with .scc and must not contain a feature directory to contain the
-    feature (this will be determined automatically).  If the kernel
-    feature is in use by a BSP, it can't be removed until the BSP
-    stops using it (see yocto-kernel feature rm to stop using it).
-"""
-
-##
-# yocto-layer help and usage strings
-##
-
-yocto_layer_usage = """
-
- Create a generic Yocto layer.
-
- usage: yocto-layer [--version] [--help] COMMAND [ARGS]
-
- Current 'yocto-layer' commands are:
-    create            Create a new generic Yocto layer
-    list              List available values for input options and properties
-
- See 'yocto-layer help COMMAND' for more information on a specific command.
-"""
-
-yocto_layer_help_usage = """
-
- usage: yocto-layer help <subcommand>
-
- This command displays detailed help for the specified subcommand.
-"""
-
-yocto_layer_create_usage = """
-
- WARNING: this plugin will be removed starting 2.5 development in favour
- of using 'bitbake-layers create-layer' script/plugin, offering a single
- script to manage layers.
-
- Create a new generic Yocto layer
-
- usage: yocto-layer create <layer-name> [layer_priority]
-            [-o <DIRNAME> | --outdir <DIRNAME>]
-            [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-
- This command creates a generic Yocto layer based on the specified
- parameters.  The new layer will be a new Yocto layer contained by
- default within the top-level directory specified as
- 'meta-layer-name'.  The -o option can be used to place the layer in a
- directory with a different name and location.
-
- If layer_priority is specified, a simple layer will be created using
- the given layer priority, and the user will not be prompted for
- further input.
-
- NOTE: Once created, you should add your new layer to your
- bblayers.conf file in order for it to be subsequently seen and
- modified by the yocto-kernel tool.  Instructions for doing this can
- be found in the README file generated in the layer's top-level
- directory.
-
- See 'yocto layer help create' for more detailed instructions.
-"""
-
-yocto_layer_create_help = """
-
-WARNING: this plugin will be removed starting 2.5 development in favour
-of using 'bitbake-layers create-layer' script/plugin, offering a single
-script to manage layers.
-
-NAME
-    yocto-layer create - Create a new generic Yocto layer
-
-SYNOPSIS
-    yocto-layer create <layer-name> [layer_priority]
-        [-o <DIRNAME> | --outdir <DIRNAME>]
-        [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
-
-DESCRIPTION
-    This command creates a generic Yocto layer based on the specified
-    parameters.  The new layer will be a new Yocto layer contained by
-    default within the top-level directory specified as
-    'meta-layer-name'.  The -o option can be used to place the layer
-    in a directory with a different name and location.
-
-    If layer_priority is specified, a simple layer will be created
-    using the given layer priority, and the user will not be prompted
-    for further input.
-
-    The layer-specific properties that define the values that will be
-    used to generate the layer can be specified on the command-line
-    using the -i option and supplying a JSON object consisting of the
-    set of name:value pairs needed by the layer.
-
-    If the -i option is not used, the user will be interactively
-    prompted for each of the required property values, which will then
-    be used as values for layer generation.
-
-    The set of properties available can be listed using the
-    'yocto-layer list' command.
-
-    Specifying -c causes the Python code generated and executed to
-    create the layer to be dumped to the 'bspgen.out' file in the
-    current directory, and is useful for debugging.
-
-    NOTE: Once created, you should add your new layer to your
-    bblayers.conf file in order for it to be subsequently seen and
-    modified by the yocto-kernel tool.  Instructions for doing this
-    can be found in the README file generated in the layer's top-level
-    directory.
-
-    For example, assuming your poky repo is at /path/to/poky, your new
-    layer is at /path/to/poky/meta-mylayer, and your build directory
-    is /path/to/build:
-
-    $ gedit /path/to/build/conf/bblayers.conf
-
-    BBLAYERS ?= " \\
-      /path/to/poky/meta \\
-      /path/to/poky/meta-yocto \\
-      /path/to/poky/meta-mylayer \\
-      "
-"""
-
-yocto_layer_list_usage = """
-
- usage: yocto-layer list properties
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-        yocto-layer list property <xxx>
-                [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>]
-
- This command enumerates the complete set of possible values for a
- specified option or property needed by the layer creation process.
-
- The first form enumerates all the possible properties that exist and
- must have values specified for them in the 'yocto-layer create'
- command.
-
- The second form enumerates all the possible values that exist and can
- be specified for any of the enumerable properties in the 'yocto-layer
- create' command.
-
- See 'yocto-layer help list' for more details.
-"""
-
-yocto_layer_list_help = """
-
-NAME
-    yocto-layer list - List available values for layer input options and properties
-
-SYNOPSIS
-    yocto-layer list properties
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-    yocto-layer list property <xxx>
-            [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>]
-
-DESCRIPTION
-    This command enumerates the complete set of possible values for a
-    specified option or property needed by the layer creation process.
-
-    The first form enumerates all the possible properties that exist
-    and must have values specified for them in the 'yocto-layer
-    create' command.  This command is mainly meant to aid the
-    development of user interface alternatives to the default
-    text-based prompting interface.  If the -o option is specified,
-    the list of properties, in addition to being displayed, will be
-    written to the specified file as a JSON object.  In this case, the
-    object will consist of the set of name:value pairs corresponding
-    to the (possibly nested) dictionary of properties defined by the
-    input statements used by the BSP.  Some example output for the
-    'list properties' command:
-
-    $ yocto-layer list properties
-    "example_bbappend_name" : {
-        "default" : example
-        "msg" : Please enter the name you'd like to use for your bbappend file:
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "create_example_recipe" : {
-        "default" : n
-        "msg" : Would you like to have an example recipe created? (y/n)
-        "type" : boolean
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "example_recipe_name" : {
-        "default" : example
-        "msg" : Please enter the name you'd like to use for your example recipe:
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "layer_priority" : {
-        "default" : 6
-        "msg" : Please enter the layer priority you'd like to use for the layer:
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "create_example_bbappend" : {
-        "default" : n
-        "msg" : Would you like to have an example bbappend file created? (y/n)
-        "type" : boolean
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-    "example_bbappend_version" : {
-        "default" : 0.1
-        "msg" : Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to):
-        "type" : edit
-        "prio" : 20
-        "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
-    }
-
-    Each entry in the output consists of the name of the input element
-    e.g. "layer_priority", followed by the properties defined for that
-    element enclosed in braces.  This information should provide
-    sufficient information to create a complete user interface.  Two
-    features of the scheme provide for conditional input.  First, if a
-    Python "if" statement appears in place of an input element name,
-    the set of enclosed input elements apply and should be presented
-    to the user only if the 'if' statement evaluates to true.  The
-    test in the if statement will always reference another input
-    element in the list, which means that the element being tested
-    should be presented to the user before the elements enclosed by
-    the if block.  Secondly, in a similar way, some elements contain
-    "depends-on" and depends-on-val" tags, which mean that the
-    affected input element should only be presented to the user if the
-    element it depends on has already been presented to the user and
-    the user has selected the specified value for that element.
-
-    The second form enumerates all the possible values that exist and
-    can be specified for any of the enumerable properties in the
-    'yocto-layer create' command.  If the -o option is specified, the
-    list of values for the given property, in addition to being
-    displayed, will be written to the specified file as a JSON object.
-    In this case, the object will consist of the set of name:value
-    pairs corresponding to the array of property values associated
-    with the property.
-
-    $ yocto-layer list property layer_priority
-     [no output - layer_priority is a text field that has no enumerable values]
-
-    The second form as well is meant mainly for developers of
-    alternative interfaces - it allows the developer to fetch the
-    possible values for a given input element on-demand.  This
-    on-demand capability is especially valuable for elements that
-    require relatively expensive remote operations to fulfill, such as
-    the example that returns the set of branches available in a remote
-    git tree above.
-
-"""
-
-##
-# test code
-##
-
-test_bsp_properties = {
-    'smp': 'yes',
-    'touchscreen': 'yes',
-    'keyboard': 'no',
-    'xserver': 'yes',
-    'xserver_choice': 'xserver-i915',
-    'features': ['goodfeature', 'greatfeature'],
-    'tunefile': 'tune-quark',
-}
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/kernel.py b/import-layers/yocto-poky/scripts/lib/bsp/kernel.py
deleted file mode 100644
index a3ee325..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/kernel.py
+++ /dev/null
@@ -1,1069 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# DESCRIPTION
-# This module implements the kernel-related functions used by
-# 'yocto-kernel' to manage kernel config items and patches for Yocto
-# BSPs.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import sys
-import os
-import shutil
-from .tags import *
-import glob
-import subprocess
-from .engine import create_context
-
-def find_bblayers():
-    """
-    Find and return a sanitized list of the layers found in BBLAYERS.
-    """
-    try:
-        builddir = os.environ["BUILDDIR"]
-    except KeyError:
-        print("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)")
-        sys.exit(1)
-    bblayers_conf = os.path.join(builddir, "conf/bblayers.conf")
-
-    layers = []
-
-    bitbake_env_cmd = "bitbake -e"
-    bitbake_env_lines = subprocess.Popen(bitbake_env_cmd, shell=True,
-                                         stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    if not bitbake_env_lines:
-        print("Couldn't get '%s' output, exiting." % bitbake_env_cmd)
-        sys.exit(1)
-
-    for line in bitbake_env_lines.split('\n'):
-        bblayers = get_line_val(line, "BBLAYERS")
-        if (bblayers):
-            break
-
-    if not bblayers:
-        print("Couldn't find BBLAYERS in %s output, exiting." % bitbake_env_cmd)
-        sys.exit(1)
-
-    raw_layers = bblayers.split()
-
-    for layer in raw_layers:
-        if layer == 'BBLAYERS' or '=' in layer:
-            continue
-        layers.append(layer)
-
-    return layers
-
-
-def get_line_val(line, key):
-    """
-    Extract the value from the VAR="val" string
-    """
-    if line.startswith(key + "="):
-        stripped_line = line.split('=')[1]
-        stripped_line = stripped_line.replace('\"', '')
-        return stripped_line
-    return None
-
-
-def find_meta_layer():
-    """
-    Find and return the meta layer in BBLAYERS.
-    """
-    layers = find_bblayers()
-
-    for layer in layers:
-        if layer.endswith("meta"):
-            return layer
-
-    return None
-
-
-def find_bsp_layer(machine):
-    """
-    Find and return a machine's BSP layer in BBLAYERS.
-    """
-    layers = find_bblayers()
-
-    for layer in layers:
-        if layer.endswith(machine):
-            return layer
-
-    print("Unable to find the BSP layer for machine %s." % machine)
-    print("Please make sure it is listed in bblayers.conf")
-    sys.exit(1)
-
-
-def gen_choices_str(choices):
-    """
-    Generate a numbered list of choices from a list of choices for
-    display to the user.
-    """
-    choices_str = ""
-
-    for i, choice in enumerate(choices):
-        choices_str += "\t" + str(i + 1) + ") " + choice + "\n"
-
-    return choices_str
-
-
-def open_user_file(scripts_path, machine, userfile, mode):
-    """
-    Find one of the user files (user-config.cfg, user-patches.scc)
-    associated with the machine (could be in files/,
-    linux-yocto-custom/, etc).  Returns the open file if found, None
-    otherwise.
-
-    The caller is responsible for closing the file returned.
-    """
-    layer = find_bsp_layer(machine)
-    linuxdir = os.path.join(layer, "recipes-kernel/linux")
-    linuxdir_list = os.listdir(linuxdir)
-    for fileobj in linuxdir_list:
-        fileobj_path = os.path.join(linuxdir, fileobj)
-        if os.path.isdir(fileobj_path):
-            userfile_name = os.path.join(fileobj_path, userfile)
-            try:
-                f = open(userfile_name, mode)
-                return f
-            except IOError:
-                continue
-    return None
-
-
-def read_config_items(scripts_path, machine):
-    """
-    Find and return a list of config items (CONFIG_XXX) in a machine's
-    user-defined config fragment [${machine}-user-config.cfg].
-    """
-    config_items = []
-
-    f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            config_items.append(s)
-    f.close()
-
-    return config_items
-
-
-def write_config_items(scripts_path, machine, config_items):
-    """
-    Write (replace) the list of config items (CONFIG_XXX) in a
-    machine's user-defined config fragment [${machine}=user-config.cfg].
-    """
-    f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "w")
-    for item in config_items:
-        f.write(item + "\n")
-    f.close()
-
-    kernel_contents_changed(scripts_path, machine)
-
-
-def yocto_kernel_config_list(scripts_path, machine):
-    """
-    Display the list of config items (CONFIG_XXX) in a machine's
-    user-defined config fragment [${machine}-user-config.cfg].
-    """
-    config_items = read_config_items(scripts_path, machine)
-
-    print("The current set of machine-specific kernel config items for %s is:" % machine)
-    print(gen_choices_str(config_items))
-
-
-def yocto_kernel_config_rm(scripts_path, machine):
-    """
-    Display the list of config items (CONFIG_XXX) in a machine's
-    user-defined config fragment [${machine}-user-config.cfg], prompt the user
-    for one or more to remove, and remove them.
-    """
-    config_items = read_config_items(scripts_path, machine)
-
-    print("Specify the kernel config items to remove:")
-    inp = input(gen_choices_str(config_items))
-    rm_choices = inp.split()
-    rm_choices.sort()
-
-    removed = []
-
-    for choice in reversed(rm_choices):
-        try:
-            idx = int(choice) - 1
-        except ValueError:
-            print("Invalid choice (%s), exiting" % choice)
-            sys.exit(1)
-        if idx < 0 or idx >= len(config_items):
-            print("Invalid choice (%d), exiting" % (idx + 1))
-            sys.exit(1)
-        removed.append(config_items.pop(idx))
-
-    write_config_items(scripts_path, machine, config_items)
-
-    print("Removed items:")
-    for r in removed:
-        print("\t%s" % r)
-
-
-def yocto_kernel_config_add(scripts_path, machine, config_items):
-    """
-    Add one or more config items (CONFIG_XXX) to a machine's
-    user-defined config fragment [${machine}-user-config.cfg].
-    """
-    new_items = []
-    dup_items = []
-
-    cur_items = read_config_items(scripts_path, machine)
-
-    for item in config_items:
-        if not item.startswith("CONFIG") or (not "=y" in item and not "=m" in item):
-            print("Invalid config item (%s), exiting" % item)
-            sys.exit(1)
-        if item not in cur_items and item not in new_items:
-            new_items.append(item)
-        else:
-            dup_items.append(item)
-
-    if len(new_items) > 0:
-        cur_items.extend(new_items)
-        write_config_items(scripts_path, machine, cur_items)
-        print("Added item%s:" % ("" if len(new_items)==1 else "s"))
-        for n in new_items:
-            print("\t%s" % n)
-
-    if len(dup_items) > 0:
-        output="The following item%s already exist%s in the current configuration, ignoring %s:" % \
-            (("","s", "it") if len(dup_items)==1 else ("s", "", "them" ))
-        print(output)
-        for n in dup_items:
-            print("\t%s" % n)
-
-def find_current_kernel(bsp_layer, machine):
-    """
-    Determine the kernel and version currently being used in the BSP.
-    """
-    machine_conf = os.path.join(bsp_layer, "conf/machine/" + machine + ".conf")
-
-    preferred_kernel = preferred_kernel_version = preferred_version_varname = None
-
-    f = open(machine_conf, "r")
-    lines = f.readlines()
-    for line in lines:
-        if line.strip().startswith("PREFERRED_PROVIDER_virtual/kernel"):
-            preferred_kernel = line.split()[-1]
-            preferred_kernel = preferred_kernel.replace('\"','')
-            preferred_version_varname = "PREFERRED_VERSION_" + preferred_kernel
-        if preferred_version_varname and line.strip().startswith(preferred_version_varname):
-            preferred_kernel_version = line.split()[-1]
-            preferred_kernel_version = preferred_kernel_version.replace('\"','')
-            preferred_kernel_version = preferred_kernel_version.replace('%','')
-
-    if preferred_kernel and preferred_kernel_version:
-        return preferred_kernel + "_" + preferred_kernel_version
-    elif preferred_kernel:
-        return preferred_kernel
-
-
-def find_filesdir(scripts_path, machine):
-    """
-    Find the name of the 'files' dir associated with the machine
-    (could be in files/, linux-yocto-custom/, etc).  Returns the name
-    of the files dir if found, None otherwise.
-    """
-    layer = find_bsp_layer(machine)
-    filesdir = None
-    linuxdir = os.path.join(layer, "recipes-kernel/linux")
-    linuxdir_list = os.listdir(linuxdir)
-    for fileobj in linuxdir_list:
-        fileobj_path = os.path.join(linuxdir, fileobj)
-        if os.path.isdir(fileobj_path):
-            # this could be files/ or linux-yocto-custom/, we have no way of distinguishing
-            # so we take the first (and normally only) dir we find as the 'filesdir'
-            filesdir = fileobj_path
-
-    return filesdir
-
-
-def read_patch_items(scripts_path, machine):
-    """
-    Find and return a list of patch items in a machine's user-defined
-    patch list [${machine}-user-patches.scc].
-    """
-    patch_items = []
-
-    f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            fields = s.split()
-            if not fields[0] == "patch":
-                continue
-            patch_items.append(fields[1])
-    f.close()
-
-    return patch_items
-
-
-def write_patch_items(scripts_path, machine, patch_items):
-    """
-    Write (replace) the list of patches in a machine's user-defined
-    patch list [${machine}-user-patches.scc].
-    """
-    f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "w")
-    for item in patch_items:
-        f.write("patch " + item + "\n")
-    f.close()
-
-    kernel_contents_changed(scripts_path, machine)
-
-
-def yocto_kernel_patch_list(scripts_path, machine):
-    """
-    Display the list of patches in a machine's user-defined patch list
-    [${machine}-user-patches.scc].
-    """
-    patches = read_patch_items(scripts_path, machine)
-
-    print("The current set of machine-specific patches for %s is:" % machine)
-    print(gen_choices_str(patches))
-
-
-def yocto_kernel_patch_rm(scripts_path, machine):
-    """
-    Remove one or more patches from a machine's user-defined patch
-    list [${machine}-user-patches.scc].
-    """
-    patches = read_patch_items(scripts_path, machine)
-
-    print("Specify the patches to remove:")
-    inp = input(gen_choices_str(patches))
-    rm_choices = inp.split()
-    rm_choices.sort()
-
-    removed = []
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't rm patch(es) since we couldn't find a 'files' dir")
-        sys.exit(1)
-
-    for choice in reversed(rm_choices):
-        try:
-            idx = int(choice) - 1
-        except ValueError:
-            print("Invalid choice (%s), exiting" % choice)
-            sys.exit(1)
-        if idx < 0 or idx >= len(patches):
-            print("Invalid choice (%d), exiting" % (idx + 1))
-            sys.exit(1)
-        filesdir_patch = os.path.join(filesdir, patches[idx])
-        if os.path.isfile(filesdir_patch):
-            os.remove(filesdir_patch)
-        removed.append(patches[idx])
-        patches.pop(idx)
-
-    write_patch_items(scripts_path, machine, patches)
-
-    print("Removed patches:")
-    for r in removed:
-        print("\t%s" % r)
-
-
-def yocto_kernel_patch_add(scripts_path, machine, patches):
-    """
-    Add one or more patches to a machine's user-defined patch list
-    [${machine}-user-patches.scc].
-    """
-    existing_patches = read_patch_items(scripts_path, machine)
-
-    for patch in patches:
-        if os.path.basename(patch) in existing_patches:
-            print("Couldn't add patch (%s) since it's already been added" % os.path.basename(patch))
-            sys.exit(1)
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't add patch (%s) since we couldn't find a 'files' dir to add it to" % os.path.basename(patch))
-        sys.exit(1)
-
-    new_patches = []
-
-    for patch in patches:
-        if not os.path.isfile(patch):
-            print("Couldn't find patch (%s), exiting" % patch)
-            sys.exit(1)
-        basename = os.path.basename(patch)
-        filesdir_patch = os.path.join(filesdir, basename)
-        shutil.copyfile(patch, filesdir_patch)
-        new_patches.append(basename)
-
-    cur_items = read_patch_items(scripts_path, machine)
-    cur_items.extend(new_patches)
-    write_patch_items(scripts_path, machine, cur_items)
-
-    print("Added patches:")
-    for n in new_patches:
-        print("\t%s" % n)
-
-
-def inc_pr(line):
-    """
-    Add 1 to the PR value in the given bbappend PR line.  For the PR
-    lines in kernel .bbappends after modifications.  Handles PRs of
-    the form PR := "${PR}.1" as well as PR = "r0".
-    """
-    idx = line.find("\"")
-
-    pr_str = line[idx:]
-    pr_str = pr_str.replace('\"','')
-    fields = pr_str.split('.')
-    if len(fields) > 1:
-        fields[1] = str(int(fields[1]) + 1)
-        pr_str = "\"" + '.'.join(fields) + "\"\n"
-    else:
-        pr_val = pr_str[1:]
-        pr_str = "\"" + "r" + str(int(pr_val) + 1) + "\"\n"
-    idx2 = line.find("\"", idx + 1)
-    line = line[:idx] + pr_str
-    
-    return line
-
-
-def kernel_contents_changed(scripts_path, machine):
-    """
-    Do what we need to do to notify the system that the kernel
-    recipe's contents have changed.
-    """
-    layer = find_bsp_layer(machine)
-
-    kernel = find_current_kernel(layer, machine)
-    if not kernel:
-        print("Couldn't determine the kernel for this BSP, exiting.")
-        sys.exit(1)
-
-    kernel_bbfile = os.path.join(layer, "recipes-kernel/linux/" + kernel + ".bbappend")
-    if not os.path.isfile(kernel_bbfile):
-        kernel_bbfile = os.path.join(layer, "recipes-kernel/linux/" + kernel + ".bb")
-        if not os.path.isfile(kernel_bbfile):
-            return
-    kernel_bbfile_prev = kernel_bbfile + ".prev"
-    shutil.copyfile(kernel_bbfile, kernel_bbfile_prev)
-
-    ifile = open(kernel_bbfile_prev, "r")
-    ofile = open(kernel_bbfile, "w")
-    ifile_lines = ifile.readlines()
-    for ifile_line in ifile_lines:
-        if ifile_line.strip().startswith("PR"):
-            ifile_line = inc_pr(ifile_line)
-        ofile.write(ifile_line)
-    ofile.close()
-    ifile.close()
-
-
-def kernels(context):
-    """
-    Return the list of available kernels in the BSP i.e. corresponding
-    to the kernel .bbappends found in the layer.
-    """
-    archdir = os.path.join(context["scripts_path"], "lib/bsp/substrate/target/arch/" + context["arch"])
-    kerndir = os.path.join(archdir, "recipes-kernel/linux")
-    bbglob = os.path.join(kerndir, "*.bbappend")
-
-    bbappends = glob.glob(bbglob)
-
-    kernels = []
-
-    for kernel in bbappends:
-        filename = os.path.splitext(os.path.basename(kernel))[0]
-        idx = filename.find(CLOSE_TAG)
-        if idx != -1:
-            filename = filename[idx + len(CLOSE_TAG):].strip()
-        kernels.append(filename)
-
-    kernels.append("custom")
-
-    return kernels
-
-
-def extract_giturl(file):
-    """
-    Extract the git url of the kernel repo from the kernel recipe's
-    SRC_URI.
-    """
-    url = None
-    f = open(file, "r")
-    lines = f.readlines()
-    for line in lines:
-        line = line.strip()
-        if line.startswith("SRC_URI"):
-            line = line[len("SRC_URI"):].strip()
-            if line.startswith("="):
-                line = line[1:].strip()
-                if line.startswith("\""):
-                    line = line[1:].strip()
-                    prot = "git"
-                    for s in line.split(";"):
-                        if s.startswith("git://"):
-                            url = s
-                        if s.startswith("protocol="):
-                            prot = s.split("=")[1]
-                    if url:
-                        url = prot + url[3:]
-    return url
-
-
-def find_giturl(context):
-    """
-    Find the git url of the kernel repo from the kernel recipe's
-    SRC_URI.
-    """
-    name = context["name"]
-    filebase = context["filename"]
-    scripts_path = context["scripts_path"]
-
-    meta_layer = find_meta_layer()
-
-    kerndir = os.path.join(meta_layer, "recipes-kernel/linux")
-    bbglob = os.path.join(kerndir, "*.bb")
-    bbs = glob.glob(bbglob)
-    for kernel in bbs:
-        filename = os.path.splitext(os.path.basename(kernel))[0]
-        if filename in filebase:
-            giturl = extract_giturl(kernel)
-            return giturl
-    
-    return None
-
-
-def read_features(scripts_path, machine):
-    """
-    Find and return a list of features in a machine's user-defined
-    features fragment [${machine}-user-features.scc].
-    """
-    features = []
-
-    f = open_user_file(scripts_path, machine, machine+"-user-features.scc", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            feature_include = s.split()
-            features.append(feature_include[1].strip())
-    f.close()
-
-    return features
-
-
-def write_features(scripts_path, machine, features):
-    """
-    Write (replace) the list of feature items in a
-    machine's user-defined features fragment [${machine}=user-features.cfg].
-    """
-    f = open_user_file(scripts_path, machine, machine+"-user-features.scc", "w")
-    for item in features:
-        f.write("include " + item + "\n")
-    f.close()
-
-    kernel_contents_changed(scripts_path, machine)
-
-
-def yocto_kernel_feature_list(scripts_path, machine):
-    """
-    Display the list of features used in a machine's user-defined
-    features fragment [${machine}-user-features.scc].
-    """
-    features = read_features(scripts_path, machine)
-
-    print("The current set of machine-specific features for %s is:" % machine)
-    print(gen_choices_str(features))
-
-
-def yocto_kernel_feature_rm(scripts_path, machine):
-    """
-    Display the list of features used in a machine's user-defined
-    features fragment [${machine}-user-features.scc], prompt the user
-    for one or more to remove, and remove them.
-    """
-    features = read_features(scripts_path, machine)
-
-    print("Specify the features to remove:")
-    inp = input(gen_choices_str(features))
-    rm_choices = inp.split()
-    rm_choices.sort()
-
-    removed = []
-
-    for choice in reversed(rm_choices):
-        try:
-            idx = int(choice) - 1
-        except ValueError:
-            print("Invalid choice (%s), exiting" % choice)
-            sys.exit(1)
-        if idx < 0 or idx >= len(features):
-            print("Invalid choice (%d), exiting" % (idx + 1))
-            sys.exit(1)
-        removed.append(features.pop(idx))
-
-    write_features(scripts_path, machine, features)
-
-    print("Removed features:")
-    for r in removed:
-        print("\t%s" % r)
-
-
-def yocto_kernel_feature_add(scripts_path, machine, features):
-    """
-    Add one or more features a machine's user-defined features
-    fragment [${machine}-user-features.scc].
-    """
-    new_items = []
-
-    for item in features:
-        if not item.endswith(".scc"):
-            print("Invalid feature (%s), exiting" % item)
-            sys.exit(1)
-        new_items.append(item)
-
-    cur_items = read_features(scripts_path, machine)
-    cur_items.extend(new_items)
-
-    write_features(scripts_path, machine, cur_items)
-
-    print("Added features:")
-    for n in new_items:
-        print("\t%s" % n)
-
-
-def find_feature_url(git_url):
-    """
-    Find the url of the kern-features.rc kernel for the kernel repo
-    specified from the BSP's kernel recipe SRC_URI.
-    """
-    feature_url = ""
-    if git_url.startswith("git://"):
-        git_url = git_url[len("git://"):].strip()
-        s = git_url.split("/")
-        if s[1].endswith(".git"):
-            s[1] = s[1][:len(s[1]) - len(".git")]
-        feature_url = "http://" + s[0] + "/cgit/cgit.cgi/" + s[1] + \
-            "/plain/meta/cfg/kern-features.rc?h=meta"
-
-    return feature_url
-
-
-def find_feature_desc(lines):
-    """
-    Find the feature description and compatibility in the passed-in
-    set of lines.  Returns a string string of the form 'desc
-    [compat]'.
-    """
-    desc = "no description available"
-    compat = "unknown"
-
-    for line in lines:
-        idx = line.find("KFEATURE_DESCRIPTION")
-        if idx != -1:
-            desc = line[idx + len("KFEATURE_DESCRIPTION"):].strip()
-            if desc.startswith("\""):
-                desc = desc[1:]
-                if desc.endswith("\""):
-                    desc = desc[:-1]
-        else:
-            idx = line.find("KFEATURE_COMPATIBILITY")
-            if idx != -1:
-                compat = line[idx + len("KFEATURE_COMPATIBILITY"):].strip()
-
-    return desc + " [" + compat + "]"
-
-
-def print_feature_descs(layer, feature_dir):
-    """
-    Print the feature descriptions for the features in feature_dir.
-    """
-    kernel_files_features = os.path.join(layer, "recipes-kernel/linux/files/" +
-                                         feature_dir)
-    for root, dirs, files in os.walk(kernel_files_features):
-        for file in files:
-            if file.endswith("~") or file.endswith("#"):
-                continue
-            if file.endswith(".scc"):
-                fullpath = os.path.join(layer, "recipes-kernel/linux/files/" +
-                                        feature_dir + "/" + file)
-                f = open(fullpath)
-                feature_desc = find_feature_desc(f.readlines())
-                print(feature_dir + "/" + file + ": " + feature_desc)
-
-
-def yocto_kernel_available_features_list(scripts_path, machine):
-    """
-    Display the list of all the kernel features available for use in
-    BSPs, as gathered from the set of feature sources.
-    """
-    layer = find_bsp_layer(machine)
-    kernel = find_current_kernel(layer, machine)
-    if not kernel:
-        print("Couldn't determine the kernel for this BSP, exiting.")
-        sys.exit(1)
-
-    context = create_context(machine, "arch", scripts_path)
-    context["name"] = "name"
-    context["filename"] = kernel
-    giturl = find_giturl(context)
-    feature_url = find_feature_url(giturl)
-
-    feature_cmd = "wget -q -O - " + feature_url
-    tmp = subprocess.Popen(feature_cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    print("The current set of kernel features available to %s is:\n" % machine)
-
-    if tmp:
-        tmpline = tmp.split("\n")
-        in_kernel_options = False
-        for line in tmpline:
-            if not "=" in line:
-                if in_kernel_options:
-                    break
-                if "kernel-options" in line:
-                    in_kernel_options = True
-                continue
-            if in_kernel_options:
-                feature_def = line.split("=")
-                feature_type = feature_def[0].strip()
-                feature = feature_def[1].strip()
-                desc = get_feature_desc(giturl, feature)
-                print("%s: %s" % (feature, desc))
-
-    print("[local]")
-
-    print_feature_descs(layer, "cfg")
-    print_feature_descs(layer, "features")
-
-
-def find_feature_desc_url(git_url, feature):
-    """
-    Find the url of the kernel feature in the kernel repo specified
-    from the BSP's kernel recipe SRC_URI.
-    """
-    feature_desc_url = ""
-    if git_url.startswith("git://"):
-        git_url = git_url[len("git://"):].strip()
-        s = git_url.split("/")
-        if s[1].endswith(".git"):
-            s[1] = s[1][:len(s[1]) - len(".git")]
-        feature_desc_url = "http://" + s[0] + "/cgit/cgit.cgi/" + s[1] + \
-            "/plain/meta/cfg/kernel-cache/" + feature + "?h=meta"
-
-    return feature_desc_url
-
-
-def get_feature_desc(git_url, feature):
-    """
-    Return a feature description of the form 'description [compatibility]
-    BSPs, as gathered from the set of feature sources.
-    """
-    feature_desc_url = find_feature_desc_url(git_url, feature)
-    feature_desc_cmd = "wget -q -O - " + feature_desc_url
-    tmp = subprocess.Popen(feature_desc_cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    return find_feature_desc(tmp.split("\n"))
-
-
-def yocto_kernel_feature_describe(scripts_path, machine, feature):
-    """
-    Display the description of a specific kernel feature available for
-    use in a BSP.
-    """
-    layer = find_bsp_layer(machine)
-
-    kernel = find_current_kernel(layer, machine)
-    if not kernel:
-        print("Couldn't determine the kernel for this BSP, exiting.")
-        sys.exit(1)
-
-    context = create_context(machine, "arch", scripts_path)
-    context["name"] = "name"
-    context["filename"] = kernel
-    giturl = find_giturl(context)
-
-    desc = get_feature_desc(giturl, feature)
-
-    print(desc)
-
-
-def check_feature_name(feature_name):
-    """
-    Sanity-check the feature name for create/destroy.  Return False if not OK.
-    """
-    if not feature_name.endswith(".scc"):
-        print("Invalid feature name (must end with .scc) [%s], exiting" % feature_name)
-        return False
-
-    if "/" in feature_name:
-        print("Invalid feature name (don't specify directory) [%s], exiting" % feature_name)
-        return False
-
-    return True
-
-
-def check_create_input(feature_items):
-    """
-    Sanity-check the create input.  Return False if not OK.
-    """
-    if not check_feature_name(feature_items[0]):
-        return False
-
-    if feature_items[1].endswith(".patch") or feature_items[1].startswith("CONFIG_"):
-        print("Missing description and/or compatibilty [%s], exiting" % feature_items[1])
-        return False
-
-    if feature_items[2].endswith(".patch") or feature_items[2].startswith("CONFIG_"):
-        print("Missing description and/or compatibility [%s], exiting" % feature_items[1])
-        return False
-
-    return True
-
-
-def yocto_kernel_feature_create(scripts_path, machine, feature_items):
-    """
-    Create a recipe-space kernel feature in a BSP.
-    """
-    if not check_create_input(feature_items):
-        sys.exit(1)
-
-    feature = feature_items[0]
-    feature_basename = feature.split(".")[0]
-    feature_description = feature_items[1]
-    feature_compat = feature_items[2]
-
-    patches = []
-    cfg_items = []
-
-    for item in feature_items[3:]:
-        if item.endswith(".patch"):
-            patches.append(item)
-        elif item.startswith("CONFIG"):
-            if ("=y" in item or "=m" in item):
-                cfg_items.append(item)
-        else:
-            print("Invalid feature item (must be .patch or CONFIG_*) [%s], exiting" % item)
-            sys.exit(1)
-
-    feature_dirname = "cfg"
-    if patches:
-        feature_dirname = "features"
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't add feature (%s), no 'files' dir found" % feature)
-        sys.exit(1)
-
-    featdir = os.path.join(filesdir, feature_dirname)
-    if not os.path.exists(featdir):
-        os.mkdir(featdir)
-
-    for patch in patches:
-        if not os.path.isfile(patch):
-            print("Couldn't find patch (%s), exiting" % patch)
-            sys.exit(1)
-        basename = os.path.basename(patch)
-        featdir_patch = os.path.join(featdir, basename)
-        shutil.copyfile(patch, featdir_patch)
-
-    new_cfg_filename = os.path.join(featdir, feature_basename + ".cfg")
-    new_cfg_file = open(new_cfg_filename, "w")
-    for cfg_item in cfg_items:
-        new_cfg_file.write(cfg_item + "\n")
-    new_cfg_file.close()
-
-    new_feature_filename = os.path.join(featdir, feature_basename + ".scc")
-    new_feature_file = open(new_feature_filename, "w")
-    new_feature_file.write("define KFEATURE_DESCRIPTION \"" + feature_description + "\"\n")
-    new_feature_file.write("define KFEATURE_COMPATIBILITY " + feature_compat + "\n\n")
-
-    for patch in patches:
-        patch_dir, patch_file = os.path.split(patch)
-        new_feature_file.write("patch " + patch_file + "\n")
-
-    new_feature_file.write("kconf non-hardware " + feature_basename + ".cfg\n")
-    new_feature_file.close()
-
-    print("Added feature:")
-    print("\t%s" % feature_dirname + "/" + feature)
-
-
-def feature_in_use(scripts_path, machine, feature):
-    """
-    Determine whether the specified feature is in use by the BSP.
-    Return True if so, False otherwise.
-    """
-    features = read_features(scripts_path, machine)
-    for f in features:
-        if f == feature:
-            return True
-    return False
-
-
-def feature_remove(scripts_path, machine, feature):
-    """
-    Remove the specified feature from the available recipe-space
-    features defined for the BSP.
-    """
-    features = read_features(scripts_path, machine)
-    new_features = []
-    for f in features:
-        if f == feature:
-            continue
-        new_features.append(f)
-    write_features(scripts_path, machine, new_features)
-
-
-def yocto_kernel_feature_destroy(scripts_path, machine, feature):
-    """
-    Remove a recipe-space kernel feature from a BSP.
-    """
-    if not check_feature_name(feature):
-        sys.exit(1)
-
-    if feature_in_use(scripts_path, machine, "features/" + feature) or \
-            feature_in_use(scripts_path, machine, "cfg/" + feature):
-        print("Feature %s is in use (use 'feature rm' to un-use it first), exiting" % feature)
-        sys.exit(1)
-
-    filesdir = find_filesdir(scripts_path, machine)
-    if not filesdir:
-        print("Couldn't destroy feature (%s), no 'files' dir found" % feature)
-        sys.exit(1)
-
-    feature_dirname = "features"
-    featdir = os.path.join(filesdir, feature_dirname)
-    if not os.path.exists(featdir):
-        print("Couldn't find feature directory (%s)" % feature_dirname)
-        sys.exit(1)
-
-    feature_fqn = os.path.join(featdir, feature)
-    if not os.path.exists(feature_fqn):
-        feature_dirname = "cfg"
-        featdir = os.path.join(filesdir, feature_dirname)
-        if not os.path.exists(featdir):
-            print("Couldn't find feature directory (%s)" % feature_dirname)
-            sys.exit(1)
-        feature_fqn = os.path.join(featdir, feature_filename)
-        if not os.path.exists(feature_fqn):
-            print("Couldn't find feature (%s)" % feature)
-            sys.exit(1)
-
-    f = open(feature_fqn, "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s.startswith("patch ") or s.startswith("kconf "):
-            split_line = s.split()
-            filename = os.path.join(featdir, split_line[-1])
-            if os.path.exists(filename):
-                os.remove(filename)
-    f.close()
-    os.remove(feature_fqn)
-
-    feature_remove(scripts_path, machine, feature)
-
-    print("Removed feature:")
-    print("\t%s" % feature_dirname + "/" + feature)
-
-
-def base_branches(context):
-    """
-    Return a list of the base branches found in the kernel git repo.
-    """
-    giturl = find_giturl(context)
-
-    print("Getting branches from remote repo %s..." % giturl)
-
-    gitcmd = "git ls-remote %s *heads* 2>&1" % (giturl)
-    tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    branches = []
-
-    if tmp:
-        tmpline = tmp.split("\n")
-        for line in tmpline:
-            if len(line)==0:
-                break;
-            if not line.endswith("base"):
-                continue;
-            idx = line.find("refs/heads/")
-            kbranch = line[idx + len("refs/heads/"):]
-            if kbranch.find("/") == -1 and kbranch.find("base") == -1:
-                continue
-            idx = kbranch.find("base")
-            branches.append(kbranch[:idx - 1])
-
-    return branches
-
-
-def all_branches(context):
-    """
-    Return a list of all the branches found in the kernel git repo.
-    """
-    giturl = find_giturl(context)
-
-    print("Getting branches from remote repo %s..." % giturl)
-
-    gitcmd = "git ls-remote %s *heads* 2>&1" % (giturl)
-    tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-
-    branches = []
-
-    base_prefixes = None
-
-    try:
-        branches_base = context["branches_base"]
-        if branches_base:
-            base_prefixes = branches_base.split(":")
-    except KeyError:
-        pass
-
-    arch = context["arch"]
-
-    if tmp:
-        tmpline = tmp.split("\n")
-        for line in tmpline:
-            if len(line)==0:
-                break;
-            idx = line.find("refs/heads/")
-            kbranch = line[idx + len("refs/heads/"):]
-            kbranch_prefix = kbranch.rsplit("/", 1)[0]
-
-            if base_prefixes:
-                for base_prefix in base_prefixes:
-                    if kbranch_prefix == base_prefix:
-                        branches.append(kbranch)
-                continue
-
-            if (kbranch.find("/") != -1 and
-                (kbranch.find("standard") != -1 or kbranch.find("base") != -1) or
-                kbranch == "base"):
-                branches.append(kbranch)
-                continue
-
-    return branches
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/machine.conf
deleted file mode 100644
index 624750c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/conf/machine/machine.conf
+++ /dev/null
@@ -1,100 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-           xf86-video-fbdev \
-           "
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
-
-EXTRA_IMAGEDEPENDS += "u-boot"
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_cortexa8" }}
-{{ input type:"choice" val:"tune_arm1136jf_s" msg:"arm1136jf-s tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm920t" msg:"arm920t tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm926ejs" msg:"arm926ejs tuning optimizations" }}
-{{ input type:"choice" val:"tune_arm9tdmi" msg:"arm9tdmi tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa5" msg:"cortexa5 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa7" msg:"cortexa7 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa8" msg:"cortexa8 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa9" msg:"cortexa9 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexa15" msg:"cortexa15 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexm1" msg:"cortexm1 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexm3" msg:"cortexm3 tuning optimizations" }}
-{{ input type:"choice" val:"tune_cortexr4" msg:"cortexr4 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ep9312" msg:"ep9312 tuning optimizations" }}
-{{ input type:"choice" val:"tune_iwmmxt" msg:"iwmmxt tuning optimizations" }}
-{{ input type:"choice" val:"tune_strongarm1100" msg:"strongarm1100 tuning optimizations" }}
-{{ input type:"choice" val:"tune_xscale" msg:"xscale tuning optimizations" }}
-{{ if tunefile == "tune_arm1136jf_s": }}
-include conf/machine/include/tune-arm1136jf-s.inc
-{{ if tunefile == "tune_arm920t": }}
-include conf/machine/include/tune-arm920t.inc
-{{ if tunefile == "tune_arm926ejs": }}
-include conf/machine/include/tune-arm926ejs.inc
-{{ if tunefile == "tune_arm9tdmi": }}
-include conf/machine/include/tune-arm9tdmi.inc
-{{ if tunefile == "tune_cortexa5": }}
-include conf/machine/include/tune-cortexa5.inc
-{{ if tunefile == "tune_cortexa7": }}
-include conf/machine/include/tune-cortexa7.inc
-{{ if tunefile == "tune_cortexa8": }}
-DEFAULTTUNE ?= "cortexa8hf-neon"
-include conf/machine/include/tune-cortexa8.inc
-{{ if tunefile == "tune_cortexa9": }}
-include conf/machine/include/tune-cortexa9.inc
-{{ if tunefile == "tune_cortexa15": }}
-include conf/machine/include/tune-cortexa15.inc
-{{ if tunefile == "tune_cortexm1": }}
-include conf/machine/include/tune-cortexm1.inc
-{{ if tunefile == "tune_cortexm3": }}
-include conf/machine/include/tune-cortexm3.inc
-{{ if tunefile == "tune_cortexr4": }}
-include conf/machine/include/tune-cortexr4.inc
-{{ if tunefile == "tune_ep9312": }}
-include conf/machine/include/tune-ep9312.inc
-{{ if tunefile == "tune_iwmmxt": }}
-include conf/machine/include/tune-iwmmxt.inc
-{{ if tunefile == "tune_strongarm1100": }}
-include conf/machine/include/tune-strongarm1100.inc
-{{ if tunefile == "tune_xscale": }}
-include conf/machine/include/tune-xscale.inc
-
-IMAGE_FSTYPES += "tar.bz2 jffs2"
-EXTRA_IMAGECMD_jffs2 = "-lnp "
-
-SERIAL_CONSOLE = "115200 ttyO0"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-KERNEL_IMAGETYPE = "uImage"
-KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb"
-KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
-
-SPL_BINARY = "MLO"
-UBOOT_SUFFIX = "img"
-{{ input type:"edit" name:"uboot_machine" prio:"40" msg:"Please specify a value for UBOOT_MACHINE:" default:"am335x_evm_config" }}
-UBOOT_MACHINE = "{{=uboot_machine}}"
-{{ input type:"edit" name:"uboot_entrypoint" prio:"40" msg:"Please specify a value for UBOOT_ENTRYPOINT:" default:"0x80008000" }}
-UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}"
-{{ input type:"edit" name:"uboot_loadaddress" prio:"40" msg:"Please specify a value for UBOOT_LOADADDRESS:" default:"0x80008000" }}
-UBOOT_LOADADDRESS = "{{=uboot_loadaddress}}"
-
-MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
-
-IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index bc52893..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1,34 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-Section "Module"
-	Load	"extmod"
-	Load	"dbe"
-	Load	"glx"
-	Load	"freetype"
-	Load	"type1"
-	Load	"record"
-	Load	"dri"
-EndSection
-
-Section "Monitor"
-	Identifier	"Builtin Default Monitor"
-EndSection
-
-Section "Device"
-	Identifier	"Builtin Default fbdev Device 0"
-	Driver		"omapfb"
-EndSection
-
-Section "Screen"
-	Identifier	"Builtin Default fbdev Screen 0"
-	Device		"Builtin Default fbdev Device 0"
-	Monitor		"Builtin Default Monitor"
-EndSection
-
-Section "ServerLayout"
-	Identifier	"Builtin Default Layout"
-	Screen		"Builtin Default fbdev Screen 0"
-EndSection
-
-Section "ServerFlags"
-	Option		"DontZap"  "0"
-EndSection
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 3083003..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg
deleted file mode 100644
index 9bfc90c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-# yocto-bsp-filename {{=machine}}-non_hardware.cfg
-#
-# Miscellaneous filesystems
-#
-CONFIG_NFS_DEF_FILE_IO_SIZE=1024
-
-#
-# Multiple Device Support
-#
-# CONFIG_MD is not set
-
-# Kernel Features
-#
-CONFIG_NO_HZ=y
-
-#
-# CPUIdle
-#
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_FS=y
-
-#
-# Power management options
-#
-CONFIG_PM_DEBUG=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index ea6966c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,15 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH arm
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for preempt-rt kernels
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index 8a88157..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,15 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH arm
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for standard kernels
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 921b7e7..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH arm
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index a2e1ae0..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,321 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-#
-# System Type
-#
-CONFIG_ARCH_OMAP=y
-
-#
-# TI OMAP Implementations
-#
-# CONFIG_ARCH_OMAP2 is not set
-CONFIG_ARCH_OMAP3=y
-
-#
-# TI OMAP Common Features
-#
-CONFIG_ARCH_OMAP2PLUS=y
-
-#
-# OMAP Feature Selections
-#
-CONFIG_OMAP_32K_TIMER=y
-CONFIG_OMAP_32K_TIMER_HZ=128
-CONFIG_OMAP_DM_TIMER=y
-CONFIG_OMAP_RESET_CLOCKS=y
-CONFIG_OMAP_SMARTREFLEX=y
-CONFIG_OMAP_SMARTREFLEX_CLASS3=y
-CONFIG_OMAP_MBOX_FWK=m
-CONFIG_OMAP_MBOX_KFIFO_SIZE=256
-
-#
-# OMAP Board Type
-#
-CONFIG_MACH_OMAP3_BEAGLE=y
-
-#
-# Processor Features
-#
-CONFIG_ARM_THUMBEE=y
-CONFIG_ARM_ERRATA_430973=y
-
-#
-# Kernel Features
-#
-CONFIG_LEDS=y
-
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_OMAP=y
-CONFIG_SERIAL_OMAP_CONSOLE=y
-
-#
-# At least one emulation must be selected
-#
-CONFIG_VFP=y
-CONFIG_NEON=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_RUNTIME=y
-
-#
-# Generic Driver Options
-#
-CONFIG_MTD=y
-CONFIG_MTD_CMDLINE_PARTS=y
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_INTELEXT=y
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_NAND=y
-
-CONFIG_MTD_NAND_OMAP2=y
-
-CONFIG_MTD_UBI=y
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_SMSC911X=y
-CONFIG_USB_NET_SMSC95XX=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_EVDEV=y
-
-#
-# Input Device Drivers
-#
-CONFIG_KEYBOARD_TWL4030=y
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ADS7846=y
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_I2C=y
-CONFIG_I2C_OMAP=y
-CONFIG_SPI=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_OMAP24XX=y
-
-#
-# I2C GPIO expanders:
-#
-CONFIG_GPIO_TWL4030=y
-
-#
-# SPI GPIO expanders:
-#
-CONFIG_OMAP_WATCHDOG=y
-CONFIG_WATCHDOG_NOWAYOUT=y
-
-#
-# Multifunction device drivers
-#
-CONFIG_TWL4030_CORE=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_DUMMY=y
-CONFIG_REGULATOR_TWL4030=y
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_DRM=m
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FIRMWARE_EDID is not set
-# CONFIG_FB_DDC is not set
-# CONFIG_FB_BOOT_VESA_SUPPORT is not set
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
-# CONFIG_FB_SYS_FILLRECT is not set
-# CONFIG_FB_SYS_COPYAREA is not set
-# CONFIG_FB_SYS_IMAGEBLIT is not set
-# CONFIG_FB_FOREIGN_ENDIAN is not set
-# CONFIG_FB_SYS_FOPS is not set
-# CONFIG_FB_SVGALIB is not set
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-# CONFIG_FB_TILEBLITTING is not set
-
-#
-# Frame buffer hardware drivers
-#
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_TMIO is not set
-# CONFIG_FB_VIRTUAL is not set
-# CONFIG_FB_METRONOME is not set
-# CONFIG_FB_MB862XX is not set
-# CONFIG_FB_BROADSHEET is not set
-# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
-CONFIG_OMAP2_VRAM=y
-CONFIG_OMAP2_VRFB=y
-CONFIG_OMAP2_DSS=y
-CONFIG_OMAP2_VRAM_SIZE=14
-CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
-# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
-CONFIG_OMAP2_DSS_DPI=y
-# CONFIG_OMAP2_DSS_RFBI is not set
-CONFIG_OMAP2_DSS_VENC=y
-# CONFIG_OMAP2_DSS_SDI is not set
-CONFIG_OMAP2_DSS_DSI=y
-# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
-CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
-CONFIG_FB_OMAP2=y
-CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
-CONFIG_FB_OMAP2_NUM_FBS=2
-
-#
-# OMAP2/3 Display Device Drivers
-#
-CONFIG_PANEL_GENERIC_DPI=y
-CONFIG_PANEL_DVI=y
-CONFIG_PANEL_SHARP_LS037V7DW01=y
-# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set
-# CONFIG_PANEL_TAAL is not set
-CONFIG_PANEL_TPO_TD043MTEA1=m
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-
-#
-# Display device support
-#
-CONFIG_DISPLAY_SUPPORT=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-
-#
-# Console display driver support
-#
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_LOGO=y
-# CONFIG_VGA_CONSOLE is not set
-
-# DMA Devices
-CONFIG_DMADEVICES=y
-CONFIG_DMA_OMAP=y
-CONFIG_DMA_OF=y
-
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_SOC=y
-CONFIG_SND_OMAP_SOC=y
-CONFIG_SND_OMAP_SOC_OMAP_TWL4030=y
-
-#
-# USB Input Devices
-#
-CONFIG_USB=y
-CONFIG_USB_SUPPORT=y
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_OTG=y
-# CONFIG_USB_OTG_WHITELIST is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_MUSB_HDRC=y
-CONFIG_USB_MUSB_OMAP2PLUS=y
-CONFIG_USB_OMAP=y
-
-#
-# OMAP 343x high speed USB support
-#
-CONFIG_USB_MUSB_OTG=y
-CONFIG_USB_GADGET_MUSB_HDRC=y
-CONFIG_USB_MUSB_HDRC_HCD=y
-CONFIG_USB_INVENTRA_DMA=y
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_DUALSPEED=y
-CONFIG_USB_OTG_UTILS=y
-CONFIG_TWL4030_USB=y
-
-# USB gadget modules
-CONFIG_USB_G_NCM=y
-CONFIG_USB_MASS_STORAGE=y
-
-CONFIG_MMC=y
-
-#
-# MMC/SD Host Controller Drivers
-#
-CONFIG_MMC_OMAP_HS=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_TWL4030=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_VFAT_FS=y
-
-#
-# Multimedia core support
-#
-
-# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
-
-#
-# Advanced Power Management Emulation support
-#
-CONFIG_APM_EMULATION=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index fb3866f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,6 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-kconf non-hardware {{machine}}-non_hardware.cfg
-
-include features/usb-net/usb-net.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT
deleted file mode 100644
index fb950dc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy 
-of this software and associated documentation files (the "Software"), to deal 
-in the Software without restriction, including without limitation the rights 
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-copies of the Software, and to permit persons to whom the Software is 
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in 
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-THE SOFTWARE.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README
deleted file mode 100644
index 928659f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README
+++ /dev/null
@@ -1,118 +0,0 @@
-This README file contains information on building the meta-{{=machine}}
-BSP layer, and booting the images contained in the /binary directory.
-Please see the corresponding sections below for details.
-
-
-Dependencies
-============
-
-This layer depends on:
-
-  URI: git://git.openembedded.org/bitbake
-  branch: master
-
-  URI: git://git.openembedded.org/openembedded-core
-  layers: meta
-  branch: master
-
-  URI: git://git.yoctoproject.org/xxxx
-  layers: xxxx
-  branch: master
-
-
-Patches
-=======
-
-Please submit any patches against this BSP to the Yocto mailing list
-(yocto@yoctoproject.org) and cc: the maintainer:
-
-Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
-
-Please see the meta-xxxx/MAINTAINERS file for more details.
-
-
-Table of Contents
-=================
-
-  I. Building the meta-{{=machine}} BSP layer
- II. Booting the images in /binary
-
-
-I. Building the meta-{{=machine}} BSP layer
-========================================
-
---- replace with specific instructions for your layer ---
-
-In order to build an image with BSP support for a given release, you
-need to download the corresponding BSP tarball from the 'Board Support
-Package (BSP) Downloads' page of the Yocto Project website.
-
-Having done that, and assuming you extracted the BSP tarball contents
-at the top-level of your yocto build tree, you can build a
-{{=machine}} image by adding the location of the meta-{{=machine}}
-layer to bblayers.conf, along with any other layers needed (to access
-common metadata shared between BSPs) e.g.:
-
-  yocto/meta-xxxx \
-  yocto/meta-xxxx/meta-{{=machine}} \
-
-To enable the {{=machine}} layer, add the {{=machine}} MACHINE to local.conf:
-
-  MACHINE ?= "{{=machine}}"
-
-You should then be able to build a {{=machine}} image as such:
-
-  $ source oe-init-build-env
-  $ bitbake core-image-sato
-
-At the end of a successful build, you should have a live image that
-you can boot from a USB flash drive (see instructions on how to do
-that below, in the section 'Booting the images from /binary').
-
-As an alternative to downloading the BSP tarball, you can also work
-directly from the meta-xxxx git repository.  For each BSP in the
-'meta-xxxx' repository, there are multiple branches, one corresponding
-to each major release starting with 'laverne' (0.90), in addition to
-the latest code which tracks the current master (note that not all
-BSPs are present in every release).  Instead of extracting a BSP
-tarball at the top level of your yocto build tree, you can
-equivalently check out the appropriate branch from the meta-xxxx
-repository at the same location.
-
-
-II. Booting the images in /binary
-=================================
-
---- replace with specific instructions for your platform ---
-
-This BSP contains bootable live images, which can be used to directly
-boot Yocto off of a USB flash drive.
-
-Under Linux, insert a USB flash drive.  Assuming the USB flash drive
-takes device /dev/sdf, use dd to copy the live image to it.  For
-example:
-
-# dd if=core-image-sato-{{=machine}}-20101207053738.hddimg of=/dev/sdf
-# sync
-# eject /dev/sdf
-
-This should give you a bootable USB flash device.  Insert the device
-into a bootable USB socket on the target, and power on.  This should
-result in a system booted to the Sato graphical desktop.
-
-If you want a terminal, use the arrows at the top of the UI to move to
-different pages of available applications, one of which is named
-'Terminal'.  Clicking that should give you a root terminal.
-
-If you want to ssh into the system, you can use the root terminal to
-ifconfig the IP address and use that to ssh in.  The root password is
-empty, so to log in type 'root' for the user name and hit 'Enter' at
-the Password prompt: and you should be in.
-
-----
-
-If you find you're getting corrupt images on the USB (it doesn't show
-the syslinux boot: prompt, or the boot: prompt contains strange
-characters), try doing this first:
-
-# dd if=/dev/zero of=/dev/sdf bs=1M count=512
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README.sources b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README.sources
deleted file mode 100644
index 3c4cb7b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/README.sources
+++ /dev/null
@@ -1,17 +0,0 @@
-The sources for the packages comprising the images shipped with this
-BSP can be found at the following location:
-
-http://downloads.yoctoproject.org/mirror/sources/
-
-The metadata used to generate the images shipped with this BSP, in
-addition to the code contained in this BSP, can be found at the
-following location:
-
-http://www.yoctoproject.org/downloads/yocto-1.1/poky-edison-6.0.tar.bz2
-
-The metadata used to generate the images shipped with this BSP, in
-addition to the code contained in this BSP, can also be found at the
-following locations:
-
-git://git.yoctoproject.org/poky.git
-git://git.yoctoproject.org/meta-xxxx
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf
deleted file mode 100644
index 5529f45..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH .= ":${LAYERDIR}"
-
-# We have a recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-	${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "{{=machine}}"
-BBFILE_PATTERN_{{=machine}} = "^${LAYERDIR}/"
-BBFILE_PRIORITY_{{=machine}} = "6"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig
deleted file mode 100644
index 3b85d38..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-# Assume a USB mouse and keyboard are connected
-{{ input type:"boolean" name:"touchscreen" msg:"Does your BSP have a touchscreen? (y/n)" default:"n" }}
-HAVE_TOUCHSCREEN={{=touchscreen}}
-{{ input type:"boolean" name:"keyboard" msg:"Does your BSP have a keyboard? (y/n)" default:"y" }}
-HAVE_KEYBOARD={{=keyboard}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend
deleted file mode 100644
index 6d4804d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 663dddb..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,26 +0,0 @@
-{{ if kernel_choice == "custom": }}
-{{ input type:"boolean" name:"custom_kernel_remote" prio:"20" msg:"Is the custom kernel you'd like to use in a remote git repo? (y/n)" default:"y"}}
-
-{{ if kernel_choice == "custom" and custom_kernel_remote == "y": }}
-{{ input type:"edit-git-repo" name:"custom_kernel_remote_path" prio:"20" msg:"Please enter the full URI to the remote git repo (the default corresponds to linux-stable v3.16.3)" default:"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"}}
-
-{{ if kernel_choice == "custom" and custom_kernel_remote == "n": }}
-{{ input type:"edit-git-repo" name:"custom_kernel_local_path" prio:"20" msg:"You've indicated that you're not using a remote git repo.  Please enter the full path to the local git repo you want to use (the default assumes a local linux-stable v3.16.3)" default:"/home/trz/yocto/kernels/linux-stable.git"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"boolean" name:"custom_kernel_need_kbranch" prio:"20" msg:"Do you need to use a specific (non-master) branch? (y/n)" default:"n"}}
-
-{{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y": }}
-{{ input type:"edit" name:"custom_kernel_kbranch" prio:"20" msg:"Please enter the branch you want to use (the default branch corresponds to the linux-stable 'linux-3.16.y' branch):" default:"linux-3.16.y"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit" name:"custom_kernel_srcrev" prio:"20" msg:"Please enter the SRCREV (commit id) you'd like to use (use '${AUTOREV}' to track the current HEAD):" default:"${AUTOREV}"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit" name:"custom_kernel_linux_version" prio:"20" msg:"Please enter the Linux version of the kernel you've specified:" default:"3.16.3"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit" name:"custom_kernel_linux_version_extension" prio:"20" msg:"Please enter a Linux version extension if you want (it will show up at the end of the kernel name shown by uname):" default:"-custom"}}
-
-{{ if kernel_choice == "custom": }}
-{{ input type:"edit-file" name:"custom_kernel_defconfig" prio:"20" msg:"It's recommended (but not required) that custom kernels be built using a defconfig.  Please enter the full path to the defconfig for your kernel (NOTE: if you don't specify a defconfig the kernel probably won't build or boot):" default:""}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
deleted file mode 100644
index 3ba4226..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "custom": }} this
-# This file was derived from the linux-yocto-custom.bb recipe in
-# oe-core.
-#
-# linux-yocto-custom.bb:
-#
-#   A yocto-bsp-generated kernel recipe that uses the linux-yocto and
-#   oe-core kernel classes to apply a subset of yocto kernel
-#   management to git managed kernel repositories.
-#
-# Warning:
-#
-#   Building this kernel without providing a defconfig or BSP
-#   configuration will result in build or boot errors. This is not a
-#   bug.
-#
-# Notes:
-#
-#   patches: patches can be merged into to the source git tree itself,
-#            added via the SRC_URI, or controlled via a BSP
-#            configuration.
-#
-#   example configuration addition:
-#            SRC_URI += "file://smp.cfg"
-#   example patch addition:
-#            SRC_URI += "file://0001-linux-version-tweak.patch
-#   example feature addition:
-#            SRC_URI += "file://feature.scc"
-#
-
-inherit kernel
-require recipes-kernel/linux/linux-yocto.inc
-
-{{ if kernel_choice == "custom" and custom_kernel_remote == "y": }}
-SRC_URI = "{{=custom_kernel_remote_path}};protocol=git;bareclone=1;branch=${KBRANCH}"
-{{ if kernel_choice == "custom" and custom_kernel_remote == "n": }}
-SRC_URI = "git://{{=custom_kernel_local_path}};protocol=file;bareclone=1;branch=${KBRANCH}"
-
-SRC_URI += "file://defconfig"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-{{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y" and custom_kernel_kbranch and custom_kernel_kbranch != "master": }}
-KBRANCH = "{{=custom_kernel_kbranch}}"
-
-LINUX_VERSION ?= "{{=custom_kernel_linux_version}}"
-LINUX_VERSION_EXTENSION ?= "{{=custom_kernel_linux_version_extension}}"
-
-SRCREV="{{=custom_kernel_srcrev}}"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall
deleted file mode 100644
index 017d206..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice == "custom": }} linux-yocto-custom
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
deleted file mode 100644
index ceb0ffa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Placeholder for custom default kernel configuration.  yocto-bsp will
-# replace this file with a user-specified defconfig.
-#
-{{ if custom_kernel_defconfig: replace_file(of, custom_kernel_defconfig) }}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg
deleted file mode 100644
index 922309d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
-#
-# Used by yocto-kernel to manage config options.
-#
-# yocto-kernel may change the contents of this file in any
-# way it sees fit, including removing comments like this,
-# so don't manually make any modifications you don't want
-# to lose.
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc
deleted file mode 100644
index 6d1138f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc
+++ /dev/null
@@ -1,9 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
-#
-# Used by yocto-kernel to manage patches.
-#
-# yocto-kernel may change the contents of this file in any
-# way it sees fit, including removing comments like this,
-# so don't manually make any modifications you don't want
-# to lose.
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
deleted file mode 100644
index 1ba8201..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-#
-# A convenient place to add config options, nothing more.
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
deleted file mode 100644
index 64d3ed1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc
+++ /dev/null
@@ -1,16 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-#
-# The top-level 'feature' for the {{=machine}} custom kernel.
-#
-# Essentially this is a convenient top-level container or starting
-# point for adding lower-level config fragements and features.
-#
-
-# {{=machine}}.cfg in the linux-yocto-custom subdir is just a
-# convenient place for adding random config fragments.
-
-kconf hardware {{=machine}}.cfg
-
-# These are used by yocto-kernel to add config fragments and features.
-# Don't remove if you plan on using yocto-kernel with this BSP.
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
deleted file mode 100644
index 4745c1c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
+++ /dev/null
@@ -1,69 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_core2" }}
-{{ input type:"choice" val:"tune_i586" msg:"i586 tuning optimizations" }}
-{{ input type:"choice" val:"tune_atom" msg:"Atom tuning optimizations" }}
-{{ input type:"choice" val:"tune_core2" msg:"Core2 tuning optimizations" }}
-{{ if tunefile == "tune_i586": }}
-require conf/machine/include/tune-i586.inc
-{{ if tunefile == "tune_atom": }}
-require conf/machine/include/tune-atom.inc
-{{ if tunefile == "tune_core2": }}
-DEFAULTTUNE="core2-32"
-require conf/machine/include/tune-core2.inc
-
-require conf/machine/include/x86-base.inc
-
-MACHINE_FEATURES += "wifi efi pcbios"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-
-{{ if xserver == "y": }}
-{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_vesa" }}
-{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
-{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
-{{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }}
-{{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
-{{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
-
-{{ if xserver == "y" and kernel_choice != "linux-yocto_4.8" and kernel_choice != "linux-yocto_4.4" and kernel_choice != "linux-yocto_4.1" and kernel_choice != "custom": xserver_choice = "xserver_i915" }}
-
-{{ if xserver == "y": }}
-XSERVER ?= "${XSERVER_X86_BASE} \
-           ${XSERVER_X86_EXT} \
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-           ${XSERVER_X86_VESA} \
-{{ if xserver == "y" and xserver_choice == "xserver_i915": }}
-           ${XSERVER_X86_I915} \
-{{ if xserver == "y" and xserver_choice == "xserver_i965": }}
-           ${XSERVER_X86_I965} \
-{{ if xserver == "y" and xserver_choice == "xserver_fbdev": }}
-           ${XSERVER_X86_FBDEV} \
-{{ if xserver == "y" and xserver_choice == "xserver_modesetting": }}
-           ${XSERVER_X86_MODESETTING} \
-{{ if xserver == "y": }}
-           "
-
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d eee-acpi-scripts"
-
-EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
-
-GLIBC_ADDONS = "nptl"
-
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-APPEND += "video=vesafb vga=0x318"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index ac9a0f1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 3083003..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index 7146e23..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH i386
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for preempt-rt kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index 38d1ca5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH i386
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for standard kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 91373b3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH i386
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 69efdcc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 85be26d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 4c59daa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index fe5b882..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,58 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-CONFIG_X86_32=y
-# Must explicitly disable 64BIT
-# CONFIG_64BIT is not set
-
-CONFIG_MATOM=y
-CONFIG_PRINTK=y
-
-# Basic hardware support for the box - network, USB, PCI, sound
-CONFIG_NETDEVICES=y
-CONFIG_ATA=y
-CONFIG_ATA_GENERIC=y
-CONFIG_ATA_SFF=y
-CONFIG_PCI=y
-CONFIG_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_R8169=y
-CONFIG_PATA_SCH=y
-CONFIG_MMC_SDHCI_PCI=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_NET=y
-CONFIG_USB_UHCI_HCD=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_HDA_INTEL=y
-CONFIG_SATA_AHCI=y
-CONFIG_AGP=y
-CONFIG_PM=y
-CONFIG_ACPI=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_INPUT=y
-
-# Make sure these are on, otherwise the bootup won't be fun
-CONFIG_EXT3_FS=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_MODULES=y
-CONFIG_SHMEM=y
-CONFIG_TMPFS=y
-CONFIG_PACKET=y
-
-# Needed for booting (and using) USB memory sticks
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-
-CONFIG_RD_GZIP=y
-
-# Needed for booting (and using) CD images
-CONFIG_BLK_DEV_SR=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 3e4c54f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,19 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include features/intel-e1xxxx/intel-e100.scc
-include features/intel-e1xxxx/intel-e1xxxx.scc
-
-{{ if xserver == "y" and xserver_choice == "xserver_i915" or xserver_choice == "xserver_i965": }}
-include features/i915/i915.scc
-
-include features/serial/8250.scc
-include features/ericsson-3g/f5521gw.scc
-
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-include cfg/vesafb.scc
-
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/power/intel.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index f8616ed..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index 20d57f6..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index 0a9d475..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT
deleted file mode 100644
index 89de354..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README
deleted file mode 100644
index ca6527c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README
+++ /dev/null
@@ -1,64 +0,0 @@
-This README file contains information on the contents of the
-{{=layer_name}} layer.
-
-Please see the corresponding sections below for details.
-
-
-Dependencies
-============
-
-This layer depends on:
-
-  URI: git://git.openembedded.org/bitbake
-  branch: master
-
-  URI: git://git.openembedded.org/openembedded-core
-  layers: meta
-  branch: master
-
-  URI: git://git.yoctoproject.org/xxxx
-  layers: xxxx
-  branch: master
-
-
-Patches
-=======
-
-Please submit any patches against the {{=layer_name}} layer to the
-xxxx mailing list (xxxx@zzzz.org) and cc: the maintainer:
-
-Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
-
-
-Table of Contents
-=================
-
-  I. Adding the {{=layer_name}} layer to your build
- II. Misc
-
-
-I. Adding the {{=layer_name}} layer to your build
-=================================================
-
---- replace with specific instructions for the {{=layer_name}} layer ---
-
-In order to use this layer, you need to make the build system aware of
-it.
-
-Assuming the {{=layer_name}} layer exists at the top-level of your
-yocto build tree, you can add it to the build system by adding the
-location of the {{=layer_name}} layer to bblayers.conf, along with any
-other layers needed. e.g.:
-
-  BBLAYERS ?= " \
-    /path/to/yocto/meta \
-    /path/to/yocto/meta-poky \
-    /path/to/yocto/meta-yocto-bsp \
-    /path/to/yocto/meta-{{=layer_name}} \
-    "
-
-
-II. Misc
-========
-
---- replace with specific information about the {{=layer_name}} layer ---
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf
deleted file mode 100644
index bdffe17..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH .= ":${LAYERDIR}"
-
-# We have recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-	${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "{{=layer_name}}"
-BBFILE_PATTERN_{{=layer_name}} = "^${LAYERDIR}/"
-BBFILE_PRIORITY_{{=layer_name}} = "{{=layer_priority}}"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
deleted file mode 100644
index e2a89c3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
+++ /dev/null
@@ -1,14 +0,0 @@
-{{ input type:"edit" name:"layer_priority" prio:"20" msg:"Please enter the layer priority you'd like to use for the layer:" default:"6"}}
-
-{{ input type:"boolean" name:"create_example_recipe" prio:"20" msg:"Would you like to have an example recipe created? (y/n)" default:"n"}}
-
-{{ if create_example_recipe == "y": }}
-{{ input type:"edit" name:"example_recipe_name" prio:"20" msg:"Please enter the name you'd like to use for your example recipe:" default:"example"}}
-
-{{ input type:"boolean" name:"create_example_bbappend" prio:"20" msg:"Would you like to have an example bbappend file created? (y/n)" default:"n"}}
-
-{{ if create_example_bbappend == "y": }}
-{{ input type:"edit" name:"example_bbappend_name" prio:"20" msg:"Please enter the name you'd like to use for your bbappend file:" default:"example"}}
-
-{{ if create_example_bbappend == "y": }}
-{{ input type:"edit" name:"example_bbappend_version" prio:"20" msg:"Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to):" default:"0.1"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall
deleted file mode 100644
index 3594e65..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if create_example_bbappend == "y": }} recipes-example-bbappend
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend
deleted file mode 100644
index 3531330..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
-# yocto-bsp-filename {{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
-
-#
-# This .bbappend doesn't yet do anything - replace this text with
-# modifications to the example_0.1.bb recipe, or whatever recipe it is
-# that you want to modify with this .bbappend (make sure you change
-# the recipe name (PN) and version (PV) to match).
-#
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall
deleted file mode 100644
index 46df8a8..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=example_bbappend_name}}-{{=example_bbappend_version}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch
deleted file mode 100644
index 2000a34..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# This is a non-functional placeholder file, here for example purposes
-# only.
-#
-# If you had a patch for your recipe, you'd put it in this directory
-# and reference it from your recipe's SRC_URI:
-#
-#  SRC_URI += "file://example.patch"
-#
-# Note that you could also rename the directory containing this patch
-# to remove the version number or simply rename it 'files'.  Doing so
-# allows you to use the same directory for multiple recipes.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall
deleted file mode 100644
index b0069b1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if create_example_recipe == "y": }} recipes-example
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
deleted file mode 100644
index e534d36..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-# yocto-bsp-filename {{=example_recipe_name}}_0.1.bb
-#
-# This file was derived from the 'Hello World!' example recipe in the
-# Yocto Project Development Manual.
-#
-
-SUMMARY = "Simple helloworld application"
-SECTION = "examples"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-
-SRC_URI = "file://helloworld.c"
-
-S = "${WORKDIR}"
-
-do_compile() {
-	     ${CC} ${LDFLAGS} helloworld.c -o helloworld
-}
-
-do_install() {
-	     install -d ${D}${bindir}
-	     install -m 0755 helloworld ${D}${bindir}
-}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall
deleted file mode 100644
index c319c19..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=example_recipe_name}}-0.1
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch
deleted file mode 100644
index 2000a34..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# This is a non-functional placeholder file, here for example purposes
-# only.
-#
-# If you had a patch for your recipe, you'd put it in this directory
-# and reference it from your recipe's SRC_URI:
-#
-#  SRC_URI += "file://example.patch"
-#
-# Note that you could also rename the directory containing this patch
-# to remove the version number or simply rename it 'files'.  Doing so
-# allows you to use the same directory for multiple recipes.
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c
deleted file mode 100644
index 71f2e46..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
-    printf("Hello World!\n");
-
-    return 0;
-}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf
deleted file mode 100644
index 37da253..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf
+++ /dev/null
@@ -1,38 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-require conf/machine/include/tune-mips32.inc
-
-MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"
-
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-            xf86-video-fbdev"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-USE_VT ?= "0"
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-
-IMAGE_FSTYPES ?= "jffs2 tar.bz2"
-JFFS2_ERASEBLOCK = "0x10000"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index a128255..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index b34f3d3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 64f395b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 85be26d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 2fe4766..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-CONFIG_MIPS=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 792fdc9..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,6 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include cfg/usb-mass-storage.scc
-include cfg/fs/vfat.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf
deleted file mode 100644
index a8eea2c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/conf/machine/machine.conf
+++ /dev/null
@@ -1,38 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-require conf/machine/include/tune-mips64.inc
-
-MACHINE_FEATURES = "pci ext2 ext3 serial"
-
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-            xf86-video-fbdev"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-USE_VT ?= "0"
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-
-IMAGE_FSTYPES ?= "jffs2 tar.bz2"
-JFFS2_ERASEBLOCK = "0x10000"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index a128255..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index b34f3d3..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 64f395b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH mips
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 69efdcc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 85be26d..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 4c59daa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 0cc906b..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,66 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-#SOC
-CONFIG_CAVIUM_OCTEON_SOC=y
-CONFIG_CAVIUM_CN63XXP1=y
-CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2
-
-#Kernel
-CONFIG_SMP=y
-CONFIG_NR_CPUS=32
-#Executable file formats
-CONFIG_MIPS32_COMPAT=y
-CONFIG_MIPS32_O32=y
-CONFIG_MIPS32_N32=y
-
-
-#PCI
-CONFIG_PCI=y
-CONFIG_PCI_MSI=y
-
-#I2C
-CONFIG_I2C=y
-CONFIG_I2C_OCTEON=y
-
-CONFIG_HW_RANDOM_OCTEON=y
-
-#SPI
-CONFIG_SPI=y
-CONFIG_SPI_OCTEON=y
-
-#Misc
-CONFIG_EEPROM_AT24=y
-CONFIG_EEPROM_AT25=y
-CONFIG_OCTEON_WDT=y
-
-CONFIG_STAGING=y
-
-#Ethernet
-CONFIG_OCTEON_ETHERNET=y
-CONFIG_OCTEON_MGMT_ETHERNET=y
-CONFIG_MDIO_OCTEON=y
-
-#PHY
-CONFIG_MARVELL_PHY=y
-CONFIG_BROADCOM_PHY=y
-CONFIG_BCM87XX_PHY=y
-
-
-#USB
-CONFIG_USB=y
-CONFIG_OCTEON_USB=y
-CONFIG_USB_OCTEON_EHCI=y
-CONFIG_USB_OCTEON_OHCI=y
-CONFIG_USB_OCTEON2_COMMON=y
-
-CONFIG_MTD=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CMDLINE_PARTS=y
-
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=2
-CONFIG_SERIAL_8250_RUNTIME_UARTS=2
-CONFIG_SERIAL_8250_DW=y
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 792fdc9..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,6 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include cfg/usb-mass-storage.scc
-include cfg/fs/vfat.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index 336a956..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index 5333c30..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index 7d18566..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
deleted file mode 100644
index 352b972..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
+++ /dev/null
@@ -1,86 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-TARGET_FPU = ""
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_ppce300c3" }}
-{{ input type:"choice" val:"tune_ppc476" msg:"ppc476 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppc603e" msg:"ppc603e tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppc7400" msg:"ppc7400 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce300c2" msg:"ppce300c2 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce300c3" msg:"ppce300c3 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce500" msg:"ppce500 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce500mc" msg:"ppce500mc tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce500v2" msg:"ppce500v2 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce5500" msg:"ppce5500 tuning optimizations" }}
-{{ input type:"choice" val:"tune_ppce6500" msg:"ppce6500 tuning optimizations" }}
-{{ input type:"choice" val:"tune_power5" msg:"power5 tuning optimizations" }}
-{{ input type:"choice" val:"tune_power6" msg:"power6 tuning optimizations" }}
-{{ input type:"choice" val:"tune_power7" msg:"power7 tuning optimizations" }}
-{{ if tunefile == "tune_ppc476": }}
-include conf/machine/include/tune-ppc476.inc
-{{ if tunefile == "tune_ppc603e": }}
-include conf/machine/include/tune-ppc603e.inc
-{{ if tunefile == "tune_ppc7400": }}
-include conf/machine/include/tune-ppc7400.inc
-{{ if tunefile == "tune_ppce300c2": }}
-include conf/machine/include/tune-ppce300c2.inc
-{{ if tunefile == "tune_ppce300c3": }}
-include conf/machine/include/tune-ppce300c3.inc
-{{ if tunefile == "tune_ppce500": }}
-include conf/machine/include/tune-ppce500.inc
-{{ if tunefile == "tune_ppce500mc": }}
-include conf/machine/include/tune-ppce500mc.inc
-{{ if tunefile == "tune_ppce500v2": }}
-include conf/machine/include/tune-ppce500v2.inc
-{{ if tunefile == "tune_ppce5500": }}
-include conf/machine/include/tune-ppce5500.inc
-{{ if tunefile == "tune_ppce6500": }}
-include conf/machine/include/tune-ppce6500.inc
-{{ if tunefile == "tune_power5": }}
-include conf/machine/include/tune-power5.inc
-{{ if tunefile == "tune_power6": }}
-include conf/machine/include/tune-power6.inc
-{{ if tunefile == "tune_power7": }}
-include conf/machine/include/tune-power7.inc
-
-KERNEL_IMAGETYPE = "uImage"
-
-EXTRA_IMAGEDEPENDS += "u-boot"
-UBOOT_MACHINE_{{=machine}} = "MPC8315ERDB_config"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-
-MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-{{ if xserver == "y": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-XSERVER ?= "xserver-xorg \
-           xf86-video-fbdev"
-
-PREFERRED_VERSION_u-boot ?= "v2016.01%"
-{{ input type:"edit" name:"uboot_entrypoint" prio:"40" msg:"Please specify a value for UBOOT_ENTRYPOINT:" default:"0x00000000" }}
-UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}"
-
-{{ input type:"edit" name:"kernel_devicetree" prio:"40" msg:"Please specify a [arch/powerpc/boot/dts/xxx] value for KERNEL_DEVICETREE:" default:"mpc8315erdb.dts" }}
-KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/{{=kernel_devicetree}}"
-
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-
-IMAGE_FSTYPES ?= "jffs2 tar.bz2"
-JFFS2_ERASEBLOCK = "0x4000"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index 91ccfb8..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH powerpc
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index c166fcd..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH powerpc
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 2701fd8..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH powerpc
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 5bfe1fe..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,164 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-..........................................................................
-.                                WARNING
-.
-. This file is a kernel configuration fragment, and not a full kernel
-. configuration file.  The final kernel configuration is made up of
-. an assembly of processed fragments, each of which is designed to
-. capture a specific part of the final configuration (e.g. platform
-. configuration, feature configuration, and board specific hardware
-. configuration).  For more information on kernel configuration, please
-. consult the product documentation.
-.
-..........................................................................
-CONFIG_PPC32=y
-CONFIG_PPC_OF=y
-CONFIG_PPC_UDBG_16550=y
-
-#
-# Processor support
-#
-CONFIG_PPC_83xx=y
-
-#
-# Platform support
-#
-CONFIG_MPC831x_RDB=y
-# CONFIG_PPC_CHRP is not set
-# CONFIG_PPC_PMAC is not set
-
-#
-# Bus options
-#
-CONFIG_PCI=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=y
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_OF_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_AMDSTD=y
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_PHYSMAP_OF=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_GIANFAR=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=2
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_8xxx_WDT=y
-
-#
-# I2C support
-#
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_MPC=y
-
-CONFIG_SENSORS_LM75=y
-
-CONFIG_MISC_DEVICES=y
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_EEPROM_AT24=y
-
-#
-# SPI support
-#
-CONFIG_SPI=y
-# CONFIG_SPI_DEBUG is not set
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-CONFIG_SPI_MPC8xxx=y
-
-#
-# SPI Protocol Masters
-#
-CONFIG_HWMON=y
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SCSI_LOGGING=y
-
-CONFIG_ATA=y
-CONFIG_ATA_VERBOSE_ERROR=y
-CONFIG_SATA_FSL=y
-CONFIG_ATA_SFF=y
-
-#
-# USB support
-#
-CONFIG_USB=m
-CONFIG_USB_DEVICEFS=y
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_FSL=y
-CONFIG_USB_STORAGE=m
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_CLASS=y
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=y
-
-CONFIG_KGDB_8250=m
-
-CONFIG_CRYPTO_DEV_TALITOS=m
-
-CONFIG_FSL_DMA=y
-
-CONFIG_MMC=y
-CONFIG_MMC_SPI=m
-
-CONFIG_USB_FSL_MPH_DR_OF=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 89bb97e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,8 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include cfg/usb-mass-storage.scc
-include cfg/fs/vfat.scc
-
-include cfg/dmaengine.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf
deleted file mode 100644
index 9188858..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf
+++ /dev/null
@@ -1,71 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-
-{{ input type:"choicelist" name:"qemuarch" prio:"5" msg:"Which qemu architecture would you like to use?" default:"i386" }}
-{{ input type:"choice" val:"i386" msg:"i386    (32-bit)" }}
-{{ input type:"choice" val:"x86_64" msg:"x86_64  (64-bit)" }}
-{{ input type:"choice" val:"arm" msg:"ARM     (32-bit)" }}
-{{ input type:"choice" val:"powerpc" msg:"PowerPC (32-bit)" }}
-{{ input type:"choice" val:"mips" msg:"MIPS    (32-bit)" }}
-{{ input type:"choice" val:"mips64" msg:"MIPS64  (64-bit)" }}
-{{ if qemuarch == "i386": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-i586.inc
-{{ if qemuarch == "x86_64": }}
-require conf/machine/include/qemu.inc
-DEFAULTTUNE ?= "core2-64"
-require conf/machine/include/tune-core2.inc
-{{ if qemuarch == "arm": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-arm926ejs.inc
-{{ if qemuarch == "powerpc": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-ppc7400.inc
-{{ if qemuarch == "mips": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-mips32.inc
-{{ if qemuarch == "mips64": }}
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-mips64.inc
-
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-MACHINE_FEATURES += "x86"
-KERNEL_IMAGETYPE = "bzImage"
-SERIAL_CONSOLE = "115200 ttyS0"
-XSERVER = "xserver-xorg \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '', d)} \
-           xf86-video-vmware"
-
-{{ if qemuarch == "arm": }}
-KERNEL_IMAGETYPE = "zImage"
-SERIAL_CONSOLE = "115200 ttyAMA0"
-
-{{ if qemuarch == "powerpc": }}
-KERNEL_IMAGETYPE = "vmlinux"
-SERIAL_CONSOLE = "115200 ttyS0"
-
-{{ if qemuarch == "mips" or qemuarch == "mips64": }}
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
-SERIAL_CONSOLE = "115200 ttyS0"
-MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces
deleted file mode 100644
index 1696776..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces
+++ /dev/null
@@ -1,5 +0,0 @@
-# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
- 
-# The loopback interface
-auto lo
-iface lo inet loopback
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend
deleted file mode 100644
index 72d991c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index 3bdde79..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1,77 +0,0 @@
-
-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"
-{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips" or qemuarch == "mips64": }}
-    Driver        "mouse"
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-    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 "Device"
-    Identifier    "Graphics Controller"
-{{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips" or qemuarch == "mips64": }}
-    Driver        "fbdev"
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-    Driver        "vmware"
-
-EndSection
-
-Section "Monitor"
-    Identifier    "Generic Monitor"
-    Option        "DPMS"
-    # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz
-    Modeline "1024x600_60.00"   49.00  1024 1072 1168 1312  600 603 613 624 -hsync +vsync
-    # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
-    ModeLine "640x480"    25.2  640  656  752  800    480  490  492  525 -hsync -vsync
-    # 640x480 @ 72Hz (VESA) hsync: 37.9kHz
-    ModeLine "640x480"    31.5  640  664  704  832    480  489  491  520 -hsync -vsync
-    # 640x480 @ 75Hz (VESA) hsync: 37.5kHz
-    ModeLine "640x480"    31.5  640  656  720  840    480  481  484  500 -hsync -vsync
-    # 640x480 @ 85Hz (VESA) hsync: 43.3kHz
-    ModeLine "640x480"    36.0  640  696  752  832    480  481  484  509 -hsync -vsync
-EndSection
-
-Section "Screen"
-    Identifier    "Default Screen"
-    Device        "Graphics Controller"
-    Monitor        "Generic Monitor"
-    SubSection "Display"
-        Modes     "640x480"
-    EndSubSection
-EndSection
-
-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/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 72d991c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 0fb5283..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index a81b858..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH {{=qemuarch}}
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index 43cf642..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,20 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH {{=qemuarch}}
-
-{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if qemuarch == "arm": }}
-include bsp/arm-versatile-926ejs/arm-versatile-926ejs-standard nopatch
-{{ if qemuarch == "powerpc": }}
-include bsp/qemu-ppc32/qemu-ppc32-standard nopatch
-{{ if qemuarch == "mips": }}
-include bsp/mti-malta32/mti-malta32-be-standard nopatch
-{{ if qemuarch == "mips64": }}
-include bsp/mti-malta64/mti-malta64-be-standard nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index 41d4c6f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH {{=qemuarch}}
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 69efdcc..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 4c59daa..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
\ No newline at end of file
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 3fa4ed0..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-{{ if qemuarch == "i386": }}
-# CONFIG_64BIT is not set
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index d25d0a0..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,3 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index d7b9cef..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,59 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index 8c0fd15..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 83eb216..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 22abc23..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index 851d96c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index d7ce37e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index 71be913..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,67 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ if qemuarch != "arm": }}
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore
+++ /dev/null
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf
deleted file mode 100644
index e4b8251..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf
+++ /dev/null
@@ -1,65 +0,0 @@
-# yocto-bsp-filename {{=machine}}.conf
-#@TYPE: Machine
-#@NAME: {{=machine}}
-
-#@DESCRIPTION: Machine configuration for {{=machine}} systems
-
-{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
-{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
-{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
-{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
-PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
-PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"
-
-{{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_core2" }}
-{{ input type:"choice" val:"tune_core2" msg:"Core2 tuning optimizations" }}
-{{ input type:"choice" val:"tune_corei7" msg:"Corei7 tuning optimizations" }}
-{{ if tunefile == "tune_core2": }}
-DEFAULTTUNE ?= "core2-64"
-require conf/machine/include/tune-core2.inc
-{{ if tunefile == "tune_corei7": }}
-DEFAULTTUNE ?= "corei7-64"
-require conf/machine/include/tune-corei7.inc
-
-require conf/machine/include/x86-base.inc
-
-MACHINE_FEATURES += "wifi efi pcbios"
-
-{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
-
-{{ if xserver == "y": }}
-{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }}
-
-{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
-{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
-{{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }}
-{{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
-{{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
-{{ if xserver == "y": }}
-XSERVER ?= "${XSERVER_X86_BASE} \
-           ${XSERVER_X86_EXT} \
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-           ${XSERVER_X86_VESA} \
-{{ if xserver == "y" and xserver_choice == "xserver_i915": }}
-           ${XSERVER_X86_I915} \
-{{ if xserver == "y" and xserver_choice == "xserver_i965": }}
-           ${XSERVER_X86_I965} \
-{{ if xserver == "y" and xserver_choice == "xserver_fbdev": }}
-           ${XSERVER_X86_FBDEV} \
-{{ if xserver == "y" and xserver_choice == "xserver_modesetting": }}
-           ${XSERVER_X86_MODESETTING} \
-{{ if xserver == "y": }}
-           "
-
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d eee-acpi-scripts"
-
-EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
-
-GLIBC_ADDONS = "nptl"
-
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-APPEND += "video=vesafb vga=0x318"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
deleted file mode 100644
index b442d02..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{=machine}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
deleted file mode 100644
index ac9a0f1..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 3083003..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-# yocto-bsp-filename {{ if xserver == "y": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall
deleted file mode 100644
index 1e0d92c..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc
deleted file mode 100644
index bbeeecd..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-preempt-rt.scc
-define KMACHINE {{=machine}}
-
-define KARCH x86_64
-
-include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for preempt-rt kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc
deleted file mode 100644
index a2b2910..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc
+++ /dev/null
@@ -1,17 +0,0 @@
-# yocto-bsp-filename {{=machine}}-standard.scc
-define KMACHINE {{=machine}}
-
-define KARCH x86_64
-
-include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} nopatch
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
-
-# default policy for standard kernels
-include cfg/usb-mass-storage.scc
-include cfg/boot-live.scc
-include features/latencytop/latencytop.scc
-include features/profiling/profiling.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc
deleted file mode 100644
index b53706f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc
+++ /dev/null
@@ -1,11 +0,0 @@
-# yocto-bsp-filename {{=machine}}-tiny.scc
-define KMACHINE {{=machine}}
-
-define KARCH x86_64
-
-include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}}
-{{ if need_new_kbranch == "y": }}
-define KTYPE {{=new_kbranch}}
-branch {{=machine}}
-
-include {{=machine}}.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg
deleted file mode 100644
index 47489e4..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-config.cfg
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc
deleted file mode 100644
index 582759e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-features.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc
deleted file mode 100644
index 97f747f..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc
+++ /dev/null
@@ -1 +0,0 @@
-# yocto-bsp-filename {{=machine}}-user-patches.scc
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg
deleted file mode 100644
index 3290dde..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg
+++ /dev/null
@@ -1,48 +0,0 @@
-# yocto-bsp-filename {{=machine}}.cfg
-CONFIG_PRINTK=y
-
-# Basic hardware support for the box - network, USB, PCI, sound                     
-CONFIG_NETDEVICES=y
-CONFIG_ATA=y
-CONFIG_ATA_GENERIC=y
-CONFIG_ATA_SFF=y
-CONFIG_PCI=y
-CONFIG_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_R8169=y
-CONFIG_PATA_SCH=y
-CONFIG_MMC_SDHCI_PCI=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_NET=y
-CONFIG_USB_UHCI_HCD=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_HDA_INTEL=y
-
-# Make sure these are on, otherwise the bootup won't be fun                         
-CONFIG_EXT3_FS=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_MODULES=y
-CONFIG_SHMEM=y
-CONFIG_TMPFS=y
-CONFIG_PACKET=y
-
-CONFIG_I2C=y                                                                        
-CONFIG_AGP=y                                                                        
-CONFIG_PM=y                                                                         
-CONFIG_ACPI=y                                                                       
-CONFIG_INPUT=y                                                                      
-                                                                                    
-# Needed for booting (and using) USB memory sticks                                  
-CONFIG_BLK_DEV_LOOP=y                                                               
-CONFIG_NLS_CODEPAGE_437=y                                                           
-CONFIG_NLS_ISO8859_1=y                                                              
-                                                                                    
-CONFIG_RD_GZIP=y
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc
deleted file mode 100644
index 9d20d19..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc
+++ /dev/null
@@ -1,12 +0,0 @@
-# yocto-bsp-filename {{=machine}}.scc
-kconf hardware {{=machine}}.cfg
-
-include features/serial/8250.scc
-{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
-include cfg/vesafb.scc
-{{ if xserver == "y" and xserver_choice == "xserver_i915" or xserver_choice == "xserver_i965": }}
-include features/i915/i915.scc
-
-include cfg/usb-mass-storage.scc
-include features/power/intel.scc
-
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall
deleted file mode 100644
index 917f0e2..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.12) kernel? (y/n)" default:"y"}}
-
-{{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.12"}}
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend
deleted file mode 100644
index 22ed273..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ /dev/null
@@ -1,28 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
deleted file mode 100644
index bae943e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index 6f3e104..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
deleted file mode 100644
index 62d1817..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index dfbecb5..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.10": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index e874c9e..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.12": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.10"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend
deleted file mode 100644
index a809c76..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ /dev/null
@@ -1,37 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}.scc \
-            file://{{=machine}}.cfg \
-            file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-            file://{{=machine}}-user-patches.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "4.4"
-#Remove the following line once AUTOREV is locked to a certain SRCREV
-KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/import-layers/yocto-poky/scripts/lib/bsp/tags.py b/import-layers/yocto-poky/scripts/lib/bsp/tags.py
deleted file mode 100644
index 3719427..0000000
--- a/import-layers/yocto-poky/scripts/lib/bsp/tags.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# DESCRIPTION
-# This module provides a place to define common constants for the
-# Yocto BSP Tools.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-OPEN_TAG =     "{{"
-CLOSE_TAG =    "}}"
-ASSIGN_TAG =   "{{="
-INPUT_TAG =    "input"
-IF_TAG =       "if"
-FILENAME_TAG = "yocto-bsp-filename"
-DIRNAME_TAG =  "yocto-bsp-dirname"
-
-INDENT_STR =  "    "
-
-BLANKLINE_STR = "of.write(\"\\n\")"
-NORMAL_START =  "of.write"
-OPEN_START =    "current_file ="
-
-INPUT_TYPE_PROPERTY = "type"
-
-SRC_URI_FILE = "file://"
-
-GIT_CHECK_URI = "git://git.yoctoproject.org/linux-yocto-dev.git"
-
-
-
diff --git a/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py b/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py
index 288c457..2618416 100644
--- a/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py
+++ b/import-layers/yocto-poky/scripts/lib/checklayer/__init__.py
@@ -56,9 +56,11 @@
         priority = ldata.getVar('BBFILE_PRIORITY_%s' % name)
         pattern = ldata.getVar('BBFILE_PATTERN_%s' % name)
         depends = ldata.getVar('LAYERDEPENDS_%s' % name)
+        compat = ldata.getVar('LAYERSERIES_COMPAT_%s' % name)
         collections[name]['priority'] = priority
         collections[name]['pattern'] = pattern
         collections[name]['depends'] = depends
+        collections[name]['compat'] = compat
 
     return collections
 
diff --git a/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py b/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py
index a13c108..1bef61b 100644
--- a/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py
+++ b/import-layers/yocto-poky/scripts/lib/checklayer/cases/common.py
@@ -51,3 +51,8 @@
         msg = compare_signatures(self.td['sigs'], curr_sigs)
         if msg is not None:
             self.fail('Adding layer %s changed signatures.\n%s' % (self.tc.layer['name'], msg))
+
+    def test_layerseries_compat(self):
+        for collection_name, collection_data in self.tc.layer['collections'].items():
+            self.assertTrue(collection_data['compat'], "Collection %s from layer %s does not set compatible oe-core versions via LAYERSERIES_COMPAT_collection." \
+                 % (collection_name, self.tc.layer['name']))
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/__init__.py b/import-layers/yocto-poky/scripts/lib/devtool/__init__.py
index 94e3d7d..89f098a 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/__init__.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/__init__.py
@@ -220,6 +220,20 @@
         commit_cmd += ['-m', commitmsg]
         bb.process.run(commit_cmd, cwd=repodir)
 
+    # Ensure singletask.lock (as used by externalsrc.bbclass) is ignored by git
+    excludes = []
+    excludefile = os.path.join(repodir, '.git', 'info', 'exclude')
+    try:
+        with open(excludefile, 'r') as f:
+            excludes = f.readlines()
+    except FileNotFoundError:
+        pass
+    if 'singletask.lock\n' not in excludes:
+        excludes.append('singletask.lock\n')
+    with open(excludefile, 'w') as f:
+        for line in excludes:
+            f.write(line)
+
     bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
     bb.process.run('git tag -f %s' % basetag, cwd=repodir)
 
@@ -337,3 +351,33 @@
             for pn in newunlocked:
                 f.write('    ' + pn)
             f.write('"')
+
+def check_prerelease_version(ver, operation):
+    if 'pre' in ver or 'rc' in ver:
+        logger.warning('Version "%s" looks like a pre-release version. '
+                       'If that is the case, in order to ensure that the '
+                       'version doesn\'t appear to go backwards when you '
+                       'later upgrade to the final release version, it is '
+                       'recommmended that instead you use '
+                       '<current version>+<pre-release version> e.g. if '
+                       'upgrading from 1.9 to 2.0-rc2 use "1.9+2.0-rc2". '
+                       'If you prefer not to reset and re-try, you can change '
+                       'the version after %s succeeds using "devtool rename" '
+                       'with -V/--version.' % (ver, operation))
+
+def check_git_repo_dirty(repodir):
+    """Check if a git repository is clean or not"""
+    stdout, _ = bb.process.run('git status --porcelain', cwd=repodir)
+    return stdout
+
+def check_git_repo_op(srctree, ignoredirs=None):
+    """Check if a git repository is in the middle of a rebase"""
+    stdout, _ = bb.process.run('git rev-parse --show-toplevel', cwd=srctree)
+    topleveldir = stdout.strip()
+    if ignoredirs and topleveldir in ignoredirs:
+        return
+    gitdir = os.path.join(topleveldir, '.git')
+    if os.path.exists(os.path.join(gitdir, 'rebase-merge')):
+        raise DevtoolError("Source tree %s appears to be in the middle of a rebase - please resolve this first" % srctree)
+    if os.path.exists(os.path.join(gitdir, 'rebase-apply')):
+        raise DevtoolError("Source tree %s appears to be in the middle of 'git am' or 'git apply' - please resolve this first" % srctree)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/deploy.py b/import-layers/yocto-poky/scripts/lib/devtool/deploy.py
index 9cc4927..52e261d 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/deploy.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/deploy.py
@@ -213,9 +213,7 @@
 
         scp_port = ''
         ssh_port = ''
-        if not args.port:
-            raise DevtoolError("If you specify -P/--port then you must provide the port to be used to connect to the target")
-        else:
+        if args.port:
             scp_port = "-P %s" % args.port
             ssh_port = "-p %s" % args.port
 
@@ -280,9 +278,7 @@
 
     scp_port = ''
     ssh_port = ''
-    if not args.port:
-        raise DevtoolError("If you specify -P/--port then you must provide the port to be used to connect to the target")
-    else:
+    if args.port:
         scp_port = "-P %s" % args.port
         ssh_port = "-p %s" % args.port
 
@@ -328,7 +324,7 @@
     parser_deploy.add_argument('-n', '--dry-run', help='List files to be deployed only', action='store_true')
     parser_deploy.add_argument('-p', '--no-preserve', help='Do not preserve existing files', action='store_true')
     parser_deploy.add_argument('--no-check-space', help='Do not check for available space before deploying', action='store_true')
-    parser_deploy.add_argument('-P', '--port', default='22', help='Port to use for connection to the target')
+    parser_deploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
 
     strip_opts = parser_deploy.add_mutually_exclusive_group(required=False)
     strip_opts.add_argument('-S', '--strip',
@@ -350,5 +346,5 @@
     parser_undeploy.add_argument('-s', '--show-status', help='Show progress/status output', action='store_true')
     parser_undeploy.add_argument('-a', '--all', help='Undeploy all recipes deployed on the target', action='store_true')
     parser_undeploy.add_argument('-n', '--dry-run', help='List files to be undeployed only', action='store_true')
-    parser_undeploy.add_argument('-P', '--port', default='22', help='Port to use for connection to the target')
+    parser_undeploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
     parser_undeploy.set_defaults(func=undeploy)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/search.py b/import-layers/yocto-poky/scripts/lib/devtool/search.py
index 054985b..b4f209b 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/search.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/search.py
@@ -36,44 +36,74 @@
 
         keyword_rc = re.compile(args.keyword)
 
-        for fn in os.listdir(pkgdata_dir):
-            pfn = os.path.join(pkgdata_dir, fn)
-            if not os.path.isfile(pfn):
+        def print_match(pn):
+            rd = parse_recipe(config, tinfoil, pn, True)
+            if not rd:
+                return
+            summary = rd.getVar('SUMMARY')
+            if summary == rd.expand(defsummary):
+                summary = ''
+            print("%s  %s" % (pn.ljust(20), summary))
+
+
+        matches = []
+        if os.path.exists(pkgdata_dir):
+            for fn in os.listdir(pkgdata_dir):
+                pfn = os.path.join(pkgdata_dir, fn)
+                if not os.path.isfile(pfn):
+                    continue
+
+                packages = []
+                match = False
+                if keyword_rc.search(fn):
+                    match = True
+
+                if not match:
+                    with open(pfn, 'r') as f:
+                        for line in f:
+                            if line.startswith('PACKAGES:'):
+                                packages = line.split(':', 1)[1].strip().split()
+
+                    for pkg in packages:
+                        if keyword_rc.search(pkg):
+                            match = True
+                            break
+                        if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
+                            with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
+                                for line in f:
+                                    if ': ' in line:
+                                        splitline = line.split(':', 1)
+                                        key = splitline[0]
+                                        value = splitline[1].strip()
+                                    if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
+                                        if keyword_rc.search(value):
+                                            match = True
+                                            break
+                if match:
+                    print_match(fn)
+                    matches.append(fn)
+        else:
+            logger.warning('Package data is not available, results may be limited')
+
+        for recipe in tinfoil.all_recipes():
+            if args.fixed_setup and 'nativesdk' in recipe.inherits():
                 continue
 
-            packages = []
             match = False
-            if keyword_rc.search(fn):
+            if keyword_rc.search(recipe.pn):
                 match = True
-
-            if not match:
-                with open(pfn, 'r') as f:
-                    for line in f:
-                        if line.startswith('PACKAGES:'):
-                            packages = line.split(':', 1)[1].strip().split()
-
-                for pkg in packages:
-                    if keyword_rc.search(pkg):
+            else:
+                for prov in recipe.provides:
+                    if keyword_rc.search(prov):
                         match = True
                         break
-                    if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
-                        with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
-                            for line in f:
-                                if ': ' in line:
-                                    splitline = line.split(':', 1)
-                                    key = splitline[0]
-                                    value = splitline[1].strip()
-                                if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
-                                    if keyword_rc.search(value):
-                                        match = True
-                                        break
-
-            if match:
-                rd = parse_recipe(config, tinfoil, fn, True)
-                summary = rd.getVar('SUMMARY')
-                if summary == rd.expand(defsummary):
-                    summary = ''
-                print("%s  %s" % (fn.ljust(20), summary))
+                if not match:
+                    for rprov in recipe.rprovides:
+                        if keyword_rc.search(rprov):
+                            match = True
+                            break
+            if match and not recipe.pn in matches:
+                print_match(recipe.pn)
     finally:
         tinfoil.shutdown()
 
@@ -82,7 +112,7 @@
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
     parser_search = subparsers.add_parser('search', help='Search available recipes',
-                                            description='Searches for available target recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name on match.',
+                                            description='Searches for available recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name and summary on match.',
                                             group='info')
-    parser_search.add_argument('keyword', help='Keyword to search for (regular expression syntax allowed)')
-    parser_search.set_defaults(func=search, no_workspace=True)
+    parser_search.add_argument('keyword', help='Keyword to search for (regular expression syntax allowed, use quotes to avoid shell expansion)')
+    parser_search.set_defaults(func=search, no_workspace=True, fixed_setup=context.fixed_setup)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/standard.py b/import-layers/yocto-poky/scripts/lib/devtool/standard.py
index beea0d4..a1e8e1d 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/standard.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/standard.py
@@ -30,11 +30,13 @@
 import glob
 import filecmp
 from collections import OrderedDict
-from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, update_unlockedsigs, DevtoolError
+from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, update_unlockedsigs, check_prerelease_version, check_git_repo_dirty, check_git_repo_op, DevtoolError
 from devtool import parse_recipe
 
 logger = logging.getLogger('devtool')
 
+override_branch_prefix = 'devtool-override-'
+
 
 def add(args, config, basepath, workspace):
     """Entry point for the devtool 'add' subcommand"""
@@ -298,6 +300,8 @@
 
         _add_md5(config, recipename, appendfile)
 
+        check_prerelease_version(rd.getVar('PV'), 'devtool add')
+
         logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile)
 
     finally:
@@ -339,19 +343,45 @@
                            "from working. You will need to disable this "
                            "first." % pn)
 
-def _move_file(src, dst):
-    """Move a file. Creates all the directory components of destination path."""
+def _dry_run_copy(src, dst, dry_run_outdir, base_outdir):
+    """Common function for copying a file to the dry run output directory"""
+    relpath = os.path.relpath(dst, base_outdir)
+    if relpath.startswith('..'):
+        raise Exception('Incorrect base path %s for path %s' % (base_outdir, dst))
+    dst = os.path.join(dry_run_outdir, relpath)
     dst_d = os.path.dirname(dst)
     if dst_d:
         bb.utils.mkdirhier(dst_d)
-    shutil.move(src, dst)
+    # Don't overwrite existing files, otherwise in the case of an upgrade
+    # the dry-run written out recipe will be overwritten with an unmodified
+    # version
+    if not os.path.exists(dst):
+        shutil.copy(src, dst)
 
-def _copy_file(src, dst):
+def _move_file(src, dst, dry_run_outdir=None, base_outdir=None):
+    """Move a file. Creates all the directory components of destination path."""
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+    logger.debug('Moving %s to %s%s' % (src, dst, dry_run_suffix))
+    if dry_run_outdir:
+        # We want to copy here, not move
+        _dry_run_copy(src, dst, dry_run_outdir, base_outdir)
+    else:
+        dst_d = os.path.dirname(dst)
+        if dst_d:
+            bb.utils.mkdirhier(dst_d)
+        shutil.move(src, dst)
+
+def _copy_file(src, dst, dry_run_outdir=None):
     """Copy a file. Creates all the directory components of destination path."""
-    dst_d = os.path.dirname(dst)
-    if dst_d:
-        bb.utils.mkdirhier(dst_d)
-    shutil.copy(src, dst)
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+    logger.debug('Copying %s to %s%s' % (src, dst, dry_run_suffix))
+    if dry_run_outdir:
+        _dry_run_copy(src, dst, dry_run_outdir, base_outdir)
+    else:
+        dst_d = os.path.dirname(dst)
+        if dst_d:
+            bb.utils.mkdirhier(dst_d)
+        shutil.copy(src, dst)
 
 def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
     """List contents of a git treeish"""
@@ -397,7 +427,7 @@
     """Entry point for the devtool 'extract' subcommand"""
     import bb
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     if not tinfoil:
         # Error already shown
         return 1
@@ -407,7 +437,7 @@
             return 1
 
         srctree = os.path.abspath(args.srctree)
-        initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
+        initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
         logger.info('Source tree extracted to %s' % srctree)
 
         if initial_rev:
@@ -421,7 +451,7 @@
     """Entry point for the devtool 'sync' subcommand"""
     import bb
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     if not tinfoil:
         # Error already shown
         return 1
@@ -431,7 +461,7 @@
             return 1
 
         srctree = os.path.abspath(args.srctree)
-        initial_rev = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
+        initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, True, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=True)
         logger.info('Source tree %s synchronized' % srctree)
 
         if initial_rev:
@@ -442,7 +472,7 @@
         tinfoil.shutdown()
 
 
-def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil):
+def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False):
     """Extract sources of a recipe"""
     import oe.recipeutils
     import oe.patch
@@ -472,6 +502,16 @@
         bb.utils.mkdirhier(srctree)
         os.rmdir(srctree)
 
+    extra_overrides = []
+    if not no_overrides:
+        history = d.varhistory.variable('SRC_URI')
+        for event in history:
+            if not 'flag' in event:
+                if event['op'].startswith(('_append[', '_prepend[')):
+                    extra_overrides.append(event['op'].split('[')[1].split(']')[0])
+        if extra_overrides:
+            logger.info('SRC_URI contains some conditional appends/prepends - will create branches to represent these')
+
     initial_rev = None
 
     appendexisted = False
@@ -514,6 +554,8 @@
             if not is_kernel_yocto:
                 f.write('PATCHTOOL = "git"\n')
                 f.write('PATCH_COMMIT_FUNCTIONS = "1"\n')
+            if extra_overrides:
+                f.write('DEVTOOL_EXTRA_OVERRIDES = "%s"\n' % ':'.join(extra_overrides))
             f.write('inherit devtool-source\n')
             f.write('###--- _extract_source\n')
 
@@ -542,11 +584,15 @@
         if not res:
             raise DevtoolError('Extracting source for %s failed' % pn)
 
-        with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
-            initial_rev = f.read()
+        try:
+            with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
+                initial_rev = f.read()
 
-        with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
-            srcsubdir = f.read()
+            with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
+                srcsubdir = f.read()
+        except FileNotFoundError as e:
+            raise DevtoolError('Something went wrong with source extraction - the devtool-source class was not active or did not function correctly:\n%s' % str(e))
+        srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir'))
 
         tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
         srctree_localdir = os.path.join(srctree, 'oe-local-files')
@@ -613,7 +659,7 @@
             logger.info('Preserving temporary directory %s' % tempdir)
         else:
             shutil.rmtree(tempdir)
-    return initial_rev
+    return initial_rev, srcsubdir_rel
 
 def _add_md5(config, recipename, filename):
     """Record checksum of a file (or recursively for a directory) to the md5-file of the workspace"""
@@ -670,12 +716,13 @@
     """Entry point for the devtool 'modify' subcommand"""
     import bb
     import oe.recipeutils
+    import oe.patch
 
     if args.recipename in workspace:
         raise DevtoolError("recipe %s is already in your workspace" %
                            args.recipename)
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     try:
         rd = parse_recipe(config, tinfoil, args.recipename, True)
         if not rd:
@@ -710,14 +757,16 @@
 
         initial_rev = None
         commits = []
+        check_commits = False
         if not args.no_extract:
-            initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
+            initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
             if not initial_rev:
                 return 1
             logger.info('Source tree extracted to %s' % srctree)
             # Get list of commits since this revision
             (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree)
             commits = stdout.split()
+            check_commits = True
         else:
             if os.path.exists(os.path.join(srctree, '.git')):
                 # Check if it's a tree previously extracted by us
@@ -725,6 +774,8 @@
                     (stdout, _) = bb.process.run('git branch --contains devtool-base', cwd=srctree)
                 except bb.process.ExecutionError:
                     stdout = ''
+                if stdout:
+                    check_commits = True
                 for line in stdout.splitlines():
                     if line.startswith('*'):
                         (stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=srctree)
@@ -734,6 +785,33 @@
                     (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
                     initial_rev = stdout.rstrip()
 
+        branch_patches = {}
+        if check_commits:
+            # Check if there are override branches
+            (stdout, _) = bb.process.run('git branch', cwd=srctree)
+            branches = []
+            for line in stdout.rstrip().splitlines():
+                branchname = line[2:].rstrip()
+                if branchname.startswith(override_branch_prefix):
+                    branches.append(branchname)
+            if branches:
+                logger.warn('SRC_URI is conditionally overridden in this recipe, thus several %s* branches have been created, one for each override that makes changes to SRC_URI. It is recommended that you make changes to the %s branch first, then checkout and rebase each %s* branch and update any unique patches there (duplicates on those branches will be ignored by devtool finish/update-recipe)' % (override_branch_prefix, args.branch, override_branch_prefix))
+            branches.insert(0, args.branch)
+            seen_patches = []
+            for branch in branches:
+                branch_patches[branch] = []
+                (stdout, _) = bb.process.run('git log devtool-base..%s' % branch, cwd=srctree)
+                for line in stdout.splitlines():
+                    line = line.strip()
+                    if line.startswith(oe.patch.GitApplyTree.patch_line_prefix):
+                        origpatch = line[len(oe.patch.GitApplyTree.patch_line_prefix):].split(':', 1)[-1].strip()
+                        if not origpatch in seen_patches:
+                            seen_patches.append(origpatch)
+                            branch_patches[branch].append(origpatch)
+
+        # Need to grab this here in case the source is within a subdirectory
+        srctreebase = srctree
+
         # Check that recipe isn't using a shared workdir
         s = os.path.abspath(rd.getVar('S'))
         workdir = os.path.abspath(rd.getVar('WORKDIR'))
@@ -748,7 +826,8 @@
             # Local files can be modified/tracked in separate subdir under srctree
             # Mostly useful for packages with S != WORKDIR
             f.write('FILESPATH_prepend := "%s:"\n' %
-                    os.path.join(srctree, 'oe-local-files'))
+                    os.path.join(srctreebase, 'oe-local-files'))
+            f.write('# srctreebase: %s\n' % srctreebase)
 
             f.write('\ninherit externalsrc\n')
             f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
@@ -772,6 +851,11 @@
                 f.write('\n# initial_rev: %s\n' % initial_rev)
                 for commit in commits:
                     f.write('# commit: %s\n' % commit)
+            if branch_patches:
+                for branch in branch_patches:
+                    if branch == args.branch:
+                        continue
+                    f.write('# patches_%s: %s\n' % (branch, ','.join(branch_patches[branch])))
 
         update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn])
 
@@ -977,21 +1061,29 @@
     return 0
 
 
-def _get_patchset_revs(srctree, recipe_path, initial_rev=None):
+def _get_patchset_revs(srctree, recipe_path, initial_rev=None, force_patch_refresh=False):
     """Get initial and update rev of a recipe. These are the start point of the
     whole patchset and start point for the patches to be re-generated/updated.
     """
     import bb
 
+    # Get current branch
+    stdout, _ = bb.process.run('git rev-parse --abbrev-ref HEAD',
+                               cwd=srctree)
+    branchname = stdout.rstrip()
+
     # Parse initial rev from recipe if not specified
     commits = []
+    patches = []
     with open(recipe_path, 'r') as f:
         for line in f:
             if line.startswith('# initial_rev:'):
                 if not initial_rev:
                     initial_rev = line.split(':')[-1].strip()
-            elif line.startswith('# commit:'):
+            elif line.startswith('# commit:') and not force_patch_refresh:
                 commits.append(line.split(':')[-1].strip())
+            elif line.startswith('# patches_%s:' % branchname):
+                patches = line.split(':')[-1].strip().split(',')
 
     update_rev = initial_rev
     changed_revs = None
@@ -1010,7 +1102,7 @@
         except bb.process.ExecutionError as err:
             stdout = None
 
-        if stdout is not None:
+        if stdout is not None and not force_patch_refresh:
             changed_revs = []
             for line in stdout.splitlines():
                 if line.startswith('+ '):
@@ -1018,7 +1110,7 @@
                     if rev in newcommits:
                         changed_revs.append(rev)
 
-    return initial_rev, update_rev, changed_revs
+    return initial_rev, update_rev, changed_revs, patches
 
 def _remove_file_entries(srcuri, filelist):
     """Remove file:// entries from SRC_URI"""
@@ -1044,8 +1136,11 @@
             srcuri.insert(i, newentry)
             break
 
-def _remove_source_files(append, files, destpath):
+def _remove_source_files(append, files, destpath, no_report_remove=False, dry_run=False):
     """Unlink existing patch files"""
+
+    dry_run_suffix = ' (dry-run)' if dry_run else ''
+
     for path in files:
         if append:
             if not destpath:
@@ -1053,19 +1148,21 @@
             path = os.path.join(destpath, os.path.basename(path))
 
         if os.path.exists(path):
-            logger.info('Removing file %s' % path)
-            # FIXME "git rm" here would be nice if the file in question is
-            #       tracked
-            # FIXME there's a chance that this file is referred to by
-            #       another recipe, in which case deleting wouldn't be the
-            #       right thing to do
-            os.remove(path)
-            # Remove directory if empty
-            try:
-                os.rmdir(os.path.dirname(path))
-            except OSError as ose:
-                if ose.errno != errno.ENOTEMPTY:
-                    raise
+            if not no_report_remove:
+                logger.info('Removing file %s%s' % (path, dry_run_suffix))
+            if not dry_run:
+                # FIXME "git rm" here would be nice if the file in question is
+                #       tracked
+                # FIXME there's a chance that this file is referred to by
+                #       another recipe, in which case deleting wouldn't be the
+                #       right thing to do
+                os.remove(path)
+                # Remove directory if empty
+                try:
+                    os.rmdir(os.path.dirname(path))
+                except OSError as ose:
+                    if ose.errno != errno.ENOTEMPTY:
+                        raise
 
 
 def _export_patches(srctree, rd, start_rev, destdir, changed_revs=None):
@@ -1085,6 +1182,7 @@
 
     existing_patches = dict((os.path.basename(path), path) for path in
                             oe.recipeutils.get_recipe_patches(rd))
+    logger.debug('Existing patches: %s' % existing_patches)
 
     # Generate patches from Git, exclude local files directory
     patch_pathspec = _git_exclude_path(srctree, 'oe-local-files')
@@ -1166,7 +1264,7 @@
     return False
 
 
-def _export_local_files(srctree, rd, destdir):
+def _export_local_files(srctree, rd, destdir, srctreebase):
     """Copy local files from srctree to given location.
        Returns three-tuple of dicts:
          1. updated - files that already exist in SRCURI
@@ -1186,7 +1284,7 @@
     updated = OrderedDict()
     added = OrderedDict()
     removed = OrderedDict()
-    local_files_dir = os.path.join(srctree, 'oe-local-files')
+    local_files_dir = os.path.join(srctreebase, 'oe-local-files')
     git_files = _git_ls_tree(srctree)
     if 'oe-local-files' in git_files:
         # If tracked by Git, take the files from srctree HEAD. First get
@@ -1199,9 +1297,9 @@
         new_set = list(_git_ls_tree(srctree, tree, True).keys())
     elif os.path.isdir(local_files_dir):
         # If not tracked by Git, just copy from working copy
-        new_set = _ls_tree(os.path.join(srctree, 'oe-local-files'))
+        new_set = _ls_tree(local_files_dir)
         bb.process.run(['cp', '-ax',
-                        os.path.join(srctree, 'oe-local-files', '.'), destdir])
+                        os.path.join(local_files_dir, '.'), destdir])
     else:
         new_set = []
 
@@ -1266,13 +1364,16 @@
     return os.path.join(recipedir, rd.getVar('BPN'))
 
 
-def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remove):
+def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, no_report_remove, dry_run_outdir=None):
     """Implement the 'srcrev' mode of update-recipe"""
     import bb
     import oe.recipeutils
 
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+
     recipefile = rd.getVar('FILE')
-    logger.info('Updating SRCREV in recipe %s' % os.path.basename(recipefile))
+    recipedir = os.path.basename(recipefile)
+    logger.info('Updating SRCREV in recipe %s%s' % (recipedir, dry_run_suffix))
 
     # Get HEAD revision
     try:
@@ -1292,9 +1393,11 @@
     srcuri = orig_src_uri.split()
     tempdir = tempfile.mkdtemp(prefix='devtool')
     update_srcuri = False
+    appendfile = None
     try:
         local_files_dir = tempfile.mkdtemp(dir=tempdir)
-        upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
+        srctreebase = workspace[recipename]['srctreebase']
+        upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
         if not no_remove:
             # Find list of existing patches in recipe file
             patches_dir = tempfile.mkdtemp(dir=tempdir)
@@ -1316,29 +1419,36 @@
             if update_srcuri:
                 removevalues  = {'SRC_URI': removedentries}
                 patchfields['SRC_URI'] = '\\\n    '.join(srcuri)
-            _, destpath = oe.recipeutils.bbappend_recipe(
-                    rd, appendlayerdir, files, wildcardver=wildcard_version,
-                    extralines=patchfields, removevalues=removevalues)
+            if dry_run_outdir:
+                logger.info('Creating bbappend (dry-run)')
+            else:
+                appendfile, destpath = oe.recipeutils.bbappend_recipe(
+                        rd, appendlayerdir, files, wildcardver=wildcard_version,
+                        extralines=patchfields, removevalues=removevalues,
+                        redirect_output=dry_run_outdir)
         else:
             files_dir = _determine_files_dir(rd)
             for basepath, path in upd_f.items():
-                logger.info('Updating file %s' % basepath)
+                logger.info('Updating file %s%s' % (basepath, dry_run_suffix))
                 if os.path.isabs(basepath):
                     # Original file (probably with subdir pointing inside source tree)
                     # so we do not want to move it, just copy
-                    _copy_file(basepath, path)
+                    _copy_file(basepath, path, dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 else:
-                    _move_file(os.path.join(local_files_dir, basepath), path)
+                    _move_file(os.path.join(local_files_dir, basepath), path,
+                               dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 update_srcuri= True
             for basepath, path in new_f.items():
-                logger.info('Adding new file %s' % basepath)
+                logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
                 _move_file(os.path.join(local_files_dir, basepath),
-                           os.path.join(files_dir, basepath))
+                           os.path.join(files_dir, basepath),
+                           dry_run_outdir=dry_run_outdir,
+                           base_outdir=recipedir)
                 srcuri.append('file://%s' % basepath)
                 update_srcuri = True
             if update_srcuri:
                 patchfields['SRC_URI'] = ' '.join(srcuri)
-            oe.recipeutils.patch_recipe(rd, recipefile, patchfields)
+            ret = oe.recipeutils.patch_recipe(rd, recipefile, patchfields, redirect_output=dry_run_outdir)
     finally:
         shutil.rmtree(tempdir)
     if not 'git://' in orig_src_uri:
@@ -1346,47 +1456,62 @@
                     'point to a git repository where you have pushed your '
                     'changes')
 
-    _remove_source_files(appendlayerdir, remove_files, destpath)
-    return True
+    _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
+    return True, appendfile, remove_files
 
-def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev):
+def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir=None, force_patch_refresh=False):
     """Implement the 'patch' mode of update-recipe"""
     import bb
     import oe.recipeutils
 
     recipefile = rd.getVar('FILE')
+    recipedir = os.path.dirname(recipefile)
     append = workspace[recipename]['bbappend']
     if not os.path.exists(append):
         raise DevtoolError('unable to find workspace bbappend for recipe %s' %
                            recipename)
 
-    initial_rev, update_rev, changed_revs = _get_patchset_revs(srctree, append, initial_rev)
+    initial_rev, update_rev, changed_revs, filter_patches = _get_patchset_revs(srctree, append, initial_rev, force_patch_refresh)
     if not initial_rev:
         raise DevtoolError('Unable to find initial revision - please specify '
                            'it with --initial-rev')
 
+    appendfile = None
     dl_dir = rd.getVar('DL_DIR')
     if not dl_dir.endswith('/'):
         dl_dir += '/'
 
+    dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
+
     tempdir = tempfile.mkdtemp(prefix='devtool')
     try:
         local_files_dir = tempfile.mkdtemp(dir=tempdir)
-        upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir)
+        if filter_patches:
+            upd_f = {}
+            new_f = {}
+            del_f = {}
+        else:
+            srctreebase = workspace[recipename]['srctreebase']
+            upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase)
 
         remove_files = []
         if not no_remove:
             # Get all patches from source tree and check if any should be removed
             all_patches_dir = tempfile.mkdtemp(dir=tempdir)
-            upd_p, new_p, del_p = _export_patches(srctree, rd, initial_rev,
-                                                  all_patches_dir)
+            _, _, del_p = _export_patches(srctree, rd, initial_rev,
+                                          all_patches_dir)
             # Remove deleted local files and  patches
             remove_files = list(del_f.values()) + list(del_p.values())
 
         # Get updated patches from source tree
         patches_dir = tempfile.mkdtemp(dir=tempdir)
-        upd_p, new_p, del_p = _export_patches(srctree, rd, update_rev,
-                                              patches_dir, changed_revs)
+        upd_p, new_p, _ = _export_patches(srctree, rd, update_rev,
+                                          patches_dir, changed_revs)
+        logger.debug('Pre-filtering: update: %s, new: %s' % (dict(upd_p), dict(new_p)))
+        if filter_patches:
+            new_p = {}
+            upd_p = {k:v for k,v in upd_p.items() if k in filter_patches}
+            remove_files = [f for f in remove_files if f in filter_patches]
         updatefiles = False
         updaterecipe = False
         destpath = None
@@ -1405,10 +1530,11 @@
                         remaining = ['file://' + os.path.basename(item) for
                                      item in remaining]
                         removevalues = {'SRC_URI': removedentries + remaining}
-                _, destpath = oe.recipeutils.bbappend_recipe(
+                appendfile, destpath = oe.recipeutils.bbappend_recipe(
                                 rd, appendlayerdir, files,
                                 wildcardver=wildcard_version,
-                                removevalues=removevalues)
+                                removevalues=removevalues,
+                                redirect_output=dry_run_outdir)
             else:
                 logger.info('No patches or local source files needed updating')
         else:
@@ -1419,9 +1545,11 @@
                 if os.path.isabs(basepath):
                     # Original file (probably with subdir pointing inside source tree)
                     # so we do not want to move it, just copy
-                    _copy_file(basepath, path)
+                    _copy_file(basepath, path,
+                               dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 else:
-                    _move_file(os.path.join(local_files_dir, basepath), path)
+                    _move_file(os.path.join(local_files_dir, basepath), path,
+                               dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 updatefiles = True
             for basepath, path in upd_p.items():
                 patchfn = os.path.join(patches_dir, basepath)
@@ -1433,39 +1561,45 @@
                     _replace_srcuri_entry(srcuri, basepath, 'file://%s' % basepath)
                     updaterecipe = True
                 else:
-                    logger.info('Updating patch %s' % basepath)
-                logger.debug('Moving new patch %s to %s' % (patchfn, path))
-                _move_file(patchfn, path)
+                    logger.info('Updating patch %s%s' % (basepath, dry_run_suffix))
+                _move_file(patchfn, path,
+                           dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
                 updatefiles = True
             # Add any new files
             for basepath, path in new_f.items():
-                logger.info('Adding new file %s' % basepath)
+                logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
                 _move_file(os.path.join(local_files_dir, basepath),
-                           os.path.join(files_dir, basepath))
+                           os.path.join(files_dir, basepath),
+                           dry_run_outdir=dry_run_outdir,
+                           base_outdir=recipedir)
                 srcuri.append('file://%s' % basepath)
                 updaterecipe = True
             for basepath, path in new_p.items():
-                logger.info('Adding new patch %s' % basepath)
+                logger.info('Adding new patch %s%s' % (basepath, dry_run_suffix))
                 _move_file(os.path.join(patches_dir, basepath),
-                           os.path.join(files_dir, basepath))
+                           os.path.join(files_dir, basepath),
+                           dry_run_outdir=dry_run_outdir,
+                           base_outdir=recipedir)
                 srcuri.append('file://%s' % basepath)
                 updaterecipe = True
             # Update recipe, if needed
             if _remove_file_entries(srcuri, remove_files)[0]:
                 updaterecipe = True
             if updaterecipe:
-                logger.info('Updating recipe %s' % os.path.basename(recipefile))
-                oe.recipeutils.patch_recipe(rd, recipefile,
-                                            {'SRC_URI': ' '.join(srcuri)})
+                if not dry_run_outdir:
+                    logger.info('Updating recipe %s' % os.path.basename(recipefile))
+                ret = oe.recipeutils.patch_recipe(rd, recipefile,
+                                                  {'SRC_URI': ' '.join(srcuri)},
+                                                  redirect_output=dry_run_outdir)
             elif not updatefiles:
                 # Neither patches nor recipe were updated
                 logger.info('No patches or files need updating')
-                return False
+                return False, None, []
     finally:
         shutil.rmtree(tempdir)
 
-    _remove_source_files(appendlayerdir, remove_files, destpath)
-    return True
+    _remove_source_files(appendlayerdir, remove_files, destpath, no_report_remove, dry_run=dry_run_outdir)
+    return True, appendfile, remove_files
 
 def _guess_recipe_update_mode(srctree, rdata):
     """Guess the recipe update mode to use"""
@@ -1489,18 +1623,73 @@
 
     return 'patch'
 
-def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_version, no_remove, initial_rev):
+def _update_recipe(recipename, workspace, rd, mode, appendlayerdir, wildcard_version, no_remove, initial_rev, no_report_remove=False, dry_run_outdir=None, no_overrides=False, force_patch_refresh=False):
     srctree = workspace[recipename]['srctree']
     if mode == 'auto':
         mode = _guess_recipe_update_mode(srctree, rd)
 
-    if mode == 'srcrev':
-        updated = _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remove)
-    elif mode == 'patch':
-        updated = _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wildcard_version, no_remove, initial_rev)
-    else:
-        raise DevtoolError('update_recipe: invalid mode %s' % mode)
-    return updated
+    override_branches = []
+    mainbranch = None
+    startbranch = None
+    if not no_overrides:
+        stdout, _ = bb.process.run('git branch', cwd=srctree)
+        other_branches = []
+        for line in stdout.splitlines():
+            branchname = line[2:]
+            if line.startswith('* '):
+                startbranch = branchname
+            if branchname.startswith(override_branch_prefix):
+                override_branches.append(branchname)
+            else:
+                other_branches.append(branchname)
+
+        if override_branches:
+            logger.debug('_update_recipe: override branches: %s' % override_branches)
+            logger.debug('_update_recipe: other branches: %s' % other_branches)
+            if startbranch.startswith(override_branch_prefix):
+                if len(other_branches) == 1:
+                    mainbranch = other_branches[1]
+                else:
+                    raise DevtoolError('Unable to determine main branch - please check out the main branch in source tree first')
+            else:
+                mainbranch = startbranch
+
+    checkedout = None
+    anyupdated = False
+    appendfile = None
+    allremoved = []
+    if override_branches:
+        logger.info('Handling main branch (%s)...' % mainbranch)
+        if startbranch != mainbranch:
+            bb.process.run('git checkout %s' % mainbranch, cwd=srctree)
+        checkedout = mainbranch
+    try:
+        branchlist = [mainbranch] + override_branches
+        for branch in branchlist:
+            crd = bb.data.createCopy(rd)
+            if branch != mainbranch:
+                logger.info('Handling branch %s...' % branch)
+                override = branch[len(override_branch_prefix):]
+                crd.appendVar('OVERRIDES', ':%s' % override)
+                bb.process.run('git checkout %s' % branch, cwd=srctree)
+                checkedout = branch
+
+            if mode == 'srcrev':
+                updated, appendf, removed = _update_recipe_srcrev(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, dry_run_outdir)
+            elif mode == 'patch':
+                updated, appendf, removed = _update_recipe_patch(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir, force_patch_refresh)
+            else:
+                raise DevtoolError('update_recipe: invalid mode %s' % mode)
+            if updated:
+                anyupdated = True
+            if appendf:
+                appendfile = appendf
+            allremoved.extend(removed)
+    finally:
+        if startbranch and checkedout != startbranch:
+            bb.process.run('git checkout %s' % startbranch, cwd=srctree)
+
+    return anyupdated, appendfile, allremoved
 
 def update_recipe(args, config, basepath, workspace):
     """Entry point for the devtool 'update-recipe' subcommand"""
@@ -1521,7 +1710,12 @@
         if not rd:
             return 1
 
-        updated = _update_recipe(args.recipename, workspace, rd, args.mode, args.append, args.wildcard_version, args.no_remove, args.initial_rev)
+        dry_run_output = None
+        dry_run_outdir = None
+        if args.dry_run:
+            dry_run_output = tempfile.TemporaryDirectory(prefix='devtool')
+            dry_run_outdir = dry_run_output.name
+        updated, _, _ = _update_recipe(args.recipename, workspace, rd, args.mode, args.append, args.wildcard_version, args.no_remove, args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
 
         if updated:
             rf = rd.getVar('FILE')
@@ -1550,6 +1744,7 @@
 
 def _reset(recipes, no_clean, config, basepath, workspace):
     """Reset one or more recipes"""
+    import oe.path
 
     def clean_preferred_provider(pn, layerconf_path):
         """Remove PREFERRED_PROVIDER from layer.conf'"""
@@ -1596,6 +1791,13 @@
     for pn in recipes:
         _check_preserve(config, pn)
 
+        appendfile = workspace[pn]['bbappend']
+        if os.path.exists(appendfile):
+            # This shouldn't happen, but is possible if devtool errored out prior to
+            # writing the md5 file. We need to delete this here or the recipe won't
+            # actually be reset
+            os.remove(appendfile)
+
         preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
         def preservedir(origdir):
             if os.path.exists(origdir):
@@ -1608,20 +1810,23 @@
                         preservedir(os.path.join(root, dn))
                 os.rmdir(origdir)
 
-        preservedir(os.path.join(config.workspace_path, 'recipes', pn))
+        recipefile = workspace[pn]['recipefile']
+        if recipefile and oe.path.is_path_parent(config.workspace_path, recipefile):
+            # This should always be true if recipefile is set, but just in case
+            preservedir(os.path.dirname(recipefile))
         # We don't automatically create this dir next to appends, but the user can
         preservedir(os.path.join(config.workspace_path, 'appends', pn))
 
-        srctree = workspace[pn]['srctree']
-        if os.path.isdir(srctree):
-            if os.listdir(srctree):
+        srctreebase = workspace[pn]['srctreebase']
+        if os.path.isdir(srctreebase):
+            if os.listdir(srctreebase):
                 # We don't want to risk wiping out any work in progress
                 logger.info('Leaving source tree %s as-is; if you no '
                             'longer need it then please delete it manually'
-                            % srctree)
+                            % srctreebase)
             else:
                 # This is unlikely, but if it's empty we can just remove it
-                os.rmdir(srctree)
+                os.rmdir(srctreebase)
 
         clean_preferred_provider(pn, config.workspace_path)
 
@@ -1656,9 +1861,7 @@
         layerdir = layers.get('meta', None)
     else:
         layerdir = layers.get(layername, None)
-    if layerdir:
-        layerdir = os.path.abspath(layerdir)
-    return layerdir or layername
+    return os.path.abspath(layerdir or layername)
 
 def finish(args, config, basepath, workspace):
     """Entry point for the devtool 'finish' subcommand"""
@@ -1667,6 +1870,20 @@
 
     check_workspace_recipe(workspace, args.recipename)
 
+    dry_run_suffix = ' (dry-run)' if args.dry_run else ''
+
+    # Grab the equivalent of COREBASE without having to initialise tinfoil
+    corebasedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
+
+    srctree = workspace[args.recipename]['srctree']
+    check_git_repo_op(srctree, [corebasedir])
+    dirty = check_git_repo_dirty(srctree)
+    if dirty:
+        if args.force:
+            logger.warning('Source tree is not clean, continuing as requested by -f/--force')
+        else:
+            raise DevtoolError('Source tree is not clean:\n\n%s\nEnsure you have committed your changes or use -f/--force if you are sure there\'s nothing that needs to be committed' % dirty)
+
     no_clean = False
     tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     try:
@@ -1675,7 +1892,9 @@
             return 1
 
         destlayerdir = _get_layer(args.destination, tinfoil.config_data)
-        origlayerdir = oe.recipeutils.find_layerdir(rd.getVar('FILE'))
+        recipefile = rd.getVar('FILE')
+        recipedir = os.path.dirname(recipefile)
+        origlayerdir = oe.recipeutils.find_layerdir(recipefile)
 
         if not os.path.isdir(destlayerdir):
             raise DevtoolError('Unable to find layer or directory matching "%s"' % args.destination)
@@ -1694,6 +1913,8 @@
                 elif line.startswith('# original_files:'):
                     origfilelist = line.split(':')[1].split()
 
+        destlayerbasedir = oe.recipeutils.find_layerdir(destlayerdir)
+
         if origlayerdir == config.workspace_path:
             # Recipe file itself is in workspace, update it there first
             appendlayerdir = None
@@ -1707,7 +1928,7 @@
                 raise DevtoolError("Unable to determine destination layer path - check that %s specifies an actual layer and %s/conf/layer.conf specifies BBFILES. You may also need to specify a more complete path." % (args.destination, destlayerdir))
             # Warn if the layer isn't in bblayers.conf (the code to create a bbappend will do this in other cases)
             layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()]
-            if not os.path.abspath(destlayerdir) in layerdirs:
+            if not os.path.abspath(destlayerbasedir) in layerdirs:
                 bb.warn('Specified destination layer is not currently enabled in bblayers.conf, so the %s recipe will now be unavailable in your current configuration until you add the layer there' % args.recipename)
 
         elif destlayerdir == origlayerdir:
@@ -1719,37 +1940,103 @@
             appendlayerdir = destlayerdir
             destpath = None
 
+        # Actually update the recipe / bbappend
+        removing_original = (origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == destlayerbasedir)
+        dry_run_output = None
+        dry_run_outdir = None
+        if args.dry_run:
+            dry_run_output = tempfile.TemporaryDirectory(prefix='devtool')
+            dry_run_outdir = dry_run_output.name
+        updated, appendfile, removed = _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, no_report_remove=removing_original, initial_rev=args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
+        removed = [os.path.relpath(pth, recipedir) for pth in removed]
+
         # Remove any old files in the case of an upgrade
-        if origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == oe.recipeutils.find_layerdir(destlayerdir):
+        if removing_original:
             for fn in origfilelist:
                 fnp = os.path.join(origpath, fn)
-                try:
-                    os.remove(fnp)
-                except FileNotFoundError:
-                    pass
-
-        # Actually update the recipe / bbappend
-        _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, initial_rev=args.initial_rev)
+                if fn in removed or not os.path.exists(os.path.join(recipedir, fn)):
+                    logger.info('Removing file %s%s' % (fnp, dry_run_suffix))
+                if not args.dry_run:
+                    try:
+                        os.remove(fnp)
+                    except FileNotFoundError:
+                        pass
 
         if origlayerdir == config.workspace_path and destpath:
             # Recipe file itself is in the workspace - need to move it and any
             # associated files to the specified layer
             no_clean = True
-            logger.info('Moving recipe file to %s' % destpath)
-            recipedir = os.path.dirname(rd.getVar('FILE'))
+            logger.info('Moving recipe file to %s%s' % (destpath, dry_run_suffix))
             for root, _, files in os.walk(recipedir):
                 for fn in files:
                     srcpath = os.path.join(root, fn)
                     relpth = os.path.relpath(os.path.dirname(srcpath), recipedir)
                     destdir = os.path.abspath(os.path.join(destpath, relpth))
-                    bb.utils.mkdirhier(destdir)
-                    shutil.move(srcpath, os.path.join(destdir, fn))
+                    destfp = os.path.join(destdir, fn)
+                    _move_file(srcpath, destfp, dry_run_outdir=dry_run_outdir, base_outdir=destpath)
 
+        if dry_run_outdir:
+            import difflib
+            comparelist = []
+            for root, _, files in os.walk(dry_run_outdir):
+                for fn in files:
+                    outf = os.path.join(root, fn)
+                    relf = os.path.relpath(outf, dry_run_outdir)
+                    logger.debug('dry-run: output file %s' % relf)
+                    if fn.endswith('.bb'):
+                        if origfilelist and origpath and destpath:
+                            # Need to match this up with the pre-upgrade recipe file
+                            for origf in origfilelist:
+                                if origf.endswith('.bb'):
+                                    comparelist.append((os.path.abspath(os.path.join(origpath, origf)),
+                                                        outf,
+                                                        os.path.abspath(os.path.join(destpath, relf))))
+                                    break
+                        else:
+                            # Compare to the existing recipe
+                            comparelist.append((recipefile, outf, recipefile))
+                    elif fn.endswith('.bbappend'):
+                        if appendfile:
+                            if os.path.exists(appendfile):
+                                comparelist.append((appendfile, outf, appendfile))
+                            else:
+                                comparelist.append((None, outf, appendfile))
+                    else:
+                        if destpath:
+                            recipedest = destpath
+                        elif appendfile:
+                            recipedest = os.path.dirname(appendfile)
+                        else:
+                            recipedest = os.path.dirname(recipefile)
+                        destfp = os.path.join(recipedest, relf)
+                        if os.path.exists(destfp):
+                            comparelist.append((destfp, outf, destfp))
+            output = ''
+            for oldfile, newfile, newfileshow in comparelist:
+                if oldfile:
+                    with open(oldfile, 'r') as f:
+                        oldlines = f.readlines()
+                else:
+                    oldfile = '/dev/null'
+                    oldlines = []
+                with open(newfile, 'r') as f:
+                    newlines = f.readlines()
+                if not newfileshow:
+                    newfileshow = newfile
+                diff = difflib.unified_diff(oldlines, newlines, oldfile, newfileshow)
+                difflines = list(diff)
+                if difflines:
+                    output += ''.join(difflines)
+            if output:
+                logger.info('Diff of changed files:\n%s' % output)
     finally:
         tinfoil.shutdown()
 
     # Everything else has succeeded, we can now reset
-    _reset([args.recipename], no_clean=no_clean, config=config, basepath=basepath, workspace=workspace)
+    if args.dry_run:
+        logger.info('Resetting recipe (dry-run)')
+    else:
+        _reset([args.recipename], no_clean=no_clean, config=config, basepath=basepath, workspace=workspace)
 
     return 0
 
@@ -1803,6 +2090,7 @@
     group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
     group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
     parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")')
+    parser_modify.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
     parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true")
     parser_modify.set_defaults(func=modify, fixed_setup=context.fixed_setup)
 
@@ -1812,6 +2100,7 @@
     parser_extract.add_argument('recipename', help='Name of recipe to extract the source for')
     parser_extract.add_argument('srctree', help='Path to where to extract the source tree')
     parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (default "%(default)s")')
+    parser_extract.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
     parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
     parser_extract.set_defaults(func=extract, fixed_setup=context.fixed_setup)
 
@@ -1843,6 +2132,9 @@
     parser_update_recipe.add_argument('--append', '-a', help='Write changes to a bbappend in the specified layer instead of the recipe', metavar='LAYERDIR')
     parser_update_recipe.add_argument('--wildcard-version', '-w', help='In conjunction with -a/--append, use a wildcard to make the bbappend apply to any recipe version', action='store_true')
     parser_update_recipe.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update')
+    parser_update_recipe.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)')
+    parser_update_recipe.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)')
+    parser_update_recipe.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
     parser_update_recipe.set_defaults(func=update_recipe)
 
     parser_status = subparsers.add_parser('status', help='Show workspace status',
@@ -1859,10 +2151,14 @@
     parser_reset.set_defaults(func=reset)
 
     parser_finish = subparsers.add_parser('finish', help='Finish working on a recipe in your workspace',
-                                         description='Pushes any committed changes to the specified recipe to the specified layer and removes it from your workspace. Roughly equivalent to an update-recipe followed by reset, except the update-recipe step will do the "right thing" depending on the recipe and the destination layer specified.',
+                                         description='Pushes any committed changes to the specified recipe to the specified layer and removes it from your workspace. Roughly equivalent to an update-recipe followed by reset, except the update-recipe step will do the "right thing" depending on the recipe and the destination layer specified. Note that your changes must have been committed to the git repository in order to be recognised.',
                                          group='working', order=-100)
     parser_finish.add_argument('recipename', help='Recipe to finish')
     parser_finish.add_argument('destination', help='Layer/path to put recipe into. Can be the name of a layer configured in your bblayers.conf, the path to the base of a layer, or a partial path inside a layer. %(prog)s will attempt to complete the path based on the layer\'s structure.')
     parser_finish.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE')
     parser_finish.add_argument('--initial-rev', help='Override starting revision for patches')
+    parser_finish.add_argument('--force', '-f', action="store_true", help='Force continuing even if there are uncommitted changes in the source tree repository')
+    parser_finish.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)')
+    parser_finish.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)')
+    parser_finish.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
     parser_finish.set_defaults(func=finish)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py b/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py
index f1b3ff0..c3fd866 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/upgrade.py
@@ -33,7 +33,7 @@
 
 import oe.recipeutils
 from devtool import standard
-from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs
+from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs, check_prerelease_version
 
 logger = logging.getLogger('devtool')
 
@@ -55,17 +55,6 @@
         dest_path = os.path.join(dest, path)
         shutil.move(os.path.join(orig, path), dest_path)
 
-def _get_checksums(rf):
-    import re
-    checksums = {}
-    with open(rf) as f:
-        for line in f:
-            for cs in ['md5sum', 'sha256sum']:
-                m = re.match("^SRC_URI\[%s\].*=.*\"(.*)\"" % cs, line)
-                if m:
-                    checksums[cs] = m.group(1)
-    return checksums
-
 def _remove_patch_dirs(recipefolder):
     for root, dirs, files in os.walk(recipefolder):
         for d in dirs:
@@ -202,6 +191,8 @@
         __run('git tag -f devtool-base-new')
         md5 = None
         sha256 = None
+        _, _, _, _, _, params = bb.fetch2.decodeurl(uri)
+        srcsubdir_rel = params.get('destsuffix', 'git')
         if not srcbranch:
             check_branch, check_branch_err = __run('git branch -r --contains %s' % srcrev)
             get_branch = [x.strip() for x in check_branch.splitlines()]
@@ -236,6 +227,7 @@
 
         tmpsrctree = _get_srctree(tmpdir)
         srctree = os.path.abspath(srctree)
+        srcsubdir_rel = os.path.relpath(tmpsrctree, tmpdir)
 
         # Delete all sources so we ensure no stray files are left over
         for item in os.listdir(srctree):
@@ -251,8 +243,15 @@
         _copy_source_code(tmpsrctree, srctree)
 
         (stdout,_) = __run('git ls-files --modified --others --exclude-standard')
-        for f in stdout.splitlines():
-            __run('git add "%s"' % f)
+        filelist = stdout.splitlines()
+        pbar = bb.ui.knotty.BBProgress('Adding changed files', len(filelist))
+        pbar.start()
+        batchsize = 100
+        for i in range(0, len(filelist), batchsize):
+            batch = filelist[i:i+batchsize]
+            __run('git add -A %s' % ' '.join(['"%s"' % item for item in batch]))
+            pbar.update(i)
+        pbar.finish()
 
         useroptions = []
         oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd)
@@ -264,10 +263,8 @@
 
     if no_patch:
         patches = oe.recipeutils.get_recipe_patches(crd)
-        if len(patches):
-            logger.warn('By user choice, the following patches will NOT be applied')
-            for patch in patches:
-                logger.warn("%s" % os.path.basename(patch))
+        if patches:
+            logger.warn('By user choice, the following patches will NOT be applied to the new source tree:\n  %s' % '\n  '.join([os.path.basename(patch) for patch in patches]))
     else:
         __run('git checkout devtool-patched -b %s' % branch)
         skiptag = False
@@ -292,9 +289,28 @@
         else:
             shutil.rmtree(tmpsrctree)
 
-    return (rev, md5, sha256, srcbranch)
+    return (rev, md5, sha256, srcbranch, srcsubdir_rel)
 
-def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, workspace, tinfoil, rd):
+def _add_license_diff_to_recipe(path, diff):
+    notice_text = """# FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'.
+# The following is the difference between the old and the new license text.
+# Please update the LICENSE value if needed, and summarize the changes in
+# the commit message via 'License-Update:' tag.
+# (example: 'License-Update: copyright years updated.')
+#
+# The changes:
+#
+"""
+    commented_diff = "\n".join(["# {}".format(l) for l in diff.split('\n')])
+    with open(path, 'rb') as f:
+        orig_content = f.read()
+    with open(path, 'wb') as f:
+        f.write(notice_text.encode())
+        f.write(commented_diff.encode())
+        f.write("\n#\n\n".encode())
+        f.write(orig_content)
+
+def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, srcsubdir_new, workspace, tinfoil, rd, license_diff, new_licenses):
     """Creates the new recipe under workspace"""
 
     bpn = rd.getVar('BPN')
@@ -346,9 +362,67 @@
 
     newvalues['PR'] = None
 
+    # Work out which SRC_URI entries have changed in case the entry uses a name
+    crd = rd.createCopy()
+    crd.setVar('PV', newpv)
+    for var, value in newvalues.items():
+        crd.setVar(var, value)
+    old_src_uri = (rd.getVar('SRC_URI') or '').split()
+    new_src_uri = (crd.getVar('SRC_URI') or '').split()
+    newnames = []
+    addnames = []
+    for newentry in new_src_uri:
+        _, _, _, _, _, params = bb.fetch2.decodeurl(newentry)
+        if 'name' in params:
+            newnames.append(params['name'])
+            if newentry not in old_src_uri:
+                addnames.append(params['name'])
+    # Find what's been set in the original recipe
+    oldnames = []
+    noname = False
+    for varflag in rd.getVarFlags('SRC_URI'):
+        if varflag.endswith(('.md5sum', '.sha256sum')):
+            name = varflag.rsplit('.', 1)[0]
+            if name not in oldnames:
+                oldnames.append(name)
+        elif varflag in ['md5sum', 'sha256sum']:
+            noname = True
+    # Even if SRC_URI has named entries it doesn't have to actually use the name
+    if noname and addnames and addnames[0] not in oldnames:
+        addnames = []
+    # Drop any old names (the name actually might include ${PV})
+    for name in oldnames:
+        if name not in newnames:
+            newvalues['SRC_URI[%s.md5sum]' % name] = None
+            newvalues['SRC_URI[%s.sha256sum]' % name] = None
+
     if md5 and sha256:
-        newvalues['SRC_URI[md5sum]'] = md5
-        newvalues['SRC_URI[sha256sum]'] = sha256
+        if addnames:
+            nameprefix = '%s.' % addnames[0]
+        else:
+            nameprefix = ''
+        newvalues['SRC_URI[%smd5sum]' % nameprefix] = md5
+        newvalues['SRC_URI[%ssha256sum]' % nameprefix] = sha256
+
+    if srcsubdir_new != srcsubdir_old:
+        s_subdir_old = os.path.relpath(os.path.abspath(rd.getVar('S')), rd.getVar('WORKDIR'))
+        s_subdir_new = os.path.relpath(os.path.abspath(crd.getVar('S')), crd.getVar('WORKDIR'))
+        if srcsubdir_old == s_subdir_old and srcsubdir_new != s_subdir_new:
+            # Subdir for old extracted source matches what S points to (it should!)
+            # but subdir for new extracted source doesn't match what S will be
+            newvalues['S'] = '${WORKDIR}/%s' % srcsubdir_new.replace(newpv, '${PV}')
+            if crd.expand(newvalues['S']) == crd.expand('${WORKDIR}/${BP}'):
+                # It's the default, drop it
+                # FIXME what if S is being set in a .inc?
+                newvalues['S'] = None
+                logger.info('Source subdirectory has changed, dropping S value since it now matches the default ("${WORKDIR}/${BP}")')
+            else:
+                logger.info('Source subdirectory has changed, updating S value')
+
+    if license_diff:
+        newlicchksum = " ".join(["file://{};md5={}".format(l["path"], l["actual_md5"]) + (";beginline={}".format(l["beginline"]) if l["beginline"] else "") + (";endline={}".format(l["endline"]) if l["endline"] else "") for l in new_licenses])
+        newvalues["LIC_FILES_CHKSUM"] = newlicchksum
+        _add_license_diff_to_recipe(fullpath, license_diff)
 
     rd = tinfoil.parse_recipe_file(fullpath, False)
     oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
@@ -377,14 +451,53 @@
     if configerr:
         raise DevtoolError('Your git configuration is incomplete which will prevent rebases from working:\n' + '\n'.join(configerr))
 
+def _extract_licenses(srcpath, recipe_licenses):
+    licenses = []
+    for url in recipe_licenses.split():
+        license = {}
+        (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
+        license['path'] = path
+        license['md5'] = parm.get('md5', '')
+        license['beginline'], license['endline'] = 0, 0
+        if 'beginline' in parm:
+            license['beginline'] = int(parm['beginline'])
+        if 'endline' in parm:
+            license['endline'] = int(parm['endline'])
+        license['text'] = []
+        with open(os.path.join(srcpath, path), 'rb') as f:
+            import hashlib
+            actual_md5 = hashlib.md5()
+            lineno = 0
+            for line in f:
+                lineno += 1
+                if (lineno >= license['beginline']) and ((lineno <= license['endline']) or not license['endline']):
+                    license['text'].append(line.decode(errors='ignore'))
+                    actual_md5.update(line)
+        license['actual_md5'] = actual_md5.hexdigest()
+        licenses.append(license)
+    return licenses
+
+def _generate_license_diff(old_licenses, new_licenses):
+    need_diff = False
+    for l in new_licenses:
+        if l['md5'] != l['actual_md5']:
+            need_diff = True
+            break
+    if need_diff == False:
+        return None
+
+    import difflib
+    diff = ''
+    for old, new in zip(old_licenses, new_licenses):
+        for line in difflib.unified_diff(old['text'], new['text'], old['path'], new['path']):
+            diff = diff + line
+    return diff
 
 def upgrade(args, config, basepath, workspace):
     """Entry point for the devtool 'upgrade' subcommand"""
 
     if args.recipename in workspace:
         raise DevtoolError("recipe %s is already in your workspace" % args.recipename)
-    if not args.version and not args.srcrev:
-        raise DevtoolError("You must provide a version using the --version/-V option, or for recipes that fetch from an SCM such as git, the --srcrev/-S option")
     if args.srcbranch and not args.srcrev:
         raise DevtoolError("If you specify --srcbranch/-B then you must use --srcrev/-S to specify the revision" % args.recipename)
 
@@ -407,22 +520,43 @@
         else:
             srctree = standard.get_default_srctree(config, pn)
 
+        # try to automatically discover latest version and revision if not provided on command line
+        if not args.version and not args.srcrev:
+            version_info = oe.recipeutils.get_recipe_upstream_version(rd)
+            if version_info['version'] and not version_info['version'].endswith("new-commits-available"):
+                args.version = version_info['version']
+            if version_info['revision']:
+                args.srcrev = version_info['revision']
+        if not args.version and not args.srcrev:
+            raise DevtoolError("Automatic discovery of latest version/revision failed - you must provide a version using the --version/-V option, or for recipes that fetch from an SCM such as git, the --srcrev/-S option.")
+
         standard._check_compatible_recipe(pn, rd)
         old_srcrev = rd.getVar('SRCREV')
         if old_srcrev == 'INVALID':
             old_srcrev = None
         if old_srcrev and not args.srcrev:
             raise DevtoolError("Recipe specifies a SRCREV value; you must specify a new one when upgrading")
-        if rd.getVar('PV') == args.version and old_srcrev == args.srcrev:
+        old_ver = rd.getVar('PV')
+        if old_ver == args.version and old_srcrev == args.srcrev:
             raise DevtoolError("Current and upgrade versions are the same version")
+        if args.version:
+            if bb.utils.vercmp_string(args.version, old_ver) < 0:
+                logger.warning('Upgrade version %s compares as less than the current version %s. If you are using a package feed for on-target upgrades or providing this recipe for general consumption, then you should increment PE in the recipe (or if there is no current PE value set, set it to "1")' % (args.version, old_ver))
+            check_prerelease_version(args.version, 'devtool upgrade')
 
         rf = None
+        license_diff = None
         try:
-            rev1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
-            rev2, md5, sha256, srcbranch = _extract_new_source(args.version, srctree, args.no_patch,
+            logger.info('Extracting current version source...')
+            rev1, srcsubdir1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
+            old_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
+            logger.info('Extracting upgraded version source...')
+            rev2, md5, sha256, srcbranch, srcsubdir2 = _extract_new_source(args.version, srctree, args.no_patch,
                                                     args.srcrev, args.srcbranch, args.branch, args.keep_temp,
                                                     tinfoil, rd)
-            rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, config.workspace_path, tinfoil, rd)
+            new_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
+            license_diff = _generate_license_diff(old_licenses, new_licenses)
+            rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, srcsubdir1, srcsubdir2, config.workspace_path, tinfoil, rd, license_diff, new_licenses)
         except bb.process.CmdError as e:
             _upgrade_error(e, rf, srctree)
         except DevtoolError as e:
@@ -433,10 +567,32 @@
                         copied, config.workspace_path, rd)
         standard._add_md5(config, pn, af)
 
-        update_unlockedsigs(basepath, workspace, [pn], args.fixed_setup)
+        update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn])
 
         logger.info('Upgraded source extracted to %s' % srctree)
         logger.info('New recipe is %s' % rf)
+        if license_diff:
+            logger.info('License checksums have been updated in the new recipe; please refer to it for the difference between the old and the new license texts.')
+    finally:
+        tinfoil.shutdown()
+    return 0
+
+def latest_version(args, config, basepath, workspace):
+    """Entry point for the devtool 'latest_version' subcommand"""
+    tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
+    try:
+        rd = parse_recipe(config, tinfoil, args.recipename, True)
+        if not rd:
+            return 1
+        version_info = oe.recipeutils.get_recipe_upstream_version(rd)
+        # "new-commits-available" is an indication that upstream never issues version tags
+        if not version_info['version'].endswith("new-commits-available"):
+            logger.info("Current version: {}".format(version_info['current_version']))
+            logger.info("Latest version: {}".format(version_info['version']))
+            if version_info['revision']:
+                logger.info("Latest version's commit: {}".format(version_info['revision']))
+        else:
+            logger.info("Latest commit: {}".format(version_info['revision']))
     finally:
         tinfoil.shutdown()
     return 0
@@ -451,13 +607,20 @@
                                            group='starting')
     parser_upgrade.add_argument('recipename', help='Name of recipe to upgrade (just name - no version, path or extension)')
     parser_upgrade.add_argument('srctree',  nargs='?', help='Path to where to extract the source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
-    parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV)')
-    parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (required if fetching from an SCM such as git)')
+    parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV). If omitted, latest upstream version will be determined and used, if possible.')
+    parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (useful when fetching from an SCM such as git)')
     parser_upgrade.add_argument('--srcbranch', '-B', help='Branch in source repository containing the revision to use (if fetching from an SCM such as git)')
     parser_upgrade.add_argument('--branch', '-b', default="devtool", help='Name for new development branch to checkout (default "%(default)s")')
     parser_upgrade.add_argument('--no-patch', action="store_true", help='Do not apply patches from the recipe to the new source code')
+    parser_upgrade.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
     group = parser_upgrade.add_mutually_exclusive_group()
     group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
     group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
     parser_upgrade.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
     parser_upgrade.set_defaults(func=upgrade, fixed_setup=context.fixed_setup)
+
+    parser_latest_version = subparsers.add_parser('latest-version', help='Report the latest version of an existing recipe',
+                                                  description='Queries the upstream server for what the latest upstream release is (for git, tags are checked, for tarballs, a list of them is obtained, and one with the highest version number is reported)',
+                                                  group='info')
+    parser_latest_version.add_argument('recipename', help='Name of recipe to query (just name - no version, path or extension)')
+    parser_latest_version.set_defaults(func=latest_version)
diff --git a/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py b/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py
index b745116..7cd139f 100644
--- a/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py
+++ b/import-layers/yocto-poky/scripts/lib/devtool/utilcmds.py
@@ -32,6 +32,12 @@
 
 def _find_recipe_path(args, config, basepath, workspace):
     if args.any_recipe:
+        logger.warning('-a/--any-recipe option is now always active, and thus the option will be removed in a future release')
+    if args.recipename in workspace:
+        recipefile = workspace[args.recipename]['recipefile']
+    else:
+        recipefile = None
+    if not recipefile:
         tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
         try:
             rd = parse_recipe(config, tinfoil, args.recipename, True)
@@ -40,12 +46,6 @@
             recipefile = rd.getVar('FILE')
         finally:
             tinfoil.shutdown()
-    else:
-        check_workspace_recipe(workspace, args.recipename)
-        recipefile = workspace[args.recipename]['recipefile']
-        if not recipefile:
-            raise DevtoolError("Recipe file for %s is not under the workspace" %
-                               args.recipename)
     return recipefile
 
 
@@ -222,19 +222,21 @@
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
-    parser_edit_recipe = subparsers.add_parser('edit-recipe', help='Edit a recipe file in your workspace',
-                                         description='Runs the default editor (as specified by the EDITOR variable) on the specified recipe. Note that the recipe file itself must be in the workspace (i.e. as a result of "devtool add" or "devtool upgrade"); you can override this with the -a/--any-recipe option.',
+    parser_edit_recipe = subparsers.add_parser('edit-recipe', help='Edit a recipe file',
+                                         description='Runs the default editor (as specified by the EDITOR variable) on the specified recipe. Note that this will be quicker for recipes in the workspace as the cache does not need to be loaded in that case.',
                                          group='working')
     parser_edit_recipe.add_argument('recipename', help='Recipe to edit')
-    parser_edit_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Edit any recipe, not just where the recipe file itself is in the workspace')
+    # FIXME drop -a at some point in future
+    parser_edit_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Does nothing (exists for backwards-compatibility)')
     parser_edit_recipe.set_defaults(func=edit_recipe)
 
     # Find-recipe
-    parser_find_recipe = subparsers.add_parser('find-recipe', help='Find a recipe file in your workspace',
-                                         description='By default, this will find a recipe file in your workspace; you can override this with the -a/--any-recipe option.',
+    parser_find_recipe = subparsers.add_parser('find-recipe', help='Find a recipe file',
+                                         description='Finds a recipe file. Note that this will be quicker for recipes in the workspace as the cache does not need to be loaded in that case.',
                                          group='working')
     parser_find_recipe.add_argument('recipename', help='Recipe to find')
-    parser_find_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Find any recipe, not just where the recipe file itself is in the workspace')
+    # FIXME drop -a at some point in future
+    parser_find_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Does nothing (exists for backwards-compatibility)')
     parser_find_recipe.set_defaults(func=find_recipe)
 
     # NOTE: Needed to override the usage string here since the default
diff --git a/import-layers/yocto-poky/scripts/lib/recipetool/create.py b/import-layers/yocto-poky/scripts/lib/recipetool/create.py
index 5bf939e..a371028 100644
--- a/import-layers/yocto-poky/scripts/lib/recipetool/create.py
+++ b/import-layers/yocto-poky/scripts/lib/recipetool/create.py
@@ -383,8 +383,10 @@
         # which causes decodeurl to fail getting the right host and path
         if len(host.split(':')) > 1:
             splitslash = host.split(':')
-            host = splitslash[0]
-            path = '/' + splitslash[1] + path
+            # Port number should not be split from host
+            if not re.match('^[0-9]+$', splitslash[1]):
+                host = splitslash[0]
+                path = '/' + splitslash[1] + path
         #Algorithm:
         # if user is defined, append protocol=ssh or if a protocol is defined, then honor the user-defined protocol
         # if no user & password is defined, check for scheme type and append the protocol with the scheme type
@@ -433,6 +435,9 @@
         source = 'file://%s' % os.path.abspath(source)
 
     if scriptutils.is_src_url(source):
+        # Warn about github archive URLs
+        if re.match('https?://github.com/[^/]+/[^/]+/archive/.+(\.tar\..*|\.zip)$', source):
+            logger.warn('github archive files are not guaranteed to be stable and may be re-generated over time. If the latter occurs, the checksums will likely change and the recipe will fail at do_fetch. It is recommended that you point to an actual commit or tag in the repository instead (using the repository URL in conjunction with the -S/--srcrev option).')
         # Fetch a URL
         fetchuri = reformat_git_uri(urldefrag(source)[0])
         if args.binary:
diff --git a/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py b/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py
index ae53972..bb42a5c 100644
--- a/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py
+++ b/import-layers/yocto-poky/scripts/lib/recipetool/create_npm.py
@@ -73,7 +73,6 @@
                     license = license.replace(' ', '_')
                     if not license[0] == '(':
                         license = '(' + license + ')'
-                    print('LICENSE: {}'.format(license))
                 else:
                     license = license.replace('AND', '&')
                     if license[0] == '(':
@@ -321,6 +320,7 @@
                     blacklist = True
                     break
             if (not blacklist and 'linux' not in pkg_os) or '!linux' in pkg_os:
+                pkg = pdata.get('name', 'Unnamed package')
                 logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg)
                 return False
         return True
diff --git a/import-layers/yocto-poky/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in b/import-layers/yocto-poky/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
new file mode 100644
index 0000000..7300e65
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
@@ -0,0 +1,3 @@
+bootloader --ptable gpt
+part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --fstype=vfat --label boot --active --align 1024 --use-uuid --overhead-factor 1.0
+part / --source rootfs --fstype=ext4 --label root --align 1024 --exclude-path boot/
diff --git a/import-layers/yocto-poky/scripts/lib/wic/filemap.py b/import-layers/yocto-poky/scripts/lib/wic/filemap.py
index 77e32b9..a72fa09 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/filemap.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/filemap.py
@@ -37,7 +37,15 @@
     # Get the block size of the host file-system for the image file by calling
     # the FIGETBSZ ioctl (number 2).
     binary_data = fcntl.ioctl(file_obj, 2, struct.pack('I', 0))
-    return struct.unpack('I', binary_data)[0]
+    bsize = struct.unpack('I', binary_data)[0]
+    if not bsize:
+        import os
+        stat = os.fstat(file_obj.fileno())
+        if hasattr(stat, 'st_blksize'):
+            bsize = stat.st_blksize
+        else:
+            raise IOError("Unable to determine block size")
+    return bsize
 
 class ErrorNotSupp(Exception):
     """
diff --git a/import-layers/yocto-poky/scripts/lib/wic/help.py b/import-layers/yocto-poky/scripts/lib/wic/help.py
index 2ac45e0..842b868 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/help.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/help.py
@@ -576,6 +576,10 @@
           partition. In other words, it 'prepares' the final partition
           image which will be incorporated into the disk image.
 
+      do_post_partition()
+          Called after the partition is created. It is useful to add post
+          operations e.g. signing the partition.
+
       do_configure_partition()
           Called before do_prepare_partition(), typically used to
           create custom configuration files for a partition, for
@@ -863,7 +867,10 @@
        This is achieved by wic adding entries to the fstab during image
        generation. In order for a valid fstab to be generated one of the
        --ondrive, --ondisk or --use-uuid partition options must be used for
-       each partition that specifies a mountpoint.
+       each partition that specifies a mountpoint.  Note that with --use-uuid
+       and non-root <mountpoint>, including swap, the mount program must
+       understand the PARTUUID syntax.  This currently excludes the busybox
+       versions of these applications.
 
 
        The following are supported 'part' options:
@@ -986,6 +993,11 @@
                  in bootloader configuration before running wic. In this case .wks file can
                  be generated or modified to set preconfigured parition UUID using this option.
 
+         --fsuuid: This option is specific to wic. It specifies filesystem UUID.
+                   It's useful if preconfigured filesystem UUID is added to kernel command line
+                   in bootloader configuration before running wic. In this case .wks file can
+                   be generated or modified to set preconfigured filesystem UUID using this option.
+
          --system-id: This option is specific to wic. It specifies partition system id. It's useful
                       for the harware that requires non-default partition system ids. The parameter
                       in one byte long hex number either with 0x prefix or without it.
diff --git a/import-layers/yocto-poky/scripts/lib/wic/ksparser.py b/import-layers/yocto-poky/scripts/lib/wic/ksparser.py
index 7850e81..e590b2f 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/ksparser.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/ksparser.py
@@ -161,6 +161,7 @@
         part.add_argument('--system-id', type=systemidtype)
         part.add_argument('--use-uuid', action='store_true')
         part.add_argument('--uuid')
+        part.add_argument('--fsuuid')
 
         bootloader = subparsers.add_parser('bootloader')
         bootloader.add_argument('--append')
@@ -195,6 +196,11 @@
                         raise KickStartError('%s:%d: %s' % \
                                              (confpath, lineno, err))
                     if line.startswith('part'):
+                        # SquashFS does not support UUID
+                        if parsed.fstype == 'squashfs' and parsed.use_uuid:
+                            err = "%s:%d: SquashFS does not support UUID" \
+                                  % (confpath, lineno)
+                            raise KickStartError(err)
                         # using ArgumentParser one cannot easily tell if option
                         # was passed as argument, if said option has a default
                         # value; --overhead-factor/--extra-space cannot be used
diff --git a/import-layers/yocto-poky/scripts/lib/wic/partition.py b/import-layers/yocto-poky/scripts/lib/wic/partition.py
index 84fe85d..3fe5c4e 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/partition.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/partition.py
@@ -26,6 +26,7 @@
 
 import logging
 import os
+import uuid
 
 from wic import WicError
 from wic.misc import exec_cmd, exec_native_cmd, get_bitbake_var
@@ -61,6 +62,7 @@
         self.system_id = args.system_id
         self.use_uuid = args.use_uuid
         self.uuid = args.uuid
+        self.fsuuid = args.fsuuid
 
         self.lineno = lineno
         self.source_file = ""
@@ -183,6 +185,9 @@
         plugin.do_prepare_partition(self, srcparams_dict, creator,
                                     cr_workdir, oe_builddir, bootimg_dir,
                                     kernel_dir, rootfs_dir, native_sysroot)
+        plugin.do_post_partition(self, srcparams_dict, creator,
+                                    cr_workdir, oe_builddir, bootimg_dir,
+                                    kernel_dir, rootfs_dir, native_sysroot)
 
         # further processing required Partition.size to be an integer, make
         # sure that it is one
@@ -197,12 +202,12 @@
                            (self.mountpoint, self.size, self.fixed_size))
 
     def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
-                       native_sysroot):
+                       native_sysroot, real_rootfs = True):
         """
         Prepare content for a rootfs partition i.e. create a partition
         and fill it from a /rootfs dir.
 
-        Currently handles ext2/3/4, btrfs and vfat.
+        Currently handles ext2/3/4, btrfs, vfat and squashfs.
         """
         p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
         p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR",
@@ -221,7 +226,7 @@
             os.remove(rootfs)
 
         # Get rootfs size from bitbake variable if it's not set in .ks file
-        if not self.size:
+        if not self.size and real_rootfs:
             # Bitbake variable ROOTFS_SIZE is calculated in
             # Image._get_rootfs_size method from meta/lib/oe/image.py
             # using IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT,
@@ -264,8 +269,8 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s %s %s %s -d %s" % \
-            (self.fstype, extraopts, rootfs, label_str, rootfs_dir)
+        mkfs_cmd = "mkfs.%s %s %s %s -U %s -d %s" % \
+            (self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir)
         exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
 
         mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
@@ -275,8 +280,6 @@
                              native_sysroot, pseudo):
         """
         Prepare content for a btrfs rootfs partition.
-
-        Currently handles ext2/3/4 and btrfs.
         """
         du_cmd = "du -ks %s" % rootfs_dir
         out = exec_cmd(du_cmd)
@@ -291,9 +294,9 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s -b %d -r %s %s %s %s" % \
+        mkfs_cmd = "mkfs.%s -b %d -r %s %s %s -U %s %s" % \
             (self.fstype, rootfs_size * 1024, rootfs_dir, label_str,
-             self.mkfs_extraopts, rootfs)
+             self.mkfs_extraopts, self.fsuuid, rootfs)
         exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
 
     def prepare_rootfs_msdos(self, rootfs, oe_builddir, rootfs_dir,
@@ -317,8 +320,9 @@
 
         extraopts = self.mkfs_extraopts or '-S 512'
 
-        dosfs_cmd = "mkdosfs %s %s %s -C %s %d" % \
-                    (label_str, size_str, extraopts, rootfs, rootfs_size)
+        dosfs_cmd = "mkdosfs %s -i %s %s %s -C %s %d" % \
+                    (label_str, self.fsuuid, size_str, extraopts, rootfs,
+                     max(8250, rootfs_size))
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
@@ -354,8 +358,8 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s -F %s %s %s" % \
-            (self.fstype, extraopts, label_str, rootfs)
+        mkfs_cmd = "mkfs.%s -F %s %s -U %s %s" % \
+            (self.fstype, extraopts, label_str, self.fsuuid, rootfs)
         exec_native_cmd(mkfs_cmd, native_sysroot)
 
     def prepare_empty_partition_btrfs(self, rootfs, oe_builddir,
@@ -371,8 +375,8 @@
         if self.label:
             label_str = "-L %s" % self.label
 
-        mkfs_cmd = "mkfs.%s -b %d %s %s %s" % \
-                   (self.fstype, self.size * 1024, label_str,
+        mkfs_cmd = "mkfs.%s -b %d %s -U %s %s %s" % \
+                   (self.fstype, self.size * 1024, label_str, self.fsuuid,
                     self.mkfs_extraopts, rootfs)
         exec_native_cmd(mkfs_cmd, native_sysroot)
 
@@ -393,8 +397,9 @@
 
         extraopts = self.mkfs_extraopts or '-S 512'
 
-        dosfs_cmd = "mkdosfs %s %s %s -C %s %d" % \
-                    (label_str, extraopts, size_str, rootfs, blocks)
+        dosfs_cmd = "mkdosfs %s -i %s %s %s -C %s %d" % \
+                    (label_str, self.fsuuid, extraopts, size_str, rootfs,
+                     blocks)
 
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
@@ -412,9 +417,9 @@
         with open(path, 'w') as sparse:
             os.ftruncate(sparse.fileno(), self.size * 1024)
 
-        import uuid
         label_str = ""
         if self.label:
             label_str = "-L %s" % self.label
-        mkswap_cmd = "mkswap %s -U %s %s" % (label_str, str(uuid.uuid1()), path)
+
+        mkswap_cmd = "mkswap %s -U %s %s" % (label_str, self.fsuuid, path)
         exec_native_cmd(mkswap_cmd, native_sysroot)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py b/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py
index c009820..686d2fe 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/pluginbase.py
@@ -137,3 +137,13 @@
         'prepares' the partition to be incorporated into the image.
         """
         logger.debug("SourcePlugin: do_prepare_partition: part: %s", part)
+
+    @classmethod
+    def do_post_partition(cls, part, source_params, creator, cr_workdir,
+                             oe_builddir, bootimg_dir, kernel_dir, rootfs_dir,
+                             native_sysroot):
+        """
+        Called after the partition is created. It is useful to add post
+        operations e.g. security signing the partition.
+        """
+        logger.debug("SourcePlugin: do_post_partition: part: %s", part)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py
index da1c061..1fa6b91 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/imager/direct.py
@@ -63,6 +63,7 @@
 
         # parse possible 'rootfs=name' items
         self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' '))
+        self.replaced_rootfs_paths = {}
         self.bootimg_dir = bootimg_dir
         self.kernel_dir = kernel_dir
         self.native_sysroot = native_sysroot
@@ -141,7 +142,15 @@
                 continue
 
             if part.use_uuid:
-                device_name = "PARTUUID=%s" % part.uuid
+                if part.fsuuid:
+                    # FAT UUID is different from others
+                    if len(part.fsuuid) == 10:
+                        device_name = "UUID=%s-%s" % \
+                                       (part.fsuuid[2:6], part.fsuuid[6:])
+                    else:
+                        device_name = "UUID=%s" % part.fsuuid
+                else:
+                    device_name = "PARTUUID=%s" % part.uuid
             else:
                 # mmc device partitions are named mmcblk0p1, mmcblk0p2..
                 prefix = 'p' if  part.disk.startswith('mmcblk') else ''
@@ -175,6 +184,7 @@
             new_rootfs = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
         if new_rootfs:
             # rootfs was copied to update fstab
+            self.replaced_rootfs_paths[new_rootfs] = self.rootfs_dir['ROOTFS_DIR']
             self.rootfs_dir['ROOTFS_DIR'] = new_rootfs
 
         for part in self.parts:
@@ -250,7 +260,10 @@
                 suffix = ':'
             else:
                 suffix = '["%s"]:' % (part.mountpoint or part.label)
-            msg += '  ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.rootfs_dir)
+            rootdir = part.rootfs_dir
+            if rootdir in self.replaced_rootfs_paths:
+                rootdir = self.replaced_rootfs_paths[rootdir]
+            msg += '  ROOTFS_DIR%s%s\n' % (suffix.ljust(20), rootdir)
 
         msg += '  BOOTIMG_DIR:                  %s\n' % self.bootimg_dir
         msg += '  KERNEL_DIR:                   %s\n' % self.kernel_dir
@@ -334,13 +347,18 @@
                     continue
                 part.realnum = realnum
 
-        # generate parition UUIDs
+        # generate parition and filesystem UUIDs
         for part in self.partitions:
             if not part.uuid and part.use_uuid:
                 if self.ptable_format == 'gpt':
                     part.uuid = str(uuid.uuid4())
                 else: # msdos partition table
                     part.uuid = '%08x-%02d' % (self.identifier, part.realnum)
+            if not part.fsuuid:
+                if part.fstype == 'vfat' or part.fstype == 'msdos':
+                    part.fsuuid = '0x' + str(uuid.uuid4())[:8].upper()
+                else:
+                    part.fsuuid = str(uuid.uuid4())
 
     def prepare(self, imager):
         """Prepare an image. Call prepare method of all image partitions."""
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
index 4c4f36a..beb74d7 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -240,7 +240,8 @@
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot.img" % cr_workdir
 
-        dosfs_cmd = "mkdosfs -n efi -C %s %d" % (bootimg, blocks)
+        dosfs_cmd = "mkdosfs -n efi -i %s -C %s %d" % \
+                    (part.fsuuid, bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
index 67e5498..b239fc0 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -129,4 +129,4 @@
 
         logger.debug('Prepare boot partition using rootfs in %s', hdddir)
         part.prepare_rootfs(cr_workdir, oe_builddir, hdddir,
-                            native_sysroot)
+                            native_sysroot, False)
diff --git a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 56da468..d599112 100644
--- a/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/import-layers/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -186,7 +186,8 @@
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno)
 
-        dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, blocks)
+        dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \
+                    (part.fsuuid, bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
diff --git a/import-layers/yocto-poky/scripts/oe-buildenv-internal b/import-layers/yocto-poky/scripts/oe-buildenv-internal
index 77f98a3..6773872 100755
--- a/import-layers/yocto-poky/scripts/oe-buildenv-internal
+++ b/import-layers/yocto-poky/scripts/oe-buildenv-internal
@@ -101,6 +101,7 @@
 
 if [ -z "$BITBAKEDIR" ]; then
     BITBAKEDIR="$OEROOT/bitbake$BBEXTRA"
+    test -d "$BITBAKEDIR" || BITBAKEDIR="$OEROOT/../bitbake$BBEXTRA"
 fi
 
 BITBAKEDIR=$(readlink -f "$BITBAKEDIR")
diff --git a/import-layers/yocto-poky/scripts/oe-depends-dot b/import-layers/yocto-poky/scripts/oe-depends-dot
new file mode 100755
index 0000000..5cec23b
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/oe-depends-dot
@@ -0,0 +1,121 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2018 Wind River Systems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+import os
+import sys
+import argparse
+import logging
+import re
+
+class Dot(object):
+    def __init__(self):
+        parser = argparse.ArgumentParser(
+            description="Analyse recipe-depends.dot generated by bitbake -g",
+            epilog="Use %(prog)s --help to get help")
+        parser.add_argument("dotfile",
+            help = "Specify the dotfile", nargs = 1, action='store', default='')
+        parser.add_argument("-k", "--key",
+            help = "Specify the key, e.g., recipe name",
+            action="store", default='')
+        parser.add_argument("-d", "--depends",
+            help = "Print the key's dependencies",
+            action="store_true", default=False)
+        parser.add_argument("-w", "--why",
+            help = "Print why the key is built",
+            action="store_true", default=False)
+        parser.add_argument("-r", "--remove",
+            help = "Remove duplicated dependencies to reduce the size of the dot files."
+                    " For example, A->B, B->C, A->C, then A->C can be removed.",
+            action="store_true", default=False)
+
+        self.args = parser.parse_args()
+
+        if len(sys.argv) != 3 and len(sys.argv) < 5:
+            print('ERROR: Not enough args, see --help for usage')
+
+    def main(self):
+        #print(self.args.dotfile[0])
+        # The format is {key: depends}
+        depends = {}
+        with open(self.args.dotfile[0], 'r') as f:
+            for line in f.readlines():
+                if ' -> ' not in line:
+                    continue
+                line_no_quotes = line.replace('"', '')
+                m = re.match("(.*) -> (.*)", line_no_quotes)
+                if not m:
+                    print('WARNING: Found unexpected line: %s' % line)
+                    continue
+                key = m.group(1)
+                if key == "meta-world-pkgdata":
+                    continue
+                dep = m.group(2)
+                if key in depends:
+                    if not key in depends[key]:
+                        depends[key].add(dep)
+                    else:
+                        print('WARNING: Fonud duplicated line: %s' % line)
+                else:
+                    depends[key] = set()
+                    depends[key].add(dep)
+
+        if self.args.remove:
+            reduced_depends = {}
+            for k, deps in depends.items():
+                child_deps = set()
+                added = set()
+                # Both direct and indirect depends are already in the dict, so
+                # we don't have to do this recursively.
+                for dep in deps:
+                    if dep in depends:
+                        child_deps |= depends[dep]
+
+                reduced_depends[k] = deps - child_deps
+                outfile= '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:])
+            with open(outfile, 'w') as f:
+                print('Saving reduced dot file to %s' % outfile)
+                f.write('digraph depends {\n')
+                for k, v in reduced_depends.items():
+                    for dep in v:
+                        f.write('"%s" -> "%s"\n' % (k, dep))
+                f.write('}\n')
+            sys.exit(0)
+
+        if self.args.key not in depends:
+            print("ERROR: Can't find key %s in %s" % (self.args.key, self.args.dotfile[0]))
+            sys.exit(1)
+
+        if self.args.depends:
+            if self.args.key in depends:
+                print('Depends: %s' % ' '.join(depends[self.args.key]))
+
+        reverse_deps = []
+        if self.args.why:
+            for k, v in depends.items():
+                if self.args.key in v and not k in reverse_deps:
+                    reverse_deps.append(k)
+            print('Because: %s' % ' '.join(reverse_deps))
+
+if __name__ == "__main__":
+    try:
+        dot = Dot()
+        ret = dot.main()
+    except Exception as esc:
+        ret = 1
+        import traceback
+        traceback.print_exc()
+    sys.exit(ret)
diff --git a/import-layers/yocto-poky/scripts/oe-pkgdata-util b/import-layers/yocto-poky/scripts/oe-pkgdata-util
index c6fba56..aea8a57 100755
--- a/import-layers/yocto-poky/scripts/oe-pkgdata-util
+++ b/import-layers/yocto-poky/scripts/oe-pkgdata-util
@@ -252,32 +252,72 @@
     print('\n'.join(items))
 
 def lookup_recipe(args):
+    def parse_pkgdatafile(pkgdatafile):
+        with open(pkgdatafile, 'r') as f:
+            found = False
+            for line in f:
+                if line.startswith('PN:'):
+                    print("%s" % line.split(':', 1)[1].strip())
+                    found = True
+                    break
+            if not found:
+                logger.error("Unable to find PN entry in %s" % pkgdatafile)
+                sys.exit(1)
+
     # Handle both multiple arguments and multiple values within an arg (old syntax)
     pkgs = []
     for pkgitem in args.pkg:
         pkgs.extend(pkgitem.split())
 
-    mappings = defaultdict(list)
     for pkg in pkgs:
-        pkgfile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
-        if os.path.exists(pkgfile):
-            with open(pkgfile, 'r') as f:
-                for line in f:
-                    fields = line.rstrip().split(': ')
-                    if fields[0] == 'PN':
-                        mappings[pkg].append(fields[1])
-                        break
-    if len(mappings) < len(pkgs):
-        missing = list(set(pkgs) - set(mappings.keys()))
-        logger.error("The following packages could not be found: %s" % ', '.join(missing))
-        sys.exit(1)
-
-    items = []
-    for pkg in pkgs:
-        items.extend(mappings.get(pkg, []))
-    print('\n'.join(items))
+        providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+        if os.path.exists(providepkgpath):
+            for f in os.listdir(providepkgpath):
+                if f != pkg:
+                    print("%s is in the RPROVIDES of %s:" % (pkg, f))
+                pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+                parse_pkgdatafile(pkgdatafile)
+            break
+        pkgdatafile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
+        if not os.path.exists(pkgdatafile):
+            logger.error("The following packages could not be found: %s" % pkg)
+            sys.exit(1)
+        parse_pkgdatafile(pkgdatafile)
 
 def package_info(args):
+    def parse_pkgdatafile(pkgdatafile):
+        with open(pkgdatafile, 'r') as f:
+            pkge = ''
+            pkgr = ''
+            pe = ''
+            pr = ''
+            for line in f:
+                if line.startswith('PKGV:'):
+                    pkg_version = line.split(':', 1)[1].strip()
+                elif line.startswith('PKGE:'):
+                    pkge = line.split(':', 1)[1].strip()
+                elif line.startswith('PKGR:'):
+                    pkgr = line.split(':', 1)[1].strip()
+                elif line.startswith('PN:'):
+                    recipe = line.split(':', 1)[1].strip()
+                elif line.startswith('PV:'):
+                    recipe_version = line.split(':', 1)[1].strip()
+                elif line.startswith('PE:'):
+                    pe = line.split(':', 1)[1].strip()
+                elif line.startswith('PR:'):
+                    pr = line.split(':', 1)[1].strip()
+                elif line.startswith('PKGSIZE'):
+                    pkg_size = line.split(':', 1)[1].strip()
+            if pkge:
+                pkg_version = pkge + ":" + pkg_version
+            if pkgr:
+                pkg_version = pkg_version + "-" + pkgr
+            if pe:
+                recipe_version = pe + ":" + recipe_version
+            if pr:
+                recipe_version = recipe_version + "-" + pr
+            print("%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size))
+
     # Handle both multiple arguments and multiple values within an arg (old syntax)
     packages = []
     if args.file:
@@ -293,51 +333,20 @@
             logger.error("No packages specified")
             sys.exit(1)
 
-    mappings = defaultdict(lambda: defaultdict(str))
     for pkg in packages:
-        pkgfile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg)
-        if os.path.exists(pkgfile):
-            with open(pkgfile, 'r') as f:
-                for line in f:
-                    fields = line.rstrip().split(': ')
-                    if fields[0].endswith("_" + pkg):
-                        k = fields[0][:len(fields[0]) - len(pkg) - 1]
-                    else:
-                        k = fields[0]
-                    v = fields[1] if len(fields) == 2 else ""
-                    mappings[pkg][k] = v
-
-    if len(mappings) < len(packages):
-        missing = list(set(packages) - set(mappings.keys()))
-        logger.error("The following packages could not be found: %s" %
-                     ', '.join(missing))
-        sys.exit(1)
-
-    items = []
-    for pkg in packages:
-        pkg_version = mappings[pkg]['PKGV']
-        if mappings[pkg]['PKGE']:
-            pkg_version = mappings[pkg]['PKGE'] + ":" + pkg_version
-        if mappings[pkg]['PKGR']:
-            pkg_version = pkg_version + "-" + mappings[pkg]['PKGR']
-        recipe = mappings[pkg]['PN']
-        recipe_version = mappings[pkg]['PV']
-        if mappings[pkg]['PE']:
-            recipe_version = mappings[pkg]['PE'] + ":" + recipe_version
-        if mappings[pkg]['PR']:
-            recipe_version = recipe_version + "-" + mappings[pkg]['PR']
-        pkg_size = mappings[pkg]['PKGSIZE']
-
-        line = "%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size)
-
-        if args.extra:
-            for var in args.extra:
-                val = mappings[pkg][var].strip()
-                val = re.sub(r'\s+', ' ', val)
-                line += ' "%s"' % val
-
-        items.append(line)
-    print('\n'.join(items))
+        providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+        if os.path.exists(providepkgpath):
+            for f in os.listdir(providepkgpath):
+                if f != pkg:
+                    print("%s is in the RPROVIDES of %s:" % (pkg, f))
+                pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+                parse_pkgdatafile(pkgdatafile)
+            break
+        pkgdatafile = os.path.join(args.pkgdata_dir, "runtime-reverse", pkg)
+        if not os.path.exists(pkgdatafile):
+            logger.error("Unable to find any built runtime package named %s" % pkg)
+            sys.exit(1)
+        parse_pkgdatafile(pkgdatafile)
 
 def get_recipe_pkgs(pkgdata_dir, recipe, unpackaged):
     recipedatafile = os.path.join(pkgdata_dir, recipe)
@@ -426,6 +435,26 @@
 
 def list_pkg_files(args):
     import json
+    def parse_pkgdatafile(pkgdatafile, long=False):
+        with open(pkgdatafile, 'r') as f:
+            found = False
+            for line in f:
+                if line.startswith('FILES_INFO:'):
+                    found = True
+                    val = line.split(':', 1)[1].strip()
+                    dictval = json.loads(val)
+                    if long:
+                        width = max(map(len, dictval), default=0)
+                        for fullpth in sorted(dictval):
+                            print("\t{:{width}}\t{}".format(fullpth, dictval[fullpth], width=width))
+                    else:
+                        for fullpth in sorted(dictval):
+                            print("\t%s" % fullpth)
+                    break
+            if not found:
+                logger.error("Unable to find FILES_INFO entry in %s" % pkgdatafile)
+                sys.exit(1)
+
 
     if args.recipe:
         if args.pkg:
@@ -455,25 +484,22 @@
                     continue
                 logger.error("Unable to find any built runtime package named %s" % pkg)
                 sys.exit(1)
+            parse_pkgdatafile(pkgdatafile, args.long)
+
         else:
+            providepkgpath = os.path.join(args.pkgdata_dir, "runtime-rprovides", pkg)
+            if os.path.exists(providepkgpath):
+                for f in os.listdir(providepkgpath):
+                    if f != pkg:
+                        print("%s is in the RPROVIDES of %s:" % (pkg, f))
+                    pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", f)
+                    parse_pkgdatafile(pkgdatafile, args.long)
+                continue
             pkgdatafile = os.path.join(args.pkgdata_dir, "runtime", pkg)
             if not os.path.exists(pkgdatafile):
                 logger.error("Unable to find any built recipe-space package named %s" % pkg)
                 sys.exit(1)
-
-        with open(pkgdatafile, 'r') as f:
-            found = False
-            for line in f:
-                if line.startswith('FILES_INFO:'):
-                    found = True
-                    val = line.split(':', 1)[1].strip()
-                    dictval = json.loads(val)
-                    for fullpth in sorted(dictval):
-                        print("\t%s" % fullpth)
-                    break
-            if not found:
-                logger.error("Unable to find FILES_INFO entry in %s" % pkgdatafile)
-                sys.exit(1)
+            parse_pkgdatafile(pkgdatafile, args.long)
 
 def find_path(args):
     import json
@@ -527,6 +553,7 @@
     parser_list_pkg_files.add_argument('-r', '--runtime', help='Specified package(s) are runtime package names instead of recipe-space package names', action='store_true')
     parser_list_pkg_files.add_argument('-p', '--recipe', help='Report on all packages produced by the specified recipe')
     parser_list_pkg_files.add_argument('-u', '--unpackaged', help='Include unpackaged (i.e. empty) packages (only useful with -p/--recipe)', action='store_true')
+    parser_list_pkg_files.add_argument('-l', '--long', help='Show more information per file', action='store_true')
     parser_list_pkg_files.set_defaults(func=list_pkg_files)
 
     parser_lookup_recipe = subparsers.add_parser('lookup-recipe',
diff --git a/import-layers/yocto-poky/scripts/oe-setup-rpmrepo b/import-layers/yocto-poky/scripts/oe-setup-rpmrepo
deleted file mode 100755
index df1c614..0000000
--- a/import-layers/yocto-poky/scripts/oe-setup-rpmrepo
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-#
-# This utility setup the necessary metadata for an rpm repo
-#
-# Copyright (c) 2011 Intel Corp.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-# Don't use TMPDIR from the external environment, it may be a distro
-# variable pointing to /tmp (e.g. within X on OpenSUSE)
-# Instead, use OE_TMPDIR for passing this in externally.
-TMPDIR="$OE_TMPDIR"
-
-setup_tmpdir() {
-    if [ -z "$TMPDIR" ]; then
-        # Try to get TMPDIR from bitbake
-        type -P bitbake &>/dev/null || {
-            echo "In order for this script to dynamically infer paths";
-            echo "to kernels or filesystem images, you either need";
-            echo "bitbake in your PATH or to source oe-init-build-env";
-            echo "before running this script" >&2;
-            exit 1; }
-
-        # We have bitbake in PATH, get TMPDIR from bitbake
-        TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
-        if [ -z "$TMPDIR" ]; then
-            echo "Error: this script needs to be run from your build directory,"
-            echo "or you need to explicitly set TMPDIR in your environment"
-            exit 1
-        fi
-    fi
-}
-
-setup_tmpdir
-
-function usage() {
-    echo 'Usage: oe-setup-rpmrepo rpm-dir'
-    echo ''
-    echo 'OpenEmbedded setup-rpmrepo - setup rpm repository'
-    echo ''
-    echo 'arguments:'
-    echo "  rpm-dir               rpm repo directory, default is $TMPDIR/deploy/rpm"
-    echo ''
-}
-
-if [ $# -gt 1 -o "$1" = '--help' -o "$1" = '-h' ]; then
-    usage
-    exit 2
-fi
-
-setup_sysroot() {
-	# Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
-	# environment script. If that variable isn't set, we're
-	# either in an in-tree poky scenario or the environment
-	# script wasn't source'd.
-	if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
-		setup_tmpdir
-		BUILD_ARCH=`uname -m`
-		BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
-		BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
-
-		OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
-	fi 
-}
-
-setup_sysroot
-
-
-if [ -n "$1" ]; then
-	RPM_DIR="$1"
-else
-	RPM_DIR="$TMPDIR/deploy/rpm"
-fi
-
-if [ ! -d "$RPM_DIR" ]; then
-   	echo "Error: rpm dir $RPM_DIR doesn't exist"
-	exit 1
-fi
-
-CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo_c
-if [ ! -e "$CREATEREPO" ]; then
-   	echo "Error: can't find createrepo binary"
-	echo "please run bitbake createrepo-native first"
-	exit 1
-fi
-
-export PATH=${PATH}:${OECORE_NATIVE_SYSROOT}/usr/bin
-
-$CREATEREPO "$RPM_DIR"
-
-exit 0
diff --git a/import-layers/yocto-poky/scripts/postinst-intercepts/delay_to_first_boot b/import-layers/yocto-poky/scripts/postinst-intercepts/delay_to_first_boot
new file mode 100644
index 0000000..ecdbef9
--- /dev/null
+++ b/import-layers/yocto-poky/scripts/postinst-intercepts/delay_to_first_boot
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 1
diff --git a/import-layers/yocto-poky/scripts/runqemu b/import-layers/yocto-poky/scripts/runqemu
index 0ed1eec..d998494 100755
--- a/import-layers/yocto-poky/scripts/runqemu
+++ b/import-layers/yocto-poky/scripts/runqemu
@@ -69,6 +69,7 @@
 of the following environment variables (in any order):
   KERNEL - the kernel image file to use
   ROOTFS - the rootfs image file or nfsroot directory to use
+  DEVICE_TREE - the device tree blob to use
   MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
   Simplified QEMU command-line options can be passed with:
     nographic - disable video console
@@ -178,6 +179,7 @@
         self.env_vars = ('MACHINE',
                         'ROOTFS',
                         'KERNEL',
+                        'DEVICE_TREE',
                         'DEPLOY_DIR_IMAGE',
                         'OE_TMPDIR',
                         'OECORE_NATIVE_SYSROOT',
@@ -584,16 +586,20 @@
                 raise RunQemuError("Can't find OVMF firmware: %s" % ovmf)
 
     def check_kernel(self):
-        """Check and set kernel, dtb"""
+        """Check and set kernel"""
         # The vm image doesn't need a kernel
         if self.fstype in self.vmtypes:
             return
 
+        # See if the user supplied a KERNEL option
+        if self.get('KERNEL'):
+            self.kernel = self.get('KERNEL')
+
         # QB_DEFAULT_KERNEL is always a full file path
         kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL'))
 
         # The user didn't want a kernel to be loaded
-        if kernel_name == "none":
+        if kernel_name == "none" and not self.kernel:
             return
 
         deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
@@ -609,8 +615,18 @@
         if not os.path.exists(self.kernel):
             raise RunQemuError("KERNEL %s not found" % self.kernel)
 
+    def check_dtb(self):
+        """Check and set dtb"""
+        # Did the user specify a device tree?
+        if self.get('DEVICE_TREE'):
+            self.dtb = self.get('DEVICE_TREE')
+            if not os.path.exists(self.dtb):
+                raise RunQemuError('Specified DTB not found: %s' % self.dtb)
+            return
+
         dtb = self.get('QB_DTB')
         if dtb:
+            deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
             cmd_match = "%s/%s" % (deploy_dir_image, dtb)
             cmd_startswith = "%s/%s*" % (deploy_dir_image, dtb)
             cmd_wild = "%s/*.dtb" % deploy_dir_image
@@ -679,6 +695,7 @@
         self.check_rootfs()
         self.check_ovmf()
         self.check_kernel()
+        self.check_dtb()
         self.check_biosdir()
         self.check_mem()
         self.check_tcpserial()
@@ -1089,6 +1106,10 @@
             qbsys = 'mipsel'
         elif mach == 'qemumips64el':
             qbsys = 'mips64el'
+        elif mach == 'qemuriscv64':
+            qbsys = 'riscv64'
+        elif mach == 'qemuriscv32':
+            qbsys = 'riscv32'
 
         return 'qemu-system-%s' % qbsys
 
diff --git a/import-layers/yocto-poky/scripts/test-dependencies.sh b/import-layers/yocto-poky/scripts/test-dependencies.sh
deleted file mode 100755
index 0b94de8..0000000
--- a/import-layers/yocto-poky/scripts/test-dependencies.sh
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/bin/bash
-
-# Author: Martin Jansa <martin.jansa@gmail.com>
-#
-# Copyright (c) 2013 Martin Jansa <Martin.Jansa@gmail.com>
-
-# Used to detect missing dependencies or automagically
-# enabled dependencies which aren't explicitly enabled
-# or disabled. Using bash to have PIPESTATUS variable.
-
-# It does 3 builds of <target>
-# 1st to populate sstate-cache directory and sysroot
-# 2nd to rebuild each recipe with every possible
-#     dependency found in sysroot (which stays populated
-#     from 1st build
-# 3rd to rebuild each recipe only with dependencies defined
-#     in DEPENDS
-# 4th (optional) repeat build like 3rd to make sure that
-#     minimal versions of dependencies defined in DEPENDS
-#     is also enough
-
-# Global vars
-tmpdir=
-targets=
-recipes=
-buildhistory=
-buildtype=
-default_targets="world"
-default_buildhistory="buildhistory"
-default_buildtype="1 2 3 c"
-
-usage () {
-  cat << EOF
-Welcome to utility to detect missing or autoenabled dependencies.
-WARNING: this utility will completely remove your tmpdir (make sure
-         you don't have important buildhistory or persistent dir there).
-$0 <OPTION>
-
-Options:
-  -h, --help
-        Display this help and exit.
-
-  --tmpdir=<tmpdir>
-        Specify tmpdir, will use the environment variable TMPDIR if it is not specified.
-        Something like /OE/oe-core/tmp-eglibc (no / at the end).
-
-  --targets=<targets>
-        List of targets separated by space, will use the environment variable TARGETS if it is not specified.
-        It will run "bitbake <targets>" to populate sysroots.
-        Default value is "world".
-
-  --recipes=<recipes>
-        File with list of recipes we want to rebuild with minimal and maximal sysroot.
-        Will use the environment variable RECIPES if it is not specified.
-        Default value will use all packages ever recorded in buildhistory directory.
-
-  --buildhistory=<buildhistory>
-        Path to buildhistory directory, it needs to be enabled in your config,
-        because it's used to detect different dependencies and to create list
-        of recipes to rebuild when it's not specified.
-        Will use the environment variable BUILDHISTORY if it is not specified.
-        Default value is "buildhistory"
-
-  --buildtype=<buildtype>
-        There are 4 types of build:
-          1: build to populate sstate-cache directory and sysroot
-          2: build to rebuild each recipe with every possible dep
-          3: build to rebuild each recipe with minimal dependencies
-          4: build to rebuild each recipe again with minimal dependencies
-          c: compare buildhistory directories from build 2 and 3
-        Will use the environment variable BUILDTYPE if it is not specified.
-        Default value is "1 2 3 c", order is important, type 4 is optional.
-EOF
-}
-
-# Print error information and exit.
-echo_error () {
-  echo "ERROR: $1" >&2
-  exit 1
-}
-
-while [ -n "$1" ]; do
-  case $1 in
-    --tmpdir=*)
-      tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e`
-      [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir"
-      shift
-        ;;
-    --targets=*)
-      targets=`echo $1 | sed -e 's#^--targets="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --recipes=*)
-      recipes=`echo $1 | sed -e 's#^--recipes="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --buildhistory=*)
-      buildhistory=`echo $1 | sed -e 's#^--buildhistory="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --buildtype=*)
-      buildtype=`echo $1 | sed -e 's#^--buildtype="*\([^"]*\)"*#\1#'`
-      shift
-        ;;
-    --help|-h)
-      usage
-      exit 0
-        ;;
-    *)
-      echo "Invalid arguments $*"
-      echo_error "Try '$0 -h' for more information."
-        ;;
-  esac
-done
-
-# tmpdir directory, use environment variable TMPDIR
-# if it was not specified, otherwise, error.
-[ -n "$tmpdir" ] || tmpdir=$TMPDIR
-[ -n "$tmpdir" ] || echo_error "No tmpdir found!"
-[ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\""
-[ -n "$targets" ] || targets=$TARGETS
-[ -n "$targets" ] || targets=$default_targets
-[ -n "$recipes" ] || recipes=$RECIPES
-[ -n "$recipes" -a ! -f "$recipes" ] && echo_error "Invalid file with list of recipes to rebuild"
-[ -n "$recipes" ] || echo "All packages ever recorded in buildhistory directory will be rebuilt"
-[ -n "$buildhistory" ] || buildhistory=$BUILDHISTORY
-[ -n "$buildhistory" ] || buildhistory=$default_buildhistory
-[ -d "$buildhistory" ] || echo_error "Invalid buildhistory directory \"$buildhistory\""
-[ -n "$buildtype" ] || buildtype=$BUILDTYPE
-[ -n "$buildtype" ] || buildtype=$default_buildtype
-echo "$buildtype" | grep -v '^[1234c ]*$' && echo_error "Invalid buildtype \"$buildtype\", only some combination of 1, 2, 3, 4, c separated by space is allowed"
-
-OUTPUT_BASE=test-dependencies/`date "+%s"`
-declare -i RESULT=0
-
-build_all() {
-  echo "===== 1st build to populate sstate-cache directory and sysroot ====="
-  OUTPUT1=${OUTPUT_BASE}/${TYPE}_all
-  mkdir -p ${OUTPUT1}
-  echo "Logs will be stored in ${OUTPUT1} directory"
-  bitbake -k $targets 2>&1 | tee -a ${OUTPUT1}/complete.log
-  RESULT+=${PIPESTATUS[0]}
-  grep "ERROR: Task.*failed" ${OUTPUT1}/complete.log > ${OUTPUT1}/failed-tasks.log
-  cat ${OUTPUT1}/failed-tasks.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb:.*@@g' | sort -u > ${OUTPUT1}/failed-recipes.log
-}
-
-build_every_recipe() {
-  if [ "${TYPE}" = "2" ] ; then
-    echo "===== 2nd build to rebuild each recipe with every possible dep ====="
-    OUTPUT_MAX=${OUTPUT_BASE}/${TYPE}_max
-    OUTPUTB=${OUTPUT_MAX}
-  else
-    echo "===== 3rd or 4th build to rebuild each recipe with minimal dependencies ====="
-    OUTPUT_MIN=${OUTPUT_BASE}/${TYPE}_min
-    OUTPUTB=${OUTPUT_MIN}
-  fi
-
-  mkdir -p ${OUTPUTB} ${OUTPUTB}/failed ${OUTPUTB}/ok
-  echo "Logs will be stored in ${OUTPUTB} directory"
-  if [ -z "$recipes" ]; then
-    ls -d $buildhistory/packages/*/* | xargs -n 1 basename | sort -u > ${OUTPUTB}/recipe.list
-    recipes=${OUTPUTB}/recipe.list
-  fi
-  if [ "${TYPE}" != "2" ] ; then
-    echo "!!!Removing tmpdir \"$tmpdir\"!!!"
-    rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
-  fi
-  i=1
-  count=`cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u | wc -l`
-  for recipe in `cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u`; do
-    echo "Building recipe: ${recipe} ($i/$count)"
-    declare -i RECIPE_RESULT=0
-    bitbake -c cleansstate ${recipe} > ${OUTPUTB}/${recipe}.log 2>&1;
-    RECIPE_RESULT+=$?
-    bitbake ${recipe} >> ${OUTPUTB}/${recipe}.log 2>&1;
-    RECIPE_RESULT+=$?
-    if [ "${RECIPE_RESULT}" != "0" ] ; then
-      RESULT+=${RECIPE_RESULT}
-      mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/failed/
-      grep "ERROR: Task.*failed"  ${OUTPUTB}/failed/${recipe}.log | tee -a ${OUTPUTB}/failed-tasks.log
-      grep "ERROR: Task.*failed"  ${OUTPUTB}/failed/${recipe}.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb:.*@@g' >> ${OUTPUTB}/failed-recipes.log
-      # and append also ${recipe} in case the failed task was from some dependency
-      echo ${recipe} >> ${OUTPUTB}/failed-recipes.log
-    else
-      mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/ok/
-    fi
-    if [ "${TYPE}" != "2" ] ; then
-      rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
-    fi
-    i=`expr $i + 1`
-  done
-  echo "Copying buildhistory/packages to ${OUTPUTB}"
-  cp -ra $buildhistory/packages ${OUTPUTB}
-  # This will be usefull to see which library is pulling new dependency
-  echo "Copying do_package logs to ${OUTPUTB}/do_package/"
-  mkdir ${OUTPUTB}/do_package
-  find $tmpdir/work/ -name log.do_package 2>/dev/null| while read f; do
-    # pn is 3 levels back, but we don't know if there is just one log per pn (only one arch and version)
-    # dest=`echo $f | sed 's#^.*/\([^/]*\)/\([^/]*\)/\([^/]*\)/log.do_package#\1#g'`
-    dest=`echo $f | sed "s#$tmpdir/work/##g; s#/#_#g"`
-    cp $f ${OUTPUTB}/do_package/$dest
-  done
-}
-
-compare_deps() {
-  # you can run just compare task with command like this
-  # OUTPUT_BASE=test-dependencies/1373140172 \
-  # OUTPUT_MAX=${OUTPUT_BASE}/2_max \
-  # OUTPUT_MIN=${OUTPUT_BASE}/3_min \
-  # openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c
-  echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" ====="
-  [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}/comp
-  mkdir -p ${OUTPUTC}
-  OUTPUT_FILE=${OUTPUTC}/dependency-changes
-  echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages"
-  echo > ${OUTPUT_FILE}
-
-  [ -d ${OUTPUT_MAX} ] || echo_error "Directory with output from build 2 \"${OUTPUT_MAX}\" does not exist"
-  [ -d ${OUTPUT_MIN} ] || echo_error "Directory with output from build 3 \"${OUTPUT_MIN}\" does not exist"
-  [ -d ${OUTPUT_MAX}/packages/ ] || echo_error "Directory with packages from build 2 \"${OUTPUT_MAX}/packages/\" does not exist"
-  [ -d ${OUTPUT_MIN}/packages/ ] || echo_error "Directory with packages from build 3 \"${OUTPUT_MIN}/packages/\" does not exist"
-  i=0
-  find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do
-    max_pkg=${OUTPUT_MAX}/${pkg}
-    min_pkg=${OUTPUT_MIN}/${pkg}
-    # pkg=packages/armv5te-oe-linux-gnueabi/libungif/libungif/latest
-    recipe=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\1#g'`
-    package=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\2#g'`
-    if [ ! -f "${min_pkg}" ] ; then
-      echo "ERROR: ${recipe}: ${package} package isn't created when building with minimal dependencies?" | tee -a ${OUTPUT_FILE}
-      echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
-      continue
-    fi
-    # strip version information in parenthesis
-    max_deps=`grep "^RDEPENDS = " ${max_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
-    min_deps=`grep "^RDEPENDS = " ${min_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
-    if [ "$i" = 100 ] ; then
-      echo -n "." # cheap progressbar
-      i=0
-    fi
-    if [ "${max_deps}" = "${min_deps}" ] ; then
-      # it's annoying long, but at least it's showing some progress, warnings are grepped at the end
-      echo "NOTE: ${recipe}: ${package} rdepends weren't changed" >> ${OUTPUT_FILE}
-    else
-      missing_deps=
-      for dep in ${max_deps}; do
-        if ! echo "${min_deps}" | grep -q " ${dep} " ; then
-          missing_deps="${missing_deps} ${dep}"
-          echo # to get rid of dots on last line
-          echo "WARN: ${recipe}: ${package} rdepends on ${dep}, but it isn't a build dependency?" | tee -a ${OUTPUT_FILE}
-        fi
-      done
-      if [ -n "${missing_deps}" ] ; then
-        echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
-      fi
-    fi
-    i=`expr $i + 1`
-  done
-  echo # to get rid of dots on last line
-  echo "Found differences: "
-  grep "^WARN: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.warn.log
-  echo "Found errors: "
-  grep "^ERROR: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.error.log
-  RESULT+=`cat ${OUTPUT_FILE}.warn.log | wc -l`
-  RESULT+=`cat ${OUTPUT_FILE}.error.log | wc -l`
-}
-
-for TYPE in $buildtype; do
-  case ${TYPE} in
-    1) build_all;;
-    2) build_every_recipe;;
-    3) build_every_recipe;;
-    4) build_every_recipe;;
-    c) compare_deps;;
-    *) echo_error "Invalid buildtype \"$TYPE\""
-  esac
-done
-
-cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u >> ${OUTPUT_BASE}/failed-recipes.log
-
-if [ "${RESULT}" != "0" ] ; then
-  echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`"
-fi
-
-echo "INFO: Output written in: ${OUTPUT_BASE}"
-exit ${RESULT}
diff --git a/import-layers/yocto-poky/scripts/verify-bashisms b/import-layers/yocto-poky/scripts/verify-bashisms
index dab64ef..a979bd2 100755
--- a/import-layers/yocto-poky/scripts/verify-bashisms
+++ b/import-layers/yocto-poky/scripts/verify-bashisms
@@ -89,7 +89,13 @@
     return tinfoil
 
 if __name__=='__main__':
-    import shutil
+    import argparse, shutil
+
+    parser = argparse.ArgumentParser(description='Bashim detector for shell fragments in recipes.')
+    parser.add_argument("recipes", metavar="RECIPE", nargs="*", help="recipes to check (if not specified, all will be checked)")
+    parser.add_argument("--verbose", default=False, action="store_true")
+    args = parser.parse_args()
+
     if shutil.which("checkbashisms.pl") is None:
         print("Cannot find checkbashisms.pl on $PATH, get it from https://anonscm.debian.org/cgit/collab-maint/devscripts.git/plain/scripts/checkbashisms.pl")
         sys.exit(1)
@@ -99,6 +105,8 @@
     # bitbake server is crucial, don't change it.
     def func(item):
         (filename, key, lineno), script = item
+        if args.verbose:
+            print("Scanning %s:%s" % (filename, key))
         return process(filename, key, lineno, script)
 
     import multiprocessing
@@ -110,9 +118,8 @@
     # recipecaches to handle multiconfig environments
     pkg_pn = tinfoil.cooker.recipecaches[""].pkg_pn
 
-    # TODO: use argparse and have --help
-    if len(sys.argv) > 1:
-        initial_pns = sys.argv[1:]
+    if args.recipes:
+        initial_pns = args.recipes
     else:
         initial_pns = sorted(pkg_pn)
 
diff --git a/import-layers/yocto-poky/scripts/wic b/import-layers/yocto-poky/scripts/wic
index 097084a..7392bc4 100755
--- a/import-layers/yocto-poky/scripts/wic
+++ b/import-layers/yocto-poky/scripts/wic
@@ -40,16 +40,29 @@
 from distutils import spawn
 
 # External modules
-scripts_path = os.path.abspath(os.path.dirname(__file__))
+scripts_path = os.path.dirname(os.path.realpath(__file__))
 lib_path = scripts_path + '/lib'
 sys.path.insert(0, lib_path)
-oe_lib_path = os.path.join(os.path.dirname(scripts_path), 'meta', 'lib')
-sys.path.insert(0, oe_lib_path)
+import scriptpath
+scriptpath.add_oe_lib_path()
+
+# Check whether wic is running within eSDK environment
+sdkroot = scripts_path
+if os.environ.get('SDKTARGETSYSROOT'):
+    while sdkroot != '' and sdkroot != os.sep:
+        if os.path.exists(os.path.join(sdkroot, '.devtoolbase')):
+            # Set BUILDDIR for wic to work within eSDK
+            os.environ['BUILDDIR'] = sdkroot
+            # .devtoolbase only exists within eSDK
+            # If found, initialize bitbake path for eSDK environment and append to PATH
+            sdkroot = os.path.join(os.path.dirname(scripts_path), 'bitbake', 'bin')
+            os.environ['PATH'] += ":" + sdkroot
+            break
+        sdkroot = os.path.dirname(sdkroot)
 
 bitbake_exe = spawn.find_executable('bitbake')
 if bitbake_exe:
-    bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
-    sys.path.insert(0, bitbake_path)
+    bitbake_path = scriptpath.add_bitbake_lib_path()
     from bb import cookerdata
     from bb.main import bitbake_main, BitBakeConfigParameters
 else:
diff --git a/import-layers/yocto-poky/scripts/yocto-bsp b/import-layers/yocto-poky/scripts/yocto-bsp
deleted file mode 100755
index 6fb1f41..0000000
--- a/import-layers/yocto-poky/scripts/yocto-bsp
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env python3
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# DESCRIPTION
-# 'yocto-bsp' is the Yocto BSP Tool that helps users create a new
-# Yocto BSP.  Invoking it without any arguments will display help
-# screens for the 'yocto-bsp' command and list the available
-# 'yocto-bsp' subcommands.  Invoking a subcommand without any
-# arguments will likewise display help screens for the specified
-# subcommand.  Please use that interface for detailed help.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-import os
-import sys
-import argparse
-import logging
-
-scripts_path = os.path.dirname(os.path.realpath(__file__))
-sys.path.insert(0, scripts_path + '/lib')
-import argparse_oe
-
-from bsp.help import *
-from bsp.engine import *
-
-
-def do_create_bsp(args):
-    """
-    Command-line handling for BSP creation.  The real work is done by
-    bsp.engine.yocto_bsp_create()
-    """
-    if args.outdir:
-        bsp_output_dir = args.outdir
-    else:
-        bsp_output_dir = "meta-" + args.bspname
-
-    if args.git_check and not args.properties_file:
-        print("Checking basic git connectivity...")
-        if not verify_git_repo(GIT_CHECK_URI):
-            print("Couldn't verify git connectivity, exiting\n")
-            print("Details: couldn't access %s" % GIT_CHECK_URI)
-            print("         (this most likely indicates a network connectivity problem or")
-            print("         a misconfigured git intallation)")
-            sys.exit(1)
-        else:
-            print("Done.\n")
-
-    yocto_bsp_create(args.bspname, args.karch, scripts_path, bsp_output_dir, args.codedump, args.properties_file)
-
-
-def do_list_bsp(args):
-    """
-    Command-line handling for listing available BSP properties and
-    values.  The real work is done by bsp.engine.yocto_bsp_list()
-    """
-    yocto_bsp_list(args, scripts_path)
-
-def do_help_bsp(args):
-    """
-    Command-line help tool
-    """
-    help_text = command_help.get(args.subcommand)
-    pager = subprocess.Popen('less', stdin=subprocess.PIPE)
-    pager.communicate(bytes(help_text,'UTF-8'))
-
-command_help = {
-    "create": yocto_bsp_create_help,
-    "list":  yocto_bsp_list_help
-}
-
-
-def start_logging(loglevel):
-    logging.basicConfig(filename = 'yocto-bsp.log', filemode = 'w', level=loglevel)
-
-
-def main():
-    parser = argparse_oe.ArgumentParser(description='Create a customized Yocto BSP layer.',
-                      epilog="See '%(prog)s help <subcommand>' for more information on a specific command.")
-
-    parser.add_argument("-D", "--debug", action = "store_true",
-                      default = False, help = "output debug information")
-    subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>')
-    subparsers.required = True
-
-    create_parser = subparsers.add_parser('create', help='Create a new Yocto BSP',
-                                          description='Create a new Yocto BSP')
-    create_parser.add_argument('bspname', metavar='bsp-name', help='name for the new BSP')
-    create_parser.add_argument('karch', help='kernel architecture')
-    create_parser.add_argument("-o", "--outdir", help = "name of BSP dir to create")
-    create_parser.add_argument("-i", "--infile", dest = "properties_file",
-                      help = "name of file containing the values for BSP properties as a JSON file")
-    create_parser.add_argument("-c", "--codedump", action = "store_true", default = False,
-                      help = "dump the generated code to bspgen.out")
-    create_parser.add_argument("-s", "--skip-git-check", dest = "git_check", action = "store_false",
-                      default = True, help = "skip the git connectivity check")
-    create_parser.set_defaults(func=do_create_bsp)
-
-
-    list_parser = subparsers.add_parser('list', help='List available values for options and BSP properties')
-    list_parser.add_argument('karch', help='kernel architecture')
-    prop_group = list_parser.add_mutually_exclusive_group()
-    prop_group.add_argument("--properties", action = "store_true", default = False,
-                      help = "list all properties for the kernel architecture")
-    prop_group.add_argument("--property", help = "list available values for the property")
-    list_parser.add_argument("-o", "--outfile", dest = "properties_file",
-                      help = "dump the possible values for BSP properties to a JSON file")
-
-    list_parser.set_defaults(func=do_list_bsp)
-
-    help_parser = subparsers.add_parser('help',
-                      description='This command displays detailed help for the specified subcommand.')
-    help_parser.add_argument('subcommand', nargs='?')
-    help_parser.set_defaults(func=do_help_bsp)
-
-    args = parser.parse_args()
-
-    loglevel = logging.INFO
-    if args.debug:
-        loglevel = logging.DEBUG
-    start_logging(loglevel)
-
-    if args._subparser_name == "list":
-        if not args.karch == "karch" and not args.properties and not args.property:
-            print ("yocto-bsp list: error: one of the arguments --properties --property is required")
-            list_parser.print_help()
-
-    if args._subparser_name == "help":
-        if not args.subcommand:
-            parser.print_help()
-            return 0
-        elif not command_help.get(args.subcommand):
-            print ("yocto-bsp help: No manual entry for %s" % args.subcommand)
-            return 1
-
-    return args.func(args)
-
-if __name__ == "__main__":
-    try:
-        ret = main()
-    except Exception:
-        ret = 1
-        import traceback
-        traceback.print_exc()
-    sys.exit(ret)
diff --git a/import-layers/yocto-poky/scripts/yocto-kernel b/import-layers/yocto-poky/scripts/yocto-kernel
deleted file mode 100755
index 5c70d0c..0000000
--- a/import-layers/yocto-poky/scripts/yocto-kernel
+++ /dev/null
@@ -1,399 +0,0 @@
-#!/usr/bin/env python3
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# DESCRIPTION
-# 'yocto-kernel' is the Yocto BSP Tool that helps users manage kernel
-# config options and patches for a Yocto BSP.  Invoking it without any
-# arguments will display help screens for the 'yocto-kernel' command
-# and list the available 'yocto-kernel' subcommands.  Invoking a
-# subcommand without any arguments will likewise display help screens
-# for the specified subcommand.  Please use that interface for
-# detailed help.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-__version__ = "0.1.0"
-
-import os
-import sys
-import optparse
-import logging
-
-scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
-lib_path = scripts_path + '/lib'
-sys.path = sys.path + [lib_path]
-
-from bsp.help import *
-from bsp.kernel import *
-
-
-def yocto_kernel_config_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing BSP config options.  The
-    real work is done by bsp.kernel.yocto_kernel_config_list().
-    """
-    logging.debug("yocto_kernel_config_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_config_list(scripts_path, args[0])
-
-
-def yocto_kernel_config_add_subcommand(args, usage_str):
-    """
-    Command-line handling for adding BSP config items.  The real work
-    is done by bsp.kernel.yocto_kernel_config_add().
-    """
-    logging.debug("yocto_kernel_config_add_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_config_add(scripts_path, machine, args)
-
-
-def yocto_kernel_config_rm_subcommand(args, usage_str):
-    """
-    Command-line handling for removing BSP config items.  The real
-    work is done by bsp.kernel.yocto_kernel_config_rm().
-    """
-    logging.debug("yocto_kernel_config_rm_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_config_rm(scripts_path, args[0])
-
-
-def yocto_kernel_patch_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing BSP (SRC_URI patches.  The real
-    work is done by bsp.kernel.yocto_kernel_patch_list().
-    """
-    logging.debug("yocto_kernel_patch_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_patch_list(scripts_path, args[0])
-
-
-def yocto_kernel_patch_add_subcommand(args, usage_str):
-    """
-    Command-line handling for adding BSP patches.  The real work is
-    done by bsp.kernel.yocto_kernel_patch_add().
-    """
-    logging.debug("yocto_kernel_patch_add_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_patch_add(scripts_path, machine, args)
-
-
-def yocto_kernel_patch_rm_subcommand(args, usage_str):
-    """
-    Command-line handling for removing BSP patches.  The real work is
-    done by bsp.kernel.yocto_kernel_patch_rm().
-    """
-    logging.debug("yocto_kernel_patch_rm_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_patch_rm(scripts_path, args[0])
-
-
-def yocto_kernel_feature_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing the BSP features that are being
-    used by the BSP.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_list().
-    """
-    logging.debug("yocto_kernel_feature_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_list(scripts_path, args[0])
-
-
-def yocto_kernel_feature_add_subcommand(args, usage_str):
-    """
-    Command-line handling for adding the use of kernel features to a
-    BSP.  The real work is done by bsp.kernel.yocto_kernel_feature_add().
-    """
-    logging.debug("yocto_kernel_feature_add_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_feature_add(scripts_path, machine, args)
-
-
-def yocto_kernel_feature_rm_subcommand(args, usage_str):
-    """
-    Command-line handling for removing the use of kernel features from
-    a BSP.  The real work is done by bsp.kernel.yocto_kernel_feature_rm().
-    """
-    logging.debug("yocto_kernel_feature_rm_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_rm(scripts_path, args[0])
-
-
-def yocto_kernel_available_features_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing all the kernel features
-    available for use in a BSP.  This includes the features present in
-    the meta branch(es) of the pointed-to repo(s) as well as the local
-    features added in recipe-space to the current BSP as well.  The
-    real work is done by bsp.kernel.yocto_kernel_available_features_list().
-    """
-    logging.debug("yocto_kernel_feature_available_features_list_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 1:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_available_features_list(scripts_path, args[0])
-
-
-def yocto_kernel_feature_describe_subcommand(args, usage_str):
-    """
-    Command-line handling for listing the description of a specific
-    kernel feature available for use in a BSP.  This includes the
-    features present in the meta branch(es) of the pointed-to repo(s)
-    as well as the local features added in recipe-space to the current
-    BSP as well.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_describe().
-    """
-    logging.debug("yocto_kernel_feature_describe_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_describe(scripts_path, args[0], args[1])
-
-
-def yocto_kernel_feature_create_subcommand(args, usage_str):
-    """
-    Command-line handling for creating a recipe-space kernel feature
-    in a BSP.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_create().
-    """
-    logging.debug("yocto_kernel_feature_create_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 4:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    machine = args.pop(0)
-    yocto_kernel_feature_create(scripts_path, machine, args)
-
-
-def yocto_kernel_feature_destroy_subcommand(args, usage_str):
-    """
-    Command-line handling for removing a recipe-space kernel feature
-    from a BSP.  The real work is done by
-    bsp.kernel.yocto_kernel_feature_destroy().
-    """
-    logging.debug("yocto_kernel_feature_destroy_subcommand")
-
-    parser = optparse.OptionParser(usage = usage_str)
-
-    (options, args) = parser.parse_args(args)
-
-    if len(args) != 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    yocto_kernel_feature_destroy(scripts_path, args[0], args[1])
-
-
-subcommands = {
-    "config-list": [yocto_kernel_config_list_subcommand,
-                    yocto_kernel_config_list_usage,
-                    yocto_kernel_config_list_help],
-    "config-add": [yocto_kernel_config_add_subcommand,
-                   yocto_kernel_config_add_usage,
-                   yocto_kernel_config_add_help],
-    "config-rm": [yocto_kernel_config_rm_subcommand,
-                  yocto_kernel_config_rm_usage,
-                  yocto_kernel_config_rm_help],
-    "patch-list": [yocto_kernel_patch_list_subcommand,
-                   yocto_kernel_patch_list_usage,
-                   yocto_kernel_patch_list_help],
-    "patch-add": [yocto_kernel_patch_add_subcommand,
-                  yocto_kernel_patch_add_usage,
-                  yocto_kernel_patch_add_help],
-    "patch-rm": [yocto_kernel_patch_rm_subcommand,
-                 yocto_kernel_patch_rm_usage,
-                 yocto_kernel_patch_rm_help],
-    "feature-list": [yocto_kernel_feature_list_subcommand,
-                   yocto_kernel_feature_list_usage,
-                   yocto_kernel_feature_list_help],
-    "feature-add": [yocto_kernel_feature_add_subcommand,
-                  yocto_kernel_feature_add_usage,
-                  yocto_kernel_feature_add_help],
-    "feature-rm": [yocto_kernel_feature_rm_subcommand,
-                 yocto_kernel_feature_rm_usage,
-                 yocto_kernel_feature_rm_help],
-    "features-list": [yocto_kernel_available_features_list_subcommand,
-                 yocto_kernel_available_features_list_usage,
-                 yocto_kernel_available_features_list_help],
-    "feature-describe": [yocto_kernel_feature_describe_subcommand,
-                 yocto_kernel_feature_describe_usage,
-                 yocto_kernel_feature_describe_help],
-    "feature-create": [yocto_kernel_feature_create_subcommand,
-                 yocto_kernel_feature_create_usage,
-                 yocto_kernel_feature_create_help],
-    "feature-destroy": [yocto_kernel_feature_destroy_subcommand,
-                 yocto_kernel_feature_destroy_usage,
-                 yocto_kernel_feature_destroy_help],
-}
-
-
-def start_logging(loglevel):
-    logging.basicConfig(filename = 'yocto-kernel.log', filemode = 'w', level=loglevel)
-
-
-def main():
-    parser = optparse.OptionParser(version = "yocto-kernel version %s" % __version__,
-                                   usage = yocto_kernel_usage)
-
-    parser.disable_interspersed_args()
-    parser.add_option("-D", "--debug", dest = "debug", action = "store_true",
-                      default = False, help = "output debug information")
-
-    (options, args) = parser.parse_args()
-
-    loglevel = logging.INFO
-    if options.debug:
-        loglevel = logging.DEBUG
-    start_logging(loglevel)
-
-    if len(args):
-        if args[0] == "help":
-            if len(args) == 1:
-                parser.print_help()
-                sys.exit(1)
-            sc = 1
-        else:
-            sc = 0
-
-        if args[sc] == "config" or args[sc] == "patch" or \
-                args[sc] == "feature" or args[sc] == "features":
-            if len(args) < 2 + sc:
-                parser.print_help()
-                sys.exit(1)
-            args[sc] += "-" + args[sc + 1]
-            args.pop(sc + 1)
-
-    invoke_subcommand(args, parser, yocto_kernel_help_usage, subcommands)
-
-
-if __name__ == "__main__":
-    try:
-        ret = main()
-    except Exception:
-        ret = 1
-        import traceback
-        traceback.print_exc()
-    sys.exit(ret)
diff --git a/import-layers/yocto-poky/scripts/yocto-layer b/import-layers/yocto-poky/scripts/yocto-layer
deleted file mode 100755
index d58faca..0000000
--- a/import-layers/yocto-poky/scripts/yocto-layer
+++ /dev/null
@@ -1,151 +0,0 @@
-#!/usr/bin/env python3
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2012, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# DESCRIPTION
-# 'yocto-layer' is the Yocto Tool that helps users create a new Yocto
-# layer.  Invoking it without any arguments will display help screens
-# for the 'yocto-layer' command and list the available 'yocto-layer'
-# subcommands.  Invoking a subcommand without any arguments will
-# likewise display help screens for the specified subcommand.  Please
-# use that interface for detailed help.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] intel.com>
-#
-
-__version__ = "0.1.0"
-
-import os
-import sys
-import optparse
-import logging
-
-scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
-lib_path = scripts_path + '/lib'
-sys.path = sys.path + [lib_path]
-
-from bsp.help import *
-from bsp.engine import *
-
-
-def yocto_layer_create_subcommand(args, usage_str):
-    """
-    Command-line handling for layer creation.  The real work is done by
-    bsp.engine.yocto_layer_create()
-    """
-    parser = optparse.OptionParser(usage = usage_str)
-
-    parser.add_option("-o", "--outdir", dest = "outdir", action = "store",
-                      help = "name of layer dir to create")
-    parser.add_option("-i", "--infile", dest = "properties_file", action = "store",
-                      help = "name of file containing the values for layer input properties as a JSON file")
-    parser.add_option("-c", "--codedump", dest = "codedump", action = "store_true",
-                      default = False, help = "dump the generated code to layergen.out")
-    (options, args) = parser.parse_args(args)
-
-    if len(args) < 1 or len(args) > 2:
-        logging.error("Wrong number of arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-    layer_name = args[0]
-    properties = ""
-
-    if len(args) == 2:
-        layer_priority = args[1]
-        properties = '{"layer_priority":"' + layer_priority + '"}'
-
-    if options.outdir:
-        layer_output_dir = options.outdir
-    else:
-        prefix="meta-"
-        if not layer_name.startswith(prefix):
-            layer_output_dir="%s%s"%(prefix,layer_name)
-        else:
-            layer_output_dir=layer_name
-
-    yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file, properties)
-
-
-def yocto_layer_list_subcommand(args, usage_str):
-    """
-    Command-line handling for listing available layer properties and
-    values.  The real work is done by bsp.engine.yocto_layer_list()
-    """
-    parser = optparse.OptionParser(usage = usage_str)
-
-    parser.add_option("-o", "--outfile", action = "store", dest = "properties_file",
-                      help = "dump the possible values for layer properties to a JSON file")
-
-    (options, args) = parser.parse_args(args)
-
-    if not yocto_layer_list(args, scripts_path, options.properties_file):
-        logging.error("Bad list arguments, exiting\n")
-        parser.print_help()
-        sys.exit(1)
-
-
-subcommands = {
-    "create": [yocto_layer_create_subcommand,
-               yocto_layer_create_usage,
-               yocto_layer_create_help],
-    "list":   [yocto_layer_list_subcommand,
-               yocto_layer_list_usage,
-               yocto_layer_list_help],
-}
-
-
-def start_logging(loglevel):
-    logging.basicConfig(filename = 'yocto-layer.log', filemode = 'w', level=loglevel)
-
-
-def main():
-    parser = optparse.OptionParser(version = "yocto-layer version %s" % __version__,
-                                   usage = yocto_layer_usage)
-
-    parser.disable_interspersed_args()
-    parser.add_option("-D", "--debug", dest = "debug", action = "store_true",
-                      default = False, help = "output debug information")
-
-    (options, args) = parser.parse_args()
-
-    loglevel = logging.INFO
-    if options.debug:
-        loglevel = logging.DEBUG
-    start_logging(loglevel)
-
-    if len(args):
-        if args[0] == "help":
-            if len(args) == 1:
-                parser.print_help()
-                sys.exit(1)
-
-    invoke_subcommand(args, parser, yocto_layer_help_usage, subcommands)
-
-
-if __name__ == "__main__":
-    try:
-        ret = main()
-    except Exception:
-        ret = 1
-        import traceback
-        traceback.print_exc()
-    sys.exit(ret)
-
diff --git a/meta-phosphor/common/recipes-core/busybox/busybox/0001-umount-ignore--c.patch b/meta-phosphor/common/recipes-core/busybox/busybox/0001-umount-ignore--c.patch
deleted file mode 100644
index 1bf53f4..0000000
--- a/meta-phosphor/common/recipes-core/busybox/busybox/0001-umount-ignore--c.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-[PATCH] umount: ignore -c option
-
-systemd uses -c.
-       -c, --no-canonicalize
-              Do  not canonicalize paths.  The paths canonicalization is based
-              on stat(2) and readlink(2) system calls. These system calls  may
-              hang  in  some cases (for example on NFS if server is not availā€
-              able). The option has to be used  with  canonical  path  to  the
-              mount point.
-
-              For  more  details  about this option see the mount(8) man page.
-              Note  that  umount  does   not   pass   this   option   to   the
-              /sbin/umount.type helpers.
-As busybox doesn't canonicalize paths in the first place it is safe to ignore this
-option.
-
-See https://github.com/systemd/systemd/issues/7786
-
-Signed-off-by: Shawn Landden <slandden at gmail.com>
----
- util-linux/umount.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/util-linux/umount.c b/util-linux/umount.c
-index a6405dfcc..b45cd8a6b 100644
---- a/util-linux/umount.c
-+++ b/util-linux/umount.c
-@@ -44,7 +44,7 @@ static struct mntent *getmntent_r(FILE*
- }
- #endif
- 
--/* Ignored: -v -t -i
-+/* Ignored: -c -v -t -i
-  * bbox always acts as if -d is present.
-  * -D can be used to suppress it (bbox extension).
-  * Rationale:
-@@ -52,7 +52,7 @@ static struct mntent *getmntent_r(FILE*
-  * thus, on many systems, bare umount _does_ drop loop devices.
-  * (2) many users request this feature.
-  */
--#define OPTION_STRING           "fldDnra" "vt:i"
-+#define OPTION_STRING           "fldDnra" "cvt:i"
- #define OPT_FORCE               (1 << 0) // Same as MNT_FORCE
- #define OPT_LAZY                (1 << 1) // Same as MNT_DETACH
- //#define OPT_FREE_LOOP           (1 << 2) // -d is assumed always present
diff --git a/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend b/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend
index 5acaf3c..e6678fc 100644
--- a/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend
+++ b/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend
@@ -3,4 +3,3 @@
 SRC_URI += "file://flash.cfg"
 SRC_URI += "file://mountpoint.cfg"
 SRC_URI += "file://0001-Stop-watchdog-first-on-startup.patch"
-SRC_URI += "file://0001-umount-ignore--c.patch"
diff --git a/meta-phosphor/common/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/meta-phosphor/common/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
index f98e5c5..96236ca 100644
--- a/meta-phosphor/common/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
+++ b/meta-phosphor/common/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -1,5 +1,5 @@
 RDEPENDS_${PN}_append = " \
-        nativesdk-autoconf-archive-dev \
+        nativesdk-autoconf-archive \
         nativesdk-phosphor-dbus-interfaces-yaml \
         nativesdk-sdbus++ \
         nativesdk-phosphor-logging-elog \
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/0001-Export-message_append_cmdline.patch b/meta-phosphor/common/recipes-core/systemd/systemd/0001-Export-message_append_cmdline.patch
deleted file mode 100644
index afb2a48..0000000
--- a/meta-phosphor/common/recipes-core/systemd/systemd/0001-Export-message_append_cmdline.patch
+++ /dev/null
@@ -1,323 +0,0 @@
-From 5dfdd9973fe6437985d535fd530cec83a2774113 Mon Sep 17 00:00:00 2001
-From: Brad Bishop <bradleyb@us.ibm.com>
-Date: Tue, 16 Aug 2016 15:07:34 -0400
-Subject: [PATCH] Export message_append_cmdline
-
-Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
----
- Makefile.am                         |  43 ++++--
- src/libsystemd/libsystemd.sym       |   1 +
- src/libsystemd/sd-bus/bus-message.c | 254 ++++++++++++++++++++++++++++++++++++
- src/systemd/sd-bus.h                |   1 +
- 4 files changed, 285 insertions(+), 14 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 03341fc..0dbf4b7 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -3032,7 +3033,10 @@ libsystemd_internal_la_SOURCES = \
- 	src/libsystemd/sd-device/sd-device.c \
- 	src/libsystemd/sd-device/device-private.c \
- 	src/libsystemd/sd-device/device-private.h \
--	src/libsystemd/sd-resolve/sd-resolve.c
-+	src/libsystemd/sd-resolve/sd-resolve.c \
-+	src/shared/bus-util.c \
-+	src/shared/bus-util.h
-+
- 
- libsystemd_internal_la_LIBADD = \
- 	libbasic.la \
-diff --git a/src/libsystemd/libsystemd.sym b/src/libsystemd/libsystemd.sym
-index 4ab637b..f0c06c7 100644
---- a/src/libsystemd/libsystemd.sym
-+++ b/src/libsystemd/libsystemd.sym
-@@ -488,4 +488,5 @@ global:
-         sd_journal_has_persistent_files;
-         sd_journal_enumerate_fields;
-         sd_journal_restart_fields;
-+        sd_bus_message_append_cmdline;
- } LIBSYSTEMD_227;
-diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
-index c2e913f..d8d3ec8 100644
---- a/src/libsystemd/sd-bus/bus-message.c
-+++ b/src/libsystemd/sd-bus/bus-message.c
-@@ -38,6 +38,7 @@
- #include "time-util.h"
- #include "utf8.h"
- #include "util.h"
-+#include "parse-util.h"
- 
- static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
- 
-@@ -5946,3 +5947,256 @@ _public_ int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority) {
-         m->priority = priority;
-         return 0;
- }
-+
-+_public_ int sd_bus_message_append_cmdline(sd_bus_message *m, const char *signature, char ***x) {
-+        char **p;
-+        int r;
-+
-+        assert(m);
-+        assert(signature);
-+        assert(x);
-+
-+        p = *x;
-+
-+        for (;;) {
-+                const char *v;
-+                char t;
-+
-+                t = *signature;
-+                v = *p;
-+
-+                if (t == 0)
-+                        break;
-+                if (!v) {
-+                        log_error("Too few parameters for signature.");
-+                        return -EINVAL;
-+                }
-+
-+                signature++;
-+                p++;
-+
-+                switch (t) {
-+
-+                case SD_BUS_TYPE_BOOLEAN:
-+
-+                        r = parse_boolean(v);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as boolean: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &r);
-+                        break;
-+
-+                case SD_BUS_TYPE_BYTE: {
-+                        uint8_t z;
-+
-+                        r = safe_atou8(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as byte (unsigned 8bit integer): %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_INT16: {
-+                        int16_t z;
-+
-+                        r = safe_atoi16(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as signed 16bit integer: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_UINT16: {
-+                        uint16_t z;
-+
-+                        r = safe_atou16(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as unsigned 16bit integer: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_INT32: {
-+                        int32_t z;
-+
-+                        r = safe_atoi32(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as signed 32bit integer: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_UINT32: {
-+                        uint32_t z;
-+
-+                        r = safe_atou32(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as unsigned 32bit integer: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_INT64: {
-+                        int64_t z;
-+
-+                        r = safe_atoi64(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as signed 64bit integer: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_UINT64: {
-+                        uint64_t z;
-+
-+                        r = safe_atou64(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as unsigned 64bit integer: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+
-+                case SD_BUS_TYPE_DOUBLE: {
-+                        double z;
-+
-+                        r = safe_atod(v, &z);
-+                        if (r < 0) {
-+                                log_error("Failed to parse as double precision floating point: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = sd_bus_message_append_basic(m, t, &z);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_STRING:
-+                case SD_BUS_TYPE_OBJECT_PATH:
-+                case SD_BUS_TYPE_SIGNATURE:
-+
-+                        r = sd_bus_message_append_basic(m, t, v);
-+                        break;
-+
-+                case SD_BUS_TYPE_ARRAY: {
-+                        uint32_t n;
-+                        size_t k;
-+
-+                        r = safe_atou32(v, &n);
-+                        if (r < 0) {
-+                                log_error("Failed to parse number of array entries: %s", v);
-+                                return r;
-+                        }
-+
-+                        r = signature_element_length(signature, &k);
-+                        if (r < 0) {
-+                                log_error("Invalid array signature.");
-+                                return r;
-+                        }
-+
-+                        {
-+                                unsigned i;
-+                                char s[k + 1];
-+                                memcpy(s, signature, k);
-+                                s[k] = 0;
-+
-+                                r = sd_bus_message_open_container(m, SD_BUS_TYPE_ARRAY, s);
-+                                if (r < 0)
-+                                        return bus_log_create_error(r);
-+
-+                                for (i = 0; i < n; i++) {
-+                                        r = sd_bus_message_append_cmdline(m, s, &p);
-+                                        if (r < 0)
-+                                                return r;
-+                                }
-+                        }
-+
-+                        signature += k;
-+
-+                        r = sd_bus_message_close_container(m);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_VARIANT:
-+                        r = sd_bus_message_open_container(m, SD_BUS_TYPE_VARIANT, v);
-+                        if (r < 0)
-+                                return bus_log_create_error(r);
-+
-+                        r = sd_bus_message_append_cmdline(m, v, &p);
-+                        if (r < 0)
-+                                return r;
-+
-+                        r = sd_bus_message_close_container(m);
-+                        break;
-+
-+                case SD_BUS_TYPE_STRUCT_BEGIN:
-+                case SD_BUS_TYPE_DICT_ENTRY_BEGIN: {
-+                        size_t k;
-+
-+                        signature--;
-+                        p--;
-+
-+                        r = signature_element_length(signature, &k);
-+                        if (r < 0) {
-+                                log_error("Invalid struct/dict entry signature.");
-+                                return r;
-+                        }
-+
-+                        {
-+                                char s[k-1];
-+                                memcpy(s, signature + 1, k - 2);
-+                                s[k - 2] = 0;
-+
-+                                r = sd_bus_message_open_container(m, t == SD_BUS_TYPE_STRUCT_BEGIN ? SD_BUS_TYPE_STRUCT : SD_BUS_TYPE_DICT_ENTRY, s);
-+                                if (r < 0)
-+                                        return bus_log_create_error(r);
-+
-+                                r = sd_bus_message_append_cmdline(m, s, &p);
-+                                if (r < 0)
-+                                        return r;
-+                        }
-+
-+                        signature += k;
-+
-+                        r = sd_bus_message_close_container(m);
-+                        break;
-+                }
-+
-+                case SD_BUS_TYPE_UNIX_FD:
-+                        log_error("UNIX file descriptor not supported as type.");
-+                        return -EINVAL;
-+
-+                default:
-+                        log_error("Unknown signature type %c.", t);
-+                        return -EINVAL;
-+                }
-+
-+                if (r < 0)
-+                        return bus_log_create_error(r);
-+        }
-+
-+        *x = p;
-+        return 0;
-+}
-diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
-index 2a2ef0e..a6a21a4 100644
---- a/src/systemd/sd-bus.h
-+++ b/src/systemd/sd-bus.h
-@@ -233,6 +233,7 @@ int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
- int sd_bus_message_get_expect_reply(sd_bus_message *m);
- int sd_bus_message_get_auto_start(sd_bus_message *m);
- int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m);
-+int sd_bus_message_append_cmdline(sd_bus_message *m, const char *signature, char ***x);
- 
- const char *sd_bus_message_get_signature(sd_bus_message *m, int complete);
- const char *sd_bus_message_get_path(sd_bus_message *m);
--- 
-1.8.3.1
-
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/0001-watchdog-allow-a-device-path-to-be-specified.patch b/meta-phosphor/common/recipes-core/systemd/systemd/0001-watchdog-allow-a-device-path-to-be-specified.patch
deleted file mode 100644
index 7dddd61..0000000
--- a/meta-phosphor/common/recipes-core/systemd/systemd/0001-watchdog-allow-a-device-path-to-be-specified.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 9d1f2858cd2ba49066ca319164b4e3e2769fc0fb Mon Sep 17 00:00:00 2001
-From: "Edward A. James" <eajames@us.ibm.com>
-Date: Fri, 8 Dec 2017 11:26:30 -0600
-Subject: [PATCH 1/3] watchdog: allow a device path to be specified
-
-Currently systemd hardcodes the use of /dev/watchdog. This is a legacy
-chardev that points to watchdog0 in the system.
-
-Modify the watchdog API to allow a different device path to be passed
-and stored. Opening the watchdog defaults to /dev/watchdog, maintaining
-existing behavior.
----
- src/shared/watchdog.c | 9 ++++++++-
- src/shared/watchdog.h | 5 +++++
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c
-index 4f3e012..8068e95 100644
---- a/src/shared/watchdog.c
-+++ b/src/shared/watchdog.c
-@@ -26,10 +26,12 @@
- 
- #include "fd-util.h"
- #include "log.h"
-+#include "string-util.h"
- #include "time-util.h"
- #include "watchdog.h"
- 
- static int watchdog_fd = -1;
-+static char *watchdog_device = NULL;
- static usec_t watchdog_timeout = USEC_INFINITY;
- 
- static int update_timeout(void) {
-@@ -83,7 +85,8 @@ static int open_watchdog(void) {
-         if (watchdog_fd >= 0)
-                 return 0;
- 
--        watchdog_fd = open("/dev/watchdog", O_WRONLY|O_CLOEXEC);
-+        watchdog_fd = open(watchdog_device ?: "/dev/watchdog",
-+                           O_WRONLY|O_CLOEXEC);
-         if (watchdog_fd < 0)
-                 return -errno;
- 
-@@ -95,6 +98,10 @@ static int open_watchdog(void) {
-         return update_timeout();
- }
- 
-+int watchdog_set_device(char *path) {
-+        return free_and_strdup(&watchdog_device, path);
-+}
-+
- int watchdog_set_timeout(usec_t *usec) {
-         int r;
- 
-diff --git a/src/shared/watchdog.h b/src/shared/watchdog.h
-index f6ec178..90a075a 100644
---- a/src/shared/watchdog.h
-+++ b/src/shared/watchdog.h
-@@ -24,6 +24,11 @@
- #include "time-util.h"
- #include "util.h"
- 
-+int watchdog_set_device(char *path);
- int watchdog_set_timeout(usec_t *usec);
- int watchdog_ping(void);
- void watchdog_close(bool disarm);
-+
-+static inline void watchdog_free_device(void) {
-+        (void) watchdog_set_device(NULL);
-+}
--- 
-1.8.3.1
-
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/0002-core-Add-WatchdogDevice-config-option-and-implement-.patch b/meta-phosphor/common/recipes-core/systemd/systemd/0002-core-Add-WatchdogDevice-config-option-and-implement-.patch
deleted file mode 100644
index 4e10065..0000000
--- a/meta-phosphor/common/recipes-core/systemd/systemd/0002-core-Add-WatchdogDevice-config-option-and-implement-.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From 9a7b66daa24ed5c6a994323b308c3c3a0a10bf6a Mon Sep 17 00:00:00 2001
-From: Eddie James <eajames@us.ibm.com>
-Date: Thu, 5 Apr 2018 12:31:15 -0500
-Subject: [PATCH 2/3] core: Add WatchdogDevice config option and implement it
-
-This option allows a device path to be specified for the systemd
-watchdog (both runtime and shutdown).
-
-If a system requires a watchdog other than /dev/watchdog (pointing to
-/dev/watchdog0) to be used to reboot the system, this setting should be
-changed to the relevant watchdog device path (e.g. /dev/watchdog1).
----
- src/core/main.c     | 32 ++++++++++++++++++++++++++++++--
- src/core/shutdown.c | 11 +++++++++++
- 2 files changed, 41 insertions(+), 2 deletions(-)
-
-diff --git a/src/core/main.c b/src/core/main.c
-index 07e3e97..d4673bf 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
-@@ -119,6 +119,7 @@ static usec_t arg_default_start_limit_interval = DEFAULT_START_LIMIT_INTERVAL;
- static unsigned arg_default_start_limit_burst = DEFAULT_START_LIMIT_BURST;
- static usec_t arg_runtime_watchdog = 0;
- static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE;
-+static char *arg_watchdog_device = NULL;
- static char **arg_default_environment = NULL;
- static struct rlimit *arg_default_rlimit[_RLIMIT_MAX] = {};
- static uint64_t arg_capability_bounding_set = CAP_ALL;
-@@ -459,6 +460,13 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
-                 if (arg_default_timeout_start_usec <= 0)
-                         arg_default_timeout_start_usec = USEC_INFINITY;
- 
-+        } else if (proc_cmdline_key_streq(key, "systemd.watchdog_device")) {
-+
-+                if (proc_cmdline_value_missing(key, value))
-+                        return 0;
-+
-+                parse_path_argument_and_warn(value, false, &arg_watchdog_device);
-+
-         } else if (streq(key, "quiet") && !value) {
- 
-                 if (arg_show_status == _SHOW_STATUS_UNSET)
-@@ -715,6 +723,7 @@ static int parse_config_file(void) {
-                 { "Manager", "JoinControllers",           config_parse_join_controllers, 0, &arg_join_controllers                  },
-                 { "Manager", "RuntimeWatchdogSec",        config_parse_sec,              0, &arg_runtime_watchdog                  },
-                 { "Manager", "ShutdownWatchdogSec",       config_parse_sec,              0, &arg_shutdown_watchdog                 },
-+                { "Manager", "WatchdogDevice",            config_parse_path,             0, &arg_watchdog_device                   },
-                 { "Manager", "CapabilityBoundingSet",     config_parse_capability_set,   0, &arg_capability_bounding_set           },
- #ifdef HAVE_SECCOMP
-                 { "Manager", "SystemCallArchitectures",   config_parse_syscall_archs,    0, &arg_syscall_archs                     },
-@@ -1776,6 +1785,13 @@ int main(int argc, char *argv[]) {
-                         test_usr();
-                 }
- 
-+                if (arg_system && arg_watchdog_device) {
-+                        r = watchdog_set_device(arg_watchdog_device);
-+                        if (r < 0)
-+                                log_warning_errno(r, "Failed to set watchdog device to %s, ignoring: %m",
-+                                                  arg_watchdog_device);
-+                }
-+
-                 if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY)
-                         watchdog_set_timeout(&arg_runtime_watchdog);
- 
-@@ -2147,8 +2163,13 @@ finish:
-          * here explicitly. valgrind will only generate nice output on
-          * exit(), not on exec(), hence let's do the former not the
-          * latter here. */
--        if (getpid() == 1 && RUNNING_ON_VALGRIND)
-+        if (getpid() == 1 && RUNNING_ON_VALGRIND) {
-+                /* Cleanup watchdog_device strings for valgrind. We need them
-+                 * in become_shutdown() so normally we cannot free them yet. */
-+                watchdog_free_device();
-+                arg_watchdog_device = mfree(arg_watchdog_device);
-                 return 0;
-+        }
- #endif
- 
-         if (shutdown_verb) {
-@@ -2211,7 +2232,11 @@ finish:
- 
-                         /* Tell the binary how often to ping, ignore failure */
-                         if (asprintf(&e, "WATCHDOG_USEC="USEC_FMT, arg_shutdown_watchdog) > 0)
--                                (void) strv_push(&env_block, e);
-+                                (void) strv_consume(&env_block, e);
-+
-+                        if (arg_watchdog_device &&
-+                            asprintf(&e, "WATCHDOG_DEVICE=%s", arg_watchdog_device) > 0)
-+                                (void) strv_consume(&env_block, e);
-                 } else
-                         watchdog_close(true);
- 
-@@ -2226,6 +2251,9 @@ finish:
-                           getpid() == 1 ? "freezing" : "quitting");
-         }
- 
-+        watchdog_free_device();
-+        arg_watchdog_device = mfree(arg_watchdog_device);
-+
-         if (getpid() == 1) {
-                 if (error_message)
-                         manager_status_printf(NULL, STATUS_TYPE_EMERGENCY,
-diff --git a/src/core/shutdown.c b/src/core/shutdown.c
-index a7d5e57..5f0d961 100644
---- a/src/core/shutdown.c
-+++ b/src/core/shutdown.c
-@@ -166,6 +166,7 @@ int main(int argc, char *argv[]) {
-         unsigned retries;
-         int cmd, r;
-         static const char* const dirs[] = {SYSTEM_SHUTDOWN_PATH, NULL};
-+        char *watchdog_device;
- 
-         log_parse_environment();
-         r = parse_argv(argc, argv);
-@@ -206,6 +207,13 @@ int main(int argc, char *argv[]) {
-         in_container = detect_container() > 0;
- 
-         use_watchdog = !!getenv("WATCHDOG_USEC");
-+        watchdog_device = getenv("WATCHDOG_DEVICE");
-+        if (watchdog_device) {
-+                r = watchdog_set_device(watchdog_device);
-+                if (r < 0)
-+                        log_warning_errno(r, "Failed to set watchdog device to %s, ignoring: %m",
-+                                          watchdog_device);
-+        }
- 
-         /* Lock us into memory */
-         mlockall(MCL_CURRENT|MCL_FUTURE);
-@@ -319,6 +327,9 @@ int main(int argc, char *argv[]) {
- 
-  initrd_jump:
- 
-+        /* We're done with the watchdog. */
-+        watchdog_free_device();
-+
-         arguments[0] = NULL;
-         arguments[1] = arg_verb;
-         arguments[2] = NULL;
--- 
-1.8.3.1
-
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/0002-systemd-Make-pam-compile-shared-library.patch b/meta-phosphor/common/recipes-core/systemd/systemd/0002-systemd-Make-pam-compile-shared-library.patch
deleted file mode 100644
index 977f565..0000000
--- a/meta-phosphor/common/recipes-core/systemd/systemd/0002-systemd-Make-pam-compile-shared-library.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From f6d311978915cc1e3eba8a118716a6864309d731 Mon Sep 17 00:00:00 2001
-From: "Edward A. James" <eajames@us.ibm.com>
-Date: Fri, 14 Oct 2016 15:33:40 -0500
-Subject: [PATCH] systemd: Make pam compile shared library
-
-- make pam independant of logind
-- remove bus-util.c from libshared as it's already in libsystemd-internal
-
-Signed-off-by: Edward A. James <eajames@us.ibm.com>
----
- Makefile.am | 60 ++++++++++++++++++++++++++++--------------------------------
- 1 file changed, 28 insertions(+), 32 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index afb6b31..6dd92e7 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1025,7 +1025,6 @@ libshared_la_SOURCES = \
- 	src/shared/import-util.h \
- 	src/shared/sysctl-util.c \
- 	src/shared/sysctl-util.h \
--	src/shared/bus-util.c \
- 	src/shared/bus-util.h \
- 	src/shared/logs-show.c \
- 	src/shared/logs-show.h \
-@@ -5579,39 +5578,6 @@ tests += \
- 	test-login-tables \
- 	test-login-shared
- 
--if HAVE_PAM
--pam_systemd_la_SOURCES = \
--	src/login/pam_systemd.sym \
--	src/login/pam_systemd.c
--
--pam_systemd_la_CFLAGS = \
--	$(AM_CFLAGS) \
--	$(PAM_CFLAGS)
--
--pam_systemd_la_LDFLAGS = \
--	$(AM_LDFLAGS) \
--	-module \
--	-export-dynamic \
--	-avoid-version \
--	-shared \
--	-Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
--
--pam_systemd_la_LIBADD = \
--	libshared.la \
--	$(PAM_LIBS)
--
--pamlib_LTLIBRARIES = \
--	pam_systemd.la
--
--if ENABLE_PAM_CONFIG
--dist_pamconf_DATA = \
--	src/login/systemd-user
--endif
--
--EXTRA_DIST += \
--	src/login/systemd-user.m4
--endif
--
- nodist_systemunit_DATA += \
- 	units/systemd-logind.service
- 
-@@ -5666,6 +5634,34 @@ EXTRA_DIST += \
- 
- # ------------------------------------------------------------------------------
- if HAVE_PAM
-+pam_systemd_la_SOURCES = \
-+	src/login/pam_systemd.sym \
-+	src/login/pam_systemd.c
-+
-+pam_systemd_la_CFLAGS = \
-+	$(AM_CFLAGS) \
-+	$(PAM_CFLAGS)
-+
-+pam_systemd_la_LDFLAGS = \
-+	$(AM_LDFLAGS) \
-+	-module \
-+	-export-dynamic \
-+	-avoid-version \
-+	-shared \
-+	-Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
-+
-+pam_systemd_la_LIBADD = \
-+	libshared.la \
-+	$(PAM_LIBS)
-+
-+pamlib_LTLIBRARIES = \
-+	pam_systemd.la
-+
-+dist_pamconf_DATA = \
-+	src/login/systemd-user
-+
-+EXTRA_DIST += \
-+	src/login/systemd-user.m4
- 
- systemd_user_sessions_SOURCES = \
- 	src/user-sessions/user-sessions.c
--- 
-1.9.1
-
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
index d7cad5f..07b3038 100644
--- a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
@@ -9,23 +9,16 @@
 SRC_URI += "file://default.network"
 SRC_URI += "file://service-restart-policy.conf"
 SRC_URI += "file://0001-sd-bus-Don-t-automatically-add-ObjectManager.patch"
-SRC_URI += "file://0001-Export-message_append_cmdline.patch"
-SRC_URI += "file://0002-systemd-Make-pam-compile-shared-library.patch"
 SRC_URI += "file://0003-basic-Factor-out-string-checking-from-name_to_prefix.patch"
 SRC_URI += "file://0004-basic-Use-path-escaping-when-mangling-path-instances.patch"
 #TODO upstream the below patch via below issue
 #https://github.com/openbmc/openbmc/issues/2016
 SRC_URI += "file://0005-dont-return-error-if-unable-to-create-network-namespace.patch"
 
-SRC_URI += "file://0001-watchdog-allow-a-device-path-to-be-specified.patch"
-SRC_URI += "file://0002-core-Add-WatchdogDevice-config-option-and-implement-.patch"
-
 RRECOMMENDS_${PN} += "obmc-targets"
 FILES_${PN} += "${systemd_unitdir}/network/default.network"
 FILES_${PN} += "${systemd_unitdir}/system.conf.d/service-restart-policy.conf"
 
-EXTRA_OECONF += " --disable-hwdb"
-
 do_install_append() {
         install -m 644 ${WORKDIR}/default.network ${D}${systemd_unitdir}/network/
         install -m 644 -D ${WORKDIR}/service-restart-policy.conf ${D}${systemd_unitdir}/system.conf.d/service-restart-policy.conf
diff --git a/meta-phosphor/common/recipes-devtools/nodejs/nodejs_8.4.0.bbappend b/meta-phosphor/common/recipes-devtools/nodejs/nodejs_8.4.0.bbappend
deleted file mode 100644
index a70300d..0000000
--- a/meta-phosphor/common/recipes-devtools/nodejs/nodejs_8.4.0.bbappend
+++ /dev/null
@@ -1,12 +0,0 @@
-# Overriding map_nodejs_arch() is needed to support building nodejs on ppc64le
-# We can remove this, once OpenBMC moves to a version of Yocto with
-# http://lists.openembedded.org/pipermail/openembedded-devel/2018-February/116737.html
-def map_nodejs_arch(a, d):
-        import re
-
-        if   re.match('i.86$', a): return 'ia32'
-        elif re.match('x86_64$', a): return 'x64'
-        elif re.match('aarch64$', a): return 'arm64'
-        elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64'
-        elif re.match('powerpc$', a): return 'ppc'
-        return a